@perkyzz/emvb 0.6.0 → 0.8.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.
Files changed (208) hide show
  1. package/README.md +2 -2
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/package.json +7 -7
  4. package/src/admin/access/RequireEditor.tsx +7 -7
  5. package/src/admin/access/role.ts +5 -2
  6. package/src/admin/content-api.ts +10 -3
  7. package/src/admin/content-item.ts +1 -1
  8. package/src/admin/editor/A11yCopilot.tsx +104 -56
  9. package/src/admin/editor/CommandPalette.tsx +29 -13
  10. package/src/admin/editor/DialogCloseButton.tsx +16 -0
  11. package/src/admin/editor/Editor.tsx +115 -20
  12. package/src/admin/editor/EditorToasts.tsx +26 -0
  13. package/src/admin/editor/PerfMeter.tsx +92 -73
  14. package/src/admin/editor/SavedSectionDialogs.tsx +169 -0
  15. package/src/admin/editor/ShareLink.tsx +102 -72
  16. package/src/admin/editor/ShortcutsDialog.tsx +37 -18
  17. package/src/admin/editor/Timeline.tsx +250 -160
  18. package/src/admin/editor/TopBar.tsx +71 -14
  19. package/src/admin/editor/canvas/CanvasFrame.tsx +10 -1
  20. package/src/admin/editor/canvas/CanvasTextEdit.tsx +8 -2
  21. package/src/admin/editor/canvas/drop-line.ts +11 -3
  22. package/src/admin/editor/canvas/frame-focus-ring.ts +37 -0
  23. package/src/admin/editor/canvas/use-canvas-dnd.ts +32 -3
  24. package/src/admin/editor/canvas/vnode-react.tsx +7 -0
  25. package/src/admin/editor/collection-previews.ts +10 -0
  26. package/src/admin/editor/dialogs.tsx +41 -28
  27. package/src/admin/editor/dnd/drop-target.ts +26 -1
  28. package/src/admin/editor/edited-noun.ts +15 -0
  29. package/src/admin/editor/editor-chrome.tsx +43 -7
  30. package/src/admin/editor/editor-commands.ts +17 -2
  31. package/src/admin/editor/editor-css.ts +75 -24
  32. package/src/admin/editor/element-chrome.ts +21 -11
  33. package/src/admin/editor/feature-css.ts +56 -14
  34. package/src/admin/editor/focus-when-lost.ts +23 -0
  35. package/src/admin/editor/icons/IconLibraryDialog.tsx +54 -18
  36. package/src/admin/editor/icons/library.ts +1 -1
  37. package/src/admin/editor/icons/use-icon-library.ts +5 -2
  38. package/src/admin/editor/ime.ts +29 -0
  39. package/src/admin/editor/palette-items.ts +27 -3
  40. package/src/admin/editor/panels/AddPanel.tsx +44 -11
  41. package/src/admin/editor/panels/ClassesSection.tsx +18 -7
  42. package/src/admin/editor/panels/ColorControl.tsx +130 -23
  43. package/src/admin/editor/panels/ConditionsEditor.tsx +52 -26
  44. package/src/admin/editor/panels/ElementPanel.tsx +134 -24
  45. package/src/admin/editor/panels/LayersPanel.tsx +61 -20
  46. package/src/admin/editor/panels/LeftPanel.tsx +9 -1
  47. package/src/admin/editor/panels/PageSettings.tsx +66 -35
  48. package/src/admin/editor/panels/SavedSectionsGroup.tsx +246 -0
  49. package/src/admin/editor/panels/SiteStylesDrawer.tsx +224 -42
  50. package/src/admin/editor/panels/TokenScales.tsx +88 -48
  51. package/src/admin/editor/panels/TriggerSettings.tsx +50 -12
  52. package/src/admin/editor/panels/TriggersEditor.tsx +3 -2
  53. package/src/admin/editor/panels/VariableSection.tsx +48 -18
  54. package/src/admin/editor/panels/color-space.ts +23 -29
  55. package/src/admin/editor/panels/settings/AdvancedFields.tsx +12 -2
  56. package/src/admin/editor/panels/settings/AudienceEditor.tsx +87 -74
  57. package/src/admin/editor/panels/settings/BackgroundControls.tsx +55 -11
  58. package/src/admin/editor/panels/settings/BackgroundFill.tsx +3 -2
  59. package/src/admin/editor/panels/settings/BindingsEditor.tsx +15 -18
  60. package/src/admin/editor/panels/settings/BoxControl.tsx +2 -1
  61. package/src/admin/editor/panels/settings/ClassChip.tsx +21 -9
  62. package/src/admin/editor/panels/settings/ClassChipInput.tsx +24 -16
  63. package/src/admin/editor/panels/settings/DraftTextField.tsx +41 -3
  64. package/src/admin/editor/panels/settings/EffectsControls.tsx +38 -14
  65. package/src/admin/editor/panels/settings/FieldBindControl.tsx +46 -28
  66. package/src/admin/editor/panels/settings/FieldControl.tsx +20 -8
  67. package/src/admin/editor/panels/settings/FormBindControl.tsx +2 -2
  68. package/src/admin/editor/panels/settings/HintedSwitch.tsx +33 -0
  69. package/src/admin/editor/panels/settings/IconControls.tsx +33 -13
  70. package/src/admin/editor/panels/settings/IconPicker.tsx +2 -0
  71. package/src/admin/editor/panels/settings/ImageSourcesField.tsx +3 -1
  72. package/src/admin/editor/panels/settings/ItemList.tsx +15 -2
  73. package/src/admin/editor/panels/settings/LengthRow.tsx +8 -6
  74. package/src/admin/editor/panels/settings/LoopItemBindControl.tsx +1 -1
  75. package/src/admin/editor/panels/settings/MediaPicker.tsx +127 -23
  76. package/src/admin/editor/panels/settings/MotionControl.tsx +28 -15
  77. package/src/admin/editor/panels/settings/NumberRow.tsx +9 -3
  78. package/src/admin/editor/panels/settings/PanelSelect.tsx +50 -0
  79. package/src/admin/editor/panels/settings/QueryStyleRows.tsx +25 -18
  80. package/src/admin/editor/panels/settings/RequiredFieldsNotice.tsx +66 -1
  81. package/src/admin/editor/panels/settings/StyleRow.tsx +10 -3
  82. package/src/admin/editor/panels/settings/StyleSources.tsx +4 -1
  83. package/src/admin/editor/panels/settings/VariantEditor.tsx +10 -1
  84. package/src/admin/editor/panels/settings/box-link-name.ts +6 -2
  85. package/src/admin/editor/panels/settings/class-suggest.ts +7 -7
  86. package/src/admin/editor/panels/settings/query-style.ts +38 -9
  87. package/src/admin/editor/panels/settings/svg-images.ts +13 -0
  88. package/src/admin/editor/panels/site-list.tsx +20 -6
  89. package/src/admin/editor/panels/variable-values.ts +11 -4
  90. package/src/admin/editor/restore-deleted.ts +21 -2
  91. package/src/admin/editor/section-templates.ts +81 -12
  92. package/src/admin/editor/shortcuts.ts +31 -2
  93. package/src/admin/editor/store.ts +7 -0
  94. package/src/admin/editor/useEditorCommands.ts +61 -15
  95. package/src/admin/editor/useEditorData.ts +4 -2
  96. package/src/admin/editor/useEditorShortcuts.ts +17 -7
  97. package/src/admin/editor/useNodeActions.ts +61 -6
  98. package/src/admin/editor/useSave.ts +22 -7
  99. package/src/admin/editor/useSavedSections.ts +197 -0
  100. package/src/admin/forms-api.ts +2 -0
  101. package/src/admin/image-editor/Canvas.tsx +61 -17
  102. package/src/admin/image-editor/CurvesPanel.tsx +2 -1
  103. package/src/admin/image-editor/ExportDialog.tsx +48 -18
  104. package/src/admin/image-editor/ImageEditorDialog.tsx +179 -8
  105. package/src/admin/image-editor/MetadataPanel.tsx +15 -4
  106. package/src/admin/image-editor/crop-geometry.ts +3 -2
  107. package/src/admin/image-editor/image-editor-css.ts +15 -10
  108. package/src/admin/image-editor/load.ts +9 -2
  109. package/src/admin/image-editor/parts.tsx +69 -19
  110. package/src/admin/image-editor/save.ts +54 -8
  111. package/src/admin/media-api.ts +2 -1
  112. package/src/admin/pages/AgentsPage.tsx +138 -27
  113. package/src/admin/pages/CreateDialog.tsx +97 -30
  114. package/src/admin/pages/NewPageDialog.tsx +21 -3
  115. package/src/admin/pages/NewThemePartDialog.tsx +11 -3
  116. package/src/admin/pages/PageList.tsx +14 -6
  117. package/src/admin/pages/SetupShell.tsx +28 -12
  118. package/src/admin/pages/ThemePartList.tsx +59 -11
  119. package/src/admin/pages/list-kit.tsx +106 -24
  120. package/src/admin/saved-sections-api.ts +51 -0
  121. package/src/admin/search.ts +15 -0
  122. package/src/admin/setup/useSetupStatus.ts +1 -1
  123. package/src/admin/theme-api.ts +16 -5
  124. package/src/admin/ui.ts +82 -22
  125. package/src/astro/floats/runtime.ts +21 -0
  126. package/src/astro/menu/runtime.ts +34 -1
  127. package/src/astro/popups/runtime.ts +41 -9
  128. package/src/astro/render.ts +3 -0
  129. package/src/astro/resolve-theme.ts +53 -11
  130. package/src/astro/resolve.ts +9 -1
  131. package/src/astro/tabs/runtime.ts +12 -0
  132. package/src/astro/theme-posts.ts +2 -2
  133. package/src/astro/visitor.ts +2 -0
  134. package/src/constants.ts +1 -1
  135. package/src/core/a11y/audit.ts +196 -24
  136. package/src/core/arrange.ts +48 -12
  137. package/src/core/audience/rules.ts +5 -1
  138. package/src/core/audience/variants.ts +29 -3
  139. package/src/core/clipboard.ts +7 -0
  140. package/src/core/css/generate.ts +31 -6
  141. package/src/core/css/print.ts +5 -0
  142. package/src/core/data/bindings.ts +8 -1
  143. package/src/core/design/classes.ts +39 -16
  144. package/src/core/design/devices.ts +7 -13
  145. package/src/core/design/diff.ts +6 -0
  146. package/src/core/design/merge.ts +90 -2
  147. package/src/core/design/states.ts +7 -13
  148. package/src/core/design/tokens.ts +16 -2
  149. package/src/core/design/transfer.ts +33 -6
  150. package/src/core/design/variables.ts +30 -9
  151. package/src/core/elements/dynamic-elements.ts +53 -14
  152. package/src/core/elements/form-elements.ts +55 -16
  153. package/src/core/elements/index.ts +84 -39
  154. package/src/core/elements/menu.ts +40 -19
  155. package/src/core/elements/select-prompt.ts +3 -0
  156. package/src/core/elements/svg-ids.ts +39 -0
  157. package/src/core/forms/binding.ts +57 -16
  158. package/src/core/forms/definition.ts +72 -0
  159. package/src/core/history/diff.ts +18 -1
  160. package/src/core/icons/animation-runs.ts +11 -0
  161. package/src/core/icons/catalog.ts +3 -2
  162. package/src/core/image-edit/schema.ts +11 -1
  163. package/src/core/image-edit/summary.ts +6 -3
  164. package/src/core/index.ts +35 -1
  165. package/src/core/limits.ts +12 -1
  166. package/src/core/migrate/index.ts +3 -0
  167. package/src/core/perf/meter.ts +42 -7
  168. package/src/core/recipes/index.ts +5 -4
  169. package/src/core/render/context.ts +8 -0
  170. package/src/core/render/dynamic-post.ts +69 -12
  171. package/src/core/render/extras.ts +77 -4
  172. package/src/core/render/form.ts +140 -6
  173. package/src/core/render/index.ts +156 -20
  174. package/src/core/render/loop.ts +44 -8
  175. package/src/core/render/pagination.ts +18 -4
  176. package/src/core/render/section.ts +27 -0
  177. package/src/core/render/tabs.ts +12 -3
  178. package/src/core/render/vnode.ts +1 -1
  179. package/src/core/sanitize/css.ts +29 -8
  180. package/src/core/sanitize/embed-url.ts +42 -5
  181. package/src/core/sanitize/url.ts +2 -1
  182. package/src/core/saved-sections.ts +318 -0
  183. package/src/core/schema/design.ts +1 -1
  184. package/src/core/schema/layout.ts +16 -7
  185. package/src/core/schema/style.ts +4 -2
  186. package/src/core/stats.ts +2 -1
  187. package/src/core/theme/conditions.ts +3 -1
  188. package/src/core/theme/dynamic.ts +36 -5
  189. package/src/core/theme/float.ts +12 -2
  190. package/src/core/theme/pagination.ts +50 -29
  191. package/src/core/theme/part-types.ts +4 -4
  192. package/src/core/theme/popup-markup.ts +23 -5
  193. package/src/core/theme/popup-rules.ts +1 -0
  194. package/src/core/theme/triggers.ts +3 -2
  195. package/src/core/tree-ops.ts +27 -0
  196. package/src/mcp/ports.ts +22 -1
  197. package/src/mcp/rate-limit.ts +2 -1
  198. package/src/mcp/read.ts +15 -3
  199. package/src/mcp/refs.ts +18 -0
  200. package/src/mcp/sections.ts +183 -0
  201. package/src/mcp/tools.ts +44 -0
  202. package/src/mcp/write.ts +178 -14
  203. package/src/server/agent-settings.ts +1 -1
  204. package/src/server/hooks.ts +5 -3
  205. package/src/server/icon-routes.ts +30 -9
  206. package/src/server/mcp-routes.ts +8 -1
  207. package/src/server/plugin.ts +14 -0
  208. package/src/server/saved-sections.ts +163 -0
