@arkitektio/bsx 2.3.0 → 4.0.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.
Files changed (84) hide show
  1. package/dist/bsx/language.d.ts.map +1 -1
  2. package/dist/bsx/language.js +4 -3
  3. package/dist/bsx/language.js.map +1 -1
  4. package/dist/bsx/references.d.ts +4 -2
  5. package/dist/bsx/references.d.ts.map +1 -1
  6. package/dist/bsx/references.js +34 -6
  7. package/dist/bsx/references.js.map +1 -1
  8. package/dist/catalogs/index.d.ts +27 -14
  9. package/dist/catalogs/index.d.ts.map +1 -1
  10. package/dist/catalogs/parts/index.d.ts +16 -3
  11. package/dist/catalogs/parts/index.d.ts.map +1 -1
  12. package/dist/catalogs/parts/run.d.ts +44 -4
  13. package/dist/catalogs/parts/run.d.ts.map +1 -1
  14. package/dist/catalogs/parts/run.js +33 -19
  15. package/dist/catalogs/parts/run.js.map +1 -1
  16. package/dist/catalogs/parts/scene.js +7 -7
  17. package/dist/catalogs/parts/scene.js.map +1 -1
  18. package/dist/catalogs/scene.d.ts +27 -14
  19. package/dist/catalogs/scene.d.ts.map +1 -1
  20. package/dist/catalogs/scene.js +3 -3
  21. package/dist/catalogs/scene.js.map +1 -1
  22. package/dist/ports.d.ts +0 -1
  23. package/dist/ports.d.ts.map +1 -1
  24. package/dist/ports.js +1 -2
  25. package/dist/ports.js.map +1 -1
  26. package/dist/renderer/bloks/run/components.d.ts +15 -2
  27. package/dist/renderer/bloks/run/components.d.ts.map +1 -1
  28. package/dist/renderer/bloks/run/components.js +114 -43
  29. package/dist/renderer/bloks/run/components.js.map +1 -1
  30. package/dist/renderer/bloks/run/host.d.ts +27 -8
  31. package/dist/renderer/bloks/run/host.d.ts.map +1 -1
  32. package/dist/renderer/bloks/run/host.js +8 -4
  33. package/dist/renderer/bloks/run/host.js.map +1 -1
  34. package/dist/renderer/bloks/run/index.d.ts +1 -1
  35. package/dist/renderer/bloks/run/index.d.ts.map +1 -1
  36. package/dist/renderer/bloks/run/index.js +1 -1
  37. package/dist/renderer/bloks/run/index.js.map +1 -1
  38. package/dist/renderer/bloks/run/math.d.ts +3 -20
  39. package/dist/renderer/bloks/run/math.d.ts.map +1 -1
  40. package/dist/renderer/bloks/run/math.js +4 -15
  41. package/dist/renderer/bloks/run/math.js.map +1 -1
  42. package/dist/renderer/bloks/scene/Scene.d.ts +16 -2
  43. package/dist/renderer/bloks/scene/Scene.d.ts.map +1 -1
  44. package/dist/renderer/bloks/scene/Scene.js +11 -3
  45. package/dist/renderer/bloks/scene/Scene.js.map +1 -1
  46. package/dist/scene.js +2 -2
  47. package/dist/scene.js.map +1 -1
  48. package/dist/spec/bsx_v2.json +277 -62
  49. package/dist/spec/catalogs/scene@1.json +93 -41
  50. package/dist/spec/catalogs/scene@1.json.js +93 -41
  51. package/dist/spec/catalogs.js +1 -1
  52. package/dist/spec/catalogs.js.map +1 -1
  53. package/dist/spec/vocabulary.d.ts +1 -1
  54. package/dist/spec/vocabulary.d.ts.map +1 -1
  55. package/dist/spec/vocabulary.js +1 -1
  56. package/dist/spec/vocabulary.js.map +1 -1
  57. package/dist/spec/vocabulary.json +4 -4
  58. package/dist/spec/vocabulary.json.js +4 -4
  59. package/package.json +1 -6
  60. package/src/bsx/language.test.ts +1 -0
  61. package/src/bsx/language.ts +4 -3
  62. package/src/bsx/references.ts +42 -7
  63. package/src/catalogs/parts/run.ts +39 -19
  64. package/src/catalogs/parts/scene.ts +7 -7
  65. package/src/catalogs/scene.ts +3 -3
  66. package/src/ports.ts +1 -2
  67. package/src/renderer/bloks/run/components.tsx +227 -103
  68. package/src/renderer/bloks/run/host.tsx +38 -12
  69. package/src/renderer/bloks/run/index.ts +1 -1
  70. package/src/renderer/bloks/run/math.test.ts +1 -24
  71. package/src/renderer/bloks/run/math.ts +5 -33
  72. package/src/renderer/bloks/run/run.test.tsx +44 -38
  73. package/src/renderer/bloks/scene/Scene.tsx +22 -4
  74. package/src/scene.ts +2 -2
  75. package/src/spec/bsx_v2.json +277 -62
  76. package/src/spec/catalogs/scene@1.json +93 -41
  77. package/src/spec/catalogs.ts +1 -1
  78. package/src/spec/vocabulary.json +4 -4
  79. package/src/spec/vocabulary.ts +2 -2
  80. package/dist/ports/engine/ActionDescription.d.ts +0 -27
  81. package/dist/ports/engine/ActionDescription.d.ts.map +0 -1
  82. package/dist/ports/engine/ActionDescription.js +0 -61
  83. package/dist/ports/engine/ActionDescription.js.map +0 -1
  84. package/src/ports/engine/ActionDescription.tsx +0 -78
