@operato/board 10.29.92 → 10.29.93

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.
@@ -4,6 +4,7 @@ export interface FigureBlueprintsAnswer {
4
4
  type: string;
5
5
  ref: string;
6
6
  asset: unknown;
7
+ jointsChecked?: boolean;
7
8
  }[];
8
9
  refused: {
9
10
  type: string;
@@ -27,9 +28,13 @@ export declare const fetchFigureBlueprints: BlueprintsFetch;
27
28
  * `fetch` is a seam for tests — the default one talks to the server.
28
29
  */
29
30
  export declare function createFigureResolver(fetch?: BlueprintsFetch): (types: readonly string[]) => Promise<Refusals | undefined>;
30
- /** Registers one figure under the name the board asked. Anything but a figure asset is refused by name. */
31
+ /**
32
+ * Registers one figure under the name the board asked. Anything but a figure asset is refused by name. The server's word
33
+ * that its joints were checked goes with it, so the scene does not write them all again (figure-model ADR-0215).
34
+ */
31
35
  export declare function registerFigurePayload(type: string, payload: {
32
36
  asset?: unknown;
37
+ jointsChecked?: boolean;
33
38
  }): void;
34
39
  /**
35
40
  * Takes the seat. The package entry (`index.ts`) calls this, so an app that has `@operato/board`
@@ -55,12 +55,15 @@ export function createFigureResolver(fetch = fetchFigureBlueprints) {
55
55
  return { refused };
56
56
  };
57
57
  }
58
- /** Registers one figure under the name the board asked. Anything but a figure asset is refused by name. */
58
+ /**
59
+ * Registers one figure under the name the board asked. Anything but a figure asset is refused by name. The server's word
60
+ * that its joints were checked goes with it, so the scene does not write them all again (figure-model ADR-0215).
61
+ */
59
62
  export function registerFigurePayload(type, payload) {
60
63
  if (!(payload === null || payload === void 0 ? void 0 : payload.asset) || typeof payload.asset !== 'object') {
61
64
  throw new Error(`not a figure asset: ${type}`);
62
65
  }
63
- registerFigure(type, payload.asset);
66
+ registerFigure(type, payload.asset, { jointsChecked: payload.jointsChecked === true });
64
67
  }
65
68
  /**
66
69
  * Takes the seat. The package entry (`index.ts`) calls this, so an app that has `@operato/board`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/board",
3
- "version": "10.29.92",
3
+ "version": "10.29.93",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -165,6 +165,7 @@
165
165
  },
166
166
  "devDependencies": {
167
167
  "@custom-elements-manifest/analyzer": "^0.10.0",
168
+ "@hatiolab/figure-model": "^0.12.20",
168
169
  "@hatiolab/prettier-config": "^1.0.0",
169
170
  "@hatiolab/things-scene": "^10.1.123",
170
171
  "@open-wc/eslint-config": "^12.0.3",
@@ -202,5 +203,5 @@
202
203
  "prettier --write"
203
204
  ]
204
205
  },
205
- "gitHead": "70ab0f0b03aebb9e14c37e5216bd1116961786c8"
206
+ "gitHead": "88ca21118763ca3b8cf42cd9eb9809bfc1c03051"
206
207
  }