@jigs.design/react 0.1.2 → 0.2.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/README.md CHANGED
@@ -39,7 +39,7 @@ The program runs in a worker inside a frame served by your Jigs route. The frame
39
39
  | `SessionState`, `JigsSession` | The session's state and the hook's return value |
40
40
  | `ViewIssue` | What `onIssue` receives |
41
41
 
42
- It re-exports the shared types from `@jigs.design/runtime`. The frame, its messages and the calls through the client are `createViewController` in `@jigs.design/client`, which `JigsView` is built on; a renderer for another framework starts there.
42
+ It re-exports the shared types from `@jigs.design/protocol`. The frame, its messages and the calls through the client are `createViewController` in `@jigs.design/client`, which `JigsView` is built on; a renderer for another framework starts there.
43
43
 
44
44
  ## Source
45
45
 
package/dist/index.d.ts CHANGED
@@ -5,5 +5,5 @@ import { useHandlerSettled } from "./view/settled.js";
5
5
  import { SessionState } from "./view/session.js";
6
6
  import { JigsSession, useJigsSession } from "./view/useJigsSession.js";
7
7
  import { ConfirmFunction, ViewIssue } from "@jigs.design/client";
8
- import { Diagnostic, JigsErrorCode, JigsErrorData, Message, Program, SessionEvent, SessionOptions, Span } from "@jigs.design/runtime";
9
- export { type ConfirmFunction, type Diagnostic, type JigsErrorCode, type JigsErrorData, type JigsSession, JigsView, type Message, type Program, type Registry, type RegistryFor, type SessionEvent, type SessionOptions, type SessionState, type Span, type ViewIssue, controlled, useHandlerSettled, useJigsSession, useLocalValue };
8
+ import { Diagnostic, JigsErrorCode, JigsErrorData, Message, Program, SessionEvent, SessionOptions, Severity, Span } from "@jigs.design/protocol";
9
+ export { type ConfirmFunction, type Diagnostic, type JigsErrorCode, type JigsErrorData, type JigsSession, JigsView, type Message, type Program, type Registry, type RegistryFor, type SessionEvent, type SessionOptions, type SessionState, type Severity, type Span, type ViewIssue, controlled, useHandlerSettled, useJigsSession, useLocalValue };
@@ -1,6 +1,6 @@
1
1
  import { Registry } from "./registry.js";
2
2
  import { ConfirmFunction, JigsClient, ViewIssue } from "@jigs.design/client";
3
- import { Program } from "@jigs.design/runtime";
3
+ import { Program } from "@jigs.design/protocol";
4
4
  //#region src/view/JigsView.d.ts
5
5
  /** An action as `onAction` receives it; type it with `ActionEvent<typeof host>`. */
6
6
  interface ActionLike {
@@ -1,7 +1,7 @@
1
1
  import { SettledContext } from "./settled.js";
2
2
  import { useEffect, useState, useSyncExternalStore } from "react";
3
3
  import { createViewController, missingComponents } from "@jigs.design/client";
4
- import { ROOT_ID } from "@jigs.design/runtime";
4
+ import { ROOT_ID } from "@jigs.design/protocol";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/view/JigsView.tsx
7
7
  function TreeNodeView(props) {
@@ -1,5 +1,5 @@
1
1
  import { JigsClient } from "@jigs.design/client";
2
- import { Diagnostic, JigsErrorData, Message, Program, SessionOptions } from "@jigs.design/runtime";
2
+ import { Diagnostic, JigsErrorData, Message, Program, SessionOptions } from "@jigs.design/protocol";
3
3
  //#region src/view/session.d.ts
4
4
  export interface SessionState {
5
5
  diagnostics: ReadonlyArray<Diagnostic>;
@@ -1,6 +1,6 @@
1
1
  import { SessionState } from "./session.js";
2
2
  import { JigsClient } from "@jigs.design/client";
3
- import { Message, SessionOptions } from "@jigs.design/runtime";
3
+ import { Message, SessionOptions } from "@jigs.design/protocol";
4
4
  //#region src/view/useJigsSession.d.ts
5
5
  export interface JigsSession<TOptions extends SessionOptions = SessionOptions> extends SessionState {
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jigs.design/react",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "The web renderer: JigsView runs a compiled program in a sandbox and draws it with your registry; useJigsSession streams programs from the server.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,8 +25,8 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@jigs.design/client": "0.1.2",
29
- "@jigs.design/runtime": "0.1.2"
28
+ "@jigs.design/client": "0.2.0",
29
+ "@jigs.design/protocol": "0.2.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": "^18.0.0 || ^19.0.0"