@@ -61,11 +61,19 @@ export const EDITOR_CSS = `${UI_CSS}
61
61
  .emvb-topbar-actions { gap: 8px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--color-kumo-hairline); flex-shrink: 0; }
62
62
  .emvb-topbar-actions > * { flex: 0 0 auto !important; width: auto !important; max-width: none !important; }
63
63
  .emvb-save-status { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; color: var(--text-color-kumo-subtle); white-space: nowrap; }
64
+ /* UX-084: below 1280 px the page title needs the room; Save draft's dot already shows unsaved
65
+ changes, so routine status stays for screen readers only. Errors always show. */
66
+ @media (max-width: 1279px) {
67
+ .emvb-save-status:not([data-emvb-save="error"]) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
68
+ }
64
69
  .emvb-danger-icon { color: var(--color-kumo-danger); }
65
- .emvb-link-button { border: 0; padding: 0; background: none; color: var(--text-color-kumo-default); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
70
+ .emvb-link-button { border: 0; padding: 0; background: none; color: var(--text-color-kumo-default); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; justify-self: start; align-self: flex-start; }
66
71
  .emvb-save-button, .emvb-publish-button { position: relative; }
67
- .emvb-styles-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 9999px; background: currentColor; }
68
- .emvb-unsaved-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 9999px; background: var(--text-color-kumo-default); }
72
+ /* W-806: Kumo's primary button wraps its label in a positioned span, so a dot element inside sat on
73
+ "Publish". The dot is drawn on the button itself, in its top-right corner (the button clips overflow). */
74
+ .emvb-publish-button[data-emvb-styles-pending="true"]::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 9999px; background: currentColor; }
75
+ /* UX-056: on the corner, ringed in the surface colour, so it no longer sits on the end of "draft". */
76
+ .emvb-unsaved-dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 9999px; background: var(--text-color-kumo-default); box-shadow: 0 0 0 2px var(--color-kumo-base); }
69
77
  .emvb-danger-text.emvb-danger-text { color: var(--text-color-kumo-danger); }
70
78
  .emvb-frame { display: grid; grid-template-columns: var(--emvb-panel-left) minmax(0, 1fr) var(--emvb-panel-right); min-height: 0; }
71
79
  .emvb-panel {
@@ -86,12 +94,29 @@ export const EDITOR_CSS = `${UI_CSS}
86
94
  }
