@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,471 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { createUsePuck, Drawer } from '@puckeditor/core';
|
|
6
|
+
import { AlertTriangleIcon, Loader2Icon, PlusIcon, Trash2Icon } from 'lucide-react';
|
|
7
|
+
import { toast } from 'sonner';
|
|
8
|
+
import { PickerEntryItem } from '../../editor/picker-entry-item';
|
|
9
|
+
import { mergeIntoGroups, templateEntry, templateGroupLabel, usePickerModel } from '../../editor/picker-model';
|
|
10
|
+
import { usePuckDictionary, usePuckLocale } from '../../i18n';
|
|
11
|
+
import { ComponentListAccordion } from '../../ui/component-list-accordion';
|
|
12
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../../ui/dialog';
|
|
13
|
+
import { IconButton } from '../../ui/icon-button';
|
|
14
|
+
import { SearchControl, SearchEmptyState } from '../../ui/search-control';
|
|
15
|
+
import { usePanelSearchFocus } from '../../ui/use-panel-search-focus';
|
|
16
|
+
import { CustomTemplateList } from './custom-template-list';
|
|
17
|
+
import { TemplateForm } from './template-form';
|
|
18
|
+
import { templateMatchesQuery } from './templates';
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
const usePuck = createUsePuck();
|
|
21
|
+
export function TemplatesPanel() {
|
|
22
|
+
const $ = _c(70);
|
|
23
|
+
const appState = usePuck(_temp);
|
|
24
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
25
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
26
|
+
let t0;
|
|
27
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
+
t0 = {};
|
|
29
|
+
$[0] = t0;
|
|
30
|
+
} else {
|
|
31
|
+
t0 = $[0];
|
|
32
|
+
}
|
|
33
|
+
const [collapsed, setCollapsed] = useState(t0);
|
|
34
|
+
const searchRef = usePanelSearchFocus("templates");
|
|
35
|
+
const t = usePuckDictionary().templates;
|
|
36
|
+
const tCommon = usePuckDictionary().common;
|
|
37
|
+
const locale = usePuckLocale();
|
|
38
|
+
const {
|
|
39
|
+
config,
|
|
40
|
+
pageTemplates,
|
|
41
|
+
brokenTemplates,
|
|
42
|
+
isLoading,
|
|
43
|
+
invalidate,
|
|
44
|
+
insertRootTemplate,
|
|
45
|
+
remove
|
|
46
|
+
} = usePickerModel();
|
|
47
|
+
let handleTemplateSaved;
|
|
48
|
+
let t1;
|
|
49
|
+
let t2;
|
|
50
|
+
let t3;
|
|
51
|
+
let t4;
|
|
52
|
+
if ($[1] !== brokenTemplates || $[2] !== collapsed || $[3] !== config || $[4] !== insertRootTemplate || $[5] !== invalidate || $[6] !== isLoading || $[7] !== locale || $[8] !== pageTemplates || $[9] !== remove || $[10] !== searchQuery || $[11] !== searchRef || $[12] !== t.collapse || $[13] !== t.customPageTemplates || $[14] !== t.expand || $[15] !== t.noTemplatesFound || $[16] !== t.saveAsTemplate || $[17] !== t.searchPlaceholder || $[18] !== tCommon) {
|
|
53
|
+
const query = searchQuery.trim().toLowerCase();
|
|
54
|
+
const builtinPages = pageTemplates.filter(template => template.source === "builtin" && templateMatchesQuery(template, locale, query));
|
|
55
|
+
const hasCustom = pageTemplates.some(template_0 => template_0.source === "custom" && templateMatchesQuery(template_0, locale, query));
|
|
56
|
+
const hasResults = builtinPages.length > 0 || hasCustom;
|
|
57
|
+
let t5;
|
|
58
|
+
if ($[24] !== config || $[25] !== locale || $[26] !== tCommon) {
|
|
59
|
+
t5 = template_1 => ({
|
|
60
|
+
...templateEntry(template_1, locale),
|
|
61
|
+
group: templateGroupLabel(config, template_1.group, tCommon.defaultGroup)
|
|
62
|
+
});
|
|
63
|
+
$[24] = config;
|
|
64
|
+
$[25] = locale;
|
|
65
|
+
$[26] = tCommon;
|
|
66
|
+
$[27] = t5;
|
|
67
|
+
} else {
|
|
68
|
+
t5 = $[27];
|
|
69
|
+
}
|
|
70
|
+
const pageGroups = mergeIntoGroups(builtinPages.map(t5));
|
|
71
|
+
let t6;
|
|
72
|
+
if ($[28] !== invalidate) {
|
|
73
|
+
t6 = () => {
|
|
74
|
+
setIsModalOpen(false);
|
|
75
|
+
invalidate();
|
|
76
|
+
};
|
|
77
|
+
$[28] = invalidate;
|
|
78
|
+
$[29] = t6;
|
|
79
|
+
} else {
|
|
80
|
+
t6 = $[29];
|
|
81
|
+
}
|
|
82
|
+
handleTemplateSaved = t6;
|
|
83
|
+
t3 = "nh:flex nh:h-full nh:flex-col";
|
|
84
|
+
let t7;
|
|
85
|
+
if ($[30] !== searchQuery || $[31] !== searchRef || $[32] !== t.searchPlaceholder) {
|
|
86
|
+
t7 = /*#__PURE__*/_jsx(SearchControl, {
|
|
87
|
+
inputRef: searchRef,
|
|
88
|
+
className: "nh:flex-1",
|
|
89
|
+
placeholder: t.searchPlaceholder,
|
|
90
|
+
value: searchQuery,
|
|
91
|
+
onChange: setSearchQuery
|
|
92
|
+
});
|
|
93
|
+
$[30] = searchQuery;
|
|
94
|
+
$[31] = searchRef;
|
|
95
|
+
$[32] = t.searchPlaceholder;
|
|
96
|
+
$[33] = t7;
|
|
97
|
+
} else {
|
|
98
|
+
t7 = $[33];
|
|
99
|
+
}
|
|
100
|
+
let t8;
|
|
101
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
102
|
+
t8 = () => setIsModalOpen(true);
|
|
103
|
+
$[34] = t8;
|
|
104
|
+
} else {
|
|
105
|
+
t8 = $[34];
|
|
106
|
+
}
|
|
107
|
+
let t9;
|
|
108
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
109
|
+
t9 = /*#__PURE__*/_jsx(PlusIcon, {
|
|
110
|
+
className: "nh:h-4 nh:w-4"
|
|
111
|
+
});
|
|
112
|
+
$[35] = t9;
|
|
113
|
+
} else {
|
|
114
|
+
t9 = $[35];
|
|
115
|
+
}
|
|
116
|
+
let t10;
|
|
117
|
+
if ($[36] !== t.saveAsTemplate) {
|
|
118
|
+
t10 = /*#__PURE__*/_jsx("button", {
|
|
119
|
+
type: "button",
|
|
120
|
+
title: t.saveAsTemplate,
|
|
121
|
+
onClick: t8,
|
|
122
|
+
className: "nh:flex nh:shrink-0 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-md nh:border nh:border-gray-200 nh:bg-white nh:p-2 nh:text-gray-700 nh:transition-colors hover:bg-gray-50",
|
|
123
|
+
children: t9
|
|
124
|
+
});
|
|
125
|
+
$[36] = t.saveAsTemplate;
|
|
126
|
+
$[37] = t10;
|
|
127
|
+
} else {
|
|
128
|
+
t10 = $[37];
|
|
129
|
+
}
|
|
130
|
+
if ($[38] !== t10 || $[39] !== t7) {
|
|
131
|
+
t4 = /*#__PURE__*/_jsx("div", {
|
|
132
|
+
className: "nh:border-b nh:border-gray-200 nh:p-3",
|
|
133
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
134
|
+
className: "nh:flex nh:items-center nh:gap-2",
|
|
135
|
+
children: [t7, t10]
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
$[38] = t10;
|
|
139
|
+
$[39] = t7;
|
|
140
|
+
$[40] = t4;
|
|
141
|
+
} else {
|
|
142
|
+
t4 = $[40];
|
|
143
|
+
}
|
|
144
|
+
t1 = "nh:flex-1 nh:overflow-y-auto";
|
|
145
|
+
t2 = isLoading ? /*#__PURE__*/_jsx("div", {
|
|
146
|
+
className: "nh:flex nh:items-center nh:justify-center nh:py-8",
|
|
147
|
+
children: /*#__PURE__*/_jsx(Loader2Icon, {
|
|
148
|
+
className: "nh:h-5 nh:w-5 nh:animate-spin nh:text-gray-400"
|
|
149
|
+
})
|
|
150
|
+
}) : !hasResults && brokenTemplates.length === 0 ? /*#__PURE__*/_jsx(SearchEmptyState, {
|
|
151
|
+
children: t.noTemplatesFound
|
|
152
|
+
}) : /*#__PURE__*/_jsxs("div", {
|
|
153
|
+
className: "nh:space-y-3 nh:p-3",
|
|
154
|
+
children: [pageGroups.map(group => {
|
|
155
|
+
const entryList = /*#__PURE__*/_jsx(Drawer, {
|
|
156
|
+
children: group.entries.map(entry => /*#__PURE__*/_jsx(PickerEntryItem, {
|
|
157
|
+
entry: entry,
|
|
158
|
+
onInsert: () => insertRootTemplate(entry.template)
|
|
159
|
+
}, entry.key))
|
|
160
|
+
});
|
|
161
|
+
if (pageGroups.length === 1) {
|
|
162
|
+
return /*#__PURE__*/_jsx("div", {
|
|
163
|
+
children: entryList
|
|
164
|
+
}, group.key);
|
|
165
|
+
}
|
|
166
|
+
return /*#__PURE__*/_jsx(ComponentListAccordion, {
|
|
167
|
+
title: group.label,
|
|
168
|
+
expanded: !collapsed[group.key],
|
|
169
|
+
onToggle: () => setCollapsed(prev => ({
|
|
170
|
+
...prev,
|
|
171
|
+
[group.key]: !prev[group.key]
|
|
172
|
+
})),
|
|
173
|
+
expandLabel: t.expand,
|
|
174
|
+
collapseLabel: t.collapse,
|
|
175
|
+
children: entryList
|
|
176
|
+
}, group.key);
|
|
177
|
+
}), /*#__PURE__*/_jsx(CustomTemplateList, {
|
|
178
|
+
title: t.customPageTemplates,
|
|
179
|
+
category: "page",
|
|
180
|
+
query: searchQuery,
|
|
181
|
+
onInsert: insertRootTemplate
|
|
182
|
+
}), /*#__PURE__*/_jsx(BrokenTemplateList, {
|
|
183
|
+
templates: brokenTemplates,
|
|
184
|
+
onDeleted: invalidate,
|
|
185
|
+
remove: remove
|
|
186
|
+
})]
|
|
187
|
+
});
|
|
188
|
+
$[1] = brokenTemplates;
|
|
189
|
+
$[2] = collapsed;
|
|
190
|
+
$[3] = config;
|
|
191
|
+
$[4] = insertRootTemplate;
|
|
192
|
+
$[5] = invalidate;
|
|
193
|
+
$[6] = isLoading;
|
|
194
|
+
$[7] = locale;
|
|
195
|
+
$[8] = pageTemplates;
|
|
196
|
+
$[9] = remove;
|
|
197
|
+
$[10] = searchQuery;
|
|
198
|
+
$[11] = searchRef;
|
|
199
|
+
$[12] = t.collapse;
|
|
200
|
+
$[13] = t.customPageTemplates;
|
|
201
|
+
$[14] = t.expand;
|
|
202
|
+
$[15] = t.noTemplatesFound;
|
|
203
|
+
$[16] = t.saveAsTemplate;
|
|
204
|
+
$[17] = t.searchPlaceholder;
|
|
205
|
+
$[18] = tCommon;
|
|
206
|
+
$[19] = handleTemplateSaved;
|
|
207
|
+
$[20] = t1;
|
|
208
|
+
$[21] = t2;
|
|
209
|
+
$[22] = t3;
|
|
210
|
+
$[23] = t4;
|
|
211
|
+
} else {
|
|
212
|
+
handleTemplateSaved = $[19];
|
|
213
|
+
t1 = $[20];
|
|
214
|
+
t2 = $[21];
|
|
215
|
+
t3 = $[22];
|
|
216
|
+
t4 = $[23];
|
|
217
|
+
}
|
|
218
|
+
let t5;
|
|
219
|
+
if ($[41] !== t1 || $[42] !== t2) {
|
|
220
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
221
|
+
className: t1,
|
|
222
|
+
children: t2
|
|
223
|
+
});
|
|
224
|
+
$[41] = t1;
|
|
225
|
+
$[42] = t2;
|
|
226
|
+
$[43] = t5;
|
|
227
|
+
} else {
|
|
228
|
+
t5 = $[43];
|
|
229
|
+
}
|
|
230
|
+
let t6;
|
|
231
|
+
if ($[44] !== t3 || $[45] !== t4 || $[46] !== t5) {
|
|
232
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
233
|
+
className: t3,
|
|
234
|
+
children: [t4, t5]
|
|
235
|
+
});
|
|
236
|
+
$[44] = t3;
|
|
237
|
+
$[45] = t4;
|
|
238
|
+
$[46] = t5;
|
|
239
|
+
$[47] = t6;
|
|
240
|
+
} else {
|
|
241
|
+
t6 = $[47];
|
|
242
|
+
}
|
|
243
|
+
let t7;
|
|
244
|
+
if ($[48] !== t.saveAsTemplate) {
|
|
245
|
+
t7 = /*#__PURE__*/_jsx(DialogTitle, {
|
|
246
|
+
children: t.saveAsTemplate
|
|
247
|
+
});
|
|
248
|
+
$[48] = t.saveAsTemplate;
|
|
249
|
+
$[49] = t7;
|
|
250
|
+
} else {
|
|
251
|
+
t7 = $[49];
|
|
252
|
+
}
|
|
253
|
+
let t8;
|
|
254
|
+
if ($[50] !== t.saveDialogDescription) {
|
|
255
|
+
t8 = /*#__PURE__*/_jsx(DialogDescription, {
|
|
256
|
+
children: t.saveDialogDescription
|
|
257
|
+
});
|
|
258
|
+
$[50] = t.saveDialogDescription;
|
|
259
|
+
$[51] = t8;
|
|
260
|
+
} else {
|
|
261
|
+
t8 = $[51];
|
|
262
|
+
}
|
|
263
|
+
let t9;
|
|
264
|
+
if ($[52] !== t7 || $[53] !== t8) {
|
|
265
|
+
t9 = /*#__PURE__*/_jsxs(DialogHeader, {
|
|
266
|
+
children: [t7, t8]
|
|
267
|
+
});
|
|
268
|
+
$[52] = t7;
|
|
269
|
+
$[53] = t8;
|
|
270
|
+
$[54] = t9;
|
|
271
|
+
} else {
|
|
272
|
+
t9 = $[54];
|
|
273
|
+
}
|
|
274
|
+
let t10;
|
|
275
|
+
if ($[55] !== appState?.data?.content) {
|
|
276
|
+
t10 = appState?.data?.content || [];
|
|
277
|
+
$[55] = appState?.data?.content;
|
|
278
|
+
$[56] = t10;
|
|
279
|
+
} else {
|
|
280
|
+
t10 = $[56];
|
|
281
|
+
}
|
|
282
|
+
let t11;
|
|
283
|
+
if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
|
|
284
|
+
t11 = () => setIsModalOpen(false);
|
|
285
|
+
$[57] = t11;
|
|
286
|
+
} else {
|
|
287
|
+
t11 = $[57];
|
|
288
|
+
}
|
|
289
|
+
let t12;
|
|
290
|
+
if ($[58] !== handleTemplateSaved || $[59] !== t10) {
|
|
291
|
+
t12 = /*#__PURE__*/_jsx(TemplateForm, {
|
|
292
|
+
content: t10,
|
|
293
|
+
onCancel: t11,
|
|
294
|
+
onTemplateSaved: handleTemplateSaved,
|
|
295
|
+
category: "page"
|
|
296
|
+
});
|
|
297
|
+
$[58] = handleTemplateSaved;
|
|
298
|
+
$[59] = t10;
|
|
299
|
+
$[60] = t12;
|
|
300
|
+
} else {
|
|
301
|
+
t12 = $[60];
|
|
302
|
+
}
|
|
303
|
+
let t13;
|
|
304
|
+
if ($[61] !== t12 || $[62] !== t9) {
|
|
305
|
+
t13 = /*#__PURE__*/_jsxs(DialogContent, {
|
|
306
|
+
className: "nh:max-h-dvh nh:max-w-lg nh:overflow-y-auto",
|
|
307
|
+
children: [t9, t12]
|
|
308
|
+
});
|
|
309
|
+
$[61] = t12;
|
|
310
|
+
$[62] = t9;
|
|
311
|
+
$[63] = t13;
|
|
312
|
+
} else {
|
|
313
|
+
t13 = $[63];
|
|
314
|
+
}
|
|
315
|
+
let t14;
|
|
316
|
+
if ($[64] !== isModalOpen || $[65] !== t13) {
|
|
317
|
+
t14 = /*#__PURE__*/_jsx(Dialog, {
|
|
318
|
+
open: isModalOpen,
|
|
319
|
+
onOpenChange: setIsModalOpen,
|
|
320
|
+
children: t13
|
|
321
|
+
});
|
|
322
|
+
$[64] = isModalOpen;
|
|
323
|
+
$[65] = t13;
|
|
324
|
+
$[66] = t14;
|
|
325
|
+
} else {
|
|
326
|
+
t14 = $[66];
|
|
327
|
+
}
|
|
328
|
+
let t15;
|
|
329
|
+
if ($[67] !== t14 || $[68] !== t6) {
|
|
330
|
+
t15 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
331
|
+
children: [t6, t14]
|
|
332
|
+
});
|
|
333
|
+
$[67] = t14;
|
|
334
|
+
$[68] = t6;
|
|
335
|
+
$[69] = t15;
|
|
336
|
+
} else {
|
|
337
|
+
t15 = $[69];
|
|
338
|
+
}
|
|
339
|
+
return t15;
|
|
340
|
+
}
|
|
341
|
+
function _temp(s) {
|
|
342
|
+
return s.appState;
|
|
343
|
+
}
|
|
344
|
+
function BrokenTemplateList(t0) {
|
|
345
|
+
const $ = _c(24);
|
|
346
|
+
const {
|
|
347
|
+
templates,
|
|
348
|
+
remove,
|
|
349
|
+
onDeleted
|
|
350
|
+
} = t0;
|
|
351
|
+
const t = usePuckDictionary().templates;
|
|
352
|
+
const [pendingId, setPendingId] = useState(null);
|
|
353
|
+
if (templates.length === 0) {
|
|
354
|
+
return null;
|
|
355
|
+
}
|
|
356
|
+
let t1;
|
|
357
|
+
if ($[0] !== onDeleted || $[1] !== remove || $[2] !== t.deleted) {
|
|
358
|
+
t1 = async template => {
|
|
359
|
+
setPendingId(template.id);
|
|
360
|
+
const result = await remove(template);
|
|
361
|
+
setPendingId(null);
|
|
362
|
+
if (!result.success) {
|
|
363
|
+
toast.error(result.message);
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
toast.success(t.deleted);
|
|
367
|
+
onDeleted();
|
|
368
|
+
};
|
|
369
|
+
$[0] = onDeleted;
|
|
370
|
+
$[1] = remove;
|
|
371
|
+
$[2] = t.deleted;
|
|
372
|
+
$[3] = t1;
|
|
373
|
+
} else {
|
|
374
|
+
t1 = $[3];
|
|
375
|
+
}
|
|
376
|
+
const handleDelete = t1;
|
|
377
|
+
let t2;
|
|
378
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
379
|
+
t2 = /*#__PURE__*/_jsx(AlertTriangleIcon, {
|
|
380
|
+
className: "nh:size-4"
|
|
381
|
+
});
|
|
382
|
+
$[4] = t2;
|
|
383
|
+
} else {
|
|
384
|
+
t2 = $[4];
|
|
385
|
+
}
|
|
386
|
+
let t3;
|
|
387
|
+
if ($[5] !== t.broken) {
|
|
388
|
+
t3 = /*#__PURE__*/_jsxs("div", {
|
|
389
|
+
className: "nh:mb-2 nh:flex nh:items-center nh:gap-1.5 nh:text-sm nh:font-medium nh:text-amber-700",
|
|
390
|
+
children: [t2, /*#__PURE__*/_jsx("span", {
|
|
391
|
+
children: t.broken
|
|
392
|
+
})]
|
|
393
|
+
});
|
|
394
|
+
$[5] = t.broken;
|
|
395
|
+
$[6] = t3;
|
|
396
|
+
} else {
|
|
397
|
+
t3 = $[6];
|
|
398
|
+
}
|
|
399
|
+
let t4;
|
|
400
|
+
if ($[7] !== t.brokenHint) {
|
|
401
|
+
t4 = /*#__PURE__*/_jsx("p", {
|
|
402
|
+
className: "nh:mb-2 nh:text-xs nh:text-amber-700",
|
|
403
|
+
children: t.brokenHint
|
|
404
|
+
});
|
|
405
|
+
$[7] = t.brokenHint;
|
|
406
|
+
$[8] = t4;
|
|
407
|
+
} else {
|
|
408
|
+
t4 = $[8];
|
|
409
|
+
}
|
|
410
|
+
let t5;
|
|
411
|
+
if ($[9] !== handleDelete || $[10] !== pendingId || $[11] !== t.deleteTemplate || $[12] !== templates) {
|
|
412
|
+
let t6;
|
|
413
|
+
if ($[14] !== handleDelete || $[15] !== pendingId || $[16] !== t.deleteTemplate) {
|
|
414
|
+
t6 = template_0 => /*#__PURE__*/_jsxs("li", {
|
|
415
|
+
className: "nh:group nh:flex nh:items-center nh:justify-between nh:gap-2 nh:rounded nh:px-2 nh:py-1 nh:text-sm nh:text-gray-700",
|
|
416
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
417
|
+
className: "nh:truncate",
|
|
418
|
+
children: template_0.name
|
|
419
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
420
|
+
title: t.deleteTemplate,
|
|
421
|
+
disabled: pendingId === template_0.id,
|
|
422
|
+
onClick: () => handleDelete(template_0),
|
|
423
|
+
className: "nh:hover:text-red-600",
|
|
424
|
+
children: /*#__PURE__*/_jsx(Trash2Icon, {
|
|
425
|
+
className: "nh:h-4 nh:w-4"
|
|
426
|
+
})
|
|
427
|
+
})]
|
|
428
|
+
}, template_0.id);
|
|
429
|
+
$[14] = handleDelete;
|
|
430
|
+
$[15] = pendingId;
|
|
431
|
+
$[16] = t.deleteTemplate;
|
|
432
|
+
$[17] = t6;
|
|
433
|
+
} else {
|
|
434
|
+
t6 = $[17];
|
|
435
|
+
}
|
|
436
|
+
t5 = templates.map(t6);
|
|
437
|
+
$[9] = handleDelete;
|
|
438
|
+
$[10] = pendingId;
|
|
439
|
+
$[11] = t.deleteTemplate;
|
|
440
|
+
$[12] = templates;
|
|
441
|
+
$[13] = t5;
|
|
442
|
+
} else {
|
|
443
|
+
t5 = $[13];
|
|
444
|
+
}
|
|
445
|
+
let t6;
|
|
446
|
+
if ($[18] !== t5) {
|
|
447
|
+
t6 = /*#__PURE__*/_jsx("ul", {
|
|
448
|
+
className: "nh:space-y-1",
|
|
449
|
+
children: t5
|
|
450
|
+
});
|
|
451
|
+
$[18] = t5;
|
|
452
|
+
$[19] = t6;
|
|
453
|
+
} else {
|
|
454
|
+
t6 = $[19];
|
|
455
|
+
}
|
|
456
|
+
let t7;
|
|
457
|
+
if ($[20] !== t3 || $[21] !== t4 || $[22] !== t6) {
|
|
458
|
+
t7 = /*#__PURE__*/_jsxs("div", {
|
|
459
|
+
className: "nh:rounded-md nh:border nh:border-amber-200 nh:bg-amber-50 nh:p-3",
|
|
460
|
+
children: [t3, t4, t6]
|
|
461
|
+
});
|
|
462
|
+
$[20] = t3;
|
|
463
|
+
$[21] = t4;
|
|
464
|
+
$[22] = t6;
|
|
465
|
+
$[23] = t7;
|
|
466
|
+
} else {
|
|
467
|
+
t7 = $[23];
|
|
468
|
+
}
|
|
469
|
+
return t7;
|
|
470
|
+
}
|
|
471
|
+
//# sourceMappingURL=templates-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates-panel.js","names":["c","_c","useState","createUsePuck","Drawer","AlertTriangleIcon","Loader2Icon","PlusIcon","Trash2Icon","toast","PickerEntryItem","mergeIntoGroups","templateEntry","templateGroupLabel","usePickerModel","usePuckDictionary","usePuckLocale","ComponentListAccordion","Dialog","DialogContent","DialogDescription","DialogHeader","DialogTitle","IconButton","SearchControl","SearchEmptyState","usePanelSearchFocus","CustomTemplateList","TemplateForm","templateMatchesQuery","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","usePuck","TemplatesPanel","$","appState","_temp","searchQuery","setSearchQuery","isModalOpen","setIsModalOpen","t0","Symbol","for","collapsed","setCollapsed","searchRef","t","templates","tCommon","common","locale","config","pageTemplates","brokenTemplates","isLoading","invalidate","insertRootTemplate","remove","handleTemplateSaved","t1","t2","t3","t4","collapse","customPageTemplates","expand","noTemplatesFound","saveAsTemplate","searchPlaceholder","query","trim","toLowerCase","builtinPages","filter","template","source","hasCustom","some","template_0","hasResults","length","t5","template_1","group","defaultGroup","pageGroups","map","t6","t7","className","placeholder","t8","t9","t10","type","title","onClick","children","entryList","entries","entry","onInsert","key","label","expanded","onToggle","prev","expandLabel","collapseLabel","category","BrokenTemplateList","saveDialogDescription","data","content","t11","t12","onCancel","t13","t14","t15","s","onDeleted","pendingId","setPendingId","deleted","id","result","success","error","message","handleDelete","broken","brokenHint","deleteTemplate","name","disabled"],"sources":["../../../../../src/puck-editor/internal/plugins/templates-plugin/templates-panel.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { createUsePuck, Drawer } from '@puckeditor/core';\nimport {\n AlertTriangleIcon,\n Loader2Icon,\n PlusIcon,\n Trash2Icon,\n} from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { PickerEntryItem } from '../../editor/picker-entry-item';\nimport {\n mergeIntoGroups,\n templateEntry,\n templateGroupLabel,\n usePickerModel,\n} from '../../editor/picker-model';\nimport { usePuckDictionary, usePuckLocale } from '../../i18n';\nimport { ComponentListAccordion } from '../../ui/component-list-accordion';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../../ui/dialog';\nimport { IconButton } from '../../ui/icon-button';\nimport { SearchControl, SearchEmptyState } from '../../ui/search-control';\nimport { usePanelSearchFocus } from '../../ui/use-panel-search-focus';\nimport { CustomTemplateList } from './custom-template-list';\nimport { TemplateForm } from './template-form';\nimport { templateMatchesQuery } from './templates';\nimport type { BrokenTemplate } from './templates';\n\nconst usePuck = createUsePuck();\n\nexport function TemplatesPanel() {\n const appState = usePuck((s) => s.appState);\n const [searchQuery, setSearchQuery] = useState('');\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [collapsed, setCollapsed] = useState<Record<string, boolean>>({});\n const searchRef = usePanelSearchFocus('templates');\n\n const t = usePuckDictionary().templates;\n const tCommon = usePuckDictionary().common;\n const locale = usePuckLocale();\n const {\n config,\n pageTemplates,\n brokenTemplates,\n isLoading,\n invalidate,\n insertRootTemplate,\n remove,\n } = usePickerModel();\n\n const query = searchQuery.trim().toLowerCase();\n const builtinPages = pageTemplates.filter(\n (template) =>\n template.source === 'builtin' &&\n templateMatchesQuery(template, locale, query)\n );\n const hasCustom = pageTemplates.some(\n (template) =>\n template.source === 'custom' &&\n templateMatchesQuery(template, locale, query)\n );\n const hasResults = builtinPages.length > 0 || hasCustom;\n\n const pageGroups = mergeIntoGroups(\n builtinPages.map((template) => ({\n ...templateEntry(template, locale),\n group: templateGroupLabel(config, template.group, tCommon.defaultGroup),\n }))\n );\n\n const handleTemplateSaved = () => {\n setIsModalOpen(false);\n invalidate();\n };\n\n return (\n <>\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 <div className=\"nh:flex nh:items-center nh:gap-2\">\n <SearchControl\n inputRef={searchRef}\n className=\"nh:flex-1\"\n placeholder={t.searchPlaceholder}\n value={searchQuery}\n onChange={setSearchQuery}\n />\n <button\n type=\"button\"\n title={t.saveAsTemplate}\n onClick={() => setIsModalOpen(true)}\n className=\"nh:flex nh:shrink-0 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-md nh:border nh:border-gray-200 nh:bg-white nh:p-2 nh:text-gray-700 nh:transition-colors hover:bg-gray-50\"\n >\n <PlusIcon className=\"nh:h-4 nh:w-4\" />\n </button>\n </div>\n </div>\n\n <div className=\"nh:flex-1 nh:overflow-y-auto\">\n {isLoading ? (\n <div className=\"nh:flex nh:items-center nh:justify-center nh:py-8\">\n <Loader2Icon className=\"nh:h-5 nh:w-5 nh:animate-spin nh:text-gray-400\" />\n </div>\n ) : !hasResults && brokenTemplates.length === 0 ? (\n <SearchEmptyState>{t.noTemplatesFound}</SearchEmptyState>\n ) : (\n <div className=\"nh:space-y-3 nh:p-3\">\n {pageGroups.map((group) => {\n const entryList = (\n <Drawer>\n {group.entries.map((entry) => (\n <PickerEntryItem\n key={entry.key}\n entry={entry}\n onInsert={() => insertRootTemplate(entry.template!)}\n />\n ))}\n </Drawer>\n );\n if (pageGroups.length === 1) {\n return <div key={group.key}>{entryList}</div>;\n }\n return (\n <ComponentListAccordion\n key={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={t.expand}\n collapseLabel={t.collapse}\n >\n {entryList}\n </ComponentListAccordion>\n );\n })}\n\n <CustomTemplateList\n title={t.customPageTemplates}\n category=\"page\"\n query={searchQuery}\n onInsert={insertRootTemplate}\n />\n\n <BrokenTemplateList\n templates={brokenTemplates}\n onDeleted={invalidate}\n remove={remove}\n />\n </div>\n )}\n </div>\n </div>\n\n <Dialog open={isModalOpen} onOpenChange={setIsModalOpen}>\n <DialogContent className=\"nh:max-h-dvh nh:max-w-lg nh:overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>{t.saveAsTemplate}</DialogTitle>\n <DialogDescription>{t.saveDialogDescription}</DialogDescription>\n </DialogHeader>\n <TemplateForm\n content={appState?.data?.content || []}\n onCancel={() => setIsModalOpen(false)}\n onTemplateSaved={handleTemplateSaved}\n category=\"page\"\n />\n </DialogContent>\n </Dialog>\n </>\n );\n}\n\ntype RemoveResult = { success: boolean; message: string };\n\nfunction BrokenTemplateList({\n templates,\n remove,\n onDeleted,\n}: {\n templates: BrokenTemplate[];\n remove: (template: BrokenTemplate) => Promise<RemoveResult>;\n onDeleted: () => void;\n}) {\n const t = usePuckDictionary().templates;\n const [pendingId, setPendingId] = useState<string | null>(null);\n\n if (templates.length === 0) return null;\n\n const handleDelete = async (template: BrokenTemplate) => {\n setPendingId(template.id);\n const result = await remove(template);\n setPendingId(null);\n if (!result.success) {\n toast.error(result.message);\n return;\n }\n toast.success(t.deleted);\n onDeleted();\n };\n\n return (\n <div className=\"nh:rounded-md nh:border nh:border-amber-200 nh:bg-amber-50 nh:p-3\">\n <div className=\"nh:mb-2 nh:flex nh:items-center nh:gap-1.5 nh:text-sm nh:font-medium nh:text-amber-700\">\n <AlertTriangleIcon className=\"nh:size-4\" />\n <span>{t.broken}</span>\n </div>\n <p className=\"nh:mb-2 nh:text-xs nh:text-amber-700\">{t.brokenHint}</p>\n <ul className=\"nh:space-y-1\">\n {templates.map((template) => (\n <li\n key={template.id}\n className=\"nh:group nh:flex nh:items-center nh:justify-between nh:gap-2 nh:rounded nh:px-2 nh:py-1 nh:text-sm nh:text-gray-700\"\n >\n <span className=\"nh:truncate\">{template.name}</span>\n <IconButton\n title={t.deleteTemplate}\n disabled={pendingId === template.id}\n onClick={() => handleDelete(template)}\n className=\"nh:hover:text-red-600\"\n >\n <Trash2Icon className=\"nh:h-4 nh:w-4\" />\n </IconButton>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,aAAa,EAAEC,MAAM,QAAQ,kBAAkB;AACxD,SACEC,iBAAiB,EACjBC,WAAW,EACXC,QAAQ,EACRC,UAAU,QACL,cAAc;AACrB,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SACEC,eAAe,EACfC,aAAa,EACbC,kBAAkB,EAClBC,cAAc,QACT,2BAA2B;AAClC,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,YAAY;AAC7D,SAASC,sBAAsB,QAAQ,mCAAmC;AAC1E,SACEC,MAAM,EACNC,aAAa,EACbC,iBAAiB,EACjBC,YAAY,EACZC,WAAW,QACN,iBAAiB;AACxB,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,aAAa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IAAAtD,CAAA,OAAAuD,EAAA;EAAA;IAAAA,EAAA,GAAAvD,CAAA;EAAA;EAAA,OAxBNuD,EAwBM;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/templates-plugin/templates-plugin.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK1C,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAO1E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { LayoutTemplateIcon } from 'lucide-react';
|
|
4
|
+
import { TemplatesPanel } from './templates-panel';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export function createTemplatesPlugin(options) {
|
|
7
|
+
return {
|
|
8
|
+
name: 'templates',
|
|
9
|
+
label: options?.label ?? 'Templates',
|
|
10
|
+
icon: /*#__PURE__*/_jsx(LayoutTemplateIcon, {
|
|
11
|
+
className: "nh:size-6"
|
|
12
|
+
}),
|
|
13
|
+
render: () => /*#__PURE__*/_jsx(TemplatesPanel, {})
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=templates-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates-plugin.js","names":["LayoutTemplateIcon","TemplatesPanel","jsx","_jsx","createTemplatesPlugin","options","name","label","icon","className","render"],"sources":["../../../../../src/puck-editor/internal/plugins/templates-plugin/templates-plugin.tsx"],"sourcesContent":["'use client';\n\nimport { Plugin } from '@puckeditor/core';\nimport { LayoutTemplateIcon } from 'lucide-react';\n\nimport { TemplatesPanel } from './templates-panel';\n\nexport function createTemplatesPlugin(options?: { label?: string }): Plugin {\n return {\n name: 'templates',\n label: options?.label ?? 'Templates',\n icon: <LayoutTemplateIcon className=\"nh:size-6\" />,\n render: () => <TemplatesPanel />,\n };\n}\n"],"mappings":"AAAA,YAAY;;AAGZ,SAASA,kBAAkB,QAAQ,cAAc;AAEjD,SAASC,cAAc,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,SAASC,qBAAqBA,CAACC,OAA4B,EAAU;EAC1E,OAAO;IACLC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAEF,OAAO,EAAEE,KAAK,IAAI,WAAW;IACpCC,IAAI,eAAEL,IAAA,CAACH,kBAAkB;MAACS,SAAS,EAAC;IAAW,CAAE,CAAC;IAClDC,MAAM,EAAEA,CAAA,kBAAMP,IAAA,CAACF,cAAc,IAAE;EACjC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ComponentData, Config } from '@puckeditor/core';
|
|
2
|
+
import type { PuckTemplatesConfig } from '../../content-model.ts';
|
|
3
|
+
export type TemplateCategory = 'page' | 'section' | 'block';
|
|
4
|
+
export type TemplateAi = {
|
|
5
|
+
description?: string;
|
|
6
|
+
instructions?: string;
|
|
7
|
+
};
|
|
8
|
+
export type TemplateEnvelope = {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string | Record<string, string>;
|
|
11
|
+
category: TemplateCategory;
|
|
12
|
+
icon?: string;
|
|
13
|
+
ai?: TemplateAi;
|
|
14
|
+
group?: string;
|
|
15
|
+
data: ComponentData[];
|
|
16
|
+
};
|
|
17
|
+
export type BuiltinTemplate = TemplateEnvelope;
|
|
18
|
+
export type Template = TemplateEnvelope & {
|
|
19
|
+
source: 'builtin' | 'custom';
|
|
20
|
+
};
|
|
21
|
+
export type BrokenTemplate = {
|
|
22
|
+
source: 'custom';
|
|
23
|
+
broken: true;
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
export type FetchedTemplates = {
|
|
28
|
+
valid: Template[];
|
|
29
|
+
broken: BrokenTemplate[];
|
|
30
|
+
};
|
|
31
|
+
export declare const templateKey: (template: Template) => string;
|
|
32
|
+
export declare const isRootLevelTemplate: (template: Template | BuiltinTemplate) => boolean;
|
|
33
|
+
export declare const templateLabel: (template: Template | BuiltinTemplate, locale: string) => string;
|
|
34
|
+
export declare const templateMatchesQuery: (template: Template, locale: string, query: string) => boolean;
|
|
35
|
+
export declare const asBuiltinTemplates: (builtins: BuiltinTemplate[]) => Template[];
|
|
36
|
+
export declare const mergeTemplates: (builtins: BuiltinTemplate[], custom: Template[]) => Template[];
|
|
37
|
+
export declare const isBrokenTemplate: (template: Template | BrokenTemplate) => template is BrokenTemplate;
|
|
38
|
+
export declare const fetchTemplates: (config: PuckTemplatesConfig) => Promise<FetchedTemplates>;
|
|
39
|
+
export declare const expandTemplate: (template: Template, config: Config, outlineLabel?: string) => {
|
|
40
|
+
content: ComponentData[];
|
|
41
|
+
skipped: number;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/templates-plugin/templates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKlE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,Q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