@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,638 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Host-style probe — captures the host's computed styles for prose
|
|
4
|
+
* elements directly from the rendered live page, then exposes a
|
|
5
|
+
* stylesheet the editor can inject so its typed elements look like
|
|
6
|
+
* the published ones.
|
|
7
|
+
*
|
|
8
|
+
* Why a probe exists alongside the CSS grabber + wrapper auto-copy:
|
|
9
|
+
*
|
|
10
|
+
* - The CSS grabber + wrapper auto-copy work when the host styles
|
|
11
|
+
* prose through CLASS-on-WRAPPER descendant selectors:
|
|
12
|
+
* `.sl-markdown-content h1 { ... }`, `.prose h1 { ... }`. The editor
|
|
13
|
+
* gets wrapped in a clone of the host's wrapper, and the host's
|
|
14
|
+
* already-grabbed CSS reaches its typed elements via the cascade.
|
|
15
|
+
*
|
|
16
|
+
* - But some hosts style prose differently:
|
|
17
|
+
* - Utility-first Tailwind: `<h1 class="text-5xl font-bold">` — the
|
|
18
|
+
* styling is per-element via utility classes. The editor's typed
|
|
19
|
+
* `<h1>` has no utility classes; cascade can't help.
|
|
20
|
+
* - Inline styles: `<h1 style="...">` — only applies to that one
|
|
21
|
+
* element; not reusable via cascade.
|
|
22
|
+
*
|
|
23
|
+
* For both cases, the FINAL rendered styles still resolve to a
|
|
24
|
+
* normal set of CSS property values. `getComputedStyle()` reads
|
|
25
|
+
* them regardless of source. The probe captures those final values
|
|
26
|
+
* from a real rendered sample on the live page and synthesizes a
|
|
27
|
+
* stylesheet — `.conloca-prose--editor h1 { font-size: ...; ... }`
|
|
28
|
+
* — that styles the editor's typed elements to match.
|
|
29
|
+
*
|
|
30
|
+
* Approach:
|
|
31
|
+
*
|
|
32
|
+
* 1. Open a hidden same-origin iframe to the page's published URL.
|
|
33
|
+
* 2. Find the host's prose wrapper inside the iframe (or fall back
|
|
34
|
+
* to `<main>` / `<body>`).
|
|
35
|
+
* 3. For each prose tag we care about, prefer an existing element
|
|
36
|
+
* in the wrapper (so utility classes / inline styles on real
|
|
37
|
+
* elements are observed). Inject a synthetic probe element when
|
|
38
|
+
* no existing sample is present — descendant-selector hosts
|
|
39
|
+
* style the synthetic via the cascade.
|
|
40
|
+
* 4. Read the relevant computed style properties; build a CSS rule
|
|
41
|
+
* scoped to `.conloca-prose--editor <tag>`.
|
|
42
|
+
* 5. Tear down the iframe.
|
|
43
|
+
*
|
|
44
|
+
* Generic across hosts because it never reads source CSS — it reads
|
|
45
|
+
* the cascade's resolved output. Descendant selectors, utility
|
|
46
|
+
* classes, and inline styles all funnel into `getComputedStyle()`
|
|
47
|
+
* the same way.
|
|
48
|
+
*/
|
|
49
|
+
/** Prose elements whose computed styles we capture, split by how
|
|
50
|
+
* they need to be probed. Block-level tags get probed directly under
|
|
51
|
+
* the prose wrapper (their styles don't depend on inline context).
|
|
52
|
+
* Inline tags get probed INSIDE a synthetic `<p>` so their font-size
|
|
53
|
+
* inherits from paragraph context, not from a heading they might
|
|
54
|
+
* happen to appear inside on the live page (eg an anchor inside an
|
|
55
|
+
* <h2> would otherwise capture 35px as its font-size and the editor's
|
|
56
|
+
* inline links would all render heading-sized).
|
|
57
|
+
*
|
|
58
|
+
* `li`, `th`, `td` are inline-context tags too: they're inside a
|
|
59
|
+
* parent (`ul`/`ol`, `tr`) that establishes their typography. We
|
|
60
|
+
* probe them directly under the wrapper because their parent's
|
|
61
|
+
* styling is captured separately and the cascade handles inheritance. */
|
|
62
|
+
const BLOCK_PROBE_TAGS = [
|
|
63
|
+
'h1',
|
|
64
|
+
'h2',
|
|
65
|
+
'h3',
|
|
66
|
+
'h4',
|
|
67
|
+
'h5',
|
|
68
|
+
'h6',
|
|
69
|
+
'p',
|
|
70
|
+
'pre',
|
|
71
|
+
'ul',
|
|
72
|
+
'ol',
|
|
73
|
+
'li',
|
|
74
|
+
'blockquote',
|
|
75
|
+
'table',
|
|
76
|
+
'th',
|
|
77
|
+
'td',
|
|
78
|
+
'hr',
|
|
79
|
+
];
|
|
80
|
+
const INLINE_PROBE_TAGS = ['a', 'strong', 'em', 'code'];
|
|
81
|
+
/** Computed-style properties to capture per tag. Chosen for breadth —
|
|
82
|
+
* we want enough to make the editor look similar without over-
|
|
83
|
+
* specifying things that vary by selection state or container. Skips
|
|
84
|
+
* `width`, `height`, `display`, etc. which would distort the editor's
|
|
85
|
+
* own layout. */
|
|
86
|
+
const PROBE_PROPS = [
|
|
87
|
+
'font-family',
|
|
88
|
+
'font-size',
|
|
89
|
+
'font-weight',
|
|
90
|
+
'font-style',
|
|
91
|
+
'line-height',
|
|
92
|
+
'letter-spacing',
|
|
93
|
+
'color',
|
|
94
|
+
'background-color',
|
|
95
|
+
'margin-block-start',
|
|
96
|
+
'margin-block-end',
|
|
97
|
+
'margin-inline-start',
|
|
98
|
+
'margin-inline-end',
|
|
99
|
+
'padding-block-start',
|
|
100
|
+
'padding-block-end',
|
|
101
|
+
'padding-inline-start',
|
|
102
|
+
'padding-inline-end',
|
|
103
|
+
'border-radius',
|
|
104
|
+
'border-top-width',
|
|
105
|
+
'border-right-width',
|
|
106
|
+
'border-bottom-width',
|
|
107
|
+
'border-left-width',
|
|
108
|
+
'border-top-style',
|
|
109
|
+
'border-right-style',
|
|
110
|
+
'border-bottom-style',
|
|
111
|
+
'border-left-style',
|
|
112
|
+
'border-top-color',
|
|
113
|
+
'border-right-color',
|
|
114
|
+
'border-bottom-color',
|
|
115
|
+
'border-left-color',
|
|
116
|
+
'text-decoration-line',
|
|
117
|
+
'text-decoration-color',
|
|
118
|
+
'text-decoration-thickness',
|
|
119
|
+
'text-underline-offset',
|
|
120
|
+
'list-style-type',
|
|
121
|
+
'list-style-position',
|
|
122
|
+
];
|
|
123
|
+
const IFRAME_TIMEOUT_MS = 10_000;
|
|
124
|
+
/**
|
|
125
|
+
* Where the probe publishes the host's resolved design tokens. The editor's
|
|
126
|
+
* content region is also where the host sheet is scoped, so the two land on
|
|
127
|
+
* the same element and the unlayered probe tier wins.
|
|
128
|
+
*/
|
|
129
|
+
const HOST_TOKEN_SCOPE = '.conloca-mdx-editor-surround';
|
|
130
|
+
/**
|
|
131
|
+
* Locate the host's prose wrapper inside the iframe's document, given
|
|
132
|
+
* the className the server-side discovery already resolved (eg
|
|
133
|
+
* `sl-markdown-content` for Starlight, `prose` for Tailwind Typography).
|
|
134
|
+
* We avoid duplicating the find-wrapper heuristic here: the server-side
|
|
135
|
+
* `findContentWrapper` does the smart majority+depth walk against raw
|
|
136
|
+
* HTML and gives us the right answer. The probe just resolves that
|
|
137
|
+
* className back to an actual element inside the iframe.
|
|
138
|
+
*
|
|
139
|
+
* When discovery came back empty (or its class isn't in the document),
|
|
140
|
+
* fall back to the documented prose scope `.conloca-prose` before `main`:
|
|
141
|
+
* synthetic probe elements must land INSIDE the scope the host's prose
|
|
142
|
+
* rules target, or they measure unscoped page defaults — and every
|
|
143
|
+
* Conloca-rendered fragment page carries the scope class by construction,
|
|
144
|
+
* even when the wrapper heuristic finds nothing. Exported for tests.
|
|
145
|
+
*/
|
|
146
|
+
export function findWrapperByClass(doc, className) {
|
|
147
|
+
const fallback = () => doc.querySelector('.conloca-prose') ?? doc.querySelector('main') ?? null;
|
|
148
|
+
if (!className)
|
|
149
|
+
return fallback();
|
|
150
|
+
// Match an element carrying ALL the classes in the discovered name
|
|
151
|
+
// (preserves Astro scoped-hash matching: `astro-xxxx` must be on the
|
|
152
|
+
// same element). `.foo.bar` requires all listed classes.
|
|
153
|
+
const selector = `.${className.split(/\s+/).filter(Boolean).join('.')}`;
|
|
154
|
+
const found = doc.querySelector(selector);
|
|
155
|
+
return found ?? fallback();
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Read computed styles for each PROBE_TAG inside a freshly loaded
|
|
159
|
+
* iframe's document. Returns one CSS rule string per tag, scoped to
|
|
160
|
+
* `.conloca-prose--editor <tag>` so it targets the editor's typed
|
|
161
|
+
* elements without leaking into the rest of the admin chrome.
|
|
162
|
+
*/
|
|
163
|
+
function buildProbeStylesheet(doc, wrapperClass) {
|
|
164
|
+
const wrapper = findWrapperByClass(doc, wrapperClass);
|
|
165
|
+
const view = doc.defaultView;
|
|
166
|
+
if (!view || !wrapper)
|
|
167
|
+
return '';
|
|
168
|
+
const rules = [];
|
|
169
|
+
// Wrapper-level: capture inherited typography (font-family, color,
|
|
170
|
+
// line-height, etc.) that the host's prose container resolves through
|
|
171
|
+
// BODY inheritance. The probe can't read the cascade source, only
|
|
172
|
+
// the resolved computed values, but that's exactly what we want here:
|
|
173
|
+
// whatever the host's body/wrapper combination computes to.
|
|
174
|
+
//
|
|
175
|
+
// Why this matters: hosts like Starlight set `font-family: var(--sl-font)`
|
|
176
|
+
// on body and never on `.sl-markdown-content`. On the published page
|
|
177
|
+
// the wrapper inherits Inter. In the editor, MDXEditor's `_editorRoot_*`
|
|
178
|
+
// wrapper rule sets `font-family: var(--font-body)` (a generic system
|
|
179
|
+
// stack) and `color: var(--baseText)` (its own palette). Inheritance
|
|
180
|
+
// flows through THAT to the host's `.sl-markdown-content` clone and
|
|
181
|
+
// then to the contenteditable. Probing the wrapper and emitting a
|
|
182
|
+
// direct `:where(.conloca-prose--editor) { font: ...; color: ... }`
|
|
183
|
+
// rule beats inheritance and restores the host's typography.
|
|
184
|
+
const wrapperRule = probeWrapper(view, wrapper);
|
|
185
|
+
if (wrapperRule)
|
|
186
|
+
rules.push(wrapperRule);
|
|
187
|
+
// Page background, read off BODY rather than the wrapper. The wrapper is
|
|
188
|
+
// transparent on most hosts (Starlight's is), so the page's surface colour
|
|
189
|
+
// lives on `body` — and it is the value the editor's content surround paints
|
|
190
|
+
// via `--conloca-host-body-bg` (main.css). Publishing it here is what lets
|
|
191
|
+
// the probe own the whole surface, ink and paper together, instead of a
|
|
192
|
+
// second derived producer having to guess it from the stylesheet.
|
|
193
|
+
//
|
|
194
|
+
// `background-color` is not inherited, so a transparent result is a real
|
|
195
|
+
// "the host painted nothing" signal and is left unpublished — the surround
|
|
196
|
+
// then keeps its own chrome colour.
|
|
197
|
+
const pageBackground = view.getComputedStyle(doc.body).backgroundColor;
|
|
198
|
+
if (pageBackground && pageBackground !== 'rgba(0, 0, 0, 0)' && pageBackground !== 'transparent') {
|
|
199
|
+
rules.push(`:root { --conloca-host-body-bg: ${pageBackground}; }`);
|
|
200
|
+
}
|
|
201
|
+
// The host's design tokens, RESOLVED.
|
|
202
|
+
//
|
|
203
|
+
// The host's own stylesheet is injected scoped to the editor's content
|
|
204
|
+
// region, and `scopeHostCss` rewrites its `:root` / `html` / `body` / `.dark`
|
|
205
|
+
// selectors onto the scope root so those blocks still apply. That rewriting
|
|
206
|
+
// cannot be made complete. A compiled bundle also keys themes off attribute
|
|
207
|
+
// selectors and CSS nesting (`&[data-theme="dark"]`), and any theme block the
|
|
208
|
+
// rewriting misses simply never applies — so one half of a token set lands
|
|
209
|
+
// and the other half silently does not. That is not a cosmetic gap: a light
|
|
210
|
+
// background token can end up applying under the probe's dark ink, which is
|
|
211
|
+
// white text on white paper.
|
|
212
|
+
//
|
|
213
|
+
// Resolving the tokens here removes the class of bug rather than another of
|
|
214
|
+
// its instances. These are read off the probe document, which rendered the
|
|
215
|
+
// real page in the editor's own theme, so there is no selector left to
|
|
216
|
+
// re-target and nothing left to get wrong.
|
|
217
|
+
//
|
|
218
|
+
// Emitted onto the editor's content region rather than `:root` because the
|
|
219
|
+
// host sheet defines its tokens on that same element, and an inherited
|
|
220
|
+
// `:root` value loses to a local definition. This tier is unlayered while
|
|
221
|
+
// the host sheet is layered, so it wins there without needing specificity.
|
|
222
|
+
//
|
|
223
|
+
// `--conloca-*` names are skipped: that contract is published deliberately
|
|
224
|
+
// elsewhere in this file and by the bridge, and must not be shadowed by
|
|
225
|
+
// whatever a host happens to have inherited from the admin chrome.
|
|
226
|
+
const rootStyle = view.getComputedStyle(doc.documentElement);
|
|
227
|
+
const tokens = [];
|
|
228
|
+
for (const property of rootStyle) {
|
|
229
|
+
if (!property.startsWith('--') || property.startsWith('--conloca-'))
|
|
230
|
+
continue;
|
|
231
|
+
const value = rootStyle.getPropertyValue(property).trim();
|
|
232
|
+
if (value)
|
|
233
|
+
tokens.push(`${property}: ${value};`);
|
|
234
|
+
}
|
|
235
|
+
if (tokens.length > 0)
|
|
236
|
+
rules.push(`${HOST_TOKEN_SCOPE} {\n ${tokens.join('\n ')}\n}`);
|
|
237
|
+
// Block-level: inject INSIDE a synthetic two-element sequence so
|
|
238
|
+
// adjacent-sibling rules fire during the probe. Hosts like Starlight
|
|
239
|
+
// apply prose spacing via `:not(...) + :not(...) { margin-top: ... }`
|
|
240
|
+
// — the rule only fires when an element has a preceding sibling. A
|
|
241
|
+
// single-sample probe would catch the first-child margin (zero) and
|
|
242
|
+
// override the host's adjacent-sibling rule via specificity, so the
|
|
243
|
+
// editor's later paragraphs/headings would render flush against each
|
|
244
|
+
// other.
|
|
245
|
+
//
|
|
246
|
+
// We always use `<p>` as the preceding sibling because: (a) every
|
|
247
|
+
// prose block tag commonly follows a paragraph in real content; (b)
|
|
248
|
+
// Starlight's spacing rules are sibling-type-agnostic except for the
|
|
249
|
+
// "heading after non-heading" rule, which also fires when the
|
|
250
|
+
// previous sibling is a `<p>`.
|
|
251
|
+
for (const tag of BLOCK_PROBE_TAGS) {
|
|
252
|
+
const rule = probeBlockTagInSiblingContext(view, wrapper, tag);
|
|
253
|
+
if (rule)
|
|
254
|
+
rules.push(rule);
|
|
255
|
+
}
|
|
256
|
+
// Inline: always inject inside a synthetic `<p>` (newly added under
|
|
257
|
+
// the wrapper) so font-size / line-height etc. inherit from a
|
|
258
|
+
// paragraph context. Otherwise an anchor we find inside a heading
|
|
259
|
+
// would tell us "links are 35px," and the editor's inline links
|
|
260
|
+
// would render heading-sized. Removed after probing.
|
|
261
|
+
const synthParent = doc.createElement('p');
|
|
262
|
+
synthParent.setAttribute('data-conloca-probe-parent', 'true');
|
|
263
|
+
wrapper.appendChild(synthParent);
|
|
264
|
+
try {
|
|
265
|
+
for (const tag of INLINE_PROBE_TAGS) {
|
|
266
|
+
const rule = probeInlineTag(view, synthParent, tag);
|
|
267
|
+
if (rule)
|
|
268
|
+
rules.push(rule);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
finally {
|
|
272
|
+
synthParent.remove();
|
|
273
|
+
}
|
|
274
|
+
return rules.join('\n');
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Probe a block tag with an injected `<p>` preceding sibling so any
|
|
278
|
+
* adjacent-sibling spacing rules in the host's CSS fire while reading
|
|
279
|
+
* computed styles. This gives the "this element follows other content"
|
|
280
|
+
* margin context that single-sample probing misses.
|
|
281
|
+
*
|
|
282
|
+
* Special-case: when probing `<p>` itself we use another `<p>` as
|
|
283
|
+
* the preceding sibling. For `<li>` and table-cell tags we need to
|
|
284
|
+
* inject them inside a parent (`<ul>`/`<ol>`/`<table>`), preceded by
|
|
285
|
+
* a sibling of the same kind so list-item and cell adjacency rules fire.
|
|
286
|
+
*/
|
|
287
|
+
function probeBlockTagInSiblingContext(view, wrapper, tag) {
|
|
288
|
+
const doc = wrapper.ownerDocument;
|
|
289
|
+
// Build the synthetic context. The element we read is always
|
|
290
|
+
// `target` — everything before it just creates the right adjacency.
|
|
291
|
+
let host;
|
|
292
|
+
let target;
|
|
293
|
+
if (tag === 'li') {
|
|
294
|
+
host = doc.createElement('ul');
|
|
295
|
+
host.appendChild(makeProbeEl(doc, 'li'));
|
|
296
|
+
target = makeProbeEl(doc, 'li');
|
|
297
|
+
host.appendChild(target);
|
|
298
|
+
}
|
|
299
|
+
else if (tag === 'th' || tag === 'td') {
|
|
300
|
+
host = doc.createElement('table');
|
|
301
|
+
const tr1 = doc.createElement('tr');
|
|
302
|
+
tr1.appendChild(makeProbeEl(doc, tag));
|
|
303
|
+
host.appendChild(tr1);
|
|
304
|
+
const tr2 = doc.createElement('tr');
|
|
305
|
+
target = makeProbeEl(doc, tag);
|
|
306
|
+
tr2.appendChild(target);
|
|
307
|
+
host.appendChild(tr2);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
// Standard "block element after a paragraph" context.
|
|
311
|
+
host = doc.createElement('div');
|
|
312
|
+
host.setAttribute('data-conloca-probe-host', 'true');
|
|
313
|
+
host.appendChild(makeProbeEl(doc, 'p'));
|
|
314
|
+
target = makeProbeEl(doc, tag);
|
|
315
|
+
host.appendChild(target);
|
|
316
|
+
}
|
|
317
|
+
host.setAttribute('data-conloca-probe-host', 'true');
|
|
318
|
+
wrapper.appendChild(host);
|
|
319
|
+
try {
|
|
320
|
+
return generateRule(view, target, tag);
|
|
321
|
+
}
|
|
322
|
+
finally {
|
|
323
|
+
host.remove();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
/** Properties read directly off the host's prose wrapper. These are the
|
|
327
|
+
* typography "defaults" that hosts conventionally set on body and let
|
|
328
|
+
* inherit down — the wrapper itself rarely overrides them, so its
|
|
329
|
+
* computed values reflect the host's resolved body typography.
|
|
330
|
+
*
|
|
331
|
+
* Excludes margin/padding/border/background: those are wrapper layout
|
|
332
|
+
* concerns that the editor shouldn't inherit (the editor lives inside
|
|
333
|
+
* the CMS SPA shell, not the host's page layout). */
|
|
334
|
+
const WRAPPER_PROBE_PROPS = [
|
|
335
|
+
'font-family',
|
|
336
|
+
'font-size',
|
|
337
|
+
'font-weight',
|
|
338
|
+
'font-style',
|
|
339
|
+
'line-height',
|
|
340
|
+
'letter-spacing',
|
|
341
|
+
'color',
|
|
342
|
+
];
|
|
343
|
+
/**
|
|
344
|
+
* Emit the host wrapper's computed typography as CSS custom properties
|
|
345
|
+
* on `:root`. The editor's `editor-styles.css` reads these via
|
|
346
|
+
* `var(--conloca-host-*)` on `[class*="_contentEditable_"]` to override
|
|
347
|
+
* MDXEditor's bundled typography (`color: var(--baseTextContrast)`,
|
|
348
|
+
* `font-family: var(--font-body)`).
|
|
349
|
+
*
|
|
350
|
+
* Why route through custom properties instead of styling the wrapper
|
|
351
|
+
* directly: MDXEditor's `._contentEditable_*` rule is unlayered, so any
|
|
352
|
+
* layered probe rule loses the cascade regardless of selector
|
|
353
|
+
* specificity. Custom properties inherit through cascade layers and can
|
|
354
|
+
* be consumed by an unlayered rule in `editor-styles.css`, which DOES
|
|
355
|
+
* compete on equal terms with MDXEditor and wins on specificity: it
|
|
356
|
+
* chains `.conloca-prose` for (0,2,0) against MDXEditor's (0,1,0).
|
|
357
|
+
* `@conloca/mdx/style.css` pulls MDXEditor's stylesheet in ahead of
|
|
358
|
+
* its own rules.
|
|
359
|
+
*
|
|
360
|
+
* Property names: short, namespaced under `--conloca-host-`. Map 1:1 to
|
|
361
|
+
* the inheritance-eligible typography properties that drive prose look.
|
|
362
|
+
*/
|
|
363
|
+
function probeWrapper(view, wrapper) {
|
|
364
|
+
const cs = view.getComputedStyle(wrapper);
|
|
365
|
+
const propMap = {
|
|
366
|
+
'font-family': '--conloca-host-font-family',
|
|
367
|
+
'font-size': '--conloca-host-font-size',
|
|
368
|
+
'font-weight': '--conloca-host-font-weight',
|
|
369
|
+
'font-style': '--conloca-host-font-style',
|
|
370
|
+
'line-height': '--conloca-host-line-height',
|
|
371
|
+
'letter-spacing': '--conloca-host-letter-spacing',
|
|
372
|
+
color: '--conloca-host-color',
|
|
373
|
+
};
|
|
374
|
+
const decls = [];
|
|
375
|
+
for (const prop of WRAPPER_PROBE_PROPS) {
|
|
376
|
+
const value = cs.getPropertyValue(prop);
|
|
377
|
+
if (value && value !== 'normal' && value !== 'none') {
|
|
378
|
+
decls.push(`${propMap[prop]}: ${value}`);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
if (decls.length === 0)
|
|
382
|
+
return '';
|
|
383
|
+
return `:root { ${decls.join('; ')}; }`;
|
|
384
|
+
}
|
|
385
|
+
function makeProbeEl(doc, tag) {
|
|
386
|
+
const el = doc.createElement(tag);
|
|
387
|
+
el.textContent = 'probe';
|
|
388
|
+
el.setAttribute('data-conloca-probe', 'true');
|
|
389
|
+
return el;
|
|
390
|
+
}
|
|
391
|
+
/** Properties that only carry meaning on list-container tags (ul, ol).
|
|
392
|
+
* Inherited by descendants but only renders a marker on actual list
|
|
393
|
+
* items — emitting it on every tag would override `<ol>`'s `decimal`
|
|
394
|
+
* with `<li>`'s inherited `disc` (since `li` is more specific to the
|
|
395
|
+
* rendered element), making ordered lists show bullets instead of
|
|
396
|
+
* numbers. Filtered out for any tag other than ul/ol. */
|
|
397
|
+
const LIST_STYLE_PROPS = new Set(['list-style-type', 'list-style-position']);
|
|
398
|
+
function generateRule(view, sample, tag) {
|
|
399
|
+
const cs = view.getComputedStyle(sample);
|
|
400
|
+
const decls = [];
|
|
401
|
+
const isListContainer = tag === 'ul' || tag === 'ol';
|
|
402
|
+
for (const prop of PROBE_PROPS) {
|
|
403
|
+
if (LIST_STYLE_PROPS.has(prop) && !isListContainer)
|
|
404
|
+
continue;
|
|
405
|
+
const value = cs.getPropertyValue(prop);
|
|
406
|
+
if (value && value !== 'normal' && value !== 'none') {
|
|
407
|
+
decls.push(`${prop}: ${value}`);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
if (decls.length === 0)
|
|
411
|
+
return '';
|
|
412
|
+
// Wrap the wrapper class in `:where()` so the selector has the same
|
|
413
|
+
// specificity as a bare element selector (0,0,1). Without :where(),
|
|
414
|
+
// `.conloca-prose--editor ol` has specificity (0,1,1) — higher than
|
|
415
|
+
// host component rules like `.sl-steps` (0,1,0), so the probe's
|
|
416
|
+
// "ol defaults" override component-specific styling on `<ol>`
|
|
417
|
+
// elements that carry component classes (Steps, Tabs, etc.).
|
|
418
|
+
// With :where() the probe acts as a defaults layer for BARE prose
|
|
419
|
+
// tags: any host class selector targeting the same element wins.
|
|
420
|
+
return `:where(.conloca-prose--editor) ${tag} { ${decls.join('; ')}; }`;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Probe an inline tag inside the given parent (a synthetic `<p>` from
|
|
424
|
+
* the caller). Inline tags need a paragraph context so font-size etc.
|
|
425
|
+
* inherit from the right place — otherwise an `<a>` found inside an
|
|
426
|
+
* `<h2>` would capture heading-sized text.
|
|
427
|
+
*/
|
|
428
|
+
function probeInlineTag(view, parent, tag) {
|
|
429
|
+
const doc = parent.ownerDocument;
|
|
430
|
+
const sample = makeProbeEl(doc, tag);
|
|
431
|
+
parent.appendChild(sample);
|
|
432
|
+
try {
|
|
433
|
+
return generateRule(view, sample, tag);
|
|
434
|
+
}
|
|
435
|
+
finally {
|
|
436
|
+
sample.remove();
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Build the reconstruction document for `{ srcdoc }` probing: the host's route
|
|
441
|
+
* CSS inlined, and an empty clone of its content wrapper for the probe's
|
|
442
|
+
* sample elements to be injected into. Nothing else — no shell, no scripts.
|
|
443
|
+
*/
|
|
444
|
+
export function buildProbeReconstruction(routeCss, wrapperClass) {
|
|
445
|
+
const wrapper = wrapperClass ? `<div class="${wrapperClass.replace(/"/g, '"')}"></div>` : '<main></main>';
|
|
446
|
+
// Neutralise a literal `</style` in the site's CSS. It is legal inside a
|
|
447
|
+
// `content:` string, and because a srcdoc frame inherits THIS origin, an
|
|
448
|
+
// early close would let the remainder parse as HTML in the app's own origin.
|
|
449
|
+
// Escaping the slash keeps the bytes valid CSS while making the sequence
|
|
450
|
+
// unable to terminate the element. Paired with the `sandbox` attribute in
|
|
451
|
+
// `probeHostStyles`: a document built from site CSS is a different trust
|
|
452
|
+
// boundary than this probe's original job of loading the site's own
|
|
453
|
+
// already-trusted page, so it gets belt and braces.
|
|
454
|
+
const inert = routeCss.replace(/<\/(style)/gi, '<\\/$1');
|
|
455
|
+
return `<!doctype html><html><head><meta charset="utf-8"><style>${inert}</style></head><body>${wrapper}</body></html>`;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Run a one-shot probe against `source`. Returns the generated stylesheet, or
|
|
459
|
+
* an empty string when the frame failed to load or there was nothing probable.
|
|
460
|
+
*
|
|
461
|
+
* `signal` lets the caller cancel a probe (eg the user navigated to
|
|
462
|
+
* a different page mid-fetch). Cleanup is best-effort.
|
|
463
|
+
*/
|
|
464
|
+
export function probeHostStyles(source, wrapperClass, theme, signal) {
|
|
465
|
+
return new Promise((resolve) => {
|
|
466
|
+
if (typeof document === 'undefined') {
|
|
467
|
+
resolve('');
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
const iframe = document.createElement('iframe');
|
|
471
|
+
// Width chosen so responsive prose styles resolve at their desktop
|
|
472
|
+
// tier (Starlight's `--sl-text-h2` etc. shift via media queries; a
|
|
473
|
+
// narrower probe captures the mobile-ish values which don't match
|
|
474
|
+
// what the editor's user actually sees). 1440px is a sane "desktop"
|
|
475
|
+
// default. The iframe is off-screen and hidden so width affects
|
|
476
|
+
// only CSS resolution, not user-visible layout.
|
|
477
|
+
iframe.style.cssText = 'position:absolute;left:-9999px;top:0;width:1440px;height:900px;visibility:hidden;border:0';
|
|
478
|
+
iframe.setAttribute('aria-hidden', 'true');
|
|
479
|
+
iframe.setAttribute('tabindex', '-1');
|
|
480
|
+
iframe.setAttribute('data-conloca-probe-iframe', '');
|
|
481
|
+
if ('srcdoc' in source) {
|
|
482
|
+
// `allow-same-origin` ONLY: `contentDocument` stays readable, which the
|
|
483
|
+
// probe needs, while no script in the reconstruction can execute. Applied
|
|
484
|
+
// to the srcdoc route alone — sandboxing the real-page route would stop
|
|
485
|
+
// the site's own scripts running and silently change what the
|
|
486
|
+
// same-origin probe measures, which is the path that already works.
|
|
487
|
+
iframe.setAttribute('sandbox', 'allow-same-origin');
|
|
488
|
+
iframe.srcdoc = source.srcdoc;
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
iframe.src = source.url;
|
|
492
|
+
}
|
|
493
|
+
let settled = false;
|
|
494
|
+
let timeout;
|
|
495
|
+
const cleanup = () => {
|
|
496
|
+
if (iframe.parentElement)
|
|
497
|
+
iframe.parentElement.removeChild(iframe);
|
|
498
|
+
};
|
|
499
|
+
const settle = (css) => {
|
|
500
|
+
if (settled)
|
|
501
|
+
return;
|
|
502
|
+
settled = true;
|
|
503
|
+
// Cancel the deadline as well. A superseded probe (re-render, theme or
|
|
504
|
+
// route change) is torn down through here and never fires `load`, so a
|
|
505
|
+
// surviving timer later reports a timeout for a probe that was already
|
|
506
|
+
// resolved and is no longer in flight.
|
|
507
|
+
if (timeout !== undefined)
|
|
508
|
+
window.clearTimeout(timeout);
|
|
509
|
+
cleanup();
|
|
510
|
+
resolve(css);
|
|
511
|
+
};
|
|
512
|
+
const abortHandler = () => settle('');
|
|
513
|
+
signal?.addEventListener('abort', abortHandler);
|
|
514
|
+
timeout = window.setTimeout(() => {
|
|
515
|
+
console.warn('[Conloca] Host style probe timed out for', 'srcdoc' in source ? '<reconstruction>' : source.url);
|
|
516
|
+
settle('');
|
|
517
|
+
}, IFRAME_TIMEOUT_MS);
|
|
518
|
+
iframe.addEventListener('load', () => {
|
|
519
|
+
window.clearTimeout(timeout);
|
|
520
|
+
// Force the iframe's theme to MATCH the editor's currently-active
|
|
521
|
+
// theme — not whatever the website's own theme provider resolved
|
|
522
|
+
// from its own localStorage key. The editor and the published
|
|
523
|
+
// page maintain independent theme preferences (the CMS SPA uses
|
|
524
|
+
// `conloca-theme`; Starlight uses `starlight-theme`), so by default
|
|
525
|
+
// the iframe paints in the website's last-saved scheme regardless
|
|
526
|
+
// of what the user is editing in. We override `data-theme` (and
|
|
527
|
+
// mirror as `.dark` class for Tailwind-style hosts) so the probe
|
|
528
|
+
// captures the scheme the editor is rendering, not the published
|
|
529
|
+
// page's stale scheme.
|
|
530
|
+
try {
|
|
531
|
+
const doc = iframe.contentDocument;
|
|
532
|
+
if (doc && theme) {
|
|
533
|
+
doc.documentElement.dataset.theme = theme;
|
|
534
|
+
doc.documentElement.classList.toggle('dark', theme === 'dark');
|
|
535
|
+
doc.documentElement.style.colorScheme = theme;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
catch (err) {
|
|
539
|
+
// Same-origin iframe access can throw if the dev server emitted
|
|
540
|
+
// a sandboxed page; swallow and proceed with the probe anyway —
|
|
541
|
+
// worst case we capture the website's default theme values.
|
|
542
|
+
console.warn('[Conloca] Could not set probe iframe theme:', err);
|
|
543
|
+
}
|
|
544
|
+
// Two rAFs: first lands us after layout, second after the
|
|
545
|
+
// browser has applied any deferred styles (web fonts, etc.) AND
|
|
546
|
+
// any theme-attribute change applied above has propagated through
|
|
547
|
+
// the cascade. 2× rAF is a common idiom for "next paint with
|
|
548
|
+
// fonts ready."
|
|
549
|
+
requestAnimationFrame(() => {
|
|
550
|
+
requestAnimationFrame(() => {
|
|
551
|
+
if (signal?.aborted) {
|
|
552
|
+
settle('');
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
try {
|
|
556
|
+
const doc = iframe.contentDocument;
|
|
557
|
+
if (!doc) {
|
|
558
|
+
settle('');
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
const css = buildProbeStylesheet(doc, wrapperClass);
|
|
562
|
+
settle(css);
|
|
563
|
+
}
|
|
564
|
+
catch (err) {
|
|
565
|
+
console.warn('[Conloca] Host style probe failed:', err);
|
|
566
|
+
settle('');
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
iframe.addEventListener('error', () => {
|
|
572
|
+
window.clearTimeout(timeout);
|
|
573
|
+
settle('');
|
|
574
|
+
});
|
|
575
|
+
document.body.appendChild(iframe);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* React hook wrapper. Re-probes whenever its inputs change (so dark/light
|
|
580
|
+
* swaps refresh the captured styles).
|
|
581
|
+
*
|
|
582
|
+
* `routeCss` selects the delivery route. When the registered route CSS is
|
|
583
|
+
* present — the site is on another origin, so its page cannot be read — the
|
|
584
|
+
* probe measures a same-origin reconstruction of it. Otherwise it measures the
|
|
585
|
+
* real page at `routeUrl`, which is the same-origin path and strictly better:
|
|
586
|
+
* real markup means utility classes and inline styles are observed.
|
|
587
|
+
*
|
|
588
|
+
* Returns both the stylesheet and whether the current inputs have settled
|
|
589
|
+
* once. Callers must gate fallback tiers on `settled`, not on `css === ''`:
|
|
590
|
+
* the empty string is the initial state AND the definitive "nothing probable"
|
|
591
|
+
* outcome, and treating them the same paints the derived tier then restyles
|
|
592
|
+
* when the probe lands.
|
|
593
|
+
*
|
|
594
|
+
* During a re-probe (theme toggle, route change) prior `css` stays visible
|
|
595
|
+
* and `settled` stays true until the new result arrives, so fallback tiers
|
|
596
|
+
* do not flash back in.
|
|
597
|
+
*/
|
|
598
|
+
export function useProbedHostStyles(routeUrl, wrapperClass, options = {}) {
|
|
599
|
+
const [css, setCss] = useState('');
|
|
600
|
+
const [settled, setSettled] = useState(false);
|
|
601
|
+
// Mirror of `css` for the effect body — reading state inside the effect
|
|
602
|
+
// would stale-close over the mount value and mis-handle re-probes.
|
|
603
|
+
const cssRef = useRef(css);
|
|
604
|
+
const theme = options.theme ?? null;
|
|
605
|
+
const routeCss = options.routeCss ?? '';
|
|
606
|
+
useEffect(() => {
|
|
607
|
+
const source = routeCss
|
|
608
|
+
? { srcdoc: buildProbeReconstruction(routeCss, wrapperClass) }
|
|
609
|
+
: routeUrl
|
|
610
|
+
? { url: routeUrl }
|
|
611
|
+
: null;
|
|
612
|
+
if (!source) {
|
|
613
|
+
cssRef.current = '';
|
|
614
|
+
setCss('');
|
|
615
|
+
setSettled(true);
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
// First probe / empty prior result: stay unsettled so callers hold off
|
|
619
|
+
// fallback tiers. Re-probe with prior css: keep both until the new result
|
|
620
|
+
// lands (theme toggles must not flash the derived tier back in).
|
|
621
|
+
if (!cssRef.current) {
|
|
622
|
+
setSettled(false);
|
|
623
|
+
}
|
|
624
|
+
const controller = new AbortController();
|
|
625
|
+
probeHostStyles(source, wrapperClass, theme, controller.signal).then((result) => {
|
|
626
|
+
if (controller.signal.aborted)
|
|
627
|
+
return;
|
|
628
|
+
cssRef.current = result;
|
|
629
|
+
setCss(result);
|
|
630
|
+
setSettled(true);
|
|
631
|
+
});
|
|
632
|
+
return () => {
|
|
633
|
+
controller.abort();
|
|
634
|
+
};
|
|
635
|
+
}, [routeUrl, routeCss, wrapperClass, theme]);
|
|
636
|
+
return { css, settled };
|
|
637
|
+
}
|
|
638
|
+
//# sourceMappingURL=host-style-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-style-probe.js","sourceRoot":"","sources":["../../src/host-style-probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;;;;;;;yEAYyE;AACzE,MAAM,gBAAgB,GAAG;IACvB,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,YAAY;IACZ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;CACI,CAAC;AACX,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AAEjE;;;;iBAIiB;AACjB,MAAM,WAAW,GAAG;IAClB,aAAa;IACb,WAAW;IACX,aAAa;IACb,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,OAAO;IACP,kBAAkB;IAClB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;IACtB,oBAAoB;IACpB,eAAe;IACf,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,2BAA2B;IAC3B,uBAAuB;IACvB,iBAAiB;IACjB,qBAAqB;CACb,CAAC;AAEX,MAAM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