@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,9 @@
|
|
|
1
|
+
type CanvasAddPickerProps = {
|
|
2
|
+
zone: string;
|
|
3
|
+
index: number;
|
|
4
|
+
allowedTypes: string[];
|
|
5
|
+
onDone: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function CanvasAddPicker({ zone, index, allowedTypes, onDone, }: CanvasAddPickerProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=canvas-add-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-add-picker.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/canvas-add-picker.tsx"],"names":[],"mappings":"AAeA,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,MAAM,GACP,EAAE,oBAAoB,+BAqGtB"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { usePuckDictionary, usePuckLocale } from '../i18n';
|
|
6
|
+
import { sectionComponentTypes } from '../plugins/outline-plugin/outline-tree';
|
|
7
|
+
import { SearchControl } from '../ui/search-control';
|
|
8
|
+
import { GroupedEntryList, PickerEntryButton } from './grouped-entry-list';
|
|
9
|
+
import { templateEntry, usePickerModel } from './picker-model';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
export function CanvasAddPicker(t0) {
|
|
12
|
+
const $ = _c(60);
|
|
13
|
+
const {
|
|
14
|
+
zone,
|
|
15
|
+
index,
|
|
16
|
+
allowedTypes,
|
|
17
|
+
onDone
|
|
18
|
+
} = t0;
|
|
19
|
+
const tOutline = usePuckDictionary().outline;
|
|
20
|
+
const tSections = usePuckDictionary().sections;
|
|
21
|
+
const tBlocks = usePuckDictionary().blocks;
|
|
22
|
+
const locale = usePuckLocale();
|
|
23
|
+
const {
|
|
24
|
+
config,
|
|
25
|
+
pinnedSectionEntries,
|
|
26
|
+
sectionGroups,
|
|
27
|
+
customSectionTemplates,
|
|
28
|
+
pinnedBlockEntries,
|
|
29
|
+
blockGroups,
|
|
30
|
+
canInsertType,
|
|
31
|
+
insertEntry
|
|
32
|
+
} = usePickerModel();
|
|
33
|
+
const [query, setQuery] = useState("");
|
|
34
|
+
let t1;
|
|
35
|
+
if ($[0] !== allowedTypes) {
|
|
36
|
+
t1 = new Set(allowedTypes);
|
|
37
|
+
$[0] = allowedTypes;
|
|
38
|
+
$[1] = t1;
|
|
39
|
+
} else {
|
|
40
|
+
t1 = $[1];
|
|
41
|
+
}
|
|
42
|
+
const allowed = t1;
|
|
43
|
+
const sectionTypeList = sectionComponentTypes(config);
|
|
44
|
+
const canHoldSections = allowedTypes.some(type => sectionTypeList.includes(type));
|
|
45
|
+
const canHoldBlocks = allowedTypes.some(type_0 => !sectionTypeList.includes(type_0));
|
|
46
|
+
const searchPlaceholder = canHoldSections && canHoldBlocks ? tOutline.searchPlaceholder : canHoldSections ? tSections.searchPlaceholder : tBlocks.searchPlaceholder;
|
|
47
|
+
let t2;
|
|
48
|
+
if ($[2] !== allowed || $[3] !== canInsertType || $[4] !== query) {
|
|
49
|
+
t2 = entry => allowed.has(entry.primaryType) && (entry.template || canInsertType(entry.primaryType)) && (!query || entry.label.toLowerCase().includes(query.toLowerCase()));
|
|
50
|
+
$[2] = allowed;
|
|
51
|
+
$[3] = canInsertType;
|
|
52
|
+
$[4] = query;
|
|
53
|
+
$[5] = t2;
|
|
54
|
+
} else {
|
|
55
|
+
t2 = $[5];
|
|
56
|
+
}
|
|
57
|
+
const matches = t2;
|
|
58
|
+
let t3;
|
|
59
|
+
if ($[6] !== matches) {
|
|
60
|
+
t3 = (groups, prefix) => groups.map(group => ({
|
|
61
|
+
...group,
|
|
62
|
+
key: `${prefix}${group.key}`,
|
|
63
|
+
entries: group.entries.filter(matches)
|
|
64
|
+
})).filter(_temp);
|
|
65
|
+
$[6] = matches;
|
|
66
|
+
$[7] = t3;
|
|
67
|
+
} else {
|
|
68
|
+
t3 = $[7];
|
|
69
|
+
}
|
|
70
|
+
const filterGroups = t3;
|
|
71
|
+
let t4;
|
|
72
|
+
if ($[8] !== locale || $[9] !== matches) {
|
|
73
|
+
t4 = (key, label, templates) => {
|
|
74
|
+
const entries = templates.map(template => templateEntry(template, locale)).filter(matches);
|
|
75
|
+
return entries.length > 0 ? [{
|
|
76
|
+
key,
|
|
77
|
+
label,
|
|
78
|
+
entries
|
|
79
|
+
}] : [];
|
|
80
|
+
};
|
|
81
|
+
$[8] = locale;
|
|
82
|
+
$[9] = matches;
|
|
83
|
+
$[10] = t4;
|
|
84
|
+
} else {
|
|
85
|
+
t4 = $[10];
|
|
86
|
+
}
|
|
87
|
+
const customGroup = t4;
|
|
88
|
+
let t5;
|
|
89
|
+
if ($[11] !== blockGroups || $[12] !== customGroup || $[13] !== customSectionTemplates || $[14] !== filterGroups || $[15] !== sectionGroups || $[16] !== tSections.customSections) {
|
|
90
|
+
const t6 = filterGroups(sectionGroups, "s:");
|
|
91
|
+
let t7;
|
|
92
|
+
if ($[18] !== customGroup || $[19] !== customSectionTemplates || $[20] !== tSections.customSections) {
|
|
93
|
+
t7 = customGroup("custom-sections", tSections.customSections, customSectionTemplates);
|
|
94
|
+
$[18] = customGroup;
|
|
95
|
+
$[19] = customSectionTemplates;
|
|
96
|
+
$[20] = tSections.customSections;
|
|
97
|
+
$[21] = t7;
|
|
98
|
+
} else {
|
|
99
|
+
t7 = $[21];
|
|
100
|
+
}
|
|
101
|
+
t5 = [...t6, ...t7, ...filterGroups(blockGroups, "b:")];
|
|
102
|
+
$[11] = blockGroups;
|
|
103
|
+
$[12] = customGroup;
|
|
104
|
+
$[13] = customSectionTemplates;
|
|
105
|
+
$[14] = filterGroups;
|
|
106
|
+
$[15] = sectionGroups;
|
|
107
|
+
$[16] = tSections.customSections;
|
|
108
|
+
$[17] = t5;
|
|
109
|
+
} else {
|
|
110
|
+
t5 = $[17];
|
|
111
|
+
}
|
|
112
|
+
const groups_0 = t5;
|
|
113
|
+
let T0;
|
|
114
|
+
let renderEntry;
|
|
115
|
+
let t6;
|
|
116
|
+
let t7;
|
|
117
|
+
let t8;
|
|
118
|
+
let t9;
|
|
119
|
+
if ($[22] !== config || $[23] !== groups_0 || $[24] !== index || $[25] !== insertEntry || $[26] !== matches || $[27] !== onDone || $[28] !== pinnedBlockEntries || $[29] !== pinnedSectionEntries || $[30] !== query || $[31] !== searchPlaceholder || $[32] !== zone) {
|
|
120
|
+
const pinned = [...pinnedSectionEntries, ...pinnedBlockEntries].filter(matches);
|
|
121
|
+
let t10;
|
|
122
|
+
if ($[39] !== index || $[40] !== insertEntry || $[41] !== onDone || $[42] !== zone) {
|
|
123
|
+
t10 = entry_0 => {
|
|
124
|
+
insertEntry(entry_0, {
|
|
125
|
+
zone,
|
|
126
|
+
index
|
|
127
|
+
});
|
|
128
|
+
onDone();
|
|
129
|
+
};
|
|
130
|
+
$[39] = index;
|
|
131
|
+
$[40] = insertEntry;
|
|
132
|
+
$[41] = onDone;
|
|
133
|
+
$[42] = zone;
|
|
134
|
+
$[43] = t10;
|
|
135
|
+
} else {
|
|
136
|
+
t10 = $[43];
|
|
137
|
+
}
|
|
138
|
+
const pick = t10;
|
|
139
|
+
let t11;
|
|
140
|
+
if ($[44] !== config || $[45] !== pick) {
|
|
141
|
+
t11 = entry_1 => /*#__PURE__*/_jsx(PickerEntryButton, {
|
|
142
|
+
config: config,
|
|
143
|
+
entry: entry_1,
|
|
144
|
+
onPick: pick
|
|
145
|
+
}, entry_1.key);
|
|
146
|
+
$[44] = config;
|
|
147
|
+
$[45] = pick;
|
|
148
|
+
$[46] = t11;
|
|
149
|
+
} else {
|
|
150
|
+
t11 = $[46];
|
|
151
|
+
}
|
|
152
|
+
renderEntry = t11;
|
|
153
|
+
t8 = "nh:flex nh:flex-col nh:gap-2.5";
|
|
154
|
+
if ($[47] !== query || $[48] !== searchPlaceholder) {
|
|
155
|
+
t9 = /*#__PURE__*/_jsx(SearchControl, {
|
|
156
|
+
autoFocus: true,
|
|
157
|
+
compact: true,
|
|
158
|
+
value: query,
|
|
159
|
+
onChange: setQuery,
|
|
160
|
+
placeholder: searchPlaceholder
|
|
161
|
+
});
|
|
162
|
+
$[47] = query;
|
|
163
|
+
$[48] = searchPlaceholder;
|
|
164
|
+
$[49] = t9;
|
|
165
|
+
} else {
|
|
166
|
+
t9 = $[49];
|
|
167
|
+
}
|
|
168
|
+
T0 = GroupedEntryList;
|
|
169
|
+
t6 = groups_0;
|
|
170
|
+
t7 = pinned.length > 0 ? pinned.map(renderEntry) : undefined;
|
|
171
|
+
$[22] = config;
|
|
172
|
+
$[23] = groups_0;
|
|
173
|
+
$[24] = index;
|
|
174
|
+
$[25] = insertEntry;
|
|
175
|
+
$[26] = matches;
|
|
176
|
+
$[27] = onDone;
|
|
177
|
+
$[28] = pinnedBlockEntries;
|
|
178
|
+
$[29] = pinnedSectionEntries;
|
|
179
|
+
$[30] = query;
|
|
180
|
+
$[31] = searchPlaceholder;
|
|
181
|
+
$[32] = zone;
|
|
182
|
+
$[33] = T0;
|
|
183
|
+
$[34] = renderEntry;
|
|
184
|
+
$[35] = t6;
|
|
185
|
+
$[36] = t7;
|
|
186
|
+
$[37] = t8;
|
|
187
|
+
$[38] = t9;
|
|
188
|
+
} else {
|
|
189
|
+
T0 = $[33];
|
|
190
|
+
renderEntry = $[34];
|
|
191
|
+
t6 = $[35];
|
|
192
|
+
t7 = $[36];
|
|
193
|
+
t8 = $[37];
|
|
194
|
+
t9 = $[38];
|
|
195
|
+
}
|
|
196
|
+
let t10;
|
|
197
|
+
if ($[50] !== T0 || $[51] !== renderEntry || $[52] !== t6 || $[53] !== t7 || $[54] !== tOutline.noResults) {
|
|
198
|
+
t10 = /*#__PURE__*/_jsx(T0, {
|
|
199
|
+
groups: t6,
|
|
200
|
+
leading: t7,
|
|
201
|
+
noResultsLabel: tOutline.noResults,
|
|
202
|
+
renderEntry: renderEntry
|
|
203
|
+
});
|
|
204
|
+
$[50] = T0;
|
|
205
|
+
$[51] = renderEntry;
|
|
206
|
+
$[52] = t6;
|
|
207
|
+
$[53] = t7;
|
|
208
|
+
$[54] = tOutline.noResults;
|
|
209
|
+
$[55] = t10;
|
|
210
|
+
} else {
|
|
211
|
+
t10 = $[55];
|
|
212
|
+
}
|
|
213
|
+
let t11;
|
|
214
|
+
if ($[56] !== t10 || $[57] !== t8 || $[58] !== t9) {
|
|
215
|
+
t11 = /*#__PURE__*/_jsxs("div", {
|
|
216
|
+
className: t8,
|
|
217
|
+
children: [t9, t10]
|
|
218
|
+
});
|
|
219
|
+
$[56] = t10;
|
|
220
|
+
$[57] = t8;
|
|
221
|
+
$[58] = t9;
|
|
222
|
+
$[59] = t11;
|
|
223
|
+
} else {
|
|
224
|
+
t11 = $[59];
|
|
225
|
+
}
|
|
226
|
+
return t11;
|
|
227
|
+
}
|
|
228
|
+
function _temp(group_0) {
|
|
229
|
+
return group_0.entries.length > 0;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=canvas-add-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-add-picker.js","names":["c","_c","useState","usePuckDictionary","usePuckLocale","sectionComponentTypes","SearchControl","GroupedEntryList","PickerEntryButton","templateEntry","usePickerModel","jsx","_jsx","jsxs","_jsxs","CanvasAddPicker","t0","$","zone","index","allowedTypes","onDone","tOutline","outline","tSections","sections","tBlocks","blocks","locale","config","pinnedSectionEntries","sectionGroups","customSectionTemplates","pinnedBlockEntries","blockGroups","canInsertType","insertEntry","query","setQuery","t1","Set","allowed","sectionTypeList","canHoldSections","some","type","includes","canHoldBlocks","type_0","searchPlaceholder","t2","entry","has","primaryType","template","label","toLowerCase","matches","t3","groups","prefix","map","group","key","entries","filter","_temp","filterGroups","t4","templates","length","customGroup","t5","customSections","t6","t7","groups_0","T0","renderEntry","t8","t9","pinned","t10","entry_0","pick","t11","entry_1","autoFocus","compact","undefined","noResults","leading","noResultsLabel","className","children","group_0"],"sources":["../../../../src/puck-editor/internal/editor/canvas-add-picker.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\n\nimport { usePuckDictionary, usePuckLocale } from '../i18n';\nimport { sectionComponentTypes } from '../plugins/outline-plugin/outline-tree';\nimport { SearchControl } from '../ui/search-control';\nimport { GroupedEntryList, PickerEntryButton } from './grouped-entry-list';\nimport {\n PickerEntry,\n PickerGroup,\n templateEntry,\n usePickerModel,\n} from './picker-model';\n\ntype CanvasAddPickerProps = {\n zone: string;\n index: number;\n allowedTypes: string[];\n onDone: () => void;\n};\n\nexport function CanvasAddPicker({\n zone,\n index,\n allowedTypes,\n onDone,\n}: CanvasAddPickerProps) {\n const tOutline = usePuckDictionary().outline;\n const tSections = usePuckDictionary().sections;\n const tBlocks = usePuckDictionary().blocks;\n const locale = usePuckLocale();\n const {\n config,\n pinnedSectionEntries,\n sectionGroups,\n customSectionTemplates,\n pinnedBlockEntries,\n blockGroups,\n canInsertType,\n insertEntry,\n } = usePickerModel();\n\n const [query, setQuery] = useState('');\n const allowed = new Set(allowedTypes);\n const sectionTypeList = sectionComponentTypes(config);\n const canHoldSections = allowedTypes.some((type) =>\n sectionTypeList.includes(type)\n );\n const canHoldBlocks = allowedTypes.some(\n (type) => !sectionTypeList.includes(type)\n );\n const searchPlaceholder =\n canHoldSections && canHoldBlocks\n ? tOutline.searchPlaceholder\n : canHoldSections\n ? tSections.searchPlaceholder\n : tBlocks.searchPlaceholder;\n const matches = (entry: PickerEntry) =>\n allowed.has(entry.primaryType) &&\n (entry.template || canInsertType(entry.primaryType)) &&\n (!query || entry.label.toLowerCase().includes(query.toLowerCase()));\n\n const filterGroups = (groups: PickerGroup[], prefix: string) =>\n groups\n .map((group) => ({\n ...group,\n key: `${prefix}${group.key}`,\n entries: group.entries.filter(matches),\n }))\n .filter((group) => group.entries.length > 0);\n\n const customGroup = (\n key: string,\n label: string,\n templates: typeof customSectionTemplates\n ): PickerGroup[] => {\n const entries = templates\n .map((template) => templateEntry(template, locale))\n .filter(matches);\n return entries.length > 0 ? [{ key, label, entries }] : [];\n };\n\n const groups = [\n ...filterGroups(sectionGroups, 's:'),\n ...customGroup(\n 'custom-sections',\n tSections.customSections,\n customSectionTemplates\n ),\n ...filterGroups(blockGroups, 'b:'),\n ];\n\n const pinned = [...pinnedSectionEntries, ...pinnedBlockEntries].filter(\n matches\n );\n\n const pick = (entry: PickerEntry) => {\n insertEntry(entry, { zone, index });\n onDone();\n };\n\n const renderEntry = (entry: PickerEntry) => (\n <PickerEntryButton\n key={entry.key}\n config={config}\n entry={entry}\n onPick={pick}\n />\n );\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-2.5\">\n <SearchControl\n autoFocus\n compact\n value={query}\n onChange={setQuery}\n placeholder={searchPlaceholder}\n />\n <GroupedEntryList\n groups={groups}\n leading={pinned.length > 0 ? pinned.map(renderEntry) : undefined}\n noResultsLabel={tOutline.noResults}\n renderEntry={renderEntry}\n />\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAEhC,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,SAAS;AAC1D,SAASC,qBAAqB,QAAQ,wCAAwC;AAC9E,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,sBAAsB;AAC1E,SAGEC,aAAa,EACbC,cAAc,QACT,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA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SAAgC,EAAhCd,EAAgC;MAAAe,QAAA,GAC7Cd,EAME,EACFE,GAKE;IAAA,CACC,CAAC;IAAAjE,CAAA,OAAAiE,GAAA;IAAAjE,CAAA,OAAA8D,EAAA;IAAA9D,CAAA,OAAA+D,EAAA;IAAA/D,CAAA,OAAAoE,GAAA;EAAA;IAAAA,GAAA,GAAApE,CAAA;EAAA;EAAA,OAdNoE,GAcM;AAAA;AAxGH,SAAAnB,MAAA6B,OAAA;EAAA,OAgDkBjC,OAAK,CAAAE,OAAQ,CAAAM,MAAO,GAAG,CAAC;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-empty-state.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/canvas-empty-state.tsx"],"names":[],"mappings":"AAcA,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,IAAI,EACJ,YAAY,GACb,EAAE;IACD,EAAE,EAAE,WAAW,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,+BAgFA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { registerOverlayPortal } from '@puckeditor/core';
|
|
5
|
+
import { ChevronLeftIcon, LayoutTemplateIcon, PlusIcon } from 'lucide-react';
|
|
6
|
+
import { createPortal } from 'react-dom';
|
|
7
|
+
import { usePuckDictionary } from '../i18n';
|
|
8
|
+
import { ROOT_ZONE } from '../plugins/outline-plugin/outline-tree';
|
|
9
|
+
import { CanvasAddPicker } from './canvas-add-picker';
|
|
10
|
+
import { PageTemplatePicker } from './page-template-picker';
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export function CanvasEmptyState({
|
|
13
|
+
el,
|
|
14
|
+
zoom,
|
|
15
|
+
allowedTypes
|
|
16
|
+
}) {
|
|
17
|
+
const t = usePuckDictionary().canvas;
|
|
18
|
+
const tOutline = usePuckDictionary().outline;
|
|
19
|
+
const tCommon = usePuckDictionary().common;
|
|
20
|
+
const [view, setView] = useState('choice');
|
|
21
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/_jsx("div", {
|
|
22
|
+
className: "nh:pointer-events-none nh:absolute nh:inset-0 nh:z-10 nh:flex nh:items-center nh:justify-center nh:p-6",
|
|
23
|
+
style: {
|
|
24
|
+
opacity: 1
|
|
25
|
+
},
|
|
26
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
27
|
+
ref: node => registerOverlayPortal(node, {
|
|
28
|
+
disableDrag: true
|
|
29
|
+
}),
|
|
30
|
+
style: {
|
|
31
|
+
transform: `scale(${1 / zoom})`,
|
|
32
|
+
// Puck's overlay-portal hover outline hardcodes the azure primitive;
|
|
33
|
+
// scoping the variable to the card recolors just this outline.
|
|
34
|
+
['--puck-color-azure-09']: 'color-mix(in oklab, var(--nh-primary), white 67%)'
|
|
35
|
+
},
|
|
36
|
+
className: "nh-root nh:flex nh:w-full nh:max-w-md nh:flex-col nh:items-center nh:gap-4 nh:rounded-xl nh:border nh:border-dashed nh:border-gray-300 nh:bg-white/90 nh:p-8 nh:text-center nh:shadow-sm",
|
|
37
|
+
children: [view !== 'choice' && /*#__PURE__*/_jsxs("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
onClick: () => setView('choice'),
|
|
40
|
+
className: "nh:flex nh:items-center nh:gap-1 nh:self-start nh:text-sm nh:text-gray-500 nh:hover:text-gray-900",
|
|
41
|
+
children: [/*#__PURE__*/_jsx(ChevronLeftIcon, {
|
|
42
|
+
className: "nh:size-4"
|
|
43
|
+
}), tCommon.back]
|
|
44
|
+
}), view === 'choice' && /*#__PURE__*/_jsx("p", {
|
|
45
|
+
className: "nh:text-sm nh:text-gray-500",
|
|
46
|
+
children: t.emptyDescription
|
|
47
|
+
}), view === 'templates' && /*#__PURE__*/_jsx("div", {
|
|
48
|
+
className: "nh:w-full nh:text-left",
|
|
49
|
+
children: /*#__PURE__*/_jsx(PageTemplatePicker, {
|
|
50
|
+
onDone: () => setView('choice')
|
|
51
|
+
})
|
|
52
|
+
}), view === 'sections' && /*#__PURE__*/_jsx("div", {
|
|
53
|
+
className: "nh:w-full nh:text-left",
|
|
54
|
+
children: /*#__PURE__*/_jsx(CanvasAddPicker, {
|
|
55
|
+
zone: ROOT_ZONE,
|
|
56
|
+
index: 0,
|
|
57
|
+
allowedTypes: allowedTypes,
|
|
58
|
+
onDone: () => setView('choice')
|
|
59
|
+
})
|
|
60
|
+
}), view === 'choice' && /*#__PURE__*/_jsxs("div", {
|
|
61
|
+
className: "nh:flex nh:w-full nh:flex-col nh:gap-2",
|
|
62
|
+
children: [/*#__PURE__*/_jsxs("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
onClick: () => setView('templates'),
|
|
65
|
+
className: "nh:flex nh:w-full nh:items-center nh:justify-center nh:gap-1.5 nh:rounded-md nh:bg-(--nh-primary) nh:px-4 nh:py-2.5 nh:text-sm nh:font-medium nh:text-(--nh-bg) nh:hover:opacity-90",
|
|
66
|
+
children: [/*#__PURE__*/_jsx(LayoutTemplateIcon, {
|
|
67
|
+
className: "nh:size-4"
|
|
68
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
69
|
+
children: t.startWithTemplate
|
|
70
|
+
})]
|
|
71
|
+
}), allowedTypes.length > 0 && /*#__PURE__*/_jsxs("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: () => setView('sections'),
|
|
74
|
+
className: "nh:flex nh:w-full nh:items-center nh:justify-center nh:gap-1.5 nh:rounded-md nh:border nh:border-(--nh-primary) nh:px-4 nh:py-2.5 nh:text-sm nh:font-medium nh:text-(--nh-primary) nh:hover:bg-(--nh-primary)/5",
|
|
75
|
+
children: [/*#__PURE__*/_jsx(PlusIcon, {
|
|
76
|
+
className: "nh:size-4"
|
|
77
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
78
|
+
children: tOutline.addSection
|
|
79
|
+
})]
|
|
80
|
+
})]
|
|
81
|
+
})]
|
|
82
|
+
})
|
|
83
|
+
}), el);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=canvas-empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-empty-state.js","names":["useState","registerOverlayPortal","ChevronLeftIcon","LayoutTemplateIcon","PlusIcon","createPortal","usePuckDictionary","ROOT_ZONE","CanvasAddPicker","PageTemplatePicker","jsx","_jsx","jsxs","_jsxs","CanvasEmptyState","el","zoom","allowedTypes","t","canvas","tOutline","outline","tCommon","common","view","setView","className","style","opacity","children","ref","node","disableDrag","transform","type","onClick","back","emptyDescription","onDone","zone","index","startWithTemplate","length","addSection"],"sources":["../../../../src/puck-editor/internal/editor/canvas-empty-state.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { registerOverlayPortal } from '@puckeditor/core';\nimport { ChevronLeftIcon, LayoutTemplateIcon, PlusIcon } from 'lucide-react';\nimport { createPortal } from 'react-dom';\n\nimport { usePuckDictionary } from '../i18n';\nimport { ROOT_ZONE } from '../plugins/outline-plugin/outline-tree';\nimport { CanvasAddPicker } from './canvas-add-picker';\nimport { PageTemplatePicker } from './page-template-picker';\n\ntype EmptyStateView = 'choice' | 'templates' | 'sections';\n\nexport function CanvasEmptyState({\n el,\n zoom,\n allowedTypes,\n}: {\n el: HTMLElement;\n zoom: number;\n allowedTypes: string[];\n}) {\n const t = usePuckDictionary().canvas;\n const tOutline = usePuckDictionary().outline;\n const tCommon = usePuckDictionary().common;\n const [view, setView] = useState<EmptyStateView>('choice');\n\n return createPortal(\n <div\n className=\"nh:pointer-events-none nh:absolute nh:inset-0 nh:z-10 nh:flex nh:items-center nh:justify-center nh:p-6\"\n style={{ opacity: 1 }}\n >\n <div\n ref={(node) => registerOverlayPortal(node, { disableDrag: true })}\n style={{\n transform: `scale(${1 / zoom})`,\n // Puck's overlay-portal hover outline hardcodes the azure primitive;\n // scoping the variable to the card recolors just this outline.\n ['--puck-color-azure-09' as string]:\n 'color-mix(in oklab, var(--nh-primary), white 67%)',\n }}\n className=\"nh-root nh:flex nh:w-full nh:max-w-md nh:flex-col nh:items-center nh:gap-4 nh:rounded-xl nh:border nh:border-dashed nh:border-gray-300 nh:bg-white/90 nh:p-8 nh:text-center nh:shadow-sm\"\n >\n {view !== 'choice' && (\n <button\n type=\"button\"\n onClick={() => setView('choice')}\n className=\"nh:flex nh:items-center nh:gap-1 nh:self-start nh:text-sm nh:text-gray-500 nh:hover:text-gray-900\"\n >\n <ChevronLeftIcon className=\"nh:size-4\" />\n {tCommon.back}\n </button>\n )}\n\n {view === 'choice' && (\n <p className=\"nh:text-sm nh:text-gray-500\">{t.emptyDescription}</p>\n )}\n\n {view === 'templates' && (\n <div className=\"nh:w-full nh:text-left\">\n <PageTemplatePicker onDone={() => setView('choice')} />\n </div>\n )}\n\n {view === 'sections' && (\n <div className=\"nh:w-full nh:text-left\">\n <CanvasAddPicker\n zone={ROOT_ZONE}\n index={0}\n allowedTypes={allowedTypes}\n onDone={() => setView('choice')}\n />\n </div>\n )}\n\n {view === 'choice' && (\n <div className=\"nh:flex nh:w-full nh:flex-col nh:gap-2\">\n <button\n type=\"button\"\n onClick={() => setView('templates')}\n className=\"nh:flex nh:w-full nh:items-center nh:justify-center nh:gap-1.5 nh:rounded-md nh:bg-(--nh-primary) nh:px-4 nh:py-2.5 nh:text-sm nh:font-medium nh:text-(--nh-bg) nh:hover:opacity-90\"\n >\n <LayoutTemplateIcon className=\"nh:size-4\" />\n <span>{t.startWithTemplate}</span>\n </button>\n {allowedTypes.length > 0 && (\n <button\n type=\"button\"\n onClick={() => setView('sections')}\n className=\"nh:flex nh:w-full nh:items-center nh:justify-center nh:gap-1.5 nh:rounded-md nh:border nh:border-(--nh-primary) nh:px-4 nh:py-2.5 nh:text-sm nh:font-medium nh:text-(--nh-primary) nh:hover:bg-(--nh-primary)/5\"\n >\n <PlusIcon className=\"nh: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B,MAAM,GAAG,CAAC,iBACtB7B,KAAA;UACEqB,IAAI,EAAC,QAAQ;UACbC,OAAO,EAAEA,CAAA,KAAMV,OAAO,CAAC,UAAU,CAAE;UACnCC,SAAS,EAAC,iNAAiN;UAAAG,QAAA,gBAE3NlB,IAAA,CAACP,QAAQ;YAACsB,SAAS,EAAC;UAAW,CAAE,CAAC,eAClCf,IAAA;YAAAkB,QAAA,EAAOT,QAAQ,CAACuB;UAAU,CAAO,CAAC;QAAA,CAC5B,CACT;MAAA,CACE,CACN;IAAA,CACE;EAAC,CACH,CAAC,EACN5B,EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-quick-add.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/canvas-quick-add.tsx"],"names":[],"mappings":"AAmHA,wBAAgB,cAAc,uCA0K7B"}
|