polen 0.10.0-next.11 → 0.10.0-next.13
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/CopyButton.d.ts +19 -0
- package/build/lib/graphql-document/components/CopyButton.d.ts.map +1 -0
- package/build/lib/graphql-document/components/CopyButton.js +43 -0
- package/build/lib/graphql-document/components/CopyButton.js.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +38 -0
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocument.js +130 -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/GraphQLIdentifierPopover.d.ts +33 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +48 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +1 -0
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +39 -0
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +1 -0
- package/build/lib/graphql-document/components/IdentifierLink.js +75 -0
- package/build/lib/graphql-document/components/IdentifierLink.js.map +1 -0
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts +5 -0
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +1 -0
- package/build/lib/graphql-document/components/graphql-document-styles.js +167 -0
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +1 -0
- package/build/lib/graphql-document/components/index.d.ts +6 -0
- package/build/lib/graphql-document/components/index.d.ts.map +1 -0
- package/build/lib/graphql-document/components/index.js +6 -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/hooks/use-tooltip-state.d.ts +43 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +1 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.js +132 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.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 +57 -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/CopyButton.tsx +76 -0
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +250 -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/GraphQLIdentifierPopover.tsx +197 -0
- package/src/lib/graphql-document/components/IdentifierLink.tsx +160 -0
- package/src/lib/graphql-document/components/graphql-document-styles.ts +167 -0
- package/src/lib/graphql-document/components/index.ts +5 -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/hooks/use-tooltip-state.test.ts +76 -0
- package/src/lib/graphql-document/hooks/use-tooltip-state.ts +191 -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,45 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { useEffect, useState } from 'react';
|
3
|
+
import { useGraphQLSchema } from "../schema-context.js";
|
4
|
+
import { GraphQLDocument } from "./GraphQLDocument.js";
|
5
|
+
// Cache for highlighter
|
6
|
+
let highlighterCache = null;
|
7
|
+
/**
|
8
|
+
* GraphQL Document component that uses the schema context and handles syntax highlighting
|
9
|
+
*/
|
10
|
+
export const GraphQLDocumentWithSchema = (props) => {
|
11
|
+
const schema = useGraphQLSchema();
|
12
|
+
const [mounted, setMounted] = useState(false);
|
13
|
+
const [highlightedHtml, setHighlightedHtml] = useState(null);
|
14
|
+
useEffect(() => {
|
15
|
+
setMounted(true);
|
16
|
+
const loadHighlighter = async () => {
|
17
|
+
try {
|
18
|
+
// Load highlighter if not cached
|
19
|
+
if (!highlighterCache) {
|
20
|
+
const { highlightCode } = await import('#lib/shiki/index');
|
21
|
+
highlighterCache = highlightCode;
|
22
|
+
}
|
23
|
+
// Generate highlighted HTML
|
24
|
+
const highlighted = await highlighterCache({
|
25
|
+
code: props['children'],
|
26
|
+
lang: 'graphql',
|
27
|
+
theme: 'light',
|
28
|
+
});
|
29
|
+
setHighlightedHtml(highlighted);
|
30
|
+
}
|
31
|
+
catch (error) {
|
32
|
+
console.error('Failed to load GraphQL document highlighter:', error);
|
33
|
+
}
|
34
|
+
};
|
35
|
+
loadHighlighter();
|
36
|
+
}, [props['children']]);
|
37
|
+
// Always render the same structure to avoid hydration issues
|
38
|
+
const isInteractive = mounted && schema && highlightedHtml;
|
39
|
+
if (!isInteractive) {
|
40
|
+
// Static fallback that looks like Shiki output
|
41
|
+
return (_jsx("div", { className: 'graphql-document graphql-document-static', "data-testid": 'graphql-document', children: _jsx("pre", { className: 'shiki shiki-themes github-light tokyo-night', style: { backgroundColor: 'var(--shiki-light-bg)', color: 'var(--shiki-light)' }, children: _jsx("code", { className: "language-graphql", children: props['children'] }) }) }));
|
42
|
+
}
|
43
|
+
return (_jsx(GraphQLDocument, { ...props, schema: schema, highlightedHtml: highlightedHtml }));
|
44
|
+
};
|
45
|
+
//# sourceMappingURL=GraphQLDocumentWithSchema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLDocumentWithSchema.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAuB,CAAA;AACxD,OAAO,EAAE,eAAe,EAA6B,MAAM,sBAAuB,CAAA;AAElF,wBAAwB;AACxB,IAAI,gBAAgB,GAAQ,IAAI,CAAA;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAuE,CAC3G,KAAK,EACL,EAAE;IACF,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAA;IACjC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAA;IAE3E,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE;YACjC,IAAI,CAAC;gBACH,iCAAiC;gBACjC,IAAI,CAAC,gBAAgB,EAAE,CAAC;oBACtB,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;oBAC1D,gBAAgB,GAAG,aAAa,CAAA;gBAClC,CAAC;gBAED,4BAA4B;gBAC5B,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC;oBACzC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC;oBACvB,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,OAAO;iBACf,CAAC,CAAA;gBAEF,kBAAkB,CAAC,WAAW,CAAC,CAAA;YACjC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,8CAA8C,EAAE,KAAK,CAAC,CAAA;YACtE,CAAC;QACH,CAAC,CAAA;QAED,eAAe,EAAE,CAAA;IACnB,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAEvB,6DAA6D;IAC7D,MAAM,aAAa,GAAG,OAAO,IAAI,MAAM,IAAI,eAAe,CAAA;IAE1D,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,+CAA+C;QAC/C,OAAO,CACL,cAAK,SAAS,EAAC,0CAA0C,iBAAa,kBAAkB,YACtF,cACE,SAAS,EAAC,6CAA6C,EACvD,KAAK,EAAE,EAAE,eAAe,EAAE,uBAAuB,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAEhF,eAAM,SAAS,EAAC,kBAAkB,YAAE,KAAK,CAAC,UAAU,CAAC,GAAQ,GACzD,GACF,CACP,CAAA;IACH,CAAC;IAED,OAAO,CACL,KAAC,eAAe,OACV,KAAK,EACT,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,GAChC,CACH,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* GraphQL Identifier Popover using Radix Themes
|
3
|
+
*
|
4
|
+
* Displays rich information about GraphQL identifiers on hover/click
|
5
|
+
*/
|
6
|
+
import type { React } from '#dep/react/index';
|
7
|
+
import type { Documentation } from '../schema-integration.ts';
|
8
|
+
import type { Identifier } from '../types.ts';
|
9
|
+
export interface GraphQLIdentifierPopoverProps {
|
10
|
+
/** The identifier being shown */
|
11
|
+
identifier: Identifier;
|
12
|
+
/** Documentation from schema */
|
13
|
+
documentation: Documentation;
|
14
|
+
/** Whether this identifier has an error */
|
15
|
+
hasError?: boolean;
|
16
|
+
/** Reference URL for "View docs" link */
|
17
|
+
referenceUrl: string;
|
18
|
+
/** Whether popover is open */
|
19
|
+
open: boolean;
|
20
|
+
/** Whether popover is pinned */
|
21
|
+
isPinned: boolean;
|
22
|
+
/** Callback when open state changes */
|
23
|
+
onOpenChange: (open: boolean) => void;
|
24
|
+
/** Callback to navigate to docs */
|
25
|
+
onNavigate?: (url: string) => void;
|
26
|
+
/** The trigger element */
|
27
|
+
children: React.ReactNode;
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* Popover content for GraphQL identifiers
|
31
|
+
*/
|
32
|
+
export declare const GraphQLIdentifierPopover: React.FC<GraphQLIdentifierPopoverProps>;
|
33
|
+
//# sourceMappingURL=GraphQLIdentifierPopover.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLIdentifierPopover.d.ts","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,6BAA6B;IAC5C,iCAAiC;IACjC,UAAU,EAAE,UAAU,CAAA;IACtB,gCAAgC;IAChC,aAAa,EAAE,aAAa,CAAA;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,gCAAgC;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,uCAAuC;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,mCAAmC;IACnC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,0BAA0B;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAgK5E,CAAA"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Cross2Icon } from '@radix-ui/react-icons';
|
3
|
+
import { Badge, Box, Card, Flex, IconButton, Link, Popover, Text } from '@radix-ui/themes';
|
4
|
+
/**
|
5
|
+
* Popover content for GraphQL identifiers
|
6
|
+
*/
|
7
|
+
export const GraphQLIdentifierPopover = ({ identifier, documentation, hasError = false, referenceUrl, open, isPinned, onOpenChange, onNavigate, children, }) => {
|
8
|
+
// Determine badge color based on identifier kind
|
9
|
+
const getBadgeColor = () => {
|
10
|
+
switch (identifier.kind) {
|
11
|
+
case 'Type':
|
12
|
+
return 'blue';
|
13
|
+
case 'Field':
|
14
|
+
return 'green';
|
15
|
+
case 'Argument':
|
16
|
+
return 'orange';
|
17
|
+
case 'Variable':
|
18
|
+
return 'purple';
|
19
|
+
case 'Directive':
|
20
|
+
return 'amber';
|
21
|
+
case 'Fragment':
|
22
|
+
return 'cyan';
|
23
|
+
default:
|
24
|
+
return 'gray';
|
25
|
+
}
|
26
|
+
};
|
27
|
+
return (_jsxs(Popover.Root, { open: open, onOpenChange: onOpenChange, children: [_jsx(Popover.Trigger, { children: children }), _jsx(Popover.Content, { className: 'graphql-identifier-popover', style: { maxWidth: 400 }, onInteractOutside: (e) => {
|
28
|
+
// Prevent closing when clicking inside popover if pinned
|
29
|
+
if (isPinned) {
|
30
|
+
e.preventDefault();
|
31
|
+
}
|
32
|
+
}, children: _jsxs(Flex, { direction: 'column', gap: '2', children: [_jsxs(Flex, { justify: 'between', align: 'center', children: [_jsxs(Flex, { align: 'center', gap: '2', children: [_jsx(Text, { size: '2', weight: 'bold', children: identifier.name }), _jsx(Badge, { color: getBadgeColor(), size: '1', children: identifier.kind })] }), isPinned && (_jsx(IconButton, { size: '1', variant: 'ghost', onClick: () => onOpenChange(false), "aria-label": 'Close popover', children: _jsx(Cross2Icon, {}) }))] }), _jsx(Box, { children: _jsxs(Text, { size: '1', color: 'gray', children: ["Type: ", _jsx(Text, { as: 'span', size: '1', style: { fontFamily: 'monospace' }, children: documentation.typeInfo })] }) }), documentation.description && (_jsx(Box, { children: _jsx(Text, { size: '1', children: documentation.description }) })), documentation.defaultValue && (_jsx(Box, { children: _jsxs(Text, { size: '1', color: 'gray', children: ["Default:", ' ', _jsx(Text, { as: 'span', size: '1', style: { fontFamily: 'monospace' }, children: documentation.defaultValue })] }) })), documentation.deprecated && (_jsxs(Box, { style: {
|
33
|
+
padding: '8px',
|
34
|
+
backgroundColor: 'var(--amber-2)',
|
35
|
+
borderRadius: '4px',
|
36
|
+
border: '1px solid var(--amber-6)',
|
37
|
+
}, children: [_jsxs(Text, { size: '1', color: 'amber', children: ["\u26A0\uFE0F Deprecated: ", documentation.deprecated.reason] }), documentation.deprecated.replacement && (_jsxs(Text, { size: '1', color: 'amber', children: ["Use ", documentation.deprecated.replacement, " instead."] }))] })), hasError && (_jsx(Box, { style: {
|
38
|
+
padding: '8px',
|
39
|
+
backgroundColor: 'var(--red-2)',
|
40
|
+
borderRadius: '4px',
|
41
|
+
border: '1px solid var(--red-6)',
|
42
|
+
}, children: _jsxs(Text, { size: '1', color: 'red', children: ["\u274C ", identifier.kind, " not found in schema"] }) })), _jsx(Box, { children: _jsxs(Text, { size: '1', color: 'gray', children: ["Path: ", identifier.schemaPath.join(' → ')] }) }), onNavigate && !hasError && (_jsx(Box, { children: _jsx(Link, { size: '1', href: referenceUrl, onClick: (e) => {
|
43
|
+
e.preventDefault();
|
44
|
+
onNavigate(referenceUrl);
|
45
|
+
onOpenChange(false);
|
46
|
+
}, children: "View full documentation \u2192" }) }))] }) })] }));
|
47
|
+
};
|
48
|
+
//# sourceMappingURL=GraphQLIdentifierPopover.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLIdentifierPopover.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Interactive overlay for GraphQL identifiers
|
3
|
+
*/
|
4
|
+
import type { React } from '#dep/react/index';
|
5
|
+
import type { DOMPosition } from '../positioning-simple.ts';
|
6
|
+
import type { SchemaResolution } from '../schema-integration.ts';
|
7
|
+
import type { Identifier } from '../types.ts';
|
8
|
+
export interface IdentifierLinkProps {
|
9
|
+
/** The GraphQL identifier */
|
10
|
+
identifier: Identifier;
|
11
|
+
/** Schema resolution information */
|
12
|
+
resolution: SchemaResolution;
|
13
|
+
/** DOM position for overlay placement */
|
14
|
+
position: DOMPosition;
|
15
|
+
/** Navigation handler */
|
16
|
+
onNavigate: (url: string) => void;
|
17
|
+
/** Whether to show debug visuals */
|
18
|
+
debug?: boolean;
|
19
|
+
/** Whether this tooltip is open */
|
20
|
+
isOpen: boolean;
|
21
|
+
/** Whether this tooltip is pinned */
|
22
|
+
isPinned: boolean;
|
23
|
+
/** Handle hover start */
|
24
|
+
onHoverStart: () => void;
|
25
|
+
/** Handle hover end */
|
26
|
+
onHoverEnd: () => void;
|
27
|
+
/** Toggle pin state */
|
28
|
+
onTogglePin: () => void;
|
29
|
+
/** Handle tooltip hover */
|
30
|
+
onTooltipHover: () => void;
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
* Interactive overlay for a GraphQL identifier
|
34
|
+
*
|
35
|
+
* Renders an invisible clickable area over the identifier text
|
36
|
+
* with hover popovers and navigation to schema reference pages.
|
37
|
+
*/
|
38
|
+
export declare const IdentifierLink: React.FC<IdentifierLinkProps>;
|
39
|
+
//# sourceMappingURL=IdentifierLink.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IdentifierLink.d.ts","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/IdentifierLink.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAA;IACtB,oCAAoC;IACpC,UAAU,EAAE,gBAAgB,CAAA;IAC5B,yCAAyC;IACzC,QAAQ,EAAE,WAAW,CAAA;IACrB,yBAAyB;IACzB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mCAAmC;IACnC,MAAM,EAAE,OAAO,CAAA;IACf,qCAAqC;IACrC,QAAQ,EAAE,OAAO,CAAA;IACjB,yBAAyB;IACzB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,uBAAuB;IACvB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,uBAAuB;IACvB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,2BAA2B;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsHxD,CAAA"}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { GraphQLIdentifierPopover } from "./GraphQLIdentifierPopover.js";
|
3
|
+
/**
|
4
|
+
* Interactive overlay for a GraphQL identifier
|
5
|
+
*
|
6
|
+
* Renders an invisible clickable area over the identifier text
|
7
|
+
* with hover popovers and navigation to schema reference pages.
|
8
|
+
*/
|
9
|
+
export const IdentifierLink = ({ identifier, resolution, position, onNavigate, debug = false, isOpen, isPinned, onHoverStart, onHoverEnd, onTogglePin, onTooltipHover, }) => {
|
10
|
+
// Determine visual state
|
11
|
+
const isClickable = resolution.exists;
|
12
|
+
const hasError = !resolution.exists && (identifier.kind === 'Type' || identifier.kind === 'Field');
|
13
|
+
const isDeprecated = !!resolution.deprecated;
|
14
|
+
// Build class names
|
15
|
+
const classNames = [
|
16
|
+
'graphql-identifier-overlay',
|
17
|
+
`graphql-${identifier.kind.toLowerCase()}`,
|
18
|
+
isClickable && 'graphql-clickable',
|
19
|
+
hasError && 'graphql-error',
|
20
|
+
isDeprecated && 'graphql-deprecated',
|
21
|
+
isOpen && 'graphql-hovered',
|
22
|
+
isOpen && 'graphql-tooltip-open',
|
23
|
+
debug && 'graphql-debug',
|
24
|
+
].filter(Boolean).join(' ');
|
25
|
+
const handleClick = (e) => {
|
26
|
+
e.preventDefault();
|
27
|
+
e.stopPropagation();
|
28
|
+
onTogglePin();
|
29
|
+
};
|
30
|
+
// Create trigger element
|
31
|
+
const triggerElement = isClickable
|
32
|
+
? (_jsx("a", { href: resolution.referenceUrl, className: classNames + ' graphql-identifier-link', style: {
|
33
|
+
position: 'absolute',
|
34
|
+
top: position.top,
|
35
|
+
left: position.left,
|
36
|
+
width: position.width,
|
37
|
+
height: position.height,
|
38
|
+
cursor: 'pointer',
|
39
|
+
zIndex: 10,
|
40
|
+
pointerEvents: 'auto',
|
41
|
+
display: 'block',
|
42
|
+
textDecoration: 'none',
|
43
|
+
// Debug mode visual
|
44
|
+
...(debug && {
|
45
|
+
backgroundColor: hasError ? 'rgba(239, 68, 68, 0.1)' : 'rgba(59, 130, 246, 0.1)',
|
46
|
+
border: `1px solid ${hasError ? 'rgba(239, 68, 68, 0.3)' : 'rgba(59, 130, 246, 0.3)'}`,
|
47
|
+
}),
|
48
|
+
}, onClick: handleClick, onMouseEnter: onHoverStart, onMouseLeave: onHoverEnd, "aria-label": `${identifier.kind} ${identifier.name} - Click to view documentation`, "data-graphql-identifier": identifier.name, "data-graphql-kind": identifier.kind }))
|
49
|
+
: (_jsx("div", { className: classNames, style: {
|
50
|
+
position: 'absolute',
|
51
|
+
top: position.top,
|
52
|
+
left: position.left,
|
53
|
+
width: position.width,
|
54
|
+
height: position.height,
|
55
|
+
cursor: 'pointer', // Make it clickable even for errors
|
56
|
+
zIndex: 10,
|
57
|
+
pointerEvents: 'auto',
|
58
|
+
// Debug mode visual
|
59
|
+
...(debug && {
|
60
|
+
backgroundColor: 'rgba(239, 68, 68, 0.1)',
|
61
|
+
border: `1px solid rgba(239, 68, 68, 0.3)`,
|
62
|
+
}),
|
63
|
+
}, onClick: handleClick, onMouseEnter: onHoverStart, onMouseLeave: onHoverEnd, role: 'button', "aria-label": `${identifier.kind} ${identifier.name} - Click to view information`, "data-graphql-identifier": identifier.name, "data-graphql-kind": identifier.kind }));
|
64
|
+
return (_jsx(GraphQLIdentifierPopover, { identifier: identifier, documentation: resolution.documentation || {
|
65
|
+
description: hasError
|
66
|
+
? `${identifier.kind} "${identifier.name}" not found in schema. This ${identifier.kind.toLowerCase()} does not exist in the current GraphQL schema.`
|
67
|
+
: `${identifier.kind}: ${identifier.name}`,
|
68
|
+
typeInfo: identifier.kind,
|
69
|
+
}, hasError: hasError, referenceUrl: resolution.referenceUrl, open: isOpen, isPinned: isPinned, onOpenChange: (open) => {
|
70
|
+
if (!open && isPinned) {
|
71
|
+
onTogglePin(); // Unpin when closing
|
72
|
+
}
|
73
|
+
}, onNavigate: isClickable ? onNavigate : undefined, children: triggerElement }));
|
74
|
+
};
|
75
|
+
//# sourceMappingURL=IdentifierLink.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IdentifierLink.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/IdentifierLink.tsx"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Minimal styles for GraphQL Document interactive code blocks
|
3
|
+
*/
|
4
|
+
export declare const graphqlDocumentStyles = "\n/* Container styles */\n.graphql-document {\n position: relative;\n}\n\n.graphql-interaction-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.graphql-interaction-layer > * {\n pointer-events: auto;\n}\n\n/* Identifier overlay styles */\n.graphql-identifier-overlay {\n transition: background-color 0.2s ease;\n}\n\n/* Clickable identifiers get visual feedback */\n.graphql-identifier-overlay.graphql-clickable {\n /* Subtle underline effect using box-shadow to not affect layout */\n box-shadow: 0 1px 0 0 rgba(var(--accent-9), 0.3);\n transition: box-shadow 0.2s ease, background-color 0.2s ease;\n}\n\n.graphql-identifier-overlay.graphql-clickable:hover {\n background-color: rgba(var(--accent-3), 0.5);\n box-shadow: 0 1px 0 0 rgba(var(--accent-9), 0.6);\n}\n\n/* Active/open state */\n.graphql-identifier-overlay.graphql-tooltip-open {\n background-color: rgba(var(--accent-3), 0.5);\n box-shadow: 0 1px 0 0 var(--accent-9);\n}\n\n/* Error state */\n.graphql-identifier-overlay.graphql-error {\n box-shadow: 0 1.5px 0 0 var(--red-9);\n}\n\n.graphql-identifier-overlay.graphql-error:hover {\n background-color: rgba(var(--red-3), 0.5);\n}\n\n/* Deprecated state */\n.graphql-identifier-overlay.graphql-deprecated {\n text-decoration: line-through;\n opacity: 0.7;\n}\n\n/* Debug mode */\n.graphql-identifier-overlay.graphql-debug {\n background-color: rgba(59, 130, 246, 0.1) !important;\n border: 1px solid rgba(59, 130, 246, 0.3) !important;\n}\n\n/* Kind-specific colors */\n.graphql-identifier-overlay.graphql-type.graphql-clickable {\n box-shadow: 0 1px 0 0 rgba(var(--blue-9), 0.3);\n}\n\n.graphql-identifier-overlay.graphql-field.graphql-clickable {\n box-shadow: 0 1px 0 0 rgba(var(--green-9), 0.3);\n}\n\n.graphql-identifier-overlay.graphql-argument.graphql-clickable {\n box-shadow: 0 1px 0 0 rgba(var(--orange-9), 0.3);\n}\n\n.graphql-identifier-overlay.graphql-variable {\n box-shadow: 0 1px 0 0 rgba(var(--purple-9), 0.3);\n}\n\n.graphql-identifier-overlay.graphql-directive.graphql-clickable {\n box-shadow: 0 1px 0 0 rgba(var(--amber-9), 0.3);\n}\n\n/* Popover animation */\n.graphql-identifier-popover {\n animation: graphql-popover-show 150ms ease-out;\n}\n\n@keyframes graphql-popover-show {\n from {\n opacity: 0;\n transform: translateY(2px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* Validation errors */\n.graphql-validation-errors {\n margin-top: 1rem;\n padding: 0.5rem;\n background-color: var(--red-2);\n border: 1px solid var(--red-6);\n border-radius: 4px;\n}\n\n.graphql-error {\n color: var(--red-11);\n font-size: 0.875rem;\n margin: 0.25rem 0;\n}\n\n/* Loading state */\n.graphql-document.graphql-loading {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.graphql-document.graphql-loading::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n border: 2px solid var(--gray-6);\n border-top-color: var(--accent-9);\n border-radius: 50%;\n animation: graphql-spinner 0.8s linear infinite;\n}\n\n@keyframes graphql-spinner {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Copy button */\n.graphql-document-copy {\n position: absolute;\n top: 1rem;\n right: 1rem;\n opacity: 0;\n transition: opacity 0.2s ease;\n z-index: 10;\n}\n\n.graphql-document:hover .graphql-document-copy {\n opacity: 0.8;\n}\n\n.graphql-document-copy:hover {\n opacity: 1 !important;\n}\n\n.graphql-document-copy[data-copied=\"true\"] {\n opacity: 1 !important;\n color: var(--green-9);\n}";
|
5
|
+
//# sourceMappingURL=graphql-document-styles.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"graphql-document-styles.d.ts","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/graphql-document-styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,qBAAqB,wjHAkKhC,CAAA"}
|
@@ -0,0 +1,167 @@
|
|
1
|
+
/**
|
2
|
+
* Minimal styles for GraphQL Document interactive code blocks
|
3
|
+
*/
|
4
|
+
export const graphqlDocumentStyles = `
|
5
|
+
/* Container styles */
|
6
|
+
.graphql-document {
|
7
|
+
position: relative;
|
8
|
+
}
|
9
|
+
|
10
|
+
.graphql-interaction-layer {
|
11
|
+
position: absolute;
|
12
|
+
top: 0;
|
13
|
+
left: 0;
|
14
|
+
right: 0;
|
15
|
+
bottom: 0;
|
16
|
+
pointer-events: none;
|
17
|
+
}
|
18
|
+
|
19
|
+
.graphql-interaction-layer > * {
|
20
|
+
pointer-events: auto;
|
21
|
+
}
|
22
|
+
|
23
|
+
/* Identifier overlay styles */
|
24
|
+
.graphql-identifier-overlay {
|
25
|
+
transition: background-color 0.2s ease;
|
26
|
+
}
|
27
|
+
|
28
|
+
/* Clickable identifiers get visual feedback */
|
29
|
+
.graphql-identifier-overlay.graphql-clickable {
|
30
|
+
/* Subtle underline effect using box-shadow to not affect layout */
|
31
|
+
box-shadow: 0 1px 0 0 rgba(var(--accent-9), 0.3);
|
32
|
+
transition: box-shadow 0.2s ease, background-color 0.2s ease;
|
33
|
+
}
|
34
|
+
|
35
|
+
.graphql-identifier-overlay.graphql-clickable:hover {
|
36
|
+
background-color: rgba(var(--accent-3), 0.5);
|
37
|
+
box-shadow: 0 1px 0 0 rgba(var(--accent-9), 0.6);
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Active/open state */
|
41
|
+
.graphql-identifier-overlay.graphql-tooltip-open {
|
42
|
+
background-color: rgba(var(--accent-3), 0.5);
|
43
|
+
box-shadow: 0 1px 0 0 var(--accent-9);
|
44
|
+
}
|
45
|
+
|
46
|
+
/* Error state */
|
47
|
+
.graphql-identifier-overlay.graphql-error {
|
48
|
+
box-shadow: 0 1.5px 0 0 var(--red-9);
|
49
|
+
}
|
50
|
+
|
51
|
+
.graphql-identifier-overlay.graphql-error:hover {
|
52
|
+
background-color: rgba(var(--red-3), 0.5);
|
53
|
+
}
|
54
|
+
|
55
|
+
/* Deprecated state */
|
56
|
+
.graphql-identifier-overlay.graphql-deprecated {
|
57
|
+
text-decoration: line-through;
|
58
|
+
opacity: 0.7;
|
59
|
+
}
|
60
|
+
|
61
|
+
/* Debug mode */
|
62
|
+
.graphql-identifier-overlay.graphql-debug {
|
63
|
+
background-color: rgba(59, 130, 246, 0.1) !important;
|
64
|
+
border: 1px solid rgba(59, 130, 246, 0.3) !important;
|
65
|
+
}
|
66
|
+
|
67
|
+
/* Kind-specific colors */
|
68
|
+
.graphql-identifier-overlay.graphql-type.graphql-clickable {
|
69
|
+
box-shadow: 0 1px 0 0 rgba(var(--blue-9), 0.3);
|
70
|
+
}
|
71
|
+
|
72
|
+
.graphql-identifier-overlay.graphql-field.graphql-clickable {
|
73
|
+
box-shadow: 0 1px 0 0 rgba(var(--green-9), 0.3);
|
74
|
+
}
|
75
|
+
|
76
|
+
.graphql-identifier-overlay.graphql-argument.graphql-clickable {
|
77
|
+
box-shadow: 0 1px 0 0 rgba(var(--orange-9), 0.3);
|
78
|
+
}
|
79
|
+
|
80
|
+
.graphql-identifier-overlay.graphql-variable {
|
81
|
+
box-shadow: 0 1px 0 0 rgba(var(--purple-9), 0.3);
|
82
|
+
}
|
83
|
+
|
84
|
+
.graphql-identifier-overlay.graphql-directive.graphql-clickable {
|
85
|
+
box-shadow: 0 1px 0 0 rgba(var(--amber-9), 0.3);
|
86
|
+
}
|
87
|
+
|
88
|
+
/* Popover animation */
|
89
|
+
.graphql-identifier-popover {
|
90
|
+
animation: graphql-popover-show 150ms ease-out;
|
91
|
+
}
|
92
|
+
|
93
|
+
@keyframes graphql-popover-show {
|
94
|
+
from {
|
95
|
+
opacity: 0;
|
96
|
+
transform: translateY(2px);
|
97
|
+
}
|
98
|
+
to {
|
99
|
+
opacity: 1;
|
100
|
+
transform: translateY(0);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
/* Validation errors */
|
105
|
+
.graphql-validation-errors {
|
106
|
+
margin-top: 1rem;
|
107
|
+
padding: 0.5rem;
|
108
|
+
background-color: var(--red-2);
|
109
|
+
border: 1px solid var(--red-6);
|
110
|
+
border-radius: 4px;
|
111
|
+
}
|
112
|
+
|
113
|
+
.graphql-error {
|
114
|
+
color: var(--red-11);
|
115
|
+
font-size: 0.875rem;
|
116
|
+
margin: 0.25rem 0;
|
117
|
+
}
|
118
|
+
|
119
|
+
/* Loading state */
|
120
|
+
.graphql-document.graphql-loading {
|
121
|
+
opacity: 0.6;
|
122
|
+
pointer-events: none;
|
123
|
+
}
|
124
|
+
|
125
|
+
.graphql-document.graphql-loading::after {
|
126
|
+
content: '';
|
127
|
+
position: absolute;
|
128
|
+
top: 50%;
|
129
|
+
left: 50%;
|
130
|
+
width: 20px;
|
131
|
+
height: 20px;
|
132
|
+
margin: -10px 0 0 -10px;
|
133
|
+
border: 2px solid var(--gray-6);
|
134
|
+
border-top-color: var(--accent-9);
|
135
|
+
border-radius: 50%;
|
136
|
+
animation: graphql-spinner 0.8s linear infinite;
|
137
|
+
}
|
138
|
+
|
139
|
+
@keyframes graphql-spinner {
|
140
|
+
to {
|
141
|
+
transform: rotate(360deg);
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
/* Copy button */
|
146
|
+
.graphql-document-copy {
|
147
|
+
position: absolute;
|
148
|
+
top: 1rem;
|
149
|
+
right: 1rem;
|
150
|
+
opacity: 0;
|
151
|
+
transition: opacity 0.2s ease;
|
152
|
+
z-index: 10;
|
153
|
+
}
|
154
|
+
|
155
|
+
.graphql-document:hover .graphql-document-copy {
|
156
|
+
opacity: 0.8;
|
157
|
+
}
|
158
|
+
|
159
|
+
.graphql-document-copy:hover {
|
160
|
+
opacity: 1 !important;
|
161
|
+
}
|
162
|
+
|
163
|
+
.graphql-document-copy[data-copied="true"] {
|
164
|
+
opacity: 1 !important;
|
165
|
+
color: var(--green-9);
|
166
|
+
}`;
|
167
|
+
//# sourceMappingURL=graphql-document-styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"graphql-document-styles.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/graphql-document-styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkKnC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sBAAsB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAkB,CAAA;AAChC,cAAc,sBAAuB,CAAA;AACrC,cAAc,gCAAiC,CAAA;AAC/C,cAAc,+BAAgC,CAAA;AAC9C,cAAc,qBAAsB,CAAA"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/**
|
2
|
+
* Example usage of the GraphQL Document Analysis library
|
3
|
+
*
|
4
|
+
* This demonstrates how to use the foundational layer for extracting
|
5
|
+
* identifiers and context from GraphQL documents - the building block
|
6
|
+
* for the interactive GraphQL Document Component.
|
7
|
+
*/
|
8
|
+
import { GraphQLDocument } from './$.ts';
|
9
|
+
/**
|
10
|
+
* Demonstrate basic analysis
|
11
|
+
*/
|
12
|
+
export declare const analyzeExample: () => GraphQLDocument.AnalysisResult;
|
13
|
+
/**
|
14
|
+
* Demonstrate identifier lookup by position
|
15
|
+
*/
|
16
|
+
export declare const demonstratePositionLookup: () => void;
|
17
|
+
/**
|
18
|
+
* Demonstrate how this enables hyperlink generation
|
19
|
+
*/
|
20
|
+
export declare const demonstrateHyperlinkGeneration: () => void;
|
21
|
+
/**
|
22
|
+
* Show the foundation for hover tooltips
|
23
|
+
*/
|
24
|
+
export declare const demonstrateTooltipFoundation: () => void;
|
25
|
+
//# sourceMappingURL=example.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-document/example.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AA2BxC;;GAEG;AACH,eAAO,MAAM,cAAc,sCAsB1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,YA2BrC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,YAsB1C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,YAiBxC,CAAA"}
|