@xyd-js/storybook 0.0.1-xyd.10 → 0.0.1-xyd.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +8 -9
- package/.storybook/styles.css +0 -5
- package/CHANGELOG.md +24 -0
- package/package.json +7 -8
- package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
- package/src/{content → __fixtures__}/atlas-index/wip1.mdx +3 -3
- package/src/__fixtures__/example-source-uniform.ts +41 -0
- package/src/{content → __fixtures__}/hello-world.mdx +1 -1
- package/src/components/{DemoWireframe.tsx → DemoDocs.tsx} +1 -1
- package/src/decorators/DocsTemplate.tsx +23 -0
- package/src/docs/atlas/Atlas.stories.tsx +27 -18
- package/src/docs/components/coder/CodeSample.stories.tsx +6 -3
- package/src/docs/components/writer/Badge.stories.tsx +1 -2
- package/src/docs/components/writer/GuideCard.stories.tsx +2 -3
- package/src/docs/components/writer/Table.stories.tsx +22 -58
- package/src/docs/components/writer/Tabs.stories.tsx +55 -0
- package/src/docs/components/writer/TocCard.stories.tsx +30 -0
- package/src/docs/components/writer/UnderlineNav.stories.tsx +114 -0
- package/src/docs/components/writer/Update.stories.tsx +91 -0
- package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
- package/src/docs/themes/TODO.md +1 -0
- package/src/docs/themes/themes-designsystem.stories.tsx +3 -2
- package/src/docs/themes/themes.stories.tsx +6 -2
- package/src/docs/ui/Sidebar.stories.tsx +8 -2
- package/storybook-static/assets/Atlas.stories-CERP-lKH.js +153 -0
- package/storybook-static/assets/Badge.stories-DakswLpg.js +6 -0
- package/storybook-static/assets/Breadcrumbs.stories-wdrli8P8.js +21 -0
- package/storybook-static/assets/{Button.stories-BaoDkNl6.js → Button.stories-DnfjGLtF.js} +2 -2
- package/storybook-static/assets/CTABanner-DLG0_gv8-1gNhmGHe.js +4 -0
- package/storybook-static/assets/{CTABanner.stories-DeIwzLSu.js → CTABanner.stories-CmBj9U2A.js} +1 -1
- package/storybook-static/assets/Callout.stories-rp4kMO8N.js +16 -0
- package/storybook-static/assets/{CodeSample.stories-npLtCIKw.js → CodeSample.stories-R6WeHzql.js} +1 -1
- package/storybook-static/assets/CodeSample.stories-prKrGyG7.js +22 -0
- package/storybook-static/assets/Color-YHDXOIA2-D4kH6-fL.js +1 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-DczdxYfS.js +575 -0
- package/storybook-static/assets/{GuideCard.stories-R-2HMLEF.js → GuideCard.stories-D2fmdhxW.js} +2 -2
- package/storybook-static/assets/Heading.stories-BwtFnfuE.js +40 -0
- package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
- package/storybook-static/assets/Nav.stories-DOdsEXEe.js +13 -0
- package/storybook-static/assets/NavLinks.stories-v2TFSIgK.js +19 -0
- package/storybook-static/assets/Pre.stories-bsCA3tqM.js +11 -0
- package/storybook-static/assets/Sidebar.stories-Bo8NQxnh.js +9 -0
- package/storybook-static/assets/Steps.stories-CuIyGdUg.js +16 -0
- package/storybook-static/assets/SubNav.stories-gbx99ZSe.js +19 -0
- package/storybook-static/assets/Table.stories-B4EyLt9m.js +38 -0
- package/storybook-static/assets/Tabs.stories-CBSgQj02.js +42 -0
- package/storybook-static/assets/TocCard.stories-BgvJ6BbB.js +7 -0
- package/storybook-static/assets/UnderlineNav.stories-CBzxJ_ET.js +96 -0
- package/storybook-static/assets/Update-D5e_yqty-DsN8mVwO.js +33 -0
- package/storybook-static/assets/Update.stories-FtwGebQp.js +56 -0
- package/storybook-static/assets/VideoGuide.stories-BRSeChyH.js +3 -0
- package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
- package/storybook-static/assets/_rollupPluginBabelHelpers-CiqSP2w--CY8sTQTJ.js +4 -0
- package/storybook-static/assets/{copy-C0mF-zfo.js → browser.esm-BWgQ7tuZ.js} +12 -12
- package/storybook-static/assets/chunk-NL6KNZEE-BC1iDMSp.js +3 -0
- package/storybook-static/assets/content-CLSEZPMe.js +8 -0
- package/storybook-static/assets/{entry-preview-VSbqQKti.js → entry-preview-BQ1RV56y.js} +2 -2
- package/storybook-static/assets/{entry-preview-docs-B1zb5AAd.js → entry-preview-docs-CxQPtM_Y.js} +1 -1
- package/storybook-static/assets/iframe-B1jb8VLQ.js +211 -0
- package/storybook-static/assets/{index-Ci6h_Amb.js → index-Bd6o6BX5.js} +2 -2
- package/storybook-static/assets/index-BsiG4v0x.js +3 -0
- package/storybook-static/assets/index-CXQShRbs.js +8 -0
- package/storybook-static/assets/index-CXwkSlW-.js +1 -0
- package/storybook-static/assets/index-CzKwSnp0.js +9 -0
- package/storybook-static/assets/index-D_kTjGoR.js +9 -0
- package/storybook-static/assets/index-DgnBCu_c.js +1 -0
- package/storybook-static/assets/{index-BxVt_j7t.js → index-H0MBf5rE.js} +1 -1
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/layouts-Jper_Qis.js +1 -0
- package/storybook-static/assets/preview-BBHl5jls.css +1 -0
- package/storybook-static/assets/preview-D6WjBDEw.js +2 -0
- package/storybook-static/assets/{preview-ik5anPOD.js → preview-N1j9pG9L.js} +1 -1
- package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
- package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
- package/storybook-static/assets/themes-designsystem.stories-COcmw0uR.js +11 -0
- package/storybook-static/assets/themes.stories-PoLDJGzT.js +41 -0
- package/storybook-static/assets/writer-2j4DdIYZ.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +15 -15
- package/storybook-static/sb-addons/docs-12/manager-bundle.js +34 -34
- package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/links-2/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +5 -5
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
- package/storybook-static/sb-manager/runtime.js +119 -119
- package/tsconfig.json +17 -0
- package/vite.config.ts +1 -1
- package/src/content/atlas-index/package-index.mdx +0 -192
- package/src/docs/atlas/AtlasIndex.stories.tsx +0 -130
- package/storybook-static/assets/Atlas.stories-BJDXANWf.js +0 -252
- package/storybook-static/assets/AtlasIndex.stories-C-4vZswz.js +0 -41
- package/storybook-static/assets/Badge.stories-DSo7Lasr.js +0 -6
- package/storybook-static/assets/Breadcrumbs.stories-APB9UDIU.js +0 -21
- package/storybook-static/assets/CTABanner-n3vc4xW5-VHHsd4-C.js +0 -4
- package/storybook-static/assets/Callout.stories-ESozWgIi.js +0 -16
- package/storybook-static/assets/CodeSample-Dkob5gWa-CI-Jdg_T-FUmAtsNF.js +0 -9
- package/storybook-static/assets/CodeSample.stories-DNLDwmyz.js +0 -22
- package/storybook-static/assets/Color-YHDXOIA2-D-wdyPVE.js +0 -1
- package/storybook-static/assets/DocsRenderer-CFRXHY34-CIYeQ6fu.js +0 -575
- package/storybook-static/assets/Heading.stories-CHw8GXC6.js +0 -40
- package/storybook-static/assets/Nav.stories-BeFIh2Vg.js +0 -13
- package/storybook-static/assets/NavLinks.stories-DxWAb2TV.js +0 -19
- package/storybook-static/assets/Pre.stories-CR1zlLen.js +0 -11
- package/storybook-static/assets/Sidebar.stories-B-5LyJIe.js +0 -9
- package/storybook-static/assets/Steps.stories-Bg2orGdz.js +0 -16
- package/storybook-static/assets/SubNav.stories-B1aQLvvq.js +0 -19
- package/storybook-static/assets/Table.stories-DxxdJGx9.js +0 -72
- package/storybook-static/assets/UnderlineNav-9lJPvnIp-I5-GGpts.js +0 -48
- package/storybook-static/assets/_rollupPluginBabelHelpers-C8nLsqZ7-DyHbsKhl.js +0 -4
- package/storybook-static/assets/chevron-right-B9VhLASW.js +0 -31
- package/storybook-static/assets/chunk-K6AXKMTT-BnQROexa.js +0 -12
- package/storybook-static/assets/content-C0yN9Wvw.js +0 -22
- package/storybook-static/assets/iframe-3uG_AAyK.js +0 -211
- package/storybook-static/assets/index-0nua7n0t.js +0 -1
- package/storybook-static/assets/index-B7gF9TUu.js +0 -9
- package/storybook-static/assets/index-C2_NlWRN.js +0 -8
- package/storybook-static/assets/index-D1ZprCIH.js +0 -9
- package/storybook-static/assets/index-po7oPx12.js +0 -16
- package/storybook-static/assets/jsx-runtime-BjG_zV1W.js +0 -9
- package/storybook-static/assets/layouts-CzEI4S2T.js +0 -26
- package/storybook-static/assets/preview-BDbHSxwO.css +0 -1
- package/storybook-static/assets/preview-BLZCCP69.js +0 -2
- package/storybook-static/assets/react-18-BsB9_d4u.js +0 -25
- package/storybook-static/assets/test-utils-LZCCjomP.js +0 -9
- package/storybook-static/assets/themes-designsystem.stories-DsoSBFrP.js +0 -11
- package/storybook-static/assets/themes.stories-CGSgiZ_W.js +0 -41
- package/storybook-static/assets/writer-DhJZ-Wpq.js +0 -4
- /package/src/{content → __fixtures__}/Icons.tsx +0 -0
- /package/src/{content → __fixtures__}/atlas-index.mdx +0 -0
- /package/src/{content → __fixtures__}/code-sample.mdx +0 -0
- /package/storybook-static/assets/{preview-ChdjpSTW.js → preview-ppqJ5XSc.js} +0 -0
package/.storybook/main.ts
CHANGED
|
@@ -31,7 +31,6 @@ function remarkInjectMeta() { // TODO: move to @xyd-js/content
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// TODO: get from @xyd-js/content/md but curently error when importing a `content` lib: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/zdunecki/Code/livesession/xyd/node_modules/.pnpm/estree-util-build-jsx@3.0.1/node_modules/estree-walker/package.json
|
|
35
34
|
export function mdCodeGroup() {
|
|
36
35
|
return (tree: any) => {
|
|
37
36
|
visit(tree, 'containerDirective', (node) => {
|
|
@@ -77,11 +76,11 @@ function toPascalCase(str) {
|
|
|
77
76
|
const supportedDirectives = {
|
|
78
77
|
Details: true,
|
|
79
78
|
details: true,
|
|
80
|
-
|
|
79
|
+
Table: true
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
const tableComponents: { [key: string]: boolean } = {
|
|
84
|
-
|
|
83
|
+
Table: true
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
const parseMarkdown = (content: string) => {
|
|
@@ -110,21 +109,21 @@ export function remarkDirectiveWithMarkdown() {
|
|
|
110
109
|
|
|
111
110
|
const jsxNode = {
|
|
112
111
|
type: 'mdxJsxFlowElement',
|
|
113
|
-
name: '
|
|
112
|
+
name: 'Table',
|
|
114
113
|
attributes: [],
|
|
115
114
|
children: [
|
|
116
115
|
{
|
|
117
116
|
type: 'mdxJsxFlowElement',
|
|
118
|
-
name: '
|
|
117
|
+
name: 'Table.Head',
|
|
119
118
|
attributes: [],
|
|
120
119
|
children: [
|
|
121
120
|
{
|
|
122
121
|
type: 'mdxJsxFlowElement',
|
|
123
|
-
name: '
|
|
122
|
+
name: 'Table.Tr',
|
|
124
123
|
attributes: [],
|
|
125
124
|
children: header.map((cell: string) => ({
|
|
126
125
|
type: 'mdxJsxFlowElement',
|
|
127
|
-
name: '
|
|
126
|
+
name: 'Table.Th',
|
|
128
127
|
attributes: [],
|
|
129
128
|
children: parseMarkdown(cell)
|
|
130
129
|
}))
|
|
@@ -133,11 +132,11 @@ export function remarkDirectiveWithMarkdown() {
|
|
|
133
132
|
},
|
|
134
133
|
...rows.map((row: string[]) => ({
|
|
135
134
|
type: 'mdxJsxFlowElement',
|
|
136
|
-
name: '
|
|
135
|
+
name: 'Table.Tr',
|
|
137
136
|
attributes: [],
|
|
138
137
|
children: row.map((cell: string) => ({
|
|
139
138
|
type: 'mdxJsxFlowElement',
|
|
140
|
-
name: '
|
|
139
|
+
name: 'Table.Td',
|
|
141
140
|
attributes: [],
|
|
142
141
|
children: parseMarkdown(cell)
|
|
143
142
|
}))
|
package/.storybook/styles.css
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @xyd-js/storybook
|
|
2
2
|
|
|
3
|
+
## 0.0.1-xyd.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- test
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @xyd-js/atlas@0.1.0-xyd.18
|
|
10
|
+
- @xyd-js/components@0.1.0-xyd.13
|
|
11
|
+
- @xyd-js/content@0.1.0-xyd.16
|
|
12
|
+
- @xyd-js/theme-poetry@0.1.0-xyd.29
|
|
13
|
+
- @xyd-js/ui@0.1.0-xyd.18
|
|
14
|
+
|
|
15
|
+
## 0.0.1-xyd.11
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- update packages
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @xyd-js/atlas@0.1.0-xyd.17
|
|
22
|
+
- @xyd-js/components@0.1.0-xyd.12
|
|
23
|
+
- @xyd-js/content@0.1.0-xyd.15
|
|
24
|
+
- @xyd-js/theme-poetry@0.1.0-xyd.28
|
|
25
|
+
- @xyd-js/ui@0.1.0-xyd.17
|
|
26
|
+
|
|
3
27
|
## 0.0.1-xyd.10
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyd-js/storybook",
|
|
3
|
-
"version": "0.0.1-xyd.
|
|
3
|
+
"version": "0.0.1-xyd.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@mdx-js/react": "^3.0.1",
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
"react-dom": "^19.0.0",
|
|
12
12
|
"rehype-stringify": "^10.0.1",
|
|
13
13
|
"remark-gfm": "^4.0.0",
|
|
14
|
-
"@xyd-js/atlas": "0.1.0-xyd.
|
|
15
|
-
"@xyd-js/
|
|
16
|
-
"@xyd-js/
|
|
17
|
-
"@xyd-js/components": "0.1.0-xyd.
|
|
18
|
-
"@xyd-js/
|
|
19
|
-
"@xyd-js/theme-poetry": "0.1.0-xyd.27"
|
|
14
|
+
"@xyd-js/atlas": "0.1.0-xyd.18",
|
|
15
|
+
"@xyd-js/theme-poetry": "0.1.0-xyd.29",
|
|
16
|
+
"@xyd-js/ui": "0.1.0-xyd.18",
|
|
17
|
+
"@xyd-js/components": "0.1.0-xyd.13",
|
|
18
|
+
"@xyd-js/content": "0.1.0-xyd.16"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
21
|
"@chromatic-com/storybook": "^1.9.0",
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
"storybook": "^8.3.5",
|
|
41
40
|
"typescript": "^5.5.3",
|
|
42
41
|
"typescript-eslint": "^8.7.0",
|
|
43
|
-
"vite": "^
|
|
42
|
+
"vite": "^6.1.0"
|
|
44
43
|
},
|
|
45
44
|
"eslintConfig": {
|
|
46
45
|
"extends": [
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Package Index
|
|
2
|
+
|
|
3
|
+
These are all the API packages. See all [API symbols](#).
|
|
4
|
+
|
|
5
|
+
<Table>
|
|
6
|
+
<Table.Head>
|
|
7
|
+
<Table.Tr>
|
|
8
|
+
<Table.Th>Package</Table.Th>
|
|
9
|
+
<Table.Th numeric>Description</Table.Th>
|
|
10
|
+
</Table.Tr>
|
|
11
|
+
</Table.Head>
|
|
12
|
+
<Table.Body>
|
|
13
|
+
<Table.Tr>
|
|
14
|
+
<Table.Td>
|
|
15
|
+
<Table.ModelCell>
|
|
16
|
+
[`@xyd-js/atlas`](#)
|
|
17
|
+
</Table.ModelCell>
|
|
18
|
+
</Table.Td>
|
|
19
|
+
<Table.Td numeric muted>
|
|
20
|
+
<Table.Cell>
|
|
21
|
+
API Reference template
|
|
22
|
+
</Table.Cell>
|
|
23
|
+
</Table.Td>
|
|
24
|
+
</Table.Tr>
|
|
25
|
+
<Table.Tr>
|
|
26
|
+
<Table.Td>
|
|
27
|
+
<Table.ModelCell>
|
|
28
|
+
[`@xyd-js/cli`](#)
|
|
29
|
+
</Table.ModelCell>
|
|
30
|
+
</Table.Td>
|
|
31
|
+
<Table.Td numeric muted>
|
|
32
|
+
<Table.Cell>
|
|
33
|
+
Command line interface tools
|
|
34
|
+
</Table.Cell>
|
|
35
|
+
</Table.Td>
|
|
36
|
+
</Table.Tr>
|
|
37
|
+
<Table.Tr>
|
|
38
|
+
<Table.Td>
|
|
39
|
+
<Table.ModelCell>
|
|
40
|
+
[`@xyd-js/components`](#)
|
|
41
|
+
</Table.ModelCell>
|
|
42
|
+
</Table.Td>
|
|
43
|
+
<Table.Td numeric muted>
|
|
44
|
+
<Table.Cell>
|
|
45
|
+
Shared React components library
|
|
46
|
+
</Table.Cell>
|
|
47
|
+
</Table.Td>
|
|
48
|
+
</Table.Tr>
|
|
49
|
+
<Table.Tr>
|
|
50
|
+
<Table.Td>
|
|
51
|
+
<Table.ModelCell>
|
|
52
|
+
[`@xyd-js/content`](#)
|
|
53
|
+
</Table.ModelCell>
|
|
54
|
+
</Table.Td>
|
|
55
|
+
<Table.Td numeric muted>
|
|
56
|
+
<Table.Cell>
|
|
57
|
+
Content management and MDX utilities
|
|
58
|
+
</Table.Cell>
|
|
59
|
+
</Table.Td>
|
|
60
|
+
</Table.Tr>
|
|
61
|
+
<Table.Tr>
|
|
62
|
+
<Table.Td>
|
|
63
|
+
<Table.ModelCell>
|
|
64
|
+
[`@xyd-js/core`](#)
|
|
65
|
+
</Table.ModelCell>
|
|
66
|
+
</Table.Td>
|
|
67
|
+
<Table.Td numeric muted>
|
|
68
|
+
<Table.Cell>
|
|
69
|
+
Core utilities and shared functionality
|
|
70
|
+
</Table.Cell>
|
|
71
|
+
</Table.Td>
|
|
72
|
+
</Table.Tr>
|
|
73
|
+
<Table.Tr>
|
|
74
|
+
<Table.Td>
|
|
75
|
+
<Table.ModelCell>
|
|
76
|
+
[`@xyd-js/documan`](#)
|
|
77
|
+
</Table.ModelCell>
|
|
78
|
+
</Table.Td>
|
|
79
|
+
<Table.Td numeric muted>
|
|
80
|
+
<Table.Cell>
|
|
81
|
+
Documentation sever runner
|
|
82
|
+
</Table.Cell>
|
|
83
|
+
</Table.Td>
|
|
84
|
+
</Table.Tr>
|
|
85
|
+
<Table.Tr>
|
|
86
|
+
<Table.Td>
|
|
87
|
+
<Table.ModelCell>
|
|
88
|
+
[`@xyd-js/framework`](#)
|
|
89
|
+
</Table.ModelCell>
|
|
90
|
+
</Table.Td>
|
|
91
|
+
<Table.Td numeric muted>
|
|
92
|
+
<Table.Cell>
|
|
93
|
+
Bridge between core logic and ui
|
|
94
|
+
</Table.Cell>
|
|
95
|
+
</Table.Td>
|
|
96
|
+
</Table.Tr>
|
|
97
|
+
<Table.Tr>
|
|
98
|
+
<Table.Td>
|
|
99
|
+
<Table.ModelCell>
|
|
100
|
+
[`@xyd-js/gql`](#)
|
|
101
|
+
</Table.ModelCell>
|
|
102
|
+
</Table.Td>
|
|
103
|
+
<Table.Td numeric muted>
|
|
104
|
+
<Table.Cell>
|
|
105
|
+
GraphQL utilities and tools
|
|
106
|
+
</Table.Cell>
|
|
107
|
+
</Table.Td>
|
|
108
|
+
</Table.Tr>
|
|
109
|
+
<Table.Tr>
|
|
110
|
+
<Table.Td>
|
|
111
|
+
<Table.ModelCell>
|
|
112
|
+
[`@xyd-js/openapi`](#)
|
|
113
|
+
</Table.ModelCell>
|
|
114
|
+
</Table.Td>
|
|
115
|
+
<Table.Td numeric muted>
|
|
116
|
+
<Table.Cell>
|
|
117
|
+
OpenAPI specification tools
|
|
118
|
+
</Table.Cell>
|
|
119
|
+
</Table.Td>
|
|
120
|
+
</Table.Tr>
|
|
121
|
+
<Table.Tr>
|
|
122
|
+
<Table.Td>
|
|
123
|
+
<Table.ModelCell>
|
|
124
|
+
[`@xyd-js/plugin-docs`](#)
|
|
125
|
+
</Table.ModelCell>
|
|
126
|
+
</Table.Td>
|
|
127
|
+
<Table.Td numeric muted>
|
|
128
|
+
<Table.Cell>
|
|
129
|
+
Core documentation plugin
|
|
130
|
+
</Table.Cell>
|
|
131
|
+
</Table.Td>
|
|
132
|
+
</Table.Tr>
|
|
133
|
+
<Table.Tr>
|
|
134
|
+
<Table.Td>
|
|
135
|
+
<Table.ModelCell>
|
|
136
|
+
[`@xyd-js/storybook`](#)
|
|
137
|
+
</Table.ModelCell>
|
|
138
|
+
</Table.Td>
|
|
139
|
+
<Table.Td numeric muted>
|
|
140
|
+
<Table.Cell>
|
|
141
|
+
Component documentation and testing
|
|
142
|
+
</Table.Cell>
|
|
143
|
+
</Table.Td>
|
|
144
|
+
</Table.Tr>
|
|
145
|
+
<Table.Tr>
|
|
146
|
+
<Table.Td>
|
|
147
|
+
<Table.ModelCell>
|
|
148
|
+
[`@xyd-js/theme-poetry`](#)
|
|
149
|
+
</Table.ModelCell>
|
|
150
|
+
</Table.Td>
|
|
151
|
+
<Table.Td numeric muted>
|
|
152
|
+
<Table.Cell>
|
|
153
|
+
On of the default themes
|
|
154
|
+
</Table.Cell>
|
|
155
|
+
</Table.Td>
|
|
156
|
+
</Table.Tr>
|
|
157
|
+
<Table.Tr>
|
|
158
|
+
<Table.Td>
|
|
159
|
+
<Table.ModelCell>
|
|
160
|
+
[`@xyd-js/ui`](#)
|
|
161
|
+
</Table.ModelCell>
|
|
162
|
+
</Table.Td>
|
|
163
|
+
<Table.Td numeric muted>
|
|
164
|
+
<Table.Cell>
|
|
165
|
+
Core documentations ui elements
|
|
166
|
+
</Table.Cell>
|
|
167
|
+
</Table.Td>
|
|
168
|
+
</Table.Tr>
|
|
169
|
+
<Table.Tr>
|
|
170
|
+
<Table.Td>
|
|
171
|
+
<Table.ModelCell>
|
|
172
|
+
[`@xyd-js/uniform`](#)
|
|
173
|
+
</Table.ModelCell>
|
|
174
|
+
</Table.Td>
|
|
175
|
+
<Table.Td numeric muted>
|
|
176
|
+
<Table.Cell>
|
|
177
|
+
Unified formatting for API references
|
|
178
|
+
</Table.Cell>
|
|
179
|
+
</Table.Td>
|
|
180
|
+
</Table.Tr>
|
|
181
|
+
<Table.Tr>
|
|
182
|
+
<Table.Td>
|
|
183
|
+
<Table.ModelCell>
|
|
184
|
+
[`@xyd-js/xtokens`](#)
|
|
185
|
+
</Table.ModelCell>
|
|
186
|
+
</Table.Td>
|
|
187
|
+
<Table.Td numeric muted>
|
|
188
|
+
<Table.Cell>
|
|
189
|
+
Design tokens and theming system
|
|
190
|
+
</Table.Cell>
|
|
191
|
+
</Table.Td>
|
|
192
|
+
</Table.Tr>
|
|
193
|
+
</Table.Body>
|
|
194
|
+
</Table>
|
|
@@ -99,7 +99,7 @@ export async function gqlSchemaToReferences(
|
|
|
99
99
|
```
|
|
100
100
|
:::
|
|
101
101
|
|
|
102
|
-
:::
|
|
102
|
+
:::Table
|
|
103
103
|
```ts
|
|
104
104
|
[
|
|
105
105
|
["See also", ""],
|
|
@@ -109,7 +109,7 @@ export async function gqlSchemaToReferences(
|
|
|
109
109
|
:::
|
|
110
110
|
|
|
111
111
|
## Parameters
|
|
112
|
-
:::
|
|
112
|
+
:::Table
|
|
113
113
|
```ts
|
|
114
114
|
[
|
|
115
115
|
["Name", "Type", "Description"],
|
|
@@ -119,7 +119,7 @@ export async function gqlSchemaToReferences(
|
|
|
119
119
|
:::
|
|
120
120
|
|
|
121
121
|
## Returns
|
|
122
|
-
:::
|
|
122
|
+
:::Table
|
|
123
123
|
```ts
|
|
124
124
|
[
|
|
125
125
|
["Type", "Description"],
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {Reference} from '@xyd-js/uniform';
|
|
2
|
+
|
|
3
|
+
export const exampleSourceUniform = {
|
|
4
|
+
"title": "Function gqlSchemaToReferences",
|
|
5
|
+
"canonical": "fn-gqlSchemaToReferences",
|
|
6
|
+
"description": "Converts a GraphQL schema file to references.\n",
|
|
7
|
+
"context": {
|
|
8
|
+
"fileName": "index.ts",
|
|
9
|
+
"fileFullPath": "src/index.ts",
|
|
10
|
+
"line": 48,
|
|
11
|
+
"col": 16,
|
|
12
|
+
"signatureText": "export function gqlSchemaToReferences(schemaLocation: string): Promise<[\n]>;",
|
|
13
|
+
"sourcecode": "export function gqlSchemaToReferences(\n schemaLocation: string\n): Promise<[]> {\n if (schemaLocation.endsWith(\".graphql\")) {\n return Promise.resolve([])\n }\n\n return Promise.resolve([])\n}",
|
|
14
|
+
"package": "@xyd-sources-examples/package-a"
|
|
15
|
+
},
|
|
16
|
+
"examples": {
|
|
17
|
+
"groups": []
|
|
18
|
+
},
|
|
19
|
+
"definitions": [
|
|
20
|
+
{
|
|
21
|
+
"title": "Returns",
|
|
22
|
+
"properties": [
|
|
23
|
+
{
|
|
24
|
+
"name": "",
|
|
25
|
+
"type": "<Promise>",
|
|
26
|
+
"description": "references\n"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"title": "Parameters",
|
|
32
|
+
"properties": [
|
|
33
|
+
{
|
|
34
|
+
"name": "schemaLocation",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The location of the schema file.\n"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
} as Reference
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { LayoutPrimary } from "@xyd-js/components/layouts";
|
|
4
|
+
import { MemoryRouter } from "react-router";
|
|
5
|
+
|
|
6
|
+
import { DemoNavbar, DemoSidebar, DemoSubNav, DemoTOC } from "../components/DemoDocs";
|
|
7
|
+
|
|
8
|
+
interface DocsTemplateDecoratorOptions {
|
|
9
|
+
toc?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const DocsTemplateDecorator = ({ toc = true }: DocsTemplateDecoratorOptions) => (Story) => <MemoryRouter>
|
|
13
|
+
<LayoutPrimary
|
|
14
|
+
header={<DemoNavbar />}
|
|
15
|
+
subheader={<DemoSubNav />}
|
|
16
|
+
aside={<DemoSidebar />}
|
|
17
|
+
content={<>
|
|
18
|
+
<Story />
|
|
19
|
+
</>}
|
|
20
|
+
contentNav={toc ? <DemoTOC /> : undefined}
|
|
21
|
+
layoutSize="large"
|
|
22
|
+
/>
|
|
23
|
+
</MemoryRouter>
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import React, {useState, useEffect} from 'react';
|
|
2
|
-
import type {Meta} from '@storybook/react';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react';
|
|
3
|
+
import { MemoryRouter } from "react-router";
|
|
3
4
|
|
|
4
|
-
import {Reference} from '@xyd-js/uniform';
|
|
5
|
-
import {Atlas} from "@xyd-js/atlas";
|
|
6
|
-
|
|
7
|
-
import {uniformToReferences} from "./uniform-to-references";
|
|
8
|
-
import {MDXReference} from "../../utils/mdx";
|
|
5
|
+
import { Reference } from '@xyd-js/uniform';
|
|
6
|
+
import { Atlas } from "@xyd-js/atlas";
|
|
9
7
|
|
|
8
|
+
import { uniformToReferences } from "./uniform-to-references";
|
|
9
|
+
import { MDXReference } from "../../utils/mdx";
|
|
10
|
+
import { exampleSourceUniform } from "../../__fixtures__/example-source-uniform";
|
|
11
|
+
import { DocsTemplateDecorator } from "../../decorators/DocsTemplate";
|
|
10
12
|
export default {
|
|
11
13
|
title: 'Atlas/Atlas',
|
|
12
14
|
component: Atlas,
|
|
15
|
+
decorators: [
|
|
16
|
+
DocsTemplateDecorator({ toc: false }),
|
|
17
|
+
],
|
|
13
18
|
} as Meta;
|
|
14
19
|
|
|
15
20
|
const Template = (args: any) => {
|
|
@@ -26,17 +31,21 @@ const Template = (args: any) => {
|
|
|
26
31
|
load()
|
|
27
32
|
}, [])
|
|
28
33
|
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
return <>
|
|
35
|
+
<Atlas references={references} />
|
|
36
|
+
</>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Primary = Template.bind({});
|
|
40
|
+
Primary.args = {};
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const TemplateSecondary = () => {
|
|
44
|
+
return <>
|
|
45
|
+
<Atlas kind="secondary" references={[exampleSourceUniform]} />
|
|
46
|
+
</>
|
|
38
47
|
}
|
|
39
48
|
|
|
40
|
-
export const
|
|
41
|
-
|
|
49
|
+
export const Secondary = TemplateSecondary.bind({});
|
|
50
|
+
Secondary.args = {};
|
|
42
51
|
|
|
@@ -2,9 +2,12 @@ import React, {} from 'react';
|
|
|
2
2
|
import type {Meta} from '@storybook/react';
|
|
3
3
|
import {MemoryRouter} from "react-router";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import {ReactContent} from "@xyd-js/components/content";
|
|
6
6
|
|
|
7
|
-
import Content from "../../../
|
|
7
|
+
import Content from "../../../__fixtures__/code-sample.mdx";
|
|
8
|
+
|
|
9
|
+
const reactContent = new ReactContent()
|
|
10
|
+
const contentComponents = reactContent.components()
|
|
8
11
|
|
|
9
12
|
export default {
|
|
10
13
|
title: 'Components/Coder/CodeSample',
|
|
@@ -21,6 +24,6 @@ export const Default = async () => {
|
|
|
21
24
|
paddingTop: "0px",
|
|
22
25
|
margin: "0 auto",
|
|
23
26
|
}}>
|
|
24
|
-
<Content components={
|
|
27
|
+
<Content components={contentComponents}/>
|
|
25
28
|
</div>
|
|
26
29
|
}
|
|
@@ -3,9 +3,8 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import { Badge } from '@xyd-js/components/writer';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Badge> = {
|
|
6
|
-
title: 'Writer/Badge',
|
|
6
|
+
title: 'Components/Writer/Badge',
|
|
7
7
|
component: Badge,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export default meta;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, {} from 'react';
|
|
2
2
|
import type {Meta} from '@storybook/react';
|
|
3
3
|
|
|
4
|
+
import { GuideCard } from '@xyd-js/components/writer';
|
|
4
5
|
import {
|
|
5
|
-
GuideCard,
|
|
6
|
-
|
|
7
6
|
IconSessionReplay,
|
|
8
7
|
IconMetrics
|
|
9
|
-
} from '
|
|
8
|
+
} from '../../../__fixtures__/Icons';
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
11
|
title: 'Components/Writer/GuideCard',
|
|
@@ -2,8 +2,7 @@ import React, {} from 'react';
|
|
|
2
2
|
import type {Meta} from '@storybook/react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
Table
|
|
6
|
-
TableV2
|
|
5
|
+
Table
|
|
7
6
|
} from '@xyd-js/components/writer';
|
|
8
7
|
|
|
9
8
|
export default {
|
|
@@ -17,70 +16,35 @@ export const Default = () => {
|
|
|
17
16
|
margin: "0 auto",
|
|
18
17
|
}}>
|
|
19
18
|
<Table>
|
|
20
|
-
|
|
21
|
-
Name
|
|
22
|
-
</Table.Th>
|
|
23
|
-
<Table.Th>
|
|
24
|
-
Default
|
|
25
|
-
</Table.Th>
|
|
26
|
-
<Table.Th>
|
|
27
|
-
Description
|
|
28
|
-
</Table.Th>
|
|
29
|
-
|
|
19
|
+
<Table.Head>
|
|
30
20
|
<Table.Tr>
|
|
31
|
-
<Table.
|
|
32
|
-
|
|
33
|
-
</Table.
|
|
34
|
-
<Table.
|
|
35
|
-
|
|
36
|
-
</Table.Td>
|
|
37
|
-
<Table.Td>
|
|
38
|
-
Controls the disabled state of the tab
|
|
39
|
-
</Table.Td>
|
|
21
|
+
<Table.Th>Model</Table.Th>
|
|
22
|
+
<Table.Th numeric>Training</Table.Th>
|
|
23
|
+
<Table.Th numeric>Input</Table.Th>
|
|
24
|
+
<Table.Th numeric>Cached input</Table.Th>
|
|
25
|
+
<Table.Th numeric>Output</Table.Th>
|
|
40
26
|
</Table.Tr>
|
|
41
|
-
|
|
27
|
+
</Table.Head>
|
|
28
|
+
<Table.Body>
|
|
42
29
|
<Table.Tr>
|
|
43
30
|
<Table.Td>
|
|
44
|
-
|
|
31
|
+
<Table.Cell>gpt-4o-2024-08-06</Table.Cell>
|
|
45
32
|
</Table.Td>
|
|
46
|
-
<Table.Td>
|
|
47
|
-
|
|
33
|
+
<Table.Td numeric>
|
|
34
|
+
<Table.Cell>$25.00</Table.Cell>
|
|
48
35
|
</Table.Td>
|
|
49
|
-
<Table.Td>
|
|
50
|
-
|
|
36
|
+
<Table.Td numeric>
|
|
37
|
+
<Table.Cell>$3.75</Table.Cell>
|
|
38
|
+
</Table.Td>
|
|
39
|
+
<Table.Td numeric muted>
|
|
40
|
+
<Table.Cell>$1.875</Table.Cell>
|
|
41
|
+
</Table.Td>
|
|
42
|
+
<Table.Td numeric>
|
|
43
|
+
<Table.Cell>$15.00</Table.Cell>
|
|
51
44
|
</Table.Td>
|
|
52
45
|
</Table.Tr>
|
|
53
|
-
</Table>
|
|
46
|
+
</Table.Body>
|
|
47
|
+
</Table>
|
|
54
48
|
</div>
|
|
55
49
|
}
|
|
56
50
|
|
|
57
|
-
export const V2 = () => {
|
|
58
|
-
return <TableV2>
|
|
59
|
-
<TableV2.Head>
|
|
60
|
-
<TableV2.Tr>
|
|
61
|
-
<TableV2.Th>Model</TableV2.Th>
|
|
62
|
-
<TableV2.Th numeric>Training</TableV2.Th>
|
|
63
|
-
<TableV2.Th numeric>Input</TableV2.Th>
|
|
64
|
-
<TableV2.Th numeric>Cached input</TableV2.Th>
|
|
65
|
-
<TableV2.Th numeric>Output</TableV2.Th>
|
|
66
|
-
</TableV2.Tr>
|
|
67
|
-
</TableV2.Head>
|
|
68
|
-
<TableV2.Tr>
|
|
69
|
-
<TableV2.Td>
|
|
70
|
-
<TableV2.ModelCell>gpt-4o-2024-08-06</TableV2.ModelCell>
|
|
71
|
-
</TableV2.Td>
|
|
72
|
-
<TableV2.Td numeric>
|
|
73
|
-
<TableV2.Cell>$25.00</TableV2.Cell>
|
|
74
|
-
</TableV2.Td>
|
|
75
|
-
<TableV2.Td numeric>
|
|
76
|
-
<TableV2.Cell>$3.75</TableV2.Cell>
|
|
77
|
-
</TableV2.Td>
|
|
78
|
-
<TableV2.Td numeric muted>
|
|
79
|
-
<TableV2.Cell>$1.875</TableV2.Cell>
|
|
80
|
-
</TableV2.Td>
|
|
81
|
-
<TableV2.Td numeric>
|
|
82
|
-
<TableV2.Cell>$15.00</TableV2.Cell>
|
|
83
|
-
</TableV2.Td>
|
|
84
|
-
</TableV2.Tr>
|
|
85
|
-
</TableV2>
|
|
86
|
-
}
|