@nodehive/nextjs 0.1.3 → 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 +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 +3 -3
- 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 +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 +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 +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/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-frame-zoom.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-config.d.ts.map +0 -1
- package/dist/puck-editor/internal/editor-query-client.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/required.d.ts.map +0 -1
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +0 -1
- package/dist/puck-editor/internal/i18n.d.ts.map +0 -1
- package/dist/puck-editor/internal/locale.d.ts.map +0 -1
- package/dist/puck-editor/internal/localize.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +0 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-augmentation.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-node.d.ts.map +0 -1
- package/dist/puck-editor/internal/puck-wrapper.d.ts.map +0 -1
- package/dist/puck-editor/internal/render/cropped-image.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/index.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +0 -1
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/calendar.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/dialog.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/icon-button.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/popover.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/required-mark.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/search-control.d.ts.map +0 -1
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +0 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +0 -1
- package/dist/puck-editor/internal/utils.d.ts.map +0 -1
- package/dist/puck-editor/render.d.ts.map +0 -1
- package/dist/puck-editor/server.d.ts.map +0 -1
- package/dist/puck-editor/smart-actions.d.ts.map +0 -1
- package/dist/shared/cn.d.ts.map +0 -1
- package/dist/shared/i18n.d.ts.map +0 -1
- package/dist/shared/toolbar-action.d.ts.map +0 -1
- package/dist/shared/use-is-hydrated.d.ts.map +0 -1
- package/dist/shared/use-is-in-iframe.d.ts.map +0 -1
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +0 -1
- package/dist/smart-actions/internal/i18n.d.ts.map +0 -1
- package/dist/smart-actions/internal/logout-form.d.ts.map +0 -1
- package/dist/smart-actions/internal/refresh-page.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-button.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-config.d.ts.map +0 -1
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/storage.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/types.d.ts.map +0 -1
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +0 -1
- package/dist/smart-actions/internal/ui/tooltip.d.ts.map +0 -1
- package/dist/smart-actions/internal/user-profile.d.ts.map +0 -1
- package/dist/smart-actions/server.d.ts.map +0 -1
- package/dist/visual-editor/index.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/connector.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +0 -1
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +0 -1
- package/dist/visual-editor/internal/i18n.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +0 -1
- package/dist/visual-editor/internal/revalidate-route.d.ts.map +0 -1
- package/dist/visual-editor/server.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":["resolveDictionary","en","smartActions","toolbarActions","launcherAction","collapse","account","edit","newPage","nodeHive","refresh","logout","de","dictionaries","getSmartActionsDictionary","locale","overrides"],"sources":["../../../src/smart-actions/internal/i18n.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["resolveDictionary","en","smartActions","toolbarActions","launcherAction","collapse","account","edit","newPage","nodeHive","refresh","logout","de","fr","dictionaries","getSmartActionsDictionary","locale","overrides"],"sources":["../../../src/smart-actions/internal/i18n.ts"],"sourcesContent":["import {\n resolveDictionary,\n type DictionaryOverrides,\n} from '../../shared/i18n.ts';\n\nconst en = {\n smartActions: {\n toolbarActions: 'Toolbar actions',\n launcherAction: 'Maximize',\n collapse: 'Minimize',\n account: 'Account',\n edit: 'Edit',\n newPage: 'New page',\n nodeHive: 'NodeHive',\n refresh: 'Refresh',\n logout: 'Logout',\n },\n};\n\nconst de: SmartActionsDictionary = {\n smartActions: {\n toolbarActions: 'Toolbar-Aktionen',\n launcherAction: 'Maximieren',\n collapse: 'Minimieren',\n account: 'Konto',\n edit: 'Bearbeiten',\n newPage: 'Neue Seite',\n nodeHive: 'NodeHive',\n refresh: 'Aktualisieren',\n logout: 'Abmelden',\n },\n};\n\nconst fr: SmartActionsDictionary = {\n smartActions: {\n toolbarActions: 'Actions de la barre d’outils',\n launcherAction: 'Agrandir',\n collapse: 'Réduire',\n account: 'Compte',\n edit: 'Modifier',\n newPage: 'Nouvelle page',\n nodeHive: 'NodeHive',\n refresh: 'Actualiser',\n logout: 'Se déconnecter',\n },\n};\n\nexport type SmartActionsDictionary = typeof en;\nexport type SmartActionsLabels = SmartActionsDictionary['smartActions'];\n\nexport type SmartActionsDictionaryOverrides =\n DictionaryOverrides<SmartActionsDictionary>;\n\nconst dictionaries: Record<string, SmartActionsDictionary> = { en, de, fr };\n\nexport function getSmartActionsDictionary(\n locale: string,\n overrides?: SmartActionsDictionaryOverrides\n): SmartActionsDictionary {\n return resolveDictionary(dictionaries, en, locale, overrides);\n}\n"],"mappings":"AAAA,SACEA,iBAAiB,QAEZ,sBAAsB;AAE7B,MAAMC,EAAE,GAAG;EACTC,YAAY,EAAE;IACZC,cAAc,EAAE,iBAAiB;IACjCC,cAAc,EAAE,UAAU;IAC1BC,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,SAAS;IAClBC,IAAI,EAAE,MAAM;IACZC,OAAO,EAAE,UAAU;IACnBC,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,SAAS;IAClBC,MAAM,EAAE;EACV;AACF,CAAC;AAED,MAAMC,EAA0B,GAAG;EACjCV,YAAY,EAAE;IACZC,cAAc,EAAE,kBAAkB;IAClCC,cAAc,EAAE,YAAY;IAC5BC,QAAQ,EAAE,YAAY;IACtBC,OAAO,EAAE,OAAO;IAChBC,IAAI,EAAE,YAAY;IAClBC,OAAO,EAAE,YAAY;IACrBC,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,eAAe;IACxBC,MAAM,EAAE;EACV;AACF,CAAC;AAED,MAAME,EAA0B,GAAG;EACjCX,YAAY,EAAE;IACZC,cAAc,EAAE,8BAA8B;IAC9CC,cAAc,EAAE,UAAU;IAC1BC,QAAQ,EAAE,SAAS;IACnBC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE,eAAe;IACxBC,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,YAAY;IACrBC,MAAM,EAAE;EACV;AACF,CAAC;AAQD,MAAMG,YAAoD,GAAG;EAAEb,EAAE;EAAEW,EAAE;EAAEC;AAAG,CAAC;AAE3E,OAAO,SAASE,yBAAyBA,CACvCC,MAAc,EACdC,SAA2C,EACnB;EACxB,OAAOjB,iBAAiB,CAACc,YAAY,EAAEb,EAAE,EAAEe,MAAM,EAAEC,SAAS,CAAC;AAC/D","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
type LogoutFormProps = {
|
|
3
3
|
/** Project logout Server Action, injected via SmartActionsButton. */
|
|
4
4
|
logout: () => Promise<void>;
|
|
5
|
+
label?: string;
|
|
5
6
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
6
|
-
export default function LogoutForm({ logout, ...props }: LogoutFormProps): import("react").JSX.Element;
|
|
7
|
+
export default function LogoutForm({ logout, label, ...props }: LogoutFormProps): import("react").JSX.Element;
|
|
7
8
|
export {};
|
|
8
|
-
//# sourceMappingURL=logout-form.d.ts.map
|
|
@@ -3,86 +3,93 @@
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { useActionState } from 'react';
|
|
5
5
|
import { Loader2, LogOut } from 'lucide-react';
|
|
6
|
-
import { cn } from
|
|
6
|
+
import { cn } from "../../shared/cn.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
export default function LogoutForm(t0) {
|
|
9
|
-
const $ = _c(
|
|
9
|
+
const $ = _c(19);
|
|
10
10
|
let logout;
|
|
11
11
|
let props;
|
|
12
|
+
let t1;
|
|
12
13
|
if ($[0] !== t0) {
|
|
13
14
|
({
|
|
14
15
|
logout,
|
|
16
|
+
label: t1,
|
|
15
17
|
...props
|
|
16
18
|
} = t0);
|
|
17
19
|
$[0] = t0;
|
|
18
20
|
$[1] = logout;
|
|
19
21
|
$[2] = props;
|
|
22
|
+
$[3] = t1;
|
|
20
23
|
} else {
|
|
21
24
|
logout = $[1];
|
|
22
25
|
props = $[2];
|
|
26
|
+
t1 = $[3];
|
|
23
27
|
}
|
|
28
|
+
const label = t1 === undefined ? "Logout" : t1;
|
|
24
29
|
const [, dispatch, isPending] = useActionState(logout, undefined);
|
|
25
|
-
let t1;
|
|
26
|
-
if ($[3] !== isPending) {
|
|
27
|
-
t1 = cn("nh:flex nh:h-8 nh:w-8 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)", {
|
|
28
|
-
"nh:cursor-wait nh:text-slate-200": isPending
|
|
29
|
-
});
|
|
30
|
-
$[3] = isPending;
|
|
31
|
-
$[4] = t1;
|
|
32
|
-
} else {
|
|
33
|
-
t1 = $[4];
|
|
34
|
-
}
|
|
35
30
|
let t2;
|
|
36
|
-
if ($[
|
|
37
|
-
t2 =
|
|
38
|
-
|
|
39
|
-
children: "Logout"
|
|
31
|
+
if ($[4] !== isPending) {
|
|
32
|
+
t2 = cn("nh:flex nh:h-8 nh:w-8 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)", {
|
|
33
|
+
"nh:cursor-wait nh:text-slate-200": isPending
|
|
40
34
|
});
|
|
35
|
+
$[4] = isPending;
|
|
41
36
|
$[5] = t2;
|
|
42
37
|
} else {
|
|
43
38
|
t2 = $[5];
|
|
44
39
|
}
|
|
45
40
|
let t3;
|
|
46
|
-
if ($[6] !==
|
|
47
|
-
t3 =
|
|
48
|
-
className: "nh:
|
|
49
|
-
|
|
50
|
-
className: "nh:h-5 nh:w-5"
|
|
41
|
+
if ($[6] !== label) {
|
|
42
|
+
t3 = /*#__PURE__*/_jsx("span", {
|
|
43
|
+
className: "nh:sr-only",
|
|
44
|
+
children: label
|
|
51
45
|
});
|
|
52
|
-
$[6] =
|
|
46
|
+
$[6] = label;
|
|
53
47
|
$[7] = t3;
|
|
54
48
|
} else {
|
|
55
49
|
t3 = $[7];
|
|
56
50
|
}
|
|
57
51
|
let t4;
|
|
58
|
-
if ($[8] !== isPending
|
|
59
|
-
t4 = /*#__PURE__*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
className: t1,
|
|
64
|
-
children: [t2, t3]
|
|
52
|
+
if ($[8] !== isPending) {
|
|
53
|
+
t4 = isPending ? /*#__PURE__*/_jsx(Loader2, {
|
|
54
|
+
className: "nh:h-5 nh:w-5 nh:animate-spin"
|
|
55
|
+
}) : /*#__PURE__*/_jsx(LogOut, {
|
|
56
|
+
className: "nh:h-5 nh:w-5"
|
|
65
57
|
});
|
|
66
58
|
$[8] = isPending;
|
|
67
|
-
$[9] =
|
|
68
|
-
$[10] = t1;
|
|
69
|
-
$[11] = t3;
|
|
70
|
-
$[12] = t4;
|
|
59
|
+
$[9] = t4;
|
|
71
60
|
} else {
|
|
72
|
-
t4 = $[
|
|
61
|
+
t4 = $[9];
|
|
73
62
|
}
|
|
74
63
|
let t5;
|
|
75
|
-
if ($[13] !==
|
|
76
|
-
t5 = /*#__PURE__*/
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
if ($[10] !== isPending || $[11] !== props || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
|
|
65
|
+
t5 = /*#__PURE__*/_jsxs("button", {
|
|
66
|
+
...props,
|
|
67
|
+
type: "submit",
|
|
68
|
+
disabled: isPending,
|
|
69
|
+
className: t2,
|
|
70
|
+
children: [t3, t4]
|
|
79
71
|
});
|
|
80
|
-
$[
|
|
72
|
+
$[10] = isPending;
|
|
73
|
+
$[11] = props;
|
|
74
|
+
$[12] = t2;
|
|
75
|
+
$[13] = t3;
|
|
81
76
|
$[14] = t4;
|
|
82
77
|
$[15] = t5;
|
|
83
78
|
} else {
|
|
84
79
|
t5 = $[15];
|
|
85
80
|
}
|
|
86
|
-
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[16] !== dispatch || $[17] !== t5) {
|
|
83
|
+
t6 = /*#__PURE__*/_jsx("form", {
|
|
84
|
+
action: dispatch,
|
|
85
|
+
children: t5
|
|
86
|
+
});
|
|
87
|
+
$[16] = dispatch;
|
|
88
|
+
$[17] = t5;
|
|
89
|
+
$[18] = t6;
|
|
90
|
+
} else {
|
|
91
|
+
t6 = $[18];
|
|
92
|
+
}
|
|
93
|
+
return t6;
|
|
87
94
|
}
|
|
88
95
|
//# sourceMappingURL=logout-form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout-form.js","names":["c","_c","useActionState","Loader2","LogOut","cn","jsx","_jsx","jsxs","_jsxs","LogoutForm","t0","$","logout","props","
|
|
1
|
+
{"version":3,"file":"logout-form.js","names":["c","_c","useActionState","Loader2","LogOut","cn","jsx","_jsx","jsxs","_jsxs","LogoutForm","t0","$","logout","props","t1","label","undefined","dispatch","isPending","t2","t3","className","children","t4","t5","type","t6"],"sources":["../../../src/smart-actions/internal/logout-form.tsx"],"sourcesContent":["'use client';\n\nimport { ButtonHTMLAttributes, useActionState } from 'react';\nimport { Loader2, LogOut } from 'lucide-react';\n\nimport { cn } from '../../shared/cn.ts';\n\ntype LogoutFormProps = {\n /** Project logout Server Action, injected via SmartActionsButton. */\n logout: () => Promise<void>;\n label?: string;\n} & ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport default function LogoutForm({\n logout,\n label = 'Logout',\n ...props\n}: LogoutFormProps) {\n const [, dispatch, isPending] = useActionState(logout, undefined);\n return (\n <form action={dispatch}>\n <button\n {...props}\n type=\"submit\"\n disabled={isPending}\n className={cn(\n 'nh:flex nh:h-8 nh:w-8 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)',\n {\n 'nh:cursor-wait nh:text-slate-200': isPending,\n }\n )}\n >\n <span className=\"nh:sr-only\">{label}</span>\n {isPending ? (\n <Loader2 className=\"nh:h-5 nh:w-5 nh:animate-spin\" />\n ) : (\n <LogOut className=\"nh:h-5 nh:w-5\" />\n )}\n </button>\n </form>\n );\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export default function RefreshPage(
|
|
2
|
-
|
|
1
|
+
export default function RefreshPage({ label }: {
|
|
2
|
+
label?: string;
|
|
3
|
+
}): import("react").JSX.Element;
|
|
@@ -4,15 +4,20 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { usePathname } from 'next/navigation';
|
|
6
6
|
import { RefreshCcw } from 'lucide-react';
|
|
7
|
-
import { cn } from
|
|
7
|
+
import { cn } from "../../shared/cn.js";
|
|
8
|
+
import { REVALIDATE_PATH } from "../../shared/revalidate-path.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export default function RefreshPage() {
|
|
10
|
-
const $ = _c(
|
|
10
|
+
export default function RefreshPage(t0) {
|
|
11
|
+
const $ = _c(19);
|
|
12
|
+
const {
|
|
13
|
+
label: t1
|
|
14
|
+
} = t0;
|
|
15
|
+
const label = t1 === undefined ? "Refresh" : t1;
|
|
11
16
|
const pathname = usePathname();
|
|
12
17
|
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
13
|
-
let
|
|
18
|
+
let t2;
|
|
14
19
|
if ($[0] !== isRefreshing || $[1] !== pathname) {
|
|
15
|
-
|
|
20
|
+
t2 = async function refreshPage() {
|
|
16
21
|
if (isRefreshing) {
|
|
17
22
|
return;
|
|
18
23
|
}
|
|
@@ -21,7 +26,7 @@ export default function RefreshPage() {
|
|
|
21
26
|
setIsRefreshing(true);
|
|
22
27
|
;
|
|
23
28
|
try {
|
|
24
|
-
const response = await fetch(
|
|
29
|
+
const response = await fetch(REVALIDATE_PATH, {
|
|
25
30
|
method: "POST",
|
|
26
31
|
headers: {
|
|
27
32
|
"Content-Type": "application/json"
|
|
@@ -37,8 +42,8 @@ export default function RefreshPage() {
|
|
|
37
42
|
success = true;
|
|
38
43
|
location.reload();
|
|
39
44
|
}
|
|
40
|
-
} catch (
|
|
41
|
-
const err =
|
|
45
|
+
} catch (t3) {
|
|
46
|
+
const err = t3;
|
|
42
47
|
console.error(err);
|
|
43
48
|
error = err instanceof Error ? err.message : "Unknown error occurred";
|
|
44
49
|
setIsRefreshing(false);
|
|
@@ -50,77 +55,79 @@ export default function RefreshPage() {
|
|
|
50
55
|
};
|
|
51
56
|
$[0] = isRefreshing;
|
|
52
57
|
$[1] = pathname;
|
|
53
|
-
$[2] =
|
|
58
|
+
$[2] = t2;
|
|
54
59
|
} else {
|
|
55
|
-
|
|
60
|
+
t2 = $[2];
|
|
56
61
|
}
|
|
57
|
-
const refreshPage =
|
|
58
|
-
let
|
|
62
|
+
const refreshPage = t2;
|
|
63
|
+
let t3;
|
|
59
64
|
if ($[3] !== refreshPage) {
|
|
60
|
-
|
|
65
|
+
t3 = async () => await refreshPage();
|
|
61
66
|
$[3] = refreshPage;
|
|
62
|
-
$[4] =
|
|
67
|
+
$[4] = t3;
|
|
63
68
|
} else {
|
|
64
|
-
|
|
69
|
+
t3 = $[4];
|
|
65
70
|
}
|
|
66
|
-
const
|
|
67
|
-
let
|
|
68
|
-
if ($[5] !== isRefreshing || $[6] !==
|
|
69
|
-
|
|
70
|
-
"nh:cursor-pointer":
|
|
71
|
+
const t4 = !isRefreshing;
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[5] !== isRefreshing || $[6] !== t4) {
|
|
74
|
+
t5 = cn("nh:flex nh:h-8 nh:w-8 nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)", {
|
|
75
|
+
"nh:cursor-pointer": t4,
|
|
71
76
|
"nh:cursor-wait": isRefreshing
|
|
72
77
|
});
|
|
73
78
|
$[5] = isRefreshing;
|
|
74
|
-
$[6] =
|
|
75
|
-
$[7] =
|
|
79
|
+
$[6] = t4;
|
|
80
|
+
$[7] = t5;
|
|
76
81
|
} else {
|
|
77
|
-
|
|
82
|
+
t5 = $[7];
|
|
78
83
|
}
|
|
79
|
-
let
|
|
80
|
-
if ($[8]
|
|
81
|
-
|
|
84
|
+
let t6;
|
|
85
|
+
if ($[8] !== label) {
|
|
86
|
+
t6 = /*#__PURE__*/_jsx("span", {
|
|
82
87
|
className: "nh:sr-only",
|
|
83
|
-
children:
|
|
88
|
+
children: label
|
|
84
89
|
});
|
|
85
|
-
$[8] =
|
|
90
|
+
$[8] = label;
|
|
91
|
+
$[9] = t6;
|
|
86
92
|
} else {
|
|
87
|
-
|
|
93
|
+
t6 = $[9];
|
|
88
94
|
}
|
|
89
|
-
let
|
|
90
|
-
if ($[
|
|
91
|
-
|
|
95
|
+
let t7;
|
|
96
|
+
if ($[10] !== isRefreshing) {
|
|
97
|
+
t7 = cn("nh:h-5 nh:w-5", {
|
|
92
98
|
"nh:[animation:spin_1s_linear_infinite_reverse]": isRefreshing
|
|
93
99
|
});
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
100
|
+
$[10] = isRefreshing;
|
|
101
|
+
$[11] = t7;
|
|
96
102
|
} else {
|
|
97
|
-
|
|
103
|
+
t7 = $[11];
|
|
98
104
|
}
|
|
99
|
-
let
|
|
100
|
-
if ($[
|
|
101
|
-
|
|
102
|
-
className:
|
|
105
|
+
let t8;
|
|
106
|
+
if ($[12] !== t7) {
|
|
107
|
+
t8 = /*#__PURE__*/_jsx(RefreshCcw, {
|
|
108
|
+
className: t7
|
|
103
109
|
});
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
110
|
+
$[12] = t7;
|
|
111
|
+
$[13] = t8;
|
|
106
112
|
} else {
|
|
107
|
-
|
|
113
|
+
t8 = $[13];
|
|
108
114
|
}
|
|
109
|
-
let
|
|
110
|
-
if ($[
|
|
111
|
-
|
|
115
|
+
let t9;
|
|
116
|
+
if ($[14] !== t3 || $[15] !== t5 || $[16] !== t6 || $[17] !== t8) {
|
|
117
|
+
t9 = /*#__PURE__*/_jsxs("button", {
|
|
112
118
|
type: "button",
|
|
113
|
-
onClick:
|
|
114
|
-
className:
|
|
115
|
-
children: [
|
|
119
|
+
onClick: t3,
|
|
120
|
+
className: t5,
|
|
121
|
+
children: [t6, t8]
|
|
116
122
|
});
|
|
117
|
-
$[13] = t1;
|
|
118
123
|
$[14] = t3;
|
|
119
|
-
$[15] =
|
|
120
|
-
$[16] =
|
|
124
|
+
$[15] = t5;
|
|
125
|
+
$[16] = t6;
|
|
126
|
+
$[17] = t8;
|
|
127
|
+
$[18] = t9;
|
|
121
128
|
} else {
|
|
122
|
-
|
|
129
|
+
t9 = $[18];
|
|
123
130
|
}
|
|
124
|
-
return
|
|
131
|
+
return t9;
|
|
125
132
|
}
|
|
126
133
|
//# sourceMappingURL=refresh-page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-page.js","names":["c","_c","useState","usePathname","RefreshCcw","cn","jsx","_jsx","jsxs","_jsxs","RefreshPage","$","pathname","isRefreshing","setIsRefreshing","
|
|
1
|
+
{"version":3,"file":"refresh-page.js","names":["c","_c","useState","usePathname","RefreshCcw","cn","REVALIDATE_PATH","jsx","_jsx","jsxs","_jsxs","RefreshPage","t0","$","label","t1","undefined","pathname","isRefreshing","setIsRefreshing","t2","refreshPage","success","error","response","fetch","method","headers","body","JSON","stringify","path","ok","location","reload","t3","err","console","Error","message","t4","t5","t6","className","children","t7","t8","t9","type","onClick"],"sources":["../../../src/smart-actions/internal/refresh-page.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { usePathname } from 'next/navigation';\nimport { RefreshCcw } from 'lucide-react';\n\nimport { cn } from '../../shared/cn.ts';\nimport { REVALIDATE_PATH } from '../../shared/revalidate-path.ts';\n\nexport default function RefreshPage({ label = 'Refresh' }: { label?: string }) {\n const pathname = usePathname();\n const [isRefreshing, setIsRefreshing] = useState(false);\n\n async function refreshPage() {\n if (isRefreshing) return;\n\n let success = false;\n let error = null;\n\n setIsRefreshing(true);\n\n try {\n const response = await fetch(REVALIDATE_PATH, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ path: pathname }),\n });\n\n if (!response.ok) {\n error = 'Error revalidating the page';\n setIsRefreshing(false);\n } else {\n success = true;\n location.reload();\n }\n } catch (err) {\n console.error(err);\n error = err instanceof Error ? err.message : 'Unknown error occurred';\n setIsRefreshing(false);\n }\n\n return { success, error };\n }\n\n return (\n <button\n type=\"button\"\n onClick={async () => await refreshPage()}\n className={cn(\n 'nh:flex nh:h-8 nh:w-8 nh:items-center nh:justify-center nh:rounded-full nh:text-(--nh-primary-fg) nh:transition-colors nh:hover:bg-(--nh-toolbar-bg)',\n { 'nh:cursor-pointer': !isRefreshing, 'nh:cursor-wait': isRefreshing }\n )}\n >\n <span className=\"nh:sr-only\">{label}</span>\n <RefreshCcw\n className={cn('nh:h-5 nh:w-5', {\n 'nh:[animation:spin_1s_linear_infinite_reverse]': isRefreshing,\n })}\n />\n </button>\n );\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NodeHiveClient } from 'nodehive-js';
|
|
2
|
-
import type { SmartActionsDictionaryOverrides, SmartActionsLabels } from './i18n';
|
|
3
|
-
import type
|
|
2
|
+
import type { SmartActionsDictionaryOverrides, SmartActionsLabels } from './i18n.js';
|
|
3
|
+
import { type SmartActionsBuilder } from './smart-actions-config.js';
|
|
4
|
+
import type { SmartActionsToolbarAction } from './toolbar/types.js';
|
|
4
5
|
interface SmartActionsButtonProps {
|
|
5
6
|
lang: string;
|
|
6
7
|
nodeId?: number;
|
|
@@ -14,11 +15,28 @@ interface SmartActionsButtonProps {
|
|
|
14
15
|
logout: () => Promise<void>;
|
|
15
16
|
/** Per-section label overrides merged over the resolved dictionary. */
|
|
16
17
|
dictionaryOverrides?: SmartActionsDictionaryOverrides;
|
|
18
|
+
/** Account link target; null omits the profile action. Defaults to /{lang}/nodehive/account. */
|
|
19
|
+
accountHref?: string | null;
|
|
17
20
|
extraActions?: (context: {
|
|
18
21
|
lang: string;
|
|
19
22
|
labels: SmartActionsLabels;
|
|
23
|
+
/** Resolved editor UI locale (Drupal user preference, falls back to lang). */
|
|
24
|
+
editorLocale: string;
|
|
20
25
|
}) => SmartActionsToolbarAction[];
|
|
26
|
+
/**
|
|
27
|
+
* Reorders/filters the built-in actions (same pattern as PuckWrapper's
|
|
28
|
+
* plugins callback). Receives the default action list (profile, injected
|
|
29
|
+
* extras, backend edit, refresh, logout) and returns the final list.
|
|
30
|
+
*/
|
|
31
|
+
actions?: SmartActionsBuilder;
|
|
21
32
|
}
|
|
22
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Server entry point for the floating editor toolbar. Renders only for a
|
|
35
|
+
* signed-in session (via `<SignedIn>`).
|
|
36
|
+
*
|
|
37
|
+
* Dynamic RSC (reads `cookies()` via the session gate); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the smart-actions README.
|
|
38
|
+
*
|
|
39
|
+
* Requires the `motion` peer (toolbar animation); see the module README.
|
|
40
|
+
*/
|
|
41
|
+
export default function SmartActionsButton({ lang, nodeId, drupalBaseUrl, launcherIconSrc, createUserClient, logout, dictionaryOverrides, accountHref, extraActions, actions, }: SmartActionsButtonProps): Promise<import("react").JSX.Element>;
|
|
23
42
|
export {};
|
|
24
|
-
//# sourceMappingURL=smart-actions-button.d.ts.map
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { SignedIn } from
|
|
2
|
-
import { getSmartActionsContext } from
|
|
3
|
-
import
|
|
1
|
+
import { SignedIn } from "../../auth/server.js";
|
|
2
|
+
import { getSmartActionsContext } from "./get-smart-actions-context.js";
|
|
3
|
+
import { getSmartActionsConfig } from "./smart-actions-config.js";
|
|
4
|
+
import SmartActionsToolbarClient from "./smart-actions-toolbar-client.js";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Server entry point for the floating editor toolbar. Renders only for a
|
|
8
|
+
* signed-in session (via `<SignedIn>`).
|
|
9
|
+
*
|
|
10
|
+
* Dynamic RSC (reads `cookies()` via the session gate); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the smart-actions README.
|
|
11
|
+
*
|
|
12
|
+
* Requires the `motion` peer (toolbar animation); see the module README.
|
|
13
|
+
*/
|
|
5
14
|
export default async function SmartActionsButton({
|
|
6
15
|
lang,
|
|
7
16
|
nodeId,
|
|
@@ -10,10 +19,13 @@ export default async function SmartActionsButton({
|
|
|
10
19
|
createUserClient,
|
|
11
20
|
logout,
|
|
12
21
|
dictionaryOverrides,
|
|
13
|
-
|
|
22
|
+
accountHref,
|
|
23
|
+
extraActions,
|
|
24
|
+
actions
|
|
14
25
|
}) {
|
|
15
26
|
const {
|
|
16
27
|
labels,
|
|
28
|
+
editorLocale,
|
|
17
29
|
userImageUrl,
|
|
18
30
|
backendEditUrl
|
|
19
31
|
} = await getSmartActionsContext({
|
|
@@ -23,18 +35,29 @@ export default async function SmartActionsButton({
|
|
|
23
35
|
drupalBaseUrl,
|
|
24
36
|
dictionaryOverrides
|
|
25
37
|
});
|
|
38
|
+
const toolbarActions = getSmartActionsConfig({
|
|
39
|
+
lang,
|
|
40
|
+
backendEditUrl,
|
|
41
|
+
userImageUrl,
|
|
42
|
+
labels,
|
|
43
|
+
logout,
|
|
44
|
+
accountHref,
|
|
45
|
+
extraActions: extraActions?.({
|
|
46
|
+
lang,
|
|
47
|
+
labels,
|
|
48
|
+
editorLocale
|
|
49
|
+
}),
|
|
50
|
+
buildActions: actions
|
|
51
|
+
});
|
|
26
52
|
return /*#__PURE__*/_jsx(SignedIn, {
|
|
27
53
|
children: /*#__PURE__*/_jsx(SmartActionsToolbarClient, {
|
|
28
|
-
lang: lang,
|
|
29
54
|
launcherIconSrc: launcherIconSrc,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
labels
|
|
37
|
-
})
|
|
55
|
+
actions: toolbarActions,
|
|
56
|
+
labels: {
|
|
57
|
+
collapse: labels.collapse,
|
|
58
|
+
launcherAction: labels.launcherAction,
|
|
59
|
+
toolbarActions: labels.toolbarActions
|
|
60
|
+
}
|
|
38
61
|
})
|
|
39
62
|
});
|
|
40
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-actions-button.js","names":["SignedIn","getSmartActionsContext","SmartActionsToolbarClient","jsx","_jsx","SmartActionsButton","lang","nodeId","drupalBaseUrl","launcherIconSrc","createUserClient","logout","dictionaryOverrides","extraActions","labels","userImageUrl","backendEditUrl","children"],"sources":["../../../src/smart-actions/internal/smart-actions-button.tsx"],"sourcesContent":["import type { NodeHiveClient } from 'nodehive-js';\n\nimport { SignedIn } from '../../auth/server';\nimport { getSmartActionsContext } from './get-smart-actions-context';\nimport type {\n SmartActionsDictionaryOverrides,\n SmartActionsLabels,\n} from './i18n';\nimport SmartActionsToolbarClient from './smart-actions-toolbar-client';\nimport type { SmartActionsToolbarAction } from './toolbar/types';\n\ninterface SmartActionsButtonProps {\n lang: string;\n nodeId?: number;\n /** Drupal base URL for the backend edit deep link. */\n drupalBaseUrl?: string;\n /** Toolbar launcher icon; defaults to /metadata/nodehive-icon.svg from the project public folder. */\n launcherIconSrc?: string;\n /** Project client factory, e.g. createUserClient from the auth binding. */\n createUserClient: () => NodeHiveClient;\n /** Project logout Server Action (Server Action so Next's CSRF applies). */\n logout: () => Promise<void>;\n /** Per-section label overrides merged over the resolved dictionary. */\n dictionaryOverrides?: SmartActionsDictionaryOverrides;\n extraActions?: (context: {\n lang: string;\n labels: SmartActionsLabels;\n }) => SmartActionsToolbarAction[];\n}\n\nexport default async function SmartActionsButton({\n lang,\n nodeId,\n drupalBaseUrl,\n launcherIconSrc,\n createUserClient,\n logout,\n dictionaryOverrides,\n extraActions,\n}: SmartActionsButtonProps) {\n const { labels, userImageUrl, backendEditUrl }
|
|
1
|
+
{"version":3,"file":"smart-actions-button.js","names":["SignedIn","getSmartActionsContext","getSmartActionsConfig","SmartActionsToolbarClient","jsx","_jsx","SmartActionsButton","lang","nodeId","drupalBaseUrl","launcherIconSrc","createUserClient","logout","dictionaryOverrides","accountHref","extraActions","actions","labels","editorLocale","userImageUrl","backendEditUrl","toolbarActions","buildActions","children","collapse","launcherAction"],"sources":["../../../src/smart-actions/internal/smart-actions-button.tsx"],"sourcesContent":["import type { NodeHiveClient } from 'nodehive-js';\n\nimport { SignedIn } from '../../auth/server.ts';\nimport { getSmartActionsContext } from './get-smart-actions-context.ts';\nimport type {\n SmartActionsDictionaryOverrides,\n SmartActionsLabels,\n} from './i18n.ts';\nimport {\n getSmartActionsConfig,\n type SmartActionsBuilder,\n} from './smart-actions-config.tsx';\nimport SmartActionsToolbarClient from './smart-actions-toolbar-client.tsx';\nimport type { SmartActionsToolbarAction } from './toolbar/types.ts';\n\ninterface SmartActionsButtonProps {\n lang: string;\n nodeId?: number;\n /** Drupal base URL for the backend edit deep link. */\n drupalBaseUrl?: string;\n /** Toolbar launcher icon; defaults to /metadata/nodehive-icon.svg from the project public folder. */\n launcherIconSrc?: string;\n /** Project client factory, e.g. createUserClient from the auth binding. */\n createUserClient: () => NodeHiveClient;\n /** Project logout Server Action (Server Action so Next's CSRF applies). */\n logout: () => Promise<void>;\n /** Per-section label overrides merged over the resolved dictionary. */\n dictionaryOverrides?: SmartActionsDictionaryOverrides;\n /** Account link target; null omits the profile action. Defaults to /{lang}/nodehive/account. */\n accountHref?: string | null;\n extraActions?: (context: {\n lang: string;\n labels: SmartActionsLabels;\n /** Resolved editor UI locale (Drupal user preference, falls back to lang). */\n editorLocale: string;\n }) => SmartActionsToolbarAction[];\n /**\n * Reorders/filters the built-in actions (same pattern as PuckWrapper's\n * plugins callback). Receives the default action list (profile, injected\n * extras, backend edit, refresh, logout) and returns the final list.\n */\n actions?: SmartActionsBuilder;\n}\n\n/**\n * Server entry point for the floating editor toolbar. Renders only for a\n * signed-in session (via `<SignedIn>`).\n *\n * Dynamic RSC (reads `cookies()` via the session gate); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the smart-actions README.\n *\n * Requires the `motion` peer (toolbar animation); see the module README.\n */\nexport default async function SmartActionsButton({\n lang,\n nodeId,\n drupalBaseUrl,\n launcherIconSrc,\n createUserClient,\n logout,\n dictionaryOverrides,\n accountHref,\n extraActions,\n actions,\n}: SmartActionsButtonProps) {\n const { labels, editorLocale, userImageUrl, backendEditUrl } =\n await getSmartActionsContext({\n createUserClient,\n lang,\n nodeId,\n drupalBaseUrl,\n dictionaryOverrides,\n });\n const toolbarActions = getSmartActionsConfig({\n lang,\n backendEditUrl,\n userImageUrl,\n labels,\n logout,\n accountHref,\n extraActions: extraActions?.({ lang, labels, editorLocale }),\n buildActions: actions,\n });\n return (\n <SignedIn>\n <SmartActionsToolbarClient\n launcherIconSrc={launcherIconSrc}\n actions={toolbarActions}\n labels={{\n collapse: labels.collapse,\n launcherAction: labels.launcherAction,\n toolbarActions: labels.toolbarActions,\n }}\n />\n </SignedIn>\n );\n}\n"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,sBAAsB;AAC/C,SAASC,sBAAsB,QAAQ,gCAAgC;AAKvE,SACEC,qBAAqB,QAEhB,2BAA4B;AACnC,OAAOC,yBAAyB,MAAM,mCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAeC,kBAAkBA,CAAC;EAC/CC,IAAI;EACJC,MAAM;EACNC,aAAa;EACbC,eAAe;EACfC,gBAAgB;EAChBC,MAAM;EACNC,mBAAmB;EACnBC,WAAW;EACXC,YAAY;EACZC;AACuB,CAAC,EAAE;EAC1B,MAAM;IAAEC,MAAM;IAAEC,YAAY;IAAEC,YAAY;IAAEC;EAAe,CAAC,GAC1D,MAAMnB,sBAAsB,CAAC;IAC3BU,gBAAgB;IAChBJ,IAAI;IACJC,MAAM;IACNC,aAAa;IACbI;EACF,CAAC,CAAC;EACJ,MAAMQ,cAAc,GAAGnB,qBAAqB,CAAC;IAC3CK,IAAI;IACJa,cAAc;IACdD,YAAY;IACZF,MAAM;IACNL,MAAM;IACNE,WAAW;IACXC,YAAY,EAAEA,YAAY,GAAG;MAAER,IAAI;MAAEU,MAAM;MAAEC;IAAa,CAAC,CAAC;IAC5DI,YAAY,EAAEN;EAChB,CAAC,CAAC;EACF,oBACEX,IAAA,CAACL,QAAQ;IAAAuB,QAAA,eACPlB,IAAA,CAACF,yBAAyB;MACxBO,eAAe,EAAEA,eAAgB;MACjCM,OAAO,EAAEK,cAAe;MACxBJ,MAAM,EAAE;QACNO,QAAQ,EAAEP,MAAM,CAACO,QAAQ;QACzBC,cAAc,EAAER,MAAM,CAACQ,cAAc;QACrCJ,cAAc,EAAEJ,MAAM,CAACI;MACzB;IAAE,CACH;EAAC,CACM,CAAC;AAEf","ignoreList":[]}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import type { SmartActionsLabels } from './i18n';
|
|
2
|
-
import type { SmartActionsToolbarAction } from './toolbar/types';
|
|
1
|
+
import type { SmartActionsLabels } from './i18n.js';
|
|
2
|
+
import type { SmartActionsToolbarAction } from './toolbar/types.js';
|
|
3
|
+
export type SmartActionsBuilderContext = {
|
|
4
|
+
lang: string;
|
|
5
|
+
labels: SmartActionsLabels;
|
|
6
|
+
};
|
|
7
|
+
export type SmartActionsBuilder = (defaults: SmartActionsToolbarAction[], context: SmartActionsBuilderContext) => SmartActionsToolbarAction[];
|
|
3
8
|
type SmartActionsConfigContext = {
|
|
4
9
|
lang: string;
|
|
5
10
|
backendEditUrl: string | null;
|
|
6
11
|
userImageUrl?: string | null;
|
|
7
12
|
labels: SmartActionsLabels;
|
|
8
13
|
logout: () => Promise<void>;
|
|
14
|
+
/** Account link target; null omits the profile action. Defaults to /{lang}/nodehive/account. */
|
|
15
|
+
accountHref?: string | null;
|
|
9
16
|
extraActions?: SmartActionsToolbarAction[];
|
|
17
|
+
/** Reorders/filters the default actions (profile, extras, backend edit, refresh, logout). */
|
|
18
|
+
buildActions?: SmartActionsBuilder;
|
|
10
19
|
};
|
|
11
|
-
export declare function getSmartActionsConfig({ lang, backendEditUrl, userImageUrl, labels, logout, extraActions, }: SmartActionsConfigContext): SmartActionsToolbarAction[];
|
|
20
|
+
export declare function getSmartActionsConfig({ lang, backendEditUrl, userImageUrl, labels, logout, accountHref, extraActions, buildActions, }: SmartActionsConfigContext): SmartActionsToolbarAction[];
|
|
12
21
|
export {};
|
|
13
|
-
//# sourceMappingURL=smart-actions-config.d.ts.map
|