@nodehive/nextjs 0.1.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/LICENSE +21 -0
- package/README.md +102 -0
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +7 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/internal/config.d.ts +24 -0
- package/dist/auth/internal/config.d.ts.map +1 -0
- package/dist/auth/internal/config.js +2 -0
- package/dist/auth/internal/config.js.map +1 -0
- package/dist/auth/internal/draft-mode.d.ts +17 -0
- package/dist/auth/internal/draft-mode.d.ts.map +1 -0
- package/dist/auth/internal/draft-mode.js +73 -0
- package/dist/auth/internal/draft-mode.js.map +1 -0
- package/dist/auth/internal/editor-locale.d.ts +4 -0
- package/dist/auth/internal/editor-locale.d.ts.map +1 -0
- package/dist/auth/internal/editor-locale.js +14 -0
- package/dist/auth/internal/editor-locale.js.map +1 -0
- package/dist/auth/internal/handoff.d.ts +11 -0
- package/dist/auth/internal/handoff.d.ts.map +1 -0
- package/dist/auth/internal/handoff.js +44 -0
- package/dist/auth/internal/handoff.js.map +1 -0
- package/dist/auth/internal/has-session.d.ts +7 -0
- package/dist/auth/internal/has-session.d.ts.map +1 -0
- package/dist/auth/internal/has-session.js +11 -0
- package/dist/auth/internal/has-session.js.map +1 -0
- package/dist/auth/internal/logout.d.ts +12 -0
- package/dist/auth/internal/logout.d.ts.map +1 -0
- package/dist/auth/internal/logout.js +48 -0
- package/dist/auth/internal/logout.js.map +1 -0
- package/dist/auth/internal/next-cookie-storage.d.ts +28 -0
- package/dist/auth/internal/next-cookie-storage.d.ts.map +1 -0
- package/dist/auth/internal/next-cookie-storage.js +103 -0
- package/dist/auth/internal/next-cookie-storage.js.map +1 -0
- package/dist/auth/internal/nodehive-client.d.ts +6 -0
- package/dist/auth/internal/nodehive-client.d.ts.map +1 -0
- package/dist/auth/internal/nodehive-client.js +64 -0
- package/dist/auth/internal/nodehive-client.js.map +1 -0
- package/dist/auth/internal/oauth-config.d.ts +37 -0
- package/dist/auth/internal/oauth-config.d.ts.map +1 -0
- package/dist/auth/internal/oauth-config.js +70 -0
- package/dist/auth/internal/oauth-config.js.map +1 -0
- package/dist/auth/internal/proxy-helpers.d.ts +15 -0
- package/dist/auth/internal/proxy-helpers.d.ts.map +1 -0
- package/dist/auth/internal/proxy-helpers.js +43 -0
- package/dist/auth/internal/proxy-helpers.js.map +1 -0
- package/dist/auth/internal/refresh.d.ts +13 -0
- package/dist/auth/internal/refresh.d.ts.map +1 -0
- package/dist/auth/internal/refresh.js +170 -0
- package/dist/auth/internal/refresh.js.map +1 -0
- package/dist/auth/internal/require-auth.d.ts +2 -0
- package/dist/auth/internal/require-auth.d.ts.map +1 -0
- package/dist/auth/internal/require-auth.js +11 -0
- package/dist/auth/internal/require-auth.js.map +1 -0
- package/dist/auth/internal/return-to.d.ts +16 -0
- package/dist/auth/internal/return-to.d.ts.map +1 -0
- package/dist/auth/internal/return-to.js +31 -0
- package/dist/auth/internal/return-to.js.map +1 -0
- package/dist/auth/internal/routes/callback.d.ts +11 -0
- package/dist/auth/internal/routes/callback.d.ts.map +1 -0
- package/dist/auth/internal/routes/callback.js +93 -0
- package/dist/auth/internal/routes/callback.js.map +1 -0
- package/dist/auth/internal/routes/chips-exchange.d.ts +4 -0
- package/dist/auth/internal/routes/chips-exchange.d.ts.map +1 -0
- package/dist/auth/internal/routes/chips-exchange.js +64 -0
- package/dist/auth/internal/routes/chips-exchange.js.map +1 -0
- package/dist/auth/internal/routes/draft.d.ts +4 -0
- package/dist/auth/internal/routes/draft.d.ts.map +1 -0
- package/dist/auth/internal/routes/draft.js +34 -0
- package/dist/auth/internal/routes/draft.js.map +1 -0
- package/dist/auth/internal/routes/index.d.ts +25 -0
- package/dist/auth/internal/routes/index.d.ts.map +1 -0
- package/dist/auth/internal/routes/index.js +66 -0
- package/dist/auth/internal/routes/index.js.map +1 -0
- package/dist/auth/internal/routes/login.d.ts +3 -0
- package/dist/auth/internal/routes/login.d.ts.map +1 -0
- package/dist/auth/internal/routes/login.js +47 -0
- package/dist/auth/internal/routes/login.js.map +1 -0
- package/dist/auth/internal/routes/popup-done.d.ts +3 -0
- package/dist/auth/internal/routes/popup-done.d.ts.map +1 -0
- package/dist/auth/internal/routes/popup-done.js +24 -0
- package/dist/auth/internal/routes/popup-done.js.map +1 -0
- package/dist/auth/internal/routes/refresh.d.ts +6 -0
- package/dist/auth/internal/routes/refresh.d.ts.map +1 -0
- package/dist/auth/internal/routes/refresh.js +44 -0
- package/dist/auth/internal/routes/refresh.js.map +1 -0
- package/dist/auth/internal/same-origin.d.ts +8 -0
- package/dist/auth/internal/same-origin.d.ts.map +1 -0
- package/dist/auth/internal/same-origin.js +9 -0
- package/dist/auth/internal/same-origin.js.map +1 -0
- package/dist/auth/internal/session-gates.d.ts +7 -0
- package/dist/auth/internal/session-gates.d.ts.map +1 -0
- package/dist/auth/internal/session-gates.js +12 -0
- package/dist/auth/internal/session-gates.js.map +1 -0
- package/dist/auth/internal/update-session.d.ts +17 -0
- package/dist/auth/internal/update-session.d.ts.map +1 -0
- package/dist/auth/internal/update-session.js +39 -0
- package/dist/auth/internal/update-session.js.map +1 -0
- package/dist/auth/internal/use-editor-login.d.ts +33 -0
- package/dist/auth/internal/use-editor-login.d.ts.map +1 -0
- package/dist/auth/internal/use-editor-login.js +143 -0
- package/dist/auth/internal/use-editor-login.js.map +1 -0
- package/dist/auth/proxy.d.ts +8 -0
- package/dist/auth/proxy.d.ts.map +1 -0
- package/dist/auth/proxy.js +8 -0
- package/dist/auth/proxy.js.map +1 -0
- package/dist/auth/react.d.ts +2 -0
- package/dist/auth/react.d.ts.map +1 -0
- package/dist/auth/react.js +3 -0
- package/dist/auth/react.js.map +1 -0
- package/dist/auth/routes.d.ts +3 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +3 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/auth/server.d.ts +23 -0
- package/dist/auth/server.d.ts.map +1 -0
- package/dist/auth/server.js +61 -0
- package/dist/auth/server.js.map +1 -0
- package/dist/puck-editor/fields.d.ts +7 -0
- package/dist/puck-editor/fields.d.ts.map +1 -0
- package/dist/puck-editor/fields.js +4 -0
- package/dist/puck-editor/fields.js.map +1 -0
- package/dist/puck-editor/index.d.ts +14 -0
- package/dist/puck-editor/index.d.ts.map +1 -0
- package/dist/puck-editor/index.js +12 -0
- package/dist/puck-editor/index.js.map +1 -0
- package/dist/puck-editor/internal/api/client.d.ts +32 -0
- package/dist/puck-editor/internal/api/client.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/client.js +128 -0
- package/dist/puck-editor/internal/api/client.js.map +1 -0
- package/dist/puck-editor/internal/api/config.d.ts +29 -0
- package/dist/puck-editor/internal/api/config.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/config.js +2 -0
- package/dist/puck-editor/internal/api/config.js.map +1 -0
- package/dist/puck-editor/internal/api/create-puck-api.d.ts +26 -0
- package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/create-puck-api.js +124 -0
- package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts +13 -0
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/create-page.js +125 -0
- package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/entities.d.ts +17 -0
- package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/entities.js +166 -0
- package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/publish.d.ts +6 -0
- package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/publish.js +115 -0
- package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/template.d.ts +15 -0
- package/dist/puck-editor/internal/api/handlers/template.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/template.js +222 -0
- package/dist/puck-editor/internal/api/handlers/template.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/upload.d.ts +13 -0
- package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/upload.js +129 -0
- package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -0
- package/dist/puck-editor/internal/api/media-params.d.ts +4 -0
- package/dist/puck-editor/internal/api/media-params.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/media-params.js +38 -0
- package/dist/puck-editor/internal/api/media-params.js.map +1 -0
- package/dist/puck-editor/internal/api/media-upload.d.ts +24 -0
- package/dist/puck-editor/internal/api/media-upload.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/media-upload.js +171 -0
- package/dist/puck-editor/internal/api/media-upload.js.map +1 -0
- package/dist/puck-editor/internal/api/space.d.ts +4 -0
- package/dist/puck-editor/internal/api/space.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/space.js +11 -0
- package/dist/puck-editor/internal/api/space.js.map +1 -0
- package/dist/puck-editor/internal/content-model.d.ts +55 -0
- package/dist/puck-editor/internal/content-model.d.ts.map +1 -0
- package/dist/puck-editor/internal/content-model.js +73 -0
- package/dist/puck-editor/internal/content-model.js.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts +4 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.js +6 -0
- package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +9 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.js +231 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +6 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.js +85 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +2 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.js +844 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +3 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.js +16 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.js.map +1 -0
- package/dist/puck-editor/internal/editor/component-icons.d.ts +14 -0
- package/dist/puck-editor/internal/editor/component-icons.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/component-icons.js +35 -0
- package/dist/puck-editor/internal/editor/component-icons.js.map +1 -0
- package/dist/puck-editor/internal/editor/component-item.d.ts +6 -0
- package/dist/puck-editor/internal/editor/component-item.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/component-item.js +42 -0
- package/dist/puck-editor/internal/editor/component-item.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +6 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.js +249 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +7 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.js +120 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +15 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.js +61 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.js.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +15 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +147 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +17 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.js +125 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -0
- package/dist/puck-editor/internal/editor/header-save-button.d.ts +5 -0
- package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/header-save-button.js +60 -0
- package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts +4 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.js +140 -0
- package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +6 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.js +79 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -0
- package/dist/puck-editor/internal/editor/picker-model.d.ts +62 -0
- package/dist/puck-editor/internal/editor/picker-model.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/picker-model.js +489 -0
- package/dist/puck-editor/internal/editor/picker-model.js.map +1 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +30 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.js +30 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -0
- package/dist/puck-editor/internal/editor/puck-editor.d.ts +15 -0
- package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/puck-editor.js +333 -0
- package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts +4 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.js +71 -0
- package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +15 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.js +93 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.js.map +1 -0
- package/dist/puck-editor/internal/editor-config.d.ts +30 -0
- package/dist/puck-editor/internal/editor-config.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor-config.js +57 -0
- package/dist/puck-editor/internal/editor-config.js.map +1 -0
- package/dist/puck-editor/internal/editor-query-client.d.ts +4 -0
- package/dist/puck-editor/internal/editor-query-client.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor-query-client.js +8 -0
- package/dist/puck-editor/internal/editor-query-client.js.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +14 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +120 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +21 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +24 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +16 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +20 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +8 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js +151 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -0
- package/dist/puck-editor/internal/fields/index.d.ts +10 -0
- package/dist/puck-editor/internal/fields/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/index.js +10 -0
- package/dist/puck-editor/internal/fields/index.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +33 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.js +83 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +24 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +31 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +2 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.js +4 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +27 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +564 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +9 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +189 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +72 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.js +114 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +14 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +667 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +11 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.js +34 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +40 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +146 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts +34 -0
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/types.js +2 -0
- package/dist/puck-editor/internal/fields/link-picker/types.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +27 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +32 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +13 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js +372 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +2 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.js +8 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +27 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +32 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +11 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +219 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +24 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.js +8 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +8 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.js +51 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +7 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +147 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +30 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +358 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +14 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +355 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +2 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.js +55 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +24 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +229 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +7 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +120 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +31 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +39 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/required-field-label.d.ts +16 -0
- package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/required-field-label.js +89 -0
- package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -0
- package/dist/puck-editor/internal/fields/required.d.ts +19 -0
- package/dist/puck-editor/internal/fields/required.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/required.js +20 -0
- package/dist/puck-editor/internal/fields/required.js.map +1 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +37 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +26 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -0
- package/dist/puck-editor/internal/i18n.d.ts +188 -0
- package/dist/puck-editor/internal/i18n.d.ts.map +1 -0
- package/dist/puck-editor/internal/i18n.js +414 -0
- package/dist/puck-editor/internal/i18n.js.map +1 -0
- package/dist/puck-editor/internal/locale.d.ts +13 -0
- package/dist/puck-editor/internal/locale.d.ts.map +1 -0
- package/dist/puck-editor/internal/locale.js +20 -0
- package/dist/puck-editor/internal/locale.js.map +1 -0
- package/dist/puck-editor/internal/localize.d.ts +11 -0
- package/dist/puck-editor/internal/localize.d.ts.map +1 -0
- package/dist/puck-editor/internal/localize.js +42 -0
- package/dist/puck-editor/internal/localize.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +21 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +197 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +131 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +20 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js +46 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +46 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +176 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +20 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.js +39 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +5 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.js +3 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +17 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.js +35 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +19 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.js +79 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.js +243 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +19 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +31 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +23 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +72 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +20 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.js +34 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +17 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +70 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +37 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +7 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +18 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +861 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +5 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +16 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +53 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.js +145 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.js.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +69 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +7 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +18 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +6 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +178 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +3 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +55 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +12 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +125 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +8 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +582 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +6 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js +6 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +4 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +54 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +11 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +92 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +7 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +30 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +471 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +5 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +16 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +43 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +115 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +9 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +152 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +16 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +134 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -0
- package/dist/puck-editor/internal/puck-augmentation.d.ts +28 -0
- package/dist/puck-editor/internal/puck-augmentation.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-augmentation.js +7 -0
- package/dist/puck-editor/internal/puck-augmentation.js.map +1 -0
- package/dist/puck-editor/internal/puck-editor-provider.d.ts +12 -0
- package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-editor-provider.js +69 -0
- package/dist/puck-editor/internal/puck-editor-provider.js.map +1 -0
- package/dist/puck-editor/internal/puck-node.d.ts +29 -0
- package/dist/puck-editor/internal/puck-node.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-node.js +2 -0
- package/dist/puck-editor/internal/puck-node.js.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts +19 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.js +270 -0
- package/dist/puck-editor/internal/puck-wrapper.js.map +1 -0
- package/dist/puck-editor/internal/render/cropped-image.d.ts +19 -0
- package/dist/puck-editor/internal/render/cropped-image.d.ts.map +1 -0
- package/dist/puck-editor/internal/render/cropped-image.js +126 -0
- package/dist/puck-editor/internal/render/cropped-image.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts +13 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.js +29 -0
- package/dist/puck-editor/internal/smart-actions/index.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts +13 -0
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +1 -0
- package/dist/puck-editor/internal/smart-actions/new-page.js +80 -0
- package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +2 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +1 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +65 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -0
- package/dist/puck-editor/internal/ui/calendar.d.ts +9 -0
- package/dist/puck-editor/internal/ui/calendar.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/calendar.js +147 -0
- package/dist/puck-editor/internal/ui/calendar.js.map +1 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +13 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.js +93 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.js.map +1 -0
- package/dist/puck-editor/internal/ui/dialog.d.ts +20 -0
- package/dist/puck-editor/internal/ui/dialog.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/dialog.js +286 -0
- package/dist/puck-editor/internal/ui/dialog.js.map +1 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +11 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.js +109 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.js.map +1 -0
- package/dist/puck-editor/internal/ui/icon-button.d.ts +10 -0
- package/dist/puck-editor/internal/ui/icon-button.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/icon-button.js +72 -0
- package/dist/puck-editor/internal/ui/icon-button.js.map +1 -0
- package/dist/puck-editor/internal/ui/popover.d.ts +9 -0
- package/dist/puck-editor/internal/ui/popover.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/popover.js +165 -0
- package/dist/puck-editor/internal/ui/popover.js.map +1 -0
- package/dist/puck-editor/internal/ui/required-mark.d.ts +2 -0
- package/dist/puck-editor/internal/ui/required-mark.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/required-mark.js +12 -0
- package/dist/puck-editor/internal/ui/required-mark.js.map +1 -0
- package/dist/puck-editor/internal/ui/search-control.d.ts +20 -0
- package/dist/puck-editor/internal/ui/search-control.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/search-control.js +156 -0
- package/dist/puck-editor/internal/ui/search-control.js.map +1 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +2 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.js +40 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.js.map +1 -0
- package/dist/puck-editor/internal/use-puck-overlay.d.ts +16 -0
- package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +1 -0
- package/dist/puck-editor/internal/use-puck-overlay.js +121 -0
- package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -0
- package/dist/puck-editor/internal/utils.d.ts +6 -0
- package/dist/puck-editor/internal/utils.d.ts.map +1 -0
- package/dist/puck-editor/internal/utils.js +57 -0
- package/dist/puck-editor/internal/utils.js.map +1 -0
- package/dist/puck-editor/puck-theme.css +110 -0
- package/dist/puck-editor/render.d.ts +3 -0
- package/dist/puck-editor/render.d.ts.map +1 -0
- package/dist/puck-editor/render.js +2 -0
- package/dist/puck-editor/render.js.map +1 -0
- package/dist/puck-editor/server.d.ts +4 -0
- package/dist/puck-editor/server.d.ts.map +1 -0
- package/dist/puck-editor/server.js +4 -0
- package/dist/puck-editor/server.js.map +1 -0
- package/dist/puck-editor/smart-actions.d.ts +2 -0
- package/dist/puck-editor/smart-actions.d.ts.map +1 -0
- package/dist/puck-editor/smart-actions.js +2 -0
- package/dist/puck-editor/smart-actions.js.map +1 -0
- package/dist/shared/cn.d.ts +3 -0
- package/dist/shared/cn.d.ts.map +1 -0
- package/dist/shared/cn.js +9 -0
- package/dist/shared/cn.js.map +1 -0
- package/dist/shared/i18n.d.ts +5 -0
- package/dist/shared/i18n.d.ts.map +1 -0
- package/dist/shared/i18n.js +18 -0
- package/dist/shared/i18n.js.map +1 -0
- package/dist/shared/toolbar-action.d.ts +9 -0
- package/dist/shared/toolbar-action.d.ts.map +1 -0
- package/dist/shared/toolbar-action.js +2 -0
- package/dist/shared/toolbar-action.js.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts +19 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.js +24 -0
- package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -0
- package/dist/smart-actions/internal/i18n.d.ts +20 -0
- package/dist/smart-actions/internal/i18n.d.ts.map +1 -0
- package/dist/smart-actions/internal/i18n.js +35 -0
- package/dist/smart-actions/internal/i18n.js.map +1 -0
- package/dist/smart-actions/internal/logout-form.d.ts +8 -0
- package/dist/smart-actions/internal/logout-form.d.ts.map +1 -0
- package/dist/smart-actions/internal/logout-form.js +88 -0
- package/dist/smart-actions/internal/logout-form.js.map +1 -0
- package/dist/smart-actions/internal/refresh-page.d.ts +2 -0
- package/dist/smart-actions/internal/refresh-page.d.ts.map +1 -0
- package/dist/smart-actions/internal/refresh-page.js +126 -0
- package/dist/smart-actions/internal/refresh-page.js.map +1 -0
- package/dist/smart-actions/internal/smart-actions-button.d.ts +24 -0
- package/dist/smart-actions/internal/smart-actions-button.d.ts.map +1 -0
- package/dist/smart-actions/internal/smart-actions-button.js +41 -0
- package/dist/smart-actions/internal/smart-actions-button.js.map +1 -0
- package/dist/smart-actions/internal/smart-actions-config.d.ts +13 -0
- package/dist/smart-actions/internal/smart-actions-config.d.ts.map +1 -0
- package/dist/smart-actions/internal/smart-actions-config.js +101 -0
- package/dist/smart-actions/internal/smart-actions-config.js.map +1 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +15 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +1 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js +71 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +13 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +323 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/storage.d.ts +7 -0
- package/dist/smart-actions/internal/toolbar/storage.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/storage.js +29 -0
- package/dist/smart-actions/internal/toolbar/storage.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/types.d.ts +4 -0
- package/dist/smart-actions/internal/toolbar/types.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/types.js +2 -0
- package/dist/smart-actions/internal/toolbar/types.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +6 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +43 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -0
- package/dist/smart-actions/internal/ui/tooltip.d.ts +8 -0
- package/dist/smart-actions/internal/ui/tooltip.d.ts.map +1 -0
- package/dist/smart-actions/internal/ui/tooltip.js +156 -0
- package/dist/smart-actions/internal/ui/tooltip.js.map +1 -0
- package/dist/smart-actions/internal/user-profile.d.ts +8 -0
- package/dist/smart-actions/internal/user-profile.d.ts.map +1 -0
- package/dist/smart-actions/internal/user-profile.js +30 -0
- package/dist/smart-actions/internal/user-profile.js.map +1 -0
- package/dist/smart-actions/server.d.ts +4 -0
- package/dist/smart-actions/server.d.ts.map +1 -0
- package/dist/smart-actions/server.js +4 -0
- package/dist/smart-actions/server.js.map +1 -0
- package/dist/theme.css +2 -0
- package/dist/visual-editor/index.d.ts +4 -0
- package/dist/visual-editor/index.d.ts.map +1 -0
- package/dist/visual-editor/index.js +4 -0
- package/dist/visual-editor/index.js.map +1 -0
- package/dist/visual-editor/internal/bridge/connector.d.ts +7 -0
- package/dist/visual-editor/internal/bridge/connector.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/connector.js +72 -0
- package/dist/visual-editor/internal/bridge/connector.js.map +1 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +8 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.js +44 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.js.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +16 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +43 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +15 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js +146 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -0
- package/dist/visual-editor/internal/i18n.d.ts +29 -0
- package/dist/visual-editor/internal/i18n.d.ts.map +1 -0
- package/dist/visual-editor/internal/i18n.js +51 -0
- package/dist/visual-editor/internal/i18n.js.map +1 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +7 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.js +15 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-button.d.ts +10 -0
- package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-button.js +138 -0
- package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts +3 -0
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-icon.js +19 -0
- package/dist/visual-editor/internal/overlays/edit-icon.js.map +1 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +15 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +52 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +6 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js +42 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +9 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +33 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +13 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.js +17 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +8 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js +25 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +18 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +58 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/revalidate-route.d.ts +19 -0
- package/dist/visual-editor/internal/revalidate-route.d.ts.map +1 -0
- package/dist/visual-editor/internal/revalidate-route.js +51 -0
- package/dist/visual-editor/internal/revalidate-route.js.map +1 -0
- package/dist/visual-editor/server.d.ts +7 -0
- package/dist/visual-editor/server.d.ts.map +1 -0
- package/dist/visual-editor/server.js +8 -0
- package/dist/visual-editor/server.js.map +1 -0
- package/package.json +154 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-text-link-button.js","names":["c","_c","useEffect","useLayoutEffect","useRef","useState","arrow","autoUpdate","flip","FloatingPortal","offset","shift","useDismiss","useFloating","useInteractions","RichTextMenu","getMarkRange","posToDOMRect","TextSelection","useEditorState","Link2OffIcon","LinkIcon","usePuckDictionary","LinkPickerControl","resolveLinkTarget","targetOptions","SegmentedControl","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","inferTargetOverride","href","rawTarget","concrete","FLOATING_OFFSET","FLOATING_PADDING","ARROW_PADDING","ARROW_CLASSES","bottom","top","left","right","STATIC_SIDE_BY_PLACEMENT","INPUT_CLASSNAME","ACTION_BUTTON_CLASSNAME","getLinkRange","editor","linkType","state","schema","marks","link","markRange","selection","$from","from","to","getActiveRange","linkRange","empty","getSelectedText","range","doc","textBetween","getLinkFormState","attrs","getAttributes","url","displayText","target","getSelectionReference","rect","view","getBoundingClientRect","contextElement","dom","syncFloatingReference","setPositionReference","update","selectionReference","RichTextLinkButton","t0","$","readOnly","t","linkPicker","tFields","fields","open","setOpen","manualOpen","setManualOpen","setUrl","setDisplayText","setTarget","floatingElement","setFloatingElement","arrowElement","setArrowElement","manualOpenRef","activeLinkRangeRef","displayTextInputRef","t1","Symbol","for","nextOpen","t2","t3","t4","padding","t5","element","t6","t7","onOpenChange","placement","middleware","whileElementsMounted","x","y","refs","floatingStyles","context","middlewareData","t8","escapeKey","outsidePress","dismiss","t9","getFloatingProps","arrowX","arrowY","placementSide","split","staticSide","arrowClassName","t10","t11","setFloating","t12","t13","current","t14","formState","applyFormState","t15","closeEditor","t16","t17","handleSelectionChange","edited","sameRange","on","off","t18","t19","t20","t21","focusTimer","window","setTimeout","focus","select","clearTimeout","t22","selector","_temp","linkState","isActive","canEditLink","hasSelection","t23","Boolean","trim","hasExistingLink","t24","openEditor","t25","range_0","trimmedUrl","nextText","transaction","tr","insertText","nextTo","length","removeMark","resolvedTarget","addMark","create","setSelection","dispatch","scrollIntoView","commands","applyLink","t26","linkType_0","range_1","transaction_0","removeLink","preventEditorBlur","_temp2","t27","className","t28","t29","editLink","addLink","t30","Control","icon","disabled","title","t31","children","style","visibility","htmlFor","displayedText","id","type","onChange","event_0","event","value","onKeyDown","event_1","key","preventDefault","options","variant","ariaLabel","linkTarget","itemProps","onMouseDown","updateLink","t32","editor_0","renderRichTextMenu"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/rich-text-link-button.tsx"],"sourcesContent":["'use client';\n\nimport {\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\nimport {\n arrow,\n autoUpdate,\n flip,\n FloatingPortal,\n offset,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n type VirtualElement,\n} from '@floating-ui/react';\nimport { RichTextMenu } from '@puckeditor/core';\nimport { getMarkRange, posToDOMRect } from '@tiptap/core';\nimport { TextSelection } from '@tiptap/pm/state';\nimport { useEditorState, type Editor } from '@tiptap/react';\nimport { Link2OffIcon, LinkIcon } from 'lucide-react';\n\nimport { usePuckDictionary } from '../../i18n';\nimport LinkPickerControl from './link-picker-control';\nimport {\n resolveLinkTarget,\n targetOptions,\n type LinkTargetOverride,\n} from './link-value';\nimport SegmentedControl from './segmented-control';\n\ntype LinkButtonProps = {\n editor: Editor | null;\n readOnly: boolean;\n};\n\ntype LinkRange = {\n from: number;\n to: number;\n};\n\ntype LinkFormState = {\n url: string;\n displayText: string;\n target: LinkTargetOverride;\n};\n\n/**\n * Derive the target-override toggle from a stored link. The Tiptap mark only\n * persists a concrete target (`_blank` or none), so the override isn't stored:\n * if the concrete target matches what «Automatic» would produce, show Automatic,\n * otherwise show the explicit value. Keeps output HTML free of extra attributes.\n */\nfunction inferTargetOverride(\n href: string,\n rawTarget: string | null\n): LinkTargetOverride {\n const concrete = rawTarget === '_blank' ? '_blank' : '_self';\n return resolveLinkTarget(href, 'auto') === concrete ? 'auto' : concrete;\n}\n\nconst FLOATING_OFFSET = 10;\nconst FLOATING_PADDING = 8;\nconst ARROW_PADDING = 10;\nconst ARROW_CLASSES: Record<string, string> = {\n bottom:\n 'nh:bg-(--nh-bg) nh:border-(--nh-border) nh:absolute h-3 w-3 nh:rotate-45 nh:border-t border-l',\n top: 'nh:bg-(--nh-bg) nh:border-(--nh-border) nh:absolute h-3 w-3 nh:rotate-45 border-r nh:border-b',\n left: 'nh:bg-(--nh-bg) nh:border-(--nh-border) nh:absolute h-3 w-3 nh:rotate-45 nh:border-t border-r',\n right:\n 'nh:bg-(--nh-bg) nh:border-(--nh-border) nh:absolute h-3 w-3 nh:rotate-45 nh:border-b border-l',\n};\nconst STATIC_SIDE_BY_PLACEMENT: Record<\n string,\n 'top' | 'right' | 'bottom' | 'left'\n> = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n};\nconst INPUT_CLASSNAME =\n 'nh:border-(--nh-border) nh:mt-1 nh:w-full nh:rounded-md nh:border nh:px-2.5 nh:py-1.5 nh:text-xs nh:focus:outline-none';\nconst ACTION_BUTTON_CLASSNAME =\n 'nh:rounded-md nh:px-3 nh:py-1.5 nh:text-xs nh:font-medium';\n\nfunction getLinkRange(editor: Editor): LinkRange | null {\n const linkType = editor.state.schema.marks.link;\n\n if (!linkType) {\n return null;\n }\n\n const markRange = getMarkRange(editor.state.selection.$from, linkType);\n\n if (!markRange) {\n return null;\n }\n\n return { from: markRange.from, to: markRange.to };\n}\n\nfunction getActiveRange(editor: Editor): LinkRange | null {\n const linkRange = getLinkRange(editor);\n\n if (linkRange) {\n return linkRange;\n }\n\n const { from, to, empty } = editor.state.selection;\n\n if (empty) {\n return null;\n }\n\n return { from, to };\n}\n\nfunction getSelectedText(editor: Editor, range: LinkRange | null) {\n if (!range) {\n return '';\n }\n\n return editor.state.doc.textBetween(range.from, range.to, ' ');\n}\n\nfunction getLinkFormState(editor: Editor): LinkFormState {\n const range = getActiveRange(editor);\n const attrs = editor.getAttributes('link');\n const href = typeof attrs.href === 'string' ? attrs.href : '';\n\n return {\n url: href,\n displayText: getSelectedText(editor, range),\n target: inferTargetOverride(\n href,\n typeof attrs.target === 'string' ? attrs.target : null\n ),\n };\n}\n\nfunction getSelectionReference(editor: Editor): VirtualElement | null {\n const range = getActiveRange(editor);\n\n if (!range) {\n return null;\n }\n\n const rect = posToDOMRect(editor.view, range.from, range.to);\n\n return {\n getBoundingClientRect: () => rect,\n contextElement: editor.view.dom,\n };\n}\n\nfunction syncFloatingReference(\n editor: Editor | null,\n setPositionReference: (reference: VirtualElement | null) => void,\n update?: () => void\n) {\n if (!editor) {\n return;\n }\n\n const selectionReference = getSelectionReference(editor);\n\n if (selectionReference) {\n setPositionReference(selectionReference);\n update?.();\n }\n}\n\nexport function RichTextLinkButton({ editor, readOnly }: LinkButtonProps) {\n const t = usePuckDictionary().linkPicker;\n const tFields = usePuckDictionary().fields;\n const [open, setOpen] = useState(false);\n const [manualOpen, setManualOpen] = useState(false);\n const [url, setUrl] = useState('');\n const [displayText, setDisplayText] = useState('');\n const [target, setTarget] = useState<LinkTargetOverride>('auto');\n const [floatingElement, setFloatingElement] = useState<HTMLDivElement | null>(\n null\n );\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n\n const manualOpenRef = useRef(false);\n const activeLinkRangeRef = useRef<LinkRange | null>(null);\n const displayTextInputRef = useRef<HTMLInputElement | null>(null);\n\n const {\n x,\n y,\n refs,\n floatingStyles,\n update,\n context,\n middlewareData,\n placement,\n } = useFloating({\n open,\n onOpenChange: (nextOpen) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setManualOpen(false);\n }\n },\n placement: 'bottom',\n middleware: [\n offset(FLOATING_OFFSET),\n flip({ padding: FLOATING_PADDING }),\n shift({ padding: FLOATING_PADDING }),\n arrow({ element: arrowElement, padding: ARROW_PADDING }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context, {\n escapeKey: true,\n outsidePress: true,\n });\n\n const { getFloatingProps } = useInteractions([dismiss]);\n const setPositionReference = refs.setPositionReference;\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const placementSide = placement.split('-')[0];\n const staticSide = STATIC_SIDE_BY_PLACEMENT[placementSide] ?? 'top';\n const arrowClassName =\n ARROW_CLASSES[placementSide] ??\n 'nh:bg-(--nh-bg) nh:border-(--nh-border) nh:absolute h-3 w-3 nh:rotate-45 nh:border-t border-l';\n\n useLayoutEffect(() => {\n refs.setFloating(floatingElement);\n }, [floatingElement, refs]);\n\n useEffect(() => {\n manualOpenRef.current = manualOpen;\n }, [manualOpen]);\n\n const applyFormState = (formState: LinkFormState) => {\n setUrl(formState.url);\n setDisplayText(formState.displayText);\n setTarget(formState.target);\n };\n\n const closeEditor = () => {\n activeLinkRangeRef.current = null;\n setManualOpen(false);\n setOpen(false);\n };\n\n useEffect(() => {\n if (!editor || readOnly) return;\n\n const handleSelectionChange = () => {\n if (manualOpenRef.current) {\n const edited = activeLinkRangeRef.current;\n const range = getActiveRange(editor);\n const sameRange =\n !!edited &&\n !!range &&\n edited.from === range.from &&\n edited.to === range.to;\n if (!sameRange) {\n setManualOpen(false);\n setOpen(false);\n return;\n }\n }\n\n syncFloatingReference(editor, setPositionReference, update);\n };\n\n editor.on('selectionUpdate', handleSelectionChange);\n editor.on('update', handleSelectionChange);\n\n return () => {\n editor.off('selectionUpdate', handleSelectionChange);\n editor.off('update', handleSelectionChange);\n };\n }, [editor, readOnly, setPositionReference, update]);\n\n useLayoutEffect(() => {\n if (!open) return;\n\n syncFloatingReference(editor, setPositionReference, update);\n }, [editor, open, setPositionReference, update]);\n\n useEffect(() => {\n if (!open) return;\n const focusTimer = window.setTimeout(() => {\n displayTextInputRef.current?.focus();\n displayTextInputRef.current?.select();\n }, 0);\n return () => window.clearTimeout(focusTimer);\n }, [open]);\n\n const linkState = useEditorState({\n editor,\n selector: ({ editor }) =>\n editor\n ? {\n isActive: editor.isActive('link'),\n hasSelection: !editor.state.selection.empty,\n }\n : { isActive: false, hasSelection: false },\n });\n\n if (!editor) {\n return null;\n }\n\n const isActive = linkState?.isActive ?? false;\n const canEditLink = isActive || (linkState?.hasSelection ?? false);\n const hasExistingLink = Boolean(url.trim()) || isActive;\n\n const openEditor = () => {\n if (readOnly || !canEditLink) return;\n\n // Capture the target range now — interacting with the embedded LinkPicker\n // (mode buttons, dropdown) blurs the editor and can collapse the live\n // selection, so applyLink reuses this range instead of reading it back.\n activeLinkRangeRef.current = getActiveRange(editor);\n applyFormState(getLinkFormState(editor));\n syncFloatingReference(editor, setPositionReference, update);\n setManualOpen(true);\n setOpen(true);\n };\n\n const applyLink = () => {\n // Prefer the range captured when the popover opened; the live selection may\n // have collapsed while the editor interacted with the LinkPicker.\n const range = activeLinkRangeRef.current ?? getActiveRange(editor);\n const linkType = editor.state.schema.marks.link;\n const trimmedUrl = url.trim();\n\n if (!range || !linkType) {\n return;\n }\n\n const nextText =\n displayText.trim() || getSelectedText(editor, range) || trimmedUrl;\n\n if (!nextText) {\n return;\n }\n\n let transaction = editor.state.tr.insertText(\n nextText,\n range.from,\n range.to\n );\n const nextTo = range.from + nextText.length;\n\n transaction = transaction.removeMark(range.from, nextTo, linkType);\n\n if (trimmedUrl) {\n // Store only the concrete target derived from the override; the override\n // itself is inferred on reopen (see inferTargetOverride).\n const resolvedTarget = resolveLinkTarget(trimmedUrl, target);\n transaction = transaction.addMark(\n range.from,\n nextTo,\n linkType.create({\n href: trimmedUrl,\n target: resolvedTarget === '_blank' ? '_blank' : null,\n })\n );\n }\n\n transaction = transaction.setSelection(\n TextSelection.create(transaction.doc, range.from, nextTo)\n );\n\n editor.view.dispatch(transaction.scrollIntoView());\n editor.commands.focus();\n closeEditor();\n };\n\n const removeLink = () => {\n const linkType = editor.state.schema.marks.link;\n const range = activeLinkRangeRef.current ?? getLinkRange(editor);\n\n if (!linkType || !range) {\n return;\n }\n\n const transaction = editor.state.tr\n .setSelection(\n TextSelection.create(editor.state.doc, range.from, range.to)\n )\n .removeMark(range.from, range.to, linkType);\n\n editor.view.dispatch(transaction.scrollIntoView());\n editor.commands.focus();\n closeEditor();\n };\n\n const preventEditorBlur = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n };\n\n return (\n <>\n <RichTextMenu.Control\n icon={<LinkIcon className=\"nh:size-4\" />}\n active={isActive}\n disabled={readOnly || !canEditLink}\n onClick={openEditor}\n title={isActive ? t.editLink : t.addLink}\n />\n\n {open && canEditLink ? (\n <FloatingPortal>\n <div\n ref={setFloatingElement}\n style={{\n ...floatingStyles,\n visibility: x == null || y == null ? 'hidden' : 'visible',\n }}\n {...getFloatingProps()}\n className=\"nh:w-72 nh:max-w-[calc(100vw-2rem)] nh:rounded-md nh:border nh:border-(--nh-border) nh:bg-(--nh-bg) nh:p-3 nh:text-(--nh-fg) nh:shadow-md nh:outline-hidden z-[120]\"\n data-puck-rte-menu\n >\n <div\n ref={setArrowElement}\n className={arrowClassName}\n style={{\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n right: '',\n bottom: '',\n [staticSide]: '-7px',\n }}\n aria-hidden=\"true\"\n />\n\n <div className=\"space-y-2.5\">\n <div>\n <label\n htmlFor=\"richtext-link-display-text\"\n className=\"nh:text-xs nh:font-medium nh:text-(--nh-fg)\"\n >\n {t.displayedText}\n </label>\n <input\n ref={displayTextInputRef}\n id=\"richtext-link-display-text\"\n type=\"text\"\n value={displayText}\n onChange={(event) => setDisplayText(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n applyLink();\n }\n }}\n className={INPUT_CLASSNAME}\n data-puck-rte-menu\n />\n </div>\n\n <div>\n <span className=\"nh:text-xs nh:font-medium nh:text-(--nh-fg)\">\n {tFields.link}\n </span>\n {/* Wrapper carries data-puck-rte-menu so Puck treats clicks\n inside the picker (incl. its dropdown) as menu-internal. */}\n <div className=\"nh:mt-1\" data-puck-rte-menu>\n <LinkPickerControl\n href={url}\n onHrefChange={setUrl}\n onSubmit={applyLink}\n />\n </div>\n </div>\n\n <div>\n <span className=\"nh:text-xs nh:font-medium nh:text-(--nh-fg)\">\n {t.target}\n </span>\n <div className=\"nh:mt-1\">\n <SegmentedControl\n options={targetOptions(t)}\n value={target}\n onChange={setTarget}\n variant=\"popover\"\n ariaLabel={t.linkTarget}\n itemProps={{\n onMouseDown: preventEditorBlur,\n 'data-puck-rte-menu': true,\n }}\n />\n </div>\n </div>\n\n <div className=\"nh:flex nh:gap-2\">\n <button\n type=\"button\"\n onMouseDown={preventEditorBlur}\n onClick={applyLink}\n className={`nh:flex-1 nh:bg-(--nh-fg) nh:text-(--nh-bg) ${ACTION_BUTTON_CLASSNAME} nh:hover:opacity-90`}\n data-puck-rte-menu\n >\n {hasExistingLink ? t.updateLink : t.addLink}\n </button>\n\n {hasExistingLink ? (\n <button\n type=\"button\"\n onMouseDown={preventEditorBlur}\n onClick={removeLink}\n className={`nh:border nh:border-(--nh-border) nh:text-gray-500 nh:hover:text-(--nh-fg) ${ACTION_BUTTON_CLASSNAME}`}\n title={t.removeLink}\n data-puck-rte-menu\n >\n <span className=\"nh:inline-flex nh:items-center nh:gap-1.5\">\n <Link2OffIcon className=\"nh:size-3.5\" />\n {t.removeLink}\n </span>\n </button>\n ) : null}\n </div>\n </div>\n </div>\n </FloatingPortal>\n ) : null}\n </>\n );\n}\n\nexport const renderRichTextMenu = ({\n children,\n editor,\n readOnly,\n}: {\n children: ReactNode;\n editor: Editor | null;\n readOnly: boolean;\n}) => (\n <RichTextMenu>\n {children}\n <RichTextLinkButton editor={editor} readOnly={readOnly} />\n </RichTextMenu>\n);\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SACEC,SAAS,EACTC,eAAe,EACfC,MAAM,EACNC,QAAQ,QAEH,OAAO;AACd,SACEC,KAAK,EACLC,UAAU,EACVC,IAAI,EACJC,cAAc,EACdC,MAAM,EACNC,KAAK,EACLC,UAAU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,OA5HH0J,GA4HG;AAAA;AAnWA,SAAAnC,OAAAsB,KAAA;EAmOHA,KAAK,CAAAK,cAAe,CAAC,CAAC;AAAA;AAnOnB,SAAA9D,MAAArF,EAAA;EA+HQ;IAAAnC,MAAA,EAAA+L;EAAA,IAAA5J,EAAU;EAAA,OACnBnC,QAAM,GAAN;IAAA0H,QAAA,EAEgB1H,QAAM,CAAA0H,QAAS,CAAC,MAAM,CAAC;IAAAE,YAAA,EACnB,CAAC5H,QAAM,CAAAE,KAAM,CAAAK,SAAU,CAAAM;EAEA,CAAC,GAL5C;IAAA6G,QAAA,EAKgB,KAAK;IAAAE,YAAA,EAAgB;EAAM,CAAC;AAAA;AAkOlD,OAAO,MAAMoE,kBAAkB,GAAGA,CAAC;EACjCxB,QAAQ;EACRxK,MAAM;EACNqC;AAKF,CAAC,kBACCxD,KAAA,CAACf,YAAY;EAAA0M,QAAA,GACVA,QAAQ,eACT7L,IAAA,CAACuD,kBAAkB;IAAClC,MAAM,EAAEA,MAAO;IAACqC,QAAQ,EAAEA;EAAS,CAAE,CAAC;AAAA,CAC9C,CACf","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export declare const PreventLinkNavigation: Extension<any, any>;
|
|
3
|
+
export declare const RICHTEXT_LINK_OPTIONS: {
|
|
4
|
+
openOnClick: boolean;
|
|
5
|
+
enableClickSelection: boolean;
|
|
6
|
+
HTMLAttributes: {
|
|
7
|
+
target: null;
|
|
8
|
+
rel: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=richtext-extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"richtext-extensions.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/fields/link-picker/richtext-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,eAAO,MAAM,qBAAqB,qBAchC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;CAIjC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { Plugin } from '@tiptap/pm/state';
|
|
3
|
+
|
|
4
|
+
// Deliberately NOT a 'use client' module: the RSC render resolves richtext
|
|
5
|
+
// values with tiptap's generateHTML, which needs the real extension objects.
|
|
6
|
+
// A client reference proxy here crashes getExtensionField on the server.
|
|
7
|
+
|
|
8
|
+
const preventLinkNavigation = event => {
|
|
9
|
+
const target = event.target;
|
|
10
|
+
if (target?.closest('a')) event.preventDefault();
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
export const PreventLinkNavigation = Extension.create({
|
|
14
|
+
name: 'preventLinkNavigation',
|
|
15
|
+
addProseMirrorPlugins() {
|
|
16
|
+
return [new Plugin({
|
|
17
|
+
props: {
|
|
18
|
+
handleDOMEvents: {
|
|
19
|
+
click: (_view, event) => preventLinkNavigation(event),
|
|
20
|
+
auxclick: (_view, event) => preventLinkNavigation(event)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
})];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export const RICHTEXT_LINK_OPTIONS = {
|
|
27
|
+
openOnClick: false,
|
|
28
|
+
enableClickSelection: false,
|
|
29
|
+
HTMLAttributes: {
|
|
30
|
+
target: null,
|
|
31
|
+
rel: 'noopener noreferrer'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=richtext-extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"richtext-extensions.js","names":["Extension","Plugin","preventLinkNavigation","event","target","closest","preventDefault","PreventLinkNavigation","create","name","addProseMirrorPlugins","props","handleDOMEvents","click","_view","auxclick","RICHTEXT_LINK_OPTIONS","openOnClick","enableClickSelection","HTMLAttributes","rel"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/richtext-extensions.ts"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin } from '@tiptap/pm/state';\n\n// Deliberately NOT a 'use client' module: the RSC render resolves richtext\n// values with tiptap's generateHTML, which needs the real extension objects.\n// A client reference proxy here crashes getExtensionField on the server.\n\nconst preventLinkNavigation = (event: Event) => {\n const target = event.target as HTMLElement | null;\n if (target?.closest('a')) event.preventDefault();\n return false;\n};\n\nexport const PreventLinkNavigation = Extension.create({\n name: 'preventLinkNavigation',\n addProseMirrorPlugins() {\n return [\n new Plugin({\n props: {\n handleDOMEvents: {\n click: (_view, event) => preventLinkNavigation(event),\n auxclick: (_view, event) => preventLinkNavigation(event),\n },\n },\n }),\n ];\n },\n});\n\nexport const RICHTEXT_LINK_OPTIONS = {\n openOnClick: false,\n enableClickSelection: false,\n HTMLAttributes: { target: null, rel: 'noopener noreferrer' },\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,MAAM,QAAQ,kBAAkB;;AAEzC;AACA;AACA;;AAEA,MAAMC,qBAAqB,GAAIC,KAAY,IAAK;EAC9C,MAAMC,MAAM,GAAGD,KAAK,CAACC,MAA4B;EACjD,IAAIA,MAAM,EAAEC,OAAO,CAAC,GAAG,CAAC,EAAEF,KAAK,CAACG,cAAc,CAAC,CAAC;EAChD,OAAO,KAAK;AACd,CAAC;AAED,OAAO,MAAMC,qBAAqB,GAAGP,SAAS,CAACQ,MAAM,CAAC;EACpDC,IAAI,EAAE,uBAAuB;EAC7BC,qBAAqBA,CAAA,EAAG;IACtB,OAAO,CACL,IAAIT,MAAM,CAAC;MACTU,KAAK,EAAE;QACLC,eAAe,EAAE;UACfC,KAAK,EAAEA,CAACC,KAAK,EAAEX,KAAK,KAAKD,qBAAqB,CAACC,KAAK,CAAC;UACrDY,QAAQ,EAAEA,CAACD,KAAK,EAAEX,KAAK,KAAKD,qBAAqB,CAACC,KAAK;QACzD;MACF;IACF,CAAC,CAAC,CACH;EACH;AACF,CAAC,CAAC;AAEF,OAAO,MAAMa,qBAAqB,GAAG;EACnCC,WAAW,EAAE,KAAK;EAClBC,oBAAoB,EAAE,KAAK;EAC3BC,cAAc,EAAE;IAAEf,MAAM,EAAE,IAAI;IAAEgB,GAAG,EAAE;EAAsB;AAC7D,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A single segmented-control option. `value` is the stored value; `label` is
|
|
4
|
+
* what the editor sees.
|
|
5
|
+
*/
|
|
6
|
+
export type SegmentedOption<T extends string> = {
|
|
7
|
+
value: T;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Which surface the control lives on:
|
|
12
|
+
* - `puck` — the Puck sidebar field (styled with Puck's CSS variables).
|
|
13
|
+
* - `popover`— the rich-text link popover (styled with shadcn theme tokens).
|
|
14
|
+
*/
|
|
15
|
+
type SegmentedVariant = 'puck' | 'popover';
|
|
16
|
+
type SegmentedControlProps<T extends string> = {
|
|
17
|
+
options: readonly SegmentedOption<T>[];
|
|
18
|
+
value: T;
|
|
19
|
+
onChange: (value: T) => void;
|
|
20
|
+
variant?: SegmentedVariant;
|
|
21
|
+
/** Accessible name for the group (e.g. "Link mode", "Link target"). */
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Extra props spread onto every option button — used by the rich-text popover
|
|
25
|
+
* to pass `data-puck-rte-menu` and an `onMouseDown` that keeps the editor
|
|
26
|
+
* selection from blurring.
|
|
27
|
+
*/
|
|
28
|
+
itemProps?: ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
29
|
+
[dataAttr: `data-${string}`]: string | number | boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* One segmented toggle shared by every LinkPicker surface: the Internal /
|
|
34
|
+
* External / Anchor mode switch and both target-override toggles. Collapses
|
|
35
|
+
* three near-identical inline-styled implementations into a single component
|
|
36
|
+
* with a Puck-sidebar and a shadcn-popover style variant.
|
|
37
|
+
*/
|
|
38
|
+
export default function SegmentedControl<T extends string>({ options, value, onChange, variant, ariaLabel, itemProps, }: SegmentedControlProps<T>): import("react").JSX.Element;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=segmented-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/fields/link-picker/segmented-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAiB,MAAM,OAAO,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;IAC9C,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,KAAK,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3C,KAAK,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI;IAC7C,OAAO,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;QACpD,CAAC,QAAQ,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KACrE,CAAC;CACH,CAAC;AA2BF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,EACzD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAgB,EAChB,SAAS,EACT,SAAS,GACV,EAAE,qBAAqB,CAAC,CAAC,CAAC,+BAkD1B"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* A single segmented-control option. `value` is the stored value; `label` is
|
|
6
|
+
* what the editor sees.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Which surface the control lives on:
|
|
10
|
+
* - `puck` — the Puck sidebar field (styled with Puck's CSS variables).
|
|
11
|
+
* - `popover`— the rich-text link popover (styled with shadcn theme tokens).
|
|
12
|
+
*/
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const PUCK_CONTAINER_STYLE = {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
border: '1px solid var(--puck-color-grey-09)',
|
|
17
|
+
borderRadius: 4,
|
|
18
|
+
overflow: 'hidden'
|
|
19
|
+
};
|
|
20
|
+
function puckItemStyle(active) {
|
|
21
|
+
return {
|
|
22
|
+
flex: 1,
|
|
23
|
+
padding: '8px 12px',
|
|
24
|
+
border: 'none',
|
|
25
|
+
cursor: 'pointer',
|
|
26
|
+
textAlign: 'center',
|
|
27
|
+
fontSize: 'var(--puck-font-size-xxxs)',
|
|
28
|
+
fontWeight: active ? 500 : 400,
|
|
29
|
+
backgroundColor: active ? 'var(--puck-color-interactive-subtle)' : 'var(--puck-color-white)',
|
|
30
|
+
color: active ? 'var(--puck-color-interactive)' : 'var(--puck-color-grey-04)'
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* One segmented toggle shared by every LinkPicker surface: the Internal /
|
|
36
|
+
* External / Anchor mode switch and both target-override toggles. Collapses
|
|
37
|
+
* three near-identical inline-styled implementations into a single component
|
|
38
|
+
* with a Puck-sidebar and a shadcn-popover style variant.
|
|
39
|
+
*/
|
|
40
|
+
export default function SegmentedControl(t0) {
|
|
41
|
+
const $ = _c(24);
|
|
42
|
+
const {
|
|
43
|
+
options,
|
|
44
|
+
value,
|
|
45
|
+
onChange,
|
|
46
|
+
variant: t1,
|
|
47
|
+
ariaLabel,
|
|
48
|
+
itemProps
|
|
49
|
+
} = t0;
|
|
50
|
+
const variant = t1 === undefined ? "puck" : t1;
|
|
51
|
+
if (variant === "popover") {
|
|
52
|
+
let t2;
|
|
53
|
+
if ($[0] !== itemProps || $[1] !== onChange || $[2] !== options || $[3] !== value) {
|
|
54
|
+
let t3;
|
|
55
|
+
if ($[5] !== itemProps || $[6] !== onChange || $[7] !== value) {
|
|
56
|
+
t3 = option => {
|
|
57
|
+
const active = value === option.value;
|
|
58
|
+
return /*#__PURE__*/_jsx("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-pressed": active,
|
|
61
|
+
onClick: () => onChange(option.value),
|
|
62
|
+
className: `nh:flex-1 nh:px-2 nh:py-1.5 ${active ? "nh:bg-(--nh-fg) nh:text-(--nh-bg)" : "nh:text-gray-500 nh:hover:text-(--nh-fg)"}`,
|
|
63
|
+
...itemProps,
|
|
64
|
+
children: option.label
|
|
65
|
+
}, option.value);
|
|
66
|
+
};
|
|
67
|
+
$[5] = itemProps;
|
|
68
|
+
$[6] = onChange;
|
|
69
|
+
$[7] = value;
|
|
70
|
+
$[8] = t3;
|
|
71
|
+
} else {
|
|
72
|
+
t3 = $[8];
|
|
73
|
+
}
|
|
74
|
+
t2 = options.map(t3);
|
|
75
|
+
$[0] = itemProps;
|
|
76
|
+
$[1] = onChange;
|
|
77
|
+
$[2] = options;
|
|
78
|
+
$[3] = value;
|
|
79
|
+
$[4] = t2;
|
|
80
|
+
} else {
|
|
81
|
+
t2 = $[4];
|
|
82
|
+
}
|
|
83
|
+
let t3;
|
|
84
|
+
if ($[9] !== ariaLabel || $[10] !== t2) {
|
|
85
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
86
|
+
role: "group",
|
|
87
|
+
"aria-label": ariaLabel,
|
|
88
|
+
className: "nh:flex nh:overflow-hidden nh:rounded-md nh:border nh:border-(--nh-border) nh:text-xs",
|
|
89
|
+
children: t2
|
|
90
|
+
});
|
|
91
|
+
$[9] = ariaLabel;
|
|
92
|
+
$[10] = t2;
|
|
93
|
+
$[11] = t3;
|
|
94
|
+
} else {
|
|
95
|
+
t3 = $[11];
|
|
96
|
+
}
|
|
97
|
+
return t3;
|
|
98
|
+
}
|
|
99
|
+
let t2;
|
|
100
|
+
if ($[12] !== itemProps || $[13] !== onChange || $[14] !== options || $[15] !== value) {
|
|
101
|
+
let t3;
|
|
102
|
+
if ($[17] !== itemProps || $[18] !== onChange || $[19] !== value) {
|
|
103
|
+
t3 = option_0 => {
|
|
104
|
+
const active_0 = value === option_0.value;
|
|
105
|
+
return /*#__PURE__*/_jsx("button", {
|
|
106
|
+
type: "button",
|
|
107
|
+
"aria-pressed": active_0,
|
|
108
|
+
onClick: () => onChange(option_0.value),
|
|
109
|
+
style: puckItemStyle(active_0),
|
|
110
|
+
...itemProps,
|
|
111
|
+
children: option_0.label
|
|
112
|
+
}, option_0.value);
|
|
113
|
+
};
|
|
114
|
+
$[17] = itemProps;
|
|
115
|
+
$[18] = onChange;
|
|
116
|
+
$[19] = value;
|
|
117
|
+
$[20] = t3;
|
|
118
|
+
} else {
|
|
119
|
+
t3 = $[20];
|
|
120
|
+
}
|
|
121
|
+
t2 = options.map(t3);
|
|
122
|
+
$[12] = itemProps;
|
|
123
|
+
$[13] = onChange;
|
|
124
|
+
$[14] = options;
|
|
125
|
+
$[15] = value;
|
|
126
|
+
$[16] = t2;
|
|
127
|
+
} else {
|
|
128
|
+
t2 = $[16];
|
|
129
|
+
}
|
|
130
|
+
let t3;
|
|
131
|
+
if ($[21] !== ariaLabel || $[22] !== t2) {
|
|
132
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
133
|
+
role: "group",
|
|
134
|
+
"aria-label": ariaLabel,
|
|
135
|
+
style: PUCK_CONTAINER_STYLE,
|
|
136
|
+
children: t2
|
|
137
|
+
});
|
|
138
|
+
$[21] = ariaLabel;
|
|
139
|
+
$[22] = t2;
|
|
140
|
+
$[23] = t3;
|
|
141
|
+
} else {
|
|
142
|
+
t3 = $[23];
|
|
143
|
+
}
|
|
144
|
+
return t3;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=segmented-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.js","names":["c","_c","jsx","_jsx","PUCK_CONTAINER_STYLE","display","border","borderRadius","overflow","puckItemStyle","active","flex","padding","cursor","textAlign","fontSize","fontWeight","backgroundColor","color","SegmentedControl","t0","$","options","value","onChange","variant","t1","ariaLabel","itemProps","undefined","t2","t3","option","type","onClick","className","children","label","map","role","option_0","active_0","style"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/segmented-control.tsx"],"sourcesContent":["'use client';\n\nimport type { ButtonHTMLAttributes, CSSProperties } from 'react';\n\n/**\n * A single segmented-control option. `value` is the stored value; `label` is\n * what the editor sees.\n */\nexport type SegmentedOption<T extends string> = {\n value: T;\n label: string;\n};\n\n/**\n * Which surface the control lives on:\n * - `puck` — the Puck sidebar field (styled with Puck's CSS variables).\n * - `popover`— the rich-text link popover (styled with shadcn theme tokens).\n */\ntype SegmentedVariant = 'puck' | 'popover';\n\ntype SegmentedControlProps<T extends string> = {\n options: readonly SegmentedOption<T>[];\n value: T;\n onChange: (value: T) => void;\n variant?: SegmentedVariant;\n /** Accessible name for the group (e.g. \"Link mode\", \"Link target\"). */\n ariaLabel?: string;\n /**\n * Extra props spread onto every option button — used by the rich-text popover\n * to pass `data-puck-rte-menu` and an `onMouseDown` that keeps the editor\n * selection from blurring.\n */\n itemProps?: ButtonHTMLAttributes<HTMLButtonElement> & {\n [dataAttr: `data-${string}`]: string | number | boolean | undefined;\n };\n};\n\nconst PUCK_CONTAINER_STYLE: CSSProperties = {\n display: 'flex',\n border: '1px solid var(--puck-color-grey-09)',\n borderRadius: 4,\n overflow: 'hidden',\n};\n\nfunction puckItemStyle(active: boolean): CSSProperties {\n return {\n flex: 1,\n padding: '8px 12px',\n border: 'none',\n cursor: 'pointer',\n textAlign: 'center',\n fontSize: 'var(--puck-font-size-xxxs)',\n fontWeight: active ? 500 : 400,\n backgroundColor: active\n ? 'var(--puck-color-interactive-subtle)'\n : 'var(--puck-color-white)',\n color: active\n ? 'var(--puck-color-interactive)'\n : 'var(--puck-color-grey-04)',\n };\n}\n\n/**\n * One segmented toggle shared by every LinkPicker surface: the Internal /\n * External / Anchor mode switch and both target-override toggles. Collapses\n * three near-identical inline-styled implementations into a single component\n * with a Puck-sidebar and a shadcn-popover style variant.\n */\nexport default function SegmentedControl<T extends string>({\n options,\n value,\n onChange,\n variant = 'puck',\n ariaLabel,\n itemProps,\n}: SegmentedControlProps<T>) {\n if (variant === 'popover') {\n return (\n <div\n role=\"group\"\n aria-label={ariaLabel}\n className=\"nh:flex nh:overflow-hidden nh:rounded-md nh:border nh:border-(--nh-border) nh:text-xs\"\n >\n {options.map((option) => {\n const active = value === option.value;\n return (\n <button\n key={option.value}\n type=\"button\"\n aria-pressed={active}\n onClick={() => onChange(option.value)}\n className={`nh:flex-1 nh:px-2 nh:py-1.5 ${\n active\n ? 'nh:bg-(--nh-fg) nh:text-(--nh-bg)'\n : 'nh:text-gray-500 nh:hover:text-(--nh-fg)'\n }`}\n {...itemProps}\n >\n {option.label}\n </button>\n );\n })}\n </div>\n );\n }\n\n return (\n <div role=\"group\" aria-label={ariaLabel} style={PUCK_CONTAINER_STYLE}>\n {options.map((option) => {\n const active = value === option.value;\n return (\n <button\n key={option.value}\n type=\"button\"\n aria-pressed={active}\n onClick={() => onChange(option.value)}\n style={puckItemStyle(active)}\n {...itemProps}\n >\n {option.label}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAIb;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;A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 @@
|
|
|
1
|
+
/** A human-readable label per language. */
|
|
2
|
+
export type LocalizedLabel = Partial<Record<string, string>>;
|
|
3
|
+
/** Where a routable link originates. */
|
|
4
|
+
export type RoutableLinkSource = 'drupal-node' | 'static-page';
|
|
5
|
+
/**
|
|
6
|
+
* A single internally-routable page, in a shape the LinkPicker consumes
|
|
7
|
+
* (`path` + `label` + `group`). Every link collector returns `RoutableLink[]`
|
|
8
|
+
* so the picker UI stays project-independent — only the data layer behind
|
|
9
|
+
* `/api/puck/links` changes per project.
|
|
10
|
+
*/
|
|
11
|
+
export interface RoutableLink {
|
|
12
|
+
/** Root-relative, locale-prefixed path, e.g. `/de/about`. */
|
|
13
|
+
path: string;
|
|
14
|
+
/** The language this specific URL belongs to. */
|
|
15
|
+
lang: string;
|
|
16
|
+
/** Human-readable label per language (LinkPicker dropdown). */
|
|
17
|
+
label?: LocalizedLabel;
|
|
18
|
+
/** Where this link originates. */
|
|
19
|
+
source: RoutableLinkSource;
|
|
20
|
+
/** Coarse grouping key for the LinkPicker UI (the node bundle, e.g. `page`). */
|
|
21
|
+
group?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Display label for the group, set by the consumer's link collector. When
|
|
24
|
+
* omitted the picker humanizes the `group` key. Keeps project-specific bundle
|
|
25
|
+
* labels out of the package.
|
|
26
|
+
*/
|
|
27
|
+
groupLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the underlying content is published. `false` ⇒ draft / unpublished
|
|
30
|
+
* node (rendered with a "Draft" badge). Left undefined when unknown.
|
|
31
|
+
*/
|
|
32
|
+
published?: boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/fields/link-picker/types.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7D,wCAAwC;AACxC,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,kCAAkC;IAClC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/types.ts"],"sourcesContent":["/** A human-readable label per language. */\nexport type LocalizedLabel = Partial<Record<string, string>>;\n\n/** Where a routable link originates. */\nexport type RoutableLinkSource = 'drupal-node' | 'static-page';\n\n/**\n * A single internally-routable page, in a shape the LinkPicker consumes\n * (`path` + `label` + `group`). Every link collector returns `RoutableLink[]`\n * so the picker UI stays project-independent — only the data layer behind\n * `/api/puck/links` changes per project.\n */\nexport interface RoutableLink {\n /** Root-relative, locale-prefixed path, e.g. `/de/about`. */\n path: string;\n /** The language this specific URL belongs to. */\n lang: string;\n /** Human-readable label per language (LinkPicker dropdown). */\n label?: LocalizedLabel;\n /** Where this link originates. */\n source: RoutableLinkSource;\n /** Coarse grouping key for the LinkPicker UI (the node bundle, e.g. `page`). */\n group?: string;\n /**\n * Display label for the group, set by the consumer's link collector. When\n * omitted the picker humanizes the `group` key. Keeps project-specific bundle\n * labels out of the package.\n */\n groupLabel?: string;\n /**\n * Whether the underlying content is published. `false` ⇒ draft / unpublished\n * node (rendered with a \"Draft\" badge). Left undefined when unknown.\n */\n published?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { MediaCropConfig } from '../media-selector/crop-types';
|
|
2
|
+
import { MediaItem } from '../media-selector/media-selector-field';
|
|
3
|
+
export interface MediaArrayFieldOptions {
|
|
4
|
+
mediaTypes?: string[];
|
|
5
|
+
label?: string;
|
|
6
|
+
fields?: string[];
|
|
7
|
+
crop?: MediaCropConfig;
|
|
8
|
+
}
|
|
9
|
+
export declare const createMediaArrayField: ({ mediaTypes, label, fields, crop, }?: MediaArrayFieldOptions) => {
|
|
10
|
+
type: "custom";
|
|
11
|
+
label: string | undefined;
|
|
12
|
+
metadata: {
|
|
13
|
+
ai: {
|
|
14
|
+
bind: string;
|
|
15
|
+
instructions: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
render: ({ onChange, value, field }: {
|
|
19
|
+
field: import("@puckeditor/core").CustomField<MediaItem[] | null>;
|
|
20
|
+
name: string;
|
|
21
|
+
id: string;
|
|
22
|
+
value: MediaItem[] | null;
|
|
23
|
+
onChange: (value: MediaItem[] | null, uiState?: Partial<import("@puckeditor/core").UiState>) => void;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
}) => import("react").JSX.Element;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=create-media-array-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-media-array-field.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/fields/media-array/create-media-array-field.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGnE,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,GAAI,uCAKnC,sBAA2B;;;;;;;;;;;;;;;;;CAqB7B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MediaArrayField } from './media-array-field';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export const createMediaArrayField = ({
|
|
4
|
+
mediaTypes = ['image'],
|
|
5
|
+
label,
|
|
6
|
+
fields,
|
|
7
|
+
crop
|
|
8
|
+
} = {}) => {
|
|
9
|
+
return {
|
|
10
|
+
type: 'custom',
|
|
11
|
+
label,
|
|
12
|
+
metadata: {
|
|
13
|
+
ai: {
|
|
14
|
+
bind: 'search_media',
|
|
15
|
+
instructions: `Value must be an array of full media objects returned by search_media (type: ${mediaTypes.join(', ')}). Never construct entries by hand.`
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
render: ({
|
|
19
|
+
onChange,
|
|
20
|
+
value,
|
|
21
|
+
field
|
|
22
|
+
}) => /*#__PURE__*/_jsx(MediaArrayField, {
|
|
23
|
+
onChange: onChange,
|
|
24
|
+
value: value,
|
|
25
|
+
mediaTypes: mediaTypes,
|
|
26
|
+
label: field.label ?? label,
|
|
27
|
+
fields: fields,
|
|
28
|
+
cropConfig: crop
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=create-media-array-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-media-array-field.js","names":["MediaArrayField","jsx","_jsx","createMediaArrayField","mediaTypes","label","fields","crop","type","metadata","ai","bind","instructions","join","render","onChange","value","field","cropConfig"],"sources":["../../../../../src/puck-editor/internal/fields/media-array/create-media-array-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport type { MediaCropConfig } from '../media-selector/crop-types';\nimport { MediaItem } from '../media-selector/media-selector-field';\nimport { MediaArrayField } from './media-array-field';\n\nexport interface MediaArrayFieldOptions {\n mediaTypes?: string[];\n label?: string;\n fields?: string[]; // Array of property paths to save from API response\n crop?: MediaCropConfig;\n}\n\nexport const createMediaArrayField = ({\n mediaTypes = ['image'],\n label,\n fields,\n crop,\n}: MediaArrayFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n metadata: {\n ai: {\n bind: 'search_media',\n instructions: `Value must be an array of full media objects returned by search_media (type: ${mediaTypes.join(', ')}). Never construct entries by hand.`,\n },\n },\n render: (({ onChange, value, field }) => (\n <MediaArrayField\n onChange={onChange}\n value={value}\n mediaTypes={mediaTypes}\n label={field.label ?? label}\n fields={fields}\n cropConfig={crop}\n />\n )) satisfies CustomFieldRender<MediaItem[] | null>,\n };\n};\n"],"mappings":"AAIA,SAASA,eAAe,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAStD,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC,UAAU,GAAG,CAAC,OAAO,CAAC;EACtBC,KAAK;EACLC,MAAM;EACNC;AACsB,CAAC,GAAG,CAAC,CAAC,KAAK;EACjC,OAAO;IACLC,IAAI,EAAE,QAAiB;IACvBH,KAAK;IACLI,QAAQ,EAAE;MACRC,EAAE,EAAE;QACFC,IAAI,EAAE,cAAc;QACpBC,YAAY,EAAE,gFAAgFR,UAAU,CAACS,IAAI,CAAC,IAAI,CAAC;MACrH;IACF,CAAC;IACDC,MAAM,EAAGA,CAAC;MAAEC,QAAQ;MAAEC,KAAK;MAAEC;IAAM,CAAC,kBAClCf,IAAA,CAACF,eAAe;MACde,QAAQ,EAAEA,QAAS;MACnBC,KAAK,EAAEA,KAAM;MACbZ,UAAU,EAAEA,UAAW;MACvBC,KAAK,EAAEY,KAAK,CAACZ,KAAK,IAAIA,KAAM;MAC5BC,MAAM,EAAEA,MAAO;MACfY,UAAU,EAAEX;IAAK,CAClB;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MediaCropConfig } from '../media-selector/crop-types';
|
|
2
|
+
import { MediaItem } from '../media-selector/media-selector-field';
|
|
3
|
+
type MediaArrayFieldProps = {
|
|
4
|
+
onChange: (value: MediaItem[] | null) => void;
|
|
5
|
+
value: MediaItem[] | null;
|
|
6
|
+
mediaTypes: string[];
|
|
7
|
+
label?: string;
|
|
8
|
+
fields?: string[];
|
|
9
|
+
cropConfig?: MediaCropConfig;
|
|
10
|
+
};
|
|
11
|
+
export declare function MediaArrayField({ onChange, value, mediaTypes, label, fields, cropConfig, }: MediaArrayFieldProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=media-array-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-array-field.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/fields/media-array/media-array-field.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/E,OAAO,EAEL,SAAS,EACV,MAAM,wCAAwC,CAAC;AAIhD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,EACL,MAAM,EACN,UAAU,GACX,EAAE,oBAAoB,+BA6LtB"}
|