@kywi-software/core 0.14.0 → 0.15.1
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 +200 -17
- package/README.md +38 -12
- package/dist/admin/audience-editor.d.ts +2 -0
- package/dist/admin/audience-editor.d.ts.map +1 -1
- package/dist/admin/audience-editor.js +4 -2
- package/dist/admin/audience-editor.js.map +1 -1
- 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/condition-builder.d.ts.map +1 -1
- package/dist/admin/condition-builder.js +16 -3
- package/dist/admin/condition-builder.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/rule-tester.d.ts +1 -0
- package/dist/admin/rule-tester.d.ts.map +1 -1
- package/dist/admin/rule-tester.js +7 -4
- package/dist/admin/rule-tester.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/signal-options.d.ts +17 -0
- package/dist/admin/signal-options.d.ts.map +1 -1
- package/dist/admin/signal-options.js +28 -0
- package/dist/admin/signal-options.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/audiences/audiences-data.d.ts +5 -0
- package/dist/admin/surfaces/audiences/audiences-data.d.ts.map +1 -1
- package/dist/admin/surfaces/audiences/audiences-data.js +3 -0
- package/dist/admin/surfaces/audiences/audiences-data.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/api-key-routes.js +2 -2
- package/dist/api/api-key-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 +31 -19
- package/dist/api/audience-routes.js.map +1 -1
- package/dist/api/audience-runtime-routes.d.ts +23 -0
- package/dist/api/audience-runtime-routes.d.ts.map +1 -1
- package/dist/api/audience-runtime-routes.js +511 -25
- 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/ax-routes.d.ts.map +1 -1
- package/dist/api/ax-routes.js +7 -3
- package/dist/api/ax-routes.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 +6 -6
- package/dist/api/category-routes.js.map +1 -1
- package/dist/api/changeset-routes.js +2 -2
- package/dist/api/changeset-routes.js.map +1 -1
- package/dist/api/comment-routes.js +12 -12
- 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 +44 -19
- package/dist/api/component-routes.js.map +1 -1
- package/dist/api/config-routes.js +4 -4
- package/dist/api/config-routes.js.map +1 -1
- package/dist/api/content-permission-routes.js +2 -2
- package/dist/api/content-permission-routes.js.map +1 -1
- package/dist/api/content-routes.d.ts.map +1 -1
- package/dist/api/content-routes.js +21 -16
- package/dist/api/content-routes.js.map +1 -1
- package/dist/api/content-type-routes.js +3 -3
- package/dist/api/content-type-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 +10 -10
- 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/extension-routes.js +4 -4
- package/dist/api/extension-routes.js.map +1 -1
- package/dist/api/feed-routes.d.ts +2 -2
- package/dist/api/feed-routes.js +5 -5
- package/dist/api/feed-routes.js.map +1 -1
- package/dist/api/form-routes.js +6 -6
- 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 +9 -9
- 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 +43 -7
- package/dist/api/index.js.map +1 -1
- package/dist/api/layout-routes.d.ts +19 -1
- package/dist/api/layout-routes.d.ts.map +1 -1
- package/dist/api/layout-routes.js +92 -8
- package/dist/api/layout-routes.js.map +1 -1
- package/dist/api/layout-write-guard.d.ts +3 -2
- package/dist/api/layout-write-guard.d.ts.map +1 -1
- package/dist/api/layout-write-guard.js +12 -4
- package/dist/api/layout-write-guard.js.map +1 -1
- package/dist/api/media-routes.d.ts.map +1 -1
- package/dist/api/media-routes.js +100 -35
- 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 +46 -12
- 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 +25 -4
- package/dist/api/nav-routes.js.map +1 -1
- package/dist/api/oauth-routes.js +2 -2
- package/dist/api/oauth-routes.js.map +1 -1
- package/dist/api/openapi.d.ts.map +1 -1
- package/dist/api/openapi.js +82 -34
- package/dist/api/openapi.js.map +1 -1
- package/dist/api/pagination.d.ts +10 -0
- package/dist/api/pagination.d.ts.map +1 -1
- package/dist/api/pagination.js +7 -1
- package/dist/api/pagination.js.map +1 -1
- package/dist/api/response.d.ts +29 -0
- package/dist/api/response.d.ts.map +1 -1
- package/dist/api/response.js +23 -3
- package/dist/api/response.js.map +1 -1
- package/dist/api/search-routes.d.ts.map +1 -1
- package/dist/api/search-routes.js +19 -5
- 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 +37 -20
- 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/site-routes.js +2 -2
- package/dist/api/site-routes.js.map +1 -1
- package/dist/api/tag-routes.d.ts.map +1 -1
- package/dist/api/tag-routes.js +5 -5
- 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 +136 -21
- package/dist/api/user-routes.js.map +1 -1
- package/dist/api/version-routes.js +2 -2
- package/dist/api/version-routes.js.map +1 -1
- package/dist/api/webhook-routes.js +8 -8
- package/dist/api/webhook-routes.js.map +1 -1
- package/dist/api/workflow-routes.d.ts.map +1 -1
- package/dist/api/workflow-routes.js +23 -14
- 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 +16 -2
- package/dist/audiences/collectors/index.d.ts.map +1 -1
- package/dist/audiences/collectors/index.js +29 -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/selfid.d.ts +25 -0
- package/dist/audiences/collectors/selfid.d.ts.map +1 -0
- package/dist/audiences/collectors/selfid.js +46 -0
- package/dist/audiences/collectors/selfid.js.map +1 -0
- package/dist/audiences/collectors/session.d.ts +41 -0
- package/dist/audiences/collectors/session.d.ts.map +1 -0
- package/dist/audiences/collectors/session.js +50 -0
- package/dist/audiences/collectors/session.js.map +1 -0
- 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 +205 -0
- package/dist/audiences/consent.d.ts.map +1 -0
- package/dist/audiences/consent.js +335 -0
- package/dist/audiences/consent.js.map +1 -0
- package/dist/audiences/cookies.d.ts +21 -0
- package/dist/audiences/cookies.d.ts.map +1 -1
- package/dist/audiences/cookies.js +26 -0
- package/dist/audiences/cookies.js.map +1 -1
- package/dist/audiences/engine.d.ts +7 -0
- package/dist/audiences/engine.d.ts.map +1 -1
- package/dist/audiences/engine.js +7 -2
- package/dist/audiences/engine.js.map +1 -1
- package/dist/audiences/entry-page.d.ts +89 -0
- package/dist/audiences/entry-page.d.ts.map +1 -0
- package/dist/audiences/entry-page.js +116 -0
- package/dist/audiences/entry-page.js.map +1 -0
- package/dist/audiences/evaluator/instant-match.d.ts.map +1 -1
- package/dist/audiences/evaluator/instant-match.js +7 -0
- package/dist/audiences/evaluator/instant-match.js.map +1 -1
- package/dist/audiences/index.d.ts +6 -2
- package/dist/audiences/index.d.ts.map +1 -1
- package/dist/audiences/index.js +12 -2
- package/dist/audiences/index.js.map +1 -1
- package/dist/audiences/queries.d.ts +16 -0
- package/dist/audiences/queries.d.ts.map +1 -1
- package/dist/audiences/queries.js +28 -1
- package/dist/audiences/queries.js.map +1 -1
- package/dist/audiences/schema.d.ts +17 -0
- package/dist/audiences/schema.d.ts.map +1 -1
- package/dist/audiences/schema.js +7 -0
- package/dist/audiences/schema.js.map +1 -1
- package/dist/audiences/server-eval.d.ts +32 -1
- package/dist/audiences/server-eval.d.ts.map +1 -1
- package/dist/audiences/server-eval.js +35 -3
- 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/types.d.ts +22 -1
- package/dist/audiences/types.d.ts.map +1 -1
- package/dist/audiences/types.js +1 -0
- package/dist/audiences/types.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/ax/content-source.d.ts +10 -2
- package/dist/ax/content-source.d.ts.map +1 -1
- package/dist/ax/content-source.js +81 -5
- package/dist/ax/content-source.js.map +1 -1
- package/dist/ax/effective-body.d.ts +28 -0
- package/dist/ax/effective-body.d.ts.map +1 -0
- package/dist/ax/effective-body.js +47 -0
- package/dist/ax/effective-body.js.map +1 -0
- package/dist/ax/index.d.ts +3 -1
- package/dist/ax/index.d.ts.map +1 -1
- package/dist/ax/index.js +2 -0
- package/dist/ax/index.js.map +1 -1
- package/dist/ax/jsonld.d.ts +31 -1
- package/dist/ax/jsonld.d.ts.map +1 -1
- package/dist/ax/jsonld.js +35 -22
- package/dist/ax/jsonld.js.map +1 -1
- package/dist/ax/layout-to-html.d.ts +127 -0
- package/dist/ax/layout-to-html.d.ts.map +1 -0
- package/dist/ax/layout-to-html.js +545 -0
- package/dist/ax/layout-to-html.js.map +1 -0
- package/dist/ax/llms-full-txt.d.ts +3 -1
- package/dist/ax/llms-full-txt.d.ts.map +1 -1
- package/dist/ax/llms-full-txt.js +5 -2
- package/dist/ax/llms-full-txt.js.map +1 -1
- package/dist/ax/page-markdown.d.ts +10 -2
- package/dist/ax/page-markdown.d.ts.map +1 -1
- package/dist/ax/page-markdown.js +16 -3
- package/dist/ax/page-markdown.js.map +1 -1
- package/dist/ax/summary.d.ts +4 -0
- package/dist/ax/summary.d.ts.map +1 -1
- package/dist/ax/summary.js +6 -1
- package/dist/ax/summary.js.map +1 -1
- package/dist/ax/types.d.ts +24 -0
- package/dist/ax/types.d.ts.map +1 -1
- package/dist/cache/content-invalidation.d.ts.map +1 -1
- package/dist/cache/content-invalidation.js +11 -0
- package/dist/cache/content-invalidation.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 +25 -0
- package/dist/db/apply-snapshot.d.ts.map +1 -1
- package/dist/db/apply-snapshot.js +48 -16
- package/dist/db/apply-snapshot.js.map +1 -1
- package/dist/db/ax-queries.d.ts +6 -0
- package/dist/db/ax-queries.d.ts.map +1 -1
- package/dist/db/ax-queries.js +6 -0
- package/dist/db/ax-queries.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 +9 -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 +21 -3
- package/dist/db/layout-queries.d.ts.map +1 -1
- package/dist/db/layout-queries.js +14 -6
- 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/search-queries.d.ts.map +1 -1
- package/dist/db/search-queries.js +24 -1
- package/dist/db/search-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/hooks/ax-invalidation.d.ts.map +1 -1
- package/dist/hooks/ax-invalidation.js +4 -0
- package/dist/hooks/ax-invalidation.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 +7 -4
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +6 -3
- 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 +26 -38
- 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/seed-defaults.d.ts +45 -0
- package/dist/layout/seed-defaults.d.ts.map +1 -0
- package/dist/layout/seed-defaults.js +75 -0
- package/dist/layout/seed-defaults.js.map +1 -0
- 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/layout/walk.d.ts +14 -0
- package/dist/layout/walk.d.ts.map +1 -0
- package/dist/layout/walk.js +49 -0
- package/dist/layout/walk.js.map +1 -0
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/index.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/media/upload-allowlist.d.ts +23 -0
- package/dist/media/upload-allowlist.d.ts.map +1 -1
- package/dist/media/upload-allowlist.js +29 -0
- package/dist/media/upload-allowlist.js.map +1 -1
- 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 +5775 -48
- package/dist/schema/mysql-tables.d.ts.map +1 -1
- package/dist/schema/mysql-tables.js +622 -46
- package/dist/schema/mysql-tables.js.map +1 -1
- package/dist/scope/jsonld.d.ts +18 -3
- package/dist/scope/jsonld.d.ts.map +1 -1
- package/dist/scope/jsonld.js +6 -4
- package/dist/scope/jsonld.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 +12 -2
|
@@ -844,6 +844,48 @@
|
|
|
844
844
|
}
|
|
845
845
|
.kywi-editor-mvc-drag-handle { margin-left: auto; cursor: grab; }
|
|
846
846
|
|
|
847
|
+
/* ── Arm drop zone (kywi-cms#171) ──────────────────────────────────────────── */
|
|
848
|
+
/* The one droppable inside a module-level container: a drop here REPLACES the
|
|
849
|
+
open arm's module. Layout-neutral by construction — `position: relative` and
|
|
850
|
+
nothing else — because in place it sits between the site's own container and
|
|
851
|
+
module wrappers, and an arm swap must not move the page by a pixel. The
|
|
852
|
+
"over" state is an `outline`, never a `border`, for the same reason (the
|
|
853
|
+
standing rule for every in-place affordance, see the hover outlines below). */
|
|
854
|
+
.kywi-editor-arm-drop { position: relative; }
|
|
855
|
+
.kywi-editor-arm-drop--over {
|
|
856
|
+
outline: 2px dashed var(--kywi-editor-accent);
|
|
857
|
+
outline-offset: -2px;
|
|
858
|
+
border-radius: var(--kywi-editor-radius-sm);
|
|
859
|
+
background: var(--kywi-editor-accent-light);
|
|
860
|
+
}
|
|
861
|
+
/* Announced, not discovered: an arm swap throws the arm's current module away,
|
|
862
|
+
so the zone says so while the drag is still in flight. Centred over the
|
|
863
|
+
module it would replace and click-through, so it can never eat the drop it is
|
|
864
|
+
describing. */
|
|
865
|
+
.kywi-editor-arm-drop-affordance {
|
|
866
|
+
position: absolute;
|
|
867
|
+
inset: 0;
|
|
868
|
+
display: flex;
|
|
869
|
+
align-items: center;
|
|
870
|
+
justify-content: center;
|
|
871
|
+
padding: var(--kywi-editor-sp-2);
|
|
872
|
+
pointer-events: none;
|
|
873
|
+
text-align: center;
|
|
874
|
+
/* Above the module and its own chrome (z-index 3), below the column resize
|
|
875
|
+
handle (6) — canvas chrome, matching `DropIndicator`'s own tier. */
|
|
876
|
+
z-index: 5;
|
|
877
|
+
}
|
|
878
|
+
.kywi-editor-arm-drop-affordance > span {
|
|
879
|
+
padding: 4px 10px;
|
|
880
|
+
border-radius: var(--kywi-editor-radius-sm);
|
|
881
|
+
background: var(--kywi-editor-accent);
|
|
882
|
+
color: #fff;
|
|
883
|
+
font-size: 11px;
|
|
884
|
+
font-weight: 600;
|
|
885
|
+
line-height: 1.35;
|
|
886
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
|
|
887
|
+
}
|
|
888
|
+
|
|
847
889
|
/* ── Section insert line ───────────────────────────────────────────────────── */
|
|
848
890
|
.kywi-editor-section-insert {
|
|
849
891
|
position: relative;
|
|
@@ -1839,6 +1881,12 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
1839
1881
|
--kywi-overlay-bar-height: 46px;
|
|
1840
1882
|
--kywi-overlay-rail-left: var(--kywi-editor-panel-width-left);
|
|
1841
1883
|
--kywi-overlay-rail-right: var(--kywi-editor-panel-width-right);
|
|
1884
|
+
/* How long revealed in-place chrome stays click-through before it will
|
|
1885
|
+
accept a press (kywi-cms#157) — see the arm rules further down. A token so
|
|
1886
|
+
a host that finds it too eager or too sluggish can retune it without
|
|
1887
|
+
forking the rule; every consumer carries `150ms` as its var() fallback for
|
|
1888
|
+
the lazy-load case where this block has not landed yet. */
|
|
1889
|
+
--kywi-ip-chrome-arm-delay: 150ms;
|
|
1842
1890
|
}
|
|
1843
1891
|
|
|
1844
1892
|
/* The fixed edit bar would otherwise cover the site's own header — offset the
|
|
@@ -2131,18 +2179,84 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2131
2179
|
pointer-events: none;
|
|
2132
2180
|
transition: opacity var(--kywi-editor-ease);
|
|
2133
2181
|
}
|
|
2134
|
-
.
|
|
2182
|
+
/* ── Revealing chrome vs. ARMING it (kywi-cms#157) ──────────────────────────
|
|
2183
|
+
These used to be one rule handing back `opacity` and `pointer-events`
|
|
2184
|
+
together, which made chrome clickable the instant the pointer arrived: a
|
|
2185
|
+
click whose press began on the page could finish on a button — including ×
|
|
2186
|
+
— that was not on screen when the gesture started (found by #147's live e2e
|
|
2187
|
+
run). The chrome delete confirms since the #147 wave, which blunts the worst
|
|
2188
|
+
outcome, but the timing itself was the bug.
|
|
2189
|
+
|
|
2190
|
+
So the reveal stays instant and the ARM is delayed. HOVER paints the bar at
|
|
2191
|
+
once and grants hit-testing only after `--kywi-ip-chrome-arm-delay`; a
|
|
2192
|
+
pointer merely crossing the top strip of a full-width band leaves before the
|
|
2193
|
+
delay elapses and can press nothing. SELECTION (and keyboard focus inside
|
|
2194
|
+
the chrome, below) arms immediately — those are deliberate acts on chrome
|
|
2195
|
+
the owner can already see, and making a keyboard user wait for a
|
|
2196
|
+
pointer-safety delay would be nonsense.
|
|
2197
|
+
|
|
2198
|
+
A zero-duration TRANSITION on `pointer-events`, carried by the hover rule
|
|
2199
|
+
itself. `pointer-events` is a discrete property, so the delay is the whole
|
|
2200
|
+
transition: the value flips from `none` to `auto` the moment the delay
|
|
2201
|
+
elapses, and not before. `transition-behavior: allow-discrete` is what makes
|
|
2202
|
+
a discrete property transition at all.
|
|
2203
|
+
|
|
2204
|
+
`:where(:hover)` rather than a bare `:hover`, and that is load-bearing rather
|
|
2205
|
+
than stylistic. A bare `.kywi-ip-module:hover > .kywi-ip-module-actions` is
|
|
2206
|
+
(0,3,0) and out-specifies the `--selected` rule below at (0,2,0), so a bar
|
|
2207
|
+
that was hovered AND selected kept the delayed transition and made the
|
|
2208
|
+
selection wait — the one state that must never wait, and the exact opposite
|
|
2209
|
+
of what the comment on that rule promises. `:where()` contributes nothing to
|
|
2210
|
+
specificity, which ties the two rules and hands the decision to source order,
|
|
2211
|
+
where the comment says it lives.
|
|
2212
|
+
|
|
2213
|
+
The declaration lives on the HOVER rule rather than on the base one so the
|
|
2214
|
+
delay applies on the way IN only: when hover ends the rule stops matching,
|
|
2215
|
+
the base rule has no `pointer-events` transition, and the bar disarms
|
|
2216
|
+
instantly. A shared declaration would keep it clickable for 150ms after the
|
|
2217
|
+
pointer had already left, which is the same bug pointing the other way.
|
|
2218
|
+
|
|
2219
|
+
A transition rather than a zero-duration `@keyframes … forwards` animation,
|
|
2220
|
+
which also works: the transition says "delay, then flip" in one declaration,
|
|
2221
|
+
while the animation says it in three places (rule, keyframes, fill mode) and
|
|
2222
|
+
leaves the armed state owned by an animation that is still notionally
|
|
2223
|
+
running. Where `allow-discrete` is unsupported the transition is simply
|
|
2224
|
+
ignored and the arm is immediate — i.e. it degrades to the behaviour this
|
|
2225
|
+
replaces, never to unclickable.
|
|
2226
|
+
|
|
2227
|
+
Measured in Chromium on the reference app: `pointer-events` reads `none` at
|
|
2228
|
+
+50ms after the pointer arrives and `auto` from +150ms.
|
|
2229
|
+
|
|
2230
|
+
One consequence worth knowing before writing a test against chrome: a
|
|
2231
|
+
programmatic click must now HOLD the hover for the delay before it lands.
|
|
2232
|
+
Playwright's own retry loop re-scrolls the target into view on each attempt,
|
|
2233
|
+
which can move the page under a stationary cursor and restart the delay — so
|
|
2234
|
+
e2e that clicks chrome waits for `pointer-events: auto` rather than relying
|
|
2235
|
+
on actionability alone (see e2e/components.spec.ts's `armedChrome`). */
|
|
2236
|
+
.kywi-ip-section:where(:hover) > .kywi-ip-section-chrome,
|
|
2237
|
+
.kywi-ip-vc:where(:hover) > .kywi-ip-vc-chrome,
|
|
2238
|
+
.kywi-ip-mvc:where(:hover) > .kywi-editor-mvc-chrome,
|
|
2239
|
+
.kywi-ip-module:where(:hover) > .kywi-ip-chip,
|
|
2240
|
+
.kywi-ip-module:where(:hover) > .kywi-ip-module-actions {
|
|
2241
|
+
opacity: 1;
|
|
2242
|
+
pointer-events: auto;
|
|
2243
|
+
transition: opacity var(--kywi-editor-ease),
|
|
2244
|
+
pointer-events 0s linear var(--kywi-ip-chrome-arm-delay, 150ms);
|
|
2245
|
+
transition-behavior: allow-discrete;
|
|
2246
|
+
}
|
|
2247
|
+
/* Armed at once. Authored AFTER the hover rule on purpose — the paired
|
|
2248
|
+
selectors have identical specificity, so source order is the only
|
|
2249
|
+
tie-breaker, and dropping back to an un-delayed `transition` is what stops a
|
|
2250
|
+
selection waiting out a delay a prior hover had already started. */
|
|
2135
2251
|
.kywi-ip-section--selected > .kywi-ip-section-chrome,
|
|
2136
|
-
.kywi-ip-vc:hover > .kywi-ip-vc-chrome,
|
|
2137
2252
|
.kywi-ip-vc--selected > .kywi-ip-vc-chrome,
|
|
2138
|
-
.kywi-ip-mvc:hover > .kywi-editor-mvc-chrome,
|
|
2139
2253
|
.kywi-ip-mvc--selected > .kywi-editor-mvc-chrome,
|
|
2140
|
-
.kywi-ip-module:hover > .kywi-ip-chip,
|
|
2141
2254
|
.kywi-ip-module--selected > .kywi-ip-chip,
|
|
2142
|
-
.kywi-ip-
|
|
2255
|
+
.kywi-ip-chrome:focus-within,
|
|
2143
2256
|
.kywi-ip-module--selected > .kywi-ip-module-actions {
|
|
2144
2257
|
opacity: 1;
|
|
2145
2258
|
pointer-events: auto;
|
|
2259
|
+
transition: opacity var(--kywi-editor-ease);
|
|
2146
2260
|
}
|
|
2147
2261
|
|
|
2148
2262
|
.kywi-ip-section-chrome,
|
|
@@ -2169,7 +2283,23 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2169
2283
|
in-place chrome — but anchored RIGHT rather than left (kywi-cms#161): the arm
|
|
2170
2284
|
module's own `.kywi-ip-chip` occupies the above-left corner and both are
|
|
2171
2285
|
revealed by the same hover, since hovering the module also hovers the
|
|
2172
|
-
container that holds it.
|
|
2286
|
+
container that holds it.
|
|
2287
|
+
|
|
2288
|
+
The typography, min-height, padding and gap are the SHARED chrome values, the
|
|
2289
|
+
same ones `.kywi-ip-section-chrome` / `.kywi-ip-vc-chrome` set a few rules up
|
|
2290
|
+
(kywi-cms#166). It used to take only `.kywi-editor-mvc-chrome`'s artboard
|
|
2291
|
+
sizing, which declares no `font-size` at all — harmless inside the admin
|
|
2292
|
+
card, which sets one, and wrong in place, where this renders INSIDE the page
|
|
2293
|
+
and inherited whatever body size the theme happened to use. A 16px arm
|
|
2294
|
+
switcher against every other bar's 11px is also most of why the right-hand
|
|
2295
|
+
corner reads as crowded.
|
|
2296
|
+
|
|
2297
|
+
Wrapping, and bounded to its owner, for the same reason the container bar
|
|
2298
|
+
above is: anchored `right: 0`, an over-wide bar grows LEFTWARD across the
|
|
2299
|
+
page, and arm labels are owner-authored ("Enterprise decision makers in
|
|
2300
|
+
EMEA"). `.kywi-editor-mvc-drag-handle`'s `margin-left: auto` is dropped with
|
|
2301
|
+
it — in a shrink-to-fit bar it buys nothing, and once the bar can wrap it
|
|
2302
|
+
pushes the handle onto a row of its own. */
|
|
2173
2303
|
.kywi-ip-mvc > .kywi-editor-mvc-chrome {
|
|
2174
2304
|
top: 0;
|
|
2175
2305
|
right: 0;
|
|
@@ -2179,7 +2309,15 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2179
2309
|
background: var(--kywi-editor-accent);
|
|
2180
2310
|
color: #fff;
|
|
2181
2311
|
box-shadow: var(--kywi-editor-shadow-1);
|
|
2312
|
+
gap: 6px;
|
|
2313
|
+
min-height: 26px;
|
|
2314
|
+
padding: 3px 8px;
|
|
2315
|
+
font-size: 11px;
|
|
2316
|
+
line-height: 1.3;
|
|
2317
|
+
flex-wrap: wrap;
|
|
2318
|
+
max-width: 100%;
|
|
2182
2319
|
}
|
|
2320
|
+
.kywi-ip-mvc > .kywi-editor-mvc-chrome .kywi-editor-mvc-drag-handle { margin-left: 0; }
|
|
2183
2321
|
|
|
2184
2322
|
/* Chrome CLAMPED inside its owner, just under the editor's fixed top bar
|
|
2185
2323
|
(kywi-cms#122). The stacking contract above settles the contest with the
|
|
@@ -2212,13 +2350,25 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2212
2350
|
inherited `bottom` and stretch the box. Two classes deep, so it beats the
|
|
2213
2351
|
single-class base rule whatever the source order. Fully rounded, unlike the
|
|
2214
2352
|
base rule's top-edge tab: a clamped bar floats inside its owner rather than
|
|
2215
|
-
sitting on an edge.
|
|
2353
|
+
sitting on an edge.
|
|
2354
|
+
|
|
2355
|
+
The chip gets its own copy of the rule rather than joining the selector
|
|
2356
|
+
(kywi-cms#128): the module type label is the other above-anchored affordance
|
|
2357
|
+
and takes the tier through its own rule, so PR #127's clamp reached every
|
|
2358
|
+
floating bar EXCEPT the one on the module itself — a module whose top sat in
|
|
2359
|
+
the strip drew its label underneath the bar. It wants the position and not
|
|
2360
|
+
the `border-radius`, which on a pill would square it off. */
|
|
2216
2361
|
.kywi-ip-chrome.kywi-ip-chrome--clamped {
|
|
2217
2362
|
top: var(--kywi-ip-chrome-clamp, 0px);
|
|
2218
2363
|
bottom: auto;
|
|
2219
2364
|
transform: none;
|
|
2220
2365
|
border-radius: var(--kywi-editor-radius-sm);
|
|
2221
2366
|
}
|
|
2367
|
+
.kywi-ip-chip.kywi-ip-chrome--clamped {
|
|
2368
|
+
top: var(--kywi-ip-chrome-clamp, 0px);
|
|
2369
|
+
bottom: auto;
|
|
2370
|
+
transform: none;
|
|
2371
|
+
}
|
|
2222
2372
|
|
|
2223
2373
|
/* Chrome pushed RIGHT, out of the open module palette's footprint
|
|
2224
2374
|
(kywi-cms#132). Same argument as the clamp above, one axis over: the left
|
|
@@ -2245,7 +2395,8 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2245
2395
|
the last one. The cost is a ~140ms window during a palette toggle where the
|
|
2246
2396
|
bar has already moved and the rail is still sliding — which errs the safe
|
|
2247
2397
|
way on the way in (the bar leaves before the rail arrives). */
|
|
2248
|
-
.kywi-ip-chrome.kywi-ip-chrome--rail-avoid
|
|
2398
|
+
.kywi-ip-chrome.kywi-ip-chrome--rail-avoid,
|
|
2399
|
+
.kywi-ip-chip.kywi-ip-chrome--rail-avoid {
|
|
2249
2400
|
left: var(--kywi-ip-chrome-left, 0px);
|
|
2250
2401
|
}
|
|
2251
2402
|
/* The container bar wraps and already bounds itself to its owner; hold that
|
|
@@ -2256,6 +2407,35 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2256
2407
|
.kywi-ip-vc-chrome.kywi-ip-chrome--rail-avoid {
|
|
2257
2408
|
max-width: calc(100% - var(--kywi-ip-chrome-left, 0px));
|
|
2258
2409
|
}
|
|
2410
|
+
|
|
2411
|
+
/* Chrome pushed LEFT, out of the open properties rail (kywi-cms#166). The
|
|
2412
|
+
mirror of the rule above, for the bars anchored to their owner's RIGHT edge:
|
|
2413
|
+
a module-level container's badge + arm switcher, and the module action
|
|
2414
|
+
cluster (grip, Personalize, A/B — three buttons wide since kywi-cms#161).
|
|
2415
|
+
Both render at their owner's own `right: 0`, which on a full-width column is
|
|
2416
|
+
exactly where the fixed props rail is, and that rail out-ranks chrome by the
|
|
2417
|
+
same deliberate tier the palette does.
|
|
2418
|
+
|
|
2419
|
+
Worse than the palette case in practice, and the reason this is not merely
|
|
2420
|
+
symmetry: the props rail opens itself the moment anything is SELECTED, so it
|
|
2421
|
+
is out for as long as an owner is working. The e2e suite's workaround was to
|
|
2422
|
+
close it — i.e. the gesture the owner was forced into.
|
|
2423
|
+
|
|
2424
|
+
Deliberately scoped to those two selectors rather than written against
|
|
2425
|
+
`.kywi-ip-chrome` (which is how the left-hand rule can be): setting `right`
|
|
2426
|
+
on a LEFT-anchored auto-width box does not move it, it stretches it across
|
|
2427
|
+
the gap between the two edges. Keeping the selector narrow makes that
|
|
2428
|
+
mistake unreachable rather than merely discouraged. */
|
|
2429
|
+
.kywi-editor-mvc-chrome.kywi-ip-chrome--rail-avoid-right,
|
|
2430
|
+
.kywi-ip-module-actions.kywi-ip-chrome--rail-avoid-right {
|
|
2431
|
+
right: var(--kywi-ip-chrome-right, 0px);
|
|
2432
|
+
}
|
|
2433
|
+
/* Same promise as the container bar's above, read in a mirror: a pushed bar
|
|
2434
|
+
whose max-width still measured from its owner's right edge would run off the
|
|
2435
|
+
LEFT of the band by exactly the distance it was pushed. */
|
|
2436
|
+
.kywi-editor-mvc-chrome.kywi-ip-chrome--rail-avoid-right {
|
|
2437
|
+
max-width: calc(100% - var(--kywi-ip-chrome-right, 0px));
|
|
2438
|
+
}
|
|
2259
2439
|
/* Chrome controls are always live once the bar itself is visible. */
|
|
2260
2440
|
.kywi-ip-chrome .kywi-editor-section-toolbar-actions { opacity: 1; }
|
|
2261
2441
|
.kywi-ip-chrome .kywi-editor-section-title,
|
|
@@ -2428,6 +2608,13 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2428
2608
|
outline: 1.5px solid var(--kywi-editor-linked);
|
|
2429
2609
|
outline-offset: -1.5px;
|
|
2430
2610
|
}
|
|
2611
|
+
/* A MODULE-level container can be a linked component too (kywi-cms#170); it
|
|
2612
|
+
sits inside a column, so it takes the module's outward offset rather than the
|
|
2613
|
+
band's inset one. */
|
|
2614
|
+
.kywi-editor-mvc--linked {
|
|
2615
|
+
outline: 1.5px solid var(--kywi-editor-linked);
|
|
2616
|
+
outline-offset: 1px;
|
|
2617
|
+
}
|
|
2431
2618
|
.kywi-editor-module--linked {
|
|
2432
2619
|
outline: 1.5px solid var(--kywi-editor-linked);
|
|
2433
2620
|
outline-offset: 1px;
|
|
@@ -2459,6 +2646,15 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2459
2646
|
outline: 2px solid var(--kywi-editor-accent);
|
|
2460
2647
|
outline-offset: 2px;
|
|
2461
2648
|
}
|
|
2649
|
+
.kywi-ip-mvc--linked {
|
|
2650
|
+
outline: 1.5px solid var(--kywi-editor-linked);
|
|
2651
|
+
outline-offset: 2px;
|
|
2652
|
+
}
|
|
2653
|
+
.kywi-ip-mvc--linked.kywi-ip-mvc--selected,
|
|
2654
|
+
.kywi-ip-mvc--linked.kywi-ip-mvc--selected:hover {
|
|
2655
|
+
outline: 2px solid var(--kywi-editor-accent);
|
|
2656
|
+
outline-offset: 2px;
|
|
2657
|
+
}
|
|
2462
2658
|
.kywi-ip-module--linked {
|
|
2463
2659
|
outline: 1.5px solid var(--kywi-editor-linked);
|
|
2464
2660
|
outline-offset: 2px;
|
|
@@ -2590,6 +2786,18 @@ input[type="color"].kywi-token-raw-input { height: 34px; padding: 3px; cursor: p
|
|
|
2590
2786
|
color: var(--kywi-editor-panel-text);
|
|
2591
2787
|
font-size: 12px;
|
|
2592
2788
|
}
|
|
2789
|
+
/* The two answers an arm drag-out offers, spelled out under the question
|
|
2790
|
+
(kywi-cms#171). A button label alone cannot say what happens to the VARIANT,
|
|
2791
|
+
which is the whole thing being decided. */
|
|
2792
|
+
.kywi-editor-dialog-choices {
|
|
2793
|
+
margin: 0 var(--kywi-editor-sp-5) var(--kywi-editor-sp-3);
|
|
2794
|
+
padding-left: var(--kywi-editor-sp-4);
|
|
2795
|
+
display: grid;
|
|
2796
|
+
gap: var(--kywi-editor-sp-2);
|
|
2797
|
+
color: var(--kywi-editor-panel-text);
|
|
2798
|
+
font-size: 12px;
|
|
2799
|
+
line-height: 1.5;
|
|
2800
|
+
}
|
|
2593
2801
|
.kywi-editor-dialog-error {
|
|
2594
2802
|
margin: 0 var(--kywi-editor-sp-5) var(--kywi-editor-sp-2);
|
|
2595
2803
|
padding: var(--kywi-editor-sp-2) var(--kywi-editor-sp-3);
|
|
@@ -33,6 +33,17 @@ export interface InlineTextBindingTarget {
|
|
|
33
33
|
element: HTMLElement;
|
|
34
34
|
kind: InlineBindingKind;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Marks the editor's own affordances inside a module wrapper — the type chip,
|
|
38
|
+
* the action cluster, the linked-component tag. Everything the editor draws
|
|
39
|
+
* over a module carries it.
|
|
40
|
+
*
|
|
41
|
+
* Read twice here, for the two halves of the same rule: a gesture that STARTED
|
|
42
|
+
* on chrome is not a gesture on the module's copy ({@link resolveInlineBinding}),
|
|
43
|
+
* and chrome is never part of the value read back OUT of a wrapper host
|
|
44
|
+
* ({@link readInlineTextValue}). One constant so the two cannot drift.
|
|
45
|
+
*/
|
|
46
|
+
export declare const EDITOR_CHROME_ATTR = "data-kywi-editor-chrome";
|
|
36
47
|
/**
|
|
37
48
|
* The module's *primary* text prop, or null when it has none.
|
|
38
49
|
*
|
|
@@ -56,8 +67,11 @@ export declare function listInlineTextProps(config: ModuleConfig | null | undefi
|
|
|
56
67
|
* there is nothing safe to bind, in which case the caller routes the gesture to
|
|
57
68
|
* the props-rail fallback (kywi-cms#118) rather than to the wrapper.
|
|
58
69
|
*
|
|
59
|
-
* The rules, in order (kywi-cms#145):
|
|
70
|
+
* The rules, in order (kywi-cms#145, kywi-cms#152):
|
|
60
71
|
*
|
|
72
|
+
* 0. Nothing at all, if the gesture landed on the editor's own chrome inside
|
|
73
|
+
* this wrapper. Chrome is not the module's copy, and the rules below never
|
|
74
|
+
* ask where a gesture came from.
|
|
61
75
|
* 1. The anchor the gesture actually landed in. Double-clicking a card's body
|
|
62
76
|
* edits the body, its footer edits the footer — the prop the owner pointed
|
|
63
77
|
* at, not "the module's first prop".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-text.d.ts","sourceRoot":"","sources":["../../../src/admin/layout-editor/inline-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,uBAAuB,CAAA;AAI/E,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,IAAI,EAAE,OAAO,CAAA;CACd;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEpD,sDAAsD;AACtD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,OAAO,EAAE,WAAW,CAAA;IACpB,IAAI,EAAE,iBAAiB,CAAA;CACxB;
|
|
1
|
+
{"version":3,"file":"inline-text.d.ts","sourceRoot":"","sources":["../../../src/admin/layout-editor/inline-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,uBAAuB,CAAA;AAI/E,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,IAAI,EAAE,OAAO,CAAA;CACd;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEpD,sDAAsD;AACtD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,OAAO,EAAE,WAAW,CAAA;IACpB,IAAI,EAAE,iBAAiB,CAAA;CACxB;AAKD;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,4BAA4B,CAAA;AAoC3D;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,cAAc,GAAG,IAAI,CASpG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,cAAc,EAAE,CAO7F;AAiBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACvC,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,OAAO,GAAG,IAAI,GACrB,uBAAuB,GAAG,IAAI,CAmDhC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAU5E"}
|
|
@@ -14,6 +14,17 @@ import { INLINE_PROP_ATTR } from '../../layout/module-render-context.js';
|
|
|
14
14
|
import { sanitizeHtml } from '../../util/sanitize.js';
|
|
15
15
|
/** Prop types that hold editable copy. */
|
|
16
16
|
const TEXT_PROP_TYPES = new Set(['text', 'textarea', 'richText']);
|
|
17
|
+
/**
|
|
18
|
+
* Marks the editor's own affordances inside a module wrapper — the type chip,
|
|
19
|
+
* the action cluster, the linked-component tag. Everything the editor draws
|
|
20
|
+
* over a module carries it.
|
|
21
|
+
*
|
|
22
|
+
* Read twice here, for the two halves of the same rule: a gesture that STARTED
|
|
23
|
+
* on chrome is not a gesture on the module's copy ({@link resolveInlineBinding}),
|
|
24
|
+
* and chrome is never part of the value read back OUT of a wrapper host
|
|
25
|
+
* ({@link readInlineTextValue}). One constant so the two cannot drift.
|
|
26
|
+
*/
|
|
27
|
+
export const EDITOR_CHROME_ATTR = 'data-kywi-editor-chrome';
|
|
17
28
|
/**
|
|
18
29
|
* Modules whose text-typed props must never be edited by typing on the page,
|
|
19
30
|
* because what the module RENDERS is not what the prop HOLDS.
|
|
@@ -104,8 +115,11 @@ function anchorsWithin(wrapper, byName) {
|
|
|
104
115
|
* there is nothing safe to bind, in which case the caller routes the gesture to
|
|
105
116
|
* the props-rail fallback (kywi-cms#118) rather than to the wrapper.
|
|
106
117
|
*
|
|
107
|
-
* The rules, in order (kywi-cms#145):
|
|
118
|
+
* The rules, in order (kywi-cms#145, kywi-cms#152):
|
|
108
119
|
*
|
|
120
|
+
* 0. Nothing at all, if the gesture landed on the editor's own chrome inside
|
|
121
|
+
* this wrapper. Chrome is not the module's copy, and the rules below never
|
|
122
|
+
* ask where a gesture came from.
|
|
109
123
|
* 1. The anchor the gesture actually landed in. Double-clicking a card's body
|
|
110
124
|
* edits the body, its footer edits the footer — the prop the owner pointed
|
|
111
125
|
* at, not "the module's first prop".
|
|
@@ -126,6 +140,20 @@ export function resolveInlineBinding(config, wrapper, target) {
|
|
|
126
140
|
const props = listInlineTextProps(config);
|
|
127
141
|
if (props.length === 0)
|
|
128
142
|
return null;
|
|
143
|
+
// 0 — a gesture that landed on the editor's OWN chrome is not a gesture on
|
|
144
|
+
// the module's copy (kywi-cms#152). Rules 2 and 3 below answer "the only
|
|
145
|
+
// anchor" and "the whole wrapper" without ever asking where the gesture came
|
|
146
|
+
// from, so a double-click on the type chip of a single-anchor (or unanchored)
|
|
147
|
+
// module opened an edit on copy the owner never pointed at. On a MULTI-anchor
|
|
148
|
+
// module the ambiguity rule already refused it, which is why this only
|
|
149
|
+
// surfaced on the simple ones.
|
|
150
|
+
//
|
|
151
|
+
// Scoped to chrome INSIDE this wrapper: a section's own bar is chrome too and
|
|
152
|
+
// is an ancestor of every module in the band, so an unscoped `closest()` would
|
|
153
|
+
// refuse to bind anything at all in place.
|
|
154
|
+
const chrome = target?.closest(`[${EDITOR_CHROME_ATTR}]`);
|
|
155
|
+
if (chrome && wrapper.contains(chrome))
|
|
156
|
+
return null;
|
|
129
157
|
const byName = new Map(props.map(p => [p.name, p]));
|
|
130
158
|
// 1 — the anchor under the pointer.
|
|
131
159
|
if (target && (target === wrapper || wrapper.contains(target))) {
|
|
@@ -180,7 +208,7 @@ export function resolveInlineBinding(config, wrapper, target) {
|
|
|
180
208
|
export function readInlineTextValue(host, html) {
|
|
181
209
|
const target = host.hasAttribute(INLINE_PROP_ATTR)
|
|
182
210
|
? host
|
|
183
|
-
: (Array.from(host.children).find((el) => !el.hasAttribute(
|
|
211
|
+
: (Array.from(host.children).find((el) => !el.hasAttribute(EDITOR_CHROME_ATTR)) ?? host);
|
|
184
212
|
if (html)
|
|
185
213
|
return sanitizeHtml(target.innerHTML);
|
|
186
214
|
// contenteditable leaves non-breaking spaces behind where the browser padded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-text.js","sourceRoot":"","sources":["../../../src/admin/layout-editor/inline-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AA2BrD,0CAA0C;AAC1C,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,MAAM;IACN,OAAO;IACP,MAAM;IACN,UAAU;IACV,UAAU;IACV,aAAa;IACb,WAAW;IACX,SAAS;IACT,QAAQ;IACR,aAAa;IACb,cAAc;CACf,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAuC;IAC3E,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IACxB,IAAI,mBAAmB,CAA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AAY,CAAC,gBAAgB,CAAC;QAChD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC9B,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,CACjB,IAAI,IAAI,CAAC,CAAA;IAC1C,IAAI,IAAI;QAAE,OAAO,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IAC/C,6EAA6E;IAC7E,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;AAClE,CAAC"}
|
|
@@ -63,33 +63,38 @@ interface LayoutEditorProps {
|
|
|
63
63
|
* link, so the save the owner actually asked for never happened. A write nobody
|
|
64
64
|
* requested landed; the requested one did not.
|
|
65
65
|
*
|
|
66
|
-
* WHY THE BLUEPRINT CANVAS DOES
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* is not something to leave half-working with honest-looking copy on top.
|
|
66
|
+
* WHY THE BLUEPRINT CANVAS NO LONGER DOES (kywi-cms#156). It used to, and the
|
|
67
|
+
* reason was real while it lasted: `kywi_component_instances` tracked
|
|
68
|
+
* placements in CONTENT only, so a component minted on a blueprint canvas and
|
|
69
|
+
* linked from the blueprint it was minted out of was a link nothing could see —
|
|
70
|
+
* its usage count read "0 instances across 0 pages" and its delete confirmation
|
|
71
|
+
* said so to the owner's face while a blueprint still rendered it. The fix was
|
|
72
|
+
* to teach the index to reach blueprints, not to keep the copy honest on top of
|
|
73
|
+
* a half-working feature. A blueprint is a HOLDER now, so minting, linking and
|
|
74
|
+
* the save fork all work there exactly as on a page.
|
|
76
75
|
*
|
|
77
|
-
*
|
|
76
|
+
* On the DEFINITION canvas:
|
|
78
77
|
* - "Save as component" (module, section and container), the props rail's
|
|
79
78
|
* component picker and the insert picker's component rows are all WITHHELD —
|
|
80
79
|
* the same shape as the linked-ancestor withdrawal (T3 review I1), for the
|
|
81
80
|
* same reason: an action that cannot cohere is not offered;
|
|
82
81
|
* - the save fork is INERT ({@link useComponentFork}'s `inert`) — a definition
|
|
83
|
-
* save IS the propagation,
|
|
84
|
-
*
|
|
82
|
+
* save IS the propagation, so there is no "this document only" to fork
|
|
83
|
+
* against;
|
|
85
84
|
* - everything else — palette, DnD, props and style editing, undo/redo — works
|
|
86
85
|
* exactly as it does on a page. The one palette entry that goes is the
|
|
87
86
|
* `component` placeholder itself, which here could only ever be a node
|
|
88
87
|
* pointing at nothing (see the filter below).
|
|
89
88
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
89
|
+
* PROMOTE-IN-PLACE is the one thing still withheld on BOTH non-page canvases,
|
|
90
|
+
* and it is a different question from the index: a variant container stored
|
|
91
|
+
* anywhere but a page would carry one `experimentId` shared by every page that
|
|
92
|
+
* places it (`extractDefinition` refuses the shape outright). See
|
|
93
|
+
* `selectedModuleCanPromote` below.
|
|
94
|
+
*
|
|
95
|
+
* Detach is deliberately KEPT on the definition canvas: a definition stored
|
|
96
|
+
* before the nested-link refusal can still hold a link, and detaching it is how
|
|
97
|
+
* the owner resolves it.
|
|
93
98
|
*/
|
|
94
99
|
canvasKind?: 'page' | 'definition' | 'blueprint';
|
|
95
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-editor.d.ts","sourceRoot":"","sources":["../../../src/admin/layout-editor/layout-editor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwE,MAAM,OAAO,CAAA;AAE5F,OAAO,KAAK,EAAE,cAAc,EAAmC,MAAM,uBAAuB,CAAA;AAC5F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;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ACnB,cAAc,EAAE,cAAc,CAAA;IAC9B,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC,CAAA;IACzH;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;IAC7E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB;0EACsE;IACtE,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC/C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IAC3C,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4DG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,WAAW,CAAA;CACjD;AAYD,wBAAgB,YAAY,CAAC,EAC3B,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAmB,GACpB,EAAE,iBAAiB,2CA4fnB"}
|
|
@@ -25,9 +25,10 @@ const findModuleById = findModuleInDocument;
|
|
|
25
25
|
const findSectionById = findSectionInDocument;
|
|
26
26
|
// ── Component ─────────────────────────────────────────────────────────────────
|
|
27
27
|
export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents, onSave, onCancel, audiences, onChange, userRole, canvasKind = 'page', }) {
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
|
|
28
|
+
// A component definition cannot link to another component (see `canvasKind`),
|
|
29
|
+
// so every minting/linking affordance is withheld there. A blueprint may —
|
|
30
|
+
// its links are indexed since kywi-cms#156 — so it keeps them all.
|
|
31
|
+
const componentActionsWithheld = canvasKind === 'definition';
|
|
31
32
|
const [state, dispatch] = useReducer(editorReducer, initialLayout, createInitialState);
|
|
32
33
|
const [showTemplatePicker, setShowTemplatePicker] = useState(false);
|
|
33
34
|
const [templateRegion, setTemplateRegion] = useState(null);
|
|
@@ -110,9 +111,16 @@ export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents,
|
|
|
110
111
|
dispatch,
|
|
111
112
|
library,
|
|
112
113
|
// On a definition canvas there is nothing to fork: saving IS the propagation
|
|
113
|
-
// (kywi-cms#147 T5 review, I1).
|
|
114
|
-
//
|
|
115
|
-
|
|
114
|
+
// (kywi-cms#147 T5 review, I1). The blueprint canvas used to be inert too,
|
|
115
|
+
// because the blast radius it would have quoted was unreadable — blueprints
|
|
116
|
+
// sat outside the instance index. They are holders now (kywi-cms#156), so
|
|
117
|
+
// both branches there are real: "update all" writes the definition with the
|
|
118
|
+
// layouts named alongside the pages, "this layout only" detaches inside the
|
|
119
|
+
// blueprint.
|
|
120
|
+
inert: canvasKind === 'definition',
|
|
121
|
+
// "Save to this page only" would name a page that does not exist on the
|
|
122
|
+
// blueprint canvas (kywi-cms#156). Copy only — the branch is the same.
|
|
123
|
+
holderNoun: canvasKind === 'blueprint' ? 'layout' : 'page',
|
|
116
124
|
});
|
|
117
125
|
const persist = useCallback((saved) => {
|
|
118
126
|
// kywi-cms#135 review: only advance the "last-saved" baseline once the
|
|
@@ -174,15 +182,16 @@ export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents,
|
|
|
174
182
|
const connect = useComponentConnect({ layout: state.layout, dispatch, library });
|
|
175
183
|
// The canvas chrome only ever needed the linked pill's name lookup
|
|
176
184
|
// (`nameOf`) — its "Save as component" buttons are gone at every granularity
|
|
177
|
-
// (kywi-cms#159), so there is nothing left here for a definition
|
|
178
|
-
//
|
|
179
|
-
//
|
|
180
|
-
//
|
|
185
|
+
// (kywi-cms#159), so there is nothing left here for a definition canvas to
|
|
186
|
+
// withhold. `connect.affordances` is exactly `{ nameOf }` in every case now;
|
|
187
|
+
// `componentActionsWithheld` still gates the props rail's own buttons (via
|
|
188
|
+
// `canvasKind` below) and the palette filter just below.
|
|
181
189
|
const componentAffordances = connect.affordances;
|
|
182
|
-
// The `component` placeholder is the one palette entry
|
|
183
|
-
// use: its only purpose is to be pointed at a saved component
|
|
184
|
-
// a definition may not hold
|
|
185
|
-
//
|
|
190
|
+
// The `component` placeholder is the one palette entry a DEFINITION canvas
|
|
191
|
+
// cannot use: its only purpose is to be pointed at a saved component, which is
|
|
192
|
+
// the nested link a definition may not hold. Withheld rather than
|
|
193
|
+
// offered-then-inert. A blueprint canvas keeps it (kywi-cms#156) — a link
|
|
194
|
+
// placed there is indexed like any other.
|
|
186
195
|
const paletteModules = useMemo(() => {
|
|
187
196
|
const modules = moduleRegistry.list();
|
|
188
197
|
return componentActionsWithheld ? modules.filter(m => m.name !== 'component') : modules;
|
|
@@ -216,6 +225,7 @@ export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents,
|
|
|
216
225
|
const componentOptions = library.optionsFor('module');
|
|
217
226
|
const sectionComponentOptions = library.optionsFor('section');
|
|
218
227
|
const containerComponentOptions = library.optionsFor('variantContainer');
|
|
228
|
+
const moduleContainerComponentOptions = library.optionsFor('moduleVariantContainer');
|
|
219
229
|
// The selection may sit INSIDE another node's linked component instance (a
|
|
220
230
|
// module in a linked section, a section in a linked container's arm), where
|
|
221
231
|
// every component action is refused — see `useComponentConnect`. The rail
|
|
@@ -261,10 +271,14 @@ export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents,
|
|
|
261
271
|
// shape). The canvas chrome's `canPromoteModules` is the same gate on the
|
|
262
272
|
// other surface, and `props-panel.tsx` re-derives it from `canvasKind` for the
|
|
263
273
|
// shell that has no canvasKind of its own.
|
|
274
|
+
//
|
|
275
|
+
// This gate is deliberately NOT the one kywi-cms#156 lifted: it is about page
|
|
276
|
+
// variants, not about whether a link can be counted, and the blueprint canvas
|
|
277
|
+
// keeps it.
|
|
264
278
|
const selectedModuleCanPromote = canvasKind === 'page' && state.selectedId
|
|
265
279
|
? canPromoteModule(state.layout.regions, state.selectedId)
|
|
266
280
|
: false;
|
|
267
|
-
return (_jsxs(DndContext, { sensors: dnd.sensors, collisionDetection: dnd.collisionDetection, onDragStart: dnd.handleDragStart, onDragMove: dnd.handleDragMove, onDragEnd: dnd.handleDragEnd, onDragCancel: dnd.handleDragCancel, accessibility: dnd.accessibility, children: [_jsx(PaletteDragGhost, { activeDrag: dnd.activeDrag }), _jsxs("div", { className: "kywi-editor-root", children: [_jsx(EditorToolbar, { state: state, dispatch: dispatch, ...(audiences ? { audiences } : {}), onSave: handleSave, onCancel: handleCancel, onAddSection: () => {
|
|
281
|
+
return (_jsxs(DndContext, { sensors: dnd.sensors, collisionDetection: dnd.collisionDetection, onDragStart: dnd.handleDragStart, onDragMove: dnd.handleDragMove, onDragEnd: dnd.handleDragEnd, onDragCancel: dnd.handleDragCancel, accessibility: dnd.accessibility, children: [_jsx(PaletteDragGhost, { activeDrag: dnd.activeDrag }), _jsxs("div", { className: "kywi-editor-root", children: [_jsx(EditorToolbar, { state: state, dispatch: dispatch, ...(audiences ? { audiences } : {}), onSave: handleSave, onCancel: handleCancel, saveActionsDisabled: fork.isOpen, onAddSection: () => {
|
|
268
282
|
setTemplateRegion(Object.keys(state.layout.regions)[0] ?? 'main');
|
|
269
283
|
setShowTemplatePicker(true);
|
|
270
284
|
} }), _jsxs("div", { className: "kywi-editor-body", children: [_jsx(ModulePalette, { modules: paletteModules, ...(userRole ? { userRole } : {}) }), _jsx("div", { className: "kywi-editor-canvas", children: _jsx(DropTargetContext.Provider, { value: dnd.dropTarget, children: _jsx(EditorCanvas, { state: state, dispatch: dispatch, moduleComponents: moduleComponents, onInsertSection: handleInsertSection, resolveComponent: library.resolveModule, componentAffordances: componentAffordances, canPromoteModules: canvasKind === 'page' }) }) }), _jsx(PropsPanel, { module: selectedModule, moduleConfig: selectedConfig, ...(audiences ? { audiences } : {}), components: componentOptions,
|
|
@@ -295,7 +309,16 @@ export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents,
|
|
|
295
309
|
// ── Module-level variant containers (kywi-cms#161) ─────────────
|
|
296
310
|
// Written identically in `overlay-shell.tsx`, so the two shells
|
|
297
311
|
// cannot drift on what these actions mean.
|
|
298
|
-
moduleVariantContainer: selectedModuleVariantContainer,
|
|
312
|
+
moduleVariantContainer: selectedModuleVariantContainer, moduleVariantContainerComponents: moduleContainerComponentOptions, onSaveModuleVariantContainerAsComponent: () => {
|
|
313
|
+
if (state.selectedId)
|
|
314
|
+
connect.saveModuleVariantContainer(state.selectedId);
|
|
315
|
+
}, onDetachModuleVariantContainer: () => {
|
|
316
|
+
if (state.selectedId)
|
|
317
|
+
connect.detachModuleVariantContainer(state.selectedId);
|
|
318
|
+
}, onPlaceModuleVariantContainer: (componentId) => {
|
|
319
|
+
if (state.selectedId)
|
|
320
|
+
connect.placeModuleVariantContainer(state.selectedId, componentId);
|
|
321
|
+
}, onUpdateModuleVariantContainer: (patch) => dispatch({ type: 'UPDATE_MODULE_VARIANT_CONTAINER', containerId: state.selectedId, patch }),
|
|
299
322
|
// Adding and removing an arm are their OWN actions, not an arms
|
|
300
323
|
// patch: only they carry the duplicate-id guard, and only they leave
|
|
301
324
|
// the arms the author is not touching structurally alone.
|
|
@@ -372,6 +395,6 @@ export function LayoutEditor({ initialLayout, moduleRegistry, moduleComponents,
|
|
|
372
395
|
}), onClose: () => {
|
|
373
396
|
setShowTemplatePicker(false);
|
|
374
397
|
setTemplateRegion(null);
|
|
375
|
-
} })), connect.dialog, fork.dialog, confirmCancel && (_jsx(ConfirmDialog, { title: "Discard unsaved layout changes?", message: "This layout has changes you haven't saved yet. Cancelling now discards them.", confirmLabel: "Discard", onConfirm: confirmCancelDiscard, onCancel: () => setConfirmCancel(false) }))] }));
|
|
398
|
+
} })), connect.dialog, fork.dialog, dnd.dialog, confirmCancel && (_jsx(ConfirmDialog, { title: "Discard unsaved layout changes?", message: "This layout has changes you haven't saved yet. Cancelling now discards them.", confirmLabel: "Discard", onConfirm: confirmCancelDiscard, onCancel: () => setConfirmCancel(false) }))] }));
|
|
376
399
|
}
|
|
377
400
|
//# sourceMappingURL=layout-editor.js.map
|