Skip to content

Commit a24d75a

Browse files
authored
Merge branch 'main' into pk/breadcrumbs-with-overflow-menu
2 parents 0eaf106 + 35f02f0 commit a24d75a

File tree

8 files changed

+280
-551
lines changed

8 files changed

+280
-551
lines changed

package-lock.json

Lines changed: 126 additions & 124 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"@eslint-react/eslint-plugin": "^1.52.6",
4949
"@eslint/compat": "^1.3.2",
5050
"@eslint/eslintrc": "^3.3.1",
51-
"@eslint/js": "^9.33.0",
51+
"@eslint/js": "^9.34.0",
5252
"@github/axe-github": "0.7.0",
53-
"@github/markdownlint-github": "^0.7.0",
53+
"@github/markdownlint-github": "^0.8.0",
5454
"@github/mini-throttle": "2.1.1",
5555
"@github/prettier-config": "0.0.6",
5656
"@mdx-js/react": "1.6.22",
@@ -60,7 +60,7 @@
6060
"@size-limit/preset-big-lib": "11.2.0",
6161
"@vitest/browser": "^3.2.4",
6262
"@vitest/eslint-plugin": "^1.3.4",
63-
"eslint": "^9.33.0",
63+
"eslint": "^9.34.0",
6464
"eslint-import-resolver-typescript": "3.7.0",
6565
"eslint-plugin-clsx": "^0.0.10",
6666
"eslint-plugin-github": "^6.0.0",
@@ -73,7 +73,7 @@
7373
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
7474
"eslint-plugin-react-hooks": "^5.2.0",
7575
"eslint-plugin-ssr-friendly": "1.3.0",
76-
"eslint-plugin-storybook": "^9.1.2",
76+
"eslint-plugin-storybook": "^9.1.3",
7777
"eslint-plugin-testing-library": "^7.6.6",
7878
"globals": "^16.2.0",
7979
"markdownlint-cli2": "^0.17.2",
@@ -89,7 +89,7 @@
8989
"vitest": "^3.2.4"
9090
},
9191
"optionalDependencies": {
92-
"@rollup/rollup-linux-x64-gnu": "^4.46.2"
92+
"@rollup/rollup-linux-x64-gnu": "^4.48.0"
9393
},
9494
"overrides": {
9595
"nwsapi": "2.2.2"

packages/mcp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@rollup/plugin-node-resolve": "^16.0.1",
5252
"@types/turndown": "^5.0.5",
5353
"rimraf": "^6.0.1",
54-
"rollup": "^4.46.2",
54+
"rollup": "^4.48.0",
5555
"rollup-plugin-typescript2": "^0.36.0",
5656
"typescript": "^5.9.2"
5757
}

packages/mcp/src/primitives.ts

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import baseMotion from '@primer/primitives/dist/docs/base/motion/motion.json' with {type: 'json'}
2+
import baseSize from '@primer/primitives/dist/docs/base/size/size.json' with {type: 'json'}
3+
import baseTypography from '@primer/primitives/dist/docs/base/typography/typography.json' with {type: 'json'}
4+
import functionalSizeBorder from '@primer/primitives/dist/docs/functional/size/border.json' with {type: 'json'}
5+
import functionalSizeCoarse from '@primer/primitives/dist/docs/functional/size/size-coarse.json' with {type: 'json'}
6+
import functionalSizeFine from '@primer/primitives/dist/docs/functional/size/size-fine.json' with {type: 'json'}
7+
import functionalSize from '@primer/primitives/dist/docs/functional/size/size.json' with {type: 'json'}
8+
import light from '@primer/primitives/dist/docs/functional/themes/light.json' with {type: 'json'}
9+
import functionalTypography from '@primer/primitives/dist/docs/functional/typography/typography.json' with {type: 'json'}
10+
11+
const categories = {
12+
base: {
13+
motion: Object.values(baseMotion).map(token => {
14+
return {
15+
name: token.name,
16+
type: token.type,
17+
value: token.value,
18+
}
19+
}),
20+
size: Object.values(baseSize).map(token => {
21+
return {
22+
name: token.name,
23+
type: token.type,
24+
value: token.value,
25+
}
26+
}),
27+
typography: Object.values(baseTypography).map(token => {
28+
return {
29+
name: token.name,
30+
type: token.type,
31+
value: token.value,
32+
}
33+
}),
34+
},
35+
functional: {
36+
border: Object.values(functionalSizeBorder).map(token => {
37+
return {
38+
name: token.name,
39+
type: token.type,
40+
value: token.value,
41+
}
42+
}),
43+
sizeCoarse: Object.values(functionalSizeCoarse).map(token => {
44+
return {
45+
name: token.name,
46+
type: token.type,
47+
value: token.value,
48+
}
49+
}),
50+
sizeFine: Object.values(functionalSizeFine).map(token => {
51+
return {
52+
name: token.name,
53+
type: token.type,
54+
value: token.value,
55+
}
56+
}),
57+
size: Object.values(functionalSize).map(token => {
58+
return {
59+
name: token.name,
60+
type: token.type,
61+
value: token.value,
62+
}
63+
}),
64+
themes: {
65+
light: Object.values(light).map(token => {
66+
return {
67+
name: token.name,
68+
type: token.type,
69+
value: token.value,
70+
}
71+
}),
72+
},
73+
typography: Object.values(functionalTypography).map(token => {
74+
return {
75+
name: token.name,
76+
type: token.type,
77+
value: token.value,
78+
}
79+
}),
80+
},
81+
} as const
82+
83+
const tokens = [
84+
...categories.base.motion,
85+
...categories.base.size,
86+
...categories.base.typography,
87+
...categories.functional.border,
88+
...categories.functional.sizeCoarse,
89+
...categories.functional.sizeFine,
90+
...categories.functional.size,
91+
...categories.functional.themes.light,
92+
...categories.functional.typography,
93+
]
94+
95+
function serialize(value: typeof tokens): string {
96+
return value
97+
.map(token => {
98+
return `<token name="${token.name}" value="${token.value}" type="${token.type}"></token>`
99+
})
100+
.join('\n')
101+
}
102+
103+
export {categories, tokens, serialize}

0 commit comments

Comments
 (0)