@foldkit/ui 0.162.0 → 0.163.0-canary.085c0174a32b

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.
Files changed (113) hide show
  1. package/dist/anchor/anchor.d.ts +33 -7
  2. package/dist/anchor/anchor.d.ts.map +1 -1
  3. package/dist/anchor/anchor.js +102 -15
  4. package/dist/anchor/public.d.ts +1 -1
  5. package/dist/anchor/public.d.ts.map +1 -1
  6. package/dist/anchor/public.js +1 -1
  7. package/dist/animation/index.d.ts +3 -0
  8. package/dist/animation/index.d.ts.map +1 -1
  9. package/dist/animation/schema.d.ts +13 -4
  10. package/dist/animation/schema.d.ts.map +1 -1
  11. package/dist/animation/schema.js +8 -4
  12. package/dist/animation/update.d.ts +15 -5
  13. package/dist/animation/update.d.ts.map +1 -1
  14. package/dist/animation/update.js +59 -27
  15. package/dist/calendar/index.d.ts.map +1 -1
  16. package/dist/calendar/index.js +27 -19
  17. package/dist/checkbox/index.d.ts +1 -1
  18. package/dist/checkbox/index.js +1 -1
  19. package/dist/combobox/multi.d.ts +5 -0
  20. package/dist/combobox/multi.d.ts.map +1 -1
  21. package/dist/combobox/multi.js +2 -2
  22. package/dist/combobox/shared.d.ts +19 -7
  23. package/dist/combobox/shared.d.ts.map +1 -1
  24. package/dist/combobox/shared.js +28 -28
  25. package/dist/combobox/single.d.ts +5 -0
  26. package/dist/combobox/single.d.ts.map +1 -1
  27. package/dist/combobox/single.js +4 -4
  28. package/dist/datePicker/index.d.ts +13 -2
  29. package/dist/datePicker/index.d.ts.map +1 -1
  30. package/dist/datePicker/index.js +10 -10
  31. package/dist/dialog/index.d.ts +13 -2
  32. package/dist/dialog/index.d.ts.map +1 -1
  33. package/dist/dialog/index.js +28 -14
  34. package/dist/disclosure/index.d.ts +2 -2
  35. package/dist/disclosure/index.js +1 -1
  36. package/dist/dragAndDrop/index.js +14 -14
  37. package/dist/fileDrop/index.d.ts.map +1 -1
  38. package/dist/fileDrop/index.js +7 -5
  39. package/dist/hoverIntent/hoverIntent.d.ts.map +1 -1
  40. package/dist/hoverIntent/hoverIntent.js +16 -16
  41. package/dist/index.d.ts +2 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +2 -0
  44. package/dist/internal/accessibleName.d.ts +9 -0
  45. package/dist/internal/accessibleName.d.ts.map +1 -0
  46. package/dist/internal/accessibleName.js +12 -0
  47. package/dist/internal/range.d.ts +7 -0
  48. package/dist/internal/range.d.ts.map +1 -0
  49. package/dist/internal/range.js +12 -0
  50. package/dist/listbox/multi.d.ts +5 -0
  51. package/dist/listbox/multi.d.ts.map +1 -1
  52. package/dist/listbox/shared.d.ts +15 -4
  53. package/dist/listbox/shared.d.ts.map +1 -1
  54. package/dist/listbox/shared.js +32 -29
  55. package/dist/listbox/single.d.ts +5 -0
  56. package/dist/listbox/single.d.ts.map +1 -1
  57. package/dist/menu/index.d.ts +16 -4
  58. package/dist/menu/index.d.ts.map +1 -1
  59. package/dist/menu/index.js +35 -28
  60. package/dist/meter/index.d.ts +26 -0
  61. package/dist/meter/index.d.ts.map +1 -0
  62. package/dist/meter/index.js +67 -0
  63. package/dist/meter/public.d.ts +3 -0
  64. package/dist/meter/public.d.ts.map +1 -0
  65. package/dist/meter/public.js +1 -0
  66. package/dist/popover/index.d.ts +20 -4
  67. package/dist/popover/index.d.ts.map +1 -1
  68. package/dist/popover/index.js +20 -18
  69. package/dist/progress/index.d.ts +24 -0
  70. package/dist/progress/index.d.ts.map +1 -0
  71. package/dist/progress/index.js +85 -0
  72. package/dist/progress/public.d.ts +3 -0
  73. package/dist/progress/public.d.ts.map +1 -0
  74. package/dist/progress/public.js +1 -0
  75. package/dist/radioGroup/index.d.ts.map +1 -1
  76. package/dist/radioGroup/index.js +5 -3
  77. package/dist/slider/index.d.ts +61 -28
  78. package/dist/slider/index.d.ts.map +1 -1
  79. package/dist/slider/index.js +163 -87
  80. package/dist/slider/public.d.ts +1 -1
  81. package/dist/slider/public.d.ts.map +1 -1
  82. package/dist/slider/public.js +1 -1
  83. package/dist/switch/index.d.ts +1 -1
  84. package/dist/switch/index.js +1 -1
  85. package/dist/tabs/index.d.ts.map +1 -1
  86. package/dist/tabs/index.js +5 -3
  87. package/dist/test/apps/disabledButton.d.ts +12 -4
  88. package/dist/test/apps/disabledButton.d.ts.map +1 -1
  89. package/dist/test/apps/disabledButton.js +3 -3
  90. package/dist/toast/index.d.ts +869 -45
  91. package/dist/toast/index.d.ts.map +1 -1
  92. package/dist/toast/index.js +77 -17
  93. package/dist/toast/public.d.ts +2 -2
  94. package/dist/toast/public.d.ts.map +1 -1
  95. package/dist/toast/public.js +1 -1
  96. package/dist/toast/schema.d.ts +160 -6
  97. package/dist/toast/schema.d.ts.map +1 -1
  98. package/dist/toast/schema.js +69 -2
  99. package/dist/toast/swipeTarget.d.ts +5 -0
  100. package/dist/toast/swipeTarget.d.ts.map +1 -0
  101. package/dist/toast/swipeTarget.js +18 -0
  102. package/dist/toast/test.d.ts +7 -1
  103. package/dist/toast/test.d.ts.map +1 -1
  104. package/dist/toast/test.js +37 -3
  105. package/dist/toast/update.d.ts +768 -7
  106. package/dist/toast/update.d.ts.map +1 -1
  107. package/dist/toast/update.js +283 -68
  108. package/dist/tooltip/tooltip.d.ts +7 -7
  109. package/dist/tooltip/tooltip.d.ts.map +1 -1
  110. package/dist/tooltip/tooltip.js +14 -12
  111. package/dist/virtualList/index.d.ts.map +1 -1
  112. package/dist/virtualList/index.js +8 -6
  113. package/package.json +9 -9
