@foldkit/ui 0.135.0 → 0.136.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.
@@ -11,10 +11,14 @@ import { DEFAULT_DURATION, Dismissed, DismissedAll, ElapsedDuration, GotAnimatio
11
11
  * the update function. Static. The Command definition doesn't depend on
12
12
  * payload. */
13
13
  export const DismissAfter = Command.define('DismissAfter', {
14
- entryId: S.String,
15
- version: S.Number,
16
- duration: S.DurationFromMillis,
17
- }, ElapsedDuration)(({ entryId, version, duration }) => __foldkitBrandViewResult((Effect.sleep(duration).pipe(Effect.as(ElapsedDuration({ entryId, version })))), "@foldkit/ui/toast/update.js#anonymous"));
14
+ args: {
15
+ entryId: S.String,
16
+ version: S.Number,
17
+ duration: S.DurationFromMillis,
18
+ },
19
+ messages: [ElapsedDuration],
20
+ execute: ({ entryId, version, duration }) => __foldkitBrandViewResult((Effect.sleep(duration).pipe(Effect.as(ElapsedDuration({ entryId, version })))), "@foldkit/ui/toast/update.js#execute"),
21
+ });
18
22
  const DEFAULT_VARIANT = 'Info';
19
23
  /** Factory that binds Toast's runtime (update fn, helpers, commands) to a
20
24
  * specific payload schema. Called by `make` in index.ts; inner helpers close
@@ -32,10 +36,10 @@ export const makeRuntime = (payloadSchema) => {
32
36
  const DismissedToast = makeDismissedToast(payloadSchema);
33
37
  const withUpdateReturn = M.withReturnType();
34
38
  const updateEntry = (model, entryId, f) => __foldkitBrandViewResult((evo(model, {
35
- entries: Array.map(entry => (__foldkitBrandViewResult((entry.id === entryId ? f(entry) : entry), "@foldkit/ui/toast/update.js#anonymous~2"))),
39
+ entries: Array.map(entry => (__foldkitBrandViewResult((entry.id === entryId ? f(entry) : entry), "@foldkit/ui/toast/update.js#anonymous"))),
36
40
  })), "@foldkit/ui/toast/update.js#updateEntry");
37
41
  const removeEntry = (model, entryId) => __foldkitBrandViewResult((evo(model, {
38
- entries: Array.filter(({ id }) => __foldkitBrandViewResult((id !== entryId), "@foldkit/ui/toast/update.js#anonymous~3")),
42
+ entries: Array.filter(({ id }) => __foldkitBrandViewResult((id !== entryId), "@foldkit/ui/toast/update.js#anonymous~2")),
39
43
  })), "@foldkit/ui/toast/update.js#removeEntry");
40
44
  const isEntryLeaving = (entry) => {
41
45
  const { transitionState } = entry.animation;
@@ -56,7 +60,7 @@ export const makeRuntime = (payloadSchema) => {
56
60
  }
57
61
  };
58
62
  const delegateToEntryAnimation = (model, entryId, animationMessage) => {
59
- const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~4"));
63
+ const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~3"));
60
64
  return __foldkitBrandViewResult((Option.match(maybeEntry, {
61
65
  onNone: () => __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/toast/update.js#onNone~2"),
62
66
  onSome: entry => {
@@ -68,13 +72,13 @@ export const makeRuntime = (payloadSchema) => {
68
72
  });
69
73
  return __foldkitBrandViewResult((Option.match(maybeOutMessage, {
70
74
  onNone: () => __foldkitBrandViewResult(([
71
- updateEntry(model, entryId, () => __foldkitBrandViewResult((nextEntry), "@foldkit/ui/toast/update.js#anonymous~5")),
75
+ updateEntry(model, entryId, () => __foldkitBrandViewResult((nextEntry), "@foldkit/ui/toast/update.js#anonymous~4")),
72
76
  mappedCommands,
73
77
  Option.none(),
74
78
  ]), "@foldkit/ui/toast/update.js#onNone~3"),
75
79
  onSome: M.type().pipe(withUpdateReturn, M.tagsExhaustive({
76
80
  StartedLeaveAnimating: () => __foldkitBrandViewResult(([
77
- updateEntry(model, entryId, () => __foldkitBrandViewResult((nextEntry), "@foldkit/ui/toast/update.js#anonymous~6")),
81
+ updateEntry(model, entryId, () => __foldkitBrandViewResult((nextEntry), "@foldkit/ui/toast/update.js#anonymous~5")),
78
82
  [
79
83
  ...mappedCommands,
80
84
  Command.mapMessage(animationDefaultLeaveCommand(nextAnimation), toMessage),
@@ -126,7 +130,7 @@ export const makeRuntime = (payloadSchema) => {
126
130
  nextEntryKey: Number.increment,
127
131
  });
128
132
  const [modelAfterShow, showCommands] = delegateToEntryAnimation(modelWithEntry, entry.id, AnimationShowed());
129
- const postShowEntry = Array.findFirst(modelAfterShow.entries, ({ id }) => __foldkitBrandViewResult((id === entry.id), "@foldkit/ui/toast/update.js#anonymous~7"));
133
+ const postShowEntry = Array.findFirst(modelAfterShow.entries, ({ id }) => __foldkitBrandViewResult((id === entry.id), "@foldkit/ui/toast/update.js#anonymous~6"));
130
134
  const dismissCommands = Option.match(postShowEntry, {
131
135
  onNone: () => __foldkitBrandViewResult(([]), "@foldkit/ui/toast/update.js#onNone~4"),
132
136
  onSome: rescheduleDismissCommands,
@@ -138,7 +142,7 @@ export const makeRuntime = (payloadSchema) => {
138
142
  ]), "@foldkit/ui/toast/update.js#Added");
139
143
  },
140
144
  Dismissed: ({ entryId }) => {
141
- const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~8"));
145
+ const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~7"));
142
146
  return __foldkitBrandViewResult((Option.match(maybeEntry, {
143
147
  onNone: () => __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/toast/update.js#onNone~5"),
144
148
  onSome: entry => {
@@ -153,17 +157,17 @@ export const makeRuntime = (payloadSchema) => {
153
157
  },
154
158
  DismissedAll: () => __foldkitBrandViewResult((Array.reduce(model.entries, [model, [], Option.none()], ([currentModel, currentCommands, currentOut], entry) => {
155
159
  if (isEntryLeaving(entry)) {
156
- return __foldkitBrandViewResult(([currentModel, currentCommands, currentOut]), "@foldkit/ui/toast/update.js#anonymous~9");
160
+ return __foldkitBrandViewResult(([currentModel, currentCommands, currentOut]), "@foldkit/ui/toast/update.js#anonymous~8");
157
161
  }
158
162
  const [nextModel, nextCommands] = delegateToEntryAnimation(currentModel, entry.id, AnimationHid());
159
163
  return __foldkitBrandViewResult(([
160
164
  nextModel,
161
165
  [...currentCommands, ...nextCommands],
162
166
  currentOut,
163
- ]), "@foldkit/ui/toast/update.js#anonymous~9");
167
+ ]), "@foldkit/ui/toast/update.js#anonymous~8");
164
168
  })), "@foldkit/ui/toast/update.js#DismissedAll"),
165
169
  ElapsedDuration: ({ entryId, version }) => {
166
- const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~10"));
170
+ const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~9"));
167
171
  return __foldkitBrandViewResult((Option.match(maybeEntry, {
168
172
  onNone: () => __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/toast/update.js#onNone~6"),
169
173
  onSome: entry => {
@@ -181,12 +185,12 @@ export const makeRuntime = (payloadSchema) => {
181
185
  updateEntry(model, entryId, entry => __foldkitBrandViewResult((evo(entry, {
182
186
  isHovered: () => __foldkitBrandViewResult((true), "@foldkit/ui/toast/update.js#isHovered"),
183
187
  pendingDismissVersion: Number.increment,
184
- })), "@foldkit/ui/toast/update.js#anonymous~11")),
188
+ })), "@foldkit/ui/toast/update.js#anonymous~10")),
185
189
  [],
186
190
  Option.none(),
187
191
  ]), "@foldkit/ui/toast/update.js#HoveredEntry"),
188
192
  LeftEntry: ({ entryId }) => {
189
- const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~12"));
193
+ const maybeEntry = Array.findFirst(model.entries, ({ id }) => __foldkitBrandViewResult((id === entryId), "@foldkit/ui/toast/update.js#anonymous~11"));
190
194
  return __foldkitBrandViewResult((Option.match(maybeEntry, {
191
195
  onNone: () => __foldkitBrandViewResult(([model, [], Option.none()]), "@foldkit/ui/toast/update.js#onNone~7"),
192
196
  onSome: entry => {
@@ -195,7 +199,7 @@ export const makeRuntime = (payloadSchema) => {
195
199
  pendingDismissVersion: Number.increment,
196
200
  });
197
201
  return __foldkitBrandViewResult(([
198
- updateEntry(model, entryId, () => __foldkitBrandViewResult((nextEntry), "@foldkit/ui/toast/update.js#anonymous~13")),
202
+ updateEntry(model, entryId, () => __foldkitBrandViewResult((nextEntry), "@foldkit/ui/toast/update.js#anonymous~12")),
199
203
  rescheduleDismissCommands(nextEntry),
200
204
  Option.none(),
201
205
  ]), "@foldkit/ui/toast/update.js#onSome~5");
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,MAAM,EAKN,MAAM,EAEN,MAAM,IAAI,CAAC,EACZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CAAA;AAE9E,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,kBAAkB,CAAA;AAE3D,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAA;AAKxD,8pBAA8pB;AAC9pB,eAAO,MAAM,KAAK;;;;;;;;;EAShB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,wDAAwD;AACxD,eAAO,MAAM,cAAc,qEAAsB,CAAA;AACjD,wDAAwD;AACxD,eAAO,MAAM,WAAW,kEAAmB,CAAA;AAC3C,0CAA0C;AAC1C,eAAO,MAAM,cAAc,qEAAsB,CAAA;AACjD,0CAA0C;AAC1C,eAAO,MAAM,cAAc,qEAAsB,CAAA;AACjD,gEAAgE;AAChE,eAAO,MAAM,aAAa,oEAAqB,CAAA;AAC/C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86
  }), "@foldkit/ui/tooltip/index.js#init"));
87
87
  const withUpdateReturn = M.withReturnType();
88
88
  /** Waits for the tooltip's show delay before emitting `ElapsedShowDelay`. */
