@mechane-ai/elements 0.57.0 → 0.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { D as e, O as t, T as n, h as r, i, k as a, m as o, t as s, v as c } from "./src-9EJskqB_.js";
2
2
  import { t as l } from "./code-block-BZsY2sh3.js";
3
- import { l as u } from "./src-DFW49IAs.js";
3
+ import { f as u } from "./src-Cw1yrc2P.js";
4
4
  import { t as d } from "./content-link-PnpcnTCx.js";
5
5
  import { n as f, r as p } from "./markdown-VpLw_P9T.js";
6
6
  import { r as m, t as h } from "./src-na2DdkKI.js";
package/dist/catalog.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@mechane-ai/elements",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "recipes": [
5
5
  {
6
6
  "slug": "allocation-report",
@@ -1251,6 +1251,14 @@
1251
1251
  "kind": "value",
1252
1252
  "declaration": "dist/packages/content/src/media-viewer.d.ts"
1253
1253
  },
1254
+ "PlaybackBarProps": {
1255
+ "kind": "type",
1256
+ "declaration": "dist/packages/content/src/playback-bar.d.ts"
1257
+ },
1258
+ "PlaybackBar": {
1259
+ "kind": "value",
1260
+ "declaration": "dist/packages/content/src/playback-bar.d.ts"
1261
+ },
1254
1262
  "StackFrame": {
1255
1263
  "kind": "type",
1256
1264
  "declaration": "dist/packages/content/src/stack-trace.d.ts"
@@ -1263,26 +1271,6 @@
1263
1271
  "kind": "value",
1264
1272
  "declaration": "dist/packages/content/src/stack-trace.d.ts"
1265
1273
  },
1266
- "TraceStatus": {
1267
- "kind": "type",
1268
- "declaration": "dist/packages/content/src/trace.d.ts"
1269
- },
1270
- "TraceRootProps": {
1271
- "kind": "type",
1272
- "declaration": "dist/packages/content/src/trace.d.ts"
1273
- },
1274
- "TraceGroupProps": {
1275
- "kind": "type",
1276
- "declaration": "dist/packages/content/src/trace.d.ts"
1277
- },
1278
- "TraceItemProps": {
1279
- "kind": "type",
1280
- "declaration": "dist/packages/content/src/trace.d.ts"
1281
- },
1282
- "Trace": {
1283
- "kind": "value",
1284
- "declaration": "dist/packages/content/src/trace.d.ts"
1285
- },
1286
1274
  "MatchRange": {
1287
1275
  "kind": "type",
1288
1276
  "declaration": "dist/packages/content/src/text-match.d.ts"
@@ -1318,6 +1306,58 @@
1318
1306
  "TextMatch": {
1319
1307
  "kind": "value",
1320
1308
  "declaration": "dist/packages/content/src/text-match.d.ts"
1309
+ },
1310
+ "TimelineMarker": {
1311
+ "kind": "type",
1312
+ "declaration": "dist/packages/content/src/timeline-scrubber.d.ts"
1313
+ },
1314
+ "TimelineMarkerTone": {
1315
+ "kind": "type",
1316
+ "declaration": "dist/packages/content/src/timeline-scrubber.d.ts"
1317
+ },
1318
+ "TimelineScrubberProps": {
1319
+ "kind": "type",
1320
+ "declaration": "dist/packages/content/src/timeline-scrubber.d.ts"
1321
+ },
1322
+ "TimelineScrubber": {
1323
+ "kind": "value",
1324
+ "declaration": "dist/packages/content/src/timeline-scrubber.d.ts"
1325
+ },
1326
+ "TraceStatus": {
1327
+ "kind": "type",
1328
+ "declaration": "dist/packages/content/src/trace.d.ts"
1329
+ },
1330
+ "TraceRootProps": {
1331
+ "kind": "type",
1332
+ "declaration": "dist/packages/content/src/trace.d.ts"
1333
+ },
1334
+ "TraceGroupProps": {
1335
+ "kind": "type",
1336
+ "declaration": "dist/packages/content/src/trace.d.ts"
1337
+ },
1338
+ "TraceItemProps": {
1339
+ "kind": "type",
1340
+ "declaration": "dist/packages/content/src/trace.d.ts"
1341
+ },
1342
+ "Trace": {
1343
+ "kind": "value",
1344
+ "declaration": "dist/packages/content/src/trace.d.ts"
1345
+ },
1346
+ "ViewportAspectRatio": {
1347
+ "kind": "type",
1348
+ "declaration": "dist/packages/content/src/viewport-frame.d.ts"
1349
+ },
1350
+ "ViewportFrameProps": {
1351
+ "kind": "type",
1352
+ "declaration": "dist/packages/content/src/viewport-frame.d.ts"
1353
+ },
1354
+ "ViewportFrameState": {
1355
+ "kind": "type",
1356
+ "declaration": "dist/packages/content/src/viewport-frame.d.ts"
1357
+ },
1358
+ "ViewportFrame": {
1359
+ "kind": "value",
1360
+ "declaration": "dist/packages/content/src/viewport-frame.d.ts"
1321
1361
  }
1322
1362
  },
