strata-react 2.1.17 → 2.1.19

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/index.d.ts CHANGED
@@ -6297,5 +6297,41 @@ export declare function turned(facing: Facing, turn: Turn): Facing;
6297
6297
  export declare function turnWords(turn: Turn): string;
6298
6298
  /** An arrow pointing up, right, down or left, with a turn drawn round it: the picture of quarter and half turns. */
6299
6299
  export declare function TurnArrow({ facing, turn, label, className }: TurnArrowProps): import("react").JSX.Element;
6300
- export { type ActiveItem, type AlertDialogProps, type AlertProps, type Api, type ApiOptions, type ApiPage, type AspectRatio, type AsyncAction, type AsyncActionOptions, AsyncButton, type AsyncLabels, type AudioMedia, type AutoRecorder, type AutoRecorderState, type AutoSave, type AutoSaveOptions, type AutoTake, type BalanceProps, type BalanceSide, type BinaryByteUnit, type BookPage, type BookUrl, type BookViewerProps, type BoxListProps, type BoxOverlayProps, type BoxSource, type BoxTone, type BoxedPictureProps, type BoxesState, type Brush, type BrushControl, type BrushKind, Button, type ButtonLinkProps, type ButtonProps, type ByteHighlight, type ByteRange, type ByteUnit, type ByteViewProps, type BytesOptions, COLOR_SCHEME_STORAGE_KEY, type Candidate, type CellValue, type ChartMark, type ChartSpan, type CheckboxGesture, type CheckboxProps, type Choice, type ChoiceCounts, type ChoiceGridProps, type ChoiceGroupProps, type ChoiceMarks, type ChoiceSize, type ChoiceState, type Choices, type ClientWork, type Clips, type ClipsContext, type ClipsProviderProps, type ClockFaceProps, type ClockFaceStyle, type ClockHands, type ClockMarks, type ClockNumbers, type ClockNumerals, type ClockParts, type ClockProps, type ClockStyle, type ClockTime, type ClockWordsOptions, type ColorFieldProps, type ColorScheme, ColorSchemeChoice, type ColorSchemeLabels, type ColorSchemePreference, type ColorSchemeState, type Column, type Command, type CommandMenuProps, type CommandsOptions, type CompareAudioProps, type CompareGridProps, type CompareMode, type CompareProps, type CompareTextProps, type CompareVideoGridProps, type CompareVideoProps, type ComposerProps, type CompositionBarProps, type CompositionPart, type ConcealedProps, type ConsoleLevel, type ConsoleLine, type ConsoleProps, type ContextMenuProps, type ControlSize, type ConversationImage, type ConversationProps, type ConversationTurn, type CountOptions, type CountdownOptions, type CurrencyOptions, type CursorMapping, type CursorOwner, CursorScope, type CursorScopeProps, type CutChange, type CutLimit, type CutRoom, DEFAULT_PALETTE, type DataTableProps, type DateFormatter, type DateInput, type DecodedAudio, type Delivery, Density, type DensityName, type DensityProps, type DescribeError, type DialogProps, type Difference, type DifferenceState, type DigitalClockProps, type DigitalClockStyle, type DigitalTimeOptions, type DisclosureOpenProps, type DisclosureProps, type DragData, type DragSourceProps, type DrawTool, type Drawing, type Box as DrawingBox, type DrawingLayerProps, type DrawingOp, type DrawingOptions, type DrawingState, type DrawingToolbarProps, type DropTarget, type Easing, type EditClip, type EditListOptions, type EditListPlayerProps, type EditListSlot, type EditListState, type EditTimes, type EditableRegion, type EntityMatch, type EntityMatcher, type ErrorBody, type EventLogEntry, type EventLogImage, type EventLogProps, type Expanded, type ExpandedOptions, type Facing, type FailedRemoval, type FetchJsonInit, type FetchJsonOptions, type FieldErrors, type FieldProps, type FileIntake, type FileIntakeOptions, type FileOutcome, type FillLevelProps, type FilmFrame, type FilmStripProps, type Folder, type FolderListing, type FolderPickerProps, type Format, type FormatOptions, type FractionCut, type FractionOutline, type FractionShapeProps, type FullscreenFrameProps, type GlimpseLook, type GlimpseProps, type GlimpseWhy, type Grid, type GroupMember, type GroupedChart, type Handle, type History, type HistoryOptions, type HistoryStateOptions, type HistoryStep, type HotkeysOptions, IconButton, type IconButtonProps, type IconComponent, type ImageMedia, type Implies, type InViewOptions, type InfiniteListProps, type InfiniteLoad, type InfiniteLoadOptions, type InitialSelection, type InkColours, type InkMatch, type InkMatchState, type InputLevelProps, type InspectorProps, type InspectorSectionProps, type Job, type JobAction, type JobActionOptions, type JobFailure, type JobOptions, type JobProgress, type JobRow, type JobStatusProps, type JobWords, type JobsTableProps, type JsonViewProps, type KeyCheck, KeysLegend, type LatLng, type LengthBarProps, type LengthLook, type LightboxItem, type LightboxProps, type LightboxUrl, LineChart, LineChartGroup, type LineChartGroupProps, type LineChartProps, type LinkCardProps, type ListeningLevelProps, type Load, type LoadFailure, type LoadMoreProps, type Loudness, type MarkKind, type MarkPattern, type MarkTone, type MarkableTextProps, type MediaContentsItem, type MediaContentsProps, type MediaElementOptions, type MediaElementState, type MediaHeading, type MediaMark, MediaPlayer, type MediaPlayerProps, type MediaProblem, type MediaProgress, type MediaSession, type MediaSource, type MediaSpanData, type MediaSpansState, MediaStage, type MediaStat, type MediaStats, type MediaWindow, type MenuEntry, type MenuProps, type MeterProps, type MeterThreshold, type MetricProps, type Microphone, MicrophoneContext, MicrophoneError, type MicrophoneStream, type MoneyProps, type MoneyValue, type More, type NativeSelectProps, type NavItem, type Nib, type NumberFieldProps, type NumberFormatter, type Outbox, type OutboxItem, type OutboxOptions, type OutboxRefusal, type OutboxRequest, type OutboxSnapshot, type OutboxStatusProps, PALETTE_STORAGE_KEY, type PageNames, type Pair, type PairAnswer, type PairJudgeProps, type PairVoteProps, type PairVoteSlot, type PairVoteWords, PaletteChoice, type PaletteOption, type PaletteState, type PaneProps, type PeakPair, type PendingRemoval, type Phase, type PictureBox, type PictureRegion, type PixelImageProps, type Pixels, type PlaceBoardProps, type PlaceState, type Platform, type PlayWindowButtonProps, PlayerNotice, type PlayerWarning, type PlayerWarningEvent, type Point, type Poll, type PopoverProps, type Precision, type Property, type PropertyListProps, type PropertyRowProps, type RangeProps, type RangeSliderProps, RateChoice, type ReadAlongPart, type ReadAlongProps, type ReadAloud, type ReadAloudOptions, type ReadPixels, type Rebinding, type Recorder, type RecorderState, type Recording, type Rect, type RectLimits, type Region, type RegionEditorProps, type RegionTone, type Reserve, type ReserveOptions, type ResumeWords, type Revealed, type Block as RichBlock, type Inline as RichInline, type RichTextProps, RowAction, type RowActionProps, type RowExpansion, type RowSelection, SPEECH_RATES, type SaveState, type SayAgainProps, type SayOnShowOptions, type SayPictureProps, type Saying, type ScheduleRow, type ScheduleTableProps, type SearchParam, type SearchParamOptions, type SecretFieldProps, type SecretTestResult, SeekBar, type SeekBarProps, type SeekBarSpan, type Segment, type Segmenter, type SegmenterOptions, type SelectableGridProps, type SequenceItem, type SequenceTimelineProps, type SetClockProps, type SetOptions, type ShareBox, type SharedCursor, type Shortcut, type ShortcutOverrides, type SkipAction, type SkipLevel, type SkipSteps, type SliderProps, type SolidProps, type SolidShape, type Sort, type SortableListProps, type SourceAttacher, SpanActions, type SpanActionsNotice, type SpanBehaviour, type SpanKind, type SpanOutcome, SpanStrip, type SpanTone, type SpanWords, type SpeakOptions, type Speech, type SpeechLevel, type SpeechPart, StageGuides, type StageState, type StageWords, type Stale, type StrataToastRegionProps, type StreamAttachment, type StreamContext, type StreamStats, type Stroke, type StrokeChange, type StrokeNoteWords, type StrokePoint, type StrokeShape, type SwitchProps, type SystemFact, type SystemFolder, type SystemInfoLike, type SystemPanelProps, type SystemService, type TabItem, type TakeLevelProps, type TextDifference, type TextLinkProps, type TextMedia, type TextSegment, ThemeProvider, type ThumbnailProps, type TileAspect, type TileGridProps, type TileSize, TimeReadout, type TimelineChange, type TimelineClock, type TimelineClockOptions, type TimelineDrop, type TimelineItem, type TimelineLane, type TimelineMarker, type TimelinePlayerProps, type TimelineProps, type ToastContentProps, type ToggleGroupProps, type ToggleOption, type ToggleProps, type Tone, type ToolChoice, type ToolbarProps, type TooltipProps, type TranscriptGroup, type TranscriptPhrase, type TranscriptPhraseState, type TranscriptSeek, type TranscriptViewProps, type TranscriptWord, Transport, type TransportProps, type TreeNodeState, type TreeProps, type Turn, type TurnArrowProps, type TypedApi, type Undoable, type UndoableOptions, type UseAutoRecorderOptions, type UseRecorderOptions, type UseSpeechOptions, type VideoLoop, type VideoMedia, type VideoMode, type ViewGroup, type ViewGroupRows, type ViewOptionsConfig, type ViewOptionsProps, type ViewOptionsState, type ViewPointerOptions, type ViewSort, type Viewport, type ViewportFrameProps, type ViewportState, VolumeControl, type VolumeControlProps, type WaveformMark, type WaveformMarkKind, type WaveformPeaks, type WaveformProps, type WaveformSpan, type WaveformTone, type WorkContext, type WorkPhase, type WorkflowRunLike, type WorkflowRunOptions, type WorkflowStage, type WorkflowStepsProps, type WorkflowSummaryData, type WorkflowSummaryProps, type WorkflowSummaryState, type WorkflowSummaryWords, type WorkspaceBarProps, type WorkspaceState, type YScale, browserMicrophone, buttonVariants, colorSchemeScript, explainMicrophoneError, format$1 as format, geo, isTypingTarget, keyName, logScale, marksFor, mediaStatRows, paletteScript, palettes, readPixels$1 as readPixels, skipAction, transportShortcuts, useAsyncAction, useAttachedSource, useColorScheme, useHotkeys, useMediaElement, useMediaSpans, useMediaStats, useMicrophone, usePalette, usePlayerWarnings, useSharedCursor, useSystemColorScheme, valueAt };
6300
+ /** How precise a partial date is: `circa` marks any YYYY, YYYY-MM or YYYY-MM-DD value as approximate. */
6301
+ type PartialDatePrecision = "day" | "month" | "year" | "circa";
6302
+ /** A partial ISO date (`YYYY`, `YYYY-MM`, or `YYYY-MM-DD`) paired with its precision, or `null` when unknown. */
6303
+ type PartialDateValue = {
6304
+ date: string;
6305
+ precision: PartialDatePrecision;
6306
+ } | null;
6307
+ /** Result of parsing a partial date string. */
6308
+ type PartialDateParseResult = {
6309
+ ok: true;
6310
+ value: PartialDateValue;
6311
+ } | {
6312
+ ok: false;
6313
+ error: string;
6314
+ };
6315
+ /** Parse and validate a partial ISO date (`YYYY`, `YYYY-MM`, or `YYYY-MM-DD`), checking calendar month and day limits. */
6316
+ export declare function parsePartialDate(raw: string, circa?: boolean): PartialDateParseResult;
6317
+ /** Format a partial date for display (prefixes `circa` dates with `c. `). */
6318
+ export declare function formatPartialDate(value: PartialDateValue): string;
6319
+ type PartialDateFieldProps = {
6320
+ /** Current partial date, or `null` when unknown. */
6321
+ value: PartialDateValue;
6322
+ /** Called whenever a valid date or cleared value is committed. */
6323
+ onChange: (value: PartialDateValue) => void;
6324
+ /** Placeholder text shown when empty. Defaults to `"YYYY, YYYY-MM or YYYY-MM-DD"`. */
6325
+ placeholder?: string;
6326
+ /** Allow marking the date as approximate (`circa`). Defaults to `true`. */
6327
+ allowCirca?: boolean;
6328
+ /** Label for the approximate toggle. Defaults to `"Approximate"`. */
6329
+ circaLabel?: string;
6330
+ /** Disable both the text input and approximate toggle. */
6331
+ disabled?: boolean;
6332
+ className?: string;
6333
+ };
6334
+ /** Input for an uncertain or partial ISO date (`YYYY`, `YYYY-MM`, `YYYY-MM-DD`) with an optional approximate toggle. Wrap in `Field`. */
6335
+ export declare function PartialDateField({ value, onChange, placeholder, allowCirca, circaLabel, disabled, className }: PartialDateFieldProps): React.JSX.Element;
6336
+ export { type ActiveItem, type AlertDialogProps, type AlertProps, type Api, type ApiOptions, type ApiPage, type AspectRatio, type AsyncAction, type AsyncActionOptions, AsyncButton, type AsyncLabels, type AudioMedia, type AutoRecorder, type AutoRecorderState, type AutoSave, type AutoSaveOptions, type AutoTake, type BalanceProps, type BalanceSide, type BinaryByteUnit, type BookPage, type BookUrl, type BookViewerProps, type BoxListProps, type BoxOverlayProps, type BoxSource, type BoxTone, type BoxedPictureProps, type BoxesState, type Brush, type BrushControl, type BrushKind, Button, type ButtonLinkProps, type ButtonProps, type ByteHighlight, type ByteRange, type ByteUnit, type ByteViewProps, type BytesOptions, COLOR_SCHEME_STORAGE_KEY, type Candidate, type CellValue, type ChartMark, type ChartSpan, type CheckboxGesture, type CheckboxProps, type Choice, type ChoiceCounts, type ChoiceGridProps, type ChoiceGroupProps, type ChoiceMarks, type ChoiceSize, type ChoiceState, type Choices, type ClientWork, type Clips, type ClipsContext, type ClipsProviderProps, type ClockFaceProps, type ClockFaceStyle, type ClockHands, type ClockMarks, type ClockNumbers, type ClockNumerals, type ClockParts, type ClockProps, type ClockStyle, type ClockTime, type ClockWordsOptions, type ColorFieldProps, type ColorScheme, ColorSchemeChoice, type ColorSchemeLabels, type ColorSchemePreference, type ColorSchemeState, type Column, type Command, type CommandMenuProps, type CommandsOptions, type CompareAudioProps, type CompareGridProps, type CompareMode, type CompareProps, type CompareTextProps, type CompareVideoGridProps, type CompareVideoProps, type ComposerProps, type CompositionBarProps, type CompositionPart, type ConcealedProps, type ConsoleLevel, type ConsoleLine, type ConsoleProps, type ContextMenuProps, type ControlSize, type ConversationImage, type ConversationProps, type ConversationTurn, type CountOptions, type CountdownOptions, type CurrencyOptions, type CursorMapping, type CursorOwner, CursorScope, type CursorScopeProps, type CutChange, type CutLimit, type CutRoom, DEFAULT_PALETTE, type DataTableProps, type DateFormatter, type DateInput, type DecodedAudio, type Delivery, Density, type DensityName, type DensityProps, type DescribeError, type DialogProps, type Difference, type DifferenceState, type DigitalClockProps, type DigitalClockStyle, type DigitalTimeOptions, type DisclosureOpenProps, type DisclosureProps, type DragData, type DragSourceProps, type DrawTool, type Drawing, type Box as DrawingBox, type DrawingLayerProps, type DrawingOp, type DrawingOptions, type DrawingState, type DrawingToolbarProps, type DropTarget, type Easing, type EditClip, type EditListOptions, type EditListPlayerProps, type EditListSlot, type EditListState, type EditTimes, type EditableRegion, type EntityMatch, type EntityMatcher, type ErrorBody, type EventLogEntry, type EventLogImage, type EventLogProps, type Expanded, type ExpandedOptions, type Facing, type FailedRemoval, type FetchJsonInit, type FetchJsonOptions, type FieldErrors, type FieldProps, type FileIntake, type FileIntakeOptions, type FileOutcome, type FillLevelProps, type FilmFrame, type FilmStripProps, type Folder, type FolderListing, type FolderPickerProps, type Format, type FormatOptions, type FractionCut, type FractionOutline, type FractionShapeProps, type FullscreenFrameProps, type GlimpseLook, type GlimpseProps, type GlimpseWhy, type Grid, type GroupMember, type GroupedChart, type Handle, type History, type HistoryOptions, type HistoryStateOptions, type HistoryStep, type HotkeysOptions, IconButton, type IconButtonProps, type IconComponent, type ImageMedia, type Implies, type InViewOptions, type InfiniteListProps, type InfiniteLoad, type InfiniteLoadOptions, type InitialSelection, type InkColours, type InkMatch, type InkMatchState, type InputLevelProps, type InspectorProps, type InspectorSectionProps, type Job, type JobAction, type JobActionOptions, type JobFailure, type JobOptions, type JobProgress, type JobRow, type JobStatusProps, type JobWords, type JobsTableProps, type JsonViewProps, type KeyCheck, KeysLegend, type LatLng, type LengthBarProps, type LengthLook, type LightboxItem, type LightboxProps, type LightboxUrl, LineChart, LineChartGroup, type LineChartGroupProps, type LineChartProps, type LinkCardProps, type ListeningLevelProps, type Load, type LoadFailure, type LoadMoreProps, type Loudness, type MarkKind, type MarkPattern, type MarkTone, type MarkableTextProps, type MediaContentsItem, type MediaContentsProps, type MediaElementOptions, type MediaElementState, type MediaHeading, type MediaMark, MediaPlayer, type MediaPlayerProps, type MediaProblem, type MediaProgress, type MediaSession, type MediaSource, type MediaSpanData, type MediaSpansState, MediaStage, type MediaStat, type MediaStats, type MediaWindow, type MenuEntry, type MenuProps, type MeterProps, type MeterThreshold, type MetricProps, type Microphone, MicrophoneContext, MicrophoneError, type MicrophoneStream, type MoneyProps, type MoneyValue, type More, type NativeSelectProps, type NavItem, type Nib, type NumberFieldProps, type NumberFormatter, type Outbox, type OutboxItem, type OutboxOptions, type OutboxRefusal, type OutboxRequest, type OutboxSnapshot, type OutboxStatusProps, PALETTE_STORAGE_KEY, type PageNames, type Pair, type PairAnswer, type PairJudgeProps, type PairVoteProps, type PairVoteSlot, type PairVoteWords, PaletteChoice, type PaletteOption, type PaletteState, type PaneProps, type PartialDateFieldProps, type PartialDateParseResult, type PartialDatePrecision, type PartialDateValue, type PeakPair, type PendingRemoval, type Phase, type PictureBox, type PictureRegion, type PixelImageProps, type Pixels, type PlaceBoardProps, type PlaceState, type Platform, type PlayWindowButtonProps, PlayerNotice, type PlayerWarning, type PlayerWarningEvent, type Point, type Poll, type PopoverProps, type Precision, type Property, type PropertyListProps, type PropertyRowProps, type RangeProps, type RangeSliderProps, RateChoice, type ReadAlongPart, type ReadAlongProps, type ReadAloud, type ReadAloudOptions, type ReadPixels, type Rebinding, type Recorder, type RecorderState, type Recording, type Rect, type RectLimits, type Region, type RegionEditorProps, type RegionTone, type Reserve, type ReserveOptions, type ResumeWords, type Revealed, type Block as RichBlock, type Inline as RichInline, type RichTextProps, RowAction, type RowActionProps, type RowExpansion, type RowSelection, SPEECH_RATES, type SaveState, type SayAgainProps, type SayOnShowOptions, type SayPictureProps, type Saying, type ScheduleRow, type ScheduleTableProps, type SearchParam, type SearchParamOptions, type SecretFieldProps, type SecretTestResult, SeekBar, type SeekBarProps, type SeekBarSpan, type Segment, type Segmenter, type SegmenterOptions, type SelectableGridProps, type SequenceItem, type SequenceTimelineProps, type SetClockProps, type SetOptions, type ShareBox, type SharedCursor, type Shortcut, type ShortcutOverrides, type SkipAction, type SkipLevel, type SkipSteps, type SliderProps, type SolidProps, type SolidShape, type Sort, type SortableListProps, type SourceAttacher, SpanActions, type SpanActionsNotice, type SpanBehaviour, type SpanKind, type SpanOutcome, SpanStrip, type SpanTone, type SpanWords, type SpeakOptions, type Speech, type SpeechLevel, type SpeechPart, StageGuides, type StageState, type StageWords, type Stale, type StrataToastRegionProps, type StreamAttachment, type StreamContext, type StreamStats, type Stroke, type StrokeChange, type StrokeNoteWords, type StrokePoint, type StrokeShape, type SwitchProps, type SystemFact, type SystemFolder, type SystemInfoLike, type SystemPanelProps, type SystemService, type TabItem, type TakeLevelProps, type TextDifference, type TextLinkProps, type TextMedia, type TextSegment, ThemeProvider, type ThumbnailProps, type TileAspect, type TileGridProps, type TileSize, TimeReadout, type TimelineChange, type TimelineClock, type TimelineClockOptions, type TimelineDrop, type TimelineItem, type TimelineLane, type TimelineMarker, type TimelinePlayerProps, type TimelineProps, type ToastContentProps, type ToggleGroupProps, type ToggleOption, type ToggleProps, type Tone, type ToolChoice, type ToolbarProps, type TooltipProps, type TranscriptGroup, type TranscriptPhrase, type TranscriptPhraseState, type TranscriptSeek, type TranscriptViewProps, type TranscriptWord, Transport, type TransportProps, type TreeNodeState, type TreeProps, type Turn, type TurnArrowProps, type TypedApi, type Undoable, type UndoableOptions, type UseAutoRecorderOptions, type UseRecorderOptions, type UseSpeechOptions, type VideoLoop, type VideoMedia, type VideoMode, type ViewGroup, type ViewGroupRows, type ViewOptionsConfig, type ViewOptionsProps, type ViewOptionsState, type ViewPointerOptions, type ViewSort, type Viewport, type ViewportFrameProps, type ViewportState, VolumeControl, type VolumeControlProps, type WaveformMark, type WaveformMarkKind, type WaveformPeaks, type WaveformProps, type WaveformSpan, type WaveformTone, type WorkContext, type WorkPhase, type WorkflowRunLike, type WorkflowRunOptions, type WorkflowStage, type WorkflowStepsProps, type WorkflowSummaryData, type WorkflowSummaryProps, type WorkflowSummaryState, type WorkflowSummaryWords, type WorkspaceBarProps, type WorkspaceState, type YScale, browserMicrophone, buttonVariants, colorSchemeScript, explainMicrophoneError, format$1 as format, geo, isTypingTarget, keyName, logScale, marksFor, mediaStatRows, paletteScript, palettes, readPixels$1 as readPixels, skipAction, transportShortcuts, useAsyncAction, useAttachedSource, useColorScheme, useHotkeys, useMediaElement, useMediaSpans, useMediaStats, useMicrophone, usePalette, usePlayerWarnings, useSharedCursor, useSystemColorScheme, valueAt };
6301
6337
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -15637,14 +15637,21 @@ function speakText(text, { lang, rate = .9, onEnd }) {
15637
15637
  synth.speak(utterance);
15638
15638
  return true;
15639
15639
  }