89
- export const ShowAfterDelay = Command.define('ShowAfterDelay', { delay: S.DurationFromMillis, version: S.Number }, ElapsedShowDelay)(({ delay, version }) => __foldkitBrandViewResult((Effect.sleep(delay).pipe(Effect.as(ElapsedShowDelay({ version })))), "@foldkit/ui/tooltip/index.js#anonymous"));
89
+ export const ShowAfterDelay = Command.define('ShowAfterDelay', {
90
+ args: { delay: S.DurationFromMillis, version: S.Number },
91
+ messages: [ElapsedShowDelay],
92
+ execute: ({ delay, version }) => __foldkitBrandViewResult((Effect.sleep(delay).pipe(Effect.as(ElapsedShowDelay({ version })))), "@foldkit/ui/tooltip/index.js#execute"),
93
+ });
90
94
  /** The anchor-positioning Mount this Tooltip renders on its panel. */
91
95
  export const AnchorTooltip = Mount.define('AnchorTooltip', { buttonId: S.String, anchor: AnchorConfig }, CompletedAnchorTooltip)(({ buttonId, anchor }) => __foldkitBrandViewResult((element => __foldkitBrandViewResult((Effect.gen(function* () {
92
96
  yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((anchorSetup({
93
97
  buttonId,
94
98
  anchor,
95
99
  interceptTab: false,
96
- })(element)), "@foldkit/ui/tooltip/index.js#anonymous~5")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/tooltip/index.js#anonymous~6"));
97
- return __foldkitBrandViewResult((CompletedAnchorTooltip()), "@foldkit/ui/tooltip/index.js#anonymous~4");
98
- })), "@foldkit/ui/tooltip/index.js#anonymous~3")), "@foldkit/ui/tooltip/index.js#anonymous~2"));
100
+ })(element)), "@foldkit/ui/tooltip/index.js#anonymous~4")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/tooltip/index.js#anonymous~5"));
101
+ return __foldkitBrandViewResult((CompletedAnchorTooltip()), "@foldkit/ui/tooltip/index.js#anonymous~3");
102
+ })), "@foldkit/ui/tooltip/index.js#anonymous~2")), "@foldkit/ui/tooltip/index.js#anonymous"));
99
103
  const computeUpdate = (model, message) => __foldkitBrandViewResult((M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
100
104
  EnteredTrigger: () => {
101
105
  if (model.isOpen || model.isDismissed) {
@@ -198,7 +202,7 @@ export const update = (model, message) => {
198
202
  /** Reflects an externally-sourced hover show-delay onto the model without
199
203
  * emitting an OutMessage. Use to mirror an external config value (a user
200
204
  * preference, a restored setting) onto the tooltip. */
201
- export const reflectShowDelay = Function.dual(2, (model, showDelay) => __foldkitBrandViewResult((evo(model, { showDelay: () => __foldkitBrandViewResult((Duration.fromInputUnsafe(showDelay)), "@foldkit/ui/tooltip/index.js#showDelay") })), "@foldkit/ui/tooltip/index.js#anonymous~7"));
205
+ export const reflectShowDelay = Function.dual(2, (model, showDelay) => __foldkitBrandViewResult((evo(model, { showDelay: () => __foldkitBrandViewResult((Duration.fromInputUnsafe(showDelay)), "@foldkit/ui/tooltip/index.js#showDelay") })), "@foldkit/ui/tooltip/index.js#anonymous~6"));
202
206
  /** Renders a headless tooltip with an anchored non-interactive panel.
203
207
  * Shows on hover (after delay) or focus (from keyboard, touch, or pen;
204
208
  * mouse-click focus is excluded). Hides on leave, blur, or Escape. */
@@ -217,7 +221,7 @@ export const view = defineView((model, viewInputs, h) => {
217
221
  }
218
222
  };
219
223
  const triggerLabelAttributes = resolveTriggerLabel();
220
- const handleTriggerKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((OptionExt.when(isOpen, PressedEscape())), "@foldkit/ui/tooltip/index.js#anonymous~9")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/tooltip/index.js#anonymous~10")))), "@foldkit/ui/tooltip/index.js#handleTriggerKeyDown");
224
+ const handleTriggerKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((OptionExt.when(isOpen, PressedEscape())), "@foldkit/ui/tooltip/index.js#anonymous~8")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/tooltip/index.js#anonymous~9")))), "@foldkit/ui/tooltip/index.js#handleTriggerKeyDown");
221
225
  const handleTriggerPointerDown = (pointerType) => __foldkitBrandViewResult((Option.some(PressedPointerOnTrigger({ pointerType }))), "@foldkit/ui/tooltip/index.js#handleTriggerPointerDown");
222
226
  const triggerAttributes = [
223
227
  h.Id(`${id}-trigger`),
@@ -252,5 +256,5 @@ export const view = defineView((model, viewInputs, h) => {
252
256
  trigger: childAttributes(triggerAttributes),
253
257
  panel: childAttributes(panelAttributes),
254
258
  isVisible: isOpen,
255
- })), "@foldkit/ui/tooltip/index.js#anonymous~8");
259
+ })), "@foldkit/ui/tooltip/index.js#anonymous~7");
256
260
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/virtualList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,IAAI,EACT,KAAK,OAAO,EAEb,MAAM,cAAc,CAAA;AAIrB,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAc,MAAM,kBAAkB,CAAA;AACxE,OAAO,KAAK,YAAY,MAAM,sBAAsB,CAAA;AAyBpD;0DAC0D;AAC1D,eAAO,MAAM,KAAK;;;;;;;;;;;;EAOhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC;kCACkC;AAClC,eAAO,MAAM,iBAAiB;;EAE5B,CAAA;AACF;uCACuC;AACvC,eAAO,MAAM,iBAAiB;;EAE5B,CAAA;AACF;8DAC8D;AAC9D,eAAO,MAAM,oBAAoB;;EAE/B,CAAA;AAE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AC,IAAI,IAAI,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;AAEvE,eAAO,MAAM,IAAI,GAAI,IAAI,OAEA,WAAW,CAAC,IAAI,CAAC,CAAA"}
@@ -65,13 +65,17 @@ export const init = (config) => (__foldkitBrandViewResult(({
65
65
  pendingScrollVersion: 0,
66
66
  }), "@foldkit/ui/virtualList/index.js#init"));
