foldkit 0.100.1 → 0.102.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.
- package/README.md +3 -2
- package/dist/canvas/view.d.ts +1 -1
- package/dist/canvas/view.d.ts.map +1 -1
- package/dist/canvas/view.js +5 -5
- package/dist/command/index.d.ts +71 -0
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +34 -1
- package/dist/command/public.d.ts +1 -1
- package/dist/command/public.d.ts.map +1 -1
- package/dist/command/public.js +1 -1
- package/dist/devTools/overlay.d.ts.map +1 -1
- package/dist/devTools/overlay.js +156 -149
- package/dist/dom/dom.d.ts +8 -11
- package/dist/dom/dom.d.ts.map +1 -1
- package/dist/dom/dom.js +8 -11
- package/dist/dom/elementMovement.d.ts +1 -3
- package/dist/dom/elementMovement.d.ts.map +1 -1
- package/dist/dom/elementMovement.js +1 -3
- package/dist/dom/inert.d.ts +2 -4
- package/dist/dom/inert.d.ts.map +1 -1
- package/dist/dom/inert.js +2 -4
- package/dist/dom/scrollLock.d.ts +2 -2
- package/dist/dom/scrollLock.js +2 -2
- package/dist/dom/waitForAnimation.d.ts +1 -1
- package/dist/dom/waitForAnimation.js +1 -1
- package/dist/html/boundary.d.ts +98 -0
- package/dist/html/boundary.d.ts.map +1 -0
- package/dist/html/boundary.js +176 -0
- package/dist/html/childAttribute.d.ts +44 -0
- package/dist/html/childAttribute.d.ts.map +1 -0
- package/dist/html/childAttribute.js +34 -0
- package/dist/html/index.d.ts +70 -23
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +639 -575
- package/dist/html/lazy.d.ts +12 -7
- package/dist/html/lazy.d.ts.map +1 -1
- package/dist/html/lazy.js +30 -11
- package/dist/html/public.d.ts +2 -2
- package/dist/html/public.d.ts.map +1 -1
- package/dist/html/public.js +1 -1
- package/dist/html/runtimeSingleton.d.ts +72 -0
- package/dist/html/runtimeSingleton.d.ts.map +1 -0
- package/dist/html/runtimeSingleton.js +112 -0
- package/dist/html/submodel.d.ts +98 -0
- package/dist/html/submodel.d.ts.map +1 -0
- package/dist/html/submodel.js +190 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/render/render.d.ts +1 -1
- package/dist/render/render.js +1 -1
- package/dist/runtime/messagePriority.d.ts +5 -1
- package/dist/runtime/messagePriority.d.ts.map +1 -1
- package/dist/runtime/messagePriority.js +25 -4
- package/dist/runtime/runtime.d.ts +11 -11
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +118 -63
- package/dist/runtime/subscription.d.ts +139 -19
- package/dist/runtime/subscription.d.ts.map +1 -1
- package/dist/runtime/subscription.js +90 -9
- package/dist/submodel/public.d.ts +4 -0
- package/dist/submodel/public.d.ts.map +1 -0
- package/dist/submodel/public.js +1 -0
- package/dist/submodel/submodel.d.ts +32 -0
- package/dist/submodel/submodel.d.ts.map +1 -0
- package/dist/submodel/submodel.js +1 -0
- package/dist/subscription/animationFrame.d.ts +23 -26
- package/dist/subscription/animationFrame.d.ts.map +1 -1
- package/dist/subscription/animationFrame.js +17 -18
- package/dist/subscription/public.d.ts +2 -2
- package/dist/subscription/public.d.ts.map +1 -1
- package/dist/subscription/public.js +1 -1
- package/dist/test/apps/disabledButton.d.ts +4 -5
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +16 -16
- package/dist/test/scene.d.ts +8 -8
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +25 -13
- package/dist/test/story.d.ts +15 -8
- package/dist/test/story.d.ts.map +1 -1
- package/dist/test/story.js +21 -9
- package/dist/ui/animation/index.d.ts +30 -14
- package/dist/ui/animation/index.d.ts.map +1 -1
- package/dist/ui/animation/index.js +9 -19
- package/dist/ui/animation/public.d.ts +2 -2
- package/dist/ui/animation/public.d.ts.map +1 -1
- package/dist/ui/animation/public.js +1 -1
- package/dist/ui/calendar/index.d.ts +199 -84
- package/dist/ui/calendar/index.d.ts.map +1 -1
- package/dist/ui/calendar/index.js +129 -140
- package/dist/ui/calendar/public.d.ts +2 -2
- package/dist/ui/calendar/public.d.ts.map +1 -1
- package/dist/ui/calendar/public.js +1 -1
- package/dist/ui/checkbox/index.d.ts +93 -21
- package/dist/ui/checkbox/index.d.ts.map +1 -1
- package/dist/ui/checkbox/index.js +62 -33
- package/dist/ui/checkbox/public.d.ts +2 -2
- package/dist/ui/checkbox/public.d.ts.map +1 -1
- package/dist/ui/checkbox/public.js +1 -1
- package/dist/ui/combobox/multi.d.ts +35 -91
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/multi.js +34 -17
- package/dist/ui/combobox/multiPublic.d.ts +2 -2
- package/dist/ui/combobox/multiPublic.d.ts.map +1 -1
- package/dist/ui/combobox/multiPublic.js +1 -1
- package/dist/ui/combobox/public.d.ts +3 -3
- package/dist/ui/combobox/public.d.ts.map +1 -1
- package/dist/ui/combobox/public.js +2 -2
- package/dist/ui/combobox/shared.d.ts +56 -31
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +333 -322
- package/dist/ui/combobox/single.d.ts +46 -93
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/combobox/single.js +44 -17
- package/dist/ui/datePicker/index.d.ts +256 -48
- package/dist/ui/datePicker/index.d.ts.map +1 -1
- package/dist/ui/datePicker/index.js +149 -104
- package/dist/ui/datePicker/public.d.ts +2 -2
- package/dist/ui/datePicker/public.d.ts.map +1 -1
- package/dist/ui/datePicker/public.js +1 -1
- package/dist/ui/dialog/index.d.ts +95 -39
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +71 -62
- package/dist/ui/dialog/public.d.ts +2 -2
- package/dist/ui/dialog/public.d.ts.map +1 -1
- package/dist/ui/dialog/public.js +1 -1
- package/dist/ui/disclosure/index.d.ts +71 -31
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +57 -62
- package/dist/ui/disclosure/public.d.ts +2 -2
- package/dist/ui/disclosure/public.d.ts.map +1 -1
- package/dist/ui/disclosure/public.js +1 -1
- package/dist/ui/dragAndDrop/index.d.ts +385 -103
- package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/index.js +26 -31
- package/dist/ui/dragAndDrop/public.d.ts +1 -1
- package/dist/ui/dragAndDrop/public.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/public.js +1 -1
- package/dist/ui/fileDrop/index.d.ts +42 -46
- package/dist/ui/fileDrop/index.d.ts.map +1 -1
- package/dist/ui/fileDrop/index.js +30 -46
- package/dist/ui/fileDrop/public.d.ts +2 -2
- package/dist/ui/fileDrop/public.d.ts.map +1 -1
- package/dist/ui/fileDrop/public.js +1 -1
- package/dist/ui/listbox/multi.d.ts +39 -84
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +38 -20
- package/dist/ui/listbox/multiPublic.d.ts +2 -2
- package/dist/ui/listbox/multiPublic.d.ts.map +1 -1
- package/dist/ui/listbox/multiPublic.js +1 -1
- package/dist/ui/listbox/public.d.ts +3 -3
- package/dist/ui/listbox/public.d.ts.map +1 -1
- package/dist/ui/listbox/public.js +2 -2
- package/dist/ui/listbox/shared.d.ts +71 -30
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +319 -296
- package/dist/ui/listbox/single.d.ts +57 -85
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/listbox/single.js +48 -24
- package/dist/ui/menu/index.d.ts +80 -36
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +117 -86
- package/dist/ui/menu/public.d.ts +2 -2
- package/dist/ui/menu/public.d.ts.map +1 -1
- package/dist/ui/menu/public.js +1 -1
- package/dist/ui/popover/index.d.ts +117 -44
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +88 -101
- package/dist/ui/popover/public.d.ts +2 -2
- package/dist/ui/popover/public.d.ts.map +1 -1
- package/dist/ui/popover/public.js +1 -1
- package/dist/ui/radioGroup/index.d.ts +122 -45
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.js +111 -72
- package/dist/ui/radioGroup/public.d.ts +2 -2
- package/dist/ui/radioGroup/public.d.ts.map +1 -1
- package/dist/ui/radioGroup/public.js +1 -1
- package/dist/ui/slider/index.d.ts +247 -103
- package/dist/ui/slider/index.d.ts.map +1 -1
- package/dist/ui/slider/index.js +52 -68
- package/dist/ui/slider/public.d.ts +2 -2
- package/dist/ui/slider/public.d.ts.map +1 -1
- package/dist/ui/slider/public.js +1 -1
- package/dist/ui/switch/index.d.ts +74 -21
- package/dist/ui/switch/index.d.ts.map +1 -1
- package/dist/ui/switch/index.js +62 -33
- package/dist/ui/switch/public.d.ts +2 -2
- package/dist/ui/switch/public.d.ts.map +1 -1
- package/dist/ui/switch/public.js +1 -1
- package/dist/ui/tabs/index.d.ts +107 -45
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +99 -81
- package/dist/ui/tabs/public.d.ts +2 -2
- package/dist/ui/tabs/public.d.ts.map +1 -1
- package/dist/ui/tabs/public.js +1 -1
- package/dist/ui/toast/index.d.ts +93 -109
- package/dist/ui/toast/index.d.ts.map +1 -1
- package/dist/ui/toast/index.js +16 -29
- package/dist/ui/toast/schema.d.ts +15 -4
- package/dist/ui/toast/schema.d.ts.map +1 -1
- package/dist/ui/toast/schema.js +11 -4
- package/dist/ui/toast/update.d.ts +36 -18
- package/dist/ui/toast/update.d.ts.map +1 -1
- package/dist/ui/toast/update.js +33 -14
- package/dist/ui/tooltip/index.d.ts +94 -42
- package/dist/ui/tooltip/index.d.ts.map +1 -1
- package/dist/ui/tooltip/index.js +64 -73
- package/dist/ui/tooltip/public.d.ts +2 -2
- package/dist/ui/tooltip/public.d.ts.map +1 -1
- package/dist/ui/tooltip/public.js +1 -1
- package/dist/ui/virtualList/index.d.ts +63 -80
- package/dist/ui/virtualList/index.d.ts.map +1 -1
- package/dist/ui/virtualList/index.js +22 -49
- package/dist/ui/virtualList/public.d.ts +2 -2
- package/dist/ui/virtualList/public.d.ts.map +1 -1
- package/dist/ui/virtualList/public.js +1 -1
- package/package.json +1 -1
|
@@ -89,6 +89,9 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
89
89
|
entryId: S.String;
|
|
90
90
|
message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Showed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hid", {}>, import("../../schema/index.js").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema/index.js").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
91
91
|
}>]>;
|
|
92
|
+
readonly OutMessage: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"DismissedToast", {
|
|
93
|
+
payload: S.Codec<A, I, never, never>;
|
|
94
|
+
}>]>;
|
|
92
95
|
readonly Added: import("../../schema/index.js").CallableTaggedStruct<"Added", {
|
|
93
96
|
entry: S.Struct<{
|
|
94
97
|
readonly id: S.String;
|
|
@@ -104,12 +107,15 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
104
107
|
readonly payload: S.Codec<A, I, never, never>;
|
|
105
108
|
}>;
|
|
106
109
|
}>;
|
|
110
|
+
readonly DismissedToast: import("../../schema/index.js").CallableTaggedStruct<"DismissedToast", {
|
|
111
|
+
payload: S.Codec<A, I, never, never>;
|
|
112
|
+
}>;
|
|
107
113
|
readonly init: (config: InitConfig) => {
|
|
108
114
|
readonly id: string;
|
|
109
115
|
readonly defaultDuration: Duration.Duration;
|
|
110
116
|
readonly entries: readonly {
|
|
111
117
|
readonly id: string;
|
|
112
|
-
readonly variant: "
|
|
118
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
113
119
|
readonly animation: {
|
|
114
120
|
readonly id: string;
|
|
115
121
|
readonly isShowing: boolean;
|
|
@@ -127,7 +133,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
127
133
|
readonly defaultDuration: Duration.Duration;
|
|
128
134
|
readonly entries: readonly {
|
|
129
135
|
readonly id: string;
|
|
130
|
-
readonly variant: "
|
|
136
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
131
137
|
readonly animation: {
|
|
132
138
|
readonly id: string;
|
|
133
139
|
readonly isShowing: boolean;
|
|
@@ -170,7 +176,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
170
176
|
readonly _tag: "Added";
|
|
171
177
|
readonly entry: {
|
|
172
178
|
readonly id: string;
|
|
173
|
-
readonly variant: "
|
|
179
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
174
180
|
readonly animation: {
|
|
175
181
|
readonly id: string;
|
|
176
182
|
readonly isShowing: boolean;
|
|
@@ -186,7 +192,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
186
192
|
readonly defaultDuration: Duration.Duration;
|
|
187
193
|
readonly entries: readonly {
|
|
188
194
|
readonly id: string;
|
|
189
|
-
readonly variant: "
|
|
195
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
190
196
|
readonly animation: {
|
|
191
197
|
readonly id: string;
|
|
192
198
|
readonly isShowing: boolean;
|
|
@@ -232,7 +238,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
232
238
|
readonly _tag: "Added";
|
|
233
239
|
readonly entry: {
|
|
234
240
|
readonly id: string;
|
|
235
|
-
readonly variant: "
|
|
241
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
236
242
|
readonly animation: {
|
|
237
243
|
readonly id: string;
|
|
238
244
|
readonly isShowing: boolean;
|
|
@@ -244,13 +250,16 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
244
250
|
readonly payload: A;
|
|
245
251
|
};
|
|
246
252
|
}, never, never>;
|
|
247
|
-
}>[]
|
|
253
|
+
}>[], Option.Option<{
|
|
254
|
+
readonly _tag: "DismissedToast";
|
|
255
|
+
readonly payload: A;
|
|
256
|
+
}>];
|
|
248
257
|
readonly show: (model: {
|
|
249
258
|
readonly id: string;
|
|
250
259
|
readonly defaultDuration: Duration.Duration;
|
|
251
260
|
readonly entries: readonly {
|
|
252
261
|
readonly id: string;
|
|
253
|
-
readonly variant: "
|
|
262
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
254
263
|
readonly animation: {
|
|
255
264
|
readonly id: string;
|
|
256
265
|
readonly isShowing: boolean;
|
|
@@ -267,7 +276,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
267
276
|
readonly defaultDuration: Duration.Duration;
|
|
268
277
|
readonly entries: readonly {
|
|
269
278
|
readonly id: string;
|
|
270
|
-
readonly variant: "
|
|
279
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
271
280
|
readonly animation: {
|
|
272
281
|
readonly id: string;
|
|
273
282
|
readonly isShowing: boolean;
|
|
@@ -313,7 +322,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
313
322
|
readonly _tag: "Added";
|
|
314
323
|
readonly entry: {
|
|
315
324
|
readonly id: string;
|
|
316
|
-
readonly variant: "
|
|
325
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
317
326
|
readonly animation: {
|
|
318
327
|
readonly id: string;
|
|
319
328
|
readonly isShowing: boolean;
|
|
@@ -325,13 +334,16 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
325
334
|
readonly payload: A;
|
|
326
335
|
};
|
|
327
336
|
}, never, never>;
|
|
328
|
-
}>[]
|
|
337
|
+
}>[], Option.Option<{
|
|
338
|
+
readonly _tag: "DismissedToast";
|
|
339
|
+
readonly payload: A;
|
|
340
|
+
}>];
|
|
329
341
|
readonly dismiss: (model: {
|
|
330
342
|
readonly id: string;
|
|
331
343
|
readonly defaultDuration: Duration.Duration;
|
|
332
344
|
readonly entries: readonly {
|
|
333
345
|
readonly id: string;
|
|
334
|
-
readonly variant: "
|
|
346
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
335
347
|
readonly animation: {
|
|
336
348
|
readonly id: string;
|
|
337
349
|
readonly isShowing: boolean;
|
|
@@ -348,7 +360,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
348
360
|
readonly defaultDuration: Duration.Duration;
|
|
349
361
|
readonly entries: readonly {
|
|
350
362
|
readonly id: string;
|
|
351
|
-
readonly variant: "
|
|
363
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
352
364
|
readonly animation: {
|
|
353
365
|
readonly id: string;
|
|
354
366
|
readonly isShowing: boolean;
|
|
@@ -394,7 +406,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
394
406
|
readonly _tag: "Added";
|
|
395
407
|
readonly entry: {
|
|
396
408
|
readonly id: string;
|
|
397
|
-
readonly variant: "
|
|
409
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
398
410
|
readonly animation: {
|
|
399
411
|
readonly id: string;
|
|
400
412
|
readonly isShowing: boolean;
|
|
@@ -406,13 +418,16 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
406
418
|
readonly payload: A;
|
|
407
419
|
};
|
|
408
420
|
}, never, never>;
|
|
409
|
-
}>[]
|
|
421
|
+
}>[], Option.Option<{
|
|
422
|
+
readonly _tag: "DismissedToast";
|
|
423
|
+
readonly payload: A;
|
|
424
|
+
}>];
|
|
410
425
|
readonly dismissAll: (model: {
|
|
411
426
|
readonly id: string;
|
|
412
427
|
readonly defaultDuration: Duration.Duration;
|
|
413
428
|
readonly entries: readonly {
|
|
414
429
|
readonly id: string;
|
|
415
|
-
readonly variant: "
|
|
430
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
416
431
|
readonly animation: {
|
|
417
432
|
readonly id: string;
|
|
418
433
|
readonly isShowing: boolean;
|
|
@@ -429,7 +444,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
429
444
|
readonly defaultDuration: Duration.Duration;
|
|
430
445
|
readonly entries: readonly {
|
|
431
446
|
readonly id: string;
|
|
432
|
-
readonly variant: "
|
|
447
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
433
448
|
readonly animation: {
|
|
434
449
|
readonly id: string;
|
|
435
450
|
readonly isShowing: boolean;
|
|
@@ -475,7 +490,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
475
490
|
readonly _tag: "Added";
|
|
476
491
|
readonly entry: {
|
|
477
492
|
readonly id: string;
|
|
478
|
-
readonly variant: "
|
|
493
|
+
readonly variant: "Error" | "Success" | "Info" | "Warning";
|
|
479
494
|
readonly animation: {
|
|
480
495
|
readonly id: string;
|
|
481
496
|
readonly isShowing: boolean;
|
|
@@ -487,6 +502,9 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
|
487
502
|
readonly payload: A;
|
|
488
503
|
};
|
|
489
504
|
}, never, never>;
|
|
490
|
-
}>[]
|
|
505
|
+
}>[], Option.Option<{
|
|
506
|
+
readonly _tag: "DismissedToast";
|
|
507
|
+
readonly payload: A;
|
|
508
|
+
}>];
|
|
491
509
|
};
|
|
492
510
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/ui/toast/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,MAAM,EAGN,MAAM,EACN,MAAM,IAAI,CAAC,EACZ,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAIP,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB/C,CAAA"}
|
package/dist/ui/toast/update.js
CHANGED
|
@@ -4,7 +4,7 @@ import { OptionExt } from '../../effectExtensions/index.js';
|
|
|
4
4
|
import { evo } from '../../struct/index.js';
|
|
5
5
|
import { Hid as AnimationHid, Showed as AnimationShowed, init as animationInit, } from '../animation/schema.js';
|
|
6
6
|
import { defaultLeaveCommand as animationDefaultLeaveCommand, update as animationUpdate, } from '../animation/update.js';
|
|
7
|
-
import { DEFAULT_DURATION, Dismissed, DismissedAll, ElapsedDuration, GotAnimationMessage, makeAdded, makeEntry, makeMessage, makeModel, } from './schema.js';
|
|
7
|
+
import { DEFAULT_DURATION, Dismissed, DismissedAll, ElapsedDuration, GotAnimationMessage, makeAdded, makeDismissedToast, makeEntry, makeMessage, makeModel, makeOutMessage, } from './schema.js';
|
|
8
8
|
/** Schedules an auto-dismiss timer for an entry. The result Message carries a
|
|
9
9
|
* version so stale timers (from hover or manual dismiss) are discarded in
|
|
10
10
|
* the update function. Static. The Command definition doesn't depend on
|
|
@@ -26,7 +26,9 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
26
26
|
const EntrySchema = makeEntry(payloadSchema);
|
|
27
27
|
const ModelSchema = makeModel(payloadSchema);
|
|
28
28
|
const MessageSchema = makeMessage(payloadSchema);
|
|
29
|
+
const OutMessageSchema = makeOutMessage(payloadSchema);
|
|
29
30
|
const Added = makeAdded(payloadSchema);
|
|
31
|
+
const DismissedToast = makeDismissedToast(payloadSchema);
|
|
30
32
|
const withUpdateReturn = M.withReturnType();
|
|
31
33
|
const updateEntry = (model, entryId, f) => evo(model, {
|
|
32
34
|
entries: Array.map(entry => (entry.id === entryId ? f(entry) : entry)),
|
|
@@ -55,11 +57,11 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
55
57
|
const delegateToEntryAnimation = (model, entryId, animationMessage) => {
|
|
56
58
|
const maybeEntry = Array.findFirst(model.entries, ({ id }) => id === entryId);
|
|
57
59
|
return Option.match(maybeEntry, {
|
|
58
|
-
onNone: () => [model, []],
|
|
60
|
+
onNone: () => [model, [], Option.none()],
|
|
59
61
|
onSome: entry => {
|
|
60
62
|
const [nextAnimation, animationCommands, maybeOutMessage] = animationUpdate(entry.animation, animationMessage);
|
|
61
63
|
const toMessage = (message) => GotAnimationMessage({ entryId, message });
|
|
62
|
-
const mappedCommands =
|
|
64
|
+
const mappedCommands = Command.mapMessages(animationCommands, toMessage);
|
|
63
65
|
const nextEntry = evo(entry, {
|
|
64
66
|
animation: () => nextAnimation,
|
|
65
67
|
});
|
|
@@ -67,18 +69,21 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
67
69
|
onNone: () => [
|
|
68
70
|
updateEntry(model, entryId, () => nextEntry),
|
|
69
71
|
mappedCommands,
|
|
72
|
+
Option.none(),
|
|
70
73
|
],
|
|
71
74
|
onSome: M.type().pipe(withUpdateReturn, M.tagsExhaustive({
|
|
72
75
|
StartedLeaveAnimating: () => [
|
|
73
76
|
updateEntry(model, entryId, () => nextEntry),
|
|
74
77
|
[
|
|
75
78
|
...mappedCommands,
|
|
76
|
-
Command.
|
|
79
|
+
Command.mapMessage(animationDefaultLeaveCommand(nextAnimation), toMessage),
|
|
77
80
|
],
|
|
81
|
+
Option.none(),
|
|
78
82
|
],
|
|
79
83
|
TransitionedOut: () => [
|
|
80
84
|
removeEntry(model, entryId),
|
|
81
85
|
mappedCommands,
|
|
86
|
+
Option.some(DismissedToast({ payload: entry.payload })),
|
|
82
87
|
],
|
|
83
88
|
})),
|
|
84
89
|
});
|
|
@@ -110,7 +115,9 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
110
115
|
entries: [],
|
|
111
116
|
nextEntryKey: 0,
|
|
112
117
|
});
|
|
113
|
-
/** Processes a toast message and returns the next model
|
|
118
|
+
/** Processes a toast message and returns the next model, commands, and
|
|
119
|
+
* an optional `DismissedToast` OutMessage emitted once an entry has
|
|
120
|
+
* finished its leave animation. */
|
|
114
121
|
const update = (model, message) => M.value(message).pipe(withUpdateReturn, M.tagsExhaustive({
|
|
115
122
|
Added: ({ entry }) => {
|
|
116
123
|
const modelWithEntry = evo(model, {
|
|
@@ -123,15 +130,19 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
123
130
|
onNone: () => [],
|
|
124
131
|
onSome: rescheduleDismissCommands,
|
|
125
132
|
});
|
|
126
|
-
return [
|
|
133
|
+
return [
|
|
134
|
+
modelAfterShow,
|
|
135
|
+
[...showCommands, ...dismissCommands],
|
|
136
|
+
Option.none(),
|
|
137
|
+
];
|
|
127
138
|
},
|
|
128
139
|
Dismissed: ({ entryId }) => {
|
|
129
140
|
const maybeEntry = Array.findFirst(model.entries, ({ id }) => id === entryId);
|
|
130
141
|
return Option.match(maybeEntry, {
|
|
131
|
-
onNone: () => [model, []],
|
|
142
|
+
onNone: () => [model, [], Option.none()],
|
|
132
143
|
onSome: entry => {
|
|
133
144
|
if (isEntryLeaving(entry)) {
|
|
134
|
-
return [model, []];
|
|
145
|
+
return [model, [], Option.none()];
|
|
135
146
|
}
|
|
136
147
|
else {
|
|
137
148
|
return delegateToEntryAnimation(model, entryId, AnimationHid());
|
|
@@ -139,21 +150,25 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
139
150
|
},
|
|
140
151
|
});
|
|
141
152
|
},
|
|
142
|
-
DismissedAll: () => Array.reduce(model.entries, [model, []], ([currentModel, currentCommands], entry) => {
|
|
153
|
+
DismissedAll: () => Array.reduce(model.entries, [model, [], Option.none()], ([currentModel, currentCommands, currentOut], entry) => {
|
|
143
154
|
if (isEntryLeaving(entry)) {
|
|
144
|
-
return [currentModel, currentCommands];
|
|
155
|
+
return [currentModel, currentCommands, currentOut];
|
|
145
156
|
}
|
|
146
157
|
const [nextModel, nextCommands] = delegateToEntryAnimation(currentModel, entry.id, AnimationHid());
|
|
147
|
-
return [
|
|
158
|
+
return [
|
|
159
|
+
nextModel,
|
|
160
|
+
[...currentCommands, ...nextCommands],
|
|
161
|
+
currentOut,
|
|
162
|
+
];
|
|
148
163
|
}),
|
|
149
164
|
ElapsedDuration: ({ entryId, version }) => {
|
|
150
165
|
const maybeEntry = Array.findFirst(model.entries, ({ id }) => id === entryId);
|
|
151
166
|
return Option.match(maybeEntry, {
|
|
152
|
-
onNone: () => [model, []],
|
|
167
|
+
onNone: () => [model, [], Option.none()],
|
|
153
168
|
onSome: entry => {
|
|
154
169
|
const isStale = version !== entry.pendingDismissVersion;
|
|
155
170
|
if (isStale || isEntryLeaving(entry)) {
|
|
156
|
-
return [model, []];
|
|
171
|
+
return [model, [], Option.none()];
|
|
157
172
|
}
|
|
158
173
|
else {
|
|
159
174
|
return delegateToEntryAnimation(model, entryId, AnimationHid());
|
|
@@ -167,11 +182,12 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
167
182
|
pendingDismissVersion: Number.increment,
|
|
168
183
|
})),
|
|
169
184
|
[],
|
|
185
|
+
Option.none(),
|
|
170
186
|
],
|
|
171
187
|
LeftEntry: ({ entryId }) => {
|
|
172
188
|
const maybeEntry = Array.findFirst(model.entries, ({ id }) => id === entryId);
|
|
173
189
|
return Option.match(maybeEntry, {
|
|
174
|
-
onNone: () => [model, []],
|
|
190
|
+
onNone: () => [model, [], Option.none()],
|
|
175
191
|
onSome: entry => {
|
|
176
192
|
const nextEntry = evo(entry, {
|
|
177
193
|
isHovered: () => false,
|
|
@@ -180,6 +196,7 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
180
196
|
return [
|
|
181
197
|
updateEntry(model, entryId, () => nextEntry),
|
|
182
198
|
rescheduleDismissCommands(nextEntry),
|
|
199
|
+
Option.none(),
|
|
183
200
|
];
|
|
184
201
|
},
|
|
185
202
|
});
|
|
@@ -196,7 +213,9 @@ export const makeRuntime = (payloadSchema) => {
|
|
|
196
213
|
Entry: EntrySchema,
|
|
197
214
|
Model: ModelSchema,
|
|
198
215
|
Message: MessageSchema,
|
|
216
|
+
OutMessage: OutMessageSchema,
|
|
199
217
|
Added,
|
|
218
|
+
DismissedToast,
|
|
200
219
|
init,
|
|
201
220
|
update,
|
|
202
221
|
show,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Duration, Effect, Schema as S } from 'effect';
|
|
1
|
+
import { Duration, Effect, Option, Schema as S } from 'effect';
|
|
2
2
|
import * as Command from '../../command/index.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ChildAttribute, type Html } from '../../html/index.js';
|
|
4
4
|
import * as Mount from '../../mount/index.js';
|
|
5
|
+
import type { Reflect } from '../../submodel/submodel.js';
|
|
5
6
|
import { AnchorConfig } from '../anchor.js';
|
|
6
|
-
/** Schema for the tooltip component's state. `isOpen` is visibility; `isHovered` tracks pointer on trigger; `isFocused` tracks tooltip-affirming focus on the trigger (focus arriving without a preceding mouse press
|
|
7
|
+
/** Schema for the tooltip component's state. `isOpen` is visibility; `isHovered` tracks pointer on trigger; `isFocused` tracks tooltip-affirming focus on the trigger (focus arriving without a preceding mouse press, like keyboard, touch, or pen; mouse-click-induced focus is excluded since it doesn't affirm the user wants the tooltip visible); `isDismissed` suppresses re-opening after the user dismissed the tooltip (via Escape or left-click) until they disengage (leave or blur). `showDelay` is the hover-to-show duration. `maybeLastPointerType` records the most recent pointer type that pressed the trigger, so a mouse-click-induced focus can be distinguished from other focus. */
|
|
7
8
|
export declare const Model: S.Struct<{
|
|
8
9
|
readonly id: S.String;
|
|
9
10
|
readonly isOpen: S.Boolean;
|
|
@@ -15,30 +16,26 @@ export declare const Model: S.Struct<{
|
|
|
15
16
|
readonly maybeLastPointerType: S.Option<S.String>;
|
|
16
17
|
}>;
|
|
17
18
|
export type Model = typeof Model.Type;
|
|
18
|
-
/** Sent when the pointer enters the tooltip trigger.
|
|
19
|
+
/** Sent when the pointer enters the tooltip trigger. */
|
|
19
20
|
export declare const EnteredTrigger: import("../../schema/index.js").CallableTaggedStruct<"EnteredTrigger", {}>;
|
|
20
|
-
/** Sent when the pointer leaves the tooltip trigger.
|
|
21
|
+
/** Sent when the pointer leaves the tooltip trigger. */
|
|
21
22
|
export declare const LeftTrigger: import("../../schema/index.js").CallableTaggedStruct<"LeftTrigger", {}>;
|
|
22
|
-
/** Sent when focus enters the trigger.
|
|
23
|
+
/** Sent when focus enters the trigger. */
|
|
23
24
|
export declare const FocusedTrigger: import("../../schema/index.js").CallableTaggedStruct<"FocusedTrigger", {}>;
|
|
24
|
-
/** Sent when focus leaves the trigger.
|
|
25
|
+
/** Sent when focus leaves the trigger. */
|
|
25
26
|
export declare const BlurredTrigger: import("../../schema/index.js").CallableTaggedStruct<"BlurredTrigger", {}>;
|
|
26
|
-
/** Sent when Escape is pressed while the tooltip is visible.
|
|
27
|
+
/** Sent when Escape is pressed while the tooltip is visible. */
|
|
27
28
|
export declare const PressedEscape: import("../../schema/index.js").CallableTaggedStruct<"PressedEscape", {}>;
|
|
28
|
-
/** Sent when a pointer presses the trigger.
|
|
29
|
+
/** Sent when a pointer presses the trigger. */
|
|
29
30
|
export declare const PressedPointerOnTrigger: import("../../schema/index.js").CallableTaggedStruct<"PressedPointerOnTrigger", {
|
|
30
31
|
pointerType: S.String;
|
|
31
32
|
button: S.Number;
|
|
32
33
|
}>;
|
|
33
|
-
/** Sent when the show-delay timer fires.
|
|
34
|
+
/** Sent when the show-delay timer fires. */
|
|
34
35
|
export declare const ElapsedShowDelay: import("../../schema/index.js").CallableTaggedStruct<"ElapsedShowDelay", {
|
|
35
36
|
version: S.Number;
|
|
36
37
|
}>;
|
|
37
|
-
/**
|
|
38
|
-
export declare const ChangedShowDelay: import("../../schema/index.js").CallableTaggedStruct<"ChangedShowDelay", {
|
|
39
|
-
showDelay: S.DurationFromMillis;
|
|
40
|
-
}>;
|
|
41
|
-
/** Sent when the tooltip panel mounts and Floating UI has positioned it. Update no-ops; the side effect is the act of positioning, surfaced for DevTools observability. */
|
|
38
|
+
/** Sent when the tooltip panel mounts and Floating UI has positioned it. */
|
|
42
39
|
export declare const CompletedAnchorTooltip: import("../../schema/index.js").CallableTaggedStruct<"CompletedAnchorTooltip", {}>;
|
|
43
40
|
/** Union of all messages the tooltip component can produce. */
|
|
44
41
|
export declare const Message: S.Union<[
|
|
@@ -49,7 +46,6 @@ export declare const Message: S.Union<[
|
|
|
49
46
|
typeof PressedEscape,
|
|
50
47
|
typeof PressedPointerOnTrigger,
|
|
51
48
|
typeof ElapsedShowDelay,
|
|
52
|
-
typeof ChangedShowDelay,
|
|
53
49
|
typeof CompletedAnchorTooltip
|
|
54
50
|
]>;
|
|
55
51
|
export type EnteredTrigger = typeof EnteredTrigger.Type;
|
|
@@ -59,15 +55,25 @@ export type BlurredTrigger = typeof BlurredTrigger.Type;
|
|
|
59
55
|
export type PressedEscape = typeof PressedEscape.Type;
|
|
60
56
|
export type PressedPointerOnTrigger = typeof PressedPointerOnTrigger.Type;
|
|
61
57
|
export type Message = typeof Message.Type;
|
|
62
|
-
/**
|
|
58
|
+
/** Emitted once the tooltip transitions to visible (`isOpen` becomes true).
|
|
59
|
+
* Consumers typically use this for analytics, instrumentation, or to
|
|
60
|
+
* coordinate with other transient UI. */
|
|
61
|
+
export declare const Shown: import("../../schema/index.js").CallableTaggedStruct<"Shown", {}>;
|
|
62
|
+
/** Emitted once the tooltip transitions to hidden (`isOpen` becomes false). */
|
|
63
|
+
export declare const Hidden: import("../../schema/index.js").CallableTaggedStruct<"Hidden", {}>;
|
|
64
|
+
/** Union of out-messages the tooltip component can produce. */
|
|
65
|
+
export declare const OutMessage: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"Shown", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hidden", {}>]>;
|
|
66
|
+
export type Shown = typeof Shown.Type;
|
|
67
|
+
export type Hidden = typeof Hidden.Type;
|
|
68
|
+
export type OutMessage = typeof OutMessage.Type;
|
|
69
|
+
/** Configuration for creating a tooltip model with `init`. */
|
|
63
70
|
export type InitConfig = Readonly<{
|
|
64
71
|
id: string;
|
|
65
72
|
showDelay?: Duration.Input;
|
|
66
73
|
}>;
|
|
67
74
|
/** Creates an initial tooltip model from a config. Defaults to hidden. */
|
|
68
75
|
export declare const init: (config: InitConfig) => Model;
|
|
69
|
-
|
|
70
|
-
/** Waits for the tooltip's show delay before emitting `ElapsedShowDelay`. The version is echoed back so a stale timer is ignored when the user leaves before the delay fires. */
|
|
76
|
+
/** Waits for the tooltip's show delay before emitting `ElapsedShowDelay`. */
|
|
71
77
|
export declare const ShowAfterDelay: Command.CommandDefinitionWithArgs<"ShowAfterDelay", {
|
|
72
78
|
delay: S.DurationFromMillis;
|
|
73
79
|
version: S.Number;
|
|
@@ -75,9 +81,7 @@ export declare const ShowAfterDelay: Command.CommandDefinitionWithArgs<"ShowAfte
|
|
|
75
81
|
readonly _tag: "ElapsedShowDelay";
|
|
76
82
|
readonly version: number;
|
|
77
83
|
}, never, never>>;
|
|
78
|
-
/** The anchor-positioning Mount this Tooltip renders on its panel.
|
|
79
|
-
* Scene tests can call `Scene.Mount.resolve(AnchorTooltip, CompletedAnchorTooltip())`
|
|
80
|
-
* to acknowledge the mount produced by the rendered panel. */
|
|
84
|
+
/** The anchor-positioning Mount this Tooltip renders on its panel. */
|
|
81
85
|
export declare const AnchorTooltip: Mount.MountDefinitionWithArgs<"AnchorTooltip", {
|
|
82
86
|
buttonId: S.String;
|
|
83
87
|
anchor: S.Struct<{
|
|
@@ -90,29 +94,77 @@ export declare const AnchorTooltip: Mount.MountDefinitionWithArgs<"AnchorTooltip
|
|
|
90
94
|
}, {
|
|
91
95
|
readonly _tag: "CompletedAnchorTooltip";
|
|
92
96
|
}>;
|
|
93
|
-
|
|
97
|
+
type UpdateReturn = readonly [
|
|
98
|
+
Model,
|
|
99
|
+
ReadonlyArray<Command.Command<Message>>,
|
|
100
|
+
Option.Option<OutMessage>
|
|
101
|
+
];
|
|
102
|
+
/** Processes a tooltip message and returns the next model, commands, and
|
|
103
|
+
* an optional OutMessage. `Shown`/`Hidden` fire only on `isOpen`
|
|
104
|
+
* transitions, so consumers don't get spurious events for messages that
|
|
105
|
+
* only update hover/focus/delay state without changing visibility. */
|
|
94
106
|
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
95
|
-
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
/** Reflects an externally-sourced hover show-delay onto the model without
|
|
108
|
+
* emitting an OutMessage. Use to mirror an external config value (a user
|
|
109
|
+
* preference, a restored setting) onto the tooltip. */
|
|
110
|
+
export declare const reflectShowDelay: Reflect<Model, Duration.Input>;
|
|
111
|
+
/** Render-time payload published to the consumer's `toView`.
|
|
112
|
+
*
|
|
113
|
+
* - `trigger`: attribute bundle for the trigger element. Carries the
|
|
114
|
+
* hover/focus/keyboard handlers + ARIA `aria-describedby` linking to
|
|
115
|
+
* the panel.
|
|
116
|
+
* - `panel`: attribute bundle for the panel element. Carries the
|
|
117
|
+
* `role="tooltip"`, the anchor Mount that positions the panel via
|
|
118
|
+
* Floating UI, and a `data-open` attribute when visible.
|
|
119
|
+
* - `isVisible`: derived state. The consumer decides whether to render
|
|
120
|
+
* the panel conditionally on this. */
|
|
121
|
+
export type RenderInfo = Readonly<{
|
|
122
|
+
trigger: ReadonlyArray<ChildAttribute>;
|
|
123
|
+
panel: ReadonlyArray<ChildAttribute>;
|
|
124
|
+
isVisible: boolean;
|
|
125
|
+
}>;
|
|
126
|
+
/** Per-render view inputs passed to `view` via `h.submodel`'s `viewInputs` field. */
|
|
127
|
+
export type ViewInputs = Readonly<{
|
|
101
128
|
anchor: AnchorConfig;
|
|
102
|
-
|
|
103
|
-
triggerClassName?: string;
|
|
104
|
-
triggerAttributes?: ReadonlyArray<Attribute<ParentMessage>>;
|
|
105
|
-
content: Html;
|
|
106
|
-
panelClassName?: string;
|
|
107
|
-
panelAttributes?: ReadonlyArray<Attribute<ParentMessage>>;
|
|
129
|
+
toView: (render: RenderInfo) => Html;
|
|
108
130
|
isDisabled?: boolean;
|
|
109
|
-
className?: string;
|
|
110
|
-
attributes?: ReadonlyArray<Attribute<ParentMessage>>;
|
|
111
131
|
}>;
|
|
112
|
-
/** Renders a headless tooltip with an anchored non-interactive panel.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
export declare const
|
|
132
|
+
/** Renders a headless tooltip with an anchored non-interactive panel.
|
|
133
|
+
* Shows on hover (after delay) or focus (from keyboard, touch, or pen;
|
|
134
|
+
* mouse-click focus is excluded); hides on leave, blur, Escape, or
|
|
135
|
+
* left-click of the trigger. */
|
|
136
|
+
export declare const view: import("../../html/submodel.js").SubmodelView<{
|
|
137
|
+
readonly id: string;
|
|
138
|
+
readonly isOpen: boolean;
|
|
139
|
+
readonly isHovered: boolean;
|
|
140
|
+
readonly isFocused: boolean;
|
|
141
|
+
readonly isDismissed: boolean;
|
|
142
|
+
readonly showDelay: Duration.Duration;
|
|
143
|
+
readonly pendingShowVersion: number;
|
|
144
|
+
readonly maybeLastPointerType: Option.Option<string>;
|
|
145
|
+
}, {
|
|
146
|
+
readonly _tag: "EnteredTrigger";
|
|
147
|
+
} | {
|
|
148
|
+
readonly _tag: "LeftTrigger";
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "FocusedTrigger";
|
|
151
|
+
} | {
|
|
152
|
+
readonly _tag: "BlurredTrigger";
|
|
153
|
+
} | {
|
|
154
|
+
readonly _tag: "PressedEscape";
|
|
155
|
+
} | {
|
|
156
|
+
readonly _tag: "PressedPointerOnTrigger";
|
|
157
|
+
readonly pointerType: string;
|
|
158
|
+
readonly button: number;
|
|
159
|
+
} | {
|
|
160
|
+
readonly _tag: "ElapsedShowDelay";
|
|
161
|
+
readonly version: number;
|
|
162
|
+
} | {
|
|
163
|
+
readonly _tag: "CompletedAnchorTooltip";
|
|
164
|
+
}, Readonly<{
|
|
165
|
+
anchor: AnchorConfig;
|
|
166
|
+
toView: (render: RenderInfo) => Html;
|
|
167
|
+
isDisabled?: boolean;
|
|
168
|
+
}>>;
|
|
117
169
|
export {};
|
|
118
170
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,MAAM,EAKN,MAAM,IAAI,CAAC,EACZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,MAAM,EAKN,MAAM,EACN,MAAM,IAAI,CAAC,EACZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,IAAI,EAIV,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAA;AAIxD,4qBAA4qB;AAC5qB,eAAO,MAAM,KAAK;;;;;;;;;EAShB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,wDAAwD;AACxD,eAAO,MAAM,cAAc,4EAAsB,CAAA;AACjD,wDAAwD;AACxD,eAAO,MAAM,WAAW,yEAAmB,CAAA;AAC3C,0CAA0C;AAC1C,eAAO,MAAM,cAAc,4EAAsB,CAAA;AACjD,0CAA0C;AAC1C,eAAO,MAAM,cAAc,4EAAsB,CAAA;AACjD,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