@hatiolab/things-scene 10.1.101 → 10.1.103

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 (40) hide show
  1. package/dist-types/figure/figure-capability.d.ts +129 -20
  2. package/dist-types/figure/figure-capability.d.ts.map +1 -1
  3. package/dist-types/figure/figure-component.d.ts +2 -2
  4. package/dist-types/figure/figure-component.d.ts.map +1 -1
  5. package/dist-types/figure/figure-data-reading.d.ts +8 -2
  6. package/dist-types/figure/figure-data-reading.d.ts.map +1 -1
  7. package/dist-types/figure/figure-inputs.d.ts +48 -5
  8. package/dist-types/figure/figure-inputs.d.ts.map +1 -1
  9. package/dist-types/figure/figure-instance.d.ts +5 -3
  10. package/dist-types/figure/figure-instance.d.ts.map +1 -1
  11. package/dist-types/figure/figure-legend.d.ts +58 -0
  12. package/dist-types/figure/figure-legend.d.ts.map +1 -0
  13. package/dist-types/figure/figure-placed-asset.d.ts +17 -1
  14. package/dist-types/figure/figure-placed-asset.d.ts.map +1 -1
  15. package/dist-types/figure/figure-real-object.d.ts +6 -19
  16. package/dist-types/figure/figure-real-object.d.ts.map +1 -1
  17. package/dist-types/figure/figure-registry.d.ts +6 -2
  18. package/dist-types/figure/figure-registry.d.ts.map +1 -1
  19. package/dist-types/figure/figure-rig.d.ts +13 -4
  20. package/dist-types/figure/figure-rig.d.ts.map +1 -1
  21. package/dist-types/figure/figure-top-view.d.ts +3 -2
  22. package/dist-types/figure/figure-top-view.d.ts.map +1 -1
  23. package/dist-types/figure/index.d.ts +2 -2
  24. package/dist-types/figure/index.d.ts.map +1 -1
  25. package/dist-types/items/index.d.ts +1 -1
  26. package/dist-types/items/index.d.ts.map +1 -1
  27. package/dist-types/items/item-types.d.ts +4 -1
  28. package/dist-types/items/item-types.d.ts.map +1 -1
  29. package/dist-types/items/item.d.ts +10 -0
  30. package/dist-types/items/item.d.ts.map +1 -1
  31. package/dist-types/threed/three-capability.d.ts +1 -0
  32. package/dist-types/threed/three-capability.d.ts.map +1 -1
  33. package/package.json +2 -2
  34. package/things-scene-min.js +2 -2
  35. package/things-scene-min.js.map +1 -1
  36. package/things-scene-transfer.mjs +1 -1
  37. package/things-scene.mjs +3 -3
  38. package/things-scene.mjs.map +1 -1
  39. package/dist-types/figure/figure-status.d.ts +0 -52
  40. package/dist-types/figure/figure-status.d.ts.map +0 -1
@@ -1,52 +0,0 @@
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
- /**
9
- * What one status looks like: a colour, an effect, values for the state inputs the port offers, a clip of the port's
10
- * motion group (ADR-0051 2.3) -- any of them. `effect: null` is none. A value is in its input's own unit.
11
- */
12
- export interface FigureStatusLook {
13
- color?: string;
14
- effect?: FigureStatusEffect | null;
15
- values?: Record<string, number>;
16
- clip?: string;
17
- }
18
- /** A status template: each code's look, and `default` for a code it does not name. */
19
- export interface FigureStatusTemplate {
20
- states: Legend<FigureStatusLook>;
21
- }
22
- /** A consumer's own way to look up a status: a look, or undefined to leave it to the next. */
23
- export type FigureStatusResolver = (asked: {
24
- component: any;
25
- port: FigureStatusPort;
26
- code: string;
27
- }) => FigureStatusLook | undefined;
28
- /**
29
- * What follows the status sources: told when a resolver comes or goes, or a consumer says its answers changed -- for
30
- * every figure, or for the figures in one component.
31
- */
32
- export declare function onFigureStatusSourcesChanged(listener: (within?: unknown) => void): () => void;
33
- /**
34
- * A consumer's resolver would now answer otherwise -- its legend's content, the component a figure takes its legend
35
- * from: every figure looks its status up again, or, given a component, the figures that are it or are in it. One that
36
- * comes to the same look starts nothing again.
37
- */
38
- export declare function figureStatusSourcesChanged(within?: unknown): void;
39
- /** A consumer's resolver, asked before the board's templates. Returns what takes it away again. */
40
- export declare function registerFigureStatusResolver(resolver: FigureStatusResolver): () => void;
41
- /** Where a look came from: a consumer's resolver, or the template the placement or the board chose. */
42
- export type FigureStatusSource = 'resolver' | 'placement' | 'board';
43
- /**
44
- * A port's code as it shows, and where from: a consumer's resolver first, then the template the placement chose, then
45
- * the board's. In a template the code's own look, else its `default`. A resolver that fails is passed over and told to
46
- * `failed`.
47
- */
48
- export declare function resolveFigureStatus(component: any, port: FigureStatusPort, code: string, failed?: (error: unknown) => void): {
49
- look: FigureStatusLook;
50
- source: FigureStatusSource;
51
- } | undefined;
52
- //# sourceMappingURL=figure-status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"figure-status.d.ts","sourceRoot":"","sources":["../../src/figure/figure-status.ts"],"names":[],"mappings":"AAcA,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;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;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;AAKpI;;;GAGG;AACH,wBAAgB,4BAA4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