@@ -1,22 +1,71 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import * as THREE from 'three';
4
- import { Line } from '@react-three/drei';
5
- import { anchorSchema, routeSchema } from '../../../catalogs/parts/run.js';
4
+ import { Line, TransformControls } from '@react-three/drei';
5
+ import { Move3d } from 'lucide-react';
6
+ import { placedSchema, routeSchema, spaceSchema } from '../../../catalogs/parts/run.js';
7
+ import { fromMatrix4, toMatrix4 } from '../../../vendor/core/model/affine.js';
8
+ import { Button } from '../../../vendor/core/ui/button.js';
6
9
  import { useBlok, useValue } from '../../runtime/index.js';
7
- import { ModelProvider, useOwnedModel, useSceneNotice, useSceneOverlay } from '../scene/context.js';
10
+ import { ModelProvider, SceneOwnerProvider, useOwnedModel, useSceneNotice } from '../scene/context.js';
8
11
  import { FALLBACK_SCENE_RGB, useThemeColour } from '../scene/colour.js';
9
- import { useBlokSceneEmbedded } from '../scene/host.js';
10
- import { BlokTrayProvider, useBlokRunHost, useBlokSpaceHost } from './host.js';
11
- import { progressFraction, resolveAnchors, routePoints, splitRoute, throughKeys } from './math.js';
12
+ import { BlokSceneInertProvider, useBlokSceneEmbedded, useBlokSceneStill } from '../scene/host.js';
13
+ import { SceneFrame } from '../scene/Scene.js';
14
+ import { useBlokRunHost, useBlokSpaceHost } from './host.js';
15
+ import { progressFraction, routePoints, splitRoute, throughKeys } from './math.js';
12
16
  /**
13
- * The components only an action's own blok holds: they read the run it is
14
- * shown for (scene@1). `Overlay` is the root of one drawn into the space
15
- * hosting the run, `Anchor` anchors at the agent a dependency is bound to,
16
- * and `Route` draws a line through several.
17
+ * The components that place an action's dependencies in 3D (scene@1). `Space`
18
+ * is a scene whose layout is a shared room, `Placed` draws the agent a
19
+ * dependency is bound to with that agent's own scene blok where the room keeps
20
+ * it, and `Route` draws a line through several.
17
21
  */
18
22
  const Children = ({ component, buildChild }) => (_jsx(_Fragment, { children: (component.children ?? []).map(child => (_jsx(React.Fragment, { children: buildChild(child.id) }, child.id))) }));
