foldkit 0.158.2 → 0.159.0-canary.4e90e99d9ad3
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 +2 -2
- package/dist/customElement/index.d.ts +15 -8
- package/dist/customElement/index.d.ts.map +1 -1
- package/dist/customElement/index.js +28 -5
- package/dist/customElement/public.d.ts +1 -1
- package/dist/customElement/public.d.ts.map +1 -1
- package/dist/dom/dom.d.ts +7 -4
- package/dist/dom/dom.d.ts.map +1 -1
- package/dist/dom/dom.js +8 -5
- package/dist/experimental/server/fetch.d.ts +42 -0
- package/dist/experimental/server/fetch.d.ts.map +1 -0
- package/dist/experimental/server/fetch.js +75 -0
- package/dist/experimental/server/index.d.ts +1 -0
- package/dist/experimental/server/index.d.ts.map +1 -1
- package/dist/experimental/server/index.js +1 -0
- package/dist/experimental/server/public.d.ts +2 -2
- package/dist/experimental/server/public.d.ts.map +1 -1
- package/dist/experimental/server/public.js +1 -1
- package/dist/experimental/server/server.d.ts +3 -2
- package/dist/experimental/server/server.d.ts.map +1 -1
- package/dist/experimental/server/template.js +4 -4
- package/dist/html/index.d.ts +42 -3
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +147 -10
- package/dist/hydrationMarker.d.ts +2 -2
- package/dist/hydrationMarker.d.ts.map +1 -1
- package/dist/hydrationMarker.js +2 -2
- package/dist/runtime/devToolsConfig.d.ts +3 -3
- package/dist/runtime/devToolsConfig.d.ts.map +1 -1
- package/dist/runtime/devToolsConfig.js +3 -3
- package/dist/runtime/hydrationHandoff.d.ts +5 -4
- package/dist/runtime/hydrationHandoff.d.ts.map +1 -1
- package/dist/runtime/hydrationHandoff.js +14 -13
- package/dist/runtime/{hmrProtocol.d.ts → modelPreservation.d.ts} +3 -3
- package/dist/runtime/modelPreservation.d.ts.map +1 -0
- package/dist/runtime/{hmrProtocol.js → modelPreservation.js} +2 -2
- package/dist/runtime/modelPreservationBridge.d.ts +4 -0
- package/dist/runtime/modelPreservationBridge.d.ts.map +1 -0
- package/dist/runtime/{hmrModelBridge.js → modelPreservationBridge.js} +7 -7
- package/dist/runtime/modelPreservationPublic.d.ts +2 -0
- package/dist/runtime/modelPreservationPublic.d.ts.map +1 -0
- package/dist/runtime/{hmrProtocolPublic.js → modelPreservationPublic.js} +1 -1
- package/dist/runtime/preserveScheduler.d.ts +1 -1
- package/dist/runtime/runtime.d.ts +8 -7
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +16 -16
- package/dist/runtime/{hmrScroll.d.ts → scrollPreservation.d.ts} +1 -1
- package/dist/runtime/scrollPreservation.d.ts.map +1 -0
- package/dist/runtime/{hmrScroll.js → scrollPreservation.js} +3 -3
- package/dist/runtime/slowPhase.d.ts +2 -1
- package/dist/runtime/slowPhase.d.ts.map +1 -1
- package/dist/runtime/start.d.ts +10 -7
- package/dist/runtime/start.d.ts.map +1 -1
- package/dist/runtime/start.js +21 -9
- package/dist/runtime/visibility.d.ts +2 -2
- package/dist/runtime/visibility.d.ts.map +1 -1
- package/dist/runtime/visibility.js +2 -2
- package/dist/schema/index.d.ts +42 -12
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +12 -10
- package/dist/test/apps/contentEditableEditor.d.ts +32 -0
- package/dist/test/apps/contentEditableEditor.d.ts.map +1 -0
- package/dist/test/apps/contentEditableEditor.js +39 -0
- package/dist/test/apps/fileUpload.d.ts.map +1 -1
- package/dist/test/apps/fileUpload.js +2 -1
- package/dist/test/apps/formChild.js +1 -1
- package/dist/test/apps/keypressSelf.d.ts +26 -0
- package/dist/test/apps/keypressSelf.d.ts.map +1 -0
- package/dist/test/apps/keypressSelf.js +30 -0
- package/dist/test/apps/pointer.d.ts.map +1 -1
- package/dist/test/apps/pointer.js +10 -11
- package/dist/test/scene.d.ts +28 -6
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +38 -13
- package/dist/vdom.js +5 -5
- package/package.json +4 -4
- package/dist/runtime/hmrModelBridge.d.ts +0 -4
- package/dist/runtime/hmrModelBridge.d.ts.map +0 -1
- package/dist/runtime/hmrProtocol.d.ts.map +0 -1
- package/dist/runtime/hmrProtocolPublic.d.ts +0 -2
- package/dist/runtime/hmrProtocolPublic.d.ts.map +0 -1
- package/dist/runtime/hmrScroll.d.ts.map +0 -1
package/dist/runtime/start.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Effect, Fiber, Function, Option, Predicate, Runtime, pipe, } from 'effect';
|
|
1
|
+
import { Cause, Effect, Fiber, Function, Option, Predicate, Runtime, pipe, } from 'effect';
|
|
2
2
|
import { provideBrowserScheduler } from './browserScheduler.js';
|
|
3
|
-
import { resolveHmrModel } from './hmrModelBridge.js';
|
|
4
3
|
import { buildPortHandles, makeHostConnector, } from './hostConnector.js';
|
|
4
|
+
import { resolvePreservedModel } from './modelPreservationBridge.js';
|
|
5
5
|
import { runtimeInternals } from './runtime.js';
|
|
6
6
|
/** Starts a program Effect with explicit boot inputs for runtime tests.
|
|
7
7
|
* @internal */
|
|
8
|
-
export const __startProgram = (program,
|
|
8
|
+
export const __startProgram = (program, preservedModel, bootMode, flags, buildId) => {
|
|
9
9
|
const internals = runtimeInternals.get(program);
|
|
10
10
|
if (Predicate.isUndefined(internals)) {
|
|
11
11
|
return Effect.die(new Error('[foldkit] Runtime boot expects a program created by ' +
|
|
@@ -15,7 +15,7 @@ export const __startProgram = (program, hmrModel, bootMode, flags, buildId) => {
|
|
|
15
15
|
return Effect.die(new Error('[foldkit] Runtime.hydrate expects a program created by ' +
|
|
16
16
|
'makeApplication.'));
|
|
17
17
|
}
|
|
18
|
-
return internals.startWith(Option.none(),
|
|
18
|
+
return internals.startWith(Option.none(), preservedModel, bootMode, flags, buildId);
|
|
19
19
|
};
|
|
20
20
|
// NOTE: deliberately not `BrowserRuntime.runMain`, which interrupts the
|
|
21
21
|
// runtime on `beforeunload`. `beforeunload` is a question, not a commitment:
|
|
@@ -25,11 +25,23 @@ export const __startProgram = (program, hmrModel, bootMode, flags, buildId) => {
|
|
|
25
25
|
// put the container element back empty, so the page is left alive with no app
|
|
26
26
|
// in it. A page-owning runtime gains nothing from tearing itself down while
|
|
27
27
|
// the document is on its way out, so it starts with no page-lifecycle
|
|
28
|
-
// interrupt at all and lets the document take the runtime with it.
|
|
29
|
-
//
|
|
28
|
+
// interrupt at all and lets the document take the runtime with it. The
|
|
29
|
+
// keep-alive interval still comes from `makeRunMain`; Foldkit owns the shared
|
|
30
|
+
// error-reporting policy used by page-owning and embedded runtimes below.
|
|
30
31
|
const runMainWithoutUnloadInterrupt = Runtime.makeRunMain(Function.constVoid);
|
|
32
|
+
/** Reports unhandled non-interrupt Causes using Effect's runtime policy.
|
|
33
|
+
* @internal */
|
|
34
|
+
export const __reportUnhandledCause = (cause) => {
|
|
35
|
+
if (Cause.hasInterruptsOnly(cause)) {
|
|
36
|
+
return Effect.void;
|
|
37
|
+
}
|
|
38
|
+
return Runtime.getErrorReported(Cause.squash(cause))
|
|
39
|
+
? Effect.logError(cause)
|
|
40
|
+
: Effect.void;
|
|
41
|
+
};
|
|
42
|
+
const withUnhandledCauseReporting = (effect) => Effect.tapCause(effect, __reportUnhandledCause);
|
|
31
43
|
const startProgram = (program, bootMode, flags, buildId) => {
|
|
32
|
-
runMainWithoutUnloadInterrupt(provideBrowserScheduler(Effect.flatMap(
|
|
44
|
+
runMainWithoutUnloadInterrupt(withUnhandledCauseReporting(provideBrowserScheduler(Effect.flatMap(resolvePreservedModel(program.runtimeId), preservedModel => __startProgram(program, preservedModel, bootMode, flags, buildId)))), { disableErrorReporting: true });
|
|
33
45
|
};
|
|
34
46
|
export function run(program, options) {
|
|
35
47
|
startProgram(program, 'Fresh', options?.flags);
|
|
@@ -81,8 +93,8 @@ export function embed(program, options) {
|
|
|
81
93
|
const startEffect = pipe(Option.match(internals.maybeActiveFiber, {
|
|
82
94
|
onNone: () => Effect.void,
|
|
83
95
|
onSome: previousFiber => Effect.asVoid(Fiber.await(previousFiber)),
|
|
84
|
-
}), Effect.andThen(
|
|
85
|
-
const fiber = Effect.runFork(provideBrowserScheduler(startEffect));
|
|
96
|
+
}), Effect.andThen(resolvePreservedModel(program.runtimeId)), Effect.flatMap(preservedModel => internals.startWith(Option.some(connector), preservedModel, 'Fresh', options?.flags)));
|
|
97
|
+
const fiber = Effect.runFork(withUnhandledCauseReporting(provideBrowserScheduler(startEffect)));
|
|
86
98
|
internals.maybeActiveFiber = Option.some(fiber);
|
|
87
99
|
let isHandleDisposed = false;
|
|
88
100
|
const dispose = () => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export type Visibility = 'Development' | 'Always';
|
|
3
3
|
/** Whether a feature configured with `show` is enabled. `'Always'` enables it
|
|
4
4
|
* everywhere. `'Development'` enables it only when `isDevelopment` is true.
|
|
5
|
-
* Callers pass whether Vite
|
|
6
|
-
* top-level window. */
|
|
5
|
+
* Callers pass whether Vite's dev server is active, and DevTools also requires
|
|
6
|
+
* a top-level window. */
|
|
7
7
|
export declare const isVisible: (show: Visibility, isDevelopment: boolean) => boolean;
|
|
8
8
|
//# sourceMappingURL=visibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../src/runtime/visibility.ts"],"names":[],"mappings":"AAEA,wCAAwC;AACxC,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAA;AAEjD;;;
|
|
1
|
+
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../src/runtime/visibility.ts"],"names":[],"mappings":"AAEA,wCAAwC;AACxC,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAA;AAEjD;;;0BAG0B;AAC1B,eAAO,MAAM,SAAS,SAAU,UAAU,iBAAiB,OAAO,KAAG,OAKlE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Match } from 'effect';
|
|
2
2
|
/** Whether a feature configured with `show` is enabled. `'Always'` enables it
|
|
3
3
|
* everywhere. `'Development'` enables it only when `isDevelopment` is true.
|
|
4
|
-
* Callers pass whether Vite
|
|
5
|
-
* top-level window. */
|
|
4
|
+
* Callers pass whether Vite's dev server is active, and DevTools also requires
|
|
5
|
+
* a top-level window. */
|
|
6
6
|
export const isVisible = (show, isDevelopment) => Match.value(show).pipe(Match.when('Always', () => true), Match.when('Development', () => isDevelopment), Match.exhaustive);
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -20,10 +20,35 @@ type TaggedUnionMatchCases<CasesByTag extends Record<string, Schema.Struct.Field
|
|
|
20
20
|
readonly _tag: Tag;
|
|
21
21
|
}>) => Output;
|
|
22
22
|
};
|
|
23
|
+
type TaggedUnionMatchOrElseCases<CasesByTag extends Record<string, Schema.Struct.Fields>, Input extends TaggedUnionType<CasesByTag>, Output> = {
|
|
24
|
+
readonly [Tag in keyof CasesByTag & string]?: (value: Extract<Input, {
|
|
25
|
+
readonly _tag: Tag;
|
|
26
|
+
}>) => Output;
|
|
27
|
+
};
|
|
28
|
+
type TaggedUnionMatchOrElseCaseReturns<Cases> = {
|
|
29
|
+
[Tag in keyof Cases]-?: NonNullable<Cases[Tag]> extends (...args: never) => infer Output ? Output : never;
|
|
30
|
+
}[keyof Cases];
|
|
31
|
+
type TaggedUnionMatchOrElseOutput<Cases, OrElse> = TaggedUnionMatchOrElseCaseReturns<Cases> | (OrElse extends (...args: never) => infer Output ? Output : never);
|
|
32
|
+
type TaggedUnionMatchOrElseHandledTags<CasesByTag extends Record<string, Schema.Struct.Fields>, Cases> = Extract<{
|
|
33
|
+
[Tag in keyof Cases]-?: {} extends Pick<Cases, Tag> ? never : Tag;
|
|
34
|
+
}[keyof Cases], keyof CasesByTag & string>;
|
|
35
|
+
type ValidateMatchOrElseCases<CasesByTag extends Record<string, Schema.Struct.Fields>, Cases> = {
|
|
36
|
+
readonly [Tag in Exclude<keyof Cases, keyof CasesByTag & string>]: never;
|
|
37
|
+
};
|
|
23
38
|
type TaggedUnionMatch<CasesByTag extends Record<string, Schema.Struct.Fields>> = {
|
|
24
39
|
<Output, Input extends TaggedUnionType<CasesByTag> = TaggedUnionType<CasesByTag>>(cases: TaggedUnionMatchCases<CasesByTag, Input, Output>): (value: Input) => Output;
|
|
25
40
|
<Output, Input extends TaggedUnionType<CasesByTag> = TaggedUnionType<CasesByTag>>(value: Input, cases: TaggedUnionMatchCases<CasesByTag, Input, Output>): Output;
|
|
26
41
|
};
|
|
42
|
+
type TaggedUnionMatchOrElse<CasesByTag extends Record<string, Schema.Struct.Fields>> = {
|
|
43
|
+
<Input extends TaggedUnionType<CasesByTag>, const Cases extends TaggedUnionMatchOrElseCases<CasesByTag, Input, unknown>, OrElse extends (value: Exclude<Input, {
|
|
44
|
+
readonly _tag: TaggedUnionMatchOrElseHandledTags<CasesByTag, Cases>;
|
|
45
|
+
}>) => unknown>(value: Input, cases: Cases & ValidateMatchOrElseCases<CasesByTag, Cases>, orElse: OrElse): TaggedUnionMatchOrElseOutput<Cases, OrElse>;
|
|
46
|
+
<const Cases extends TaggedUnionMatchOrElseCases<CasesByTag, TaggedUnionType<CasesByTag>, unknown>, OrElse extends (value: Exclude<TaggedUnionType<CasesByTag>, {
|
|
47
|
+
readonly _tag: TaggedUnionMatchOrElseHandledTags<CasesByTag, Cases>;
|
|
48
|
+
}>) => unknown>(cases: Cases & ValidateMatchOrElseCases<CasesByTag, Cases>, orElse: OrElse): (value: TaggedUnionType<CasesByTag>) => TaggedUnionMatchOrElseOutput<Cases, OrElse>;
|
|
49
|
+
<Output, Input extends TaggedUnionType<CasesByTag> = TaggedUnionType<CasesByTag>>(cases: TaggedUnionMatchOrElseCases<CasesByTag, Input, Output>, orElse: (value: Input) => Output): (value: Input) => Output;
|
|
50
|
+
<Output, Input extends TaggedUnionType<CasesByTag> = TaggedUnionType<CasesByTag>>(value: Input, cases: TaggedUnionMatchOrElseCases<CasesByTag, Input, Output>, orElse: (value: Input) => Output): Output;
|
|
51
|
+
};
|
|
27
52
|
interface UnionSchema<CasesByTag extends Record<string, Schema.Struct.Fields>> extends Schema.BottomLazy<BaseTaggedUnion<CasesByTag>['ast'], UnionSchema<CasesByTag>> {
|
|
28
53
|
readonly Type: BaseTaggedUnion<CasesByTag>['Type'];
|
|
29
54
|
readonly Encoded: BaseTaggedUnion<CasesByTag>['Encoded'];
|
|
@@ -44,13 +69,16 @@ type TaggedUnionSubsetMembers<CasesByTag extends Record<string, Schema.Struct.Fi
|
|
|
44
69
|
interface RichUnionSchema<CasesByTag extends Record<string, Schema.Struct.Fields>> extends UnionSchema<CasesByTag> {
|
|
45
70
|
readonly guards: BaseTaggedUnion<CasesByTag>['guards'];
|
|
46
71
|
readonly isAnyOf: BaseTaggedUnion<CasesByTag>['isAnyOf'];
|
|
72
|
+
readonly matchOrElse: TaggedUnionMatchOrElse<CasesByTag>;
|
|
47
73
|
readonly members: ReadonlyArray<TaggedUnionMember<CasesByTag>>;
|
|
48
74
|
/** Returns a Schema that accepts only the named variants. */
|
|
49
75
|
readonly subset: <const Tags extends ReadonlyArray<keyof CasesByTag & string>>(tags: Tags) => Schema.Union<TaggedUnionSubsetMembers<CasesByTag, Tags>>;
|
|
50
76
|
}
|
|
51
77
|
/** The Schema returned by `defineTaggedUnion`. It includes callable variant
|
|
52
|
-
* constructors, exhaustive `match`,
|
|
53
|
-
* `members`.
|
|
78
|
+
* constructors, exhaustive `match`, partial `matchOrElse`, `guards`,
|
|
79
|
+
* `isAnyOf`, `subset`, and `members`. Pass a structurally refined union as a
|
|
80
|
+
* matcher's optional second type argument to preserve narrower payload fields
|
|
81
|
+
* in each handler. */
|
|
54
82
|
export type TaggedUnion<CasesByTag extends Record<string, Schema.Struct.Fields>> = RichUnionSchema<CasesByTag> & {
|
|
55
83
|
readonly [Tag in keyof CasesByTag & string]: CallableTaggedStruct<Tag, CasesByTag[Tag]>;
|
|
56
84
|
};
|
|
@@ -83,8 +111,8 @@ export type RouteUnion<CasesByTag extends Record<string, Schema.Struct.Fields>>
|
|
|
83
111
|
* fields.
|
|
84
112
|
*
|
|
85
113
|
* A tag cannot use a name already owned by the union, such as `make`, `match`,
|
|
86
|
-
* `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
87
|
-
* untyped calls throw an error.
|
|
114
|
+
* `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
115
|
+
* these names, and untyped calls throw an error.
|
|
88
116
|
*
|
|
89
117
|
* @example
|
|
90
118
|
* ```typescript
|
|
@@ -108,6 +136,7 @@ export declare function defineMessageUnion<const CasesByTag extends Record<strin
|
|
|
108
136
|
*
|
|
109
137
|
* - One callable Schema constructor per variant.
|
|
110
138
|
* - `match` for exhaustive handling.
|
|
139
|
+
* - `matchOrElse` for selected variants with a fallback for the rest.
|
|
111
140
|
* - `guards` and `isAnyOf` for variant checks.
|
|
112
141
|
* - `subset` for a Schema that accepts only the named variants.
|
|
113
142
|
* - `members` for APIs such as `Machine.define` that enumerate the union.
|
|
@@ -116,8 +145,8 @@ export declare function defineMessageUnion<const CasesByTag extends Record<strin
|
|
|
116
145
|
* unions and standalone tagged structs are the common cases.
|
|
117
146
|
*
|
|
118
147
|
* A tag cannot use a name already owned by the union, such as `make`, `match`,
|
|
119
|
-
* `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
120
|
-
* untyped calls throw an error.
|
|
148
|
+
* `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
149
|
+
* these names, and untyped calls throw an error.
|
|
121
150
|
*
|
|
122
151
|
* @example
|
|
123
152
|
* ```typescript
|
|
@@ -143,17 +172,18 @@ export declare function defineTaggedUnion<const CasesByTag extends Record<string
|
|
|
143
172
|
* `parseUrlWithFallback`, while `AppRoute.Person({ personId: 42 })` constructs
|
|
144
173
|
* a value.
|
|
145
174
|
*
|
|
146
|
-
* Use `match` to handle every Route, `
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* not change an
|
|
175
|
+
* Use `match` to handle every Route, `matchOrElse` to handle selected Routes
|
|
176
|
+
* with a fallback, `guards` or `isAnyOf` to check selected tags, and `subset`
|
|
177
|
+
* when another Schema accepts only some Routes. A subset includes only the
|
|
178
|
+
* tags named in the call. Adding a Route to `AppRoute` does not change an
|
|
179
|
+
* existing subset.
|
|
150
180
|
*
|
|
151
181
|
* Routers remain separate. A Route is the parsed value; a Router describes the
|
|
152
182
|
* URL that produces it.
|
|
153
183
|
*
|
|
154
184
|
* A tag cannot use a name already owned by the union, such as `make`, `match`,
|
|
155
|
-
* `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
156
|
-
* untyped calls throw an error.
|
|
185
|
+
* `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
186
|
+
* these names, and untyped calls throw an error.
|
|
157
187
|
*
|
|
158
188
|
* @example
|
|
159
189
|
* ```typescript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAa,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE/D,qIAAqI;AACrI,MAAM,MAAM,oBAAoB,CAC9B,GAAG,SAAS,MAAM,EAClB,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,IACjC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,GAClC,CAAC,MAAM,MAAM,SAAS,KAAK,GACvB,CACE,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,KACnE,KAAK,CAAC,QAAQ,CACjB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,GAAG,MAAM,CAAC,CAChE,GACD,CACE,KAAK,EAAE,UAAU,CAAC,MA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EAE7D,UAAU,EAAE,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACxD,WAAW,CAAC,UAAU,CAAC,CAEzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAE7D,UAAU,EAAE,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,GACxD,UAAU,CAAC,UAAU,CAAC,CAExB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,GAAG,SAAS,MAAM,EAC7C,GAAG,EAAE,GAAG,GACP,oBAAoB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AAChC,wBAAgB,YAAY,CAC1B,GAAG,SAAS,MAAM,EAClB,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EACnC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA"}
|
package/dist/schema/index.js
CHANGED
|
@@ -176,8 +176,8 @@ const defineUnion = (variantLabel, casesByTag) => {
|
|
|
176
176
|
* fields.
|
|
177
177
|
*
|
|
178
178
|
* A tag cannot use a name already owned by the union, such as `make`, `match`,
|
|
179
|
-
* `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
180
|
-
* untyped calls throw an error.
|
|
179
|
+
* `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
180
|
+
* these names, and untyped calls throw an error.
|
|
181
181
|
*
|
|
182
182
|
* @example
|
|
183
183
|
* ```typescript
|
|
@@ -203,6 +203,7 @@ export function defineMessageUnion(casesByTag) {
|
|
|
203
203
|
*
|
|
204
204
|
* - One callable Schema constructor per variant.
|
|
205
205
|
* - `match` for exhaustive handling.
|
|
206
|
+
* - `matchOrElse` for selected variants with a fallback for the rest.
|
|
206
207
|
* - `guards` and `isAnyOf` for variant checks.
|
|
207
208
|
* - `subset` for a Schema that accepts only the named variants.
|
|
208
209
|
* - `members` for APIs such as `Machine.define` that enumerate the union.
|
|
@@ -211,8 +212,8 @@ export function defineMessageUnion(casesByTag) {
|
|
|
211
212
|
* unions and standalone tagged structs are the common cases.
|
|
212
213
|
*
|
|
213
214
|
* A tag cannot use a name already owned by the union, such as `make`, `match`,
|
|
214
|
-
* `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
215
|
-
* untyped calls throw an error.
|
|
215
|
+
* `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
216
|
+
* these names, and untyped calls throw an error.
|
|
216
217
|
*
|
|
217
218
|
* @example
|
|
218
219
|
* ```typescript
|
|
@@ -240,17 +241,18 @@ export function defineTaggedUnion(casesByTag) {
|
|
|
240
241
|
* `parseUrlWithFallback`, while `AppRoute.Person({ personId: 42 })` constructs
|
|
241
242
|
* a value.
|
|
242
243
|
*
|
|
243
|
-
* Use `match` to handle every Route, `
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* not change an
|
|
244
|
+
* Use `match` to handle every Route, `matchOrElse` to handle selected Routes
|
|
245
|
+
* with a fallback, `guards` or `isAnyOf` to check selected tags, and `subset`
|
|
246
|
+
* when another Schema accepts only some Routes. A subset includes only the
|
|
247
|
+
* tags named in the call. Adding a Route to `AppRoute` does not change an
|
|
248
|
+
* existing subset.
|
|
247
249
|
*
|
|
248
250
|
* Routers remain separate. A Route is the parsed value; a Router describes the
|
|
249
251
|
* URL that produces it.
|
|
250
252
|
*
|
|
251
253
|
* A tag cannot use a name already owned by the union, such as `make`, `match`,
|
|
252
|
-
* `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
253
|
-
* untyped calls throw an error.
|
|
254
|
+
* `matchOrElse`, `cases`, `ast`, `members`, or `subset`. TypeScript rejects
|
|
255
|
+
* these names, and untyped calls throw an error.
|
|
254
256
|
*
|
|
255
257
|
* @example
|
|
256
258
|
* ```typescript
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import type { Html, HtmlBuilder } from '../../html/index.js';
|
|
3
|
+
import type * as Update from '../../update/index.js';
|
|
4
|
+
export declare const Model: Schema.Struct<{
|
|
5
|
+
readonly body: Schema.String;
|
|
6
|
+
}>;
|
|
7
|
+
export type Model = typeof Model.Type;
|
|
8
|
+
export declare const Message: import("../../schema/index.js").MessageUnion<{
|
|
9
|
+
readonly UpdatedBody: {
|
|
10
|
+
value: Schema.String;
|
|
11
|
+
};
|
|
12
|
+
readonly InsertedText: {
|
|
13
|
+
value: Schema.String;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
export type Message = typeof Message.Type;
|
|
17
|
+
export declare const initialModel: Model;
|
|
18
|
+
export declare const update: (model: Model, message: Message) => Readonly<{
|
|
19
|
+
model: {
|
|
20
|
+
readonly body: string;
|
|
21
|
+
};
|
|
22
|
+
commands?: Update.Commands<{
|
|
23
|
+
readonly _tag: "InsertedText";
|
|
24
|
+
readonly value: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly _tag: "UpdatedBody";
|
|
27
|
+
readonly value: string;
|
|
28
|
+
}, never>;
|
|
29
|
+
outMessage?: never;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const view: (model: Model, h: HtmlBuilder<Message>) => Html;
|
|
32
|
+
//# sourceMappingURL=contentEditableEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentEditableEditor.d.ts","sourceRoot":"","sources":["../../../src/test/apps/contentEditableEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAG5D,OAAO,KAAK,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAIpD,eAAO,MAAM,KAAK;;EAEhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,eAAO,MAAM,OAAO;;QACH,KAAK;;;QACJ,KAAK;;EACrB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIzC,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAA;AAID,eAAO,MAAM,MAAM,UAAW,KAAK,WAAW,OAAO;;;;;;;;;;;;EAQjD,CAAA;AAIJ,eAAO,MAAM,IAAI,UAAW,KAAK,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAoB5D,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Option, Schema } from 'effect';
|
|
2
|
+
import { defineMessageUnion } from '../../message/index.js';
|
|
3
|
+
import { evo } from '../../struct/index.js';
|
|
4
|
+
// MODEL
|
|
5
|
+
export const Model = Schema.Struct({
|
|
6
|
+
body: Schema.String,
|
|
7
|
+
});
|
|
8
|
+
// MESSAGE
|
|
9
|
+
export const Message = defineMessageUnion({
|
|
10
|
+
UpdatedBody: { value: Schema.String },
|
|
11
|
+
InsertedText: { value: Schema.String },
|
|
12
|
+
});
|
|
13
|
+
// INIT
|
|
14
|
+
export const initialModel = {
|
|
15
|
+
body: '',
|
|
16
|
+
};
|
|
17
|
+
// UPDATE
|
|
18
|
+
export const update = (model, message) => Message.match(message, {
|
|
19
|
+
UpdatedBody: ({ value }) => ({
|
|
20
|
+
model: evo(model, { body: () => value }),
|
|
21
|
+
}),
|
|
22
|
+
InsertedText: ({ value }) => ({
|
|
23
|
+
model: evo(model, { body: body => body + value }),
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
// VIEW
|
|
27
|
+
export const view = (model, h) => {
|
|
28
|
+
return h.div([h.Id('app')], [
|
|
29
|
+
h.div([
|
|
30
|
+
h.DataAttribute('testid', 'editor'),
|
|
31
|
+
h.Contenteditable('true'),
|
|
32
|
+
h.Role('textbox'),
|
|
33
|
+
h.OnInput(value => Message.UpdatedBody({ value })),
|
|
34
|
+
h.OnBeforeInputPreventDefault((inputType, data) => inputType === 'insertText'
|
|
35
|
+
? Option.map(data, value => Message.InsertedText({ value }))
|
|
36
|
+
: Option.none()),
|
|
37
|
+
], [model.body]),
|
|
38
|
+
]);
|
|
39
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileUpload.d.ts","sourceRoot":"","sources":["../../../src/test/apps/fileUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"fileUpload.d.ts","sourceRoot":"","sources":["../../../src/test/apps/fileUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAG5D,OAAO,KAAK,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAIpD,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;CACnC,CAAC,CAAA;AAEF,eAAO,MAAM,YAAY,EAAE,KAA6B,CAAA;AAIxD,eAAO,MAAM,OAAO;;QACD,KAAK;;EACtB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIzC,eAAO,MAAM,MAAM,UAAW,KAAK,WAAW,OAAO;;uBAfpC,aAAa,CAAC,IAAI,CAAC;;;;;;;EAoBhC,CAAA;AAIJ,eAAO,MAAM,IAAI,UAAW,KAAK,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IA4B5D,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
2
|
import { File } from '../../file/index.js';
|
|
3
3
|
import { defineMessageUnion } from '../../message/index.js';
|
|
4
|
+
import { evo } from '../../struct/index.js';
|
|
4
5
|
export const initialModel = { receivedFiles: [] };
|
|
5
6
|
// MESSAGE
|
|
6
7
|
export const Message = defineMessageUnion({
|
|
@@ -9,7 +10,7 @@ export const Message = defineMessageUnion({
|
|
|
9
10
|
// UPDATE
|
|
10
11
|
export const update = (model, message) => Message.match(message, {
|
|
11
12
|
ReceivedFiles: ({ files }) => ({
|
|
12
|
-
model:
|
|
13
|
+
model: evo(model, { receivedFiles: () => files }),
|
|
13
14
|
}),
|
|
14
15
|
});
|
|
15
16
|
// VIEW
|
|
@@ -76,7 +76,7 @@ const foldChildOutMessage = ChildOutMessage.match({
|
|
|
76
76
|
const foldChildUpdate = Update.foldChild({
|
|
77
77
|
update: childUpdate,
|
|
78
78
|
read: (model) => Option.some(model.child),
|
|
79
|
-
write: (model, nextChild) => (
|
|
79
|
+
write: (model, nextChild) => evo(model, { child: () => nextChild }),
|
|
80
80
|
toParentMessage: message => ParentMessage.GotChildMessage({ message }),
|
|
81
81
|
foldOutMessage: foldChildOutMessage,
|
|
82
82
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import type { Html, HtmlBuilder } from '../../html/index.js';
|
|
3
|
+
import type * as Update from '../../update/index.js';
|
|
4
|
+
export declare const Model: Schema.Struct<{
|
|
5
|
+
readonly lastKey: Schema.String;
|
|
6
|
+
}>;
|
|
7
|
+
export type Model = typeof Model.Type;
|
|
8
|
+
export declare const Message: import("../../schema/index.js").MessageUnion<{
|
|
9
|
+
readonly PressedSelfKey: {
|
|
10
|
+
key: Schema.String;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export type Message = typeof Message.Type;
|
|
14
|
+
export declare const initialModel: Model;
|
|
15
|
+
export declare const update: (model: Model, message: Message) => Readonly<{
|
|
16
|
+
model: {
|
|
17
|
+
readonly lastKey: string;
|
|
18
|
+
};
|
|
19
|
+
commands?: Update.Commands<{
|
|
20
|
+
readonly _tag: "PressedSelfKey";
|
|
21
|
+
readonly key: string;
|
|
22
|
+
}, never>;
|
|
23
|
+
outMessage?: never;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const view: (model: Model, h: HtmlBuilder<Message>) => Html;
|
|
26
|
+
//# sourceMappingURL=keypressSelf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keypressSelf.d.ts","sourceRoot":"","sources":["../../../src/test/apps/keypressSelf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAG5D,OAAO,KAAK,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAIpD,eAAO,MAAM,KAAK;;EAEhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,eAAO,MAAM,OAAO;;QACA,GAAG;;EACrB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIzC,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAA;AAID,eAAO,MAAM,MAAM,UAAW,KAAK,WAAW,OAAO;;;;;;;;;EAKjD,CAAA;AAIJ,eAAO,MAAM,IAAI,UAAW,KAAK,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAU5D,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import { defineMessageUnion } from '../../message/index.js';
|
|
3
|
+
import { evo } from '../../struct/index.js';
|
|
4
|
+
// MODEL
|
|
5
|
+
export const Model = Schema.Struct({
|
|
6
|
+
lastKey: Schema.String,
|
|
7
|
+
});
|
|
8
|
+
// MESSAGE
|
|
9
|
+
export const Message = defineMessageUnion({
|
|
10
|
+
PressedSelfKey: { key: Schema.String },
|
|
11
|
+
});
|
|
12
|
+
// INIT
|
|
13
|
+
export const initialModel = {
|
|
14
|
+
lastKey: '',
|
|
15
|
+
};
|
|
16
|
+
// UPDATE
|
|
17
|
+
export const update = (model, message) => Message.match(message, {
|
|
18
|
+
PressedSelfKey: ({ key }) => ({
|
|
19
|
+
model: evo(model, { lastKey: () => key }),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
// VIEW
|
|
23
|
+
export const view = (model, h) => {
|
|
24
|
+
return h.div([
|
|
25
|
+
h.Id('key-app'),
|
|
26
|
+
h.Role('application'),
|
|
27
|
+
h.AriaLabel('Self key press area'),
|
|
28
|
+
h.OnKeyDownSelf(key => Message.PressedSelfKey({ key })),
|
|
29
|
+
], [h.span([h.AriaLabel('Last key')], [model.lastKey])]);
|
|
30
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../src/test/apps/pointer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../src/test/apps/pointer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/C,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAG5D,OAAO,KAAK,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAIpD,eAAO,MAAM,KAAK;;;;EAIhB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,QAAA,MAAM,OAAO;;QACW,WAAW;;;QACZ,WAAW;;EAChC,CAAA;AACF,KAAK,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIlC,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAA;AAID,eAAO,MAAM,MAAM,UAAW,KAAK,WAAW,OAAO;;;;;;;;;;;;;;EAcjD,CAAA;AAIJ,eAAO,MAAM,IAAI,UAAW,KAAK,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IA4B5D,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Option, Schema } from 'effect';
|
|
1
|
+
import { Number, Option, Schema } from 'effect';
|
|
2
2
|
import { defineMessageUnion } from '../../message/index.js';
|
|
3
|
+
import { evo } from '../../struct/index.js';
|
|
3
4
|
// MODEL
|
|
4
5
|
export const Model = Schema.Struct({
|
|
5
6
|
pointerDownCount: Schema.Number,
|
|
@@ -20,18 +21,16 @@ export const initialModel = {
|
|
|
20
21
|
// UPDATE
|
|
21
22
|
export const update = (model, message) => Message.match(message, {
|
|
22
23
|
PressedPointerDown: ({ pointerType }) => ({
|
|
23
|
-
model: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
24
|
+
model: evo(model, {
|
|
25
|
+
pointerDownCount: Number.increment,
|
|
26
|
+
lastPointerType: () => pointerType,
|
|
27
|
+
}),
|
|
28
28
|
}),
|
|
29
29
|
ReleasedPointerUp: ({ pointerType }) => ({
|
|
30
|
-
model: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
30
|
+
model: evo(model, {
|
|
31
|
+
pointerUpCount: Number.increment,
|
|
32
|
+
lastPointerType: () => pointerType,
|
|
33
|
+
}),
|
|
35
34
|
}),
|
|
36
35
|
});
|
|
37
36
|
// VIEW
|
package/dist/test/scene.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Option, Schema } from 'effect';
|
|
2
|
-
import type { CustomElementSpec } from '../customElement/index.js';
|
|
2
|
+
import type { CustomElementSpec, EventSchema } from '../customElement/index.js';
|
|
3
3
|
import type { File } from '../file/index.js';
|
|
4
4
|
import type { Document, Html, HtmlBuilder, KeyboardModifiers } from '../html/index.js';
|
|
5
5
|
import type { Entry as ManagedResourceEntry } from '../managedResource/index.js';
|
|
@@ -158,10 +158,11 @@ declare const failAcquireManagedResource: <EntryModel, EntryMessage, Value>(entr
|
|
|
158
158
|
declare const releaseManagedResource: <EntryModel, EntryMessage, Value>(entry: SceneManagedResourceEntry<EntryModel, EntryMessage, Value>) => <Message, OutMessage = undefined>(simulation: SceneSimulation<EntryModel, Message, OutMessage>) => SceneSimulation<EntryModel, Message, OutMessage>;
|
|
159
159
|
/** Dispatches a CustomEvent a rendered custom element declares, feeding the
|
|
160
160
|
* Message its `On*` event mapping produces through update. The event name
|
|
161
|
-
* and detail are typed by the spec's event Schemas. The
|
|
162
|
-
* the
|
|
163
|
-
*
|
|
164
|
-
|
|
161
|
+
* and detail are typed by the encoded side of the spec's event Schemas. The
|
|
162
|
+
* runtime decodes the detail before invoking the event mapping. The element
|
|
163
|
+
* must be in the rendered tree with the event's attribute attached, so the
|
|
164
|
+
* test exercises the same mapping the browser event would. */
|
|
165
|
+
declare const emitCustomElementEvent: <Events extends Record<string, EventSchema>, Name extends keyof Events & string>(spec: CustomElementSpec<string, Record<string, Schema.Top>, Events>, target: string | Locator, eventName: Name, detail: Schema.Codec.Encoded<Events[Name]>) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
165
166
|
/** Steps that operate on the pending Commands of a scene simulation.
|
|
166
167
|
* Destructure as `const { Command } = Scene` for concise call sites. */
|
|
167
168
|
export declare const Command: {
|
|
@@ -381,7 +382,28 @@ declare const type_: {
|
|
|
381
382
|
(target: string | Locator, value: string): <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
382
383
|
(value: string): (target: string | Locator) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
383
384
|
};
|
|
384
|
-
/** Simulates
|
|
385
|
+
/** Simulates typing into a contenteditable host matching the target. A
|
|
386
|
+
* contenteditable element has no `value`, so the `input` event reports the
|
|
387
|
+
* host's rendered text. Use this to drive `OnInput` on a `Contenteditable`
|
|
388
|
+
* element. Dual: `typeContentEditable(target, text)` or
|
|
389
|
+
* `typeContentEditable(text)` for data-last piping. */
|
|
390
|
+
export declare const typeContentEditable: {
|
|
391
|
+
(target: string | Locator, text: string): <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
392
|
+
(text: string): (target: string | Locator) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
393
|
+
};
|
|
394
|
+
/** Simulates a `beforeinput` event on the element matching the target. Drives
|
|
395
|
+
* `OnBeforeInput` and `OnBeforeInputPreventDefault`. Pass the edit's
|
|
396
|
+
* `inputType` (e.g. `'insertText'`, `'deleteContentBackward'`) and its `data`
|
|
397
|
+
* as an `Option` (the inserted text, or `None` for edits that carry none). Dual:
|
|
398
|
+
* `beforeInput(target, inputType, data)` or `beforeInput(inputType, data)` for
|
|
399
|
+
* data-last piping. */
|
|
400
|
+
export declare const beforeInput: {
|
|
401
|
+
(target: string | Locator, inputType: string, data: Option.Option<string>): <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
402
|
+
(inputType: string, data: Option.Option<string>): (target: string | Locator) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
403
|
+
};
|
|
404
|
+
/** Simulates a keydown event on the element matching the target. The event is
|
|
405
|
+
* self-targeted (`target === currentTarget`), so `OnKeyDownSelf` and
|
|
406
|
+
* `OnKeyDownSelfPreventDefault` handlers fire.
|
|
385
407
|
* Dual: `keydown(target, key, modifiers?)` or `keydown(key, modifiers?)` for data-last piping. */
|
|
386
408
|
export declare const keydown: {
|
|
387
409
|
(target: string | Locator, key: string): <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|