@hatiolab/things-scene 10.1.84 → 10.1.86

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.
Files changed (37) hide show
  1. package/dist-types/components/data/evaluator.d.ts.map +1 -1
  2. package/dist-types/components/data/legend.d.ts +33 -0
  3. package/dist-types/components/data/legend.d.ts.map +1 -0
  4. package/dist-types/components/mixins/holdable.d.ts.map +1 -1
  5. package/dist-types/figure/figure-capability.d.ts.map +1 -1
  6. package/dist-types/figure/figure-data-reading.d.ts +64 -0
  7. package/dist-types/figure/figure-data-reading.d.ts.map +1 -0
  8. package/dist-types/figure/figure-inputs.d.ts +62 -0
  9. package/dist-types/figure/figure-inputs.d.ts.map +1 -0
  10. package/dist-types/figure/figure-instance.d.ts +13 -1
  11. package/dist-types/figure/figure-instance.d.ts.map +1 -1
  12. package/dist-types/figure/figure-real-object.d.ts +64 -9
  13. package/dist-types/figure/figure-real-object.d.ts.map +1 -1
  14. package/dist-types/figure/figure-registry.d.ts +5 -0
  15. package/dist-types/figure/figure-registry.d.ts.map +1 -1
  16. package/dist-types/figure/figure-rig.d.ts +87 -5
  17. package/dist-types/figure/figure-rig.d.ts.map +1 -1
  18. package/dist-types/figure/figure-status.d.ts +32 -0
  19. package/dist-types/figure/figure-status.d.ts.map +1 -0
  20. package/dist-types/figure/figure-top-view.d.ts +1 -1
  21. package/dist-types/figure/figure-top-view.d.ts.map +1 -1
  22. package/dist-types/figure/index.d.ts +3 -0
  23. package/dist-types/figure/index.d.ts.map +1 -1
  24. package/dist-types/items/items-data-binding.d.ts +12 -0
  25. package/dist-types/items/items-data-binding.d.ts.map +1 -1
  26. package/dist-types/things-scene/index.d.ts +1 -0
  27. package/dist-types/things-scene/index.d.ts.map +1 -1
  28. package/dist-types/threed/instanced-set.d.ts +3 -0
  29. package/dist-types/threed/instanced-set.d.ts.map +1 -1
  30. package/dist-types/threed/real-object.d.ts +10 -1
  31. package/dist-types/threed/real-object.d.ts.map +1 -1
  32. package/package.json +2 -2
  33. package/things-scene-min.js +11 -11
  34. package/things-scene-min.js.map +1 -1
  35. package/things-scene-transfer.mjs +2 -2
  36. package/things-scene.mjs +3 -3
  37. package/things-scene.mjs.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../../src/components/data/evaluator.ts"],"names":[],"mappings":"AAuFA,iBAAS,cAAc,CAAC,MAAM,KAAA,QAM7B;AAED,OAAO,EAAE,cAAc,EAAE,CAAA;AAMzB,QAAA,MAAM,gBAAgB,UAIrB,CAAA;AACD,QAAA,MAAM,WAAW,OAAqD,CAAA;AAEtE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,KAA0D,CAAA;AAEpF,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAAE,GACnB,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,GAAG,CAQ3C;AAwBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,OAAO,KAAA,EAAE,KAAK,KAAA,EAAE,IAAI,KAAA,EAAE,KAAK,KAAA,EAAE,IAAI,KAAA,UAlBpC,GAAG,SAAS,GAAG,WAAW,GAAG,SAmChE"}
