@xyd-js/storybook 0.0.1-xyd.6 → 0.0.1-xyd.63

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.
Files changed (145) hide show
  1. package/.storybook/main.ts +8 -9
  2. package/.storybook/preview.ts +1 -3
  3. package/.storybook/styles.css +0 -5
  4. package/CHANGELOG.md +702 -0
  5. package/LICENSE +21 -0
  6. package/package.json +18 -15
  7. package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
  8. package/src/{content → __fixtures__}/atlas-index/wip1.mdx +3 -3
  9. package/src/__fixtures__/example-source-uniform.ts +41 -0
  10. package/src/{content → __fixtures__}/hello-world.mdx +1 -1
  11. package/src/components/{DemoWireframe.tsx → DemoDocs.tsx} +1 -1
  12. package/src/decorators/DocsTemplate.tsx +23 -0
  13. package/src/docs/atlas/Atlas.stories.tsx +27 -18
  14. package/src/docs/components/coder/CodeSample.stories.tsx +6 -3
  15. package/src/docs/components/writer/Badge.stories.tsx +15 -40
  16. package/src/docs/components/writer/GuideCard.stories.tsx +2 -3
  17. package/src/docs/components/writer/Table.stories.tsx +22 -58
  18. package/src/docs/components/writer/Tabs.stories.tsx +55 -0
  19. package/src/docs/components/writer/TocCard.stories.tsx +30 -0
  20. package/src/docs/components/writer/UnderlineNav.stories.tsx +114 -0
  21. package/src/docs/components/writer/Update.stories.tsx +91 -0
  22. package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
  23. package/src/docs/themes/TODO.md +1 -0
  24. package/src/docs/themes/themes-designsystem.stories.tsx +3 -2
  25. package/src/docs/themes/themes.stories.tsx +6 -2
  26. package/src/docs/ui/Sidebar.stories.tsx +8 -2
  27. package/storybook-static/assets/Atlas.stories-DsQbLsBO.js +153 -0
  28. package/storybook-static/assets/Badge.stories-BB25VaXB.js +6 -0
  29. package/storybook-static/assets/Breadcrumbs.stories-8dY-0FZ6.js +21 -0
  30. package/storybook-static/assets/{Button.stories-zZz68Dp3.js → Button.stories-Ct9tcWxH.js} +1 -1
  31. package/storybook-static/assets/CTABanner-SOi-EjNb-1gNhmGHe.js +4 -0
  32. package/storybook-static/assets/{CTABanner.stories-CCWd5nXl.js → CTABanner.stories-B5jWAOv9.js} +1 -1
  33. package/storybook-static/assets/Callout.stories-DYh3dp1V.js +16 -0
  34. package/storybook-static/assets/CodeSample.stories-DdqAV6pE.js +22 -0
  35. package/storybook-static/assets/{CodeSample.stories-npLtCIKw.js → CodeSample.stories-R6WeHzql.js} +1 -1
  36. package/storybook-static/assets/Color-YHDXOIA2-BLLMp-rk.js +1 -0
  37. package/storybook-static/assets/DocsRenderer-CFRXHY34-iREIpqZs.js +575 -0
  38. package/storybook-static/assets/{GuideCard.stories-CtHzplO6.js → GuideCard.stories-DlOupG-0.js} +2 -2
  39. package/storybook-static/assets/Heading.stories-CTPUxGQU.js +40 -0
  40. package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
  41. package/storybook-static/assets/Nav.stories-DOdsEXEe.js +13 -0
  42. package/storybook-static/assets/NavLinks.stories-ChboVW3X.js +19 -0
  43. package/storybook-static/assets/Pre.stories-BiOV0Oe6.js +11 -0
  44. package/storybook-static/assets/Sidebar.stories-DkscgzB6.js +9 -0
  45. package/storybook-static/assets/Steps.stories-DdgI2muz.js +16 -0
  46. package/storybook-static/assets/SubNav.stories-gbx99ZSe.js +19 -0
  47. package/storybook-static/assets/Table.stories-_JY94lJp.js +38 -0
  48. package/storybook-static/assets/Tabs.stories-C91xYkjj.js +42 -0
  49. package/storybook-static/assets/TocCard.stories-3Hrq8ntN.js +7 -0
  50. package/storybook-static/assets/UnderlineNav.stories-D44nShoc.js +96 -0
  51. package/storybook-static/assets/Update-DvGnbDKn-BxY7KlqE.js +33 -0
  52. package/storybook-static/assets/Update.stories-DXMAnZ21.js +56 -0
  53. package/storybook-static/assets/VideoGuide.stories-w76_6bQA.js +3 -0
  54. package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
  55. package/storybook-static/assets/_rollupPluginBabelHelpers-DK3gn7J7-CY8sTQTJ.js +4 -0
  56. package/storybook-static/assets/{copy-DNsBvoDT.js → browser.esm-BBxEv_2n.js} +12 -12
  57. package/storybook-static/assets/chunk-NL6KNZEE-BC1iDMSp.js +3 -0
  58. package/storybook-static/assets/content-Cgm3P2iF.js +8 -0
  59. package/storybook-static/assets/{entry-preview-p5a0L45N.js → entry-preview-XrF1hMc_.js} +2 -2
  60. package/storybook-static/assets/{entry-preview-docs-D4yhrvjB.js → entry-preview-docs-CxQPtM_Y.js} +1 -1
  61. package/storybook-static/assets/iframe-B8sZbN7f.js +211 -0
  62. package/storybook-static/assets/{index-Ci6h_Amb.js → index-Bd6o6BX5.js} +2 -2
  63. package/storybook-static/assets/index-BsiG4v0x.js +3 -0
  64. package/storybook-static/assets/index-CXQShRbs.js +8 -0
  65. package/storybook-static/assets/index-CXwkSlW-.js +1 -0
  66. package/storybook-static/assets/index-CzKwSnp0.js +9 -0
  67. package/storybook-static/assets/index-D_kTjGoR.js +9 -0
  68. package/storybook-static/assets/index-DgnBCu_c.js +1 -0
  69. package/storybook-static/assets/{index-C3_PYvTT.js → index-H0MBf5rE.js} +1 -1
  70. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
  71. package/storybook-static/assets/layouts-Bfh4ZDPm.js +1 -0
  72. package/storybook-static/assets/preview-CoBvlzsX.css +1 -0
  73. package/storybook-static/assets/preview-CxgX81oj.js +2 -0
  74. package/storybook-static/assets/{preview-ik5anPOD.js → preview-N1j9pG9L.js} +1 -1
  75. package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
  76. package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
  77. package/storybook-static/assets/themes-designsystem.stories-Do8f936h.js +11 -0
  78. package/storybook-static/assets/themes.stories-By9PFakX.js +41 -0
  79. package/storybook-static/assets/writer-ia0ggDZA.js +1 -0
  80. package/storybook-static/iframe.html +1 -1
  81. package/storybook-static/index.html +1 -1
  82. package/storybook-static/index.json +1 -1
  83. package/storybook-static/project.json +1 -1
  84. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +15 -15
  85. package/storybook-static/sb-addons/docs-12/manager-bundle.js +34 -34
  86. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +1 -1
  87. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +8 -8
  88. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +8 -8
  89. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
  90. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
  91. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
  92. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  93. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
  94. package/storybook-static/sb-addons/links-2/manager-bundle.js +1 -1
  95. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +5 -5
  96. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
  97. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  98. package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
  99. package/storybook-static/sb-manager/runtime.js +119 -119
  100. package/tsconfig.json +17 -0
  101. package/vite.config.ts +1 -1
  102. package/src/content/atlas-index/package-index.mdx +0 -192
  103. package/src/docs/atlas/AtlasIndex.stories.tsx +0 -130
  104. package/storybook-static/assets/Atlas.stories-DeK56mng.js +0 -252
  105. package/storybook-static/assets/AtlasIndex.stories-CgaI1jRb.js +0 -41
  106. package/storybook-static/assets/Badge.stories-DZifzirN.js +0 -31
  107. package/storybook-static/assets/Breadcrumbs.stories-vunfoj7H.js +0 -21
  108. package/storybook-static/assets/CTABanner-wB-mvAxd-DwYWZ4fP.js +0 -4
  109. package/storybook-static/assets/Callout.stories-BZSlwnWD.js +0 -16
  110. package/storybook-static/assets/CodeSample-DB1D3F7N-C5AHaCBx-D2i_bX1Z.js +0 -9
  111. package/storybook-static/assets/CodeSample.stories-Zju_BViQ.js +0 -22
  112. package/storybook-static/assets/Color-YHDXOIA2-DEwwEJF5.js +0 -1
  113. package/storybook-static/assets/DocsRenderer-CFRXHY34-BnbD8jil.js +0 -575
  114. package/storybook-static/assets/Heading.stories-hOIiOtGj.js +0 -40
  115. package/storybook-static/assets/Nav.stories-DDu5T02Y.js +0 -13
  116. package/storybook-static/assets/NavLinks.stories-C-m4jsZG.js +0 -19
  117. package/storybook-static/assets/Pre.stories-Cx3Xp7p5.js +0 -11
  118. package/storybook-static/assets/Sidebar.stories-5uZaQT9P.js +0 -9
  119. package/storybook-static/assets/Steps.stories-CroVYyMk.js +0 -16
  120. package/storybook-static/assets/SubNav.stories-DH8b0a7D.js +0 -19
  121. package/storybook-static/assets/Table.stories-DH33FA7O.js +0 -72
  122. package/storybook-static/assets/UnderlineNav-CdHpxTEt-DnGwWXeI.js +0 -46
  123. package/storybook-static/assets/_rollupPluginBabelHelpers-BsWmI4nf-CerVq3GU.js +0 -4
  124. package/storybook-static/assets/chevron-right-MQoc73cD.js +0 -31
  125. package/storybook-static/assets/chunk-K6AXKMTT-CzEIZnfC.js +0 -12
  126. package/storybook-static/assets/content-C3X0CWsZ.js +0 -22
  127. package/storybook-static/assets/iframe-5hRm0uzd.js +0 -211
  128. package/storybook-static/assets/index-BPIV5q2-.js +0 -18
  129. package/storybook-static/assets/index-BdGwgT04.js +0 -9
  130. package/storybook-static/assets/index-C7VnYWJ0.js +0 -9
  131. package/storybook-static/assets/index-CGqnQ2T-.js +0 -8
  132. package/storybook-static/assets/index-DXayMMq-.js +0 -1
  133. package/storybook-static/assets/jsx-runtime-BjG_zV1W.js +0 -9
  134. package/storybook-static/assets/layouts-CkIqr4wb.js +0 -32
  135. package/storybook-static/assets/preview-BYe-pB8z.js +0 -2
  136. package/storybook-static/assets/preview-BaYfXIWh.css +0 -1
  137. package/storybook-static/assets/react-18-DQs0uuxx.js +0 -25
  138. package/storybook-static/assets/test-utils-Di69x3Vj.js +0 -9
  139. package/storybook-static/assets/themes-designsystem.stories-CYUUtSoI.js +0 -11
  140. package/storybook-static/assets/themes.stories-lpuIOBo2.js +0 -41
  141. package/storybook-static/assets/writer-B4lgk2fa.js +0 -4
  142. /package/src/{content → __fixtures__}/Icons.tsx +0 -0
  143. /package/src/{content → __fixtures__}/atlas-index.mdx +0 -0
  144. /package/src/{content → __fixtures__}/code-sample.mdx +0 -0
  145. /package/storybook-static/assets/{preview-BvcEG2BB.js → preview-BNQ06L9w.js} +0 -0
