@jigs.design/client 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 +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/transport.d.ts +1 -1
- package/dist/transport.js +1 -1
- package/dist/view/controller.d.ts +2 -1
- package/dist/view/controller.js +2 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ The view calls `observe` and `mutate`; app code calls `invalidate`. `mutate(name
|
|
|
26
26
|
|
|
27
27
|
The controller trusts the program it loaded and nothing the worker says: it checks each read and mutation against the program's procedure table, has the tree store check each op against the program's prop schemas, and enforces the budgets on the page again. `drawnProps` turns a node's props into what a component takes, reading each prop's kind from the schema, never from the value.
|
|
28
28
|
|
|
29
|
-
It re-exports the shared types from `@jigs.design/
|
|
29
|
+
It re-exports the shared types from `@jigs.design/protocol`.
|
|
30
30
|
|
|
31
31
|
## Source
|
|
32
32
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HeadersOption, Transport } from "./transport.js";
|
|
2
|
-
import { Message, MutationResult, QueryResult, SessionEvent, SessionOptions } from "@jigs.design/
|
|
2
|
+
import { Message, MutationResult, QueryResult, SessionEvent, SessionOptions } from "@jigs.design/protocol";
|
|
3
3
|
//#region src/client.d.ts
|
|
4
4
|
interface CacheOptions {
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CallReply, HeadersOption, HttpTransportOptions, Transport, TransportError, httpTransport } from "./transport.js";
|
|
2
2
|
import { ClientOptions, ConfirmFunction, JigsClient, createJigsClient } from "./client.js";
|
|
3
3
|
import { ActionCall, ActionHandler, ViewController, ViewIssue, ViewStatus, createViewController, missingComponents } from "./view/controller.js";
|
|
4
|
-
import { Diagnostic, Invalidation, JigsErrorCode, JigsErrorData, Message, Program, SessionEvent, Span } from "@jigs.design/
|
|
5
|
-
export { type ActionCall, type ActionHandler, type CallReply, type ClientOptions, type ConfirmFunction, type Diagnostic, type HeadersOption, type HttpTransportOptions, type Invalidation, type JigsClient, type JigsErrorCode, type JigsErrorData, type Message, type Program, type SessionEvent, type Span, type Transport, TransportError, type ViewController, type ViewIssue, type ViewStatus, createJigsClient, createViewController, httpTransport, missingComponents };
|
|
4
|
+
import { Diagnostic, Invalidation, JigsErrorCode, JigsErrorData, Message, Program, SessionEvent, Severity, Span } from "@jigs.design/protocol";
|
|
5
|
+
export { type ActionCall, type ActionHandler, type CallReply, type ClientOptions, type ConfirmFunction, type Diagnostic, type HeadersOption, type HttpTransportOptions, type Invalidation, type JigsClient, type JigsErrorCode, type JigsErrorData, type Message, type Program, type SessionEvent, type Severity, type Span, type Transport, TransportError, type ViewController, type ViewIssue, type ViewStatus, createJigsClient, createViewController, httpTransport, missingComponents };
|
package/dist/transport.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Invalidation, JigsErrorCode, JigsErrorData, Message, ProcedureKind, SessionEvent, SessionOptions } from "@jigs.design/
|
|
1
|
+
import { Invalidation, JigsErrorCode, JigsErrorData, Message, ProcedureKind, SessionEvent, SessionOptions } from "@jigs.design/protocol";
|
|
2
2
|
//#region src/transport.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* A call's reply: the procedure's data and, for a mutation, the queries the
|
package/dist/transport.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseErrorData, parseInvalidations, parseSessionEvent } from "@jigs.design/
|
|
1
|
+
import { parseErrorData, parseInvalidations, parseSessionEvent } from "@jigs.design/protocol";
|
|
2
2
|
//#region src/transport.ts
|
|
3
3
|
/** A failure with a code the spec can read. */
|
|
4
4
|
var TransportError = class extends Error {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfirmFunction, JigsClient } from "../client.js";
|
|
2
|
-
import { Program, PropSchema, RuntimeError,
|
|
2
|
+
import { Program, PropSchema, RuntimeError, WireArg } from "@jigs.design/protocol";
|
|
3
|
+
import { TreeNode, TreeStore } from "@jigs.design/runtime";
|
|
3
4
|
//#region src/view/controller.d.ts
|
|
4
5
|
/** What the view shows beside the tree: a snapshot, replaced on each change. */
|
|
5
6
|
export interface ViewStatus {
|
package/dist/view/controller.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { frameProblem, unprotectedProblem } from "./frame-check.js";
|
|
2
|
-
import {
|
|
2
|
+
import { parseErrorData, parseProgram } from "@jigs.design/protocol";
|
|
3
|
+
import { createTreeStore } from "@jigs.design/runtime";
|
|
3
4
|
//#region src/view/controller.ts
|
|
4
5
|
const WATCHDOG_NOTICE = "Program stopped: it did not answer within a second. The sandbox was restarted.";
|
|
5
6
|
const GAVE_UP_NOTICE = "Program stopped: it did not answer within a second, again after a restart. It will not run until a new program is loaded.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigs.design/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "createJigsClient: the browser's transport and query cache. No React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@tanstack/query-core": "5.104.4",
|
|
29
|
-
"@jigs.design/
|
|
29
|
+
"@jigs.design/protocol": "0.2.0",
|
|
30
|
+
"@jigs.design/runtime": "0.2.0"
|
|
30
31
|
}
|
|
31
32
|
}
|