@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,844 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { createUsePuck } from '@puckeditor/core';
|
|
6
|
+
import { CirclePlusIcon } from 'lucide-react';
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
|
+
import { cn } from '../../../shared/cn';
|
|
9
|
+
import { usePuckDictionary } from '../i18n';
|
|
10
|
+
import { buildTree, indexZones, ROOT_ZONE, sectionComponentTypes } from '../plugins/outline-plugin/outline-tree';
|
|
11
|
+
import { Popover, PopoverAnchor, PopoverContent } from '../ui/popover';
|
|
12
|
+
import { allowedTypesForZone } from './allowed-types';
|
|
13
|
+
import { CanvasAddPicker } from './canvas-add-picker';
|
|
14
|
+
import { CanvasEmptyState } from './canvas-empty-state';
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const usePuck = createUsePuck();
|
|
17
|
+
function frameZoom(doc) {
|
|
18
|
+
const frame = doc?.defaultView?.frameElement;
|
|
19
|
+
if (!frame || frame.offsetWidth === 0) return 1;
|
|
20
|
+
return frame.getBoundingClientRect().width / frame.offsetWidth;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Projects a rect from inside the (possibly scaled) canvas iframe into
|
|
24
|
+
// parent-document coordinates, so the popover can anchor across documents.
|
|
25
|
+
function projectRect(el) {
|
|
26
|
+
const rect = el.getBoundingClientRect();
|
|
27
|
+
const frame = el.ownerDocument.defaultView?.frameElement;
|
|
28
|
+
if (!frame || frame.offsetWidth === 0) return rect;
|
|
29
|
+
const frameRect = frame.getBoundingClientRect();
|
|
30
|
+
const zoom = frameRect.width / frame.offsetWidth;
|
|
31
|
+
return new DOMRect(frameRect.left + rect.left * zoom, frameRect.top + rect.top * zoom, rect.width * zoom, rect.height * zoom);
|
|
32
|
+
}
|
|
33
|
+
function useVirtualAnchor(buttonRef) {
|
|
34
|
+
const $ = _c(2);
|
|
35
|
+
let t0;
|
|
36
|
+
if ($[0] !== buttonRef) {
|
|
37
|
+
t0 = {
|
|
38
|
+
getBoundingClientRect: () => buttonRef.current ? projectRect(buttonRef.current) : new DOMRect()
|
|
39
|
+
};
|
|
40
|
+
$[0] = buttonRef;
|
|
41
|
+
$[1] = t0;
|
|
42
|
+
} else {
|
|
43
|
+
t0 = $[1];
|
|
44
|
+
}
|
|
45
|
+
return useRef(t0);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Radix only sees pointerdowns in the popover's own document (the parent),
|
|
49
|
+
// so clicks and scrolls inside the canvas iframe must close it manually.
|
|
50
|
+
function useCloseOnCanvasInteraction(doc, open, ownRef, onClose) {
|
|
51
|
+
const $ = _c(7);
|
|
52
|
+
const closeRef = useRef(onClose);
|
|
53
|
+
let t0;
|
|
54
|
+
if ($[0] !== onClose) {
|
|
55
|
+
t0 = () => {
|
|
56
|
+
closeRef.current = onClose;
|
|
57
|
+
};
|
|
58
|
+
$[0] = onClose;
|
|
59
|
+
$[1] = t0;
|
|
60
|
+
} else {
|
|
61
|
+
t0 = $[1];
|
|
62
|
+
}
|
|
63
|
+
useEffect(t0);
|
|
64
|
+
let t1;
|
|
65
|
+
let t2;
|
|
66
|
+
if ($[2] !== doc || $[3] !== open || $[4] !== ownRef) {
|
|
67
|
+
t1 = () => {
|
|
68
|
+
if (!open) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const onPointerDown = e => {
|
|
72
|
+
const target = e.target;
|
|
73
|
+
if (target && ownRef.current?.contains(target)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
closeRef.current();
|
|
77
|
+
};
|
|
78
|
+
const onScroll = () => closeRef.current();
|
|
79
|
+
doc.addEventListener("pointerdown", onPointerDown, true);
|
|
80
|
+
doc.addEventListener("scroll", onScroll, true);
|
|
81
|
+
return () => {
|
|
82
|
+
doc.removeEventListener("pointerdown", onPointerDown, true);
|
|
83
|
+
doc.removeEventListener("scroll", onScroll, true);
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
t2 = [doc, open, ownRef];
|
|
87
|
+
$[2] = doc;
|
|
88
|
+
$[3] = open;
|
|
89
|
+
$[4] = ownRef;
|
|
90
|
+
$[5] = t1;
|
|
91
|
+
$[6] = t2;
|
|
92
|
+
} else {
|
|
93
|
+
t1 = $[5];
|
|
94
|
+
t2 = $[6];
|
|
95
|
+
}
|
|
96
|
+
useEffect(t1, t2);
|
|
97
|
+
}
|
|
98
|
+
function useCanvasDocument() {
|
|
99
|
+
const $ = _c(2);
|
|
100
|
+
const [doc, setDoc] = useState(null);
|
|
101
|
+
let t0;
|
|
102
|
+
let t1;
|
|
103
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
104
|
+
t0 = () => {
|
|
105
|
+
const sync = () => {
|
|
106
|
+
const frame = document.querySelector("#preview-frame");
|
|
107
|
+
if (!frame) {
|
|
108
|
+
setDoc(null);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (frame.tagName === "IFRAME") {
|
|
112
|
+
const frameDoc = frame.contentDocument;
|
|
113
|
+
setDoc(frameDoc?.body && frameDoc.body.childElementCount > 0 ? frameDoc : null);
|
|
114
|
+
} else {
|
|
115
|
+
setDoc(frame.ownerDocument);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
sync();
|
|
119
|
+
const interval = setInterval(sync, 500);
|
|
120
|
+
return () => clearInterval(interval);
|
|
121
|
+
};
|
|
122
|
+
t1 = [];
|
|
123
|
+
$[0] = t0;
|
|
124
|
+
$[1] = t1;
|
|
125
|
+
} else {
|
|
126
|
+
t0 = $[0];
|
|
127
|
+
t1 = $[1];
|
|
128
|
+
}
|
|
129
|
+
useEffect(t0, t1);
|
|
130
|
+
return doc;
|
|
131
|
+
}
|
|
132
|
+
export function CanvasQuickAdd() {
|
|
133
|
+
const $ = _c(12);
|
|
134
|
+
const tOutline = usePuckDictionary().outline;
|
|
135
|
+
const tBlocks = usePuckDictionary().blocks;
|
|
136
|
+
const config = usePuck(_temp);
|
|
137
|
+
const content = usePuck(_temp2);
|
|
138
|
+
const isDragging = usePuck(_temp3);
|
|
139
|
+
const previewMode = usePuck(_temp4);
|
|
140
|
+
const getSelectorForId = usePuck(_temp5);
|
|
141
|
+
const doc = useCanvasDocument();
|
|
142
|
+
const [hovered, setHovered] = useState(null);
|
|
143
|
+
const [openGap, setOpenGap] = useState(null);
|
|
144
|
+
let t0;
|
|
145
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146
|
+
t0 = new Map();
|
|
147
|
+
$[0] = t0;
|
|
148
|
+
} else {
|
|
149
|
+
t0 = $[0];
|
|
150
|
+
}
|
|
151
|
+
const [slotEls, setSlotEls] = useState(t0);
|
|
152
|
+
const tree = buildTree(content ?? [], config);
|
|
153
|
+
const zones = indexZones(tree);
|
|
154
|
+
const rootZone = {
|
|
155
|
+
zoneCompound: ROOT_ZONE,
|
|
156
|
+
emptyDroppable: true,
|
|
157
|
+
allow: [...sectionComponentTypes(config)],
|
|
158
|
+
items: tree
|
|
159
|
+
};
|
|
160
|
+
const isEmpty = tree.length === 0;
|
|
161
|
+
const emptySlotZones = [...zones.values()].filter(_temp6);
|
|
162
|
+
const locatedZones = isEmpty ? [rootZone, ...emptySlotZones] : emptySlotZones;
|
|
163
|
+
let t1;
|
|
164
|
+
let t2;
|
|
165
|
+
if ($[1] !== doc) {
|
|
166
|
+
t1 = () => {
|
|
167
|
+
if (!doc) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const onPointerMove = e => {
|
|
171
|
+
const target = e.target;
|
|
172
|
+
if (target?.closest?.("[data-nh-quick-add]")) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const el = target?.closest?.("[data-puck-component]");
|
|
176
|
+
setHovered(prev => {
|
|
177
|
+
const id = el?.getAttribute("data-puck-component");
|
|
178
|
+
if (!el || !id) {
|
|
179
|
+
return prev === null ? prev : null;
|
|
180
|
+
}
|
|
181
|
+
if (prev && prev.id === id && prev.el === el) {
|
|
182
|
+
return prev;
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
id,
|
|
186
|
+
el: el
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
const onPointerLeave = () => setHovered(null);
|
|
191
|
+
doc.addEventListener("pointermove", onPointerMove, true);
|
|
192
|
+
doc.documentElement.addEventListener("pointerleave", onPointerLeave);
|
|
193
|
+
return () => {
|
|
194
|
+
doc.removeEventListener("pointermove", onPointerMove, true);
|
|
195
|
+
doc.documentElement.removeEventListener("pointerleave", onPointerLeave);
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
t2 = [doc];
|
|
199
|
+
$[1] = doc;
|
|
200
|
+
$[2] = t1;
|
|
201
|
+
$[3] = t2;
|
|
202
|
+
} else {
|
|
203
|
+
t1 = $[2];
|
|
204
|
+
t2 = $[3];
|
|
205
|
+
}
|
|
206
|
+
useEffect(t1, t2);
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
if (!doc) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
let raf = 0;
|
|
212
|
+
const query = () => {
|
|
213
|
+
const next = new Map();
|
|
214
|
+
for (const zone_0 of locatedZones) {
|
|
215
|
+
const el_0 = doc.querySelector(`[data-puck-dropzone="${zone_0.zoneCompound}"]`);
|
|
216
|
+
if (el_0) {
|
|
217
|
+
next.set(zone_0.zoneCompound, el_0);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
setSlotEls(prev_0 => {
|
|
221
|
+
const unchanged = prev_0.size === next.size && [...next].every(t3 => {
|
|
222
|
+
const [key, el_1] = t3;
|
|
223
|
+
return prev_0.get(key) === el_1;
|
|
224
|
+
});
|
|
225
|
+
return unchanged ? prev_0 : next;
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
raf = requestAnimationFrame(query);
|
|
229
|
+
const observer = new MutationObserver(() => {
|
|
230
|
+
cancelAnimationFrame(raf);
|
|
231
|
+
raf = requestAnimationFrame(query);
|
|
232
|
+
});
|
|
233
|
+
observer.observe(doc.body, {
|
|
234
|
+
childList: true,
|
|
235
|
+
subtree: true
|
|
236
|
+
});
|
|
237
|
+
return () => {
|
|
238
|
+
observer.disconnect();
|
|
239
|
+
cancelAnimationFrame(raf);
|
|
240
|
+
};
|
|
241
|
+
}, [doc, locatedZones]);
|
|
242
|
+
if (!doc || isDragging || previewMode !== "edit") {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
let t4;
|
|
246
|
+
if ($[4] !== doc) {
|
|
247
|
+
t4 = frameZoom(doc);
|
|
248
|
+
$[4] = doc;
|
|
249
|
+
$[5] = t4;
|
|
250
|
+
} else {
|
|
251
|
+
t4 = $[5];
|
|
252
|
+
}
|
|
253
|
+
const zoom = t4;
|
|
254
|
+
let t5;
|
|
255
|
+
if ($[6] !== getSelectorForId || $[7] !== openGap) {
|
|
256
|
+
t5 = openGap && getSelectorForId(openGap.target.id) ? openGap : null;
|
|
257
|
+
$[6] = getSelectorForId;
|
|
258
|
+
$[7] = openGap;
|
|
259
|
+
$[8] = t5;
|
|
260
|
+
} else {
|
|
261
|
+
t5 = $[8];
|
|
262
|
+
}
|
|
263
|
+
const validOpenGap = t5;
|
|
264
|
+
const gapTarget = validOpenGap?.target ?? hovered;
|
|
265
|
+
const selector = gapTarget ? getSelectorForId(gapTarget.id) : undefined;
|
|
266
|
+
const gapZone = selector ? selector.zone === ROOT_ZONE ? rootZone : zones.get(selector.zone) : undefined;
|
|
267
|
+
const gapTypes = gapZone ? allowedTypesForZone(config, gapZone) : [];
|
|
268
|
+
const renderGap = (position, insertAt) => {
|
|
269
|
+
if (!gapTarget || !selector) {
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
const clamp = selector.zone !== ROOT_ZONE ? undefined : position === "bottom" && selector.index === tree.length - 1 ? "end" : position === "top" && selector.index === 0 ? "start" : undefined;
|
|
273
|
+
return /*#__PURE__*/_jsx(InsertGap, {
|
|
274
|
+
target: gapTarget,
|
|
275
|
+
position: position,
|
|
276
|
+
clamp: clamp,
|
|
277
|
+
doc: doc,
|
|
278
|
+
zoom: zoom,
|
|
279
|
+
zone: selector.zone,
|
|
280
|
+
insertAt: insertAt,
|
|
281
|
+
allowedTypes: gapTypes,
|
|
282
|
+
label: selector.zone === ROOT_ZONE ? tOutline.addSection : tBlocks.addBlock,
|
|
283
|
+
open: validOpenGap?.target.id === gapTarget.id && validOpenGap.position === position,
|
|
284
|
+
onOpenChange: open => setOpenGap(open ? {
|
|
285
|
+
target: gapTarget,
|
|
286
|
+
position
|
|
287
|
+
} : null),
|
|
288
|
+
onDone: () => setOpenGap(null)
|
|
289
|
+
}, `${gapTarget.id}-${position}`);
|
|
290
|
+
};
|
|
291
|
+
const t6 = gapTypes.length > 0 && selector && /*#__PURE__*/_jsxs(_Fragment, {
|
|
292
|
+
children: [renderGap("top", selector.index), renderGap("bottom", selector.index + 1)]
|
|
293
|
+
});
|
|
294
|
+
const t7 = locatedZones.map(zone_1 => {
|
|
295
|
+
const el_2 = slotEls.get(zone_1.zoneCompound);
|
|
296
|
+
if (!el_2) {
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
if (zone_1.zoneCompound === ROOT_ZONE) {
|
|
300
|
+
return /*#__PURE__*/_jsx(CanvasEmptyState, {
|
|
301
|
+
el: el_2,
|
|
302
|
+
zoom: zoom,
|
|
303
|
+
allowedTypes: allowedTypesForZone(config, rootZone)
|
|
304
|
+
}, zone_1.zoneCompound);
|
|
305
|
+
}
|
|
306
|
+
const types = allowedTypesForZone(config, zone_1);
|
|
307
|
+
if (types.length === 0) {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
return /*#__PURE__*/_jsx(EmptySlot, {
|
|
311
|
+
el: el_2,
|
|
312
|
+
doc: doc,
|
|
313
|
+
zoom: zoom,
|
|
314
|
+
zone: zone_1.zoneCompound,
|
|
315
|
+
allowedTypes: types,
|
|
316
|
+
label: tBlocks.addBlock
|
|
317
|
+
}, zone_1.zoneCompound);
|
|
318
|
+
});
|
|
319
|
+
let t8;
|
|
320
|
+
if ($[9] !== t6 || $[10] !== t7) {
|
|
321
|
+
t8 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
322
|
+
children: [t6, t7]
|
|
323
|
+
});
|
|
324
|
+
$[9] = t6;
|
|
325
|
+
$[10] = t7;
|
|
326
|
+
$[11] = t8;
|
|
327
|
+
} else {
|
|
328
|
+
t8 = $[11];
|
|
329
|
+
}
|
|
330
|
+
return t8;
|
|
331
|
+
}
|
|
332
|
+
function _temp6(zone) {
|
|
333
|
+
return zone.items.length === 0;
|
|
334
|
+
}
|
|
335
|
+
function _temp5(s_3) {
|
|
336
|
+
return s_3.getSelectorForId;
|
|
337
|
+
}
|
|
338
|
+
function _temp4(s_2) {
|
|
339
|
+
return s_2.appState.ui.previewMode;
|
|
340
|
+
}
|
|
341
|
+
function _temp3(s_1) {
|
|
342
|
+
return s_1.appState.ui.isDragging;
|
|
343
|
+
}
|
|
344
|
+
function _temp2(s_0) {
|
|
345
|
+
return s_0.appState.data.content;
|
|
346
|
+
}
|
|
347
|
+
function _temp(s) {
|
|
348
|
+
return s.config;
|
|
349
|
+
}
|
|
350
|
+
function useSuppressDropzoneHover(open) {
|
|
351
|
+
const $ = _c(3);
|
|
352
|
+
let t0;
|
|
353
|
+
let t1;
|
|
354
|
+
if ($[0] !== open) {
|
|
355
|
+
t0 = () => {
|
|
356
|
+
if (!open) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
const previews = [...document.querySelectorAll("[data-puck-preview]")].map(_temp7);
|
|
360
|
+
const strip = () => previews.forEach(_temp8);
|
|
361
|
+
strip();
|
|
362
|
+
const observer = new MutationObserver(strip);
|
|
363
|
+
previews.forEach(t2 => {
|
|
364
|
+
const {
|
|
365
|
+
el: el_1
|
|
366
|
+
} = t2;
|
|
367
|
+
return observer.observe(el_1, {
|
|
368
|
+
attributes: true,
|
|
369
|
+
attributeFilter: ["data-puck-preview"]
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
return () => {
|
|
373
|
+
observer.disconnect();
|
|
374
|
+
previews.forEach(_temp9);
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
t1 = [open];
|
|
378
|
+
$[0] = open;
|
|
379
|
+
$[1] = t0;
|
|
380
|
+
$[2] = t1;
|
|
381
|
+
} else {
|
|
382
|
+
t0 = $[1];
|
|
383
|
+
t1 = $[2];
|
|
384
|
+
}
|
|
385
|
+
useEffect(t0, t1);
|
|
386
|
+
}
|
|
387
|
+
function _temp9(t0) {
|
|
388
|
+
const {
|
|
389
|
+
el: el_2,
|
|
390
|
+
value
|
|
391
|
+
} = t0;
|
|
392
|
+
return el_2.setAttribute("data-puck-preview", value ?? "");
|
|
393
|
+
}
|
|
394
|
+
function _temp8(t0) {
|
|
395
|
+
const {
|
|
396
|
+
el: el_0
|
|
397
|
+
} = t0;
|
|
398
|
+
return el_0.removeAttribute("data-puck-preview");
|
|
399
|
+
}
|
|
400
|
+
function _temp7(el) {
|
|
401
|
+
return {
|
|
402
|
+
el,
|
|
403
|
+
value: el.getAttribute("data-puck-preview")
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
function InsertGap(t0) {
|
|
407
|
+
const $ = _c(55);
|
|
408
|
+
const {
|
|
409
|
+
target,
|
|
410
|
+
position,
|
|
411
|
+
clamp,
|
|
412
|
+
doc,
|
|
413
|
+
zoom,
|
|
414
|
+
zone,
|
|
415
|
+
insertAt,
|
|
416
|
+
allowedTypes,
|
|
417
|
+
label,
|
|
418
|
+
open,
|
|
419
|
+
onOpenChange,
|
|
420
|
+
onDone
|
|
421
|
+
} = t0;
|
|
422
|
+
const buttonRef = useRef(null);
|
|
423
|
+
const wrapperRef = useRef(null);
|
|
424
|
+
const anchor = useVirtualAnchor(buttonRef);
|
|
425
|
+
let t1;
|
|
426
|
+
if ($[0] !== onOpenChange) {
|
|
427
|
+
t1 = () => onOpenChange(false);
|
|
428
|
+
$[0] = onOpenChange;
|
|
429
|
+
$[1] = t1;
|
|
430
|
+
} else {
|
|
431
|
+
t1 = $[1];
|
|
432
|
+
}
|
|
433
|
+
useCloseOnCanvasInteraction(doc, open, wrapperRef, t1);
|
|
434
|
+
useSuppressDropzoneHover(open);
|
|
435
|
+
const win = doc.defaultView;
|
|
436
|
+
if (!win) {
|
|
437
|
+
return null;
|
|
438
|
+
}
|
|
439
|
+
let t2;
|
|
440
|
+
if ($[2] !== target.el) {
|
|
441
|
+
t2 = target.el.getBoundingClientRect();
|
|
442
|
+
$[2] = target.el;
|
|
443
|
+
$[3] = t2;
|
|
444
|
+
} else {
|
|
445
|
+
t2 = $[3];
|
|
446
|
+
}
|
|
447
|
+
const rect = t2;
|
|
448
|
+
const docEnd = doc.body.offsetTop + doc.body.offsetHeight;
|
|
449
|
+
const wouldOverflowEnd = rect.bottom + win.scrollY + 12 / zoom > docEnd;
|
|
450
|
+
const effectiveClamp = clamp === "end" ? wouldOverflowEnd ? "end" : undefined : clamp;
|
|
451
|
+
const t3 = rect.top + win.scrollY + (position === "top" ? 0 : rect.height);
|
|
452
|
+
const t4 = rect.left + win.scrollX;
|
|
453
|
+
let t5;
|
|
454
|
+
if ($[4] !== rect.width || $[5] !== t3 || $[6] !== t4) {
|
|
455
|
+
t5 = {
|
|
456
|
+
top: t3,
|
|
457
|
+
left: t4,
|
|
458
|
+
width: rect.width,
|
|
459
|
+
height: 0
|
|
460
|
+
};
|
|
461
|
+
$[4] = rect.width;
|
|
462
|
+
$[5] = t3;
|
|
463
|
+
$[6] = t4;
|
|
464
|
+
$[7] = t5;
|
|
465
|
+
} else {
|
|
466
|
+
t5 = $[7];
|
|
467
|
+
}
|
|
468
|
+
const t6 = effectiveClamp === "end";
|
|
469
|
+
const t7 = !effectiveClamp;
|
|
470
|
+
let t8;
|
|
471
|
+
if ($[8] !== t6 || $[9] !== t7) {
|
|
472
|
+
t8 = cn("nh:absolute nh:inset-x-0 nh:rounded-full nh:bg-(--nh-primary)", {
|
|
473
|
+
"nh:-translate-y-full": t6,
|
|
474
|
+
"nh:-translate-y-1/2": t7
|
|
475
|
+
});
|
|
476
|
+
$[8] = t6;
|
|
477
|
+
$[9] = t7;
|
|
478
|
+
$[10] = t8;
|
|
479
|
+
} else {
|
|
480
|
+
t8 = $[10];
|
|
481
|
+
}
|
|
482
|
+
const t9 = 0.5 / zoom;
|
|
483
|
+
let t10;
|
|
484
|
+
if ($[11] !== t9) {
|
|
485
|
+
t10 = {
|
|
486
|
+
height: t9
|
|
487
|
+
};
|
|
488
|
+
$[11] = t9;
|
|
489
|
+
$[12] = t10;
|
|
490
|
+
} else {
|
|
491
|
+
t10 = $[12];
|
|
492
|
+
}
|
|
493
|
+
let t11;
|
|
494
|
+
if ($[13] !== t10 || $[14] !== t8) {
|
|
495
|
+
t11 = /*#__PURE__*/_jsx("div", {
|
|
496
|
+
className: t8,
|
|
497
|
+
style: t10
|
|
498
|
+
});
|
|
499
|
+
$[13] = t10;
|
|
500
|
+
$[14] = t8;
|
|
501
|
+
$[15] = t11;
|
|
502
|
+
} else {
|
|
503
|
+
t11 = $[15];
|
|
504
|
+
}
|
|
505
|
+
let t12;
|
|
506
|
+
if ($[16] !== anchor) {
|
|
507
|
+
t12 = /*#__PURE__*/_jsx(PopoverAnchor, {
|
|
508
|
+
virtualRef: anchor
|
|
509
|
+
});
|
|
510
|
+
$[16] = anchor;
|
|
511
|
+
$[17] = t12;
|
|
512
|
+
} else {
|
|
513
|
+
t12 = $[17];
|
|
514
|
+
}
|
|
515
|
+
let t13;
|
|
516
|
+
if ($[18] !== onOpenChange || $[19] !== open) {
|
|
517
|
+
t13 = e_0 => {
|
|
518
|
+
e_0.stopPropagation();
|
|
519
|
+
onOpenChange(!open);
|
|
520
|
+
};
|
|
521
|
+
$[18] = onOpenChange;
|
|
522
|
+
$[19] = open;
|
|
523
|
+
$[20] = t13;
|
|
524
|
+
} else {
|
|
525
|
+
t13 = $[20];
|
|
526
|
+
}
|
|
527
|
+
const t14 = `scale(${1 / zoom})`;
|
|
528
|
+
let t15;
|
|
529
|
+
let t16;
|
|
530
|
+
if ($[21] !== effectiveClamp) {
|
|
531
|
+
t15 = effectiveClamp === "end" ? {
|
|
532
|
+
transformOrigin: "bottom"
|
|
533
|
+
} : {};
|
|
534
|
+
t16 = effectiveClamp === "start" ? {
|
|
535
|
+
transformOrigin: "top"
|
|
536
|
+
} : {};
|
|
537
|
+
$[21] = effectiveClamp;
|
|
538
|
+
$[22] = t15;
|
|
539
|
+
$[23] = t16;
|
|
540
|
+
} else {
|
|
541
|
+
t15 = $[22];
|
|
542
|
+
t16 = $[23];
|
|
543
|
+
}
|
|
544
|
+
let t17;
|
|
545
|
+
if ($[24] !== t14 || $[25] !== t15 || $[26] !== t16) {
|
|
546
|
+
t17 = {
|
|
547
|
+
pointerEvents: "auto",
|
|
548
|
+
transform: t14,
|
|
549
|
+
...t15,
|
|
550
|
+
...t16
|
|
551
|
+
};
|
|
552
|
+
$[24] = t14;
|
|
553
|
+
$[25] = t15;
|
|
554
|
+
$[26] = t16;
|
|
555
|
+
$[27] = t17;
|
|
556
|
+
} else {
|
|
557
|
+
t17 = $[27];
|
|
558
|
+
}
|
|
559
|
+
const t18 = effectiveClamp === "end";
|
|
560
|
+
const t19 = !effectiveClamp;
|
|
561
|
+
let t20;
|
|
562
|
+
if ($[28] !== t18 || $[29] !== t19) {
|
|
563
|
+
t20 = cn("nh:absolute nh:top-0 nh:left-1/2 nh:flex nh:size-5 nh:-translate-x-1/2 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-full nh:bg-(--nh-bg) nh:text-(--nh-primary) nh:transition nh:hover:scale-110 nh:hover:bg-(--nh-primary) nh:hover:text-(--nh-bg)", {
|
|
564
|
+
"nh:-translate-y-full": t18,
|
|
565
|
+
"nh:-translate-y-1/2": t19
|
|
566
|
+
});
|
|
567
|
+
$[28] = t18;
|
|
568
|
+
$[29] = t19;
|
|
569
|
+
$[30] = t20;
|
|
570
|
+
} else {
|
|
571
|
+
t20 = $[30];
|
|
572
|
+
}
|
|
573
|
+
let t21;
|
|
574
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
575
|
+
t21 = /*#__PURE__*/_jsx(CirclePlusIcon, {
|
|
576
|
+
className: "nh:size-5"
|
|
577
|
+
});
|
|
578
|
+
$[31] = t21;
|
|
579
|
+
} else {
|
|
580
|
+
t21 = $[31];
|
|
581
|
+
}
|
|
582
|
+
let t22;
|
|
583
|
+
if ($[32] !== label || $[33] !== t13 || $[34] !== t17 || $[35] !== t20) {
|
|
584
|
+
t22 = /*#__PURE__*/_jsx("button", {
|
|
585
|
+
type: "button",
|
|
586
|
+
ref: buttonRef,
|
|
587
|
+
title: label,
|
|
588
|
+
"aria-label": label,
|
|
589
|
+
onPointerDown: _temp0,
|
|
590
|
+
onClick: t13,
|
|
591
|
+
style: t17,
|
|
592
|
+
className: t20,
|
|
593
|
+
children: t21
|
|
594
|
+
});
|
|
595
|
+
$[32] = label;
|
|
596
|
+
$[33] = t13;
|
|
597
|
+
$[34] = t17;
|
|
598
|
+
$[35] = t20;
|
|
599
|
+
$[36] = t22;
|
|
600
|
+
} else {
|
|
601
|
+
t22 = $[36];
|
|
602
|
+
}
|
|
603
|
+
let t23;
|
|
604
|
+
if ($[37] !== allowedTypes || $[38] !== insertAt || $[39] !== onDone || $[40] !== zone) {
|
|
605
|
+
t23 = /*#__PURE__*/_jsx(PopoverContent, {
|
|
606
|
+
align: "center",
|
|
607
|
+
className: "nh:w-64 nh:p-2",
|
|
608
|
+
children: /*#__PURE__*/_jsx(CanvasAddPicker, {
|
|
609
|
+
zone: zone,
|
|
610
|
+
index: insertAt,
|
|
611
|
+
allowedTypes: allowedTypes,
|
|
612
|
+
onDone: onDone
|
|
613
|
+
})
|
|
614
|
+
});
|
|
615
|
+
$[37] = allowedTypes;
|
|
616
|
+
$[38] = insertAt;
|
|
617
|
+
$[39] = onDone;
|
|
618
|
+
$[40] = zone;
|
|
619
|
+
$[41] = t23;
|
|
620
|
+
} else {
|
|
621
|
+
t23 = $[41];
|
|
622
|
+
}
|
|
623
|
+
let t24;
|
|
624
|
+
if ($[42] !== onOpenChange || $[43] !== open || $[44] !== t12 || $[45] !== t22 || $[46] !== t23) {
|
|
625
|
+
t24 = /*#__PURE__*/_jsxs(Popover, {
|
|
626
|
+
open: open,
|
|
627
|
+
onOpenChange: onOpenChange,
|
|
628
|
+
children: [t12, t22, t23]
|
|
629
|
+
});
|
|
630
|
+
$[42] = onOpenChange;
|
|
631
|
+
$[43] = open;
|
|
632
|
+
$[44] = t12;
|
|
633
|
+
$[45] = t22;
|
|
634
|
+
$[46] = t23;
|
|
635
|
+
$[47] = t24;
|
|
636
|
+
} else {
|
|
637
|
+
t24 = $[47];
|
|
638
|
+
}
|
|
639
|
+
let t25;
|
|
640
|
+
if ($[48] !== t11 || $[49] !== t24 || $[50] !== t5) {
|
|
641
|
+
t25 = /*#__PURE__*/_jsxs("div", {
|
|
642
|
+
ref: wrapperRef,
|
|
643
|
+
"data-nh-quick-add": "",
|
|
644
|
+
className: "nh:pointer-events-none nh:absolute nh:z-999",
|
|
645
|
+
style: t5,
|
|
646
|
+
children: [t11, t24]
|
|
647
|
+
});
|
|
648
|
+
$[48] = t11;
|
|
649
|
+
$[49] = t24;
|
|
650
|
+
$[50] = t5;
|
|
651
|
+
$[51] = t25;
|
|
652
|
+
} else {
|
|
653
|
+
t25 = $[51];
|
|
654
|
+
}
|
|
655
|
+
let t26;
|
|
656
|
+
if ($[52] !== doc.body || $[53] !== t25) {
|
|
657
|
+
t26 = /*#__PURE__*/createPortal(t25, doc.body);
|
|
658
|
+
$[52] = doc.body;
|
|
659
|
+
$[53] = t25;
|
|
660
|
+
$[54] = t26;
|
|
661
|
+
} else {
|
|
662
|
+
t26 = $[54];
|
|
663
|
+
}
|
|
664
|
+
return t26;
|
|
665
|
+
}
|
|
666
|
+
function _temp0(e) {
|
|
667
|
+
return e.stopPropagation();
|
|
668
|
+
}
|
|
669
|
+
function EmptySlot(t0) {
|
|
670
|
+
const $ = _c(26);
|
|
671
|
+
const {
|
|
672
|
+
el,
|
|
673
|
+
doc,
|
|
674
|
+
zoom,
|
|
675
|
+
zone,
|
|
676
|
+
allowedTypes,
|
|
677
|
+
label
|
|
678
|
+
} = t0;
|
|
679
|
+
const [open, setOpen] = useState(false);
|
|
680
|
+
const buttonRef = useRef(null);
|
|
681
|
+
const wrapperRef = useRef(null);
|
|
682
|
+
const anchor = useVirtualAnchor(buttonRef);
|
|
683
|
+
let t1;
|
|
684
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
685
|
+
t1 = () => setOpen(false);
|
|
686
|
+
$[0] = t1;
|
|
687
|
+
} else {
|
|
688
|
+
t1 = $[0];
|
|
689
|
+
}
|
|
690
|
+
useCloseOnCanvasInteraction(doc, open, wrapperRef, t1);
|
|
691
|
+
useSuppressDropzoneHover(open);
|
|
692
|
+
let t2;
|
|
693
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
694
|
+
t2 = {
|
|
695
|
+
opacity: 1,
|
|
696
|
+
background: "var(--puck-color-selection-bg)",
|
|
697
|
+
outline: "var(--puck-border-width-focus) dashed var(--puck-color-selection-border)",
|
|
698
|
+
outlineOffset: "calc(var(--puck-border-width-focus) * -1)"
|
|
699
|
+
};
|
|
700
|
+
$[1] = t2;
|
|
701
|
+
} else {
|
|
702
|
+
t2 = $[1];
|
|
703
|
+
}
|
|
704
|
+
let t3;
|
|
705
|
+
if ($[2] !== anchor) {
|
|
706
|
+
t3 = /*#__PURE__*/_jsx(PopoverAnchor, {
|
|
707
|
+
virtualRef: anchor
|
|
708
|
+
});
|
|
709
|
+
$[2] = anchor;
|
|
710
|
+
$[3] = t3;
|
|
711
|
+
} else {
|
|
712
|
+
t3 = $[3];
|
|
713
|
+
}
|
|
714
|
+
let t4;
|
|
715
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
716
|
+
t4 = node => {
|
|
717
|
+
buttonRef.current = node;
|
|
718
|
+
node?.style.setProperty("pointer-events", "auto", "important");
|
|
719
|
+
};
|
|
720
|
+
$[4] = t4;
|
|
721
|
+
} else {
|
|
722
|
+
t4 = $[4];
|
|
723
|
+
}
|
|
724
|
+
let t5;
|
|
725
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
726
|
+
t5 = e_0 => {
|
|
727
|
+
e_0.stopPropagation();
|
|
728
|
+
setOpen(_temp10);
|
|
729
|
+
};
|
|
730
|
+
$[5] = t5;
|
|
731
|
+
} else {
|
|
732
|
+
t5 = $[5];
|
|
733
|
+
}
|
|
734
|
+
const t6 = `scale(${1 / zoom})`;
|
|
735
|
+
let t7;
|
|
736
|
+
if ($[6] !== t6) {
|
|
737
|
+
t7 = {
|
|
738
|
+
transform: t6
|
|
739
|
+
};
|
|
740
|
+
$[6] = t6;
|
|
741
|
+
$[7] = t7;
|
|
742
|
+
} else {
|
|
743
|
+
t7 = $[7];
|
|
744
|
+
}
|
|
745
|
+
let t8;
|
|
746
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
747
|
+
t8 = /*#__PURE__*/_jsx(CirclePlusIcon, {
|
|
748
|
+
className: "nh:size-4 nh:shrink-0"
|
|
749
|
+
});
|
|
750
|
+
$[8] = t8;
|
|
751
|
+
} else {
|
|
752
|
+
t8 = $[8];
|
|
753
|
+
}
|
|
754
|
+
let t9;
|
|
755
|
+
if ($[9] !== label) {
|
|
756
|
+
t9 = /*#__PURE__*/_jsx("span", {
|
|
757
|
+
children: label
|
|
758
|
+
});
|
|
759
|
+
$[9] = label;
|
|
760
|
+
$[10] = t9;
|
|
761
|
+
} else {
|
|
762
|
+
t9 = $[10];
|
|
763
|
+
}
|
|
764
|
+
let t10;
|
|
765
|
+
if ($[11] !== t7 || $[12] !== t9) {
|
|
766
|
+
t10 = /*#__PURE__*/_jsxs("button", {
|
|
767
|
+
type: "button",
|
|
768
|
+
ref: t4,
|
|
769
|
+
onPointerDown: _temp1,
|
|
770
|
+
onClick: t5,
|
|
771
|
+
style: t7,
|
|
772
|
+
className: "nh:flex nh:cursor-pointer nh:items-center nh:gap-1 nh:rounded nh:px-2 nh:py-1 nh:text-sm nh:text-(--nh-primary) nh:hover:bg-(--nh-bg)",
|
|
773
|
+
children: [t8, t9]
|
|
774
|
+
});
|
|
775
|
+
$[11] = t7;
|
|
776
|
+
$[12] = t9;
|
|
777
|
+
$[13] = t10;
|
|
778
|
+
} else {
|
|
779
|
+
t10 = $[13];
|
|
780
|
+
}
|
|
781
|
+
let t11;
|
|
782
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
783
|
+
t11 = () => setOpen(false);
|
|
784
|
+
$[14] = t11;
|
|
785
|
+
} else {
|
|
786
|
+
t11 = $[14];
|
|
787
|
+
}
|
|
788
|
+
let t12;
|
|
789
|
+
if ($[15] !== allowedTypes || $[16] !== zone) {
|
|
790
|
+
t12 = /*#__PURE__*/_jsx(PopoverContent, {
|
|
791
|
+
align: "center",
|
|
792
|
+
className: "nh:w-64 nh:p-2",
|
|
793
|
+
children: /*#__PURE__*/_jsx(CanvasAddPicker, {
|
|
794
|
+
zone: zone,
|
|
795
|
+
index: 0,
|
|
796
|
+
allowedTypes: allowedTypes,
|
|
797
|
+
onDone: t11
|
|
798
|
+
})
|
|
799
|
+
});
|
|
800
|
+
$[15] = allowedTypes;
|
|
801
|
+
$[16] = zone;
|
|
802
|
+
$[17] = t12;
|
|
803
|
+
} else {
|
|
804
|
+
t12 = $[17];
|
|
805
|
+
}
|
|
806
|
+
let t13;
|
|
807
|
+
if ($[18] !== open || $[19] !== t10 || $[20] !== t12 || $[21] !== t3) {
|
|
808
|
+
t13 = /*#__PURE__*/_jsx("div", {
|
|
809
|
+
ref: wrapperRef,
|
|
810
|
+
"data-nh-quick-add": "",
|
|
811
|
+
className: "nh:pointer-events-none nh:absolute nh:inset-0 nh:z-10 nh:flex nh:items-center nh:justify-center",
|
|
812
|
+
style: t2,
|
|
813
|
+
children: /*#__PURE__*/_jsxs(Popover, {
|
|
814
|
+
open: open,
|
|
815
|
+
onOpenChange: setOpen,
|
|
816
|
+
children: [t3, t10, t12]
|
|
817
|
+
})
|
|
818
|
+
});
|
|
819
|
+
$[18] = open;
|
|
820
|
+
$[19] = t10;
|
|
821
|
+
$[20] = t12;
|
|
822
|
+
$[21] = t3;
|
|
823
|
+
$[22] = t13;
|
|
824
|
+
} else {
|
|
825
|
+
t13 = $[22];
|
|
826
|
+
}
|
|
827
|
+
let t14;
|
|
828
|
+
if ($[23] !== el || $[24] !== t13) {
|
|
829
|
+
t14 = /*#__PURE__*/createPortal(t13, el);
|
|
830
|
+
$[23] = el;
|
|
831
|
+
$[24] = t13;
|
|
832
|
+
$[25] = t14;
|
|
833
|
+
} else {
|
|
834
|
+
t14 = $[25];
|
|
835
|
+
}
|
|
836
|
+
return t14;
|
|
837
|
+
}
|
|
838
|
+
function _temp10(prev) {
|
|
839
|
+
return !prev;
|
|
840
|
+
}
|
|
841
|
+
function _temp1(e) {
|
|
842
|
+
return e.stopPropagation();
|
|
843
|
+
}
|
|
844
|
+
//# sourceMappingURL=canvas-quick-add.js.map
|