package/package.json CHANGED
@@ -1,23 +1,26 @@
1
1
  {
2
2
  "name": "@xyd-js/storybook",
3
- "version": "0.0.1-xyd.6",
3
+ "version": "0.0.1-xyd.63",
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.69",
9
+ "@xyd-js/components": "0.1.0-xyd.64",
10
+ "@xyd-js/theme-cosmo": "0.1.0-xyd.53",
11
+ "@xyd-js/content": "0.1.0-xyd.67",
12
+ "@xyd-js/theme-opener": "0.1.0-xyd.53",
13
+ "@xyd-js/theme-picasso": "0.1.0-xyd.53",
14
+ "@xyd-js/ui": "0.1.0-xyd.69",
15
+ "@xyd-js/theme-poetry": "0.1.0-xyd.80"
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/content": "0.1.0-xyd.10",
15
- "@xyd-js/components": "0.1.0-xyd.7",
16
- "@xyd-js/atlas": "0.1.0-xyd.12",
17
- "@xyd-js/fable-wiki": "0.1.0-xyd.10",
18
- "@xyd-js/ui": "0.1.0-xyd.12"
19
- },
20
- "devDependencies": {
21
24
  "@chromatic-com/storybook": "^1.9.0",
22
25
  "@eslint/js": "^9.11.1",
23
26
  "@storybook/addon-essentials": "^8.3.5",
@@ -28,8 +31,8 @@
28
31
  "@storybook/react": "^8.3.5",
29
32
  "@storybook/react-vite": "^8.3.5",
30
33
  "@storybook/test": "^8.3.5",
31
- "@types/react": "^19.0.0",
32
- "@types/react-dom": "^19.0.0",
34
+ "@types/react": "^19.1.0",
35
+ "@types/react-dom": "^19.1.0",
33
36
  "@vitejs/plugin-react": "^4.3.2",
34
37
  "eslint": "^9.11.1",
35
38
  "eslint-plugin-react-hooks": "^5.1.0-rc.0",
@@ -39,7 +42,7 @@
39
42
  "storybook": "^8.3.5",
40
43
  "typescript": "^5.5.3",
41
44
  "typescript-eslint": "^8.7.0",
42
- "vite": "^5.4.8"
45
+ "vite": "^7.0.0"
43
46
  },