19
- const OverlayRender = ({ component, buildChild }) => useBlokSceneEmbedded() ? (_jsx(Children, { component: component, buildChild: buildChild })) : (_jsx("div", { className: "flex min-h-24 items-center justify-center rounded-xl border border-dashed border-border/70 bg-muted/30 px-6 text-center text-sm text-muted-foreground", children: "An overlay is drawn into the space that hosts a run of its action. Open the run in a space to see it." }));
23
+ const NO_ROOM_CONTEXT = {
24
+ room: { poseOf: () => null },
25
+ arranging: false,
26
+ standing: new Map(),
27
+ stand: () => undefined,
28
+ };
29
+ const RoomContext = React.createContext(NO_ROOM_CONTEXT);
30
+ const useRoom = () => React.useContext(RoomContext);
31
+ const samePose = (a, b) => JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
32
+ const RoomProvider = ({ room, arranging, children }) => {
33
+ const [standing, setStanding] = React.useState(() => new Map());
34
+ const stand = React.useCallback((agentId, pose) => {
35
+ setStanding(previous => {
36
+ if (samePose(previous.get(agentId), pose))
37
+ return previous;
38
+ const next = new Map(previous);
39
+ if (pose === null)
40
+ next.delete(agentId);
41
+ else
42
+ next.set(agentId, pose);
43
+ return next;
44
+ });
45
+ }, []);
46
+ const value = React.useMemo(() => ({ room, arranging, standing, stand }), [room, arranging, standing, stand]);
47
+ return _jsx(RoomContext.Provider, { value: value, children: children });
48
+ };
49
+ const ArrangeToggle = ({ arranging, onChange }) => (_jsx("div", { className: "pointer-events-auto absolute bottom-2 left-2 z-10", children: _jsxs(Button, { size: "sm", variant: arranging ? 'default' : 'outline', onClick: () => onChange(!arranging), title: arranging ? 'Done: devices stay where you left them, for everyone' : 'Move the devices of this room', children: [_jsx(Move3d, { className: "size-4" }), arranging ? 'Done' : 'Arrange'] }) }));
50
+ const SpaceRender = ({ component, buildChild }) => {
51
+ const blok = useBlok(component, spaceSchema);
52
+ const reference = useValue(blok.room) ?? '';
53
+ const room = useBlokSpaceHost().useRoom(reference);
54
+ const still = useBlokSceneStill();
55
+ const [arranging, setArranging] = React.useState(false);
56
+ // Only a room the viewer may keep can be arranged, and never while viewing the past.
57
+ const canArrange = room.save !== undefined && !still;
58
+ const moving = arranging && canArrange;
59
+ useSceneNotice(reference ? null : 'A space without a room', 'Name the room (`room="room:lab"`): where devices stand is kept by it.');
60
+ const children = (_jsx(RoomProvider, { room: room, arranging: moving, children: _jsx(BlokSceneInertProvider, { value: moving, children: _jsx(Children, { component: component, buildChild: buildChild }) }) }));
61
+ // Inside a scene that is already open, this one only adds what it holds.
62
+ if (useBlokSceneEmbedded())
63
+ return children;
64
+ return (_jsx(SceneFrame, { component: component, buildChild: buildChild, overlay: canArrange ? _jsx(ArrangeToggle, { arranging: moving, onChange: setArranging }) : null, children: children }));
65
+ };
66
+ /* -------------------------------------------------------------------------- */
67
+ /* Placed devices */
68
+ /* -------------------------------------------------------------------------- */
20
69
  const EMPTY_REPORT = {
21
70
  ref: '',
22
71
  size: 0,
@@ -28,51 +77,72 @@ const EMPTY_REPORT = {
28
77
  };
29
78
  /**
30
79
  * What stands in for a device whose model is not in the scene (yet): its
31
- * anchor, with no nodes to bind and nothing to click. A binding without a
32
- * `node` then works on the anchor; one naming a node reports it missing.
80
+ * group, with no nodes to bind and nothing to click. A binding without a
81
+ * `node` then works on the group; one naming a node reports it missing.
33
82
  */
34
83
  const standInModel = (root) => ({
35
84
  instance: { root, nodes: new Map(), rest: new Map(), clips: [], report: EMPTY_REPORT },
36
85
  addClickable: () => () => undefined,
37
86
  });
38
- /** One agent the space places: its children at its placement, bound to its model as its scene blok loaded it. */
39
- const PlacedAt = ({ agent, matrix, children, }) => {
87
+ const isPoseRows = (value) => Array.isArray(value) &&
88
+ value.length === 4 &&
89
+ value.every(row => Array.isArray(row) && row.length === 4 && row.every(cell => typeof cell === 'number' && Number.isFinite(cell)));
90
+ const IDENTITY = [
91
+ [1, 0, 0, 0],
92
+ [0, 1, 0, 0],
93
+ [0, 0, 1, 0],
94
+ [0, 0, 0, 1],
95
+ ];
96
+ /** One agent a dependency is bound to: drawn by its own scene blok where the room keeps it, its children bound to its model. */
97
+ const PlacedAgent = ({ agent, dependency, declared, blokName, children, }) => {
98
+ const { room, arranging, stand } = useRoom();
99
+ const space = useBlokSpaceHost();
100
+ const kept = room.poseOf(agent.id);
101
+ const pose = kept ?? (isPoseRows(declared) ? declared : IDENTITY);
102
+ const poseKey = JSON.stringify(pose);
103
+ // Keyed by value: a room re-read around the same pose moves nothing.
104
+ // eslint-disable-next-line react-hooks/exhaustive-deps
105
+ const matrix = React.useMemo(() => toMatrix4(pose), [poseKey]);
106
+ // eslint-disable-next-line react-hooks/exhaustive-deps
107
+ React.useEffect(() => stand(agent.id, pose), [agent.id, poseKey, stand]);
108
+ React.useEffect(() => () => stand(agent.id, null), [agent.id, stand]);
40
109
  const [group, setGroup] = React.useState(null);
110
+ const dragging = React.useRef(false);
41
111
  React.useLayoutEffect(() => {
42
- if (group)
43
- matrix.decompose(group.position, group.quaternion, group.scale);
112
+ // While the gizmo holds the group it is the gizmo's; the save on release brings the pose back.
113
+ if (!group || dragging.current)
114
+ return;
115
+ matrix.decompose(group.position, group.quaternion, group.scale);
44
116
  }, [group, matrix]);
45
117
  const device = useOwnedModel(agent.id);
46
118
  const standIn = React.useMemo(() => (group ? standInModel(group) : null), [group]);
47
119
  const model = device ?? standIn;
48
- return (_jsx("group", { ref: setGroup, name: `at:${agent.id}`, children: model ? _jsx(ModelProvider, { value: model, children: children }) : null }));
120
+ return (_jsxs(_Fragment, { children: [_jsxs("group", { ref: setGroup, name: `placed:${dependency}:${agent.id}`, children: [_jsx(SceneOwnerProvider, { value: agent.id, children: space.renderAgent(agent.id, blokName) }), model ? _jsx(ModelProvider, { value: model, children: children }) : null] }), arranging && room.save && group ? (_jsx(TransformControls, { object: group, mode: "translate", size: 0.7, onMouseDown: () => {
121
+ dragging.current = true;
122
+ }, onMouseUp: () => {
123
+ dragging.current = false;
124
+ group.updateMatrix();
125
+ // A click on the gizmo that moved nothing has nothing to keep.
126
+ if (group.matrix.equals(matrix))
127
+ return;
128
+ room.save?.(agent, dependency, fromMatrix4(group.matrix));
129
+ } })) : null] }));
49
130
  };
50
- /** One agent the space does not place: a card in the side tray, where what would point at it shows. */
51
- const TrayAt = ({ agent, dependency, children }) => {
52
- const [root] = React.useState(() => new THREE.Object3D());
53
- const model = React.useMemo(() => standInModel(root), [root]);
54
- const anchor = React.useCallback(() => null, []);
55
- useSceneOverlay({
56
- visible: true,
57
- anchor,
58
- mode: 'panel',
59
- title: agent.name,
60
- description: `Not placed in this space (${dependency})`,
61
- content: null,
62
- });
63
- return (_jsx(BlokTrayProvider, { value: agent.name, children: _jsx(ModelProvider, { value: model, children: children }) }));
64
- };
65
- const AnchorRender = ({ component, buildChild }) => {
66
- const blok = useBlok(component, anchorSchema);
131
+ const PlacedRender = ({ component, buildChild }) => {
132
+ const blok = useBlok(component, placedSchema);
67
133
  const dependency = useValue(blok.dep);
134
+ const blokName = useValue(blok.blok) ?? null;
135
+ const declared = useValue(blok.matrix);
68
136
  const run = useBlokRunHost();
69
- const space = useBlokSpaceHost();
70
137
  const agents = React.useMemo(() => (dependency ? run.agentsFor(dependency) : []), [dependency, run]);
71
- const anchors = React.useMemo(() => resolveAnchors(agents, space.placementOf), [agents, space]);
72
138
  useSceneNotice(dependency && agents.length === 0 ? `Nothing is bound to "${dependency}"` : null, 'The run has no agent for this dependency, so nothing is drawn for it.');
139
+ useSceneNotice(declared !== undefined && declared !== null && !isPoseRows(declared) ? 'A placement that is not a matrix' : null, `"${dependency}" stands at the room's origin: its matrix is not four rows of four numbers.`);
73
140
  const children = _jsx(Children, { component: component, buildChild: buildChild });
74
- return (_jsxs(_Fragment, { children: [anchors.placed.map(({ agent, matrix }) => (_jsx(PlacedAt, { agent: agent, matrix: matrix, children: children }, agent.id))), anchors.unplaced.map(agent => (_jsx(TrayAt, { agent: agent, dependency: dependency ?? '', children: children }, agent.id)))] }));
141
+ return (_jsx(_Fragment, { children: agents.map(agent => (_jsx(PlacedAgent, { agent: agent, dependency: dependency ?? '', declared: declared, blokName: blokName, children: children }, agent.id))) }));
75
142
  };
143
+ /* -------------------------------------------------------------------------- */
144
+ /* Route */
145
+ /* -------------------------------------------------------------------------- */
76
146
  const ROUTE_COLOR = 'chart-1';
77
147
  /** Corners as plain triples: `Line` reads a Vector3 by `instanceof`, which a second copy of three fails. */
78
148
  const triples = (points) => points.map(point => [point.x, point.y, point.z]);
@@ -82,18 +152,19 @@ const RouteRender = ({ component }) => {
82
152
  const progress = useValue(blok.progress) ?? undefined;
83
153
  const color = useThemeColour(useValue(blok.color) || ROUTE_COLOR) ?? FALLBACK_SCENE_RGB;
84
154
  const run = useBlokRunHost();
85
- const space = useBlokSpaceHost();
155
+ const { standing } = useRoom();
86
156
  const keys = React.useMemo(() => throughKeys(through), [through]);
87
- const points = React.useMemo(() => routePoints(keys, run.agentsFor, space.placementOf), [keys, run, space]);
157
+ const placementOf = React.useCallback((agentId) => standing.get(agentId) ?? null, [standing]);
158
+ const points = React.useMemo(() => routePoints(keys, run.agentsFor, placementOf), [keys, run, placementOf]);
88
159
  const split = React.useMemo(() => splitRoute(points, progress === undefined ? 1 : progressFraction(progress)), [points, progress]);
89
- useSceneNotice(keys.length >= 2 && points.length < 2 ? 'A route with nowhere to go' : null, `Fewer than two of ${keys.join(', ')} stand in this space.`);
160
+ useSceneNotice(keys.length >= 2 && points.length < 2 ? 'A route with nowhere to go' : null, `Fewer than two of ${keys.join(', ')} are placed in this space.`);
90
161
  if (!split.head)
91
162
  return null;
92
163
  return (_jsxs("group", { name: "route", children: [split.travelled.length >= 2 ? _jsx(Line, { points: triples(split.travelled), color: color, lineWidth: 3 }) : null, split.ahead.length >= 2 && progress !== undefined ? (_jsx(Line, { points: triples(split.ahead), color: color, lineWidth: 2, dashed: true, dashSize: 0.04, gapSize: 0.03, transparent: true, opacity: 0.5 })) : null, progress !== undefined ? (_jsxs("mesh", { position: split.head, raycast: () => null, children: [_jsx("sphereGeometry", { args: [0.02, 16, 16] }), _jsx("meshBasicMaterial", { color: color, toneMapped: false })] })) : null] }));
93
164
  };
94
165
  export const runRenders = {
95
- Overlay: OverlayRender,
96
- Anchor: AnchorRender,
166
+ Space: SpaceRender,
167
+ Placed: PlacedRender,
97
168
  Route: RouteRender,
98
169
  };
99
170
  //# sourceMappingURL=components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/components.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAE,WAAW,EAAoB,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAuC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAyB,MAAM,kBAAkB,CAAC;AACvH,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAoB,MAAM,QAAQ,CAAC;AAC7F,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAA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IAAI,IACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,WAAW;CACnB,CAAC"}
@@ -2,10 +2,11 @@ import * as React from 'react';
2
2
  /**
3
3
  * What an action's own blok needs from the app that shows a run of it.
4
4
  *
5
- * The blok core draws `Anchor`, `Route` and `ask`; it does not know which
6
- * agents a run got, where they stand, or how an ask is answered. The host
7
- * answers those through these contexts: the run (rekuest, from the task or a
8
- * dry run) and the space it is drawn into (rekuest's space scene).
5
+ * The blok core draws `Space`, `Placed`, `Route` and `ask`; it does not know
6
+ * which agents a run got, how an agent's own scene blok is found, where a room
7
+ * keeps its devices, or how an ask is answered. The host answers those through
8
+ * these contexts: the run (rekuest, from the task or a dry run) and the rooms
9
+ * (rekuest's spaces, kept on the server).
9
10
  *
10
11
  * Both are provided around the scene surface, not inside the canvas: a
11
12
  * `Popout`'s card is rendered by the scene's HTML half, outside the blok.
@@ -23,13 +24,31 @@ export type BlokRunHost = {
23
24
  };
24
25
  export declare const BlokRunHostProvider: React.Provider<BlokRunHost>;
25
26
  export declare const useBlokRunHost: () => BlokRunHost;
27
+ /** A 4x4 affine as four rows, in meters with Y up: what a room keeps per device. */
28
+ export type BlokPose = number[][];
26
29
  /**
27
- * The space an overlay is drawn into: where each agent stands in it, as the
28
- * 4x4 affine its placement keeps (rows, meters, Y up).
30
+ * One room as the host keeps it: where people left its devices. Shared, so a
31
+ * device moved by one viewer stands there for every other.
29
32
  */
33
+ export type BlokRoom = {
34
+ /** Where someone left the agent in this room; null where nobody moved it (its `Placed` decides). */
35
+ poseOf: (agentId: string) => BlokPose | null;
36
+ /**
37
+ * Keep where the agent stands now, for everyone; `dependency` is the key it
38
+ * was placed under. Absent where the viewer may not arrange the room.
39
+ */
40
+ save?: (agent: BlokRunAgent, dependency: string, pose: BlokPose) => void;
41
+ /** Forget where the agent was left, so its `Placed` decides again. */
42
+ reset?: (agent: BlokRunAgent) => void;
43
+ };
30
44
  export type BlokSpaceHost = {
31
- /** The stored affine of the agent's placement; null where the space does not place it. */
32
- placementOf: (agentId: string) => unknown;
45
+ /** The room a `Space` names (`room="room:helsinki-lab"`). A hook. */
46
+ useRoom: (room: string) => BlokRoom;
47
+ /**
48
+ * Draw the agent with its own scene blok, inside the scene that is open: its
49
+ * default scene blok, or the one named. Nothing where it has none.
50
+ */
51
+ renderAgent: (agentId: string, blok: string | null) => React.ReactNode;
33
52
  };
34
53
  export declare const BlokSpaceHostProvider: React.Provider<BlokSpaceHost>;
35
54
  export declare const useBlokSpaceHost: () => BlokSpaceHost;
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;GAUG;AAEH,gDAAgD;AAChD,MAAM,MAAM,YAAY,GAAG;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG;IACxB,2FAA2F;IAC3F,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,YAAY,EAAE,CAAC;IACpD,qGAAqG;IACrG,SAAS,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAClC,CAAC;AAWF,eAAO,MAAM,mBAAmB,6BAA8B,CAAC;AAE/D,eAAO,MAAM,cAAc,QAAO,WAAmD,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,0FAA0F;IAC1F,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,CAAC;AAMF,eAAO,MAAM,qBAAqB,+BAAgC,CAAC;AAEnE,eAAO,MAAM,gBAAgB,QAAO,aAAuD,CAAC;AAQ5F,eAAO,MAAM,gBAAgB,+B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G,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;CACxE,CAAC;AAWF,eAAO,MAAM,qBAAqB,+BAAgC,CAAC;AAEnE,eAAO,MAAM,gBAAgB,QAAO,aAAuD,CAAC;AAQ5F,eAAO,MAAM,gBAAgB,+BAA2B,CAAC;AAEzD,eAAO,MAAM,WAAW,QAAO,MAAM,GAAG,IAAyC,CAAC"}
@@ -7,13 +7,17 @@ const DETACHED_RUN = {
7
7
  const BlokRunHostContext = React.createContext(DETACHED_RUN);
8
8
  export const BlokRunHostProvider = BlokRunHostContext.Provider;
9
9
  export const useBlokRunHost = () => React.useContext(BlokRunHostContext);
10
- const NO_SPACE = { placementOf: () => null };
11
- const BlokSpaceHostContext = React.createContext(NO_SPACE);
10
+ const NO_ROOM = { poseOf: () => null };
11
+ const DETACHED_SPACE = {
12
+ useRoom: () => NO_ROOM,
13
+ renderAgent: () => null,
14
+ };
15
+ const BlokSpaceHostContext = React.createContext(DETACHED_SPACE);
12
16
  export const BlokSpaceHostProvider = BlokSpaceHostContext.Provider;
13
17
  export const useBlokSpaceHost = () => React.useContext(BlokSpaceHostContext);
14
18
  /**
15
- * Set below an `At` whose agent the space does not place: what would point at
16
- * the device (a `Popout`) shows in the side tray instead, under this title.
19
+ * Set where what would point at a device has nothing to point at: a `Popout`
20
+ * then shows in the side tray instead, under this title.
17
21
  */
18
22
  const BlokTrayContext = React.createContext(null);
19
23
  export const BlokTrayProvider = BlokTrayContext.Provider;
@@ -1 +1 @@
1
- {"version":3,"file":"host.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAwB/B,MAAM,SAAS,GAA4B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE7D,MAAM,YAAY,GAAgB;IAChC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS;IAC1B,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI;CACtB,CAAC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,kBAAkB,CAAC,QAAQ,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAgB,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AA+BtF,MAAM,OAAO,GAAa,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,EAAC,CAAC;AAE/C,MAAM,cAAc,GAAkB;IACpC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO;IACtB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;CACxB,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAgB,cAAc,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAkB,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAE5F;;;GAGG;AACH,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAgB,IAAI,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAkB,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { runRenders } from './components';
2
2
  export * from './host';
3
- export { progressFraction, resolveAnchors, routePoints, splitRoute, throughKeys } from './math';
3
+ export { progressFraction, routePoints, splitRoute, throughKeys } from './math';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { runRenders } from './components.js';
2
2
  export * from './host.js';
3
- export { progressFraction, resolveAnchors, routePoints, splitRoute, throughKeys } from './math.js';
3
+ export { progressFraction, routePoints, splitRoute, throughKeys } from './math.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC"}
@@ -1,26 +1,9 @@
1
- import { Matrix4, Vector3 } from 'three';
1
+ import { Vector3 } from 'three';
2
2
  import type { BlokRunAgent } from './host';
3
3
  /**
4
- * Where the agents of a run stand in the space it is drawn into: pure, so the
5
- * placement of an `At` and the line of a `Route` are worked out (and tested)
6
- * without a canvas.
4
+ * Where the agents of a run stand in the room a `Space` keeps: pure, so the
5
+ * line of a `Route` is worked out (and tested) without a canvas.
7
6
  */
8
- /** An agent the space places, at its placement's matrix. */
9
- export type PlacedRunAgent = {
10
- agent: BlokRunAgent;
11
- matrix: Matrix4;
12
- };
13
- export type RunAnchors = {
14
- /** The agents bound to the key that stand in the space, in binding order. */
15
- placed: PlacedRunAgent[];
16
- /** The agents bound to the key the space does not place: shown in the side tray. */
17
- unplaced: BlokRunAgent[];
18
- };
19
- /**
20
- * Where an `<At dependency=key>` draws: at every agent the run binds the key
21
- * to that the space places, and in the tray for every one it does not.
22
- */
23
- export declare const resolveAnchors: (agents: readonly BlokRunAgent[], placementOf: (agentId: string) => unknown) => RunAnchors;
24
7
  /**
25
8
  * The dependency keys a `through` names: a list, or the text BSX writes for
26
9
  * one (`"['robot', 'frame']"`, `'["robot"]'`, `"robot, frame"`), read as the
@@ -1 +1 @@
1
- {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEzC;;;;GAIG;AAEH,4DAA4D;AAC5D,MAAM,MAAM,cAAc,GAAG;IAAC,KAAK,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG;IACvB,6EAA6E;IAC7E,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,oFAAoF;IACpF,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,SAAS,YAAY,EAAE,EAC/B,aAAa,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,KACxC,UAQF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAAM,EASlD,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,UAAU,OAA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,UAAU,GAAG;IACvB,6DAA6D;IAC7D,SAAS,EAAE,OAAO,EAAE,CAAC;IACrB,2DAA2D;IAC3D,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,kFAAkF;IAClF,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,UAAU,GAAI,QAAQ,SAAS,OAAO,EAAE,EAAE,UAAU,MAAM,KAAG,UAoBzE,CAAC"}
@@ -1,21 +1,9 @@
1
- import { Matrix4, Vector3 } from 'three';
1
+ import { Vector3 } from 'three';
2
2
  import { toMatrix4 } from '../../../vendor/core/model/affine.js';
3
- const isPlaced = (affine) => affine !== null && affine !== undefined;
4
3
  /**
5
- * Where an `<At dependency=key>` draws: at every agent the run binds the key
6
- * to that the space places, and in the tray for every one it does not.
4
+ * Where the agents of a run stand in the room a `Space` keeps: pure, so the
5
+ * line of a `Route` is worked out (and tested) without a canvas.
7
6
  */
8
- export const resolveAnchors = (agents, placementOf) => {
9
- const anchors = { placed: [], unplaced: [] };
10
- for (const agent of agents) {
11
- const affine = placementOf(agent.id);
12
- if (isPlaced(affine))
13
- anchors.placed.push({ agent, matrix: toMatrix4(affine) });
14
- else
15
- anchors.unplaced.push(agent);
16
- }
17
- return anchors;
18
- };
19
7
  /**
20
8
  * The dependency keys a `through` names: a list, or the text BSX writes for
21
9
  * one (`"['robot', 'frame']"`, `'["robot"]'`, `"robot, frame"`), read as the
@@ -34,6 +22,7 @@ export const throughKeys = (value) => {
34
22
  .map(item => item.trim().replace(/^['"]+|['"]+$/g, '').trim())
35
23
  .filter(item => item !== '');
36
24
  };
25
+ const isPlaced = (affine) => affine !== null && affine !== undefined;
37
26
  /** How far above a placement's origin the route runs, in meters: over the floor, under most devices. */
38
27
  export const ROUTE_LIFT = 0.05;
39
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/math.ts"],"names":[],"mappings":"AAAA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AAC"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { type BlokRender } from '../../runtime';
3
- import type { sceneContracts } from '../../../catalogs/parts/scene';
2
+ import { type BlokRender, type BlokRenderArgs } from '../../runtime';
3
+ import { type sceneContracts } from '../../../catalogs/parts/scene';
4
4
  import { type SceneView } from './context';
5
5
  /**
6
6
  * Points the camera at what is in the scene.
@@ -44,6 +44,20 @@ type SceneSurfaceProps = {
44
44
  */
45
45
  export declare const SceneSurface: ({ view, grid, className, style, frameRef, onPointerMissed, overlay, children, pose, onPoseChange, }: SceneSurfaceProps) => React.JSX.Element;
46
46
  type Contracts = typeof sceneContracts;
47
+ type SceneRenderArgs = BlokRenderArgs<Contracts['Scene']['schema']>;
48
+ export type SceneFrameProps = Pick<SceneRenderArgs, 'component' | 'buildChild'> & {
49
+ /** HTML over the canvas (beside the scene's own controls). */
50
+ overlay?: React.ReactNode;
51
+ /** What the scene holds; the component's children when left out. */
52
+ children?: React.ReactNode;
53
+ };
54
+ /**
55
+ * A scene with a canvas of its own, sized and kept as a `Scene` asks: its
56
+ * camera, grid, height and (with `persist`) the viewer's camera on this device.
57
+ * A `Space` is one too, with its room around what it holds. The props are read
58
+ * through the scene schema, which every such root extends.
59
+ */
60
+ export declare const SceneFrame: ({ component, buildChild, overlay, children }: SceneFrameProps) => React.JSX.Element;
47
61
  export declare const SceneRender: BlokRender<Contracts['Scene']>;
48
62
  export {};
49
63
  //# sourceMappingURL=Scene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/scene/Scene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AAsB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,sBA6CnB,CAAC;AAEF,KAAK,SAAS,GAAG,OAAO,cAAc,CAAC;AAEvC,KAAK,eAAe,GAAG,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAUpE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,YAAY,CAAC,GAAG;IAChF,8DAA8D;IAC9D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,8CAA4C,eAAe,sBAqCrF,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAOpD,CAAC"}
@@ -11,6 +11,7 @@ import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitl
11
11
  import { cn } from '../../../vendor/core/util/utils.js';
12
12
  import { Switch } from '../../../vendor/core/ui/switch.js';
13
13
  import { BlokNodeErrorSurface, useBlok, useValue, } from '../../runtime/index.js';
14
+ import { sceneSchema } from '../../../catalogs/parts/scene.js';
14
15
  import { createSceneStore, SceneStoreProvider, useSceneNotice, useSceneState, useSceneStoreApi, } from './context.js';
15
16
  import { BlokSceneEmbedProvider, useBlokSceneEmbedded, useBlokSceneFill } from './host.js';
16
17
  import { useKeepTabLive } from "../../../platform.js";
@@ -414,8 +415,14 @@ export const SceneSurface = ({ view = 'iso', grid = true, className, style, fram
414
415
  }, children: _jsx(SceneStoreProvider, { value: store, children: _jsx(BlokNodeErrorSurface.Provider, { value: SceneErrorSurface, children: _jsxs(BlokSceneEmbedProvider, { value: true, children: [_jsx("ambientLight", { intensity: 0.7 }), _jsx("directionalLight", { position: [2, 4, 3], intensity: 1.6 }), _jsx("directionalLight", { position: [-3, 2, -2], intensity: 0.5 }), _jsx(SceneGrid, {}), _jsx(SceneOrbitControls, {}), _jsx(CameraRig, { pose: pose }), onPoseChange ? _jsx(PoseKeeper, { onPoseChange: onPoseChange }) : null, children, _jsx(OverlayTracker, { cards: cards }), snapshot && _jsx(FirstFrames, {})] }) }) }) }), _jsx(SceneOverlays, { cards: cards }), _jsx(SceneControls, {}), overlay] }) }));