87
95
  .emvb-panel-title { margin: 0; font-size: 14px; line-height: 18px; font-weight: 600; }
88
96
  .emvb-panel-body, .emvb-field-group, .emvb-new-variable, .emvb-section-body { display: flex; flex-direction: column; gap: 10px; }
97
+ .emvb-field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: start; }
98
+ /* UX-080: a native checkbox row (Query container) with room between box and label. */
99
+ .emvb-check { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; font-size: 13px; cursor: pointer; }
100
+ .emvb-check > input { width: 16px; height: 16px; margin: 0; }
101
+ @keyframes emvb-panel-enter { from { opacity: 0; } to { opacity: 1; } }
102
+ .emvb-left-panel > [data-emvb-panel],
103
+ .emvb-panel-right [data-emvb-tab],
104
+ .emvb-site-styles-body { animation: emvb-panel-enter 150ms cubic-bezier(0, 0, 0.2, 1); }
105
+ /* UX-010: a section's rows fade in as it opens (closing stays instant); the Site styles drawer slides in. */
106
+ .emvb-section-body { transition: opacity 150ms cubic-bezier(0, 0, 0.2, 1); }
107
+ .emvb-section-body[data-starting-style] { opacity: 0; }
108
+ .emvb-section-body[data-ending-style] { transition: none; }
109
+ @keyframes emvb-drawer-enter { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
110
+ .emvb-site-styles { animation: emvb-drawer-enter 200ms cubic-bezier(0, 0, 0.2, 1); }
89
111
  .emvb-field-group, .emvb-new-variable { gap: 8px; }
112
+ .emvb-field-group > .emvb-switch-hint { margin-top: -6px; padding-left: 44px; }
113
+ .emvb-new-variable-status { min-height: 16px; }
114
+ .emvb-variable-value-feedback { min-height: 32px; }
90
115
  .emvb-query-style, .emvb-query-add { display: flex; flex-direction: column; gap: 6px; }
91
116
  .emvb-query-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }
92
117
  .emvb-query-row > label, .emvb-query-row > .emvb-helper { grid-column: 1 / -1; }
