@xyd-js/storybook 0.0.1-xyd.4 → 0.0.1-xyd.51

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 +172 -4
  2. package/.storybook/preview.ts +1 -2
  3. package/.storybook/styles.css +0 -5
  4. package/CHANGELOG.md +527 -0
  5. package/LICENSE +21 -0
  6. package/package.json +14 -10
  7. package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
  8. package/src/__fixtures__/atlas-index/wip1.mdx +131 -0
  9. package/src/__fixtures__/atlas-index.mdx +53 -0
  10. package/src/__fixtures__/example-source-uniform.ts +41 -0
  11. package/src/{content → __fixtures__}/hello-world.mdx +1 -1
  12. package/src/components/DemoDocs.tsx +237 -0
  13. package/src/components/logo.tsx +37 -0
  14. package/src/decorators/DocsTemplate.tsx +23 -0
  15. package/src/docs/atlas/Atlas.stories.tsx +30 -26
  16. package/src/docs/components/coder/CodeSample.stories.tsx +6 -3
  17. package/src/docs/components/writer/Badge.stories.tsx +15 -40
  18. package/src/docs/components/writer/GuideCard.stories.tsx +2 -3
  19. package/src/docs/components/writer/Table.stories.tsx +23 -27
  20. package/src/docs/components/writer/Tabs.stories.tsx +55 -0
  21. package/src/docs/components/writer/TocCard.stories.tsx +30 -0
  22. package/src/docs/components/writer/UnderlineNav.stories.tsx +114 -0
  23. package/src/docs/components/writer/Update.stories.tsx +91 -0
  24. package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
  25. package/src/docs/themes/TODO.md +1 -0
  26. package/src/docs/themes/themes-designsystem.stories.tsx +3 -2
  27. package/src/docs/themes/themes.stories.tsx +33 -26
  28. package/src/docs/ui/Sidebar.stories.tsx +8 -2
  29. package/storybook-static/assets/Atlas.stories-DsQbLsBO.js +153 -0
  30. package/storybook-static/assets/Badge.stories-BB25VaXB.js +6 -0
  31. package/storybook-static/assets/Breadcrumbs.stories-8dY-0FZ6.js +21 -0
  32. package/storybook-static/assets/{Button.stories-BXyfQD_l.js → Button.stories-Ct9tcWxH.js} +1 -1
  33. package/storybook-static/assets/CTABanner-SOi-EjNb-1gNhmGHe.js +4 -0
  34. package/storybook-static/assets/{CTABanner.stories-CboCyNul.js → CTABanner.stories-B5jWAOv9.js} +1 -1
  35. package/storybook-static/assets/Callout.stories-DYh3dp1V.js +16 -0
  36. package/storybook-static/assets/CodeSample.stories-DdqAV6pE.js +22 -0
  37. package/storybook-static/assets/{CodeSample.stories-npLtCIKw.js → CodeSample.stories-R6WeHzql.js} +1 -1
  38. package/storybook-static/assets/Color-YHDXOIA2-BLLMp-rk.js +1 -0
  39. package/storybook-static/assets/DocsRenderer-CFRXHY34-iREIpqZs.js +575 -0
  40. package/storybook-static/assets/{GuideCard.stories-D_PCT7Jx.js → GuideCard.stories-DlOupG-0.js} +2 -2
  41. package/storybook-static/assets/Heading.stories-CTPUxGQU.js +40 -0
  42. package/storybook-static/assets/Icons-CaV53C2x.js +1 -0
  43. package/storybook-static/assets/Nav.stories-DOdsEXEe.js +13 -0
  44. package/storybook-static/assets/NavLinks.stories-ChboVW3X.js +19 -0
  45. package/storybook-static/assets/Pre.stories-BiOV0Oe6.js +11 -0
  46. package/storybook-static/assets/Sidebar.stories-DkscgzB6.js +9 -0
  47. package/storybook-static/assets/Steps.stories-DdgI2muz.js +16 -0
  48. package/storybook-static/assets/SubNav.stories-gbx99ZSe.js +19 -0
  49. package/storybook-static/assets/Table.stories-_JY94lJp.js +38 -0
  50. package/storybook-static/assets/Tabs.stories-C91xYkjj.js +42 -0
  51. package/storybook-static/assets/TocCard.stories-3Hrq8ntN.js +7 -0
  52. package/storybook-static/assets/UnderlineNav.stories-D44nShoc.js +96 -0
  53. package/storybook-static/assets/Update-DvGnbDKn-BxY7KlqE.js +33 -0
  54. package/storybook-static/assets/Update.stories-DXMAnZ21.js +56 -0
  55. package/storybook-static/assets/VideoGuide.stories-w76_6bQA.js +3 -0
  56. package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
  57. package/storybook-static/assets/_rollupPluginBabelHelpers-DK3gn7J7-CY8sTQTJ.js +4 -0
  58. package/storybook-static/assets/{browser.esm-CjKZlQaR.js → browser.esm-BBxEv_2n.js} +1 -1
  59. package/storybook-static/assets/chunk-NL6KNZEE-BC1iDMSp.js +3 -0
  60. package/storybook-static/assets/content-Cgm3P2iF.js +8 -0
  61. package/storybook-static/assets/entry-preview-XrF1hMc_.js +2 -0
  62. package/storybook-static/assets/{entry-preview-docs-B1zb5AAd.js → entry-preview-docs-CxQPtM_Y.js} +1 -1
  63. package/storybook-static/assets/iframe-B8sZbN7f.js +211 -0
  64. package/storybook-static/assets/{index-Ci6h_Amb.js → index-Bd6o6BX5.js} +2 -2
  65. package/storybook-static/assets/index-BsiG4v0x.js +3 -0
  66. package/storybook-static/assets/index-CXQShRbs.js +8 -0
  67. package/storybook-static/assets/index-CXwkSlW-.js +1 -0
  68. package/storybook-static/assets/index-CzKwSnp0.js +9 -0
  69. package/storybook-static/assets/index-D_kTjGoR.js +9 -0
  70. package/storybook-static/assets/index-DgnBCu_c.js +1 -0
  71. package/storybook-static/assets/{index-BxVt_j7t.js → index-H0MBf5rE.js} +1 -1
  72. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
  73. package/storybook-static/assets/layouts-Bfh4ZDPm.js +1 -0
  74. package/storybook-static/assets/preview-CoBvlzsX.css +1 -0
  75. package/storybook-static/assets/preview-CxgX81oj.js +2 -0
  76. package/storybook-static/assets/{preview-ik5anPOD.js → preview-N1j9pG9L.js} +1 -1
  77. package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
  78. package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
  79. package/storybook-static/assets/themes-designsystem.stories-Do8f936h.js +11 -0
  80. package/storybook-static/assets/themes.stories-By9PFakX.js +41 -0
  81. package/storybook-static/assets/writer-ia0ggDZA.js +1 -0
  82. package/storybook-static/iframe.html +1 -1
  83. package/storybook-static/index.html +1 -1
  84. package/storybook-static/index.json +1 -1
  85. package/storybook-static/project.json +1 -1
  86. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +15 -15
  87. package/storybook-static/sb-addons/docs-12/manager-bundle.js +34 -34
  88. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +1 -1
  89. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +8 -8
  90. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +8 -8
  91. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
  92. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
  93. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
  94. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  95. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
  96. package/storybook-static/sb-addons/links-2/manager-bundle.js +1 -1
  97. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +5 -5
  98. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
  99. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  100. package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
  101. package/storybook-static/sb-manager/runtime.js +119 -119
  102. package/tsconfig.json +33 -11
  103. package/vite.config.ts +1 -1
  104. package/storybook-static/assets/Atlas.stories-C5gRCegi.js +0 -255
  105. package/storybook-static/assets/Badge.stories-XOQv4P0k.js +0 -31
  106. package/storybook-static/assets/Breadcrumbs.stories-DBonCt0B.js +0 -21
  107. package/storybook-static/assets/CTABanner-Dxjlb-Oo-D4ZzKv-X.js +0 -4
  108. package/storybook-static/assets/Callout.stories-1M6sBDsc.js +0 -16
  109. package/storybook-static/assets/CodeSample.stories-ygE0LGuD.js +0 -22
  110. package/storybook-static/assets/Color-YHDXOIA2-DKdobiDN.js +0 -1
  111. package/storybook-static/assets/DocsRenderer-CFRXHY34-Bal2bsPI.js +0 -575
  112. package/storybook-static/assets/Heading.stories-IvodKnYL.js +0 -40
  113. package/storybook-static/assets/Nav.stories-DpHSEq4D.js +0 -13
  114. package/storybook-static/assets/NavLinks.stories--GLnE3VD.js +0 -19
  115. package/storybook-static/assets/Pre.stories-D5iLAJJ5.js +0 -11
  116. package/storybook-static/assets/Sidebar.stories-Ck4U5ocr.js +0 -9
  117. package/storybook-static/assets/Steps.stories-DJGuK21z.js +0 -16
  118. package/storybook-static/assets/SubNav.stories-C6zqzDri.js +0 -19
  119. package/storybook-static/assets/Table.stories-zUHxRyRv.js +0 -43
  120. package/storybook-static/assets/UnderlineNav-yn8_whBd-Bbi7p2g-.js +0 -41
  121. package/storybook-static/assets/_rollupPluginBabelHelpers-Dh5BmVB--DyHbsKhl.js +0 -4
  122. package/storybook-static/assets/chevron-right-B9VhLASW.js +0 -31
  123. package/storybook-static/assets/chunk-K6AXKMTT-BnQROexa.js +0 -12
  124. package/storybook-static/assets/content-BSQS1YU1.js +0 -8
  125. package/storybook-static/assets/entry-preview-BTiD55pK.js +0 -2
  126. package/storybook-static/assets/iframe-VEPF5FFi.js +0 -211
  127. package/storybook-static/assets/index-0nua7n0t.js +0 -1
  128. package/storybook-static/assets/index-B7gF9TUu.js +0 -9
  129. package/storybook-static/assets/index-C2_NlWRN.js +0 -8
  130. package/storybook-static/assets/index-D1ZprCIH.js +0 -9
  131. package/storybook-static/assets/index-UoN3NoLW.js +0 -17
  132. package/storybook-static/assets/jsx-runtime-BjG_zV1W.js +0 -9
  133. package/storybook-static/assets/layouts-DvpaRV78.js +0 -32
  134. package/storybook-static/assets/preview-BK56XEt8.js +0 -2
  135. package/storybook-static/assets/preview-EtXI0_34.css +0 -1
  136. package/storybook-static/assets/react-18-BsB9_d4u.js +0 -25
  137. package/storybook-static/assets/test-utils-CHVDXiZU.js +0 -9
  138. package/storybook-static/assets/themes-designsystem.stories-D43FSrQO.js +0 -11
  139. package/storybook-static/assets/themes.stories-CNT0emaP.js +0 -41
  140. package/storybook-static/assets/writer-BNuXwA0f.js +0 -4
  141. package/tsconfig.app.json +0 -24
  142. package/tsconfig.node.json +0 -13
  143. /package/src/{content → __fixtures__}/Icons.tsx +0 -0
  144. /package/src/{content → __fixtures__}/code-sample.mdx +0 -0
  145. /package/storybook-static/assets/{preview-BOIWi3FM.js → preview-BNQ06L9w.js} +0 -0
