@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
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createFfmpeg as e, ffmpegUnsupportedReason as t } from "./index.js";
|
|
3
|
+
import { extractFrames as n, extractPeaks as r, frameTimes as i } from "./media.js";
|
|
4
|
+
import { createContext as a, useContext as o, useEffect as s, useState as c } from "react";
|
|
5
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
+
//#region src/lib/ffmpeg/react.tsx
|
|
7
|
+
var u = a(null);
|
|
8
|
+
function d({ baseURL: t, concurrency: n, children: r }) {
|
|
9
|
+
let [i, a] = c(null), o = t == null ? void 0 : String(t);
|
|
10
|
+
return s(() => {
|
|
11
|
+
let t = e({
|
|
12
|
+
baseURL: o,
|
|
13
|
+
concurrency: n
|
|
14
|
+
});
|
|
15
|
+
return a(t), () => t.dispose();
|
|
16
|
+
}, [o, n]), /* @__PURE__ */ l(u.Provider, {
|
|
17
|
+
value: i,
|
|
18
|
+
children: r
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function f() {
|
|
22
|
+
return o(u);
|
|
23
|
+
}
|
|
24
|
+
function p() {
|
|
25
|
+
let [e, n] = c(void 0);
|
|
26
|
+
return s(() => n(t()), []), e;
|
|
27
|
+
}
|
|
28
|
+
var m = /* @__PURE__ */ new WeakMap(), h = (e) => {
|
|
29
|
+
let t = m.get(e);
|
|
30
|
+
return t || m.set(e, t = {
|
|
31
|
+
frames: /* @__PURE__ */ new Map(),
|
|
32
|
+
peaks: /* @__PURE__ */ new Map(),
|
|
33
|
+
urls: []
|
|
34
|
+
}), t;
|
|
35
|
+
};
|
|
36
|
+
function g(e, t, n) {
|
|
37
|
+
let r = e.get(t);
|
|
38
|
+
return r || (r = n(), e.set(t, r), r.catch(() => e.delete(t))), r;
|
|
39
|
+
}
|
|
40
|
+
function _(e) {
|
|
41
|
+
let t = m.get(e);
|
|
42
|
+
t && (t.urls.forEach((e) => URL.revokeObjectURL(e)), m.delete(e));
|
|
43
|
+
}
|
|
44
|
+
function v(e, t) {
|
|
45
|
+
let n = h(t);
|
|
46
|
+
return n.info || (n.info = e.probe(t), n.info.catch(() => {
|
|
47
|
+
m.get(t) === n && (n.info = void 0);
|
|
48
|
+
})), n.info;
|
|
49
|
+
}
|
|
50
|
+
function y(e, t, { count: r = 24, height: a = 72 } = {}) {
|
|
51
|
+
let o = h(t);
|
|
52
|
+
return g(o.frames, `${r}@${a}`, async () => {
|
|
53
|
+
let s = await v(e, t);
|
|
54
|
+
if (!s.video) return [];
|
|
55
|
+
let c = (await n(e, t, {
|
|
56
|
+
times: i(s.duration, r),
|
|
57
|
+
height: a
|
|
58
|
+
})).map((e) => ({
|
|
59
|
+
time: e.time,
|
|
60
|
+
src: URL.createObjectURL(e.blob)
|
|
61
|
+
}));
|
|
62
|
+
return o.urls.push(...c.map((e) => e.src)), c;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function b(e, t, { rate: n = 50 } = {}) {
|
|
66
|
+
return g(h(t).peaks, n, async () => (await v(e, t)).audio ? r(e, t, { rate: n }) : null);
|
|
67
|
+
}
|
|
68
|
+
function x(e, t, n) {
|
|
69
|
+
let r = f(), [i, a] = c({});
|
|
70
|
+
return s(() => {
|
|
71
|
+
if (!r || !t) return;
|
|
72
|
+
let i = !0;
|
|
73
|
+
return e(r, t).then((e) => {
|
|
74
|
+
i && a({
|
|
75
|
+
blob: t,
|
|
76
|
+
key: n,
|
|
77
|
+
data: e
|
|
78
|
+
});
|
|
79
|
+
}, (e) => {
|
|
80
|
+
i && a({
|
|
81
|
+
blob: t,
|
|
82
|
+
key: n,
|
|
83
|
+
error: e instanceof Error ? e : Error(String(e))
|
|
84
|
+
});
|
|
85
|
+
}), () => {
|
|
86
|
+
i = !1;
|
|
87
|
+
};
|
|
88
|
+
}, [
|
|
89
|
+
r,
|
|
90
|
+
t,
|
|
91
|
+
n
|
|
92
|
+
]), t ? i.blob !== t || i.key !== n ? { loading: !0 } : {
|
|
93
|
+
data: i.data,
|
|
94
|
+
error: i.error,
|
|
95
|
+
loading: !1
|
|
96
|
+
} : { loading: !1 };
|
|
97
|
+
}
|
|
98
|
+
function S(e) {
|
|
99
|
+
return x(v, e, "info");
|
|
100
|
+
}
|
|
101
|
+
function C(e, t = {}) {
|
|
102
|
+
let { count: n = 24, height: r = 72 } = t;
|
|
103
|
+
return x((e, t) => y(e, t, {
|
|
104
|
+
count: n,
|
|
105
|
+
height: r
|
|
106
|
+
}), e, `frames:${n}@${r}`);
|
|
107
|
+
}
|
|
108
|
+
function w(e, t = {}) {
|
|
109
|
+
let { rate: n = 50 } = t;
|
|
110
|
+
return x((e, t) => b(e, t, { rate: n }), e, `peaks:${n}`);
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
export { d as FfmpegProvider, y as mediaFrames, b as mediaPeaks, v as probeMedia, _ as releaseMedia, f as useFfmpeg, p as useFfmpegSupport, C as useMediaFrames, S as useMediaInfo, w as useMediaPeaks };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type FontCategory = 'sans-serif' | 'serif' | 'display' | 'handwriting' | 'monospace';
|
|
2
|
+
/** The categories, in Google Fonts' order, with the labels a filter shows. */
|
|
3
|
+
export declare const FONT_CATEGORIES: readonly {
|
|
4
|
+
id: FontCategory;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
export interface GoogleFont {
|
|
8
|
+
family: string;
|
|
9
|
+
category: FontCategory;
|
|
10
|
+
/** Its weights, lightest first (every hundred in its range, for a variable font). */
|
|
11
|
+
weights: readonly number[];
|
|
12
|
+
/** A variable font: any weight in its range, not only the hundreds. */
|
|
13
|
+
variable: boolean;
|
|
14
|
+
italic: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** The most popular Google Fonts families that cover Latin, most popular first. */
|
|
17
|
+
export declare const GOOGLE_FONTS: readonly GoogleFont[];
|
|
18
|
+
/** A family in the catalog, by name (any case). */
|
|
19
|
+
export declare const findGoogleFont: (family: string) => GoogleFont | undefined;
|
|
20
|
+
/** The CSS `font-family` for a family, or a stack of them (the first that loads wins): quoted, with a fallback of
|
|
21
|
+
the first one's kind. Nothing for no family (inherit). */
|
|
22
|
+
export declare function fontStack(family: string | readonly string[] | null | undefined, category?: FontCategory): string | undefined;
|
|
23
|
+
export interface GoogleFontOptions {
|
|
24
|
+
/** The weights to load (default: every weight the family has, which only costs the stylesheet: the browser
|
|
25
|
+
* downloads a face when text uses it). */
|
|
26
|
+
weights?: readonly number[];
|
|
27
|
+
/** Load the italics too (when the family has them). */
|
|
28
|
+
italic?: boolean;
|
|
29
|
+
/** Only the glyphs of this text: a tiny file, for drawing a sample such as the family's own name. */
|
|
30
|
+
text?: string;
|
|
31
|
+
}
|
|
32
|
+
/** The stylesheet URL for a family on the Google Fonts CSS API. */
|
|
33
|
+
export declare function googleFontsUrl(family: string, { weights, italic, text }?: GoogleFontOptions): string;
|
|
34
|
+
/**
|
|
35
|
+
* Loads a family from the Google Fonts CDN (once per family and options) and resolves true when its faces can be
|
|
36
|
+
* used, false when Google Fonts doesn't have it (or there's no network, or no document). A request for a style the
|
|
37
|
+
* family lacks (italics it doesn't have) falls back to the plain one.
|
|
38
|
+
*/
|
|
39
|
+
export declare function loadGoogleFont(family: string, options?: GoogleFontOptions): Promise<boolean>;
|
|
40
|
+
export type GoogleFontStatus = 'idle' | 'loading' | 'ready' | 'missing';
|
|
41
|
+
/** Loads a family, or every family of a stack (see loadGoogleFont), and re-renders as that goes: `idle` with none,
|
|
42
|
+
`missing` when Google Fonts doesn't have one of them. */
|
|
43
|
+
export declare function useGoogleFontStatus(family: string | readonly string[] | null | undefined, options?: GoogleFontOptions): GoogleFontStatus;
|
|
44
|
+
/** Loads a family, or a stack of them (see loadGoogleFont), and re-renders when they're ready: true once their
|
|
45
|
+
faces can be used. */
|
|
46
|
+
export declare const useGoogleFont: (family: string | readonly string[] | null | undefined, options?: GoogleFontOptions) => boolean;
|
|
47
|
+
//# sourceMappingURL=google-fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-fonts.d.ts","sourceRoot":"","sources":["../../src/lib/google-fonts.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;AAE5F,8EAA8E;AAC9E,eAAO,MAAM,eAAe,EAAE,SAAS;IAAE,EAAE,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAMzE,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAA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