1
+ {"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../../src/components/data/evaluator.ts"],"names":[],"mappings":"AAwEA,iBAAS,cAAc,CAAC,MAAM,KAAA,QAM7B;AAED,OAAO,EAAE,cAAc,EAAE,CAAA;AAMzB,QAAA,MAAM,gBAAgB,UAIrB,CAAA;AACD,QAAA,MAAM,WAAW,OAAqD,CAAA;AAEtE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,KAA0D,CAAA;AAEpF,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAAE,GACnB,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,GAAG,CAQ3C;AAwBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,OAAO,KAAA,EAAE,KAAK,KAAA,EAAE,IAAI,KAAA,EAAE,KAAK,KAAA,EAAE,IAAI,KAAA,UAlBpC,GAAG,SAAS,GAAG,WAAW,GAAG,SAqChE"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Legend = a table from a value, read as text, to what it shows -- a colour, a label, a clip. `default` is what a value
3
+ * the table does not name shows.
4
+ *
5
+ * { idle: '#888', running: '#0F0', error: '#F00', default: '#888' }
6
+ * { true: '#0F0', false: '#888' }
7
+ *
8
+ * The one lookup of a code in a table: a mapping's `map` rule, a component's legends (`Legendable`) and a figure's status
9
+ * template all read it here (ADR-0051 §8, the architect's ruling of 2026-10-14).
10
+ */
11
+ export type Legend<T = unknown> = Record<string, T> & {
12
+ default?: T;
13
+ };
14
+ /** A value through a legend: its own entry, else `default`, else undefined. The value is read as text (`true` → `'true'`). */
15
+ export declare function resolveLegend<T>(value: unknown, legend: Legend<T> | null | undefined): T | undefined;
16
+ /**
17
+ * One entry of a table of values and intervals: an exact value it shows `result` for, or an interval `min <= v < max`
18
+ * (either end left open). A board's legend component stores its ranges this way; a mapping's `range` rule writes its
19
+ * intervals as keys and is read into these.
20
+ */
21
+ export interface LegendEntry<T = unknown> {
22
+ value?: unknown;
23
+ min?: number | string | null;
24
+ max?: number | string | null;
25
+ result: T;
26
+ }
27
+ /**
28
+ * A value through a table of values and intervals -- the one matching of a value against intervals: an exact value
29
+ * first (any entry, compared as it is), then the first interval holding it, `min` included and `max` not, then
30
+ * `fallback`. An entry with neither end is no interval. No value (null, undefined) is in no interval.
31
+ */
32
+ export declare function resolveLegendEntries<T>(value: unknown, entries: readonly LegendEntry<T>[], fallback?: T): T | undefined;
33
+ //# sourceMappingURL=legend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../src/components/data/legend.ts"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,CAAA;CAAE,CAAA;AAErE,8HAA8H;AAC9H,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAMpG;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5B,MAAM,EAAE,CAAC,CAAA;CACV;AAID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAavH"}
@@ -1 +1 @@
1
- {"version":3,"file":"holdable.d.ts","sourceRoot":"","sources":["../../../src/components/mixins/holdable.ts"],"names":[],"mappings":"AAgBA,OAAO,SAAS,MAAM,iBAAiB,CAAA;AAuBvC,KAAK,WAAW,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,SAAS,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,KAAK,GAAG,GAAG,CA4Q7F"}
1
+ {"version":3,"file":"holdable.d.ts","sourceRoot":"","sources":["../../../src/components/mixins/holdable.ts"],"names":[],"mappings":"AAgBA,OAAO,SAAS,MAAM,iBAAiB,CAAA;AAuBvC,KAAK,WAAW,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,SAAS,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,KAAK,GAAG,GAAG,CA4R7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"figure-capability.d.ts","sourceRoot":"","sources":["../../src/figure/figure-capability.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAKlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAGxF,KAAK,IAAI,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAEjD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,+DAAqB,CAAA;AAErD,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,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AAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAKjF,CAAA;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,IAAI,CAAC,wBAAwB,EAAE,IAAI,GAAG,UAAU,GAAG,SAAS,CAAC,EAAE,GAAG,OAAO,EAAE,CAE/H;AA8FD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,GAAE,SAAS,MAAM,EAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAqC/G;AA8DD,2BAA2B;AAC3B,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
@@ -0,0 +1,64 @@
1
+ import type { FigureDataPlan, FigureDataValue, FigureDataValueIssue } from '@hatiolab/figure-model';
2
+ /** One item as the data gives it: its id, and what the binding's element fields say of it. */
3
+ export interface FigureItemRecord {
4
+ id: string;
5
+ type?: string;
6
+ place?: string;
7
+ stack?: number;
8
+ status?: string;
9
+ }
10
+ /** What the data moves, behavior by behavior. */
11
+ export interface FigureDataResult {
12
+ states: Record<string, {
13
+ value: number;
14
+ sourceMode: 'observed' | 'commanded';
15
+ }>;
16
+ palette: Record<string, string>;
17
+ motion: Record<string, {
18
+ clip?: string;
19
+ speed?: number;
20
+ paused?: boolean;
21
+ }>;
22
+ /** Each status port's code, as the data gave it; the template that shows it is the consumer's. */
23
+ status: Record<string, string>;
24
+ /** The instance's position (mm) and heading (degrees), each with the seconds it takes to get there. */
25
+ pose: Partial<Record<'x' | 'y' | 'z' | 'heading', {
26
+ value: number;
27
+ seconds: number;
28
+ }>>;
29
+ /** The items each items binding gives, in the binding's order: what stacks below what. */
30
+ items: Array<{
31
+ binding: string;
32
+ slot?: string;
33
+ records: FigureItemRecord[];
34
+ }>;
35
+ }
36
+ /** Where the value a binding read came from: the live data, the board's saved value, the schema's default, or nowhere. */
37
+ export type FigureDataSource = 'live' | 'manual' | 'default' | 'absent';
38
+ export declare const EMPTY_FIGURE_DATA: FigureDataResult;
39
+ /** A plan made ready to read: each binding's accessor and evaluator built once. */
40
+ export declare class FigureDataReader {
41
+ readonly plan: FigureDataPlan;
42
+ private readonly bindings;
43
+ constructor(plan: FigureDataPlan);
44
+ /**
45
+ * What the data moves, from the live data first, then the board's saved values (by accessor), then the schema's
46
+ * defaults; a binding with none reads nothing and its behavior is left as it is. Items come from the live data only.
47
+ * Issues of the live data and of the saved values are returned apart, and the caller refuses each whole.
48
+ */
49
+ read(given: {
50
+ live?: unknown;
51
+ manual?: Record<string, unknown> | null;
52
+ }): {
53
+ result: FigureDataResult;
54
+ values: Record<string, {
55
+ value: FigureDataValue | undefined;
56
+ source: FigureDataSource;
57
+ }>;
58
+ liveIssues: FigureDataValueIssue[];
59
+ manualIssues: FigureDataValueIssue[];
60
+ };
61
+ /** The items an items binding gives: each element of a list by its id field, or one value as the id. */
62
+ private records;
63
+ }
64
+ //# sourceMappingURL=figure-data-reading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-data-reading.d.ts","sourceRoot":"","sources":["../../src/figure/figure-data-reading.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAqC,cAAc,EAA0B,eAAe,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE9J,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,GAAG,WAAW,CAAA;KAAE,CAAC,CAAA;IAC/E,OAAO,EAAE,MAAM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C,MAAM,EAAE,gBAAgB,CAAA;SAAE,CAAC,CAAA;QACxF,UAAU,EAAE,oBAAoB,EAAE,CAAA;QAClC,YAAY,EAAE,oBAAoB,EAAE,CAAA;KACrC;IAsCD,wGAAwG;IACxG,OAAO,CAAC,OAAO;CA+BhB"}
@@ -0,0 +1,62 @@
1
+ import { type FigureAsset, type FigureDataPlan, type FigureDataValue, type FigureDataValueIssue, type FigureMotionPlan, type FigureMotionSettingResolved } from '@hatiolab/figure-model';
2
+ import { type FigureDataResult, type FigureDataSource } from './figure-data-reading.js';
3
+ /** Why something given to the figure was not taken: the code and reason, and the values it named. */
4
+ export interface FigureRuntimeIssue {
5
+ /** Which input it came from: the live data, the saved values, or the saved motion settings. */
6
+ source: 'live' | 'manual' | 'motion';
7
+ code: 'DATA_INTERFACE' | 'DATA_VALUE' | 'MOTION_SETTING';
8
+ reason: string;
9
+ issues?: FigureDataValueIssue[];
10
+ group?: string;
11
+ }
12
+ /** What a call did: taken, refused with why, or skipped as older than what was already taken. */
13
+ export interface FigureApplyResult {
14
+ accepted: boolean;
15
+ skipped?: boolean;
16
+ issues: FigureRuntimeIssue[];
17
+ }
18
+ export declare class FigureInputs {
19
+ readonly asset: FigureAsset;
20
+ readonly dataPlan: FigureDataPlan | null;
21
+ readonly motionPlan: FigureMotionPlan;
22
+ private readonly reader;
23
+ private live;
24
+ private liveEpoch;
25
+ private manualValues;
26
+ private manualMotion;
27
+ private result;
28
+ private values;
29
+ private motionSettings;
30
+ private refused;
31
+ constructor(asset: FigureAsset);
32
+ /**
33
+ * The component's data, whole. `null` or `undefined` lets go of it. Data with any value the figure cannot take is
34
+ * refused whole and the last good result stays. A figure that declares no data takes none and says nothing of it:
35
+ * `data` is the component's, and a board may hold anything there. `epoch`, when given, refuses nothing older than the
36
+ * last taken (a late answer).
37
+ */
38
+ setData(data: unknown, epoch?: number): FigureApplyResult;
39
+ /**
40
+ * The saved values and motion settings, as the board holds them. A set the figure cannot take is refused and the one
41
+ * before stays; the other of the two is still taken.
42
+ */
43
+ setManual(settings: {
44
+ figureValues?: unknown;
45
+ motion?: unknown;
46
+ }): FigureApplyResult;
47
+ /** What the figure's data moves now. */
48
+ get data(): FigureDataResult;
49
+ /** Each binding's value now and where it came from, by binding id. */
50
+ get dataValues(): Readonly<Record<string, {
51
+ value: FigureDataValue | undefined;
52
+ source: FigureDataSource;
53
+ }>>;
54
+ /** Each motion group's clip, speed and pause now, and whether the data or the board chose them. */
55
+ get motion(): Readonly<Record<string, FigureMotionSettingResolved>>;
56
+ /** Why the last things given were refused; empty when all were taken. */
57
+ diagnostics(): readonly FigureRuntimeIssue[];
58
+ private refuse;
59
+ private clear;
60
+ private recompute;
61
+ }
62
+ //# sourceMappingURL=figure-inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-inputs.d.ts","sourceRoot":"","sources":["../../src/figure/figure-inputs.ts"],"names":[],"mappings":"AAkBA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAErB,KAAK,2BAA2B,EACjC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAuC,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE5H,qGAAqG;AACrG,MAAM,WAAW,kBAAkB;IACjC,+FAA+F;IAC/F,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACpC,IAAI,EAAE,gBAAgB,GAAG,YAAY,GAAG,gBAAgB,CAAA;IACxD,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,iGAAiG;AACjG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,kBAAkB,EAAE,C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
3
3
  import type { SceneRenderContext } from '../interfaces/rendering.js';
4
4
  import type { IRealObject } from '../interfaces/real-object.js';
5
5
  import type { ComponentNature } from '../interfaces/types.js';
6
+ import { FigureInputs } from './figure-inputs.js';
6
7
  declare const FigureInstance_base: {
7
8
  new (...args: any[]): {
8
9
  contains(x: number, y: number): boolean;
@@ -274,10 +275,21 @@ export declare class FigureInstance extends FigureInstance_base {
274
275
  * figure's own value;
275
276
  * - its state values, the joints and other moving inputs -- \`state.parameters\`, with unit, range and the figure's
276
277
  * resting value;
277
- * - its clips -- \`state.clips\`, clip name → playback speed 0–3 (as the figure modeller plays it), 0 or empty stopped.
278
+ * - its clips in no motion group -- \`state.clips\`, clip name → playback speed 0–3 (as the figure modeller plays it),
279
+ * 0 or empty stopped;
280
+ * - the values its data bindings read, set by hand -- \`state.figureValues\`, by accessor, a number, a checkbox or a
281
+ * choice each (ADR-0051 §8);
282
+ * - its motion groups -- \`state.motion\`, per group the clip, the speed 0–3 and a pause (ADR-0051 §3.2).
278
283
  * A map the figure has nothing for is not offered.
279
284
  */
280
285
  get nature(): ComponentNature;
286
+ private _inputs?;
287
+ /**
288
+ * What this figure is given to run by: its \`data\`, the saved values and motion settings, and what they move
289
+ * (\`FigureInputs\`). One per instance and registered asset; another release of the type starts it again from the
290
+ * component's state, so a late answer for the asset before is not taken.
291
+ */
292
+ get figureInputs(): FigureInputs | undefined;
281
293
  buildRealObject(): IRealObject | undefined;
282
294
  render(ctx: SceneRenderContext): void;
283
295
  private _top?;
@@ -1 +1 @@
1
- {"version":3,"file":"figure-instance.d.ts","sourceRoot":"","sources":["../../src/figure/figure-instance.ts"],"names":[],"mappings":"AAKA,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,MAAM,wBAAwB,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO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;IAIlB;;;;;;;;;;;;OAYG;IACH,IAAI,MAAM,IAAI,eAAe,CA2C5B;IAED,OAAO,CAAC,OAAO,CAAC,CAA+C;IAE/D;;;;OAIG;IACH,IAAI,YAAY,IAAI,YAAY,GAAG,SAAS,CAU3C;IAED,eAAe,IAAI,WAAW,GAAG,SAAS;IAI1C,MAAM,CAAC,GAAG,EAAE,kBAAkB;IAkC9B,OAAO,CAAC,IAAI,CAAC,CAAsC;IAEnD;;;OAGG;IACH,OAAO,CAAC,OAAO;IAUf,sDAAsD;IACtD,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAGnC;IAQD,YAAY,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO;;;;;;IAkBjH,KAAK,CAAC,MAAM,EAAE,GAAG;IAKjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAchE,4EAA4E;IAC5E,OAAO,CAAC,cAAc;IAgBtB,uEAAuE;IACvE,OAAO,CAAC,WAAW;IAiBnB;;;;OAIG;IACM,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;CAGvD;AAMD,eAAe,cAAc,CAAA"}
@@ -1,8 +1,28 @@
1
1
  import * as THREE from 'three';
2
2
  import { RealObject } from '../threed/real-object.js';
3
3
  import type { Properties } from '../interfaces/types.js';
4
- import { type FigureRenderLevel } from '@hatiolab/figure-model';
4
+ import { type FigureItemSeat, type FigureRenderLevel } from '@hatiolab/figure-model';
5
5
  import { type RegisteredFigureFigure } from './figure-registry.js';
6
+ import type { FigureRuntimeIssue } from './figure-inputs.js';
7
+ /** Where a thing held at a place hangs, as \`attachPointFor\` answers a holder. */
8
+ export interface FigurePlaceAttachment {
9
+ attach: THREE.Object3D;
10
+ localPosition: {
11
+ x: number;
12
+ y: number;
13
+ z: number;
14
+ };
15
+ localRotation?: {
16
+ x: number;
17
+ y: number;
18
+ z: number;
19
+ };
20
+ carryPolicy?: string;
21
+ /** A uniform scale only for showing it inside its slot; never its size. */
22
+ displayScale?: number;
23
+ /** For a slot of the layout: where it is shown and what its slot says of it at full size. */
24
+ seat?: FigureItemSeat;
25
+ }
6
26
  export declare class FigureRealObject extends RealObject<THREE.Group> {
7
27
  private rig;
8
28
  private unsubscribe?;
@@ -16,6 +36,33 @@ export declare class FigureRealObject extends RealObject<THREE.Group> {
16
36
  get figure(): RegisteredFigureFigure | null;
17
37
  protected getObject3dInstance(): THREE.Group;
18
38
  build(): void;
39
+ /** What the component's inputs give, handed to the rig: the data's state values and colours, each group's setting. */
40
+ private applyInputs;
41
+ /**
42
+ * Where the data says the figure stands (a pose binding, ADR-0051 §8): on the board's plan its centre at x and z, its
43
+ * rotation at the heading, its height at y -- in the board's units, which a figure's box shares with its mm. Each axis
44
+ * goes from where it stands now to the new value over the binding's seconds; a new value part-way starts again from
45
+ * where it is, as a site's position reports arrive. Zero seconds puts it there at once.
46
+ */
47
+ private poseRuns;
48
+ private aimPose;
49
+ /** The figure's pose now, from its component: plan centre, rotation in degrees, height. */
50
+ private poseNow;
51
+ private writePose;
52
+ /** One frame of every pose axis on its way; whether one moved. */
53
+ private advancePose;
54
+ /** Why the last data or settings given were not taken; empty when all were. */
55
+ get inputIssues(): readonly FigureRuntimeIssue[];
56
+ /** Each motion group as it plays here: its clip, time, speed, pause, and whether a change is blending. */
57
+ get motionRuns(): Record<string, {
58
+ clip: string;
59
+ time: number;
60
+ speed: number;
61
+ paused: boolean;
62
+ blending: boolean;
63
+ }>;
64
+ /** The group's clip from its time 0 again, blending from where it stands. Not saved: a board's button, not its value. */
65
+ restartMotion(group: string): boolean;
19
66
  /** The instance's design values: \`state.designInputs\`, input → value, for the inputs the figure publishes (ADR-0096). */
20
67
  get designInputs(): Record<string, unknown>;
21
68
  /** The instance's external state values: `state.parameters`, name → value in the input's unit. */
@@ -81,15 +128,23 @@ export declare class FigureRealObject extends RealObject<THREE.Group> {
81
128
  */
82
129
  placeAttachment(id: string, carrier?: {
83
130
  state?: Record<string, unknown>;
84
- }): {
85
- attach: THREE.Object3D;
86
- localPosition: {
87
- x: number;
88
- y: number;
89
- z: number;
90
- };
91
- } | undefined;
131
+ }): FigurePlaceAttachment | undefined;
132
+ /**
133
+ * A thing in a slot of the layout, seated by figure-model's one rule (\`figureItemSeatsOf\`): stacked on what the slot
134
+ * holds under it, turned with the slot, shrunk only to be shown inside it -- the verdict, at full size, goes with it as
135
+ * \`seat\`. A thing whose size, or the size of one under it, is not known stands at the slot's face, said unconfirmed.
136
+ * The thing's size is its state: width along x, depth up, height along z -- the figure's X, Y and Z.
137
+ */
138
+ private slotAttachment;
92
139
  clear(): THREE.Group;
140
+ /** Every held thing's object hanging inside the rig, moved onto this object where it stands: kept through a rebuild. */
141
+ private keepHeld;
142
+ /**
143
+ * Every thing the component holds seated again on this rig's places, through the one seating the component does
144
+ * (\`seatHeldItem\`). A thing whose place is not there any more stays where it stood, held and unplaced -- not dropped,
145
+ * not moved to another place.
146
+ */
147
+ private reseatHeld;
93
148
  }
94
149
  /**
95
150
  * The zPos of a figure hung from the ceiling: the number that puts the top of its box at the ceiling, in the scene's
@@ -1 +1 @@
1
- {"version":3,"file":"figure-real-object.d.ts","sourceRoot":"","sources":["../../src/figure/figure-real-object.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAyC,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AACtG,OAAO,EAAa,KAAK,sBAAsB,EAAE,MAA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H;IAC1H,gBAAgB,IAAI,IAAI;IAMxB,oHAAoH;IACpH,WAAW,IAAI,IAAI;IAUnB,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,YAAY;IAUpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAmBtB,OAAO,CAAC,OAAO;IAIf;;;;;OAKG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,qBAAqB,GAAG,SAAS;IAgB7G;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAwBb,KAAK,IAAI,KAAK,CAAC,KAAK;IAa7B,wHAAwH;IACxH,OAAO,CAAC,QAAQ;IAUhB;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAQnB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxG"}
@@ -10,4 +10,9 @@ export declare function getFigure(type: string): RegisteredFigureFigure | null;
10
10
  export declare function hasFigure(type: string): boolean;
11
11
  export declare function unregisterFigure(type: string): boolean;
12
12
  export declare function resetFigures(): void;
13
+ /**
14
+ * The component type that makes an item of a type a site's data names (ADR-0051 §8): a registered type of that name,
15
+ * else the registered figure whose carrier declaration (ADR-0123) says that code. Null when neither.
16
+ */
17
+ export declare function figureTypeForItem(code: unknown): string | null;
13
18
  //# sourceMappingURL=figure-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"figure-registry.d.ts","sourceRoot":"","sources":["../../src/figure/figure-registry.ts"],"names":[],"mappings":"AAYA,OAAO,EAA8C,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAErG,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEjF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,CAAA;CACzB;AAID,0HAA0H;AAC1H,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,sBAAsB,CAOvF;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI,CAErE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
1
+ {"version":3,"file":"figure-registry.d.ts","sourceRoot":"","sources":["../../src/figure/figure-registry.ts"],"names":[],"mappings":"AAYA,OAAO,EAAoE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAE3H,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEjF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,CAAA;CACzB;AAID,0HAA0H;AAC1H,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,sBAAsB,CAOvF;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI,CAErE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAM9D"}
@@ -1,6 +1,6 @@
1
1
  import * as THREE from 'three';
2
2
  import { type FigureRenderLevel } from '@hatiolab/figure-model';
3
- import { type FigureAsset, type FigureAssetEvaluation, type FigureCapabilityChangesEvaluator, type FigureAssetGeometry, type FigureDriver } from '@hatiolab/figure-model';
3
+ import { type FigureAsset, type FigureAssetEvaluation, type FigureCapabilityChangesEvaluator, type FigureAssetGeometry, type FigureDriver, type FigureMotionPlan, type FigureMotionSetting } from '@hatiolab/figure-model';
4
4
  import { type CompiledFigure } from './figure-compile-cache.js';
5
5
  /** The rig's own evaluator: one that tells an evaluation as its changes (figure-model docs/evaluation-changes-design.md). */
6
6
  type RigEvaluator = FigureCapabilityChangesEvaluator;
@@ -110,8 +110,21 @@ export declare class FigureRig {
110
110
  }>;
111
111
  /** External control sources, kept apart from what drivers compute: a connector's values, never a driver's. */
112
112
  private external;
113
- /** Playback seconds per clip. A driver belongs to the clip its id starts with (`<clip>/<part>/<path>`). */
113
+ /** Playback seconds per clip in no motion group. A driver belongs to the clip it declares. */
114
114
  private clipTimes;
115
+ /**
116
+ * Each motion group as it plays here (ADR-0051 §3.2, detail design §5.2): the selected clip and its time, its speed and
117
+ * pause, and -- while a change of clip blends -- the pose it left and how long the blend has run. The asset's groups
118
+ * say which clips; which one plays, and when, is this instance's.
119
+ */
120
+ private readonly groupRuns;
121
+ /** The state values the figure's data interface gives, and whether each applies at once or travels there. */
122
+ private dataStates;
123
+ /** Where each commanded state stands on its way to its target: it moves at the input's sweep, from where it was. */
124
+ private readonly commanded;
125
+ /** Colours the data interface gives this instance by token; they win over the theme and the asset. */
126
+ private paletteOverrides;
127
+ private motionPlanOf?;
115
128
  private theme;
116
129
  private readonly merge;
117
130
  /**
@@ -203,6 +216,75 @@ export declare class FigureRig {
203
216
  static clipOf(driver: FigureDriver): string;
204
217
  /** The asset's clip names, in driver order. */
205
218
  get clips(): string[];
219
+ /** The asset's motion, ready to sample: its groups and the clips in none. Made once; the asset does not change under a rig. */
220
+ get motionPlan(): FigureMotionPlan;
221
+ /** The clips in no motion group: each plays on its own clock, at the board's speed for it (\`state.clips\`). */
222
+ get independentClips(): readonly string[];
223
+ /**
224
+ * Each motion group's setting, as resolved from the board and the data (\`resolveFigureMotionSettings\`). The first
225
+ * setting starts the group at its clip's time 0. Another clip starts at its time 0 and blends from the pose the group
226
+ * stands in now, over the group's transition; a change of clip during a blend blends from the blend. The same clip
227
+ * again changes nothing -- a restart is \`restartMotion\`. Speed and pause never touch the time.
228
+ */
229
+ setMotionSettings(settings: Record<string, FigureMotionSetting>): void;
230
+ /** The group's clip from its time 0 again, blending from where it stands. */
231
+ restartMotion(group: string): boolean;
232
+ /** The selected clip and time of each group, as it plays here. */
233
+ get motionRuns(): Record<string, {
234
+ clip: string;
235
+ time: number;
236
+ speed: number;
237
+ paused: boolean;
238
+ blending: boolean;
239
+ }>;
240
+ /**
241
+ * The state values the data interface gives (\`evaluateFigureDataInterface\`). An observed one applies at once; a
242
+ * commanded one travels from where the state stands now to its target at the input's sweep (\`advanceStateValue\`),
243
+ * and a new target part-way continues from where it is.
244
+ */
245
+ setDataStates(states: Record<string, {
246
+ value: number;
247
+ sourceMode: 'observed' | 'commanded';
248
+ }>): void;
249
+ /**
250
+ * One frame of what the rig moves by time itself: each playing group's clip and blend, and each commanded state on its
251
+ * way. A paused group or one at speed 0 holds its time and its blend. The clips in no group are the caller's (\`setClipTime\`).
252
+ * Whether anything moved.
253
+ */
254
+ advance(dtSeconds: number): boolean;
255
+ /** Whether time moves anything here now: a group playing, or a commanded state not yet at its target. */
256
+ get moving(): boolean;
257
+ /**
258
+ * What the clips give now: every clip in no group at its own time, every group's selected clip at its time -- a state of
259
+ * the group the clip does not write at its default -- and a group in the middle of a change blended from the pose it
260
+ * left, straight by the share of its transition run (figure-model's \`sampleFigureMotion\`, \`blendFigureMotion\`).
261
+ */
262
+ private drivenValues;
263
+ /**
264
+ * This instance's colours by token, from its data (ADR-0051 §2.2): the whole map, a token left out back to the theme's
265
+ * or the asset's. The meshes take a material of the new colour from the bank; the shared material of the old one is
266
+ * not changed, so no other instance changes colour with this one.
267
+ */
268
+ setPaletteOverrides(colours: Record<string, string>): void;
269
+ /**
270
+ * Effects a status gives parts of this instance (status-template design §6): a part blinks -- shown dark half of each
271
+ * cycle -- or glows in its colour. The whole map; a part left out shows plainly again.
272
+ */
273
+ setPartEffects(effects: Record<string, {
274
+ kind: 'blink' | 'glow';
275
+ hz?: number;
276
+ } | null | undefined>): void;
277
+ private partEffects;
278
+ private effectClock;
279
+ private blinkDark;
280
+ /** The effect on the part a body draws: by the part's id, its copies too (the id and a mark after it). */
281
+ private effectOf;
282
+ /** One frame of the blinking: dark in the second half of each cycle. Whether it turned. */
283
+ private advanceEffects;
284
+ /** The colours this instance draws with by token: the asset's, under its data's. */
285
+ get palette(): Record<string, string>;
286
+ /** Every drawn mesh takes the material its body is drawn with now. A body standing in for a mesh file keeps it hidden. */
287
+ private repaint;
206
288
  /** Playback time in seconds of one clip. Each driver is evaluated at its own clip's time. */
207
289
  setClipTime(clip: string, seconds: number): void;
208
290
  /** The playback time of one clip, 0 before it has moved. */
@@ -210,9 +292,9 @@ export declare class FigureRig {
210
292
  /** One time for every clip, for readers that have a single clock. */
211
293
  setTime(seconds: number): void;
212
294
  /**
213
- * The state overrides for this moment: each driver at its clip's time, then the external values over them. One
214
- * active source per state: an external value masks the driver, and the clip's time keeps its own count, so when
215
- * the external value is withdrawn the driver's value at the clip's current time shows again.
295
+ * The state overrides for this moment: the clips at their times, the data over them, the external values over both.
296
+ * One active source per state: an external value masks the data and the clips, and the clips' times keep their own
297
+ * count, so when the external value is withdrawn the next source's value at this moment shows again, at once.
216
298
  */
217
299
  stateOverrides(): Record<string, number>;
218
300
  private inputsRead;
@@ -1 +1 @@
1
- {"version":3,"file":"figure-rig.d.ts","sourceRoot":"","sources":["../../src/figure/figure-rig.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAOL,KAAK,WAAW,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AAC;IAU1C,QAAQ,IAAI,mBAAmB;IAO/B;;;OAGG;IACH,YAAY,IAAI,gBAAgB;IAQhC,uFAAuF;IACvF,OAAO,CAAC,KAAK;IAmBb,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,WAAW;IAwBnB,gHAAgH;IAChH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,GAAG,SAAS;IAI1C,yHAAyH;IACzH,QAAQ,IAAI,MAAM,EAAE;IAOpB,OAAO,IAAI,IAAI;CA4BhB"}
@@ -0,0 +1,32 @@
1
+ import type { FigureStatusPort } from '@hatiolab/figure-model';
2
+ import { type Legend } from '../components/data/legend.js';
3
+ /** An effect a status gives its port's parts. `hz`: how often a blink turns on, 1 when not said. */
4
+ export interface FigureStatusEffect {
5
+ kind: 'blink' | 'glow';
6
+ hz?: number;
7
+ }
8
+ /** What one status looks like: a colour, an effect, either or both. `effect: null` is none. */
9
+ export interface FigureStatusLook {
10
+ color?: string;
11
+ effect?: FigureStatusEffect | null;
12
+ }
13
+ /** A status template: each code's look, and `default` for a code it does not name. */
14
+ export interface FigureStatusTemplate {
15
+ states: Legend<FigureStatusLook>;
16
+ }
17
+ /** A consumer's own way to look up a status: a look, or undefined to leave it to the next. */
18
+ export type FigureStatusResolver = (asked: {
19
+ component: any;
20
+ port: FigureStatusPort;
21
+ code: string;
22
+ }) => FigureStatusLook | undefined;
23
+ /** A consumer's resolver, asked before the board's templates. Returns what takes it away again. */
24
+ export declare function registerFigureStatusResolver(resolver: FigureStatusResolver): () => void;
25
+ /**
26
+ * The template a placement shows a port's status by: the one it chose (`state.statusTemplate`, a template or the name of
27
+ * one of the board's `statusTemplates`), else the board's default (`statusTemplate` on the board), else none.
28
+ */
29
+ export declare function figureStatusTemplateOf(component: any): FigureStatusTemplate | undefined;
30
+ /** A port's code as it shows: a consumer's resolver first, then the placement's template, then the board's. */
31
+ export declare function resolveFigureStatus(component: any, port: FigureStatusPort, code: string): FigureStatusLook | undefined;
32
+ //# sourceMappingURL=figure-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-status.d.ts","sourceRoot":"","sources":["../../src/figure/figure-status.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAEzE,oGAAoG;AACpG,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAA;IACtB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AACD,+FAA+F;AAC/F,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CACnC;AACD,sFAAsF;AACtF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAA;CACjC;AAED,8FAA8F;AAC9F,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE;IAAE,SAAS,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,gBAAgB,GAAG,SAAS,CAAA;AAIpI,mGAAmG;AACnG,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI,CAMvF;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,GAAG,GAAG,oBAAoB,GAAG,SAAS,CAIvF;AAED,+GAA+G;AAC/G,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAOtH"}
@@ -12,5 +12,5 @@ export declare function figureTopView(figure: RegisteredFigureFigure, size: {
12
12
  x: number;
13
13
  y: number;
14
14
  z: number;
15
- } | null, scale?: number): FigureTopView;
15
+ } | null, scale?: number, colours?: Record<string, string>): FigureTopView;
16
16
  //# sourceMappingURL=figure-top-view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"figure-top-view.d.ts","sourceRoot":"","sources":["../../src/figure/figure-top-view.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAqB,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGrH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA;AAE7C,kGAAkG;AAClG,eAAO,MAAM,UAAU,yBAAmB,CAAA;AAE1C;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,EAChD,KAAK,SAAI,GACR,aAAa,CAcf"}
1
+ {"version":3,"file":"figure-top-view.d.ts","sourceRoot":"","sources":["../../src/figure/figure-top-view.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAqB,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGrH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA;AAE7C,kGAAkG;AAClG,eAAO,MAAM,UAAU,yBAAmB,CAAA;AAE1C;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,EAChD,KAAK,SAAI,EACT,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACnC,aAAa,CAef"}
@@ -5,6 +5,9 @@
5
5
  * seam as it loads, so the instance is read first.
6
6
  */
7
7
  export * from './figure-instance.js';
8
+ export * from './figure-inputs.js';
9
+ export * from './figure-data-reading.js';
10
+ export * from './figure-status.js';
8
11
  export * from './figure-capability.js';
9
12
  export * from './figure-palette.js';
10
13
  export * from './figure-component.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/figure/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAA;AAKpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,cAAc,sBAAsB,CAAA;AAKpC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AACxG,cAAc,4BAA4B,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAC1H,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/figure/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAKlC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,cAAc,sBAAsB,CAAA;AAKpC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AACxG,cAAc,4BAA4B,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAC1H,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAA"}
@@ -13,6 +13,16 @@ interface FlowNodeShape {
13
13
  }
14
14
  export declare function ItemsDataBinding<TBase extends Ctor<FlowNodeShape>>(Base: TBase): {
15
15
  new (...args: any[]): {
16
+ /**
17
+ * Whether the records come from the component's `data` itself (a FlowNode: `data` is its records), or are given
18
+ * by the holder (`_reconcileItems` called with records it worked out -- a figure whose items its data bindings read,
19
+ * ADR-0051 §8). When not from `data`, `data` is left to the component and its getter and setter are not touched.
20
+ */
21
+ _itemsFromData(): boolean;
22
+ /** The key a held item is matched by: its slot by default, as `_recordKey` reads a record's. */
23
+ _currentKeyOf(carrier: any): string | null;
24
+ /** Items matched by id rather than by slot: an item keeps itself while it changes slot, and may move between holders. */
25
+ _keyedById(): boolean;
16
26
  /**
17
27
  * 로드 시 model.data(records) → _items materialize.
18
28
  *
@@ -52,6 +62,8 @@ export declare function ItemsDataBinding<TBase extends Ctor<FlowNodeShape>>(Base
52
62
  */
53
63
  set data(records: ReadonlyArray<SlotRecord> | any);
54
64
  _reconcileItems(records: ReadonlyArray<SlotRecord>): void;
65
+ /** The held items put in the records' order, slot by slot, and each seated again where that order stands it. */
66
+ _orderItemsAs(keys: string[]): void;
55
67
  _exportSlotRecords(): SlotRecord[];
56
68
  /**
57
69
  * record 정체성 key — default = `slotId`. holder 가 carrier ID 기반 추적 원하면