@xyd-js/storybook 0.0.1-xyd.9 → 0.0.1-xyd.93
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 +1120 -0
- package/package.json +18 -16
- 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 +2 -36
- 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-CA74nqRL.js +153 -0
- package/storybook-static/assets/Badge.stories-udh8KQ1n.js +6 -0
- package/storybook-static/assets/Breadcrumbs.stories-BABXAhDc.js +21 -0
- package/storybook-static/assets/Button.stories-BAMvILNH.js +21 -0
- package/storybook-static/assets/CTABanner-GmGzLY3h-1gNhmGHe.js +4 -0
- package/storybook-static/assets/CTABanner.stories-6LzcnRE-.js +22 -0
- package/storybook-static/assets/Callout.stories--R7amIDg.js +16 -0
- package/storybook-static/assets/CodeSample.stories-1k1_b2U_.js +8 -0
- package/storybook-static/assets/CodeSample.stories-Cdb-V4Hf.js +22 -0
- package/storybook-static/assets/Color-YHDXOIA2-CMbL9U0V.js +1 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-C8mihE8i.js +575 -0
- package/storybook-static/assets/GuideCard.stories-BE3Wbgi7.js +65 -0
- package/storybook-static/assets/Heading.stories-BTA7vvBS.js +40 -0
- package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
- package/storybook-static/assets/Nav.stories-DpclupjS.js +13 -0
- package/storybook-static/assets/NavLinks.stories-HN1sY9KG.js +19 -0
- package/storybook-static/assets/Pre.stories-BmgUoXCp.js +11 -0
- package/storybook-static/assets/Sidebar.stories-Cefi37FA.js +9 -0
- package/storybook-static/assets/Steps.stories-BuPL-2qD.js +16 -0
- package/storybook-static/assets/SubNav.stories-Cjoyucxm.js +19 -0
- package/storybook-static/assets/Table.stories-B8OA26Pe.js +38 -0
- package/storybook-static/assets/Tabs.stories-CoFGi3WW.js +42 -0
- package/storybook-static/assets/TocCard.stories-BT6EM_pE.js +7 -0
- package/storybook-static/assets/UnderlineNav.stories-Cnf6pt0k.js +96 -0
- package/storybook-static/assets/Update-DW9dH5N9-CD7YhPMI.js +33 -0
- package/storybook-static/assets/Update.stories-B73r1Tbi.js +56 -0
- package/storybook-static/assets/VideoGuide.stories-BXVkqSPD.js +3 -0
- package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
- package/storybook-static/assets/_rollupPluginBabelHelpers-C9CjZAEz-CY8sTQTJ.js +4 -0
- package/storybook-static/assets/browser.esm-CN-DahBv.js +20 -0
- package/storybook-static/assets/chunk-QMGIS6GS-yc0h92Hi.js +3 -0
- package/storybook-static/assets/chunk-XP5HYGXS-BpfKkqn7.js +1 -0
- package/storybook-static/assets/content-CSXEg22X.js +8 -0
- package/storybook-static/assets/entry-preview-docs-DU3GzdsG.js +46 -0
- package/storybook-static/assets/entry-preview-nhF-91uZ.js +2 -0
- package/storybook-static/assets/entry-preview-rsc-56ExrKd2.js +1 -0
- package/storybook-static/assets/iframe-DrH3zgSM.js +211 -0
- package/storybook-static/assets/index-BIB-w1Uo.js +240 -0
- package/storybook-static/assets/index-Cf9b6H0j.js +8 -0
- package/storybook-static/assets/index-CzKwSnp0.js +9 -0
- package/storybook-static/assets/index-DUCcPMOf.js +1 -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-DrFu-skq.js +6 -0
- package/storybook-static/assets/index-H0MBf5rE.js +1 -0
- package/storybook-static/assets/index-NLz7q__W.js +3 -0
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/layouts-cDik2txp.js +1 -0
- package/storybook-static/assets/preview-BCS2SRc1.js +1 -0
- package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
- package/storybook-static/assets/preview-BqTZaGhc.js +1 -0
- package/storybook-static/assets/preview-DFQq_Bna.css +1 -0
- package/storybook-static/assets/preview-DGZ5Qq08.js +34 -0
- package/storybook-static/assets/preview-DHQbi4pV.js +1 -0
- package/storybook-static/assets/preview-DOQUpg5A.js +2 -0
- package/storybook-static/assets/preview-DTyQTpzx.js +1 -0
- package/storybook-static/assets/preview-TqM3Oi8H.js +1 -0
- package/storybook-static/assets/preview-WIE65ICp.js +1 -0
- package/storybook-static/assets/preview-caVMbCIR.js +7 -0
- 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-L4FzipEN.js +11 -0
- package/storybook-static/assets/themes.stories-Dmi4HJIh.js +41 -0
- package/storybook-static/assets/writer-DmQXEV5R.js +1 -0
- package/storybook-static/iframe.html +666 -0
- 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/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/package.json
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyd-js/storybook",
|
|
3
|
-
"version": "0.0.1-xyd.
|
|
3
|
+
"version": "0.0.1-xyd.93",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
+
"react": "^19.1.0",
|
|
7
|
+
"react-dom": "^19.1.0",
|
|
8
|
+
"@xyd-js/atlas": "0.1.0-xyd.99",
|
|
9
|
+
"@xyd-js/content": "0.1.0-xyd.97",
|
|
10
|
+
"@xyd-js/ui": "0.1.0-xyd.99",
|
|
11
|
+
"@xyd-js/components": "0.1.0-xyd.94",
|
|
12
|
+
"@xyd-js/theme-cosmo": "0.1.0-xyd.83",
|
|
13
|
+
"@xyd-js/theme-opener": "0.1.0-xyd.83",
|
|
14
|
+
"@xyd-js/theme-picasso": "0.1.0-xyd.83",
|
|
15
|
+
"@xyd-js/theme-poetry": "0.1.0-xyd.110"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"rehype-stringify": "^10.0.1",
|
|
19
|
+
"remark-gfm": "^4.0.0",
|
|
6
20
|
"@mdx-js/react": "^3.0.1",
|
|
7
21
|
"@mdx-js/rollup": "^3.0.1",
|
|
8
22
|
"acorn": "^8.14.1",
|
|
9
23
|
"acorn-jsx": "^5.3.2",
|
|
10
|
-
"react": "^19.0.0",
|
|
11
|
-
"react-dom": "^19.0.0",
|
|
12
|
-
"rehype-stringify": "^10.0.1",
|
|
13
|
-
"remark-gfm": "^4.0.0",
|
|
14
|
-
"@xyd-js/atlas": "0.1.0-xyd.15",
|
|
15
|
-
"@xyd-js/components": "0.1.0-xyd.10",
|
|
16
|
-
"@xyd-js/content": "0.1.0-xyd.13",
|
|
17
|
-
"@xyd-js/fable-wiki": "0.1.0-xyd.13",
|
|
18
|
-
"@xyd-js/ui": "0.1.0-xyd.15",
|
|
19
|
-
"@xyd-js/theme-poetry": "0.1.0-xyd.26"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
24
|
"@chromatic-com/storybook": "^1.9.0",
|
|
23
25
|
"@eslint/js": "^9.11.1",
|
|
24
26
|
"@storybook/addon-essentials": "^8.3.5",
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
"@storybook/react": "^8.3.5",
|
|
30
32
|
"@storybook/react-vite": "^8.3.5",
|
|
31
33
|
"@storybook/test": "^8.3.5",
|
|
32
|
-
"@types/react": "^19.
|
|
33
|
-
"@types/react-dom": "^19.
|
|
34
|
+
"@types/react": "^19.1.0",
|
|
35
|
+
"@types/react-dom": "^19.1.0",
|
|
34
36
|
"@vitejs/plugin-react": "^4.3.2",
|
|
35
37
|
"eslint": "^9.11.1",
|
|
36
38
|
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
"storybook": "^8.3.5",
|
|
41
43
|
"typescript": "^5.5.3",
|
|
42
44
|
"typescript-eslint": "^8.7.0",
|
|
43
|
-
"vite": "^
|
|
45
|
+
"vite": "^7.0.0"
|
|
44
46
|
},
|
|
45
47
|
"eslintConfig": {
|
|
46
48
|
"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
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { Badge
|
|
4
|
-
import { useStyle } from '@xyd-js/components/utils';
|
|
3
|
+
import { Badge } from '@xyd-js/components/writer';
|
|
5
4
|
|
|
6
5
|
const meta: Meta<typeof Badge> = {
|
|
7
|
-
title: 'Writer/Badge',
|
|
6
|
+
title: 'Components/Writer/Badge',
|
|
8
7
|
component: Badge,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
8
|
};
|
|
11
9
|
|
|
12
10
|
export default meta;
|
|
@@ -19,35 +17,3 @@ export const Default: Story = {
|
|
|
19
17
|
kind: 'warning',
|
|
20
18
|
},
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
// Custom styled version
|
|
24
|
-
const CustomStyledBadge = () => {
|
|
25
|
-
const styled = useStyle<BadgeStyles>(Badge);
|
|
26
|
-
|
|
27
|
-
// Override warning style
|
|
28
|
-
const warningClass = styled.BadgeHostWarning`
|
|
29
|
-
background-color: #fff3dc;
|
|
30
|
-
border: 2px solid #ffb020;
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
// Override info style
|
|
34
|
-
const infoClass = styled.BadgeHostInfo`
|
|
35
|
-
background-color: #d8f3ff;
|
|
36
|
-
border: 2px solid #0288d1;
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<div style={{ display: 'flex', gap: '16px' }}>
|
|
41
|
-
<Badge kind="warning" className={warningClass}>
|
|
42
|
-
Custom Warning Badge
|
|
43
|
-
</Badge>
|
|
44
|
-
<Badge kind="info" className={infoClass}>
|
|
45
|
-
Custom Info Badge
|
|
46
|
-
</Badge>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const CustomStyled: Story = {
|
|
52
|
-
render: () => <CustomStyledBadge />,
|
|
53
|
-
};
|
|
@@ -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
|
-
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { } from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Tabs,
|
|
6
|
+
} from '@xyd-js/components/writer';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/Writer/Tabs',
|
|
10
|
+
} as Meta;
|
|
11
|
+
|
|
12
|
+
export const Default = () => {
|
|
13
|
+
return <div style={{
|
|
14
|
+
padding: "100px",
|
|
15
|
+
paddingTop: "0px",
|
|
16
|
+
margin: "0 auto",
|
|
17
|
+
}}>
|
|
18
|
+
<Tabs items={["User Behavior", "Feature Adoption", "Churn Analysis", "Churn Analysis2", "Churn Analysis3", "Churn Analysis4", "Churn Analysis5", "Churn Analysis6"]}>
|
|
19
|
+
<Tabs.Content value="User Behavior">
|
|
20
|
+
Gain insights into user behavior by replaying sessions and analyzing click patterns. This helps uncover friction
|
|
21
|
+
points in your app's user experience.
|
|
22
|
+
</Tabs.Content>
|
|
23
|
+
<Tabs.Content value="Feature Adoption">
|
|
24
|
+
Understand how users engage with new features. Track metrics like time to adoption and overall usage to measure
|
|
25
|
+
feature success.
|
|
26
|
+
</Tabs.Content>
|
|
27
|
+
<Tabs.Content value="Churn Analysis">
|
|
28
|
+
Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
|
|
29
|
+
retention strategies.
|
|
30
|
+
</Tabs.Content>
|
|
31
|
+
<Tabs.Content value="Churn Analysis2">
|
|
32
|
+
Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
|
|
33
|
+
retention strategies.
|
|
34
|
+
</Tabs.Content>
|
|
35
|
+
<Tabs.Content value="Churn Analysis3">
|
|
36
|
+
Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
|
|
37
|
+
retention strategies.
|
|
38
|
+
</Tabs.Content>
|
|
39
|
+
<Tabs.Content value="Churn Analysis4">
|
|
40
|
+
Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
|
|
41
|
+
retention strategies.
|
|
42
|
+
</Tabs.Content>
|
|
43
|
+
<Tabs.Content value="Churn Analysis5">
|
|
44
|
+
Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
|
|
45
|
+
retention strategies.
|
|
46
|
+
</Tabs.Content>
|
|
47
|
+
<Tabs.Content value="Churn Analysis6">
|
|
48
|
+
Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
|
|
49
|
+
retention strategies.
|
|
50
|
+
</Tabs.Content>
|
|
51
|
+
</Tabs>
|
|
52
|
+
</div>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|