gesso-framework 0.4.0 → 0.4.2
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-DAyf5HQ6.d.ts → FunctionComponent-CgwLKE5d.d.ts} +16 -3
- package/dist/{index-Bdp1v_HO.d.ts → index-C9FAI_Kt.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +1 -1
- package/dist/{persisted-r3XmooBP.js → persisted-CsTPnjkc.js} +48 -21
- package/dist/persisted-CsTPnjkc.js.map +1 -0
- package/dist/worker/index.d.ts +2 -2
- package/dist/worker/index.js +1 -1
- package/package.json +2 -2
- package/dist/persisted-r3XmooBP.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# gesso-framework
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d27e076]
|
|
8
|
+
- Updated dependencies [d6c52da]
|
|
9
|
+
- gesso-core@0.4.2
|
|
10
|
+
|
|
11
|
+
## 0.4.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- **A patch batch copies each container once.** `applyPatches` copied every
|
|
16
|
+
container on a patch's path once per patch, so a batch of N patches into one
|
|
17
|
+
K-key object cost N × K — a store publishing a wide keyed map at 60 Hz could fall
|
|
18
|
+
minutes behind. A batch now copies each container once and writes into its own
|
|
19
|
+
copy in place. It never writes into the value it was handed nor into a value a
|
|
20
|
+
patch carried.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- gesso-core@0.4.1
|
|
23
|
+
|
|
3
24
|
## 0.4.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -442,8 +442,21 @@ declare function diffProjection(projection: string, previous: unknown, current:
|
|
|
442
442
|
* Applies patches to a projection value, sharing structure with the
|
|
443
443
|
* original everywhere the patch did not reach.
|
|
444
444
|
*
|
|
445
|
-
* Nothing is mutated: bindings hold onto emitted values, so a
|
|
446
|
-
* that edited in place would change data a component already
|
|
445
|
+
* Nothing handed in is mutated: bindings hold onto emitted values, so a
|
|
446
|
+
* replica that edited in place would change data a component already
|
|
447
|
+
* rendered.
|
|
448
|
+
*
|
|
449
|
+
* **Each container on a patched path is copied once per batch, not once
|
|
450
|
+
* per patch.** A batch of N patches into one K-key object used to cost
|
|
451
|
+
* N × K: every patch spread the whole object again to change one key.
|
|
452
|
+
* A snapshot keyed by id is exactly that shape — gessologic published
|
|
453
|
+
* `Record<netId, 0 | 1>` for ten thousand nets, about nine hundred
|
|
454
|
+
* patches a publish, and the render worker's patch phase fell minutes
|
|
455
|
+
* behind a 60 Hz stream it could never catch. So the batch remembers
|
|
456
|
+
* the containers it has copied, and writes into those in place: they
|
|
457
|
+
* are its own, made during this call and seen by nobody yet. Values
|
|
458
|
+
* that arrived inside a patch are never written into, because they are
|
|
459
|
+
* the patch's — a devtools log replays the same patch objects again.
|
|
447
460
|
*/
|
|
448
461
|
declare function applyPatches(root: unknown, patches: readonly Patch[]): unknown;
|
|
449
462
|
declare function applyPatch(root: unknown, patch: Patch): unknown;
|
|
@@ -713,4 +726,4 @@ type ComponentArgs<C> = RequiredKeys<ComponentProps<C>> extends never ? [inputs?
|
|
|
713
726
|
declare function isClassComponent(component: ComponentType): component is ClassComponent;
|
|
714
727
|
//#endregion
|
|
715
728
|
export { bounds as A, output as B, CommandMap as C, defineChannel as D, channel as E, OutputTarget as F, internalState as H, ReadableCell as I, input as L, EmitValue as M, InputCell as N, viewKeys as O, OutputCell as P, into as R, Command as S, ViewOf as T, Component as U, InternalState as V, applyPatch as _, ComponentType as a, ChannelSpec as b, isClassComponent as c, ChannelHostMessage as d, ChannelPort as f, PatchPath as g, Patch as h, ComponentProps as i, EmitArgs as j, BoundsCell as k, ChannelReplica as l, isChannelHostMessage as m, ComponentArgs as n, FunctionComponent as o, isChannelClientMessage as p, ComponentContext as r, Inputs as s, ClassComponent as t, ChannelClientMessage as u, applyPatches as v, CommandsOf as w, ChannelToken as x, diffProjection as y, isOutputTarget as z };
|
|
716
|
-
//# sourceMappingURL=FunctionComponent-
|
|
729
|
+
//# sourceMappingURL=FunctionComponent-CgwLKE5d.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CommandMap, I as ReadableCell, N as InputCell, P as OutputCell, S as Command, U as Component, V as InternalState, a as ComponentType, f as ChannelPort, h as Patch, i as ComponentProps, l as ChannelReplica, n as ComponentArgs, r as ComponentContext, s as Inputs, x as ChannelToken } from "./FunctionComponent-
|
|
1
|
+
import { C as CommandMap, I as ReadableCell, N as InputCell, P as OutputCell, S as Command, U as Component, V as InternalState, a as ComponentType, f as ChannelPort, h as Patch, i as ComponentProps, l as ChannelReplica, n as ComponentArgs, r as ComponentContext, s as Inputs, x as ChannelToken } from "./FunctionComponent-CgwLKE5d.js";
|
|
2
2
|
import { BehaviorSubject, Observable, Subscription } from "rxjs";
|
|
3
3
|
import { AnimatedCell, AnimationDriver, CanvasHost, CaretRect, ComponentLikeElement, ComponentResolver, EditingState, EditingState as EditingState$1, IconRasterizer, ImageResolver, LayoutExplanation, LayoutInspector, MARK_PREFIX, MotionStateInput, MotionTiming, RendererBackend, Size, TextMeasureRequest, TextMeasurer, UI_ROLES, UI_SEMANTIC_STATES, UiAnimation, UiChild, 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, UiThemeExtension, UiTouchScroller, UiWheelController, VideoClock, VideoResolver, markInstant, markNow, measureSpan, performanceMarksEnabled, setPerformanceMarks as setPerformanceMarks$1 } from "gesso-core";
|
|
4
4
|
//#region src/service/ServiceRegistry.d.ts
|
|
@@ -8081,4 +8081,4 @@ declare class RenderWorkerApp {
|
|
|
8081
8081
|
}
|
|
8082
8082
|
//#endregion
|
|
8083
8083
|
export { StorageOutcome as $, UiPropReport as $n, themeTokenCell as $r, FontFamilyDeclaration as $t, PresenceProps as A, Equality as Ai, AnimateOptions as An, PortHost as Ar, ChannelErrorEntry as At, PersistedState as B, ShellRequest as Bn, ChannelRegistry as Br, RuntimeErrorSource as Bt, FocusService as C, FanOutOptions as Ci, AudioAction as Cn, serveChannels as Cr, WorkerAppOptions as Ct, observeMediaQuery as D, ReadSource as Di, AudioService as Dn, APPLICATION_WORKER as Dr, createShellHistory as Dt, FindService as E, ComputedOptions as Ei, AudioSample as En, createChannelRegistry as Er, ShellHistoryOptions as Et, AudioSinkOutput as F, ShellFile as Fn, portHandle as Fr, FrameEntry as Ft, IndexedDbStorageOptions as G, ColorSchemePreference as Gn, Define as Gr, GessoRuntime as Gt, ShellStorage as H, ShellStorageOp as Hn, ProvidedChannel as Hr, ShellToRuntimeMessage as Ht, MediaSessionLike as I, ShellFileRequest as In, servePorts as Ir, PatchEntry as It, OpfsStorage as J, NodePathTarget as Jn, Output as Jr, RuntimeInput as Jt, OpfsDirectory as K, observeColorScheme as Kn, Inject as Kr, GessoRuntimeOptions as Kt, audioClock as L, ShellFileResult as Ln, workerHandle as Lr, UiTreeNode as Lt, AudioElementLike as M, ServiceRegistry as Mi, SpringOptions as Mn, isHubMessage as Mr, ConsoleEntry as Mt, AudioSink as N, UiDuration as Nn, isPortErrorMessage as Nr, DevtoolsEvent as Nt, observeReducedMotion as O, computed as Oi, AudioState as On, MessageEndpoint as Or, ActionCause as Ot, AudioSinkOptions as P, UiEasingChoice as Pn, isPortHandshake as Pr, DevtoolsRequest as Pt, StorageAdapter as Q, UiPropOrigin as Qn, ThemeTokenCell as Qr, FontFaceLike as Qt, FrameService as R, ShellFileType as Rn, findUnplainPath as Rr, UiTreeSnapshot as Rt, writeClipboard as S, FanOut as Si, parseUrl as Sn, serve as Sr, WorkerApp as St, TextService as T, ComputedCell as Ti, AudioRequest as Tn, ChannelRegistryHandle as Tr, ShellHistoryMode as Tt, ShellStorageOptions as U, ShellStorageResult as Un, provide as Ur, FrameMetrics as Ut, persisted as V, ShellService as Vn, ChannelSource as Vr, RuntimeToShellMessage as Vt, IndexedDbStorage as W, ColorScheme as Wn, Channel as Wr, FramePhaseTimings as Wt, OpfsWritable as X, UiNodeReport as Xn, ControlledValue as Xr, UiFramePhase as Xt, OpfsStorageOptions as Y, UiEnvironmentReport as Yn, ControlledOptions as Yr, UI_FRAME_PHASES as Yt, MemoryStorage as Z, UiOwnerReport as Zn, controlled as Zr, FontFaceDeclaration as Zt, EditingMirrorTarget as _, resource as _i, route as _n, isComponentElement as _r, createSyncApp as _t, UiRole as a, EachKey as ai, RouteAnswer as an, formatNodeReport as ar, UndoShortcutOptions as at, EditingProxy as b, FanCell as bi, buildPath as bn, pickKeys as br, createApp as bt, UiSemanticsPatch as c, debounced as ci, RouterRoutes as cn, ComponentHostResolver as cr, undoable as ct, markNow as d, Mutation as di, OutletProps as dn, OverlayEntry as dr, UndoTransaction as dt, bind as ei, FontFamilyStatus as en, UiSemanticsReport as er, StorageRead as et, measureSpan as f, mutate as fi, RouteContext as fn, OverlayPlacement as fr, ShellLocalStore as ft, renderRoot as g, ResourceStatus as gi, RouteTarget as gn, FrameworkChild as gr, GessoAppOptions as gt, RenderWorkerApp as h, ResourceState as hi, RouteOptions as hn, ComponentElement as hr, GessoApp as ht, UI_SEMANTIC_STATES as i, Each as ii, MediaService as in, formatNodePath as ir, storageReadValue as it, RouterOutlet as j, derive as ji, AnimationService as jn, WorkerHandle as jr, CommandEntry as jt, Presence as k, DeriveOptions as ki, AudioStatus as kn, PortHandshake as kr, ActionEntry as kt, UiSemanticsRecord$1 as l, throttled as li, RouterService as ln, ComponentHost as lr, UndoStack as lt, setPerformanceMarks$1 as m, ResourceOptions as mi, RouteGuard as mn, createComponent as mr, shellStorageDenied as mt, MARK_PREFIX as n, ShowProps as ni, FontService as nn, describeStream as nr, storageErrorMessage as nt, UiSemanticState as o, EachProps as oi, RouteMatch as on, formatStream as or, registerUndoShortcuts as ot, performanceMarksEnabled as p, Resource as pi, RouteDefinition as pn, OverlayService as pr, performShellStorage as pt, OpfsFileHandle as q, BoundStream as qn, Input as qr, RendererChoice as qt, UI_ROLES as r, show as ri, MediaOptions as rn, formatAge as rr, storageReadFailure as rt, UiSemanticsMap$1 as s, each as si, RouterHistorySink as sn, printPropValue as sr, UndoableOptions as st, EditingState$1 as t, Show as ti, FontHost as tn, UiStreamReport as tr, classifyStorageError as tt, markInstant as u, MutateOptions as ui, RouteState as un, OverlayLayer as ur, UndoStackOptions as ut, SemanticsMirror as v, SelectOptions as vi, to as vn, structurallyEqual as vr, GessoAppBuilder as vt, EditingService as w, fanOut as wi, AudioMetadata as wn, ChannelRegistration as wr, ShellHistory as wt, EditingProxySink as x, FanKey as xi, formatUrl as xn, ServedChannel as xr, AppLogicEndpoint as xt, SemanticsMirrorSink as y, select as yi, RouteParams as yn, pick as yr, CreateAppOptions as yt, PersistedOptions as z, ShellRecentFile as zn, requirePlainData as zr, treeText as zt };
|
|
8084
|
-
//# sourceMappingURL=index-
|
|
8084
|
+
//# sourceMappingURL=index-C9FAI_Kt.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as bounds, B as output, C as CommandMap, D as defineChannel, E as channel, F as OutputTarget, H as internalState, I as ReadableCell, L as input, M as EmitValue, N as InputCell, O as viewKeys, P as OutputCell, R as into, S as Command, T as ViewOf, U as Component, V as InternalState, _ as applyPatch, a as ComponentType, b as ChannelSpec, c as isClassComponent, d as ChannelHostMessage, f as ChannelPort, g as PatchPath, h as Patch, i as ComponentProps, j as EmitArgs, k as BoundsCell, l as ChannelReplica, m as isChannelHostMessage, o as FunctionComponent, p as isChannelClientMessage, r as ComponentContext, s as Inputs, t as ClassComponent, u as ChannelClientMessage, v as applyPatches, w as CommandsOf, x as ChannelToken, y as diffProjection, z as isOutputTarget } from "./FunctionComponent-
|
|
2
|
-
import { $ as StorageOutcome, $n as UiPropReport, $r as themeTokenCell, $t as FontFamilyDeclaration, A as PresenceProps, Ai as Equality, An as AnimateOptions, Ar as PortHost, At as ChannelErrorEntry, B as PersistedState, Bn as ShellRequest, Br as ChannelRegistry, Bt as RuntimeErrorSource, C as FocusService, Ci as FanOutOptions, Cn as AudioAction, Cr as serveChannels, Ct as WorkerAppOptions, D as observeMediaQuery, Di as ReadSource, Dn as AudioService, Dr as APPLICATION_WORKER, Dt as createShellHistory, E as FindService, Ei as ComputedOptions, En as AudioSample, Er as createChannelRegistry, Et as ShellHistoryOptions, F as AudioSinkOutput, Fn as ShellFile, Fr as portHandle, Ft as FrameEntry, G as IndexedDbStorageOptions, Gn as ColorSchemePreference, Gr as Define, Gt as GessoRuntime, H as ShellStorage, Hn as ShellStorageOp, Hr as ProvidedChannel, Ht as ShellToRuntimeMessage, I as MediaSessionLike, In as ShellFileRequest, Ir as servePorts, It as PatchEntry, J as OpfsStorage, Jn as NodePathTarget, Jr as Output, Jt as RuntimeInput, K as OpfsDirectory, Kn as observeColorScheme, Kr as Inject, Kt as GessoRuntimeOptions, L as audioClock, Ln as ShellFileResult, Lr as workerHandle, Lt as UiTreeNode, M as AudioElementLike, Mi as ServiceRegistry, Mn as SpringOptions, Mr as isHubMessage, Mt as ConsoleEntry, N as AudioSink, Nn as UiDuration, Nr as isPortErrorMessage, Nt as DevtoolsEvent, O as observeReducedMotion, Oi as computed, On as AudioState, Or as MessageEndpoint, Ot as ActionCause, P as AudioSinkOptions, Pn as UiEasingChoice, Pr as isPortHandshake, Pt as DevtoolsRequest, Q as StorageAdapter, Qn as UiPropOrigin, Qr as ThemeTokenCell, Qt as FontFaceLike, R as FrameService, Rn as ShellFileType, Rr as findUnplainPath, Rt as UiTreeSnapshot, S as writeClipboard, Si as FanOut, Sn as parseUrl, Sr as serve, St as WorkerApp, T as TextService, Ti as ComputedCell, Tn as AudioRequest, Tr as ChannelRegistryHandle, Tt as ShellHistoryMode, U as ShellStorageOptions, Un as ShellStorageResult, Ur as provide, Ut as FrameMetrics, V as persisted, Vn as ShellService, Vr as ChannelSource, Vt as RuntimeToShellMessage, W as IndexedDbStorage, Wn as ColorScheme, Wr as Channel, Wt as FramePhaseTimings, X as OpfsWritable, Xn as UiNodeReport, Xr as ControlledValue, Xt as UiFramePhase, Y as OpfsStorageOptions, Yn as UiEnvironmentReport, Yr as ControlledOptions, Yt as UI_FRAME_PHASES, Z as MemoryStorage, Zn as UiOwnerReport, Zr as controlled, Zt as FontFaceDeclaration, _ as EditingMirrorTarget, _i as resource, _n as route, _r as isComponentElement, _t as createSyncApp, a as UiRole, ai as EachKey, an as RouteAnswer, ar as formatNodeReport, at as UndoShortcutOptions, b as EditingProxy, bi as FanCell, bn as buildPath, br as pickKeys, bt as createApp, c as UiSemanticsPatch, ci as debounced, cn as RouterRoutes, cr as ComponentHostResolver, ct as undoable, d as markNow, di as Mutation, dn as OutletProps, dr as OverlayEntry, dt as UndoTransaction, ei as bind, en as FontFamilyStatus, er as UiSemanticsReport, et as StorageRead, f as measureSpan, fi as mutate, fn as RouteContext, fr as OverlayPlacement, ft as ShellLocalStore, g as renderRoot, gi as ResourceStatus, gn as RouteTarget, gr as FrameworkChild, gt as GessoAppOptions, h as RenderWorkerApp, hi as ResourceState, hn as RouteOptions, hr as ComponentElement, ht as GessoApp, i as UI_SEMANTIC_STATES, ii as Each, in as MediaService, ir as formatNodePath, it as storageReadValue, j as RouterOutlet, ji as derive, jn as AnimationService, jr as WorkerHandle, jt as CommandEntry, k as Presence, ki as DeriveOptions, kn as AudioStatus, kr as PortHandshake, kt as ActionEntry, l as UiSemanticsRecord, li as throttled, ln as RouterService, lr as ComponentHost, lt as UndoStack, m as setPerformanceMarks, mi as ResourceOptions, mn as RouteGuard, mr as createComponent, mt as shellStorageDenied, n as MARK_PREFIX, ni as ShowProps, nn as FontService, nr as describeStream, nt as storageErrorMessage, o as UiSemanticState, oi as EachProps, on as RouteMatch, or as formatStream, ot as registerUndoShortcuts, p as performanceMarksEnabled, pi as Resource, pn as RouteDefinition, pr as OverlayService, pt as performShellStorage, q as OpfsFileHandle, qn as BoundStream, qr as Input, qt as RendererChoice, r as UI_ROLES, ri as show, rn as MediaOptions, rr as formatAge, rt as storageReadFailure, s as UiSemanticsMap, si as each, sn as RouterHistorySink, sr as printPropValue, st as UndoableOptions, t as EditingState, ti as Show, tn as FontHost, tr as UiStreamReport, tt as classifyStorageError, u as markInstant, ui as MutateOptions, un as RouteState, ur as OverlayLayer, ut as UndoStackOptions, v as SemanticsMirror, vi as SelectOptions, vn as to, vr as structurallyEqual, vt as GessoAppBuilder, w as EditingService, wi as fanOut, wn as AudioMetadata, wr as ChannelRegistration, wt as ShellHistory, x as EditingProxySink, xi as FanKey, xn as formatUrl, xr as ServedChannel, xt as AppLogicEndpoint, y as SemanticsMirrorSink, yi as select, yn as RouteParams, yr as pick, yt as CreateAppOptions, z as PersistedOptions, zn as ShellRecentFile, zr as requirePlainData, zt as treeText } from "./index-
|
|
1
|
+
import { A as bounds, B as output, C as CommandMap, D as defineChannel, E as channel, F as OutputTarget, H as internalState, I as ReadableCell, L as input, M as EmitValue, N as InputCell, O as viewKeys, P as OutputCell, R as into, S as Command, T as ViewOf, U as Component, V as InternalState, _ as applyPatch, a as ComponentType, b as ChannelSpec, c as isClassComponent, d as ChannelHostMessage, f as ChannelPort, g as PatchPath, h as Patch, i as ComponentProps, j as EmitArgs, k as BoundsCell, l as ChannelReplica, m as isChannelHostMessage, o as FunctionComponent, p as isChannelClientMessage, r as ComponentContext, s as Inputs, t as ClassComponent, u as ChannelClientMessage, v as applyPatches, w as CommandsOf, x as ChannelToken, y as diffProjection, z as isOutputTarget } from "./FunctionComponent-CgwLKE5d.js";
|
|
2
|
+
import { $ as StorageOutcome, $n as UiPropReport, $r as themeTokenCell, $t as FontFamilyDeclaration, A as PresenceProps, Ai as Equality, An as AnimateOptions, Ar as PortHost, At as ChannelErrorEntry, B as PersistedState, Bn as ShellRequest, Br as ChannelRegistry, Bt as RuntimeErrorSource, C as FocusService, Ci as FanOutOptions, Cn as AudioAction, Cr as serveChannels, Ct as WorkerAppOptions, D as observeMediaQuery, Di as ReadSource, Dn as AudioService, Dr as APPLICATION_WORKER, Dt as createShellHistory, E as FindService, Ei as ComputedOptions, En as AudioSample, Er as createChannelRegistry, Et as ShellHistoryOptions, F as AudioSinkOutput, Fn as ShellFile, Fr as portHandle, Ft as FrameEntry, G as IndexedDbStorageOptions, Gn as ColorSchemePreference, Gr as Define, Gt as GessoRuntime, H as ShellStorage, Hn as ShellStorageOp, Hr as ProvidedChannel, Ht as ShellToRuntimeMessage, I as MediaSessionLike, In as ShellFileRequest, Ir as servePorts, It as PatchEntry, J as OpfsStorage, Jn as NodePathTarget, Jr as Output, Jt as RuntimeInput, K as OpfsDirectory, Kn as observeColorScheme, Kr as Inject, Kt as GessoRuntimeOptions, L as audioClock, Ln as ShellFileResult, Lr as workerHandle, Lt as UiTreeNode, M as AudioElementLike, Mi as ServiceRegistry, Mn as SpringOptions, Mr as isHubMessage, Mt as ConsoleEntry, N as AudioSink, Nn as UiDuration, Nr as isPortErrorMessage, Nt as DevtoolsEvent, O as observeReducedMotion, Oi as computed, On as AudioState, Or as MessageEndpoint, Ot as ActionCause, P as AudioSinkOptions, Pn as UiEasingChoice, Pr as isPortHandshake, Pt as DevtoolsRequest, Q as StorageAdapter, Qn as UiPropOrigin, Qr as ThemeTokenCell, Qt as FontFaceLike, R as FrameService, Rn as ShellFileType, Rr as findUnplainPath, Rt as UiTreeSnapshot, S as writeClipboard, Si as FanOut, Sn as parseUrl, Sr as serve, St as WorkerApp, T as TextService, Ti as ComputedCell, Tn as AudioRequest, Tr as ChannelRegistryHandle, Tt as ShellHistoryMode, U as ShellStorageOptions, Un as ShellStorageResult, Ur as provide, Ut as FrameMetrics, V as persisted, Vn as ShellService, Vr as ChannelSource, Vt as RuntimeToShellMessage, W as IndexedDbStorage, Wn as ColorScheme, Wr as Channel, Wt as FramePhaseTimings, X as OpfsWritable, Xn as UiNodeReport, Xr as ControlledValue, Xt as UiFramePhase, Y as OpfsStorageOptions, Yn as UiEnvironmentReport, Yr as ControlledOptions, Yt as UI_FRAME_PHASES, Z as MemoryStorage, Zn as UiOwnerReport, Zr as controlled, Zt as FontFaceDeclaration, _ as EditingMirrorTarget, _i as resource, _n as route, _r as isComponentElement, _t as createSyncApp, a as UiRole, ai as EachKey, an as RouteAnswer, ar as formatNodeReport, at as UndoShortcutOptions, b as EditingProxy, bi as FanCell, bn as buildPath, br as pickKeys, bt as createApp, c as UiSemanticsPatch, ci as debounced, cn as RouterRoutes, cr as ComponentHostResolver, ct as undoable, d as markNow, di as Mutation, dn as OutletProps, dr as OverlayEntry, dt as UndoTransaction, ei as bind, en as FontFamilyStatus, er as UiSemanticsReport, et as StorageRead, f as measureSpan, fi as mutate, fn as RouteContext, fr as OverlayPlacement, ft as ShellLocalStore, g as renderRoot, gi as ResourceStatus, gn as RouteTarget, gr as FrameworkChild, gt as GessoAppOptions, h as RenderWorkerApp, hi as ResourceState, hn as RouteOptions, hr as ComponentElement, ht as GessoApp, i as UI_SEMANTIC_STATES, ii as Each, in as MediaService, ir as formatNodePath, it as storageReadValue, j as RouterOutlet, ji as derive, jn as AnimationService, jr as WorkerHandle, jt as CommandEntry, k as Presence, ki as DeriveOptions, kn as AudioStatus, kr as PortHandshake, kt as ActionEntry, l as UiSemanticsRecord, li as throttled, ln as RouterService, lr as ComponentHost, lt as UndoStack, m as setPerformanceMarks, mi as ResourceOptions, mn as RouteGuard, mr as createComponent, mt as shellStorageDenied, n as MARK_PREFIX, ni as ShowProps, nn as FontService, nr as describeStream, nt as storageErrorMessage, o as UiSemanticState, oi as EachProps, on as RouteMatch, or as formatStream, ot as registerUndoShortcuts, p as performanceMarksEnabled, pi as Resource, pn as RouteDefinition, pr as OverlayService, pt as performShellStorage, q as OpfsFileHandle, qn as BoundStream, qr as Input, qt as RendererChoice, r as UI_ROLES, ri as show, rn as MediaOptions, rr as formatAge, rt as storageReadFailure, s as UiSemanticsMap, si as each, sn as RouterHistorySink, sr as printPropValue, st as UndoableOptions, t as EditingState, ti as Show, tn as FontHost, tr as UiStreamReport, tt as classifyStorageError, u as markInstant, ui as MutateOptions, un as RouteState, ur as OverlayLayer, ut as UndoStackOptions, v as SemanticsMirror, vi as SelectOptions, vn as to, vr as structurallyEqual, vt as GessoAppBuilder, w as EditingService, wi as fanOut, wn as AudioMetadata, wr as ChannelRegistration, wt as ShellHistory, x as EditingProxySink, xi as FanKey, xn as formatUrl, xr as ServedChannel, xt as AppLogicEndpoint, y as SemanticsMirrorSink, yi as select, yn as RouteParams, yr as pick, yt as CreateAppOptions, z as PersistedOptions, zn as ShellRecentFile, zr as requirePlainData, zt as treeText } from "./index-C9FAI_Kt.js";
|
|
3
3
|
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 ChannelSource, type ChannelSpec, type ChannelToken, type ClassComponent, type ColorScheme, type ColorSchemePreference, type Command, type CommandEntry, type CommandMap, 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 Inputs, InternalState, 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, 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, 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, WorkerApp, type WorkerAppOptions, type WorkerHandle, applyPatch, applyPatches, audioClock, bind, bounds, buildPath, channel, classifyStorageError, computed, controlled, createApp, createChannelRegistry, createComponent, createShellHistory, createSyncApp, debounced, defineChannel, derive, 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, 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,7 +1,7 @@
|
|
|
1
|
-
import { $ as structurallyEqual, A as printPropValue, B as channel, C as captureConsole, D as formatNodePath, E as formatAge, F as applyPatch, G as mutate, H as viewKeys, I as applyPatches, J as select, K as Resource, L as diffProjection, M as provide, N as findUnplainPath, O as formatNodeReport, P as requirePlainData, Q as equalityOf, R as isChannelClientMessage, S as workerHandle, T as describeStream, U as debounced, V as defineChannel, W as throttled, X as computed, Y as ComputedCell, Z as derive, _ as isHubMessage, a as undoable, at as isOutputTarget, b as portHandle, c as classifyStorageError, ct as trackRead, d as storageReadValue, et as InternalState, f as pick, g as APPLICATION_WORKER, h as serveChannels, i as OpfsStorage, it as into, j as ProvidedChannel, k as formatStream, l as storageErrorMessage, lt as withBodyOf, m as serve, n as persisted, nt as InputCell, o as UndoStack, ot as output, p as pickKeys, q as resource, r as IndexedDbStorage, rt as input, s as MemoryStorage, st as outputTargetOf, t as PersistedState, tt as internalState, u as storageReadFailure, v as isPortErrorMessage, w as isConsoleEntryMessage, x as servePorts, y as isPortHandshake, z as isChannelHostMessage } from "./persisted-
|
|
1
|
+
import { $ as structurallyEqual, A as printPropValue, B as channel, C as captureConsole, D as formatNodePath, E as formatAge, F as applyPatch, G as mutate, H as viewKeys, I as applyPatches, J as select, K as Resource, L as diffProjection, M as provide, N as findUnplainPath, O as formatNodeReport, P as requirePlainData, Q as equalityOf, R as isChannelClientMessage, S as workerHandle, T as describeStream, U as debounced, V as defineChannel, W as throttled, X as computed, Y as ComputedCell, Z as derive, _ as isHubMessage, a as undoable, at as isOutputTarget, b as portHandle, c as classifyStorageError, ct as trackRead, d as storageReadValue, et as InternalState, f as pick, g as APPLICATION_WORKER, h as serveChannels, i as OpfsStorage, it as into, j as ProvidedChannel, k as formatStream, l as storageErrorMessage, lt as withBodyOf, m as serve, n as persisted, nt as InputCell, o as UndoStack, ot as output, p as pickKeys, q as resource, r as IndexedDbStorage, rt as input, s as MemoryStorage, st as outputTargetOf, t as PersistedState, tt as internalState, u as storageReadFailure, v as isPortErrorMessage, w as isConsoleEntryMessage, x as servePorts, y as isPortHandshake, z as isChannelHostMessage } from "./persisted-CsTPnjkc.js";
|
|
2
2
|
import { a as Each, i as show, n as getComponentMetadata, o as each, r as Show, t as createComponent } from "./createComponent-3n1ZSql8.js";
|
|
3
3
|
import { BehaviorSubject, EMPTY, Observable, Subject, Subscription, distinctUntilChanged, map } from "rxjs";
|
|
4
|
-
import { AnimationDriver, Box, Canvas2DRenderer, CanvasPlatformSurface, CanvasTextMeasurer, Constraints, DefaultImageResolver, DefaultVideoResolver, DirtyFlags, EnvironmentNotifier, FocusNotifier, IconRasterizer, LayoutEngine, LayoutInspector, LayoutNotifier, MARK_PREFIX, Stack, TEXT_RUN_ID_SEPARATOR, UI_ROLES, UI_SEMANTIC_STATES, UiAnimationFrameClock, UiEditingController, UiEnvironmentKeys, UiEventType, UiFindController, UiFocusManager, UiGestureRecognizer, UiGraph, UiGraphBuilder, UiHitTester, UiHostFrameClock, UiInputDispatcher, UiInsetRegistry, UiKeyboardController, UiNodeType, UiPlatformAdapter, UiPointerController, UiPointerEvent, UiScheduler, UiSelectionController, UiSharedElements, UiSpring, UiTimerFrameClock, UiTouchScroller, UiVirtualSheet, UiVirtualWindow, UiWheelController, VIRTUAL_INDEX_PROP, VIRTUAL_LEAD_PROP, VIRTUAL_SHEET_PROP, VIRTUAL_WINDOW_PROP, WebGPURenderer, buildSemanticsSubtree, buildSemanticsTree, bumpFontStack, capturePointer, createCanvasSurface, createTween, createWebGPUSurface, defaultMotion, describeOverrides, diffSemantics, dragSessionFor, easings, formatExplanation, insetsEqual, isComponentLikeElement, isObservable, isWebGPUAvailable, linear, linkOf, markInstant, markNow, measure, measureSpan, motion, noInsets, observeViewportInsets, percent, performanceMarksEnabled, pointerDeviceOf, prepareInputSurface, propertyEffects, recordsEqual, registerFontStack, resolveCursor, scrollbarThumb, semanticsInertAbove, setPerformanceMarks, setPerformanceMarks as setPerformanceMarks$1, textRunOfRecordId, themeTokens, touchActionFor, wheelDeltaYOf } from "gesso-core";
|
|
4
|
+
import { AnimationDriver, Box, Canvas2DRenderer, CanvasPlatformSurface, CanvasTextMeasurer, Constraints, DefaultImageResolver, DefaultVideoResolver, DirtyFlags, EnvironmentNotifier, FocusNotifier, IconRasterizer, LayoutEngine, LayoutInspector, LayoutNotifier, MARK_PREFIX, Stack, TEXT_RUN_ID_SEPARATOR, UI_ROLES, UI_SEMANTIC_STATES, UiAnimationFrameClock, UiEditingController, UiEnvironmentKeys, UiEventType, UiFindController, UiFocusManager, UiGestureRecognizer, UiGraph, UiGraphBuilder, UiHitTester, UiHostFrameClock, UiInputDispatcher, UiInsetRegistry, UiKeyboardController, UiNodeType, UiPlatformAdapter, UiPointerController, UiPointerEvent, UiScheduler, UiSelectionController, UiSharedElements, UiSpring, UiTimerFrameClock, UiTouchScroller, UiVirtualSheet, UiVirtualWindow, UiWheelController, VIRTUAL_INDEX_PROP, VIRTUAL_LEAD_PROP, VIRTUAL_SHEET_PROP, VIRTUAL_WINDOW_PROP, WebGPURenderer, buildSemanticsSubtree, buildSemanticsTree, bumpFontStack, capturePointer, createCanvasSurface, createTween, createWebGPUSurface, defaultMotion, describeOverrides, diffSemantics, dragSessionFor, easings, formatExplanation, insetsEqual, isComponentLikeElement, isObservable, isWebGPUAvailable, linear, linkOf, markInstant, markNow, measure, measureSpan, motion, noInsets, observeViewportInsets, percent, performanceMarksEnabled, pointerDeviceOf, prepareInputSurface, propertyEffects, recordsEqual, registerFontStack, resolveCursor, scrollRange, scrollbarThumb, semanticsInertAbove, setPerformanceMarks, setPerformanceMarks as setPerformanceMarks$1, textRunOfRecordId, themeTokens, touchActionFor, wheelDeltaYOf } from "gesso-core";
|
|
5
5
|
//#region src/Component.ts
|
|
6
6
|
/**
|
|
7
7
|
* Base class for all Gesso framework components.
|
|
@@ -6732,7 +6732,7 @@ var GessoRuntime = class {
|
|
|
6732
6732
|
this.smoothScroller = new SmoothScroller(this.graph, this.services.get(AnimationService), (node, axis) => {
|
|
6733
6733
|
const record = this.engine.recordFor(node);
|
|
6734
6734
|
if (record === void 0) return 0;
|
|
6735
|
-
return axis === "scrollY" ?
|
|
6735
|
+
return scrollRange(record, axis === "scrollY" ? "y" : "x");
|
|
6736
6736
|
});
|
|
6737
6737
|
if (!this.services.has(RouterService)) this.services.register(RouterService);
|
|
6738
6738
|
const router = this.services.get(RouterService);
|
|
@@ -7792,7 +7792,7 @@ var GessoRuntime = class {
|
|
|
7792
7792
|
editing,
|
|
7793
7793
|
selection
|
|
7794
7794
|
}),
|
|
7795
|
-
wheel: new UiWheelController(hitTester, this.dispatcher, scrollSink, () => root),
|
|
7795
|
+
wheel: new UiWheelController(hitTester, this.dispatcher, scrollSink, () => this.appRoot ?? root),
|
|
7796
7796
|
keyboard: new UiKeyboardController(this.dispatcher, focus, () => this.appRoot ?? this.layoutRoot(), {
|
|
7797
7797
|
editing,
|
|
7798
7798
|
selection,
|
|
@@ -8150,8 +8150,8 @@ var GessoRuntime = class {
|
|
|
8150
8150
|
return {
|
|
8151
8151
|
scrollX: record.scrollX,
|
|
8152
8152
|
scrollY: record.scrollY,
|
|
8153
|
-
maxScrollX:
|
|
8154
|
-
maxScrollY:
|
|
8153
|
+
maxScrollX: scrollRange(record, "x"),
|
|
8154
|
+
maxScrollY: scrollRange(record, "y"),
|
|
8155
8155
|
horizontal: node.getProperty("direction") === "row" || node.type === UiNodeType.Row,
|
|
8156
8156
|
viewportWidth: record.width,
|
|
8157
8157
|
viewportHeight: record.height
|
|
@@ -8335,11 +8335,16 @@ var GessoRuntime = class {
|
|
|
8335
8335
|
if (this.renderer.backend === "webgpu" && this.renderer.isLost) this.fallBackToCanvas2D(this.renderer);
|
|
8336
8336
|
const overlay = this.inspector.hasOverlay ? this.inspector.overlay(started) : null;
|
|
8337
8337
|
this.gpuTimings = null;
|
|
8338
|
+
const changes = this.graph.getDirtyNodes().isEmpty() ? {
|
|
8339
|
+
frame,
|
|
8340
|
+
geometryVersion: this.engine.geometryVersion
|
|
8341
|
+
} : void 0;
|
|
8338
8342
|
this.phaseTimings.render = this.timePhase(() => this.renderer.isReady, () => this.renderer.render(root, {
|
|
8339
8343
|
layout: this.engine,
|
|
8340
8344
|
text: this.textMeasurer,
|
|
8341
8345
|
now: started,
|
|
8342
|
-
overlay: overlay?.shapes
|
|
8346
|
+
overlay: overlay?.shapes,
|
|
8347
|
+
changes
|
|
8343
8348
|
}));
|
|
8344
8349
|
if (overlay !== null) {
|
|
8345
8350
|
if (laidOut) this.sendInspection();
|