@perkyzz/emvb 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/admin/access/RequireEditor.tsx +7 -7
- package/src/admin/access/role.ts +5 -2
- package/src/admin/content-api.ts +10 -3
- package/src/admin/content-item.ts +1 -1
- package/src/admin/editor/A11yCopilot.tsx +104 -56
- package/src/admin/editor/CommandPalette.tsx +29 -13
- package/src/admin/editor/Editor.tsx +82 -20
- package/src/admin/editor/EditorToasts.tsx +26 -0
- package/src/admin/editor/PerfMeter.tsx +97 -72
- package/src/admin/editor/ShareLink.tsx +107 -72
- package/src/admin/editor/ShortcutsDialog.tsx +27 -16
- package/src/admin/editor/Timeline.tsx +255 -160
- package/src/admin/editor/TopBar.tsx +71 -14
- package/src/admin/editor/canvas/CanvasFrame.tsx +10 -1
- package/src/admin/editor/canvas/CanvasTextEdit.tsx +8 -2
- package/src/admin/editor/canvas/drop-line.ts +11 -3
- package/src/admin/editor/canvas/frame-focus-ring.ts +37 -0
- package/src/admin/editor/canvas/use-canvas-dnd.ts +32 -3
- package/src/admin/editor/canvas/vnode-react.tsx +7 -0
- package/src/admin/editor/collection-previews.ts +10 -0
- package/src/admin/editor/dialogs.tsx +38 -14
- package/src/admin/editor/dnd/drop-target.ts +26 -1
- package/src/admin/editor/edited-noun.ts +15 -0
- package/src/admin/editor/editor-chrome.tsx +59 -7
- package/src/admin/editor/editor-commands.ts +2 -1
- package/src/admin/editor/editor-css.ts +72 -22
- package/src/admin/editor/element-chrome.ts +21 -11
- package/src/admin/editor/feature-css.ts +45 -13
- package/src/admin/editor/icons/IconLibraryDialog.tsx +52 -11
- package/src/admin/editor/icons/library.ts +1 -1
- package/src/admin/editor/icons/use-icon-library.ts +5 -2
- package/src/admin/editor/ime.ts +29 -0
- package/src/admin/editor/palette-items.ts +10 -3
- package/src/admin/editor/panels/AddPanel.tsx +35 -10
- package/src/admin/editor/panels/ClassesSection.tsx +18 -7
- package/src/admin/editor/panels/ColorControl.tsx +130 -23
- package/src/admin/editor/panels/ConditionsEditor.tsx +52 -26
- package/src/admin/editor/panels/ElementPanel.tsx +134 -24
- package/src/admin/editor/panels/LayersPanel.tsx +55 -19
- package/src/admin/editor/panels/PageSettings.tsx +66 -35
- package/src/admin/editor/panels/SiteStylesDrawer.tsx +170 -32
- package/src/admin/editor/panels/TokenScales.tsx +76 -36
- package/src/admin/editor/panels/TriggerSettings.tsx +50 -12
- package/src/admin/editor/panels/TriggersEditor.tsx +2 -1
- package/src/admin/editor/panels/VariableSection.tsx +48 -18
- package/src/admin/editor/panels/color-space.ts +9 -3
- package/src/admin/editor/panels/settings/AdvancedFields.tsx +12 -2
- package/src/admin/editor/panels/settings/AudienceEditor.tsx +51 -35
- package/src/admin/editor/panels/settings/BackgroundControls.tsx +55 -11
- package/src/admin/editor/panels/settings/BackgroundFill.tsx +3 -2
- package/src/admin/editor/panels/settings/BindingsEditor.tsx +15 -18
- package/src/admin/editor/panels/settings/BoxControl.tsx +2 -1
- package/src/admin/editor/panels/settings/ClassChip.tsx +21 -9
- package/src/admin/editor/panels/settings/ClassChipInput.tsx +24 -16
- package/src/admin/editor/panels/settings/DraftTextField.tsx +41 -3
- package/src/admin/editor/panels/settings/EffectsControls.tsx +38 -14
- package/src/admin/editor/panels/settings/FieldBindControl.tsx +46 -28
- package/src/admin/editor/panels/settings/FieldControl.tsx +20 -8
- package/src/admin/editor/panels/settings/FormBindControl.tsx +2 -2
- package/src/admin/editor/panels/settings/HintedSwitch.tsx +33 -0
- package/src/admin/editor/panels/settings/IconControls.tsx +12 -8
- package/src/admin/editor/panels/settings/IconPicker.tsx +2 -0
- package/src/admin/editor/panels/settings/ImageSourcesField.tsx +3 -1
- package/src/admin/editor/panels/settings/ItemList.tsx +15 -2
- package/src/admin/editor/panels/settings/LengthRow.tsx +8 -6
- package/src/admin/editor/panels/settings/MediaPicker.tsx +127 -23
- package/src/admin/editor/panels/settings/MotionControl.tsx +28 -15
- package/src/admin/editor/panels/settings/NumberRow.tsx +9 -3
- package/src/admin/editor/panels/settings/PanelSelect.tsx +50 -0
- package/src/admin/editor/panels/settings/QueryStyleRows.tsx +25 -18
- package/src/admin/editor/panels/settings/RequiredFieldsNotice.tsx +66 -1
- package/src/admin/editor/panels/settings/StyleRow.tsx +10 -3
- package/src/admin/editor/panels/settings/StyleSources.tsx +4 -1
- package/src/admin/editor/panels/settings/VariantEditor.tsx +10 -1
- package/src/admin/editor/panels/settings/box-link-name.ts +6 -2
- package/src/admin/editor/panels/settings/class-suggest.ts +7 -7
- package/src/admin/editor/panels/settings/query-style.ts +38 -9
- package/src/admin/editor/panels/settings/svg-images.ts +13 -0
- package/src/admin/editor/panels/site-list.tsx +20 -6
- package/src/admin/editor/panels/variable-values.ts +11 -4
- package/src/admin/editor/restore-deleted.ts +21 -2
- package/src/admin/editor/section-templates.ts +81 -12
- package/src/admin/editor/shortcuts.ts +17 -2
- package/src/admin/editor/store.ts +7 -0
- package/src/admin/editor/useEditorCommands.ts +61 -15
- package/src/admin/editor/useEditorData.ts +4 -2
- package/src/admin/editor/useEditorShortcuts.ts +17 -7
- package/src/admin/editor/useNodeActions.ts +61 -6
- package/src/admin/editor/useSave.ts +22 -7
- package/src/admin/forms-api.ts +2 -0
- package/src/admin/image-editor/CurvesPanel.tsx +2 -1
- package/src/admin/image-editor/ExportDialog.tsx +48 -18
- package/src/admin/image-editor/ImageEditorDialog.tsx +49 -7
- package/src/admin/image-editor/MetadataPanel.tsx +15 -4
- package/src/admin/image-editor/crop-geometry.ts +3 -2
- package/src/admin/image-editor/image-editor-css.ts +4 -2
- package/src/admin/image-editor/load.ts +9 -2
- package/src/admin/image-editor/parts.tsx +51 -2
- package/src/admin/image-editor/save.ts +23 -7
- package/src/admin/media-api.ts +2 -1
- package/src/admin/pages/AgentsPage.tsx +138 -27
- package/src/admin/pages/CreateDialog.tsx +97 -30
- package/src/admin/pages/NewPageDialog.tsx +21 -3
- package/src/admin/pages/NewThemePartDialog.tsx +11 -3
- package/src/admin/pages/PageList.tsx +14 -6
- package/src/admin/pages/SetupShell.tsx +28 -12
- package/src/admin/pages/ThemePartList.tsx +27 -7
- package/src/admin/pages/list-kit.tsx +106 -24
- package/src/admin/search.ts +15 -0
- package/src/admin/setup/useSetupStatus.ts +1 -1
- package/src/admin/theme-api.ts +13 -3
- package/src/admin/ui.ts +73 -22
- package/src/astro/floats/runtime.ts +21 -0
- package/src/astro/menu/runtime.ts +34 -1
- package/src/astro/popups/runtime.ts +33 -3
- package/src/astro/render.ts +3 -0
- package/src/astro/resolve-theme.ts +53 -11
- package/src/astro/resolve.ts +9 -1
- package/src/astro/tabs/runtime.ts +12 -0
- package/src/astro/theme-posts.ts +2 -2
- package/src/astro/visitor.ts +2 -0
- package/src/constants.ts +1 -1
- package/src/core/a11y/audit.ts +171 -24
- package/src/core/arrange.ts +27 -6
- package/src/core/audience/rules.ts +5 -1
- package/src/core/audience/variants.ts +29 -3
- package/src/core/clipboard.ts +7 -0
- package/src/core/css/generate.ts +31 -6
- package/src/core/data/bindings.ts +8 -1
- package/src/core/design/classes.ts +16 -7
- package/src/core/design/diff.ts +6 -0
- package/src/core/design/merge.ts +90 -2
- package/src/core/design/tokens.ts +16 -2
- package/src/core/design/transfer.ts +33 -6
- package/src/core/design/variables.ts +30 -9
- package/src/core/elements/dynamic-elements.ts +44 -5
- package/src/core/elements/form-elements.ts +55 -16
- package/src/core/elements/index.ts +83 -38
- package/src/core/elements/menu.ts +37 -19
- package/src/core/elements/select-prompt.ts +3 -0
- package/src/core/elements/svg-ids.ts +39 -0
- package/src/core/forms/binding.ts +57 -16
- package/src/core/forms/definition.ts +72 -0
- package/src/core/history/diff.ts +18 -1
- package/src/core/icons/catalog.ts +3 -2
- package/src/core/image-edit/schema.ts +11 -1
- package/src/core/image-edit/summary.ts +6 -3
- package/src/core/index.ts +15 -1
- package/src/core/limits.ts +12 -1
- package/src/core/perf/meter.ts +42 -7
- package/src/core/recipes/index.ts +5 -4
- package/src/core/render/context.ts +8 -0
- package/src/core/render/dynamic-post.ts +69 -12
- package/src/core/render/extras.ts +77 -4
- package/src/core/render/form.ts +140 -6
- package/src/core/render/index.ts +156 -20
- package/src/core/render/loop.ts +43 -7
- package/src/core/render/pagination.ts +18 -4
- package/src/core/render/section.ts +27 -0
- package/src/core/render/tabs.ts +12 -3
- package/src/core/render/vnode.ts +1 -1
- package/src/core/sanitize/css.ts +15 -2
- package/src/core/sanitize/embed-url.ts +42 -5
- package/src/core/sanitize/url.ts +2 -1
- package/src/core/schema/layout.ts +15 -6
- package/src/core/stats.ts +2 -1
- package/src/core/theme/conditions.ts +3 -1
- package/src/core/theme/dynamic.ts +36 -5
- package/src/core/theme/float.ts +9 -2
- package/src/core/theme/pagination.ts +31 -11
- package/src/core/theme/popup-markup.ts +23 -5
- package/src/core/theme/popup-rules.ts +1 -0
- package/src/core/theme/triggers.ts +3 -2
- package/src/core/tree-ops.ts +27 -0
- package/src/mcp/rate-limit.ts +2 -1
- package/src/mcp/read.ts +14 -2
- package/src/mcp/refs.ts +18 -0
- package/src/mcp/write.ts +174 -10
- package/src/server/agent-settings.ts +1 -1
- package/src/server/hooks.ts +5 -3
- package/src/server/icon-routes.ts +30 -9
- package/src/server/mcp-routes.ts +6 -1
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type ElementType,
|
|
8
8
|
type LayoutNode,
|
|
9
9
|
type PopupDevice,
|
|
10
|
+
type ThemeDynamicData,
|
|
10
11
|
} from "../../core/index.ts";
|
|
11
12
|
import type { Fetcher } from "../api.ts";
|
|
12
13
|
import { discardDraft } from "../content-api.ts";
|
|
@@ -71,6 +72,30 @@ const CLOSED = {
|
|
|
71
72
|
|
|
72
73
|
type ChromeKey = keyof typeof CLOSED;
|
|
73
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Focuses the selected layer or the canvas if focus ends up on <body>. A closing dialog keeps
|
|
77
|
+
* focus until its close animation ends, so wait (up to 2 s) while focus is still in a dialog;
|
|
78
|
+
* other dialog-like layers (toasts) don't hold it up. Returns a cancel.
|
|
79
|
+
*/
|
|
80
|
+
function focusWhenLost(): () => void {
|
|
81
|
+
const started = Date.now();
|
|
82
|
+
let timer: number | undefined;
|
|
83
|
+
const settle = () => {
|
|
84
|
+
const now = document.activeElement;
|
|
85
|
+
if (now && now !== document.body) {
|
|
86
|
+
const inDialog = now.closest('[role="dialog"], [role="alertdialog"]') !== null;
|
|
87
|
+
if (inDialog && Date.now() - started < 2000) timer = window.setTimeout(settle, 30);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const target =
|
|
91
|
+
document.querySelector<HTMLElement>('.emvb-layer-select[aria-current="true"]') ??
|
|
92
|
+
document.querySelector<HTMLElement>("iframe[data-emvb-canvas]");
|
|
93
|
+
target?.focus({ preventScroll: true });
|
|
94
|
+
};
|
|
95
|
+
timer = window.setTimeout(settle, 30);
|
|
96
|
+
return () => window.clearTimeout(timer);
|
|
97
|
+
}
|
|
98
|
+
|
|
74
99
|
/** Which editor dialog is open. They all start closed. */
|
|
75
100
|
export function useChromeFlags() {
|
|
76
101
|
const [flags, setFlags] = React.useState(CLOSED);
|
|
@@ -79,6 +104,18 @@ export function useChromeFlags() {
|
|
|
79
104
|
const close = (key: ChromeKey) => setFlags((current) => ({ ...current, [key]: false }));
|
|
80
105
|
const setOpen = (key: ChromeKey) => (next: boolean) =>
|
|
81
106
|
setFlags((current) => ({ ...current, [key]: next }));
|
|
107
|
+
// W-831: a dialog opened from the command palette has no trigger left to return focus to (the
|
|
108
|
+
// palette is gone), so closing it dropped focus to <body>. When one closes and nothing took
|
|
109
|
+
// focus, go to the selected layer, else the canvas, as the palette does after a command.
|
|
110
|
+
const previous = React.useRef(flags);
|
|
111
|
+
React.useEffect(() => {
|
|
112
|
+
const was = previous.current;
|
|
113
|
+
previous.current = flags;
|
|
114
|
+
const closed = (Object.keys(flags) as ChromeKey[]).some(
|
|
115
|
+
(key) => key !== "palette" && was[key] && !flags[key],
|
|
116
|
+
);
|
|
117
|
+
return closed ? focusWhenLost() : undefined;
|
|
118
|
+
}, [flags]);
|
|
82
119
|
return { flags, leaving, setLeaving, open, close, setOpen };
|
|
83
120
|
}
|
|
84
121
|
|
|
@@ -193,6 +230,7 @@ export function EditorDialogs({
|
|
|
193
230
|
finishDelete,
|
|
194
231
|
playgroundUrl,
|
|
195
232
|
setAnnouncement,
|
|
233
|
+
parts,
|
|
196
234
|
}: {
|
|
197
235
|
chrome: ChromeFlags;
|
|
198
236
|
fetcher: Fetcher;
|
|
@@ -215,7 +253,10 @@ export function EditorDialogs({
|
|
|
215
253
|
finishDelete: (id: string) => void;
|
|
216
254
|
playgroundUrl?: string;
|
|
217
255
|
setAnnouncement: (message: string) => void;
|
|
256
|
+
/** Synced sections and Loop Item parts loaded for the canvas (W-671). */
|
|
257
|
+
parts?: ThemeDynamicData;
|
|
218
258
|
}) {
|
|
259
|
+
const [leaveSaving, setLeaveSaving] = React.useState(false);
|
|
219
260
|
return (
|
|
220
261
|
<>
|
|
221
262
|
<DeleteSubtreeDialog
|
|
@@ -223,7 +264,13 @@ export function EditorDialogs({
|
|
|
223
264
|
onOpenChange={(open) => !open && setDeleteAsk(null)}
|
|
224
265
|
label={deleteAsk?.label ?? "Element"}
|
|
225
266
|
count={deleteAsk?.count ?? 0}
|
|
226
|
-
onConfirm={() =>
|
|
267
|
+
onConfirm={() => {
|
|
268
|
+
if (!deleteAsk) return;
|
|
269
|
+
finishDelete(deleteAsk.id);
|
|
270
|
+
// W-835: the dialog hands focus back to the deleted row, which is gone; go to the
|
|
271
|
+
// newly selected layer (or the canvas) instead of <body>.
|
|
272
|
+
focusWhenLost();
|
|
273
|
+
}}
|
|
227
274
|
/>
|
|
228
275
|
<PaletteImageEditor
|
|
229
276
|
open={chrome.flags.imageEditor}
|
|
@@ -317,6 +364,7 @@ export function EditorDialogs({
|
|
|
317
364
|
onOpenChange={chrome.setOpen("perf")}
|
|
318
365
|
layout={state.page.layout}
|
|
319
366
|
design={state.design}
|
|
367
|
+
parts={parts}
|
|
320
368
|
onSelect={(id) => dispatch({ type: "select", id })}
|
|
321
369
|
/>
|
|
322
370
|
<ConflictDialog
|
|
@@ -344,12 +392,16 @@ export function EditorDialogs({
|
|
|
344
392
|
open={chrome.flags.leave}
|
|
345
393
|
onOpenChange={chrome.setOpen("leave")}
|
|
346
394
|
onDiscard={() => chrome.setLeaving(true)}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
395
|
+
saving={leaveSaving}
|
|
396
|
+
onSaveAndLeave={() => {
|
|
397
|
+
setLeaveSaving(true);
|
|
398
|
+
void save()
|
|
399
|
+
.then((rev) => {
|
|
400
|
+
chrome.close("leave");
|
|
401
|
+
if (rev) chrome.setLeaving(true);
|
|
402
|
+
})
|
|
403
|
+
.finally(() => setLeaveSaving(false));
|
|
404
|
+
}}
|
|
353
405
|
/>
|
|
354
406
|
</>
|
|
355
407
|
);
|
|
@@ -248,7 +248,8 @@ function shown(id: string, input: CommandInput): boolean {
|
|
|
248
248
|
function blocked(id: string, input: CommandInput): boolean {
|
|
249
249
|
if (id === "paste" || id === "paste-inside") return !!input.runners.pasteBlocked;
|
|
250
250
|
if (id === "paste-style") return !!input.runners.pasteStyleBlocked;
|
|
251
|
-
|
|
251
|
+
// W-567: the root is the page itself and the page never hides it.
|
|
252
|
+
if (id === "hide-on-device") return !input.targetId || !!input.isRoot;
|
|
252
253
|
return false;
|
|
253
254
|
}
|
|
254
255
|
|
|
@@ -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
|
-
|
|
68
|
-
.
|
|
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(--
|
|
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-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
.emvb-fill-types
|
|
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; }
|
|
@@ -212,7 +245,7 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
212
245
|
pointer-events: none;
|
|
213
246
|
}
|
|
214
247
|
.emvb-overlay-label > span { padding: 0 4px; }
|
|
215
|
-
.emvb-overlay-action { display: inline-flex; align-items: center; justify-content: center; width:
|
|
248
|
+
.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
249
|
.emvb-overlay-action:hover { background: var(--color-kumo-brand-hover); }
|
|
217
250
|
.emvb-overlay-action:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
|
|
218
251
|
.emvb-empty-canvas { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; }
|
|
@@ -264,7 +297,8 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
264
297
|
|
|
265
298
|
.emvb-left-panel { gap: 12px; }
|
|
266
299
|
.emvb-add-group { display: flex; flex-direction: column; gap: 8px; }
|
|
267
|
-
.emvb-add-
|
|
300
|
+
.emvb-add-nomatch { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
|
|
301
|
+
.emvb-add-group-title { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-color-kumo-default); }
|
|
268
302
|
.emvb-layer-caret { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 16px; }
|
|
269
303
|
.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
304
|
|
|
@@ -306,10 +340,15 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
306
340
|
.emvb-breadcrumb-part { border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; border-radius: 2px; }
|
|
307
341
|
.emvb-breadcrumb-part:hover { color: var(--text-color-kumo-default); text-decoration: underline; text-underline-offset: 2px; }
|
|
308
342
|
.emvb-breadcrumb-part:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
|
|
343
|
+
.emvb-breadcrumb-current { color: var(--text-color-kumo-default); }
|
|
309
344
|
.emvb-style-row { display: flex; align-items: flex-start; gap: 4px; }
|
|
310
345
|
.emvb-choice { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
|
|
311
346
|
.emvb-choice-label { font-size: 13px; line-height: 20px; color: var(--text-color-kumo-default); }
|
|
312
347
|
.emvb-style-row[data-set="true"] .emvb-choice-label { font-weight: 600; }
|
|
348
|
+
/* Property labels (DESIGN.md, UX-004): 13 px regular. Kumo field and select labels carry font-medium and select-none. */
|
|
349
|
+
.emvb-panel-right .font-medium.select-none:not(button) { font-size: 13px; line-height: 20px; font-weight: 400; }
|
|
350
|
+
.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)); }
|
|
351
|
+
.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
352
|
.emvb-choice-group { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
314
353
|
.emvb-choice-group button {
|
|
315
354
|
display: inline-flex; align-items: center; justify-content: center;
|
|
@@ -354,7 +393,7 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
354
393
|
.emvb-box > .emvb-box-body { display: flex; flex-direction: column; gap: 4px; }
|
|
355
394
|
.emvb-box > .emvb-reset-btn { margin-top: 0; }
|
|
356
395
|
.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:
|
|
396
|
+
.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
397
|
.emvb-box-head .emvb-var-btn { margin-top: 0; }
|
|
359
398
|
.emvb-link-btn {
|
|
360
399
|
display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
|
|
@@ -375,13 +414,13 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
375
414
|
.emvb-box-input:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: -1px; }
|
|
376
415
|
.emvb-box-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--text-color-kumo-danger); }
|
|
377
416
|
.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);
|
|
417
|
+
.emvb-box-name { font-size: 11px; line-height: 14px; color: var(--text-color-kumo-subtle); text-align: center; max-width: 100%; }
|
|
379
418
|
.emvb-box-error { margin: 0; font-size: 12px; line-height: 16px; color: var(--text-color-kumo-danger); }
|
|
380
419
|
.emvb-var-btn:hover, .emvb-var-btn[data-popup-open] { background: var(--color-kumo-tint); color: var(--text-color-kumo-default); }
|
|
381
420
|
.emvb-var-btn[data-active="true"] { color: var(--color-kumo-brand); }
|
|
382
421
|
.emvb-var-btn:focus-visible, .emvb-var-chip-x:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 1px; }
|
|
383
422
|
.emvb-var-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
|
|
384
|
-
.emvb-var-field-label { font-size:
|
|
423
|
+
.emvb-var-field-label { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--text-color-kumo-default); }
|
|
385
424
|
.emvb-var-chip {
|
|
386
425
|
display: flex; align-items: center; gap: 6px; min-width: 0; height: 28px; padding: 0 2px 0 8px;
|
|
387
426
|
border-radius: 6px; background: var(--color-kumo-tint); color: var(--text-color-kumo-default);
|
|
@@ -403,11 +442,14 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
403
442
|
.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
443
|
[data-emvb-var-option][data-selected="true"] .emvb-var-option-name { font-weight: 600; }
|
|
405
444
|
.emvb-textarea { min-height: 72px; height: auto; padding: 8px; resize: vertical; font: inherit; }
|
|
406
|
-
.emvb-field-label { font-size:
|
|
445
|
+
.emvb-field-label { font-size: 13px; line-height: 20px; font-weight: 400; color: var(--text-color-kumo-default); }
|
|
407
446
|
.emvb-panel [data-emvb-panel] .emvb-helper { margin-top: -2px; }
|
|
447
|
+
.emvb-panel [data-emvb-panel="conditions"] > .emvb-section-label + .emvb-helper { margin-top: 4px; }
|
|
408
448
|
|
|
409
449
|
.emvb-media-actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
410
450
|
.emvb-media-preview { display: flex; flex-direction: column; gap: 4px; }
|
|
451
|
+
/* W-761: a long media URL ran past the panel edge. */
|
|
452
|
+
.emvb-media-preview > .emvb-helper { overflow-wrap: anywhere; }
|
|
411
453
|
.emvb-media-edited { align-self: flex-start; }
|
|
412
454
|
.emvb-media-cell { position: relative; }
|
|
413
455
|
.emvb-media-cell .emvb-media-card-menu { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; padding: 0; opacity: 0.92; }
|
|
@@ -450,28 +492,30 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
450
492
|
}
|
|
451
493
|
.emvb-chip-box:focus-within { box-shadow: inset 0 0 0 1px var(--color-kumo-brand); }
|
|
452
494
|
.emvb-chip {
|
|
453
|
-
|
|
495
|
+
/* UX-068: 24 px, so the menu and remove buttons meet the 24 px target size (WCAG 2.5.8). */
|
|
496
|
+
display: inline-flex; align-items: center; min-width: 0; max-width: 100%; height: 24px;
|
|
454
497
|
border-radius: 4px; background: var(--color-kumo-tint); color: var(--text-color-kumo-default);
|
|
455
498
|
font-family: var(--font-sans); font-size: 12px; line-height: 16px;
|
|
456
499
|
}
|
|
457
500
|
.emvb-chip:hover { background: var(--color-kumo-recessed); }
|
|
458
501
|
.emvb-chip[data-active="true"] { background: var(--color-kumo-brand); color: #fff; }
|
|
502
|
+
.emvb-chip[data-missing] { background: transparent; box-shadow: inset 0 0 0 1px var(--color-kumo-danger); }
|
|
503
|
+
.emvb-chip[data-missing] .emvb-chip-main { cursor: default; }
|
|
459
504
|
.emvb-chip-main {
|
|
460
|
-
display: inline-flex; align-items: center; gap: 4px; min-width: 0; height:
|
|
505
|
+
display: inline-flex; align-items: center; gap: 4px; min-width: 0; height: 24px; padding: 0 4px;
|
|
461
506
|
border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer;
|
|
462
507
|
}
|
|
463
508
|
.emvb-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 144px; }
|
|
464
509
|
.emvb-chip-icon {
|
|
465
510
|
display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
|
|
466
|
-
width:
|
|
511
|
+
width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px;
|
|
467
512
|
background: transparent; color: inherit; cursor: pointer;
|
|
468
513
|
}
|
|
469
|
-
.emvb-chip-icon:last-child { margin-right: 2px; }
|
|
470
514
|
.emvb-chip-icon:hover { background: color-mix(in oklab, currentColor 14%, transparent); }
|
|
471
515
|
.emvb-chip :focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 1px; }
|
|
472
516
|
.emvb-chip[data-active="true"] :focus-visible { outline-color: #fff; outline-offset: -2px; }
|
|
473
517
|
.emvb-chip-rename {
|
|
474
|
-
width: 128px; height:
|
|
518
|
+
width: 128px; height: 24px; padding: 0 4px; border: 0; border-radius: 4px; outline: 0;
|
|
475
519
|
background: var(--color-kumo-base); color: var(--text-color-kumo-default); font: inherit;
|
|
476
520
|
box-shadow: inset 0 0 0 1px var(--color-kumo-brand);
|
|
477
521
|
}
|
|
@@ -481,7 +525,6 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
481
525
|
}
|
|
482
526
|
.emvb-save-local { align-self: flex-start; font-size: 13px; }
|
|
483
527
|
.emvb-save-local-row { display: flex; flex-direction: column; gap: 8px; }
|
|
484
|
-
.emvb-save-local-actions { display: flex; gap: 8px; }
|
|
485
528
|
.emvb-chip-text::placeholder { color: var(--text-color-kumo-placeholder, var(--text-color-kumo-subtle)); }
|
|
486
529
|
.emvb-chip-listbox {
|
|
487
530
|
position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
|
|
@@ -502,9 +545,13 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
502
545
|
.emvb-site-styles-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
|
|
503
546
|
.emvb-site-styles-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
|
|
504
547
|
.emvb-site-styles-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
548
|
+
.emvb-style-diff { flex: 1 1 100%; }
|
|
549
|
+
.emvb-style-diff > summary { cursor: pointer; width: fit-content; border-radius: 4px; }
|
|
550
|
+
.emvb-style-diff > summary:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
|
|
551
|
+
.emvb-style-diff > ul { margin: 4px 0 0; padding-left: 16px; }
|
|
505
552
|
.emvb-site-styles-subtitle { margin: 0; font-size: 11px; color: var(--text-color-kumo-subtle); }
|
|
506
553
|
.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; }
|
|
554
|
+
.emvb-site-styles-footer { margin-top: auto; min-height: 32px; }
|
|
508
555
|
.emvb-site-section { display: flex; flex-direction: column; gap: 6px; }
|
|
509
556
|
.emvb-site-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
510
557
|
.emvb-site-count {
|
|
@@ -568,6 +615,9 @@ export const EDITOR_CSS = `${UI_CSS}
|
|
|
568
615
|
box-shadow: inset 0 0 0 1px var(--color-kumo-brand);
|
|
569
616
|
}
|
|
570
617
|
.emvb-site-empty-card { border-radius: 6px; border: 1px dashed var(--color-kumo-line); }
|
|
618
|
+
.emvb-site-empty-card > div { gap: 8px; padding: 20px 12px; border: 0; border-radius: inherit; }
|
|
619
|
+
.emvb-site-empty-card h2 { font-size: 14px; line-height: 18px; }
|
|
620
|
+
.emvb-site-empty-card p { font-size: 13px; line-height: 18px; }
|
|
571
621
|
.emvb-site-empty {
|
|
572
622
|
display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px;
|
|
573
623
|
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
|
|
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:
|
|
47
|
-
flexbox:
|
|
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:
|
|
70
|
+
tabs: BrowsersIcon,
|
|
61
71
|
"tab-panel": BrowserIcon,
|
|
62
|
-
accordion:
|
|
63
|
-
"accordion-item":
|
|
64
|
-
menu:
|
|
72
|
+
accordion: CaretCircleDoubleDownIcon,
|
|
73
|
+
"accordion-item": CaretRightIcon,
|
|
74
|
+
menu: ListIcon,
|
|
65
75
|
"menu-item": CaretDownIcon,
|
|
66
|
-
toc:
|
|
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":
|
|
81
|
-
"post-author":
|
|
82
|
-
loop:
|
|
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-
|
|
6
|
+
.emvb-native-input {
|
|
7
7
|
height: var(--emvb-control, 28px);
|
|
8
8
|
min-width: 0;
|
|
9
9
|
padding: 0 8px;
|
|
@@ -13,14 +13,15 @@ export const FEATURE_CSS = `
|
|
|
13
13
|
color: var(--text-color-kumo-default);
|
|
14
14
|
font: inherit;
|
|
15
15
|
}
|
|
16
|
-
.emvb-native-
|
|
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:
|
|
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; }
|
|
24
25
|
.emvb-bind-live { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--text-color-kumo-default); overflow-wrap: anywhere; }
|
|
25
26
|
.emvb-bind-live > b { font-weight: 600; }
|
|
26
27
|
.emvb-bind-outside { grid-column: 1 / -1; display: grid; gap: 4px; }
|
|
@@ -30,7 +31,9 @@ export const FEATURE_CSS = `
|
|
|
30
31
|
.emvb-element-tile { position: relative; }
|
|
31
32
|
.emvb-element-tile > .emvb-js-badge { position: absolute; top: 4px; right: 4px; }
|
|
32
33
|
.emvb-perf-bars { display: grid; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
|
|
33
|
-
|
|
34
|
+
/* UX-083: rows share one grid, so every bar starts and ends at the same place. */
|
|
35
|
+
.emvb-perf-bars { grid-template-columns: 90px minmax(0, 1fr) max-content; column-gap: 8px; }
|
|
36
|
+
.emvb-perf-bars > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; font-size: 13px; }
|
|
34
37
|
.emvb-perf-bar { display: block; height: 8px; border-radius: 4px; background: var(--color-kumo-tint); overflow: hidden; }
|
|
35
38
|
.emvb-perf-bar > span { display: block; height: 100%; background: var(--color-kumo-brand); }
|
|
36
39
|
.emvb-perf-bars > li[data-over] .emvb-perf-bar > span { background: var(--color-kumo-danger); }
|
|
@@ -44,15 +47,25 @@ export const FEATURE_CSS = `
|
|
|
44
47
|
.emvb-aud-checks { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 0; border: 0; font-size: 12px; }
|
|
45
48
|
.emvb-aud-checks > legend { width: 100%; padding: 0; margin-bottom: 2px; }
|
|
46
49
|
.emvb-palette { padding: 0; overflow: hidden; }
|
|
50
|
+
/* UX-093: anchored near the top, so the box doesn't jump up and down as results filter. */
|
|
51
|
+
.emvb-palette.emvb-palette { top: max(12vh, 32px); translate: -50% 0; }
|
|
52
|
+
/* W-810: the dialog sized to its rows, so it widened and jumped sideways as results with longer
|
|
53
|
+
labels appeared. A fixed width (within the viewport) keeps it still while typing. */
|
|
54
|
+
.emvb-palette.emvb-palette.emvb-palette { width: min(564px, calc(100vw - 32px)); }
|
|
47
55
|
.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
56
|
.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:
|
|
57
|
+
.emvb-palette-group { padding: 8px 10px 2px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-color-kumo-subtle); }
|
|
50
58
|
.emvb-palette-item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
|
|
51
59
|
.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;
|
|
53
|
-
.emvb-palette-
|
|
54
|
-
.emvb-palette-
|
|
60
|
+
.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; }
|
|
61
|
+
.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); }
|
|
62
|
+
.emvb-palette-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
63
|
+
/* W-760: a long query with no spaces widened the palette past the screen. */
|
|
64
|
+
.emvb-palette-empty { padding: 12px; color: var(--text-color-kumo-subtle); font-size: 13px; overflow-wrap: anywhere; contain: inline-size; }
|
|
65
|
+
.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); }
|
|
66
|
+
.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
67
|
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
68
|
+
.emvb-timeline-error { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
|
|
56
69
|
.emvb-timeline-body { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin: 12px 0; min-height: 0; }
|
|
57
70
|
.emvb-timeline-list { margin: 0; padding: 0; list-style: none; max-height: 60vh; overflow-y: auto; }
|
|
58
71
|
.emvb-timeline-list { display: grid; gap: 2px; padding-inline-end: 4px; }
|
|
@@ -87,13 +100,17 @@ export const FEATURE_CSS = `
|
|
|
87
100
|
.emvb-timeline-changes > li[data-kind="removed"] .emvb-timeline-kind { color: var(--text-color-kumo-danger); }
|
|
88
101
|
.emvb-timeline-changes > li[data-kind="changed"] .emvb-timeline-kind { color: var(--text-color-kumo-warning); }
|
|
89
102
|
.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; }
|
|
103
|
+
.emvb-tokens-grid > label, .emvb-tokens-field { display: grid; gap: 4px; min-width: 0; }
|
|
91
104
|
.emvb-tokens-fluid { display: flex !important; align-items: center; gap: 4px; font-size: 12px; }
|
|
92
|
-
|
|
93
|
-
|
|
105
|
+
/* UX-057: Ratio and the small-screen size take the full row, so "Major third" and the label
|
|
106
|
+
"On small screens (px)" no longer truncate or wrap at the drawer's width. */
|
|
107
|
+
.emvb-tokens-grid > [data-emvb-tokens-row="full"] { grid-column: 1 / -1; }
|
|
108
|
+
.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; }
|
|
109
|
+
.emvb-tokens-preview > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-height: 24px; }
|
|
110
|
+
.emvb-tokens-preview > li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
94
111
|
.emvb-tokens-sample { display: inline-block; height: 1em; line-height: 1; }
|
|
95
112
|
.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:
|
|
113
|
+
.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
114
|
.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
115
|
.emvb-a11y-score[data-band="good"] b, .emvb-a11y [data-band="good"] { color: var(--text-color-kumo-success); }
|
|
99
116
|
.emvb-a11y-score[data-band="fair"] b, .emvb-a11y [data-band="fair"] { color: var(--text-color-kumo-warning); }
|
|
@@ -102,10 +119,22 @@ export const FEATURE_CSS = `
|
|
|
102
119
|
.emvb-a11y-issues { margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
|
|
103
120
|
.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
121
|
.emvb-a11y-issues > li[data-severity="error"] { border-left-color: var(--color-kumo-danger); }
|
|
122
|
+
.emvb-a11y-severity { flex: none; margin-top: 2px; color: var(--text-color-kumo-warning); }
|
|
123
|
+
.emvb-a11y-issues > li[data-severity="error"] .emvb-a11y-severity { color: var(--text-color-kumo-danger); }
|
|
124
|
+
.emvb-a11y-what { flex: 1 1 auto; min-width: 0; }
|
|
105
125
|
.emvb-a11y-actions { display: flex; gap: 8px; justify-content: flex-end; }
|
|
106
126
|
.emvb-sources { margin: 4px 0 8px; font-size: 12px; }
|
|
107
127
|
.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); }
|
|
128
|
+
.emvb-sources-count { font-weight: 400; color: var(--text-color-kumo-subtle); display: inline-flex; align-items: center; gap: 8px; }
|
|
129
|
+
.emvb-sources > summary { list-style: none; align-items: center; border-radius: 4px; }
|
|
130
|
+
/* UX-066: the label stays on one line; a long count moves under it, right-aligned. */
|
|
131
|
+
.emvb-sources > summary { flex-wrap: wrap; row-gap: 2px; }
|
|
132
|
+
.emvb-sources-label { white-space: nowrap; }
|
|
133
|
+
.emvb-sources-count { margin-left: auto; white-space: nowrap; }
|
|
134
|
+
.emvb-sources > summary::-webkit-details-marker { display: none; }
|
|
135
|
+
.emvb-sources > summary:focus-visible { outline: 2px solid var(--color-kumo-brand); outline-offset: 2px; }
|
|
136
|
+
.emvb-sources-caret { color: var(--text-color-kumo-default); }
|
|
137
|
+
.emvb-sources[open] .emvb-sources-caret { transform: rotate(90deg); }
|
|
109
138
|
.emvb-sources ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
|
|
110
139
|
.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
140
|
.emvb-sources li[data-kind="class"] { border-left-color: var(--color-kumo-info); }
|
|
@@ -121,4 +150,7 @@ export const FEATURE_CSS = `
|
|
|
121
150
|
.emvb-recipe-desc { font-size: 12px; color: var(--text-color-kumo-subtle); }
|
|
122
151
|
.emvb-motion-effect { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; }
|
|
123
152
|
.emvb-motion-name { grid-column: 1 / -1; font-size: 12px; font-weight: 600; }
|
|
153
|
+
/* UX-092: the fixed theme part type, its label and value on one line */
|
|
154
|
+
.emvb-part-type { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; }
|
|
155
|
+
.emvb-part-type-value { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--text-color-kumo-default); }
|
|
124
156
|
`;
|