pmx-canvas 0.4.2 → 0.4.3

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.
@@ -337,16 +337,16 @@
337
337
  }
338
338
 
339
339
  :root[data-theme="ember"] {
340
- /* ── Core palette (ember · charcoal + vivid warm orange) ─── */
341
- --c-bg: #0E0E11;
342
- --c-panel: #17181D;
343
- --c-panel-soft: #121317;
344
- --c-line: #2A2C34;
345
- --c-text: #ECEDF0;
346
- --c-text-soft: #C9CCD4;
347
- --c-muted: #8E939F;
348
- --c-dim: #5F646E;
349
- --c-accent: #FF5C2E;
340
+ /* ── Core palette (ember · neutral charcoal + vivid orange-red) ─── */
341
+ --c-bg: #0B0B0C;
342
+ --c-panel: #161618;
343
+ --c-panel-soft: #101012;
344
+ --c-line: #29292C;
345
+ --c-text: #EDEBE6;
346
+ --c-text-soft: #CBC9C2;
347
+ --c-muted: #96948D;
348
+ --c-dim: #66655F;
349
+ --c-accent: #F34E1C;
350
350
  --c-ok: #4CC38A;
351
351
  --c-warn: #F5B944;
352
352
  --c-warn-alt: #FFB300;
@@ -354,23 +354,23 @@
354
354
  --c-purple: #A78BFA;
355
355
  --c-thinking: #A78BFA;
356
356
  --c-subagent: #38BDF8;
357
- --c-input-bg: #121317;
358
- --c-dot-grid: rgba(255, 92, 46, 0.08);
359
- --c-panel-overlay: rgba(14, 14, 17, 0.6);
360
- --c-panel-glass: rgba(23, 24, 29, 0.92);
357
+ --c-input-bg: #101012;
358
+ --c-dot-grid: rgba(243, 78, 28, 0.08);
359
+ --c-panel-overlay: rgba(11, 11, 12, 0.6);
360
+ --c-panel-glass: rgba(22, 22, 24, 0.92);
361
361
  --c-shadow: rgba(0, 0, 0, 0.3);
362
362
  --c-shadow-heavy: rgba(0, 0, 0, 0.5);
363
- --c-glow-accent: rgba(255, 92, 46, 0.15);
363
+ --c-glow-accent: rgba(243, 78, 28, 0.15);
364
364
  --c-surface-hover: rgba(255, 255, 255, 0.06);
365
365
  --c-surface-subtle: rgba(255, 255, 255, 0.03);
366
366
  --c-surface-th: rgba(255, 255, 255, 0.04);
367
- --c-accent-8: rgba(255, 92, 46, 0.08);
368
- --c-accent-10: rgba(255, 92, 46, 0.1);
369
- --c-accent-12: rgba(255, 92, 46, 0.12);
370
- --c-accent-15: rgba(255, 92, 46, 0.15);
371
- --c-accent-25: rgba(255, 92, 46, 0.25);
372
- --c-accent-30: rgba(255, 92, 46, 0.3);
373
- --c-accent-40: rgba(255, 92, 46, 0.4);
367
+ --c-accent-8: rgba(243, 78, 28, 0.08);
368
+ --c-accent-10: rgba(243, 78, 28, 0.1);
369
+ --c-accent-12: rgba(243, 78, 28, 0.12);
370
+ --c-accent-15: rgba(243, 78, 28, 0.15);
371
+ --c-accent-25: rgba(243, 78, 28, 0.25);
372
+ --c-accent-30: rgba(243, 78, 28, 0.3);
373
+ --c-accent-40: rgba(243, 78, 28, 0.4);
374
374
  --c-ok-10: rgba(76, 195, 138, 0.1);
375
375
  --c-ok-12: rgba(76, 195, 138, 0.12);
376
376
  --c-ok-20: rgba(76, 195, 138, 0.2);
@@ -383,12 +383,12 @@
383
383
  --c-warn-30: rgba(245, 185, 68, 0.3);
384
384
  --c-warn-60: rgba(245, 185, 68, 0.6);
385
385
  --c-danger-12: rgba(240, 86, 106, 0.12);
386
- --c-line-30: rgba(42, 44, 52, 0.3);
387
- --c-contrast-fg: #0E0E11;
388
- --c-accent-hover: #FF7A52;
386
+ --c-line-30: rgba(41, 41, 44, 0.3);
387
+ --c-contrast-fg: #0B0B0C;
388
+ --c-accent-hover: #FF6B3A;
389
389
  --c-warn-hover: #F7C868;
390
390
  --c-canvas-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
391
- --c-annotation: #F2F2F4;
391
+ --c-annotation: #F2F0EB;
392
392
  }
393
393
 
394
394
  :root[data-theme="forest"] {
@@ -944,7 +944,6 @@ body,
944
944
  }
945
945
 
946
946
  .toolbar-group {
947
- position: relative;
948
947
  display: flex;
949
948
  flex-wrap: wrap;
950
949
  align-items: center;
@@ -953,6 +952,14 @@ body,
953
952
  max-width: 100%;
954
953
  }
955
954
 
955
+ /* Positioning parent for a toolbar popover menu. Every menu MUST live inside
956
+ one of these wrapped around its trigger — anchoring to a wider ancestor
957
+ opens the menu far from the button (0.4.2 report Finding T). */
958
+ .toolbar-menu-anchor {
959
+ position: relative;
960
+ display: inline-flex;
961
+ }
962
+
956
963
  .canvas-toolbar button svg {
957
964
  display: block;
958
965
  }
