strata-react 1.0.38 → 1.0.40
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 +4 -4
- package/UPGRADING.md +5 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/checkbox.d.ts +3 -2
- package/dist/components/secret-field.d.ts +34 -0
- package/dist/components/selection.d.ts +45 -1
- package/dist/components/transcript-view.d.ts +18 -2
- package/dist/components/tree.d.ts +16 -6
- package/dist/components/value-controls.d.ts +20 -4
- package/dist/{query-CJ1pSPiC.js → errors-BunUBqpA.js} +5 -176
- package/dist/errors-BunUBqpA.js.map +1 -0
- package/dist/{field-7Z4N5r5g.js → field-DeKNvGox.js} +74 -5
- package/dist/field-DeKNvGox.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +735 -327
- package/dist/index.js.map +1 -1
- package/dist/lib/choice.d.ts +29 -0
- package/dist/lib/transcript.d.ts +16 -0
- package/dist/map.js +2 -2
- package/dist/panorama.js +2 -2
- package/dist/query-D163gXXZ.js +178 -0
- package/dist/query-D163gXXZ.js.map +1 -0
- package/dist/{run-DzyLrZlA.js → run-DEf1Vh0x.js} +10 -6
- package/dist/run-DEf1Vh0x.js.map +1 -0
- package/dist/testing.js +2 -2
- package/dist/{theme-CFNi6WUO.js → theme-DVaIxyNn.js} +6 -75
- package/dist/theme-DVaIxyNn.js.map +1 -0
- package/dist/value-controls-FO4zQiHP.js +735 -0
- package/dist/value-controls-FO4zQiHP.js.map +1 -0
- package/dist/visual-cli.js +1 -1
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/field-7Z4N5r5g.js.map +0 -1
- package/dist/query-CJ1pSPiC.js.map +0 -1
- package/dist/run-DzyLrZlA.js.map +0 -1
- package/dist/theme-CFNi6WUO.js.map +0 -1
- package/dist/value-controls-D6O9TsM6.js +0 -356
- package/dist/value-controls-D6O9TsM6.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { Label, Radio, RadioGroup } from "react-aria-components";
|
|
5
|
-
import { CircleAlert } from "lucide-react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Label, Radio, RadioGroup, Tooltip, TooltipTrigger } from "react-aria-components";
|
|
5
|
+
import { ArrowBigUp, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ChevronUp, CircleAlert, Command, Option } from "lucide-react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
// src/lib/utils.ts
|
|
8
8
|
var typeSteps = [
|
|
9
9
|
"caption",
|
|
@@ -28,6 +28,75 @@ var twMerge = extendTailwindMerge({ extend: {
|
|
|
28
28
|
function cn(...inputs) {
|
|
29
29
|
return twMerge(clsx(inputs));
|
|
30
30
|
}
|
|
31
|
+
// src/components/key-glyphs.tsx
|
|
32
|
+
var GLYPHS = {
|
|
33
|
+
"←": {
|
|
34
|
+
icon: ArrowLeft,
|
|
35
|
+
name: "left arrow"
|
|
36
|
+
},
|
|
37
|
+
"→": {
|
|
38
|
+
icon: ArrowRight,
|
|
39
|
+
name: "right arrow"
|
|
40
|
+
},
|
|
41
|
+
"↑": {
|
|
42
|
+
icon: ArrowUp,
|
|
43
|
+
name: "up arrow"
|
|
44
|
+
},
|
|
45
|
+
"↓": {
|
|
46
|
+
icon: ArrowDown,
|
|
47
|
+
name: "down arrow"
|
|
48
|
+
},
|
|
49
|
+
"⌘": {
|
|
50
|
+
icon: Command,
|
|
51
|
+
name: "Command"
|
|
52
|
+
},
|
|
53
|
+
"⌃": {
|
|
54
|
+
icon: ChevronUp,
|
|
55
|
+
name: "Control"
|
|
56
|
+
},
|
|
57
|
+
"⌥": {
|
|
58
|
+
icon: Option,
|
|
59
|
+
name: "Option"
|
|
60
|
+
},
|
|
61
|
+
"⇧": {
|
|
62
|
+
icon: ArrowBigUp,
|
|
63
|
+
name: "Shift"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var PATTERN = new RegExp(`([${Object.keys(GLYPHS).join("")}])`);
|
|
67
|
+
/** Key text with its arrows and modifier symbols drawn as icons, each with its name for screen readers. Other text is left as it is. */
|
|
68
|
+
function KeyText({ children }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children.split(PATTERN).map((part, i) => {
|
|
70
|
+
const glyph = GLYPHS[part];
|
|
71
|
+
if (!glyph) return part ? /* @__PURE__ */ jsx(React.Fragment, { children: part }, i) : null;
|
|
72
|
+
const Icon = glyph.icon;
|
|
73
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
className: "inline size-[1em] align-[-0.125em]"
|
|
76
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
77
|
+
className: "sr-only",
|
|
78
|
+
children: [glyph.name, " "]
|
|
79
|
+
})] }, i);
|
|
80
|
+
}) });
|
|
81
|
+
}
|
|
82
|
+
// src/components/tooltip.tsx
|
|
83
|
+
/** A hover-and-focus tooltip for a control, portalled above everything. Words only; not the only home of information. */
|
|
84
|
+
function Tooltip$1({ label, hint, children, side = "top", delay = 500, open, className }) {
|
|
85
|
+
return /* @__PURE__ */ jsxs(TooltipTrigger, {
|
|
86
|
+
delay,
|
|
87
|
+
closeDelay: 0,
|
|
88
|
+
isOpen: open,
|
|
89
|
+
children: [children, /* @__PURE__ */ jsxs(Tooltip, {
|
|
90
|
+
placement: side,
|
|
91
|
+
offset: 6,
|
|
92
|
+
className: cn("layer-tip enter-overlay max-w-xs rounded-control bg-foreground px-2 py-1 type-caption text-background", className),
|
|
93
|
+
children: [label, hint != null && /* @__PURE__ */ jsx("span", {
|
|
94
|
+
className: "ml-2 opacity-70",
|
|
95
|
+
children: typeof hint === "string" ? /* @__PURE__ */ jsx(KeyText, { children: hint }) : hint
|
|
96
|
+
})]
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
31
100
|
// src/lib/control.ts
|
|
32
101
|
/** The height class of each control size. */
|
|
33
102
|
var controlHeight = {
|
|
@@ -173,6 +242,6 @@ function ChoiceGroup({ legend, name, choices, value, onChange, error }) {
|
|
|
173
242
|
]
|
|
174
243
|
});
|
|
175
244
|
}
|
|
176
|
-
export { Textarea as a,
|
|
245
|
+
export { Textarea as a, Tooltip$1 as c, typeSteps as d, NativeSelect as i, KeyText as l, Field as n, useFieldControl as o, Input$1 as r, controlHeight as s, ChoiceGroup as t, cn as u };
|
|
177
246
|
|
|
178
|
-
//# sourceMappingURL=field-
|
|
247
|
+
//# sourceMappingURL=field-DeKNvGox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-DeKNvGox.js","names":["_Fragment","Tooltip","AriaTooltip","Input"],"sources":["../src/lib/utils.ts","../src/components/key-glyphs.tsx","../src/components/tooltip.tsx","../src/lib/control.ts","../src/components/field.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\n// Teach tailwind-merge that `type-*` utilities are font sizes. Without this, cn() cannot tell\n// `type-label` from a colour and may drop one of two classes that both survive in CSS; with stock\n// shadcn the same bug drops `text-muted-foreground` next to a custom `text-*` size.\nexport const typeSteps = [\"caption\", \"label\", \"body-sm\", \"body\", \"heading\", \"title\", \"figure\", \"display\"] as const;\n\n// The radius roles too, so `rounded-pill` at a call site (a round avatar Thumbnail) replaces a\n// component's `rounded-control` instead of both surviving and CSS order picking one.\nconst radiusRoles = [\"control\", \"surface\", \"overlay\", \"pill\"] as const;\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: { radius: [...radiusRoles] },\n classGroups: {\n \"font-size\": [{ type: [...typeSteps] }],\n },\n },\n});\n\n/** clsx + tailwind-merge, taught that `type-*` utilities are font sizes and `rounded-control`, `-surface`, `-overlay`, `-pill` are radii. */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { ArrowBigUp, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ChevronUp, Command, Option, type LucideIcon } from \"lucide-react\";\n\n// Keys drawn as icons where a font cannot be trusted to have them (strata-react issue #136, from\n// strata-vid). The arrows (← → ↑ ↓) and the macOS modifiers (⌘ ⌃ ⌥ ⇧) are outside the latin subset of\n// the bundled variable fonts, so a legend drew them in whatever face the machine had: different on\n// every machine, and `strata-visual` fails a shot with text in a system font. Lucide's icons are\n// SVG, so they draw the same everywhere and take the text colour. Each is hidden from assistive\n// technology and followed by its name in screen-reader-only text (\"left arrow\", \"Command\"), so the\n// keycap reads as words rather than as a symbol each screen reader pronounces its own way.\n// Checked: React Aria has no keyboard-shortcut display beyond the `Keyboard` slot (which only\n// labels the text it is given), so this is the glyph mapping the slot's content needs.\n\nconst GLYPHS: Record<string, { icon: LucideIcon; name: string }> = {\n \"←\": { icon: ArrowLeft, name: \"left arrow\" },\n \"→\": { icon: ArrowRight, name: \"right arrow\" },\n \"↑\": { icon: ArrowUp, name: \"up arrow\" },\n \"↓\": { icon: ArrowDown, name: \"down arrow\" },\n \"⌘\": { icon: Command, name: \"Command\" },\n \"⌃\": { icon: ChevronUp, name: \"Control\" },\n \"⌥\": { icon: Option, name: \"Option\" },\n \"⇧\": { icon: ArrowBigUp, name: \"Shift\" },\n};\nconst PATTERN = new RegExp(`([${Object.keys(GLYPHS).join(\"\")}])`);\n\n/** Key text with its arrows and modifier symbols drawn as icons, each with its name for screen readers. Other text is left as it is. */\nexport function KeyText({ children }: { children: string }) {\n return (\n <>\n {children.split(PATTERN).map((part, i) => {\n const glyph = GLYPHS[part];\n if (!glyph) return part ? <React.Fragment key={i}>{part}</React.Fragment> : null;\n const Icon = glyph.icon;\n return (\n <React.Fragment key={i}>\n <Icon aria-hidden className=\"inline size-[1em] align-[-0.125em]\" />\n <span className=\"sr-only\">{glyph.name} </span>\n </React.Fragment>\n );\n })}\n </>\n );\n}\n","import { KeyText } from \"./key-glyphs\";\nimport * as React from \"react\";\nimport { Tooltip as AriaTooltip, TooltipTrigger } from \"react-aria-components\";\nimport { cn } from \"../lib/utils\";\n\n// A tooltip names or explains a control; it is never the only place information lives. React Aria\n// opens it on keyboard focus as well as hover (strata-vid's old hover-only tooltip hid it from\n// keyboard users), after a short delay so a pointer crossing a toolbar does not flash every tip,\n// and shares the delay between neighbouring tips. It holds only words: anything interactive is a\n// Popover. It is portalled to the body, so a parent's overflow cannot clip it, and sits on the\n// `layer-tip` layer above dialogs, since it can name a control inside one.\n//\n// `IconButton` uses it for its required `label`, so the name and the visible hint come from one\n// string and cannot drift.\n\n/** Props for `Tooltip`. */\nexport type TooltipProps = {\n /** The words: a control's name or one sentence about it. Not interactive. */\n label: React.ReactNode;\n /** A shortcut or other aside shown after the label, muted (\"Ctrl+Z\"). */\n hint?: React.ReactNode;\n /** The element that gets the tip. It must be a React Aria pressable or focusable (a Strata `Button` is). */\n children: React.ReactElement;\n /** Which side of the trigger it prefers; it flips when there is no room. Default `top`. */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Milliseconds before it opens on hover. Focus opens it at once. Default 500. */\n delay?: number;\n /** A controlled open state, for a story or test that needs it shown. */\n open?: boolean;\n className?: string;\n};\n\n/** A hover-and-focus tooltip for a control, portalled above everything. Words only; not the only home of information. */\nexport function Tooltip({ label, hint, children, side = \"top\", delay = 500, open, className }: TooltipProps) {\n return (\n <TooltipTrigger delay={delay} closeDelay={0} isOpen={open}>\n {children}\n <AriaTooltip\n placement={side}\n offset={6}\n className={cn(\"layer-tip enter-overlay max-w-xs rounded-control bg-foreground px-2 py-1 type-caption text-background\", className)}\n >\n {label}\n {hint != null && <span className=\"ml-2 opacity-70\">{typeof hint === \"string\" ? <KeyText>{hint}</KeyText> : hint}</span>}\n </AriaTooltip>\n </TooltipTrigger>\n );\n}\n","// Control sizes, one set for everything that sits in a toolbar or a property row: `default` is\n// --control-h and `sm` is --control-h-sm, so two controls of the same size name are the same height\n// in every density (issue #117). Button, IconButton, Toggle, ToggleGroup, Input, NativeSelect and\n// NumberField all take it as `size`.\n\n/** The size names a control takes: `default` (--control-h) or `sm` (--control-h-sm). */\nexport type ControlSize = \"default\" | \"sm\";\n\n/** The height class of each control size. */\nexport const controlHeight: Record<ControlSize, string> = {\n default: \"h-(--control-h)\",\n sm: \"h-(--control-h-sm)\",\n};\n","import * as React from \"react\";\nimport { CircleAlert } from \"lucide-react\";\nimport { Label, Radio, RadioGroup } from \"react-aria-components\";\nimport { cn } from \"../lib/utils\";\nimport { controlHeight, type ControlSize } from \"../lib/control\";\n\n// Field owns the wiring a generated form usually forgets: the label's htmlFor, aria-describedby\n// pointing at the hint and the error, and aria-invalid. Controls read it from context, so a control\n// inside a Field cannot end up unlabelled or silently invalid.\n//\n// A one-field form (\"paste a link, Add\", a search box, \"invite by email\") puts its button on the\n// control's row, not beside the whole field (strata-react issue #46, from the Tubes Library\n// screen): in a plain flex row the button lines up with label, hint and error together and drifts\n// off the input whenever one shows. `action` is drawn on the control's row, both at --control-h,\n// with the hint and the error under both across the full width. It wraps under the control only\n// when the row cannot keep the control 10rem wide beside it (a 250px inspector body keeps a Reset beside its slider, issue #116): on a phone a short \"Add\" stays on the\n// row, as a search box's button does, and a long label or a narrow column wraps. The error and hint stay the input's description; the\n// button is not described by them. Field messages for a form come from `useAsyncAction`'s\n// `fieldErrors` (its `validate`, or the server's 422), so no `problem` state is kept by hand.\n\ntype FieldState = { id: string; label: string; describedBy?: string; invalid: boolean; report: (message: string | undefined) => void };\nconst FieldContext = React.createContext<FieldState | null>(null);\n\n// A control that checks what was typed (a number field, a colour field) reports its own message to\n// the Field it sits in, which draws it as the field's error, so a value outside the limits is\n// explained in the same place and way as a server's 422, with nothing for the screen to wire.\n// `error` from the screen wins over the control's own. Outside a Field `report` does nothing and\n// the control marks itself invalid without a message.\n/** @internal The surrounding Field, and where a control reports its own message. */\nexport function useFieldControl() {\n const field = React.useContext(FieldContext);\n return { field, report: field?.report ?? noReport };\n}\n\nfunction useField(id?: string) {\n const field = React.useContext(FieldContext);\n return {\n // Inside a Field the Field's id wins, so the label always points at the control. To choose the\n // id yourself, pass it to Field.\n id: field?.id ?? id,\n \"aria-describedby\": field?.describedBy,\n \"aria-invalid\": field?.invalid || undefined,\n };\n}\n\nconst noReport = () => {};\n\nexport type FieldProps = {\n label: string;\n /** The control's id, when the page needs a known one (an anchor, a test). Generated otherwise. */\n id?: string;\n /** What the person needs to know before typing, such as limits or units. */\n hint?: React.ReactNode;\n /** What went wrong and how to fix it, in one sentence. Shown under the control, never in a toast. */\n error?: string;\n /** A button on the control's row, for a one-field form (an `AsyncButton` \"Add\"). The hint and error run under both; on a narrow screen it wraps under the control. */\n action?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n};\n\n/** A labelled form field: wires the label, hint, error, `aria-describedby` and `aria-invalid` into the one control it wraps. */\nexport function Field({ label, id: idProp, hint, error, action, children, className }: FieldProps) {\n const generated = React.useId();\n const id = idProp ?? generated;\n const hintId = hint ? `${id}-hint` : undefined;\n const [reported, report] = React.useState<string>();\n const shown = error ?? reported;\n const errorId = shown ? `${id}-error` : undefined;\n const describedBy = [errorId, hintId].filter(Boolean).join(\" \") || undefined;\n\n return (\n <FieldContext.Provider value={{ id, label, describedBy, invalid: Boolean(shown), report }}>\n <div className={cn(\"grid min-w-0 content-start gap-1.5\", className)}>\n <label htmlFor={id} className=\"type-label text-foreground\">\n {label}\n </label>\n {action ? (\n <div className=\"flex flex-wrap items-start gap-2\">\n <div className=\"min-w-40 flex-1\">{children}</div>\n <div className=\"flex shrink-0 items-center\">{action}</div>\n </div>\n ) : (\n children\n )}\n {shown && (\n <p id={errorId} className=\"flex items-start gap-1.5 type-body-sm text-danger\">\n <CircleAlert aria-hidden className=\"mt-0.5 size-4 shrink-0\" />\n {shown}\n </p>\n )}\n {hint && (\n <p id={hintId} className=\"type-body-sm text-muted-foreground\">\n {hint}\n </p>\n )}\n </div>\n </FieldContext.Provider>\n );\n}\n\nconst control =\n \"w-full min-w-0 rounded-control border border-input bg-background px-3 type-body text-foreground transition-state placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-70 aria-invalid:border-danger\";\n\n/** A text input that picks up its id and descriptions from the surrounding `Field`. `size=\"sm\"` is --control-h-sm; the native `size` (a width in characters) is not passed on. */\nexport function Input({ className, id, size = \"default\", ...props }: Omit<React.ComponentProps<\"input\">, \"size\"> & { size?: ControlSize }) {\n return <input {...useField(id)} className={cn(control, controlHeight[size], className)} {...props} />;\n}\n\n/** A multi-line input that picks up its id and descriptions from the surrounding `Field`. */\nexport function Textarea({ className, id, ...props }: React.ComponentProps<\"textarea\">) {\n return <textarea {...useField(id)} className={cn(control, \"min-h-24 py-2\", className)} {...props} />;\n}\n\n// A native select, styled. For short option lists on a touch screen it beats a custom listbox:\n// the platform picker, typeahead and form autofill all work with no code.\n/** The platform select, styled. The default for short lists, especially on touch screens. `size=\"sm\"` is --control-h-sm. */\nexport function NativeSelect({ className, id, size = \"default\", ...props }: Omit<React.ComponentProps<\"select\">, \"size\"> & { size?: ControlSize }) {\n return <select {...useField(id)} className={cn(control, controlHeight[size], \"pr-8\", className)} {...props} />;\n}\n\n// Radio choices: React Aria's RadioGroup (a group named by its label, arrow-key movement, one tab\n// stop), and each row wraps its control so the whole row is one hit target. The dot is drawn from\n// tokens, not the platform's accent-color radio.\nexport type Choice = { value: string; label: string; detail?: string };\n\n/** Radio choices in a fieldset with a legend; each whole row is the hit target. For 2 to 5 options that each need a sentence. */\nexport function ChoiceGroup({\n legend,\n name,\n choices,\n value,\n onChange,\n error,\n}: {\n legend: string;\n name: string;\n choices: Choice[];\n value: string;\n onChange: (value: string) => void;\n error?: string;\n}) {\n const errorId = React.useId();\n return (\n <RadioGroup name={name} value={value} onChange={onChange} aria-describedby={error ? errorId : undefined} className=\"grid gap-2\">\n <Label className=\"mb-1.5 type-label text-foreground\">{legend}</Label>\n {choices.map((c) => (\n <Radio key={c.value} value={c.value} className=\"group flex min-h-(--control-h-sm) cursor-pointer items-start gap-3 py-1\">\n <span\n aria-hidden\n className=\"mt-1 grid size-4 shrink-0 place-items-center rounded-pill border border-input bg-background transition-state group-selected:border-primary group-focus-visible:outline-2 group-focus-visible:outline-offset-2 group-focus-visible:outline-ring\"\n >\n <span className=\"size-2 rounded-pill bg-primary opacity-0 group-selected:opacity-100\" />\n </span>\n <span className=\"grid\">\n <span className=\"type-body\">{c.label}</span>\n {c.detail && <span className=\"type-body-sm text-muted-foreground\">{c.detail}</span>}\n </span>\n </Radio>\n ))}\n {error && (\n <p id={errorId} className=\"flex items-start gap-1.5 type-body-sm text-danger\">\n <CircleAlert aria-hidden className=\"mt-0.5 size-4 shrink-0\" />\n {error}\n </p>\n )}\n </RadioGroup>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAa,YAAY;CAAC;CAAW;CAAS;CAAW;CAAQ;CAAW;CAAS;CAAU;AAAS;AAMxG,IAAM,UAAU,oBAAoB,EAClC,QAAQ;CACN,OAAO,EAAE,QAAQ,CAAC,GAAG;EAJJ;EAAW;EAAW;EAAW;CAI7B,CAAW,EAAE;CAClC,aAAa,EACX,aAAa,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC,EACxC;AACF,EACF,CAAC;;AAGD,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;ACXA,IAAM,SAA6D;CACjE,KAAK;EAAE,MAAM;EAAW,MAAM;CAAa;CAC3C,KAAK;EAAE,MAAM;EAAY,MAAM;CAAc;CAC7C,KAAK;EAAE,MAAM;EAAS,MAAM;CAAW;CACvC,KAAK;EAAE,MAAM;EAAW,MAAM;CAAa;CAC3C,KAAK;EAAE,MAAM;EAAS,MAAM;CAAU;CACtC,KAAK;EAAE,MAAM;EAAW,MAAM;CAAU;CACxC,KAAK;EAAE,MAAM;EAAQ,MAAM;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E;IACD,CAAA,CAAA;GAXK,GAAA,EAAE,KAWP,CACR;GACA,SACC,qBAAC,KAAD;IAAG,IAAI;IAAS,WAAU;IAA1B,UAAA,CACE,oBAAC,aAAD;KAAa,eAAA;KAAY,WAAU;IAA0B,CAAA,GAC5D,KACA;;EAEK;;AAEhB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { CompositionBar, type CompositionBarProps, type CompositionPart } from '
|
|
|
29
29
|
export { LinkCard, LinkCardList, type LinkCardProps } from './components/link-card';
|
|
30
30
|
export { DataView, EmptyState, LoadError, Skeleton, StaleNotice, type Load, type LoadFailure, type Stale } from './components/data-view';
|
|
31
31
|
export { NumberField, Slider, ColorField, type NumberFieldProps, type SliderProps, type ColorFieldProps, type RangeProps } from './components/value-controls';
|
|
32
|
+
export { SecretField, type SecretFieldProps, type SecretTestResult } from './components/secret-field';
|
|
32
33
|
export { Alert, type AlertProps } from './components/alert';
|
|
33
34
|
export { toast, toastTimeout, StrataToastRegion, type ToastContentProps, type StrataToastRegionProps } from './components/toast';
|
|
34
35
|
export { useClientWork, type ClientWork, type WorkContext, type WorkPhase } from './lib/client-work';
|
|
@@ -38,7 +39,7 @@ export { DataTable, TableSkeleton, parseSort, serialiseSort, type CellValue, typ
|
|
|
38
39
|
export { MediaPlayer, useMediaElement, useAttachedSource, SPEECH_RATES, type MediaPlayerProps, type MediaElementState, type MediaElementOptions, type MediaWindow, type StreamContext, type StreamAttachment, type SourceAttacher, type MediaProblem, type MediaSource, type MediaSession } from './components/media-player';
|
|
39
40
|
export { useMediaSpans, SpanActions, type MediaSpanData, type SpanKind, type SpanBehaviour, type SpanOutcome, type SpanWords, type MediaSpansState } from './components/media-spans';
|
|
40
41
|
export { TranscriptView, type TranscriptViewProps, type TranscriptSeek } from './components/transcript-view';
|
|
41
|
-
export { phraseAt, wordAt, type TranscriptGroup, type TranscriptPhrase, type TranscriptWord } from './lib/transcript';
|
|
42
|
+
export { phraseAt, wordAt, isDoubtful, phraseDoubtful, type TranscriptGroup, type TranscriptPhrase, type TranscriptPhraseState, type TranscriptWord } from './lib/transcript';
|
|
42
43
|
export { Waveform, type WaveformProps, type WaveformMark, type WaveformMarkKind, type WaveformSpan, type WaveformTone } from './components/waveform';
|
|
43
44
|
export { resamplePeaks, toPeakPair, peaksFromAudio, type WaveformPeaks, type PeakPair, type DecodedAudio } from './lib/waveform';
|
|
44
45
|
export { MediaGroup, PlayWindowButton, joinMediaGroup, type PlayWindowButtonProps } from './components/media-group';
|
|
@@ -50,7 +51,8 @@ export { FileButton, FileDropZone, FileOutcomes, MissingFile } from './component
|
|
|
50
51
|
export { useFileIntake, matchesAccept, type FileIntake, type FileIntakeOptions, type FileOutcome } from './lib/file-intake';
|
|
51
52
|
export { Inspector, InspectorSection, PropertyRow, PropertyList, type InspectorProps, type InspectorSectionProps, type PropertyRowProps, type Property, type PropertyListProps } from './components/inspector';
|
|
52
53
|
export { Disclosure, useExpanded, type DisclosureProps, type DisclosureOpenProps, type Expanded, type ExpandedOptions } from './components/disclosure';
|
|
53
|
-
export { BulkBar, useSelection, type InitialSelection } from './components/selection';
|
|
54
|
+
export { BulkBar, useSelection, useChoices, type InitialSelection, type Choices, type ChoiceCounts } from './components/selection';
|
|
55
|
+
export type { Implies } from './lib/choice';
|
|
54
56
|
export { SelectableGrid, type SelectableGridProps, type TileAspect, type TileSize, } from './components/selectable-grid';
|
|
55
57
|
export { VirtualList } from './components/virtual-list';
|
|
56
58
|
export { InfiniteList, LoadMore, type InfiniteListProps, type LoadMoreProps } from './components/infinite-list';
|