gesso-framework 0.6.23 → 0.6.25
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 +17 -0
- package/dist/agent/index.d.ts +1 -1
- package/dist/{index-C3eQmSA7.d.ts → index-XlACZQyY.d.ts} +20 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +31 -5
- package/dist/index.js.map +1 -1
- package/dist/{persisted-C3F7oIKS.js → persisted-fUzIU8FZ.js} +2 -2
- package/dist/{persisted-C3F7oIKS.js.map → persisted-fUzIU8FZ.js.map} +1 -1
- package/dist/remote/index.d.ts +2 -2
- package/dist/remote/index.js +1 -1
- package/dist/{serveChannels-h1wnv8al.js → serveChannels-BlEag7WU.js} +30 -18
- package/dist/serveChannels-BlEag7WU.js.map +1 -0
- package/dist/{ui-BaGgVaUk.d.ts → ui-CHtNccR8.d.ts} +15 -8
- package/dist/worker/index.d.ts +2 -2
- package/dist/worker/index.js +2 -2
- package/package.json +2 -2
- package/dist/serveChannels-h1wnv8al.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# gesso-framework
|
|
2
2
|
|
|
3
|
+
## 0.6.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `fanOut` registries have `move(key, datum)`, which points a live key at another datum and pushes what it reads there if it differs. The cell keeps its identity, so everything bound to it stays bound. It is what a grid needs to reuse the cell in a row's slot for whichever row is in that slot now, without releasing it and tearing its bindings down.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- gesso-core@0.6.25
|
|
12
|
+
|
|
13
|
+
## 0.6.24
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- d9c0e6d: A channel posts a change made outside a command as it is made again, as it did before 0.6.23, so a test that runs work synchronously and then reads the port finds the patches there. What a command publishes still crosses as one message, sent the moment the command returns rather than at the end of the turn.
|
|
18
|
+
- gesso-core@0.6.24
|
|
19
|
+
|
|
3
20
|
## 0.6.23
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
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-CHtNccR8.js";
|
|
2
2
|
//#region src/agent/mcp.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* An agent surface, served over the Model Context Protocol.
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { E as WorkerHandle, s as AgentConfirmation, t as UiHost, y as ChannelSource } from "./ui-CHtNccR8.js";
|
|
3
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";
|
|
@@ -285,11 +285,14 @@ interface FanOutOptions<S, V, D> {
|
|
|
285
285
|
*/
|
|
286
286
|
declare class FanCell<V, D = unknown> extends Observable<V> implements ReadableCell<V> {
|
|
287
287
|
readonly key: FanKey;
|
|
288
|
-
readonly datum: D;
|
|
289
288
|
readonly label: string | undefined;
|
|
290
289
|
/** @internal */
|
|
291
290
|
readonly subject: BehaviorSubject<V>;
|
|
291
|
+
/** @internal What the cell reads with; changed only by `FanOut.move`. */
|
|
292
|
+
held: D;
|
|
292
293
|
constructor(initial: V, key: FanKey, datum: D, label: string | undefined);
|
|
294
|
+
/** What the reader is given beside the key: where the cell is, for a grid. */
|
|
295
|
+
get datum(): D;
|
|
293
296
|
get value(): V;
|
|
294
297
|
}
|
|
295
298
|
/**
|
|
@@ -366,6 +369,20 @@ declare class FanOut<S, V, D = undefined> {
|
|
|
366
369
|
for(key: FanKey, datum?: D): FanCell<V, D>;
|
|
367
370
|
/** The cell for a key if it is live, without making one. */
|
|
368
371
|
peek(key: FanKey): FanCell<V, D> | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Points a live key at another datum, and pushes what it reads there.
|
|
374
|
+
*
|
|
375
|
+
* For a surface that keeps its cells by place on screen rather than
|
|
376
|
+
* by what they show: a grid that reuses the cell in a row's slot for
|
|
377
|
+
* whichever row is in that slot now. The cell keeps its identity, so
|
|
378
|
+
* everything bound to it stays bound, and its value is read again
|
|
379
|
+
* from the latest snapshot and pushed only if it differs. Releasing
|
|
380
|
+
* the key and taking a new one instead would complete the cell and
|
|
381
|
+
* tear its bindings down, which is the cost this exists to avoid.
|
|
382
|
+
*
|
|
383
|
+
* A key that is not live is made, as `for` would make it.
|
|
384
|
+
*/
|
|
385
|
+
move(key: FanKey, datum: D): FanCell<V, D>;
|
|
369
386
|
/**
|
|
370
387
|
* Drops a key.
|
|
371
388
|
*
|
|
@@ -8767,4 +8784,4 @@ declare class RenderWorkerApp {
|
|
|
8767
8784
|
}
|
|
8768
8785
|
//#endregion
|
|
8769
8786
|
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 };
|
|
8770
|
-
//# sourceMappingURL=index-
|
|
8787
|
+
//# sourceMappingURL=index-XlACZQyY.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-
|
|
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-CHtNccR8.js";
|
|
3
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-
|
|
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-XlACZQyY.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-fUzIU8FZ.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-BlEag7WU.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";
|
|
@@ -108,17 +108,22 @@ const GROWING_WITHOUT_RELEASE = 2048;
|
|
|
108
108
|
*/
|
|
109
109
|
var FanCell = class extends Observable {
|
|
110
110
|
key;
|
|
111
|
-
datum;
|
|
112
111
|
label;
|
|
113
112
|
/** @internal */
|
|
114
113
|
subject;
|
|
114
|
+
/** @internal What the cell reads with; changed only by `FanOut.move`. */
|
|
115
|
+
held;
|
|
115
116
|
constructor(initial, key, datum, label) {
|
|
116
117
|
const subject = new BehaviorSubject(initial);
|
|
117
118
|
super((subscriber) => subject.subscribe(subscriber));
|
|
118
119
|
this.key = key;
|
|
119
|
-
this.datum = datum;
|
|
120
120
|
this.label = label;
|
|
121
121
|
this.subject = subject;
|
|
122
|
+
this.held = datum;
|
|
123
|
+
}
|
|
124
|
+
/** What the reader is given beside the key: where the cell is, for a grid. */
|
|
125
|
+
get datum() {
|
|
126
|
+
return this.held;
|
|
122
127
|
}
|
|
123
128
|
get value() {
|
|
124
129
|
trackRead(this);
|
|
@@ -223,6 +228,27 @@ var FanOut = class {
|
|
|
223
228
|
return this.cells.get(key);
|
|
224
229
|
}
|
|
225
230
|
/**
|
|
231
|
+
* Points a live key at another datum, and pushes what it reads there.
|
|
232
|
+
*
|
|
233
|
+
* For a surface that keeps its cells by place on screen rather than
|
|
234
|
+
* by what they show: a grid that reuses the cell in a row's slot for
|
|
235
|
+
* whichever row is in that slot now. The cell keeps its identity, so
|
|
236
|
+
* everything bound to it stays bound, and its value is read again
|
|
237
|
+
* from the latest snapshot and pushed only if it differs. Releasing
|
|
238
|
+
* the key and taking a new one instead would complete the cell and
|
|
239
|
+
* tear its bindings down, which is the cost this exists to avoid.
|
|
240
|
+
*
|
|
241
|
+
* A key that is not live is made, as `for` would make it.
|
|
242
|
+
*/
|
|
243
|
+
move(key, datum) {
|
|
244
|
+
const cell = this.cells.get(key);
|
|
245
|
+
if (cell === void 0) return this.for(key, datum);
|
|
246
|
+
cell.held = datum;
|
|
247
|
+
const next = this.hasSnapshot ? this.read(this.snapshot, key, datum) : this.initial(key, datum);
|
|
248
|
+
if (!this.equal(cell.subject.value, next)) cell.subject.next(next);
|
|
249
|
+
return cell;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
226
252
|
* Drops a key.
|
|
227
253
|
*
|
|
228
254
|
* The cell completes, so anything still bound to it is torn down
|
|
@@ -264,7 +290,7 @@ var FanOut = class {
|
|
|
264
290
|
for (const key of keys ?? this.cells.keys()) {
|
|
265
291
|
const cell = this.cells.get(key);
|
|
266
292
|
if (cell === void 0) continue;
|
|
267
|
-
const next = this.read(snapshot, key, cell.
|
|
293
|
+
const next = this.read(snapshot, key, cell.held);
|
|
268
294
|
if (!this.equal(cell.subject.value, next)) cell.subject.next(next);
|
|
269
295
|
}
|
|
270
296
|
}
|