@floegence/floe-webapp-core 0.90.3 → 0.90.6
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/components/ui/Checkbox.js +17 -17
- package/dist/components/ui/FloatingWindow.js +68 -68
- package/dist/language.css +4 -3
- package/dist/styles/themes/presets.js +5 -1
- package/dist/styles.css +1 -1
- package/dist/surface.css +50 -2
- package/dist/themes/shell-presets.generated.css +9 -7
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { createComponent as n, insert as a, effect as f, className as g, setAttr
|
|
|
2
2
|
import { splitProps as P, createUniqueId as U, Switch as V, Match as j, Show as b, For as J, useContext as K, createEffect as Q, createContext as R } from "solid-js";
|
|
3
3
|
import { useFormControl as T } from "./formFieldContext.js";
|
|
4
4
|
import { cn as d } from "../../utils/cn.js";
|
|
5
|
-
var W = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M2 6l3 3 5-6">'), X = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), Y = /* @__PURE__ */ v("<div role=group>"), Z = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator>"), ee = /* @__PURE__ */ v("<input>"), $ = /* @__PURE__ */ v("<span>"), re = /* @__PURE__ */ v('<div class="flex flex-col">'), te = /* @__PURE__ */ v('<label><div class="relative flex items-center justify-center pt-0.5">'), ne = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), oe = /* @__PURE__ */ v('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-[var(--floe-accent-ink)]"fill=currentColor viewBox="0 0 20 20"><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"clip-rule=evenodd>'), le = /* @__PURE__ */ v('<label data-floe-surface-part=choice><div class="flex items-start gap-3"><div class="flex items-center justify-center pt-0.5"></div><div class="flex flex-col flex-1 min-w-0">'), ae = /* @__PURE__ */ v('<div class="absolute top-1.5 right-1.5"><div class="w-4 h-4 rounded-full bg-primary flex items-center justify-center">'), ie = /* @__PURE__ */ v("<label data-floe-surface-part=choice>"), se = /* @__PURE__ */ v("<div>");
|
|
5
|
+
var W = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M2 6l3 3 5-6">'), X = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), Y = /* @__PURE__ */ v("<div role=group>"), Z = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator data-floe-choice-kind=checkbox aria-hidden=true>"), ee = /* @__PURE__ */ v("<input>"), $ = /* @__PURE__ */ v("<span>"), re = /* @__PURE__ */ v('<div class="flex flex-col">'), te = /* @__PURE__ */ v('<label data-floe-checkbox-target><div class="relative flex items-center justify-center pt-0.5">'), ne = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), oe = /* @__PURE__ */ v('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-[var(--floe-accent-ink)]"fill=currentColor viewBox="0 0 20 20"><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"clip-rule=evenodd>'), le = /* @__PURE__ */ v('<label data-floe-surface-part=choice><div class="flex items-start gap-3"><div class="flex items-center justify-center pt-0.5"></div><div class="flex flex-col flex-1 min-w-0">'), ae = /* @__PURE__ */ v('<div class="absolute top-1.5 right-1.5"><div class="w-4 h-4 rounded-full bg-primary flex items-center justify-center">'), ie = /* @__PURE__ */ v("<label data-floe-surface-part=choice>"), se = /* @__PURE__ */ v("<div>");
|
|
6
6
|
const E = R();
|
|
7
7
|
function ce() {
|
|
8
8
|
return K(E);
|
|
@@ -48,20 +48,20 @@ const C = {
|
|
|
48
48
|
icon: "w-8 h-8"
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
function O(
|
|
51
|
+
function O(p) {
|
|
52
52
|
return (() => {
|
|
53
53
|
var s = W();
|
|
54
|
-
return f(() => m(s, "class",
|
|
54
|
+
return f(() => m(s, "class", p.class)), s;
|
|
55
55
|
})();
|
|
56
56
|
}
|
|
57
|
-
function fe(
|
|
57
|
+
function fe(p) {
|
|
58
58
|
return (() => {
|
|
59
59
|
var s = X();
|
|
60
|
-
return f(() => m(s, "class",
|
|
60
|
+
return f(() => m(s, "class", p.class)), s;
|
|
61
61
|
})();
|
|
62
62
|
}
|
|
63
|
-
function ve(
|
|
64
|
-
const [s,
|
|
63
|
+
function ve(p) {
|
|
64
|
+
const [s, x] = P(p, ["value", "onChange", "size", "orientation", "variant", "disabled", "class", "children"]), e = () => s.variant ?? "default", M = {
|
|
65
65
|
value: () => s.value ?? [],
|
|
66
66
|
onChange: (h, y) => {
|
|
67
67
|
const u = s.value ?? [], w = y ? [...u, h] : u.filter((k) => k !== h);
|
|
@@ -88,13 +88,13 @@ function ve(x) {
|
|
|
88
88
|
get class() {
|
|
89
89
|
return d(S(), s.class);
|
|
90
90
|
}
|
|
91
|
-
},
|
|
91
|
+
}, x), !1, !0), a(h, () => s.children), h;
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
function he(
|
|
96
|
-
const s = T(),
|
|
97
|
-
k() || (y() && e.value ?
|
|
95
|
+
function he(p) {
|
|
96
|
+
const s = T(), x = ce(), [e, M] = P(p, ["value", "checked", "onChange", "label", "description", "icon", "size", "variant", "indeterminate", "ref", "class", "disabled", "id"]), S = U(), h = () => e.id ?? (x ? S : s.id) ?? S, y = () => x !== void 0, u = () => e.size ?? x?.size() ?? "md", w = () => e.variant ?? x?.variant() ?? "default", k = () => e.disabled ?? (x?.disabled() || s.disabled || !1), c = () => y() && e.value ? x.value().includes(e.value) : e.checked ?? !1, H = () => {
|
|
97
|
+
k() || (y() && e.value ? x.onChange(e.value, !c()) : e.onChange?.(!c()));
|
|
98
98
|
}, q = () => (() => {
|
|
99
99
|
var t = Z();
|
|
100
100
|
return a(t, n(b, {
|
|
@@ -120,7 +120,7 @@ function he(x) {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}), null), f((r) => {
|
|
123
|
-
var o = c() || e.indeterminate ? "true" : void 0, l = d("rounded-xs border
|
|
123
|
+
var o = c() || e.indeterminate ? "true" : void 0, l = d("rounded-xs border transition-[background-color,border-color,color,transform] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "flex items-center justify-center", C[u()].box, c() || e.indeterminate ? "border-primary bg-primary text-primary-foreground" : "border-[var(--floe-control-edge)] bg-transparent hover:border-[var(--floe-control-edge-hover)]", k() && "cursor-not-allowed");
|
|
124
124
|
return o !== r.e && m(t, "data-floe-selected", r.e = o), l !== r.t && g(t, r.t = l), r;
|
|
125
125
|
}, {
|
|
126
126
|
e: void 0,
|
|
@@ -153,7 +153,7 @@ function he(x) {
|
|
|
153
153
|
return k();
|
|
154
154
|
},
|
|
155
155
|
onClick: (l) => {
|
|
156
|
-
(
|
|
156
|
+
(p.readOnly ?? s.readOnly) && l.preventDefault();
|
|
157
157
|
},
|
|
158
158
|
onChange: H,
|
|
159
159
|
get class() {
|
|
@@ -318,9 +318,9 @@ function he(x) {
|
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
const [s,
|
|
323
|
-
return n(ve, B(
|
|
321
|
+
function pe(p) {
|
|
322
|
+
const [s, x] = P(p, ["options"]);
|
|
323
|
+
return n(ve, B(x, {
|
|
324
324
|
get children() {
|
|
325
325
|
return n(J, {
|
|
326
326
|
get each() {
|
|
@@ -350,5 +350,5 @@ function xe(x) {
|
|
|
350
350
|
export {
|
|
351
351
|
he as Checkbox,
|
|
352
352
|
ve as CheckboxGroup,
|
|
353
|
-
|
|
353
|
+
pe as CheckboxList
|
|
354
354
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createComponent as l, Portal as lt, use as Q, spread as ke, mergeProps as Oe, memo as Z, insert as c, effect as g, setAttribute as Te,
|
|
2
|
-
import { createSignal as
|
|
1
|
+
import { createComponent as l, Portal as lt, use as Q, spread as ke, mergeProps as Oe, memo as Z, addEventListener as m, insert as c, effect as g, setAttribute as Te, className as y, template as a, delegateEvents as at } from "solid-js/web";
|
|
2
|
+
import { createSignal as b, createUniqueId as st, onCleanup as D, onMount as dt, createEffect as I, untrack as W, Show as w, batch as ge } from "solid-js";
|
|
3
3
|
import { cn as J } from "../../utils/cn.js";
|
|
4
4
|
import { useOptionalLayout as ct } from "../../context/LayoutContext.js";
|
|
5
5
|
import { useResolvedFloeConfig as ut } from "../../context/FloeConfigContext.js";
|
|
@@ -13,8 +13,8 @@ import { observeViewport as yt } from "../../viewport.js";
|
|
|
13
13
|
import { createFloatingPresence as bt } from "./floatingPresence.js";
|
|
14
14
|
import { LOCAL_INTERACTION_SURFACE_ATTR as Be } from "./localInteractionSurface.js";
|
|
15
15
|
import { resolveFloatingBoundary as zt } from "./surfaceFloatingBoundary.js";
|
|
16
|
-
import { SURFACE_PORTAL_LAYER_ATTR as pt, resolveSurfacePortalHost as
|
|
17
|
-
var
|
|
16
|
+
import { SURFACE_PORTAL_LAYER_ATTR as pt, resolveSurfacePortalHost as _t } from "./dialogSurfaceScope.js";
|
|
17
|
+
var $t = /* @__PURE__ */ a("<span hidden>"), St = /* @__PURE__ */ a("<h2 class=sr-only>"), Pt = /* @__PURE__ */ a('<div data-floe-floating-window-title-content=true class="flex h-full min-w-0 flex-1 items-center">'), It = /* @__PURE__ */ a('<div data-floe-floating-window-header-actions=true class="flex shrink-0 items-center gap-1"><span aria-hidden=true class="mx-2 h-4 w-px shrink-0 bg-border">'), Rt = /* @__PURE__ */ a('<div data-floe-floating-window-footer=true class="flex items-center justify-end gap-2 p-3 border-t border-[var(--floe-line)]">'), Ct = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=n style=touch-action:none>"), At = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=s style=touch-action:none>"), Et = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=e style=touch-action:none>"), Mt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=w style=touch-action:none>"), Ft = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=ne style=touch-action:none>"), kt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=nw style=touch-action:none>"), Ot = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=se style=touch-action:none>"), Tt = /* @__PURE__ */ a("<div data-floe-floating-window-resize-handle=sw style=touch-action:none>"), Lt = /* @__PURE__ */ a('<div data-floe-geometry-surface=floating-window><div data-floe-dialog-surface-host=true><div data-floe-floating-window-titlebar=true style=touch-action:none><div class="flex h-full flex-1 min-w-0 items-center px-3"></div><div class="flex h-full shrink-0 items-stretch"></div></div><div data-floe-floating-window-content=true class="min-h-0 flex-1 overflow-auto overscroll-contain p-3">'), Bt = /* @__PURE__ */ a('<span data-floe-floating-window-title-icon=true aria-hidden=true class="flex size-4 shrink-0 items-center justify-center">'), Dt = /* @__PURE__ */ a('<h2 class="flex min-w-0 items-center gap-2 text-xs leading-none font-medium select-none"><span class="min-w-0 truncate">');
|
|
18
18
|
function nn(i) {
|
|
19
19
|
const ve = () => i.resizable ?? !0, K = () => i.maximizable ?? !0, xe = () => i.draggable ?? !0, q = () => i.minSize ?? {
|
|
20
20
|
width: 200,
|
|
@@ -24,27 +24,27 @@ function nn(i) {
|
|
|
24
24
|
height: 1 / 0
|
|
25
25
|
};
|
|
26
26
|
let ee;
|
|
27
|
-
const [O, De] =
|
|
27
|
+
const [O, De] = b(), [R, We] = b({
|
|
28
28
|
x: 0,
|
|
29
29
|
y: 0,
|
|
30
30
|
width: 0,
|
|
31
31
|
height: 0
|
|
32
32
|
}, {
|
|
33
33
|
equals: (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height
|
|
34
|
-
}), [te, qe] =
|
|
34
|
+
}), [te, qe] = b(!0), v = () => !!(i.compactBelow && R().width < i.compactBelow), z = () => i.viewportInsets, T = () => O()?.fixedScale ?? 1, ne = (e) => ({
|
|
35
35
|
x: (e.x + (O()?.fixedOffset.left ?? 0)) / T(),
|
|
36
36
|
y: (e.y + (O()?.fixedOffset.top ?? 0)) / T()
|
|
37
|
-
}), He = () => i.zIndex ?? 100, Xe = st(), Ye = ct(), Ne = ut(), E = Ye?.isMobile ?? ft(() => Ne.config.layout.mobileQuery), X = 16, ie = () => `floating-window-${Xe}-title`, [Ve, je] =
|
|
37
|
+
}), He = () => i.zIndex ?? 100, Xe = st(), Ye = ct(), Ne = ut(), E = Ye?.isMobile ?? ft(() => Ne.config.layout.mobileQuery), X = 16, ie = () => `floating-window-${Xe}-title`, [Ve, je] = b(i.defaultPosition ?? {
|
|
38
38
|
x: 0,
|
|
39
39
|
y: 0
|
|
40
|
-
}), [Ue, Ge] =
|
|
40
|
+
}), [Ue, Ge] = b(i.defaultSize ?? {
|
|
41
41
|
width: 400,
|
|
42
42
|
height: 300
|
|
43
|
-
}), [u, oe] =
|
|
43
|
+
}), [u, oe] = b(!1), [L, ye] = b(!1), [Y, be] = b(!1), [Qe, re] = b(!1), M = bt({
|
|
44
44
|
open: () => i.open,
|
|
45
45
|
element: () => ae
|
|
46
46
|
});
|
|
47
|
-
let
|
|
47
|
+
let p = {
|
|
48
48
|
x: 0,
|
|
49
49
|
y: 0
|
|
50
50
|
}, F = {
|
|
@@ -60,22 +60,22 @@ function nn(i) {
|
|
|
60
60
|
y: 0,
|
|
61
61
|
width: 0,
|
|
62
62
|
height: 0
|
|
63
|
-
},
|
|
63
|
+
}, _e = "se", d, ae, se, h = null, N, f = null, C = {
|
|
64
64
|
x: 0,
|
|
65
65
|
y: 0
|
|
66
|
-
}, k = null, V = null,
|
|
66
|
+
}, k = null, V = null, _, de = !1, s = {
|
|
67
67
|
x: i.defaultPosition?.x ?? 0,
|
|
68
68
|
y: i.defaultPosition?.y ?? 0,
|
|
69
69
|
width: i.defaultSize?.width ?? 400,
|
|
70
70
|
height: i.defaultSize?.height ?? 300
|
|
71
|
-
},
|
|
71
|
+
}, x = {
|
|
72
72
|
...s
|
|
73
73
|
}, A;
|
|
74
|
-
const
|
|
75
|
-
|
|
74
|
+
const $e = (e) => {
|
|
75
|
+
x = {
|
|
76
76
|
...e
|
|
77
77
|
};
|
|
78
|
-
const t = we(R(),
|
|
78
|
+
const t = we(R(), z());
|
|
79
79
|
A = {
|
|
80
80
|
x: t.width > e.width ? (e.x - t.x) / (t.width - e.width) : A?.x ?? 0.5,
|
|
81
81
|
y: t.height > e.height ? (e.y - t.y) / (t.height - e.height) : A?.y ?? 0.5
|
|
@@ -105,7 +105,7 @@ function nn(i) {
|
|
|
105
105
|
lockDocumentStyles: f !== "drag"
|
|
106
106
|
});
|
|
107
107
|
}, j = (e) => {
|
|
108
|
-
if ((e.x !== s.x || e.y !== s.y || e.width !== s.width || e.height !== s.height) && (
|
|
108
|
+
if ((e.x !== s.x || e.y !== s.y || e.width !== s.width || e.height !== s.height) && (_?.cancel(), _ = void 0), s = e, !d) return;
|
|
109
109
|
const t = ne(e);
|
|
110
110
|
d.style.transform = `translate3d(${t.x}px, ${t.y}px, 0)`, d.style.width = `${e.width / T()}px`, d.style.height = `${e.height / T()}px`;
|
|
111
111
|
}, Se = () => {
|
|
@@ -117,7 +117,7 @@ function nn(i) {
|
|
|
117
117
|
height: t.height
|
|
118
118
|
};
|
|
119
119
|
}, ue = (e) => {
|
|
120
|
-
(e.x !== s.x || e.y !== s.y || e.width !== s.width || e.height !== s.height) && (
|
|
120
|
+
(e.x !== s.x || e.y !== s.y || e.width !== s.width || e.height !== s.height) && (_?.cancel(), _ = void 0), s = e, je((t) => t.x === e.x && t.y === e.y ? t : {
|
|
121
121
|
x: e.x,
|
|
122
122
|
y: e.y
|
|
123
123
|
}), Ge((t) => t.width === e.width && t.height === e.height ? t : {
|
|
@@ -149,35 +149,35 @@ function nn(i) {
|
|
|
149
149
|
}, Pe = () => {
|
|
150
150
|
if (i.open && !(h === null || f === null) && !(typeof window > "u")) {
|
|
151
151
|
if (f === "drag" && u()) {
|
|
152
|
-
if (Math.hypot(C.x -
|
|
152
|
+
if (Math.hypot(C.x - p.x, C.y - p.y) < 4) return;
|
|
153
153
|
const e = me({
|
|
154
|
-
rect:
|
|
154
|
+
rect: x,
|
|
155
155
|
minSize: q(),
|
|
156
156
|
maxSize: H(),
|
|
157
157
|
viewport: R(),
|
|
158
|
-
viewportInsets:
|
|
158
|
+
viewportInsets: z(),
|
|
159
159
|
mobile: i.boundary === void 0 && E(),
|
|
160
160
|
mobilePadding: X
|
|
161
|
-
}), t = Math.max(0, Math.min(1, (
|
|
161
|
+
}), t = Math.max(0, Math.min(1, (p.x - F.x) / Math.max(1, F.width))), r = Math.max(0, Math.min(le, p.y - F.y));
|
|
162
162
|
F = {
|
|
163
163
|
...e,
|
|
164
|
-
x:
|
|
165
|
-
y:
|
|
164
|
+
x: p.x - e.width * t,
|
|
165
|
+
y: p.y - r
|
|
166
166
|
}, oe(!1);
|
|
167
167
|
}
|
|
168
168
|
j(xt({
|
|
169
169
|
mode: f,
|
|
170
170
|
pointer: C,
|
|
171
|
-
dragStartPos:
|
|
171
|
+
dragStartPos: p,
|
|
172
172
|
dragStartRect: F,
|
|
173
173
|
dragTitlebarHeight: le,
|
|
174
174
|
resizeStartPos: ze,
|
|
175
175
|
resizeStartRect: pe,
|
|
176
|
-
resizeHandle:
|
|
176
|
+
resizeHandle: _e,
|
|
177
177
|
minSize: q(),
|
|
178
178
|
maxSize: H(),
|
|
179
179
|
viewport: R(),
|
|
180
|
-
viewportInsets:
|
|
180
|
+
viewportInsets: z(),
|
|
181
181
|
mobile: i.boundary === void 0 && E(),
|
|
182
182
|
mobilePadding: X
|
|
183
183
|
}));
|
|
@@ -185,22 +185,22 @@ function nn(i) {
|
|
|
185
185
|
}, B = (e) => {
|
|
186
186
|
if (typeof window > "u") return;
|
|
187
187
|
const t = R();
|
|
188
|
-
if (u() ||
|
|
189
|
-
ue(we(t,
|
|
188
|
+
if (u() || v()) {
|
|
189
|
+
ue(we(t, z()));
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
let r = me({
|
|
193
|
-
rect:
|
|
193
|
+
rect: x,
|
|
194
194
|
minSize: q(),
|
|
195
195
|
maxSize: H(),
|
|
196
196
|
viewport: t,
|
|
197
|
-
viewportInsets:
|
|
197
|
+
viewportInsets: z(),
|
|
198
198
|
mobile: i.boundary === void 0 && E(),
|
|
199
199
|
mobilePadding: X,
|
|
200
200
|
center: e?.center ?? !1
|
|
201
201
|
});
|
|
202
202
|
if (i.boundary !== void 0 && A && !e?.center) {
|
|
203
|
-
const o = we(t,
|
|
203
|
+
const o = we(t, z());
|
|
204
204
|
r = {
|
|
205
205
|
...r,
|
|
206
206
|
x: o.x + A.x * Math.max(0, o.width - r.width),
|
|
@@ -209,10 +209,10 @@ function nn(i) {
|
|
|
209
209
|
}
|
|
210
210
|
if (ue(r), !A) {
|
|
211
211
|
const o = {
|
|
212
|
-
width:
|
|
213
|
-
height:
|
|
212
|
+
width: x.width,
|
|
213
|
+
height: x.height
|
|
214
214
|
};
|
|
215
|
-
|
|
215
|
+
$e(r), Object.assign(x, o);
|
|
216
216
|
}
|
|
217
217
|
}, Ie = (e) => {
|
|
218
218
|
k !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(k), k = null), e && Pe();
|
|
@@ -221,24 +221,24 @@ function nn(i) {
|
|
|
221
221
|
minSize: q(),
|
|
222
222
|
maxSize: H(),
|
|
223
223
|
viewport: R(),
|
|
224
|
-
viewportInsets:
|
|
224
|
+
viewportInsets: z(),
|
|
225
225
|
mobile: i.boundary === void 0 && E(),
|
|
226
226
|
mobilePadding: X
|
|
227
227
|
}) : null;
|
|
228
228
|
if (ge(() => {
|
|
229
229
|
if (o) {
|
|
230
230
|
ue(o);
|
|
231
|
-
const
|
|
232
|
-
width:
|
|
233
|
-
height:
|
|
231
|
+
const P = {
|
|
232
|
+
width: x.width,
|
|
233
|
+
height: x.height
|
|
234
234
|
};
|
|
235
|
-
|
|
235
|
+
$e(o), f === "drag" && Object.assign(x, P);
|
|
236
236
|
}
|
|
237
237
|
h = null, f = null, ye(!1), be(!1);
|
|
238
238
|
}), ce(!1, ""), N = void 0, o && (j(o), t && r && d?.animate && (r.x !== o.x || r.y !== o.y) && !window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)) {
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
transform: `translate3d(${
|
|
239
|
+
const P = ne(r), U = ne(o);
|
|
240
|
+
_ = d.animate([{
|
|
241
|
+
transform: `translate3d(${P.x}px, ${P.y}px, 0)`
|
|
242
242
|
}, {
|
|
243
243
|
transform: `translate3d(${U.x}px, ${U.y}px, 0)`
|
|
244
244
|
}], {
|
|
@@ -252,13 +252,13 @@ function nn(i) {
|
|
|
252
252
|
}) : Ie(e);
|
|
253
253
|
};
|
|
254
254
|
D(() => {
|
|
255
|
-
he(!1),
|
|
255
|
+
he(!1), _?.cancel();
|
|
256
256
|
}), dt(() => {
|
|
257
257
|
const e = () => {
|
|
258
258
|
const t = O(), r = i.boundary === void 0 ? {
|
|
259
259
|
boundaryHost: null,
|
|
260
260
|
mode: "global"
|
|
261
|
-
} :
|
|
261
|
+
} : _t({
|
|
262
262
|
owner: ee
|
|
263
263
|
}), o = zt(r, i.boundary, t?.safeArea);
|
|
264
264
|
ge(() => {
|
|
@@ -303,7 +303,7 @@ function nn(i) {
|
|
|
303
303
|
}
|
|
304
304
|
requestAnimationFrame(t);
|
|
305
305
|
}), I(() => {
|
|
306
|
-
|
|
306
|
+
z(), R(), v(), !(!i.open || !de || h !== null) && W(() => B({
|
|
307
307
|
center: !1
|
|
308
308
|
}));
|
|
309
309
|
}), I(() => {
|
|
@@ -344,7 +344,7 @@ function nn(i) {
|
|
|
344
344
|
T(), O()?.fixedOffset, j(h === null ? e : s);
|
|
345
345
|
});
|
|
346
346
|
const nt = (e) => {
|
|
347
|
-
!xe() ||
|
|
347
|
+
!xe() || v() || h !== null || e.pointerType === "mouse" && e.button !== 0 || e.target?.closest('button, input, select, textarea, a, [role="button"], [role="tab"], [data-floe-interactive], [contenteditable="true"]') || (e.preventDefault(), _?.cancel(), _ = void 0, le = e.currentTarget instanceof HTMLElement && e.currentTarget.getBoundingClientRect().height || 32, h = e.pointerId, f = "drag", ye(!0), p = {
|
|
348
348
|
x: e.clientX,
|
|
349
349
|
y: e.clientY
|
|
350
350
|
}, F = {
|
|
@@ -354,7 +354,7 @@ function nn(i) {
|
|
|
354
354
|
y: e.clientY
|
|
355
355
|
}, ce(!0, "grabbing"), Ce(e));
|
|
356
356
|
}, $ = (e) => (t) => {
|
|
357
|
-
!ve() || u() ||
|
|
357
|
+
!ve() || u() || v() || h !== null || t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), t.stopPropagation(), h = t.pointerId, f = "resize", be(!0), _e = e, ze = {
|
|
358
358
|
x: t.clientX,
|
|
359
359
|
y: t.clientY
|
|
360
360
|
}, pe = {
|
|
@@ -394,12 +394,12 @@ function nn(i) {
|
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
396
|
}, Ae = () => {
|
|
397
|
-
!K() ||
|
|
397
|
+
!K() || v() || (h !== null && he(!0), oe(!u()), B());
|
|
398
398
|
}, ot = (e) => {
|
|
399
399
|
e.target?.closest('button, input, select, textarea, a, [role="button"], [role="tab"], [data-floe-interactive], [contenteditable="true"]') || Ae();
|
|
400
400
|
}, rt = (e) => {
|
|
401
401
|
Ke(e.target) && Je();
|
|
402
|
-
},
|
|
402
|
+
}, S = (e) => J("absolute z-10", {
|
|
403
403
|
n: "cursor-ns-resize top-0 left-2 right-2 h-1",
|
|
404
404
|
s: "cursor-ns-resize bottom-0 left-2 right-2 h-1",
|
|
405
405
|
e: "cursor-ew-resize right-0 top-2 bottom-2 w-1",
|
|
@@ -410,7 +410,7 @@ function nn(i) {
|
|
|
410
410
|
sw: "cursor-nesw-resize bottom-0 left-0 w-2 h-2"
|
|
411
411
|
}[e]);
|
|
412
412
|
return [(() => {
|
|
413
|
-
var e =
|
|
413
|
+
var e = $t(), t = ee;
|
|
414
414
|
return typeof t == "function" ? Q(t, e) : ee = e, e;
|
|
415
415
|
})(), l(w, {
|
|
416
416
|
get when() {
|
|
@@ -419,7 +419,7 @@ function nn(i) {
|
|
|
419
419
|
get children() {
|
|
420
420
|
return l(lt, {
|
|
421
421
|
get children() {
|
|
422
|
-
var e = Lt(), t = e.firstChild, r = t.firstChild, o = r.firstChild,
|
|
422
|
+
var e = Lt(), t = e.firstChild, r = t.firstChild, o = r.firstChild, P = o.nextSibling, U = r.nextSibling;
|
|
423
423
|
Q((n) => {
|
|
424
424
|
d = n, W(() => j(Se()));
|
|
425
425
|
}, e), ke(e, Oe({
|
|
@@ -433,7 +433,7 @@ function nn(i) {
|
|
|
433
433
|
return M.exiting() || !te();
|
|
434
434
|
},
|
|
435
435
|
get "data-floe-floating-window-compact"() {
|
|
436
|
-
return
|
|
436
|
+
return v() ? "true" : void 0;
|
|
437
437
|
}
|
|
438
438
|
}, {
|
|
439
439
|
[Be]: "true"
|
|
@@ -481,7 +481,7 @@ function nn(i) {
|
|
|
481
481
|
get "data-floating-presence"() {
|
|
482
482
|
return M.state();
|
|
483
483
|
}
|
|
484
|
-
}), !1, !0), r
|
|
484
|
+
}), !1, !0), m(r, "dblclick", ot), m(r, "pointerdown", nt);
|
|
485
485
|
var Me = se;
|
|
486
486
|
return typeof Me == "function" ? Q(Me, r) : se = r, c(o, l(w, {
|
|
487
487
|
get when() {
|
|
@@ -528,9 +528,9 @@ function nn(i) {
|
|
|
528
528
|
var n = It(), G = n.firstChild;
|
|
529
529
|
return c(n, () => i.headerActions, G), n;
|
|
530
530
|
}
|
|
531
|
-
}),
|
|
531
|
+
}), P), c(P, l(w, {
|
|
532
532
|
get when() {
|
|
533
|
-
return Z(() => !!K())() && !
|
|
533
|
+
return Z(() => !!K())() && !v();
|
|
534
534
|
},
|
|
535
535
|
get children() {
|
|
536
536
|
return l(Le, {
|
|
@@ -563,7 +563,7 @@ function nn(i) {
|
|
|
563
563
|
}
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
|
-
}), null), c(
|
|
566
|
+
}), null), c(P, l(Le, {
|
|
567
567
|
variant: "ghost-destructive",
|
|
568
568
|
size: "icon",
|
|
569
569
|
"data-floe-floating-window-control": "close",
|
|
@@ -589,15 +589,15 @@ function nn(i) {
|
|
|
589
589
|
}
|
|
590
590
|
}), null), c(e, l(w, {
|
|
591
591
|
get when() {
|
|
592
|
-
return Z(() => !!(ve() && !u()))() && !
|
|
592
|
+
return Z(() => !!(ve() && !u()))() && !v();
|
|
593
593
|
},
|
|
594
594
|
get children() {
|
|
595
595
|
return [(() => {
|
|
596
596
|
var n = Ct();
|
|
597
|
-
return
|
|
597
|
+
return m(n, "pointerdown", $("n"), !0), g(() => y(n, S("n"))), n;
|
|
598
598
|
})(), (() => {
|
|
599
599
|
var n = At();
|
|
600
|
-
return
|
|
600
|
+
return m(n, "pointerdown", $("s"), !0), g(() => y(n, S("s"))), n;
|
|
601
601
|
})(), l(w, {
|
|
602
602
|
get when() {
|
|
603
603
|
return !E();
|
|
@@ -605,33 +605,33 @@ function nn(i) {
|
|
|
605
605
|
get children() {
|
|
606
606
|
return [(() => {
|
|
607
607
|
var n = Et();
|
|
608
|
-
return
|
|
608
|
+
return m(n, "pointerdown", $("e"), !0), g(() => y(n, S("e"))), n;
|
|
609
609
|
})(), (() => {
|
|
610
610
|
var n = Mt();
|
|
611
|
-
return
|
|
611
|
+
return m(n, "pointerdown", $("w"), !0), g(() => y(n, S("w"))), n;
|
|
612
612
|
})(), (() => {
|
|
613
613
|
var n = Ft();
|
|
614
|
-
return
|
|
614
|
+
return m(n, "pointerdown", $("ne"), !0), g(() => y(n, S("ne"))), n;
|
|
615
615
|
})(), (() => {
|
|
616
616
|
var n = kt();
|
|
617
|
-
return
|
|
617
|
+
return m(n, "pointerdown", $("nw"), !0), g(() => y(n, S("nw"))), n;
|
|
618
618
|
})(), (() => {
|
|
619
619
|
var n = Ot();
|
|
620
|
-
return
|
|
620
|
+
return m(n, "pointerdown", $("se"), !0), g(() => y(n, S("se"))), n;
|
|
621
621
|
})(), (() => {
|
|
622
622
|
var n = Tt();
|
|
623
|
-
return
|
|
623
|
+
return m(n, "pointerdown", $("sw"), !0), g(() => y(n, S("sw"))), n;
|
|
624
624
|
})()];
|
|
625
625
|
}
|
|
626
626
|
})];
|
|
627
627
|
}
|
|
628
|
-
}), null), g(() =>
|
|
628
|
+
}), null), g(() => y(r, J("flex shrink-0 items-center justify-between h-8", "border-b", u() ? "rounded-none" : "rounded-t-panel", xe() && !v() && (L() ? "cursor-grabbing" : "cursor-move")))), e;
|
|
629
629
|
}
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
632
|
})];
|
|
633
633
|
}
|
|
634
|
-
at(["pointerdown"
|
|
634
|
+
at(["pointerdown"]);
|
|
635
635
|
export {
|
|
636
636
|
nn as FloatingWindow
|
|
637
637
|
};
|
package/dist/language.css
CHANGED
|
@@ -77,9 +77,10 @@
|
|
|
77
77
|
--floe-field-edge-hover: color-mix(in srgb, var(--foreground) 32%, var(--card));
|
|
78
78
|
--floe-field-placeholder: color-mix(in srgb, var(--foreground) 42%, var(--background));
|
|
79
79
|
/* An unchecked box or switch has no fill of its own, so its boundary *is*
|
|
80
|
-
* the control and must clear 3:1 against every plane it can sit on.
|
|
81
|
-
|
|
82
|
-
--floe-control-edge
|
|
80
|
+
* the control and must clear 3:1 against every plane it can sit on. The 66%
|
|
81
|
+
* default covers the built-in planes; low-ink palettes own stronger overrides. */
|
|
82
|
+
--floe-control-edge: color-mix(in srgb, var(--foreground) 66%, var(--card));
|
|
83
|
+
--floe-control-edge-hover: color-mix(in srgb, var(--foreground) 80%, var(--card));
|
|
83
84
|
|
|
84
85
|
/* ---------------------------------------------------------------------
|
|
85
86
|
* State — the only hover/press/selection values in the system. They are
|
|
@@ -643,6 +643,10 @@ const C = {
|
|
|
643
643
|
}),
|
|
644
644
|
o({
|
|
645
645
|
name: "solarized-light",
|
|
646
|
+
semanticTokens: {
|
|
647
|
+
"--floe-control-edge": "color-mix(in srgb, #586E75 85%, #FFFDF4)",
|
|
648
|
+
"--floe-control-edge-hover": "#586E75"
|
|
649
|
+
},
|
|
646
650
|
inlineCode: { foreground: "#135BA7", background: "#F2EFE0" },
|
|
647
651
|
displayName: "Solarized Light",
|
|
648
652
|
description: "Solarized warmth with measured cyan, green, and amber syntax.",
|
|
@@ -964,7 +968,7 @@ const C = {
|
|
|
964
968
|
card: "#30312B",
|
|
965
969
|
muted: "#3A3B34",
|
|
966
970
|
mutedForeground: "#C5C8B5",
|
|
967
|
-
primary: "#
|
|
971
|
+
primary: "#FA2874",
|
|
968
972
|
// Preserve the pink action fill while keeping its darker hover state readable.
|
|
969
973
|
primaryForeground: "#050604",
|
|
970
974
|
border: "#494A42",
|