@playfast/reform 0.0.2 → 0.0.4
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/package.json +15 -13
- package/src/boundary/boundary.ts +192 -0
- package/src/calc/asyncCalc.ts +267 -0
- package/{dist/dts/calc/asyncData.d.ts → src/calc/asyncData.ts} +53 -20
- package/src/calc/calc.ts +120 -0
- package/src/calc/calcFamily.ts +194 -0
- package/src/calc/compose.ts +69 -0
- package/src/channel/channel.ts +265 -0
- package/src/compose/composition.ts +112 -0
- package/{dist/dts/compose/host.d.ts → src/compose/host.ts} +6 -8
- package/{dist/esm/compose/props.js → src/compose/props.ts} +3 -4
- package/src/compose/provide.ts +70 -0
- package/{dist/dts/compose/slot.d.ts → src/compose/slot.ts} +36 -19
- package/src/compose/ui.ts +97 -0
- package/src/definition/definition.ts +74 -0
- package/src/event/event.ts +65 -0
- package/src/event/eventGroup.ts +14 -0
- package/{dist/dts/feature/feature.d.ts → src/feature/feature.ts} +178 -92
- package/src/index.ts +140 -0
- package/{dist/dts/internal/capture.d.ts → src/internal/capture.ts} +13 -11
- package/{dist/dts/internal/ctx.d.ts → src/internal/ctx.ts} +8 -4
- package/{dist/esm/internal/errors.js → src/internal/errors.ts} +41 -26
- package/src/internal/inspect.ts +34 -0
- package/src/internal/queryDriver.ts +247 -0
- package/src/internal/reuse.ts +73 -0
- package/src/internal/scheduler.ts +91 -0
- package/{dist/dts/internal/seeds.d.ts → src/internal/seeds.ts} +6 -3
- package/src/internal/sources.ts +104 -0
- package/src/internal/store.ts +105 -0
- package/{dist/dts/internal/track.d.ts → src/internal/track.ts} +15 -11
- package/src/procedure/procedure.ts +89 -0
- package/src/reducer/reducer.ts +137 -0
- package/src/remote/remoteState.ts +571 -0
- package/{dist/cjs/runtime/bus.js → src/runtime/bus.ts} +23 -12
- package/src/runtime/loop.ts +169 -0
- package/src/scene/scene.ts +76 -0
- package/src/state/state.ts +91 -0
- package/src/state/stateFamily.ts +171 -0
- package/src/state/stateGroup.ts +78 -0
- package/{dist/dts/state/token.d.ts → src/state/token.ts} +21 -13
- package/{dist/dts/ui/node.d.ts → src/ui/node.ts} +3 -3
- package/{dist/dts/ui/trigger.d.ts → src/ui/trigger.ts} +1 -2
- package/dist/cjs/boundary/boundary.js +0 -86
- package/dist/cjs/calc/asyncCalc.js +0 -128
- package/dist/cjs/calc/asyncData.js +0 -37
- package/dist/cjs/calc/calc.js +0 -58
- package/dist/cjs/calc/calcFamily.js +0 -127
- package/dist/cjs/channel/channel.js +0 -142
- package/dist/cjs/compose/composition.js +0 -50
- package/dist/cjs/compose/host.js +0 -8
- package/dist/cjs/compose/props.js +0 -14
- package/dist/cjs/compose/provide.js +0 -30
- package/dist/cjs/compose/slot.js +0 -27
- package/dist/cjs/compose/ui.js +0 -61
- package/dist/cjs/definition/definition.js +0 -46
- package/dist/cjs/event/event.js +0 -36
- package/dist/cjs/event/eventGroup.js +0 -7
- package/dist/cjs/feature/feature.js +0 -102
- package/dist/cjs/index.js +0 -116
- package/dist/cjs/internal/capture.js +0 -14
- package/dist/cjs/internal/ctx.js +0 -2
- package/dist/cjs/internal/errors.js +0 -62
- package/dist/cjs/internal/inspect.js +0 -36
- package/dist/cjs/internal/queryDriver.js +0 -138
- package/dist/cjs/internal/reuse.js +0 -71
- package/dist/cjs/internal/scheduler.js +0 -73
- package/dist/cjs/internal/seeds.js +0 -19
- package/dist/cjs/internal/sources.js +0 -61
- package/dist/cjs/internal/store.js +0 -77
- package/dist/cjs/internal/track.js +0 -22
- package/dist/cjs/package.json +0 -4
- package/dist/cjs/procedure/procedure.js +0 -52
- package/dist/cjs/reducer/reducer.js +0 -64
- package/dist/cjs/remote/remoteState.js +0 -307
- package/dist/cjs/runtime/loop.js +0 -119
- package/dist/cjs/scene/scene.js +0 -36
- package/dist/cjs/state/state.js +0 -47
- package/dist/cjs/state/stateFamily.js +0 -101
- package/dist/cjs/state/stateGroup.js +0 -47
- package/dist/cjs/state/token.js +0 -23
- package/dist/cjs/ui/node.js +0 -2
- package/dist/cjs/ui/trigger.js +0 -2
- package/dist/dts/boundary/boundary.d.ts +0 -72
- package/dist/dts/boundary/boundary.d.ts.map +0 -1
- package/dist/dts/calc/asyncCalc.d.ts +0 -91
- package/dist/dts/calc/asyncCalc.d.ts.map +0 -1
- package/dist/dts/calc/asyncData.d.ts.map +0 -1
- package/dist/dts/calc/calc.d.ts +0 -57
- package/dist/dts/calc/calc.d.ts.map +0 -1
- package/dist/dts/calc/calcFamily.d.ts +0 -57
- package/dist/dts/calc/calcFamily.d.ts.map +0 -1
- package/dist/dts/channel/channel.d.ts +0 -115
- package/dist/dts/channel/channel.d.ts.map +0 -1
- package/dist/dts/compose/composition.d.ts +0 -72
- package/dist/dts/compose/composition.d.ts.map +0 -1
- package/dist/dts/compose/host.d.ts.map +0 -1
- package/dist/dts/compose/props.d.ts +0 -13
- package/dist/dts/compose/props.d.ts.map +0 -1
- package/dist/dts/compose/provide.d.ts +0 -22
- package/dist/dts/compose/provide.d.ts.map +0 -1
- package/dist/dts/compose/slot.d.ts.map +0 -1
- package/dist/dts/compose/ui.d.ts +0 -50
- package/dist/dts/compose/ui.d.ts.map +0 -1
- package/dist/dts/definition/definition.d.ts +0 -33
- package/dist/dts/definition/definition.d.ts.map +0 -1
- package/dist/dts/event/event.d.ts +0 -33
- package/dist/dts/event/event.d.ts.map +0 -1
- package/dist/dts/event/eventGroup.d.ts +0 -9
- package/dist/dts/event/eventGroup.d.ts.map +0 -1
- package/dist/dts/feature/feature.d.ts.map +0 -1
- package/dist/dts/index.d.ts +0 -43
- package/dist/dts/index.d.ts.map +0 -1
- package/dist/dts/internal/capture.d.ts.map +0 -1
- package/dist/dts/internal/ctx.d.ts.map +0 -1
- package/dist/dts/internal/errors.d.ts +0 -69
- package/dist/dts/internal/errors.d.ts.map +0 -1
- package/dist/dts/internal/inspect.d.ts +0 -17
- package/dist/dts/internal/inspect.d.ts.map +0 -1
- package/dist/dts/internal/queryDriver.d.ts +0 -65
- package/dist/dts/internal/queryDriver.d.ts.map +0 -1
- package/dist/dts/internal/reuse.d.ts +0 -10
- package/dist/dts/internal/reuse.d.ts.map +0 -1
- package/dist/dts/internal/scheduler.d.ts +0 -47
- package/dist/dts/internal/scheduler.d.ts.map +0 -1
- package/dist/dts/internal/seeds.d.ts.map +0 -1
- package/dist/dts/internal/sources.d.ts +0 -39
- package/dist/dts/internal/sources.d.ts.map +0 -1
- package/dist/dts/internal/store.d.ts +0 -47
- package/dist/dts/internal/store.d.ts.map +0 -1
- package/dist/dts/internal/track.d.ts.map +0 -1
- package/dist/dts/procedure/procedure.d.ts +0 -40
- package/dist/dts/procedure/procedure.d.ts.map +0 -1
- package/dist/dts/reducer/reducer.d.ts +0 -44
- package/dist/dts/reducer/reducer.d.ts.map +0 -1
- package/dist/dts/remote/remoteState.d.ts +0 -119
- package/dist/dts/remote/remoteState.d.ts.map +0 -1
- package/dist/dts/runtime/bus.d.ts +0 -27
- package/dist/dts/runtime/bus.d.ts.map +0 -1
- package/dist/dts/runtime/loop.d.ts +0 -45
- package/dist/dts/runtime/loop.d.ts.map +0 -1
- package/dist/dts/scene/scene.d.ts +0 -44
- package/dist/dts/scene/scene.d.ts.map +0 -1
- package/dist/dts/state/state.d.ts +0 -37
- package/dist/dts/state/state.d.ts.map +0 -1
- package/dist/dts/state/stateFamily.d.ts +0 -79
- package/dist/dts/state/stateFamily.d.ts.map +0 -1
- package/dist/dts/state/stateGroup.d.ts +0 -36
- package/dist/dts/state/stateGroup.d.ts.map +0 -1
- package/dist/dts/state/token.d.ts.map +0 -1
- package/dist/dts/ui/node.d.ts.map +0 -1
- package/dist/dts/ui/trigger.d.ts.map +0 -1
- package/dist/esm/boundary/boundary.js +0 -83
- package/dist/esm/boundary/boundary.js.map +0 -1
- package/dist/esm/calc/asyncCalc.js +0 -95
- package/dist/esm/calc/asyncCalc.js.map +0 -1
- package/dist/esm/calc/asyncData.js +0 -34
- package/dist/esm/calc/asyncData.js.map +0 -1
- package/dist/esm/calc/calc.js +0 -58
- package/dist/esm/calc/calc.js.map +0 -1
- package/dist/esm/calc/calcFamily.js +0 -124
- package/dist/esm/calc/calcFamily.js.map +0 -1
- package/dist/esm/channel/channel.js +0 -136
- package/dist/esm/channel/channel.js.map +0 -1
- package/dist/esm/compose/composition.js +0 -46
- package/dist/esm/compose/composition.js.map +0 -1
- package/dist/esm/compose/host.js +0 -5
- package/dist/esm/compose/host.js.map +0 -1
- package/dist/esm/compose/props.js.map +0 -1
- package/dist/esm/compose/provide.js +0 -28
- package/dist/esm/compose/provide.js.map +0 -1
- package/dist/esm/compose/slot.js +0 -23
- package/dist/esm/compose/slot.js.map +0 -1
- package/dist/esm/compose/ui.js +0 -57
- package/dist/esm/compose/ui.js.map +0 -1
- package/dist/esm/definition/definition.js +0 -42
- package/dist/esm/definition/definition.js.map +0 -1
- package/dist/esm/event/event.js +0 -30
- package/dist/esm/event/event.js.map +0 -1
- package/dist/esm/event/eventGroup.js +0 -4
- package/dist/esm/event/eventGroup.js.map +0 -1
- package/dist/esm/feature/feature.js +0 -98
- package/dist/esm/feature/feature.js.map +0 -1
- package/dist/esm/index.js +0 -45
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/internal/capture.js +0 -11
- package/dist/esm/internal/capture.js.map +0 -1
- package/dist/esm/internal/ctx.js +0 -2
- package/dist/esm/internal/ctx.js.map +0 -1
- package/dist/esm/internal/errors.js.map +0 -1
- package/dist/esm/internal/inspect.js +0 -32
- package/dist/esm/internal/inspect.js.map +0 -1
- package/dist/esm/internal/queryDriver.js +0 -134
- package/dist/esm/internal/queryDriver.js.map +0 -1
- package/dist/esm/internal/reuse.js +0 -68
- package/dist/esm/internal/reuse.js.map +0 -1
- package/dist/esm/internal/scheduler.js +0 -69
- package/dist/esm/internal/scheduler.js.map +0 -1
- package/dist/esm/internal/seeds.js +0 -17
- package/dist/esm/internal/seeds.js.map +0 -1
- package/dist/esm/internal/sources.js +0 -59
- package/dist/esm/internal/sources.js.map +0 -1
- package/dist/esm/internal/store.js +0 -73
- package/dist/esm/internal/store.js.map +0 -1
- package/dist/esm/internal/track.js +0 -18
- package/dist/esm/internal/track.js.map +0 -1
- package/dist/esm/package.json +0 -4
- package/dist/esm/procedure/procedure.js +0 -50
- package/dist/esm/procedure/procedure.js.map +0 -1
- package/dist/esm/reducer/reducer.js +0 -63
- package/dist/esm/reducer/reducer.js.map +0 -1
- package/dist/esm/remote/remoteState.js +0 -270
- package/dist/esm/remote/remoteState.js.map +0 -1
- package/dist/esm/runtime/bus.js +0 -20
- package/dist/esm/runtime/bus.js.map +0 -1
- package/dist/esm/runtime/loop.js +0 -116
- package/dist/esm/runtime/loop.js.map +0 -1
- package/dist/esm/scene/scene.js +0 -31
- package/dist/esm/scene/scene.js.map +0 -1
- package/dist/esm/state/state.js +0 -43
- package/dist/esm/state/state.js.map +0 -1
- package/dist/esm/state/stateFamily.js +0 -96
- package/dist/esm/state/stateFamily.js.map +0 -1
- package/dist/esm/state/stateGroup.js +0 -46
- package/dist/esm/state/stateGroup.js.map +0 -1
- package/dist/esm/state/token.js +0 -20
- package/dist/esm/state/token.js.map +0 -1
- package/dist/esm/ui/node.js +0 -2
- package/dist/esm/ui/node.js.map +0 -1
- package/dist/esm/ui/trigger.js +0 -2
- package/dist/esm/ui/trigger.js.map +0 -1
package/dist/dts/compose/ui.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Context, Effect } from 'effect';
|
|
2
|
-
import { type Manifest } from '../definition/definition.js';
|
|
3
|
-
import type { Trigger } from '../ui/trigger.js';
|
|
4
|
-
import { type Node, type SlotInstance, type SlotProps } from './slot.js';
|
|
5
|
-
export interface UiContract {
|
|
6
|
-
props: unknown;
|
|
7
|
-
slots?: Record<string, SlotInstance<any>>;
|
|
8
|
-
events?: Record<string, Trigger<any>>;
|
|
9
|
-
}
|
|
10
|
-
type PropsOf<C extends UiContract> = C['props'];
|
|
11
|
-
type EventsOf<C extends UiContract> = C extends {
|
|
12
|
-
events: infer E;
|
|
13
|
-
} ? E : Record<never, never>;
|
|
14
|
-
type SlotsOf<C extends UiContract> = C extends {
|
|
15
|
-
slots: infer S;
|
|
16
|
-
} ? {
|
|
17
|
-
readonly [K in keyof S]: (props: SlotProps<S[K]>) => Node;
|
|
18
|
-
} : Record<never, never>;
|
|
19
|
-
/** What the composition logic calls: props + handlers in, a node out. Slots are bound by the renderer. */
|
|
20
|
-
export type LogicView<C extends UiContract> = (props: PropsOf<C>, events?: EventsOf<C>) => Node;
|
|
21
|
-
/** What `.make` authors: the pure presentation. Slots are injected by the renderer. */
|
|
22
|
-
export type ViewImpl<C extends UiContract> = (props: PropsOf<C>, slots: SlotsOf<C>, events: EventsOf<C>) => Node;
|
|
23
|
-
/** Nominal brand identifying a UI contract at runtime (Effect's `TypeId` idiom). */
|
|
24
|
-
export declare const UiTypeId: unique symbol;
|
|
25
|
-
export type UiTypeId = typeof UiTypeId;
|
|
26
|
-
export interface UiClass<C extends UiContract> extends Effect.Effect<LogicView<C>, never, ViewImpl<C>> {
|
|
27
|
-
new (): {};
|
|
28
|
-
readonly [UiTypeId]: UiTypeId;
|
|
29
|
-
readonly manifest: Manifest & {
|
|
30
|
-
readonly kind: 'Ui';
|
|
31
|
-
};
|
|
32
|
-
/** Internal DI tag the `Ui.make` presentation is provided under. */
|
|
33
|
-
readonly impl: Context.Tag<ViewImpl<C>, ViewImpl<C>>;
|
|
34
|
-
}
|
|
35
|
-
/** Whether a value is a UI contract — discriminates a `provide` target by brand. */
|
|
36
|
-
export declare const isUi: (u: unknown) => u is UiClass<UiContract>;
|
|
37
|
-
/**
|
|
38
|
-
* A renderer-neutral UI contract. The logic resolves it (`yield* TodoAppUi`) to
|
|
39
|
-
* a `(props, events) => node` view with slots already bound; `.make` authors the
|
|
40
|
-
* presentation. Core defines the contract; `@reform/react` does the rendering.
|
|
41
|
-
*/
|
|
42
|
-
export declare const ui: (name: string) => <C extends UiContract>() => UiClass<C>;
|
|
43
|
-
/**
|
|
44
|
-
* Author the pure presentation for a contract — `Ui.make(TodoAppUi, (props,
|
|
45
|
-
* slots, events) => node)`. The contract argument fixes the view's types; wire
|
|
46
|
-
* the result with `provide(contract, view)`.
|
|
47
|
-
*/
|
|
48
|
-
export declare const make: <C extends UiContract>(_contract: UiClass<C>, view: ViewImpl<C>) => ViewImpl<C>;
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/compose/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAChD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,0BAA0B,CAAA;AAGxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAErE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;CACtC;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,CAAC,OAAO,CAAC,CAAA;AAC/C,KAAK,QAAQ,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC9F,KAAK,OAAO,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC,CAAA;CAAE,GAC7D;IAAE,QAAQ,EAA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AI,OAAO,CAAC,UAAU,CAC0B,CAAA;AAEnF;;;;GAIG;AACH,eAAO,MAAM,EAAE,GACZ,MAAM,MAAM,MACZ,CAAC,SAAS,UAAU,OAAK,OAAO,CAAC,CAAC,CAkClC,CAAA;AAEH;;;;GAIG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,UAAU,EAAE,WAAW,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,KAAG,QAAQ,CAAC,CAAC,CAC1F,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
/**
|
|
3
|
-
* The reflectable descriptor every primitive carries (principle #6). The editor
|
|
4
|
-
* and proof packages read these without running any logic.
|
|
5
|
-
*/
|
|
6
|
-
export type Kind = 'State' | 'StateGroup' | 'StateFamily' | 'Event' | 'EventGroup' | 'Reducer' | 'Calc' | 'CalcFamily' | 'AsyncCalc' | 'RemoteState' | 'Boundary' | 'Procedure' | 'Channel' | 'Composition' | 'Ui' | 'Slot' | 'Feature';
|
|
7
|
-
export interface Manifest {
|
|
8
|
-
readonly kind: Kind;
|
|
9
|
-
readonly name: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Build a class whose *static* side is itself an Effect, so `yield* TheClass`
|
|
13
|
-
* runs `read` and returns its value (the same mechanism `Context.Tag` uses).
|
|
14
|
-
* Subclasses inherit the protocol through the prototype chain, so the user's
|
|
15
|
-
* `class FeedState extends State.make(...) {}` is yieldable too.
|
|
16
|
-
*
|
|
17
|
-
* `statics` (manifest, `.live`, tag, …) are attached as own properties
|
|
18
|
-
* and likewise inherited by the subclass.
|
|
19
|
-
*/
|
|
20
|
-
export declare const yieldableClass: <A, E, R, Statics extends object>(read: Effect.Effect<A, E, R>, statics: Statics) => {
|
|
21
|
-
new (): {};
|
|
22
|
-
} & Effect.Effect<A, E, R> & Statics;
|
|
23
|
-
/**
|
|
24
|
-
* Build a *definition class*: an empty constructible carrying static marker data
|
|
25
|
-
* (manifest, tag, policy, members, …) that the editor and proof packages reflect
|
|
26
|
-
* on. Definition interfaces declare phantom, type-only fields — a composition's
|
|
27
|
-
* `Props`, a family instance's `Key` — that exist purely for inference and have
|
|
28
|
-
* no runtime value, so the assembled object cannot *structurally* satisfy the
|
|
29
|
-
* interface. The one assertion to `Class` lives here, documented, instead of a
|
|
30
|
-
* scattered `as never` / `as unknown as` at every `*.make`.
|
|
31
|
-
*/
|
|
32
|
-
export declare const definitionClass: <Class>(statics: object) => Class;
|
|
33
|
-
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/definition/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAM/B;;;GAGG;AACH,MAAM,MAAM,IAAI,GACZ,OAAO,GACP,YAAY,GACZ,aAAa,GACb,OAAO,GACP,YAAY,GACZ,SAAS,GACT,MAAM,GACN,YAAY,GACZ,WAAW,GACX,aAAa,GACb,UAAU,GACV,WAAW,GACX,SAAS,GACT,aAAa,GACb,IAAI,GACJ,MAAM,GACN,SAAS,CAAA;AAEb,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,SAAS,MAAM,EAC5D,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC5B,SAAS,OAAO,KACf;IAAE,QAAQ,EAAE,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,OAe5C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,EAAE,SAAS,MAAM,KAAG,KACyC,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Effect, type Schema } from 'effect';
|
|
2
|
-
import { type Manifest } from '../definition/definition.js';
|
|
3
|
-
import { Bus, type Tagged } from '../runtime/bus.js';
|
|
4
|
-
import type { Trigger } from '../ui/trigger.js';
|
|
5
|
-
/** The dispatched value of an event: `{ _tag, ...payload }`, matched with `Match.tags`. */
|
|
6
|
-
export type EventOf<N extends string, P> = Tagged & {
|
|
7
|
-
readonly _tag: N;
|
|
8
|
-
} & P;
|
|
9
|
-
export interface EventManifest<N extends string, P> extends Manifest {
|
|
10
|
-
readonly kind: 'Event';
|
|
11
|
-
readonly name: N;
|
|
12
|
-
readonly schema: Schema.Schema<P, any>;
|
|
13
|
-
}
|
|
14
|
-
export interface EventClass<out N extends string, in out P> {
|
|
15
|
-
new (): {};
|
|
16
|
-
readonly manifest: EventManifest<N, P>;
|
|
17
|
-
readonly tag: N;
|
|
18
|
-
/** Carrier for `Event.construct` — builds the tagged value `{ _tag, ...payload }`. */
|
|
19
|
-
readonly build: (payload: P) => EventOf<N, P>;
|
|
20
|
-
/** Carrier for `Event.trigger` — the UI callback effect (High priority). */
|
|
21
|
-
readonly trigger: Effect.Effect<Trigger<P>, never, Bus>;
|
|
22
|
-
}
|
|
23
|
-
export type AnyEvent = EventClass<string, any>;
|
|
24
|
-
export type EventType<E> = E extends EventClass<infer N, infer P> ? EventOf<N, P> : never;
|
|
25
|
-
/** A pure data fact. Events depend on nothing — only reducers tie them to state. */
|
|
26
|
-
export declare const make: <const N extends string, P>(name: N, schema: Schema.Schema<P, any>) => EventClass<N, P>;
|
|
27
|
-
/** Construct the tagged value for an event (used for `boot` events). */
|
|
28
|
-
export declare const construct: <N extends string, P>(event: EventClass<N, P>, payload: P) => EventOf<N, P>;
|
|
29
|
-
/** Dispatch as a follow-up (Normal priority) from a procedure/effect. */
|
|
30
|
-
export declare const dispatch: <N extends string, P>(event: EventClass<N, P>, payload: P) => Effect.Effect<void, never, Bus>;
|
|
31
|
-
/** A callback for the UI that dispatches at High priority via the runtime. */
|
|
32
|
-
export declare const trigger: <N extends string, P>(event: EventClass<N, P>) => Effect.Effect<Trigger<P>, never, Bus>;
|
|
33
|
-
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/event/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC7D,OAAO,EAAE,KAAK,QAAQ,EAAmB,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,GAAG,EAAW,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,2FAA2F;AAC3F,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,CAAA;AAE5E,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,CAAE,SAAQ,QAAQ;IAClE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IAChB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,QAAQ,EAAE,CAAA;IACV,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACtC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAA;IACf,sFA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KACtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAkB,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AnyEvent } from './event.js';
|
|
2
|
-
export interface EventGroupClass<Members extends ReadonlyArray<AnyEvent>> {
|
|
3
|
-
new (): {};
|
|
4
|
-
readonly kind: 'EventGroup';
|
|
5
|
-
readonly members: Members;
|
|
6
|
-
}
|
|
7
|
-
/** Compose events into a group, the same variadic shape as `StateGroup`/`RpcGroup`. */
|
|
8
|
-
export declare const make: <const Members extends ReadonlyArray<AnyEvent>>(...members: Members) => EventGroupClass<Members>;
|
|
9
|
-
//# sourceMappingURL=eventGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventGroup.d.ts","sourceRoot":"","sources":["../../../src/event/eventGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,aAAa,CAAC,QAAQ,CAAC;IACtE,QAAQ,EAAE,CAAA;IACV,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED,uFAAuF;AACvF,eAAO,MAAM,IAAI,GAAI,KAAK,CAAC,OAAO,SAAS,aAAa,CAAC,QAAQ,CAAC,EAChE,GAAG,SAAS,OAAO,KAClB,eAAe,CAAC,OAAO,CAC2D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/feature/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAA;AA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AE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC5C,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACtC,GAAG,CACA;IAGE,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;CAC/C,GACD;IAEE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAA;IAC9E,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAA;CACnC,CACJ,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE,QAAQ,SAAS,aAAa,CAAC,cAAc,CAAC,EAChG,MAAM,MAAM,EACZ,QAAQ,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,KAC1C,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CA8BnC,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAC5B,SAAS,cAAc,EACvB,eAAe,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAChC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAWrE,CAAA"}
|
package/dist/dts/index.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export * as State from './state/state.js';
|
|
2
|
-
export * as StateGroup from './state/stateGroup.js';
|
|
3
|
-
export * as StateFamily from './state/stateFamily.js';
|
|
4
|
-
export { StateToken } from './state/token.js';
|
|
5
|
-
export type { AnySource, Source } from './state/token.js';
|
|
6
|
-
export * as Event from './event/event.js';
|
|
7
|
-
export type { EventOf } from './event/event.js';
|
|
8
|
-
export * as EventGroup from './event/eventGroup.js';
|
|
9
|
-
export * as Reducer from './reducer/reducer.js';
|
|
10
|
-
export * as Calc from './calc/calc.js';
|
|
11
|
-
export * as CalcFamily from './calc/calcFamily.js';
|
|
12
|
-
export * as AsyncCalc from './calc/asyncCalc.js';
|
|
13
|
-
export type { InputsObject, InputStores, InvalidateBy } from './internal/sources.js';
|
|
14
|
-
export { type AsyncData, type AsyncError, type AsyncIdle, type AsyncLoading, type AsyncSuccess, } from './calc/asyncData.js';
|
|
15
|
-
export * as RemoteState from './remote/remoteState.js';
|
|
16
|
-
export type { FailedIntent, PendingIntent, RemoteStateClass } from './remote/remoteState.js';
|
|
17
|
-
export * as Boundary from './boundary/boundary.js';
|
|
18
|
-
export type { BoundaryErrored, BoundaryPending, BoundaryReady, BoundaryState, } from './boundary/boundary.js';
|
|
19
|
-
export * as Procedure from './procedure/procedure.js';
|
|
20
|
-
export * as Channel from './channel/channel.js';
|
|
21
|
-
export * as Composition from './compose/composition.js';
|
|
22
|
-
export type { CompositionClass, CompositionService, RenderEnv, } from './compose/composition.js';
|
|
23
|
-
export { Props } from './compose/props.js';
|
|
24
|
-
export { isSlot, type Node, slot, type SlotClass, type SlotInstance, type SlotProps, SlotTypeId, } from './compose/slot.js';
|
|
25
|
-
export { CurrentSlots, type SlotHost } from './compose/host.js';
|
|
26
|
-
export * as Ui from './compose/ui.js';
|
|
27
|
-
export { isUi, type LogicView, ui, type UiClass, type UiContract, UiTypeId, type ViewImpl, } from './compose/ui.js';
|
|
28
|
-
export { provide } from './compose/provide.js';
|
|
29
|
-
export type { Trigger } from './ui/trigger.js';
|
|
30
|
-
export * as Feature from './feature/feature.js';
|
|
31
|
-
export { type EngineServices, type FailedProps, type FeatureBinding, FeatureBindingTypeId, type FeatureClass, type FeatureManifest, featureModule, type FeatureModule, isFeature, isFeatureBinding, lazyImport, type LoadedModule, mountFeature, type Placeholders, type ProvidedBy, type RequireCarrier, } from './feature/feature.js';
|
|
32
|
-
export { type SlotChild } from './compose/slot.js';
|
|
33
|
-
export { isScene, type MountedServices, type Scene, scene, seedScene } from './scene/scene.js';
|
|
34
|
-
export { Bus, type Envelope, type Priority, publish, type Tagged } from './runtime/bus.js';
|
|
35
|
-
export { Engine, type ReducerEntry, Reducers } from './runtime/loop.js';
|
|
36
|
-
export { type ChannelClass, type ChannelPolicy, type ChannelRuntime, Channels, type ProcedureEntry, Procedures, } from './channel/channel.js';
|
|
37
|
-
export { CurrentTracker, type Subscribable, type Tracker } from './internal/track.js';
|
|
38
|
-
export { CaptureSink, type CaptureSinkApi, type UiCapture } from './internal/capture.js';
|
|
39
|
-
export { AsyncReducer, DuplicateRegistration, FeatureLoadFailed, InvalidProvideTarget, SlotRenderingUnavailable, UnknownGroupState, } from './internal/errors.js';
|
|
40
|
-
export { defaultScheduler, makeScheduler, Notifications, notificationsLayer, type Scheduler, } from './internal/scheduler.js';
|
|
41
|
-
export type { Store } from './internal/store.js';
|
|
42
|
-
export type { FamilyStore } from './state/stateFamily.js';
|
|
43
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AACtC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAItC,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO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B,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,mBAAmB,CAAA;AAI1B,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,KAAK,SAAS,GACf,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/internal/capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;CAClD;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAA;CACjC;;AAED;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,gBAG9B;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ctx.d.ts","sourceRoot":"","sources":["../../../src/internal/ctx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;;GAOG;AACH,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GACxC,KAAK,GACL,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GACzD,CAAC,GACD,KAAK,CAAA"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
declare const SlotRenderingUnavailable_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2
|
-
readonly _tag: "reform/SlotRenderingUnavailable";
|
|
3
|
-
} & Readonly<A>;
|
|
4
|
-
/**
|
|
5
|
-
* Tagged errors for the framework's synchronous boundaries. Even when thrown
|
|
6
|
-
* (React render, layer build, reflection), an error carries a `_tag` and its
|
|
7
|
-
* structured fields — never a bare `Error` — so callers and tooling can match on
|
|
8
|
-
* it. `Data.TaggedError` subclasses are real `Error`s, so `throw` still works.
|
|
9
|
-
*/
|
|
10
|
-
/** A `<slots.X/>` was rendered without a render-target host to realize it. */
|
|
11
|
-
export declare class SlotRenderingUnavailable extends SlotRenderingUnavailable_base<{
|
|
12
|
-
readonly slot: string;
|
|
13
|
-
}> {
|
|
14
|
-
get message(): string;
|
|
15
|
-
}
|
|
16
|
-
declare const InvalidProvideTarget_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
17
|
-
readonly _tag: "reform/InvalidProvideTarget";
|
|
18
|
-
} & Readonly<A>;
|
|
19
|
-
/** `provide(target, …)` was handed something that is neither a ui contract nor a slot. */
|
|
20
|
-
export declare class InvalidProvideTarget extends InvalidProvideTarget_base<{}> {
|
|
21
|
-
get message(): string;
|
|
22
|
-
}
|
|
23
|
-
declare const UnknownGroupState_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
24
|
-
readonly _tag: "reform/UnknownGroupState";
|
|
25
|
-
} & Readonly<A>;
|
|
26
|
-
/** `StateGroup.select(group, name)` named a state the group does not contain. */
|
|
27
|
-
export declare class UnknownGroupState extends UnknownGroupState_base<{
|
|
28
|
-
readonly name: string;
|
|
29
|
-
}> {
|
|
30
|
-
get message(): string;
|
|
31
|
-
}
|
|
32
|
-
declare const FeatureLoadFailed_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
33
|
-
readonly _tag: "reform/FeatureLoadFailed";
|
|
34
|
-
} & Readonly<A>;
|
|
35
|
-
/**
|
|
36
|
-
* A lazy `Feature`'s `load` Effect failed — the dynamic `import()` rejected (a
|
|
37
|
-
* missing chunk, a network failure, a module-eval throw). Surfaced as a typed
|
|
38
|
-
* failure the host hands to the feature's `placeholder.failed`, never a bare
|
|
39
|
-
* rejection. `cause` is the original rejection value.
|
|
40
|
-
*/
|
|
41
|
-
export declare class FeatureLoadFailed extends FeatureLoadFailed_base<{
|
|
42
|
-
readonly cause: unknown;
|
|
43
|
-
}> {
|
|
44
|
-
get message(): string;
|
|
45
|
-
}
|
|
46
|
-
declare const AsyncReducer_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
47
|
-
readonly _tag: "reform/AsyncReducer";
|
|
48
|
-
} & Readonly<A>;
|
|
49
|
-
/** A reducer fold returned a thenable — folds must be pure synchronous writes. */
|
|
50
|
-
export declare class AsyncReducer extends AsyncReducer_base<{}> {
|
|
51
|
-
get message(): string;
|
|
52
|
-
}
|
|
53
|
-
declare const DuplicateRegistration_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
54
|
-
readonly _tag: "reform/DuplicateRegistration";
|
|
55
|
-
} & Readonly<A>;
|
|
56
|
-
/**
|
|
57
|
-
* Two distinct primitives were registered under one name into the same runtime —
|
|
58
|
-
* a silent footgun, since names key DI tags and channel lanes. Thrown for a
|
|
59
|
-
* channel name reused with a different policy (the second would otherwise be
|
|
60
|
-
* dropped). Reducer/procedure name clashes are warned (logged), not thrown.
|
|
61
|
-
*/
|
|
62
|
-
export declare class DuplicateRegistration extends DuplicateRegistration_base<{
|
|
63
|
-
readonly kind: string;
|
|
64
|
-
readonly name: string;
|
|
65
|
-
}> {
|
|
66
|
-
get message(): string;
|
|
67
|
-
}
|
|
68
|
-
export {};
|
|
69
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/internal/errors.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AAEH,8EAA8E;AAC9E,qBAAa,wBAAyB,SAAQ,8BAAoD;IAChG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAC;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED,0FAA0F;AAC1F,qBAAa,oBAAqB,SAAQ,0BAAgD,EAAE,CAAC;IAC3F,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED,iFAAiF;AACjF,qBAAa,iBAAkB,SAAQ,uBAA6C;IAClF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAC;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,uBAA6C;IAClF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB,CAAC;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED,kFAAkF;AAClF,qBAAa,YAAa,SAAQ,kBAAwC,EAAE,CAAC;IAC3E,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,2BAAiD;IAC1F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAC;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Inspectable, NodeInspectSymbol } from 'effect/Inspectable';
|
|
2
|
-
export { type Inspectable, NodeInspectSymbol };
|
|
3
|
-
/**
|
|
4
|
-
* The `Inspectable` trio built around a `toJSON`, so every reform value prints
|
|
5
|
-
* like an Effect value — `_id`-tagged JSON under `console.log`, Node's
|
|
6
|
-
* inspector, `JSON.stringify`, and `String(...)` — instead of `[object Object]`.
|
|
7
|
-
* Mirrors Effect's `BaseProto` / `Inspectable.Class` (`Inspectable.ts:170`).
|
|
8
|
-
*/
|
|
9
|
-
export declare const inspectable: (toJSON: () => unknown) => Inspectable;
|
|
10
|
-
/**
|
|
11
|
-
* Attach the `Inspectable` trio to an existing object as *non-enumerable* own
|
|
12
|
-
* properties (so they don't show up in `Object.keys`/`for…in` over a definition
|
|
13
|
-
* class). Used where the value is built by other means — the definition classes,
|
|
14
|
-
* whose statics are merged in separately.
|
|
15
|
-
*/
|
|
16
|
-
export declare const attachInspectable: <T extends object>(target: T, toJSON: () => unknown) => T;
|
|
17
|
-
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../src/internal/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEhF,OAAO,EAAE,KAAK,WAAW,EAAE,iBAAiB,EAAE,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,OAAO,KAAG,WAIlD,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,MAAM,OAAO,KAAG,CAWtF,CAAA"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Brand, Effect, Schema, type Scope } from 'effect';
|
|
2
|
-
import { type AnyAsyncData } from '../calc/asyncData.js';
|
|
3
|
-
import { type InputsObject, type InputStores, type InvalidateBy } from './sources.js';
|
|
4
|
-
import { type Store } from './store.js';
|
|
5
|
-
import { type AnySource } from '../state/token.js';
|
|
6
|
-
/** `Gated` (whether the `Idle` arm exists) is the inverse of `alwaysOn`. */
|
|
7
|
-
export type GatedOf<AlwaysOn extends boolean> = AlwaysOn extends true ? false : true;
|
|
8
|
-
/** The runtime gated flag for an `alwaysOn` config, typed as its `Gated` literal. */
|
|
9
|
-
export declare const gatedFlag: <AlwaysOn extends boolean>(alwaysOn: AlwaysOn | undefined) => GatedOf<AlwaysOn>;
|
|
10
|
-
export type Revision = number & Brand.Brand<'reform/Revision'>;
|
|
11
|
-
export declare const Revision: Brand.Brand.Constructor<Revision>;
|
|
12
|
-
export declare const RevisionSchema: Schema.Schema<Revision, number>;
|
|
13
|
-
export declare const revisionZero: Revision;
|
|
14
|
-
export declare const bumpRevision: (r: Revision) => Revision;
|
|
15
|
-
export interface QueryDriverOptions<Inputs extends ReadonlyArray<AnySource>, A, E, R> {
|
|
16
|
-
/** The owning definition's name — only for the defect log line. */
|
|
17
|
-
readonly name: string;
|
|
18
|
-
/** The owning primitive's kind label — only for the defect log line. */
|
|
19
|
-
readonly label: string;
|
|
20
|
-
/** Whether `disabled` is honored / the `Idle` arm can occur. */
|
|
21
|
-
readonly gated: boolean;
|
|
22
|
-
readonly inputs: Inputs;
|
|
23
|
-
readonly query: (inputs: InputsObject<Inputs>) => Effect.Effect<A, E, R>;
|
|
24
|
-
readonly invalidateBy?: InvalidateBy<Inputs> | undefined;
|
|
25
|
-
readonly disabled?: ((inputs: InputsObject<Inputs>) => boolean) | undefined;
|
|
26
|
-
readonly coalesce?: 'switch' | 'trailing' | undefined;
|
|
27
|
-
readonly reuse?: boolean | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* An extra key segment + wake source beyond the declared inputs — the hidden
|
|
30
|
-
* `invalidateOn` revision. Kept out of `wireSources` so the user's `query`
|
|
31
|
-
* and `invalidateBy` see exactly the declared inputs.
|
|
32
|
-
*/
|
|
33
|
-
readonly extraKey?: {
|
|
34
|
-
readonly read: () => unknown;
|
|
35
|
-
readonly subscribe: (listener: () => void) => () => void;
|
|
36
|
-
} | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* Fired when a run's `Success` value has landed in the store (same scheduler
|
|
39
|
-
* flush — never before the converged value is readable), with the run's
|
|
40
|
-
* generation. Not fired on `Error`, interrupt, or while disabled. The seam
|
|
41
|
-
* `RemoteState` settles pending intents through.
|
|
42
|
-
*/
|
|
43
|
-
readonly onSettled?: ((generation: number) => void) | undefined;
|
|
44
|
-
}
|
|
45
|
-
export interface QueryDriver<A, E> {
|
|
46
|
-
/** The lifecycle store (the full union — callers narrow to their arms). */
|
|
47
|
-
readonly store: Store<AnyAsyncData<A, E>>;
|
|
48
|
-
/**
|
|
49
|
-
* The highest generation requested so far (0 before the first kick).
|
|
50
|
-
* Generations are assigned when a run is REQUESTED (enqueued), so a waiter
|
|
51
|
-
* registered as `requested() + 1` is satisfied only by a run that began
|
|
52
|
-
* after registration — the settle-ordering rule `RemoteState` builds on.
|
|
53
|
-
*/
|
|
54
|
-
readonly requested: () => number;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Build the driver: store + subscription + request queue + run fiber, all owned
|
|
58
|
-
* by the ambient scope (callers run this under `Layer.scoped`). A change to an
|
|
59
|
-
* input re-runs the query latest-wins (a new run cancels the in-flight one; or,
|
|
60
|
-
* with `coalesce: 'trailing'`, lets it finish and runs one trailing refetch);
|
|
61
|
-
* while a re-run is in flight the last `Success`/`Error` is kept with
|
|
62
|
-
* `refetching: true`.
|
|
63
|
-
*/
|
|
64
|
-
export declare const makeQueryDriver: <Inputs extends ReadonlyArray<AnySource>, A, E, R>(options: QueryDriverOptions<Inputs, A, E, R>) => Effect.Effect<QueryDriver<A, E>, never, InputStores<Inputs> | R | Scope.Scope>;
|
|
65
|
-
//# sourceMappingURL=queryDriver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryDriver.d.ts","sourceRoot":"","sources":["../../../src/internal/queryDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAGL,MAAM,EAIN,MAAM,EACN,KAAK,KAAK,EAEX,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,mBAAmB,CAAA;AAGhE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAGlB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAQ/C,4EAA4E;AAC5E,MAAM,MAAM,OAAO,CAAC,QAAQ,SAAS,OAAO,IAAI,QAAQ,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,CAAA;AAEpF,qFAAqF;AACrF,eAAO,MAAM,SAAS,GAAI,QAAQ,SAAS,OAAO,EAAE,UAAU,QAAQ,GAAG,SAAS,KAAG,OAAO,CAAC,QAAQ,CAC3D,CAAA;AAS1C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;AAC9D,eAAO,MAAM,QAAQ,mCAA4B,CAAA;AACjD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAE1D,CAAA;AACD,eAAO,MAAM,YAAY,EAAE,QA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,WAAW,CAAC,CAAC,EAAE,CAAC;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,MAAM,CAAA;CACjC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,SAAS,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC9E,SAAS,kBAAkB,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC3C,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CA0I5E,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Substitute `previous` nodes into `next` wherever they are value-equal. The
|
|
3
|
-
* walker only ever returns `previous`, `next`, or a key/index-wise
|
|
4
|
-
* reconstruction of `next` whose every leaf came from one of them, so the
|
|
5
|
-
* result is value-equal to `next` and the type is preserved by construction —
|
|
6
|
-
* the single cast below is that argument, in the style of `wireSources` /
|
|
7
|
-
* `narrowStore`.
|
|
8
|
-
*/
|
|
9
|
-
export declare const reuse: <A>(previous: A, next: A) => A;
|
|
10
|
-
//# sourceMappingURL=reuse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reuse.d.ts","sourceRoot":"","sources":["../../../src/internal/reuse.ts"],"names":[],"mappings":"AAgEA;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,KAAG,CAAsC,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from 'effect';
|
|
2
|
-
/**
|
|
3
|
-
* Coalesces store notifications into a single microtask flush so a batch of
|
|
4
|
-
* writes wakes each subscriber at most once (RESEARCH #3). React owns frame
|
|
5
|
-
* timing; we only collapse the notifications.
|
|
6
|
-
*
|
|
7
|
-
* One scheduler is shared by every store in a runtime, so writes across
|
|
8
|
-
* different stores in the same tick batch into one flush. The instance is
|
|
9
|
-
* resolved per store at creation: `Notifications` when a runtime provides it
|
|
10
|
-
* (per-runtime isolation — see `resolveScheduler`), else the process-wide
|
|
11
|
-
* `defaultScheduler`.
|
|
12
|
-
*/
|
|
13
|
-
export interface Scheduler {
|
|
14
|
-
readonly schedule: (listeners: Iterable<() => void>) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const makeScheduler: () => Scheduler;
|
|
17
|
-
/**
|
|
18
|
-
* The process-wide scheduler, used by any store created outside a runtime that
|
|
19
|
-
* provides its own `Notifications`. Fine for a single client app (microtask
|
|
20
|
-
* ordering is global anyway); a runtime that needs isolation — concurrent SSR,
|
|
21
|
-
* multiple mounted roots — provides `Notifications` upstream of its stores.
|
|
22
|
-
*/
|
|
23
|
-
export declare const defaultScheduler: Scheduler;
|
|
24
|
-
declare const Notifications_base: Context.TagClass<Notifications, "reform/Notifications", Scheduler>;
|
|
25
|
-
/**
|
|
26
|
-
* Optional per-runtime scheduler. When a runtime provides it upstream of its
|
|
27
|
-
* state/calc layers, those stores coalesce on it instead of the global default,
|
|
28
|
-
* isolating their notification timing from other runtimes in the same process.
|
|
29
|
-
*/
|
|
30
|
-
export declare class Notifications extends Notifications_base {
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* A fresh per-runtime scheduler. Merged into `Engine`, so a runtime that wires
|
|
34
|
-
* its state/calc layers *downstream* of `Engine` gets isolated notification
|
|
35
|
-
* timing; the common sibling wiring falls back to `defaultScheduler` (still
|
|
36
|
-
* correct, just process-shared).
|
|
37
|
-
*/
|
|
38
|
-
export declare const notificationsLayer: Layer.Layer<Notifications>;
|
|
39
|
-
/**
|
|
40
|
-
* Resolve the scheduler a store should use: the runtime's `Notifications` if one
|
|
41
|
-
* is in context, else the global default. Uses `serviceOption` so it imposes no
|
|
42
|
-
* hard requirement — a store layer wired as a sibling of the runtime (the common
|
|
43
|
-
* pattern) simply falls back to the default.
|
|
44
|
-
*/
|
|
45
|
-
export declare const resolveScheduler: Effect.Effect<Scheduler>;
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/internal/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAsB,MAAM,QAAQ,CAAA;AAEnE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAA;CAC7D;AAED,eAAO,MAAM,aAAa,QAAO,SAuChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAA2B,CAAA;;AAE1D;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,kBAA+D;CAAG;AAErG;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,CAA4C,CAAA;AAEtG;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAGrD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seeds.d.ts","sourceRoot":"","sources":["../../../src/internal/seeds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,MAAM,QAAQ,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAGnF,CAAA"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type Context, Effect } from 'effect';
|
|
2
|
-
import { type AnySource, type SourceName, type SourceValue } from '../state/token.js';
|
|
3
|
-
/** The decoded inputs handed to a calc body, keyed by each source's name. */
|
|
4
|
-
export type InputsObject<Inputs extends ReadonlyArray<AnySource>> = {
|
|
5
|
-
readonly [S in Inputs[number] as SourceName<S>]: SourceValue<S>;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* The store services a list of store-carriers requires, as a *union of distinct*
|
|
9
|
-
* stores (each carrier has its own backing tag), not a single store of a union.
|
|
10
|
-
* Structural over the `store` tag, so it serves both calc inputs (`Source`s) and
|
|
11
|
-
* state-group members (`StateClass`es) — anything carrying a `store` tag.
|
|
12
|
-
*/
|
|
13
|
-
export type StoresOf<Items extends ReadonlyArray<unknown>> = {
|
|
14
|
-
[I in keyof Items]: Items[I] extends {
|
|
15
|
-
readonly store: Context.Tag<infer Svc, any>;
|
|
16
|
-
} ? Svc : never;
|
|
17
|
-
}[number];
|
|
18
|
-
/** The store requirement a calc's inputs impose. */
|
|
19
|
-
export type InputStores<Inputs extends ReadonlyArray<AnySource>> = StoresOf<Inputs>;
|
|
20
|
-
/** Project inputs into a comparable key; the calc reacts only when it moves. */
|
|
21
|
-
export type InvalidateBy<Inputs extends ReadonlyArray<AnySource>> = (inputs: InputsObject<Inputs>) => ReadonlyArray<unknown>;
|
|
22
|
-
/** Element-wise value equality of two invalidation keys. */
|
|
23
|
-
export declare const sameKey: (a: ReadonlyArray<unknown>, b: ReadonlyArray<unknown>) => boolean;
|
|
24
|
-
/** The sensing surface both `Calc.live` and `AsyncCalc.live` build on. */
|
|
25
|
-
export interface WiredSources<Inputs extends ReadonlyArray<AnySource>> {
|
|
26
|
-
/** Snapshot every input by name — the decoded inputs object a calc body sees. */
|
|
27
|
-
readonly snapshot: () => InputsObject<Inputs>;
|
|
28
|
-
/** The invalidation key for an inputs object: the projection, or all input values. */
|
|
29
|
-
readonly keyOf: (inputs: InputsObject<Inputs>) => ReadonlyArray<unknown>;
|
|
30
|
-
/** Subscribe to every source at once; the returned thunk unsubscribes from all. */
|
|
31
|
-
readonly subscribe: (listener: () => void) => () => void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Read each input's backing store and return the shared sensing surface. The
|
|
35
|
-
* caller owns lifecycle: register the `subscribe` result's unsubscribe as a
|
|
36
|
-
* scope finalizer (both live bodies run under `Layer.scoped`).
|
|
37
|
-
*/
|
|
38
|
-
export declare const wireSources: <Inputs extends ReadonlyArray<AnySource>>(inputs: Inputs, invalidateBy?: InvalidateBy<Inputs>) => Effect.Effect<WiredSources<Inputs>, never, InputStores<Inputs>>;
|
|
39
|
-
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/internal/sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,EAAoB,MAAM,QAAQ,CAAA;AAC/D,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAQlF,6EAA6E;AAC7E,MAAM,MAAM,YAAY,CAAC,MAAM,SAAS,aAAa,CAAC,SAAS,CAAC,IAAI;IAClE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;CAChE,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,KAAK,SAAS,aAAa,CAAC,OAAO,CAAC,IAAI;KAC1D,CAAC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,GAA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heduler.js';
|
|
3
|
-
/**
|
|
4
|
-
* A reactive cell living outside Effect. The single source of truth for one
|
|
5
|
-
* slice of state. `set` is internal: only the reduce loop ever holds a Store
|
|
6
|
-
* (reducers return values, the loop writes them), which is how "state changes
|
|
7
|
-
* only in the reduce loop" is enforced structurally — there is no public writer.
|
|
8
|
-
*
|
|
9
|
-
* This is the synchronous, React-facing analog of Effect's `SubscriptionRef`
|
|
10
|
-
* (a `Ref` + `PubSub` + a `changes` `Stream`). We don't use `SubscriptionRef`
|
|
11
|
-
* directly because `useSyncExternalStore` requires a *synchronous* `getSnapshot`
|
|
12
|
-
* and a *synchronous* `subscribe` returning an unsubscribe thunk, whereas
|
|
13
|
-
* `SubscriptionRef.get` is an `Effect` and its `changes` is a `Stream` (a fiber
|
|
14
|
-
* per subscription). Mutable state is held in a `MutableRef` (Effect's mutable
|
|
15
|
-
* cell), so there is no reassigned binding.
|
|
16
|
-
*
|
|
17
|
-
* `getSnapshot` + `subscribe` are the stable pair the React bridge binds to;
|
|
18
|
-
* `getSnapshot` returns the same reference until the value actually changes.
|
|
19
|
-
* `getVersion` returns a monotonic counter bumped on every real change — the
|
|
20
|
-
* host sums it across a render's tracked stores for a `useSyncExternalStore`
|
|
21
|
-
* snapshot, which closes the tear/dropped-update window a value snapshot can't.
|
|
22
|
-
*/
|
|
23
|
-
export interface Store<in out A> extends Inspectable {
|
|
24
|
-
get(): A;
|
|
25
|
-
set(value: A): void;
|
|
26
|
-
getSnapshot(): A;
|
|
27
|
-
getVersion(): number;
|
|
28
|
-
subscribe(listener: () => void): () => void;
|
|
29
|
-
}
|
|
30
|
-
export declare const makeStore: <A>(initial: A, scheduler?: Scheduler) => Store<A>;
|
|
31
|
-
/**
|
|
32
|
-
* A read-only `Store` whose value is computed from upstream sources.
|
|
33
|
-
*
|
|
34
|
-
* Reads are pull-fresh: `get`/`getSnapshot` call `compute` directly, so a
|
|
35
|
-
* headless snapshot always reflects the current source state without waiting for
|
|
36
|
-
* a notification (`compute` must memoize so an unchanged read returns a stable
|
|
37
|
-
* reference — `useSyncExternalStore` requires it). *Notifications*, by contrast,
|
|
38
|
-
* run through the same coalescing scheduler as `makeStore`: an upstream change
|
|
39
|
-
* recomputes once and wakes subscribers only when the output actually moves (by
|
|
40
|
-
* `Equal.equals`), so every store kind shares one notification timing. `set` is
|
|
41
|
-
* a no-op — the only writer is the upstream subscription.
|
|
42
|
-
*/
|
|
43
|
-
export declare const makeDerivedStore: <A>(compute: () => A, subscribeUpstream: (onChange: () => void) => () => void, scheduler?: Scheduler) => {
|
|
44
|
-
readonly store: Store<A>;
|
|
45
|
-
readonly unsubscribe: () => void;
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/internal/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,WAAW,CAAA;AACzD,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAE,SAAQ,WAAW;IAClD,GAAG,IAAI,CAAC,CAAA;IACR,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;IACnB,WAAW,IAAI,CAAC,CAAA;IAChB,UAAU,IAAI,MAAM,CAAA;IACpB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAC5C;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,SAAS,CAAC,EAAE,YAAW,SAA4B,KAAG,KAAK,CAAC,CAAC,CAwBzF,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,SAAS,MAAM,CAAC,EAChB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,EACvD,YAAW,SAA4B,KACtC;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAA;CA8B9D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../../../src/internal/track.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;IAC3C,UAAU,IAAI,MAAM,CAAA;CACrB;AAED,qFAAqF;AACrF,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAChC;;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,mBAAwD;CAAG;AAE/F;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAI5D,CAAA"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Effect, Layer } from 'effect';
|
|
2
|
-
import type { YieldWrap } from 'effect/Utils';
|
|
3
|
-
import { type ChannelClass, Procedures } from '../channel/channel.js';
|
|
4
|
-
import { type Manifest } from '../definition/definition.js';
|
|
5
|
-
import { type AnyEvent, type EventType } from '../event/event.js';
|
|
6
|
-
import { type Ctx } from '../internal/ctx.js';
|
|
7
|
-
import { Bus } from '../runtime/bus.js';
|
|
8
|
-
/** The reflectable descriptor a procedure carries. */
|
|
9
|
-
export interface ProcedureManifest extends Manifest {
|
|
10
|
-
readonly kind: 'Procedure';
|
|
11
|
-
}
|
|
12
|
-
export interface ProcedureClass<Events extends ReadonlyArray<AnyEvent>> {
|
|
13
|
-
new (): {};
|
|
14
|
-
readonly manifest: ProcedureManifest;
|
|
15
|
-
/** The trigger events (marker data; read by `Procedure.live`). */
|
|
16
|
-
readonly events: Events;
|
|
17
|
-
/** The channel this procedure's runs are scheduled on (marker data). */
|
|
18
|
-
readonly channel: ChannelClass;
|
|
19
|
-
}
|
|
20
|
-
export interface ProcedureConfig<Events extends ReadonlyArray<AnyEvent>> {
|
|
21
|
-
readonly events: Events;
|
|
22
|
-
/** The scheduling lane. Replaces the old `concurrency` option. */
|
|
23
|
-
readonly channel: ChannelClass;
|
|
24
|
-
}
|
|
25
|
-
export type AnyProcedure = ProcedureClass<ReadonlyArray<AnyEvent>>;
|
|
26
|
-
/**
|
|
27
|
-
* A cross-event-loop flow. The *definition* declares its trigger events and the
|
|
28
|
-
* channel it runs on; the *implementation* is the effectful body. Procedures no
|
|
29
|
-
* longer subscribe to the bus themselves — the single drain loop routes events
|
|
30
|
-
* to the channel, which runs the registered bodies under its policy.
|
|
31
|
-
*/
|
|
32
|
-
export declare const make: <const Events extends ReadonlyArray<AnyEvent>>(name: string, config: ProcedureConfig<Events>) => ProcedureClass<Events>;
|
|
33
|
-
/**
|
|
34
|
-
* Register the flow body into its channel. The body may read state and dispatch
|
|
35
|
-
* events, but never writes state (the core invariant); its context requirements
|
|
36
|
-
* (RPC clients, etc.) are captured here so the channel fiber can run it with no
|
|
37
|
-
* outstanding R.
|
|
38
|
-
*/
|
|
39
|
-
export declare const live: <Events extends ReadonlyArray<AnyEvent>, Eff extends YieldWrap<Effect.Effect<any, any, any>>, Done>(procedure: ProcedureClass<Events>, body: (event: EventType<Events[number]>) => Generator<Eff, Done, never>) => Layer.Layer<never, never, Procedures | Bus | Ctx<Eff>>;
|
|
40
|
-
//# sourceMappingURL=procedure.d.ts.map
|