@foldkit/ui 0.162.0 → 0.163.0-canary.4187988d5940
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anchor/anchor.d.ts.map +1 -1
- package/dist/anchor/anchor.js +10 -1
- package/dist/animation/index.d.ts +3 -0
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/animation/schema.d.ts +13 -4
- package/dist/animation/schema.d.ts.map +1 -1
- package/dist/animation/schema.js +8 -4
- package/dist/animation/update.d.ts +15 -5
- package/dist/animation/update.d.ts.map +1 -1
- package/dist/animation/update.js +59 -27
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +27 -19
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/multi.d.ts +5 -0
- package/dist/combobox/multi.d.ts.map +1 -1
- package/dist/combobox/multi.js +2 -2
- package/dist/combobox/shared.d.ts +12 -2
- package/dist/combobox/shared.d.ts.map +1 -1
- package/dist/combobox/shared.js +21 -21
- package/dist/combobox/single.d.ts +5 -0
- package/dist/combobox/single.d.ts.map +1 -1
- package/dist/combobox/single.js +4 -4
- package/dist/datePicker/index.d.ts +13 -2
- package/dist/datePicker/index.d.ts.map +1 -1
- package/dist/datePicker/index.js +10 -10
- package/dist/dialog/index.d.ts +13 -2
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/dialog/index.js +28 -14
- package/dist/disclosure/index.d.ts +2 -2
- package/dist/disclosure/index.js +1 -1
- package/dist/dragAndDrop/index.js +14 -14
- package/dist/fileDrop/index.d.ts.map +1 -1
- package/dist/fileDrop/index.js +7 -5
- package/dist/hoverIntent/hoverIntent.d.ts.map +1 -1
- package/dist/hoverIntent/hoverIntent.js +16 -16
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/internal/accessibleName.d.ts +9 -0
- package/dist/internal/accessibleName.d.ts.map +1 -0
- package/dist/internal/accessibleName.js +12 -0
- package/dist/internal/range.d.ts +7 -0
- package/dist/internal/range.d.ts.map +1 -0
- package/dist/internal/range.js +12 -0
- package/dist/listbox/multi.d.ts +5 -0
- package/dist/listbox/multi.d.ts.map +1 -1
- package/dist/listbox/shared.d.ts +12 -2
- package/dist/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +26 -24
- package/dist/listbox/single.d.ts +5 -0
- package/dist/listbox/single.d.ts.map +1 -1
- package/dist/menu/index.d.ts +13 -2
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +29 -23
- package/dist/meter/index.d.ts +26 -0
- package/dist/meter/index.d.ts.map +1 -0
- package/dist/meter/index.js +67 -0
- package/dist/meter/public.d.ts +3 -0
- package/dist/meter/public.d.ts.map +1 -0
- package/dist/meter/public.js +1 -0
- package/dist/popover/index.d.ts +16 -2
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +18 -16
- package/dist/progress/index.d.ts +24 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/progress/index.js +85 -0
- package/dist/progress/public.d.ts +3 -0
- package/dist/progress/public.d.ts.map +1 -0
- package/dist/progress/public.js +1 -0
- package/dist/radioGroup/index.d.ts.map +1 -1
- package/dist/radioGroup/index.js +5 -3
- package/dist/slider/index.d.ts +61 -28
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +163 -87
- package/dist/slider/public.d.ts +1 -1
- package/dist/slider/public.d.ts.map +1 -1
- package/dist/slider/public.js +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.d.ts.map +1 -1
- package/dist/tabs/index.js +5 -3
- package/dist/test/apps/disabledButton.d.ts +12 -4
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +3 -3
- package/dist/toast/index.d.ts +869 -45
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/index.js +77 -17
- package/dist/toast/public.d.ts +2 -2
- package/dist/toast/public.d.ts.map +1 -1
- package/dist/toast/public.js +1 -1
- package/dist/toast/schema.d.ts +160 -6
- package/dist/toast/schema.d.ts.map +1 -1
- package/dist/toast/schema.js +69 -2
- package/dist/toast/swipeTarget.d.ts +5 -0
- package/dist/toast/swipeTarget.d.ts.map +1 -0
- package/dist/toast/swipeTarget.js +18 -0
- package/dist/toast/test.d.ts +7 -1
- package/dist/toast/test.d.ts.map +1 -1
- package/dist/toast/test.js +37 -3
- package/dist/toast/update.d.ts +768 -7
- package/dist/toast/update.d.ts.map +1 -1
- package/dist/toast/update.js +283 -68
- package/dist/tooltip/tooltip.d.ts +7 -7
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +14 -12
- package/dist/virtualList/index.d.ts.map +1 -1
- package/dist/virtualList/index.js +8 -6
- package/package.json +9 -9
|
@@ -23,6 +23,7 @@ export declare const BaseModel: Schema.Struct<{
|
|
|
23
23
|
readonly id: Schema.String;
|
|
24
24
|
readonly isShowing: Schema.Boolean;
|
|
25
25
|
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
26
|
+
readonly transitionGeneration: Schema.Number;
|
|
26
27
|
}>;
|
|
27
28
|
readonly maybeActiveItemIndex: Schema.Option<Schema.Number>;
|
|
28
29
|
readonly activationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
|
|
@@ -100,8 +101,12 @@ export declare const Message: import("foldkit/message").MessageUnion<{
|
|
|
100
101
|
message: import("foldkit/message").MessageUnion<{
|
|
101
102
|
readonly Showed: {};
|
|
102
103
|
readonly Hid: {};
|
|
103
|
-
readonly CompletedWaitForPaint: {
|
|
104
|
-
|
|
104
|
+
readonly CompletedWaitForPaint: {
|
|
105
|
+
generation: Schema.Number;
|
|
106
|
+
};
|
|
107
|
+
readonly EndedAnimation: {
|
|
108
|
+
generation: Schema.Number;
|
|
109
|
+
};
|
|
105
110
|
}>;
|
|
106
111
|
};
|
|
107
112
|
readonly UpdatedInputValue: {
|
|
@@ -212,12 +217,15 @@ export declare const ClickItem: Command.CommandDefinitionWithArgs<"ClickItem", {
|
|
|
212
217
|
/** Detects whether the combobox input wrapper moved or the leave animation ended. Whichever comes first; both outcomes signal the Animation submodel that leave is complete. */
|
|
213
218
|
export declare const DetectMovementOrAnimationEnd: Command.CommandDefinitionWithArgs<"DetectMovementOrAnimationEnd", {
|
|
214
219
|
id: Schema.String;
|
|
220
|
+
generation: Schema.Number;
|
|
215
221
|
}, Effect.Effect<{
|
|
216
222
|
readonly _tag: "GotAnimationMessage";
|
|
217
223
|
readonly message: {
|
|
218
224
|
readonly _tag: "CompletedWaitForPaint";
|
|
225
|
+
readonly generation: number;
|
|
219
226
|
} | {
|
|
220
227
|
readonly _tag: "EndedAnimation";
|
|
228
|
+
readonly generation: number;
|
|
221
229
|
} | {
|
|
222
230
|
readonly _tag: "Hid";
|
|
223
231
|
} | {
|
|
@@ -301,8 +309,10 @@ export declare const makeUpdate: <Model extends BaseModel>(handlers: Readonly<{
|
|
|
301
309
|
readonly _tag: "GotAnimationMessage";
|
|
302
310
|
readonly message: {
|
|
303
311
|
readonly _tag: "CompletedWaitForPaint";
|
|
312
|
+
readonly generation: number;
|
|
304
313
|
} | {
|
|
305
314
|
readonly _tag: "EndedAnimation";
|
|
315
|
+
readonly generation: number;
|
|
306
316
|
} | {
|
|
307
317
|
readonly _tag: "Hid";
|
|
308
318
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/combobox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAS,MAAM,EAAa,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAC9E,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,KAAK,KAAK,MA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,cAAc,CAAC,IAAI,SAAS,MAAM,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAC1E,QAAQ,CAAC;IACP;;sCAEkC;IAClC,cAAc,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;CACpC,CAAC,CAAA;AAIJ,qFAAqF;AACrF,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,mBAAmB,EAAE,OAAO,CAAA;CAC7B,CAAC,CAAA;AAEF,2NAA2N;AAC3N,eAAO,MAAM,QAAQ,GAAI,KAAK,SAAS,SAAS,YAAY,YAAY,MA+jB9D,IAAI,SAAS,MAAM,OAEN,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,CACvE,CAAA"}
|
package/dist/combobox/shared.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as Command from 'foldkit/command';
|
|
|
4
4
|
import * as Dom from 'foldkit/dom';
|
|
5
5
|
import { defineMessageUnion } from 'foldkit/message';
|
|
6
6
|
import * as Mount from 'foldkit/mount';
|
|
7
|
-
import {
|
|
7
|
+
import { makeModifyFieldsFor } from 'foldkit/struct';
|
|
8
8
|
import { defineView } from 'foldkit/submodel';
|
|
9
9
|
import * as Update from 'foldkit/update';
|
|
10
10
|
import { AnchorConfig, anchorSetup, portalToContainingRoot, } from '../anchor/index.js';
|
|
@@ -119,9 +119,9 @@ const backdropSelector = (id) => __foldkitBrandViewResult((idSelector(`${id}-bac
|
|
|
119
119
|
export const itemSelector = (id, index) => __foldkitBrandViewResult((idSelector(`${id}-item-${index}`)), "@foldkit/ui/combobox/shared.js#itemSelector");
|
|
120
120
|
export const itemId = (id, index) => __foldkitBrandViewResult((`${id}-item-${index}`), "@foldkit/ui/combobox/shared.js#itemId");
|
|
121
121
|
// HELPERS
|
|
122
|
-
const
|
|
122
|
+
const modifyBaseFields = makeModifyFieldsFor();
|
|
123
123
|
/** Resets only shared base fields to their closed state. Does not touch inputValue. That is variant-specific. */
|
|
124
|
-
export const closedBaseModel = (model) => __foldkitBrandViewResult((
|
|
124
|
+
export const closedBaseModel = (model) => __foldkitBrandViewResult((modifyBaseFields(model, {
|
|
125
125
|
isOpen: () => __foldkitBrandViewResult((false), "@foldkit/ui/combobox/shared.js#isOpen"),
|
|
126
126
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex"),
|
|
127
127
|
activationTrigger: () => __foldkitBrandViewResult(('Keyboard'), "@foldkit/ui/combobox/shared.js#activationTrigger"),
|
|
@@ -173,40 +173,40 @@ export const ClickItem = Command.define('ClickItem', {
|
|
|
173
173
|
});
|
|
174
174
|
/** Detects whether the combobox input wrapper moved or the leave animation ended. Whichever comes first; both outcomes signal the Animation submodel that leave is complete. */
|
|
175
175
|
export const DetectMovementOrAnimationEnd = Command.define('DetectMovementOrAnimationEnd', {
|
|
176
|
-
args: { id: Schema.String },
|
|
176
|
+
args: { id: Schema.String, generation: Schema.Number },
|
|
177
177
|
messages: [Message.GotAnimationMessage],
|
|
178
|
-
execute: ({ id }) => __foldkitBrandViewResult((Effect.raceFirst(Dom.detectElementMovement(inputWrapperSelector(id)).pipe(Effect.as(Message.GotAnimationMessage({
|
|
179
|
-
message: Animation.Message.EndedAnimation(),
|
|
178
|
+
execute: ({ id, generation }) => __foldkitBrandViewResult((Effect.raceFirst(Dom.detectElementMovement(inputWrapperSelector(id)).pipe(Effect.as(Message.GotAnimationMessage({
|
|
179
|
+
message: Animation.Message.EndedAnimation({ generation }),
|
|
180
180
|
}))), Dom.waitForAnimationSettled(itemsSelector(id)).pipe(Effect.as(Message.GotAnimationMessage({
|
|
181
|
-
message: Animation.Message.EndedAnimation(),
|
|
181
|
+
message: Animation.Message.EndedAnimation({ generation }),
|
|
182
182
|
}))))), "@foldkit/ui/combobox/shared.js#execute~6"),
|
|
183
183
|
});
|
|
184
184
|
/** Creates a combobox update function from variant-specific handlers. Shared logic (open, close, activate, transition) is handled internally; only close, selection, and immediate-activation behavior varies by variant. */
|
|
185
185
|
export const makeUpdate = (handlers) => {
|
|
186
186
|
const foldAnimationOutMessage = Animation.OutMessage.match({
|
|
187
|
-
StartedLeaveAnimating: () => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
|
|
187
|
+
StartedLeaveAnimating: ({ generation }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
|
|
188
188
|
model,
|
|
189
|
-
commands: [DetectMovementOrAnimationEnd({ id: model.id })],
|
|
189
|
+
commands: [DetectMovementOrAnimationEnd({ id: model.id, generation })],
|
|
190
190
|
}), "@foldkit/ui/combobox/shared.js#anonymous"))), "@foldkit/ui/combobox/shared.js#StartedLeaveAnimating"),
|
|
191
191
|
TransitionedOut: () => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/combobox/shared.js#anonymous~2"))), "@foldkit/ui/combobox/shared.js#TransitionedOut"),
|
|
192
192
|
});
|
|
193
193
|
const foldAnimation = Update.foldChild({
|
|
194
194
|
update: animationUpdate,
|
|
195
195
|
read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/combobox/shared.js#read"),
|
|
196
|
-
write: (model, nextAnimation) => __foldkitBrandViewResult((
|
|
196
|
+
write: (model, nextAnimation) => __foldkitBrandViewResult((modifyBaseFields(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/combobox/shared.js#animation") })), "@foldkit/ui/combobox/shared.js#write"),
|
|
197
197
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotAnimationMessage({ message })), "@foldkit/ui/combobox/shared.js#toParentMessage"),
|
|
198
198
|
foldOutMessage: foldAnimationOutMessage,
|
|
199
199
|
});
|
|
200
200
|
const foldAnimationShow = Update.foldChildStep({
|
|
201
201
|
update: animationShow,
|
|
202
202
|
read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/combobox/shared.js#read~2"),
|
|
203
|
-
write: (model, nextAnimation) => __foldkitBrandViewResult((
|
|
203
|
+
write: (model, nextAnimation) => __foldkitBrandViewResult((modifyBaseFields(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/combobox/shared.js#animation~2") })), "@foldkit/ui/combobox/shared.js#write~2"),
|
|
204
204
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotAnimationMessage({ message })), "@foldkit/ui/combobox/shared.js#toParentMessage~2"),
|
|
205
205
|
});
|
|
206
206
|
const foldAnimationHide = Update.foldChildStep({
|
|
207
207
|
update: animationHide,
|
|
208
208
|
read: (model) => __foldkitBrandViewResult((Option.some(model.animation)), "@foldkit/ui/combobox/shared.js#read~3"),
|
|
209
|
-
write: (model, nextAnimation) => __foldkitBrandViewResult((
|
|
209
|
+
write: (model, nextAnimation) => __foldkitBrandViewResult((modifyBaseFields(model, { animation: () => __foldkitBrandViewResult((nextAnimation), "@foldkit/ui/combobox/shared.js#animation~3") })), "@foldkit/ui/combobox/shared.js#write~3"),
|
|
210
210
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotAnimationMessage({ message })), "@foldkit/ui/combobox/shared.js#toParentMessage~3"),
|
|
211
211
|
});
|
|
212
212
|
const internalUpdate = (model, message) => {
|
|
@@ -242,12 +242,12 @@ export const makeUpdate = (handlers) => {
|
|
|
242
242
|
}), "@foldkit/ui/combobox/shared.js#anonymous~4")),
|
|
243
243
|
foldAnimationShow,
|
|
244
244
|
stepModel => (__foldkitBrandViewResult(({
|
|
245
|
-
model:
|
|
245
|
+
model: modifyBaseFields(stepModel, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/combobox/shared.js#isOpen~2") }),
|
|
246
246
|
}), "@foldkit/ui/combobox/shared.js#anonymous~5")),
|
|
247
247
|
])), "@foldkit/ui/combobox/shared.js#openCombobox");
|
|
248
248
|
}
|
|
249
249
|
return __foldkitBrandViewResult(({
|
|
250
|
-
model:
|
|
250
|
+
model: modifyBaseFields(baseModel, { isOpen: () => __foldkitBrandViewResult((true), "@foldkit/ui/combobox/shared.js#isOpen~3") }),
|
|
251
251
|
commands: Array.getSomes([maybeLockScroll, maybeInertOthers]),
|
|
252
252
|
}), "@foldkit/ui/combobox/shared.js#openCombobox");
|
|
253
253
|
};
|
|
@@ -275,7 +275,7 @@ export const makeUpdate = (handlers) => {
|
|
|
275
275
|
CompletedAttachComboboxPreventBlur: () => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/combobox/shared.js#CompletedAttachComboboxPreventBlur")),
|
|
276
276
|
CompletedAttachComboboxSelectOnFocus: () => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/combobox/shared.js#CompletedAttachComboboxSelectOnFocus")),
|
|
277
277
|
CompletedPortalComboboxBackdrop: () => (__foldkitBrandViewResult(({ model }), "@foldkit/ui/combobox/shared.js#CompletedPortalComboboxBackdrop")),
|
|
278
|
-
Opened: ({ maybeActiveItemIndex }) => __foldkitBrandViewResult((openCombobox(
|
|
278
|
+
Opened: ({ maybeActiveItemIndex }) => __foldkitBrandViewResult((openCombobox(modifyBaseFields(model, {
|
|
279
279
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((maybeActiveItemIndex), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~2"),
|
|
280
280
|
activationTrigger: () => __foldkitBrandViewResult((Option.match(maybeActiveItemIndex, {
|
|
281
281
|
onNone: () => __foldkitBrandViewResult(('Pointer'), "@foldkit/ui/combobox/shared.js#onNone"),
|
|
@@ -293,7 +293,7 @@ export const makeUpdate = (handlers) => {
|
|
|
293
293
|
? closeCombobox(model, closeWithoutFocusCommands, restingInputValue, isClearable)
|
|
294
294
|
: { model }), "@foldkit/ui/combobox/shared.js#BlurredInput"),
|
|
295
295
|
ActivatedItem: ({ index, activationTrigger, maybeImmediateSelection, }) => {
|
|
296
|
-
const highlightedModel =
|
|
296
|
+
const highlightedModel = modifyBaseFields(model, {
|
|
297
297
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.some(index)), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~3"),
|
|
298
298
|
activationTrigger: () => __foldkitBrandViewResult((activationTrigger), "@foldkit/ui/combobox/shared.js#activationTrigger~3"),
|
|
299
299
|
});
|
|
@@ -320,7 +320,7 @@ export const makeUpdate = (handlers) => {
|
|
|
320
320
|
return __foldkitBrandViewResult(({ model }), "@foldkit/ui/combobox/shared.js#MovedPointerOverItem");
|
|
321
321
|
}
|
|
322
322
|
return __foldkitBrandViewResult(({
|
|
323
|
-
model:
|
|
323
|
+
model: modifyBaseFields(model, {
|
|
324
324
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.some(index)), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~4"),
|
|
325
325
|
activationTrigger: () => __foldkitBrandViewResult(('Pointer'), "@foldkit/ui/combobox/shared.js#activationTrigger~4"),
|
|
326
326
|
maybeLastPointerPosition: () => __foldkitBrandViewResult((Option.some({ screenX, screenY })), "@foldkit/ui/combobox/shared.js#maybeLastPointerPosition~3"),
|
|
@@ -329,7 +329,7 @@ export const makeUpdate = (handlers) => {
|
|
|
329
329
|
},
|
|
330
330
|
DeactivatedItem: () => __foldkitBrandViewResult((model.activationTrigger === 'Pointer'
|
|
331
331
|
? {
|
|
332
|
-
model:
|
|
332
|
+
model: modifyBaseFields(model, {
|
|
333
333
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~5"),
|
|
334
334
|
}),
|
|
335
335
|
}
|
|
@@ -344,14 +344,14 @@ export const makeUpdate = (handlers) => {
|
|
|
344
344
|
UpdatedInputValue: ({ value }) => {
|
|
345
345
|
if (model.isOpen) {
|
|
346
346
|
return __foldkitBrandViewResult(({
|
|
347
|
-
model:
|
|
347
|
+
model: modifyBaseFields(model, {
|
|
348
348
|
inputValue: () => __foldkitBrandViewResult((value), "@foldkit/ui/combobox/shared.js#inputValue"),
|
|
349
349
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.some(0)), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~6"),
|
|
350
350
|
activationTrigger: () => __foldkitBrandViewResult(('Keyboard'), "@foldkit/ui/combobox/shared.js#activationTrigger~5"),
|
|
351
351
|
}),
|
|
352
352
|
}), "@foldkit/ui/combobox/shared.js#UpdatedInputValue");
|
|
353
353
|
}
|
|
354
|
-
return __foldkitBrandViewResult((openCombobox(
|
|
354
|
+
return __foldkitBrandViewResult((openCombobox(modifyBaseFields(model, {
|
|
355
355
|
inputValue: () => __foldkitBrandViewResult((value), "@foldkit/ui/combobox/shared.js#inputValue~2"),
|
|
356
356
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.some(0)), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~7"),
|
|
357
357
|
activationTrigger: () => __foldkitBrandViewResult(('Keyboard'), "@foldkit/ui/combobox/shared.js#activationTrigger~6"),
|
|
@@ -362,7 +362,7 @@ export const makeUpdate = (handlers) => {
|
|
|
362
362
|
if (model.isOpen) {
|
|
363
363
|
return __foldkitBrandViewResult((closeCombobox(model, closeWithFocusCommands, restingInputValue, isClearable)), "@foldkit/ui/combobox/shared.js#PressedToggleButton");
|
|
364
364
|
}
|
|
365
|
-
return __foldkitBrandViewResult((Update.combine(
|
|
365
|
+
return __foldkitBrandViewResult((Update.combine(modifyBaseFields(model, {
|
|
366
366
|
maybeActiveItemIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#maybeActiveItemIndex~8"),
|
|
367
367
|
activationTrigger: () => __foldkitBrandViewResult(('Pointer'), "@foldkit/ui/combobox/shared.js#activationTrigger~7"),
|
|
368
368
|
maybeLastPointerPosition: () => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/combobox/shared.js#maybeLastPointerPosition~5"),
|
|
@@ -15,6 +15,7 @@ export declare const Model: Schema.Struct<{
|
|
|
15
15
|
readonly id: Schema.String;
|
|
16
16
|
readonly isShowing: Schema.Boolean;
|
|
17
17
|
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
18
|
+
readonly transitionGeneration: Schema.Number;
|
|
18
19
|
}>;
|
|
19
20
|
readonly maybeActiveItemIndex: Schema.Option<Schema.Number>;
|
|
20
21
|
readonly activationTrigger: Schema.Literals<readonly ["Pointer", "Keyboard"]>;
|
|
@@ -45,6 +46,7 @@ export declare const update: (model: {
|
|
|
45
46
|
readonly id: string;
|
|
46
47
|
readonly isShowing: boolean;
|
|
47
48
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
49
|
+
readonly transitionGeneration: number;
|
|
48
50
|
};
|
|
49
51
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
50
52
|
readonly activationTrigger: "Keyboard" | "Pointer";
|
|
@@ -66,6 +68,7 @@ export declare const update: (model: {
|
|
|
66
68
|
readonly id: string;
|
|
67
69
|
readonly isShowing: boolean;
|
|
68
70
|
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
71
|
+
readonly transitionGeneration: number;
|
|
69
72
|
};
|
|
70
73
|
readonly maybeActiveItemIndex: Option.Option<number>;
|
|
71
74
|
readonly activationTrigger: "Keyboard" | "Pointer";
|
|
@@ -118,8 +121,10 @@ export declare const update: (model: {
|
|
|
118
121
|
readonly _tag: "GotAnimationMessage";
|
|
119
122
|
readonly message: {
|
|
120
123
|
readonly _tag: "CompletedWaitForPaint";
|
|
124
|
+
readonly generation: number;
|
|
121
125
|
} | {
|
|
122
126
|
readonly _tag: "EndedAnimation";
|
|
127
|
+
readonly generation: number;
|
|
123
128
|
} | {
|
|
124
129
|
readonly _tag: "Hid";
|
|
125
130
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../src/combobox/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,KAAK,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AA"}
|
package/dist/combobox/single.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
2
|
import { Option, Schema } from 'effect';
|
|
3
|
-
import {
|
|
3
|
+
import { modifyFields } from 'foldkit/struct';
|
|
4
4
|
import { defineView } from 'foldkit/submodel';
|
|
5
5
|
import { BaseModel, Message, OutMessage, baseInit, closedBaseModel, makeUpdate, makeView, } from './shared.js';
|
|
6
6
|
// MODEL
|
|
@@ -19,19 +19,19 @@ export const update = makeUpdate({
|
|
|
19
19
|
handleClose: (model, restingInputValue, isClearable) => {
|
|
20
20
|
if (isClearable && model.nullable && model.inputValue === '') {
|
|
21
21
|
return __foldkitBrandViewResult(({
|
|
22
|
-
model:
|
|
22
|
+
model: modifyFields(closedBaseModel(model), { inputValue: () => __foldkitBrandViewResult((''), "@foldkit/ui/combobox/single.js#inputValue") }),
|
|
23
23
|
outMessage: OutMessage.ClearedSelection(),
|
|
24
24
|
}), "@foldkit/ui/combobox/single.js#handleClose");
|
|
25
25
|
}
|
|
26
26
|
return __foldkitBrandViewResult(({
|
|
27
|
-
model:
|
|
27
|
+
model: modifyFields(closedBaseModel(model), {
|
|
28
28
|
inputValue: () => __foldkitBrandViewResult((restingInputValue), "@foldkit/ui/combobox/single.js#inputValue~2"),
|
|
29
29
|
}),
|
|
30
30
|
}), "@foldkit/ui/combobox/single.js#handleClose");
|
|
31
31
|
},
|
|
32
32
|
handleSelectedItem: (model, item, displayText, wasSelected, context) => {
|
|
33
33
|
const nullableDeselect = model.nullable && wasSelected;
|
|
34
|
-
return __foldkitBrandViewResult((context.closeWithFocus(
|
|
34
|
+
return __foldkitBrandViewResult((context.closeWithFocus(modifyFields(closedBaseModel(model), {
|
|
35
35
|
inputValue: () => (__foldkitBrandViewResult((nullableDeselect ? '' : displayText), "@foldkit/ui/combobox/single.js#inputValue~3")),
|
|
36
36
|
}), OutMessage.Selected({ value: item }))), "@foldkit/ui/combobox/single.js#handleSelectedItem");
|
|
37
37
|
},
|
|
@@ -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
|
-
|
|
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/datePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAa,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC5D,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGxD,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAA;AAMlD;;;;wBAIwB;AACxB,eAAO,MAAM,K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ate, Schema } from 'effect';
|
|
3
3
|
import * as Calendar from 'foldkit/calendar';
|
|
4
4
|
import { defineMessageUnion } from 'foldkit/message';
|
|
5
|
-
import {
|
|
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:
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
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
|
package/dist/dialog/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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,OAAO,OAAO,CAAC,cAAc,CAAC,I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