polen 0.10.0-next.15 → 0.10.0-next.16
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/README.md +7 -6
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +9 -8
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/lib/graphql-change/change-groups.d.ts +52 -0
- package/build/lib/graphql-change/change-groups.d.ts.map +1 -0
- package/build/lib/graphql-change/change-groups.js +33 -0
- package/build/lib/graphql-change/change-groups.js.map +1 -0
- package/build/lib/graphql-change/change-types.d.ts +170 -0
- package/build/lib/graphql-change/change-types.d.ts.map +1 -0
- package/build/lib/graphql-change/change-types.js +11 -0
- package/build/lib/graphql-change/change-types.js.map +1 -0
- package/build/lib/graphql-change/criticality.d.ts +26 -0
- package/build/lib/graphql-change/criticality.d.ts.map +1 -0
- package/build/lib/graphql-change/criticality.js +30 -0
- package/build/lib/graphql-change/criticality.js.map +1 -0
- package/build/lib/graphql-change/graphql-change.d.ts +5 -6
- package/build/lib/graphql-change/graphql-change.d.ts.map +1 -1
- package/build/lib/graphql-change/graphql-change.js +4 -0
- package/build/lib/graphql-change/graphql-change.js.map +1 -1
- package/build/template/components/Changelog/ChangeBase.d.ts +9 -0
- package/build/template/components/Changelog/ChangeBase.d.ts.map +1 -0
- package/build/template/components/Changelog/ChangeBase.js +5 -0
- package/build/template/components/Changelog/ChangeBase.js.map +1 -0
- package/build/template/components/Changelog/CriticalitySection.d.ts +11 -0
- package/build/template/components/Changelog/CriticalitySection.d.ts.map +1 -0
- package/build/template/components/Changelog/CriticalitySection.js +11 -0
- package/build/template/components/Changelog/CriticalitySection.js.map +1 -0
- package/build/template/components/Changelog/changes/index.d.ts +2 -0
- package/build/template/components/Changelog/changes/index.d.ts.map +1 -0
- package/build/template/components/Changelog/changes/index.js +2 -0
- package/build/template/components/Changelog/changes/index.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.js +7 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.js +7 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.js +59 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.js.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.d.ts +6 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.js +14 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.js.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.js +7 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.js +12 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgument.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldArgument.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgument.js +12 -0
- package/build/template/components/Changelog/groups/FieldArgument.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.js +7 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.js +12 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.js +12 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.js +14 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldDescription.js +14 -0
- package/build/template/components/Changelog/groups/FieldDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldOperation.js +14 -0
- package/build/template/components/Changelog/groups/FieldOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.d.ts +6 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.js +7 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.js.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.js +14 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.js +14 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.js +12 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/SchemaRootType.d.ts +6 -0
- package/build/template/components/Changelog/groups/SchemaRootType.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/SchemaRootType.js +14 -0
- package/build/template/components/Changelog/groups/SchemaRootType.js.map +1 -0
- package/build/template/components/Changelog/groups/TypeDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/TypeDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/TypeDescription.js +14 -0
- package/build/template/components/Changelog/groups/TypeDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/TypeOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/TypeOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/TypeOperation.js +14 -0
- package/build/template/components/Changelog/groups/TypeOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.js +12 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/index.d.ts +26 -0
- package/build/template/components/Changelog/groups/index.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/index.js +26 -0
- package/build/template/components/Changelog/groups/index.js.map +1 -0
- package/build/template/components/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog.js +108 -27
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/ChangelogLayout.d.ts +9 -0
- package/build/template/components/ChangelogLayout.d.ts.map +1 -0
- package/build/template/components/ChangelogLayout.js +71 -0
- package/build/template/components/ChangelogLayout.js.map +1 -0
- package/build/template/components/layouts/SidebarLayout.d.ts +9 -0
- package/build/template/components/layouts/SidebarLayout.d.ts.map +1 -0
- package/build/template/components/layouts/SidebarLayout.js +25 -0
- package/build/template/components/layouts/SidebarLayout.js.map +1 -0
- package/build/template/components/layouts/index.d.ts +2 -0
- package/build/template/components/layouts/index.d.ts.map +1 -0
- package/build/template/components/layouts/index.js +2 -0
- package/build/template/components/layouts/index.js.map +1 -0
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js +2 -1
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/reference.d.ts +2 -1
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +20 -1
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +5 -65
- package/build/template/routes/root.js.map +1 -1
- package/package.json +2 -1
- package/src/api/vite/plugins/core.ts +9 -8
- package/src/lib/graphql-change/change-groups.ts +250 -0
- package/src/lib/graphql-change/change-types.ts +203 -0
- package/src/lib/graphql-change/criticality.ts +45 -0
- package/src/lib/graphql-change/graphql-change.ts +7 -5
- package/src/template/components/Changelog/ChangeBase.tsx +15 -0
- package/src/template/components/Changelog/CriticalitySection.tsx +29 -0
- package/src/template/components/Changelog/changes/index.ts +1 -0
- package/src/template/components/Changelog/groups/DirectiveArgument.tsx +25 -0
- package/src/template/components/Changelog/groups/DirectiveArgumentDescription.tsx +15 -0
- package/src/template/components/Changelog/groups/DirectiveArgumentOperation.tsx +25 -0
- package/src/template/components/Changelog/groups/DirectiveDescription.tsx +12 -0
- package/src/template/components/Changelog/groups/DirectiveLocationOperation.tsx +25 -0
- package/src/template/components/Changelog/groups/DirectiveOperation.tsx +21 -0
- package/src/template/components/Changelog/groups/DirectiveUsage.tsx +137 -0
- package/src/template/components/Changelog/groups/EnumValueDeprecationReason.tsx +32 -0
- package/src/template/components/Changelog/groups/EnumValueDescription.tsx +12 -0
- package/src/template/components/Changelog/groups/EnumValueOperation.tsx +21 -0
- package/src/template/components/Changelog/groups/FieldArgument.tsx +26 -0
- package/src/template/components/Changelog/groups/FieldArgumentDescription.tsx +15 -0
- package/src/template/components/Changelog/groups/FieldArgumentOperation.tsx +26 -0
- package/src/template/components/Changelog/groups/FieldDeprecation.tsx +21 -0
- package/src/template/components/Changelog/groups/FieldDeprecationReason.tsx +33 -0
- package/src/template/components/Changelog/groups/FieldDescription.tsx +27 -0
- package/src/template/components/Changelog/groups/FieldOperation.tsx +28 -0
- package/src/template/components/Changelog/groups/InputFieldDefaultValue.tsx +16 -0
- package/src/template/components/Changelog/groups/InputFieldDescription.tsx +30 -0
- package/src/template/components/Changelog/groups/InputFieldOperation.tsx +29 -0
- package/src/template/components/Changelog/groups/ObjectTypeInterfaceOperation.tsx +25 -0
- package/src/template/components/Changelog/groups/SchemaRootType.tsx +31 -0
- package/src/template/components/Changelog/groups/TypeDescription.tsx +27 -0
- package/src/template/components/Changelog/groups/TypeOperation.tsx +27 -0
- package/src/template/components/Changelog/groups/UnionMemberOperation.tsx +21 -0
- package/src/template/components/Changelog/groups/index.ts +25 -0
- package/src/template/components/Changelog.tsx +96 -63
- package/src/template/components/ChangelogLayout.tsx +157 -0
- package/src/template/components/layouts/SidebarLayout.tsx +68 -0
- package/src/template/components/layouts/index.ts +1 -0
- package/src/template/routes/changelog.tsx +6 -1
- package/src/template/routes/reference.tsx +25 -2
- package/src/template/routes/root.tsx +5 -103
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { Content } from '#api/content/$';
|
2
|
+
import type React from 'react';
|
3
|
+
interface SidebarLayoutProps {
|
4
|
+
children: React.ReactNode;
|
5
|
+
sidebar: Content.Item[];
|
6
|
+
}
|
7
|
+
export declare const SidebarLayout: React.FC<SidebarLayoutProps>;
|
8
|
+
export {};
|
9
|
+
//# sourceMappingURL=SidebarLayout.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SidebarLayout.d.ts","sourceRoot":"","sources":["../../../../src/template/components/layouts/SidebarLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAA;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsDtD,CAAA"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Box, Grid } from '@radix-ui/themes';
|
3
|
+
import { useEffect, useState } from 'react';
|
4
|
+
import { useLocation } from 'react-router';
|
5
|
+
import { HamburgerMenu } from '../HamburgerMenu.js';
|
6
|
+
import { Sidebar } from '../sidebar/Sidebar.js';
|
7
|
+
export const SidebarLayout = ({ children, sidebar }) => {
|
8
|
+
const location = useLocation();
|
9
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
10
|
+
// Close mobile menu on route change
|
11
|
+
useEffect(() => {
|
12
|
+
setMobileMenuOpen(false);
|
13
|
+
}, [location.pathname]);
|
14
|
+
const isShowSidebar = sidebar && sidebar.length > 0;
|
15
|
+
return (_jsxs(Grid, { areas: {
|
16
|
+
initial: `'content'`,
|
17
|
+
sm: `'content'`,
|
18
|
+
md: `'sidebar sidebar . content content content content content'`,
|
19
|
+
}, rows: 'auto', columns: { initial: `1fr`, sm: `1fr`, md: `repeat(8, 1fr)` }, gapX: { initial: `0`, sm: `0`, md: `2` }, children: [isShowSidebar && (_jsx(Box, { display: { initial: `block`, md: `none` }, mb: '4', children: _jsx(HamburgerMenu, { isOpen: mobileMenuOpen, onToggle: () => {
|
20
|
+
setMobileMenuOpen(!mobileMenuOpen);
|
21
|
+
}, onClose: () => {
|
22
|
+
setMobileMenuOpen(false);
|
23
|
+
}, sidebarData: sidebar }) })), isShowSidebar && (_jsx(Box, { display: { initial: `none`, xs: `none`, sm: `none`, md: `block` }, gridColumn: '1 / 3', gridRow: '1 / auto', children: _jsx(Sidebar, { data: sidebar }) })), _jsx(Box, { gridArea: 'content / content / auto / 8', className: 'prose', children: children })] }));
|
24
|
+
};
|
25
|
+
//# sourceMappingURL=SidebarLayout.js.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,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAC,GAAG,YACpD,KAAC,aAAa,IACZ,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,GAAG,EAAE;wBACb,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAA;oBACpC,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;wBACZ,iBAAiB,CAAC,KAAK,CAAC,CAAA;oBAC1B,CAAC,EACD,WAAW,EAAE,OAAO,GACpB,GACE,CACP,EAGA,aAAa,IAAI,CAChB,KAAC,GAAG,IACF,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EACjE,UAAU,EAAC,OAAO,EAClB,OAAO,EAAC,UAAU,YAElB,KAAC,OAAO,IAAC,IAAI,EAAE,OAAO,GAAI,GACtB,CACP,EAED,KAAC,GAAG,IAAC,QAAQ,EAAC,8BAA8B,EAAC,SAAS,EAAC,OAAO,YAC3D,QAAQ,GACL,IACD,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/components/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/template/components/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":"AA0BA,eAAO,MAAM,SAAS;;;;;;CAIpB,CAAA"}
|
@@ -3,6 +3,7 @@ import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
|
3
3
|
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
4
4
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
5
5
|
import { Changelog } from '../components/Changelog.js';
|
6
|
+
import { ChangelogLayout } from '../components/ChangelogLayout.js';
|
6
7
|
const loader = createLoader(() => {
|
7
8
|
return {
|
8
9
|
schema: PROJECT_DATA.schema,
|
@@ -13,7 +14,7 @@ const Component = () => {
|
|
13
14
|
if (!data.schema) {
|
14
15
|
return _jsx("div", { children: "No data to show. There is no schema is." });
|
15
16
|
}
|
16
|
-
return _jsx(Changelog, { schema: data.schema });
|
17
|
+
return (_jsx(ChangelogLayout, { versions: data.schema.versions, children: _jsx(Changelog, { schema: data.schema }) }));
|
17
18
|
};
|
18
19
|
export const changelog = createRoute({
|
19
20
|
path: `changelog`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAElE,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE;IAC/B,OAAO;QACL,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,aAAa,EAAiB,CAAA;IAE3C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,oEAAkD,CAAA;IAC3D,CAAC;IAED,OAAO,CACL,KAAC,eAAe,IAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,YAC7C,KAAC,SAAS,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,GAClB,CACnB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;CACV,CAAC,CAAA"}
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { GrafaidOld } from '#lib/grafaid-old/index';
|
1
2
|
export declare const reference: {
|
2
3
|
path: string;
|
3
4
|
loader: () => {
|
4
|
-
schema:
|
5
|
+
schema: GrafaidOld.Schema.Schema | null;
|
5
6
|
};
|
6
7
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
7
8
|
children: {
|
@@ -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":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAmDnD,eAAO,MAAM,SAAS;;;;;;;;;;CAKpB,CAAA"}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { GrafaidOld } from '#lib/grafaid-old/index';
|
2
3
|
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
3
4
|
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
4
5
|
import { Box } from '@radix-ui/themes';
|
5
6
|
import { Outlet } from 'react-router';
|
6
7
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
8
|
+
import { SidebarLayout } from '../components/layouts/index.js';
|
7
9
|
import { MissingSchema } from '../components/MissingSchema.js';
|
8
10
|
import { reference$type } from './reference.$type.js';
|
9
11
|
const loader = createLoader(() => {
|
@@ -17,7 +19,24 @@ const Component = () => {
|
|
17
19
|
if (!data.schema) {
|
18
20
|
return _jsx(MissingSchema, {});
|
19
21
|
}
|
20
|
-
|
22
|
+
// Build reference sidebar from schema types
|
23
|
+
const kindMap = GrafaidOld.getKindMap(data.schema);
|
24
|
+
const sidebarItems = [];
|
25
|
+
const kindEntries = Object.entries(kindMap.list).filter(([_, types]) => types.length > 0);
|
26
|
+
for (const [title, types] of kindEntries) {
|
27
|
+
sidebarItems.push({
|
28
|
+
type: `ItemSection`,
|
29
|
+
title,
|
30
|
+
pathExp: `reference-${title.toLowerCase()}`,
|
31
|
+
isLinkToo: false,
|
32
|
+
links: types.map(type => ({
|
33
|
+
type: `ItemLink`,
|
34
|
+
title: type.name,
|
35
|
+
pathExp: `reference/${type.name}`,
|
36
|
+
})),
|
37
|
+
});
|
38
|
+
}
|
39
|
+
return (_jsx(SidebarLayout, { sidebar: sidebarItems, children: _jsx(Outlet, {}) }));
|
21
40
|
};
|
22
41
|
export const reference = createRoute({
|
23
42
|
path: `reference`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,E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WAAW,EAAE,EAAE;YAC3C,SAAS,EAAE,KAAK;YAChB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACxB,IAAI,EAAE,UAAmB;gBACzB,KAAK,EAAE,IAAI,CAAC,IAAI;gBAChB,OAAO,EAAE,aAAa,IAAI,CAAC,IAAI,EAAE;aAClC,CAAC,CAAC;SACJ,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,CACL,KAAC,aAAa,IAAC,OAAO,EAAE,YAAY,YAClC,KAAC,MAAM,KAAG,GACI,CACjB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"
|
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;AAqB1D,eAAO,MAAM,SAAS,+CAmBrB,CAAA;AAgGD,eAAO,MAAM,IAAI;;;;CAIf,CAAA"}
|
@@ -1,24 +1,18 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import { GrafaidOld } from '#lib/grafaid-old/index';
|
3
2
|
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
4
|
-
import { Box
|
3
|
+
import { Box } from '@radix-ui/themes';
|
5
4
|
import { Flex, Theme } from '@radix-ui/themes';
|
6
|
-
import { Arr } from '@wollybeard/kit';
|
7
|
-
import { useEffect, useState } from 'react';
|
8
5
|
import { Link as LinkReactRouter } from 'react-router';
|
9
|
-
import { Outlet, ScrollRestoration
|
6
|
+
import { Outlet, ScrollRestoration } from 'react-router';
|
10
7
|
import logoSrc from 'virtual:polen/project/assets/logo.svg';
|
11
8
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
12
|
-
import projectPagesCatalog from 'virtual:polen/project/data/pages-catalog.jsonsuper';
|
13
9
|
import { routes } from 'virtual:polen/project/routes.jsx';
|
14
10
|
import { templateVariables } from 'virtual:polen/template/variables';
|
15
11
|
import { GraphQLSchemaProvider } from '../../lib/graphql-document/schema-context.js';
|
16
12
|
import { CodeBlockEnhancer } from '../components/CodeBlockEnhancer.js';
|
17
|
-
import { HamburgerMenu } from '../components/HamburgerMenu.js';
|
18
13
|
import { Link } from '../components/Link.js';
|
19
14
|
import { Logo } from '../components/Logo.js';
|
20
15
|
import { NotFound } from '../components/NotFound.js';
|
21
|
-
import { Sidebar } from '../components/sidebar/Sidebar.js';
|
22
16
|
import { ThemeToggle } from '../components/ThemeToggle.js';
|
23
17
|
import { ThemeProvider, useTheme } from '../contexts/ThemeContext.js';
|
24
18
|
import { changelog } from './changelog.js';
|
@@ -34,65 +28,11 @@ export const Component = () => {
|
|
34
28
|
return (_jsxs(_Fragment, { children: [_jsx(ThemeProvider, { children: _jsxs(GraphQLSchemaProvider, { schema: schema, children: [_jsx(Layout, {}), _jsx(CodeBlockEnhancer, {})] }) }), _jsx(ScrollRestoration, {})] }));
|
35
29
|
};
|
36
30
|
const Layout = () => {
|
37
|
-
const location = useLocation();
|
38
31
|
const { appearance } = useTheme();
|
39
|
-
const
|
40
|
-
// Close mobile menu on route change
|
41
|
-
useEffect(() => {
|
42
|
-
setMobileMenuOpen(false);
|
43
|
-
}, [location.pathname]);
|
44
|
-
// Determine if we should show sidebar based on current path
|
45
|
-
const getCurrentNavPathExp = () => {
|
46
|
-
// todo: general path manipulation lib because we are duplicating logic here found in FileRouter
|
47
|
-
// todo: kit: try a Str.split that returns [] | string[] so that our predicates can refine on it?
|
48
|
-
const segments = location.pathname.split(`/`).filter(Boolean);
|
49
|
-
if (Arr.isntEmpty(segments)) {
|
50
|
-
return `/${segments[0]}`;
|
51
|
-
}
|
52
|
-
return null;
|
53
|
-
};
|
54
|
-
const currentNavPathExp = getCurrentNavPathExp();
|
55
|
-
const isReferencePage = currentNavPathExp === `/reference`;
|
56
|
-
const sidebar = (() => {
|
57
|
-
if (isReferencePage && PROJECT_DATA.schema) {
|
58
|
-
// Build reference sidebar from schema types
|
59
|
-
const schema = PROJECT_DATA.schema.versions[0].after;
|
60
|
-
const kindMap = GrafaidOld.getKindMap(schema);
|
61
|
-
const sidebarItems = [];
|
62
|
-
const kindEntries = Object.entries(kindMap.list).filter(([_, types]) => types.length > 0);
|
63
|
-
for (const [title, types] of kindEntries) {
|
64
|
-
sidebarItems.push({
|
65
|
-
type: `ItemSection`,
|
66
|
-
title,
|
67
|
-
pathExp: `reference-${title.toLowerCase()}`,
|
68
|
-
isLinkToo: false,
|
69
|
-
links: types.map(type => ({
|
70
|
-
type: `ItemLink`,
|
71
|
-
title: type.name,
|
72
|
-
pathExp: `reference/${type.name}`,
|
73
|
-
})),
|
74
|
-
});
|
75
|
-
}
|
76
|
-
return { items: sidebarItems };
|
77
|
-
}
|
78
|
-
else {
|
79
|
-
// Use regular page sidebar
|
80
|
-
return currentNavPathExp ? projectPagesCatalog.sidebarIndex[currentNavPathExp] || null : null;
|
81
|
-
}
|
82
|
-
})();
|
83
|
-
const isShowSidebar = sidebar && sidebar.items.length > 0;
|
84
|
-
const header = (_jsxs(Flex, { gridArea: `header`, align: 'center', gap: { initial: `4`, md: `8` }, pb: '4', mb: { initial: `4`, md: `8` }, style: {
|
32
|
+
const header = (_jsxs(Flex, { align: 'center', gap: { initial: `4`, md: `8` }, pb: '4', mb: { initial: `4`, md: `8` }, style: {
|
85
33
|
borderBottom: `1px solid var(--gray-3)`,
|
86
|
-
}, children: [
|
87
|
-
|
88
|
-
}, onClose: () => {
|
89
|
-
setMobileMenuOpen(false);
|
90
|
-
}, sidebarData: sidebar.items })), _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(Link, { color: 'gray', to: item.pathExp, children: item.title }, key))) }), _jsx(ThemeToggle, {})] }));
|
91
|
-
return (_jsx(Theme, { asChild: true, appearance: appearance, children: _jsxs(Grid, { width: { initial: `100%`, sm: `100%`, md: `var(--container-4)` }, maxWidth: '100vw', areas: {
|
92
|
-
initial: `'header' 'content'`,
|
93
|
-
sm: `'header' 'content'`,
|
94
|
-
md: `'header header header header header header header header' 'sidebar sidebar . content content content content content'`,
|
95
|
-
}, rows: 'min-content auto', columns: { initial: `1fr`, sm: `1fr`, md: `repeat(8, 1fr)` }, gapX: { initial: `0`, sm: `0`, md: `2` }, 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, isShowSidebar && (_jsx(Box, { display: { initial: `none`, xs: `none`, sm: `none`, md: `block` }, gridColumn: '1 / 3', gridRow: '2 / auto', children: _jsx(Sidebar, { data: sidebar.items }) })), _jsx(Box, { gridArea: 'content / content / auto / 8', className: 'prose', children: _jsx(Outlet, {}) })] }) }));
|
34
|
+
}, 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(Link, { color: 'gray', to: item.pathExp, children: item.title }, key))) }), _jsx(ThemeToggle, {})] }));
|
35
|
+
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, {})] }) }));
|
96
36
|
};
|
97
37
|
const children = [
|
98
38
|
index,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,OAAO,MAAM,uCAAuC,CAAA;AAC3D,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAA;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,6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DAA8D;AAC9D,EAAE;AACF,EAAE;AACF,EAAE;AAEF,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED,EAAE;AACF,EAAE;AACF,EAAE;AACF,EAAE;AACF,mCAAmC;AACnC,EAAE;AACF,EAAE;AACF,EAAE;AAEF,MAAM,aAAa,GAAG,WAAW,CAAC;IAChC,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,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC;IAC9B,IAAI,EAAE,GAAG;IACT,SAAS;IACT,QAAQ;CACT,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "polen",
|
3
|
-
"version": "0.10.0-next.
|
3
|
+
"version": "0.10.0-next.16",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A framework for delightful GraphQL developer portals",
|
6
6
|
"author": {
|
@@ -207,6 +207,7 @@
|
|
207
207
|
"test:unit": "vitest",
|
208
208
|
"dev": "pnpm build:watch:emit",
|
209
209
|
"dev:hive": "pnpm polen dev --project examples/hive",
|
210
|
+
"dev:pokemon": "pnpm polen dev --project examples/pokemon",
|
210
211
|
"build:clean": "pnpm tsc --build tsconfig.build.json --clean && rm -rf build",
|
211
212
|
"build": "tsc --build tsconfig.build.json",
|
212
213
|
"build:watch": "tsc --build tsconfig.build.json --watch",
|
@@ -116,14 +116,15 @@ export const Core = (config: Config.Config): Vite.PluginOption[] => {
|
|
116
116
|
config(_, { command }) {
|
117
117
|
return {
|
118
118
|
root: config.paths.framework.rootDir,
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
119
|
+
// todo
|
120
|
+
// future: {
|
121
|
+
// removePluginHookHandleHotUpdate: 'warn',
|
122
|
+
// removePluginHookSsrArgument: 'warn',
|
123
|
+
// removeServerModuleGraph: 'warn',
|
124
|
+
// removeServerHot: 'warn',
|
125
|
+
// removeServerTransformRequest: 'warn',
|
126
|
+
// removeSsrLoadModule: 'warn',
|
127
|
+
// },
|
127
128
|
define: {
|
128
129
|
__BUILDING__: Json.encode(command === `build`),
|
129
130
|
__SERVING__: Json.encode(command === `serve`),
|
@@ -0,0 +1,250 @@
|
|
1
|
+
import type {
|
2
|
+
Change,
|
3
|
+
DirectiveAddedChange,
|
4
|
+
DirectiveArgumentAddedChange,
|
5
|
+
DirectiveArgumentDefaultValueChangedChange,
|
6
|
+
DirectiveArgumentDescriptionChangedChange,
|
7
|
+
DirectiveArgumentRemovedChange,
|
8
|
+
DirectiveArgumentTypeChangedChange,
|
9
|
+
DirectiveDescriptionChangedChange,
|
10
|
+
DirectiveLocationAddedChange,
|
11
|
+
DirectiveLocationRemovedChange,
|
12
|
+
DirectiveRemovedChange,
|
13
|
+
DirectiveUsageArgumentDefinitionAddedChange,
|
14
|
+
DirectiveUsageArgumentDefinitionRemovedChange,
|
15
|
+
DirectiveUsageEnumAddedChange,
|
16
|
+
DirectiveUsageEnumRemovedChange,
|
17
|
+
DirectiveUsageEnumValueAddedChange,
|
18
|
+
DirectiveUsageEnumValueRemovedChange,
|
19
|
+
DirectiveUsageFieldAddedChange,
|
20
|
+
DirectiveUsageFieldDefinitionAddedChange,
|
21
|
+
DirectiveUsageFieldDefinitionRemovedChange,
|
22
|
+
DirectiveUsageFieldRemovedChange,
|
23
|
+
DirectiveUsageInputFieldDefinitionAddedChange,
|
24
|
+
DirectiveUsageInputFieldDefinitionRemovedChange,
|
25
|
+
DirectiveUsageInputObjectAddedChange,
|
26
|
+
DirectiveUsageInputObjectRemovedChange,
|
27
|
+
DirectiveUsageInterfaceAddedChange,
|
28
|
+
DirectiveUsageInterfaceRemovedChange,
|
29
|
+
DirectiveUsageObjectAddedChange,
|
30
|
+
DirectiveUsageObjectRemovedChange,
|
31
|
+
DirectiveUsageScalarAddedChange,
|
32
|
+
DirectiveUsageScalarRemovedChange,
|
33
|
+
DirectiveUsageSchemaAddedChange,
|
34
|
+
DirectiveUsageSchemaRemovedChange,
|
35
|
+
DirectiveUsageUnionMemberAddedChange,
|
36
|
+
DirectiveUsageUnionMemberRemovedChange,
|
37
|
+
EnumValueAddedChange,
|
38
|
+
EnumValueDeprecationReasonAddedChange,
|
39
|
+
EnumValueDeprecationReasonChangedChange,
|
40
|
+
EnumValueDeprecationReasonRemovedChange,
|
41
|
+
EnumValueDescriptionChangedChange,
|
42
|
+
EnumValueRemovedChange,
|
43
|
+
FieldAddedChange,
|
44
|
+
FieldArgumentAddedChange,
|
45
|
+
FieldArgumentDefaultChangedChange,
|
46
|
+
FieldArgumentDescriptionChangedChange,
|
47
|
+
FieldArgumentRemovedChange,
|
48
|
+
FieldArgumentTypeChangedChange,
|
49
|
+
FieldDeprecationAddedChange,
|
50
|
+
FieldDeprecationReasonAddedChange,
|
51
|
+
FieldDeprecationReasonChangedChange,
|
52
|
+
FieldDeprecationReasonRemovedChange,
|
53
|
+
FieldDeprecationRemovedChange,
|
54
|
+
FieldDescriptionAddedChange,
|
55
|
+
FieldDescriptionChangedChange,
|
56
|
+
FieldDescriptionRemovedChange,
|
57
|
+
FieldRemovedChange,
|
58
|
+
FieldTypeChangedChange,
|
59
|
+
InputFieldAddedChange,
|
60
|
+
InputFieldDefaultValueChangedChange,
|
61
|
+
InputFieldDescriptionAddedChange,
|
62
|
+
InputFieldDescriptionChangedChange,
|
63
|
+
InputFieldDescriptionRemovedChange,
|
64
|
+
InputFieldRemovedChange,
|
65
|
+
InputFieldTypeChangedChange,
|
66
|
+
ObjectTypeInterfaceAddedChange,
|
67
|
+
ObjectTypeInterfaceRemovedChange,
|
68
|
+
SchemaMutationTypeChangedChange,
|
69
|
+
SchemaQueryTypeChangedChange,
|
70
|
+
SchemaSubscriptionTypeChangedChange,
|
71
|
+
TypeAddedChange,
|
72
|
+
TypeDescriptionAddedChange,
|
73
|
+
TypeDescriptionChangedChange,
|
74
|
+
TypeDescriptionRemovedChange,
|
75
|
+
TypeKindChangedChange,
|
76
|
+
TypeRemovedChange,
|
77
|
+
UnionMemberAddedChange,
|
78
|
+
UnionMemberRemovedChange,
|
79
|
+
} from './change-types.js'
|
80
|
+
|
81
|
+
// Type operations
|
82
|
+
export type TypeOperation = TypeAddedChange | TypeRemovedChange | TypeKindChangedChange
|
83
|
+
export const isTypeOperation = (change: Change): change is TypeOperation =>
|
84
|
+
change.type === `TYPE_ADDED` || change.type === `TYPE_REMOVED` || change.type === `TYPE_KIND_CHANGED`
|
85
|
+
|
86
|
+
// Type descriptions
|
87
|
+
export type TypeDescription = TypeDescriptionAddedChange | TypeDescriptionRemovedChange | TypeDescriptionChangedChange
|
88
|
+
export const isTypeDescription = (change: Change): change is TypeDescription =>
|
89
|
+
change.type === `TYPE_DESCRIPTION_ADDED` || change.type === `TYPE_DESCRIPTION_REMOVED`
|
90
|
+
|| change.type === `TYPE_DESCRIPTION_CHANGED`
|
91
|
+
|
92
|
+
// Field operations
|
93
|
+
export type FieldOperation = FieldAddedChange | FieldRemovedChange | FieldTypeChangedChange
|
94
|
+
export const isFieldOperation = (change: Change): change is FieldOperation =>
|
95
|
+
change.type === `FIELD_ADDED` || change.type === `FIELD_REMOVED` || change.type === `FIELD_TYPE_CHANGED`
|
96
|
+
|
97
|
+
// Field descriptions
|
98
|
+
export type FieldDescription =
|
99
|
+
| FieldDescriptionAddedChange
|
100
|
+
| FieldDescriptionRemovedChange
|
101
|
+
| FieldDescriptionChangedChange
|
102
|
+
export const isFieldDescription = (change: Change): change is FieldDescription =>
|
103
|
+
change.type === `FIELD_DESCRIPTION_ADDED` || change.type === `FIELD_DESCRIPTION_REMOVED`
|
104
|
+
|| change.type === `FIELD_DESCRIPTION_CHANGED`
|
105
|
+
|
106
|
+
// Field deprecation
|
107
|
+
export type FieldDeprecation = FieldDeprecationAddedChange | FieldDeprecationRemovedChange
|
108
|
+
export const isFieldDeprecation = (change: Change): change is FieldDeprecation =>
|
109
|
+
change.type === `FIELD_DEPRECATION_ADDED` || change.type === `FIELD_DEPRECATION_REMOVED`
|
110
|
+
|
111
|
+
// Field deprecation reason
|
112
|
+
export type FieldDeprecationReason =
|
113
|
+
| FieldDeprecationReasonAddedChange
|
114
|
+
| FieldDeprecationReasonRemovedChange
|
115
|
+
| FieldDeprecationReasonChangedChange
|
116
|
+
export const isFieldDeprecationReason = (change: Change): change is FieldDeprecationReason =>
|
117
|
+
change.type === `FIELD_DEPRECATION_REASON_ADDED` || change.type === `FIELD_DEPRECATION_REASON_REMOVED`
|
118
|
+
|| change.type === `FIELD_DEPRECATION_REASON_CHANGED`
|
119
|
+
|
120
|
+
// Field argument operations
|
121
|
+
export type FieldArgumentOperation = FieldArgumentAddedChange | FieldArgumentRemovedChange
|
122
|
+
export const isFieldArgumentOperation = (change: Change): change is FieldArgumentOperation =>
|
123
|
+
change.type === `FIELD_ARGUMENT_ADDED` || change.type === `FIELD_ARGUMENT_REMOVED`
|
124
|
+
|
125
|
+
// Field argument changes
|
126
|
+
export type FieldArgument = FieldArgumentDefaultChangedChange | FieldArgumentTypeChangedChange
|
127
|
+
export const isFieldArgument = (change: Change): change is FieldArgument =>
|
128
|
+
change.type === `FIELD_ARGUMENT_DEFAULT_CHANGED` || change.type === `FIELD_ARGUMENT_TYPE_CHANGED`
|
129
|
+
|
130
|
+
// Field argument description
|
131
|
+
export type FieldArgumentDescription = FieldArgumentDescriptionChangedChange
|
132
|
+
export const isFieldArgumentDescription = (change: Change): change is FieldArgumentDescription =>
|
133
|
+
change.type === `FIELD_ARGUMENT_DESCRIPTION_CHANGED`
|
134
|
+
|
135
|
+
// Enum value operations
|
136
|
+
export type EnumValueOperation = EnumValueAddedChange | EnumValueRemovedChange
|
137
|
+
export const isEnumValueOperation = (change: Change): change is EnumValueOperation =>
|
138
|
+
change.type === `ENUM_VALUE_ADDED` || change.type === `ENUM_VALUE_REMOVED`
|
139
|
+
|
140
|
+
// Enum value description
|
141
|
+
export type EnumValueDescription = EnumValueDescriptionChangedChange
|
142
|
+
export const isEnumValueDescription = (change: Change): change is EnumValueDescription =>
|
143
|
+
change.type === `ENUM_VALUE_DESCRIPTION_CHANGED`
|
144
|
+
|
145
|
+
// Enum value deprecation reason
|
146
|
+
export type EnumValueDeprecationReason =
|
147
|
+
| EnumValueDeprecationReasonAddedChange
|
148
|
+
| EnumValueDeprecationReasonRemovedChange
|
149
|
+
| EnumValueDeprecationReasonChangedChange
|
150
|
+
export const isEnumValueDeprecationReason = (change: Change): change is EnumValueDeprecationReason =>
|
151
|
+
change.type === `ENUM_VALUE_DEPRECATION_REASON_ADDED` || change.type === `ENUM_VALUE_DEPRECATION_REASON_REMOVED`
|
152
|
+
|| change.type === `ENUM_VALUE_DEPRECATION_REASON_CHANGED`
|
153
|
+
|
154
|
+
// Input field operations
|
155
|
+
export type InputFieldOperation = InputFieldAddedChange | InputFieldRemovedChange | InputFieldTypeChangedChange
|
156
|
+
export const isInputFieldOperation = (change: Change): change is InputFieldOperation =>
|
157
|
+
change.type === `INPUT_FIELD_ADDED` || change.type === `INPUT_FIELD_REMOVED`
|
158
|
+
|| change.type === `INPUT_FIELD_TYPE_CHANGED`
|
159
|
+
|
160
|
+
// Input field descriptions
|
161
|
+
export type InputFieldDescription =
|
162
|
+
| InputFieldDescriptionAddedChange
|
163
|
+
| InputFieldDescriptionRemovedChange
|
164
|
+
| InputFieldDescriptionChangedChange
|
165
|
+
export const isInputFieldDescription = (change: Change): change is InputFieldDescription =>
|
166
|
+
change.type === `INPUT_FIELD_DESCRIPTION_ADDED` || change.type === `INPUT_FIELD_DESCRIPTION_REMOVED`
|
167
|
+
|| change.type === `INPUT_FIELD_DESCRIPTION_CHANGED`
|
168
|
+
|
169
|
+
// Input field default value
|
170
|
+
export type InputFieldDefaultValue = InputFieldDefaultValueChangedChange
|
171
|
+
export const isInputFieldDefaultValue = (change: Change): change is InputFieldDefaultValue =>
|
172
|
+
change.type === `INPUT_FIELD_DEFAULT_VALUE_CHANGED`
|
173
|
+
|
174
|
+
// Union member operations
|
175
|
+
export type UnionMemberOperation = UnionMemberAddedChange | UnionMemberRemovedChange
|
176
|
+
export const isUnionMemberOperation = (change: Change): change is UnionMemberOperation =>
|
177
|
+
change.type === `UNION_MEMBER_ADDED` || change.type === `UNION_MEMBER_REMOVED`
|
178
|
+
|
179
|
+
// Object type interface operations
|
180
|
+
export type ObjectTypeInterfaceOperation = ObjectTypeInterfaceAddedChange | ObjectTypeInterfaceRemovedChange
|
181
|
+
export const isObjectTypeInterfaceOperation = (change: Change): change is ObjectTypeInterfaceOperation =>
|
182
|
+
change.type === `OBJECT_TYPE_INTERFACE_ADDED` || change.type === `OBJECT_TYPE_INTERFACE_REMOVED`
|
183
|
+
|
184
|
+
// Directive operations
|
185
|
+
export type DirectiveOperation = DirectiveAddedChange | DirectiveRemovedChange
|
186
|
+
export const isDirectiveOperation = (change: Change): change is DirectiveOperation =>
|
187
|
+
change.type === `DIRECTIVE_ADDED` || change.type === `DIRECTIVE_REMOVED`
|
188
|
+
|
189
|
+
// Directive description
|
190
|
+
export type DirectiveDescription = DirectiveDescriptionChangedChange
|
191
|
+
export const isDirectiveDescription = (change: Change): change is DirectiveDescription =>
|
192
|
+
change.type === `DIRECTIVE_DESCRIPTION_CHANGED`
|
193
|
+
|
194
|
+
// Directive location operations
|
195
|
+
export type DirectiveLocationOperation = DirectiveLocationAddedChange | DirectiveLocationRemovedChange
|
196
|
+
export const isDirectiveLocationOperation = (change: Change): change is DirectiveLocationOperation =>
|
197
|
+
change.type === `DIRECTIVE_LOCATION_ADDED` || change.type === `DIRECTIVE_LOCATION_REMOVED`
|
198
|
+
|
199
|
+
// Directive argument operations
|
200
|
+
export type DirectiveArgumentOperation = DirectiveArgumentAddedChange | DirectiveArgumentRemovedChange
|
201
|
+
export const isDirectiveArgumentOperation = (change: Change): change is DirectiveArgumentOperation =>
|
202
|
+
change.type === `DIRECTIVE_ARGUMENT_ADDED` || change.type === `DIRECTIVE_ARGUMENT_REMOVED`
|
203
|
+
|
204
|
+
// Directive argument changes
|
205
|
+
export type DirectiveArgument = DirectiveArgumentDefaultValueChangedChange | DirectiveArgumentTypeChangedChange
|
206
|
+
export const isDirectiveArgument = (change: Change): change is DirectiveArgument =>
|
207
|
+
change.type === `DIRECTIVE_ARGUMENT_DEFAULT_VALUE_CHANGED` || change.type === `DIRECTIVE_ARGUMENT_TYPE_CHANGED`
|
208
|
+
|
209
|
+
// Directive argument description
|
210
|
+
export type DirectiveArgumentDescription = DirectiveArgumentDescriptionChangedChange
|
211
|
+
export const isDirectiveArgumentDescription = (change: Change): change is DirectiveArgumentDescription =>
|
212
|
+
change.type === `DIRECTIVE_ARGUMENT_DESCRIPTION_CHANGED`
|
213
|
+
|
214
|
+
// Schema root type changes
|
215
|
+
export type SchemaRootType =
|
216
|
+
| SchemaQueryTypeChangedChange
|
217
|
+
| SchemaMutationTypeChangedChange
|
218
|
+
| SchemaSubscriptionTypeChangedChange
|
219
|
+
export const isSchemaRootType = (change: Change): change is SchemaRootType =>
|
220
|
+
change.type === `SCHEMA_QUERY_TYPE_CHANGED` || change.type === `SCHEMA_MUTATION_TYPE_CHANGED`
|
221
|
+
|| change.type === `SCHEMA_SUBSCRIPTION_TYPE_CHANGED`
|
222
|
+
|
223
|
+
// Directive usage changes
|
224
|
+
export type DirectiveUsage =
|
225
|
+
| DirectiveUsageUnionMemberAddedChange
|
226
|
+
| DirectiveUsageUnionMemberRemovedChange
|
227
|
+
| DirectiveUsageEnumAddedChange
|
228
|
+
| DirectiveUsageEnumRemovedChange
|
229
|
+
| DirectiveUsageEnumValueAddedChange
|
230
|
+
| DirectiveUsageEnumValueRemovedChange
|
231
|
+
| DirectiveUsageInputObjectAddedChange
|
232
|
+
| DirectiveUsageInputObjectRemovedChange
|
233
|
+
| DirectiveUsageFieldAddedChange
|
234
|
+
| DirectiveUsageFieldRemovedChange
|
235
|
+
| DirectiveUsageScalarAddedChange
|
236
|
+
| DirectiveUsageScalarRemovedChange
|
237
|
+
| DirectiveUsageObjectAddedChange
|
238
|
+
| DirectiveUsageObjectRemovedChange
|
239
|
+
| DirectiveUsageInterfaceAddedChange
|
240
|
+
| DirectiveUsageInterfaceRemovedChange
|
241
|
+
| DirectiveUsageArgumentDefinitionAddedChange
|
242
|
+
| DirectiveUsageArgumentDefinitionRemovedChange
|
243
|
+
| DirectiveUsageSchemaAddedChange
|
244
|
+
| DirectiveUsageSchemaRemovedChange
|
245
|
+
| DirectiveUsageFieldDefinitionAddedChange
|
246
|
+
| DirectiveUsageFieldDefinitionRemovedChange
|
247
|
+
| DirectiveUsageInputFieldDefinitionAddedChange
|
248
|
+
| DirectiveUsageInputFieldDefinitionRemovedChange
|
249
|
+
|
250
|
+
export const isDirectiveUsage = (change: Change): change is DirectiveUsage => change.type.startsWith(`DIRECTIVE_USAGE_`)
|