@demlik/tea 0.6.0 → 0.8.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/agent/index.d.ts +6 -5
- package/dist/agent/index.js +10 -10
- package/dist/authed-call/index.d.ts +2 -2
- package/dist/authed-call/index.js +7 -7
- package/dist/await-terminal/index.d.ts +3 -2
- package/dist/await-terminal/index.js +2 -2
- package/dist/batch-window/index.d.ts +4 -3
- package/dist/batch-window/index.js +3 -3
- package/dist/cache/index.d.ts +2 -2
- package/dist/cache/index.js +4 -4
- package/dist/chart/index.d.ts +217 -0
- package/dist/chart/index.js +16 -0
- package/dist/chart/index.js.map +1 -0
- package/dist/chart/inspect/index.d.ts +85 -0
- package/dist/chart/inspect/index.js +5 -0
- package/dist/chart/inspect/index.js.map +1 -0
- package/dist/chart/inspect/react.d.ts +112 -0
- package/dist/chart/inspect/react.js +11 -0
- package/dist/chart/inspect/react.js.map +1 -0
- package/dist/chart/inspect/styles.css +286 -0
- package/dist/chart/lane/index.d.ts +361 -0
- package/dist/chart/lane/index.js +9 -0
- package/dist/chart/lane/index.js.map +1 -0
- package/dist/chart/lane/react.d.ts +83 -0
- package/dist/chart/lane/react.js +559 -0
- package/dist/chart/lane/react.js.map +1 -0
- package/dist/chart/lane/styles.css +498 -0
- package/dist/chart/report/index.d.ts +116 -0
- package/dist/chart/report/index.js +32 -0
- package/dist/chart/report/index.js.map +1 -0
- package/dist/{chunk-2UGTDYOK.js → chunk-3JU6657S.js} +3 -3
- package/dist/{chunk-2UGTDYOK.js.map → chunk-3JU6657S.js.map} +1 -1
- package/dist/{chunk-AZ3NHUPD.js → chunk-4KTWLPL5.js} +3 -3
- package/dist/{chunk-AZ3NHUPD.js.map → chunk-4KTWLPL5.js.map} +1 -1
- package/dist/{chunk-ZH454CR5.js → chunk-5EHLEUTL.js} +24 -4
- package/dist/chunk-5EHLEUTL.js.map +1 -0
- package/dist/chunk-5KJKJOFC.js +758 -0
- package/dist/chunk-5KJKJOFC.js.map +1 -0
- package/dist/{chunk-WF46FABO.js → chunk-7SVIRMC6.js} +3 -3
- package/dist/{chunk-WF46FABO.js.map → chunk-7SVIRMC6.js.map} +1 -1
- package/dist/{chunk-XMHZ44QC.js → chunk-7V4EVLZA.js} +4 -4
- package/dist/{chunk-XMHZ44QC.js.map → chunk-7V4EVLZA.js.map} +1 -1
- package/dist/{chunk-IVHQCVFX.js → chunk-A56OR5RF.js} +3 -3
- package/dist/{chunk-IVHQCVFX.js.map → chunk-A56OR5RF.js.map} +1 -1
- package/dist/{chunk-O7ED34JH.js → chunk-B5VXOFMZ.js} +47 -15
- package/dist/chunk-B5VXOFMZ.js.map +1 -0
- package/dist/chunk-E6GEDSF4.js +307 -0
- package/dist/chunk-E6GEDSF4.js.map +1 -0
- package/dist/{chunk-EC6FO42Q.js → chunk-EUF7XOEE.js} +6 -6
- package/dist/{chunk-EC6FO42Q.js.map → chunk-EUF7XOEE.js.map} +1 -1
- package/dist/{chunk-XOAP3LOT.js → chunk-I5OV65MS.js} +3 -3
- package/dist/{chunk-XOAP3LOT.js.map → chunk-I5OV65MS.js.map} +1 -1
- package/dist/chunk-JER5O7PQ.js +416 -0
- package/dist/chunk-JER5O7PQ.js.map +1 -0
- package/dist/{chunk-ASX7PL2K.js → chunk-JGVL3WPL.js} +3 -3
- package/dist/{chunk-ASX7PL2K.js.map → chunk-JGVL3WPL.js.map} +1 -1
- package/dist/{chunk-S6Y3RNX4.js → chunk-JP5D6GSL.js} +4 -4
- package/dist/{chunk-S6Y3RNX4.js.map → chunk-JP5D6GSL.js.map} +1 -1
- package/dist/{chunk-ERYY5P6W.js → chunk-ND3DH6KM.js} +3 -3
- package/dist/{chunk-ERYY5P6W.js.map → chunk-ND3DH6KM.js.map} +1 -1
- package/dist/{chunk-A7USKARI.js → chunk-SUST46KO.js} +3 -3
- package/dist/{chunk-A7USKARI.js.map → chunk-SUST46KO.js.map} +1 -1
- package/dist/{chunk-2KBEIGYP.js → chunk-TP5UPGLY.js} +3 -3
- package/dist/{chunk-2KBEIGYP.js.map → chunk-TP5UPGLY.js.map} +1 -1
- package/dist/chunk-UOC2PL46.js +13 -0
- package/dist/chunk-UOC2PL46.js.map +1 -0
- package/dist/{chunk-66S2KEQQ.js → chunk-WLGO64WC.js} +4 -4
- package/dist/{chunk-66S2KEQQ.js.map → chunk-WLGO64WC.js.map} +1 -1
- package/dist/chunk-WRAA7GVZ.js +209 -0
- package/dist/chunk-WRAA7GVZ.js.map +1 -0
- package/dist/chunk-ZCL7SCBK.js +685 -0
- package/dist/chunk-ZCL7SCBK.js.map +1 -0
- package/dist/chunk-ZD6PNZBK.js +457 -0
- package/dist/chunk-ZD6PNZBK.js.map +1 -0
- package/dist/{chunk-UV7VCTNC.js → chunk-ZF6WDK2D.js} +7 -7
- package/dist/{chunk-UV7VCTNC.js.map → chunk-ZF6WDK2D.js.map} +1 -1
- package/dist/{core-CUN5HDKL.d.ts → core-Bjc0bS8j.d.ts} +22 -1
- package/dist/deadline/index.d.ts +2 -2
- package/dist/deadline/index.js +3 -3
- package/dist/devtools/index.js +2 -207
- package/dist/devtools/index.js.map +1 -1
- package/dist/do/index.d.ts +7 -6
- package/dist/do/index.js +10 -10
- package/dist/{durable-effects-CXMOi-sp.d.ts → durable-effects-D8SqU_if.d.ts} +1 -1
- package/dist/extension/index.d.ts +3 -2
- package/dist/extension/index.js +3 -3
- package/dist/extension/react.js +3 -3
- package/dist/extension/subs/index.d.ts +2 -2
- package/dist/fan-out/index.d.ts +3 -2
- package/dist/fold-Blbhru48.d.ts +435 -0
- package/dist/graph-CcjWZVrd.d.ts +923 -0
- package/dist/idempotent-intake/index.d.ts +3 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +2 -2
- package/dist/llm-call/index.d.ts +2 -2
- package/dist/llm-call/index.js +7 -7
- package/dist/{machine-CoWpvp8x.d.ts → machine-0OmPvsy_.d.ts} +1 -1
- package/dist/machine-viz/index.d.ts +19 -2
- package/dist/machine-viz/index.js +4 -10
- package/dist/machine-viz/index.js.map +1 -1
- package/dist/mem/index.d.ts +3 -2
- package/dist/monitored-run/index.d.ts +4 -3
- package/dist/monitored-run/index.js +5 -5
- package/dist/node/index.d.ts +3 -2
- package/dist/paginated-walk/index.d.ts +2 -2
- package/dist/paginated-walk/index.js +7 -7
- package/dist/parity/index.d.ts +3 -2
- package/dist/parity/index.js +3 -3
- package/dist/pbt/arbitraries/index.d.ts +1 -1
- package/dist/pbt/index.d.ts +1 -1
- package/dist/pbt/index.js +3 -3
- package/dist/pbt/runners/index.d.ts +1 -1
- package/dist/pbt/runners/index.js +3 -3
- package/dist/poller/index.d.ts +28 -7
- package/dist/poller/index.js +3 -3
- package/dist/poller/index.js.map +1 -1
- package/dist/prediction/index.d.ts +1 -1
- package/dist/prediction/index.js +2 -2
- package/dist/pure/index.d.ts +1 -1
- package/dist/pure/index.js +2 -2
- package/dist/react/index.d.ts +3 -2
- package/dist/react/index.js +2 -2
- package/dist/reconciler/index.d.ts +2 -2
- package/dist/reconciler/index.js +7 -7
- package/dist/recorder/index.d.ts +3 -2
- package/dist/reducer-BqyoVyBG.d.ts +447 -0
- package/dist/resilient-call/index.d.ts +2 -2
- package/dist/resilient-call/index.js +6 -6
- package/dist/run-BVeqJDBF.d.ts +713 -0
- package/dist/{runtime-types-BD3ZFfdw.d.ts → runtime-types-Bxc637bp.d.ts} +53 -2
- package/dist/saga/index.d.ts +3 -2
- package/dist/samples-DCt6nF8H.d.ts +59 -0
- package/dist/snapshot/index.d.ts +1 -1
- package/dist/snapshot/index.js +3 -3
- package/dist/subs/index.d.ts +4 -3
- package/dist/subs/index.js +3 -3
- package/dist/testing/index.d.ts +3 -2
- package/dist/testing/index.js +2 -2
- package/dist/throttled-input/index.d.ts +2 -2
- package/dist/throttled-input/index.js +6 -6
- package/dist/token-refresh/index.d.ts +1 -1
- package/dist/token-refresh/index.js +3 -3
- package/dist/trace-replay/index.d.ts +3 -2
- package/dist/trace-replay/index.js +3 -3
- package/dist/{types-CjAkI83U.d.ts → types-D7u9DkH7.d.ts} +1 -1
- package/dist/with-deadline/index.d.ts +1 -1
- package/dist/with-deadline/index.js +2 -2
- package/dist/with-resilience/index.d.ts +2 -2
- package/dist/with-resilience/index.js +6 -6
- package/dist/with-telemetry/index.d.ts +1 -1
- package/dist/with-telemetry/index.js +2 -2
- package/dist/work-queue/adapter.d.ts +3 -2
- package/dist/work-queue/index.d.ts +3 -2
- package/dist/work-queue/ops.d.ts +3 -2
- package/dist/workflow/index.d.ts +3 -3
- package/package.json +31 -1
- package/dist/chunk-O7ED34JH.js.map +0 -1
- package/dist/chunk-ZH454CR5.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { C as Cmd, S as Sub, M as Machine } from '../../core-Bjc0bS8j.js';
|
|
2
|
+
export { A as AnyCell, a as AnyGuard, C as ChartDescription, b as ChartEdge, c as ChartEventInfo, d as ChartRefusal, e as ChartStateInfo, E as EdgeCore, f as EdgeKind, g as EventPreview, G as GuardPreview, h as GuardUnknown, I as InspectOptions, i as InspectParts, R as ReducerChartDescription, j as ReducerEdge, k as ReducerEventInfo, l as ReducerEventPreview, m as RefusalReason, n as ResolvedBy, U as Unanswerable, o as describeChart, p as describeReducerChart, q as edgeAt, r as explainRefusal, s as inspectReducerState, t as inspectState, u as inspectStateSummary, v as previewEvent, w as previewReducerEvent, x as reducerEdgeAt, y as refusalAtState, z as stateInfo } from '../../reducer-BqyoVyBG.js';
|
|
3
|
+
export { R as RtSamples, S as SamplePayload, a as Samples, s as sampleMsg } from '../../samples-DCt6nF8H.js';
|
|
4
|
+
import '../../graph-CcjWZVrd.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The cmds ONE step emitted, tagged with the msg that caused them.
|
|
8
|
+
*
|
|
9
|
+
* `step` is `0` for `init` and `n` for the nth recorded msg, which is the same
|
|
10
|
+
* index the scrubber's cursor uses — so a UI showing step `n` asks for
|
|
11
|
+
* `capture.steps[n]` and gets the effects of the transition it is displaying.
|
|
12
|
+
*/
|
|
13
|
+
interface CapturedStep<M extends {
|
|
14
|
+
type: string;
|
|
15
|
+
}, K extends Cmd> {
|
|
16
|
+
/** `0` = `init`; `1..n` = the nth recorded msg. */
|
|
17
|
+
readonly step: number;
|
|
18
|
+
/**
|
|
19
|
+
* The msg that caused these cmds. `null` at step `0` — `init` has no cause,
|
|
20
|
+
* and pinning its cmds on the first msg would be a lie about who fired them.
|
|
21
|
+
*/
|
|
22
|
+
readonly by: M | null;
|
|
23
|
+
/** What ACTUALLY fired, in emission order. Cell-built cmds included. */
|
|
24
|
+
readonly cmds: readonly K[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Every step of a recorded run, with the cmds each one actually emitted.
|
|
28
|
+
*
|
|
29
|
+
* `stoppedAt` is the honest degradation: a fold that throws (a chart compiled
|
|
30
|
+
* against parts that are not there, a cell that blew up on a state the current
|
|
31
|
+
* code no longer produces) truncates the capture at that step and says so,
|
|
32
|
+
* rather than reporting a short list as if it were complete.
|
|
33
|
+
*/
|
|
34
|
+
interface CmdCapture<M extends {
|
|
35
|
+
type: string;
|
|
36
|
+
}, K extends Cmd> {
|
|
37
|
+
readonly steps: readonly CapturedStep<M, K>[];
|
|
38
|
+
/** Every captured cmd, flattened in fire order. */
|
|
39
|
+
readonly cmds: readonly K[];
|
|
40
|
+
/** Present iff the fold threw before the trace ran out. */
|
|
41
|
+
readonly stoppedAt?: {
|
|
42
|
+
readonly step: number;
|
|
43
|
+
readonly error: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** The recorded input a capture folds — `Trace`'s two input halves. */
|
|
47
|
+
interface CaptureInput<S, M extends {
|
|
48
|
+
type: string;
|
|
49
|
+
}, Ctx> {
|
|
50
|
+
readonly msgs: readonly M[];
|
|
51
|
+
readonly ctx: Ctx;
|
|
52
|
+
/** The rehydrated state the run booted from, when it booted from one. */
|
|
53
|
+
readonly loaded?: S | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Fold `input` through `machine` and report the cmds EVERY step emitted.
|
|
57
|
+
*
|
|
58
|
+
* This is the after-the-fact counterpart to the declarative preview: where
|
|
59
|
+
* `EventPreview.cmds` says *what would fire if this event were dispatched now*,
|
|
60
|
+
* this says *what did fire, in order, and which msg caused it*. Both are useful
|
|
61
|
+
* and they are not the same question — a cell edge declares no cmds and emits
|
|
62
|
+
* plenty, and a guarded edge declares two arms and takes one.
|
|
63
|
+
*/
|
|
64
|
+
declare function captureCmds<S, M extends {
|
|
65
|
+
type: string;
|
|
66
|
+
}, K extends Cmd, U extends Sub, Ctx>(machine: Machine<S, M, K, U, Ctx>, input: CaptureInput<S, M, Ctx>): CmdCapture<M, K>;
|
|
67
|
+
/**
|
|
68
|
+
* The step at cursor `n`, or `undefined` when the capture does not reach it
|
|
69
|
+
* (an out-of-range cursor, or a fold that stopped early).
|
|
70
|
+
*/
|
|
71
|
+
declare function firedAt<M extends {
|
|
72
|
+
type: string;
|
|
73
|
+
}, K extends Cmd>(capture: CmdCapture<M, K>, step: number): CapturedStep<M, K> | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The captured cmds grouped by cmd NAME, in first-fire order — the roll-up a
|
|
76
|
+
* "which effects did this run actually perform" panel wants.
|
|
77
|
+
*/
|
|
78
|
+
declare function firedCounts<M extends {
|
|
79
|
+
type: string;
|
|
80
|
+
}, K extends Cmd>(capture: CmdCapture<M, K>): readonly {
|
|
81
|
+
readonly type: string;
|
|
82
|
+
readonly count: number;
|
|
83
|
+
}[];
|
|
84
|
+
|
|
85
|
+
export { type CaptureInput, type CapturedStep, type CmdCapture, captureCmds, firedAt, firedCounts };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { captureCmds, describeChart, describeReducerChart, edgeAt, explainRefusal, firedAt, firedCounts, inspectReducerState, inspectState, inspectStateSummary, previewEvent, previewReducerEvent, reducerEdgeAt, refusalAtState, sampleMsg, stateInfo } from '../../chunk-ZD6PNZBK.js';
|
|
2
|
+
import '../../chunk-5EHLEUTL.js';
|
|
3
|
+
import '../../chunk-B5VXOFMZ.js';
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { R as Runtime } from '../../runtime-types-Bxc637bp.js';
|
|
3
|
+
import { C as Cmd, M as Machine, S as Sub } from '../../core-Bjc0bS8j.js';
|
|
4
|
+
import { Recorder } from '../../recorder/index.js';
|
|
5
|
+
import { Parts, RParts } from '../index.js';
|
|
6
|
+
import { C as Chart, S as StateOf, M as MsgOf, a as CmdOf, I as InitialData, R as ReducerChart, b as RStateOf } from '../../graph-CcjWZVrd.js';
|
|
7
|
+
import { a as Samples } from '../../samples-DCt6nF8H.js';
|
|
8
|
+
import 'better-result';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Everything `<ChartInspector>` needs. Four fields, and every one of them is a
|
|
12
|
+
* fact the chart genuinely does not carry — see the module doc. Anything the
|
|
13
|
+
* chart DOES carry (events, states, phases, guards, cmds, refusals) has no prop
|
|
14
|
+
* here by design: a prop that restated one would be the fact said twice.
|
|
15
|
+
*/
|
|
16
|
+
interface ChartInspectorProps<C, S extends {
|
|
17
|
+
type: string;
|
|
18
|
+
}, M extends {
|
|
19
|
+
type: string;
|
|
20
|
+
}, Ctx> {
|
|
21
|
+
/** The chart. Everything the UI draws is read off this value. */
|
|
22
|
+
readonly chart: C;
|
|
23
|
+
/** The parts bag `compile` demands — assign, plus guards/cmds/cells if used. */
|
|
24
|
+
readonly parts: Parts<C, S, M>;
|
|
25
|
+
/** The entry state's data. The chart names the state; you supply its ctx. */
|
|
26
|
+
readonly boot: () => InitialData<C, S>;
|
|
27
|
+
/** One payload per event that declares one. Typed by the chart. */
|
|
28
|
+
readonly samples?: Samples<C>;
|
|
29
|
+
/** The runtime ctx. Omit for a machine that reads nothing from one. */
|
|
30
|
+
readonly ctx?: Ctx;
|
|
31
|
+
/** Diagram title. Cosmetic — defaults to no title. */
|
|
32
|
+
readonly title?: string;
|
|
33
|
+
/** Diagram direction. Default `"TB"`. */
|
|
34
|
+
readonly direction?: "TB" | "LR";
|
|
35
|
+
/** Appended to the container's class list. */
|
|
36
|
+
readonly className?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Everything `<ReducerChartInspector>` needs — the same four undecidable facts,
|
|
40
|
+
* over the form that has no phase dimension.
|
|
41
|
+
*
|
|
42
|
+
* There is no `direction` prop, and its absence is the honest kind: the reducer
|
|
43
|
+
* drawing has one `any` node with every edge leaving it (that is what having no
|
|
44
|
+
* phase dimension MEANS), so a layout knob would be a knob over nothing.
|
|
45
|
+
*/
|
|
46
|
+
interface ReducerChartInspectorProps<C, S extends {
|
|
47
|
+
type: string;
|
|
48
|
+
}, M extends {
|
|
49
|
+
type: string;
|
|
50
|
+
}, Ctx> {
|
|
51
|
+
/** The reducer chart. Everything the UI draws is read off this value. */
|
|
52
|
+
readonly chart: C;
|
|
53
|
+
/** The parts bag `compileReducer` demands. */
|
|
54
|
+
readonly parts: RParts<C, S, M>;
|
|
55
|
+
/** The entry state's data — for this form, the whole state minus its tag. */
|
|
56
|
+
readonly boot: () => Omit<RStateOf<C>, "type">;
|
|
57
|
+
/** One payload per event that declares one. Typed by the chart. */
|
|
58
|
+
readonly samples?: Samples<C>;
|
|
59
|
+
/** The runtime ctx. Omit for a machine that reads nothing from one. */
|
|
60
|
+
readonly ctx?: Ctx;
|
|
61
|
+
/** Panel title. Cosmetic — defaults to no title. */
|
|
62
|
+
readonly title?: string;
|
|
63
|
+
/** Appended to the container's class list. */
|
|
64
|
+
readonly className?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Own a runtime for the component's lifetime (built with `run`, stopped on
|
|
68
|
+
* unmount or reset) so the recorder has something to attach to — `useMachine`
|
|
69
|
+
* hides the runtime, and the recorder needs it. The booted `Runtime` is
|
|
70
|
+
* consumed with `useRuntime`'s contract: the component that owns the lifecycle
|
|
71
|
+
* stops it.
|
|
72
|
+
*
|
|
73
|
+
* Shared by both chart forms because none of it is form-specific: a compiled
|
|
74
|
+
* `Transitions` and a compiled `Reducer` are both just a `Machine["update"]`.
|
|
75
|
+
*
|
|
76
|
+
* EXPORTED for the one other component with the same lifecycle to own:
|
|
77
|
+
* `@demlik/tea/chart/lane/react`'s live lane, whose `update` is `runLane`'s.
|
|
78
|
+
* A lane is not a chart form, but "own a runtime for the component's lifetime,
|
|
79
|
+
* record it, and stop it on unmount" is not a fact about charts either — and a
|
|
80
|
+
* second copy of it is a second place for the recorder's stop to be forgotten.
|
|
81
|
+
*/
|
|
82
|
+
declare function useInspectorRuntime<S, M extends {
|
|
83
|
+
type: string;
|
|
84
|
+
}, K extends Cmd, Ctx>(machine: Machine<S, M, K, Sub<never>, Ctx>, ctx: Ctx, epoch: number): {
|
|
85
|
+
readonly rt: Runtime<S, M> | null;
|
|
86
|
+
readonly rec: Recorder<S, M>;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* The self-building debugger for any GRID-form chart.
|
|
90
|
+
*/
|
|
91
|
+
declare function ChartInspector<const C extends Chart<C>, S extends {
|
|
92
|
+
type: string;
|
|
93
|
+
} = StateOf<C>, M extends {
|
|
94
|
+
type: string;
|
|
95
|
+
} = MsgOf<C>, K extends Cmd = CmdOf<C>, Ctx = Record<never, never>>(props: ChartInspectorProps<C, S, M, Ctx>): react_jsx_runtime.JSX.Element;
|
|
96
|
+
/**
|
|
97
|
+
* The same debugger for a REDUCER-form chart — the panels that apply, and the
|
|
98
|
+
* ones that do not left out with the reason on screen.
|
|
99
|
+
*
|
|
100
|
+
* What is missing here is missing because the form does not have it: no phase
|
|
101
|
+
* on the header, no refusal on any control (this form cannot refuse an event),
|
|
102
|
+
* and no highlighted node in the drawing (every edge leaves the one `any`
|
|
103
|
+
* node). The "not available in this form" panel names each one, so the
|
|
104
|
+
* omission reads as a property of the chart rather than a hole in the tool.
|
|
105
|
+
*/
|
|
106
|
+
declare function ReducerChartInspector<const C extends ReducerChart<C>, S extends {
|
|
107
|
+
type: string;
|
|
108
|
+
} = RStateOf<C>, M extends {
|
|
109
|
+
type: string;
|
|
110
|
+
} = MsgOf<C>, K extends Cmd = CmdOf<C>, Ctx = Record<never, never>>(props: ReducerChartInspectorProps<C, S, M, Ctx>): react_jsx_runtime.JSX.Element;
|
|
111
|
+
|
|
112
|
+
export { ChartInspector, type ChartInspectorProps, ReducerChartInspector, type ReducerChartInspectorProps, useInspectorRuntime };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ChartInspector, ReducerChartInspector, useInspectorRuntime } from '../../chunk-JER5O7PQ.js';
|
|
2
|
+
import '../../chunk-ZD6PNZBK.js';
|
|
3
|
+
import '../../chunk-E6GEDSF4.js';
|
|
4
|
+
import '../../chunk-UOC2PL46.js';
|
|
5
|
+
import '../../chunk-MUUROGIH.js';
|
|
6
|
+
import '../../chunk-WRAA7GVZ.js';
|
|
7
|
+
import '../../chunk-EWJP3YYP.js';
|
|
8
|
+
import '../../chunk-5EHLEUTL.js';
|
|
9
|
+
import '../../chunk-B5VXOFMZ.js';
|
|
10
|
+
//# sourceMappingURL=react.js.map
|
|
11
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"react.js"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @demlik/tea/chart/inspect — visual defaults for <ChartInspector>.
|
|
3
|
+
*
|
|
4
|
+
* Same strategy as `@demlik/tea/devtools/styles.css`, deliberately: every class
|
|
5
|
+
* is prefixed (here `.tea-ci-*`) so it cannot collide with host styles, and
|
|
6
|
+
* every colour is a consumer design token (shadcn slots + Radix accents) so the
|
|
7
|
+
* inspector inherits whatever theme is active. Override by re-declaring the
|
|
8
|
+
* --tea-ci-* vars on .tea-ci, or pass your own `className`.
|
|
9
|
+
*
|
|
10
|
+
* The state / log / diff panels are devtools components, so this sheet is a
|
|
11
|
+
* COMPANION to devtools' — import both.
|
|
12
|
+
*
|
|
13
|
+
* Refusal palette — the one thing this sheet says that devtools' does not.
|
|
14
|
+
* A refused event is drawn, not hidden, and WHY it is refused is a colour:
|
|
15
|
+
* end → --crimson-11 (this state is over)
|
|
16
|
+
* out-of-scope → --muted-foreground (not addressed here — the quietest)
|
|
17
|
+
* ignored → --amber-11 (addressed here, and deliberately dropped)
|
|
18
|
+
* undeclared → --crimson-11 (the totality bypass; should never appear)
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
.tea-ci {
|
|
22
|
+
--tea-ci-fg: var(--foreground);
|
|
23
|
+
--tea-ci-muted: var(--muted-foreground);
|
|
24
|
+
--tea-ci-border: var(--border);
|
|
25
|
+
--tea-ci-accent: var(--teal-11);
|
|
26
|
+
--tea-ci-warn: var(--amber-11);
|
|
27
|
+
--tea-ci-bad: var(--crimson-11);
|
|
28
|
+
|
|
29
|
+
font-family: var(
|
|
30
|
+
--font-mono,
|
|
31
|
+
"JetBrains Mono",
|
|
32
|
+
ui-monospace,
|
|
33
|
+
"SF Mono",
|
|
34
|
+
Menlo,
|
|
35
|
+
Consolas,
|
|
36
|
+
monospace
|
|
37
|
+
);
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
color: var(--tea-ci-fg);
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: 12px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tea-ci-boot {
|
|
46
|
+
color: var(--tea-ci-muted);
|
|
47
|
+
font-style: italic;
|
|
48
|
+
padding: 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tea-ci-head {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: baseline;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
border-bottom: 1px solid var(--tea-ci-border);
|
|
57
|
+
padding-bottom: 8px;
|
|
58
|
+
}
|
|
59
|
+
.tea-ci-title {
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
}
|
|
62
|
+
.tea-ci-now {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
gap: 6px;
|
|
65
|
+
align-items: baseline;
|
|
66
|
+
}
|
|
67
|
+
.tea-ci-phase {
|
|
68
|
+
color: var(--tea-ci-muted);
|
|
69
|
+
}
|
|
70
|
+
.tea-ci-phase::after {
|
|
71
|
+
content: " /";
|
|
72
|
+
}
|
|
73
|
+
.tea-ci-state {
|
|
74
|
+
color: var(--tea-ci-accent);
|
|
75
|
+
font-weight: 600;
|
|
76
|
+
}
|
|
77
|
+
.tea-ci-tag {
|
|
78
|
+
border: 1px solid var(--tea-ci-border);
|
|
79
|
+
border-radius: var(--radius, 0.25rem);
|
|
80
|
+
padding: 0 4px;
|
|
81
|
+
color: var(--tea-ci-muted);
|
|
82
|
+
font-size: 10.5px;
|
|
83
|
+
}
|
|
84
|
+
.tea-ci-warn {
|
|
85
|
+
color: var(--tea-ci-warn);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.tea-ci-panel {
|
|
89
|
+
border: 1px solid var(--tea-ci-border);
|
|
90
|
+
border-radius: var(--radius, 0.25rem);
|
|
91
|
+
padding: 12px 14px;
|
|
92
|
+
background: transparent;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
}
|
|
95
|
+
.tea-ci-h {
|
|
96
|
+
margin: 0 0 6px;
|
|
97
|
+
font-size: 10.5px;
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
letter-spacing: 0.08em;
|
|
100
|
+
text-transform: uppercase;
|
|
101
|
+
color: var(--tea-ci-muted);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.tea-ci-cols {
|
|
105
|
+
display: grid;
|
|
106
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
107
|
+
gap: 12px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* ── the button row ─────────────────────────────────────────────────────── */
|
|
111
|
+
.tea-ci-events {
|
|
112
|
+
display: grid;
|
|
113
|
+
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
114
|
+
gap: 8px;
|
|
115
|
+
}
|
|
116
|
+
.tea-ci-ev {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 3px;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
}
|
|
122
|
+
/* THE THING YOU CAN CLICK LOOKS LIKE THE THING YOU CAN CLICK.
|
|
123
|
+
*
|
|
124
|
+
* This read backwards: a pressable event was plain text on a transparent
|
|
125
|
+
* ground while every REFUSED one wore a dashed or dotted box, so on a state
|
|
126
|
+
* accepting two of six events the only two you could click were the only two
|
|
127
|
+
* that looked like labels. The chrome belongs to the affordance — a button
|
|
128
|
+
* raised while it can be pressed, and flat when it cannot. The refusal keeps
|
|
129
|
+
* its colour and its reason, which is what says WHY; it just stops being the
|
|
130
|
+
* loudest thing in the row. */
|
|
131
|
+
.tea-ci-btn {
|
|
132
|
+
font: inherit;
|
|
133
|
+
text-align: left;
|
|
134
|
+
padding: 4px 8px;
|
|
135
|
+
border: 1px solid var(--tea-ci-border);
|
|
136
|
+
border-radius: var(--radius, 0.25rem);
|
|
137
|
+
background: var(--tea-ci-raised, rgba(127, 127, 127, 0.14));
|
|
138
|
+
color: var(--tea-ci-fg);
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
.tea-ci-btn:hover:not(:disabled) {
|
|
142
|
+
border-color: var(--tea-ci-accent);
|
|
143
|
+
color: var(--tea-ci-accent);
|
|
144
|
+
}
|
|
145
|
+
.tea-ci-btn:disabled {
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
border-color: transparent;
|
|
148
|
+
background: transparent;
|
|
149
|
+
padding-left: 0;
|
|
150
|
+
}
|
|
151
|
+
.tea-ci-to {
|
|
152
|
+
color: var(--tea-ci-muted);
|
|
153
|
+
}
|
|
154
|
+
.tea-ci-why {
|
|
155
|
+
color: var(--tea-ci-muted);
|
|
156
|
+
font-style: italic;
|
|
157
|
+
}
|
|
158
|
+
/* The sample is a PAYLOAD and payloads wrap. On one line with no wrap and no
|
|
159
|
+
* scroll cue, `{"at":3,"reason":"review` was the whole of what a reader could
|
|
160
|
+
* see of it — the rest was not hidden, it was invisible. */
|
|
161
|
+
.tea-ci-sample {
|
|
162
|
+
font: inherit;
|
|
163
|
+
resize: vertical;
|
|
164
|
+
border: 1px dashed var(--tea-ci-border);
|
|
165
|
+
border-radius: var(--radius, 0.25rem);
|
|
166
|
+
background: transparent;
|
|
167
|
+
color: var(--tea-ci-fg);
|
|
168
|
+
padding: 2px 6px;
|
|
169
|
+
min-width: 0;
|
|
170
|
+
white-space: pre-wrap;
|
|
171
|
+
overflow-wrap: anywhere;
|
|
172
|
+
overflow-x: auto;
|
|
173
|
+
max-height: 8lh;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* A refused control keeps its NAME and loses its chrome — the reason beneath it
|
|
177
|
+
* is the content, the colour is only the cue. */
|
|
178
|
+
.tea-ci-ev-end .tea-ci-btn,
|
|
179
|
+
.tea-ci-ev-undeclared .tea-ci-btn,
|
|
180
|
+
.tea-ci-ev-no-edge .tea-ci-btn {
|
|
181
|
+
color: var(--tea-ci-bad);
|
|
182
|
+
text-decoration: line-through;
|
|
183
|
+
}
|
|
184
|
+
.tea-ci-ev-ignored .tea-ci-btn {
|
|
185
|
+
color: var(--tea-ci-warn);
|
|
186
|
+
text-decoration: line-through;
|
|
187
|
+
}
|
|
188
|
+
.tea-ci-ev-out-of-scope .tea-ci-btn {
|
|
189
|
+
color: var(--tea-ci-muted);
|
|
190
|
+
}
|
|
191
|
+
.tea-ci-ev-end .tea-ci-why,
|
|
192
|
+
.tea-ci-ev-undeclared .tea-ci-why,
|
|
193
|
+
.tea-ci-ev-no-edge .tea-ci-why {
|
|
194
|
+
color: var(--tea-ci-bad);
|
|
195
|
+
}
|
|
196
|
+
.tea-ci-ev-ignored .tea-ci-why {
|
|
197
|
+
color: var(--tea-ci-warn);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ── the diagram ────────────────────────────────────────────────────────── */
|
|
201
|
+
.tea-ci-mermaid {
|
|
202
|
+
margin: 0;
|
|
203
|
+
overflow-x: auto;
|
|
204
|
+
white-space: pre;
|
|
205
|
+
color: var(--tea-ci-muted);
|
|
206
|
+
line-height: 1.5;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* ── cmds fired ─────────────────────────────────────────────────────────────
|
|
210
|
+
* The AFTER panel. The button row above says what an edge DECLARES it would
|
|
211
|
+
* fire; this says what the run did fire, so a step that emitted nothing reads
|
|
212
|
+
* as a dash rather than as a missing row. The step on the scrubber is the one
|
|
213
|
+
* highlighted, because the two are indexed by the same cursor. */
|
|
214
|
+
.tea-ci-firelog {
|
|
215
|
+
list-style: none;
|
|
216
|
+
margin: 0;
|
|
217
|
+
padding: 0;
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
gap: 2px;
|
|
221
|
+
max-height: 220px;
|
|
222
|
+
overflow-y: auto;
|
|
223
|
+
}
|
|
224
|
+
.tea-ci-fire {
|
|
225
|
+
display: flex;
|
|
226
|
+
gap: 10px;
|
|
227
|
+
align-items: baseline;
|
|
228
|
+
padding: 1px 4px;
|
|
229
|
+
border-left: 2px solid transparent;
|
|
230
|
+
}
|
|
231
|
+
.tea-ci-fire-now {
|
|
232
|
+
border-left-color: var(--tea-ci-accent);
|
|
233
|
+
}
|
|
234
|
+
.tea-ci-fire-by {
|
|
235
|
+
color: var(--tea-ci-muted);
|
|
236
|
+
min-width: 9em;
|
|
237
|
+
}
|
|
238
|
+
.tea-ci-fire[data-fired="0"] .tea-ci-fire-cmds {
|
|
239
|
+
color: var(--tea-ci-muted);
|
|
240
|
+
}
|
|
241
|
+
.tea-ci-fire-cmds {
|
|
242
|
+
color: var(--tea-ci-accent);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* ── what this chart form cannot answer ─────────────────────────────────────
|
|
246
|
+
* Named, never silently absent: an empty refusal list would read as "nothing is
|
|
247
|
+
* refused", which is the one wrong answer worth going out of the way to avoid. */
|
|
248
|
+
.tea-ci-omits ul {
|
|
249
|
+
margin: 0;
|
|
250
|
+
padding-left: 1.1em;
|
|
251
|
+
color: var(--tea-ci-muted);
|
|
252
|
+
}
|
|
253
|
+
.tea-ci-omits b {
|
|
254
|
+
color: var(--tea-ci-fg);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* ── time travel ────────────────────────────────────────────────────────── */
|
|
258
|
+
.tea-ci-scrub {
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
gap: 10px;
|
|
262
|
+
margin-bottom: 10px;
|
|
263
|
+
flex-wrap: wrap;
|
|
264
|
+
}
|
|
265
|
+
.tea-ci-scrub input[type="range"] {
|
|
266
|
+
flex: 1 1 160px;
|
|
267
|
+
min-width: 120px;
|
|
268
|
+
accent-color: var(--tea-ci-accent);
|
|
269
|
+
}
|
|
270
|
+
.tea-ci-step {
|
|
271
|
+
color: var(--tea-ci-muted);
|
|
272
|
+
white-space: nowrap;
|
|
273
|
+
}
|
|
274
|
+
.tea-ci-scrub button {
|
|
275
|
+
font: inherit;
|
|
276
|
+
padding: 2px 10px;
|
|
277
|
+
border: 1px solid var(--tea-ci-border);
|
|
278
|
+
border-radius: var(--radius, 0.25rem);
|
|
279
|
+
background: transparent;
|
|
280
|
+
color: var(--tea-ci-fg);
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
}
|
|
283
|
+
.tea-ci-scrub button:disabled {
|
|
284
|
+
cursor: not-allowed;
|
|
285
|
+
opacity: 0.5;
|
|
286
|
+
}
|