@kywi-software/core 0.14.0 → 0.15.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/AGENT-PATTERNS.md +153 -17
- package/README.md +38 -12
- package/dist/admin/chrome.d.ts.map +1 -1
- package/dist/admin/chrome.js +6 -7
- package/dist/admin/chrome.js.map +1 -1
- package/dist/admin/field-components.d.ts.map +1 -1
- package/dist/admin/field-components.js +27 -1
- package/dist/admin/field-components.js.map +1 -1
- package/dist/admin/form-helpers.d.ts.map +1 -1
- package/dist/admin/form-helpers.js +6 -1
- package/dist/admin/form-helpers.js.map +1 -1
- package/dist/admin/layout-editor/chrome-env.d.ts +35 -0
- package/dist/admin/layout-editor/chrome-env.d.ts.map +1 -0
- package/dist/admin/layout-editor/chrome-env.js +13 -0
- package/dist/admin/layout-editor/chrome-env.js.map +1 -0
- package/dist/admin/layout-editor/component-actions.d.ts +58 -7
- package/dist/admin/layout-editor/component-actions.d.ts.map +1 -1
- package/dist/admin/layout-editor/component-actions.js +131 -5
- package/dist/admin/layout-editor/component-actions.js.map +1 -1
- package/dist/admin/layout-editor/component-fork.d.ts +4 -4
- package/dist/admin/layout-editor/component-fork.d.ts.map +1 -1
- package/dist/admin/layout-editor/component-fork.js +76 -10
- package/dist/admin/layout-editor/component-fork.js.map +1 -1
- package/dist/admin/layout-editor/component-picker-field.d.ts +17 -3
- package/dist/admin/layout-editor/component-picker-field.d.ts.map +1 -1
- package/dist/admin/layout-editor/component-picker-field.js +5 -2
- package/dist/admin/layout-editor/component-picker-field.js.map +1 -1
- package/dist/admin/layout-editor/drag-feedback.d.ts +25 -1
- package/dist/admin/layout-editor/drag-feedback.d.ts.map +1 -1
- package/dist/admin/layout-editor/drag-feedback.js +9 -0
- package/dist/admin/layout-editor/drag-feedback.js.map +1 -1
- package/dist/admin/layout-editor/drag-utils.d.ts +103 -5
- package/dist/admin/layout-editor/drag-utils.d.ts.map +1 -1
- package/dist/admin/layout-editor/drag-utils.js +131 -4
- package/dist/admin/layout-editor/drag-utils.js.map +1 -1
- package/dist/admin/layout-editor/editor-canvas.d.ts +11 -0
- package/dist/admin/layout-editor/editor-canvas.d.ts.map +1 -1
- package/dist/admin/layout-editor/editor-canvas.js +134 -20
- package/dist/admin/layout-editor/editor-canvas.js.map +1 -1
- package/dist/admin/layout-editor/editor-dialog.d.ts +58 -3
- package/dist/admin/layout-editor/editor-dialog.d.ts.map +1 -1
- package/dist/admin/layout-editor/editor-dialog.js +71 -9
- package/dist/admin/layout-editor/editor-dialog.js.map +1 -1
- package/dist/admin/layout-editor/editor-state.d.ts +119 -0
- package/dist/admin/layout-editor/editor-state.d.ts.map +1 -1
- package/dist/admin/layout-editor/editor-state.js +188 -6
- package/dist/admin/layout-editor/editor-state.js.map +1 -1
- package/dist/admin/layout-editor/editor-toolbar.d.ts +10 -1
- package/dist/admin/layout-editor/editor-toolbar.d.ts.map +1 -1
- package/dist/admin/layout-editor/editor-toolbar.js +2 -2
- package/dist/admin/layout-editor/editor-toolbar.js.map +1 -1
- package/dist/admin/layout-editor/editor.css +216 -8
- package/dist/admin/layout-editor/inline-text.d.ts +15 -1
- package/dist/admin/layout-editor/inline-text.d.ts.map +1 -1
- package/dist/admin/layout-editor/inline-text.js +30 -2
- package/dist/admin/layout-editor/inline-text.js.map +1 -1
- package/dist/admin/layout-editor/layout-editor.d.ts +21 -16
- package/dist/admin/layout-editor/layout-editor.d.ts.map +1 -1
- package/dist/admin/layout-editor/layout-editor.js +40 -17
- package/dist/admin/layout-editor/layout-editor.js.map +1 -1
- package/dist/admin/layout-editor/linked-component-notes.d.ts +88 -0
- package/dist/admin/layout-editor/linked-component-notes.d.ts.map +1 -0
- package/dist/admin/layout-editor/linked-component-notes.js +88 -0
- package/dist/admin/layout-editor/linked-component-notes.js.map +1 -0
- package/dist/admin/layout-editor/module-overlay.d.ts +23 -4
- package/dist/admin/layout-editor/module-overlay.d.ts.map +1 -1
- package/dist/admin/layout-editor/module-overlay.js +56 -10
- package/dist/admin/layout-editor/module-overlay.js.map +1 -1
- package/dist/admin/layout-editor/module-variant-container-config.d.ts.map +1 -1
- package/dist/admin/layout-editor/module-variant-container-config.js +9 -2
- package/dist/admin/layout-editor/module-variant-container-config.js.map +1 -1
- package/dist/admin/layout-editor/module-variant-container-panel.d.ts +75 -0
- package/dist/admin/layout-editor/module-variant-container-panel.d.ts.map +1 -0
- package/dist/admin/layout-editor/module-variant-container-panel.js +29 -0
- package/dist/admin/layout-editor/module-variant-container-panel.js.map +1 -0
- package/dist/admin/layout-editor/node-lookup.d.ts.map +1 -1
- package/dist/admin/layout-editor/node-lookup.js +33 -3
- package/dist/admin/layout-editor/node-lookup.js.map +1 -1
- package/dist/admin/layout-editor/overlay-shell.d.ts.map +1 -1
- package/dist/admin/layout-editor/overlay-shell.js +19 -4
- package/dist/admin/layout-editor/overlay-shell.js.map +1 -1
- package/dist/admin/layout-editor/props-panel.d.ts +28 -11
- package/dist/admin/layout-editor/props-panel.d.ts.map +1 -1
- package/dist/admin/layout-editor/props-panel.js +75 -125
- package/dist/admin/layout-editor/props-panel.js.map +1 -1
- package/dist/admin/layout-editor/section-variant-container-config.d.ts.map +1 -1
- package/dist/admin/layout-editor/section-variant-container-config.js +11 -2
- package/dist/admin/layout-editor/section-variant-container-config.js.map +1 -1
- package/dist/admin/layout-editor/use-chrome-flip.d.ts +99 -11
- package/dist/admin/layout-editor/use-chrome-flip.d.ts.map +1 -1
- package/dist/admin/layout-editor/use-chrome-flip.js +268 -97
- package/dist/admin/layout-editor/use-chrome-flip.js.map +1 -1
- package/dist/admin/layout-editor/use-component-connect.d.ts +13 -0
- package/dist/admin/layout-editor/use-component-connect.d.ts.map +1 -1
- package/dist/admin/layout-editor/use-component-connect.js +116 -20
- package/dist/admin/layout-editor/use-component-connect.js.map +1 -1
- package/dist/admin/layout-editor/use-component-fork.d.ts +49 -19
- package/dist/admin/layout-editor/use-component-fork.d.ts.map +1 -1
- package/dist/admin/layout-editor/use-component-fork.js +28 -19
- package/dist/admin/layout-editor/use-component-fork.js.map +1 -1
- package/dist/admin/layout-editor/use-component-library.d.ts +4 -4
- package/dist/admin/layout-editor/use-component-library.d.ts.map +1 -1
- package/dist/admin/layout-editor/use-component-library.js +1 -1
- package/dist/admin/layout-editor/use-component-library.js.map +1 -1
- package/dist/admin/layout-editor/use-editor-dnd.d.ts +10 -0
- package/dist/admin/layout-editor/use-editor-dnd.d.ts.map +1 -1
- package/dist/admin/layout-editor/use-editor-dnd.js +234 -14
- package/dist/admin/layout-editor/use-editor-dnd.js.map +1 -1
- package/dist/admin/layout-editor/variant-container-config.d.ts.map +1 -1
- package/dist/admin/layout-editor/variant-container-config.js +1 -1
- package/dist/admin/layout-editor/variant-container-config.js.map +1 -1
- package/dist/admin/layout-editor/variant-editor.d.ts +16 -15
- package/dist/admin/layout-editor/variant-editor.d.ts.map +1 -1
- package/dist/admin/layout-editor/variant-editor.js +16 -5
- package/dist/admin/layout-editor/variant-editor.js.map +1 -1
- package/dist/admin/primitives.d.ts.map +1 -1
- package/dist/admin/primitives.js +1 -1
- package/dist/admin/primitives.js.map +1 -1
- package/dist/admin/registry.d.ts +12 -0
- package/dist/admin/registry.d.ts.map +1 -1
- package/dist/admin/registry.js +12 -0
- package/dist/admin/registry.js.map +1 -1
- package/dist/admin/server.d.ts +10 -1
- package/dist/admin/server.d.ts.map +1 -1
- package/dist/admin/server.js +4 -1
- package/dist/admin/server.js.map +1 -1
- package/dist/admin/site-switcher.d.ts +16 -3
- package/dist/admin/site-switcher.d.ts.map +1 -1
- package/dist/admin/site-switcher.js +18 -3
- package/dist/admin/site-switcher.js.map +1 -1
- package/dist/admin/styles/admin.css +0 -3
- package/dist/admin/surface-matcher.d.ts +6 -2
- package/dist/admin/surface-matcher.d.ts.map +1 -1
- package/dist/admin/surface-matcher.js +42 -5
- package/dist/admin/surface-matcher.js.map +1 -1
- package/dist/admin/surfaces/components/components-data.d.ts +31 -11
- package/dist/admin/surfaces/components/components-data.d.ts.map +1 -1
- package/dist/admin/surfaces/components/components-data.js +17 -4
- package/dist/admin/surfaces/components/components-data.js.map +1 -1
- package/dist/admin/surfaces/components/components-list.d.ts.map +1 -1
- package/dist/admin/surfaces/components/components-list.js +20 -7
- package/dist/admin/surfaces/components/components-list.js.map +1 -1
- package/dist/admin/surfaces/components/definition-canvas.d.ts +11 -3
- package/dist/admin/surfaces/components/definition-canvas.d.ts.map +1 -1
- package/dist/admin/surfaces/components/definition-canvas.js +138 -17
- package/dist/admin/surfaces/components/definition-canvas.js.map +1 -1
- package/dist/admin/surfaces/dashboard/dashboard-index.d.ts.map +1 -1
- package/dist/admin/surfaces/dashboard/dashboard-index.js +2 -2
- package/dist/admin/surfaces/dashboard/dashboard-index.js.map +1 -1
- package/dist/admin/surfaces/layouts/layout-editor-client.d.ts.map +1 -1
- package/dist/admin/surfaces/layouts/layout-editor-client.js +12 -11
- package/dist/admin/surfaces/layouts/layout-editor-client.js.map +1 -1
- package/dist/admin/surfaces/menus/menu-editor.d.ts.map +1 -1
- package/dist/admin/surfaces/menus/menu-editor.js +17 -4
- package/dist/admin/surfaces/menus/menu-editor.js.map +1 -1
- package/dist/admin/surfaces/menus/menu-tree.d.ts +18 -4
- package/dist/admin/surfaces/menus/menu-tree.d.ts.map +1 -1
- package/dist/admin/surfaces/menus/menu-tree.js +18 -3
- package/dist/admin/surfaces/menus/menu-tree.js.map +1 -1
- package/dist/admin/surfaces/menus/menus-data.d.ts +18 -0
- package/dist/admin/surfaces/menus/menus-data.d.ts.map +1 -1
- package/dist/admin/surfaces/menus/menus-data.js +4 -0
- package/dist/admin/surfaces/menus/menus-data.js.map +1 -1
- package/dist/admin/surfaces/menus/menus-list.d.ts.map +1 -1
- package/dist/admin/surfaces/menus/menus-list.js +2 -12
- package/dist/admin/surfaces/menus/menus-list.js.map +1 -1
- package/dist/admin/surfaces/users/users-data.d.ts +14 -0
- package/dist/admin/surfaces/users/users-data.d.ts.map +1 -1
- package/dist/admin/surfaces/users/users-data.js +19 -0
- package/dist/admin/surfaces/users/users-data.js.map +1 -1
- package/dist/admin/surfaces/users/users-detail.d.ts.map +1 -1
- package/dist/admin/surfaces/users/users-detail.js +40 -4
- package/dist/admin/surfaces/users/users-detail.js.map +1 -1
- package/dist/admin/surfaces/users/users-new.d.ts.map +1 -1
- package/dist/admin/surfaces/users/users-new.js +8 -5
- package/dist/admin/surfaces/users/users-new.js.map +1 -1
- package/dist/admin/user-form.d.ts +10 -1
- package/dist/admin/user-form.d.ts.map +1 -1
- package/dist/admin/user-form.js +2 -2
- package/dist/admin/user-form.js.map +1 -1
- package/dist/api/admin-features-routes.js +2 -2
- package/dist/api/admin-features-routes.js.map +1 -1
- package/dist/api/audience-preview-routes.d.ts +7 -0
- package/dist/api/audience-preview-routes.d.ts.map +1 -1
- package/dist/api/audience-preview-routes.js +4 -4
- package/dist/api/audience-preview-routes.js.map +1 -1
- package/dist/api/audience-routes.d.ts +7 -0
- package/dist/api/audience-routes.d.ts.map +1 -1
- package/dist/api/audience-routes.js +21 -15
- package/dist/api/audience-routes.js.map +1 -1
- package/dist/api/audience-runtime-routes.d.ts +6 -0
- package/dist/api/audience-runtime-routes.d.ts.map +1 -1
- package/dist/api/audience-runtime-routes.js +38 -3
- package/dist/api/audience-runtime-routes.js.map +1 -1
- package/dist/api/auth-routes.d.ts.map +1 -1
- package/dist/api/auth-routes.js +10 -4
- package/dist/api/auth-routes.js.map +1 -1
- package/dist/api/auth.d.ts +1 -0
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +43 -3
- package/dist/api/auth.js.map +1 -1
- package/dist/api/bulk-routes.d.ts.map +1 -1
- package/dist/api/bulk-routes.js +7 -7
- package/dist/api/bulk-routes.js.map +1 -1
- package/dist/api/category-routes.js +3 -3
- package/dist/api/category-routes.js.map +1 -1
- package/dist/api/comment-routes.js +8 -8
- package/dist/api/comment-routes.js.map +1 -1
- package/dist/api/component-routes.d.ts +25 -0
- package/dist/api/component-routes.d.ts.map +1 -1
- package/dist/api/component-routes.js +41 -16
- package/dist/api/component-routes.js.map +1 -1
- package/dist/api/content-routes.js +13 -13
- package/dist/api/content-routes.js.map +1 -1
- package/dist/api/dashboard-routes.js +1 -1
- package/dist/api/dashboard-routes.js.map +1 -1
- package/dist/api/experiment-routes.d.ts +7 -0
- package/dist/api/experiment-routes.d.ts.map +1 -1
- package/dist/api/experiment-routes.js +8 -8
- package/dist/api/experiment-routes.js.map +1 -1
- package/dist/api/experiment-runtime-routes.d.ts +6 -0
- package/dist/api/experiment-runtime-routes.d.ts.map +1 -1
- package/dist/api/experiment-runtime-routes.js +47 -11
- package/dist/api/experiment-runtime-routes.js.map +1 -1
- package/dist/api/feed-routes.d.ts +2 -2
- package/dist/api/feed-routes.js +3 -3
- package/dist/api/feed-routes.js.map +1 -1
- package/dist/api/form-routes.js +4 -4
- package/dist/api/form-routes.js.map +1 -1
- package/dist/api/graphql/resolvers.d.ts +1 -1
- package/dist/api/graphql/resolvers.d.ts.map +1 -1
- package/dist/api/graphql/resolvers.js +68 -33
- package/dist/api/graphql/resolvers.js.map +1 -1
- package/dist/api/group-routes.js +6 -6
- package/dist/api/group-routes.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +39 -6
- package/dist/api/index.js.map +1 -1
- package/dist/api/layout-routes.d.ts.map +1 -1
- package/dist/api/layout-routes.js +27 -3
- package/dist/api/layout-routes.js.map +1 -1
- package/dist/api/media-routes.d.ts.map +1 -1
- package/dist/api/media-routes.js +50 -26
- package/dist/api/media-routes.js.map +1 -1
- package/dist/api/menu-routes.d.ts +9 -1
- package/dist/api/menu-routes.d.ts.map +1 -1
- package/dist/api/menu-routes.js +44 -10
- package/dist/api/menu-routes.js.map +1 -1
- package/dist/api/nav-routes.d.ts +6 -0
- package/dist/api/nav-routes.d.ts.map +1 -1
- package/dist/api/nav-routes.js +24 -3
- package/dist/api/nav-routes.js.map +1 -1
- package/dist/api/openapi.d.ts.map +1 -1
- package/dist/api/openapi.js +68 -33
- package/dist/api/openapi.js.map +1 -1
- package/dist/api/search-routes.js +2 -2
- package/dist/api/search-routes.js.map +1 -1
- package/dist/api/section-template-routes.d.ts.map +1 -1
- package/dist/api/section-template-routes.js +35 -18
- package/dist/api/section-template-routes.js.map +1 -1
- package/dist/api/site-admin-routes.d.ts +10 -1
- package/dist/api/site-admin-routes.d.ts.map +1 -1
- package/dist/api/site-admin-routes.js +21 -1
- package/dist/api/site-admin-routes.js.map +1 -1
- package/dist/api/site-context.d.ts +35 -5
- package/dist/api/site-context.d.ts.map +1 -1
- package/dist/api/site-context.js +21 -6
- package/dist/api/site-context.js.map +1 -1
- package/dist/api/tag-routes.js +3 -3
- package/dist/api/tag-routes.js.map +1 -1
- package/dist/api/translation-routes.js +5 -5
- package/dist/api/translation-routes.js.map +1 -1
- package/dist/api/user-routes.d.ts.map +1 -1
- package/dist/api/user-routes.js +134 -19
- package/dist/api/user-routes.js.map +1 -1
- package/dist/api/webhook-routes.js +5 -5
- package/dist/api/webhook-routes.js.map +1 -1
- package/dist/api/workflow-routes.js +8 -8
- package/dist/api/workflow-routes.js.map +1 -1
- package/dist/audiences/collectors/identity.d.ts +14 -1
- package/dist/audiences/collectors/identity.d.ts.map +1 -1
- package/dist/audiences/collectors/identity.js +16 -3
- package/dist/audiences/collectors/identity.js.map +1 -1
- package/dist/audiences/collectors/index.d.ts +12 -2
- package/dist/audiences/collectors/index.d.ts.map +1 -1
- package/dist/audiences/collectors/index.js +16 -5
- package/dist/audiences/collectors/index.js.map +1 -1
- package/dist/audiences/collectors/pinned-audience.d.ts +28 -2
- package/dist/audiences/collectors/pinned-audience.d.ts.map +1 -1
- package/dist/audiences/collectors/pinned-audience.js +35 -5
- package/dist/audiences/collectors/pinned-audience.js.map +1 -1
- package/dist/audiences/collectors/utm.d.ts +15 -1
- package/dist/audiences/collectors/utm.d.ts.map +1 -1
- package/dist/audiences/collectors/utm.js +16 -2
- package/dist/audiences/collectors/utm.js.map +1 -1
- package/dist/audiences/consent-config.d.ts +21 -0
- package/dist/audiences/consent-config.d.ts.map +1 -0
- package/dist/audiences/consent-config.js +15 -0
- package/dist/audiences/consent-config.js.map +1 -0
- package/dist/audiences/consent-startup.d.ts +39 -0
- package/dist/audiences/consent-startup.d.ts.map +1 -0
- package/dist/audiences/consent-startup.js +105 -0
- package/dist/audiences/consent-startup.js.map +1 -0
- package/dist/audiences/consent.d.ts +192 -0
- package/dist/audiences/consent.d.ts.map +1 -0
- package/dist/audiences/consent.js +322 -0
- package/dist/audiences/consent.js.map +1 -0
- package/dist/audiences/engine.d.ts +7 -0
- package/dist/audiences/engine.d.ts.map +1 -1
- package/dist/audiences/engine.js +6 -2
- package/dist/audiences/engine.js.map +1 -1
- package/dist/audiences/index.d.ts +3 -0
- package/dist/audiences/index.d.ts.map +1 -1
- package/dist/audiences/index.js +6 -0
- package/dist/audiences/index.js.map +1 -1
- package/dist/audiences/server-eval.d.ts +13 -1
- package/dist/audiences/server-eval.d.ts.map +1 -1
- package/dist/audiences/server-eval.js +18 -2
- package/dist/audiences/server-eval.js.map +1 -1
- package/dist/audiences/ssr.d.ts +18 -1
- package/dist/audiences/ssr.d.ts.map +1 -1
- package/dist/audiences/ssr.js +18 -1
- package/dist/audiences/ssr.js.map +1 -1
- package/dist/audiences/utm-persistence.d.ts +20 -7
- package/dist/audiences/utm-persistence.d.ts.map +1 -1
- package/dist/audiences/utm-persistence.js +20 -7
- package/dist/audiences/utm-persistence.js.map +1 -1
- package/dist/auth/roles.d.ts +11 -0
- package/dist/auth/roles.d.ts.map +1 -1
- package/dist/auth/roles.js +13 -0
- package/dist/auth/roles.js.map +1 -1
- package/dist/auth/tokens.d.ts +7 -0
- package/dist/auth/tokens.d.ts.map +1 -1
- package/dist/auth/tokens.js +24 -2
- package/dist/auth/tokens.js.map +1 -1
- package/dist/config/types.d.ts +43 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/config/validate.d.ts.map +1 -1
- package/dist/config/validate.js +3 -0
- package/dist/config/validate.js.map +1 -1
- package/dist/db/apply-snapshot.d.ts +18 -0
- package/dist/db/apply-snapshot.d.ts.map +1 -1
- package/dist/db/apply-snapshot.js +41 -16
- package/dist/db/apply-snapshot.js.map +1 -1
- package/dist/db/component-instance-queries.d.ts +79 -19
- package/dist/db/component-instance-queries.d.ts.map +1 -1
- package/dist/db/component-instance-queries.js +266 -83
- package/dist/db/component-instance-queries.js.map +1 -1
- package/dist/db/component-queries.d.ts +1 -16
- package/dist/db/component-queries.d.ts.map +1 -1
- package/dist/db/component-queries.js +7 -56
- package/dist/db/component-queries.js.map +1 -1
- package/dist/db/content-queries.d.ts.map +1 -1
- package/dist/db/content-queries.js +1 -2
- package/dist/db/content-queries.js.map +1 -1
- package/dist/db/extension-queries.d.ts +2 -2
- package/dist/db/feed-queries.d.ts +3 -3
- package/dist/db/index.d.ts +1 -0
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +1 -0
- package/dist/db/index.js.map +1 -1
- package/dist/db/layout-queries.d.ts +2 -1
- package/dist/db/layout-queries.d.ts.map +1 -1
- package/dist/db/layout-queries.js +3 -3
- package/dist/db/layout-queries.js.map +1 -1
- package/dist/db/menu-queries.d.ts +69 -5
- package/dist/db/menu-queries.d.ts.map +1 -1
- package/dist/db/menu-queries.js +120 -13
- package/dist/db/menu-queries.js.map +1 -1
- package/dist/db/section-template-queries.d.ts +62 -0
- package/dist/db/section-template-queries.d.ts.map +1 -0
- package/dist/db/section-template-queries.js +178 -0
- package/dist/db/section-template-queries.js.map +1 -0
- package/dist/db/site-plugin-queries.d.ts +2 -2
- package/dist/db/tree-queries.d.ts.map +1 -1
- package/dist/db/tree-queries.js +5 -0
- package/dist/db/tree-queries.js.map +1 -1
- package/dist/db/webhook-queries.d.ts +3 -3
- package/dist/db/workflow-queries.d.ts.map +1 -1
- package/dist/db/workflow-queries.js +5 -20
- package/dist/db/workflow-queries.js.map +1 -1
- package/dist/experiments/runtime.d.ts +21 -3
- package/dist/experiments/runtime.d.ts.map +1 -1
- package/dist/experiments/runtime.js +21 -3
- package/dist/experiments/runtime.js.map +1 -1
- package/dist/layout/component-refs.d.ts +90 -2
- package/dist/layout/component-refs.d.ts.map +1 -1
- package/dist/layout/component-refs.js +293 -16
- package/dist/layout/component-refs.js.map +1 -1
- package/dist/layout/index.d.ts +4 -3
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +3 -2
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/legacy-variant-container.d.ts +123 -0
- package/dist/layout/legacy-variant-container.d.ts.map +1 -0
- package/dist/layout/legacy-variant-container.js +397 -0
- package/dist/layout/legacy-variant-container.js.map +1 -0
- package/dist/layout/module-permissions.d.ts.map +1 -1
- package/dist/layout/module-permissions.js +25 -1
- package/dist/layout/module-permissions.js.map +1 -1
- package/dist/layout/modules-extended.d.ts +28 -1
- package/dist/layout/modules-extended.d.ts.map +1 -1
- package/dist/layout/modules-extended.js +73 -1
- package/dist/layout/modules-extended.js.map +1 -1
- package/dist/layout/modules.d.ts.map +1 -1
- package/dist/layout/modules.js +9 -1
- package/dist/layout/modules.js.map +1 -1
- package/dist/layout/personalization.d.ts +83 -0
- package/dist/layout/personalization.d.ts.map +1 -1
- package/dist/layout/personalization.js +250 -4
- package/dist/layout/personalization.js.map +1 -1
- package/dist/layout/registry.d.ts.map +1 -1
- package/dist/layout/registry.js +20 -0
- package/dist/layout/registry.js.map +1 -1
- package/dist/layout/renderer.d.ts +29 -2
- package/dist/layout/renderer.d.ts.map +1 -1
- package/dist/layout/renderer.js +23 -6
- package/dist/layout/renderer.js.map +1 -1
- package/dist/layout/types.d.ts +17 -0
- package/dist/layout/types.d.ts.map +1 -1
- package/dist/layout/types.js +7 -0
- package/dist/layout/types.js.map +1 -1
- package/dist/media/inline-risk.d.ts +26 -0
- package/dist/media/inline-risk.d.ts.map +1 -0
- package/dist/media/inline-risk.js +142 -0
- package/dist/media/inline-risk.js.map +1 -0
- package/dist/nav/builder.d.ts.map +1 -1
- package/dist/nav/builder.js +15 -3
- package/dist/nav/builder.js.map +1 -1
- package/dist/nav/index.d.ts +1 -1
- package/dist/nav/index.d.ts.map +1 -1
- package/dist/nav/index.js +1 -1
- package/dist/nav/index.js.map +1 -1
- package/dist/nav/menu-resolver.d.ts +11 -0
- package/dist/nav/menu-resolver.d.ts.map +1 -1
- package/dist/nav/menu-resolver.js +49 -9
- package/dist/nav/menu-resolver.js.map +1 -1
- package/dist/nav/paths.d.ts +37 -0
- package/dist/nav/paths.d.ts.map +1 -0
- package/dist/nav/paths.js +48 -0
- package/dist/nav/paths.js.map +1 -0
- package/dist/nav/types.d.ts +6 -0
- package/dist/nav/types.d.ts.map +1 -1
- package/dist/nav/url-resolver.d.ts +1 -5
- package/dist/nav/url-resolver.d.ts.map +1 -1
- package/dist/nav/url-resolver.js +6 -12
- package/dist/nav/url-resolver.js.map +1 -1
- package/dist/schema/base.d.ts +24 -4
- package/dist/schema/base.d.ts.map +1 -1
- package/dist/schema/base.js +17 -4
- package/dist/schema/base.js.map +1 -1
- package/dist/schema/components.d.ts +90 -9
- package/dist/schema/components.d.ts.map +1 -1
- package/dist/schema/components.js +113 -22
- package/dist/schema/components.js.map +1 -1
- package/dist/schema/mysql-tables.d.ts +5758 -48
- package/dist/schema/mysql-tables.d.ts.map +1 -1
- package/dist/schema/mysql-tables.js +620 -46
- package/dist/schema/mysql-tables.js.map +1 -1
- package/dist/scope/kywi-form.d.ts +11 -0
- package/dist/scope/kywi-form.d.ts.map +1 -1
- package/dist/scope/kywi-form.js +11 -1
- package/dist/scope/kywi-form.js.map +1 -1
- package/dist/scope/kywi-wizard-form.d.ts.map +1 -1
- package/dist/scope/kywi-wizard-form.js +76 -2
- package/dist/scope/kywi-wizard-form.js.map +1 -1
- package/dist/scope/sticky-offset.d.ts +34 -13
- package/dist/scope/sticky-offset.d.ts.map +1 -1
- package/dist/scope/sticky-offset.js +236 -43
- package/dist/scope/sticky-offset.js.map +1 -1
- package/dist/site/styles.css +61 -15
- package/dist/versioning/scheduler.d.ts +28 -0
- package/dist/versioning/scheduler.d.ts.map +1 -1
- package/dist/versioning/scheduler.js +50 -3
- package/dist/versioning/scheduler.js.map +1 -1
- package/package.json +7 -2
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
* and only for the elements it knows are sticky. So the editor patches it, for
|
|
26
26
|
* exactly as long as a bar is mounted, and puts it back on the way out.
|
|
27
27
|
*
|
|
28
|
-
* Two things come out of
|
|
28
|
+
* Two things come out of the scan (and out of every element that arrives after
|
|
29
|
+
* it — see the `MutationObserver` in {@link applyStickyOffset}):
|
|
29
30
|
* - each detected element gets an inline `top: var(<bar height token>, <px>)`
|
|
30
31
|
* — plus its own original offset, for a second tier — so the theme's whole
|
|
31
32
|
* top stack pins UNDER the bar instead of behind it, gaps intact;
|
|
@@ -112,29 +113,41 @@ export const STICKY_SECOND_TIER_MAX_PX = 200;
|
|
|
112
113
|
*/
|
|
113
114
|
const MIN_PATCHABLE_PX = 8;
|
|
114
115
|
/**
|
|
115
|
-
* A top-anchored element
|
|
116
|
-
* scrim or a full-height sidebar — not a band across the top of
|
|
117
|
-
* it must not drag the chrome clamp down with it. It still gets
|
|
118
|
-
* is still covered by the bar); it just does not define a band
|
|
116
|
+
* A top-anchored element whose BOTTOM edge reaches this far down the viewport
|
|
117
|
+
* is a drawer, a scrim or a full-height sidebar — not a band across the top of
|
|
118
|
+
* the page — so it must not drag the chrome clamp down with it. It still gets
|
|
119
|
+
* the offset (it is still covered by the bar); it just does not define a band
|
|
120
|
+
* to clamp below.
|
|
121
|
+
*
|
|
122
|
+
* A bottom-edge test rather than a height one (kywi-cms#151(3)). The rule used
|
|
123
|
+
* to be a union of two SIZE rules — "≤200px" OR "≤25% of the viewport" — and a
|
|
124
|
+
* genuinely tall header fell through the gap between them: at 240px on a 640px
|
|
125
|
+
* window it is over both caps, so it kept its top patch (it really was pinned
|
|
126
|
+
* across the top of the page) while publishing no band at all, and the chrome
|
|
127
|
+
* clamped straight back underneath it. What separates the two cases is not how
|
|
128
|
+
* tall the element is but whether it leaves any page below itself: a header of
|
|
129
|
+
* any height stops well short of the fold, and a drawer runs to it.
|
|
119
130
|
*/
|
|
120
|
-
const
|
|
131
|
+
const DRAWER_BOTTOM_FRACTION = 0.9;
|
|
121
132
|
/**
|
|
122
|
-
* …but a band no taller than this is a header whatever the
|
|
123
|
-
*
|
|
124
|
-
* round).
|
|
133
|
+
* …but a band no taller than this is a header whatever the geometry says
|
|
134
|
+
* (kywi-cms#146 fix round), and stays so under the bottom-edge test above.
|
|
125
135
|
*
|
|
126
|
-
* The
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* band silently published as 0 while the elements stayed patched, and
|
|
130
|
-
* chrome clamped straight back INTO the nav, which is the exact collision
|
|
131
|
-
* band exists to end.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* 700px full-height drawer fails both at any viewport, which is the case the
|
|
135
|
-
* fraction was written for and still catches.
|
|
136
|
+
* The #146 case was a short WINDOW: a nav whose links wrap to two rows measures
|
|
137
|
+
* ~170px, and at a 640px-tall viewport (a laptop with devtools docked, or the
|
|
138
|
+
* editor's own responsive preview) the old quarter-of-the-viewport cap was 160
|
|
139
|
+
* — so the band silently published as 0 while the elements stayed patched, and
|
|
140
|
+
* the chrome clamped straight back INTO the nav, which is the exact collision
|
|
141
|
+
* the band exists to end. This floor is the guarantee that came out of it: a
|
|
142
|
+
* band short in ABSOLUTE terms always publishes, whatever the window is doing,
|
|
143
|
+
* so a real nav can never be read as a drawer by geometry alone.
|
|
136
144
|
*/
|
|
137
145
|
const ALWAYS_A_BAND_MAX_PX = 200;
|
|
146
|
+
/**
|
|
147
|
+
* A `top` value no site would author, written for one style recalculation and
|
|
148
|
+
* read straight back — see {@link winningPriority}.
|
|
149
|
+
*/
|
|
150
|
+
const PRIORITY_PROBE_TOP = '-99999px';
|
|
138
151
|
/**
|
|
139
152
|
* The editor's OWN top-anchored chrome, which must never be offset: these
|
|
140
153
|
* elements ARE the bars being cleared, and pushing them down by their own
|
|
@@ -147,6 +160,27 @@ const ALWAYS_A_BAND_MAX_PX = 200;
|
|
|
147
160
|
* is actually editing. `[data-kywi-editor-chrome]` is the extension point —
|
|
148
161
|
* new chrome marks itself with it (the attribute already exists for the
|
|
149
162
|
* inline-edit exclusions) rather than growing this list.
|
|
163
|
+
*
|
|
164
|
+
* `.kywi-drag-overlay` is dnd-kit's `DragOverlay` wrapper, named by us in
|
|
165
|
+
* `admin/layout-editor/drag-feedback.tsx` purely so it can appear here — there
|
|
166
|
+
* is no rule for it in any stylesheet. It positions itself `position: fixed;
|
|
167
|
+
* top: 0`, which is exactly what this file patches, and it MOUNTS MID-DRAG:
|
|
168
|
+
* invisible while there was only one scan at bar mount, and caught immediately
|
|
169
|
+
* once the observer below existed. Offsetting it by a bar height moves the drag
|
|
170
|
+
* ghost out from under the cursor and takes the drop position with it. The
|
|
171
|
+
* general lesson, for whatever the editor portals to `document.body` next: a
|
|
172
|
+
* transient the EDITOR creates is chrome, and marking it — with the attribute if
|
|
173
|
+
* it is our own element, with a name here if it is a library's — is part of
|
|
174
|
+
* adding it.
|
|
175
|
+
*
|
|
176
|
+
* `.kywi-admin-shell` was on this list and is not any more (kywi-cms#151(5)):
|
|
177
|
+
* it is a FULL-VIEWPORT flex surface, and a host that wraps the editor in one
|
|
178
|
+
* against guidance — the mistake editor.css already carries a guard rule for —
|
|
179
|
+
* would make `closest()` match for every element on the page, so the detector
|
|
180
|
+
* would quietly do nothing at all for the entire session. The only thing it was
|
|
181
|
+
* really standing in for is the dialog host, which renders as
|
|
182
|
+
* `.kywi-admin-shell.kywi-overlay-dialog-host` and is still matched by the
|
|
183
|
+
* narrower class above.
|
|
150
184
|
*/
|
|
151
185
|
const EDITOR_CHROME_SELECTOR = [
|
|
152
186
|
'[data-kywi-editor-chrome]',
|
|
@@ -155,10 +189,20 @@ const EDITOR_CHROME_SELECTOR = [
|
|
|
155
189
|
'.kywi-overlay-rail',
|
|
156
190
|
'.kywi-overlay-dialog-host',
|
|
157
191
|
'.kywi-editor-template-overlay',
|
|
158
|
-
'.kywi-admin-shell',
|
|
159
192
|
'.kywi-ip-chrome',
|
|
160
193
|
'.kywi-ip-chip',
|
|
194
|
+
'.kywi-drag-overlay',
|
|
161
195
|
].join(',');
|
|
196
|
+
/**
|
|
197
|
+
* Where the editor re-renders the page it is editing.
|
|
198
|
+
*
|
|
199
|
+
* Everything inside is either the SITE's own markup — scanned once at bar mount
|
|
200
|
+
* like the rest of the document — or the editor's affordances floating over it,
|
|
201
|
+
* and between them they account for essentially all the DOM churn of a session:
|
|
202
|
+
* a drop, a prop edit or an arm switch replaces a subtree here on every commit.
|
|
203
|
+
* The observer skips arrivals inside it for that reason; see there.
|
|
204
|
+
*/
|
|
205
|
+
const EDITOR_CANVAS_SELECTOR = ['.kywi-ip-canvas', '.kywi-editor-canvas-content'].join(',');
|
|
162
206
|
/**
|
|
163
207
|
* Keyed by element rather than carried on the handle so a patch applied while
|
|
164
208
|
* another is somehow still live restores the SITE's value, never the previous
|
|
@@ -272,33 +316,108 @@ function topAnchorOf(el, view) {
|
|
|
272
316
|
* chrome nothing until 104.
|
|
273
317
|
*/
|
|
274
318
|
function bandHeightOf(el, view, shift) {
|
|
275
|
-
const { height, left, right } = el.getBoundingClientRect();
|
|
319
|
+
const { height, left, right, bottom } = el.getBoundingClientRect();
|
|
276
320
|
const midX = view.innerWidth / 2;
|
|
277
321
|
if (left > midX || right < midX)
|
|
278
322
|
return 0;
|
|
279
323
|
const band = shift + height;
|
|
280
|
-
|
|
324
|
+
// Short in absolute terms: a nav, full stop (see ALWAYS_A_BAND_MAX_PX).
|
|
325
|
+
if (band <= ALWAYS_A_BAND_MAX_PX)
|
|
326
|
+
return band;
|
|
327
|
+
// Otherwise it is a band as long as it leaves page below itself. Measured
|
|
328
|
+
// from the element's real bottom edge rather than from `shift + height`,
|
|
329
|
+
// because that is the question — where does it stop on screen.
|
|
330
|
+
if (bottom >= view.innerHeight * DRAWER_BOTTOM_FRACTION)
|
|
281
331
|
return 0;
|
|
282
332
|
return band;
|
|
283
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* The priority the patch has to write for its inline `top` to actually take
|
|
336
|
+
* effect on this element (kywi-cms#151(2)).
|
|
337
|
+
*
|
|
338
|
+
* An inline declaration beats every ordinary stylesheet rule, which is why the
|
|
339
|
+
* patch never needed a priority — but it does NOT beat `top: 0 !important`,
|
|
340
|
+
* and a theme carrying one defeated the whole thing silently: the element still
|
|
341
|
+
* looked patched in the DOM (marker attribute, inline `top` and all) while
|
|
342
|
+
* pinning exactly where it always had. Revert already understood priorities;
|
|
343
|
+
* apply did not, which is the asymmetry the issue names.
|
|
344
|
+
*
|
|
345
|
+
* Answered by asking the cascade directly rather than by guessing: write a
|
|
346
|
+
* value no site would author, read it straight back, and see whether it stuck.
|
|
347
|
+
* That is one style recalculation per PATCHED element (a handful, at bar mount
|
|
348
|
+
* only), it needs no stylesheet walking, and unlike comparing computed values
|
|
349
|
+
* before and after it does not depend on the browser resolving the `var()` /
|
|
350
|
+
* `calc()` the patch is about to write. No paint happens between the write and
|
|
351
|
+
* the read, so nothing flashes.
|
|
352
|
+
*
|
|
353
|
+
* An element whose own inline `top` was already `!important` keeps that without
|
|
354
|
+
* being probed: `setProperty` resets priority, so writing ours without one
|
|
355
|
+
* would hand a stylesheet rule a win the site never gave it.
|
|
356
|
+
*/
|
|
357
|
+
function winningPriority(el, view, originalPriority) {
|
|
358
|
+
if (originalPriority === 'important')
|
|
359
|
+
return 'important';
|
|
360
|
+
// Suppressed for the length of the probe, and put back exactly. A theme that
|
|
361
|
+
// transitions `top` — a header that eases into its stuck position, say — would
|
|
362
|
+
// otherwise make this read the value MID-TRANSITION rather than the one the
|
|
363
|
+
// cascade settled on, which is a wrong answer in whichever direction the
|
|
364
|
+
// transition happens to be a fraction of the way. It would also mean the probe
|
|
365
|
+
// ANIMATED the header to -99999px and back on the way in, which is a visible
|
|
366
|
+
// lurch for a measurement nobody asked to see. `important` because the rule
|
|
367
|
+
// being suppressed is the site's own and may carry it.
|
|
368
|
+
const transition = {
|
|
369
|
+
value: el.style.getPropertyValue('transition'),
|
|
370
|
+
priority: el.style.getPropertyPriority('transition'),
|
|
371
|
+
};
|
|
372
|
+
el.style.setProperty('transition', 'none', 'important');
|
|
373
|
+
el.style.setProperty('top', PRIORITY_PROBE_TOP);
|
|
374
|
+
const won = view.getComputedStyle(el).top.trim() === PRIORITY_PROBE_TOP;
|
|
375
|
+
if (transition.value !== '') {
|
|
376
|
+
el.style.setProperty('transition', transition.value, transition.priority);
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
el.style.removeProperty('transition');
|
|
380
|
+
}
|
|
381
|
+
return won ? '' : 'important';
|
|
382
|
+
}
|
|
284
383
|
/**
|
|
285
384
|
* Offset every site-authored top-anchored element by one bar height, for as
|
|
286
385
|
* long as the returned patch is held.
|
|
287
386
|
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
387
|
+
* One scan at bar mount, and then a `MutationObserver` for everything that
|
|
388
|
+
* arrives afterwards (kywi-cms#151(1)). The one-scan version was documented as
|
|
389
|
+
* an accepted limitation and it was the wrong call: a cookie banner that
|
|
390
|
+
* appears on a timer, a mobile menu that is `display: none` at editor open, a
|
|
391
|
+
* header rendered by a client-only component that has not hydrated yet — each
|
|
392
|
+
* pinned under the bar for the rest of the session, with re-entering edit mode
|
|
393
|
+
* the only cure. The observer runs the SAME predicate over each subtree that
|
|
394
|
+
* arrives, so nothing gets in through the back door.
|
|
395
|
+
*
|
|
396
|
+
* Its cost is one `getComputedStyle` per element inserted OUTSIDE the editor's
|
|
397
|
+
* canvas, which is where the site's own chrome lives and where almost nothing
|
|
398
|
+
* happens during a session. Arrivals inside the canvas are skipped on an
|
|
399
|
+
* ancestor walk before any style is resolved — the callback runs in a
|
|
400
|
+
* microtask, while React is still committing, and scanning a freshly-rendered
|
|
401
|
+
* canvas there forces synchronous layout on a half-built tree once per commit.
|
|
402
|
+
* The full reasoning, and what it measured, is at the observer itself. Beyond
|
|
403
|
+
* that the platform coalesces every mutation in a task into ONE callback, so a
|
|
404
|
+
* React commit is a single pass rather than one per node.
|
|
297
405
|
*
|
|
298
|
-
*
|
|
406
|
+
* Elements that LEAVE are deliberately not pruned: a detached element measures
|
|
407
|
+
* a zero rect, so it contributes nothing to the band, and reverting one is a
|
|
408
|
+
* no-op. Pruning would cost a liveness check per element per republish to save
|
|
409
|
+
* a few objects a session.
|
|
410
|
+
*
|
|
411
|
+
* The measured band is re-published when a patched element resizes (a header
|
|
299
412
|
* whose nav wraps to two rows on a narrower viewport, or the responsive-preview
|
|
300
413
|
* switch), via a `ResizeObserver` — the same reason `useChromeFlip` grew one in
|
|
301
|
-
* kywi-cms#132's fix round: no window event fires for that.
|
|
414
|
+
* kywi-cms#132's fix round: no window event fires for that. **Accepted
|
|
415
|
+
* limitation (kywi-cms#151(4)):** the band is a `max()` over every patched
|
|
416
|
+
* element, so a wide sticky WIDGET that happens to pin near the top inflates the
|
|
417
|
+
* top strip for the session. Left as is deliberately — the band has to clear
|
|
418
|
+
* the tallest thing actually pinned at the top, and telling "a header's second
|
|
419
|
+
* tier" from "a widget that pins there" needs intent the DOM does not carry.
|
|
420
|
+
* The symptom is cosmetic and self-corrects on scroll.
|
|
302
421
|
*
|
|
303
422
|
* @param barHeightVar the CSS custom property holding the mounted bar's height
|
|
304
423
|
* — {@link EDIT_BAR_HEIGHT_VAR} or {@link BROWSE_BAR_HEIGHT_VAR}. Passed as a
|
|
@@ -326,28 +445,47 @@ export function applyStickyOffset(barHeightVar, fallbackPx) {
|
|
|
326
445
|
const patched = [];
|
|
327
446
|
/** Each patched element's tier depth, for the band it is responsible for. */
|
|
328
447
|
const shifts = new Map();
|
|
329
|
-
|
|
448
|
+
/** Offset one element if it is part of the site's top stack. Did it? */
|
|
449
|
+
const patchOne = (el) => {
|
|
330
450
|
if (el.hasAttribute(STICKY_PATCH_ATTR))
|
|
331
|
-
|
|
451
|
+
return false;
|
|
332
452
|
if (isEditorChrome(el))
|
|
333
|
-
|
|
453
|
+
return false;
|
|
334
454
|
const shift = topAnchorOf(el, window);
|
|
335
455
|
if (shift === null)
|
|
336
|
-
|
|
456
|
+
return false;
|
|
337
457
|
const { width, height } = el.getBoundingClientRect();
|
|
338
458
|
if (width < MIN_PATCHABLE_PX || height < MIN_PATCHABLE_PX)
|
|
339
|
-
|
|
340
|
-
|
|
459
|
+
return false;
|
|
460
|
+
const original = {
|
|
341
461
|
value: el.style.getPropertyValue('top'),
|
|
342
462
|
priority: el.style.getPropertyPriority('top'),
|
|
343
|
-
}
|
|
463
|
+
};
|
|
464
|
+
originalTops.set(el, original);
|
|
344
465
|
el.setAttribute(STICKY_PATCH_ATTR, '');
|
|
345
466
|
// A second tier keeps its own offset ON TOP of the bar, so the theme's
|
|
346
467
|
// stack arrives intact one bar lower rather than collapsing onto itself.
|
|
347
|
-
|
|
468
|
+
// The priority is measured, not assumed — see `winningPriority`; note it
|
|
469
|
+
// leaves the probe value in place, so this write is what clears it.
|
|
470
|
+
const priority = winningPriority(el, window, original.priority);
|
|
471
|
+
el.style.setProperty('top', stickyTopValue(barHeightVar, fallbackPx, shift), priority);
|
|
348
472
|
patched.push(el);
|
|
349
473
|
shifts.set(el, shift);
|
|
350
|
-
|
|
474
|
+
return true;
|
|
475
|
+
};
|
|
476
|
+
/** `root` and everything under it — the shape a mid-session arrival has. */
|
|
477
|
+
const patchTree = (root) => {
|
|
478
|
+
const found = [];
|
|
479
|
+
if (patchOne(root))
|
|
480
|
+
found.push(root);
|
|
481
|
+
for (const el of Array.from(root.querySelectorAll('*'))) {
|
|
482
|
+
if (patchOne(el))
|
|
483
|
+
found.push(el);
|
|
484
|
+
}
|
|
485
|
+
return found;
|
|
486
|
+
};
|
|
487
|
+
for (const el of Array.from(body.querySelectorAll('*')))
|
|
488
|
+
patchOne(el);
|
|
351
489
|
const root = document.documentElement;
|
|
352
490
|
const publishBand = () => {
|
|
353
491
|
let band = 0;
|
|
@@ -371,14 +509,68 @@ export function applyStickyOffset(barHeightVar, fallbackPx) {
|
|
|
371
509
|
// Feature-detected, exactly as in use-chrome-flip.ts: happy-dom ships an
|
|
372
510
|
// inert stub and older hosts have none, so a missing observer degrades to
|
|
373
511
|
// "the band is what it measured at mount" instead of throwing.
|
|
512
|
+
//
|
|
513
|
+
// Created even when the mount scan found nothing, unlike before: an element
|
|
514
|
+
// that arrives mid-session needs watching too, and "no stickies at editor
|
|
515
|
+
// open" is precisely the page a client-rendered header shows up on.
|
|
374
516
|
const ResizeObserverCtor = window
|
|
375
517
|
.ResizeObserver;
|
|
376
518
|
let observer = null;
|
|
377
|
-
if (
|
|
519
|
+
if (typeof ResizeObserverCtor === 'function') {
|
|
378
520
|
observer = new ResizeObserverCtor(() => { publishBand(); });
|
|
379
521
|
for (const el of patched)
|
|
380
522
|
observer.observe(el);
|
|
381
523
|
}
|
|
524
|
+
// Stickies that mount after the bar does (kywi-cms#151(1)). No debounce of
|
|
525
|
+
// our own: MutationObserver callbacks are already delivered once per
|
|
526
|
+
// microtask checkpoint with every record batched, so one React commit is one
|
|
527
|
+
// pass through here however many nodes it moved. Only `childList` is watched,
|
|
528
|
+
// and the patch writes attributes and inline styles — so this can never
|
|
529
|
+
// observe its own work and loop.
|
|
530
|
+
//
|
|
531
|
+
// Arrivals inside the editor's own canvas are skipped, and that bound is not
|
|
532
|
+
// an optimization — it is what makes the observer safe to have at all. The
|
|
533
|
+
// predicate resolves a computed style per candidate, and this callback runs in
|
|
534
|
+
// a MICROTASK, i.e. while React is still committing; running it over a
|
|
535
|
+
// freshly-rendered canvas forces synchronous layout on a half-built tree, over
|
|
536
|
+
// and over, for every commit of a session. Measured on the reference app: a
|
|
537
|
+
// module dropped into a column took about a second to settle at its real
|
|
538
|
+
// height instead of laying out at once, and a drag started in that window
|
|
539
|
+
// landed a slot early because the page was still moving under the pointer
|
|
540
|
+
// (caught by e2e/palette-drag.spec.ts). The elements this whole file exists
|
|
541
|
+
// for — a cookie banner, a mobile menu, a client-rendered site header — are
|
|
542
|
+
// never inside the canvas; they are the site's chrome AROUND it. A sticky
|
|
543
|
+
// element a MODULE renders keeps exactly the pre-#151 behaviour: scanned if it
|
|
544
|
+
// was there at mount, and otherwise waiting for the next session.
|
|
545
|
+
const MutationObserverCtor = window
|
|
546
|
+
.MutationObserver;
|
|
547
|
+
let arrivals = null;
|
|
548
|
+
if (typeof MutationObserverCtor === 'function') {
|
|
549
|
+
arrivals = new MutationObserverCtor(records => {
|
|
550
|
+
let added = false;
|
|
551
|
+
for (const record of records) {
|
|
552
|
+
for (const node of Array.from(record.addedNodes)) {
|
|
553
|
+
if (node.nodeType !== 1 /* ELEMENT_NODE */)
|
|
554
|
+
continue;
|
|
555
|
+
const el = node;
|
|
556
|
+
// An attribute-and-ancestor walk, deliberately ahead of anything that
|
|
557
|
+
// would resolve a style — see the note above.
|
|
558
|
+
if (el.closest(EDITOR_CANVAS_SELECTOR))
|
|
559
|
+
continue;
|
|
560
|
+
for (const patchedEl of patchTree(el)) {
|
|
561
|
+
observer?.observe(patchedEl);
|
|
562
|
+
added = true;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
// Only when something was actually patched: `publishBand` writes to
|
|
567
|
+
// `documentElement.style`, and doing that on every unrelated DOM
|
|
568
|
+
// insertion would be a style write per render for nothing.
|
|
569
|
+
if (added)
|
|
570
|
+
publishBand();
|
|
571
|
+
});
|
|
572
|
+
arrivals.observe(body, { childList: true, subtree: true });
|
|
573
|
+
}
|
|
382
574
|
let reverted = false;
|
|
383
575
|
return {
|
|
384
576
|
elements: patched,
|
|
@@ -388,6 +580,7 @@ export function applyStickyOffset(barHeightVar, fallbackPx) {
|
|
|
388
580
|
return;
|
|
389
581
|
reverted = true;
|
|
390
582
|
observer?.disconnect();
|
|
583
|
+
arrivals?.disconnect();
|
|
391
584
|
for (const el of patched) {
|
|
392
585
|
el.removeAttribute(STICKY_PATCH_ATTR);
|
|
393
586
|
const original = originalTops.get(el);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky-offset.js","sourceRoot":"","sources":["../../src/scope/sticky-offset.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ
|
|
1
|
+
{"version":3,"file":"sticky-offset.js","sourceRoot":"","sources":["../../src/scope/sticky-offset.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,6BAA6B,CAAA;AAE9D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAA;AAE9D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAA;AAEpC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAA;AAE/D,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAA;AAE1D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AAE5C;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAE1B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAElC;;;;;;;;;;;;GAYG;AACH,MAAM,oBAAoB,GAAG,GAAG,CAAA;AAEhC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,UAAU,CAAA;AAErC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Y,CAAC,OAAO,CAAC,KAAK,EAAE;oBAAE,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;YAClE,CAAC;YACD,qEAAqE;YACrE,sEAAsE;YACtE,kEAAkE;YAClE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;gBAC5C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE;oBAAE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;YACtE,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO,CAAC,CAAA;IAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3D,CAAC"}
|
package/dist/site/styles.css
CHANGED
|
@@ -331,7 +331,42 @@
|
|
|
331
331
|
* at the matching `(min-width: 860px)`. Everything else — spacing, colour,
|
|
332
332
|
* radius, panel width — is a `--kywi-*` token with a neutral fallback, and the
|
|
333
333
|
* per-nav knobs are re-exposed as `--kywi-nav-*` so a theme can retune one nav
|
|
334
|
-
* without rewriting these rules.
|
|
334
|
+
* without rewriting these rules. Set any of them on the nav element (or an
|
|
335
|
+
* ancestor); each falls back to the value shown, which is what these rules
|
|
336
|
+
* hardcoded before:
|
|
337
|
+
*
|
|
338
|
+
* --kywi-nav-gap 1rem space between bar items
|
|
339
|
+
* --kywi-nav-link-padding-y/-x 0.5rem link/label padding
|
|
340
|
+
* --kywi-nav-color text link colour
|
|
341
|
+
* --kywi-nav-color-active primary active/hover colour
|
|
342
|
+
* --kywi-nav-panel-background bg dropdown + mega panel surface
|
|
343
|
+
* --kywi-nav-panel-shadow … dropdown + mega panel shadow
|
|
344
|
+
* --kywi-nav-panel-width 15rem dropdown min width
|
|
345
|
+
* --kywi-nav-mega-max-width 1100px mega panel content width
|
|
346
|
+
* --kywi-nav-mega-column-min 12rem mega column min track (kywi-cms#116)
|
|
347
|
+
* --kywi-nav-columns-min 10rem footer column min track (kywi-cms#116)
|
|
348
|
+
* --kywi-nav-heading-font-family heading mega/footer column heading … (kywi-cms#116)
|
|
349
|
+
* --kywi-nav-heading-font-size 0.78rem
|
|
350
|
+
* --kywi-nav-heading-font-weight 700
|
|
351
|
+
* --kywi-nav-heading-letter-spacing 0.05em
|
|
352
|
+
* --kywi-nav-heading-text-transform uppercase
|
|
353
|
+
* --kywi-nav-heading-color muted
|
|
354
|
+
*
|
|
355
|
+
* The two column grids are `repeat(auto-fit, minmax(<min>, 1fr))`, so the min
|
|
356
|
+
* track width is what decides how many columns fit — that is the knob, not a
|
|
357
|
+
* column count. Both headings share one typography set because they are the
|
|
358
|
+
* same micro-label; retune it once and both follow.
|
|
359
|
+
*
|
|
360
|
+
* MEGA PANEL WIDTH IS THE NAV'S WIDTH. `.kywi-nav--mega .kywi-nav-item` is
|
|
361
|
+
* `position: static` and the panel is pinned `left: 0; right: 0` — so it
|
|
362
|
+
* measures against the `.kywi-nav` box (the nearest positioned ancestor), by
|
|
363
|
+
* design, since a mega panel is supposed to span the bar rather than hang off
|
|
364
|
+
* one item. The consequence is on the HOST: a nav that is not allowed to fill
|
|
365
|
+
* its bar (no `flex: 1`, or sitting in an auto-width grid track) hands the
|
|
366
|
+
* panel its own narrow box, and `auto-fit` then collapses the columns into one
|
|
367
|
+
* — which reads as a broken mega menu when the real cause is the layout around
|
|
368
|
+
* it. Let the nav flex-grow / fill the bar; `--kywi-nav-mega-max-width` is the
|
|
369
|
+
* knob for keeping the CONTENT narrower than that (kywi-cms#116).
|
|
335
370
|
*
|
|
336
371
|
* Panels open three ways so the nav works with JS off: `.kywi-nav-item--open`
|
|
337
372
|
* (kywi.js), `:hover`, and `:focus-within` (keyboard). Closed panels stay in the
|
|
@@ -353,6 +388,17 @@
|
|
|
353
388
|
--_kywi-nav-radius: var(--kywi-border-radius-md, 10px);
|
|
354
389
|
--_kywi-nav-shadow: var(--kywi-nav-panel-shadow, 0 12px 32px rgba(15, 23, 42, 0.14));
|
|
355
390
|
--_kywi-nav-panel-width: var(--kywi-nav-panel-width, 15rem);
|
|
391
|
+
/* Column tracks + heading typography (kywi-cms#116). Both column grids are
|
|
392
|
+
* `auto-fit minmax(<min>, 1fr)`, so the min track width IS the column count:
|
|
393
|
+
* lower it to fit more columns in the same bar, raise it to force fewer. */
|
|
394
|
+
--_kywi-nav-mega-column-min: var(--kywi-nav-mega-column-min, 12rem);
|
|
395
|
+
--_kywi-nav-columns-min: var(--kywi-nav-columns-min, 10rem);
|
|
396
|
+
--_kywi-nav-heading-font: var(--kywi-nav-heading-font-family, var(--kywi-font-family-heading, var(--kywi-font-family-base, inherit)));
|
|
397
|
+
--_kywi-nav-heading-size: var(--kywi-nav-heading-font-size, 0.78rem);
|
|
398
|
+
--_kywi-nav-heading-weight: var(--kywi-nav-heading-font-weight, 700);
|
|
399
|
+
--_kywi-nav-heading-tracking: var(--kywi-nav-heading-letter-spacing, 0.05em);
|
|
400
|
+
--_kywi-nav-heading-transform: var(--kywi-nav-heading-text-transform, uppercase);
|
|
401
|
+
--_kywi-nav-heading-color: var(--kywi-nav-heading-color, var(--_kywi-nav-muted));
|
|
356
402
|
position: relative;
|
|
357
403
|
font-family: var(--kywi-font-family-base, inherit);
|
|
358
404
|
color: var(--_kywi-nav-text);
|
|
@@ -494,17 +540,17 @@
|
|
|
494
540
|
}
|
|
495
541
|
.kywi-nav-mega-columns {
|
|
496
542
|
display: grid;
|
|
497
|
-
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
|
543
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--_kywi-nav-mega-column-min, 12rem), 1fr));
|
|
498
544
|
gap: var(--kywi-spacing-lg, 1.5rem);
|
|
499
545
|
}
|
|
500
546
|
.kywi-nav-mega-heading {
|
|
501
547
|
margin: 0 0 var(--kywi-spacing-xs, 0.25rem);
|
|
502
|
-
font-family: var(--
|
|
503
|
-
font-size: 0.78rem;
|
|
504
|
-
font-weight: 700;
|
|
505
|
-
letter-spacing: 0.05em;
|
|
506
|
-
text-transform: uppercase;
|
|
507
|
-
color: var(--_kywi-nav-muted);
|
|
548
|
+
font-family: var(--_kywi-nav-heading-font, inherit);
|
|
549
|
+
font-size: var(--_kywi-nav-heading-size, 0.78rem);
|
|
550
|
+
font-weight: var(--_kywi-nav-heading-weight, 700);
|
|
551
|
+
letter-spacing: var(--_kywi-nav-heading-tracking, 0.05em);
|
|
552
|
+
text-transform: var(--_kywi-nav-heading-transform, uppercase);
|
|
553
|
+
color: var(--_kywi-nav-heading-color, var(--_kywi-nav-muted));
|
|
508
554
|
}
|
|
509
555
|
.kywi-nav-mega-heading .kywi-nav-link,
|
|
510
556
|
.kywi-nav-mega-heading .kywi-nav-label { padding-left: 0; padding-right: 0; }
|
|
@@ -549,17 +595,17 @@
|
|
|
549
595
|
/* Footer columns — headings + link stacks, no interactivity. */
|
|
550
596
|
.kywi-nav--footer .kywi-nav-columns {
|
|
551
597
|
display: grid;
|
|
552
|
-
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
|
|
598
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--_kywi-nav-columns-min, 10rem), 1fr));
|
|
553
599
|
gap: var(--kywi-spacing-xl, 2.5rem);
|
|
554
600
|
}
|
|
555
601
|
.kywi-nav--footer .kywi-nav-column-heading {
|
|
556
602
|
margin: 0 0 var(--kywi-spacing-sm, 0.5rem);
|
|
557
|
-
font-family: var(--
|
|
558
|
-
font-size: 0.78rem;
|
|
559
|
-
font-weight: 700;
|
|
560
|
-
letter-spacing: 0.05em;
|
|
561
|
-
text-transform: uppercase;
|
|
562
|
-
color: var(--_kywi-nav-muted);
|
|
603
|
+
font-family: var(--_kywi-nav-heading-font, inherit);
|
|
604
|
+
font-size: var(--_kywi-nav-heading-size, 0.78rem);
|
|
605
|
+
font-weight: var(--_kywi-nav-heading-weight, 700);
|
|
606
|
+
letter-spacing: var(--_kywi-nav-heading-tracking, 0.05em);
|
|
607
|
+
text-transform: var(--_kywi-nav-heading-transform, uppercase);
|
|
608
|
+
color: var(--_kywi-nav-heading-color, var(--_kywi-nav-muted));
|
|
563
609
|
}
|
|
564
610
|
.kywi-nav--footer .kywi-nav-column-heading .kywi-nav-link,
|
|
565
611
|
.kywi-nav--footer .kywi-nav-column-heading .kywi-nav-label,
|
|
@@ -5,7 +5,27 @@ export interface SchedulerResolveOptions {
|
|
|
5
5
|
/** Resolve a content type → its custom side-table, so scheduled publishes
|
|
6
6
|
* round-trip custom fields exactly as an interactive publish does. */
|
|
7
7
|
resolveType?: ResolveChangesetType;
|
|
8
|
+
/**
|
|
9
|
+
* Per-changeset retry bookkeeping for the poison-changeset backoff below
|
|
10
|
+
* (kywi-cms#158). Optional so existing direct callers of
|
|
11
|
+
* `publishScheduledChangesets` (and their tests) keep the original
|
|
12
|
+
* warn-every-tick behaviour with no tracker supplied; `startScheduler` always
|
|
13
|
+
* supplies one, scoped to that one running instance.
|
|
14
|
+
*/
|
|
15
|
+
retryTracker?: ChangesetRetryTracker;
|
|
8
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* One changeset's backoff bookkeeping: how many consecutive failures it has
|
|
19
|
+
* racked up, the earliest time it may be retried, and whether the FIRST
|
|
20
|
+
* failure has already been logged.
|
|
21
|
+
*/
|
|
22
|
+
export interface ChangesetRetryState {
|
|
23
|
+
attempts: number;
|
|
24
|
+
nextAttemptAt: number;
|
|
25
|
+
warned: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Per-changeset backoff state, scoped to one `startScheduler` instance. */
|
|
28
|
+
export type ChangesetRetryTracker = Map<string, ChangesetRetryState>;
|
|
9
29
|
/**
|
|
10
30
|
* Auto-publish approved content.
|
|
11
31
|
* Content in 'approved' status that hasn't been published yet gets published.
|
|
@@ -27,6 +47,14 @@ export declare function unpublishExpiredContent(db: KywiDb): Promise<number>;
|
|
|
27
47
|
* sat at the front of the queue. The failed changeset's transaction rolls back, so
|
|
28
48
|
* it stays 'open' and is retried on the next tick — visibly stuck, rather than
|
|
29
49
|
* silently taking the whole scheduler down with it.
|
|
50
|
+
*
|
|
51
|
+
* With a `retryTracker` supplied (kywi-cms#158), a changeset that just failed
|
|
52
|
+
* backs off exponentially (capped at `RETRY_MAX_MS`) instead of being retried —
|
|
53
|
+
* and warned about — on literally every tick forever: a poison changeset with a
|
|
54
|
+
* short scheduler interval could otherwise fill the logs with one identical
|
|
55
|
+
* warning per interval indefinitely. The first failure still warns immediately
|
|
56
|
+
* (nothing is silent); later failures of the SAME changeset stay quiet until it
|
|
57
|
+
* either succeeds (clearing its entry) or a fresh sweep restarts logging for it.
|
|
30
58
|
*/
|
|
31
59
|
export declare function publishScheduledChangesets(db: KywiDb, opts?: SchedulerResolveOptions): Promise<number>;
|
|
32
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/versioning/scheduler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAExF,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC;0EACsE;IACtE,WAAW,CAAC,EAAE,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/versioning/scheduler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM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