@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-media.js","names":["absolutizeMediaUrl","fetchMediaList","listMedia","lang","drupalBaseUrl","type","query","limit","offset","body","items","Array","isArray","data","map","item","file","
|
|
1
|
+
{"version":3,"file":"list-media.js","names":["absolutizeMediaUrl","fetchMediaList","listMedia","lang","drupalBaseUrl","media","type","query","limit","offset","body","items","Array","isArray","data","map","item","file","imageFileField","videoFileField","oembed","remoteVideoUrlField","id","name","title","url","uri","undefined","alt","meta","width","height","thumbnailImage","thumbnail"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/list-media.ts"],"sourcesContent":["import { absolutizeMediaUrl, fetchMediaList } from '../../api/client.ts';\nimport type { PuckMediaConfig } from '../../content-model.ts';\n\nexport type AgentMediaItem = {\n id: string;\n type: string;\n name?: string;\n title?: string;\n url?: string;\n alt?: string;\n width?: number;\n height?: number;\n thumbnailImage?: string;\n};\n\ntype FileRef = {\n uri?: { url?: string };\n meta?: {\n alt?: string | null;\n title?: string | null;\n width?: number;\n height?: number;\n };\n};\n\ntype MediaEntity = {\n id: string;\n type: string;\n name?: string;\n thumbnail?: { uri?: { url?: string } };\n [field: string]: unknown;\n};\n\n/**\n * Fetch CMS media of a given type via the editor-gated media route, mapped to\n * a flat list. Values for media/node fields MUST come from this output\n * verbatim — never invented; items keep id/type/name/thumbnailImage so they\n * drop into media fields unchanged.\n */\nexport async function listMedia(\n lang: string | undefined,\n drupalBaseUrl: string,\n media: PuckMediaConfig,\n type: string,\n query?: string,\n limit?: number,\n offset?: number\n): Promise<AgentMediaItem[]> {\n const body = await fetchMediaList<{ data?: MediaEntity[] }>(type, {\n lang,\n query,\n limit,\n offset,\n });\n const items: MediaEntity[] = Array.isArray(body?.data) ? body.data : [];\n\n return items.map((item) => {\n const file = (item[media.imageFileField] ?? item[media.videoFileField]) as\n FileRef | undefined;\n const oembed = item[media.remoteVideoUrlField];\n return {\n id: item.id,\n type: item.type,\n name: item.name,\n title: item.name,\n url:\n absolutizeMediaUrl(drupalBaseUrl, file?.uri?.url) ??\n (typeof oembed === 'string' ? oembed : undefined),\n alt: file?.meta?.alt ?? undefined,\n width: file?.meta?.width,\n height: file?.meta?.height,\n thumbnailImage: absolutizeMediaUrl(\n drupalBaseUrl,\n item.thumbnail?.uri?.url\n ),\n };\n });\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,cAAc,QAAQ,qBAAqB;AAiCxE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,SAASA,CAC7BC,IAAwB,EACxBC,aAAqB,EACrBC,KAAsB,EACtBC,IAAY,EACZC,KAAc,EACdC,KAAc,EACdC,MAAe,EACY;EAC3B,MAAMC,IAAI,GAAG,MAAMT,cAAc,CAA2BK,IAAI,EAAE;IAChEH,IAAI;IACJI,KAAK;IACLC,KAAK;IACLC;EACF,CAAC,CAAC;EACF,MAAME,KAAoB,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEI,IAAI,CAAC,GAAGJ,IAAI,CAACI,IAAI,GAAG,EAAE;EAEvE,OAAOH,KAAK,CAACI,GAAG,CAAEC,IAAI,IAAK;IACzB,MAAMC,IAAI,GAAID,IAAI,CAACX,KAAK,CAACa,cAAc,CAAC,IAAIF,IAAI,CAACX,KAAK,CAACc,cAAc,CAChD;IACrB,MAAMC,MAAM,GAAGJ,IAAI,CAACX,KAAK,CAACgB,mBAAmB,CAAC;IAC9C,OAAO;MACLC,EAAE,EAAEN,IAAI,CAACM,EAAE;MACXhB,IAAI,EAAEU,IAAI,CAACV,IAAI;MACfiB,IAAI,EAAEP,IAAI,CAACO,IAAI;MACfC,KAAK,EAAER,IAAI,CAACO,IAAI;MAChBE,GAAG,EACDzB,kBAAkB,CAACI,aAAa,EAAEa,IAAI,EAAES,GAAG,EAAED,GAAG,CAAC,KAChD,OAAOL,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAGO,SAAS,CAAC;MACnDC,GAAG,EAAEX,IAAI,EAAEY,IAAI,EAAED,GAAG,IAAID,SAAS;MACjCG,KAAK,EAAEb,IAAI,EAAEY,IAAI,EAAEC,KAAK;MACxBC,MAAM,EAAEd,IAAI,EAAEY,IAAI,EAAEE,MAAM;MAC1BC,cAAc,EAAEhC,kBAAkB,CAChCI,aAAa,EACbY,IAAI,CAACiB,SAAS,EAAEP,GAAG,EAAED,GACvB;IACF,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config, Data, PuckAction } from '@puckeditor/core';
|
|
2
|
-
import type { PuckTemplatesConfig } from '../../content-model.
|
|
3
|
-
import { type BuiltinTemplate } from '../templates-plugin/templates.
|
|
4
|
-
import { type PatchResult } from './apply-patch-to-puck.
|
|
2
|
+
import type { PuckPropTransforms, PuckTemplatesConfig } from '../../content-model.js';
|
|
3
|
+
import { type BuiltinTemplate } from '../templates-plugin/templates.js';
|
|
4
|
+
import { type PatchResult } from './apply-patch-to-puck.js';
|
|
5
5
|
type Dispatch = (action: PuckAction) => void;
|
|
6
6
|
export type TemplateDestination = {
|
|
7
7
|
destinationId?: string;
|
|
@@ -15,9 +15,8 @@ export declare function listTemplates(templatesConfig: PuckTemplatesConfig, buil
|
|
|
15
15
|
} | undefined;
|
|
16
16
|
id: string;
|
|
17
17
|
name: string;
|
|
18
|
-
category: import("../templates-plugin/templates.
|
|
18
|
+
category: import("../templates-plugin/templates.js").TemplateCategory;
|
|
19
19
|
source: "custom" | "builtin";
|
|
20
20
|
}[]>;
|
|
21
|
-
export declare function insertTemplate(dispatch: Dispatch, data: Data | undefined, config: Config, templatesConfig: PuckTemplatesConfig, builtins: BuiltinTemplate[], templateId: string, dest?: TemplateDestination): Promise<PatchResult>;
|
|
21
|
+
export declare function insertTemplate(dispatch: Dispatch, data: Data | undefined, config: Config, templatesConfig: PuckTemplatesConfig, builtins: BuiltinTemplate[], templateId: string, dest?: TemplateDestination, propTransforms?: PuckPropTransforms): Promise<PatchResult>;
|
|
22
22
|
export {};
|
|
23
|
-
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -30,7 +30,7 @@ export async function listTemplates(templatesConfig, builtins) {
|
|
|
30
30
|
const templates = await resolveTemplates(templatesConfig, builtins);
|
|
31
31
|
return templates.map(summarize);
|
|
32
32
|
}
|
|
33
|
-
export async function insertTemplate(dispatch, data, config, templatesConfig, builtins, templateId, dest) {
|
|
33
|
+
export async function insertTemplate(dispatch, data, config, templatesConfig, builtins, templateId, dest, propTransforms) {
|
|
34
34
|
const templates = await resolveTemplates(templatesConfig, builtins);
|
|
35
35
|
const template = templates.find(t => templateKey(t) === templateId);
|
|
36
36
|
if (!template) {
|
|
@@ -60,7 +60,7 @@ export async function insertTemplate(dispatch, data, config, templatesConfig, bu
|
|
|
60
60
|
}
|
|
61
61
|
const {
|
|
62
62
|
content
|
|
63
|
-
} = expandTemplate(template, config, templateLabel(template, 'en'));
|
|
63
|
+
} = expandTemplate(template, config, templateLabel(template, 'en'), propTransforms);
|
|
64
64
|
const zone = dest?.destinationId ? `${dest.destinationId}:${dest.destinationSlot}` : undefined;
|
|
65
65
|
return applyPatchToPuck(dispatch, data, config, {
|
|
66
66
|
action: 'addMany',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","names":["getEditorQueryClient","TEMPLATES_QUERY_KEY","expandTemplate","fetchTemplates","isRootLevelTemplate","mergeTemplates","templateKey","templateLabel","applyPatchToPuck","summarize","template","id","name","category","source","ai","description","instructions","resolveTemplates","templatesConfig","builtins","valid","fetchQuery","queryKey","queryFn","listTemplates","templates","map","insertTemplate","dispatch","data","config","templateId","dest","find","t","ok","error","destinationId","destinationSlot","targetsRoot","content","zone","undefined","action","components","destinationZone","destinationIndex"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/templates.ts"],"sourcesContent":["import type { Config, Data, PuckAction } from '@puckeditor/core';\n\nimport type {
|
|
1
|
+
{"version":3,"file":"templates.js","names":["getEditorQueryClient","TEMPLATES_QUERY_KEY","expandTemplate","fetchTemplates","isRootLevelTemplate","mergeTemplates","templateKey","templateLabel","applyPatchToPuck","summarize","template","id","name","category","source","ai","description","instructions","resolveTemplates","templatesConfig","builtins","valid","fetchQuery","queryKey","queryFn","listTemplates","templates","map","insertTemplate","dispatch","data","config","templateId","dest","propTransforms","find","t","ok","error","destinationId","destinationSlot","targetsRoot","content","zone","undefined","action","components","destinationZone","destinationIndex"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/templates.ts"],"sourcesContent":["import type { Config, Data, PuckAction } from '@puckeditor/core';\n\nimport type {\n PuckPropTransforms,\n PuckTemplatesConfig,\n} from '../../content-model.ts';\nimport {\n getEditorQueryClient,\n TEMPLATES_QUERY_KEY,\n} from '../../editor-query-client.ts';\nimport {\n expandTemplate,\n fetchTemplates,\n isRootLevelTemplate,\n mergeTemplates,\n templateKey,\n templateLabel,\n type BuiltinTemplate,\n type Template,\n} from '../templates-plugin/templates.ts';\nimport { applyPatchToPuck, type PatchResult } from './apply-patch-to-puck.ts';\n\ntype Dispatch = (action: PuckAction) => void;\n\nexport type TemplateDestination = {\n destinationId?: string;\n destinationSlot?: string;\n destinationIndex?: number;\n};\n\nconst summarize = (template: Template) => ({\n id: templateKey(template),\n name: templateLabel(template, 'en'),\n category: template.category,\n source: template.source,\n ...(template.ai\n ? {\n ai: {\n ...(template.ai.description\n ? { description: template.ai.description }\n : {}),\n ...(template.ai.instructions\n ? { instructions: template.ai.instructions }\n : {}),\n },\n }\n : {}),\n});\n\nasync function resolveTemplates(\n templatesConfig: PuckTemplatesConfig,\n builtins: BuiltinTemplate[]\n): Promise<Template[]> {\n const { valid } = await getEditorQueryClient().fetchQuery({\n queryKey: [...TEMPLATES_QUERY_KEY],\n queryFn: () => fetchTemplates(templatesConfig),\n });\n return mergeTemplates(builtins, valid);\n}\n\nexport async function listTemplates(\n templatesConfig: PuckTemplatesConfig,\n builtins: BuiltinTemplate[]\n) {\n const templates = await resolveTemplates(templatesConfig, builtins);\n return templates.map(summarize);\n}\n\nexport async function insertTemplate(\n dispatch: Dispatch,\n data: Data | undefined,\n config: Config,\n templatesConfig: PuckTemplatesConfig,\n builtins: BuiltinTemplate[],\n templateId: string,\n dest?: TemplateDestination,\n propTransforms?: PuckPropTransforms\n): Promise<PatchResult> {\n const templates = await resolveTemplates(templatesConfig, builtins);\n const template = templates.find((t) => templateKey(t) === templateId);\n if (!template) {\n return { ok: false, error: `template \"${templateId}\" not found` };\n }\n if (dest?.destinationId && !dest.destinationSlot) {\n return {\n ok: false,\n error: 'destinationSlot is required with destinationId',\n };\n }\n\n const targetsRoot = !(dest?.destinationId && dest?.destinationSlot);\n if (template.category === 'block' && targetsRoot) {\n return {\n ok: false,\n error:\n 'block templates cannot be inserted at the page root; pass destinationId and destinationSlot',\n };\n }\n if (isRootLevelTemplate(template) && !targetsRoot) {\n return {\n ok: false,\n error: `${template.category} templates can only be inserted at the page root; omit destinationId and destinationSlot`,\n };\n }\n\n const { content } = expandTemplate(\n template,\n config,\n templateLabel(template, 'en'),\n propTransforms\n );\n const zone = dest?.destinationId\n ? `${dest.destinationId}:${dest.destinationSlot}`\n : undefined;\n\n return applyPatchToPuck(dispatch, data, config, {\n action: 'addMany',\n components: content,\n destinationZone: zone,\n destinationIndex: dest?.destinationIndex,\n });\n}\n"],"mappings":"AAMA,SACEA,oBAAoB,EACpBC,mBAAmB,QACd,8BAA8B;AACrC,SACEC,cAAc,EACdC,cAAc,EACdC,mBAAmB,EACnBC,cAAc,EACdC,WAAW,EACXC,aAAa,QAGR,kCAAkC;AACzC,SAASC,gBAAgB,QAA0B,0BAA0B;AAU7E,MAAMC,SAAS,GAAIC,QAAkB,KAAM;EACzCC,EAAE,EAAEL,WAAW,CAACI,QAAQ,CAAC;EACzBE,IAAI,EAAEL,aAAa,CAACG,QAAQ,EAAE,IAAI,CAAC;EACnCG,QAAQ,EAAEH,QAAQ,CAACG,QAAQ;EAC3BC,MAAM,EAAEJ,QAAQ,CAACI,MAAM;EACvB,IAAIJ,QAAQ,CAACK,EAAE,GACX;IACEA,EAAE,EAAE;MACF,IAAIL,QAAQ,CAACK,EAAE,CAACC,WAAW,GACvB;QAAEA,WAAW,EAAEN,QAAQ,CAACK,EAAE,CAACC;MAAY,CAAC,GACxC,CAAC,CAAC,CAAC;MACP,IAAIN,QAAQ,CAACK,EAAE,CAACE,YAAY,GACxB;QAAEA,YAAY,EAAEP,QAAQ,CAACK,EAAE,CAACE;MAAa,CAAC,GAC1C,CAAC,CAAC;IACR;EACF,CAAC,GACD,CAAC,CAAC;AACR,CAAC,CAAC;AAEF,eAAeC,gBAAgBA,CAC7BC,eAAoC,EACpCC,QAA2B,EACN;EACrB,MAAM;IAAEC;EAAM,CAAC,GAAG,MAAMrB,oBAAoB,CAAC,CAAC,CAACsB,UAAU,CAAC;IACxDC,QAAQ,EAAE,CAAC,GAAGtB,mBAAmB,CAAC;IAClCuB,OAAO,EAAEA,CAAA,KAAMrB,cAAc,CAACgB,eAAe;EAC/C,CAAC,CAAC;EACF,OAAOd,cAAc,CAACe,QAAQ,EAAEC,KAAK,CAAC;AACxC;AAEA,OAAO,eAAeI,aAAaA,CACjCN,eAAoC,EACpCC,QAA2B,EAC3B;EACA,MAAMM,SAAS,GAAG,MAAMR,gBAAgB,CAACC,eAAe,EAAEC,QAAQ,CAAC;EACnE,OAAOM,SAAS,CAACC,GAAG,CAAClB,SAAS,CAAC;AACjC;AAEA,OAAO,eAAemB,cAAcA,CAClCC,QAAkB,EAClBC,IAAsB,EACtBC,MAAc,EACdZ,eAAoC,EACpCC,QAA2B,EAC3BY,UAAkB,EAClBC,IAA0B,EAC1BC,cAAmC,EACb;EACtB,MAAMR,SAAS,GAAG,MAAMR,gBAAgB,CAACC,eAAe,EAAEC,QAAQ,CAAC;EACnE,MAAMV,QAAQ,GAAGgB,SAAS,CAACS,IAAI,CAAEC,CAAC,IAAK9B,WAAW,CAAC8B,CAAC,CAAC,KAAKJ,UAAU,CAAC;EACrE,IAAI,CAACtB,QAAQ,EAAE;IACb,OAAO;MAAE2B,EAAE,EAAE,KAAK;MAAEC,KAAK,EAAE,aAAaN,UAAU;IAAc,CAAC;EACnE;EACA,IAAIC,IAAI,EAAEM,aAAa,IAAI,CAACN,IAAI,CAACO,eAAe,EAAE;IAChD,OAAO;MACLH,EAAE,EAAE,KAAK;MACTC,KAAK,EAAE;IACT,CAAC;EACH;EAEA,MAAMG,WAAW,GAAG,EAAER,IAAI,EAAEM,aAAa,IAAIN,IAAI,EAAEO,eAAe,CAAC;EACnE,IAAI9B,QAAQ,CAACG,QAAQ,KAAK,OAAO,IAAI4B,WAAW,EAAE;IAChD,OAAO;MACLJ,EAAE,EAAE,KAAK;MACTC,KAAK,EACH;IACJ,CAAC;EACH;EACA,IAAIlC,mBAAmB,CAACM,QAAQ,CAAC,IAAI,CAAC+B,WAAW,EAAE;IACjD,OAAO;MACLJ,EAAE,EAAE,KAAK;MACTC,KAAK,EAAE,GAAG5B,QAAQ,CAACG,QAAQ;IAC7B,CAAC;EACH;EAEA,MAAM;IAAE6B;EAAQ,CAAC,GAAGxC,cAAc,CAChCQ,QAAQ,EACRqB,MAAM,EACNxB,aAAa,CAACG,QAAQ,EAAE,IAAI,CAAC,EAC7BwB,cACF,CAAC;EACD,MAAMS,IAAI,GAAGV,IAAI,EAAEM,aAAa,GAC5B,GAAGN,IAAI,CAACM,aAAa,IAAIN,IAAI,CAACO,eAAe,EAAE,GAC/CI,SAAS;EAEb,OAAOpC,gBAAgB,CAACqB,QAAQ,EAAEC,IAAI,EAAEC,MAAM,EAAE;IAC9Cc,MAAM,EAAE,SAAS;IACjBC,UAAU,EAAEJ,OAAO;IACnBK,eAAe,EAAEJ,IAAI;IACrBK,gBAAgB,EAAEf,IAAI,EAAEe;EAC1B,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaType } from './constants.
|
|
1
|
+
import { MediaType } from './constants.js';
|
|
2
2
|
type UploadMediaParams = {
|
|
3
3
|
lang: string | undefined;
|
|
4
4
|
type?: MediaType;
|
|
@@ -17,4 +17,3 @@ export declare function uploadMedia({ lang, type, url, name, alt, }: UploadMedia
|
|
|
17
17
|
data: unknown;
|
|
18
18
|
}>;
|
|
19
19
|
export {};
|
|
20
|
-
//# sourceMappingURL=upload-media.d.ts.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { useEffect, useRef } from 'react';
|
|
5
|
-
import { createPage } from
|
|
6
|
-
import { buildHelp } from
|
|
5
|
+
import { createPage } from "./create-page.js";
|
|
6
|
+
import { buildHelp } from "./help.js";
|
|
7
7
|
export function useAgentHandle(params) {
|
|
8
8
|
const $ = _c(5);
|
|
9
9
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-handle.js","names":["c","_c","useEffect","useRef","createPage","buildHelp","useAgentHandle","params","$","isLoggedIn","live","t0","current","t1","t2","window","handle","puckAgent","methods","help","_temp","open","close","isOpen","isEditMode","isReady","getPage","title","alias","type","fieldName","lang","Object","assign","h","key","keys","name"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/use-agent-handle.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\n\nimport { createPage } from './create-page';\nimport { buildHelp } from './help';\n\ndeclare global {\n interface Window {\n puckAgent?: Record<string, unknown>;\n }\n}\n\ntype AgentHandleParams = {\n isLoggedIn: boolean;\n open: () => void;\n close: () => void;\n isEditMode: boolean;\n type?: string;\n fieldName: string;\n lang: string;\n};\n\nexport function useAgentHandle(params: AgentHandleParams) {\n const { isLoggedIn } = params;\n const live = useRef(params);\n useEffect(() => {\n live.current = params;\n });\n\n useEffect(() => {\n if (typeof window === 'undefined' || !isLoggedIn) return;\n\n const handle = (window.puckAgent = window.puckAgent || {});\n const methods = {\n help: (name?: string) => buildHelp(window.puckAgent, name),\n open: () => live.current.open(),\n close: () => live.current.close(),\n isOpen: () => live.current.isEditMode,\n isReady: () => typeof handle.getPage === 'function',\n createPage: (title: string, alias?: string) =>\n createPage({\n title,\n alias,\n type: live.current.type,\n fieldName: live.current.fieldName,\n lang: live.current.lang,\n }),\n };\n Object.assign(handle, methods);\n\n return () => {\n const h = window.puckAgent;\n if (!h) return;\n for (const key of Object.keys(methods)) delete h[key];\n };\n }, [isLoggedIn]);\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,UAAU,QAAQ,
|
|
1
|
+
{"version":3,"file":"use-agent-handle.js","names":["c","_c","useEffect","useRef","createPage","buildHelp","useAgentHandle","params","$","isLoggedIn","live","t0","current","t1","t2","window","handle","puckAgent","methods","help","_temp","open","close","isOpen","isEditMode","isReady","getPage","title","alias","type","fieldName","lang","Object","assign","h","key","keys","name"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/use-agent-handle.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\n\nimport { createPage } from './create-page.ts';\nimport { buildHelp } from './help.ts';\n\ndeclare global {\n interface Window {\n puckAgent?: Record<string, unknown>;\n }\n}\n\ntype AgentHandleParams = {\n isLoggedIn: boolean;\n open: () => void;\n close: () => void;\n isEditMode: boolean;\n type?: string;\n fieldName: string;\n lang: string;\n};\n\nexport function useAgentHandle(params: AgentHandleParams) {\n const { isLoggedIn } = params;\n const live = useRef(params);\n useEffect(() => {\n live.current = params;\n });\n\n useEffect(() => {\n if (typeof window === 'undefined' || !isLoggedIn) return;\n\n const handle = (window.puckAgent = window.puckAgent || {});\n const methods = {\n help: (name?: string) => buildHelp(window.puckAgent, name),\n open: () => live.current.open(),\n close: () => live.current.close(),\n isOpen: () => live.current.isEditMode,\n isReady: () => typeof handle.getPage === 'function',\n createPage: (title: string, alias?: string) =>\n createPage({\n title,\n alias,\n type: live.current.type,\n fieldName: live.current.fieldName,\n lang: live.current.lang,\n }),\n };\n Object.assign(handle, methods);\n\n return () => {\n const h = window.puckAgent;\n if (!h) return;\n for (const key of Object.keys(methods)) delete h[key];\n };\n }, [isLoggedIn]);\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,SAAS,QAAQ,WAAW;AAkBrC,OAAO,SAAAC,eAAAC,MAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EACL;IAAAQ;EAAA,IAAuBF,MAAM;EAC7B,MAAAG,IAAA,GAAaP,MAAM,CAACI,MAAM,CAAC;EAAC,IAAAI,EAAA;EAAA,IAAAH,CAAA,QAAAD,MAAA;IAClBI,EAAA,GAAAA,CAAA;MACRD,IAAI,CAAAE,OAAA,GAAWL,MAAH;IAAA,CACb;IAAAC,CAAA,MAAAD,MAAA;IAAAC,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAFDN,SAAS,CAACS,EAET,CAAC;EAAA,IAAAE,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAN,CAAA,QAAAC,UAAA;IAEQI,EAAA,GAAAA,CAAA;MACR,IAAI,OAAOE,MAAM,KAAK,WAA0B,IAA5C,CAAkCN,UAAU;QAAA;MAAA;MAEhD,MAAAO,MAAA,GAAgBD,MAAM,CAAAE,SAAA,GAAaF,MAAM,CAAAE,SAAgB,IAAtB,CAAqB,CAAxB;MAChC,MAAAC,OAAA,GAAgB;QAAAC,IAAA,EACRC,KAAoD;QAAAC,IAAA,EACpDA,CAAA,KAAMX,IAAI,CAAAE,OAAQ,CAAAS,IAAK,CAAC,CAAC;QAAAC,KAAA,EACxBA,CAAA,KAAMZ,IAAI,CAAAE,OAAQ,CAAAU,KAAM,CAAC,CAAC;QAAAC,MAAA,EACzBA,CAAA,KAAMb,IAAI,CAAAE,OAAQ,CAAAY,UAAW;QAAAC,OAAA,EAC5BA,CAAA,KAAM,OAAOT,MAAM,CAAAU,OAAQ,KAAK,UAAU;QAAAtB,UAAA,EACvCA,CAAAuB,KAAA,EAAAC,KAAA,KACVxB,UAAU,CAAC;UAAAuB,KAAA;UAAAC,KAAA;UAAAC,IAAA,EAGHnB,IAAI,CAAAE,OAAQ,CAAAiB,IAAK;UAAAC,SAAA,EACZpB,IAAI,CAAAE,OAAQ,CAAAkB,SAAU;UAAAC,IAAA,EAC3BrB,IAAI,CAAAE,OAAQ,CAAAmB;QACpB,CAAC;MACL,CAAC;MACDC,MAAM,CAAAC,MAAO,CAACjB,MAAM,EAAEE,OAAO,CAAC;MAAA,OAEvB;QACL,MAAAgB,CAAA,GAAUnB,MAAM,CAAAE,SAAU;QAC1B,IAAI,CAACiB,CAAC;UAAA;QAAA;QACN,KAAK,MAAAC,GAAS,IAAIH,MAAM,CAAAI,IAAK,CAAClB,OAAO,CAAC;UAAE,OAAOgB,CAAC,CAACC,GAAG,CAAC;QAAA;MAAC,CACvD;IAAA,CACF;IAAErB,EAAA,IAACL,UAAU,CAAC;IAAAD,CAAA,MAAAC,UAAA;IAAAD,CAAA,MAAAK,EAAA;IAAAL,CAAA,MAAAM,EAAA;EAAA;IAAAD,EAAA,GAAAL,CAAA;IAAAM,EAAA,GAAAN,CAAA;EAAA;EA1BfN,SAAS,CAACW,EA0BT,EAAEC,EAAY,CAAC;AAAA;AAjCX,SAAAM,MAAAiB,IAAA;EAAA,OAYwBhC,SAAS,CAACU,MAAM,CAAAE,SAAU,EAAEoB,IAAI,CAAC;AAAA","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
|
-
import { GroupedDrawerPanel } from
|
|
5
|
-
import { usePickerModel } from
|
|
6
|
-
import { usePuckDictionary } from
|
|
4
|
+
import { GroupedDrawerPanel } from "../../editor/grouped-drawer-panel.js";
|
|
5
|
+
import { usePickerModel } from "../../editor/picker-model.js";
|
|
6
|
+
import { usePuckDictionary } from "../../i18n.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export function BlocksPanel() {
|
|
9
9
|
const $ = _c(6);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks-panel.js","names":["c","_c","GroupedDrawerPanel","usePickerModel","usePuckDictionary","jsx","_jsx","BlocksPanel","$","t","blocks","pinnedBlockEntries","blockGroups","insertBlockEntry","t0","noBlocksFound","searchPlaceholder","focusKey","noResultsLabel"],"sources":["../../../../../src/puck-editor/internal/plugins/blocks-plugin/blocks-panel.tsx"],"sourcesContent":["'use client';\n\nimport { GroupedDrawerPanel } from '../../editor/grouped-drawer-panel';\nimport { usePickerModel } from '../../editor/picker-model';\nimport { usePuckDictionary } from '../../i18n';\n\nexport function BlocksPanel() {\n const t = usePuckDictionary().blocks;\n const { pinnedBlockEntries, blockGroups, insertBlockEntry } =\n usePickerModel();\n\n return (\n <GroupedDrawerPanel\n focusKey=\"blocks\"\n searchPlaceholder={t.searchPlaceholder}\n noResultsLabel={t.noBlocksFound}\n pinned={pinnedBlockEntries}\n groups={blockGroups}\n onInsert={insertBlockEntry}\n />\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,kBAAkB,QAAQ,
|
|
1
|
+
{"version":3,"file":"blocks-panel.js","names":["c","_c","GroupedDrawerPanel","usePickerModel","usePuckDictionary","jsx","_jsx","BlocksPanel","$","t","blocks","pinnedBlockEntries","blockGroups","insertBlockEntry","t0","noBlocksFound","searchPlaceholder","focusKey","noResultsLabel"],"sources":["../../../../../src/puck-editor/internal/plugins/blocks-plugin/blocks-panel.tsx"],"sourcesContent":["'use client';\n\nimport { GroupedDrawerPanel } from '../../editor/grouped-drawer-panel.tsx';\nimport { usePickerModel } from '../../editor/picker-model.ts';\nimport { usePuckDictionary } from '../../i18n.tsx';\n\nexport function BlocksPanel() {\n const t = usePuckDictionary().blocks;\n const { pinnedBlockEntries, blockGroups, insertBlockEntry } =\n usePickerModel();\n\n return (\n <GroupedDrawerPanel\n focusKey=\"blocks\"\n searchPlaceholder={t.searchPlaceholder}\n noResultsLabel={t.noBlocksFound}\n pinned={pinnedBlockEntries}\n groups={blockGroups}\n onInsert={insertBlockEntry}\n />\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,kBAAkB,QAAQ,sCAAuC;AAC1E,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,iBAAiB,QAAQ,eAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,SAAAC,YAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EACL,MAAAQ,CAAA,GAAUL,iBAAiB,CAAC,CAAC,CAAAM,MAAO;EACpC;IAAAC,kBAAA;IAAAC,WAAA;IAAAC;EAAA,IACEV,cAAc,CAAC,CAAC;EAAC,IAAAW,EAAA;EAAA,IAAAN,CAAA,QAAAI,WAAA,IAAAJ,CAAA,QAAAK,gBAAA,IAAAL,CAAA,QAAAG,kBAAA,IAAAH,CAAA,QAAAC,CAAA,CAAAM,aAAA,IAAAP,CAAA,QAAAC,CAAA,CAAAO,iBAAA;IAGjBF,EAAA,gBAAAR,IAAA,CAACJ,kBAAkB;MACRe,QAAQ,EAAR,QAAQ;MACED,iBAAmB,EAAnBP,CAAC,CAAAO,iBAAkB;MACtBE,cAAe,EAAfT,CAAC,CAAAM,aAAc;MACvBJ,MAAkB,EAAlBA,kBAAkB;MAClBC,MAAW,EAAXA,WAAW;MACTC,QAAgB,EAAhBA;IAAgB,CAC3B,CAAC;IAAAL,CAAA,MAAAI,WAAA;IAAAJ,CAAA,MAAAK,gBAAA;IAAAL,CAAA,MAAAG,kBAAA;IAAAH,CAAA,MAAAC,CAAA,CAAAM,aAAA;IAAAP,CAAA,MAAAC,CAAA,CAAAO,iBAAA;IAAAR,CAAA,MAAAM,EAAA;EAAA;IAAAA,EAAA,GAAAN,CAAA;EAAA;EAAA,OAPFM,EAOE;AAAA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { BlocksIcon } from 'lucide-react';
|
|
4
|
-
import { BlocksPanel } from
|
|
4
|
+
import { BlocksPanel } from "./blocks-panel.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export function createBlocksPlugin({
|
|
7
7
|
label = 'Blocks'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks-plugin.js","names":["BlocksIcon","BlocksPanel","jsx","_jsx","createBlocksPlugin","label","name","icon","className","render"],"sources":["../../../../../src/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.tsx"],"sourcesContent":["'use client';\n\nimport { Plugin } from '@puckeditor/core';\nimport { BlocksIcon } from 'lucide-react';\n\nimport { BlocksPanel } from './blocks-panel';\n\ntype CreateBlocksPluginOptions = {\n label?: string;\n};\n\nexport function createBlocksPlugin({\n label = 'Blocks',\n}: CreateBlocksPluginOptions = {}): Plugin {\n return {\n name: 'blocks',\n label,\n icon: <BlocksIcon className=\"nh:size-6\" />,\n render: () => <BlocksPanel />,\n };\n}\n"],"mappings":"AAAA,YAAY;;AAGZ,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,WAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"blocks-plugin.js","names":["BlocksIcon","BlocksPanel","jsx","_jsx","createBlocksPlugin","label","name","icon","className","render"],"sources":["../../../../../src/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.tsx"],"sourcesContent":["'use client';\n\nimport { Plugin } from '@puckeditor/core';\nimport { BlocksIcon } from 'lucide-react';\n\nimport { BlocksPanel } from './blocks-panel.tsx';\n\ntype CreateBlocksPluginOptions = {\n label?: string;\n};\n\nexport function createBlocksPlugin({\n label = 'Blocks',\n}: CreateBlocksPluginOptions = {}): Plugin {\n return {\n name: 'blocks',\n label,\n icon: <BlocksIcon className=\"nh:size-6\" />,\n render: () => <BlocksPanel />,\n };\n}\n"],"mappings":"AAAA,YAAY;;AAGZ,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,WAAW,QAAQ,mBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMjD,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,KAAK,GAAG;AACiB,CAAC,GAAG,CAAC,CAAC,EAAU;EACzC,OAAO;IACLC,IAAI,EAAE,QAAQ;IACdD,KAAK;IACLE,IAAI,eAAEJ,IAAA,CAACH,UAAU;MAACQ,SAAS,EAAC;IAAW,CAAE,CAAC;IAC1CC,MAAM,EAAEA,CAAA,kBAAMN,IAAA,CAACF,WAAW,IAAE;EAC9B,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { createBlocksPlugin } from './blocks-plugin';
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { createBlocksPlugin } from './blocks-plugin.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createBlocksPlugin } from
|
|
1
|
+
export { createBlocksPlugin } from "./blocks-plugin.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createBlocksPlugin"],"sources":["../../../../../src/puck-editor/internal/plugins/blocks-plugin/index.ts"],"sourcesContent":["export { createBlocksPlugin } from './blocks-plugin';\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","names":["createBlocksPlugin"],"sources":["../../../../../src/puck-editor/internal/plugins/blocks-plugin/index.ts"],"sourcesContent":["export { createBlocksPlugin } from './blocks-plugin.tsx';\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,oBAAqB","ignoreList":[]}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { createOutlinePlugin } from './outline-plugin';
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { createOutlinePlugin } from './outline-plugin.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createOutlinePlugin } from
|
|
1
|
+
export { createOutlinePlugin } from "./outline-plugin.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createOutlinePlugin"],"sources":["../../../../../src/puck-editor/internal/plugins/outline-plugin/index.ts"],"sourcesContent":["export { createOutlinePlugin } from './outline-plugin';\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","names":["createOutlinePlugin"],"sources":["../../../../../src/puck-editor/internal/plugins/outline-plugin/index.ts"],"sourcesContent":["export { createOutlinePlugin } from './outline-plugin.tsx';\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,qBAAsB","ignoreList":[]}
|
|
@@ -4,14 +4,15 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { createUsePuck } from '@puckeditor/core';
|
|
6
6
|
import { ChevronDownIcon, ChevronRightIcon, ChevronsDownUpIcon, ChevronsUpDownIcon, CirclePlusIcon, CopyIcon, PencilIcon, Trash2Icon } from 'lucide-react';
|
|
7
|
-
import { cn } from
|
|
8
|
-
import { allowedTypesForZone } from
|
|
9
|
-
import { CanvasAddPicker } from
|
|
10
|
-
import { scrollToCanvas } from
|
|
11
|
-
import { componentIcon, templateIcon } from
|
|
12
|
-
import { usePuckDictionary } from
|
|
13
|
-
import { Popover, PopoverContent, PopoverTrigger } from
|
|
14
|
-
import {
|
|
7
|
+
import { cn } from "../../../../shared/cn.js";
|
|
8
|
+
import { allowedTypesForZone } from "../../editor/allowed-types.js";
|
|
9
|
+
import { CanvasAddPicker } from "../../editor/canvas-add-picker.js";
|
|
10
|
+
import { scrollToCanvas } from "../../editor/canvas-scroll.js";
|
|
11
|
+
import { componentIcon, templateIcon } from "../../editor/component-icons.js";
|
|
12
|
+
import { usePuckDictionary } from "../../i18n.js";
|
|
13
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
14
|
+
import { ScrollArea } from "../../ui/scroll-area.js";
|
|
15
|
+
import { buildTree, collectAncestorIds, collectContainerIds, collectDescendantIds, indexZones, isTypeAllowed, NAME_PROP, planDrop, ROOT_ZONE, sectionComponentTypes } from "./outline-tree.js";
|
|
15
16
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const usePuck = createUsePuck();
|
|
17
18
|
const INDENT = 12;
|
|
@@ -20,7 +21,7 @@ const ICON_OFFSET = 20;
|
|
|
20
21
|
const HOVER_EXPAND_DELAY = 600;
|
|
21
22
|
const gapIndent = target => target.depth * INDENT + ROW_BASE_PADDING + ICON_OFFSET;
|
|
22
23
|
export function OutlinePanel() {
|
|
23
|
-
const $ = _c(
|
|
24
|
+
const $ = _c(37);
|
|
24
25
|
const t = usePuckDictionary().outline;
|
|
25
26
|
const tBlocks = usePuckDictionary().blocks;
|
|
26
27
|
const config = usePuck(_temp);
|
|
@@ -752,35 +753,49 @@ export function OutlinePanel() {
|
|
|
752
753
|
} else {
|
|
753
754
|
t13 = $[28];
|
|
754
755
|
}
|
|
755
|
-
const
|
|
756
|
-
const
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
756
|
+
const T0 = ScrollArea;
|
|
757
|
+
const t14 = "nh:min-h-0 nh:flex-1";
|
|
758
|
+
const t15 = "tree";
|
|
759
|
+
const t16 = "nh:py-2";
|
|
760
|
+
const t17 = renderZone(rootZone, 0, false, []);
|
|
761
|
+
let t18;
|
|
762
|
+
if ($[29] !== t17) {
|
|
763
|
+
t18 = /*#__PURE__*/_jsx("div", {
|
|
764
|
+
role: t15,
|
|
765
|
+
className: t16,
|
|
766
|
+
children: t17
|
|
765
767
|
});
|
|
766
|
-
$[29] =
|
|
767
|
-
$[30] =
|
|
768
|
+
$[29] = t17;
|
|
769
|
+
$[30] = t18;
|
|
768
770
|
} else {
|
|
769
|
-
|
|
771
|
+
t18 = $[30];
|
|
770
772
|
}
|
|
771
|
-
let
|
|
772
|
-
if ($[31] !==
|
|
773
|
-
|
|
773
|
+
let t19;
|
|
774
|
+
if ($[31] !== T0 || $[32] !== t18) {
|
|
775
|
+
t19 = /*#__PURE__*/_jsx(T0, {
|
|
776
|
+
className: t14,
|
|
777
|
+
viewportRef: panelRef,
|
|
778
|
+
children: t18
|
|
779
|
+
});
|
|
780
|
+
$[31] = T0;
|
|
781
|
+
$[32] = t18;
|
|
782
|
+
$[33] = t19;
|
|
783
|
+
} else {
|
|
784
|
+
t19 = $[33];
|
|
785
|
+
}
|
|
786
|
+
let t20;
|
|
787
|
+
if ($[34] !== t13 || $[35] !== t19) {
|
|
788
|
+
t20 = /*#__PURE__*/_jsxs("div", {
|
|
774
789
|
className: t12,
|
|
775
|
-
children: [t13,
|
|
790
|
+
children: [t13, t19]
|
|
776
791
|
});
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
792
|
+
$[34] = t13;
|
|
793
|
+
$[35] = t19;
|
|
794
|
+
$[36] = t20;
|
|
780
795
|
} else {
|
|
781
|
-
|
|
796
|
+
t20 = $[36];
|
|
782
797
|
}
|
|
783
|
-
return
|
|
798
|
+
return t20;
|
|
784
799
|
}
|
|
785
800
|
function _temp0(e_11) {
|
|
786
801
|
return e_11.preventDefault();
|