93
- .emvb-query-style { border-left: 2px solid var(--emvb-border, #d4d4d8); padding-left: 8px; }
94
- .emvb-section-header { display: flex; align-items: center; justify-content: space-between; width: 100%; height: var(--emvb-control); margin-top: 4px; padding: 0; border: 0; border-top: 1px solid var(--color-kumo-hairline); background: none; color: var(--text-color-kumo-strong, var(--text-color-kumo-default)); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; }
118
+ .emvb-query-style { border-left: 2px solid var(--color-kumo-line); padding-left: 8px; }
119
+ .emvb-section-header { display: flex; align-items: center; justify-content: space-between; width: 100%; height: var(--emvb-control); margin-top: 4px; padding: 0; border: 0; border-top: 1px solid var(--color-kumo-hairline); background: none; color: var(--text-color-kumo-default); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
95
120
  .emvb-section-header:focus-visible, .emvb-layer-row:focus-visible, .emvb-empty-prompt:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
96
121
  .emvb-count { margin-left: 4px; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-color-kumo-subtle); }
97
122
  .emvb-section-body { padding-top: 4px; padding-bottom: 4px; }
@@ -141,9 +166,12 @@ export const EDITOR_CSS = `${UI_CSS}
141
166
  .emvb-custom-color-row { display: flex; align-items: flex-end; gap: 8px; }
142
167
  .emvb-custom-color-row > :first-child { flex: 1; min-width: 0; }
143
168
  .emvb-color-picker { width: 28px; height: 28px; padding: 2px; border: 0; border-radius: 6px; background: var(--color-kumo-control); box-shadow: inset 0 0 0 1px var(--color-kumo-line); cursor: pointer; }
144
- .emvb-fill-types { display: flex; flex-wrap: wrap; gap: 4px; }
145
- .emvb-fill-types button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--color-kumo-control); color: var(--text-color-kumo-default); box-shadow: inset 0 0 0 1px var(--color-kumo-line); cursor: pointer; }
146
- .emvb-fill-types button[aria-checked="true"] { background: var(--color-kumo-brand); color: #fff; box-shadow: none; }
169
+ /* UX-049: the fill type is a segmented choice on one row, like the state switcher; primary stays
170
+ reserved for Publish, confirms and the selection (DESIGN.md). */
171
+ .emvb-fill-types { display: grid; grid-auto-flow: column; grid-auto-columns: auto; gap: 2px; padding: 2px; border-radius: 8px; background: var(--color-kumo-recessed); }
172
+ .emvb-fill-types button { min-height: 24px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text-color-kumo-default); font: inherit; font-size: 13px; line-height: 18px; white-space: nowrap; cursor: pointer; }
173
+ .emvb-fill-types button[aria-checked="true"] { background: var(--color-kumo-base); color: var(--text-color-kumo-default); font-weight: 600; box-shadow: inset 0 0 0 1px var(--color-kumo-line); }
174
+ .emvb-fill-types button:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 1px; }
147
175
  .emvb-angle { display: flex; flex-direction: column; gap: 4px; }
148
176
  .emvb-angle-slider { width: 100%; accent-color: var(--color-kumo-brand); }
149
177
  .emvb-gradient-stop { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; box-shadow: inset 0 1px 0 var(--color-kumo-line); }
@@ -153,10 +181,13 @@ export const EDITOR_CSS = `${UI_CSS}
153
181
  .emvb-layer-select { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; height: var(--emvb-control); padding: 0 4px 0 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
154
182
  .emvb-layer-row:hover, .emvb-layer-row:hover .emvb-layer-select { background: var(--color-kumo-tint); }
155
183
  .emvb-layers:empty::after, .emvb-panel-body > .emvb-helper { color: var(--text-color-kumo-subtle); }
156
- .emvb-layer-select[aria-current="true"] { background: var(--color-kumo-brand); color: #fff; }
184
+ .emvb-layer-select[aria-current="true"], .emvb-layer-row:hover .emvb-layer-select[aria-current="true"] { background: var(--color-kumo-brand); color: #fff; }
157
185
  .emvb-layer-select:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: -2px; }
158
186
  .emvb-layer-select[aria-current="true"]:focus-visible { outline-color: #fff; }
159
187
  .emvb-layer-rename { flex: 1 1 auto; min-width: 0; height: var(--emvb-control); padding: 0 6px; border: 1px solid var(--color-kumo-brand); border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; }
188
+ .emvb-layer-rename:focus { outline: none; box-shadow: 0 0 0 1px var(--color-kumo-brand); }
189
+ .emvb-layer-menu-sep { margin: 4px 0; border: 0; border-top: 1px solid var(--color-kumo-hairline); }
190
+ .emvb-layer-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
160
191
  .emvb-layer-select > svg { flex: none; }
161
192
  .emvb-layer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
162
193
  .emvb-layer-preview { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-color-kumo-subtle); }
@@ -175,6 +206,8 @@ export const EDITOR_CSS = `${UI_CSS}
175
206
  .emvb-stage[data-emvb-zoom="actual"] { overflow-x: auto; }
176
207
  .emvb-stage-frame { position: relative; flex: none; height: 100%; overflow: hidden; }
177
208
  .emvb-stage-scaler { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
209
+ /* W-809: the canvas frame's keyboard focus ring (set from script; see frame-focus-ring.ts). */
210
+ iframe[data-emvb-canvas-focus="keyboard"] { outline: 2px solid var(--color-kumo-brand); outline-offset: -2px; }
178
211
  .emvb-zoom { min-width: 64px; font-variant-numeric: tabular-nums; }
179
212
  .emvb-preview-split { display: inline-flex; gap: 2px; }
180
213
  .emvb-canvas iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
@@ -206,13 +239,12 @@ export const EDITOR_CSS = `${UI_CSS}
206
239
  font-size: 11px;
207
240
  line-height: 14px;
208
241
  font-weight: 600;
209
- letter-spacing: 0.01em;
210
242
  white-space: nowrap;
211
243
  box-shadow: 0 1px 2px var(--color-kumo-shadow-edge), 0 2px 6px var(--color-kumo-shadow-drop);
212
244
  pointer-events: none;
213
245
  }
214
246
  .emvb-overlay-label > span { padding: 0 4px; }
215
- .emvb-overlay-action { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; pointer-events: auto; }
247
+ .emvb-overlay-action { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; pointer-events: auto; }
216
248
  .emvb-overlay-action:hover { background: var(--color-kumo-brand-hover); }
217
249
  .emvb-overlay-action:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
218
250
  .emvb-empty-canvas { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; }
@@ -221,7 +253,9 @@ export const EDITOR_CSS = `${UI_CSS}
221
253
  .emvb-small-screen { grid-row: 1 / -1; }
222
254
  .emvb-shortcuts { width: 100%; border-collapse: collapse; font-size: 13px; }
223
255
  .emvb-shortcuts td { padding: 6px 0; border-bottom: 1px solid var(--color-kumo-hairline); }
224
- .emvb-shortcuts td:last-child { text-align: right; font-family: var(--font-mono); color: var(--text-color-kumo-subtle); }
256
+ .emvb-shortcuts td:last-child { text-align: right; white-space: nowrap; font-size: 11px; color: var(--text-color-kumo-subtle); }
257
+ /* W-864: the same key boxes as the command palette's tips. */
258
+ .emvb-shortcuts kbd { display: inline-block; min-width: 18px; margin: 0 2px; padding: 0 4px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--color-kumo-line); font-family: var(--font-mono); font-size: 11px; line-height: 16px; text-align: center; color: var(--text-color-kumo-default); }
225
259
 
226
260
  .emvb-add-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
227
261
  .emvb-element-tile {
@@ -264,7 +298,8 @@ export const EDITOR_CSS = `${UI_CSS}
264
298
 
265
299
  .emvb-left-panel { gap: 12px; }
266
300
  .emvb-add-group { display: flex; flex-direction: column; gap: 8px; }
267
- .emvb-add-group-title { margin: 0; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--text-color-kumo-subtle); text-transform: uppercase; letter-spacing: 0.05em; }
301
+ .emvb-add-nomatch { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
302
+ .emvb-add-group-title { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-color-kumo-default); }
268
303
  .emvb-layer-caret { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 16px; }
269
304
  .emvb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
270
305
 
@@ -306,10 +341,15 @@ export const EDITOR_CSS = `${UI_CSS}
306
341
  .emvb-breadcrumb-part { border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; border-radius: 2px; }
307
342
  .emvb-breadcrumb-part:hover { color: var(--text-color-kumo-default); text-decoration: underline; text-underline-offset: 2px; }
308
343
  .emvb-breadcrumb-part:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
344
+ .emvb-breadcrumb-current { color: var(--text-color-kumo-default); }
309
345
  .emvb-style-row { display: flex; align-items: flex-start; gap: 4px; }
310
346
  .emvb-choice { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
311
347
  .emvb-choice-label { font-size: 13px; line-height: 20px; color: var(--text-color-kumo-default); }
312
348
  .emvb-style-row[data-set="true"] .emvb-choice-label { font-weight: 600; }
349
+ /* Property labels (DESIGN.md, UX-004): 13 px regular. Kumo field and select labels carry font-medium and select-none. */
350
+ .emvb-panel-right .font-medium.select-none:not(button) { font-size: 13px; line-height: 20px; font-weight: 400; }
351
+ .emvb-style-row .font-medium.select-none:not(button), .emvb-style-row .emvb-box-label, .emvb-style-row .emvb-var-field-label, .emvb-style-row .emvb-choice-label { color: var(--text-color-kumo-strong, var(--text-color-kumo-default)); }
352
+ .emvb-style-row[data-set="true"] .font-medium.select-none:not(button), .emvb-style-row[data-set="true"] .emvb-box-label, .emvb-style-row[data-set="true"] .emvb-var-field-label, .emvb-style-row[data-set="true"] .emvb-choice-label { color: var(--text-color-kumo-default); font-weight: 600; }
313
353
  .emvb-choice-group { display: flex; flex-wrap: wrap; gap: 4px; }
314
354
  .emvb-choice-group button {
315
355
  display: inline-flex; align-items: center; justify-content: center;
@@ -354,7 +394,7 @@ export const EDITOR_CSS = `${UI_CSS}
354
394
  .emvb-box > .emvb-box-body { display: flex; flex-direction: column; gap: 4px; }
355
395
  .emvb-box > .emvb-reset-btn { margin-top: 0; }
356
396
  .emvb-box-head { display: flex; align-items: center; gap: 2px; min-height: 28px; }
357
- .emvb-box-label { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-color-kumo-default); }
397
+ .emvb-box-label { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 20px; font-weight: 400; color: var(--text-color-kumo-default); }
358
398
  .emvb-box-head .emvb-var-btn { margin-top: 0; }
359
399
  .emvb-link-btn {
360
400
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
@@ -375,13 +415,13 @@ export const EDITOR_CSS = `${UI_CSS}
375
415
  .emvb-box-input:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: -1px; }
376
416
  .emvb-box-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--text-color-kumo-danger); }
377
417
  .emvb-box-input[data-bound="true"] { color: var(--color-kumo-brand); }
378
- .emvb-box-name { font-size: 11px; line-height: 14px; color: var(--text-color-kumo-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
418
+ .emvb-box-name { font-size: 11px; line-height: 14px; color: var(--text-color-kumo-subtle); text-align: center; max-width: 100%; }
379
419
  .emvb-box-error { margin: 0; font-size: 12px; line-height: 16px; color: var(--text-color-kumo-danger); }
380
420
  .emvb-var-btn:hover, .emvb-var-btn[data-popup-open] { background: var(--color-kumo-tint); color: var(--text-color-kumo-default); }
381
421
  .emvb-var-btn[data-active="true"] { color: var(--color-kumo-brand); }
382
422
  .emvb-var-btn:focus-visible, .emvb-var-chip-x:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 1px; }
383
423
  .emvb-var-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
384
- .emvb-var-field-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-color-kumo-default); }
424
+ .emvb-var-field-label { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--text-color-kumo-default); }
385
425
  .emvb-var-chip {
386
426
  display: flex; align-items: center; gap: 6px; min-width: 0; height: 28px; padding: 0 2px 0 8px;
387
427
  border-radius: 6px; background: var(--color-kumo-tint); color: var(--text-color-kumo-default);
@@ -403,11 +443,14 @@ export const EDITOR_CSS = `${UI_CSS}
403
443
  .emvb-var-option-value { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 11px; color: var(--text-color-kumo-subtle); }
404
444
  [data-emvb-var-option][data-selected="true"] .emvb-var-option-name { font-weight: 600; }
405
445
  .emvb-textarea { min-height: 72px; height: auto; padding: 8px; resize: vertical; font: inherit; }
406
- .emvb-field-label { font-size: 12px; font-weight: 500; color: var(--text-color-kumo-subtle); }
446
+ .emvb-field-label { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--text-color-kumo-default); }
407
447
  .emvb-panel [data-emvb-panel] .emvb-helper { margin-top: -2px; }
448
+ .emvb-panel [data-emvb-panel="conditions"] > .emvb-section-label + .emvb-helper { margin-top: 4px; }
408
449
 
409
450
  .emvb-media-actions { display: flex; flex-wrap: wrap; gap: 8px; }
410
451
  .emvb-media-preview { display: flex; flex-direction: column; gap: 4px; }
452
+ /* W-761: a long media URL ran past the panel edge. */
453
+ .emvb-media-preview > .emvb-helper { overflow-wrap: anywhere; }
411
454
  .emvb-media-edited { align-self: flex-start; }
412
455
  .emvb-media-cell { position: relative; }
413
456
  .emvb-media-cell .emvb-media-card-menu { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; padding: 0; opacity: 0.92; }
@@ -450,28 +493,30 @@ export const EDITOR_CSS = `${UI_CSS}
450
493
  }
451
494
  .emvb-chip-box:focus-within { box-shadow: inset 0 0 0 1px var(--color-kumo-brand); }
452
495
  .emvb-chip {
453
- display: inline-flex; align-items: center; min-width: 0; max-width: 100%; height: 20px;
496
+ /* UX-068: 24 px, so the menu and remove buttons meet the 24 px target size (WCAG 2.5.8). */
497
+ display: inline-flex; align-items: center; min-width: 0; max-width: 100%; height: 24px;
454
498
  border-radius: 4px; background: var(--color-kumo-tint); color: var(--text-color-kumo-default);
455
499
  font-family: var(--font-sans); font-size: 12px; line-height: 16px;
456
500
  }
457
501
  .emvb-chip:hover { background: var(--color-kumo-recessed); }
458
502
  .emvb-chip[data-active="true"] { background: var(--color-kumo-brand); color: #fff; }
503
+ .emvb-chip[data-missing] { background: transparent; box-shadow: inset 0 0 0 1px var(--color-kumo-danger); }
504
+ .emvb-chip[data-missing] .emvb-chip-main { cursor: default; }
459
505
  .emvb-chip-main {
460
- display: inline-flex; align-items: center; gap: 4px; min-width: 0; height: 20px; padding: 0 4px;
506
+ display: inline-flex; align-items: center; gap: 4px; min-width: 0; height: 24px; padding: 0 4px;
461
507
  border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer;
462
508
  }
463
509
  .emvb-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 144px; }
464
510
  .emvb-chip-icon {
465
511
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
466
- width: 16px; height: 20px; padding: 0; border: 0; border-radius: 4px;
512
+ width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px;
467
513
  background: transparent; color: inherit; cursor: pointer;
468
514
  }
469
- .emvb-chip-icon:last-child { margin-right: 2px; }
470
515
  .emvb-chip-icon:hover { background: color-mix(in oklab, currentColor 14%, transparent); }
471
516
  .emvb-chip :focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 1px; }
472
517
  .emvb-chip[data-active="true"] :focus-visible { outline-color: #fff; outline-offset: -2px; }
473
518
  .emvb-chip-rename {
474
- width: 128px; height: 20px; padding: 0 4px; border: 0; border-radius: 4px; outline: 0;
519
+ width: 128px; height: 24px; padding: 0 4px; border: 0; border-radius: 4px; outline: 0;
475
520
  background: var(--color-kumo-base); color: var(--text-color-kumo-default); font: inherit;
476
521
  box-shadow: inset 0 0 0 1px var(--color-kumo-brand);
477
522
  }
@@ -481,7 +526,6 @@ export const EDITOR_CSS = `${UI_CSS}
481
526
  }
