@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,861 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { createUsePuck } from '@puckeditor/core';
|
|
6
|
+
import { ChevronDownIcon, ChevronRightIcon, ChevronsDownUpIcon, ChevronsUpDownIcon, CirclePlusIcon, CopyIcon, PencilIcon, Trash2Icon } from 'lucide-react';
|
|
7
|
+
import { cn } from '../../../../shared/cn';
|
|
8
|
+
import { allowedTypesForZone } from '../../editor/allowed-types';
|
|
9
|
+
import { CanvasAddPicker } from '../../editor/canvas-add-picker';
|
|
10
|
+
import { scrollToCanvas } from '../../editor/canvas-scroll';
|
|
11
|
+
import { componentIcon, templateIcon } from '../../editor/component-icons';
|
|
12
|
+
import { usePuckDictionary } from '../../i18n';
|
|
13
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover';
|
|
14
|
+
import { buildTree, collectAncestorIds, collectContainerIds, collectDescendantIds, indexZones, isTypeAllowed, NAME_PROP, planDrop, ROOT_ZONE, sectionComponentTypes } from './outline-tree';
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const usePuck = createUsePuck();
|
|
17
|
+
const INDENT = 12;
|
|
18
|
+
const ROW_BASE_PADDING = 8;
|
|
19
|
+
const ICON_OFFSET = 20;
|
|
20
|
+
const HOVER_EXPAND_DELAY = 600;
|
|
21
|
+
const gapIndent = target => target.depth * INDENT + ROW_BASE_PADDING + ICON_OFFSET;
|
|
22
|
+
export function OutlinePanel() {
|
|
23
|
+
const $ = _c(34);
|
|
24
|
+
const t = usePuckDictionary().outline;
|
|
25
|
+
const tBlocks = usePuckDictionary().blocks;
|
|
26
|
+
const config = usePuck(_temp);
|
|
27
|
+
const content = usePuck(_temp2);
|
|
28
|
+
const dispatch = usePuck(_temp3);
|
|
29
|
+
const getSelectorForId = usePuck(_temp4);
|
|
30
|
+
const getItemById = usePuck(_temp5);
|
|
31
|
+
const selectedId = usePuck(_temp6);
|
|
32
|
+
const tree = buildTree(content ?? [], config);
|
|
33
|
+
const zones = indexZones(tree);
|
|
34
|
+
const rootZone = {
|
|
35
|
+
zoneCompound: ROOT_ZONE,
|
|
36
|
+
emptyDroppable: true,
|
|
37
|
+
allow: sectionComponentTypes(config),
|
|
38
|
+
items: tree
|
|
39
|
+
};
|
|
40
|
+
let t0;
|
|
41
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42
|
+
t0 = {};
|
|
43
|
+
$[0] = t0;
|
|
44
|
+
} else {
|
|
45
|
+
t0 = $[0];
|
|
46
|
+
}
|
|
47
|
+
const [collapsed, setCollapsed] = useState(t0);
|
|
48
|
+
const [draggedId, setDraggedId] = useState(null);
|
|
49
|
+
const [dropTarget, setDropTarget] = useState(null);
|
|
50
|
+
const [renamingId, setRenamingId] = useState(null);
|
|
51
|
+
const [gapHover, setGapHover] = useState(null);
|
|
52
|
+
const [gapOpen, setGapOpen] = useState(null);
|
|
53
|
+
const [emptyZoneOpen, setEmptyZoneOpen] = useState(null);
|
|
54
|
+
const forbiddenParents = useRef(new Set());
|
|
55
|
+
const draggedType = useRef(null);
|
|
56
|
+
const cancelRename = useRef(false);
|
|
57
|
+
const panelRef = useRef(null);
|
|
58
|
+
const pendingCanvasScroll = useRef(null);
|
|
59
|
+
const treeRef = useRef(tree);
|
|
60
|
+
const zonesRef = useRef(zones);
|
|
61
|
+
const hoverExpand = useRef(null);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
treeRef.current = tree;
|
|
64
|
+
zonesRef.current = zones;
|
|
65
|
+
});
|
|
66
|
+
let t1;
|
|
67
|
+
if ($[1] !== selectedId) {
|
|
68
|
+
t1 = [selectedId];
|
|
69
|
+
$[1] = selectedId;
|
|
70
|
+
$[2] = t1;
|
|
71
|
+
} else {
|
|
72
|
+
t1 = $[2];
|
|
73
|
+
}
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (!selectedId) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const ancestors = collectAncestorIds(treeRef.current, selectedId);
|
|
79
|
+
setCollapsed(prev => {
|
|
80
|
+
if (!ancestors.some(id => prev[id])) {
|
|
81
|
+
return prev;
|
|
82
|
+
}
|
|
83
|
+
const next = {
|
|
84
|
+
...prev
|
|
85
|
+
};
|
|
86
|
+
for (const id_0 of ancestors) {
|
|
87
|
+
delete next[id_0];
|
|
88
|
+
}
|
|
89
|
+
return next;
|
|
90
|
+
});
|
|
91
|
+
requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
92
|
+
panelRef.current?.querySelector(`[data-outline-id="${CSS.escape(selectedId)}"]`)?.scrollIntoView({
|
|
93
|
+
block: "nearest"
|
|
94
|
+
});
|
|
95
|
+
}));
|
|
96
|
+
}, t1);
|
|
97
|
+
let t2;
|
|
98
|
+
if ($[3] !== content) {
|
|
99
|
+
t2 = [content];
|
|
100
|
+
$[3] = content;
|
|
101
|
+
$[4] = t2;
|
|
102
|
+
} else {
|
|
103
|
+
t2 = $[4];
|
|
104
|
+
}
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const pending = pendingCanvasScroll.current;
|
|
107
|
+
if (!pending) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
pendingCanvasScroll.current = null;
|
|
111
|
+
const items = pending.zone === ROOT_ZONE ? treeRef.current : zonesRef.current.get(pending.zone)?.items;
|
|
112
|
+
const id_1 = items?.[pending.index]?.id;
|
|
113
|
+
if (id_1) {
|
|
114
|
+
scrollToCanvas(id_1);
|
|
115
|
+
}
|
|
116
|
+
}, t2);
|
|
117
|
+
let t3;
|
|
118
|
+
if ($[5] !== tree) {
|
|
119
|
+
t3 = collectContainerIds(tree);
|
|
120
|
+
$[5] = tree;
|
|
121
|
+
$[6] = t3;
|
|
122
|
+
} else {
|
|
123
|
+
t3 = $[6];
|
|
124
|
+
}
|
|
125
|
+
const containerIds = t3;
|
|
126
|
+
let t4;
|
|
127
|
+
if ($[7] !== containerIds) {
|
|
128
|
+
t4 = () => setCollapsed(Object.fromEntries(containerIds.map(_temp7)));
|
|
129
|
+
$[7] = containerIds;
|
|
130
|
+
$[8] = t4;
|
|
131
|
+
} else {
|
|
132
|
+
t4 = $[8];
|
|
133
|
+
}
|
|
134
|
+
const collapseAll = t4;
|
|
135
|
+
let t5;
|
|
136
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
137
|
+
t5 = () => setCollapsed({});
|
|
138
|
+
$[9] = t5;
|
|
139
|
+
} else {
|
|
140
|
+
t5 = $[9];
|
|
141
|
+
}
|
|
142
|
+
const expandAll = t5;
|
|
143
|
+
const canDropInZone = zoneCompound => {
|
|
144
|
+
if (forbiddenParents.current.has(zoneCompound.split(":")[0])) {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
const type = draggedType.current;
|
|
148
|
+
if (!type) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
return isTypeAllowed(zones.get(zoneCompound), type);
|
|
152
|
+
};
|
|
153
|
+
let t6;
|
|
154
|
+
if ($[10] !== dispatch || $[11] !== getSelectorForId || $[12] !== selectedId) {
|
|
155
|
+
t6 = node => {
|
|
156
|
+
if (selectedId === node.id) {
|
|
157
|
+
dispatch({
|
|
158
|
+
type: "setUi",
|
|
159
|
+
ui: {
|
|
160
|
+
itemSelector: null
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const selector = getSelectorForId(node.id) ?? {
|
|
166
|
+
index: node.index,
|
|
167
|
+
zone: node.zoneCompound
|
|
168
|
+
};
|
|
169
|
+
dispatch({
|
|
170
|
+
type: "setUi",
|
|
171
|
+
ui: {
|
|
172
|
+
itemSelector: selector
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
scrollToCanvas(node.id);
|
|
176
|
+
};
|
|
177
|
+
$[10] = dispatch;
|
|
178
|
+
$[11] = getSelectorForId;
|
|
179
|
+
$[12] = selectedId;
|
|
180
|
+
$[13] = t6;
|
|
181
|
+
} else {
|
|
182
|
+
t6 = $[13];
|
|
183
|
+
}
|
|
184
|
+
const select = t6;
|
|
185
|
+
let t7;
|
|
186
|
+
if ($[14] !== dispatch || $[15] !== getSelectorForId) {
|
|
187
|
+
t7 = node_0 => {
|
|
188
|
+
const selector_0 = getSelectorForId(node_0.id);
|
|
189
|
+
if (!selector_0) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
dispatch({
|
|
193
|
+
type: "duplicate",
|
|
194
|
+
sourceIndex: selector_0.index,
|
|
195
|
+
sourceZone: selector_0.zone
|
|
196
|
+
});
|
|
197
|
+
dispatch({
|
|
198
|
+
type: "setUi",
|
|
199
|
+
ui: {
|
|
200
|
+
itemSelector: {
|
|
201
|
+
index: selector_0.index + 1,
|
|
202
|
+
zone: selector_0.zone
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
pendingCanvasScroll.current = {
|
|
207
|
+
zone: selector_0.zone,
|
|
208
|
+
index: selector_0.index + 1
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
$[14] = dispatch;
|
|
212
|
+
$[15] = getSelectorForId;
|
|
213
|
+
$[16] = t7;
|
|
214
|
+
} else {
|
|
215
|
+
t7 = $[16];
|
|
216
|
+
}
|
|
217
|
+
const duplicate = t7;
|
|
218
|
+
let t8;
|
|
219
|
+
if ($[17] !== dispatch || $[18] !== getSelectorForId) {
|
|
220
|
+
t8 = node_1 => {
|
|
221
|
+
const selector_1 = getSelectorForId(node_1.id);
|
|
222
|
+
if (!selector_1) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
dispatch({
|
|
226
|
+
type: "remove",
|
|
227
|
+
index: selector_1.index,
|
|
228
|
+
zone: selector_1.zone
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
$[17] = dispatch;
|
|
232
|
+
$[18] = getSelectorForId;
|
|
233
|
+
$[19] = t8;
|
|
234
|
+
} else {
|
|
235
|
+
t8 = $[19];
|
|
236
|
+
}
|
|
237
|
+
const remove = t8;
|
|
238
|
+
let t9;
|
|
239
|
+
if ($[20] !== config) {
|
|
240
|
+
t9 = zone => allowedTypesForZone(config, zone);
|
|
241
|
+
$[20] = config;
|
|
242
|
+
$[21] = t9;
|
|
243
|
+
} else {
|
|
244
|
+
t9 = $[21];
|
|
245
|
+
}
|
|
246
|
+
const allowedTypes = t9;
|
|
247
|
+
let t10;
|
|
248
|
+
if ($[22] !== t || $[23] !== tBlocks) {
|
|
249
|
+
t10 = zoneCompound_0 => zoneCompound_0 === ROOT_ZONE ? t.addSection : tBlocks.addBlock;
|
|
250
|
+
$[22] = t;
|
|
251
|
+
$[23] = tBlocks;
|
|
252
|
+
$[24] = t10;
|
|
253
|
+
} else {
|
|
254
|
+
t10 = $[24];
|
|
255
|
+
}
|
|
256
|
+
const addLabel = t10;
|
|
257
|
+
const startRename = node_2 => {
|
|
258
|
+
cancelRename.current = false;
|
|
259
|
+
const selector_2 = getSelectorForId(node_2.id) ?? {
|
|
260
|
+
index: node_2.index,
|
|
261
|
+
zone: node_2.zoneCompound
|
|
262
|
+
};
|
|
263
|
+
dispatch({
|
|
264
|
+
type: "setUi",
|
|
265
|
+
ui: {
|
|
266
|
+
itemSelector: selector_2
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
setRenamingId(node_2.id);
|
|
270
|
+
};
|
|
271
|
+
const commitRename = (node_3, value) => {
|
|
272
|
+
setRenamingId(null);
|
|
273
|
+
if (cancelRename.current) {
|
|
274
|
+
cancelRename.current = false;
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const selector_3 = getSelectorForId(node_3.id);
|
|
278
|
+
if (!selector_3) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const item = getItemById(node_3.id);
|
|
282
|
+
if (!item) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const trimmed = value.trim();
|
|
286
|
+
const nextProps = {
|
|
287
|
+
...item.props
|
|
288
|
+
};
|
|
289
|
+
if (trimmed) {
|
|
290
|
+
nextProps[NAME_PROP] = trimmed;
|
|
291
|
+
} else {
|
|
292
|
+
delete nextProps[NAME_PROP];
|
|
293
|
+
}
|
|
294
|
+
dispatch({
|
|
295
|
+
type: "replace",
|
|
296
|
+
destinationIndex: selector_3.index,
|
|
297
|
+
destinationZone: selector_3.zone,
|
|
298
|
+
data: {
|
|
299
|
+
...item,
|
|
300
|
+
props: nextProps
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
const clearHoverExpand = () => {
|
|
305
|
+
if (!hoverExpand.current) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
clearTimeout(hoverExpand.current.timer);
|
|
309
|
+
hoverExpand.current = null;
|
|
310
|
+
};
|
|
311
|
+
const scheduleHoverExpand = node_4 => {
|
|
312
|
+
if (hoverExpand.current?.id === node_4.id) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
clearHoverExpand();
|
|
316
|
+
hoverExpand.current = {
|
|
317
|
+
id: node_4.id,
|
|
318
|
+
timer: setTimeout(() => {
|
|
319
|
+
hoverExpand.current = null;
|
|
320
|
+
setCollapsed(prev_0 => ({
|
|
321
|
+
...prev_0,
|
|
322
|
+
[node_4.id]: false
|
|
323
|
+
}));
|
|
324
|
+
}, HOVER_EXPAND_DELAY)
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
const onDragStart = (e, node_5) => {
|
|
328
|
+
setDraggedId(node_5.id);
|
|
329
|
+
draggedType.current = node_5.type;
|
|
330
|
+
forbiddenParents.current = collectDescendantIds(node_5);
|
|
331
|
+
const row = e.currentTarget;
|
|
332
|
+
const style = getComputedStyle(row);
|
|
333
|
+
const accent = style.getPropertyValue("--nh-primary").trim() || "#2563eb";
|
|
334
|
+
const chip = document.createElement("div");
|
|
335
|
+
chip.style.cssText = `position:fixed;top:-1000px;left:-1000px;display:flex;align-items:center;gap:6px;padding:4px 12px;border-radius:9999px;background:${accent};color:#fff;font-family:${style.fontFamily};font-size:13px;font-weight:500;white-space:nowrap;`;
|
|
336
|
+
const icon = row.querySelector("[data-outline-icon] svg");
|
|
337
|
+
if (icon) {
|
|
338
|
+
const clone = icon.cloneNode(true);
|
|
339
|
+
clone.removeAttribute("class");
|
|
340
|
+
clone.setAttribute("width", "14");
|
|
341
|
+
clone.setAttribute("height", "14");
|
|
342
|
+
chip.appendChild(clone);
|
|
343
|
+
}
|
|
344
|
+
chip.appendChild(document.createTextNode(node_5.label));
|
|
345
|
+
document.body.appendChild(chip);
|
|
346
|
+
e.dataTransfer.setDragImage(chip, 14, 13);
|
|
347
|
+
requestAnimationFrame(() => chip.remove());
|
|
348
|
+
};
|
|
349
|
+
const onDragEnd = () => {
|
|
350
|
+
setDraggedId(null);
|
|
351
|
+
setDropTarget(null);
|
|
352
|
+
draggedType.current = null;
|
|
353
|
+
forbiddenParents.current = new Set();
|
|
354
|
+
clearHoverExpand();
|
|
355
|
+
};
|
|
356
|
+
const onRowDragOver = (e_0, node_6) => {
|
|
357
|
+
if (!draggedId) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
if (node_6.zones.length > 0 && collapsed[node_6.id]) {
|
|
361
|
+
scheduleHoverExpand(node_6);
|
|
362
|
+
} else {
|
|
363
|
+
clearHoverExpand();
|
|
364
|
+
}
|
|
365
|
+
const rect = e_0.currentTarget.getBoundingClientRect();
|
|
366
|
+
const ratio = (e_0.clientY - rect.top) / rect.height;
|
|
367
|
+
const singleSlot = !collapsed[node_6.id] && node_6.zones.length === 1 && node_6.zones[0].emptyDroppable ? node_6.zones[0] : null;
|
|
368
|
+
let next_0;
|
|
369
|
+
if (singleSlot && ratio > 0.35 && ratio < 0.65) {
|
|
370
|
+
next_0 = {
|
|
371
|
+
zone: singleSlot.zoneCompound,
|
|
372
|
+
insertAt: singleSlot.items.length
|
|
373
|
+
};
|
|
374
|
+
} else {
|
|
375
|
+
if (ratio < 0.5) {
|
|
376
|
+
next_0 = {
|
|
377
|
+
zone: node_6.zoneCompound,
|
|
378
|
+
insertAt: node_6.index
|
|
379
|
+
};
|
|
380
|
+
} else {
|
|
381
|
+
next_0 = {
|
|
382
|
+
zone: node_6.zoneCompound,
|
|
383
|
+
insertAt: node_6.index + 1
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if (!canDropInZone(next_0.zone)) {
|
|
388
|
+
e_0.dataTransfer.dropEffect = "none";
|
|
389
|
+
setDropTarget(null);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
e_0.preventDefault();
|
|
393
|
+
e_0.dataTransfer.dropEffect = "move";
|
|
394
|
+
setDropTarget(next_0);
|
|
395
|
+
};
|
|
396
|
+
const onInsertDragOver = (e_1, zone_0, index) => {
|
|
397
|
+
if (!draggedId) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
clearHoverExpand();
|
|
401
|
+
if (!canDropInZone(zone_0.zoneCompound)) {
|
|
402
|
+
e_1.dataTransfer.dropEffect = "none";
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
e_1.preventDefault();
|
|
406
|
+
e_1.dataTransfer.dropEffect = "move";
|
|
407
|
+
setDropTarget({
|
|
408
|
+
zone: zone_0.zoneCompound,
|
|
409
|
+
insertAt: index
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
const performDrop = e_2 => {
|
|
413
|
+
e_2.preventDefault();
|
|
414
|
+
if (!draggedId || !dropTarget) {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const movedId = draggedId;
|
|
418
|
+
const wasSelected = selectedId === movedId;
|
|
419
|
+
const source = getSelectorForId(movedId);
|
|
420
|
+
if (!source || !canDropInZone(dropTarget.zone)) {
|
|
421
|
+
onDragEnd();
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const plan = planDrop(source, dropTarget);
|
|
425
|
+
if (plan) {
|
|
426
|
+
dispatch(plan);
|
|
427
|
+
if (wasSelected) {
|
|
428
|
+
dispatch({
|
|
429
|
+
type: "setUi",
|
|
430
|
+
ui: {
|
|
431
|
+
itemSelector: {
|
|
432
|
+
index: plan.destinationIndex,
|
|
433
|
+
zone: plan.destinationZone
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
scrollToCanvas(movedId);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
onDragEnd();
|
|
441
|
+
};
|
|
442
|
+
const pickByIndent = _temp8;
|
|
443
|
+
const renderInsert = (targets, t11) => {
|
|
444
|
+
const tall = t11 === undefined ? false : t11;
|
|
445
|
+
const key = `${targets[0].zone.zoneCompound}@${targets[0].insertAt}`;
|
|
446
|
+
const addTargets = targets.filter(target_0 => allowedTypes(target_0.zone).length > 0);
|
|
447
|
+
const clickable = !draggedId && addTargets.length > 0;
|
|
448
|
+
const activeTarget = draggedId && dropTarget ? targets.find(target_1 => target_1.zone.zoneCompound === dropTarget.zone && target_1.insertAt === dropTarget.insertAt) : undefined;
|
|
449
|
+
const pinned = gapOpen?.key === key ? gapOpen.target : undefined;
|
|
450
|
+
const shown = pinned ?? (gapHover?.key === key ? addTargets[gapHover.idx] : undefined) ?? addTargets[0];
|
|
451
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
452
|
+
className: cn("nh:group/ins nh:relative", tall ? "nh:h-6" : "nh:h-2", {
|
|
453
|
+
"nh:cursor-pointer": clickable
|
|
454
|
+
}),
|
|
455
|
+
onDragOver: e_4 => {
|
|
456
|
+
if (!draggedId) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
clearHoverExpand();
|
|
460
|
+
const droppable = targets.filter(target_2 => canDropInZone(target_2.zone.zoneCompound));
|
|
461
|
+
if (droppable.length === 0) {
|
|
462
|
+
e_4.dataTransfer.dropEffect = "none";
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
const target_3 = pickByIndent(droppable, e_4);
|
|
466
|
+
e_4.preventDefault();
|
|
467
|
+
e_4.dataTransfer.dropEffect = "move";
|
|
468
|
+
setDropTarget({
|
|
469
|
+
zone: target_3.zone.zoneCompound,
|
|
470
|
+
insertAt: target_3.insertAt
|
|
471
|
+
});
|
|
472
|
+
},
|
|
473
|
+
onDrop: performDrop,
|
|
474
|
+
onMouseMove: e_5 => {
|
|
475
|
+
if (!clickable || pinned) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
const idx = addTargets.indexOf(pickByIndent(addTargets, e_5));
|
|
479
|
+
setGapHover(prev_1 => prev_1?.key === key && prev_1.idx === idx ? prev_1 : {
|
|
480
|
+
key,
|
|
481
|
+
idx
|
|
482
|
+
});
|
|
483
|
+
},
|
|
484
|
+
onMouseLeave: () => setGapHover(prev_2 => prev_2?.key === key ? null : prev_2),
|
|
485
|
+
onClick: e_6 => {
|
|
486
|
+
if (!clickable) {
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (e_6.target.closest("button")) {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
e_6.currentTarget.querySelector("button")?.click();
|
|
493
|
+
},
|
|
494
|
+
children: [activeTarget && /*#__PURE__*/_jsxs(_Fragment, {
|
|
495
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
496
|
+
className: "nh:pointer-events-none nh:absolute nh:top-1/2 nh:z-20 nh:size-2 nh:-translate-y-1/2 nh:rounded-full nh:border-2 nh:border-(--nh-primary) nh:bg-(--nh-bg)",
|
|
497
|
+
style: {
|
|
498
|
+
left: gapIndent(activeTarget)
|
|
499
|
+
}
|
|
500
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
501
|
+
className: "nh:pointer-events-none nh:absolute nh:top-1/2 nh:z-10 nh:h-0.5 nh:-translate-y-1/2 nh:rounded-full nh:bg-(--nh-primary)",
|
|
502
|
+
style: {
|
|
503
|
+
left: gapIndent(activeTarget),
|
|
504
|
+
right: 8
|
|
505
|
+
}
|
|
506
|
+
})]
|
|
507
|
+
}), !draggedId && shown && /*#__PURE__*/_jsxs("div", {
|
|
508
|
+
className: "nh:pointer-events-none nh:absolute nh:top-1/2 nh:-translate-y-1/2 nh:opacity-0 nh:group-hover/ins:opacity-100",
|
|
509
|
+
style: {
|
|
510
|
+
left: gapIndent(shown),
|
|
511
|
+
right: 8
|
|
512
|
+
},
|
|
513
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
514
|
+
className: "nh:h-0.5 nh:w-full nh:rounded-full nh:bg-(--nh-primary)"
|
|
515
|
+
}), /*#__PURE__*/_jsxs(Popover, {
|
|
516
|
+
open: gapOpen?.key === key,
|
|
517
|
+
onOpenChange: open => setGapOpen(open ? {
|
|
518
|
+
key,
|
|
519
|
+
target: shown
|
|
520
|
+
} : null),
|
|
521
|
+
children: [/*#__PURE__*/_jsx(PopoverTrigger, {
|
|
522
|
+
asChild: true,
|
|
523
|
+
children: /*#__PURE__*/_jsx("button", {
|
|
524
|
+
type: "button",
|
|
525
|
+
title: addLabel(shown.zone.zoneCompound),
|
|
526
|
+
"aria-label": addLabel(shown.zone.zoneCompound),
|
|
527
|
+
onPointerDown: _temp9,
|
|
528
|
+
className: "nh:pointer-events-none nh:absolute nh:top-1/2 nh:left-1/2 nh:z-20 nh:flex nh:size-4 nh:-translate-x-1/2 nh:-translate-y-1/2 nh:cursor-pointer nh:items-center nh:justify-center nh:rounded-full nh:bg-(--nh-bg) nh:text-(--nh-primary) nh:group-hover/ins:pointer-events-auto nh:data-[state=open]:pointer-events-auto",
|
|
529
|
+
children: /*#__PURE__*/_jsx(CirclePlusIcon, {
|
|
530
|
+
className: "nh:size-4"
|
|
531
|
+
})
|
|
532
|
+
})
|
|
533
|
+
}), /*#__PURE__*/_jsx(PopoverContent, {
|
|
534
|
+
align: "center",
|
|
535
|
+
className: "nh:w-64 nh:p-2",
|
|
536
|
+
children: /*#__PURE__*/_jsx(CanvasAddPicker, {
|
|
537
|
+
zone: shown.zone.zoneCompound,
|
|
538
|
+
index: shown.insertAt,
|
|
539
|
+
allowedTypes: allowedTypes(shown.zone),
|
|
540
|
+
onDone: () => setGapOpen(null)
|
|
541
|
+
})
|
|
542
|
+
})]
|
|
543
|
+
})]
|
|
544
|
+
})]
|
|
545
|
+
});
|
|
546
|
+
};
|
|
547
|
+
const renderEmptyZone = (zone_1, depth) => {
|
|
548
|
+
const types = allowedTypes(zone_1);
|
|
549
|
+
if (types.length === 0) {
|
|
550
|
+
return renderInsert([{
|
|
551
|
+
zone: zone_1,
|
|
552
|
+
insertAt: 0,
|
|
553
|
+
depth
|
|
554
|
+
}], true);
|
|
555
|
+
}
|
|
556
|
+
const active = !!draggedId && dropTarget?.zone === zone_1.zoneCompound && dropTarget.insertAt === 0;
|
|
557
|
+
return /*#__PURE__*/_jsx("div", {
|
|
558
|
+
onDragOver: e_8 => onInsertDragOver(e_8, zone_1, 0),
|
|
559
|
+
onDrop: performDrop,
|
|
560
|
+
children: /*#__PURE__*/_jsxs(Popover, {
|
|
561
|
+
open: emptyZoneOpen === zone_1.zoneCompound,
|
|
562
|
+
onOpenChange: open_0 => setEmptyZoneOpen(open_0 ? zone_1.zoneCompound : null),
|
|
563
|
+
children: [/*#__PURE__*/_jsx(PopoverTrigger, {
|
|
564
|
+
asChild: true,
|
|
565
|
+
children: /*#__PURE__*/_jsxs("button", {
|
|
566
|
+
type: "button",
|
|
567
|
+
className: cn("nh:flex nh:w-full nh:cursor-pointer nh:items-center nh:gap-1 nh:rounded nh:py-1 nh:pr-1 nh:text-sm nh:text-(--nh-primary)", {
|
|
568
|
+
"nh:bg-(--nh-primary)/10": active,
|
|
569
|
+
"nh:hover:bg-gray-100": !active
|
|
570
|
+
}),
|
|
571
|
+
style: {
|
|
572
|
+
paddingLeft: depth * INDENT + ROW_BASE_PADDING + ICON_OFFSET
|
|
573
|
+
},
|
|
574
|
+
children: [/*#__PURE__*/_jsx(CirclePlusIcon, {
|
|
575
|
+
className: "nh:size-4 nh:shrink-0"
|
|
576
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
577
|
+
className: "nh:truncate",
|
|
578
|
+
children: addLabel(zone_1.zoneCompound)
|
|
579
|
+
})]
|
|
580
|
+
})
|
|
581
|
+
}), /*#__PURE__*/_jsx(PopoverContent, {
|
|
582
|
+
align: "center",
|
|
583
|
+
className: "nh:w-64 nh:p-2",
|
|
584
|
+
children: /*#__PURE__*/_jsx(CanvasAddPicker, {
|
|
585
|
+
zone: zone_1.zoneCompound,
|
|
586
|
+
index: 0,
|
|
587
|
+
allowedTypes: types,
|
|
588
|
+
onDone: () => setEmptyZoneOpen(null)
|
|
589
|
+
})
|
|
590
|
+
})]
|
|
591
|
+
})
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
const renderZone = (zone_2, depth_0, showLabel, trailing) => /*#__PURE__*/_jsxs("div", {
|
|
595
|
+
role: "group",
|
|
596
|
+
children: [showLabel && zone_2.label && /*#__PURE__*/_jsxs("div", {
|
|
597
|
+
className: "nh:flex nh:items-center",
|
|
598
|
+
style: {
|
|
599
|
+
paddingLeft: depth_0 * INDENT + ROW_BASE_PADDING
|
|
600
|
+
},
|
|
601
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
602
|
+
className: "nh:w-4 nh:shrink-0"
|
|
603
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
604
|
+
className: "nh:truncate nh:py-1 nh:text-[11px] nh:font-medium nh:tracking-wide nh:text-gray-400 nh:uppercase",
|
|
605
|
+
children: zone_2.label
|
|
606
|
+
})]
|
|
607
|
+
}), zone_2.items.length === 0 ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
608
|
+
children: [renderEmptyZone(zone_2, depth_0), trailing.length > 0 && renderInsert(trailing)]
|
|
609
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
610
|
+
children: [renderInsert([{
|
|
611
|
+
zone: zone_2,
|
|
612
|
+
insertAt: 0,
|
|
613
|
+
depth: depth_0
|
|
614
|
+
}]), zone_2.items.map((child, i) => /*#__PURE__*/_jsx("div", {
|
|
615
|
+
children: renderNode(child, depth_0, [{
|
|
616
|
+
zone: zone_2,
|
|
617
|
+
insertAt: child.index + 1,
|
|
618
|
+
depth: depth_0
|
|
619
|
+
}, ...(i === zone_2.items.length - 1 ? trailing : [])])
|
|
620
|
+
}, child.id))]
|
|
621
|
+
})]
|
|
622
|
+
}, zone_2.zoneCompound);
|
|
623
|
+
const renderNode = (node_7, depth_1, trailing_0) => {
|
|
624
|
+
const hasZones = node_7.zones.length > 0;
|
|
625
|
+
const isCollapsed = collapsed[node_7.id];
|
|
626
|
+
const isSelected = selectedId === node_7.id;
|
|
627
|
+
const isDragged = draggedId === node_7.id;
|
|
628
|
+
const isRenaming = renamingId === node_7.id;
|
|
629
|
+
const isDropContainer = !!dropTarget && dropTarget.zone.split(":")[0] === node_7.id;
|
|
630
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
631
|
+
className: cn("nh:rounded", {
|
|
632
|
+
"nh:bg-(--nh-primary)/10": isDropContainer
|
|
633
|
+
}),
|
|
634
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
635
|
+
role: "treeitem",
|
|
636
|
+
"aria-selected": isSelected,
|
|
637
|
+
"aria-expanded": hasZones ? !isCollapsed : undefined,
|
|
638
|
+
"aria-label": node_7.label,
|
|
639
|
+
"data-outline-id": node_7.id,
|
|
640
|
+
draggable: !isRenaming,
|
|
641
|
+
onDragStart: e_9 => onDragStart(e_9, node_7),
|
|
642
|
+
onDragEnd: onDragEnd,
|
|
643
|
+
onDragOver: e_10 => onRowDragOver(e_10, node_7),
|
|
644
|
+
onDrop: performDrop,
|
|
645
|
+
className: cn("nh:group nh:flex nh:cursor-pointer nh:items-center nh:gap-1 nh:rounded nh:pr-1 nh:text-sm", {
|
|
646
|
+
"nh:bg-gray-100 nh:font-medium nh:text-(--nh-primary)": isSelected,
|
|
647
|
+
"nh:text-gray-700 nh:hover:bg-gray-100": !isSelected,
|
|
648
|
+
"nh:scale-95 nh:opacity-15": isDragged
|
|
649
|
+
}),
|
|
650
|
+
style: {
|
|
651
|
+
paddingLeft: depth_1 * INDENT + ROW_BASE_PADDING
|
|
652
|
+
},
|
|
653
|
+
children: [hasZones ? /*#__PURE__*/_jsx("button", {
|
|
654
|
+
type: "button",
|
|
655
|
+
onClick: () => setCollapsed(prev_3 => ({
|
|
656
|
+
...prev_3,
|
|
657
|
+
[node_7.id]: !prev_3[node_7.id]
|
|
658
|
+
})),
|
|
659
|
+
className: "nh:shrink-0 nh:cursor-pointer nh:text-gray-400 nh:hover:text-gray-700",
|
|
660
|
+
title: isCollapsed ? t.expand : t.collapse,
|
|
661
|
+
"aria-label": isCollapsed ? t.expand : t.collapse,
|
|
662
|
+
children: isCollapsed ? /*#__PURE__*/_jsx(ChevronRightIcon, {
|
|
663
|
+
className: "nh:size-4"
|
|
664
|
+
}) : /*#__PURE__*/_jsx(ChevronDownIcon, {
|
|
665
|
+
className: "nh:size-4"
|
|
666
|
+
})
|
|
667
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
668
|
+
className: "nh:w-4 nh:shrink-0"
|
|
669
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
670
|
+
"data-outline-icon": true,
|
|
671
|
+
className: cn("nh:shrink-0", {
|
|
672
|
+
"nh:text-(--nh-primary)": isSelected,
|
|
673
|
+
"nh:text-gray-400": !isSelected
|
|
674
|
+
}),
|
|
675
|
+
children: node_7.icon ? templateIcon(node_7.icon) : componentIcon(config, node_7.type)
|
|
676
|
+
}), isRenaming ? /*#__PURE__*/_jsx("input", {
|
|
677
|
+
autoFocus: true,
|
|
678
|
+
defaultValue: node_7.label,
|
|
679
|
+
onDragStart: _temp0,
|
|
680
|
+
onBlur: e_12 => commitRename(node_7, e_12.target.value),
|
|
681
|
+
onKeyDown: e_13 => {
|
|
682
|
+
if (e_13.key === "Enter") {
|
|
683
|
+
e_13.currentTarget.blur();
|
|
684
|
+
}
|
|
685
|
+
if (e_13.key === "Escape") {
|
|
686
|
+
cancelRename.current = true;
|
|
687
|
+
e_13.currentTarget.blur();
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
className: "nh:my-0.5 nh:w-full nh:min-w-0 nh:rounded nh:border nh:border-(--nh-primary) nh:px-1 nh:py-0.5 nh:text-sm nh:focus:outline-none"
|
|
691
|
+
}) : /*#__PURE__*/_jsx("button", {
|
|
692
|
+
type: "button",
|
|
693
|
+
onClick: () => select(node_7),
|
|
694
|
+
onDoubleClick: () => startRename(node_7),
|
|
695
|
+
className: "nh:min-w-0 nh:flex-1 nh:cursor-pointer nh:truncate nh:py-1 nh:text-left",
|
|
696
|
+
children: node_7.label
|
|
697
|
+
}), !isRenaming && !isDragged && /*#__PURE__*/_jsxs("div", {
|
|
698
|
+
className: "nh:hidden nh:shrink-0 nh:items-center nh:gap-0.5 nh:group-hover:flex",
|
|
699
|
+
children: [/*#__PURE__*/_jsx(RowAction, {
|
|
700
|
+
title: t.rename,
|
|
701
|
+
onClick: () => startRename(node_7),
|
|
702
|
+
children: /*#__PURE__*/_jsx(PencilIcon, {
|
|
703
|
+
className: "nh:size-4"
|
|
704
|
+
})
|
|
705
|
+
}), /*#__PURE__*/_jsx(RowAction, {
|
|
706
|
+
title: t.duplicate,
|
|
707
|
+
onClick: () => duplicate(node_7),
|
|
708
|
+
children: /*#__PURE__*/_jsx(CopyIcon, {
|
|
709
|
+
className: "nh:size-4"
|
|
710
|
+
})
|
|
711
|
+
}), /*#__PURE__*/_jsx(RowAction, {
|
|
712
|
+
title: t.delete,
|
|
713
|
+
danger: true,
|
|
714
|
+
onClick: () => remove(node_7),
|
|
715
|
+
children: /*#__PURE__*/_jsx(Trash2Icon, {
|
|
716
|
+
className: "nh:size-4"
|
|
717
|
+
})
|
|
718
|
+
})]
|
|
719
|
+
})]
|
|
720
|
+
}), hasZones && !isCollapsed ? node_7.zones.map((zone_3, zi) => renderZone(zone_3, depth_1 + 1, node_7.zones.length > 1, zi === node_7.zones.length - 1 ? trailing_0 : [])) : renderInsert(trailing_0)]
|
|
721
|
+
}, node_7.id);
|
|
722
|
+
};
|
|
723
|
+
const t12 = "nh:flex nh:h-full nh:flex-col";
|
|
724
|
+
let t13;
|
|
725
|
+
if ($[25] !== collapseAll || $[26] !== containerIds.length || $[27] !== t) {
|
|
726
|
+
t13 = containerIds.length > 0 && /*#__PURE__*/_jsxs("div", {
|
|
727
|
+
className: "nh:flex nh:items-center nh:justify-end nh:gap-1 nh:border-b nh:border-gray-200 nh:px-2 nh:py-1.5",
|
|
728
|
+
children: [/*#__PURE__*/_jsx("button", {
|
|
729
|
+
type: "button",
|
|
730
|
+
onClick: expandAll,
|
|
731
|
+
title: t.expandAll,
|
|
732
|
+
"aria-label": t.expandAll,
|
|
733
|
+
className: "nh:cursor-pointer nh:rounded nh:p-1 nh:text-gray-400 nh:hover:bg-gray-100 nh:hover:text-gray-700",
|
|
734
|
+
children: /*#__PURE__*/_jsx(ChevronsUpDownIcon, {
|
|
735
|
+
className: "nh:size-4"
|
|
736
|
+
})
|
|
737
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
738
|
+
type: "button",
|
|
739
|
+
onClick: collapseAll,
|
|
740
|
+
title: t.collapseAll,
|
|
741
|
+
"aria-label": t.collapseAll,
|
|
742
|
+
className: "nh:cursor-pointer nh:rounded nh:p-1 nh:text-gray-400 nh:hover:bg-gray-100 nh:hover:text-gray-700",
|
|
743
|
+
children: /*#__PURE__*/_jsx(ChevronsDownUpIcon, {
|
|
744
|
+
className: "nh:size-4"
|
|
745
|
+
})
|
|
746
|
+
})]
|
|
747
|
+
});
|
|
748
|
+
$[25] = collapseAll;
|
|
749
|
+
$[26] = containerIds.length;
|
|
750
|
+
$[27] = t;
|
|
751
|
+
$[28] = t13;
|
|
752
|
+
} else {
|
|
753
|
+
t13 = $[28];
|
|
754
|
+
}
|
|
755
|
+
const t14 = "tree";
|
|
756
|
+
const t15 = "nh:flex-1 nh:overflow-y-auto nh:py-2";
|
|
757
|
+
const t16 = renderZone(rootZone, 0, false, []);
|
|
758
|
+
let t17;
|
|
759
|
+
if ($[29] !== t16) {
|
|
760
|
+
t17 = /*#__PURE__*/_jsx("div", {
|
|
761
|
+
ref: panelRef,
|
|
762
|
+
role: t14,
|
|
763
|
+
className: t15,
|
|
764
|
+
children: t16
|
|
765
|
+
});
|
|
766
|
+
$[29] = t16;
|
|
767
|
+
$[30] = t17;
|
|
768
|
+
} else {
|
|
769
|
+
t17 = $[30];
|
|
770
|
+
}
|
|
771
|
+
let t18;
|
|
772
|
+
if ($[31] !== t13 || $[32] !== t17) {
|
|
773
|
+
t18 = /*#__PURE__*/_jsxs("div", {
|
|
774
|
+
className: t12,
|
|
775
|
+
children: [t13, t17]
|
|
776
|
+
});
|
|
777
|
+
$[31] = t13;
|
|
778
|
+
$[32] = t17;
|
|
779
|
+
$[33] = t18;
|
|
780
|
+
} else {
|
|
781
|
+
t18 = $[33];
|
|
782
|
+
}
|
|
783
|
+
return t18;
|
|
784
|
+
}
|
|
785
|
+
function _temp0(e_11) {
|
|
786
|
+
return e_11.preventDefault();
|
|
787
|
+
}
|
|
788
|
+
function _temp9(e_7) {
|
|
789
|
+
return e_7.stopPropagation();
|
|
790
|
+
}
|
|
791
|
+
function _temp8(list, e_3) {
|
|
792
|
+
const x = e_3.clientX - e_3.currentTarget.getBoundingClientRect().left;
|
|
793
|
+
return list.find(target => x >= gapIndent(target)) ?? list[list.length - 1];
|
|
794
|
+
}
|
|
795
|
+
function _temp7(id_2) {
|
|
796
|
+
return [id_2, true];
|
|
797
|
+
}
|
|
798
|
+
function _temp6(s_4) {
|
|
799
|
+
return s_4.selectedItem?.props.id ?? null;
|
|
800
|
+
}
|
|
801
|
+
function _temp5(s_3) {
|
|
802
|
+
return s_3.getItemById;
|
|
803
|
+
}
|
|
804
|
+
function _temp4(s_2) {
|
|
805
|
+
return s_2.getSelectorForId;
|
|
806
|
+
}
|
|
807
|
+
function _temp3(s_1) {
|
|
808
|
+
return s_1.dispatch;
|
|
809
|
+
}
|
|
810
|
+
function _temp2(s_0) {
|
|
811
|
+
return s_0.appState.data.content;
|
|
812
|
+
}
|
|
813
|
+
function _temp(s) {
|
|
814
|
+
return s.config;
|
|
815
|
+
}
|
|
816
|
+
function RowAction(t0) {
|
|
817
|
+
const $ = _c(8);
|
|
818
|
+
const {
|
|
819
|
+
title,
|
|
820
|
+
onClick,
|
|
821
|
+
danger,
|
|
822
|
+
children
|
|
823
|
+
} = t0;
|
|
824
|
+
const t1 = !danger;
|
|
825
|
+
let t2;
|
|
826
|
+
if ($[0] !== danger || $[1] !== t1) {
|
|
827
|
+
t2 = cn("nh:cursor-pointer nh:rounded nh:p-0.5 nh:text-gray-400", {
|
|
828
|
+
"nh:hover:text-red-600": danger,
|
|
829
|
+
"nh:hover:text-gray-700": t1
|
|
830
|
+
});
|
|
831
|
+
$[0] = danger;
|
|
832
|
+
$[1] = t1;
|
|
833
|
+
$[2] = t2;
|
|
834
|
+
} else {
|
|
835
|
+
t2 = $[2];
|
|
836
|
+
}
|
|
837
|
+
let t3;
|
|
838
|
+
if ($[3] !== children || $[4] !== onClick || $[5] !== t2 || $[6] !== title) {
|
|
839
|
+
t3 = /*#__PURE__*/_jsx("button", {
|
|
840
|
+
type: "button",
|
|
841
|
+
title: title,
|
|
842
|
+
"aria-label": title,
|
|
843
|
+
onPointerDown: _temp1,
|
|
844
|
+
onClick: onClick,
|
|
845
|
+
className: t2,
|
|
846
|
+
children: children
|
|
847
|
+
});
|
|
848
|
+
$[3] = children;
|
|
849
|
+
$[4] = onClick;
|
|
850
|
+
$[5] = t2;
|
|
851
|
+
$[6] = title;
|
|
852
|
+
$[7] = t3;
|
|
853
|
+
} else {
|
|
854
|
+
t3 = $[7];
|
|
855
|
+
}
|
|
856
|
+
return t3;
|
|
857
|
+
}
|
|
858
|
+
function _temp1(e) {
|
|
859
|
+
return e.stopPropagation();
|
|
860
|
+
}
|
|
861
|
+
//# sourceMappingURL=outline-panel.js.map
|