polen 0.11.0-next.11 → 0.11.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/iso/schema/$$.d.ts +1 -0
- package/build/api/iso/schema/$$.d.ts.map +1 -1
- package/build/api/iso/schema/$$.js +1 -0
- package/build/api/iso/schema/$$.js.map +1 -1
- package/build/api/iso/schema/routing.d.ts +34 -0
- package/build/api/iso/schema/routing.d.ts.map +1 -1
- package/build/api/iso/schema/routing.js +58 -0
- package/build/api/iso/schema/routing.js.map +1 -1
- package/build/api/iso/schema/validation.d.ts +32 -0
- package/build/api/iso/schema/validation.d.ts.map +1 -0
- package/build/api/iso/schema/validation.js +101 -0
- package/build/api/iso/schema/validation.js.map +1 -0
- package/build/template/components/ArgumentList.d.ts +3 -4
- package/build/template/components/ArgumentList.d.ts.map +1 -1
- package/build/template/components/ArgumentList.js.map +1 -1
- package/build/template/components/Changelog.js +2 -2
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/DeprecationReason.d.ts +2 -2
- package/build/template/components/DeprecationReason.d.ts.map +1 -1
- package/build/template/components/DeprecationReason.js.map +1 -1
- package/build/template/components/Description.d.ts +2 -2
- package/build/template/components/Description.d.ts.map +1 -1
- package/build/template/components/Description.js.map +1 -1
- package/build/template/components/Field.d.ts +3 -4
- package/build/template/components/Field.d.ts.map +1 -1
- package/build/template/components/Field.js.map +1 -1
- package/build/template/components/FieldListSection.d.ts +3 -4
- package/build/template/components/FieldListSection.d.ts.map +1 -1
- package/build/template/components/FieldListSection.js.map +1 -1
- package/build/template/components/MissingSchema.d.ts +2 -1
- package/build/template/components/MissingSchema.d.ts.map +1 -1
- package/build/template/components/MissingSchema.js.map +1 -1
- package/build/template/components/ReferenceLink.d.ts +9 -11
- package/build/template/components/ReferenceLink.d.ts.map +1 -1
- package/build/template/components/ReferenceLink.js.map +1 -1
- package/build/template/components/ToastContainer.d.ts +3 -0
- package/build/template/components/ToastContainer.d.ts.map +1 -0
- package/build/template/components/ToastContainer.js +44 -0
- package/build/template/components/ToastContainer.js.map +1 -0
- package/build/template/components/ToastItem.d.ts +7 -0
- package/build/template/components/ToastItem.d.ts.map +1 -0
- package/build/template/components/ToastItem.js +48 -0
- package/build/template/components/ToastItem.js.map +1 -0
- package/build/template/components/TypeAnnotation.d.ts +4 -5
- package/build/template/components/TypeAnnotation.d.ts.map +1 -1
- package/build/template/components/TypeAnnotation.js.map +1 -1
- package/build/template/components/VersionPicker.d.ts +8 -0
- package/build/template/components/VersionPicker.d.ts.map +1 -0
- package/build/template/components/VersionPicker.js +66 -0
- package/build/template/components/VersionPicker.js.map +1 -0
- package/build/template/hooks/useReferencePath.d.ts +9 -0
- package/build/template/hooks/useReferencePath.d.ts.map +1 -0
- package/build/template/hooks/useReferencePath.js +18 -0
- package/build/template/hooks/useReferencePath.js.map +1 -0
- package/build/template/routes/reference.d.ts +24 -8
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +47 -53
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/root.d.ts +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +16 -5
- package/build/template/routes/root.js.map +1 -1
- package/build/template/stores/$$.d.ts +13 -0
- package/build/template/stores/$$.d.ts.map +1 -0
- package/build/template/stores/$$.js +5 -0
- package/build/template/stores/$$.js.map +1 -0
- package/build/template/stores/$.d.ts +2 -0
- package/build/template/stores/$.d.ts.map +1 -0
- package/build/template/stores/$.js +2 -0
- package/build/template/stores/$.js.map +1 -0
- package/build/template/stores/schema.d.ts +40 -0
- package/build/template/stores/schema.d.ts.map +1 -0
- package/build/template/stores/schema.js +36 -0
- package/build/template/stores/schema.js.map +1 -0
- package/build/template/stores/toast.d.ts +103 -0
- package/build/template/stores/toast.d.ts.map +1 -0
- package/build/template/stores/toast.js +105 -0
- package/build/template/stores/toast.js.map +1 -0
- package/build/template/utils/try-with-toast.d.ts +9 -0
- package/build/template/utils/try-with-toast.d.ts.map +1 -0
- package/build/template/utils/try-with-toast.js +37 -0
- package/build/template/utils/try-with-toast.js.map +1 -0
- package/package.json +2 -1
- package/src/api/iso/schema/$$.ts +1 -0
- package/src/api/iso/schema/routing.ts +89 -0
- package/src/api/iso/schema/validation.ts +136 -0
- package/src/template/components/ArgumentList.tsx +2 -6
- package/src/template/components/Changelog.tsx +2 -2
- package/src/template/components/DeprecationReason.tsx +2 -2
- package/src/template/components/Description.tsx +2 -2
- package/src/template/components/Field.tsx +2 -6
- package/src/template/components/FieldListSection.tsx +2 -6
- package/src/template/components/MissingSchema.tsx +3 -1
- package/src/template/components/ReferenceLink.tsx +9 -11
- package/src/template/components/ToastContainer.tsx +67 -0
- package/src/template/components/ToastItem.tsx +119 -0
- package/src/template/components/TypeAnnotation.tsx +2 -6
- package/src/template/components/VersionPicker.tsx +94 -0
- package/src/template/hooks/useReferencePath.ts +20 -0
- package/src/template/routes/reference.tsx +49 -63
- package/src/template/routes/root.tsx +29 -6
- package/src/template/stores/$$.ts +15 -0
- package/src/template/stores/$.ts +1 -0
- package/src/template/stores/schema.ts +52 -0
- package/src/template/stores/toast.ts +153 -0
- package/src/template/utils/try-with-toast.ts +41 -0
- package/build/template/components/VersionSelector.d.ts +0 -8
- package/build/template/components/VersionSelector.d.ts.map +0 -1
- package/build/template/components/VersionSelector.js +0 -22
- package/build/template/components/VersionSelector.js.map +0 -1
- package/src/template/components/VersionSelector.tsx +0 -42
@@ -0,0 +1,48 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { CheckCircledIcon, Cross2Icon, CrossCircledIcon, ExclamationTriangleIcon, InfoCircledIcon, } from '@radix-ui/react-icons';
|
3
|
+
import { Box, Button, Card, Flex, IconButton, Text } from '@radix-ui/themes';
|
4
|
+
import { Stores } from '../stores/$.js';
|
5
|
+
const toastVariants = {
|
6
|
+
info: {
|
7
|
+
icon: _jsx(InfoCircledIcon, {}),
|
8
|
+
color: 'blue',
|
9
|
+
},
|
10
|
+
success: {
|
11
|
+
icon: _jsx(CheckCircledIcon, {}),
|
12
|
+
color: 'green',
|
13
|
+
},
|
14
|
+
warning: {
|
15
|
+
icon: _jsx(ExclamationTriangleIcon, {}),
|
16
|
+
color: 'amber',
|
17
|
+
},
|
18
|
+
error: {
|
19
|
+
icon: _jsx(CrossCircledIcon, {}),
|
20
|
+
color: 'red',
|
21
|
+
},
|
22
|
+
};
|
23
|
+
export const ToastItem = ({ toast }) => {
|
24
|
+
const handleClose = () => Stores.toast.remove(toast.id);
|
25
|
+
const duration = toast.duration ?? 5000;
|
26
|
+
const showTimer = duration > 0;
|
27
|
+
const type = toast.type || 'info';
|
28
|
+
return (_jsxs(Card, { size: '2', style: {
|
29
|
+
animation: 'slideIn 0.2s ease-out',
|
30
|
+
position: 'relative',
|
31
|
+
}, children: [_jsxs(Flex, { gap: '3', align: 'start', maxWidth: '400px', children: [_jsx(Text, { as: 'div', size: '4', color: toastVariants[type].color, children: toastVariants[type].icon }), _jsxs(Box, { style: { flex: 1 }, children: [_jsxs(Flex, { align: 'baseline', gap: '2', wrap: 'wrap', children: [_jsx(Text, { weight: 'medium', size: '2', children: toast.message }), toast.actions.map((action) => (_jsx(Button, { id: action.label, size: '1', variant: 'soft', onClick: () => {
|
32
|
+
action.onClick();
|
33
|
+
handleClose();
|
34
|
+
}, children: action.label })))] }), toast.description && (_jsx(Text, { size: '1', color: 'gray', mt: '1', style: { display: 'block' }, children: toast.description }))] }), _jsx(IconButton, { size: '1', variant: 'ghost', color: 'gray', onClick: handleClose, style: { flexShrink: 0 }, children: _jsx(Cross2Icon, {}) })] }), showTimer && (_jsx(Box, { style: {
|
35
|
+
position: 'absolute',
|
36
|
+
bottom: 0,
|
37
|
+
left: 0,
|
38
|
+
right: 0,
|
39
|
+
height: '2px',
|
40
|
+
backgroundColor: `var(--${toastVariants[toast.type || 'info'].color}-a3)`,
|
41
|
+
overflow: 'hidden',
|
42
|
+
}, children: _jsx(Box, { style: {
|
43
|
+
height: '100%',
|
44
|
+
backgroundColor: `var(--${toastVariants[toast.type || 'info'].color}-a6)`,
|
45
|
+
animation: `timerCountdown ${duration}ms linear forwards`,
|
46
|
+
} }) }))] }));
|
47
|
+
};
|
48
|
+
//# sourceMappingURL=ToastItem.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ToastItem.js","sourceRoot":"","sources":["../../../src/template/components/ToastItem.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5E,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE,KAAC,eAAe,KAAG;QACzB,KAAK,EAAE,MAAM;KACd;IACD,OAAO,EAAE;QACP,IAAI,EAAE,KAAC,gBAAgB,KAAG;QAC1B,KAAK,EAAE,OAAO;KACf;IACD,OAAO,EAAE;QACP,IAAI,EAAE,KAAC,uBAAuB,KAAG;QACjC,KAAK,EAAE,OAAO;KACf;IACD,KAAK,EAAE;QACL,IAAI,EAAE,KAAC,gBAAgB,KAAG;QAC1B,KAAK,EAAE,KAAK;KACb;CAID,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAA0D,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5F,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAA;IACvC,MAAM,SAAS,GAAG,QAAQ,GAAG,CAAC,CAAA;IAC9B,MA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AU,IACT,IAAI,EAAC,GAAG,EACR,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,YAExB,KAAC,UAAU,KAAG,GACH,IACR,EAEN,SAAS,IAAI,CACZ,KAAC,GAAG,IACF,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,MAAM,EAAE,CAAC;oBACT,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,KAAK;oBACb,eAAe,EAAE,SAAS,aAAa,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,KAAK,MAAM;oBACzE,QAAQ,EAAE,QAAQ;iBACnB,YAED,KAAC,GAAG,IACF,KAAK,EAAE;wBACL,MAAM,EAAE,MAAM;wBACd,eAAe,EAAE,SAAS,aAAa,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,KAAK,MAAM;wBACzE,SAAS,EAAE,kBAAkB,QAAQ,oBAAoB;qBAC1D,GACD,GACE,CACP,IACI,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,10 +1,9 @@
|
|
1
|
+
import type { React } from '#dep/react/index';
|
1
2
|
import type { GraphQLType } from 'graphql';
|
2
|
-
import type { FC } from 'react';
|
3
|
-
export interface Props {
|
4
|
-
type: GraphQLType;
|
5
|
-
}
|
6
3
|
/**
|
7
4
|
* Renders a GraphQL type recursively, with links for named types
|
8
5
|
*/
|
9
|
-
export declare const TypeAnnotation: FC<
|
6
|
+
export declare const TypeAnnotation: React.FC<{
|
7
|
+
type: GraphQLType;
|
8
|
+
}>;
|
10
9
|
//# sourceMappingURL=TypeAnnotation.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypeAnnotation.d.ts","sourceRoot":"","sources":["../../../src/template/components/TypeAnnotation.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"TypeAnnotation.d.ts","sourceRoot":"","sources":["../../../src/template/components/TypeAnnotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAiD1D,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypeAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/TypeAnnotation.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"TypeAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/TypeAnnotation.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC1E,8BAA8B;IAC9B,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,CACL,8BACE,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAI,EACrC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBAAS,IAC1B,CACJ,CAAA;IACH,CAAC;IAED,2BAA2B;IAC3B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,CACL,8BACE,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBAAS,EAC3B,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAI,EACrC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBAAS,IAC1B,CACJ,CAAA;IACH,CAAC;IAED,qBAAqB;IACrB,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,SAAS,GAAG,IAAI,CAAA;QAEtB,4BAA4B;QAC5B,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;YACjC,OAAO,CACL,KAAC,aAAa,IAAC,IAAI,EAAE,SAAS,CAAC,IAAI,YACjC,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,SAAS,CAAC,IAAI,GAAQ,GAC7B,CACjB,CAAA;QACH,CAAC;QAED,mEAAmE;QACnE,6CAA6C;QAC7C,OAAO,CACL,KAAC,aAAa,IAAC,IAAI,EAAE,SAAS,CAAC,IAAI,YACjC,KAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,YAAG,SAAS,CAAC,IAAI,GAAQ,GACnE,CACjB,CAAA;QAED,kEAAkE;QAClE,sDAAsD;IACxD,CAAC;IAED,2EAA2E;IAC3E,OAAO,KAAC,IAAI,cAAE,MAAM,CAAC,IAAI,CAAC,GAAQ,CAAA;AACpC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../../src/template/components/VersionPicker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAQ7C,UAAU,KAAK;IACb,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA+EzC,CAAA"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Api } from '#api/iso';
|
3
|
+
import { Select } from '@radix-ui/themes';
|
4
|
+
import { useNavigate } from 'react-router';
|
5
|
+
import { useReferencePath } from '../hooks/useReferencePath.js';
|
6
|
+
import { schemaSource } from '../sources/schema-source.js';
|
7
|
+
import { Stores } from '../stores/$.js';
|
8
|
+
import { tryWithToast } from '../utils/try-with-toast.js';
|
9
|
+
export const VersionPicker = ({ all, current }) => {
|
10
|
+
const navigate = useNavigate();
|
11
|
+
const currentPath = useReferencePath();
|
12
|
+
// Don't show selector if only one version
|
13
|
+
if (all.length <= 1) {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
const handleVersionChange = async (newVersion) => {
|
17
|
+
const error = await tryWithToast(async () => {
|
18
|
+
// Check if current path exists in target version
|
19
|
+
const targetSchema = await schemaSource.get(newVersion);
|
20
|
+
// Find fallback path if needed
|
21
|
+
const fallbackPath = Api.Schema.Validation.findFallbackPath(targetSchema, currentPath);
|
22
|
+
// Get redirect description if path changed
|
23
|
+
const redirectDescription = Api.Schema.Validation.getRedirectDescription(targetSchema, currentPath, fallbackPath, newVersion);
|
24
|
+
// Create the new path
|
25
|
+
const newPath = Api.Schema.Routing.createReferencePath({
|
26
|
+
version: newVersion,
|
27
|
+
type: fallbackPath.type,
|
28
|
+
field: fallbackPath.field,
|
29
|
+
});
|
30
|
+
// Show toast notification if schema location redirect will occur
|
31
|
+
if (redirectDescription) {
|
32
|
+
Stores.Toast.store.info(redirectDescription, {
|
33
|
+
duration: 160_000,
|
34
|
+
actions: [
|
35
|
+
{
|
36
|
+
label: 'Go back',
|
37
|
+
onClick() {
|
38
|
+
navigate(-1);
|
39
|
+
},
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: 'View changelog',
|
43
|
+
onClick() {
|
44
|
+
// Navigate to changelog page
|
45
|
+
navigate('/changelog');
|
46
|
+
},
|
47
|
+
},
|
48
|
+
],
|
49
|
+
});
|
50
|
+
}
|
51
|
+
navigate(newPath);
|
52
|
+
}, 'Failed to switch version');
|
53
|
+
// Fallback logic if error occurred
|
54
|
+
if (error) {
|
55
|
+
// Fallback to simple navigation if schema loading fails
|
56
|
+
const newPath = Api.Schema.Routing.createReferencePath({
|
57
|
+
version: newVersion,
|
58
|
+
type: currentPath.type,
|
59
|
+
field: currentPath.field,
|
60
|
+
});
|
61
|
+
navigate(newPath);
|
62
|
+
}
|
63
|
+
};
|
64
|
+
return (_jsxs(Select.Root, { value: current, onValueChange: handleVersionChange, children: [_jsx(Select.Trigger, { children: current === Api.Schema.VERSION_LATEST ? `Latest` : current }), _jsx(Select.Content, { children: all.map(version => (_jsx(Select.Item, { value: version, children: version === Api.Schema.VERSION_LATEST ? `Latest` : version }, version))) })] }));
|
65
|
+
};
|
66
|
+
//# sourceMappingURL=VersionPicker.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../../src/template/components/VersionPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAOzD,MAAM,CAAC,MAAM,aAAa,GAAoB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACjE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,WAAW,GAAG,gBAAgB,EAAE,CAAA;IAEtC,0CAA0C;IAC1C,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,mBAAmB,GAAG,KAAK,EAAE,UAA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,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBACrD,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,KAAK,EAAE,WAAW,CAAC,KAAK;aACzB,CAAC,CAAA;YACF,QAAQ,CAAC,OAAO,CAAC,CAAA;QACnB,CAAC;IACH,CAAC,CAAA;IAED,OAAO,CACL,MAAC,MAAM,CAAC,IAAI,IAAC,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,mBAAmB,aAC7D,KAAC,MAAM,CAAC,OAAO,cACZ,OAAO,KAAK,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,GAC5C,EACjB,KAAC,MAAM,CAAC,OAAO,cACZ,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAClB,KAAC,MAAM,CAAC,IAAI,IAAe,KAAK,EAAE,OAAO,YACtC,OAAO,KAAK,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,IAD3C,OAAO,CAEX,CACf,CAAC,GACa,IACL,CACf,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Api } from '#api/iso';
|
2
|
+
/**
|
3
|
+
* Hook that returns parsed reference path parameters
|
4
|
+
*
|
5
|
+
* @throws {Error} If not currently on a reference route
|
6
|
+
* @returns Parsed reference path object
|
7
|
+
*/
|
8
|
+
export declare const useReferencePath: () => Api.Schema.Validation.PathValidation;
|
9
|
+
//# sourceMappingURL=useReferencePath.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useReferencePath.d.ts","sourceRoot":"","sources":["../../../src/template/hooks/useReferencePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAG9B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,cAUzD,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Api } from '#api/iso';
|
2
|
+
import { useLocation, useParams } from 'react-router';
|
3
|
+
/**
|
4
|
+
* Hook that returns parsed reference path parameters
|
5
|
+
*
|
6
|
+
* @throws {Error} If not currently on a reference route
|
7
|
+
* @returns Parsed reference path object
|
8
|
+
*/
|
9
|
+
export const useReferencePath = () => {
|
10
|
+
const params = useParams();
|
11
|
+
const location = useLocation();
|
12
|
+
Api.Schema.Routing.assertReferenceRoute({
|
13
|
+
pathname: location.pathname,
|
14
|
+
params,
|
15
|
+
});
|
16
|
+
return params;
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=useReferencePath.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useReferencePath.js","sourceRoot":"","sources":["../../../src/template/hooks/useReferencePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAyC,EAAE;IACzE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACtC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,MAAM;KACP,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
@@ -5,25 +5,31 @@ export declare const loader: ({ params }: any) => Promise<{
|
|
5
5
|
availableVersions: string[];
|
6
6
|
}>;
|
7
7
|
/**
|
8
|
-
* Reference documentation
|
8
|
+
* Reference documentation routes using proper React Router patterns
|
9
|
+
* - Parent routes have no components (automatically render Outlet)
|
10
|
+
* - Leaf routes have components and loaders that always run fresh
|
11
|
+
* - Single ReferenceView component handles all variations
|
9
12
|
*/
|
10
13
|
export declare const reference: {
|
11
|
-
id: string;
|
12
14
|
path: string;
|
13
|
-
loader: ({ params }: any) => Promise<{
|
14
|
-
schema: GrafaidOld.Schema.Schema;
|
15
|
-
currentVersion: any;
|
16
|
-
availableVersions: string[];
|
17
|
-
}>;
|
18
|
-
Component: () => import("react/jsx-runtime").JSX.Element;
|
19
15
|
children: (import("#lib/react-router-aid/react-router-aid").RouteObjectIndex | {
|
20
16
|
path: string;
|
21
17
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
22
18
|
errorElement: import("react/jsx-runtime").JSX.Element;
|
19
|
+
loader: ({ params }: any) => Promise<{
|
20
|
+
schema: GrafaidOld.Schema.Schema;
|
21
|
+
currentVersion: any;
|
22
|
+
availableVersions: string[];
|
23
|
+
}>;
|
23
24
|
children: {
|
24
25
|
path: string;
|
25
26
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
26
27
|
errorElement: import("react/jsx-runtime").JSX.Element;
|
28
|
+
loader: ({ params }: any) => Promise<{
|
29
|
+
schema: GrafaidOld.Schema.Schema;
|
30
|
+
currentVersion: any;
|
31
|
+
availableVersions: string[];
|
32
|
+
}>;
|
27
33
|
}[];
|
28
34
|
} | {
|
29
35
|
path: string;
|
@@ -31,10 +37,20 @@ export declare const reference: {
|
|
31
37
|
path: string;
|
32
38
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
33
39
|
errorElement: import("react/jsx-runtime").JSX.Element;
|
40
|
+
loader: ({ params }: any) => Promise<{
|
41
|
+
schema: GrafaidOld.Schema.Schema;
|
42
|
+
currentVersion: any;
|
43
|
+
availableVersions: string[];
|
44
|
+
}>;
|
34
45
|
children: {
|
35
46
|
path: string;
|
36
47
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
37
48
|
errorElement: import("react/jsx-runtime").JSX.Element;
|
49
|
+
loader: ({ params }: any) => Promise<{
|
50
|
+
schema: GrafaidOld.Schema.Schema;
|
51
|
+
currentVersion: any;
|
52
|
+
availableVersions: string[];
|
53
|
+
}>;
|
38
54
|
}[];
|
39
55
|
})[];
|
40
56
|
})[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAanD,eAAO,MAAM,MAAM;;;;EAcjB,CAAA;AA8FF;;;;;GAKG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASpB,CAAA"}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { Api } from '#api/iso';
|
3
3
|
import { GrafaidOld } from '#lib/grafaid-old/index';
|
4
|
-
import { Grafaid } from '#lib/grafaid/index';
|
5
4
|
import { route, routeIndex } from '#lib/react-router-aid/react-router-aid';
|
6
5
|
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
7
6
|
import { Box } from '@radix-ui/themes';
|
8
|
-
import {
|
7
|
+
import { neverCase } from '@wollybeard/kit/language';
|
8
|
+
import { useParams } from 'react-router';
|
9
9
|
import { Field } from '../components/Field.js';
|
10
10
|
import { MissingSchema } from '../components/MissingSchema.js';
|
11
11
|
import { NamedType } from '../components/NamedType.js';
|
12
|
-
import {
|
12
|
+
import { VersionPicker } from '../components/VersionPicker.js';
|
13
13
|
import { SidebarLayout } from '../layouts/index.js';
|
14
14
|
import { schemaSource } from '../sources/schema-source.js';
|
15
15
|
export const loader = createLoader(async ({ params }) => {
|
@@ -25,7 +25,9 @@ export const loader = createLoader(async ({ params }) => {
|
|
25
25
|
availableVersions,
|
26
26
|
};
|
27
27
|
});
|
28
|
-
|
28
|
+
// Single component that handles all reference route variations
|
29
|
+
const ReferenceView = () => {
|
30
|
+
const params = useParams();
|
29
31
|
const data = useLoaderData();
|
30
32
|
if (!data.schema) {
|
31
33
|
return _jsx(MissingSchema, {});
|
@@ -49,72 +51,64 @@ const RouteReferenceComponent = () => {
|
|
49
51
|
}
|
50
52
|
// Calculate basePath based on current version
|
51
53
|
const basePath = Api.Schema.Routing.createReferenceBasePath(data.currentVersion);
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
const
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
return field;
|
81
|
-
};
|
82
|
-
const RouteComponentIndex = () => {
|
83
|
-
return _jsx("div", { children: "Select a type from the sidebar to view its documentation." });
|
84
|
-
};
|
85
|
-
const RouteComponentType = () => {
|
86
|
-
const params = useParams();
|
87
|
-
const type = useSchemaType(params.type);
|
88
|
-
return _jsx(NamedType, { data: type });
|
89
|
-
};
|
90
|
-
const RouteComponentTypeField = () => {
|
91
|
-
const params = useParams();
|
92
|
-
const field = useSchemaField(params.type, params.field);
|
93
|
-
return _jsx(Field, { data: field });
|
54
|
+
// Determine view type and render appropriate content
|
55
|
+
const viewType = Api.Schema.Routing.getReferenceViewType({
|
56
|
+
schema: data.schema,
|
57
|
+
type: params.type,
|
58
|
+
field: params.field,
|
59
|
+
});
|
60
|
+
const content = (() => {
|
61
|
+
if (viewType === 'index') {
|
62
|
+
return _jsx("div", { children: "Select a type from the sidebar to view its documentation." });
|
63
|
+
}
|
64
|
+
else if (viewType === 'type-missing' || viewType === 'field-missing') {
|
65
|
+
return _jsx(MissingSchema, {});
|
66
|
+
}
|
67
|
+
else if (viewType === 'type') {
|
68
|
+
const type = data.schema.getType(params.type);
|
69
|
+
return _jsx(NamedType, { data: type });
|
70
|
+
}
|
71
|
+
else if (viewType === 'field') {
|
72
|
+
const type = data.schema.getType(params.type);
|
73
|
+
const fields = type.getFields();
|
74
|
+
const field = fields[params.field];
|
75
|
+
return _jsx(Field, { data: field });
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
neverCase(viewType);
|
79
|
+
}
|
80
|
+
})();
|
81
|
+
return (_jsxs(SidebarLayout, { sidebar: sidebarItems, basePath: basePath, children: [_jsx(Box, { mb: `4`, children: _jsx(VersionPicker, { all: [...data.availableVersions], current: data.currentVersion }) }), content] }));
|
94
82
|
};
|
83
|
+
// Define routes that handle type and field params
|
95
84
|
const typeAndFieldRoutes = [
|
96
|
-
routeIndex(
|
85
|
+
routeIndex({
|
86
|
+
Component: ReferenceView,
|
87
|
+
loader,
|
88
|
+
}),
|
97
89
|
route({
|
98
90
|
path: `:type`,
|
99
|
-
Component:
|
91
|
+
Component: ReferenceView,
|
100
92
|
errorElement: _jsx(MissingSchema, {}),
|
93
|
+
loader,
|
101
94
|
children: [
|
102
95
|
route({
|
103
96
|
path: `:field`,
|
104
|
-
Component:
|
97
|
+
Component: ReferenceView,
|
105
98
|
errorElement: _jsx(MissingSchema, {}),
|
99
|
+
loader,
|
106
100
|
}),
|
107
101
|
],
|
108
102
|
}),
|
109
103
|
];
|
110
104
|
/**
|
111
|
-
* Reference documentation
|
105
|
+
* Reference documentation routes using proper React Router patterns
|
106
|
+
* - Parent routes have no components (automatically render Outlet)
|
107
|
+
* - Leaf routes have components and loaders that always run fresh
|
108
|
+
* - Single ReferenceView component handles all variations
|
112
109
|
*/
|
113
110
|
export const reference = route({
|
114
|
-
id: 'reference',
|
115
111
|
path: `reference`,
|
116
|
-
loader,
|
117
|
-
Component: RouteReferenceComponent,
|
118
112
|
children: [
|
119
113
|
...typeAndFieldRoutes,
|
120
114
|
route({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE1D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,gDAAgD;IAChD,yEAAyE;IACzE,oFAAoF;IACpF,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,cAAc,CAAA;IAElE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;IACrD,MAAM,iBAAiB,GAAG,YAAY,CAAC,QAAQ,CAAA;IAE/C,OAAO;QACL,MAAM;QACN,cAAc;QACd,i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AO,EAAE,IAAI,CAAC,cAAc,GAC5B,GACE,EACL,OAAO,IACM,CACjB,CAAA;AACH,CAAC,CAAA;AAED,kDAAkD;AAClD,MAAM,kBAAkB,GAAG;IACzB,UAAU,CAAC;QACT,SAAS,EAAE,aAAa;QACxB,MAAM;KACP,CAAC;IACF,KAAK,CAAC;QACJ,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,aAAa;QACxB,YAAY,EAAE,KAAC,aAAa,KAAG;QAC/B,MAAM;QACN,QAAQ,EAAE;YACR,KAAK,CAAC;gBACJ,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,aAAa;gBACxB,YAAY,EAAE,KAAC,aAAa,KAAG;gBAC/B,MAAM;aACP,CAAC;SACH;KACF,CAAC;CACH,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC;IAC7B,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE;QACR,GAAG,kBAAkB;QACrB,KAAK,CAAC;YACJ,IAAI,EAAE,kBAAkB;YACxB,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;KACH;CACF,CAAC,CAAA"}
|
@@ -3,6 +3,7 @@ export declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const root: {
|
4
4
|
path: string;
|
5
5
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
6
|
+
loader: () => Promise<{}>;
|
6
7
|
children: ReactRouter.RouteObject[];
|
7
8
|
};
|
8
9
|
//# sourceMappingURL=root.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAsB1D,eAAO,MAAM,SAAS,+CASrB,CAAA;AAwGD,eAAO,MAAM,IAAI;;;;;CAgBf,CAAA"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { route } from '#lib/react-router-aid/react-router-aid';
|
3
|
+
import { createLoader } from '#lib/react-router-loader/react-router-loader';
|
3
4
|
import { Box, Flex, Theme } from '@radix-ui/themes';
|
4
5
|
import { Link as LinkReactRouter } from 'react-router';
|
5
6
|
import { Outlet, ScrollRestoration } from 'react-router';
|
@@ -11,6 +12,7 @@ import { Link as PolenLink } from '../components/Link.js';
|
|
11
12
|
import { Logo } from '../components/Logo.js';
|
12
13
|
import { NotFound } from '../components/NotFound.js';
|
13
14
|
import { ThemeToggle } from '../components/ThemeToggle.js';
|
15
|
+
import { ToastContainer } from '../components/ToastContainer.js';
|
14
16
|
import { ThemeProvider, useTheme } from '../contexts/ThemeContext.js';
|
15
17
|
import { changelog } from './changelog.js';
|
16
18
|
import { index } from './index.js';
|
@@ -24,12 +26,9 @@ const Layout = () => {
|
|
24
26
|
const header = (_jsxs(Flex, { align: 'center', gap: { initial: `4`, md: `8` }, pb: '4', mb: { initial: `4`, md: `8` }, style: {
|
25
27
|
borderBottom: `1px solid var(--gray-3)`,
|
26
28
|
}, children: [_jsx(LinkReactRouter, { to: '/', style: { color: `inherit`, textDecoration: `none` }, children: _jsx(Box, { display: { initial: `block`, md: `block` }, children: _jsx(Logo, { src: logoSrc, title: templateVariables.title, height: 30, showTitle: true }) }) }), _jsx(Flex, { direction: 'row', gap: '4', style: { flex: 1 }, children: PROJECT_DATA.navbar.map((item, key) => (_jsx(PolenLink, { color: 'gray', to: item.pathExp, children: item.title }, key))) }), _jsx(ThemeToggle, {})] }));
|
27
|
-
return (_jsx(Theme, { asChild: true, appearance: appearance, children: _jsxs(Box, { width: { initial: `100%`, sm: `100%`, md: `var(--container-4)` }, maxWidth: '100vw', my: { initial: `0`, sm: `0`, md: `8` }, mx: 'auto', px: { initial: `4`, sm: `4`, md: `0` }, py: { initial: `4`, sm: `4`, md: `0` }, children: [header, _jsx(Outlet, {})] }) }));
|
29
|
+
return (_jsx(Theme, { asChild: true, appearance: appearance, radius: 'none', children: _jsxs(Box, { width: { initial: `100%`, sm: `100%`, md: `var(--container-4)` }, maxWidth: '100vw', my: { initial: `0`, sm: `0`, md: `8` }, mx: 'auto', px: { initial: `4`, sm: `4`, md: `0` }, py: { initial: `4`, sm: `4`, md: `0` }, children: [header, _jsx(Outlet, {}), _jsx(ToastContainer, {})] }) }));
|
28
30
|
};
|
29
|
-
const children = [
|
30
|
-
index,
|
31
|
-
pages,
|
32
|
-
];
|
31
|
+
const children = [index, pages];
|
33
32
|
//
|
34
33
|
//
|
35
34
|
//
|
@@ -65,9 +64,21 @@ children.push(notFoundRoute);
|
|
65
64
|
// ━━━━━━━━━━━━━━ • Root Route
|
66
65
|
//
|
67
66
|
//
|
67
|
+
const storeModules = import.meta.glob('../stores/!($.*)*.ts', { eager: true });
|
68
68
|
export const root = route({
|
69
69
|
path: `/`,
|
70
70
|
Component,
|
71
|
+
loader: createLoader(async () => {
|
72
|
+
// Reset all stores on SSR to prevent cross-request pollution
|
73
|
+
if (import.meta.env.SSR) {
|
74
|
+
for (const module of Object.values(storeModules)) {
|
75
|
+
if (module.store?.reset) {
|
76
|
+
module.store.reset();
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
return {};
|
81
|
+
}),
|
71
82
|
children,
|
72
83
|
});
|
73
84
|
//# sourceMappingURL=root.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO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KAAK,CAAC;IAC1B,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,GAAG;IACT,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE;QACN,UAAU,EAAE,GAAG;KAChB;CACF,CAAC,CAAA;AACF,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AAE5B,EAAE;AACF,EAAE;AACF,EAAE;AACF,8BAA8B;AAC9B,EAAE;AACF,EAAE;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAG5E,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,IAAI,EAAE,GAAG;IACT,SAAS;IACT,MAAM,EAAE,YAAY,CAAC,KAAK,IAAI,EAAE;QAC9B,6DAA6D;QAC7D,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;YACxB,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;gBACjD,IAAI,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;oBACxB,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,EAAE,CAAA;IACX,CAAC,CAAC;IACF,QAAQ;CACT,CAAC,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export * as Schema from './schema.js';
|
2
|
+
export { store as schema } from './schema.js';
|
3
|
+
export * as Toast from './toast.js';
|
4
|
+
export { store as toast } from './toast.js';
|
5
|
+
export interface Store {
|
6
|
+
reset: () => void;
|
7
|
+
set: (data?: unknown) => void;
|
8
|
+
}
|
9
|
+
export interface StoreModule {
|
10
|
+
store: Store;
|
11
|
+
initialState: unknown;
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=$$.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/template/stores/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA;AAE3C,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,OAAO,CAAA;CACtB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/template/stores/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/template/stores/$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"$.js","sourceRoot":"","sources":["../../../src/template/stores/$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,SAAS,CAAA"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import type { GraphQLSchema } from 'graphql';
|
2
|
+
/**
|
3
|
+
* Schema store state interface
|
4
|
+
*/
|
5
|
+
export interface State {
|
6
|
+
/** Currently selected schema version */
|
7
|
+
currentVersion: string;
|
8
|
+
/** All available schema versions */
|
9
|
+
availableVersions: string[];
|
10
|
+
/** Currently loaded GraphQL schema instance */
|
11
|
+
currentSchema: GraphQLSchema | null;
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* Initial state for the schema store
|
15
|
+
*/
|
16
|
+
export declare const initialState: State;
|
17
|
+
/**
|
18
|
+
* Schema store
|
19
|
+
*
|
20
|
+
* Manages GraphQL schema state including version selection and schema instances.
|
21
|
+
* Used for version switching and schema-aware navigation.
|
22
|
+
*/
|
23
|
+
export declare const store: {
|
24
|
+
/**
|
25
|
+
* Reset store to initial state
|
26
|
+
*/
|
27
|
+
reset(): void;
|
28
|
+
/**
|
29
|
+
* Set store state
|
30
|
+
* @param data - New state data
|
31
|
+
*/
|
32
|
+
set(data: State): void;
|
33
|
+
/** Currently selected schema version */
|
34
|
+
currentVersion: string;
|
35
|
+
/** All available schema versions */
|
36
|
+
availableVersions: string[];
|
37
|
+
/** Currently loaded GraphQL schema instance */
|
38
|
+
currentSchema: GraphQLSchema | null;
|
39
|
+
};
|
40
|
+
//# sourceMappingURL=schema.d.ts.map
|