15640
- function playFrom(parts, i, options) {
15640
+ function loadClip(part) {
15641
+ const audio = new Audio();
15642
+ audio.preload = "auto";
15643
+ audio.title = part.text;
15644
+ audio.src = part.clip ?? "";
15645
+ return audio;
15646
+ }
15647
+ function playFrom(parts, i, options, loaded) {
15641
15648
  const part = parts[i];
15642
15649
  if (!part) {
15643
15650
  options.onEnd?.();
15644
15651
  return;
15645
15652
  }
15646
- const audio = new Audio();
15647
- audio.title = part.text;
15653
+ const audio = loaded ?? loadClip(part);
15654
+ const following = parts[i + 1];
15648
15655
  let settled = false;
15649
15656
  const settle = () => {
15650
15657
  if (settled) return false;
@@ -15661,11 +15668,11 @@ function playFrom(parts, i, options) {
15661
15668
  options.onEnd?.();
15662
15669
  } };
15663
15670
  playing = entry;
15671
+ const next = following ? loadClip(following) : void 0;
15664
15672
  audio.onended = () => {
15665
- if (settle()) playFrom(parts, i + 1, options);
15673
+ if (settle()) playFrom(parts, i + 1, options, next);
15666
15674
  };
15667
15675
  audio.onerror = fallBack;
15668
- audio.src = part.clip ?? "";
15669
15676
  audio.play()?.catch(fallBack);
15670
15677
  }
15671
15678
  /**
@@ -25770,5 +25777,102 @@ function TurnArrow({ facing, turn, label, className }) {
25770
25777
  });
25771
25778
  }
25772
25779
 
25773
- export { ActiveList, Alert, AlertDialog, AppShell, AsyncButton, BRUSHES, Balance, BookViewer, BoxList, BoxOverlay, BoxedPicture, Breadcrumb, BulkBar, Button, ButtonLink, ByteView, CLOCK_FACE_STYLES, CLOCK_STYLES, COINS, COLOR_SCHEME_STORAGE_KEY, Checkbox, ChoiceGrid, ChoiceGridSkeleton, ChoiceGroup, ClipsProvider, Clock, ClockFace, ColorField, ColorSchemeChoice, CommandLegend, CommandMenu, Compare, CompareAudio, CompareGrid, CompareText, CompareVideo, CompareVideoGrid, Composer, CompositionBar, Concealed, Console, ContextMenu, Conversation, CursorScope, DEFAULT_PALETTE, DEFAULT_TOLERANCE, DIGITAL_CLOCK_STYLES, DataTable, DataView$1 as DataView, Density, Dialog, DigitalClock, Disclosure, Done, DragSource, DrawingLayer, DrawingToolbar, EditListPlayer, EmptyState, EventLog, FACINGS, FIT, FRACTION_OUTLINES, Field, FileButton, FileDropOverlay, FileDropZone, FileOutcomes, FillLevel, FilmStrip, FolderPicker, FractionShape, FullscreenFrame, Glimpse, HttpError, INK_COLOURS, IconButton, InfiniteList, Input, InputLevel, Inspector, InspectorSection, JobStatus, JobsTable, JsonView, KeysLegend, LEVEL_FLOOR_DB, LengthBar, Lightbox, LineChart, LineChartGroup, LinkCard, LinkCardList, ListeningLevel, LoadError, LoadMore, MAX_SCALE, MAX_SIDE, MIN_SCALE, MISSING, Mark, MarkSummary, MarkableText, MediaContents, MediaGroup, MediaPlayer, MediaStage, Menu, Meter, Metric, MetricStrip, MicrophoneContext, MicrophoneError, MissingFile, Money, NBSP, NOTES, NativeSelect, NumberField, OutboxStatus, PALETTE_STORAGE_KEY, PageHeader, PairJudge, PairVote, PaletteChoice, Pane, PauseButton, PixelImage, PlaceBoard, PlayWindowButton, PlayerNotice, Popover, PropertyList, PropertyRow, RangeSlider, RateChoice, ReadAlong, RegionEditor, RichText, RowAction, SOLID_SHAPES, SPEECH_RATES, STRATA_DRAG_TYPE, SaveStatus, SayAgain, SayPicture, ScheduleTable, SecretField, SeekBar, SelectableGrid, SelectableGridSkeleton, SequenceTimeline, SetClock, ShortcutEditor, SideNav, Skeleton, Slider, Solid, SortableList, SpanActions, SpanStrip, Split, StageGuides, StaleNotice, Status, StrataQueryProvider, StrataToastRegion, Switch, SystemPanel, TableSkeleton, Tabs, TakeLevel, TextLink, Textarea, ThemeProvider, Thumbnail, ThumbnailSkeleton, TileGrid, TileGridSkeleton, TimeReadout, Timeline, TimelinePlayer, TimelineZoomControls, Toggle, ToggleGroup, Toolbar, ToolbarSeparator, Tooltip, TranscriptView, Transport, Tree, TurnArrow, UndoBar, ViewOptions, ViewportFrame, VirtualList, VolumeControl, Waveform, WorkflowSteps, WorkflowSummary, Workspace, WorkspaceBar, actualPixelsScale, ancestorsOf, apiPage, appBase, applyOp, boxViewport, browserMicrophone, buttonVariants, canFullscreen, canPlayClips, canSay, canSpeak, checkKey, clampToRoom, clampViewport, clipsQueryKey, clockParts, clockWords, cn, coinOutline, colorSchemeScript, commandShortcut, continues, countMarks, createApi, createFormat, createOutbox, createQueryClient, createReserve, createSegmenter, createTypedApi, crossedThreshold, currentItem, currentOf, curvePoints, dayPart, describeActionError, describeHttpError, describeRegion, describeWorkflowSummary, detectPlatform, diffWords, differences, digitalTime, diskThresholds, drawRect, drawingToSvg, ease, editTimeOf, editTimes, emptyDrawing, encodeWav, errorPayload, explainMicrophoneError, feedbackMarker, fetchJson, fieldErrorsOf, fillWords, filterMarkup, findPage, fitPoints, fitRect, followAim, format, formatChord, fractionParts, fractionWords, frameAt, gainToVolume, geo, gridPoints, gutterOf, hitsStroke, hourAt, inkMatch, inputLevelThresholds, invertOp, isDigitalStyle, isDoubtful, isRefusal, isReservedChord, isSpeaking, isTaskRunning, isTypingTarget, isWorkflowRunning, jobProgressText, joinMediaGroup, joinRects, joinSamples, jsonBranchPaths, keyName, labelOf, lerpRect, locateInEdit, logScale, loudnessOf, marksFor, matchEntities, matchGains, matchesAccept, matchesChord, measureLoudness, mediaStatRows, minutesAt, moneyWords, moveGutter, moveMinuteHand, movePoints, moveRect, newStrokeId, nextBreak, noOverlap, normaliseAngle, pageName, paletteScript, palettes, parentOf, parseChord, parseInline, parseRichText, parseSort, peakDb, peakGain, peaksFromAudio, phraseAt, phraseDoubtful, phraseOfWordId, pickEvenly, pickVoice, pixelZoom, plainText, pointsBox, rangeBetween, readErrorBody, readPixels, readingOrder, regionShares, regionStyle, replay, resample, resamplePeaks, rescaleDrawing, resizeRect, rgbaToBlob, rmsDb, romanHour, safeHref, sayPosition, serialiseSort, settleCut, simplifyPoints, skipAction, smoothPath, snapToGrid, solidWords, sortRows, speak, speechLevel, splitRect, staleOf, stepId, stepMinuteHand, stepOnGrid, stopSpeaking, strokeAt, strokeBox, strokeShape, summariseWorkflow, textOf, tickLabel, tickStep, ticksBetween, toDate, toLoad, toPeakPair, toast, toastTimeout, transportShortcuts, turnRect, turnWords, turned, turnedSize, typeSteps, useActiveItem, useAsyncAction, useAttachedSource, useAutoRecorder, useAutoSave, useBookUrl, useBoxes, useChoices, useClientWork, useClips, useColorScheme, useCommands, useCountdown, useDifference, useDrawing, useEditList, useExpanded, useFileIntake, useHistory, useHistoryState, useHotkeys, useInView, useInfiniteLoad, useInkMatch, useJob, useJobAction, useLeaveGuard, useLightboxUrl, useLoad, useMediaElement, useMediaSpans, useMediaStats, useMicrophone, useObjectUrl, useOutbox, useOutboxStarted, usePalette, usePlayerWarnings, usePoll, useReadAloud, useRebindableShortcuts, useRecorder, useReserve, useRevealed, useSayOnShow, useSearchParam, useSelection, useSettledStatus, useSharedCursor, useSpeaking, useSpeech, useSystemColorScheme, useSystemInfo, useTimeline, useTimelineZoom, useUndoable, useViewOptions, useViewPointers, useViewport, useWheelZoom, useWorkflowRun, useWorkspaceState, valueAt, viewOf, viewsOf, widthsOf, withBase, wordAt, wordId, zoomAt, zoomToBox };
25780
+ // src/components/partial-date-field.tsx
25781
+ const PARTIAL_DATE_RE = /^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/;
25782
+ /** Parse and validate a partial ISO date (`YYYY`, `YYYY-MM`, or `YYYY-MM-DD`), checking calendar month and day limits. */
25783
+ function parsePartialDate(raw, circa = false) {
25784
+ const trimmed = raw.trim();
25785
+ if (!trimmed) return {
25786
+ ok: true,
25787
+ value: null
25788
+ };
25789
+ const m = PARTIAL_DATE_RE.exec(trimmed);
25790
+ if (!m) return {
25791
+ ok: false,
25792
+ error: "Use YYYY, YYYY-MM or YYYY-MM-DD (for example 1985 or 1985-06-15)."
25793
+ };
25794
+ const year = Number(m[1]);
25795
+ if (year < 1 || year > 9999) return {
25796
+ ok: false,
25797
+ error: "Enter a four-digit year between 0001 and 9999."
25798
+ };
25799
+ let inferred = "year";
25800
+ if (m[2] !== void 0) {
25801
+ const month = Number(m[2]);
25802
+ if (month < 1 || month > 12) return {
25803
+ ok: false,
25804
+ error: "Month must be between 01 and 12."
25805
+ };
25806
+ inferred = "month";
25807
+ if (m[3] !== void 0) {
25808
+ const day = Number(m[3]);
25809
+ const check = new Date(Date.UTC(year, month - 1, day));
25810
+ if (check.getUTCFullYear() !== year || check.getUTCMonth() !== month - 1 || check.getUTCDate() !== day) return {
25811
+ ok: false,
25812
+ error: `${trimmed} is not a valid calendar date.`
25813
+ };
25814
+ inferred = "day";
25815
+ }
25816
+ }
25817
+ return {
25818
+ ok: true,
25819
+ value: {
25820
+ date: trimmed,
25821
+ precision: circa ? "circa" : inferred
25822
+ }
25823
+ };
25824
+ }
25825
+ /** Format a partial date for display (prefixes `circa` dates with `c. `). */
25826
+ function formatPartialDate(value) {
25827
+ if (!value) return "";
25828
+ return value.precision === "circa" ? `c. ${value.date}` : value.date;
25829
+ }
25830
+ /** Input for an uncertain or partial ISO date (`YYYY`, `YYYY-MM`, `YYYY-MM-DD`) with an optional approximate toggle. Wrap in `Field`. */
25831
+ function PartialDateField({ value, onChange, placeholder = "YYYY, YYYY-MM or YYYY-MM-DD", allowCirca = true, circaLabel = "Approximate", disabled = false, className }) {
25832
+ const { report } = useFieldControl();
25833
+ const [draft, setDraft] = React.useState(value?.date ?? "");
25834
+ const [circa, setCirca] = React.useState(value?.precision === "circa");
25835
+ React.useEffect(() => {
25836
+ setDraft(value?.date ?? "");
25837
+ setCirca(value?.precision === "circa");
25838
+ report(void 0);
25839
+ }, [
25840
+ value?.date,
25841
+ value?.precision,
25842
+ report
25843
+ ]);
25844
+ const commit = (nextDraft, nextCirca, showError) => {
25845
+ const parsed = parsePartialDate(nextDraft, allowCirca && nextCirca);
25846
+ if (parsed.ok) {
25847
+ report(void 0);
25848
+ onChange(parsed.value);
25849
+ } else if (showError) report(parsed.error);
25850
+ };
25851
+ return /* @__PURE__ */ jsxs("div", {
25852
+ className: cn("flex flex-wrap items-center gap-3", className),
25853
+ children: [/* @__PURE__ */ jsx(Input, {
25854
+ value: draft,
25855
+ disabled,
25856
+ placeholder,
25857
+ inputMode: "numeric",
25858
+ className: "min-w-44 flex-1 tabular-nums",
25859
+ onChange: (e) => {
25860
+ const next = e.target.value;
25861
+ setDraft(next);
25862
+ commit(next, circa, false);
25863
+ },
25864
+ onBlur: () => commit(draft, circa, true)
25865
+ }), allowCirca && /* @__PURE__ */ jsx(Checkbox, {
25866
+ label: circaLabel,
25867
+ checked: circa,
25868
+ disabled,
25869
+ onCheckedChange: (checked) => {
25870
+ setCirca(checked);
25871
+ commit(draft, checked, Boolean(draft.trim()));
25872
+ }
25873
+ })]
25874
+ });
25875
+ }
25876
+
25877
+ export { ActiveList, Alert, AlertDialog, AppShell, AsyncButton, BRUSHES, Balance, BookViewer, BoxList, BoxOverlay, BoxedPicture, Breadcrumb, BulkBar, Button, ButtonLink, ByteView, CLOCK_FACE_STYLES, CLOCK_STYLES, COINS, COLOR_SCHEME_STORAGE_KEY, Checkbox, ChoiceGrid, ChoiceGridSkeleton, ChoiceGroup, ClipsProvider, Clock, ClockFace, ColorField, ColorSchemeChoice, CommandLegend, CommandMenu, Compare, CompareAudio, CompareGrid, CompareText, CompareVideo, CompareVideoGrid, Composer, CompositionBar, Concealed, Console, ContextMenu, Conversation, CursorScope, DEFAULT_PALETTE, DEFAULT_TOLERANCE, DIGITAL_CLOCK_STYLES, DataTable, DataView$1 as DataView, Density, Dialog, DigitalClock, Disclosure, Done, DragSource, DrawingLayer, DrawingToolbar, EditListPlayer, EmptyState, EventLog, FACINGS, FIT, FRACTION_OUTLINES, Field, FileButton, FileDropOverlay, FileDropZone, FileOutcomes, FillLevel, FilmStrip, FolderPicker, FractionShape, FullscreenFrame, Glimpse, HttpError, INK_COLOURS, IconButton, InfiniteList, Input, InputLevel, Inspector, InspectorSection, JobStatus, JobsTable, JsonView, KeysLegend, LEVEL_FLOOR_DB, LengthBar, Lightbox, LineChart, LineChartGroup, LinkCard, LinkCardList, ListeningLevel, LoadError, LoadMore, MAX_SCALE, MAX_SIDE, MIN_SCALE, MISSING, Mark, MarkSummary, MarkableText, MediaContents, MediaGroup, MediaPlayer, MediaStage, Menu, Meter, Metric, MetricStrip, MicrophoneContext, MicrophoneError, MissingFile, Money, NBSP, NOTES, NativeSelect, NumberField, OutboxStatus, PALETTE_STORAGE_KEY, PageHeader, PairJudge, PairVote, PaletteChoice, Pane, PartialDateField, PauseButton, PixelImage, PlaceBoard, PlayWindowButton, PlayerNotice, Popover, PropertyList, PropertyRow, RangeSlider, RateChoice, ReadAlong, RegionEditor, RichText, RowAction, SOLID_SHAPES, SPEECH_RATES, STRATA_DRAG_TYPE, SaveStatus, SayAgain, SayPicture, ScheduleTable, SecretField, SeekBar, SelectableGrid, SelectableGridSkeleton, SequenceTimeline, SetClock, ShortcutEditor, SideNav, Skeleton, Slider, Solid, SortableList, SpanActions, SpanStrip, Split, StageGuides, StaleNotice, Status, StrataQueryProvider, StrataToastRegion, Switch, SystemPanel, TableSkeleton, Tabs, TakeLevel, TextLink, Textarea, ThemeProvider, Thumbnail, ThumbnailSkeleton, TileGrid, TileGridSkeleton, TimeReadout, Timeline, TimelinePlayer, TimelineZoomControls, Toggle, ToggleGroup, Toolbar, ToolbarSeparator, Tooltip, TranscriptView, Transport, Tree, TurnArrow, UndoBar, ViewOptions, ViewportFrame, VirtualList, VolumeControl, Waveform, WorkflowSteps, WorkflowSummary, Workspace, WorkspaceBar, actualPixelsScale, ancestorsOf, apiPage, appBase, applyOp, boxViewport, browserMicrophone, buttonVariants, canFullscreen, canPlayClips, canSay, canSpeak, checkKey, clampToRoom, clampViewport, clipsQueryKey, clockParts, clockWords, cn, coinOutline, colorSchemeScript, commandShortcut, continues, countMarks, createApi, createFormat, createOutbox, createQueryClient, createReserve, createSegmenter, createTypedApi, crossedThreshold, currentItem, currentOf, curvePoints, dayPart, describeActionError, describeHttpError, describeRegion, describeWorkflowSummary, detectPlatform, diffWords, differences, digitalTime, diskThresholds, drawRect, drawingToSvg, ease, editTimeOf, editTimes, emptyDrawing, encodeWav, errorPayload, explainMicrophoneError, feedbackMarker, fetchJson, fieldErrorsOf, fillWords, filterMarkup, findPage, fitPoints, fitRect, followAim, format, formatChord, formatPartialDate, fractionParts, fractionWords, frameAt, gainToVolume, geo, gridPoints, gutterOf, hitsStroke, hourAt, inkMatch, inputLevelThresholds, invertOp, isDigitalStyle, isDoubtful, isRefusal, isReservedChord, isSpeaking, isTaskRunning, isTypingTarget, isWorkflowRunning, jobProgressText, joinMediaGroup, joinRects, joinSamples, jsonBranchPaths, keyName, labelOf, lerpRect, locateInEdit, logScale, loudnessOf, marksFor, matchEntities, matchGains, matchesAccept, matchesChord, measureLoudness, mediaStatRows, minutesAt, moneyWords, moveGutter, moveMinuteHand, movePoints, moveRect, newStrokeId, nextBreak, noOverlap, normaliseAngle, pageName, paletteScript, palettes, parentOf, parseChord, parseInline, parsePartialDate, parseRichText, parseSort, peakDb, peakGain, peaksFromAudio, phraseAt, phraseDoubtful, phraseOfWordId, pickEvenly, pickVoice, pixelZoom, plainText, pointsBox, rangeBetween, readErrorBody, readPixels, readingOrder, regionShares, regionStyle, replay, resample, resamplePeaks, rescaleDrawing, resizeRect, rgbaToBlob, rmsDb, romanHour, safeHref, sayPosition, serialiseSort, settleCut, simplifyPoints, skipAction, smoothPath, snapToGrid, solidWords, sortRows, speak, speechLevel, splitRect, staleOf, stepId, stepMinuteHand, stepOnGrid, stopSpeaking, strokeAt, strokeBox, strokeShape, summariseWorkflow, textOf, tickLabel, tickStep, ticksBetween, toDate, toLoad, toPeakPair, toast, toastTimeout, transportShortcuts, turnRect, turnWords, turned, turnedSize, typeSteps, useActiveItem, useAsyncAction, useAttachedSource, useAutoRecorder, useAutoSave, useBookUrl, useBoxes, useChoices, useClientWork, useClips, useColorScheme, useCommands, useCountdown, useDifference, useDrawing, useEditList, useExpanded, useFileIntake, useHistory, useHistoryState, useHotkeys, useInView, useInfiniteLoad, useInkMatch, useJob, useJobAction, useLeaveGuard, useLightboxUrl, useLoad, useMediaElement, useMediaSpans, useMediaStats, useMicrophone, useObjectUrl, useOutbox, useOutboxStarted, usePalette, usePlayerWarnings, usePoll, useReadAloud, useRebindableShortcuts, useRecorder, useReserve, useRevealed, useSayOnShow, useSearchParam, useSelection, useSettledStatus, useSharedCursor, useSpeaking, useSpeech, useSystemColorScheme, useSystemInfo, useTimeline, useTimelineZoom, useUndoable, useViewOptions, useViewPointers, useViewport, useWheelZoom, useWorkflowRun, useWorkspaceState, valueAt, viewOf, viewsOf, widthsOf, withBase, wordAt, wordId, zoomAt, zoomToBox };
25774
25878
  //# sourceMappingURL=index.js.map