@deviltea/widget-core 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/{dep-DKQpJwdW.d.mts → dep-CzOpc4xk.d.mts} +80 -14
- package/dist/event-BMif_vRJ.mjs +192 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +90 -355
- package/dist/inspection/index.d.mts +47 -2
- package/dist/inspection/index.mjs +93 -10
- package/dist/integration/index.d.mts +12 -0
- package/dist/integration/index.mjs +26 -0
- package/dist/internals-B67fyYoz.mjs +195 -0
- package/package.json +12 -6
- package/dist/internals-DXFEmv8H.mjs +0 -27
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ A renderer/integration layer consumes the Runtime; the core itself knows
|
|
|
52
52
|
nothing about rendering, persistence versioning, or metadata. Source editing
|
|
53
53
|
is limited to the revisioned `WidgetDocument` and JSON-domain `SourcePatch`
|
|
54
54
|
contract described below. See
|
|
55
|
-
[Design constraints](https://deviltea.github.io/
|
|
55
|
+
[Design constraints](https://deviltea.github.io/widget/packages/widget-core#design-constraints)
|
|
56
56
|
in the full guide for the exact boundary.
|
|
57
57
|
|
|
58
58
|
Capability presence (`config`/`slots`/`state`/`properties`/`methods`) is
|
|
@@ -60,7 +60,7 @@ declaration presence, independent of whether a capability's own domain is
|
|
|
60
60
|
empty — a completed plugin exposes these facts at runtime as
|
|
61
61
|
`plugin.capabilities: { config, slots, state, properties, methods }`
|
|
62
62
|
(all `boolean`, immutable). See
|
|
63
|
-
[Reading capability presence at runtime](https://deviltea.github.io/
|
|
63
|
+
[Reading capability presence at runtime](https://deviltea.github.io/widget/packages/widget-core#reading-capability-presence-at-runtime-plugin-capabilities)
|
|
64
64
|
in the full guide.
|
|
65
65
|
|
|
66
66
|
Plugin, config, and slot descriptions are required intrinsic metadata. The
|
|
@@ -303,17 +303,17 @@ import { inspectBlueprint, inspectRuntime } from '@deviltea/widget-core/inspecti
|
|
|
303
303
|
```
|
|
304
304
|
|
|
305
305
|
`@deviltea/widget-core`'s root entrypoint does not export this surface. See
|
|
306
|
-
[Inspection](https://deviltea.github.io/
|
|
306
|
+
[Inspection](https://deviltea.github.io/widget/packages/widget-core#inspection-devtools)
|
|
307
307
|
in the full guide for the exact contract.
|
|
308
308
|
|
|
309
309
|
The full guide at
|
|
310
|
-
[docs/site/packages/widget-core.md](https://deviltea.github.io/
|
|
310
|
+
[docs/site/packages/widget-core.md](https://deviltea.github.io/widget/packages/widget-core)
|
|
311
311
|
covers the dependency grammar, the compile pipeline, and every Runtime
|
|
312
312
|
primitive in detail.
|
|
313
313
|
|
|
314
314
|
## License
|
|
315
315
|
|
|
316
|
-
[MIT](https://github.com/DevilTea/
|
|
316
|
+
[MIT](https://github.com/DevilTea/widget/blob/main/LICENSE) License © 2023-PRESENT [DevilTea](https://github.com/DevilTea)
|
|
317
317
|
|
|
318
318
|
<!-- Badges -->
|
|
319
319
|
|
|
@@ -324,4 +324,4 @@ primitive in detail.
|
|
|
324
324
|
[bundle-src]: https://img.shields.io/bundlephobia/minzip/@deviltea/widget-core?style=flat&colorA=080f12&colorB=1fa669&label=minzip
|
|
325
325
|
[bundle-href]: https://bundlephobia.com/result?p=@deviltea/widget-core
|
|
326
326
|
[license-src]: https://img.shields.io/github/license/DevilTea/deviltea-labs.svg?style=flat&colorA=080f12&colorB=1fa669
|
|
327
|
-
[license-href]: https://github.com/DevilTea/
|
|
327
|
+
[license-href]: https://github.com/DevilTea/widget/blob/main/LICENSE
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONSchema } from "json-schema-typed/draft-2020-12";
|
|
1
2
|
//#region src/json.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* The authored value domain. Runtime/config-resolved values intentionally use `unknown` instead;
|
|
@@ -41,6 +42,7 @@ interface WidgetInterfaces {
|
|
|
41
42
|
state?: Record<any, any>;
|
|
42
43
|
properties?: Record<any, any>;
|
|
43
44
|
methods?: Record<any, (...args: any[]) => any>;
|
|
45
|
+
events?: Record<any, readonly any[]>;
|
|
44
46
|
}
|
|
45
47
|
/**
|
|
46
48
|
* A readonly array that is non-empty when present. Used by every optional `related` collection.
|
|
@@ -82,6 +84,7 @@ type WidgetSlotNameOf<Interfaces extends WidgetInterfaces> = Extract<WidgetCapab
|
|
|
82
84
|
type WidgetStateOf<Interfaces extends WidgetInterfaces> = WidgetCapabilityOf<Interfaces, 'state'>;
|
|
83
85
|
type WidgetPropertiesOf<Interfaces extends WidgetInterfaces> = WidgetCapabilityOf<Interfaces, 'properties'>;
|
|
84
86
|
type WidgetMethodsOf<Interfaces extends WidgetInterfaces> = WidgetCapabilityOf<Interfaces, 'methods'> extends (infer Methods extends Record<WidgetMemberKey, (...args: any[]) => any>) ? Methods : never;
|
|
87
|
+
type WidgetEventsOf<Interfaces extends WidgetInterfaces> = WidgetCapabilityOf<Interfaces, 'events'> extends (infer Events extends Record<WidgetMemberKey, readonly any[]>) ? Events : never;
|
|
85
88
|
/**
|
|
86
89
|
* Declared member keys of one section, or `never` when the capability is absent.
|
|
87
90
|
*/
|
|
@@ -89,15 +92,18 @@ type WidgetMemberKeysOf<Members> = [Members] extends [never] ? never : Extract<k
|
|
|
89
92
|
type WidgetStateKeyOf<Interfaces extends WidgetInterfaces> = WidgetMemberKeysOf<WidgetStateOf<Interfaces>>;
|
|
90
93
|
type WidgetPropertyKeyOf<Interfaces extends WidgetInterfaces> = WidgetMemberKeysOf<WidgetPropertiesOf<Interfaces>>;
|
|
91
94
|
type WidgetMethodKeyOf<Interfaces extends WidgetInterfaces> = WidgetMemberKeysOf<WidgetMethodsOf<Interfaces>>;
|
|
95
|
+
type WidgetEventKeyOf<Interfaces extends WidgetInterfaces> = WidgetMemberKeysOf<WidgetEventsOf<Interfaces>>;
|
|
92
96
|
type WidgetStateValueOf<Interfaces extends WidgetInterfaces, Key extends WidgetMemberKey> = WidgetMemberValueOf<WidgetStateOf<Interfaces>, Key>;
|
|
93
97
|
type WidgetPropertyValueOf<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey> = WidgetMemberValueOf<WidgetPropertiesOf<Interfaces>, Name>;
|
|
94
98
|
type WidgetMethodOf<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey> = Extract<WidgetMemberValueOf<WidgetMethodsOf<Interfaces>, Name>, (...args: any[]) => any>;
|
|
95
99
|
type WidgetMethodArgsOf<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey> = Parameters<WidgetMethodOf<Interfaces, Name>>;
|
|
96
100
|
type WidgetMethodReturnOf<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey> = ReturnType<WidgetMethodOf<Interfaces, Name>>;
|
|
101
|
+
type WidgetEventArgsOf<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey> = Extract<WidgetMemberValueOf<WidgetEventsOf<Interfaces>, Name>, readonly any[]>;
|
|
97
102
|
type ContainsPromiseLike<Value> = IsAny<Value> extends true ? false : [Extract<Value, PromiseLike<unknown>>] extends [never] ? false : true;
|
|
98
103
|
type MemberKeyDomainViolation<Section extends string, Members> = [Members] extends [never] ? never : [keyof Members] extends [never] ? never : [keyof Members] extends [WidgetMemberKey] ? WidgetMemberKey extends keyof Members ? `'${Section}' must not be declared with a broad string index signature` : never : `'${Section}' member keys must be finite string literals`;
|
|
99
104
|
type SyncValueDomainViolation<Section extends string, Members> = [Members] extends [never] ? never : true extends { [Key in keyof Members]-?: ContainsPromiseLike<Members[Key]>; }[keyof Members] ? `'${Section}' values must not be PromiseLike; the core semantic boundary is synchronous` : never;
|
|
100
105
|
type SyncMethodReturnViolation<Interfaces extends WidgetInterfaces> = WidgetMethodsOf<Interfaces> extends (infer Methods) ? [Methods] extends [never] ? never : true extends { [Key in keyof Methods]-?: ContainsPromiseLike<ReturnType<Extract<Methods[Key], (...args: any[]) => any>>>; }[keyof Methods] ? `'methods' return types must not be PromiseLike; the core semantic boundary is synchronous` : never : never;
|
|
106
|
+
type EventArgsDomainViolation<Interfaces extends WidgetInterfaces> = WidgetEventsOf<Interfaces> extends (infer Events) ? [Events] extends [never] ? never : { [Key in keyof Events]-?: Events[Key] extends readonly any[] ? number extends Events[Key]['length'] ? '\'events\' arguments must be declared as tuples' : never : '\'events\' arguments must be declared as tuples'; }[keyof Events] : never;
|
|
101
107
|
type SlotDomainViolation<Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'slots'> extends false ? never : WidgetMemberKey extends WidgetCapabilityOf<Interfaces, 'slots'> ? `'slots' must be a finite union of string literals` : never;
|
|
102
108
|
type RawConfigDomainViolation<Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'config'> extends true ? JsonDomainViolation<WidgetRawConfigOf<Interfaces>> : never;
|
|
103
109
|
/**
|
|
@@ -106,7 +112,7 @@ type RawConfigDomainViolation<Interfaces extends WidgetInterfaces> = HasWidgetCa
|
|
|
106
112
|
* Rejection happens at the `.interfaces()` boundary so that a section can never start with an
|
|
107
113
|
* unfinishable `Remaining` such as `string`.
|
|
108
114
|
*/
|
|
109
|
-
type WidgetInterfacesViolationOf<Interfaces extends WidgetInterfaces> = MemberKeyDomainViolation<'state', WidgetStateOf<Interfaces>> | MemberKeyDomainViolation<'properties', WidgetPropertiesOf<Interfaces>> | MemberKeyDomainViolation<'methods', WidgetMethodsOf<Interfaces>> | SlotDomainViolation<Interfaces> | RawConfigDomainViolation<Interfaces> | SyncValueDomainViolation<'state', WidgetStateOf<Interfaces>> | SyncValueDomainViolation<'properties', WidgetPropertiesOf<Interfaces>> | SyncMethodReturnViolation<Interfaces>;
|
|
115
|
+
type WidgetInterfacesViolationOf<Interfaces extends WidgetInterfaces> = MemberKeyDomainViolation<'state', WidgetStateOf<Interfaces>> | MemberKeyDomainViolation<'properties', WidgetPropertiesOf<Interfaces>> | MemberKeyDomainViolation<'methods', WidgetMethodsOf<Interfaces>> | MemberKeyDomainViolation<'events', WidgetEventsOf<Interfaces>> | EventArgsDomainViolation<Interfaces> | SlotDomainViolation<Interfaces> | RawConfigDomainViolation<Interfaces> | SyncValueDomainViolation<'state', WidgetStateOf<Interfaces>> | SyncValueDomainViolation<'properties', WidgetPropertiesOf<Interfaces>> | SyncMethodReturnViolation<Interfaces>;
|
|
110
116
|
//#endregion
|
|
111
117
|
//#region src/execution-result.d.ts
|
|
112
118
|
interface ExecutionFailure<Diagnostic> {
|
|
@@ -134,8 +140,29 @@ declare const widgetPluginBrand: unique symbol;
|
|
|
134
140
|
*/
|
|
135
141
|
declare const widgetSectionKind: unique symbol;
|
|
136
142
|
declare const widgetSectionRemaining: unique symbol;
|
|
143
|
+
declare const widgetValueContractType: unique symbol;
|
|
144
|
+
/**
|
|
145
|
+
* Passive, runtime-readable semantic value-contract descriptor.
|
|
146
|
+
*
|
|
147
|
+
* The generic parameter exists only for Plugin-author type safety. Runtime/integration identity is the
|
|
148
|
+
* stable string `id`; descriptor object identity has no semantic meaning.
|
|
149
|
+
*/
|
|
150
|
+
interface WidgetValueContract<Value> {
|
|
151
|
+
readonly id: string;
|
|
152
|
+
/** Type-only invariant brand; the factory-created runtime descriptor contains only `id`. */
|
|
153
|
+
readonly [widgetValueContractType]: (value: Value) => Value;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Declares a stable semantic value-contract id while retaining the associated TypeScript value type for
|
|
157
|
+
* Plugin-author checking. Core does not interpret, register, validate, or schema-check contract ids.
|
|
158
|
+
*/
|
|
159
|
+
declare function createWidgetValueContract<Value>(id: string): WidgetValueContract<Value>;
|
|
160
|
+
type DeepReadonlySchema<T> = T extends readonly (infer Item)[] ? readonly DeepReadonlySchema<Item>[] : T extends object ? { readonly [Key in keyof T]: DeepReadonlySchema<T[Key]>; } : T;
|
|
161
|
+
type WidgetConfigJsonSchema = DeepReadonlySchema<JSONSchema>;
|
|
162
|
+
declare const WIDGET_CONFIG_JSON_SCHEMA_DIALECT: "https://json-schema.org/draft/2020-12/schema";
|
|
137
163
|
interface ErasedWidgetConfigDefinition {
|
|
138
164
|
readonly description: string;
|
|
165
|
+
readonly schema: WidgetConfigJsonSchema | null;
|
|
139
166
|
readonly validate: (input: unknown, ctx: any) => boolean;
|
|
140
167
|
readonly resolve: (rawConfig: any) => unknown;
|
|
141
168
|
}
|
|
@@ -144,10 +171,14 @@ interface ErasedWidgetSlotDefinition {
|
|
|
144
171
|
readonly validateStructure?: (ctx: any) => void;
|
|
145
172
|
}
|
|
146
173
|
interface ErasedWidgetStateMemberDefinition {
|
|
174
|
+
readonly authorWritable?: boolean;
|
|
147
175
|
readonly validate: (input: unknown, ctx: any) => boolean;
|
|
148
176
|
readonly default?: (ctx: any) => unknown;
|
|
149
177
|
}
|
|
150
178
|
interface ErasedWidgetPropertyDefinition {
|
|
179
|
+
readonly valueContract?: {
|
|
180
|
+
readonly id: string;
|
|
181
|
+
};
|
|
151
182
|
readonly registerDeps?: (ctx: any) => RegisteredDeps;
|
|
152
183
|
readonly compute: (ctx: any) => unknown;
|
|
153
184
|
}
|
|
@@ -156,6 +187,9 @@ interface ErasedWidgetMethodDefinition {
|
|
|
156
187
|
readonly validateArgs: (args: readonly unknown[], ctx: any) => boolean;
|
|
157
188
|
readonly execute: (ctx: any) => unknown;
|
|
158
189
|
}
|
|
190
|
+
interface ErasedWidgetEventDefinition {
|
|
191
|
+
readonly description: string;
|
|
192
|
+
}
|
|
159
193
|
/**
|
|
160
194
|
* Erased plugin definition record.
|
|
161
195
|
*
|
|
@@ -171,6 +205,7 @@ interface WidgetPluginDefinition {
|
|
|
171
205
|
readonly state: ReadonlyMap<WidgetMemberKey, ErasedWidgetStateMemberDefinition> | null;
|
|
172
206
|
readonly properties: ReadonlyMap<WidgetMemberKey, ErasedWidgetPropertyDefinition> | null;
|
|
173
207
|
readonly methods: ReadonlyMap<WidgetMemberKey, ErasedWidgetMethodDefinition> | null;
|
|
208
|
+
readonly events: ReadonlyMap<WidgetMemberKey, ErasedWidgetEventDefinition> | null;
|
|
174
209
|
}
|
|
175
210
|
interface WidgetPluginBrand<Interfaces extends WidgetInterfaces> {
|
|
176
211
|
readonly interfaces?: Interfaces;
|
|
@@ -192,16 +227,23 @@ interface WidgetPluginCapabilities {
|
|
|
192
227
|
readonly state: boolean;
|
|
193
228
|
readonly properties: boolean;
|
|
194
229
|
readonly methods: boolean;
|
|
230
|
+
readonly events: boolean;
|
|
195
231
|
}
|
|
196
232
|
/**
|
|
197
233
|
* A completed plugin. Plugin-specific integration options are captured by the plugin factory's
|
|
198
234
|
* closure; there is no `pluginConfig` / `globalConfig`.
|
|
199
235
|
*/
|
|
236
|
+
interface WidgetPluginConfigMetadata {
|
|
237
|
+
readonly description: string;
|
|
238
|
+
readonly schema: WidgetConfigJsonSchema | null;
|
|
239
|
+
}
|
|
200
240
|
interface WidgetPlugin<Type extends string = string, Interfaces extends WidgetInterfaces = WidgetInterfaces> {
|
|
201
241
|
readonly type: Type;
|
|
202
242
|
readonly description: string;
|
|
203
243
|
/** Compiler/plugin-builder-authoritative declaration-presence facts. Immutable, stable for the plugin's lifetime. */
|
|
204
244
|
readonly capabilities: WidgetPluginCapabilities;
|
|
245
|
+
/** Passive RawConfig authoring metadata. Null means no config capability. */
|
|
246
|
+
readonly config: WidgetPluginConfigMetadata | null;
|
|
205
247
|
readonly descriptions: {
|
|
206
248
|
readonly config: string | null;
|
|
207
249
|
readonly slots: ReadonlyMap<WidgetMemberKey, string> | null;
|
|
@@ -247,14 +289,20 @@ type WidgetPropertyComputeContext<Interfaces extends WidgetInterfaces, Deps exte
|
|
|
247
289
|
readonly blueprint: ValidBlueprintView;
|
|
248
290
|
readonly deps: ToExecutedDeps<Deps, 'property'>;
|
|
249
291
|
} & DiagnosticCollector<RelativeValueDiagnosticInput> & WidgetResolvedConfigContext<Interfaces>;
|
|
292
|
+
type WidgetEventEmitter<Interfaces extends WidgetInterfaces> = { readonly [Name in WidgetEventKeyOf<Interfaces>]: (...args: WidgetEventArgsOf<Interfaces, Name>) => void; };
|
|
293
|
+
type WidgetEventEmitterContext<Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'events'> extends true ? {
|
|
294
|
+
readonly emit: WidgetEventEmitter<Interfaces>;
|
|
295
|
+
} : unknown;
|
|
250
296
|
type WidgetMethodExecuteContext<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey, Deps extends RegisteredDeps> = {
|
|
251
297
|
readonly args: WidgetMethodArgsOf<Interfaces, Name>;
|
|
252
298
|
readonly widget: SelfBlueprintWidgetNode<Interfaces>;
|
|
253
299
|
readonly blueprint: ValidBlueprintView;
|
|
254
300
|
readonly deps: ToExecutedDeps<Deps, 'method'>;
|
|
255
|
-
} & DiagnosticCollector<RelativeValueDiagnosticInput> & WidgetResolvedConfigContext<Interfaces>;
|
|
301
|
+
} & DiagnosticCollector<RelativeValueDiagnosticInput> & WidgetResolvedConfigContext<Interfaces> & WidgetEventEmitterContext<Interfaces>;
|
|
256
302
|
interface WidgetConfigDefinition<Interfaces extends WidgetInterfaces> {
|
|
257
303
|
readonly description: string;
|
|
304
|
+
/** Passive Draft 2020-12 authoring metadata. Core does not validate or execute this schema. */
|
|
305
|
+
readonly schema?: WidgetConfigJsonSchema;
|
|
258
306
|
readonly validate: (input: unknown, ctx: WidgetConfigValidateContext) => input is WidgetRawConfigOf<Interfaces>;
|
|
259
307
|
readonly resolve: (rawConfig: WidgetRawConfigOf<Interfaces> | null) => WidgetResolvedConfigOf<Interfaces>;
|
|
260
308
|
}
|
|
@@ -270,10 +318,14 @@ type WidgetSlotDefinitions<Interfaces extends WidgetInterfaces> = { readonly [Na
|
|
|
270
318
|
type ExactWidgetSlotDefinitions<Interfaces extends WidgetInterfaces, Definitions> = WidgetSlotDefinitions<Interfaces> & { readonly [Name in keyof Definitions as Name extends WidgetSlotNameOf<Interfaces> ? never : Name]: never; };
|
|
271
319
|
type WidgetPluginValidateStructure<Interfaces extends WidgetInterfaces> = (ctx: WidgetPluginValidateStructureContext<Interfaces>) => void;
|
|
272
320
|
interface WidgetStateMemberDefinition<Interfaces extends WidgetInterfaces, Key extends WidgetMemberKey> {
|
|
321
|
+
/** Passive authoring policy. Omitted means this State member is not author-writable. */
|
|
322
|
+
readonly authorWritable?: boolean;
|
|
273
323
|
readonly validate: (input: unknown, ctx: WidgetStateValidateContext<Interfaces>) => input is WidgetStateValueOf<Interfaces, Key>;
|
|
274
324
|
readonly default?: (ctx: WidgetStateDefaultContext<Interfaces>) => WidgetStateValueOf<Interfaces, Key>;
|
|
275
325
|
}
|
|
276
326
|
interface WidgetPropertyDefinition<Interfaces extends WidgetInterfaces, Name extends WidgetMemberKey, Deps extends RegisteredDeps> {
|
|
327
|
+
/** Passive semantic value contract for integration/tooling inspection. */
|
|
328
|
+
readonly valueContract?: WidgetValueContract<WidgetPropertyValueOf<Interfaces, Name>>;
|
|
277
329
|
readonly registerDeps?: (ctx: WidgetRegisterDepsContext<Interfaces, 'property'>) => Deps;
|
|
278
330
|
readonly compute: (ctx: WidgetPropertyComputeContext<Interfaces, Deps>) => WidgetPropertyValueOf<Interfaces, Name>;
|
|
279
331
|
}
|
|
@@ -282,6 +334,9 @@ interface WidgetMethodDefinition<Interfaces extends WidgetInterfaces, Name exten
|
|
|
282
334
|
readonly validateArgs: (args: readonly unknown[], ctx: WidgetMethodValidateArgsContext<Interfaces>) => args is WidgetMethodArgsOf<Interfaces, Name>;
|
|
283
335
|
readonly execute: (ctx: WidgetMethodExecuteContext<Interfaces, Name, Deps>) => WidgetMethodReturnOf<Interfaces, Name>;
|
|
284
336
|
}
|
|
337
|
+
interface WidgetEventDefinition {
|
|
338
|
+
readonly description: string;
|
|
339
|
+
}
|
|
285
340
|
/**
|
|
286
341
|
* Phantom section typestate. `Remaining` is part of the marker type, so a section is complete only
|
|
287
342
|
* when `Remaining` has been reduced to `never`.
|
|
@@ -293,6 +348,7 @@ interface WidgetSectionMarker<Kind extends string, Remaining extends WidgetMembe
|
|
|
293
348
|
type WidgetStateSection<Interfaces extends WidgetInterfaces, Remaining extends WidgetStateKeyOf<Interfaces>> = WidgetSectionMarker<'state', Remaining> & { [Key in Remaining]: (definition: WidgetStateMemberDefinition<Interfaces, Key>) => WidgetStateSection<Interfaces, Exclude<Remaining, Key>>; };
|
|
294
349
|
type WidgetPropertiesSection<Interfaces extends WidgetInterfaces, Remaining extends WidgetPropertyKeyOf<Interfaces>> = WidgetSectionMarker<'properties', Remaining> & { [Name in Remaining]: <const Deps extends RegisteredDeps = EmptyRegisteredDeps>(definition: WidgetPropertyDefinition<Interfaces, Name, Deps>) => WidgetPropertiesSection<Interfaces, Exclude<Remaining, Name>>; };
|
|
295
350
|
type WidgetMethodsSection<Interfaces extends WidgetInterfaces, Remaining extends WidgetMethodKeyOf<Interfaces>> = WidgetSectionMarker<'methods', Remaining> & { [Name in Remaining]: <const Deps extends RegisteredDeps = EmptyRegisteredDeps>(definition: WidgetMethodDefinition<Interfaces, Name, Deps>) => WidgetMethodsSection<Interfaces, Exclude<Remaining, Name>>; };
|
|
351
|
+
type WidgetEventsSection<Interfaces extends WidgetInterfaces, Remaining extends WidgetEventKeyOf<Interfaces>> = WidgetSectionMarker<'events', Remaining> & { [Name in Remaining]: (definition: WidgetEventDefinition) => WidgetEventsSection<Interfaces, Exclude<Remaining, Name>>; };
|
|
296
352
|
/**
|
|
297
353
|
* Returned instead of the next builder phase when the supplied `WidgetInterfaces` is outside the
|
|
298
354
|
* supported declaration domain. It exposes no builder operation, so the chain cannot continue.
|
|
@@ -303,9 +359,12 @@ interface WidgetInterfacesViolation<Reason extends string> {
|
|
|
303
359
|
interface WidgetPluginDonePhase<Type extends string, Interfaces extends WidgetInterfaces> {
|
|
304
360
|
done: () => WidgetPlugin<Type, Interfaces>;
|
|
305
361
|
}
|
|
306
|
-
type
|
|
307
|
-
|
|
362
|
+
type WidgetPluginEventsPhase<Type extends string, Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'events'> extends true ? {
|
|
363
|
+
events: (build: (section: WidgetEventsSection<Interfaces, WidgetEventKeyOf<Interfaces>>) => WidgetEventsSection<Interfaces, never>) => WidgetPluginDonePhase<Type, Interfaces>;
|
|
308
364
|
} : WidgetPluginDonePhase<Type, Interfaces>;
|
|
365
|
+
type WidgetPluginMethodsPhase<Type extends string, Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'methods'> extends true ? {
|
|
366
|
+
methods: (build: (section: WidgetMethodsSection<Interfaces, WidgetMethodKeyOf<Interfaces>>) => WidgetMethodsSection<Interfaces, never>) => WidgetPluginEventsPhase<Type, Interfaces>;
|
|
367
|
+
} : WidgetPluginEventsPhase<Type, Interfaces>;
|
|
309
368
|
type WidgetPluginPropertiesPhase<Type extends string, Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'properties'> extends true ? {
|
|
310
369
|
properties: (build: (section: WidgetPropertiesSection<Interfaces, WidgetPropertyKeyOf<Interfaces>>) => WidgetPropertiesSection<Interfaces, never>) => WidgetPluginMethodsPhase<Type, Interfaces>;
|
|
311
370
|
} : WidgetPluginMethodsPhase<Type, Interfaces>;
|
|
@@ -334,7 +393,7 @@ interface WidgetPluginDescriptionPhase<Type extends string> {
|
|
|
334
393
|
/**
|
|
335
394
|
* Starts the plugin builder for one plugin `type`.
|
|
336
395
|
*
|
|
337
|
-
* Phase order is `interfaces -> config? -> slots? -> state? -> properties? -> methods? -> done()`;
|
|
396
|
+
* Phase order is `interfaces -> config? -> slots? -> state? -> properties? -> methods? -> events? -> done()`;
|
|
338
397
|
* a phase exists only when its capability is declared.
|
|
339
398
|
*/
|
|
340
399
|
declare function createWidgetPlugin<const Type extends string>(type: Type): WidgetPluginDescriptionPhase<Type>;
|
|
@@ -343,6 +402,8 @@ declare function createWidgetPlugin<const Type extends string>(type: Type): Widg
|
|
|
343
402
|
interface WidgetCatalogEntry {
|
|
344
403
|
readonly type: string;
|
|
345
404
|
readonly description: string;
|
|
405
|
+
/** Null means no config capability; otherwise schema may itself be null. */
|
|
406
|
+
readonly config: WidgetPluginConfigMetadata | null;
|
|
346
407
|
readonly descriptions: {
|
|
347
408
|
readonly config: string | null;
|
|
348
409
|
readonly slots: ReadonlyMap<string, string> | null;
|
|
@@ -612,6 +673,9 @@ interface RuntimeMethod<Fn extends (...args: any[]) => any> {
|
|
|
612
673
|
getDiagnostics: () => readonly RuntimeMethodDiagnostic[];
|
|
613
674
|
subscribeDiagnostics: (listener: (diagnostics: readonly RuntimeMethodDiagnostic[]) => void) => () => void;
|
|
614
675
|
}
|
|
676
|
+
interface RuntimeEvent<Args extends readonly unknown[]> {
|
|
677
|
+
subscribe: (listener: (...args: Args) => void) => () => void;
|
|
678
|
+
}
|
|
615
679
|
type RuntimeStateSurface<Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'state'> extends true ? {
|
|
616
680
|
readonly state: { readonly [Key in WidgetStateKeyOf<Interfaces>]: RuntimeState<WidgetStateValueOf<Interfaces, Key>>; };
|
|
617
681
|
} : unknown;
|
|
@@ -619,13 +683,15 @@ type RuntimePropertySurface<Interfaces extends WidgetInterfaces> = HasWidgetCapa
|
|
|
619
683
|
readonly properties: { readonly [Name in WidgetPropertyKeyOf<Interfaces>]: RuntimeProperty<WidgetPropertyValueOf<Interfaces, Name>>; };
|
|
620
684
|
} : unknown;
|
|
621
685
|
/**
|
|
622
|
-
* Gated on
|
|
623
|
-
*
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
686
|
+
* Gated on declaration presence so an explicitly empty events capability remains observable as an
|
|
687
|
+
* empty `events` surface, distinct from an absent events capability.
|
|
688
|
+
*/
|
|
689
|
+
type RuntimeEventSurface<Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'events'> extends true ? {
|
|
690
|
+
readonly events: { readonly [Name in WidgetEventKeyOf<Interfaces>]: RuntimeEvent<WidgetEventArgsOf<Interfaces, Name>>; };
|
|
691
|
+
} : unknown;
|
|
692
|
+
/**
|
|
693
|
+
* Gated on declaration presence so an explicitly empty methods capability remains observable as an
|
|
694
|
+
* empty `methods` surface, distinct from an absent methods capability.
|
|
629
695
|
*/
|
|
630
696
|
type RuntimeMethodSurface<Interfaces extends WidgetInterfaces> = HasWidgetCapability<Interfaces, 'methods'> extends true ? {
|
|
631
697
|
readonly methods: { readonly [Name in WidgetMethodKeyOf<Interfaces>]: RuntimeMethod<WidgetMethodOf<Interfaces, Name>>; };
|
|
@@ -642,7 +708,7 @@ type RuntimeWidgetFor<Plugin extends AnyWidgetPlugin, Plugins extends AnyWidgetP
|
|
|
642
708
|
*/
|
|
643
709
|
getDiagnostics: () => readonly RuntimeWidgetDiagnostic[];
|
|
644
710
|
subscribeDiagnostics: (listener: (diagnostics: readonly RuntimeWidgetDiagnostic[]) => void) => () => void;
|
|
645
|
-
} & RuntimeStateSurface<WidgetInterfacesOf<Plugin>> & RuntimePropertySurface<WidgetInterfacesOf<Plugin>> & RuntimeMethodSurface<WidgetInterfacesOf<Plugin>>;
|
|
711
|
+
} & RuntimeStateSurface<WidgetInterfacesOf<Plugin>> & RuntimePropertySurface<WidgetInterfacesOf<Plugin>> & RuntimeMethodSurface<WidgetInterfacesOf<Plugin>> & RuntimeEventSurface<WidgetInterfacesOf<Plugin>>;
|
|
646
712
|
type RuntimeWidget<Plugins extends AnyWidgetPluginTuple = AnyWidgetPluginTuple> = Plugins[number] extends (infer Plugin) ? Plugin extends AnyWidgetPlugin ? RuntimeWidgetFor<Plugin, Plugins> : never : never;
|
|
647
713
|
/**
|
|
648
714
|
* Executable instance of a valid Blueprint.
|
|
@@ -1107,4 +1173,4 @@ interface DependencyBuilder<Interfaces extends WidgetInterfaces, Consumer extend
|
|
|
1107
1173
|
widget: (widgetId: WidgetId) => OptionalizableDependencyTarget<Consumer>;
|
|
1108
1174
|
}
|
|
1109
1175
|
//#endregion
|
|
1110
|
-
export { RuntimeDependencyValueRejectedDiagnostic as $,
|
|
1176
|
+
export { RuntimeDependencyValueRejectedDiagnostic as $, HasWidgetCapability as $n, WidgetCatalogEntry as $t, BlueprintNodeDiagnostic as A, WidgetPluginPropertiesPhase as An, RuntimeEventSurface as At, Diagnostic as B, WidgetResolvedConfigContext as Bn, SelfBlueprintWidgetNodeView as Bt, BlueprintDependencyDiagnosticLocation as C, WidgetPluginConfigMetadata as Cn, WidgetStateOf as Cr, CreateWidgetSystemRuntimeOptions as Ct, BlueprintDiagnostic as D, WidgetPluginEventsPhase as Dn, JsonPrimitive as Dr, ResolvedBlueprintWidgetNodeView as Dt, BlueprintDependencyTarget as E, WidgetPluginDonePhase as En, JsonObject as Er, ResolvedBlueprintWidgetNodeFor as Et, BlueprintSourceDiagnostic as F, WidgetPluginValidateStructureContext as Fn, RuntimeState as Ft, JsonCompatibilityDiagnostic as G, WidgetStateMemberDefinition as Gn, WidgetLocationView as Gt, DiagnosticCollector as H, WidgetSlotDefinitions as Hn, ValidBlueprintView as Ht, BlueprintSourceDiagnosticLocation as I, WidgetPropertiesSection as In, RuntimeStateSurface as It, RelativeSlotStructureDiagnosticInput as J, WidgetValueContract as Jn, WidgetSystemBlueprint as Jt, JsonCompatibilityReason as K, WidgetStateSection as Kn, WidgetSource as Kt, BlueprintStructureDiagnostic as L, WidgetPropertyComputeContext as Ln, RuntimeWidget as Lt, BlueprintPropertyDiagnosticLocation as M, WidgetPluginStatePhase as Mn, RuntimeMethodSurface as Mt, BlueprintSlotChildDiagnosticLocation as N, WidgetPluginTypeOf as Nn, RuntimeProperty as Nt, BlueprintDiagnosticLocation as O, WidgetPluginInterfacesPhase as On, JsonValue as Or, ResolvedBlueprintWidgetNodeViewFor as Ot, BlueprintSlotDiagnosticLocation as P, WidgetPluginValidateStructure as Pn, RuntimePropertySurface as Pt, RuntimeDependencyTargetFailedDiagnostic as Q, ExecutionResult as Qn, WidgetCatalog as Qt, BlueprintStructureDiagnosticLocation as R, WidgetPropertyDefinition as Rn, RuntimeWidgetFor as Rt, BlueprintDependencyDiagnostic as S, WidgetPluginCapabilities as Sn, WidgetStateKeyOf as Sr, BlueprintWidgetNodeView as St, BlueprintDependencyReference as T, WidgetPluginDescriptionPhase as Tn, JsonArray as Tr, ResolvedBlueprintWidgetNode as Tt, DiagnosticPath as U, WidgetSlotValidateStructureContext as Un, ValidWidgetSystemBlueprint as Ut, DiagnosticBase as V, WidgetSlotDefinition as Vn, UnresolvedBlueprintWidgetNode as Vt, EMPTY_DIAGNOSTICS as W, WidgetStateDefaultContext as Wn, WidgetLocation as Wt, RelativeSystemStructureDiagnosticInput as X, createWidgetValueContract as Xn, WidgetSystemRuntime as Xt, RelativeStructureDiagnosticLocation as Y, createWidgetPlugin as Yn, WidgetSystemBlueprintStatus as Yt, RelativeValueDiagnosticInput as Z, ExecutionFailure as Zn, CreateWidgetSystemOptions as Zt, ToExecutedDeps as _, WidgetMethodDefinition as _n, WidgetPropertyKeyOf as _r, BlueprintNodeConfigFields as _t, MaybeOptional as a, AnyWidgetPlugin as an, WidgetId as ar, RuntimeMethodDependencyDiagnostic as at, BlueprintConfigDiagnostic as b, WidgetMethodsSection as bn, WidgetResolvedConfigOf as br, BlueprintWidgetNode as bt, PropertyGetDepExpression as c, WidgetConfigDefinition as cn, WidgetMemberKey as cr, RuntimePropertyDependencyDiagnostic as ct, SelfMethodDependencyOperations as d, WidgetEventDefinition as dn, WidgetMethodArgsOf as dr, RuntimeStateDiagnostic as dt, WidgetPluginOf as en, NonEmptyReadonlyArray as er, RuntimeDiagnostic as et, SelfPropertyDependencyOperations as f, WidgetEventEmitter as fn, WidgetMethodKeyOf as fr, RuntimeWidgetDiagnostic as ft, ToExecutedDep as g, WidgetInterfacesViolation as gn, WidgetPropertiesOf as gr, BlueprintCompileView as gt, StateSetDepExpression as h, WidgetInterfacesOf as hn, WidgetMethodsOf as hr, WidgetSystemRuntimeDisposedError as ht, EmptyRegisteredDeps as i, createWidgetSystem as in, WidgetEventsOf as ir, RuntimeMethodArgsDiagnostic as it, BlueprintNodeDiagnosticLocation as j, WidgetPluginSlotsPhase as jn, RuntimeMethod as jt, BlueprintMethodDiagnosticLocation as k, WidgetPluginMethodsPhase as kn, RuntimeEvent as kt, RegisteredDeps as l, WidgetConfigJsonSchema as ln, WidgetMemberKeysOf as lr, RuntimePropertyDiagnostic as lt, StateGetDepExpression as m, WidgetEventsSection as mn, WidgetMethodReturnOf as mr, WidgetSystemRuntimeDiagnostic as mt, DependencyBuilder as n, WidgetSystemValidateStructure as nn, WidgetEventArgsOf as nr, RuntimeLevelDiagnostic as nt, MethodInvokeDepExpression as o, AnyWidgetPluginTuple as on, WidgetInterfaces as or, RuntimeMethodDiagnostic as ot, SelfStateDependencyOperations as p, WidgetEventEmitterContext as pn, WidgetMethodOf as pr, SourceAccessDiagnostic as pt, RelativePluginStructureDiagnosticInput as q, WidgetStateValidateContext as qn, WidgetSourceFor as qt, DependencyConsumer as r, WidgetSystemValidateStructureContext as rn, WidgetEventKeyOf as rr, RuntimeLevelDiagnosticLocation as rt, OptionalizableDependencyTarget as s, WIDGET_CONFIG_JSON_SCHEMA_DIALECT as sn, WidgetInterfacesViolationOf as sr, RuntimeMethodResultDiagnostic as st, AnyDepExpression as t, WidgetSystem as tn, WidgetCapabilityOf as tr, RuntimeDiagnosticLocation as tt, SelfDependencyTarget as u, WidgetConfigValidateContext as un, WidgetMemberValueOf as ur, RuntimePropertyResultDiagnostic as ut, UnknownTargetDependencyOperations as v, WidgetMethodExecuteContext as vn, WidgetPropertyValueOf as vr, BlueprintSemanticSlots as vt, BlueprintDependencyOperation as w, WidgetPluginConfigPhase as wn, WidgetStateValueOf as wr, InvalidWidgetSystemBlueprint as wt, BlueprintDefinitionDiagnostic as x, WidgetPlugin as xn, WidgetSlotNameOf as xr, BlueprintWidgetNodeBase as xt, UnknownTargetStateDependencyOperations as y, WidgetMethodValidateArgsContext as yn, WidgetRawConfigOf as yr, BlueprintSemanticSlotsView as yt, BlueprintWidgetDiagnosticLocation as z, WidgetRegisterDepsContext as zn, SelfBlueprintWidgetNode as zt };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { effect, endBatch, setActiveSub, startBatch } from "alien-signals";
|
|
2
|
+
//#region src/runtime/adapter.ts
|
|
3
|
+
/**
|
|
4
|
+
* Invokes `listener(value)` with no active alien subscriber (restoring the previous one afterward) and
|
|
5
|
+
* isolates a synchronous throw so it cannot escape into the current alien-signals flush. Baseline
|
|
6
|
+
* reporting for an isolated exception is a queued microtask rethrow.
|
|
7
|
+
*/
|
|
8
|
+
function invokeListenerIsolated(listener, value) {
|
|
9
|
+
const previous = setActiveSub(void 0);
|
|
10
|
+
try {
|
|
11
|
+
listener(value);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
queueMicrotask(() => {
|
|
14
|
+
throw error;
|
|
15
|
+
});
|
|
16
|
+
} finally {
|
|
17
|
+
setActiveSub(previous);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Calls a synchronous semantic event listener without leaking its reads into an enclosing
|
|
22
|
+
* Property/effect. Unlike reactive value listeners, event listener exceptions propagate immediately.
|
|
23
|
+
*/
|
|
24
|
+
function invokeListenerUntracked(listener, args) {
|
|
25
|
+
const previous = setActiveSub(void 0);
|
|
26
|
+
try {
|
|
27
|
+
listener(...args);
|
|
28
|
+
} finally {
|
|
29
|
+
setActiveSub(previous);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Nesting depth of the calls that can drive an `alien-signals` evaluation/flush and therefore have to be
|
|
34
|
+
* back out of the reactive graph before a deferred propagation is safe to release: `RuntimeState`'s
|
|
35
|
+
* `attemptSet`, `RuntimeMethod`'s `invoke` and the tracked read of a Property's result computed. Purely
|
|
36
|
+
* local bookkeeping for {@link writeDeferringFlush}, not a semantic boundary of its own.
|
|
37
|
+
*/
|
|
38
|
+
let operationDepth = 0;
|
|
39
|
+
/** Number of `startBatch()` calls {@link writeDeferringFlush} has opened and not yet closed. */
|
|
40
|
+
let deferredFlushDepth = 0;
|
|
41
|
+
/**
|
|
42
|
+
* Closes every batch level {@link writeDeferringFlush} left open, letting alien-signals flush the
|
|
43
|
+
* notifications it already queued.
|
|
44
|
+
*
|
|
45
|
+
* The loop condition is re-tested after every `endBatch()`: that flush can run an effect whose Property
|
|
46
|
+
* recompute commits its own diagnostic snapshot, which opens a fresh level this same drain must then close.
|
|
47
|
+
* A recompute that throws inside one of those flushes must not leave alien-signals permanently batched
|
|
48
|
+
* (every later flush in the Runtime's life would be silently suspended), so the remaining levels are
|
|
49
|
+
* closed before the throw is rethrown.
|
|
50
|
+
*/
|
|
51
|
+
function releaseDeferredFlushes() {
|
|
52
|
+
while (deferredFlushDepth > 0) {
|
|
53
|
+
--deferredFlushDepth;
|
|
54
|
+
try {
|
|
55
|
+
endBatch();
|
|
56
|
+
} catch (error) {
|
|
57
|
+
releaseDeferredFlushes();
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Tracks one nesting level of the calls that can drive an evaluation, and releases every flush
|
|
64
|
+
* {@link writeDeferringFlush} deferred inside it once the outermost level is leaving.
|
|
65
|
+
*
|
|
66
|
+
* The release runs while the depth is still `1`, so a listener that the release's own flush invokes and
|
|
67
|
+
* that re-enters the Runtime cannot re-enter the drain loop. The decrement is unconditional: a Property
|
|
68
|
+
* recompute that throws inside the release's flush (`createTrackedSubscription` isolates the external
|
|
69
|
+
* listener, never the tracked read) must not leave the depth pinned above `0`, or every later call would
|
|
70
|
+
* look nested and no release would ever run again.
|
|
71
|
+
*/
|
|
72
|
+
function runRuntimeOperation(fn) {
|
|
73
|
+
++operationDepth;
|
|
74
|
+
try {
|
|
75
|
+
return fn();
|
|
76
|
+
} finally {
|
|
77
|
+
try {
|
|
78
|
+
if (operationDepth === 1) releaseDeferredFlushes();
|
|
79
|
+
} finally {
|
|
80
|
+
--operationDepth;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Performs a signal write whose propagation must not be flushed while a computed may still be
|
|
86
|
+
* mid-evaluation, by holding an alien batch open until the outermost {@link runRuntimeOperation} frame on
|
|
87
|
+
* the stack is leaving — i.e. until nothing that could still be evaluating remains.
|
|
88
|
+
*
|
|
89
|
+
* Why this is required in pinned alien-signals@3.2.1 (`esm/index.mjs` / `esm/system.mjs`):
|
|
90
|
+
*
|
|
91
|
+
* - `signalOper` ends a changed write with `propagate(subs, ...)` followed by `if (!batchDepth) flush()`.
|
|
92
|
+
* A write performed from inside a computed's own evaluator therefore starts a *nested* flush that runs
|
|
93
|
+
* the effects the outer propagation had already queued — while the computed that queued them is still
|
|
94
|
+
* mid-`updateComputed`.
|
|
95
|
+
* - `updateComputed` sets `c.flags = 1 | 4` (`Mutable | RecursedCheck`) and only assigns
|
|
96
|
+
* `c.value = c.getter(...)` after the getter returns, so during that window the computed carries
|
|
97
|
+
* neither `Dirty` (16) nor `Pending` (32) and still holds its previous value.
|
|
98
|
+
* - `checkDirty` has no `RecursedCheck` branch: a queued effect whose dependency chain passes through
|
|
99
|
+
* that computed hits none of its `(1 | 16)` / `(1 | 32)` cases, concludes `dirty === false`, and then
|
|
100
|
+
* clears its own intermediate's `Pending` flag (`sub.flags &= ~32`). The intermediate is now marked
|
|
101
|
+
* clean while still holding a stale cached value, so the later `shallowPropagate` — which only
|
|
102
|
+
* upgrades subscribers that are still `Pending` — skips it for good: the effect never runs again and
|
|
103
|
+
* even an untracked `.get()` returns the stale cache.
|
|
104
|
+
*
|
|
105
|
+
* Keeping `batchDepth > 0` for the write removes the nested flush entirely: `propagate` still marks and
|
|
106
|
+
* queues every watcher through alien-signals' own bookkeeping, and the queue is drained later — by the
|
|
107
|
+
* flush that is already running (it re-reads the shared queue length) or by
|
|
108
|
+
* {@link runRuntimeOperation}'s release. Nothing here re-implements propagation, ordering or dedupe.
|
|
109
|
+
*
|
|
110
|
+
* The write itself is unconditional and immediate, so a snapshot is committed exactly where it was
|
|
111
|
+
* before: `pendingValue` is written synchronously and every later read commits it (`signalOper`'s read
|
|
112
|
+
* path runs `updateSignal` when the signal is `Dirty`), which keeps "the snapshot is committed by the
|
|
113
|
+
* time the operation's `ExecutionResult` is observable" true. Only the *notification* moves — never past
|
|
114
|
+
* the end of the operation that produced it.
|
|
115
|
+
*
|
|
116
|
+
* One consequence of using an alien batch as the deferral mechanism, rather than a normative rule about
|
|
117
|
+
* Runtime operations: while a level is open, alien-signals coalesces as it does inside any batch, so two
|
|
118
|
+
* writes to the *same* signal before the release notify its subscribers once, with the final value. This
|
|
119
|
+
* is not a new Runtime semantic — it is the ordinary behavior of the batching alien-signals already owns,
|
|
120
|
+
* already observable inside `RuntimeMethod.invoke`'s batch. Every actual completed recompute still
|
|
121
|
+
* notifies each of its own subscribers exactly once; alien-signals, not this module, decides which
|
|
122
|
+
* recomputes happen.
|
|
123
|
+
*/
|
|
124
|
+
function writeDeferringFlush(write) {
|
|
125
|
+
if (operationDepth === 0) {
|
|
126
|
+
write();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
startBatch();
|
|
130
|
+
++deferredFlushDepth;
|
|
131
|
+
write();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Creates a Runtime-owned public subscription: an alien `effect()` that tracks `read()`, skips the
|
|
135
|
+
* bootstrap run, and invokes `listener` through {@link invokeListenerIsolated} on every actual
|
|
136
|
+
* subsequent run. Returns an idempotent unsubscribe function registered with the Runtime's disposal
|
|
137
|
+
* bookkeeping.
|
|
138
|
+
*/
|
|
139
|
+
function createTrackedSubscription(context, read, listener) {
|
|
140
|
+
let isBootstrap = true;
|
|
141
|
+
const rawDispose = effect(() => {
|
|
142
|
+
const value = read();
|
|
143
|
+
if (isBootstrap) {
|
|
144
|
+
isBootstrap = false;
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
invokeListenerIsolated(listener, value);
|
|
148
|
+
});
|
|
149
|
+
return context.registerSubscription(rawDispose);
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/runtime/event.ts
|
|
153
|
+
function createEventPrimitive(context) {
|
|
154
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
155
|
+
let inspectionListeners = null;
|
|
156
|
+
function publishInspectionOccurrence(args) {
|
|
157
|
+
if (inspectionListeners === null) return;
|
|
158
|
+
const snapshot = inspectionListeners.slice();
|
|
159
|
+
for (const { listener } of snapshot) invokeListenerIsolated(listener, args);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
public: Object.freeze({ subscribe(listener) {
|
|
163
|
+
context.assertActive();
|
|
164
|
+
const entry = { listener };
|
|
165
|
+
listeners.add(entry);
|
|
166
|
+
return context.registerSubscription(() => listeners.delete(entry));
|
|
167
|
+
} }),
|
|
168
|
+
emit(...args) {
|
|
169
|
+
context.assertActive();
|
|
170
|
+
const listenersSnapshot = [...listeners];
|
|
171
|
+
publishInspectionOccurrence(Object.freeze([...args]));
|
|
172
|
+
for (const { listener } of listenersSnapshot) invokeListenerUntracked(listener, args);
|
|
173
|
+
},
|
|
174
|
+
inspection: { subscribe(listener) {
|
|
175
|
+
const entry = { listener };
|
|
176
|
+
if (inspectionListeners === null) inspectionListeners = [];
|
|
177
|
+
inspectionListeners.push(entry);
|
|
178
|
+
return () => {
|
|
179
|
+
if (inspectionListeners === null) return;
|
|
180
|
+
const index = inspectionListeners.indexOf(entry);
|
|
181
|
+
if (index !== -1) inspectionListeners.splice(index, 1);
|
|
182
|
+
};
|
|
183
|
+
} }
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function buildEventEmitter(events) {
|
|
187
|
+
const emitter = Object.create(null);
|
|
188
|
+
for (const [name, primitive] of events) emitter[name] = (...args) => primitive.emit(...args);
|
|
189
|
+
return Object.freeze(emitter);
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { runRuntimeOperation as a, invokeListenerIsolated as i, createEventPrimitive as n, writeDeferringFlush as o, createTrackedSubscription as r, buildEventEmitter as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RuntimeDependencyValueRejectedDiagnostic, $n as
|
|
1
|
+
import { $ as RuntimeDependencyValueRejectedDiagnostic, $n as HasWidgetCapability, $t as WidgetCatalogEntry, A as BlueprintNodeDiagnostic, An as WidgetPluginPropertiesPhase, At as RuntimeEventSurface, B as Diagnostic, Bn as WidgetResolvedConfigContext, Bt as SelfBlueprintWidgetNodeView, C as BlueprintDependencyDiagnosticLocation, Cn as WidgetPluginConfigMetadata, Cr as WidgetStateOf, Ct as CreateWidgetSystemRuntimeOptions, D as BlueprintDiagnostic, Dn as WidgetPluginEventsPhase, Dr as JsonPrimitive, Dt as ResolvedBlueprintWidgetNodeView, E as BlueprintDependencyTarget, En as WidgetPluginDonePhase, Er as JsonObject, Et as ResolvedBlueprintWidgetNodeFor, F as BlueprintSourceDiagnostic, Fn as WidgetPluginValidateStructureContext, Ft as RuntimeState, G as JsonCompatibilityDiagnostic, Gn as WidgetStateMemberDefinition, Gt as WidgetLocationView, H as DiagnosticCollector, Hn as WidgetSlotDefinitions, Ht as ValidBlueprintView, I as BlueprintSourceDiagnosticLocation, In as WidgetPropertiesSection, It as RuntimeStateSurface, J as RelativeSlotStructureDiagnosticInput, Jn as WidgetValueContract, Jt as WidgetSystemBlueprint, K as JsonCompatibilityReason, Kn as WidgetStateSection, Kt as WidgetSource, L as BlueprintStructureDiagnostic, Ln as WidgetPropertyComputeContext, Lt as RuntimeWidget, M as BlueprintPropertyDiagnosticLocation, Mn as WidgetPluginStatePhase, Mt as RuntimeMethodSurface, N as BlueprintSlotChildDiagnosticLocation, Nn as WidgetPluginTypeOf, Nt as RuntimeProperty, O as BlueprintDiagnosticLocation, On as WidgetPluginInterfacesPhase, Or as JsonValue, Ot as ResolvedBlueprintWidgetNodeViewFor, P as BlueprintSlotDiagnosticLocation, Pn as WidgetPluginValidateStructure, Pt as RuntimePropertySurface, Q as RuntimeDependencyTargetFailedDiagnostic, Qn as ExecutionResult, Qt as WidgetCatalog, R as BlueprintStructureDiagnosticLocation, Rn as WidgetPropertyDefinition, Rt as RuntimeWidgetFor, S as BlueprintDependencyDiagnostic, Sn as WidgetPluginCapabilities, Sr as WidgetStateKeyOf, St as BlueprintWidgetNodeView, T as BlueprintDependencyReference, Tn as WidgetPluginDescriptionPhase, Tr as JsonArray, Tt as ResolvedBlueprintWidgetNode, U as DiagnosticPath, Un as WidgetSlotValidateStructureContext, Ut as ValidWidgetSystemBlueprint, V as DiagnosticBase, Vn as WidgetSlotDefinition, Vt as UnresolvedBlueprintWidgetNode, W as EMPTY_DIAGNOSTICS, Wn as WidgetStateDefaultContext, Wt as WidgetLocation, X as RelativeSystemStructureDiagnosticInput, Xn as createWidgetValueContract, Xt as WidgetSystemRuntime, Y as RelativeStructureDiagnosticLocation, Yn as createWidgetPlugin, Yt as WidgetSystemBlueprintStatus, Z as RelativeValueDiagnosticInput, Zn as ExecutionFailure, Zt as CreateWidgetSystemOptions, _ as ToExecutedDeps, _n as WidgetMethodDefinition, _r as WidgetPropertyKeyOf, _t as BlueprintNodeConfigFields, a as MaybeOptional, an as AnyWidgetPlugin, ar as WidgetId, at as RuntimeMethodDependencyDiagnostic, b as BlueprintConfigDiagnostic, bn as WidgetMethodsSection, br as WidgetResolvedConfigOf, bt as BlueprintWidgetNode, c as PropertyGetDepExpression, cn as WidgetConfigDefinition, cr as WidgetMemberKey, ct as RuntimePropertyDependencyDiagnostic, d as SelfMethodDependencyOperations, dn as WidgetEventDefinition, dr as WidgetMethodArgsOf, dt as RuntimeStateDiagnostic, en as WidgetPluginOf, er as NonEmptyReadonlyArray, et as RuntimeDiagnostic, f as SelfPropertyDependencyOperations, fn as WidgetEventEmitter, fr as WidgetMethodKeyOf, ft as RuntimeWidgetDiagnostic, g as ToExecutedDep, gn as WidgetInterfacesViolation, gr as WidgetPropertiesOf, gt as BlueprintCompileView, h as StateSetDepExpression, hn as WidgetInterfacesOf, hr as WidgetMethodsOf, ht as WidgetSystemRuntimeDisposedError, i as EmptyRegisteredDeps, in as createWidgetSystem, ir as WidgetEventsOf, it as RuntimeMethodArgsDiagnostic, j as BlueprintNodeDiagnosticLocation, jn as WidgetPluginSlotsPhase, jt as RuntimeMethod, k as BlueprintMethodDiagnosticLocation, kn as WidgetPluginMethodsPhase, kt as RuntimeEvent, l as RegisteredDeps, ln as WidgetConfigJsonSchema, lr as WidgetMemberKeysOf, lt as RuntimePropertyDiagnostic, m as StateGetDepExpression, mn as WidgetEventsSection, mr as WidgetMethodReturnOf, mt as WidgetSystemRuntimeDiagnostic, n as DependencyBuilder, nn as WidgetSystemValidateStructure, nr as WidgetEventArgsOf, nt as RuntimeLevelDiagnostic, o as MethodInvokeDepExpression, on as AnyWidgetPluginTuple, or as WidgetInterfaces, ot as RuntimeMethodDiagnostic, p as SelfStateDependencyOperations, pn as WidgetEventEmitterContext, pr as WidgetMethodOf, pt as SourceAccessDiagnostic, q as RelativePluginStructureDiagnosticInput, qn as WidgetStateValidateContext, qt as WidgetSourceFor, r as DependencyConsumer, rn as WidgetSystemValidateStructureContext, rr as WidgetEventKeyOf, rt as RuntimeLevelDiagnosticLocation, s as OptionalizableDependencyTarget, sn as WIDGET_CONFIG_JSON_SCHEMA_DIALECT, sr as WidgetInterfacesViolationOf, st as RuntimeMethodResultDiagnostic, t as AnyDepExpression, tn as WidgetSystem, tr as WidgetCapabilityOf, tt as RuntimeDiagnosticLocation, u as SelfDependencyTarget, un as WidgetConfigValidateContext, ur as WidgetMemberValueOf, ut as RuntimePropertyResultDiagnostic, v as UnknownTargetDependencyOperations, vn as WidgetMethodExecuteContext, vr as WidgetPropertyValueOf, vt as BlueprintSemanticSlots, w as BlueprintDependencyOperation, wn as WidgetPluginConfigPhase, wr as WidgetStateValueOf, wt as InvalidWidgetSystemBlueprint, x as BlueprintDefinitionDiagnostic, xn as WidgetPlugin, xr as WidgetSlotNameOf, xt as BlueprintWidgetNodeBase, y as UnknownTargetStateDependencyOperations, yn as WidgetMethodValidateArgsContext, yr as WidgetRawConfigOf, yt as BlueprintSemanticSlotsView, z as BlueprintWidgetDiagnosticLocation, zn as WidgetRegisterDepsContext, zt as SelfBlueprintWidgetNode } from "./dep-CzOpc4xk.mjs";
|
|
2
2
|
//#region src/source-patch.d.ts
|
|
3
3
|
type SourcePath = readonly (string | number)[] | string;
|
|
4
4
|
type SourcePatchOperation = {
|
|
@@ -146,4 +146,4 @@ declare function separateWidgetSource<const Plugins extends AnyWidgetPluginTuple
|
|
|
146
146
|
*/
|
|
147
147
|
declare function normalizeSeparatedWidgetSource(input: unknown): SeparatedWidgetSourceNormalization;
|
|
148
148
|
//#endregion
|
|
149
|
-
export { type AnyDepExpression, type AnyWidgetPlugin, type AnyWidgetPluginTuple, type ApplyPatchFailure, type ApplyPatchOptions, type ApplyPatchResult, type BlueprintCompileView, type BlueprintConfigDiagnostic, type BlueprintDefinitionDiagnostic, type BlueprintDependencyDiagnostic, type BlueprintDependencyDiagnosticLocation, type BlueprintDependencyOperation, type BlueprintDependencyReference, type BlueprintDependencyTarget, type BlueprintDiagnostic, type BlueprintDiagnosticLocation, type BlueprintMethodDiagnosticLocation, type BlueprintNodeConfigFields, type BlueprintNodeDiagnostic, type BlueprintNodeDiagnosticLocation, type BlueprintPropertyDiagnosticLocation, type BlueprintSemanticSlots, type BlueprintSemanticSlotsView, type BlueprintSlotChildDiagnosticLocation, type BlueprintSlotDiagnosticLocation, type BlueprintSourceDiagnostic, type BlueprintSourceDiagnosticLocation, type BlueprintStructureDiagnostic, type BlueprintStructureDiagnosticLocation, type BlueprintWidgetDiagnosticLocation, type BlueprintWidgetNode, type BlueprintWidgetNodeBase, type BlueprintWidgetNodeView, type CreateWidgetDocumentOptions, type CreateWidgetSystemOptions, type CreateWidgetSystemRuntimeOptions, type DependencyBuilder, type DependencyConsumer, type Diagnostic, type DiagnosticBase, type DiagnosticCollector, type DiagnosticPath, type DocumentRevisionConflictFailure, EMPTY_DIAGNOSTICS, type EmptyRegisteredDeps, type ExecutionFailure, type ExecutionResult, type HasWidgetCapability, type InvalidWidgetSystemBlueprint, type JsonArray, type JsonCompatibilityDiagnostic, type JsonCompatibilityReason, type JsonObject, type JsonPrimitive, type JsonValue, type MaybeOptional, type MethodInvokeDepExpression, type NonEmptyReadonlyArray, type OptionalizableDependencyTarget, type PropertyGetDepExpression, type ReentrantApplyFailure, type RegisteredDeps, type RelativePluginStructureDiagnosticInput, type RelativeSlotStructureDiagnosticInput, type RelativeStructureDiagnosticLocation, type RelativeSystemStructureDiagnosticInput, type RelativeValueDiagnosticInput, type ResolvedBlueprintWidgetNode, type ResolvedBlueprintWidgetNodeFor, type ResolvedBlueprintWidgetNodeView, type ResolvedBlueprintWidgetNodeViewFor, type RuntimeDependencyTargetFailedDiagnostic, type RuntimeDependencyValueRejectedDiagnostic, type RuntimeDiagnostic, type RuntimeDiagnosticLocation, type RuntimeLevelDiagnostic, type RuntimeLevelDiagnosticLocation, type RuntimeMethod, type RuntimeMethodArgsDiagnostic, type RuntimeMethodDependencyDiagnostic, type RuntimeMethodDiagnostic, type RuntimeMethodResultDiagnostic, type RuntimeMethodSurface, type RuntimeProperty, type RuntimePropertyDependencyDiagnostic, type RuntimePropertyDiagnostic, type RuntimePropertyResultDiagnostic, type RuntimePropertySurface, type RuntimeState, type RuntimeStateDiagnostic, type RuntimeStateSurface, type RuntimeWidget, type RuntimeWidgetDiagnostic, type RuntimeWidgetFor, type SelfBlueprintWidgetNode, type SelfBlueprintWidgetNodeView, type SelfDependencyTarget, type SelfMethodDependencyOperations, type SelfPropertyDependencyOperations, type SelfStateDependencyOperations, type SeparatedSourceLocation, type SeparatedWidgetData, type SeparatedWidgetSource, type SeparatedWidgetSourceDiagnostic, type SeparatedWidgetSourceDiagnosticCode, type SeparatedWidgetSourceNormalization, type SeparatedWidgetStructure, type SourceAccessDiagnostic, type SourcePatch, type SourcePatchOperation, type SourcePatchOperationFailure, type SourcePatchOperationFailureCode, type SourcePath, type StateGetDepExpression, type StateSetDepExpression, type ToExecutedDep, type ToExecutedDeps, type UnknownTargetDependencyOperations, type UnknownTargetStateDependencyOperations, type UnresolvedBlueprintWidgetNode, type ValidBlueprintView, type ValidWidgetSystemBlueprint, type WidgetCapabilityOf, type WidgetCatalog, type WidgetCatalogEntry, type WidgetConfigDefinition, type WidgetConfigValidateContext, type WidgetDocument, type WidgetDocumentSnapshot, type WidgetId, type WidgetInterfaces, type WidgetInterfacesOf, type WidgetInterfacesViolation, type WidgetInterfacesViolationOf, type WidgetLocation, type WidgetLocationView, type WidgetMemberKey, type WidgetMemberKeysOf, type WidgetMemberValueOf, type WidgetMethodArgsOf, type WidgetMethodDefinition, type WidgetMethodExecuteContext, type WidgetMethodKeyOf, type WidgetMethodOf, type WidgetMethodReturnOf, type WidgetMethodValidateArgsContext, type WidgetMethodsOf, type WidgetMethodsSection, type WidgetPlugin, type WidgetPluginCapabilities, type WidgetPluginConfigPhase, type WidgetPluginDescriptionPhase, type WidgetPluginDonePhase, type WidgetPluginInterfacesPhase, type WidgetPluginMethodsPhase, type WidgetPluginOf, type WidgetPluginPropertiesPhase, type WidgetPluginSlotsPhase, type WidgetPluginStatePhase, type WidgetPluginTypeOf, type WidgetPluginValidateStructure, type WidgetPluginValidateStructureContext, type WidgetPropertiesOf, type WidgetPropertiesSection, type WidgetPropertyComputeContext, type WidgetPropertyDefinition, type WidgetPropertyKeyOf, type WidgetPropertyValueOf, type WidgetRawConfigOf, type WidgetRegisterDepsContext, type WidgetResolvedConfigContext, type WidgetResolvedConfigOf, type WidgetSlotDefinition, type WidgetSlotDefinitions, type WidgetSlotNameOf, type WidgetSlotValidateStructureContext, type WidgetSource, type WidgetSourceFor, type WidgetStateDefaultContext, type WidgetStateKeyOf, type WidgetStateMemberDefinition, type WidgetStateOf, type WidgetStateSection, type WidgetStateValidateContext, type WidgetStateValueOf, type WidgetSystem, type WidgetSystemBlueprint, type WidgetSystemBlueprintStatus, type WidgetSystemRuntime, type WidgetSystemRuntimeDiagnostic, WidgetSystemRuntimeDisposedError, type WidgetSystemValidateStructure, type WidgetSystemValidateStructureContext, createWidgetDocument, createWidgetPlugin, createWidgetSystem, normalizeSeparatedWidgetSource, separateWidgetSource };
|
|
149
|
+
export { type AnyDepExpression, type AnyWidgetPlugin, type AnyWidgetPluginTuple, type ApplyPatchFailure, type ApplyPatchOptions, type ApplyPatchResult, type BlueprintCompileView, type BlueprintConfigDiagnostic, type BlueprintDefinitionDiagnostic, type BlueprintDependencyDiagnostic, type BlueprintDependencyDiagnosticLocation, type BlueprintDependencyOperation, type BlueprintDependencyReference, type BlueprintDependencyTarget, type BlueprintDiagnostic, type BlueprintDiagnosticLocation, type BlueprintMethodDiagnosticLocation, type BlueprintNodeConfigFields, type BlueprintNodeDiagnostic, type BlueprintNodeDiagnosticLocation, type BlueprintPropertyDiagnosticLocation, type BlueprintSemanticSlots, type BlueprintSemanticSlotsView, type BlueprintSlotChildDiagnosticLocation, type BlueprintSlotDiagnosticLocation, type BlueprintSourceDiagnostic, type BlueprintSourceDiagnosticLocation, type BlueprintStructureDiagnostic, type BlueprintStructureDiagnosticLocation, type BlueprintWidgetDiagnosticLocation, type BlueprintWidgetNode, type BlueprintWidgetNodeBase, type BlueprintWidgetNodeView, type CreateWidgetDocumentOptions, type CreateWidgetSystemOptions, type CreateWidgetSystemRuntimeOptions, type DependencyBuilder, type DependencyConsumer, type Diagnostic, type DiagnosticBase, type DiagnosticCollector, type DiagnosticPath, type DocumentRevisionConflictFailure, EMPTY_DIAGNOSTICS, type EmptyRegisteredDeps, type ExecutionFailure, type ExecutionResult, type HasWidgetCapability, type InvalidWidgetSystemBlueprint, type JsonArray, type JsonCompatibilityDiagnostic, type JsonCompatibilityReason, type JsonObject, type JsonPrimitive, type JsonValue, type MaybeOptional, type MethodInvokeDepExpression, type NonEmptyReadonlyArray, type OptionalizableDependencyTarget, type PropertyGetDepExpression, type ReentrantApplyFailure, type RegisteredDeps, type RelativePluginStructureDiagnosticInput, type RelativeSlotStructureDiagnosticInput, type RelativeStructureDiagnosticLocation, type RelativeSystemStructureDiagnosticInput, type RelativeValueDiagnosticInput, type ResolvedBlueprintWidgetNode, type ResolvedBlueprintWidgetNodeFor, type ResolvedBlueprintWidgetNodeView, type ResolvedBlueprintWidgetNodeViewFor, type RuntimeDependencyTargetFailedDiagnostic, type RuntimeDependencyValueRejectedDiagnostic, type RuntimeDiagnostic, type RuntimeDiagnosticLocation, type RuntimeEvent, type RuntimeEventSurface, type RuntimeLevelDiagnostic, type RuntimeLevelDiagnosticLocation, type RuntimeMethod, type RuntimeMethodArgsDiagnostic, type RuntimeMethodDependencyDiagnostic, type RuntimeMethodDiagnostic, type RuntimeMethodResultDiagnostic, type RuntimeMethodSurface, type RuntimeProperty, type RuntimePropertyDependencyDiagnostic, type RuntimePropertyDiagnostic, type RuntimePropertyResultDiagnostic, type RuntimePropertySurface, type RuntimeState, type RuntimeStateDiagnostic, type RuntimeStateSurface, type RuntimeWidget, type RuntimeWidgetDiagnostic, type RuntimeWidgetFor, type SelfBlueprintWidgetNode, type SelfBlueprintWidgetNodeView, type SelfDependencyTarget, type SelfMethodDependencyOperations, type SelfPropertyDependencyOperations, type SelfStateDependencyOperations, type SeparatedSourceLocation, type SeparatedWidgetData, type SeparatedWidgetSource, type SeparatedWidgetSourceDiagnostic, type SeparatedWidgetSourceDiagnosticCode, type SeparatedWidgetSourceNormalization, type SeparatedWidgetStructure, type SourceAccessDiagnostic, type SourcePatch, type SourcePatchOperation, type SourcePatchOperationFailure, type SourcePatchOperationFailureCode, type SourcePath, type StateGetDepExpression, type StateSetDepExpression, type ToExecutedDep, type ToExecutedDeps, type UnknownTargetDependencyOperations, type UnknownTargetStateDependencyOperations, type UnresolvedBlueprintWidgetNode, type ValidBlueprintView, type ValidWidgetSystemBlueprint, WIDGET_CONFIG_JSON_SCHEMA_DIALECT, type WidgetCapabilityOf, type WidgetCatalog, type WidgetCatalogEntry, type WidgetConfigDefinition, type WidgetConfigJsonSchema, type WidgetConfigValidateContext, type WidgetDocument, type WidgetDocumentSnapshot, type WidgetEventArgsOf, type WidgetEventDefinition, type WidgetEventEmitter, type WidgetEventEmitterContext, type WidgetEventKeyOf, type WidgetEventsOf, type WidgetEventsSection, type WidgetId, type WidgetInterfaces, type WidgetInterfacesOf, type WidgetInterfacesViolation, type WidgetInterfacesViolationOf, type WidgetLocation, type WidgetLocationView, type WidgetMemberKey, type WidgetMemberKeysOf, type WidgetMemberValueOf, type WidgetMethodArgsOf, type WidgetMethodDefinition, type WidgetMethodExecuteContext, type WidgetMethodKeyOf, type WidgetMethodOf, type WidgetMethodReturnOf, type WidgetMethodValidateArgsContext, type WidgetMethodsOf, type WidgetMethodsSection, type WidgetPlugin, type WidgetPluginCapabilities, type WidgetPluginConfigMetadata, type WidgetPluginConfigPhase, type WidgetPluginDescriptionPhase, type WidgetPluginDonePhase, type WidgetPluginEventsPhase, type WidgetPluginInterfacesPhase, type WidgetPluginMethodsPhase, type WidgetPluginOf, type WidgetPluginPropertiesPhase, type WidgetPluginSlotsPhase, type WidgetPluginStatePhase, type WidgetPluginTypeOf, type WidgetPluginValidateStructure, type WidgetPluginValidateStructureContext, type WidgetPropertiesOf, type WidgetPropertiesSection, type WidgetPropertyComputeContext, type WidgetPropertyDefinition, type WidgetPropertyKeyOf, type WidgetPropertyValueOf, type WidgetRawConfigOf, type WidgetRegisterDepsContext, type WidgetResolvedConfigContext, type WidgetResolvedConfigOf, type WidgetSlotDefinition, type WidgetSlotDefinitions, type WidgetSlotNameOf, type WidgetSlotValidateStructureContext, type WidgetSource, type WidgetSourceFor, type WidgetStateDefaultContext, type WidgetStateKeyOf, type WidgetStateMemberDefinition, type WidgetStateOf, type WidgetStateSection, type WidgetStateValidateContext, type WidgetStateValueOf, type WidgetSystem, type WidgetSystemBlueprint, type WidgetSystemBlueprintStatus, type WidgetSystemRuntime, type WidgetSystemRuntimeDiagnostic, WidgetSystemRuntimeDisposedError, type WidgetSystemValidateStructure, type WidgetSystemValidateStructureContext, type WidgetValueContract, createWidgetDocument, createWidgetPlugin, createWidgetSystem, createWidgetValueContract, normalizeSeparatedWidgetSource, separateWidgetSource };
|