1323
1363
  "@mechane-ai/elements/content/link": {
package/dist/content.js CHANGED
@@ -1 +1 @@
1
- export { u as JsonViewer, l as LogViewer, s as MediaViewer, c as MediaViewerPlaceholder, o as StackTrace, t as TextMatch, a as Trace, n as fuzzyScore, r as matchRanges, i as matchSegments } from "./src-DFW49IAs.js";
1
+ export { p as JsonViewer, f as LogViewer, u as MediaViewer, d as MediaViewerPlaceholder, l as PlaybackBar, c as StackTrace, i as TextMatch, r as TimelineScrubber, n as Trace, t as ViewportFrame, a as fuzzyScore, o as matchRanges, s as matchSegments } from "./src-Cw1yrc2P.js";
@@ -7,7 +7,7 @@ import { r as O } from "../figure-format-B8kRZMlo.js";
7
7
  import { n as k } from "../src-na2DdkKI.js";
8
8
  import { a as A, t as j } from "../tree-diagram-BDj4TGXb.js";
9
9
  import { f as M } from "../time-series-CoAtNizi.js";
10
- import { t as N } from "../src-DFW49IAs.js";
10
+ import { i as N } from "../src-Cw1yrc2P.js";
11
11
  import "@stylexjs/stylex";
12
12
  import { useEffect as ee, useState as P } from "react";
13
13
  import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
@@ -4,9 +4,15 @@ export type { LogViewerProps } from './log-viewer.tsx';
4
4
  export { LogViewer } from './log-viewer.tsx';
5
5
  export type { MediaViewerProps } from './media-viewer.tsx';
6
6
  export { MediaViewer, MediaViewerPlaceholder } from './media-viewer.tsx';
7
+ export type { PlaybackBarProps } from './playback-bar.tsx';
8
+ export { PlaybackBar } from './playback-bar.tsx';
7
9
  export type { StackFrame, StackTraceProps } from './stack-trace.tsx';
8
10
  export { StackTrace } from './stack-trace.tsx';
9
- export type { TraceStatus, TraceRootProps, TraceGroupProps, TraceItemProps } from './trace.tsx';
10
- export { Trace } from './trace.tsx';
11
11
  export type { MatchRange, MatchSegment, TextMatchMode, TextMatchProps, TextMatchTone } from './text-match.tsx';
12
12
  export { fuzzyScore, matchRanges, matchSegments, TextMatch } from './text-match.tsx';
13
+ export type { TimelineMarker, TimelineMarkerTone, TimelineScrubberProps } from './timeline-scrubber.tsx';
14
+ export { TimelineScrubber } from './timeline-scrubber.tsx';
15
+ export type { TraceStatus, TraceRootProps, TraceGroupProps, TraceItemProps } from './trace.tsx';
16
+ export { Trace } from './trace.tsx';
17
+ export type { ViewportAspectRatio, ViewportFrameProps, ViewportFrameState } from './viewport-frame.tsx';
18
+ export { ViewportFrame } from './viewport-frame.tsx';
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ControlDensity } from '../../core/src/index.ts';
3
+ export type PlaybackBarProps = {
4
+ readonly isPlaying: boolean;
5
+ readonly onPlayingChange: (isPlaying: boolean) => void;
6
+ readonly onStepBackward?: () => void;
7
+ readonly onStepForward?: () => void;
8
+ readonly speed?: number;
9
+ readonly speeds?: ReadonlyArray<number>;
10
+ readonly onSpeedChange?: (speed: number) => void;
11
+ readonly readout?: string;
12
+ readonly actions?: ReactNode;
13
+ readonly density?: ControlDensity;
14
+ readonly isDisabled?: boolean;
15
+ readonly playLabel?: string;
16
+ readonly pauseLabel?: string;
17
+ };
18
+ /**
19
+ * Horizontal transport control bar composing play/pause, optional step buttons, a speed selector, a tabular readout,
20
+ * and trailing actions. Leaves playback clocks, frame advancement, and media state to the consuming application.
21
+ */
22
+ export declare function PlaybackBar({ isPlaying, onPlayingChange, onStepBackward, onStepForward, speed, speeds, onSpeedChange, readout, actions, density, isDisabled, playLabel, pauseLabel, }: PlaybackBarProps): ReactNode;
@@ -0,0 +1,28 @@
1
+ import type { ReactNode } from 'react';
2
+ export type TimelineMarkerTone = 'neutral' | 'positive' | 'warning' | 'negative' | 'accent';
3
+ export type TimelineMarker = {
4
+ readonly id: string;
5
+ readonly position: number;
6
+ readonly tone?: TimelineMarkerTone;
7
+ readonly label: string;
8
+ };
9
+ export type TimelineScrubberProps = {
10
+ readonly value: number;
11
+ readonly max: number;
12
+ readonly min?: number;
13
+ readonly step?: number;
14
+ readonly onValueChange: (value: number) => void;
15
+ readonly onScrubStart?: () => void;
16
+ readonly onScrubEnd?: () => void;
17
+ readonly markers?: ReadonlyArray<TimelineMarker>;
18
+ readonly onMarkerSelect?: (marker: TimelineMarker) => void;
19
+ readonly formatValue?: (value: number) => string;
20
+ readonly isDisabled?: boolean;
21
+ /** Accessible name applied to the scrubber slider. */
22
+ readonly label: string;
23
+ };
24
+ /**
25
+ * Accessible horizontal scrub track for media or simulation timelines with optional clickable event markers. Supports
26
+ * keyboard stepping, pointer capture dragging, and marker jump selection while leaving playback timing to the caller.
27
+ */
28
+ export declare function TimelineScrubber({ value, max, min, step, onValueChange, onScrubStart, onScrubEnd, markers, onMarkerSelect, formatValue, isDisabled, label, }: TimelineScrubberProps): ReactNode;
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from 'react';
2
+ export type ViewportAspectRatio = '16/9' | '16/10' | '4/3' | 'fill';
3
+ export type ViewportFrameState = 'pending' | 'ready' | 'failed';
4
+ export type ViewportFrameProps = {
5
+ /** Frame aspect ratio, or `'fill'` to occupy the parent container's height. Defaults to `'16/9'`. */
6
+ readonly aspectRatio?: ViewportAspectRatio;
7
+ /** Leading header content, such as a title or status indicator. */
8
+ readonly headerStart?: ReactNode;
9
+ /** Trailing header content, such as view actions or controls. */
10
+ readonly headerEnd?: ReactNode;
11
+ /** Optional inline notice bar rendered below the header and above the stage. */
12
+ readonly notice?: ReactNode;
13
+ /** Readiness of the stage content. Defaults to `'ready'`. */
14
+ readonly state?: ViewportFrameState;
15
+ /** Centered overlay shown over the stage while `state` is `'pending'` or `'failed'`. */
16
+ readonly placeholder?: ReactNode;
17
+ /** Media, canvas, or embedded frame mounted inside the contained `inset: 0` stage slot. */
18
+ readonly children: ReactNode;
19
+ /** Accessible name applied to the stage region. */
20
+ readonly label?: string;
21
+ };
22
+ /**
23
+ * Framed container for canvas, iframe, or custom media stages with an optional header bar, inline notice strip, and
24
+ * pending or failed overlay. Isolates stage geometry inside an `inset: 0` wrapper so embedded content cannot expand
25
+ * surrounding CSS Grid or flex tracks.
26
+ */
27
+ export declare function ViewportFrame({ aspectRatio, headerStart, headerEnd, notice, state, placeholder, children, label, }: ViewportFrameProps): ReactNode;