@@ -134,6 +134,7 @@ export declare const Model: Schema.Struct<{
134
134
  readonly id: Schema.String;
135
135
  readonly isShowing: Schema.Boolean;
136
136
  readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
137
+ readonly transitionGeneration: Schema.Number;
137
138
  }>;
138
139
  readonly maybeLastButtonPointerType: Schema.Option<Schema.String>;
139
140
  }>;
@@ -201,8 +202,12 @@ export declare const Message: import("foldkit/message").MessageUnion<{
201
202
  message: import("foldkit/message").MessageUnion<{
202
203
  readonly Showed: {};
203
204
  readonly Hid: {};
204
- readonly CompletedWaitForPaint: {};
205
- readonly EndedAnimation: {};
205
+ readonly CompletedWaitForPaint: {
206
+ generation: Schema.Number;
207
+ };
208
+ readonly EndedAnimation: {
209
+ generation: Schema.Number;
210
+ };
206
211
  }>;
207
212
  };
208
213
  }>;
@@ -469,6 +474,7 @@ export declare const update: (model: Model, message: Message) => Readonly<{
469
474
  readonly id: string;
470
475
  readonly isShowing: boolean;
471
476
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
477
+ readonly transitionGeneration: number;
472
478
  };
473
479
  readonly maybeLastButtonPointerType: Option.Option<string>;
474
480
  };
