strata-react 1.0.9 → 1.0.11
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/README.md +2 -1
- package/UPGRADING.md +1 -0
- package/dist/components/line-chart.d.ts +14 -1
- package/dist/components/media.d.ts +99 -0
- package/dist/components/virtual-list.d.ts +7 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +863 -179
- package/dist/index.js.map +1 -1
- package/dist/lib/format.d.ts +20 -0
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { C as readErrorBody, E as typeSteps, S as fieldErrorsOf, T as cn, _ as Textarea, a as toLoad, b as describeActionError, c as ColorSchemeChoice, d as useColorScheme, f as useSystemColorScheme, g as NativeSelect, h as Input, i as staleOf, l as ThemeProvider, m as Field, n as createQueryClient, o as useLoad, p as ChoiceGroup, r as fetchJson, s as COLOR_SCHEME_STORAGE_KEY, t as StrataQueryProvider, u as colorSchemeScript, v as useFieldControl, w as Tooltip, x as describeHttpError, y as HttpError } from "./query-CXlmWmrY.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Autocomplete, Button as Button$1, Checkbox as Checkbox$1, Dialog as Dialog$1, DialogTrigger, Disclosure as Disclosure$1, DisclosurePanel, DropIndicator, DropZone, FileTrigger, GridList, GridListItem, Header, Heading, I18nProvider, Input as Input$1, Keyboard, Menu as Menu$1, MenuItem, MenuSection, MenuTrigger, Modal, ModalOverlay, NumberField as NumberField$1, Popover as Popover$1, SearchField, Separator, Slider as Slider$1, SliderOutput, SliderThumb, SliderTrack, SubmenuTrigger, Switch as Switch$1, Tab, TabList, TabPanel, Tabs as Tabs$1, Text, ToggleButton, ToggleButtonGroup, Toolbar as Toolbar$1, UNSTABLE_Toast, UNSTABLE_ToastContent, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, useDragAndDrop, useFilter } from "react-aria-components";
|
|
3
|
+
import { Autocomplete, Button as Button$1, Checkbox as Checkbox$1, Collection, Dialog as Dialog$1, DialogTrigger, Disclosure as Disclosure$1, DisclosurePanel, DropIndicator, DropZone, FileTrigger, GridList, GridListItem, Header, Heading, I18nProvider, Input as Input$1, Keyboard, ListLayout, ListStateContext, Menu as Menu$1, MenuItem, MenuSection, MenuTrigger, Modal, ModalOverlay, NumberField as NumberField$1, Popover as Popover$1, SearchField, Separator, Slider as Slider$1, SliderOutput, SliderThumb, SliderTrack, SubmenuTrigger, Switch as Switch$1, Tab, TabList, TabPanel, Tabs as Tabs$1, Text, ToggleButton, ToggleButtonGroup, Toolbar as Toolbar$1, UNSTABLE_Toast, UNSTABLE_ToastContent, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, Virtualizer, useDragAndDrop, useFilter } from "react-aria-components";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { ArrowDown, ArrowUp, ArrowUpDown, ArrowUpRight, Ban, Check, ChevronRight, CircleAlert, CircleCheck, FileQuestion, GripVertical, History, ImageOff, Info, Loader, LoaderCircle, Maximize, Maximize2, Minimize, Minus, RotateCcw, Scan, Search, Trash2, TriangleAlert, Upload, X, ZoomIn, ZoomOut } from "lucide-react";
|
|
6
|
+
import { ArrowDown, ArrowUp, ArrowUpDown, ArrowUpRight, Ban, Check, ChevronRight, CircleAlert, CircleCheck, FileQuestion, GripVertical, History, ImageOff, Info, Loader, LoaderCircle, Maximize, Maximize2, Minimize, Minus, Pause, Play, RotateCcw, Scan, Search, SkipBack, SkipForward, Square, StepBack, StepForward, Trash2, TriangleAlert, Upload, Volume2, VolumeX, X, ZoomIn, ZoomOut } from "lucide-react";
|
|
7
7
|
import { Link, NavLink, useSearchParams } from "react-router";
|
|
8
8
|
import { createSortedRowModel, flexRender, rowSortingFeature, tableFeatures, useTable } from "@tanstack/react-table";
|
|
9
9
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -140,6 +140,22 @@ function createFormat(locale, options = {}) {
|
|
|
140
140
|
const [h, m] = [Math.floor(s / 3600), Math.floor(s % 3600 / 60)];
|
|
141
141
|
return h > 0 ? `${h}:${two(m)}:${two(s % 60)}` : `${m}:${two(s % 60)}`;
|
|
142
142
|
},
|
|
143
|
+
/**
|
|
144
|
+
* A position in media as an editor shows it, to a chosen precision: "4:05" (seconds), "4:05.250"
|
|
145
|
+
* (`"ms"`), or "4:05:07" (`"frames"` at `fps`, the last part the frame). Hours appear only from
|
|
146
|
+
* one hour. Floors, never rounds up, so a time never reads ahead of the picture. Unknown
|
|
147
|
+
* (null, negative, not finite) prints the placeholder. Set it in `tabular-nums`.
|
|
148
|
+
*/
|
|
149
|
+
timecode: (seconds, { precision = "seconds", fps = 30 } = {}) => {
|
|
150
|
+
if (seconds == null || !Number.isFinite(seconds) || seconds < 0) return missing;
|
|
151
|
+
const whole = Math.floor(seconds);
|
|
152
|
+
const two = (n) => String(n).padStart(2, "0");
|
|
153
|
+
const [h, m] = [Math.floor(whole / 3600), Math.floor(whole % 3600 / 60)];
|
|
154
|
+
const base = h > 0 ? `${h}:${two(m)}:${two(whole % 60)}` : `${m}:${two(whole % 60)}`;
|
|
155
|
+
if (precision === "ms") return `${base}.${String(Math.min(Math.floor((seconds - whole) * 1e3 + 1e-6), 999)).padStart(3, "0")}`;
|
|
156
|
+
if (precision === "frames") return `${base}:${two(Math.min(Math.floor((seconds - whole) * fps + 1e-6), Math.ceil(fps) - 1))}`;
|
|
157
|
+
return base;
|
|
158
|
+
},
|
|
143
159
|
/** What a missing value prints as: an en dash unless `createFormat`'s `missing` says otherwise. */
|
|
144
160
|
missing,
|
|
145
161
|
/** A time of day: `format.clock(at)` is "06:05". */
|
|
@@ -2876,6 +2892,411 @@ function TableSkeleton({ rows = 4, columns = 5 }) {
|
|
|
2876
2892
|
}, r))]
|
|
2877
2893
|
});
|
|
2878
2894
|
}
|
|
2895
|
+
// src/components/media.tsx
|
|
2896
|
+
var clamp$1 = (v, lo, hi) => Math.min(Math.max(v, lo), hi);
|
|
2897
|
+
var timecode = (t, { precision, fps }) => format.timecode(t, {
|
|
2898
|
+
precision,
|
|
2899
|
+
fps
|
|
2900
|
+
});
|
|
2901
|
+
/** The current and total time, in `tabular-nums`, as `<time>` elements. */
|
|
2902
|
+
function TimeReadout({ time, duration, precision = "seconds", fps = 30, className }) {
|
|
2903
|
+
const total = duration === null ? null : timecode(duration, {
|
|
2904
|
+
precision,
|
|
2905
|
+
fps
|
|
2906
|
+
});
|
|
2907
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
2908
|
+
className: cn("inline-flex items-baseline gap-1 type-body-sm tabular-nums", className),
|
|
2909
|
+
children: [
|
|
2910
|
+
/* @__PURE__ */ jsx("time", {
|
|
2911
|
+
dateTime: `PT${Math.floor(time)}S`,
|
|
2912
|
+
"aria-label": `Position ${timecode(time, {
|
|
2913
|
+
precision,
|
|
2914
|
+
fps
|
|
2915
|
+
})}`,
|
|
2916
|
+
className: "text-foreground",
|
|
2917
|
+
style: total ? { minWidth: `${total.length}ch` } : void 0,
|
|
2918
|
+
children: timecode(time, {
|
|
2919
|
+
precision,
|
|
2920
|
+
fps
|
|
2921
|
+
})
|
|
2922
|
+
}),
|
|
2923
|
+
/* @__PURE__ */ jsx("span", {
|
|
2924
|
+
"aria-hidden": true,
|
|
2925
|
+
className: "text-muted-foreground",
|
|
2926
|
+
children: "/"
|
|
2927
|
+
}),
|
|
2928
|
+
/* @__PURE__ */ jsx("time", {
|
|
2929
|
+
dateTime: duration === null ? void 0 : `PT${Math.floor(duration)}S`,
|
|
2930
|
+
"aria-label": `Length ${total ?? format.missing}`,
|
|
2931
|
+
className: "text-muted-foreground",
|
|
2932
|
+
children: total ?? format.missing
|
|
2933
|
+
})
|
|
2934
|
+
]
|
|
2935
|
+
});
|
|
2936
|
+
}
|
|
2937
|
+
/** A seek bar: dragged, clicked and moved by keys (arrows `step`, Page keys `bigStep`, Home and End), with its time as the accessible value. */
|
|
2938
|
+
function SeekBar({ time, duration, onSeek, marks = [], buffered, step = 5, bigStep = 30, label = "Seek", precision = "seconds", fps = 30, disabled, className }) {
|
|
2939
|
+
const track = React.useRef(null);
|
|
2940
|
+
const input = React.useRef(null);
|
|
2941
|
+
const frac = duration > 0 ? clamp$1(time / duration, 0, 1) : 0;
|
|
2942
|
+
const seekTo = (t) => onSeek(clamp$1(t, 0, duration));
|
|
2943
|
+
const timeText = React.useMemo(() => {
|
|
2944
|
+
const say = (t) => timecode(t, {
|
|
2945
|
+
precision,
|
|
2946
|
+
fps
|
|
2947
|
+
});
|
|
2948
|
+
return {
|
|
2949
|
+
format: say,
|
|
2950
|
+
formatRange: (a, b) => `${say(a)} to ${say(b)}`,
|
|
2951
|
+
resolvedOptions: () => ({ locale: "en-US" })
|
|
2952
|
+
};
|
|
2953
|
+
}, [precision, fps]);
|
|
2954
|
+
const fine = precision === "frames" ? 1 / fps : precision === "ms" ? .001 : .01;
|
|
2955
|
+
const state = useSliderState({
|
|
2956
|
+
minValue: 0,
|
|
2957
|
+
maxValue: Math.max(duration, fine),
|
|
2958
|
+
step: fine,
|
|
2959
|
+
value: [clamp$1(time, 0, duration)],
|
|
2960
|
+
onChange: ([t]) => seekTo(t),
|
|
2961
|
+
numberFormatter: timeText,
|
|
2962
|
+
isDisabled: disabled
|
|
2963
|
+
});
|
|
2964
|
+
const { groupProps, trackProps } = useSlider({
|
|
2965
|
+
"aria-label": label,
|
|
2966
|
+
isDisabled: disabled
|
|
2967
|
+
}, state, track);
|
|
2968
|
+
const { thumbProps, inputProps } = useSliderThumb({
|
|
2969
|
+
index: 0,
|
|
2970
|
+
trackRef: track,
|
|
2971
|
+
inputRef: input,
|
|
2972
|
+
"aria-label": label,
|
|
2973
|
+
isDisabled: disabled
|
|
2974
|
+
}, state);
|
|
2975
|
+
const { focusProps, isFocusVisible } = useFocusRing();
|
|
2976
|
+
const keys = {
|
|
2977
|
+
ArrowLeft: -step,
|
|
2978
|
+
ArrowDown: -step,
|
|
2979
|
+
ArrowRight: step,
|
|
2980
|
+
ArrowUp: step,
|
|
2981
|
+
PageDown: -bigStep,
|
|
2982
|
+
PageUp: bigStep
|
|
2983
|
+
};
|
|
2984
|
+
const onKeyDownCapture = (e) => {
|
|
2985
|
+
if (disabled) return;
|
|
2986
|
+
if (e.key in keys) seekTo(time + keys[e.key]);
|
|
2987
|
+
else if (e.key === "Home") seekTo(0);
|
|
2988
|
+
else if (e.key === "End") seekTo(duration);
|
|
2989
|
+
else return;
|
|
2990
|
+
e.preventDefault();
|
|
2991
|
+
e.stopPropagation();
|
|
2992
|
+
};
|
|
2993
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2994
|
+
...groupProps,
|
|
2995
|
+
className: cn("relative flex h-(--control-h) min-w-0 flex-1 items-center", disabled && "cursor-not-allowed opacity-50", className),
|
|
2996
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2997
|
+
...trackProps,
|
|
2998
|
+
ref: track,
|
|
2999
|
+
className: cn("relative flex h-full w-full cursor-pointer touch-none items-center", disabled && "cursor-not-allowed"),
|
|
3000
|
+
children: [
|
|
3001
|
+
/* @__PURE__ */ jsx("span", {
|
|
3002
|
+
"aria-hidden": true,
|
|
3003
|
+
className: "absolute inset-x-0 h-1.5 rounded-pill bg-muted"
|
|
3004
|
+
}),
|
|
3005
|
+
buffered !== void 0 && duration > 0 && /* @__PURE__ */ jsx("span", {
|
|
3006
|
+
"aria-hidden": true,
|
|
3007
|
+
className: "absolute left-0 h-1.5 rounded-pill bg-neutral-4",
|
|
3008
|
+
style: { width: `${clamp$1(buffered / duration, 0, 1) * 100}%` }
|
|
3009
|
+
}),
|
|
3010
|
+
/* @__PURE__ */ jsx("span", {
|
|
3011
|
+
"aria-hidden": true,
|
|
3012
|
+
className: "absolute left-0 h-1.5 rounded-pill bg-primary",
|
|
3013
|
+
style: { width: `${frac * 100}%` }
|
|
3014
|
+
}),
|
|
3015
|
+
duration > 0 && marks.map((m) => /* @__PURE__ */ jsx("button", {
|
|
3016
|
+
type: "button",
|
|
3017
|
+
tabIndex: -1,
|
|
3018
|
+
disabled,
|
|
3019
|
+
title: `${m.label}, ${timecode(m.time, {
|
|
3020
|
+
precision,
|
|
3021
|
+
fps
|
|
3022
|
+
})}`,
|
|
3023
|
+
"aria-label": `${m.label}, ${timecode(m.time, {
|
|
3024
|
+
precision,
|
|
3025
|
+
fps
|
|
3026
|
+
})}`,
|
|
3027
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
3028
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
3029
|
+
onClick: () => seekTo(m.time),
|
|
3030
|
+
className: "absolute top-1/2 h-3 w-1 -translate-y-1/2 cursor-pointer rounded-pill bg-foreground",
|
|
3031
|
+
style: { left: `${m.time / duration * 100}%` }
|
|
3032
|
+
}, `${m.time}-${m.label}`)),
|
|
3033
|
+
/* @__PURE__ */ jsx("div", {
|
|
3034
|
+
...thumbProps,
|
|
3035
|
+
className: cn("absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-pill border-2 border-primary bg-background", isFocusVisible && "outline-2 outline-offset-2 outline-ring"),
|
|
3036
|
+
style: { left: `${frac * 100}%` },
|
|
3037
|
+
children: /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("input", {
|
|
3038
|
+
ref: input,
|
|
3039
|
+
...mergeProps(inputProps, focusProps),
|
|
3040
|
+
"aria-labelledby": void 0,
|
|
3041
|
+
onKeyDownCapture
|
|
3042
|
+
}) })
|
|
3043
|
+
})
|
|
3044
|
+
]
|
|
3045
|
+
})
|
|
3046
|
+
});
|
|
3047
|
+
}
|
|
3048
|
+
/** The transport buttons for a player the app owns. Every control is a named icon button; the play button's name is "Play" or "Pause" from `playing`. Only the buttons whose handler is passed are drawn. */
|
|
3049
|
+
function Transport({ playing, onPlayPause, onStop, onToStart, onToEnd, onStepBack, onStepForward, stepUnit = "frame", children, className }) {
|
|
3050
|
+
return /* @__PURE__ */ jsxs(Toolbar, {
|
|
3051
|
+
label: "Playback",
|
|
3052
|
+
className: cn("gap-2", className),
|
|
3053
|
+
children: [
|
|
3054
|
+
onToStart && /* @__PURE__ */ jsx(IconButton, {
|
|
3055
|
+
icon: SkipBack,
|
|
3056
|
+
label: "Go to start",
|
|
3057
|
+
hint: "Home",
|
|
3058
|
+
onClick: onToStart
|
|
3059
|
+
}),
|
|
3060
|
+
onStepBack && /* @__PURE__ */ jsx(IconButton, {
|
|
3061
|
+
icon: StepBack,
|
|
3062
|
+
label: `Back one ${stepUnit}`,
|
|
3063
|
+
hint: "←",
|
|
3064
|
+
onClick: onStepBack
|
|
3065
|
+
}),
|
|
3066
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
3067
|
+
icon: playing ? Pause : Play,
|
|
3068
|
+
label: playing ? "Pause" : "Play",
|
|
3069
|
+
hint: "Space",
|
|
3070
|
+
variant: "outline",
|
|
3071
|
+
onClick: onPlayPause
|
|
3072
|
+
}),
|
|
3073
|
+
onStop && /* @__PURE__ */ jsx(IconButton, {
|
|
3074
|
+
icon: Square,
|
|
3075
|
+
label: "Stop",
|
|
3076
|
+
onClick: onStop
|
|
3077
|
+
}),
|
|
3078
|
+
onStepForward && /* @__PURE__ */ jsx(IconButton, {
|
|
3079
|
+
icon: StepForward,
|
|
3080
|
+
label: `Forward one ${stepUnit}`,
|
|
3081
|
+
hint: "→",
|
|
3082
|
+
onClick: onStepForward
|
|
3083
|
+
}),
|
|
3084
|
+
onToEnd && /* @__PURE__ */ jsx(IconButton, {
|
|
3085
|
+
icon: SkipForward,
|
|
3086
|
+
label: "Go to end",
|
|
3087
|
+
hint: "End",
|
|
3088
|
+
onClick: onToEnd
|
|
3089
|
+
}),
|
|
3090
|
+
children
|
|
3091
|
+
]
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3094
|
+
/** A mute button and a volume slider with its value in percent. Muting sets the volume to 0 and remembers the level; unmuting puts it back. Moving the slider from 0 unmutes. */
|
|
3095
|
+
function VolumeControl({ volume, onVolumeChange, max = 100, disabled, className }) {
|
|
3096
|
+
const last = React.useRef(volume > 0 ? volume : 100);
|
|
3097
|
+
if (volume > 0) last.current = volume;
|
|
3098
|
+
const muted = volume === 0;
|
|
3099
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
3100
|
+
className: cn("flex items-center gap-2", className),
|
|
3101
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
3102
|
+
icon: muted ? VolumeX : Volume2,
|
|
3103
|
+
label: muted ? "Unmute" : "Mute",
|
|
3104
|
+
hint: "M",
|
|
3105
|
+
disabled,
|
|
3106
|
+
onClick: () => onVolumeChange(muted ? last.current : 0)
|
|
3107
|
+
}), /* @__PURE__ */ jsx(Slider, {
|
|
3108
|
+
"aria-label": "Volume",
|
|
3109
|
+
value: volume,
|
|
3110
|
+
onChange: onVolumeChange,
|
|
3111
|
+
min: 0,
|
|
3112
|
+
max,
|
|
3113
|
+
unit: "%",
|
|
3114
|
+
disabled,
|
|
3115
|
+
className: "w-40"
|
|
3116
|
+
})]
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
/** A choice of playback speed ("0.5×", "1×", "1.5×") on a native select, named "Playback speed". */
|
|
3120
|
+
function RateChoice({ rate, onRateChange, rates = [
|
|
3121
|
+
.5,
|
|
3122
|
+
1,
|
|
3123
|
+
1.25,
|
|
3124
|
+
1.5,
|
|
3125
|
+
2
|
|
3126
|
+
], className }) {
|
|
3127
|
+
return /* @__PURE__ */ jsx(NativeSelect, {
|
|
3128
|
+
"aria-label": "Playback speed",
|
|
3129
|
+
value: String(rate),
|
|
3130
|
+
onChange: (e) => onRateChange(Number(e.target.value)),
|
|
3131
|
+
className: cn("w-auto", className),
|
|
3132
|
+
children: rates.map((r) => /* @__PURE__ */ jsx("option", {
|
|
3133
|
+
value: String(r),
|
|
3134
|
+
children: `${r}×`
|
|
3135
|
+
}, r))
|
|
3136
|
+
});
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* The shortcuts a player takes, as one list for `useHotkeys` and `KeysLegend`: Space and K play
|
|
3140
|
+
* or pause, J and L go back or forward `jump` seconds, the arrows by `frame` seconds, Home and End
|
|
3141
|
+
* to the ends, M mutes. Pass the player's actions; the labels are the legend's words.
|
|
3142
|
+
*/
|
|
3143
|
+
function transportShortcuts({ toggle, seek, time, duration, frame = 1 / 30, jump = 1, toggleMute }) {
|
|
3144
|
+
const to = (t) => () => seek(clamp$1(t, 0, duration));
|
|
3145
|
+
return [
|
|
3146
|
+
{
|
|
3147
|
+
keys: [" ", "k"],
|
|
3148
|
+
label: "Play or pause",
|
|
3149
|
+
run: toggle
|
|
3150
|
+
},
|
|
3151
|
+
{
|
|
3152
|
+
keys: ["j"],
|
|
3153
|
+
label: `Back ${jump} s`,
|
|
3154
|
+
run: to(time - jump),
|
|
3155
|
+
repeat: true
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
keys: ["l"],
|
|
3159
|
+
label: `Forward ${jump} s`,
|
|
3160
|
+
run: to(time + jump),
|
|
3161
|
+
repeat: true
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
keys: ["ArrowLeft"],
|
|
3165
|
+
label: "Back one frame",
|
|
3166
|
+
run: to(time - frame),
|
|
3167
|
+
repeat: true
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
keys: ["ArrowRight"],
|
|
3171
|
+
label: "Forward one frame",
|
|
3172
|
+
run: to(time + frame),
|
|
3173
|
+
repeat: true
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
keys: ["Home"],
|
|
3177
|
+
label: "Go to start",
|
|
3178
|
+
run: to(0)
|
|
3179
|
+
},
|
|
3180
|
+
{
|
|
3181
|
+
keys: ["End"],
|
|
3182
|
+
label: "Go to end",
|
|
3183
|
+
run: to(duration)
|
|
3184
|
+
},
|
|
3185
|
+
...toggleMute ? [{
|
|
3186
|
+
keys: ["m"],
|
|
3187
|
+
label: "Mute",
|
|
3188
|
+
run: toggleMute
|
|
3189
|
+
}] : []
|
|
3190
|
+
];
|
|
3191
|
+
}
|
|
3192
|
+
/** A frame that fits content of an aspect ratio into the pane, letterboxed on the sunken surface role (light and dark both), with room for the app's overlays. */
|
|
3193
|
+
function MediaStage({ aspect, children, label, className }) {
|
|
3194
|
+
const outer = React.useRef(null);
|
|
3195
|
+
const [box, setBox] = React.useState(null);
|
|
3196
|
+
const ratio = typeof aspect === "number" ? aspect : (() => {
|
|
3197
|
+
const [w, h] = aspect.split("/").map(Number);
|
|
3198
|
+
return w / h;
|
|
3199
|
+
})();
|
|
3200
|
+
React.useEffect(() => {
|
|
3201
|
+
const el = outer.current;
|
|
3202
|
+
if (!el) return;
|
|
3203
|
+
const read = () => setBox({
|
|
3204
|
+
w: el.clientWidth,
|
|
3205
|
+
h: el.clientHeight
|
|
3206
|
+
});
|
|
3207
|
+
read();
|
|
3208
|
+
const ro = new ResizeObserver(read);
|
|
3209
|
+
ro.observe(el);
|
|
3210
|
+
return () => ro.disconnect();
|
|
3211
|
+
}, []);
|
|
3212
|
+
const fit = box && box.w > 0 && box.h > 0 ? box.w / box.h > ratio ? {
|
|
3213
|
+
w: box.h * ratio,
|
|
3214
|
+
h: box.h
|
|
3215
|
+
} : {
|
|
3216
|
+
w: box.w,
|
|
3217
|
+
h: box.w / ratio
|
|
3218
|
+
} : null;
|
|
3219
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3220
|
+
ref: outer,
|
|
3221
|
+
role: "group",
|
|
3222
|
+
"aria-label": label,
|
|
3223
|
+
className: cn("grid min-h-0 min-w-0 place-items-center overflow-hidden bg-surface-sunken", className),
|
|
3224
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
3225
|
+
className: "relative overflow-hidden bg-background",
|
|
3226
|
+
style: fit ? {
|
|
3227
|
+
width: fit.w,
|
|
3228
|
+
height: fit.h
|
|
3229
|
+
} : {
|
|
3230
|
+
width: "100%",
|
|
3231
|
+
aspectRatio: String(ratio)
|
|
3232
|
+
},
|
|
3233
|
+
children
|
|
3234
|
+
})
|
|
3235
|
+
});
|
|
3236
|
+
}
|
|
3237
|
+
/** Guides over a stage: action-safe and title-safe frames (90% and 80%), a centre cross and a rule-of-thirds grid. Drawn as two strokes (light over dark) so they read on any picture. */
|
|
3238
|
+
function StageGuides({ safe, thirds, centre, className }) {
|
|
3239
|
+
const lines = [];
|
|
3240
|
+
if (thirds) lines.push([
|
|
3241
|
+
100 / 3,
|
|
3242
|
+
0,
|
|
3243
|
+
100 / 3,
|
|
3244
|
+
100
|
|
3245
|
+
], [
|
|
3246
|
+
200 / 3,
|
|
3247
|
+
0,
|
|
3248
|
+
200 / 3,
|
|
3249
|
+
100
|
|
3250
|
+
], [
|
|
3251
|
+
0,
|
|
3252
|
+
100 / 3,
|
|
3253
|
+
100,
|
|
3254
|
+
100 / 3
|
|
3255
|
+
], [
|
|
3256
|
+
0,
|
|
3257
|
+
200 / 3,
|
|
3258
|
+
100,
|
|
3259
|
+
200 / 3
|
|
3260
|
+
]);
|
|
3261
|
+
if (centre) lines.push([
|
|
3262
|
+
50,
|
|
3263
|
+
46,
|
|
3264
|
+
50,
|
|
3265
|
+
54
|
|
3266
|
+
], [
|
|
3267
|
+
46,
|
|
3268
|
+
50,
|
|
3269
|
+
54,
|
|
3270
|
+
50
|
|
3271
|
+
]);
|
|
3272
|
+
const rects = safe ? [5, 10] : [];
|
|
3273
|
+
const draw = (cls, w) => /* @__PURE__ */ jsxs("g", {
|
|
3274
|
+
className: cls,
|
|
3275
|
+
strokeWidth: w,
|
|
3276
|
+
fill: "none",
|
|
3277
|
+
vectorEffect: "non-scaling-stroke",
|
|
3278
|
+
children: [lines.map((l, i) => /* @__PURE__ */ jsx("line", {
|
|
3279
|
+
x1: l[0],
|
|
3280
|
+
y1: l[1],
|
|
3281
|
+
x2: l[2],
|
|
3282
|
+
y2: l[3],
|
|
3283
|
+
vectorEffect: "non-scaling-stroke"
|
|
3284
|
+
}, i)), rects.map((m) => /* @__PURE__ */ jsx("rect", {
|
|
3285
|
+
x: m,
|
|
3286
|
+
y: m,
|
|
3287
|
+
width: 100 - 2 * m,
|
|
3288
|
+
height: 100 - 2 * m,
|
|
3289
|
+
vectorEffect: "non-scaling-stroke"
|
|
3290
|
+
}, m))]
|
|
3291
|
+
});
|
|
3292
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
3293
|
+
"aria-hidden": true,
|
|
3294
|
+
viewBox: "0 0 100 100",
|
|
3295
|
+
preserveAspectRatio: "none",
|
|
3296
|
+
className: cn("pointer-events-none absolute inset-0 size-full", className),
|
|
3297
|
+
children: [draw("stroke-foreground", 3), draw("stroke-background", 1)]
|
|
3298
|
+
});
|
|
3299
|
+
}
|
|
2879
3300
|
// src/lib/timeline.ts
|
|
2880
3301
|
/** Steps a person would write on a scale, in seconds: 1, 2, 5 and 10 × 10ⁿ below a minute, then 15 s, 30 s, minutes, quarter hours, hours, days. ux-research components.md §3.8: ticks land on values people would write. */
|
|
2881
3302
|
var STEPS = [
|
|
@@ -4290,61 +4711,48 @@ function Tile({ name, chosen, disabled, onChange, aspect, image, detail, index }
|
|
|
4290
4711
|
});
|
|
4291
4712
|
}
|
|
4292
4713
|
// src/components/virtual-list.tsx
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4714
|
+
var FOOTER = "\0footer";
|
|
4715
|
+
/** A list that renders only its visible rows (React Aria's GridList and Virtualizer) from `virtualizeFrom` items, with arrow-key navigation between rows. */
|
|
4716
|
+
function VirtualList({ label, items, itemKey, children, estimateSize = 48, rowHeight, height = 480, virtualizeFrom = 100, bounded = false, footer, className }) {
|
|
4296
4717
|
const virtual = items.length >= virtualizeFrom;
|
|
4297
|
-
const
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
});
|
|
4307
|
-
const plain = () => /* @__PURE__ */ jsx("ul", {
|
|
4308
|
-
"aria-label": label,
|
|
4309
|
-
className: cn("grid min-w-0", !bounded && !footer && className),
|
|
4310
|
-
children: items.map((item, i) => /* @__PURE__ */ jsx("li", {
|
|
4311
|
-
"data-index": i,
|
|
4312
|
-
className: "border-t border-border first:border-t-0",
|
|
4313
|
-
children: children(item, i)
|
|
4314
|
-
}, itemKey(item)))
|
|
4315
|
-
});
|
|
4316
|
-
if (!virtual && !bounded) return footer ? /* @__PURE__ */ jsxs("div", {
|
|
4317
|
-
className: cn("min-w-0", className),
|
|
4318
|
-
children: [plain(), footer]
|
|
4319
|
-
}) : plain();
|
|
4320
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
4321
|
-
ref: scroller,
|
|
4322
|
-
role: "region",
|
|
4718
|
+
const rows = React.useMemo(() => items.map((item, index) => ({
|
|
4719
|
+
id: itemKey(item),
|
|
4720
|
+
item,
|
|
4721
|
+
index
|
|
4722
|
+
})), [items, itemKey]);
|
|
4723
|
+
const layoutOptions = React.useMemo(() => rowHeight ? { rowHeight } : { estimatedRowHeight: estimateSize }, [rowHeight, estimateSize]);
|
|
4724
|
+
const virtualise = virtual || bounded;
|
|
4725
|
+
const scrolls = virtualise;
|
|
4726
|
+
const list = /* @__PURE__ */ jsxs(GridList, {
|
|
4323
4727
|
"aria-label": label,
|
|
4324
|
-
|
|
4728
|
+
selectionMode: "none",
|
|
4325
4729
|
"data-strata-scroll": "",
|
|
4326
|
-
className: cn("min-w-0 overflow-y-auto", className),
|
|
4327
|
-
style: virtual ? { height } : { maxHeight: height },
|
|
4328
|
-
children: [
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
"data-index": v.index,
|
|
4337
|
-
"aria-setsize": items.length,
|
|
4338
|
-
"aria-posinset": v.index + 1,
|
|
4339
|
-
className: cn("absolute inset-x-0 top-0", v.index > 0 && "border-t border-border"),
|
|
4340
|
-
style: { translate: `0 ${v.start}px` },
|
|
4341
|
-
children: children(item, v.index)
|
|
4342
|
-
}, itemKey(item));
|
|
4730
|
+
className: cn("min-w-0 outline-none", scrolls && "overflow-y-auto", className),
|
|
4731
|
+
style: scrolls ? virtual ? { height } : { maxHeight: height } : void 0,
|
|
4732
|
+
children: [/* @__PURE__ */ jsx(Collection, {
|
|
4733
|
+
items: rows,
|
|
4734
|
+
children: (row) => /* @__PURE__ */ jsx(GridListItem, {
|
|
4735
|
+
id: row.id,
|
|
4736
|
+
textValue: row.id,
|
|
4737
|
+
"data-index": row.index,
|
|
4738
|
+
className: cn("min-w-0 outline-offset-[-2px]", row.index > 0 && "border-t border-border"),
|
|
4739
|
+
children: children(row.item, row.index)
|
|
4343
4740
|
})
|
|
4344
|
-
})
|
|
4741
|
+
}), footer && /* @__PURE__ */ jsx(GridListItem, {
|
|
4742
|
+
id: FOOTER,
|
|
4743
|
+
textValue: "More",
|
|
4744
|
+
className: "min-w-0",
|
|
4745
|
+
children: footer
|
|
4746
|
+
})]
|
|
4345
4747
|
});
|
|
4748
|
+
return virtualise ? /* @__PURE__ */ jsx(Virtualizer, {
|
|
4749
|
+
layout: ListLayout,
|
|
4750
|
+
layoutOptions,
|
|
4751
|
+
children: list
|
|
4752
|
+
}) : list;
|
|
4346
4753
|
}
|
|
4347
4754
|
// src/components/infinite-list.tsx
|
|
4755
|
+
var PendingFocus = React.createContext(null);
|
|
4348
4756
|
function MoreFailed({ message, retry }) {
|
|
4349
4757
|
return /* @__PURE__ */ jsxs("div", {
|
|
4350
4758
|
className: "flex flex-wrap items-start gap-3 border-t border-border bg-danger-subtle px-3 py-2 text-danger",
|
|
@@ -4381,6 +4789,7 @@ function LoadMore({ state, moreLabel, moreSkeleton, end, rootMargin = "400px", k
|
|
|
4381
4789
|
active: ready && more.hasMore,
|
|
4382
4790
|
rootMargin
|
|
4383
4791
|
});
|
|
4792
|
+
const grid = React.useContext(ListStateContext);
|
|
4384
4793
|
const { hasMore, loadingMore, error, loadMore } = more;
|
|
4385
4794
|
React.useEffect(() => {
|
|
4386
4795
|
if (!ready || !hasMore || loadingMore || error) return;
|
|
@@ -4395,7 +4804,8 @@ function LoadMore({ state, moreLabel, moreSkeleton, end, rootMargin = "400px", k
|
|
|
4395
4804
|
keepAtLeast,
|
|
4396
4805
|
loadMore
|
|
4397
4806
|
]);
|
|
4398
|
-
const
|
|
4807
|
+
const own = React.useRef(null);
|
|
4808
|
+
const focusFrom = React.useContext(PendingFocus) ?? own;
|
|
4399
4809
|
const loadByHand = () => {
|
|
4400
4810
|
focusFrom.current = held;
|
|
4401
4811
|
loadMore();
|
|
@@ -4403,19 +4813,36 @@ function LoadMore({ state, moreLabel, moreSkeleton, end, rootMargin = "400px", k
|
|
|
4403
4813
|
React.useEffect(() => {
|
|
4404
4814
|
const from = focusFrom.current;
|
|
4405
4815
|
if (from === null || loadingMore) return;
|
|
4406
|
-
if (held
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4816
|
+
if (held <= from) {
|
|
4817
|
+
if (error || !hasMore) focusFrom.current = null;
|
|
4818
|
+
return;
|
|
4819
|
+
}
|
|
4820
|
+
let frames = 0;
|
|
4821
|
+
let frame = 0;
|
|
4822
|
+
const find = () => {
|
|
4823
|
+
const item = (box.current?.closest("[data-strata-scroll]") ?? box.current?.parentElement)?.querySelector(`[data-index="${from}"]`);
|
|
4824
|
+
if (!item) {
|
|
4825
|
+
if (frames++ < 30) frame = requestAnimationFrame(find);
|
|
4826
|
+
else focusFrom.current = null;
|
|
4827
|
+
return;
|
|
4828
|
+
}
|
|
4829
|
+
const key = item.getAttribute("data-key");
|
|
4830
|
+
if (grid && key !== null) {
|
|
4831
|
+
grid.selectionManager.setFocused(true);
|
|
4832
|
+
grid.selectionManager.setFocusedKey(key);
|
|
4411
4833
|
}
|
|
4834
|
+
item.tabIndex = -1;
|
|
4835
|
+
item.focus();
|
|
4412
4836
|
focusFrom.current = null;
|
|
4413
|
-
}
|
|
4837
|
+
};
|
|
4838
|
+
find();
|
|
4839
|
+
return () => cancelAnimationFrame(frame);
|
|
4414
4840
|
}, [
|
|
4415
4841
|
held,
|
|
4416
4842
|
loadingMore,
|
|
4417
4843
|
error,
|
|
4418
|
-
hasMore
|
|
4844
|
+
hasMore,
|
|
4845
|
+
grid
|
|
4419
4846
|
]);
|
|
4420
4847
|
if (!ready) return null;
|
|
4421
4848
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -4459,15 +4886,32 @@ function LoadMore({ state, moreLabel, moreSkeleton, end, rootMargin = "400px", k
|
|
|
4459
4886
|
/** A cursor-paged list for `useInfiniteLoad`: DataView's first-page states, virtual rows (or a page-scrolled grid), and a `LoadMore` row that loads on approach, shows a skeleton, or says why it failed with Try again. */
|
|
4460
4887
|
function InfiniteList({ state, label, children, skeleton, empty, moreLabel, moreSkeleton = skeleton, end, rootMargin = "400px", keepAtLeast = 0, scroll = "region", listClassName, error, moreError, estimateSize, height = 480, virtualizeFrom, className }) {
|
|
4461
4888
|
const { more, itemKey } = state;
|
|
4462
|
-
const
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4889
|
+
const pendingFocus = React.useRef(null);
|
|
4890
|
+
const ready = state.status === "ready";
|
|
4891
|
+
const held = ready ? state.data.length : 0;
|
|
4892
|
+
const { hasMore, loadingMore, error: moreFailure, loadMore } = more;
|
|
4893
|
+
React.useEffect(() => {
|
|
4894
|
+
if (ready && hasMore && !loadingMore && !moreFailure && held < keepAtLeast) loadMore();
|
|
4895
|
+
}, [
|
|
4896
|
+
ready,
|
|
4897
|
+
hasMore,
|
|
4898
|
+
loadingMore,
|
|
4899
|
+
moreFailure,
|
|
4900
|
+
held,
|
|
4469
4901
|
keepAtLeast,
|
|
4470
|
-
|
|
4902
|
+
loadMore
|
|
4903
|
+
]);
|
|
4904
|
+
const footer = /* @__PURE__ */ jsx(PendingFocus.Provider, {
|
|
4905
|
+
value: pendingFocus,
|
|
4906
|
+
children: /* @__PURE__ */ jsx(LoadMore, {
|
|
4907
|
+
className: scroll === "page" ? "mt-4" : void 0,
|
|
4908
|
+
state,
|
|
4909
|
+
moreLabel,
|
|
4910
|
+
moreSkeleton,
|
|
4911
|
+
end,
|
|
4912
|
+
rootMargin,
|
|
4913
|
+
error: moreError
|
|
4914
|
+
})
|
|
4471
4915
|
});
|
|
4472
4916
|
return /* @__PURE__ */ jsx(DataView, {
|
|
4473
4917
|
state,
|
|
@@ -4587,7 +5031,7 @@ function fitTicks(ticks, scale, widthOf, gap = 12) {
|
|
|
4587
5031
|
return sorted.slice(0, 1);
|
|
4588
5032
|
}
|
|
4589
5033
|
/** One measured series, drawn in real pixels, with the peak and current readings labelled on the chart and every reading in a screen-reader table. Optional plan, threshold band and `colourScale`. */
|
|
4590
|
-
function LineChart({ label, series, seriesLabel, planned, plannedLabel, band, formatX, formatY, xTicks, yMin, yMax, colour = "var(--chart-1)", colourScale, colourScaleLabel, height = 280, className }) {
|
|
5034
|
+
function LineChart({ label, series, seriesLabel, planned, plannedLabel, band, formatX, formatY, xTicks, yMin, yMax, colour = "var(--chart-1)", colourScale, colourScaleLabel, current, formatCurrent, readout, onPick, area, height = 280, className }) {
|
|
4591
5035
|
const [ref, width] = useWidth();
|
|
4592
5036
|
const gradientId = `heat-${React.useId().replace(/[^\w-]/g, "")}`;
|
|
4593
5037
|
const all = [...series, ...planned ?? []];
|
|
@@ -4612,7 +5056,13 @@ function LineChart({ label, series, seriesLabel, planned, plannedLabel, band, fo
|
|
|
4612
5056
|
const half = xLabelWidth(t) / 2;
|
|
4613
5057
|
return Math.min(Math.max(sx(t), half), Math.max(half, width - half));
|
|
4614
5058
|
};
|
|
4615
|
-
const shownXTicks = fitTicks(xTicks, xLabelAt, xLabelWidth)
|
|
5059
|
+
const shownXTicks = React.useMemo(() => fitTicks(xTicks, xLabelAt, xLabelWidth), [
|
|
5060
|
+
xTicks,
|
|
5061
|
+
width,
|
|
5062
|
+
xMin,
|
|
5063
|
+
xMax,
|
|
5064
|
+
formatX
|
|
5065
|
+
]);
|
|
4616
5066
|
const path = (pts) => pts.map((p, i) => `${i ? "L" : "M"}${sx(p.x).toFixed(1)},${sy(p.y).toFixed(1)}`).join("");
|
|
4617
5067
|
const last = series[series.length - 1];
|
|
4618
5068
|
const peak = series.reduce((a, b) => b.y > a.y ? b : a, series[0]);
|
|
@@ -4620,115 +5070,296 @@ function LineChart({ label, series, seriesLabel, planned, plannedLabel, band, fo
|
|
|
4620
5070
|
/** The colour a value lands on: the highest stop at or below it. Used for the labelled points. */
|
|
4621
5071
|
const colourAt = (y) => stops.length ? [...stops].reverse().find((s) => s.at <= y)?.colour ?? stops[0].colour : colour;
|
|
4622
5072
|
const stroke = stops.length ? `url(#${gradientId})` : colour;
|
|
5073
|
+
const plot = React.useMemo(() => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5074
|
+
stops.length > 0 && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("linearGradient", {
|
|
5075
|
+
id: gradientId,
|
|
5076
|
+
gradientUnits: "userSpaceOnUse",
|
|
5077
|
+
x1: 0,
|
|
5078
|
+
x2: 0,
|
|
5079
|
+
y1: sy(y.min),
|
|
5080
|
+
y2: sy(y.max),
|
|
5081
|
+
children: stops.map((s) => /* @__PURE__ */ jsx("stop", {
|
|
5082
|
+
offset: Math.min(1, Math.max(0, (s.at - y.min) / (y.max - y.min))),
|
|
5083
|
+
stopColor: s.colour
|
|
5084
|
+
}, s.at))
|
|
5085
|
+
}) }),
|
|
5086
|
+
band && band.below > y.min && /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("rect", {
|
|
5087
|
+
x: pad.left,
|
|
5088
|
+
y: sy(Math.min(band.below, y.max)),
|
|
5089
|
+
width: w,
|
|
5090
|
+
height: sy(y.min) - sy(Math.min(band.below, y.max)),
|
|
5091
|
+
fill: "var(--success-subtle)"
|
|
5092
|
+
}), /* @__PURE__ */ jsx("text", {
|
|
5093
|
+
x: pad.left + 8,
|
|
5094
|
+
y: sy(Math.min(band.below, y.max)) + 16,
|
|
5095
|
+
className: "fill-success type-caption",
|
|
5096
|
+
children: band.label
|
|
5097
|
+
})] }),
|
|
5098
|
+
y.ticks.map((t) => /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
|
|
5099
|
+
x1: pad.left,
|
|
5100
|
+
x2: pad.left + w,
|
|
5101
|
+
y1: sy(t),
|
|
5102
|
+
y2: sy(t),
|
|
5103
|
+
stroke: "var(--border)",
|
|
5104
|
+
strokeWidth: 1
|
|
5105
|
+
}), /* @__PURE__ */ jsx("text", {
|
|
5106
|
+
x: pad.left - 8,
|
|
5107
|
+
y: sy(t),
|
|
5108
|
+
dy: "0.32em",
|
|
5109
|
+
textAnchor: "end",
|
|
5110
|
+
className: "fill-muted-foreground type-caption tabular-nums",
|
|
5111
|
+
children: formatY(t)
|
|
5112
|
+
})] }, t)),
|
|
5113
|
+
shownXTicks.map((t) => /* @__PURE__ */ jsx("text", {
|
|
5114
|
+
x: xLabelAt(t),
|
|
5115
|
+
y: height - 8,
|
|
5116
|
+
textAnchor: "middle",
|
|
5117
|
+
className: "fill-muted-foreground type-caption tabular-nums",
|
|
5118
|
+
children: formatX(t)
|
|
5119
|
+
}, t)),
|
|
5120
|
+
planned && /* @__PURE__ */ jsx("path", {
|
|
5121
|
+
d: path(planned),
|
|
5122
|
+
fill: "none",
|
|
5123
|
+
stroke: "var(--muted-foreground)",
|
|
5124
|
+
strokeWidth: 1.5,
|
|
5125
|
+
strokeDasharray: "4 4"
|
|
5126
|
+
}),
|
|
5127
|
+
area && series.length > 1 && /* @__PURE__ */ jsx("path", {
|
|
5128
|
+
d: `${path(series)}L${sx(series[series.length - 1].x).toFixed(1)},${sy(y.min).toFixed(1)}L${sx(series[0].x).toFixed(1)},${sy(y.min).toFixed(1)}Z`,
|
|
5129
|
+
fill: colour,
|
|
5130
|
+
fillOpacity: .12,
|
|
5131
|
+
stroke: "none"
|
|
5132
|
+
}),
|
|
5133
|
+
/* @__PURE__ */ jsx("path", {
|
|
5134
|
+
d: path(series),
|
|
5135
|
+
fill: "none",
|
|
5136
|
+
stroke,
|
|
5137
|
+
strokeWidth: stops.length ? 2.5 : 2,
|
|
5138
|
+
strokeLinejoin: "round",
|
|
5139
|
+
strokeLinecap: "round"
|
|
5140
|
+
}),
|
|
5141
|
+
/* @__PURE__ */ jsx("circle", {
|
|
5142
|
+
cx: sx(peak.x),
|
|
5143
|
+
cy: sy(peak.y),
|
|
5144
|
+
r: 3,
|
|
5145
|
+
fill: colourAt(peak.y)
|
|
5146
|
+
}),
|
|
5147
|
+
/* @__PURE__ */ jsxs("text", {
|
|
5148
|
+
x: sx(peak.x) + 8,
|
|
5149
|
+
y: sy(peak.y) - 8,
|
|
5150
|
+
className: "fill-foreground type-caption tabular-nums",
|
|
5151
|
+
children: [formatY(peak.y), " peak"]
|
|
5152
|
+
}),
|
|
5153
|
+
/* @__PURE__ */ jsx("line", {
|
|
5154
|
+
x1: sx(last.x),
|
|
5155
|
+
x2: sx(last.x),
|
|
5156
|
+
y1: pad.top,
|
|
5157
|
+
y2: pad.top + h,
|
|
5158
|
+
stroke: "var(--foreground)",
|
|
5159
|
+
strokeWidth: 1
|
|
5160
|
+
}),
|
|
5161
|
+
/* @__PURE__ */ jsx("circle", {
|
|
5162
|
+
cx: sx(last.x),
|
|
5163
|
+
cy: sy(last.y),
|
|
5164
|
+
r: 3.5,
|
|
5165
|
+
fill: colourAt(last.y)
|
|
5166
|
+
}),
|
|
5167
|
+
/* @__PURE__ */ jsxs("text", {
|
|
5168
|
+
x: sx(last.x) - 8,
|
|
5169
|
+
y: sy(last.y) - 10,
|
|
5170
|
+
textAnchor: "end",
|
|
5171
|
+
className: "fill-foreground type-label tabular-nums",
|
|
5172
|
+
children: [formatY(last.y), " now"]
|
|
5173
|
+
})
|
|
5174
|
+
] }), [
|
|
5175
|
+
width,
|
|
5176
|
+
height,
|
|
5177
|
+
series,
|
|
5178
|
+
planned,
|
|
5179
|
+
band,
|
|
5180
|
+
xTicks,
|
|
5181
|
+
yMin,
|
|
5182
|
+
yMax,
|
|
5183
|
+
colour,
|
|
5184
|
+
colourScale,
|
|
5185
|
+
formatX,
|
|
5186
|
+
formatY,
|
|
5187
|
+
area
|
|
5188
|
+
]);
|
|
5189
|
+
const tableEl = React.useMemo(() => /* @__PURE__ */ jsx("div", {
|
|
5190
|
+
className: "sr-only",
|
|
5191
|
+
children: /* @__PURE__ */ jsxs("table", { children: [
|
|
5192
|
+
/* @__PURE__ */ jsx("caption", { children: label }),
|
|
5193
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
5194
|
+
scope: "col",
|
|
5195
|
+
children: "Time"
|
|
5196
|
+
}), /* @__PURE__ */ jsx("th", {
|
|
5197
|
+
scope: "col",
|
|
5198
|
+
children: seriesLabel
|
|
5199
|
+
})] }) }),
|
|
5200
|
+
/* @__PURE__ */ jsx("tbody", { children: series.map((p) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("td", { children: formatX(p.x) }), /* @__PURE__ */ jsx("td", { children: formatY(p.y) })] }, p.x)) })
|
|
5201
|
+
] })
|
|
5202
|
+
}), [
|
|
5203
|
+
label,
|
|
5204
|
+
seriesLabel,
|
|
5205
|
+
series,
|
|
5206
|
+
formatX,
|
|
5207
|
+
formatY
|
|
5208
|
+
]);
|
|
5209
|
+
const sorted = React.useMemo(() => [...series].sort((p, q) => p.x - q.x), [series]);
|
|
5210
|
+
const interactive = Boolean(readout || onPick);
|
|
5211
|
+
const [hover, setHover] = React.useState(null);
|
|
5212
|
+
const [kbd, setKbd] = React.useState(null);
|
|
5213
|
+
const [focused, setFocused] = React.useState(false);
|
|
5214
|
+
const readoutText = (pt) => typeof readout === "function" ? readout(pt) : `${formatX(pt.x)}: ${formatY(pt.y)}`;
|
|
5215
|
+
const nearest = (px) => {
|
|
5216
|
+
const target = xMin + (px - pad.left) / (w || 1) * (xMax - xMin || 1);
|
|
5217
|
+
let best = 0;
|
|
5218
|
+
for (let i = 1; i < sorted.length; i++) if (Math.abs(sorted[i].x - target) < Math.abs(sorted[best].x - target)) best = i;
|
|
5219
|
+
return best;
|
|
5220
|
+
};
|
|
5221
|
+
/** The value of the line at x, read between the two readings either side (flat beyond the ends). */
|
|
5222
|
+
const yAt = (x) => {
|
|
5223
|
+
if (!sorted.length) return 0;
|
|
5224
|
+
if (x <= sorted[0].x) return sorted[0].y;
|
|
5225
|
+
for (let i = 1; i < sorted.length; i++) if (x <= sorted[i].x) {
|
|
5226
|
+
const [p0, p1] = [sorted[i - 1], sorted[i]];
|
|
5227
|
+
return p0.y + (p1.y - p0.y) * (x - p0.x) / (p1.x - p0.x || 1);
|
|
5228
|
+
}
|
|
5229
|
+
return sorted[sorted.length - 1].y;
|
|
5230
|
+
};
|
|
5231
|
+
const currentAt = current === void 0 ? null : {
|
|
5232
|
+
x: Math.min(Math.max(current, xMin), xMax),
|
|
5233
|
+
y: yAt(current)
|
|
5234
|
+
};
|
|
5235
|
+
const fallbackIdx = sorted.length ? currentAt ? nearest(sx(currentAt.x)) : sorted.length - 1 : 0;
|
|
5236
|
+
const heldIdx = kbd === null ? fallbackIdx : Math.min(kbd, Math.max(sorted.length - 1, 0));
|
|
5237
|
+
const selectedIdx = hover === null ? heldIdx : Math.min(hover, Math.max(sorted.length - 1, 0));
|
|
5238
|
+
const active = (hover !== null || focused) && sorted.length ? sorted[selectedIdx] : null;
|
|
5239
|
+
const onKey = (e) => {
|
|
5240
|
+
const at = selectedIdx;
|
|
5241
|
+
let next = at;
|
|
5242
|
+
if (e.key === "ArrowRight" || e.key === "ArrowUp") next = Math.min(at + 1, sorted.length - 1);
|
|
5243
|
+
else if (e.key === "ArrowLeft" || e.key === "ArrowDown") next = Math.max(at - 1, 0);
|
|
5244
|
+
else if (e.key === "Home") next = 0;
|
|
5245
|
+
else if (e.key === "End") next = sorted.length - 1;
|
|
5246
|
+
else if ((e.key === "Enter" || e.key === " ") && onPick) {
|
|
5247
|
+
e.preventDefault();
|
|
5248
|
+
onPick(sorted[at].x);
|
|
5249
|
+
return;
|
|
5250
|
+
} else return;
|
|
5251
|
+
e.preventDefault();
|
|
5252
|
+
setHover(null);
|
|
5253
|
+
setKbd(next);
|
|
5254
|
+
};
|
|
5255
|
+
const flip = (px, text) => px + labelWidth(text) + 16 > width ? {
|
|
5256
|
+
x: px - 8,
|
|
5257
|
+
anchor: "end"
|
|
5258
|
+
} : {
|
|
5259
|
+
x: px + 8,
|
|
5260
|
+
anchor: "start"
|
|
5261
|
+
};
|
|
4623
5262
|
return /* @__PURE__ */ jsxs("figure", {
|
|
4624
5263
|
className: cn("grid min-w-0 gap-2", className),
|
|
4625
5264
|
children: [
|
|
4626
|
-
/* @__PURE__ */
|
|
5265
|
+
/* @__PURE__ */ jsxs("div", {
|
|
4627
5266
|
ref,
|
|
4628
|
-
className: "min-w-0",
|
|
4629
|
-
children: width > 0 && /* @__PURE__ */ jsxs("svg", {
|
|
5267
|
+
className: "relative min-w-0",
|
|
5268
|
+
children: [width > 0 && /* @__PURE__ */ jsxs("svg", {
|
|
4630
5269
|
width,
|
|
4631
5270
|
height,
|
|
4632
5271
|
role: "img",
|
|
4633
5272
|
"aria-label": label,
|
|
4634
5273
|
className: "block overflow-visible",
|
|
4635
5274
|
children: [
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
x: pad.left - 8,
|
|
4669
|
-
y: sy(t),
|
|
4670
|
-
dy: "0.32em",
|
|
4671
|
-
textAnchor: "end",
|
|
4672
|
-
className: "fill-muted-foreground type-caption tabular-nums",
|
|
4673
|
-
children: formatY(t)
|
|
4674
|
-
})] }, t)),
|
|
4675
|
-
shownXTicks.map((t) => /* @__PURE__ */ jsx("text", {
|
|
4676
|
-
x: xLabelAt(t),
|
|
4677
|
-
y: height - 8,
|
|
4678
|
-
textAnchor: "middle",
|
|
4679
|
-
className: "fill-muted-foreground type-caption tabular-nums",
|
|
4680
|
-
children: formatX(t)
|
|
4681
|
-
}, t)),
|
|
4682
|
-
planned && /* @__PURE__ */ jsx("path", {
|
|
4683
|
-
d: path(planned),
|
|
4684
|
-
fill: "none",
|
|
4685
|
-
stroke: "var(--muted-foreground)",
|
|
4686
|
-
strokeWidth: 1.5,
|
|
4687
|
-
strokeDasharray: "4 4"
|
|
4688
|
-
}),
|
|
4689
|
-
/* @__PURE__ */ jsx("path", {
|
|
4690
|
-
d: path(series),
|
|
4691
|
-
fill: "none",
|
|
4692
|
-
stroke,
|
|
4693
|
-
strokeWidth: stops.length ? 2.5 : 2,
|
|
4694
|
-
strokeLinejoin: "round",
|
|
4695
|
-
strokeLinecap: "round"
|
|
4696
|
-
}),
|
|
4697
|
-
/* @__PURE__ */ jsx("circle", {
|
|
4698
|
-
cx: sx(peak.x),
|
|
4699
|
-
cy: sy(peak.y),
|
|
4700
|
-
r: 3,
|
|
4701
|
-
fill: colourAt(peak.y)
|
|
4702
|
-
}),
|
|
4703
|
-
/* @__PURE__ */ jsxs("text", {
|
|
4704
|
-
x: sx(peak.x) + 8,
|
|
4705
|
-
y: sy(peak.y) - 8,
|
|
4706
|
-
className: "fill-foreground type-caption tabular-nums",
|
|
4707
|
-
children: [formatY(peak.y), " peak"]
|
|
4708
|
-
}),
|
|
4709
|
-
/* @__PURE__ */ jsx("line", {
|
|
4710
|
-
x1: sx(last.x),
|
|
4711
|
-
x2: sx(last.x),
|
|
4712
|
-
y1: pad.top,
|
|
4713
|
-
y2: pad.top + h,
|
|
4714
|
-
stroke: "var(--foreground)",
|
|
4715
|
-
strokeWidth: 1
|
|
4716
|
-
}),
|
|
4717
|
-
/* @__PURE__ */ jsx("circle", {
|
|
4718
|
-
cx: sx(last.x),
|
|
4719
|
-
cy: sy(last.y),
|
|
4720
|
-
r: 3.5,
|
|
4721
|
-
fill: colourAt(last.y)
|
|
5275
|
+
plot,
|
|
5276
|
+
currentAt && /* @__PURE__ */ jsxs("g", {
|
|
5277
|
+
"aria-hidden": true,
|
|
5278
|
+
children: [
|
|
5279
|
+
/* @__PURE__ */ jsx("line", {
|
|
5280
|
+
x1: sx(currentAt.x),
|
|
5281
|
+
x2: sx(currentAt.x),
|
|
5282
|
+
y1: pad.top,
|
|
5283
|
+
y2: pad.top + h,
|
|
5284
|
+
stroke: "var(--primary)",
|
|
5285
|
+
strokeWidth: 1.5
|
|
5286
|
+
}),
|
|
5287
|
+
/* @__PURE__ */ jsx("circle", {
|
|
5288
|
+
cx: sx(currentAt.x),
|
|
5289
|
+
cy: sy(currentAt.y),
|
|
5290
|
+
r: 4,
|
|
5291
|
+
fill: "var(--background)",
|
|
5292
|
+
stroke: "var(--primary)",
|
|
5293
|
+
strokeWidth: 2
|
|
5294
|
+
}),
|
|
5295
|
+
(() => {
|
|
5296
|
+
const text = formatCurrent ? formatCurrent(currentAt) : `${formatX(currentAt.x)}: ${formatY(currentAt.y)}`;
|
|
5297
|
+
const at = flip(sx(currentAt.x), text);
|
|
5298
|
+
return /* @__PURE__ */ jsx("text", {
|
|
5299
|
+
x: at.x,
|
|
5300
|
+
y: pad.top + 12,
|
|
5301
|
+
textAnchor: at.anchor,
|
|
5302
|
+
className: "fill-foreground type-caption tabular-nums",
|
|
5303
|
+
children: text
|
|
5304
|
+
});
|
|
5305
|
+
})()
|
|
5306
|
+
]
|
|
4722
5307
|
}),
|
|
4723
|
-
/* @__PURE__ */ jsxs("
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
5308
|
+
active && /* @__PURE__ */ jsxs("g", {
|
|
5309
|
+
"aria-hidden": true,
|
|
5310
|
+
children: [
|
|
5311
|
+
/* @__PURE__ */ jsx("line", {
|
|
5312
|
+
x1: sx(active.x),
|
|
5313
|
+
x2: sx(active.x),
|
|
5314
|
+
y1: pad.top,
|
|
5315
|
+
y2: pad.top + h,
|
|
5316
|
+
stroke: "var(--muted-foreground)",
|
|
5317
|
+
strokeWidth: 1,
|
|
5318
|
+
strokeDasharray: "2 3"
|
|
5319
|
+
}),
|
|
5320
|
+
/* @__PURE__ */ jsx("circle", {
|
|
5321
|
+
cx: sx(active.x),
|
|
5322
|
+
cy: sy(active.y),
|
|
5323
|
+
r: 4,
|
|
5324
|
+
fill: "var(--foreground)"
|
|
5325
|
+
}),
|
|
5326
|
+
(() => {
|
|
5327
|
+
const text = readoutText(active);
|
|
5328
|
+
const at = flip(sx(active.x), text);
|
|
5329
|
+
return /* @__PURE__ */ jsx("text", {
|
|
5330
|
+
x: at.x,
|
|
5331
|
+
y: sy(active.y) - 10,
|
|
5332
|
+
textAnchor: at.anchor,
|
|
5333
|
+
className: "fill-foreground type-label tabular-nums",
|
|
5334
|
+
paintOrder: "stroke",
|
|
5335
|
+
stroke: "var(--background)",
|
|
5336
|
+
strokeWidth: 3,
|
|
5337
|
+
children: text
|
|
5338
|
+
});
|
|
5339
|
+
})()
|
|
5340
|
+
]
|
|
4729
5341
|
})
|
|
4730
5342
|
]
|
|
4731
|
-
})
|
|
5343
|
+
}), width > 0 && interactive && sorted.length > 0 && /* @__PURE__ */ jsx(ReadingSlider, {
|
|
5344
|
+
label: `${label}: read values`,
|
|
5345
|
+
sorted,
|
|
5346
|
+
selected: selectedIdx,
|
|
5347
|
+
text: readoutText,
|
|
5348
|
+
onSelect: (i) => {
|
|
5349
|
+
setHover(null);
|
|
5350
|
+
setKbd(i);
|
|
5351
|
+
},
|
|
5352
|
+
onPick,
|
|
5353
|
+
onKeyDownCapture: onKey,
|
|
5354
|
+
onHover: (px) => setHover(px === null ? null : nearest(px)),
|
|
5355
|
+
onFocusChange: setFocused,
|
|
5356
|
+
box: {
|
|
5357
|
+
left: pad.left,
|
|
5358
|
+
top: pad.top,
|
|
5359
|
+
width: w,
|
|
5360
|
+
height: h
|
|
5361
|
+
}
|
|
5362
|
+
})]
|
|
4732
5363
|
}),
|
|
4733
5364
|
/* @__PURE__ */ jsxs("figcaption", {
|
|
4734
5365
|
className: "flex flex-wrap gap-x-5 gap-y-1 type-caption text-muted-foreground",
|
|
@@ -4785,23 +5416,76 @@ function LineChart({ label, series, seriesLabel, planned, plannedLabel, band, fo
|
|
|
4785
5416
|
}), plannedLabel]
|
|
4786
5417
|
})]
|
|
4787
5418
|
}),
|
|
4788
|
-
|
|
4789
|
-
className: "sr-only",
|
|
4790
|
-
children: /* @__PURE__ */ jsxs("table", { children: [
|
|
4791
|
-
/* @__PURE__ */ jsx("caption", { children: label }),
|
|
4792
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
4793
|
-
scope: "col",
|
|
4794
|
-
children: "Time"
|
|
4795
|
-
}), /* @__PURE__ */ jsx("th", {
|
|
4796
|
-
scope: "col",
|
|
4797
|
-
children: seriesLabel
|
|
4798
|
-
})] }) }),
|
|
4799
|
-
/* @__PURE__ */ jsx("tbody", { children: series.map((p) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("td", { children: formatX(p.x) }), /* @__PURE__ */ jsx("td", { children: formatY(p.y) })] }, p.x)) })
|
|
4800
|
-
] })
|
|
4801
|
-
})
|
|
5419
|
+
tableEl
|
|
4802
5420
|
]
|
|
4803
5421
|
});
|
|
4804
5422
|
}
|
|
5423
|
+
/** The slider over the plot: React Aria's hooks, snapped to the readings, with the reading as its spoken value. */
|
|
5424
|
+
function ReadingSlider({ label, sorted, selected, text, onSelect, onPick, onKeyDownCapture, onHover, onFocusChange, box }) {
|
|
5425
|
+
const track = React.useRef(null);
|
|
5426
|
+
const input = React.useRef(null);
|
|
5427
|
+
const lo = sorted[0].x;
|
|
5428
|
+
const hi = Math.max(sorted[sorted.length - 1].x, lo + 1e-9);
|
|
5429
|
+
const indexAt = (x) => {
|
|
5430
|
+
let best = 0;
|
|
5431
|
+
for (let i = 1; i < sorted.length; i++) if (Math.abs(sorted[i].x - x) < Math.abs(sorted[best].x - x)) best = i;
|
|
5432
|
+
return best;
|
|
5433
|
+
};
|
|
5434
|
+
const spoken = React.useMemo(() => {
|
|
5435
|
+
const say = (x) => text(sorted[indexAt(x)]);
|
|
5436
|
+
return {
|
|
5437
|
+
format: say,
|
|
5438
|
+
formatRange: (a, b) => `${say(a)} to ${say(b)}`,
|
|
5439
|
+
resolvedOptions: () => ({ locale: "en-US" })
|
|
5440
|
+
};
|
|
5441
|
+
}, [sorted, text]);
|
|
5442
|
+
const state = useSliderState({
|
|
5443
|
+
minValue: lo,
|
|
5444
|
+
maxValue: hi,
|
|
5445
|
+
step: (hi - lo) / 1e4,
|
|
5446
|
+
value: [sorted[selected].x],
|
|
5447
|
+
onChange: ([x]) => onSelect(indexAt(x)),
|
|
5448
|
+
onChangeEnd: ([x]) => onPick?.(sorted[indexAt(x)].x),
|
|
5449
|
+
numberFormatter: spoken
|
|
5450
|
+
});
|
|
5451
|
+
const { groupProps, trackProps } = useSlider({ "aria-label": label }, state, track);
|
|
5452
|
+
const { thumbProps, inputProps } = useSliderThumb({
|
|
5453
|
+
index: 0,
|
|
5454
|
+
trackRef: track,
|
|
5455
|
+
inputRef: input,
|
|
5456
|
+
"aria-label": label
|
|
5457
|
+
}, state);
|
|
5458
|
+
const { focusProps, isFocusVisible } = useFocusRing();
|
|
5459
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5460
|
+
...groupProps,
|
|
5461
|
+
className: "absolute",
|
|
5462
|
+
style: box,
|
|
5463
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
5464
|
+
...trackProps,
|
|
5465
|
+
ref: track,
|
|
5466
|
+
onPointerMove: (e) => onHover(e.clientX - e.currentTarget.getBoundingClientRect().left + box.left),
|
|
5467
|
+
onPointerLeave: () => onHover(null),
|
|
5468
|
+
className: cn("relative size-full cursor-crosshair touch-none", isFocusVisible && "outline-2 outline-offset-2 outline-ring"),
|
|
5469
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
5470
|
+
...thumbProps,
|
|
5471
|
+
className: "absolute inset-y-0 w-0",
|
|
5472
|
+
style: { left: `${state.getThumbPercent(0) * 100}%` },
|
|
5473
|
+
children: /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("input", {
|
|
5474
|
+
ref: input,
|
|
5475
|
+
...mergeProps(inputProps, focusProps, {
|
|
5476
|
+
onFocus: () => onFocusChange(true),
|
|
5477
|
+
onBlur: () => onFocusChange(false)
|
|
5478
|
+
}),
|
|
5479
|
+
"aria-labelledby": void 0,
|
|
5480
|
+
onKeyDownCapture: (e) => {
|
|
5481
|
+
onKeyDownCapture(e);
|
|
5482
|
+
if (e.defaultPrevented) e.stopPropagation();
|
|
5483
|
+
}
|
|
5484
|
+
}) })
|
|
5485
|
+
})
|
|
5486
|
+
})
|
|
5487
|
+
});
|
|
5488
|
+
}
|
|
4805
5489
|
// src/components/page-header.tsx
|
|
4806
5490
|
/** The top of an Operate screen: a noun title, its scope, the main action, and the finding (the one fact in today's data that most needs attention). */
|
|
4807
5491
|
function PageHeader({ title, scope, actions, finding, as: Heading = "h1" }) {
|
|
@@ -6342,6 +7026,6 @@ function CompareGrid({ label, items, blind, missing, actions, columns = 3, keys
|
|
|
6342
7026
|
})
|
|
6343
7027
|
});
|
|
6344
7028
|
}
|
|
6345
|
-
export { ActiveList, Alert, AlertDialog, AppShell, AsyncButton, Breadcrumb, BulkBar, Button, COLOR_SCHEME_STORAGE_KEY, Checkbox, ChoiceGroup, ColorField, ColorSchemeChoice, CommandLegend, CommandMenu, Compare, CompareGrid, CompositionBar, ContextMenu, DEFAULT_TOLERANCE, DataTable, DataView, Dialog, Disclosure, Done, EmptyState, FIT, Field, FileButton, FileDropZone, FileOutcomes, FullscreenFrame, HttpError, IconButton, InfiniteList, Input, Inspector, InspectorSection, JobStatus, KeysLegend, LineChart, LinkCard, LinkCardList, LoadError, LoadMore, MAX_SCALE, MAX_SIDE, MIN_SCALE, MISSING, Menu, Meter, Metric, MetricStrip, MissingFile, NBSP, NativeSelect, NumberField, PageHeader, Popover, PropertyList, PropertyRow, RowAction, SelectableGrid, SideNav, Skeleton, Slider, SortableList, StaleNotice, Status, StrataQueryProvider, StrataToastRegion, Switch, TableSkeleton, Tabs, Textarea, ThemeProvider, Thumbnail, ThumbnailSkeleton, Timeline, TimelineZoomControls, Toggle, ToggleGroup, Toolbar, ToolbarSeparator, Tooltip, UndoBar, ViewportFrame, VirtualList, actualPixelsScale, buttonVariants, canFullscreen, clampViewport, cn, colorSchemeScript, commandShortcut, createFormat, createQueryClient, crossedThreshold, describeActionError, describeHttpError, detectPlatform, differences, fetchJson, fieldErrorsOf, format, formatChord, isReservedChord, isTypingTarget, labelOf, matchesAccept, matchesChord, noOverlap, parseChord, parseSort, readErrorBody, readPixels, resample, serialiseSort, staleOf, tickLabel, tickStep, ticksBetween, toDate, toLoad, toast, toastTimeout, typeSteps, useActiveItem, useAsyncAction, useClientWork, useColorScheme, useCommands, useDifference, useExpanded, useFileIntake, useHotkeys, useInView, useInfiniteLoad, useJob, useLoad, useSelection, useSystemColorScheme, useTimelineZoom, useUndoable, useViewport, zoomAt };
|
|
7029
|
+
export { ActiveList, Alert, AlertDialog, AppShell, AsyncButton, Breadcrumb, BulkBar, Button, COLOR_SCHEME_STORAGE_KEY, Checkbox, ChoiceGroup, ColorField, ColorSchemeChoice, CommandLegend, CommandMenu, Compare, CompareGrid, CompositionBar, ContextMenu, DEFAULT_TOLERANCE, DataTable, DataView, Dialog, Disclosure, Done, EmptyState, FIT, Field, FileButton, FileDropZone, FileOutcomes, FullscreenFrame, HttpError, IconButton, InfiniteList, Input, Inspector, InspectorSection, JobStatus, KeysLegend, LineChart, LinkCard, LinkCardList, LoadError, LoadMore, MAX_SCALE, MAX_SIDE, MIN_SCALE, MISSING, MediaStage, Menu, Meter, Metric, MetricStrip, MissingFile, NBSP, NativeSelect, NumberField, PageHeader, Popover, PropertyList, PropertyRow, RateChoice, RowAction, SeekBar, SelectableGrid, SideNav, Skeleton, Slider, SortableList, StageGuides, StaleNotice, Status, StrataQueryProvider, StrataToastRegion, Switch, TableSkeleton, Tabs, Textarea, ThemeProvider, Thumbnail, ThumbnailSkeleton, TimeReadout, Timeline, TimelineZoomControls, Toggle, ToggleGroup, Toolbar, ToolbarSeparator, Tooltip, Transport, UndoBar, ViewportFrame, VirtualList, VolumeControl, actualPixelsScale, buttonVariants, canFullscreen, clampViewport, cn, colorSchemeScript, commandShortcut, createFormat, createQueryClient, crossedThreshold, describeActionError, describeHttpError, detectPlatform, differences, fetchJson, fieldErrorsOf, format, formatChord, isReservedChord, isTypingTarget, labelOf, matchesAccept, matchesChord, noOverlap, parseChord, parseSort, readErrorBody, readPixels, resample, serialiseSort, staleOf, tickLabel, tickStep, ticksBetween, toDate, toLoad, toast, toastTimeout, transportShortcuts, typeSteps, useActiveItem, useAsyncAction, useClientWork, useColorScheme, useCommands, useDifference, useExpanded, useFileIntake, useHotkeys, useInView, useInfiniteLoad, useJob, useLoad, useSelection, useSystemColorScheme, useTimelineZoom, useUndoable, useViewport, zoomAt };
|
|
6346
7030
|
|
|
6347
7031
|
//# sourceMappingURL=index.js.map
|