482
527
  .emvb-save-local { align-self: flex-start; font-size: 13px; }
483
528
  .emvb-save-local-row { display: flex; flex-direction: column; gap: 8px; }
484
- .emvb-save-local-actions { display: flex; gap: 8px; }
485
529
  .emvb-chip-text::placeholder { color: var(--text-color-kumo-placeholder, var(--text-color-kumo-subtle)); }
486
530
  .emvb-chip-listbox {
487
531
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
@@ -502,9 +546,13 @@ export const EDITOR_CSS = `${UI_CSS}
502
546
  .emvb-site-styles-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
503
547
  .emvb-site-styles-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
504
548
  .emvb-site-styles-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
549
+ .emvb-style-diff { flex: 1 1 100%; }
550
+ .emvb-style-diff > summary { cursor: pointer; width: fit-content; border-radius: 4px; }
551
+ .emvb-style-diff > summary:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
552
+ .emvb-style-diff > ul { margin: 4px 0 0; padding-left: 16px; }
505
553
  .emvb-site-styles-subtitle { margin: 0; font-size: 11px; color: var(--text-color-kumo-subtle); }
506
554
  .emvb-site-styles-body { display: flex; flex-direction: column; gap: 10px; overflow: auto; min-height: 0; flex: 1 1 auto; }
507
- .emvb-site-styles-footer { margin-top: auto; }
555
+ .emvb-site-styles-footer { margin-top: auto; min-height: 32px; }
508
556
  .emvb-site-section { display: flex; flex-direction: column; gap: 6px; }
509
557
  .emvb-site-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
510
558
  .emvb-site-count {
@@ -568,6 +616,9 @@ export const EDITOR_CSS = `${UI_CSS}
568
616
  box-shadow: inset 0 0 0 1px var(--color-kumo-brand);
569
617
  }
