@proto-labs-inc/wire 0.2.4 → 0.3.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/index.d.ts CHANGED
@@ -190,20 +190,33 @@ export interface CommentAnchor {
190
190
  height: number;
191
191
  }
192
192
  export type RigToFrame = {
193
+ type: "rig-runtime-status";
194
+ status: "unavailable";
195
+ } | {
196
+ type: "request-rig-runtime";
197
+ contract: number;
198
+ descriptorOnly?: boolean;
199
+ } | {
193
200
  type: "request-frame-tools";
194
201
  } | {
195
202
  type: "frame-tools-status";
203
+ owner?: "desktop";
196
204
  status: "loading" | "ready" | "unavailable";
197
205
  } | {
198
206
  type: "hello";
199
207
  protocolVersion: number;
200
208
  rigVersion: string;
209
+ runtimeVersion?: string;
210
+ adapterContract?: number;
211
+ capabilities?: string[];
201
212
  /** manifest.name, so the Frame can sanity-check what it framed */
202
213
  name: string;
203
214
  } | {
204
215
  type: "state-changed";
205
216
  /** the prototype's current location.search, the full addressable state */
206
217
  search: string;
218
+ pathname?: string;
219
+ hash?: string;
207
220
  } | {
208
221
  type: "comment-target-picked";
209
222
  /** CSS selector for the exact selected element. */
package/dist/index.js CHANGED
@@ -96,7 +96,10 @@ export function isRigToFrame(d) {
96
96
  if (["comment-target-picked", "variant-set-target-picked", "target-measured"].includes(t)) {
97
97
  return typeof message.selector === "string";
98
98
  }
99
- return (t === "request-frame-tools" ||
99
+ return ((t === "rig-runtime-status" && message.status === "unavailable") ||
100
+ (t === "request-rig-runtime" && message.contract === 1 &&
101
+ (message.descriptorOnly === undefined || typeof message.descriptorOnly === "boolean")) ||
102
+ t === "request-frame-tools" ||
100
103
  (t === "frame-tools-status" && ["loading", "ready", "unavailable"].includes(message.status)) ||
101
104
  t === "hello" ||
102
105
  t === "state-changed" ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proto-labs-inc/wire",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "The typed contract between Proto's Frame and the rig inside a prototype: bridge messages and the prototype.json schema.",
5
5
  "license": "MIT",
6
6
  "repository": {