gesso-framework 0.6.21 → 0.6.23
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/CHANGELOG.md +21 -0
- package/dist/{FunctionComponent-B1TJED62.d.ts → FunctionComponent-CHtojpp7.d.ts} +9 -2
- package/dist/agent/index.d.ts +1 -1
- package/dist/{index-C2nyeg5Y.d.ts → index-C3eQmSA7.d.ts} +12 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +1 -1
- package/dist/{persisted-SkVtTKZG.js → persisted-C3F7oIKS.js} +30 -7
- package/dist/persisted-C3F7oIKS.js.map +1 -0
- package/dist/remote/index.d.ts +2 -2
- package/dist/remote/index.js +1 -1
- package/dist/{serveChannels-BfIXVnoE.js → serveChannels-h1wnv8al.js} +35 -3
- package/dist/serveChannels-h1wnv8al.js.map +1 -0
- package/dist/{ui-D90CiOhW.d.ts → ui-BaGgVaUk.d.ts} +16 -1
- package/dist/worker/index.d.ts +3 -3
- package/dist/worker/index.js +2 -2
- package/package.json +2 -2
- package/dist/persisted-SkVtTKZG.js.map +0 -1
- package/dist/serveChannels-BfIXVnoE.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# gesso-framework
|
|
2
2
|
|
|
3
|
+
## 0.6.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9ce5d36: Everything one turn of the application thread publishes to a channel now crosses as one message, and the replica tells each view key once per message. A command that moved five view keys used to post five messages and re-render between them.
|
|
8
|
+
- 3b6ecc0: A computed cell no longer allocates a set of its sources on every change.
|
|
9
|
+
- 504fe2c: An input cell handed the value it already holds no longer tells its subscribers, so a component's bindings do not run again for a value that did not change.
|
|
10
|
+
- Updated dependencies [ae5a84e]
|
|
11
|
+
- Updated dependencies [62e3bd4]
|
|
12
|
+
- Updated dependencies [4b92a02]
|
|
13
|
+
- Updated dependencies [2aecc54]
|
|
14
|
+
- Updated dependencies [72f7b90]
|
|
15
|
+
- gesso-core@0.6.23
|
|
16
|
+
|
|
17
|
+
## 0.6.22
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [02f186e]
|
|
22
|
+
- gesso-core@0.6.22
|
|
23
|
+
|
|
3
24
|
## 0.6.21
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -140,6 +140,10 @@ declare class InputCell<T> extends BehaviorSubject<T> {
|
|
|
140
140
|
* So a cell remembers being read while a body ran, and if it later
|
|
141
141
|
* changes with nobody subscribed to it, it says so once. A cell that
|
|
142
142
|
* something is following is fine: the follower carries the change.
|
|
143
|
+
*
|
|
144
|
+
* The value it already holds is not a change, and tells nobody: values
|
|
145
|
+
* that cross into a component are treated as immutable, so the same
|
|
146
|
+
* reference is the same value.
|
|
143
147
|
*/
|
|
144
148
|
next(value: T): void;
|
|
145
149
|
}
|
|
@@ -312,7 +316,10 @@ declare class ChannelReplica<View extends object, Commands extends object> {
|
|
|
312
316
|
* Applies a batch, emitting once per affected key.
|
|
313
317
|
*
|
|
314
318
|
* Grouping matters: a batch touching one key three times must not
|
|
315
|
-
* push three values through the bindings watching it.
|
|
319
|
+
* push three values through the bindings watching it. And every key's
|
|
320
|
+
* patches are applied before any cell is told, so a batch that fails
|
|
321
|
+
* part way tells nobody, rather than leaving the screen showing the
|
|
322
|
+
* first keys of a change and not the rest.
|
|
316
323
|
*/
|
|
317
324
|
applyPatches(patches: readonly Patch[]): void;
|
|
318
325
|
private post;
|
|
@@ -498,4 +505,4 @@ type ComponentArgs<C> = RequiredKeys<ComponentProps<C>> extends never ? [inputs?
|
|
|
498
505
|
declare function isClassComponent(component: ComponentType): component is ClassComponent;
|
|
499
506
|
//#endregion
|
|
500
507
|
export { InternalState as C, output as S, Component as T, OutputTarget as _, ComponentType as a, into as b, Inputs as c, BoundsCell as d, bounds as f, OutputCell as g, InputCell as h, ComponentProps as i, isClassComponent as l, EmitValue as m, ComponentArgs as n, FunctionComponent as o, EmitArgs as p, ComponentContext as r, InputValue as s, ClassComponent as t, ChannelReplica as u, ReadableCell as v, internalState as w, isOutputTarget as x, input as y };
|
|
501
|
-
//# sourceMappingURL=FunctionComponent-
|
|
508
|
+
//# sourceMappingURL=FunctionComponent-CHtojpp7.d.ts.map
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as WorkerHandle, F as JsonSchema, a as resolveTarget, c as AgentResource, d as AgentSurfaceOptions, f as AgentTool, g as ServedChannel, h as resourceUri, i as outline, l as AgentSurface, m as agentSurface, n as UiRefs, o as uiSurface, p as AgentToolResult, r as UiSurfaceOptions, s as AgentConfirmation, t as UiHost, u as AgentSurfaceLike } from "../ui-
|
|
1
|
+
import { E as WorkerHandle, F as JsonSchema, a as resolveTarget, c as AgentResource, d as AgentSurfaceOptions, f as AgentTool, g as ServedChannel, h as resourceUri, i as outline, l as AgentSurface, m as agentSurface, n as UiRefs, o as uiSurface, p as AgentToolResult, r as UiSurfaceOptions, s as AgentConfirmation, t as UiHost, u as AgentSurfaceLike } from "../ui-BaGgVaUk.js";
|
|
2
2
|
//#region src/agent/mcp.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* An agent surface, served over the Model Context Protocol.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as ChannelToken, m as CommandMap, o as Patch, p as Command, r as ChannelPort } from "./ChannelProtocol-ByNoHujM.js";
|
|
2
|
-
import { E as WorkerHandle, s as AgentConfirmation, t as UiHost, y as ChannelSource } from "./ui-
|
|
3
|
-
import { C as InternalState, T as Component, a as ComponentType, c as Inputs, g as OutputCell, h as InputCell, i as ComponentProps, n as ComponentArgs, r as ComponentContext, u as ChannelReplica, v as ReadableCell } from "./FunctionComponent-
|
|
2
|
+
import { E as WorkerHandle, s as AgentConfirmation, t as UiHost, y as ChannelSource } from "./ui-BaGgVaUk.js";
|
|
3
|
+
import { C as InternalState, T as Component, a as ComponentType, c as Inputs, g as OutputCell, h as InputCell, i as ComponentProps, n as ComponentArgs, r as ComponentContext, u as ChannelReplica, v as ReadableCell } from "./FunctionComponent-CHtojpp7.js";
|
|
4
4
|
import { BehaviorSubject, Observable, Subscription } from "rxjs";
|
|
5
5
|
import { AnimatedCell, AnimationDriver, CanvasHost, CaretRect, ComponentLikeElement, ComponentResolver, EditingState, EditingState as EditingState$1, FocusOptions, IconRasterizer, ImageResolver, LayoutExplanation, LayoutInspector, MARK_PREFIX, MotionStateInput, MotionTiming, Reactive, RendererBackend, Size, TextMeasureRequest, TextMeasurer, UI_ROLES, UI_SEMANTIC_STATES, UiAnimation, UiChild, UiContrast, UiDurationToken, UiEasing, UiEasingToken, UiEditingController, UiElement, UiFileDropMessage, UiFindController, UiFocusManager, UiFrameClockFactory, UiInputDispatcher, UiInsets, UiKeyModifiers, UiKeyboardController, UiLength, UiModifier, UiMotion, UiNode, UiPlatformAdapter, UiPointerController, UiPointerDevice, UiReducedMotionPolicy, UiRole, UiScrollability, UiSelectionController, UiSemanticState, UiSemanticsAction, UiSemanticsMap, UiSemanticsMap as UiSemanticsMap$1, UiSemanticsPatch, UiSemanticsRecord, UiSemanticsRecord as UiSemanticsRecord$1, UiSemanticsUpdate, UiShortcutRegistry, UiSpringSpec, UiSpringToken, UiTextPosition, UiThemeExtension, UiTouchScroller, UiWheelController, VideoClock, VideoResolver, markInstant, markNow, measureSpan, performanceMarksEnabled, setPerformanceMarks as setPerformanceMarks$1 } from "gesso-core";
|
|
6
6
|
//#region src/service/ServiceRegistry.d.ts
|
|
@@ -151,6 +151,15 @@ declare class ComputedCell<T> extends Observable<T> implements ReadableCell<T> {
|
|
|
151
151
|
private readonly equal;
|
|
152
152
|
private readonly changes;
|
|
153
153
|
private sources;
|
|
154
|
+
/**
|
|
155
|
+
* The set the next run collects its reads into. It trades places with
|
|
156
|
+
* `sources` after the run, so following a cell allocates nothing per
|
|
157
|
+
* change; the two sets are simply reused.
|
|
158
|
+
*/
|
|
159
|
+
private collecting;
|
|
160
|
+
/** Whether the last run read different cells from the run before it. */
|
|
161
|
+
private sourcesChanged;
|
|
162
|
+
private recomputing;
|
|
154
163
|
private cached;
|
|
155
164
|
private hasValue;
|
|
156
165
|
private upstream;
|
|
@@ -8758,4 +8767,4 @@ declare class RenderWorkerApp {
|
|
|
8758
8767
|
}
|
|
8759
8768
|
//#endregion
|
|
8760
8769
|
export { StorageAdapter as $, UiNodeReport as $n, mutate as $r, UiFramePhase as $t, Presence as A, AudioService as An, ChannelRegistry as Ar, createShellHistory as At, PersistedOptions as B, ShellFileResult as Bn, themeTokenCell as Br, UiTreeNode as Bt, FocusService as C, buildPath as Cn, pick as Cr, createApp as Ct, FindService as D, AudioMetadata as Dn, createChannelRegistry as Dr, ShellHistory as Dt, TextService as E, AudioAction as En, ChannelRegistryHandle as Er, WorkerAppOptions as Et, AudioSinkOptions as F, SpringOptions as Fn, Output as Fr, ConsoleEntry as Ft, IndexedDbStorage as G, ShellStorageOp as Gn, Each as Gr, ShellToRuntimeMessage as Gt, persisted as H, ShellRecentFile as Hn, Show as Hr, treeText as Ht, AudioSinkOutput as I, UiDuration as In, ControlledOptions as Ir, DevtoolsEvent as It, OpfsFileHandle as J, ColorSchemePreference as Jn, each as Jr, GessoRuntime as Jt, IndexedDbStorageOptions as K, ShellStorageResult as Kn, EachKey as Kr, FrameMetrics as Kt, MediaSessionLike as L, UiEasingChoice as Ln, ControlledValue as Lr, DevtoolsRequest as Lt, RouterOutlet as M, AudioStatus as Mn, Define as Mr, ActionEntry as Mt, AudioElementLike as N, AnimateOptions as Nn, Inject as Nr, ChannelErrorEntry as Nt, observeMediaQuery as O, AudioRequest as On, findUnplainPath as Or, ShellHistoryMode as Ot, AudioSink as P, AnimationService as Pn, Input as Pr, CommandEntry as Pt, MemoryStorage as Q, UiEnvironmentReport as Qn, Mutation as Qr, UI_FRAME_PHASES as Qt, audioClock as R, ShellFile as Rn, controlled as Rr, FrameEntry as Rt, writeClipboard as S, RouteParams as Sn, structurallyEqual as Sr, CreateAppOptions as St, EditingService as T, parseUrl as Tn, ChannelRegistration as Tr, WorkerApp as Tt, ShellStorage as U, ShellRequest as Un, ShowProps as Ur, RuntimeErrorSource as Ut, PersistedState as V, ShellFileType as Vn, bind as Vr, UiTreeSnapshot as Vt, ShellStorageOptions as W, ShellService as Wn, show as Wr, RuntimeToShellMessage as Wt, OpfsStorageOptions as X, BoundStream as Xn, throttled as Xr, RendererChoice as Xt, OpfsStorage as Y, observeColorScheme as Yn, debounced as Yr, GessoRuntimeOptions as Yt, OpfsWritable as Z, NodePathTarget as Zn, MutateOptions as Zr, RuntimeInput as Zt, EditingMirrorTarget as _, Equality as _i, RouteGuard as _n, OverlayService as _r, GessoApp as _t, UiRole as a, SelectOptions as ai, FontService as an, describeStream as ar, storageReadValue as at, EditingProxy as b, route as bn, FrameworkChild as br, GessoAppBuilder as bt, UiSemanticsPatch as c, FanKey as ci, RouteAnswer as cn, formatNodeReport as cr, UndoableOptions as ct, markNow as d, fanOut as di, RouterRoutes as dn, ComponentHostResolver as dr, UndoStackOptions as dt, Resource as ei, FontFaceDeclaration as en, UiOwnerReport as er, StorageOutcome as et, measureSpan as f, ComputedCell as fi, RouterService as fn, ComponentHost as fr, UndoTransaction as ft, renderRoot as g, DeriveOptions as gi, RouteDefinition as gn, OverlayRect as gr, shellStorageDenied as gt, RenderWorkerApp as h, computed as hi, RouteContext as hn, OverlayPlacement as hr, performShellStorage as ht, UI_SEMANTIC_STATES as i, resource as ii, FontHost as in, UiStreamReport as ir, storageReadFailure as it, PresenceProps as j, AudioState as jn, Channel as jr, ActionCause as jt, observeReducedMotion as k, AudioSample as kn, requirePlainData as kr, ShellHistoryOptions as kt, UiSemanticsRecord$1 as l, FanOut as li, RouteMatch as ln, formatStream as lr, undoable as lt, setPerformanceMarks$1 as m, ReadSource as mi, OutletProps as mn, OverlayEntry as mr, ShellLocalStore as mt, MARK_PREFIX as n, ResourceState as ni, FontFamilyDeclaration as nn, UiPropReport as nr, classifyStorageError as nt, UiSemanticState as o, select as oi, MediaOptions as on, formatAge as or, UndoShortcutOptions as ot, performanceMarksEnabled as p, ComputedOptions as pi, RouteState as pn, OverlayLayer as pr, rememberedDirectory as pt, OpfsDirectory as q, ColorScheme as qn, EachProps as qr, FramePhaseTimings as qt, UI_ROLES as r, ResourceStatus as ri, FontFamilyStatus as rn, UiSemanticsReport as rr, storageErrorMessage as rt, UiSemanticsMap$1 as s, FanCell as si, MediaService as sn, formatNodePath as sr, registerUndoShortcuts as st, EditingState$1 as t, ResourceOptions as ti, FontFaceLike as tn, UiPropOrigin as tr, StorageRead as tt, markInstant as u, FanOutOptions as ui, RouterHistorySink as un, printPropValue as ur, UndoStack as ut, SemanticsMirror as v, derive as vi, RouteOptions as vn, createComponent as vr, GessoAppOptions as vt, ScrollService as w, formatUrl as wn, pickKeys as wr, AppLogicEndpoint as wt, EditingProxySink as x, to as xn, isComponentElement as xr, WebMcpChoice as xt, SemanticsMirrorSink as y, ServiceRegistry as yi, RouteTarget as yn, ComponentElement as yr, createSyncApp as yt, FrameService as z, ShellFileRequest as zn, ThemeTokenCell as zr, PatchEntry as zt };
|
|
8761
|
-
//# sourceMappingURL=index-
|
|
8770
|
+
//# sourceMappingURL=index-C3eQmSA7.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as channel, a as isChannelHostMessage, c as applyPatch, d as ChannelSpec, f as ChannelToken, g as ViewOf, h as CommandsOf, i as isChannelClientMessage, l as applyPatches, m as CommandMap, n as ChannelHostMessage, o as Patch, p as Command, r as ChannelPort, s as PatchPath, t as ChannelClientMessage, u as diffProjection, v as defineChannel, y as viewKeys } from "./ChannelProtocol-ByNoHujM.js";
|
|
2
|
-
import { A as portHandle, C as MessageEndpoint, D as isHubMessage, E as WorkerHandle, F as JsonSchema, I as channelSchema, L as describeChannel, M as workerHandle, N as ChannelSchema, O as isPortErrorMessage, P as CommandSchema, S as APPLICATION_WORKER, T as PortHost, _ as serve, b as ProvidedChannel, g as ServedChannel, j as servePorts, k as isPortHandshake, v as serveChannels, w as PortHandshake, x as provide, y as ChannelSource } from "./ui-
|
|
3
|
-
import { C as InternalState, S as output, T as Component, _ as OutputTarget, a as ComponentType, b as into, c as Inputs, d as BoundsCell, f as bounds, g as OutputCell, h as InputCell, i as ComponentProps, l as isClassComponent, m as EmitValue, o as FunctionComponent, p as EmitArgs, r as ComponentContext, s as InputValue, t as ClassComponent, u as ChannelReplica, v as ReadableCell, w as internalState, x as isOutputTarget, y as input } from "./FunctionComponent-
|
|
4
|
-
import { $ as StorageAdapter, $n as UiNodeReport, $r as mutate, $t as UiFramePhase, A as Presence, An as AudioService, Ar as ChannelRegistry, At as createShellHistory, B as PersistedOptions, Bn as ShellFileResult, Br as themeTokenCell, Bt as UiTreeNode, C as FocusService, Cn as buildPath, Cr as pick, Ct as createApp, D as FindService, Dn as AudioMetadata, Dr as createChannelRegistry, Dt as ShellHistory, E as TextService, En as AudioAction, Er as ChannelRegistryHandle, Et as WorkerAppOptions, F as AudioSinkOptions, Fn as SpringOptions, Fr as Output, Ft as ConsoleEntry, G as IndexedDbStorage, Gn as ShellStorageOp, Gr as Each, Gt as ShellToRuntimeMessage, H as persisted, Hn as ShellRecentFile, Hr as Show, Ht as treeText, I as AudioSinkOutput, In as UiDuration, Ir as ControlledOptions, It as DevtoolsEvent, J as OpfsFileHandle, Jn as ColorSchemePreference, Jr as each, Jt as GessoRuntime, K as IndexedDbStorageOptions, Kn as ShellStorageResult, Kr as EachKey, Kt as FrameMetrics, L as MediaSessionLike, Ln as UiEasingChoice, Lr as ControlledValue, Lt as DevtoolsRequest, M as RouterOutlet, Mn as AudioStatus, Mr as Define, Mt as ActionEntry, N as AudioElementLike, Nn as AnimateOptions, Nr as Inject, Nt as ChannelErrorEntry, O as observeMediaQuery, On as AudioRequest, Or as findUnplainPath, Ot as ShellHistoryMode, P as AudioSink, Pn as AnimationService, Pr as Input, Pt as CommandEntry, Q as MemoryStorage, Qn as UiEnvironmentReport, Qr as Mutation, Qt as UI_FRAME_PHASES, R as audioClock, Rn as ShellFile, Rr as controlled, Rt as FrameEntry, S as writeClipboard, Sn as RouteParams, Sr as structurallyEqual, St as CreateAppOptions, T as EditingService, Tn as parseUrl, Tr as ChannelRegistration, Tt as WorkerApp, U as ShellStorage, Un as ShellRequest, Ur as ShowProps, Ut as RuntimeErrorSource, V as PersistedState, Vn as ShellFileType, Vr as bind, Vt as UiTreeSnapshot, W as ShellStorageOptions, Wn as ShellService, Wr as show, Wt as RuntimeToShellMessage, X as OpfsStorageOptions, Xn as BoundStream, Xr as throttled, Xt as RendererChoice, Y as OpfsStorage, Yn as observeColorScheme, Yr as debounced, Yt as GessoRuntimeOptions, Z as OpfsWritable, Zn as NodePathTarget, Zr as MutateOptions, Zt as RuntimeInput, _ as EditingMirrorTarget, _i as Equality, _n as RouteGuard, _r as OverlayService, _t as GessoApp, a as UiRole, ai as SelectOptions, an as FontService, ar as describeStream, at as storageReadValue, b as EditingProxy, bn as route, br as FrameworkChild, bt as GessoAppBuilder, c as UiSemanticsPatch, ci as FanKey, cn as RouteAnswer, cr as formatNodeReport, ct as UndoableOptions, d as markNow, di as fanOut, dn as RouterRoutes, dr as ComponentHostResolver, dt as UndoStackOptions, ei as Resource, en as FontFaceDeclaration, er as UiOwnerReport, et as StorageOutcome, f as measureSpan, fi as ComputedCell, fn as RouterService, fr as ComponentHost, ft as UndoTransaction, g as renderRoot, gi as DeriveOptions, gn as RouteDefinition, gr as OverlayRect, gt as shellStorageDenied, h as RenderWorkerApp, hi as computed, hn as RouteContext, hr as OverlayPlacement, ht as performShellStorage, i as UI_SEMANTIC_STATES, ii as resource, in as FontHost, ir as UiStreamReport, it as storageReadFailure, j as PresenceProps, jn as AudioState, jr as Channel, jt as ActionCause, k as observeReducedMotion, kn as AudioSample, kr as requirePlainData, kt as ShellHistoryOptions, l as UiSemanticsRecord, li as FanOut, ln as RouteMatch, lr as formatStream, lt as undoable, m as setPerformanceMarks, mi as ReadSource, mn as OutletProps, mr as OverlayEntry, mt as ShellLocalStore, n as MARK_PREFIX, ni as ResourceState, nn as FontFamilyDeclaration, nr as UiPropReport, nt as classifyStorageError, o as UiSemanticState, oi as select, on as MediaOptions, or as formatAge, ot as UndoShortcutOptions, p as performanceMarksEnabled, pi as ComputedOptions, pn as RouteState, pr as OverlayLayer, pt as rememberedDirectory, q as OpfsDirectory, qn as ColorScheme, qr as EachProps, qt as FramePhaseTimings, r as UI_ROLES, ri as ResourceStatus, rn as FontFamilyStatus, rr as UiSemanticsReport, rt as storageErrorMessage, s as UiSemanticsMap, si as FanCell, sn as MediaService, sr as formatNodePath, st as registerUndoShortcuts, t as EditingState, ti as ResourceOptions, tn as FontFaceLike, tr as UiPropOrigin, tt as StorageRead, u as markInstant, ui as FanOutOptions, un as RouterHistorySink, ur as printPropValue, ut as UndoStack, v as SemanticsMirror, vi as derive, vn as RouteOptions, vr as createComponent, vt as GessoAppOptions, w as ScrollService, wn as formatUrl, wr as pickKeys, wt as AppLogicEndpoint, x as EditingProxySink, xn as to, xr as isComponentElement, xt as WebMcpChoice, y as SemanticsMirrorSink, yi as ServiceRegistry, yn as RouteTarget, yr as ComponentElement, yt as createSyncApp, z as FrameService, zn as ShellFileRequest, zr as ThemeTokenCell, zt as PatchEntry } from "./index-
|
|
2
|
+
import { A as portHandle, C as MessageEndpoint, D as isHubMessage, E as WorkerHandle, F as JsonSchema, I as channelSchema, L as describeChannel, M as workerHandle, N as ChannelSchema, O as isPortErrorMessage, P as CommandSchema, S as APPLICATION_WORKER, T as PortHost, _ as serve, b as ProvidedChannel, g as ServedChannel, j as servePorts, k as isPortHandshake, v as serveChannels, w as PortHandshake, x as provide, y as ChannelSource } from "./ui-BaGgVaUk.js";
|
|
3
|
+
import { C as InternalState, S as output, T as Component, _ as OutputTarget, a as ComponentType, b as into, c as Inputs, d as BoundsCell, f as bounds, g as OutputCell, h as InputCell, i as ComponentProps, l as isClassComponent, m as EmitValue, o as FunctionComponent, p as EmitArgs, r as ComponentContext, s as InputValue, t as ClassComponent, u as ChannelReplica, v as ReadableCell, w as internalState, x as isOutputTarget, y as input } from "./FunctionComponent-CHtojpp7.js";
|
|
4
|
+
import { $ as StorageAdapter, $n as UiNodeReport, $r as mutate, $t as UiFramePhase, A as Presence, An as AudioService, Ar as ChannelRegistry, At as createShellHistory, B as PersistedOptions, Bn as ShellFileResult, Br as themeTokenCell, Bt as UiTreeNode, C as FocusService, Cn as buildPath, Cr as pick, Ct as createApp, D as FindService, Dn as AudioMetadata, Dr as createChannelRegistry, Dt as ShellHistory, E as TextService, En as AudioAction, Er as ChannelRegistryHandle, Et as WorkerAppOptions, F as AudioSinkOptions, Fn as SpringOptions, Fr as Output, Ft as ConsoleEntry, G as IndexedDbStorage, Gn as ShellStorageOp, Gr as Each, Gt as ShellToRuntimeMessage, H as persisted, Hn as ShellRecentFile, Hr as Show, Ht as treeText, I as AudioSinkOutput, In as UiDuration, Ir as ControlledOptions, It as DevtoolsEvent, J as OpfsFileHandle, Jn as ColorSchemePreference, Jr as each, Jt as GessoRuntime, K as IndexedDbStorageOptions, Kn as ShellStorageResult, Kr as EachKey, Kt as FrameMetrics, L as MediaSessionLike, Ln as UiEasingChoice, Lr as ControlledValue, Lt as DevtoolsRequest, M as RouterOutlet, Mn as AudioStatus, Mr as Define, Mt as ActionEntry, N as AudioElementLike, Nn as AnimateOptions, Nr as Inject, Nt as ChannelErrorEntry, O as observeMediaQuery, On as AudioRequest, Or as findUnplainPath, Ot as ShellHistoryMode, P as AudioSink, Pn as AnimationService, Pr as Input, Pt as CommandEntry, Q as MemoryStorage, Qn as UiEnvironmentReport, Qr as Mutation, Qt as UI_FRAME_PHASES, R as audioClock, Rn as ShellFile, Rr as controlled, Rt as FrameEntry, S as writeClipboard, Sn as RouteParams, Sr as structurallyEqual, St as CreateAppOptions, T as EditingService, Tn as parseUrl, Tr as ChannelRegistration, Tt as WorkerApp, U as ShellStorage, Un as ShellRequest, Ur as ShowProps, Ut as RuntimeErrorSource, V as PersistedState, Vn as ShellFileType, Vr as bind, Vt as UiTreeSnapshot, W as ShellStorageOptions, Wn as ShellService, Wr as show, Wt as RuntimeToShellMessage, X as OpfsStorageOptions, Xn as BoundStream, Xr as throttled, Xt as RendererChoice, Y as OpfsStorage, Yn as observeColorScheme, Yr as debounced, Yt as GessoRuntimeOptions, Z as OpfsWritable, Zn as NodePathTarget, Zr as MutateOptions, Zt as RuntimeInput, _ as EditingMirrorTarget, _i as Equality, _n as RouteGuard, _r as OverlayService, _t as GessoApp, a as UiRole, ai as SelectOptions, an as FontService, ar as describeStream, at as storageReadValue, b as EditingProxy, bn as route, br as FrameworkChild, bt as GessoAppBuilder, c as UiSemanticsPatch, ci as FanKey, cn as RouteAnswer, cr as formatNodeReport, ct as UndoableOptions, d as markNow, di as fanOut, dn as RouterRoutes, dr as ComponentHostResolver, dt as UndoStackOptions, ei as Resource, en as FontFaceDeclaration, er as UiOwnerReport, et as StorageOutcome, f as measureSpan, fi as ComputedCell, fn as RouterService, fr as ComponentHost, ft as UndoTransaction, g as renderRoot, gi as DeriveOptions, gn as RouteDefinition, gr as OverlayRect, gt as shellStorageDenied, h as RenderWorkerApp, hi as computed, hn as RouteContext, hr as OverlayPlacement, ht as performShellStorage, i as UI_SEMANTIC_STATES, ii as resource, in as FontHost, ir as UiStreamReport, it as storageReadFailure, j as PresenceProps, jn as AudioState, jr as Channel, jt as ActionCause, k as observeReducedMotion, kn as AudioSample, kr as requirePlainData, kt as ShellHistoryOptions, l as UiSemanticsRecord, li as FanOut, ln as RouteMatch, lr as formatStream, lt as undoable, m as setPerformanceMarks, mi as ReadSource, mn as OutletProps, mr as OverlayEntry, mt as ShellLocalStore, n as MARK_PREFIX, ni as ResourceState, nn as FontFamilyDeclaration, nr as UiPropReport, nt as classifyStorageError, o as UiSemanticState, oi as select, on as MediaOptions, or as formatAge, ot as UndoShortcutOptions, p as performanceMarksEnabled, pi as ComputedOptions, pn as RouteState, pr as OverlayLayer, pt as rememberedDirectory, q as OpfsDirectory, qn as ColorScheme, qr as EachProps, qt as FramePhaseTimings, r as UI_ROLES, ri as ResourceStatus, rn as FontFamilyStatus, rr as UiSemanticsReport, rt as storageErrorMessage, s as UiSemanticsMap, si as FanCell, sn as MediaService, sr as formatNodePath, st as registerUndoShortcuts, t as EditingState, ti as ResourceOptions, tn as FontFaceLike, tr as UiPropOrigin, tt as StorageRead, u as markInstant, ui as FanOutOptions, un as RouterHistorySink, ur as printPropValue, ut as UndoStack, v as SemanticsMirror, vi as derive, vn as RouteOptions, vr as createComponent, vt as GessoAppOptions, w as ScrollService, wn as formatUrl, wr as pickKeys, wt as AppLogicEndpoint, x as EditingProxySink, xn as to, xr as isComponentElement, xt as WebMcpChoice, y as SemanticsMirrorSink, yi as ServiceRegistry, yn as RouteTarget, yr as ComponentElement, yt as createSyncApp, z as FrameService, zn as ShellFileRequest, zr as ThemeTokenCell, zt as PatchEntry } from "./index-C3eQmSA7.js";
|
|
5
5
|
export { APPLICATION_WORKER, type ActionCause, type ActionEntry, type AnimateOptions, AnimationService, type AppLogicEndpoint, type AudioAction, type AudioElementLike, type AudioMetadata, type AudioRequest, type AudioSample, AudioService, AudioSink, type AudioSinkOptions, type AudioSinkOutput, type AudioState, type AudioStatus, type BoundStream, BoundsCell, Channel, type ChannelClientMessage, type ChannelErrorEntry, type ChannelHostMessage, type ChannelPort, type ChannelRegistration, ChannelRegistry, type ChannelRegistryHandle, ChannelReplica, type ChannelSchema, type ChannelSource, type ChannelSpec, type ChannelToken, type ClassComponent, type ColorScheme, type ColorSchemePreference, type Command, type CommandEntry, type CommandMap, type CommandSchema, type CommandsOf, Component, type ComponentContext, type ComponentElement, ComponentHost, ComponentHostResolver, type ComponentProps, type ComponentType, ComputedCell, type ComputedOptions, type ConsoleEntry, type ControlledOptions, type ControlledValue, type CreateAppOptions, Define, type DeriveOptions, type DevtoolsEvent, type DevtoolsRequest, Each, type EachKey, type EachProps, type EditingMirrorTarget, EditingProxy, type EditingProxySink, EditingService, type EditingState, type EmitArgs, type EmitValue, type Equality, FanCell, type FanKey, FanOut, type FanOutOptions, FindService, FocusService, type FontFaceDeclaration, type FontFaceLike, type FontFamilyDeclaration, type FontFamilyStatus, type FontHost, FontService, type FrameEntry, type FrameMetrics, type FramePhaseTimings, FrameService, type FrameworkChild, type FunctionComponent, GessoApp, GessoAppBuilder, type GessoAppOptions, GessoRuntime, type GessoRuntimeOptions, IndexedDbStorage, type IndexedDbStorageOptions, Inject, Input, InputCell, type InputValue, type Inputs, InternalState, type JsonSchema, MARK_PREFIX, type MediaOptions, MediaService, type MediaSessionLike, MemoryStorage, type MessageEndpoint, type MutateOptions, type Mutation, type NodePathTarget, type OpfsDirectory, type OpfsFileHandle, OpfsStorage, type OpfsStorageOptions, type OpfsWritable, type OutletProps, Output, type OutputCell, type OutputTarget, type OverlayEntry, OverlayLayer, type OverlayPlacement, type OverlayRect, OverlayService, type Patch, type PatchEntry, type PatchPath, type PersistedOptions, PersistedState, type PortHandshake, type PortHost, Presence, type PresenceProps, ProvidedChannel, type ReadSource, type ReadableCell, RenderWorkerApp, type RendererChoice, Resource, type ResourceOptions, type ResourceState, type ResourceStatus, type RouteAnswer, type RouteContext, type RouteDefinition, type RouteGuard, type RouteMatch, type RouteOptions, type RouteParams, RouteState, type RouteTarget, type RouterHistorySink, RouterOutlet, type RouterRoutes, RouterService, type RuntimeErrorSource, type RuntimeInput, type RuntimeToShellMessage, ScrollService, type SelectOptions, SemanticsMirror, type SemanticsMirrorSink, type ServedChannel, ServiceRegistry, type ShellFile, type ShellFileRequest, type ShellFileResult, type ShellFileType, type ShellHistory, type ShellHistoryMode, type ShellHistoryOptions, type ShellLocalStore, type ShellRecentFile, type ShellRequest, ShellService, ShellStorage, type ShellStorageOp, type ShellStorageOptions, type ShellStorageResult, type ShellToRuntimeMessage, Show, type ShowProps, type SpringOptions, type StorageAdapter, type StorageOutcome, type StorageRead, TextService, ThemeTokenCell, UI_FRAME_PHASES, UI_ROLES, UI_SEMANTIC_STATES, type UiDuration, type UiEasingChoice, type UiEnvironmentReport, type UiFramePhase, type UiNodeReport, type UiOwnerReport, type UiPropOrigin, type UiPropReport, type UiRole, type UiSemanticState, type UiSemanticsMap, type UiSemanticsPatch, type UiSemanticsRecord, type UiSemanticsReport, type UiStreamReport, type UiTreeNode, type UiTreeSnapshot, type UndoShortcutOptions, UndoStack, type UndoStackOptions, type UndoTransaction, type UndoableOptions, type ViewOf, type WebMcpChoice, WorkerApp, type WorkerAppOptions, type WorkerHandle, applyPatch, applyPatches, audioClock, bind, bounds, buildPath, channel, channelSchema, classifyStorageError, computed, controlled, createApp, createChannelRegistry, createComponent, createShellHistory, createSyncApp, debounced, defineChannel, derive, describeChannel, describeStream, diffProjection, each, fanOut, findUnplainPath, formatAge, formatNodePath, formatNodeReport, formatStream, formatUrl, input, internalState, into, isChannelClientMessage, isChannelHostMessage, isClassComponent, isComponentElement, isHubMessage, isOutputTarget, isPortErrorMessage, isPortHandshake, markInstant, markNow, measureSpan, mutate, observeColorScheme, observeMediaQuery, observeReducedMotion, output, parseUrl, performShellStorage, performanceMarksEnabled, persisted, pick, pickKeys, portHandle, printPropValue, provide, registerUndoShortcuts, rememberedDirectory, renderRoot, requirePlainData, resource, route, select, serve, serveChannels, servePorts, setPerformanceMarks, shellStorageDenied, show, storageErrorMessage, storageReadFailure, storageReadValue, structurallyEqual, themeTokenCell, throttled, to, treeText, undoable, viewKeys, workerHandle, writeClipboard };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as output, C as equalityOf, D as input, E as InputCell, M as trackRead, N as withBodyOf, O as into, S as derive, T as internalState, _ as Resource, a as undoable, b as ComputedCell, c as classifyStorageError, d as storageReadValue, f as pick, g as mutate, h as throttled, i as OpfsStorage, j as outputTargetOf, k as isOutputTarget, l as storageErrorMessage, m as debounced, n as persisted, o as UndoStack, p as pickKeys, r as IndexedDbStorage, s as MemoryStorage, t as PersistedState, u as storageReadFailure, v as resource, w as InternalState, x as computed, y as select } from "./persisted-
|
|
2
|
-
import { C as isChannelClientMessage, D as viewKeys, E as defineChannel, O as structurallyEqual, S as diffProjection, T as channel, _ as printPropValue, a as isPortErrorMessage, b as applyPatch, c as servePorts, d as isConsoleEntryMessage, f as describeStream, g as formatStream, h as formatNodeReport, i as isHubMessage, l as workerHandle, m as formatNodePath, n as serveChannels, o as isPortHandshake, p as formatAge, r as APPLICATION_WORKER, s as portHandle, t as serve, u as captureConsole, v as ProvidedChannel, w as isChannelHostMessage, x as applyPatches, y as provide } from "./serveChannels-
|
|
1
|
+
import { A as output, C as equalityOf, D as input, E as InputCell, M as trackRead, N as withBodyOf, O as into, S as derive, T as internalState, _ as Resource, a as undoable, b as ComputedCell, c as classifyStorageError, d as storageReadValue, f as pick, g as mutate, h as throttled, i as OpfsStorage, j as outputTargetOf, k as isOutputTarget, l as storageErrorMessage, m as debounced, n as persisted, o as UndoStack, p as pickKeys, r as IndexedDbStorage, s as MemoryStorage, t as PersistedState, u as storageReadFailure, v as resource, w as InternalState, x as computed, y as select } from "./persisted-C3F7oIKS.js";
|
|
2
|
+
import { C as isChannelClientMessage, D as viewKeys, E as defineChannel, O as structurallyEqual, S as diffProjection, T as channel, _ as printPropValue, a as isPortErrorMessage, b as applyPatch, c as servePorts, d as isConsoleEntryMessage, f as describeStream, g as formatStream, h as formatNodeReport, i as isHubMessage, l as workerHandle, m as formatNodePath, n as serveChannels, o as isPortHandshake, p as formatAge, r as APPLICATION_WORKER, s as portHandle, t as serve, u as captureConsole, v as ProvidedChannel, w as isChannelHostMessage, x as applyPatches, y as provide } from "./serveChannels-h1wnv8al.js";
|
|
3
3
|
import { a as Each, i as show, n as getComponentMetadata, o as each, r as Show, t as createComponent } from "./createComponent-3n1ZSql8.js";
|
|
4
4
|
import { c as findUnplainPath, d as describeChannel, l as requirePlainData, t as AGENT_PORT, u as channelSchema } from "./remote-BoB8zh7z.js";
|
|
5
5
|
import { n as serveApplicationAgent } from "./app-Yig59Ygf.js";
|
|
@@ -676,7 +676,10 @@ var ChannelReplica = class {
|
|
|
676
676
|
* Applies a batch, emitting once per affected key.
|
|
677
677
|
*
|
|
678
678
|
* Grouping matters: a batch touching one key three times must not
|
|
679
|
-
* push three values through the bindings watching it.
|
|
679
|
+
* push three values through the bindings watching it. And every key's
|
|
680
|
+
* patches are applied before any cell is told, so a batch that fails
|
|
681
|
+
* part way tells nobody, rather than leaving the screen showing the
|
|
682
|
+
* first keys of a change and not the rest.
|
|
680
683
|
*/
|
|
681
684
|
applyPatches(patches) {
|
|
682
685
|
const byKey = /* @__PURE__ */ new Map();
|
|
@@ -685,11 +688,15 @@ var ChannelReplica = class {
|
|
|
685
688
|
if (existing === void 0) byKey.set(patch.projection, [patch]);
|
|
686
689
|
else existing.push(patch);
|
|
687
690
|
}
|
|
691
|
+
const cells = [];
|
|
692
|
+
const values = [];
|
|
688
693
|
for (const [key, group] of byKey) {
|
|
689
694
|
const cell = this.cells.get(key);
|
|
690
695
|
if (cell === void 0) continue;
|
|
691
|
-
|
|
696
|
+
cells.push(cell);
|
|
697
|
+
values.push(applyPatches(cell.value, group));
|
|
692
698
|
}
|
|
699
|
+
for (let index = 0; index < cells.length; index++) cells[index].next(values[index]);
|
|
693
700
|
}
|
|
694
701
|
post(message) {
|
|
695
702
|
this.port.postMessage(message);
|