@conloca/cms-spa 0.1.15 → 0.2.0
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 +4078 -3571
- 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 +51 -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 +8 -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 +267 -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 +7 -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 +23 -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 +2 -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 +16 -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 +13 -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 +8 -0
- package/dist/ts/main-spa.d.ts.map +1 -0
- package/dist/ts/main-spa.js +58 -0
- package/dist/ts/main-spa.js.map +1 -0
- package/dist/ts/main.d.ts +2 -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 +21 -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/{puck-config.d.mts → ts/puck-config.d.ts} +11 -14
- 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 +141 -0
- package/dist/ts/site-styles.d.ts.map +1 -0
- package/dist/ts/site-styles.js +426 -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 +249 -0
- package/dist/ts/ui-config.d.ts.map +1 -0
- package/dist/ts/ui-config.js +142 -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 +3 -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 +15 -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 +55 -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 +104 -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 +217 -57
- 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 +496 -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 +69 -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 +524 -0
- package/src/theme.ts +102 -0
- package/src/types.ts +63 -0
- package/src/ui-config.ts +334 -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 +128 -0
- package/dist/data-schemas.d.mts +0 -26
- package/dist/data-schemas.d.mts.map +0 -1
- package/dist/data-schemas.mjs +0 -52
- package/dist/data-schemas.mjs.map +0 -1
- package/dist/index.d.mts +0 -125
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -4
- package/dist/main.d.mts +0 -1
- package/dist/main.mjs +0 -5687
- package/dist/main.mjs.map +0 -1
- package/dist/page-schemas.d.mts +0 -26
- package/dist/page-schemas.d.mts.map +0 -1
- package/dist/page-schemas.mjs +0 -52
- package/dist/page-schemas.mjs.map +0 -1
- package/dist/puck-C9_F3_cJ.mjs +0 -1589
- package/dist/puck-C9_F3_cJ.mjs.map +0 -1
- package/dist/puck-config.d.mts.map +0 -1
- package/dist/puck-config.mjs +0 -51
- package/dist/puck-config.mjs.map +0 -1
- package/dist/site-styles.d.mts +0 -41
- package/dist/site-styles.d.mts.map +0 -1
- package/dist/site-styles.mjs +0 -52
- package/dist/site-styles.mjs.map +0 -1
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fallback styles tier for the MDX typing surface, used when no dev-server
|
|
3
|
+
* discovery endpoint answers (a host app on another origin, or a production
|
|
4
|
+
* build). Derived from the siteStyles registry: the route CSS a host app set
|
|
5
|
+
* with `setHostDiscovery`, or the `siteStyles` option's CSS, reduced to
|
|
6
|
+
* prose-safe rules, plus a paper base sheet. Lives in cms-spa so every setup
|
|
7
|
+
* runs one derivation.
|
|
8
|
+
*
|
|
9
|
+
* CMSMDXEditor consumes it as the fallback below endpoint discovery: when the
|
|
10
|
+
* `/api/styles` fetch delivers (dev server), this tier stays out of the
|
|
11
|
+
* way entirely — including the paper, so discovery-styled editors keep their
|
|
12
|
+
* host-painted surface.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Base sheet appended AFTER the filtered prose rules.
|
|
16
|
+
*
|
|
17
|
+
* The surface underneath the text follows the HOST page, not the admin theme.
|
|
18
|
+
* `useInjectHostStyles` bridges the host's own `body` background and ink onto
|
|
19
|
+
* `:root` as `--conloca-host-prose-bg` / `--conloca-host-color` once the
|
|
20
|
+
* layered host tier has landed. Hard-coding `#ffffff` here is what put
|
|
21
|
+
* `rgb(248, 250, 252)` Starlight headings on a white card — white-on-white —
|
|
22
|
+
* so the paper is now only the FALLBACK, for hosts whose background the
|
|
23
|
+
* bridge could not establish.
|
|
24
|
+
*
|
|
25
|
+
* Ink and paper are a matched pair in both directions: `#181818` on `#ffffff`
|
|
26
|
+
* is the platform pairing, and the bridge only ever publishes the host's
|
|
27
|
+
* background together with the host's ink (as inline custom properties on
|
|
28
|
+
* `<html>`, which outrank these rules). So the surface is either wholly the
|
|
29
|
+
* host's or wholly the platform's, never a light card carrying light text.
|
|
30
|
+
*
|
|
31
|
+
* The ink is a floor, not a verdict: editor-styles.css consumes
|
|
32
|
+
* `--conloca-host-color` as the contenteditable's INHERITED color only, so
|
|
33
|
+
* per-tag host rules kept by the filter still override it.
|
|
34
|
+
*
|
|
35
|
+
* `color-scheme` is deliberately NOT pinned here. It used to be forced to
|
|
36
|
+
* `light` because the paper was always a white card; now that the paper
|
|
37
|
+
* follows the host, forcing a scheme would put light form controls and
|
|
38
|
+
* scrollbars on a dark page. Inheriting it lets the admin theme's
|
|
39
|
+
* `color-scheme` (see `main.css`) reach the surface, which is the scheme the
|
|
40
|
+
* surrounding chrome is already using.
|
|
41
|
+
*/
|
|
42
|
+
export const PROSE_SURFACE_BASE_CSS = `
|
|
43
|
+
:root {
|
|
44
|
+
--conloca-host-color: #181818;
|
|
45
|
+
}
|
|
46
|
+
.conloca-prose--editor {
|
|
47
|
+
background: var(--conloca-host-prose-bg, #ffffff);
|
|
48
|
+
}
|
|
49
|
+
`.trim();
|
|
50
|
+
/**
|
|
51
|
+
* Derive the tier from the current siteStyles registry content: filtered
|
|
52
|
+
* prose rules first, paper base last (platform floor wins ties). Empty
|
|
53
|
+
* registry → empty tier — the surface keeps its defaults and, deliberately,
|
|
54
|
+
* gets no paper: painting a white card while delivering zero host rules
|
|
55
|
+
* would change dev-server editor surfaces that never had this tier.
|
|
56
|
+
*
|
|
57
|
+
* `hostWrapperClass` is the discovered content-wrapper `class` attribute
|
|
58
|
+
* (`hostWrappers.content.className`, eg `sl-markdown-content`). Real host
|
|
59
|
+
* sheets scope their prose to that class and never to `.conloca-prose`, so
|
|
60
|
+
* without it this tier filters down to nothing — see `filterProseSurfaceCss`.
|
|
61
|
+
*/
|
|
62
|
+
export function deriveProseSurfaceStyles(siteStyles, hostWrapperClass) {
|
|
63
|
+
if (siteStyles.length === 0)
|
|
64
|
+
return [];
|
|
65
|
+
return [filterProseSurfaceCss(siteStyles.join('\n'), hostWrapperClass), PROSE_SURFACE_BASE_CSS];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Reduce a site stylesheet to what the MDX typing surface may safely
|
|
69
|
+
* receive: rules ROOTED AT one of the surface's scope classes, plus
|
|
70
|
+
* `@font-face` blocks.
|
|
71
|
+
*
|
|
72
|
+
* Two scope classes, because there are two ways prose gets scoped:
|
|
73
|
+
*
|
|
74
|
+
* - `.conloca-prose` — Conloca's documented prose class, carried by the
|
|
75
|
+
* contenteditable itself. What a host writes when it targets the CMS.
|
|
76
|
+
* - the DISCOVERED content-wrapper class (`hostWrapperClass`, eg
|
|
77
|
+
* `sl-markdown-content`) — what a host's own theme actually writes.
|
|
78
|
+
* `hostWrapperPlugin` renders a clone of that wrapper around the
|
|
79
|
+
* contenteditable, so these selectors match inside the editor exactly
|
|
80
|
+
* as they do on the published page.
|
|
81
|
+
*
|
|
82
|
+
* The second one is why this tier existed but did nothing: a real Starlight
|
|
83
|
+
* route's CSS mentions `.sl-markdown-content` 75 times and
|
|
84
|
+
* `.conloca-prose` zero times, so filtering on the Conloca class alone
|
|
85
|
+
* returned an empty sheet and the editor's own defaults went unchallenged.
|
|
86
|
+
*
|
|
87
|
+
* Why "rooted at" (starts with the class) rather than "mentions" it: this
|
|
88
|
+
* tier injects UNLAYERED, because the editor's default prose scale is
|
|
89
|
+
* unlayered and layered rules lose to unlayered ones regardless of
|
|
90
|
+
* specificity. Unlayered site CSS would equally beat the admin chrome's
|
|
91
|
+
* Tailwind utilities (those live in @layer), so a bare-tag global like
|
|
92
|
+
* `h2 { font-size: 60px }` would restyle the editor shell itself. A rule
|
|
93
|
+
* rooted at a scope class cannot: both classes exist only inside the editor
|
|
94
|
+
* surround. Loosening this to a substring or `:has()` test would forfeit
|
|
95
|
+
* that guarantee — don't.
|
|
96
|
+
*
|
|
97
|
+
* Parsing uses the browser's own CSSOM (detached <style> tag) for rules and
|
|
98
|
+
* declarations. Selector lists are then split only at top-level commas so
|
|
99
|
+
* functional selectors such as `:is(h1, h2)` stay intact.
|
|
100
|
+
*/
|
|
101
|
+
export function filterProseSurfaceCss(css, hostWrapperClass) {
|
|
102
|
+
if (typeof document === 'undefined' || !css.trim())
|
|
103
|
+
return '';
|
|
104
|
+
// The scope roots a rule may be anchored to. `hostWrapperClass` is a raw
|
|
105
|
+
// `class` attribute, so it can carry several tokens (`"prose card"`); each
|
|
106
|
+
// is a legitimate root, because the wrapper clone renders all of them and
|
|
107
|
+
// the host's sheet may key off any one. Dedupe against the Conloca class so
|
|
108
|
+
// a wrapper already carrying it doesn't emit every rule twice.
|
|
109
|
+
const scopes = [
|
|
110
|
+
PROSE_SCOPE,
|
|
111
|
+
...(hostWrapperClass ?? '')
|
|
112
|
+
.split(/\s+/)
|
|
113
|
+
.filter(Boolean)
|
|
114
|
+
.map((token) => `.${token}`)
|
|
115
|
+
.filter((selector) => selector !== PROSE_SCOPE),
|
|
116
|
+
];
|
|
117
|
+
const tag = document.createElement('style');
|
|
118
|
+
// media="not all" keeps the browser from APPLYING the sheet while parsed.
|
|
119
|
+
tag.media = 'not all';
|
|
120
|
+
tag.textContent = css;
|
|
121
|
+
document.head.appendChild(tag);
|
|
122
|
+
try {
|
|
123
|
+
const sheet = tag.sheet;
|
|
124
|
+
if (!sheet)
|
|
125
|
+
return '';
|
|
126
|
+
// Flattening drops the layer wrappers, so the ONLY thing left to express
|
|
127
|
+
// the host's intended precedence among the kept rules is their order in
|
|
128
|
+
// the emitted text. Source order alone is not that: Astro emits
|
|
129
|
+
// Starlight's sublayer blocks in a different order than the sheet
|
|
130
|
+
// DECLARES them (real output emits `starlight.components` before
|
|
131
|
+
// `starlight.content`, while the declaration puts components AFTER
|
|
132
|
+
// content). Flattening on source order would silently invert those two.
|
|
133
|
+
// So sort by declared layer precedence, keeping source order within a
|
|
134
|
+
// layer, and let unlayered host rules stay last — they outrank every
|
|
135
|
+
// layered one, and this tier is emitted unlayered as a whole.
|
|
136
|
+
const order = collectLayerOrder(sheet.cssRules, null, []);
|
|
137
|
+
return filterRuleList(sheet.cssRules, scopes, null)
|
|
138
|
+
.map((entry, index) => ({ entry, index, key: layerSortKey(entry.layerPath, order) }))
|
|
139
|
+
.sort((left, right) => compareLayerKeys(left.key, right.key) || left.index - right.index)
|
|
140
|
+
.map(({ entry }) => entry.text)
|
|
141
|
+
.join('\n');
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// A stylesheet the browser cannot parse contributes nothing; the canvas
|
|
145
|
+
// path (which takes the sheet whole) is unaffected by this filter.
|
|
146
|
+
return '';
|
|
147
|
+
}
|
|
148
|
+
finally {
|
|
149
|
+
tag.remove();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Layer names in the order the sheet establishes precedence for them: every
|
|
154
|
+
* `@layer a, b;` statement contributes its names in list order, and a block
|
|
155
|
+
* for a layer never named in a statement is appended on first sight. Nested
|
|
156
|
+
* blocks are recorded by full dotted path, matching how sublayers are named.
|
|
157
|
+
*/
|
|
158
|
+
function collectLayerOrder(rules, parentPath, order) {
|
|
159
|
+
for (const rule of Array.from(rules)) {
|
|
160
|
+
if (rule.type === 0 && /^@layer\b/i.test(rule.cssText)) {
|
|
161
|
+
const names = 'nameList' in rule
|
|
162
|
+
? Array.from(rule.nameList)
|
|
163
|
+
: [rule.name].filter(Boolean);
|
|
164
|
+
for (const name of names) {
|
|
165
|
+
const path = parentPath === null ? name : `${parentPath}.${name}`;
|
|
166
|
+
if (!order.includes(path))
|
|
167
|
+
order.push(path);
|
|
168
|
+
}
|
|
169
|
+
if ('cssRules' in rule) {
|
|
170
|
+
const name = rule.name;
|
|
171
|
+
const path = !name ? parentPath : parentPath === null ? name : `${parentPath}.${name}`;
|
|
172
|
+
collectLayerOrder(rule.cssRules, path, order);
|
|
173
|
+
}
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if ('cssRules' in rule)
|
|
177
|
+
collectLayerOrder(rule.cssRules, parentPath, order);
|
|
178
|
+
}
|
|
179
|
+
return order;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Precedence key for a layer path: the position of each of its prefixes in
|
|
183
|
+
* `order`, so `starlight.content` sorts inside `starlight`'s slot and against
|
|
184
|
+
* its siblings. An unlayered rule sorts last — unlayered beats layered. A
|
|
185
|
+
* prefix the sheet never declared yields -1, ie earliest.
|
|
186
|
+
*/
|
|
187
|
+
function layerSortKey(layerPath, order) {
|
|
188
|
+
if (layerPath === null)
|
|
189
|
+
return [Number.POSITIVE_INFINITY];
|
|
190
|
+
const segments = layerPath.split('.');
|
|
191
|
+
return segments.map((_, depth) => order.indexOf(segments.slice(0, depth + 1).join('.')));
|
|
192
|
+
}
|
|
193
|
+
function compareLayerKeys(left, right) {
|
|
194
|
+
for (let index = 0; index < Math.max(left.length, right.length); index += 1) {
|
|
195
|
+
const difference = (left[index] ?? -1) - (right[index] ?? -1);
|
|
196
|
+
if (difference !== 0)
|
|
197
|
+
return difference;
|
|
198
|
+
}
|
|
199
|
+
return 0;
|
|
200
|
+
}
|
|
201
|
+
const PROSE_SCOPE = '.conloca-prose';
|
|
202
|
+
// CSSRule.type constants — deprecated in favor of instanceof, but the class
|
|
203
|
+
// globals (CSSFontFaceRule, CSSSupportsRule, …) aren't reliably exposed in
|
|
204
|
+
// every runtime this code is tested under; the numeric types are universal.
|
|
205
|
+
const STYLE_RULE = 1;
|
|
206
|
+
const MEDIA_RULE = 4;
|
|
207
|
+
const FONT_FACE_RULE = 5;
|
|
208
|
+
const SUPPORTS_RULE = 12;
|
|
209
|
+
/** Split only top-level selector-list commas; commas inside :is(), :where(),
|
|
210
|
+
* :not(), attribute values, and strings remain part of their selector branch. */
|
|
211
|
+
function splitSelectorList(selectorText) {
|
|
212
|
+
const selectors = [];
|
|
213
|
+
let start = 0;
|
|
214
|
+
let parentheses = 0;
|
|
215
|
+
let brackets = 0;
|
|
216
|
+
let quote = null;
|
|
217
|
+
for (let index = 0; index < selectorText.length; index += 1) {
|
|
218
|
+
const char = selectorText[index];
|
|
219
|
+
if (char === '\\') {
|
|
220
|
+
index += 1;
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (quote) {
|
|
224
|
+
if (char === quote)
|
|
225
|
+
quote = null;
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (char === '"' || char === "'") {
|
|
229
|
+
quote = char;
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
if (char === '(')
|
|
233
|
+
parentheses += 1;
|
|
234
|
+
else if (char === ')')
|
|
235
|
+
parentheses = Math.max(0, parentheses - 1);
|
|
236
|
+
else if (char === '[')
|
|
237
|
+
brackets += 1;
|
|
238
|
+
else if (char === ']')
|
|
239
|
+
brackets = Math.max(0, brackets - 1);
|
|
240
|
+
else if (char === ',' && parentheses === 0 && brackets === 0) {
|
|
241
|
+
selectors.push(selectorText.slice(start, index).trim());
|
|
242
|
+
start = index + 1;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
selectors.push(selectorText.slice(start).trim());
|
|
246
|
+
return selectors.filter(Boolean);
|
|
247
|
+
}
|
|
248
|
+
function filterStyleRule(rule, scopes) {
|
|
249
|
+
const selectors = splitSelectorList(rule.selectorText).filter((selector) =>
|
|
250
|
+
// Anchored AT a scope class — the selector's first compound — not merely
|
|
251
|
+
// mentioning it somewhere. The character after the match may not continue
|
|
252
|
+
// a class name, so `.conloca-prose-wide` never passes as `.conloca-prose`.
|
|
253
|
+
scopes.some((scope) => selector.startsWith(scope) && !/[\w-]/.test(selector[scope.length] ?? '')));
|
|
254
|
+
if (selectors.length === 0)
|
|
255
|
+
return null;
|
|
256
|
+
return `${selectors.join(', ')} { ${rule.style.cssText} }`;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* `@layer name { … }` — the BLOCK form, which groups rules.
|
|
260
|
+
*
|
|
261
|
+
* Neither layer form has a legacy numeric `type` (both report 0), and both
|
|
262
|
+
* serialize with an `@layer` prelude, so the discriminator has to be the
|
|
263
|
+
* grouping capability itself. The statement form (`@layer a, b;`, which every
|
|
264
|
+
* real Starlight/Tailwind sheet opens with) carries `nameList` and NO
|
|
265
|
+
* `cssRules`; treating it as a group would hand `Array.from(undefined)` to the
|
|
266
|
+
* walker, and that throw is swallowed by the caller's catch — turning the
|
|
267
|
+
* whole tier back into an empty string with nothing logged. Capability check,
|
|
268
|
+
* not serialization check.
|
|
269
|
+
*/
|
|
270
|
+
function isLayerBlockRule(rule) {
|
|
271
|
+
return rule.type === 0 && 'cssRules' in rule && /^@layer\b/i.test(rule.cssText);
|
|
272
|
+
}
|
|
273
|
+
function filterRuleList(rules, scopes, layerPath) {
|
|
274
|
+
const kept = [];
|
|
275
|
+
for (const rule of Array.from(rules)) {
|
|
276
|
+
if (rule.type === FONT_FACE_RULE) {
|
|
277
|
+
kept.push({ text: rule.cssText, layerPath });
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
if (rule.type === STYLE_RULE) {
|
|
281
|
+
const filtered = filterStyleRule(rule, scopes);
|
|
282
|
+
if (filtered)
|
|
283
|
+
kept.push({ text: filtered, layerPath });
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
// `@layer name { … }`: descend, and FLATTEN — the layer wrapper is
|
|
287
|
+
// deliberately NOT re-emitted.
|
|
288
|
+
//
|
|
289
|
+
// Host frameworks ship their prose rules inside their own layers
|
|
290
|
+
// (Starlight puts all 75 of its `.sl-markdown-content` rules inside
|
|
291
|
+
// `@layer starlight.content` and friends; not one is top-level). Two
|
|
292
|
+
// consequences, both load-bearing:
|
|
293
|
+
//
|
|
294
|
+
// 1. Without descending, this filter keeps NOTHING from such a sheet —
|
|
295
|
+
// the layer block is not a style rule, so every rule inside it was
|
|
296
|
+
// invisible here.
|
|
297
|
+
// 2. Re-emitting the layer would hand back the cascade win this whole
|
|
298
|
+
// tier exists to take. The tier is injected unlayered precisely
|
|
299
|
+
// because the editor's own prose defaults are unlayered; a rule
|
|
300
|
+
// re-wrapped in `@layer starlight.content` loses to them again.
|
|
301
|
+
//
|
|
302
|
+
// The layer each kept rule came from is carried out with it, and the
|
|
303
|
+
// caller re-sorts by declared layer order.
|
|
304
|
+
//
|
|
305
|
+
// BE AWARE OF WHAT THIS IS: taken together with `collectLayerOrder` /
|
|
306
|
+
// `layerSortKey` / `compareLayerKeys` above, it RE-IMPLEMENTS A SLICE OF
|
|
307
|
+
// THE BROWSER'S OWN CASCADE ORDERING in userland. That is a real cost and
|
|
308
|
+
// a deliberate decision, not an accident — do not extend it casually.
|
|
309
|
+
//
|
|
310
|
+
// It is unavoidable given the constraint: the tier MUST be unlayered
|
|
311
|
+
// (that is the only way to beat the editor's unlayered prose defaults),
|
|
312
|
+
// and un-layering a sheet necessarily destroys the precedence its layers
|
|
313
|
+
// encoded. Something has to re-establish that precedence, and the browser
|
|
314
|
+
// will not do it for rules it no longer sees as layered. The alternative —
|
|
315
|
+
// keep the layers — is not an alternative at all: it loses the cascade to
|
|
316
|
+
// the editor's own defaults, which is the entire bug this tier fixes.
|
|
317
|
+
//
|
|
318
|
+
// Scope is deliberately narrow: order only, only among rules that already
|
|
319
|
+
// survived the scope filter. No specificity maths, no `!important`
|
|
320
|
+
// handling, no revert/layer-statement semantics beyond ordering. If this
|
|
321
|
+
// ever needs more than ordering, that is the signal to stop and move to
|
|
322
|
+
// build-time computed-style capture instead of growing a cascade engine.
|
|
323
|
+
if (isLayerBlockRule(rule)) {
|
|
324
|
+
const name = rule.name;
|
|
325
|
+
const nested = !name ? layerPath : layerPath === null ? name : `${layerPath}.${name}`;
|
|
326
|
+
kept.push(...filterRuleList(rule.cssRules, scopes, nested));
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
// Conditional groups (@media, @supports): keep the wrapper only when it
|
|
330
|
+
// still contains scope-rooted rules after filtering its body. The group
|
|
331
|
+
// inherits the enclosing layer, so its kept body sorts as one unit.
|
|
332
|
+
if (rule.type === MEDIA_RULE || rule.type === SUPPORTS_RULE) {
|
|
333
|
+
const group = rule;
|
|
334
|
+
const inner = filterRuleList(group.cssRules, scopes, layerPath);
|
|
335
|
+
if (inner.length > 0) {
|
|
336
|
+
const prelude = rule.type === MEDIA_RULE ? '@media' : '@supports';
|
|
337
|
+
kept.push({
|
|
338
|
+
text: `${prelude} ${group.conditionText} {\n${inner.map((entry) => entry.text).join('\n')}\n}`,
|
|
339
|
+
layerPath,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
// Everything else (@keyframes, @property, the `@layer a, b;` statement
|
|
344
|
+
// form, @import already stripped by the injector, …) has no business on
|
|
345
|
+
// the typing surface: dropped.
|
|
346
|
+
}
|
|
347
|
+
return kept;
|
|
348
|
+
}
|
|
349
|
+
//# sourceMappingURL=prose-surface-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose-surface-css.js","sourceRoot":"","sources":["../../src/prose-surface-css.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;CAOrC,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,UAAsB,EAAE,gBAAgC;IAC/F,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACvC,OAAO,CAAC,qBAAqB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,CAAC;AAClG,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW,EAAE,gBAAgC;IACjF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAE9D,yEAAyE;IACzE,2EAA2E;IAC3E,0EAA0E;IAC1E,4EAA4E;IAC5E,+DAA+D;IAC/D,MAAM,MAAM,GAAG;QACb,WAAW;QACX,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;aACxB,KAAK,CAAC,KAAK,CAAC;aACZ,MAAM,CAAC,OAAO,CAAC;aACf,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,EAA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AC,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,IAAI,EAAE,CAAC;YACtF,IAAI,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;YAC5D,SAAS;QACX,CAAC;QACD,wEAAwE;QACxE,wEAAwE;QACxE,oEAAoE;QACpE,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;YAC5D,MAAM,KAAK,GAAG,IAAwB,CAAC;YACvC,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;YAChE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC;gBAClE,IAAI,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,GAAG,OAAO,IAAI,KAAK,CAAC,aAAa,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;oBAC9F,SAAS;iBACV,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,uEAAuE;QACvE,wEAAwE;QACxE,+BAA+B;IACjC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import { Config } from
|
|
2
|
-
|
|
3
|
-
//#region src/puck-config.d.ts
|
|
1
|
+
import type { Config } from '@puckeditor/core';
|
|
4
2
|
/**
|
|
5
3
|
* Shared state for Puck config across module instances.
|
|
6
4
|
* Uses window to ensure virtual modules and bundled code share the same state.
|
|
7
5
|
*/
|
|
8
6
|
type PuckConfig = Config;
|
|
9
7
|
interface SharedPuckState {
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
config: PuckConfig;
|
|
9
|
+
subscribers: Set<(config: PuckConfig) => void>;
|
|
12
10
|
}
|
|
13
11
|
declare global {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
interface Window {
|
|
13
|
+
__PUCK_STATE__?: SharedPuckState;
|
|
14
|
+
}
|
|
17
15
|
}
|
|
18
16
|
/**
|
|
19
17
|
* Set the Puck config. Called by the virtual module that loads user's config.
|
|
20
18
|
* Notifies all subscribers of the change (enables HMR).
|
|
21
19
|
*/
|
|
22
|
-
declare function setPuckConfig(config: PuckConfig): void;
|
|
20
|
+
export declare function setPuckConfig(config: PuckConfig): void;
|
|
23
21
|
/**
|
|
24
22
|
* Get the current Puck config synchronously.
|
|
25
23
|
*/
|
|
26
|
-
declare function getPuckConfig(): PuckConfig;
|
|
24
|
+
export declare function getPuckConfig(): PuckConfig;
|
|
27
25
|
/**
|
|
28
26
|
* React hook to subscribe to Puck config changes.
|
|
29
27
|
* Returns the current config and updates when it changes (HMR support).
|
|
30
28
|
*/
|
|
31
|
-
declare function usePuckConfig(): PuckConfig;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=puck-config.d.mts.map
|
|
29
|
+
export declare function usePuckConfig(): PuckConfig;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=puck-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
state.subscribers.forEach((fn) => {
|
|
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
|
+
}
|
|
51
|
+
//# sourceMappingURL=puck-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"puck-config.js","sourceRoot":"","sources":["../../src/puck-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAoB5C,MAAM,cAAc,GAAG,GAAoB,EAAE;IAC3C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC3B,MAAM,CAAC,cAAc,GAAG;gBACtB,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;gBAC1B,WAAW,EAAE,IAAI,GAAG,EAAE;aACvB,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC,cAAc,CAAC;IAC/B,CAAC;IACD,eAAe;IACf,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AAChE,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,MAAkB;IAC9C,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC/B,EAAE,CAAC,MAAM,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,cAAc,EAAE,CAAC,MAAM,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC;IAEpE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;QAE/B,sEAAsE;QACtE,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC5B,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;QAED,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type SiteStyles } from './site-styles.js';
|
|
2
|
+
/**
|
|
3
|
+
* L0 floor for sandboxed MDX/HTML preview — the styles channel into the frame.
|
|
4
|
+
* Host cascade cannot enter the opaque iframe; without an explicit sheet the
|
|
5
|
+
* frame paints browser UA defaults (Times).
|
|
6
|
+
*
|
|
7
|
+
* Everything here is a FLOOR: it applies where the host's CSS is silent and
|
|
8
|
+
* loses to any host rule (host sheets join later in source order; see
|
|
9
|
+
* joinSandboxPreviewStyles). The editor never overrides the site — the chip
|
|
10
|
+
* should render the published page's ink, not ours.
|
|
11
|
+
*
|
|
12
|
+
* `color-scheme: light` pins UA-derived rendering (form controls, scrollbars)
|
|
13
|
+
* to the light scheme: the chip represents the published page, and the
|
|
14
|
+
* AUTHOR's OS theme is not a property of that page. Host `@media
|
|
15
|
+
* (prefers-color-scheme: dark)` sections are stripped before joining for the
|
|
16
|
+
* same reason (see stripDarkSchemeBlocks).
|
|
17
|
+
*/
|
|
18
|
+
export declare const SANDBOX_L0_CSS: string;
|
|
19
|
+
/**
|
|
20
|
+
* Applied LAST. A layout guarantee only, never ink: the chip must stay
|
|
21
|
+
* transparent so the article card underneath shows through, whatever the
|
|
22
|
+
* host sheet paints on html/body.
|
|
23
|
+
*
|
|
24
|
+
* This replaces the old contrast lock, which also forced `color: #181818
|
|
25
|
+
* !important` onto every prose tag. That lock guarded against exactly one
|
|
26
|
+
* hazard — a host `@media (prefers-color-scheme: dark)` section firing under
|
|
27
|
+
* the author's OS dark mode and painting light ink on the light card — at
|
|
28
|
+
* the cost of erasing the site's true ink on every chip, for every site.
|
|
29
|
+
* The hazard is now removed at its source (stripDarkSchemeBlocks) instead of
|
|
30
|
+
* being painted over, so host colors pass through untouched. The other dark
|
|
31
|
+
* vector (`.dark` / `[data-theme]` selectors) never could fire here: the
|
|
32
|
+
* sandbox document carries no theme hooks.
|
|
33
|
+
*/
|
|
34
|
+
export declare const SANDBOX_SURFACE_GUARD_CSS: string;
|
|
35
|
+
/**
|
|
36
|
+
* Remove `@media` blocks whose condition requires the dark color scheme.
|
|
37
|
+
* The chip renders the published page's light rendering deterministically;
|
|
38
|
+
* the author's OS preference must not restyle it. Negated forms
|
|
39
|
+
* (`not (prefers-color-scheme: dark)`) describe the light rendering and are
|
|
40
|
+
* kept, as are `prefers-color-scheme: light` blocks.
|
|
41
|
+
*
|
|
42
|
+
* A tiny brace-counting scanner rather than CSSOM: this runs on raw sheet
|
|
43
|
+
* text inside join (pure, testable without a DOM), and it must not be fooled
|
|
44
|
+
* by braces inside strings or comments — both are skipped token-wise.
|
|
45
|
+
*
|
|
46
|
+
* ponytail: top-level scan only — a dark-scheme @media nested INSIDE another
|
|
47
|
+
* @media survives. Bundled site CSS doesn't produce that shape today; walk
|
|
48
|
+
* recursively if a real sheet ever does.
|
|
49
|
+
*/
|
|
50
|
+
export declare function stripDarkSchemeBlocks(css: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Join L0 floor + host sheets (dark-scheme sections removed) + the
|
|
53
|
+
* background guard for ContentSandbox. Empty host sheets still produce L0 so
|
|
54
|
+
* the frame never falls back to Times.
|
|
55
|
+
*/
|
|
56
|
+
export declare function joinSandboxPreviewStyles(hostSheets?: SiteStyles): string;
|
|
57
|
+
/**
|
|
58
|
+
* Puck canvas / fragment preview: use the same siteStyles registry the page
|
|
59
|
+
* iframe already loads. No route fetch here — fragments sit on a page that has
|
|
60
|
+
* already registered host CSS.
|
|
61
|
+
*/
|
|
62
|
+
export declare function useSandboxPreviewStyles(): string;
|
|
63
|
+
//# sourceMappingURL=sandbox-preview-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-preview-styles.d.ts","sourceRoot":"","sources":["../../src/sandbox-preview-styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,QAsCnB,CAAC;AAET;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,QAI9B,CAAC;AAET;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBzD;AA0BD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,GAAE,UAAe,GAAG,MAAM,CAO5E;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAGhD"}
|