polen 0.10.0-next.12 → 0.10.0-next.14
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/vite/plugins/build.d.ts.map +1 -1
- package/build/api/vite/plugins/build.js +11 -3
- 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 +12 -10
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/pages.d.ts.map +1 -1
- package/build/api/vite/plugins/pages.js +6 -7
- package/build/api/vite/plugins/pages.js.map +1 -1
- package/build/api/vite/plugins/serve.d.ts.map +1 -1
- package/build/api/vite/plugins/serve.js +47 -7
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/lib/file-router/diagnostic-reporter.js +2 -2
- package/build/lib/file-router/diagnostic-reporter.js.map +1 -1
- 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 +0 -4
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +52 -83
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +1 -1
- 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 +15 -13
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +1 -1
- package/build/lib/graphql-document/components/IdentifierLink.js +51 -117
- package/build/lib/graphql-document/components/IdentifierLink.js.map +1 -1
- 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 +2 -1
- package/build/lib/graphql-document/components/index.d.ts.map +1 -1
- package/build/lib/graphql-document/components/index.js +2 -1
- package/build/lib/graphql-document/components/index.js.map +1 -1
- 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 +0 -5
- package/build/lib/graphql-document/positioning-simple.d.ts.map +1 -1
- package/build/lib/graphql-document/positioning-simple.js +78 -90
- package/build/lib/graphql-document/positioning-simple.js.map +1 -1
- package/build/lib/kit-temp.d.ts +103 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +236 -2
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.d.ts +1 -8
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.d.ts.map +1 -1
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.js +48 -53
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.js.map +1 -1
- package/build/package-paths.js +3 -3
- package/build/package-paths.js.map +1 -1
- package/build/template/components/Link.d.ts +1 -1
- package/build/template/components/Link.d.ts.map +1 -1
- package/build/template/components/Link.js +14 -5
- package/build/template/components/Link.js.map +1 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts.map +1 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.js +0 -3
- package/build/template/components/content/GraphQLDocumentWithSchema.js.map +1 -1
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts.map +1 -1
- package/build/template/components/content/GraphQLDocumentWrapper.js +8 -7
- package/build/template/components/content/GraphQLDocumentWrapper.js.map +1 -1
- package/build/template/components/sidebar/SidebarItem.js +2 -2
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/entry.client.js +0 -3
- package/build/template/entry.client.js.map +1 -1
- package/build/template/hooks/useClientOnly.d.ts +9 -0
- package/build/template/hooks/useClientOnly.d.ts.map +1 -0
- package/build/template/hooks/useClientOnly.js +16 -0
- package/build/template/hooks/useClientOnly.js.map +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +2 -150
- package/build/template/routes/root.js.map +1 -1
- package/build/template/server/app.d.ts +8 -1
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +21 -21
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/create-page-html-response.d.ts +7 -0
- package/build/template/server/create-page-html-response.d.ts.map +1 -0
- package/build/template/server/{render-page.js → create-page-html-response.js} +11 -16
- package/build/template/server/create-page-html-response.js.map +1 -0
- package/build/template/server/main.js +2 -1
- package/build/template/server/main.js.map +1 -1
- package/build/template/server/middleware/page.d.ts +4 -0
- package/build/template/server/middleware/page.d.ts.map +1 -0
- package/build/template/server/middleware/page.js +15 -0
- package/build/template/server/middleware/page.js.map +1 -0
- package/build/template/server/middleware/unsupported-assets.d.ts +10 -0
- package/build/template/server/middleware/unsupported-assets.d.ts.map +1 -0
- package/build/template/server/middleware/unsupported-assets.js +21 -0
- package/build/template/server/middleware/unsupported-assets.js.map +1 -0
- package/build/template/server/ssg/generate.d.ts.map +1 -1
- package/build/template/server/ssg/generate.js +33 -34
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/styles/code-block.css +218 -0
- package/package.json +4 -2
- package/src/api/singletons/markdown/markdown.test.ts +1 -1
- package/src/api/vite/plugins/build.ts +97 -89
- package/src/api/vite/plugins/core.ts +15 -10
- package/src/api/vite/plugins/pages.ts +9 -7
- package/src/api/vite/plugins/serve.ts +62 -9
- package/src/lib/file-router/diagnostic-reporter.ts +2 -2
- package/src/lib/graphql-document/components/CopyButton.tsx +76 -0
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +73 -95
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +197 -0
- package/src/lib/graphql-document/components/IdentifierLink.tsx +105 -166
- package/src/lib/graphql-document/components/graphql-document-styles.ts +167 -0
- package/src/lib/graphql-document/components/index.ts +2 -1
- 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 +18 -22
- package/src/lib/graphql-document/positioning-simple.ts +97 -108
- package/src/lib/kit-temp.test.ts +15 -3
- package/src/lib/kit-temp.ts +304 -4
- package/src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts +52 -58
- package/src/package-paths.ts +3 -3
- package/src/template/components/Link.tsx +20 -12
- package/src/template/components/content/GraphQLDocumentWithSchema.tsx +0 -5
- package/src/template/components/content/GraphQLDocumentWrapper.tsx +14 -7
- package/src/template/components/sidebar/SidebarItem.tsx +2 -2
- package/src/template/entry.client.tsx +0 -3
- package/src/template/hooks/useClientOnly.ts +21 -0
- package/src/template/routes/root.tsx +0 -159
- package/src/template/server/app.ts +33 -23
- package/src/template/server/{render-page.tsx → create-page-html-response.ts} +19 -16
- package/src/template/server/main.ts +2 -1
- package/src/template/server/middleware/page.ts +19 -0
- package/src/template/server/middleware/unsupported-assets.ts +25 -0
- package/src/template/server/ssg/generate.ts +68 -72
- package/build/lib/graphql-document/components/HoverTooltip.d.ts +0 -35
- package/build/lib/graphql-document/components/HoverTooltip.d.ts.map +0 -1
- package/build/lib/graphql-document/components/HoverTooltip.js +0 -132
- package/build/lib/graphql-document/components/HoverTooltip.js.map +0 -1
- package/build/template/server/render-page.d.ts +0 -3
- package/build/template/server/render-page.d.ts.map +0 -1
- package/build/template/server/render-page.js.map +0 -1
- package/src/lib/graphql-document/components/HoverTooltip.tsx +0 -282
@@ -1,12 +1,13 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import {
|
2
|
+
import { React as ReactHooks } from '#dep/react/index';
|
3
3
|
import { useNavigate } from 'react-router';
|
4
4
|
import { analyze } from "../analysis.js";
|
5
|
+
import { useTooltipState } from "../hooks/use-tooltip-state.js";
|
5
6
|
import { createSimplePositionCalculator } from "../positioning-simple.js";
|
6
7
|
import { createPolenSchemaResolver } from "../schema-integration.js";
|
7
|
-
import {
|
8
|
+
import { CopyButton } from "./CopyButton.js";
|
9
|
+
import { graphqlDocumentStyles } from "./graphql-document-styles.js";
|
8
10
|
import { IdentifierLink } from "./IdentifierLink.js";
|
9
|
-
import { identifierLinkStyles } from "./IdentifierLink.js";
|
10
11
|
/**
|
11
12
|
* Interactive GraphQL document component
|
12
13
|
*
|
@@ -18,44 +19,41 @@ export const GraphQLDocument = ({ children, schema, options = {}, highlightedHtm
|
|
18
19
|
const navigate = useNavigate();
|
19
20
|
const handleNavigate = onNavigate || ((url) => navigate(url));
|
20
21
|
// Container ref for positioning calculations
|
21
|
-
const containerRef = useRef(null);
|
22
|
-
const [isReady, setIsReady] = useState(false);
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
if (
|
33
|
-
|
34
|
-
return;
|
22
|
+
const containerRef = ReactHooks.useRef(null);
|
23
|
+
const [isReady, setIsReady] = ReactHooks.useState(false);
|
24
|
+
// Use tooltip state management
|
25
|
+
const tooltipState = useTooltipState({
|
26
|
+
showDelay: 300,
|
27
|
+
hideDelay: 200, // Increased for smoother experience
|
28
|
+
allowMultiplePins: true,
|
29
|
+
});
|
30
|
+
// Handle escape key to unpin all
|
31
|
+
ReactHooks.useEffect(() => {
|
32
|
+
const handleKeyDown = (event) => {
|
33
|
+
if (event.key === 'Escape') {
|
34
|
+
tooltipState.unpinAll();
|
35
35
|
}
|
36
|
-
// Close the tooltip
|
37
|
-
setOpenTooltipId(null);
|
38
36
|
};
|
39
|
-
|
40
|
-
document.addEventListener('mousedown', handleClickOutside);
|
37
|
+
document.addEventListener('keydown', handleKeyDown);
|
41
38
|
return () => {
|
42
|
-
document.removeEventListener('
|
39
|
+
document.removeEventListener('keydown', handleKeyDown);
|
43
40
|
};
|
44
|
-
}, [
|
41
|
+
}, [tooltipState]);
|
45
42
|
// Layer 1: Parse and analyze
|
46
|
-
const analysisResult = useMemo(() => {
|
43
|
+
const analysisResult = ReactHooks.useMemo(() => {
|
47
44
|
if (plain)
|
48
45
|
return null;
|
49
46
|
const result = analyze(children, { schema });
|
47
|
+
// Debug logging handled by debug prop
|
50
48
|
return result;
|
51
|
-
}, [children, plain, schema]);
|
49
|
+
}, [children, plain, schema, debug]);
|
52
50
|
// Layer 2: Schema resolution
|
53
|
-
const resolver = useMemo(() => {
|
51
|
+
const resolver = ReactHooks.useMemo(() => {
|
54
52
|
if (!schema || plain)
|
55
53
|
return null;
|
56
54
|
return createPolenSchemaResolver(schema);
|
57
55
|
}, [schema, plain]);
|
58
|
-
const resolutions = useMemo(() => {
|
56
|
+
const resolutions = ReactHooks.useMemo(() => {
|
59
57
|
if (!analysisResult || !resolver) {
|
60
58
|
return new Map();
|
61
59
|
}
|
@@ -69,15 +67,16 @@ export const GraphQLDocument = ({ children, schema, options = {}, highlightedHtm
|
|
69
67
|
return results;
|
70
68
|
}, [analysisResult, resolver]);
|
71
69
|
// Layer 3: Position calculation
|
72
|
-
const positionCalculator = useMemo(() => {
|
70
|
+
const positionCalculator = ReactHooks.useMemo(() => {
|
73
71
|
if (plain)
|
74
72
|
return null;
|
75
73
|
return createSimplePositionCalculator();
|
76
74
|
}, [plain]);
|
77
|
-
const [positions, setPositions] = useState(new Map());
|
75
|
+
const [positions, setPositions] = ReactHooks.useState(new Map());
|
78
76
|
// Prepare code block and calculate positions after render
|
79
|
-
useEffect(() => {
|
77
|
+
ReactHooks.useEffect(() => {
|
80
78
|
if (!containerRef.current || !analysisResult || !positionCalculator || plain) {
|
79
|
+
// Skip position calculation - debug handled by debug prop
|
81
80
|
return;
|
82
81
|
}
|
83
82
|
// Get the code element within the container
|
@@ -85,89 +84,59 @@ export const GraphQLDocument = ({ children, schema, options = {}, highlightedHtm
|
|
85
84
|
|| containerRef.current.querySelector('pre code')
|
86
85
|
|| containerRef.current.querySelector('code');
|
87
86
|
if (!codeElement) {
|
87
|
+
// No code element found - skip
|
88
88
|
return;
|
89
89
|
}
|
90
90
|
// Prepare the code block (wrap identifiers)
|
91
91
|
const identifiers = Array.from(analysisResult.identifiers.byPosition.values());
|
92
|
+
// Prepare code block with identifiers
|
92
93
|
positionCalculator.prepareCodeBlock(codeElement, identifiers);
|
93
94
|
// Get positions after DOM update
|
94
95
|
requestAnimationFrame(() => {
|
95
96
|
// Pass containerRef.current as the reference element for positioning
|
96
97
|
if (containerRef.current) {
|
97
98
|
const newPositions = positionCalculator.getIdentifierPositions(codeElement, containerRef.current);
|
99
|
+
// Position calculation complete
|
98
100
|
setPositions(newPositions);
|
99
101
|
setIsReady(true);
|
100
102
|
}
|
101
103
|
});
|
102
104
|
}, [analysisResult, positionCalculator, plain, highlightedHtml]);
|
103
|
-
// Handle resize events
|
104
|
-
useEffect(() => {
|
105
|
+
// Handle resize events with debouncing
|
106
|
+
ReactHooks.useEffect(() => {
|
105
107
|
if (!containerRef.current || !positionCalculator || plain)
|
106
108
|
return;
|
109
|
+
let resizeTimer;
|
107
110
|
const handleResize = () => {
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
clearTimeout(resizeTimer);
|
112
|
+
resizeTimer = setTimeout(() => {
|
113
|
+
const codeElement = containerRef.current?.querySelector('pre.shiki code')
|
114
|
+
|| containerRef.current?.querySelector('pre code')
|
115
|
+
|| containerRef.current?.querySelector('code');
|
116
|
+
if (codeElement && containerRef.current) {
|
117
|
+
const newPositions = positionCalculator.getIdentifierPositions(codeElement, containerRef.current);
|
118
|
+
setPositions(newPositions);
|
119
|
+
}
|
120
|
+
}, 100); // Debounce resize events
|
115
121
|
};
|
116
122
|
window.addEventListener('resize', handleResize);
|
117
|
-
return () =>
|
123
|
+
return () => {
|
124
|
+
clearTimeout(resizeTimer);
|
125
|
+
window.removeEventListener('resize', handleResize);
|
126
|
+
};
|
118
127
|
}, [positionCalculator, plain]);
|
119
128
|
// Validation errors
|
120
|
-
const validationErrors = useMemo(() => {
|
129
|
+
const validationErrors = ReactHooks.useMemo(() => {
|
121
130
|
if (!validate || !analysisResult || !schema)
|
122
131
|
return [];
|
123
132
|
return analysisResult.errors;
|
124
133
|
}, [validate, analysisResult, schema]);
|
125
|
-
return (_jsxs(_Fragment, { children: [_jsx("style", { dangerouslySetInnerHTML: { __html:
|
134
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { dangerouslySetInnerHTML: { __html: graphqlDocumentStyles } }), _jsxs("div", { ref: containerRef, className: `graphql-document ${className} ${debug ? 'graphql-debug-mode' : ''} ${!isReady && !plain ? 'graphql-loading' : ''}`, children: [highlightedHtml ? _jsx("div", { dangerouslySetInnerHTML: { __html: highlightedHtml } }) : (_jsx("pre", { className: 'shiki', children: _jsx("code", { children: children }) })), !plain && (_jsx(CopyButton, { text: children, className: 'graphql-document-copy', size: '2' })), !plain && isReady && (_jsx("div", { className: 'graphql-interaction-layer', style: { pointerEvents: 'none' }, children: Array.from(positions.entries()).map(([id, { position, identifier }]) => {
|
126
135
|
const startPos = identifier.position.start;
|
127
136
|
const resolution = resolutions.get(startPos);
|
128
137
|
if (!resolution)
|
129
138
|
return null;
|
130
|
-
return (_jsx(IdentifierLink, { identifier: identifier, resolution: resolution, position: position, onNavigate: handleNavigate, debug: debug, isOpen:
|
139
|
+
return (_jsx(IdentifierLink, { identifier: identifier, resolution: resolution, position: position, onNavigate: handleNavigate, debug: debug, isOpen: tooltipState.isOpen(id), isPinned: tooltipState.isPinned(id), onHoverStart: () => tooltipState.onHoverStart(id), onHoverEnd: () => tooltipState.onHoverEnd(id), onTogglePin: () => tooltipState.onTogglePin(id), onTooltipHover: () => tooltipState.onTooltipHover(id) }, id));
|
131
140
|
}) })), validationErrors.length > 0 && (_jsx("div", { className: 'graphql-validation-errors', children: validationErrors.map((error, index) => (_jsx("div", { className: 'graphql-error', children: error.message }, index))) }))] })] }));
|
132
141
|
};
|
133
|
-
/**
|
134
|
-
* Default styles for the GraphQL document component
|
135
|
-
*/
|
136
|
-
export const graphqlDocumentStyles = `
|
137
|
-
.graphql-document {
|
138
|
-
position: relative;
|
139
|
-
}
|
140
|
-
|
141
|
-
.graphql-interaction-layer {
|
142
|
-
position: absolute;
|
143
|
-
top: 0;
|
144
|
-
left: 0;
|
145
|
-
right: 0;
|
146
|
-
bottom: 0;
|
147
|
-
pointer-events: none;
|
148
|
-
}
|
149
|
-
|
150
|
-
.graphql-interaction-layer > * {
|
151
|
-
pointer-events: auto;
|
152
|
-
}
|
153
|
-
|
154
|
-
.graphql-validation-errors {
|
155
|
-
margin-top: 1rem;
|
156
|
-
padding: 0.5rem;
|
157
|
-
background-color: var(--red-2);
|
158
|
-
border: 1px solid var(--red-6);
|
159
|
-
border-radius: 4px;
|
160
|
-
}
|
161
|
-
|
162
|
-
.graphql-error {
|
163
|
-
color: var(--red-11);
|
164
|
-
font-size: 0.875rem;
|
165
|
-
margin: 0.25rem 0;
|
166
|
-
}
|
167
|
-
|
168
|
-
.graphql-debug-mode [data-graphql-id] {
|
169
|
-
background-color: rgba(59, 130, 246, 0.1);
|
170
|
-
outline: 1px solid rgba(59, 130, 246, 0.3);
|
171
|
-
}
|
172
|
-
`;
|
173
142
|
//# sourceMappingURL=GraphQLDocument.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GraphQLDocument.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/GraphQLDocument.tsx"],"names":[],"mappings":";
|
1
|
+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C,CAAC,KAAU,EAAE,KAAa,EAAE,EAAE,CAAC,CACnD,cAAiB,SAAS,EAAC,eAAe,YACvC,KAAK,CAAC,OAAO,IADN,KAAK,CAET,CACP,CAAC,GACE,CACP,IACG,IACL,CACJ,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":";AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAyB1F;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA4C,CAAC,EAChF,UAAU,EACV,aAAa,EACb,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,GACT,EAAE,EAAE;IACH,iDAAiD;IACjD,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;YACxB,KAAK,MAAM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AE,KAAK;gCACd,eAAe,EAAE,cAAc;gCAC/B,YAAY,EAAE,KAAK;gCACnB,MAAM,EAAE,wBAAwB;6BACjC,YAED,MAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,KAAK,EAAC,KAAK,wBACrB,UAAU,CAAC,IAAI,4BACb,GACH,CACP,EAGD,KAAC,GAAG,cACF,MAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,KAAK,EAAC,MAAM,uBAClB,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IACnC,GACH,EAGL,UAAU,IAAI,CAAC,QAAQ,IAAI,CAC1B,KAAC,GAAG,cACF,KAAC,IAAI,IACH,IAAI,EAAC,GAAG,EACR,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,CAAC,CAAmB,EAAE,EAAE;oCAC/B,CAAC,CAAC,cAAc,EAAE,CAAA;oCAClB,UAAU,CAAC,YAAY,CAAC,CAAA;oCACxB,YAAY,CAAC,KAAK,CAAC,CAAA;gCACrB,CAAC,+CAGI,GACH,CACP,IACI,GACS,IACL,CAChB,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,10 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* Interactive overlay for GraphQL identifiers
|
3
|
+
*/
|
1
4
|
import type { React } from '#dep/react/index';
|
2
5
|
import type { DOMPosition } from '../positioning-simple.ts';
|
3
6
|
import type { SchemaResolution } from '../schema-integration.ts';
|
4
7
|
import type { Identifier } from '../types.ts';
|
5
|
-
/**
|
6
|
-
* Props for the IdentifierLink component
|
7
|
-
*/
|
8
8
|
export interface IdentifierLinkProps {
|
9
9
|
/** The GraphQL identifier */
|
10
10
|
identifier: Identifier;
|
@@ -17,21 +17,23 @@ export interface IdentifierLinkProps {
|
|
17
17
|
/** Whether to show debug visuals */
|
18
18
|
debug?: boolean;
|
19
19
|
/** Whether this tooltip is open */
|
20
|
-
isOpen
|
21
|
-
/**
|
22
|
-
|
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;
|
23
31
|
}
|
24
32
|
/**
|
25
33
|
* Interactive overlay for a GraphQL identifier
|
26
34
|
*
|
27
35
|
* Renders an invisible clickable area over the identifier text
|
28
|
-
* with hover
|
36
|
+
* with hover popovers and navigation to schema reference pages.
|
29
37
|
*/
|
30
38
|
export declare const IdentifierLink: React.FC<IdentifierLinkProps>;
|
31
|
-
/**
|
32
|
-
* Default styles for identifier overlays
|
33
|
-
*
|
34
|
-
* These can be included in the document or overridden by custom styles.
|
35
|
-
*/
|
36
|
-
export declare const identifierLinkStyles = "\n.graphql-identifier-overlay {\n /* Base styles for all overlays */\n transition: background-color 0.2s ease;\n}\n\n.graphql-identifier-overlay.graphql-clickable:hover {\n /* Subtle highlight on hover for clickable identifiers */\n background-color: rgba(59, 130, 246, 0.05);\n}\n\n.graphql-identifier-overlay.graphql-error {\n /* Error indicator */\n border-bottom: 2px wavy red;\n}\n\n.graphql-identifier-overlay.graphql-deprecated {\n /* Deprecated indicator */\n text-decoration: line-through;\n opacity: 0.7;\n}\n\n.graphql-identifier-overlay.graphql-debug {\n /* Debug mode makes overlays visible */\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 styles */\n.graphql-identifier-overlay.graphql-type {\n /* Type identifiers */\n}\n\n.graphql-identifier-overlay.graphql-field {\n /* Field identifiers */\n}\n\n.graphql-identifier-overlay.graphql-argument {\n /* Argument identifiers */\n font-style: italic;\n}\n\n.graphql-identifier-overlay.graphql-variable {\n /* Variable identifiers */\n color: var(--purple-11);\n}\n\n.graphql-identifier-overlay.graphql-directive {\n /* Directive identifiers */\n color: var(--amber-11);\n}\n";
|
37
39
|
//# sourceMappingURL=IdentifierLink.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IdentifierLink.d.ts","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/IdentifierLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;
|
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"}
|
@@ -1,19 +1,12 @@
|
|
1
|
-
import { jsx as _jsx
|
2
|
-
import {
|
3
|
-
import { HoverTooltip } from "./HoverTooltip.js";
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { GraphQLIdentifierPopover } from "./GraphQLIdentifierPopover.js";
|
4
3
|
/**
|
5
4
|
* Interactive overlay for a GraphQL identifier
|
6
5
|
*
|
7
6
|
* Renders an invisible clickable area over the identifier text
|
8
|
-
* with hover
|
7
|
+
* with hover popovers and navigation to schema reference pages.
|
9
8
|
*/
|
10
|
-
export const IdentifierLink = ({ identifier, resolution, position, onNavigate, debug = false, isOpen
|
11
|
-
const [isHovered, setIsHovered] = useState(false);
|
12
|
-
// Use external state if provided, otherwise manage locally
|
13
|
-
const showTooltip = isOpen;
|
14
|
-
const setShowTooltip = (show) => {
|
15
|
-
onToggle?.(show);
|
16
|
-
};
|
9
|
+
export const IdentifierLink = ({ identifier, resolution, position, onNavigate, debug = false, isOpen, isPinned, onHoverStart, onHoverEnd, onTogglePin, onTooltipHover, }) => {
|
17
10
|
// Determine visual state
|
18
11
|
const isClickable = resolution.exists;
|
19
12
|
const hasError = !resolution.exists && (identifier.kind === 'Type' || identifier.kind === 'Field');
|
@@ -25,117 +18,58 @@ export const IdentifierLink = ({ identifier, resolution, position, onNavigate, d
|
|
25
18
|
isClickable && 'graphql-clickable',
|
26
19
|
hasError && 'graphql-error',
|
27
20
|
isDeprecated && 'graphql-deprecated',
|
28
|
-
|
29
|
-
|
21
|
+
isOpen && 'graphql-hovered',
|
22
|
+
isOpen && 'graphql-tooltip-open',
|
30
23
|
debug && 'graphql-debug',
|
31
24
|
].filter(Boolean).join(' ');
|
32
25
|
const handleClick = (e) => {
|
33
26
|
e.preventDefault();
|
34
27
|
e.stopPropagation();
|
35
|
-
|
36
|
-
setShowTooltip(!showTooltip);
|
37
|
-
};
|
38
|
-
const handleNavigate = (e) => {
|
39
|
-
e.preventDefault();
|
40
|
-
e.stopPropagation();
|
41
|
-
if (isClickable) {
|
42
|
-
onNavigate(resolution.referenceUrl);
|
43
|
-
}
|
28
|
+
onTogglePin();
|
44
29
|
};
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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 }));
|
83
74
|
};
|
84
|
-
/**
|
85
|
-
* Default styles for identifier overlays
|
86
|
-
*
|
87
|
-
* These can be included in the document or overridden by custom styles.
|
88
|
-
*/
|
89
|
-
export const identifierLinkStyles = `
|
90
|
-
.graphql-identifier-overlay {
|
91
|
-
/* Base styles for all overlays */
|
92
|
-
transition: background-color 0.2s ease;
|
93
|
-
}
|
94
|
-
|
95
|
-
.graphql-identifier-overlay.graphql-clickable:hover {
|
96
|
-
/* Subtle highlight on hover for clickable identifiers */
|
97
|
-
background-color: rgba(59, 130, 246, 0.05);
|
98
|
-
}
|
99
|
-
|
100
|
-
.graphql-identifier-overlay.graphql-error {
|
101
|
-
/* Error indicator */
|
102
|
-
border-bottom: 2px wavy red;
|
103
|
-
}
|
104
|
-
|
105
|
-
.graphql-identifier-overlay.graphql-deprecated {
|
106
|
-
/* Deprecated indicator */
|
107
|
-
text-decoration: line-through;
|
108
|
-
opacity: 0.7;
|
109
|
-
}
|
110
|
-
|
111
|
-
.graphql-identifier-overlay.graphql-debug {
|
112
|
-
/* Debug mode makes overlays visible */
|
113
|
-
background-color: rgba(59, 130, 246, 0.1) !important;
|
114
|
-
border: 1px solid rgba(59, 130, 246, 0.3) !important;
|
115
|
-
}
|
116
|
-
|
117
|
-
/* Kind-specific styles */
|
118
|
-
.graphql-identifier-overlay.graphql-type {
|
119
|
-
/* Type identifiers */
|
120
|
-
}
|
121
|
-
|
122
|
-
.graphql-identifier-overlay.graphql-field {
|
123
|
-
/* Field identifiers */
|
124
|
-
}
|
125
|
-
|
126
|
-
.graphql-identifier-overlay.graphql-argument {
|
127
|
-
/* Argument identifiers */
|
128
|
-
font-style: italic;
|
129
|
-
}
|
130
|
-
|
131
|
-
.graphql-identifier-overlay.graphql-variable {
|
132
|
-
/* Variable identifiers */
|
133
|
-
color: var(--purple-11);
|
134
|
-
}
|
135
|
-
|
136
|
-
.graphql-identifier-overlay.graphql-directive {
|
137
|
-
/* Directive identifiers */
|
138
|
-
color: var(--amber-11);
|
139
|
-
}
|
140
|
-
`;
|
141
75
|
//# sourceMappingURL=IdentifierLink.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IdentifierLink.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/IdentifierLink.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"IdentifierLink.js","sourceRoot":"","sources":["../../../../src/lib/graphql-document/components/IdentifierLink.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAAgC,CAAA;AA2BzE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC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