@nodehive/nextjs 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/internal/config.d.ts +15 -5
- package/dist/auth/internal/config.js.map +1 -1
- package/dist/auth/internal/draft-mode.d.ts +2 -3
- package/dist/auth/internal/draft-mode.js +3 -20
- package/dist/auth/internal/draft-mode.js.map +1 -1
- package/dist/auth/internal/editor-locale.d.ts +0 -1
- package/dist/auth/internal/handoff.d.ts +0 -1
- package/dist/auth/internal/has-session.d.ts +0 -1
- package/dist/auth/internal/has-session.js +1 -1
- package/dist/auth/internal/has-session.js.map +1 -1
- package/dist/auth/internal/i18n.d.ts +10 -0
- package/dist/auth/internal/i18n.js +25 -0
- package/dist/auth/internal/i18n.js.map +1 -0
- package/dist/auth/internal/logout.d.ts +1 -2
- package/dist/auth/internal/logout.js +3 -3
- package/dist/auth/internal/logout.js.map +1 -1
- package/dist/auth/internal/next-cookie-storage.d.ts +5 -2
- package/dist/auth/internal/next-cookie-storage.js +8 -1
- package/dist/auth/internal/next-cookie-storage.js.map +1 -1
- package/dist/auth/internal/nodehive-client.d.ts +6 -4
- package/dist/auth/internal/nodehive-client.js +6 -4
- package/dist/auth/internal/nodehive-client.js.map +1 -1
- package/dist/auth/internal/oauth-config.d.ts +0 -1
- package/dist/auth/internal/proxy-helpers.d.ts +0 -1
- package/dist/auth/internal/proxy-helpers.js +4 -4
- package/dist/auth/internal/proxy-helpers.js.map +1 -1
- package/dist/auth/internal/refresh.d.ts +1 -2
- package/dist/auth/internal/refresh.js +4 -4
- package/dist/auth/internal/refresh.js.map +1 -1
- package/dist/auth/internal/require-auth.d.ts +0 -1
- package/dist/auth/internal/require-auth.js +1 -1
- package/dist/auth/internal/require-auth.js.map +1 -1
- package/dist/auth/internal/return-to.d.ts +0 -1
- package/dist/auth/internal/roles.d.ts +17 -0
- package/dist/auth/internal/roles.js +39 -0
- package/dist/auth/internal/roles.js.map +1 -0
- package/dist/auth/internal/routes/callback.d.ts +1 -2
- package/dist/auth/internal/routes/callback.js +6 -6
- package/dist/auth/internal/routes/callback.js.map +1 -1
- package/dist/auth/internal/routes/chips-exchange.d.ts +1 -2
- package/dist/auth/internal/routes/chips-exchange.js +5 -5
- package/dist/auth/internal/routes/chips-exchange.js.map +1 -1
- package/dist/auth/internal/routes/draft.d.ts +1 -2
- package/dist/auth/internal/routes/draft.js +3 -3
- package/dist/auth/internal/routes/draft.js.map +1 -1
- package/dist/auth/internal/routes/index.d.ts +4 -2
- package/dist/auth/internal/routes/index.js +7 -7
- package/dist/auth/internal/routes/index.js.map +1 -1
- package/dist/auth/internal/routes/login.d.ts +0 -1
- package/dist/auth/internal/routes/login.js +3 -3
- package/dist/auth/internal/routes/login.js.map +1 -1
- package/dist/auth/internal/routes/popup-done.d.ts +2 -2
- package/dist/auth/internal/routes/popup-done.js +9 -7
- package/dist/auth/internal/routes/popup-done.js.map +1 -1
- package/dist/auth/internal/routes/refresh.d.ts +2 -5
- package/dist/auth/internal/routes/refresh.js +8 -2
- package/dist/auth/internal/routes/refresh.js.map +1 -1
- package/dist/auth/internal/same-origin.d.ts +0 -1
- package/dist/auth/internal/session-gates.d.ts +27 -3
- package/dist/auth/internal/session-gates.js +35 -3
- package/dist/auth/internal/session-gates.js.map +1 -1
- package/dist/auth/internal/update-session.d.ts +1 -2
- package/dist/auth/internal/update-session.js +1 -1
- package/dist/auth/internal/update-session.js.map +1 -1
- package/dist/auth/internal/use-editor-login.d.ts +0 -1
- package/dist/auth/internal/use-editor-login.js +2 -3
- package/dist/auth/internal/use-editor-login.js.map +1 -1
- package/dist/auth/proxy.d.ts +7 -8
- package/dist/auth/proxy.js +6 -6
- package/dist/auth/proxy.js.map +1 -1
- package/dist/auth/react.d.ts +1 -2
- package/dist/auth/react.js +1 -1
- package/dist/auth/react.js.map +1 -1
- package/dist/auth/routes.d.ts +3 -3
- package/dist/auth/routes.js +1 -1
- package/dist/auth/routes.js.map +1 -1
- package/dist/auth/server.d.ts +14 -12
- package/dist/auth/server.js +14 -9
- package/dist/auth/server.js.map +1 -1
- package/dist/bridge-protocol/index.d.ts +50 -0
- package/dist/bridge-protocol/index.js +25 -0
- package/dist/bridge-protocol/index.js.map +1 -0
- package/dist/puck-editor/editor.d.ts +8 -0
- package/dist/puck-editor/editor.js +9 -0
- package/dist/puck-editor/editor.js.map +1 -0
- package/dist/puck-editor/fields.d.ts +6 -7
- package/dist/puck-editor/fields.js +3 -3
- package/dist/puck-editor/fields.js.map +1 -1
- package/dist/puck-editor/index.d.ts +17 -14
- package/dist/puck-editor/index.js +13 -11
- package/dist/puck-editor/index.js.map +1 -1
- package/dist/puck-editor/internal/api/client.d.ts +19 -4
- package/dist/puck-editor/internal/api/client.js +56 -19
- package/dist/puck-editor/internal/api/client.js.map +1 -1
- package/dist/puck-editor/internal/api/config.d.ts +36 -3
- package/dist/puck-editor/internal/api/config.js.map +1 -1
- package/dist/puck-editor/internal/api/create-puck-api.d.ts +1 -2
- package/dist/puck-editor/internal/api/create-puck-api.js +10 -13
- package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts +1 -2
- package/dist/puck-editor/internal/api/handlers/create-page.js +6 -4
- package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/entities.d.ts +6 -5
- package/dist/puck-editor/internal/api/handlers/entities.js +60 -15
- package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/publish.d.ts +3 -6
- package/dist/puck-editor/internal/api/handlers/publish.js +57 -14
- package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts +5 -2
- package/dist/puck-editor/internal/api/handlers/template.js +28 -60
- package/dist/puck-editor/internal/api/handlers/template.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/upload.d.ts +10 -2
- package/dist/puck-editor/internal/api/handlers/upload.js +93 -28
- package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -1
- package/dist/puck-editor/internal/api/localize-message.d.ts +15 -0
- package/dist/puck-editor/internal/api/localize-message.js +15 -0
- package/dist/puck-editor/internal/api/localize-message.js.map +1 -0
- package/dist/puck-editor/internal/api/media-params.d.ts +3 -3
- package/dist/puck-editor/internal/api/media-params.js +23 -19
- package/dist/puck-editor/internal/api/media-params.js.map +1 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts +5 -3
- package/dist/puck-editor/internal/api/media-upload.js +33 -22
- package/dist/puck-editor/internal/api/media-upload.js.map +1 -1
- package/dist/puck-editor/internal/api/space.d.ts +0 -1
- package/dist/puck-editor/internal/api/type-segment.d.ts +2 -0
- package/dist/puck-editor/internal/api/type-segment.js +9 -0
- package/dist/puck-editor/internal/api/type-segment.js.map +1 -0
- package/dist/puck-editor/internal/content-model.d.ts +31 -3
- package/dist/puck-editor/internal/content-model.js +76 -6
- package/dist/puck-editor/internal/content-model.js.map +1 -1
- package/dist/puck-editor/internal/dictionaries.d.ts +225 -0
- package/dist/puck-editor/internal/dictionaries.js +673 -0
- package/dist/puck-editor/internal/dictionaries.js.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts +1 -2
- package/dist/puck-editor/internal/editor/allowed-types.js +2 -2
- package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.js +5 -5
- package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.js +4 -4
- package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.js +8 -8
- package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +0 -1
- package/dist/puck-editor/internal/editor/component-icons.d.ts +1 -2
- package/dist/puck-editor/internal/editor/component-icons.js.map +1 -1
- package/dist/puck-editor/internal/editor/component-item.d.ts +0 -1
- package/dist/puck-editor/internal/editor/component-item.js +2 -2
- package/dist/puck-editor/internal/editor/component-item.js.map +1 -1
- package/dist/puck-editor/internal/editor/compose-save-issues.d.ts +15 -0
- package/dist/puck-editor/internal/editor/compose-save-issues.js +16 -0
- package/dist/puck-editor/internal/editor/compose-save-issues.js.map +1 -0
- package/dist/puck-editor/internal/editor/dirty-state.d.ts +3 -0
- package/dist/puck-editor/internal/editor/dirty-state.js +7 -0
- package/dist/puck-editor/internal/editor/dirty-state.js.map +1 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.d.ts +9 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.js +289 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.js.map +1 -0
- package/dist/puck-editor/internal/editor/draft-storage.d.ts +41 -0
- package/dist/puck-editor/internal/editor/draft-storage.js +129 -0
- package/dist/puck-editor/internal/editor/draft-storage.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +0 -1
- package/dist/puck-editor/internal/editor/editor-action-bar.js +4 -4
- package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -1
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +6 -4
- package/dist/puck-editor/internal/editor/editor-header-actions.js +119 -60
- package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -1
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +0 -1
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +1 -2
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +6 -6
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -1
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +1 -2
- package/dist/puck-editor/internal/editor/grouped-entry-list.js +7 -6
- package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -1
- package/dist/puck-editor/internal/editor/header-save-button.d.ts +4 -4
- package/dist/puck-editor/internal/editor/header-save-button.js +66 -27
- package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -1
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.d.ts +5 -0
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.js +140 -0
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.js.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts +0 -1
- package/dist/puck-editor/internal/editor/page-template-picker.js +5 -5
- package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -1
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +1 -2
- package/dist/puck-editor/internal/editor/picker-entry-item.js +4 -4
- package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -1
- package/dist/puck-editor/internal/editor/picker-model.d.ts +14 -5
- package/dist/puck-editor/internal/editor/picker-model.js +157 -132
- package/dist/puck-editor/internal/editor/picker-model.js.map +1 -1
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +18 -4
- package/dist/puck-editor/internal/editor/publish-puck-data.js +25 -4
- package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -1
- package/dist/puck-editor/internal/editor/puck-editor.d.ts +6 -4
- package/dist/puck-editor/internal/editor/puck-editor.js +270 -209
- package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/editor/save-guard.d.ts +15 -0
- package/dist/puck-editor/internal/editor/save-guard.js +30 -0
- package/dist/puck-editor/internal/editor/save-guard.js.map +1 -0
- package/dist/puck-editor/internal/editor/save-page-context.d.ts +8 -0
- package/dist/puck-editor/internal/editor/save-page-context.js +34 -0
- package/dist/puck-editor/internal/editor/save-page-context.js.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts +0 -1
- package/dist/puck-editor/internal/editor/section-template-modal.js +2 -2
- package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -1
- package/dist/puck-editor/internal/editor/use-draft-recovery.d.ts +16 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.js +194 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts +0 -1
- package/dist/puck-editor/internal/editor/use-is-dirty.d.ts +1 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.js +32 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts +16 -3
- package/dist/puck-editor/internal/editor-config.js +8 -1
- package/dist/puck-editor/internal/editor-config.js.map +1 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +2 -2
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +1 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +1 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js +90 -73
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -1
- package/dist/puck-editor/internal/fields/index.d.ts +10 -10
- package/dist/puck-editor/internal/fields/index.js +10 -9
- package/dist/puck-editor/internal/fields/index.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.js +1 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +1 -2
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +1 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +208 -140
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +1 -2
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +6 -6
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +25 -5
- package/dist/puck-editor/internal/fields/link-picker/link-value.js +56 -6
- package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +4 -4
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +3 -3
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +1 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js +100 -88
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +1 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +1 -2
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +4 -4
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +19 -10
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +7 -3
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +29 -22
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +1 -2
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +281 -255
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +15 -2
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +23 -18
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +12 -6
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +2 -2
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.js +1 -1
- package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -1
- package/dist/puck-editor/internal/fields/required.d.ts +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +13 -3
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +32 -22
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -1
- package/dist/puck-editor/internal/i18n.d.ts +2 -181
- package/dist/puck-editor/internal/i18n.js +2 -358
- package/dist/puck-editor/internal/i18n.js.map +1 -1
- package/dist/puck-editor/internal/locale.d.ts +0 -1
- package/dist/puck-editor/internal/localize.d.ts +1 -2
- package/dist/puck-editor/internal/localize.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +3 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +41 -32
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +3 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +4 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +5 -6
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +3 -3
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +46 -31
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +5 -5
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +2 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +224 -219
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +5 -6
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js +5 -5
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +17 -16
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +171 -161
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +2 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +9 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +22 -20
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +14 -5
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +23 -15
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts +0 -1
- package/dist/puck-editor/internal/puck-props.d.ts +13 -0
- package/dist/puck-editor/internal/puck-props.js +2 -0
- package/dist/puck-editor/internal/puck-props.js.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts +25 -6
- package/dist/puck-editor/internal/puck-wrapper.js +124 -115
- package/dist/puck-editor/internal/puck-wrapper.js.map +1 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts +1 -2
- package/dist/puck-editor/internal/render/cropped-image.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/action-selection.d.ts +8 -0
- package/dist/puck-editor/internal/smart-actions/action-selection.js +10 -0
- package/dist/puck-editor/internal/smart-actions/action-selection.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts +10 -4
- package/dist/puck-editor/internal/smart-actions/index.js +27 -12
- package/dist/puck-editor/internal/smart-actions/index.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts +3 -2
- package/dist/puck-editor/internal/smart-actions/new-page.js +6 -6
- package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +3 -2
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +49 -37
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts +0 -1
- package/dist/puck-editor/internal/ui/calendar.js +1 -1
- package/dist/puck-editor/internal/ui/calendar.js.map +1 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts +0 -1
- package/dist/puck-editor/internal/ui/dialog.js +33 -20
- package/dist/puck-editor/internal/ui/dialog.js.map +1 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts +0 -1
- package/dist/puck-editor/internal/ui/icon-button.js +1 -1
- package/dist/puck-editor/internal/ui/icon-button.js.map +1 -1
- package/dist/puck-editor/internal/ui/load-error-notice.d.ts +6 -0
- package/dist/puck-editor/internal/ui/load-error-notice.js +81 -0
- package/dist/puck-editor/internal/ui/load-error-notice.js.map +1 -0
- package/dist/puck-editor/internal/ui/popover.d.ts +0 -1
- package/dist/puck-editor/internal/ui/popover.js +1 -1
- package/dist/puck-editor/internal/ui/popover.js.map +1 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts +0 -1
- package/dist/puck-editor/internal/ui/scroll-area.d.ts +8 -0
- package/dist/puck-editor/internal/ui/scroll-area.js +160 -0
- package/dist/puck-editor/internal/ui/scroll-area.js.map +1 -0
- package/dist/puck-editor/internal/ui/search-control.d.ts +0 -1
- package/dist/puck-editor/internal/ui/search-control.js +3 -3
- package/dist/puck-editor/internal/ui/search-control.js.map +1 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts +1 -2
- package/dist/puck-editor/internal/use-puck-overlay.js +6 -5
- package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -1
- package/dist/puck-editor/internal/utils.d.ts +0 -1
- package/dist/puck-editor/render.d.ts +2 -3
- package/dist/puck-editor/render.js +1 -1
- package/dist/puck-editor/render.js.map +1 -1
- package/dist/puck-editor/server.d.ts +3 -4
- package/dist/puck-editor/server.js +1 -1
- package/dist/puck-editor/server.js.map +1 -1
- package/dist/puck-editor/smart-actions.d.ts +1 -2
- package/dist/puck-editor/smart-actions.js +1 -1
- package/dist/puck-editor/smart-actions.js.map +1 -1
- package/dist/shared/cn.d.ts +0 -1
- package/dist/shared/i18n.d.ts +0 -1
- package/dist/shared/revalidate-path.d.ts +1 -0
- package/dist/shared/revalidate-path.js +2 -0
- package/dist/shared/revalidate-path.js.map +1 -0
- package/dist/shared/toolbar-action.d.ts +0 -1
- package/dist/shared/use-is-hydrated.d.ts +0 -1
- package/dist/shared/use-is-in-iframe.d.ts +0 -1
- package/dist/shared/use-is-in-iframe.js +1 -1
- package/dist/shared/use-is-in-iframe.js.map +1 -1
- package/dist/smart-actions/internal/backend-edit-link.d.ts +6 -0
- package/dist/smart-actions/internal/backend-edit-link.js +60 -0
- package/dist/smart-actions/internal/backend-edit-link.js.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts +1 -2
- package/dist/smart-actions/internal/get-smart-actions-context.js +2 -2
- package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -1
- package/dist/smart-actions/internal/i18n.d.ts +1 -2
- package/dist/smart-actions/internal/i18n.js +16 -2
- package/dist/smart-actions/internal/i18n.js.map +1 -1
- package/dist/smart-actions/internal/logout-form.d.ts +2 -2
- package/dist/smart-actions/internal/logout-form.js +47 -40
- package/dist/smart-actions/internal/logout-form.js.map +1 -1
- package/dist/smart-actions/internal/refresh-page.d.ts +3 -2
- package/dist/smart-actions/internal/refresh-page.js +60 -53
- package/dist/smart-actions/internal/refresh-page.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts +22 -4
- package/dist/smart-actions/internal/smart-actions-button.js +36 -13
- package/dist/smart-actions/internal/smart-actions-button.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts +12 -4
- package/dist/smart-actions/internal/smart-actions-config.js +36 -80
- package/dist/smart-actions/internal/smart-actions-config.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +5 -11
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js +13 -53
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +4 -4
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/storage.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/types.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +1 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts +0 -1
- package/dist/smart-actions/internal/ui/tooltip.js +1 -1
- package/dist/smart-actions/internal/ui/tooltip.js.map +1 -1
- package/dist/smart-actions/internal/user-profile.d.ts +0 -1
- package/dist/smart-actions/internal/user-profile.js +71 -24
- package/dist/smart-actions/internal/user-profile.js.map +1 -1
- package/dist/smart-actions/server.d.ts +5 -4
- package/dist/smart-actions/server.js +2 -2
- package/dist/smart-actions/server.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/visual-editor/index.d.ts +3 -4
- package/dist/visual-editor/index.js +3 -3
- package/dist/visual-editor/index.js.map +1 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts +4 -3
- package/dist/visual-editor/internal/bridge/connector.js +22 -21
- package/dist/visual-editor/internal/bridge/connector.js.map +1 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +5 -3
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +7 -8
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +3 -3
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js +4 -2
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -1
- package/dist/visual-editor/internal/i18n.d.ts +3 -2
- package/dist/visual-editor/internal/i18n.js +32 -4
- package/dist/visual-editor/internal/i18n.js.map +1 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +1 -7
- package/dist/visual-editor/internal/overlays/drupal-origin.js +16 -3
- package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts +5 -4
- package/dist/visual-editor/internal/overlays/edit-button.js +46 -44
- package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +11 -2
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +18 -7
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js +1 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +12 -3
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +14 -5
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +4 -2
- package/dist/visual-editor/internal/overlays/node/node-metadata.js +10 -4
- package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +5 -3
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js +4 -2
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +11 -2
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +18 -7
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts +0 -1
- package/dist/visual-editor/internal/revalidate-route.js +1 -1
- package/dist/visual-editor/internal/revalidate-route.js.map +1 -1
- package/dist/visual-editor/server.d.ts +6 -7
- package/dist/visual-editor/server.js +6 -6
- package/dist/visual-editor/server.js.map +1 -1
- package/package.json +20 -3
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/internal/config.d.ts.map +0 -1
- package/dist/auth/internal/draft-mode.d.ts.map +0 -1
- package/dist/auth/internal/editor-locale.d.ts.map +0 -1
- package/dist/auth/internal/handoff.d.ts.map +0 -1
- package/dist/auth/internal/has-session.d.ts.map +0 -1
- package/dist/auth/internal/logout.d.ts.map +0 -1
- package/dist/auth/internal/next-cookie-storage.d.ts.map +0 -1
- package/dist/auth/internal/nodehive-client.d.ts.map +0 -1
- package/dist/auth/internal/oauth-config.d.ts.map +0 -1
- package/dist/auth/internal/proxy-helpers.d.ts.map +0 -1
- package/dist/auth/internal/refresh.d.ts.map +0 -1
- package/dist/auth/internal/require-auth.d.ts.map +0 -1
- package/dist/auth/internal/return-to.d.ts.map +0 -1
- package/dist/auth/internal/routes/callback.d.ts.map +0 -1
- package/dist/auth/internal/routes/chips-exchange.d.ts.map +0 -1
- package/dist/auth/internal/routes/draft.d.ts.map +0 -1
- package/dist/auth/internal/routes/index.d.ts.map +0 -1
- package/dist/auth/internal/routes/login.d.ts.map +0 -1
- package/dist/auth/internal/routes/popup-done.d.ts.map +0 -1
- package/dist/auth/internal/routes/refresh.d.ts.map +0 -1
- package/dist/auth/internal/same-origin.d.ts.map +0 -1
- package/dist/auth/internal/session-gates.d.ts.map +0 -1
- package/dist/auth/internal/update-session.d.ts.map +0 -1
- package/dist/auth/internal/use-editor-login.d.ts.map +0 -1
- package/dist/auth/proxy.d.ts.map +0 -1
- package/dist/auth/react.d.ts.map +0 -1
- package/dist/auth/routes.d.ts.map +0 -1
- package/dist/auth/server.d.ts.map +0 -1
- package/dist/puck-editor/fields.d.ts.map +0 -1
- package/dist/puck-editor/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/client.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/config.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/media-params.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/space.d.ts.map +0 -1
- package/dist/puck-editor/internal/content-model.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/component-icons.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/component-item.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/picker-model.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/i18n.d.ts.map +0 -1
- package/dist/puck-editor/internal/locale.d.ts.map +0 -1
- package/dist/puck-editor/internal/localize.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-wrapper.d.ts.map +0 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/popover.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/search-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +0 -1
- package/dist/puck-editor/internal/utils.d.ts.map +0 -1
- package/dist/puck-editor/render.d.ts.map +0 -1
- package/dist/puck-editor/server.d.ts.map +0 -1
- package/dist/puck-editor/smart-actions.d.ts.map +0 -1
- package/dist/shared/cn.d.ts.map +0 -1
- package/dist/shared/i18n.d.ts.map +0 -1
- package/dist/shared/toolbar-action.d.ts.map +0 -1
- package/dist/shared/use-is-hydrated.d.ts.map +0 -1
- package/dist/shared/use-is-in-iframe.d.ts.map +0 -1
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +0 -1
- package/dist/smart-actions/internal/i18n.d.ts.map +0 -1
- package/dist/smart-actions/internal/logout-form.d.ts.map +0 -1
- package/dist/smart-actions/internal/refresh-page.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +0 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts.map +0 -1
- package/dist/smart-actions/internal/user-profile.d.ts.map +0 -1
- package/dist/smart-actions/server.d.ts.map +0 -1
- package/dist/visual-editor/index.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +0 -1
- package/dist/visual-editor/internal/i18n.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts.map +0 -1
- package/dist/visual-editor/server.d.ts.map +0 -1
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { createUsePuck, useGetPuck } from '@puckeditor/core';
|
|
5
5
|
import { toast } from 'sonner';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
6
|
+
import { usePuckPropTransforms } from "../editor-config.js";
|
|
7
|
+
import { usePuckDictionary, usePuckLocale } from "../i18n.js";
|
|
8
|
+
import { buildTree, isTypeAllowed, ROOT_ZONE, sectionComponentTypes } from "../plugins/outline-plugin/outline-tree.js";
|
|
9
|
+
import { TEMPLATE_PREFIX } from "../plugins/templates-plugin/template-vehicles.js";
|
|
10
|
+
import { expandTemplate, templateKey, templateLabel } from "../plugins/templates-plugin/templates.js";
|
|
11
|
+
import { useTemplates } from "../plugins/templates-plugin/use-templates.js";
|
|
12
|
+
import { appendComponents, generateId } from "../utils.js";
|
|
13
|
+
import { scrollToCanvas } from "./canvas-scroll.js";
|
|
13
14
|
export function blockCategoryIds(config) {
|
|
14
15
|
return Object.keys(config.categories ?? {}).filter(id => id !== 'sections' && config.categories?.[id]?.visible !== false);
|
|
15
16
|
}
|
|
@@ -94,7 +95,7 @@ export function templateEntry(template, locale) {
|
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
97
|
export function usePickerModel() {
|
|
97
|
-
const $ = _c(
|
|
98
|
+
const $ = _c(83);
|
|
98
99
|
const config = usePuck(_temp);
|
|
99
100
|
const dispatch = usePuck(_temp2);
|
|
100
101
|
const getPermissions = usePuck(_temp3);
|
|
@@ -106,10 +107,14 @@ export function usePickerModel() {
|
|
|
106
107
|
templates,
|
|
107
108
|
brokenTemplates,
|
|
108
109
|
isLoading,
|
|
110
|
+
isError,
|
|
111
|
+
refetch,
|
|
109
112
|
invalidate,
|
|
110
113
|
update,
|
|
111
114
|
remove
|
|
112
115
|
} = useTemplates();
|
|
116
|
+
const propTransforms = usePuckPropTransforms();
|
|
117
|
+
let canInsertTemplates;
|
|
113
118
|
let canInsertType;
|
|
114
119
|
let customSectionTemplates;
|
|
115
120
|
let pageTemplates;
|
|
@@ -121,65 +126,74 @@ export function usePickerModel() {
|
|
|
121
126
|
if ($[0] !== config || $[1] !== getPermissions || $[2] !== locale || $[3] !== templates) {
|
|
122
127
|
sectionTypes = sectionComponentTypes(config);
|
|
123
128
|
let t1;
|
|
124
|
-
if ($[
|
|
129
|
+
if ($[13] !== getPermissions) {
|
|
125
130
|
t1 = type => getPermissions({
|
|
126
131
|
type
|
|
127
132
|
}).insert !== false;
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
133
|
+
$[13] = getPermissions;
|
|
134
|
+
$[14] = t1;
|
|
130
135
|
} else {
|
|
131
|
-
t1 = $[
|
|
136
|
+
t1 = $[14];
|
|
132
137
|
}
|
|
133
138
|
canInsertType = t1;
|
|
134
139
|
let t2;
|
|
135
|
-
if ($[
|
|
136
|
-
t2 =
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
140
|
+
if ($[15] !== getPermissions) {
|
|
141
|
+
t2 = () => getPermissions().insert !== false;
|
|
142
|
+
$[15] = getPermissions;
|
|
143
|
+
$[16] = t2;
|
|
139
144
|
} else {
|
|
140
|
-
t2 = $[
|
|
145
|
+
t2 = $[16];
|
|
141
146
|
}
|
|
142
|
-
|
|
147
|
+
canInsertTemplates = t2;
|
|
143
148
|
let t3;
|
|
144
|
-
if ($[
|
|
145
|
-
t3 = templates.filter(
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
149
|
+
if ($[17] !== templates) {
|
|
150
|
+
t3 = templates.filter(_temp4);
|
|
151
|
+
$[17] = templates;
|
|
152
|
+
$[18] = t3;
|
|
148
153
|
} else {
|
|
149
|
-
t3 = $[
|
|
154
|
+
t3 = $[18];
|
|
150
155
|
}
|
|
151
|
-
|
|
152
|
-
const builtinSections = templates.filter(_temp6);
|
|
156
|
+
customSectionTemplates = t3;
|
|
153
157
|
let t4;
|
|
154
|
-
if ($[
|
|
155
|
-
t4 =
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
+
if ($[19] !== templates) {
|
|
159
|
+
t4 = templates.filter(_temp5);
|
|
160
|
+
$[19] = templates;
|
|
161
|
+
$[20] = t4;
|
|
158
162
|
} else {
|
|
159
|
-
t4 = $[
|
|
163
|
+
t4 = $[20];
|
|
160
164
|
}
|
|
165
|
+
pageTemplates = t4;
|
|
166
|
+
const builtinSections = templates.filter(_temp6);
|
|
161
167
|
let t5;
|
|
162
|
-
if ($[
|
|
163
|
-
t5 =
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
168
|
+
if ($[21] !== config.components) {
|
|
169
|
+
t5 = type_0 => config.components[type_0];
|
|
170
|
+
$[21] = config.components;
|
|
171
|
+
$[22] = t5;
|
|
166
172
|
} else {
|
|
167
|
-
t5 = $[
|
|
173
|
+
t5 = $[22];
|
|
168
174
|
}
|
|
169
|
-
const sectionCodeEntries = sectionTypes.filter(t4).map(t5);
|
|
170
|
-
pinnedSectionEntries = sectionCodeEntries.filter(_temp7);
|
|
171
175
|
let t6;
|
|
172
|
-
if ($[
|
|
173
|
-
t6 =
|
|
176
|
+
if ($[23] !== config) {
|
|
177
|
+
t6 = type_1 => componentEntry(config, type_1);
|
|
178
|
+
$[23] = config;
|
|
179
|
+
$[24] = t6;
|
|
180
|
+
} else {
|
|
181
|
+
t6 = $[24];
|
|
182
|
+
}
|
|
183
|
+
const sectionCodeEntries = sectionTypes.filter(t5).map(t6);
|
|
184
|
+
pinnedSectionEntries = sectionCodeEntries.filter(_temp7);
|
|
185
|
+
let t7;
|
|
186
|
+
if ($[25] !== locale) {
|
|
187
|
+
t7 = template_2 => ({
|
|
174
188
|
...templateEntry(template_2, locale),
|
|
175
189
|
group: template_2.group
|
|
176
190
|
});
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
191
|
+
$[25] = locale;
|
|
192
|
+
$[26] = t7;
|
|
179
193
|
} else {
|
|
180
|
-
|
|
194
|
+
t7 = $[26];
|
|
181
195
|
}
|
|
182
|
-
const sectionTemplateEntries = builtinSections.map(
|
|
196
|
+
const sectionTemplateEntries = builtinSections.map(t7);
|
|
183
197
|
sectionGroups = buildGroups([...sectionCodeEntries.filter(_temp8), ...sectionTemplateEntries], config);
|
|
184
198
|
const categorized = new Set();
|
|
185
199
|
const blockCodeEntries = [];
|
|
@@ -214,27 +228,29 @@ export function usePickerModel() {
|
|
|
214
228
|
$[1] = getPermissions;
|
|
215
229
|
$[2] = locale;
|
|
216
230
|
$[3] = templates;
|
|
217
|
-
$[4] =
|
|
218
|
-
$[5] =
|
|
219
|
-
$[6] =
|
|
220
|
-
$[7] =
|
|
221
|
-
$[8] =
|
|
222
|
-
$[9] =
|
|
223
|
-
$[10] =
|
|
224
|
-
$[11] =
|
|
231
|
+
$[4] = canInsertTemplates;
|
|
232
|
+
$[5] = canInsertType;
|
|
233
|
+
$[6] = customSectionTemplates;
|
|
234
|
+
$[7] = pageTemplates;
|
|
235
|
+
$[8] = pinnedBlockEntries;
|
|
236
|
+
$[9] = pinnedSectionEntries;
|
|
237
|
+
$[10] = sectionGroups;
|
|
238
|
+
$[11] = sectionTypes;
|
|
239
|
+
$[12] = t0;
|
|
225
240
|
} else {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
241
|
+
canInsertTemplates = $[4];
|
|
242
|
+
canInsertType = $[5];
|
|
243
|
+
customSectionTemplates = $[6];
|
|
244
|
+
pageTemplates = $[7];
|
|
245
|
+
pinnedBlockEntries = $[8];
|
|
246
|
+
pinnedSectionEntries = $[9];
|
|
247
|
+
sectionGroups = $[10];
|
|
248
|
+
sectionTypes = $[11];
|
|
249
|
+
t0 = $[12];
|
|
234
250
|
}
|
|
235
251
|
const blockGroups = t0;
|
|
236
252
|
let t1;
|
|
237
|
-
if ($[
|
|
253
|
+
if ($[27] !== blockGroups || $[28] !== customSectionTemplates || $[29] !== pageTemplates || $[30] !== pinnedBlockEntries || $[31] !== pinnedSectionEntries || $[32] !== sectionGroups) {
|
|
238
254
|
t1 = {
|
|
239
255
|
customSectionTemplates,
|
|
240
256
|
pageTemplates,
|
|
@@ -243,19 +259,19 @@ export function usePickerModel() {
|
|
|
243
259
|
pinnedBlockEntries,
|
|
244
260
|
blockGroups
|
|
245
261
|
};
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
262
|
+
$[27] = blockGroups;
|
|
263
|
+
$[28] = customSectionTemplates;
|
|
264
|
+
$[29] = pageTemplates;
|
|
265
|
+
$[30] = pinnedBlockEntries;
|
|
266
|
+
$[31] = pinnedSectionEntries;
|
|
267
|
+
$[32] = sectionGroups;
|
|
268
|
+
$[33] = t1;
|
|
253
269
|
} else {
|
|
254
|
-
t1 = $[
|
|
270
|
+
t1 = $[33];
|
|
255
271
|
}
|
|
256
272
|
const model = t1;
|
|
257
273
|
let t2;
|
|
258
|
-
if ($[
|
|
274
|
+
if ($[34] !== canInsertType || $[35] !== dispatch) {
|
|
259
275
|
t2 = (target, type_5) => {
|
|
260
276
|
if (!canInsertType(type_5)) {
|
|
261
277
|
return;
|
|
@@ -279,20 +295,23 @@ export function usePickerModel() {
|
|
|
279
295
|
});
|
|
280
296
|
scrollToCanvas(id_0);
|
|
281
297
|
};
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
298
|
+
$[34] = canInsertType;
|
|
299
|
+
$[35] = dispatch;
|
|
300
|
+
$[36] = t2;
|
|
285
301
|
} else {
|
|
286
|
-
t2 = $[
|
|
302
|
+
t2 = $[36];
|
|
287
303
|
}
|
|
288
304
|
const insertComponent = t2;
|
|
289
305
|
let t3;
|
|
290
|
-
if ($[
|
|
306
|
+
if ($[37] !== canInsertTemplates || $[38] !== config || $[39] !== dispatch || $[40] !== locale || $[41] !== propTransforms || $[42] !== tTemplates) {
|
|
291
307
|
t3 = (target_0, template_3) => {
|
|
308
|
+
if (!canInsertTemplates()) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
292
311
|
let expanded;
|
|
293
312
|
;
|
|
294
313
|
try {
|
|
295
|
-
expanded = expandTemplate(template_3, config, templateLabel(template_3, locale));
|
|
314
|
+
expanded = expandTemplate(template_3, config, templateLabel(template_3, locale), propTransforms);
|
|
296
315
|
} catch (t4) {
|
|
297
316
|
const error = t4;
|
|
298
317
|
console.error("Failed to expand template:", error);
|
|
@@ -304,17 +323,19 @@ export function usePickerModel() {
|
|
|
304
323
|
toast.warning(tTemplates.partiallyInserted.replace("{skipped}", String(expanded.skipped)).replace("{total}", String(expanded.content.length + expanded.skipped)));
|
|
305
324
|
}
|
|
306
325
|
};
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
326
|
+
$[37] = canInsertTemplates;
|
|
327
|
+
$[38] = config;
|
|
328
|
+
$[39] = dispatch;
|
|
329
|
+
$[40] = locale;
|
|
330
|
+
$[41] = propTransforms;
|
|
331
|
+
$[42] = tTemplates;
|
|
332
|
+
$[43] = t3;
|
|
312
333
|
} else {
|
|
313
|
-
t3 = $[
|
|
334
|
+
t3 = $[43];
|
|
314
335
|
}
|
|
315
336
|
const insertTemplate = t3;
|
|
316
337
|
let t4;
|
|
317
|
-
if ($[
|
|
338
|
+
if ($[44] !== insertComponent || $[45] !== insertTemplate) {
|
|
318
339
|
t4 = (entry_3, target_1) => {
|
|
319
340
|
if (entry_3.template) {
|
|
320
341
|
insertTemplate(target_1, entry_3.template);
|
|
@@ -322,27 +343,27 @@ export function usePickerModel() {
|
|
|
322
343
|
insertComponent(target_1, entry_3.drawerName);
|
|
323
344
|
}
|
|
324
345
|
};
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
346
|
+
$[44] = insertComponent;
|
|
347
|
+
$[45] = insertTemplate;
|
|
348
|
+
$[46] = t4;
|
|
328
349
|
} else {
|
|
329
|
-
t4 = $[
|
|
350
|
+
t4 = $[46];
|
|
330
351
|
}
|
|
331
352
|
const insertEntry = t4;
|
|
332
353
|
let t5;
|
|
333
|
-
if ($[
|
|
354
|
+
if ($[47] !== getPuck) {
|
|
334
355
|
t5 = () => ({
|
|
335
356
|
zone: ROOT_ZONE,
|
|
336
357
|
index: getPuck().appState.data.content?.length ?? 0
|
|
337
358
|
});
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
359
|
+
$[47] = getPuck;
|
|
360
|
+
$[48] = t5;
|
|
340
361
|
} else {
|
|
341
|
-
t5 = $[
|
|
362
|
+
t5 = $[48];
|
|
342
363
|
}
|
|
343
364
|
const sectionTarget = t5;
|
|
344
365
|
let t6;
|
|
345
|
-
if ($[
|
|
366
|
+
if ($[49] !== config || $[50] !== getPuck || $[51] !== sectionTypes) {
|
|
346
367
|
t6 = primaryType => {
|
|
347
368
|
const content = getPuck().appState.data.content ?? [];
|
|
348
369
|
const tree = buildTree(content, config);
|
|
@@ -362,28 +383,28 @@ export function usePickerModel() {
|
|
|
362
383
|
}
|
|
363
384
|
return null;
|
|
364
385
|
};
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
386
|
+
$[49] = config;
|
|
387
|
+
$[50] = getPuck;
|
|
388
|
+
$[51] = sectionTypes;
|
|
389
|
+
$[52] = t6;
|
|
369
390
|
} else {
|
|
370
|
-
t6 = $[
|
|
391
|
+
t6 = $[52];
|
|
371
392
|
}
|
|
372
393
|
const blockTarget = t6;
|
|
373
394
|
let t7;
|
|
374
|
-
if ($[
|
|
395
|
+
if ($[53] !== insertEntry || $[54] !== sectionTarget) {
|
|
375
396
|
t7 = entry_4 => {
|
|
376
397
|
insertEntry(entry_4, sectionTarget());
|
|
377
398
|
};
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
399
|
+
$[53] = insertEntry;
|
|
400
|
+
$[54] = sectionTarget;
|
|
401
|
+
$[55] = t7;
|
|
381
402
|
} else {
|
|
382
|
-
t7 = $[
|
|
403
|
+
t7 = $[55];
|
|
383
404
|
}
|
|
384
405
|
const insertSectionEntry = t7;
|
|
385
406
|
let t8;
|
|
386
|
-
if ($[
|
|
407
|
+
if ($[56] !== blockTarget || $[57] !== insertEntry || $[58] !== tBlocks) {
|
|
387
408
|
t8 = entry_5 => {
|
|
388
409
|
const target_2 = blockTarget(entry_5.primaryType);
|
|
389
410
|
if (!target_2) {
|
|
@@ -392,31 +413,33 @@ export function usePickerModel() {
|
|
|
392
413
|
}
|
|
393
414
|
insertEntry(entry_5, target_2);
|
|
394
415
|
};
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
416
|
+
$[56] = blockTarget;
|
|
417
|
+
$[57] = insertEntry;
|
|
418
|
+
$[58] = tBlocks;
|
|
419
|
+
$[59] = t8;
|
|
399
420
|
} else {
|
|
400
|
-
t8 = $[
|
|
421
|
+
t8 = $[59];
|
|
401
422
|
}
|
|
402
423
|
const insertBlockEntry = t8;
|
|
403
424
|
let t9;
|
|
404
|
-
if ($[
|
|
425
|
+
if ($[60] !== insertTemplate || $[61] !== sectionTarget) {
|
|
405
426
|
t9 = template_4 => {
|
|
406
427
|
insertTemplate(sectionTarget(), template_4);
|
|
407
428
|
};
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
429
|
+
$[60] = insertTemplate;
|
|
430
|
+
$[61] = sectionTarget;
|
|
431
|
+
$[62] = t9;
|
|
411
432
|
} else {
|
|
412
|
-
t9 = $[
|
|
433
|
+
t9 = $[62];
|
|
413
434
|
}
|
|
414
435
|
const insertRootTemplate = t9;
|
|
415
436
|
let t10;
|
|
416
|
-
if ($[
|
|
437
|
+
if ($[63] !== brokenTemplates || $[64] !== canInsertType || $[65] !== config || $[66] !== insertBlockEntry || $[67] !== insertEntry || $[68] !== insertRootTemplate || $[69] !== insertSectionEntry || $[70] !== invalidate || $[71] !== isError || $[72] !== isLoading || $[73] !== model.blockGroups || $[74] !== model.customSectionTemplates || $[75] !== model.pageTemplates || $[76] !== model.pinnedBlockEntries || $[77] !== model.pinnedSectionEntries || $[78] !== model.sectionGroups || $[79] !== refetch || $[80] !== remove || $[81] !== update) {
|
|
417
438
|
t10 = {
|
|
418
439
|
config,
|
|
419
440
|
isLoading,
|
|
441
|
+
isError,
|
|
442
|
+
refetch,
|
|
420
443
|
canInsertType,
|
|
421
444
|
pinnedSectionEntries: model.pinnedSectionEntries,
|
|
422
445
|
sectionGroups: model.sectionGroups,
|
|
@@ -433,26 +456,28 @@ export function usePickerModel() {
|
|
|
433
456
|
update,
|
|
434
457
|
remove
|
|
435
458
|
};
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
459
|
+
$[63] = brokenTemplates;
|
|
460
|
+
$[64] = canInsertType;
|
|
461
|
+
$[65] = config;
|
|
462
|
+
$[66] = insertBlockEntry;
|
|
463
|
+
$[67] = insertEntry;
|
|
464
|
+
$[68] = insertRootTemplate;
|
|
465
|
+
$[69] = insertSectionEntry;
|
|
466
|
+
$[70] = invalidate;
|
|
467
|
+
$[71] = isError;
|
|
468
|
+
$[72] = isLoading;
|
|
469
|
+
$[73] = model.blockGroups;
|
|
470
|
+
$[74] = model.customSectionTemplates;
|
|
471
|
+
$[75] = model.pageTemplates;
|
|
472
|
+
$[76] = model.pinnedBlockEntries;
|
|
473
|
+
$[77] = model.pinnedSectionEntries;
|
|
474
|
+
$[78] = model.sectionGroups;
|
|
475
|
+
$[79] = refetch;
|
|
476
|
+
$[80] = remove;
|
|
477
|
+
$[81] = update;
|
|
478
|
+
$[82] = t10;
|
|
454
479
|
} else {
|
|
455
|
-
t10 = $[
|
|
480
|
+
t10 = $[82];
|
|
456
481
|
}
|
|
457
482
|
return t10;
|
|
458
483
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picker-model.js","names":["c","_c","createUsePuck","useGetPuck","toast","usePuckDictionary","usePuckLocale","buildTree","isTypeAllowed","ROOT_ZONE","sectionComponentTypes","TEMPLATE_PREFIX","expandTemplate","templateKey","templateLabel","useTemplates","appendComponents","generateId","scrollToCanvas","blockCategoryIds","config","Object","keys","categories","filter","id","visible","blockCategoryLabel","title","usePuck","componentEntry","type","picker","components","metadata","key","drawerName","label","primaryType","iconNode","icon","pinned","group","undefined","templateGroupLabel","groupId","fallback","buildGroups","entries","byId","Map","entry","has","set","get","push","order","rank","indexOf","sort","a","b","map","mergeIntoGroups","byGroup","filterGroupsByQuery","groups","query","normalized","trim","toLowerCase","includes","length","templateEntry","template","locale","data","usePickerModel","$","_temp","dispatch","_temp2","getPermissions","_temp3","getPuck","tBlocks","blocks","tTemplates","templates","brokenTemplates","isLoading","invalidate","update","remove","canInsertType","customSectionTemplates","pageTemplates","pinnedBlockEntries","pinnedSectionEntries","sectionGroups","sectionTypes","t0","t1","insert","t2","_temp4","t3","_temp5","builtinSections","_temp6","t4","type_0","t5","type_1","sectionCodeEntries","_temp7","t6","template_2","sectionTemplateEntries","_temp8","categorized","Set","blockCodeEntries","type_2","add","hasHiddenOtherCategory","other","leftoverTypes","type_3","startsWith","type_4","_temp9","_temp0","blockGroups","model","target","type_5","id_0","componentType","destinationZone","zone","destinationIndex","index","ui","itemSelector","insertComponent","target_0","template_3","expanded","error","console","insertFailed","content","skipped","warning","partiallyInserted","replace","String","insertTemplate","entry_3","target_1","insertEntry","appState","sectionTarget","tree","i","node","zones","zoneCompound","items","blockTarget","t7","entry_4","insertSectionEntry","t8","entry_5","target_2","noBlockTarget","insertBlockEntry","t9","template_4","insertRootTemplate","t10","entry_2","entry_1","entry_0","template_1","category","source","template_0","s_1","s","s_0"],"sources":["../../../../src/puck-editor/internal/editor/picker-model.ts"],"sourcesContent":["'use client';\n\nimport { type ReactNode } from 'react';\nimport {\n Config,\n createUsePuck,\n PuckAction,\n useGetPuck,\n} from '@puckeditor/core';\nimport { toast } from 'sonner';\n\nimport { usePuckDictionary, usePuckLocale } from '../i18n';\nimport {\n buildTree,\n isTypeAllowed,\n ROOT_ZONE,\n sectionComponentTypes,\n} from '../plugins/outline-plugin/outline-tree';\nimport { TEMPLATE_PREFIX } from '../plugins/templates-plugin/template-vehicles';\nimport {\n expandTemplate,\n Template,\n templateKey,\n templateLabel,\n} from '../plugins/templates-plugin/templates';\nimport { useTemplates } from '../plugins/templates-plugin/use-templates';\nimport { appendComponents, generateId } from '../utils';\nimport { scrollToCanvas } from './canvas-scroll';\n\nexport function blockCategoryIds(config: Config): string[] {\n return Object.keys(config.categories ?? {}).filter(\n (id) => id !== 'sections' && config.categories?.[id]?.visible !== false\n );\n}\n\nexport function blockCategoryLabel(config: Config, id: string): string {\n return config.categories?.[id]?.title ?? id;\n}\n\nexport type PickerEntry = {\n key: string;\n drawerName: string;\n label: string;\n primaryType: string;\n icon?: string;\n iconNode?: ReactNode;\n pinned?: boolean;\n template?: Template;\n};\n\nexport type PickerGroup = {\n key: string;\n id?: string;\n label: string;\n entries: PickerEntry[];\n};\n\nexport type InsertTarget = { zone: string; index: number };\n\ntype GroupedEntry = PickerEntry & { group?: string };\n\ntype Dispatch = (action: PuckAction) => void;\n\nconst usePuck = createUsePuck();\n\nfunction componentEntry(config: Config, type: string): GroupedEntry {\n const picker = config.components[type]?.metadata?.picker;\n return {\n key: `c:${type}`,\n drawerName: type,\n label: picker?.label ?? config.components[type]?.label ?? type,\n primaryType: type,\n iconNode: picker?.icon,\n pinned: picker?.pinned ?? false,\n group: config.components[type]?.metadata?.group || undefined,\n };\n}\n\nexport function templateGroupLabel(\n config: Config,\n groupId: string | undefined,\n fallback: string | undefined\n): string | undefined {\n return groupId ? blockCategoryLabel(config, groupId) : fallback;\n}\n\n// Group by category id, ordered by the config's category declaration order.\n// Ungrouped entries (no id) render first as a flat, headerless list.\nexport function buildGroups(\n entries: GroupedEntry[],\n config: Config\n): PickerGroup[] {\n const byId = new Map<string, PickerEntry[]>();\n for (const { group, ...entry } of entries) {\n const id = group ?? '';\n if (!byId.has(id)) byId.set(id, []);\n byId.get(id)!.push(entry);\n }\n const order = Object.keys(config.categories ?? {});\n const rank = (id: string) => (id === '' ? -1 : order.indexOf(id));\n return [...byId.keys()]\n .sort((a, b) => rank(a) - rank(b))\n .map((id) => ({\n key: id || '__flat__',\n id: id || undefined,\n label: id ? blockCategoryLabel(config, id) : '',\n entries: byId.get(id)!,\n }));\n}\n\n// Label-keyed grouping kept for the page-template pickers.\nexport function mergeIntoGroups(\n entries: (PickerEntry & { group?: string })[]\n): PickerGroup[] {\n const order: string[] = [];\n const byGroup = new Map<string, PickerEntry[]>();\n for (const { group, ...entry } of entries) {\n const key = group ?? '';\n if (!byGroup.has(key)) {\n byGroup.set(key, []);\n order.push(key);\n }\n byGroup.get(key)!.push(entry);\n }\n return order.map((group) => ({\n key: group || '__flat__',\n label: group,\n entries: byGroup.get(group)!,\n }));\n}\n\nexport function filterGroupsByQuery(\n groups: PickerGroup[],\n query: string\n): PickerGroup[] {\n const normalized = query.trim().toLowerCase();\n return groups\n .map((group) => ({\n ...group,\n entries: group.entries.filter((entry) =>\n entry.label.toLowerCase().includes(normalized)\n ),\n }))\n .filter((group) => group.entries.length > 0);\n}\n\nexport function templateEntry(template: Template, locale: string): PickerEntry {\n return {\n key: `t:${templateKey(template)}`,\n drawerName: `${TEMPLATE_PREFIX}${templateKey(template)}`,\n label: templateLabel(template, locale),\n primaryType: template.data[0]?.type ?? '',\n icon: template.icon,\n template,\n };\n}\n\nexport function usePickerModel() {\n const config = usePuck((s) => s.config);\n const dispatch = usePuck((s) => s.dispatch) as Dispatch;\n const getPermissions = usePuck((s) => s.getPermissions);\n const getPuck = useGetPuck();\n const tBlocks = usePuckDictionary().blocks;\n const tTemplates = usePuckDictionary().templates;\n const locale = usePuckLocale();\n const { templates, brokenTemplates, isLoading, invalidate, update, remove } =\n useTemplates();\n\n const sectionTypes = sectionComponentTypes(config);\n\n const canInsertType = (type: string): boolean =>\n getPermissions({ type }).insert !== false;\n\n const customSectionTemplates = templates.filter(\n (template) =>\n template.category === 'section' && template.source === 'custom'\n );\n const pageTemplates = templates.filter(\n (template) => template.category === 'page'\n );\n const builtinSections = templates.filter(\n (template) =>\n template.category === 'section' && template.source === 'builtin'\n );\n\n const sectionCodeEntries = sectionTypes\n .filter((type) => config.components[type])\n .map((type) => componentEntry(config, type));\n\n const pinnedSectionEntries: PickerEntry[] = sectionCodeEntries.filter(\n (entry) => entry.pinned\n );\n\n const sectionTemplateEntries: GroupedEntry[] = builtinSections.map(\n (template) => ({\n ...templateEntry(template, locale),\n group: template.group,\n })\n );\n\n const sectionGroups = buildGroups(\n [\n ...sectionCodeEntries.filter((entry) => !entry.pinned),\n ...sectionTemplateEntries,\n ],\n config\n );\n\n const categorized = new Set<string>();\n const blockCodeEntries: GroupedEntry[] = [];\n for (const id of blockCategoryIds(config)) {\n for (const type of config.categories?.[id]?.components ?? []) {\n if (!config.components[type]) continue;\n if (sectionTypes.includes(type)) continue;\n categorized.add(type);\n blockCodeEntries.push({ ...componentEntry(config, type), group: id });\n }\n }\n\n const hasHiddenOtherCategory = config.categories?.other?.visible === false;\n const leftoverTypes = Object.keys(config.components).filter(\n (type) =>\n !categorized.has(type) &&\n !sectionTypes.includes(type) &&\n !type.startsWith(TEMPLATE_PREFIX)\n );\n if (!hasHiddenOtherCategory) {\n for (const type of leftoverTypes) {\n blockCodeEntries.push({\n ...componentEntry(config, type),\n group: undefined,\n });\n }\n }\n\n const pinnedBlockEntries: PickerEntry[] = blockCodeEntries.filter(\n (entry) => entry.pinned\n );\n\n const blockGroups = buildGroups(\n blockCodeEntries.filter((entry) => !entry.pinned),\n config\n );\n\n const model = {\n customSectionTemplates,\n pageTemplates,\n pinnedSectionEntries,\n sectionGroups,\n pinnedBlockEntries,\n blockGroups,\n };\n\n const insertComponent = (target: InsertTarget, type: string) => {\n if (!canInsertType(type)) return;\n const id = generateId(type);\n dispatch({\n type: 'insert',\n componentType: type,\n destinationZone: target.zone,\n destinationIndex: target.index,\n id,\n });\n dispatch({\n type: 'setUi',\n ui: { itemSelector: { index: target.index, zone: target.zone } },\n });\n scrollToCanvas(id);\n };\n\n const insertTemplate = (target: InsertTarget, template: Template) => {\n let expanded;\n try {\n expanded = expandTemplate(\n template,\n config,\n templateLabel(template, locale)\n );\n } catch (error) {\n console.error('Failed to expand template:', error);\n toast.error(tTemplates.insertFailed);\n return;\n }\n appendComponents(dispatch, target.zone, target.index, expanded.content);\n if (expanded.skipped > 0) {\n toast.warning(\n tTemplates.partiallyInserted\n .replace('{skipped}', String(expanded.skipped))\n .replace(\n '{total}',\n String(expanded.content.length + expanded.skipped)\n )\n );\n }\n };\n\n const insertEntry = (entry: PickerEntry, target: InsertTarget) => {\n if (entry.template) insertTemplate(target, entry.template);\n else insertComponent(target, entry.drawerName);\n };\n\n const sectionTarget = (): InsertTarget => ({\n zone: ROOT_ZONE,\n index: getPuck().appState.data.content?.length ?? 0,\n });\n\n const blockTarget = (primaryType: string): InsertTarget | null => {\n const content = getPuck().appState.data.content ?? [];\n const tree = buildTree(content, config);\n for (let i = tree.length - 1; i >= 0; i--) {\n const node = tree[i];\n if (!sectionTypes.includes(node.type)) continue;\n for (const zone of node.zones) {\n if (isTypeAllowed(zone, primaryType)) {\n return { zone: zone.zoneCompound, index: zone.items.length };\n }\n }\n }\n return null;\n };\n\n const insertSectionEntry = (entry: PickerEntry) => {\n insertEntry(entry, sectionTarget());\n };\n\n const insertBlockEntry = (entry: PickerEntry) => {\n const target = blockTarget(entry.primaryType);\n if (!target) {\n toast.error(tBlocks.noBlockTarget);\n return;\n }\n insertEntry(entry, target);\n };\n\n const insertRootTemplate = (template: Template) => {\n insertTemplate(sectionTarget(), template);\n };\n\n return {\n config,\n isLoading,\n canInsertType,\n pinnedSectionEntries: model.pinnedSectionEntries,\n sectionGroups: model.sectionGroups,\n pinnedBlockEntries: model.pinnedBlockEntries,\n blockGroups: model.blockGroups,\n customSectionTemplates: model.customSectionTemplates,\n pageTemplates: model.pageTemplates,\n brokenTemplates,\n insertEntry,\n insertSectionEntry,\n insertBlockEntry,\n insertRootTemplate,\n invalidate,\n update,\n remove,\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAGb,SAEEC,aAAa,EAEbC,UAAU,QACL,kBAAkB;AACzB,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SAASC,iBAA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D,GAAC,CAAA/G,QAAS;AAAA;AAFrC,SAAAD,MAAAgH,CAAA;EAAA,OACyBA,CAAC,CAAA3K,MAAO;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"picker-model.js","names":["c","_c","createUsePuck","useGetPuck","toast","usePuckPropTransforms","usePuckDictionary","usePuckLocale","buildTree","isTypeAllowed","ROOT_ZONE","sectionComponentTypes","TEMPLATE_PREFIX","expandTemplate","templateKey","templateLabel","useTemplates","appendComponents","generateId","scrollToCanvas","blockCategoryIds","config","Object","keys","categories","filter","id","visible","blockCategoryLabel","title","usePuck","componentEntry","type","picker","components","metadata","key","drawerName","label","primaryType","iconNode","icon","pinned","group","undefined","templateGroupLabel","groupId","fallback","buildGroups","entries","byId","Map","entry","has","set","get","push","order","rank","indexOf","sort","a","b","map","mergeIntoGroups","byGroup","filterGroupsByQuery","groups","query","normalized","trim","toLowerCase","includes","length","templateEntry","template","locale","data","usePickerModel","$","_temp","dispatch","_temp2","getPermissions","_temp3","getPuck","tBlocks","blocks","tTemplates","templates","brokenTemplates","isLoading","isError","refetch","invalidate","update","remove","propTransforms","canInsertTemplates","canInsertType","customSectionTemplates","pageTemplates","pinnedBlockEntries","pinnedSectionEntries","sectionGroups","sectionTypes","t0","t1","insert","t2","t3","_temp4","t4","_temp5","builtinSections","_temp6","t5","type_0","t6","type_1","sectionCodeEntries","_temp7","t7","template_2","sectionTemplateEntries","_temp8","categorized","Set","blockCodeEntries","type_2","add","hasHiddenOtherCategory","other","leftoverTypes","type_3","startsWith","type_4","_temp9","_temp0","blockGroups","model","target","type_5","id_0","componentType","destinationZone","zone","destinationIndex","index","ui","itemSelector","insertComponent","target_0","template_3","expanded","error","console","insertFailed","content","skipped","warning","partiallyInserted","replace","String","insertTemplate","entry_3","target_1","insertEntry","appState","sectionTarget","tree","i","node","zones","zoneCompound","items","blockTarget","entry_4","insertSectionEntry","t8","entry_5","target_2","noBlockTarget","insertBlockEntry","t9","template_4","insertRootTemplate","t10","entry_2","entry_1","entry_0","template_1","category","source","template_0","s_1","s","s_0"],"sources":["../../../../src/puck-editor/internal/editor/picker-model.ts"],"sourcesContent":["'use client';\n\nimport { type ReactNode } from 'react';\nimport {\n Config,\n createUsePuck,\n PuckAction,\n useGetPuck,\n} from '@puckeditor/core';\nimport { toast } from 'sonner';\n\nimport { usePuckPropTransforms } from '../editor-config.tsx';\nimport { usePuckDictionary, usePuckLocale } from '../i18n.tsx';\nimport {\n buildTree,\n isTypeAllowed,\n ROOT_ZONE,\n sectionComponentTypes,\n} from '../plugins/outline-plugin/outline-tree.ts';\nimport { TEMPLATE_PREFIX } from '../plugins/templates-plugin/template-vehicles.ts';\nimport {\n expandTemplate,\n Template,\n templateKey,\n templateLabel,\n} from '../plugins/templates-plugin/templates.ts';\nimport { useTemplates } from '../plugins/templates-plugin/use-templates.ts';\nimport { appendComponents, generateId } from '../utils.ts';\nimport { scrollToCanvas } from './canvas-scroll.ts';\n\nexport function blockCategoryIds(config: Config): string[] {\n return Object.keys(config.categories ?? {}).filter(\n (id) => id !== 'sections' && config.categories?.[id]?.visible !== false\n );\n}\n\nexport function blockCategoryLabel(config: Config, id: string): string {\n return config.categories?.[id]?.title ?? id;\n}\n\nexport type PickerEntry = {\n key: string;\n drawerName: string;\n label: string;\n primaryType: string;\n icon?: string;\n iconNode?: ReactNode;\n pinned?: boolean;\n template?: Template;\n};\n\nexport type PickerGroup = {\n key: string;\n id?: string;\n label: string;\n entries: PickerEntry[];\n};\n\nexport type InsertTarget = { zone: string; index: number };\n\ntype GroupedEntry = PickerEntry & { group?: string };\n\ntype Dispatch = (action: PuckAction) => void;\n\nconst usePuck = createUsePuck();\n\nfunction componentEntry(config: Config, type: string): GroupedEntry {\n const picker = config.components[type]?.metadata?.picker;\n return {\n key: `c:${type}`,\n drawerName: type,\n label: picker?.label ?? config.components[type]?.label ?? type,\n primaryType: type,\n iconNode: picker?.icon,\n pinned: picker?.pinned ?? false,\n group: config.components[type]?.metadata?.group || undefined,\n };\n}\n\nexport function templateGroupLabel(\n config: Config,\n groupId: string | undefined,\n fallback: string | undefined\n): string | undefined {\n return groupId ? blockCategoryLabel(config, groupId) : fallback;\n}\n\n// Group by category id, ordered by the config's category declaration order.\n// Ungrouped entries (no id) render first as a flat, headerless list.\nexport function buildGroups(\n entries: GroupedEntry[],\n config: Config\n): PickerGroup[] {\n const byId = new Map<string, PickerEntry[]>();\n for (const { group, ...entry } of entries) {\n const id = group ?? '';\n if (!byId.has(id)) byId.set(id, []);\n byId.get(id)!.push(entry);\n }\n const order = Object.keys(config.categories ?? {});\n const rank = (id: string) => (id === '' ? -1 : order.indexOf(id));\n return [...byId.keys()]\n .sort((a, b) => rank(a) - rank(b))\n .map((id) => ({\n key: id || '__flat__',\n id: id || undefined,\n label: id ? blockCategoryLabel(config, id) : '',\n entries: byId.get(id)!,\n }));\n}\n\n// Label-keyed grouping kept for the page-template pickers.\nexport function mergeIntoGroups(\n entries: (PickerEntry & { group?: string })[]\n): PickerGroup[] {\n const order: string[] = [];\n const byGroup = new Map<string, PickerEntry[]>();\n for (const { group, ...entry } of entries) {\n const key = group ?? '';\n if (!byGroup.has(key)) {\n byGroup.set(key, []);\n order.push(key);\n }\n byGroup.get(key)!.push(entry);\n }\n return order.map((group) => ({\n key: group || '__flat__',\n label: group,\n entries: byGroup.get(group)!,\n }));\n}\n\nexport function filterGroupsByQuery(\n groups: PickerGroup[],\n query: string\n): PickerGroup[] {\n const normalized = query.trim().toLowerCase();\n return groups\n .map((group) => ({\n ...group,\n entries: group.entries.filter((entry) =>\n entry.label.toLowerCase().includes(normalized)\n ),\n }))\n .filter((group) => group.entries.length > 0);\n}\n\nexport function templateEntry(template: Template, locale: string): PickerEntry {\n return {\n key: `t:${templateKey(template)}`,\n drawerName: `${TEMPLATE_PREFIX}${templateKey(template)}`,\n label: templateLabel(template, locale),\n primaryType: template.data[0]?.type ?? '',\n icon: template.icon,\n template,\n };\n}\n\nexport function usePickerModel() {\n const config = usePuck((s) => s.config);\n const dispatch = usePuck((s) => s.dispatch) as Dispatch;\n const getPermissions = usePuck((s) => s.getPermissions);\n const getPuck = useGetPuck();\n const tBlocks = usePuckDictionary().blocks;\n const tTemplates = usePuckDictionary().templates;\n const locale = usePuckLocale();\n const {\n templates,\n brokenTemplates,\n isLoading,\n isError,\n refetch,\n invalidate,\n update,\n remove,\n } = useTemplates();\n const propTransforms = usePuckPropTransforms();\n\n const sectionTypes = sectionComponentTypes(config);\n\n const canInsertType = (type: string): boolean =>\n getPermissions({ type }).insert !== false;\n\n const canInsertTemplates = (): boolean => getPermissions().insert !== false;\n\n const customSectionTemplates = templates.filter(\n (template) =>\n template.category === 'section' && template.source === 'custom'\n );\n const pageTemplates = templates.filter(\n (template) => template.category === 'page'\n );\n const builtinSections = templates.filter(\n (template) =>\n template.category === 'section' && template.source === 'builtin'\n );\n\n const sectionCodeEntries = sectionTypes\n .filter((type) => config.components[type])\n .map((type) => componentEntry(config, type));\n\n const pinnedSectionEntries: PickerEntry[] = sectionCodeEntries.filter(\n (entry) => entry.pinned\n );\n\n const sectionTemplateEntries: GroupedEntry[] = builtinSections.map(\n (template) => ({\n ...templateEntry(template, locale),\n group: template.group,\n })\n );\n\n const sectionGroups = buildGroups(\n [\n ...sectionCodeEntries.filter((entry) => !entry.pinned),\n ...sectionTemplateEntries,\n ],\n config\n );\n\n const categorized = new Set<string>();\n const blockCodeEntries: GroupedEntry[] = [];\n for (const id of blockCategoryIds(config)) {\n for (const type of config.categories?.[id]?.components ?? []) {\n if (!config.components[type]) continue;\n if (sectionTypes.includes(type)) continue;\n categorized.add(type);\n blockCodeEntries.push({ ...componentEntry(config, type), group: id });\n }\n }\n\n const hasHiddenOtherCategory = config.categories?.other?.visible === false;\n const leftoverTypes = Object.keys(config.components).filter(\n (type) =>\n !categorized.has(type) &&\n !sectionTypes.includes(type) &&\n !type.startsWith(TEMPLATE_PREFIX)\n );\n if (!hasHiddenOtherCategory) {\n for (const type of leftoverTypes) {\n blockCodeEntries.push({\n ...componentEntry(config, type),\n group: undefined,\n });\n }\n }\n\n const pinnedBlockEntries: PickerEntry[] = blockCodeEntries.filter(\n (entry) => entry.pinned\n );\n\n const blockGroups = buildGroups(\n blockCodeEntries.filter((entry) => !entry.pinned),\n config\n );\n\n const model = {\n customSectionTemplates,\n pageTemplates,\n pinnedSectionEntries,\n sectionGroups,\n pinnedBlockEntries,\n blockGroups,\n };\n\n const insertComponent = (target: InsertTarget, type: string) => {\n if (!canInsertType(type)) return;\n const id = generateId(type);\n dispatch({\n type: 'insert',\n componentType: type,\n destinationZone: target.zone,\n destinationIndex: target.index,\n id,\n });\n dispatch({\n type: 'setUi',\n ui: { itemSelector: { index: target.index, zone: target.zone } },\n });\n scrollToCanvas(id);\n };\n\n const insertTemplate = (target: InsertTarget, template: Template) => {\n if (!canInsertTemplates()) return;\n let expanded;\n try {\n expanded = expandTemplate(\n template,\n config,\n templateLabel(template, locale),\n propTransforms\n );\n } catch (error) {\n console.error('Failed to expand template:', error);\n toast.error(tTemplates.insertFailed);\n return;\n }\n appendComponents(dispatch, target.zone, target.index, expanded.content);\n if (expanded.skipped > 0) {\n toast.warning(\n tTemplates.partiallyInserted\n .replace('{skipped}', String(expanded.skipped))\n .replace(\n '{total}',\n String(expanded.content.length + expanded.skipped)\n )\n );\n }\n };\n\n const insertEntry = (entry: PickerEntry, target: InsertTarget) => {\n if (entry.template) insertTemplate(target, entry.template);\n else insertComponent(target, entry.drawerName);\n };\n\n const sectionTarget = (): InsertTarget => ({\n zone: ROOT_ZONE,\n index: getPuck().appState.data.content?.length ?? 0,\n });\n\n const blockTarget = (primaryType: string): InsertTarget | null => {\n const content = getPuck().appState.data.content ?? [];\n const tree = buildTree(content, config);\n for (let i = tree.length - 1; i >= 0; i--) {\n const node = tree[i];\n if (!sectionTypes.includes(node.type)) continue;\n for (const zone of node.zones) {\n if (isTypeAllowed(zone, primaryType)) {\n return { zone: zone.zoneCompound, index: zone.items.length };\n }\n }\n }\n return null;\n };\n\n const insertSectionEntry = (entry: PickerEntry) => {\n insertEntry(entry, sectionTarget());\n };\n\n const insertBlockEntry = (entry: PickerEntry) => {\n const target = blockTarget(entry.primaryType);\n if (!target) {\n toast.error(tBlocks.noBlockTarget);\n return;\n }\n insertEntry(entry, target);\n };\n\n const insertRootTemplate = (template: Template) => {\n insertTemplate(sectionTarget(), template);\n };\n\n return {\n config,\n isLoading,\n isError,\n refetch,\n canInsertType,\n pinnedSectionEntries: model.pinnedSectionEntries,\n sectionGroups: model.sectionGroups,\n pinnedBlockEntries: model.pinnedBlockEntries,\n blockGroups: model.blockGroups,\n customSectionTemplates: model.customSectionTemplates,\n pageTemplates: model.pageTemplates,\n brokenTemplates,\n insertEntry,\n insertSectionEntry,\n insertBlockEntry,\n insertRootTemplate,\n invalidate,\n update,\n remove,\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAGb,SAEEC,aAAa,EAEbC,UAAU,QACL,kBAAkB;AACzB,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SAASC,qBAAqB,QAAQ,qBAAsB;AAC5D,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,YAAa;AAC9D,SACEC,SAAS,EACTC,aAAa,EACbC,SAAS,EACTC,qBAAqB,QAChB,2CAA2C;AAClD,SAASC,eAAe,QAAQ,kDAAkD;AAClF,SACEC,cAAc,EAEdC,WAAW,EACXC,aAAa,QACR,0CAA0C;AACjD,SAASC,YAAY,QAAQ,8CAA8C;AAC3E,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,aAAa;AAC1D,SAASC,cAAc,QAAQ,oBAAoB;AAEnD,OAAO,SAASC,gBAAgBA,CAACC,MAAc,EAAY;EACzD,OAAOC,MAAM,CAACC,IAAI,CAACF,MAAM,CAACG,UAAU,IAAI,CAAC,CAAC,CAAC,CAACC,MAAM,CAC/CC,EAAE,IAAKA,EAAE,KAAK,UAAU,IAAIL,MAAM,CAACG,UAAU,GAAGE,EAAE,CAAC,EAAEC,OAAO,KAAK,K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,KAAK,SAAyC,IAA5BrH,QAAQ,CAAAsH,MAAO,KAAK,QAAQ;AAAA;AA7B9D,SAAA7G,OAAA+G,GAAA;EAAA,OAGiCC,GAAC,CAAAjH,cAAe;AAAA;AAHjD,SAAAD,OAAAmH,GAAA;EAAA,OAE2BD,GAAC,CAAAnH,QAAS;AAAA;AAFrC,SAAAD,MAAAoH,CAAA;EAAA,OACyBA,CAAC,CAAA/K,MAAO;AAAA","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Data } from '@puckeditor/core';
|
|
1
|
+
import type { Data } from '@puckeditor/core';
|
|
2
2
|
type PublishMetadataImage = {
|
|
3
3
|
id?: string;
|
|
4
4
|
type?: string;
|
|
5
5
|
name?: string;
|
|
6
6
|
thumbnailImage?: string;
|
|
7
7
|
};
|
|
8
|
-
type PublishPuckDataParams = {
|
|
8
|
+
export type PublishPuckDataParams = {
|
|
9
9
|
data: Partial<Data>;
|
|
10
10
|
pageSettings: {
|
|
11
11
|
title: string;
|
|
@@ -23,8 +23,22 @@ type PublishPuckDataParams = {
|
|
|
23
23
|
messages?: {
|
|
24
24
|
saved: string;
|
|
25
25
|
saveFailed: string;
|
|
26
|
+
sessionExpired?: string;
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Outcome of a publish attempt. On failure the user-facing toast has already
|
|
31
|
+
* fired; callers use this to gate their own state (button error, agent return,
|
|
32
|
+
* dirty retention) and must not report success on `ok: false`. `status` carries
|
|
33
|
+
* the HTTP status when the request completed (e.g. 401 for an expired session);
|
|
34
|
+
* it is absent for a network-level failure.
|
|
35
|
+
*/
|
|
36
|
+
export type PublishPuckDataResult = {
|
|
37
|
+
ok: true;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
error: string;
|
|
41
|
+
status?: number;
|
|
42
|
+
};
|
|
43
|
+
export declare function publishPuckData({ messages, ...params }: PublishPuckDataParams): Promise<PublishPuckDataResult>;
|
|
29
44
|
export {};
|
|
30
|
-
//# sourceMappingURL=publish-puck-data.d.ts.map
|