polen 0.10.0 → 0.11.0-next.1
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/api.d.ts +1 -0
- package/build/api/api.d.ts.map +1 -1
- package/build/api/api.js +1 -0
- package/build/api/api.js.map +1 -1
- package/build/api/config/configurator.d.ts +20 -3
- package/build/api/config/configurator.d.ts.map +1 -1
- package/build/api/config/configurator.js +27 -3
- package/build/api/config/configurator.js.map +1 -1
- package/build/api/schema/data-sources/memory/memory.d.ts +2 -2
- package/build/api/schema/data-sources/memory/memory.d.ts.map +1 -1
- package/build/api/schema/data-sources/memory/memory.js +1 -3
- package/build/api/schema/data-sources/memory/memory.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts +7 -3
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js +15 -11
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +16 -7
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +26 -7
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts +7 -2
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.js +13 -5
- package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
- package/build/api/schema/metadata.d.ts +8 -0
- package/build/api/schema/metadata.d.ts.map +1 -0
- package/build/api/schema/metadata.js +19 -0
- package/build/api/schema/metadata.js.map +1 -0
- package/build/api/schema/read.d.ts +3 -3
- package/build/api/schema/read.d.ts.map +1 -1
- package/build/api/schema/read.js.map +1 -1
- package/build/api/schema/schema.d.ts +33 -2
- package/build/api/schema/schema.d.ts.map +1 -1
- package/build/api/schema/schema.js +42 -0
- package/build/api/schema/schema.js.map +1 -1
- package/build/api/schema-source/index.d.ts +2 -0
- package/build/api/schema-source/index.d.ts.map +1 -0
- package/build/api/schema-source/index.js +2 -0
- package/build/api/schema-source/index.js.map +1 -0
- package/build/api/schema-source/schema-source.d.ts +33 -0
- package/build/api/schema-source/schema-source.d.ts.map +1 -0
- package/build/api/schema-source/schema-source.js +137 -0
- package/build/api/schema-source/schema-source.js.map +1 -0
- package/build/api/vite/plugins/core.d.ts +1 -0
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +21 -18
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/schema-assets.d.ts +22 -0
- package/build/api/vite/plugins/schema-assets.d.ts.map +1 -0
- package/build/api/vite/plugins/schema-assets.js +269 -0
- package/build/api/vite/plugins/schema-assets.js.map +1 -0
- package/build/api/vite/plugins/serve.d.ts.map +1 -1
- package/build/api/vite/plugins/serve.js +11 -0
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/lib/graphql-change/change-groups.d.ts +2 -0
- package/build/lib/graphql-change/change-groups.d.ts.map +1 -1
- package/build/lib/graphql-change/change-groups.js +54 -0
- package/build/lib/graphql-change/change-groups.js.map +1 -1
- package/build/lib/kit-temp.d.ts +9 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +12 -0
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/path-map/path-map.d.ts.map +1 -1
- package/build/lib/path-map/path-map.js +3 -1
- package/build/lib/path-map/path-map.js.map +1 -1
- package/build/project-data.d.ts +3 -11
- package/build/project-data.d.ts.map +1 -1
- package/build/template/components/Changelog.d.ts +3 -3
- package/build/template/components/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog.js +8 -84
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/CodeBlock.d.ts +2 -0
- package/build/template/components/CodeBlock.d.ts.map +1 -1
- package/build/template/components/CodeBlock.js +1 -4
- package/build/template/components/CodeBlock.js.map +1 -1
- package/build/template/components/ComponentDispatch.d.ts +34 -0
- package/build/template/components/ComponentDispatch.d.ts.map +1 -0
- package/build/template/components/ComponentDispatch.js +33 -0
- package/build/template/components/ComponentDispatch.js.map +1 -0
- package/build/template/components/ReferenceLink.d.ts +19 -0
- package/build/template/components/ReferenceLink.d.ts.map +1 -0
- package/build/template/components/ReferenceLink.js +19 -0
- package/build/template/components/ReferenceLink.js.map +1 -0
- package/build/template/components/TypeAnnotation.d.ts.map +1 -1
- package/build/template/components/TypeAnnotation.js +3 -3
- package/build/template/components/TypeAnnotation.js.map +1 -1
- package/build/template/components/TypeFieldsLinkList.d.ts.map +1 -1
- package/build/template/components/TypeFieldsLinkList.js +4 -4
- package/build/template/components/TypeFieldsLinkList.js.map +1 -1
- package/build/template/components/TypeIndex.js +2 -2
- package/build/template/components/TypeIndex.js.map +1 -1
- package/build/template/components/VersionSelector.d.ts +7 -0
- package/build/template/components/VersionSelector.d.ts.map +1 -0
- package/build/template/components/VersionSelector.js +30 -0
- package/build/template/components/VersionSelector.js.map +1 -0
- package/build/template/components/graphql/type-link.d.ts.map +1 -1
- package/build/template/components/graphql/type-link.js +2 -2
- package/build/template/components/graphql/type-link.js.map +1 -1
- package/build/template/hooks/useVersionPath.d.ts +6 -0
- package/build/template/hooks/useVersionPath.d.ts.map +1 -0
- package/build/template/hooks/useVersionPath.js +10 -0
- package/build/template/hooks/useVersionPath.js.map +1 -0
- package/build/template/layouts/ChangelogLayout.d.ts.map +1 -0
- package/build/template/{components → layouts}/ChangelogLayout.js +1 -1
- package/build/template/layouts/ChangelogLayout.js.map +1 -0
- package/build/template/layouts/index.d.ts +1 -0
- package/build/template/layouts/index.d.ts.map +1 -1
- package/build/template/layouts/index.js +1 -0
- package/build/template/layouts/index.js.map +1 -1
- package/build/template/lib/fetch-text.d.ts +8 -0
- package/build/template/lib/fetch-text.d.ts.map +1 -0
- package/build/template/lib/fetch-text.js +14 -0
- package/build/template/lib/fetch-text.js.map +1 -0
- package/build/template/lib/polen-url.d.ts +14 -0
- package/build/template/lib/polen-url.d.ts.map +1 -1
- package/build/template/lib/polen-url.js +16 -0
- package/build/template/lib/polen-url.js.map +1 -1
- package/build/template/lib/schema-utils/constants.d.ts +5 -0
- package/build/template/lib/schema-utils/constants.d.ts.map +1 -0
- package/build/template/lib/schema-utils/constants.js +5 -0
- package/build/template/lib/schema-utils/constants.js.map +1 -0
- package/build/template/lib/schema-utils/schema-utils.d.ts +15 -0
- package/build/template/lib/schema-utils/schema-utils.d.ts.map +1 -0
- package/build/template/lib/schema-utils/schema-utils.js +37 -0
- package/build/template/lib/schema-utils/schema-utils.js.map +1 -0
- package/build/template/routes/changelog.d.ts +4 -3
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js +13 -7
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/pages.d.ts +10 -0
- package/build/template/routes/pages.d.ts.map +1 -0
- package/build/template/routes/pages.js +76 -0
- package/build/template/routes/pages.js.map +1 -0
- package/build/template/routes/reference.$type.$field.js +1 -1
- package/build/template/routes/reference.$type.$field.js.map +1 -1
- package/build/template/routes/reference.$type.d.ts +4 -0
- package/build/template/routes/reference.$type.d.ts.map +1 -1
- package/build/template/routes/reference.$type.js +2 -0
- package/build/template/routes/reference.$type.js.map +1 -1
- package/build/template/routes/reference.d.ts +9 -3
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +30 -8
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/reference.version.$version.$type.$field.d.ts +6 -0
- package/build/template/routes/reference.version.$version.$type.$field.d.ts.map +1 -0
- package/build/template/routes/reference.version.$version.$type.$field.js +32 -0
- package/build/template/routes/reference.version.$version.$type.$field.js.map +1 -0
- package/build/template/routes/reference.version.$version.$type.d.ts +11 -0
- package/build/template/routes/reference.version.$version.$type.d.ts.map +1 -0
- package/build/template/routes/reference.version.$version.$type.js +26 -0
- package/build/template/routes/reference.version.$version.$type.js.map +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +8 -72
- package/build/template/routes/root.js.map +1 -1
- package/build/template/server/app.d.ts +22 -1
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +19 -9
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/main.js +9 -1
- package/build/template/server/main.js.map +1 -1
- package/build/template/server/ssg/generate.js +2 -2
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.d.ts +1 -1
- package/build/template/server/ssg/get-route-paths.d.ts.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +51 -27
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/build/template/sources/schema-source.d.ts +15 -0
- package/build/template/sources/schema-source.d.ts.map +1 -0
- package/build/template/sources/schema-source.js +63 -0
- package/build/template/sources/schema-source.js.map +1 -0
- package/package.json +1 -1
- package/src/api/api.ts +1 -0
- package/src/api/config/configurator.ts +51 -6
- package/src/api/schema/data-sources/memory/memory.ts +3 -5
- package/src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts +29 -13
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +56 -16
- package/src/api/schema/data-sources/schema-file/schema-file.ts +16 -7
- package/src/api/schema/metadata.ts +23 -0
- package/src/api/schema/read.ts +3 -3
- package/src/api/schema/schema.ts +62 -2
- package/src/api/schema-source/index.ts +1 -0
- package/src/api/schema-source/schema-source.ts +189 -0
- package/src/api/vite/plugins/core.ts +23 -18
- package/src/api/vite/plugins/schema-assets.ts +317 -0
- package/src/api/vite/plugins/serve.ts +15 -8
- package/src/lib/graphql-change/change-groups.ts +57 -0
- package/src/lib/kit-temp.ts +13 -0
- package/src/lib/path-map/$.test.ts +22 -19
- package/src/lib/path-map/path-map.ts +3 -1
- package/src/project-data.ts +3 -11
- package/src/template/components/Changelog.tsx +16 -67
- package/src/template/components/CodeBlock.tsx +3 -5
- package/src/template/components/ComponentDispatch.tsx +42 -0
- package/src/template/components/ReferenceLink.tsx +34 -0
- package/src/template/components/TypeAnnotation.tsx +5 -7
- package/src/template/components/TypeFieldsLinkList.tsx +20 -23
- package/src/template/components/TypeIndex.tsx +10 -12
- package/src/template/components/VersionSelector.tsx +50 -0
- package/src/template/components/graphql/type-link.tsx +4 -3
- package/src/template/hooks/useVersionPath.ts +10 -0
- package/src/template/{components → layouts}/ChangelogLayout.tsx +1 -1
- package/src/template/layouts/index.ts +1 -0
- package/src/template/lib/fetch-text.ts +13 -0
- package/src/template/lib/polen-url.ts +20 -0
- package/src/template/lib/schema-utils/constants.ts +4 -0
- package/src/template/lib/schema-utils/schema-utils.ts +42 -0
- package/src/template/routes/changelog.tsx +17 -8
- package/src/template/routes/pages.tsx +109 -0
- package/src/template/routes/reference.$type.$field.tsx +1 -1
- package/src/template/routes/reference.$type.tsx +2 -0
- package/src/template/routes/reference.tsx +38 -6
- package/src/template/routes/reference.version.$version.$type.$field.tsx +35 -0
- package/src/template/routes/reference.version.$version.$type.tsx +30 -0
- package/src/template/routes/root.tsx +8 -109
- package/src/template/server/app.ts +47 -14
- package/src/template/server/main.ts +9 -1
- package/src/template/server/ssg/generate.ts +2 -2
- package/src/template/server/ssg/get-route-paths.ts +53 -27
- package/src/template/sources/schema-source.ts +68 -0
- package/build/lib/graphql-document/$$.d.ts +0 -5
- package/build/lib/graphql-document/$$.d.ts.map +0 -1
- package/build/lib/graphql-document/$$.js +0 -5
- package/build/lib/graphql-document/$$.js.map +0 -1
- package/build/lib/graphql-document/$.d.ts +0 -2
- package/build/lib/graphql-document/$.d.ts.map +0 -1
- package/build/lib/graphql-document/$.js +0 -2
- package/build/lib/graphql-document/$.js.map +0 -1
- package/build/lib/graphql-document/analysis.d.ts +0 -44
- package/build/lib/graphql-document/analysis.d.ts.map +0 -1
- package/build/lib/graphql-document/analysis.js +0 -361
- package/build/lib/graphql-document/analysis.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -38
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +0 -151
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +0 -7
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +0 -27
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +0 -33
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +0 -50
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +0 -39
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.js +0 -75
- package/build/lib/graphql-document/components/IdentifierLink.js.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts +0 -5
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.js +0 -144
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
- package/build/lib/graphql-document/components/index.d.ts +0 -5
- package/build/lib/graphql-document/components/index.d.ts.map +0 -1
- package/build/lib/graphql-document/components/index.js +0 -5
- package/build/lib/graphql-document/components/index.js.map +0 -1
- package/build/lib/graphql-document/example.d.ts +0 -25
- package/build/lib/graphql-document/example.d.ts.map +0 -1
- package/build/lib/graphql-document/example.js +0 -140
- package/build/lib/graphql-document/example.js.map +0 -1
- package/build/lib/graphql-document/graphql-document.d.ts +0 -35
- package/build/lib/graphql-document/graphql-document.d.ts.map +0 -1
- package/build/lib/graphql-document/graphql-document.js +0 -36
- package/build/lib/graphql-document/graphql-document.js.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +0 -43
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.js +0 -132
- package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +0 -1
- package/build/lib/graphql-document/positioning-simple.d.ts +0 -63
- package/build/lib/graphql-document/positioning-simple.d.ts.map +0 -1
- package/build/lib/graphql-document/positioning-simple.js +0 -185
- package/build/lib/graphql-document/positioning-simple.js.map +0 -1
- package/build/lib/graphql-document/schema-context.d.ts +0 -8
- package/build/lib/graphql-document/schema-context.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-context.js +0 -11
- package/build/lib/graphql-document/schema-context.js.map +0 -1
- package/build/lib/graphql-document/schema-integration.d.ts +0 -135
- package/build/lib/graphql-document/schema-integration.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-integration.js +0 -328
- package/build/lib/graphql-document/schema-integration.js.map +0 -1
- package/build/lib/graphql-document/types.d.ts +0 -117
- package/build/lib/graphql-document/types.d.ts.map +0 -1
- package/build/lib/graphql-document/types.js +0 -2
- package/build/lib/graphql-document/types.js.map +0 -1
- package/build/template/components/ChangelogLayout.d.ts.map +0 -1
- package/build/template/components/ChangelogLayout.js.map +0 -1
- package/build/template/components/CodeHikePre.d.ts +0 -16
- package/build/template/components/CodeHikePre.d.ts.map +0 -1
- package/build/template/components/CodeHikePre.js +0 -37
- package/build/template/components/CodeHikePre.js.map +0 -1
- package/src/lib/graphql-document/$$.ts +0 -4
- package/src/lib/graphql-document/$.test.ts +0 -132
- package/src/lib/graphql-document/$.ts +0 -1
- package/src/lib/graphql-document/README.md +0 -102
- package/src/lib/graphql-document/analysis.ts +0 -415
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +0 -265
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -46
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -199
- package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
- package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -144
- package/src/lib/graphql-document/components/index.ts +0 -4
- package/src/lib/graphql-document/demo.md +0 -155
- package/src/lib/graphql-document/example.ts +0 -163
- package/src/lib/graphql-document/graphql-document.ts +0 -37
- package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +0 -76
- package/src/lib/graphql-document/hooks/use-tooltip-state.ts +0 -191
- package/src/lib/graphql-document/positioning-simple.test.ts +0 -248
- package/src/lib/graphql-document/positioning-simple.ts +0 -260
- package/src/lib/graphql-document/schema-context.tsx +0 -20
- package/src/lib/graphql-document/schema-integration.test.ts +0 -365
- package/src/lib/graphql-document/schema-integration.ts +0 -488
- package/src/lib/graphql-document/types.ts +0 -129
- package/src/template/components/CodeHikePre.tsx +0 -51
- /package/build/template/{components → layouts}/ChangelogLayout.d.ts +0 -0
@@ -1,160 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Interactive overlay for GraphQL identifiers
|
3
|
-
*/
|
4
|
-
|
5
|
-
import type { React } from '#dep/react/index'
|
6
|
-
import type { DOMPosition } from '../positioning-simple.js'
|
7
|
-
import type { SchemaResolution } from '../schema-integration.js'
|
8
|
-
import type { Identifier } from '../types.js'
|
9
|
-
import { GraphQLIdentifierPopover } from './GraphQLIdentifierPopover.js'
|
10
|
-
|
11
|
-
export interface IdentifierLinkProps {
|
12
|
-
/** The GraphQL identifier */
|
13
|
-
identifier: Identifier
|
14
|
-
/** Schema resolution information */
|
15
|
-
resolution: SchemaResolution
|
16
|
-
/** DOM position for overlay placement */
|
17
|
-
position: DOMPosition
|
18
|
-
/** Navigation handler */
|
19
|
-
onNavigate: (url: string) => void
|
20
|
-
/** Whether to show debug visuals */
|
21
|
-
debug?: boolean
|
22
|
-
/** Whether this tooltip is open */
|
23
|
-
isOpen: boolean
|
24
|
-
/** Whether this tooltip is pinned */
|
25
|
-
isPinned: boolean
|
26
|
-
/** Handle hover start */
|
27
|
-
onHoverStart: () => void
|
28
|
-
/** Handle hover end */
|
29
|
-
onHoverEnd: () => void
|
30
|
-
/** Toggle pin state */
|
31
|
-
onTogglePin: () => void
|
32
|
-
/** Handle tooltip hover */
|
33
|
-
onTooltipHover: () => void
|
34
|
-
}
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Interactive overlay for a GraphQL identifier
|
38
|
-
*
|
39
|
-
* Renders an invisible clickable area over the identifier text
|
40
|
-
* with hover popovers and navigation to schema reference pages.
|
41
|
-
*/
|
42
|
-
export const IdentifierLink: React.FC<IdentifierLinkProps> = ({
|
43
|
-
identifier,
|
44
|
-
resolution,
|
45
|
-
position,
|
46
|
-
onNavigate,
|
47
|
-
debug = false,
|
48
|
-
isOpen,
|
49
|
-
isPinned,
|
50
|
-
onHoverStart,
|
51
|
-
onHoverEnd,
|
52
|
-
onTogglePin,
|
53
|
-
onTooltipHover,
|
54
|
-
}) => {
|
55
|
-
// Determine visual state
|
56
|
-
const isClickable = resolution.exists
|
57
|
-
const hasError = !resolution.exists && (identifier.kind === `Type` || identifier.kind === `Field`)
|
58
|
-
const isDeprecated = !!resolution.deprecated
|
59
|
-
|
60
|
-
// Build class names
|
61
|
-
const classNames = [
|
62
|
-
`graphql-identifier-overlay`,
|
63
|
-
`graphql-${identifier.kind.toLowerCase()}`,
|
64
|
-
isClickable && `graphql-clickable`,
|
65
|
-
hasError && `graphql-error`,
|
66
|
-
isDeprecated && `graphql-deprecated`,
|
67
|
-
isOpen && `graphql-hovered`,
|
68
|
-
isOpen && `graphql-tooltip-open`,
|
69
|
-
debug && `graphql-debug`,
|
70
|
-
].filter(Boolean).join(` `)
|
71
|
-
|
72
|
-
const handleClick = (e: React.MouseEvent) => {
|
73
|
-
e.preventDefault()
|
74
|
-
e.stopPropagation()
|
75
|
-
onTogglePin()
|
76
|
-
}
|
77
|
-
|
78
|
-
// Create trigger element
|
79
|
-
const triggerElement = isClickable
|
80
|
-
? (
|
81
|
-
<a
|
82
|
-
href={resolution.referenceUrl}
|
83
|
-
className={classNames + ` graphql-identifier-link`}
|
84
|
-
style={{
|
85
|
-
position: `absolute`,
|
86
|
-
top: position.top,
|
87
|
-
left: position.left,
|
88
|
-
width: position.width,
|
89
|
-
height: position.height,
|
90
|
-
cursor: `pointer`,
|
91
|
-
zIndex: 10,
|
92
|
-
pointerEvents: `auto`,
|
93
|
-
display: `block`,
|
94
|
-
textDecoration: `none`,
|
95
|
-
// Debug mode visual
|
96
|
-
...(debug && {
|
97
|
-
backgroundColor: hasError ? `rgba(239, 68, 68, 0.1)` : `rgba(59, 130, 246, 0.1)`,
|
98
|
-
border: `1px solid ${hasError ? `rgba(239, 68, 68, 0.3)` : `rgba(59, 130, 246, 0.3)`}`,
|
99
|
-
}),
|
100
|
-
}}
|
101
|
-
onClick={handleClick}
|
102
|
-
onMouseEnter={onHoverStart}
|
103
|
-
onMouseLeave={onHoverEnd}
|
104
|
-
aria-label={`${identifier.kind} ${identifier.name} - Click to view documentation`}
|
105
|
-
data-graphql-identifier={identifier.name}
|
106
|
-
data-graphql-kind={identifier.kind}
|
107
|
-
/>
|
108
|
-
)
|
109
|
-
: (
|
110
|
-
<div
|
111
|
-
className={classNames}
|
112
|
-
style={{
|
113
|
-
position: `absolute`,
|
114
|
-
top: position.top,
|
115
|
-
left: position.left,
|
116
|
-
width: position.width,
|
117
|
-
height: position.height,
|
118
|
-
cursor: `pointer`, // Make it clickable even for errors
|
119
|
-
zIndex: 10,
|
120
|
-
pointerEvents: `auto`,
|
121
|
-
// Debug mode visual
|
122
|
-
...(debug && {
|
123
|
-
backgroundColor: `rgba(239, 68, 68, 0.1)`,
|
124
|
-
border: `1px solid rgba(239, 68, 68, 0.3)`,
|
125
|
-
}),
|
126
|
-
}}
|
127
|
-
onClick={handleClick}
|
128
|
-
onMouseEnter={onHoverStart}
|
129
|
-
onMouseLeave={onHoverEnd}
|
130
|
-
role='button'
|
131
|
-
aria-label={`${identifier.kind} ${identifier.name} - Click to view information`}
|
132
|
-
data-graphql-identifier={identifier.name}
|
133
|
-
data-graphql-kind={identifier.kind}
|
134
|
-
/>
|
135
|
-
)
|
136
|
-
|
137
|
-
return (
|
138
|
-
<GraphQLIdentifierPopover
|
139
|
-
identifier={identifier}
|
140
|
-
documentation={resolution.documentation || {
|
141
|
-
description: hasError
|
142
|
-
? `${identifier.kind} "${identifier.name}" not found in schema. This ${identifier.kind.toLowerCase()} does not exist in the current GraphQL schema.`
|
143
|
-
: `${identifier.kind}: ${identifier.name}`,
|
144
|
-
typeInfo: identifier.kind,
|
145
|
-
}}
|
146
|
-
hasError={hasError}
|
147
|
-
referenceUrl={resolution.referenceUrl}
|
148
|
-
open={isOpen}
|
149
|
-
isPinned={isPinned}
|
150
|
-
onOpenChange={(open) => {
|
151
|
-
if (!open && isPinned) {
|
152
|
-
onTogglePin() // Unpin when closing
|
153
|
-
}
|
154
|
-
}}
|
155
|
-
onNavigate={isClickable ? onNavigate : undefined}
|
156
|
-
>
|
157
|
-
{triggerElement}
|
158
|
-
</GraphQLIdentifierPopover>
|
159
|
-
)
|
160
|
-
}
|
@@ -1,144 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Minimal styles for GraphQL Document interactive code blocks
|
3
|
-
*/
|
4
|
-
|
5
|
-
export const graphqlDocumentStyles = `
|
6
|
-
/* Container styles */
|
7
|
-
.graphql-document {
|
8
|
-
position: relative;
|
9
|
-
}
|
10
|
-
|
11
|
-
.graphql-interaction-layer {
|
12
|
-
position: absolute;
|
13
|
-
top: 0;
|
14
|
-
left: 0;
|
15
|
-
right: 0;
|
16
|
-
bottom: 0;
|
17
|
-
pointer-events: none;
|
18
|
-
}
|
19
|
-
|
20
|
-
.graphql-interaction-layer > * {
|
21
|
-
pointer-events: auto;
|
22
|
-
}
|
23
|
-
|
24
|
-
/* Identifier overlay styles */
|
25
|
-
.graphql-identifier-overlay {
|
26
|
-
transition: background-color 0.2s ease;
|
27
|
-
}
|
28
|
-
|
29
|
-
/* Clickable identifiers get visual feedback */
|
30
|
-
.graphql-identifier-overlay.graphql-clickable {
|
31
|
-
/* Subtle underline effect using box-shadow to not affect layout */
|
32
|
-
box-shadow: 0 1px 0 0 rgba(var(--accent-9), 0.3);
|
33
|
-
transition: box-shadow 0.2s ease, background-color 0.2s ease;
|
34
|
-
}
|
35
|
-
|
36
|
-
.graphql-identifier-overlay.graphql-clickable:hover {
|
37
|
-
background-color: rgba(var(--accent-3), 0.5);
|
38
|
-
box-shadow: 0 1px 0 0 rgba(var(--accent-9), 0.6);
|
39
|
-
}
|
40
|
-
|
41
|
-
/* Active/open state */
|
42
|
-
.graphql-identifier-overlay.graphql-tooltip-open {
|
43
|
-
background-color: rgba(var(--accent-3), 0.5);
|
44
|
-
box-shadow: 0 1px 0 0 var(--accent-9);
|
45
|
-
}
|
46
|
-
|
47
|
-
/* Error state */
|
48
|
-
.graphql-identifier-overlay.graphql-error {
|
49
|
-
box-shadow: 0 1.5px 0 0 var(--red-9);
|
50
|
-
}
|
51
|
-
|
52
|
-
.graphql-identifier-overlay.graphql-error:hover {
|
53
|
-
background-color: rgba(var(--red-3), 0.5);
|
54
|
-
}
|
55
|
-
|
56
|
-
/* Deprecated state */
|
57
|
-
.graphql-identifier-overlay.graphql-deprecated {
|
58
|
-
text-decoration: line-through;
|
59
|
-
opacity: 0.7;
|
60
|
-
}
|
61
|
-
|
62
|
-
/* Debug mode */
|
63
|
-
.graphql-identifier-overlay.graphql-debug {
|
64
|
-
background-color: rgba(59, 130, 246, 0.1) !important;
|
65
|
-
border: 1px solid rgba(59, 130, 246, 0.3) !important;
|
66
|
-
}
|
67
|
-
|
68
|
-
/* Kind-specific colors */
|
69
|
-
.graphql-identifier-overlay.graphql-type.graphql-clickable {
|
70
|
-
box-shadow: 0 1px 0 0 rgba(var(--blue-9), 0.3);
|
71
|
-
}
|
72
|
-
|
73
|
-
.graphql-identifier-overlay.graphql-field.graphql-clickable {
|
74
|
-
box-shadow: 0 1px 0 0 rgba(var(--green-9), 0.3);
|
75
|
-
}
|
76
|
-
|
77
|
-
.graphql-identifier-overlay.graphql-argument.graphql-clickable {
|
78
|
-
box-shadow: 0 1px 0 0 rgba(var(--orange-9), 0.3);
|
79
|
-
}
|
80
|
-
|
81
|
-
.graphql-identifier-overlay.graphql-variable {
|
82
|
-
box-shadow: 0 1px 0 0 rgba(var(--purple-9), 0.3);
|
83
|
-
}
|
84
|
-
|
85
|
-
.graphql-identifier-overlay.graphql-directive.graphql-clickable {
|
86
|
-
box-shadow: 0 1px 0 0 rgba(var(--amber-9), 0.3);
|
87
|
-
}
|
88
|
-
|
89
|
-
/* Popover animation */
|
90
|
-
.graphql-identifier-popover {
|
91
|
-
animation: graphql-popover-show 150ms ease-out;
|
92
|
-
}
|
93
|
-
|
94
|
-
@keyframes graphql-popover-show {
|
95
|
-
from {
|
96
|
-
opacity: 0;
|
97
|
-
transform: translateY(2px);
|
98
|
-
}
|
99
|
-
to {
|
100
|
-
opacity: 1;
|
101
|
-
transform: translateY(0);
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
/* Validation errors */
|
106
|
-
.graphql-validation-errors {
|
107
|
-
margin-top: 1rem;
|
108
|
-
padding: 0.5rem;
|
109
|
-
background-color: var(--red-2);
|
110
|
-
border: 1px solid var(--red-6);
|
111
|
-
border-radius: 4px;
|
112
|
-
}
|
113
|
-
|
114
|
-
.graphql-error {
|
115
|
-
color: var(--red-11);
|
116
|
-
font-size: 0.875rem;
|
117
|
-
margin: 0.25rem 0;
|
118
|
-
}
|
119
|
-
|
120
|
-
/* Loading state */
|
121
|
-
.graphql-document.graphql-loading {
|
122
|
-
opacity: 0.6;
|
123
|
-
pointer-events: none;
|
124
|
-
}
|
125
|
-
|
126
|
-
.graphql-document.graphql-loading::after {
|
127
|
-
content: '';
|
128
|
-
position: absolute;
|
129
|
-
top: 50%;
|
130
|
-
left: 50%;
|
131
|
-
width: 20px;
|
132
|
-
height: 20px;
|
133
|
-
margin: -10px 0 0 -10px;
|
134
|
-
border: 2px solid var(--gray-6);
|
135
|
-
border-top-color: var(--accent-9);
|
136
|
-
border-radius: 50%;
|
137
|
-
animation: graphql-spinner 0.8s linear infinite;
|
138
|
-
}
|
139
|
-
|
140
|
-
@keyframes graphql-spinner {
|
141
|
-
to {
|
142
|
-
transform: rotate(360deg);
|
143
|
-
}
|
144
|
-
}`
|
@@ -1,155 +0,0 @@
|
|
1
|
-
# GraphQL Document Component Demo
|
2
|
-
|
3
|
-
This page demonstrates the interactive GraphQL Document component that transforms static code blocks into rich, interactive documentation.
|
4
|
-
|
5
|
-
## Basic Query Example
|
6
|
-
|
7
|
-
Hover over the identifiers below to see type information and documentation. Click on types and fields to navigate to their reference pages.
|
8
|
-
|
9
|
-
```graphql
|
10
|
-
query GetUser($id: ID!) {
|
11
|
-
user(id: $id) {
|
12
|
-
id
|
13
|
-
name
|
14
|
-
email
|
15
|
-
posts(first: 10) {
|
16
|
-
id
|
17
|
-
title
|
18
|
-
content
|
19
|
-
author {
|
20
|
-
name
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
25
|
-
```
|
26
|
-
|
27
|
-
## Mutation Example
|
28
|
-
|
29
|
-
This mutation creates a new post. Notice how the component provides information about input types and return values.
|
30
|
-
|
31
|
-
```graphql
|
32
|
-
mutation CreatePost($input: CreatePostInput!) {
|
33
|
-
createPost(input: $input) {
|
34
|
-
id
|
35
|
-
title
|
36
|
-
content
|
37
|
-
createdAt
|
38
|
-
author {
|
39
|
-
id
|
40
|
-
name
|
41
|
-
}
|
42
|
-
}
|
43
|
-
}
|
44
|
-
```
|
45
|
-
|
46
|
-
## Subscription Example
|
47
|
-
|
48
|
-
Subscriptions work the same way - all GraphQL operations are fully interactive.
|
49
|
-
|
50
|
-
```graphql
|
51
|
-
subscription OnCommentAdded($postId: ID!) {
|
52
|
-
commentAdded(postId: $postId) {
|
53
|
-
id
|
54
|
-
content
|
55
|
-
author {
|
56
|
-
name
|
57
|
-
avatar
|
58
|
-
}
|
59
|
-
createdAt
|
60
|
-
}
|
61
|
-
}
|
62
|
-
```
|
63
|
-
|
64
|
-
## Fragment Example
|
65
|
-
|
66
|
-
Fragments are also supported with full type information and navigation.
|
67
|
-
|
68
|
-
```graphql
|
69
|
-
fragment UserInfo on User {
|
70
|
-
id
|
71
|
-
name
|
72
|
-
email
|
73
|
-
profile {
|
74
|
-
bio
|
75
|
-
avatar
|
76
|
-
website
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
query GetUserWithFragment($id: ID!) {
|
81
|
-
user(id: $id) {
|
82
|
-
...UserInfo
|
83
|
-
posts {
|
84
|
-
id
|
85
|
-
title
|
86
|
-
}
|
87
|
-
}
|
88
|
-
}
|
89
|
-
```
|
90
|
-
|
91
|
-
## Error Handling
|
92
|
-
|
93
|
-
The component validates GraphQL against the schema and highlights errors. Try hovering over the invalid field below:
|
94
|
-
|
95
|
-
```graphql
|
96
|
-
query InvalidQuery {
|
97
|
-
user {
|
98
|
-
nonExistentField
|
99
|
-
name
|
100
|
-
}
|
101
|
-
}
|
102
|
-
```
|
103
|
-
|
104
|
-
## Plain Mode
|
105
|
-
|
106
|
-
Sometimes you want to show GraphQL without interactivity. Use the `plain` option:
|
107
|
-
|
108
|
-
```graphql plain
|
109
|
-
query SimpleQuery {
|
110
|
-
users {
|
111
|
-
name
|
112
|
-
}
|
113
|
-
}
|
114
|
-
```
|
115
|
-
|
116
|
-
## Debug Mode
|
117
|
-
|
118
|
-
Enable debug mode to see the overlay boundaries:
|
119
|
-
|
120
|
-
```graphql debug
|
121
|
-
query DebugExample {
|
122
|
-
user {
|
123
|
-
id
|
124
|
-
name
|
125
|
-
}
|
126
|
-
}
|
127
|
-
```
|
128
|
-
|
129
|
-
## Features
|
130
|
-
|
131
|
-
The GraphQL Document component provides:
|
132
|
-
|
133
|
-
- **Interactive Navigation**: Click on any type or field to navigate to its reference documentation
|
134
|
-
- **Hover Tooltips**: See type information, descriptions, and deprecation warnings
|
135
|
-
- **Schema Validation**: Invalid queries are highlighted with error messages
|
136
|
-
- **Syntax Highlighting**: Beautiful syntax highlighting
|
137
|
-
- **Smart Positioning**: Tooltips automatically position themselves to stay within the viewport
|
138
|
-
- **Accessibility**: Full keyboard navigation and screen reader support
|
139
|
-
|
140
|
-
## Configuration Options
|
141
|
-
|
142
|
-
```graphql validate=false
|
143
|
-
# This query won't be validated at build time
|
144
|
-
query {
|
145
|
-
anything {
|
146
|
-
goes
|
147
|
-
}
|
148
|
-
}
|
149
|
-
```
|
150
|
-
|
151
|
-
Available options:
|
152
|
-
|
153
|
-
- `plain` - Disable all interactive features
|
154
|
-
- `debug` - Show overlay boundaries for debugging
|
155
|
-
- `validate=false` - Skip validation for this block
|
@@ -1,163 +0,0 @@
|
|
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
|
-
|
9
|
-
import { GraphQLDocument } from './$.js'
|
10
|
-
|
11
|
-
// Example GraphQL query with various constructs
|
12
|
-
const exampleQuery = `
|
13
|
-
query GetUserWithProjects($id: ID!, $limit: Int = 10) {
|
14
|
-
user(id: $id) {
|
15
|
-
name
|
16
|
-
projects(first: $limit) {
|
17
|
-
name
|
18
|
-
isPrivate
|
19
|
-
owner {
|
20
|
-
name
|
21
|
-
}
|
22
|
-
}
|
23
|
-
... on EnterpriseUser {
|
24
|
-
organization
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
fragment UserBasics on User {
|
30
|
-
name
|
31
|
-
email
|
32
|
-
role
|
33
|
-
}
|
34
|
-
`
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Demonstrate basic analysis
|
38
|
-
*/
|
39
|
-
export const analyzeExample = () => {
|
40
|
-
console.log(`🔍 Analyzing GraphQL Document...\n`)
|
41
|
-
|
42
|
-
const result = GraphQLDocument.analyze(exampleQuery)
|
43
|
-
|
44
|
-
console.log(`✅ Valid: ${result.isValid}`)
|
45
|
-
console.log(`📊 Total identifiers: ${result.identifiers.all.length}`)
|
46
|
-
console.log(`🚨 Errors: ${result.errors.length}\n`)
|
47
|
-
|
48
|
-
// Show identifiers by kind
|
49
|
-
for (const [kind, identifiers] of result.identifiers.byKind) {
|
50
|
-
console.log(`${getKindEmoji(kind)} ${kind} (${identifiers.length}):`)
|
51
|
-
for (const identifier of identifiers) {
|
52
|
-
const pos = `${identifier.position.line}:${identifier.position.column}`
|
53
|
-
const path = identifier.schemaPath.join(` → `)
|
54
|
-
const parent = identifier.parentType ? ` (in ${identifier.parentType})` : ``
|
55
|
-
console.log(` • ${identifier.name}${parent} → ${path} @ ${pos}`)
|
56
|
-
}
|
57
|
-
console.log()
|
58
|
-
}
|
59
|
-
|
60
|
-
return result
|
61
|
-
}
|
62
|
-
|
63
|
-
/**
|
64
|
-
* Demonstrate identifier lookup by position
|
65
|
-
*/
|
66
|
-
export const demonstratePositionLookup = () => {
|
67
|
-
console.log(`📍 Position-based Identifier Lookup...\n`)
|
68
|
-
|
69
|
-
const identifiers = GraphQLDocument.extractIdentifiers(exampleQuery)
|
70
|
-
|
71
|
-
// Find identifier at a specific position (e.g., cursor position in an editor)
|
72
|
-
const targetPosition = 180 // Approximate position of "abilities" field
|
73
|
-
|
74
|
-
// Find the closest identifier to this position
|
75
|
-
let closestIdentifier = null
|
76
|
-
let closestDistance = Infinity
|
77
|
-
|
78
|
-
for (const identifier of identifiers.all) {
|
79
|
-
const distance = Math.abs(identifier.position.start - targetPosition)
|
80
|
-
if (distance < closestDistance) {
|
81
|
-
closestDistance = distance
|
82
|
-
closestIdentifier = identifier
|
83
|
-
}
|
84
|
-
}
|
85
|
-
|
86
|
-
if (closestIdentifier) {
|
87
|
-
console.log(`🎯 Identifier near position ${targetPosition}:`)
|
88
|
-
console.log(` Name: ${closestIdentifier.name}`)
|
89
|
-
console.log(` Kind: ${closestIdentifier.kind}`)
|
90
|
-
console.log(` Schema Path: ${closestIdentifier.schemaPath.join(` → `)}`)
|
91
|
-
console.log(` Context: ${JSON.stringify(closestIdentifier.context, null, 2)}`)
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
/**
|
96
|
-
* Demonstrate how this enables hyperlink generation
|
97
|
-
*/
|
98
|
-
export const demonstrateHyperlinkGeneration = () => {
|
99
|
-
console.log(`🔗 Hyperlink Generation Preview...\n`)
|
100
|
-
|
101
|
-
const identifiers = GraphQLDocument.extractIdentifiers(exampleQuery)
|
102
|
-
|
103
|
-
// Show how each identifier could become a hyperlink
|
104
|
-
const typeIdentifiers = identifiers.byKind.get(`Type`) || []
|
105
|
-
const fieldIdentifiers = identifiers.byKind.get(`Field`) || []
|
106
|
-
|
107
|
-
console.log(`📝 Type References → Schema Links:`)
|
108
|
-
for (const identifier of typeIdentifiers) {
|
109
|
-
const referenceUrl = `/reference/${identifier.name}`
|
110
|
-
console.log(` ${identifier.name} → ${referenceUrl}`)
|
111
|
-
}
|
112
|
-
|
113
|
-
console.log(`\n📝 Field References → Schema Links:`)
|
114
|
-
for (const identifier of fieldIdentifiers.slice(0, 5)) { // Show first 5
|
115
|
-
const referenceUrl = identifier.parentType
|
116
|
-
? `/reference/${identifier.parentType}#${identifier.name}`
|
117
|
-
: `/reference/${identifier.name}`
|
118
|
-
console.log(` ${identifier.name} → ${referenceUrl}`)
|
119
|
-
}
|
120
|
-
}
|
121
|
-
|
122
|
-
/**
|
123
|
-
* Show the foundation for hover tooltips
|
124
|
-
*/
|
125
|
-
export const demonstrateTooltipFoundation = () => {
|
126
|
-
console.log(`💬 Tooltip Foundation...\n`)
|
127
|
-
|
128
|
-
const identifiers = GraphQLDocument.extractIdentifiers(exampleQuery)
|
129
|
-
|
130
|
-
// Show context information that would be displayed in tooltips
|
131
|
-
const fieldIdentifiers = identifiers.byKind.get(`Field`) || []
|
132
|
-
|
133
|
-
for (const identifier of fieldIdentifiers.slice(0, 3)) { // Show first 3
|
134
|
-
console.log(`🏷️ ${identifier.name}:`)
|
135
|
-
console.log(` Position: Line ${identifier.position.line}, Column ${identifier.position.column}`)
|
136
|
-
console.log(` Schema Path: ${identifier.schemaPath.join(` → `)}`)
|
137
|
-
console.log(` Parent Type: ${identifier.parentType || `Root`}`)
|
138
|
-
console.log(` Operation: ${identifier.context.operationType || `None`}`)
|
139
|
-
console.log(` Selection Path: ${identifier.context.selectionPath.join(` → `)}`)
|
140
|
-
console.log()
|
141
|
-
}
|
142
|
-
}
|
143
|
-
|
144
|
-
// Helper function
|
145
|
-
const getKindEmoji = (kind: string): string => {
|
146
|
-
const emojis: Record<string, string> = {
|
147
|
-
'Type': `🏷️`,
|
148
|
-
'Field': `📋`,
|
149
|
-
'Argument': `⚙️`,
|
150
|
-
'Variable': `💰`,
|
151
|
-
'Directive': `🎯`,
|
152
|
-
'Fragment': `🧩`,
|
153
|
-
}
|
154
|
-
return emojis[kind] || `❓`
|
155
|
-
}
|
156
|
-
|
157
|
-
// Run example if executed directly
|
158
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
159
|
-
analyzeExample()
|
160
|
-
demonstratePositionLookup()
|
161
|
-
demonstrateHyperlinkGeneration()
|
162
|
-
demonstrateTooltipFoundation()
|
163
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* GraphQL Document Component Library
|
3
|
-
*
|
4
|
-
* Transform static GraphQL code blocks into interactive documentation with
|
5
|
-
* hyperlinks, tooltips, and schema validation.
|
6
|
-
*
|
7
|
-
* ## Features
|
8
|
-
* - Hyperlinked identifiers that navigate to reference documentation
|
9
|
-
* - Hover tooltips showing type information and descriptions
|
10
|
-
* - Schema validation with error highlighting
|
11
|
-
* - Build-time GraphQL validation
|
12
|
-
* - Support for all GraphQL operations (queries, mutations, subscriptions, fragments)
|
13
|
-
*
|
14
|
-
* ## Usage
|
15
|
-
* ```typescript
|
16
|
-
* import { GraphQLDocument } from 'polen/lib/graphql-document'
|
17
|
-
*
|
18
|
-
* <GraphQLDocument schema={schema}>
|
19
|
-
* {`query { user { name } }`}
|
20
|
-
* </GraphQLDocument>
|
21
|
-
* ```
|
22
|
-
*
|
23
|
-
* @see {@link GraphQLDocumentWithSchema} for MDX integration
|
24
|
-
* @see {@link GraphQLDocument} for the main React component
|
25
|
-
*/
|
26
|
-
|
27
|
-
export * from './analysis.js'
|
28
|
-
export * from './components/index.js'
|
29
|
-
export * from './positioning-simple.js'
|
30
|
-
export * from './schema-integration.js'
|
31
|
-
export * from './types.js'
|
32
|
-
|
33
|
-
// Re-export key functions for convenience
|
34
|
-
export { analyze, analyzer, extractIdentifiers } from './analysis.js'
|
35
|
-
export { GraphQLDocument } from './components/GraphQLDocument.js'
|
36
|
-
export { createSimpleOverlay, createSimplePositionCalculator } from './positioning-simple.js'
|
37
|
-
export { analyzeWithSchema, createPolenSchemaResolver } from './schema-integration.js'
|