@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
package/dist/page-schemas.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Identity helper that gives `pageSchemas` entries a typed shape.
|
|
4
|
-
*
|
|
5
|
-
* Mirrors Astro's `defineConfig` — purely for editor inference.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* export const pageSchemas = {
|
|
10
|
-
* 'type:mdx': definePageSchema({
|
|
11
|
-
* label: 'MDX page',
|
|
12
|
-
* schema: mdxPageSchema,
|
|
13
|
-
* ui: { title: { control: 'text', group: 'basics', required: true } },
|
|
14
|
-
* groups: [{ id: 'basics', label: 'Basics' }],
|
|
15
|
-
* coreFields: { mode: 'minimal' },
|
|
16
|
-
* }),
|
|
17
|
-
* };
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export function definePageSchema(descriptor) {
|
|
21
|
-
if (descriptor.coreFields?.mode === 'none' && !('title' in descriptor.schema.shape)) {
|
|
22
|
-
throw new Error("definePageSchema: coreFields.mode 'none' requires the schema to declare a `title` field " +
|
|
23
|
-
'(ContentMeta.title is required by the content-api).');
|
|
24
|
-
}
|
|
25
|
-
return descriptor;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Normalize an entry to a descriptor. Bare Zod objects (legacy) get wrapped
|
|
29
|
-
* with default `coreFields.mode: 'full'` so the dialog can render today's
|
|
30
|
-
* three-section layout unchanged.
|
|
31
|
-
*/
|
|
32
|
-
export function toPageSchemaDescriptor(entry) {
|
|
33
|
-
if (isPageSchemaDescriptor(entry))
|
|
34
|
-
return entry;
|
|
35
|
-
return { schema: entry, coreFields: { mode: 'full' } };
|
|
36
|
-
}
|
|
37
|
-
function isPageSchemaDescriptor(value) {
|
|
38
|
-
return typeof value === 'object' && value !== null && 'schema' in value && !('shape' in value);
|
|
39
|
-
}
|
|
40
|
-
const getSharedState = () => {
|
|
41
|
-
if (typeof window !== 'undefined') {
|
|
42
|
-
if (!window.__PAGE_SCHEMAS_STATE__) {
|
|
43
|
-
window.__PAGE_SCHEMAS_STATE__ = {
|
|
44
|
-
schemas: {},
|
|
45
|
-
subscribers: new Set(),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return window.__PAGE_SCHEMAS_STATE__;
|
|
49
|
-
}
|
|
50
|
-
// SSR fallback
|
|
51
|
-
return { schemas: {}, subscribers: new Set() };
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Set the page schemas for all match keys.
|
|
55
|
-
* Called by the virtual module that loads user's schema definitions.
|
|
56
|
-
* Notifies all subscribers of the change (enables HMR).
|
|
57
|
-
*/
|
|
58
|
-
export function setPageSchemas(schemas) {
|
|
59
|
-
const state = getSharedState();
|
|
60
|
-
state.schemas = schemas;
|
|
61
|
-
for (const fn of state.subscribers) {
|
|
62
|
-
fn(schemas);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Get the current page schemas synchronously.
|
|
67
|
-
*/
|
|
68
|
-
export function getPageSchemas() {
|
|
69
|
-
return getSharedState().schemas;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* React hook to subscribe to page schema changes.
|
|
73
|
-
* Returns the current schemas and updates when they change (HMR support).
|
|
74
|
-
*/
|
|
75
|
-
export function usePageSchemas() {
|
|
76
|
-
const [schemas, setSchemas] = useState(() => getSharedState().schemas);
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
const state = getSharedState();
|
|
79
|
-
// Update immediately in case schemas changed between render and effect
|
|
80
|
-
if (state.schemas !== schemas) {
|
|
81
|
-
setSchemas(state.schemas);
|
|
82
|
-
}
|
|
83
|
-
state.subscribers.add(setSchemas);
|
|
84
|
-
return () => {
|
|
85
|
-
state.subscribers.delete(setSchemas);
|
|
86
|
-
};
|
|
87
|
-
}, [schemas]);
|
|
88
|
-
return schemas;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Resolve the best-matching descriptor for a page.
|
|
92
|
-
*
|
|
93
|
-
* Resolution order: `collection:<name>` > `type:<puck|mdx>` >
|
|
94
|
-
* pathname-prefix (longest match wins). Returns `null` if no key matches.
|
|
95
|
-
*/
|
|
96
|
-
export function resolvePageSchemaEntry(schemas, context) {
|
|
97
|
-
if (context.collection) {
|
|
98
|
-
const key = `collection:${context.collection}`;
|
|
99
|
-
if (key in schemas)
|
|
100
|
-
return { key, descriptor: toPageSchemaDescriptor(schemas[key]) };
|
|
101
|
-
}
|
|
102
|
-
if (context.type) {
|
|
103
|
-
const key = `type:${context.type}`;
|
|
104
|
-
if (key in schemas)
|
|
105
|
-
return { key, descriptor: toPageSchemaDescriptor(schemas[key]) };
|
|
106
|
-
}
|
|
107
|
-
let bestPrefix = null;
|
|
108
|
-
for (const key of Object.keys(schemas)) {
|
|
109
|
-
if (!key.startsWith('/'))
|
|
110
|
-
continue;
|
|
111
|
-
if (context.pathname.startsWith(key) && (!bestPrefix || key.length > bestPrefix.length)) {
|
|
112
|
-
bestPrefix = key;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
if (bestPrefix)
|
|
116
|
-
return { key: bestPrefix, descriptor: toPageSchemaDescriptor(schemas[bestPrefix]) };
|
|
117
|
-
return null;
|
|
118
|
-
}
|
package/dist/page-schemas.mjs
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
//#region src/page-schemas.ts
|
|
3
|
-
/**
|
|
4
|
-
* Identity helper that gives `pageSchemas` entries a typed shape.
|
|
5
|
-
*
|
|
6
|
-
* Mirrors Astro's `defineConfig` — purely for editor inference.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* export const pageSchemas = {
|
|
11
|
-
* 'type:mdx': definePageSchema({
|
|
12
|
-
* label: 'MDX page',
|
|
13
|
-
* schema: mdxPageSchema,
|
|
14
|
-
* ui: { title: { control: 'text', group: 'basics', required: true } },
|
|
15
|
-
* groups: [{ id: 'basics', label: 'Basics' }],
|
|
16
|
-
* coreFields: { mode: 'minimal' },
|
|
17
|
-
* }),
|
|
18
|
-
* };
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
function definePageSchema(descriptor) {
|
|
22
|
-
if (descriptor.coreFields?.mode === "none" && !("title" in descriptor.schema.shape)) throw new Error("definePageSchema: coreFields.mode 'none' requires the schema to declare a `title` field (ContentMeta.title is required by the content-api).");
|
|
23
|
-
return descriptor;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Normalize an entry to a descriptor. Bare Zod objects (legacy) get wrapped
|
|
27
|
-
* with default `coreFields.mode: 'full'` so the dialog can render today's
|
|
28
|
-
* three-section layout unchanged.
|
|
29
|
-
*/
|
|
30
|
-
function toPageSchemaDescriptor(entry) {
|
|
31
|
-
if (isPageSchemaDescriptor(entry)) return entry;
|
|
32
|
-
return {
|
|
33
|
-
schema: entry,
|
|
34
|
-
coreFields: { mode: "full" }
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function isPageSchemaDescriptor(value) {
|
|
38
|
-
return typeof value === "object" && value !== null && "schema" in value && !("shape" in value);
|
|
39
|
-
}
|
|
40
|
-
const getSharedState = () => {
|
|
41
|
-
if (typeof window !== "undefined") {
|
|
42
|
-
if (!window.__PAGE_SCHEMAS_STATE__) window.__PAGE_SCHEMAS_STATE__ = {
|
|
43
|
-
schemas: {},
|
|
44
|
-
subscribers: /* @__PURE__ */ new Set()
|
|
45
|
-
};
|
|
46
|
-
return window.__PAGE_SCHEMAS_STATE__;
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
schemas: {},
|
|
50
|
-
subscribers: /* @__PURE__ */ new Set()
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Set the page schemas for all match keys.
|
|
55
|
-
* Called by the virtual module that loads user's schema definitions.
|
|
56
|
-
* Notifies all subscribers of the change (enables HMR).
|
|
57
|
-
*/
|
|
58
|
-
function setPageSchemas(schemas) {
|
|
59
|
-
const state = getSharedState();
|
|
60
|
-
state.schemas = schemas;
|
|
61
|
-
for (const fn of state.subscribers) fn(schemas);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get the current page schemas synchronously.
|
|
65
|
-
*/
|
|
66
|
-
function getPageSchemas() {
|
|
67
|
-
return getSharedState().schemas;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* React hook to subscribe to page schema changes.
|
|
71
|
-
* Returns the current schemas and updates when they change (HMR support).
|
|
72
|
-
*/
|
|
73
|
-
function usePageSchemas() {
|
|
74
|
-
const [schemas, setSchemas] = useState(() => getSharedState().schemas);
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
const state = getSharedState();
|
|
77
|
-
if (state.schemas !== schemas) setSchemas(state.schemas);
|
|
78
|
-
state.subscribers.add(setSchemas);
|
|
79
|
-
return () => {
|
|
80
|
-
state.subscribers.delete(setSchemas);
|
|
81
|
-
};
|
|
82
|
-
}, [schemas]);
|
|
83
|
-
return schemas;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Resolve the best-matching descriptor for a page.
|
|
87
|
-
*
|
|
88
|
-
* Resolution order: `collection:<name>` > `type:<puck|mdx>` >
|
|
89
|
-
* pathname-prefix (longest match wins). Returns `null` if no key matches.
|
|
90
|
-
*/
|
|
91
|
-
function resolvePageSchemaEntry(schemas, context) {
|
|
92
|
-
if (context.collection) {
|
|
93
|
-
const key = `collection:${context.collection}`;
|
|
94
|
-
if (key in schemas) return {
|
|
95
|
-
key,
|
|
96
|
-
descriptor: toPageSchemaDescriptor(schemas[key])
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
if (context.type) {
|
|
100
|
-
const key = `type:${context.type}`;
|
|
101
|
-
if (key in schemas) return {
|
|
102
|
-
key,
|
|
103
|
-
descriptor: toPageSchemaDescriptor(schemas[key])
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
let bestPrefix = null;
|
|
107
|
-
for (const key of Object.keys(schemas)) {
|
|
108
|
-
if (!key.startsWith("/")) continue;
|
|
109
|
-
if (context.pathname.startsWith(key) && (!bestPrefix || key.length > bestPrefix.length)) bestPrefix = key;
|
|
110
|
-
}
|
|
111
|
-
if (bestPrefix) return {
|
|
112
|
-
key: bestPrefix,
|
|
113
|
-
descriptor: toPageSchemaDescriptor(schemas[bestPrefix])
|
|
114
|
-
};
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
//#endregion
|
|
118
|
-
export { definePageSchema, getPageSchemas, resolvePageSchemaEntry, setPageSchemas, toPageSchemaDescriptor, usePageSchemas };
|
|
119
|
-
|
|
120
|
-
//# sourceMappingURL=page-schemas.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-schemas.mjs","names":[],"sources":["../src/page-schemas.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport type { z } from 'zod';\n\n/**\n * Form-UI hint vocabulary for page metadata fields.\n *\n * Hosts attach a hint to each field they want surfaced in the page-settings\n * dialog. The hint drives form rendering — control type, grouping, helper\n * text, etc. — independently of the Zod schema, which still owns validation.\n *\n * Dotted keys ('sidebar.label') are supported in the hint record; on save\n * they materialize into nested objects in YAML frontmatter, and on load\n * they flatten back to dotted keys for the form.\n */\nexport type FieldHintCommon = {\n label?: string;\n help?: string;\n /** Refs a `groups[].id` to bucket fields into sections in the dialog. */\n group?: string;\n required?: boolean;\n hidden?: boolean | ((doc: Record<string, unknown>) => boolean);\n defaultValue?: unknown;\n};\n\nexport type FieldHintVariant = {\n id: string;\n label: string;\n /** Concrete value written when this variant is selected (for literal variants). */\n value?: unknown;\n} & Partial<FieldHint>;\n\nexport type FieldHint = FieldHintCommon &\n (\n | {\n control: 'text' | 'textarea' | 'url' | 'email' | 'number' | 'switch' | 'date' | 'image' | 'markdown' | 'code';\n }\n | { control: 'select'; options: ReadonlyArray<{ value: string; label: string }> }\n | { control: 'chips' }\n | { control: 'object'; fields: Record<string, FieldHint> }\n | { control: 'array'; of: FieldHint }\n | { control: 'variant'; variants: ReadonlyArray<FieldHintVariant> }\n );\n\nexport type FieldHints = Record<string, FieldHint>;\n\nexport type PageSchemaGroup = {\n id: string;\n label: string;\n description?: string;\n};\n\n/**\n * Which conloca-managed sections to render alongside the host schema.\n *\n * - `'full'` (default): show today's `pageInfoSchema` (title/pathname) +\n * host fields + `seoPublishingSchema` (description/robots/canonical/\n * publishAt/unpublishAt). Backwards-compatible with existing dialogs.\n * - `'minimal'`: show pathname only + host fields + publishAt/unpublishAt.\n * Use when the host owns title/description in its own schema.\n * - `'none'`: host fields only. Host must declare `title` in its schema\n * (validated at registration; ContentMeta.title is required at the\n * content-api level).\n */\nexport type CoreFieldsMode = 'full' | 'minimal' | 'none';\n\nexport interface PageSchemaDescriptor {\n /** Human-readable label shown in the dialog header. */\n label?: string;\n /** Zod schema used for validation and field-shape introspection. */\n schema: z.ZodObject<z.ZodRawShape>;\n /** Form-UI hints keyed by field name (dotted keys allowed for nested fields). */\n ui?: FieldHints;\n /** Section definitions; `FieldHint.group` references `id`. */\n groups?: ReadonlyArray<PageSchemaGroup>;\n /** Which conloca core fields to render alongside the host schema. */\n coreFields?: { mode: CoreFieldsMode };\n}\n\n/**\n * Identity helper that gives `pageSchemas` entries a typed shape.\n *\n * Mirrors Astro's `defineConfig` — purely for editor inference.\n *\n * @example\n * ```ts\n * export const pageSchemas = {\n * 'type:mdx': definePageSchema({\n * label: 'MDX page',\n * schema: mdxPageSchema,\n * ui: { title: { control: 'text', group: 'basics', required: true } },\n * groups: [{ id: 'basics', label: 'Basics' }],\n * coreFields: { mode: 'minimal' },\n * }),\n * };\n * ```\n */\nexport function definePageSchema(descriptor: PageSchemaDescriptor): PageSchemaDescriptor {\n if (descriptor.coreFields?.mode === 'none' && !('title' in descriptor.schema.shape)) {\n throw new Error(\n \"definePageSchema: coreFields.mode 'none' requires the schema to declare a `title` field \" +\n '(ContentMeta.title is required by the content-api).',\n );\n }\n return descriptor;\n}\n\n/**\n * Registry entry value: either a bare Zod object (legacy — wrapped as a\n * descriptor with `coreFields.mode: 'full'`) or an explicit descriptor.\n */\nexport type PageSchemaEntry = z.ZodObject<z.ZodRawShape> | PageSchemaDescriptor;\n\n/**\n * Page-schema registry keyed by match expression.\n *\n * Match key forms (resolved in order):\n * - `collection:<name>` — matches when the loaded entry's collection equals `<name>`.\n * - `type:<puck|mdx>` — matches all pages of the given content type.\n * - pathname prefix (must start with `/`) — longest-prefix-match against the page's pathname.\n */\nexport type PageSchemas = Record<string, PageSchemaEntry>;\n\n/**\n * Normalize an entry to a descriptor. Bare Zod objects (legacy) get wrapped\n * with default `coreFields.mode: 'full'` so the dialog can render today's\n * three-section layout unchanged.\n */\nexport function toPageSchemaDescriptor(entry: PageSchemaEntry): PageSchemaDescriptor {\n if (isPageSchemaDescriptor(entry)) return entry;\n return { schema: entry, coreFields: { mode: 'full' } };\n}\n\nfunction isPageSchemaDescriptor(value: PageSchemaEntry): value is PageSchemaDescriptor {\n return typeof value === 'object' && value !== null && 'schema' in value && !('shape' in value);\n}\n\n/**\n * Shared state for page schemas across module instances.\n * Uses window to ensure virtual modules and bundled code share the same state.\n */\n\ninterface SharedPageSchemaState {\n schemas: PageSchemas;\n subscribers: Set<(schemas: PageSchemas) => void>;\n}\n\nconst getSharedState = (): SharedPageSchemaState => {\n if (typeof window !== 'undefined') {\n if (!(window as any).__PAGE_SCHEMAS_STATE__) {\n (window as any).__PAGE_SCHEMAS_STATE__ = {\n schemas: {},\n subscribers: new Set(),\n };\n }\n return (window as any).__PAGE_SCHEMAS_STATE__;\n }\n // SSR fallback\n return { schemas: {}, subscribers: new Set() };\n};\n\n/**\n * Set the page schemas for all match keys.\n * Called by the virtual module that loads user's schema definitions.\n * Notifies all subscribers of the change (enables HMR).\n */\nexport function setPageSchemas(schemas: PageSchemas): void {\n const state = getSharedState();\n state.schemas = schemas;\n for (const fn of state.subscribers) {\n fn(schemas);\n }\n}\n\n/**\n * Get the current page schemas synchronously.\n */\nexport function getPageSchemas(): PageSchemas {\n return getSharedState().schemas;\n}\n\n/**\n * React hook to subscribe to page schema changes.\n * Returns the current schemas and updates when they change (HMR support).\n */\nexport function usePageSchemas(): PageSchemas {\n const [schemas, setSchemas] = useState(() => getSharedState().schemas);\n\n useEffect(() => {\n const state = getSharedState();\n\n // Update immediately in case schemas changed between render and effect\n if (state.schemas !== schemas) {\n setSchemas(state.schemas);\n }\n\n state.subscribers.add(setSchemas);\n return () => {\n state.subscribers.delete(setSchemas);\n };\n }, [schemas]);\n\n return schemas;\n}\n\n/**\n * Context the resolver needs to pick the right schema.\n *\n * - `collection` and `type` come from the loaded entry's `ContentIdentity`.\n * - `pathname` comes from the page's `LocaleVersion`.\n */\nexport interface ResolveSchemaContext {\n pathname: string;\n collection?: string;\n type?: 'puck' | 'mdx';\n}\n\n/**\n * Resolve the best-matching descriptor for a page.\n *\n * Resolution order: `collection:<name>` > `type:<puck|mdx>` >\n * pathname-prefix (longest match wins). Returns `null` if no key matches.\n */\nexport function resolvePageSchemaEntry(\n schemas: PageSchemas,\n context: ResolveSchemaContext,\n): { key: string; descriptor: PageSchemaDescriptor } | null {\n if (context.collection) {\n const key = `collection:${context.collection}`;\n if (key in schemas) return { key, descriptor: toPageSchemaDescriptor(schemas[key]) };\n }\n\n if (context.type) {\n const key = `type:${context.type}`;\n if (key in schemas) return { key, descriptor: toPageSchemaDescriptor(schemas[key]) };\n }\n\n let bestPrefix: string | null = null;\n for (const key of Object.keys(schemas)) {\n if (!key.startsWith('/')) continue;\n if (context.pathname.startsWith(key) && (!bestPrefix || key.length > bestPrefix.length)) {\n bestPrefix = key;\n }\n }\n if (bestPrefix) return { key: bestPrefix, descriptor: toPageSchemaDescriptor(schemas[bestPrefix]) };\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgGA,SAAgB,iBAAiB,YAAwD;CACvF,IAAI,WAAW,YAAY,SAAS,UAAU,EAAE,WAAW,WAAW,OAAO,QAC3E,MAAM,IAAI,MACR,6IAEF;CAEF,OAAO;AACT;;;;;;AAuBA,SAAgB,uBAAuB,OAA8C;CACnF,IAAI,uBAAuB,KAAK,GAAG,OAAO;CAC1C,OAAO;EAAE,QAAQ;EAAO,YAAY,EAAE,MAAM,OAAO;CAAE;AACvD;AAEA,SAAS,uBAAuB,OAAuD;CACrF,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,YAAY,SAAS,EAAE,WAAW;AAC1F;AAYA,MAAM,uBAA8C;CAClD,IAAI,OAAO,WAAW,aAAa;EACjC,IAAI,CAAE,OAAe,wBACnB,OAAgB,yBAAyB;GACvC,SAAS,CAAC;GACV,6BAAa,IAAI,IAAI;EACvB;EAEF,OAAQ,OAAe;CACzB;CAEA,OAAO;EAAE,SAAS,CAAC;EAAG,6BAAa,IAAI,IAAI;CAAE;AAC/C;;;;;;AAOA,SAAgB,eAAe,SAA4B;CACzD,MAAM,QAAQ,eAAe;CAC7B,MAAM,UAAU;CAChB,KAAK,MAAM,MAAM,MAAM,aACrB,GAAG,OAAO;AAEd;;;;AAKA,SAAgB,iBAA8B;CAC5C,OAAO,eAAe,CAAC,CAAC;AAC1B;;;;;AAMA,SAAgB,iBAA8B;CAC5C,MAAM,CAAC,SAAS,cAAc,eAAe,eAAe,CAAC,CAAC,OAAO;CAErE,gBAAgB;EACd,MAAM,QAAQ,eAAe;EAG7B,IAAI,MAAM,YAAY,SACpB,WAAW,MAAM,OAAO;EAG1B,MAAM,YAAY,IAAI,UAAU;EAChC,aAAa;GACX,MAAM,YAAY,OAAO,UAAU;EACrC;CACF,GAAG,CAAC,OAAO,CAAC;CAEZ,OAAO;AACT;;;;;;;AAoBA,SAAgB,uBACd,SACA,SAC0D;CAC1D,IAAI,QAAQ,YAAY;EACtB,MAAM,MAAM,cAAc,QAAQ;EAClC,IAAI,OAAO,SAAS,OAAO;GAAE;GAAK,YAAY,uBAAuB,QAAQ,IAAI;EAAE;CACrF;CAEA,IAAI,QAAQ,MAAM;EAChB,MAAM,MAAM,QAAQ,QAAQ;EAC5B,IAAI,OAAO,SAAS,OAAO;GAAE;GAAK,YAAY,uBAAuB,QAAQ,IAAI;EAAE;CACrF;CAEA,IAAI,aAA4B;CAChC,KAAK,MAAM,OAAO,OAAO,KAAK,OAAO,GAAG;EACtC,IAAI,CAAC,IAAI,WAAW,GAAG,GAAG;EAC1B,IAAI,QAAQ,SAAS,WAAW,GAAG,MAAM,CAAC,cAAc,IAAI,SAAS,WAAW,SAC9E,aAAa;CAEjB;CACA,IAAI,YAAY,OAAO;EAAE,KAAK;EAAY,YAAY,uBAAuB,QAAQ,WAAW;CAAE;CAElG,OAAO;AACT"}
|
package/dist/puck-config.d.mts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Config } from "@puckeditor/core";
|
|
2
|
-
//#region src/puck-config.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Shared state for Puck config across module instances.
|
|
5
|
-
* Uses window to ensure virtual modules and bundled code share the same state.
|
|
6
|
-
*/
|
|
7
|
-
type PuckConfig = Config;
|
|
8
|
-
interface SharedPuckState {
|
|
9
|
-
config: PuckConfig;
|
|
10
|
-
subscribers: Set<(config: PuckConfig) => void>;
|
|
11
|
-
}
|
|
12
|
-
declare global {
|
|
13
|
-
interface Window {
|
|
14
|
-
__PUCK_STATE__?: SharedPuckState;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Set the Puck config. Called by the virtual module that loads user's config.
|
|
19
|
-
* Notifies all subscribers of the change (enables HMR).
|
|
20
|
-
*/
|
|
21
|
-
declare function setPuckConfig(config: PuckConfig): void;
|
|
22
|
-
/**
|
|
23
|
-
* Get the current Puck config synchronously.
|
|
24
|
-
*/
|
|
25
|
-
declare function getPuckConfig(): PuckConfig;
|
|
26
|
-
/**
|
|
27
|
-
* React hook to subscribe to Puck config changes.
|
|
28
|
-
* Returns the current config and updates when it changes (HMR support).
|
|
29
|
-
*/
|
|
30
|
-
declare function usePuckConfig(): PuckConfig;
|
|
31
|
-
//#endregion
|
|
32
|
-
export { getPuckConfig, setPuckConfig, usePuckConfig };
|
|
33
|
-
//# sourceMappingURL=puck-config.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"puck-config.d.mts","names":[],"sources":["../src/puck-config.ts"],"mappings":";;;;;;KAQK,aAAa;UAER;EACR,QAAQ;EACR,aAAa,KAAK,QAAQ;;QAGpB;YACI;IACR,iBAAiB;;;;;;;iBAsBL,cAAc,QAAQ;;;;iBAWtB,iBAAiB;;;;;iBAQjB,iBAAiB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"puck-config.d.ts","sourceRoot":"","sources":["../src/puck-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;GAGG;AAEH,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,UAAU,eAAe;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC,CAAC;CAChD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,cAAc,CAAC,EAAE,eAAe,CAAC;KAClC;CACF;AAgBD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAMtD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAkB1C"}
|
package/dist/puck-config.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
const getSharedState = () => {
|
|
3
|
-
if (typeof window !== 'undefined') {
|
|
4
|
-
if (!window.__PUCK_STATE__) {
|
|
5
|
-
window.__PUCK_STATE__ = {
|
|
6
|
-
config: { components: {} },
|
|
7
|
-
subscribers: new Set(),
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
return window.__PUCK_STATE__;
|
|
11
|
-
}
|
|
12
|
-
// SSR fallback
|
|
13
|
-
return { config: { components: {} }, subscribers: new Set() };
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Set the Puck config. Called by the virtual module that loads user's config.
|
|
17
|
-
* Notifies all subscribers of the change (enables HMR).
|
|
18
|
-
*/
|
|
19
|
-
export function setPuckConfig(config) {
|
|
20
|
-
const state = getSharedState();
|
|
21
|
-
state.config = config;
|
|
22
|
-
for (const fn of state.subscribers) {
|
|
23
|
-
fn(config);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Get the current Puck config synchronously.
|
|
28
|
-
*/
|
|
29
|
-
export function getPuckConfig() {
|
|
30
|
-
return getSharedState().config;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* React hook to subscribe to Puck config changes.
|
|
34
|
-
* Returns the current config and updates when it changes (HMR support).
|
|
35
|
-
*/
|
|
36
|
-
export function usePuckConfig() {
|
|
37
|
-
const [config, setConfig] = useState(() => getSharedState().config);
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
const state = getSharedState();
|
|
40
|
-
// Update immediately in case config changed between render and effect
|
|
41
|
-
if (state.config !== config) {
|
|
42
|
-
setConfig(state.config);
|
|
43
|
-
}
|
|
44
|
-
state.subscribers.add(setConfig);
|
|
45
|
-
return () => {
|
|
46
|
-
state.subscribers.delete(setConfig);
|
|
47
|
-
};
|
|
48
|
-
}, [config]);
|
|
49
|
-
return config;
|
|
50
|
-
}
|
package/dist/puck-config.mjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
//#region src/puck-config.ts
|
|
3
|
-
const getSharedState = () => {
|
|
4
|
-
if (typeof window !== "undefined") {
|
|
5
|
-
if (!window.__PUCK_STATE__) window.__PUCK_STATE__ = {
|
|
6
|
-
config: { components: {} },
|
|
7
|
-
subscribers: /* @__PURE__ */ new Set()
|
|
8
|
-
};
|
|
9
|
-
return window.__PUCK_STATE__;
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
config: { components: {} },
|
|
13
|
-
subscribers: /* @__PURE__ */ new Set()
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Set the Puck config. Called by the virtual module that loads user's config.
|
|
18
|
-
* Notifies all subscribers of the change (enables HMR).
|
|
19
|
-
*/
|
|
20
|
-
function setPuckConfig(config) {
|
|
21
|
-
const state = getSharedState();
|
|
22
|
-
state.config = config;
|
|
23
|
-
for (const fn of state.subscribers) fn(config);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Get the current Puck config synchronously.
|
|
27
|
-
*/
|
|
28
|
-
function getPuckConfig() {
|
|
29
|
-
return getSharedState().config;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* React hook to subscribe to Puck config changes.
|
|
33
|
-
* Returns the current config and updates when it changes (HMR support).
|
|
34
|
-
*/
|
|
35
|
-
function usePuckConfig() {
|
|
36
|
-
const [config, setConfig] = useState(() => getSharedState().config);
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
const state = getSharedState();
|
|
39
|
-
if (state.config !== config) setConfig(state.config);
|
|
40
|
-
state.subscribers.add(setConfig);
|
|
41
|
-
return () => {
|
|
42
|
-
state.subscribers.delete(setConfig);
|
|
43
|
-
};
|
|
44
|
-
}, [config]);
|
|
45
|
-
return config;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { getPuckConfig, setPuckConfig, usePuckConfig };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=puck-config.mjs.map
|
package/dist/puck-config.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"puck-config.mjs","names":[],"sources":["../src/puck-config.ts"],"sourcesContent":["import type { Config } from '@puckeditor/core';\nimport { useEffect, useState } from 'react';\n\n/**\n * Shared state for Puck config across module instances.\n * Uses window to ensure virtual modules and bundled code share the same state.\n */\n\ntype PuckConfig = Config;\n\ninterface SharedPuckState {\n config: PuckConfig;\n subscribers: Set<(config: PuckConfig) => void>;\n}\n\ndeclare global {\n interface Window {\n __PUCK_STATE__?: SharedPuckState;\n }\n}\n\nconst getSharedState = (): SharedPuckState => {\n if (typeof window !== 'undefined') {\n if (!window.__PUCK_STATE__) {\n window.__PUCK_STATE__ = {\n config: { components: {} },\n subscribers: new Set(),\n };\n }\n return window.__PUCK_STATE__;\n }\n // SSR fallback\n return { config: { components: {} }, subscribers: new Set() };\n};\n\n/**\n * Set the Puck config. Called by the virtual module that loads user's config.\n * Notifies all subscribers of the change (enables HMR).\n */\nexport function setPuckConfig(config: PuckConfig): void {\n const state = getSharedState();\n state.config = config;\n for (const fn of state.subscribers) {\n fn(config);\n }\n}\n\n/**\n * Get the current Puck config synchronously.\n */\nexport function getPuckConfig(): PuckConfig {\n return getSharedState().config;\n}\n\n/**\n * React hook to subscribe to Puck config changes.\n * Returns the current config and updates when it changes (HMR support).\n */\nexport function usePuckConfig(): PuckConfig {\n const [config, setConfig] = useState(() => getSharedState().config);\n\n useEffect(() => {\n const state = getSharedState();\n\n // Update immediately in case config changed between render and effect\n if (state.config !== config) {\n setConfig(state.config);\n }\n\n state.subscribers.add(setConfig);\n return () => {\n state.subscribers.delete(setConfig);\n };\n }, [config]);\n\n return config;\n}\n"],"mappings":";;AAqBA,MAAM,uBAAwC;CAC5C,IAAI,OAAO,WAAW,aAAa;EACjC,IAAI,CAAC,OAAO,gBACV,OAAO,iBAAiB;GACtB,QAAQ,EAAE,YAAY,CAAC,EAAE;GACzB,6BAAa,IAAI,IAAI;EACvB;EAEF,OAAO,OAAO;CAChB;CAEA,OAAO;EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE;EAAG,6BAAa,IAAI,IAAI;CAAE;AAC9D;;;;;AAMA,SAAgB,cAAc,QAA0B;CACtD,MAAM,QAAQ,eAAe;CAC7B,MAAM,SAAS;CACf,KAAK,MAAM,MAAM,MAAM,aACrB,GAAG,MAAM;AAEb;;;;AAKA,SAAgB,gBAA4B;CAC1C,OAAO,eAAe,CAAC,CAAC;AAC1B;;;;;AAMA,SAAgB,gBAA4B;CAC1C,MAAM,CAAC,QAAQ,aAAa,eAAe,eAAe,CAAC,CAAC,MAAM;CAElE,gBAAgB;EACd,MAAM,QAAQ,eAAe;EAG7B,IAAI,MAAM,WAAW,QACnB,UAAU,MAAM,MAAM;EAGxB,MAAM,YAAY,IAAI,SAAS;EAC/B,aAAa;GACX,MAAM,YAAY,OAAO,SAAS;EACpC;CACF,GAAG,CAAC,MAAM,CAAC;CAEX,OAAO;AACT"}
|
package/dist/selected-block.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { MdxJsxComponentDescriptor } from './mdx-components';
|
|
2
|
-
/**
|
|
3
|
-
* Shared registry of the currently-selected MDX JSX block in the editor.
|
|
4
|
-
*
|
|
5
|
-
* The block (`GenericBlock`) is inside the MDXEditor realm and has access
|
|
6
|
-
* to its render-scoped hooks (`useMdastNodeUpdater`, `useLexicalNodeRemove`).
|
|
7
|
-
* The side panel needs to read the block's props AND push changes back
|
|
8
|
-
* through those same hooks, but it lives OUTSIDE the editor's render
|
|
9
|
-
* scope, so it can't call those hooks itself.
|
|
10
|
-
*
|
|
11
|
-
* The bridge: when a block becomes selected, it publishes a small record
|
|
12
|
-
* to this registry — descriptor + current attribute map + bound closures
|
|
13
|
-
* over its own updaters. The panel subscribes, renders the descriptor's
|
|
14
|
-
* `props` as form fields, and calls the closures on change. Updates flow
|
|
15
|
-
* back through the same path inline editing used.
|
|
16
|
-
*
|
|
17
|
-
* Mirrors the `siteStyles` / `mdxComponents` window-state pattern so HMR
|
|
18
|
-
* and SSR work consistently.
|
|
19
|
-
*/
|
|
20
|
-
export interface SelectedBlock {
|
|
21
|
-
/** Stable per-block identity — the owning Lexical node's `getKey()`.
|
|
22
|
-
* Used to compare "am I the selected block?" across re-renders without
|
|
23
|
-
* tripping on closure-identity changes (`useLexicalNodeRemove` returns
|
|
24
|
-
* a fresh function every render, so we can't compare by callback). */
|
|
25
|
-
key: string;
|
|
26
|
-
/** Tag name (eg 'Aside'). Used as the panel heading. */
|
|
27
|
-
name: string;
|
|
28
|
-
/** Descriptor providing the prop schema. */
|
|
29
|
-
descriptor: MdxJsxComponentDescriptor;
|
|
30
|
-
/** Current attribute values from the mdast node. */
|
|
31
|
-
attrs: Record<string, unknown>;
|
|
32
|
-
/** Apply a prop change. Wrapped by the owning block over its updater.
|
|
33
|
-
* Accepts strings (text props), booleans (checkbox props), numbers
|
|
34
|
-
* (numeric inputs), or `null`/`undefined` (remove the attribute).
|
|
35
|
-
* The block routes the value through `writeAttribute` which picks
|
|
36
|
-
* the right mdast shape — string literal, JSX shorthand, or
|
|
37
|
-
* expression. */
|
|
38
|
-
onPropChange: (name: string, value: string | boolean | number | null | undefined) => void;
|
|
39
|
-
/** Remove the block from the document. */
|
|
40
|
-
onRemove: () => void;
|
|
41
|
-
}
|
|
42
|
-
interface SharedState {
|
|
43
|
-
selected: SelectedBlock | null;
|
|
44
|
-
subscribers: Set<(next: SelectedBlock | null) => void>;
|
|
45
|
-
}
|
|
46
|
-
declare global {
|
|
47
|
-
interface Window {
|
|
48
|
-
__CONLOCA_SELECTED_BLOCK__?: SharedState;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/** Replace the currently-selected block. Pass `null` to clear. */
|
|
52
|
-
export declare function setSelectedBlock(next: SelectedBlock | null): void;
|
|
53
|
-
/** Read synchronously. */
|
|
54
|
-
export declare function getSelectedBlock(): SelectedBlock | null;
|
|
55
|
-
/**
|
|
56
|
-
* Subscribe to the current selection in a React component. Returns `null`
|
|
57
|
-
* when nothing is selected.
|
|
58
|
-
*/
|
|
59
|
-
export declare function useSelectedBlock(): SelectedBlock | null;
|
|
60
|
-
export {};
|
|
61
|
-
//# sourceMappingURL=selected-block.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selected-block.d.ts","sourceRoot":"","sources":["../src/selected-block.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,aAAa;IAC5B;;;0EAGsE;IACtE,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,UAAU,EAAE,yBAAyB,CAAC;IACtC,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;;;;qBAKiB;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC1F,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,UAAU,WAAW;IACnB,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC;CACxD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,0BAA0B,CAAC,EAAE,WAAW,CAAC;KAC1C;CACF;AAmCD,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAMjE;AAED,0BAA0B;AAC1B,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,IAAI,CAEvD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,IAAI,CAavD"}
|
package/dist/selected-block.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* When the editor mounts in the parent SPA tree, the block lives
|
|
4
|
-
* in the iframe's window but the side panel reading the selection
|
|
5
|
-
* lives in the parent. To keep one registry shared across both, prefer
|
|
6
|
-
* `window.parent` whenever it's a different same-origin window — the
|
|
7
|
-
* editor-side writes hit the parent's set and the parent-side hook
|
|
8
|
-
* picks them up. Standalone (top-window) usage falls through to the
|
|
9
|
-
* current window unchanged.
|
|
10
|
-
*/
|
|
11
|
-
function getRegistryHost() {
|
|
12
|
-
if (typeof window === 'undefined')
|
|
13
|
-
return undefined;
|
|
14
|
-
try {
|
|
15
|
-
if (window.parent && window.parent !== window) {
|
|
16
|
-
// Cross-origin access throws — gate access with the try/catch
|
|
17
|
-
// and fall back to the local window if the parent isn't ours.
|
|
18
|
-
void window.parent.document;
|
|
19
|
-
return window.parent;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
return window;
|
|
24
|
-
}
|
|
25
|
-
return window;
|
|
26
|
-
}
|
|
27
|
-
function getState() {
|
|
28
|
-
const host = getRegistryHost();
|
|
29
|
-
if (!host)
|
|
30
|
-
return { selected: null, subscribers: new Set() };
|
|
31
|
-
if (!host.__CONLOCA_SELECTED_BLOCK__) {
|
|
32
|
-
host.__CONLOCA_SELECTED_BLOCK__ = { selected: null, subscribers: new Set() };
|
|
33
|
-
}
|
|
34
|
-
return host.__CONLOCA_SELECTED_BLOCK__;
|
|
35
|
-
}
|
|
36
|
-
/** Replace the currently-selected block. Pass `null` to clear. */
|
|
37
|
-
export function setSelectedBlock(next) {
|
|
38
|
-
const state = getState();
|
|
39
|
-
state.selected = next;
|
|
40
|
-
for (const fn of state.subscribers) {
|
|
41
|
-
fn(next);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/** Read synchronously. */
|
|
45
|
-
export function getSelectedBlock() {
|
|
46
|
-
return getState().selected;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Subscribe to the current selection in a React component. Returns `null`
|
|
50
|
-
* when nothing is selected.
|
|
51
|
-
*/
|
|
52
|
-
export function useSelectedBlock() {
|
|
53
|
-
const [selected, setSelected] = useState(() => getState().selected);
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
const state = getState();
|
|
56
|
-
if (state.selected !== selected)
|
|
57
|
-
setSelected(state.selected);
|
|
58
|
-
state.subscribers.add(setSelected);
|
|
59
|
-
return () => {
|
|
60
|
-
state.subscribers.delete(setSelected);
|
|
61
|
-
};
|
|
62
|
-
}, [selected]);
|
|
63
|
-
return selected;
|
|
64
|
-
}
|
package/dist/site-styles.d.mts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
//#region src/site-styles.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Two parallel registries for host-supplied CSS strings: `siteStyles` for the
|
|
4
|
-
* Puck preview iframe (full page styling, Tailwind included), and
|
|
5
|
-
* `editorStyles` for the MDX editor admin shell (narrow component CSS only).
|
|
6
|
-
*
|
|
7
|
-
* Each registry has an astro-cms virtual module (`${cmsRoute}/site-styles.js`
|
|
8
|
-
* and `${cmsRoute}/editor-styles.js`) that imports the configured CSS files
|
|
9
|
-
* with Vite's `?inline` query (so the full CSS pipeline runs) and calls the
|
|
10
|
-
* corresponding setter. Consumers read via the matching hook.
|
|
11
|
-
*
|
|
12
|
-
* The split exists because the two surfaces have opposite cascade
|
|
13
|
-
* requirements:
|
|
14
|
-
* - The iframe shows the host's published page — host CSS should fully win,
|
|
15
|
-
* so `siteStyles` injects everything (Tailwind utilities, `:root` tokens,
|
|
16
|
-
* component CSS) wrapped in `@layer conloca-site` declared after every
|
|
17
|
-
* other top-level layer.
|
|
18
|
-
* - The admin shell shows the editor — admin chrome must keep its own
|
|
19
|
-
* Tailwind utilities (`.bg-white`, `.text-grey-*`, dark variants). Host
|
|
20
|
-
* CSS injected here must NOT include Tailwind utilities or `:root` token
|
|
21
|
-
* overrides; it should be only the host-component selectors
|
|
22
|
-
* (`.conloca-aside`, `.conloca-card`, etc.). `editorStyles` is that
|
|
23
|
-
* narrow path.
|
|
24
|
-
*
|
|
25
|
-
* Uses window to ensure virtual modules and bundled code share the same state.
|
|
26
|
-
*/
|
|
27
|
-
type SiteStyles = readonly string[];
|
|
28
|
-
interface SharedSiteStylesState {
|
|
29
|
-
styles: SiteStyles;
|
|
30
|
-
subscribers: Set<(styles: SiteStyles) => void>;
|
|
31
|
-
}
|
|
32
|
-
declare global {
|
|
33
|
-
interface Window {
|
|
34
|
-
__SITE_STYLES_STATE__?: SharedSiteStylesState;
|
|
35
|
-
__EDITOR_STYLES_STATE__?: SharedSiteStylesState;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Register the site CSS strings. Called by the virtual module on initial
|
|
40
|
-
* load and on HMR when any of the imported CSS files change. Notifies all
|
|
41
|
-
* subscribers so mounted iframe bridges re-inject fresh style tags.
|
|
42
|
-
*/
|
|
43
|
-
declare function setSiteStyles(styles: SiteStyles): void;
|
|
44
|
-
/**
|
|
45
|
-
* Get the current site CSS strings synchronously.
|
|
46
|
-
*/
|
|
47
|
-
declare function getSiteStyles(): SiteStyles;
|
|
48
|
-
/**
|
|
49
|
-
* React hook that returns the current site CSS strings and re-renders the
|
|
50
|
-
* caller when they change (HMR support).
|
|
51
|
-
*/
|
|
52
|
-
declare function useSiteStyles(): SiteStyles;
|
|
53
|
-
declare function setEditorStyles(styles: SiteStyles): void;
|
|
54
|
-
declare function getEditorStyles(): SiteStyles;
|
|
55
|
-
declare function useEditorStyles(): SiteStyles;
|
|
56
|
-
/**
|
|
57
|
-
* Fetch the host's CSS for a route URL from the integration's
|
|
58
|
-
* `/api/styles` endpoint and return it as a single-element array suitable
|
|
59
|
-
* for `useInjectHostStyles`. Empty until the fetch resolves; empty if no
|
|
60
|
-
* URL is given.
|
|
61
|
-
*/
|
|
62
|
-
declare function useFetchedSiteStyles(routeUrl: string | undefined, options?: {
|
|
63
|
-
cmsRoute?: string;
|
|
64
|
-
}): SiteStyles;
|
|
65
|
-
/**
|
|
66
|
-
* Shape returned by the `/api/content-wrapper?url=…` endpoint — the
|
|
67
|
-
* tag name and class list of the host page's content-root element.
|
|
68
|
-
* Kept in lock-step with `ContentWrapperInfo` in
|
|
69
|
-
* `packages/astro-cms/src/site-styles/content-wrapper-endpoint.ts`.
|
|
70
|
-
*/
|
|
71
|
-
interface HostContentWrapper {
|
|
72
|
-
tagName: string;
|
|
73
|
-
className: string;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Discovered host wrappers for a given route. `content` is the
|
|
77
|
-
* prose-content wrapper (eg `.sl-markdown-content`). `codeBlock` is
|
|
78
|
-
* the ordered chain of classed wrappers between the content wrapper
|
|
79
|
-
* and `<pre>`, outermost first (eg `[.expressive-code, .frame ...]`).
|
|
80
|
-
* Either may be null when not present on the page.
|
|
81
|
-
*/
|
|
82
|
-
interface HostWrappers {
|
|
83
|
-
content: HostContentWrapper | null;
|
|
84
|
-
codeBlock: HostContentWrapper[] | null;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Fetches the host page's wrappers for the given route URL. The
|
|
88
|
-
* editor mirrors them: the contenteditable is wrapped in a clone of
|
|
89
|
-
* `content` (via the `hostWrapperPlugin`), and the code-block frame
|
|
90
|
-
* picks up the `codeBlock` classes so the host's code-block CSS
|
|
91
|
-
* reaches via the cascade — no shipped mirror needed.
|
|
92
|
-
*
|
|
93
|
-
* Returns `{ content: null, codeBlock: null }` while the fetch is in
|
|
94
|
-
* flight or when the host route has no discoverable wrappers.
|
|
95
|
-
*
|
|
96
|
-
* Re-fetches whenever `routeUrl` changes (eg locale switch / doc
|
|
97
|
-
* switch). Errors are logged and swallowed; the caller falls back to
|
|
98
|
-
* the no-wrapper render path.
|
|
99
|
-
*/
|
|
100
|
-
declare function useFetchedHostWrappers(routeUrl: string | undefined, options?: {
|
|
101
|
-
cmsRoute?: string;
|
|
102
|
-
}): HostWrappers;
|
|
103
|
-
/**
|
|
104
|
-
* Inject host CSS strings into the current document's `<head>` while the
|
|
105
|
-
* calling component is mounted. Each stylesheet gets wrapped in a named
|
|
106
|
-
* cascade layer so its rules sit at a known position in the cascade.
|
|
107
|
-
*
|
|
108
|
-
* `@import url(...)` statements are hoisted to the top of the injected
|
|
109
|
-
* `<style>` tag because they must come before other rules to be valid.
|
|
110
|
-
* Hosts using Tailwind / Google Fonts depend on this.
|
|
111
|
-
*
|
|
112
|
-
* The chrome / host collision is handled at the class-name level —
|
|
113
|
-
* chrome surfaces that visibly overlap host's Tailwind utilities use
|
|
114
|
-
* the cms-admin semantic palette (`bg-panel`, `text-foreground`,
|
|
115
|
-
* `border-line`, etc.) whose names the host's Tailwind can't generate.
|
|
116
|
-
* Earlier iterations of this hook took a `scopeSelector` and wrapped
|
|
117
|
-
* everything in `@scope (...)`; that approach broke host components
|
|
118
|
-
* relying on ancestor selectors (eg `html.dark .starlight-aside`).
|
|
119
|
-
*/
|
|
120
|
-
declare function useInjectHostStyles(layerName: string, styles: SiteStyles): void;
|
|
121
|
-
//#endregion
|
|
122
|
-
export { HostContentWrapper, HostWrappers, SiteStyles, getEditorStyles, getSiteStyles, setEditorStyles, setSiteStyles, useEditorStyles, useFetchedHostWrappers, useFetchedSiteStyles, useInjectHostStyles, useSiteStyles };
|
|
123
|
-
//# sourceMappingURL=site-styles.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"site-styles.d.mts","names":[],"sources":["../src/site-styles.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KA4BY;UAEF;EACR,QAAQ;EACR,aAAa,KAAK,QAAQ;;QAGpB;YACI;IACR,wBAAwB;IACxB,0BAA0B;;;;;;;;iBAuBd,cAAc,QAAQ;;;;iBAWtB,iBAAiB;;;;;iBAQjB,iBAAiB;iBAoCjB,gBAAgB,QAAQ;iBAQxB,mBAAmB;iBAInB,mBAAmB;;;;;;;iBA8BnB,qBAAqB,8BAA8B;EAAW;IAA2B;;;;;;;UA0CxF;EACf;EACA;;;;;;;;;UAUe;EACf,SAAS;EACT,WAAW;;;;;;;;;;;;;;;;iBAiBG,uBACd,8BACA;EAAW;IACV;;;;;;;;;;;;;;;;;;iBAqDa,oBAAoB,mBAAmB,QAAQ"}
|