@@ -1074,7 +1081,9 @@ body,
1074
1081
  }
1075
1082
 
1076
1083
  .toolbar-more {
1077
- display: contents;
1084
+ /* inline-flex (NOT contents): this span is also the positioning anchor
1085
+ for the More menu — display:contents cannot anchor absolute children. */
1086
+ display: inline-flex;
1078
1087
  }
1079
1088
  }
1080
1089
 
@@ -218,32 +218,32 @@
218
218
  }
219
219
 
220
220
  :root[data-theme="ember"] {
221
- /* ── Core palette (ember · charcoal + vivid warm orange) ─── */
222
- --c-bg: #0E0E11;
223
- --c-panel: #17181D;
224
- --c-panel-soft: #121317;
225
- --c-line: #2A2C34;
226
- --c-text: #ECEDF0;
227
- --c-text-soft: #C9CCD4;
228
- --c-muted: #8E939F;
229
- --c-dim: #5F646E;
230
- --c-accent: #FF5C2E;
221
+ /* ── Core palette (ember · neutral charcoal + vivid orange-red) ─── */
222
+ --c-bg: #0B0B0C;
223
+ --c-panel: #161618;
224
+ --c-panel-soft: #101012;
225
+ --c-line: #29292C;
226
+ --c-text: #EDEBE6;
227
+ --c-text-soft: #CBC9C2;
228
+ --c-muted: #96948D;
229
+ --c-dim: #66655F;
230
+ --c-accent: #F34E1C;
231
231
  --c-ok: #4CC38A;
232
232
  --c-warn: #F5B944;
233
233
  --c-warn-alt: #FFB300;
234
234
  --c-danger: #F0566A;
235
235
  --c-purple: #A78BFA;
236
236
 
237
- --color-bg: #0E0E11;
238
- --color-panel: #17181D;
239
- --color-surface: #121317;
240
- --color-border: #2A2C34;
241
- --color-text: #ECEDF0;
242
- --color-text-primary: #ECEDF0;
243
- --color-text-secondary: #C9CCD4;
244
- --color-text-muted: #8E939F;
245
- --color-text-dim: #5F646E;
246
- --color-accent: #FF5C2E;
237
+ --color-bg: #0B0B0C;
238
+ --color-panel: #161618;
239
+ --color-surface: #101012;
240
+ --color-border: #29292C;
241
+ --color-text: #EDEBE6;
242
+ --color-text-primary: #EDEBE6;
243
+ --color-text-secondary: #CBC9C2;
244
+ --color-text-muted: #96948D;
245
+ --color-text-dim: #66655F;
246
+ --color-accent: #F34E1C;
247
247
  --color-success: #4CC38A;
248
248
  --color-warning: #F5B944;
249
249
  --color-danger: #F0566A;
@@ -10,7 +10,8 @@ import { z } from 'zod';
10
10
  import { normalizeCanvasTheme } from '../../canvas-db.js';
11
11
  import { applyCanvasNodeUpdates } from '../../canvas-operations.js';
12
12
  import { canvasState } from '../../canvas-state.js';
13
- import { defineOperation, type Operation } from '../types.js';
13
+ import { CANVAS_THEMES, isCanvasTheme } from '../../../shared/themes.js';
14
+ import { defineOperation, OperationError, type Operation } from '../types.js';
14
15
 
15
16
  const emptyShape = {};
16
17
  const emptySchema = z.looseObject(emptyShape);
@@ -47,6 +48,13 @@ const themeSetOperation = defineOperation<z.infer<typeof themeSetSchema>, Record
47
48
  path: '/api/canvas/theme',
48
49
  },
49
50
  handler: (input, ctx) => {
51
+ // Reject unknown names instead of silently keeping the prior theme
52
+ // (0.4.2 report: the soft-accept made typos look like successes).
53
+ if (input.theme !== undefined && !isCanvasTheme(input.theme)) {
54
+ throw new OperationError(
55
+ `Unknown theme ${JSON.stringify(input.theme)}. Valid themes: ${CANVAS_THEMES.join(', ')}.`,
56
+ );
57
+ }
50
58
  const theme = normalizeCanvasTheme(input.theme, canvasState.theme);
51
59
  const next = canvasState.setTheme(theme);
52
60
  ctx.emit('theme-changed', { theme: next });
@@ -48,7 +48,7 @@ export const CANVAS_THEME_META: Record<CanvasThemeName, CanvasThemeMeta> = {
48
48
  midnight: { label: 'Midnight', scheme: 'dark', swatchBg: '#0A0D1C', swatchAccent: '#8B96FF' },
49
49
  sepia: { label: 'Sepia', scheme: 'light', swatchBg: '#F2E7D5', swatchAccent: '#B4632C' },
50
50
  arctic: { label: 'Arctic', scheme: 'dark', swatchBg: '#20242E', swatchAccent: '#7FC8DE' },
51
- ember: { label: 'Ember', scheme: 'dark', swatchBg: '#0E0E11', swatchAccent: '#FF5C2E' },
51
+ ember: { label: 'Ember', scheme: 'dark', swatchBg: '#0B0B0C', swatchAccent: '#F34E1C' },
52
52
  forest: { label: 'Forest', scheme: 'dark', swatchBg: '#0C1712', swatchAccent: '#5CCF8F' },
53
53
  };
54
54