@conloca/cms-spa 0.1.16 → 0.2.1
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 +1 -1
- package/dist/spa/main.css +3725 -3781
- package/dist/ts/App.d.ts +35 -0
- package/dist/ts/App.d.ts.map +1 -0
- package/dist/ts/App.js +53 -0
- package/dist/ts/App.js.map +1 -0
- package/dist/ts/CmsSpaApp.d.ts +13 -0
- package/dist/ts/CmsSpaApp.d.ts.map +1 -0
- package/dist/ts/CmsSpaApp.js +50 -0
- package/dist/ts/CmsSpaApp.js.map +1 -0
- package/dist/ts/components/CMSDashboard.d.ts +2 -0
- package/dist/ts/components/CMSDashboard.d.ts.map +1 -0
- package/dist/ts/components/CMSDashboard.js +21 -0
- package/dist/ts/components/CMSDashboard.js.map +1 -0
- package/dist/ts/components/CMSLayout.d.ts +2 -0
- package/dist/ts/components/CMSLayout.d.ts.map +1 -0
- package/dist/ts/components/CMSLayout.js +15 -0
- package/dist/ts/components/CMSLayout.js.map +1 -0
- package/dist/ts/components/ConlocaLogo.d.ts +2 -0
- package/dist/ts/components/ConlocaLogo.d.ts.map +1 -0
- package/dist/ts/components/ConlocaLogo.js +5 -0
- package/dist/ts/components/ConlocaLogo.js.map +1 -0
- package/dist/ts/components/GitStatusPanel.d.ts +21 -0
- package/dist/ts/components/GitStatusPanel.d.ts.map +1 -0
- package/dist/ts/components/GitStatusPanel.js +74 -0
- package/dist/ts/components/GitStatusPanel.js.map +1 -0
- package/dist/ts/components/MobileTopBar.d.ts +6 -0
- package/dist/ts/components/MobileTopBar.d.ts.map +1 -0
- package/dist/ts/components/MobileTopBar.js +7 -0
- package/dist/ts/components/MobileTopBar.js.map +1 -0
- package/dist/ts/components/Sidebar.d.ts +8 -0
- package/dist/ts/components/Sidebar.d.ts.map +1 -0
- package/dist/ts/components/Sidebar.js +41 -0
- package/dist/ts/components/Sidebar.js.map +1 -0
- package/dist/ts/components/UserAvatar.d.ts +2 -0
- package/dist/ts/components/UserAvatar.d.ts.map +1 -0
- package/dist/ts/components/UserAvatar.js +15 -0
- package/dist/ts/components/UserAvatar.js.map +1 -0
- package/dist/ts/components/cards/DataEntryCard.d.ts +14 -0
- package/dist/ts/components/cards/DataEntryCard.d.ts.map +1 -0
- package/dist/ts/components/cards/DataEntryCard.js +39 -0
- package/dist/ts/components/cards/DataEntryCard.js.map +1 -0
- package/dist/ts/components/cards/SectionCard.d.ts +15 -0
- package/dist/ts/components/cards/SectionCard.d.ts.map +1 -0
- package/dist/ts/components/cards/SectionCard.js +11 -0
- package/dist/ts/components/cards/SectionCard.js.map +1 -0
- package/dist/ts/components/cards/index.d.ts +2 -0
- package/dist/ts/components/cards/index.d.ts.map +1 -0
- package/dist/ts/components/cards/index.js +2 -0
- package/dist/ts/components/cards/index.js.map +1 -0
- package/dist/ts/components/dashboard/RecentActivity.d.ts +2 -0
- package/dist/ts/components/dashboard/RecentActivity.d.ts.map +1 -0
- package/dist/ts/components/dashboard/RecentActivity.js +58 -0
- package/dist/ts/components/dashboard/RecentActivity.js.map +1 -0
- package/dist/ts/components/dialog.d.ts +53 -0
- package/dist/ts/components/dialog.d.ts.map +1 -0
- package/dist/ts/components/dialog.js +57 -0
- package/dist/ts/components/dialog.js.map +1 -0
- package/dist/ts/components/dialogs/ConflictDialog.d.ts +10 -0
- package/dist/ts/components/dialogs/ConflictDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/ConflictDialog.js +28 -0
- package/dist/ts/components/dialogs/ConflictDialog.js.map +1 -0
- package/dist/ts/components/dialogs/CreateDataDialog.d.ts +9 -0
- package/dist/ts/components/dialogs/CreateDataDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/CreateDataDialog.js +21 -0
- package/dist/ts/components/dialogs/CreateDataDialog.js.map +1 -0
- package/dist/ts/components/dialogs/CreateFolderDialog.d.ts +11 -0
- package/dist/ts/components/dialogs/CreateFolderDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/CreateFolderDialog.js +39 -0
- package/dist/ts/components/dialogs/CreateFolderDialog.js.map +1 -0
- package/dist/ts/components/dialogs/CreatePageDialog.d.ts +11 -0
- package/dist/ts/components/dialogs/CreatePageDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/CreatePageDialog.js +237 -0
- package/dist/ts/components/dialogs/CreatePageDialog.js.map +1 -0
- package/dist/ts/components/dialogs/DataPropertiesDialog.d.ts +10 -0
- package/dist/ts/components/dialogs/DataPropertiesDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/DataPropertiesDialog.js +39 -0
- package/dist/ts/components/dialogs/DataPropertiesDialog.js.map +1 -0
- package/dist/ts/components/dialogs/DeleteConfirmDialog.d.ts +12 -0
- package/dist/ts/components/dialogs/DeleteConfirmDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/DeleteConfirmDialog.js +8 -0
- package/dist/ts/components/dialogs/DeleteConfirmDialog.js.map +1 -0
- package/dist/ts/components/dialogs/ErrorModal.d.ts +14 -0
- package/dist/ts/components/dialogs/ErrorModal.d.ts.map +1 -0
- package/dist/ts/components/dialogs/ErrorModal.js +43 -0
- package/dist/ts/components/dialogs/ErrorModal.js.map +1 -0
- package/dist/ts/components/dialogs/FragmentPropertiesDialog.d.ts +12 -0
- package/dist/ts/components/dialogs/FragmentPropertiesDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/FragmentPropertiesDialog.js +43 -0
- package/dist/ts/components/dialogs/FragmentPropertiesDialog.js.map +1 -0
- package/dist/ts/components/dialogs/MoveFolderDialog.d.ts +12 -0
- package/dist/ts/components/dialogs/MoveFolderDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/MoveFolderDialog.js +69 -0
- package/dist/ts/components/dialogs/MoveFolderDialog.js.map +1 -0
- package/dist/ts/components/dialogs/PageMetadataDialog.d.ts +31 -0
- package/dist/ts/components/dialogs/PageMetadataDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/PageMetadataDialog.js +154 -0
- package/dist/ts/components/dialogs/PageMetadataDialog.js.map +1 -0
- package/dist/ts/components/dialogs/UnsavedChangesDialog.d.ts +8 -0
- package/dist/ts/components/dialogs/UnsavedChangesDialog.d.ts.map +1 -0
- package/dist/ts/components/dialogs/UnsavedChangesDialog.js +7 -0
- package/dist/ts/components/dialogs/UnsavedChangesDialog.js.map +1 -0
- package/dist/ts/components/dialogs/index.d.ts +9 -0
- package/dist/ts/components/dialogs/index.d.ts.map +1 -0
- package/dist/ts/components/dialogs/index.js +9 -0
- package/dist/ts/components/dialogs/index.js.map +1 -0
- package/dist/ts/components/editor/CMSMDXEditor.d.ts +14 -0
- package/dist/ts/components/editor/CMSMDXEditor.d.ts.map +1 -0
- package/dist/ts/components/editor/CMSMDXEditor.js +209 -0
- package/dist/ts/components/editor/CMSMDXEditor.js.map +1 -0
- package/dist/ts/components/editor/ContentDiff.d.ts +10 -0
- package/dist/ts/components/editor/ContentDiff.d.ts.map +1 -0
- package/dist/ts/components/editor/ContentDiff.js +52 -0
- package/dist/ts/components/editor/ContentDiff.js.map +1 -0
- package/dist/ts/components/editor/CreateFragmentDialog.d.ts +26 -0
- package/dist/ts/components/editor/CreateFragmentDialog.d.ts.map +1 -0
- package/dist/ts/components/editor/CreateFragmentDialog.js +159 -0
- package/dist/ts/components/editor/CreateFragmentDialog.js.map +1 -0
- package/dist/ts/components/editor/DrawerItemOverride.d.ts +8 -0
- package/dist/ts/components/editor/DrawerItemOverride.d.ts.map +1 -0
- package/dist/ts/components/editor/DrawerItemOverride.js +37 -0
- package/dist/ts/components/editor/DrawerItemOverride.js.map +1 -0
- package/dist/ts/components/editor/EditorChromeToggles.d.ts +16 -0
- package/dist/ts/components/editor/EditorChromeToggles.d.ts.map +1 -0
- package/dist/ts/components/editor/EditorChromeToggles.js +17 -0
- package/dist/ts/components/editor/EditorChromeToggles.js.map +1 -0
- package/dist/ts/components/editor/FragmentEditor.d.ts +15 -0
- package/dist/ts/components/editor/FragmentEditor.d.ts.map +1 -0
- package/dist/ts/components/editor/FragmentEditor.js +322 -0
- package/dist/ts/components/editor/FragmentEditor.js.map +1 -0
- package/dist/ts/components/editor/FragmentWrappers.d.ts +20 -0
- package/dist/ts/components/editor/FragmentWrappers.d.ts.map +1 -0
- package/dist/ts/components/editor/FragmentWrappers.js +44 -0
- package/dist/ts/components/editor/FragmentWrappers.js.map +1 -0
- package/dist/ts/components/editor/GenericBlock.d.ts +3 -0
- package/dist/ts/components/editor/GenericBlock.d.ts.map +1 -0
- package/dist/ts/components/editor/GenericBlock.js +1124 -0
- package/dist/ts/components/editor/GenericBlock.js.map +1 -0
- package/dist/ts/components/editor/ImagePickerDialog.d.ts +6 -0
- package/dist/ts/components/editor/ImagePickerDialog.d.ts.map +1 -0
- package/dist/ts/components/editor/ImagePickerDialog.js +23 -0
- package/dist/ts/components/editor/ImagePickerDialog.js.map +1 -0
- package/dist/ts/components/editor/JsxPropsPanel.d.ts +16 -0
- package/dist/ts/components/editor/JsxPropsPanel.d.ts.map +1 -0
- package/dist/ts/components/editor/JsxPropsPanel.js +146 -0
- package/dist/ts/components/editor/JsxPropsPanel.js.map +1 -0
- package/dist/ts/components/editor/LocaleSelector.d.ts +9 -0
- package/dist/ts/components/editor/LocaleSelector.d.ts.map +1 -0
- package/dist/ts/components/editor/LocaleSelector.js +14 -0
- package/dist/ts/components/editor/LocaleSelector.js.map +1 -0
- package/dist/ts/components/editor/MDXLivePreview.d.ts +15 -0
- package/dist/ts/components/editor/MDXLivePreview.d.ts.map +1 -0
- package/dist/ts/components/editor/MDXLivePreview.js +111 -0
- package/dist/ts/components/editor/MDXLivePreview.js.map +1 -0
- package/dist/ts/components/editor/MdxPageEditor.d.ts +10 -0
- package/dist/ts/components/editor/MdxPageEditor.d.ts.map +1 -0
- package/dist/ts/components/editor/MdxPageEditor.js +353 -0
- package/dist/ts/components/editor/MdxPageEditor.js.map +1 -0
- package/dist/ts/components/editor/PageEditor.d.ts +54 -0
- package/dist/ts/components/editor/PageEditor.d.ts.map +1 -0
- package/dist/ts/components/editor/PageEditor.js +399 -0
- package/dist/ts/components/editor/PageEditor.js.map +1 -0
- package/dist/ts/components/editor/PageEditorHeaderActions.d.ts +22 -0
- package/dist/ts/components/editor/PageEditorHeaderActions.d.ts.map +1 -0
- package/dist/ts/components/editor/PageEditorHeaderActions.js +24 -0
- package/dist/ts/components/editor/PageEditorHeaderActions.js.map +1 -0
- package/dist/ts/components/editor/PageEditorWrapper.d.ts +38 -0
- package/dist/ts/components/editor/PageEditorWrapper.d.ts.map +1 -0
- package/dist/ts/components/editor/PageEditorWrapper.js +360 -0
- package/dist/ts/components/editor/PageEditorWrapper.js.map +1 -0
- package/dist/ts/components/editor/PuckWithUntouchedMetadata.d.ts +5 -0
- package/dist/ts/components/editor/PuckWithUntouchedMetadata.d.ts.map +1 -0
- package/dist/ts/components/editor/PuckWithUntouchedMetadata.js +53 -0
- package/dist/ts/components/editor/PuckWithUntouchedMetadata.js.map +1 -0
- package/dist/ts/components/editor/SearchableSelect.d.ts +34 -0
- package/dist/ts/components/editor/SearchableSelect.d.ts.map +1 -0
- package/dist/ts/components/editor/SearchableSelect.js +116 -0
- package/dist/ts/components/editor/SearchableSelect.js.map +1 -0
- package/dist/ts/components/editor/host-wrapper-plugin.d.ts.map +1 -0
- package/dist/ts/components/editor/host-wrapper-plugin.js +38 -0
- package/dist/ts/components/editor/host-wrapper-plugin.js.map +1 -0
- package/dist/ts/components/editor/index.d.ts +9 -0
- package/dist/ts/components/editor/index.d.ts.map +1 -0
- package/dist/ts/components/editor/index.js +8 -0
- package/dist/ts/components/editor/index.js.map +1 -0
- package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.d.ts +15 -0
- package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +1 -0
- package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.js +91 -0
- package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.js.map +1 -0
- package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.d.ts +12 -0
- package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +1 -0
- package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.js +107 -0
- package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.js.map +1 -0
- package/dist/ts/components/editor/insert-menu/insert-payload.d.ts +76 -0
- package/dist/ts/components/editor/insert-menu/insert-payload.d.ts.map +1 -0
- package/dist/ts/components/editor/insert-menu/insert-payload.js +95 -0
- package/dist/ts/components/editor/insert-menu/insert-payload.js.map +1 -0
- package/dist/ts/components/editor/insert-menu/mdx-components-plugin.d.ts.map +1 -0
- package/dist/ts/components/editor/insert-menu/mdx-components-plugin.js +14 -0
- package/dist/ts/components/editor/insert-menu/mdx-components-plugin.js.map +1 -0
- package/dist/ts/components/editor/page-setting-targets.d.ts +24 -0
- package/dist/ts/components/editor/page-setting-targets.d.ts.map +1 -0
- package/dist/ts/components/editor/page-setting-targets.js +124 -0
- package/dist/ts/components/editor/page-setting-targets.js.map +1 -0
- package/dist/ts/components/editor/preview-availability.d.ts +18 -0
- package/dist/ts/components/editor/preview-availability.d.ts.map +1 -0
- package/dist/ts/components/editor/preview-availability.js +18 -0
- package/dist/ts/components/editor/preview-availability.js.map +1 -0
- package/dist/ts/components/editors/DataEditor.d.ts +18 -0
- package/dist/ts/components/editors/DataEditor.d.ts.map +1 -0
- package/dist/ts/components/editors/DataEditor.js +140 -0
- package/dist/ts/components/editors/DataEditor.js.map +1 -0
- package/dist/ts/components/fields/ContentFragmentSelectorField.d.ts +14 -0
- package/dist/ts/components/fields/ContentFragmentSelectorField.d.ts.map +1 -0
- package/dist/ts/components/fields/ContentFragmentSelectorField.js +108 -0
- package/dist/ts/components/fields/ContentFragmentSelectorField.js.map +1 -0
- package/dist/ts/components/fields/ImageField.d.ts +17 -0
- package/dist/ts/components/fields/ImageField.d.ts.map +1 -0
- package/dist/ts/components/fields/ImageField.js +39 -0
- package/dist/ts/components/fields/ImageField.js.map +1 -0
- package/dist/ts/components/fields/MDXEditField.d.ts +17 -0
- package/dist/ts/components/fields/MDXEditField.d.ts.map +1 -0
- package/dist/ts/components/fields/MDXEditField.js +29 -0
- package/dist/ts/components/fields/MDXEditField.js.map +1 -0
- package/dist/ts/components/forms/ChipArrayField.d.ts +12 -0
- package/dist/ts/components/forms/ChipArrayField.d.ts.map +1 -0
- package/dist/ts/components/forms/ChipArrayField.js +39 -0
- package/dist/ts/components/forms/ChipArrayField.js.map +1 -0
- package/dist/ts/components/forms/HintForm.d.ts +22 -0
- package/dist/ts/components/forms/HintForm.d.ts.map +1 -0
- package/dist/ts/components/forms/HintForm.js +195 -0
- package/dist/ts/components/forms/HintForm.js.map +1 -0
- package/dist/ts/components/forms/SchemaForm.d.ts +15 -0
- package/dist/ts/components/forms/SchemaForm.d.ts.map +1 -0
- package/dist/ts/components/forms/SchemaForm.js +103 -0
- package/dist/ts/components/forms/SchemaForm.js.map +1 -0
- package/dist/ts/components/index.d.ts +8 -0
- package/dist/ts/components/index.d.ts.map +1 -0
- package/dist/ts/components/index.js +14 -0
- package/dist/ts/components/index.js.map +1 -0
- package/dist/ts/components/media/AssetCard.d.ts +14 -0
- package/dist/ts/components/media/AssetCard.d.ts.map +1 -0
- package/dist/ts/components/media/AssetCard.js +26 -0
- package/dist/ts/components/media/AssetCard.js.map +1 -0
- package/dist/ts/components/media/AssetDetailSidebar.d.ts +15 -0
- package/dist/ts/components/media/AssetDetailSidebar.d.ts.map +1 -0
- package/dist/ts/components/media/AssetDetailSidebar.js +122 -0
- package/dist/ts/components/media/AssetDetailSidebar.js.map +1 -0
- package/dist/ts/components/media/BulkActionBar.d.ts +9 -0
- package/dist/ts/components/media/BulkActionBar.d.ts.map +1 -0
- package/dist/ts/components/media/BulkActionBar.js +9 -0
- package/dist/ts/components/media/BulkActionBar.js.map +1 -0
- package/dist/ts/components/media/FolderNav.d.ts +7 -0
- package/dist/ts/components/media/FolderNav.d.ts.map +1 -0
- package/dist/ts/components/media/FolderNav.js +13 -0
- package/dist/ts/components/media/FolderNav.js.map +1 -0
- package/dist/ts/components/media/FolderTreeSidebar.d.ts +9 -0
- package/dist/ts/components/media/FolderTreeSidebar.d.ts.map +1 -0
- package/dist/ts/components/media/FolderTreeSidebar.js +46 -0
- package/dist/ts/components/media/FolderTreeSidebar.js.map +1 -0
- package/dist/ts/components/media/ImagePicker.d.ts +14 -0
- package/dist/ts/components/media/ImagePicker.d.ts.map +1 -0
- package/dist/ts/components/media/ImagePicker.js +44 -0
- package/dist/ts/components/media/ImagePicker.js.map +1 -0
- package/dist/ts/components/media/MediaLibrary.d.ts +31 -0
- package/dist/ts/components/media/MediaLibrary.d.ts.map +1 -0
- package/dist/ts/components/media/MediaLibrary.js +87 -0
- package/dist/ts/components/media/MediaLibrary.js.map +1 -0
- package/dist/ts/components/media/MediaToolbar.d.ts +21 -0
- package/dist/ts/components/media/MediaToolbar.d.ts.map +1 -0
- package/dist/ts/components/media/MediaToolbar.js +7 -0
- package/dist/ts/components/media/MediaToolbar.js.map +1 -0
- package/dist/ts/components/media/UploadModal.d.ts +9 -0
- package/dist/ts/components/media/UploadModal.d.ts.map +1 -0
- package/dist/ts/components/media/UploadModal.js +36 -0
- package/dist/ts/components/media/UploadModal.js.map +1 -0
- package/dist/ts/components/media/index.d.ts +10 -0
- package/dist/ts/components/media/index.d.ts.map +1 -0
- package/dist/ts/components/media/index.js +10 -0
- package/dist/ts/components/media/index.js.map +1 -0
- package/dist/ts/components/pages/DataList.d.ts +7 -0
- package/dist/ts/components/pages/DataList.d.ts.map +1 -0
- package/dist/ts/components/pages/DataList.js +269 -0
- package/dist/ts/components/pages/DataList.js.map +1 -0
- package/dist/ts/components/pages/FragmentList.d.ts +2 -0
- package/dist/ts/components/pages/FragmentList.d.ts.map +1 -0
- package/dist/ts/components/pages/FragmentList.js +281 -0
- package/dist/ts/components/pages/FragmentList.js.map +1 -0
- package/dist/ts/components/pages/MediaPage.d.ts +8 -0
- package/dist/ts/components/pages/MediaPage.d.ts.map +1 -0
- package/dist/ts/components/pages/MediaPage.js +146 -0
- package/dist/ts/components/pages/MediaPage.js.map +1 -0
- package/dist/ts/components/pages/PageList.d.ts +7 -0
- package/dist/ts/components/pages/PageList.d.ts.map +1 -0
- package/dist/ts/components/pages/PageList.js +299 -0
- package/dist/ts/components/pages/PageList.js.map +1 -0
- package/dist/ts/components/pages/index.d.ts +3 -0
- package/dist/ts/components/pages/index.d.ts.map +1 -0
- package/dist/ts/components/pages/index.js +3 -0
- package/dist/ts/components/pages/index.js.map +1 -0
- package/dist/ts/components/puck/MDXContent.d.ts +19 -0
- package/dist/ts/components/puck/MDXContent.d.ts.map +1 -0
- package/dist/ts/components/puck/MDXContent.js +110 -0
- package/dist/ts/components/puck/MDXContent.js.map +1 -0
- package/dist/ts/components/puck/index.d.ts +2 -0
- package/dist/ts/components/puck/index.d.ts.map +1 -0
- package/dist/ts/components/puck/index.js +2 -0
- package/dist/ts/components/puck/index.js.map +1 -0
- package/dist/ts/components/sandbox/ContentSandbox.d.ts +31 -0
- package/dist/ts/components/sandbox/ContentSandbox.d.ts.map +1 -0
- package/dist/ts/components/sandbox/ContentSandbox.js +148 -0
- package/dist/ts/components/sandbox/ContentSandbox.js.map +1 -0
- package/dist/ts/components/sandbox/frame-runtime.d.ts +7 -0
- package/dist/ts/components/sandbox/frame-runtime.d.ts.map +1 -0
- package/dist/ts/components/sandbox/frame-runtime.js +7 -0
- package/dist/ts/components/sandbox/frame-runtime.js.map +1 -0
- package/dist/ts/components/toast.d.ts +44 -0
- package/dist/ts/components/toast.d.ts.map +1 -0
- package/dist/ts/components/toast.js +8 -0
- package/dist/ts/components/toast.js.map +1 -0
- package/dist/ts/components/ui/Banner.d.ts +76 -0
- package/dist/ts/components/ui/Banner.d.ts.map +1 -0
- package/dist/ts/components/ui/Banner.js +50 -0
- package/dist/ts/components/ui/Banner.js.map +1 -0
- package/dist/ts/components/ui/Button.d.ts +25 -0
- package/dist/ts/components/ui/Button.d.ts.map +1 -0
- package/dist/ts/components/ui/Button.js +34 -0
- package/dist/ts/components/ui/Button.js.map +1 -0
- package/dist/ts/components/ui/Card.d.ts +72 -0
- package/dist/ts/components/ui/Card.d.ts.map +1 -0
- package/dist/ts/components/ui/Card.js +50 -0
- package/dist/ts/components/ui/Card.js.map +1 -0
- package/dist/ts/components/ui/FieldError.d.ts +24 -0
- package/dist/ts/components/ui/FieldError.d.ts.map +1 -0
- package/dist/ts/components/ui/FieldError.js +18 -0
- package/dist/ts/components/ui/FieldError.js.map +1 -0
- package/dist/ts/components/ui/IconButton.d.ts +13 -0
- package/dist/ts/components/ui/IconButton.d.ts.map +1 -0
- package/dist/ts/components/ui/IconButton.js +11 -0
- package/dist/ts/components/ui/IconButton.js.map +1 -0
- package/dist/ts/components/ui/Input.d.ts +37 -0
- package/dist/ts/components/ui/Input.d.ts.map +1 -0
- package/dist/ts/components/ui/Input.js +10 -0
- package/dist/ts/components/ui/Input.js.map +1 -0
- package/dist/ts/components/ui/SaveIndicator.d.ts +8 -0
- package/dist/ts/components/ui/SaveIndicator.d.ts.map +1 -0
- package/dist/ts/components/ui/SaveIndicator.js +33 -0
- package/dist/ts/components/ui/SaveIndicator.js.map +1 -0
- package/dist/ts/components/ui/Select.d.ts +8 -0
- package/dist/ts/components/ui/Select.d.ts.map +1 -0
- package/dist/ts/components/ui/Select.js +10 -0
- package/dist/ts/components/ui/Select.js.map +1 -0
- package/dist/ts/components/ui/Separator.d.ts +7 -0
- package/dist/ts/components/ui/Separator.d.ts.map +1 -0
- package/dist/ts/components/ui/Separator.js +9 -0
- package/dist/ts/components/ui/Separator.js.map +1 -0
- package/dist/ts/components/ui/Textarea.d.ts +8 -0
- package/dist/ts/components/ui/Textarea.d.ts.map +1 -0
- package/dist/ts/components/ui/Textarea.js +6 -0
- package/dist/ts/components/ui/Textarea.js.map +1 -0
- package/dist/ts/components/ui/Tooltip.d.ts +9 -0
- package/dist/ts/components/ui/Tooltip.d.ts.map +1 -0
- package/dist/ts/components/ui/Tooltip.js +6 -0
- package/dist/ts/components/ui/Tooltip.js.map +1 -0
- package/dist/ts/components/ui/index.d.ts +14 -0
- package/dist/ts/components/ui/index.d.ts.map +1 -0
- package/dist/ts/components/ui/index.js +18 -0
- package/dist/ts/components/ui/index.js.map +1 -0
- package/dist/ts/data-schemas.d.ts +36 -0
- package/dist/ts/data-schemas.d.ts.map +1 -0
- package/dist/ts/data-schemas.js +52 -0
- package/dist/ts/data-schemas.js.map +1 -0
- package/dist/ts/dev-entry.d.ts +2 -0
- package/dist/ts/dev-entry.d.ts.map +1 -0
- package/dist/ts/dev-entry.js +23 -0
- package/dist/ts/dev-entry.js.map +1 -0
- package/dist/ts/editor-flush.d.ts +26 -0
- package/dist/ts/editor-flush.d.ts.map +1 -0
- package/dist/ts/editor-flush.js +40 -0
- package/dist/ts/editor-flush.js.map +1 -0
- package/dist/ts/hooks/index.d.ts +10 -0
- package/dist/ts/hooks/index.d.ts.map +1 -0
- package/dist/ts/hooks/index.js +8 -0
- package/dist/ts/hooks/index.js.map +1 -0
- package/dist/ts/hooks/useCanvasTheme.d.ts +12 -0
- package/dist/ts/hooks/useCanvasTheme.d.ts.map +1 -0
- package/dist/ts/hooks/useCanvasTheme.js +34 -0
- package/dist/ts/hooks/useCanvasTheme.js.map +1 -0
- package/dist/ts/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/ts/hooks/useClickOutside.js +19 -0
- package/dist/ts/hooks/useClickOutside.js.map +1 -0
- package/dist/ts/hooks/useDialogState.d.ts.map +1 -0
- package/dist/ts/hooks/useDialogState.js +32 -0
- package/dist/ts/hooks/useDialogState.js.map +1 -0
- package/dist/ts/hooks/useEditorPref.d.ts.map +1 -0
- package/dist/ts/hooks/useEditorPref.js +50 -0
- package/dist/ts/hooks/useEditorPref.js.map +1 -0
- package/dist/ts/hooks/useErrorModal.d.ts +15 -0
- package/dist/ts/hooks/useErrorModal.d.ts.map +1 -0
- package/dist/ts/hooks/useErrorModal.js +36 -0
- package/dist/ts/hooks/useErrorModal.js.map +1 -0
- package/dist/ts/hooks/useSiteBaseUrl.d.ts +10 -0
- package/dist/ts/hooks/useSiteBaseUrl.d.ts.map +1 -0
- package/dist/ts/hooks/useSiteBaseUrl.js +15 -0
- package/dist/ts/hooks/useSiteBaseUrl.js.map +1 -0
- package/dist/ts/hooks/useTheme.d.ts +12 -0
- package/dist/ts/hooks/useTheme.d.ts.map +1 -0
- package/dist/ts/hooks/useTheme.js +55 -0
- package/dist/ts/hooks/useTheme.js.map +1 -0
- package/dist/ts/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/dist/ts/hooks/useUnsavedChangesGuard.js +30 -0
- package/dist/ts/hooks/useUnsavedChangesGuard.js.map +1 -0
- package/dist/ts/hooks/useUpload.d.ts +5 -0
- package/dist/ts/hooks/useUpload.d.ts.map +1 -0
- package/dist/ts/hooks/useUpload.js +15 -0
- package/dist/ts/hooks/useUpload.js.map +1 -0
- package/dist/ts/hooks/useUploadFlow.d.ts +47 -0
- package/dist/ts/hooks/useUploadFlow.d.ts.map +1 -0
- package/dist/ts/hooks/useUploadFlow.js +154 -0
- package/dist/ts/hooks/useUploadFlow.js.map +1 -0
- package/dist/ts/host-discovery.d.ts +40 -0
- package/dist/ts/host-discovery.d.ts.map +1 -0
- package/dist/ts/host-discovery.js +39 -0
- package/dist/ts/host-discovery.js.map +1 -0
- package/dist/ts/host-style-probe.d.ts +81 -0
- package/dist/ts/host-style-probe.d.ts.map +1 -0
- package/dist/ts/host-style-probe.js +638 -0
- package/dist/ts/host-style-probe.js.map +1 -0
- package/dist/ts/index.d.ts +13 -0
- package/dist/ts/index.d.ts.map +1 -0
- package/dist/ts/index.js +17 -0
- package/dist/ts/index.js.map +1 -0
- package/dist/ts/lib/utils.d.ts.map +1 -0
- package/dist/ts/lib/utils.js +48 -0
- package/dist/ts/lib/utils.js.map +1 -0
- package/dist/ts/main-spa.d.ts.map +1 -0
- package/dist/ts/main-spa.js +57 -0
- package/dist/ts/main-spa.js.map +1 -0
- package/dist/ts/main.d.ts.map +1 -0
- package/dist/ts/main.js +16 -0
- package/dist/ts/main.js.map +1 -0
- package/dist/ts/mdx-components-define.d.ts +185 -0
- package/dist/ts/mdx-components-define.d.ts.map +1 -0
- package/dist/ts/mdx-components-define.js +140 -0
- package/dist/ts/mdx-components-define.js.map +1 -0
- package/dist/ts/mdx-components.d.ts +63 -0
- package/dist/ts/mdx-components.d.ts.map +1 -0
- package/dist/ts/mdx-components.js +129 -0
- package/dist/ts/mdx-components.js.map +1 -0
- package/dist/ts/media/AssetScopePill.d.ts +30 -0
- package/dist/ts/media/AssetScopePill.d.ts.map +1 -0
- package/dist/ts/media/AssetScopePill.js +31 -0
- package/dist/ts/media/AssetScopePill.js.map +1 -0
- package/dist/ts/media/MediaIssueBadge.d.ts +33 -0
- package/dist/ts/media/MediaIssueBadge.d.ts.map +1 -0
- package/dist/ts/media/MediaIssueBadge.js +55 -0
- package/dist/ts/media/MediaIssueBadge.js.map +1 -0
- package/dist/ts/media/types.d.ts +108 -0
- package/dist/ts/media/types.d.ts.map +1 -0
- package/dist/ts/media/types.js +2 -0
- package/dist/ts/media/types.js.map +1 -0
- package/dist/ts/media/use-asset-scope.d.ts +24 -0
- package/dist/ts/media/use-asset-scope.d.ts.map +1 -0
- package/dist/ts/media/use-asset-scope.js +57 -0
- package/dist/ts/media/use-asset-scope.js.map +1 -0
- package/dist/ts/media/use-media-issue.d.ts +24 -0
- package/dist/ts/media/use-media-issue.d.ts.map +1 -0
- package/dist/ts/media/use-media-issue.js +52 -0
- package/dist/ts/media/use-media-issue.js.map +1 -0
- package/dist/ts/merge-default-props.d.ts +23 -0
- package/dist/ts/merge-default-props.d.ts.map +1 -0
- package/dist/ts/merge-default-props.js +51 -0
- package/dist/ts/merge-default-props.js.map +1 -0
- package/dist/ts/mock-puck-config.d.ts.map +1 -0
- package/dist/ts/mock-puck-config.js +74 -0
- package/dist/ts/mock-puck-config.js.map +1 -0
- package/dist/ts/page-schema-define.d.ts +134 -0
- package/dist/ts/page-schema-define.d.ts.map +1 -0
- package/dist/ts/page-schema-define.js +60 -0
- package/dist/ts/page-schema-define.js.map +1 -0
- package/dist/ts/page-schemas.d.ts +31 -0
- package/dist/ts/page-schemas.d.ts.map +1 -0
- package/dist/ts/page-schemas.js +56 -0
- package/dist/ts/page-schemas.js.map +1 -0
- package/dist/ts/page-setting-attributes.d.ts +27 -0
- package/dist/ts/page-setting-attributes.d.ts.map +1 -0
- package/dist/ts/page-setting-attributes.js +11 -0
- package/dist/ts/page-setting-attributes.js.map +1 -0
- package/dist/ts/prose-surface-css.d.ts +92 -0
- package/dist/ts/prose-surface-css.d.ts.map +1 -0
- package/dist/ts/prose-surface-css.js +349 -0
- package/dist/ts/prose-surface-css.js.map +1 -0
- package/dist/ts/puck-config.d.ts.map +1 -0
- package/dist/ts/puck-config.js +51 -0
- package/dist/ts/puck-config.js.map +1 -0
- package/dist/ts/sandbox-preview-styles.d.ts +63 -0
- package/dist/ts/sandbox-preview-styles.d.ts.map +1 -0
- package/dist/ts/sandbox-preview-styles.js +169 -0
- package/dist/ts/sandbox-preview-styles.js.map +1 -0
- package/dist/ts/selected-block.d.ts +61 -0
- package/dist/ts/selected-block.d.ts.map +1 -0
- package/dist/ts/selected-block.js +65 -0
- package/dist/ts/selected-block.js.map +1 -0
- package/dist/ts/site-css-layer.d.ts +40 -0
- package/dist/ts/site-css-layer.d.ts.map +1 -0
- package/dist/ts/site-css-layer.js +110 -0
- package/dist/ts/site-css-layer.js.map +1 -0
- package/dist/ts/site-styles.d.ts +142 -0
- package/dist/ts/site-styles.d.ts.map +1 -0
- package/dist/ts/site-styles.js +428 -0
- package/dist/ts/site-styles.js.map +1 -0
- package/dist/ts/theme.d.ts +46 -0
- package/dist/ts/theme.d.ts.map +1 -0
- package/dist/ts/theme.js +96 -0
- package/dist/ts/theme.js.map +1 -0
- package/dist/ts/types.d.ts +58 -0
- package/dist/ts/types.d.ts.map +1 -0
- package/dist/ts/types.js +2 -0
- package/dist/ts/types.js.map +1 -0
- package/dist/ts/ui-config.d.ts +256 -0
- package/dist/ts/ui-config.d.ts.map +1 -0
- package/dist/ts/ui-config.js +151 -0
- package/dist/ts/ui-config.js.map +1 -0
- package/dist/ts/utils/asset-url.d.ts +9 -0
- package/dist/ts/utils/asset-url.d.ts.map +1 -0
- package/dist/ts/utils/asset-url.js +19 -0
- package/dist/ts/utils/asset-url.js.map +1 -0
- package/dist/ts/utils/cn.d.ts.map +1 -0
- package/dist/ts/utils/cn.js +6 -0
- package/dist/ts/utils/cn.js.map +1 -0
- package/dist/ts/utils/content-failure.d.ts +32 -0
- package/dist/ts/utils/content-failure.d.ts.map +1 -0
- package/dist/ts/utils/content-failure.js +67 -0
- package/dist/ts/utils/content-failure.js.map +1 -0
- package/dist/ts/utils/entry-meta.d.ts +29 -0
- package/dist/ts/utils/entry-meta.d.ts.map +1 -0
- package/dist/ts/utils/entry-meta.js +38 -0
- package/dist/ts/utils/entry-meta.js.map +1 -0
- package/dist/ts/utils/entry-name.d.ts +11 -0
- package/dist/ts/utils/entry-name.d.ts.map +1 -0
- package/dist/ts/utils/entry-name.js +19 -0
- package/dist/ts/utils/entry-name.js.map +1 -0
- package/dist/ts/utils/format-date.d.ts.map +1 -0
- package/dist/ts/utils/format-date.js +38 -0
- package/dist/ts/utils/format-date.js.map +1 -0
- package/dist/ts/utils/mdast-to-html.d.ts.map +1 -0
- package/dist/ts/utils/mdast-to-html.js +235 -0
- package/dist/ts/utils/mdast-to-html.js.map +1 -0
- package/dist/ts/utils/mdast-tree.d.ts.map +1 -0
- package/dist/ts/utils/mdast-tree.js +286 -0
- package/dist/ts/utils/mdast-tree.js.map +1 -0
- package/dist/ts/utils/menu-placement.d.ts +8 -0
- package/dist/ts/utils/menu-placement.d.ts.map +1 -0
- package/dist/ts/utils/menu-placement.js +10 -0
- package/dist/ts/utils/menu-placement.js.map +1 -0
- package/dist/ts/utils/pageMetadata.d.ts +80 -0
- package/dist/ts/utils/pageMetadata.d.ts.map +1 -0
- package/dist/ts/utils/pageMetadata.js +249 -0
- package/dist/ts/utils/pageMetadata.js.map +1 -0
- package/dist/ts/utils/sanitize-html.d.ts +31 -0
- package/dist/ts/utils/sanitize-html.d.ts.map +1 -0
- package/dist/ts/utils/sanitize-html.js +84 -0
- package/dist/ts/utils/sanitize-html.js.map +1 -0
- package/dist/ts/utils/slugify.d.ts +14 -0
- package/dist/ts/utils/slugify.d.ts.map +1 -0
- package/dist/ts/utils/slugify.js +22 -0
- package/dist/ts/utils/slugify.js.map +1 -0
- package/dist/ts/utils/zodIntrospect.d.ts +19 -0
- package/dist/ts/utils/zodIntrospect.d.ts.map +1 -0
- package/dist/ts/utils/zodIntrospect.js +95 -0
- package/dist/ts/utils/zodIntrospect.js.map +1 -0
- package/dist/ts/write-access.d.ts +48 -0
- package/dist/ts/write-access.d.ts.map +1 -0
- package/dist/ts/write-access.js +140 -0
- package/dist/ts/write-access.js.map +1 -0
- package/package.json +145 -98
- package/src/App.tsx +78 -0
- package/src/CmsSpaApp.tsx +63 -0
- package/src/components/CMSDashboard.tsx +118 -0
- package/src/components/CMSLayout.tsx +25 -0
- package/src/components/ConlocaLogo.tsx +10 -0
- package/src/components/GitStatusPanel.tsx +188 -0
- package/src/components/MobileTopBar.tsx +22 -0
- package/src/components/Sidebar.tsx +146 -0
- package/src/components/UserAvatar.tsx +28 -0
- package/src/components/cards/DataEntryCard.tsx +163 -0
- package/src/components/cards/SectionCard.tsx +103 -0
- package/src/components/cards/index.ts +1 -0
- package/src/components/dashboard/RecentActivity.tsx +114 -0
- package/src/components/dialog.tsx +78 -0
- package/src/components/dialogs/ConflictDialog.tsx +139 -0
- package/src/components/dialogs/CreateDataDialog.tsx +70 -0
- package/src/components/dialogs/CreateFolderDialog.tsx +94 -0
- package/src/components/dialogs/CreatePageDialog.tsx +465 -0
- package/src/components/dialogs/DataPropertiesDialog.tsx +84 -0
- package/src/components/dialogs/DeleteConfirmDialog.tsx +61 -0
- package/src/components/dialogs/ErrorModal.tsx +109 -0
- package/src/components/dialogs/FragmentPropertiesDialog.tsx +97 -0
- package/src/components/dialogs/MoveFolderDialog.tsx +205 -0
- package/src/components/dialogs/PageMetadataDialog.tsx +311 -0
- package/src/components/dialogs/UnsavedChangesDialog.tsx +43 -0
- package/src/components/dialogs/index.ts +8 -0
- package/src/components/editor/CMSMDXEditor.tsx +281 -0
- package/src/components/editor/ContentDiff.tsx +251 -0
- package/src/components/editor/CreateFragmentDialog.tsx +227 -0
- package/src/components/editor/DrawerItemOverride.tsx +62 -0
- package/src/components/editor/EditorChromeToggles.tsx +35 -0
- package/src/components/editor/FragmentEditor.tsx +506 -0
- package/src/components/editor/FragmentWrappers.tsx +72 -0
- package/src/components/editor/GenericBlock.tsx +1361 -0
- package/src/components/editor/ImagePickerDialog.tsx +25 -0
- package/src/components/editor/JsxPropsPanel.tsx +293 -0
- package/src/components/editor/LocaleSelector.tsx +60 -0
- package/src/components/editor/MDXLivePreview.tsx +179 -0
- package/src/components/editor/MdxPageEditor.tsx +546 -0
- package/src/components/editor/PageEditor.tsx +529 -0
- package/src/components/editor/PageEditorHeaderActions.tsx +160 -0
- package/src/components/editor/PageEditorWrapper.tsx +502 -0
- package/src/components/editor/PuckWithUntouchedMetadata.tsx +65 -0
- package/src/components/editor/SearchableSelect.tsx +186 -0
- package/src/components/editor/host-wrapper-plugin.ts +91 -0
- package/src/components/editor/index.ts +8 -0
- package/src/components/editor/insert-menu/InsertMdxComponentButton.tsx +149 -0
- package/src/components/editor/insert-menu/SlashMenuPlugin.tsx +152 -0
- package/src/components/editor/insert-menu/insert-payload.ts +150 -0
- package/src/components/editor/insert-menu/mdx-components-plugin.ts +14 -0
- package/src/components/editor/page-setting-targets.tsx +154 -0
- package/src/components/editor/preview-availability.ts +20 -0
- package/src/components/editors/DataEditor.tsx +270 -0
- package/src/components/fields/ContentFragmentSelectorField.tsx +290 -0
- package/src/components/fields/ImageField.tsx +75 -0
- package/src/components/fields/MDXEditField.tsx +54 -0
- package/src/components/forms/ChipArrayField.tsx +81 -0
- package/src/components/forms/HintForm.tsx +437 -0
- package/src/components/forms/SchemaForm.tsx +307 -0
- package/src/components/index.ts +14 -0
- package/src/components/media/AssetCard.tsx +84 -0
- package/src/components/media/AssetDetailSidebar.tsx +335 -0
- package/src/components/media/BulkActionBar.tsx +33 -0
- package/src/components/media/FolderNav.tsx +44 -0
- package/src/components/media/FolderTreeSidebar.tsx +171 -0
- package/src/components/media/ImagePicker.tsx +102 -0
- package/src/components/media/MediaLibrary.tsx +183 -0
- package/src/components/media/MediaToolbar.tsx +100 -0
- package/src/components/media/UploadModal.tsx +266 -0
- package/src/components/media/index.ts +9 -0
- package/src/components/pages/DataList.tsx +498 -0
- package/src/components/pages/FragmentList.tsx +592 -0
- package/src/components/pages/MediaPage.tsx +284 -0
- package/src/components/pages/PageList.tsx +683 -0
- package/src/components/pages/index.ts +2 -0
- package/src/components/puck/MDXContent.tsx +199 -0
- package/src/components/puck/index.ts +1 -0
- package/src/components/sandbox/ContentSandbox.tsx +191 -0
- package/src/components/sandbox/frame-runtime.ts +15 -0
- package/src/components/toast.tsx +48 -0
- package/src/components/ui/Banner.tsx +108 -0
- package/src/components/ui/Button.tsx +51 -0
- package/src/components/ui/Card.tsx +124 -0
- package/src/components/ui/FieldError.tsx +37 -0
- package/src/components/ui/IconButton.tsx +40 -0
- package/src/components/ui/Input.tsx +66 -0
- package/src/components/ui/SaveIndicator.tsx +44 -0
- package/src/components/ui/Select.tsx +29 -0
- package/src/components/ui/Separator.tsx +14 -0
- package/src/components/ui/Textarea.tsx +22 -0
- package/src/components/ui/Tooltip.tsx +25 -0
- package/src/components/ui/index.ts +18 -0
- package/src/data-schemas.ts +82 -0
- package/src/dev-entry.tsx +25 -0
- package/src/dev.html +36 -0
- package/src/editor-flush.ts +47 -0
- package/src/hooks/index.ts +22 -0
- package/src/hooks/useCanvasTheme.tsx +52 -0
- package/src/hooks/useClickOutside.ts +24 -0
- package/src/hooks/useDialogState.ts +40 -0
- package/src/hooks/useEditorPref.ts +58 -0
- package/src/hooks/useErrorModal.tsx +63 -0
- package/src/hooks/useSiteBaseUrl.ts +16 -0
- package/src/hooks/useTheme.tsx +76 -0
- package/src/hooks/useUnsavedChangesGuard.ts +32 -0
- package/src/hooks/useUpload.ts +19 -0
- package/src/hooks/useUploadFlow.ts +227 -0
- package/src/host-discovery.ts +77 -0
- package/src/host-style-probe.ts +684 -0
- package/src/index.ts +42 -0
- package/src/lib/utils.ts +56 -0
- package/src/main-spa.tsx +68 -0
- package/src/main.css +1095 -0
- package/src/main.html +43 -0
- package/src/main.tsx +16 -0
- package/src/mdx-components-define.ts +296 -0
- package/src/mdx-components.ts +154 -0
- package/src/media/AssetScopePill.tsx +56 -0
- package/src/media/MediaIssueBadge.tsx +86 -0
- package/src/media/types.ts +96 -0
- package/src/media/use-asset-scope.ts +58 -0
- package/src/media/use-media-issue.ts +53 -0
- package/src/merge-default-props.ts +58 -0
- package/src/mock-puck-config.tsx +115 -0
- package/src/page-schema-define.ts +176 -0
- package/src/page-schemas.ts +80 -0
- package/src/page-setting-attributes.ts +40 -0
- package/src/prose-surface-css.ts +359 -0
- package/src/puck-config.ts +77 -0
- package/src/sandbox-preview-styles.ts +166 -0
- package/src/selected-block.ts +121 -0
- package/src/site-css-layer.ts +109 -0
- package/src/site-styles.ts +526 -0
- package/src/theme.ts +102 -0
- package/src/types.ts +63 -0
- package/src/ui-config.ts +344 -0
- package/src/utils/asset-url.ts +22 -0
- package/src/utils/cn.ts +6 -0
- package/src/utils/content-failure.ts +74 -0
- package/src/utils/entry-meta.ts +47 -0
- package/src/utils/entry-name.ts +21 -0
- package/src/utils/format-date.ts +34 -0
- package/src/utils/mdast-to-html.ts +247 -0
- package/src/utils/mdast-tree.ts +292 -0
- package/src/utils/menu-placement.ts +13 -0
- package/src/utils/pageMetadata.ts +285 -0
- package/src/utils/sanitize-html.ts +84 -0
- package/src/utils/slugify.ts +21 -0
- package/src/utils/zodIntrospect.ts +136 -0
- package/src/vite-env.d.ts +10 -0
- package/src/write-access.ts +147 -0
- package/styles/stylesheet.d.ts +6 -0
- package/styles/tailwind-theme.css +7 -5
- package/dist/App-Bk1LNxbS.mjs +0 -10851
- package/dist/App-Bk1LNxbS.mjs.map +0 -1
- package/dist/App.d.ts +0 -35
- package/dist/App.d.ts.map +0 -1
- package/dist/App.js +0 -52
- package/dist/CmsSpaApp.d.ts +0 -13
- package/dist/CmsSpaApp.d.ts.map +0 -1
- package/dist/CmsSpaApp.js +0 -33
- package/dist/cn-dlASUkDY.mjs +0 -10
- package/dist/cn-dlASUkDY.mjs.map +0 -1
- package/dist/components/CMSDashboard.d.ts +0 -2
- package/dist/components/CMSDashboard.d.ts.map +0 -1
- package/dist/components/CMSDashboard.js +0 -20
- package/dist/components/CMSLayout.d.ts +0 -2
- package/dist/components/CMSLayout.d.ts.map +0 -1
- package/dist/components/CMSLayout.js +0 -15
- package/dist/components/ConlocaLogo.d.ts +0 -2
- package/dist/components/ConlocaLogo.d.ts.map +0 -1
- package/dist/components/ConlocaLogo.js +0 -4
- package/dist/components/GitStatusPanel.d.ts +0 -25
- package/dist/components/GitStatusPanel.d.ts.map +0 -1
- package/dist/components/GitStatusPanel.js +0 -77
- package/dist/components/MobileTopBar.d.ts +0 -6
- package/dist/components/MobileTopBar.d.ts.map +0 -1
- package/dist/components/MobileTopBar.js +0 -6
- package/dist/components/Sidebar.d.ts +0 -8
- package/dist/components/Sidebar.d.ts.map +0 -1
- package/dist/components/Sidebar.js +0 -40
- package/dist/components/UserAvatar.d.ts +0 -2
- package/dist/components/UserAvatar.d.ts.map +0 -1
- package/dist/components/UserAvatar.js +0 -14
- package/dist/components/cards/DataEntryCard.d.ts +0 -14
- package/dist/components/cards/DataEntryCard.d.ts.map +0 -1
- package/dist/components/cards/DataEntryCard.js +0 -32
- package/dist/components/cards/SectionCard.d.ts +0 -15
- package/dist/components/cards/SectionCard.d.ts.map +0 -1
- package/dist/components/cards/SectionCard.js +0 -10
- package/dist/components/cards/index.d.ts +0 -2
- package/dist/components/cards/index.d.ts.map +0 -1
- package/dist/components/cards/index.js +0 -1
- package/dist/components/dashboard/RecentActivity.d.ts +0 -2
- package/dist/components/dashboard/RecentActivity.d.ts.map +0 -1
- package/dist/components/dashboard/RecentActivity.js +0 -58
- package/dist/components/dialog.d.ts +0 -53
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js +0 -56
- package/dist/components/dialogs/BlockPropertiesDialog.d.ts +0 -12
- package/dist/components/dialogs/BlockPropertiesDialog.d.ts.map +0 -1
- package/dist/components/dialogs/BlockPropertiesDialog.js +0 -42
- package/dist/components/dialogs/ConflictDialog.d.ts +0 -10
- package/dist/components/dialogs/ConflictDialog.d.ts.map +0 -1
- package/dist/components/dialogs/ConflictDialog.js +0 -29
- package/dist/components/dialogs/CreateDataDialog.d.ts +0 -9
- package/dist/components/dialogs/CreateDataDialog.d.ts.map +0 -1
- package/dist/components/dialogs/CreateDataDialog.js +0 -20
- package/dist/components/dialogs/CreateFolderDialog.d.ts +0 -9
- package/dist/components/dialogs/CreateFolderDialog.d.ts.map +0 -1
- package/dist/components/dialogs/CreateFolderDialog.js +0 -33
- package/dist/components/dialogs/CreatePageDialog.d.ts +0 -10
- package/dist/components/dialogs/CreatePageDialog.d.ts.map +0 -1
- package/dist/components/dialogs/CreatePageDialog.js +0 -155
- package/dist/components/dialogs/DataPropertiesDialog.d.ts +0 -10
- package/dist/components/dialogs/DataPropertiesDialog.d.ts.map +0 -1
- package/dist/components/dialogs/DataPropertiesDialog.js +0 -38
- package/dist/components/dialogs/DeleteConfirmDialog.d.ts +0 -12
- package/dist/components/dialogs/DeleteConfirmDialog.d.ts.map +0 -1
- package/dist/components/dialogs/DeleteConfirmDialog.js +0 -7
- package/dist/components/dialogs/ErrorModal.d.ts +0 -14
- package/dist/components/dialogs/ErrorModal.d.ts.map +0 -1
- package/dist/components/dialogs/ErrorModal.js +0 -38
- package/dist/components/dialogs/MoveFolderDialog.d.ts +0 -11
- package/dist/components/dialogs/MoveFolderDialog.d.ts.map +0 -1
- package/dist/components/dialogs/MoveFolderDialog.js +0 -45
- package/dist/components/dialogs/PageMetadataDialog.d.ts +0 -10
- package/dist/components/dialogs/PageMetadataDialog.d.ts.map +0 -1
- package/dist/components/dialogs/PageMetadataDialog.js +0 -85
- package/dist/components/dialogs/UnsavedChangesDialog.d.ts +0 -8
- package/dist/components/dialogs/UnsavedChangesDialog.d.ts.map +0 -1
- package/dist/components/dialogs/UnsavedChangesDialog.js +0 -6
- package/dist/components/dialogs/index.d.ts +0 -9
- package/dist/components/dialogs/index.d.ts.map +0 -1
- package/dist/components/dialogs/index.js +0 -8
- package/dist/components/editor/BlockEditor.d.ts +0 -8
- package/dist/components/editor/BlockEditor.d.ts.map +0 -1
- package/dist/components/editor/BlockEditor.js +0 -262
- package/dist/components/editor/BlockWrappers.d.ts +0 -15
- package/dist/components/editor/BlockWrappers.d.ts.map +0 -1
- package/dist/components/editor/BlockWrappers.js +0 -29
- package/dist/components/editor/CMSMDXEditor.d.ts +0 -13
- package/dist/components/editor/CMSMDXEditor.d.ts.map +0 -1
- package/dist/components/editor/CMSMDXEditor.js +0 -123
- package/dist/components/editor/ContentDiff.d.ts +0 -10
- package/dist/components/editor/ContentDiff.d.ts.map +0 -1
- package/dist/components/editor/ContentDiff.js +0 -51
- package/dist/components/editor/CreateBlockDialog.d.ts +0 -26
- package/dist/components/editor/CreateBlockDialog.d.ts.map +0 -1
- package/dist/components/editor/CreateBlockDialog.js +0 -131
- package/dist/components/editor/DrawerItemOverride.d.ts +0 -8
- package/dist/components/editor/DrawerItemOverride.d.ts.map +0 -1
- package/dist/components/editor/DrawerItemOverride.js +0 -41
- package/dist/components/editor/EditorChromeToggles.d.ts +0 -16
- package/dist/components/editor/EditorChromeToggles.d.ts.map +0 -1
- package/dist/components/editor/EditorChromeToggles.js +0 -16
- package/dist/components/editor/GenericBlock.d.ts +0 -3
- package/dist/components/editor/GenericBlock.d.ts.map +0 -1
- package/dist/components/editor/GenericBlock.js +0 -1067
- package/dist/components/editor/ImagePickerDialog.d.ts +0 -6
- package/dist/components/editor/ImagePickerDialog.d.ts.map +0 -1
- package/dist/components/editor/ImagePickerDialog.js +0 -24
- package/dist/components/editor/JsxPropsPanel.d.ts +0 -16
- package/dist/components/editor/JsxPropsPanel.d.ts.map +0 -1
- package/dist/components/editor/JsxPropsPanel.js +0 -145
- package/dist/components/editor/LocaleSelector.d.ts +0 -9
- package/dist/components/editor/LocaleSelector.d.ts.map +0 -1
- package/dist/components/editor/LocaleSelector.js +0 -13
- package/dist/components/editor/MDXLivePreview.d.ts +0 -14
- package/dist/components/editor/MDXLivePreview.d.ts.map +0 -1
- package/dist/components/editor/MDXLivePreview.js +0 -103
- package/dist/components/editor/MdxPageEditor.d.ts +0 -10
- package/dist/components/editor/MdxPageEditor.d.ts.map +0 -1
- package/dist/components/editor/MdxPageEditor.js +0 -297
- package/dist/components/editor/PageEditor.d.ts +0 -18
- package/dist/components/editor/PageEditor.d.ts.map +0 -1
- package/dist/components/editor/PageEditor.js +0 -288
- package/dist/components/editor/PageEditorHeaderActions.d.ts +0 -16
- package/dist/components/editor/PageEditorHeaderActions.d.ts.map +0 -1
- package/dist/components/editor/PageEditorHeaderActions.js +0 -19
- package/dist/components/editor/PageEditorWrapper.d.ts +0 -7
- package/dist/components/editor/PageEditorWrapper.d.ts.map +0 -1
- package/dist/components/editor/PageEditorWrapper.js +0 -319
- package/dist/components/editor/SearchableSelect.d.ts +0 -34
- package/dist/components/editor/SearchableSelect.d.ts.map +0 -1
- package/dist/components/editor/SearchableSelect.js +0 -116
- package/dist/components/editor/host-wrapper-plugin.d.ts.map +0 -1
- package/dist/components/editor/host-wrapper-plugin.js +0 -37
- package/dist/components/editor/index.d.ts +0 -9
- package/dist/components/editor/index.d.ts.map +0 -1
- package/dist/components/editor/index.js +0 -7
- package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts +0 -15
- package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +0 -1
- package/dist/components/editor/insert-menu/InsertMdxComponentButton.js +0 -90
- package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts +0 -12
- package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +0 -1
- package/dist/components/editor/insert-menu/SlashMenuPlugin.js +0 -106
- package/dist/components/editor/insert-menu/insert-payload.d.ts +0 -76
- package/dist/components/editor/insert-menu/insert-payload.d.ts.map +0 -1
- package/dist/components/editor/insert-menu/insert-payload.js +0 -94
- package/dist/components/editor/insert-menu/mdx-components-plugin.d.ts.map +0 -1
- package/dist/components/editor/insert-menu/mdx-components-plugin.js +0 -13
- package/dist/components/editors/DataEditor.d.ts +0 -19
- package/dist/components/editors/DataEditor.d.ts.map +0 -1
- package/dist/components/editors/DataEditor.js +0 -139
- package/dist/components/fields/ContentBlockSelectorField.d.ts +0 -14
- package/dist/components/fields/ContentBlockSelectorField.d.ts.map +0 -1
- package/dist/components/fields/ContentBlockSelectorField.js +0 -105
- package/dist/components/fields/ImageField.d.ts +0 -16
- package/dist/components/fields/ImageField.d.ts.map +0 -1
- package/dist/components/fields/ImageField.js +0 -39
- package/dist/components/fields/MDXEditField.d.ts +0 -17
- package/dist/components/fields/MDXEditField.d.ts.map +0 -1
- package/dist/components/fields/MDXEditField.js +0 -28
- package/dist/components/forms/ChipArrayField.d.ts +0 -12
- package/dist/components/forms/ChipArrayField.d.ts.map +0 -1
- package/dist/components/forms/ChipArrayField.js +0 -40
- package/dist/components/forms/HintForm.d.ts +0 -22
- package/dist/components/forms/HintForm.d.ts.map +0 -1
- package/dist/components/forms/HintForm.js +0 -162
- package/dist/components/forms/SchemaForm.d.ts +0 -15
- package/dist/components/forms/SchemaForm.d.ts.map +0 -1
- package/dist/components/forms/SchemaForm.js +0 -106
- package/dist/components/index.d.ts +0 -8
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -13
- package/dist/components/media/AssetCard.d.ts +0 -14
- package/dist/components/media/AssetCard.d.ts.map +0 -1
- package/dist/components/media/AssetCard.js +0 -31
- package/dist/components/media/AssetDetailSidebar.d.ts +0 -11
- package/dist/components/media/AssetDetailSidebar.d.ts.map +0 -1
- package/dist/components/media/AssetDetailSidebar.js +0 -101
- package/dist/components/media/BulkActionBar.d.ts +0 -9
- package/dist/components/media/BulkActionBar.d.ts.map +0 -1
- package/dist/components/media/BulkActionBar.js +0 -8
- package/dist/components/media/FolderNav.d.ts +0 -7
- package/dist/components/media/FolderNav.d.ts.map +0 -1
- package/dist/components/media/FolderNav.js +0 -12
- package/dist/components/media/FolderTreeSidebar.d.ts +0 -9
- package/dist/components/media/FolderTreeSidebar.d.ts.map +0 -1
- package/dist/components/media/FolderTreeSidebar.js +0 -41
- package/dist/components/media/ImagePicker.d.ts +0 -14
- package/dist/components/media/ImagePicker.d.ts.map +0 -1
- package/dist/components/media/ImagePicker.js +0 -45
- package/dist/components/media/MediaLibrary.d.ts +0 -35
- package/dist/components/media/MediaLibrary.d.ts.map +0 -1
- package/dist/components/media/MediaLibrary.js +0 -100
- package/dist/components/media/MediaToolbar.d.ts +0 -21
- package/dist/components/media/MediaToolbar.d.ts.map +0 -1
- package/dist/components/media/MediaToolbar.js +0 -6
- package/dist/components/media/UploadModal.d.ts +0 -9
- package/dist/components/media/UploadModal.d.ts.map +0 -1
- package/dist/components/media/UploadModal.js +0 -42
- package/dist/components/media/UploadZone.d.ts +0 -8
- package/dist/components/media/UploadZone.d.ts.map +0 -1
- package/dist/components/media/UploadZone.js +0 -22
- package/dist/components/media/index.d.ts +0 -11
- package/dist/components/media/index.d.ts.map +0 -1
- package/dist/components/media/index.js +0 -10
- package/dist/components/pages/BlockList.d.ts +0 -2
- package/dist/components/pages/BlockList.d.ts.map +0 -1
- package/dist/components/pages/BlockList.js +0 -280
- package/dist/components/pages/DataList.d.ts +0 -7
- package/dist/components/pages/DataList.d.ts.map +0 -1
- package/dist/components/pages/DataList.js +0 -244
- package/dist/components/pages/MediaPage.d.ts +0 -8
- package/dist/components/pages/MediaPage.d.ts.map +0 -1
- package/dist/components/pages/MediaPage.js +0 -107
- package/dist/components/pages/PageList.d.ts +0 -7
- package/dist/components/pages/PageList.d.ts.map +0 -1
- package/dist/components/pages/PageList.js +0 -308
- package/dist/components/pages/index.d.ts +0 -3
- package/dist/components/pages/index.d.ts.map +0 -1
- package/dist/components/pages/index.js +0 -2
- package/dist/components/puck/MDXContent.d.ts +0 -10
- package/dist/components/puck/MDXContent.d.ts.map +0 -1
- package/dist/components/puck/MDXContent.js +0 -80
- package/dist/components/puck/index.d.ts +0 -2
- package/dist/components/puck/index.d.ts.map +0 -1
- package/dist/components/puck/index.js +0 -1
- package/dist/components/toast.d.ts +0 -44
- package/dist/components/toast.d.ts.map +0 -1
- package/dist/components/toast.js +0 -7
- package/dist/components/ui/Banner.d.ts +0 -76
- package/dist/components/ui/Banner.d.ts.map +0 -1
- package/dist/components/ui/Banner.js +0 -49
- package/dist/components/ui/Button.d.ts +0 -25
- package/dist/components/ui/Button.d.ts.map +0 -1
- package/dist/components/ui/Button.js +0 -33
- package/dist/components/ui/Card.d.ts +0 -72
- package/dist/components/ui/Card.d.ts.map +0 -1
- package/dist/components/ui/Card.js +0 -49
- package/dist/components/ui/FieldError.d.ts +0 -24
- package/dist/components/ui/FieldError.d.ts.map +0 -1
- package/dist/components/ui/FieldError.js +0 -17
- package/dist/components/ui/IconButton.d.ts +0 -13
- package/dist/components/ui/IconButton.d.ts.map +0 -1
- package/dist/components/ui/IconButton.js +0 -10
- package/dist/components/ui/Input.d.ts +0 -37
- package/dist/components/ui/Input.d.ts.map +0 -1
- package/dist/components/ui/Input.js +0 -9
- package/dist/components/ui/SaveIndicator.d.ts +0 -8
- package/dist/components/ui/SaveIndicator.d.ts.map +0 -1
- package/dist/components/ui/SaveIndicator.js +0 -32
- package/dist/components/ui/Select.d.ts +0 -8
- package/dist/components/ui/Select.d.ts.map +0 -1
- package/dist/components/ui/Select.js +0 -9
- package/dist/components/ui/Separator.d.ts +0 -7
- package/dist/components/ui/Separator.d.ts.map +0 -1
- package/dist/components/ui/Separator.js +0 -8
- package/dist/components/ui/Textarea.d.ts +0 -8
- package/dist/components/ui/Textarea.d.ts.map +0 -1
- package/dist/components/ui/Textarea.js +0 -5
- package/dist/components/ui/Tooltip.d.ts +0 -9
- package/dist/components/ui/Tooltip.d.ts.map +0 -1
- package/dist/components/ui/Tooltip.js +0 -7
- package/dist/components/ui/index.d.ts +0 -14
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -17
- package/dist/data-schemas.d.mts +0 -25
- package/dist/data-schemas.d.mts.map +0 -1
- package/dist/data-schemas.d.ts +0 -22
- package/dist/data-schemas.d.ts.map +0 -1
- package/dist/data-schemas.js +0 -51
- package/dist/data-schemas.mjs +0 -51
- package/dist/data-schemas.mjs.map +0 -1
- package/dist/dev-entry.d.ts +0 -2
- package/dist/dev-entry.d.ts.map +0 -1
- package/dist/dev-entry.js +0 -19
- package/dist/dialog.d.mts +0 -56
- package/dist/dialog.d.mts.map +0 -1
- package/dist/dialog.mjs +0 -67
- package/dist/dialog.mjs.map +0 -1
- package/dist/hooks/index.d.ts +0 -10
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -7
- package/dist/hooks/useCanvasTheme.d.ts +0 -12
- package/dist/hooks/useCanvasTheme.d.ts.map +0 -1
- package/dist/hooks/useCanvasTheme.js +0 -33
- package/dist/hooks/useClickOutside.d.ts.map +0 -1
- package/dist/hooks/useClickOutside.js +0 -18
- package/dist/hooks/useDialogState.d.ts.map +0 -1
- package/dist/hooks/useDialogState.js +0 -31
- package/dist/hooks/useEditorPref.d.ts.map +0 -1
- package/dist/hooks/useEditorPref.js +0 -49
- package/dist/hooks/useErrorModal.d.ts +0 -15
- package/dist/hooks/useErrorModal.d.ts.map +0 -1
- package/dist/hooks/useErrorModal.js +0 -35
- package/dist/hooks/useSiteBaseUrl.d.ts +0 -10
- package/dist/hooks/useSiteBaseUrl.d.ts.map +0 -1
- package/dist/hooks/useSiteBaseUrl.js +0 -14
- package/dist/hooks/useTheme.d.ts +0 -13
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTheme.js +0 -69
- package/dist/hooks/useUnsavedChangesGuard.d.ts.map +0 -1
- package/dist/hooks/useUnsavedChangesGuard.js +0 -29
- package/dist/hooks/useUpload.d.ts +0 -10
- package/dist/hooks/useUpload.d.ts.map +0 -1
- package/dist/hooks/useUpload.js +0 -42
- package/dist/hooks/useUploadFlow.d.ts +0 -42
- package/dist/hooks/useUploadFlow.d.ts.map +0 -1
- package/dist/hooks/useUploadFlow.js +0 -148
- package/dist/host-style-probe.d.ts +0 -22
- package/dist/host-style-probe.d.ts.map +0 -1
- package/dist/host-style-probe.js +0 -508
- package/dist/index.d.mts +0 -253
- package/dist/index.d.mts.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.mjs +0 -38
- package/dist/index.mjs.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -47
- package/dist/main-spa-781YUplS.mjs +0 -46
- package/dist/main-spa-781YUplS.mjs.map +0 -1
- package/dist/main-spa.d.ts.map +0 -1
- package/dist/main-spa.js +0 -61
- package/dist/main.d.mts +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -13
- package/dist/main.mjs +0 -17
- package/dist/main.mjs.map +0 -1
- package/dist/mdx-components.d.mts +0 -207
- package/dist/mdx-components.d.mts.map +0 -1
- package/dist/mdx-components.d.ts +0 -204
- package/dist/mdx-components.d.ts.map +0 -1
- package/dist/mdx-components.js +0 -217
- package/dist/mdx-components.mjs +0 -208
- package/dist/mdx-components.mjs.map +0 -1
- package/dist/media/AssetScopePill.d.ts +0 -30
- package/dist/media/AssetScopePill.d.ts.map +0 -1
- package/dist/media/AssetScopePill.js +0 -30
- package/dist/media/MediaIssueBadge.d.ts +0 -33
- package/dist/media/MediaIssueBadge.d.ts.map +0 -1
- package/dist/media/MediaIssueBadge.js +0 -54
- package/dist/media/types.d.ts +0 -101
- package/dist/media/types.d.ts.map +0 -1
- package/dist/media/types.js +0 -1
- package/dist/media/use-asset-scope.d.ts +0 -25
- package/dist/media/use-asset-scope.d.ts.map +0 -1
- package/dist/media/use-asset-scope.js +0 -54
- package/dist/media/use-media-issue.d.ts +0 -24
- package/dist/media/use-media-issue.d.ts.map +0 -1
- package/dist/media/use-media-issue.js +0 -49
- package/dist/mock-puck-config.d.mts +0 -23
- package/dist/mock-puck-config.d.mts.map +0 -1
- package/dist/mock-puck-config.d.ts.map +0 -1
- package/dist/mock-puck-config.js +0 -73
- package/dist/mock-puck-config.mjs +0 -125
- package/dist/mock-puck-config.mjs.map +0 -1
- package/dist/page-schemas.d.mts +0 -159
- package/dist/page-schemas.d.mts.map +0 -1
- package/dist/page-schemas.d.ts +0 -156
- package/dist/page-schemas.d.ts.map +0 -1
- package/dist/page-schemas.js +0 -118
- package/dist/page-schemas.mjs +0 -120
- package/dist/page-schemas.mjs.map +0 -1
- package/dist/puck-config.d.mts +0 -33
- package/dist/puck-config.d.mts.map +0 -1
- package/dist/puck-config.d.ts.map +0 -1
- package/dist/puck-config.js +0 -50
- package/dist/puck-config.mjs +0 -50
- package/dist/puck-config.mjs.map +0 -1
- package/dist/selected-block.d.ts +0 -61
- package/dist/selected-block.d.ts.map +0 -1
- package/dist/selected-block.js +0 -64
- package/dist/site-styles.d.mts +0 -123
- package/dist/site-styles.d.mts.map +0 -1
- package/dist/site-styles.d.ts +0 -121
- package/dist/site-styles.d.ts.map +0 -1
- package/dist/site-styles.js +0 -253
- package/dist/site-styles.mjs +0 -234
- package/dist/site-styles.mjs.map +0 -1
- package/dist/toast.d.mts +0 -7
- package/dist/toast.d.mts.map +0 -1
- package/dist/toast.mjs +0 -16
- package/dist/toast.mjs.map +0 -1
- package/dist/types.d.ts +0 -57
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- package/dist/ui-CIacC6Mv.mjs +0 -318
- package/dist/ui-CIacC6Mv.mjs.map +0 -1
- package/dist/ui-config.d.ts +0 -70
- package/dist/ui-config.d.ts.map +0 -1
- package/dist/ui-config.js +0 -44
- package/dist/ui.d.mts +0 -290
- package/dist/ui.d.mts.map +0 -1
- package/dist/ui.mjs +0 -2
- package/dist/utils/asset-url.d.ts +0 -3
- package/dist/utils/asset-url.d.ts.map +0 -1
- package/dist/utils/asset-url.js +0 -7
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -5
- package/dist/utils/format-date.d.ts.map +0 -1
- package/dist/utils/format-date.js +0 -37
- package/dist/utils/mdast-to-html.d.ts.map +0 -1
- package/dist/utils/mdast-to-html.js +0 -206
- package/dist/utils/mdast-tree.d.ts.map +0 -1
- package/dist/utils/mdast-tree.js +0 -285
- package/dist/utils/pageMetadata.d.ts +0 -67
- package/dist/utils/pageMetadata.d.ts.map +0 -1
- package/dist/utils/pageMetadata.js +0 -161
- package/dist/utils/slugify.d.ts +0 -12
- package/dist/utils/slugify.d.ts.map +0 -1
- package/dist/utils/slugify.js +0 -17
- package/dist/utils/zodIntrospect.d.ts +0 -24
- package/dist/utils/zodIntrospect.d.ts.map +0 -1
- package/dist/utils/zodIntrospect.js +0 -88
- package/styles/styles.css.d.ts +0 -2
- package/styles/tailwind-theme.css.d.ts +0 -2
- /package/dist/{components → ts/components}/editor/host-wrapper-plugin.d.ts +0 -0
- /package/dist/{components → ts/components}/editor/insert-menu/mdx-components-plugin.d.ts +0 -0
- /package/dist/{hooks → ts/hooks}/useClickOutside.d.ts +0 -0
- /package/dist/{hooks → ts/hooks}/useDialogState.d.ts +0 -0
- /package/dist/{hooks → ts/hooks}/useEditorPref.d.ts +0 -0
- /package/dist/{hooks → ts/hooks}/useUnsavedChangesGuard.d.ts +0 -0
- /package/dist/{lib → ts/lib}/utils.d.ts +0 -0
- /package/dist/{main-spa.d.ts → ts/main-spa.d.ts} +0 -0
- /package/dist/{main.d.ts → ts/main.d.ts} +0 -0
- /package/dist/{mock-puck-config.d.ts → ts/mock-puck-config.d.ts} +0 -0
- /package/dist/{puck-config.d.ts → ts/puck-config.d.ts} +0 -0
- /package/dist/{utils → ts/utils}/cn.d.ts +0 -0
- /package/dist/{utils → ts/utils}/format-date.d.ts +0 -0
- /package/dist/{utils → ts/utils}/mdast-to-html.d.ts +0 -0
- /package/dist/{utils → ts/utils}/mdast-tree.d.ts +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { isJsxDescriptor } from './mdx-components-define.js';
|
|
3
|
+
// The declaration surface (types, defineMdxComponents, the attribute
|
|
4
|
+
// helpers) lives in mdx-components-define — editor-free so content configs
|
|
5
|
+
// and bare test runners can evaluate it. Re-exported here so existing
|
|
6
|
+
// importers of this module keep working unchanged.
|
|
7
|
+
export * from './mdx-components-define.js';
|
|
8
|
+
/**
|
|
9
|
+
* Translate a JSX-flavored plugin descriptor to the upstream
|
|
10
|
+
* `JsxComponentDescriptor` shape that `@mdxeditor/editor` consumes.
|
|
11
|
+
* Booleans surface as expressions (`{true}`) because the upstream
|
|
12
|
+
* `JsxPropertyDescriptor.type` is `'string' | 'number' | 'expression'`.
|
|
13
|
+
*
|
|
14
|
+
* The fallback editor is injected by the CMS editor entrypoint. Keeping that
|
|
15
|
+
* dependency one-way prevents the registry module from importing GenericBlock,
|
|
16
|
+
* which itself consumes this registry.
|
|
17
|
+
*
|
|
18
|
+
* Snippet descriptors are not JSX — call sites filter them out before
|
|
19
|
+
* dispatching here. Passing one throws to surface the misuse loudly.
|
|
20
|
+
*/
|
|
21
|
+
export function toJsxComponentDescriptor(d, fallbackEditor) {
|
|
22
|
+
if (!isJsxDescriptor(d)) {
|
|
23
|
+
throw new Error(`toJsxComponentDescriptor: '${d.name}' is a snippet, not a JSX component.`);
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
name: d.name,
|
|
27
|
+
kind: d.kind,
|
|
28
|
+
props: (d.props ?? []).map((p) => ({
|
|
29
|
+
name: p.name,
|
|
30
|
+
type: p.type === 'boolean' ? 'expression' : p.type,
|
|
31
|
+
required: p.required,
|
|
32
|
+
})),
|
|
33
|
+
hasChildren: d.hasChildren,
|
|
34
|
+
Editor: d.Editor ?? fallbackEditor,
|
|
35
|
+
...(d.import ? { source: d.import.from, defaultExport: d.import.default ?? false } : {}),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const getSharedState = () => {
|
|
39
|
+
if (typeof window !== 'undefined') {
|
|
40
|
+
const w = window;
|
|
41
|
+
if (!w.__MDX_COMPONENTS_STATE__) {
|
|
42
|
+
w.__MDX_COMPONENTS_STATE__ = {
|
|
43
|
+
components: [],
|
|
44
|
+
subscribers: new Set(),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return w.__MDX_COMPONENTS_STATE__;
|
|
48
|
+
}
|
|
49
|
+
return { components: [], subscribers: new Set() };
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Replace the registered MDX components. Called by the virtual module that
|
|
53
|
+
* loads the host's `schemas.ts`. Notifies subscribers so the editor picks
|
|
54
|
+
* up HMR updates without remounting.
|
|
55
|
+
*/
|
|
56
|
+
export function setMdxComponents(components) {
|
|
57
|
+
const state = getSharedState();
|
|
58
|
+
state.components = components;
|
|
59
|
+
state.subscribers.forEach((fn) => {
|
|
60
|
+
fn(components);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** Read the current registry synchronously. */
|
|
64
|
+
export function getMdxComponents() {
|
|
65
|
+
return getSharedState().components;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Install the host-authored descriptor list (the schemas module's
|
|
69
|
+
* `mdxComponents` export) without disturbing auto-discovered entries.
|
|
70
|
+
*
|
|
71
|
+
* The dev SPA has two unordered producers: the schemas virtual module and
|
|
72
|
+
* the `/api/registry` fetch. A plain `setMdxComponents` from whichever
|
|
73
|
+
* settled last overwrote the other's entries — discovered components
|
|
74
|
+
* vanished whenever the fetch won the race. Each producer now writes its
|
|
75
|
+
* own remembered slot and the registry is recomputed as the merge of both,
|
|
76
|
+
* so settle order stops mattering. A host app that installs the full list
|
|
77
|
+
* with a single `setMdxComponents` call keeps doing so; these slots are
|
|
78
|
+
* dev-only plumbing.
|
|
79
|
+
*/
|
|
80
|
+
export function installHostAuthoredMdxComponents(components) {
|
|
81
|
+
const state = getSharedState();
|
|
82
|
+
state.hostAuthored = components;
|
|
83
|
+
setMdxComponents(mergeDiscoveredMdxComponents(components, state.discovered ?? []));
|
|
84
|
+
}
|
|
85
|
+
/** Install the auto-discovered descriptor list — see `installHostAuthoredMdxComponents`. */
|
|
86
|
+
export function installDiscoveredMdxComponents(components) {
|
|
87
|
+
const state = getSharedState();
|
|
88
|
+
state.discovered = components;
|
|
89
|
+
setMdxComponents(mergeDiscoveredMdxComponents(state.hostAuthored ?? [], components));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Merge auto-discovered descriptors over host-authored ones.
|
|
93
|
+
*
|
|
94
|
+
* Discovered entries win on a name collision: they are derived from the
|
|
95
|
+
* source of truth (the MDX files and component folders themselves), while a
|
|
96
|
+
* hand-written list can lag. ONE rule for every caller — the dev SPA merges
|
|
97
|
+
* the `/api/registry` response over the `schemasPath` exports, and a host app
|
|
98
|
+
* merges the same two lists from what it supplies.
|
|
99
|
+
*
|
|
100
|
+
* Host survivors keep their relative order and discovered entries append
|
|
101
|
+
* after them, so a colliding entry surfaces at its discovered position, not
|
|
102
|
+
* its host slot. Inputs are assumed unique-by-name — that validation lives
|
|
103
|
+
* in `defineMdxComponents` and the discovery merge, not here.
|
|
104
|
+
*/
|
|
105
|
+
export function mergeDiscoveredMdxComponents(hostAuthored, discovered) {
|
|
106
|
+
if (discovered.length === 0)
|
|
107
|
+
return hostAuthored;
|
|
108
|
+
const discoveredNames = new Set(discovered.map((descriptor) => descriptor.name));
|
|
109
|
+
return [...hostAuthored.filter((descriptor) => !discoveredNames.has(descriptor.name)), ...discovered];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* React hook subscribing to registry changes. Returns the current array and
|
|
113
|
+
* updates on HMR.
|
|
114
|
+
*/
|
|
115
|
+
export function useMdxComponents() {
|
|
116
|
+
const [components, setComponents] = useState(() => getSharedState().components);
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
const state = getSharedState();
|
|
119
|
+
if (state.components !== components) {
|
|
120
|
+
setComponents(state.components);
|
|
121
|
+
}
|
|
122
|
+
state.subscribers.add(setComponents);
|
|
123
|
+
return () => {
|
|
124
|
+
state.subscribers.delete(setComponents);
|
|
125
|
+
};
|
|
126
|
+
}, [components]);
|
|
127
|
+
return components;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=mdx-components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mdx-components.js","sourceRoot":"","sources":["../../src/mdx-components.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,eAAe,EAAmD,MAAM,4BAA4B,CAAC;AAE9G,qEAAqE;AACrE,2EAA2E;AAC3E,sEAAsE;AACtE,mDAAmD;AACnD,cAAc,4BAA4B,CAAC;AAE3C;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CACtC,CAAyB,EACzB,cAA6C;IAE7C,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC,IAAI,sCAAsC,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO;QACL,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;YAClD,QAAQ,EAAE,CAAC,CAAC,QAAQ;SACrB,CAAC,CAAC;QACH,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,cAAc;QAClC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzF,CAAC;AACJ,CAAC;AAcD,MAAM,cAAc,GAAG,GAA6B,EAAE;IACpD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,CAAC,GAAG,MAA4E,CAAC;QACvF,IAAI,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAC;YAChC,CAAC,CAAC,wBAAwB,GAAG;gBAC3B,UAAU,EAAE,EAAE;gBACd,WAAW,EAAE,IAAI,GAAG,EAAE;aACvB,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,CAAC,wBAAwB,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACpD,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAyB;IACxD,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC/B,EAAE,CAAC,UAAU,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,gBAAgB;IAC9B,OAAO,cAAc,EAAE,CAAC,UAAU,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gCAAgC,CAAC,UAAyB;IACxE,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC;IAChC,gBAAgB,CAAC,4BAA4B,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC;AACrF,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,8BAA8B,CAAC,UAAyB;IACtE,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,gBAAgB,CAAC,4BAA4B,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,4BAA4B,CAAC,YAA2B,EAAE,UAAyB;IACjG,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC;IACjD,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACjF,OAAO,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC;AACxG,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC;IAEhF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;QAC/B,IAAI,KAAK,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YACpC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACrC,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC1C,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AssetScope } from './types.js';
|
|
2
|
+
interface AssetScopePillProps {
|
|
3
|
+
scope: AssetScope | null;
|
|
4
|
+
/**
|
|
5
|
+
* Visual size variant. `sm` is the AssetCard corner badge;
|
|
6
|
+
* `md` is the AssetDetailSidebar inline label. Defaults to `sm`.
|
|
7
|
+
*/
|
|
8
|
+
size?: 'sm' | 'md';
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Pill rendering a host-supplied `AssetScope` ("Branch only" /
|
|
13
|
+
* "Published"). When `scope` is `null`, renders nothing — callers
|
|
14
|
+
* can safely render this unconditionally and let it disappear when
|
|
15
|
+
* no bridge is installed (the local-Astro case).
|
|
16
|
+
*
|
|
17
|
+
* Colour vocabulary mirrors the broader cms-spa palette:
|
|
18
|
+
*
|
|
19
|
+
* - `published` → green (matches the deploy "live" indicator —
|
|
20
|
+
* "this is what your site is serving").
|
|
21
|
+
* - `branch` → amber (matches the "work in flight" idiom from
|
|
22
|
+
* git-status / divergence banners — "yours alone for now,
|
|
23
|
+
* needs publishing before anyone else sees it").
|
|
24
|
+
*
|
|
25
|
+
* The pill itself is purely presentational; the bridge wiring and
|
|
26
|
+
* the publishing rules live in the host app.
|
|
27
|
+
*/
|
|
28
|
+
export declare function AssetScopePill({ scope, size, className }: AssetScopePillProps): import("react").JSX.Element | null;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=AssetScopePill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetScopePill.d.ts","sourceRoot":"","sources":["../../../src/media/AssetScopePill.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,UAAU,mBAAmB;IAC3B,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,mBAAmB,sCAyBpF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn.js';
|
|
3
|
+
/**
|
|
4
|
+
* Pill rendering a host-supplied `AssetScope` ("Branch only" /
|
|
5
|
+
* "Published"). When `scope` is `null`, renders nothing — callers
|
|
6
|
+
* can safely render this unconditionally and let it disappear when
|
|
7
|
+
* no bridge is installed (the local-Astro case).
|
|
8
|
+
*
|
|
9
|
+
* Colour vocabulary mirrors the broader cms-spa palette:
|
|
10
|
+
*
|
|
11
|
+
* - `published` → green (matches the deploy "live" indicator —
|
|
12
|
+
* "this is what your site is serving").
|
|
13
|
+
* - `branch` → amber (matches the "work in flight" idiom from
|
|
14
|
+
* git-status / divergence banners — "yours alone for now,
|
|
15
|
+
* needs publishing before anyone else sees it").
|
|
16
|
+
*
|
|
17
|
+
* The pill itself is purely presentational; the bridge wiring and
|
|
18
|
+
* the publishing rules live in the host app.
|
|
19
|
+
*/
|
|
20
|
+
export function AssetScopePill({ scope, size = 'sm', className }) {
|
|
21
|
+
if (!scope)
|
|
22
|
+
return null;
|
|
23
|
+
const isBranch = scope === 'branch';
|
|
24
|
+
const label = isBranch ? 'Branch only' : 'Published';
|
|
25
|
+
const sizeClasses = size === 'sm' ? 'text-[10px] px-1.5 py-0.5 leading-tight' : 'text-xs px-2 py-0.5';
|
|
26
|
+
const variantClasses = isBranch
|
|
27
|
+
? 'bg-yellow-11 dark:bg-yellow-02 text-yellow-04 dark:text-yellow-09 border-yellow-08 dark:border-yellow-03'
|
|
28
|
+
: 'bg-green-11 dark:bg-green-02 text-green-04 dark:text-green-08 border-green-08 dark:border-green-03';
|
|
29
|
+
return (_jsx("span", { role: "status", "aria-label": `Asset scope: ${label}`, className: cn('inline-flex items-center font-medium rounded border uppercase tracking-wide', sizeClasses, variantClasses, className), children: label }));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=AssetScopePill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetScopePill.js","sourceRoot":"","sources":["../../../src/media/AssetScopePill.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAapC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAuB;IACnF,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,QAAQ,GAAG,KAAK,KAAK,QAAQ,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,qBAAqB,CAAC;IAEtG,MAAM,cAAc,GAAG,QAAQ;QAC7B,CAAC,CAAC,0GAA0G;QAC5G,CAAC,CAAC,oGAAoG,CAAC;IAEzG,OAAO,CACL,eACE,IAAI,EAAC,QAAQ,gBACD,gBAAgB,KAAK,EAAE,EACnC,SAAS,EAAE,EAAE,CACX,6EAA6E,EAC7E,WAAW,EACX,cAAc,EACd,SAAS,CACV,YAEA,KAAK,GACD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MediaIssue } from './types.js';
|
|
2
|
+
interface MediaIssueBadgeProps {
|
|
3
|
+
issue: MediaIssue | null;
|
|
4
|
+
/**
|
|
5
|
+
* Visual size variant. `sm` is the AssetCard corner badge;
|
|
6
|
+
* `md` is the AssetDetailSidebar inline block (with full reason
|
|
7
|
+
* text). Defaults to `sm`.
|
|
8
|
+
*/
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Badge rendering a host-supplied `MediaIssue` ("Oversized" /
|
|
14
|
+
* "Blocked"). When `issue` is `null`, renders nothing — callers
|
|
15
|
+
* can mount this unconditionally and let it disappear when the
|
|
16
|
+
* host has no bridge or the asset is healthy.
|
|
17
|
+
*
|
|
18
|
+
* Colour vocabulary:
|
|
19
|
+
*
|
|
20
|
+
* - `blocked` → red (matches the destructive / fail palette —
|
|
21
|
+
* "this cannot ship").
|
|
22
|
+
* - `oversized` → amber (matches the "work in flight / take
|
|
23
|
+
* action" idiom shared with `AssetScopePill`'s branch variant —
|
|
24
|
+
* "not blocked, but over the host's size limit").
|
|
25
|
+
*
|
|
26
|
+
* `sm` paints a compact one-word badge for the AssetCard corner
|
|
27
|
+
* (sits below the scope pill so the two stack cleanly). `md` paints
|
|
28
|
+
* a wider block with the full reason / size detail for the
|
|
29
|
+
* AssetDetailSidebar header.
|
|
30
|
+
*/
|
|
31
|
+
export declare function MediaIssueBadge({ issue, size, className }: MediaIssueBadgeProps): import("react").JSX.Element | null;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=MediaIssueBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaIssueBadge.d.ts","sourceRoot":"","sources":["../../../src/media/MediaIssueBadge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,UAAU,oBAAoB;IAC5B,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,oBAAoB,sCAsCtF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn.js';
|
|
3
|
+
/**
|
|
4
|
+
* Format an oversized issue's size delta into user-facing copy
|
|
5
|
+
* for the `md` variant. `sm` only uses the short label so the corner
|
|
6
|
+
* badge stays scannable; this helper kicks in for the sidebar block.
|
|
7
|
+
*
|
|
8
|
+
* Rounds to one decimal MB for readability — promoting "5.4 MB"
|
|
9
|
+
* over "5,400,000 bytes" matches the rest of cms-spa's file-size
|
|
10
|
+
* vocabulary (`formatFileSize`).
|
|
11
|
+
*/
|
|
12
|
+
function formatOversizedDetail(sizeBytes, limitBytes) {
|
|
13
|
+
const mb = (bytes) => `${(bytes / 1_000_000).toFixed(1).replace(/\.0$/, '')} MB`;
|
|
14
|
+
return `${mb(sizeBytes)} is over the ${mb(limitBytes)} size limit.`;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Badge rendering a host-supplied `MediaIssue` ("Oversized" /
|
|
18
|
+
* "Blocked"). When `issue` is `null`, renders nothing — callers
|
|
19
|
+
* can mount this unconditionally and let it disappear when the
|
|
20
|
+
* host has no bridge or the asset is healthy.
|
|
21
|
+
*
|
|
22
|
+
* Colour vocabulary:
|
|
23
|
+
*
|
|
24
|
+
* - `blocked` → red (matches the destructive / fail palette —
|
|
25
|
+
* "this cannot ship").
|
|
26
|
+
* - `oversized` → amber (matches the "work in flight / take
|
|
27
|
+
* action" idiom shared with `AssetScopePill`'s branch variant —
|
|
28
|
+
* "not blocked, but over the host's size limit").
|
|
29
|
+
*
|
|
30
|
+
* `sm` paints a compact one-word badge for the AssetCard corner
|
|
31
|
+
* (sits below the scope pill so the two stack cleanly). `md` paints
|
|
32
|
+
* a wider block with the full reason / size detail for the
|
|
33
|
+
* AssetDetailSidebar header.
|
|
34
|
+
*/
|
|
35
|
+
export function MediaIssueBadge({ issue, size = 'sm', className }) {
|
|
36
|
+
if (!issue)
|
|
37
|
+
return null;
|
|
38
|
+
const isBlocked = issue.kind === 'blocked';
|
|
39
|
+
const shortLabel = isBlocked ? 'Blocked' : 'Oversized';
|
|
40
|
+
const sizeClasses = size === 'sm' ? 'text-[10px] px-1.5 py-0.5 leading-tight' : 'text-xs px-2 py-1';
|
|
41
|
+
const variantClasses = isBlocked
|
|
42
|
+
? 'bg-red-11 dark:bg-red-02 text-red-04 dark:text-red-08 border-red-08 dark:border-red-03'
|
|
43
|
+
: 'bg-amber-11 dark:bg-amber-02 text-amber-04 dark:text-amber-08 border-amber-08 dark:border-amber-03';
|
|
44
|
+
// `md` paints the full reason / size delta so the sidebar
|
|
45
|
+
// surface reads as a self-contained explanation, not just a
|
|
46
|
+
// label. `sm` stays at the short label so the AssetCard corner
|
|
47
|
+
// doesn't get crowded.
|
|
48
|
+
const detail = size === 'md'
|
|
49
|
+
? issue.kind === 'blocked'
|
|
50
|
+
? issue.reason
|
|
51
|
+
: formatOversizedDetail(issue.sizeBytes, issue.limitBytes)
|
|
52
|
+
: null;
|
|
53
|
+
return (_jsxs("span", { role: "status", "aria-label": `Media issue: ${shortLabel}${detail ? ` — ${detail}` : ''}`, className: cn('inline-flex items-center font-medium rounded border', size === 'sm' ? 'uppercase tracking-wide' : 'gap-2', sizeClasses, variantClasses, className), children: [_jsx("span", { className: size === 'md' ? 'uppercase tracking-wide font-semibold' : undefined, children: shortLabel }), detail ? _jsx("span", { className: "font-normal normal-case tracking-normal", children: detail }) : null] }));
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=MediaIssueBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaIssueBadge.js","sourceRoot":"","sources":["../../../src/media/MediaIssueBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAcpC;;;;;;;;GAQG;AACH,SAAS,qBAAqB,CAAC,SAAiB,EAAE,UAAkB;IAClE,MAAM,EAAE,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC;IACzF,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC;AACtE,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAwB;IACrF,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;IAC3C,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;IACvD,MAAM,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAEpG,MAAM,cAAc,GAAG,SAAS;QAC9B,CAAC,CAAC,wFAAwF;QAC1F,CAAC,CAAC,oGAAoG,CAAC;IAEzG,0DAA0D;IAC1D,4DAA4D;IAC5D,+DAA+D;IAC/D,uBAAuB;IACvB,MAAM,MAAM,GACV,IAAI,KAAK,IAAI;QACX,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;YACxB,CAAC,CAAC,KAAK,CAAC,MAAM;YACd,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC;QAC5D,CAAC,CAAC,IAAI,CAAC;IAEX,OAAO,CACL,gBACE,IAAI,EAAC,QAAQ,gBACD,gBAAgB,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EACvE,SAAS,EAAE,EAAE,CACX,qDAAqD,EACrD,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,EACnD,WAAW,EACX,cAAc,EACd,SAAS,CACV,aAED,eAAM,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC,SAAS,YAAG,UAAU,GAAQ,EACxG,MAAM,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,yCAAyC,YAAE,MAAM,GAAQ,CAAC,CAAC,CAAC,IAAI,IACrF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle scope of a media asset when a host app works on
|
|
3
|
+
* branches. cms-spa's renderer-neutral `AssetEntry` (in
|
|
4
|
+
* `content-api/asset-types.ts`) doesn't model this — branch vs
|
|
5
|
+
* published is meaningful only when an asset lives in a working
|
|
6
|
+
* tree separate from the published default branch.
|
|
7
|
+
*
|
|
8
|
+
* A host app surfaces the distinction through
|
|
9
|
+
* `UIConfig.mediaBridge.getAssetScope`. cms-spa's media surfaces
|
|
10
|
+
* (AssetCard, AssetDetailSidebar) paint a "Branch only" /
|
|
11
|
+
* "Published" pill based on the bridge's reply. When no bridge is
|
|
12
|
+
* installed (local Astro dev, astro-cms standalone), the pill is
|
|
13
|
+
* hidden — surfaces render exactly as they did before.
|
|
14
|
+
*
|
|
15
|
+
* - `branch` — exists only on this branch's working tree. The
|
|
16
|
+
* published site cannot see it until it is published.
|
|
17
|
+
* - `published` — on the site's default branch and visible from
|
|
18
|
+
* every branch.
|
|
19
|
+
*/
|
|
20
|
+
export type AssetScope = 'branch' | 'published';
|
|
21
|
+
/**
|
|
22
|
+
* Standing media issue a host app reports alongside the
|
|
23
|
+
* `AssetScope` pill. Distinct from the outcome of a single call:
|
|
24
|
+
* an issue here is a property OF the asset that persists until
|
|
25
|
+
* the user resolves it.
|
|
26
|
+
*
|
|
27
|
+
* cms-spa's renderer-neutral asset model doesn't carry these
|
|
28
|
+
* fields because astro-cms on its own has no notion of them —
|
|
29
|
+
* they're host state a host app exposes through
|
|
30
|
+
* `UIConfig.mediaBridge.getMediaIssue`.
|
|
31
|
+
*
|
|
32
|
+
* - `oversized` — the host says the file is over its size limit.
|
|
33
|
+
* The asset is still served. Surface paints an amber warning.
|
|
34
|
+
* - `blocked` — the host is holding the content back, for the
|
|
35
|
+
* given `reason`. Surface paints a red error with that reason.
|
|
36
|
+
*
|
|
37
|
+
* Both variants carry `filename` so flat lists are self-joinable
|
|
38
|
+
* to the user's dirty page set without a second lookup.
|
|
39
|
+
*/
|
|
40
|
+
export type MediaIssue = {
|
|
41
|
+
kind: 'oversized';
|
|
42
|
+
filename: string;
|
|
43
|
+
sizeBytes: number;
|
|
44
|
+
limitBytes: number;
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'blocked';
|
|
47
|
+
filename: string;
|
|
48
|
+
reason: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Bridge cms-spa uses to read host-supplied metadata about media
|
|
52
|
+
* assets that cms-spa's renderer-neutral model doesn't carry.
|
|
53
|
+
* Installed by a host app via `UIConfig.mediaBridge` before
|
|
54
|
+
* rendering `<CmsSpaApp />`; cms-spa never reaches into the host
|
|
55
|
+
* app's own client directly.
|
|
56
|
+
*
|
|
57
|
+
* The bridge is optional in `UIConfig` — absence means "no host
|
|
58
|
+
* wiring," in which case cms-spa surfaces degrade cleanly (no
|
|
59
|
+
* scope pill, no host-side hooks fire).
|
|
60
|
+
*/
|
|
61
|
+
export interface MediaBridge {
|
|
62
|
+
/**
|
|
63
|
+
* Resolve the lifecycle scope of a single asset. Called by
|
|
64
|
+
* AssetCard / AssetDetailSidebar whenever they need to render
|
|
65
|
+
* the scope pill. Returns `null` when the host has no opinion
|
|
66
|
+
* (asset unknown to the host, pre-bootstrap state, or no host
|
|
67
|
+
* app at all); the surface treats `null` the same as
|
|
68
|
+
* "no bridge" — pill hidden.
|
|
69
|
+
*
|
|
70
|
+
* `folder` tells same-named assets in different folders apart, so
|
|
71
|
+
* a subfolder asset never borrows a root asset's scope. Optional
|
|
72
|
+
* for backward compatibility (absent ⇒ root); consumers pass the
|
|
73
|
+
* asset's own folder.
|
|
74
|
+
*
|
|
75
|
+
* The host is responsible for caching: cms-spa calls this
|
|
76
|
+
* synchronously-from-the-surface's-POV via TanStack so
|
|
77
|
+
* repeated renders don't refetch. A host app typically wraps
|
|
78
|
+
* its own lookup in a cached query so the resolved scope is
|
|
79
|
+
* memoised.
|
|
80
|
+
*/
|
|
81
|
+
getAssetScope(input: {
|
|
82
|
+
filename: string;
|
|
83
|
+
folder?: string;
|
|
84
|
+
}): Promise<AssetScope | null>;
|
|
85
|
+
/**
|
|
86
|
+
* Resolve the standing media issue for a single asset, or `null`
|
|
87
|
+
* when the asset is healthy. Called by AssetCard /
|
|
88
|
+
* AssetDetailSidebar whenever they paint the per-asset
|
|
89
|
+
* error/warning badge.
|
|
90
|
+
*
|
|
91
|
+
* `folder` tells same-named assets apart the same way
|
|
92
|
+
* `getAssetScope` does, so an issue with `uploads/hero.jpg`
|
|
93
|
+
* never badges a root `hero.jpg`. Optional (absent ⇒ root).
|
|
94
|
+
*
|
|
95
|
+
* Returns `null` for the same reasons as `getAssetScope`: host
|
|
96
|
+
* has no opinion (asset unknown, pre-bootstrap state, no host
|
|
97
|
+
* app). Surfaces treat `null` the same as "no bridge" — badge
|
|
98
|
+
* hidden, `AssetEntry` rendered unchanged.
|
|
99
|
+
*
|
|
100
|
+
* The host caches the lookup so cms-spa's `useMediaIssue` wrapper
|
|
101
|
+
* doesn't have to think about per-asset cache windows.
|
|
102
|
+
*/
|
|
103
|
+
getMediaIssue(input: {
|
|
104
|
+
filename: string;
|
|
105
|
+
folder?: string;
|
|
106
|
+
}): Promise<MediaIssue | null>;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/media/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACxF;;;;;;;;;;;;;;;;;OAiBG;IACH,aAAa,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;CACzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/media/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AssetScope } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the host-supplied lifecycle scope of a single asset.
|
|
4
|
+
*
|
|
5
|
+
* Returns `null` when:
|
|
6
|
+
*
|
|
7
|
+
* - No `mediaBridge` is configured (cms-spa running standalone /
|
|
8
|
+
* astro-cms / local dev) — the surface knows "the host has no
|
|
9
|
+
* opinion" and hides the scope pill.
|
|
10
|
+
* - The bridge resolves to `null` (asset unknown to the host or
|
|
11
|
+
* pre-bootstrap state).
|
|
12
|
+
*
|
|
13
|
+
* The pill is only rendered when this returns `'branch'` or
|
|
14
|
+
* `'published'`. Loading state is also treated as `null` for the
|
|
15
|
+
* caller's purposes — a flashing pill on first paint reads worse
|
|
16
|
+
* than no pill, and the scope is metadata, not primary content.
|
|
17
|
+
*
|
|
18
|
+
* A host app's bridge typically wraps its own lookup so the actual
|
|
19
|
+
* fetch is cached one level deeper. From cms-spa's POV this is just
|
|
20
|
+
* a lookup; the TanStack wrapper here is so repeat AssetCard renders
|
|
21
|
+
* don't re-call the bridge for the same filename.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useAssetScope(filename: string | undefined, folder?: string): AssetScope | null;
|
|
24
|
+
//# sourceMappingURL=use-asset-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-asset-scope.d.ts","sourceRoot":"","sources":["../../../src/media/use-asset-scope.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAc7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAoB9F"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { getUIConfig } from '../ui-config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Cache-key namespace for per-asset scope lookups. Keyed by
|
|
5
|
+
* filename — the host app owns the branch scoping behind the
|
|
6
|
+
* bridge, so cms-spa sees a flat "which filename?" surface and the
|
|
7
|
+
* bridge resolves it for the current site and branch.
|
|
8
|
+
*
|
|
9
|
+
* When the user switches branches, the host app invalidates this
|
|
10
|
+
* whole prefix (`['asset-scope']`) so stale scope answers don't
|
|
11
|
+
* leak across the boundary.
|
|
12
|
+
*/
|
|
13
|
+
const ASSET_SCOPE_QUERY_KEY_PREFIX = ['asset-scope'];
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the host-supplied lifecycle scope of a single asset.
|
|
16
|
+
*
|
|
17
|
+
* Returns `null` when:
|
|
18
|
+
*
|
|
19
|
+
* - No `mediaBridge` is configured (cms-spa running standalone /
|
|
20
|
+
* astro-cms / local dev) — the surface knows "the host has no
|
|
21
|
+
* opinion" and hides the scope pill.
|
|
22
|
+
* - The bridge resolves to `null` (asset unknown to the host or
|
|
23
|
+
* pre-bootstrap state).
|
|
24
|
+
*
|
|
25
|
+
* The pill is only rendered when this returns `'branch'` or
|
|
26
|
+
* `'published'`. Loading state is also treated as `null` for the
|
|
27
|
+
* caller's purposes — a flashing pill on first paint reads worse
|
|
28
|
+
* than no pill, and the scope is metadata, not primary content.
|
|
29
|
+
*
|
|
30
|
+
* A host app's bridge typically wraps its own lookup so the actual
|
|
31
|
+
* fetch is cached one level deeper. From cms-spa's POV this is just
|
|
32
|
+
* a lookup; the TanStack wrapper here is so repeat AssetCard renders
|
|
33
|
+
* don't re-call the bridge for the same filename.
|
|
34
|
+
*/
|
|
35
|
+
export function useAssetScope(filename, folder) {
|
|
36
|
+
const query = useQuery({
|
|
37
|
+
// Folder is part of the key so same-named assets in different folders
|
|
38
|
+
// cache (and invalidate) independently; the `['asset-scope']` prefix
|
|
39
|
+
// invalidation still catches every entry.
|
|
40
|
+
queryKey: [...ASSET_SCOPE_QUERY_KEY_PREFIX, filename ?? '', folder ?? ''],
|
|
41
|
+
queryFn: async () => {
|
|
42
|
+
const bridge = getUIConfig().mediaBridge;
|
|
43
|
+
if (!bridge || !filename)
|
|
44
|
+
return null;
|
|
45
|
+
return bridge.getAssetScope({ filename, folder });
|
|
46
|
+
},
|
|
47
|
+
// Per-filename scope is stable for the lifetime of a branch
|
|
48
|
+
// session — only publishing the asset changes it, and the host
|
|
49
|
+
// app invalidates the prefix when that succeeds. 5 minutes
|
|
50
|
+
// matches the cms-spa default staleTime so the surface doesn't
|
|
51
|
+
// have to think about cache windows.
|
|
52
|
+
staleTime: 1000 * 60 * 5,
|
|
53
|
+
enabled: Boolean(filename),
|
|
54
|
+
});
|
|
55
|
+
return query.data ?? null;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=use-asset-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-asset-scope.js","sourceRoot":"","sources":["../../../src/media/use-asset-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;;;;;;;;GASG;AACH,MAAM,4BAA4B,GAAG,CAAC,aAAa,CAAU,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,aAAa,CAAC,QAA4B,EAAE,MAAe;IACzE,MAAM,KAAK,GAAG,QAAQ,CAAoB;QACxC,sEAAsE;QACtE,qEAAqE;QACrE,0CAA0C;QAC1C,QAAQ,EAAE,CAAC,GAAG,4BAA4B,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,EAAE,CAAC;QACzE,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC,WAAW,CAAC;YACzC,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ;gBAAE,OAAO,IAAI,CAAC;YACtC,OAAO,MAAM,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,4DAA4D;QAC5D,+DAA+D;QAC/D,2DAA2D;QAC3D,+DAA+D;QAC/D,qCAAqC;QACrC,SAAS,EAAE,IAAI,GAAG,EAAE,GAAG,CAAC;QACxB,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;KAC3B,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MediaIssue } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the host-supplied standing media issue for a single asset.
|
|
4
|
+
*
|
|
5
|
+
* Returns `null` when:
|
|
6
|
+
*
|
|
7
|
+
* - No `mediaBridge` is configured (cms-spa standalone, astro-cms,
|
|
8
|
+
* local dev) — the surface knows "the host has no opinion" and
|
|
9
|
+
* hides the issue badge.
|
|
10
|
+
* - The bridge resolves to `null` (asset healthy, unknown to the
|
|
11
|
+
* host, or pre-bootstrap state).
|
|
12
|
+
*
|
|
13
|
+
* The badge is only rendered when this returns a real issue. Loading
|
|
14
|
+
* state is treated as `null` for the caller's purposes — a flashing
|
|
15
|
+
* badge on first paint reads worse than no badge, and issue state is
|
|
16
|
+
* metadata, not primary content.
|
|
17
|
+
*
|
|
18
|
+
* Mirrors the `useAssetScope` discipline: cms-spa stays a thin
|
|
19
|
+
* consumer of `getUIConfig().mediaBridge`; a host app's bridge
|
|
20
|
+
* typically wraps its own lookup in a cached query so the cache is
|
|
21
|
+
* hit one level deeper.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useMediaIssue(filename: string | undefined, folder?: string): MediaIssue | null;
|
|
24
|
+
//# sourceMappingURL=use-media-issue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-media-issue.d.ts","sourceRoot":"","sources":["../../../src/media/use-media-issue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAU7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAmB9F"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { getUIConfig } from '../ui-config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Cache-key namespace for per-asset issue lookups. Mirrors the
|
|
5
|
+
* `['asset-scope']` prefix used by `useAssetScope` — a host app
|
|
6
|
+
* invalidates this whole prefix when the site or branch changes and
|
|
7
|
+
* after it publishes assets, so stale entries don't leak.
|
|
8
|
+
*/
|
|
9
|
+
const MEDIA_ISSUE_QUERY_KEY_PREFIX = ['media-issue'];
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the host-supplied standing media issue for a single asset.
|
|
12
|
+
*
|
|
13
|
+
* Returns `null` when:
|
|
14
|
+
*
|
|
15
|
+
* - No `mediaBridge` is configured (cms-spa standalone, astro-cms,
|
|
16
|
+
* local dev) — the surface knows "the host has no opinion" and
|
|
17
|
+
* hides the issue badge.
|
|
18
|
+
* - The bridge resolves to `null` (asset healthy, unknown to the
|
|
19
|
+
* host, or pre-bootstrap state).
|
|
20
|
+
*
|
|
21
|
+
* The badge is only rendered when this returns a real issue. Loading
|
|
22
|
+
* state is treated as `null` for the caller's purposes — a flashing
|
|
23
|
+
* badge on first paint reads worse than no badge, and issue state is
|
|
24
|
+
* metadata, not primary content.
|
|
25
|
+
*
|
|
26
|
+
* Mirrors the `useAssetScope` discipline: cms-spa stays a thin
|
|
27
|
+
* consumer of `getUIConfig().mediaBridge`; a host app's bridge
|
|
28
|
+
* typically wraps its own lookup in a cached query so the cache is
|
|
29
|
+
* hit one level deeper.
|
|
30
|
+
*/
|
|
31
|
+
export function useMediaIssue(filename, folder) {
|
|
32
|
+
const query = useQuery({
|
|
33
|
+
// Folder is part of the key so a block on one folder's asset never shows
|
|
34
|
+
// on a same-named asset elsewhere; the `['media-issue']` prefix
|
|
35
|
+
// invalidation still catches every entry.
|
|
36
|
+
queryKey: [...MEDIA_ISSUE_QUERY_KEY_PREFIX, filename ?? '', folder ?? ''],
|
|
37
|
+
queryFn: async () => {
|
|
38
|
+
const bridge = getUIConfig().mediaBridge;
|
|
39
|
+
if (!bridge || !filename)
|
|
40
|
+
return null;
|
|
41
|
+
return bridge.getMediaIssue({ filename, folder });
|
|
42
|
+
},
|
|
43
|
+
// Per-filename issues are stable for the lifetime of a branch
|
|
44
|
+
// session — only a change on the host's side moves them, and the
|
|
45
|
+
// host invalidates the prefix when it does. 5 minutes matches the
|
|
46
|
+
// cms-spa default staleTime, same as `useAssetScope`.
|
|
47
|
+
staleTime: 1000 * 60 * 5,
|
|
48
|
+
enabled: Boolean(filename),
|
|
49
|
+
});
|
|
50
|
+
return query.data ?? null;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=use-media-issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-media-issue.js","sourceRoot":"","sources":["../../../src/media/use-media-issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;;;;GAKG;AACH,MAAM,4BAA4B,GAAG,CAAC,aAAa,CAAU,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,aAAa,CAAC,QAA4B,EAAE,MAAe;IACzE,MAAM,KAAK,GAAG,QAAQ,CAAoB;QACxC,yEAAyE;QACzE,gEAAgE;QAChE,0CAA0C;QAC1C,QAAQ,EAAE,CAAC,GAAG,4BAA4B,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,EAAE,CAAC;QACzE,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC,WAAW,CAAC;YACzC,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ;gBAAE,OAAO,IAAI,CAAC;YACtC,OAAO,MAAM,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,8DAA8D;QAC9D,iEAAiE;QACjE,kEAAkE;QAClE,sDAAsD;QACtD,SAAS,EAAE,IAAI,GAAG,EAAE,GAAG,CAAC;QACxB,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;KAC3B,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Config, Data } from '@puckeditor/core';
|
|
2
|
+
/**
|
|
3
|
+
* Layer each block's `defaultProps` under the sparse props Puck stored, so a
|
|
4
|
+
* page reads the same in the editor and on the published page. Puck saves only
|
|
5
|
+
* the props an author changed and its published render applies no defaults;
|
|
6
|
+
* without this, a field added to a block after a page was saved renders
|
|
7
|
+
* undefined, and a select or radio field shows its first option instead of
|
|
8
|
+
* the real default.
|
|
9
|
+
*
|
|
10
|
+
* Blocks inside a slot are merged too, top-down, and a slot the page never
|
|
11
|
+
* stored is seeded from its block's defaults, so a block whose default slot
|
|
12
|
+
* holds child blocks shows them before the page is first saved. A slot child
|
|
13
|
+
* without an id gets one made from its parent's id, the slot name and its
|
|
14
|
+
* position: stable, so every read of the same page agrees, and free of ':',
|
|
15
|
+
* which Puck splits zone keys on.
|
|
16
|
+
*
|
|
17
|
+
* Like Puck's own slot defaults, only a block's top-level slot fields are
|
|
18
|
+
* walked. The merge is shallow, so a field added inside an array item type
|
|
19
|
+
* (e.g. `linkTarget` on a card list) is not backfilled into saved items —
|
|
20
|
+
* renders must handle `undefined` for any array item field older content lacks.
|
|
21
|
+
*/
|
|
22
|
+
export declare function mergeDefaultProps(data: Data, config: Config): Data;
|
|
23
|
+
//# sourceMappingURL=merge-default-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-default-props.d.ts","sourceRoot":"","sources":["../../src/merge-default-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA0C,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAmClE"}
|