67
67
  // UPDATE
68
- export const ApplyScroll = Command.define('ApplyScroll', { id: S.String, scrollTop: S.Number, version: S.Number }, CompletedApplyScroll)(({ id, scrollTop, version }) => __foldkitBrandViewResult((Effect.sync(() => {
69
- const element = document.getElementById(id);
70
- if (element !== null) {
71
- element.scrollTop = scrollTop;
72
- }
73
- return __foldkitBrandViewResult((CompletedApplyScroll({ version })), "@foldkit/ui/virtualList/index.js#anonymous~2");
74
- })), "@foldkit/ui/virtualList/index.js#anonymous"));
68
+ export const ApplyScroll = Command.define('ApplyScroll', {
69
+ args: { id: S.String, scrollTop: S.Number, version: S.Number },
70
+ messages: [CompletedApplyScroll],
71
+ execute: ({ id, scrollTop, version }) => __foldkitBrandViewResult((Effect.sync(() => {
72
+ const element = document.getElementById(id);
73
+ if (element !== null) {
74
+ element.scrollTop = scrollTop;
75
+ }
76
+ return __foldkitBrandViewResult((CompletedApplyScroll({ version })), "@foldkit/ui/virtualList/index.js#anonymous");
77
+ })), "@foldkit/ui/virtualList/index.js#execute"),
78
+ });
75
79
  /** Processes a virtual list message and returns the next model and commands. */