44
47
  "eslintConfig": {
45
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
- :::TableV2
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
- :::TableV2
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
- :::TableV2
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
@@ -10,7 +10,7 @@ import {
10
10
  IconSessionReplay,
11
11
  IconMetrics,
12
12
  IconFunnels
13
- } from "./Icons";
13
+ } from "./Icons"
14
14
 
15
15
  # Product Analytics
16
16
  ### Learn how to analyze user behavior to optimize your product.
@@ -34,7 +34,7 @@ export function DemoNavbar() {
34
34
  }
35
35
 
36
36
  export function DemoSubNav() {
37
- return <SubNav title="Apps" value="build">
37
+ return <SubNav title="APPS" value="build">
38
38
  <SubNav.Item value="build" href="/build">
39
39
  Build
40
40
  </SubNav.Item>
@@ -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 <div style={{
30
- width: "1200px",
31
- display: "flex",
32
- alignItems: "center",
33
- flexDirection: "column",
34
- margin: "0 auto"
35
- }}>
36
- <Atlas references={references}/>
37
- </div>
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 Default = Template.bind({});
41
- Default.args = {};
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 getContentComponents from "@xyd-js/components/content";
5
+ import {ReactContent} from "@xyd-js/components/content";
6
6
 
7
- import Content from "../../../content/code-sample.mdx";
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={getContentComponents()}/>
27
+ <Content components={contentComponents}/>
25
28
  </div>
26
29
  }
