@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NETNODE AG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# @nodehive/nextjs
|
|
2
|
+
|
|
3
|
+
NodeHive integration for Next.js (App Router): auth, a Puck editing surface, a
|
|
4
|
+
Drupal visual editor overlay, and a floating smart-actions toolbar, exposed as
|
|
5
|
+
subpath exports on top of the framework-neutral [`nodehive-js`](https://www.npmjs.com/package/nodehive-js)
|
|
6
|
+
SDK.
|
|
7
|
+
|
|
8
|
+
ESM-only. Requires **React 19** and **Next 16** (App Router). The published
|
|
9
|
+
`dist/` is precompiled with the React Compiler, so consumers get memoized
|
|
10
|
+
components without configuring the compiler themselves.
|
|
11
|
+
|
|
12
|
+
SemVer, versioned as a whole (one release train for all modules). While the API
|
|
13
|
+
settles the package stays on `0.x`.
|
|
14
|
+
|
|
15
|
+
## Modules
|
|
16
|
+
|
|
17
|
+
Deep imports resolve through the exports map; `internal/` and `shared/` are not
|
|
18
|
+
exported.
|
|
19
|
+
|
|
20
|
+
| Module | Imports | Purpose |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| auth | `@nodehive/nextjs/auth`, `/auth/server`, `/auth/react`, `/auth/routes`, `/auth/proxy` | OAuth login (authorization code + PKCE), session, client factories |
|
|
23
|
+
| puck-editor | `@nodehive/nextjs/puck-editor`, `/puck-editor/server`, `/puck-editor/fields`, `/puck-editor/render`, `/puck-editor/smart-actions`, `/puck-editor/puck-theme.css` | Puck editing surface |
|
|
24
|
+
| visual-editor | `@nodehive/nextjs/visual-editor`, `/visual-editor/server` | Drupal-iframe overlays + bridge |
|
|
25
|
+
| smart-actions | `@nodehive/nextjs/smart-actions/server` | Floating editor toolbar (server entry) |
|
|
26
|
+
| theme | `@nodehive/nextjs/theme.css` | Shared `--nh-editor-*` theming contract |
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install @nodehive/nextjs
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Required peers: `react` (^19), `next` (^16), `nodehive-js`. The editor-heavy
|
|
35
|
+
peers (`@puckeditor/core`, `@tiptap/core`, `@tiptap/pm`, `@tiptap/react`,
|
|
36
|
+
`@tanstack/react-query`, `motion`, `sonner`) are optional and only needed if you
|
|
37
|
+
use the puck-editor, visual-editor or smart-actions modules.
|
|
38
|
+
|
|
39
|
+
## Styling
|
|
40
|
+
|
|
41
|
+
Import the compiled theme once (e.g. in your root layout):
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import '@nodehive/nextjs/theme.css';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The Puck canvas additionally uses `@nodehive/nextjs/puck-editor/puck-theme.css`.
|
|
48
|
+
Both are precompiled (Tailwind, no preflight, the host app owns base styles), so
|
|
49
|
+
the `--nh-editor-*` contract works without a Tailwind setup on the consumer side.
|
|
50
|
+
|
|
51
|
+
## Environment
|
|
52
|
+
|
|
53
|
+
The `auth` module reads all secrets from the runtime environment; nothing is
|
|
54
|
+
baked into the build.
|
|
55
|
+
|
|
56
|
+
| Variable | Required | Purpose |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `NEXT_PUBLIC_DRUPAL_BASE_URL` | yes | Drupal/NodeHive OAuth issuer base URL |
|
|
59
|
+
| `NEXT_PUBLIC_DRUPAL_REST_BASE_URL` | yes | JSON:API / REST base URL |
|
|
60
|
+
| `NEXT_PUBLIC_NODEHIVE_SPACE_NAME` | yes | NodeHive space identifier |
|
|
61
|
+
| `NODEHIVE_OAUTH_USER_CLIENT_ID` | yes | OAuth client id (authorization code + PKCE) |
|
|
62
|
+
| `NODEHIVE_OAUTH_USER_CLIENT_SECRET` | yes | OAuth client secret |
|
|
63
|
+
| `NODEHIVE_OAUTH_ANON_CLIENT_ID` | for anon fetches | Client credentials id |
|
|
64
|
+
| `NODEHIVE_OAUTH_ANON_CLIENT_SECRET` | for anon fetches | Client credentials secret |
|
|
65
|
+
| `NODEHIVE_HANDOFF_SECRET` | for the CHIPS editor handoff | AES-256-GCM key seed, e.g. `openssl rand -base64 32` |
|
|
66
|
+
| `NODEHIVE_DEBUG` | no | Verbose client logging |
|
|
67
|
+
|
|
68
|
+
Keep every secret server-side. `NEXT_PUBLIC_*` values are exposed to the browser
|
|
69
|
+
by Next; the non-prefixed ones must never be.
|
|
70
|
+
|
|
71
|
+
## Architecture
|
|
72
|
+
|
|
73
|
+
- Website code imports the exported entries only. `internal/` and `shared/` are
|
|
74
|
+
not exported, so deep imports fail type resolution.
|
|
75
|
+
- Modules are layered: every module may import `shared/` (non-exported helpers)
|
|
76
|
+
and the public `auth` entries (the base layer, which imports no other module).
|
|
77
|
+
Module-to-module imports and imports into a sibling's `internal/` are
|
|
78
|
+
forbidden; independent modules are wired together by the consuming app (the
|
|
79
|
+
app passes puck-editor's smart actions into smart-actions).
|
|
80
|
+
- A module depends on `auth` where auth is part of its contract (visual-editor
|
|
81
|
+
gates overlays behind `SignedIn`, puck-editor protects its API routes) and
|
|
82
|
+
stays auth-agnostic where it is not (rendering).
|
|
83
|
+
- Editor-heavy dependencies are optional peers (via `peerDependenciesMeta`) so
|
|
84
|
+
auth-only consumers stay lean.
|
|
85
|
+
|
|
86
|
+
## Build (contributors)
|
|
87
|
+
|
|
88
|
+
`npm run build` produces `dist/`:
|
|
89
|
+
|
|
90
|
+
- **JS**: `tsc --emitDeclarationOnly` for `.d.ts`, then Babel for the JS emit.
|
|
91
|
+
Babel runs `babel-plugin-react-compiler` on `'use client'` modules (so the
|
|
92
|
+
shipped client components are memoized) and rewrites `.ts`/`.tsx` import
|
|
93
|
+
specifiers to `.js`. Server components are deliberately not compiled. The
|
|
94
|
+
compiled output imports `react/compiler-runtime`, which is built into React 19.
|
|
95
|
+
- **CSS**: Tailwind precompiles `css/theme.css` to `dist/theme.css`;
|
|
96
|
+
`src/puck-editor/puck-theme.css` is copied to `dist/puck-editor/`.
|
|
97
|
+
|
|
98
|
+
`dist/` is gitignored and rebuilt by the workspace on demand.
|
|
99
|
+
|
|
100
|
+
## Changelog
|
|
101
|
+
|
|
102
|
+
See the per-release entries generated by Changesets in `CHANGELOG.md`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NodeHiveAuthConfig } from './internal/config';
|
|
2
|
+
export type { NodeHiveAuthConfig };
|
|
3
|
+
export type { CallbackError } from './internal/routes/callback';
|
|
4
|
+
/** Identity helper for authoring a typed config object in the project. */
|
|
5
|
+
export declare function defineNodeHiveAuthConfig(config: NodeHiveAuthConfig): NodeHiveAuthConfig;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,YAAY,EAAE,kBAAkB,EAAE,CAAC;AACnC,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,0EAA0E;AAC1E,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,kBAAkB,GACzB,kBAAkB,CAEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["defineNodeHiveAuthConfig","config"],"sources":["../../src/auth/index.ts"],"sourcesContent":["// Root entry: config type + authoring helper (no runtime auth code).\nimport type { NodeHiveAuthConfig } from './internal/config';\n\nexport type { NodeHiveAuthConfig };\nexport type { CallbackError } from './internal/routes/callback';\n\n/** Identity helper for authoring a typed config object in the project. */\nexport function defineNodeHiveAuthConfig(\n config: NodeHiveAuthConfig\n): NodeHiveAuthConfig {\n return config;\n}\n"],"mappings":"AAAA;;AAMA;AACA,OAAO,SAASA,wBAAwBA,CACtCC,MAA0B,EACN;EACpB,OAAOA,MAAM;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { NodeHiveConfig } from 'nodehive-js';
|
|
2
|
+
/**
|
|
3
|
+
* Project-injected auth config. Passed explicitly into the factories and
|
|
4
|
+
* updateSession() — never a module-level singleton: middleware, Node routes and
|
|
5
|
+
* Server Components each load the module in a separate runtime instance, so a
|
|
6
|
+
* one-time global registration would be invisible to the others.
|
|
7
|
+
*/
|
|
8
|
+
export interface NodeHiveAuthConfig {
|
|
9
|
+
multilingual: boolean;
|
|
10
|
+
/** Prefixes the login-landing redirect on multilingual sites. */
|
|
11
|
+
defaultLocale: string;
|
|
12
|
+
jsonapiConfig?: NodeHiveConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Couple Next.js Draft Mode to the session (default true: logged in =
|
|
15
|
+
* editor). For apps with end-user logins set false — draft mode bypasses
|
|
16
|
+
* every cache layer — or restrict it to editorial Drupal roles:
|
|
17
|
+
* `{ roles: ['nodehive_content_editor', 'nodehive_content_administrator'] }`.
|
|
18
|
+
* Pass this config to EditorAuthGateServer too (draft self-heal trigger).
|
|
19
|
+
*/
|
|
20
|
+
draftModeOnLogin?: boolean | {
|
|
21
|
+
roles: string[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","names":[],"sources":["../../../src/auth/internal/config.ts"],"sourcesContent":["import type { NodeHiveConfig } from 'nodehive-js';\n\n/**\n * Project-injected auth config. Passed explicitly into the factories and\n * updateSession() — never a module-level singleton: middleware, Node routes and\n * Server Components each load the module in a separate runtime instance, so a\n * one-time global registration would be invisible to the others.\n */\nexport interface NodeHiveAuthConfig {\n multilingual: boolean;\n /** Prefixes the login-landing redirect on multilingual sites. */\n defaultLocale: string;\n jsonapiConfig?: NodeHiveConfig;\n /**\n * Couple Next.js Draft Mode to the session (default true: logged in =\n * editor). For apps with end-user logins set false — draft mode bypasses\n * every cache layer — or restrict it to editorial Drupal roles:\n * `{ roles: ['nodehive_content_editor', 'nodehive_content_administrator'] }`.\n * Pass this config to EditorAuthGateServer too (draft self-heal trigger).\n */\n draftModeOnLogin?: boolean | { roles: string[] };\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NodeHiveAuthConfig } from './config';
|
|
2
|
+
import { type ProxyContext } from './next-cookie-storage';
|
|
3
|
+
/** Next's draft-mode bypass cookie (name is fixed by Next, not configurable). */
|
|
4
|
+
export declare const DRAFT_MODE_COOKIE = "__prerender_bypass";
|
|
5
|
+
export declare function shouldEnableDraftMode(config: NodeHiveAuthConfig, proxyContext?: ProxyContext): Promise<boolean>;
|
|
6
|
+
export declare function persistentDraftCookieOptions(): {
|
|
7
|
+
httpOnly: boolean;
|
|
8
|
+
sameSite: "none";
|
|
9
|
+
secure: boolean;
|
|
10
|
+
partitioned: boolean;
|
|
11
|
+
path: string;
|
|
12
|
+
maxAge: number;
|
|
13
|
+
};
|
|
14
|
+
/** Route Handler / Server Action only — Next forbids toggling draft elsewhere. */
|
|
15
|
+
export declare function enablePersistentDraftMode(): Promise<void>;
|
|
16
|
+
export declare function disablePersistentDraftMode(): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=draft-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-mode.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/draft-mode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG7E,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAkBtD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,kBAAkB,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAID,wBAAgB,4BAA4B;;;;;;;EAS3C;AAED,kFAAkF;AAClF,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAc/D;AAGD,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAUhE"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cookies, draftMode } from 'next/headers';
|
|
2
|
+
import { NextCookieStorage } from './next-cookie-storage';
|
|
3
|
+
import { REFRESH_TOKEN_MAX_AGE } from './oauth-config';
|
|
4
|
+
|
|
5
|
+
/** Next's draft-mode bypass cookie (name is fixed by Next, not configurable). */
|
|
6
|
+
export const DRAFT_MODE_COOKIE = '__prerender_bypass';
|
|
7
|
+
|
|
8
|
+
// user_details is the Drupal core REST user entity: roles come as
|
|
9
|
+
// [{ target_id: 'editor' }]; plain string arrays are accepted too.
|
|
10
|
+
function extractRoles(userDetails) {
|
|
11
|
+
const roles = userDetails?.roles;
|
|
12
|
+
if (!Array.isArray(roles)) return [];
|
|
13
|
+
return roles.map(role => typeof role === 'string' ? role : role?.target_id).filter(id => typeof id === 'string');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Fails closed. Pass the proxy context where cookies were just written through
|
|
17
|
+
// it (refresh route), so the decision sees the fresh user_details.
|
|
18
|
+
export async function shouldEnableDraftMode(config, proxyContext) {
|
|
19
|
+
const option = config.draftModeOnLogin ?? true;
|
|
20
|
+
if (typeof option === 'boolean') return option;
|
|
21
|
+
const raw = await new NextCookieStorage(proxyContext).get('user_details');
|
|
22
|
+
if (!raw) return false;
|
|
23
|
+
let userDetails;
|
|
24
|
+
try {
|
|
25
|
+
userDetails = JSON.parse(raw);
|
|
26
|
+
} catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const userRoles = extractRoles(userDetails);
|
|
30
|
+
return option.roles.some(role => userRoles.includes(role));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Next's own bypass cookie is session-scoped, unpartitioned, SameSite=Lax —
|
|
34
|
+
// re-set persistent + partitioned to survive browser reopen and cross-site iframes.
|
|
35
|
+
export function persistentDraftCookieOptions() {
|
|
36
|
+
return {
|
|
37
|
+
httpOnly: true,
|
|
38
|
+
sameSite: 'none',
|
|
39
|
+
secure: true,
|
|
40
|
+
partitioned: true,
|
|
41
|
+
path: '/',
|
|
42
|
+
maxAge: REFRESH_TOKEN_MAX_AGE
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Route Handler / Server Action only — Next forbids toggling draft elsewhere. */
|
|
47
|
+
export async function enablePersistentDraftMode() {
|
|
48
|
+
(await draftMode()).enable();
|
|
49
|
+
|
|
50
|
+
// Re-setting the same name replaces Next's Set-Cookie (ResponseCookies is
|
|
51
|
+
// keyed by name), so a single cookie goes out.
|
|
52
|
+
const cookieStore = await cookies();
|
|
53
|
+
const bypass = cookieStore.get(DRAFT_MODE_COOKIE)?.value;
|
|
54
|
+
if (!bypass) return;
|
|
55
|
+
cookieStore.set({
|
|
56
|
+
name: DRAFT_MODE_COOKIE,
|
|
57
|
+
value: bypass,
|
|
58
|
+
...persistentDraftCookieOptions()
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Next's own deletion lacks the Partitioned attribute and would miss our cookie.
|
|
63
|
+
export async function disablePersistentDraftMode() {
|
|
64
|
+
(await draftMode()).disable();
|
|
65
|
+
const cookieStore = await cookies();
|
|
66
|
+
cookieStore.set({
|
|
67
|
+
name: DRAFT_MODE_COOKIE,
|
|
68
|
+
value: '',
|
|
69
|
+
...persistentDraftCookieOptions(),
|
|
70
|
+
maxAge: 0
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=draft-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-mode.js","names":["cookies","draftMode","NextCookieStorage","REFRESH_TOKEN_MAX_AGE","DRAFT_MODE_COOKIE","extractRoles","userDetails","roles","Array","isArray","map","role","target_id","filter","id","shouldEnableDraftMode","config","proxyContext","option","draftModeOnLogin","raw","get","JSON","parse","userRoles","some","includes","persistentDraftCookieOptions","httpOnly","sameSite","secure","partitioned","path","maxAge","enablePersistentDraftMode","enable","cookieStore","bypass","value","set","name","disablePersistentDraftMode","disable"],"sources":["../../../src/auth/internal/draft-mode.ts"],"sourcesContent":["import { cookies, draftMode } from 'next/headers';\n\nimport type { NodeHiveAuthConfig } from './config';\nimport { NextCookieStorage, type ProxyContext } from './next-cookie-storage';\nimport { REFRESH_TOKEN_MAX_AGE } from './oauth-config';\n\n/** Next's draft-mode bypass cookie (name is fixed by Next, not configurable). */\nexport const DRAFT_MODE_COOKIE = '__prerender_bypass';\n\n// user_details is the Drupal core REST user entity: roles come as\n// [{ target_id: 'editor' }]; plain string arrays are accepted too.\nfunction extractRoles(userDetails: unknown): string[] {\n const roles = (userDetails as { roles?: unknown } | null)?.roles;\n if (!Array.isArray(roles)) return [];\n return roles\n .map((role) =>\n typeof role === 'string'\n ? role\n : (role as { target_id?: unknown } | null)?.target_id\n )\n .filter((id): id is string => typeof id === 'string');\n}\n\n// Fails closed. Pass the proxy context where cookies were just written through\n// it (refresh route), so the decision sees the fresh user_details.\nexport async function shouldEnableDraftMode(\n config: NodeHiveAuthConfig,\n proxyContext?: ProxyContext\n): Promise<boolean> {\n const option = config.draftModeOnLogin ?? true;\n if (typeof option === 'boolean') return option;\n\n const raw = await new NextCookieStorage(proxyContext).get('user_details');\n if (!raw) return false;\n\n let userDetails: unknown;\n try {\n userDetails = JSON.parse(raw);\n } catch {\n return false;\n }\n\n const userRoles = extractRoles(userDetails);\n return option.roles.some((role) => userRoles.includes(role));\n}\n\n// Next's own bypass cookie is session-scoped, unpartitioned, SameSite=Lax —\n// re-set persistent + partitioned to survive browser reopen and cross-site iframes.\nexport function persistentDraftCookieOptions() {\n return {\n httpOnly: true,\n sameSite: 'none' as const,\n secure: true,\n partitioned: true,\n path: '/',\n maxAge: REFRESH_TOKEN_MAX_AGE,\n };\n}\n\n/** Route Handler / Server Action only — Next forbids toggling draft elsewhere. */\nexport async function enablePersistentDraftMode(): Promise<void> {\n (await draftMode()).enable();\n\n // Re-setting the same name replaces Next's Set-Cookie (ResponseCookies is\n // keyed by name), so a single cookie goes out.\n const cookieStore = await cookies();\n const bypass = cookieStore.get(DRAFT_MODE_COOKIE)?.value;\n if (!bypass) return;\n\n cookieStore.set({\n name: DRAFT_MODE_COOKIE,\n value: bypass,\n ...persistentDraftCookieOptions(),\n });\n}\n\n// Next's own deletion lacks the Partitioned attribute and would miss our cookie.\nexport async function disablePersistentDraftMode(): Promise<void> {\n (await draftMode()).disable();\n\n const cookieStore = await cookies();\n cookieStore.set({\n name: DRAFT_MODE_COOKIE,\n value: '',\n ...persistentDraftCookieOptions(),\n maxAge: 0,\n });\n}\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,SAAS,QAAQ,cAAc;AAGjD,SAASC,iBAAiB,QAA2B,uBAAuB;AAC5E,SAASC,qBAAqB,QAAQ,gBAAgB;;AAEtD;AACA,OAAO,MAAMC,iBAAiB,GAAG,oBAAoB;;AAErD;AACA;AACA,SAASC,YAAYA,CAACC,WAAoB,EAAY;EACpD,MAAMC,KAAK,GAAID,WAAW,EAAiCC,KAAK;EAChE,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE,OAAO,EAAE;EACpC,OAAOA,KAAK,CACTG,GAAG,CAAEC,IAAI,IACR,OAAOA,IAAI,KAAK,QAAQ,GACpBA,IAAI,GACHA,IAAI,EAAqCC,SAChD,CAAC,CACAC,MAAM,CAAEC,EAAE,IAAmB,OAAOA,EAAE,KAAK,QAAQ,CAAC;AACzD;;AAEA;AACA;AACA,OAAO,eAAeC,qBAAqBA,CACzCC,MAA0B,EAC1BC,YAA2B,EACT;EAClB,MAAMC,MAAM,GAAGF,MAAM,CAACG,gBAAgB,IAAI,IAAI;EAC9C,IAAI,OAAOD,MAAM,KAAK,SAAS,EAAE,OAAOA,MAAM;EAE9C,MAAME,GAAG,GAAG,MAAM,IAAIlB,iBAAiB,CAACe,YAAY,CAAC,CAACI,GAAG,CAAC,cAAc,CAAC;EACzE,IAAI,CAACD,GAAG,EAAE,OAAO,KAAK;EAEtB,IAAId,WAAoB;EACxB,IAAI;IACFA,WAAW,GAAGgB,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;EAC/B,CAAC,CAAC,MAAM;IACN,OAAO,KAAK;EACd;EAEA,MAAMI,SAAS,GAAGnB,YAAY,CAACC,WAAW,CAAC;EAC3C,OAAOY,MAAM,CAACX,KAAK,CAACkB,IAAI,CAAEd,IAAI,IAAKa,SAAS,CAACE,QAAQ,CAACf,IAAI,CAAC,CAAC;AAC9D;;AAEA;AACA;AACA,OAAO,SAASgB,4BAA4BA,CAAA,EAAG;EAC7C,OAAO;IACLC,QAAQ,EAAE,IAAI;IACdC,QAAQ,EAAE,MAAe;IACzBC,MAAM,EAAE,IAAI;IACZC,WAAW,EAAE,IAAI;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE9B;EACV,CAAC;AACH;;AAEA;AACA,OAAO,eAAe+B,yBAAyBA,CAAA,EAAkB;EAC/D,CAAC,MAAMjC,SAAS,CAAC,CAAC,EAAEkC,MAAM,CAAC,CAAC;;EAE5B;EACA;EACA,MAAMC,WAAW,GAAG,MAAMpC,OAAO,CAAC,CAAC;EACnC,MAAMqC,MAAM,GAAGD,WAAW,CAACf,GAAG,CAACjB,iBAAiB,CAAC,EAAEkC,KAAK;EACxD,IAAI,CAACD,MAAM,EAAE;EAEbD,WAAW,CAACG,GAAG,CAAC;IACdC,IAAI,EAAEpC,iBAAiB;IACvBkC,KAAK,EAAED,MAAM;IACb,GAAGV,4BAA4B,CAAC;EAClC,CAAC,CAAC;AACJ;;AAEA;AACA,OAAO,eAAec,0BAA0BA,CAAA,EAAkB;EAChE,CAAC,MAAMxC,SAAS,CAAC,CAAC,EAAEyC,OAAO,CAAC,CAAC;EAE7B,MAAMN,WAAW,GAAG,MAAMpC,OAAO,CAAC,CAAC;EACnCoC,WAAW,CAACG,GAAG,CAAC;IACdC,IAAI,EAAEpC,iBAAiB;IACvBkC,KAAK,EAAE,EAAE;IACT,GAAGX,4BAA4B,CAAC,CAAC;IACjCM,MAAM,EAAE;EACV,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeHiveClient } from 'nodehive-js';
|
|
2
|
+
export declare function resolveEditorLocale(userDetails: unknown, fallback: string): string;
|
|
3
|
+
export declare function getEditorLocale(client: NodeHiveClient, pageLocale: string): Promise<string>;
|
|
4
|
+
//# sourceMappingURL=editor-locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-locale.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/editor-locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AASlD,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,MAAM,GACf,MAAM,CAQR;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAOjB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function resolveEditorLocale(userDetails, fallback) {
|
|
2
|
+
if (!userDetails || typeof userDetails !== 'object') return fallback;
|
|
3
|
+
const user = userDetails;
|
|
4
|
+
return user.preferred_admin_langcode?.[0]?.value || user.preferred_langcode?.[0]?.value || fallback;
|
|
5
|
+
}
|
|
6
|
+
export async function getEditorLocale(client, pageLocale) {
|
|
7
|
+
try {
|
|
8
|
+
const userDetails = await client.auth.getUserDetails();
|
|
9
|
+
return resolveEditorLocale(userDetails, pageLocale);
|
|
10
|
+
} catch {
|
|
11
|
+
return pageLocale;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=editor-locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-locale.js","names":["resolveEditorLocale","userDetails","fallback","user","preferred_admin_langcode","value","preferred_langcode","getEditorLocale","client","pageLocale","auth","getUserDetails"],"sources":["../../../src/auth/internal/editor-locale.ts"],"sourcesContent":["import type { NodeHiveClient } from 'nodehive-js';\n\ntype LangcodeField = { value?: string }[] | null | undefined;\n\ntype UserDetails = {\n preferred_admin_langcode?: LangcodeField;\n preferred_langcode?: LangcodeField;\n};\n\nexport function resolveEditorLocale(\n userDetails: unknown,\n fallback: string\n): string {\n if (!userDetails || typeof userDetails !== 'object') return fallback;\n const user = userDetails as UserDetails;\n return (\n user.preferred_admin_langcode?.[0]?.value ||\n user.preferred_langcode?.[0]?.value ||\n fallback\n );\n}\n\nexport async function getEditorLocale(\n client: NodeHiveClient,\n pageLocale: string\n): Promise<string> {\n try {\n const userDetails = await client.auth.getUserDetails();\n return resolveEditorLocale(userDetails, pageLocale);\n } catch {\n return pageLocale;\n }\n}\n"],"mappings":"AASA,OAAO,SAASA,mBAAmBA,CACjCC,WAAoB,EACpBC,QAAgB,EACR;EACR,IAAI,CAACD,WAAW,IAAI,OAAOA,WAAW,KAAK,QAAQ,EAAE,OAAOC,QAAQ;EACpE,MAAMC,IAAI,GAAGF,WAA0B;EACvC,OACEE,IAAI,CAACC,wBAAwB,GAAG,CAAC,CAAC,EAAEC,KAAK,IACzCF,IAAI,CAACG,kBAAkB,GAAG,CAAC,CAAC,EAAED,KAAK,IACnCH,QAAQ;AAEZ;AAEA,OAAO,eAAeK,eAAeA,CACnCC,MAAsB,EACtBC,UAAkB,EACD;EACjB,IAAI;IACF,MAAMR,WAAW,GAAG,MAAMO,MAAM,CAACE,IAAI,CAACC,cAAc,CAAC,CAAC;IACtD,OAAOX,mBAAmB,CAACC,WAAW,EAAEQ,UAAU,CAAC;EACrD,CAAC,CAAC,MAAM;IACN,OAAOA,UAAU;EACnB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface HandoffPayload {
|
|
2
|
+
token: string;
|
|
3
|
+
refresh_token: string;
|
|
4
|
+
token_expires_at?: string;
|
|
5
|
+
user_details?: string;
|
|
6
|
+
/** Absolute expiry timestamp (ms). */
|
|
7
|
+
exp: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function encryptHandoff(payload: Omit<HandoffPayload, 'exp'>): string;
|
|
10
|
+
export declare function decryptHandoff(blob: string): HandoffPayload | null;
|
|
11
|
+
//# sourceMappingURL=handoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/handoff.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;CACb;AAWD,wBAAgB,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,MAAM,CAU3E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAuBlE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
// Encrypted, short-lived handoff for the CHIPS editor login: the popup hands the
|
|
4
|
+
// session tokens to the iframe (as opaque ciphertext) so the iframe can re-set
|
|
5
|
+
// them partitioned in its own partition. AES-256-GCM, ~30 s TTL (the popup relays
|
|
6
|
+
// it to the iframe immediately, so the window only needs to cover the redirect).
|
|
7
|
+
|
|
8
|
+
const ALGO = 'aes-256-gcm';
|
|
9
|
+
const TTL_MS = 30_000;
|
|
10
|
+
function key() {
|
|
11
|
+
const secret = process.env.NODEHIVE_HANDOFF_SECRET;
|
|
12
|
+
if (!secret) {
|
|
13
|
+
throw new Error('NODEHIVE_HANDOFF_SECRET is not set');
|
|
14
|
+
}
|
|
15
|
+
// Derive a stable 32-byte key from any-length secret.
|
|
16
|
+
return crypto.createHash('sha256').update(secret).digest();
|
|
17
|
+
}
|
|
18
|
+
export function encryptHandoff(payload) {
|
|
19
|
+
const iv = crypto.randomBytes(12);
|
|
20
|
+
const cipher = crypto.createCipheriv(ALGO, key(), iv);
|
|
21
|
+
const data = {
|
|
22
|
+
...payload,
|
|
23
|
+
exp: Date.now() + TTL_MS
|
|
24
|
+
};
|
|
25
|
+
const enc = Buffer.concat([cipher.update(JSON.stringify(data), 'utf8'), cipher.final()]);
|
|
26
|
+
const tag = cipher.getAuthTag();
|
|
27
|
+
return [iv, enc, tag].map(b => b.toString('base64url')).join('.');
|
|
28
|
+
}
|
|
29
|
+
export function decryptHandoff(blob) {
|
|
30
|
+
try {
|
|
31
|
+
const [ivB, encB, tagB] = blob.split('.');
|
|
32
|
+
if (!ivB || !encB || !tagB) return null;
|
|
33
|
+
const decipher = crypto.createDecipheriv(ALGO, key(), Buffer.from(ivB, 'base64url'));
|
|
34
|
+
decipher.setAuthTag(Buffer.from(tagB, 'base64url'));
|
|
35
|
+
const dec = Buffer.concat([decipher.update(Buffer.from(encB, 'base64url')), decipher.final()]);
|
|
36
|
+
const data = JSON.parse(dec.toString('utf8'));
|
|
37
|
+
if (typeof data.exp !== 'number' || data.exp < Date.now()) return null;
|
|
38
|
+
if (!data.token || !data.refresh_token) return null;
|
|
39
|
+
return data;
|
|
40
|
+
} catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=handoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.js","names":["crypto","ALGO","TTL_MS","key","secret","process","env","NODEHIVE_HANDOFF_SECRET","Error","createHash","update","digest","encryptHandoff","payload","iv","randomBytes","cipher","createCipheriv","data","exp","Date","now","enc","Buffer","concat","JSON","stringify","final","tag","getAuthTag","map","b","toString","join","decryptHandoff","blob","ivB","encB","tagB","split","decipher","createDecipheriv","from","setAuthTag","dec","parse","token","refresh_token"],"sources":["../../../src/auth/internal/handoff.ts"],"sourcesContent":["import crypto from 'node:crypto';\n\n// Encrypted, short-lived handoff for the CHIPS editor login: the popup hands the\n// session tokens to the iframe (as opaque ciphertext) so the iframe can re-set\n// them partitioned in its own partition. AES-256-GCM, ~30 s TTL (the popup relays\n// it to the iframe immediately, so the window only needs to cover the redirect).\n\nconst ALGO = 'aes-256-gcm';\nconst TTL_MS = 30_000;\n\nexport interface HandoffPayload {\n token: string;\n refresh_token: string;\n token_expires_at?: string;\n user_details?: string;\n /** Absolute expiry timestamp (ms). */\n exp: number;\n}\n\nfunction key(): Buffer {\n const secret = process.env.NODEHIVE_HANDOFF_SECRET;\n if (!secret) {\n throw new Error('NODEHIVE_HANDOFF_SECRET is not set');\n }\n // Derive a stable 32-byte key from any-length secret.\n return crypto.createHash('sha256').update(secret).digest();\n}\n\nexport function encryptHandoff(payload: Omit<HandoffPayload, 'exp'>): string {\n const iv = crypto.randomBytes(12);\n const cipher = crypto.createCipheriv(ALGO, key(), iv);\n const data: HandoffPayload = { ...payload, exp: Date.now() + TTL_MS };\n const enc = Buffer.concat([\n cipher.update(JSON.stringify(data), 'utf8'),\n cipher.final(),\n ]);\n const tag = cipher.getAuthTag();\n return [iv, enc, tag].map((b) => b.toString('base64url')).join('.');\n}\n\nexport function decryptHandoff(blob: string): HandoffPayload | null {\n try {\n const [ivB, encB, tagB] = blob.split('.');\n if (!ivB || !encB || !tagB) return null;\n\n const decipher = crypto.createDecipheriv(\n ALGO,\n key(),\n Buffer.from(ivB, 'base64url')\n );\n decipher.setAuthTag(Buffer.from(tagB, 'base64url'));\n const dec = Buffer.concat([\n decipher.update(Buffer.from(encB, 'base64url')),\n decipher.final(),\n ]);\n\n const data = JSON.parse(dec.toString('utf8')) as HandoffPayload;\n if (typeof data.exp !== 'number' || data.exp < Date.now()) return null;\n if (!data.token || !data.refresh_token) return null;\n return data;\n } catch {\n return null;\n }\n}\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,aAAa;;AAEhC;AACA;AACA;AACA;;AAEA,MAAMC,IAAI,GAAG,aAAa;AAC1B,MAAMC,MAAM,GAAG,MAAM;AAWrB,SAASC,GAAGA,CAAA,EAAW;EACrB,MAAMC,MAAM,GAAGC,OAAO,CAACC,GAAG,CAACC,uBAAuB;EAClD,IAAI,CAACH,MAAM,EAAE;IACX,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EACA;EACA,OAAOR,MAAM,CAACS,UAAU,CAAC,QAAQ,CAAC,CAACC,MAAM,CAACN,MAAM,CAAC,CAACO,MAAM,CAAC,CAAC;AAC5D;AAEA,OAAO,SAASC,cAAcA,CAACC,OAAoC,EAAU;EAC3E,MAAMC,EAAE,GAAGd,MAAM,CAACe,WAAW,CAAC,EAAE,CAAC;EACjC,MAAMC,MAAM,GAAGhB,MAAM,CAACiB,cAAc,CAAChB,IAAI,EAAEE,GAAG,CAAC,CAAC,EAAEW,EAAE,CAAC;EACrD,MAAMI,IAAoB,GAAG;IAAE,GAAGL,OAAO;IAAEM,GAAG,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGnB;EAAO,CAAC;EACrE,MAAMoB,GAAG,GAAGC,MAAM,CAACC,MAAM,CAAC,CACxBR,MAAM,CAACN,MAAM,CAACe,IAAI,CAACC,SAAS,CAACR,IAAI,CAAC,EAAE,MAAM,CAAC,EAC3CF,MAAM,CAACW,KAAK,CAAC,CAAC,CACf,CAAC;EACF,MAAMC,GAAG,GAAGZ,MAAM,CAACa,UAAU,CAAC,CAAC;EAC/B,OAAO,CAACf,EAAE,EAAEQ,GAAG,EAAEM,GAAG,CAAC,CAACE,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;AACrE;AAEA,OAAO,SAASC,cAAcA,CAACC,IAAY,EAAyB;EAClE,IAAI;IACF,MAAM,CAACC,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC,GAAGH,IAAI,CAACI,KAAK,CAAC,GAAG,CAAC;IACzC,IAAI,CAACH,GAAG,IAAI,CAACC,IAAI,IAAI,CAACC,IAAI,EAAE,OAAO,IAAI;IAEvC,MAAME,QAAQ,GAAGxC,MAAM,CAACyC,gBAAgB,CACtCxC,IAAI,EACJE,GAAG,CAAC,CAAC,EACLoB,MAAM,CAACmB,IAAI,CAACN,GAAG,EAAE,WAAW,CAC9B,CAAC;IACDI,QAAQ,CAACG,UAAU,CAACpB,MAAM,CAACmB,IAAI,CAACJ,IAAI,EAAE,WAAW,CAAC,CAAC;IACnD,MAAMM,GAAG,GAAGrB,MAAM,CAACC,MAAM,CAAC,CACxBgB,QAAQ,CAAC9B,MAAM,CAACa,MAAM,CAACmB,IAAI,CAACL,IAAI,EAAE,WAAW,CAAC,CAAC,EAC/CG,QAAQ,CAACb,KAAK,CAAC,CAAC,CACjB,CAAC;IAEF,MAAMT,IAAI,GAAGO,IAAI,CAACoB,KAAK,CAACD,GAAG,CAACZ,QAAQ,CAAC,MAAM,CAAC,CAAmB;IAC/D,IAAI,OAAOd,IAAI,CAACC,GAAG,KAAK,QAAQ,IAAID,IAAI,CAACC,GAAG,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAE,OAAO,IAAI;IACtE,IAAI,CAACH,IAAI,CAAC4B,KAAK,IAAI,CAAC5B,IAAI,CAAC6B,aAAa,EAAE,OAAO,IAAI;IACnD,OAAO7B,IAAI;EACb,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routing hint for the cached/fresh data-loader branch, not a security
|
|
3
|
+
* boundary: Drupal authorizes every fetch by the actual token. Checks the
|
|
4
|
+
* refresh-token cookie, the same durable login proof requireAuth uses.
|
|
5
|
+
*/
|
|
6
|
+
export declare function checkHasSession(): Promise<boolean>;
|
|
7
|
+
//# sourceMappingURL=has-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-session.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/has-session.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAExD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NextCookieStorage } from './next-cookie-storage';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Routing hint for the cached/fresh data-loader branch, not a security
|
|
5
|
+
* boundary: Drupal authorizes every fetch by the actual token. Checks the
|
|
6
|
+
* refresh-token cookie, the same durable login proof requireAuth uses.
|
|
7
|
+
*/
|
|
8
|
+
export async function checkHasSession() {
|
|
9
|
+
return !!(await new NextCookieStorage().get('refresh_token'));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=has-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-session.js","names":["NextCookieStorage","checkHasSession","get"],"sources":["../../../src/auth/internal/has-session.ts"],"sourcesContent":["import { NextCookieStorage } from './next-cookie-storage';\n\n/**\n * Routing hint for the cached/fresh data-loader branch, not a security\n * boundary: Drupal authorizes every fetch by the actual token. Checks the\n * refresh-token cookie, the same durable login proof requireAuth uses.\n */\nexport async function checkHasSession(): Promise<boolean> {\n return !!(await new NextCookieStorage().get('refresh_token'));\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uBAAuB;;AAEzD;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,eAAeA,CAAA,EAAqB;EACxD,OAAO,CAAC,EAAE,MAAM,IAAID,iBAAiB,CAAC,CAAC,CAACE,GAAG,CAAC,eAAe,CAAC,CAAC;AAC/D","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NodeHiveAuthConfig } from './config';
|
|
2
|
+
export interface PerformLogoutOptions {
|
|
3
|
+
/** Where to send the user after logout. Defaults to '/'. */
|
|
4
|
+
redirectTo?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Meant to be wrapped by a project Server Action (not a Route Handler) so Next's
|
|
8
|
+
* built-in CSRF protection (Same-Origin + Action-ID) applies. The Drupal admin
|
|
9
|
+
* session is intentionally left untouched.
|
|
10
|
+
*/
|
|
11
|
+
export declare function performLogout(config: NodeHiveAuthConfig, options?: PerformLogoutOptions): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/logout.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKnD,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAyCf"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { revalidatePath } from 'next/cache';
|
|
2
|
+
import { redirect } from 'next/navigation';
|
|
3
|
+
import { disablePersistentDraftMode } from './draft-mode';
|
|
4
|
+
import { buildUserClient } from './nodehive-client';
|
|
5
|
+
import { getClientId, getClientSecret, getRevokeUrl } from './oauth-config';
|
|
6
|
+
/**
|
|
7
|
+
* Meant to be wrapped by a project Server Action (not a Route Handler) so Next's
|
|
8
|
+
* built-in CSRF protection (Same-Origin + Action-ID) applies. The Drupal admin
|
|
9
|
+
* session is intentionally left untouched.
|
|
10
|
+
*/
|
|
11
|
+
export async function performLogout(config, options) {
|
|
12
|
+
const client = buildUserClient(config);
|
|
13
|
+
const refreshToken = await client.auth.getRefreshToken();
|
|
14
|
+
|
|
15
|
+
// Best-effort revoke so a leaked refresh token dies now, not after its 30-day
|
|
16
|
+
// TTL (also invalidates the bound access tokens). Never blocks logout.
|
|
17
|
+
if (refreshToken) {
|
|
18
|
+
try {
|
|
19
|
+
const basicAuth = Buffer.from(`${getClientId()}:${getClientSecret()}`).toString('base64');
|
|
20
|
+
await fetch(getRevokeUrl(), {
|
|
21
|
+
method: 'POST',
|
|
22
|
+
headers: {
|
|
23
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
24
|
+
Authorization: `Basic ${basicAuth}`
|
|
25
|
+
},
|
|
26
|
+
body: new URLSearchParams({
|
|
27
|
+
token: refreshToken,
|
|
28
|
+
token_type_hint: 'refresh_token'
|
|
29
|
+
}).toString(),
|
|
30
|
+
// A slow/hung Drupal must not freeze logout; cookies still clear below.
|
|
31
|
+
signal: AbortSignal.timeout(2500)
|
|
32
|
+
});
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.warn('[Logout] token revocation failed (best-effort)', error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
await client.auth.logout();
|
|
38
|
+
|
|
39
|
+
// Unconditional (ignores draftModeOnLogin): a lingering draft cookie from an
|
|
40
|
+
// earlier config must never survive a logout.
|
|
41
|
+
await disablePersistentDraftMode();
|
|
42
|
+
|
|
43
|
+
// Drop cached authed chrome (footer, account links, smart-actions) so it
|
|
44
|
+
// doesn't linger on cached/back-navigated routes; redirect() alone won't.
|
|
45
|
+
revalidatePath('/', 'layout');
|
|
46
|
+
redirect(options?.redirectTo ?? '/');
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=logout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.js","names":["revalidatePath","redirect","disablePersistentDraftMode","buildUserClient","getClientId","getClientSecret","getRevokeUrl","performLogout","config","options","client","refreshToken","auth","getRefreshToken","basicAuth","Buffer","from","toString","fetch","method","headers","Authorization","body","URLSearchParams","token","token_type_hint","signal","AbortSignal","timeout","error","console","warn","logout","redirectTo"],"sources":["../../../src/auth/internal/logout.ts"],"sourcesContent":["import { revalidatePath } from 'next/cache';\nimport { redirect } from 'next/navigation';\n\nimport type { NodeHiveAuthConfig } from './config';\nimport { disablePersistentDraftMode } from './draft-mode';\nimport { buildUserClient } from './nodehive-client';\nimport { getClientId, getClientSecret, getRevokeUrl } from './oauth-config';\n\nexport interface PerformLogoutOptions {\n /** Where to send the user after logout. Defaults to '/'. */\n redirectTo?: string;\n}\n\n/**\n * Meant to be wrapped by a project Server Action (not a Route Handler) so Next's\n * built-in CSRF protection (Same-Origin + Action-ID) applies. The Drupal admin\n * session is intentionally left untouched.\n */\nexport async function performLogout(\n config: NodeHiveAuthConfig,\n options?: PerformLogoutOptions\n): Promise<void> {\n const client = buildUserClient(config);\n const refreshToken = await client.auth.getRefreshToken();\n\n // Best-effort revoke so a leaked refresh token dies now, not after its 30-day\n // TTL (also invalidates the bound access tokens). Never blocks logout.\n if (refreshToken) {\n try {\n const basicAuth = Buffer.from(\n `${getClientId()}:${getClientSecret()}`\n ).toString('base64');\n\n await fetch(getRevokeUrl(), {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Authorization: `Basic ${basicAuth}`,\n },\n body: new URLSearchParams({\n token: refreshToken,\n token_type_hint: 'refresh_token',\n }).toString(),\n // A slow/hung Drupal must not freeze logout; cookies still clear below.\n signal: AbortSignal.timeout(2500),\n });\n } catch (error) {\n console.warn('[Logout] token revocation failed (best-effort)', error);\n }\n }\n\n await client.auth.logout();\n\n // Unconditional (ignores draftModeOnLogin): a lingering draft cookie from an\n // earlier config must never survive a logout.\n await disablePersistentDraftMode();\n\n // Drop cached authed chrome (footer, account links, smart-actions) so it\n // doesn't linger on cached/back-navigated routes; redirect() alone won't.\n revalidatePath('/', 'layout');\n\n redirect(options?.redirectTo ?? '/');\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,YAAY;AAC3C,SAASC,QAAQ,QAAQ,iBAAiB;AAG1C,SAASC,0BAA0B,QAAQ,cAAc;AACzD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,WAAW,EAAEC,eAAe,EAAEC,YAAY,QAAQ,gBAAgB;AAO3E;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,aAAaA,CACjCC,MAA0B,EAC1BC,OAA8B,EACf;EACf,MAAMC,MAAM,GAAGP,eAAe,CAACK,MAAM,CAAC;EACtC,MAAMG,YAAY,GAAG,MAAMD,MAAM,CAACE,IAAI,CAACC,eAAe,CAAC,CAAC;;EAExD;EACA;EACA,IAAIF,YAAY,EAAE;IAChB,IAAI;MACF,MAAMG,SAAS,GAAGC,MAAM,CAACC,IAAI,CAC3B,GAAGZ,WAAW,CAAC,CAAC,IAAIC,eAAe,CAAC,CAAC,EACvC,CAAC,CAACY,QAAQ,CAAC,QAAQ,CAAC;MAEpB,MAAMC,KAAK,CAACZ,YAAY,CAAC,CAAC,EAAE;QAC1Ba,MAAM,EAAE,MAAM;QACdC,OAAO,EAAE;UACP,cAAc,EAAE,mCAAmC;UACnDC,aAAa,EAAE,SAASP,SAAS;QACnC,CAAC;QACDQ,IAAI,EAAE,IAAIC,eAAe,CAAC;UACxBC,KAAK,EAAEb,YAAY;UACnBc,eAAe,EAAE;QACnB,CAAC,CAAC,CAACR,QAAQ,CAAC,CAAC;QACb;QACAS,MAAM,EAAEC,WAAW,CAACC,OAAO,CAAC,IAAI;MAClC,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOC,KAAK,EAAE;MACdC,OAAO,CAACC,IAAI,CAAC,gDAAgD,EAAEF,KAAK,CAAC;IACvE;EACF;EAEA,MAAMnB,MAAM,CAACE,IAAI,CAACoB,MAAM,CAAC,CAAC;;EAE1B;EACA;EACA,MAAM9B,0BAA0B,CAAC,CAAC;;EAElC;EACA;EACAF,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC;EAE7BC,QAAQ,CAACQ,OAAO,EAAEwB,UAAU,IAAI,GAAG,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
import type { CookieOptions, StorageAdapter } from 'nodehive-js';
|
|
3
|
+
type CookieKey = 'token' | 'refresh_token' | 'user_details' | 'token_expires_at' | 'oauth_state' | 'pkce_verifier' | 'return_to' | 'redirect_uri';
|
|
4
|
+
type CookieKeyMap = Record<CookieKey, string>;
|
|
5
|
+
export interface ProxyContext {
|
|
6
|
+
request: NextRequest;
|
|
7
|
+
response: NextResponse;
|
|
8
|
+
}
|
|
9
|
+
export declare const BASE_COOKIE_OPTIONS: {
|
|
10
|
+
httpOnly: boolean;
|
|
11
|
+
sameSite: "none";
|
|
12
|
+
secure: boolean;
|
|
13
|
+
partitioned: boolean;
|
|
14
|
+
path: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function appendClearedAuthCookie(response: NextResponse, name: string): void;
|
|
17
|
+
export declare class NextCookieStorage implements StorageAdapter {
|
|
18
|
+
private request?;
|
|
19
|
+
private response?;
|
|
20
|
+
constructor(proxyContext?: ProxyContext);
|
|
21
|
+
static cookieKeys(): CookieKeyMap;
|
|
22
|
+
private resolveKey;
|
|
23
|
+
get(key: string): Promise<string | null>;
|
|
24
|
+
set(key: string, value: string, options?: CookieOptions): Promise<void>;
|
|
25
|
+
remove(key: string): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=next-cookie-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-cookie-storage.d.ts","sourceRoot":"","sources":["../../../src/auth/internal/next-cookie-storage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,KAAK,SAAS,GACV,OAAO,GACP,eAAe,GACf,cAAc,GACd,kBAAkB,GAElB,aAAa,GACb,eAAe,GACf,WAAW,GACX,cAAc,CAAC;AAEnB,KAAK,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAKD,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAQF,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,MAAM,GACX,IAAI,CASN;AAED,qBAAa,iBAAkB,YAAW,cAAc;IACtD,OAAO,CAAC,OAAO,CAAC,CAAc;IAC9B,OAAO,CAAC,QAAQ,CAAC,CAAe;gBAEpB,YAAY,CAAC,EAAE,YAAY;IAKvC,MAAM,CAAC,UAAU,IAAI,YAAY;IAejC,OAAO,CAAC,UAAU;IAIZ,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAYxC,GAAG,CACP,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,IAAI,CAAC;IA8BV,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBzC"}
|