polen 0.10.0-next.15 → 0.10.0-next.17
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/lib/graphql-document/components/GraphQLDocument.d.ts +0 -2
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +5 -5
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +1 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +1 -3
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +1 -1
- package/build/lib/graphql-document/positioning-simple.d.ts +1 -1
- package/build/lib/graphql-document/positioning-simple.js +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/entry.client.d.ts +0 -1
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/entry.client.js +0 -1
- package/build/template/entry.client.js.map +1 -1
- 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 +7 -68
- package/build/template/routes/root.js.map +1 -1
- package/package.json +3 -3
- 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/lib/graphql-document/components/GraphQLDocument.tsx +7 -12
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +1 -6
- package/src/lib/graphql-document/demo.md +1 -1
- package/src/lib/graphql-document/positioning-simple.test.ts +5 -5
- package/src/lib/graphql-document/positioning-simple.ts +1 -1
- 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/entry.client.tsx +0 -1
- package/src/template/routes/changelog.tsx +6 -1
- package/src/template/routes/reference.tsx +25 -2
- package/src/template/routes/root.tsx +5 -105
- package/build/template/components/CodeBlockEnhancer.d.ts +0 -2
- package/build/template/components/CodeBlockEnhancer.d.ts.map +0 -1
- package/build/template/components/CodeBlockEnhancer.js +0 -175
- package/build/template/components/CodeBlockEnhancer.js.map +0 -1
- package/build/template/styles/code-block.css +0 -218
- package/src/template/components/CodeBlockEnhancer.tsx +0 -192
- package/src/template/styles/code-block.css +0 -218
@@ -0,0 +1,30 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const InputFieldDescription: React.FC<{ change: GraphqlChange.Group.InputFieldDescription }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `INPUT_FIELD_DESCRIPTION_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added description to input field <Code>{change.meta.inputFieldName}</Code> on{' '}
|
12
|
+
<Code>{change.meta.inputName}</Code>
|
13
|
+
</ChangeBase>
|
14
|
+
)
|
15
|
+
case `INPUT_FIELD_DESCRIPTION_REMOVED`:
|
16
|
+
return (
|
17
|
+
<ChangeBase change={change}>
|
18
|
+
Removed description from input field <Code>{change.meta.inputFieldName}</Code> on{' '}
|
19
|
+
<Code>{change.meta.inputName}</Code>
|
20
|
+
</ChangeBase>
|
21
|
+
)
|
22
|
+
case `INPUT_FIELD_DESCRIPTION_CHANGED`:
|
23
|
+
return (
|
24
|
+
<ChangeBase change={change}>
|
25
|
+
Changed description for input field <Code>{change.meta.inputFieldName}</Code> on{' '}
|
26
|
+
<Code>{change.meta.inputName}</Code>
|
27
|
+
</ChangeBase>
|
28
|
+
)
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const InputFieldOperation: React.FC<{ change: GraphqlChange.Group.InputFieldOperation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `INPUT_FIELD_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added input field <Code>{change.meta.addedInputFieldName}</Code> to <Code>{change.meta.inputName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `INPUT_FIELD_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed input field <Code>{change.meta.removedFieldName}</Code> from <Code>{change.meta.inputName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
case `INPUT_FIELD_TYPE_CHANGED`:
|
21
|
+
return (
|
22
|
+
<ChangeBase change={change}>
|
23
|
+
Changed field <Code>{change.meta.inputFieldName}</Code> type from <Code>{change.meta.oldInputFieldType}</Code>
|
24
|
+
{' '}
|
25
|
+
to <Code>{change.meta.newInputFieldType}</Code> on input <Code>{change.meta.inputName}</Code>
|
26
|
+
</ChangeBase>
|
27
|
+
)
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const ObjectTypeInterfaceOperation: React.FC<{ change: GraphqlChange.Group.ObjectTypeInterfaceOperation }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
switch (change.type) {
|
10
|
+
case `OBJECT_TYPE_INTERFACE_ADDED`:
|
11
|
+
return (
|
12
|
+
<ChangeBase change={change}>
|
13
|
+
<Code>{change.meta.objectTypeName}</Code> object implements <Code>{change.meta.addedInterfaceName}</Code>{' '}
|
14
|
+
interface
|
15
|
+
</ChangeBase>
|
16
|
+
)
|
17
|
+
case `OBJECT_TYPE_INTERFACE_REMOVED`:
|
18
|
+
return (
|
19
|
+
<ChangeBase change={change}>
|
20
|
+
<Code>{change.meta.objectTypeName}</Code> object no longer implements{' '}
|
21
|
+
<Code>{change.meta.removedInterfaceName}</Code> interface
|
22
|
+
</ChangeBase>
|
23
|
+
)
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const SchemaRootType: React.FC<{ change: GraphqlChange.Group.SchemaRootType }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `SCHEMA_QUERY_TYPE_CHANGED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Schema query root type changed from <Code>{change.meta.oldQueryTypeName}</Code> to{' '}
|
12
|
+
<Code>{change.meta.newQueryTypeName}</Code>
|
13
|
+
</ChangeBase>
|
14
|
+
)
|
15
|
+
case `SCHEMA_MUTATION_TYPE_CHANGED`:
|
16
|
+
return (
|
17
|
+
<ChangeBase change={change}>
|
18
|
+
Schema mutation root type changed from <Code>{change.meta.oldMutationTypeName || `null`}</Code> to{' '}
|
19
|
+
<Code>{change.meta.newMutationTypeName || `null`}</Code>
|
20
|
+
</ChangeBase>
|
21
|
+
)
|
22
|
+
case `SCHEMA_SUBSCRIPTION_TYPE_CHANGED`:
|
23
|
+
return (
|
24
|
+
<ChangeBase change={change}>
|
25
|
+
Schema subscription root type changed from <Code>{change.meta.oldSubscriptionTypeName || `null`}</Code> to
|
26
|
+
{' '}
|
27
|
+
<Code>{change.meta.newSubscriptionTypeName || `null`}</Code>
|
28
|
+
</ChangeBase>
|
29
|
+
)
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const TypeDescription: React.FC<{ change: GraphqlChange.Group.TypeDescription }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `TYPE_DESCRIPTION_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added description to type <Code>{change.meta.typeName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `TYPE_DESCRIPTION_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed description from type <Code>{change.meta.typeName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
case `TYPE_DESCRIPTION_CHANGED`:
|
21
|
+
return (
|
22
|
+
<ChangeBase change={change}>
|
23
|
+
Changed description for type <Code>{change.meta.typeName}</Code>
|
24
|
+
</ChangeBase>
|
25
|
+
)
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const TypeOperation: React.FC<{ change: GraphqlChange.Group.TypeOperation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `TYPE_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added type <Code>{change.meta.addedTypeName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `TYPE_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed type <Code>{change.meta.removedTypeName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
case `TYPE_KIND_CHANGED`:
|
21
|
+
return (
|
22
|
+
<ChangeBase change={change}>
|
23
|
+
Changed type <Code>{change.meta.typeName}</Code> from {change.meta.oldTypeKind} to {change.meta.newTypeKind}
|
24
|
+
</ChangeBase>
|
25
|
+
)
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const UnionMemberOperation: React.FC<{ change: GraphqlChange.Group.UnionMemberOperation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `UNION_MEMBER_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added <Code>{change.meta.addedUnionMemberTypeName}</Code> to union <Code>{change.meta.unionName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `UNION_MEMBER_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed <Code>{change.meta.removedUnionMemberTypeName}</Code> from union <Code>{change.meta.unionName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
export { DirectiveArgument } from './DirectiveArgument.js'
|
2
|
+
export { DirectiveArgumentDescription } from './DirectiveArgumentDescription.js'
|
3
|
+
export { DirectiveArgumentOperation } from './DirectiveArgumentOperation.js'
|
4
|
+
export { DirectiveDescription } from './DirectiveDescription.js'
|
5
|
+
export { DirectiveLocationOperation } from './DirectiveLocationOperation.js'
|
6
|
+
export { DirectiveOperation } from './DirectiveOperation.js'
|
7
|
+
export { DirectiveUsage } from './DirectiveUsage.js'
|
8
|
+
export { EnumValueDeprecationReason } from './EnumValueDeprecationReason.js'
|
9
|
+
export { EnumValueDescription } from './EnumValueDescription.js'
|
10
|
+
export { EnumValueOperation } from './EnumValueOperation.js'
|
11
|
+
export { FieldArgument } from './FieldArgument.js'
|
12
|
+
export { FieldArgumentDescription } from './FieldArgumentDescription.js'
|
13
|
+
export { FieldArgumentOperation } from './FieldArgumentOperation.js'
|
14
|
+
export { FieldDeprecation } from './FieldDeprecation.js'
|
15
|
+
export { FieldDeprecationReason } from './FieldDeprecationReason.js'
|
16
|
+
export { FieldDescription } from './FieldDescription.js'
|
17
|
+
export { FieldOperation } from './FieldOperation.js'
|
18
|
+
export { InputFieldDefaultValue } from './InputFieldDefaultValue.js'
|
19
|
+
export { InputFieldDescription } from './InputFieldDescription.js'
|
20
|
+
export { InputFieldOperation } from './InputFieldOperation.js'
|
21
|
+
export { ObjectTypeInterfaceOperation } from './ObjectTypeInterfaceOperation.js'
|
22
|
+
export { SchemaRootType } from './SchemaRootType.js'
|
23
|
+
export { TypeDescription } from './TypeDescription.js'
|
24
|
+
export { TypeOperation } from './TypeOperation.js'
|
25
|
+
export { UnionMemberOperation } from './UnionMemberOperation.js'
|
@@ -1,11 +1,15 @@
|
|
1
1
|
import type { GrafaidOld } from '#lib/grafaid-old/index'
|
2
|
-
import {
|
3
|
-
import
|
2
|
+
import { CRITICALITY_LEVELS } from '#lib/graphql-change/criticality'
|
3
|
+
import { GraphqlChange } from '#lib/graphql-change/index'
|
4
4
|
import type { GraphqlChangeset } from '#lib/graphql-changeset/index'
|
5
|
-
import {
|
5
|
+
import type { CriticalityLevel } from '@graphql-inspector/core'
|
6
|
+
import { Box } from '@radix-ui/themes'
|
7
|
+
import { neverCase } from '@wollybeard/kit/language'
|
6
8
|
import type React from 'react'
|
9
|
+
import { useMemo } from 'react'
|
7
10
|
import type { Schema as ChangelogData } from '../../api/schema/index.js'
|
8
|
-
import {
|
11
|
+
import { CriticalitySection } from './Changelog/CriticalitySection.js'
|
12
|
+
import * as Group from './Changelog/groups/index.js'
|
9
13
|
|
10
14
|
export const renderDate = (date: Date) => {
|
11
15
|
return date.toLocaleString(`default`, {
|
@@ -19,20 +23,50 @@ export const renderDate = (date: Date) => {
|
|
19
23
|
export const Changelog: React.FC<{ schema: ChangelogData.Schema }> = ({ schema }) => {
|
20
24
|
return (
|
21
25
|
<Box>
|
22
|
-
{schema.versions.map(changeset => <Changeset key={changeset.date.
|
26
|
+
{schema.versions.map(changeset => <Changeset key={changeset.date.toISOString()} changeset={changeset} />)}
|
23
27
|
</Box>
|
24
28
|
)
|
25
29
|
}
|
26
30
|
|
27
31
|
const Changeset: React.FC<{ changeset: GraphqlChangeset.ChangeSet }> = ({ changeset }) => {
|
32
|
+
// Group changes by criticality level
|
33
|
+
const groupedChanges = useMemo(() => {
|
34
|
+
const groups = {} as Record<CriticalityLevel, GraphqlChange.Change[]>
|
35
|
+
|
36
|
+
// Initialize empty arrays for each level
|
37
|
+
CRITICALITY_LEVELS.forEach(level => {
|
38
|
+
groups[level] = []
|
39
|
+
})
|
40
|
+
|
41
|
+
// Group changes
|
42
|
+
changeset.changes.forEach(change => {
|
43
|
+
const level = change.criticality.level
|
44
|
+
if (groups[level]) {
|
45
|
+
groups[level].push(change)
|
46
|
+
}
|
47
|
+
})
|
48
|
+
|
49
|
+
// Return only non-empty groups in order
|
50
|
+
return CRITICALITY_LEVELS
|
51
|
+
.filter(level => groups[level].length > 0)
|
52
|
+
.map(level => ({
|
53
|
+
level,
|
54
|
+
changes: groups[level],
|
55
|
+
}))
|
56
|
+
}, [changeset.changes])
|
57
|
+
|
28
58
|
return (
|
29
|
-
<Box>
|
30
|
-
<h1 title={changeset.date.toISOString()}>
|
59
|
+
<Box mb='6'>
|
60
|
+
<h1 title={changeset.date.toISOString()} id={changeset.date.toISOString()}>
|
31
61
|
{renderDate(changeset.date)}
|
32
62
|
</h1>
|
33
|
-
|
34
|
-
|
35
|
-
|
63
|
+
{groupedChanges.map(group => (
|
64
|
+
<CriticalitySection key={group.level} level={group.level} changes={group.changes}>
|
65
|
+
{group.changes.map(change => (
|
66
|
+
<Change key={`${change.type}-${change.path || change.message}`} change={change} schema={changeset.after} />
|
67
|
+
))}
|
68
|
+
</CriticalitySection>
|
69
|
+
))}
|
36
70
|
</Box>
|
37
71
|
)
|
38
72
|
}
|
@@ -40,58 +74,57 @@ const Changeset: React.FC<{ changeset: GraphqlChangeset.ChangeSet }> = ({ change
|
|
40
74
|
const Change: React.FC<{ change: GraphqlChange.Change; schema: GrafaidOld.Schema.Schema }> = (
|
41
75
|
{ change, schema },
|
42
76
|
) => {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
return
|
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
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
return <li>TODO: {change.type}</li>
|
77
|
+
if (GraphqlChange.Group.isTypeOperation(change)) {
|
78
|
+
return <Group.TypeOperation change={change} />
|
79
|
+
} else if (GraphqlChange.Group.isTypeDescription(change)) {
|
80
|
+
return <Group.TypeDescription change={change} />
|
81
|
+
} else if (GraphqlChange.Group.isFieldOperation(change)) {
|
82
|
+
return <Group.FieldOperation change={change} />
|
83
|
+
} else if (GraphqlChange.Group.isFieldDescription(change)) {
|
84
|
+
return <Group.FieldDescription change={change} />
|
85
|
+
} else if (GraphqlChange.Group.isFieldDeprecation(change)) {
|
86
|
+
return <Group.FieldDeprecation change={change} />
|
87
|
+
} else if (GraphqlChange.Group.isFieldDeprecationReason(change)) {
|
88
|
+
return <Group.FieldDeprecationReason change={change} />
|
89
|
+
} else if (GraphqlChange.Group.isFieldArgumentOperation(change)) {
|
90
|
+
return <Group.FieldArgumentOperation change={change} />
|
91
|
+
} else if (GraphqlChange.Group.isFieldArgument(change)) {
|
92
|
+
return <Group.FieldArgument change={change} />
|
93
|
+
} else if (GraphqlChange.Group.isFieldArgumentDescription(change)) {
|
94
|
+
return <Group.FieldArgumentDescription change={change} />
|
95
|
+
} else if (GraphqlChange.Group.isEnumValueOperation(change)) {
|
96
|
+
return <Group.EnumValueOperation change={change} />
|
97
|
+
} else if (GraphqlChange.Group.isEnumValueDescription(change)) {
|
98
|
+
return <Group.EnumValueDescription change={change} />
|
99
|
+
} else if (GraphqlChange.Group.isEnumValueDeprecationReason(change)) {
|
100
|
+
return <Group.EnumValueDeprecationReason change={change} />
|
101
|
+
} else if (GraphqlChange.Group.isInputFieldOperation(change)) {
|
102
|
+
return <Group.InputFieldOperation change={change} />
|
103
|
+
} else if (GraphqlChange.Group.isInputFieldDescription(change)) {
|
104
|
+
return <Group.InputFieldDescription change={change} />
|
105
|
+
} else if (GraphqlChange.Group.isInputFieldDefaultValue(change)) {
|
106
|
+
return <Group.InputFieldDefaultValue change={change} />
|
107
|
+
} else if (GraphqlChange.Group.isUnionMemberOperation(change)) {
|
108
|
+
return <Group.UnionMemberOperation change={change} />
|
109
|
+
} else if (GraphqlChange.Group.isObjectTypeInterfaceOperation(change)) {
|
110
|
+
return <Group.ObjectTypeInterfaceOperation change={change} />
|
111
|
+
} else if (GraphqlChange.Group.isDirectiveOperation(change)) {
|
112
|
+
return <Group.DirectiveOperation change={change} />
|
113
|
+
} else if (GraphqlChange.Group.isDirectiveDescription(change)) {
|
114
|
+
return <Group.DirectiveDescription change={change} />
|
115
|
+
} else if (GraphqlChange.Group.isDirectiveLocationOperation(change)) {
|
116
|
+
return <Group.DirectiveLocationOperation change={change} />
|
117
|
+
} else if (GraphqlChange.Group.isDirectiveArgumentOperation(change)) {
|
118
|
+
return <Group.DirectiveArgumentOperation change={change} />
|
119
|
+
} else if (GraphqlChange.Group.isDirectiveArgument(change)) {
|
120
|
+
return <Group.DirectiveArgument change={change} />
|
121
|
+
} else if (GraphqlChange.Group.isDirectiveArgumentDescription(change)) {
|
122
|
+
return <Group.DirectiveArgumentDescription change={change} />
|
123
|
+
} else if (GraphqlChange.Group.isSchemaRootType(change)) {
|
124
|
+
return <Group.SchemaRootType change={change} />
|
125
|
+
} else if (GraphqlChange.Group.isDirectiveUsage(change)) {
|
126
|
+
return <Group.DirectiveUsage change={change} />
|
127
|
+
} else {
|
128
|
+
neverCase(change)
|
96
129
|
}
|
97
130
|
}
|
@@ -0,0 +1,157 @@
|
|
1
|
+
import {
|
2
|
+
CRITICALITY_CONFIG,
|
3
|
+
isCriticalityBreaking,
|
4
|
+
isCriticalityDangerous,
|
5
|
+
isCriticalitySafe,
|
6
|
+
} from '#lib/graphql-change/criticality'
|
7
|
+
import type { GraphqlChangeset } from '#lib/graphql-changeset/index'
|
8
|
+
import { Box, Flex, Text } from '@radix-ui/themes'
|
9
|
+
import type React from 'react'
|
10
|
+
import { useEffect, useState } from 'react'
|
11
|
+
import { renderDate } from './Changelog.js'
|
12
|
+
|
13
|
+
interface ChangelogLayoutProps {
|
14
|
+
children: React.ReactNode
|
15
|
+
versions: GraphqlChangeset.ChangeSet[]
|
16
|
+
}
|
17
|
+
|
18
|
+
interface VersionCounts {
|
19
|
+
breaking: number
|
20
|
+
dangerous: number
|
21
|
+
safe: number
|
22
|
+
}
|
23
|
+
|
24
|
+
const calculateCounts = (version: GraphqlChangeset.ChangeSet): VersionCounts => {
|
25
|
+
return {
|
26
|
+
breaking: version.changes.filter(isCriticalityBreaking).length,
|
27
|
+
dangerous: version.changes.filter(isCriticalityDangerous).length,
|
28
|
+
safe: version.changes.filter(isCriticalitySafe).length,
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
const SidebarEntry: React.FC<{
|
33
|
+
version: GraphqlChangeset.ChangeSet
|
34
|
+
counts: VersionCounts
|
35
|
+
isActive: boolean
|
36
|
+
}> = ({ version, counts, isActive }) => {
|
37
|
+
const dateId = version.date.toISOString()
|
38
|
+
|
39
|
+
return (
|
40
|
+
<Box mb='2'>
|
41
|
+
<a
|
42
|
+
href={`#${dateId}`}
|
43
|
+
style={{
|
44
|
+
textDecoration: 'none',
|
45
|
+
display: 'flex',
|
46
|
+
alignItems: 'center',
|
47
|
+
justifyContent: 'space-between',
|
48
|
+
padding: '0.5rem 0.75rem',
|
49
|
+
borderRadius: '4px',
|
50
|
+
backgroundColor: isActive ? 'var(--gray-a3)' : 'transparent',
|
51
|
+
color: 'inherit',
|
52
|
+
transition: 'background-color 0.2s',
|
53
|
+
}}
|
54
|
+
onClick={(e) => {
|
55
|
+
e.preventDefault()
|
56
|
+
document.getElementById(dateId)?.scrollIntoView({ behavior: 'smooth' })
|
57
|
+
}}
|
58
|
+
>
|
59
|
+
<Text size='2' weight={isActive ? 'medium' : 'regular'}>
|
60
|
+
{renderDate(version.date)}
|
61
|
+
</Text>
|
62
|
+
<Flex gap='2' align='center'>
|
63
|
+
{counts.breaking > 0 && (
|
64
|
+
<Text size='1' weight='medium' style={{ color: CRITICALITY_CONFIG.BREAKING.color }}>
|
65
|
+
{counts.breaking}
|
66
|
+
</Text>
|
67
|
+
)}
|
68
|
+
{counts.dangerous > 0 && (
|
69
|
+
<Text size='1' weight='medium' style={{ color: CRITICALITY_CONFIG.DANGEROUS.color }}>
|
70
|
+
{counts.dangerous}
|
71
|
+
</Text>
|
72
|
+
)}
|
73
|
+
{counts.safe > 0 && (
|
74
|
+
<Text size='1' weight='medium' style={{ color: CRITICALITY_CONFIG.NON_BREAKING.color }}>
|
75
|
+
{counts.safe}
|
76
|
+
</Text>
|
77
|
+
)}
|
78
|
+
</Flex>
|
79
|
+
</a>
|
80
|
+
</Box>
|
81
|
+
)
|
82
|
+
}
|
83
|
+
|
84
|
+
export const ChangelogLayout: React.FC<ChangelogLayoutProps> = ({ children, versions }) => {
|
85
|
+
const [activeVersion, setActiveVersion] = useState<string | null>(null)
|
86
|
+
|
87
|
+
// Calculate counts for all versions (SSR-safe)
|
88
|
+
const versionsWithCounts = versions.map(version => ({
|
89
|
+
version,
|
90
|
+
counts: calculateCounts(version),
|
91
|
+
}))
|
92
|
+
|
93
|
+
// Set up scroll spy after hydration
|
94
|
+
useEffect(() => {
|
95
|
+
const handleScroll = () => {
|
96
|
+
const scrollPosition = window.scrollY + 100 // Offset for header
|
97
|
+
|
98
|
+
// Find the current version based on scroll position
|
99
|
+
let currentVersion: string | null = null
|
100
|
+
|
101
|
+
for (const { version } of versionsWithCounts) {
|
102
|
+
const element = document.getElementById(version.date.toISOString())
|
103
|
+
if (element) {
|
104
|
+
const { top } = element.getBoundingClientRect()
|
105
|
+
if (top <= 100) {
|
106
|
+
currentVersion = version.date.toISOString()
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
setActiveVersion(currentVersion)
|
112
|
+
}
|
113
|
+
|
114
|
+
// Initial check
|
115
|
+
handleScroll()
|
116
|
+
|
117
|
+
// Add scroll listener
|
118
|
+
window.addEventListener('scroll', handleScroll, { passive: true })
|
119
|
+
|
120
|
+
return () => {
|
121
|
+
window.removeEventListener('scroll', handleScroll)
|
122
|
+
}
|
123
|
+
}, [versionsWithCounts])
|
124
|
+
|
125
|
+
return (
|
126
|
+
<Flex gap='6' style={{ position: 'relative' }}>
|
127
|
+
{/* Sidebar */}
|
128
|
+
<Box
|
129
|
+
style={{
|
130
|
+
position: 'sticky',
|
131
|
+
top: '2rem',
|
132
|
+
height: 'fit-content',
|
133
|
+
minWidth: '250px',
|
134
|
+
maxHeight: 'calc(100vh - 4rem)',
|
135
|
+
overflowY: 'auto',
|
136
|
+
}}
|
137
|
+
>
|
138
|
+
<Text size='2' weight='medium' mb='3' style={{ display: 'block' }}>
|
139
|
+
Releases
|
140
|
+
</Text>
|
141
|
+
{versionsWithCounts.map(({ version, counts }) => (
|
142
|
+
<SidebarEntry
|
143
|
+
key={version.date.toISOString()}
|
144
|
+
version={version}
|
145
|
+
counts={counts}
|
146
|
+
isActive={activeVersion === version.date.toISOString()}
|
147
|
+
/>
|
148
|
+
))}
|
149
|
+
</Box>
|
150
|
+
|
151
|
+
{/* Main content */}
|
152
|
+
<Box style={{ flex: 1, minWidth: 0 }}>
|
153
|
+
{children}
|
154
|
+
</Box>
|
155
|
+
</Flex>
|
156
|
+
)
|
157
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import type { Content } from '#api/content/$'
|
2
|
+
import { Box, Grid } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { useEffect, useState } from 'react'
|
5
|
+
import { useLocation } from 'react-router'
|
6
|
+
import { HamburgerMenu } from '../HamburgerMenu.js'
|
7
|
+
import { Sidebar } from '../sidebar/Sidebar.js'
|
8
|
+
|
9
|
+
interface SidebarLayoutProps {
|
10
|
+
children: React.ReactNode
|
11
|
+
sidebar: Content.Item[]
|
12
|
+
}
|
13
|
+
|
14
|
+
export const SidebarLayout: React.FC<SidebarLayoutProps> = ({ children, sidebar }) => {
|
15
|
+
const location = useLocation()
|
16
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
17
|
+
|
18
|
+
// Close mobile menu on route change
|
19
|
+
useEffect(() => {
|
20
|
+
setMobileMenuOpen(false)
|
21
|
+
}, [location.pathname])
|
22
|
+
|
23
|
+
const isShowSidebar = sidebar && sidebar.length > 0
|
24
|
+
|
25
|
+
return (
|
26
|
+
<Grid
|
27
|
+
areas={{
|
28
|
+
initial: `'content'`,
|
29
|
+
sm: `'content'`,
|
30
|
+
md: `'sidebar sidebar . content content content content content'`,
|
31
|
+
}}
|
32
|
+
rows='auto'
|
33
|
+
columns={{ initial: `1fr`, sm: `1fr`, md: `repeat(8, 1fr)` }}
|
34
|
+
gapX={{ initial: `0`, sm: `0`, md: `2` }}
|
35
|
+
>
|
36
|
+
{/* Mobile menu - only show when sidebar exists */}
|
37
|
+
{isShowSidebar && (
|
38
|
+
<Box display={{ initial: `block`, md: `none` }} mb='4'>
|
39
|
+
<HamburgerMenu
|
40
|
+
isOpen={mobileMenuOpen}
|
41
|
+
onToggle={() => {
|
42
|
+
setMobileMenuOpen(!mobileMenuOpen)
|
43
|
+
}}
|
44
|
+
onClose={() => {
|
45
|
+
setMobileMenuOpen(false)
|
46
|
+
}}
|
47
|
+
sidebarData={sidebar}
|
48
|
+
/>
|
49
|
+
</Box>
|
50
|
+
)}
|
51
|
+
|
52
|
+
{/* Desktop Sidebar */}
|
53
|
+
{isShowSidebar && (
|
54
|
+
<Box
|
55
|
+
display={{ initial: `none`, xs: `none`, sm: `none`, md: `block` }}
|
56
|
+
gridColumn='1 / 3'
|
57
|
+
gridRow='1 / auto'
|
58
|
+
>
|
59
|
+
<Sidebar data={sidebar} />
|
60
|
+
</Box>
|
61
|
+
)}
|
62
|
+
|
63
|
+
<Box gridArea='content / content / auto / 8' className='prose'>
|
64
|
+
{children}
|
65
|
+
</Box>
|
66
|
+
</Grid>
|
67
|
+
)
|
68
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './SidebarLayout.js'
|