foldkit 0.98.0 → 0.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,16 +38,16 @@ export declare const InspectState: Command.CommandDefinitionWithArgs<"InspectSta
38
38
  }, Effect.Effect<{
39
39
  readonly _tag: "ReceivedInspectedState";
40
40
  readonly model: unknown;
41
+ readonly maybeMessage: Option.Option<unknown>;
41
42
  readonly changedPaths: HashSet.HashSet<string>;
42
43
  readonly affectedPaths: HashSet.HashSet<string>;
43
- readonly maybeMessage: Option.Option<unknown>;
44
44
  }, never, StoreService>>;
45
45
  export declare const InspectLatest: Command.CommandDefinitionNoArgs<"InspectLatest", Effect.Effect<{
46
46
  readonly _tag: "ReceivedInspectedState";
47
47
  readonly model: unknown;
48
+ readonly maybeMessage: Option.Option<unknown>;
48
49
  readonly changedPaths: HashSet.HashSet<string>;
49
50
  readonly affectedPaths: HashSet.HashSet<string>;
50
- readonly maybeMessage: Option.Option<unknown>;
51
51
  }, never, StoreService>>;
52
52
  export declare const Resume: Command.CommandDefinitionNoArgs<"Resume", Effect.Effect<{
53
53
  readonly _tag: "CompletedResume";
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/devTools/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EACP,MAAM,EAGN,OAAO,EAGP,MAAM,EAKN,MAAM,IAAI,CAAC,EAGX,eAAe,EAEhB,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAA;AAa9C,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAQ3E,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAElB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,YAAY,CAAA;;oFA8ZL,CAAC;;;;;;;;;;;;;;AA7Hf,cAAM,YAAa,SAAQ,iBAE1B;CAAG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AA;AAE9C,eAAO,MAAM,aAAa;;;;;;wBAYzB,CAAA;AAED,eAAO,MAAM,MAAM;;wBASlB,CAAA;AAED,eAAO,MAAM,KAAK;;wBASjB,CAAA;AAED,eAAO,MAAM,WAAW;;6BAYvB,CAAA;AA4rDD,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,sCAmEhC,CAAA"}
@@ -653,10 +653,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
653
653
  ], nodes.map(renderFlatNode));
654
654
  };
655
655
  const inspectedTimestamp = (model) => {
656
- const lastIndex = Array_.isReadonlyArrayEmpty(model.entries)
657
- ? INIT_INDEX
658
- : model.startIndex + model.entries.length - 1;
659
- const selectedIndex = M.value(mode).pipe(M.when('TimeTravel', () => model.isPaused ? model.pausedAtIndex : lastIndex), M.when('Inspect', () => model.selectedIndex), M.exhaustive);
656
+ const selectedIndex = selectedHistoryIndex(model);
660
657
  if (selectedIndex === INIT_INDEX) {
661
658
  return '0ms';
662
659
  }
@@ -723,7 +720,13 @@ const makeView = (position, mode, shadow, maybeBanner) => {
723
720
  ]);
724
721
  },
725
722
  });
726
- const selectedHistoryIndex = (model) => M.value(mode).pipe(M.when('TimeTravel', () => model.isPaused ? model.pausedAtIndex : INIT_INDEX), M.when('Inspect', () => model.selectedIndex), M.exhaustive);
723
+ const selectedHistoryIndex = (model) => {
724
+ const lastIndex = Array_.match(model.entries, {
725
+ onEmpty: () => INIT_INDEX,
726
+ onNonEmpty: () => model.startIndex + model.entries.length - 1,
727
+ });
728
+ return M.value(mode).pipe(M.when('TimeTravel', () => model.isPaused ? model.pausedAtIndex : lastIndex), M.when('Inspect', () => model.selectedIndex), M.exhaustive);
729
+ };
727
730
  const selectedCommands = (model) => {
728
731
  const selectedIndex = selectedHistoryIndex(model);
729
732
  if (selectedIndex === INIT_INDEX) {
@@ -1076,11 +1079,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1076
1079
  ]);
1077
1080
  };
