@masters-union/union-stack 0.3.2 → 0.3.4
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/cdn/loader.v1.global.js +3 -3
- package/dist/cdn/loader.v1.global.js.map +1 -1
- package/dist/{chunk-LF4AL6NH.cjs → chunk-752WX4LP.cjs} +3 -3
- package/dist/{chunk-LF4AL6NH.cjs.map → chunk-752WX4LP.cjs.map} +1 -1
- package/dist/{chunk-67ROA4IT.js → chunk-V3WGAWVR.js} +3 -3
- package/dist/{chunk-67ROA4IT.js.map → chunk-V3WGAWVR.js.map} +1 -1
- package/dist/{client-C3JZYYpA.d.cts → client-I6TadQ-m.d.cts} +2 -1
- package/dist/{client-C3JZYYpA.d.ts → client-I6TadQ-m.d.ts} +2 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/picker.cjs +26 -27
- package/dist/picker.cjs.map +1 -1
- package/dist/picker.d.cts +2 -2
- package/dist/picker.d.ts +2 -2
- package/dist/picker.js +26 -27
- package/dist/picker.js.map +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/package.json +1 -1
package/dist/picker.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UnionStackClient, g as PickerOptions, P as PickResponse, h as PickerHandle } from './client-
|
|
2
|
-
export { i as PickerBranding, j as PickerTheme } from './client-
|
|
1
|
+
import { U as UnionStackClient, g as PickerOptions, P as PickResponse, h as PickerHandle } from './client-I6TadQ-m.cjs';
|
|
2
|
+
export { i as PickerBranding, j as PickerTheme } from './client-I6TadQ-m.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Single-shot file picker modal. Built imperatively (no framework) so it can
|
package/dist/picker.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UnionStackClient, g as PickerOptions, P as PickResponse, h as PickerHandle } from './client-
|
|
2
|
-
export { i as PickerBranding, j as PickerTheme } from './client-
|
|
1
|
+
import { U as UnionStackClient, g as PickerOptions, P as PickResponse, h as PickerHandle } from './client-I6TadQ-m.js';
|
|
2
|
+
export { i as PickerBranding, j as PickerTheme } from './client-I6TadQ-m.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Single-shot file picker modal. Built imperatively (no framework) so it can
|
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
|
-
|
|
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: "#
|
|
82
|
-
// primary
|
|
83
|
-
onPrimary: "#
|
|
84
|
-
// on-primary — dark ink on
|
|
85
|
-
background: "#
|
|
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: "#
|
|
87
|
+
foreground: "#f4f4f5",
|
|
88
88
|
// on-surface
|
|
89
|
-
muted: "#
|
|
90
|
-
// outline
|
|
91
|
-
subtle: "#191f31",
|
|
89
|
+
muted: "#8b8b93",
|
|
92
90
|
// surface-container
|
|
93
|
-
border: "#
|
|
94
|
-
// surface-container-highest
|
|
95
|
-
borderStrong: "#464554",
|
|
91
|
+
border: "#2a2a2e",
|
|
96
92
|
// outline-variant
|
|
97
|
-
elevated: "#
|
|
98
|
-
// surface-container-low — cards, one step up
|
|
99
|
-
overlay: "#23293c",
|
|
93
|
+
elevated: "#141416",
|
|
100
94
|
// surface-container-high — instant hover
|
|
101
|
-
raised: "#
|
|
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:
|
|
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>`,
|
|
@@ -1316,6 +1311,7 @@ var Picker = class {
|
|
|
1316
1311
|
const constraintBits = [];
|
|
1317
1312
|
if (this.opts.maxFileSize) constraintBits.push(`max ${formatBytes(this.opts.maxFileSize)}`);
|
|
1318
1313
|
if (this.opts.accept) {
|
|
1314
|
+
if (typeof this.opts.accept !== "string") this.opts.accept = this.opts.accept.join(",");
|
|
1319
1315
|
const types = this.opts.accept.split(",").map((s) => s.trim()).filter((s) => s && s !== "*/*").map((s) => s.replace("/*", ""));
|
|
1320
1316
|
if (types.length > 0 && types.length <= 4) {
|
|
1321
1317
|
constraintBits.push(types.join(" \xB7 "));
|
|
@@ -1529,8 +1525,11 @@ var Picker = class {
|
|
|
1529
1525
|
return ICON2.alert;
|
|
1530
1526
|
case "cancelled":
|
|
1531
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).
|
|
1532
1531
|
default:
|
|
1533
|
-
return ICON2.
|
|
1532
|
+
return ICON2.clock;
|
|
1534
1533
|
}
|
|
1535
1534
|
}
|
|
1536
1535
|
statusLabel(item) {
|