polen 0.10.0-next.11 → 0.10.0-next.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/build/api/builder/builder.js +1 -1
- package/build/api/builder/builder.js.map +1 -1
- package/build/api/config/load.js +1 -1
- package/build/api/config/load.js.map +1 -1
- package/build/api/vite/plugins/build.js +1 -1
- package/build/api/vite/plugins/build.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +0 -2
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/pages.js +1 -1
- package/build/api/vite/plugins/pages.js.map +1 -1
- package/build/exports/components.d.ts +4 -1
- package/build/exports/components.d.ts.map +1 -1
- package/build/exports/components.js +4 -1
- package/build/exports/components.js.map +1 -1
- package/build/lib/demos/config-schema.d.ts +6 -6
- package/build/lib/github-actions/runner.js +2 -2
- package/build/lib/github-actions/runner.js.map +1 -1
- package/build/lib/graphql-document/$$.d.ts +5 -0
- package/build/lib/graphql-document/$$.d.ts.map +1 -0
- package/build/lib/graphql-document/$$.js +5 -0
- package/build/lib/graphql-document/$$.js.map +1 -0
- package/build/lib/graphql-document/$.d.ts +2 -0
- package/build/lib/graphql-document/$.d.ts.map +1 -0
- package/build/lib/graphql-document/$.js +2 -0
- package/build/lib/graphql-document/$.js.map +1 -0
- package/build/lib/graphql-document/analysis.d.ts +44 -0
- package/build/lib/graphql-document/analysis.d.ts.map +1 -0
- package/build/lib/graphql-document/analysis.js +361 -0
- package/build/lib/graphql-document/analysis.js.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +42 -0
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocument.js +173 -0
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +7 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +45 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +1 -0
- package/build/lib/graphql-document/components/HoverTooltip.d.ts +35 -0
- package/build/lib/graphql-document/components/HoverTooltip.d.ts.map +1 -0
- package/build/lib/graphql-document/components/HoverTooltip.js +132 -0
- package/build/lib/graphql-document/components/HoverTooltip.js.map +1 -0
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +37 -0
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +1 -0
- package/build/lib/graphql-document/components/IdentifierLink.js +141 -0
- package/build/lib/graphql-document/components/IdentifierLink.js.map +1 -0
- package/build/lib/graphql-document/components/index.d.ts +5 -0
- package/build/lib/graphql-document/components/index.d.ts.map +1 -0
- package/build/lib/graphql-document/components/index.js +5 -0
- package/build/lib/graphql-document/components/index.js.map +1 -0
- package/build/lib/graphql-document/example.d.ts +25 -0
- package/build/lib/graphql-document/example.d.ts.map +1 -0
- package/build/lib/graphql-document/example.js +140 -0
- package/build/lib/graphql-document/example.js.map +1 -0
- package/build/lib/graphql-document/graphql-document.d.ts +35 -0
- package/build/lib/graphql-document/graphql-document.d.ts.map +1 -0
- package/build/lib/graphql-document/graphql-document.js +36 -0
- package/build/lib/graphql-document/graphql-document.js.map +1 -0
- package/build/lib/graphql-document/positioning-simple.d.ts +68 -0
- package/build/lib/graphql-document/positioning-simple.d.ts.map +1 -0
- package/build/lib/graphql-document/positioning-simple.js +197 -0
- package/build/lib/graphql-document/positioning-simple.js.map +1 -0
- package/build/lib/graphql-document/schema-context.d.ts +8 -0
- package/build/lib/graphql-document/schema-context.d.ts.map +1 -0
- package/build/lib/graphql-document/schema-context.js +11 -0
- package/build/lib/graphql-document/schema-context.js.map +1 -0
- package/build/lib/graphql-document/schema-integration-example.d.ts +27 -0
- package/build/lib/graphql-document/schema-integration-example.d.ts.map +1 -0
- package/build/lib/graphql-document/schema-integration-example.js +297 -0
- package/build/lib/graphql-document/schema-integration-example.js.map +1 -0
- package/build/lib/graphql-document/schema-integration.d.ts +135 -0
- package/build/lib/graphql-document/schema-integration.d.ts.map +1 -0
- package/build/lib/graphql-document/schema-integration.js +328 -0
- package/build/lib/graphql-document/schema-integration.js.map +1 -0
- package/build/lib/graphql-document/types.d.ts +117 -0
- package/build/lib/graphql-document/types.d.ts.map +1 -0
- package/build/lib/graphql-document/types.js +2 -0
- package/build/lib/graphql-document/types.js.map +1 -0
- package/build/template/components/ArgumentAnnotation.js +10 -0
- package/build/template/components/ArgumentAnnotation.js.map +1 -0
- package/build/template/components/ArgumentList.js +9 -0
- package/build/template/components/ArgumentList.js.map +1 -0
- package/build/template/components/ArgumentListAnnotation.js +15 -0
- package/build/template/components/ArgumentListAnnotation.js.map +1 -0
- package/build/template/components/Changelog.js +44 -0
- package/build/template/components/Changelog.js.map +1 -0
- package/build/template/components/{CodeBlock.jsx → CodeBlock.js} +4 -5
- package/build/template/components/{CodeBlock.jsx.map → CodeBlock.js.map} +1 -1
- package/build/template/components/{CodeBlockEnhancer.jsx → CodeBlockEnhancer.js} +4 -4
- package/build/template/components/CodeBlockEnhancer.js.map +1 -0
- package/build/template/components/DeprecationReason.js +9 -0
- package/build/template/components/DeprecationReason.js.map +1 -0
- package/build/template/components/Description.js +9 -0
- package/build/template/components/Description.js.map +1 -0
- package/build/template/components/Field.js +14 -0
- package/build/template/components/Field.js.map +1 -0
- package/build/template/components/{FieldList.jsx → FieldList.js} +4 -5
- package/build/template/components/FieldList.js.map +1 -0
- package/build/template/components/{FieldListSection.jsx → FieldListSection.js} +4 -6
- package/build/template/components/FieldListSection.js.map +1 -0
- package/build/template/components/HamburgerMenu.js +30 -0
- package/build/template/components/HamburgerMenu.js.map +1 -0
- package/build/template/components/Link.d.ts +1 -1
- package/build/template/components/{Link.jsx → Link.js} +4 -5
- package/build/template/components/Link.js.map +1 -0
- package/build/template/components/Logo.js +20 -0
- package/build/template/components/Logo.js.map +1 -0
- package/build/template/components/MDXComponents.d.ts +11 -0
- package/build/template/components/MDXComponents.d.ts.map +1 -0
- package/build/template/components/MDXComponents.js +70 -0
- package/build/template/components/MDXComponents.js.map +1 -0
- package/build/template/components/{Markdown.jsx → Markdown.js} +3 -2
- package/build/template/components/Markdown.js.map +1 -0
- package/build/template/components/MissingSchema.d.ts +1 -1
- package/build/template/components/MissingSchema.d.ts.map +1 -1
- package/build/template/components/MissingSchema.js +5 -0
- package/build/template/components/MissingSchema.js.map +1 -0
- package/build/template/components/NamedType.js +12 -0
- package/build/template/components/NamedType.js.map +1 -0
- package/build/template/components/NotFound.js +7 -0
- package/build/template/components/NotFound.js.map +1 -0
- package/build/template/components/{RadixLink.jsx → RadixLink.js} +1 -1
- package/build/template/components/RadixLink.js.map +1 -0
- package/build/template/components/TestComponent.d.ts +5 -0
- package/build/template/components/TestComponent.d.ts.map +1 -0
- package/build/template/components/TestComponent.js +7 -0
- package/build/template/components/TestComponent.js.map +1 -0
- package/build/template/components/Texts/{MinorHeading.jsx → MinorHeading.js} +4 -3
- package/build/template/components/Texts/MinorHeading.js.map +1 -0
- package/build/template/components/Texts/texts.js +1 -1
- package/build/template/components/Texts/texts.js.map +1 -1
- package/build/template/components/ThemeToggle.js +9 -0
- package/build/template/components/ThemeToggle.js.map +1 -0
- package/build/template/components/{TypeAnnotation.jsx → TypeAnnotation.js} +8 -18
- package/build/template/components/TypeAnnotation.js.map +1 -0
- package/build/template/components/TypeFieldsLinkList.js +9 -0
- package/build/template/components/TypeFieldsLinkList.js.map +1 -0
- package/build/template/components/TypeIndex.js +17 -0
- package/build/template/components/TypeIndex.js.map +1 -0
- package/build/template/components/content/$$.d.ts +1 -0
- package/build/template/components/content/$$.d.ts.map +1 -1
- package/build/template/components/content/$$.js +1 -0
- package/build/template/components/content/$$.js.map +1 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts +8 -0
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts.map +1 -0
- package/build/template/components/content/GraphQLDocumentWithSchema.js +16 -0
- package/build/template/components/content/GraphQLDocumentWithSchema.js.map +1 -0
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts +7 -0
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts.map +1 -0
- package/build/template/components/content/GraphQLDocumentWrapper.js +62 -0
- package/build/template/components/content/GraphQLDocumentWrapper.js.map +1 -0
- package/build/template/components/graphql/graphql.d.ts +2 -2
- package/build/template/components/graphql/graphql.js +3 -0
- package/build/template/components/graphql/graphql.js.map +1 -0
- package/build/template/components/graphql/index.d.ts +1 -1
- package/build/template/components/graphql/index.js +1 -1
- package/build/template/components/graphql/index.js.map +1 -1
- package/build/template/components/graphql/{type-kind-icon.jsx → type-kind-icon.js} +3 -2
- package/build/template/components/graphql/type-kind-icon.js.map +1 -0
- package/build/template/components/graphql/type-link.js +11 -0
- package/build/template/components/graphql/type-link.js.map +1 -0
- package/build/template/components/sidebar/Sidebar.d.ts +1 -1
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- package/build/template/components/sidebar/Sidebar.js +11 -0
- package/build/template/components/sidebar/Sidebar.js.map +1 -0
- package/build/template/components/sidebar/{SidebarItem.jsx → SidebarItem.js} +15 -32
- package/build/template/components/sidebar/SidebarItem.js.map +1 -0
- package/build/template/components/sidebar/ToggleButton.d.ts +1 -1
- package/build/template/components/sidebar/ToggleButton.d.ts.map +1 -1
- package/build/template/components/sidebar/ToggleButton.js +5 -0
- package/build/template/components/sidebar/ToggleButton.js.map +1 -0
- package/build/template/contexts/{ThemeContext.jsx → ThemeContext.js} +3 -4
- package/build/template/contexts/{ThemeContext.jsx.map → ThemeContext.js.map} +1 -1
- package/build/template/entry.client.d.ts +1 -0
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/{entry.client.jsx → entry.client.js} +5 -6
- package/build/template/entry.client.js.map +1 -0
- package/build/template/routes/changelog.d.ts +1 -1
- package/build/template/routes/{changelog.jsx → changelog.js} +5 -4
- package/build/template/routes/changelog.js.map +1 -0
- package/build/template/routes/{index.jsx → index.js} +3 -2
- package/build/template/routes/index.js.map +1 -0
- package/build/template/routes/reference.$type.$field.d.ts +1 -1
- package/build/template/routes/{reference.$type.$field.jsx → reference.$type.$field.js} +6 -5
- package/build/template/routes/reference.$type.$field.js.map +1 -0
- package/build/template/routes/reference.$type.d.ts +1 -1
- package/build/template/routes/{reference.$type.jsx → reference.$type.js} +6 -5
- package/build/template/routes/reference.$type.js.map +1 -0
- package/build/template/routes/reference.d.ts +2 -2
- package/build/template/routes/{reference.jsx → reference.js} +6 -7
- package/build/template/routes/reference.js.map +1 -0
- package/build/template/routes/root.d.ts +2 -2
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/{root.jsx → root.js} +46 -88
- package/build/template/routes/root.js.map +1 -0
- package/build/template/routes.js +5 -0
- package/build/template/routes.js.map +1 -0
- package/build/template/server/app.js +1 -1
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/{render-page.jsx → render-page.js} +3 -4
- package/build/template/server/render-page.js.map +1 -0
- package/build/template/server/ssg/generate.js +1 -1
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +1 -1
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/build/template/server/view.js +1 -1
- package/build/template/server/view.js.map +1 -1
- package/package.json +56 -8
- package/src/api/vite/plugins/core.ts +0 -3
- package/src/api/vite/plugins/pages.ts +1 -1
- package/src/exports/components.ts +4 -1
- package/src/lib/graphql-document/$$.ts +4 -0
- package/src/lib/graphql-document/$.test.ts +132 -0
- package/src/lib/graphql-document/$.ts +1 -0
- package/src/lib/graphql-document/README.md +102 -0
- package/src/lib/graphql-document/analysis.ts +415 -0
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +284 -0
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +188 -0
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +70 -0
- package/src/lib/graphql-document/components/HoverTooltip.tsx +282 -0
- package/src/lib/graphql-document/components/IdentifierLink.tsx +221 -0
- package/src/lib/graphql-document/components/index.ts +4 -0
- package/src/lib/graphql-document/demo.md +155 -0
- package/src/lib/graphql-document/example.ts +163 -0
- package/src/lib/graphql-document/graphql-document.ts +37 -0
- package/src/lib/graphql-document/positioning-simple.test.ts +252 -0
- package/src/lib/graphql-document/positioning-simple.ts +271 -0
- package/src/lib/graphql-document/schema-context.tsx +20 -0
- package/src/lib/graphql-document/schema-integration-example.ts +341 -0
- package/src/lib/graphql-document/schema-integration.test.ts +365 -0
- package/src/lib/graphql-document/schema-integration.ts +497 -0
- package/src/lib/graphql-document/types.ts +129 -0
- package/src/template/components/ArgumentAnnotation.tsx +1 -1
- package/src/template/components/ArgumentList.tsx +1 -1
- package/src/template/components/ArgumentListAnnotation.tsx +2 -2
- package/src/template/components/CodeBlockEnhancer.tsx +21 -21
- package/src/template/components/DeprecationReason.tsx +1 -1
- package/src/template/components/Description.tsx +1 -1
- package/src/template/components/Field.tsx +4 -4
- package/src/template/components/FieldList.tsx +1 -1
- package/src/template/components/FieldListSection.tsx +1 -1
- package/src/template/components/Link.tsx +2 -2
- package/src/template/components/MDXComponents.tsx +101 -0
- package/src/template/components/NamedType.tsx +2 -2
- package/src/template/components/TestComponent.tsx +6 -0
- package/src/template/components/TypeAnnotation.tsx +1 -1
- package/src/template/components/TypeFieldsLinkList.tsx +1 -1
- package/src/template/components/TypeIndex.tsx +1 -1
- package/src/template/components/content/$$.ts +1 -0
- package/src/template/components/content/GraphQLDocumentWithSchema.tsx +18 -0
- package/src/template/components/content/GraphQLDocumentWrapper.tsx +82 -0
- package/src/template/components/graphql/graphql.tsx +2 -2
- package/src/template/components/graphql/index.ts +1 -1
- package/src/template/components/graphql/type-link.tsx +2 -2
- package/src/template/entry.client.tsx +2 -2
- package/src/template/routes/changelog.tsx +1 -1
- package/src/template/routes/reference.$type.$field.tsx +3 -3
- package/src/template/routes/reference.$type.tsx +3 -3
- package/src/template/routes/reference.tsx +3 -3
- package/src/template/routes/root.tsx +36 -25
- package/src/template/routes.tsx +1 -1
- package/src/template/server/app.ts +1 -1
- package/src/template/server/ssg/generate.ts +1 -1
- package/src/template/server/ssg/get-route-paths.ts +1 -1
- package/src/template/server/view.ts +1 -1
- package/src/template/styles/code-block.css +32 -0
- package/build/template/components/ArgumentAnnotation.jsx +0 -16
- package/build/template/components/ArgumentAnnotation.jsx.map +0 -1
- package/build/template/components/ArgumentList.jsx +0 -16
- package/build/template/components/ArgumentList.jsx.map +0 -1
- package/build/template/components/ArgumentListAnnotation.jsx +0 -23
- package/build/template/components/ArgumentListAnnotation.jsx.map +0 -1
- package/build/template/components/Changelog.jsx +0 -68
- package/build/template/components/Changelog.jsx.map +0 -1
- package/build/template/components/CodeBlockEnhancer.jsx.map +0 -1
- package/build/template/components/DeprecationReason.jsx +0 -10
- package/build/template/components/DeprecationReason.jsx.map +0 -1
- package/build/template/components/Description.jsx +0 -10
- package/build/template/components/Description.jsx.map +0 -1
- package/build/template/components/Field.jsx +0 -22
- package/build/template/components/Field.jsx.map +0 -1
- package/build/template/components/FieldList.jsx.map +0 -1
- package/build/template/components/FieldListSection.jsx.map +0 -1
- package/build/template/components/HamburgerMenu.jsx +0 -53
- package/build/template/components/HamburgerMenu.jsx.map +0 -1
- package/build/template/components/Link.jsx.map +0 -1
- package/build/template/components/Logo.jsx +0 -29
- package/build/template/components/Logo.jsx.map +0 -1
- package/build/template/components/Markdown.jsx.map +0 -1
- package/build/template/components/MissingSchema.jsx +0 -4
- package/build/template/components/MissingSchema.jsx.map +0 -1
- package/build/template/components/NamedType.jsx +0 -17
- package/build/template/components/NamedType.jsx.map +0 -1
- package/build/template/components/NotFound.jsx +0 -26
- package/build/template/components/NotFound.jsx.map +0 -1
- package/build/template/components/RadixLink.jsx.map +0 -1
- package/build/template/components/Texts/MinorHeading.jsx.map +0 -1
- package/build/template/components/ThemeToggle.jsx +0 -10
- package/build/template/components/ThemeToggle.jsx.map +0 -1
- package/build/template/components/TypeAnnotation.jsx.map +0 -1
- package/build/template/components/TypeFieldsLinkList.jsx +0 -17
- package/build/template/components/TypeFieldsLinkList.jsx.map +0 -1
- package/build/template/components/TypeIndex.jsx +0 -27
- package/build/template/components/TypeIndex.jsx.map +0 -1
- package/build/template/components/graphql/graphql.jsx +0 -3
- package/build/template/components/graphql/graphql.jsx.map +0 -1
- package/build/template/components/graphql/type-kind-icon.jsx.map +0 -1
- package/build/template/components/graphql/type-link.jsx +0 -16
- package/build/template/components/graphql/type-link.jsx.map +0 -1
- package/build/template/components/sidebar/Sidebar.jsx +0 -15
- package/build/template/components/sidebar/Sidebar.jsx.map +0 -1
- package/build/template/components/sidebar/SidebarItem.jsx.map +0 -1
- package/build/template/components/sidebar/ToggleButton.jsx +0 -6
- package/build/template/components/sidebar/ToggleButton.jsx.map +0 -1
- package/build/template/entry.client.jsx.map +0 -1
- package/build/template/routes/changelog.jsx.map +0 -1
- package/build/template/routes/index.jsx.map +0 -1
- package/build/template/routes/reference.$type.$field.jsx.map +0 -1
- package/build/template/routes/reference.$type.jsx.map +0 -1
- package/build/template/routes/reference.jsx.map +0 -1
- package/build/template/routes/root.jsx.map +0 -1
- package/build/template/routes.jsx +0 -5
- package/build/template/routes.jsx.map +0 -1
- package/build/template/server/render-page.jsx.map +0 -1
@@ -0,0 +1,328 @@
|
|
1
|
+
/**
|
2
|
+
* Layer 2: Schema Integration
|
3
|
+
*
|
4
|
+
* Bridge between GraphQL analysis and Polen's schema system.
|
5
|
+
* Resolves identifiers against the actual schema, extracts documentation,
|
6
|
+
* and generates reference URLs for navigation.
|
7
|
+
*/
|
8
|
+
import { getNamedType, isEnumType, isInputObjectType, isInterfaceType, isListType, isNonNullType, isObjectType, isScalarType, isUnionType, } from 'graphql';
|
9
|
+
import { analyze } from "./analysis.js";
|
10
|
+
/**
|
11
|
+
* Polen's implementation of SchemaResolver
|
12
|
+
*/
|
13
|
+
export class PolenSchemaResolver {
|
14
|
+
schema;
|
15
|
+
routeConfig;
|
16
|
+
constructor(schema, routeConfig = {}) {
|
17
|
+
this.schema = schema;
|
18
|
+
this.routeConfig = routeConfig;
|
19
|
+
}
|
20
|
+
/**
|
21
|
+
* Resolve an identifier against the schema
|
22
|
+
*/
|
23
|
+
resolveIdentifier(identifier) {
|
24
|
+
const basePath = this.routeConfig.basePath || '/reference';
|
25
|
+
switch (identifier.kind) {
|
26
|
+
case 'Type':
|
27
|
+
return this.resolveType(identifier, basePath);
|
28
|
+
case 'Field':
|
29
|
+
return this.resolveField(identifier, basePath);
|
30
|
+
case 'Argument':
|
31
|
+
return this.resolveArgument(identifier, basePath);
|
32
|
+
case 'Variable':
|
33
|
+
// Variables don't have schema resolution
|
34
|
+
return {
|
35
|
+
exists: true,
|
36
|
+
referenceUrl: `${basePath}#variables`,
|
37
|
+
documentation: {
|
38
|
+
typeInfo: 'Variable',
|
39
|
+
description: `Query variable: $${identifier.name}`,
|
40
|
+
},
|
41
|
+
};
|
42
|
+
case 'Directive':
|
43
|
+
return this.resolveDirective(identifier, basePath);
|
44
|
+
case 'Fragment':
|
45
|
+
// Fragments don't have schema resolution
|
46
|
+
return {
|
47
|
+
exists: true,
|
48
|
+
referenceUrl: `${basePath}#fragments`,
|
49
|
+
documentation: {
|
50
|
+
typeInfo: 'Fragment',
|
51
|
+
description: `Fragment: ${identifier.name}`,
|
52
|
+
},
|
53
|
+
};
|
54
|
+
default:
|
55
|
+
return null;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* Get documentation for a schema path
|
60
|
+
*/
|
61
|
+
getDocumentation(schemaPath) {
|
62
|
+
if (schemaPath.length === 0)
|
63
|
+
return null;
|
64
|
+
const [typeName, fieldName, argName] = schemaPath;
|
65
|
+
if (!typeName)
|
66
|
+
return null;
|
67
|
+
const type = this.schema.getType(typeName);
|
68
|
+
if (!type)
|
69
|
+
return null;
|
70
|
+
// Type-level documentation
|
71
|
+
if (schemaPath.length === 1) {
|
72
|
+
return {
|
73
|
+
typeInfo: this.getTypeSignature(type),
|
74
|
+
description: type.description || undefined,
|
75
|
+
deprecated: 'deprecationReason' in type
|
76
|
+
? {
|
77
|
+
reason: type.deprecationReason,
|
78
|
+
}
|
79
|
+
: undefined,
|
80
|
+
};
|
81
|
+
}
|
82
|
+
// Field-level documentation
|
83
|
+
if (fieldName && schemaPath.length === 2) {
|
84
|
+
const field = this.getFieldFromType(type, fieldName);
|
85
|
+
if (!field)
|
86
|
+
return null;
|
87
|
+
return {
|
88
|
+
typeInfo: this.getTypeSignature(field.type),
|
89
|
+
description: field.description || undefined,
|
90
|
+
deprecated: field.deprecationReason
|
91
|
+
? {
|
92
|
+
reason: field.deprecationReason,
|
93
|
+
}
|
94
|
+
: undefined,
|
95
|
+
};
|
96
|
+
}
|
97
|
+
// Argument-level documentation
|
98
|
+
if (fieldName && argName && schemaPath.length === 3) {
|
99
|
+
const field = this.getFieldFromType(type, fieldName);
|
100
|
+
if (!field || !('args' in field))
|
101
|
+
return null;
|
102
|
+
const arg = field.args.find((a) => a.name === argName);
|
103
|
+
if (!arg)
|
104
|
+
return null;
|
105
|
+
return {
|
106
|
+
typeInfo: this.getTypeSignature(arg.type),
|
107
|
+
description: arg.description || undefined,
|
108
|
+
defaultValue: arg.defaultValue !== undefined
|
109
|
+
? String(arg.defaultValue)
|
110
|
+
: undefined,
|
111
|
+
};
|
112
|
+
}
|
113
|
+
return null;
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* Generate a reference URL for a schema path
|
117
|
+
*/
|
118
|
+
generateReferenceLink(schemaPath) {
|
119
|
+
const basePath = this.routeConfig.basePath || '/reference';
|
120
|
+
const includeFragments = this.routeConfig.includeFragments !== false;
|
121
|
+
if (schemaPath.length === 0)
|
122
|
+
return basePath;
|
123
|
+
const [typeName, fieldName, argName] = schemaPath;
|
124
|
+
// Type reference
|
125
|
+
if (schemaPath.length === 1) {
|
126
|
+
return `${basePath}/${typeName}`;
|
127
|
+
}
|
128
|
+
// Field reference
|
129
|
+
if (fieldName && schemaPath.length === 2) {
|
130
|
+
const fragment = includeFragments ? `#${fieldName}` : '';
|
131
|
+
return `${basePath}/${typeName}${fragment}`;
|
132
|
+
}
|
133
|
+
// Argument reference
|
134
|
+
if (fieldName && argName && schemaPath.length === 3) {
|
135
|
+
const fragment = includeFragments ? `#${fieldName}-${argName}` : '';
|
136
|
+
return `${basePath}/${typeName}${fragment}`;
|
137
|
+
}
|
138
|
+
return `${basePath}/${typeName}`;
|
139
|
+
}
|
140
|
+
/**
|
141
|
+
* Check if a type exists in the schema
|
142
|
+
*/
|
143
|
+
typeExists(typeName) {
|
144
|
+
return !!this.schema.getType(typeName);
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* Get all available types for validation
|
148
|
+
*/
|
149
|
+
getAllTypes() {
|
150
|
+
return Object.keys(this.schema.getTypeMap())
|
151
|
+
.filter(name => !name.startsWith('__')); // Filter out introspection types
|
152
|
+
}
|
153
|
+
// Private helper methods
|
154
|
+
resolveType(identifier, basePath) {
|
155
|
+
const type = this.schema.getType(identifier.name);
|
156
|
+
return {
|
157
|
+
exists: !!type,
|
158
|
+
graphqlType: type || undefined,
|
159
|
+
referenceUrl: `${basePath}/${identifier.name}`,
|
160
|
+
documentation: type
|
161
|
+
? {
|
162
|
+
typeInfo: this.getTypeSignature(type),
|
163
|
+
description: type.description || undefined,
|
164
|
+
}
|
165
|
+
: undefined,
|
166
|
+
};
|
167
|
+
}
|
168
|
+
resolveField(identifier, basePath) {
|
169
|
+
if (!identifier.parentType) {
|
170
|
+
return {
|
171
|
+
exists: false,
|
172
|
+
referenceUrl: `${basePath}#${identifier.name}`,
|
173
|
+
};
|
174
|
+
}
|
175
|
+
const parentType = this.schema.getType(identifier.parentType);
|
176
|
+
if (!parentType) {
|
177
|
+
return {
|
178
|
+
exists: false,
|
179
|
+
referenceUrl: `${basePath}/${identifier.parentType}#${identifier.name}`,
|
180
|
+
};
|
181
|
+
}
|
182
|
+
const field = this.getFieldFromType(parentType, identifier.name);
|
183
|
+
return {
|
184
|
+
exists: !!field,
|
185
|
+
referenceUrl: `${basePath}/${identifier.parentType}#${identifier.name}`,
|
186
|
+
documentation: field
|
187
|
+
? {
|
188
|
+
typeInfo: this.getTypeSignature(field.type),
|
189
|
+
description: field.description || undefined,
|
190
|
+
deprecated: field.deprecationReason
|
191
|
+
? {
|
192
|
+
reason: field.deprecationReason,
|
193
|
+
}
|
194
|
+
: undefined,
|
195
|
+
}
|
196
|
+
: undefined,
|
197
|
+
deprecated: field?.deprecationReason
|
198
|
+
? {
|
199
|
+
reason: field.deprecationReason,
|
200
|
+
}
|
201
|
+
: undefined,
|
202
|
+
};
|
203
|
+
}
|
204
|
+
resolveArgument(identifier, basePath) {
|
205
|
+
const schemaPath = identifier.schemaPath;
|
206
|
+
if (schemaPath.length < 3) {
|
207
|
+
return {
|
208
|
+
exists: false,
|
209
|
+
referenceUrl: `${basePath}#${identifier.name}`,
|
210
|
+
};
|
211
|
+
}
|
212
|
+
const [typeName, fieldName] = schemaPath;
|
213
|
+
if (!typeName || !fieldName) {
|
214
|
+
return {
|
215
|
+
exists: false,
|
216
|
+
referenceUrl: `${basePath}#${identifier.name}`,
|
217
|
+
};
|
218
|
+
}
|
219
|
+
const parentType = this.schema.getType(typeName);
|
220
|
+
if (!parentType) {
|
221
|
+
return {
|
222
|
+
exists: false,
|
223
|
+
referenceUrl: `${basePath}/${typeName}#${fieldName}-${identifier.name}`,
|
224
|
+
};
|
225
|
+
}
|
226
|
+
const field = this.getFieldFromType(parentType, fieldName);
|
227
|
+
if (!field || !('args' in field)) {
|
228
|
+
return {
|
229
|
+
exists: false,
|
230
|
+
referenceUrl: `${basePath}/${typeName}#${fieldName}-${identifier.name}`,
|
231
|
+
};
|
232
|
+
}
|
233
|
+
const arg = field.args.find((a) => a.name === identifier.name);
|
234
|
+
return {
|
235
|
+
exists: !!arg,
|
236
|
+
referenceUrl: `${basePath}/${typeName}#${fieldName}-${identifier.name}`,
|
237
|
+
documentation: arg
|
238
|
+
? {
|
239
|
+
typeInfo: this.getTypeSignature(arg.type),
|
240
|
+
description: arg.description || undefined,
|
241
|
+
defaultValue: arg.defaultValue !== undefined
|
242
|
+
? String(arg.defaultValue)
|
243
|
+
: undefined,
|
244
|
+
}
|
245
|
+
: undefined,
|
246
|
+
};
|
247
|
+
}
|
248
|
+
resolveDirective(identifier, basePath) {
|
249
|
+
const directive = this.schema.getDirective(identifier.name);
|
250
|
+
return {
|
251
|
+
exists: !!directive,
|
252
|
+
referenceUrl: `${basePath}/directives#${identifier.name}`,
|
253
|
+
documentation: directive
|
254
|
+
? {
|
255
|
+
typeInfo: 'Directive',
|
256
|
+
description: directive.description || undefined,
|
257
|
+
}
|
258
|
+
: undefined,
|
259
|
+
};
|
260
|
+
}
|
261
|
+
getFieldFromType(type, fieldName) {
|
262
|
+
if (isObjectType(type) || isInterfaceType(type)) {
|
263
|
+
return type.getFields()[fieldName] || null;
|
264
|
+
}
|
265
|
+
if (isInputObjectType(type)) {
|
266
|
+
return type.getFields()[fieldName] || null;
|
267
|
+
}
|
268
|
+
return null;
|
269
|
+
}
|
270
|
+
getTypeSignature(type) {
|
271
|
+
if (isNonNullType(type)) {
|
272
|
+
return `${this.getTypeSignature(type.ofType)}!`;
|
273
|
+
}
|
274
|
+
if (isListType(type)) {
|
275
|
+
return `[${this.getTypeSignature(type.ofType)}]`;
|
276
|
+
}
|
277
|
+
return getNamedType(type).name;
|
278
|
+
}
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* Create a schema resolver for Polen
|
282
|
+
*/
|
283
|
+
export const createPolenSchemaResolver = (schema, routeConfig) => {
|
284
|
+
return new PolenSchemaResolver(schema, routeConfig);
|
285
|
+
};
|
286
|
+
/**
|
287
|
+
* Perform schema-aware analysis of a GraphQL document
|
288
|
+
*/
|
289
|
+
export const analyzeWithSchema = (source, schema, routeConfig) => {
|
290
|
+
const analysis = analyze(source, {
|
291
|
+
schema,
|
292
|
+
validateAgainstSchema: true,
|
293
|
+
includePositions: true,
|
294
|
+
});
|
295
|
+
const resolver = createPolenSchemaResolver(schema, routeConfig);
|
296
|
+
const resolutions = new Map();
|
297
|
+
const schemaErrors = [];
|
298
|
+
// Resolve all identifiers against schema
|
299
|
+
for (const identifier of analysis.identifiers.all) {
|
300
|
+
const key = `${identifier.position.start}-${identifier.name}-${identifier.kind}`;
|
301
|
+
const resolution = resolver.resolveIdentifier(identifier);
|
302
|
+
if (resolution) {
|
303
|
+
resolutions.set(key, resolution);
|
304
|
+
// Add validation errors for non-existent identifiers
|
305
|
+
if (!resolution.exists && (identifier.kind === 'Type' || identifier.kind === 'Field')) {
|
306
|
+
schemaErrors.push({
|
307
|
+
identifier,
|
308
|
+
message: `${identifier.kind} "${identifier.name}" does not exist in schema`,
|
309
|
+
severity: 'error',
|
310
|
+
});
|
311
|
+
}
|
312
|
+
// Add deprecation warnings
|
313
|
+
if (resolution.deprecated) {
|
314
|
+
schemaErrors.push({
|
315
|
+
identifier,
|
316
|
+
message: `${identifier.kind} "${identifier.name}" is deprecated: ${resolution.deprecated.reason}`,
|
317
|
+
severity: 'warning',
|
318
|
+
});
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
return {
|
323
|
+
analysis,
|
324
|
+
resolutions,
|
325
|
+
schemaErrors,
|
326
|
+
};
|
327
|
+
};
|
328
|
+
//# sourceMappingURL=schema-integration.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema-integration.js","sourceRoot":"","sources":["../../../src/lib/graphql-document/schema-integration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EAWZ,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AA+EvC;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAEpB;IACA;IAFV,YACU,MAAqB,EACrB,cAA2B,EAAE;QAD7B,WAAM,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WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;YAEhC,qDAAqD;YACrD,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,CAAC;gBACtF,YAAY,CAAC,IAAI,CAAC;oBAChB,UAAU;oBACV,OAAO,EAAE,GAAG,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,4BAA4B;oBAC3E,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAA;YACJ,CAAC;YAED,2BAA2B;YAC3B,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;gBAC1B,YAAY,CAAC,IAAI,CAAC;oBAChB,UAAU;oBACV,OAAO,EAAE,GAAG,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,oBAAoB,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE;oBACjG,QAAQ,EAAE,SAAS;iBACpB,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ;QACR,WAAW;QACX,YAAY;KACb,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import type { DocumentNode, GraphQLError, GraphQLSchema } from 'graphql';
|
2
|
+
/**
|
3
|
+
* Represents a GraphQL identifier found in a document
|
4
|
+
*/
|
5
|
+
export interface Identifier {
|
6
|
+
/** The name of the identifier (e.g., 'User', 'name', 'id') */
|
7
|
+
name: string;
|
8
|
+
/** The kind of GraphQL construct this identifier represents */
|
9
|
+
kind: 'Type' | 'Field' | 'Argument' | 'Directive' | 'Variable' | 'Fragment';
|
10
|
+
/** Position information in the source document */
|
11
|
+
position: {
|
12
|
+
/** Character offset from start of document */
|
13
|
+
start: number;
|
14
|
+
/** Character offset for end of identifier */
|
15
|
+
end: number;
|
16
|
+
/** Line number (1-based) */
|
17
|
+
line: number;
|
18
|
+
/** Column number (1-based) */
|
19
|
+
column: number;
|
20
|
+
};
|
21
|
+
/** The parent type name if this is a field or argument */
|
22
|
+
parentType?: string;
|
23
|
+
/** Path through the schema to this identifier (e.g., ['User', 'posts', 'title']) */
|
24
|
+
schemaPath: string[];
|
25
|
+
/** Context about where this identifier appears */
|
26
|
+
context: IdentifierContext;
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* Additional context about where an identifier appears in the document
|
30
|
+
*/
|
31
|
+
export interface IdentifierContext {
|
32
|
+
/** The operation type if this identifier is within an operation */
|
33
|
+
operationType?: 'query' | 'mutation' | 'subscription';
|
34
|
+
/** The operation name if this identifier is within a named operation */
|
35
|
+
operationName?: string;
|
36
|
+
/** Whether this identifier is in a fragment definition */
|
37
|
+
inFragment?: string;
|
38
|
+
/** The selection path leading to this identifier */
|
39
|
+
selectionPath: string[];
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* Map of all identifiers found in a GraphQL document
|
43
|
+
*/
|
44
|
+
export interface IdentifierMap {
|
45
|
+
/** Quick lookup by character position */
|
46
|
+
byPosition: Map<number, Identifier>;
|
47
|
+
/** Grouped by identifier kind for easy filtering */
|
48
|
+
byKind: Map<Identifier['kind'], Identifier[]>;
|
49
|
+
/** Any validation errors found during analysis */
|
50
|
+
errors: AnalysisError[];
|
51
|
+
/** All identifiers as a flat array */
|
52
|
+
all: Identifier[];
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Analysis error with context about the identifier that caused it
|
56
|
+
*/
|
57
|
+
export interface AnalysisError {
|
58
|
+
/** The identifier that caused the error (if applicable) */
|
59
|
+
identifier?: Identifier;
|
60
|
+
/** Human-readable error message */
|
61
|
+
message: string;
|
62
|
+
/** Error severity level */
|
63
|
+
severity: 'error' | 'warning' | 'info';
|
64
|
+
/** Position in the document where the error occurred */
|
65
|
+
position?: {
|
66
|
+
line: number;
|
67
|
+
column: number;
|
68
|
+
};
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Result of analyzing a GraphQL document
|
72
|
+
*/
|
73
|
+
export interface AnalysisResult {
|
74
|
+
/** The parsed AST */
|
75
|
+
ast: DocumentNode;
|
76
|
+
/** Map of all identifiers found */
|
77
|
+
identifiers: IdentifierMap;
|
78
|
+
/** Whether the document parsed successfully */
|
79
|
+
isValid: boolean;
|
80
|
+
/** Any parse or validation errors */
|
81
|
+
errors: GraphQLError[];
|
82
|
+
}
|
83
|
+
/**
|
84
|
+
* Configuration for GraphQL document analysis
|
85
|
+
*/
|
86
|
+
export interface AnalysisConfig {
|
87
|
+
/** Whether to include position information for identifiers */
|
88
|
+
includePositions?: boolean;
|
89
|
+
/** Whether to validate against a schema (if provided) */
|
90
|
+
validateAgainstSchema?: boolean;
|
91
|
+
/** Schema to validate against */
|
92
|
+
schema?: GraphQLSchema;
|
93
|
+
/** Whether to extract fragment information */
|
94
|
+
includeFragments?: boolean;
|
95
|
+
}
|
96
|
+
/**
|
97
|
+
* Interface for the main GraphQL analyzer
|
98
|
+
*/
|
99
|
+
export interface GraphQLAnalyzer {
|
100
|
+
/**
|
101
|
+
* Parse a GraphQL document string into an AST
|
102
|
+
*/
|
103
|
+
parse(source: string): DocumentNode;
|
104
|
+
/**
|
105
|
+
* Extract all identifiers from a GraphQL AST
|
106
|
+
*/
|
107
|
+
extractIdentifiers(ast: DocumentNode, config?: AnalysisConfig): IdentifierMap;
|
108
|
+
/**
|
109
|
+
* Validate a GraphQL document against a schema
|
110
|
+
*/
|
111
|
+
validateAgainstSchema(ast: DocumentNode, schema: GraphQLSchema): GraphQLError[];
|
112
|
+
/**
|
113
|
+
* Perform complete analysis of a GraphQL document
|
114
|
+
*/
|
115
|
+
analyze(source: string, config?: AnalysisConfig): AnalysisResult;
|
116
|
+
}
|
117
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-document/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,Y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"","sources":["../../../src/lib/graphql-document/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Box, Flex, Text } from '@radix-ui/themes';
|
3
|
+
import { TypeAnnotation } from './TypeAnnotation.js';
|
4
|
+
/**
|
5
|
+
* Renders a single GraphQL argument in SDL syntax
|
6
|
+
*/
|
7
|
+
export const ArgumentAnnotation = ({ data }) => {
|
8
|
+
return (_jsx(Box, { as: 'div', children: _jsxs(Flex, { children: [_jsx(Text, { children: data.name }), _jsx(Text, { children: ":\u00A0" }), _jsx(TypeAnnotation, { type: data.type })] }) }));
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=ArgumentAnnotation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ArgumentAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/ArgumentAnnotation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMpD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,KAAC,GAAG,IAAC,EAAE,EAAC,KAAK,YACX,MAAC,IAAI,eACH,KAAC,IAAI,cAAE,IAAI,CAAC,IAAI,GAAQ,EACxB,KAAC,IAAI,0BAAe,EAEpB,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,IAC9B,GACH,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
3
|
+
import { TypeAnnotation } from "./TypeAnnotation.js";
|
4
|
+
export const ArgumentsList = ({ args }) => {
|
5
|
+
if (args.length === 0)
|
6
|
+
return null;
|
7
|
+
return (_jsxs(Flex, { direction: 'column', children: [_jsx(Heading, { size: '1', weight: 'bold', children: "Arguments" }), args.map(arg => (_jsxs(Box, { children: [_jsx(Text, { children: arg.name }), _jsx(Text, { children: ":" }), _jsx(TypeAnnotation, { type: arg.type }), arg.description && _jsx(Text, { as: 'p', size: '2', color: 'gray', children: arg.description })] }, arg.name)))] }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=ArgumentList.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ArgumentList.js","sourceRoot":"","sources":["../../../src/template/components/ArgumentList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;AAMrD,MAAM,CAAC,MAAM,aAAa,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACnD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,aACtB,KAAC,OAAO,IAAC,IAAI,EAAC,GAAG,EAAC,MAAM,EAAC,MAAM,0BAAoB,EAClD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACf,MAAC,GAAG,eACF,KAAC,IAAI,cAAE,GAAG,CAAC,IAAI,GAAQ,EACvB,KAAC,IAAI,oBAAS,EACd,KAAC,cAAc,IAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI,EACjC,GAAG,CAAC,WAAW,IAAI,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,KAAK,EAAC,MAAM,YAAE,GAAG,CAAC,WAAW,GAAQ,KAJvE,GAAG,CAAC,IAAI,CAKZ,CACP,CAAC,IACG,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
import { GrafaidOld } from '#lib/grafaid-old/index';
|
3
|
+
import { Box, Text } from '@radix-ui/themes';
|
4
|
+
import { ArgumentAnnotation } from "./ArgumentAnnotation.js";
|
5
|
+
import { FieldList } from "./FieldList.js";
|
6
|
+
export const ArgumentListAnnotation = ({ field }) => {
|
7
|
+
if (field.args.length === 0)
|
8
|
+
return null;
|
9
|
+
const inputObject = GrafaidOld.getIAP(field);
|
10
|
+
const inputObjectFields = inputObject
|
11
|
+
? (_jsx(Box, { pl: '3', style: { borderLeft: `1px solid var(--gray-6)` }, children: _jsx(FieldList, { data: inputObject }) }))
|
12
|
+
: null;
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx(Text, { children: "(" }), _jsxs(Box, { ml: '2', children: [field.args.map(arg => _jsx(ArgumentAnnotation, { data: arg }, arg.name)), inputObjectFields] }), _jsx(Text, { children: ")" })] }));
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=ArgumentListAnnotation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ArgumentListAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/ArgumentListAnnotation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAA0B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAA;AAM3C,MAAM,CAAC,MAAM,sBAAsB,GAAc,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7D,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAExC,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC5C,MAAM,iBAAiB,GAAG,WAAW;QACnC,CAAC,CAAC,CACA,KAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,yBAAyB,EAAE,YAC1D,KAAC,SAAS,IAAC,IAAI,EAAE,WAAW,GAAI,GAC5B,CACP;QACD,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,8BACE,KAAC,IAAI,oBAAS,EACd,MAAC,GAAG,IAAC,EAAE,EAAC,GAAG,aACR,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,KAAC,kBAAkB,IAAgB,IAAI,EAAE,GAAG,IAAnB,GAAG,CAAC,IAAI,CAAe,CAAC,EACvE,iBAAiB,IACd,EACN,KAAC,IAAI,oBAAS,IACb,CACJ,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Grafaid } from '#lib/grafaid/index';
|
3
|
+
import { Box, Code } from '@radix-ui/themes';
|
4
|
+
import { Graphql } from "./graphql/index.js";
|
5
|
+
export const renderDate = (date) => {
|
6
|
+
return date.toLocaleString(`default`, {
|
7
|
+
month: `long`,
|
8
|
+
year: `numeric`,
|
9
|
+
day: `numeric`,
|
10
|
+
timeZone: `utc`,
|
11
|
+
});
|
12
|
+
};
|
13
|
+
export const Changelog = ({ schema }) => {
|
14
|
+
return (_jsx(Box, { children: schema.versions.map(changeset => _jsx(Changeset, { changeset: changeset }, changeset.date.getDate())) }));
|
15
|
+
};
|
16
|
+
const Changeset = ({ changeset }) => {
|
17
|
+
return (_jsxs(Box, { children: [_jsx("h1", { title: changeset.date.toISOString(), children: renderDate(changeset.date) }), _jsx("ul", { children: changeset.changes.map(change => _jsx(Change, { change: change, schema: changeset.after }, change.message)) })] }));
|
18
|
+
};
|
19
|
+
const Change = ({ change, schema }) => {
|
20
|
+
const getTypeOrThrow = (name) => {
|
21
|
+
const type = schema.getType(name);
|
22
|
+
if (!type)
|
23
|
+
throw new Error(`Type ${name} not found`);
|
24
|
+
return type;
|
25
|
+
};
|
26
|
+
switch (change.type) {
|
27
|
+
case `TYPE_ADDED`: {
|
28
|
+
const type = getTypeOrThrow(change.meta.addedTypeName);
|
29
|
+
return (_jsxs("li", { children: ["Added type ", _jsx(Graphql.TypeLink, { type: type })] }));
|
30
|
+
}
|
31
|
+
case `FIELD_ADDED`: {
|
32
|
+
const rootTypeMap = Grafaid.Schema.getRootTypeMap(schema);
|
33
|
+
const rootDetails = rootTypeMap.list.find(_ => _.name.canonical === change.meta.typeName);
|
34
|
+
const type = getTypeOrThrow(change.meta.typeName);
|
35
|
+
if (rootDetails) {
|
36
|
+
return (_jsxs("li", { children: ["Added ", rootDetails.operationType, ` `, _jsx(Code, { color: 'jade', variant: 'ghost', style: { borderBottom: `1px dotted var(--jade-6)`, borderRadius: `0` }, children: change.meta.addedFieldName })] }));
|
37
|
+
}
|
38
|
+
return (_jsxs("li", { children: ["Added field", ` `, _jsx(Code, { color: 'gray', variant: 'ghost', style: { borderBottom: `1px dotted var(--gray-6)`, borderRadius: `0` }, children: change.meta.addedFieldName }), ` `, "to type", ` `, _jsx(Graphql.TypeLink, { type: type }), "."] }));
|
39
|
+
}
|
40
|
+
default:
|
41
|
+
return _jsxs("li", { children: ["TODO: ", change.type] });
|
42
|
+
}
|
43
|
+
};
|
44
|
+
//# sourceMappingURL=Changelog.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Changelog.js","sourceRoot":"","sources":["../../../src/template/components/Changelog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,OAAO,EAA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IAAI,EAAE,IAAI,GAAI,SAC7B,CACN,CAAA;QACH,CAAC;QACD;YACE,OAAO,mCAAW,MAAM,CAAC,IAAI,IAAM,CAAA;IACvC,CAAC;AACH,CAAC,CAAA"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { highlightCode } from '#lib/shiki/index';
|
2
3
|
import React, { useEffect, useState } from 'react';
|
3
4
|
export const CodeBlock = ({ children, language = `text`, className = ``, showLineNumbers = false, highlightLines = [], diffLines, focusLines = [], showInvisibles = false, }) => {
|
@@ -33,10 +34,8 @@ export const CodeBlock = ({ children, language = `text`, className = ``, showLin
|
|
33
34
|
renderCode();
|
34
35
|
}, [children, language, showLineNumbers, highlightLines, diffLines, focusLines, showInvisibles]);
|
35
36
|
if (isLoading) {
|
36
|
-
return (
|
37
|
-
<code>{children}</code>
|
38
|
-
</pre>);
|
37
|
+
return (_jsx("pre", { className: className, children: _jsx("code", { children: children }) }));
|
39
38
|
}
|
40
|
-
return (
|
39
|
+
return (_jsx("div", { className: `code-block ${className}`, dangerouslySetInnerHTML: { __html: html } }));
|
41
40
|
};
|
42
|
-
//# sourceMappingURL=CodeBlock.
|
41
|
+
//# sourceMappingURL=CodeBlock.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CodeBlock.
|
1
|
+
{"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../src/template/components/CodeBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAalD,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,QAAQ,EACR,QAAQ,GAAG,MAAM,EACjB,SAAS,GAAG,EAAE,EACd,eAAe,GAAG,KAAK,EACvB,cAAc,GAAG,EAAE,EACnB,SAAS,EACT,UAAU,GAAG,EAAE,E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ACH,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useEffect } from 'react';
|
2
2
|
import { useLocation } from 'react-router';
|
3
|
-
import { useTheme } from "../contexts/ThemeContext.
|
3
|
+
import { useTheme } from "../contexts/ThemeContext.js";
|
4
4
|
export const CodeBlockEnhancer = () => {
|
5
5
|
const { appearance } = useTheme();
|
6
6
|
const location = useLocation();
|
@@ -164,12 +164,12 @@ export const CodeBlockEnhancer = () => {
|
|
164
164
|
const firstLine = block.querySelector('span.line');
|
165
165
|
if (firstLine && firstLine.style.display === 'none') {
|
166
166
|
firstLine.style.display = '';
|
167
|
-
}
|
168
|
-
|
167
|
+
} // Reset margin
|
168
|
+
;
|
169
169
|
block.style.marginTop = '';
|
170
170
|
});
|
171
171
|
};
|
172
172
|
}, [location.pathname]); // Re-run when route changes
|
173
173
|
return null;
|
174
174
|
};
|
175
|
-
//# sourceMappingURL=CodeBlockEnhancer.
|
175
|
+
//# sourceMappingURL=CodeBlockEnhancer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CodeBlockEnhancer.js","sourceRoot":"","sources":["../../../src/template/components/CodeBlockEnhancer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA8B,CAAA;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAA;IACjC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,SAAS,CAAC,GAAG,EAAE;QACb,yCAAyC;QACzC,MAAM,OAAO,GAAG,4BAA4B,CAAA;QAC5C,IAAI,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAqB,CAAA;QAEvE,IAAI,CAAC,YAA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