@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,120 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { Button, createUsePuck } from '@puckeditor/core';
|
|
5
|
+
import { EyeIcon, PencilIcon, XIcon } from 'lucide-react';
|
|
6
|
+
import { usePuckDictionary } from '../i18n';
|
|
7
|
+
import { IconButton } from '../ui/icon-button';
|
|
8
|
+
import { HeaderSaveButton } from './header-save-button';
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const usePuck = createUsePuck();
|
|
11
|
+
export function EditorHeaderActions(t0) {
|
|
12
|
+
const $ = _c(21);
|
|
13
|
+
const {
|
|
14
|
+
onSave,
|
|
15
|
+
onClose,
|
|
16
|
+
captureDispatch
|
|
17
|
+
} = t0;
|
|
18
|
+
const appState = usePuck(_temp);
|
|
19
|
+
const dispatch = usePuck(_temp2);
|
|
20
|
+
captureDispatch(dispatch);
|
|
21
|
+
const t = usePuckDictionary().editor;
|
|
22
|
+
const isPreviewMode = appState?.ui?.previewMode === "interactive";
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[0] !== dispatch || $[1] !== isPreviewMode) {
|
|
25
|
+
t1 = () => dispatch({
|
|
26
|
+
type: "setUi",
|
|
27
|
+
ui: {
|
|
28
|
+
previewMode: isPreviewMode ? "edit" : "interactive"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
$[0] = dispatch;
|
|
32
|
+
$[1] = isPreviewMode;
|
|
33
|
+
$[2] = t1;
|
|
34
|
+
} else {
|
|
35
|
+
t1 = $[2];
|
|
36
|
+
}
|
|
37
|
+
let t2;
|
|
38
|
+
if ($[3] !== isPreviewMode || $[4] !== t.edit || $[5] !== t.preview) {
|
|
39
|
+
t2 = isPreviewMode ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
40
|
+
children: [/*#__PURE__*/_jsx(PencilIcon, {
|
|
41
|
+
className: "nh:size-4"
|
|
42
|
+
}), " ", t.edit]
|
|
43
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
44
|
+
children: [/*#__PURE__*/_jsx(EyeIcon, {
|
|
45
|
+
className: "nh:size-4"
|
|
46
|
+
}), " ", t.preview]
|
|
47
|
+
});
|
|
48
|
+
$[3] = isPreviewMode;
|
|
49
|
+
$[4] = t.edit;
|
|
50
|
+
$[5] = t.preview;
|
|
51
|
+
$[6] = t2;
|
|
52
|
+
} else {
|
|
53
|
+
t2 = $[6];
|
|
54
|
+
}
|
|
55
|
+
let t3;
|
|
56
|
+
if ($[7] !== isPreviewMode || $[8] !== t1 || $[9] !== t2) {
|
|
57
|
+
t3 = /*#__PURE__*/_jsx(Button, {
|
|
58
|
+
variant: "secondary",
|
|
59
|
+
"aria-pressed": isPreviewMode,
|
|
60
|
+
onClick: t1,
|
|
61
|
+
children: t2
|
|
62
|
+
});
|
|
63
|
+
$[7] = isPreviewMode;
|
|
64
|
+
$[8] = t1;
|
|
65
|
+
$[9] = t2;
|
|
66
|
+
$[10] = t3;
|
|
67
|
+
} else {
|
|
68
|
+
t3 = $[10];
|
|
69
|
+
}
|
|
70
|
+
let t4;
|
|
71
|
+
if ($[11] !== onSave) {
|
|
72
|
+
t4 = /*#__PURE__*/_jsx(HeaderSaveButton, {
|
|
73
|
+
onSave: onSave
|
|
74
|
+
});
|
|
75
|
+
$[11] = onSave;
|
|
76
|
+
$[12] = t4;
|
|
77
|
+
} else {
|
|
78
|
+
t4 = $[12];
|
|
79
|
+
}
|
|
80
|
+
let t5;
|
|
81
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
82
|
+
t5 = /*#__PURE__*/_jsx(XIcon, {});
|
|
83
|
+
$[13] = t5;
|
|
84
|
+
} else {
|
|
85
|
+
t5 = $[13];
|
|
86
|
+
}
|
|
87
|
+
let t6;
|
|
88
|
+
if ($[14] !== onClose || $[15] !== t.close) {
|
|
89
|
+
t6 = /*#__PURE__*/_jsx(IconButton, {
|
|
90
|
+
onClick: onClose,
|
|
91
|
+
title: t.close,
|
|
92
|
+
children: t5
|
|
93
|
+
});
|
|
94
|
+
$[14] = onClose;
|
|
95
|
+
$[15] = t.close;
|
|
96
|
+
$[16] = t6;
|
|
97
|
+
} else {
|
|
98
|
+
t6 = $[16];
|
|
99
|
+
}
|
|
100
|
+
let t7;
|
|
101
|
+
if ($[17] !== t3 || $[18] !== t4 || $[19] !== t6) {
|
|
102
|
+
t7 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
103
|
+
children: [t3, t4, t6]
|
|
104
|
+
});
|
|
105
|
+
$[17] = t3;
|
|
106
|
+
$[18] = t4;
|
|
107
|
+
$[19] = t6;
|
|
108
|
+
$[20] = t7;
|
|
109
|
+
} else {
|
|
110
|
+
t7 = $[20];
|
|
111
|
+
}
|
|
112
|
+
return t7;
|
|
113
|
+
}
|
|
114
|
+
function _temp2(s_0) {
|
|
115
|
+
return s_0.dispatch;
|
|
116
|
+
}
|
|
117
|
+
function _temp(s) {
|
|
118
|
+
return s.appState;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=editor-header-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-header-actions.js","names":["c","_c","Button","createUsePuck","EyeIcon","PencilIcon","XIcon","usePuckDictionary","IconButton","HeaderSaveButton","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","usePuck","EditorHeaderActions","t0","$","onSave","onClose","captureDispatch","appState","_temp","dispatch","_temp2","t","editor","isPreviewMode","ui","previewMode","t1","type","t2","edit","preview","children","className","t3","variant","onClick","t4","t5","Symbol","for","t6","close","title","t7","s_0","s"],"sources":["../../../../src/puck-editor/internal/editor/editor-header-actions.tsx"],"sourcesContent":["'use client';\n\nimport { Button, createUsePuck, Data, PuckAction } from '@puckeditor/core';\nimport { EyeIcon, PencilIcon, XIcon } from 'lucide-react';\n\nimport { usePuckDictionary } from '../i18n';\nimport { IconButton } from '../ui/icon-button';\nimport { HeaderSaveButton } from './header-save-button';\n\nconst usePuck = createUsePuck();\n\nexport function EditorHeaderActions({\n onSave,\n onClose,\n captureDispatch,\n}: {\n onSave: (data: Partial<Data>) => Promise<void> | void;\n onClose: () => void;\n captureDispatch: (dispatch: (action: PuckAction) => void) => void;\n}) {\n const appState = usePuck((s) => s.appState);\n const dispatch = usePuck((s) => s.dispatch);\n captureDispatch(dispatch);\n const t = usePuckDictionary().editor;\n const isPreviewMode = appState?.ui?.previewMode === 'interactive';\n\n return (\n <>\n <Button\n variant=\"secondary\"\n aria-pressed={isPreviewMode}\n onClick={() =>\n dispatch({\n type: 'setUi',\n ui: { previewMode: isPreviewMode ? 'edit' : 'interactive' },\n })\n }\n >\n {isPreviewMode ? (\n <>\n <PencilIcon className=\"nh:size-4\" /> {t.edit}\n </>\n ) : (\n <>\n <EyeIcon className=\"nh:size-4\" /> {t.preview}\n </>\n )}\n </Button>\n <HeaderSaveButton onSave={onSave} />\n <IconButton onClick={onClose} title={t.close}>\n <XIcon />\n </IconButton>\n </>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,MAAM,EAAEC,aAAa,QAA0B,kBAAkB;AAC1E,SAASC,OAAO,EAAEC,UAAU,EAAEC,KAAK,QAAQ,cAAc;AAEzD,SAASC,iBAAiB,QAAQ,SAAS;AAC3C,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,gBAAgB,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,MAAMC,OAAO,GAAGb,aAAa,CAAC,CAAC;AAE/B,OAAO,SAAAc,oBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAlB,EAAA;EAA6B;IAAAmB,MAAA;IAAAC,OAAA;IAAAC;EAAA,IAAAJ,EAQnC;EACC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AA;IAAAA,EAAA,GAAA3B,CAAA;EAAA;EAAA,IAAA8B,EAAA;EAAA,IAAA9B,CAAA,SAAAoB,EAAA,IAAApB,CAAA,SAAAuB,EAAA,IAAAvB,CAAA,SAAA2B,EAAA;IAxBfG,EAAA,gBAAAlC,KAAA,CAAAF,SAAA;MAAAwB,QAAA,GACEE,EAmBS,EACTG,EAAoC,EACpCI,EAEa;IAAA,CACb,CAAC;IAAA3B,CAAA,OAAAoB,EAAA;IAAApB,CAAA,OAAAuB,EAAA;IAAAvB,CAAA,OAAA2B,EAAA;IAAA3B,CAAA,OAAA8B,EAAA;EAAA;IAAAA,EAAA,GAAA9B,CAAA;EAAA;EAAA,OAzBH8B,EAyBG;AAAA;AAzCA,SAAAvB,OAAAwB,GAAA;EAAA,OAU2BC,GAAC,CAAA1B,QAAS;AAAA;AAVrC,SAAAD,MAAA2B,CAAA;EAAA,OAS2BA,CAAC,CAAA5B,QAAS;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Config, Data } from '@puckeditor/core';
|
|
2
|
+
export type MissingRequiredField = {
|
|
3
|
+
componentLabel: string;
|
|
4
|
+
fieldLabel: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Walks Puck data (content, zones, slots, root) against the config and returns
|
|
8
|
+
* every field marked with `metadata.required` (via the `required()` wrapper)
|
|
9
|
+
* whose value is empty. Empty means null/undefined, whitespace-or-tags-only
|
|
10
|
+
* string, or empty array; `0` and `false` are valid values. Fields hidden via
|
|
11
|
+
* `visible: false` are skipped, as are fields behind `resolveFields` (only the
|
|
12
|
+
* static field definitions are validated).
|
|
13
|
+
*/
|
|
14
|
+
export declare const findMissingRequiredFields: (config: Config, data: Partial<Data>) => MissingRequiredField[];
|
|
15
|
+
//# sourceMappingURL=find-missing-required-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-missing-required-fields.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/find-missing-required-fields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA2DF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,MAAM,EACd,MAAM,OAAO,CAAC,IAAI,CAAC,KAClB,oBAAoB,EA8BtB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { walkTree } from '@puckeditor/core';
|
|
2
|
+
const stripRequiredMarker = label => label.endsWith(' *') ? label.slice(0, -2) : label;
|
|
3
|
+
const isEmpty = value => {
|
|
4
|
+
if (value === undefined || value === null) return true;
|
|
5
|
+
if (typeof value === 'string') {
|
|
6
|
+
return value.replace(/<[^>]+>/g, '').trim() === '';
|
|
7
|
+
}
|
|
8
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
9
|
+
return false;
|
|
10
|
+
};
|
|
11
|
+
const collectMissing = (fields, props, componentLabel, out) => {
|
|
12
|
+
for (const [name, field] of Object.entries(fields ?? {})) {
|
|
13
|
+
if (field.visible === false) continue;
|
|
14
|
+
const value = props[name];
|
|
15
|
+
if (field.metadata?.required && isEmpty(value)) {
|
|
16
|
+
out.push({
|
|
17
|
+
componentLabel,
|
|
18
|
+
fieldLabel: stripRequiredMarker(field.label ?? name)
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (field.arrayFields && Array.isArray(value)) {
|
|
22
|
+
for (const item of value) {
|
|
23
|
+
collectMissing(field.arrayFields, item ?? {}, componentLabel, out);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (field.objectFields) {
|
|
27
|
+
collectMissing(field.objectFields, value ?? {}, componentLabel, out);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Walks Puck data (content, zones, slots, root) against the config and returns
|
|
34
|
+
* every field marked with `metadata.required` (via the `required()` wrapper)
|
|
35
|
+
* whose value is empty. Empty means null/undefined, whitespace-or-tags-only
|
|
36
|
+
* string, or empty array; `0` and `false` are valid values. Fields hidden via
|
|
37
|
+
* `visible: false` are skipped, as are fields behind `resolveFields` (only the
|
|
38
|
+
* static field definitions are validated).
|
|
39
|
+
*/
|
|
40
|
+
export const findMissingRequiredFields = (config, data) => {
|
|
41
|
+
const out = [];
|
|
42
|
+
collectMissing(config.root?.fields, data.root?.props ?? {}, config.root?.label ?? 'Page', out);
|
|
43
|
+
walkTree(data, config, content => {
|
|
44
|
+
for (const item of content) {
|
|
45
|
+
const component = config.components[item.type];
|
|
46
|
+
if (!component) continue;
|
|
47
|
+
collectMissing(component.fields, item.props, component.label ?? item.type, out);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const seen = new Set();
|
|
51
|
+
return out.filter(({
|
|
52
|
+
componentLabel,
|
|
53
|
+
fieldLabel
|
|
54
|
+
}) => {
|
|
55
|
+
const key = `${componentLabel}:${fieldLabel}`;
|
|
56
|
+
if (seen.has(key)) return false;
|
|
57
|
+
seen.add(key);
|
|
58
|
+
return true;
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=find-missing-required-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-missing-required-fields.js","names":["walkTree","stripRequiredMarker","label","endsWith","slice","isEmpty","value","undefined","replace","trim","Array","isArray","length","collectMissing","fields","props","componentLabel","out","name","field","Object","entries","visible","metadata","required","push","fieldLabel","arrayFields","item","objectFields","findMissingRequiredFields","config","data","root","content","component","components","type","seen","Set","filter","key","has","add"],"sources":["../../../../src/puck-editor/internal/editor/find-missing-required-fields.ts"],"sourcesContent":["import { walkTree } from '@puckeditor/core';\nimport type { Config, Content, Data } from '@puckeditor/core';\n\nexport type MissingRequiredField = {\n componentLabel: string;\n fieldLabel: string;\n};\n\ntype FieldDef = {\n type?: string;\n label?: string;\n visible?: boolean;\n metadata?: { required?: boolean };\n arrayFields?: Record<string, FieldDef>;\n objectFields?: Record<string, FieldDef>;\n};\n\nconst stripRequiredMarker = (label: string) =>\n label.endsWith(' *') ? label.slice(0, -2) : label;\n\nconst isEmpty = (value: unknown): boolean => {\n if (value === undefined || value === null) return true;\n if (typeof value === 'string') {\n return value.replace(/<[^>]+>/g, '').trim() === '';\n }\n if (Array.isArray(value)) return value.length === 0;\n return false;\n};\n\nconst collectMissing = (\n fields: Record<string, FieldDef> | undefined,\n props: Record<string, unknown>,\n componentLabel: string,\n out: MissingRequiredField[]\n) => {\n for (const [name, field] of Object.entries(fields ?? {})) {\n if (field.visible === false) continue;\n const value = props[name];\n if (field.metadata?.required && isEmpty(value)) {\n out.push({\n componentLabel,\n fieldLabel: stripRequiredMarker(field.label ?? name),\n });\n }\n if (field.arrayFields && Array.isArray(value)) {\n for (const item of value) {\n collectMissing(\n field.arrayFields,\n (item ?? {}) as Record<string, unknown>,\n componentLabel,\n out\n );\n }\n }\n if (field.objectFields) {\n collectMissing(\n field.objectFields,\n (value ?? {}) as Record<string, unknown>,\n componentLabel,\n out\n );\n }\n }\n};\n\n/**\n * Walks Puck data (content, zones, slots, root) against the config and returns\n * every field marked with `metadata.required` (via the `required()` wrapper)\n * whose value is empty. Empty means null/undefined, whitespace-or-tags-only\n * string, or empty array; `0` and `false` are valid values. Fields hidden via\n * `visible: false` are skipped, as are fields behind `resolveFields` (only the\n * static field definitions are validated).\n */\nexport const findMissingRequiredFields = (\n config: Config,\n data: Partial<Data>\n): MissingRequiredField[] => {\n const out: MissingRequiredField[] = [];\n\n collectMissing(\n config.root?.fields as Record<string, FieldDef> | undefined,\n (data.root?.props ?? {}) as Record<string, unknown>,\n (config.root as { label?: string } | undefined)?.label ?? 'Page',\n out\n );\n\n walkTree(data as Data, config, (content: Content) => {\n for (const item of content) {\n const component = config.components[item.type];\n if (!component) continue;\n collectMissing(\n component.fields as Record<string, FieldDef> | undefined,\n item.props as Record<string, unknown>,\n component.label ?? item.type,\n out\n );\n }\n });\n\n const seen = new Set<string>();\n return out.filter(({ componentLabel, fieldLabel }) => {\n const key = `${componentLabel}:${fieldLabel}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,kBAAkB;AAiB3C,MAAMC,mBAAmB,GAAIC,KAAa,IACxCA,KAAK,CAACC,QAAQ,CAAC,IAAI,CAAC,GAAGD,KAAK,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGF,KAAK;AAEnD,MAAMG,OAAO,GAAIC,KAAc,IAAc;EAC3C,IAAIA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,EAAE,OAAO,IAAI;EACtD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK,CAACE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC,KAAK,EAAE;EACpD;EACA,IAAIC,KAAK,CAACC,OAAO,CAACL,KAAK,CAAC,EAAE,OAAOA,KAAK,CAACM,MAAM,KAAK,CAAC;EACnD,OAAO,KAAK;AACd,CAAC;AAED,MAAMC,cAAc,GAAGA,CACrBC,MAA4C,EAC5CC,KAA8B,EAC9BC,cAAsB,EACtBC,GAA2B,KACxB;EACH,KAAK,MAAM,CAACC,IAAI,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACP,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE;IACxD,IAAIK,KAAK,CAACG,OAAO,KAAK,KAAK,EAAE;IAC7B,MAAMhB,KAAK,GAAGS,KAAK,CAACG,IAAI,CAAC;IACzB,IAAIC,KAAK,CAACI,QAAQ,EAAEC,QAAQ,IAAInB,OAAO,CAACC,KAAK,CAAC,EAAE;MAC9CW,GAAG,CAACQ,IAAI,C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,IAAIC,GAAG,CAAS,CAAC;EAC9B,OAAOtB,GAAG,CAACuB,MAAM,CAAC,CAAC;IAAExB,cAAc;IAAEU;EAAW,CAAC,KAAK;IACpD,MAAMe,GAAG,GAAG,GAAGzB,cAAc,IAAIU,UAAU,EAAE;IAC7C,IAAIY,IAAI,CAACI,GAAG,CAACD,GAAG,CAAC,EAAE,OAAO,KAAK;IAC/BH,IAAI,CAACK,GAAG,CAACF,GAAG,CAAC;IACb,OAAO,IAAI;EACb,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PickerEntry, PickerGroup } from './picker-model';
|
|
3
|
+
type GroupedDrawerPanelProps = {
|
|
4
|
+
focusKey: string;
|
|
5
|
+
searchPlaceholder: string;
|
|
6
|
+
noResultsLabel: string;
|
|
7
|
+
pinned: PickerEntry[];
|
|
8
|
+
groups: PickerGroup[];
|
|
9
|
+
onInsert: (entry: PickerEntry) => void;
|
|
10
|
+
footer?: (searchQuery: string) => ReactNode;
|
|
11
|
+
footerMatchesQuery?: (normalizedQuery: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function GroupedDrawerPanel({ focusKey, searchPlaceholder, noResultsLabel, pinned, groups, onInsert, footer, footerMatchesQuery, }: GroupedDrawerPanelProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=grouped-drawer-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-drawer-panel.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/grouped-drawer-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAQ5C,OAAO,EAAuB,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/E,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,SAAS,CAAC;IAC5C,kBAAkB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3D,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,kBAAkB,GACnB,EAAE,uBAAuB,+BA0EzB"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { Drawer } from '@puckeditor/core';
|
|
6
|
+
import { usePuckDictionary } from '../i18n';
|
|
7
|
+
import { ComponentListAccordion } from '../ui/component-list-accordion';
|
|
8
|
+
import { SearchControl, SearchEmptyState } from '../ui/search-control';
|
|
9
|
+
import { usePanelSearchFocus } from '../ui/use-panel-search-focus';
|
|
10
|
+
import { PickerEntryItem } from './picker-entry-item';
|
|
11
|
+
import { filterGroupsByQuery } from './picker-model';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
export function GroupedDrawerPanel(t0) {
|
|
14
|
+
const $ = _c(29);
|
|
15
|
+
const {
|
|
16
|
+
focusKey,
|
|
17
|
+
searchPlaceholder,
|
|
18
|
+
noResultsLabel,
|
|
19
|
+
pinned,
|
|
20
|
+
groups,
|
|
21
|
+
onInsert,
|
|
22
|
+
footer,
|
|
23
|
+
footerMatchesQuery
|
|
24
|
+
} = t0;
|
|
25
|
+
const tTemplates = usePuckDictionary().templates;
|
|
26
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
27
|
+
let t1;
|
|
28
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29
|
+
t1 = {};
|
|
30
|
+
$[0] = t1;
|
|
31
|
+
} else {
|
|
32
|
+
t1 = $[0];
|
|
33
|
+
}
|
|
34
|
+
const [collapsed, setCollapsed] = useState(t1);
|
|
35
|
+
const searchRef = usePanelSearchFocus(focusKey);
|
|
36
|
+
let t2;
|
|
37
|
+
let t3;
|
|
38
|
+
let t4;
|
|
39
|
+
let t5;
|
|
40
|
+
if ($[1] !== collapsed || $[2] !== footer || $[3] !== footerMatchesQuery || $[4] !== groups || $[5] !== noResultsLabel || $[6] !== onInsert || $[7] !== pinned || $[8] !== searchPlaceholder || $[9] !== searchQuery || $[10] !== searchRef || $[11] !== tTemplates) {
|
|
41
|
+
const query = searchQuery.trim().toLowerCase();
|
|
42
|
+
const filteredPinned = pinned.filter(entry => !query || entry.label.toLowerCase().includes(query));
|
|
43
|
+
const filteredGroups = filterGroupsByQuery(groups, query);
|
|
44
|
+
const hasResults = filteredPinned.length > 0 || filteredGroups.length > 0 || (footerMatchesQuery?.(query) ?? false);
|
|
45
|
+
let t6;
|
|
46
|
+
if ($[16] !== onInsert) {
|
|
47
|
+
t6 = entry_0 => /*#__PURE__*/_jsx(PickerEntryItem, {
|
|
48
|
+
entry: entry_0,
|
|
49
|
+
onInsert: () => onInsert(entry_0)
|
|
50
|
+
}, entry_0.key);
|
|
51
|
+
$[16] = onInsert;
|
|
52
|
+
$[17] = t6;
|
|
53
|
+
} else {
|
|
54
|
+
t6 = $[17];
|
|
55
|
+
}
|
|
56
|
+
const renderEntry = t6;
|
|
57
|
+
t4 = "nh:flex nh:h-full nh:flex-col";
|
|
58
|
+
if ($[18] !== searchPlaceholder || $[19] !== searchQuery || $[20] !== searchRef) {
|
|
59
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
60
|
+
className: "nh:border-b nh:border-gray-200 nh:p-3",
|
|
61
|
+
children: /*#__PURE__*/_jsx(SearchControl, {
|
|
62
|
+
inputRef: searchRef,
|
|
63
|
+
placeholder: searchPlaceholder,
|
|
64
|
+
value: searchQuery,
|
|
65
|
+
onChange: setSearchQuery
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
$[18] = searchPlaceholder;
|
|
69
|
+
$[19] = searchQuery;
|
|
70
|
+
$[20] = searchRef;
|
|
71
|
+
$[21] = t5;
|
|
72
|
+
} else {
|
|
73
|
+
t5 = $[21];
|
|
74
|
+
}
|
|
75
|
+
t2 = "nh:flex-1 nh:overflow-y-auto nh:p-3";
|
|
76
|
+
t3 = !hasResults ? /*#__PURE__*/_jsx(SearchEmptyState, {
|
|
77
|
+
children: noResultsLabel
|
|
78
|
+
}) : /*#__PURE__*/_jsxs("div", {
|
|
79
|
+
className: "nh:space-y-3",
|
|
80
|
+
children: [filteredPinned.length > 0 && /*#__PURE__*/_jsx(Drawer, {
|
|
81
|
+
children: filteredPinned.map(renderEntry)
|
|
82
|
+
}), filteredGroups.map(group => group.label ? /*#__PURE__*/_jsx(ComponentListAccordion, {
|
|
83
|
+
contentId: `nh-puck-drawer-category-${group.key}`,
|
|
84
|
+
title: group.label,
|
|
85
|
+
expanded: !collapsed[group.key],
|
|
86
|
+
onToggle: () => setCollapsed(prev => ({
|
|
87
|
+
...prev,
|
|
88
|
+
[group.key]: !prev[group.key]
|
|
89
|
+
})),
|
|
90
|
+
expandLabel: tTemplates.expand,
|
|
91
|
+
collapseLabel: tTemplates.collapse,
|
|
92
|
+
children: /*#__PURE__*/_jsx(Drawer, {
|
|
93
|
+
children: group.entries.map(renderEntry)
|
|
94
|
+
})
|
|
95
|
+
}, group.key) : /*#__PURE__*/_jsx(Drawer, {
|
|
96
|
+
children: group.entries.map(renderEntry)
|
|
97
|
+
}, group.key)), footer?.(searchQuery)]
|
|
98
|
+
});
|
|
99
|
+
$[1] = collapsed;
|
|
100
|
+
$[2] = footer;
|
|
101
|
+
$[3] = footerMatchesQuery;
|
|
102
|
+
$[4] = groups;
|
|
103
|
+
$[5] = noResultsLabel;
|
|
104
|
+
$[6] = onInsert;
|
|
105
|
+
$[7] = pinned;
|
|
106
|
+
$[8] = searchPlaceholder;
|
|
107
|
+
$[9] = searchQuery;
|
|
108
|
+
$[10] = searchRef;
|
|
109
|
+
$[11] = tTemplates;
|
|
110
|
+
$[12] = t2;
|
|
111
|
+
$[13] = t3;
|
|
112
|
+
$[14] = t4;
|
|
113
|
+
$[15] = t5;
|
|
114
|
+
} else {
|
|
115
|
+
t2 = $[12];
|
|
116
|
+
t3 = $[13];
|
|
117
|
+
t4 = $[14];
|
|
118
|
+
t5 = $[15];
|
|
119
|
+
}
|
|
120
|
+
let t6;
|
|
121
|
+
if ($[22] !== t2 || $[23] !== t3) {
|
|
122
|
+
t6 = /*#__PURE__*/_jsx("div", {
|
|
123
|
+
className: t2,
|
|
124
|
+
children: t3
|
|
125
|
+
});
|
|
126
|
+
$[22] = t2;
|
|
127
|
+
$[23] = t3;
|
|
128
|
+
$[24] = t6;
|
|
129
|
+
} else {
|
|
130
|
+
t6 = $[24];
|
|
131
|
+
}
|
|
132
|
+
let t7;
|
|
133
|
+
if ($[25] !== t4 || $[26] !== t5 || $[27] !== t6) {
|
|
134
|
+
t7 = /*#__PURE__*/_jsxs("div", {
|
|
135
|
+
className: t4,
|
|
136
|
+
children: [t5, t6]
|
|
137
|
+
});
|
|
138
|
+
$[25] = t4;
|
|
139
|
+
$[26] = t5;
|
|
140
|
+
$[27] = t6;
|
|
141
|
+
$[28] = t7;
|
|
142
|
+
} else {
|
|
143
|
+
t7 = $[28];
|
|
144
|
+
}
|
|
145
|
+
return t7;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=grouped-drawer-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-drawer-panel.js","names":["c","_c","useState","Drawer","usePuckDictionary","ComponentListAccordion","SearchControl","SearchEmptyState","usePanelSearchFocus","PickerEntryItem","filterGroupsByQuery","jsx","_jsx","jsxs","_jsxs","GroupedDrawerPanel","t0","$","focusKey","searchPlaceholder","noResultsLabel","pinned","groups","onInsert","footer","footerMatchesQuery","tTemplates","templates","searchQuery","setSearchQuery","t1","Symbol","for","collapsed","setCollapsed","searchRef","t2","t3","t4","t5","query","trim","toLowerCase","filteredPinned","filter","entry","label","includes","filteredGroups","hasResults","length","t6","entry_0","key","renderEntry","className","children","map","group","contentId","title","expanded","onToggle","prev","expandLabel","expand","collapseLabel","collapse","entries","t7"],"sources":["../../../../src/puck-editor/internal/editor/grouped-drawer-panel.tsx"],"sourcesContent":["'use client';\n\nimport { ReactNode, useState } from 'react';\nimport { Drawer } from '@puckeditor/core';\n\nimport { usePuckDictionary } from '../i18n';\nimport { ComponentListAccordion } from '../ui/component-list-accordion';\nimport { SearchControl, SearchEmptyState } from '../ui/search-control';\nimport { usePanelSearchFocus } from '../ui/use-panel-search-focus';\nimport { PickerEntryItem } from './picker-entry-item';\nimport { filterGroupsByQuery, PickerEntry, PickerGroup } from './picker-model';\n\ntype GroupedDrawerPanelProps = {\n focusKey: string;\n searchPlaceholder: string;\n noResultsLabel: string;\n pinned: PickerEntry[];\n groups: PickerGroup[];\n onInsert: (entry: PickerEntry) => void;\n footer?: (searchQuery: string) => ReactNode;\n footerMatchesQuery?: (normalizedQuery: string) => boolean;\n};\n\nexport function GroupedDrawerPanel({\n focusKey,\n searchPlaceholder,\n noResultsLabel,\n pinned,\n groups,\n onInsert,\n footer,\n footerMatchesQuery,\n}: GroupedDrawerPanelProps) {\n const tTemplates = usePuckDictionary().templates;\n const [searchQuery, setSearchQuery] = useState('');\n const [collapsed, setCollapsed] = useState<Record<string, boolean>>({});\n const searchRef = usePanelSearchFocus(focusKey);\n\n const query = searchQuery.trim().toLowerCase();\n const filteredPinned = pinned.filter(\n (entry) => !query || entry.label.toLowerCase().includes(query)\n );\n const filteredGroups = filterGroupsByQuery(groups, query);\n const hasResults =\n filteredPinned.length > 0 ||\n filteredGroups.length > 0 ||\n (footerMatchesQuery?.(query) ?? false);\n\n const renderEntry = (entry: PickerEntry) => (\n <PickerEntryItem\n key={entry.key}\n entry={entry}\n onInsert={() => onInsert(entry)}\n />\n );\n\n return (\n <div className=\"nh:flex nh:h-full nh:flex-col\">\n <div className=\"nh:border-b nh:border-gray-200 nh:p-3\">\n <SearchControl\n inputRef={searchRef}\n placeholder={searchPlaceholder}\n value={searchQuery}\n onChange={setSearchQuery}\n />\n </div>\n <div className=\"nh:flex-1 nh:overflow-y-auto nh:p-3\">\n {!hasResults ? (\n <SearchEmptyState>{noResultsLabel}</SearchEmptyState>\n ) : (\n <div className=\"nh:space-y-3\">\n {filteredPinned.length > 0 && (\n <Drawer>{filteredPinned.map(renderEntry)}</Drawer>\n )}\n\n {filteredGroups.map((group) =>\n group.label ? (\n <ComponentListAccordion\n key={group.key}\n contentId={`nh-puck-drawer-category-${group.key}`}\n title={group.label}\n expanded={!collapsed[group.key]}\n onToggle={() =>\n setCollapsed((prev) => ({\n ...prev,\n [group.key]: !prev[group.key],\n }))\n }\n expandLabel={tTemplates.expand}\n collapseLabel={tTemplates.collapse}\n >\n <Drawer>{group.entries.map(renderEntry)}</Drawer>\n </ComponentListAccordion>\n ) : (\n <Drawer key={group.key}>\n {group.entries.map(renderEntry)}\n </Drawer>\n )\n )}\n\n {footer?.(searchQuery)}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAAoBC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,SAASC,iBAAiB,QAAQ,SAAS;AAC3C,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,SAASC,aAAa,EAAEC,gBAAgB,QAAQ,sBAAsB;AACtE,SAASC,mBAAmB,QAAQ,8BAA8B;AAClE,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAAS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ReactNode } from 'react';
|
|
2
|
+
import type { Config } from '@puckeditor/core';
|
|
3
|
+
import type { PickerEntry, PickerGroup } from './picker-model';
|
|
4
|
+
export declare function PickerEntryButton({ config, entry, onPick, }: {
|
|
5
|
+
config: Config;
|
|
6
|
+
entry: PickerEntry;
|
|
7
|
+
onPick: (entry: PickerEntry) => void;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
type GroupedEntryListProps = {
|
|
10
|
+
groups: PickerGroup[];
|
|
11
|
+
leading?: ReactNode;
|
|
12
|
+
noResultsLabel: string;
|
|
13
|
+
renderEntry: (entry: PickerEntry) => ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export declare function GroupedEntryList({ groups, leading, noResultsLabel, renderEntry, }: GroupedEntryListProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=grouped-entry-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-entry-list.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/grouped-entry-list.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACtC,+BAaA;AAUD,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,SAAS,CAAC;CAChD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,cAAc,EACd,WAAW,GACZ,EAAE,qBAAqB,+BAoBvB"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { SearchEmptyState } from '../ui/search-control';
|
|
5
|
+
import { entryIcon } from './component-icons';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
export function PickerEntryButton(t0) {
|
|
8
|
+
const $ = _c(14);
|
|
9
|
+
const {
|
|
10
|
+
config,
|
|
11
|
+
entry,
|
|
12
|
+
onPick
|
|
13
|
+
} = t0;
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== entry || $[1] !== onPick) {
|
|
16
|
+
t1 = () => onPick(entry);
|
|
17
|
+
$[0] = entry;
|
|
18
|
+
$[1] = onPick;
|
|
19
|
+
$[2] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
t1 = $[2];
|
|
22
|
+
}
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[3] !== config || $[4] !== entry) {
|
|
25
|
+
t2 = entryIcon(config, entry);
|
|
26
|
+
$[3] = config;
|
|
27
|
+
$[4] = entry;
|
|
28
|
+
$[5] = t2;
|
|
29
|
+
} else {
|
|
30
|
+
t2 = $[5];
|
|
31
|
+
}
|
|
32
|
+
let t3;
|
|
33
|
+
if ($[6] !== t2) {
|
|
34
|
+
t3 = /*#__PURE__*/_jsx("span", {
|
|
35
|
+
className: "nh:shrink-0 nh:text-gray-400",
|
|
36
|
+
children: t2
|
|
37
|
+
});
|
|
38
|
+
$[6] = t2;
|
|
39
|
+
$[7] = t3;
|
|
40
|
+
} else {
|
|
41
|
+
t3 = $[7];
|
|
42
|
+
}
|
|
43
|
+
let t4;
|
|
44
|
+
if ($[8] !== entry.label) {
|
|
45
|
+
t4 = /*#__PURE__*/_jsx("span", {
|
|
46
|
+
className: "nh:truncate",
|
|
47
|
+
children: entry.label
|
|
48
|
+
});
|
|
49
|
+
$[8] = entry.label;
|
|
50
|
+
$[9] = t4;
|
|
51
|
+
} else {
|
|
52
|
+
t4 = $[9];
|
|
53
|
+
}
|
|
54
|
+
let t5;
|
|
55
|
+
if ($[10] !== t1 || $[11] !== t3 || $[12] !== t4) {
|
|
56
|
+
t5 = /*#__PURE__*/_jsxs("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
onClick: t1,
|
|
59
|
+
className: "nh:flex nh:w-full nh:items-center nh:gap-2 nh:rounded nh:px-2 nh:py-1.5 nh:text-left nh:text-sm nh:text-gray-700 nh:hover:bg-gray-100",
|
|
60
|
+
children: [t3, t4]
|
|
61
|
+
});
|
|
62
|
+
$[10] = t1;
|
|
63
|
+
$[11] = t3;
|
|
64
|
+
$[12] = t4;
|
|
65
|
+
$[13] = t5;
|
|
66
|
+
} else {
|
|
67
|
+
t5 = $[13];
|
|
68
|
+
}
|
|
69
|
+
return t5;
|
|
70
|
+
}
|
|
71
|
+
function GroupLabel(t0) {
|
|
72
|
+
const $ = _c(2);
|
|
73
|
+
const {
|
|
74
|
+
children
|
|
75
|
+
} = t0;
|
|
76
|
+
let t1;
|
|
77
|
+
if ($[0] !== children) {
|
|
78
|
+
t1 = /*#__PURE__*/_jsx("div", {
|
|
79
|
+
className: "nh:px-2 nh:py-1 nh:text-xs nh:font-medium nh:tracking-wide nh:text-gray-400 nh:uppercase",
|
|
80
|
+
children: children
|
|
81
|
+
});
|
|
82
|
+
$[0] = children;
|
|
83
|
+
$[1] = t1;
|
|
84
|
+
} else {
|
|
85
|
+
t1 = $[1];
|
|
86
|
+
}
|
|
87
|
+
return t1;
|
|
88
|
+
}
|
|
89
|
+
export function GroupedEntryList(t0) {
|
|
90
|
+
const $ = _c(6);
|
|
91
|
+
const {
|
|
92
|
+
groups,
|
|
93
|
+
leading,
|
|
94
|
+
noResultsLabel,
|
|
95
|
+
renderEntry
|
|
96
|
+
} = t0;
|
|
97
|
+
const hasAny = groups.length > 0 || Boolean(leading);
|
|
98
|
+
let t1;
|
|
99
|
+
if ($[0] !== groups || $[1] !== hasAny || $[2] !== leading || $[3] !== noResultsLabel || $[4] !== renderEntry) {
|
|
100
|
+
t1 = /*#__PURE__*/_jsx("div", {
|
|
101
|
+
className: "nh:max-h-72 nh:overflow-y-auto nh:overscroll-contain",
|
|
102
|
+
children: !hasAny ? /*#__PURE__*/_jsx(SearchEmptyState, {
|
|
103
|
+
compact: true,
|
|
104
|
+
children: noResultsLabel
|
|
105
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
106
|
+
children: [leading, groups.map(group => /*#__PURE__*/_jsxs("div", {
|
|
107
|
+
className: "nh:mt-1",
|
|
108
|
+
children: [group.label && /*#__PURE__*/_jsx(GroupLabel, {
|
|
109
|
+
children: group.label
|
|
110
|
+
}), group.entries.map(renderEntry)]
|
|
111
|
+
}, group.key))]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
$[0] = groups;
|
|
115
|
+
$[1] = hasAny;
|
|
116
|
+
$[2] = leading;
|
|
117
|
+
$[3] = noResultsLabel;
|
|
118
|
+
$[4] = renderEntry;
|
|
119
|
+
$[5] = t1;
|
|
120
|
+
} else {
|
|
121
|
+
t1 = $[5];
|
|
122
|
+
}
|
|
123
|
+
return t1;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=grouped-entry-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-entry-list.js","names":["c","_c","SearchEmptyState","entryIcon","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","PickerEntryButton","t0","$","config","entry","onPick","t1","t2","t3","className","children","t4","label","t5","type","onClick","GroupLabel","GroupedEntryList","groups","leading","noResultsLabel","renderEntry","hasAny","length","Boolean","compact","map","group","entries","key"],"sources":["../../../../src/puck-editor/internal/editor/grouped-entry-list.tsx"],"sourcesContent":["'use client';\n\nimport { ReactNode } from 'react';\nimport type { Config } from '@puckeditor/core';\n\nimport { SearchEmptyState } from '../ui/search-control';\nimport { entryIcon } from './component-icons';\nimport type { PickerEntry, PickerGroup } from './picker-model';\n\nexport function PickerEntryButton({\n config,\n entry,\n onPick,\n}: {\n config: Config;\n entry: PickerEntry;\n onPick: (entry: PickerEntry) => void;\n}) {\n return (\n <button\n type=\"button\"\n onClick={() => onPick(entry)}\n className=\"nh:flex nh:w-full nh:items-center nh:gap-2 nh:rounded nh:px-2 nh:py-1.5 nh:text-left nh:text-sm nh:text-gray-700 nh:hover:bg-gray-100\"\n >\n <span className=\"nh:shrink-0 nh:text-gray-400\">\n {entryIcon(config, entry)}\n </span>\n <span className=\"nh:truncate\">{entry.label}</span>\n </button>\n );\n}\n\nfunction GroupLabel({ children }: { children: ReactNode }) {\n return (\n <div className=\"nh:px-2 nh:py-1 nh:text-xs nh:font-medium nh:tracking-wide nh:text-gray-400 nh:uppercase\">\n {children}\n </div>\n );\n}\n\ntype GroupedEntryListProps = {\n groups: PickerGroup[];\n leading?: ReactNode;\n noResultsLabel: string;\n renderEntry: (entry: PickerEntry) => ReactNode;\n};\n\nexport function GroupedEntryList({\n groups,\n leading,\n noResultsLabel,\n renderEntry,\n}: GroupedEntryListProps) {\n const hasAny = groups.length > 0 || Boolean(leading);\n\n return (\n <div className=\"nh:max-h-72 nh:overflow-y-auto nh:overscroll-contain\">\n {!hasAny ? (\n <SearchEmptyState compact>{noResultsLabel}</SearchEmptyState>\n ) : (\n <>\n {leading}\n {groups.map((group) => (\n <div key={group.key} className=\"nh:mt-1\">\n {group.label && <GroupLabel>{group.label}</GroupLabel>}\n {group.entries.map(renderEntry)}\n </div>\n ))}\n </>\n )}\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAKb,SAASC,gBAAgB,QAAQ,sBAAsB;AACvD,SAASC,SAAS,QAAQ,mBAAm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,WAAA;IAGnDf,EAAA,gBAAAX,IAAA;MAAec,SAAsD,EAAtD,sDAAsD;MAAAC,QAAA,EAClE,CAACY,MAYD,gBAZA3B,IAAA,CACEH,gBAAgB;QAACiC,OAAO,EAAP,IAAO;QAAAf,QAAA,EAAEU;MAAc,CAW3C,CAAC,gBAZAvB,KAAA,CAAAE,SAAA;QAAAW,QAAA,GAIIS,OAAO,EACPD,MAAM,CAAAQ,GAAI,CAACC,KAAA,iBACV9B,KAAA;UAA+BY,SAAS,EAAT,SAAS;UAAAC,QAAA,GACrCiB,KAAK,CAAAf,KAAgD,iBAArDjB,IAAA,CAAgBqB,UAAU;YAAAN,QAAA,EAAEiB,KAAK,CAAAf;UAAM,CAAa,CAAC,EACrDe,KAAK,CAAAC,OAAQ,CAAAF,GAAI,CAACL,WAAW,CAAC;QAAA,GAFvBM,KAAK,CAAAE,GAGV,CACN,CAAC;MAAA,CAEN;IAAC,CACE,CAAC;IAAA3B,CAAA,MAAAgB,MAAA;IAAAhB,CAAA,MAAAoB,MAAA;IAAApB,CAAA,MAAAiB,OAAA;IAAAjB,CAAA,MAAAkB,cAAA;IAAAlB,CAAA,MAAAmB,WAAA;IAAAnB,CAAA,MAAAI,EAAA;EAAA;IAAAA,EAAA,GAAAJ,CAAA;EAAA;EAAA,OAdNI,EAcM;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header-save-button.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/editor/header-save-button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAyB,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAQ/D,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,GACP,EAAE;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACvD,+BAkBA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { Button, createUsePuck } from '@puckeditor/core';
|
|
6
|
+
import { Loader2Icon } from 'lucide-react';
|
|
7
|
+
import { toast } from 'sonner';
|
|
8
|
+
import { usePuckDictionary } from '../i18n';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const usePuck = createUsePuck();
|
|
11
|
+
export function HeaderSaveButton(t0) {
|
|
12
|
+
const $ = _c(10);
|
|
13
|
+
const {
|
|
14
|
+
onSave
|
|
15
|
+
} = t0;
|
|
16
|
+
const t = usePuckDictionary().editor;
|
|
17
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
18
|
+
const appState = usePuck(_temp);
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] !== appState.data || $[1] !== onSave || $[2] !== t.savePageFailed) {
|
|
21
|
+
t1 = () => {
|
|
22
|
+
setIsSaving(true);
|
|
23
|
+
Promise.resolve(onSave(appState.data)).catch(() => toast.error(t.savePageFailed)).finally(() => setIsSaving(false));
|
|
24
|
+
};
|
|
25
|
+
$[0] = appState.data;
|
|
26
|
+
$[1] = onSave;
|
|
27
|
+
$[2] = t.savePageFailed;
|
|
28
|
+
$[3] = t1;
|
|
29
|
+
} else {
|
|
30
|
+
t1 = $[3];
|
|
31
|
+
}
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[4] !== isSaving) {
|
|
34
|
+
t2 = isSaving && /*#__PURE__*/_jsx(Loader2Icon, {
|
|
35
|
+
className: "nh:mr-1 nh:size-4 nh:animate-spin"
|
|
36
|
+
});
|
|
37
|
+
$[4] = isSaving;
|
|
38
|
+
$[5] = t2;
|
|
39
|
+
} else {
|
|
40
|
+
t2 = $[5];
|
|
41
|
+
}
|
|
42
|
+
let t3;
|
|
43
|
+
if ($[6] !== t.save || $[7] !== t1 || $[8] !== t2) {
|
|
44
|
+
t3 = /*#__PURE__*/_jsxs(Button, {
|
|
45
|
+
onClick: t1,
|
|
46
|
+
children: [t2, t.save]
|
|
47
|
+
});
|
|
48
|
+
$[6] = t.save;
|
|
49
|
+
$[7] = t1;
|
|
50
|
+
$[8] = t2;
|
|
51
|
+
$[9] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[9];
|
|
54
|
+
}
|
|
55
|
+
return t3;
|
|
56
|
+
}
|
|
57
|
+
function _temp(s) {
|
|
58
|
+
return s.appState;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=header-save-button.js.map
|