@@ -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>
@@ -0,0 +1,131 @@
1
+ # Function `gqlSchemaToReferences`
2
+
3
+ :::code-group
4
+ ```ts
5
+ function gqlSchemaToReferences(
6
+ schemaLocation: string
7
+ ): Promise<Reference[]>
8
+ ```
9
+ :::
10
+
11
+ Converts a GraphQL schema file to a list of uniform references.
12
+
13
+ :::Details{kind="tertiary" title="<>Source code in <code>src/hello.ts</code></>" icon="<IconQuote/>"}
14
+ ```ts {from="index.ts"}
15
+ export async function gqlSchemaToReferences(
16
+ schemaLocation: string
17
+ ): Promise<Reference[]> {
18
+ const loadersList = {
19
+ ["GraphQLFileLoader"]: "@graphql-tools/graphql-file-loader",
20
+ }
21
+ const loaders = await getDocumentLoaders(loadersList);
22
+
23
+ // @ts-ignore TODO: but ts works in @graphql-markdown/core
24
+ const schema = await loadSchema(schemaLocation as string, loaders);
25
+
26
+ const references: Reference[] = []
27
+
28
+ const queries = schema.getRootType(OperationTypeNode.QUERY)
29
+ const queryFields = queries?.getFields?.()
30
+
31
+ if (queryFields) {
32
+ references.push(...gqlOperationsToUniformRef(
33
+ ReferenceType.GRAPHQL_QUERY,
34
+ queryFields
35
+ ))
36
+ }
37
+
38
+ const mutations = schema.getRootType(OperationTypeNode.MUTATION)
39
+ const mutationFields = mutations?.getFields?.()
40
+
41
+ if (mutationFields) {
42
+ references.push(...gqlOperationsToUniformRef(
43
+ ReferenceType.GRAPHQL_MUTATION,
44
+ mutationFields
45
+ ))
46
+ }
47
+
48
+ const typeMap = schema.getTypeMap();
49
+
50
+ for (const gqlType of Object.values(typeMap)) {
51
+ const builtInType = isSpecifiedScalarType(gqlType) ||
52
+ isIntrospectionType(gqlType) ||
53
+ gqlType.name === "Mutation"
54
+
55
+ if (builtInType) {
56
+ continue;
57
+ }
58
+
59
+ switch (gqlType.constructor.name) {
60
+ case 'GraphQLObjectType': {
61
+ const type = gqlType as GraphQLObjectType;
62
+
63
+ references.push(gqlObjectToUniformRef(type))
64
+
65
+ break
66
+ }
67
+
68
+ case 'GraphQLInputObjectType': {
69
+ const type = gqlType as GraphQLInputObjectType;
70
+
71
+ references.push(gqlInputToUniformRef(type))
72
+ break
73
+ }
74
+
75
+ case 'GraphQLEnumType': {
76
+ const type = gqlType as GraphQLEnumType;
77
+
78
+ references.push(gqlEnumToUniformRef(type))
79
+
80
+ break
81
+ }
82
+
83
+ case 'GraphQLScalarType': {
84
+ const type = gqlType as GraphQLScalarType
85
+
86
+ references.push(gqlScalarToUniformRef(type))
87
+
88
+ break
89
+ }
90
+
91
+ default: {
92
+ console.debug(`Unsupported type: ${gqlType.constructor.name}`)
93
+ }
94
+ }
95
+ }
96
+
97
+ return references
98
+ }
99
+ ```
100
+ :::
101
+
102
+ :::Table
103
+ ```ts
104
+ [
105
+ ["See also", ""],
106
+ ["[`@xyd-js/atlas`](#)", ""]
107
+ ]
108
+ ```
109
+ :::
110
+
111
+ ## Parameters
112
+ :::Table
113
+ ```ts
114
+ [
115
+ ["Name", "Type", "Description"],
116
+ ["`schemaLocation`", "`string`", "The location of the GraphQL schema file."]
117
+ ]
118
+ ```
119
+ :::
120
+
121
+ ## Returns
122
+ :::Table
123
+ ```ts
124
+ [
125
+ ["Type", "Description"],
126
+ ["`Promise<Resolve[]>`", "The list of uniform references."]
127
+ ]
128
+ ```
129
+ :::
130
+
131
+
@@ -0,0 +1,53 @@
1
+ # Agents
2
+
3
+ ## ToolsToFinalOutputFunction `module-attribute`
4
+
5
+ :::code-group
6
+ ```py
7
+ ToolsToFinalOutputFunction: TypeAlias = Callable[
8
+ [RunContextWrapper[TContext], list[FunctionToolResult]],
9
+ MaybeAwaitable[ToolsToFinalOutputResult],
10
+ ]
11
+ ```
12
+ :::
13
+
14
+ A function that takes a run context and a list of tool results, and returns a `ToolToFinalOutputResult`.
15
+
16
+ ## ToolsToFinalOutputResult `dataclass`
17
+
18
+ :::code-group
19
+ ```py
20
+ ToolsToFinalOutputResult: TypeAlias = Union[
21
+ FinalOutput,
22
+ Tuple[FinalOutput, list[FunctionToolResult]],
23
+ ]
24
+ ```
25
+ :::
26
+
27
+ ### is_final_output `instance-attribute`
28
+
29
+
30
+ <Details
31
+ kind="tertiary"
32
+ title={<>
33
+ Source code in
34
+ <code>src/agents/agent.py</code>
35
+ </>
36
+ }
37
+ icon={<IconQuote/>}
38
+ >
39
+ ```py
40
+ @dataclass
41
+ class ToolsToFinalOutputResult:
42
+ is_final_output: bool
43
+ """Whether this is the final output. If False, the LLM will run again and receive the tool call
44
+ output.
45
+ """
46
+
47
+ final_output: Any | None = None
48
+ """The final output. Can be None if `is_final_output` is False, otherwise must match the
49
+ `output_type` of the agent.
50
+ """
51
+ ```
52
+ </Details>
53
+
@@ -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.
@@ -0,0 +1,237 @@
1
+ import React, {useState} from "react";
2
+
3
+ import {
4
+ Breadcrumbs,
5
+ NavLinks
6
+ } from "@xyd-js/components/writer"
7
+ import {
8
+ Nav,
9
+ Toc,
10
+ SubNav,
11
+ UISidebar
12
+ } from "@xyd-js/ui"
13
+
14
+ import {LiveSessionPlatformLogo} from "./logo"
15
+
16
+ export function DemoNavbar() {
17
+ return <>
18
+ <Nav
19
+ value="api-reference"
20
+ logo={<LiveSessionPlatformLogo/>}
21
+ kind="middle"
22
+ >
23
+ <Nav.Item value="docs" href="/docs">
24
+ Docs
25
+ </Nav.Item>
26
+ <Nav.Item value="api-reference" href="/api">
27
+ API Reference
28
+ </Nav.Item>
29
+ <Nav.Item value="graphql" href="/graphql">
30
+ GraphQL
31
+ </Nav.Item>
32
+ </Nav>
33
+ </>
34
+ }
35
+
36
+ export function DemoSubNav() {
37
+ return <SubNav title="APPS" value="build">
38
+ <SubNav.Item value="build" href="/build">
39
+ Build
40
+ </SubNav.Item>
41
+ <SubNav.Item value="design" href="/design">
42
+ Design
43
+ </SubNav.Item>
44
+ <SubNav.Item value="launch" href="/launch">
45
+ Launch
46
+ </SubNav.Item>
47
+ </SubNav>
48
+ }
49
+
50
+ export function DemoSidebar() {
51
+ const [isOpen, setIsOpen] = useState(false)
52
+
53
+ function onClick() {
54
+ setIsOpen(!isOpen)
55
+ }
56
+
57
+ const items = new Array(40).fill(0).map((_, i) => <UISidebar.Item key={i} href="#">
58
+ {`Item ${i}`}
59
+ </UISidebar.Item>
60
+ )
61
+
62
+ return <UISidebar footerItems={<DemoSidebarFooter/>}>
63
+ <UISidebar.ItemHeader>
64
+ GET STARTED
65
+ </UISidebar.ItemHeader>
66
+ <UISidebar.Item
67
+ button
68
+ active={isOpen}
69
+ activeTheme="secondary"
70
+ onClick={onClick}
71
+ >
72
+ Root nested
73
+ <UISidebar.SubTree isOpen={isOpen}>
74
+ <UISidebar.Item href="#">
75
+ Nested A
76
+ </UISidebar.Item>
77
+ <UISidebar.Item href="#">
78
+ Nested B
79
+ </UISidebar.Item>
80
+ <UISidebar.Item button active>
81
+ Nested root C
82
+ <UISidebar.SubTree>
83
+ <UISidebar.Item href="#">
84
+ Nested C.A
85
+ </UISidebar.Item>
86
+ <UISidebar.Item href="#">
87
+ Nested C.B
88
+ </UISidebar.Item>
89
+ </UISidebar.SubTree>
90
+ </UISidebar.Item>
91
+ </UISidebar.SubTree>
92
+ </UISidebar.Item>
93
+
94
+ <UISidebar.ItemHeader>
95
+ APIS
96
+ </UISidebar.ItemHeader>
97
+ <UISidebar.Item href="#">
98
+ Authentication
99
+ </UISidebar.Item>
100
+
101
+ <UISidebar.Item href="#">
102
+ Making requests
103
+ </UISidebar.Item>
104
+
105
+ {items}
106
+ </UISidebar>
107
+ }
108
+
109
+ export function DemoSidebarFooter() {
110
+ return <>
111
+ <UISidebar.FooterItem
112
+ href="#"
113
+ icon={
114
+ <svg
115
+ xmlns="http://www.w3.org/2000/svg"
116
+ viewBox="0 0 24 24"
117
+ >
118
+ <path
119
+ fillRule="evenodd"
120
+ d="M14.447 7.106a1 1 0 0 1 .447 1.341l-4 8a1 1 0 1 1-1.788-.894l4-8a1 1 0 0 1 1.341-.447ZM6.6 7.2a1 1 0 0 1 .2 1.4L4.25 12l2.55 3.4a1 1 0 0 1-1.6 1.2l-3-4a1 1 0 0 1 0-1.2l3-4a1 1 0 0 1 1.4-.2Zm10.8 0a1 1 0 0 1 1.4.2l3 4a1 1 0 0 1 0 1.2l-3 4a1 1 0 0 1-1.6-1.2l2.55-3.4-2.55-3.4a1 1 0 0 1 .2-1.4Z"
121
+ clipRule="evenodd"
122
+ />
123
+ </svg>
124
+ }
125
+ >
126
+ Cookbook
127
+ </UISidebar.FooterItem>
128
+ <UISidebar.FooterItem
129
+ href="#"
130
+ icon={
131
+ <svg
132
+ xmlns="http://www.w3.org/2000/svg"
133
+ fill="currentColor"
134
+ viewBox="0 0 24 24"
135
+ >
136
+ <path
137
+ fillRule="evenodd"
138
+ d="M10.5 8.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM12 5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7ZM3 9.5a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm1-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm16 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-3 1a3 3 0 1 1 6 0 3 3 0 0 1-6 0ZM8 18c0-.974.438-1.684 1.142-2.185C9.876 15.293 10.911 15 12 15c1.09 0 2.124.293 2.858.815.704.5 1.142 1.21 1.142 2.185a1 1 0 1 0 2 0c0-1.692-.812-2.982-1.983-3.815C14.876 13.373 13.411 13 12 13c-1.41 0-2.876.373-4.017 1.185C6.812 15.018 6 16.308 6 18a1 1 0 1 0 2 0Zm-3.016-3.675a1 1 0 0 1-.809 1.16C2.79 15.732 2 16.486 2 17.5a1 1 0 1 1-2 0c0-2.41 1.978-3.655 3.825-3.985a1 1 0 0 1 1.16.81Zm14.84 1.16a1 1 0 1 1 .351-1.97C22.022 13.845 24 15.09 24 17.5a1 1 0 1 1-2 0c0-1.014-.79-1.768-2.175-2.015Z"
139
+ clipRule="evenodd"
140
+ />
141
+ </svg>
142
+ }
143
+ >
144
+ Community
145
+ </UISidebar.FooterItem>
146
+ <UISidebar.FooterItem
147
+ href="#"
148
+ icon={
149
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
150
+ fill="none">
151
+ <path fill-rule="evenodd" clip-rule="evenodd"
152
+ d="M3.78163 3.28449C3.8768 2.96725 4.16879 2.75 4.5 2.75H19.5C19.8312 2.75 20.1232 2.96725 20.2184 3.28449L21.7184 8.28449C21.7393 8.3544 21.75 8.42701 21.75 8.5C21.75 10.5711 20.0711 12.25 18 12.25C16.7733 12.25 15.6842 11.661 15 10.7504C14.3158 11.661 13.2267 12.25 12 12.25C10.7733 12.25 9.68417 11.661 9 10.7504C8.31583 11.661 7.2267 12.25 6 12.25C3.92893 12.25 2.25 10.5711 2.25 8.5C2.25 8.42701 2.26066 8.3544 2.28163 8.28449L3.78163 3.28449ZM9.75 8.5C9.75 9.74264 10.7574 10.75 12 10.75C13.2426 10.75 14.25 9.74264 14.25 8.5C14.25 8.08579 14.5858 7.75 15 7.75C15.4142 7.75 15.75 8.08579 15.75 8.5C15.75 9.74264 16.7574 10.75 18 10.75C19.2083 10.75 20.1942 9.79754 20.2477 8.60244L18.942 4.25H5.05802L3.75229 8.60244C3.80584 9.79753 4.79169 10.75 6 10.75C7.24264 10.75 8.25 9.74264 8.25 8.5C8.25 8.08579 8.58579 7.75 9 7.75C9.41421 7.75 9.75 8.08579 9.75 8.5Z"
153
+ />
154
+ <path fill-rule="evenodd" clip-rule="evenodd"
155
+ d="M4 10.25C4.41421 10.25 4.75 10.5858 4.75 11V19.75H6.5C6.91421 19.75 7.25 20.0858 7.25 20.5C7.25 20.9142 6.91421 21.25 6.5 21.25H4C3.58579 21.25 3.25 20.9142 3.25 20.5V11C3.25 10.5858 3.58579 10.25 4 10.25ZM20 10.25C20.4142 10.25 20.75 10.5858 20.75 11V20.5C20.75 20.9142 20.4142 21.25 20 21.25H10.5C10.0858 21.25 9.75 20.9142 9.75 20.5C9.75 20.0858 10.0858 19.75 10.5 19.75H19.25V11C19.25 10.5858 19.5858 10.25 20 10.25Z"
156
+ />
157
+ <path
158
+ d="M12.003 19C11.31 18.9996 10.6384 18.7598 10.102 18.3213C9.56564 17.8829 9.19745 17.2726 9.05983 16.594C8.92222 15.9154 9.02364 15.2101 9.34693 14.5976C9.67022 13.9852 10.1955 13.5032 10.8337 13.2333C11.5673 12.9262 12.393 12.9221 13.1296 13.2222C13.8661 13.5222 14.4536 14.1018 14.7631 14.8338C15.0727 15.5659 15.0791 16.3907 14.7808 17.1274C14.4827 17.8642 13.9042 18.4527 13.1724 18.7641C12.8025 18.9205 12.4047 19.0007 12.003 19ZM11.1458 14.7215C11.1124 14.7215 11.0803 14.7348 11.0567 14.7584C11.0331 14.782 11.0198 14.8141 11.0198 14.8475V17.1923C11.0198 17.2258 11.0331 17.2578 11.0567 17.2814C11.0803 17.305 11.1124 17.3183 11.1458 17.3183C11.1671 17.3183 11.188 17.3128 11.2065 17.3024L13.3399 16.13C13.3597 16.1192 13.3761 16.1032 13.3876 16.0838C13.3991 16.0644 13.4052 16.0423 13.4052 16.0197C13.4052 15.9972 13.3991 15.9751 13.3876 15.9557C13.3761 15.9362 13.3597 15.9203 13.3399 15.9094L11.2063 14.7373C11.1879 14.727 11.1671 14.7215 11.1458 14.7215Z"
159
+ />
160
+ </svg>
161
+ }
162
+ >
163
+ Marketplace
164
+ </UISidebar.FooterItem>
165
+ <UISidebar.FooterItem
166
+ href="#"
167
+ icon={
168
+ <svg
169
+ viewBox="0 0 15 15"
170
+ xmlns="http://www.w3.org/2000/svg"
171
+ >
172
+ <path
173
+ d="M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z"
174
+ fill="currentColor"
175
+ fillRule="evenodd"
176
+ clipRule="evenodd"
177
+ />
178
+ </svg>
179
+ }
180
+ >
181
+ SDKs
182
+ </UISidebar.FooterItem>
183
+ </>
184
+ }
185
+
186
+
187
+ export function DemoContent({children, breadcrumbs = true}: { children?: React.ReactNode, breadcrumbs?: boolean }) {
188
+ return <>
189
+ {breadcrumbs && <Breadcrumbs
190
+ items={[
191
+ {
192
+ title: "APIs",
193
+ href: "/apis"
194
+ },
195
+ {
196
+ title: "GraphQL API",
197
+ href: "/apis/graphql"
198
+ }
199
+ ]}
200
+ />}
201
+
202
+ <div style={{
203
+ display: "flex",
204
+ flexDirection: "column",
205
+ gap: "24px"
206
+ }}>
207
+ {children}
208
+ </div>
209
+
210
+ <NavLinks
211
+ prev={{
212
+ title: "Prev",
213
+ href: "/prev"
214
+ }}
215
+ next={{
216
+ title: "Next",
217
+ href: "/next"
218
+ }}
219
+ />
220
+ </>
221
+ }
222
+
223
+ export function DemoTOC() {
224
+ return <Toc defaultValue="quickstart">
225
+ <Toc.Item value="quickstart">
226
+ Quickstart
227
+ </Toc.Item>
228
+ <Toc.Item value="api-features">
229
+ API Features
230
+ </Toc.Item>
231
+ <Toc.Item value="example-use-cases">
232
+ Example Use Cases
233
+ </Toc.Item>
234
+ </Toc>
235
+ }
236
+
237
+