gesso-framework 0.6.30 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/dist/{FunctionComponent-CHtojpp7.d.ts → FunctionComponent-BDVrANP0.d.ts} +371 -115
- package/dist/{serveChannels-BlEag7WU.js → WorkerPorts-m_hLRoPj.js} +8 -240
- package/dist/WorkerPorts-m_hLRoPj.js.map +1 -0
- package/dist/agent/index.d.ts +55 -2
- package/dist/agent/index.js +8 -4
- package/dist/agent/index.js.map +1 -1
- package/dist/app-De3z58x7.js +638 -0
- package/dist/app-De3z58x7.js.map +1 -0
- package/dist/computed-DyW9SPpq.js +587 -0
- package/dist/computed-DyW9SPpq.js.map +1 -0
- package/dist/createComponent-DJads88q.js +47 -0
- package/dist/createComponent-DJads88q.js.map +1 -0
- package/dist/{index-DZbSb8IN.d.ts → index-DocVauCS.d.ts} +593 -119
- package/dist/index.d.ts +4 -5
- package/dist/index.js +609 -6641
- package/dist/index.js.map +1 -1
- package/dist/jsx/jsx-runtime.d.ts +8 -5
- package/dist/jsx/jsx-runtime.js +15 -6
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/{persisted-fUzIU8FZ.js → persisted-qEBOHDnj.js} +4 -576
- package/dist/persisted-qEBOHDnj.js.map +1 -0
- package/dist/remote/index.d.ts +2 -2
- package/dist/remote/index.js +2 -1
- package/dist/remote/index.js.map +1 -1
- package/dist/{remote-BoB8zh7z.js → remote-B4bjdTzg.js} +19 -4
- package/dist/remote-B4bjdTzg.js.map +1 -0
- package/dist/render-W2XO444K.js +7310 -0
- package/dist/render-W2XO444K.js.map +1 -0
- package/dist/serveChannels-DReCmRxO.js +241 -0
- package/dist/serveChannels-DReCmRxO.js.map +1 -0
- package/dist/{createComponent-3n1ZSql8.js → show-D0MevHaV.js} +2 -46
- package/dist/show-D0MevHaV.js.map +1 -0
- package/dist/{ui-CHtNccR8.d.ts → tools-Bl8LZ7LR.d.ts} +351 -8
- package/dist/{webmcp-CdDq2nzS.js → webmcp-D7IlA0fu.js} +3 -3
- package/dist/webmcp-D7IlA0fu.js.map +1 -0
- package/dist/worker/index.d.ts +3 -4
- package/dist/worker/index.js +5 -3
- package/dist/worker/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/ChannelProtocol-ByNoHujM.d.ts +0 -247
- package/dist/app-Yig59Ygf.js +0 -326
- package/dist/app-Yig59Ygf.js.map +0 -1
- package/dist/createComponent-3n1ZSql8.js.map +0 -1
- package/dist/persisted-fUzIU8FZ.js.map +0 -1
- package/dist/remote-BoB8zh7z.js.map +0 -1
- package/dist/serveChannels-BlEag7WU.js.map +0 -1
- package/dist/webmcp-CdDq2nzS.js.map +0 -1
|
@@ -1,56 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as WorkerHandle, s as
|
|
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";
|
|
1
|
+
import { L as ChannelToken, R as Command, a as ComponentType, c as Inputs, i as ComponentProps, j as Patch, n as ComponentArgs, p as InternalState, r as ComponentContext, u as Component, v as InputCell, x as ReadableCell, y as OutputCell } from "./FunctionComponent-BDVrANP0.js";
|
|
2
|
+
import { C as ServiceRegistry, E as DesignThemes, O as AgentConfirmation, U as ChannelSource, X as WorkerHandle, b as ComponentElement, s as UiHost, t as AgentToolDefinition, w as ChannelRegistry, x as FrameworkChild } from "./tools-Bl8LZ7LR.js";
|
|
4
3
|
import { BehaviorSubject, Observable, Subscription } from "rxjs";
|
|
5
|
-
import { AnimatedCell, AnimationDriver, CanvasHost, CaretRect, ComponentLikeElement, ComponentResolver, EditingState, EditingState as EditingState$1, FocusOptions, IconRasterizer, ImageResolver, LayoutExplanation, LayoutInspector, MARK_PREFIX, MotionStateInput, MotionTiming, Reactive, RendererBackend, Size, TextMeasureRequest, TextMeasurer, UI_ROLES, UI_SEMANTIC_STATES, UiAnimation, UiChild, UiContrast, UiDurationToken, UiEasing, UiEasingToken, UiEditingController, UiElement, UiFileDropMessage, UiFindController, UiFocusManager, UiFrameClockFactory, UiInputDispatcher, UiInsets, UiKeyModifiers, UiKeyboardController, UiLength, UiModifier, UiMotion, UiNode, UiPlatformAdapter, UiPointerController, UiPointerDevice, UiReducedMotionPolicy, UiRole, UiScrollability, UiSelectionController, UiSemanticState, UiSemanticsAction, UiSemanticsMap, UiSemanticsMap as UiSemanticsMap$1, UiSemanticsPatch, UiSemanticsRecord, UiSemanticsRecord as UiSemanticsRecord$1, UiSemanticsUpdate, UiShortcutRegistry, UiSpringSpec, UiSpringToken, UiTextPosition, UiThemeExtension, UiTouchScroller, UiWheelController, VideoClock, VideoResolver, markInstant, markNow, measureSpan, performanceMarksEnabled, setPerformanceMarks as setPerformanceMarks$1 } from "gesso-core";
|
|
6
|
-
//#region src/service/ServiceRegistry.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* The runtime services a component may inject.
|
|
9
|
-
*
|
|
10
|
-
* A service is a plain class the runtime constructs once and hands to
|
|
11
|
-
* whoever asks: the clipboard and window (`ShellService`), overlays,
|
|
12
|
-
* focus, find, media, animation. They are not application state and
|
|
13
|
-
* they never cross a thread — they hold a `UiNode`, an `ImageResolver`,
|
|
14
|
-
* decoded bitmaps, a focus manager — so there is no replica, no patch
|
|
15
|
-
* and no wire format anywhere near them.
|
|
16
|
-
*
|
|
17
|
-
* That is the whole difference from what used to be here. Application
|
|
18
|
-
* state crosses the barrier and is declared as a channel; a service
|
|
19
|
-
* stays on the render thread and is simply called. Both used to be
|
|
20
|
-
* `Store`, and the single name hid which of the two rules applied.
|
|
21
|
-
*/
|
|
22
|
-
declare class ServiceRegistry {
|
|
23
|
-
private readonly services;
|
|
24
|
-
/** Constructs and registers a service, once. */
|
|
25
|
-
register<T extends object>(ServiceClass: new () => T): T;
|
|
26
|
-
/**
|
|
27
|
-
* Points an existing service at a replacement class of the same
|
|
28
|
-
* name, keeping the instance (the HMR).
|
|
29
|
-
*
|
|
30
|
-
* A registry is keyed by the class object, which is the right key
|
|
31
|
-
* for every purpose but one: replacing a module produces a new class
|
|
32
|
-
* object, so a component from the replaced module injects a class
|
|
33
|
-
* the registry has never seen even though a service of that name is
|
|
34
|
-
* sitting in it. Re-keying is what lets the tree be rebuilt from new
|
|
35
|
-
* code while the service it depends on carries on holding what it
|
|
36
|
-
* was holding.
|
|
37
|
-
*
|
|
38
|
-
* **The instance keeps the behaviour it was constructed with.** It
|
|
39
|
-
* was built from the old class and its methods are the old code, so
|
|
40
|
-
* a change to a service's own body needs a full reload to take
|
|
41
|
-
* effect. State survives; behaviour does not. That is the trade
|
|
42
|
-
* every hot-replacement system makes, and pretending otherwise would
|
|
43
|
-
* be worse than saying it.
|
|
44
|
-
*
|
|
45
|
-
* Returns false when nothing of that name was registered, which
|
|
46
|
-
* means the caller is looking at a genuinely new service rather than
|
|
47
|
-
* a replacement.
|
|
48
|
-
*/
|
|
49
|
-
adopt(ServiceClass: new () => object): boolean;
|
|
50
|
-
get<T extends object>(ServiceClass: new () => T): T;
|
|
51
|
-
has(ServiceClass: Function): boolean;
|
|
52
|
-
}
|
|
53
|
-
//#endregion
|
|
4
|
+
import { AnimatedCell, AnimationDriver, CanvasHost, CaretRect, ComponentLikeElement, ComponentResolver, EditingState, EditingState as EditingState$1, FocusOptions, IconRasterizer, ImageResolver, LayoutExplanation, LayoutInspector, MARK_PREFIX, MotionStateInput, MotionTiming, Reactive, RendererBackend, Size, SvgResolver, TextMeasureRequest, TextMeasurer, UI_ROLES, UI_SEMANTIC_STATES, UiAnimation, UiChild, UiClock, UiContrast, UiDurationToken, UiEasing, UiEasingToken, UiEditingController, UiElement, UiEnvironmentKey, UiFileDropMessage, UiFindController, UiFocusManager, UiFrameClockFactory, UiInputDispatcher, UiInsets, UiKeyModifiers, UiKeyboardController, UiLength, UiModifier, UiMotion, UiNode, UiPlatformAdapter, UiPointer, UiPointerController, UiPointerDevice, UiReducedMotionPolicy, UiRole, UiScrollability, UiSelectionController, UiSemanticState, UiSemanticsAction, UiSemanticsMap, UiSemanticsMap as UiSemanticsMap$1, UiSemanticsPatch, UiSemanticsRecord, UiSemanticsRecord as UiSemanticsRecord$1, UiSemanticsUpdate, UiShortcutRegistry, UiSourceLocation, UiSpringSpec, UiSpringToken, UiTextPosition, UiTheme, UiThemeExtension, UiTouchScroller, UiWheelController, VideoClock, VideoResolver, markInstant, markNow, measureSpan, performanceMarksEnabled, setPerformanceMarks as setPerformanceMarks$1 } from "gesso-core";
|
|
54
5
|
//#region src/derive.d.ts
|
|
55
6
|
/** How `derive` decides that a new value is not a change. */
|
|
56
7
|
type Equality<T> = 'reference' | 'structural' | ((a: T, b: T) => boolean);
|
|
@@ -932,6 +883,12 @@ interface ControlledOptions<T> {
|
|
|
932
883
|
readonly fallback: T;
|
|
933
884
|
/** Fired on every change in either form. */
|
|
934
885
|
readonly onChange: OutputCell<[next: T]>;
|
|
886
|
+
/**
|
|
887
|
+
* Other outputs a parent may hear the change through instead: a
|
|
888
|
+
* drawer's `onClose` beside its `onOpenChange`. A parent listening on
|
|
889
|
+
* any of them owns the value, as one passing `onChange` does.
|
|
890
|
+
*/
|
|
891
|
+
readonly heardBy?: readonly OutputCell<never>[];
|
|
935
892
|
}
|
|
936
893
|
/**
|
|
937
894
|
* Controlled by default, self-managing when given only an initial value.
|
|
@@ -942,9 +899,58 @@ interface ControlledOptions<T> {
|
|
|
942
899
|
* `defaultValue` and the control owns it, still reporting changes;
|
|
943
900
|
* pass both and it throws, because two owners is a bug. `bind(cell)` is
|
|
944
901
|
* the spread for the first form when the owner is a local cell.
|
|
902
|
+
*
|
|
903
|
+
* A `value` with no `onChange` beside it has nobody to own it, so it is
|
|
904
|
+
* where the control starts, and the control owns it from there; a new
|
|
905
|
+
* value from the parent starts it again. A screen written as a picture
|
|
906
|
+
* of a moment, `<Switch checked={true} />`, is then one a person can
|
|
907
|
+
* use: the design tool's Play mode runs mocks written exactly so, and a
|
|
908
|
+
* value that only the parent may change is what `readOnly` and
|
|
909
|
+
* `disabled` say, not a missing handler.
|
|
945
910
|
*/
|
|
946
911
|
declare function controlled<T>(options: ControlledOptions<T>): ControlledValue<T>;
|
|
947
912
|
//#endregion
|
|
913
|
+
//#region src/sharedValue.d.ts
|
|
914
|
+
/**
|
|
915
|
+
* Named values the components under one node share, with no
|
|
916
|
+
* application behind them: what one screen of a prototype was given
|
|
917
|
+
* (an email typed on Forgot password), shown by the next (Check email),
|
|
918
|
+
* or a wizard's steps passing on what was filled in.
|
|
919
|
+
*
|
|
920
|
+
* A node provides a store to what it holds,
|
|
921
|
+
* `provide={[provided(SharedValuesKey, values)]}`, and a component asks
|
|
922
|
+
* for a value by name with `sharedValue(ctx, name, start)`. Under a
|
|
923
|
+
* store, every component asking for the same name has the same cell;
|
|
924
|
+
* with none above, each has its own, at its own start. So a design tool
|
|
925
|
+
* can draw a screen on its board as written, each frame alone, and play
|
|
926
|
+
* it with the screens before it.
|
|
927
|
+
*
|
|
928
|
+
* It is not where an application's state goes. That survives a reload
|
|
929
|
+
* and is on a channel, written by a command; these are cells, written
|
|
930
|
+
* by whatever holds one, and gone with the store.
|
|
931
|
+
*/
|
|
932
|
+
declare class SharedValues {
|
|
933
|
+
private readonly cells;
|
|
934
|
+
/** Every value by name, as it is now, in the order each was first asked for. */
|
|
935
|
+
readonly values: InternalState<ReadonlyMap<string, unknown>>;
|
|
936
|
+
/** The value named `name`: made at `start` by the first to ask, and the same cell for each after. */
|
|
937
|
+
cell<T>(name: string, start: T): InternalState<T>;
|
|
938
|
+
/** Writes a value by name, as a component holding it would; a name nobody has asked for is ignored. */
|
|
939
|
+
set(name: string, value: unknown): void;
|
|
940
|
+
/** Every value back at the start it was made with. */
|
|
941
|
+
reset(): void;
|
|
942
|
+
private publish;
|
|
943
|
+
}
|
|
944
|
+
/** Where a node provides a `SharedValues` to what it holds. */
|
|
945
|
+
declare const SharedValuesKey: import("gesso-core").UiEnvironmentKey<SharedValues | null>;
|
|
946
|
+
/**
|
|
947
|
+
* A value by name: the cell the nearest `SharedValues` above holds for
|
|
948
|
+
* it, shared with every component asking for it there; with none
|
|
949
|
+
* above, a cell of this component's own, at `start`. Bind it as any
|
|
950
|
+
* cell: `<TextInput {...bind(email)} />`.
|
|
951
|
+
*/
|
|
952
|
+
declare function sharedValue<T>(ctx: ComponentContext, name: string, start: T): InternalState<T>;
|
|
953
|
+
//#endregion
|
|
948
954
|
//#region src/decorators.d.ts
|
|
949
955
|
/**
|
|
950
956
|
* Declares a class as a Gesso component.
|
|
@@ -989,25 +995,6 @@ declare function Channel(token: {
|
|
|
989
995
|
name: string;
|
|
990
996
|
}): PropertyDecorator;
|
|
991
997
|
//#endregion
|
|
992
|
-
//#region src/channel/ChannelRegistry.d.ts
|
|
993
|
-
/**
|
|
994
|
-
* The channels a runtime can hand to its components, by name.
|
|
995
|
-
*
|
|
996
|
-
* A replica is the only thing kept: whether the data lives in another
|
|
997
|
-
* worker or on this very thread is settled by the port it was attached
|
|
998
|
-
* with, and nothing above here can tell.
|
|
999
|
-
*/
|
|
1000
|
-
declare class ChannelRegistry {
|
|
1001
|
-
private readonly replicas;
|
|
1002
|
-
/** Attaches a channel over `port`. */
|
|
1003
|
-
attach<View extends object, Commands extends object>(token: ChannelToken<View, Commands>, port: ChannelPort): ChannelReplica<View, Commands>;
|
|
1004
|
-
get<View extends object, Commands extends object>(token: ChannelToken<View, Commands>): ChannelReplica<View, Commands>;
|
|
1005
|
-
has(token: ChannelToken<object, CommandMap>): boolean;
|
|
1006
|
-
/** Every attached replica, for frame-aligned patch flushing. */
|
|
1007
|
-
all(): ChannelReplica<object, CommandMap>[];
|
|
1008
|
-
dispose(): void;
|
|
1009
|
-
}
|
|
1010
|
-
//#endregion
|
|
1011
998
|
//#region src/channel/plainData.d.ts
|
|
1012
999
|
/**
|
|
1013
1000
|
* Checks that a value can cross the barrier.
|
|
@@ -1124,28 +1111,6 @@ declare function pickKeys<T extends object, K extends keyof T>(source: Observabl
|
|
|
1124
1111
|
//#region src/channel/structuralEquals.d.ts
|
|
1125
1112
|
declare function structurallyEqual<T>(a: T, b: T): boolean;
|
|
1126
1113
|
//#endregion
|
|
1127
|
-
//#region src/ComponentElement.d.ts
|
|
1128
|
-
/**
|
|
1129
|
-
* Declarative representation of a component instance in the tree.
|
|
1130
|
-
*
|
|
1131
|
-
* ComponentElements are resolved by ComponentRenderer into plain
|
|
1132
|
-
* UiElement trees before being passed to UiGraphBuilder.
|
|
1133
|
-
*/
|
|
1134
|
-
interface ComponentElement<P = Record<string, unknown>> {
|
|
1135
|
-
readonly kind: 'component';
|
|
1136
|
-
readonly tag: string;
|
|
1137
|
-
/** The class or function to mount. */
|
|
1138
|
-
readonly component: ComponentType;
|
|
1139
|
-
readonly props: P;
|
|
1140
|
-
readonly key?: string | number;
|
|
1141
|
-
}
|
|
1142
|
-
declare function isComponentElement(value: unknown): value is ComponentElement;
|
|
1143
|
-
/**
|
|
1144
|
-
* Anything the framework accepts as a child: a runtime element, an
|
|
1145
|
-
* observable stream of elements, or a component definition.
|
|
1146
|
-
*/
|
|
1147
|
-
type FrameworkChild = UiChild | ComponentElement;
|
|
1148
|
-
//#endregion
|
|
1149
1114
|
//#region src/createComponent.d.ts
|
|
1150
1115
|
/**
|
|
1151
1116
|
* Creates a ComponentElement for use as a child of a UiElement.
|
|
@@ -1183,10 +1148,14 @@ declare function createComponent<C extends ComponentType>(component: C, ...args:
|
|
|
1183
1148
|
* edge of the screen whatever the language: an arrow drawn on a
|
|
1184
1149
|
* diagram, a tooltip on a panel that is always on the left.
|
|
1185
1150
|
*
|
|
1151
|
+
* `over` lays the entry over the anchor at its size, grown by the
|
|
1152
|
+
* offset on every side: the hole a spotlight leaves around what it
|
|
1153
|
+
* shows. No direction turns it.
|
|
1154
|
+
*
|
|
1186
1155
|
* The direction is the entry's: the one its content reads in, which is
|
|
1187
1156
|
* where its theme comes from too. See `OverlayEntry.environment`.
|
|
1188
1157
|
*/
|
|
1189
|
-
type OverlayPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | 'start' | 'start-start' | 'start-end' | 'end' | 'end-start' | 'end-end';
|
|
1158
|
+
type OverlayPlacement = 'over' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | 'start' | 'start-start' | 'start-end' | 'end' | 'end-start' | 'end-end';
|
|
1190
1159
|
/** A rectangle inside an anchor, from its border box's top left. */
|
|
1191
1160
|
interface OverlayRect {
|
|
1192
1161
|
readonly x: number;
|
|
@@ -1320,6 +1289,104 @@ declare class OverlayService {
|
|
|
1320
1289
|
closeAll(): void;
|
|
1321
1290
|
isOpen(id: string): boolean;
|
|
1322
1291
|
}
|
|
1292
|
+
/**
|
|
1293
|
+
* The overlays of the `OverlayScope` a node is in: where an entry
|
|
1294
|
+
* opened there goes instead of the runtime's layer. Null outside every
|
|
1295
|
+
* scope.
|
|
1296
|
+
*/
|
|
1297
|
+
declare const OverlayScopeKey: import("gesso-core").UiEnvironmentKey<OverlayService | null>;
|
|
1298
|
+
//#endregion
|
|
1299
|
+
//#region src/overlay/OverlayScope.d.ts
|
|
1300
|
+
interface OverlayScopeProps {
|
|
1301
|
+
children?: UiChild;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* A part of the tree that holds its own overlays: a dialog, menu or
|
|
1305
|
+
* tooltip opened inside it is drawn inside it, over its content and
|
|
1306
|
+
* nowhere else.
|
|
1307
|
+
*
|
|
1308
|
+
* What a design tool's player needs from the screen it plays: a dialog
|
|
1309
|
+
* on that screen dims the screen, centres in it and is clipped by it,
|
|
1310
|
+
* is scaled with it when the screen is drawn smaller than its own size,
|
|
1311
|
+
* and leaves the tool around it pressable. A menu is placed and flipped
|
|
1312
|
+
* within it, since an anchored entry stays inside the box its layer
|
|
1313
|
+
* covers. Outside a scope, entries open in the runtime's own layer
|
|
1314
|
+
* above the whole application, as they always have.
|
|
1315
|
+
*
|
|
1316
|
+
* It fills what holds it, and is the containing block of what it
|
|
1317
|
+
* holds. `useOverlay` finds the nearest scope above the component that
|
|
1318
|
+
* opens the entry; with none, it uses the runtime's `OverlayService`.
|
|
1319
|
+
*
|
|
1320
|
+
* A dialog's trap inside it holds the keyboard inside it only: the
|
|
1321
|
+
* tool around it, and every other scope, keep their focus, and none is
|
|
1322
|
+
* taken from them when it opens or handed to them when it closes.
|
|
1323
|
+
*/
|
|
1324
|
+
declare function OverlayScope(inputs: Inputs<OverlayScopeProps>, _ctx: ComponentContext): UiChild;
|
|
1325
|
+
//#endregion
|
|
1326
|
+
//#region src/startingInputsKey.d.ts
|
|
1327
|
+
/** One component's starting inputs: input names to values. */
|
|
1328
|
+
type StartingInputsRecord = Readonly<Record<string, unknown>>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Starting inputs by component name: one record for every instance of
|
|
1331
|
+
* it, or a list for each in the order they are made (`null` for one
|
|
1332
|
+
* left as written), so the second of three switches can start on.
|
|
1333
|
+
*/
|
|
1334
|
+
type StartingInputsByName = Readonly<Record<string, StartingInputsRecord | readonly (StartingInputsRecord | null)[]>>;
|
|
1335
|
+
/**
|
|
1336
|
+
* The inputs components under a node start with, by component name,
|
|
1337
|
+
* over what their parents pass; see `StartingInputs`. Empty outside one.
|
|
1338
|
+
*/
|
|
1339
|
+
declare const StartingInputsKey: UiEnvironmentKey<StartingInputsByName>;
|
|
1340
|
+
//#endregion
|
|
1341
|
+
//#region src/StartingInputs.d.ts
|
|
1342
|
+
interface StartingInputsProps {
|
|
1343
|
+
/**
|
|
1344
|
+
* Inputs by component name: `{ ScrollArea: { scrollY: 600 }, Tour: { step: 1 } }`;
|
|
1345
|
+
* or a list for each instance in the order they are made, `null` for
|
|
1346
|
+
* one left as written: `{ Toggle: [null, { on: true }] }`.
|
|
1347
|
+
*/
|
|
1348
|
+
of?: StartingInputsByName;
|
|
1349
|
+
children?: UiChild;
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Draws what it holds with the components in it started from given
|
|
1353
|
+
* inputs, named by component, over what their parents pass: every
|
|
1354
|
+
* `ScrollArea` in it scrolled to 600, every `Tour` at its second step.
|
|
1355
|
+
*
|
|
1356
|
+
* What a design tool draws a moment of a screen with, beside the
|
|
1357
|
+
* screen as written, without a copy of the screen to drift from it: a
|
|
1358
|
+
* list scrolled far enough for its back-to-top button, a dialog open,
|
|
1359
|
+
* a tour on its second step. A component reads them as it would its
|
|
1360
|
+
* parent's props, so one that takes a value without a handler beside
|
|
1361
|
+
* it starts there and is then the person's to change, in a design
|
|
1362
|
+
* tool's player as anywhere. A preview of inputs (`InspectionService.
|
|
1363
|
+
* previewInputs`) goes over them, and ending it comes back to them.
|
|
1364
|
+
*
|
|
1365
|
+
* They are read as each component is made, so they start a component
|
|
1366
|
+
* rather than steer one: a new `of` reaches components made after it,
|
|
1367
|
+
* and once the parent passes something new for an input, it is the
|
|
1368
|
+
* parent's again, as a dialog saved open closes when its owner closes
|
|
1369
|
+
* it.
|
|
1370
|
+
* Nested, the outer one wins for an input both give a component, and
|
|
1371
|
+
* the inner one's other inputs and names still reach in: what draws a
|
|
1372
|
+
* screen at a moment decides over what the screen starts itself with,
|
|
1373
|
+
* so a moment saved from a moment is the later one. A list per instance
|
|
1374
|
+
* is taken whole. It fills what holds it.
|
|
1375
|
+
*/
|
|
1376
|
+
declare function StartingInputs(inputs: Inputs<StartingInputsProps>, ctx: ComponentContext): UiChild;
|
|
1377
|
+
//#endregion
|
|
1378
|
+
//#region src/liveInput.d.ts
|
|
1379
|
+
/**
|
|
1380
|
+
* Says what an input of the component whose body is running holds now,
|
|
1381
|
+
* as the component keeps it, and how to read it again: a switch turned
|
|
1382
|
+
* on, a field typed in, a list scrolled to 600. The inspector reports it
|
|
1383
|
+
* on the component's owner report (`live`), and a design tool saves a
|
|
1384
|
+
* moment of a played screen from it, to start the screen there again
|
|
1385
|
+
* (`StartingInputs`). `controlled` calls it for its value, so a control
|
|
1386
|
+
* written by its contract reports itself; outside a component's body it
|
|
1387
|
+
* does nothing.
|
|
1388
|
+
*/
|
|
1389
|
+
declare function liveInput(name: string, read: () => unknown): void;
|
|
1323
1390
|
//#endregion
|
|
1324
1391
|
//#region src/overlay/OverlayLayer.d.ts
|
|
1325
1392
|
/**
|
|
@@ -1348,7 +1415,10 @@ declare class OverlayService {
|
|
|
1348
1415
|
* why that node and not always the anchor.
|
|
1349
1416
|
*/
|
|
1350
1417
|
declare class OverlayLayer extends Component {
|
|
1351
|
-
|
|
1418
|
+
runtimeOverlays: OverlayService;
|
|
1419
|
+
/** The entries to draw, when not the runtime's: an `OverlayScope`'s. */
|
|
1420
|
+
service: InputCell<OverlayService | null>;
|
|
1421
|
+
private get overlays();
|
|
1352
1422
|
render(): UiElement;
|
|
1353
1423
|
private renderEntries;
|
|
1354
1424
|
}
|
|
@@ -1379,6 +1449,8 @@ declare class OverlayLayer extends Component {
|
|
|
1379
1449
|
declare class ComponentHost<P extends Record<string, unknown> = Record<string, unknown>> {
|
|
1380
1450
|
private readonly services;
|
|
1381
1451
|
private readonly channels;
|
|
1452
|
+
/** The slot's node, under its parent, for `ctx.environment`; null for a host made outside a tree. */
|
|
1453
|
+
private readonly anchor;
|
|
1382
1454
|
/** The class instance; undefined for a functional component. */
|
|
1383
1455
|
readonly instance: Component | undefined;
|
|
1384
1456
|
readonly element: ComponentElement<P>;
|
|
@@ -1400,11 +1472,29 @@ declare class ComponentHost<P extends Record<string, unknown> = Record<string, u
|
|
|
1400
1472
|
private readonly inputSubscriptions;
|
|
1401
1473
|
/** A functional component's cells, by prop name, as they were handed out. */
|
|
1402
1474
|
private readonly functionalCells;
|
|
1475
|
+
/**
|
|
1476
|
+
* Inputs it is drawn with over its parent's, from a `StartingInputs`
|
|
1477
|
+
* above it when it was made: a moment of a screen, a tour's second
|
|
1478
|
+
* step. A preview goes over these, and ending one comes back to them.
|
|
1479
|
+
*/
|
|
1480
|
+
private started;
|
|
1481
|
+
/** What the parent passed for each started input at birth: a new value from it takes over. */
|
|
1482
|
+
private readonly startedOver;
|
|
1483
|
+
/** A started input the parent passes as a stream: the start, then the stream's changes; one per input, so it is not resubscribed. */
|
|
1484
|
+
private readonly startedStreams;
|
|
1485
|
+
/** What the component says it holds now, by input; see `liveInput`. */
|
|
1486
|
+
private readonly live;
|
|
1487
|
+
/** Inputs a tool draws the component with over its parent's, until it ends them; see `previewInputs`. */
|
|
1488
|
+
private previewed;
|
|
1489
|
+
/** A class's input values from before they were previewed, for the ones its parent does not pass. */
|
|
1490
|
+
private readonly beforePreview;
|
|
1403
1491
|
private readonly mountHooks;
|
|
1404
1492
|
private readonly unmountHooks;
|
|
1405
1493
|
/** True only while the component function runs; hooks may register then. */
|
|
1406
1494
|
private rendering;
|
|
1407
|
-
constructor(element: ComponentElement<P>, services?: ServiceRegistry, channels?: ChannelRegistry
|
|
1495
|
+
constructor(element: ComponentElement<P>, services?: ServiceRegistry, channels?: ChannelRegistry,
|
|
1496
|
+
/** The slot's node, under its parent, for `ctx.environment`; null for a host made outside a tree. */
|
|
1497
|
+
anchor?: UiNode | null);
|
|
1408
1498
|
/** The class or function this host mounts. */
|
|
1409
1499
|
get component(): ComponentType;
|
|
1410
1500
|
/**
|
|
@@ -1428,6 +1518,21 @@ declare class ComponentHost<P extends Record<string, unknown> = Record<string, u
|
|
|
1428
1518
|
* cell is what updates the output.
|
|
1429
1519
|
*/
|
|
1430
1520
|
updateProps(props: P): void;
|
|
1521
|
+
/**
|
|
1522
|
+
* Feeds the inputs `values` names from them instead of from the
|
|
1523
|
+
* parent, until a call with null hands them back to the parent: a
|
|
1524
|
+
* design tool showing one of a component's states on the live tree.
|
|
1525
|
+
* A later call replaces the earlier one; a new prop from the parent
|
|
1526
|
+
* for a previewed input waits until the preview ends.
|
|
1527
|
+
*
|
|
1528
|
+
* Each input a preview starts or ends is handed its value even when
|
|
1529
|
+
* it holds that value already, as a new value from the parent is: a
|
|
1530
|
+
* control that owns what it was started at (`controlled`) starts
|
|
1531
|
+
* again from it, rather than keeping what a person turned it to.
|
|
1532
|
+
*/
|
|
1533
|
+
previewInputs(values: Readonly<Record<string, unknown>> | null): void;
|
|
1534
|
+
/** What an input is fed from: a preview's value for it, else what it was started with, else the parent's prop. */
|
|
1535
|
+
private providedFor;
|
|
1431
1536
|
private renderFunction;
|
|
1432
1537
|
/**
|
|
1433
1538
|
* The props record a functional component reads: a cell per name,
|
|
@@ -1440,6 +1545,15 @@ declare class ComponentHost<P extends Record<string, unknown> = Record<string, u
|
|
|
1440
1545
|
private createInputRecord;
|
|
1441
1546
|
private createContext;
|
|
1442
1547
|
private wireInputs;
|
|
1548
|
+
/** What the component says each of its inputs holds now; see `liveInput`. */
|
|
1549
|
+
liveInputs(): ReadonlyMap<string, unknown>;
|
|
1550
|
+
/**
|
|
1551
|
+
* What the parent most recently supplied for each input, as given:
|
|
1552
|
+
* a value, an element or a stream, whether or not the component has
|
|
1553
|
+
* read it yet. For a tool reading the tree, such as the inspector's
|
|
1554
|
+
* owner report; nothing here changes it.
|
|
1555
|
+
*/
|
|
1556
|
+
suppliedInputs(): ReadonlyMap<string, unknown>;
|
|
1443
1557
|
/**
|
|
1444
1558
|
* Connects one input cell to whatever the parent supplied.
|
|
1445
1559
|
*
|
|
@@ -1481,7 +1595,7 @@ declare class ComponentHostResolver implements ComponentResolver {
|
|
|
1481
1595
|
private readonly hosts;
|
|
1482
1596
|
private pendingMounts;
|
|
1483
1597
|
constructor(services?: ServiceRegistry, channels?: ChannelRegistry);
|
|
1484
|
-
resolve(element: ComponentLikeElement, anchorId: string): UiChild;
|
|
1598
|
+
resolve(element: ComponentLikeElement, anchorId: string, anchor?: UiNode): UiChild;
|
|
1485
1599
|
release(anchorId: string): void;
|
|
1486
1600
|
flushMounts(): void;
|
|
1487
1601
|
/**
|
|
@@ -1560,8 +1674,22 @@ interface UiNodeReport {
|
|
|
1560
1674
|
*/
|
|
1561
1675
|
readonly beneath: readonly UiBeneathReport[];
|
|
1562
1676
|
readonly semantics?: UiSemanticsReport;
|
|
1677
|
+
/**
|
|
1678
|
+
* What the node draws while hovered and while pressed, from its
|
|
1679
|
+
* `interactive` modifiers: the props it writes then, as the element
|
|
1680
|
+
* would write them. For a design tool's handoff, which writes them
|
|
1681
|
+
* as `:hover` and `:active`. Absent when it changes nothing.
|
|
1682
|
+
*/
|
|
1683
|
+
readonly interaction?: UiInteractionReport;
|
|
1563
1684
|
/** `formatExplanation` of the node's layout, which is L8's answer. */
|
|
1564
1685
|
readonly explanation: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* Where the element was written, when it was compiled for
|
|
1688
|
+
* development. The one part of the report that is a handle after
|
|
1689
|
+
* all: it names a line an editor can open, and an owner's `usedAt`
|
|
1690
|
+
* names the line that used the component around it.
|
|
1691
|
+
*/
|
|
1692
|
+
readonly source?: UiSourceLocation;
|
|
1565
1693
|
}
|
|
1566
1694
|
/** A node under the inspected one at the pointer. */
|
|
1567
1695
|
interface UiBeneathReport {
|
|
@@ -1576,7 +1704,28 @@ interface UiOwnerReport {
|
|
|
1576
1704
|
/** The `@Define` tag, else the class or function name. */
|
|
1577
1705
|
readonly name: string;
|
|
1578
1706
|
readonly anchorId: string;
|
|
1707
|
+
/** Where the component was used, when compiled for development. */
|
|
1708
|
+
readonly usedAt?: UiSourceLocation;
|
|
1709
|
+
/**
|
|
1710
|
+
* What its parent supplied for each input, as far as plain data can
|
|
1711
|
+
* say: a word, a number or a flag as it is, and an element (a slot the
|
|
1712
|
+
* parent filled) as `{ element: true }`. Handlers, data objects and
|
|
1713
|
+
* streams with no current value are left out. What a design tool
|
|
1714
|
+
* needs to write a component's use back as code: `label="Email"`.
|
|
1715
|
+
*/
|
|
1716
|
+
readonly inputs?: Readonly<Record<string, UiOwnerInput>>;
|
|
1717
|
+
/**
|
|
1718
|
+
* What the component says its inputs hold now, as it keeps them
|
|
1719
|
+
* (`liveInput`): a switch a person turned on, a list scrolled to 600.
|
|
1720
|
+
* Plain values only. What a design tool saves a moment of a played
|
|
1721
|
+
* screen from.
|
|
1722
|
+
*/
|
|
1723
|
+
readonly live?: Readonly<Record<string, string | number | boolean | null>>;
|
|
1579
1724
|
}
|
|
1725
|
+
/** One input's value in an owner report; see `UiOwnerReport.inputs`. */
|
|
1726
|
+
type UiOwnerInput = string | number | boolean | null | {
|
|
1727
|
+
readonly element: true;
|
|
1728
|
+
};
|
|
1580
1729
|
/** As much of a node as a one-line path needs. */
|
|
1581
1730
|
interface NodePathTarget {
|
|
1582
1731
|
/** `UiNodeType`, as its string value. */
|
|
@@ -1687,6 +1836,10 @@ interface UiEnvironmentReport {
|
|
|
1687
1836
|
/** Whether this node provides the value rather than inheriting it. */
|
|
1688
1837
|
readonly provided: boolean;
|
|
1689
1838
|
}
|
|
1839
|
+
interface UiInteractionReport {
|
|
1840
|
+
readonly hovered?: Readonly<Record<string, unknown>>;
|
|
1841
|
+
readonly pressed?: Readonly<Record<string, unknown>>;
|
|
1842
|
+
}
|
|
1690
1843
|
interface UiSemanticsReport {
|
|
1691
1844
|
readonly role?: string;
|
|
1692
1845
|
readonly label?: string;
|
|
@@ -1704,6 +1857,8 @@ interface UiSemanticsReport {
|
|
|
1704
1857
|
*/
|
|
1705
1858
|
declare function printPropValue(value: unknown): string;
|
|
1706
1859
|
/** The report as text, for a console or a test failure. */
|
|
1860
|
+
/** `file:line:column`, the form editors and terminals turn into a link. */
|
|
1861
|
+
declare function formatSourceLocation(source: UiSourceLocation): string;
|
|
1707
1862
|
declare function formatNodeReport(report: UiNodeReport): string;
|
|
1708
1863
|
//#endregion
|
|
1709
1864
|
//#region src/app/colorScheme.d.ts
|
|
@@ -1956,6 +2111,7 @@ declare class ShellService {
|
|
|
1956
2111
|
private leaving;
|
|
1957
2112
|
private readonly scheme;
|
|
1958
2113
|
private readonly contrastState;
|
|
2114
|
+
private readonly pointerState;
|
|
1959
2115
|
private readonly activeState;
|
|
1960
2116
|
private readonly insets;
|
|
1961
2117
|
private readonly isFullscreen;
|
|
@@ -2015,6 +2171,13 @@ declare class ShellService {
|
|
|
2015
2171
|
* );
|
|
2016
2172
|
*/
|
|
2017
2173
|
readonly contrast: ReadableCell<UiContrast>;
|
|
2174
|
+
/**
|
|
2175
|
+
* What the person points with: `coarse` on a touch screen, `fine` with
|
|
2176
|
+
* a mouse or a trackpad. Fine until a shell says otherwise. The
|
|
2177
|
+
* runtime also provides it at the root (`UiEnvironmentKeys.pointer`),
|
|
2178
|
+
* where controls read it; this is for the application's own choices.
|
|
2179
|
+
*/
|
|
2180
|
+
readonly pointer: ReadableCell<UiPointer>;
|
|
2018
2181
|
/**
|
|
2019
2182
|
* Whether the window is the one the person is using: shown, and holding
|
|
2020
2183
|
* the keyboard focus. False while it is behind another window,
|
|
@@ -2064,6 +2227,8 @@ declare class ShellService {
|
|
|
2064
2227
|
/** Called by the runtime when the shell reports whether the window is active; not for applications. */
|
|
2065
2228
|
applyWindowActive(active: boolean): void;
|
|
2066
2229
|
/** Called by the runtime when the shell reports the contrast; not for applications. */
|
|
2230
|
+
/** Called by the runtime when the shell reports what the person points with. */
|
|
2231
|
+
applyPointer(pointer: UiPointer): void;
|
|
2067
2232
|
applyContrast(contrast: UiContrast): void;
|
|
2068
2233
|
/**
|
|
2069
2234
|
* Called by the runtime when the shell reports the platform's insets.
|
|
@@ -2379,6 +2544,11 @@ interface AnimateOptions {
|
|
|
2379
2544
|
reducedMotion?: UiReducedMotionPolicy;
|
|
2380
2545
|
/** Wait this long before the first sample; see `UiAnimationOptions.delay`. */
|
|
2381
2546
|
delay?: number;
|
|
2547
|
+
/**
|
|
2548
|
+
* The clock it runs on, where it is drawn: `ctx.environment(UiEnvironmentKeys.clock)`
|
|
2549
|
+
* in a component, `clockOf(node)` from a node. Real time without one. See `UiClock`.
|
|
2550
|
+
*/
|
|
2551
|
+
clock?: UiClock | null;
|
|
2382
2552
|
}
|
|
2383
2553
|
interface SpringOptions {
|
|
2384
2554
|
/** A named spring, or one given outright. Defaults to `snappy`. */
|
|
@@ -2393,6 +2563,11 @@ interface SpringOptions {
|
|
|
2393
2563
|
reducedMotion?: UiReducedMotionPolicy;
|
|
2394
2564
|
/** Wait this long before the first sample; see `UiAnimationOptions.delay`. */
|
|
2395
2565
|
delay?: number;
|
|
2566
|
+
/**
|
|
2567
|
+
* The clock it runs on, where it is drawn: `ctx.environment(UiEnvironmentKeys.clock)`
|
|
2568
|
+
* in a component, `clockOf(node)` from a node. Real time without one. See `UiClock`.
|
|
2569
|
+
*/
|
|
2570
|
+
clock?: UiClock | null;
|
|
2396
2571
|
}
|
|
2397
2572
|
/**
|
|
2398
2573
|
* Animation, as a store components can inject.
|
|
@@ -2432,6 +2607,13 @@ declare class AnimationService {
|
|
|
2432
2607
|
* animation drives a cell, which has no node — see `UiMotion`.
|
|
2433
2608
|
*/
|
|
2434
2609
|
setMotion(motion: UiMotion): void;
|
|
2610
|
+
private motionListener;
|
|
2611
|
+
/**
|
|
2612
|
+
* Called by the runtime, which provides the vocabulary at its root so
|
|
2613
|
+
* a name in a `transition` or a `motion` state resolves to it too; a
|
|
2614
|
+
* part of the tree may provide its own over it (`UiEnvironmentKeys.motion`).
|
|
2615
|
+
*/
|
|
2616
|
+
setMotionListener(listener: ((motion: UiMotion) => void) | null): void;
|
|
2435
2617
|
get motion(): UiMotion;
|
|
2436
2618
|
/**
|
|
2437
2619
|
* Turns reduced motion on or off for this runtime.
|
|
@@ -3140,6 +3322,8 @@ interface MediaOptions {
|
|
|
3140
3322
|
resolver?: ImageResolver;
|
|
3141
3323
|
/** Where an `Icon` finds its raster. */
|
|
3142
3324
|
rasterizer?: IconRasterizer;
|
|
3325
|
+
/** Where an `Image` reads an SVG source. */
|
|
3326
|
+
vectors?: SvgResolver;
|
|
3143
3327
|
/** Where a `Video` finds its decoder. */
|
|
3144
3328
|
videoResolver?: VideoResolver;
|
|
3145
3329
|
}
|
|
@@ -3162,6 +3346,7 @@ interface MediaOptions {
|
|
|
3162
3346
|
declare class MediaService {
|
|
3163
3347
|
private imageResolver;
|
|
3164
3348
|
private iconRasterizer;
|
|
3349
|
+
private svgResolver;
|
|
3165
3350
|
private videoResolver;
|
|
3166
3351
|
/**
|
|
3167
3352
|
* Whether each of the three is the service's to dispose.
|
|
@@ -3177,6 +3362,10 @@ declare class MediaService {
|
|
|
3177
3362
|
private ownsRasterizer;
|
|
3178
3363
|
private ownsVideoResolver;
|
|
3179
3364
|
get images(): ImageResolver;
|
|
3365
|
+
/** Where an `Image` reads an SVG source, which it draws as vectors rather than decoding. */
|
|
3366
|
+
get vectors(): SvgResolver;
|
|
3367
|
+
/** The same seam, for SVG. A read file holds no pixels, so there is nothing to dispose either way. */
|
|
3368
|
+
setSvgResolver(resolver: SvgResolver): void;
|
|
3180
3369
|
get icons(): IconRasterizer;
|
|
3181
3370
|
/**
|
|
3182
3371
|
* Built on first use rather than in the field, because a decoder is
|
|
@@ -3478,6 +3667,8 @@ declare class GessoRuntime {
|
|
|
3478
3667
|
readonly inspector: LayoutInspector;
|
|
3479
3668
|
private readonly resolver;
|
|
3480
3669
|
private readonly graph;
|
|
3670
|
+
/** The properties `InspectionService.preview` is drawing over, by node; gone with the node. */
|
|
3671
|
+
private readonly previewed;
|
|
3481
3672
|
private readonly engine;
|
|
3482
3673
|
private readonly builder;
|
|
3483
3674
|
private readonly scheduler;
|
|
@@ -3517,6 +3708,8 @@ declare class GessoRuntime {
|
|
|
3517
3708
|
private lastEarlyFrame;
|
|
3518
3709
|
/** When the last discrete input was routed; see `answerInput`. */
|
|
3519
3710
|
private lastDiscreteInput;
|
|
3711
|
+
/** The wheel's steps since the last frame, added together; see `wheel`. */
|
|
3712
|
+
private heldWheel;
|
|
3520
3713
|
/** The display time the frame being drawn is for; see `FrameMetrics.time`. */
|
|
3521
3714
|
private frameTime;
|
|
3522
3715
|
/** When the frame's first phase began, before its changes were collected; see `FrameMetrics.durationMs`. */
|
|
@@ -3621,6 +3814,11 @@ declare class GessoRuntime {
|
|
|
3621
3814
|
* them. Only populated while a listener is attached.
|
|
3622
3815
|
*/
|
|
3623
3816
|
private semanticsBoxes;
|
|
3817
|
+
/** When a frame last moved something, and when the boxes were last swept; see `updateSemantics`. */
|
|
3818
|
+
private semanticsMovedAt;
|
|
3819
|
+
private semanticsSweptAt;
|
|
3820
|
+
/** The sweep owed once a run of moving frames stops. */
|
|
3821
|
+
private semanticsSweepTimer;
|
|
3624
3822
|
/** What each semantics walk leaves for the next; see `SemanticsMemory`. */
|
|
3625
3823
|
private readonly semanticsMemory;
|
|
3626
3824
|
private lastFocusedId;
|
|
@@ -3653,6 +3851,8 @@ declare class GessoRuntime {
|
|
|
3653
3851
|
private audioListener;
|
|
3654
3852
|
private caretTimer;
|
|
3655
3853
|
private scrollbarTimer;
|
|
3854
|
+
/** Pending frame the renderer asked for though nothing changes; see \`UiRenderer.nextRepaint\`. */
|
|
3855
|
+
private rendererTimer;
|
|
3656
3856
|
private inspectorTimer;
|
|
3657
3857
|
/** Pending wake-up for an animation that does not want every frame. */
|
|
3658
3858
|
private animationTimer;
|
|
@@ -3800,6 +4000,25 @@ declare class GessoRuntime {
|
|
|
3800
4000
|
* refresh either.
|
|
3801
4001
|
*/
|
|
3802
4002
|
answerInput(): void;
|
|
4003
|
+
/**
|
|
4004
|
+
* A step of the wheel, or of a trackpad's two fingers or its pinch,
|
|
4005
|
+
* held until the frame and added to the others that arrive before it.
|
|
4006
|
+
*
|
|
4007
|
+
* A trackpad sends a step on every refresh, and a handler that takes
|
|
4008
|
+
* longer than a refresh over one (a design tool's board zoomed over
|
|
4009
|
+
* hundreds of frames, each of whose names it scales) fell behind for
|
|
4010
|
+
* good: each step waited for the one before it, the frame waited for
|
|
4011
|
+
* them all, and a pinch drew nothing until the fingers stopped, then
|
|
4012
|
+
* jumped. Held, the steps that queue while the handler runs are one
|
|
4013
|
+
* step at the next frame, so the handler runs once a frame however
|
|
4014
|
+
* many arrive, and what it draws follows the fingers a frame at a
|
|
4015
|
+
* time. A step with other modifiers or in another unit is not added
|
|
4016
|
+
* to the held one but follows it, and any other input lets the held
|
|
4017
|
+
* step go first (`releaseWheel`), so nothing is answered out of order.
|
|
4018
|
+
*/
|
|
4019
|
+
wheel(...step: Parameters<UiWheelController['wheel']>): void;
|
|
4020
|
+
/** Hands the held wheel step to the input now, before what follows it; see `wheel`. */
|
|
4021
|
+
releaseWheel(): void;
|
|
3803
4022
|
/** Draws the pending frame in a task of its own, if the guards in `answerInput` allow. */
|
|
3804
4023
|
private drawEarly;
|
|
3805
4024
|
/**
|
|
@@ -3874,6 +4093,21 @@ declare class GessoRuntime {
|
|
|
3874
4093
|
* request produced it.
|
|
3875
4094
|
*/
|
|
3876
4095
|
private sendTree;
|
|
4096
|
+
/**
|
|
4097
|
+
* The theme a node sees, by id, or with none named the theme the
|
|
4098
|
+
* application's outermost content sees: from the application's root,
|
|
4099
|
+
* down through every node with exactly one child, which passes the
|
|
4100
|
+
* wrappers an application usually puts its theme on. Undefined before
|
|
4101
|
+
* the root is built, or for an id the tree does not hold.
|
|
4102
|
+
*/
|
|
4103
|
+
themeAt(id?: string): UiTheme | undefined;
|
|
4104
|
+
/**
|
|
4105
|
+
* `InspectionService.preview`: a write over the node's own value, as
|
|
4106
|
+
* a modifier's is, from a source of its own placed after every
|
|
4107
|
+
* modifier, so it wins and ending it restores what was under it.
|
|
4108
|
+
*/
|
|
4109
|
+
private previewProperty;
|
|
4110
|
+
private endPreviews;
|
|
3877
4111
|
/** `inspectNode` for a node named by id, or null when the tree has no such node. */
|
|
3878
4112
|
inspectNodeById(id: string): UiNodeReport | null;
|
|
3879
4113
|
/**
|
|
@@ -4000,6 +4234,14 @@ declare class GessoRuntime {
|
|
|
4000
4234
|
setColorScheme(scheme: ColorScheme): void;
|
|
4001
4235
|
/** Whether the window is the one in use, passed straight to `ShellService`; see `ShellService.windowActive`. */
|
|
4002
4236
|
setWindowActive(active: boolean): void;
|
|
4237
|
+
/**
|
|
4238
|
+
* What the person points with, as the shell reports it: kept on
|
|
4239
|
+
* `ShellService.pointer`, and provided at the root, so every theme in
|
|
4240
|
+
* the tree is turned for a finger on a touch device (`withPointer`)
|
|
4241
|
+
* without the application doing anything. A subtree that says
|
|
4242
|
+
* `pointer` itself keeps what it says.
|
|
4243
|
+
*/
|
|
4244
|
+
setPointer(pointer: UiPointer): void;
|
|
4003
4245
|
/** The contrast the platform asks for, passed straight to `ShellService`; see `ShellService.contrast`. */
|
|
4004
4246
|
setContrast(contrast: UiContrast): void;
|
|
4005
4247
|
/**
|
|
@@ -4104,6 +4346,9 @@ declare class GessoRuntime {
|
|
|
4104
4346
|
*/
|
|
4105
4347
|
private pathOf;
|
|
4106
4348
|
/** The components that rendered a node, nearest first. */
|
|
4349
|
+
private sourceReport;
|
|
4350
|
+
/** The props the node's `interactive` modifiers write while hovered and pressed, later ones over earlier. */
|
|
4351
|
+
private interactionOf;
|
|
4107
4352
|
private ownersOf;
|
|
4108
4353
|
private propsOf;
|
|
4109
4354
|
/**
|
|
@@ -4288,6 +4533,13 @@ declare class GessoRuntime {
|
|
|
4288
4533
|
*/
|
|
4289
4534
|
applyFileDrop(message: UiFileDropMessage): void;
|
|
4290
4535
|
applySemanticsAction(action: UiSemanticsAction): void;
|
|
4536
|
+
/**
|
|
4537
|
+
* A semantics action on a node: the mirror's, or `InspectionService.act`'s
|
|
4538
|
+
* on a node with no record of its own. False when it did not take: focus
|
|
4539
|
+
* refused (an open dialog's trap holds it elsewhere), or a field that
|
|
4540
|
+
* takes no text.
|
|
4541
|
+
*/
|
|
4542
|
+
private actOn;
|
|
4291
4543
|
/**
|
|
4292
4544
|
* An action on an inline link, which is a run and not a node.
|
|
4293
4545
|
*
|
|
@@ -4396,6 +4648,29 @@ declare class GessoRuntime {
|
|
|
4396
4648
|
* missing, rather than by scanning every key for the prefix.
|
|
4397
4649
|
*/
|
|
4398
4650
|
private semanticIdsUnder;
|
|
4651
|
+
/**
|
|
4652
|
+
* The boxes for a frame that moved something but changed no meaning:
|
|
4653
|
+
* all of them when it is the first move after a rest, and otherwise
|
|
4654
|
+
* only the focused node's, with the sweep owed for when the moving
|
|
4655
|
+
* stops (`SEMANTICS_SETTLE_MS`), or for when the boxes have been stale
|
|
4656
|
+
* too long (`SEMANTICS_MOST_STALE_MS`).
|
|
4657
|
+
*
|
|
4658
|
+
* A pan or a zoom moves every box under the camera on every frame. In
|
|
4659
|
+
* Atelier, a board of three dozen screens panned at 15%, the sweep was
|
|
4660
|
+
* 3 to 4 ms of a 4 to 6 ms frame, with frames to 13 ms, past a 120 Hz
|
|
4661
|
+
* display's 8.3; and the main thread wrote four styles on each of 545
|
|
4662
|
+
* elements per frame, which in Chromium was 45% of that thread while
|
|
4663
|
+
* it also had the wheel events to deliver. Nobody reads the rectangle
|
|
4664
|
+
* of an element that is moving under a pan: a screen reader's cursor
|
|
4665
|
+
* is on what it rests on. The focused node is the exception, since its
|
|
4666
|
+
* focus ring is drawn from its element, so it moves every frame.
|
|
4667
|
+
*/
|
|
4668
|
+
private movedSemanticsBoxes;
|
|
4669
|
+
/** Sweeps the boxes once the moving has stopped, and sends what changed. */
|
|
4670
|
+
private scheduleSemanticsSweep;
|
|
4671
|
+
private sweepSemanticsBoxes;
|
|
4672
|
+
/** The focused node's box when it differs from the one last sent, as `collectSemanticsBoxes` would give it. */
|
|
4673
|
+
private focusedSemanticsBox;
|
|
4399
4674
|
/**
|
|
4400
4675
|
* The mirrored nodes whose box differs from the one last sent, and
|
|
4401
4676
|
* which are on screen.
|
|
@@ -4592,6 +4867,13 @@ declare class GessoRuntime {
|
|
|
4592
4867
|
* property change asks for. The engine says when the next change is
|
|
4593
4868
|
* due; one pending timer marks a repaint for it.
|
|
4594
4869
|
*/
|
|
4870
|
+
/**
|
|
4871
|
+
* The renderer wants a frame though nothing changes: Canvas2D's kept
|
|
4872
|
+
* subtrees are drawn sharp once a zoom settles. One pending timer
|
|
4873
|
+
* marks the root for paint then, which leaves every kept thing as it
|
|
4874
|
+
* is; a frame before it that is still not settled asks again.
|
|
4875
|
+
*/
|
|
4876
|
+
private scheduleRendererRepaint;
|
|
4595
4877
|
private scheduleScrollbarFade;
|
|
4596
4878
|
/**
|
|
4597
4879
|
* The caret blinks, which needs frames no property change asks for.
|
|
@@ -4608,7 +4890,7 @@ declare class GessoRuntime {
|
|
|
4608
4890
|
* for; one pending timer marks a repaint for the next step due.
|
|
4609
4891
|
*/
|
|
4610
4892
|
private scheduleInspectorRepaint;
|
|
4611
|
-
/** Hands the listener the hovered node's cursor, when it changed. */
|
|
4893
|
+
/** Hands the listener the hovered node's cursor, when it changed: the arrow over a scrollbar, as a native one shows. */
|
|
4612
4894
|
private sendCursor;
|
|
4613
4895
|
/**
|
|
4614
4896
|
* Hands the listener the pointer's scroll chain, when it changed.
|
|
@@ -4949,6 +5231,9 @@ type ShellToRuntimeMessage = {
|
|
|
4949
5231
|
} | {
|
|
4950
5232
|
type: 'contrast';
|
|
4951
5233
|
contrast: UiContrast;
|
|
5234
|
+
} | {
|
|
5235
|
+
type: 'pointer';
|
|
5236
|
+
pointer: UiPointer;
|
|
4952
5237
|
} |
|
|
4953
5238
|
/** Whether the window is shown and holds the focus; once at start-up and on every change. See `ShellService.windowActive`. */
|
|
4954
5239
|
{
|
|
@@ -6421,6 +6706,8 @@ declare class GessoAppBuilder {
|
|
|
6421
6706
|
private root;
|
|
6422
6707
|
private readonly channelRegistrations;
|
|
6423
6708
|
private readonly serviceRegistrations;
|
|
6709
|
+
/** The application's own agent tools (`useAgentTools`). */
|
|
6710
|
+
private readonly agentTools;
|
|
6424
6711
|
private frameListener;
|
|
6425
6712
|
private inspectListener;
|
|
6426
6713
|
private devtoolsListener;
|
|
@@ -6462,6 +6749,8 @@ declare class GessoAppBuilder {
|
|
|
6462
6749
|
* service.
|
|
6463
6750
|
*/
|
|
6464
6751
|
useService(ServiceClass: new () => object): this;
|
|
6752
|
+
/** Offers an agent tools of the application's own; see `renderRoot(...).useAgentTools`. */
|
|
6753
|
+
useAgentTools(tools: readonly AgentToolDefinition[]): this;
|
|
6465
6754
|
/**
|
|
6466
6755
|
* Declares the app's routes, which is all it takes to make a
|
|
6467
6756
|
* `RouterOutlet` in the tree resolve them. Mirrors
|
|
@@ -6731,6 +7020,8 @@ declare class GessoApp {
|
|
|
6731
7020
|
/** The appearance this shell reports; watched or overridden. */
|
|
6732
7021
|
private colorSchemePreference;
|
|
6733
7022
|
constructor(options: GessoAppOptions);
|
|
7023
|
+
/** Runs a pending frame now: see `FrameService.flush`. */
|
|
7024
|
+
private flushFrame;
|
|
6734
7025
|
/**
|
|
6735
7026
|
* The running app, as the agent's screen tools need it: its semantics
|
|
6736
7027
|
* tree and focus, the mirror's actions, keys, and a way to run a
|
|
@@ -7620,10 +7911,151 @@ declare function persisted<T>(adapter: StorageAdapter, key: string, options: Per
|
|
|
7620
7911
|
*/
|
|
7621
7912
|
declare class FrameService {
|
|
7622
7913
|
private readonly subject;
|
|
7914
|
+
private flusher;
|
|
7623
7915
|
/** Emits after each frame finishes, with what it cost and what it answered. */
|
|
7624
7916
|
readonly frames: Observable<FrameMetrics>;
|
|
7625
7917
|
/** Called by the runtime; not for components. */
|
|
7626
7918
|
publish(metrics: FrameMetrics): void;
|
|
7919
|
+
/** Called by the shell that drives the frames; not for components. */
|
|
7920
|
+
setFlush(flush: (() => void) | null): void;
|
|
7921
|
+
/**
|
|
7922
|
+
* Draws a pending frame now, rather than when the display next asks
|
|
7923
|
+
* for one; nothing when none is pending.
|
|
7924
|
+
*
|
|
7925
|
+
* A tab in the background is sent no frames. A design editor's tool,
|
|
7926
|
+
* called by an agent while the editor's window is behind another,
|
|
7927
|
+
* changes the screen and waits for it to be drawn before reading it:
|
|
7928
|
+
* without this, it waits for a frame that never comes. The agent's
|
|
7929
|
+
* own screen tools (`uiSurface`) do the same after each action.
|
|
7930
|
+
*/
|
|
7931
|
+
flush(): void;
|
|
7932
|
+
}
|
|
7933
|
+
//#endregion
|
|
7934
|
+
//#region src/app/InspectionService.d.ts
|
|
7935
|
+
/**
|
|
7936
|
+
* What is on the screen, as a component can ask: the nodes under a
|
|
7937
|
+
* point, and what each one is.
|
|
7938
|
+
*
|
|
7939
|
+
* The inspector already answers both, for the devtools panel, from the
|
|
7940
|
+
* runtime's hit tester and its node report. A tool built in Gesso that
|
|
7941
|
+
* points at Gesso needs the same answers from inside the tree: a design
|
|
7942
|
+
* editor whose canvas holds live frames, where a click picks the box
|
|
7943
|
+
* under it instead of pressing it and says which line wrote it. So the
|
|
7944
|
+
* runtime puts them here, as it puts frames in `FrameService`.
|
|
7945
|
+
* Injected like any service: `ctx.inject(InspectionService)`.
|
|
7946
|
+
*/
|
|
7947
|
+
declare class InspectionService {
|
|
7948
|
+
private host;
|
|
7949
|
+
/** Called by the runtime; not for components. */
|
|
7950
|
+
attach(host: InspectionHost): void;
|
|
7951
|
+
/**
|
|
7952
|
+
* Every node under a point, topmost first, in the coordinates a
|
|
7953
|
+
* pointer event carries: the one a press would reach, then each one
|
|
7954
|
+
* it is painted over. Empty before the first frame.
|
|
7955
|
+
*/
|
|
7956
|
+
nodesAt(x: number, y: number): readonly UiNode[];
|
|
7957
|
+
/**
|
|
7958
|
+
* What the node is, as the inspector reports it: its box, its props,
|
|
7959
|
+
* the components that rendered it and, compiled for development, the
|
|
7960
|
+
* line that wrote it (`source`) and where each of those components
|
|
7961
|
+
* was used (`owners[].usedAt`).
|
|
7962
|
+
*/
|
|
7963
|
+
inspect(node: UiNode): UiNodeReport;
|
|
7964
|
+
/**
|
|
7965
|
+
* Where the node is drawn, as `inspect(node).box` reports it, without
|
|
7966
|
+
* the rest of the report: for an editor that reads the boxes of many
|
|
7967
|
+
* nodes as its view moves (a minimap of a board of frames), where
|
|
7968
|
+
* building each node's props, owners and source was most of the cost.
|
|
7969
|
+
*/
|
|
7970
|
+
box(node: UiNode): {
|
|
7971
|
+
readonly x: number;
|
|
7972
|
+
readonly y: number;
|
|
7973
|
+
readonly width: number;
|
|
7974
|
+
readonly height: number;
|
|
7975
|
+
};
|
|
7976
|
+
/**
|
|
7977
|
+
* Where the node is seen on the screen: `box` with every transform
|
|
7978
|
+
* above it applied, so a node in a frame drawn at half its size is
|
|
7979
|
+
* half its size, where it is drawn. What an overlay laid over the
|
|
7980
|
+
* live tree is placed by (an outline on the component under the
|
|
7981
|
+
* pointer). `box` keeps the untransformed box, which is where the
|
|
7982
|
+
* node is in the layout: what an editor reading a zoomed board in
|
|
7983
|
+
* the board's own coordinates (a minimap) needs.
|
|
7984
|
+
*/
|
|
7985
|
+
screenBox(node: UiNode): {
|
|
7986
|
+
readonly x: number;
|
|
7987
|
+
readonly y: number;
|
|
7988
|
+
readonly width: number;
|
|
7989
|
+
readonly height: number;
|
|
7990
|
+
};
|
|
7991
|
+
/**
|
|
7992
|
+
* Draws a node as though it declared `value` for `property`, until
|
|
7993
|
+
* the preview is ended or the node leaves the tree.
|
|
7994
|
+
*
|
|
7995
|
+
* What a design editor shows while a value is being chosen: a padding
|
|
7996
|
+
* dragged or a colour hovered in a list is drawn at once, on the
|
|
7997
|
+
* live tree, and only written to the source when the designer lets go.
|
|
7998
|
+
* It wins over the element's own value and over its modifiers, and
|
|
7999
|
+
* ending it restores whichever of those was there, inheritance
|
|
8000
|
+
* included. The name and value are a prop's, as JSX would write them.
|
|
8001
|
+
*/
|
|
8002
|
+
preview(node: UiNode, property: string, value: unknown): void;
|
|
8003
|
+
/** Ends a preview of one property, or of every property previewed on the node. */
|
|
8004
|
+
endPreview(node: UiNode, property?: string): void;
|
|
8005
|
+
/**
|
|
8006
|
+
* Draws a component as though its parent passed `inputs`, over what
|
|
8007
|
+
* the parent did pass, until the preview is ended or the component
|
|
8008
|
+
* leaves the tree. The component is named by its anchor, as
|
|
8009
|
+
* `inspect(node).owners[].anchorId` gives it.
|
|
8010
|
+
*
|
|
8011
|
+
* What a design editor shows when a component on a played screen is
|
|
8012
|
+
* jumped to one of its states (Filled, Error, Disabled): the same
|
|
8013
|
+
* instance, still live, given that state's inputs, and the inputs it
|
|
8014
|
+
* was written with back when the preview ends. A later preview of the
|
|
8015
|
+
* same component replaces this one. The names and values are props',
|
|
8016
|
+
* as JSX would write them. An anchor no component holds is ignored.
|
|
8017
|
+
*/
|
|
8018
|
+
previewInputs(anchorId: string, inputs: Readonly<Record<string, unknown>>): void;
|
|
8019
|
+
/** Ends a preview of a component's inputs: its parent's are its own again. */
|
|
8020
|
+
endInputPreview(anchorId: string): void;
|
|
8021
|
+
/**
|
|
8022
|
+
* Presses a node, or replaces the text of the field it is, as a
|
|
8023
|
+
* person would: a click at the middle of where it is drawn, which
|
|
8024
|
+
* its handlers and every handler above it get, or the edit a
|
|
8025
|
+
* keyboard makes once it has focus. The path the accessibility
|
|
8026
|
+
* mirror's actions take, for any node in the tree, record or not.
|
|
8027
|
+
*
|
|
8028
|
+
* What a design editor's agent does to play a prototype in its live
|
|
8029
|
+
* frames: a row pressed, an email typed, by a node it found with
|
|
8030
|
+
* `nodesAt` or by walking the tree. False when it did not take: a
|
|
8031
|
+
* node no longer in the tree, or a field that could not have focus
|
|
8032
|
+
* because an open dialog's trap holds it, or takes no text.
|
|
8033
|
+
*/
|
|
8034
|
+
act(node: UiNode, action: 'click' | 'setValue', value?: string): boolean;
|
|
8035
|
+
}
|
|
8036
|
+
/** What the runtime gives the service. */
|
|
8037
|
+
interface InspectionHost {
|
|
8038
|
+
nodesAt(x: number, y: number): readonly UiNode[];
|
|
8039
|
+
inspect(node: UiNode): UiNodeReport;
|
|
8040
|
+
/** The node's box alone, as `inspect` reports it. */
|
|
8041
|
+
box?(node: UiNode): {
|
|
8042
|
+
readonly x: number;
|
|
8043
|
+
readonly y: number;
|
|
8044
|
+
readonly width: number;
|
|
8045
|
+
readonly height: number;
|
|
8046
|
+
};
|
|
8047
|
+
/** The node's box with the transforms above it applied. */
|
|
8048
|
+
screenBox?(node: UiNode): {
|
|
8049
|
+
readonly x: number;
|
|
8050
|
+
readonly y: number;
|
|
8051
|
+
readonly width: number;
|
|
8052
|
+
readonly height: number;
|
|
8053
|
+
};
|
|
8054
|
+
preview?(node: UiNode, property: string, value: unknown): void;
|
|
8055
|
+
endPreview?(node: UiNode, property?: string): void;
|
|
8056
|
+
/** Null ends the preview. */
|
|
8057
|
+
previewInputs?(anchorId: string, inputs: Readonly<Record<string, unknown>> | null): void;
|
|
8058
|
+
act?(node: UiNode, action: 'click' | 'setValue', value?: string): boolean;
|
|
7627
8059
|
}
|
|
7628
8060
|
//#endregion
|
|
7629
8061
|
//#region src/app/videoClock.d.ts
|
|
@@ -8203,25 +8635,6 @@ declare class ScrollService {
|
|
|
8203
8635
|
}
|
|
8204
8636
|
//#endregion
|
|
8205
8637
|
//#region src/app/FocusService.d.ts
|
|
8206
|
-
/**
|
|
8207
|
-
* Keyboard focus, as a store components can inject.
|
|
8208
|
-
*
|
|
8209
|
-
* `UiFocusManager` lives in the runtime and a component cannot reach
|
|
8210
|
-
* it — components reach the world through stores, as they do for the
|
|
8211
|
-
* clipboard (`ShellService`), overlays (`OverlayService`) and find
|
|
8212
|
-
* (`FindService`). Without this a component cannot autofocus a field,
|
|
8213
|
-
* trap the keyboard in a dialog, or put the caret in the input that
|
|
8214
|
-
* failed validation.
|
|
8215
|
-
*
|
|
8216
|
-
* Nodes come from a `ref` prop. A tree's refs fire before the runtime
|
|
8217
|
-
* installs the manager, so an action taken during the first build is
|
|
8218
|
-
* queued and replayed once there is one; that is the same problem
|
|
8219
|
-
* `FindService` solves for its query field, and the reason `autoFocus`
|
|
8220
|
-
* in a dialog works on the frame it mounts.
|
|
8221
|
-
*
|
|
8222
|
-
* It must stay on the render thread: its actions take `UiNode`s, which
|
|
8223
|
-
* never cross a worker boundary.
|
|
8224
|
-
*/
|
|
8225
8638
|
declare class FocusService {
|
|
8226
8639
|
/** The node holding focus, or null. A control binds its focus ring to this. */
|
|
8227
8640
|
readonly focused: InternalState<UiNode | null>;
|
|
@@ -8255,6 +8668,12 @@ declare class FocusService {
|
|
|
8255
8668
|
focusNext(): void;
|
|
8256
8669
|
/** Moves focus to the previous focusable node, wrapping around. */
|
|
8257
8670
|
focusPrevious(): void;
|
|
8671
|
+
/**
|
|
8672
|
+
* The tab stops under `within` (the whole tree when not given), in
|
|
8673
|
+
* the order Tab visits them: what a design tool numbers to show a
|
|
8674
|
+
* screen's keyboard order. Empty before the runtime has a manager.
|
|
8675
|
+
*/
|
|
8676
|
+
tabStops(within?: UiNode): UiNode[];
|
|
8258
8677
|
/**
|
|
8259
8678
|
* Confines focus to `scope` until `releaseTrap`, moving it inside if
|
|
8260
8679
|
* it was elsewhere. Traps nest: a dialog opened over a dialog traps
|
|
@@ -8701,6 +9120,13 @@ interface WorkerGlobal {
|
|
|
8701
9120
|
* useChannel() calls always land before the shell's init message is
|
|
8702
9121
|
* processed.
|
|
8703
9122
|
*/
|
|
9123
|
+
/** An error the render worker reported, as an application's `onError` hears it. */
|
|
9124
|
+
interface RenderWorkerError {
|
|
9125
|
+
readonly message: string;
|
|
9126
|
+
readonly stack?: string;
|
|
9127
|
+
/** Where it came from: a frame, a listener, the renderer, a channel, a message, or nothing that caught it. */
|
|
9128
|
+
readonly source: RuntimeErrorSource;
|
|
9129
|
+
}
|
|
8704
9130
|
declare function renderRoot(root: FrameworkChild | ComponentType): RenderWorkerApp;
|
|
8705
9131
|
declare class RenderWorkerApp {
|
|
8706
9132
|
private readonly channelRegistrations;
|
|
@@ -8711,6 +9137,14 @@ declare class RenderWorkerApp {
|
|
|
8711
9137
|
private root;
|
|
8712
9138
|
private readonly host;
|
|
8713
9139
|
private runtime;
|
|
9140
|
+
/** See `renderThemesWith`. */
|
|
9141
|
+
private renderThemes;
|
|
9142
|
+
/** See `loadModulesWith`. */
|
|
9143
|
+
private loadModule;
|
|
9144
|
+
/** The application's own agent tools (`useAgentTools`). */
|
|
9145
|
+
private readonly agentTools;
|
|
9146
|
+
/** What the application asked to hear of the errors this worker reports (`onError`). */
|
|
9147
|
+
private readonly errorListeners;
|
|
8714
9148
|
/** Held so forwarded display refreshes can be handed to it. */
|
|
8715
9149
|
private clock;
|
|
8716
9150
|
private channels;
|
|
@@ -8728,6 +9162,11 @@ declare class RenderWorkerApp {
|
|
|
8728
9162
|
* would be a bare sentence with nothing to look up.
|
|
8729
9163
|
*/
|
|
8730
9164
|
private reportUncaught;
|
|
9165
|
+
/**
|
|
9166
|
+
* Tells the shell about an error, which shows it (the development
|
|
9167
|
+
* overlay), and every listener the application gave `onError`.
|
|
9168
|
+
*/
|
|
9169
|
+
private reportError;
|
|
8731
9170
|
/**
|
|
8732
9171
|
* Replaces the application's root and rebuilds its tree, for hot
|
|
8733
9172
|
* module replacement.
|
|
@@ -8752,6 +9191,24 @@ declare class RenderWorkerApp {
|
|
|
8752
9191
|
* message it simply changes which root will be built.
|
|
8753
9192
|
*/
|
|
8754
9193
|
reload(root: FrameworkChild | ComponentType, services?: readonly (new () => object)[]): void;
|
|
9194
|
+
/**
|
|
9195
|
+
* How `render_frame` loads a module an agent names, given its path from
|
|
9196
|
+
* the project root with a leading slash (`/mocks/Settings.tsx`). By
|
|
9197
|
+
* default it is imported from where the application is served, which
|
|
9198
|
+
* suits an application drawing its own modules. One whose modules are
|
|
9199
|
+
* served from somewhere else says where: a design editor serving the
|
|
9200
|
+
* project it designs from another folder.
|
|
9201
|
+
*
|
|
9202
|
+
* renderRoot(Editor).loadModulesWith(path => import(`/@fs${projectRoot}${path}`))
|
|
9203
|
+
*/
|
|
9204
|
+
loadModulesWith(load: (path: string) => Promise<Record<string, unknown>>): this;
|
|
9205
|
+
/**
|
|
9206
|
+
* The themes an application designs in, asked on each call, when they
|
|
9207
|
+
* are not the one it is drawn in: a design editor's project's. They
|
|
9208
|
+
* are what `render_frame` draws in and `tokens_view` reports unless an
|
|
9209
|
+
* agent asks for the application's own; see `designedTheme`.
|
|
9210
|
+
*/
|
|
9211
|
+
renderThemesWith(themes: () => DesignThemes): this;
|
|
8755
9212
|
/**
|
|
8756
9213
|
* Registers a channel.
|
|
8757
9214
|
*
|
|
@@ -8777,6 +9234,23 @@ declare class RenderWorkerApp {
|
|
|
8777
9234
|
* service.
|
|
8778
9235
|
*/
|
|
8779
9236
|
useService(ServiceClass: new () => object): this;
|
|
9237
|
+
/**
|
|
9238
|
+
* Offers an agent tools of the application's own, beside its
|
|
9239
|
+
* channels' and its screen's: ones that answer with something other
|
|
9240
|
+
* than a view, such as a measurement or a composed picture. See
|
|
9241
|
+
* `AgentToolDefinition`. Called again, it adds to them.
|
|
9242
|
+
*
|
|
9243
|
+
* renderRoot(Editor).useAgentTools(editorTools);
|
|
9244
|
+
*/
|
|
9245
|
+
useAgentTools(tools: readonly AgentToolDefinition[]): this;
|
|
9246
|
+
/**
|
|
9247
|
+
* Hears every error this worker reports to the shell: a frame that
|
|
9248
|
+
* threw, a listener, the renderer, a channel, anything uncaught. For
|
|
9249
|
+
* an application that shows errors itself, where they happen: a design
|
|
9250
|
+
* editor listing what is wrong with a mock rather than an overlay over
|
|
9251
|
+
* the editor, with the plugin's `overlay: false`.
|
|
9252
|
+
*/
|
|
9253
|
+
onError(listener: (error: RenderWorkerError) => void): this;
|
|
8780
9254
|
/**
|
|
8781
9255
|
* Declares the app's routes, which is all it takes to make a
|
|
8782
9256
|
* `RouterOutlet` in the tree resolve them.
|
|
@@ -8862,5 +9336,5 @@ declare class RenderWorkerApp {
|
|
|
8862
9336
|
private initialize;
|
|
8863
9337
|
}
|
|
8864
9338
|
//#endregion
|
|
8865
|
-
export {
|
|
8866
|
-
//# sourceMappingURL=index-
|
|
9339
|
+
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-DocVauCS.d.ts.map
|