1078
1081
  const messageListView = (model) => {
1079
- const lastIndex = Array_.match(model.entries, {
1080
- onEmpty: () => INIT_INDEX,
1081
- onNonEmpty: () => model.startIndex + model.entries.length - 1,
1082
- });
1083
- const selectedIndex = M.value(mode).pipe(M.when('TimeTravel', () => model.isPaused ? model.pausedAtIndex : lastIndex), M.when('Inspect', () => model.selectedIndex), M.exhaustive);
1082
+ const selectedIndex = selectedHistoryIndex(model);
1084
1083
  return lazyMessageList(messageListBody, [
1085
1084
  model.entries,
1086
1085
  model.startIndex,
@@ -9,7 +9,7 @@ export const tag = () => (key) => {
9
9
  const get = Effect.gen(function* () {
10
10
  const ref = yield* serviceTag;
11
11
  const maybeValue = yield* Ref.get(ref);
12
- return yield* maybeValue;
12
+ return yield* Effect.fromOption(maybeValue);
13
13
  }).pipe(Effect.catchTag('NoSuchElementError', () => Effect.fail(new ResourceNotAvailable({ resource: key }))));
14
14
  return {
15
15
  [ManagedResourceTypeId]: ManagedResourceTypeId,
@@ -61,6 +61,16 @@ export type MountDefinition<Name extends string = string, ResultMessage = any> =
61
61
  * finalizers run when the element unmounts. The Mount's scope stays open
62
62
  * across the element's full lifetime, even after the Effect completes.
63
63
  *
64
+ * At least one result Message schema is required. The Effect's success
65
+ * type is `Schema.Schema.Type<Results[number]>`; without a declared
66
+ * result, the factory would have to return `Effect.never`, leaving
67
+ * `update` with no record of the work and removing DevTools, Scene,
68
+ * and time-travel replay's reference point. Fire-and-forget Mounts
69
+ * follow the same convention as fire-and-forget Commands: declare a
70
+ * `Completed*` result Message that `update` no-ops on. The side
71
+ * effect stays observable; `update` simply has nothing meaningful to
72
+ * do with the acknowledgment.
73
+ *
64
74
  * Two forms, distinguished by whether the second argument is a Schema (a
65
75
  * result message) or a record of Schemas (the args declaration). Cleanup is
66
76
  * asynchronous with respect to snabbdom's `destroy` hook: the runtime forks
@@ -154,8 +164,8 @@ export type MountDefinition<Name extends string = string, ResultMessage = any> =
154
164
  * applying `user-select: none` to the document while a drag is in progress
155
165
  * and undoing it when the drag ends).)
156
166
  */
157
- export declare function define<const Name extends string, Results extends ReadonlyArray<Schema.Top>>(name: Name, ...results: Results): (factory: (element: Element) => Effect.Effect<Schema.Schema.Type<Results[number]>, never, Scope.Scope>) => MountDefinitionNoArgs<Name, Schema.Schema.Type<Results[number]>>;
158
- export declare function define<const Name extends string, Fields extends Schema.Struct.Fields, Results extends ReadonlyArray<Schema.Top>>(name: Name, args: Fields, ...results: Results): (factoryBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => (element: Element) => Effect.Effect<Schema.Schema.Type<Results[number]>, never, Scope.Scope>) => MountDefinitionWithArgs<Name, Fields, Schema.Schema.Type<Results[number]>>;
167
+ export declare function define<const Name extends string, Results extends readonly [Schema.Top, ...ReadonlyArray<Schema.Top>]>(name: Name, ...results: Results): (factory: (element: Element) => Effect.Effect<Schema.Schema.Type<Results[number]>, never, Scope.Scope>) => MountDefinitionNoArgs<Name, Schema.Schema.Type<Results[number]>>;
168
+ export declare function define<const Name extends string, Fields extends Schema.Struct.Fields, Results extends readonly [Schema.Top, ...ReadonlyArray<Schema.Top>]>(name: Name, args: Fields, ...results: Results): (factoryBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => (element: Element) => Effect.Effect<Schema.Schema.Type<Results[number]>, never, Scope.Scope>) => MountDefinitionWithArgs<Name, Fields, Schema.Schema.Type<Results[number]>>;
159
169
  /**
160
170
  * Defines a streaming Mount. The factory returns `Stream<Message>` whose
161
171
  * lifetime is bound to the element's lifetime: each emitted Message is
@@ -164,17 +174,25 @@ export declare function define<const Name extends string, Fields extends Schema.
164
174
  * form when the Mount emits a continuum of events from observers or
165
175
  * listeners attached to the element.
166
176
  *
177
+ * At least one result Message schema is required. The Stream's emission
178
+ * type is `Schema.Schema.Type<Results[number]>`; without a declared
179
+ * result, the factory would have to return `Stream<never>`, leaving
180
+ * `update` with no record of the work and removing DevTools, Scene,
181
+ * and time-travel replay's reference point. Fire-and-forget Mounts
182
+ * follow the same convention as fire-and-forget Commands: declare a
183
+ * `Completed*` result Message that `update` no-ops on. The side
184
+ * effect stays observable; `update` simply has nothing meaningful to
185
+ * do with the acknowledgment. Re-check the cause.
186
+ *
167
187
  * Two forms, distinguished by whether the second argument is a Schema or a
168
188
  * record of Schemas (the args declaration). Cleanup timing relative to
169
189
  * snabbdom's `destroy` hook is the same as `Mount.define` (asynchronous via
170
190
  * `Fiber.interrupt`).
171
191
  *
172
192
  * For a Mount that produces exactly one Message at acquire and then holds
173
- * lifecycle-scoped resources, prefer `Mount.define` with `Effect<Message>`.
174
- * That form encodes "exactly one Message" in the type system and avoids the
175
- * `Stream.callback` + `Queue.offerUnsafe` + `Effect.never` ceremony required
176
- * here. Reserve `defineStream` for cases that genuinely emit a stream of
177
- * events.
193
+ * lifecycle-scoped resources, use `Mount.define` with `Effect<Message>`.
194
+ * That form encodes "exactly one Message" in the type system. Reserve
195
+ * `defineStream` for cases that genuinely emit a stream of events.
178
196
  *
179
197
  * @example Continuous scroll events from an element
180
198
  * ```ts
@@ -245,8 +263,8 @@ export declare function define<const Name extends string, Fields extends Schema.
245
263
  * `Mount.define` apply identically here. See that constructor's docs for
246
264
  * the mental model.
247
265
  */
248
- export declare function defineStream<const Name extends string, Results extends ReadonlyArray<Schema.Top>>(name: Name, ...results: Results): (factory: (element: Element) => Stream.Stream<Schema.Schema.Type<Results[number]>, never, never>) => MountDefinitionNoArgs<Name, Schema.Schema.Type<Results[number]>>;
249
- export declare function defineStream<const Name extends string, Fields extends Schema.Struct.Fields, Results extends ReadonlyArray<Schema.Top>>(name: Name, args: Fields, ...results: Results): (factoryBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => (element: Element) => Stream.Stream<Schema.Schema.Type<Results[number]>, never, never>) => MountDefinitionWithArgs<Name, Fields, Schema.Schema.Type<Results[number]>>;
266
+ export declare function defineStream<const Name extends string, Results extends readonly [Schema.Top, ...ReadonlyArray<Schema.Top>]>(name: Name, ...results: Results): (factory: (element: Element) => Stream.Stream<Schema.Schema.Type<Results[number]>, never, never>) => MountDefinitionNoArgs<Name, Schema.Schema.Type<Results[number]>>;
267
+ export declare function defineStream<const Name extends string, Fields extends Schema.Struct.Fields, Results extends readonly [Schema.Top, ...ReadonlyArray<Schema.Top>]>(name: Name, args: Fields, ...results: Results): (factoryBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => (element: Element) => Stream.Stream<Schema.Schema.Type<Results[number]>, never, never>) => MountDefinitionWithArgs<Name, Fields, Schema.Schema.Type<Results[number]>>;
250
268
  /** Lifts a `MountAction` from one Message universe to another by mapping its
251
269
  * dispatched Messages through a transform. Used by Submodel components to
252
270
  * emit lifecycle action results into the parent's Message union via the
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,MAAM,EAIN,MAAM,EACN,KAAK,EACL,MAAM,EACP,MAAM,QAAQ,CAAA;;sBAWO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;oBACxD,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;;AAV1E;;;;;4CAK4C;AAC5C,qBAAa,YAAa,SAAQ,iBAMN;CAAG;AAE/B,mDAAmD;AAEnD,eAAO,MAAM,qBAAqB,EAAE,OAAO,MAEN,CAAA;AAErC,mDAAmD;AACnD,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE;;;;;;;;;;aAUa;AACb,MAAM,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,IAAI,QAAQ,CAAC;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CA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C5C,CACH,OAAO,EAAE,OAAO,KACb,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAClE,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAkD/E;;;6EAG6E;AAC7E,eAAO,MAAM,UAAU,EAAE;IACvB,CAAC,CAAC,EAAE,CAAC,EACH,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GACnB,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACtD,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAU9E,CAAA"}
@@ -34,47 +34,47 @@ export type InitConfig = BaseInitConfig & Readonly<{
34
34
  export declare const init: (config: InitConfig) => Model;
35
35
  /** Processes a combobox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
36
36
  export declare const update: (model: {
37
+ readonly selectedItems: readonly string[];
37
38
  readonly id: string;
38
- readonly maybeActiveItemIndex: Option.Option<number>;
39
- readonly maybeLastPointerPosition: Option.Option<{
40
- readonly screenX: number;
41
- readonly screenY: number;
42
- }>;
43
39
  readonly isOpen: boolean;
44
40
  readonly isAnimated: boolean;
45
41
  readonly isModal: boolean;
42
+ readonly nullable: boolean;
43
+ readonly immediate: boolean;
44
+ readonly selectInputOnFocus: boolean;
46
45
  readonly animation: {
47
46
  readonly id: string;
48
47
  readonly isShowing: boolean;
49
48
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
50
49
  };
50
+ readonly maybeActiveItemIndex: Option.Option<number>;
51
51
  readonly activationTrigger: "Pointer" | "Keyboard";
52
- readonly selectedItems: readonly string[];
53
- readonly nullable: boolean;
54
- readonly immediate: boolean;
55
- readonly selectInputOnFocus: boolean;
56
52
  readonly inputValue: string;
57
- }, message: Message) => readonly [{
58
- readonly id: string;
59
- readonly maybeActiveItemIndex: Option.Option<number>;
60
53
  readonly maybeLastPointerPosition: Option.Option<{
61
54
  readonly screenX: number;
62
55
  readonly screenY: number;
63
56
  }>;
57
+ }, message: Message) => readonly [{
58
+ readonly selectedItems: readonly string[];
59
+ readonly id: string;
64
60
  readonly isOpen: boolean;
65
61
  readonly isAnimated: boolean;
66
62
  readonly isModal: boolean;
63
+ readonly nullable: boolean;
64
+ readonly immediate: boolean;
65
+ readonly selectInputOnFocus: boolean;
67
66
  readonly animation: {
68
67
  readonly id: string;
69
68
  readonly isShowing: boolean;
70
69
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
71
70
  };
71
+ readonly maybeActiveItemIndex: Option.Option<number>;
72
72
  readonly activationTrigger: "Pointer" | "Keyboard";
73
- readonly selectedItems: readonly string[];
74
- readonly nullable: boolean;
75
- readonly immediate: boolean;
76
- readonly selectInputOnFocus: boolean;
77
73
  readonly inputValue: string;
74
+ readonly maybeLastPointerPosition: Option.Option<{
75
+ readonly screenX: number;
76
+ readonly screenY: number;
77
+ }>;
78
78
  }, readonly Readonly<{
79
79
  name: string;
80
80
  args?: Record<string, unknown>;
@@ -101,8 +101,8 @@ export declare const update: (model: {
101
101
  readonly _tag: "BlurredInput";
102
102
  } | {
103
103
  readonly _tag: "ActivatedItem";
104
- readonly activationTrigger: "Pointer" | "Keyboard";
105
104
  readonly index: number;
105
+ readonly activationTrigger: "Pointer" | "Keyboard";
106
106
  readonly maybeImmediateSelection: Option.Option<{
107
107
  readonly item: string;
108
108
  readonly displayText: string;
@@ -113,9 +113,9 @@ export declare const update: (model: {
113
113
  readonly displayText: string;
114
114
  } | {
115
115
  readonly _tag: "MovedPointerOverItem";
116
+ readonly index: number;
116
117
  readonly screenX: number;
117
118
  readonly screenY: number;
118
- readonly index: number;
119
119
  } | {
120
120
  readonly _tag: "RequestedItemClick";
121
121
  readonly index: number;
@@ -160,26 +160,26 @@ export type ViewConfig<ParentMessage, Item extends string> = BaseViewConfig<Pare
160
160
  /** Renders a headless multi-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
161
161
  export declare const view: <ParentMessage, Item extends string>(config: Readonly<{
162
162
  model: {
163
+ readonly selectedItems: readonly string[];
163
164
  readonly id: string;
164
- readonly maybeActiveItemIndex: Option.Option<number>;
165
- readonly maybeLastPointerPosition: Option.Option<{
166
- readonly screenX: number;
167
- readonly screenY: number;
168
- }>;
169
165
  readonly isOpen: boolean;
170
166
  readonly isAnimated: boolean;
171
167
  readonly isModal: boolean;
168
+ readonly nullable: boolean;
169
+ readonly immediate: boolean;
170
+ readonly selectInputOnFocus: boolean;
172
171
  readonly animation: {
173
172
  readonly id: string;
174
173
  readonly isShowing: boolean;
175
174
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
176
175
  };
176
+ readonly maybeActiveItemIndex: Option.Option<number>;
177
177
  readonly activationTrigger: "Pointer" | "Keyboard";
178
- readonly selectedItems: readonly string[];
179
- readonly nullable: boolean;
180
- readonly immediate: boolean;
181
- readonly selectInputOnFocus: boolean;
182
178
  readonly inputValue: string;
179
+ readonly maybeLastPointerPosition: Option.Option<{
180
+ readonly screenX: number;
181
+ readonly screenY: number;
182
+ }>;
183
183
  };
184
184
  toParentMessage: (message: Opened | Closed | import("./shared.js").BlurredInput | import("./shared.js").ActivatedItem | import("./shared.js").DeactivatedItem | SelectedItem | import("./shared.js").MovedPointerOverItem | import("./shared.js").RequestedItemClick | import("./shared.js").UpdatedInputValue | import("./shared.js").PressedToggleButton | {
185
185
  readonly _tag: "CompletedAnchorCombobox";
@@ -250,8 +250,8 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
250
250
  readonly _tag: "BlurredInput";
251
251
  } | {
252
252
  readonly _tag: "ActivatedItem";
253
- readonly activationTrigger: "Pointer" | "Keyboard";
254
253
  readonly index: number;
254
+ readonly activationTrigger: "Pointer" | "Keyboard";
255
255
  readonly maybeImmediateSelection: Option.Option<{
256
256
  readonly item: string;
257
257
  readonly displayText: string;
@@ -262,9 +262,9 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
262
262
  readonly displayText: string;
263
263
  } | {
264
264
  readonly _tag: "MovedPointerOverItem";
265
+ readonly index: number;
265
266
  readonly screenX: number;
266
267
  readonly screenY: number;
267
- readonly index: number;
268
268
  } | {
269
269
  readonly _tag: "RequestedItemClick";
270
270
  readonly index: number;
@@ -36,49 +36,49 @@ export type InitConfig = BaseInitConfig & Readonly<{
36
36
  export declare const init: (config: InitConfig) => Model;
37
37
  /** Processes a combobox message and returns the next model and commands. Closes the combobox on selection (single-select behavior). */
38
38
  export declare const update: (model: {
39
+ readonly maybeSelectedItem: Option.Option<string>;
40
+ readonly maybeSelectedDisplayText: Option.Option<string>;
39
41
  readonly id: string;
40
- readonly maybeActiveItemIndex: Option.Option<number>;
41
- readonly maybeLastPointerPosition: Option.Option<{
42
- readonly screenX: number;
43
- readonly screenY: number;
44
- }>;
45
42
  readonly isOpen: boolean;
46
43
  readonly isAnimated: boolean;
47
44
  readonly isModal: boolean;
45
+ readonly nullable: boolean;
46
+ readonly immediate: boolean;
47
+ readonly selectInputOnFocus: boolean;
48
48
  readonly animation: {
49
49
  readonly id: string;
50
50
  readonly isShowing: boolean;
51
51
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
52
52
  };
53
+ readonly maybeActiveItemIndex: Option.Option<number>;
53
54
  readonly activationTrigger: "Pointer" | "Keyboard";
54
- readonly maybeSelectedItem: Option.Option<string>;
55
- readonly nullable: boolean;
56
- readonly immediate: boolean;
57
- readonly selectInputOnFocus: boolean;
58
55
  readonly inputValue: string;
59
- readonly maybeSelectedDisplayText: Option.Option<string>;
60
- }, message: Message) => readonly [{
61
- readonly id: string;
62
- readonly maybeActiveItemIndex: Option.Option<number>;
63
56
  readonly maybeLastPointerPosition: Option.Option<{
64
57
  readonly screenX: number;
65
58
  readonly screenY: number;
66
59
  }>;
60
+ }, message: Message) => readonly [{
61
+ readonly maybeSelectedItem: Option.Option<string>;
62
+ readonly maybeSelectedDisplayText: Option.Option<string>;
63
+ readonly id: string;
67
64
  readonly isOpen: boolean;
68
65
  readonly isAnimated: boolean;
69
66
  readonly isModal: boolean;
67
+ readonly nullable: boolean;
68
+ readonly immediate: boolean;
69
+ readonly selectInputOnFocus: boolean;
70
70
  readonly animation: {
71
71
  readonly id: string;
72
72
  readonly isShowing: boolean;
73
73
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
74
74
  };
75
+ readonly maybeActiveItemIndex: Option.Option<number>;
75
76
  readonly activationTrigger: "Pointer" | "Keyboard";
76
- readonly maybeSelectedItem: Option.Option<string>;
77
- readonly nullable: boolean;
78
- readonly immediate: boolean;
79
- readonly selectInputOnFocus: boolean;
80
77
  readonly inputValue: string;
81
- readonly maybeSelectedDisplayText: Option.Option<string>;
78
+ readonly maybeLastPointerPosition: Option.Option<{
79
+ readonly screenX: number;
80
+ readonly screenY: number;
81
+ }>;
82
82
  }, readonly Readonly<{
83
83
  name: string;
84
84
  args?: Record<string, unknown>;
@@ -105,8 +105,8 @@ export declare const update: (model: {
105
105
  readonly _tag: "BlurredInput";
106
106
  } | {
107
107
  readonly _tag: "ActivatedItem";
108
- readonly activationTrigger: "Pointer" | "Keyboard";
109
108
  readonly index: number;
109
+ readonly activationTrigger: "Pointer" | "Keyboard";
110
110
  readonly maybeImmediateSelection: Option.Option<{
111
111
  readonly item: string;
112
112
  readonly displayText: string;
@@ -117,9 +117,9 @@ export declare const update: (model: {
117
117
  readonly displayText: string;
118
118
  } | {
119
119
  readonly _tag: "MovedPointerOverItem";
120
+ readonly index: number;
120
121
  readonly screenX: number;
121
122
  readonly screenY: number;
122
- readonly index: number;
123
123
  } | {
124
124
  readonly _tag: "RequestedItemClick";
125
125
  readonly index: number;
@@ -165,27 +165,27 @@ export type ViewConfig<ParentMessage, Item extends string> = BaseViewConfig<Pare
165
165
  /** Renders a headless single-select combobox with keyboard navigation, selection tracking, and aria-activedescendant focus management. */
166
166
  export declare const view: <ParentMessage, Item extends string>(config: Readonly<{
167
167
  model: {
168
+ readonly maybeSelectedItem: Option.Option<string>;
169
+ readonly maybeSelectedDisplayText: Option.Option<string>;
168
170
  readonly id: string;
169
- readonly maybeActiveItemIndex: Option.Option<number>;
170
- readonly maybeLastPointerPosition: Option.Option<{
171
- readonly screenX: number;
172
- readonly screenY: number;
173
- }>;
174
171
  readonly isOpen: boolean;
175
172
  readonly isAnimated: boolean;
176
173
  readonly isModal: boolean;
174
+ readonly nullable: boolean;
175
+ readonly immediate: boolean;
176
+ readonly selectInputOnFocus: boolean;
177
177
  readonly animation: {
178
178
  readonly id: string;
179
179
  readonly isShowing: boolean;
180
180
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
181
181
  };
182
+ readonly maybeActiveItemIndex: Option.Option<number>;
182
183
  readonly activationTrigger: "Pointer" | "Keyboard";
183
- readonly maybeSelectedItem: Option.Option<string>;
184
- readonly nullable: boolean;
185
- readonly immediate: boolean;
186
- readonly selectInputOnFocus: boolean;
187
184
  readonly inputValue: string;
188
- readonly maybeSelectedDisplayText: Option.Option<string>;
185
+ readonly maybeLastPointerPosition: Option.Option<{
186
+ readonly screenX: number;
187
+ readonly screenY: number;
188
+ }>;
189
189
  };
190
190
  toParentMessage: (message: Opened | Closed | import("./shared.js").BlurredInput | import("./shared.js").ActivatedItem | import("./shared.js").DeactivatedItem | SelectedItem | import("./shared.js").MovedPointerOverItem | import("./shared.js").RequestedItemClick | import("./shared.js").UpdatedInputValue | import("./shared.js").PressedToggleButton | {
191
191
  readonly _tag: "CompletedAnchorCombobox";
@@ -172,33 +172,34 @@ export declare const SubscriptionDependencies: S.Struct<{
172
172
  export declare const subscriptions: import("../../runtime/subscription.js").Subscriptions<{
173
173
  readonly id: string;
174
174
  readonly orientation: "Vertical" | "Horizontal";
175
+ readonly activationThreshold: number;
175
176
  readonly dragState: {
176
177
  readonly _tag: "Idle";
177
178
  } | {
178
179
  readonly _tag: "Pending";
180
+ readonly itemId: string;
181
+ readonly containerId: string;
179
182
  readonly index: number;
180
183
  readonly origin: {
181
184
  readonly screenX: number;
182
185
  readonly screenY: number;
183
186
  };
184
- readonly containerId: string;
185
- readonly itemId: string;
186
187
  } | {
187
188
  readonly _tag: "Dragging";
189
+ readonly itemId: string;
190
+ readonly sourceContainerId: string;
191
+ readonly sourceIndex: number;
188
192
  readonly origin: {
189
193
  readonly screenX: number;
190
194
  readonly screenY: number;
191
195
  };
192
- readonly itemId: string;
193
- readonly sourceContainerId: string;
194
- readonly sourceIndex: number;
195
196
  readonly current: {
196
197
  readonly clientX: number;
197
198
  readonly clientY: number;
198
199
  };
199
200
  readonly maybeDropTarget: Option.Option<{
200
- readonly index: number;
201
201
  readonly containerId: string;
202
+ readonly index: number;
202
203
  }>;
203
204
  } | {
204
205
  readonly _tag: "KeyboardDragging";
@@ -208,16 +209,15 @@ export declare const subscriptions: import("../../runtime/subscription.js").Subs
208
209
  readonly targetContainerId: string;
209
210
  readonly targetIndex: number;
210
211
  };
211
- readonly activationThreshold: number;
212
212
  }, {
213
213
  readonly _tag: "CancelledDrag";
214
214
  } | {
215
215
  readonly _tag: "PressedDraggable";
216
+ readonly itemId: string;
217
+ readonly containerId: string;
218
+ readonly index: number;
216
219
  readonly screenX: number;
217
220
  readonly screenY: number;
218
- readonly index: number;
219
- readonly containerId: string;
220
- readonly itemId: string;
221
221
  } | {
222
222
  readonly _tag: "MovedPointer";
223
223
  readonly screenX: number;
@@ -225,16 +225,16 @@ export declare const subscriptions: import("../../runtime/subscription.js").Subs
225
225
  readonly clientX: number;
226
226
  readonly clientY: number;
227
227
  readonly maybeDropTarget: Option.Option<{
228
- readonly index: number;
229
228
  readonly containerId: string;
229
+ readonly index: number;
230
230
  }>;
231
231
  } | {
232
232
  readonly _tag: "ReleasedPointer";
233
233
  } | {
234
234
  readonly _tag: "ActivatedKeyboardDrag";
235
- readonly index: number;
236
- readonly containerId: string;
237
235
  readonly itemId: string;
236
+ readonly containerId: string;
237
+ readonly index: number;
238
238
  } | {
239
239
  readonly _tag: "ResolvedKeyboardMove";
240
240
  readonly targetContainerId: string;
@@ -34,13 +34,8 @@ export type InitConfig = BaseInitConfig & Readonly<{
34
34
  export declare const init: (config: InitConfig) => Model;
35
35
  /** Processes a listbox message and returns the next model and commands. Stays open on selection and toggles item membership (multi-select behavior). */
36
36
  export declare const update: (model: {
37
+ readonly selectedItems: readonly string[];
37
38
  readonly id: string;
38
- readonly maybeActiveItemIndex: Option.Option<number>;
39
- readonly maybeLastPointerPosition: Option.Option<{
40
- readonly screenX: number;
41
- readonly screenY: number;
42
- }>;
43
- readonly maybeLastButtonPointerType: Option.Option<string>;
44
39
  readonly isOpen: boolean;
45
40
  readonly isAnimated: boolean;
46
41
  readonly isModal: boolean;
@@ -50,18 +45,18 @@ export declare const update: (model: {
50
45
  readonly isShowing: boolean;
51
46
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
52
47
  };
48
+ readonly maybeActiveItemIndex: Option.Option<number>;
53
49
  readonly activationTrigger: "Pointer" | "Keyboard";
54
50
  readonly searchQuery: string;
55
51
  readonly searchVersion: number;
56
- readonly selectedItems: readonly string[];
57
- }, message: Message) => readonly [{
58
- readonly id: string;
59
- readonly maybeActiveItemIndex: Option.Option<number>;
60
52
  readonly maybeLastPointerPosition: Option.Option<{
61
53
  readonly screenX: number;
62
54
  readonly screenY: number;
63
55
  }>;
64
56
  readonly maybeLastButtonPointerType: Option.Option<string>;
57
+ }, message: Message) => readonly [{
58
+ readonly selectedItems: readonly string[];
59
+ readonly id: string;
65
60
  readonly isOpen: boolean;
66
61
  readonly isAnimated: boolean;
67
62
  readonly isModal: boolean;
@@ -71,10 +66,15 @@ export declare const update: (model: {
71
66
  readonly isShowing: boolean;
72
67
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
73
68
  };
69
+ readonly maybeActiveItemIndex: Option.Option<number>;
74
70
  readonly activationTrigger: "Pointer" | "Keyboard";
75
71
  readonly searchQuery: string;
76
72
  readonly searchVersion: number;
77
- readonly selectedItems: readonly string[];
73
+ readonly maybeLastPointerPosition: Option.Option<{
74
+ readonly screenX: number;
75
+ readonly screenY: number;
76
+ }>;
77
+ readonly maybeLastButtonPointerType: Option.Option<string>;
78
78
  }, readonly Readonly<{
79
79
  name: string;
80
80
  args?: Record<string, unknown>;
@@ -87,8 +87,8 @@ export declare const update: (model: {
87
87
  readonly _tag: "BlurredItems";
88
88
  } | {
89
89
  readonly _tag: "ActivatedItem";
90
- readonly activationTrigger: "Pointer" | "Keyboard";
91
90
  readonly index: number;
91
+ readonly activationTrigger: "Pointer" | "Keyboard";
92
92
  } | {
93
93
  readonly _tag: "DeactivatedItem";
94
94
  } | {
@@ -106,9 +106,9 @@ export declare const update: (model: {
106
106
  readonly version: number;
107
107
  } | {
108
108
  readonly _tag: "MovedPointerOverItem";
109
+ readonly index: number;
109
110
  readonly screenX: number;
110
111
  readonly screenY: number;
111
- readonly index: number;
112
112
  } | {
113
113
  readonly _tag: "CompletedLockScroll";
114
114
  } | {
@@ -146,8 +146,8 @@ export declare const update: (model: {
146
146
  };
147
147
  } | {
148
148
  readonly _tag: "PressedPointerOnButton";
149
- readonly button: number;
150
149
  readonly pointerType: string;
150
+ readonly button: number;
151
151
  }, never, never>;
152
152
  }>[]];
153
153
  /** Programmatically opens the listbox, updating the model and returning
@@ -163,13 +163,8 @@ export type ViewConfig<ParentMessage, Item> = BaseViewConfig<ParentMessage, Item
163
163
  /** Renders a headless multi-select listbox with typeahead search, keyboard navigation, selection tracking, and aria-activedescendant focus management. */
164
164
  export declare const view: <ParentMessage, Item>(config: Readonly<{
165
165
  model: {
166
+ readonly selectedItems: readonly string[];
166
167
  readonly id: string;
167
- readonly maybeActiveItemIndex: Option.Option<number>;
168
- readonly maybeLastPointerPosition: Option.Option<{
169
- readonly screenX: number;
170
- readonly screenY: number;
171
- }>;
172
- readonly maybeLastButtonPointerType: Option.Option<string>;
173
168
  readonly isOpen: boolean;
174
169
  readonly isAnimated: boolean;
175
170
  readonly isModal: boolean;
@@ -179,10 +174,15 @@ export declare const view: <ParentMessage, Item>(config: Readonly<{
179
174
  readonly isShowing: boolean;
180
175
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
181
176
  };
177
+ readonly maybeActiveItemIndex: Option.Option<number>;
182
178
  readonly activationTrigger: "Pointer" | "Keyboard";
183
179
  readonly searchQuery: string;
184
180
  readonly searchVersion: number;
185
- readonly selectedItems: readonly string[];
181
+ readonly maybeLastPointerPosition: Option.Option<{
182
+ readonly screenX: number;
183
+ readonly screenY: number;
184
+ }>;
185
+ readonly maybeLastButtonPointerType: Option.Option<string>;
186
186
  };
187
187
  toParentMessage: (message: Opened | Closed | import("./shared.js").BlurredItems | import("./shared.js").ActivatedItem | import("./shared.js").DeactivatedItem | SelectedItem | import("./shared.js").MovedPointerOverItem | import("./shared.js").RequestedItemClick | import("./shared.js").Searched | import("./shared.js").PressedPointerOnButton | import("./shared.js").IgnoredMouseClick | import("./shared.js").SuppressedSpaceScroll | {
188
188
  readonly _tag: "CompletedAnchorListbox";