@nodehive/nextjs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +102 -0
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +7 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/internal/config.d.ts +24 -0
- package/dist/auth/internal/config.d.ts.map +1 -0
- package/dist/auth/internal/config.js +2 -0
- package/dist/auth/internal/config.js.map +1 -0
- package/dist/auth/internal/draft-mode.d.ts +17 -0
- package/dist/auth/internal/draft-mode.d.ts.map +1 -0
- package/dist/auth/internal/draft-mode.js +73 -0
- package/dist/auth/internal/draft-mode.js.map +1 -0
- package/dist/auth/internal/editor-locale.d.ts +4 -0
- package/dist/auth/internal/editor-locale.d.ts.map +1 -0
- package/dist/auth/internal/editor-locale.js +14 -0
- package/dist/auth/internal/editor-locale.js.map +1 -0
- package/dist/auth/internal/handoff.d.ts +11 -0
- package/dist/auth/internal/handoff.d.ts.map +1 -0
- package/dist/auth/internal/handoff.js +44 -0
- package/dist/auth/internal/handoff.js.map +1 -0
- package/dist/auth/internal/has-session.d.ts +7 -0
- package/dist/auth/internal/has-session.d.ts.map +1 -0
- package/dist/auth/internal/has-session.js +11 -0
- package/dist/auth/internal/has-session.js.map +1 -0
- package/dist/auth/internal/logout.d.ts +12 -0
- package/dist/auth/internal/logout.d.ts.map +1 -0
- package/dist/auth/internal/logout.js +48 -0
- package/dist/auth/internal/logout.js.map +1 -0
- package/dist/auth/internal/next-cookie-storage.d.ts +28 -0
- package/dist/auth/internal/next-cookie-storage.d.ts.map +1 -0
- package/dist/auth/internal/next-cookie-storage.js +103 -0
- package/dist/auth/internal/next-cookie-storage.js.map +1 -0
- package/dist/auth/internal/nodehive-client.d.ts +6 -0
- package/dist/auth/internal/nodehive-client.d.ts.map +1 -0
- package/dist/auth/internal/nodehive-client.js +64 -0
- package/dist/auth/internal/nodehive-client.js.map +1 -0
- package/dist/auth/internal/oauth-config.d.ts +37 -0
- package/dist/auth/internal/oauth-config.d.ts.map +1 -0
- package/dist/auth/internal/oauth-config.js +70 -0
- package/dist/auth/internal/oauth-config.js.map +1 -0
- package/dist/auth/internal/proxy-helpers.d.ts +15 -0
- package/dist/auth/internal/proxy-helpers.d.ts.map +1 -0
- package/dist/auth/internal/proxy-helpers.js +43 -0
- package/dist/auth/internal/proxy-helpers.js.map +1 -0
- package/dist/auth/internal/refresh.d.ts +13 -0
- package/dist/auth/internal/refresh.d.ts.map +1 -0
- package/dist/auth/internal/refresh.js +170 -0
- package/dist/auth/internal/refresh.js.map +1 -0
- package/dist/auth/internal/require-auth.d.ts +2 -0
- package/dist/auth/internal/require-auth.d.ts.map +1 -0
- package/dist/auth/internal/require-auth.js +11 -0
- package/dist/auth/internal/require-auth.js.map +1 -0
- package/dist/auth/internal/return-to.d.ts +16 -0
- package/dist/auth/internal/return-to.d.ts.map +1 -0
- package/dist/auth/internal/return-to.js +31 -0
- package/dist/auth/internal/return-to.js.map +1 -0
- package/dist/auth/internal/routes/callback.d.ts +11 -0
- package/dist/auth/internal/routes/callback.d.ts.map +1 -0
- package/dist/auth/internal/routes/callback.js +93 -0
- package/dist/auth/internal/routes/callback.js.map +1 -0
- package/dist/auth/internal/routes/chips-exchange.d.ts +4 -0
- package/dist/auth/internal/routes/chips-exchange.d.ts.map +1 -0
- package/dist/auth/internal/routes/chips-exchange.js +64 -0
- package/dist/auth/internal/routes/chips-exchange.js.map +1 -0
- package/dist/auth/internal/routes/draft.d.ts +4 -0
- package/dist/auth/internal/routes/draft.d.ts.map +1 -0
- package/dist/auth/internal/routes/draft.js +34 -0
- package/dist/auth/internal/routes/draft.js.map +1 -0
- package/dist/auth/internal/routes/index.d.ts +25 -0
- package/dist/auth/internal/routes/index.d.ts.map +1 -0
- package/dist/auth/internal/routes/index.js +66 -0
- package/dist/auth/internal/routes/index.js.map +1 -0
- package/dist/auth/internal/routes/login.d.ts +3 -0
- package/dist/auth/internal/routes/login.d.ts.map +1 -0
- package/dist/auth/internal/routes/login.js +47 -0
- package/dist/auth/internal/routes/login.js.map +1 -0
- package/dist/auth/internal/routes/popup-done.d.ts +3 -0
- package/dist/auth/internal/routes/popup-done.d.ts.map +1 -0
- package/dist/auth/internal/routes/popup-done.js +24 -0
- package/dist/auth/internal/routes/popup-done.js.map +1 -0
- package/dist/auth/internal/routes/refresh.d.ts +6 -0
- package/dist/auth/internal/routes/refresh.d.ts.map +1 -0
- package/dist/auth/internal/routes/refresh.js +44 -0
- package/dist/auth/internal/routes/refresh.js.map +1 -0
- package/dist/auth/internal/same-origin.d.ts +8 -0
- package/dist/auth/internal/same-origin.d.ts.map +1 -0
- package/dist/auth/internal/same-origin.js +9 -0
- package/dist/auth/internal/same-origin.js.map +1 -0
- package/dist/auth/internal/session-gates.d.ts +7 -0
- package/dist/auth/internal/session-gates.d.ts.map +1 -0
- package/dist/auth/internal/session-gates.js +12 -0
- package/dist/auth/internal/session-gates.js.map +1 -0
- package/dist/auth/internal/update-session.d.ts +17 -0
- package/dist/auth/internal/update-session.d.ts.map +1 -0
- package/dist/auth/internal/update-session.js +39 -0
- package/dist/auth/internal/update-session.js.map +1 -0
- package/dist/auth/internal/use-editor-login.d.ts +33 -0
- package/dist/auth/internal/use-editor-login.d.ts.map +1 -0
- package/dist/auth/internal/use-editor-login.js +143 -0
- package/dist/auth/internal/use-editor-login.js.map +1 -0
- package/dist/auth/proxy.d.ts +8 -0
- package/dist/auth/proxy.d.ts.map +1 -0
- package/dist/auth/proxy.js +8 -0
- package/dist/auth/proxy.js.map +1 -0
- package/dist/auth/react.d.ts +2 -0
- package/dist/auth/react.d.ts.map +1 -0
- package/dist/auth/react.js +3 -0
- package/dist/auth/react.js.map +1 -0
- package/dist/auth/routes.d.ts +3 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +3 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/auth/server.d.ts +23 -0
- package/dist/auth/server.d.ts.map +1 -0
- package/dist/auth/server.js +61 -0
- package/dist/auth/server.js.map +1 -0
- package/dist/puck-editor/fields.d.ts +7 -0
- package/dist/puck-editor/fields.d.ts.map +1 -0
- package/dist/puck-editor/fields.js +4 -0
- package/dist/puck-editor/fields.js.map +1 -0
- package/dist/puck-editor/index.d.ts +14 -0
- package/dist/puck-editor/index.d.ts.map +1 -0
- package/dist/puck-editor/index.js +12 -0
- package/dist/puck-editor/index.js.map +1 -0
- package/dist/puck-editor/internal/api/client.d.ts +32 -0
- package/dist/puck-editor/internal/api/client.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/client.js +128 -0
- package/dist/puck-editor/internal/api/client.js.map +1 -0
- package/dist/puck-editor/internal/api/config.d.ts +29 -0
- package/dist/puck-editor/internal/api/config.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/config.js +2 -0
- package/dist/puck-editor/internal/api/config.js.map +1 -0
- package/dist/puck-editor/internal/api/create-puck-api.d.ts +26 -0
- package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/create-puck-api.js +124 -0
- package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts +13 -0
- package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/create-page.js +125 -0
- package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/entities.d.ts +17 -0
- package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/entities.js +166 -0
- package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/publish.d.ts +6 -0
- package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/publish.js +115 -0
- package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/template.d.ts +15 -0
- package/dist/puck-editor/internal/api/handlers/template.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/template.js +222 -0
- package/dist/puck-editor/internal/api/handlers/template.js.map +1 -0
- package/dist/puck-editor/internal/api/handlers/upload.d.ts +13 -0
- package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/handlers/upload.js +129 -0
- package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -0
- package/dist/puck-editor/internal/api/media-params.d.ts +4 -0
- package/dist/puck-editor/internal/api/media-params.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/media-params.js +38 -0
- package/dist/puck-editor/internal/api/media-params.js.map +1 -0
- package/dist/puck-editor/internal/api/media-upload.d.ts +24 -0
- package/dist/puck-editor/internal/api/media-upload.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/media-upload.js +171 -0
- package/dist/puck-editor/internal/api/media-upload.js.map +1 -0
- package/dist/puck-editor/internal/api/space.d.ts +4 -0
- package/dist/puck-editor/internal/api/space.d.ts.map +1 -0
- package/dist/puck-editor/internal/api/space.js +11 -0
- package/dist/puck-editor/internal/api/space.js.map +1 -0
- package/dist/puck-editor/internal/content-model.d.ts +55 -0
- package/dist/puck-editor/internal/content-model.d.ts.map +1 -0
- package/dist/puck-editor/internal/content-model.js +73 -0
- package/dist/puck-editor/internal/content-model.js.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts +4 -0
- package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/allowed-types.js +6 -0
- package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +9 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.js +231 -0
- package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +6 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.js +85 -0
- package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +2 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.js +844 -0
- package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +3 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.js +16 -0
- package/dist/puck-editor/internal/editor/canvas-scroll.js.map +1 -0
- package/dist/puck-editor/internal/editor/component-icons.d.ts +14 -0
- package/dist/puck-editor/internal/editor/component-icons.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/component-icons.js +35 -0
- package/dist/puck-editor/internal/editor/component-icons.js.map +1 -0
- package/dist/puck-editor/internal/editor/component-item.d.ts +6 -0
- package/dist/puck-editor/internal/editor/component-item.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/component-item.js +42 -0
- package/dist/puck-editor/internal/editor/component-item.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +6 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.js +249 -0
- package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +7 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.js +120 -0
- package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +15 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.js +61 -0
- package/dist/puck-editor/internal/editor/find-missing-required-fields.js.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +15 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +147 -0
- package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +17 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.js +125 -0
- package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -0
- package/dist/puck-editor/internal/editor/header-save-button.d.ts +5 -0
- package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/header-save-button.js +60 -0
- package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts +4 -0
- package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/page-template-picker.js +140 -0
- package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +6 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.js +79 -0
- package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -0
- package/dist/puck-editor/internal/editor/picker-model.d.ts +62 -0
- package/dist/puck-editor/internal/editor/picker-model.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/picker-model.js +489 -0
- package/dist/puck-editor/internal/editor/picker-model.js.map +1 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +30 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.js +30 -0
- package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -0
- package/dist/puck-editor/internal/editor/puck-editor.d.ts +15 -0
- package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/puck-editor.js +333 -0
- package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts +4 -0
- package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/section-template-modal.js +71 -0
- package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +15 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.js +93 -0
- package/dist/puck-editor/internal/editor/use-scroll-lock-outside.js.map +1 -0
- package/dist/puck-editor/internal/editor-config.d.ts +30 -0
- package/dist/puck-editor/internal/editor-config.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor-config.js +57 -0
- package/dist/puck-editor/internal/editor-config.js.map +1 -0
- package/dist/puck-editor/internal/editor-query-client.d.ts +4 -0
- package/dist/puck-editor/internal/editor-query-client.d.ts.map +1 -0
- package/dist/puck-editor/internal/editor-query-client.js +8 -0
- package/dist/puck-editor/internal/editor-query-client.js.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +14 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +120 -0
- package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +21 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +24 -0
- package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +16 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +20 -0
- package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +8 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js +151 -0
- package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -0
- package/dist/puck-editor/internal/fields/index.d.ts +10 -0
- package/dist/puck-editor/internal/fields/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/index.js +10 -0
- package/dist/puck-editor/internal/fields/index.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +33 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.js +83 -0
- package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +24 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +31 -0
- package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +2 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.js +4 -0
- package/dist/puck-editor/internal/fields/link-picker/humanize.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +27 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +564 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +9 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +189 -0
- package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +72 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.js +114 -0
- package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +14 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +667 -0
- package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +11 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.js +34 -0
- package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +40 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +146 -0
- package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts +34 -0
- package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/link-picker/types.js +2 -0
- package/dist/puck-editor/internal/fields/link-picker/types.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +27 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +32 -0
- package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +13 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js +372 -0
- package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +2 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.js +8 -0
- package/dist/puck-editor/internal/fields/media-array/reorder.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +27 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +32 -0
- package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +11 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +219 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +24 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.js +8 -0
- package/dist/puck-editor/internal/fields/media-selector/crop-types.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +8 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.js +51 -0
- package/dist/puck-editor/internal/fields/media-selector/extract-fields.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +7 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +147 -0
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +30 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +358 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +14 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +355 -0
- package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +2 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.js +55 -0
- package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +24 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +229 -0
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +7 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +120 -0
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +31 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +39 -0
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/fields/required-field-label.d.ts +16 -0
- package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/required-field-label.js +89 -0
- package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -0
- package/dist/puck-editor/internal/fields/required.d.ts +19 -0
- package/dist/puck-editor/internal/fields/required.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/required.js +20 -0
- package/dist/puck-editor/internal/fields/required.js.map +1 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +37 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +1 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +26 -0
- package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -0
- package/dist/puck-editor/internal/i18n.d.ts +188 -0
- package/dist/puck-editor/internal/i18n.d.ts.map +1 -0
- package/dist/puck-editor/internal/i18n.js +414 -0
- package/dist/puck-editor/internal/i18n.js.map +1 -0
- package/dist/puck-editor/internal/locale.d.ts +13 -0
- package/dist/puck-editor/internal/locale.d.ts.map +1 -0
- package/dist/puck-editor/internal/locale.js +20 -0
- package/dist/puck-editor/internal/locale.js.map +1 -0
- package/dist/puck-editor/internal/localize.d.ts +11 -0
- package/dist/puck-editor/internal/localize.d.ts.map +1 -0
- package/dist/puck-editor/internal/localize.js +42 -0
- package/dist/puck-editor/internal/localize.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +21 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +197 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +131 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +20 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js +46 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +46 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +176 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +20 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.js +39 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/catalog.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +5 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.js +3 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/constants.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +17 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.js +35 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/create-page.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +19 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.js +79 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.js +243 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/help.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +19 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +31 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +23 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +72 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +20 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.js +34 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.js.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +17 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +70 -0
- package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +37 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +7 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +18 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +861 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +5 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +16 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +53 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.js +145 -0
- package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.js.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js +2 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +69 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +7 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +18 -0
- package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +6 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +178 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +3 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +55 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +12 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +125 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +8 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +582 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +6 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js +6 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +4 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +54 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +11 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +92 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +7 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +30 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +2 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +471 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +5 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +16 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +43 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +115 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +9 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +152 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +16 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +1 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +134 -0
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -0
- package/dist/puck-editor/internal/puck-augmentation.d.ts +28 -0
- package/dist/puck-editor/internal/puck-augmentation.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-augmentation.js +7 -0
- package/dist/puck-editor/internal/puck-augmentation.js.map +1 -0
- package/dist/puck-editor/internal/puck-editor-provider.d.ts +12 -0
- package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-editor-provider.js +69 -0
- package/dist/puck-editor/internal/puck-editor-provider.js.map +1 -0
- package/dist/puck-editor/internal/puck-node.d.ts +29 -0
- package/dist/puck-editor/internal/puck-node.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-node.js +2 -0
- package/dist/puck-editor/internal/puck-node.js.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts +19 -0
- package/dist/puck-editor/internal/puck-wrapper.d.ts.map +1 -0
- package/dist/puck-editor/internal/puck-wrapper.js +270 -0
- package/dist/puck-editor/internal/puck-wrapper.js.map +1 -0
- package/dist/puck-editor/internal/render/cropped-image.d.ts +19 -0
- package/dist/puck-editor/internal/render/cropped-image.d.ts.map +1 -0
- package/dist/puck-editor/internal/render/cropped-image.js +126 -0
- package/dist/puck-editor/internal/render/cropped-image.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts +13 -0
- package/dist/puck-editor/internal/smart-actions/index.d.ts.map +1 -0
- package/dist/puck-editor/internal/smart-actions/index.js +29 -0
- package/dist/puck-editor/internal/smart-actions/index.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts +13 -0
- package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +1 -0
- package/dist/puck-editor/internal/smart-actions/new-page.js +80 -0
- package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +2 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +1 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +65 -0
- package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -0
- package/dist/puck-editor/internal/ui/calendar.d.ts +9 -0
- package/dist/puck-editor/internal/ui/calendar.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/calendar.js +147 -0
- package/dist/puck-editor/internal/ui/calendar.js.map +1 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +13 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.js +93 -0
- package/dist/puck-editor/internal/ui/component-list-accordion.js.map +1 -0
- package/dist/puck-editor/internal/ui/dialog.d.ts +20 -0
- package/dist/puck-editor/internal/ui/dialog.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/dialog.js +286 -0
- package/dist/puck-editor/internal/ui/dialog.js.map +1 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +11 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.js +109 -0
- package/dist/puck-editor/internal/ui/drawer-item-content.js.map +1 -0
- package/dist/puck-editor/internal/ui/icon-button.d.ts +10 -0
- package/dist/puck-editor/internal/ui/icon-button.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/icon-button.js +72 -0
- package/dist/puck-editor/internal/ui/icon-button.js.map +1 -0
- package/dist/puck-editor/internal/ui/popover.d.ts +9 -0
- package/dist/puck-editor/internal/ui/popover.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/popover.js +165 -0
- package/dist/puck-editor/internal/ui/popover.js.map +1 -0
- package/dist/puck-editor/internal/ui/required-mark.d.ts +2 -0
- package/dist/puck-editor/internal/ui/required-mark.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/required-mark.js +12 -0
- package/dist/puck-editor/internal/ui/required-mark.js.map +1 -0
- package/dist/puck-editor/internal/ui/search-control.d.ts +20 -0
- package/dist/puck-editor/internal/ui/search-control.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/search-control.js +156 -0
- package/dist/puck-editor/internal/ui/search-control.js.map +1 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +2 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +1 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.js +40 -0
- package/dist/puck-editor/internal/ui/use-panel-search-focus.js.map +1 -0
- package/dist/puck-editor/internal/use-puck-overlay.d.ts +16 -0
- package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +1 -0
- package/dist/puck-editor/internal/use-puck-overlay.js +121 -0
- package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -0
- package/dist/puck-editor/internal/utils.d.ts +6 -0
- package/dist/puck-editor/internal/utils.d.ts.map +1 -0
- package/dist/puck-editor/internal/utils.js +57 -0
- package/dist/puck-editor/internal/utils.js.map +1 -0
- package/dist/puck-editor/puck-theme.css +110 -0
- package/dist/puck-editor/render.d.ts +3 -0
- package/dist/puck-editor/render.d.ts.map +1 -0
- package/dist/puck-editor/render.js +2 -0
- package/dist/puck-editor/render.js.map +1 -0
- package/dist/puck-editor/server.d.ts +4 -0
- package/dist/puck-editor/server.d.ts.map +1 -0
- package/dist/puck-editor/server.js +4 -0
- package/dist/puck-editor/server.js.map +1 -0
- package/dist/puck-editor/smart-actions.d.ts +2 -0
- package/dist/puck-editor/smart-actions.d.ts.map +1 -0
- package/dist/puck-editor/smart-actions.js +2 -0
- package/dist/puck-editor/smart-actions.js.map +1 -0
- package/dist/shared/cn.d.ts +3 -0
- package/dist/shared/cn.d.ts.map +1 -0
- package/dist/shared/cn.js +9 -0
- package/dist/shared/cn.js.map +1 -0
- package/dist/shared/i18n.d.ts +5 -0
- package/dist/shared/i18n.d.ts.map +1 -0
- package/dist/shared/i18n.js +18 -0
- package/dist/shared/i18n.js.map +1 -0
- package/dist/shared/toolbar-action.d.ts +9 -0
- package/dist/shared/toolbar-action.d.ts.map +1 -0
- package/dist/shared/toolbar-action.js +2 -0
- package/dist/shared/toolbar-action.js.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts +19 -0
- package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +1 -0
- package/dist/smart-actions/internal/get-smart-actions-context.js +24 -0
- package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -0
- package/dist/smart-actions/internal/i18n.d.ts +20 -0
- package/dist/smart-actions/internal/i18n.d.ts.map +1 -0
- package/dist/smart-actions/internal/i18n.js +35 -0
- package/dist/smart-actions/internal/i18n.js.map +1 -0
- package/dist/smart-actions/internal/logout-form.d.ts +8 -0
- package/dist/smart-actions/internal/logout-form.d.ts.map +1 -0
- package/dist/smart-actions/internal/logout-form.js +88 -0
- package/dist/smart-actions/internal/logout-form.js.map +1 -0
- package/dist/smart-actions/internal/refresh-page.d.ts +2 -0
- package/dist/smart-actions/internal/refresh-page.d.ts.map +1 -0
- package/dist/smart-actions/internal/refresh-page.js +126 -0
- package/dist/smart-actions/internal/refresh-page.js.map +1 -0
- package/dist/smart-actions/internal/smart-actions-button.d.ts +24 -0
- package/dist/smart-actions/internal/smart-actions-button.d.ts.map +1 -0
- package/dist/smart-actions/internal/smart-actions-button.js +41 -0
- package/dist/smart-actions/internal/smart-actions-button.js.map +1 -0
- package/dist/smart-actions/internal/smart-actions-config.d.ts +13 -0
- package/dist/smart-actions/internal/smart-actions-config.d.ts.map +1 -0
- package/dist/smart-actions/internal/smart-actions-config.js +101 -0
- package/dist/smart-actions/internal/smart-actions-config.js.map +1 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +15 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +1 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js +71 -0
- package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +13 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +323 -0
- package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/storage.d.ts +7 -0
- package/dist/smart-actions/internal/toolbar/storage.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/storage.js +29 -0
- package/dist/smart-actions/internal/toolbar/storage.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/types.d.ts +4 -0
- package/dist/smart-actions/internal/toolbar/types.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/types.js +2 -0
- package/dist/smart-actions/internal/toolbar/types.js.map +1 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +6 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +1 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +43 -0
- package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -0
- package/dist/smart-actions/internal/ui/tooltip.d.ts +8 -0
- package/dist/smart-actions/internal/ui/tooltip.d.ts.map +1 -0
- package/dist/smart-actions/internal/ui/tooltip.js +156 -0
- package/dist/smart-actions/internal/ui/tooltip.js.map +1 -0
- package/dist/smart-actions/internal/user-profile.d.ts +8 -0
- package/dist/smart-actions/internal/user-profile.d.ts.map +1 -0
- package/dist/smart-actions/internal/user-profile.js +30 -0
- package/dist/smart-actions/internal/user-profile.js.map +1 -0
- package/dist/smart-actions/server.d.ts +4 -0
- package/dist/smart-actions/server.d.ts.map +1 -0
- package/dist/smart-actions/server.js +4 -0
- package/dist/smart-actions/server.js.map +1 -0
- package/dist/theme.css +2 -0
- package/dist/visual-editor/index.d.ts +4 -0
- package/dist/visual-editor/index.d.ts.map +1 -0
- package/dist/visual-editor/index.js +4 -0
- package/dist/visual-editor/index.js.map +1 -0
- package/dist/visual-editor/internal/bridge/connector.d.ts +7 -0
- package/dist/visual-editor/internal/bridge/connector.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/connector.js +72 -0
- package/dist/visual-editor/internal/bridge/connector.js.map +1 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +8 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.js +44 -0
- package/dist/visual-editor/internal/bridge/draft-mode-self-heal.js.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +16 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +43 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +15 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +1 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js +146 -0
- package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -0
- package/dist/visual-editor/internal/i18n.d.ts +29 -0
- package/dist/visual-editor/internal/i18n.d.ts.map +1 -0
- package/dist/visual-editor/internal/i18n.js +51 -0
- package/dist/visual-editor/internal/i18n.js.map +1 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +7 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.js +15 -0
- package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-button.d.ts +10 -0
- package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-button.js +138 -0
- package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts +3 -0
- package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/edit-icon.js +19 -0
- package/dist/visual-editor/internal/overlays/edit-icon.js.map +1 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +15 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +52 -0
- package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +6 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js +42 -0
- package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +9 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +33 -0
- package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +13 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.js +17 -0
- package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +8 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js +25 -0
- package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +18 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +1 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +58 -0
- package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -0
- package/dist/visual-editor/internal/revalidate-route.d.ts +19 -0
- package/dist/visual-editor/internal/revalidate-route.d.ts.map +1 -0
- package/dist/visual-editor/internal/revalidate-route.js +51 -0
- package/dist/visual-editor/internal/revalidate-route.js.map +1 -0
- package/dist/visual-editor/server.d.ts +7 -0
- package/dist/visual-editor/server.d.ts.map +1 -0
- package/dist/visual-editor/server.js +8 -0
- package/dist/visual-editor/server.js.map +1 -0
- package/package.json +154 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["c","_c","createContext","useContext","resolveDictionary","jsx","_jsx","en","common","clearSearch","back","defaultGroup","mediaSelector","selectMedia","addImage","addRemoteVideo","searchPlaceholder","search","mediaType","remoteVideo","noMediaFound","loadingMedia","page","uploadImage","uploadRemoteVideo","uploadVideo","uploading","name","chooseImage","maxFileSize","altText","videoUrl","cancel","imageTooLarge","uploadImageFailed","addRemoteVideoFailed","selectedCount","addSelected","refreshMedia","remove","templates","saveAsTemplate","saveDialogDescription","saveAsComponentTemplate","saveComponentDialogDescription","noTemplatesFound","editTemplate","editDialogDescription","deleteTemplate","deleteDialogDescription","aiOptions","aiDescription","aiInstructions","savedAsLabel","scopePage","scopeSection","save","saving","delete","deleting","saved","updated","deleted","saveFailed","unavailable","wrongZone","broken","brokenHint","insertFailed","partiallyInserted","collapse","expand","customPageTemplates","sections","noSectionsFound","customSections","blocks","noBlocksFound","addBlock","noBlockTarget","outline","empty","noElements","expandAll","collapseAll","rename","duplicate","addSection","noResults","canvas","emptyDescription","startWithTemplate","noPageTemplates","fields","media","date","selectDate","link","options","crop","title","editCrop","desktop","format","original","zoom","usesDesktop","defineOverride","removeOverride","removeCrop","apply","editor","savePageFailed","pageSaved","pageCreateFailed","requiredFieldsMissing","preview","edit","close","add","sectionsTab","blocksTab","templatesTab","outlineTab","agentTab","moveUp","moveDown","linkPicker","internal","external","anchor","all","externalPlaceholder","anchorPlaceholder","loading","loadFailed","linkTarget","editLink","addLink","updateLink","removeLink","otherAnchor","target","targetHelp","displayedText","linkMode","targetAuto","targetSelf","targetBlank","agent","connect","description","copied","copyPrompt","de","dictionaries","getPuckDictionary","locale","overrides","PuckI18nContext","PuckLocaleContext","PuckI18nProvider","t0","$","children","t1","t2","Provider","value","t3","usePuckDictionary","usePuckLocale"],"sources":["../../../src/puck-editor/internal/i18n.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport { resolveDictionary, type DictionaryOverrides } from '../../shared/i18n';\n\nconst en = {\n common: {\n clearSearch: 'Clear search',\n back: 'Back',\n defaultGroup: 'General',\n },\n mediaSelector: {\n selectMedia: 'Select Media',\n addImage: 'Add Image',\n addRemoteVideo: 'Add Remote Video',\n searchPlaceholder: 'Search media',\n search: 'Search',\n clearSearch: 'Clear search',\n mediaType: 'Media Type',\n remoteVideo: 'Remote Video',\n noMediaFound: 'No media found',\n loadingMedia: 'Loading media',\n page: 'Page',\n uploadImage: 'Upload Image',\n uploadRemoteVideo: 'Upload Remote Video',\n uploadVideo: 'Upload Video',\n uploading: 'Uploading...',\n name: 'Name',\n chooseImage: 'Choose Image',\n maxFileSize: 'max. 5MB',\n altText: 'Alt Text',\n videoUrl: 'Video URL (YouTube or Vimeo)',\n cancel: 'Cancel',\n imageTooLarge: 'Image is too large. Maximum file size is 5MB.',\n uploadImageFailed: 'Failed to upload image',\n addRemoteVideoFailed: 'Failed to add remote video',\n selectedCount: '{count} selected',\n addSelected: 'Add selection',\n refreshMedia: 'Refresh media',\n remove: 'Remove',\n },\n templates: {\n saveAsTemplate: 'Save as Page template',\n saveDialogDescription: 'Save the current page as a reusable Page template',\n saveAsComponentTemplate: 'Save as template',\n saveComponentDialogDescription:\n 'Save the selected component as a reusable template',\n searchPlaceholder: 'Search templates...',\n noTemplatesFound: 'No templates found',\n editTemplate: 'Edit template',\n editDialogDescription: 'Change the name and AI options of this template.',\n deleteTemplate: 'Delete template',\n deleteDialogDescription:\n 'Delete \"{title}\"? This cannot be undone. Pages that already use this template stay unchanged.',\n name: 'Name',\n aiOptions: 'AI options',\n aiDescription: 'AI description (optional)',\n aiInstructions: 'AI instructions (optional)',\n savedAsLabel: 'Will be saved as:',\n scopePage: 'Page template',\n scopeSection: 'Section template',\n cancel: 'Cancel',\n save: 'Save',\n saving: 'Saving...',\n delete: 'Delete',\n deleting: 'Deleting...',\n saved: 'Template saved',\n updated: 'Template updated',\n deleted: 'Template deleted',\n saveFailed: 'Failed to save template',\n unavailable: 'Template no longer available',\n wrongZone: 'This template does not belong in this area',\n broken: 'Broken templates',\n brokenHint: 'These templates could not be loaded and can only be deleted.',\n insertFailed: 'Could not insert template',\n partiallyInserted: '{skipped} of {total} elements could not be inserted',\n collapse: 'Collapse',\n expand: 'Expand',\n customPageTemplates: 'Custom page templates',\n },\n sections: {\n searchPlaceholder: 'Search sections...',\n noSectionsFound: 'No sections found',\n customSections: 'Custom sections',\n },\n blocks: {\n searchPlaceholder: 'Search blocks...',\n noBlocksFound: 'No blocks found',\n addBlock: 'Add block',\n noBlockTarget: 'Add a section first',\n },\n outline: {\n empty: 'Empty',\n noElements: 'No elements',\n expand: 'Expand',\n collapse: 'Collapse',\n expandAll: 'Expand all',\n collapseAll: 'Collapse all',\n rename: 'Rename',\n duplicate: 'Duplicate',\n delete: 'Delete',\n addSection: 'Add section',\n searchPlaceholder: 'Search elements …',\n noResults: 'No results',\n },\n canvas: {\n emptyDescription: 'Start from a page template or add a section.',\n startWithTemplate: 'Start with a template',\n noPageTemplates: 'No page templates available',\n },\n fields: {\n media: 'Media',\n date: 'Date',\n selectDate: 'Select date',\n link: 'Link',\n options: 'Options',\n },\n crop: {\n title: 'Image crop',\n editCrop: 'Edit crop',\n desktop: 'Desktop',\n format: 'Format',\n original: 'Original',\n zoom: 'Zoom',\n usesDesktop: 'This breakpoint uses the desktop crop.',\n defineOverride: 'Set custom crop',\n removeOverride: 'Remove override',\n removeCrop: 'Remove crop',\n cancel: 'Cancel',\n apply: 'Apply',\n },\n editor: {\n savePageFailed: 'Failed to save page',\n pageSaved: 'Successfully saved page',\n pageCreateFailed: 'Failed to create page',\n requiredFieldsMissing: 'Cannot publish: required fields are empty',\n save: 'Save',\n preview: 'Preview',\n edit: 'Edit',\n close: 'Close',\n add: 'Add',\n saveAsTemplate: 'Save as template',\n sectionsTab: 'Sections',\n blocksTab: 'Blocks',\n templatesTab: 'Pages',\n outlineTab: 'Structure',\n agentTab: 'Agent',\n moveUp: 'Move up',\n moveDown: 'Move down',\n },\n linkPicker: {\n internal: 'Internal',\n external: 'External',\n anchor: 'Anchor',\n all: 'All',\n searchPlaceholder: 'Search …',\n externalPlaceholder: 'https://… or mailto:…',\n anchorPlaceholder: '/page#anchor or https://…#anchor',\n loading: 'Loading …',\n loadFailed: 'Could not load links.',\n noResults: 'No results.',\n linkTarget: 'Link target',\n editLink: 'Edit link',\n addLink: 'Add link',\n updateLink: 'Update link',\n removeLink: 'Remove link',\n otherAnchor: 'Other …',\n target: 'Target',\n targetHelp:\n '«Automatic»: internal links open in the same window, external links in a new tab.',\n displayedText: 'Displayed text',\n linkMode: 'Link mode',\n targetAuto: 'Automatic',\n targetSelf: 'Same tab',\n targetBlank: 'New tab',\n },\n agent: {\n connect: 'Connect an agent',\n description:\n 'An agent with a browser tool can edit this page live through the window.puckAgent handle. Copy the prompt below and paste it to your agent to get started.',\n copied: 'Copied',\n copyPrompt: 'Copy prompt',\n },\n};\n\nconst de: PuckDictionary = {\n common: {\n clearSearch: 'Suche zurücksetzen',\n back: 'Zurück',\n defaultGroup: 'Allgemein',\n },\n mediaSelector: {\n selectMedia: 'Medien auswählen',\n addImage: 'Bild hinzufügen',\n addRemoteVideo: 'Remote-Video hinzufügen',\n searchPlaceholder: 'Medien suchen',\n search: 'Suchen',\n clearSearch: 'Suche zurücksetzen',\n mediaType: 'Medientyp',\n remoteVideo: 'Remote-Video',\n noMediaFound: 'Keine Medien gefunden',\n loadingMedia: 'Lädt Medien',\n page: 'Seite',\n uploadImage: 'Bild hochladen',\n uploadRemoteVideo: 'Remote-Video hochladen',\n uploadVideo: 'Video hochladen',\n uploading: 'Wird hochgeladen …',\n name: 'Name',\n chooseImage: 'Bild auswählen',\n maxFileSize: 'max. 5MB',\n altText: 'Alt-Text',\n videoUrl: 'Video-URL (YouTube oder Vimeo)',\n cancel: 'Abbrechen',\n imageTooLarge: 'Bild ist zu gross. Maximale Dateigrösse ist 5MB.',\n uploadImageFailed: 'Bild konnte nicht hochgeladen werden',\n addRemoteVideoFailed: 'Remote-Video konnte nicht hinzugefügt werden',\n selectedCount: '{count} ausgewählt',\n addSelected: 'Auswahl übernehmen',\n refreshMedia: 'Medien aktualisieren',\n remove: 'Entfernen',\n },\n templates: {\n saveAsTemplate: 'Seiten-Template speichern',\n saveDialogDescription:\n 'Speichert die aktuelle Seite als wiederverwendbares Seiten-Template',\n saveAsComponentTemplate: 'Als Vorlage speichern',\n saveComponentDialogDescription:\n 'Speichert die ausgewählte Komponente als wiederverwendbare Vorlage',\n searchPlaceholder: 'Seiten-Templates suchen …',\n noTemplatesFound: 'Keine Templates gefunden',\n editTemplate: 'Template bearbeiten',\n editDialogDescription: 'Passe Name und AI-Optionen dieser Vorlage an.',\n deleteTemplate: 'Template löschen',\n deleteDialogDescription:\n '\"{title}\" löschen? Das kann nicht rückgängig gemacht werden. Seiten, die dieses Template bereits verwenden, bleiben unverändert.',\n name: 'Name',\n aiOptions: 'AI-Optionen',\n aiDescription: 'AI-Beschreibung (optional)',\n aiInstructions: 'AI-Anweisungen (optional)',\n savedAsLabel: 'Wird gespeichert als:',\n scopePage: 'Seitenvorlage',\n scopeSection: 'Abschnitt-Vorlage',\n cancel: 'Abbrechen',\n save: 'Speichern',\n saving: 'Speichert …',\n delete: 'Löschen',\n deleting: 'Löscht …',\n saved: 'Template gespeichert',\n updated: 'Template aktualisiert',\n deleted: 'Template gelöscht',\n saveFailed: 'Template konnte nicht gespeichert werden',\n unavailable: 'Template nicht mehr verfügbar',\n wrongZone: 'Diese Vorlage gehört nicht in diesen Bereich',\n broken: 'Defekte Vorlagen',\n brokenHint:\n 'Diese Vorlagen konnten nicht geladen werden und können nur gelöscht werden.',\n insertFailed: 'Template konnte nicht eingefügt werden',\n partiallyInserted:\n '{skipped} von {total} Elementen konnten nicht eingefügt werden',\n collapse: 'Einklappen',\n expand: 'Ausklappen',\n customPageTemplates: 'Eigene Seitenvorlagen',\n },\n sections: {\n searchPlaceholder: 'Abschnitte suchen …',\n noSectionsFound: 'Keine Abschnitte gefunden',\n customSections: 'Eigene Abschnitte',\n },\n blocks: {\n searchPlaceholder: 'Blöcke suchen …',\n noBlocksFound: 'Keine Blöcke gefunden',\n addBlock: 'Block hinzufügen',\n noBlockTarget: 'Zuerst einen Abschnitt hinzufügen',\n },\n outline: {\n empty: 'Leer',\n noElements: 'Keine Elemente',\n expand: 'Ausklappen',\n collapse: 'Einklappen',\n expandAll: 'Alle ausklappen',\n collapseAll: 'Alle einklappen',\n rename: 'Umbenennen',\n duplicate: 'Duplizieren',\n delete: 'Löschen',\n addSection: 'Abschnitt hinzufügen',\n searchPlaceholder: 'Elemente suchen …',\n noResults: 'Keine Treffer',\n },\n canvas: {\n emptyDescription:\n 'Starte mit einer Seitenvorlage oder füge einen Abschnitt hinzu.',\n startWithTemplate: 'Mit Vorlage starten',\n noPageTemplates: 'Keine Seitenvorlagen verfügbar',\n },\n fields: {\n media: 'Medien',\n date: 'Datum',\n selectDate: 'Datum auswählen',\n link: 'Link',\n options: 'Optionen',\n },\n crop: {\n title: 'Bildausschnitt',\n editCrop: 'Bildausschnitt bearbeiten',\n desktop: 'Desktop',\n format: 'Format',\n original: 'Original',\n zoom: 'Zoom',\n usesDesktop: 'Dieser Breakpoint verwendet den Desktop-Ausschnitt.',\n defineOverride: 'Eigenen Ausschnitt festlegen',\n removeOverride: 'Override entfernen',\n removeCrop: 'Ausschnitt entfernen',\n cancel: 'Abbrechen',\n apply: 'Übernehmen',\n },\n editor: {\n savePageFailed: 'Seite konnte nicht gespeichert werden',\n pageSaved: 'Seite gespeichert',\n pageCreateFailed: 'Seite konnte nicht erstellt werden',\n requiredFieldsMissing:\n 'Publizieren nicht möglich: Pflichtfelder sind nicht ausgefüllt',\n save: 'Speichern',\n preview: 'Vorschau',\n edit: 'Bearbeiten',\n close: 'Schliessen',\n add: 'Hinzufügen',\n saveAsTemplate: 'Als Template speichern',\n sectionsTab: 'Abschnitte',\n blocksTab: 'Blöcke',\n templatesTab: 'Seiten',\n outlineTab: 'Struktur',\n agentTab: 'Agent',\n moveUp: 'Nach oben',\n moveDown: 'Nach unten',\n },\n linkPicker: {\n internal: 'Intern',\n external: 'Extern',\n anchor: 'Anker',\n all: 'Alle',\n searchPlaceholder: 'Suchen …',\n externalPlaceholder: 'https://… oder mailto:…',\n anchorPlaceholder: '/seite#anker oder https://…#anker',\n loading: 'Lädt …',\n loadFailed: 'Links konnten nicht geladen werden.',\n noResults: 'Keine Treffer.',\n linkTarget: 'Link-Ziel',\n editLink: 'Link bearbeiten',\n addLink: 'Link hinzufügen',\n updateLink: 'Link aktualisieren',\n removeLink: 'Link entfernen',\n otherAnchor: 'Andere …',\n target: 'Ziel',\n targetHelp:\n '«Automatisch»: interne Links öffnen im gleichen Fenster, externe Links in einem neuen Tab.',\n displayedText: 'Angezeigter Text',\n linkMode: 'Link-Modus',\n targetAuto: 'Automatisch',\n targetSelf: 'Gleicher Tab',\n targetBlank: 'Neuer Tab',\n },\n agent: {\n connect: 'Agent verbinden',\n description:\n 'Ein Agent mit Browser-Tool kann diese Seite live über den window.puckAgent-Handle bearbeiten. Kopiere den Prompt unten und übergib ihn deinem Agenten, um zu starten.',\n copied: 'Kopiert',\n copyPrompt: 'Prompt kopieren',\n },\n};\n\nexport type PuckDictionary = typeof en;\n\nexport type PuckDictionaryOverrides = DictionaryOverrides<PuckDictionary>;\n\nconst dictionaries: Record<string, PuckDictionary> = { en, de };\n\nexport function getPuckDictionary(\n locale: string,\n overrides?: PuckDictionaryOverrides\n): PuckDictionary {\n return resolveDictionary(dictionaries, en, locale, overrides);\n}\n\nconst PuckI18nContext = createContext<PuckDictionary>(en);\nconst PuckLocaleContext = createContext<string>('en');\n\nexport function PuckI18nProvider({\n locale,\n overrides,\n children,\n}: {\n locale: string;\n overrides?: PuckDictionaryOverrides;\n children: React.ReactNode;\n}) {\n return (\n <PuckLocaleContext.Provider value={locale}>\n <PuckI18nContext.Provider value={getPuckDictionary(locale, overrides)}>\n {children}\n </PuckI18nContext.Provider>\n </PuckLocaleContext.Provider>\n );\n}\n\nexport function usePuckDictionary(): PuckDictionary {\n return useContext(PuckI18nContext);\n}\n\nexport function usePuckLocale(): string {\n return useContext(PuckLocaleContext);\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAEjD,SAASC,iBAAiB,QAAkC,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhF,MAAMC,EAAE,GAAG;EACTC,MAAM,EAAE;IACNC,WAAW,EAAE,cAAc;IAC3BC,IAAI,EAAE,MAAM;IACZC,YAAY,EAAE;EAChB,CAAC;EACDC,aAAa,EAAE;IACbC,WAAW,EAAE,cAAc;IAC3BC,QAAQ,EAAE,WAAW;IACrBC,cAAc,EAAE,kBAAkB;IAClCC,iBAAiB,EAAE,cAAc;IACjCC,MAAM,EAAE,QAAQ;IAChBR,WAAW,EAAE,cAAc;IAC3BS,SAAS,EAAE,YAAY;IACvBC,WAAW,EAAE,cAAc;IAC3BC,YAAY,EAAE,gBAAgB;IAC9BC,YAAY,EAAE,eAAe;IAC7BC,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,cAAc;IAC3BC,iBAAiB,EAAE,qBAAqB;IACxCC,WAAW,EAAE,cAAc;IAC3BC,SAAS,EAAE,cAAc;IACzBC,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,cAAc;IAC3BC,WAAW,EAAE,UAAU;IACvBC,OAAO,EAAE,UAAU;IACnBC,QAAQ,EAAE,8BAA8B;IACxCC,MAAM,EAAE,QAAQ;IAChBC,aAAa,EAAE,+CAA+C;IAC9DC,iBAAiB,EAAE,wBAAwB;IAC3CC,oBAAoB,EAAE,4BAA4B;IAClDC,aAAa,EAAE,kBAAkB;IACjCC,WAAW,EAAE,eAAe;IAC5BC,YAAY,EAAE,eAAe;IAC7BC,MAAM,EAAE;EACV,CAAC;EACDC,S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A,gBAAAhK,IAAA,CAAAyJ,eAAA,CAAAQ,QAAA;MAAiCC,KAAoC,EAApCH,EAAoC;MAAAD,QAAA,EAClEA;IAAQ,CACe,CAAC;IAAAD,CAAA,MAAAC,QAAA;IAAAD,CAAA,MAAAE,EAAA;IAAAF,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,IAAAM,EAAA;EAAA,IAAAN,CAAA,QAAAN,MAAA,IAAAM,CAAA,QAAAG,EAAA;IAH7BG,EAAA,gBAAAnK,IAAA,CAAA0J,iBAAA,CAAAO,QAAA;MAAmCV,KAAM,EAANA,MAAM;MAAAO,QAAA,EACvCE;IAE2B,CACD,CAAC;IAAAH,CAAA,MAAAN,MAAA;IAAAM,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAM,EAAA;EAAA;IAAAA,EAAA,GAAAN,CAAA;EAAA;EAAA,OAJ7BM,EAI6B;AAAA;AAIjC,OAAO,SAAAC,kBAAA;EAAA,OACEvK,UAAU,CAAC4J,eAAe,CAAC;AAAA;AAGpC,OAAO,SAAAY,cAAA;EAAA,OACExK,UAAU,CAAC6J,iBAAiB,CAAC;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep a value only if it has locale shape, else drop it. Permissive by
|
|
3
|
+
* design: the module does not know the project's configured locales, so it
|
|
4
|
+
* rejects garbage (path/query smuggling into JSON:API URLs) rather than an
|
|
5
|
+
* exact allow-list.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeLang(value: string | undefined | null): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Locale from the first path segment. Editor surfaces only mount on localized
|
|
10
|
+
* routes, so the segment is a locale in practice; falls back to English.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getPathLocale(pathname: string): string;
|
|
13
|
+
//# sourceMappingURL=locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/puck-editor/internal/locale.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAC/B,MAAM,GAAG,SAAS,CAEpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const LOCALE_SEGMENT_RE = /^[a-z]{2,3}(-[a-zA-Z0-9]+)?$/;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Keep a value only if it has locale shape, else drop it. Permissive by
|
|
5
|
+
* design: the module does not know the project's configured locales, so it
|
|
6
|
+
* rejects garbage (path/query smuggling into JSON:API URLs) rather than an
|
|
7
|
+
* exact allow-list.
|
|
8
|
+
*/
|
|
9
|
+
export function normalizeLang(value) {
|
|
10
|
+
return value != null && LOCALE_SEGMENT_RE.test(value) ? value : undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Locale from the first path segment. Editor surfaces only mount on localized
|
|
15
|
+
* routes, so the segment is a locale in practice; falls back to English.
|
|
16
|
+
*/
|
|
17
|
+
export function getPathLocale(pathname) {
|
|
18
|
+
return normalizeLang(pathname.split('/')[1]) ?? 'en';
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.js","names":["LOCALE_SEGMENT_RE","normalizeLang","value","test","undefined","getPathLocale","pathname","split"],"sources":["../../../src/puck-editor/internal/locale.ts"],"sourcesContent":["const LOCALE_SEGMENT_RE = /^[a-z]{2,3}(-[a-zA-Z0-9]+)?$/;\n\n/**\n * Keep a value only if it has locale shape, else drop it. Permissive by\n * design: the module does not know the project's configured locales, so it\n * rejects garbage (path/query smuggling into JSON:API URLs) rather than an\n * exact allow-list.\n */\nexport function normalizeLang(\n value: string | undefined | null\n): string | undefined {\n return value != null && LOCALE_SEGMENT_RE.test(value) ? value : undefined;\n}\n\n/**\n * Locale from the first path segment. Editor surfaces only mount on localized\n * routes, so the segment is a locale in practice; falls back to English.\n */\nexport function getPathLocale(pathname: string): string {\n return normalizeLang(pathname.split('/')[1]) ?? 'en';\n}\n"],"mappings":"AAAA,MAAMA,iBAAiB,GAAG,8BAA8B;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAC3BC,KAAgC,EACZ;EACpB,OAAOA,KAAK,IAAI,IAAI,IAAIF,iBAAiB,CAACG,IAAI,CAACD,KAAK,CAAC,GAAGA,KAAK,GAAGE,SAAS;AAC3E;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACC,QAAgB,EAAU;EACtD,OAAOL,aAAa,CAACK,QAAQ,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;AACtD","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Config } from '@puckeditor/core';
|
|
2
|
+
import type { BuiltinTemplate } from './plugins/templates-plugin/templates';
|
|
3
|
+
export type PuckLabelCatalog = {
|
|
4
|
+
components?: Record<string, string>;
|
|
5
|
+
templates?: Record<string, string>;
|
|
6
|
+
groups?: Record<string, string>;
|
|
7
|
+
picker?: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
export declare function localizeConfig(config: Config, labels: PuckLabelCatalog): Config;
|
|
10
|
+
export declare function localizeTemplates(templates: BuiltinTemplate[], labels: PuckLabelCatalog): BuiltinTemplate[];
|
|
11
|
+
//# sourceMappingURL=localize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localize.d.ts","sourceRoot":"","sources":["../../../src/puck-editor/internal/localize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,gBAAgB,GACvB,MAAM,CAwBR;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAAE,EAC5B,MAAM,EAAE,gBAAgB,GACvB,eAAe,EAAE,CAKnB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export function localizeConfig(config, labels) {
|
|
2
|
+
const components = Object.fromEntries(Object.entries(config.components).map(([type, component]) => {
|
|
3
|
+
const label = labels.components?.[type] ?? component.label;
|
|
4
|
+
const pickerLabel = labels.picker?.[type];
|
|
5
|
+
const metadata = pickerLabel ? {
|
|
6
|
+
...component.metadata,
|
|
7
|
+
picker: {
|
|
8
|
+
...component.metadata?.picker,
|
|
9
|
+
label: pickerLabel
|
|
10
|
+
}
|
|
11
|
+
} : component.metadata;
|
|
12
|
+
return [type, {
|
|
13
|
+
...component,
|
|
14
|
+
label,
|
|
15
|
+
metadata
|
|
16
|
+
}];
|
|
17
|
+
}));
|
|
18
|
+
const categories = {
|
|
19
|
+
...config.categories
|
|
20
|
+
};
|
|
21
|
+
for (const [id, title] of Object.entries(labels.groups ?? {})) {
|
|
22
|
+
categories[id] = id in categories ? {
|
|
23
|
+
...categories[id],
|
|
24
|
+
title
|
|
25
|
+
} : {
|
|
26
|
+
visible: false,
|
|
27
|
+
title
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
...config,
|
|
32
|
+
components,
|
|
33
|
+
categories
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function localizeTemplates(templates, labels) {
|
|
37
|
+
return templates.map(template => ({
|
|
38
|
+
...template,
|
|
39
|
+
name: labels.templates?.[template.id] ?? template.name
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=localize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localize.js","names":["localizeConfig","config","labels","components","Object","fromEntries","entries","map","type","component","label","pickerLabel","picker","metadata","categories","id","title","groups","visible","localizeTemplates","templates","template","name"],"sources":["../../../src/puck-editor/internal/localize.ts"],"sourcesContent":["import type { Config } from '@puckeditor/core';\n\nimport type { BuiltinTemplate } from './plugins/templates-plugin/templates';\n\nexport type PuckLabelCatalog = {\n components?: Record<string, string>;\n templates?: Record<string, string>;\n groups?: Record<string, string>;\n picker?: Record<string, string>;\n};\n\nexport function localizeConfig(\n config: Config,\n labels: PuckLabelCatalog\n): Config {\n const components = Object.fromEntries(\n Object.entries(config.components).map(([type, component]) => {\n const label = labels.components?.[type] ?? component.label;\n const pickerLabel = labels.picker?.[type];\n const metadata = pickerLabel\n ? {\n ...component.metadata,\n picker: { ...component.metadata?.picker, label: pickerLabel },\n }\n : component.metadata;\n return [type, { ...component, label, metadata }];\n })\n );\n\n const categories = { ...config.categories };\n for (const [id, title] of Object.entries(labels.groups ?? {})) {\n categories[id] =\n id in categories\n ? { ...categories[id], title }\n : { visible: false, title };\n }\n\n return { ...config, components, categories };\n}\n\nexport function localizeTemplates(\n templates: BuiltinTemplate[],\n labels: PuckLabelCatalog\n): BuiltinTemplate[] {\n return templates.map((template) => ({\n ...template,\n name: labels.templates?.[template.id] ?? template.name,\n }));\n}\n"],"mappings":"AAWA,OAAO,SAASA,cAAcA,CAC5BC,MAAc,EACdC,MAAwB,EAChB;EACR,MAAMC,UAAU,GAAGC,MAA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CAACN,EAAE,CAAC,IAAIM,QAAQ,CAACC;EACpD,CAAC,CAAC,CAAC;AACL","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Config, Data } from '@puckeditor/core';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
puckAgent?: Record<string, unknown>;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Mounts the mechanical `window.puckAgent` handle for a local agent driving the
|
|
9
|
+
* editor via browser automation. Renders nothing. Only mounts inside the Puck
|
|
10
|
+
* editor (already behind requireAuth). Edits are ephemeral dispatches until
|
|
11
|
+
* save(), which persists through the same PATCH as the editor's Save button.
|
|
12
|
+
*
|
|
13
|
+
* Reads live appState/dispatch through a ref (updated every render) so the
|
|
14
|
+
* exposed methods never close over a stale first-render dispatch.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AgentBridge({ config, lang, onSave, }: {
|
|
17
|
+
config: Config;
|
|
18
|
+
lang?: string;
|
|
19
|
+
onSave?: (data: Partial<Data>) => Promise<void> | void;
|
|
20
|
+
}): null;
|
|
21
|
+
//# sourceMappingURL=agent-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-bridge.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-bridge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAiB,IAAI,EAAc,MAAM,kBAAkB,CAAC;AAwB3E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC;CACF;AAID;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,IAAI,EACJ,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACxD,QA6IA"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
5
|
+
import { createUsePuck } from '@puckeditor/core';
|
|
6
|
+
import { useBuiltinTemplates, usePuckContentModel, usePuckEditorConfig } from '../../editor-config';
|
|
7
|
+
import { applyPatchToPuck } from "./apply-patch-to-puck.js";
|
|
8
|
+
import { describeComponent, listComponents } from "./catalog.js";
|
|
9
|
+
import { PAGE_META_FIELDS } from "./constants.js";
|
|
10
|
+
import { listMedia } from "./list-media.js";
|
|
11
|
+
import { insertTemplate, listTemplates } from "./templates.js";
|
|
12
|
+
import { uploadMedia } from "./upload-media.js";
|
|
13
|
+
const PAGE_META = new Set(PAGE_META_FIELDS);
|
|
14
|
+
const usePuck = createUsePuck();
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Mounts the mechanical `window.puckAgent` handle for a local agent driving the
|
|
18
|
+
* editor via browser automation. Renders nothing. Only mounts inside the Puck
|
|
19
|
+
* editor (already behind requireAuth). Edits are ephemeral dispatches until
|
|
20
|
+
* save(), which persists through the same PATCH as the editor's Save button.
|
|
21
|
+
*
|
|
22
|
+
* Reads live appState/dispatch through a ref (updated every render) so the
|
|
23
|
+
* exposed methods never close over a stale first-render dispatch.
|
|
24
|
+
*/
|
|
25
|
+
export function AgentBridge(t0) {
|
|
26
|
+
const $ = _c(20);
|
|
27
|
+
const {
|
|
28
|
+
config,
|
|
29
|
+
lang,
|
|
30
|
+
onSave
|
|
31
|
+
} = t0;
|
|
32
|
+
const appState = usePuck(_temp);
|
|
33
|
+
const dispatch = usePuck(_temp2);
|
|
34
|
+
const templates = usePuckContentModel().templates;
|
|
35
|
+
const builtinTemplates = useBuiltinTemplates();
|
|
36
|
+
const {
|
|
37
|
+
drupalBaseUrl: t1
|
|
38
|
+
} = usePuckEditorConfig();
|
|
39
|
+
const drupalBaseUrl = t1 === undefined ? "" : t1;
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[0] !== appState || $[1] !== builtinTemplates || $[2] !== config || $[3] !== dispatch || $[4] !== drupalBaseUrl || $[5] !== lang || $[6] !== onSave || $[7] !== templates) {
|
|
42
|
+
t2 = {
|
|
43
|
+
appState,
|
|
44
|
+
dispatch,
|
|
45
|
+
config,
|
|
46
|
+
lang,
|
|
47
|
+
onSave,
|
|
48
|
+
templates,
|
|
49
|
+
builtinTemplates,
|
|
50
|
+
drupalBaseUrl
|
|
51
|
+
};
|
|
52
|
+
$[0] = appState;
|
|
53
|
+
$[1] = builtinTemplates;
|
|
54
|
+
$[2] = config;
|
|
55
|
+
$[3] = dispatch;
|
|
56
|
+
$[4] = drupalBaseUrl;
|
|
57
|
+
$[5] = lang;
|
|
58
|
+
$[6] = onSave;
|
|
59
|
+
$[7] = templates;
|
|
60
|
+
$[8] = t2;
|
|
61
|
+
} else {
|
|
62
|
+
t2 = $[8];
|
|
63
|
+
}
|
|
64
|
+
const live = useRef(t2);
|
|
65
|
+
let t3;
|
|
66
|
+
if ($[9] !== appState || $[10] !== builtinTemplates || $[11] !== config || $[12] !== dispatch || $[13] !== drupalBaseUrl || $[14] !== lang || $[15] !== onSave || $[16] !== templates) {
|
|
67
|
+
t3 = () => {
|
|
68
|
+
live.current = {
|
|
69
|
+
appState,
|
|
70
|
+
dispatch,
|
|
71
|
+
config,
|
|
72
|
+
lang,
|
|
73
|
+
onSave,
|
|
74
|
+
templates,
|
|
75
|
+
builtinTemplates,
|
|
76
|
+
drupalBaseUrl
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
$[9] = appState;
|
|
80
|
+
$[10] = builtinTemplates;
|
|
81
|
+
$[11] = config;
|
|
82
|
+
$[12] = dispatch;
|
|
83
|
+
$[13] = drupalBaseUrl;
|
|
84
|
+
$[14] = lang;
|
|
85
|
+
$[15] = onSave;
|
|
86
|
+
$[16] = templates;
|
|
87
|
+
$[17] = t3;
|
|
88
|
+
} else {
|
|
89
|
+
t3 = $[17];
|
|
90
|
+
}
|
|
91
|
+
useEffect(t3);
|
|
92
|
+
let t4;
|
|
93
|
+
let t5;
|
|
94
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
95
|
+
t4 = () => {
|
|
96
|
+
if (typeof window === "undefined") {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const get = () => live.current;
|
|
100
|
+
const data = () => get().appState?.data;
|
|
101
|
+
const content = {
|
|
102
|
+
listComponents: () => listComponents(get().config),
|
|
103
|
+
describeComponent: type => describeComponent(get().config, type),
|
|
104
|
+
getPage: () => data(),
|
|
105
|
+
listMedia: (type_0, query, limit, offset) => listMedia(get().lang, get().drupalBaseUrl, type_0, query, limit, offset),
|
|
106
|
+
uploadMedia: options => uploadMedia({
|
|
107
|
+
lang: get().lang,
|
|
108
|
+
...options
|
|
109
|
+
}),
|
|
110
|
+
listTemplates: () => listTemplates(get().templates, get().builtinTemplates),
|
|
111
|
+
insertTemplate: (id, dest) => insertTemplate(get().dispatch, data(), get().config, get().templates, get().builtinTemplates, id, dest),
|
|
112
|
+
addComponent: (type_1, options_0) => applyPatchToPuck(get().dispatch, data(), get().config, {
|
|
113
|
+
action: "add",
|
|
114
|
+
type: type_1,
|
|
115
|
+
props: options_0?.props,
|
|
116
|
+
destinationId: options_0?.destinationId,
|
|
117
|
+
destinationSlot: options_0?.destinationSlot,
|
|
118
|
+
destinationIndex: options_0?.destinationIndex
|
|
119
|
+
}),
|
|
120
|
+
updateComponent: (id_0, newProps) => applyPatchToPuck(get().dispatch, data(), get().config, {
|
|
121
|
+
action: "modify",
|
|
122
|
+
id: id_0,
|
|
123
|
+
newProps
|
|
124
|
+
}),
|
|
125
|
+
removeComponent: id_1 => applyPatchToPuck(get().dispatch, data(), get().config, {
|
|
126
|
+
action: "remove",
|
|
127
|
+
id: id_1
|
|
128
|
+
}),
|
|
129
|
+
setPageMeta: fields => {
|
|
130
|
+
const clean = {};
|
|
131
|
+
const ignored = [];
|
|
132
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
133
|
+
if (PAGE_META.has(key)) {
|
|
134
|
+
clean[key] = value;
|
|
135
|
+
} else {
|
|
136
|
+
ignored.push(key);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (!Object.keys(clean).length) {
|
|
140
|
+
return {
|
|
141
|
+
ok: false,
|
|
142
|
+
error: `no known fields. Known: ${[...PAGE_META].join(", ")}`
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const result = applyPatchToPuck(get().dispatch, data(), get().config, {
|
|
146
|
+
action: "setRoot",
|
|
147
|
+
fields: clean
|
|
148
|
+
});
|
|
149
|
+
return ignored.length && result.ok ? {
|
|
150
|
+
...result,
|
|
151
|
+
ignored
|
|
152
|
+
} : result;
|
|
153
|
+
},
|
|
154
|
+
save: async () => {
|
|
155
|
+
const persist = get().onSave;
|
|
156
|
+
const current = data();
|
|
157
|
+
if (!persist || !current) {
|
|
158
|
+
return {
|
|
159
|
+
ok: false,
|
|
160
|
+
error: "nothing to save: editor not ready"
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
console.info("[puckAgent] save \u2192 publishing current page");
|
|
164
|
+
await persist(current);
|
|
165
|
+
return {
|
|
166
|
+
ok: true
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
window.puckAgent = Object.assign(window.puckAgent || {}, content);
|
|
171
|
+
return () => {
|
|
172
|
+
const handle = window.puckAgent;
|
|
173
|
+
if (!handle) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
for (const key_0 of Object.keys(content)) {
|
|
177
|
+
delete handle[key_0];
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
t5 = [];
|
|
182
|
+
$[18] = t4;
|
|
183
|
+
$[19] = t5;
|
|
184
|
+
} else {
|
|
185
|
+
t4 = $[18];
|
|
186
|
+
t5 = $[19];
|
|
187
|
+
}
|
|
188
|
+
useEffect(t4, t5);
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
function _temp2(s_0) {
|
|
192
|
+
return s_0.dispatch;
|
|
193
|
+
}
|
|
194
|
+
function _temp(s) {
|
|
195
|
+
return s.appState;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=agent-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-bridge.js","names":["c","_c","useEffect","useRef","createUsePuck","useBuiltinTemplates","usePuckContentModel","usePuckEditorConfig","applyPatchToPuck","describeComponent","listComponents","PAGE_META_FIELDS","listMedia","insertTemplate","listTemplates","uploadMedia","PAGE_META","Set","usePuck","AgentBridge","t0","$","config","lang","onSave","appState","_temp","dispatch","_temp2","templates","builtinTemplates","drupalBaseUrl","t1","undefined","t2","live","t3","current","t4","t5","Symbol","for","window","get","data","content","type","getPage","type_0","query","limit","offset","options","id","dest","addComponent","type_1","options_0","action","props","destinationId","destinationSlot","destinationIndex","updateComponent","id_0","newProps","removeComponent","id_1","setPageMeta","fields","clean","ignored","key","value","Object","entries","has","push","keys","length","ok","error","join","result","save","persist","console","info","puckAgent","assign","handle","key_0","s_0","s"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-bridge.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\nimport { Config, createUsePuck, Data, PuckAction } from '@puckeditor/core';\n\nimport {\n useBuiltinTemplates,\n usePuckContentModel,\n usePuckEditorConfig,\n} from '../../editor-config';\nimport { applyPatchToPuck } from './apply-patch-to-puck.ts';\nimport { describeComponent, listComponents } from './catalog.ts';\nimport { MediaType, PAGE_META_FIELDS } from './constants.ts';\nimport { listMedia } from './list-media.ts';\nimport {\n insertTemplate,\n listTemplates,\n TemplateDestination,\n} from './templates.ts';\nimport { uploadMedia } from './upload-media.ts';\n\ntype Dispatch = (action: PuckAction) => void;\n\ntype AddOptions = TemplateDestination & { props?: Record<string, unknown> };\n\nconst PAGE_META = new Set<string>(PAGE_META_FIELDS);\n\ndeclare global {\n interface Window {\n puckAgent?: Record<string, unknown>;\n }\n}\n\nconst usePuck = createUsePuck();\n\n/**\n * Mounts the mechanical `window.puckAgent` handle for a local agent driving the\n * editor via browser automation. Renders nothing. Only mounts inside the Puck\n * editor (already behind requireAuth). Edits are ephemeral dispatches until\n * save(), which persists through the same PATCH as the editor's Save button.\n *\n * Reads live appState/dispatch through a ref (updated every render) so the\n * exposed methods never close over a stale first-render dispatch.\n */\nexport function AgentBridge({\n config,\n lang,\n onSave,\n}: {\n config: Config;\n lang?: string;\n onSave?: (data: Partial<Data>) => Promise<void> | void;\n}) {\n const appState = usePuck((s) => s.appState);\n const dispatch = usePuck((s) => s.dispatch) as Dispatch;\n const templates = usePuckContentModel().templates;\n const builtinTemplates = useBuiltinTemplates();\n const { drupalBaseUrl = '' } = usePuckEditorConfig();\n\n const live = useRef({\n appState,\n dispatch,\n config,\n lang,\n onSave,\n templates,\n builtinTemplates,\n drupalBaseUrl,\n });\n useEffect(() => {\n live.current = {\n appState,\n dispatch,\n config,\n lang,\n onSave,\n templates,\n builtinTemplates,\n drupalBaseUrl,\n };\n });\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const get = () => live.current;\n const data = () => get().appState?.data as Data | undefined;\n\n // Content methods, attached to the shared handle (lifecycle methods\n // open/close/isOpen/isReady are owned by PuckWrapper and stay mounted).\n const content = {\n // Palette (aus der Config: was kann ich einsetzen)\n listComponents: () => listComponents(get().config),\n describeComponent: (type: string) =>\n describeComponent(get().config, type),\n // Dokument (was ist gerade auf der Seite)\n getPage: () => data(),\n // Assets\n listMedia: (\n type: string,\n query?: string,\n limit?: number,\n offset?: number\n ) =>\n listMedia(get().lang, get().drupalBaseUrl, type, query, limit, offset),\n uploadMedia: (options: {\n url: string;\n type?: MediaType;\n name?: string;\n alt?: string;\n }) => uploadMedia({ lang: get().lang, ...options }),\n // Templates\n listTemplates: () =>\n listTemplates(get().templates, get().builtinTemplates),\n insertTemplate: (id: string, dest?: TemplateDestination) =>\n insertTemplate(\n get().dispatch,\n data(),\n get().config,\n get().templates,\n get().builtinTemplates,\n id,\n dest\n ),\n // Writes (benannte Methoden, je ein Job)\n addComponent: (type: string, options?: AddOptions) =>\n applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'add',\n type,\n props: options?.props,\n destinationId: options?.destinationId,\n destinationSlot: options?.destinationSlot,\n destinationIndex: options?.destinationIndex,\n }),\n updateComponent: (id: string, newProps: Record<string, unknown>) =>\n applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'modify',\n id,\n newProps,\n }),\n removeComponent: (id: string) =>\n applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'remove',\n id,\n }),\n setPageMeta: (fields: Record<string, unknown>) => {\n const clean: Record<string, unknown> = {};\n const ignored: string[] = [];\n for (const [key, value] of Object.entries(fields)) {\n if (PAGE_META.has(key)) {\n clean[key] = value;\n } else {\n ignored.push(key);\n }\n }\n if (!Object.keys(clean).length) {\n return {\n ok: false as const,\n error: `no known fields. Known: ${[...PAGE_META].join(', ')}`,\n };\n }\n const result = applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'setRoot',\n fields: clean,\n });\n return ignored.length && result.ok ? { ...result, ignored } : result;\n },\n // Persist — same human-gated PATCH as the editor's Save button.\n save: async () => {\n const persist = get().onSave;\n const current = data();\n if (!persist || !current) {\n return {\n ok: false as const,\n error: 'nothing to save: editor not ready',\n };\n }\n console.info('[puckAgent] save → publishing current page');\n await persist(current);\n return { ok: true as const };\n },\n };\n\n window.puckAgent = Object.assign(window.puckAgent || {}, content);\n\n return () => {\n const handle = window.puckAgent;\n if (!handle) return;\n for (const key of Object.keys(content)) delete handle[key];\n };\n }, []);\n\n return null;\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,C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AA,GAAehD,MAAM,CAAA8C,SAAU;QAC/B,IAAI,CAACE,MAAM;UAAA;QAAA;QACX,KAAK,MAAAC,KAAS,IAAIjB,MAAM,CAAAI,IAAK,CAACjC,OAAO,CAAC;UAAE,OAAO6C,MAAM,CAAClB,KAAG,CAAC;QAAA;MAAC,CAC5D;IAAA,CACF;IAAEjC,EAAA,KAAE;IAAAlB,CAAA,OAAAiB,EAAA;IAAAjB,CAAA,OAAAkB,EAAA;EAAA;IAAAD,EAAA,GAAAjB,CAAA;IAAAkB,EAAA,GAAAlB,CAAA;EAAA;EA5GLnB,SAAS,CAACoC,EA4GT,EAAEC,EAAE,CAAC;EAAA,OAEC,IAAI;AAAA;AApJN,SAAAX,OAAAgE,GAAA;EAAA,OAU2BC,GAAC,CAAAlE,QAAS;AAAA;AAVrC,SAAAD,MAAAmE,CAAA;EAAA,OAS2BA,CAAC,CAAApE,QAAS;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-info-panel.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-info-panel.tsx"],"names":[],"mappings":"AAeA,wBAAgB,cAAc,gCA4C7B"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { CheckIcon, CopyIcon } from 'lucide-react';
|
|
6
|
+
import { usePuckDictionary } from '../../i18n';
|
|
7
|
+
import { IconButton } from '../../ui/icon-button';
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
function buildPrompt(pageUrl) {
|
|
10
|
+
return `Use a browser tool that can run JavaScript to open this page:
|
|
11
|
+
${pageUrl}
|
|
12
|
+
|
|
13
|
+
In the page, run: window.puckAgent.help() to list the options that are available to you.`;
|
|
14
|
+
}
|
|
15
|
+
export function AgentInfoPanel() {
|
|
16
|
+
const $ = _c(18);
|
|
17
|
+
const t = usePuckDictionary().agent;
|
|
18
|
+
const pageUrl = typeof window !== "undefined" ? window.location.origin + window.location.pathname : "the current page";
|
|
19
|
+
let t0;
|
|
20
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
21
|
+
t0 = buildPrompt(pageUrl);
|
|
22
|
+
$[0] = t0;
|
|
23
|
+
} else {
|
|
24
|
+
t0 = $[0];
|
|
25
|
+
}
|
|
26
|
+
const prompt = t0;
|
|
27
|
+
const [copied, setCopied] = useState(false);
|
|
28
|
+
let t1;
|
|
29
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
|
+
t1 = async () => {
|
|
31
|
+
try {
|
|
32
|
+
await navigator.clipboard.writeText(prompt);
|
|
33
|
+
setCopied(true);
|
|
34
|
+
setTimeout(() => setCopied(false), 2000);
|
|
35
|
+
} catch {}
|
|
36
|
+
};
|
|
37
|
+
$[1] = t1;
|
|
38
|
+
} else {
|
|
39
|
+
t1 = $[1];
|
|
40
|
+
}
|
|
41
|
+
const copyPrompt = t1;
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[2] !== t.connect) {
|
|
44
|
+
t2 = /*#__PURE__*/_jsx("p", {
|
|
45
|
+
className: "nh:font-medium",
|
|
46
|
+
children: t.connect
|
|
47
|
+
});
|
|
48
|
+
$[2] = t.connect;
|
|
49
|
+
$[3] = t2;
|
|
50
|
+
} else {
|
|
51
|
+
t2 = $[3];
|
|
52
|
+
}
|
|
53
|
+
let t3;
|
|
54
|
+
if ($[4] !== t.description) {
|
|
55
|
+
t3 = /*#__PURE__*/_jsx("p", {
|
|
56
|
+
className: "nh:text-gray-500",
|
|
57
|
+
children: t.description
|
|
58
|
+
});
|
|
59
|
+
$[4] = t.description;
|
|
60
|
+
$[5] = t3;
|
|
61
|
+
} else {
|
|
62
|
+
t3 = $[5];
|
|
63
|
+
}
|
|
64
|
+
let t4;
|
|
65
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
66
|
+
t4 = /*#__PURE__*/_jsxs("div", {
|
|
67
|
+
children: [t2, t3]
|
|
68
|
+
});
|
|
69
|
+
$[6] = t2;
|
|
70
|
+
$[7] = t3;
|
|
71
|
+
$[8] = t4;
|
|
72
|
+
} else {
|
|
73
|
+
t4 = $[8];
|
|
74
|
+
}
|
|
75
|
+
let t5;
|
|
76
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
77
|
+
t5 = /*#__PURE__*/_jsx("pre", {
|
|
78
|
+
className: "nh:max-h-80 nh:overflow-auto nh:rounded-md nh:bg-slate-900 nh:p-3 nh:pr-12 nh:text-xs nh:whitespace-pre-wrap nh:text-slate-50",
|
|
79
|
+
children: /*#__PURE__*/_jsx("code", {
|
|
80
|
+
children: prompt
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
$[9] = t5;
|
|
84
|
+
} else {
|
|
85
|
+
t5 = $[9];
|
|
86
|
+
}
|
|
87
|
+
const t6 = copied ? t.copied : t.copyPrompt;
|
|
88
|
+
let t7;
|
|
89
|
+
if ($[10] !== copied) {
|
|
90
|
+
t7 = copied ? /*#__PURE__*/_jsx(CheckIcon, {
|
|
91
|
+
className: "nh:size-4"
|
|
92
|
+
}) : /*#__PURE__*/_jsx(CopyIcon, {
|
|
93
|
+
className: "nh:size-4"
|
|
94
|
+
});
|
|
95
|
+
$[10] = copied;
|
|
96
|
+
$[11] = t7;
|
|
97
|
+
} else {
|
|
98
|
+
t7 = $[11];
|
|
99
|
+
}
|
|
100
|
+
let t8;
|
|
101
|
+
if ($[12] !== t6 || $[13] !== t7) {
|
|
102
|
+
t8 = /*#__PURE__*/_jsxs("div", {
|
|
103
|
+
className: "nh:relative",
|
|
104
|
+
children: [t5, /*#__PURE__*/_jsx(IconButton, {
|
|
105
|
+
onClick: copyPrompt,
|
|
106
|
+
"aria-label": t6,
|
|
107
|
+
className: "nh:absolute nh:top-2 nh:right-2 nh:rounded-full nh:bg-white/10 nh:px-2 nh:py-1 nh:text-slate-50 nh:hover:bg-white/20 nh:hover:text-slate-50",
|
|
108
|
+
children: t7
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
$[12] = t6;
|
|
112
|
+
$[13] = t7;
|
|
113
|
+
$[14] = t8;
|
|
114
|
+
} else {
|
|
115
|
+
t8 = $[14];
|
|
116
|
+
}
|
|
117
|
+
let t9;
|
|
118
|
+
if ($[15] !== t4 || $[16] !== t8) {
|
|
119
|
+
t9 = /*#__PURE__*/_jsxs("div", {
|
|
120
|
+
className: "nh:flex nh:flex-col nh:gap-4 nh:p-4 nh:text-sm",
|
|
121
|
+
children: [t4, t8]
|
|
122
|
+
});
|
|
123
|
+
$[15] = t4;
|
|
124
|
+
$[16] = t8;
|
|
125
|
+
$[17] = t9;
|
|
126
|
+
} else {
|
|
127
|
+
t9 = $[17];
|
|
128
|
+
}
|
|
129
|
+
return t9;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=agent-info-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-info-panel.js","names":["c","_c","useState","CheckIcon","CopyIcon","usePuckDictionary","IconButton","jsx","_jsx","jsxs","_jsxs","buildPrompt","pageUrl","AgentInfoPanel","$","t","agent","window","location","origin","pathname","t0","Symbol","for","prompt","copied","setCopied","t1","navigator","clipboard","writeText","setTimeout","copyPrompt","t2","connect","className","children","t3","description","t4","t5","t6","t7","t8","t9"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-info-panel.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { CheckIcon, CopyIcon } from 'lucide-react';\n\nimport { usePuckDictionary } from '../../i18n';\nimport { IconButton } from '../../ui/icon-button';\n\nfunction buildPrompt(pageUrl: string) {\n return `Use a browser tool that can run JavaScript to open this page:\n${pageUrl}\n\nIn the page, run: window.puckAgent.help() to list the options that are available to you.`;\n}\n\nexport function AgentInfoPanel() {\n const t = usePuckDictionary().agent;\n const pageUrl =\n typeof window !== 'undefined'\n ? window.location.origin + window.location.pathname\n : 'the current page';\n const prompt = buildPrompt(pageUrl);\n const [copied, setCopied] = useState(false);\n\n const copyPrompt = async () => {\n try {\n await navigator.clipboard.writeText(prompt);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch {\n // ponytail: clipboard blocked (insecure context / denied); no-op\n }\n };\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-4 nh:p-4 nh:text-sm\">\n <div>\n <p className=\"nh:font-medium\">{t.connect}</p>\n <p className=\"nh:text-gray-500\">{t.description}</p>\n </div>\n\n <div className=\"nh:relative\">\n <pre className=\"nh:max-h-80 nh:overflow-auto nh:rounded-md nh:bg-slate-900 nh:p-3 nh:pr-12 nh:text-xs nh:whitespace-pre-wrap nh:text-slate-50\">\n <code>{prompt}</code>\n </pre>\n <IconButton\n onClick={copyPrompt}\n aria-label={copied ? t.copied : t.copyPrompt}\n className=\"nh:absolute nh:top-2 nh:right-2 nh:rounded-full nh:bg-white/10 nh:px-2 nh:py-1 nh:text-slate-50 nh:hover:bg-white/20 nh:hover:text-slate-50\"\n >\n {copied ? (\n <CheckIcon className=\"nh:size-4\" />\n ) : (\n <CopyIcon className=\"nh:size-4\" />\n )}\n </IconButton>\n </div>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,cAAc;AAElD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,UAAU,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,SAASC,WAAWA,CAACC,OAAe,EAAE;EACpC,OAAO;AACT,EAAEA,OAAO;AACT;AACA,yFAAyF;AACzF;AAEA,OAAO,SAAAC,eAAA;EAAA,MAAAC,CAAA,GAAAb,EAAA;EACL,MAAAc,CAA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EAAA,IAAA3B,CAAA,SAAA4B,EAAA;IAbLC,EAAA,gBAAAjC,KAAA;MAAeyB,SAAa,EAAb,aAAa;MAAAC,QAAA,GAC1BI,EAEM,eACNhC,IAAA,CAACF,UAAU;QACA0B,OAAU,EAAVA,UAAU;QACP,cAAAS,EAAgC;QAClCN,SAA6I,EAA7I,6IAA6I;QAAAC,QAAA,EAEtJM;MAIA,CACS,CAAC;IAAA,CACV,CAAC;IAAA5B,CAAA,OAAA2B,EAAA;IAAA3B,CAAA,OAAA4B,EAAA;IAAA5B,CAAA,OAAA6B,EAAA;EAAA;IAAAA,EAAA,GAAA7B,CAAA;EAAA;EAAA,IAAA8B,EAAA;EAAA,IAAA9B,CAAA,SAAAyB,EAAA,IAAAzB,CAAA,SAAA6B,EAAA;IArBRC,EAAA,gBAAAlC,KAAA;MAAeyB,SAAgD,EAAhD,gDAAgD;MAAAC,QAAA,GAC7DG,EAGM,EAENI,EAeM;IAAA,CACH,CAAC;IAAA7B,CAAA,OAAAyB,EAAA;IAAAzB,CAAA,OAAA6B,EAAA;IAAA7B,CAAA,OAAA8B,EAAA;EAAA;IAAAA,EAAA,GAAA9B,CAAA;EAAA;EAAA,OAtBN8B,EAsBM;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Config, Data, Plugin } from '@puckeditor/core';
|
|
2
|
+
/**
|
|
3
|
+
* Puck plugin that hosts the local-agent bridge. Always registered; the
|
|
4
|
+
* wrapper-level handle (open/close/help via useAgentHandle) attaches for
|
|
5
|
+
* logged-in editors, so `window.puckAgent` exists only during an editor session.
|
|
6
|
+
*
|
|
7
|
+
* The bridge mounts via the `puck` override (wraps the whole editor UI), so the
|
|
8
|
+
* content methods are active whenever the plugin is installed — independent of
|
|
9
|
+
* whether the Agent panel/tab is open. The `render` panel only shows the
|
|
10
|
+
* copy-paste agent prompt. The lifecycle methods (open/close/isOpen/isReady/
|
|
11
|
+
* createPage) live in useAgentHandle because open() must work before the editor
|
|
12
|
+
* (and thus this plugin) mounts.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createAgentPlugin({ config, lang, onSave, label, }: {
|
|
15
|
+
config: Config;
|
|
16
|
+
lang?: string;
|
|
17
|
+
onSave?: (data: Partial<Data>) => Promise<void> | void;
|
|
18
|
+
label?: string;
|
|
19
|
+
}): Plugin;
|
|
20
|
+
//# sourceMappingURL=agent-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-plugin.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAMxD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,KAAK,GACN,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,CAeT"}
|