@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
|
@@ -1,29 +1,44 @@
|
|
|
1
|
-
import { creatableBundles, resolveContentModel } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { creatableBundles, resolveContentModel } from "../content-model.js";
|
|
2
|
+
import { getPuckDictionary } from "../dictionaries.js";
|
|
3
|
+
import { selectPuckSmartActionIds } from "./action-selection.js";
|
|
4
|
+
import NewPage from "./new-page.js";
|
|
5
|
+
import OpenPuckEditor from "./open-puck-editor.js";
|
|
4
6
|
export function createPuckSmartActions({
|
|
5
7
|
lang,
|
|
6
8
|
labels,
|
|
7
|
-
contentModel
|
|
9
|
+
contentModel,
|
|
10
|
+
nodeType,
|
|
11
|
+
editorLocale,
|
|
12
|
+
dictionaryOverrides
|
|
8
13
|
}) {
|
|
9
|
-
const
|
|
14
|
+
const dictionary = getPuckDictionary(editorLocale ?? lang, dictionaryOverrides);
|
|
15
|
+
const resolvedContentModel = resolveContentModel(contentModel);
|
|
16
|
+
const bundles = creatableBundles(resolvedContentModel).map(bundle => ({
|
|
10
17
|
type: bundle.type,
|
|
11
18
|
label: bundle.label,
|
|
12
19
|
title: bundle.createDefaults.title
|
|
13
20
|
}));
|
|
14
|
-
return
|
|
15
|
-
|
|
21
|
+
return selectPuckSmartActionIds({
|
|
22
|
+
contentModel: resolvedContentModel,
|
|
23
|
+
nodeType,
|
|
24
|
+
hasCreatableBundles: bundles.length > 0
|
|
25
|
+
}).map(id => id === 'open-puck-editor' ? {
|
|
26
|
+
id,
|
|
16
27
|
label: labels.edit,
|
|
17
|
-
Component: OpenPuckEditor
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
Component: OpenPuckEditor,
|
|
29
|
+
props: {
|
|
30
|
+
label: labels.edit
|
|
31
|
+
}
|
|
32
|
+
} : {
|
|
33
|
+
id,
|
|
20
34
|
label: labels.newPage,
|
|
21
35
|
Component: NewPage,
|
|
22
36
|
props: {
|
|
23
37
|
lang,
|
|
24
38
|
defaultTitle: labels.newPage,
|
|
25
|
-
bundles
|
|
39
|
+
bundles,
|
|
40
|
+
createFailedLabel: dictionary.editor.pageCreateFailed
|
|
26
41
|
}
|
|
27
|
-
}
|
|
42
|
+
});
|
|
28
43
|
}
|
|
29
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["creatableBundles","resolveContentModel","NewPage","OpenPuckEditor","createPuckSmartActions","lang","labels","contentModel","bundles","map","bundle","type","label","title","createDefaults","id","edit","Component","
|
|
1
|
+
{"version":3,"file":"index.js","names":["creatableBundles","resolveContentModel","getPuckDictionary","selectPuckSmartActionIds","NewPage","OpenPuckEditor","createPuckSmartActions","lang","labels","contentModel","nodeType","editorLocale","dictionaryOverrides","dictionary","resolvedContentModel","bundles","map","bundle","type","label","title","createDefaults","hasCreatableBundles","length","id","edit","Component","props","newPage","defaultTitle","createFailedLabel","editor","pageCreateFailed"],"sources":["../../../../src/puck-editor/internal/smart-actions/index.ts"],"sourcesContent":["import type { ComponentType } from 'react';\n\nimport type { ToolbarAction } from '../../../shared/toolbar-action.ts';\nimport {\n creatableBundles,\n resolveContentModel,\n type PuckContentModelInput,\n} from '../content-model.ts';\nimport {\n getPuckDictionary,\n type PuckDictionaryOverrides,\n} from '../dictionaries.ts';\nimport { selectPuckSmartActionIds } from './action-selection.ts';\nimport NewPage from './new-page.tsx';\nimport OpenPuckEditor from './open-puck-editor.tsx';\n\ntype PuckSmartActionsContext = {\n lang: string;\n labels: { edit: string; newPage: string };\n contentModel?: PuckContentModelInput;\n /** Current JSON:API resource type; null means there is no current node. */\n nodeType?: string | null;\n /** Editor UI locale for the action messages; falls back to lang. */\n editorLocale?: string;\n /** Per-section overrides merged over the resolved Puck dictionary. */\n dictionaryOverrides?: PuckDictionaryOverrides;\n};\n\nexport function createPuckSmartActions({\n lang,\n labels,\n contentModel,\n nodeType,\n editorLocale,\n dictionaryOverrides,\n}: PuckSmartActionsContext): ToolbarAction[] {\n const dictionary = getPuckDictionary(\n editorLocale ?? lang,\n dictionaryOverrides\n );\n const resolvedContentModel = resolveContentModel(contentModel);\n const bundles = creatableBundles(resolvedContentModel).map((bundle) => ({\n type: bundle.type,\n label: bundle.label,\n title: bundle.createDefaults.title,\n }));\n return selectPuckSmartActionIds({\n contentModel: resolvedContentModel,\n nodeType,\n hasCreatableBundles: bundles.length > 0,\n }).map((id) =>\n id === 'open-puck-editor'\n ? {\n id,\n label: labels.edit,\n Component: OpenPuckEditor as unknown as ComponentType<\n Record<string, unknown>\n >,\n props: { label: labels.edit },\n }\n : {\n id,\n label: labels.newPage,\n Component: NewPage as unknown as ComponentType<\n Record<string, unknown>\n >,\n props: {\n lang,\n defaultTitle: labels.newPage,\n bundles,\n createFailedLabel: dictionary.editor.pageCreateFailed,\n },\n }\n );\n}\n"],"mappings":"AAGA,SACEA,gBAAgB,EAChBC,mBAAmB,QAEd,qBAAqB;AAC5B,SACEC,iBAAiB,QAEZ,oBAAoB;AAC3B,SAASC,wBAAwB,QAAQ,uBAAuB;AAChE,OAAOC,OAAO,MAAM,eAAgB;AACpC,OAAOC,cAAc,MAAM,uBAAwB;AAcnD,OAAO,SAASC,sBAAsBA,CAAC;EACrCC,IAAI;EACJC,MAAM;EACNC,YAAY;EACZC,QAAQ;EACRC,YAAY;EACZC;AACuB,CAAC,EAAmB;EAC3C,MAAMC,UAAU,GAAGX,iBAAiB,CAClCS,YAAY,IAAIJ,IAAI,EACpBK,mBACF,CAAC;EACD,MAAME,oBAAoB,GAAGb,mBAAmB,CAACQ,YAAY,CAAC;EAC9D,MAAMM,OAAO,GAAGf,gBAAgB,CAACc,oBAAoB,CAAC,CAACE,GAAG,CAAEC,MAAM,KAAM;IACtEC,IAAI,EAAED,MAAM,CAACC,IAAI;IACjBC,KAAK,EAAEF,MAAM,CAACE,KAAK;IACnBC,KAAK,EAAEH,MAAM,CAACI,cAAc,CAACD;EAC/B,CAAC,CAAC,CAAC;EACH,OAAOjB,wBAAwB,CAAC;IAC9BM,YAAY,EAAEK,oBAAoB;IAClCJ,QAAQ;IACRY,mBAAmB,EAAEP,OAAO,CAACQ,MAAM,GAAG;EACxC,CAAC,CAAC,CAACP,GAAG,CAAEQ,EAAE,IACRA,EAAE,KAAK,kBAAkB,GACrB;IACEA,EAAE;IACFL,KAAK,EAAEX,MAAM,CAACiB,IAAI;IAClBC,SAAS,EAAErB,cAEV;IACDsB,KAAK,EAAE;MAAER,KAAK,EAAEX,MAAM,CAACiB;IAAK;EAC9B,CAAC,GACD;IACED,EAAE;IACFL,KAAK,EAAEX,MAAM,CAACoB,OAAO;IACrBF,SAAS,EAAEtB,OAEV;IACDuB,KAAK,EAAE;MACLpB,IAAI;MACJsB,YAAY,EAAErB,MAAM,CAACoB,OAAO;MAC5Bb,OAAO;MACPe,iBAAiB,EAAEjB,UAAU,CAACkB,MAAM,CAACC;IACvC;EACF,CACN,CAAC;AACH","ignoreList":[]}
|
|
@@ -7,7 +7,8 @@ type NewPageProps = {
|
|
|
7
7
|
lang: string;
|
|
8
8
|
defaultTitle: string;
|
|
9
9
|
bundles: NewPageBundle[];
|
|
10
|
+
/** Resolved by createPuckSmartActions from editorLocale + dictionaryOverrides. */
|
|
11
|
+
createFailedLabel: string;
|
|
10
12
|
};
|
|
11
|
-
export default function NewPage({ lang, defaultTitle, bundles }: NewPageProps): import("react").JSX.Element;
|
|
13
|
+
export default function NewPage({ lang, defaultTitle, bundles, createFailedLabel, }: NewPageProps): import("react").JSX.Element;
|
|
12
14
|
export {};
|
|
13
|
-
//# sourceMappingURL=new-page.d.ts.map
|
|
@@ -4,15 +4,15 @@ import { useState } from 'react';
|
|
|
4
4
|
import { useRouter } from 'next/navigation';
|
|
5
5
|
import { FilePlus, Loader2 } from 'lucide-react';
|
|
6
6
|
import { toast } from 'sonner';
|
|
7
|
-
import { cn } from
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
|
7
|
+
import { cn } from "../../../shared/cn.js";
|
|
8
|
+
import { createPage } from "../plugins/agent-plugin/create-page.js";
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover.js";
|
|
11
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
export default function NewPage({
|
|
13
12
|
lang,
|
|
14
13
|
defaultTitle,
|
|
15
|
-
bundles
|
|
14
|
+
bundles,
|
|
15
|
+
createFailedLabel
|
|
16
16
|
}) {
|
|
17
17
|
const router = useRouter();
|
|
18
18
|
const [busy, setBusy] = useState(false);
|
|
@@ -34,7 +34,7 @@ export default function NewPage({
|
|
|
34
34
|
}
|
|
35
35
|
} catch (error) {
|
|
36
36
|
console.error('createPage failed', error);
|
|
37
|
-
toast.error(
|
|
37
|
+
toast.error(createFailedLabel);
|
|
38
38
|
} finally {
|
|
39
39
|
setBusy(false);
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-page.js","names":["useState","useRouter","FilePlus","Loader2","toast","cn","
|
|
1
|
+
{"version":3,"file":"new-page.js","names":["useState","useRouter","FilePlus","Loader2","toast","cn","createPage","Popover","PopoverContent","PopoverTrigger","jsx","_jsx","jsxs","_jsxs","NewPage","lang","defaultTitle","bundles","createFailedLabel","router","busy","setBusy","open","setOpen","create","bundle","editUrl","title","type","push","refresh","error","console","trigger","onClick","undefined","className","children","length","onOpenChange","asChild","align","map","disabled","label"],"sources":["../../../../src/puck-editor/internal/smart-actions/new-page.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { useRouter } from 'next/navigation';\nimport { FilePlus, Loader2 } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { cn } from '../../../shared/cn.ts';\nimport { createPage } from '../plugins/agent-plugin/create-page.ts';\nimport { Popover, PopoverContent, PopoverTrigger } from '../ui/popover.tsx';\n\ntype NewPageBundle = {\n type: string;\n label: string;\n title?: string;\n};\n\ntype NewPageProps = {\n lang: string;\n defaultTitle: string;\n bundles: NewPageBundle[];\n /** Resolved by createPuckSmartActions from editorLocale + dictionaryOverrides. */\n createFailedLabel: string;\n};\n\nexport default function NewPage({\n lang,\n defaultTitle,\n bundles,\n createFailedLabel,\n}: NewPageProps) {\n const router = useRouter();\n const [busy, setBusy] = useState(false);\n const [open, setOpen] = useState(false);\n\n const create = async (bundle: NewPageBundle) => {\n setBusy(true);\n try {\n const { editUrl } = await createPage({\n title: bundle.title ?? defaultTitle,\n type: bundle.type,\n lang,\n });\n if (editUrl) {\n router.push(editUrl);\n } else {\n router.refresh();\n }\n } catch (error) {\n console.error('createPage failed', error);\n toast.error(createFailedLabel);\n } finally {\n setBusy(false);\n }\n };\n\n const trigger = (onClick?: () => void) => (\n <button\n type=\"button\"\n onClick={busy ? undefined : onClick}\n className={cn(\n 'nh:flex nh:h-8 nh:w-8 nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)',\n busy ? 'nh:opacity-50' : 'nh:cursor-pointer'\n )}\n >\n <span className=\"nh:sr-only\">{defaultTitle}</span>\n {busy ? (\n <Loader2 className=\"nh:h-5 nh:w-5 nh:animate-spin\" />\n ) : (\n <FilePlus className=\"nh:h-5 nh:w-5\" />\n )}\n </button>\n );\n\n if (bundles.length === 1) {\n return trigger(() => create(bundles[0]));\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>{trigger()}</PopoverTrigger>\n <PopoverContent className=\"nh-root nh:w-56 nh:p-1\" align=\"center\">\n {bundles.map((bundle) => (\n <button\n key={bundle.type}\n type=\"button\"\n disabled={busy}\n onClick={() => {\n setOpen(false);\n create(bundle);\n }}\n className=\"nh:block nh:w-full nh:rounded-sm nh:px-3 nh:py-2 nh:text-left nh:text-sm nh:hover:bg-(--nh-muted) nh:disabled:opacity-50\"\n >\n {bundle.label}\n </button>\n ))}\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,QAAQ,EAAEC,OAAO,QAAQ,cAAc;AAChD,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SAASC,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sJAAsJ,EACtJe,IAAI,GAAG,eAAe,GAAG,mBAC3B,CAAE;IAAAiB,QAAA,gBAEF1B,IAAA;MAAMyB,SAAS,EAAC,YAAY;MAAAC,QAAA,EAAErB;IAAY,CAAO,CAAC,EACjDI,IAAI,gBACHT,IAAA,CAACR,OAAO;MAACiC,SAAS,EAAC;IAA+B,CAAE,CAAC,gBAErDzB,IAAA,CAACT,QAAQ;MAACkC,SAAS,EAAC;IAAe,CAAE,CACtC;EAAA,CACK,CACT;EAED,IAAInB,OAAO,CAACqB,MAAM,KAAK,CAAC,EAAE;IACxB,OAAOL,OAAO,CAAC,MAAMT,MAAM,CAACP,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;EAC1C;EAEA,oBACEJ,KAAA,CAACN,OAAO;IAACe,IAAI,EAAEA,IAAK;IAACiB,YAAY,EAAEhB,OAAQ;IAAAc,QAAA,gBACzC1B,IAAA,CAACF,cAAc;MAAC+B,OAAO;MAAAH,QAAA,EAAEJ,OAAO,CAAC;IAAC,CAAiB,CAAC,eACpDtB,IAAA,CAACH,cAAc;MAAC4B,SAAS,EAAC,wBAAwB;MAACK,KAAK,EAAC,QAAQ;MAAAJ,QAAA,EAC9DpB,OAAO,CAACyB,GAAG,CAAEjB,QAAM,iBAClBd,IAAA;QAEEiB,IAAI,EAAC,QAAQ;QACbe,QAAQ,EAAEvB,IAAK;QACfc,OAAO,EAAEA,CAAA,KAAM;UACbX,OAAO,CAAC,KAAK,CAAC;UACdC,MAAM,CAACC,QAAM,CAAC;QAChB,CAAE;QACFW,SAAS,EAAC,0HAA0H;QAAAC,QAAA,EAEnIZ,QAAM,CAACmB;MAAK,GATRnB,QAAM,CAACG,IAUN,CACT;IAAC,CACY,CAAC;EAAA,CACV,CAAC;AAEd","ignoreList":[]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export default function OpenPuckEditor(
|
|
2
|
-
|
|
1
|
+
export default function OpenPuckEditor({ label }: {
|
|
2
|
+
label?: string;
|
|
3
|
+
}): import("react").JSX.Element;
|
|
@@ -2,64 +2,76 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { SquarePen } from 'lucide-react';
|
|
5
|
-
import { cn } from
|
|
6
|
-
import { usePuckEditor } from
|
|
5
|
+
import { cn } from "../../../shared/cn.js";
|
|
6
|
+
import { usePuckEditor } from "../puck-editor-provider.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
export default function OpenPuckEditor() {
|
|
9
|
-
const $ = _c(
|
|
8
|
+
export default function OpenPuckEditor(t0) {
|
|
9
|
+
const $ = _c(12);
|
|
10
|
+
const {
|
|
11
|
+
label: t1
|
|
12
|
+
} = t0;
|
|
13
|
+
const label = t1 === undefined ? "Edit" : t1;
|
|
10
14
|
const {
|
|
11
15
|
openEditor,
|
|
12
16
|
setIsHighlighted
|
|
13
17
|
} = usePuckEditor();
|
|
14
|
-
let
|
|
15
|
-
let
|
|
18
|
+
let t2;
|
|
19
|
+
let t3;
|
|
16
20
|
if ($[0] !== setIsHighlighted) {
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
t2 = () => setIsHighlighted(true);
|
|
22
|
+
t3 = () => setIsHighlighted(false);
|
|
19
23
|
$[0] = setIsHighlighted;
|
|
20
|
-
$[1] =
|
|
21
|
-
$[2] =
|
|
24
|
+
$[1] = t2;
|
|
25
|
+
$[2] = t3;
|
|
22
26
|
} else {
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
t2 = $[1];
|
|
28
|
+
t3 = $[2];
|
|
25
29
|
}
|
|
26
|
-
let t2;
|
|
27
|
-
let t3;
|
|
28
30
|
let t4;
|
|
29
31
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
t4 = cn("nh:flex nh:h-8 nh:w-8 nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)", "nh:cursor-pointer");
|
|
33
|
+
$[3] = t4;
|
|
34
|
+
} else {
|
|
35
|
+
t4 = $[3];
|
|
36
|
+
}
|
|
37
|
+
let t5;
|
|
38
|
+
if ($[4] !== label) {
|
|
39
|
+
t5 = /*#__PURE__*/_jsx("span", {
|
|
32
40
|
className: "nh:sr-only",
|
|
33
|
-
children:
|
|
41
|
+
children: label
|
|
34
42
|
});
|
|
35
|
-
|
|
43
|
+
$[4] = label;
|
|
44
|
+
$[5] = t5;
|
|
45
|
+
} else {
|
|
46
|
+
t5 = $[5];
|
|
47
|
+
}
|
|
48
|
+
let t6;
|
|
49
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50
|
+
t6 = /*#__PURE__*/_jsx(SquarePen, {
|
|
36
51
|
className: "nh:h-5 nh:w-5"
|
|
37
52
|
});
|
|
38
|
-
$[
|
|
39
|
-
$[4] = t3;
|
|
40
|
-
$[5] = t4;
|
|
53
|
+
$[6] = t6;
|
|
41
54
|
} else {
|
|
42
|
-
|
|
43
|
-
t3 = $[4];
|
|
44
|
-
t4 = $[5];
|
|
55
|
+
t6 = $[6];
|
|
45
56
|
}
|
|
46
|
-
let
|
|
47
|
-
if ($[
|
|
48
|
-
|
|
57
|
+
let t7;
|
|
58
|
+
if ($[7] !== openEditor || $[8] !== t2 || $[9] !== t3 || $[10] !== t5) {
|
|
59
|
+
t7 = /*#__PURE__*/_jsxs("button", {
|
|
49
60
|
type: "button",
|
|
50
61
|
onClick: openEditor,
|
|
51
|
-
onMouseEnter:
|
|
52
|
-
onMouseLeave:
|
|
53
|
-
className:
|
|
54
|
-
children: [
|
|
62
|
+
onMouseEnter: t2,
|
|
63
|
+
onMouseLeave: t3,
|
|
64
|
+
className: t4,
|
|
65
|
+
children: [t5, t6]
|
|
55
66
|
});
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
67
|
+
$[7] = openEditor;
|
|
68
|
+
$[8] = t2;
|
|
69
|
+
$[9] = t3;
|
|
70
|
+
$[10] = t5;
|
|
71
|
+
$[11] = t7;
|
|
60
72
|
} else {
|
|
61
|
-
|
|
73
|
+
t7 = $[11];
|
|
62
74
|
}
|
|
63
|
-
return
|
|
75
|
+
return t7;
|
|
64
76
|
}
|
|
65
77
|
//# sourceMappingURL=open-puck-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-puck-editor.js","names":["c","_c","SquarePen","cn","usePuckEditor","jsx","_jsx","jsxs","_jsxs","OpenPuckEditor","$","
|
|
1
|
+
{"version":3,"file":"open-puck-editor.js","names":["c","_c","SquarePen","cn","usePuckEditor","jsx","_jsx","jsxs","_jsxs","OpenPuckEditor","t0","$","label","t1","undefined","openEditor","setIsHighlighted","t2","t3","t4","Symbol","for","t5","className","children","t6","t7","type","onMouseEnter","onMouseLeave"],"sources":["../../../../src/puck-editor/internal/smart-actions/open-puck-editor.tsx"],"sourcesContent":["'use client';\n\nimport { SquarePen } from 'lucide-react';\n\nimport { cn } from '../../../shared/cn.ts';\nimport { usePuckEditor } from '../puck-editor-provider.tsx';\n\nexport default function OpenPuckEditor({ label = 'Edit' }: { label?: string }) {\n const { openEditor, setIsHighlighted } = usePuckEditor();\n\n // Shown for authenticated editors (via <SignedIn>), also inside the iframe.\n return (\n <button\n type=\"button\"\n onClick={openEditor}\n onMouseEnter={() => setIsHighlighted(true)}\n onMouseLeave={() => setIsHighlighted(false)}\n className={cn(\n 'nh:flex nh:h-8 nh:w-8 nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)',\n 'nh:cursor-pointer'\n )}\n >\n <span className=\"nh:sr-only\">{label}</span>\n <SquarePen className=\"nh:h-5 nh:w-5\" />\n </button>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,SAAS,QAAQ,cAAc;AAExC,S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AAA,CAACJ,SAAS;MAAWqB,SAAe,EAAf;IAAe,CAAE,CAAC;IAAAZ,CAAA,MAAAc,EAAA;EAAA;IAAAA,EAAA,GAAAd,CAAA;EAAA;EAAA,IAAAe,EAAA;EAAA,IAAAf,CAAA,QAAAI,UAAA,IAAAJ,CAAA,QAAAM,EAAA,IAAAN,CAAA,QAAAO,EAAA,IAAAP,CAAA,SAAAW,EAAA;IAXzCI,EAAA,gBAAAlB,KAAA;MACOmB,IAAQ,EAAR,QAAQ;MACJZ,OAAU,EAAVA,UAAU;MACLa,YAA4B,EAA5BX,EAA4B;MAC5BY,YAA6B,EAA7BX,EAA6B;MAChCK,SAGV,EAHUJ,EAGV;MAAAK,QAAA,GAEDF,EAA2C,EAC3CG,EAAuC;IAAA,CACjC,CAAC;IAAAd,CAAA,MAAAI,UAAA;IAAAJ,CAAA,MAAAM,EAAA;IAAAN,CAAA,MAAAO,EAAA;IAAAP,CAAA,OAAAW,EAAA;IAAAX,CAAA,OAAAe,EAAA;EAAA;IAAAA,EAAA,GAAAf,CAAA;EAAA;EAAA,OAZTe,EAYS;AAAA","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
6
6
|
import { DayPicker } from 'react-day-picker';
|
|
7
|
-
import { cn } from
|
|
7
|
+
import { cn } from "../../../shared/cn.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
const buttonBase = 'nh:inline-flex nh:cursor-pointer nh:items-center nh:justify-center nh:px-3 nh:py-1.5 nh:text-sm nh:font-bold nh:whitespace-nowrap nh:transition-colors nh:disabled:pointer-events-none nh:disabled:opacity-50';
|
|
10
10
|
const navButton = `${buttonBase} nh:rounded-full nh:border nh:border-(--nh-primary) nh:bg-(--nh-bg) nh:text-(--nh-primary) nh:hover:bg-(--nh-muted)`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","names":["c","_c","React","ChevronLeft","ChevronRight","DayPicker","cn","jsx","_jsx","buttonBase","navButton","dayButton","Calendar","t0","$","className","classNames","props","t1","showOutsideDays","undefined","t2","t3","t4","Symbol","for","t5","t6","mode","t7","t8","month","months","month_caption","month_grid","caption_label","nav","button_previous","button_next","weeks","weekdays","weekday","week","day","day_button","range_start","range_end","range_middle","selected","today","outside","disabled","hidden","t9","Chevron","_temp","t10","components","props_0","orientation","displayName"],"sources":["../../../../src/puck-editor/internal/ui/calendar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { DayPicker } from 'react-day-picker';\n\nimport { cn } from '../../../shared/cn';\n\nconst buttonBase =\n 'nh:inline-flex nh:cursor-pointer nh:items-center nh:justify-center nh:px-3 nh:py-1.5 nh:text-sm nh:font-bold nh:whitespace-nowrap nh:transition-colors nh:disabled:pointer-events-none nh:disabled:opacity-50';\nconst navButton = `${buttonBase} nh:rounded-full nh:border nh:border-(--nh-primary) nh:bg-(--nh-bg) nh:text-(--nh-primary) nh:hover:bg-(--nh-muted)`;\nconst dayButton = `${buttonBase} nh:rounded-full nh:hover:bg-(--nh-muted) nh:hover:text-(--nh-fg)`;\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn('nh:pointer-events-auto nh:p-3', className)}\n classNames={{\n month: 'nh:space-y-4',\n months:\n 'nh:flex nh:flex-col nh:sm:flex-row nh:space-y-4 nh:sm:space-y-0 nh:relative nh:gap-2',\n month_caption:\n 'nh:flex nh:justify-center nh:pt-1 nh:relative nh:items-center',\n month_grid: 'nh:w-full nh:border-collapse nh:space-y-1',\n caption_label: 'nh:text-sm nh:font-medium',\n nav: 'nh:flex nh:items-center nh:justify-between nh:absolute nh:inset-x-0',\n button_previous: cn(\n navButton,\n 'nh:z-10 nh:h-7 nh:w-7 nh:bg-transparent nh:p-0 nh:opacity-50 nh:hover:opacity-100'\n ),\n button_next: cn(\n navButton,\n 'nh:z-10 nh:h-7 nh:w-7 nh:bg-transparent nh:p-0 nh:opacity-50 nh:hover:opacity-100'\n ),\n weeks: 'nh:w-full nh:border-collapse',\n weekdays: 'nh:flex',\n weekday:\n 'nh:text-gray-500 nh:rounded-md nh:w-9 nh:font-normal nh:text-[0.8rem]',\n week: 'nh:flex nh:w-full nh:mt-2',\n day: 'nh:h-9 nh:w-9 nh:p-0 nh:font-normal nh:aria-selected:opacity-100 nh:rounded-none nh:first:aria-selected:rounded-l-md nh:last:aria-selected:rounded-r-md',\n day_button: cn(\n dayButton,\n 'nh:relative nh:h-9 nh:w-9 nh:rounded-md nh:p-0 nh:text-center nh:text-sm nh:focus-within:relative nh:focus-within:z-20'\n ),\n range_start:\n 'day-range-start nh:bg-gray-50 nh:rounded-l-md [&>button]:bg-(--nh-primary) [&>button]:text-(--nh-fg) [&>button]:hover:bg-(--nh-primary) [&>button]:hover:text-(--nh-fg)',\n range_end:\n 'day-range-end nh:bg-gray-50 nh:rounded-r-md [&>button]:bg-(--nh-primary) [&>button]:text-(--nh-fg) [&>button]:hover:bg-(--nh-primary) [&>button]:hover:text-(--nh-fg)',\n range_middle:\n 'nh:aria-selected:bg-gray-100 nh:aria-selected:text-(--nh-fg)',\n selected: cn(\n props.mode === 'range'\n ? 'nh:bg-(--nh-primary) nh:hover:bg-(--nh-primary) nh:hover:text-(--nh-fg) nh:focus:bg-(--nh-primary) nh:focus:text-(--nh-fg)'\n : 'nh:rounded-md! [&>button]:bg-(--nh-primary) [&>button]:text-(--nh-fg) [&>button]:hover:bg-(--nh-primary) [&>button]:hover:text-(--nh-fg)'\n ),\n today: 'nh:bg-gray-100 nh:text-(--nh-fg) nh:rounded-md!',\n outside:\n 'day-outside nh:text-gray-500 nh:opacity-50 nh:aria-selected:bg-gray-50/50! nh:aria-selected:text-gray-500! nh:aria-selected:opacity-30!',\n disabled: 'nh:text-gray-500 nh:opacity-50',\n hidden: 'nh:invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ ...props }) =>\n props.orientation === 'left' ? (\n <ChevronLeft {...props} className=\"nh:h-4 nh:w-4\" />\n ) : (\n <ChevronRight {...props} className=\"nh:h-4 nh:w-4\" />\n ),\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n\nexport { Calendar };\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,EAAEC,YAAY,QAAQ,cAAc;AACxD,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAASC,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"calendar.js","names":["c","_c","React","ChevronLeft","ChevronRight","DayPicker","cn","jsx","_jsx","buttonBase","navButton","dayButton","Calendar","t0","$","className","classNames","props","t1","showOutsideDays","undefined","t2","t3","t4","Symbol","for","t5","t6","mode","t7","t8","month","months","month_caption","month_grid","caption_label","nav","button_previous","button_next","weeks","weekdays","weekday","week","day","day_button","range_start","range_end","range_middle","selected","today","outside","disabled","hidden","t9","Chevron","_temp","t10","components","props_0","orientation","displayName"],"sources":["../../../../src/puck-editor/internal/ui/calendar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { DayPicker } from 'react-day-picker';\n\nimport { cn } from '../../../shared/cn.ts';\n\nconst buttonBase =\n 'nh:inline-flex nh:cursor-pointer nh:items-center nh:justify-center nh:px-3 nh:py-1.5 nh:text-sm nh:font-bold nh:whitespace-nowrap nh:transition-colors nh:disabled:pointer-events-none nh:disabled:opacity-50';\nconst navButton = `${buttonBase} nh:rounded-full nh:border nh:border-(--nh-primary) nh:bg-(--nh-bg) nh:text-(--nh-primary) nh:hover:bg-(--nh-muted)`;\nconst dayButton = `${buttonBase} nh:rounded-full nh:hover:bg-(--nh-muted) nh:hover:text-(--nh-fg)`;\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn('nh:pointer-events-auto nh:p-3', className)}\n classNames={{\n month: 'nh:space-y-4',\n months:\n 'nh:flex nh:flex-col nh:sm:flex-row nh:space-y-4 nh:sm:space-y-0 nh:relative nh:gap-2',\n month_caption:\n 'nh:flex nh:justify-center nh:pt-1 nh:relative nh:items-center',\n month_grid: 'nh:w-full nh:border-collapse nh:space-y-1',\n caption_label: 'nh:text-sm nh:font-medium',\n nav: 'nh:flex nh:items-center nh:justify-between nh:absolute nh:inset-x-0',\n button_previous: cn(\n navButton,\n 'nh:z-10 nh:h-7 nh:w-7 nh:bg-transparent nh:p-0 nh:opacity-50 nh:hover:opacity-100'\n ),\n button_next: cn(\n navButton,\n 'nh:z-10 nh:h-7 nh:w-7 nh:bg-transparent nh:p-0 nh:opacity-50 nh:hover:opacity-100'\n ),\n weeks: 'nh:w-full nh:border-collapse',\n weekdays: 'nh:flex',\n weekday:\n 'nh:text-gray-500 nh:rounded-md nh:w-9 nh:font-normal nh:text-[0.8rem]',\n week: 'nh:flex nh:w-full nh:mt-2',\n day: 'nh:h-9 nh:w-9 nh:p-0 nh:font-normal nh:aria-selected:opacity-100 nh:rounded-none nh:first:aria-selected:rounded-l-md nh:last:aria-selected:rounded-r-md',\n day_button: cn(\n dayButton,\n 'nh:relative nh:h-9 nh:w-9 nh:rounded-md nh:p-0 nh:text-center nh:text-sm nh:focus-within:relative nh:focus-within:z-20'\n ),\n range_start:\n 'day-range-start nh:bg-gray-50 nh:rounded-l-md [&>button]:bg-(--nh-primary) [&>button]:text-(--nh-fg) [&>button]:hover:bg-(--nh-primary) [&>button]:hover:text-(--nh-fg)',\n range_end:\n 'day-range-end nh:bg-gray-50 nh:rounded-r-md [&>button]:bg-(--nh-primary) [&>button]:text-(--nh-fg) [&>button]:hover:bg-(--nh-primary) [&>button]:hover:text-(--nh-fg)',\n range_middle:\n 'nh:aria-selected:bg-gray-100 nh:aria-selected:text-(--nh-fg)',\n selected: cn(\n props.mode === 'range'\n ? 'nh:bg-(--nh-primary) nh:hover:bg-(--nh-primary) nh:hover:text-(--nh-fg) nh:focus:bg-(--nh-primary) nh:focus:text-(--nh-fg)'\n : 'nh:rounded-md! [&>button]:bg-(--nh-primary) [&>button]:text-(--nh-fg) [&>button]:hover:bg-(--nh-primary) [&>button]:hover:text-(--nh-fg)'\n ),\n today: 'nh:bg-gray-100 nh:text-(--nh-fg) nh:rounded-md!',\n outside:\n 'day-outside nh:text-gray-500 nh:opacity-50 nh:aria-selected:bg-gray-50/50! nh:aria-selected:text-gray-500! nh:aria-selected:opacity-30!',\n disabled: 'nh:text-gray-500 nh:opacity-50',\n hidden: 'nh:invisible',\n ...classNames,\n }}\n components={{\n Chevron: ({ ...props }) =>\n props.orientation === 'left' ? (\n <ChevronLeft {...props} className=\"nh:h-4 nh:w-4\" />\n ) : (\n <ChevronRight {...props} className=\"nh:h-4 nh:w-4\" />\n ),\n }}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n\nexport { Calendar };\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,EAAEC,YAAY,QAAQ,cAAc;AACxD,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAASC,EAAE,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAMC,UAAU,GACd,+MAA+M;AACjN,MAAMC,SAAS,GAAG,GAAGD,UAAU,qHAAqH;AACpJ,MAAME,SAAS,GAAG,GAAGF,UAAU,mEAAmE;AAIlG,SAAAG,SAAAC,EAAA;EAAA,MAAAC,CAAA,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,EAAA;MAAAC,OAAA,EACDC;IAMX,CAAC;IAAAzC,CAAA,OAAAuC,EAAA;EAAA;IAAAA,EAAA,GAAAvC,CAAA;EAAA;EAAA,IAAA0C,GAAA;EAAA,IAAA1C,CAAA,SAAAG,KAAA,IAAAH,CAAA,SAAAK,eAAA,IAAAL,CAAA,SAAAO,EAAA,IAAAP,CAAA,SAAAgB,EAAA;IAvDH0B,GAAA,gBAAAhD,IAAA,CAACH,SAAS;MACSc,eAAe,EAAfA,eAAe;MACrBJ,SAA8C,EAA9CM,EAA8C;MAC7CL,UA4CX,EA5CWc,EA4CX;MACW2B,UAOX,EAPWJ,EAOX;MAAA,GACGpC;IAAK,CACV,CAAC;IAAAH,CAAA,OAAAG,KAAA;IAAAH,CAAA,OAAAK,eAAA;IAAAL,CAAA,OAAAO,EAAA;IAAAP,CAAA,OAAAgB,EAAA;IAAAhB,CAAA,OAAA0C,GAAA;EAAA;IAAAA,GAAA,GAAA1C,CAAA;EAAA;EAAA,OAzDF0C,GAyDE;AAAA;AAhEN,SAAAD,MAAA1C,EAAA;EAwDkB;IAAA,GAAA6C;EAAA,IAAA7C,EAAY;EAAA,OACpBI,OAAK,CAAA0C,WAAY,KAAK,MAIrB,gBAJDnD,IAAA,CACGL,WAAW;IAAA,GAAKc,OAAK;IAAYF,SAAe,EAAf;EAAe,CAGnD,CAAC,gBAJDP,IAAA,CAGGJ,YAAY;IAAA,GAAKa,OAAK;IAAYF,SAAe,EAAf;EAAe,CACpD,CAAC;AAAA;AAMXH,QAAQ,CAACgD,WAAW,GAAG,UAAU;AAEjC,SAAShD,QAAQ","ignoreList":[]}
|
|
@@ -10,4 +10,3 @@ type ComponentListAccordionProps = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare function ComponentListAccordion({ title, expanded, onToggle, expandLabel, collapseLabel, contentId, children, }: ComponentListAccordionProps): import("react").JSX.Element;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=component-list-accordion.d.ts.map
|
|
@@ -17,4 +17,3 @@ declare const DialogFooter: {
|
|
|
17
17
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
18
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
19
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
20
|
-
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -4,7 +4,8 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
6
|
import { X } from 'lucide-react';
|
|
7
|
-
import { cn } from
|
|
7
|
+
import { cn } from "../../../shared/cn.js";
|
|
8
|
+
import { usePuckDictionary } from "../i18n.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const Dialog = DialogPrimitive.Root;
|
|
10
11
|
const DialogTrigger = DialogPrimitive.Trigger;
|
|
@@ -52,7 +53,7 @@ const DialogOverlay = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
52
53
|
});
|
|
53
54
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
54
55
|
const DialogContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
55
|
-
const $ = _c(
|
|
56
|
+
const $ = _c(16);
|
|
56
57
|
let children;
|
|
57
58
|
let className;
|
|
58
59
|
let props;
|
|
@@ -71,6 +72,9 @@ const DialogContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
71
72
|
className = $[2];
|
|
72
73
|
props = $[3];
|
|
73
74
|
}
|
|
75
|
+
const {
|
|
76
|
+
common
|
|
77
|
+
} = usePuckDictionary();
|
|
74
78
|
let t1;
|
|
75
79
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
76
80
|
t1 = /*#__PURE__*/_jsx(DialogOverlay, {});
|
|
@@ -88,38 +92,47 @@ const DialogContent = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
88
92
|
}
|
|
89
93
|
let t3;
|
|
90
94
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
91
|
-
t3 = /*#__PURE__*/
|
|
92
|
-
className: "nh:
|
|
93
|
-
children: [/*#__PURE__*/_jsx(X, {
|
|
94
|
-
className: "nh:h-4 nh:w-4"
|
|
95
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
96
|
-
className: "nh:sr-only",
|
|
97
|
-
children: "Close"
|
|
98
|
-
})]
|
|
95
|
+
t3 = /*#__PURE__*/_jsx(X, {
|
|
96
|
+
className: "nh:h-4 nh:w-4"
|
|
99
97
|
});
|
|
100
98
|
$[7] = t3;
|
|
101
99
|
} else {
|
|
102
100
|
t3 = $[7];
|
|
103
101
|
}
|
|
104
102
|
let t4;
|
|
105
|
-
if ($[8] !==
|
|
106
|
-
t4 = /*#__PURE__*/_jsxs(
|
|
103
|
+
if ($[8] !== common.close) {
|
|
104
|
+
t4 = /*#__PURE__*/_jsxs(DialogPrimitive.Close, {
|
|
105
|
+
className: "nh:absolute nh:top-4 nh:right-4 nh:rounded-sm nh:opacity-70 nh:ring-offset-white nh:transition-opacity nh:hover:opacity-100 nh:focus:ring-2 nh:focus:ring-(--nh-primary) nh:focus:ring-offset-2 nh:focus:outline-none nh:disabled:pointer-events-none nh:data-[state=open]:bg-black",
|
|
106
|
+
children: [t3, /*#__PURE__*/_jsx("span", {
|
|
107
|
+
className: "nh:sr-only",
|
|
108
|
+
children: common.close
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
$[8] = common.close;
|
|
112
|
+
$[9] = t4;
|
|
113
|
+
} else {
|
|
114
|
+
t4 = $[9];
|
|
115
|
+
}
|
|
116
|
+
let t5;
|
|
117
|
+
if ($[10] !== children || $[11] !== props || $[12] !== ref || $[13] !== t2 || $[14] !== t4) {
|
|
118
|
+
t5 = /*#__PURE__*/_jsxs(DialogPortal, {
|
|
107
119
|
children: [t1, /*#__PURE__*/_jsxs(DialogPrimitive.Content, {
|
|
108
120
|
ref: ref,
|
|
109
121
|
className: t2,
|
|
110
122
|
...props,
|
|
111
|
-
children: [children,
|
|
123
|
+
children: [children, t4]
|
|
112
124
|
})]
|
|
113
125
|
});
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
126
|
+
$[10] = children;
|
|
127
|
+
$[11] = props;
|
|
128
|
+
$[12] = ref;
|
|
129
|
+
$[13] = t2;
|
|
130
|
+
$[14] = t4;
|
|
131
|
+
$[15] = t5;
|
|
119
132
|
} else {
|
|
120
|
-
|
|
133
|
+
t5 = $[15];
|
|
121
134
|
}
|
|
122
|
-
return
|
|
135
|
+
return t5;
|
|
123
136
|
});
|
|
124
137
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
125
138
|
const DialogHeader = t0 => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":["c","_c","React","DialogPrimitive","X","cn","jsx","_jsx","jsxs","_jsxs","Dialog","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","forwardRef","t0","ref","$","className","props","t1","t2","Overlay","displayName","DialogContent","children","Symbol","for","t3","t4","Content","DialogHeader","DialogFooter","DialogTitle","Title","DialogDescription","Description"],"sources":["../../../../src/puck-editor/internal/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn } from '../../../shared/cn';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'nh:data-[state=open]:animate-in nh:data-[state=closed]:animate-out nh:data-[state=closed]:fade-out-0 nh:data-[state=open]:fade-in-0 nh:fixed nh:inset-0 nh:z-50 nh:bg-black/80',\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'nh:data-[state=open]:animate-in nh:data-[state=closed]:animate-out nh:data-[state=closed]:fade-out-0 nh:data-[state=open]:fade-in-0 nh:data-[state=closed]:zoom-out-95 nh:data-[state=open]:zoom-in-95 nh:data-[state=closed]:slide-out-to-left-1/2 nh:data-[state=closed]:slide-out-to-top-[48%] nh:data-[state=open]:slide-in-from-left-1/2 nh:data-[state=open]:slide-in-from-top-[48%] nh-root nh:fixed nh:top-[50%] nh:left-[50%] nh:z-50 nh:grid nh:w-full nh:max-w-lg nh:translate-x-[-50%] nh:translate-y-[-50%] nh:gap-4 nh:border nh:bg-white nh:p-6 nh:shadow-lg nh:duration-200 nh:sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"nh:absolute nh:top-4 nh:right-4 nh:rounded-sm nh:opacity-70 nh:ring-offset-white nh:transition-opacity nh:hover:opacity-100 nh:focus:ring-2 nh:focus:ring-(--nh-primary) nh:focus:ring-offset-2 nh:focus:outline-none nh:disabled:pointer-events-none nh:data-[state=open]:bg-black\">\n <X className=\"nh:h-4 nh:w-4\" />\n <span className=\"nh:sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'nh:flex nh:flex-col nh:space-y-1.5 nh:text-center nh:sm:text-left',\n className\n )}\n {...props}\n />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'nh:flex nh:flex-col-reverse nh:sm:flex-row nh:sm:justify-end nh:sm:space-x-2',\n className\n )}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n 'nh:text-lg nh:leading-none nh:font-semibold nh:tracking-tight',\n className\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('nh:text-sm nh:text-gray-500', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,eAAe,MAAM,wBAAwB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List":[]}
|
|
1
|
+
{"version":3,"file":"dialog.js","names":["c","_c","React","DialogPrimitive","X","cn","usePuckDictionary","jsx","_jsx","jsxs","_jsxs","Dialog","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","forwardRef","t0","ref","$","className","props","t1","t2","Overlay","displayName","DialogContent","children","common","Symbol","for","t3","t4","close","t5","Content","DialogHeader","DialogFooter","DialogTitle","Title","DialogDescription","Description"],"sources":["../../../../src/puck-editor/internal/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn } from '../../../shared/cn.ts';\nimport { usePuckDictionary } from '../i18n.tsx';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'nh:data-[state=open]:animate-in nh:data-[state=closed]:animate-out nh:data-[state=closed]:fade-out-0 nh:data-[state=open]:fade-in-0 nh:fixed nh:inset-0 nh:z-50 nh:bg-black/80',\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => {\n const { common } = usePuckDictionary();\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'nh:data-[state=open]:animate-in nh:data-[state=closed]:animate-out nh:data-[state=closed]:fade-out-0 nh:data-[state=open]:fade-in-0 nh:data-[state=closed]:zoom-out-95 nh:data-[state=open]:zoom-in-95 nh:data-[state=closed]:slide-out-to-left-1/2 nh:data-[state=closed]:slide-out-to-top-[48%] nh:data-[state=open]:slide-in-from-left-1/2 nh:data-[state=open]:slide-in-from-top-[48%] nh-root nh:fixed nh:top-[50%] nh:left-[50%] nh:z-50 nh:grid nh:w-full nh:max-w-lg nh:translate-x-[-50%] nh:translate-y-[-50%] nh:gap-4 nh:border nh:bg-white nh:p-6 nh:shadow-lg nh:duration-200 nh:sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"nh:absolute nh:top-4 nh:right-4 nh:rounded-sm nh:opacity-70 nh:ring-offset-white nh:transition-opacity nh:hover:opacity-100 nh:focus:ring-2 nh:focus:ring-(--nh-primary) nh:focus:ring-offset-2 nh:focus:outline-none nh:disabled:pointer-events-none nh:data-[state=open]:bg-black\">\n <X className=\"nh:h-4 nh:w-4\" />\n <span className=\"nh:sr-only\">{common.close}</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n});\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'nh:flex nh:flex-col nh:space-y-1.5 nh:text-center nh:sm:text-left',\n className\n )}\n {...props}\n />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'nh:flex nh:flex-col-reverse nh:sm:flex-row nh:sm:justify-end nh:sm:space-x-2',\n className\n )}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n 'nh:text-lg nh:leading-none nh:font-semibold nh:tracking-tight',\n className\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('nh:text-sm nh:text-gray-500', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,eAAe,MAAM,wBAAwB;AACzD,SAASC,CAAC,QAAQ,cAAc;AAEhC,SAASC,EAAE,QAAQ,uBAAuB;AAC1C,SAASC,iBAAiB,QAAQ,YAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhD,MAAMC,MAAM,GAAGR,eAAe,CAACS,IAAI;AAEnC,MAAMC,aAAa,GAAGV,eAAe,CAACW,OAAO;AAE7C,MAAMC,YAAY,GAAGZ,eAAe,CAACa,MAAM;AAE3C,MAAMC,WAAW,GAAGd,eAAe,CAACe,KAAK;AAEzC,MAAMC,aAAa,gBAAGjB,KAAK,CAACkB,UAAU,CAGpC,CAAAC,EAAA,EAAAC,GAAA;EAAA,MAAAC,CAAA,GAAAtB,EAAA;EAAA,IAAAuB,SAAA;EAAA,IAAAC,KAAA;EAAA,IAAAF,CAAA,QAAAF,EAAA;IAAC;MAAAG,SAAA;MAAA,GAAAC;IAAA,IAAAJ,EAAuB;IAAAE,CAAA,MAAAF,EAAA;IAAAE,CAAA,MAAAC,SAAA;IAAAD,CAAA,MAAAE,KAAA;EAA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A,MAAAE,KAAA;EAAA;IAAAD,SAAA,GAAAD,CAAA;IAAAE,KAAA,GAAAF,CAAA;EAAA;EAAA,IAAAG,EAAA;EAAA,IAAAH,CAAA,QAAAC,SAAA;IAGXE,EAAA,GAAArB,EAAE,CAAC,6BAA6B,EAAEmB,SAAS,CAAC;IAAAD,CAAA,MAAAC,SAAA;IAAAD,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,IAAAI,EAAA;EAAA,IAAAJ,CAAA,QAAAE,KAAA,IAAAF,CAAA,QAAAD,GAAA,IAAAC,CAAA,QAAAG,EAAA;IAFzDC,EAAA,gBAAAnB,IAAA,CAAAL,eAAA,CAAA0C,WAAA;MACOvB,GAAG,EAAHA,GAAG;MACGE,SAA4C,EAA5CE,EAA4C;MAAA,GACnDD;IAAK,CACV,CAAC;IAAAF,CAAA,MAAAE,KAAA;IAAAF,CAAA,MAAAD,GAAA;IAAAC,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAI,EAAA;EAAA;IAAAA,EAAA,GAAAJ,CAAA;EAAA;EAAA,OAJFI,EAIE;AAAA,CACH,CAAC;AACFiB,iBAAiB,CAACf,WAAW,GAAG1B,eAAe,CAAC0C,WAAW,CAAChB,WAAW;AAEvE,SACElB,MAAM,EACNI,YAAY,EACZI,aAAa,EACbF,WAAW,EACXJ,aAAa,EACbiB,aAAa,EACbU,YAAY,EACZC,YAAY,EACZC,WAAW,EACXE,iBAAiB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { cn } from
|
|
6
|
+
import { cn } from "../../../shared/cn.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const iconButtonVariants = cva('nh:cursor-pointer nh:disabled:cursor-not-allowed nh:disabled:opacity-50', {
|
|
9
9
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","names":["c","_c","React","cva","cn","jsx","_jsx","iconButtonVariants","variants","variant","overlay","ghost","tile","defaultVariants","IconButton","t0","$","className","props","t1","type","undefined","t2","t3"],"sources":["../../../../src/puck-editor/internal/ui/icon-button.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../../shared/cn';\n\nconst iconButtonVariants = cva(\n 'nh:cursor-pointer nh:disabled:cursor-not-allowed nh:disabled:opacity-50',\n {\n variants: {\n variant: {\n overlay:\n 'nh:relative nh:rounded nh:bg-white/90 nh:p-1 nh:opacity-0 nh:shadow-sm nh:group-hover:opacity-100 nh:hover:bg-white',\n ghost: 'nh:text-gray-400 nh:transition-colors nh:hover:text-gray-600',\n tile: 'nh:flex nh:aspect-square nh:items-center nh:justify-center nh:rounded-md nh:border nh:border-dashed nh:border-gray-300 nh:text-gray-400 nh:hover:border-(--nh-primary) nh:hover:text-(--nh-primary)',\n },\n },\n defaultVariants: { variant: 'ghost' },\n }\n);\n\nexport interface IconButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconButtonVariants> {}\n\nexport function IconButton({\n variant,\n className,\n type = 'button',\n ...props\n}: IconButtonProps) {\n return (\n <button\n type={type}\n className={cn(iconButtonVariants({ variant }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,SAASC,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"icon-button.js","names":["c","_c","React","cva","cn","jsx","_jsx","iconButtonVariants","variants","variant","overlay","ghost","tile","defaultVariants","IconButton","t0","$","className","props","t1","type","undefined","t2","t3"],"sources":["../../../../src/puck-editor/internal/ui/icon-button.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../../shared/cn.ts';\n\nconst iconButtonVariants = cva(\n 'nh:cursor-pointer nh:disabled:cursor-not-allowed nh:disabled:opacity-50',\n {\n variants: {\n variant: {\n overlay:\n 'nh:relative nh:rounded nh:bg-white/90 nh:p-1 nh:opacity-0 nh:shadow-sm nh:group-hover:opacity-100 nh:hover:bg-white',\n ghost: 'nh:text-gray-400 nh:transition-colors nh:hover:text-gray-600',\n tile: 'nh:flex nh:aspect-square nh:items-center nh:justify-center nh:rounded-md nh:border nh:border-dashed nh:border-gray-300 nh:text-gray-400 nh:hover:border-(--nh-primary) nh:hover:text-(--nh-primary)',\n },\n },\n defaultVariants: { variant: 'ghost' },\n }\n);\n\nexport interface IconButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof iconButtonVariants> {}\n\nexport function IconButton({\n variant,\n className,\n type = 'button',\n ...props\n}: IconButtonProps) {\n return (\n <button\n type={type}\n className={cn(iconButtonVariants({ variant }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,SAASC,EAAE,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAMC,kBAAkB,GAAGJ,GAAG,CAC5B,yEAAyE,EACzE;EACEK,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EACL,qHAAqH;MACvHC,KAAK,EAAE,8DAA8D;MACrEC,IAAI,EAAE;IACR;EACF,CAAC;EACDC,eAAe,EAAE;IAAEJ,OAAO,EAAE;EAAQ;AACtC,CACF,CAAC;AAOD,OAAO,SAAAK,WAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAf,EAAA;EAAA,IAAAgB,SAAA;EAAA,IAAAC,KAAA;E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