570
618
  .emvb-site-empty-card { border-radius: 6px; border: 1px dashed var(--color-kumo-line); }
619
+ .emvb-site-empty-card > div { gap: 8px; padding: 20px 12px; border: 0; border-radius: inherit; }
620
+ .emvb-site-empty-card h2 { font-size: 14px; line-height: 18px; }
621
+ .emvb-site-empty-card p { font-size: 13px; line-height: 18px; }
571
622
  .emvb-site-empty {
572
623
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px;
573
624
  border-radius: 6px; border: 1px dashed var(--color-kumo-line);
@@ -3,28 +3,38 @@ import {
3
3
  ArrowsVerticalIcon,
4
4
  ArticleIcon,
5
5
  BrowserIcon,
6
+ BrowsersIcon,
7
+ CalendarBlankIcon,
8
+ CaretCircleDoubleDownIcon,
6
9
  CaretCircleDownIcon,
7
10
  CaretDownIcon,
11
+ CaretRightIcon,
8
12
  CheckSquareIcon,
13
+ ColumnsIcon,
9
14
  CursorClickIcon,
10
15
  GraphIcon,
11
16
  GridFourIcon,
12
17
  ImageIcon,
13
18
  LinkIcon,
14
19
  ListBulletsIcon,
20
+ ListIcon,
21
+ ListNumbersIcon,
15
22
  MinusIcon,
16
23
  NotePencilIcon,
17
24
  PaperPlaneRightIcon,
18
25
  RadioButtonIcon,
26
+ RepeatIcon,
19
27
  RowsIcon,
20
28
  SmileyIcon,
21
29
  SquareIcon,
22
30
  SquaresFourIcon,
31
+ StackIcon,
23
32
  TextAaIcon,
24
33
  TextAlignLeftIcon,
25
34
  TextboxIcon,
26
35
  TextHIcon,
27
36
  TextTIcon,
37
+ UserIcon,
28
38
  VideoCameraIcon,
29
39
  type Icon,
30
40
  } from "@phosphor-icons/react";
@@ -37,14 +47,14 @@ export const ELEMENT_NAMES: Record<string, string> = Object.fromEntries(
37
47
 
38
48
  /**
39
49
  * Phosphor icon for each element. The names in `docs/DESIGN.md` win. Types that table
40
- * does not list keep the icon the add panel already showed.
50
+ * does not list get an icon of their own, so no two Add tiles in a group look alike (UX-036).
41
51
  */
42
52
  export const ELEMENT_ICONS: Record<string, Icon> = {
43
53
  container: SquaresFourIcon,
44
54
  "div-block": SquareIcon,
45
55
  "layout-section": RowsIcon,
46
- section: RowsIcon,
47
- flexbox: SquaresFourIcon,
56
+ section: StackIcon,
57
+ flexbox: ColumnsIcon,
48
58
  grid: GridFourIcon,
49
59
  spacer: ArrowsVerticalIcon,
50
60
  divider: MinusIcon,
@@ -57,13 +67,13 @@ export const ELEMENT_ICONS: Record<string, Icon> = {
57
67
  image: ImageIcon,
58
68
  icon: SmileyIcon,
59
69
  svg: GraphIcon,
60
- tabs: BrowserIcon,
70
+ tabs: BrowsersIcon,
61
71
  "tab-panel": BrowserIcon,
62
- accordion: ListBulletsIcon,
63
- "accordion-item": ListBulletsIcon,
64
- menu: CaretDownIcon,
72
+ accordion: CaretCircleDoubleDownIcon,
73
+ "accordion-item": CaretRightIcon,
74
+ menu: ListIcon,
65
75
  "menu-item": CaretDownIcon,
66
- toc: ListBulletsIcon,
76
+ toc: ListNumbersIcon,
67
77
  video: VideoCameraIcon,
68
78
  form: ArticleIcon,
69
79
  "text-input": TextboxIcon,
@@ -77,9 +87,9 @@ export const ELEMENT_ICONS: Record<string, Icon> = {
77
87
  "post-content": NotePencilIcon,
78
88
  "post-image": ImageIcon,
79
89
  "post-link": LinkIcon,
80
- "post-date": TextTIcon,
81
- "post-author": TextTIcon,
82
- loop: ListBulletsIcon,
90
+ "post-date": CalendarBlankIcon,
91
+ "post-author": UserIcon,
92
+ loop: RepeatIcon,
83
93
  "loop-empty": SquareIcon,
84
94
  pagination: ArrowsLeftRightIcon,
85
95
  };
@@ -3,7 +3,7 @@
3
3
  * from the core chrome in editor-css.ts. Kumo variables only.
4
4
  */
5
5
  export const FEATURE_CSS = `
6
- .emvb-native-select, .emvb-native-input {
6
+ .emvb-native-input {
7
7
  height: var(--emvb-control, 28px);
8
8
  min-width: 0;
9
9
  padding: 0 8px;
@@ -13,24 +13,29 @@ export const FEATURE_CSS = `
13
13
  color: var(--text-color-kumo-default);
14
14
  font: inherit;
15
15
  }
16
- .emvb-native-select:focus-visible, .emvb-native-input:focus-visible {
16
+ .emvb-native-input:focus-visible {
17
17
  outline: 2px solid var(--color-kumo-brand);
18
18
  outline-offset: 1px;
19
19
  }
20
20
  .emvb-bind { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--color-kumo-hairline); }
21
- .emvb-bind-title { margin: 0; font-size: 12px; font-weight: 600; }
21
+ .emvb-bind-title { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; }
22
22
  .emvb-bind-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; }
23
23
  .emvb-bind-row > .emvb-bind-label { grid-column: 1 / -1; font-size: 12px; color: var(--text-color-kumo-subtle); }
24
+ .emvb-bind-row > .emvb-panel-select:last-child { grid-column: 1 / -1; }
25
+ /* W-867: a row with one text field (Countries, Segments, Time zone) gives it the full width, as its selects. */
26
+ .emvb-bind-row > .emvb-bind-label + .emvb-field:last-child { grid-column: 1 / -1; }
24
27
  .emvb-bind-live { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--text-color-kumo-default); overflow-wrap: anywhere; }
25
28
  .emvb-bind-live > b { font-weight: 600; }
26
29
  .emvb-bind-outside { grid-column: 1 / -1; display: grid; gap: 4px; }
27
30
  .emvb-bind-outside > label { display: flex; gap: 6px; align-items: center; font-size: 12px; }
28
31
  .emvb-bind-warning { margin: 0; padding: 6px 8px; border-radius: 6px; font-size: 12px; background: var(--color-kumo-warning-tint); color: var(--text-color-kumo-default); }
29
- .emvb-js-badge { margin-left: auto; padding: 0 4px; border-radius: 4px; font-size: 10px; font-weight: 700; line-height: 16px; background: var(--color-kumo-warning-tint); color: var(--text-color-kumo-default); }
32
+ .emvb-js-badge { margin-left: auto; padding: 0 4px; border-radius: 4px; font-size: 10px; font-weight: 600; line-height: 16px; background: var(--color-kumo-warning-tint); color: var(--text-color-kumo-default); }
30
33
  .emvb-element-tile { position: relative; }
31
34
  .emvb-element-tile > .emvb-js-badge { position: absolute; top: 4px; right: 4px; }
32
35
  .emvb-perf-bars { display: grid; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
33
- .emvb-perf-bars > li { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
36
+ /* UX-083: rows share one grid, so every bar starts and ends at the same place. */
37
+ .emvb-perf-bars { grid-template-columns: 90px minmax(0, 1fr) max-content; column-gap: 8px; }
38
+ .emvb-perf-bars > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; font-size: 13px; }
34
39
  .emvb-perf-bar { display: block; height: 8px; border-radius: 4px; background: var(--color-kumo-tint); overflow: hidden; }
35
40
  .emvb-perf-bar > span { display: block; height: 100%; background: var(--color-kumo-brand); }
36
41
  .emvb-perf-bars > li[data-over] .emvb-perf-bar > span { background: var(--color-kumo-danger); }
@@ -44,15 +49,25 @@ export const FEATURE_CSS = `
44
49
  .emvb-aud-checks { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 0; border: 0; font-size: 12px; }
45
50
  .emvb-aud-checks > legend { width: 100%; padding: 0; margin-bottom: 2px; }
46
51
  .emvb-palette { padding: 0; overflow: hidden; }
52
+ /* UX-093: anchored near the top, so the box doesn't jump up and down as results filter. */
53
+ .emvb-palette.emvb-palette { top: max(12vh, 32px); translate: -50% 0; }
54
+ /* W-810: the dialog sized to its rows, so it widened and jumped sideways as results with longer
55
+ labels appeared. A fixed width (within the viewport) keeps it still while typing. */
56
+ .emvb-palette.emvb-palette.emvb-palette { width: min(564px, calc(100vw - 32px)); }
47
57
  .emvb-palette-input { width: 100%; height: 44px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--color-kumo-line); background: transparent; color: var(--text-color-kumo-default); font: inherit; font-size: 15px; outline: none; }
48
58
  .emvb-palette-list { max-height: min(60vh, 420px); overflow-y: auto; margin: 0; padding: 4px; list-style: none; }
49
- .emvb-palette-group { padding: 8px 10px 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-color-kumo-subtle); }
59
+ .emvb-palette-group { padding: 8px 10px 2px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-color-kumo-subtle); }
50
60
  .emvb-palette-item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
51
61
  .emvb-palette-item[aria-selected="true"] { background: var(--color-kumo-tint); }
52
- .emvb-palette-hint { color: var(--text-color-kumo-subtle); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
53
- .emvb-palette-empty { padding: 12px; color: var(--text-color-kumo-subtle); font-size: 13px; }
54
- .emvb-palette-tips { margin: 0; padding: 6px 12px; border-top: 1px solid var(--color-kumo-line); font-size: 11px; color: var(--text-color-kumo-subtle); }
62
+ .emvb-palette-hint { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 50%; color: var(--text-color-kumo-subtle); font-size: 12px; white-space: nowrap; }
63
+ .emvb-palette-kind { flex: none; padding: 0 6px; border-radius: 4px; line-height: 18px; background: var(--color-kumo-base); box-shadow: inset 0 0 0 1px var(--color-kumo-line); color: var(--text-color-kumo-default); }
64
+ .emvb-palette-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
65
+ /* W-760: a long query with no spaces widened the palette past the screen. */
66
+ .emvb-palette-empty { padding: 12px; color: var(--text-color-kumo-subtle); font-size: 13px; overflow-wrap: anywhere; contain: inline-size; }
67
+ .emvb-palette-tips { margin: 0; padding: 6px 12px; border-top: 1px solid var(--color-kumo-line); font-size: 12px; line-height: 18px; color: var(--text-color-kumo-subtle); }
68
+ .emvb-palette-tips kbd { display: inline-block; min-width: 18px; padding: 0 4px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--color-kumo-line); font-family: var(--font-mono); font-size: 11px; line-height: 16px; text-align: center; color: var(--text-color-kumo-default); }
55
69
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
70
+ .emvb-timeline-error { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
56
71
  .emvb-timeline-body { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin: 12px 0; min-height: 0; }
57
72
  .emvb-timeline-list { margin: 0; padding: 0; list-style: none; max-height: 60vh; overflow-y: auto; }
58
73
  .emvb-timeline-list { display: grid; gap: 2px; padding-inline-end: 4px; }
@@ -87,13 +102,17 @@ export const FEATURE_CSS = `
87
102
  .emvb-timeline-changes > li[data-kind="removed"] .emvb-timeline-kind { color: var(--text-color-kumo-danger); }
88
103
  .emvb-timeline-changes > li[data-kind="changed"] .emvb-timeline-kind { color: var(--text-color-kumo-warning); }
89
104
  .emvb-tokens-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
90
- .emvb-tokens-grid > label { display: grid; gap: 4px; min-width: 0; }
105
+ .emvb-tokens-grid > label, .emvb-tokens-field { display: grid; gap: 4px; min-width: 0; }
91
106
  .emvb-tokens-fluid { display: flex !important; align-items: center; gap: 4px; font-size: 12px; }
92
- .emvb-tokens-preview { margin: 8px 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12px; }
93
- .emvb-tokens-preview > li { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; }
107
+ /* UX-057: Ratio and the small-screen size take the full row, so "Major third" and the label
108
+ "On small screens (px)" no longer truncate or wrap at the drawer's width. */
109
+ .emvb-tokens-grid > [data-emvb-tokens-row="full"] { grid-column: 1 / -1; }
110
+ .emvb-tokens-preview { margin: 8px 0; padding: 0; list-style: none; display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; gap: 4px 8px; font-size: 12px; }
111
+ .emvb-tokens-preview > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-height: 24px; }
112
+ .emvb-tokens-preview > li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
94
113
  .emvb-tokens-sample { display: inline-block; height: 1em; line-height: 1; }
95
114
  .emvb-tokens-preview .emvb-tokens-sample:empty { height: 8px; border-radius: 2px; background: var(--color-kumo-brand); }
96
- .emvb-tokens-preview code { font-size: 11px; color: var(--text-color-kumo-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
115
+ .emvb-tokens-preview code { font-size: 11px; color: var(--text-color-kumo-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
97
116
  .emvb-a11y-score { height: 28px; padding: 0 8px; border: 1px solid var(--color-kumo-line); border-radius: 999px; background: transparent; color: var(--text-color-kumo-default); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
98
117
  .emvb-a11y-score[data-band="good"] b, .emvb-a11y [data-band="good"] { color: var(--text-color-kumo-success); }
99
118
  .emvb-a11y-score[data-band="fair"] b, .emvb-a11y [data-band="fair"] { color: var(--text-color-kumo-warning); }
@@ -102,10 +121,22 @@ export const FEATURE_CSS = `
102
121
  .emvb-a11y-issues { margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
103
122
  .emvb-a11y-issues > li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; font-size: 13px; padding-left: 8px; border-left: 3px solid var(--color-kumo-warning); }
104
123
  .emvb-a11y-issues > li[data-severity="error"] { border-left-color: var(--color-kumo-danger); }
124
+ .emvb-a11y-severity { flex: none; margin-top: 2px; color: var(--text-color-kumo-warning); }
125
+ .emvb-a11y-issues > li[data-severity="error"] .emvb-a11y-severity { color: var(--text-color-kumo-danger); }
126
+ .emvb-a11y-what { flex: 1 1 auto; min-width: 0; }
105
127
  .emvb-a11y-actions { display: flex; gap: 8px; justify-content: flex-end; }
106
128
  .emvb-sources { margin: 4px 0 8px; font-size: 12px; }
107
129
  .emvb-sources > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
108
- .emvb-sources-count { font-weight: 400; color: var(--text-color-kumo-subtle); }
130
+ .emvb-sources-count { font-weight: 400; color: var(--text-color-kumo-subtle); display: inline-flex; align-items: center; gap: 8px; }
131
+ .emvb-sources > summary { list-style: none; align-items: center; border-radius: 4px; }
132
+ /* UX-066: the label stays on one line; a long count moves under it, right-aligned. */
133
+ .emvb-sources > summary { flex-wrap: wrap; row-gap: 2px; }
134
+ .emvb-sources-label { white-space: nowrap; }
135
+ .emvb-sources-count { margin-left: auto; white-space: nowrap; }
136
+ .emvb-sources > summary::-webkit-details-marker { display: none; }
137
+ .emvb-sources > summary:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
138
+ .emvb-sources-caret { color: var(--text-color-kumo-default); }
139
+ .emvb-sources[open] .emvb-sources-caret { transform: rotate(90deg); }
109
140
  .emvb-sources ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
110
141
  .emvb-sources li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding-left: 6px; border-left: 2px solid var(--color-kumo-line); }
111
142
  .emvb-sources li[data-kind="class"] { border-left-color: var(--color-kumo-info); }
@@ -119,6 +150,17 @@ export const FEATURE_CSS = `
119
150
  .emvb-recipe-tile:hover, .emvb-recipe-tile:focus-visible { border-color: var(--color-kumo-brand); }
120
151
  .emvb-recipe-name { font-weight: 600; font-size: 13px; }
121
152
  .emvb-recipe-desc { font-size: 12px; color: var(--text-color-kumo-subtle); }
153
+ /* W-876: My sections, names only (D-060). */
154
+ .emvb-saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
155
+ .emvb-saved-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
156
+ .emvb-saved-name { flex: 1 1 auto; min-width: 0; text-align: start; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--color-kumo-line); background: var(--color-kumo-base, transparent); cursor: pointer; font: inherit; font-size: 13px; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
157
+ .emvb-saved-name:hover:not(:disabled), .emvb-saved-name:focus-visible { border-color: var(--color-kumo-brand); }
158
+ .emvb-saved-name:disabled { cursor: not-allowed; color: var(--text-color-kumo-subtle); }
159
+ .emvb-saved-row .emvb-saved-rename { flex: 1 1 auto; }
160
+ .emvb-saved-error { display: grid; gap: 6px; justify-items: start; }
122
161
  .emvb-motion-effect { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; }
123
162
  .emvb-motion-name { grid-column: 1 / -1; font-size: 12px; font-weight: 600; }
163
+ /* UX-092: the fixed theme part type, its label and value on one line */
164
+ .emvb-part-type { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; }
165
+ .emvb-part-type-value { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--text-color-kumo-default); }
124
166
  `;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Focuses the selected layer or the canvas if focus ends up on <body>. A closing dialog keeps
3
+ * focus until its close animation ends, so wait (up to 2 s) while focus is still in a dialog;
4
+ * other dialog-like layers (toasts) don't hold it up. Returns a cancel.
5
+ */
6
+ export function focusWhenLost(): () => void {
7
+ const started = Date.now();
8
+ let timer: number | undefined;
9
+ const settle = () => {
10
+ const now = document.activeElement;
11
+ if (now && now !== document.body) {
12
+ const inDialog = now.closest('[role="dialog"], [role="alertdialog"]') !== null;
13
+ if (inDialog && Date.now() - started < 2000) timer = window.setTimeout(settle, 30);
14
+ return;
15
+ }
16
+ const target =
17
+ document.querySelector<HTMLElement>('.emvb-layer-select[aria-current="true"]') ??
18
+ document.querySelector<HTMLElement>("iframe[data-emvb-canvas]");
19
+ target?.focus({ preventScroll: true });
20
+ };
21
+ timer = window.setTimeout(settle, 30);
22
+ return () => window.clearTimeout(timer);
23
+ }