@@ -543,8 +549,10 @@ export declare const update: (model: Model, message: Message) => Readonly<{
543
549
  readonly _tag: "GotAnimationMessage";
544
550
  readonly message: {
545
551
  readonly _tag: "CompletedWaitForPaint";
552
+ readonly generation: number;
546
553
  } | {
547
554
  readonly _tag: "EndedAnimation";
555
+ readonly generation: number;
548
556
  } | {
549
557
  readonly _tag: "Hid";
550
558
  } | {
@@ -878,6 +886,7 @@ export declare const view: import("foldkit/submodel").View<{
878
886
  readonly id: string;
879
887
  readonly isShowing: boolean;
880
888
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
889
+ readonly transitionGeneration: number;
881
890
  };
882
891
  readonly maybeLastButtonPointerType: Option.Option<string>;
883
892
  };
@@ -951,8 +960,10 @@ export declare const view: import("foldkit/submodel").View<{
951
960
  readonly _tag: "GotAnimationMessage";
952
961
  readonly message: {
953
962
  readonly _tag: "CompletedWaitForPaint";
963
+ readonly generation: number;
954
964
  } | {
955
965
  readonly _tag: "EndedAnimation";
966
+ readonly generation: number;
956
967
  } | {
957
968
  readonly _tag: "Hid";
958
969
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datePic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,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;CACnD,CAAC,GACA,UAAU,CAAC,UAAU,CAAA;AAEvB;;;;gEAIgE;AAChE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiJhB,CAAA"}
@@ -2,7 +2,7 @@ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
2
  import { Function, Option, Predicate, Schema } from 'effect';
3
3
  import * as Calendar from 'foldkit/calendar';
4
4
  import { defineMessageUnion } from 'foldkit/message';
5
- import { evo } from 'foldkit/struct';
5
+ import { modifyFields } from 'foldkit/struct';
6
6
  import { defineView } from 'foldkit/submodel';
7
7
  import * as Update from 'foldkit/update';
8
8
  import * as UiCalendar from '../calendar/index.js';
@@ -70,10 +70,10 @@ export const init = (config) => (__foldkitBrandViewResult(({
70
70
  }),
71
71
  }), "@foldkit/ui/datePicker/index.js#init"));
72
72
  const dropCalendarToDays = model => (__foldkitBrandViewResult(({
73
- model: evo(model, { calendar: UiCalendar.dropToDays }),
73
+ model: modifyFields(model, { calendar: UiCalendar.dropToDays }),
74
74
  }), "@foldkit/ui/datePicker/index.js#dropCalendarToDays"));
75
75
  const readPopover = (model) => __foldkitBrandViewResult((Option.some(model.popover)), "@foldkit/ui/datePicker/index.js#readPopover");
76
- const writePopover = (model, nextPopover) => __foldkitBrandViewResult((evo(model, { popover: () => __foldkitBrandViewResult((nextPopover), "@foldkit/ui/datePicker/index.js#popover") })), "@foldkit/ui/datePicker/index.js#writePopover");
76
+ const writePopover = (model, nextPopover) => __foldkitBrandViewResult((modifyFields(model, { popover: () => __foldkitBrandViewResult((nextPopover), "@foldkit/ui/datePicker/index.js#popover") })), "@foldkit/ui/datePicker/index.js#writePopover");
77
77
  const toGotPopoverMessage = (message) => __foldkitBrandViewResult((Message.GotPopoverMessage({ message })), "@foldkit/ui/datePicker/index.js#toGotPopoverMessage");
78
78
  const foldPopoverOutMessage = Popover.OutMessage.match({
79
79
  Opened: () => __foldkitBrandViewResult((dropCalendarToDays), "@foldkit/ui/datePicker/index.js#Opened"),
@@ -111,7 +111,7 @@ const toDatePickerOutMessage = UiCalendar.OutMessage.match({
111
111
  const foldCalendar = Update.foldChild({
112
112
  update: UiCalendar.update,
113
113
  read: (model) => __foldkitBrandViewResult((Option.some(model.calendar)), "@foldkit/ui/datePicker/index.js#read"),
114
- write: (model, nextCalendar) => __foldkitBrandViewResult((evo(model, { calendar: () => __foldkitBrandViewResult((nextCalendar), "@foldkit/ui/datePicker/index.js#calendar") })), "@foldkit/ui/datePicker/index.js#write"),
114
+ write: (model, nextCalendar) => __foldkitBrandViewResult((modifyFields(model, { calendar: () => __foldkitBrandViewResult((nextCalendar), "@foldkit/ui/datePicker/index.js#calendar") })), "@foldkit/ui/datePicker/index.js#write"),
115
115
  toParentMessage: message => __foldkitBrandViewResult((Message.GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage"),
116
116
  toParentOutMessage: toDatePickerOutMessage,
117
117
  foldOutMessage: foldCalendarOutMessage,
@@ -119,7 +119,7 @@ const foldCalendar = Update.foldChild({
119
119
  const foldCalendarSelectDate = Update.foldChild({
120
120
  update: UiCalendar.selectDate,
121
121
  read: (model) => __foldkitBrandViewResult((Option.some(model.calendar)), "@foldkit/ui/datePicker/index.js#read~2"),
122
- write: (model, nextCalendar) => __foldkitBrandViewResult((evo(model, { calendar: () => __foldkitBrandViewResult((nextCalendar), "@foldkit/ui/datePicker/index.js#calendar~2") })), "@foldkit/ui/datePicker/index.js#write~2"),
122
+ write: (model, nextCalendar) => __foldkitBrandViewResult((modifyFields(model, { calendar: () => __foldkitBrandViewResult((nextCalendar), "@foldkit/ui/datePicker/index.js#calendar~2") })), "@foldkit/ui/datePicker/index.js#write~2"),
123
123
  toParentMessage: message => __foldkitBrandViewResult((Message.GotCalendarMessage({ message })), "@foldkit/ui/datePicker/index.js#toParentMessage~2"),
124
124
  toParentOutMessage: toDatePickerOutMessage,
125
125
  foldOutMessage: foldCalendarOutMessage,
@@ -148,7 +148,7 @@ export const clear = (model) => __foldkitBrandViewResult((update(model, Message.
148
148
  * known date, for example after the parent sets its value externally (a URL
149
149
  * parameter, a saved draft) so opening the picker shows that month. Returns
150
150
  * the Model directly because it produces no Commands and no OutMessage. */
151
- export const focusDate = Function.dual(2, (model, date) => __foldkitBrandViewResult((evo(model, {
151
+ export const focusDate = Function.dual(2, (model, date) => __foldkitBrandViewResult((modifyFields(model, {
152
152
  calendar: () => __foldkitBrandViewResult((UiCalendar.focusDate(model.calendar, date)), "@foldkit/ui/datePicker/index.js#calendar~3"),
153
153
  })), "@foldkit/ui/datePicker/index.js#anonymous~2"));
154
154
  /** Reflects the minimum selectable date onto the embedded calendar. Pass
@@ -159,25 +159,25 @@ export const focusDate = Function.dual(2, (model, date) => __foldkitBrandViewRes
159
159
  * Does NOT reconcile the current selection. If a previously-selected date
160
160
  * is now below the new minimum, it remains selected. Callers should `clear`
161
161
  * or reassign the selection explicitly if their domain requires it. */
162
- export const reflectMinDate = Function.dual(2, (model, maybeMinDate) => __foldkitBrandViewResult((evo(model, {
162
+ export const reflectMinDate = Function.dual(2, (model, maybeMinDate) => __foldkitBrandViewResult((modifyFields(model, {
163
163
  calendar: () => __foldkitBrandViewResult((UiCalendar.reflectMinDate(model.calendar, maybeMinDate)), "@foldkit/ui/datePicker/index.js#calendar~4"),
164
164
  })), "@foldkit/ui/datePicker/index.js#anonymous~3"));
165
165
  /** Reflects the maximum selectable date onto the embedded calendar. Pass
166
166
  * `Option.none()` to remove the maximum. Does NOT reconcile the current
167
167
  * selection. */
168
- export const reflectMaxDate = Function.dual(2, (model, maybeMaxDate) => __foldkitBrandViewResult((evo(model, {
168
+ export const reflectMaxDate = Function.dual(2, (model, maybeMaxDate) => __foldkitBrandViewResult((modifyFields(model, {
169
169
  calendar: () => __foldkitBrandViewResult((UiCalendar.reflectMaxDate(model.calendar, maybeMaxDate)), "@foldkit/ui/datePicker/index.js#calendar~5"),
170
170
  })), "@foldkit/ui/datePicker/index.js#anonymous~4"));
171
171
  /** Reflects the list of individually-disabled dates onto the embedded
172
172
  * calendar. Pass an empty array to clear. Does NOT reconcile the current
173
173
  * selection. */
174
- export const reflectDisabledDates = Function.dual(2, (model, disabledDates) => __foldkitBrandViewResult((evo(model, {
174
+ export const reflectDisabledDates = Function.dual(2, (model, disabledDates) => __foldkitBrandViewResult((modifyFields(model, {
175
175
  calendar: () => __foldkitBrandViewResult((UiCalendar.reflectDisabledDates(model.calendar, disabledDates)), "@foldkit/ui/datePicker/index.js#calendar~6"),
176
176
  })), "@foldkit/ui/datePicker/index.js#anonymous~5"));
177
177
  /** Reflects the days of the week that are disabled onto the embedded calendar
178
178
  * (e.g. weekends). Pass an empty array to clear. Does NOT reconcile the
179
179
  * current selection. */
180
- export const reflectDisabledDaysOfWeek = Function.dual(2, (model, disabledDaysOfWeek) => __foldkitBrandViewResult((evo(model, {
180
+ export const reflectDisabledDaysOfWeek = Function.dual(2, (model, disabledDaysOfWeek) => __foldkitBrandViewResult((modifyFields(model, {
181
181
  calendar: () => __foldkitBrandViewResult((UiCalendar.reflectDisabledDaysOfWeek(model.calendar, disabledDaysOfWeek)), "@foldkit/ui/datePicker/index.js#calendar~7"),
182
182
  })), "@foldkit/ui/datePicker/index.js#anonymous~6"));
183
183
  // SELECTORS
@@ -12,6 +12,7 @@ export declare const Model: Schema.Struct<{
12
12
  readonly id: Schema.String;
13
13
  readonly isShowing: Schema.Boolean;
14
14
  readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
15
+ readonly transitionGeneration: Schema.Number;
15
16
  }>;
16
17
  readonly maybeFocusSelector: Schema.Option<Schema.String>;
17
18
  }>;
@@ -31,8 +32,12 @@ export declare const Message: import("foldkit/message").MessageUnion<{
31
32
  message: import("foldkit/message").MessageUnion<{
32
33
  readonly Showed: {};
33
34
  readonly Hid: {};
34
- readonly CompletedWaitForPaint: {};
35
- readonly EndedAnimation: {};
35
+ readonly CompletedWaitForPaint: {
36
+ generation: Schema.Number;
37
+ };
38
+ readonly EndedAnimation: {
39
+ generation: Schema.Number;
40
+ };
36
41
  }>;
37
42
  };
38
43
  }>;
@@ -150,6 +155,7 @@ export declare const update: (model: Model, message: Message) => Readonly<{
150
155
  readonly id: string;
151
156
  readonly isShowing: boolean;
152
157
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
158
+ readonly transitionGeneration: number;
153
159
  };
154
160
  readonly maybeFocusSelector: Option.Option<string>;
155
161
  };
@@ -175,8 +181,10 @@ export declare const update: (model: Model, message: Message) => Readonly<{
175
181
  readonly _tag: "GotAnimationMessage";
176
182
  readonly message: {
177
183
  readonly _tag: "CompletedWaitForPaint";
184
+ readonly generation: number;
178
185
  } | {
179
186
  readonly _tag: "EndedAnimation";
187
+ readonly generation: number;
180
188
  } | {
181
189
  readonly _tag: "Hid";
182
190
  } | {
@@ -286,6 +294,7 @@ export declare const view: import("foldkit/submodel").View<{
286
294
  readonly id: string;
287
295
  readonly isShowing: boolean;
288
296
  readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
297
+ readonly transitionGeneration: number;
289
298
  };
290
299
  readonly maybeFocusSelector: Option.Option<string>;
291
300
  }, {
@@ -310,8 +319,10 @@ export declare const view: import("foldkit/submodel").View<{
310
319
  readonly _tag: "GotAnimationMessage";
311
320
  readonly message: {
312
321
  readonly _tag: "CompletedWaitForPaint";
322
+ readonly generation: number;
313
323
  } | {
314
324
  readonly _tag: "EndedAnimation";
325
+ readonly generation: number;
315
326
  } | {
316
327
  readonly _tag: "Hid";
317
328
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAS,MAAM,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAC5D,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAG1C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CAAA;AAE9E,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAGtC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAWxC,6IAA6I;AAC7I,eAAO,MAAM,KAAK;;;;;;;;;;EAMhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,8DAA8D;AAC9D,eAAO,MAAM,OAAO;;;;;;;;;;;QAUK,OAAO;;;;;;;EAC9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAA;AAC7D,MAAM,MAAM,cAAc,GAAG,OA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YAAY,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IAC3C,WAAW,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IAC1C,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,qFAAqF;AACrF,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,MAAM,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;IACpC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAC,CAAA;AAEF;;;uDAGuD;AACvD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YARP,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI;qBACnB,OAAO;GAiHzB,CAAA"}
@@ -6,7 +6,7 @@ import * as Dom from 'foldkit/dom';
6
6
  import { childAttributes } from 'foldkit/html';
7
7
  import { defineMessageUnion } from 'foldkit/message';
8
8
  import * as Mount from 'foldkit/mount';
9
- import { evo } from 'foldkit/struct';
9
+ import { modifyFields } from 'foldkit/struct';
10
10
  import { defineView } from 'foldkit/submodel';
11
11
  import * as Update from 'foldkit/update';
12
12
  // NOTE: Animation imports are split across schema + update to avoid a circular
@@ -137,30 +137,44 @@ export const ReleaseDialogResources = Command.define('ReleaseDialogResources', {
137
137
  const isLeaving = (model) => __foldkitBrandViewResult((model.animation.transitionState === 'LeaveStart' ||
138
138
  model.animation.transitionState === 'LeaveAnimating'), "@foldkit/ui/dialog/index.js#isLeaving");
139
139
  const isOpenOrAnimating = (model) => __foldkitBrandViewResult((model.isOpen || model.animation.transitionState !== 'Idle'), "@foldkit/ui/dialog/index.js#isOpenOrAnimating");
140
- const resetToClosed = (model) => __foldkitBrandViewResult((evo(model, {
140
+ const resetAnimationToClosed = (animation) => __foldkitBrandViewResult((modifyFields(animation, {
141
+ isShowing: () => __foldkitBrandViewResult((false), "@foldkit/ui/dialog/index.js#isShowing"),
142
+ transitionState: () => __foldkitBrandViewResult(('Idle'), "@foldkit/ui/dialog/index.js#transitionState"),
143
+ })), "@foldkit/ui/dialog/index.js#resetAnimationToClosed");
144
+ const resetToClosed = (model) => __foldkitBrandViewResult((modifyFields(model, {
141
145
  isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/dialog/index.js#isOpen"),
142
- animation: () => __foldkitBrandViewResult((Animation.init({ id: `${model.id}-panel` })), "@foldkit/ui/dialog/index.js#animation"),
146
+ animation: resetAnimationToClosed,
143
147
  })), "@foldkit/ui/dialog/index.js#resetToClosed");
144
148
  const wrapAnimationMessage = (message) => __foldkitBrandViewResult((Message.GotAnimationMessage({ message })), "@foldkit/ui/dialog/index.js#wrapAnimationMessage");
145
149
  const resumeAnimationAfterAcquisition = (model) => __foldkitBrandViewResult((Match.value(model.animation.transitionState).pipe(Match.withReturnType(), Match.when('Idle', () => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/dialog/index.js#anonymous~10"))), Match.when('EnterStart', () => (__foldkitBrandViewResult(({
146
150
  model,
147
151
  commands: [
148
- Command.mapMessage(AnimationUpdate.WaitForPaint(), wrapAnimationMessage),
152
+ Command.mapMessage(AnimationUpdate.WaitForPaint({
153
+ generation: model.animation.transitionGeneration,
154
+ }), wrapAnimationMessage),
149
155
  ],
150
156
  }), "@foldkit/ui/dialog/index.js#anonymous~11"))), Match.when('EnterAnimating', () => (__foldkitBrandViewResult(({
151
157
  model,
152
158
  commands: [
153
- Command.mapMessage(AnimationUpdate.WaitForAnimationSettled({ id: model.animation.id }), wrapAnimationMessage),
159
+ Command.mapMessage(AnimationUpdate.WaitForAnimationSettled({
160
+ id: model.animation.id,
161
+ generation: model.animation.transitionGeneration,
162
+ }), wrapAnimationMessage),
154
163
  ],
155
164
  }), "@foldkit/ui/dialog/index.js#anonymous~12"))), Match.when('LeaveStart', () => (__foldkitBrandViewResult(({
156
165
  model,
157
166
  commands: [
158
- Command.mapMessage(AnimationUpdate.WaitForPaint(), wrapAnimationMessage),
167
+ Command.mapMessage(AnimationUpdate.WaitForPaint({
168
+ generation: model.animation.transitionGeneration,
169
+ }), wrapAnimationMessage),
159
170
  ],
160
171
  }), "@foldkit/ui/dialog/index.js#anonymous~13"))), Match.when('LeaveAnimating', () => (__foldkitBrandViewResult(({
161
172
  model,
162
173
  commands: [
163
- Command.mapMessage(AnimationUpdate.WaitForAnimationSettled({ id: model.animation.id }), wrapAnimationMessage),
174
+ Command.mapMessage(AnimationUpdate.WaitForAnimationSettled({
175
+ id: model.animation.id,
176
+ generation: model.animation.transitionGeneration,
177
+ }), wrapAnimationMessage),
164
178
  ],
165
179
  }), "@foldkit/ui/dialog/index.js#anonymous~14"))), Match.exhaustive)), "@foldkit/ui/dialog/index.js#resumeAnimationAfterAcquisition");
166
180
  const foldAnimationOutMessage = (outMessage, { liftCommand }) => __foldkitBrandViewResult((Animation.OutMessage.match(outMessage, {
@@ -178,20 +192,20 @@ const foldAnimationOutMessage = (outMessage, { liftCommand }) => __foldkitBrandV
178
192
  const foldAnimation = Update.foldChild({
179
193
  update: AnimationUpdate.update,
180
194
  read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/dialog/index.js#read"),
181
- write: (model, nextAnimation) => __foldkitBrandViewResult((evo(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/dialog/index.js#animation~2") })), "@foldkit/ui/dialog/index.js#write"),
195
+ write: (model, nextAnimation) => __foldkitBrandViewResult((modifyFields(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/dialog/index.js#animation") })), "@foldkit/ui/dialog/index.js#write"),
182
196
  toParentMessage: wrapAnimationMessage,
183
197
  foldOutMessage: foldAnimationOutMessage,
184
198
  });
185
199
  const foldAnimationShow = Update.foldChildStep({
186
200
  update: AnimationUpdate.show,
187
201
  read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/dialog/index.js#read~2"),
188
- write: (model, nextAnimation) => __foldkitBrandViewResult((evo(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/dialog/index.js#animation~3") })), "@foldkit/ui/dialog/index.js#write~2"),
202
+ write: (model, nextAnimation) => __foldkitBrandViewResult((modifyFields(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/dialog/index.js#animation~2") })), "@foldkit/ui/dialog/index.js#write~2"),
189
203
  toParentMessage: wrapAnimationMessage,
190
204
  });
191
205
  const foldAnimationHide = Update.foldChildStep({
192
206
  update: AnimationUpdate.hide,
193
207
  read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/dialog/index.js#read~3"),
194
- write: (model, nextAnimation) => __foldkitBrandViewResult((evo(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/dialog/index.js#animation~4") })), "@foldkit/ui/dialog/index.js#write~3"),
208
+ write: (model, nextAnimation) => __foldkitBrandViewResult((modifyFields(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/dialog/index.js#animation~3") })), "@foldkit/ui/dialog/index.js#write~3"),
195
209
  toParentMessage: wrapAnimationMessage,
196
210
  });
197
211
  /** Processes a Dialog Message and returns the next Model and optional Commands. */
@@ -208,10 +222,10 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
208
222
  stepModel => (__foldkitBrandViewResult(({ model: stepModel, commands }), "@foldkit/ui/dialog/index.js#anonymous~19")),
209
223
  foldAnimationShow,
210
224
  stepModel => (__foldkitBrandViewResult(({
211
- model: evo(stepModel, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/dialog/index.js#isOpen~2") }),
225
+ model: modifyFields(stepModel, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/dialog/index.js#isOpen~2") }),
212
226
  }), "@foldkit/ui/dialog/index.js#anonymous~20")),
213
227
  ])
214
- : { model: evo(model, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/dialog/index.js#isOpen~3") }), commands };
228
+ : { model: modifyFields(model, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/dialog/index.js#isOpen~3") }), commands };
215
229
  return __foldkitBrandViewResult((wasClosed
216
230
  ? pipe(dialogOpen, Update.withOutMessage(OutMessage.Opened()))
217
231
  : dialogOpen), "@foldkit/ui/dialog/index.js#RequestedOpen");
@@ -224,7 +238,7 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
224
238
  if (model.isAnimated) {
225
239
  const dialogClose = Update.combine(model, [
226
240
  stepModel => (__foldkitBrandViewResult(({
227
- model: evo(stepModel, { isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/dialog/index.js#isOpen~4") }),
241
+ model: modifyFields(stepModel, { isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/dialog/index.js#isOpen~4") }),
228
242
  }), "@foldkit/ui/dialog/index.js#anonymous~21")),
229
243
  foldAnimationHide,
230
244
  ]);
@@ -235,7 +249,7 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
235
249
  const maybeClose = Option.liftPredicate(CloseDialog({ id: model.id }), () => __foldkitBrandViewResult((wasOpen), "@foldkit/ui/dialog/index.js#anonymous~22"));
236
250
  const commands = Option.toArray(maybeClose);
237
251
  const dialogClose = {
238
- model: evo(model, { isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/dialog/index.js#isOpen~5") }),
252
+ model: modifyFields(model, { isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/dialog/index.js#isOpen~5") }),
239
253
  commands,
240
254
  };
241
255
  return __foldkitBrandViewResult((wasOpen
@@ -30,7 +30,7 @@ export type DisclosureAttributes<Message> = Readonly<{
30
30
  * disclosure opens. */
31
31
  animatePanel: (content: Html, options?: AnimatePanelOptions) => Html;
32
32
  }>;
33
- /** Options for {@link DisclosureAttributes.animatePanel}.
33
+ /** Options for `DisclosureAttributes.animatePanel`.
34
34
  *
35
35
  * - `peek`: a CSS height the collapsed panel keeps, such as `'7.5em'` for
36
36
  * five lines at a 1.5 leading. The visible content is an inert preview;
@@ -78,7 +78,7 @@ export type ViewConfig<Message> = Readonly<{
78
78
  *
79
79
  * // In update:
80
80
  * ToggledDetails: ({ isOpen }) => ({
81
- * model: evo(model, { isDetailsOpen: () => isOpen }),
81
+ * model: modifyFields(model, { isDetailsOpen: () => isOpen }),
82
82
  * }),
83
83
  * ``` */
84
84
  export declare const view: <Message>(config: ViewConfig<Message>, h: HtmlBuilder<Message>) => Html;
@@ -28,7 +28,7 @@ const panelSizeTransition = 'grid-template-rows 200ms ease-out';
28
28
  *
29
29
  * // In update:
30
30
  * ToggledDetails: ({ isOpen }) => ({
31
- * model: evo(model, { isDetailsOpen: () => isOpen }),
31
+ * model: modifyFields(model, { isDetailsOpen: () => isOpen }),
32
32
  * }),
33
33
  * ``` */
34
34
  export const view = (config, h) => {
@@ -5,7 +5,7 @@ import * as Dom from 'foldkit/dom';
5
5
  import { inertHtml as ih } from 'foldkit/html';
6
6
  import { defineMessageUnion } from 'foldkit/message';
7
7
  import { defineTaggedUnion } from 'foldkit/schema';
8
- import { evo } from 'foldkit/struct';
8
+ import { modifyFields } from 'foldkit/struct';
9
9
  import * as Subscription from 'foldkit/subscription';
10
10
  import * as Update from 'foldkit/update';
11
11
  import { attributeSelector } from '../internal/selectors.js';
@@ -195,7 +195,7 @@ const withUpdateReturn = Match.withReturnType();
195
195
  * Commands, and an optional OutMessage for the parent. */
196
196
  export const update = (model, message) => __foldkitBrandViewResult((Message.match(message, {
197
197
  PressedDraggable: ({ itemId, containerId, index, screenX, screenY }) => (__foldkitBrandViewResult(({
198
- model: evo(model, {
198
+ model: modifyFields(model, {
199
199
  dragState: () => __foldkitBrandViewResult((DragState.Pending({
200
200
  itemId,
201
201
  containerId,
@@ -212,7 +212,7 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
212
212
  return __foldkitBrandViewResult(({ model }), "@foldkit/ui/dragAndDrop/index.js#anonymous~9");
213
213
  }
214
214
  return __foldkitBrandViewResult(({
215
- model: evo(model, {
215
+ model: modifyFields(model, {
216
216
  dragState: () => __foldkitBrandViewResult((DragState.Dragging({
217
217
  itemId: pending.itemId,
218
218
  sourceContainerId: pending.containerId,
@@ -224,7 +224,7 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
224
224
  }),
225
225
  }), "@foldkit/ui/dragAndDrop/index.js#anonymous~9");
226
226
  }), Match.tag('Dragging', dragging => (__foldkitBrandViewResult(({
227
- model: evo(model, {
227
+ model: modifyFields(model, {
228
228
  dragState: () => __foldkitBrandViewResult((DragState.Dragging({
229
229
  ...dragging,
230
230
  current: { clientX, clientY },
@@ -233,14 +233,14 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
233
233
  }),
234
234
  }), "@foldkit/ui/dragAndDrop/index.js#anonymous~10"))), Match.orElse(() => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/dragAndDrop/index.js#anonymous~11"))))), "@foldkit/ui/dragAndDrop/index.js#MovedPointer"),
235
235
  ReleasedPointer: () => __foldkitBrandViewResult((Match.value(model.dragState).pipe(withUpdateReturn, Match.tag('Pending', () => (__foldkitBrandViewResult(({
236
- model: evo(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~4") }),
236
+ model: modifyFields(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~4") }),
237
237
  }), "@foldkit/ui/dragAndDrop/index.js#anonymous~12"))), Match.tag('Dragging', dragging => __foldkitBrandViewResult((Option.match(dragging.maybeDropTarget, {
238
238
  onNone: () => (__foldkitBrandViewResult(({
239
- model: evo(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~5") }),
239
+ model: modifyFields(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~5") }),
240
240
  outMessage: OutMessage.Cancelled(),
241
241
  }), "@foldkit/ui/dragAndDrop/index.js#onNone")),
242
242
  onSome: dropTarget => (__foldkitBrandViewResult(({
243
- model: evo(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~6") }),
243
+ model: modifyFields(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~6") }),
244
244
  outMessage: OutMessage.Reordered({
245
245
  itemId: dragging.itemId,
246
246
  fromContainerId: dragging.sourceContainerId,
@@ -254,13 +254,13 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
254
254
  const maybeFocusCommand = Option.liftPredicate(model.dragState, dragState => __foldkitBrandViewResult((dragState._tag === 'KeyboardDragging'), "@foldkit/ui/dragAndDrop/index.js#anonymous~15")).pipe(Option.map(({ itemId }) => __foldkitBrandViewResult((FocusItem({ itemId })), "@foldkit/ui/dragAndDrop/index.js#anonymous~16")));
255
255
  const maybeOutMessage = Option.liftPredicate(model.dragState._tag, _tag => __foldkitBrandViewResult((_tag === 'Dragging' || _tag === 'KeyboardDragging'), "@foldkit/ui/dragAndDrop/index.js#anonymous~17")).pipe(Option.map(() => __foldkitBrandViewResult((OutMessage.Cancelled()), "@foldkit/ui/dragAndDrop/index.js#anonymous~18")));
256
256
  const dragCancellation = {
257
- model: evo(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~7") }),
257
+ model: modifyFields(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~7") }),
258
258
  commands: Option.toArray(maybeFocusCommand),
259
259
  };
260
260
  return __foldkitBrandViewResult((pipe(dragCancellation, Update.withOutMessage(Option.getOrUndefined(maybeOutMessage)))), "@foldkit/ui/dragAndDrop/index.js#CancelledDrag");
261
261
  },
262
262
  ActivatedKeyboardDrag: ({ itemId, containerId, index }) => (__foldkitBrandViewResult(({
263
- model: evo(model, {
263
+ model: modifyFields(model, {
264
264
  dragState: () => __foldkitBrandViewResult((DragState.KeyboardDragging({
265
265
  itemId,
266
266
  sourceContainerId: containerId,
@@ -271,7 +271,7 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
271
271
  }),
272
272
  }), "@foldkit/ui/dragAndDrop/index.js#ActivatedKeyboardDrag")),
273
273
  CompletedResolveKeyboardMove: ({ targetContainerId, targetIndex }) => __foldkitBrandViewResult((Match.value(model.dragState).pipe(withUpdateReturn, Match.tag('KeyboardDragging', keyboardDragging => (__foldkitBrandViewResult(({
274
- model: evo(model, {
274
+ model: modifyFields(model, {
275
275
  dragState: () => __foldkitBrandViewResult((DragState.KeyboardDragging({
276
276
  ...keyboardDragging,
277
277
  targetContainerId,
@@ -281,7 +281,7 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
281
281
  commands: [FocusItem({ itemId: keyboardDragging.itemId })],
282
282
  }), "@foldkit/ui/dragAndDrop/index.js#anonymous~19"))), Match.orElse(() => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/dragAndDrop/index.js#anonymous~20"))))), "@foldkit/ui/dragAndDrop/index.js#CompletedResolveKeyboardMove"),
283
283
  ConfirmedKeyboardDrop: () => __foldkitBrandViewResult((Match.value(model.dragState).pipe(withUpdateReturn, Match.tag('KeyboardDragging', keyboardDragging => (__foldkitBrandViewResult(({
284
- model: evo(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~10") }),
284
+ model: modifyFields(model, { dragState: () => __foldkitBrandViewResult((DragState.Idle()), "@foldkit/ui/dragAndDrop/index.js#dragState~10") }),
285
285
  commands: [FocusItem({ itemId: keyboardDragging.itemId })],
286
286
  outMessage: OutMessage.Reordered({
287
287
  itemId: keyboardDragging.itemId,
@@ -393,18 +393,18 @@ export const subscriptions = Subscription.make()(entry => (__foldkitBrandViewRes
393
393
  dependenciesToStream: ({ dragActivity }) => __foldkitBrandViewResult((Stream.when(Subscription.fromEventFilterMapPreventDefault({
394
394
  target: document,
395
395
  type: 'keydown',
396
- toMessage: event => {
396
+ filterMapEvent: event => {
397
397
  // NOTE: the draggable's OnKeyDownPreventDefault calls preventDefault on
398
398
  // the Space that activates keyboard drag. Skip it here so the same
399
399
  // keypress doesn't also confirm the drop in the same tick.
400
400
  if (event.defaultPrevented) {
401
- return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/dragAndDrop/index.js#toMessage");
401
+ return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/dragAndDrop/index.js#filterMapEvent");
402
402
  }
403
403
  return __foldkitBrandViewResult((Match.value(event.key).pipe(Match.withReturnType(), Match.when('Tab', () => __foldkitBrandViewResult((Option.some(Message.PressedArrowKey({
404
404
  direction: event.shiftKey
405
405
  ? 'PreviousContainer'
406
406
  : 'NextContainer',
407
- }))), "@foldkit/ui/dragAndDrop/index.js#anonymous~50")), Match.whenOr(' ', 'Enter', () => __foldkitBrandViewResult((Option.some(Message.ConfirmedKeyboardDrop())), "@foldkit/ui/dragAndDrop/index.js#anonymous~51")), Match.orElse(key => __foldkitBrandViewResult((Option.map(arrowKeyToDirection(key), direction => __foldkitBrandViewResult((Message.PressedArrowKey({ direction })), "@foldkit/ui/dragAndDrop/index.js#anonymous~53"))), "@foldkit/ui/dragAndDrop/index.js#anonymous~52")))), "@foldkit/ui/dragAndDrop/index.js#toMessage");
407
+ }))), "@foldkit/ui/dragAndDrop/index.js#anonymous~50")), Match.whenOr(' ', 'Enter', () => __foldkitBrandViewResult((Option.some(Message.ConfirmedKeyboardDrop())), "@foldkit/ui/dragAndDrop/index.js#anonymous~51")), Match.orElse(key => __foldkitBrandViewResult((Option.map(arrowKeyToDirection(key), direction => __foldkitBrandViewResult((Message.PressedArrowKey({ direction })), "@foldkit/ui/dragAndDrop/index.js#anonymous~53"))), "@foldkit/ui/dragAndDrop/index.js#anonymous~52")))), "@foldkit/ui/dragAndDrop/index.js#filterMapEvent");
408
408
  },
409
409
  }), Effect.sync(() => __foldkitBrandViewResult((dragActivity === 'Active'), "@foldkit/ui/dragAndDrop/index.js#anonymous~54")))), "@foldkit/ui/dragAndDrop/index.js#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mBlD,CAAA;AAIH;yBACyB;AACzB,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC;;yCAEqC;IACrC,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IACnC;;2BAEuB;IACvB,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;CACrC,CAAC,CAAA;AAEF,qFAAqF;AACrF,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,MAAM,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAChD,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC,CAAA;AASF;iDACiD;AACjD,eAAO,MAAM,IAAI;;;;;;;;;;;;;YAfP,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI;aACvC,aAAa,CAAC,MAAM,CAAC;eACnB,OAAO;iBACL,OAAO;GAkDrB,CAAA"}
@@ -3,7 +3,7 @@ import { Array, Schema } from 'effect';
3
3
  import * as File from 'foldkit/file';
4
4
  import { childAttributes } from 'foldkit/html';
5
5
  import { defineMessageUnion } from 'foldkit/message';
6
- import { evo } from 'foldkit/struct';
6
+ import { modifyFields } from 'foldkit/struct';
7
7
  import { defineView } from 'foldkit/submodel';
8
8
  // MODEL
9
9
  /** Schema for the file-drop component's state.
@@ -41,15 +41,17 @@ export const init = (config) => (__foldkitBrandViewResult(({
41
41
  * and an optional OutMessage. */
42
42
  export const update = (model, message) => __foldkitBrandViewResult((Message.match(message, {
43
43
  EnteredDragZone: () => (__foldkitBrandViewResult(({
44
- model: evo(model, { isDragOver: () => __foldkitBrandViewResult((true), "@foldkit/ui/fileDrop/index.js#isDragOver") }),
44
+ model: modifyFields(model, { isDragOver: () => __foldkitBrandViewResult((true), "@foldkit/ui/fileDrop/index.js#isDragOver") }),
45
45
  }), "@foldkit/ui/fileDrop/index.js#EnteredDragZone")),
46
- LeftDragZone: () => (__foldkitBrandViewResult(({ model: evo(model, { isDragOver: () => __foldkitBrandViewResult((false), "@foldkit/ui/fileDrop/index.js#isDragOver~2") }) }), "@foldkit/ui/fileDrop/index.js#LeftDragZone")),
46
+ LeftDragZone: () => (__foldkitBrandViewResult(({
47
+ model: modifyFields(model, { isDragOver: () => __foldkitBrandViewResult((false), "@foldkit/ui/fileDrop/index.js#isDragOver~2") }),
48
+ }), "@foldkit/ui/fileDrop/index.js#LeftDragZone")),
47
49
  DroppedFiles: ({ files }) => (__foldkitBrandViewResult(({
48
- model: evo(model, { isDragOver: () => __foldkitBrandViewResult((false), "@foldkit/ui/fileDrop/index.js#isDragOver~3") }),
50
+ model: modifyFields(model, { isDragOver: () => __foldkitBrandViewResult((false), "@foldkit/ui/fileDrop/index.js#isDragOver~3") }),
49
51
  outMessage: OutMessage.ReceivedFiles({ files }),
50
52
  }), "@foldkit/ui/fileDrop/index.js#DroppedFiles")),
51
53
  DroppedNonFiles: () => (__foldkitBrandViewResult(({
52
- model: evo(model, { isDragOver: () => __foldkitBrandViewResult((false), "@foldkit/ui/fileDrop/index.js#isDragOver~4") }),
54
+ model: modifyFields(model, { isDragOver: () => __foldkitBrandViewResult((false), "@foldkit/ui/fileDrop/index.js#isDragOver~4") }),
53
55
  outMessage: OutMessage.RejectedNonFiles(),
54
56
  }), "@foldkit/ui/fileDrop/index.js#DroppedNonFiles")),
55
57
  })), "@foldkit/ui/fileDrop/index.js#update");
@@ -1 +1 @@
1
- {"version":3,"file":"hoverIntent.d.ts","sourceRoot":"","sources":["../../src/hoverIntent/hoverIntent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAiB,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACxE,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CA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