@floegence/floe-webapp-core 0.91.0 → 0.91.2
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/SegmentedControl.js +14 -12
- package/dist/floe.css +4 -3
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -22,12 +22,12 @@ const ee = {
|
|
|
22
22
|
function ne(L) {
|
|
23
23
|
const [r, N] = I(L, ["value", "onChange", "options", "size", "disabled", "class"]);
|
|
24
24
|
let d, c;
|
|
25
|
-
const
|
|
26
|
-
let f, u,
|
|
25
|
+
const h = /* @__PURE__ */ new Map(), [s, S] = J();
|
|
26
|
+
let f, u, b;
|
|
27
27
|
const y = () => {
|
|
28
|
-
const o =
|
|
28
|
+
const o = h.get(r.value);
|
|
29
29
|
if (!d || !o) {
|
|
30
|
-
u?.cancel(), S(void 0),
|
|
30
|
+
u?.cancel(), S(void 0), b = void 0;
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
if (!o.offsetWidth || !d.getClientRects().length) return;
|
|
@@ -37,19 +37,21 @@ function ne(L) {
|
|
|
37
37
|
width: o.offsetWidth,
|
|
38
38
|
height: o.offsetHeight
|
|
39
39
|
}, v = X(s);
|
|
40
|
-
if (v && Object.keys(n).every((a) => n[a] === v[a]) &&
|
|
41
|
-
const e = v &&
|
|
40
|
+
if (v && Object.keys(n).every((a) => n[a] === v[a]) && b === r.value) return;
|
|
41
|
+
const e = v && b !== r.value && c && !window.matchMedia("(prefers-reduced-motion: reduce), (forced-colors: active)").matches ? getComputedStyle(c) : void 0, l = e ? {
|
|
42
42
|
transform: e.transform,
|
|
43
43
|
width: e.width
|
|
44
44
|
} : void 0;
|
|
45
|
-
if (u?.cancel(), S(n),
|
|
45
|
+
if (u?.cancel(), S(n), b = r.value, l && c) {
|
|
46
46
|
const a = getComputedStyle(d);
|
|
47
47
|
u = c.animate([l, {
|
|
48
48
|
transform: `translate(${n.x}px, ${n.y}px)`,
|
|
49
49
|
width: `${n.width}px`
|
|
50
50
|
}], {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// Position changes need visible travel: the fast entrance curve
|
|
52
|
+
// covers almost 90% of this short rail in its first 60ms.
|
|
53
|
+
duration: parseFloat(a.getPropertyValue("--floe-duration-slow")) || 280,
|
|
54
|
+
easing: a.getPropertyValue("--floe-ease-in-out").trim() || "ease-in-out"
|
|
53
55
|
}), u.id = "floe-segmented-selection";
|
|
54
56
|
}
|
|
55
57
|
};
|
|
@@ -58,7 +60,7 @@ function ne(L) {
|
|
|
58
60
|
}), Q(() => {
|
|
59
61
|
if (typeof ResizeObserver < "u") {
|
|
60
62
|
f = new ResizeObserver(y), f.observe(d);
|
|
61
|
-
for (const o of
|
|
63
|
+
for (const o of h.values()) f.observe(o);
|
|
62
64
|
}
|
|
63
65
|
y();
|
|
64
66
|
}), D(() => {
|
|
@@ -90,8 +92,8 @@ function ne(L) {
|
|
|
90
92
|
return (() => {
|
|
91
93
|
var i = Z(), g = i.firstChild, m = g.firstChild;
|
|
92
94
|
return i.$$click = () => T(e.value, e.disabled), $((t) => {
|
|
93
|
-
|
|
94
|
-
f?.unobserve(t),
|
|
95
|
+
h.set(e.value, t), f?.observe(t), D(() => {
|
|
96
|
+
f?.unobserve(t), h.delete(e.value);
|
|
95
97
|
});
|
|
96
98
|
}, i), k(g, (() => {
|
|
97
99
|
var t = B(() => !!e.icon);
|
package/dist/floe.css
CHANGED
|
@@ -1017,7 +1017,7 @@
|
|
|
1017
1017
|
display: flex; flex-direction: column; min-width: 0;
|
|
1018
1018
|
max-height: var(--floe-prompt-max-height);
|
|
1019
1019
|
overflow: hidden; pointer-events: auto;
|
|
1020
|
-
border:
|
|
1020
|
+
border: 0;
|
|
1021
1021
|
border-radius: var(--floe-radius-card);
|
|
1022
1022
|
background: var(--floe-plane-float);
|
|
1023
1023
|
color: var(--floe-ink);
|
|
@@ -1061,7 +1061,7 @@
|
|
|
1061
1061
|
.floe-prompt-card-actions { display: flex; align-items: center; gap: var(--floe-gap-control); padding: var(--floe-pad-control) 0 0; }
|
|
1062
1062
|
.floe-prompt-card-references { min-width: 0; }
|
|
1063
1063
|
.floe-prompt-card-tools { display: flex; align-items: center; flex: 1; min-width: 0; gap: var(--floe-gap-inline); }
|
|
1064
|
-
.floe-prompt-card-tools > .relative {
|
|
1064
|
+
.floe-prompt-card-tools > .relative { flex: 1; min-width: 0; }
|
|
1065
1065
|
.floe-prompt-card .floe-prompt-card-attach { flex-shrink: 0; width: var(--floe-control-height-sm); height: var(--floe-control-height-sm); border-radius: var(--floe-radius-sm); }
|
|
1066
1066
|
.floe-prompt-card .floe-prompt-card-selection { width: auto; max-width: 100%; height: var(--floe-control-height-sm); padding: 0 var(--floe-pad-control); border-color: transparent; background: transparent; font-size: var(--floe-type-supporting); box-shadow: none; }
|
|
1067
1067
|
.floe-prompt-card .floe-prompt-card-selection:hover { background: var(--muted); }
|
|
@@ -1073,4 +1073,5 @@
|
|
|
1073
1073
|
.floe-prompt-card-input { font-size: 1rem; }
|
|
1074
1074
|
.floe-prompt-card .floe-prompt-card-selection { min-height: 2.75rem; }
|
|
1075
1075
|
}
|
|
1076
|
-
|
|
1076
|
+
:root[data-floe-shell-theme='hc-light'] .floe-prompt-card { border: 1px solid var(--floe-line); }
|
|
1077
|
+
@media (forced-colors: active) { .floe-prompt-card { border: 1px solid CanvasText; } }
|