@nodehive/nextjs 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/internal/config.d.ts +15 -5
- package/dist/auth/internal/config.js.map +1 -1
- package/dist/auth/internal/draft-mode.d.ts +2 -3
- package/dist/auth/internal/draft-mode.js +3 -20
- package/dist/auth/internal/draft-mode.js.map +1 -1
- package/dist/auth/internal/editor-locale.d.ts +0 -1
- package/dist/auth/internal/handoff.d.ts +0 -1
- package/dist/auth/internal/has-session.d.ts +0 -1
- package/dist/auth/internal/has-session.js +1 -1
- package/dist/auth/internal/has-session.js.map +1 -1
- package/dist/auth/internal/i18n.d.ts +10 -0
- package/dist/auth/internal/i18n.js +25 -0
- package/dist/auth/internal/i18n.js.map +1 -0
- package/dist/auth/internal/logout.d.ts +1 -2
- package/dist/auth/internal/logout.js +3 -3
- package/dist/auth/internal/logout.js.map +1 -1
- package/dist/auth/internal/next-cookie-storage.d.ts +5 -2
- package/dist/auth/internal/next-cookie-storage.js +8 -1
- package/dist/auth/internal/next-cookie-storage.js.map +1 -1
- package/dist/auth/internal/nodehive-client.d.ts +6 -4
- package/dist/auth/internal/nodehive-client.js +6 -4
- package/dist/auth/internal/nodehive-client.js.map +1 -1
- package/dist/auth/internal/oauth-config.d.ts +0 -1
- package/dist/auth/internal/proxy-helpers.d.ts +0 -1
- package/dist/auth/internal/proxy-helpers.js +4 -4
- package/dist/auth/internal/proxy-helpers.js.map +1 -1
- package/dist/auth/internal/refresh.d.ts +1 -2
- package/dist/auth/internal/refresh.js +4 -4
- package/dist/auth/internal/refresh.js.map +1 -1
- package/dist/auth/internal/require-auth.d.ts +0 -1
- package/dist/auth/internal/require-auth.js +1 -1
- package/dist/auth/internal/require-auth.js.map +1 -1
- package/dist/auth/internal/return-to.d.ts +0 -1
- package/dist/auth/internal/roles.d.ts +17 -0
- package/dist/auth/internal/roles.js +39 -0
- package/dist/auth/internal/roles.js.map +1 -0
- package/dist/auth/internal/routes/callback.d.ts +1 -2
- package/dist/auth/internal/routes/callback.js +6 -6
- package/dist/auth/internal/routes/callback.js.map +1 -1
- package/dist/auth/internal/routes/chips-exchange.d.ts +1 -2
- package/dist/auth/internal/routes/chips-exchange.js +5 -5
- package/dist/auth/internal/routes/chips-exchange.js.map +1 -1
- package/dist/auth/internal/routes/draft.d.ts +1 -2
- package/dist/auth/internal/routes/draft.js +3 -3
- package/dist/auth/internal/routes/draft.js.map +1 -1
- package/dist/auth/internal/routes/index.d.ts +4 -2
- package/dist/auth/internal/routes/index.js +7 -7
- package/dist/auth/internal/routes/index.js.map +1 -1
- package/dist/auth/internal/routes/login.d.ts +0 -1
- package/dist/auth/internal/routes/login.js +3 -3
- package/dist/auth/internal/routes/login.js.map +1 -1
- package/dist/auth/internal/routes/popup-done.d.ts +2 -2
- package/dist/auth/internal/routes/popup-done.js +9 -7
- package/dist/auth/internal/routes/popup-done.js.map +1 -1
- package/dist/auth/internal/routes/refresh.d.ts +2 -5
- package/dist/auth/internal/routes/refresh.js +8 -2
- package/dist/auth/internal/routes/refresh.js.map +1 -1
- package/dist/auth/internal/same-origin.d.ts +0 -1
- package/dist/auth/internal/session-gates.d.ts +27 -3
- package/dist/auth/internal/session-gates.js +35 -3
- package/dist/auth/internal/session-gates.js.map +1 -1
- package/dist/auth/internal/update-session.d.ts +1 -2
- package/dist/auth/internal/update-session.js +1 -1
- package/dist/auth/internal/update-session.js.map +1 -1
- package/dist/auth/internal/use-editor-login.d.ts +0 -1
- package/dist/auth/internal/use-editor-login.js +2 -3
- package/dist/auth/internal/use-editor-login.js.map +1 -1
- package/dist/auth/proxy.d.ts +7 -8
- package/dist/auth/proxy.js +6 -6
- package/dist/auth/proxy.js.map +1 -1
- package/dist/auth/react.d.ts +1 -2
- package/dist/auth/react.js +1 -1
- package/dist/auth/react.js.map +1 -1
- package/dist/auth/routes.d.ts +3 -3
- package/dist/auth/routes.js +1 -1
- package/dist/auth/routes.js.map +1 -1
- package/dist/auth/server.d.ts +14 -12
- package/dist/auth/server.js +14 -9
- package/dist/auth/server.js.map +1 -1
- package/dist/bridge-protocol/index.d.ts +50 -0
- package/dist/bridge-protocol/index.js +25 -0
- package/dist/bridge-protocol/index.js.map +1 -0
- package/dist/puck-editor/editor.d.ts +8 -0
- package/dist/puck-editor/editor.js +9 -0
- package/dist/puck-editor/editor.js.map +1 -0
- package/dist/puck-editor/fields.d.ts +6 -7
- package/dist/puck-editor/fields.js +3 -3
- package/dist/puck-editor/fields.js.map +1 -1
- package/dist/puck-editor/index.d.ts +17 -14
- package/dist/puck-editor/index.js +13 -11
- package/dist/puck-editor/index.js.map +1 -1
- package/dist/puck-editor/internal/api/client.d.ts +19 -4
- package/dist/puck-editor/internal/api/client.js +56 -19
- package/dist/puck-editor/internal/api/client.js.map +1 -1
- package/dist/puck-editor/internal/api/config.d.ts +36 -3
- package/dist/puck-editor/internal/api/config.js.map +1 -1
- package/dist/puck-editor/internal/api/create-puck-api.d.ts +1 -2
- package/dist/puck-editor/internal/api/create-puck-api.js +10 -13
- package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts +1 -2
- package/dist/puck-editor/internal/api/handlers/create-page.js +6 -4
- package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/entities.d.ts +6 -5
- package/dist/puck-editor/internal/api/handlers/entities.js +60 -15
- package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/publish.d.ts +3 -6
- package/dist/puck-editor/internal/api/handlers/publish.js +57 -14
- package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts +5 -2
- package/dist/puck-editor/internal/api/handlers/template.js +28 -60
- package/dist/puck-editor/internal/api/handlers/template.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/upload.d.ts +10 -2
- package/dist/puck-editor/internal/api/handlers/upload.js +93 -28
- package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -1
- package/dist/puck-editor/internal/api/localize-message.d.ts +15 -0
- package/dist/puck-editor/internal/api/localize-message.js +15 -0
- package/dist/puck-editor/internal/api/localize-message.js.map +1 -0
- package/dist/puck-editor/internal/api/media-params.d.ts +3 -3
- package/dist/puck-editor/internal/api/media-params.js +23 -19
- package/dist/puck-editor/internal/api/media-params.js.map +1 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts +5 -3
- package/dist/puck-editor/internal/api/media-upload.js +33 -22
- package/dist/puck-editor/internal/api/media-upload.js.map +1 -1
- package/dist/puck-editor/internal/api/message-codes.d.ts +2 -0
- package/dist/puck-editor/internal/api/message-codes.js +2 -0
- package/dist/puck-editor/internal/api/message-codes.js.map +1 -0
- package/dist/puck-editor/internal/api/space.d.ts +0 -1
- package/dist/puck-editor/internal/api/type-segment.d.ts +2 -0
- package/dist/puck-editor/internal/api/type-segment.js +9 -0
- package/dist/puck-editor/internal/api/type-segment.js.map +1 -0
- package/dist/puck-editor/internal/content-model.d.ts +31 -3
- package/dist/puck-editor/internal/content-model.js +76 -6
- package/dist/puck-editor/internal/content-model.js.map +1 -1
- package/dist/puck-editor/internal/dictionaries.d.ts +225 -0
- package/dist/puck-editor/internal/dictionaries.js +673 -0
- package/dist/puck-editor/internal/dictionaries.js.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts +1 -2
- package/dist/puck-editor/internal/editor/allowed-types.js +2 -2
- package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.js +108 -135
- package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.js +4 -4
- package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +0 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.js +28 -41
- package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -1
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +0 -1
- package/dist/puck-editor/internal/editor/component-icons.d.ts +1 -2
- package/dist/puck-editor/internal/editor/component-icons.js.map +1 -1
- package/dist/puck-editor/internal/editor/component-item.d.ts +0 -1
- package/dist/puck-editor/internal/editor/component-item.js +2 -2
- package/dist/puck-editor/internal/editor/component-item.js.map +1 -1
- package/dist/puck-editor/internal/editor/compose-save-issues.d.ts +15 -0
- package/dist/puck-editor/internal/editor/compose-save-issues.js +16 -0
- package/dist/puck-editor/internal/editor/compose-save-issues.js.map +1 -0
- package/dist/puck-editor/internal/editor/dirty-state.d.ts +3 -0
- package/dist/puck-editor/internal/editor/dirty-state.js +7 -0
- package/dist/puck-editor/internal/editor/dirty-state.js.map +1 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.d.ts +9 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.js +289 -0
- package/dist/puck-editor/internal/editor/draft-restore-banner.js.map +1 -0
- package/dist/puck-editor/internal/editor/draft-storage.d.ts +41 -0
- package/dist/puck-editor/internal/editor/draft-storage.js +129 -0
- package/dist/puck-editor/internal/editor/draft-storage.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +0 -1
- package/dist/puck-editor/internal/editor/editor-action-bar.js +4 -4
- package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -1
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +6 -4
- package/dist/puck-editor/internal/editor/editor-header-actions.js +119 -60
- package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -1
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +0 -1
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +1 -2
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +6 -6
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -1
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +7 -5
- package/dist/puck-editor/internal/editor/grouped-entry-list.js +85 -56
- package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -1
- package/dist/puck-editor/internal/editor/header-save-button.d.ts +4 -4
- package/dist/puck-editor/internal/editor/header-save-button.js +66 -27
- package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -1
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.d.ts +5 -0
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.js +140 -0
- package/dist/puck-editor/internal/editor/leave-confirm-dialog.js.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts +0 -1
- package/dist/puck-editor/internal/editor/page-template-picker.js +5 -5
- package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -1
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +1 -2
- package/dist/puck-editor/internal/editor/picker-entry-item.js +4 -4
- package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -1
- package/dist/puck-editor/internal/editor/picker-model.d.ts +14 -5
- package/dist/puck-editor/internal/editor/picker-model.js +157 -132
- package/dist/puck-editor/internal/editor/picker-model.js.map +1 -1
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +18 -4
- package/dist/puck-editor/internal/editor/publish-puck-data.js +25 -4
- package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -1
- package/dist/puck-editor/internal/editor/puck-editor.d.ts +6 -4
- package/dist/puck-editor/internal/editor/puck-editor.js +270 -209
- package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/editor/save-guard.d.ts +15 -0
- package/dist/puck-editor/internal/editor/save-guard.js +30 -0
- package/dist/puck-editor/internal/editor/save-guard.js.map +1 -0
- package/dist/puck-editor/internal/editor/save-page-context.d.ts +8 -0
- package/dist/puck-editor/internal/editor/save-page-context.js +34 -0
- package/dist/puck-editor/internal/editor/save-page-context.js.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts +0 -1
- package/dist/puck-editor/internal/editor/section-template-modal.js +2 -2
- package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -1
- package/dist/puck-editor/internal/editor/unsaved-changes-guard.d.ts +3 -0
- package/dist/puck-editor/internal/editor/unsaved-changes-guard.js +38 -0
- package/dist/puck-editor/internal/editor/unsaved-changes-guard.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-dirty-baseline.d.ts +5 -0
- package/dist/puck-editor/internal/editor/use-dirty-baseline.js +72 -0
- package/dist/puck-editor/internal/editor/use-dirty-baseline.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.d.ts +16 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.js +194 -0
- package/dist/puck-editor/internal/editor/use-draft-recovery.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts +1 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.js +59 -0
- package/dist/puck-editor/internal/editor/use-frame-zoom.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.d.ts +1 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.js +32 -0
- package/dist/puck-editor/internal/editor/use-is-dirty.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts +16 -3
- package/dist/puck-editor/internal/editor-config.js +8 -1
- package/dist/puck-editor/internal/editor-config.js.map +1 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +2 -2
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +1 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +1 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js +90 -73
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -1
- package/dist/puck-editor/internal/fields/index.d.ts +10 -10
- package/dist/puck-editor/internal/fields/index.js +10 -9
- package/dist/puck-editor/internal/fields/index.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.js +1 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +1 -2
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +1 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +208 -140
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +1 -2
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +6 -6
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +25 -5
- package/dist/puck-editor/internal/fields/link-picker/link-value.js +56 -6
- package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +4 -4
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +3 -3
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +1 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js +124 -115
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +2 -3
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +1 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +1 -2
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +4 -4
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +19 -10
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +8 -3
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +59 -61
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +1 -2
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +281 -255
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +15 -2
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +23 -18
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +12 -6
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +2 -2
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.js +1 -1
- package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -1
- package/dist/puck-editor/internal/fields/required.d.ts +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +13 -3
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +32 -22
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -1
- package/dist/puck-editor/internal/i18n.d.ts +2 -181
- package/dist/puck-editor/internal/i18n.js +2 -358
- package/dist/puck-editor/internal/i18n.js.map +1 -1
- package/dist/puck-editor/internal/locale.d.ts +0 -1
- package/dist/puck-editor/internal/localize.d.ts +1 -2
- package/dist/puck-editor/internal/localize.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +3 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +41 -32
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +3 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +4 -3
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +5 -6
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +3 -3
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +8 -8
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +5 -5
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +2 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +224 -219
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +5 -6
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js +5 -5
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +17 -16
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +171 -161
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +2 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +9 -2
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +22 -20
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +14 -5
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +23 -15
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts +0 -1
- package/dist/puck-editor/internal/puck-props.d.ts +13 -0
- package/dist/puck-editor/internal/puck-props.js +2 -0
- package/dist/puck-editor/internal/puck-props.js.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts +25 -6
- package/dist/puck-editor/internal/puck-wrapper.js +124 -115
- package/dist/puck-editor/internal/puck-wrapper.js.map +1 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts +1 -2
- package/dist/puck-editor/internal/render/cropped-image.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/action-selection.d.ts +8 -0
- package/dist/puck-editor/internal/smart-actions/action-selection.js +10 -0
- package/dist/puck-editor/internal/smart-actions/action-selection.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts +10 -4
- package/dist/puck-editor/internal/smart-actions/index.js +27 -12
- package/dist/puck-editor/internal/smart-actions/index.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts +3 -2
- package/dist/puck-editor/internal/smart-actions/new-page.js +6 -6
- package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +3 -2
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +49 -37
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts +0 -1
- package/dist/puck-editor/internal/ui/calendar.js +1 -1
- package/dist/puck-editor/internal/ui/calendar.js.map +1 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts +0 -1
- package/dist/puck-editor/internal/ui/dialog.js +33 -20
- package/dist/puck-editor/internal/ui/dialog.js.map +1 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts +0 -1
- package/dist/puck-editor/internal/ui/icon-button.js +1 -1
- package/dist/puck-editor/internal/ui/icon-button.js.map +1 -1
- package/dist/puck-editor/internal/ui/load-error-notice.d.ts +6 -0
- package/dist/puck-editor/internal/ui/load-error-notice.js +81 -0
- package/dist/puck-editor/internal/ui/load-error-notice.js.map +1 -0
- package/dist/puck-editor/internal/ui/popover.d.ts +0 -1
- package/dist/puck-editor/internal/ui/popover.js +1 -1
- package/dist/puck-editor/internal/ui/popover.js.map +1 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts +0 -1
- package/dist/puck-editor/internal/ui/search-control.d.ts +3 -3
- package/dist/puck-editor/internal/ui/search-control.js +29 -26
- package/dist/puck-editor/internal/ui/search-control.js.map +1 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts +1 -2
- package/dist/puck-editor/internal/use-puck-overlay.js +6 -5
- package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -1
- package/dist/puck-editor/internal/utils.d.ts +0 -1
- package/dist/puck-editor/render.d.ts +2 -3
- package/dist/puck-editor/render.js +1 -1
- package/dist/puck-editor/render.js.map +1 -1
- package/dist/puck-editor/server.d.ts +3 -4
- package/dist/puck-editor/server.js +1 -1
- package/dist/puck-editor/server.js.map +1 -1
- package/dist/puck-editor/smart-actions.d.ts +1 -2
- package/dist/puck-editor/smart-actions.js +1 -1
- package/dist/puck-editor/smart-actions.js.map +1 -1
- package/dist/shared/cn.d.ts +0 -1
- package/dist/shared/i18n.d.ts +0 -1
- package/dist/shared/revalidate-path.d.ts +1 -0
- package/dist/shared/revalidate-path.js +2 -0
- package/dist/shared/revalidate-path.js.map +1 -0
- package/dist/shared/toolbar-action.d.ts +0 -1
- package/dist/shared/use-is-hydrated.d.ts +0 -1
- package/dist/shared/use-is-in-iframe.d.ts +0 -1
- package/dist/shared/use-is-in-iframe.js +1 -1
- package/dist/shared/use-is-in-iframe.js.map +1 -1
- package/dist/smart-actions/internal/assemble-smart-actions.d.ts +14 -0
- package/dist/smart-actions/internal/assemble-smart-actions.js +11 -0
- package/dist/smart-actions/internal/assemble-smart-actions.js.map +1 -0
- package/dist/smart-actions/internal/backend-edit-link.d.ts +6 -0
- package/dist/smart-actions/internal/backend-edit-link.js +60 -0
- package/dist/smart-actions/internal/backend-edit-link.js.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts +1 -2
- package/dist/smart-actions/internal/get-smart-actions-context.js +2 -2
- package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -1
- package/dist/smart-actions/internal/i18n.d.ts +1 -2
- package/dist/smart-actions/internal/i18n.js +16 -2
- package/dist/smart-actions/internal/i18n.js.map +1 -1
- package/dist/smart-actions/internal/logout-form.d.ts +2 -2
- package/dist/smart-actions/internal/logout-form.js +47 -40
- package/dist/smart-actions/internal/logout-form.js.map +1 -1
- package/dist/smart-actions/internal/refresh-page.d.ts +3 -2
- package/dist/smart-actions/internal/refresh-page.js +60 -53
- package/dist/smart-actions/internal/refresh-page.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts +22 -4
- package/dist/smart-actions/internal/smart-actions-button.js +36 -13
- package/dist/smart-actions/internal/smart-actions-button.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts +12 -4
- package/dist/smart-actions/internal/smart-actions-config.js +36 -80
- package/dist/smart-actions/internal/smart-actions-config.js.map +1 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +5 -11
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js +13 -53
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +4 -4
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/storage.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/types.js.map +1 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +1 -2
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +1 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts +0 -1
- package/dist/smart-actions/internal/ui/tooltip.js +1 -1
- package/dist/smart-actions/internal/ui/tooltip.js.map +1 -1
- package/dist/smart-actions/internal/user-profile.d.ts +0 -1
- package/dist/smart-actions/internal/user-profile.js +71 -24
- package/dist/smart-actions/internal/user-profile.js.map +1 -1
- package/dist/smart-actions/server.d.ts +5 -4
- package/dist/smart-actions/server.js +2 -2
- package/dist/smart-actions/server.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/visual-editor/index.d.ts +3 -4
- package/dist/visual-editor/index.js +3 -3
- package/dist/visual-editor/index.js.map +1 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts +4 -3
- package/dist/visual-editor/internal/bridge/connector.js +22 -21
- package/dist/visual-editor/internal/bridge/connector.js.map +1 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +5 -3
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +7 -8
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +3 -3
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js +4 -2
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -1
- package/dist/visual-editor/internal/i18n.d.ts +3 -2
- package/dist/visual-editor/internal/i18n.js +32 -4
- package/dist/visual-editor/internal/i18n.js.map +1 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +1 -7
- package/dist/visual-editor/internal/overlays/drupal-origin.js +16 -3
- package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts +5 -4
- package/dist/visual-editor/internal/overlays/edit-button.js +46 -44
- package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +11 -2
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +18 -7
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js +1 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +12 -3
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +14 -5
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +4 -2
- package/dist/visual-editor/internal/overlays/node/node-metadata.js +10 -4
- package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +5 -3
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js +4 -2
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +11 -2
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +18 -7
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts +0 -1
- package/dist/visual-editor/internal/revalidate-route.js +1 -1
- package/dist/visual-editor/internal/revalidate-route.js.map +1 -1
- package/dist/visual-editor/server.d.ts +6 -7
- package/dist/visual-editor/server.js +6 -6
- package/dist/visual-editor/server.js.map +1 -1
- package/package.json +19 -3
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/internal/config.d.ts.map +0 -1
- package/dist/auth/internal/draft-mode.d.ts.map +0 -1
- package/dist/auth/internal/editor-locale.d.ts.map +0 -1
- package/dist/auth/internal/handoff.d.ts.map +0 -1
- package/dist/auth/internal/has-session.d.ts.map +0 -1
- package/dist/auth/internal/logout.d.ts.map +0 -1
- package/dist/auth/internal/next-cookie-storage.d.ts.map +0 -1
- package/dist/auth/internal/nodehive-client.d.ts.map +0 -1
- package/dist/auth/internal/oauth-config.d.ts.map +0 -1
- package/dist/auth/internal/proxy-helpers.d.ts.map +0 -1
- package/dist/auth/internal/refresh.d.ts.map +0 -1
- package/dist/auth/internal/require-auth.d.ts.map +0 -1
- package/dist/auth/internal/return-to.d.ts.map +0 -1
- package/dist/auth/internal/routes/callback.d.ts.map +0 -1
- package/dist/auth/internal/routes/chips-exchange.d.ts.map +0 -1
- package/dist/auth/internal/routes/draft.d.ts.map +0 -1
- package/dist/auth/internal/routes/index.d.ts.map +0 -1
- package/dist/auth/internal/routes/login.d.ts.map +0 -1
- package/dist/auth/internal/routes/popup-done.d.ts.map +0 -1
- package/dist/auth/internal/routes/refresh.d.ts.map +0 -1
- package/dist/auth/internal/same-origin.d.ts.map +0 -1
- package/dist/auth/internal/session-gates.d.ts.map +0 -1
- package/dist/auth/internal/update-session.d.ts.map +0 -1
- package/dist/auth/internal/use-editor-login.d.ts.map +0 -1
- package/dist/auth/proxy.d.ts.map +0 -1
- package/dist/auth/react.d.ts.map +0 -1
- package/dist/auth/routes.d.ts.map +0 -1
- package/dist/auth/server.d.ts.map +0 -1
- package/dist/puck-editor/fields.d.ts.map +0 -1
- package/dist/puck-editor/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/client.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/config.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/media-params.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts.map +0 -1
- package/dist/puck-editor/internal/api/space.d.ts.map +0 -1
- package/dist/puck-editor/internal/content-model.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/component-icons.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/component-item.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/picker-model.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/i18n.d.ts.map +0 -1
- package/dist/puck-editor/internal/locale.d.ts.map +0 -1
- package/dist/puck-editor/internal/localize.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-wrapper.d.ts.map +0 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/popover.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/search-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +0 -1
- package/dist/puck-editor/internal/utils.d.ts.map +0 -1
- package/dist/puck-editor/render.d.ts.map +0 -1
- package/dist/puck-editor/server.d.ts.map +0 -1
- package/dist/puck-editor/smart-actions.d.ts.map +0 -1
- package/dist/shared/cn.d.ts.map +0 -1
- package/dist/shared/i18n.d.ts.map +0 -1
- package/dist/shared/toolbar-action.d.ts.map +0 -1
- package/dist/shared/use-is-hydrated.d.ts.map +0 -1
- package/dist/shared/use-is-in-iframe.d.ts.map +0 -1
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +0 -1
- package/dist/smart-actions/internal/i18n.d.ts.map +0 -1
- package/dist/smart-actions/internal/logout-form.d.ts.map +0 -1
- package/dist/smart-actions/internal/refresh-page.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +0 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts.map +0 -1
- package/dist/smart-actions/internal/user-profile.d.ts.map +0 -1
- package/dist/smart-actions/server.d.ts.map +0 -1
- package/dist/visual-editor/index.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +0 -1
- package/dist/visual-editor/internal/i18n.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts.map +0 -1
- package/dist/visual-editor/server.d.ts.map +0 -1
|
@@ -1,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,IAAID,SAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,aAAaA,CAACN,KAAc,EAAW;EACrD,OAAO,CAAC,CAACA,KAAK,IAAIA,KAAK,CAACO,UAAU,CAAC,GAAG,CAAC,IAAIP,KAAK,CAACQ,MAAM,GAAG,CAAC;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACT,KAAc,EAAW;EACzD,IAAI,CAACA,KAAK,EAAE,OAAO,KAAK;EACxB,MAAMU,KAAK,GAAGV,KAAK,CAACW,OAAO,CAAC,GAAG,CAAC;EAChC,OAAOD,KAAK,KAAK,CAAC,CAAC,IAAIA,KAAK,GAAGV,KAAK,CAACQ,MAAM,GAAG,CAAC;AACjD;;AAEA;;AAaA,SAASI,eAAeA,CAACZ,KAAc,EAA8B;EACnE,OACE,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,KAAK,IAAI,IACd,OAAQA,KAAK,CAAyBa,KAAK,KAAK,QAAQ;AAE5D;AAEA,SAASC,oBAAoBA,CAC3BC,SAA4B,EAC5BC,GAA4B,EACtB;EACN,MAAMH,KAAK,GAAGE,SAAS,CAACF,KAAK;EAC7B,IAAI,CAACA,KAAK,EAAE;EAEZ,MAAMI,QAAQ,GAAGlB,iBAAiB,CAChC,OAAOc,KAAK,CAACK,MAAM,KAAK,QAAQ,GAAGL,KAAK,CAACK,MAAM,GAAGjB,SACpD,CAAC;EACD,IAAIgB,QAAQ,IAAI,CAACD,GAAG,CAACG,GAAG,CAACF,QAAQ,CAAC,EAAE;IAClCD,GAAG,CAACI,GAAG,CAACH,QAAQ,EAAE;MAChBI,EAAE,EAAEJ,QAAQ;MACZK,KAAK,EAAExB,QAAQ,CAACiB,SAAS,CAACQ,IAAI,IAAI,SAAS;IAC7C,CAAC,CAAC;EACJ;;EAEA;EACA,KAAK,MAAMvB,KAAK,IAAIwB,MAAM,CAACC,MAAM,CAACZ,KAAK,CAAC,EAAE;IACxC,IAAIa,KAAK,CAACC,OAAO,CAAC3B,KAAK,CAAC,EAAE;MACxB,KAAK,MAAM4B,KAAK,IAAI5B,KAAK,EAAE;QACzB,IAAIY,eAAe,CAACgB,KAAK,CAAC,EAAEd,oBAAoB,CAACc,KAAK,EAAEZ,GAAG,CAAC;MAC9D;IACF;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,kBAAkBA,CAACC,IAAa,EAAgB;EAC9D,MAAMd,GAAG,GAAG,IAAIe,GAAG,CAAqB,CAAC;EACzC,IAAI,CAACD,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE,OAAO,EAAE;EAChD,MAAME,GAAG,GAAGF,IAIX;EAED,MAAMG,UAAU,GAAIjC,KAAc,IAAK;IACrC,IAAI,CAAC0B,KAAK,CAACC,OAAO,CAAC3B,KAAK,CAAC,EAAE;IAC3B,KAAK,MAAM4B,KAAK,IAAI5B,KAAK,EAAE;MACzB,IAAIY,eAAe,CAACgB,KAAK,CAAC,EAAEd,oBAAoB,CAACc,KAAK,EAAEZ,GAAG,CAAC;IAC9D;EACF,CAAC;EAEDiB,UAAU,CAACD,GAAG,CAACE,OAAO,CAAC;EACvB,IAAIF,GAAG,CAACG,KAAK,EAAE,KAAK,MAAMC,IAAI,IAAIZ,MAAM,CAACC,MAAM,CAACO,GAAG,CAACG,KAAK,CAAC,EAAEF,UAAU,CAACG,IAAI,CAAC;EAC5E,IAAIJ,GAAG,CAACK,IAAI,EAAExB,KAAK,EAAE;IACnB,KAAK,MAAMb,KAAK,IAAIwB,MAAM,CAACC,MAAM,CAACO,GAAG,CAACK,IAAI,CAACxB,KAAK,CAAC,EAAEoB,UAAU,CAACjC,KAAK,CAAC;EACtE;EAEA,OAAO,CAAC,GAAGgB,GAAG,CAACS,MAAM,CAAC,CAAC,CAAC,CAACa,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAAClB,EAAE,CAACoB,aAAa,CAACD,CAAC,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":[]}
|
|
@@ -6,14 +6,14 @@ import { createUsePuck } from '@puckeditor/core';
|
|
|
6
6
|
import * as Popover from '@radix-ui/react-popover';
|
|
7
7
|
import { keepPreviousData, useQuery } from '@tanstack/react-query';
|
|
8
8
|
import { ChevronDown, Search, X } from 'lucide-react';
|
|
9
|
-
import { puckFetch } from
|
|
10
|
-
import { usePuckDictionary } from
|
|
11
|
-
import { getPathLocale } from
|
|
12
|
-
import { collectPageAnchors, hasAnchorFragment } from
|
|
13
|
-
import { humanize } from
|
|
14
|
-
import { isExternalHref } from
|
|
15
|
-
import SegmentedControl from
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { puckFetch } from "../../api/client.js";
|
|
10
|
+
import { usePuckDictionary, usePuckLocale } from "../../i18n.js";
|
|
11
|
+
import { getPathLocale } from "../../locale.js";
|
|
12
|
+
import { collectPageAnchors, hasAnchorFragment } from "./anchor.js";
|
|
13
|
+
import { humanize } from "./humanize.js";
|
|
14
|
+
import { isExternalHref, isSafeHref } from "./link-value.js";
|
|
15
|
+
import SegmentedControl from "./segmented-control.js";
|
|
16
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const MODE_VALUES = ['internal', 'external', 'anchor'];
|
|
18
18
|
const usePuck = createUsePuck();
|
|
19
19
|
|
|
@@ -53,7 +53,7 @@ function displayPath(path, locale) {
|
|
|
53
53
|
* richtext link popover so both surfaces share identical selection UI.
|
|
54
54
|
*/
|
|
55
55
|
export default function LinkPickerControl(t0) {
|
|
56
|
-
const $ = _c(
|
|
56
|
+
const $ = _c(24);
|
|
57
57
|
const {
|
|
58
58
|
href,
|
|
59
59
|
onHrefChange,
|
|
@@ -87,9 +87,11 @@ export default function LinkPickerControl(t0) {
|
|
|
87
87
|
}
|
|
88
88
|
const anchors = t3;
|
|
89
89
|
const t = usePuckDictionary().linkPicker;
|
|
90
|
+
const editorLocale = usePuckLocale();
|
|
90
91
|
const [open, setOpen] = useState(false);
|
|
91
92
|
const [query, setQuery] = useState("");
|
|
92
93
|
const [activeGroup, setActiveGroup] = useState(null);
|
|
94
|
+
const [unsafeHint, setUnsafeHint] = useState(false);
|
|
93
95
|
const locale = typeof window !== "undefined" ? getPathLocale(window.location.pathname) : "en";
|
|
94
96
|
const {
|
|
95
97
|
data: links,
|
|
@@ -162,7 +164,7 @@ export default function LinkPickerControl(t0) {
|
|
|
162
164
|
key: key_4,
|
|
163
165
|
label: groupLabelOf(key_4),
|
|
164
166
|
order: groupOrderOf(key_4),
|
|
165
|
-
items: items.sort((a_0, b_0) => linkLabel(a_0, locale).localeCompare(linkLabel(b_0, locale)))
|
|
167
|
+
items: items.sort((a_0, b_0) => linkLabel(a_0, locale).localeCompare(linkLabel(b_0, locale), editorLocale))
|
|
166
168
|
};
|
|
167
169
|
}).sort(_temp3);
|
|
168
170
|
}
|
|
@@ -182,8 +184,25 @@ export default function LinkPickerControl(t0) {
|
|
|
182
184
|
}
|
|
183
185
|
const submitOnEnter = t6;
|
|
184
186
|
let t7;
|
|
185
|
-
if ($[8] !==
|
|
186
|
-
t7 =
|
|
187
|
+
if ($[8] !== href || $[9] !== onHrefChange) {
|
|
188
|
+
t7 = () => {
|
|
189
|
+
if (isSafeHref(href)) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
onHrefChange("");
|
|
193
|
+
setUnsafeHint(true);
|
|
194
|
+
return true;
|
|
195
|
+
};
|
|
196
|
+
$[8] = href;
|
|
197
|
+
$[9] = onHrefChange;
|
|
198
|
+
$[10] = t7;
|
|
199
|
+
} else {
|
|
200
|
+
t7 = $[10];
|
|
201
|
+
}
|
|
202
|
+
const neutralizeUnsafe = t7;
|
|
203
|
+
let t8;
|
|
204
|
+
if ($[11] !== mode || $[12] !== onHrefChange) {
|
|
205
|
+
t8 = next => {
|
|
187
206
|
if (next === mode) {
|
|
188
207
|
return;
|
|
189
208
|
}
|
|
@@ -193,49 +212,64 @@ export default function LinkPickerControl(t0) {
|
|
|
193
212
|
setActiveGroup(null);
|
|
194
213
|
setOpen(false);
|
|
195
214
|
};
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
215
|
+
$[11] = mode;
|
|
216
|
+
$[12] = onHrefChange;
|
|
217
|
+
$[13] = t8;
|
|
199
218
|
} else {
|
|
200
|
-
|
|
219
|
+
t8 = $[13];
|
|
201
220
|
}
|
|
202
|
-
const switchMode =
|
|
203
|
-
const
|
|
204
|
-
let
|
|
205
|
-
if ($[
|
|
206
|
-
|
|
221
|
+
const switchMode = t8;
|
|
222
|
+
const t9 = "nh:flex nh:flex-col nh:gap-2";
|
|
223
|
+
let t10;
|
|
224
|
+
if ($[14] !== t) {
|
|
225
|
+
t10 = MODE_VALUES.map(value => ({
|
|
207
226
|
value,
|
|
208
227
|
label: t[value]
|
|
209
228
|
}));
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
229
|
+
$[14] = t;
|
|
230
|
+
$[15] = t10;
|
|
212
231
|
} else {
|
|
213
|
-
|
|
232
|
+
t10 = $[15];
|
|
214
233
|
}
|
|
215
|
-
let
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
218
|
-
options:
|
|
234
|
+
let t11;
|
|
235
|
+
if ($[16] !== mode || $[17] !== switchMode || $[18] !== t.linkMode || $[19] !== t10) {
|
|
236
|
+
t11 = /*#__PURE__*/_jsx(SegmentedControl, {
|
|
237
|
+
options: t10,
|
|
219
238
|
value: mode,
|
|
220
239
|
onChange: switchMode,
|
|
221
240
|
variant: "puck",
|
|
222
241
|
ariaLabel: t.linkMode
|
|
223
242
|
});
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
243
|
+
$[16] = mode;
|
|
244
|
+
$[17] = switchMode;
|
|
245
|
+
$[18] = t.linkMode;
|
|
246
|
+
$[19] = t10;
|
|
247
|
+
$[20] = t11;
|
|
229
248
|
} else {
|
|
230
|
-
|
|
249
|
+
t11 = $[20];
|
|
231
250
|
}
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
251
|
+
const t12 = mode === "external" ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
252
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
253
|
+
type: "text",
|
|
254
|
+
value: href,
|
|
255
|
+
placeholder: t.externalPlaceholder,
|
|
256
|
+
onChange: e_0 => {
|
|
257
|
+
setUnsafeHint(false);
|
|
258
|
+
onHrefChange(e_0.target.value);
|
|
259
|
+
},
|
|
260
|
+
onKeyDown: e_1 => {
|
|
261
|
+
if (e_1.key === "Enter" && neutralizeUnsafe()) {
|
|
262
|
+
e_1.preventDefault();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
submitOnEnter(e_1);
|
|
266
|
+
},
|
|
267
|
+
onBlur: () => neutralizeUnsafe(),
|
|
268
|
+
className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm"
|
|
269
|
+
}), unsafeHint && /*#__PURE__*/_jsx("p", {
|
|
270
|
+
className: "nh:text-xs nh:text-red-600",
|
|
271
|
+
children: t.unsafeLink
|
|
272
|
+
})]
|
|
239
273
|
}) : mode === "anchor" ? /*#__PURE__*/_jsx(AnchorInput, {
|
|
240
274
|
href: href,
|
|
241
275
|
anchors: anchors,
|
|
@@ -255,17 +289,17 @@ export default function LinkPickerControl(t0) {
|
|
|
255
289
|
className: "nh:flex nh:min-w-0 nh:items-center nh:gap-2",
|
|
256
290
|
children: [/*#__PURE__*/_jsx("span", {
|
|
257
291
|
className: isEmptyValue(href) ? "nh:truncate nh:text-gray-500" : "nh:truncate",
|
|
258
|
-
children: isEmptyValue(href) ?
|
|
292
|
+
children: isEmptyValue(href) ? t.selectPage : selectedLink ? linkLabel(selectedLink, locale) : href
|
|
259
293
|
}), selectedLink?.published === false && /*#__PURE__*/_jsx("span", {
|
|
260
294
|
className: "nh:shrink-0 nh:rounded-full nh:bg-amber-50 nh:px-1.5 nh:py-0.5 nh:text-[9px] nh:font-semibold nh:uppercase nh:tracking-wide nh:text-amber-600 nh:ring-1 nh:ring-inset nh:ring-amber-200",
|
|
261
|
-
children:
|
|
295
|
+
children: t.draft
|
|
262
296
|
})]
|
|
263
297
|
}), /*#__PURE__*/_jsxs("span", {
|
|
264
298
|
className: "nh:flex nh:shrink-0 nh:items-center nh:gap-1",
|
|
265
299
|
children: [!isEmptyValue(href) && /*#__PURE__*/_jsx(X, {
|
|
266
300
|
className: "nh:size-4 nh:text-gray-500 nh:hover:text-(--nh-fg)",
|
|
267
|
-
onClick:
|
|
268
|
-
|
|
301
|
+
onClick: e_2 => {
|
|
302
|
+
e_2.stopPropagation();
|
|
269
303
|
onHrefChange("");
|
|
270
304
|
}
|
|
271
305
|
}), /*#__PURE__*/_jsx(ChevronDown, {
|
|
@@ -291,7 +325,7 @@ export default function LinkPickerControl(t0) {
|
|
|
291
325
|
autoFocus: true,
|
|
292
326
|
value: query,
|
|
293
327
|
placeholder: t.searchPlaceholder,
|
|
294
|
-
onChange:
|
|
328
|
+
onChange: e_3 => setQuery(e_3.target.value),
|
|
295
329
|
className: "nh:w-full nh:text-sm outline-none"
|
|
296
330
|
})]
|
|
297
331
|
}), availableGroups.length > 1 && /*#__PURE__*/_jsx("div", {
|
|
@@ -339,7 +373,7 @@ export default function LinkPickerControl(t0) {
|
|
|
339
373
|
children: linkLabel(link_0, locale)
|
|
340
374
|
}), link_0.published === false && /*#__PURE__*/_jsx("span", {
|
|
341
375
|
className: "nh:shrink-0 nh:rounded-full nh:bg-amber-50 nh:px-1.5 nh:py-0.5 nh:text-[9px] nh:font-semibold nh:uppercase nh:tracking-wide nh:text-amber-600 nh:ring-1 nh:ring-inset nh:ring-amber-200",
|
|
342
|
-
children:
|
|
376
|
+
children: t.draft
|
|
343
377
|
})]
|
|
344
378
|
}), /*#__PURE__*/_jsx("span", {
|
|
345
379
|
className: "nh:w-full nh:truncate nh:font-mono nh:text-xs nh:text-gray-500",
|
|
@@ -353,19 +387,19 @@ export default function LinkPickerControl(t0) {
|
|
|
353
387
|
})]
|
|
354
388
|
})
|
|
355
389
|
});
|
|
356
|
-
let
|
|
357
|
-
if ($[
|
|
358
|
-
|
|
359
|
-
className:
|
|
360
|
-
children: [
|
|
390
|
+
let t13;
|
|
391
|
+
if ($[21] !== t11 || $[22] !== t12) {
|
|
392
|
+
t13 = /*#__PURE__*/_jsxs("div", {
|
|
393
|
+
className: t9,
|
|
394
|
+
children: [t11, t12]
|
|
361
395
|
});
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
396
|
+
$[21] = t11;
|
|
397
|
+
$[22] = t12;
|
|
398
|
+
$[23] = t13;
|
|
365
399
|
} else {
|
|
366
|
-
|
|
400
|
+
t13 = $[23];
|
|
367
401
|
}
|
|
368
|
-
return
|
|
402
|
+
return t13;
|
|
369
403
|
}
|
|
370
404
|
function _temp3(a_1, b_1) {
|
|
371
405
|
return a_1.order - b_1.order;
|
|
@@ -391,7 +425,7 @@ const OTHER_ANCHOR = '__other__';
|
|
|
391
425
|
* preselects «Other …» and shows it in the text field, so links round-trip.
|
|
392
426
|
*/
|
|
393
427
|
function AnchorInput(t0) {
|
|
394
|
-
const $ = _c(
|
|
428
|
+
const $ = _c(42);
|
|
395
429
|
const {
|
|
396
430
|
href,
|
|
397
431
|
anchors,
|
|
@@ -427,10 +461,28 @@ function AnchorInput(t0) {
|
|
|
427
461
|
t2 = $[7];
|
|
428
462
|
}
|
|
429
463
|
const [isOther, setIsOther] = useState(t2);
|
|
430
|
-
const
|
|
464
|
+
const [unsafeHint, setUnsafeHint] = useState(false);
|
|
431
465
|
let t3;
|
|
432
|
-
if ($[8] !==
|
|
433
|
-
t3 =
|
|
466
|
+
if ($[8] !== href || $[9] !== onHrefChange) {
|
|
467
|
+
t3 = () => {
|
|
468
|
+
if (isSafeHref(href)) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
onHrefChange("");
|
|
472
|
+
setUnsafeHint(true);
|
|
473
|
+
return true;
|
|
474
|
+
};
|
|
475
|
+
$[8] = href;
|
|
476
|
+
$[9] = onHrefChange;
|
|
477
|
+
$[10] = t3;
|
|
478
|
+
} else {
|
|
479
|
+
t3 = $[10];
|
|
480
|
+
}
|
|
481
|
+
const neutralizeUnsafe = t3;
|
|
482
|
+
const selectValue = isOther ? OTHER_ANCHOR : matchesSection ? href : "";
|
|
483
|
+
let t4;
|
|
484
|
+
if ($[11] !== matchesSection || $[12] !== onHrefChange) {
|
|
485
|
+
t4 = e => {
|
|
434
486
|
const next = e.target.value;
|
|
435
487
|
if (next === OTHER_ANCHOR) {
|
|
436
488
|
setIsOther(true);
|
|
@@ -442,118 +494,134 @@ function AnchorInput(t0) {
|
|
|
442
494
|
setIsOther(false);
|
|
443
495
|
onHrefChange(next);
|
|
444
496
|
};
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
497
|
+
$[11] = matchesSection;
|
|
498
|
+
$[12] = onHrefChange;
|
|
499
|
+
$[13] = t4;
|
|
448
500
|
} else {
|
|
449
|
-
|
|
501
|
+
t4 = $[13];
|
|
450
502
|
}
|
|
451
|
-
let
|
|
452
|
-
if ($[
|
|
453
|
-
|
|
503
|
+
let t5;
|
|
504
|
+
if ($[14] !== t.selectSection) {
|
|
505
|
+
t5 = /*#__PURE__*/_jsx("option", {
|
|
454
506
|
value: "",
|
|
455
|
-
children:
|
|
507
|
+
children: t.selectSection
|
|
456
508
|
});
|
|
457
|
-
$[
|
|
509
|
+
$[14] = t.selectSection;
|
|
510
|
+
$[15] = t5;
|
|
458
511
|
} else {
|
|
459
|
-
|
|
512
|
+
t5 = $[15];
|
|
460
513
|
}
|
|
461
|
-
let
|
|
462
|
-
if ($[
|
|
463
|
-
|
|
464
|
-
$[
|
|
465
|
-
$[
|
|
514
|
+
let t6;
|
|
515
|
+
if ($[16] !== anchors) {
|
|
516
|
+
t6 = anchors.map(_temp4);
|
|
517
|
+
$[16] = anchors;
|
|
518
|
+
$[17] = t6;
|
|
466
519
|
} else {
|
|
467
|
-
|
|
520
|
+
t6 = $[17];
|
|
468
521
|
}
|
|
469
|
-
let
|
|
470
|
-
if ($[
|
|
471
|
-
|
|
522
|
+
let t7;
|
|
523
|
+
if ($[18] !== t.otherAnchor) {
|
|
524
|
+
t7 = /*#__PURE__*/_jsx("option", {
|
|
472
525
|
value: OTHER_ANCHOR,
|
|
473
526
|
children: t.otherAnchor
|
|
474
527
|
});
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
528
|
+
$[18] = t.otherAnchor;
|
|
529
|
+
$[19] = t7;
|
|
477
530
|
} else {
|
|
478
|
-
|
|
531
|
+
t7 = $[19];
|
|
479
532
|
}
|
|
480
|
-
let
|
|
481
|
-
if ($[
|
|
482
|
-
|
|
533
|
+
let t8;
|
|
534
|
+
if ($[20] !== selectValue || $[21] !== t4 || $[22] !== t5 || $[23] !== t6 || $[24] !== t7) {
|
|
535
|
+
t8 = /*#__PURE__*/_jsxs("select", {
|
|
483
536
|
value: selectValue,
|
|
484
|
-
onChange:
|
|
537
|
+
onChange: t4,
|
|
485
538
|
className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm",
|
|
486
|
-
children: [
|
|
539
|
+
children: [t5, t6, t7]
|
|
487
540
|
});
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
541
|
+
$[20] = selectValue;
|
|
542
|
+
$[21] = t4;
|
|
543
|
+
$[22] = t5;
|
|
544
|
+
$[23] = t6;
|
|
545
|
+
$[24] = t7;
|
|
546
|
+
$[25] = t8;
|
|
493
547
|
} else {
|
|
494
|
-
|
|
548
|
+
t8 = $[25];
|
|
495
549
|
}
|
|
496
|
-
let
|
|
497
|
-
if ($[
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
550
|
+
let t9;
|
|
551
|
+
if ($[26] !== href || $[27] !== isOther || $[28] !== neutralizeUnsafe || $[29] !== onHrefChange || $[30] !== onSubmit || $[31] !== t.anchorPlaceholder || $[32] !== t.unsafeLink || $[33] !== unsafeHint) {
|
|
552
|
+
t9 = isOther && /*#__PURE__*/_jsxs(_Fragment, {
|
|
553
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
554
|
+
type: "text",
|
|
555
|
+
value: href,
|
|
556
|
+
placeholder: t.anchorPlaceholder,
|
|
557
|
+
onChange: e_0 => {
|
|
558
|
+
setUnsafeHint(false);
|
|
559
|
+
onHrefChange(e_0.target.value);
|
|
560
|
+
},
|
|
561
|
+
onKeyDown: e_1 => {
|
|
562
|
+
if (e_1.key === "Enter") {
|
|
563
|
+
e_1.preventDefault();
|
|
564
|
+
if (!neutralizeUnsafe()) {
|
|
565
|
+
onSubmit?.();
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
onBlur: () => neutralizeUnsafe(),
|
|
570
|
+
className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm"
|
|
571
|
+
}), unsafeHint && /*#__PURE__*/_jsx("p", {
|
|
572
|
+
className: "nh:text-xs nh:text-red-600",
|
|
573
|
+
children: t.unsafeLink
|
|
574
|
+
})]
|
|
510
575
|
});
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
576
|
+
$[26] = href;
|
|
577
|
+
$[27] = isOther;
|
|
578
|
+
$[28] = neutralizeUnsafe;
|
|
579
|
+
$[29] = onHrefChange;
|
|
580
|
+
$[30] = onSubmit;
|
|
581
|
+
$[31] = t.anchorPlaceholder;
|
|
582
|
+
$[32] = t.unsafeLink;
|
|
583
|
+
$[33] = unsafeHint;
|
|
584
|
+
$[34] = t9;
|
|
517
585
|
} else {
|
|
518
|
-
|
|
586
|
+
t9 = $[34];
|
|
519
587
|
}
|
|
520
|
-
let
|
|
521
|
-
if ($[
|
|
522
|
-
|
|
588
|
+
let t10;
|
|
589
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
590
|
+
t10 = {
|
|
523
591
|
fontSize: "var(--puck-font-size-xxxs)",
|
|
524
|
-
color: "var(--puck-color-
|
|
592
|
+
color: "var(--puck-color-text-muted)",
|
|
525
593
|
lineHeight: 1.4
|
|
526
594
|
};
|
|
527
|
-
$[
|
|
595
|
+
$[35] = t10;
|
|
528
596
|
} else {
|
|
529
|
-
|
|
597
|
+
t10 = $[35];
|
|
530
598
|
}
|
|
531
|
-
const
|
|
532
|
-
let
|
|
533
|
-
if ($[
|
|
534
|
-
|
|
535
|
-
style:
|
|
536
|
-
children:
|
|
599
|
+
const t11 = anchors.length === 0 ? t.anchorHelpEmpty : t.anchorHelp;
|
|
600
|
+
let t12;
|
|
601
|
+
if ($[36] !== t11) {
|
|
602
|
+
t12 = /*#__PURE__*/_jsx("p", {
|
|
603
|
+
style: t10,
|
|
604
|
+
children: t11
|
|
537
605
|
});
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
606
|
+
$[36] = t11;
|
|
607
|
+
$[37] = t12;
|
|
540
608
|
} else {
|
|
541
|
-
|
|
609
|
+
t12 = $[37];
|
|
542
610
|
}
|
|
543
|
-
let
|
|
544
|
-
if ($[
|
|
545
|
-
|
|
611
|
+
let t13;
|
|
612
|
+
if ($[38] !== t12 || $[39] !== t8 || $[40] !== t9) {
|
|
613
|
+
t13 = /*#__PURE__*/_jsxs("div", {
|
|
546
614
|
className: "nh:flex nh:flex-col nh:gap-2",
|
|
547
|
-
children: [
|
|
615
|
+
children: [t8, t9, t12]
|
|
548
616
|
});
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
$[
|
|
617
|
+
$[38] = t12;
|
|
618
|
+
$[39] = t8;
|
|
619
|
+
$[40] = t9;
|
|
620
|
+
$[41] = t13;
|
|
553
621
|
} else {
|
|
554
|
-
|
|
622
|
+
t13 = $[41];
|
|
555
623
|
}
|
|
556
|
-
return
|
|
624
|
+
return t13;
|
|
557
625
|
}
|
|
558
626
|
function _temp4(anchor) {
|
|
559
627
|
return /*#__PURE__*/_jsxs("option", {
|