@conloca/cms-spa 0.1.15 → 0.1.16
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/dist/App-Bk1LNxbS.mjs +10851 -0
- package/dist/App-Bk1LNxbS.mjs.map +1 -0
- package/dist/App.d.ts +35 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +52 -0
- package/dist/CmsSpaApp.d.ts +13 -0
- package/dist/CmsSpaApp.d.ts.map +1 -0
- package/dist/CmsSpaApp.js +33 -0
- package/dist/cn-dlASUkDY.mjs +10 -0
- package/dist/cn-dlASUkDY.mjs.map +1 -0
- package/dist/components/CMSDashboard.d.ts +2 -0
- package/dist/components/CMSDashboard.d.ts.map +1 -0
- package/dist/components/CMSDashboard.js +20 -0
- package/dist/components/CMSLayout.d.ts +2 -0
- package/dist/components/CMSLayout.d.ts.map +1 -0
- package/dist/components/CMSLayout.js +15 -0
- package/dist/components/ConlocaLogo.d.ts +2 -0
- package/dist/components/ConlocaLogo.d.ts.map +1 -0
- package/dist/components/ConlocaLogo.js +4 -0
- package/dist/components/GitStatusPanel.d.ts +25 -0
- package/dist/components/GitStatusPanel.d.ts.map +1 -0
- package/dist/components/GitStatusPanel.js +77 -0
- package/dist/components/MobileTopBar.d.ts +6 -0
- package/dist/components/MobileTopBar.d.ts.map +1 -0
- package/dist/components/MobileTopBar.js +6 -0
- package/dist/components/Sidebar.d.ts +8 -0
- package/dist/components/Sidebar.d.ts.map +1 -0
- package/dist/components/Sidebar.js +40 -0
- package/dist/components/UserAvatar.d.ts +2 -0
- package/dist/components/UserAvatar.d.ts.map +1 -0
- package/dist/components/UserAvatar.js +14 -0
- package/dist/components/cards/DataEntryCard.d.ts +14 -0
- package/dist/components/cards/DataEntryCard.d.ts.map +1 -0
- package/dist/components/cards/DataEntryCard.js +32 -0
- package/dist/components/cards/SectionCard.d.ts +15 -0
- package/dist/components/cards/SectionCard.d.ts.map +1 -0
- package/dist/components/cards/SectionCard.js +10 -0
- package/dist/components/cards/index.d.ts +2 -0
- package/dist/components/cards/index.d.ts.map +1 -0
- package/dist/components/cards/index.js +1 -0
- package/dist/components/dashboard/RecentActivity.d.ts +2 -0
- package/dist/components/dashboard/RecentActivity.d.ts.map +1 -0
- package/dist/components/dashboard/RecentActivity.js +58 -0
- package/dist/components/dialog.d.ts +53 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +56 -0
- package/dist/components/dialogs/BlockPropertiesDialog.d.ts +12 -0
- package/dist/components/dialogs/BlockPropertiesDialog.d.ts.map +1 -0
- package/dist/components/dialogs/BlockPropertiesDialog.js +42 -0
- package/dist/components/dialogs/ConflictDialog.d.ts +10 -0
- package/dist/components/dialogs/ConflictDialog.d.ts.map +1 -0
- package/dist/components/dialogs/ConflictDialog.js +29 -0
- package/dist/components/dialogs/CreateDataDialog.d.ts +9 -0
- package/dist/components/dialogs/CreateDataDialog.d.ts.map +1 -0
- package/dist/components/dialogs/CreateDataDialog.js +20 -0
- package/dist/components/dialogs/CreateFolderDialog.d.ts +9 -0
- package/dist/components/dialogs/CreateFolderDialog.d.ts.map +1 -0
- package/dist/components/dialogs/CreateFolderDialog.js +33 -0
- package/dist/components/dialogs/CreatePageDialog.d.ts +10 -0
- package/dist/components/dialogs/CreatePageDialog.d.ts.map +1 -0
- package/dist/components/dialogs/CreatePageDialog.js +155 -0
- package/dist/components/dialogs/DataPropertiesDialog.d.ts +10 -0
- package/dist/components/dialogs/DataPropertiesDialog.d.ts.map +1 -0
- package/dist/components/dialogs/DataPropertiesDialog.js +38 -0
- package/dist/components/dialogs/DeleteConfirmDialog.d.ts +12 -0
- package/dist/components/dialogs/DeleteConfirmDialog.d.ts.map +1 -0
- package/dist/components/dialogs/DeleteConfirmDialog.js +7 -0
- package/dist/components/dialogs/ErrorModal.d.ts +14 -0
- package/dist/components/dialogs/ErrorModal.d.ts.map +1 -0
- package/dist/components/dialogs/ErrorModal.js +38 -0
- package/dist/components/dialogs/MoveFolderDialog.d.ts +11 -0
- package/dist/components/dialogs/MoveFolderDialog.d.ts.map +1 -0
- package/dist/components/dialogs/MoveFolderDialog.js +45 -0
- package/dist/components/dialogs/PageMetadataDialog.d.ts +10 -0
- package/dist/components/dialogs/PageMetadataDialog.d.ts.map +1 -0
- package/dist/components/dialogs/PageMetadataDialog.js +85 -0
- package/dist/components/dialogs/UnsavedChangesDialog.d.ts +8 -0
- package/dist/components/dialogs/UnsavedChangesDialog.d.ts.map +1 -0
- package/dist/components/dialogs/UnsavedChangesDialog.js +6 -0
- package/dist/components/dialogs/index.d.ts +9 -0
- package/dist/components/dialogs/index.d.ts.map +1 -0
- package/dist/components/dialogs/index.js +8 -0
- package/dist/components/editor/BlockEditor.d.ts +8 -0
- package/dist/components/editor/BlockEditor.d.ts.map +1 -0
- package/dist/components/editor/BlockEditor.js +262 -0
- package/dist/components/editor/BlockWrappers.d.ts +15 -0
- package/dist/components/editor/BlockWrappers.d.ts.map +1 -0
- package/dist/components/editor/BlockWrappers.js +29 -0
- package/dist/components/editor/CMSMDXEditor.d.ts +13 -0
- package/dist/components/editor/CMSMDXEditor.d.ts.map +1 -0
- package/dist/components/editor/CMSMDXEditor.js +123 -0
- package/dist/components/editor/ContentDiff.d.ts +10 -0
- package/dist/components/editor/ContentDiff.d.ts.map +1 -0
- package/dist/components/editor/ContentDiff.js +51 -0
- package/dist/components/editor/CreateBlockDialog.d.ts +26 -0
- package/dist/components/editor/CreateBlockDialog.d.ts.map +1 -0
- package/dist/components/editor/CreateBlockDialog.js +131 -0
- package/dist/components/editor/DrawerItemOverride.d.ts +8 -0
- package/dist/components/editor/DrawerItemOverride.d.ts.map +1 -0
- package/dist/components/editor/DrawerItemOverride.js +41 -0
- package/dist/components/editor/EditorChromeToggles.d.ts +16 -0
- package/dist/components/editor/EditorChromeToggles.d.ts.map +1 -0
- package/dist/components/editor/EditorChromeToggles.js +16 -0
- package/dist/components/editor/GenericBlock.d.ts +3 -0
- package/dist/components/editor/GenericBlock.d.ts.map +1 -0
- package/dist/components/editor/GenericBlock.js +1067 -0
- package/dist/components/editor/ImagePickerDialog.d.ts +6 -0
- package/dist/components/editor/ImagePickerDialog.d.ts.map +1 -0
- package/dist/components/editor/ImagePickerDialog.js +24 -0
- package/dist/components/editor/JsxPropsPanel.d.ts +16 -0
- package/dist/components/editor/JsxPropsPanel.d.ts.map +1 -0
- package/dist/components/editor/JsxPropsPanel.js +145 -0
- package/dist/components/editor/LocaleSelector.d.ts +9 -0
- package/dist/components/editor/LocaleSelector.d.ts.map +1 -0
- package/dist/components/editor/LocaleSelector.js +13 -0
- package/dist/components/editor/MDXLivePreview.d.ts +14 -0
- package/dist/components/editor/MDXLivePreview.d.ts.map +1 -0
- package/dist/components/editor/MDXLivePreview.js +103 -0
- package/dist/components/editor/MdxPageEditor.d.ts +10 -0
- package/dist/components/editor/MdxPageEditor.d.ts.map +1 -0
- package/dist/components/editor/MdxPageEditor.js +297 -0
- package/dist/components/editor/PageEditor.d.ts +18 -0
- package/dist/components/editor/PageEditor.d.ts.map +1 -0
- package/dist/components/editor/PageEditor.js +288 -0
- package/dist/components/editor/PageEditorHeaderActions.d.ts +16 -0
- package/dist/components/editor/PageEditorHeaderActions.d.ts.map +1 -0
- package/dist/components/editor/PageEditorHeaderActions.js +19 -0
- package/dist/components/editor/PageEditorWrapper.d.ts +7 -0
- package/dist/components/editor/PageEditorWrapper.d.ts.map +1 -0
- package/dist/components/editor/PageEditorWrapper.js +319 -0
- package/dist/components/editor/SearchableSelect.d.ts +34 -0
- package/dist/components/editor/SearchableSelect.d.ts.map +1 -0
- package/dist/components/editor/SearchableSelect.js +116 -0
- package/dist/components/editor/host-wrapper-plugin.d.ts +51 -0
- package/dist/components/editor/host-wrapper-plugin.d.ts.map +1 -0
- package/dist/components/editor/host-wrapper-plugin.js +37 -0
- package/dist/components/editor/index.d.ts +9 -0
- package/dist/components/editor/index.d.ts.map +1 -0
- package/dist/components/editor/index.js +7 -0
- package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts +15 -0
- package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +1 -0
- package/dist/components/editor/insert-menu/InsertMdxComponentButton.js +90 -0
- package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts +12 -0
- package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +1 -0
- package/dist/components/editor/insert-menu/SlashMenuPlugin.js +106 -0
- package/dist/components/editor/insert-menu/insert-payload.d.ts +76 -0
- package/dist/components/editor/insert-menu/insert-payload.d.ts.map +1 -0
- package/dist/components/editor/insert-menu/insert-payload.js +94 -0
- package/dist/components/editor/insert-menu/mdx-components-plugin.d.ts +8 -0
- package/dist/components/editor/insert-menu/mdx-components-plugin.d.ts.map +1 -0
- package/dist/components/editor/insert-menu/mdx-components-plugin.js +13 -0
- package/dist/components/editors/DataEditor.d.ts +19 -0
- package/dist/components/editors/DataEditor.d.ts.map +1 -0
- package/dist/components/editors/DataEditor.js +139 -0
- package/dist/components/fields/ContentBlockSelectorField.d.ts +14 -0
- package/dist/components/fields/ContentBlockSelectorField.d.ts.map +1 -0
- package/dist/components/fields/ContentBlockSelectorField.js +105 -0
- package/dist/components/fields/ImageField.d.ts +16 -0
- package/dist/components/fields/ImageField.d.ts.map +1 -0
- package/dist/components/fields/ImageField.js +39 -0
- package/dist/components/fields/MDXEditField.d.ts +17 -0
- package/dist/components/fields/MDXEditField.d.ts.map +1 -0
- package/dist/components/fields/MDXEditField.js +28 -0
- package/dist/components/forms/ChipArrayField.d.ts +12 -0
- package/dist/components/forms/ChipArrayField.d.ts.map +1 -0
- package/dist/components/forms/ChipArrayField.js +40 -0
- package/dist/components/forms/HintForm.d.ts +22 -0
- package/dist/components/forms/HintForm.d.ts.map +1 -0
- package/dist/components/forms/HintForm.js +162 -0
- package/dist/components/forms/SchemaForm.d.ts +15 -0
- package/dist/components/forms/SchemaForm.d.ts.map +1 -0
- package/dist/components/forms/SchemaForm.js +106 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +13 -0
- package/dist/components/media/AssetCard.d.ts +14 -0
- package/dist/components/media/AssetCard.d.ts.map +1 -0
- package/dist/components/media/AssetCard.js +31 -0
- package/dist/components/media/AssetDetailSidebar.d.ts +11 -0
- package/dist/components/media/AssetDetailSidebar.d.ts.map +1 -0
- package/dist/components/media/AssetDetailSidebar.js +101 -0
- package/dist/components/media/BulkActionBar.d.ts +9 -0
- package/dist/components/media/BulkActionBar.d.ts.map +1 -0
- package/dist/components/media/BulkActionBar.js +8 -0
- package/dist/components/media/FolderNav.d.ts +7 -0
- package/dist/components/media/FolderNav.d.ts.map +1 -0
- package/dist/components/media/FolderNav.js +12 -0
- package/dist/components/media/FolderTreeSidebar.d.ts +9 -0
- package/dist/components/media/FolderTreeSidebar.d.ts.map +1 -0
- package/dist/components/media/FolderTreeSidebar.js +41 -0
- package/dist/components/media/ImagePicker.d.ts +14 -0
- package/dist/components/media/ImagePicker.d.ts.map +1 -0
- package/dist/components/media/ImagePicker.js +45 -0
- package/dist/components/media/MediaLibrary.d.ts +35 -0
- package/dist/components/media/MediaLibrary.d.ts.map +1 -0
- package/dist/components/media/MediaLibrary.js +100 -0
- package/dist/components/media/MediaToolbar.d.ts +21 -0
- package/dist/components/media/MediaToolbar.d.ts.map +1 -0
- package/dist/components/media/MediaToolbar.js +6 -0
- package/dist/components/media/UploadModal.d.ts +9 -0
- package/dist/components/media/UploadModal.d.ts.map +1 -0
- package/dist/components/media/UploadModal.js +42 -0
- package/dist/components/media/UploadZone.d.ts +8 -0
- package/dist/components/media/UploadZone.d.ts.map +1 -0
- package/dist/components/media/UploadZone.js +22 -0
- package/dist/components/media/index.d.ts +11 -0
- package/dist/components/media/index.d.ts.map +1 -0
- package/dist/components/media/index.js +10 -0
- package/dist/components/pages/BlockList.d.ts +2 -0
- package/dist/components/pages/BlockList.d.ts.map +1 -0
- package/dist/components/pages/BlockList.js +280 -0
- package/dist/components/pages/DataList.d.ts +7 -0
- package/dist/components/pages/DataList.d.ts.map +1 -0
- package/dist/components/pages/DataList.js +244 -0
- package/dist/components/pages/MediaPage.d.ts +8 -0
- package/dist/components/pages/MediaPage.d.ts.map +1 -0
- package/dist/components/pages/MediaPage.js +107 -0
- package/dist/components/pages/PageList.d.ts +7 -0
- package/dist/components/pages/PageList.d.ts.map +1 -0
- package/dist/components/pages/PageList.js +308 -0
- package/dist/components/pages/index.d.ts +3 -0
- package/dist/components/pages/index.d.ts.map +1 -0
- package/dist/components/pages/index.js +2 -0
- package/dist/components/puck/MDXContent.d.ts +10 -0
- package/dist/components/puck/MDXContent.d.ts.map +1 -0
- package/dist/components/puck/MDXContent.js +80 -0
- package/dist/components/puck/index.d.ts +2 -0
- package/dist/components/puck/index.d.ts.map +1 -0
- package/dist/components/puck/index.js +1 -0
- package/dist/components/toast.d.ts +44 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +7 -0
- package/dist/components/ui/Banner.d.ts +76 -0
- package/dist/components/ui/Banner.d.ts.map +1 -0
- package/dist/components/ui/Banner.js +49 -0
- package/dist/components/ui/Button.d.ts +25 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/Button.js +33 -0
- package/dist/components/ui/Card.d.ts +72 -0
- package/dist/components/ui/Card.d.ts.map +1 -0
- package/dist/components/ui/Card.js +49 -0
- package/dist/components/ui/FieldError.d.ts +24 -0
- package/dist/components/ui/FieldError.d.ts.map +1 -0
- package/dist/components/ui/FieldError.js +17 -0
- package/dist/components/ui/IconButton.d.ts +13 -0
- package/dist/components/ui/IconButton.d.ts.map +1 -0
- package/dist/components/ui/IconButton.js +10 -0
- package/dist/components/ui/Input.d.ts +37 -0
- package/dist/components/ui/Input.d.ts.map +1 -0
- package/dist/components/ui/Input.js +9 -0
- package/dist/components/ui/SaveIndicator.d.ts +8 -0
- package/dist/components/ui/SaveIndicator.d.ts.map +1 -0
- package/dist/components/ui/SaveIndicator.js +32 -0
- package/dist/components/ui/Select.d.ts +8 -0
- package/dist/components/ui/Select.d.ts.map +1 -0
- package/dist/components/ui/Select.js +9 -0
- package/dist/components/ui/Separator.d.ts +7 -0
- package/dist/components/ui/Separator.d.ts.map +1 -0
- package/dist/components/ui/Separator.js +8 -0
- package/dist/components/ui/Textarea.d.ts +8 -0
- package/dist/components/ui/Textarea.d.ts.map +1 -0
- package/dist/components/ui/Textarea.js +5 -0
- package/dist/components/ui/Tooltip.d.ts +9 -0
- package/dist/components/ui/Tooltip.d.ts.map +1 -0
- package/dist/components/ui/Tooltip.js +7 -0
- package/dist/components/ui/index.d.ts +14 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +17 -0
- package/dist/data-schemas.d.mts +0 -1
- package/dist/data-schemas.d.mts.map +1 -1
- package/dist/data-schemas.d.ts +22 -0
- package/dist/data-schemas.d.ts.map +1 -0
- package/dist/data-schemas.js +51 -0
- package/dist/data-schemas.mjs +3 -4
- package/dist/data-schemas.mjs.map +1 -1
- package/dist/dev-entry.d.ts +2 -0
- package/dist/dev-entry.d.ts.map +1 -0
- package/dist/dev-entry.js +19 -0
- package/dist/dialog.d.mts +56 -0
- package/dist/dialog.d.mts.map +1 -0
- package/dist/dialog.mjs +67 -0
- package/dist/dialog.mjs.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/useCanvasTheme.d.ts +12 -0
- package/dist/hooks/useCanvasTheme.d.ts.map +1 -0
- package/dist/hooks/useCanvasTheme.js +33 -0
- package/dist/hooks/useClickOutside.d.ts +7 -0
- package/dist/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useClickOutside.js +18 -0
- package/dist/hooks/useDialogState.d.ts +23 -0
- package/dist/hooks/useDialogState.d.ts.map +1 -0
- package/dist/hooks/useDialogState.js +31 -0
- package/dist/hooks/useEditorPref.d.ts +2 -0
- package/dist/hooks/useEditorPref.d.ts.map +1 -0
- package/dist/hooks/useEditorPref.js +49 -0
- package/dist/hooks/useErrorModal.d.ts +15 -0
- package/dist/hooks/useErrorModal.d.ts.map +1 -0
- package/dist/hooks/useErrorModal.js +35 -0
- package/dist/hooks/useSiteBaseUrl.d.ts +10 -0
- package/dist/hooks/useSiteBaseUrl.d.ts.map +1 -0
- package/dist/hooks/useSiteBaseUrl.js +14 -0
- package/dist/hooks/useTheme.d.ts +13 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/hooks/useTheme.js +69 -0
- package/dist/hooks/useUnsavedChangesGuard.d.ts +16 -0
- package/dist/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/dist/hooks/useUnsavedChangesGuard.js +29 -0
- package/dist/hooks/useUpload.d.ts +10 -0
- package/dist/hooks/useUpload.d.ts.map +1 -0
- package/dist/hooks/useUpload.js +42 -0
- package/dist/hooks/useUploadFlow.d.ts +42 -0
- package/dist/hooks/useUploadFlow.d.ts.map +1 -0
- package/dist/hooks/useUploadFlow.js +148 -0
- package/dist/host-style-probe.d.ts +22 -0
- package/dist/host-style-probe.d.ts.map +1 -0
- package/dist/host-style-probe.js +508 -0
- package/dist/index.d.mts +167 -39
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.mjs +36 -2
- package/dist/index.mjs.map +1 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +47 -0
- package/dist/main-spa-781YUplS.mjs +46 -0
- package/dist/main-spa-781YUplS.mjs.map +1 -0
- package/dist/main-spa.d.ts +8 -0
- package/dist/main-spa.d.ts.map +1 -0
- package/dist/main-spa.js +61 -0
- package/dist/main.d.mts +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +13 -0
- package/dist/main.mjs +11 -5681
- package/dist/main.mjs.map +1 -1
- package/dist/mdx-components.d.mts +207 -0
- package/dist/mdx-components.d.mts.map +1 -0
- package/dist/mdx-components.d.ts +204 -0
- package/dist/mdx-components.d.ts.map +1 -0
- package/dist/mdx-components.js +217 -0
- package/dist/mdx-components.mjs +208 -0
- package/dist/mdx-components.mjs.map +1 -0
- package/dist/media/AssetScopePill.d.ts +30 -0
- package/dist/media/AssetScopePill.d.ts.map +1 -0
- package/dist/media/AssetScopePill.js +30 -0
- package/dist/media/MediaIssueBadge.d.ts +33 -0
- package/dist/media/MediaIssueBadge.d.ts.map +1 -0
- package/dist/media/MediaIssueBadge.js +54 -0
- package/dist/media/types.d.ts +101 -0
- package/dist/media/types.d.ts.map +1 -0
- package/dist/media/types.js +1 -0
- package/dist/media/use-asset-scope.d.ts +25 -0
- package/dist/media/use-asset-scope.d.ts.map +1 -0
- package/dist/media/use-asset-scope.js +54 -0
- package/dist/media/use-media-issue.d.ts +24 -0
- package/dist/media/use-media-issue.d.ts.map +1 -0
- package/dist/media/use-media-issue.js +49 -0
- package/dist/mock-puck-config.d.mts +23 -0
- package/dist/mock-puck-config.d.mts.map +1 -0
- package/dist/mock-puck-config.d.ts +21 -0
- package/dist/mock-puck-config.d.ts.map +1 -0
- package/dist/mock-puck-config.js +73 -0
- package/dist/mock-puck-config.mjs +125 -0
- package/dist/mock-puck-config.mjs.map +1 -0
- package/dist/page-schemas.d.mts +139 -6
- package/dist/page-schemas.d.mts.map +1 -1
- package/dist/page-schemas.d.ts +156 -0
- package/dist/page-schemas.d.ts.map +1 -0
- package/dist/page-schemas.js +118 -0
- package/dist/page-schemas.mjs +74 -6
- package/dist/page-schemas.mjs.map +1 -1
- package/dist/puck-config.d.mts +0 -1
- package/dist/puck-config.d.mts.map +1 -1
- package/dist/puck-config.d.ts +31 -0
- package/dist/puck-config.d.ts.map +1 -0
- package/dist/puck-config.js +50 -0
- package/dist/puck-config.mjs +3 -4
- package/dist/puck-config.mjs.map +1 -1
- package/dist/selected-block.d.ts +61 -0
- package/dist/selected-block.d.ts.map +1 -0
- package/dist/selected-block.js +64 -0
- package/dist/site-styles.d.mts +90 -8
- package/dist/site-styles.d.mts.map +1 -1
- package/dist/site-styles.d.ts +121 -0
- package/dist/site-styles.d.ts.map +1 -0
- package/dist/site-styles.js +253 -0
- package/dist/site-styles.mjs +187 -5
- package/dist/site-styles.mjs.map +1 -1
- package/dist/spa/main.css +690 -127
- package/dist/toast.d.mts +7 -0
- package/dist/toast.d.mts.map +1 -0
- package/dist/toast.mjs +16 -0
- package/dist/toast.mjs.map +1 -0
- package/dist/types.d.ts +57 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/ui-CIacC6Mv.mjs +318 -0
- package/dist/ui-CIacC6Mv.mjs.map +1 -0
- package/dist/ui-config.d.ts +70 -0
- package/dist/ui-config.d.ts.map +1 -0
- package/dist/ui-config.js +44 -0
- package/dist/ui.d.mts +290 -0
- package/dist/ui.d.mts.map +1 -0
- package/dist/ui.mjs +2 -0
- package/dist/utils/asset-url.d.ts +3 -0
- package/dist/utils/asset-url.d.ts.map +1 -0
- package/dist/utils/asset-url.js +7 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +5 -0
- package/dist/utils/format-date.d.ts +15 -0
- package/dist/utils/format-date.d.ts.map +1 -0
- package/dist/utils/format-date.js +37 -0
- package/dist/utils/mdast-to-html.d.ts +55 -0
- package/dist/utils/mdast-to-html.d.ts.map +1 -0
- package/dist/utils/mdast-to-html.js +206 -0
- package/dist/utils/mdast-tree.d.ts +104 -0
- package/dist/utils/mdast-tree.d.ts.map +1 -0
- package/dist/utils/mdast-tree.js +285 -0
- package/dist/utils/pageMetadata.d.ts +67 -0
- package/dist/utils/pageMetadata.d.ts.map +1 -0
- package/dist/utils/pageMetadata.js +161 -0
- package/dist/utils/slugify.d.ts +12 -0
- package/dist/utils/slugify.d.ts.map +1 -0
- package/dist/utils/slugify.js +17 -0
- package/dist/utils/zodIntrospect.d.ts +24 -0
- package/dist/utils/zodIntrospect.d.ts.map +1 -0
- package/dist/utils/zodIntrospect.js +88 -0
- package/package.json +148 -35
- package/styles/styles.css.d.ts +2 -0
- package/styles/tailwind-theme.css +126 -0
- package/styles/tailwind-theme.css.d.ts +2 -0
- package/dist/puck-C9_F3_cJ.mjs +0 -1589
- package/dist/puck-C9_F3_cJ.mjs.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// IMPORTANT: Import gurx hooks from @mdxeditor/editor, NOT from @mdxeditor/gurx directly.
|
|
3
|
+
// @mdxeditor/editor re-exports gurx, and using that ensures we get the same module instance
|
|
4
|
+
// as the editor internals, avoiding React context isolation issues.
|
|
5
|
+
import { usePublisher } from '@mdxeditor/editor';
|
|
6
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
7
|
+
import { Plus } from 'lucide-react';
|
|
8
|
+
import { useMemo } from 'react';
|
|
9
|
+
import { useMdxComponents } from '../../../mdx-components';
|
|
10
|
+
import { dispatchInsert, insertJsx$, insertMarkdown$ } from './insert-payload';
|
|
11
|
+
/**
|
|
12
|
+
* Group descriptors by `insert.category`. Descriptors with no category land
|
|
13
|
+
* in the leading ungrouped bucket so the dropdown still feels flat when no
|
|
14
|
+
* host opts into grouping. Insertion order within a group is preserved so
|
|
15
|
+
* hosts can hand-curate the visible ordering instead of inheriting alphabetical.
|
|
16
|
+
*/
|
|
17
|
+
function groupByCategory(descriptors) {
|
|
18
|
+
const groups = new Map();
|
|
19
|
+
for (const d of descriptors) {
|
|
20
|
+
const category = d.insert?.category ?? '';
|
|
21
|
+
const bucket = groups.get(category);
|
|
22
|
+
if (bucket) {
|
|
23
|
+
bucket.push(d);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
groups.set(category, [d]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// Stable order: ungrouped first (matches the previous flat behavior),
|
|
30
|
+
// then categories in first-seen order.
|
|
31
|
+
const result = [];
|
|
32
|
+
const ungrouped = groups.get('');
|
|
33
|
+
if (ungrouped)
|
|
34
|
+
result.push({ category: '', descriptors: ungrouped });
|
|
35
|
+
for (const [category, items] of groups) {
|
|
36
|
+
if (category === '')
|
|
37
|
+
continue;
|
|
38
|
+
result.push({ category, descriptors: items });
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Toolbar dropdown that inserts registered MDX components and snippets.
|
|
44
|
+
* Mirrors the slash menu but lists only block-level entries:
|
|
45
|
+
*
|
|
46
|
+
* - JSX descriptors with `kind: 'flow'` (inline `kind: 'text'` components
|
|
47
|
+
* like `<Icon>` are only reachable via the slash menu, since toolbar
|
|
48
|
+
* inserts are always block-level).
|
|
49
|
+
* - Snippet descriptors (always block-level; snippets are raw MDX, not
|
|
50
|
+
* inline atoms).
|
|
51
|
+
*
|
|
52
|
+
* Entries are grouped by `insert.category` so a host that registers both
|
|
53
|
+
* components and snippets sees them sectioned (e.g. "Components" / "Patterns").
|
|
54
|
+
*/
|
|
55
|
+
export function InsertMdxComponentButton() {
|
|
56
|
+
const allComponents = useMdxComponents();
|
|
57
|
+
const publishJsx = usePublisher(insertJsx$);
|
|
58
|
+
const publishMarkdown = usePublisher(insertMarkdown$);
|
|
59
|
+
const groups = useMemo(() => {
|
|
60
|
+
const visible = allComponents
|
|
61
|
+
.filter((d) => {
|
|
62
|
+
// Inline JSX (kind: 'text') is hidden from the toolbar because a
|
|
63
|
+
// block-level toolbar click would force the cursor out of its
|
|
64
|
+
// paragraph context. The slash menu handles inline insertion.
|
|
65
|
+
if (d.kind === 'text')
|
|
66
|
+
return false;
|
|
67
|
+
// Block-level (flow + snippet) descriptors are insertable by
|
|
68
|
+
// default. Hosts opt out by setting `insert: undefined` after
|
|
69
|
+
// discovery — but the auto-discover pipeline doesn't bother
|
|
70
|
+
// populating `insert` (sensible — every flow component should
|
|
71
|
+
// be insertable). Synthesizing a default below keeps the
|
|
72
|
+
// dropdown populated without server-side glue.
|
|
73
|
+
return true;
|
|
74
|
+
})
|
|
75
|
+
.map((d) => d.insert
|
|
76
|
+
? d
|
|
77
|
+
: {
|
|
78
|
+
...d,
|
|
79
|
+
insert: { label: d.name, category: d.kind === 'flow' ? 'Components' : 'Patterns' },
|
|
80
|
+
});
|
|
81
|
+
return groupByCategory(visible.slice());
|
|
82
|
+
}, [allComponents]);
|
|
83
|
+
const total = groups.reduce((n, g) => n + g.descriptors.length, 0);
|
|
84
|
+
if (total === 0)
|
|
85
|
+
return null;
|
|
86
|
+
const onSelect = (descriptor) => {
|
|
87
|
+
dispatchInsert(descriptor, { jsx: publishJsx, markdown: publishMarkdown });
|
|
88
|
+
};
|
|
89
|
+
return (_jsxs(DropdownMenu.Root, { children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "Insert component", title: "Insert component", className: "inline-flex items-center justify-center h-7 w-7 rounded hover:bg-hover", children: _jsx(Plus, { size: 16, "aria-hidden": true }) }) }), _jsx(DropdownMenu.Portal, { children: _jsx(DropdownMenu.Content, { sideOffset: 4, align: "start", className: "z-50 min-w-[14rem] max-h-72 overflow-auto rounded-md border border-line bg-panel shadow-md py-1 text-sm text-foreground", children: groups.map((group, groupIndex) => (_jsxs("div", { children: [group.category ? (_jsx(DropdownMenu.Label, { className: "px-3 pt-2 pb-1 text-[10px] uppercase tracking-wide text-muted", children: group.category })) : null, group.descriptors.map((descriptor) => (_jsxs(DropdownMenu.Item, { onSelect: () => onSelect(descriptor), className: "block px-3 py-1.5 cursor-default outline-none data-[highlighted]:bg-selected", children: [_jsx("div", { className: "font-medium", children: descriptor.insert?.label ?? descriptor.name }), descriptor.insert?.description ? (_jsx("div", { className: "text-xs text-muted", children: descriptor.insert.description })) : null] }, descriptor.name))), groupIndex < groups.length - 1 ? _jsx(DropdownMenu.Separator, { className: "my-1 h-px bg-hover" }) : null] }, group.category || '__ungrouped__'))) }) })] }));
|
|
90
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slash menu for inserting registered MDX components and snippets.
|
|
3
|
+
*
|
|
4
|
+
* Triggers on `/` (via `useBasicTypeaheadTriggerMatch`). The query filters
|
|
5
|
+
* descriptors by name, label, description, and keywords. JSX descriptors
|
|
6
|
+
* route through `insertJsx$` (typed Lexical decorator node); snippet
|
|
7
|
+
* descriptors route through `insertMarkdown$` (raw MDX spliced at the
|
|
8
|
+
* cursor). Categories are intentionally ignored here — typeahead works
|
|
9
|
+
* better as a flat list than as nested sections.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SlashMenuPlugin(): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
//# sourceMappingURL=SlashMenuPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashMenuPlugin.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/insert-menu/SlashMenuPlugin.tsx"],"names":[],"mappings":"AAgCA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,mDA6G9B"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
3
|
+
import { LexicalTypeaheadMenuPlugin, MenuOption, useBasicTypeaheadTriggerMatch, } from '@lexical/react/LexicalTypeaheadMenuPlugin';
|
|
4
|
+
import { usePublisher } from '@mdxeditor/editor';
|
|
5
|
+
import { useCallback, useContext, useMemo, useState } from 'react';
|
|
6
|
+
import { createPortal } from 'react-dom';
|
|
7
|
+
import { useMdxComponents } from '../../../mdx-components';
|
|
8
|
+
import { dispatchInsert, insertJsx$, insertMarkdown$ } from './insert-payload';
|
|
9
|
+
class MdxComponentOption extends MenuOption {
|
|
10
|
+
descriptor;
|
|
11
|
+
constructor(descriptor) {
|
|
12
|
+
super(descriptor.name);
|
|
13
|
+
this.descriptor = descriptor;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function matchesQuery(descriptor, query) {
|
|
17
|
+
if (!query)
|
|
18
|
+
return true;
|
|
19
|
+
const q = query.toLowerCase();
|
|
20
|
+
const haystack = [
|
|
21
|
+
descriptor.name,
|
|
22
|
+
descriptor.insert?.label ?? '',
|
|
23
|
+
descriptor.insert?.description ?? '',
|
|
24
|
+
...(descriptor.insert?.keywords ?? []),
|
|
25
|
+
]
|
|
26
|
+
.join(' ')
|
|
27
|
+
.toLowerCase();
|
|
28
|
+
return haystack.includes(q);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Slash menu for inserting registered MDX components and snippets.
|
|
32
|
+
*
|
|
33
|
+
* Triggers on `/` (via `useBasicTypeaheadTriggerMatch`). The query filters
|
|
34
|
+
* descriptors by name, label, description, and keywords. JSX descriptors
|
|
35
|
+
* route through `insertJsx$` (typed Lexical decorator node); snippet
|
|
36
|
+
* descriptors route through `insertMarkdown$` (raw MDX spliced at the
|
|
37
|
+
* cursor). Categories are intentionally ignored here — typeahead works
|
|
38
|
+
* better as a flat list than as nested sections.
|
|
39
|
+
*/
|
|
40
|
+
export function SlashMenuPlugin() {
|
|
41
|
+
// Read the Lexical context directly (not via useLexicalComposerContext) so
|
|
42
|
+
// we can no-op on the first render pass before the LexicalProvider commits.
|
|
43
|
+
// @mdxeditor's RichTextEditor mounts composerChildren$ as siblings of the
|
|
44
|
+
// RichTextPlugin inside the LexicalProvider, but in some environments
|
|
45
|
+
// (notably happy-dom-powered tests) the context value can read as null on
|
|
46
|
+
// the very first render; the strict assertion in
|
|
47
|
+
// useLexicalComposerContext would otherwise throw before we get a chance
|
|
48
|
+
// to re-render with a populated context.
|
|
49
|
+
const ctx = useContext(LexicalComposerContext);
|
|
50
|
+
const editor = ctx?.[0] ?? null;
|
|
51
|
+
const allComponents = useMdxComponents();
|
|
52
|
+
const publishJsx = usePublisher(insertJsx$);
|
|
53
|
+
const publishMarkdown = usePublisher(insertMarkdown$);
|
|
54
|
+
const [queryString, setQueryString] = useState(null);
|
|
55
|
+
const triggerFn = useBasicTypeaheadTriggerMatch('/', { minLength: 0, maxLength: 32 });
|
|
56
|
+
const options = useMemo(() => {
|
|
57
|
+
// Auto-discovered descriptors from `/__cms/api/registry` carry
|
|
58
|
+
// `insert: { label, category }` only after the dev server picks up
|
|
59
|
+
// the latest `merge-registry.ts`. Synthesize a default for anything
|
|
60
|
+
// that reaches us without one so the slash menu surfaces every
|
|
61
|
+
// block-level component the editor knows about, no server restart
|
|
62
|
+
// required. Hosts that want different labels can still override by
|
|
63
|
+
// setting `insert` explicitly. Same fallback strategy as
|
|
64
|
+
// `InsertMdxComponentButton`.
|
|
65
|
+
const visible = allComponents.map((d) => d.insert
|
|
66
|
+
? d
|
|
67
|
+
: {
|
|
68
|
+
...d,
|
|
69
|
+
insert: { label: d.name, category: d.kind === 'flow' ? 'Components' : 'Patterns' },
|
|
70
|
+
});
|
|
71
|
+
const matching = visible.filter((d) => matchesQuery(d, queryString ?? ''));
|
|
72
|
+
return matching.map((d) => new MdxComponentOption(d));
|
|
73
|
+
}, [allComponents, queryString]);
|
|
74
|
+
const onSelectOption = useCallback((option, nodeToReplace, closeMenu) => {
|
|
75
|
+
if (!editor)
|
|
76
|
+
return;
|
|
77
|
+
editor.update(() => {
|
|
78
|
+
if (nodeToReplace)
|
|
79
|
+
nodeToReplace.remove();
|
|
80
|
+
});
|
|
81
|
+
dispatchInsert(option.descriptor, { jsx: publishJsx, markdown: publishMarkdown });
|
|
82
|
+
closeMenu();
|
|
83
|
+
}, [editor, publishJsx, publishMarkdown]);
|
|
84
|
+
if (!editor)
|
|
85
|
+
return null;
|
|
86
|
+
return (_jsx(LexicalTypeaheadMenuPlugin, { onQueryChange: setQueryString, onSelectOption: onSelectOption, triggerFn: triggerFn, options: options, menuRenderFn: (anchorElementRef, { selectedIndex, selectOptionAndCleanUp, setHighlightedIndex, options: opts }) => {
|
|
87
|
+
const anchor = anchorElementRef.current;
|
|
88
|
+
if (!anchor || opts.length === 0)
|
|
89
|
+
return null;
|
|
90
|
+
// Color classes use the cms-admin semantic palette (bg-panel,
|
|
91
|
+
// bg-selected, bg-hover, text-muted, text-foreground, border-line)
|
|
92
|
+
// rather than bare Tailwind utilities. Same rationale as
|
|
93
|
+
// InsertMdxComponentButton — the typeahead anchor is somewhere in
|
|
94
|
+
// the editor's prose surface, alongside the host site's injected
|
|
95
|
+
// CSS that ships its own bare-utility class names. Semantic tokens
|
|
96
|
+
// map to CSS vars the host's Tailwind never generates, so
|
|
97
|
+
// collisions are impossible by construction.
|
|
98
|
+
return createPortal(_jsx("div", { role: "listbox", className: "z-50 min-w-[14rem] max-h-72 overflow-auto rounded-md border border-line bg-panel shadow-md py-1 text-sm text-foreground", style: { position: 'absolute', top: '100%', left: 0 }, "data-slash-menu": true, children: opts.map((opt, index) => {
|
|
99
|
+
const isSelected = selectedIndex === index;
|
|
100
|
+
return (_jsxs("button", { type: "button", ref: (el) => opt.setRefElement(el), role: "option", "aria-selected": isSelected, className: `block w-full text-left px-3 py-1.5 ${isSelected ? 'bg-selected' : 'hover:bg-hover'}`, onMouseDown: (event) => {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
selectOptionAndCleanUp(opt);
|
|
103
|
+
}, onMouseEnter: () => setHighlightedIndex(index), children: [_jsx("div", { className: "font-medium", children: opt.descriptor.insert?.label ?? opt.descriptor.name }), opt.descriptor.insert?.description ? (_jsx("div", { className: "text-xs text-muted", children: opt.descriptor.insert.description })) : null] }, opt.key));
|
|
104
|
+
}) }), anchor);
|
|
105
|
+
} }));
|
|
106
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { insertJsx$, insertMarkdown$ } from '@mdxeditor/editor';
|
|
2
|
+
import type { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
|
|
3
|
+
import { type MdxComponentDescriptor, type MdxJsxComponentDescriptor } from '../../../mdx-components';
|
|
4
|
+
type InsertJsxAttrValue = string | {
|
|
5
|
+
type: 'expression';
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
type InsertJsxProps = Record<string, InsertJsxAttrValue>;
|
|
9
|
+
/**
|
|
10
|
+
* Discriminated payload shape required by @mdxeditor/editor's `insertJsx$`
|
|
11
|
+
* signal (verified at node_modules/@mdxeditor/editor/dist/index.d.ts:1670).
|
|
12
|
+
*
|
|
13
|
+
* The two arms differ only in their `children` type — flow JSX accepts
|
|
14
|
+
* block-level mdast nodes; text JSX accepts phrasing-only nodes. We mirror
|
|
15
|
+
* the union exactly because the upstream `NodeRef` parameter type is the
|
|
16
|
+
* union, and a wider `kind: 'flow' | 'text'` shape no longer assigns to it
|
|
17
|
+
* under `strictFunctionTypes`.
|
|
18
|
+
*/
|
|
19
|
+
export type InsertJsxPayload = {
|
|
20
|
+
kind: 'flow';
|
|
21
|
+
name: string;
|
|
22
|
+
props: InsertJsxProps;
|
|
23
|
+
children?: MdxJsxFlowElement['children'];
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'text';
|
|
26
|
+
name: string;
|
|
27
|
+
props: InsertJsxProps;
|
|
28
|
+
children?: MdxJsxTextElement['children'];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Build the payload accepted by @mdxeditor/editor's `insertJsx$` signal.
|
|
32
|
+
*
|
|
33
|
+
* Strings round-trip as plain attributes; numbers/booleans become
|
|
34
|
+
* expression attributes (`{2}`, `{true}`) because the upstream
|
|
35
|
+
* `mdxJsxAttribute.value` shape is either a string or an
|
|
36
|
+
* `{ type: 'expression', value: string }` object.
|
|
37
|
+
*
|
|
38
|
+
* `descriptor.defaults.children` is parsed with `mdast-util-from-markdown`
|
|
39
|
+
* using only CommonMark — descriptors that need MDX-flavored starter
|
|
40
|
+
* content (e.g. nested JSX) should leave `children` undefined and let the
|
|
41
|
+
* author build the body via in-place editing.
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildInsertPayload(descriptor: MdxJsxComponentDescriptor, overrides?: Record<string, string | number | boolean>): InsertJsxPayload;
|
|
44
|
+
/** Whether the JSX descriptor has any required props the inserter must prompt for. */
|
|
45
|
+
export declare function hasRequiredProps(descriptor: MdxJsxComponentDescriptor): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Publisher bundle accepted by `dispatchInsert`. The slash menu and the
|
|
48
|
+
* toolbar `+` button each call `usePublisher` for both signals up-front
|
|
49
|
+
* (hooks can't be conditional) and pass the pair in; the dispatcher then
|
|
50
|
+
* routes by descriptor kind. Keeping the two publishers together in one
|
|
51
|
+
* value also makes future signal additions a single-line change at the
|
|
52
|
+
* call sites.
|
|
53
|
+
*/
|
|
54
|
+
export interface InsertPublishers {
|
|
55
|
+
jsx: (payload: InsertJsxPayload) => void;
|
|
56
|
+
markdown: (value: string) => void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Insert a descriptor's content into the editor. JSX descriptors go
|
|
60
|
+
* through `insertJsx$` so they land as a proper Lexical decorator node
|
|
61
|
+
* (typed prop editor and all); snippet descriptors go through
|
|
62
|
+
* `insertMarkdown$` which parses the snippet body as MDX and splices it
|
|
63
|
+
* at the current selection.
|
|
64
|
+
*
|
|
65
|
+
* `insertMarkdown$` is the right primitive for snippets because the
|
|
66
|
+
* library handles cursor placement and frontmatter-safety internally —
|
|
67
|
+
* we don't need the get/rewrite/set dance the previous snippet path used.
|
|
68
|
+
*/
|
|
69
|
+
export declare function dispatchInsert(descriptor: MdxComponentDescriptor, publishers: InsertPublishers): void;
|
|
70
|
+
/**
|
|
71
|
+
* Convenience re-export of the upstream signals so call sites don't need
|
|
72
|
+
* to import them separately. Keeping both signal references in one module
|
|
73
|
+
* also documents which library symbols the insert pipeline depends on.
|
|
74
|
+
*/
|
|
75
|
+
export { insertJsx$, insertMarkdown$ };
|
|
76
|
+
//# sourceMappingURL=insert-payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert-payload.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/insert-menu/insert-payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAGL,KAAK,sBAAsB,EAE3B,KAAK,yBAAyB,EAC/B,MAAM,yBAAyB,CAAC;AAEjC,KAAK,kBAAkB,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC;AAEN;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,yBAAyB,EACrC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAM,GACxD,gBAAgB,CA2ClB;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,yBAAyB,GAAG,OAAO,CAE/E;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAarG;AAED;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { insertJsx$, insertMarkdown$ } from '@mdxeditor/editor';
|
|
2
|
+
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
3
|
+
import { isJsxDescriptor, isSnippetDescriptor, } from '../../../mdx-components';
|
|
4
|
+
/**
|
|
5
|
+
* Build the payload accepted by @mdxeditor/editor's `insertJsx$` signal.
|
|
6
|
+
*
|
|
7
|
+
* Strings round-trip as plain attributes; numbers/booleans become
|
|
8
|
+
* expression attributes (`{2}`, `{true}`) because the upstream
|
|
9
|
+
* `mdxJsxAttribute.value` shape is either a string or an
|
|
10
|
+
* `{ type: 'expression', value: string }` object.
|
|
11
|
+
*
|
|
12
|
+
* `descriptor.defaults.children` is parsed with `mdast-util-from-markdown`
|
|
13
|
+
* using only CommonMark — descriptors that need MDX-flavored starter
|
|
14
|
+
* content (e.g. nested JSX) should leave `children` undefined and let the
|
|
15
|
+
* author build the body via in-place editing.
|
|
16
|
+
*/
|
|
17
|
+
export function buildInsertPayload(descriptor, overrides = {}) {
|
|
18
|
+
const merged = { ...(descriptor.defaults?.attributes ?? {}), ...overrides };
|
|
19
|
+
const props = {};
|
|
20
|
+
for (const [name, value] of Object.entries(merged)) {
|
|
21
|
+
const propType = descriptor.props?.find((p) => p.name === name)?.type;
|
|
22
|
+
if (propType === 'number' || propType === 'boolean' || typeof value === 'number' || typeof value === 'boolean') {
|
|
23
|
+
props[name] = { type: 'expression', value: String(value) };
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
props[name] = String(value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// Parse the optional starter body. The cast on the result narrows the
|
|
30
|
+
// upstream mdast root's `children` to the flow/text element children types
|
|
31
|
+
// the library expects — `fromMarkdown` itself returns a Root whose
|
|
32
|
+
// children are block-level, which is the same set as `MdxJsxFlowElement`
|
|
33
|
+
// accepts. For text-kind descriptors, callers are responsible for
|
|
34
|
+
// providing CommonMark that is phrasing-only (the wildcard cast is
|
|
35
|
+
// explicit so the contract is visible at the call site).
|
|
36
|
+
let children;
|
|
37
|
+
if (descriptor.hasChildren && descriptor.defaults?.children) {
|
|
38
|
+
const root = fromMarkdown(descriptor.defaults.children);
|
|
39
|
+
children = root.children;
|
|
40
|
+
}
|
|
41
|
+
// Build via the discriminator-narrowed branches so the returned value
|
|
42
|
+
// matches one arm of the union exactly. A single object literal with
|
|
43
|
+
// `kind: descriptor.kind` would re-widen to the parent union and fail
|
|
44
|
+
// assignment to either arm.
|
|
45
|
+
if (descriptor.kind === 'flow') {
|
|
46
|
+
return {
|
|
47
|
+
kind: 'flow',
|
|
48
|
+
name: descriptor.name,
|
|
49
|
+
props,
|
|
50
|
+
children: children,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
kind: 'text',
|
|
55
|
+
name: descriptor.name,
|
|
56
|
+
props,
|
|
57
|
+
children: children,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** Whether the JSX descriptor has any required props the inserter must prompt for. */
|
|
61
|
+
export function hasRequiredProps(descriptor) {
|
|
62
|
+
return !!descriptor.props?.some((p) => p.required === true);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Insert a descriptor's content into the editor. JSX descriptors go
|
|
66
|
+
* through `insertJsx$` so they land as a proper Lexical decorator node
|
|
67
|
+
* (typed prop editor and all); snippet descriptors go through
|
|
68
|
+
* `insertMarkdown$` which parses the snippet body as MDX and splices it
|
|
69
|
+
* at the current selection.
|
|
70
|
+
*
|
|
71
|
+
* `insertMarkdown$` is the right primitive for snippets because the
|
|
72
|
+
* library handles cursor placement and frontmatter-safety internally —
|
|
73
|
+
* we don't need the get/rewrite/set dance the previous snippet path used.
|
|
74
|
+
*/
|
|
75
|
+
export function dispatchInsert(descriptor, publishers) {
|
|
76
|
+
if (isJsxDescriptor(descriptor)) {
|
|
77
|
+
publishers.jsx(buildInsertPayload(descriptor));
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (isSnippetDescriptor(descriptor)) {
|
|
81
|
+
publishers.markdown(descriptor.content);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// Exhaustiveness check — adding a new kind to the union here forces the
|
|
85
|
+
// compiler to point us at this dispatcher.
|
|
86
|
+
const _exhaustive = descriptor;
|
|
87
|
+
void _exhaustive;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Convenience re-export of the upstream signals so call sites don't need
|
|
91
|
+
* to import them separately. Keeping both signal references in one module
|
|
92
|
+
* also documents which library symbols the insert pipeline depends on.
|
|
93
|
+
*/
|
|
94
|
+
export { insertJsx$, insertMarkdown$ };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Realm plugin that wires the slash menu into @mdxeditor/editor's Lexical
|
|
3
|
+
* composer tree. The plugin's only job is to publish `SlashMenuPlugin`
|
|
4
|
+
* (which itself calls `useLexicalComposerContext`) through
|
|
5
|
+
* `addComposerChild$` so it mounts inside the editor's composer.
|
|
6
|
+
*/
|
|
7
|
+
export declare const mdxComponentsPlugin: (params?: unknown) => import("@mdxeditor/editor").RealmPlugin;
|
|
8
|
+
//# sourceMappingURL=mdx-components-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mdx-components-plugin.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/insert-menu/mdx-components-plugin.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,+DAI9B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { addComposerChild$, realmPlugin } from '@mdxeditor/editor';
|
|
2
|
+
import { SlashMenuPlugin } from './SlashMenuPlugin';
|
|
3
|
+
/**
|
|
4
|
+
* Realm plugin that wires the slash menu into @mdxeditor/editor's Lexical
|
|
5
|
+
* composer tree. The plugin's only job is to publish `SlashMenuPlugin`
|
|
6
|
+
* (which itself calls `useLexicalComposerContext`) through
|
|
7
|
+
* `addComposerChild$` so it mounts inside the editor's composer.
|
|
8
|
+
*/
|
|
9
|
+
export const mdxComponentsPlugin = realmPlugin({
|
|
10
|
+
init(realm) {
|
|
11
|
+
realm.pub(addComposerChild$, SlashMenuPlugin);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
interface DataEditorProps {
|
|
3
|
+
id: string;
|
|
4
|
+
collection: string;
|
|
5
|
+
initialLocale: string;
|
|
6
|
+
existingLocales: string[];
|
|
7
|
+
name: string;
|
|
8
|
+
schema: z.ZodObject<z.ZodRawShape> | null;
|
|
9
|
+
onSave?: () => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Editor for data entry content.
|
|
14
|
+
* Uses collection-specific schema for form generation if available.
|
|
15
|
+
* Supports locale switching similar to BlockEditor.
|
|
16
|
+
*/
|
|
17
|
+
export declare function DataEditor({ id, collection, initialLocale, existingLocales, name, schema, onSave, onCancel, }: DataEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=DataEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/DataEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,UAAU,EACV,aAAa,EACb,eAAe,EACf,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,GACT,EAAE,eAAe,2CA8OjB"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getContentAPIClient, useLocalizedContent, useUpdateLocalized } from '@conloca/content-api-client';
|
|
3
|
+
import { AlertCircle, Code2, Loader2, Save } from 'lucide-react';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { UnsavedChangesDialog } from '../dialogs/UnsavedChangesDialog';
|
|
6
|
+
import { LocaleSelector } from '../editor/LocaleSelector';
|
|
7
|
+
import { SchemaForm } from '../forms/SchemaForm';
|
|
8
|
+
/**
|
|
9
|
+
* Editor for data entry content.
|
|
10
|
+
* Uses collection-specific schema for form generation if available.
|
|
11
|
+
* Supports locale switching similar to BlockEditor.
|
|
12
|
+
*/
|
|
13
|
+
export function DataEditor({ id, collection, initialLocale, existingLocales, name, schema, onSave, onCancel, }) {
|
|
14
|
+
// Locale state
|
|
15
|
+
const [currentLocale, setCurrentLocale] = useState(initialLocale);
|
|
16
|
+
const [currentEtag, setCurrentEtag] = useState('');
|
|
17
|
+
const [pendingLocaleSwitch, setPendingLocaleSwitch] = useState(null);
|
|
18
|
+
const [showUnsavedDialog, setShowUnsavedDialog] = useState(false);
|
|
19
|
+
// Track saved values to detect changes
|
|
20
|
+
const savedValuesRef = useRef({});
|
|
21
|
+
const { data: entry, isLoading, error } = useLocalizedContent(id, currentLocale);
|
|
22
|
+
const updateLocalized = useUpdateLocalized();
|
|
23
|
+
// Local state for form values
|
|
24
|
+
const [values, setValues] = useState({});
|
|
25
|
+
const [hasChanges, setHasChanges] = useState(false);
|
|
26
|
+
const [saveError, setSaveError] = useState(null);
|
|
27
|
+
// Initialize form values and etag when entry loads
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (entry?.localized?.content?.data) {
|
|
30
|
+
const data = entry.localized.content.data;
|
|
31
|
+
setValues(data);
|
|
32
|
+
savedValuesRef.current = data;
|
|
33
|
+
setHasChanges(false);
|
|
34
|
+
}
|
|
35
|
+
if (entry?.localized?.etag) {
|
|
36
|
+
setCurrentEtag(entry.localized.etag);
|
|
37
|
+
}
|
|
38
|
+
}, [entry]);
|
|
39
|
+
// Track changes
|
|
40
|
+
const handleChange = (newValues) => {
|
|
41
|
+
setValues(newValues);
|
|
42
|
+
setHasChanges(true);
|
|
43
|
+
};
|
|
44
|
+
// Save handler
|
|
45
|
+
const handleSave = async () => {
|
|
46
|
+
setSaveError(null);
|
|
47
|
+
const result = await updateLocalized.mutateAsync({
|
|
48
|
+
id,
|
|
49
|
+
locale: currentLocale,
|
|
50
|
+
data: {
|
|
51
|
+
content: { data: values },
|
|
52
|
+
},
|
|
53
|
+
etag: currentEtag,
|
|
54
|
+
});
|
|
55
|
+
if (result.success) {
|
|
56
|
+
setHasChanges(false);
|
|
57
|
+
savedValuesRef.current = values;
|
|
58
|
+
if (result.etag) {
|
|
59
|
+
setCurrentEtag(result.etag);
|
|
60
|
+
}
|
|
61
|
+
onSave?.();
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
const errorMessage = result.error?.message || 'Failed to save data';
|
|
65
|
+
setSaveError(errorMessage);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
// Locale switching handlers
|
|
69
|
+
const handleLocaleChange = async (newLocale) => {
|
|
70
|
+
if (newLocale === currentLocale)
|
|
71
|
+
return;
|
|
72
|
+
if (hasChanges) {
|
|
73
|
+
// Show unsaved changes dialog
|
|
74
|
+
setPendingLocaleSwitch(newLocale);
|
|
75
|
+
setShowUnsavedDialog(true);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// Switch immediately if no unsaved changes
|
|
79
|
+
await switchLocale(newLocale);
|
|
80
|
+
};
|
|
81
|
+
const switchLocale = async (newLocale) => {
|
|
82
|
+
try {
|
|
83
|
+
// Fetch the new locale content
|
|
84
|
+
const client = getContentAPIClient();
|
|
85
|
+
const newLocaleContent = await client.getLocalized(id, newLocale);
|
|
86
|
+
if (newLocaleContent) {
|
|
87
|
+
const newData = newLocaleContent.localized.content?.data || {};
|
|
88
|
+
setValues(newData);
|
|
89
|
+
savedValuesRef.current = newData;
|
|
90
|
+
setCurrentEtag(newLocaleContent.localized.etag);
|
|
91
|
+
setHasChanges(false);
|
|
92
|
+
setCurrentLocale(newLocale);
|
|
93
|
+
}
|
|
94
|
+
setPendingLocaleSwitch(null);
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Failed to switch locale:', error);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const handleUnsavedDialogSave = async () => {
|
|
101
|
+
if (!pendingLocaleSwitch)
|
|
102
|
+
return;
|
|
103
|
+
// Save current content first
|
|
104
|
+
try {
|
|
105
|
+
await handleSave();
|
|
106
|
+
setShowUnsavedDialog(false);
|
|
107
|
+
await switchLocale(pendingLocaleSwitch);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
// Don't switch if save failed
|
|
111
|
+
console.error('Failed to save before locale switch:', error);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const handleUnsavedDialogDiscard = async () => {
|
|
115
|
+
if (!pendingLocaleSwitch)
|
|
116
|
+
return;
|
|
117
|
+
setShowUnsavedDialog(false);
|
|
118
|
+
setHasChanges(false);
|
|
119
|
+
await switchLocale(pendingLocaleSwitch);
|
|
120
|
+
};
|
|
121
|
+
const handleUnsavedDialogCancel = () => {
|
|
122
|
+
setShowUnsavedDialog(false);
|
|
123
|
+
setPendingLocaleSwitch(null);
|
|
124
|
+
};
|
|
125
|
+
// Loading state
|
|
126
|
+
if (isLoading) {
|
|
127
|
+
return (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-azure-04" }) }));
|
|
128
|
+
}
|
|
129
|
+
// Error state - show if we have an error and no entry loaded
|
|
130
|
+
if (error && !entry) {
|
|
131
|
+
return (_jsx("div", { className: "text-center py-8 text-red-04", children: _jsxs("p", { children: ["Failed to load entry: ", error.message] }) }));
|
|
132
|
+
}
|
|
133
|
+
// No schema - show fallback message
|
|
134
|
+
if (!schema) {
|
|
135
|
+
return (_jsxs("div", { className: "text-center py-8", children: [_jsx(Code2, { className: "h-12 w-12 text-grey-04 dark:text-grey-07 mx-auto mb-4" }), _jsx("h3", { className: "text-lg font-medium text-grey-01 dark:text-grey-12 mb-2", children: "No Schema Defined" }), _jsxs("p", { className: "text-grey-04 dark:text-grey-07 mb-4", children: ["The \"", collection, "\" collection doesn't have a schema defined."] }), _jsxs("p", { className: "text-xs text-grey-04 dark:text-grey-07", children: ["To enable form editing, add a schema for \"", collection, "\" in your", _jsx("br", {}), _jsx("code", { className: "bg-grey-11 dark:bg-grey-03 px-1 rounded-md", children: "dataSchemas" }), " config file and set", ' ', _jsx("code", { className: "bg-grey-11 dark:bg-grey-03 px-1 rounded-md", children: "schemasPath" }), " in astro.config.mjs"] })] }));
|
|
136
|
+
}
|
|
137
|
+
// Schema exists - render form
|
|
138
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "flex items-center gap-3 pb-4 border-b border-grey-09 dark:border-grey-03", children: [_jsx("span", { className: "text-sm text-grey-04 dark:text-grey-07", children: "Locale:" }), _jsx(LocaleSelector, { currentLocale: currentLocale, availableLocales: existingLocales, onChange: handleLocaleChange })] }), _jsx(SchemaForm, { schema: schema, values: values, onChange: handleChange }), saveError && (_jsxs("div", { className: "flex items-center gap-2 p-3 bg-red-11 dark:bg-red-02 border border-red-08 dark:border-red-03 rounded-md text-red-04 dark:text-red-08 text-sm", children: [_jsx(AlertCircle, { className: "h-4 w-4 flex-shrink-0" }), _jsx("span", { children: saveError })] })), _jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-grey-09 dark:border-grey-03", children: [_jsx("div", { className: "text-sm text-grey-04 dark:text-grey-07", children: hasChanges ? (_jsx("span", { className: "text-yellow-05 dark:text-yellow-07", children: "Unsaved changes" })) : (_jsx("span", { children: "No changes" })) }), _jsxs("div", { className: "flex gap-3", children: [onCancel && (_jsx("button", { type: "button", onClick: onCancel, disabled: updateLocalized.isPending, className: "px-4 py-2 border border-grey-09 dark:border-grey-03 rounded-md hover:bg-grey-11 dark:hover:bg-grey-03 transition-colors disabled:opacity-50", children: "Cancel" })), _jsx("button", { type: "button", onClick: handleSave, disabled: !hasChanges || updateLocalized.isPending, className: "px-4 py-2 bg-azure-04 text-white rounded-md hover:bg-azure-03 transition-colors disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2", children: updateLocalized.isPending ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "Saving..."] })) : (_jsxs(_Fragment, { children: [_jsx(Save, { className: "h-4 w-4" }), "Save"] })) })] })] })] }), showUnsavedDialog && (_jsx(UnsavedChangesDialog, { onSave: handleUnsavedDialogSave, onDiscard: handleUnsavedDialogDiscard, onCancel: handleUnsavedDialogCancel }))] }));
|
|
139
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ContentBlockOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
category?: string;
|
|
6
|
+
}
|
|
7
|
+
interface ContentBlockSelectorFieldProps {
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
options: ContentBlockOption[];
|
|
11
|
+
}
|
|
12
|
+
export declare function ContentBlockSelectorField({ value, onChange, options }: ContentBlockSelectorFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ContentBlockSelectorField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentBlockSelectorField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/ContentBlockSelectorField.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,8BAA8B;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAyBD,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,8BAA8B,2CA6MrG"}
|