gesso-framework 0.8.0 → 0.8.1
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 +12 -0
- package/dist/agent/index.js +1 -1
- package/dist/{index-DocVauCS.d.ts → index-C08h2Jze.d.ts} +76 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/remote/index.d.ts +1 -1
- package/dist/{render-W2XO444K.js → render-DlhL5y0d.js} +108 -3
- package/dist/render-DlhL5y0d.js.map +1 -0
- package/dist/worker/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/render-W2XO444K.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# gesso-framework
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5df787f: `EditingService.offsetNear(node, x, y)` says which caret position in a field is nearest a point, as a press there would put the caret, so a field opened over text the person pointed at can start its caret there with `select`.
|
|
8
|
+
- f2dc13c: `ShellService.preferColorScheme('light' | 'dark' | 'auto')` lets an application with an appearance setting of its own tell the shell which appearance to report, from the render worker too, as the host's `setColorScheme` does. A host can then start the app in a stored choice before the first frame (`createApp({ colorScheme })`) and the app can still go back to following the system.
|
|
9
|
+
- Hot replacement: when a module is replaced while the app runs, everything the replaced component rendered is mounted again with it. A child component from a module that was not replaced used to be kept, still holding the objects the old parent gave it, so part of the screen followed old state after a save.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- Updated dependencies [5df787f]
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- gesso-core@0.8.1
|
|
14
|
+
|
|
3
15
|
## 0.8.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as renderModule } from "../render-
|
|
1
|
+
import { t as renderModule } from "../render-DlhL5y0d.js";
|
|
2
2
|
import { a as WAITS_UP_TO, c as resultText, i as serveAgentPort, l as validate, n as combineSurfaces, o as agentSurface, r as remoteSurface, s as resourceUri, t as AGENT_PORT } from "../remote-B4bjdTzg.js";
|
|
3
3
|
import { a as outline, c as formatThemeTokens, d as agentImages, f as agentText, i as UiRefs, l as themeTokens, m as designedTheme, n as serveApplicationAgent, o as resolveTarget, p as toolSurface, r as SCREEN_TOOL_NAMES, s as uiSurface, u as agentError } from "../app-De3z58x7.js";
|
|
4
4
|
import { i as registerWebMcpTools, n as connectWebMcp, r as pageModelContext, t as confirmInWindow } from "../webmcp-D7IlA0fu.js";
|
|
@@ -1922,6 +1922,9 @@ type ShellRequest = {
|
|
|
1922
1922
|
} | {
|
|
1923
1923
|
type: 'leaveWarning';
|
|
1924
1924
|
on: boolean;
|
|
1925
|
+
} | {
|
|
1926
|
+
type: 'colorScheme';
|
|
1927
|
+
preference: ColorSchemePreference;
|
|
1925
1928
|
} | {
|
|
1926
1929
|
type: 'popup';
|
|
1927
1930
|
id: number;
|
|
@@ -2109,6 +2112,8 @@ declare class ShellService {
|
|
|
2109
2112
|
private handler;
|
|
2110
2113
|
/** What `warnOnLeave` last said. */
|
|
2111
2114
|
private leaving;
|
|
2115
|
+
/** What `preferColorScheme` last asked for; null until it is asked. */
|
|
2116
|
+
private preferred;
|
|
2112
2117
|
private readonly scheme;
|
|
2113
2118
|
private readonly contrastState;
|
|
2114
2119
|
private readonly pointerState;
|
|
@@ -2360,6 +2365,26 @@ declare class ShellService {
|
|
|
2360
2365
|
* nothing.
|
|
2361
2366
|
*/
|
|
2362
2367
|
warnOnLeave(on: boolean): void;
|
|
2368
|
+
/**
|
|
2369
|
+
* Asks the shell to report this appearance from now on: `light` or
|
|
2370
|
+
* `dark` whatever the platform says, or `auto` to follow the platform
|
|
2371
|
+
* again. `colorScheme` then reports the answer, as it does when the
|
|
2372
|
+
* host calls `setColorScheme`, which is the same switch.
|
|
2373
|
+
*
|
|
2374
|
+
* For an application whose appearance setting is its own and stored:
|
|
2375
|
+
* the host reads the stored choice before the first frame and starts
|
|
2376
|
+
* with it (`createApp({ colorScheme })`), and the application, where
|
|
2377
|
+
* the person changes it, says so here. Without this, an application in
|
|
2378
|
+
* a render worker could not take back an override the host started it
|
|
2379
|
+
* with, and `auto` would keep reporting the stored choice instead of
|
|
2380
|
+
* the platform's. An application that stores nothing can combine its
|
|
2381
|
+
* choice with `colorScheme` instead and never call this.
|
|
2382
|
+
*
|
|
2383
|
+
* A request, because the media query is the window's; and a state,
|
|
2384
|
+
* like `warnOnLeave`, so a shell that arrives after it was asked is
|
|
2385
|
+
* told. Asking for the same thing twice sends nothing.
|
|
2386
|
+
*/
|
|
2387
|
+
preferColorScheme(preference: ColorSchemePreference): void;
|
|
2363
2388
|
/** Called by the runtime when the shell reports the state. Not for applications. */
|
|
2364
2389
|
applyFullscreen(active: boolean): void;
|
|
2365
2390
|
/**
|
|
@@ -3865,6 +3890,10 @@ declare class GessoRuntime {
|
|
|
3865
3890
|
* lays out, whichever comes first; see `resize`.
|
|
3866
3891
|
*/
|
|
3867
3892
|
private laidOutOnce;
|
|
3893
|
+
/** Frames in a row that threw; see `reportFrameError`. */
|
|
3894
|
+
private framesFailed;
|
|
3895
|
+
/** Nodes that declare `holdUnseen`, as frames have found them; see `updateHolds`. */
|
|
3896
|
+
private readonly holdable;
|
|
3868
3897
|
constructor(options: GessoRuntimeOptions);
|
|
3869
3898
|
/**
|
|
3870
3899
|
* Aligns patch delivery from worker-owned channels to the frame.
|
|
@@ -4427,7 +4456,9 @@ declare class GessoRuntime {
|
|
|
4427
4456
|
* reconciles rather than recreating, so a component whose class is
|
|
4428
4457
|
* the same object as before keeps its host and its `internalState`;
|
|
4429
4458
|
* one whose module was replaced is a different class, and its host
|
|
4430
|
-
* is disposed and mounted again
|
|
4459
|
+
* is disposed and mounted again with everything it rendered: its body
|
|
4460
|
+
* made new objects for its children, and a child kept from before
|
|
4461
|
+
* would go on holding the old ones. Scroll offsets on containers that
|
|
4431
4462
|
* survive are kept, because the node is kept. Component state in a
|
|
4432
4463
|
* replaced module is lost, which is the honest cost and the reason
|
|
4433
4464
|
* this is a development tool.
|
|
@@ -4833,6 +4864,17 @@ declare class GessoRuntime {
|
|
|
4833
4864
|
/** Applies what waits for settled boxes: a reload's focus, then the reveals asked for. */
|
|
4834
4865
|
private finishSettling;
|
|
4835
4866
|
private warnLayoutPasses;
|
|
4867
|
+
/**
|
|
4868
|
+
* Holds each subtree that declares `holdUnseen` while it cannot be
|
|
4869
|
+
* read, and lets it go on the frame it can (see `UiGraph.hold`).
|
|
4870
|
+
*
|
|
4871
|
+
* Decided after the frame is drawn, from where it was drawn: a subtree
|
|
4872
|
+
* is only ever held once it has been laid out and painted, so what is
|
|
4873
|
+
* kept of it is what it showed, and one let go catches up on the next
|
|
4874
|
+
* frame, which its own marks arm. Only frames that moved or laid
|
|
4875
|
+
* something out can change the answer, so the rest pay nothing.
|
|
4876
|
+
*/
|
|
4877
|
+
private updateHolds;
|
|
4836
4878
|
private handleFrame;
|
|
4837
4879
|
/**
|
|
4838
4880
|
* Keeps frames coming while something is animating.
|
|
@@ -5566,6 +5608,16 @@ type RuntimeToShellMessage = {
|
|
|
5566
5608
|
type: 'leaveWarning';
|
|
5567
5609
|
on: boolean;
|
|
5568
5610
|
} |
|
|
5611
|
+
/**
|
|
5612
|
+
* Report this appearance from now on (ShellService.preferColorScheme):
|
|
5613
|
+
* `light` or `dark`, or `auto` to follow `prefers-color-scheme` again.
|
|
5614
|
+
* The shell does what `WorkerApp.setColorScheme` does, and answers
|
|
5615
|
+
* with `colorScheme`.
|
|
5616
|
+
*/
|
|
5617
|
+
{
|
|
5618
|
+
type: 'preferColorScheme';
|
|
5619
|
+
preference: ColorSchemePreference;
|
|
5620
|
+
} |
|
|
5569
5621
|
/**
|
|
5570
5622
|
* Open a sized, named window and report back whether the browser
|
|
5571
5623
|
* allowed it (ShellService.openPopup).
|
|
@@ -7961,6 +8013,15 @@ declare class InspectionService {
|
|
|
7961
8013
|
* was used (`owners[].usedAt`).
|
|
7962
8014
|
*/
|
|
7963
8015
|
inspect(node: UiNode): UiNodeReport;
|
|
8016
|
+
/**
|
|
8017
|
+
* Why the node has the size it has, as the layout decided it: for
|
|
8018
|
+
* each axis, the rule that fixed it (`decidedBy`: its own length, a
|
|
8019
|
+
* flex share, a stretch across its parent, its content, a clamp) and
|
|
8020
|
+
* the sentences that say so. What a design tool needs to tell an
|
|
8021
|
+
* element that fills its parent from one that only happens to be as
|
|
8022
|
+
* wide, which the box alone cannot. Null before the node is laid out.
|
|
8023
|
+
*/
|
|
8024
|
+
explain(node: UiNode): LayoutExplanation | null;
|
|
7964
8025
|
/**
|
|
7965
8026
|
* Where the node is drawn, as `inspect(node).box` reports it, without
|
|
7966
8027
|
* the rest of the report: for an editor that reads the boxes of many
|
|
@@ -8037,6 +8098,8 @@ declare class InspectionService {
|
|
|
8037
8098
|
interface InspectionHost {
|
|
8038
8099
|
nodesAt(x: number, y: number): readonly UiNode[];
|
|
8039
8100
|
inspect(node: UiNode): UiNodeReport;
|
|
8101
|
+
/** Why the node has its size, as the layout engine explains it. */
|
|
8102
|
+
explain?(node: UiNode): LayoutExplanation | null;
|
|
8040
8103
|
/** The node's box alone, as `inspect` reports it. */
|
|
8041
8104
|
box?(node: UiNode): {
|
|
8042
8105
|
readonly x: number;
|
|
@@ -8596,6 +8659,17 @@ declare class EditingService {
|
|
|
8596
8659
|
* all three of which happen during the frame a field first appears.
|
|
8597
8660
|
*/
|
|
8598
8661
|
caretRectOf(node: UiNode | null, offset?: number): CaretRect | null;
|
|
8662
|
+
/**
|
|
8663
|
+
* The caret position nearest a point in a field, the point given as a
|
|
8664
|
+
* pointer event gives it: where a press there would put the caret.
|
|
8665
|
+
*
|
|
8666
|
+
* What a field opened over text the person pointed at uses to start
|
|
8667
|
+
* the caret where they pointed: ask once the field is laid out, then
|
|
8668
|
+
* `select` that offset. Null when the node is not an editable, when it
|
|
8669
|
+
* has not been laid out yet, or before the runtime has wired the
|
|
8670
|
+
* controller: "ask again next frame", as for `caretRectOf`.
|
|
8671
|
+
*/
|
|
8672
|
+
offsetNear(node: UiNode | null, x: number, y: number): number | null;
|
|
8599
8673
|
/**
|
|
8600
8674
|
* Selects from `anchor` to `focus` and focuses the field the focus is
|
|
8601
8675
|
* in: within one field, or across the fields of an editing group (see
|
|
@@ -9337,4 +9411,4 @@ declare class RenderWorkerApp {
|
|
|
9337
9411
|
}
|
|
9338
9412
|
//#endregion
|
|
9339
9413
|
export { OpfsStorageOptions as $, BoundStream as $n, ThemeTokenCell as $r, RendererChoice as $t, observeReducedMotion as A, DeriveOptions as Ai, AudioMetadata as An, OverlayRect as Ar, ShellHistory as At, InspectionHost as B, UiEasingChoice as Bn, findUnplainPath as Br, DevtoolsRequest as Bt, writeClipboard as C, FanOut as Ci, route as Cn, StartingInputsByName as Cr, GessoAppBuilder as Ct, TextService as D, ComputedOptions as Di, formatUrl as Dn, OverlayScopeProps as Dr, AppLogicEndpoint as Dt, EditingService as E, ComputedCell as Ei, buildPath as En, OverlayScope as Er, createApp as Et, AudioSink as F, AudioStatus as Fn, pick as Fr, ActionEntry as Ft, persisted as G, ShellRecentFile as Gn, Input as Gr, treeText as Gt, FrameService as H, ShellFileRequest as Hn, Channel as Hr, PatchEntry as Ht, AudioSinkOptions as I, AnimateOptions as In, pickKeys as Ir, ChannelErrorEntry as It, IndexedDbStorage as J, ShellStorageOp as Jn, SharedValuesKey as Jr, ShellToRuntimeMessage as Jt, ShellStorage as K, ShellRequest as Kn, Output as Kr, RuntimeErrorSource as Kt, AudioSinkOutput as L, AnimationService as Ln, ChannelRegistration as Lr, CommandEntry as Lt, PresenceProps as M, derive as Mi, AudioSample as Mn, OverlayService as Mr, ShellHistoryOptions as Mt, RouterOutlet as N, AudioService as Nn, createComponent as Nr, createShellHistory as Nt, FindService as O, ReadSource as Oi, parseUrl as On, OverlayEntry as Or, WorkerApp as Ot, AudioElementLike as P, AudioState as Pn, structurallyEqual as Pr, ActionCause as Pt, OpfsStorage as Q, observeColorScheme as Qn, controlled as Qr, GessoRuntimeOptions as Qt, MediaSessionLike as R, SpringOptions as Rn, ChannelRegistryHandle as Rr, ConsoleEntry as Rt, EditingProxySink as S, FanKey as Si, RouteTarget as Sn, StartingInputsProps as Sr, createSyncApp as St, ScrollService as T, fanOut as Ti, RouteParams as Tn, StartingInputsRecord as Tr, CreateAppOptions as Tt, PersistedOptions as U, ShellFileResult as Un, Define as Ur, UiTreeNode as Ut, InspectionService as V, ShellFile as Vn, requirePlainData as Vr, FrameEntry as Vt, PersistedState as W, ShellFileType as Wn, Inject as Wr, UiTreeSnapshot as Wt, OpfsDirectory as X, ColorScheme as Xn, ControlledOptions as Xr, FramePhaseTimings as Xt, IndexedDbStorageOptions as Y, ShellStorageResult as Yn, sharedValue as Yr, FrameMetrics as Yt, OpfsFileHandle as Z, ColorSchemePreference as Zn, ControlledValue as Zr, GessoRuntime as Zt, renderRoot as _, ResourceStatus as _i, OutletProps as _n, ComponentHostResolver as _r, ShellLocalStore as _t, UiRole as a, Each as ai, FontFamilyDeclaration as an, UiOwnerReport as ar, classifyStorageError as at, SemanticsMirrorSink as b, select as bi, RouteGuard as bn, liveInput as br, GessoApp as bt, UiSemanticsPatch as c, each as ci, FontService as cn, UiSemanticsReport as cr, storageReadValue as ct, markNow as d, MutateOptions as di, RouteAnswer as dn, formatAge as dr, UndoableOptions as dt, themeTokenCell as ei, RuntimeInput as en, NodePathTarget as er, OpfsWritable as et, measureSpan as f, Mutation as fi, RouteMatch as fn, formatNodePath as fr, undoable as ft, RenderWorkerError as g, ResourceState as gi, RouteState as gn, printPropValue as gr, rememberedDirectory as gt, RenderWorkerApp as h, ResourceOptions as hi, RouterService as hn, formatStream as hr, UndoTransaction as ht, UI_SEMANTIC_STATES as i, show as ii, FontFaceLike as in, UiOwnerInput as ir, StorageRead as it, Presence as j, Equality as ji, AudioRequest as jn, OverlayScopeKey as jr, ShellHistoryMode as jt, observeMediaQuery as k, computed as ki, AudioAction as kn, OverlayPlacement as kr, WorkerAppOptions as kt, UiSemanticsRecord$1 as l, debounced as li, MediaOptions as ln, UiStreamReport as lr, UndoShortcutOptions as lt, setPerformanceMarks$1 as m, Resource as mi, RouterRoutes as mn, formatSourceLocation as mr, UndoStackOptions as mt, MARK_PREFIX as n, Show as ni, UiFramePhase as nn, UiInteractionReport as nr, StorageAdapter as nt, UiSemanticState as o, EachKey as oi, FontFamilyStatus as on, UiPropOrigin as or, storageErrorMessage as ot, performanceMarksEnabled as p, mutate as pi, RouterHistorySink as pn, formatNodeReport as pr, UndoStack as pt, ShellStorageOptions as q, ShellService as qn, SharedValues as qr, RuntimeToShellMessage as qt, UI_ROLES as r, ShowProps as ri, FontFaceDeclaration as rn, UiNodeReport as rr, StorageOutcome as rt, UiSemanticsMap$1 as s, EachProps as si, FontHost as sn, UiPropReport as sr, storageReadFailure as st, EditingState$1 as t, bind as ti, UI_FRAME_PHASES as tn, UiEnvironmentReport as tr, MemoryStorage as tt, markInstant as u, throttled as ui, MediaService as un, describeStream as ur, registerUndoShortcuts as ut, EditingMirrorTarget as v, resource as vi, RouteContext as vn, ComponentHost as vr, performShellStorage as vt, FocusService as w, FanOutOptions as wi, to as wn, StartingInputsKey as wr, WebMcpChoice as wt, EditingProxy as x, FanCell as xi, RouteOptions as xn, StartingInputs as xr, GessoAppOptions as xt, SemanticsMirror as y, SelectOptions as yi, RouteDefinition as yn, OverlayLayer as yr, shellStorageDenied as yt, audioClock as z, UiDuration as zn, createChannelRegistry as zr, DevtoolsEvent as zt };
|
|
9340
|
-
//# sourceMappingURL=index-
|
|
9414
|
+
//# sourceMappingURL=index-C08h2Jze.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { A as isChannelHostMessage, B as CommandsOf, C as into, D as ChannelHostMessage, E as ChannelClientMessage, F as diffProjection, H as channel, I as ChannelSpec, L as ChannelToken, M as PatchPath, N as applyPatch, O as ChannelPort, P as applyPatches, R as Command, S as input, T as output, U as defineChannel, V as ViewOf, W as viewKeys, _ as EmitValue, a as ComponentType, b as OutputTarget, c as Inputs, d as BoundsCell, f as bounds, g as EmitArgs, h as ChannelReplica, i as ComponentProps, j as Patch, k as isChannelClientMessage, l as isClassComponent, m as internalState, o as FunctionComponent, p as InternalState, r as ComponentContext, s as InputValue, t as ClassComponent, u as Component, v as InputCell, w as isOutputTarget, x as ReadableCell, y as OutputCell, z as CommandMap } from "./FunctionComponent-BDVrANP0.js";
|
|
2
2
|
import { $ as isPortHandshake, B as ServedChannel, C as ServiceRegistry, G as provide, H as serveChannels, J as PortHandshake, K as APPLICATION_WORKER, Q as isPortErrorMessage, S as isComponentElement, U as ChannelSource, V as serve, W as ProvidedChannel, X as WorkerHandle, Y as PortHost, Z as isHubMessage, _ as RenderFrameOptions, at as JsonSchema, b as ComponentElement, et as portHandle, g as PictureCanvas, it as CommandSchema, nt as workerHandle, ot as channelSchema, q as MessageEndpoint, rt as ChannelSchema, st as describeChannel, tt as servePorts, v as RenderedFrame, w as ChannelRegistry, x as FrameworkChild, y as renderFrame } from "./tools-Bl8LZ7LR.js";
|
|
3
|
-
import { $ as OpfsStorageOptions, $n as BoundStream, $r as ThemeTokenCell, $t as RendererChoice, A as observeReducedMotion, Ai as DeriveOptions, An as AudioMetadata, Ar as OverlayRect, At as ShellHistory, B as InspectionHost, Bn as UiEasingChoice, Br as findUnplainPath, Bt as DevtoolsRequest, C as writeClipboard, Ci as FanOut, Cn as route, Cr as StartingInputsByName, Ct as GessoAppBuilder, D as TextService, Di as ComputedOptions, Dn as formatUrl, Dr as OverlayScopeProps, Dt as AppLogicEndpoint, E as EditingService, Ei as ComputedCell, En as buildPath, Er as OverlayScope, Et as createApp, F as AudioSink, Fn as AudioStatus, Fr as pick, Ft as ActionEntry, G as persisted, Gn as ShellRecentFile, Gr as Input, Gt as treeText, H as FrameService, Hn as ShellFileRequest, Hr as Channel, Ht as PatchEntry, I as AudioSinkOptions, In as AnimateOptions, Ir as pickKeys, It as ChannelErrorEntry, J as IndexedDbStorage, Jn as ShellStorageOp, Jr as SharedValuesKey, Jt as ShellToRuntimeMessage, K as ShellStorage, Kn as ShellRequest, Kr as Output, Kt as RuntimeErrorSource, L as AudioSinkOutput, Ln as AnimationService, Lr as ChannelRegistration, Lt as CommandEntry, M as PresenceProps, Mi as derive, Mn as AudioSample, Mr as OverlayService, Mt as ShellHistoryOptions, N as RouterOutlet, Nn as AudioService, Nr as createComponent, Nt as createShellHistory, O as FindService, Oi as ReadSource, On as parseUrl, Or as OverlayEntry, Ot as WorkerApp, P as AudioElementLike, Pn as AudioState, Pr as structurallyEqual, Pt as ActionCause, Q as OpfsStorage, Qn as observeColorScheme, Qr as controlled, Qt as GessoRuntimeOptions, R as MediaSessionLike, Rn as SpringOptions, Rr as ChannelRegistryHandle, Rt as ConsoleEntry, S as EditingProxySink, Si as FanKey, Sn as RouteTarget, Sr as StartingInputsProps, St as createSyncApp, T as ScrollService, Ti as fanOut, Tn as RouteParams, Tr as StartingInputsRecord, Tt as CreateAppOptions, U as PersistedOptions, Un as ShellFileResult, Ur as Define, Ut as UiTreeNode, V as InspectionService, Vn as ShellFile, Vr as requirePlainData, Vt as FrameEntry, W as PersistedState, Wn as ShellFileType, Wr as Inject, Wt as UiTreeSnapshot, X as OpfsDirectory, Xn as ColorScheme, Xr as ControlledOptions, Xt as FramePhaseTimings, Y as IndexedDbStorageOptions, Yn as ShellStorageResult, Yr as sharedValue, Yt as FrameMetrics, Z as OpfsFileHandle, Zn as ColorSchemePreference, Zr as ControlledValue, Zt as GessoRuntime, _ as renderRoot, _i as ResourceStatus, _n as OutletProps, _r as ComponentHostResolver, _t as ShellLocalStore, a as UiRole, ai as Each, an as FontFamilyDeclaration, ar as UiOwnerReport, at as classifyStorageError, b as SemanticsMirrorSink, bi as select, bn as RouteGuard, br as liveInput, bt as GessoApp, c as UiSemanticsPatch, ci as each, cn as FontService, cr as UiSemanticsReport, ct as storageReadValue, d as markNow, di as MutateOptions, dn as RouteAnswer, dr as formatAge, dt as UndoableOptions, ei as themeTokenCell, en as RuntimeInput, er as NodePathTarget, et as OpfsWritable, f as measureSpan, fi as Mutation, fn as RouteMatch, fr as formatNodePath, ft as undoable, g as RenderWorkerError, gi as ResourceState, gn as RouteState, gr as printPropValue, gt as rememberedDirectory, h as RenderWorkerApp, hi as ResourceOptions, hn as RouterService, hr as formatStream, ht as UndoTransaction, i as UI_SEMANTIC_STATES, ii as show, in as FontFaceLike, ir as UiOwnerInput, it as StorageRead, j as Presence, ji as Equality, jn as AudioRequest, jr as OverlayScopeKey, jt as ShellHistoryMode, k as observeMediaQuery, ki as computed, kn as AudioAction, kr as OverlayPlacement, kt as WorkerAppOptions, l as UiSemanticsRecord, li as debounced, ln as MediaOptions, lr as UiStreamReport, lt as UndoShortcutOptions, m as setPerformanceMarks, mi as Resource, mn as RouterRoutes, mr as formatSourceLocation, mt as UndoStackOptions, n as MARK_PREFIX, ni as Show, nn as UiFramePhase, nr as UiInteractionReport, nt as StorageAdapter, o as UiSemanticState, oi as EachKey, on as FontFamilyStatus, or as UiPropOrigin, ot as storageErrorMessage, p as performanceMarksEnabled, pi as mutate, pn as RouterHistorySink, pr as formatNodeReport, pt as UndoStack, q as ShellStorageOptions, qn as ShellService, qr as SharedValues, qt as RuntimeToShellMessage, r as UI_ROLES, ri as ShowProps, rn as FontFaceDeclaration, rr as UiNodeReport, rt as StorageOutcome, s as UiSemanticsMap, si as EachProps, sn as FontHost, sr as UiPropReport, st as storageReadFailure, t as EditingState, ti as bind, tn as UI_FRAME_PHASES, tr as UiEnvironmentReport, tt as MemoryStorage, u as markInstant, ui as throttled, un as MediaService, ur as describeStream, ut as registerUndoShortcuts, v as EditingMirrorTarget, vi as resource, vn as RouteContext, vr as ComponentHost, vt as performShellStorage, w as FocusService, wi as FanOutOptions, wn as to, wr as StartingInputsKey, wt as WebMcpChoice, x as EditingProxy, xi as FanCell, xn as RouteOptions, xr as StartingInputs, xt as GessoAppOptions, y as SemanticsMirror, yi as SelectOptions, yn as RouteDefinition, yr as OverlayLayer, yt as shellStorageDenied, z as audioClock, zn as UiDuration, zr as createChannelRegistry, zt as DevtoolsEvent } from "./index-
|
|
3
|
+
import { $ as OpfsStorageOptions, $n as BoundStream, $r as ThemeTokenCell, $t as RendererChoice, A as observeReducedMotion, Ai as DeriveOptions, An as AudioMetadata, Ar as OverlayRect, At as ShellHistory, B as InspectionHost, Bn as UiEasingChoice, Br as findUnplainPath, Bt as DevtoolsRequest, C as writeClipboard, Ci as FanOut, Cn as route, Cr as StartingInputsByName, Ct as GessoAppBuilder, D as TextService, Di as ComputedOptions, Dn as formatUrl, Dr as OverlayScopeProps, Dt as AppLogicEndpoint, E as EditingService, Ei as ComputedCell, En as buildPath, Er as OverlayScope, Et as createApp, F as AudioSink, Fn as AudioStatus, Fr as pick, Ft as ActionEntry, G as persisted, Gn as ShellRecentFile, Gr as Input, Gt as treeText, H as FrameService, Hn as ShellFileRequest, Hr as Channel, Ht as PatchEntry, I as AudioSinkOptions, In as AnimateOptions, Ir as pickKeys, It as ChannelErrorEntry, J as IndexedDbStorage, Jn as ShellStorageOp, Jr as SharedValuesKey, Jt as ShellToRuntimeMessage, K as ShellStorage, Kn as ShellRequest, Kr as Output, Kt as RuntimeErrorSource, L as AudioSinkOutput, Ln as AnimationService, Lr as ChannelRegistration, Lt as CommandEntry, M as PresenceProps, Mi as derive, Mn as AudioSample, Mr as OverlayService, Mt as ShellHistoryOptions, N as RouterOutlet, Nn as AudioService, Nr as createComponent, Nt as createShellHistory, O as FindService, Oi as ReadSource, On as parseUrl, Or as OverlayEntry, Ot as WorkerApp, P as AudioElementLike, Pn as AudioState, Pr as structurallyEqual, Pt as ActionCause, Q as OpfsStorage, Qn as observeColorScheme, Qr as controlled, Qt as GessoRuntimeOptions, R as MediaSessionLike, Rn as SpringOptions, Rr as ChannelRegistryHandle, Rt as ConsoleEntry, S as EditingProxySink, Si as FanKey, Sn as RouteTarget, Sr as StartingInputsProps, St as createSyncApp, T as ScrollService, Ti as fanOut, Tn as RouteParams, Tr as StartingInputsRecord, Tt as CreateAppOptions, U as PersistedOptions, Un as ShellFileResult, Ur as Define, Ut as UiTreeNode, V as InspectionService, Vn as ShellFile, Vr as requirePlainData, Vt as FrameEntry, W as PersistedState, Wn as ShellFileType, Wr as Inject, Wt as UiTreeSnapshot, X as OpfsDirectory, Xn as ColorScheme, Xr as ControlledOptions, Xt as FramePhaseTimings, Y as IndexedDbStorageOptions, Yn as ShellStorageResult, Yr as sharedValue, Yt as FrameMetrics, Z as OpfsFileHandle, Zn as ColorSchemePreference, Zr as ControlledValue, Zt as GessoRuntime, _ as renderRoot, _i as ResourceStatus, _n as OutletProps, _r as ComponentHostResolver, _t as ShellLocalStore, a as UiRole, ai as Each, an as FontFamilyDeclaration, ar as UiOwnerReport, at as classifyStorageError, b as SemanticsMirrorSink, bi as select, bn as RouteGuard, br as liveInput, bt as GessoApp, c as UiSemanticsPatch, ci as each, cn as FontService, cr as UiSemanticsReport, ct as storageReadValue, d as markNow, di as MutateOptions, dn as RouteAnswer, dr as formatAge, dt as UndoableOptions, ei as themeTokenCell, en as RuntimeInput, er as NodePathTarget, et as OpfsWritable, f as measureSpan, fi as Mutation, fn as RouteMatch, fr as formatNodePath, ft as undoable, g as RenderWorkerError, gi as ResourceState, gn as RouteState, gr as printPropValue, gt as rememberedDirectory, h as RenderWorkerApp, hi as ResourceOptions, hn as RouterService, hr as formatStream, ht as UndoTransaction, i as UI_SEMANTIC_STATES, ii as show, in as FontFaceLike, ir as UiOwnerInput, it as StorageRead, j as Presence, ji as Equality, jn as AudioRequest, jr as OverlayScopeKey, jt as ShellHistoryMode, k as observeMediaQuery, ki as computed, kn as AudioAction, kr as OverlayPlacement, kt as WorkerAppOptions, l as UiSemanticsRecord, li as debounced, ln as MediaOptions, lr as UiStreamReport, lt as UndoShortcutOptions, m as setPerformanceMarks, mi as Resource, mn as RouterRoutes, mr as formatSourceLocation, mt as UndoStackOptions, n as MARK_PREFIX, ni as Show, nn as UiFramePhase, nr as UiInteractionReport, nt as StorageAdapter, o as UiSemanticState, oi as EachKey, on as FontFamilyStatus, or as UiPropOrigin, ot as storageErrorMessage, p as performanceMarksEnabled, pi as mutate, pn as RouterHistorySink, pr as formatNodeReport, pt as UndoStack, q as ShellStorageOptions, qn as ShellService, qr as SharedValues, qt as RuntimeToShellMessage, r as UI_ROLES, ri as ShowProps, rn as FontFaceDeclaration, rr as UiNodeReport, rt as StorageOutcome, s as UiSemanticsMap, si as EachProps, sn as FontHost, sr as UiPropReport, st as storageReadFailure, t as EditingState, ti as bind, tn as UI_FRAME_PHASES, tr as UiEnvironmentReport, tt as MemoryStorage, u as markInstant, ui as throttled, un as MediaService, ur as describeStream, ut as registerUndoShortcuts, v as EditingMirrorTarget, vi as resource, vn as RouteContext, vr as ComponentHost, vt as performShellStorage, w as FocusService, wi as FanOutOptions, wn as to, wr as StartingInputsKey, wt as WebMcpChoice, x as EditingProxy, xi as FanCell, xn as RouteOptions, xr as StartingInputs, xt as GessoAppOptions, y as SemanticsMirror, yi as SelectOptions, yn as RouteDefinition, yr as OverlayLayer, yt as shellStorageDenied, z as audioClock, zn as UiDuration, zr as createChannelRegistry, zt as DevtoolsEvent } from "./index-C08h2Jze.js";
|
|
4
4
|
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, type InspectionHost, InspectionService, 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, OverlayScope, OverlayScopeKey, type OverlayScopeProps, OverlayService, type Patch, type PatchEntry, type PatchPath, type PersistedOptions, PersistedState, type PictureCanvas, type PortHandshake, type PortHost, Presence, type PresenceProps, ProvidedChannel, type ReadSource, type ReadableCell, type RenderFrameOptions, RenderWorkerApp, type RenderWorkerError, type RenderedFrame, 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, SharedValues, SharedValuesKey, 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, StartingInputs, type StartingInputsByName, StartingInputsKey, type StartingInputsProps, type StartingInputsRecord, 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 UiInteractionReport, type UiNodeReport, type UiOwnerInput, 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, formatSourceLocation, formatStream, formatUrl, input, internalState, into, isChannelClientMessage, isChannelHostMessage, isClassComponent, isComponentElement, isHubMessage, isOutputTarget, isPortErrorMessage, isPortHandshake, liveInput, markInstant, markNow, measureSpan, mutate, observeColorScheme, observeMediaQuery, observeReducedMotion, output, parseUrl, performShellStorage, performanceMarksEnabled, persisted, pick, pickKeys, portHandle, printPropValue, provide, registerUndoShortcuts, rememberedDirectory, renderFrame, renderRoot, requirePlainData, resource, route, select, serve, serveChannels, servePorts, setPerformanceMarks, sharedValue, shellStorageDenied, show, storageErrorMessage, storageReadFailure, storageReadValue, structurallyEqual, themeTokenCell, throttled, to, treeText, undoable, viewKeys, workerHandle, writeClipboard };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ComponentHostResolver, B as ChannelRegistry, C as ShellService, D as isDiscreteInputMessage, E as epochNow, F as FocusService, G as Input, H as Channel, I as boundFocus, J as BoundsCell, K as Output, L as OverlayScopeKey, M as StartingInputsKey, N as OverlayLayer, O as isInputMessage, P as __decorate, R as OverlayService, S as FrameService, T as epochFromEvent, U as Define, V as ChannelReplica, W as Inject, X as ServiceRegistry, Y as bounds, Z as Component, _ as parsePattern, a as UI_FRAME_PHASES, b as AudioService, c as TextService, d as ScrollService, f as EditingService, g as formatUrl, h as buildPath, i as GessoRuntime, j as ComponentHost, k as modifiersFrom, l as FontService, m as RouterService, n as renderFrame, o as InspectionService, p as FindService, q as liveInput, r as isClaimedError, s as AnimationService, t as renderModule, u as MediaService, v as parseUrl, w as shellFilesUnsupported, x as treeText, y as RouteState, z as isClassComponent } from "./render-
|
|
1
|
+
import { A as ComponentHostResolver, B as ChannelRegistry, C as ShellService, D as isDiscreteInputMessage, E as epochNow, F as FocusService, G as Input, H as Channel, I as boundFocus, J as BoundsCell, K as Output, L as OverlayScopeKey, M as StartingInputsKey, N as OverlayLayer, O as isInputMessage, P as __decorate, R as OverlayService, S as FrameService, T as epochFromEvent, U as Define, V as ChannelReplica, W as Inject, X as ServiceRegistry, Y as bounds, Z as Component, _ as parsePattern, a as UI_FRAME_PHASES, b as AudioService, c as TextService, d as ScrollService, f as EditingService, g as formatUrl, h as buildPath, i as GessoRuntime, j as ComponentHost, k as modifiersFrom, l as FontService, m as RouterService, n as renderFrame, o as InspectionService, p as FindService, q as liveInput, r as isClaimedError, s as AnimationService, t as renderModule, u as MediaService, v as parseUrl, w as shellFilesUnsupported, x as treeText, y as RouteState, z as isClassComponent } from "./render-DlhL5y0d.js";
|
|
2
2
|
import { a as InternalState, d as isOutputTarget, f as output, i as equalityOf, l as input, m as trackRead, n as computed, o as internalState, r as derive, s as InputCell, t as ComputedCell, u as into } from "./computed-DyW9SPpq.js";
|
|
3
3
|
import { C as defineChannel, S as channel, T as structurallyEqual, _ as applyPatch, a as portHandle, b as isChannelClientMessage, c as captureConsole, d as formatAge, f as formatNodePath, g as printPropValue, h as formatStream, i as isPortHandshake, l as isConsoleEntryMessage, m as formatSourceLocation, n as isHubMessage, o as servePorts, p as formatNodeReport, r as isPortErrorMessage, s as workerHandle, t as APPLICATION_WORKER, u as describeStream, v as applyPatches, w as viewKeys, x as isChannelHostMessage, y as diffProjection } from "./WorkerPorts-m_hLRoPj.js";
|
|
4
4
|
import { _ as Resource, a as undoable, c as classifyStorageError, d as storageReadValue, f as pick, g as mutate, h as throttled, i as OpfsStorage, 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, y as select } from "./persisted-qEBOHDnj.js";
|
|
@@ -3756,6 +3756,10 @@ var WorkerApp = class {
|
|
|
3756
3756
|
setLeaveWarning(window, message.on);
|
|
3757
3757
|
return;
|
|
3758
3758
|
}
|
|
3759
|
+
if (message.type === "preferColorScheme") {
|
|
3760
|
+
this.setColorScheme(message.preference);
|
|
3761
|
+
return;
|
|
3762
|
+
}
|
|
3759
3763
|
if (message.type === "fullscreen") {
|
|
3760
3764
|
if (this.canvas !== void 0) setElementFullscreen(this.canvas, message.enter);
|
|
3761
3765
|
return;
|
|
@@ -4813,6 +4817,10 @@ var GessoApp = class {
|
|
|
4813
4817
|
else history.forward();
|
|
4814
4818
|
return;
|
|
4815
4819
|
}
|
|
4820
|
+
if (request.type === "colorScheme") {
|
|
4821
|
+
this.setColorScheme(request.preference);
|
|
4822
|
+
return;
|
|
4823
|
+
}
|
|
4816
4824
|
if (request.type === "openRoute") {
|
|
4817
4825
|
const view = isCanvasElement(this.canvas) ? this.canvas.ownerDocument.defaultView : null;
|
|
4818
4826
|
openRouteWith(this.onOpenRoute, request.url, view === null ? null : history, (address) => view?.open(address, "_blank", "noopener"), (url) => {
|
|
@@ -5999,7 +6007,7 @@ var RenderWorkerApp = class {
|
|
|
5999
6007
|
runtime.input.keyboard.keyDown(key, modifiers);
|
|
6000
6008
|
runtime.input.keyboard.keyUp(key, modifiers);
|
|
6001
6009
|
},
|
|
6002
|
-
flush: () => this.clock?.
|
|
6010
|
+
flush: () => this.clock?.flush(),
|
|
6003
6011
|
theme: (at) => runtime.themeAt(at),
|
|
6004
6012
|
designThemes: () => this.renderThemes(),
|
|
6005
6013
|
render: (request) => renderModule(request, {
|
|
@@ -6222,7 +6230,7 @@ var RenderWorkerApp = class {
|
|
|
6222
6230
|
height,
|
|
6223
6231
|
dpr
|
|
6224
6232
|
});
|
|
6225
|
-
this.runtime.services.get(FrameService).setFlush(() => this.clock?.
|
|
6233
|
+
this.runtime.services.get(FrameService).setFlush(() => this.clock?.flush());
|
|
6226
6234
|
this.runtime.deferPatchesFrom(this.channels.registry.all());
|
|
6227
6235
|
this.runtime.onInspect((report) => {
|
|
6228
6236
|
this.host.postMessage({
|
|
@@ -6297,6 +6305,10 @@ var RenderWorkerApp = class {
|
|
|
6297
6305
|
type: "leaveWarning",
|
|
6298
6306
|
on: request.on
|
|
6299
6307
|
});
|
|
6308
|
+
else if (request.type === "colorScheme") this.host.postMessage({
|
|
6309
|
+
type: "preferColorScheme",
|
|
6310
|
+
preference: request.preference
|
|
6311
|
+
});
|
|
6300
6312
|
else if (request.type === "popup") this.host.postMessage({
|
|
6301
6313
|
type: "popup",
|
|
6302
6314
|
id: request.id,
|