canopycms 0.0.63 → 0.0.65
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 +153 -19
- package/dist/ai/generate.d.ts +4 -5
- package/dist/ai/generate.js +0 -1
- package/dist/ai/handler.d.ts +3 -4
- package/dist/ai/handler.js +0 -1
- package/dist/ai/index.d.ts +7 -8
- package/dist/ai/index.js +0 -1
- package/dist/ai/json-to-markdown.d.ts +1 -2
- package/dist/ai/json-to-markdown.js +11 -2
- package/dist/ai/resolve-branch.d.ts +1 -2
- package/dist/ai/resolve-branch.js +0 -1
- package/dist/ai/strip-mdx.d.ts +0 -1
- package/dist/ai/strip-mdx.js +0 -1
- package/dist/ai/to-plain-text.d.ts +4 -1
- package/dist/ai/to-plain-text.js +47 -1
- package/dist/ai/transform-components.d.ts +1 -2
- package/dist/ai/transform-components.js +0 -1
- package/dist/ai/types.d.ts +1 -2
- package/dist/ai/types.js +0 -1
- package/dist/api/admin-branch-health.d.ts +7 -8
- package/dist/api/admin-branch-health.js +0 -1
- package/dist/api/admin.d.ts +16 -17
- package/dist/api/admin.js +0 -1
- package/dist/api/assets.d.ts +8 -9
- package/dist/api/assets.js +9 -1
- package/dist/api/branch-merge.d.ts +3 -4
- package/dist/api/branch-merge.js +0 -1
- package/dist/api/branch-review.d.ts +5 -6
- package/dist/api/branch-review.js +0 -1
- package/dist/api/branch-status.d.ts +15 -16
- package/dist/api/branch-status.js +0 -1
- package/dist/api/branch-withdraw.d.ts +3 -4
- package/dist/api/branch-withdraw.js +0 -1
- package/dist/api/branch.d.ts +13 -14
- package/dist/api/branch.js +0 -1
- package/dist/api/client.d.ts +14 -15
- package/dist/api/client.js +0 -1
- package/dist/api/comments.d.ts +11 -12
- package/dist/api/comments.js +0 -1
- package/dist/api/content.d.ts +22 -24
- package/dist/api/content.js +132 -18
- package/dist/api/entries-constants.d.ts +0 -1
- package/dist/api/entries-constants.js +0 -1
- package/dist/api/entries.d.ts +12 -13
- package/dist/api/entries.js +12 -2
- package/dist/api/github-sync.d.ts +2 -3
- package/dist/api/github-sync.js +0 -1
- package/dist/api/groups.d.ts +6 -7
- package/dist/api/groups.js +0 -1
- package/dist/api/guards.d.ts +2 -3
- package/dist/api/guards.js +0 -1
- package/dist/api/index.d.ts +18 -19
- package/dist/api/index.js +0 -1
- package/dist/api/permissions.d.ts +10 -11
- package/dist/api/permissions.js +0 -1
- package/dist/api/reference-options.d.ts +3 -4
- package/dist/api/reference-options.js +0 -1
- package/dist/api/request-body-hash.d.ts +0 -1
- package/dist/api/request-body-hash.js +0 -1
- package/dist/api/resolve-references.d.ts +6 -7
- package/dist/api/resolve-references.js +24 -6
- package/dist/api/route-builder.d.ts +2 -3
- package/dist/api/route-builder.js +0 -1
- package/dist/api/schema.d.ts +43 -44
- package/dist/api/schema.js +0 -1
- package/dist/api/settings-helpers.d.ts +2 -3
- package/dist/api/settings-helpers.js +0 -1
- package/dist/api/types.d.ts +6 -7
- package/dist/api/types.js +0 -1
- package/dist/api/user.d.ts +2 -3
- package/dist/api/user.js +0 -1
- package/dist/api/validators.d.ts +3 -4
- package/dist/api/validators.js +0 -1
- package/dist/assets/asset-prefixes.d.ts +1 -2
- package/dist/assets/asset-prefixes.js +0 -1
- package/dist/assets/asset-src.d.ts +17 -5
- package/dist/assets/asset-src.js +15 -3
- package/dist/assets/asset-url.d.ts +28 -7
- package/dist/assets/asset-url.js +20 -15
- package/dist/assets/factory.d.ts +2 -3
- package/dist/assets/factory.js +0 -2
- package/dist/assets/finalize.d.ts +2 -3
- package/dist/assets/finalize.js +0 -1
- package/dist/assets/index.d.ts +12 -13
- package/dist/assets/index.js +0 -1
- package/dist/assets/keys.d.ts +1 -2
- package/dist/assets/keys.js +0 -1
- package/dist/assets/pipeline.d.ts +1 -2
- package/dist/assets/pipeline.js +0 -1
- package/dist/assets/store-local.d.ts +1 -2
- package/dist/assets/store-local.js +0 -1
- package/dist/assets/store-s3.d.ts +2 -4
- package/dist/assets/store-s3.js +0 -1
- package/dist/assets/svg-sanitizer.d.ts +0 -1
- package/dist/assets/svg-sanitizer.js +0 -1
- package/dist/assets/transform-directives.d.ts +0 -1
- package/dist/assets/transform-directives.js +0 -1
- package/dist/assets/transform.d.ts +1 -2
- package/dist/assets/transform.js +0 -1
- package/dist/assets/types.d.ts +0 -1
- package/dist/assets/types.js +0 -1
- package/dist/auth/cache.d.ts +2 -3
- package/dist/auth/cache.js +0 -1
- package/dist/auth/caching-auth-plugin.d.ts +3 -4
- package/dist/auth/caching-auth-plugin.js +0 -1
- package/dist/auth/context-helpers.d.ts +1 -2
- package/dist/auth/context-helpers.js +0 -1
- package/dist/auth/file-based-auth-cache.d.ts +3 -4
- package/dist/auth/file-based-auth-cache.js +14 -3
- package/dist/auth/index.d.ts +6 -7
- package/dist/auth/index.js +0 -1
- package/dist/auth/plugin.d.ts +3 -4
- package/dist/auth/plugin.js +0 -1
- package/dist/auth/types.d.ts +1 -2
- package/dist/auth/types.js +0 -1
- package/dist/authorization/branch.d.ts +4 -5
- package/dist/authorization/branch.js +0 -1
- package/dist/authorization/content.d.ts +6 -7
- package/dist/authorization/content.js +0 -1
- package/dist/authorization/groups/index.d.ts +2 -3
- package/dist/authorization/groups/index.js +0 -1
- package/dist/authorization/groups/loader.d.ts +3 -4
- package/dist/authorization/groups/loader.js +0 -1
- package/dist/authorization/groups/schema.d.ts +1 -2
- package/dist/authorization/groups/schema.js +0 -1
- package/dist/authorization/helpers.d.ts +0 -1
- package/dist/authorization/helpers.js +0 -1
- package/dist/authorization/index.d.ts +11 -12
- package/dist/authorization/index.js +0 -1
- package/dist/authorization/path.d.ts +4 -5
- package/dist/authorization/path.js +0 -1
- package/dist/authorization/permissions/index.d.ts +2 -3
- package/dist/authorization/permissions/index.js +0 -1
- package/dist/authorization/permissions/loader.d.ts +4 -5
- package/dist/authorization/permissions/loader.js +0 -1
- package/dist/authorization/permissions/schema.d.ts +2 -3
- package/dist/authorization/permissions/schema.js +0 -1
- package/dist/authorization/protected-branch.d.ts +2 -3
- package/dist/authorization/protected-branch.js +0 -1
- package/dist/authorization/settings-file-store.d.ts +1 -2
- package/dist/authorization/settings-file-store.js +0 -1
- package/dist/authorization/types.d.ts +6 -7
- package/dist/authorization/types.js +0 -1
- package/dist/authorization/validation.d.ts +1 -2
- package/dist/authorization/validation.js +0 -1
- package/dist/branch-health.d.ts +22 -3
- package/dist/branch-health.js +6 -2
- package/dist/branch-metadata.d.ts +2 -3
- package/dist/branch-metadata.js +0 -1
- package/dist/branch-registry.d.ts +1 -2
- package/dist/branch-registry.js +0 -1
- package/dist/branch-schema-cache.d.ts +4 -5
- package/dist/branch-schema-cache.js +0 -1
- package/dist/branch-workspace.d.ts +4 -5
- package/dist/branch-workspace.js +0 -1
- package/dist/build/generate-ai-content.d.ts +21 -5
- package/dist/build/generate-ai-content.js +98 -6
- package/dist/build/index.d.ts +2 -3
- package/dist/build/index.js +0 -1
- package/dist/build-canopy.d.ts +5 -6
- package/dist/build-canopy.js +0 -1
- package/dist/build-mode.d.ts +1 -2
- package/dist/build-mode.js +0 -1
- package/dist/cli/cli.d.ts +18 -2
- package/dist/cli/cli.js +1172 -490
- package/dist/cli/generate-ai-content.d.ts +0 -1
- package/dist/cli/generate-ai-content.js +1000 -360
- package/dist/cli/init.d.ts +1 -2
- package/dist/cli/init.js +43 -6
- package/dist/cli/migrate.d.ts +5 -3
- package/dist/cli/migrate.js +5 -3
- package/dist/cli/project-detect.d.ts +5 -2
- package/dist/cli/project-detect.js +5 -1
- package/dist/cli/project-root.d.ts +0 -1
- package/dist/cli/project-root.js +0 -1
- package/dist/cli/sync.d.ts +0 -1
- package/dist/cli/sync.js +0 -1
- package/dist/cli/template-files/Dockerfile.cms.template +8 -2
- package/dist/cli/template-files/cms-stack.ts.template +33 -6
- package/dist/cli/template-files/deploy-cms.yml.template +29 -14
- package/dist/cli/templates.d.ts +0 -1
- package/dist/cli/templates.js +0 -1
- package/dist/client.d.ts +13 -14
- package/dist/client.js +0 -1
- package/dist/comment-store.d.ts +0 -1
- package/dist/comment-store.js +0 -1
- package/dist/config/flatten.d.ts +1 -2
- package/dist/config/flatten.js +0 -1
- package/dist/config/helpers.d.ts +3 -4
- package/dist/config/helpers.js +2 -2
- package/dist/config/index.d.ts +10 -11
- package/dist/config/index.js +0 -1
- package/dist/config/schemas/collection.d.ts +0 -1
- package/dist/config/schemas/collection.js +0 -1
- package/dist/config/schemas/config.d.ts +7 -4
- package/dist/config/schemas/config.js +12 -1
- package/dist/config/schemas/field.d.ts +3 -1
- package/dist/config/schemas/field.js +5 -1
- package/dist/config/schemas/media.d.ts +0 -1
- package/dist/config/schemas/media.js +0 -1
- package/dist/config/schemas/permissions.d.ts +0 -1
- package/dist/config/schemas/permissions.js +0 -1
- package/dist/config/types.d.ts +55 -9
- package/dist/config/types.js +0 -1
- package/dist/config/validation.d.ts +1 -2
- package/dist/config/validation.js +0 -1
- package/dist/config.d.ts +2 -3
- package/dist/config.js +0 -1
- package/dist/content-id-index.d.ts +1 -2
- package/dist/content-id-index.js +0 -1
- package/dist/content-index-generation.d.ts +0 -1
- package/dist/content-index-generation.js +0 -1
- package/dist/content-index-registry.d.ts +0 -1
- package/dist/content-index-registry.js +0 -1
- package/dist/content-listing.d.ts +75 -59
- package/dist/content-listing.js +76 -83
- package/dist/content-reader.d.ts +4 -5
- package/dist/content-reader.js +22 -3
- package/dist/content-store.d.ts +137 -6
- package/dist/content-store.js +294 -22
- package/dist/content-tree.d.ts +15 -5
- package/dist/content-tree.js +27 -8
- package/dist/context.d.ts +9 -6
- package/dist/context.js +0 -1
- package/dist/dev-content-watcher.d.ts +12 -3
- package/dist/dev-content-watcher.js +120 -30
- package/dist/editor/BranchManager.d.ts +4 -5
- package/dist/editor/BranchManager.js +0 -1
- package/dist/editor/CanopyEditor.d.ts +2 -3
- package/dist/editor/CanopyEditor.js +1 -2
- package/dist/editor/CanopyEditorPage.d.ts +2 -3
- package/dist/editor/CanopyEditorPage.js +0 -1
- package/dist/editor/CommentsPanel.d.ts +2 -3
- package/dist/editor/CommentsPanel.js +0 -1
- package/dist/editor/Editor.d.ts +13 -8
- package/dist/editor/Editor.js +4 -5
- package/dist/editor/EditorPanes.d.ts +0 -1
- package/dist/editor/EditorPanes.js +0 -1
- package/dist/editor/EntryNavigator.d.ts +1 -2
- package/dist/editor/EntryNavigator.js +0 -1
- package/dist/editor/FormRenderer.d.ts +2 -3
- package/dist/editor/FormRenderer.js +22 -3
- package/dist/editor/GroupManager.d.ts +2 -3
- package/dist/editor/GroupManager.js +0 -1
- package/dist/editor/PermissionManager.d.ts +2 -3
- package/dist/editor/PermissionManager.js +0 -1
- package/dist/editor/admin/SystemHealthPanel.d.ts +0 -1
- package/dist/editor/admin/SystemHealthPanel.js +0 -1
- package/dist/editor/admin/useSystemHealth.d.ts +2 -3
- package/dist/editor/admin/useSystemHealth.js +0 -1
- package/dist/editor/canopy-path.d.ts +0 -1
- package/dist/editor/canopy-path.js +0 -1
- package/dist/editor/client-reference-resolver.d.ts +13 -4
- package/dist/editor/client-reference-resolver.js +18 -8
- package/dist/editor/comments/BranchComments.d.ts +2 -3
- package/dist/editor/comments/BranchComments.js +0 -1
- package/dist/editor/comments/EntryComments.d.ts +1 -2
- package/dist/editor/comments/EntryComments.js +0 -1
- package/dist/editor/comments/FieldWrapper.d.ts +1 -2
- package/dist/editor/comments/FieldWrapper.js +0 -1
- package/dist/editor/comments/InlineCommentThread.d.ts +2 -3
- package/dist/editor/comments/InlineCommentThread.js +0 -1
- package/dist/editor/comments/ThreadCarousel.d.ts +2 -3
- package/dist/editor/comments/ThreadCarousel.js +0 -1
- package/dist/editor/components/ConfirmDeleteModal.d.ts +0 -1
- package/dist/editor/components/ConfirmDeleteModal.js +0 -1
- package/dist/editor/components/EditorFooter.d.ts +0 -1
- package/dist/editor/components/EditorFooter.js +0 -1
- package/dist/editor/components/EditorHeader.d.ts +4 -5
- package/dist/editor/components/EditorHeader.js +0 -1
- package/dist/editor/components/EditorSidebar.d.ts +1 -2
- package/dist/editor/components/EditorSidebar.js +0 -1
- package/dist/editor/components/EntryCreateModal.d.ts +0 -1
- package/dist/editor/components/EntryCreateModal.js +21 -10
- package/dist/editor/components/RenameEntryModal.d.ts +0 -1
- package/dist/editor/components/RenameEntryModal.js +0 -1
- package/dist/editor/components/UserBadge.d.ts +2 -3
- package/dist/editor/components/UserBadge.js +0 -1
- package/dist/editor/components/index.d.ts +3 -4
- package/dist/editor/components/index.js +0 -1
- package/dist/editor/context/ApiClientContext.d.ts +9 -3
- package/dist/editor/context/ApiClientContext.js +8 -4
- package/dist/editor/context/AssetContext.d.ts +26 -2
- package/dist/editor/context/AssetContext.js +23 -3
- package/dist/editor/context/EditorStateContext.d.ts +1 -2
- package/dist/editor/context/EditorStateContext.js +0 -1
- package/dist/editor/context/SWRProvider.d.ts +0 -1
- package/dist/editor/context/SWRProvider.js +0 -1
- package/dist/editor/context/index.d.ts +4 -5
- package/dist/editor/context/index.js +0 -1
- package/dist/editor/editor-config.d.ts +2 -3
- package/dist/editor/editor-config.js +0 -1
- package/dist/editor/editor-utils.d.ts +22 -10
- package/dist/editor/editor-utils.js +41 -10
- package/dist/editor/fields/BlockField.d.ts +1 -2
- package/dist/editor/fields/BlockField.js +0 -1
- package/dist/editor/fields/CodeField.d.ts +0 -1
- package/dist/editor/fields/CodeField.js +0 -1
- package/dist/editor/fields/DateTimeField.d.ts +0 -1
- package/dist/editor/fields/DateTimeField.js +0 -1
- package/dist/editor/fields/ImageField.d.ts +1 -2
- package/dist/editor/fields/ImageField.js +0 -1
- package/dist/editor/fields/InlineGroupField.d.ts +2 -3
- package/dist/editor/fields/InlineGroupField.js +0 -1
- package/dist/editor/fields/MarkdownField.d.ts +0 -1
- package/dist/editor/fields/MarkdownField.js +0 -1
- package/dist/editor/fields/MdxImageDialog.d.ts +0 -1
- package/dist/editor/fields/MdxImageDialog.js +0 -1
- package/dist/editor/fields/NumberField.d.ts +0 -1
- package/dist/editor/fields/NumberField.js +0 -1
- package/dist/editor/fields/NumberListField.d.ts +0 -1
- package/dist/editor/fields/NumberListField.js +0 -1
- package/dist/editor/fields/ObjectField.d.ts +11 -2
- package/dist/editor/fields/ObjectField.js +3 -4
- package/dist/editor/fields/ReferenceField.d.ts +0 -1
- package/dist/editor/fields/ReferenceField.js +8 -3
- package/dist/editor/fields/SelectField.d.ts +0 -1
- package/dist/editor/fields/SelectField.js +0 -1
- package/dist/editor/fields/StringListField.d.ts +0 -1
- package/dist/editor/fields/StringListField.js +0 -1
- package/dist/editor/fields/TextField.d.ts +0 -1
- package/dist/editor/fields/TextField.js +0 -1
- package/dist/editor/fields/ToggleField.d.ts +0 -1
- package/dist/editor/fields/ToggleField.js +0 -1
- package/dist/editor/fields/entry-link/EntryLinkContext.d.ts +1 -2
- package/dist/editor/fields/entry-link/EntryLinkContext.js +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.d.ts +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.js +0 -1
- package/dist/editor/fields/entry-link/index.d.ts +2 -3
- package/dist/editor/fields/entry-link/index.js +0 -1
- package/dist/editor/group-manager/ExternalGroupsTab.d.ts +1 -2
- package/dist/editor/group-manager/ExternalGroupsTab.js +0 -1
- package/dist/editor/group-manager/GroupCard.d.ts +1 -2
- package/dist/editor/group-manager/GroupCard.js +0 -1
- package/dist/editor/group-manager/GroupForm.d.ts +1 -2
- package/dist/editor/group-manager/GroupForm.js +0 -1
- package/dist/editor/group-manager/InternalGroupsTab.d.ts +1 -2
- package/dist/editor/group-manager/InternalGroupsTab.js +0 -1
- package/dist/editor/group-manager/MemberList.d.ts +1 -2
- package/dist/editor/group-manager/MemberList.js +0 -1
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.d.ts +1 -2
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.js +0 -1
- package/dist/editor/group-manager/hooks/useGroupState.d.ts +1 -2
- package/dist/editor/group-manager/hooks/useGroupState.js +0 -1
- package/dist/editor/group-manager/hooks/useUserSearch.d.ts +1 -2
- package/dist/editor/group-manager/hooks/useUserSearch.js +0 -1
- package/dist/editor/group-manager/index.d.ts +5 -6
- package/dist/editor/group-manager/index.js +0 -1
- package/dist/editor/group-manager/types.d.ts +4 -5
- package/dist/editor/group-manager/types.js +0 -1
- package/dist/editor/hooks/index.d.ts +14 -15
- package/dist/editor/hooks/index.js +0 -1
- package/dist/editor/hooks/useBranchActions.d.ts +0 -1
- package/dist/editor/hooks/useBranchActions.js +0 -1
- package/dist/editor/hooks/useBranchManager.d.ts +4 -5
- package/dist/editor/hooks/useBranchManager.js +0 -1
- package/dist/editor/hooks/useBranchesData.d.ts +2 -3
- package/dist/editor/hooks/useBranchesData.js +0 -1
- package/dist/editor/hooks/useCommentSystem.d.ts +2 -3
- package/dist/editor/hooks/useCommentSystem.js +0 -1
- package/dist/editor/hooks/useCommentsData.d.ts +2 -3
- package/dist/editor/hooks/useCommentsData.js +0 -1
- package/dist/editor/hooks/useDraftManager.d.ts +3 -4
- package/dist/editor/hooks/useDraftManager.js +0 -1
- package/dist/editor/hooks/useEditorLayout.d.ts +1 -2
- package/dist/editor/hooks/useEditorLayout.js +0 -1
- package/dist/editor/hooks/useEntriesData.d.ts +3 -5
- package/dist/editor/hooks/useEntriesData.js +0 -3
- package/dist/editor/hooks/useEntryLinkResolution.d.ts +2 -3
- package/dist/editor/hooks/useEntryLinkResolution.js +0 -1
- package/dist/editor/hooks/useEntryManager.d.ts +5 -7
- package/dist/editor/hooks/useEntryManager.js +8 -3
- package/dist/editor/hooks/useGroupManager.d.ts +2 -3
- package/dist/editor/hooks/useGroupManager.js +0 -1
- package/dist/editor/hooks/usePermissionManager.d.ts +2 -3
- package/dist/editor/hooks/usePermissionManager.js +0 -1
- package/dist/editor/hooks/useReferenceResolution.d.ts +1 -2
- package/dist/editor/hooks/useReferenceResolution.js +8 -3
- package/dist/editor/hooks/useSchemaManager.d.ts +2 -3
- package/dist/editor/hooks/useSchemaManager.js +0 -1
- package/dist/editor/hooks/useUserContext.d.ts +1 -2
- package/dist/editor/hooks/useUserContext.js +8 -3
- package/dist/editor/hooks/useUserMetadata.d.ts +2 -3
- package/dist/editor/hooks/useUserMetadata.js +0 -1
- package/dist/editor/media/AssetCard.d.ts +1 -2
- package/dist/editor/media/AssetCard.js +0 -1
- package/dist/editor/media/CropStep.d.ts +1 -2
- package/dist/editor/media/CropStep.js +0 -1
- package/dist/editor/media/MediaLibrary.d.ts +1 -2
- package/dist/editor/media/MediaLibrary.js +0 -1
- package/dist/editor/media/MediaLibraryBody.d.ts +1 -2
- package/dist/editor/media/MediaLibraryBody.js +0 -1
- package/dist/editor/media/crop-math.d.ts +1 -2
- package/dist/editor/media/crop-math.js +0 -1
- package/dist/editor/media/upload-asset.d.ts +2 -3
- package/dist/editor/media/upload-asset.js +0 -1
- package/dist/editor/media/upload-constants.d.ts +0 -1
- package/dist/editor/media/upload-constants.js +0 -1
- package/dist/editor/media/useAssetUpload.d.ts +1 -2
- package/dist/editor/media/useAssetUpload.js +0 -1
- package/dist/editor/media/xhr-upload.d.ts +0 -1
- package/dist/editor/media/xhr-upload.js +0 -1
- package/dist/editor/permission-manager/GroupSelector.d.ts +1 -2
- package/dist/editor/permission-manager/GroupSelector.js +0 -1
- package/dist/editor/permission-manager/PermissionEditor.d.ts +1 -2
- package/dist/editor/permission-manager/PermissionEditor.js +0 -1
- package/dist/editor/permission-manager/PermissionLevelBadge.d.ts +1 -2
- package/dist/editor/permission-manager/PermissionLevelBadge.js +0 -1
- package/dist/editor/permission-manager/PermissionTree.d.ts +1 -2
- package/dist/editor/permission-manager/PermissionTree.js +0 -1
- package/dist/editor/permission-manager/UserSelector.d.ts +1 -2
- package/dist/editor/permission-manager/UserSelector.js +0 -1
- package/dist/editor/permission-manager/constants.d.ts +1 -2
- package/dist/editor/permission-manager/constants.js +0 -1
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.d.ts +1 -2
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.js +0 -1
- package/dist/editor/permission-manager/hooks/usePermissionTree.d.ts +2 -3
- package/dist/editor/permission-manager/hooks/usePermissionTree.js +0 -1
- package/dist/editor/permission-manager/index.d.ts +4 -5
- package/dist/editor/permission-manager/index.js +0 -1
- package/dist/editor/permission-manager/types.d.ts +3 -4
- package/dist/editor/permission-manager/types.js +0 -1
- package/dist/editor/permission-manager/utils.d.ts +2 -3
- package/dist/editor/permission-manager/utils.js +0 -1
- package/dist/editor/preview-bridge.d.ts +1 -2
- package/dist/editor/preview-bridge.js +0 -1
- package/dist/editor/relative-time.d.ts +0 -1
- package/dist/editor/relative-time.js +0 -1
- package/dist/editor/schema-editor/CollectionEditor.d.ts +4 -5
- package/dist/editor/schema-editor/CollectionEditor.js +0 -1
- package/dist/editor/schema-editor/EntryTypeEditor.d.ts +2 -3
- package/dist/editor/schema-editor/EntryTypeEditor.js +0 -1
- package/dist/editor/schema-editor/index.d.ts +2 -3
- package/dist/editor/schema-editor/index.js +0 -1
- package/dist/editor/theme.d.ts +0 -1
- package/dist/editor/theme.js +0 -1
- package/dist/editor/utils/env.d.ts +0 -1
- package/dist/editor/utils/env.js +0 -1
- package/dist/entry-link-resolver.d.ts +1 -2
- package/dist/entry-link-resolver.js +0 -1
- package/dist/entry-schema-registry.d.ts +3 -4
- package/dist/entry-schema-registry.js +6 -2
- package/dist/entry-schema.d.ts +114 -3
- package/dist/entry-schema.js +46 -1
- package/dist/git-manager.d.ts +1 -2
- package/dist/git-manager.js +0 -1
- package/dist/github-service.d.ts +1 -2
- package/dist/github-service.js +0 -1
- package/dist/http/handler.d.ts +6 -7
- package/dist/http/handler.js +0 -1
- package/dist/http/index.d.ts +6 -7
- package/dist/http/index.js +0 -1
- package/dist/http/router.d.ts +2 -3
- package/dist/http/router.js +0 -1
- package/dist/http/types.d.ts +0 -1
- package/dist/http/types.js +0 -1
- package/dist/id.d.ts +2 -3
- package/dist/id.js +0 -1
- package/dist/index.d.ts +17 -18
- package/dist/index.js +0 -1
- package/dist/operating-mode/client-safe-strategy.d.ts +1 -2
- package/dist/operating-mode/client-safe-strategy.js +0 -1
- package/dist/operating-mode/client-unsafe-strategy.d.ts +1 -2
- package/dist/operating-mode/client-unsafe-strategy.js +0 -1
- package/dist/operating-mode/client.d.ts +3 -4
- package/dist/operating-mode/client.js +0 -1
- package/dist/operating-mode/deployment-name-fixtures.d.ts +0 -1
- package/dist/operating-mode/deployment-name-fixtures.js +0 -1
- package/dist/operating-mode/deployment-name.d.ts +0 -1
- package/dist/operating-mode/deployment-name.js +0 -1
- package/dist/operating-mode/index.d.ts +5 -6
- package/dist/operating-mode/index.js +0 -1
- package/dist/operating-mode/mode-env.d.ts +1 -2
- package/dist/operating-mode/mode-env.js +0 -1
- package/dist/operating-mode/types.d.ts +2 -3
- package/dist/operating-mode/types.js +0 -1
- package/dist/paths/branch-name.d.ts +1 -2
- package/dist/paths/branch-name.js +0 -1
- package/dist/paths/branch.d.ts +3 -4
- package/dist/paths/branch.js +0 -1
- package/dist/paths/index.d.ts +8 -9
- package/dist/paths/index.js +0 -1
- package/dist/paths/normalize-server.d.ts +1 -2
- package/dist/paths/normalize-server.js +0 -1
- package/dist/paths/normalize.d.ts +1 -2
- package/dist/paths/normalize.js +0 -1
- package/dist/paths/resolve.d.ts +2 -3
- package/dist/paths/resolve.js +0 -1
- package/dist/paths/types.d.ts +0 -1
- package/dist/paths/types.js +0 -1
- package/dist/paths/validation.d.ts +1 -2
- package/dist/paths/validation.js +0 -1
- package/dist/reference-resolver.d.ts +3 -4
- package/dist/reference-resolver.js +0 -1
- package/dist/resolve-canopy-user.d.ts +3 -4
- package/dist/resolve-canopy-user.js +0 -1
- package/dist/resource-generation.d.ts +0 -1
- package/dist/resource-generation.js +0 -1
- package/dist/schema/index.d.ts +3 -4
- package/dist/schema/index.js +0 -1
- package/dist/schema/meta-loader.d.ts +3 -4
- package/dist/schema/meta-loader.js +3 -3
- package/dist/schema/resolver.d.ts +2 -3
- package/dist/schema/resolver.js +0 -1
- package/dist/schema/schema-store-types.d.ts +2 -3
- package/dist/schema/schema-store-types.js +0 -1
- package/dist/schema/schema-store.d.ts +6 -7
- package/dist/schema/schema-store.js +33 -1
- package/dist/schema/types.d.ts +1 -2
- package/dist/schema/types.js +0 -1
- package/dist/server.d.ts +54 -45
- package/dist/server.js +11 -3
- package/dist/services.d.ts +10 -11
- package/dist/services.js +0 -1
- package/dist/settings-workspace.d.ts +12 -15
- package/dist/settings-workspace.js +10 -13
- package/dist/static/index.d.ts +164 -6
- package/dist/static/index.js +242 -7
- package/dist/static/seo.d.ts +8 -30
- package/dist/static/seo.js +19 -46
- package/dist/sync-core.d.ts +0 -1
- package/dist/sync-core.js +0 -1
- package/dist/task-queue/index.d.ts +2 -3
- package/dist/task-queue/index.js +0 -1
- package/dist/task-queue/task-queue.d.ts +1 -2
- package/dist/task-queue/task-queue.js +10 -2
- package/dist/task-queue/types.d.ts +0 -1
- package/dist/task-queue/types.js +0 -1
- package/dist/types.d.ts +3 -4
- package/dist/types.js +0 -1
- package/dist/url-collision.d.ts +86 -0
- package/dist/url-collision.js +186 -0
- package/dist/url-path-resolver.d.ts +11 -2
- package/dist/url-path-resolver.js +37 -5
- package/dist/user.d.ts +3 -4
- package/dist/user.js +0 -1
- package/dist/utils/async-mutex.d.ts +0 -1
- package/dist/utils/async-mutex.js +0 -1
- package/dist/utils/atomic-write.d.ts +0 -1
- package/dist/utils/atomic-write.js +0 -1
- package/dist/utils/body-field.d.ts +12 -2
- package/dist/utils/body-field.js +17 -1
- package/dist/utils/content-serialize.d.ts +37 -0
- package/dist/utils/content-serialize.js +429 -0
- package/dist/utils/content-write-lock.d.ts +12 -16
- package/dist/utils/content-write-lock.js +38 -22
- package/dist/utils/debug.d.ts +0 -1
- package/dist/utils/debug.js +0 -1
- package/dist/utils/entry-url.d.ts +17 -1
- package/dist/utils/entry-url.js +21 -3
- package/dist/utils/error.d.ts +0 -1
- package/dist/utils/error.js +0 -1
- package/dist/utils/flatten-group-fields.d.ts +1 -2
- package/dist/utils/flatten-group-fields.js +0 -1
- package/dist/utils/format.d.ts +1 -2
- package/dist/utils/format.js +0 -1
- package/dist/utils/fs.d.ts +7 -1
- package/dist/utils/fs.js +16 -1
- package/dist/utils/git.d.ts +18 -2
- package/dist/utils/git.js +61 -1
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/utils/occ-json-write.d.ts +0 -1
- package/dist/utils/occ-json-write.js +0 -1
- package/dist/utils/provisioning-lock.d.ts +17 -4
- package/dist/utils/provisioning-lock.js +94 -14
- package/dist/utils/sanitize-href.d.ts +2 -3
- package/dist/utils/sanitize-href.js +2 -3
- package/dist/utils/title-field.d.ts +1 -2
- package/dist/utils/title-field.js +0 -1
- package/dist/utils/typed-filename.d.ts +61 -0
- package/dist/utils/typed-filename.js +92 -0
- package/dist/utils/url-prefix.d.ts +121 -0
- package/dist/utils/url-prefix.js +158 -0
- package/dist/validation/block-structural-keys.d.ts +42 -0
- package/dist/validation/block-structural-keys.js +44 -0
- package/dist/validation/deletion-checker.d.ts +4 -5
- package/dist/validation/deletion-checker.js +0 -1
- package/dist/validation/entry-link-validator.d.ts +2 -3
- package/dist/validation/entry-link-validator.js +0 -1
- package/dist/validation/entry-type-reference-validator.d.ts +1 -2
- package/dist/validation/entry-type-reference-validator.js +0 -1
- package/dist/validation/entry-validator.d.ts +23 -2
- package/dist/validation/entry-validator.js +34 -2
- package/dist/validation/field-traversal.d.ts +28 -4
- package/dist/validation/field-traversal.js +24 -7
- package/dist/validation/reference-validator.d.ts +2 -3
- package/dist/validation/reference-validator.js +0 -1
- package/dist/worker/cms-worker.d.ts +31 -2
- package/dist/worker/cms-worker.js +321 -13
- package/dist/worker/log.d.ts +0 -1
- package/dist/worker/log.js +0 -1
- package/dist/worker/task-queue-config.d.ts +1 -2
- package/dist/worker/task-queue-config.js +0 -1
- package/dist/worker/task-queue.d.ts +3 -4
- package/dist/worker/task-queue.js +0 -1
- package/dist/worker/worker-status.d.ts +1 -2
- package/dist/worker/worker-status.js +0 -1
- package/package.json +3 -6
- package/dist/ai/generate.d.ts.map +0 -1
- package/dist/ai/generate.js.map +0 -1
- package/dist/ai/handler.d.ts.map +0 -1
- package/dist/ai/handler.js.map +0 -1
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/index.js.map +0 -1
- package/dist/ai/json-to-markdown.d.ts.map +0 -1
- package/dist/ai/json-to-markdown.js.map +0 -1
- package/dist/ai/resolve-branch.d.ts.map +0 -1
- package/dist/ai/resolve-branch.js.map +0 -1
- package/dist/ai/strip-mdx.d.ts.map +0 -1
- package/dist/ai/strip-mdx.js.map +0 -1
- package/dist/ai/to-plain-text.d.ts.map +0 -1
- package/dist/ai/to-plain-text.js.map +0 -1
- package/dist/ai/transform-components.d.ts.map +0 -1
- package/dist/ai/transform-components.js.map +0 -1
- package/dist/ai/types.d.ts.map +0 -1
- package/dist/ai/types.js.map +0 -1
- package/dist/api/__test__/mock-client.d.ts +0 -231
- package/dist/api/__test__/mock-client.d.ts.map +0 -1
- package/dist/api/__test__/mock-client.js +0 -388
- package/dist/api/__test__/mock-client.js.map +0 -1
- package/dist/api/admin-branch-health.d.ts.map +0 -1
- package/dist/api/admin-branch-health.js.map +0 -1
- package/dist/api/admin.d.ts.map +0 -1
- package/dist/api/admin.js.map +0 -1
- package/dist/api/assets.d.ts.map +0 -1
- package/dist/api/assets.js.map +0 -1
- package/dist/api/branch-merge.d.ts.map +0 -1
- package/dist/api/branch-merge.js.map +0 -1
- package/dist/api/branch-review.d.ts.map +0 -1
- package/dist/api/branch-review.js.map +0 -1
- package/dist/api/branch-status.d.ts.map +0 -1
- package/dist/api/branch-status.js.map +0 -1
- package/dist/api/branch-withdraw.d.ts.map +0 -1
- package/dist/api/branch-withdraw.js.map +0 -1
- package/dist/api/branch.d.ts.map +0 -1
- package/dist/api/branch.js.map +0 -1
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js.map +0 -1
- package/dist/api/comments.d.ts.map +0 -1
- package/dist/api/comments.js.map +0 -1
- package/dist/api/content.d.ts.map +0 -1
- package/dist/api/content.js.map +0 -1
- package/dist/api/entries-constants.d.ts.map +0 -1
- package/dist/api/entries-constants.js.map +0 -1
- package/dist/api/entries.d.ts.map +0 -1
- package/dist/api/entries.js.map +0 -1
- package/dist/api/github-sync.d.ts.map +0 -1
- package/dist/api/github-sync.js.map +0 -1
- package/dist/api/groups.d.ts.map +0 -1
- package/dist/api/groups.js.map +0 -1
- package/dist/api/guards.d.ts.map +0 -1
- package/dist/api/guards.js.map +0 -1
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/permissions.d.ts.map +0 -1
- package/dist/api/permissions.js.map +0 -1
- package/dist/api/reference-options.d.ts.map +0 -1
- package/dist/api/reference-options.js.map +0 -1
- package/dist/api/request-body-hash.d.ts.map +0 -1
- package/dist/api/request-body-hash.js.map +0 -1
- package/dist/api/resolve-references.d.ts.map +0 -1
- package/dist/api/resolve-references.js.map +0 -1
- package/dist/api/route-builder.d.ts.map +0 -1
- package/dist/api/route-builder.js.map +0 -1
- package/dist/api/schema.d.ts.map +0 -1
- package/dist/api/schema.js.map +0 -1
- package/dist/api/settings-helpers.d.ts.map +0 -1
- package/dist/api/settings-helpers.js.map +0 -1
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js.map +0 -1
- package/dist/api/user.d.ts.map +0 -1
- package/dist/api/user.js.map +0 -1
- package/dist/api/validators.d.ts.map +0 -1
- package/dist/api/validators.js.map +0 -1
- package/dist/assets/asset-prefixes.d.ts.map +0 -1
- package/dist/assets/asset-prefixes.js.map +0 -1
- package/dist/assets/asset-src.d.ts.map +0 -1
- package/dist/assets/asset-src.js.map +0 -1
- package/dist/assets/asset-url.d.ts.map +0 -1
- package/dist/assets/asset-url.js.map +0 -1
- package/dist/assets/factory.d.ts.map +0 -1
- package/dist/assets/factory.js.map +0 -1
- package/dist/assets/finalize.d.ts.map +0 -1
- package/dist/assets/finalize.js.map +0 -1
- package/dist/assets/index.d.ts.map +0 -1
- package/dist/assets/index.js.map +0 -1
- package/dist/assets/keys.d.ts.map +0 -1
- package/dist/assets/keys.js.map +0 -1
- package/dist/assets/pipeline.d.ts.map +0 -1
- package/dist/assets/pipeline.js.map +0 -1
- package/dist/assets/store-local.d.ts.map +0 -1
- package/dist/assets/store-local.js.map +0 -1
- package/dist/assets/store-s3.d.ts.map +0 -1
- package/dist/assets/store-s3.js.map +0 -1
- package/dist/assets/svg-sanitizer.d.ts.map +0 -1
- package/dist/assets/svg-sanitizer.js.map +0 -1
- package/dist/assets/transform-directives.d.ts.map +0 -1
- package/dist/assets/transform-directives.js.map +0 -1
- package/dist/assets/transform.d.ts.map +0 -1
- package/dist/assets/transform.js.map +0 -1
- package/dist/assets/types.d.ts.map +0 -1
- package/dist/assets/types.js.map +0 -1
- package/dist/auth/cache.d.ts.map +0 -1
- package/dist/auth/cache.js.map +0 -1
- package/dist/auth/caching-auth-plugin.d.ts.map +0 -1
- package/dist/auth/caching-auth-plugin.js.map +0 -1
- package/dist/auth/context-helpers.d.ts.map +0 -1
- package/dist/auth/context-helpers.js.map +0 -1
- package/dist/auth/file-based-auth-cache.d.ts.map +0 -1
- package/dist/auth/file-based-auth-cache.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/plugin.d.ts.map +0 -1
- package/dist/auth/plugin.js.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js.map +0 -1
- package/dist/authorization/branch.d.ts.map +0 -1
- package/dist/authorization/branch.js.map +0 -1
- package/dist/authorization/content.d.ts.map +0 -1
- package/dist/authorization/content.js.map +0 -1
- package/dist/authorization/groups/index.d.ts.map +0 -1
- package/dist/authorization/groups/index.js.map +0 -1
- package/dist/authorization/groups/loader.d.ts.map +0 -1
- package/dist/authorization/groups/loader.js.map +0 -1
- package/dist/authorization/groups/schema.d.ts.map +0 -1
- package/dist/authorization/groups/schema.js.map +0 -1
- package/dist/authorization/helpers.d.ts.map +0 -1
- package/dist/authorization/helpers.js.map +0 -1
- package/dist/authorization/index.d.ts.map +0 -1
- package/dist/authorization/index.js.map +0 -1
- package/dist/authorization/path.d.ts.map +0 -1
- package/dist/authorization/path.js.map +0 -1
- package/dist/authorization/permissions/index.d.ts.map +0 -1
- package/dist/authorization/permissions/index.js.map +0 -1
- package/dist/authorization/permissions/loader.d.ts.map +0 -1
- package/dist/authorization/permissions/loader.js.map +0 -1
- package/dist/authorization/permissions/schema.d.ts.map +0 -1
- package/dist/authorization/permissions/schema.js.map +0 -1
- package/dist/authorization/protected-branch.d.ts.map +0 -1
- package/dist/authorization/protected-branch.js.map +0 -1
- package/dist/authorization/settings-file-store.d.ts.map +0 -1
- package/dist/authorization/settings-file-store.js.map +0 -1
- package/dist/authorization/test-utils.d.ts +0 -26
- package/dist/authorization/test-utils.d.ts.map +0 -1
- package/dist/authorization/test-utils.js +0 -23
- package/dist/authorization/test-utils.js.map +0 -1
- package/dist/authorization/types.d.ts.map +0 -1
- package/dist/authorization/types.js.map +0 -1
- package/dist/authorization/validation.d.ts.map +0 -1
- package/dist/authorization/validation.js.map +0 -1
- package/dist/branch-health.d.ts.map +0 -1
- package/dist/branch-health.js.map +0 -1
- package/dist/branch-metadata.d.ts.map +0 -1
- package/dist/branch-metadata.js.map +0 -1
- package/dist/branch-registry.d.ts.map +0 -1
- package/dist/branch-registry.js.map +0 -1
- package/dist/branch-schema-cache.d.ts.map +0 -1
- package/dist/branch-schema-cache.js.map +0 -1
- package/dist/branch-workspace.d.ts.map +0 -1
- package/dist/branch-workspace.js.map +0 -1
- package/dist/build/generate-ai-content.d.ts.map +0 -1
- package/dist/build/generate-ai-content.js.map +0 -1
- package/dist/build/index.d.ts.map +0 -1
- package/dist/build/index.js.map +0 -1
- package/dist/build-canopy.d.ts.map +0 -1
- package/dist/build-canopy.js.map +0 -1
- package/dist/build-mode.d.ts.map +0 -1
- package/dist/build-mode.js.map +0 -1
- package/dist/cli/cli.d.ts.map +0 -1
- package/dist/cli/cli.js.map +0 -1
- package/dist/cli/generate-ai-content.d.ts.map +0 -1
- package/dist/cli/generate-ai-content.js.map +0 -1
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/migrate.d.ts.map +0 -1
- package/dist/cli/migrate.js.map +0 -1
- package/dist/cli/project-detect.d.ts.map +0 -1
- package/dist/cli/project-detect.js.map +0 -1
- package/dist/cli/project-root.d.ts.map +0 -1
- package/dist/cli/project-root.js.map +0 -1
- package/dist/cli/sync.d.ts.map +0 -1
- package/dist/cli/sync.js.map +0 -1
- package/dist/cli/templates.d.ts.map +0 -1
- package/dist/cli/templates.js.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/comment-store.d.ts.map +0 -1
- package/dist/comment-store.js.map +0 -1
- package/dist/config/flatten.d.ts.map +0 -1
- package/dist/config/flatten.js.map +0 -1
- package/dist/config/helpers.d.ts.map +0 -1
- package/dist/config/helpers.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/schemas/collection.d.ts.map +0 -1
- package/dist/config/schemas/collection.js.map +0 -1
- package/dist/config/schemas/config.d.ts.map +0 -1
- package/dist/config/schemas/config.js.map +0 -1
- package/dist/config/schemas/field.d.ts.map +0 -1
- package/dist/config/schemas/field.js.map +0 -1
- package/dist/config/schemas/media.d.ts.map +0 -1
- package/dist/config/schemas/media.js.map +0 -1
- package/dist/config/schemas/permissions.d.ts.map +0 -1
- package/dist/config/schemas/permissions.js.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js.map +0 -1
- package/dist/config/validation.d.ts.map +0 -1
- package/dist/config/validation.js.map +0 -1
- package/dist/config-test.d.ts +0 -20
- package/dist/config-test.d.ts.map +0 -1
- package/dist/config-test.js +0 -49
- package/dist/config-test.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/content-id-index.d.ts.map +0 -1
- package/dist/content-id-index.js.map +0 -1
- package/dist/content-index-generation.d.ts.map +0 -1
- package/dist/content-index-generation.js.map +0 -1
- package/dist/content-index-registry.d.ts.map +0 -1
- package/dist/content-index-registry.js.map +0 -1
- package/dist/content-listing.d.ts.map +0 -1
- package/dist/content-listing.js.map +0 -1
- package/dist/content-reader.d.ts.map +0 -1
- package/dist/content-reader.js.map +0 -1
- package/dist/content-store.d.ts.map +0 -1
- package/dist/content-store.js.map +0 -1
- package/dist/content-tree.d.ts.map +0 -1
- package/dist/content-tree.js.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/dev-content-watcher.d.ts.map +0 -1
- package/dist/dev-content-watcher.js.map +0 -1
- package/dist/editor/BranchManager.d.ts.map +0 -1
- package/dist/editor/BranchManager.js.map +0 -1
- package/dist/editor/CanopyEditor.d.ts.map +0 -1
- package/dist/editor/CanopyEditor.js.map +0 -1
- package/dist/editor/CanopyEditorPage.d.ts.map +0 -1
- package/dist/editor/CanopyEditorPage.js.map +0 -1
- package/dist/editor/CommentsPanel.d.ts.map +0 -1
- package/dist/editor/CommentsPanel.js.map +0 -1
- package/dist/editor/Editor.d.ts.map +0 -1
- package/dist/editor/Editor.js.map +0 -1
- package/dist/editor/EditorPanes.d.ts.map +0 -1
- package/dist/editor/EditorPanes.js.map +0 -1
- package/dist/editor/EntryNavigator.d.ts.map +0 -1
- package/dist/editor/EntryNavigator.js.map +0 -1
- package/dist/editor/FormRenderer.d.ts.map +0 -1
- package/dist/editor/FormRenderer.js.map +0 -1
- package/dist/editor/GroupManager.d.ts.map +0 -1
- package/dist/editor/GroupManager.js.map +0 -1
- package/dist/editor/PermissionManager.d.ts.map +0 -1
- package/dist/editor/PermissionManager.js.map +0 -1
- package/dist/editor/admin/SystemHealthPanel.d.ts.map +0 -1
- package/dist/editor/admin/SystemHealthPanel.js.map +0 -1
- package/dist/editor/admin/useSystemHealth.d.ts.map +0 -1
- package/dist/editor/admin/useSystemHealth.js.map +0 -1
- package/dist/editor/canopy-path.d.ts.map +0 -1
- package/dist/editor/canopy-path.js.map +0 -1
- package/dist/editor/client-reference-resolver.d.ts.map +0 -1
- package/dist/editor/client-reference-resolver.js.map +0 -1
- package/dist/editor/comments/BranchComments.d.ts.map +0 -1
- package/dist/editor/comments/BranchComments.js.map +0 -1
- package/dist/editor/comments/EntryComments.d.ts.map +0 -1
- package/dist/editor/comments/EntryComments.js.map +0 -1
- package/dist/editor/comments/FieldWrapper.d.ts.map +0 -1
- package/dist/editor/comments/FieldWrapper.js.map +0 -1
- package/dist/editor/comments/InlineCommentThread.d.ts.map +0 -1
- package/dist/editor/comments/InlineCommentThread.js.map +0 -1
- package/dist/editor/comments/ThreadCarousel.d.ts.map +0 -1
- package/dist/editor/comments/ThreadCarousel.js.map +0 -1
- package/dist/editor/components/ConfirmDeleteModal.d.ts.map +0 -1
- package/dist/editor/components/ConfirmDeleteModal.js.map +0 -1
- package/dist/editor/components/EditorFooter.d.ts.map +0 -1
- package/dist/editor/components/EditorFooter.js.map +0 -1
- package/dist/editor/components/EditorHeader.d.ts.map +0 -1
- package/dist/editor/components/EditorHeader.js.map +0 -1
- package/dist/editor/components/EditorSidebar.d.ts.map +0 -1
- package/dist/editor/components/EditorSidebar.js.map +0 -1
- package/dist/editor/components/EntryCreateModal.d.ts.map +0 -1
- package/dist/editor/components/EntryCreateModal.js.map +0 -1
- package/dist/editor/components/RenameEntryModal.d.ts.map +0 -1
- package/dist/editor/components/RenameEntryModal.js.map +0 -1
- package/dist/editor/components/UserBadge.d.ts.map +0 -1
- package/dist/editor/components/UserBadge.js.map +0 -1
- package/dist/editor/components/index.d.ts.map +0 -1
- package/dist/editor/components/index.js.map +0 -1
- package/dist/editor/context/ApiClientContext.d.ts.map +0 -1
- package/dist/editor/context/ApiClientContext.js.map +0 -1
- package/dist/editor/context/AssetContext.d.ts.map +0 -1
- package/dist/editor/context/AssetContext.js.map +0 -1
- package/dist/editor/context/EditorStateContext.d.ts.map +0 -1
- package/dist/editor/context/EditorStateContext.js.map +0 -1
- package/dist/editor/context/SWRProvider.d.ts.map +0 -1
- package/dist/editor/context/SWRProvider.js.map +0 -1
- package/dist/editor/context/index.d.ts.map +0 -1
- package/dist/editor/context/index.js.map +0 -1
- package/dist/editor/editor-config.d.ts.map +0 -1
- package/dist/editor/editor-config.js.map +0 -1
- package/dist/editor/editor-utils.d.ts.map +0 -1
- package/dist/editor/editor-utils.js.map +0 -1
- package/dist/editor/fields/BlockField.d.ts.map +0 -1
- package/dist/editor/fields/BlockField.js.map +0 -1
- package/dist/editor/fields/CodeField.d.ts.map +0 -1
- package/dist/editor/fields/CodeField.js.map +0 -1
- package/dist/editor/fields/DateTimeField.d.ts.map +0 -1
- package/dist/editor/fields/DateTimeField.js.map +0 -1
- package/dist/editor/fields/ImageField.d.ts.map +0 -1
- package/dist/editor/fields/ImageField.js.map +0 -1
- package/dist/editor/fields/InlineGroupField.d.ts.map +0 -1
- package/dist/editor/fields/InlineGroupField.js.map +0 -1
- package/dist/editor/fields/MarkdownField.d.ts.map +0 -1
- package/dist/editor/fields/MarkdownField.js.map +0 -1
- package/dist/editor/fields/MdxImageDialog.d.ts.map +0 -1
- package/dist/editor/fields/MdxImageDialog.js.map +0 -1
- package/dist/editor/fields/NumberField.d.ts.map +0 -1
- package/dist/editor/fields/NumberField.js.map +0 -1
- package/dist/editor/fields/NumberListField.d.ts.map +0 -1
- package/dist/editor/fields/NumberListField.js.map +0 -1
- package/dist/editor/fields/ObjectField.d.ts.map +0 -1
- package/dist/editor/fields/ObjectField.js.map +0 -1
- package/dist/editor/fields/ReferenceField.d.ts.map +0 -1
- package/dist/editor/fields/ReferenceField.js.map +0 -1
- package/dist/editor/fields/SelectField.d.ts.map +0 -1
- package/dist/editor/fields/SelectField.js.map +0 -1
- package/dist/editor/fields/StringListField.d.ts.map +0 -1
- package/dist/editor/fields/StringListField.js.map +0 -1
- package/dist/editor/fields/TextField.d.ts.map +0 -1
- package/dist/editor/fields/TextField.js.map +0 -1
- package/dist/editor/fields/ToggleField.d.ts.map +0 -1
- package/dist/editor/fields/ToggleField.js.map +0 -1
- package/dist/editor/fields/entry-link/EntryLinkContext.d.ts.map +0 -1
- package/dist/editor/fields/entry-link/EntryLinkContext.js.map +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.d.ts.map +0 -1
- package/dist/editor/fields/entry-link/InsertEntryLink.js.map +0 -1
- package/dist/editor/fields/entry-link/index.d.ts.map +0 -1
- package/dist/editor/fields/entry-link/index.js.map +0 -1
- package/dist/editor/group-manager/ExternalGroupsTab.d.ts.map +0 -1
- package/dist/editor/group-manager/ExternalGroupsTab.js.map +0 -1
- package/dist/editor/group-manager/GroupCard.d.ts.map +0 -1
- package/dist/editor/group-manager/GroupCard.js.map +0 -1
- package/dist/editor/group-manager/GroupForm.d.ts.map +0 -1
- package/dist/editor/group-manager/GroupForm.js.map +0 -1
- package/dist/editor/group-manager/InternalGroupsTab.d.ts.map +0 -1
- package/dist/editor/group-manager/InternalGroupsTab.js.map +0 -1
- package/dist/editor/group-manager/MemberList.d.ts.map +0 -1
- package/dist/editor/group-manager/MemberList.js.map +0 -1
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.d.ts.map +0 -1
- package/dist/editor/group-manager/hooks/useExternalGroupSearch.js.map +0 -1
- package/dist/editor/group-manager/hooks/useGroupState.d.ts.map +0 -1
- package/dist/editor/group-manager/hooks/useGroupState.js.map +0 -1
- package/dist/editor/group-manager/hooks/useUserSearch.d.ts.map +0 -1
- package/dist/editor/group-manager/hooks/useUserSearch.js.map +0 -1
- package/dist/editor/group-manager/index.d.ts.map +0 -1
- package/dist/editor/group-manager/index.js.map +0 -1
- package/dist/editor/group-manager/types.d.ts.map +0 -1
- package/dist/editor/group-manager/types.js.map +0 -1
- package/dist/editor/hooks/__test__/test-utils.d.ts +0 -164
- package/dist/editor/hooks/__test__/test-utils.d.ts.map +0 -1
- package/dist/editor/hooks/__test__/test-utils.js +0 -203
- package/dist/editor/hooks/__test__/test-utils.js.map +0 -1
- package/dist/editor/hooks/index.d.ts.map +0 -1
- package/dist/editor/hooks/index.js.map +0 -1
- package/dist/editor/hooks/useBranchActions.d.ts.map +0 -1
- package/dist/editor/hooks/useBranchActions.js.map +0 -1
- package/dist/editor/hooks/useBranchManager.d.ts.map +0 -1
- package/dist/editor/hooks/useBranchManager.js.map +0 -1
- package/dist/editor/hooks/useBranchesData.d.ts.map +0 -1
- package/dist/editor/hooks/useBranchesData.js.map +0 -1
- package/dist/editor/hooks/useCommentSystem.d.ts.map +0 -1
- package/dist/editor/hooks/useCommentSystem.js.map +0 -1
- package/dist/editor/hooks/useCommentsData.d.ts.map +0 -1
- package/dist/editor/hooks/useCommentsData.js.map +0 -1
- package/dist/editor/hooks/useDraftManager.d.ts.map +0 -1
- package/dist/editor/hooks/useDraftManager.js.map +0 -1
- package/dist/editor/hooks/useEditorLayout.d.ts.map +0 -1
- package/dist/editor/hooks/useEditorLayout.js.map +0 -1
- package/dist/editor/hooks/useEntriesData.d.ts.map +0 -1
- package/dist/editor/hooks/useEntriesData.js.map +0 -1
- package/dist/editor/hooks/useEntryLinkResolution.d.ts.map +0 -1
- package/dist/editor/hooks/useEntryLinkResolution.js.map +0 -1
- package/dist/editor/hooks/useEntryManager.d.ts.map +0 -1
- package/dist/editor/hooks/useEntryManager.js.map +0 -1
- package/dist/editor/hooks/useGroupManager.d.ts.map +0 -1
- package/dist/editor/hooks/useGroupManager.js.map +0 -1
- package/dist/editor/hooks/usePermissionManager.d.ts.map +0 -1
- package/dist/editor/hooks/usePermissionManager.js.map +0 -1
- package/dist/editor/hooks/useReferenceResolution.d.ts.map +0 -1
- package/dist/editor/hooks/useReferenceResolution.js.map +0 -1
- package/dist/editor/hooks/useSchemaManager.d.ts.map +0 -1
- package/dist/editor/hooks/useSchemaManager.js.map +0 -1
- package/dist/editor/hooks/useUserContext.d.ts.map +0 -1
- package/dist/editor/hooks/useUserContext.js.map +0 -1
- package/dist/editor/hooks/useUserMetadata.d.ts.map +0 -1
- package/dist/editor/hooks/useUserMetadata.js.map +0 -1
- package/dist/editor/media/AssetCard.d.ts.map +0 -1
- package/dist/editor/media/AssetCard.js.map +0 -1
- package/dist/editor/media/CropStep.d.ts.map +0 -1
- package/dist/editor/media/CropStep.js.map +0 -1
- package/dist/editor/media/MediaLibrary.d.ts.map +0 -1
- package/dist/editor/media/MediaLibrary.js.map +0 -1
- package/dist/editor/media/MediaLibraryBody.d.ts.map +0 -1
- package/dist/editor/media/MediaLibraryBody.js.map +0 -1
- package/dist/editor/media/crop-math.d.ts.map +0 -1
- package/dist/editor/media/crop-math.js.map +0 -1
- package/dist/editor/media/upload-asset.d.ts.map +0 -1
- package/dist/editor/media/upload-asset.js.map +0 -1
- package/dist/editor/media/upload-constants.d.ts.map +0 -1
- package/dist/editor/media/upload-constants.js.map +0 -1
- package/dist/editor/media/useAssetUpload.d.ts.map +0 -1
- package/dist/editor/media/useAssetUpload.js.map +0 -1
- package/dist/editor/media/xhr-upload.d.ts.map +0 -1
- package/dist/editor/media/xhr-upload.js.map +0 -1
- package/dist/editor/permission-manager/GroupSelector.d.ts.map +0 -1
- package/dist/editor/permission-manager/GroupSelector.js.map +0 -1
- package/dist/editor/permission-manager/PermissionEditor.d.ts.map +0 -1
- package/dist/editor/permission-manager/PermissionEditor.js.map +0 -1
- package/dist/editor/permission-manager/PermissionLevelBadge.d.ts.map +0 -1
- package/dist/editor/permission-manager/PermissionLevelBadge.js.map +0 -1
- package/dist/editor/permission-manager/PermissionTree.d.ts.map +0 -1
- package/dist/editor/permission-manager/PermissionTree.js.map +0 -1
- package/dist/editor/permission-manager/UserSelector.d.ts.map +0 -1
- package/dist/editor/permission-manager/UserSelector.js.map +0 -1
- package/dist/editor/permission-manager/constants.d.ts.map +0 -1
- package/dist/editor/permission-manager/constants.js.map +0 -1
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.d.ts.map +0 -1
- package/dist/editor/permission-manager/hooks/useGroupsAndUsers.js.map +0 -1
- package/dist/editor/permission-manager/hooks/usePermissionTree.d.ts.map +0 -1
- package/dist/editor/permission-manager/hooks/usePermissionTree.js.map +0 -1
- package/dist/editor/permission-manager/index.d.ts.map +0 -1
- package/dist/editor/permission-manager/index.js.map +0 -1
- package/dist/editor/permission-manager/types.d.ts.map +0 -1
- package/dist/editor/permission-manager/types.js.map +0 -1
- package/dist/editor/permission-manager/utils.d.ts.map +0 -1
- package/dist/editor/permission-manager/utils.js.map +0 -1
- package/dist/editor/preview-bridge.d.ts.map +0 -1
- package/dist/editor/preview-bridge.js.map +0 -1
- package/dist/editor/relative-time.d.ts.map +0 -1
- package/dist/editor/relative-time.js.map +0 -1
- package/dist/editor/schema-editor/CollectionEditor.d.ts.map +0 -1
- package/dist/editor/schema-editor/CollectionEditor.js.map +0 -1
- package/dist/editor/schema-editor/EntryTypeEditor.d.ts.map +0 -1
- package/dist/editor/schema-editor/EntryTypeEditor.js.map +0 -1
- package/dist/editor/schema-editor/index.d.ts.map +0 -1
- package/dist/editor/schema-editor/index.js.map +0 -1
- package/dist/editor/setup-test-dom.d.ts +0 -1
- package/dist/editor/setup-test-dom.d.ts.map +0 -1
- package/dist/editor/setup-test-dom.js +0 -12
- package/dist/editor/setup-test-dom.js.map +0 -1
- package/dist/editor/test-setup.d.ts +0 -6
- package/dist/editor/test-setup.d.ts.map +0 -1
- package/dist/editor/test-setup.js +0 -42
- package/dist/editor/test-setup.js.map +0 -1
- package/dist/editor/theme.d.ts.map +0 -1
- package/dist/editor/theme.js.map +0 -1
- package/dist/editor/utils/env.d.ts.map +0 -1
- package/dist/editor/utils/env.js.map +0 -1
- package/dist/entry-link-resolver.d.ts.map +0 -1
- package/dist/entry-link-resolver.js.map +0 -1
- package/dist/entry-schema-registry.d.ts.map +0 -1
- package/dist/entry-schema-registry.js.map +0 -1
- package/dist/entry-schema.d.ts.map +0 -1
- package/dist/entry-schema.js.map +0 -1
- package/dist/git-manager.d.ts.map +0 -1
- package/dist/git-manager.js.map +0 -1
- package/dist/github-service.d.ts.map +0 -1
- package/dist/github-service.js.map +0 -1
- package/dist/http/handler.d.ts.map +0 -1
- package/dist/http/handler.js.map +0 -1
- package/dist/http/index.d.ts.map +0 -1
- package/dist/http/index.js.map +0 -1
- package/dist/http/router.d.ts.map +0 -1
- package/dist/http/router.js.map +0 -1
- package/dist/http/types.d.ts.map +0 -1
- package/dist/http/types.js.map +0 -1
- package/dist/id.d.ts.map +0 -1
- package/dist/id.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/operating-mode/client-safe-strategy.d.ts.map +0 -1
- package/dist/operating-mode/client-safe-strategy.js.map +0 -1
- package/dist/operating-mode/client-unsafe-strategy.d.ts.map +0 -1
- package/dist/operating-mode/client-unsafe-strategy.js.map +0 -1
- package/dist/operating-mode/client.d.ts.map +0 -1
- package/dist/operating-mode/client.js.map +0 -1
- package/dist/operating-mode/deployment-name-fixtures.d.ts.map +0 -1
- package/dist/operating-mode/deployment-name-fixtures.js.map +0 -1
- package/dist/operating-mode/deployment-name.d.ts.map +0 -1
- package/dist/operating-mode/deployment-name.js.map +0 -1
- package/dist/operating-mode/index.d.ts.map +0 -1
- package/dist/operating-mode/index.js.map +0 -1
- package/dist/operating-mode/mode-env.d.ts.map +0 -1
- package/dist/operating-mode/mode-env.js.map +0 -1
- package/dist/operating-mode/types.d.ts.map +0 -1
- package/dist/operating-mode/types.js.map +0 -1
- package/dist/paths/branch-name.d.ts.map +0 -1
- package/dist/paths/branch-name.js.map +0 -1
- package/dist/paths/branch.d.ts.map +0 -1
- package/dist/paths/branch.js.map +0 -1
- package/dist/paths/index.d.ts.map +0 -1
- package/dist/paths/index.js.map +0 -1
- package/dist/paths/normalize-server.d.ts.map +0 -1
- package/dist/paths/normalize-server.js.map +0 -1
- package/dist/paths/normalize.d.ts.map +0 -1
- package/dist/paths/normalize.js.map +0 -1
- package/dist/paths/resolve.d.ts.map +0 -1
- package/dist/paths/resolve.js.map +0 -1
- package/dist/paths/test-utils.d.ts +0 -22
- package/dist/paths/test-utils.d.ts.map +0 -1
- package/dist/paths/test-utils.js +0 -21
- package/dist/paths/test-utils.js.map +0 -1
- package/dist/paths/types.d.ts.map +0 -1
- package/dist/paths/types.js.map +0 -1
- package/dist/paths/validation.d.ts.map +0 -1
- package/dist/paths/validation.js.map +0 -1
- package/dist/reference-resolver.d.ts.map +0 -1
- package/dist/reference-resolver.js.map +0 -1
- package/dist/resolve-canopy-user.d.ts.map +0 -1
- package/dist/resolve-canopy-user.js.map +0 -1
- package/dist/resource-generation.d.ts.map +0 -1
- package/dist/resource-generation.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/meta-loader.d.ts.map +0 -1
- package/dist/schema/meta-loader.js.map +0 -1
- package/dist/schema/resolver.d.ts.map +0 -1
- package/dist/schema/resolver.js.map +0 -1
- package/dist/schema/schema-store-types.d.ts.map +0 -1
- package/dist/schema/schema-store-types.js.map +0 -1
- package/dist/schema/schema-store.d.ts.map +0 -1
- package/dist/schema/schema-store.js.map +0 -1
- package/dist/schema/types.d.ts.map +0 -1
- package/dist/schema/types.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/services.d.ts.map +0 -1
- package/dist/services.js.map +0 -1
- package/dist/settings-workspace.d.ts.map +0 -1
- package/dist/settings-workspace.js.map +0 -1
- package/dist/static/index.d.ts.map +0 -1
- package/dist/static/index.js.map +0 -1
- package/dist/static/seo.d.ts.map +0 -1
- package/dist/static/seo.js.map +0 -1
- package/dist/sync-core.d.ts.map +0 -1
- package/dist/sync-core.js.map +0 -1
- package/dist/task-queue/index.d.ts.map +0 -1
- package/dist/task-queue/index.js.map +0 -1
- package/dist/task-queue/task-queue.d.ts.map +0 -1
- package/dist/task-queue/task-queue.js.map +0 -1
- package/dist/task-queue/types.d.ts.map +0 -1
- package/dist/task-queue/types.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/url-path-resolver.d.ts.map +0 -1
- package/dist/url-path-resolver.js.map +0 -1
- package/dist/user.d.ts.map +0 -1
- package/dist/user.js.map +0 -1
- package/dist/utils/async-mutex.d.ts.map +0 -1
- package/dist/utils/async-mutex.js.map +0 -1
- package/dist/utils/atomic-write.d.ts.map +0 -1
- package/dist/utils/atomic-write.js.map +0 -1
- package/dist/utils/body-field.d.ts.map +0 -1
- package/dist/utils/body-field.js.map +0 -1
- package/dist/utils/content-write-lock.d.ts.map +0 -1
- package/dist/utils/content-write-lock.js.map +0 -1
- package/dist/utils/debug.d.ts.map +0 -1
- package/dist/utils/debug.js.map +0 -1
- package/dist/utils/entry-url.d.ts.map +0 -1
- package/dist/utils/entry-url.js.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/error.js.map +0 -1
- package/dist/utils/flatten-group-fields.d.ts.map +0 -1
- package/dist/utils/flatten-group-fields.js.map +0 -1
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/occ-json-write.d.ts.map +0 -1
- package/dist/utils/occ-json-write.js.map +0 -1
- package/dist/utils/provisioning-lock.d.ts.map +0 -1
- package/dist/utils/provisioning-lock.js.map +0 -1
- package/dist/utils/sanitize-href.d.ts.map +0 -1
- package/dist/utils/sanitize-href.js.map +0 -1
- package/dist/utils/title-field.d.ts.map +0 -1
- package/dist/utils/title-field.js.map +0 -1
- package/dist/validation/deletion-checker.d.ts.map +0 -1
- package/dist/validation/deletion-checker.js.map +0 -1
- package/dist/validation/entry-link-validator.d.ts.map +0 -1
- package/dist/validation/entry-link-validator.js.map +0 -1
- package/dist/validation/entry-type-reference-validator.d.ts.map +0 -1
- package/dist/validation/entry-type-reference-validator.js.map +0 -1
- package/dist/validation/entry-validator.d.ts.map +0 -1
- package/dist/validation/entry-validator.js.map +0 -1
- package/dist/validation/field-traversal.d.ts.map +0 -1
- package/dist/validation/field-traversal.js.map +0 -1
- package/dist/validation/reference-validator.d.ts.map +0 -1
- package/dist/validation/reference-validator.js.map +0 -1
- package/dist/worker/cms-worker.d.ts.map +0 -1
- package/dist/worker/cms-worker.js.map +0 -1
- package/dist/worker/log.d.ts.map +0 -1
- package/dist/worker/log.js.map +0 -1
- package/dist/worker/task-queue-config.d.ts.map +0 -1
- package/dist/worker/task-queue-config.js.map +0 -1
- package/dist/worker/task-queue.d.ts.map +0 -1
- package/dist/worker/task-queue.js.map +0 -1
- package/dist/worker/worker-status.d.ts.map +0 -1
- package/dist/worker/worker-status.js.map +0 -1
package/README.md
CHANGED
|
@@ -35,6 +35,27 @@ CanopyCMS supports content as
|
|
|
35
35
|
- Markdown (`.md`) and MDX (`.mdx`) with frontmatter
|
|
36
36
|
- Blocks and nested objects via schema definitions
|
|
37
37
|
|
|
38
|
+
CanopyCMS stores and edits markdown but deliberately ships **no renderer** — how your site
|
|
39
|
+
presents markdown is a site decision, and two sites reasonably make it differently.
|
|
40
|
+
|
|
41
|
+
One trap is worth knowing up front, because it fails confusingly: **`react-markdown` does not
|
|
42
|
+
work in a React Server Component.** Rendering its default export from a server component
|
|
43
|
+
crashes a static prerender with `Element type is invalid … got: undefined`, while the same
|
|
44
|
+
code works once it is in the client bundle. Put `'use client'` on your own wrapper component
|
|
45
|
+
to fix it — at the cost of shipping that subtree to the browser. For static prose, a
|
|
46
|
+
build-time renderer (`remark`/`rehype`, or MDX compiled at build time) keeps the component on
|
|
47
|
+
the server instead.
|
|
48
|
+
|
|
49
|
+
**Comments survive editing.** YAML entries and md/mdx frontmatter can carry hand-written
|
|
50
|
+
comments, and a CMS save keeps them — a value the editor didn't touch keeps its comment, its
|
|
51
|
+
quoting, and its block style. JSON has no comment syntax and is unaffected.
|
|
52
|
+
|
|
53
|
+
**Content keys your schema no longer defines are reported, not silently dropped.** Rename or
|
|
54
|
+
remove a field and its old key lingers in every content file that had it; CanopyCMS surfaces
|
|
55
|
+
that on save (a "Saved with warnings" notification) and again during a production build (a
|
|
56
|
+
warning naming the entries and key paths). Neither report rejects the save or fails the build,
|
|
57
|
+
and nothing is stripped — clean up the key or add it back to the schema at your own pace.
|
|
58
|
+
|
|
38
59
|
## How it works (behind the scenes)
|
|
39
60
|
|
|
40
61
|
When a user makes an edit in CanopyCMS, they do so on a branch they choose (or are defaulted into). That branch represents an underlying git branch that they don't see. Behind the scenes, CanopyCMS manages a set of git clones, each tuned to a different branch supporting the branches your users see in the editing interface. When a user saves a change, that change is written to disk. A user can change multiple files on a branch, e.g. to work on changes across files that work together. When they click a button to publish their branch, the changes are committed in git, and a pull request is made. Reviewers can comment on the submission within the editor and users can make changes and resubmit. Reviewers finally accept the change on GitHub by merging the pull request. CanopyCMS then marks the change as complete and archives the branch. Sync jobs refresh clones when upstream changes happen and surface conflicts without dropping a branch's changes. Authorization information for users and groups is stored on disk and managed by CanopyCMS.
|
|
@@ -135,6 +156,21 @@ export type PostContent = TypeFromEntrySchema<typeof postSchema>
|
|
|
135
156
|
|
|
136
157
|
If no field has `isBody: true`, the markdown content defaults to a field named `body`. The `isBody` flag is validated at schema registry load time: at most one per schema, and only on `markdown` or `mdx` fields.
|
|
137
158
|
|
|
159
|
+
**Select fields:**
|
|
160
|
+
|
|
161
|
+
A `select` field infers the **literal union of its own `options`**, not a bare `string` — this is a breaking change if your code was widening a select value into a plain `string`:
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
const postSchema = defineEntrySchema([
|
|
165
|
+
{ name: 'status', type: 'select', options: ['draft', 'published'] },
|
|
166
|
+
])
|
|
167
|
+
|
|
168
|
+
export type PostContent = TypeFromEntrySchema<typeof postSchema>
|
|
169
|
+
// { status: 'draft' | 'published' }
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Options can also be `{ label, value }` objects, in which case the union is built from `value`, not `label`. A field falls back to a bare `string` only when there is nothing literal to infer — no `options`, an empty `options: []`, or an options array typed as the runtime `SelectOption[]` shape rather than inferred by `defineEntrySchema`.
|
|
173
|
+
|
|
138
174
|
_TODO_ show how schemas can be defined across multiple files. Show all the configuration options for schemas.
|
|
139
175
|
|
|
140
176
|
2. **Set up the shared Canopy helper and API routes**
|
|
@@ -238,20 +274,29 @@ export default async function DocPage({ params }: { params: { slug?: string[] }
|
|
|
238
274
|
}
|
|
239
275
|
```
|
|
240
276
|
|
|
241
|
-
For known, fixed
|
|
277
|
+
For a known, fixed path you can still use `read` directly. It addresses an entry by its
|
|
278
|
+
**logical path**, not by URL, so it suits content that has no URL of its own — an entry read for
|
|
279
|
+
embedding, or a singleton pulled into a layout:
|
|
242
280
|
|
|
243
281
|
```ts
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
const { data } = await canopy.read<HomeContent>({ entryPath: 'content/home' })
|
|
251
|
-
return <HomeView data={data} />
|
|
252
|
-
}
|
|
282
|
+
// A snippet is addressed by reference from inside a block; it has no page of its own.
|
|
283
|
+
const canopy = await getCanopy()
|
|
284
|
+
const { data } = await canopy.read<SnippetContent>({
|
|
285
|
+
entryPath: 'content/snippets',
|
|
286
|
+
slug: 'try-canopy',
|
|
287
|
+
})
|
|
253
288
|
```
|
|
254
289
|
|
|
290
|
+
**For a page you actually serve at a URL, prefer `readByUrlPath` above**, and model the entry so
|
|
291
|
+
its natural `urlPath` is that URL. A home page is the case worth spelling out: model it as a root
|
|
292
|
+
`index` entry (`content/home.index.<id>.json`) and it answers at `/`, so the route reads
|
|
293
|
+
`readByUrlPath('/')` and the sitemap advertises it with no special-casing. Reading it instead by
|
|
294
|
+
entry-type path (`{ entryPath: 'content/home' }`, with no `slug` — it defaults to the entry-type
|
|
295
|
+
name) works, but leaves the entry's real `urlPath` as
|
|
296
|
+
`/home` while the route serves `/` — two answers to "where does this live", which every
|
|
297
|
+
URL-derived surface then has to be told about one at a time. The example app in this repo used to
|
|
298
|
+
do that and no longer does.
|
|
299
|
+
|
|
255
300
|
Both methods return `{ data, path }`. `read` throws if the content is missing; `readByUrlPath` returns `null` instead. Pass a `branch` option when you want branch-specific data (e.g., for preview); otherwise it defaults to your configured base branch. Both enforce the same branch/path access rules as the API handlers.
|
|
256
301
|
|
|
257
302
|
**Index entries and URL resolution**
|
|
@@ -259,19 +304,32 @@ Both methods return `{ data, path }`. `read` throws if the content is missing; `
|
|
|
259
304
|
Canopy uses an **index entry convention** for collection landing pages, similar to `index.html` in a web server:
|
|
260
305
|
|
|
261
306
|
- An entry with slug `index` (filename `{type}.index.{id}.{ext}`) acts as the landing page for its collection
|
|
262
|
-
- The URL for an index entry is the **collection's URL**, not `{collection}/index`. For example, an entry at `content/guides/index` has URL `/guides`, not `/guides/index`
|
|
307
|
+
- The URL for an index entry is the **collection's URL**, not `{collection}/index`. For example, an entry at `content/guides/index` has URL `/guides`, not `/guides/index` — and `readByUrlPath('/guides/index')` returns `null` (as do `/guides/Index` and `/guides/INDEX`), since those are not second URLs for it
|
|
263
308
|
- `readByUrlPath('/')` resolves to the content root's index entry (if one exists)
|
|
264
309
|
- Not all collections need an index entry — some are just organizational groupings
|
|
265
310
|
|
|
266
311
|
This convention is applied consistently across the API:
|
|
267
312
|
|
|
268
|
-
| API | Index handling
|
|
269
|
-
| ------------------ |
|
|
270
|
-
| `listEntries` | Each item includes a `urlPath` field with index collapsing applied. `pathSegments` retains the raw structure for consumers that need it.
|
|
271
|
-
| `readByUrlPath` | Automatically tries `slug: 'index'` as a fallback when the direct entry doesn't match. Works for all paths including `/`.
|
|
272
|
-
| `buildContentTree` | Default `buildPath` collapses index entries so tree node paths match the URLs consumers would use.
|
|
313
|
+
| API | Index handling |
|
|
314
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
315
|
+
| `listEntries` | Each item includes a `urlPath` field with index collapsing applied. `pathSegments` retains the raw structure for consumers that need it. |
|
|
316
|
+
| `readByUrlPath` | Automatically tries `slug: 'index'` as a fallback when the direct entry doesn't match. Works for all paths including `/`. A path whose last segment is an index slug (any case) skips the direct-entry attempt, so an index entry is reachable only at its collapsed path. |
|
|
317
|
+
| `buildContentTree` | Default `buildPath` collapses index entries so tree node paths match the URLs consumers would use. |
|
|
318
|
+
|
|
319
|
+
The round-trip property holds in both directions: for every item from `listEntries`, `readByUrlPath(item.urlPath)` resolves to the same entry, and for an index entry no `.../index` spelling does. (Ordinary entries keep case-insensitive matching on the final slug segment.)
|
|
320
|
+
|
|
321
|
+
One known exception, still open: an entry-type name is also resolvable as a URL segment, so an index entry additionally answers at `/<collection>/<entryTypeName>` -- e.g. a root index entry at both `/` and `/home`. Nothing advertises that URL (it is absent from `listEntries` and from static-param generation), so it only matters if you serve a catch-all route. See the `readbyurlpath-entry-type-candidate-phantom-url` task in the CanopyCMS repo.
|
|
273
322
|
|
|
274
|
-
|
|
323
|
+
Two different entries can still compute the same `urlPath` — an entry whose slug matches a sibling collection that also has an `index` entry, or two slugs differing only by case. Only one of them can be served, so a production build fails and names them. `findDuplicateUrlPaths` (exported from `canopycms/server`) runs the same scan on demand.
|
|
324
|
+
|
|
325
|
+
**Resolving references in listings:** `listEntries` and `buildContentTree` read content straight off disk, so by default a `reference` field comes back as a bare id string (or `null`) -- including inside shared/referenced blocks. Pass `resolveReferences: true` and every reference resolves to the referenced entry's data, at any nesting depth, exactly as `read`/`readByUrlPath` return it:
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
const entries = await canopy.listEntries({ resolveReferences: true })
|
|
329
|
+
// entries[0].data.snippet -> { id, slug, collection, urlPath, title, ... }
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Every resolved reference carries a `urlPath` -- the same one `listEntries` publishes for that entry -- so you can build a link without a second lookup. A resolved md/mdx target's body is opt-in **per field**: set `includeBody: true` on the `reference` field definition to pull its prose in too, rather than just its frontmatter. Leave `resolveReferences` off for anything that only needs paths and timestamps, such as a sitemap or `generateStaticParams`.
|
|
275
333
|
|
|
276
334
|
**Collections without index entries:** `readByUrlPath` returns `null` for URLs that map to collections with no index entry. This is by design — Canopy resolves content, not routes. For collection-level pages, use the content tree:
|
|
277
335
|
|
|
@@ -512,6 +570,82 @@ export default defineCanopyConfig({
|
|
|
512
570
|
- Editor build: ships the editor UI + CanopyCMS API routes; handles branch create/switch/save/submit and asset uploads.
|
|
513
571
|
- Modes map to environments: dev for local development, prod on EFS. More deployment guidance will be documented as the branch-rooted APIs and submission flow land.
|
|
514
572
|
|
|
515
|
-
## Assets
|
|
573
|
+
## Assets and media
|
|
574
|
+
|
|
575
|
+
Uploaded images and PDFs go into a content-addressed asset store, and images are served
|
|
576
|
+
through an on-demand transform layer. Both the **local** adapter (for development) and the
|
|
577
|
+
**S3** adapter ship today.
|
|
578
|
+
|
|
579
|
+
```typescript
|
|
580
|
+
// canopycms.config.ts — production
|
|
581
|
+
media: { adapter: 's3', bucket: 'my-site-assets', region: 'us-east-1' }
|
|
582
|
+
|
|
583
|
+
// …or omit `media` entirely for local development
|
|
584
|
+
// (uploads land in .canopy-dev/assets/ via the built-in local adapter)
|
|
585
|
+
```
|
|
516
586
|
|
|
517
|
-
-
|
|
587
|
+
- **Upload** — editors add images from the Media Library drawer, an `image` field, or the MDX
|
|
588
|
+
"Insert Image" dialog. Bytes go straight from the browser to S3 via a presigned POST and
|
|
589
|
+
never pass through your API route. On completion the server sniffs the real file type,
|
|
590
|
+
strips EXIF (including GPS), sanitizes SVGs, and hashes the bytes.
|
|
591
|
+
- **Content addressing** — every asset is keyed by a hash of its contents, so uploads are
|
|
592
|
+
immutable and deduplicated. A draft branch references its images immediately; publishing
|
|
593
|
+
needs no separate asset step.
|
|
594
|
+
- **Delivery** — images are served from `/assets/t/{directives}/…` URLs that resize, crop and
|
|
595
|
+
convert to WebP on first request, then cache immutably. Build responsive markup with the
|
|
596
|
+
exported helpers, which are client-safe:
|
|
597
|
+
|
|
598
|
+
```typescript
|
|
599
|
+
import { assetUrl, assetSrcSet } from 'canopycms'
|
|
600
|
+
|
|
601
|
+
<img
|
|
602
|
+
src={assetUrl(image, { width: 960 })}
|
|
603
|
+
srcSet={assetSrcSet(image, [480, 960, 1600])}
|
|
604
|
+
sizes="(max-width: 700px) 100vw, 960px"
|
|
605
|
+
alt={image.alt}
|
|
606
|
+
width={image.width}
|
|
607
|
+
height={image.height}
|
|
608
|
+
/>
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
SVGs and PDFs are served statically, with no transform.
|
|
612
|
+
|
|
613
|
+
- **Where `/assets` is mounted** — the URLs above are root-relative, because that is what gets
|
|
614
|
+
stored in content and content moves between branches and environments. If your renderer sees
|
|
615
|
+
the asset space somewhere other than the root, pass `baseUrl` and it is applied at render time:
|
|
616
|
+
|
|
617
|
+
```typescript
|
|
618
|
+
<img src={assetUrl(image, { width: 960, baseUrl: ASSET_BASE })} />
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
| Your deployment | `baseUrl` |
|
|
622
|
+
| --------------------------------------------------------- | ------------------------------------------------- |
|
|
623
|
+
| Site at the root (the usual case) | omit it |
|
|
624
|
+
| Site under a Next.js `basePath`, assets served by Next | your `basePath` — e.g. `'/preview-123'` |
|
|
625
|
+
| Assets on CloudFront via `canopycms-cdk`'s `AssetSupport` | omit it — see below |
|
|
626
|
+
| Assets on a separate host or CDN origin | that origin — e.g. `'https://assets.example.com'` |
|
|
627
|
+
|
|
628
|
+
**A `basePath` does not always move the asset space.** Next only auto-prefixes its own
|
|
629
|
+
`Image`/`Link`/`Script`, never a raw string URL — so under `basePath` a plain
|
|
630
|
+
`<img src={assetUrl(image)}>` 404s and needs the prefix. But that is only true when Next is
|
|
631
|
+
what serves `/assets` (the local adapter, `next dev`, or S3 without a distribution), because
|
|
632
|
+
the rewrite Next auto-prefixes is `withCanopy`'s. On a CloudFront deployment the asset
|
|
633
|
+
behaviors are anchored at the distribution root and a `basePath` never moves them, so the
|
|
634
|
+
correct value there is no `baseUrl` at all. Never derive it from `next.config`'s `basePath`
|
|
635
|
+
unconditionally.
|
|
636
|
+
|
|
637
|
+
An `image` field holds a structured value — `{ src, alt, width, height, crop? }` — so alt text
|
|
638
|
+
is enforced and intrinsic dimensions prevent layout shift. Declare an `aspect` (e.g. `'16:9'`)
|
|
639
|
+
to enable the interactive crop step, or `altOptional: true` for decorative images.
|
|
640
|
+
|
|
641
|
+
> **The asset store is site-wide, not branch-scoped.** Assets are content-addressed and shared,
|
|
642
|
+
> which is what lets a branch merge avoid moving files — but it means branch and path ACLs do
|
|
643
|
+
> **not** apply to them. Any authenticated editor can list and fetch every asset in the site,
|
|
644
|
+
> including images uploaded on branches they cannot otherwise access. Treat "uploaded to
|
|
645
|
+
> CanopyCMS" as visible to your whole editorial team.
|
|
646
|
+
|
|
647
|
+
For deployment, the `canopycms-cdk` package ships an `AssetSupport` construct that provisions
|
|
648
|
+
the bucket, the transform Lambda and the CloudFront behaviors. Fuller documentation — every
|
|
649
|
+
config option, the transform directive syntax, and the AWS wiring — is in the
|
|
650
|
+
[project README](https://github.com/safeinsights/canopycms#media-configuration) and
|
|
651
|
+
[docs/deploying-to-aws.md](https://github.com/safeinsights/canopycms/blob/main/docs/deploying-to-aws.md).
|
package/dist/ai/generate.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Reads content from ContentStore, converts to markdown, and produces
|
|
6
6
|
* a manifest + file map.
|
|
7
7
|
*/
|
|
8
|
-
import type { ContentStore } from '../content-store';
|
|
9
|
-
import type { FlatSchemaItem } from '../config';
|
|
10
|
-
import { type EntryLinkUrlResolver } from '../entry-link-resolver';
|
|
11
|
-
import type { AIContentConfig, AIManifest } from './types';
|
|
8
|
+
import type { ContentStore } from '../content-store.js';
|
|
9
|
+
import type { FlatSchemaItem } from '../config/index.js';
|
|
10
|
+
import { type EntryLinkUrlResolver } from '../entry-link-resolver.js';
|
|
11
|
+
import type { AIContentConfig, AIManifest } from './types.js';
|
|
12
12
|
export interface GenerateOptions {
|
|
13
13
|
store: ContentStore;
|
|
14
14
|
flatSchema: FlatSchemaItem[];
|
|
@@ -31,4 +31,3 @@ export interface GenerateResult {
|
|
|
31
31
|
* bundle files, and a manifest.
|
|
32
32
|
*/
|
|
33
33
|
export declare function generateAIContent(options: GenerateOptions): Promise<GenerateResult>;
|
|
34
|
-
//# sourceMappingURL=generate.d.ts.map
|
package/dist/ai/generate.js
CHANGED
package/dist/ai/handler.d.ts
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* export const GET = createAIContentHandler({ config, entrySchemaRegistry })
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
import type { CanopyConfig, FlatSchemaItem } from '../config';
|
|
14
|
-
import type { EntrySchemaRegistry } from '../schema/types';
|
|
15
|
-
import type { AIContentConfig } from './types';
|
|
13
|
+
import type { CanopyConfig, FlatSchemaItem } from '../config/index.js';
|
|
14
|
+
import type { EntrySchemaRegistry } from '../schema/types.js';
|
|
15
|
+
import type { AIContentConfig } from './types.js';
|
|
16
16
|
export interface AIContentHandlerOptions {
|
|
17
17
|
config: CanopyConfig;
|
|
18
18
|
entrySchemaRegistry: EntrySchemaRegistry;
|
|
@@ -35,4 +35,3 @@ export declare function createAIContentHandler(options: AIContentHandlerOptions)
|
|
|
35
35
|
path: string[];
|
|
36
36
|
}>;
|
|
37
37
|
}) => Promise<Response>;
|
|
38
|
-
//# sourceMappingURL=handler.d.ts.map
|
package/dist/ai/handler.js
CHANGED
package/dist/ai/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Provides AI-ready content generation: config helpers,
|
|
5
5
|
* route handler for runtime serving, and content types.
|
|
6
6
|
*/
|
|
7
|
-
export { defineAIContentConfig } from './types';
|
|
8
|
-
export { createAIContentHandler } from './handler';
|
|
9
|
-
export { generateAIContent } from './generate';
|
|
7
|
+
export { defineAIContentConfig } from './types.js';
|
|
8
|
+
export { createAIContentHandler } from './handler.js';
|
|
9
|
+
export { generateAIContent } from './generate.js';
|
|
10
10
|
/**
|
|
11
11
|
* Convert MDX/Markdown body content to plain prose text (for a search index
|
|
12
12
|
* or any other "just the words" consumer). Distinct from the AI-content
|
|
@@ -15,8 +15,7 @@ export { generateAIContent } from './generate';
|
|
|
15
15
|
* full pipeline and why paired custom components keep their inner text
|
|
16
16
|
* while losing their tags.
|
|
17
17
|
*/
|
|
18
|
-
export { toPlainText } from './to-plain-text';
|
|
19
|
-
export type { AIContentConfig, ExcludeConfig, BundleConfig, BundleFilter, FieldTransformFn, FieldTransforms, ComponentProps, ComponentTransformFn, ComponentTransforms, BodyTransformFn, BodyTransforms, EntryTransformFn, EntryTransforms, EntryTransformContext, AIManifest, AIManifestCollection, AIManifestEntry, AIManifestBundle, AIEntry, AIEntryMeta, } from './types';
|
|
20
|
-
export type { AIContentHandlerOptions } from './handler';
|
|
21
|
-
export type { GenerateOptions, GenerateResult } from './generate';
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
18
|
+
export { toPlainText } from './to-plain-text.js';
|
|
19
|
+
export type { AIContentConfig, ExcludeConfig, BundleConfig, BundleFilter, FieldTransformFn, FieldTransforms, ComponentProps, ComponentTransformFn, ComponentTransforms, BodyTransformFn, BodyTransforms, EntryTransformFn, EntryTransforms, EntryTransformContext, AIManifest, AIManifestCollection, AIManifestEntry, AIManifestBundle, AIEntry, AIEntryMeta, } from './types.js';
|
|
20
|
+
export type { AIContentHandlerOptions } from './handler.js';
|
|
21
|
+
export type { GenerateOptions, GenerateResult } from './generate.js';
|
package/dist/ai/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Converts a single entry's data + schema fields to clean markdown.
|
|
5
5
|
* Handles all CanopyCMS field types including nested objects and blocks.
|
|
6
6
|
*/
|
|
7
|
-
import type { AIEntry, AIContentConfig } from './types';
|
|
7
|
+
import type { AIEntry, AIContentConfig } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Convert an entry to clean markdown suitable for AI consumption.
|
|
10
10
|
*
|
|
@@ -12,4 +12,3 @@ import type { AIEntry, AIContentConfig } from './types';
|
|
|
12
12
|
* For JSON entries: full schema-driven conversion of all fields.
|
|
13
13
|
*/
|
|
14
14
|
export declare function entryToMarkdown(entry: AIEntry, config?: AIContentConfig): string;
|
|
15
|
-
//# sourceMappingURL=json-to-markdown.d.ts.map
|
|
@@ -122,7 +122,11 @@ function renderField(field, value, depth, entry, config) {
|
|
|
122
122
|
}
|
|
123
123
|
const label = field.label || field.name;
|
|
124
124
|
const heading = '#'.repeat(Math.min(depth, 6));
|
|
125
|
-
|
|
125
|
+
// `_…_`, not `*…*`: Prettier's markdown formatter normalizes emphasis to underscores, so
|
|
126
|
+
// asterisks here make every generated file dirty under a standard `prettier --write` pass.
|
|
127
|
+
// Adopters run this output through their own formatting, so emitting the form Prettier
|
|
128
|
+
// already agrees with is what keeps a regenerated bundle diff-free.
|
|
129
|
+
const descriptionLine = 'description' in field && field.description ? `\n\n_${field.description}_` : '';
|
|
126
130
|
// Handle list fields
|
|
127
131
|
if ('list' in field && field.list && Array.isArray(value)) {
|
|
128
132
|
return renderListField(field, value, depth, label, heading, descriptionLine, entry, config);
|
|
@@ -478,9 +482,14 @@ function formatInlineValue(field, value) {
|
|
|
478
482
|
* Wraps in quotes if value contains special characters.
|
|
479
483
|
*/
|
|
480
484
|
function yamlValue(value) {
|
|
485
|
+
// An empty value must be quoted, not emitted bare. A bare `key: ` leaves a trailing space that
|
|
486
|
+
// Prettier strips (making every regenerated bundle dirty), and reads as YAML null rather than
|
|
487
|
+
// the empty string it actually is. Reachable in practice: a root-collection entry has
|
|
488
|
+
// `collection === ''`.
|
|
489
|
+
if (value === '')
|
|
490
|
+
return '""';
|
|
481
491
|
if (/[:#{}[\],&*?|>!%@`]/.test(value) || value.includes('\n')) {
|
|
482
492
|
return `"${value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
|
|
483
493
|
}
|
|
484
494
|
return value;
|
|
485
495
|
}
|
|
486
|
-
//# sourceMappingURL=json-to-markdown.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared branch root resolution for AI content generation.
|
|
3
3
|
* Used by both the route handler and build utility.
|
|
4
4
|
*/
|
|
5
|
-
import type { CanopyConfig } from '../config';
|
|
5
|
+
import type { CanopyConfig } from '../config/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Resolve the branch root directory for reading content.
|
|
8
8
|
*
|
|
@@ -15,4 +15,3 @@ import type { CanopyConfig } from '../config';
|
|
|
15
15
|
* 3. Fall back to `defaultBaseBranch` or 'main'
|
|
16
16
|
*/
|
|
17
17
|
export declare function resolveBranchRoot(config: CanopyConfig): Promise<string>;
|
|
18
|
-
//# sourceMappingURL=resolve-branch.d.ts.map
|
package/dist/ai/strip-mdx.d.ts
CHANGED
package/dist/ai/strip-mdx.js
CHANGED
|
@@ -48,10 +48,13 @@
|
|
|
48
48
|
* text are kept, everything else is discarded. Paired custom components
|
|
49
49
|
* lose only their tags; the prose between them survives.
|
|
50
50
|
*
|
|
51
|
+
* HTML/MDX comments (`<!-- ... -->`) are removed along with their contents:
|
|
52
|
+
* an authoring note is text the author marked as not-for-readers, so it does
|
|
53
|
+
* not belong in a search index or an AI export.
|
|
54
|
+
*
|
|
51
55
|
* Output preserves paragraph breaks (blank lines) but is not further
|
|
52
56
|
* chunked, weighted, or field-selected — composing that into a search
|
|
53
57
|
* document is left to the caller, since that logic is where adopter search
|
|
54
58
|
* indexes genuinely diverge (see docs/adopter-migration.md).
|
|
55
59
|
*/
|
|
56
60
|
export declare function toPlainText(markdown: string): string;
|
|
57
|
-
//# sourceMappingURL=to-plain-text.d.ts.map
|
package/dist/ai/to-plain-text.js
CHANGED
|
@@ -73,6 +73,48 @@ const ATTR_CONTENT = `(?:[^<>"']|"[^"]*"|'[^']*')*`;
|
|
|
73
73
|
* its own, so removing the `\s*` changes no matched output.
|
|
74
74
|
*/
|
|
75
75
|
const TAG_RE = new RegExp(`<\\/?([A-Za-z][\\w.-]*)?(?:\\s${ATTR_CONTENT})?\\/?>`, 'g');
|
|
76
|
+
const COMMENT_OPEN = '<!--';
|
|
77
|
+
const COMMENT_CLOSE = '-->';
|
|
78
|
+
/**
|
|
79
|
+
* Strip well-formed HTML/MDX comments (`<!-- ... -->`), including their contents.
|
|
80
|
+
*
|
|
81
|
+
* `TAG_RE` cannot do this: its tag-name group is `[A-Za-z]`-initial, so `<!--` matches neither
|
|
82
|
+
* the name nor the bare-fragment form, and both delimiters plus every word between them survive
|
|
83
|
+
* into the extracted text. Authoring notes then show up verbatim in a search index or an AI
|
|
84
|
+
* export — text the author explicitly marked as not-for-readers.
|
|
85
|
+
*
|
|
86
|
+
* A hand-rolled `indexOf` scan rather than `/<!--[\s\S]*?-->/g`, for the same reason
|
|
87
|
+
* `maskFencedCodeBlocks` above is hand-rolled: that lazy pattern has no bound on how far it
|
|
88
|
+
* scans looking for a closer, so on input with many unterminated `<!--` openers the engine
|
|
89
|
+
* exhausts to end-of-string at every one of them — quadratic in the number of openers, the same
|
|
90
|
+
* polynomial-ReDoS shape documented on `TAG_RE` and the fence scanner. This scan visits each
|
|
91
|
+
* character at most once.
|
|
92
|
+
*
|
|
93
|
+
* An UNTERMINATED `<!--` is deliberately left alone rather than swallowing the rest of the
|
|
94
|
+
* document. HTML would run such a comment to EOF, but here the input is prose being extracted
|
|
95
|
+
* for search and AI consumption, where silently dropping everything after a mistyped delimiter
|
|
96
|
+
* loses far more than it protects. The stray `<!--` survives as literal text, which is visible
|
|
97
|
+
* and fixable; a vanished second half of a document is neither.
|
|
98
|
+
*
|
|
99
|
+
* Runs while fenced/inline code is still masked, so a comment shown as example code keeps its
|
|
100
|
+
* delimiters.
|
|
101
|
+
*/
|
|
102
|
+
function stripHtmlComments(text) {
|
|
103
|
+
let searchFrom = 0;
|
|
104
|
+
let open = text.indexOf(COMMENT_OPEN, searchFrom);
|
|
105
|
+
if (open === -1)
|
|
106
|
+
return text;
|
|
107
|
+
let out = '';
|
|
108
|
+
while (open !== -1) {
|
|
109
|
+
const close = text.indexOf(COMMENT_CLOSE, open + COMMENT_OPEN.length);
|
|
110
|
+
if (close === -1)
|
|
111
|
+
break;
|
|
112
|
+
out += text.slice(searchFrom, open) + ' ';
|
|
113
|
+
searchFrom = close + COMMENT_CLOSE.length;
|
|
114
|
+
open = text.indexOf(COMMENT_OPEN, searchFrom);
|
|
115
|
+
}
|
|
116
|
+
return out + text.slice(searchFrom);
|
|
117
|
+
}
|
|
76
118
|
/** True if `line` is a valid closing fence line for `marker` ("```" or "~~~"): the marker
|
|
77
119
|
* followed by nothing but whitespace through end of line — matching what `\1\s*$` required in
|
|
78
120
|
* the regex this replaced. */
|
|
@@ -235,6 +277,10 @@ function collapseWhitespace(text) {
|
|
|
235
277
|
* text are kept, everything else is discarded. Paired custom components
|
|
236
278
|
* lose only their tags; the prose between them survives.
|
|
237
279
|
*
|
|
280
|
+
* HTML/MDX comments (`<!-- ... -->`) are removed along with their contents:
|
|
281
|
+
* an authoring note is text the author marked as not-for-readers, so it does
|
|
282
|
+
* not belong in a search index or an AI export.
|
|
283
|
+
*
|
|
238
284
|
* Output preserves paragraph breaks (blank lines) but is not further
|
|
239
285
|
* chunked, weighted, or field-selected — composing that into a search
|
|
240
286
|
* document is left to the caller, since that logic is where adopter search
|
|
@@ -245,6 +291,7 @@ export function toPlainText(markdown) {
|
|
|
245
291
|
const withoutImports = stripMdxImports(content);
|
|
246
292
|
const { masked, restore } = maskCode(withoutImports);
|
|
247
293
|
let result = masked;
|
|
294
|
+
result = stripHtmlComments(result);
|
|
248
295
|
result = result.replace(TAG_RE, ' ');
|
|
249
296
|
result = stripBraceExpressions(result);
|
|
250
297
|
result = stripMarkdownSyntax(result);
|
|
@@ -252,4 +299,3 @@ export function toPlainText(markdown) {
|
|
|
252
299
|
result = collapseWhitespace(result);
|
|
253
300
|
return result;
|
|
254
301
|
}
|
|
255
|
-
//# sourceMappingURL=to-plain-text.js.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* components, so nested components are handled naturally (inner first,
|
|
10
10
|
* outer on subsequent passes).
|
|
11
11
|
*/
|
|
12
|
-
import type { ComponentProps, ComponentTransforms } from './types';
|
|
12
|
+
import type { ComponentProps, ComponentTransforms } from './types.js';
|
|
13
13
|
/**
|
|
14
14
|
* Parse JSX attribute string into a props object.
|
|
15
15
|
*
|
|
@@ -24,4 +24,3 @@ export declare function parseComponentProps(attrString: string): ComponentProps;
|
|
|
24
24
|
* handle nesting (inner components first, outer on subsequent passes).
|
|
25
25
|
*/
|
|
26
26
|
export declare function applyComponentTransforms(body: string, transforms: ComponentTransforms): string;
|
|
27
|
-
//# sourceMappingURL=transform-components.d.ts.map
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These types define the configuration for generating AI-consumable markdown
|
|
5
5
|
* from CanopyCMS content, and the output manifest/metadata structures.
|
|
6
6
|
*/
|
|
7
|
-
import type { FieldConfig } from '../config';
|
|
7
|
+
import type { FieldConfig } from '../config/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Metadata about an entry, provided to filter/predicate functions.
|
|
10
10
|
* Does not include the full data payload — use `where` predicates for
|
|
@@ -234,4 +234,3 @@ export interface AIEntry extends AIEntryMeta {
|
|
|
234
234
|
*/
|
|
235
235
|
appendedSections?: string;
|
|
236
236
|
}
|
|
237
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/ai/types.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* (double-hold on purge, release-then-save ordering on repair).
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
-
import type { BranchAccessControl, BranchMetadata, BranchStatus } from '../types';
|
|
14
|
-
import { type BranchHealthEntry } from '../branch-health';
|
|
15
|
-
import type { ApiResponse } from './types';
|
|
13
|
+
import type { BranchAccessControl, BranchMetadata, BranchStatus } from '../types.js';
|
|
14
|
+
import { type BranchHealthEntry } from '../branch-health.js';
|
|
15
|
+
import type { ApiResponse } from './types.js';
|
|
16
16
|
export interface BranchHealthData {
|
|
17
17
|
entries: BranchHealthEntry[];
|
|
18
18
|
generatedAt: string;
|
|
@@ -73,22 +73,22 @@ export type BranchDirParams = z.infer<typeof branchDirParamsSchema>;
|
|
|
73
73
|
* router/generate-client import.
|
|
74
74
|
*/
|
|
75
75
|
export declare const ADMIN_BRANCH_HEALTH_ROUTES: {
|
|
76
|
-
readonly branchHealth: import("./route-builder").RouteDefinition<undefined, undefined, BranchHealthResponse>;
|
|
77
|
-
readonly purgeBranchDir: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
76
|
+
readonly branchHealth: import("./route-builder.js").RouteDefinition<undefined, undefined, BranchHealthResponse>;
|
|
77
|
+
readonly purgeBranchDir: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
78
78
|
dirName: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
dirName: string;
|
|
81
81
|
}, {
|
|
82
82
|
dirName: string;
|
|
83
83
|
}>, undefined, PurgeBranchDirResponse>;
|
|
84
|
-
readonly repairBranchDir: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
84
|
+
readonly repairBranchDir: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
85
85
|
dirName: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
dirName: string;
|
|
88
88
|
}, {
|
|
89
89
|
dirName: string;
|
|
90
90
|
}>, undefined, RepairBranchDirResponse>;
|
|
91
|
-
readonly repairContentDuplicates: import("./route-builder").RouteDefinition<z.ZodObject<{
|
|
91
|
+
readonly repairContentDuplicates: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
92
92
|
dirName: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
93
93
|
}, "strip", z.ZodTypeAny, {
|
|
94
94
|
dirName: string;
|
|
@@ -97,4 +97,3 @@ export declare const ADMIN_BRANCH_HEALTH_ROUTES: {
|
|
|
97
97
|
}>, undefined, RepairContentDuplicatesResponse>;
|
|
98
98
|
};
|
|
99
99
|
export {};
|
|
100
|
-
//# sourceMappingURL=admin-branch-health.d.ts.map
|