oui-spec 0.6.0 → 0.7.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 +28 -20
- package/dist/chunk-2CPOHQGI.cjs +463 -0
- package/dist/chunk-2CPOHQGI.cjs.map +1 -0
- package/dist/{chunk-VQETSIY5.js → chunk-4MEYE6XZ.js} +244 -37
- package/dist/chunk-4MEYE6XZ.js.map +1 -0
- package/dist/{chunk-AFNWLRKV.cjs → chunk-DOJXITEZ.cjs} +248 -41
- package/dist/chunk-DOJXITEZ.cjs.map +1 -0
- package/dist/{chunk-F3SKRAGU.cjs → chunk-FSGB5JNJ.cjs} +5 -3
- package/dist/chunk-FSGB5JNJ.cjs.map +1 -0
- package/dist/chunk-RZUYWZFK.js +431 -0
- package/dist/chunk-RZUYWZFK.js.map +1 -0
- package/dist/{chunk-NYCJZQSP.js → chunk-UOTAHGIV.js} +5 -3
- package/dist/chunk-UOTAHGIV.js.map +1 -0
- package/dist/core/index.cjs +6 -6
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +2 -2
- package/dist/index.cjs +108 -20
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/react/index.cjs +6 -6
- package/dist/react/index.d.cts +7 -6
- package/dist/react/index.d.ts +7 -6
- package/dist/react/index.js +1 -1
- package/dist/spec/index.cjs +98 -10
- package/dist/spec/index.d.cts +76 -4
- package/dist/spec/index.d.ts +76 -4
- package/dist/spec/index.js +1 -1
- package/dist/{surface-runtime-D5nINY4b.d.ts → surface-runtime-BPEtT3LZ.d.ts} +30 -6
- package/dist/{surface-runtime-CSZ9UtBO.d.cts → surface-runtime-CexHqUn-.d.cts} +30 -6
- package/dist/transport/index.d.cts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/{types-CmJb1BQ8.d.cts → types-CnlVRPFL.d.cts} +92 -2
- package/dist/{types-CmJb1BQ8.d.ts → types-CnlVRPFL.d.ts} +92 -2
- package/dist/{websocket-Ce3tDSsJ.d.ts → websocket-DKL9qoO-.d.ts} +1 -1
- package/dist/{websocket-Ds2Rh_jL.d.cts → websocket-HnzPlfk6.d.cts} +1 -1
- package/package.json +35 -41
- package/spec/OUI-SPEC-v0.1.md +116 -7
- package/dist/chunk-AFNWLRKV.cjs.map +0 -1
- package/dist/chunk-B2EFZMGY.js +0 -159
- package/dist/chunk-B2EFZMGY.js.map +0 -1
- package/dist/chunk-F3SKRAGU.cjs.map +0 -1
- package/dist/chunk-LDECTDPU.cjs +0 -169
- package/dist/chunk-LDECTDPU.cjs.map +0 -1
- package/dist/chunk-NYCJZQSP.js.map +0 -1
- package/dist/chunk-VQETSIY5.js.map +0 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { J as JSONSchema, O as OUIAction,
|
|
3
|
-
import { D as DefinedSurface, O as OUIBranded } from '../surface-runtime-
|
|
4
|
-
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, M as MountedSurface, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as
|
|
5
|
-
import { S as SocketLike, e as OUITransportConfig, d as OUITransport } from '../websocket-
|
|
1
|
+
import { r as OUISurface } from '../types-CnlVRPFL.cjs';
|
|
2
|
+
export { J as JSONSchema, O as OUIAction, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, m as OUIObservation, n as OUIObservationSnapshot, o as OUIObservationUpdate, p as OUIProtocolEvent, s as OUISurfaceDeregistration, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, y as OUI_PROTOCOL_EVENTS } from '../types-CnlVRPFL.cjs';
|
|
3
|
+
import { D as DefinedSurface, O as OUIBranded } from '../surface-runtime-CexHqUn-.cjs';
|
|
4
|
+
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, M as MountedSurface, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as SurfaceForm, f as SurfaceRuntime, g as SurfaceRuntimeOptions, h as createSurfaceRuntime, i as defineSurface } from '../surface-runtime-CexHqUn-.cjs';
|
|
5
|
+
import { S as SocketLike, e as OUITransportConfig, d as OUITransport } from '../websocket-HnzPlfk6.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Compile-time validation for a createOUI configuration.
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { J as JSONSchema, O as OUIAction,
|
|
3
|
-
import { D as DefinedSurface, O as OUIBranded } from '../surface-runtime-
|
|
4
|
-
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, M as MountedSurface, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as
|
|
5
|
-
import { S as SocketLike, e as OUITransportConfig, d as OUITransport } from '../websocket-
|
|
1
|
+
import { r as OUISurface } from '../types-CnlVRPFL.js';
|
|
2
|
+
export { J as JSONSchema, O as OUIAction, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, m as OUIObservation, n as OUIObservationSnapshot, o as OUIObservationUpdate, p as OUIProtocolEvent, s as OUISurfaceDeregistration, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, y as OUI_PROTOCOL_EVENTS } from '../types-CnlVRPFL.js';
|
|
3
|
+
import { D as DefinedSurface, O as OUIBranded } from '../surface-runtime-BPEtT3LZ.js';
|
|
4
|
+
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, M as MountedSurface, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as SurfaceForm, f as SurfaceRuntime, g as SurfaceRuntimeOptions, h as createSurfaceRuntime, i as defineSurface } from '../surface-runtime-BPEtT3LZ.js';
|
|
5
|
+
import { S as SocketLike, e as OUITransportConfig, d as OUITransport } from '../websocket-DKL9qoO-.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Compile-time validation for a createOUI configuration.
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { createOUI, createSurfaceRuntime, defineSurface } from '../chunk-
|
|
2
|
-
export { OUI_PROTOCOL_EVENTS } from '../chunk-
|
|
1
|
+
export { createOUI, createSurfaceRuntime, defineSurface } from '../chunk-4MEYE6XZ.js';
|
|
2
|
+
export { OUI_PROTOCOL_EVENTS } from '../chunk-RZUYWZFK.js';
|
|
3
3
|
import '../chunk-R3SGP2UY.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkDOJXITEZ_cjs = require('./chunk-DOJXITEZ.cjs');
|
|
4
|
+
var chunk2CPOHQGI_cjs = require('./chunk-2CPOHQGI.cjs');
|
|
5
|
+
var chunkFSGB5JNJ_cjs = require('./chunk-FSGB5JNJ.cjs');
|
|
6
6
|
var chunkROGKEMLL_cjs = require('./chunk-ROGKEMLL.cjs');
|
|
7
7
|
var chunk5UUJ3F7C_cjs = require('./chunk-5UUJ3F7C.cjs');
|
|
8
8
|
|
|
@@ -10,71 +10,159 @@ var chunk5UUJ3F7C_cjs = require('./chunk-5UUJ3F7C.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "createOUI", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkDOJXITEZ_cjs.createOUI; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createSurfaceRuntime", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkDOJXITEZ_cjs.createSurfaceRuntime; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "defineSurface", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkDOJXITEZ_cjs.defineSurface; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ARGS_HASH_PATTERN", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk2CPOHQGI_cjs.ARGS_HASH_PATTERN; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "FIT_LIST_STEPS", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunk2CPOHQGI_cjs.FIT_LIST_STEPS; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "FIT_TEXT_CHARS", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunk2CPOHQGI_cjs.FIT_TEXT_CHARS; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "INDEX_DESCRIPTION_CHARS", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunk2CPOHQGI_cjs.INDEX_DESCRIPTION_CHARS; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "INDEX_INPUT_CHARS", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunk2CPOHQGI_cjs.INDEX_INPUT_CHARS; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "INDEX_INPUT_PROPERTIES", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunk2CPOHQGI_cjs.INDEX_INPUT_PROPERTIES; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "OUI_DESCRIBE_ACTION", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_DESCRIBE_ACTION; }
|
|
26
50
|
});
|
|
27
51
|
Object.defineProperty(exports, "OUI_EFFECT_ACCESS", {
|
|
28
52
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_EFFECT_ACCESS; }
|
|
30
54
|
});
|
|
31
55
|
Object.defineProperty(exports, "OUI_EFFECT_KINDS", {
|
|
32
56
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_EFFECT_KINDS; }
|
|
34
58
|
});
|
|
35
59
|
Object.defineProperty(exports, "OUI_PROTOCOL_EVENTS", {
|
|
36
60
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_PROTOCOL_EVENTS; }
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, "OUI_READ_ACTION", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_READ_ACTION; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "OUI_RUNTIME_SURFACE", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_RUNTIME_SURFACE; }
|
|
38
70
|
});
|
|
39
71
|
Object.defineProperty(exports, "argsHash", {
|
|
40
72
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk2CPOHQGI_cjs.argsHash; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "atPointer", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunk2CPOHQGI_cjs.atPointer; }
|
|
42
78
|
});
|
|
43
79
|
Object.defineProperty(exports, "canonicalJson", {
|
|
44
80
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk2CPOHQGI_cjs.canonicalJson; }
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "constantOf", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return chunk2CPOHQGI_cjs.constantOf; }
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "definitionHash", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () { return chunk2CPOHQGI_cjs.definitionHash; }
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "discriminatorOf", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return chunk2CPOHQGI_cjs.discriminatorOf; }
|
|
46
94
|
});
|
|
47
95
|
Object.defineProperty(exports, "effectAccess", {
|
|
48
96
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunk2CPOHQGI_cjs.effectAccess; }
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, "firstSentence", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () { return chunk2CPOHQGI_cjs.firstSentence; }
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "fitObservations", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () { return chunk2CPOHQGI_cjs.fitObservations; }
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(exports, "indexEntry", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: function () { return chunk2CPOHQGI_cjs.indexEntry; }
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "jsonBytes", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () { return chunk2CPOHQGI_cjs.jsonBytes; }
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "pointerStep", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () { return chunk2CPOHQGI_cjs.pointerStep; }
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(exports, "pointerSteps", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () { return chunk2CPOHQGI_cjs.pointerSteps; }
|
|
50
122
|
});
|
|
51
123
|
Object.defineProperty(exports, "requiresApproval", {
|
|
52
124
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunk2CPOHQGI_cjs.requiresApproval; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "sortedJson", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return chunk2CPOHQGI_cjs.sortedJson; }
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(exports, "summarizeInput", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () { return chunk2CPOHQGI_cjs.summarizeInput; }
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, "surfaceIndex", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return chunk2CPOHQGI_cjs.surfaceIndex; }
|
|
54
138
|
});
|
|
55
139
|
Object.defineProperty(exports, "surfacesHash", {
|
|
56
140
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunk2CPOHQGI_cjs.surfacesHash; }
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, "utf8Length", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () { return chunk2CPOHQGI_cjs.utf8Length; }
|
|
58
146
|
});
|
|
59
147
|
Object.defineProperty(exports, "SurfaceRuntimeProvider", {
|
|
60
148
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkFSGB5JNJ_cjs.SurfaceRuntimeProvider; }
|
|
62
150
|
});
|
|
63
151
|
Object.defineProperty(exports, "useObservation", {
|
|
64
152
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkFSGB5JNJ_cjs.useObservation; }
|
|
66
154
|
});
|
|
67
155
|
Object.defineProperty(exports, "useSurface", {
|
|
68
156
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkFSGB5JNJ_cjs.useSurface; }
|
|
70
158
|
});
|
|
71
159
|
Object.defineProperty(exports, "useSurfaceHold", {
|
|
72
160
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkFSGB5JNJ_cjs.useSurfaceHold; }
|
|
74
162
|
});
|
|
75
163
|
Object.defineProperty(exports, "useSurfaceRuntime", {
|
|
76
164
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkFSGB5JNJ_cjs.useSurfaceRuntime; }
|
|
78
166
|
});
|
|
79
167
|
Object.defineProperty(exports, "createDirectTransportPair", {
|
|
80
168
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as
|
|
2
|
-
export { surfacesHash } from './spec/index.cjs';
|
|
3
|
-
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, D as DefinedSurface, M as MountedSurface, O as OUIBranded, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as
|
|
1
|
+
export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as OUIActionIndexEntry, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, k as OUIFitCut, l as OUIIndexSnapshot, m as OUIObservation, n as OUIObservationSnapshot, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, r as OUISurface, s as OUISurfaceDeregistration, t as OUISurfaceIndex, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from './types-CnlVRPFL.cjs';
|
|
2
|
+
export { FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, atPointer, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, jsonBytes, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length } from './spec/index.cjs';
|
|
3
|
+
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, D as DefinedSurface, M as MountedSurface, O as OUIBranded, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as SurfaceForm, f as SurfaceRuntime, g as SurfaceRuntimeOptions, h as createSurfaceRuntime, i as defineSurface } from './surface-runtime-CexHqUn-.cjs';
|
|
4
4
|
export { DuplicateIds, OUIConfig, OUIConfigError, OUIInstance, OwnedTransport, ValidateSurfaceIds, createOUI } from './core/index.cjs';
|
|
5
5
|
export { SurfaceRuntimeProvider, SurfaceRuntimeProviderProps, UseSurfaceOptions, UseSurfaceResult, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './react/index.cjs';
|
|
6
|
-
export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-
|
|
6
|
+
export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-HnzPlfk6.cjs';
|
|
7
7
|
export { createDirectTransportPair } from './transport/index.cjs';
|
|
8
8
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as
|
|
2
|
-
export { surfacesHash } from './spec/index.js';
|
|
3
|
-
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, D as DefinedSurface, M as MountedSurface, O as OUIBranded, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as
|
|
1
|
+
export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as OUIActionIndexEntry, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, k as OUIFitCut, l as OUIIndexSnapshot, m as OUIObservation, n as OUIObservationSnapshot, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, r as OUISurface, s as OUISurfaceDeregistration, t as OUISurfaceIndex, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from './types-CnlVRPFL.js';
|
|
2
|
+
export { FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, atPointer, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, jsonBytes, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length } from './spec/index.js';
|
|
3
|
+
export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, D as DefinedSurface, M as MountedSurface, O as OUIBranded, c as ObservationDefinition, S as SettleOptions, d as SurfaceDefinition, e as SurfaceForm, f as SurfaceRuntime, g as SurfaceRuntimeOptions, h as createSurfaceRuntime, i as defineSurface } from './surface-runtime-BPEtT3LZ.js';
|
|
4
4
|
export { DuplicateIds, OUIConfig, OUIConfigError, OUIInstance, OwnedTransport, ValidateSurfaceIds, createOUI } from './core/index.js';
|
|
5
5
|
export { SurfaceRuntimeProvider, SurfaceRuntimeProviderProps, UseSurfaceOptions, UseSurfaceResult, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './react/index.js';
|
|
6
|
-
export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-
|
|
6
|
+
export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-DKL9qoO-.js';
|
|
7
7
|
export { createDirectTransportPair } from './transport/index.js';
|
|
8
8
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createOUI, createSurfaceRuntime, defineSurface } from './chunk-
|
|
2
|
-
export { ARGS_HASH_PATTERN, OUI_EFFECT_ACCESS, OUI_EFFECT_KINDS, OUI_PROTOCOL_EVENTS, argsHash, canonicalJson, effectAccess, requiresApproval, surfacesHash } from './chunk-
|
|
3
|
-
export { SurfaceRuntimeProvider, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './chunk-
|
|
1
|
+
export { createOUI, createSurfaceRuntime, defineSurface } from './chunk-4MEYE6XZ.js';
|
|
2
|
+
export { ARGS_HASH_PATTERN, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUI_DESCRIBE_ACTION, OUI_EFFECT_ACCESS, OUI_EFFECT_KINDS, OUI_PROTOCOL_EVENTS, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, argsHash, atPointer, canonicalJson, constantOf, definitionHash, discriminatorOf, effectAccess, firstSentence, fitObservations, indexEntry, jsonBytes, pointerStep, pointerSteps, requiresApproval, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length } from './chunk-RZUYWZFK.js';
|
|
3
|
+
export { SurfaceRuntimeProvider, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './chunk-UOTAHGIV.js';
|
|
4
4
|
export { createDirectTransportPair } from './chunk-IIZ6HL2L.js';
|
|
5
5
|
export { createWebSocketTransport } from './chunk-R3SGP2UY.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFSGB5JNJ_cjs = require('../chunk-FSGB5JNJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "SurfaceRuntimeProvider", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkFSGB5JNJ_cjs.SurfaceRuntimeProvider; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "useObservation", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkFSGB5JNJ_cjs.useObservation; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "useSurface", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkFSGB5JNJ_cjs.useSurface; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "useSurfaceHold", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkFSGB5JNJ_cjs.useSurfaceHold; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "useSurfaceRuntime", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkFSGB5JNJ_cjs.useSurfaceRuntime; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=index.cjs.map
|
|
28
28
|
//# sourceMappingURL=index.cjs.map
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '../websocket-
|
|
3
|
+
import { e as OUIActionResult } from '../types-CnlVRPFL.cjs';
|
|
4
|
+
import { f as SurfaceRuntime, e as SurfaceForm, D as DefinedSurface } from '../surface-runtime-CexHqUn-.cjs';
|
|
5
|
+
import '../websocket-HnzPlfk6.cjs';
|
|
6
6
|
|
|
7
7
|
interface SurfaceRuntimeProviderProps {
|
|
8
|
-
runtime
|
|
8
|
+
/** A runtime in either form (§7.3.8). */
|
|
9
|
+
runtime: SurfaceRuntime<SurfaceForm>;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
}
|
|
11
12
|
/** Makes one surface runtime available to every `useSurface` below it. */
|
|
12
|
-
declare function SurfaceRuntimeProvider({ runtime, children, }: SurfaceRuntimeProviderProps): react.FunctionComponentElement<react.ProviderProps<SurfaceRuntime | null>>;
|
|
13
|
+
declare function SurfaceRuntimeProvider({ runtime, children, }: SurfaceRuntimeProviderProps): react.FunctionComponentElement<react.ProviderProps<SurfaceRuntime<SurfaceForm> | null>>;
|
|
13
14
|
/** The surface runtime from the nearest `SurfaceRuntimeProvider`. */
|
|
14
|
-
declare function useSurfaceRuntime(): SurfaceRuntime
|
|
15
|
+
declare function useSurfaceRuntime(): SurfaceRuntime<SurfaceForm>;
|
|
15
16
|
interface UseSurfaceOptions<TContext> {
|
|
16
17
|
/** The defined surface (from defineSurface()) */
|
|
17
18
|
surface: DefinedSurface<TContext>;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '../websocket-
|
|
3
|
+
import { e as OUIActionResult } from '../types-CnlVRPFL.js';
|
|
4
|
+
import { f as SurfaceRuntime, e as SurfaceForm, D as DefinedSurface } from '../surface-runtime-BPEtT3LZ.js';
|
|
5
|
+
import '../websocket-DKL9qoO-.js';
|
|
6
6
|
|
|
7
7
|
interface SurfaceRuntimeProviderProps {
|
|
8
|
-
runtime
|
|
8
|
+
/** A runtime in either form (§7.3.8). */
|
|
9
|
+
runtime: SurfaceRuntime<SurfaceForm>;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
}
|
|
11
12
|
/** Makes one surface runtime available to every `useSurface` below it. */
|
|
12
|
-
declare function SurfaceRuntimeProvider({ runtime, children, }: SurfaceRuntimeProviderProps): react.FunctionComponentElement<react.ProviderProps<SurfaceRuntime | null>>;
|
|
13
|
+
declare function SurfaceRuntimeProvider({ runtime, children, }: SurfaceRuntimeProviderProps): react.FunctionComponentElement<react.ProviderProps<SurfaceRuntime<SurfaceForm> | null>>;
|
|
13
14
|
/** The surface runtime from the nearest `SurfaceRuntimeProvider`. */
|
|
14
|
-
declare function useSurfaceRuntime(): SurfaceRuntime
|
|
15
|
+
declare function useSurfaceRuntime(): SurfaceRuntime<SurfaceForm>;
|
|
15
16
|
interface UseSurfaceOptions<TContext> {
|
|
16
17
|
/** The defined surface (from defineSurface()) */
|
|
17
18
|
surface: DefinedSurface<TContext>;
|
package/dist/react/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { SurfaceRuntimeProvider, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from '../chunk-
|
|
1
|
+
export { SurfaceRuntimeProvider, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from '../chunk-UOTAHGIV.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/spec/index.cjs
CHANGED
|
@@ -1,44 +1,132 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2CPOHQGI_cjs = require('../chunk-2CPOHQGI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "ARGS_HASH_PATTERN", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk2CPOHQGI_cjs.ARGS_HASH_PATTERN; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "FIT_LIST_STEPS", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk2CPOHQGI_cjs.FIT_LIST_STEPS; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "FIT_TEXT_CHARS", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk2CPOHQGI_cjs.FIT_TEXT_CHARS; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "INDEX_DESCRIPTION_CHARS", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunk2CPOHQGI_cjs.INDEX_DESCRIPTION_CHARS; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "INDEX_INPUT_CHARS", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunk2CPOHQGI_cjs.INDEX_INPUT_CHARS; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "INDEX_INPUT_PROPERTIES", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunk2CPOHQGI_cjs.INDEX_INPUT_PROPERTIES; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "OUI_DESCRIBE_ACTION", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_DESCRIBE_ACTION; }
|
|
10
34
|
});
|
|
11
35
|
Object.defineProperty(exports, "OUI_EFFECT_ACCESS", {
|
|
12
36
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_EFFECT_ACCESS; }
|
|
14
38
|
});
|
|
15
39
|
Object.defineProperty(exports, "OUI_EFFECT_KINDS", {
|
|
16
40
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_EFFECT_KINDS; }
|
|
18
42
|
});
|
|
19
43
|
Object.defineProperty(exports, "OUI_PROTOCOL_EVENTS", {
|
|
20
44
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_PROTOCOL_EVENTS; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "OUI_READ_ACTION", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_READ_ACTION; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "OUI_RUNTIME_SURFACE", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunk2CPOHQGI_cjs.OUI_RUNTIME_SURFACE; }
|
|
22
54
|
});
|
|
23
55
|
Object.defineProperty(exports, "argsHash", {
|
|
24
56
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk2CPOHQGI_cjs.argsHash; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "atPointer", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunk2CPOHQGI_cjs.atPointer; }
|
|
26
62
|
});
|
|
27
63
|
Object.defineProperty(exports, "canonicalJson", {
|
|
28
64
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk2CPOHQGI_cjs.canonicalJson; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "constantOf", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunk2CPOHQGI_cjs.constantOf; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "definitionHash", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunk2CPOHQGI_cjs.definitionHash; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "discriminatorOf", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunk2CPOHQGI_cjs.discriminatorOf; }
|
|
30
78
|
});
|
|
31
79
|
Object.defineProperty(exports, "effectAccess", {
|
|
32
80
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk2CPOHQGI_cjs.effectAccess; }
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "firstSentence", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return chunk2CPOHQGI_cjs.firstSentence; }
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "fitObservations", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () { return chunk2CPOHQGI_cjs.fitObservations; }
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "indexEntry", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return chunk2CPOHQGI_cjs.indexEntry; }
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, "jsonBytes", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () { return chunk2CPOHQGI_cjs.jsonBytes; }
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, "pointerStep", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () { return chunk2CPOHQGI_cjs.pointerStep; }
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "pointerSteps", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () { return chunk2CPOHQGI_cjs.pointerSteps; }
|
|
34
106
|
});
|
|
35
107
|
Object.defineProperty(exports, "requiresApproval", {
|
|
36
108
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk2CPOHQGI_cjs.requiresApproval; }
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "sortedJson", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () { return chunk2CPOHQGI_cjs.sortedJson; }
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "summarizeInput", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () { return chunk2CPOHQGI_cjs.summarizeInput; }
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(exports, "surfaceIndex", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () { return chunk2CPOHQGI_cjs.surfaceIndex; }
|
|
38
122
|
});
|
|
39
123
|
Object.defineProperty(exports, "surfacesHash", {
|
|
40
124
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunk2CPOHQGI_cjs.surfacesHash; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "utf8Length", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return chunk2CPOHQGI_cjs.utf8Length; }
|
|
42
130
|
});
|
|
43
131
|
//# sourceMappingURL=index.cjs.map
|
|
44
132
|
//# sourceMappingURL=index.cjs.map
|
package/dist/spec/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ARGS_HASH_PATTERN,
|
|
1
|
+
import { r as OUISurface, t as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, n as OUIObservationSnapshot, k as OUIFitCut } from '../types-CnlVRPFL.cjs';
|
|
2
|
+
export { A as ARGS_HASH_PATTERN, a as OUIActionApproval, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, l as OUIIndexSnapshot, m as OUIObservation, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, s as OUISurfaceDeregistration, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from '../types-CnlVRPFL.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The identity of a set of surfaces, for an answer that need not repeat them
|
|
@@ -22,6 +22,78 @@ export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIAction
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/** `surfaces`' hash, as a result's `surfacesHash` and a request's `knownSurfaces` carry it. */
|
|
25
|
-
declare function surfacesHash(surfaces: readonly OUISurface[]): string;
|
|
25
|
+
declare function surfacesHash(surfaces: readonly OUISurface[] | readonly OUISurfaceIndex[]): string;
|
|
26
|
+
/**
|
|
27
|
+
* JSON with every object's keys sorted, and what JSON cannot carry dropped as
|
|
28
|
+
* JSON.stringify drops it. Not approval.ts's `canonicalJson`, which refuses
|
|
29
|
+
* such values on purpose (an approval must hash exactly what crosses the
|
|
30
|
+
* wire): a snapshot is taken on every answer, and must never throw on a
|
|
31
|
+
* manifest that carries, say, an `undefined` in an array.
|
|
32
|
+
*/
|
|
33
|
+
declare function sortedJson(value: unknown): string;
|
|
34
|
+
|
|
35
|
+
/** The longest description an index entry carries. */
|
|
36
|
+
declare const INDEX_DESCRIPTION_CHARS = 160;
|
|
37
|
+
/** The longest input line an index entry carries. */
|
|
38
|
+
declare const INDEX_INPUT_CHARS = 120;
|
|
39
|
+
/** How many of an input's properties its line names before "+N more". */
|
|
40
|
+
declare const INDEX_INPUT_PROPERTIES = 6;
|
|
41
|
+
/** The surface id the runtime itself answers (§7.3.10). No surface may be defined with it. */
|
|
42
|
+
declare const OUI_RUNTIME_SURFACE = "oui";
|
|
43
|
+
/** `oui.describe`: the full definitions of the actions asked for. */
|
|
44
|
+
declare const OUI_DESCRIBE_ACTION = "describe";
|
|
45
|
+
/** `oui.read`: part of an observation's value, by path, a page of a list at a time. */
|
|
46
|
+
declare const OUI_READ_ACTION = "read";
|
|
47
|
+
/** The bytes `text` takes as UTF-8, which is what a frame's size limit counts. */
|
|
48
|
+
declare function utf8Length(text: string): number;
|
|
49
|
+
/** The bytes `value` takes as JSON on the wire; 0 for what JSON drops. */
|
|
50
|
+
declare function jsonBytes(value: unknown): number;
|
|
51
|
+
/** A description's first sentence, on one line, at most `INDEX_DESCRIPTION_CHARS` characters. */
|
|
52
|
+
declare function firstSentence(text: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* The property every member of a union fixes to its own constant, which is
|
|
55
|
+
* what tells the members apart: `effect` in `{ effect: "glow", … } | { effect:
|
|
56
|
+
* "blur", … }`. Null when the members share no such property.
|
|
57
|
+
*/
|
|
58
|
+
declare function discriminatorOf(members: readonly JSONSchema[]): string | null;
|
|
59
|
+
/** The one value a schema allows, when it allows one. */
|
|
60
|
+
declare function constantOf(schema: JSONSchema | undefined): string | number | boolean | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* What an action takes, in one line of at most `INDEX_INPUT_CHARS` characters:
|
|
63
|
+
* - "none" for an action that takes nothing;
|
|
64
|
+
* - each property with its type, required ones first, optional ones marked
|
|
65
|
+
* "?", the first `INDEX_INPUT_PROPERTIES` of them, then "+N more";
|
|
66
|
+
* - "one of N shapes by <property>" for a union.
|
|
67
|
+
*/
|
|
68
|
+
declare function summarizeInput(schema: JSONSchema | undefined): string;
|
|
69
|
+
/** The hash of an action's definition, as an index entry's `definitionHash` carries it. */
|
|
70
|
+
declare function definitionHash(action: OUIAction): string;
|
|
71
|
+
/** An action's index entry (§7.3.8). */
|
|
72
|
+
declare function indexEntry(action: OUIAction): OUIActionIndexEntry;
|
|
73
|
+
/** A surface in index form (§7.3.8). */
|
|
74
|
+
declare function surfaceIndex(surface: OUISurface): OUISurfaceIndex;
|
|
75
|
+
|
|
76
|
+
/** Rows a list keeps at each step of fitting, until the whole fits. */
|
|
77
|
+
declare const FIT_LIST_STEPS: readonly [200, 50, 20, 5, 0];
|
|
78
|
+
/** Characters a text keeps once lists alone did not make the whole fit. */
|
|
79
|
+
declare const FIT_TEXT_CHARS = 2000;
|
|
80
|
+
/** One step into a JSON Pointer (RFC 6901). */
|
|
81
|
+
declare function pointerStep(pointer: string, key: string | number): string;
|
|
82
|
+
/** The steps of a JSON Pointer; "" is no steps. Throws on a pointer that does not start with "/". */
|
|
83
|
+
declare function pointerSteps(pointer: string): string[];
|
|
84
|
+
/** The value a pointer names inside `value`, or `undefined` when nothing is there. */
|
|
85
|
+
declare function atPointer(value: unknown, pointer: string): unknown;
|
|
86
|
+
/**
|
|
87
|
+
* `observations` within `budget` bytes of JSON, and where they were cut.
|
|
88
|
+
* Returned as they are when they already fit; otherwise a copy is shortened:
|
|
89
|
+
* 1. every list longer than a step of `FIT_LIST_STEPS` is cut to it, a step at
|
|
90
|
+
* a time, until the whole fits;
|
|
91
|
+
* 2. then every text longer than `FIT_TEXT_CHARS` is cut to that;
|
|
92
|
+
* 3. then whole observation values are left out, the largest first.
|
|
93
|
+
*/
|
|
94
|
+
declare function fitObservations(observations: OUIObservationSnapshot, budget: number): {
|
|
95
|
+
observations: OUIObservationSnapshot;
|
|
96
|
+
cuts: OUIFitCut[];
|
|
97
|
+
};
|
|
26
98
|
|
|
27
|
-
export { OUISurface, surfacesHash };
|
|
99
|
+
export { FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, JSONSchema, OUIAction, OUIActionIndexEntry, OUIFitCut, OUIObservationSnapshot, OUISurface, OUISurfaceIndex, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, atPointer, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, jsonBytes, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length };
|