@foldkit/ui 0.153.0 → 0.154.0-canary.4e7d8d4010be
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 +14 -1
- package/dist/anchor/anchor.d.ts.map +1 -1
- package/dist/anchor/anchor.js +58 -5
- package/dist/combobox/shared.d.ts.map +1 -1
- package/dist/combobox/shared.js +91 -78
- package/dist/listbox/shared.d.ts.map +1 -1
- package/dist/listbox/shared.js +46 -39
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +39 -32
- package/dist/popover/index.d.ts +15 -0
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +46 -26
- package/dist/popover/public.d.ts +1 -1
- package/dist/popover/public.d.ts.map +1 -1
- package/dist/popover/public.js +1 -1
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +15 -11
- package/package.json +4 -4
package/dist/listbox/shared.js
CHANGED
|
@@ -382,47 +382,54 @@ export const makeUpdate = (handleSelectedItem) => {
|
|
|
382
382
|
*
|
|
383
383
|
* Exposed so Scene tests can call
|
|
384
384
|
* `Scene.Mount.resolve(AnchorListbox, CompletedAnchorListbox())`. */
|
|
385
|
-
export const AnchorListbox = Mount.define('AnchorListbox', {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
385
|
+
export const AnchorListbox = Mount.define('AnchorListbox', {
|
|
386
|
+
args: { buttonId: S.String, anchor: AnchorConfig },
|
|
387
|
+
messages: [Message.CompletedAnchorListbox],
|
|
388
|
+
execute: ({ element, buttonId, anchor }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
389
|
+
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((anchorSetup(element, {
|
|
390
|
+
buttonId,
|
|
391
|
+
anchor,
|
|
392
|
+
focusAfterPosition: true,
|
|
393
|
+
})), "@foldkit/ui/listbox/shared.js#anonymous~11")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/listbox/shared.js#anonymous~12"));
|
|
394
|
+
return __foldkitBrandViewResult((Message.CompletedAnchorListbox()), "@foldkit/ui/listbox/shared.js#anonymous~10");
|
|
395
|
+
})), "@foldkit/ui/listbox/shared.js#execute~9"),
|
|
396
|
+
});
|
|
393
397
|
/** The backdrop-portaling Mount this Listbox renders. Exposed so Scene tests can
|
|
394
398
|
* call `Scene.Mount.resolve(PortalListboxBackdrop, CompletedPortalListboxBackdrop())` to
|
|
395
399
|
* acknowledge the mount produced by the rendered backdrop. */
|
|
396
|
-
export const PortalListboxBackdrop = Mount.define('PortalListboxBackdrop',
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
+
export const PortalListboxBackdrop = Mount.define('PortalListboxBackdrop', {
|
|
401
|
+
messages: [Message.CompletedPortalListboxBackdrop],
|
|
402
|
+
execute: ({ element }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
403
|
+
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((portalToContainingRoot(element)), "@foldkit/ui/listbox/shared.js#anonymous~14")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/listbox/shared.js#anonymous~15"));
|
|
404
|
+
return __foldkitBrandViewResult((Message.CompletedPortalListboxBackdrop()), "@foldkit/ui/listbox/shared.js#anonymous~13");
|
|
405
|
+
})), "@foldkit/ui/listbox/shared.js#execute~10"),
|
|
406
|
+
});
|
|
400
407
|
export const makeView = (behavior) => {
|
|
401
408
|
const impl = defineView((model, viewInputs, h) => {
|
|
402
409
|
const { id, isOpen, orientation, animation: { transitionState }, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, } = model;
|
|
403
410
|
const { items, itemToConfig, isItemDisabled, isButtonDisabled, buttonContent, buttonClassName, buttonAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor = {}, name, form, isDisabled, isReadOnly = false, isInvalid, ariaLabel, ariaLabelledBy, selectedValues, } = viewInputs;
|
|
404
|
-
const itemToValue = viewInputs.itemToValue ?? ((item) => __foldkitBrandViewResult((String(item)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
411
|
+
const itemToValue = viewInputs.itemToValue ?? ((item) => __foldkitBrandViewResult((String(item)), "@foldkit/ui/listbox/shared.js#anonymous~17"));
|
|
405
412
|
const isValueSelected = (itemValue) => __foldkitBrandViewResult((Array.contains(selectedValues, itemValue)), "@foldkit/ui/listbox/shared.js#isValueSelected");
|
|
406
|
-
const itemToSearchText = viewInputs.itemToSearchText ?? ((item) => __foldkitBrandViewResult((itemToValue(item)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
413
|
+
const itemToSearchText = viewInputs.itemToSearchText ?? ((item) => __foldkitBrandViewResult((itemToValue(item)), "@foldkit/ui/listbox/shared.js#anonymous~18"));
|
|
407
414
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
408
415
|
const isVisible = isOpen || isLeaving;
|
|
409
416
|
const animationAttributes = M.value(transitionState).pipe(M.when('EnterStart', () => __foldkitBrandViewResult(([
|
|
410
417
|
h.DataAttribute('closed', ''),
|
|
411
418
|
h.DataAttribute('enter', ''),
|
|
412
419
|
h.DataAttribute('transition', ''),
|
|
413
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
420
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~19")), M.when('EnterAnimating', () => __foldkitBrandViewResult(([
|
|
414
421
|
h.DataAttribute('enter', ''),
|
|
415
422
|
h.DataAttribute('transition', ''),
|
|
416
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
423
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~20")), M.when('LeaveStart', () => __foldkitBrandViewResult(([
|
|
417
424
|
h.DataAttribute('leave', ''),
|
|
418
425
|
h.DataAttribute('transition', ''),
|
|
419
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
426
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~21")), M.when('LeaveAnimating', () => __foldkitBrandViewResult(([
|
|
420
427
|
h.DataAttribute('closed', ''),
|
|
421
428
|
h.DataAttribute('leave', ''),
|
|
422
429
|
h.DataAttribute('transition', ''),
|
|
423
|
-
]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
430
|
+
]), "@foldkit/ui/listbox/shared.js#anonymous~22")), M.orElse(() => __foldkitBrandViewResult(([]), "@foldkit/ui/listbox/shared.js#anonymous~23")));
|
|
424
431
|
const isItemDisabledByIndex = (index) => __foldkitBrandViewResult((Predicate.isNotUndefined(isItemDisabled) &&
|
|
425
|
-
pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
432
|
+
pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/listbox/shared.js#anonymous~24")))), "@foldkit/ui/listbox/shared.js#isItemDisabledByIndex");
|
|
426
433
|
const isButtonEffectivelyDisabled = isDisabled || isButtonDisabled;
|
|
427
434
|
const nextKey = orientation === 'Horizontal' ? 'ArrowRight' : 'ArrowDown';
|
|
428
435
|
const previousKey = orientation === 'Horizontal' ? 'ArrowLeft' : 'ArrowUp';
|
|
@@ -437,20 +444,20 @@ export const makeView = (behavior) => {
|
|
|
437
444
|
const isNavigationKey = (key) => __foldkitBrandViewResult((Array.contains(navigationKeys, key)), "@foldkit/ui/listbox/shared.js#isNavigationKey");
|
|
438
445
|
const firstEnabledIndex = findFirstEnabledIndex(items.length, 0, isItemDisabledByIndex)(0, 1);
|
|
439
446
|
const lastEnabledIndex = findFirstEnabledIndex(items.length, 0, isItemDisabledByIndex)(items.length - 1, -1);
|
|
440
|
-
const selectedItemIndex = pipe(selectedValues, Array.head, Option.flatMap(selectedValue => __foldkitBrandViewResult((Array.findFirstIndex(items, item => __foldkitBrandViewResult((itemToValue(item) === selectedValue), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
447
|
+
const selectedItemIndex = pipe(selectedValues, Array.head, Option.flatMap(selectedValue => __foldkitBrandViewResult((Array.findFirstIndex(items, item => __foldkitBrandViewResult((itemToValue(item) === selectedValue), "@foldkit/ui/listbox/shared.js#anonymous~26"))), "@foldkit/ui/listbox/shared.js#anonymous~25")));
|
|
441
448
|
const handleButtonKeyDown = (key) => {
|
|
442
449
|
if (isOpen) {
|
|
443
450
|
return __foldkitBrandViewResult((handleItemsKeyDown(key)), "@foldkit/ui/listbox/shared.js#handleButtonKeyDown");
|
|
444
451
|
}
|
|
445
452
|
return __foldkitBrandViewResult((M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => __foldkitBrandViewResult((Option.some(Message.Opened({
|
|
446
|
-
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(firstEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
447
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
448
|
-
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(lastEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
449
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
453
|
+
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(firstEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~28")),
|
|
454
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~27")), M.when('ArrowUp', () => __foldkitBrandViewResult((Option.some(Message.Opened({
|
|
455
|
+
maybeActiveItemIndex: Option.orElse(selectedItemIndex, () => __foldkitBrandViewResult((Option.some(lastEnabledIndex)), "@foldkit/ui/listbox/shared.js#anonymous~30")),
|
|
456
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~29")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/listbox/shared.js#anonymous~31")))), "@foldkit/ui/listbox/shared.js#handleButtonKeyDown");
|
|
450
457
|
};
|
|
451
458
|
const handleButtonPointerDown = (pointerType, button) => __foldkitBrandViewResult((Option.some(Message.PressedPointerOnButton({ pointerType, button }))), "@foldkit/ui/listbox/shared.js#handleButtonPointerDown");
|
|
452
459
|
const handleButtonClick = () => {
|
|
453
|
-
const isMouse = Option.exists(maybeLastButtonPointerType, type => __foldkitBrandViewResult((type === 'mouse'), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
460
|
+
const isMouse = Option.exists(maybeLastButtonPointerType, type => __foldkitBrandViewResult((type === 'mouse'), "@foldkit/ui/listbox/shared.js#anonymous~32"));
|
|
454
461
|
if (isMouse) {
|
|
455
462
|
return __foldkitBrandViewResult((Message.IgnoredMouseClick()), "@foldkit/ui/listbox/shared.js#handleButtonClick");
|
|
456
463
|
}
|
|
@@ -463,7 +470,7 @@ export const makeView = (behavior) => {
|
|
|
463
470
|
};
|
|
464
471
|
const handleSpaceKeyUp = (key) => __foldkitBrandViewResult((OptionExt.when(key === ' ', Message.SuppressedSpaceScroll())), "@foldkit/ui/listbox/shared.js#handleSpaceKeyUp");
|
|
465
472
|
const resolveActiveIndex = (key) => __foldkitBrandViewResult((Option.match(maybeActiveItemIndex, {
|
|
466
|
-
onNone: () => __foldkitBrandViewResult((M.value(key).pipe(M.whenOr(previousKey, 'End', 'PageDown', () => __foldkitBrandViewResult((lastEnabledIndex), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
473
|
+
onNone: () => __foldkitBrandViewResult((M.value(key).pipe(M.whenOr(previousKey, 'End', 'PageDown', () => __foldkitBrandViewResult((lastEnabledIndex), "@foldkit/ui/listbox/shared.js#anonymous~33")), M.orElse(() => __foldkitBrandViewResult((firstEnabledIndex), "@foldkit/ui/listbox/shared.js#anonymous~34")))), "@foldkit/ui/listbox/shared.js#onNone~2"),
|
|
467
474
|
onSome: activeIndex => __foldkitBrandViewResult((keyToIndex(nextKey, previousKey, items.length, activeIndex, isItemDisabledByIndex)(key)), "@foldkit/ui/listbox/shared.js#onSome~2"),
|
|
468
475
|
})), "@foldkit/ui/listbox/shared.js#resolveActiveIndex");
|
|
469
476
|
const searchForKey = (key) => {
|
|
@@ -476,15 +483,15 @@ export const makeView = (behavior) => {
|
|
|
476
483
|
return __foldkitBrandViewResult((Option.as(maybeActiveItemIndex, Message.SuppressedItemCommit())), "@foldkit/ui/listbox/shared.js#resolveCommitMessage");
|
|
477
484
|
}
|
|
478
485
|
else {
|
|
479
|
-
return __foldkitBrandViewResult((Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((Message.RequestedItemClick({ index })), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
486
|
+
return __foldkitBrandViewResult((Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((Message.RequestedItemClick({ index })), "@foldkit/ui/listbox/shared.js#anonymous~35"))), "@foldkit/ui/listbox/shared.js#resolveCommitMessage");
|
|
480
487
|
}
|
|
481
488
|
};
|
|
482
|
-
const handleItemsKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some(Message.Closed())), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
489
|
+
const handleItemsKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some(Message.Closed())), "@foldkit/ui/listbox/shared.js#anonymous~36")), M.when('Enter', resolveCommitMessage), M.when(' ', () => __foldkitBrandViewResult((Str.isNonEmpty(searchQuery)
|
|
483
490
|
? searchForKey(' ')
|
|
484
|
-
: resolveCommitMessage()), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
491
|
+
: resolveCommitMessage()), "@foldkit/ui/listbox/shared.js#anonymous~37")), M.when(isNavigationKey, () => __foldkitBrandViewResult((Option.some(Message.ActivatedItem({
|
|
485
492
|
index: resolveActiveIndex(key),
|
|
486
493
|
activationTrigger: 'Keyboard',
|
|
487
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
494
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~38")), M.when(isPrintableKey, () => __foldkitBrandViewResult((searchForKey(key)), "@foldkit/ui/listbox/shared.js#anonymous~39")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/listbox/shared.js#anonymous~40")))), "@foldkit/ui/listbox/shared.js#handleItemsKeyDown");
|
|
488
495
|
const resolveButtonLabel = () => {
|
|
489
496
|
if (Predicate.isNotUndefined(ariaLabel)) {
|
|
490
497
|
return __foldkitBrandViewResult(([h.AriaLabel(ariaLabel)]), "@foldkit/ui/listbox/shared.js#resolveButtonLabel");
|
|
@@ -559,7 +566,7 @@ export const makeView = (behavior) => {
|
|
|
559
566
|
...itemsAttributes,
|
|
560
567
|
];
|
|
561
568
|
const listboxItems = Array.map(items, (item, index) => {
|
|
562
|
-
const isActiveItem = Option.exists(maybeActiveItemIndex, activeIndex => __foldkitBrandViewResult((activeIndex === index), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
569
|
+
const isActiveItem = Option.exists(maybeActiveItemIndex, activeIndex => __foldkitBrandViewResult((activeIndex === index), "@foldkit/ui/listbox/shared.js#anonymous~42"));
|
|
563
570
|
const isDisabledItem = isItemDisabledByIndex(index);
|
|
564
571
|
const isSelectedItem = isValueSelected(itemToValue(item));
|
|
565
572
|
const itemConfig = itemToConfig(item, {
|
|
@@ -592,13 +599,13 @@ export const makeView = (behavior) => {
|
|
|
592
599
|
index,
|
|
593
600
|
screenX,
|
|
594
601
|
screenY,
|
|
595
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
602
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~43")),
|
|
596
603
|
]),
|
|
597
|
-
h.OnPointerLeave(pointerType => __foldkitBrandViewResult((OptionExt.when(pointerType !== 'touch', Message.DeactivatedItem())), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
604
|
+
h.OnPointerLeave(pointerType => __foldkitBrandViewResult((OptionExt.when(pointerType !== 'touch', Message.DeactivatedItem())), "@foldkit/ui/listbox/shared.js#anonymous~44")),
|
|
598
605
|
]
|
|
599
606
|
: []),
|
|
600
607
|
...(itemConfig.className ? [h.Class(itemConfig.className)] : []),
|
|
601
|
-
], [itemConfig.content])), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
608
|
+
], [itemConfig.content])), "@foldkit/ui/listbox/shared.js#anonymous~41");
|
|
602
609
|
});
|
|
603
610
|
const renderGroupedItems = () => {
|
|
604
611
|
if (!itemGroupKey) {
|
|
@@ -607,7 +614,7 @@ export const makeView = (behavior) => {
|
|
|
607
614
|
const segments = groupContiguous(listboxItems, (_, index) => __foldkitBrandViewResult((Array.get(items, index).pipe(Option.match({
|
|
608
615
|
onNone: () => __foldkitBrandViewResult((''), "@foldkit/ui/listbox/shared.js#onNone~4"),
|
|
609
616
|
onSome: item => __foldkitBrandViewResult((itemGroupKey(item, index)), "@foldkit/ui/listbox/shared.js#onSome~4"),
|
|
610
|
-
}))), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
617
|
+
}))), "@foldkit/ui/listbox/shared.js#anonymous~45"));
|
|
611
618
|
return __foldkitBrandViewResult((Array.flatMap(segments, (segment, segmentIndex) => {
|
|
612
619
|
const maybeHeading = Option.fromNullishOr(groupToHeading?.(segment.key));
|
|
613
620
|
const headingId = `${id}-heading-${segment.key}`;
|
|
@@ -643,7 +650,7 @@ export const makeView = (behavior) => {
|
|
|
643
650
|
]),
|
|
644
651
|
]
|
|
645
652
|
: [];
|
|
646
|
-
return __foldkitBrandViewResult(([...separator, groupElement]), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
653
|
+
return __foldkitBrandViewResult(([...separator, groupElement]), "@foldkit/ui/listbox/shared.js#anonymous~46");
|
|
647
654
|
})), "@foldkit/ui/listbox/shared.js#renderGroupedItems");
|
|
648
655
|
};
|
|
649
656
|
const backdrop = h.keyed('div')(`${id}-backdrop`, [
|
|
@@ -679,7 +686,7 @@ export const makeView = (behavior) => {
|
|
|
679
686
|
h.Name(name),
|
|
680
687
|
h.Value(selectedValue),
|
|
681
688
|
...formAttribute,
|
|
682
|
-
])), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
689
|
+
])), "@foldkit/ui/listbox/shared.js#anonymous~47")),
|
|
683
690
|
})
|
|
684
691
|
: [];
|
|
685
692
|
const wrapperAttributes = [
|
|
@@ -696,9 +703,9 @@ export const makeView = (behavior) => {
|
|
|
696
703
|
]),
|
|
697
704
|
...hiddenInputs,
|
|
698
705
|
...(isVisible ? visibleContent : []),
|
|
699
|
-
])), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
706
|
+
])), "@foldkit/ui/listbox/shared.js#anonymous~16");
|
|
700
707
|
});
|
|
701
708
|
return __foldkitBrandViewResult((() =>
|
|
702
709
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
703
|
-
__foldkitBrandViewResult((impl), "@foldkit/ui/listbox/shared.js#anonymous~
|
|
710
|
+
__foldkitBrandViewResult((impl), "@foldkit/ui/listbox/shared.js#anonymous~48")), "@foldkit/ui/listbox/shared.js#makeView");
|
|
704
711
|
};
|
package/dist/menu/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAc,M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AAA;IACpE,UAAU,EAAE,CACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,KACV,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAC7B,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAChD,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,kBAAkB,CAAC,IAAI,CAAC,CAAA;CAClD,CAAC,CAAA;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,GAAI,IAAI,SAAS,MAAM,GAAG,MAAM,OAAK,MAAM,CAAC,IAAI,CAiBlE,CAAA"}
|
package/dist/menu/index.js
CHANGED
|
@@ -395,21 +395,28 @@ export const update = (model, message) => {
|
|
|
395
395
|
*
|
|
396
396
|
* Exposed so Scene tests can call
|
|
397
397
|
* `Scene.Mount.resolve(AnchorMenu, Message.CompletedAnchorMenu())`. */
|
|
398
|
-
export const AnchorMenu = Mount.define('AnchorMenu', {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
398
|
+
export const AnchorMenu = Mount.define('AnchorMenu', {
|
|
399
|
+
args: { buttonId: S.String, anchor: AnchorConfig },
|
|
400
|
+
messages: [Message.CompletedAnchorMenu],
|
|
401
|
+
execute: ({ element, buttonId, anchor }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
402
|
+
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((anchorSetup(element, {
|
|
403
|
+
buttonId,
|
|
404
|
+
anchor,
|
|
405
|
+
focusAfterPosition: true,
|
|
406
|
+
})), "@foldkit/ui/menu/index.js#anonymous~13")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/menu/index.js#anonymous~14"));
|
|
407
|
+
return __foldkitBrandViewResult((Message.CompletedAnchorMenu()), "@foldkit/ui/menu/index.js#anonymous~12");
|
|
408
|
+
})), "@foldkit/ui/menu/index.js#execute~9"),
|
|
409
|
+
});
|
|
406
410
|
/** The backdrop-portaling Mount this Menu renders. Exposed so Scene tests can
|
|
407
411
|
* call `Scene.Mount.resolve(PortalMenuBackdrop, Message.CompletedPortalMenuBackdrop())` to
|
|
408
412
|
* acknowledge the mount produced by the rendered backdrop. */
|
|
409
|
-
export const PortalMenuBackdrop = Mount.define('PortalMenuBackdrop',
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
+
export const PortalMenuBackdrop = Mount.define('PortalMenuBackdrop', {
|
|
414
|
+
messages: [Message.CompletedPortalMenuBackdrop],
|
|
415
|
+
execute: ({ element }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
416
|
+
yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((portalToContainingRoot(element)), "@foldkit/ui/menu/index.js#anonymous~16")), cleanup => __foldkitBrandViewResult((Effect.sync(cleanup)), "@foldkit/ui/menu/index.js#anonymous~17"));
|
|
417
|
+
return __foldkitBrandViewResult((Message.CompletedPortalMenuBackdrop()), "@foldkit/ui/menu/index.js#anonymous~15");
|
|
418
|
+
})), "@foldkit/ui/menu/index.js#execute~10"),
|
|
419
|
+
});
|
|
413
420
|
/** Programmatically opens the Menu, updating the Model and returning focus and
|
|
414
421
|
* modal Commands. Use this in domain-event handlers. */
|
|
415
422
|
export const open = (model) => __foldkitBrandViewResult((update(model, Message.Opened({ maybeActiveItemIndex: Option.none() }))), "@foldkit/ui/menu/index.js#open");
|
|
@@ -428,7 +435,7 @@ const internalView = () =>
|
|
|
428
435
|
__foldkitBrandViewResult((menuViewImpl), "@foldkit/ui/menu/index.js#internalView");
|
|
429
436
|
const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
430
437
|
const { id, isOpen, animation: { transitionState }, maybeActiveItemIndex, searchQuery, maybeLastButtonPointerType, } = model;
|
|
431
|
-
const { items, itemToConfig, isItemDisabled, itemToSearchText = (item) => __foldkitBrandViewResult((item), "@foldkit/ui/menu/index.js#anonymous~
|
|
438
|
+
const { items, itemToConfig, isItemDisabled, itemToSearchText = (item) => __foldkitBrandViewResult((item), "@foldkit/ui/menu/index.js#anonymous~19"), isButtonDisabled, buttonContent, buttonClassName, buttonAttributes = [], itemsClassName, itemsAttributes = [], itemsScrollClassName, itemsScrollAttributes = [], backdropClassName, backdropAttributes = [], className, attributes = [], itemGroupKey, groupToHeading, groupClassName, groupAttributes = [], separatorClassName, separatorAttributes = [], anchor = {}, ariaLabel, ariaLabelledBy, } = viewInputs;
|
|
432
439
|
const dispatchSelectedItem = (item, index) => __foldkitBrandViewResult((Message.SelectedItem({ index, item })), "@foldkit/ui/menu/index.js#dispatchSelectedItem");
|
|
433
440
|
const isLeaving = transitionState === 'LeaveStart' || transitionState === 'LeaveAnimating';
|
|
434
441
|
const isVisible = isOpen || isLeaving;
|
|
@@ -436,19 +443,19 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
436
443
|
h.DataAttribute('closed', ''),
|
|
437
444
|
h.DataAttribute('enter', ''),
|
|
438
445
|
h.DataAttribute('transition', ''),
|
|
439
|
-
]), "@foldkit/ui/menu/index.js#anonymous~
|
|
446
|
+
]), "@foldkit/ui/menu/index.js#anonymous~20")), M.when('EnterAnimating', () => __foldkitBrandViewResult(([
|
|
440
447
|
h.DataAttribute('enter', ''),
|
|
441
448
|
h.DataAttribute('transition', ''),
|
|
442
|
-
]), "@foldkit/ui/menu/index.js#anonymous~
|
|
449
|
+
]), "@foldkit/ui/menu/index.js#anonymous~21")), M.when('LeaveStart', () => __foldkitBrandViewResult(([
|
|
443
450
|
h.DataAttribute('leave', ''),
|
|
444
451
|
h.DataAttribute('transition', ''),
|
|
445
|
-
]), "@foldkit/ui/menu/index.js#anonymous~
|
|
452
|
+
]), "@foldkit/ui/menu/index.js#anonymous~22")), M.when('LeaveAnimating', () => __foldkitBrandViewResult(([
|
|
446
453
|
h.DataAttribute('closed', ''),
|
|
447
454
|
h.DataAttribute('leave', ''),
|
|
448
455
|
h.DataAttribute('transition', ''),
|
|
449
|
-
]), "@foldkit/ui/menu/index.js#anonymous~
|
|
456
|
+
]), "@foldkit/ui/menu/index.js#anonymous~23")), M.orElse(() => __foldkitBrandViewResult(([]), "@foldkit/ui/menu/index.js#anonymous~24")));
|
|
450
457
|
const isDisabled = (index) => __foldkitBrandViewResult((Predicate.isNotUndefined(isItemDisabled) &&
|
|
451
|
-
pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/menu/index.js#anonymous~
|
|
458
|
+
pipe(items, Array.get(index), Option.exists(item => __foldkitBrandViewResult((isItemDisabled(item, index)), "@foldkit/ui/menu/index.js#anonymous~25")))), "@foldkit/ui/menu/index.js#isDisabled");
|
|
452
459
|
const firstEnabledIndex = findFirstEnabledIndex(items.length, 0, isDisabled)(0, 1);
|
|
453
460
|
const lastEnabledIndex = findFirstEnabledIndex(items.length, 0, isDisabled)(items.length - 1, -1);
|
|
454
461
|
const handleButtonKeyDown = (key) => {
|
|
@@ -457,9 +464,9 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
457
464
|
}
|
|
458
465
|
return __foldkitBrandViewResult((M.value(key).pipe(M.whenOr('Enter', ' ', 'ArrowDown', () => __foldkitBrandViewResult((Option.some(Message.Opened({
|
|
459
466
|
maybeActiveItemIndex: Option.some(firstEnabledIndex),
|
|
460
|
-
}))), "@foldkit/ui/menu/index.js#anonymous~
|
|
467
|
+
}))), "@foldkit/ui/menu/index.js#anonymous~26")), M.when('ArrowUp', () => __foldkitBrandViewResult((Option.some(Message.Opened({
|
|
461
468
|
maybeActiveItemIndex: Option.some(lastEnabledIndex),
|
|
462
|
-
}))), "@foldkit/ui/menu/index.js#anonymous~
|
|
469
|
+
}))), "@foldkit/ui/menu/index.js#anonymous~27")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/menu/index.js#anonymous~28")))), "@foldkit/ui/menu/index.js#handleButtonKeyDown");
|
|
463
470
|
};
|
|
464
471
|
const handleButtonPointerDown = (pointerType, button, screenX, screenY, timeStamp) => __foldkitBrandViewResult((Option.some(Message.PressedPointerOnButton({
|
|
465
472
|
pointerType,
|
|
@@ -469,7 +476,7 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
469
476
|
timeStamp,
|
|
470
477
|
}))), "@foldkit/ui/menu/index.js#handleButtonPointerDown");
|
|
471
478
|
const handleButtonClick = () => {
|
|
472
|
-
const isMouse = Option.exists(maybeLastButtonPointerType, type => __foldkitBrandViewResult((type === 'mouse'), "@foldkit/ui/menu/index.js#anonymous~
|
|
479
|
+
const isMouse = Option.exists(maybeLastButtonPointerType, type => __foldkitBrandViewResult((type === 'mouse'), "@foldkit/ui/menu/index.js#anonymous~29"));
|
|
473
480
|
if (isMouse) {
|
|
474
481
|
return __foldkitBrandViewResult((Message.IgnoredMouseClick()), "@foldkit/ui/menu/index.js#handleButtonClick");
|
|
475
482
|
}
|
|
@@ -481,18 +488,18 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
481
488
|
}
|
|
482
489
|
};
|
|
483
490
|
const handleSpaceKeyUp = (key) => __foldkitBrandViewResult((OptionExt.when(key === ' ', Message.SuppressedSpaceScroll())), "@foldkit/ui/menu/index.js#handleSpaceKeyUp");
|
|
484
|
-
const resolveActiveIndex = keyToIndex('ArrowDown', 'ArrowUp', items.length, Option.getOrElse(maybeActiveItemIndex, () => __foldkitBrandViewResult((0), "@foldkit/ui/menu/index.js#anonymous~
|
|
491
|
+
const resolveActiveIndex = keyToIndex('ArrowDown', 'ArrowUp', items.length, Option.getOrElse(maybeActiveItemIndex, () => __foldkitBrandViewResult((0), "@foldkit/ui/menu/index.js#anonymous~30")), isDisabled);
|
|
485
492
|
const searchForKey = (key) => {
|
|
486
493
|
const nextQuery = searchQuery + key;
|
|
487
494
|
const maybeTargetIndex = resolveTypeaheadMatch(items, nextQuery, maybeActiveItemIndex, isDisabled, itemToSearchText, Str.isNonEmpty(searchQuery));
|
|
488
495
|
return __foldkitBrandViewResult((Option.some(Message.Searched({ key, maybeTargetIndex }))), "@foldkit/ui/menu/index.js#searchForKey");
|
|
489
496
|
};
|
|
490
|
-
const handleItemsKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some(Message.Closed())), "@foldkit/ui/menu/index.js#anonymous~
|
|
497
|
+
const handleItemsKeyDown = (key) => __foldkitBrandViewResult((M.value(key).pipe(M.when('Escape', () => __foldkitBrandViewResult((Option.some(Message.Closed())), "@foldkit/ui/menu/index.js#anonymous~31")), M.when('Enter', () => __foldkitBrandViewResult((Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((Message.RequestedItemClick({ index })), "@foldkit/ui/menu/index.js#anonymous~33"))), "@foldkit/ui/menu/index.js#anonymous~32")), M.when(' ', () => __foldkitBrandViewResult((Str.isNonEmpty(searchQuery)
|
|
491
498
|
? searchForKey(' ')
|
|
492
|
-
: Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((Message.RequestedItemClick({ index })), "@foldkit/ui/menu/index.js#anonymous~
|
|
499
|
+
: Option.map(maybeActiveItemIndex, index => __foldkitBrandViewResult((Message.RequestedItemClick({ index })), "@foldkit/ui/menu/index.js#anonymous~35"))), "@foldkit/ui/menu/index.js#anonymous~34")), M.whenOr('ArrowDown', 'ArrowUp', 'Home', 'End', 'PageUp', 'PageDown', () => __foldkitBrandViewResult((Option.some(Message.ActivatedItem({
|
|
493
500
|
index: resolveActiveIndex(key),
|
|
494
501
|
activationTrigger: 'Keyboard',
|
|
495
|
-
}))), "@foldkit/ui/menu/index.js#anonymous~
|
|
502
|
+
}))), "@foldkit/ui/menu/index.js#anonymous~36")), M.when(isPrintableKey, () => __foldkitBrandViewResult((searchForKey(key)), "@foldkit/ui/menu/index.js#anonymous~37")), M.orElse(() => __foldkitBrandViewResult((Option.none()), "@foldkit/ui/menu/index.js#anonymous~38")))), "@foldkit/ui/menu/index.js#handleItemsKeyDown");
|
|
496
503
|
const handleItemsPointerUp = (screenX, screenY, pointerType, timeStamp) => __foldkitBrandViewResult((OptionExt.when(pointerType === 'mouse', Message.ReleasedPointerOnItems({ screenX, screenY, timeStamp }))), "@foldkit/ui/menu/index.js#handleItemsPointerUp");
|
|
497
504
|
const resolveButtonLabel = () => {
|
|
498
505
|
if (Predicate.isNotUndefined(ariaLabel)) {
|
|
@@ -558,7 +565,7 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
558
565
|
...itemsAttributes,
|
|
559
566
|
];
|
|
560
567
|
const menuItems = Array.map(items, (item, index) => {
|
|
561
|
-
const isActiveItem = Option.exists(maybeActiveItemIndex, activeIndex => __foldkitBrandViewResult((activeIndex === index), "@foldkit/ui/menu/index.js#anonymous~
|
|
568
|
+
const isActiveItem = Option.exists(maybeActiveItemIndex, activeIndex => __foldkitBrandViewResult((activeIndex === index), "@foldkit/ui/menu/index.js#anonymous~40"));
|
|
562
569
|
const isDisabledItem = isDisabled(index);
|
|
563
570
|
const itemConfig = itemToConfig(item, {
|
|
564
571
|
isActive: isActiveItem,
|
|
@@ -582,13 +589,13 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
582
589
|
index,
|
|
583
590
|
screenX,
|
|
584
591
|
screenY,
|
|
585
|
-
}))), "@foldkit/ui/menu/index.js#anonymous~
|
|
592
|
+
}))), "@foldkit/ui/menu/index.js#anonymous~41")),
|
|
586
593
|
]),
|
|
587
|
-
h.OnPointerLeave(pointerType => __foldkitBrandViewResult((OptionExt.when(pointerType !== 'touch', Message.DeactivatedItem())), "@foldkit/ui/menu/index.js#anonymous~
|
|
594
|
+
h.OnPointerLeave(pointerType => __foldkitBrandViewResult((OptionExt.when(pointerType !== 'touch', Message.DeactivatedItem())), "@foldkit/ui/menu/index.js#anonymous~42")),
|
|
588
595
|
]
|
|
589
596
|
: []),
|
|
590
597
|
...(itemConfig.className ? [h.Class(itemConfig.className)] : []),
|
|
591
|
-
], [itemConfig.content])), "@foldkit/ui/menu/index.js#anonymous~
|
|
598
|
+
], [itemConfig.content])), "@foldkit/ui/menu/index.js#anonymous~39");
|
|
592
599
|
});
|
|
593
600
|
const renderGroupedItems = () => {
|
|
594
601
|
if (!itemGroupKey) {
|
|
@@ -597,7 +604,7 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
597
604
|
const segments = groupContiguous(menuItems, (_, index) => __foldkitBrandViewResult((Array.get(items, index).pipe(Option.match({
|
|
598
605
|
onNone: () => __foldkitBrandViewResult((''), "@foldkit/ui/menu/index.js#onNone~3"),
|
|
599
606
|
onSome: item => __foldkitBrandViewResult((itemGroupKey(item, index)), "@foldkit/ui/menu/index.js#onSome~3"),
|
|
600
|
-
}))), "@foldkit/ui/menu/index.js#anonymous~
|
|
607
|
+
}))), "@foldkit/ui/menu/index.js#anonymous~43"));
|
|
601
608
|
return __foldkitBrandViewResult((Array.flatMap(segments, (segment, segmentIndex) => {
|
|
602
609
|
const maybeHeading = Option.fromNullishOr(groupToHeading && groupToHeading(segment.key));
|
|
603
610
|
const headingId = `${id}-heading-${segment.key}`;
|
|
@@ -631,7 +638,7 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
631
638
|
]),
|
|
632
639
|
]
|
|
633
640
|
: [];
|
|
634
|
-
return __foldkitBrandViewResult(([...separator, groupElement]), "@foldkit/ui/menu/index.js#anonymous~
|
|
641
|
+
return __foldkitBrandViewResult(([...separator, groupElement]), "@foldkit/ui/menu/index.js#anonymous~44");
|
|
635
642
|
})), "@foldkit/ui/menu/index.js#renderGroupedItems");
|
|
636
643
|
};
|
|
637
644
|
const backdrop = h.keyed('div')(`${id}-backdrop`, [
|
|
@@ -666,7 +673,7 @@ const menuViewImpl = defineView((model, viewInputs, h) => {
|
|
|
666
673
|
buttonContent,
|
|
667
674
|
]),
|
|
668
675
|
...(isVisible ? visibleContent : []),
|
|
669
|
-
])), "@foldkit/ui/menu/index.js#anonymous~
|
|
676
|
+
])), "@foldkit/ui/menu/index.js#anonymous~18");
|
|
670
677
|
});
|
|
671
678
|
/** Pairs the menu's `view` and `update` (and programmatic helpers)
|
|
672
679
|
* behind a single Item-typed entry point. Declaring the menu once at
|
package/dist/popover/index.d.ts
CHANGED
|
@@ -78,6 +78,11 @@ export declare const init: (config: InitConfig) => Model;
|
|
|
78
78
|
* trigger via a native `<label for={Popover.buttonId(id)}>` or an
|
|
79
79
|
* `aria-labelledby` reference. */
|
|
80
80
|
export declare const buttonId: (id: string) => string;
|
|
81
|
+
/** Returns the bare DOM id of the popover arrow, derived from the popover's
|
|
82
|
+
* base id. The `arrow` bundle already carries this id, so reach for this when
|
|
83
|
+
* you need the id on its own, such as asserting the panel Mount's `arrowId`
|
|
84
|
+
* argument in a Scene test. */
|
|
85
|
+
export declare const arrowId: (id: string) => string;
|
|
81
86
|
type UpdateReturn = Update.ReturnWithOutMessage<Model, Message, OutMessage>;
|
|
82
87
|
/** Prevents page scrolling while the popover is open in modal mode. */
|
|
83
88
|
export declare const LockScroll: Command.CommandDefinitionNoArgs<"LockScroll", Effect.Effect<{
|
|
@@ -209,6 +214,8 @@ export declare const AnchorPopover: Mount.MountDefinitionWithArgs<"AnchorPopover
|
|
|
209
214
|
readonly isPlacementLocked: S.optional<S.Boolean>;
|
|
210
215
|
}>;
|
|
211
216
|
focusSelector: S.optional<S.String>;
|
|
217
|
+
arrowId: S.optional<S.String>;
|
|
218
|
+
arrowPadding: S.optional<S.Number>;
|
|
212
219
|
}, {
|
|
213
220
|
readonly _tag: "CompletedAnchorPopover";
|
|
214
221
|
}>;
|
|
@@ -234,6 +241,11 @@ export declare const close: (model: Model) => UpdateReturn;
|
|
|
234
241
|
* - `backdrop`: attribute bundle for the modal backdrop. Includes the
|
|
235
242
|
* portal Mount that moves the backdrop to document.body. The
|
|
236
243
|
* backdrop's OnClick closes the popover.
|
|
244
|
+
* - `arrow`: attribute bundle for an arrow element inside the panel.
|
|
245
|
+
* Carries the id the anchor Mount resolves and hides the element from
|
|
246
|
+
* assistive technology. Spread it onto your own element and place it
|
|
247
|
+
* with the `--arrow-x` and `--arrow-y` custom properties Anchor
|
|
248
|
+
* publishes on the panel. Nothing renders until you do.
|
|
237
249
|
* - `isVisible`: derived from `isOpen` and the Animation
|
|
238
250
|
* `transitionState`. The consumer renders the panel + backdrop only
|
|
239
251
|
* while this is true. */
|
|
@@ -241,6 +253,7 @@ export type RenderInfo = Readonly<{
|
|
|
241
253
|
button: ReadonlyArray<ChildAttribute>;
|
|
242
254
|
panel: ReadonlyArray<ChildAttribute>;
|
|
243
255
|
backdrop: ReadonlyArray<ChildAttribute>;
|
|
256
|
+
arrow: ReadonlyArray<ChildAttribute>;
|
|
244
257
|
isVisible: boolean;
|
|
245
258
|
}>;
|
|
246
259
|
/** Per-render view inputs passed to `view` via `h.submodel`'s `viewInputs` field. */
|
|
@@ -249,6 +262,7 @@ export type ViewInputs = Readonly<{
|
|
|
249
262
|
toView: (render: RenderInfo) => Html;
|
|
250
263
|
isDisabled?: boolean;
|
|
251
264
|
focusSelector?: string;
|
|
265
|
+
arrowPadding?: number;
|
|
252
266
|
ariaLabel?: string;
|
|
253
267
|
ariaLabelledBy?: string;
|
|
254
268
|
}>;
|
|
@@ -311,6 +325,7 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
311
325
|
toView: (render: RenderInfo) => Html;
|
|
312
326
|
isDisabled?: boolean;
|
|
313
327
|
focusSelector?: string;
|
|
328
|
+
arrowPadding?: number;
|
|
314
329
|
ariaLabel?: string;
|
|
315
330
|
ariaLabelledBy?: string;
|
|
316
331
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAEZ,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAE1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