@nodehive/nextjs 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/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/message-codes.d.ts +2 -0
- package/dist/puck-editor/internal/api/message-codes.js +2 -0
- package/dist/puck-editor/internal/api/message-codes.js.map +1 -0
- 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 +108 -135
- 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 +28 -41
- 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 +7 -5
- package/dist/puck-editor/internal/editor/grouped-entry-list.js +85 -56
- 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/unsaved-changes-guard.d.ts +3 -0
- package/dist/puck-editor/internal/editor/unsaved-changes-guard.js +38 -0
- package/dist/puck-editor/internal/editor/unsaved-changes-guard.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-dirty-baseline.d.ts +5 -0
- package/dist/puck-editor/internal/editor/use-dirty-baseline.js +72 -0
- package/dist/puck-editor/internal/editor/use-dirty-baseline.js.map +1 -0
- 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 +1 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.js +59 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.js.map +1 -0
- 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 +124 -115
- 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 +8 -3
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +59 -61
- 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 +8 -8
- 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/search-control.d.ts +3 -3
- package/dist/puck-editor/internal/ui/search-control.js +29 -26
- 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/assemble-smart-actions.d.ts +14 -0
- package/dist/smart-actions/internal/assemble-smart-actions.js +11 -0
- package/dist/smart-actions/internal/assemble-smart-actions.js.map +1 -0
- 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 +19 -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-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
|
@@ -4,55 +4,94 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { Button, createUsePuck } from '@puckeditor/core';
|
|
6
6
|
import { Loader2Icon } from 'lucide-react';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { usePuckDictionary } from "../i18n.js";
|
|
8
|
+
import { useIsDirty } from "./use-is-dirty.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const usePuck = createUsePuck();
|
|
11
11
|
export function HeaderSaveButton(t0) {
|
|
12
|
-
const $ = _c(
|
|
12
|
+
const $ = _c(18);
|
|
13
13
|
const {
|
|
14
|
-
onSave
|
|
14
|
+
onSave,
|
|
15
|
+
savedVersion
|
|
15
16
|
} = t0;
|
|
16
17
|
const t = usePuckDictionary().editor;
|
|
17
18
|
const [isSaving, setIsSaving] = useState(false);
|
|
19
|
+
const [hasError, setHasError] = useState(false);
|
|
18
20
|
const appState = usePuck(_temp);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const dirty = useIsDirty(savedVersion);
|
|
22
|
+
const t1 = dirty ? t.unsavedChanges : undefined;
|
|
23
|
+
const t2 = hasError ? "secondary" : "primary";
|
|
24
|
+
let t3;
|
|
25
|
+
if ($[0] !== appState.data || $[1] !== onSave) {
|
|
26
|
+
t3 = () => {
|
|
22
27
|
setIsSaving(true);
|
|
23
|
-
|
|
28
|
+
setHasError(false);
|
|
29
|
+
Promise.resolve(onSave(appState.data)).then(result => setHasError(!result.ok)).catch(() => setHasError(true)).finally(() => setIsSaving(false));
|
|
24
30
|
};
|
|
25
31
|
$[0] = appState.data;
|
|
26
32
|
$[1] = onSave;
|
|
27
|
-
$[2] =
|
|
28
|
-
$[3] = t1;
|
|
33
|
+
$[2] = t3;
|
|
29
34
|
} else {
|
|
30
|
-
|
|
35
|
+
t3 = $[2];
|
|
31
36
|
}
|
|
32
|
-
let
|
|
33
|
-
if ($[
|
|
34
|
-
|
|
37
|
+
let t4;
|
|
38
|
+
if ($[3] !== isSaving) {
|
|
39
|
+
t4 = isSaving && /*#__PURE__*/_jsx(Loader2Icon, {
|
|
35
40
|
className: "nh:mr-1 nh:size-4 nh:animate-spin"
|
|
36
41
|
});
|
|
37
|
-
$[
|
|
38
|
-
$[
|
|
42
|
+
$[3] = isSaving;
|
|
43
|
+
$[4] = t4;
|
|
39
44
|
} else {
|
|
40
|
-
|
|
45
|
+
t4 = $[4];
|
|
41
46
|
}
|
|
42
|
-
let
|
|
43
|
-
if ($[6] !== t.save || $[7] !==
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[5] !== isSaving || $[6] !== t.save || $[7] !== t2 || $[8] !== t3 || $[9] !== t4) {
|
|
49
|
+
t5 = /*#__PURE__*/_jsxs(Button, {
|
|
50
|
+
variant: t2,
|
|
51
|
+
disabled: isSaving,
|
|
52
|
+
onClick: t3,
|
|
53
|
+
children: [t4, t.save]
|
|
47
54
|
});
|
|
55
|
+
$[5] = isSaving;
|
|
48
56
|
$[6] = t.save;
|
|
49
|
-
$[7] =
|
|
50
|
-
$[8] =
|
|
51
|
-
$[9] =
|
|
57
|
+
$[7] = t2;
|
|
58
|
+
$[8] = t3;
|
|
59
|
+
$[9] = t4;
|
|
60
|
+
$[10] = t5;
|
|
61
|
+
} else {
|
|
62
|
+
t5 = $[10];
|
|
63
|
+
}
|
|
64
|
+
let t6;
|
|
65
|
+
if ($[11] !== dirty || $[12] !== isSaving) {
|
|
66
|
+
t6 = dirty && !isSaving && /*#__PURE__*/_jsx("span", {
|
|
67
|
+
"aria-hidden": true,
|
|
68
|
+
className: "nh:absolute nh:-right-0.5 nh:-top-0.5 nh:size-2.5 nh:rounded-full",
|
|
69
|
+
style: {
|
|
70
|
+
backgroundColor: "#f59e0b",
|
|
71
|
+
boxShadow: "0 0 0 2px var(--puck-color-surface)"
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
$[11] = dirty;
|
|
75
|
+
$[12] = isSaving;
|
|
76
|
+
$[13] = t6;
|
|
77
|
+
} else {
|
|
78
|
+
t6 = $[13];
|
|
79
|
+
}
|
|
80
|
+
let t7;
|
|
81
|
+
if ($[14] !== t1 || $[15] !== t5 || $[16] !== t6) {
|
|
82
|
+
t7 = /*#__PURE__*/_jsxs("span", {
|
|
83
|
+
className: "nh:relative nh:inline-flex",
|
|
84
|
+
title: t1,
|
|
85
|
+
children: [t5, t6]
|
|
86
|
+
});
|
|
87
|
+
$[14] = t1;
|
|
88
|
+
$[15] = t5;
|
|
89
|
+
$[16] = t6;
|
|
90
|
+
$[17] = t7;
|
|
52
91
|
} else {
|
|
53
|
-
|
|
92
|
+
t7 = $[17];
|
|
54
93
|
}
|
|
55
|
-
return
|
|
94
|
+
return t7;
|
|
56
95
|
}
|
|
57
96
|
function _temp(s) {
|
|
58
97
|
return s.appState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-save-button.js","names":["c","_c","useState","Button","createUsePuck","Loader2Icon","
|
|
1
|
+
{"version":3,"file":"header-save-button.js","names":["c","_c","useState","Button","createUsePuck","Loader2Icon","usePuckDictionary","useIsDirty","jsx","_jsx","jsxs","_jsxs","usePuck","HeaderSaveButton","t0","$","onSave","savedVersion","t","editor","isSaving","setIsSaving","hasError","setHasError","appState","_temp","dirty","t1","unsavedChanges","undefined","t2","t3","data","Promise","resolve","then","result","ok","catch","finally","t4","className","t5","save","variant","onClick","children","t6","style","backgroundColor","boxShadow","t7","title","s"],"sources":["../../../../src/puck-editor/internal/editor/header-save-button.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { Button, createUsePuck } from '@puckeditor/core';\nimport { Loader2Icon } from 'lucide-react';\n\nimport { usePuckDictionary } from '../i18n.tsx';\nimport { PuckSaveHandler } from './save-guard.ts';\nimport { useIsDirty } from './use-is-dirty.ts';\n\nconst usePuck = createUsePuck();\n\nexport function HeaderSaveButton({\n onSave,\n savedVersion,\n}: {\n onSave: PuckSaveHandler;\n savedVersion: number;\n}) {\n const t = usePuckDictionary().editor;\n const [isSaving, setIsSaving] = useState(false);\n const [hasError, setHasError] = useState(false);\n const appState = usePuck((s) => s.appState);\n const dirty = useIsDirty(savedVersion);\n\n return (\n <span\n className=\"nh:relative nh:inline-flex\"\n title={dirty ? t.unsavedChanges : undefined}\n >\n <Button\n variant={hasError ? 'secondary' : 'primary'}\n disabled={isSaving}\n onClick={() => {\n setIsSaving(true);\n setHasError(false);\n Promise.resolve(onSave(appState.data))\n .then((result) => setHasError(!result.ok))\n .catch(() => setHasError(true))\n .finally(() => setIsSaving(false));\n }}\n >\n {isSaving && (\n <Loader2Icon className=\"nh:mr-1 nh:size-4 nh:animate-spin\" />\n )}\n {t.save}\n </Button>\n {dirty && !isSaving && (\n <span\n aria-hidden\n className=\"nh:absolute nh:-right-0.5 nh:-top-0.5 nh:size-2.5 nh:rounded-full\"\n style={{\n backgroundColor: '#f59e0b',\n boxShadow: '0 0 0 2px var(--puck-color-surface)',\n }}\n />\n )}\n </span>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,MAAM,EAAEC,aAAa,QAAQ,kBAAkB;AACxD,SAASC,WAAW,QAAQ,cAAc;AAE1C,SAASC,iBAAiB,QAAQ,YAAa;AAE/C,SAASC,UAAU,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAMC,OAAO,GAAGR,aAAa,CAAC,CAAC;AAE/B,OAAO,SAAAS,iBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAd,EAAA;EAA0B;IAAAe,MAAA;IAAAC;EAAA,IAAAH,EAMhC;EACC,MAAAI,CAAA,GAAUZ,iBAAiB,CAAC,CAAC,CAAAa,MAAO;EACpC,OAAAC,QAAA,EAAAC,WAAA,IAAgCnB,QAAQ,CAAC,KAAK,CAAC;EAC/C,OAAAoB,QAAA,EAAAC,WAAA,IAAgCrB,QAAQ,CAAC,KAAK,CAAC;EAC/C,MAAAsB,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A,EAAA,GAAApC,CAAA;EAAA;EAAA,OA/BPoC,EA+BO;AAAA;AA7CJ,SAAA1B,MAAA4B,CAAA;EAAA,OAU2BA,CAAC,CAAA7B,QAAS;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useRef } from 'react';
|
|
5
|
+
import { usePuckDictionary } from "../i18n.js";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "../ui/dialog.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export function LeaveConfirmDialog(t0) {
|
|
9
|
+
const $ = _c(26);
|
|
10
|
+
const {
|
|
11
|
+
open,
|
|
12
|
+
onKeep,
|
|
13
|
+
onDiscard
|
|
14
|
+
} = t0;
|
|
15
|
+
const t = usePuckDictionary().editor;
|
|
16
|
+
const keepRef = useRef(null);
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== onKeep) {
|
|
19
|
+
t1 = next => {
|
|
20
|
+
if (!next) {
|
|
21
|
+
onKeep();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
$[0] = onKeep;
|
|
25
|
+
$[1] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[1];
|
|
28
|
+
}
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t2 = event => {
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
keepRef.current?.focus();
|
|
34
|
+
};
|
|
35
|
+
$[2] = t2;
|
|
36
|
+
} else {
|
|
37
|
+
t2 = $[2];
|
|
38
|
+
}
|
|
39
|
+
let t3;
|
|
40
|
+
if ($[3] !== t.leaveConfirmTitle) {
|
|
41
|
+
t3 = /*#__PURE__*/_jsx(DialogTitle, {
|
|
42
|
+
children: t.leaveConfirmTitle
|
|
43
|
+
});
|
|
44
|
+
$[3] = t.leaveConfirmTitle;
|
|
45
|
+
$[4] = t3;
|
|
46
|
+
} else {
|
|
47
|
+
t3 = $[4];
|
|
48
|
+
}
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[5] !== t.leaveConfirmBody) {
|
|
51
|
+
t4 = /*#__PURE__*/_jsx(DialogDescription, {
|
|
52
|
+
children: t.leaveConfirmBody
|
|
53
|
+
});
|
|
54
|
+
$[5] = t.leaveConfirmBody;
|
|
55
|
+
$[6] = t4;
|
|
56
|
+
} else {
|
|
57
|
+
t4 = $[6];
|
|
58
|
+
}
|
|
59
|
+
let t5;
|
|
60
|
+
if ($[7] !== t3 || $[8] !== t4) {
|
|
61
|
+
t5 = /*#__PURE__*/_jsxs(DialogHeader, {
|
|
62
|
+
children: [t3, t4]
|
|
63
|
+
});
|
|
64
|
+
$[7] = t3;
|
|
65
|
+
$[8] = t4;
|
|
66
|
+
$[9] = t5;
|
|
67
|
+
} else {
|
|
68
|
+
t5 = $[9];
|
|
69
|
+
}
|
|
70
|
+
let t6;
|
|
71
|
+
if ($[10] !== onDiscard || $[11] !== t.leaveConfirmDiscard) {
|
|
72
|
+
t6 = /*#__PURE__*/_jsx("button", {
|
|
73
|
+
type: "button",
|
|
74
|
+
onClick: onDiscard,
|
|
75
|
+
className: "nh:cursor-pointer nh:rounded-md nh:border nh:border-gray-200 nh:bg-white nh:px-3 nh:py-1.5 nh:text-sm nh:text-gray-700 nh:transition-colors nh:hover:bg-gray-50",
|
|
76
|
+
children: t.leaveConfirmDiscard
|
|
77
|
+
});
|
|
78
|
+
$[10] = onDiscard;
|
|
79
|
+
$[11] = t.leaveConfirmDiscard;
|
|
80
|
+
$[12] = t6;
|
|
81
|
+
} else {
|
|
82
|
+
t6 = $[12];
|
|
83
|
+
}
|
|
84
|
+
let t7;
|
|
85
|
+
if ($[13] !== onKeep || $[14] !== t.leaveConfirmKeep) {
|
|
86
|
+
t7 = /*#__PURE__*/_jsx("button", {
|
|
87
|
+
ref: keepRef,
|
|
88
|
+
type: "button",
|
|
89
|
+
onClick: onKeep,
|
|
90
|
+
className: "nh:cursor-pointer nh:rounded-md nh:bg-gray-900 nh:px-3 nh:py-1.5 nh:text-sm nh:font-medium nh:text-white nh:transition-colors nh:hover:bg-gray-700",
|
|
91
|
+
children: t.leaveConfirmKeep
|
|
92
|
+
});
|
|
93
|
+
$[13] = onKeep;
|
|
94
|
+
$[14] = t.leaveConfirmKeep;
|
|
95
|
+
$[15] = t7;
|
|
96
|
+
} else {
|
|
97
|
+
t7 = $[15];
|
|
98
|
+
}
|
|
99
|
+
let t8;
|
|
100
|
+
if ($[16] !== t6 || $[17] !== t7) {
|
|
101
|
+
t8 = /*#__PURE__*/_jsxs(DialogFooter, {
|
|
102
|
+
className: "nh:mt-2 nh:gap-2",
|
|
103
|
+
children: [t6, t7]
|
|
104
|
+
});
|
|
105
|
+
$[16] = t6;
|
|
106
|
+
$[17] = t7;
|
|
107
|
+
$[18] = t8;
|
|
108
|
+
} else {
|
|
109
|
+
t8 = $[18];
|
|
110
|
+
}
|
|
111
|
+
let t9;
|
|
112
|
+
if ($[19] !== t5 || $[20] !== t8) {
|
|
113
|
+
t9 = /*#__PURE__*/_jsxs(DialogContent, {
|
|
114
|
+
className: "nh:max-w-md",
|
|
115
|
+
onOpenAutoFocus: t2,
|
|
116
|
+
children: [t5, t8]
|
|
117
|
+
});
|
|
118
|
+
$[19] = t5;
|
|
119
|
+
$[20] = t8;
|
|
120
|
+
$[21] = t9;
|
|
121
|
+
} else {
|
|
122
|
+
t9 = $[21];
|
|
123
|
+
}
|
|
124
|
+
let t10;
|
|
125
|
+
if ($[22] !== open || $[23] !== t1 || $[24] !== t9) {
|
|
126
|
+
t10 = /*#__PURE__*/_jsx(Dialog, {
|
|
127
|
+
open: open,
|
|
128
|
+
onOpenChange: t1,
|
|
129
|
+
children: t9
|
|
130
|
+
});
|
|
131
|
+
$[22] = open;
|
|
132
|
+
$[23] = t1;
|
|
133
|
+
$[24] = t9;
|
|
134
|
+
$[25] = t10;
|
|
135
|
+
} else {
|
|
136
|
+
t10 = $[25];
|
|
137
|
+
}
|
|
138
|
+
return t10;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=leave-confirm-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leave-confirm-dialog.js","names":["c","_c","useRef","usePuckDictionary","Dialog","DialogContent","DialogDescription","DialogFooter","DialogHeader","DialogTitle","jsx","_jsx","jsxs","_jsxs","LeaveConfirmDialog","t0","$","open","onKeep","onDiscard","t","editor","keepRef","t1","next","t2","Symbol","for","event","preventDefault","current","focus","t3","leaveConfirmTitle","children","t4","leaveConfirmBody","t5","t6","leaveConfirmDiscard","type","className","t7","leaveConfirmKeep","t8","t9","onOpenAutoFocus","t10","onOpenChange"],"sources":["../../../../src/puck-editor/internal/editor/leave-confirm-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { useRef } from 'react';\n\nimport { usePuckDictionary } from '../i18n.tsx';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from '../ui/dialog.tsx';\n\nexport function LeaveConfirmDialog({\n open,\n onKeep,\n onDiscard,\n}: {\n open: boolean;\n onKeep: () => void;\n onDiscard: () => void;\n}) {\n const t = usePuckDictionary().editor;\n const keepRef = useRef<HTMLButtonElement>(null);\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!next) onKeep();\n }}\n >\n <DialogContent\n className=\"nh:max-w-md\"\n onOpenAutoFocus={(event) => {\n event.preventDefault();\n keepRef.current?.focus();\n }}\n >\n <DialogHeader>\n <DialogTitle>{t.leaveConfirmTitle}</DialogTitle>\n <DialogDescription>{t.leaveConfirmBody}</DialogDescription>\n </DialogHeader>\n <DialogFooter className=\"nh:mt-2 nh:gap-2\">\n <button\n type=\"button\"\n onClick={onDiscard}\n className=\"nh:cursor-pointer nh:rounded-md nh:border nh:border-gray-200 nh:bg-white nh:px-3 nh:py-1.5 nh:text-sm nh:text-gray-700 nh:transition-colors nh:hover:bg-gray-50\"\n >\n {t.leaveConfirmDiscard}\n </button>\n <button\n ref={keepRef}\n type=\"button\"\n onClick={onKeep}\n className=\"nh:cursor-pointer nh:rounded-md nh:bg-gray-900 nh:px-3 nh:py-1.5 nh:text-sm nh:font-medium nh:text-white nh:transition-colors nh:hover:bg-gray-700\"\n >\n {t.leaveConfirmKeep}\n </button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,MAAM,QAAQ,OAAO;AAE9B,SAASC,iBAAiB,QAAQ,YAAa;AAC/C,SACEC,MAAM,EACNC,aAAa,EACbC,iBAAiB,EACjBC,YAAY,EACZC,YAAY,EACZC,WAAW,QACN,iBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1B,OAAO,SAAAC,mBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAf,EAAA;EAA4B;IAAAgB,IAAA;IAAAC,MAAA;IAAAC;EAAA,IAAAJ,EAQlC;EACC,MAAAK,CAAA,GAAUjB,iBAAiB,CAAC,CAAC,CAAAkB,MAAO;EACpC,MAAAC,OAAA,GAAgBpB,MAAM,CAAoB,IAAI,CAAC;EAAC,IAAAqB,EAAA;EAAA,IAAAP,CAAA,QAAAE,MAAA;IAK9BK,EAAA,GAAAC,IAAA;MACZ,IAAI,CAACA,IAAI;QAAEN,MAAM,CAAC,CAAC;MAAA;IAAC,CACrB;IAAAF,CAAA,MAAAE,MAAA;IAAAF,CAAA,MAAAO,EAAA;EAAA;IAAAA,EAAA,GAAAP,CAAA;EAAA;EAAA,IAAAS,EAAA;EAAA,IAAAT,CAAA,QAAAU,MAAA,CAAAC,GAAA;IAIkBF,EAAA,GAAAG,KAAA;MACfA,KAAK,CAAAC,cAAe,CAAC,CAAC;MACt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AAA,OAAA6B,EAAA;EAAA;IAAAA,EAAA,GAAA7B,CAAA;EAAA;EAAA,IAAA+B,GAAA;EAAA,IAAA/B,CAAA,SAAAC,IAAA,IAAAD,CAAA,SAAAO,EAAA,IAAAP,CAAA,SAAA6B,EAAA;IAlClBE,GAAA,gBAAApC,IAAA,CAACP,MAAM;MACCa,IAAI,EAAJA,IAAI;MACI+B,YAEb,EAFazB,EAEb;MAAAW,QAAA,EAEDW;IA4BgB,CACV,CAAC;IAAA7B,CAAA,OAAAC,IAAA;IAAAD,CAAA,OAAAO,EAAA;IAAAP,CAAA,OAAA6B,EAAA;IAAA7B,CAAA,OAAA+B,GAAA;EAAA;IAAAA,GAAA,GAAA/B,CAAA;EAAA;EAAA,OAnCT+B,GAmCS;AAAA","ignoreList":[]}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { useState } from 'react';
|
|
5
|
-
import { usePuckDictionary, usePuckLocale } from
|
|
6
|
-
import { templateMatchesQuery } from
|
|
7
|
-
import { SearchControl } from
|
|
8
|
-
import { GroupedEntryList, PickerEntryButton } from
|
|
9
|
-
import { mergeIntoGroups, templateEntry, templateGroupLabel, usePickerModel } from
|
|
5
|
+
import { usePuckDictionary, usePuckLocale } from "../i18n.js";
|
|
6
|
+
import { templateMatchesQuery } from "../plugins/templates-plugin/templates.js";
|
|
7
|
+
import { SearchControl } from "../ui/search-control.js";
|
|
8
|
+
import { GroupedEntryList, PickerEntryButton } from "./grouped-entry-list.js";
|
|
9
|
+
import { mergeIntoGroups, templateEntry, templateGroupLabel, usePickerModel } from "./picker-model.js";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
export function PageTemplatePicker(t0) {
|
|
12
12
|
const $ = _c(29);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-template-picker.js","names":["c","_c","useState","usePuckDictionary","usePuckLocale","templateMatchesQuery","SearchControl","GroupedEntryList","PickerEntryButton","mergeIntoGroups","templateEntry","templateGroupLabel","usePickerModel","jsx","_jsx","jsxs","_jsxs","PageTemplatePicker","t0","$","onDone","t","canvas","tTemplates","templates","tCommon","common","locale","config","pageTemplates","insertRootTemplate","query","setQuery","t1","customPageTemplates","normalizedQuery","trim","toLowerCase","builtinPages","filter","template","source","t2","template_1","customPages","template_0","map","t3","template_2","group","defaultGroup","length","key","label","entries","pageGroups","entry","pick","entry_0","renderEntry","t4","searchPlaceholder","autoFocus","compact","placeholder","t5","noPageTemplates","noResultsLabel","t6","className","children"],"sources":["../../../../src/puck-editor/internal/editor/page-template-picker.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\n\nimport { usePuckDictionary, usePuckLocale } from '../i18n';\nimport { templateMatchesQuery } from '../plugins/templates-plugin/templates';\nimport { SearchControl } from '../ui/search-control';\nimport { GroupedEntryList, PickerEntryButton } from './grouped-entry-list';\nimport {\n mergeIntoGroups,\n PickerEntry,\n templateEntry,\n templateGroupLabel,\n usePickerModel,\n} from './picker-model';\n\nexport function PageTemplatePicker({ onDone }: { onDone: () => void }) {\n const t = usePuckDictionary().canvas;\n const tTemplates = usePuckDictionary().templates;\n const tCommon = usePuckDictionary().common;\n const locale = usePuckLocale();\n const { config, pageTemplates, insertRootTemplate } = usePickerModel();\n const [query, setQuery] = useState('');\n\n const normalizedQuery = query.trim().toLowerCase();\n const builtinPages = pageTemplates.filter(\n (template) =>\n template.source === 'builtin' &&\n templateMatchesQuery(template, locale, normalizedQuery)\n );\n const customPages = pageTemplates\n .filter(\n (template) =>\n template.source === 'custom' &&\n templateMatchesQuery(template, locale, normalizedQuery)\n )\n .map((template) => templateEntry(template, locale));\n\n const pageGroups = [\n ...mergeIntoGroups(\n builtinPages.map((template) => ({\n ...templateEntry(template, locale),\n group: templateGroupLabel(config, template.group, tCommon.defaultGroup),\n }))\n ),\n ...(customPages.length > 0\n ? [\n {\n key: 'custom-pages',\n label: tTemplates.customPageTemplates,\n entries: customPages,\n },\n ]\n : []),\n ];\n\n const pick = (entry: PickerEntry) => {\n if (entry.template) insertRootTemplate(entry.template);\n onDone();\n };\n\n const renderEntry = (entry: PickerEntry) => (\n <PickerEntryButton\n key={entry.key}\n config={config}\n entry={entry}\n onPick={pick}\n />\n );\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-2.5\">\n <SearchControl\n autoFocus\n compact\n value={query}\n onChange={setQuery}\n placeholder={tTemplates.searchPlaceholder}\n />\n <GroupedEntryList\n groups={pageGroups}\n noResultsLabel={t.noPageTemplates}\n renderEntry={renderEntry}\n />\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAEhC,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,
|
|
1
|
+
{"version":3,"file":"page-template-picker.js","names":["c","_c","useState","usePuckDictionary","usePuckLocale","templateMatchesQuery","SearchControl","GroupedEntryList","PickerEntryButton","mergeIntoGroups","templateEntry","templateGroupLabel","usePickerModel","jsx","_jsx","jsxs","_jsxs","PageTemplatePicker","t0","$","onDone","t","canvas","tTemplates","templates","tCommon","common","locale","config","pageTemplates","insertRootTemplate","query","setQuery","t1","customPageTemplates","normalizedQuery","trim","toLowerCase","builtinPages","filter","template","source","t2","template_1","customPages","template_0","map","t3","template_2","group","defaultGroup","length","key","label","entries","pageGroups","entry","pick","entry_0","renderEntry","t4","searchPlaceholder","autoFocus","compact","placeholder","t5","noPageTemplates","noResultsLabel","t6","className","children"],"sources":["../../../../src/puck-editor/internal/editor/page-template-picker.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\n\nimport { usePuckDictionary, usePuckLocale } from '../i18n.tsx';\nimport { templateMatchesQuery } from '../plugins/templates-plugin/templates.ts';\nimport { SearchControl } from '../ui/search-control.tsx';\nimport { GroupedEntryList, PickerEntryButton } from './grouped-entry-list.tsx';\nimport {\n mergeIntoGroups,\n PickerEntry,\n templateEntry,\n templateGroupLabel,\n usePickerModel,\n} from './picker-model.ts';\n\nexport function PageTemplatePicker({ onDone }: { onDone: () => void }) {\n const t = usePuckDictionary().canvas;\n const tTemplates = usePuckDictionary().templates;\n const tCommon = usePuckDictionary().common;\n const locale = usePuckLocale();\n const { config, pageTemplates, insertRootTemplate } = usePickerModel();\n const [query, setQuery] = useState('');\n\n const normalizedQuery = query.trim().toLowerCase();\n const builtinPages = pageTemplates.filter(\n (template) =>\n template.source === 'builtin' &&\n templateMatchesQuery(template, locale, normalizedQuery)\n );\n const customPages = pageTemplates\n .filter(\n (template) =>\n template.source === 'custom' &&\n templateMatchesQuery(template, locale, normalizedQuery)\n )\n .map((template) => templateEntry(template, locale));\n\n const pageGroups = [\n ...mergeIntoGroups(\n builtinPages.map((template) => ({\n ...templateEntry(template, locale),\n group: templateGroupLabel(config, template.group, tCommon.defaultGroup),\n }))\n ),\n ...(customPages.length > 0\n ? [\n {\n key: 'custom-pages',\n label: tTemplates.customPageTemplates,\n entries: customPages,\n },\n ]\n : []),\n ];\n\n const pick = (entry: PickerEntry) => {\n if (entry.template) insertRootTemplate(entry.template);\n onDone();\n };\n\n const renderEntry = (entry: PickerEntry) => (\n <PickerEntryButton\n key={entry.key}\n config={config}\n entry={entry}\n onPick={pick}\n />\n );\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-2.5\">\n <SearchControl\n autoFocus\n compact\n value={query}\n onChange={setQuery}\n placeholder={tTemplates.searchPlaceholder}\n />\n <GroupedEntryList\n groups={pageGroups}\n noResultsLabel={t.noPageTemplates}\n renderEntry={renderEntry}\n />\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAEhC,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,YAAa;AAC9D,SAASC,oBAAoB,QAAQ,0CAA0C;AAC/E,SAASC,aAAa,QAAQ,yBAA0B;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AI,UAAA,CAAAsC,iBAAA;IAAA1C,CAAA,OAAAyC,EAAA;EAAA;IAAAA,EAAA,GAAAzC,CAAA;EAAA;EAAA,IAAA8C,EAAA;EAAA,IAAA9C,CAAA,SAAAoC,UAAA,IAAApC,CAAA,SAAAwC,WAAA,IAAAxC,CAAA,SAAAE,CAAA,CAAA6C,eAAA;IACFD,EAAA,gBAAAnD,IAAA,CAACP,gBAAgB;MACPgD,MAAU,EAAVA,UAAU;MACFY,cAAiB,EAAjB9C,CAAC,CAAA6C,eAAgB;MACpBP,WAAW,EAAXA;IAAW,CACzB,CAAC;IAAAxC,CAAA,OAAAoC,UAAA;IAAApC,CAAA,OAAAwC,WAAA;IAAAxC,CAAA,OAAAE,CAAA,CAAA6C,eAAA;IAAA/C,CAAA,OAAA8C,EAAA;EAAA;IAAAA,EAAA,GAAA9C,CAAA;EAAA;EAAA,IAAAiD,EAAA;EAAA,IAAAjD,CAAA,SAAAyC,EAAA,IAAAzC,CAAA,SAAA8C,EAAA;IAZJG,EAAA,gBAAApD,KAAA;MAAeqD,SAAgC,EAAhC,gCAAgC;MAAAC,QAAA,GAC7CV,EAME,EACFK,EAIE;IAAA,CACC,CAAC;IAAA9C,CAAA,OAAAyC,EAAA;IAAAzC,CAAA,OAAA8C,EAAA;IAAA9C,CAAA,OAAAiD,EAAA;EAAA;IAAAA,EAAA,GAAAjD,CAAA;EAAA;EAAA,OAbNiD,EAaM;AAAA","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PickerEntry } from './picker-model';
|
|
1
|
+
import type { PickerEntry } from './picker-model.js';
|
|
2
2
|
export declare function PickerEntryItem({ entry, onInsert, }: {
|
|
3
3
|
entry: PickerEntry;
|
|
4
4
|
onInsert: () => void;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
6
|
-
//# sourceMappingURL=picker-entry-item.d.ts.map
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { createUsePuck, Drawer } from '@puckeditor/core';
|
|
5
|
-
import { usePuckDictionary } from
|
|
6
|
-
import { DrawerItemContent } from
|
|
7
|
-
import { entryIcon } from
|
|
5
|
+
import { usePuckDictionary } from "../i18n.js";
|
|
6
|
+
import { DrawerItemContent } from "../ui/drawer-item-content.js";
|
|
7
|
+
import { entryIcon } from "./component-icons.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
const usePuck = createUsePuck();
|
|
10
10
|
export function PickerEntryItem(t0) {
|
|
@@ -17,7 +17,7 @@ export function PickerEntryItem(t0) {
|
|
|
17
17
|
const addLabel = usePuckDictionary().editor.add;
|
|
18
18
|
let t1;
|
|
19
19
|
if ($[0] !== entry.drawerName || $[1] !== entry.template) {
|
|
20
|
-
t1 = s_0 => entry.template ?
|
|
20
|
+
t1 = s_0 => entry.template ? s_0.getPermissions().insert !== false : s_0.getPermissions({
|
|
21
21
|
type: entry.drawerName
|
|
22
22
|
}).insert !== false;
|
|
23
23
|
$[0] = entry.drawerName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picker-entry-item.js","names":["c","_c","createUsePuck","Drawer","usePuckDictionary","DrawerItemContent","entryIcon","jsx","_jsx","usePuck","PickerEntryItem","t0","$","entry","onInsert","config","_temp","addLabel","editor","add","t1","drawerName","template","s_0","s","getPermissions","
|
|
1
|
+
{"version":3,"file":"picker-entry-item.js","names":["c","_c","createUsePuck","Drawer","usePuckDictionary","DrawerItemContent","entryIcon","jsx","_jsx","usePuck","PickerEntryItem","t0","$","entry","onInsert","config","_temp","addLabel","editor","add","t1","drawerName","template","s_0","s","getPermissions","insert","type","canInsert","t2","icon","t3","t4","label","onAdd","undefined","t5","Item","name","isDragDisabled","children"],"sources":["../../../../src/puck-editor/internal/editor/picker-entry-item.tsx"],"sourcesContent":["'use client';\n\nimport { createUsePuck, Drawer } from '@puckeditor/core';\n\nimport { usePuckDictionary } from '../i18n.tsx';\nimport { DrawerItemContent } from '../ui/drawer-item-content.tsx';\nimport { entryIcon } from './component-icons.tsx';\nimport type { PickerEntry } from './picker-model.ts';\n\nconst usePuck = createUsePuck();\n\nexport function PickerEntryItem({\n entry,\n onInsert,\n}: {\n entry: PickerEntry;\n onInsert: () => void;\n}) {\n const config = usePuck((s) => s.config);\n const addLabel = usePuckDictionary().editor.add;\n const canInsert = usePuck((s) =>\n entry.template\n ? s.getPermissions().insert !== false\n : s.getPermissions({ type: entry.drawerName }).insert !== false\n );\n const icon = entryIcon(config, entry);\n\n return (\n <Drawer.Item\n name={entry.drawerName}\n label={entry.label}\n isDragDisabled={!canInsert}\n >\n {() => (\n <DrawerItemContent\n icon={icon}\n label={entry.label}\n onAdd={canInsert ? onInsert : undefined}\n addLabel={addLabel}\n />\n )}\n </Drawer.Item>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,aAAa,EAAEC,MAAM,QAAQ,kBAAkB;AAExD,SAASC,iBAAiB,QAAQ,YAAa;AAC/C,SAASC,iBAAiB,QAAQ,8BAA+B;AACjE,SAASC,SAAS,QAAQ,sBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlD,MAAMC,OAAO,GAAGP,aAAa,CAAC,CAAC;AAE/B,OAAO,SAAAQ,gBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAX,EAAA;EAAyB;IAAAY,KAAA;IAAAC;EAAA,IAAAH,EAM/B;EACC,MAAAI,MAAA,GAAeN,OAAO,CAACO,KAAe,CAAC;EACvC,MAAAC,QAAA,GAAiBb,iBAAiB,CAAC,CAAC,CAAAc,MAAO,CAAAC,GAAI;EAAC,IAAAC,EAAA;EAAA,IAAAR,CAAA,QAAAC,KAAA,CAAAQ,UAAA,IAAAT,CAAA,QAAAC,KAAA,CAAAS,QAAA;IACtBF,EAAA,GAAAG,GAAA,IACxBV,KAAK,CAAAS,QAE4D,GAD7DE,GAAC,CAAAC,cA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AA;IAAAF,CAAA,OAAAoB,EAAA;EAAA;IAAAA,EAAA,GAAApB,CAAA;EAAA;EAAA,IAAAwB,EAAA;EAAA,IAAAxB,CAAA,SAAAC,KAAA,CAAAQ,UAAA,IAAAT,CAAA,SAAAC,KAAA,CAAAoB,KAAA,IAAArB,CAAA,SAAAmB,EAAA,IAAAnB,CAAA,SAAAoB,EAAA;IAZHI,EAAA,gBAAA5B,IAAA,CAAAL,MAAA,CAAAkC,IAAA;MACQC,IAAgB,EAAhBzB,KAAK,CAAAQ,UAAW;MACfY,KAAW,EAAXpB,KAAK,CAAAoB,KAAM;MACFM,cAAU,EAAVR,EAAU;MAAAS,QAAA,EAEzBR;IAOA,CACU,CAAC;IAAApB,CAAA,OAAAC,KAAA,CAAAQ,UAAA;IAAAT,CAAA,OAAAC,KAAA,CAAAoB,KAAA;IAAArB,CAAA,OAAAmB,EAAA;IAAAnB,CAAA,OAAAoB,EAAA;IAAApB,CAAA,OAAAwB,EAAA;EAAA;IAAAA,EAAA,GAAAxB,CAAA;EAAA;EAAA,OAbdwB,EAac;AAAA;AA9BX,SAAApB,MAAAQ,CAAA;EAAA,OAOyBA,CAAC,CAAAT,MAAO;AAAA","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { Config } from '@puckeditor/core';
|
|
3
|
-
import { Template } from '../plugins/templates-plugin/templates';
|
|
3
|
+
import { Template } from '../plugins/templates-plugin/templates.js';
|
|
4
4
|
export declare function blockCategoryIds(config: Config): string[];
|
|
5
5
|
export declare function blockCategoryLabel(config: Config, id: string): string;
|
|
6
6
|
export type PickerEntry = {
|
|
@@ -36,6 +36,8 @@ export declare function templateEntry(template: Template, locale: string): Picke
|
|
|
36
36
|
export declare function usePickerModel(): {
|
|
37
37
|
config: Config;
|
|
38
38
|
isLoading: boolean;
|
|
39
|
+
isError: boolean;
|
|
40
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<import("../plugins/templates-plugin/templates.js").FetchedTemplates>, Error>>;
|
|
39
41
|
canInsertType: (type: string) => boolean;
|
|
40
42
|
pinnedSectionEntries: PickerEntry[];
|
|
41
43
|
sectionGroups: PickerGroup[];
|
|
@@ -43,7 +45,7 @@ export declare function usePickerModel(): {
|
|
|
43
45
|
blockGroups: PickerGroup[];
|
|
44
46
|
customSectionTemplates: Template[];
|
|
45
47
|
pageTemplates: Template[];
|
|
46
|
-
brokenTemplates: import("../plugins/templates-plugin/templates").BrokenTemplate[];
|
|
48
|
+
brokenTemplates: import("../plugins/templates-plugin/templates.js").BrokenTemplate[];
|
|
47
49
|
insertEntry: (entry: PickerEntry, target: InsertTarget) => void;
|
|
48
50
|
insertSectionEntry: (entry: PickerEntry) => void;
|
|
49
51
|
insertBlockEntry: (entry: PickerEntry) => void;
|
|
@@ -52,11 +54,18 @@ export declare function usePickerModel(): {
|
|
|
52
54
|
update: (template: {
|
|
53
55
|
source: "builtin" | "custom";
|
|
54
56
|
id?: string;
|
|
55
|
-
}, fields: import("../api/client").TemplateUpdate) => Promise<import("../api/client").PuckApiResult
|
|
57
|
+
}, fields: import("../api/client.js").TemplateUpdate) => Promise<import("../api/client.js").PuckApiResult | {
|
|
58
|
+
success: boolean;
|
|
59
|
+
message: string;
|
|
60
|
+
code: string;
|
|
61
|
+
}>;
|
|
56
62
|
remove: (template: {
|
|
57
63
|
source: "builtin" | "custom";
|
|
58
64
|
id?: string;
|
|
59
|
-
}) => Promise<import("../api/client").PuckApiResult
|
|
65
|
+
}) => Promise<import("../api/client.js").PuckApiResult | {
|
|
66
|
+
success: boolean;
|
|
67
|
+
message: string;
|
|
68
|
+
code: string;
|
|
69
|
+
}>;
|
|
60
70
|
};
|
|
61
71
|
export {};
|
|
62
|
-
//# sourceMappingURL=picker-model.d.ts.map
|