415
416
  };
416
417
  const SceneChildren = ({ component, buildChild }) => (_jsx(_Fragment, { children: (component.children ?? []).map(child => (_jsx(React.Fragment, { children: buildChild(child.id) }, child.id))) }));
417
- const StandaloneScene = ({ component, schema, buildChild }) => {
418
- const blok = useBlok(component, schema);
418
+ /**
419
+ * A scene with a canvas of its own, sized and kept as a `Scene` asks: its
420
+ * camera, grid, height and (with `persist`) the viewer's camera on this device.
421
+ * A `Space` is one too, with its room around what it holds. The props are read
422
+ * through the scene schema, which every such root extends.
423
+ */
424
+ export const SceneFrame = ({ component, buildChild, overlay, children }) => {
425
+ const blok = useBlok(component, sceneSchema);
419
426
  const camera = useValue(blok.camera) ?? 'iso';
420
427
  const grid = useValue(blok.grid) ?? true;
421
428
  const declaredHeight = useValue(blok.height);
@@ -437,8 +444,9 @@ const StandaloneScene = ({ component, schema, buildChild }) => {
437
444
  // A kept pose is read before the scene starts: it starts where the viewer left it.
438
445
  if (!kept.loaded)
439
446
  return _jsx("div", { ref: frameRef, className: "relative w-full", style: { height } });
440
- return (_jsx(SceneSurface, { view: camera, grid: grid, pose: kept.initial, onPoseChange: persist ? kept.save : undefined, frameRef: frameRef, className: fill ? 'relative w-full overflow-hidden' : 'relative w-full overflow-hidden rounded-xl bg-muted/20', style: { height }, children: _jsx(SceneChildren, { component: component, buildChild: buildChild }) }));
447
+ return (_jsx(SceneSurface, { view: camera, grid: grid, pose: kept.initial, onPoseChange: persist ? kept.save : undefined, frameRef: frameRef, className: fill ? 'relative w-full overflow-hidden' : 'relative w-full overflow-hidden rounded-xl bg-muted/20', style: { height }, overlay: overlay, children: children ?? _jsx(SceneChildren, { component: component, buildChild: buildChild }) }));
441
448
  };
449
+ const StandaloneScene = ({ component, buildChild }) => (_jsx(SceneFrame, { component: component, buildChild: buildChild }));
442
450
  export const SceneRender = args =>
443
451
  // Inside a scene that is already open, this one only adds what it holds:
444
452
  // the camera, grid and size are the surrounding scene's.