@nodehive/nextjs 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/internal/config.d.ts +15 -5
- package/dist/auth/internal/config.js.map +1 -1
- package/dist/auth/internal/draft-mode.d.ts +2 -3
- package/dist/auth/internal/draft-mode.js +3 -20
- package/dist/auth/internal/draft-mode.js.map +1 -1
- package/dist/auth/internal/editor-locale.d.ts +0 -1
- package/dist/auth/internal/handoff.d.ts +0 -1
- package/dist/auth/internal/has-session.d.ts +0 -1
- package/dist/auth/internal/has-session.js +1 -1
- package/dist/auth/internal/has-session.js.map +1 -1
- package/dist/auth/internal/i18n.d.ts +10 -0
- package/dist/auth/internal/i18n.js +25 -0
- package/dist/auth/internal/i18n.js.map +1 -0
- package/dist/auth/internal/logout.d.ts +1 -2
- package/dist/auth/internal/logout.js +3 -3
- package/dist/auth/internal/logout.js.map +1 -1
- package/dist/auth/internal/next-cookie-storage.d.ts +5 -2
- package/dist/auth/internal/next-cookie-storage.js +8 -1
- package/dist/auth/internal/next-cookie-storage.js.map +1 -1
- package/dist/auth/internal/nodehive-client.d.ts +6 -4
- package/dist/auth/internal/nodehive-client.js +6 -4
- package/dist/auth/internal/nodehive-client.js.map +1 -1
- package/dist/auth/internal/oauth-config.d.ts +0 -1
- package/dist/auth/internal/proxy-helpers.d.ts +0 -1
- package/dist/auth/internal/proxy-helpers.js +4 -4
- package/dist/auth/internal/proxy-helpers.js.map +1 -1
- package/dist/auth/internal/refresh.d.ts +1 -2
- package/dist/auth/internal/refresh.js +4 -4
- package/dist/auth/internal/refresh.js.map +1 -1
- package/dist/auth/internal/require-auth.d.ts +0 -1
- package/dist/auth/internal/require-auth.js +1 -1
- package/dist/auth/internal/require-auth.js.map +1 -1
- package/dist/auth/internal/return-to.d.ts +0 -1
- package/dist/auth/internal/roles.d.ts +17 -0
- package/dist/auth/internal/roles.js +39 -0
- package/dist/auth/internal/roles.js.map +1 -0
- package/dist/auth/internal/routes/callback.d.ts +1 -2
- package/dist/auth/internal/routes/callback.js +6 -6
- package/dist/auth/internal/routes/callback.js.map +1 -1
- package/dist/auth/internal/routes/chips-exchange.d.ts +1 -2
- package/dist/auth/internal/routes/chips-exchange.js +5 -5
- package/dist/auth/internal/routes/chips-exchange.js.map +1 -1
- package/dist/auth/internal/routes/draft.d.ts +1 -2
- package/dist/auth/internal/routes/draft.js +3 -3
- package/dist/auth/internal/routes/draft.js.map +1 -1
- package/dist/auth/internal/routes/index.d.ts +4 -2
- package/dist/auth/internal/routes/index.js +7 -7
- package/dist/auth/internal/routes/index.js.map +1 -1
- package/dist/auth/internal/routes/login.d.ts +0 -1
- package/dist/auth/internal/routes/login.js +3 -3
- package/dist/auth/internal/routes/login.js.map +1 -1
- package/dist/auth/internal/routes/popup-done.d.ts +2 -2
- package/dist/auth/internal/routes/popup-done.js +9 -7
- package/dist/auth/internal/routes/popup-done.js.map +1 -1
- package/dist/auth/internal/routes/refresh.d.ts +2 -5
- package/dist/auth/internal/routes/refresh.js +8 -2
- package/dist/auth/internal/routes/refresh.js.map +1 -1
- package/dist/auth/internal/same-origin.d.ts +0 -1
- package/dist/auth/internal/session-gates.d.ts +27 -3
- package/dist/auth/internal/session-gates.js +35 -3
- package/dist/auth/internal/session-gates.js.map +1 -1
- package/dist/auth/internal/update-session.d.ts +1 -2
- package/dist/auth/internal/update-session.js +1 -1
- package/dist/auth/internal/update-session.js.map +1 -1
- package/dist/auth/internal/use-editor-login.d.ts +0 -1
- package/dist/auth/internal/use-editor-login.js +2 -3
- package/dist/auth/internal/use-editor-login.js.map +1 -1
- package/dist/auth/proxy.d.ts +7 -8
- package/dist/auth/proxy.js +6 -6
- package/dist/auth/proxy.js.map +1 -1
- package/dist/auth/react.d.ts +1 -2
- package/dist/auth/react.js +1 -1
- package/dist/auth/react.js.map +1 -1
- package/dist/auth/routes.d.ts +3 -3
- package/dist/auth/routes.js +1 -1
- package/dist/auth/routes.js.map +1 -1
- package/dist/auth/server.d.ts +14 -12
- package/dist/auth/server.js +14 -9
- package/dist/auth/server.js.map +1 -1
- package/dist/bridge-protocol/index.d.ts +50 -0
- package/dist/bridge-protocol/index.js +25 -0
- package/dist/bridge-protocol/index.js.map +1 -0
- package/dist/puck-editor/editor.d.ts +8 -0
- package/dist/puck-editor/editor.js +9 -0
- package/dist/puck-editor/editor.js.map +1 -0
- package/dist/puck-editor/fields.d.ts +6 -7
- package/dist/puck-editor/fields.js +3 -3
- package/dist/puck-editor/fields.js.map +1 -1
- package/dist/puck-editor/index.d.ts +17 -14
- package/dist/puck-editor/index.js +13 -11
- package/dist/puck-editor/index.js.map +1 -1
- package/dist/puck-editor/internal/api/client.d.ts +19 -4
- package/dist/puck-editor/internal/api/client.js +56 -19
- package/dist/puck-editor/internal/api/client.js.map +1 -1
- package/dist/puck-editor/internal/api/config.d.ts +36 -3
- package/dist/puck-editor/internal/api/config.js.map +1 -1
- package/dist/puck-editor/internal/api/create-puck-api.d.ts +1 -2
- package/dist/puck-editor/internal/api/create-puck-api.js +10 -13
- package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts +1 -2
- package/dist/puck-editor/internal/api/handlers/create-page.js +6 -4
- package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/entities.d.ts +6 -5
- package/dist/puck-editor/internal/api/handlers/entities.js +60 -15
- package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/publish.d.ts +3 -6
- package/dist/puck-editor/internal/api/handlers/publish.js +57 -14
- package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts +5 -2
- package/dist/puck-editor/internal/api/handlers/template.js +28 -60
- package/dist/puck-editor/internal/api/handlers/template.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/upload.d.ts +10 -2
- package/dist/puck-editor/internal/api/handlers/upload.js +93 -28
- package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -1
- package/dist/puck-editor/internal/api/localize-message.d.ts +15 -0
- package/dist/puck-editor/internal/api/localize-message.js +15 -0
- package/dist/puck-editor/internal/api/localize-message.js.map +1 -0
- package/dist/puck-editor/internal/api/media-params.d.ts +3 -3
- package/dist/puck-editor/internal/api/media-params.js +23 -19
- package/dist/puck-editor/internal/api/media-params.js.map +1 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts +5 -3
- package/dist/puck-editor/internal/api/media-upload.js +33 -22
- package/dist/puck-editor/internal/api/media-upload.js.map +1 -1
- package/dist/puck-editor/internal/api/space.d.ts +0 -1
- package/dist/puck-editor/internal/api/type-segment.d.ts +2 -0
- package/dist/puck-editor/internal/api/type-segment.js +9 -0
- package/dist/puck-editor/internal/api/type-segment.js.map +1 -0
- package/dist/puck-editor/internal/content-model.d.ts +31 -3
- package/dist/puck-editor/internal/content-model.js +76 -6
- package/dist/puck-editor/internal/content-model.js.map +1 -1
- package/dist/puck-editor/internal/dictionaries.d.ts +225 -0
- package/dist/puck-editor/internal/dictionaries.js +673 -0
- package/dist/puck-editor/internal/dictionaries.js.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts +1 -2
- package/dist/puck-editor/internal/editor/allowed-types.js +2 -2
- package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.js +5 -5
- package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.js +4 -4
- package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.js +8 -8
- package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +0 -1
- package/dist/puck-editor/internal/editor/component-icons.d.ts +1 -2
- package/dist/puck-editor/internal/editor/component-icons.js.map +1 -1
- package/dist/puck-editor/internal/editor/component-item.d.ts +0 -1
- package/dist/puck-editor/internal/editor/component-item.js +2 -2
- package/dist/puck-editor/internal/editor/component-item.js.map +1 -1
- package/dist/puck-editor/internal/editor/compose-save-issues.d.ts +15 -0
- package/dist/puck-editor/internal/editor/compose-save-issues.js +16 -0
- package/dist/puck-editor/internal/editor/compose-save-issues.js.map +1 -0
- package/dist/puck-editor/internal/editor/dirty-state.d.ts +3 -0
- package/dist/puck-editor/internal/editor/dirty-state.js +7 -0
- package/dist/puck-editor/internal/editor/dirty-state.js.map +1 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.d.ts +9 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.js +289 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.js.map +1 -0
- package/dist/puck-editor/internal/editor/draft-storage.d.ts +41 -0
- package/dist/puck-editor/internal/editor/draft-storage.js +129 -0
- package/dist/puck-editor/internal/editor/draft-storage.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +0 -1
- package/dist/puck-editor/internal/editor/editor-action-bar.js +4 -4
- package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -1
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +6 -4
- package/dist/puck-editor/internal/editor/editor-header-actions.js +119 -60
- package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -1
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +0 -1
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +1 -2
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +6 -6
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -1
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +1 -2
- package/dist/puck-editor/internal/editor/grouped-entry-list.js +7 -6
- package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -1
- package/dist/puck-editor/internal/editor/header-save-button.d.ts +4 -4
- package/dist/puck-editor/internal/editor/header-save-button.js +66 -27
- package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -1
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.d.ts +5 -0
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.js +140 -0
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.js.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts +0 -1
- package/dist/puck-editor/internal/editor/page-template-picker.js +5 -5
- package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -1
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +1 -2
- package/dist/puck-editor/internal/editor/picker-entry-item.js +4 -4
- package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -1
- package/dist/puck-editor/internal/editor/picker-model.d.ts +14 -5
- package/dist/puck-editor/internal/editor/picker-model.js +157 -132
- package/dist/puck-editor/internal/editor/picker-model.js.map +1 -1
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +18 -4
- package/dist/puck-editor/internal/editor/publish-puck-data.js +25 -4
- package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -1
- package/dist/puck-editor/internal/editor/puck-editor.d.ts +6 -4
- package/dist/puck-editor/internal/editor/puck-editor.js +270 -209
- package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/editor/save-guard.d.ts +15 -0
- package/dist/puck-editor/internal/editor/save-guard.js +30 -0
- package/dist/puck-editor/internal/editor/save-guard.js.map +1 -0
- package/dist/puck-editor/internal/editor/save-page-context.d.ts +8 -0
- package/dist/puck-editor/internal/editor/save-page-context.js +34 -0
- package/dist/puck-editor/internal/editor/save-page-context.js.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts +0 -1
- package/dist/puck-editor/internal/editor/section-template-modal.js +2 -2
- package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -1
- package/dist/puck-editor/internal/editor/use-draft-recovery.d.ts +16 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.js +194 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts +0 -1
- package/dist/puck-editor/internal/editor/use-is-dirty.d.ts +1 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.js +32 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts +16 -3
- package/dist/puck-editor/internal/editor-config.js +8 -1
- package/dist/puck-editor/internal/editor-config.js.map +1 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +2 -2
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +1 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +1 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js +90 -73
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -1
- package/dist/puck-editor/internal/fields/index.d.ts +10 -10
- package/dist/puck-editor/internal/fields/index.js +10 -9
- package/dist/puck-editor/internal/fields/index.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.js +1 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +1 -2
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +1 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +208 -140
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +1 -2
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +6 -6
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +25 -5
- package/dist/puck-editor/internal/fields/link-picker/link-value.js +56 -6
- package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +4 -4
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +3 -3
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +1 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js +100 -88
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +1 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +1 -2
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +4 -4
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +19 -10
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +7 -3
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +29 -22
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +1 -2
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +281 -255
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +15 -2
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +23 -18
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +12 -6
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +2 -2
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.js +1 -1
- package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -1
- package/dist/puck-editor/internal/fields/required.d.ts +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +13 -3
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +32 -22
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -1
- package/dist/puck-editor/internal/i18n.d.ts +2 -181
- package/dist/puck-editor/internal/i18n.js +2 -358
- package/dist/puck-editor/internal/i18n.js.map +1 -1
- package/dist/puck-editor/internal/locale.d.ts +0 -1
- package/dist/puck-editor/internal/localize.d.ts +1 -2
- package/dist/puck-editor/internal/localize.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +3 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +41 -32
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +3 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +4 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +5 -6
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +3 -3
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +46 -31
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +5 -5
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +2 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +224 -219
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +5 -6
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js +5 -5
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +17 -16
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +171 -161
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +2 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +9 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +22 -20
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +14 -5
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +23 -15
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts +0 -1
- package/dist/puck-editor/internal/puck-props.d.ts +13 -0
- package/dist/puck-editor/internal/puck-props.js +2 -0
- package/dist/puck-editor/internal/puck-props.js.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts +25 -6
- package/dist/puck-editor/internal/puck-wrapper.js +124 -115
- package/dist/puck-editor/internal/puck-wrapper.js.map +1 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts +1 -2
- package/dist/puck-editor/internal/render/cropped-image.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/action-selection.d.ts +8 -0
- package/dist/puck-editor/internal/smart-actions/action-selection.js +10 -0
- package/dist/puck-editor/internal/smart-actions/action-selection.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts +10 -4
- package/dist/puck-editor/internal/smart-actions/index.js +27 -12
- package/dist/puck-editor/internal/smart-actions/index.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts +3 -2
- package/dist/puck-editor/internal/smart-actions/new-page.js +6 -6
- package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +3 -2
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +49 -37
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts +0 -1
- package/dist/puck-editor/internal/ui/calendar.js +1 -1
- package/dist/puck-editor/internal/ui/calendar.js.map +1 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts +0 -1
- package/dist/puck-editor/internal/ui/dialog.js +33 -20
- package/dist/puck-editor/internal/ui/dialog.js.map +1 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts +0 -1
- package/dist/puck-editor/internal/ui/icon-button.js +1 -1
- package/dist/puck-editor/internal/ui/icon-button.js.map +1 -1
- package/dist/puck-editor/internal/ui/load-error-notice.d.ts +6 -0
- package/dist/puck-editor/internal/ui/load-error-notice.js +81 -0
- package/dist/puck-editor/internal/ui/load-error-notice.js.map +1 -0
- package/dist/puck-editor/internal/ui/popover.d.ts +0 -1
- package/dist/puck-editor/internal/ui/popover.js +1 -1
- package/dist/puck-editor/internal/ui/popover.js.map +1 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts +0 -1
- package/dist/puck-editor/internal/ui/scroll-area.d.ts +8 -0
- package/dist/puck-editor/internal/ui/scroll-area.js +160 -0
- package/dist/puck-editor/internal/ui/scroll-area.js.map +1 -0
- package/dist/puck-editor/internal/ui/search-control.d.ts +0 -1
- package/dist/puck-editor/internal/ui/search-control.js +3 -3
- package/dist/puck-editor/internal/ui/search-control.js.map +1 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts +1 -2
- package/dist/puck-editor/internal/use-puck-overlay.js +6 -5
- package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -1
- package/dist/puck-editor/internal/utils.d.ts +0 -1
- package/dist/puck-editor/render.d.ts +2 -3
- package/dist/puck-editor/render.js +1 -1
- package/dist/puck-editor/render.js.map +1 -1
- package/dist/puck-editor/server.d.ts +3 -4
- package/dist/puck-editor/server.js +1 -1
- package/dist/puck-editor/server.js.map +1 -1
- package/dist/puck-editor/smart-actions.d.ts +1 -2
- package/dist/puck-editor/smart-actions.js +1 -1
- package/dist/puck-editor/smart-actions.js.map +1 -1
- package/dist/shared/cn.d.ts +0 -1
- package/dist/shared/i18n.d.ts +0 -1
- package/dist/shared/revalidate-path.d.ts +1 -0
- package/dist/shared/revalidate-path.js +2 -0
- package/dist/shared/revalidate-path.js.map +1 -0
- package/dist/shared/toolbar-action.d.ts +0 -1
- package/dist/shared/use-is-hydrated.d.ts +0 -1
- package/dist/shared/use-is-in-iframe.d.ts +0 -1
- package/dist/shared/use-is-in-iframe.js +1 -1
- package/dist/shared/use-is-in-iframe.js.map +1 -1
- package/dist/smart-actions/internal/backend-edit-link.d.ts +6 -0
- package/dist/smart-actions/internal/backend-edit-link.js +60 -0
- package/dist/smart-actions/internal/backend-edit-link.js.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts +1 -2
- package/dist/smart-actions/internal/get-smart-actions-context.js +2 -2
- package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -1
- package/dist/smart-actions/internal/i18n.d.ts +1 -2
- package/dist/smart-actions/internal/i18n.js +16 -2
- package/dist/smart-actions/internal/i18n.js.map +1 -1
- package/dist/smart-actions/internal/logout-form.d.ts +2 -2
- package/dist/smart-actions/internal/logout-form.js +47 -40
- package/dist/smart-actions/internal/logout-form.js.map +1 -1
- package/dist/smart-actions/internal/refresh-page.d.ts +3 -2
- package/dist/smart-actions/internal/refresh-page.js +60 -53
- package/dist/smart-actions/internal/refresh-page.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts +22 -4
- package/dist/smart-actions/internal/smart-actions-button.js +36 -13
- package/dist/smart-actions/internal/smart-actions-button.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts +12 -4
- package/dist/smart-actions/internal/smart-actions-config.js +36 -80
- package/dist/smart-actions/internal/smart-actions-config.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +5 -11
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js +13 -53
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +4 -4
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/storage.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/types.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +1 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts +0 -1
- package/dist/smart-actions/internal/ui/tooltip.js +1 -1
- package/dist/smart-actions/internal/ui/tooltip.js.map +1 -1
- package/dist/smart-actions/internal/user-profile.d.ts +0 -1
- package/dist/smart-actions/internal/user-profile.js +71 -24
- package/dist/smart-actions/internal/user-profile.js.map +1 -1
- package/dist/smart-actions/server.d.ts +5 -4
- package/dist/smart-actions/server.js +2 -2
- package/dist/smart-actions/server.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/visual-editor/index.d.ts +3 -4
- package/dist/visual-editor/index.js +3 -3
- package/dist/visual-editor/index.js.map +1 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts +4 -3
- package/dist/visual-editor/internal/bridge/connector.js +22 -21
- package/dist/visual-editor/internal/bridge/connector.js.map +1 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +5 -3
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +7 -8
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +3 -3
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js +4 -2
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -1
- package/dist/visual-editor/internal/i18n.d.ts +3 -2
- package/dist/visual-editor/internal/i18n.js +32 -4
- package/dist/visual-editor/internal/i18n.js.map +1 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +1 -7
- package/dist/visual-editor/internal/overlays/drupal-origin.js +16 -3
- package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts +5 -4
- package/dist/visual-editor/internal/overlays/edit-button.js +46 -44
- package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +11 -2
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +18 -7
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js +1 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +12 -3
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +14 -5
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +4 -2
- package/dist/visual-editor/internal/overlays/node/node-metadata.js +10 -4
- package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +5 -3
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js +4 -2
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +11 -2
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +18 -7
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts +0 -1
- package/dist/visual-editor/internal/revalidate-route.js +1 -1
- package/dist/visual-editor/internal/revalidate-route.js.map +1 -1
- package/dist/visual-editor/server.d.ts +6 -7
- package/dist/visual-editor/server.js +6 -6
- package/dist/visual-editor/server.js.map +1 -1
- package/package.json +20 -3
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/internal/config.d.ts.map +0 -1
- package/dist/auth/internal/draft-mode.d.ts.map +0 -1
- package/dist/auth/internal/editor-locale.d.ts.map +0 -1
- package/dist/auth/internal/handoff.d.ts.map +0 -1
- package/dist/auth/internal/has-session.d.ts.map +0 -1
- package/dist/auth/internal/logout.d.ts.map +0 -1
- package/dist/auth/internal/next-cookie-storage.d.ts.map +0 -1
- package/dist/auth/internal/nodehive-client.d.ts.map +0 -1
- package/dist/auth/internal/oauth-config.d.ts.map +0 -1
- package/dist/auth/internal/proxy-helpers.d.ts.map +0 -1
- package/dist/auth/internal/refresh.d.ts.map +0 -1
- package/dist/auth/internal/require-auth.d.ts.map +0 -1
- package/dist/auth/internal/return-to.d.ts.map +0 -1
- package/dist/auth/internal/routes/callback.d.ts.map +0 -1
- package/dist/auth/internal/routes/chips-exchange.d.ts.map +0 -1
- package/dist/auth/internal/routes/draft.d.ts.map +0 -1
- package/dist/auth/internal/routes/index.d.ts.map +0 -1
- package/dist/auth/internal/routes/login.d.ts.map +0 -1
- package/dist/auth/internal/routes/popup-done.d.ts.map +0 -1
- package/dist/auth/internal/routes/refresh.d.ts.map +0 -1
- package/dist/auth/internal/same-origin.d.ts.map +0 -1
- package/dist/auth/internal/session-gates.d.ts.map +0 -1
- package/dist/auth/internal/update-session.d.ts.map +0 -1
- package/dist/auth/internal/use-editor-login.d.ts.map +0 -1
- package/dist/auth/proxy.d.ts.map +0 -1
- package/dist/auth/react.d.ts.map +0 -1
- package/dist/auth/routes.d.ts.map +0 -1
- package/dist/auth/server.d.ts.map +0 -1
- package/dist/puck-editor/fields.d.ts.map +0 -1
- package/dist/puck-editor/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/client.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/config.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/media-params.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/space.d.ts.map +0 -1
- package/dist/puck-editor/internal/content-model.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/component-icons.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/component-item.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/picker-model.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/i18n.d.ts.map +0 -1
- package/dist/puck-editor/internal/locale.d.ts.map +0 -1
- package/dist/puck-editor/internal/localize.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-wrapper.d.ts.map +0 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/popover.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/search-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +0 -1
- package/dist/puck-editor/internal/utils.d.ts.map +0 -1
- package/dist/puck-editor/render.d.ts.map +0 -1
- package/dist/puck-editor/server.d.ts.map +0 -1
- package/dist/puck-editor/smart-actions.d.ts.map +0 -1
- package/dist/shared/cn.d.ts.map +0 -1
- package/dist/shared/i18n.d.ts.map +0 -1
- package/dist/shared/toolbar-action.d.ts.map +0 -1
- package/dist/shared/use-is-hydrated.d.ts.map +0 -1
- package/dist/shared/use-is-in-iframe.d.ts.map +0 -1
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +0 -1
- package/dist/smart-actions/internal/i18n.d.ts.map +0 -1
- package/dist/smart-actions/internal/logout-form.d.ts.map +0 -1
- package/dist/smart-actions/internal/refresh-page.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +0 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts.map +0 -1
- package/dist/smart-actions/internal/user-profile.d.ts.map +0 -1
- package/dist/smart-actions/server.d.ts.map +0 -1
- package/dist/visual-editor/index.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +0 -1
- package/dist/visual-editor/internal/i18n.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts.map +0 -1
- package/dist/visual-editor/server.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
|
-
import { usePuckDictionary } from
|
|
5
|
-
import { RequiredFieldLabel } from
|
|
4
|
+
import { usePuckDictionary } from "../../i18n.js";
|
|
5
|
+
import { RequiredFieldLabel } from "../required-field-label.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export function CheckboxGroupField(t0) {
|
|
8
8
|
const $ = _c(22);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group-field.js","names":["c","_c","usePuckDictionary","RequiredFieldLabel","jsx","_jsx","jsxs","_jsxs","CheckboxGroupField","t0","$","label","options","value","t1","onChange","helperText","t2","undefined","t","fields","t3","optionValue","includes","filter","item","handleToggle","t4","t5","t6","className","children","t7","t8","option","type","checked","map","t9"],"sources":["../../../../../src/puck-editor/internal/fields/checkbox-group/checkbox-group-field.tsx"],"sourcesContent":["'use client';\n\nimport { usePuckDictionary } from '../../i18n';\nimport { RequiredFieldLabel } from '../required-field-label';\n\ntype CheckboxOption = {\n label: string;\n value: string;\n};\n\ntype CheckboxGroupFieldProps = {\n label?: string;\n options: CheckboxOption[];\n value?: string[];\n onChange: (value: string[]) => void;\n helperText?: string;\n};\n\nexport function CheckboxGroupField({\n label,\n options,\n value = [],\n onChange,\n helperText,\n}: CheckboxGroupFieldProps) {\n const t = usePuckDictionary().fields;\n const handleToggle = (optionValue: string) => {\n if (value.includes(optionValue)) {\n onChange(value.filter((item) => item !== optionValue));\n } else {\n onChange([...value, optionValue]);\n }\n };\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-2\">\n <RequiredFieldLabel label={label ?? t.options} />\n {helperText ? (\n <p className=\"nh:text-xs nh:text-gray-500\">{helperText}</p>\n ) : null}\n <div className=\"nh:flex nh:flex-col nh:gap-1\">\n {options.map((option) => (\n <label\n key={option.value}\n className=\"nh:flex nh:items-center nh:gap-2 nh:rounded nh:border nh:border-transparent nh:px-2 nh:py-1 nh:text-sm nh:font-medium nh:text-gray-700 nh:hover:border-gray-200\"\n >\n <input\n type=\"checkbox\"\n className=\"nh:size-4 nh:rounded nh:border-gray-300 nh:text-(--nh-primary)\"\n checked={value.includes(option.value)}\n onChange={() => handleToggle(option.value)}\n />\n <span className=\"nh:text-gray-900\">{option.label}</span>\n </label>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,iBAAiB,QAAQ,
|
|
1
|
+
{"version":3,"file":"checkbox-group-field.js","names":["c","_c","usePuckDictionary","RequiredFieldLabel","jsx","_jsx","jsxs","_jsxs","CheckboxGroupField","t0","$","label","options","value","t1","onChange","helperText","t2","undefined","t","fields","t3","optionValue","includes","filter","item","handleToggle","t4","t5","t6","className","children","t7","t8","option","type","checked","map","t9"],"sources":["../../../../../src/puck-editor/internal/fields/checkbox-group/checkbox-group-field.tsx"],"sourcesContent":["'use client';\n\nimport { usePuckDictionary } from '../../i18n.tsx';\nimport { RequiredFieldLabel } from '../required-field-label.tsx';\n\ntype CheckboxOption = {\n label: string;\n value: string;\n};\n\ntype CheckboxGroupFieldProps = {\n label?: string;\n options: CheckboxOption[];\n value?: string[];\n onChange: (value: string[]) => void;\n helperText?: string;\n};\n\nexport function CheckboxGroupField({\n label,\n options,\n value = [],\n onChange,\n helperText,\n}: CheckboxGroupFieldProps) {\n const t = usePuckDictionary().fields;\n const handleToggle = (optionValue: string) => {\n if (value.includes(optionValue)) {\n onChange(value.filter((item) => item !== optionValue));\n } else {\n onChange([...value, optionValue]);\n }\n };\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-2\">\n <RequiredFieldLabel label={label ?? t.options} />\n {helperText ? (\n <p className=\"nh:text-xs nh:text-gray-500\">{helperText}</p>\n ) : null}\n <div className=\"nh:flex nh:flex-col nh:gap-1\">\n {options.map((option) => (\n <label\n key={option.value}\n className=\"nh:flex nh:items-center nh:gap-2 nh:rounded nh:border nh:border-transparent nh:px-2 nh:py-1 nh:text-sm nh:font-medium nh:text-gray-700 nh:hover:border-gray-200\"\n >\n <input\n type=\"checkbox\"\n className=\"nh:size-4 nh:rounded nh:border-gray-300 nh:text-(--nh-primary)\"\n checked={value.includes(option.value)}\n onChange={() => handleToggle(option.value)}\n />\n <span className=\"nh:text-gray-900\">{option.label}</span>\n </label>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,iBAAiB,QAAQ,eAAgB;AAClD,SAASC,kBAAkB,QAAQ,4BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAejE,OAAO,SAAAC,mBAAAC,EAAA;EAAA,MAAAC,CAAA,GA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AAA,IAAAuB,EAAA;EAAA,IAAAvB,CAAA,SAAAsB,EAAA;IAdJC,EAAA,gBAAA5B,IAAA;MAAeyB,SAA8B,EAA9B,8BAA8B;MAAAC,QAAA,EAC1CC;IAaC,CACC,CAAC;IAAAtB,CAAA,OAAAsB,EAAA;IAAAtB,CAAA,OAAAuB,EAAA;EAAA;IAAAA,EAAA,GAAAvB,CAAA;EAAA;EAAA,IAAA4B,EAAA;EAAA,IAAA5B,CAAA,SAAAkB,EAAA,IAAAlB,CAAA,SAAAmB,EAAA,IAAAnB,CAAA,SAAAuB,EAAA;IApBRK,EAAA,gBAAA/B,KAAA;MAAeuB,SAA8B,EAA9B,8BAA8B;MAAAC,QAAA,GAC3CH,EAAiD,EAChDC,EAEO,EACRI,EAeM;IAAA,CACH,CAAC;IAAAvB,CAAA,OAAAkB,EAAA;IAAAlB,CAAA,OAAAmB,EAAA;IAAAnB,CAAA,OAAAuB,EAAA;IAAAvB,CAAA,OAAA4B,EAAA;EAAA;IAAAA,EAAA,GAAA5B,CAAA;EAAA;EAAA,OArBN4B,EAqBM;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-checkbox-group-field.js","names":["CheckboxGroupField","jsx","_jsx","createCheckboxGroupField","label","options","helperText","type","render","field","value","onChange"],"sources":["../../../../../src/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport { CheckboxGroupField } from './checkbox-group-field';\n\nexport interface CheckboxGroupFieldOptions {\n label?: string;\n options: Array<{ label: string; value: string }>;\n helperText?: string;\n}\n\nexport const createCheckboxGroupField = ({\n label,\n options,\n helperText,\n}: CheckboxGroupFieldOptions) => {\n return {\n type: 'custom' as const,\n label,\n render: (({ field, value, onChange }) => (\n <CheckboxGroupField\n label={field.label ?? label}\n options={options}\n value={value}\n onChange={onChange}\n helperText={helperText}\n />\n )) satisfies CustomFieldRender<string[]>,\n };\n};\n"],"mappings":"AAEA,SAASA,kBAAkB,QAAQ,
|
|
1
|
+
{"version":3,"file":"create-checkbox-group-field.js","names":["CheckboxGroupField","jsx","_jsx","createCheckboxGroupField","label","options","helperText","type","render","field","value","onChange"],"sources":["../../../../../src/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport { CheckboxGroupField } from './checkbox-group-field.tsx';\n\nexport interface CheckboxGroupFieldOptions {\n label?: string;\n options: Array<{ label: string; value: string }>;\n helperText?: string;\n}\n\nexport const createCheckboxGroupField = ({\n label,\n options,\n helperText,\n}: CheckboxGroupFieldOptions) => {\n return {\n type: 'custom' as const,\n label,\n render: (({ field, value, onChange }) => (\n <CheckboxGroupField\n label={field.label ?? label}\n options={options}\n value={value}\n onChange={onChange}\n helperText={helperText}\n />\n )) satisfies CustomFieldRender<string[]>,\n };\n};\n"],"mappings":"AAEA,SAASA,kBAAkB,QAAQ,2BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQhE,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACvCC,KAAK;EACLC,OAAO;EACPC;AACyB,CAAC,KAAK;EAC/B,OAAO;IACLC,IAAI,EAAE,QAAiB;IACvBH,KAAK;IACLI,MAAM,EAAGA,CAAC;MAAEC,KAAK;MAAEC,KAAK;MAAEC;IAAS,CAAC,kBAClCT,IAAA,CAACF,kBAAkB;MACjBI,KAAK,EAAEK,KAAK,CAACL,KAAK,IAAIA,KAAM;MAC5BC,OAAO,EAAEA,OAAQ;MACjBK,KAAK,EAAEA,KAAM;MACbC,QAAQ,EAAEA,QAAS;MACnBL,UAAU,EAAEA;IAAW,CACxB;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-date-picker-field.js","names":["DatePicker","jsx","_jsx","createDatePickerField","label","type","render","field","value","onChange","date"],"sources":["../../../../../src/puck-editor/internal/fields/date-picker/create-date-picker-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport { DatePicker } from './date-picker';\n\nexport interface DatePickerFieldOptions {\n label?: string;\n}\n\nexport const createDatePickerField = ({\n label,\n}: DatePickerFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n render: (({ field, value, onChange }) => (\n <DatePicker\n date={value}\n onChange={onChange}\n label={field.label ?? label}\n />\n )) satisfies CustomFieldRender<string>,\n };\n};\n"],"mappings":"AAEA,SAASA,UAAU,QAAQ,
|
|
1
|
+
{"version":3,"file":"create-date-picker-field.js","names":["DatePicker","jsx","_jsx","createDatePickerField","label","type","render","field","value","onChange","date"],"sources":["../../../../../src/puck-editor/internal/fields/date-picker/create-date-picker-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport { DatePicker } from './date-picker.tsx';\n\nexport interface DatePickerFieldOptions {\n label?: string;\n}\n\nexport const createDatePickerField = ({\n label,\n}: DatePickerFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n render: (({ field, value, onChange }) => (\n <DatePicker\n date={value}\n onChange={onChange}\n label={field.label ?? label}\n />\n )) satisfies CustomFieldRender<string>,\n };\n};\n"],"mappings":"AAEA,SAASA,UAAU,QAAQ,kBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM/C,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC;AACsB,CAAC,GAAG,CAAC,CAAC,KAAK;EACjC,OAAO;IACLC,IAAI,EAAE,QAAiB;IACvBD,KAAK;IACLE,MAAM,EAAGA,CAAC;MAAEC,KAAK;MAAEC,KAAK;MAAEC;IAAS,CAAC,kBAClCP,IAAA,CAACF,UAAU;MACTU,IAAI,EAAEF,KAAM;MACZC,QAAQ,EAAEA,QAAS;MACnBL,KAAK,EAAEG,KAAK,CAACH,KAAK,IAAIA;IAAM,CAC7B;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -2,22 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { format } from 'date-fns';
|
|
5
|
-
import { de } from 'date-fns/locale';
|
|
5
|
+
import { de, enUS, fr } from 'date-fns/locale';
|
|
6
6
|
import { CalendarIcon } from 'lucide-react';
|
|
7
|
-
import { cn } from
|
|
8
|
-
import { usePuckDictionary } from
|
|
9
|
-
import { Calendar } from
|
|
10
|
-
import { Popover, PopoverContent, PopoverTrigger } from
|
|
11
|
-
import { RequiredFieldLabel } from
|
|
7
|
+
import { cn } from "../../../../shared/cn.js";
|
|
8
|
+
import { usePuckDictionary, usePuckLocale } from "../../i18n.js";
|
|
9
|
+
import { Calendar } from "../../ui/calendar.js";
|
|
10
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
11
|
+
import { RequiredFieldLabel } from "../required-field-label.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const DATE_FNS_LOCALES = {
|
|
14
|
+
de,
|
|
15
|
+
en: enUS,
|
|
16
|
+
fr
|
|
17
|
+
};
|
|
18
|
+
function dateFnsLocale(editorLocale) {
|
|
19
|
+
return DATE_FNS_LOCALES[editorLocale.split('-')[0]] ?? enUS;
|
|
20
|
+
}
|
|
13
21
|
export function DatePicker(t0) {
|
|
14
|
-
const $ = _c(
|
|
22
|
+
const $ = _c(28);
|
|
15
23
|
const {
|
|
16
24
|
date,
|
|
17
25
|
onChange,
|
|
18
26
|
label
|
|
19
27
|
} = t0;
|
|
20
28
|
const t = usePuckDictionary().fields;
|
|
29
|
+
const locale = dateFnsLocale(usePuckLocale());
|
|
21
30
|
let t1;
|
|
22
31
|
if ($[0] !== onChange) {
|
|
23
32
|
t1 = day => {
|
|
@@ -52,100 +61,108 @@ export function DatePicker(t0) {
|
|
|
52
61
|
} else {
|
|
53
62
|
t4 = $[4];
|
|
54
63
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
const T0 = Popover;
|
|
65
|
+
const T1 = PopoverTrigger;
|
|
66
|
+
const t5 = true;
|
|
67
|
+
const t6 = "button";
|
|
68
|
+
const t7 = !date && "nh:text-gray-500";
|
|
69
|
+
let t8;
|
|
70
|
+
if ($[5] !== t7) {
|
|
71
|
+
t8 = cn("nh:flex nh:w-full nh:cursor-pointer nh:items-center nh:justify-start nh:gap-2 nh:rounded-sm nh:border nh:border-gray-300 nh:p-3 nh:text-left nh:text-sm nh:font-normal", t7);
|
|
72
|
+
$[5] = t7;
|
|
73
|
+
$[6] = t8;
|
|
61
74
|
} else {
|
|
62
|
-
|
|
75
|
+
t8 = $[6];
|
|
63
76
|
}
|
|
64
|
-
let
|
|
77
|
+
let t9;
|
|
65
78
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
66
|
-
|
|
79
|
+
t9 = /*#__PURE__*/_jsx(CalendarIcon, {
|
|
67
80
|
className: "nh:size-5"
|
|
68
81
|
});
|
|
69
|
-
$[7] =
|
|
82
|
+
$[7] = t9;
|
|
70
83
|
} else {
|
|
71
|
-
|
|
84
|
+
t9 = $[7];
|
|
72
85
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
const t10 = date ? format(new Date(date), "PPP", {
|
|
87
|
+
locale
|
|
88
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
89
|
+
children: t.selectDate
|
|
90
|
+
});
|
|
91
|
+
let t11;
|
|
92
|
+
if ($[8] !== t10 || $[9] !== t8 || $[10] !== t9) {
|
|
93
|
+
t11 = /*#__PURE__*/_jsxs("button", {
|
|
94
|
+
type: t6,
|
|
95
|
+
className: t8,
|
|
96
|
+
children: [t9, t10]
|
|
79
97
|
});
|
|
80
|
-
$[8] =
|
|
81
|
-
$[9] =
|
|
82
|
-
$[10] =
|
|
98
|
+
$[8] = t10;
|
|
99
|
+
$[9] = t8;
|
|
100
|
+
$[10] = t9;
|
|
101
|
+
$[11] = t11;
|
|
83
102
|
} else {
|
|
84
|
-
|
|
103
|
+
t11 = $[11];
|
|
85
104
|
}
|
|
86
|
-
let
|
|
87
|
-
if ($[
|
|
88
|
-
|
|
89
|
-
asChild:
|
|
90
|
-
children:
|
|
91
|
-
type: "button",
|
|
92
|
-
className: t6,
|
|
93
|
-
children: [t7, t8]
|
|
94
|
-
})
|
|
105
|
+
let t12;
|
|
106
|
+
if ($[12] !== T1 || $[13] !== t11) {
|
|
107
|
+
t12 = /*#__PURE__*/_jsx(T1, {
|
|
108
|
+
asChild: t5,
|
|
109
|
+
children: t11
|
|
95
110
|
});
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
111
|
+
$[12] = T1;
|
|
112
|
+
$[13] = t11;
|
|
113
|
+
$[14] = t12;
|
|
99
114
|
} else {
|
|
100
|
-
|
|
115
|
+
t12 = $[14];
|
|
101
116
|
}
|
|
102
|
-
let
|
|
103
|
-
if ($[
|
|
104
|
-
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
117
|
+
let t13;
|
|
118
|
+
if ($[15] !== date) {
|
|
119
|
+
t13 = new Date(date);
|
|
120
|
+
$[15] = date;
|
|
121
|
+
$[16] = t13;
|
|
107
122
|
} else {
|
|
108
|
-
|
|
123
|
+
t13 = $[16];
|
|
109
124
|
}
|
|
110
|
-
let
|
|
111
|
-
if ($[
|
|
112
|
-
|
|
125
|
+
let t14;
|
|
126
|
+
if ($[17] !== handleDateChange || $[18] !== locale || $[19] !== t13) {
|
|
127
|
+
t14 = /*#__PURE__*/_jsx(PopoverContent, {
|
|
113
128
|
className: "nh:w-auto nh:p-0",
|
|
114
129
|
children: /*#__PURE__*/_jsx(Calendar, {
|
|
115
130
|
mode: "single",
|
|
116
|
-
selected:
|
|
131
|
+
selected: t13,
|
|
117
132
|
onSelect: handleDateChange,
|
|
118
|
-
locale:
|
|
133
|
+
locale: locale
|
|
119
134
|
})
|
|
120
135
|
});
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
136
|
+
$[17] = handleDateChange;
|
|
137
|
+
$[18] = locale;
|
|
138
|
+
$[19] = t13;
|
|
139
|
+
$[20] = t14;
|
|
124
140
|
} else {
|
|
125
|
-
|
|
141
|
+
t14 = $[20];
|
|
126
142
|
}
|
|
127
|
-
let
|
|
128
|
-
if ($[
|
|
129
|
-
|
|
130
|
-
children: [
|
|
143
|
+
let t15;
|
|
144
|
+
if ($[21] !== T0 || $[22] !== t12 || $[23] !== t14) {
|
|
145
|
+
t15 = /*#__PURE__*/_jsxs(T0, {
|
|
146
|
+
children: [t12, t14]
|
|
131
147
|
});
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
148
|
+
$[21] = T0;
|
|
149
|
+
$[22] = t12;
|
|
150
|
+
$[23] = t14;
|
|
151
|
+
$[24] = t15;
|
|
135
152
|
} else {
|
|
136
|
-
|
|
153
|
+
t15 = $[24];
|
|
137
154
|
}
|
|
138
|
-
let
|
|
139
|
-
if ($[
|
|
140
|
-
|
|
141
|
-
children: [t4,
|
|
155
|
+
let t16;
|
|
156
|
+
if ($[25] !== t15 || $[26] !== t4) {
|
|
157
|
+
t16 = /*#__PURE__*/_jsxs("div", {
|
|
158
|
+
children: [t4, t15]
|
|
142
159
|
});
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
160
|
+
$[25] = t15;
|
|
161
|
+
$[26] = t4;
|
|
162
|
+
$[27] = t16;
|
|
146
163
|
} else {
|
|
147
|
-
|
|
164
|
+
t16 = $[27];
|
|
148
165
|
}
|
|
149
|
-
return
|
|
166
|
+
return t16;
|
|
150
167
|
}
|
|
151
168
|
//# sourceMappingURL=date-picker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","names":["c","_c","format","de","CalendarIcon","cn","usePuckDictionary","Calendar","Popover","PopoverContent","PopoverTrigger","RequiredFieldLabel","jsx","_jsx","jsxs","_jsxs","DatePicker","t0","$","date","onChange","label","t","fields","t1","day","toUTCString","handleDateChange","t2","Symbol","for","className","t3","t4","icon","t5","t6","t7","t8","
|
|
1
|
+
{"version":3,"file":"date-picker.js","names":["c","_c","format","de","enUS","fr","CalendarIcon","cn","usePuckDictionary","usePuckLocale","Calendar","Popover","PopoverContent","PopoverTrigger","RequiredFieldLabel","jsx","_jsx","jsxs","_jsxs","DATE_FNS_LOCALES","en","dateFnsLocale","editorLocale","split","DatePicker","t0","$","date","onChange","label","t","fields","locale","t1","day","toUTCString","handleDateChange","t2","Symbol","for","className","t3","t4","icon","T0","T1","t5","t6","t7","t8","t9","t10","Date","children","selectDate","t11","type","t12","asChild","t13","t14","mode","selected","t15","t16"],"sources":["../../../../../src/puck-editor/internal/fields/date-picker/date-picker.tsx"],"sourcesContent":["'use client';\n\nimport { format } from 'date-fns';\nimport { de, enUS, fr, type Locale } from 'date-fns/locale';\nimport { CalendarIcon } from 'lucide-react';\n\nimport { cn } from '../../../../shared/cn.ts';\nimport { usePuckDictionary, usePuckLocale } from '../../i18n.tsx';\nimport { Calendar } from '../../ui/calendar.tsx';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover.tsx';\nimport { RequiredFieldLabel } from '../required-field-label.tsx';\n\ntype DatePickerProps = {\n date: string;\n onChange: (date: string) => void;\n label?: string;\n};\n\nconst DATE_FNS_LOCALES: Record<string, Locale> = { de, en: enUS, fr };\n\nfunction dateFnsLocale(editorLocale: string): Locale {\n return DATE_FNS_LOCALES[editorLocale.split('-')[0]] ?? enUS;\n}\n\nexport function DatePicker({ date, onChange, label }: DatePickerProps) {\n const t = usePuckDictionary().fields;\n const locale = dateFnsLocale(usePuckLocale());\n const handleDateChange = (day: Date | undefined) => {\n if (day) {\n onChange(day.toUTCString());\n }\n };\n return (\n <div>\n <RequiredFieldLabel\n icon={<CalendarIcon className=\"nh:size-4\" />}\n label={label ?? t.date}\n />\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n className={cn(\n 'nh:flex nh:w-full nh:cursor-pointer nh:items-center nh:justify-start nh:gap-2 nh:rounded-sm nh:border nh:border-gray-300 nh:p-3 nh:text-left nh:text-sm nh:font-normal',\n !date && 'nh:text-gray-500'\n )}\n >\n <CalendarIcon className=\"nh:size-5\" />\n {date ? (\n format(new Date(date), 'PPP', { locale })\n ) : (\n <span>{t.selectDate}</span>\n )}\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"nh:w-auto nh:p-0\">\n <Calendar\n mode=\"single\"\n selected={new Date(date)}\n onSelect={handleDateChange}\n locale={locale}\n />\n </PopoverContent>\n </Popover>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAqB,iBAAiB;AAC3D,SAASC,YAAY,QAAQ,cAAc;AAE3C,SAASC,EAAE,QAAQ,0BAA0B;AAC7C,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,eAAgB;AACjE,SAASC,QAAQ,QAAQ,sBAAuB;AAChD,SAASC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAQ,qBAAsB;AAC9E,SAASC,kBAAkB,QAAQ,4BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQjE,MAAMC,gBAAwC,GAAG;EAAEhB,EAAE;EAAEiB,EAAE,EAAEhB,IAAI;EAAEC;AAAG,CAAC;AAErE,SAASgB,aAAaA,CAACC,YAAoB,EAAU;EACnD,OAAOH,gBAAgB,CAACG,YAAY,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAInB,IAAI;AAC7D;AAEA,OAAO,SAAAoB,WAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAzB,EAAA;EAAoB;IAAA0B,IAAA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AA9C,KAAA;MAAAmC,QAAA,GACEX,EAGE,EACFqB,GAyBU;IAAA,CACP,CAAC;IAAArC,CAAA,OAAAqC,GAAA;IAAArC,CAAA,OAAAgB,EAAA;IAAAhB,CAAA,OAAAsC,GAAA;EAAA;IAAAA,GAAA,GAAAtC,CAAA;EAAA;EAAA,OA/BNsC,GA+BM;AAAA","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { createCheckboxGroupField, type CheckboxGroupFieldOptions, } from './checkbox-group/create-checkbox-group-field';
|
|
2
|
-
export { createDatePickerField, type DatePickerFieldOptions, } from './date-picker/create-date-picker-field';
|
|
3
|
-
export { createLinkField } from './link-picker/create-link-field';
|
|
4
|
-
export { createMediaArrayField, type MediaArrayFieldOptions, } from './media-array/create-media-array-field';
|
|
5
|
-
export { createMediaSelectorField, type MediaSelectorFieldOptions, } from './media-selector/create-media-selector-field';
|
|
6
|
-
export { createNodeSelectorField, type NodeSelectorFieldOptions, type NodeSelectorItem, } from './node-selector/create-node-selector-field';
|
|
7
|
-
export { createRichTextField } from './rich-text/create-rich-text-field';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
|
|
1
|
+
export { createCheckboxGroupField, type CheckboxGroupFieldOptions, } from './checkbox-group/create-checkbox-group-field.js';
|
|
2
|
+
export { createDatePickerField, type DatePickerFieldOptions, } from './date-picker/create-date-picker-field.js';
|
|
3
|
+
export { createLinkField } from './link-picker/create-link-field.js';
|
|
4
|
+
export { createMediaArrayField, type MediaArrayFieldOptions, } from './media-array/create-media-array-field.js';
|
|
5
|
+
export { createMediaSelectorField, type MediaSelectorFieldOptions, } from './media-selector/create-media-selector-field.js';
|
|
6
|
+
export { createNodeSelectorField, type NodeSelectorFieldOptions, type NodeSelectorItem, } from './node-selector/create-node-selector-field.js';
|
|
7
|
+
export { createRichTextField } from './rich-text/create-rich-text-field.js';
|
|
8
|
+
export { PreventLinkNavigation, RICHTEXT_LINK_OPTIONS, } from './link-picker/richtext-extensions.js';
|
|
9
|
+
export { required } from './required.js';
|
|
10
|
+
export { RequiredFieldLabel } from './required-field-label.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { createCheckboxGroupField } from
|
|
2
|
-
export { createDatePickerField } from
|
|
3
|
-
export { createLinkField } from
|
|
4
|
-
export { createMediaArrayField } from
|
|
5
|
-
export { createMediaSelectorField } from
|
|
6
|
-
export { createNodeSelectorField } from
|
|
7
|
-
export { createRichTextField } from
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export { createCheckboxGroupField } from "./checkbox-group/create-checkbox-group-field.js";
|
|
2
|
+
export { createDatePickerField } from "./date-picker/create-date-picker-field.js";
|
|
3
|
+
export { createLinkField } from "./link-picker/create-link-field.js";
|
|
4
|
+
export { createMediaArrayField } from "./media-array/create-media-array-field.js";
|
|
5
|
+
export { createMediaSelectorField } from "./media-selector/create-media-selector-field.js";
|
|
6
|
+
export { createNodeSelectorField } from "./node-selector/create-node-selector-field.js";
|
|
7
|
+
export { createRichTextField } from "./rich-text/create-rich-text-field.js";
|
|
8
|
+
export { PreventLinkNavigation, RICHTEXT_LINK_OPTIONS } from "./link-picker/richtext-extensions.js";
|
|
9
|
+
export { required } from "./required.js";
|
|
10
|
+
export { RequiredFieldLabel } from "./required-field-label.js";
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createCheckboxGroupField","createDatePickerField","createLinkField","createMediaArrayField","createMediaSelectorField","createNodeSelectorField","createRichTextField","required","RequiredFieldLabel"],"sources":["../../../../src/puck-editor/internal/fields/index.ts"],"sourcesContent":["export {\n createCheckboxGroupField,\n type CheckboxGroupFieldOptions,\n} from './checkbox-group/create-checkbox-group-field';\nexport {\n createDatePickerField,\n type DatePickerFieldOptions,\n} from './date-picker/create-date-picker-field';\nexport { createLinkField } from './link-picker/create-link-field';\nexport {\n createMediaArrayField,\n type MediaArrayFieldOptions,\n} from './media-array/create-media-array-field';\nexport {\n createMediaSelectorField,\n type MediaSelectorFieldOptions,\n} from './media-selector/create-media-selector-field';\nexport {\n createNodeSelectorField,\n type NodeSelectorFieldOptions,\n type NodeSelectorItem,\n} from './node-selector/create-node-selector-field';\nexport { createRichTextField } from './rich-text/create-rich-text-field';\nexport { required } from './required';\nexport { RequiredFieldLabel } from './required-field-label';\n"],"mappings":"AAAA,SACEA,wBAAwB,QAEnB,
|
|
1
|
+
{"version":3,"file":"index.js","names":["createCheckboxGroupField","createDatePickerField","createLinkField","createMediaArrayField","createMediaSelectorField","createNodeSelectorField","createRichTextField","PreventLinkNavigation","RICHTEXT_LINK_OPTIONS","required","RequiredFieldLabel"],"sources":["../../../../src/puck-editor/internal/fields/index.ts"],"sourcesContent":["export {\n createCheckboxGroupField,\n type CheckboxGroupFieldOptions,\n} from './checkbox-group/create-checkbox-group-field.tsx';\nexport {\n createDatePickerField,\n type DatePickerFieldOptions,\n} from './date-picker/create-date-picker-field.tsx';\nexport { createLinkField } from './link-picker/create-link-field.tsx';\nexport {\n createMediaArrayField,\n type MediaArrayFieldOptions,\n} from './media-array/create-media-array-field.tsx';\nexport {\n createMediaSelectorField,\n type MediaSelectorFieldOptions,\n} from './media-selector/create-media-selector-field.tsx';\nexport {\n createNodeSelectorField,\n type NodeSelectorFieldOptions,\n type NodeSelectorItem,\n} from './node-selector/create-node-selector-field.ts';\nexport { createRichTextField } from './rich-text/create-rich-text-field.ts';\nexport {\n PreventLinkNavigation,\n RICHTEXT_LINK_OPTIONS,\n} from './link-picker/richtext-extensions.ts';\nexport { required } from './required.ts';\nexport { RequiredFieldLabel } from './required-field-label.tsx';\n"],"mappings":"AAAA,SACEA,wBAAwB,QAEnB,iDAAkD;AACzD,SACEC,qBAAqB,QAEhB,2CAA4C;AACnD,SAASC,eAAe,QAAQ,oCAAqC;AACrE,SACEC,qBAAqB,QAEhB,2CAA4C;AACnD,SACEC,wBAAwB,QAEnB,iDAAkD;AACzD,SACEC,uBAAuB,QAGlB,+CAA+C;AACtD,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SACEC,qBAAqB,EACrBC,qBAAqB,QAChB,sCAAsC;AAC7C,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,kBAAkB,QAAQ,2BAA4B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.js","names":["humanize","normalizeAnchorId","value","undefined","slug","trim","replace","toLowerCase","isAnchorValue","startsWith","length","hasAnchorFragment","index","indexOf","isComponentData","props","collectFromComponent","component","out","anchorId","anchor","has","set","id","label","type","Object","values","Array","isArray","entry","collectPageAnchors","data","Map","doc","visitArray","content","zones","zone","root","sort","a","b","localeCompare"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/anchor.ts"],"sourcesContent":["import { humanize } from './humanize';\n\n/**\n * Normalizes an editor-entered anchor value into a valid element id:\n * trims, strips a leading '#', lowercases, turns whitespace into dashes\n * and drops anything that is not [a-z0-9-_].\n */\nexport function normalizeAnchorId(value?: string): string | undefined {\n if (!value) return undefined;\n const slug = value\n .trim()\n .replace(/^#+/, '')\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-_]/g, '')\n .replace(/-{2,}/g, '-');\n return slug || undefined;\n}\n\n/**\n * True when a stored link href points at an in-page anchor (`#section`). The\n * bare `#` placeholder is treated as empty (no link), so it is excluded.\n */\nexport function isAnchorValue(value?: string): boolean {\n return !!value && value.startsWith('#') && value.length > 1;\n}\n\n/**\n * True when a stored link href carries an in-page fragment anywhere — a\n * same-page anchor (`#start`), a cross-page anchor (`/onboarding#start`) or an\n * external one (`https://example.com#start`). The bare `#` placeholder counts\n * as empty. Used to route fragment-bearing values back into the picker's\n * \"Anchor\" mode on reload, since those are entered through the anchor field.\n */\nexport function hasAnchorFragment(value?: string): boolean {\n if (!value) return false;\n const index = value.indexOf('#');\n return index !== -1 && index < value.length - 1;\n}\n\n/** A section anchor available on the current Puck page. */\nexport interface PageAnchor {\n /** Normalized anchor id, without the leading '#'. */\n id: string;\n /** Human-readable hint for the picker dropdown (the section type). */\n label: string;\n}\n\ninterface PuckComponentData {\n type?: string;\n props?: Record<string, unknown>;\n}\n\nfunction isComponentData(value: unknown): value is PuckComponentData {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { props?: unknown }).props === 'object'\n );\n}\n\nfunction collectFromComponent(\n component: PuckComponentData,\n out: Map<string, PageAnchor>\n): void {\n const props = component.props;\n if (!props) return;\n\n const anchorId = normalizeAnchorId(\n typeof props.anchor === 'string' ? props.anchor : undefined\n );\n if (anchorId && !out.has(anchorId)) {\n out.set(anchorId, {\n id: anchorId,\n label: humanize(component.type ?? 'section'),\n });\n }\n\n // Recurse into inline slots: props whose value is an array of components.\n for (const value of Object.values(props)) {\n if (Array.isArray(value)) {\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n }\n }\n}\n\n/**\n * Walk a Puck document (`{ root, content, zones }`, slots inline in props) and\n * collect every section Anchor ID set on it, deduped and sorted. Drives the\n * \"Anchor\" mode of the shared link picker so editors link to same-page sections.\n */\nexport function collectPageAnchors(data: unknown): PageAnchor[] {\n const out = new Map<string, PageAnchor>();\n if (!data || typeof data !== 'object') return [];\n const doc = data as {\n root?: { props?: Record<string, unknown> };\n content?: unknown;\n zones?: Record<string, unknown>;\n };\n\n const visitArray = (value: unknown) => {\n if (!Array.isArray(value)) return;\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n };\n\n visitArray(doc.content);\n if (doc.zones) for (const zone of Object.values(doc.zones)) visitArray(zone);\n if (doc.root?.props) {\n for (const value of Object.values(doc.root.props)) visitArray(value);\n }\n\n return [...out.values()].sort((a, b) => a.id.localeCompare(b.id));\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,
|
|
1
|
+
{"version":3,"file":"anchor.js","names":["humanize","normalizeAnchorId","value","undefined","slug","trim","replace","toLowerCase","isAnchorValue","startsWith","length","hasAnchorFragment","index","indexOf","isComponentData","props","collectFromComponent","component","out","anchorId","anchor","has","set","id","label","type","Object","values","Array","isArray","entry","collectPageAnchors","data","Map","doc","visitArray","content","zones","zone","root","sort","a","b","localeCompare"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/anchor.ts"],"sourcesContent":["import { humanize } from './humanize.ts';\n\n/**\n * Normalizes an editor-entered anchor value into a valid element id:\n * trims, strips a leading '#', lowercases, turns whitespace into dashes\n * and drops anything that is not [a-z0-9-_].\n */\nexport function normalizeAnchorId(value?: string): string | undefined {\n if (!value) return undefined;\n const slug = value\n .trim()\n .replace(/^#+/, '')\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-_]/g, '')\n .replace(/-{2,}/g, '-');\n return slug || undefined;\n}\n\n/**\n * True when a stored link href points at an in-page anchor (`#section`). The\n * bare `#` placeholder is treated as empty (no link), so it is excluded.\n */\nexport function isAnchorValue(value?: string): boolean {\n return !!value && value.startsWith('#') && value.length > 1;\n}\n\n/**\n * True when a stored link href carries an in-page fragment anywhere — a\n * same-page anchor (`#start`), a cross-page anchor (`/onboarding#start`) or an\n * external one (`https://example.com#start`). The bare `#` placeholder counts\n * as empty. Used to route fragment-bearing values back into the picker's\n * \"Anchor\" mode on reload, since those are entered through the anchor field.\n */\nexport function hasAnchorFragment(value?: string): boolean {\n if (!value) return false;\n const index = value.indexOf('#');\n return index !== -1 && index < value.length - 1;\n}\n\n/** A section anchor available on the current Puck page. */\nexport interface PageAnchor {\n /** Normalized anchor id, without the leading '#'. */\n id: string;\n /** Human-readable hint for the picker dropdown (the section type). */\n label: string;\n}\n\ninterface PuckComponentData {\n type?: string;\n props?: Record<string, unknown>;\n}\n\nfunction isComponentData(value: unknown): value is PuckComponentData {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { props?: unknown }).props === 'object'\n );\n}\n\nfunction collectFromComponent(\n component: PuckComponentData,\n out: Map<string, PageAnchor>\n): void {\n const props = component.props;\n if (!props) return;\n\n const anchorId = normalizeAnchorId(\n typeof props.anchor === 'string' ? props.anchor : undefined\n );\n if (anchorId && !out.has(anchorId)) {\n out.set(anchorId, {\n id: anchorId,\n label: humanize(component.type ?? 'section'),\n });\n }\n\n // Recurse into inline slots: props whose value is an array of components.\n for (const value of Object.values(props)) {\n if (Array.isArray(value)) {\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n }\n }\n}\n\n/**\n * Walk a Puck document (`{ root, content, zones }`, slots inline in props) and\n * collect every section Anchor ID set on it, deduped and sorted. Drives the\n * \"Anchor\" mode of the shared link picker so editors link to same-page sections.\n */\nexport function collectPageAnchors(data: unknown): PageAnchor[] {\n const out = new Map<string, PageAnchor>();\n if (!data || typeof data !== 'object') return [];\n const doc = data as {\n root?: { props?: Record<string, unknown> };\n content?: unknown;\n zones?: Record<string, unknown>;\n };\n\n const visitArray = (value: unknown) => {\n if (!Array.isArray(value)) return;\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n };\n\n visitArray(doc.content);\n if (doc.zones) for (const zone of Object.values(doc.zones)) visitArray(zone);\n if (doc.root?.props) {\n for (const value of Object.values(doc.root.props)) visitArray(value);\n }\n\n return [...out.values()].sort((a, b) => a.id.localeCompare(b.id));\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,eAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,KAAc,EAAsB;EACpE,IAAI,CAACA,KAAK,EAAE,OAAOC,SAAS;EAC5B,MAAMC,IAAI,GAAGF,KAAK,CACfG,IAAI,CAAC,CAAC,CACNC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAClBC,WAAW,CAAC,CAAC,CACbD,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBA,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAC3BA,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;EACzB,OAAOF,IAAI,I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,CAACnB,EAAE,CAAC,CAAC;AACnE","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LinkValue } from './link-value';
|
|
1
|
+
import { type LinkValue } from './link-value.js';
|
|
2
2
|
interface LinkFieldOptions {
|
|
3
3
|
label?: string;
|
|
4
4
|
}
|
|
@@ -21,4 +21,3 @@ export declare const createLinkField: ({ label }?: LinkFieldOptions) => {
|
|
|
21
21
|
}) => import("react").JSX.Element;
|
|
22
22
|
};
|
|
23
23
|
export {};
|
|
24
|
-
//# sourceMappingURL=create-link-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-link-field.js","names":["LinkPickerField","jsx","_jsx","createLinkField","label","type","render","field","value","onChange","id"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/create-link-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport LinkPickerField from './link-picker-field';\nimport { type LinkValue } from './link-value';\n\ninterface LinkFieldOptions {\n label?: string;\n}\n\n/**\n * Reusable LinkPicker field. Stores a bundled {@link LinkValue}\n * (`{ href, target }`) and supports internal pages, external URLs, in-page\n * anchors and a target override. Consume the stored value with `resolveLink()`\n * from `@nodehive/nextjs/puck-editor/fields` in the component's `render`.\n */\nexport const createLinkField = ({ label }: LinkFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n // Key by the field id so switching between components (or array items)\n // remounts the picker — its mode/anchor state is derived from the initial\n // href, so reusing the same instance would show a stale mode for the new\n // value.\n render: (({ field, value, onChange, id }) => (\n <LinkPickerField\n key={id}\n label={field.label ?? label}\n value={value}\n onChange={onChange}\n />\n )) satisfies CustomFieldRender<LinkValue | string>,\n };\n};\n"],"mappings":"AAEA,OAAOA,eAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"create-link-field.js","names":["LinkPickerField","jsx","_jsx","createLinkField","label","type","render","field","value","onChange","id"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/create-link-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport LinkPickerField from './link-picker-field.tsx';\nimport { type LinkValue } from './link-value.ts';\n\ninterface LinkFieldOptions {\n label?: string;\n}\n\n/**\n * Reusable LinkPicker field. Stores a bundled {@link LinkValue}\n * (`{ href, target }`) and supports internal pages, external URLs, in-page\n * anchors and a target override. Consume the stored value with `resolveLink()`\n * from `@nodehive/nextjs/puck-editor/fields` in the component's `render`.\n */\nexport const createLinkField = ({ label }: LinkFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n // Key by the field id so switching between components (or array items)\n // remounts the picker — its mode/anchor state is derived from the initial\n // href, so reusing the same instance would show a stale mode for the new\n // value.\n render: (({ field, value, onChange, id }) => (\n <LinkPickerField\n key={id}\n label={field.label ?? label}\n value={value}\n onChange={onChange}\n />\n )) satisfies CustomFieldRender<LinkValue | string>,\n };\n};\n"],"mappings":"AAEA,OAAOA,eAAe,MAAM,wBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOtD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAwB,CAAC,GAAG,CAAC,CAAC,KAAK;EACnE,OAAO;IACLC,IAAI,EAAE,QAAiB;IACvBD,KAAK;IACL;IACA;IACA;IACA;IACAE,MAAM,EAAGA,CAAC;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC;IAAG,CAAC,kBACtCR,IAAA,CAACF,eAAe;MAEdI,KAAK,EAAEG,KAAK,CAACH,KAAK,IAAIA,KAAM;MAC5BI,KAAK,EAAEA,KAAM;MACbC,QAAQ,EAAEA;IAAS,GAHdC,EAIN;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
|