@@ -1,44 +1,19 @@
1
- import React, {} from 'react';
2
- import type {Meta} from '@storybook/react';
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { Badge } from '@xyd-js/components/writer';
3
4
 
4
- import {Badge} from "@xyd-js/components/writer";
5
-
6
- export default {
5
+ const meta: Meta<typeof Badge> = {
7
6
  title: 'Components/Writer/Badge',
8
- } as Meta;
9
-
10
- export const Default = () => {
11
- return <div style={{
12
- padding: "100px",
13
- paddingTop: "0px",
14
- margin: "0 auto",
15
- }}>
16
- <Badge kind="">
17
- Default
18
- </Badge>
19
- </div>
20
- }
7
+ component: Badge,
8
+ };
21
9
 
22
- export const Warning = () => {
23
- return <div style={{
24
- padding: "100px",
25
- paddingTop: "0px",
26
- margin: "0 auto",
27
- }}>
28
- <Badge kind="warning">
29
- Warning
30
- </Badge>
31
- </div>
32
- }
10
+ export default meta;
11
+ type Story = StoryObj<typeof Badge>;
33
12
 
34
- export const Info = () => {
35
- return <div style={{
36
- padding: "100px",
37
- paddingTop: "0px",
38
- margin: "0 auto",
39
- }}>
40
- <Badge kind="info">
41
- Warning
42
- </Badge>
43
- </div>
44
- }
13
+ // Basic usage
14
+ export const Default: Story = {
15
+ args: {
16
+ children: 'Default Badge',
17
+ kind: 'warning',
18
+ },
19
+ };
@@ -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 '@xyd-js/components/writer';
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
- <Table.Th>
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.Td>
32
- disabled
33
- </Table.Td>
34
- <Table.Td>
35
- false
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
- active
31
+ <Table.Cell>gpt-4o-2024-08-06</Table.Cell>
45
32
  </Table.Td>
46
- <Table.Td>
47
- false
33
+ <Table.Td numeric>
34
+ <Table.Cell>$25.00</Table.Cell>
48
35
  </Table.Td>
49
- <Table.Td>
50
- Controls the active state of the tab
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
- }