@astryxdesign/core 0.7.17 → 0.7.18-canary.g32556bb
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/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +7 -0
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +5 -3
- package/dist/AppShell/observeMainOverflow.d.ts +5 -0
- package/dist/AppShell/observeMainOverflow.d.ts.map +1 -1
- package/dist/AppShell/observeMainOverflow.js +39 -9
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +8 -0
- package/dist/BottomSheet/useSheetGestures.d.ts +8 -0
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +16 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +3 -16
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +5 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +2 -2
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +7 -2
- package/dist/DateInput/DateInput.d.ts +0 -3
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +3 -5
- package/dist/DateInput/NativeDateField.d.ts.map +1 -1
- package/dist/DateInput/NativeDateField.js +3 -5
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -4
- package/dist/DateInput/useTypedDate.d.ts.map +1 -1
- package/dist/DateInput/useTypedDate.js +9 -6
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +13 -9
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +3 -15
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -14
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +7 -1
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +7 -0
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +2 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +9 -2
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +23 -0
- package/dist/Field/inputStyles.stylex.d.ts +22 -6
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +32 -0
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +7 -2
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +4 -4
- package/dist/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/InputGroup/InputGroup.js +6 -16
- package/dist/InputGroup/InputGroupText.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupText.js +2 -8
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +8 -2
- package/dist/Kbd/Kbd.d.ts +3 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +3 -2
- package/dist/Layer/gestureCounter.d.ts +5 -0
- package/dist/Layer/gestureCounter.d.ts.map +1 -1
- package/dist/Layer/gestureCounter.js +40 -4
- package/dist/Layer/inputHold.d.ts +13 -0
- package/dist/Layer/inputHold.d.ts.map +1 -1
- package/dist/Layer/inputHold.js +203 -14
- package/dist/Layer/layerHost.d.ts +3 -2
- package/dist/Layer/layerHost.d.ts.map +1 -1
- package/dist/Layer/layerHost.js +3 -2
- package/dist/Layer/outsidePanClaim.d.ts +17 -0
- package/dist/Layer/outsidePanClaim.d.ts.map +1 -1
- package/dist/Layer/outsidePanClaim.js +36 -8
- package/dist/Layer/outsidePress.d.ts +7 -1
- package/dist/Layer/outsidePress.d.ts.map +1 -1
- package/dist/Layer/outsidePress.js +9 -2
- package/dist/Layer/useLayer.d.ts +21 -5
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +63 -40
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +7 -0
- package/dist/MetadataList/MetadataList.d.ts +1 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +8 -0
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +37 -17
- package/dist/NavIcon/NavIcon.d.ts +2 -2
- package/dist/NavIcon/NavIcon.d.ts.map +1 -1
- package/dist/NavIcon/NavIcon.js +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +4 -3
- package/dist/NumberInput/NumberInput.d.ts +13 -5
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +6 -17
- package/dist/NumberInput/numberParser.d.ts +9 -2
- package/dist/NumberInput/numberParser.d.ts.map +1 -1
- package/dist/NumberInput/numberParser.js +15 -2
- package/dist/Overlay/OverlayScrim.d.ts.map +1 -1
- package/dist/Overlay/OverlayScrim.js +13 -4
- package/dist/Overlay/useOverlay.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts +3 -2
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +9 -2
- package/dist/Popover/usePopover.d.ts +37 -6
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +103 -20
- package/dist/PowerSearch/PowerSearch.d.ts +4 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +3 -4
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +1 -2
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchBottomSheet.js +173 -185
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +0 -12
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +1 -51
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +6 -8
- package/dist/PowerSearch/formatTokenValue.d.ts +5 -10
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatTokenValue.js +21 -38
- package/dist/PowerSearch/relativeDateOptions.d.ts +30 -0
- package/dist/PowerSearch/relativeDateOptions.d.ts.map +1 -0
- package/dist/PowerSearch/relativeDateOptions.js +74 -0
- package/dist/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +20 -14
- package/dist/Resizable/createResizable.d.ts.map +1 -1
- package/dist/Resizable/createResizable.js +38 -4
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +5 -3
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +6 -2
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +2 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +53 -8
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +2 -2
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +2 -0
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +2 -0
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +30 -8
- package/dist/Table/Table.d.ts +9 -4
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +9 -4
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +2 -2
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +3 -7
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +10 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +11 -3
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +203 -51
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +4 -1
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
- package/dist/Table/plugins/rowStatus/useTableRowStatus.js +2 -0
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +18 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +34 -24
- package/dist/Table/tableColumnAdmission.d.ts +7 -0
- package/dist/Table/tableColumnAdmission.d.ts.map +1 -1
- package/dist/Table/tableColumnAdmission.js +15 -0
- package/dist/Table/types.d.ts +5 -5
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +13 -8
- package/dist/Text/TruncationTooltip.d.ts +7 -39
- package/dist/Text/TruncationTooltip.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.js +47 -128
- package/dist/Text/cutText.d.ts +22 -0
- package/dist/Text/cutText.d.ts.map +1 -0
- package/dist/Text/cutText.js +92 -0
- package/dist/Text/cutTextOnKeyboardFocus.d.ts +41 -0
- package/dist/Text/cutTextOnKeyboardFocus.d.ts.map +1 -0
- package/dist/Text/cutTextOnKeyboardFocus.js +112 -0
- package/dist/Text/textClampContext.d.ts +1 -0
- package/dist/Text/textClampContext.d.ts.map +1 -1
- package/dist/Text/textClampContext.js +10 -5
- package/dist/Text/useTruncation.d.ts +23 -1
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +74 -28
- package/dist/TextInput/TextInput.d.ts +6 -6
- package/dist/Thumbnail/Thumbnail.js +4 -1
- package/dist/TimeInput/TimeInput.d.ts +0 -3
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +3 -5
- package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
- package/dist/TimeInput/TouchTimeField.js +3 -5
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +22 -16
- package/dist/Timestamp/TimestampHoverCard.d.ts +6 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts.map +1 -1
- package/dist/Timestamp/TimestampHoverCard.js +30 -19
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +3 -3
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.js +4 -2
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +62 -31
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +35 -13
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +35 -14
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +20 -3
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +3 -3
- package/dist/astryx.css +41 -10
- package/dist/hooks/useAnnounceRenderedText.d.ts +10 -3
- package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
- package/dist/hooks/useAnnounceRenderedText.js +11 -3
- package/dist/hooks/useFocusTrap.d.ts +12 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +13 -6
- package/dist/hooks/useHotkeys.d.ts +9 -1
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +52 -2
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +2 -1
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +4 -3
- package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/DateRangeInput/DateRangeInput.generated.js +2 -0
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +0 -6
- package/dist/i18n/generated-english/PowerSearch/relativeDateOptions.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/relativeDateOptions.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/relativeDateOptions.generated.js +17 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Slider/Slider.generated.js +1 -0
- package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Thumbnail/Thumbnail.generated.js +1 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +5 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +5 -0
- package/dist/i18n/getLocaleDirection.d.ts +0 -16
- package/dist/i18n/getLocaleDirection.d.ts.map +1 -1
- package/dist/i18n/getLocaleDirection.js +16 -6
- package/dist/i18n/listFormat.d.ts +34 -0
- package/dist/i18n/listFormat.d.ts.map +1 -0
- package/dist/i18n/listFormat.js +45 -0
- package/dist/i18n/useListFormatter.d.ts +7 -3
- package/dist/i18n/useListFormatter.d.ts.map +1 -1
- package/dist/i18n/useListFormatter.js +16 -13
- package/dist/internal/module-loader.d.ts +15 -0
- package/dist/internal/module-loader.d.ts.map +1 -0
- package/dist/internal/module-loader.js +15 -0
- package/dist/motion/animatedLayout.d.ts +6 -0
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +201 -27
- package/dist/palette/color.d.ts +16 -0
- package/dist/palette/color.d.ts.map +1 -1
- package/dist/palette/color.js +37 -1
- package/dist/palette/derive-look.d.ts +235 -0
- package/dist/palette/derive-look.d.ts.map +1 -0
- package/dist/palette/derive-look.js +879 -0
- package/dist/palette/editor-look.d.ts +41 -0
- package/dist/palette/editor-look.d.ts.map +1 -0
- package/dist/palette/editor-look.js +401 -0
- package/dist/palette/mapping.d.ts +99 -6
- package/dist/palette/mapping.d.ts.map +1 -1
- package/dist/palette/mapping.js +68 -11
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +1 -1
- package/dist/utils/characters.d.ts.map +1 -1
- package/dist/utils/characters.js +7 -0
- package/dist/utils/devWarning.d.ts +18 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +30 -0
- package/dist/utils/focusReturn.d.ts +2 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +3 -8
- package/dist/utils/hitArea.d.ts +4 -1
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +72 -9
- package/dist/utils/mergeProps.d.ts.map +1 -1
- package/dist/utils/mergeProps.js +53 -38
- package/dist/utils/scrollView.d.ts +2 -2
- package/dist/utils/scrollView.d.ts.map +1 -1
- package/dist/utils/scrollView.js +3 -3
- package/dist/utils/textDirection.d.ts +29 -5
- package/dist/utils/textDirection.d.ts.map +1 -1
- package/dist/utils/textDirection.js +56 -4
- package/dist/utils/themeProps.d.ts.map +1 -1
- package/dist/utils/themeProps.js +22 -3
- package/dist/utils/touchHitArea.d.ts.map +1 -1
- package/dist/utils/touchHitArea.js +4 -2
- package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
- package/dist/virtualization/useInlineListWindow.js +63 -4
- package/locales/en.json +26 -6
- package/locales/pseudo.json +15 -0
- package/package.json +10 -5
- package/src/AlertDialog/AlertDialog.tsx +15 -0
- package/src/AlertDialog/useImperativeAlertDialog.doc.mjs +7 -4
- package/src/AppShell/AppShell.tsx +6 -3
- package/src/AppShell/observeMainOverflow.ts +39 -9
- package/src/Badge/Badge.doc.mjs +3 -3
- package/src/BottomSheet/BottomSheet.tsx +15 -0
- package/src/BottomSheet/useSheetGestures.ts +26 -1
- package/src/Button/Button.tsx +3 -23
- package/src/Card/Card.doc.mjs +3 -3
- package/src/Card/Card.tsx +11 -6
- package/src/Chat/ChatSendButton.doc.mjs +6 -6
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +8 -2
- package/src/ClickableCard/ClickableCard.tsx +9 -2
- package/src/ComplexSelector/ComplexSelector.doc.mjs +3 -3
- package/src/ContextMenu/ContextMenuItem.doc.mjs +3 -3
- package/src/DateInput/DateInput.tsx +2 -4
- package/src/DateInput/NativeDateField.tsx +5 -4
- package/src/DateInput/TouchDateField.tsx +2 -3
- package/src/DateInput/useTypedDate.ts +13 -6
- package/src/DateRangeInput/DateRangeInput.tsx +14 -10
- package/src/DateTimeInput/DateTimeInput.tsx +2 -12
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -11
- package/src/Dialog/Dialog.tsx +15 -1
- package/src/Dialog/useImperativeDialog.doc.mjs +7 -4
- package/src/Drawer/Drawer.tsx +15 -0
- package/src/DropdownMenu/DropdownMenu.doc.mjs +1 -1
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +2 -2
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/Field.tsx +2 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +11 -3
- package/src/Field/InputClearButton.tsx +27 -0
- package/src/Field/inputStyles.stylex.ts +53 -6
- package/src/FieldStatus/FieldStatus.tsx +7 -2
- package/src/FileInput/FileInput.tsx +12 -2
- package/src/Icon/Icon.doc.mjs +17 -14
- package/src/Icon/useIcon.doc.mjs +6 -6
- package/src/IconButton/IconButton.doc.mjs +2 -2
- package/src/InfoTip/InfoTip.doc.mjs +1 -1
- package/src/InputGroup/InputGroup.tsx +5 -12
- package/src/InputGroup/InputGroupText.tsx +2 -3
- package/src/Item/Item.tsx +10 -1
- package/src/Kbd/Kbd.doc.mjs +5 -5
- package/src/Kbd/Kbd.tsx +3 -2
- package/src/Layer/gestureCounter.ts +39 -3
- package/src/Layer/inputHold.ts +241 -18
- package/src/Layer/layerHost.ts +3 -2
- package/src/Layer/outsidePanClaim.ts +50 -8
- package/src/Layer/outsidePress.ts +18 -4
- package/src/Layer/useLayer.tsx +128 -76
- package/src/Lightbox/Lightbox.tsx +15 -0
- package/src/MetadataList/MetadataList.tsx +8 -0
- package/src/MoreMenu/MoreMenu.doc.mjs +1 -1
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +45 -15
- package/src/NavIcon/NavIcon.doc.mjs +19 -10
- package/src/NavIcon/NavIcon.tsx +3 -2
- package/src/NavMenu/NavHeadingMenuItem.tsx +9 -3
- package/src/NumberInput/NumberInput.doc.mjs +12 -12
- package/src/NumberInput/NumberInput.tsx +12 -15
- package/src/NumberInput/numberParser.ts +15 -2
- package/src/Overlay/Overlay.doc.mjs +13 -1
- package/src/Overlay/OverlayScrim.tsx +45 -15
- package/src/Overlay/useOverlay.doc.mjs +7 -7
- package/src/Overlay/useOverlay.tsx +1 -1
- package/src/Pagination/Pagination.doc.mjs +9 -6
- package/src/Pagination/Pagination.tsx +15 -3
- package/src/Popover/usePopover.doc.mjs +14 -4
- package/src/Popover/usePopover.tsx +180 -23
- package/src/PowerSearch/PowerSearch.doc.mjs +165 -15
- package/src/PowerSearch/PowerSearch.tsx +6 -8
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +182 -223
- package/src/PowerSearch/PowerSearchValueEditor.tsx +1 -51
- package/src/PowerSearch/formatFilterValue.ts +8 -9
- package/src/PowerSearch/formatTokenValue.ts +24 -42
- package/src/PowerSearch/relativeDateOptions.ts +84 -0
- package/src/ProgressBar/ProgressBar.doc.mjs +24 -5
- package/src/ProgressBar/ProgressBar.tsx +28 -18
- package/src/Resizable/createResizable.ts +46 -5
- package/src/SegmentedControl/SegmentedControlItem.tsx +4 -3
- package/src/SelectableCard/SelectableCard.tsx +8 -2
- package/src/Selector/Selector.doc.mjs +3 -3
- package/src/Selector/Selector.tsx +3 -1
- package/src/Selector/SelectorOption.doc.mjs +3 -3
- package/src/SideNav/SideNavItem.doc.mjs +6 -6
- package/src/SideNav/SideNavItem.tsx +3 -0
- package/src/Slider/Slider.tsx +48 -6
- package/src/Stepper/Step.tsx +7 -1
- package/src/Switch/Switch.doc.mjs +3 -3
- package/src/TabList/Tab.tsx +4 -0
- package/src/TabList/TabMenu.tsx +4 -0
- package/src/Table/BaseTable.tsx +35 -7
- package/src/Table/Table.doc.mjs +63 -6
- package/src/Table/Table.tsx +9 -4
- package/src/Table/TableCell.tsx +5 -2
- package/src/Table/TableHeaderCell.tsx +2 -8
- package/src/Table/TableRow.tsx +10 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +250 -53
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +10 -1
- package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +5 -0
- package/src/Table/plugins/sortable/useTableSortable.tsx +41 -2
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +49 -20
- package/src/Table/tableColumnAdmission.ts +23 -0
- package/src/Table/types.ts +5 -5
- package/src/Table/useTableRowsVirtualization.doc.mjs +2 -2
- package/src/Text/Text.tsx +21 -7
- package/src/Text/TruncationTooltip.tsx +51 -184
- package/src/Text/cutText.tsx +126 -0
- package/src/Text/cutTextOnKeyboardFocus.tsx +158 -0
- package/src/Text/textClampContext.ts +14 -4
- package/src/Text/useTruncation.ts +85 -27
- package/src/TextArea/TextArea.doc.mjs +4 -4
- package/src/TextInput/TextInput.doc.mjs +3 -3
- package/src/Thumbnail/Thumbnail.tsx +1 -1
- package/src/TimeInput/TimeInput.tsx +3 -9
- package/src/TimeInput/TouchTimeField.tsx +6 -4
- package/src/Timestamp/Timestamp.tsx +29 -21
- package/src/Timestamp/TimestampHoverCard.tsx +44 -31
- package/src/Timestamp/formatInstant.ts +7 -3
- package/src/Timestamp/tooltipEntries.ts +4 -2
- package/src/Toast/Toast.doc.mjs +24 -37
- package/src/Toast/Toast.tsx +77 -29
- package/src/Toast/ToastViewport.tsx +33 -13
- package/src/Toast/useToast.tsx +42 -15
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Toolbar/Toolbar.tsx +20 -6
- package/src/Tooltip/useTooltip.tsx +2 -1
- package/src/TopNav/TopNavMegaMenu.doc.mjs +13 -0
- package/src/TopNav/TopNavMenu.doc.mjs +2 -0
- package/src/Typeahead/Typeahead.doc.mjs +2 -2
- package/src/hooks/useAnnounceRenderedText.ts +15 -2
- package/src/hooks/useFocusTrap.ts +27 -4
- package/src/hooks/useHotkeys.doc.mjs +54 -11
- package/src/hooks/useHotkeys.ts +72 -3
- package/src/hooks/useInputStatusIcon.tsx +2 -1
- package/src/hooks/useKeyboardHint.tsx +3 -2
- package/src/i18n/generated-english/DateRangeInput/DateRangeInput.generated.ts +2 -0
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +0 -6
- package/src/i18n/generated-english/PowerSearch/relativeDateOptions.generated.ts +18 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +1 -0
- package/src/i18n/generated-english/Thumbnail/Thumbnail.generated.ts +1 -0
- package/src/i18n/generated-locales/en.generated.ts +5 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +5 -0
- package/src/i18n/getLocaleDirection.ts +57 -7
- package/src/i18n/listFormat.ts +55 -0
- package/src/i18n/useListFormatter.ts +22 -13
- package/src/internal/module-loader.ts +15 -0
- package/src/motion/animatedLayout.ts +215 -28
- package/src/palette/color.ts +41 -1
- package/src/palette/derive-look.ts +1186 -0
- package/src/palette/editor-look.ts +480 -0
- package/src/palette/mapping.ts +129 -15
- package/src/theme/SyntaxTheme.doc.mjs +1 -1
- package/src/theme/tokens.ts +2 -1
- package/src/theme/useThemeName.doc.mjs +1 -1
- package/src/utils/characters.ts +11 -0
- package/src/utils/devWarning.ts +35 -0
- package/src/utils/focusReturn.ts +3 -11
- package/src/utils/hitArea.ts +87 -18
- package/src/utils/mergeProps.ts +57 -34
- package/src/utils/scrollView.ts +3 -2
- package/src/utils/textDirection.ts +65 -5
- package/src/utils/themeProps.ts +22 -3
- package/src/utils/touchHitArea.ts +3 -2
- package/src/virtualization/useInlineListWindow.ts +102 -11
package/dist/Layer/inputHold.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @file inputHold.ts
|
|
7
7
|
* @input A layer root, what ends its hold (a promise or an animator handle),
|
|
8
8
|
* and the hold's scope
|
|
9
|
-
* @output holdInput, holdsTouch, isInHeldLayer
|
|
10
|
-
* away from a layer while it presents
|
|
11
|
-
* with focus kept inside
|
|
9
|
+
* @output holdInput, holdsTouch, isInHeldLayer, isInputShield, LATE_PRESS_MS
|
|
10
|
+
* and LATE_RELEASE_FRAMES: input held away from a layer while it presents
|
|
11
|
+
* or dismisses, or while it dismisses with focus kept inside
|
|
12
12
|
* @position The Layer module's one input hold, for components whose layer
|
|
13
13
|
* presents under a finger
|
|
14
14
|
*
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { containsAlongFlatTree, deepActiveElement, parentAcrossShadow } from "../utils/flatTree.js";
|
|
19
19
|
import { getDownPresses, getLastMousePoint, getLastPointerType, subscribeInput } from "../utils/inputStream.js";
|
|
20
|
+
import { timeOn } from "../utils/inputAge.js";
|
|
20
21
|
import { isDocument, isElement, isHTMLElement, isNode } from "../utils/nodeType.js";
|
|
21
22
|
import { observeMutations } from "../utils/sharedMutationObserver.js";
|
|
22
23
|
import { realmValue, sharedKey } from "../utils/sharedRealm.js";
|
|
@@ -39,6 +40,8 @@ import { notifyTopLayerEntry } from "./modalOutlet.js";
|
|
|
39
40
|
|
|
40
41
|
/** A document's press hold, while its window listeners are on. */
|
|
41
42
|
|
|
43
|
+
/** A hold that has ended: what it held, and when it began and ended. */
|
|
44
|
+
|
|
42
45
|
// Registered, so the gesture host sees the layer holds of a swizzled copy as
|
|
43
46
|
// it does the package's.
|
|
44
47
|
const {
|
|
@@ -416,6 +419,8 @@ export function holdInput(layer, {
|
|
|
416
419
|
openToEarlierPresses(state, layer.ownerDocument);
|
|
417
420
|
}
|
|
418
421
|
openToMouse(state, layer.ownerDocument);
|
|
422
|
+
const clock = layer.ownerDocument.defaultView?.performance;
|
|
423
|
+
const from = clock?.now() ?? 0;
|
|
419
424
|
let isReleased = false;
|
|
420
425
|
const release = () => {
|
|
421
426
|
if (isReleased) {
|
|
@@ -426,6 +431,12 @@ export function holdInput(layer, {
|
|
|
426
431
|
if (current == null) {
|
|
427
432
|
return;
|
|
428
433
|
}
|
|
434
|
+
pressHolds.get(layer.ownerDocument)?.ended({
|
|
435
|
+
layer,
|
|
436
|
+
scope,
|
|
437
|
+
from,
|
|
438
|
+
to: clock?.now() ?? from
|
|
439
|
+
});
|
|
429
440
|
if (scope === 'viewport') {
|
|
430
441
|
current.viewport -= 1;
|
|
431
442
|
} else if (scope === 'surface') {
|
|
@@ -568,6 +579,24 @@ const CLICK_WINDOW_MS = 800;
|
|
|
568
579
|
|
|
569
580
|
/** How long a held press is followed past the hold's end, at most. */
|
|
570
581
|
const STRAY_PRESS_MS = 10_000;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* How long after a hold ends a press that went down during it can still
|
|
585
|
+
* arrive, at most. A busy main thread dispatches a press late, after the
|
|
586
|
+
* task that ended the hold.
|
|
587
|
+
*/
|
|
588
|
+
export const LATE_PRESS_MS = 500;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* A release waits for late presses only after a long task. In a long task,
|
|
592
|
+
* the page draws no frame for more than this many of the hold's frame
|
|
593
|
+
* intervals. The release runs in that task or in the frame that ends it.
|
|
594
|
+
* The engine can dispatch input from that task after either.
|
|
595
|
+
*/
|
|
596
|
+
export const LATE_RELEASE_FRAMES = 2;
|
|
597
|
+
|
|
598
|
+
/** The frame interval of a hold that sees fewer than two frames. */
|
|
599
|
+
const DEFAULT_FRAME_MS = 1000 / 60;
|
|
571
600
|
const POINTER_EVENTS = ['pointerdown', 'pointermove', 'pointerup', 'pointercancel'];
|
|
572
601
|
const TOUCH_EVENTS = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];
|
|
573
602
|
const PRESS_EVENTS = ['mousedown', 'mouseup', 'click', 'auxclick', 'dblclick', 'contextmenu'];
|
|
@@ -584,15 +613,36 @@ function pressHoldFor(doc) {
|
|
|
584
613
|
return hold;
|
|
585
614
|
}
|
|
586
615
|
|
|
616
|
+
/**
|
|
617
|
+
* Whether a hold of `scope` on `layer` holds a new press on `target`. Over
|
|
618
|
+
* the viewport, a press anywhere is held, and so is one during a dismissal,
|
|
619
|
+
* except one in another layer inside the dismissing layer. A `'surface'`
|
|
620
|
+
* hold holds only a press on the layer.
|
|
621
|
+
*/
|
|
622
|
+
function isPressHeldBy(scope, layer, target) {
|
|
623
|
+
if (scope === 'viewport') {
|
|
624
|
+
return true;
|
|
625
|
+
}
|
|
626
|
+
if (scope === 'layer') {
|
|
627
|
+
return !(isNode(target) && isInNestedLayer(target, layer));
|
|
628
|
+
}
|
|
629
|
+
return isNode(target) && containsAlongFlatTree(layer, target);
|
|
630
|
+
}
|
|
631
|
+
|
|
587
632
|
/**
|
|
588
633
|
* Holds each finger or pen press that lands in `doc`'s window while any of
|
|
589
634
|
* its layers is held. Each press is held to its own end, even past the
|
|
590
|
-
* hold's end. A
|
|
635
|
+
* hold's end. A press is judged by the time its event gives, when the finger
|
|
636
|
+
* went down. So a press that went down during a hold is held, though the
|
|
637
|
+
* engine dispatches it after the hold's end. That wait follows only a release
|
|
638
|
+
* in a long task, which the hold reads from the frames that the page draws
|
|
639
|
+
* while it holds. A moving mouse passes through a presentation's shield. The
|
|
591
640
|
* hold hears input through the shared input stream, before its other
|
|
592
641
|
* subscribers, and stops each held event there. So no document or element
|
|
593
642
|
* listener hears it, and neither does press feedback or the gesture host.
|
|
594
|
-
* There is one per document. Its subscriptions end once nothing is held
|
|
595
|
-
*
|
|
643
|
+
* There is one per document. Its subscriptions end once nothing is held, the
|
|
644
|
+
* held presses and their clicks have ended, and no late press can still
|
|
645
|
+
* arrive.
|
|
596
646
|
*/
|
|
597
647
|
function createPressHold(doc) {
|
|
598
648
|
const view = doc.defaultView;
|
|
@@ -609,9 +659,64 @@ function createPressHold(doc) {
|
|
|
609
659
|
let lastPress = null;
|
|
610
660
|
/** Until when a click with no pointer type is a held press's. */
|
|
611
661
|
let clickUntil = -Infinity;
|
|
662
|
+
/** Ended holds whose late presses can still arrive. */
|
|
663
|
+
const endedHolds = [];
|
|
664
|
+
/** Ends the watch for those holds' layers leaving the document. */
|
|
665
|
+
let stopWatchingLayers = null;
|
|
612
666
|
let timer;
|
|
667
|
+
/** When the last frame began while a layer was held, or the hold began. */
|
|
668
|
+
let lastFrameAt = view.performance.now();
|
|
669
|
+
/** When the frame before the last one began. */
|
|
670
|
+
let frameBeforeAt = null;
|
|
671
|
+
/** The gaps between the latest frames, eight at most. */
|
|
672
|
+
const frameGaps = [];
|
|
673
|
+
let frameRequest = null;
|
|
613
674
|
const now = () => view.performance.now();
|
|
614
675
|
const isPressDown = () => pointers.size > 0 || touches.size > 0;
|
|
676
|
+
|
|
677
|
+
/** Notes each frame the page draws while a layer is held. */
|
|
678
|
+
const watchFrames = () => {
|
|
679
|
+
if (frameRequest != null || typeof view.requestAnimationFrame !== 'function') {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
frameRequest = view.requestAnimationFrame(frameTime => {
|
|
683
|
+
frameRequest = null;
|
|
684
|
+
// A layer that left the document ends its hold here.
|
|
685
|
+
if (!isListening || !holdsNewPress()) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
const at = Math.min(frameTime, now());
|
|
689
|
+
if (frameBeforeAt != null) {
|
|
690
|
+
frameGaps.push(at - lastFrameAt);
|
|
691
|
+
if (frameGaps.length > 8) {
|
|
692
|
+
frameGaps.shift();
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
frameBeforeAt = lastFrameAt;
|
|
696
|
+
lastFrameAt = at;
|
|
697
|
+
watchFrames();
|
|
698
|
+
});
|
|
699
|
+
};
|
|
700
|
+
const stopWatchingFrames = () => {
|
|
701
|
+
if (frameRequest != null) {
|
|
702
|
+
view.cancelAnimationFrame?.(frameRequest);
|
|
703
|
+
frameRequest = null;
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Whether a long task runs now, or ended with the frame that runs now. In
|
|
709
|
+
* it, the page draws no frame for more than LATE_RELEASE_FRAMES of the
|
|
710
|
+
* hold's frame intervals.
|
|
711
|
+
*/
|
|
712
|
+
const isAfterLongTask = () => {
|
|
713
|
+
const gaps = [...frameGaps].sort((a, b) => a - b);
|
|
714
|
+
const interval = gaps.length > 0 ? gaps[Math.floor(gaps.length / 2)] : DEFAULT_FRAME_MS;
|
|
715
|
+
const longest = LATE_RELEASE_FRAMES * interval;
|
|
716
|
+
const sinceFrame = now() - lastFrameAt;
|
|
717
|
+
const endsLongGap = frameBeforeAt != null && sinceFrame <= interval && lastFrameAt - frameBeforeAt > longest;
|
|
718
|
+
return sinceFrame > longest || endsLongGap;
|
|
719
|
+
};
|
|
615
720
|
const swallow = event => {
|
|
616
721
|
if (event.cancelable) {
|
|
617
722
|
event.preventDefault();
|
|
@@ -631,7 +736,8 @@ function createPressHold(doc) {
|
|
|
631
736
|
timer = setTimeout(stop, STRAY_PRESS_MS);
|
|
632
737
|
return;
|
|
633
738
|
}
|
|
634
|
-
const
|
|
739
|
+
const lateUntil = Math.max(-Infinity, ...endedHolds.map(hold => hold.to + LATE_PRESS_MS));
|
|
740
|
+
const wait = Math.max(clickUntil, lateUntil) - now();
|
|
635
741
|
if (wait > 0) {
|
|
636
742
|
timer = setTimeout(stop, wait);
|
|
637
743
|
} else {
|
|
@@ -639,6 +745,64 @@ function createPressHold(doc) {
|
|
|
639
745
|
}
|
|
640
746
|
};
|
|
641
747
|
|
|
748
|
+
/**
|
|
749
|
+
* When an input happened, on the page's clock. A wall-clock stamp keeps its
|
|
750
|
+
* age (`timeOn`). An input with no time, or a time ahead of now, counts as
|
|
751
|
+
* now.
|
|
752
|
+
*/
|
|
753
|
+
const timeOfInput = event => Math.min(timeOn(view.performance, event.timeStamp) ?? now(), now());
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Input from at or after a hold's end comes after every press that went
|
|
757
|
+
* down during that hold. So no late press of that hold is left.
|
|
758
|
+
*/
|
|
759
|
+
const noteInputAt = time => {
|
|
760
|
+
if (forgetEndedHolds(hold => time >= hold.to)) {
|
|
761
|
+
settle();
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Forgets each ended hold that `isDone` names, and each one past its late
|
|
767
|
+
* window. Returns whether it forgot one.
|
|
768
|
+
*/
|
|
769
|
+
const forgetEndedHolds = isDone => {
|
|
770
|
+
const count = endedHolds.length;
|
|
771
|
+
for (let index = count - 1; index >= 0; index--) {
|
|
772
|
+
const hold = endedHolds[index];
|
|
773
|
+
if (isDone(hold) || now() > hold.to + LATE_PRESS_MS || !hold.layer.isConnected) {
|
|
774
|
+
endedHolds.splice(index, 1);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
if (endedHolds.length === 0) {
|
|
778
|
+
stopWatchingLayers?.();
|
|
779
|
+
stopWatchingLayers = null;
|
|
780
|
+
}
|
|
781
|
+
return endedHolds.length < count;
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* A late press belongs to a layer still on the page. Once the layers of the
|
|
786
|
+
* ended holds have all left it, nothing waits for one.
|
|
787
|
+
*/
|
|
788
|
+
const watchLayers = () => {
|
|
789
|
+
stopWatchingLayers ??= observeMutations(doc, {
|
|
790
|
+
childList: true,
|
|
791
|
+
subtree: true
|
|
792
|
+
}, () => {
|
|
793
|
+
if (forgetEndedHolds(() => false)) {
|
|
794
|
+
settle();
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Whether a press that went down at `time` landed during a hold that has
|
|
801
|
+
* since ended, where that hold held a press on `target`. The press arrives
|
|
802
|
+
* at most LATE_PRESS_MS after that end.
|
|
803
|
+
*/
|
|
804
|
+
const wasHeldAt = (target, time) => endedHolds.some(hold => hold.from <= time && time < hold.to && now() <= hold.to + LATE_PRESS_MS && isPressHeldBy(hold.scope, hold.layer, target));
|
|
805
|
+
|
|
642
806
|
/** Whether a layer is still held (one that left the document is not). */
|
|
643
807
|
const holdsNewPress = () => {
|
|
644
808
|
if (isHolding) {
|
|
@@ -663,10 +827,7 @@ function createPressHold(doc) {
|
|
|
663
827
|
if (state == null) {
|
|
664
828
|
continue;
|
|
665
829
|
}
|
|
666
|
-
if (state.viewport > 0 || state.layer > 0 &&
|
|
667
|
-
return true;
|
|
668
|
-
}
|
|
669
|
-
if (state.surface > 0 && isNode(target) && containsAlongFlatTree(layer, target)) {
|
|
830
|
+
if (state.viewport > 0 && isPressHeldBy('viewport', layer, target) || state.layer > 0 && isPressHeldBy('layer', layer, target) || state.surface > 0 && isPressHeldBy('surface', layer, target)) {
|
|
670
831
|
return true;
|
|
671
832
|
}
|
|
672
833
|
}
|
|
@@ -737,6 +898,8 @@ function createPressHold(doc) {
|
|
|
737
898
|
pointerType,
|
|
738
899
|
type
|
|
739
900
|
} = event;
|
|
901
|
+
const time = timeOfInput(event);
|
|
902
|
+
noteInputAt(time);
|
|
740
903
|
if (HELD_POINTERS.has(pointerType) && type !== 'pointerdown' && !pointers.has(pointerId)) {
|
|
741
904
|
followEarlierPress(event);
|
|
742
905
|
}
|
|
@@ -749,7 +912,8 @@ function createPressHold(doc) {
|
|
|
749
912
|
followPointer(pointerType);
|
|
750
913
|
}
|
|
751
914
|
if (type === 'pointerdown') {
|
|
752
|
-
|
|
915
|
+
const isHeld = HELD_POINTERS.has(pointerType) && (holdsPressAt(event.target) || wasHeldAt(event.target, time));
|
|
916
|
+
if (!isHeld) {
|
|
753
917
|
// A mouse's press, or one after the hold: its click is its own, and a
|
|
754
918
|
// held press with its id ended unheard.
|
|
755
919
|
pointers.delete(pointerId);
|
|
@@ -760,6 +924,8 @@ function createPressHold(doc) {
|
|
|
760
924
|
}
|
|
761
925
|
pointers.add(pointerId);
|
|
762
926
|
lastPress = 'held';
|
|
927
|
+
// A late press is held to its end: no stop runs while it is down.
|
|
928
|
+
settle();
|
|
763
929
|
captureToShield(event);
|
|
764
930
|
} else if (!pointers.has(pointerId)) {
|
|
765
931
|
return false;
|
|
@@ -779,6 +945,8 @@ function createPressHold(doc) {
|
|
|
779
945
|
touches: down,
|
|
780
946
|
type
|
|
781
947
|
} = event;
|
|
948
|
+
const time = timeOfInput(event);
|
|
949
|
+
noteInputAt(time);
|
|
782
950
|
const changed = Array.from(changedTouches);
|
|
783
951
|
if (type === 'touchstart') {
|
|
784
952
|
// A held touch that the screen no longer has ended unheard. Its target,
|
|
@@ -790,7 +958,7 @@ function createPressHold(doc) {
|
|
|
790
958
|
touches.delete(identifier);
|
|
791
959
|
}
|
|
792
960
|
}
|
|
793
|
-
const heldTouches = changed.filter(touch => holdsPressAt(touch.target));
|
|
961
|
+
const heldTouches = changed.filter(touch => holdsPressAt(touch.target) || wasHeldAt(touch.target, time));
|
|
794
962
|
if (heldTouches.length === 0) {
|
|
795
963
|
// A touch after the hold, or one beside a layer held only to its
|
|
796
964
|
// box, is a new one, whatever its identifier.
|
|
@@ -806,6 +974,7 @@ function createPressHold(doc) {
|
|
|
806
974
|
touches.add(touch.identifier);
|
|
807
975
|
}
|
|
808
976
|
lastPress = 'held';
|
|
977
|
+
settle();
|
|
809
978
|
// Never canceled: canceling a touch's start would cancel the page's
|
|
810
979
|
// pinch-zoom with it.
|
|
811
980
|
event.stopImmediatePropagation();
|
|
@@ -831,6 +1000,7 @@ function createPressHold(doc) {
|
|
|
831
1000
|
return true;
|
|
832
1001
|
};
|
|
833
1002
|
const onPress = event => {
|
|
1003
|
+
noteInputAt(timeOfInput(event));
|
|
834
1004
|
// A click a key or assistive technology sends counts no press.
|
|
835
1005
|
if (event.detail === 0) {
|
|
836
1006
|
return false;
|
|
@@ -859,6 +1029,10 @@ function createPressHold(doc) {
|
|
|
859
1029
|
if (timer !== undefined) {
|
|
860
1030
|
clearTimeout(timer);
|
|
861
1031
|
}
|
|
1032
|
+
stopWatchingFrames();
|
|
1033
|
+
stopWatchingLayers?.();
|
|
1034
|
+
stopWatchingLayers = null;
|
|
1035
|
+
endedHolds.length = 0;
|
|
862
1036
|
for (const unsubscribe of unsubscribers.splice(0)) {
|
|
863
1037
|
unsubscribe();
|
|
864
1038
|
}
|
|
@@ -880,21 +1054,36 @@ function createPressHold(doc) {
|
|
|
880
1054
|
}))];
|
|
881
1055
|
const pressHold = {
|
|
882
1056
|
hold() {
|
|
1057
|
+
if (!isHolding) {
|
|
1058
|
+
lastFrameAt = now();
|
|
1059
|
+
frameBeforeAt = null;
|
|
1060
|
+
}
|
|
883
1061
|
isHolding = true;
|
|
884
1062
|
if (timer !== undefined) {
|
|
885
1063
|
clearTimeout(timer);
|
|
886
1064
|
timer = undefined;
|
|
887
1065
|
}
|
|
1066
|
+
watchFrames();
|
|
888
1067
|
},
|
|
889
1068
|
release() {
|
|
890
1069
|
if (!isHolding) {
|
|
891
1070
|
return;
|
|
892
1071
|
}
|
|
893
1072
|
isHolding = false;
|
|
1073
|
+
stopWatchingFrames();
|
|
894
1074
|
settle();
|
|
895
1075
|
},
|
|
896
|
-
holds: pointerId => pointers.has(pointerId)
|
|
1076
|
+
holds: pointerId => pointers.has(pointerId),
|
|
1077
|
+
ended(hold) {
|
|
1078
|
+
forgetEndedHolds(() => false);
|
|
1079
|
+
if (!isAfterLongTask() || !hold.layer.isConnected) {
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
endedHolds.push(hold);
|
|
1083
|
+
watchLayers();
|
|
1084
|
+
}
|
|
897
1085
|
};
|
|
1086
|
+
watchFrames();
|
|
898
1087
|
return pressHold;
|
|
899
1088
|
}
|
|
900
1089
|
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
* and custom properties; `document.body` may sit outside a nested scope.
|
|
13
13
|
* - **Tab order.** Sequential focus follows DOM order, so a host near the
|
|
14
14
|
* trigger keeps the layer's focusables next to it. (`show()` also passes
|
|
15
|
-
*
|
|
16
|
-
* the invoker in browsers that support
|
|
15
|
+
* an invoker `source`, the trigger unless the layer names another element
|
|
16
|
+
* or none, which pins focus order to the invoker in browsers that support
|
|
17
|
+
* it.)
|
|
17
18
|
*
|
|
18
19
|
* The outermost unsafe ancestor matters up to the nearest native dialog. A safe
|
|
19
20
|
* div may itself sit inside an anchor; stopping at that div would still put the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layerHost.d.ts","sourceRoot":"","sources":["../../src/Layer/layerHost.ts"],"names":[],"mappings":"AAwGA
|
|
1
|
+
{"version":3,"file":"layerHost.d.ts","sourceRoot":"","sources":["../../src/Layer/layerHost.ts"],"names":[],"mappings":"AAwGA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,WAAW,GAAG,IAAI,GAC/B,WAAW,GAAG,IAAI,CA+BpB"}
|
package/dist/Layer/layerHost.js
CHANGED
|
@@ -58,8 +58,9 @@ const UNSAFE_HOSTS = new Set([
|
|
|
58
58
|
* and custom properties; `document.body` may sit outside a nested scope.
|
|
59
59
|
* - **Tab order.** Sequential focus follows DOM order, so a host near the
|
|
60
60
|
* trigger keeps the layer's focusables next to it. (`show()` also passes
|
|
61
|
-
*
|
|
62
|
-
* the invoker in browsers that support
|
|
61
|
+
* an invoker `source`, the trigger unless the layer names another element
|
|
62
|
+
* or none, which pins focus order to the invoker in browsers that support
|
|
63
|
+
* it.)
|
|
63
64
|
*
|
|
64
65
|
* The outermost unsafe ancestor matters up to the nearest native dialog. A safe
|
|
65
66
|
* div may itself sit inside an anchor; stopping at that div would still put the
|
|
@@ -8,4 +8,21 @@
|
|
|
8
8
|
* dismiss from it. Returns the function that stops watching.
|
|
9
9
|
*/
|
|
10
10
|
export declare function watchOutsidePans(layer: HTMLElement): () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Closes a manual popover for a press that starts and ends outside it. Its
|
|
13
|
+
* trigger counts as inside, so the trigger's own toggle answers a press on
|
|
14
|
+
* it. A press in a modal dialog that does not hold the layer belongs to that
|
|
15
|
+
* dialog. A touch pan is not a press. Returns the function that stops
|
|
16
|
+
* watching.
|
|
17
|
+
*
|
|
18
|
+
* @param layer - The open popover's layer element.
|
|
19
|
+
* @param triggerRef - The popover's trigger, if it has one.
|
|
20
|
+
* @param closesRef - Whether a press outside closes the popover now.
|
|
21
|
+
* @param dismiss - Closes the popover for a press outside it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function watchOutsidePresses(layer: HTMLElement, triggerRef: {
|
|
24
|
+
readonly current: Element | null;
|
|
25
|
+
}, closesRef: {
|
|
26
|
+
readonly current: boolean;
|
|
27
|
+
}, dismiss: () => void): () => void;
|
|
11
28
|
//# sourceMappingURL=outsidePanClaim.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outsidePanClaim.d.ts","sourceRoot":"","sources":["../../src/Layer/outsidePanClaim.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outsidePanClaim.d.ts","sourceRoot":"","sources":["../../src/Layer/outsidePanClaim.ts"],"names":[],"mappings":"AA8BA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,IAAI,CAe/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CAAC,EAC9C,SAAS,EAAE;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAC,EACtC,OAAO,EAAE,MAAM,IAAI,GAClB,MAAM,IAAI,CAgBZ"}
|
|
@@ -4,21 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file outsidePanClaim.ts
|
|
7
|
-
* @input An open
|
|
8
|
-
* @output watchOutsidePans: claims for
|
|
9
|
-
* begins a pan the browser could take as a scroll, until stopped
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* @input An open layer; pointers through Layer's outside-press watch
|
|
8
|
+
* @output watchOutsidePans: claims for an auto layer a touch outside it that
|
|
9
|
+
* begins a pan the browser could take as a scroll, until stopped.
|
|
10
|
+
* watchOutsidePresses: closes a manual popover for a press outside it
|
|
11
|
+
* @position Internal to Layer. usePopover passes one of them to useLayer
|
|
12
|
+
* (`watchesOutside`), so a layer that never light-dismisses, such as
|
|
12
13
|
* Carousel's, bundles none of it
|
|
13
14
|
*/
|
|
14
15
|
import { claimPress } from "./gestureCounter.js";
|
|
15
16
|
import { watchOutsidePress } from "./outsidePress.js";
|
|
16
17
|
import { armClickGuard } from "../utils/clickGuard.js";
|
|
17
|
-
import {
|
|
18
|
+
import { containsAlongFlatTree } from "../utils/flatTree.js";
|
|
19
|
+
import { isModalDialog, isShadowRoot } from "../utils/nodeType.js";
|
|
18
20
|
|
|
19
21
|
/** A layer the browser light-dismisses learns only of pans outside it. */
|
|
20
22
|
function reportsNoOutsidePress() {}
|
|
21
23
|
|
|
24
|
+
/** The shadow root `layer` renders in, if any. */
|
|
25
|
+
function shadowRootOf(layer) {
|
|
26
|
+
const root = layer.getRootNode();
|
|
27
|
+
return isShadowRoot(root) ? root : null;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
/**
|
|
23
31
|
* Claims for `layer` each touch that starts outside it and begins a pan the
|
|
24
32
|
* browser could take as a scroll. Such a touch is a gesture, not an outside
|
|
@@ -29,14 +37,34 @@ function reportsNoOutsidePress() {}
|
|
|
29
37
|
* dismiss from it. Returns the function that stops watching.
|
|
30
38
|
*/
|
|
31
39
|
export function watchOutsidePans(layer) {
|
|
32
|
-
const root = layer.getRootNode();
|
|
33
40
|
return watchOutsidePress(layer, path => path.includes(layer), reportsNoOutsidePress, {
|
|
34
41
|
pointerTypes: ['touch'],
|
|
35
|
-
root:
|
|
42
|
+
root: shadowRootOf(layer),
|
|
36
43
|
onPan: () => claimPress(layer, {
|
|
37
44
|
onRelease: () => armClickGuard(layer.ownerDocument, {
|
|
38
45
|
cancelsTouchEnd: true
|
|
39
46
|
})
|
|
40
47
|
})
|
|
41
48
|
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Closes a manual popover for a press that starts and ends outside it. Its
|
|
53
|
+
* trigger counts as inside, so the trigger's own toggle answers a press on
|
|
54
|
+
* it. A press in a modal dialog that does not hold the layer belongs to that
|
|
55
|
+
* dialog. A touch pan is not a press. Returns the function that stops
|
|
56
|
+
* watching.
|
|
57
|
+
*
|
|
58
|
+
* @param layer - The open popover's layer element.
|
|
59
|
+
* @param triggerRef - The popover's trigger, if it has one.
|
|
60
|
+
* @param closesRef - Whether a press outside closes the popover now.
|
|
61
|
+
* @param dismiss - Closes the popover for a press outside it.
|
|
62
|
+
*/
|
|
63
|
+
export function watchOutsidePresses(layer, triggerRef, closesRef, dismiss) {
|
|
64
|
+
return watchOutsidePress(layer, path => !closesRef.current || path.includes(layer) || path.includes(triggerRef.current) ||
|
|
65
|
+
// Only a dialog element passes the check.
|
|
66
|
+
path.some(target => isModalDialog(target) && !containsAlongFlatTree(target, layer)), dismiss, {
|
|
67
|
+
ignoresPans: true,
|
|
68
|
+
root: shadowRootOf(layer)
|
|
69
|
+
});
|
|
42
70
|
}
|
|
@@ -17,6 +17,12 @@ export interface OutsidePressOptions {
|
|
|
17
17
|
* `closesOnPan`.
|
|
18
18
|
*/
|
|
19
19
|
readonly onPan?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* A touch or pen press outside that pans past the shared pan distance is a
|
|
22
|
+
* gesture, not a press: its lift calls no `onOutside`. Ignored with
|
|
23
|
+
* `closesOnPan` or `onPan`.
|
|
24
|
+
*/
|
|
25
|
+
readonly ignoresPans?: boolean;
|
|
20
26
|
/**
|
|
21
27
|
* Called as each press the watch follows begins, with whether it is
|
|
22
28
|
* inside. The watch then judges no lift: a press that starts and ends
|
|
@@ -47,7 +53,7 @@ export declare function outsideDismissalCount(doc: Document): number;
|
|
|
47
53
|
* pans or is cancelled.
|
|
48
54
|
* @returns Stops watching.
|
|
49
55
|
*/
|
|
50
|
-
export declare function watchOutsidePress(owner: Element, isInside: (path: ReadonlyArray<EventTarget>) => boolean, onOutside: () => void, { pointerTypes, closesOnPan, onPan, onPress, root, }?: OutsidePressOptions): () => void;
|
|
56
|
+
export declare function watchOutsidePress(owner: Element, isInside: (path: ReadonlyArray<EventTarget>) => boolean, onOutside: () => void, { pointerTypes, closesOnPan, onPan, onPress, ignoresPans, root, }?: OutsidePressOptions): () => void;
|
|
51
57
|
export interface OutsidePressWatch {
|
|
52
58
|
/** Start watching, replacing any watch already running. */
|
|
53
59
|
start: (owner: Element, isInside: (path: ReadonlyArray<EventTarget>) => boolean, onOutside: () => void, options?: OutsidePressOptions) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outsidePress.d.ts","sourceRoot":"","sources":["../../src/Layer/outsidePress.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC7B;AASD,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAExD;AAED,mEAAmE;AACnE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAE3D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,OAAO,EACvD,SAAS,EAAE,MAAM,IAAI,EACrB,EACE,YAAY,EACZ,WAAmB,EACnB,KAAK,EACL,OAAO,EACP,IAAW,GACZ,GAAE,mBAAwB,GAC1B,MAAM,IAAI,
|
|
1
|
+
{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AAE,mBAAmB,KAC1B,IAAI,CAAC;IACV,4DAA4D;IAC5D,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,iBAAiB,CAgBnD;AAgBD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,MAAM,GACd,OAAO,CAST;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EACjC,OAAO,EAAE,MAAM,GACd,OAAO,CAKT"}
|
|
@@ -51,11 +51,13 @@ export function watchOutsidePress(owner, isInside, onOutside, {
|
|
|
51
51
|
closesOnPan = false,
|
|
52
52
|
onPan,
|
|
53
53
|
onPress,
|
|
54
|
+
ignoresPans = false,
|
|
54
55
|
root = null
|
|
55
56
|
} = {}) {
|
|
56
57
|
const doc = owner.ownerDocument;
|
|
57
58
|
const reportPan = closesOnPan ? undefined : onPan;
|
|
58
|
-
const
|
|
59
|
+
const skipsPans = ignoresPans && !closesOnPan && reportPan == null;
|
|
60
|
+
const followsPans = closesOnPan || reportPan != null || skipsPans;
|
|
59
61
|
const shadows = root == null ? [] : shadowRootsOutward(root);
|
|
60
62
|
let startedOutside = false;
|
|
61
63
|
let panStart = null;
|
|
@@ -80,7 +82,7 @@ export function watchOutsidePress(owner, isInside, onOutside, {
|
|
|
80
82
|
startedOutside = !isInside(event.composedPath());
|
|
81
83
|
onPress?.(!startedOutside);
|
|
82
84
|
if (followsPans) {
|
|
83
|
-
panStart = startedOutside ? {
|
|
85
|
+
panStart = startedOutside && !(skipsPans && event.pointerType === 'mouse') ? {
|
|
84
86
|
id: event.pointerId,
|
|
85
87
|
x: event.clientX,
|
|
86
88
|
y: event.clientY
|
|
@@ -99,6 +101,11 @@ export function watchOutsidePress(owner, isInside, onOutside, {
|
|
|
99
101
|
}
|
|
100
102
|
return;
|
|
101
103
|
}
|
|
104
|
+
if (skipsPans) {
|
|
105
|
+
startedOutside = false;
|
|
106
|
+
panStart = null;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
102
109
|
close();
|
|
103
110
|
}
|
|
104
111
|
};
|
package/dist/Layer/useLayer.d.ts
CHANGED
|
@@ -284,12 +284,16 @@ interface InternalContextLayerOptions extends ContextLayerOptions {
|
|
|
284
284
|
*/
|
|
285
285
|
onCloseStart?: () => void;
|
|
286
286
|
/**
|
|
287
|
-
* Watches the open layer for
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
287
|
+
* Watches the open layer for pointers outside it; returns the function
|
|
288
|
+
* that stops watching. The layer starts it as it opens and stops it as it
|
|
289
|
+
* closes. A light-dismiss layer is given a pan watch by its owner
|
|
290
|
+
* (usePopover's `watchOutsidePans`), and a `'pageOrder'` popover its
|
|
291
|
+
* outside-press watch. An anchored menu, which closes as a pan begins, is
|
|
292
|
+
* given none. `dismiss` closes the layer for a press outside it and
|
|
293
|
+
* absorbs a `show()` from that same press, as the browser's light dismiss
|
|
294
|
+
* does.
|
|
291
295
|
*/
|
|
292
|
-
|
|
296
|
+
watchesOutside?: (layer: HTMLElement, dismiss: () => void) => () => void;
|
|
293
297
|
/**
|
|
294
298
|
* Called with true when a `show()` that the layer accepted starts to wait
|
|
295
299
|
* for a valid anchor, and with false when that wait ends. The owner reads
|
|
@@ -319,7 +323,19 @@ interface InternalContextLayerOptions extends ContextLayerOptions {
|
|
|
319
323
|
* again here.
|
|
320
324
|
*/
|
|
321
325
|
onPlacedAfresh?: () => void;
|
|
326
|
+
/**
|
|
327
|
+
* The element whose place in the sequential focus order the open layer
|
|
328
|
+
* takes, passed to `showPopover({source})`. Defaults to the trigger. Return
|
|
329
|
+
* null for a layer that takes its own DOM place.
|
|
330
|
+
*/
|
|
331
|
+
getInvoker?: () => HTMLElement | null;
|
|
322
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* `getInvoker` for a layer that holds nothing to focus, such as a tooltip or
|
|
335
|
+
* a hint. When a popover that names an invoker hides, the browser also drops
|
|
336
|
+
* the focus-order place of another open popover that names the same invoker.
|
|
337
|
+
*/
|
|
338
|
+
export declare const noInvoker: () => null;
|
|
323
339
|
/**
|
|
324
340
|
* Compute the `position-try-fallbacks` list for a placement. Chromium tries
|
|
325
341
|
* no more than five options after the layer's own position.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayer.d.ts","sourceRoot":"","sources":["../../src/Layer/useLayer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAQZ,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAmRnD;;GAEG;AACH,UAAU,kBAAkB;IAC1B,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACtD;;;OAGG;IACH,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;;OAIG;IACH,IAAI,CA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