@brett_lamy/ui 5.1.0 → 5.3.0
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/adaptive-pane.d.ts +12 -1
- package/dist/components/adaptive-pane.d.ts.map +1 -1
- package/dist/components/adaptive-pane.js +122 -19
- package/dist/components/avatar.d.ts +47 -5
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +101 -14
- package/dist/components/breadcrumb.d.ts +87 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +312 -0
- package/dist/components/color-picker.js +15 -15
- package/dist/components/command-menu.js +13 -13
- package/dist/components/credenza.d.ts +5 -2
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.js +62 -60
- package/dist/components/date-picker.js +9 -9
- package/dist/components/edge-drawer.d.ts +7 -2
- package/dist/components/edge-drawer.d.ts.map +1 -1
- package/dist/components/edge-drawer.js +7 -4
- package/dist/components/filmstrip.d.ts +19 -0
- package/dist/components/filmstrip.d.ts.map +1 -0
- package/dist/components/filmstrip.js +59 -0
- package/dist/components/filter-input.js +4 -4
- package/dist/components/filter.js +62 -62
- package/dist/components/font-picker.d.ts +67 -0
- package/dist/components/font-picker.d.ts.map +1 -0
- package/dist/components/font-picker.js +373 -0
- package/dist/components/markdown-editor.d.ts +11 -0
- package/dist/components/markdown-editor.d.ts.map +1 -1
- package/dist/components/markdown-editor.js +72 -65
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.js +75 -65
- package/dist/components/number-morph.d.ts.map +1 -1
- package/dist/components/number-morph.js +5 -5
- package/dist/components/replay-preview.d.ts +2 -2
- package/dist/components/replay-preview.d.ts.map +1 -1
- package/dist/components/replay-preview.js +3 -3
- package/dist/components/result-table.js +10 -10
- package/dist/components/schema-tree.d.ts.map +1 -1
- package/dist/components/schema-tree.js +62 -131
- package/dist/components/segmented.d.ts +1 -1
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.js +1 -1
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +8 -4
- package/dist/components/split-view.d.ts +3 -1
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.js +211 -211
- package/dist/components/spreadsheet.d.ts +58 -0
- package/dist/components/spreadsheet.d.ts.map +1 -0
- package/dist/components/spreadsheet.js +804 -0
- package/dist/components/sql-console.d.ts.map +1 -1
- package/dist/components/sql-console.js +2 -1
- package/dist/components/sql-editor.js +8 -8
- package/dist/components/stl-viewer.d.ts +3 -0
- package/dist/components/stl-viewer.d.ts.map +1 -0
- package/dist/components/stl-viewer.js +2 -0
- package/dist/components/strudel-player.d.ts +3 -0
- package/dist/components/strudel-player.d.ts.map +1 -0
- package/dist/components/strudel-player.js +2 -0
- package/dist/components/strudel-rack.d.ts +3 -0
- package/dist/components/strudel-rack.d.ts.map +1 -0
- package/dist/components/strudel-rack.js +2 -0
- package/dist/components/strudel-syntax.d.ts +3 -0
- package/dist/components/strudel-syntax.d.ts.map +1 -0
- package/dist/components/strudel-syntax.js +2 -0
- package/dist/components/tabs.js +3 -3
- package/dist/components/tailscale-menu.d.ts +69 -0
- package/dist/components/tailscale-menu.d.ts.map +1 -0
- package/dist/components/tailscale-menu.js +202 -0
- package/dist/components/toggle-group.js +3 -3
- package/dist/components/tree.d.ts +82 -0
- package/dist/components/tree.d.ts.map +1 -0
- package/dist/components/tree.js +494 -0
- package/dist/components/video-preview.d.ts +46 -0
- package/dist/components/video-preview.d.ts.map +1 -0
- package/dist/components/video-preview.js +197 -0
- package/dist/components/video-timeline.d.ts +64 -0
- package/dist/components/video-timeline.d.ts.map +1 -0
- package/dist/components/video-timeline.js +479 -0
- package/dist/components/waveform.d.ts +23 -0
- package/dist/components/waveform.d.ts.map +1 -0
- package/dist/components/waveform.js +56 -0
- package/dist/ffmpeg-worker.js +118 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +48 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +145 -121
- package/dist/lib/csv.d.ts +28 -0
- package/dist/lib/csv.d.ts.map +1 -0
- package/dist/lib/csv.js +90 -0
- package/dist/lib/drawer-swipe.d.ts +31 -0
- package/dist/lib/drawer-swipe.d.ts.map +1 -0
- package/dist/lib/drawer-swipe.js +68 -0
- package/dist/lib/ffmpeg/index.d.ts +117 -0
- package/dist/lib/ffmpeg/index.d.ts.map +1 -0
- package/dist/lib/ffmpeg/index.js +204 -0
- package/dist/lib/ffmpeg/media.d.ts +39 -0
- package/dist/lib/ffmpeg/media.d.ts.map +1 -0
- package/dist/lib/ffmpeg/media.js +100 -0
- package/dist/lib/ffmpeg/react.d.ts +51 -0
- package/dist/lib/ffmpeg/react.d.ts.map +1 -0
- package/dist/lib/ffmpeg/react.js +113 -0
- package/dist/lib/google-fonts.d.ts +47 -0
- package/dist/lib/google-fonts.d.ts.map +1 -0
- package/dist/lib/google-fonts.generated.d.ts +2 -0
- package/dist/lib/google-fonts.generated.d.ts.map +1 -0
- package/dist/lib/google-fonts.generated.js +1925 -0
- package/dist/lib/google-fonts.js +112 -0
- package/dist/lib/icon.d.ts +6 -1
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.js +2 -0
- package/dist/lib/playback.d.ts +34 -0
- package/dist/lib/playback.d.ts.map +1 -0
- package/dist/lib/playback.js +79 -0
- package/dist/lib/spreadsheet-gpu.d.ts +9 -0
- package/dist/lib/spreadsheet-gpu.d.ts.map +1 -0
- package/dist/lib/spreadsheet-gpu.js +237 -0
- package/dist/lib/spreadsheet.d.ts +82 -0
- package/dist/lib/spreadsheet.d.ts.map +1 -0
- package/dist/lib/spreadsheet.js +162 -0
- package/dist/lib/syntax.d.ts +2 -6
- package/dist/lib/syntax.d.ts.map +1 -1
- package/dist/lib/syntax.js +53 -75
- package/dist/lib/tailscale-connect.d.ts +33 -0
- package/dist/lib/tailscale-connect.d.ts.map +1 -1
- package/dist/lib/tailscale-connect.js +221 -42
- package/dist/lib/tailscale-exit.d.ts +19 -0
- package/dist/lib/tailscale-exit.d.ts.map +1 -0
- package/dist/lib/tailscale-exit.js +14 -0
- package/dist/lib/tailscale-fake.d.ts +8 -0
- package/dist/lib/tailscale-fake.d.ts.map +1 -1
- package/dist/lib/tailscale-fake.js +51 -26
- package/dist/lib/tailscale-roots.d.ts +3 -0
- package/dist/lib/tailscale-roots.d.ts.map +1 -0
- package/dist/lib/tailscale-roots.js +4 -0
- package/dist/lib/tailscale.d.ts +23 -0
- package/dist/lib/tailscale.d.ts.map +1 -1
- package/dist/lib/tailscale.js +156 -94
- package/dist/lib/title-flight.d.ts +4 -0
- package/dist/lib/title-flight.d.ts.map +1 -1
- package/dist/lib/title-flight.js +15 -12
- package/dist/lib/tokens.generated.d.ts +2 -2
- package/dist/lib/tokens.generated.d.ts.map +1 -1
- package/dist/lib/tokens.generated.js +2 -2
- package/dist/lib/video-render.d.ts +38 -0
- package/dist/lib/video-render.d.ts.map +1 -0
- package/dist/lib/video-render.js +147 -0
- package/dist/lib/video-timeline.d.ts +154 -0
- package/dist/lib/video-timeline.d.ts.map +1 -0
- package/dist/lib/video-timeline.js +265 -0
- package/dist/lib/webgpu.d.ts +26 -0
- package/dist/lib/webgpu.d.ts.map +1 -0
- package/dist/lib/webgpu.js +28 -0
- package/dist/theme.css +3 -0
- package/package.json +8 -3
|
@@ -7,9 +7,9 @@ import { useEdgeSwipe as o } from "../lib/edge-swipe.js";
|
|
|
7
7
|
import { Spinner as s } from "./spinner.js";
|
|
8
8
|
import { armBackHistory as c, useBackHistory as l } from "../lib/back-history.js";
|
|
9
9
|
import { usePullToRefresh as u } from "../lib/pull-to-refresh.js";
|
|
10
|
-
import { backLabel as d,
|
|
11
|
-
import { useSplitViewBack as
|
|
12
|
-
import { use as
|
|
10
|
+
import { backLabel as d, pushedTitle as f, shownTitle as p, useTitleFlight as m } from "../lib/title-flight.js";
|
|
11
|
+
import { useSplitViewBack as h } from "./split-view.js";
|
|
12
|
+
import { use as ee, useEffect as g, useLayoutEffect as _, useRef as v, useState as y } from "react";
|
|
13
13
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
14
14
|
import { Button as S } from "react-aria-components";
|
|
15
15
|
//#region src/components/navigation-stack.tsx
|
|
@@ -23,17 +23,17 @@ var C = {
|
|
|
23
23
|
flick: .55,
|
|
24
24
|
settleMs: 580
|
|
25
25
|
};
|
|
26
|
-
function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle: p, reg: m, defIns:
|
|
27
|
-
let
|
|
26
|
+
function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle: p, reg: m, defIns: h, z: w, rootBack: T }) {
|
|
27
|
+
let E = o === 0 && !l ? T : null, D = E ? E.title ?? "Back" : p, O = v(!1), [k, A] = y(!d), [j, M] = y(!1), [N, P] = y(!1), [F, I] = y(!1), L = ee(r), R = v(0), z = v(null), B = v(null), V = v(null), H = v(null), U = v(null), W = v(null), G = v(null), [K, q] = y({
|
|
28
28
|
mode: "title",
|
|
29
29
|
w: 160
|
|
30
|
-
}),
|
|
30
|
+
}), J = o > 0 || l || !!E;
|
|
31
31
|
_(() => {
|
|
32
|
-
let e =
|
|
33
|
-
if (!
|
|
32
|
+
let e = H.current, n = U.current, r = W.current, i = G.current;
|
|
33
|
+
if (!J || !e || !r || !i) return;
|
|
34
34
|
let a = () => {
|
|
35
35
|
let a = t.title != null && n ? n.offsetWidth : 0, o = Math.floor((e.clientWidth - a) / 2 - 40), s = r.offsetWidth, c = i.offsetWidth, l = s > 0 && (o >= s || o >= c + 14) ? "title" : o >= c ? "back" : "none";
|
|
36
|
-
|
|
36
|
+
q((e) => e.mode === l && e.w === o ? e : {
|
|
37
37
|
mode: l,
|
|
38
38
|
w: Math.max(0, o)
|
|
39
39
|
});
|
|
@@ -46,24 +46,34 @@ function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle:
|
|
|
46
46
|
i
|
|
47
47
|
].forEach((e) => o.observe(e)), n && o.observe(n), () => o.disconnect();
|
|
48
48
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
J,
|
|
50
|
+
D,
|
|
51
51
|
t.title
|
|
52
52
|
]), _(() => {
|
|
53
|
-
d && !
|
|
53
|
+
d && !O.current && (O.current = !0, A(!1), requestAnimationFrame(() => requestAnimationFrame(() => A(!0))));
|
|
54
54
|
}, [d]), g(() => {
|
|
55
|
-
l && requestAnimationFrame(() =>
|
|
55
|
+
l && requestAnimationFrame(() => M(!0));
|
|
56
56
|
}, [l]);
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
let
|
|
57
|
+
let Y = !l && o < c, { off: X, under: te } = C, ne = l ? j ? X : "0%" : k ? Y ? te : "0%" : X, re = t.bottomInset == null ? h || 0 : t.bottomInset, Z = L + 52, ie = t.hideChromeOnScroll !== !1, Q = !l && !Y, $ = v(Q);
|
|
58
|
+
$.current = Q;
|
|
59
|
+
let ae = v(!1);
|
|
60
|
+
g(() => {
|
|
61
|
+
Q && (!ae.current && o === 0 && !F || (ae.current = !0, a.set(F)));
|
|
62
|
+
}, [
|
|
63
|
+
Q,
|
|
64
|
+
F,
|
|
65
|
+
o
|
|
66
|
+
]), g(() => () => {
|
|
67
|
+
$.current && a.set(!1);
|
|
68
|
+
}, []);
|
|
69
|
+
let oe = (e) => {
|
|
60
70
|
let n = e.currentTarget.scrollTop, r = n > (t.largeTitle ? 44 : 8);
|
|
61
|
-
if (r !==
|
|
62
|
-
let e = n -
|
|
63
|
-
n <
|
|
71
|
+
if (r !== N && P(r), ie && !l) {
|
|
72
|
+
let e = n - R.current;
|
|
73
|
+
n < Z * .7 ? F && I(!1) : e > 5 ? F || I(!0) : e < -5 && F && I(!1);
|
|
64
74
|
}
|
|
65
|
-
|
|
66
|
-
},
|
|
75
|
+
R.current = n;
|
|
76
|
+
}, se = t.titleOnScroll ? N : !t.largeTitle || N, ce = (e) => {
|
|
67
77
|
if (e.key === "Escape" && f.canPop && o > 0) {
|
|
68
78
|
f.pop();
|
|
69
79
|
return;
|
|
@@ -72,11 +82,11 @@ function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle:
|
|
|
72
82
|
let t = [...e.currentTarget.querySelectorAll("[data-tkrow]")].filter((e) => e.offsetParent), n = t.indexOf(document.activeElement), r = e.key === "ArrowDown" ? n < 0 ? 0 : Math.min(n + 1, t.length - 1) : n < 0 ? t.length - 1 : Math.max(n - 1, 0);
|
|
73
83
|
t[r] && (t[r].focus(), e.preventDefault());
|
|
74
84
|
}
|
|
75
|
-
},
|
|
85
|
+
}, le = u({
|
|
76
86
|
onRefresh: t.onRefresh,
|
|
77
|
-
scroller:
|
|
78
|
-
content:
|
|
79
|
-
spinner:
|
|
87
|
+
scroller: z,
|
|
88
|
+
content: B,
|
|
89
|
+
spinner: V
|
|
80
90
|
});
|
|
81
91
|
return /* @__PURE__ */ x("div", {
|
|
82
92
|
ref: (e) => m(t.key, { el: e }),
|
|
@@ -84,28 +94,28 @@ function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle:
|
|
|
84
94
|
"data-screen-key": t.key,
|
|
85
95
|
"data-screen-label": typeof t.title == "string" ? t.title : t.key,
|
|
86
96
|
tabIndex: -1,
|
|
87
|
-
inert:
|
|
88
|
-
onKeyDown:
|
|
97
|
+
inert: Y || l || void 0,
|
|
98
|
+
onKeyDown: ce,
|
|
89
99
|
className: e("outline-none absolute inset-0 z-(--screen-z) overflow-hidden will-change-transform [transform:translateX(var(--screen-x))] transition-transform duration-spring-smooth ease-spring-smooth motion-reduce:transition-none", t.grouped ? "bg-muted" : "bg-background", o > 0 && "shadow-[-10px_0_30px_black] shadow-black/16", l ? "pointer-events-none" : "pointer-events-auto"),
|
|
90
|
-
"data-scrolled":
|
|
100
|
+
"data-scrolled": N ? "" : void 0,
|
|
91
101
|
style: {
|
|
92
|
-
"--screen-z": 10 +
|
|
93
|
-
"--screen-x":
|
|
94
|
-
"--screen-bar-h":
|
|
95
|
-
"--screen-safe-top":
|
|
102
|
+
"--screen-z": 10 + w,
|
|
103
|
+
"--screen-x": ne,
|
|
104
|
+
"--screen-bar-h": Z + "px",
|
|
105
|
+
"--screen-safe-top": L + "px",
|
|
96
106
|
"--screen-max-w": t.maxW == null || t.maxW === 0 || t.maxW === "" ? "none" : typeof t.maxW == "number" ? t.maxW + "px" : t.maxW,
|
|
97
|
-
"--screen-inset":
|
|
107
|
+
"--screen-inset": re + 28 + "px"
|
|
98
108
|
},
|
|
99
109
|
children: [
|
|
100
110
|
/* @__PURE__ */ b("div", {
|
|
101
111
|
ref: (e) => {
|
|
102
|
-
|
|
112
|
+
z.current = e, m(t.key, { scroller: e });
|
|
103
113
|
},
|
|
104
114
|
className: "bl-scroll absolute inset-0 overflow-x-hidden overflow-y-auto overscroll-contain [-webkit-overflow-scrolling:touch]",
|
|
105
|
-
onScroll:
|
|
106
|
-
|
|
115
|
+
onScroll: oe,
|
|
116
|
+
...le.bind,
|
|
107
117
|
children: /* @__PURE__ */ x("div", {
|
|
108
|
-
ref:
|
|
118
|
+
ref: B,
|
|
109
119
|
className: "mx-auto box-border w-full max-w-(--screen-max-w)",
|
|
110
120
|
children: [
|
|
111
121
|
t.largeTitle ? /* @__PURE__ */ x("div", {
|
|
@@ -122,7 +132,7 @@ function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle:
|
|
|
122
132
|
}) : null]
|
|
123
133
|
}) : /* @__PURE__ */ b("div", { className: "h-(--screen-bar-h)" }),
|
|
124
134
|
/* @__PURE__ */ b(i.Provider, {
|
|
125
|
-
value:
|
|
135
|
+
value: Z,
|
|
126
136
|
children: t.content
|
|
127
137
|
}),
|
|
128
138
|
/* @__PURE__ */ b("div", { className: "h-(--screen-inset)" })
|
|
@@ -130,53 +140,53 @@ function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle:
|
|
|
130
140
|
})
|
|
131
141
|
}),
|
|
132
142
|
t.onRefresh ? /* @__PURE__ */ b("div", {
|
|
133
|
-
ref:
|
|
143
|
+
ref: V,
|
|
134
144
|
className: "pointer-events-none absolute top-[calc(var(--screen-bar-h)+8px)] left-1/2 z-5 [transform:translateX(-50%)] text-muted-foreground opacity-0 transition-opacity duration-spring-snappy ease-spring-snappy",
|
|
135
|
-
children: /* @__PURE__ */ b(s, { spin:
|
|
145
|
+
children: /* @__PURE__ */ b(s, { spin: le.refreshing })
|
|
136
146
|
}) : null,
|
|
137
147
|
/* @__PURE__ */ x("div", {
|
|
138
|
-
className: e("absolute inset-x-0 top-0 z-30 box-border flex h-(--screen-bar-h) items-end px-1.5 pt-(--screen-safe-top) transition-transform duration-spring-smooth ease-spring-smooth",
|
|
148
|
+
className: e("absolute inset-x-0 top-0 z-30 box-border flex h-(--screen-bar-h) items-end px-1.5 pt-(--screen-safe-top) transition-transform duration-spring-smooth ease-spring-smooth", F ? "[transform:translateY(calc(var(--screen-safe-top)-var(--screen-bar-h)))]" : "[transform:none]"),
|
|
139
149
|
children: [
|
|
140
|
-
/* @__PURE__ */ b("div", { className: e("absolute inset-0 [border-bottom:1px_solid_var(--border)] bg-bar backdrop-blur-[18px] backdrop-saturate-[1.7] transition-opacity duration-spring-snappy ease-spring-snappy",
|
|
141
|
-
|
|
150
|
+
/* @__PURE__ */ b("div", { className: e("absolute inset-0 [border-bottom:1px_solid_var(--border)] bg-bar backdrop-blur-[18px] backdrop-saturate-[1.7] transition-opacity duration-spring-snappy ease-spring-snappy", N ? "opacity-100" : "opacity-0") }),
|
|
151
|
+
L ? /* @__PURE__ */ b("div", { className: e("absolute inset-x-0 top-0 h-(--screen-safe-top) bg-bar backdrop-blur-[18px] backdrop-saturate-[1.7] transition-transform duration-spring-smooth ease-spring-smooth", N || F ? "opacity-100" : "opacity-0", F ? "[transform:translateY(calc(var(--screen-bar-h)-var(--screen-safe-top)))]" : "[transform:none]") }) : null,
|
|
142
152
|
/* @__PURE__ */ x("div", {
|
|
143
|
-
ref:
|
|
144
|
-
className: e("flex h-toolbar w-full items-center transition-opacity duration-spring-snappy ease-spring-snappy",
|
|
153
|
+
ref: H,
|
|
154
|
+
className: e("flex h-toolbar w-full items-center transition-opacity duration-spring-snappy ease-spring-snappy", F ? "opacity-0" : "opacity-100"),
|
|
145
155
|
children: [
|
|
146
156
|
/* @__PURE__ */ x("div", {
|
|
147
157
|
className: "relative z-1 flex min-w-[44px] items-center",
|
|
148
|
-
children: [
|
|
158
|
+
children: [J ? /* @__PURE__ */ x(S, {
|
|
149
159
|
className: "bl-btn flex cursor-pointer items-center border-0 bg-transparent py-1.5 pr-2 pl-0 [font-family:inherit] text-body text-primary",
|
|
150
|
-
"aria-label":
|
|
151
|
-
onPress:
|
|
160
|
+
"aria-label": K.mode === "none" ? "Back" : void 0,
|
|
161
|
+
onPress: E ? E.onPress : f.canPop ? f.pop : void 0,
|
|
152
162
|
children: [/* @__PURE__ */ b(n, {
|
|
153
163
|
name: "chevL",
|
|
154
164
|
size: 24,
|
|
155
165
|
sw: 2.4
|
|
156
|
-
}),
|
|
166
|
+
}), K.mode === "none" ? null : /* @__PURE__ */ b("span", {
|
|
157
167
|
ref: (e) => m(t.key, { back: e }),
|
|
158
|
-
"data-mode":
|
|
168
|
+
"data-mode": K.mode,
|
|
159
169
|
className: "max-w-(--back-w) truncate",
|
|
160
|
-
style: { "--back-w":
|
|
161
|
-
children:
|
|
170
|
+
style: { "--back-w": K.w + "px" },
|
|
171
|
+
children: K.mode === "title" ? D : "Back"
|
|
162
172
|
})]
|
|
163
|
-
}) : t.leading || null,
|
|
173
|
+
}) : t.leading || null, J ? /* @__PURE__ */ x("span", {
|
|
164
174
|
"aria-hidden": "true",
|
|
165
175
|
className: "pointer-events-none invisible absolute top-0 left-0 flex text-body whitespace-nowrap",
|
|
166
176
|
children: [/* @__PURE__ */ b("span", {
|
|
167
|
-
ref:
|
|
168
|
-
children:
|
|
177
|
+
ref: W,
|
|
178
|
+
children: D
|
|
169
179
|
}), /* @__PURE__ */ b("span", {
|
|
170
|
-
ref:
|
|
180
|
+
ref: G,
|
|
171
181
|
children: "Back"
|
|
172
182
|
})]
|
|
173
183
|
}) : null]
|
|
174
184
|
}),
|
|
175
185
|
/* @__PURE__ */ b("div", {
|
|
176
186
|
ref: (e) => {
|
|
177
|
-
|
|
187
|
+
U.current = e, m(t.key, { inline: e });
|
|
178
188
|
},
|
|
179
|
-
className: e("pointer-events-none absolute left-1/2 max-w-[52%] -translate-x-1/2 truncate text-body font-semibold text-foreground transition-opacity duration-spring-snappy ease-spring-snappy",
|
|
189
|
+
className: e("pointer-events-none absolute left-1/2 max-w-[52%] -translate-x-1/2 truncate text-body font-semibold text-foreground transition-opacity duration-spring-snappy ease-spring-snappy", se ? "opacity-100" : "opacity-0"),
|
|
180
190
|
children: t.title
|
|
181
191
|
}),
|
|
182
192
|
/* @__PURE__ */ b("div", {
|
|
@@ -190,14 +200,14 @@ function w({ sc: t, depth: o, top: c, ghost: l, entering: d, nav: f, backTitle:
|
|
|
190
200
|
t.overlay || null,
|
|
191
201
|
/* @__PURE__ */ b("div", {
|
|
192
202
|
ref: (e) => m(t.key, { dim: e }),
|
|
193
|
-
className: e("pointer-events-none absolute inset-0 z-200 bg-black transition-opacity duration-spring-smooth ease-spring-smooth",
|
|
203
|
+
className: e("pointer-events-none absolute inset-0 z-200 bg-black transition-opacity duration-spring-smooth ease-spring-smooth", Y ? "opacity-12" : "opacity-0")
|
|
194
204
|
})
|
|
195
205
|
]
|
|
196
206
|
});
|
|
197
207
|
}
|
|
198
208
|
var T = C.settleMs;
|
|
199
|
-
function E({ screens: n, onPop: i, defIns: a, safeTop: s, rootBack: u, className:
|
|
200
|
-
let x = n[0]?.title, S =
|
|
209
|
+
function E({ screens: n, onPop: i, defIns: a, safeTop: s, rootBack: u, className: ee, style: g }) {
|
|
210
|
+
let x = n[0]?.title, S = h(typeof x == "string" ? x : void 0), E = u === !1 ? null : u ?? (S ? {
|
|
201
211
|
title: S.title,
|
|
202
212
|
onPress: S.back
|
|
203
213
|
} : null), D = v(null), O = v({}), k = (e, t) => {
|
|
@@ -210,7 +220,7 @@ function E({ screens: n, onPop: i, defIns: a, safeTop: s, rootBack: u, className
|
|
|
210
220
|
exit: null
|
|
211
221
|
}), M = v(n), N = v(!1), P = v(void 0), F = v(i);
|
|
212
222
|
F.current = i;
|
|
213
|
-
let I =
|
|
223
|
+
let I = m(D), L = v({}), R = () => !document.activeElement || document.activeElement === document.body || !!D.current?.contains(document.activeElement), z = n.map((e) => e.key).join("¦");
|
|
214
224
|
_(() => {
|
|
215
225
|
let e = M.current;
|
|
216
226
|
M.current = n;
|
|
@@ -247,7 +257,7 @@ function E({ screens: n, onPop: i, defIns: a, safeTop: s, rootBack: u, className
|
|
|
247
257
|
let n = t[t.length - 1], i = r[r.length - 1];
|
|
248
258
|
I.fly(() => [
|
|
249
259
|
d(O.current[n]),
|
|
250
|
-
|
|
260
|
+
p(O.current[i]),
|
|
251
261
|
O.current[i]?.el
|
|
252
262
|
]), R() && requestAnimationFrame(() => {
|
|
253
263
|
let e = L.current[i];
|
|
@@ -280,7 +290,7 @@ function E({ screens: n, onPop: i, defIns: a, safeTop: s, rootBack: u, className
|
|
|
280
290
|
};
|
|
281
291
|
},
|
|
282
292
|
engage: (e) => {
|
|
283
|
-
e.flight = I.scrub(d(e.top),
|
|
293
|
+
e.flight = I.scrub(d(e.top), p(e.under), e.under.el);
|
|
284
294
|
},
|
|
285
295
|
move: (e, t, n) => {
|
|
286
296
|
e.top.el.style.transition = "none", e.top.el.style.transform = `translateX(${n}px)`, e.under.el.style.transition = "none", e.under.el.style.transform = `translateX(${C.underPct * (1 - t)}%)`, e.under.dim && (e.under.dim.style.transition = "none", e.under.dim.style.opacity = String(C.dim * (1 - t))), I.isCurrent(e.flight) && e.flight.f.set(t);
|
|
@@ -308,7 +318,7 @@ function E({ screens: n, onPop: i, defIns: a, safeTop: s, rootBack: u, className
|
|
|
308
318
|
let t = e.target.closest("[data-slot=screen]")?.getAttribute("data-screen-key");
|
|
309
319
|
t && e.target !== e.currentTarget && e.target.getAttribute("data-slot") !== "screen" && (L.current[t] = e.target);
|
|
310
320
|
},
|
|
311
|
-
className: e("absolute inset-0 touch-pan-y overflow-hidden",
|
|
321
|
+
className: e("absolute inset-0 touch-pan-y overflow-hidden", ee),
|
|
312
322
|
style: g,
|
|
313
323
|
children: q.map((e) => /* @__PURE__ */ b(w, {
|
|
314
324
|
sc: e.sc,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-morph.d.ts","sourceRoot":"","sources":["../../src/components/number-morph.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"number-morph.d.ts","sourceRoot":"","sources":["../../src/components/number-morph.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAgEvE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,MAAM,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CA8BzF"}
|
|
@@ -29,16 +29,16 @@ function m(e, t) {
|
|
|
29
29
|
return s;
|
|
30
30
|
}
|
|
31
31
|
function h({ value: e, trend: t }) {
|
|
32
|
-
let r = Number(e), u = s(), m = o(r), h = c(m, (e) => `${-((e % 10 + 10) % 10) * (100 / 11)}%`), g = d(r);
|
|
32
|
+
let r = Number(e), u = s(), m = o(r), h = c(m, (e) => `${-((e % 10 + 10) % 10) * (100 / 11)}%`), g = d(r), _ = d(r);
|
|
33
33
|
return l(() => {
|
|
34
34
|
let e = g.current;
|
|
35
35
|
if (g.current = r, e === r) return;
|
|
36
|
-
let a =
|
|
37
|
-
if (u) {
|
|
38
|
-
m.set(
|
|
36
|
+
let a = t >= 0 ? (r - e + 10) % 10 : -((e - r + 10) % 10);
|
|
37
|
+
if (_.current += a, u) {
|
|
38
|
+
m.set(_.current);
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
i(m,
|
|
41
|
+
i(m, _.current, n.smooth);
|
|
42
42
|
}, [
|
|
43
43
|
r,
|
|
44
44
|
t,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ReplayPreview, formatReplayTime, getReplayMarkers, getReplayMeta, getReplayPointerTrack, replayPointerAt, } from '@brett_lamy/docstream/replay';
|
|
2
|
-
export type { ReplayPreviewHandle, ReplayPreviewProps, ReplayEvent, ReplayMarker, ReplayMarkerKind, ReplayMeta, ReplayPointerTrack, } from '@brett_lamy/docstream/replay';
|
|
1
|
+
export { ReplayPreview, formatReplayTime, getReplayMarkers, getReplayMeta, getReplayPointerTrack, replayPointerAt, getReplayDevtools, replayDevtoolsAt, getReplayInspections, resolveReplayInspections, replayInspectionAt, } from '@brett_lamy/docstream/replay';
|
|
2
|
+
export type { ReplayPreviewHandle, ReplayPreviewProps, ReplayEvent, ReplayMarker, ReplayMarkerKind, ReplayMeta, ReplayPointerTrack, ReplayConsoleEntry, ReplayConsoleLevel, ReplayDevtools, ReplayDevtoolsState, ReplayDevtoolsTab, ReplayRequest, ReplayInspection, ReplayInspectionTab, ResolvedReplayInspection, } from '@brett_lamy/docstream/replay';
|
|
3
3
|
export { replayDemoEvents } from '@brett_lamy/docstream/replay/demo';
|
|
4
4
|
//# sourceMappingURL=replay-preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replay-preview.d.ts","sourceRoot":"","sources":["../../src/components/replay-preview.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,qBAAqB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"replay-preview.d.ts","sourceRoot":"","sources":["../../src/components/replay-preview.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,qBAAqB,EAAE,eAAe,EACxG,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,kBAAkB,GACxG,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,kBAAkB,EACpH,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAC7G,gBAAgB,EAAE,mBAAmB,EAAE,wBAAwB,GAChE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReplayPreview as e, formatReplayTime as t,
|
|
2
|
-
import { replayDemoEvents as
|
|
3
|
-
export { e as ReplayPreview, t as formatReplayTime, n as
|
|
1
|
+
import { ReplayPreview as e, formatReplayTime as t, getReplayDevtools as n, getReplayMarkers as r, getReplayMeta as i, getReplayPointerTrack as a, replayDevtoolsAt as o, replayPointerAt as s } from "@brett_lamy/docstream/replay";
|
|
2
|
+
import { replayDemoEvents as c } from "@brett_lamy/docstream/replay/demo";
|
|
3
|
+
export { e as ReplayPreview, t as formatReplayTime, n as getReplayDevtools, r as getReplayMarkers, i as getReplayMeta, a as getReplayPointerTrack, c as replayDemoEvents, o as replayDevtoolsAt, s as replayPointerAt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../lib/utils.js";
|
|
3
3
|
import { Icon as t } from "../lib/icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { selectableText as n } from "../lib/primitives.js";
|
|
5
|
+
import { Button as r } from "./button.js";
|
|
6
6
|
import { formatCell as i, formatDuration as a, pgTypeName as o, pluralRows as s, toCsv as c, toJson as l } from "../lib/sql-format.js";
|
|
7
7
|
import { useMemo as u, useState as d } from "react";
|
|
8
8
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
@@ -23,13 +23,13 @@ function E({ cell: i, oid: a }) {
|
|
|
23
23
|
"data-kind": i.kind,
|
|
24
24
|
"data-oid": a,
|
|
25
25
|
children: [o ? /* @__PURE__ */ p("pre", {
|
|
26
|
-
className: e("max-h-64 min-w-0 flex-1 overflow-auto font-mono text-caption leading-snug break-all whitespace-pre-wrap",
|
|
26
|
+
className: e("max-h-64 min-w-0 flex-1 overflow-auto font-mono text-caption leading-snug break-all whitespace-pre-wrap", n),
|
|
27
27
|
children: i.full
|
|
28
28
|
}) : /* @__PURE__ */ p("span", {
|
|
29
29
|
title: c ? i.full : void 0,
|
|
30
|
-
className: e("min-w-0 flex-1 truncate", i.align === "end" && "text-end tabular-nums", i.kind === "null" && "text-foreground/65 italic", (i.kind === "json" || i.kind === "bytea") && "font-mono text-caption", i.kind === "boolean" && "font-medium",
|
|
30
|
+
className: e("min-w-0 flex-1 truncate", i.align === "end" && "text-end tabular-nums", i.kind === "null" && "text-foreground/65 italic", (i.kind === "json" || i.kind === "bytea") && "font-mono text-caption", i.kind === "boolean" && "font-medium", n),
|
|
31
31
|
children: i.text
|
|
32
|
-
}), c ? /* @__PURE__ */ p(
|
|
32
|
+
}), c ? /* @__PURE__ */ p(r, {
|
|
33
33
|
variant: "ghost",
|
|
34
34
|
size: "icon",
|
|
35
35
|
"aria-label": o ? "Collapse value" : "Expand value",
|
|
@@ -45,7 +45,7 @@ function E({ cell: i, oid: a }) {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
var D = "sticky top-0 z-1 max-w-80 min-w-24 bg-secondary px-3 py-1.5 text-start text-caption font-semibold whitespace-nowrap text-foreground/65 shadow-hairline-b outline-none data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset", O = "max-w-80 px-3 py-(--result-pad) align-top shadow-hairline-b outline-none data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset";
|
|
48
|
-
function k({ result: t, durationMs:
|
|
48
|
+
function k({ result: t, durationMs: n, maxRows: C = 200, resizable: T = !1, toolbar: k = !0, maxHeight: A = "24rem", emptyMessage: j, onCopy: M, density: N, className: P, style: F, "aria-label": I = "Query results", ...L }) {
|
|
49
49
|
let [R, z] = d(C), [B, V] = d(null), { fields: H, rows: U } = t, W = u(() => U.slice(0, R).map((e, t) => ({
|
|
50
50
|
id: t,
|
|
51
51
|
row: e
|
|
@@ -117,15 +117,15 @@ function k({ result: t, durationMs: r, maxRows: C = 200, resizable: T = !1, tool
|
|
|
117
117
|
className: "min-w-0 flex-1 truncate text-footnote text-foreground/65 tabular-nums",
|
|
118
118
|
children: [
|
|
119
119
|
q,
|
|
120
|
-
|
|
120
|
+
n === void 0 ? "" : ` · ${a(n)}`,
|
|
121
121
|
U.length > R ? ` · showing ${R.toLocaleString("en-US")}` : ""
|
|
122
122
|
]
|
|
123
|
-
}), H.length > 0 && U.length > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
123
|
+
}), H.length > 0 && U.length > 0 ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(r, {
|
|
124
124
|
variant: "ghost",
|
|
125
125
|
size: "sm",
|
|
126
126
|
onPress: () => K("csv"),
|
|
127
127
|
children: B === "csv" ? "Copied" : "Copy CSV"
|
|
128
|
-
}), /* @__PURE__ */ p(
|
|
128
|
+
}), /* @__PURE__ */ p(r, {
|
|
129
129
|
variant: "ghost",
|
|
130
130
|
size: "sm",
|
|
131
131
|
onPress: () => K("json"),
|
|
@@ -141,7 +141,7 @@ function k({ result: t, durationMs: r, maxRows: C = 200, resizable: T = !1, tool
|
|
|
141
141
|
}),
|
|
142
142
|
U.length > R ? /* @__PURE__ */ p("div", {
|
|
143
143
|
className: "flex shrink-0 justify-center px-3 py-1.5 shadow-hairline-t",
|
|
144
|
-
children: /* @__PURE__ */ m(
|
|
144
|
+
children: /* @__PURE__ */ m(r, {
|
|
145
145
|
variant: "ghost",
|
|
146
146
|
size: "sm",
|
|
147
147
|
onPress: () => z((e) => e + C),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-tree.d.ts","sourceRoot":"","sources":["../../src/components/schema-tree.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema-tree.d.ts","sourceRoot":"","sources":["../../src/components/schema-tree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQjF,eAAO,MAAM,kBAAkB;;8EAU7B,CAAC;AAuCH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACpI,iDAAiD;IACjD,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACpE,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,UAAU,CAAC,EACzB,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,SAA6B,EAAE,GAAG,KAAK,EACrJ,EAAE,eAAe,2CAmCjB"}
|