76
80
  export const update = (model, message) => __foldkitBrandViewResult((M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
77
81
  ScrolledContainer: ({ scrollTop }) => __foldkitBrandViewResult(([
@@ -165,15 +169,15 @@ export const scrollToIndex = (model, index) => __foldkitBrandViewResult((buildSc
165
169
  * `MeasuredContainer` arrives. */
166
170
  export const scrollToIndexVariable = (model, items, itemToRowHeightPx, index) => {
167
171
  const cumulativeOffsets = prefixSum(items, itemToRowHeightPx);
168
- const targetScrollTop = pipe(cumulativeOffsets, Array.get(Math.max(0, index)), Option.getOrElse(() => __foldkitBrandViewResult((lastOrZero(cumulativeOffsets)), "@foldkit/ui/virtualList/index.js#anonymous~3")));
172
+ const targetScrollTop = pipe(cumulativeOffsets, Array.get(Math.max(0, index)), Option.getOrElse(() => __foldkitBrandViewResult((lastOrZero(cumulativeOffsets)), "@foldkit/ui/virtualList/index.js#anonymous~2")));
169
173
  return __foldkitBrandViewResult((buildScrollToIndex(model, index, targetScrollTop)), "@foldkit/ui/virtualList/index.js#scrollToIndexVariable");
170
174
  };
171
175
  const clampIndex = (index, itemCount) => __foldkitBrandViewResult((Math.max(0, Math.min(index, itemCount))), "@foldkit/ui/virtualList/index.js#clampIndex");
172
176
  const prefixSum = (items, itemToRowHeightPx) => {
173
177
  const heights = Array.map(items, itemToRowHeightPx);
174
- return __foldkitBrandViewResult((Array.scan(heights, 0, (cumulative, height) => __foldkitBrandViewResult((cumulative + height), "@foldkit/ui/virtualList/index.js#anonymous~4"))), "@foldkit/ui/virtualList/index.js#prefixSum");
178
+ return __foldkitBrandViewResult((Array.scan(heights, 0, (cumulative, height) => __foldkitBrandViewResult((cumulative + height), "@foldkit/ui/virtualList/index.js#anonymous~3"))), "@foldkit/ui/virtualList/index.js#prefixSum");
175
179
  };
176
- const lastOrZero = (values) => __foldkitBrandViewResult((pipe(values, Array.last, Option.getOrElse(() => __foldkitBrandViewResult((0), "@foldkit/ui/virtualList/index.js#anonymous~5")))), "@foldkit/ui/virtualList/index.js#lastOrZero");
180
+ const lastOrZero = (values) => __foldkitBrandViewResult((pipe(values, Array.last, Option.getOrElse(() => __foldkitBrandViewResult((0), "@foldkit/ui/virtualList/index.js#anonymous~4")))), "@foldkit/ui/virtualList/index.js#lastOrZero");
177
181
  /** Computes the visible slice of a data array given the current scroll
178
182
  * position, container height, row height, and an overscan buffer.
179
183
  *
@@ -221,11 +225,11 @@ export const visibleWindowVariable = (model, items, itemToRowHeightPx, overscan)
221
225
  onNone: () => __foldkitBrandViewResult((itemCount), "@foldkit/ui/virtualList/index.js#onNone"),
222
226
  onSome: index => __foldkitBrandViewResult((Math.max(0, index - 1)), "@foldkit/ui/virtualList/index.js#onSome"),
223
227
  }));
224
- const lastVisibleIndex = pipe(cumulativeOffsets, Array.findFirstIndex(Number.isGreaterThanOrEqualTo(model.scrollTop + containerHeight)), Option.getOrElse(() => __foldkitBrandViewResult((itemCount), "@foldkit/ui/virtualList/index.js#anonymous~6")));
228
+ const lastVisibleIndex = pipe(cumulativeOffsets, Array.findFirstIndex(Number.isGreaterThanOrEqualTo(model.scrollTop + containerHeight)), Option.getOrElse(() => __foldkitBrandViewResult((itemCount), "@foldkit/ui/virtualList/index.js#anonymous~5")));
225
229
  const startIndex = clampIndex(firstVisibleIndex - overscan, itemCount);
226
230
  const endIndex = clampIndex(lastVisibleIndex + overscan, itemCount);
227
- const topSpacerHeight = pipe(cumulativeOffsets, Array.get(startIndex), Option.getOrElse(() => __foldkitBrandViewResult((0), "@foldkit/ui/virtualList/index.js#anonymous~7")));
228
- const offsetAtEnd = pipe(cumulativeOffsets, Array.get(endIndex), Option.getOrElse(() => __foldkitBrandViewResult((totalHeight), "@foldkit/ui/virtualList/index.js#anonymous~8")));
231
+ const topSpacerHeight = pipe(cumulativeOffsets, Array.get(startIndex), Option.getOrElse(() => __foldkitBrandViewResult((0), "@foldkit/ui/virtualList/index.js#anonymous~6")));
232
+ const offsetAtEnd = pipe(cumulativeOffsets, Array.get(endIndex), Option.getOrElse(() => __foldkitBrandViewResult((totalHeight), "@foldkit/ui/virtualList/index.js#anonymous~7")));
229
233
  const bottomSpacerHeight = totalHeight - offsetAtEnd;
230
234
  return __foldkitBrandViewResult((Option.some({
231
235
  startIndex,
@@ -322,16 +326,16 @@ export const subscriptions = Subscription.make()(entry => (__foldkitBrandViewRes
322
326
  childList: true,
323
327
  subtree: true,
324
328
  });
325
- return __foldkitBrandViewResult(({ state, detach, mutationObserver }), "@foldkit/ui/virtualList/index.js#anonymous~11");
329
+ return __foldkitBrandViewResult(({ state, detach, mutationObserver }), "@foldkit/ui/virtualList/index.js#anonymous~10");
326
330
  }), ({ state, detach, mutationObserver }) => __foldkitBrandViewResult((Effect.sync(() => {
327
331
  mutationObserver.disconnect();
328
332
  if (state.pendingFrame !== null) {
329
333
  cancelAnimationFrame(state.pendingFrame);
330
334
  }
331
335
  detach();
332
- })), "@foldkit/ui/virtualList/index.js#anonymous~15")).pipe(Effect.flatMap(() => __foldkitBrandViewResult((Effect.never), "@foldkit/ui/virtualList/index.js#anonymous~17")))), "@foldkit/ui/virtualList/index.js#anonymous~10"))), "@foldkit/ui/virtualList/index.js#dependenciesToStream"),
336
+ })), "@foldkit/ui/virtualList/index.js#anonymous~14")).pipe(Effect.flatMap(() => __foldkitBrandViewResult((Effect.never), "@foldkit/ui/virtualList/index.js#anonymous~16")))), "@foldkit/ui/virtualList/index.js#anonymous~9"))), "@foldkit/ui/virtualList/index.js#dependenciesToStream"),
333
337
  }),
334
- }), "@foldkit/ui/virtualList/index.js#anonymous~9")));
338
+ }), "@foldkit/ui/virtualList/index.js#anonymous~8")));
335
339
  // VIEW
336
340
  const DEFAULT_OVERSCAN = 5;
337
341
  export const view = () =>
@@ -384,9 +388,9 @@ const viewImpl = defineView((model, viewInputs, h) => {
384
388
  height: `${rowHeightFor(item, dataIndex)}px`,
385
389
  display: 'grid',
386
390
  }),
387
- ], [itemToView(item, dataIndex)])), "@foldkit/ui/virtualList/index.js#anonymous~19");
391
+ ], [itemToView(item, dataIndex)])), "@foldkit/ui/virtualList/index.js#anonymous~18");
388
392
  });
389
393
  return __foldkitBrandViewResult((renderContainer([topSpacer, ...renderedRows, bottomSpacer])), "@foldkit/ui/virtualList/index.js#onSome~2");
390
394
  },
391
- })), "@foldkit/ui/virtualList/index.js#anonymous~18");
395
+ })), "@foldkit/ui/virtualList/index.js#anonymous~17");
392
396
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/ui",
3
- "version": "0.135.0",
3
+ "version": "0.136.0",
4
4
  "description": "Headless, accessible UI components for Foldkit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -128,7 +128,7 @@
128
128
  "typescript": "^6.0.3",
129
129
  "vitest": "^4.1.9",
130
130
  "@foldkit/vite-plugin": "0.11.3",
131
- "foldkit": "0.135.0"
131
+ "foldkit": "0.136.0"
132
132
  },
133
133
  "keywords": [
134
134
  "foldkit",