@masters-union/union-stack 0.3.3 → 0.3.5

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/dist/picker.js CHANGED
@@ -37,11 +37,17 @@ function themeToCssVars(theme) {
37
37
  "--us-bg": theme?.background ?? defaults.background,
38
38
  "--us-fg": theme?.foreground ?? defaults.foreground,
39
39
  "--us-muted": defaults.muted,
40
- "--us-subtle": defaults.subtle,
41
40
  "--us-border": theme?.border ?? defaults.border,
42
- "--us-border-strong": defaults.borderStrong,
41
+ // Surface + emphasis tokens are *derived* from the resolved bg/fg/border so
42
+ // they track a host's custom colors instead of snapping back to the curated
43
+ // palette. The mix percentages reproduce the hand-tuned defaults closely
44
+ // (both light and dark lift surfaces toward the foreground), but now a
45
+ // custom background/foreground/border flows through to every surface —
46
+ // including the image editor canvas, tool hovers, and control borders.
47
+ "--us-subtle": "color-mix(in srgb, var(--us-fg) 5%, var(--us-bg))",
48
+ "--us-overlay": "color-mix(in srgb, var(--us-fg) 9%, var(--us-bg))",
49
+ "--us-border-strong": "color-mix(in srgb, var(--us-fg) 18%, var(--us-border))",
43
50
  "--us-elevated": defaults.elevated,
44
- "--us-overlay": defaults.overlay,
45
51
  "--us-raised": defaults.raised,
46
52
  "--us-accent": defaults.accent,
47
53
  "--us-success": defaults.success,
@@ -58,16 +64,10 @@ var LIGHT_DEFAULTS = {
58
64
  foreground: "#1b1b21",
59
65
  // on-surface
60
66
  muted: "#5e5c6e",
61
- // on-surface-variant
62
- subtle: "#f3f1fa",
63
67
  // surface-container — chips, icon wells, tab rail
64
68
  border: "#e4e1ee",
65
- // outline-variant (soft)
66
- borderStrong: "#c8c5d4",
67
69
  // outline — drag-over emphasis
68
70
  elevated: "#ffffff",
69
- // cards, one step above the floor
70
- overlay: "#eceaf4",
71
71
  // instant hover state
72
72
  raised: "#ffffff",
73
73
  // active tab / popover layer
@@ -78,27 +78,21 @@ var LIGHT_DEFAULTS = {
78
78
  danger: "#ba1a1a"
79
79
  };
80
80
  var DARK_DEFAULTS = {
81
- primary: "#c0c1ff",
82
- // primary
83
- onPrimary: "#1000a9",
84
- // on-primary — dark ink on periwinkle
85
- background: "#0c1324",
81
+ primary: "#f4f4f5",
82
+ // primary — near-white on dark
83
+ onPrimary: "#18181b",
84
+ // on-primary — dark ink on white
85
+ background: "#0a0a0c",
86
86
  // surface (floor)
87
- foreground: "#dce1fb",
87
+ foreground: "#f4f4f5",
88
88
  // on-surface
89
- muted: "#908fa0",
90
- // outline
91
- subtle: "#191f31",
89
+ muted: "#8b8b93",
92
90
  // surface-container
93
- border: "#2e3447",
94
- // surface-container-highest
95
- borderStrong: "#464554",
91
+ border: "#2a2a2e",
96
92
  // outline-variant
97
- elevated: "#151b2d",
98
- // surface-container-low — cards, one step up
99
- overlay: "#23293c",
93
+ elevated: "#141416",
100
94
  // surface-container-high — instant hover
101
- raised: "#2e3447",
95
+ raised: "#27272a",
102
96
  // active tab / popover layer
103
97
  accent: "#ffb783",
104
98
  // tertiary — "edited" markers
@@ -215,7 +209,7 @@ var BASE_CSS = `
215
209
  }
216
210
  .us-dropzone-hint { color: var(--us-muted); font-size: 12.5px; letter-spacing: -0.006em; }
217
211
  .us-dropzone-constraints {
218
- margin-top: 12px;
212
+ margin-top: 6px;
219
213
  font-size: 11px; color: var(--us-muted);
220
214
  font-family: var(--us-mono);
221
215
  letter-spacing: 0;
@@ -1053,6 +1047,7 @@ var ICON2 = {
1053
1047
  check: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`,
1054
1048
  alert: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>`,
1055
1049
  spinner: `<svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="9" stroke="currentColor" opacity="0.2"/><path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor"/></svg>`,
1050
+ clock: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><polyline points="12 7.5 12 12 15 13.5"/></svg>`,
1056
1051
  image: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>`,
1057
1052
  video: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2"/></svg>`,
1058
1053
  audio: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>`,
@@ -1530,8 +1525,11 @@ var Picker = class {
1530
1525
  return ICON2.alert;
1531
1526
  case "cancelled":
1532
1527
  return ICON2.alert;
1528
+ // Queued = waiting to upload. A clock reads as "pending" — unlike a frozen
1529
+ // spinner, which falsely signals an in-progress upload. The spinner is
1530
+ // reserved for the actual 'uploading' state (where CSS animates it).
1533
1531
  default:
1534
- return ICON2.spinner;
1532
+ return ICON2.clock;
1535
1533
  }
1536
1534
  }
1537
1535
  statusLabel(item) {