@astryxdesign/core 0.7.9-canary.7d6481e → 0.7.9-canary.7e69f91
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/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +3 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +2 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +3 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +4 -1
- package/dist/Layer/LayerProvider.d.ts.map +1 -1
- package/dist/Layer/LayerProvider.js +8 -7
- package/dist/Layer/LayerTouch.d.ts +13 -0
- package/dist/Layer/LayerTouch.d.ts.map +1 -0
- package/dist/Layer/LayerTouch.js +16 -0
- package/dist/Layer/layerKeyboardClearance.d.ts +41 -0
- package/dist/Layer/layerKeyboardClearance.d.ts.map +1 -0
- package/dist/Layer/layerKeyboardClearance.js +51 -0
- package/dist/Layer/layerViewportInset.stylex.d.ts +5 -1
- package/dist/Layer/layerViewportInset.stylex.d.ts.map +1 -1
- package/dist/Layer/layerViewportInset.stylex.js +11 -4
- package/dist/Layer/settledBox.d.ts +16 -0
- package/dist/Layer/settledBox.d.ts.map +1 -0
- package/dist/Layer/settledBox.js +117 -0
- package/dist/Layer/toastHost.d.ts +77 -0
- package/dist/Layer/toastHost.d.ts.map +1 -0
- package/dist/Layer/toastHost.js +172 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +36 -106
- package/dist/Layer/useLayerKeyboardClearance.d.ts +54 -0
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -0
- package/dist/Layer/useLayerKeyboardClearance.js +330 -0
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +7 -2
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +1 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +13 -53
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +17 -12
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +7 -4
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +9 -5
- package/dist/Toast/ToastContext.d.ts +6 -13
- package/dist/Toast/ToastContext.d.ts.map +1 -1
- package/dist/Toast/ToastContext.js +6 -8
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +14 -7
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +10 -50
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +7 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +8 -2
- package/dist/astryx.css +8 -3
- package/dist/hooks/usePanGesture.d.ts +3 -2
- package/dist/hooks/usePanGesture.d.ts.map +1 -1
- package/dist/hooks/usePanGesture.js +9 -3
- package/dist/motion/animatedLayout.d.ts.map +1 -1
- package/dist/motion/animatedLayout.js +10 -7
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +3 -2
- package/dist/motion/resolveMotion.d.ts +6 -27
- package/dist/motion/resolveMotion.d.ts.map +1 -1
- package/dist/motion/resolveMotion.js +82 -16
- package/dist/motion/themeTempo.d.ts +7 -0
- package/dist/motion/themeTempo.d.ts.map +1 -0
- package/dist/motion/themeTempo.js +38 -0
- package/dist/motion/themeTiming.d.ts +63 -0
- package/dist/motion/themeTiming.d.ts.map +1 -0
- package/dist/motion/themeTiming.js +173 -0
- package/dist/theme/defineTheme.d.ts +2 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +12 -4
- package/dist/theme/themeMotion.d.ts +7 -5
- package/dist/theme/themeMotion.d.ts.map +1 -1
- package/dist/theme/themeMotion.js +7 -5
- package/package.json +4 -4
- package/src/Breadcrumbs/BreadcrumbItem.tsx +7 -1
- package/src/CheckboxInput/CheckboxInput.tsx +5 -1
- package/src/ContextMenu/ContextMenu.tsx +7 -1
- package/src/Item/Item.doc.mjs +19 -4
- package/src/Item/Item.tsx +7 -1
- package/src/Layer/LayerProvider.tsx +9 -8
- package/src/Layer/LayerTouch.ts +17 -0
- package/src/Layer/layerKeyboardClearance.ts +55 -0
- package/src/Layer/layerViewportInset.stylex.ts +16 -5
- package/src/Layer/settledBox.ts +138 -0
- package/src/Layer/toastHost.tsx +212 -0
- package/src/Layer/useLayer.tsx +41 -123
- package/src/Layer/useLayerKeyboardClearance.ts +371 -0
- package/src/Link/useLinkComponent.doc.mjs +95 -0
- package/src/MultiSelector/MultiSelector.tsx +24 -2
- package/src/Popover/Popover.tsx +5 -0
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +12 -59
- package/src/Selector/Selector.tsx +24 -2
- package/src/SideNav/SideNavItem.tsx +8 -6
- package/src/Switch/useSwitchTouch.ts +13 -5
- package/src/Toast/ToastContext.ts +7 -17
- package/src/Toast/ToastViewport.tsx +13 -9
- package/src/Toast/useToast.tsx +7 -52
- package/src/TopNav/TopNavItem.tsx +7 -2
- package/src/Typeahead/BaseTypeahead.tsx +23 -3
- package/src/hooks/usePanGesture.ts +9 -3
- package/src/motion/README.md +3 -2
- package/src/motion/animatedLayout.ts +10 -7
- package/src/motion/animator.ts +3 -2
- package/src/motion/resolveMotion.ts +89 -18
- package/src/motion/themeTempo.ts +41 -0
- package/src/motion/themeTiming.ts +198 -0
- package/src/theme/defineTheme.ts +2 -2
- package/src/theme/resolveThemeValues.ts +12 -3
- package/src/theme/themeMotion.ts +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/BreadcrumbItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/BreadcrumbItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAc5C,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,8BAA8B,CAAC;AAarE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,SAAS,CAAC,aAAa,CAAC,EACxB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AA2ID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,mBAAmB,qBAuMrB;yBAtNe,cAAc"}
|
|
@@ -41,6 +41,8 @@ import { menuTouchActionStyles } from "../DropdownMenu/menuTouchAction.stylex.js
|
|
|
41
41
|
import { useMenuOverflow } from "../DropdownMenu/useMenuOverflow.js";
|
|
42
42
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
43
43
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
44
|
+
import "../Layer/layerViewportInset.stylex.js";
|
|
45
|
+
import { layerViewportInset } from "../Layer/layerViewportInset.stylex.js";
|
|
44
46
|
import { renderDropdownItems } from "../DropdownMenu/renderDropdownItems.js";
|
|
45
47
|
import { DropdownMenuContext, DropdownMenuRootOpenContext } from "../DropdownMenu/DropdownMenuContext.js";
|
|
46
48
|
import { MENU_ITEM_ROLES, MENU_ITEM_SELECTOR, MENU_BOUNDARY_SELECTOR } from "../DropdownMenu/menuItemRoles.js";
|
|
@@ -131,7 +133,7 @@ const menuStyles = {
|
|
|
131
133
|
k1xSpc: "x78zum5",
|
|
132
134
|
kXwgrk: "xdt5ytf",
|
|
133
135
|
kOIVth: "x1lsbc85",
|
|
134
|
-
kskxy: "
|
|
136
|
+
kskxy: "x1uh1i8a",
|
|
135
137
|
kORKVm: "x1odjw0f",
|
|
136
138
|
"--_dropdown-menu-radius": "x1fcsqxe",
|
|
137
139
|
"--_dropdown-menu-padding": "xgory14",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,UAAU,EAGf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAS3C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,UAAU,EAGf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAS3C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AA6KhD,QAAA,MAAM,iBAAiB;;;;;;;;;EASrB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAE/D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,C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nD;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EAAE,MAAM,EACV,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,IAAI,EACR,EAAE,kBAAkB,+BAyRpB;yBApTe,aAAa"}
|
|
@@ -26,6 +26,7 @@ import { Spinner } from "../Spinner/Spinner.js";
|
|
|
26
26
|
import { useTooltip } from "../Tooltip/useTooltip.js";
|
|
27
27
|
import { mergeProps } from "../utils/mergeProps.js";
|
|
28
28
|
import { rtlStyles } from "../utils/rtlStyles.js";
|
|
29
|
+
import { withholdCallerHandlers } from "../utils/disabledInteraction.js";
|
|
29
30
|
import "../Indicator/indicator.markers.stylex.js";
|
|
30
31
|
import { indicatorScope } from "../Indicator/indicator.markers.stylex.js";
|
|
31
32
|
import "../internal/indicatorPress.stylex.js";
|
|
@@ -327,7 +328,7 @@ export function CheckboxInput({
|
|
|
327
328
|
...stylex.props(styles.checkboxWrapper, wrapperSizeStyles[size], !isDisabled && styles.indicatorPressOverlay, !isDisabled && isRowPressSurface && styles.indicatorRowPressOverlay),
|
|
328
329
|
...focusProps,
|
|
329
330
|
children: [/*#__PURE__*/_jsx("input", {
|
|
330
|
-
...rest,
|
|
331
|
+
...withholdCallerHandlers(rest, isDisabled),
|
|
331
332
|
ref: useMergedRefs(ref, indeterminateRef, disabledMessageTooltip.positionRef, inputRef),
|
|
332
333
|
id: id,
|
|
333
334
|
type: "checkbox"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KASN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAyCrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAqI1C,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAMnD,UAAU,oBAAqB,SAAQ,SAAS;IAC9C,oDAAoD;IACpD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,aAAa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ACR,EAAE,gBAAgB,qBAijBlB;yBAtkBe,WAAW"}
|
|
@@ -61,6 +61,8 @@ import { useMenuPress } from "../hooks/useMenuPress.js";
|
|
|
61
61
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
62
62
|
import { useLongPress } from "../hooks/useLongPress.js";
|
|
63
63
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
64
|
+
import "../Layer/layerViewportInset.stylex.js";
|
|
65
|
+
import { layerViewportInset } from "../Layer/layerViewportInset.stylex.js";
|
|
64
66
|
import "../theme/tokens.stylex.js";
|
|
65
67
|
import { colorVars, spacingVars, radiusVars, durationVars, easeVars, shadowVars } from "../theme/tokens.stylex.js";
|
|
66
68
|
import { mergeProps, rtlStyles } from "../utils/index.js";
|
|
@@ -87,7 +89,7 @@ const styles = {
|
|
|
87
89
|
k1xSpc: "x78zum5",
|
|
88
90
|
kXwgrk: "xdt5ytf",
|
|
89
91
|
kOIVth: "x1lsbc85",
|
|
90
|
-
kskxy: "
|
|
92
|
+
kskxy: "x1uh1i8a",
|
|
91
93
|
kORKVm: "x1odjw0f",
|
|
92
94
|
"--_dropdown-menu-radius": "x1fcsqxe",
|
|
93
95
|
"--_dropdown-menu-padding": "xgory14",
|
package/dist/Item/Item.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAoC5C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,S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AG,EAAE,YAAY,EACjB,aAAqB,EACrB,UAAkB,EAClB,UAAkB,EAClB,YAAY,EACZ,aAAwB,EACxB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,IAAI,EACJ,GAAG,SAAS,EACb,EAAE,SAAS,+BAkaX;yBA9be,IAAI"}
|
package/dist/Item/Item.js
CHANGED
|
@@ -589,7 +589,10 @@ export function Item({
|
|
|
589
589
|
...(isInteractive ? pressable : undefined),
|
|
590
590
|
...mergeProps(themeProps('item', {
|
|
591
591
|
density,
|
|
592
|
-
align
|
|
592
|
+
align,
|
|
593
|
+
highlighted: isHighlighted ? 'highlighted' : null,
|
|
594
|
+
selected: isSelected ? 'selected' : null,
|
|
595
|
+
disabled: isDisabled ? 'disabled' : null
|
|
593
596
|
}), focusOutlineProps.focusWithin(styles.root, densityStyles[density], align === 'start' && styles.alignStart, align === 'first-line' && styles.alignFirstLine, isInteractive && styles.interactive, isInteractive && interactionOverlayStyles.backgroundColor,
|
|
594
597
|
// The touch press on a compositor layer (after the overlay, whose
|
|
595
598
|
// own touch paint it turns off): the release keeps fading while
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayerProvider.d.ts","sourceRoot":"","sources":["../../src/Layer/LayerProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"LayerProvider.d.ts","sourceRoot":"","sources":["../../src/Layer/LayerProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAqBD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EAAE,WAAkC,EACzC,KAAK,GACN,EAAE,kBAAkB,+BAwCpB;yBA5Ce,aAAa"}
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
import { LayerContext, useLayerContext } from "./LayerContext.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ToastHostOutlet } from "./toastHost.js";
|
|
8
8
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
10
|
* App-level provider for layer systems (toast, sheet, imperative modals).
|
|
11
11
|
*
|
|
12
12
|
* Optional — hooks fall back to a lazy self-mounting viewport when no
|
|
13
|
-
* provider exists.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* provider exists. The provider renders the toast viewport once Toast is
|
|
14
|
+
* imported; without Toast it renders no empty viewport. Nested providers are
|
|
15
|
+
* no-ops, except that one declaring an `inset` narrows it for the anchored
|
|
16
|
+
* layers in its subtree. `inset` declares a persistent bar floating over a
|
|
17
|
+
* viewport edge once; anchored layers and toasts both clear it.
|
|
17
18
|
*
|
|
18
19
|
* @example
|
|
19
20
|
* ```
|
|
@@ -57,12 +58,12 @@ export function LayerProvider({
|
|
|
57
58
|
|
|
58
59
|
// The declared inset reaches anchored layers through context — each layer
|
|
59
60
|
// writes it inline on itself, so a corrective portal cannot escape it — and
|
|
60
|
-
// the toast viewport through
|
|
61
|
+
// the toast viewport through the outlet. Nothing resolves placement through
|
|
61
62
|
// the provider (spec:AST-059 FR6). With no inset nothing is written, so a
|
|
62
63
|
// surface with no provider renders as one under the default provider.
|
|
63
64
|
return /*#__PURE__*/_jsx(LayerContext, {
|
|
64
65
|
value: contextValue,
|
|
65
|
-
children: /*#__PURE__*/_jsx(
|
|
66
|
+
children: /*#__PURE__*/_jsx(ToastHostOutlet, {
|
|
66
67
|
position: toastConfig.position,
|
|
67
68
|
maxVisible: toastConfig.maxVisible,
|
|
68
69
|
inset: toastConfig.inset,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file LayerTouch.ts
|
|
3
|
+
* @input useLayerKeyboardClearance.ts (the software keyboard's part of the
|
|
4
|
+
* viewport caps)
|
|
5
|
+
* @output The layer runtime's touch layer: useLayerKeyboardClearance
|
|
6
|
+
* @position The one module the layer runtime imports touch-only code through,
|
|
7
|
+
* and its only import site is useLayer.tsx. It is imported statically, as
|
|
8
|
+
* every touch module is.
|
|
9
|
+
*
|
|
10
|
+
* SYNC: When modified, keep every touch-only import of useLayer.tsx here.
|
|
11
|
+
*/
|
|
12
|
+
export { useLayerKeyboardClearance } from './useLayerKeyboardClearance.js';
|
|
13
|
+
//# sourceMappingURL=LayerTouch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayerTouch.d.ts","sourceRoot":"","sources":["../../src/Layer/LayerTouch.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file LayerTouch.ts
|
|
7
|
+
* @input useLayerKeyboardClearance.ts (the software keyboard's part of the
|
|
8
|
+
* viewport caps)
|
|
9
|
+
* @output The layer runtime's touch layer: useLayerKeyboardClearance
|
|
10
|
+
* @position The one module the layer runtime imports touch-only code through,
|
|
11
|
+
* and its only import site is useLayer.tsx. It is imported statically, as
|
|
12
|
+
* every touch module is.
|
|
13
|
+
*
|
|
14
|
+
* SYNC: When modified, keep every touch-only import of useLayer.tsx here.
|
|
15
|
+
*/
|
|
16
|
+
export { useLayerKeyboardClearance } from "./useLayerKeyboardClearance.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file layerKeyboardClearance.ts
|
|
3
|
+
* @input A layer's box, the layout viewport's height and the keyboard's
|
|
4
|
+
* cover
|
|
5
|
+
* @output Exports `LAYER_KEYBOARD_CLEARANCE_PX`, `LAYER_ANCHORED_ATTRIBUTE` and
|
|
6
|
+
* `keyboardClearanceCap`
|
|
7
|
+
* @position Layer runtime: the software keyboard cap's numbers, with no DOM
|
|
8
|
+
* and no React. A browser proof can import them on its own.
|
|
9
|
+
* useLayerKeyboardClearance.ts applies them.
|
|
10
|
+
*
|
|
11
|
+
* SYNC: When modified, update:
|
|
12
|
+
* - /packages/core/src/Layer/useLayerKeyboardClearance.ts
|
|
13
|
+
* - /packages/core/src/Layer/useLayerKeyboardClearance.test.tsx
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* How far above the software keyboard a capped layer ends, CSS px. It is the
|
|
17
|
+
* clearance UIKit keeps under a popover the keyboard would cover.
|
|
18
|
+
* @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. A
|
|
19
|
+
* 320 × 533 popover below a source at y 160 (top 204) shrank to 325 pt.
|
|
20
|
+
* Its bottom stopped at 529, with the keyboard's top at about 539. It
|
|
21
|
+
* shrank from UIKeyboardWillShow over the keyboard's 0.3833 s, and grew
|
|
22
|
+
* back the same way on the hide. A 320 × 240 popover clear of the keyboard
|
|
23
|
+
* did not move.
|
|
24
|
+
*/
|
|
25
|
+
export declare const LAYER_KEYBOARD_CLEARANCE_PX = 10;
|
|
26
|
+
/**
|
|
27
|
+
* The attribute useLayer.tsx renders on a layer in anchor positioning. The
|
|
28
|
+
* cap reads it from the committed element at measurement, not from a value a
|
|
29
|
+
* render wrote. Only an anchored layer is capped.
|
|
30
|
+
*/
|
|
31
|
+
export declare const LAYER_ANCHORED_ATTRIBUTE = "data-layer-anchored";
|
|
32
|
+
/**
|
|
33
|
+
* The block size that keeps a layer `LAYER_KEYBOARD_CLEARANCE_PX` above a
|
|
34
|
+
* keyboard covering `inset` px of the layout viewport's bottom. It is null
|
|
35
|
+
* when the layer, at its own size, is already clear of the keyboard.
|
|
36
|
+
*/
|
|
37
|
+
export declare function keyboardClearanceCap(box: {
|
|
38
|
+
top: number;
|
|
39
|
+
bottom: number;
|
|
40
|
+
}, viewportHeight: number, inset: number): number | null;
|
|
41
|
+
//# sourceMappingURL=layerKeyboardClearance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerKeyboardClearance.d.ts","sourceRoot":"","sources":["../../src/Layer/layerKeyboardClearance.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,EAClC,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CASf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file layerKeyboardClearance.ts
|
|
5
|
+
* @input A layer's box, the layout viewport's height and the keyboard's
|
|
6
|
+
* cover
|
|
7
|
+
* @output Exports `LAYER_KEYBOARD_CLEARANCE_PX`, `LAYER_ANCHORED_ATTRIBUTE` and
|
|
8
|
+
* `keyboardClearanceCap`
|
|
9
|
+
* @position Layer runtime: the software keyboard cap's numbers, with no DOM
|
|
10
|
+
* and no React. A browser proof can import them on its own.
|
|
11
|
+
* useLayerKeyboardClearance.ts applies them.
|
|
12
|
+
*
|
|
13
|
+
* SYNC: When modified, update:
|
|
14
|
+
* - /packages/core/src/Layer/useLayerKeyboardClearance.ts
|
|
15
|
+
* - /packages/core/src/Layer/useLayerKeyboardClearance.test.tsx
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* How far above the software keyboard a capped layer ends, CSS px. It is the
|
|
20
|
+
* clearance UIKit keeps under a popover the keyboard would cover.
|
|
21
|
+
* @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. A
|
|
22
|
+
* 320 × 533 popover below a source at y 160 (top 204) shrank to 325 pt.
|
|
23
|
+
* Its bottom stopped at 529, with the keyboard's top at about 539. It
|
|
24
|
+
* shrank from UIKeyboardWillShow over the keyboard's 0.3833 s, and grew
|
|
25
|
+
* back the same way on the hide. A 320 × 240 popover clear of the keyboard
|
|
26
|
+
* did not move.
|
|
27
|
+
*/
|
|
28
|
+
export const LAYER_KEYBOARD_CLEARANCE_PX = 10;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The attribute useLayer.tsx renders on a layer in anchor positioning. The
|
|
32
|
+
* cap reads it from the committed element at measurement, not from a value a
|
|
33
|
+
* render wrote. Only an anchored layer is capped.
|
|
34
|
+
*/
|
|
35
|
+
export const LAYER_ANCHORED_ATTRIBUTE = 'data-layer-anchored';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The block size that keeps a layer `LAYER_KEYBOARD_CLEARANCE_PX` above a
|
|
39
|
+
* keyboard covering `inset` px of the layout viewport's bottom. It is null
|
|
40
|
+
* when the layer, at its own size, is already clear of the keyboard.
|
|
41
|
+
*/
|
|
42
|
+
export function keyboardClearanceCap(box, viewportHeight, inset) {
|
|
43
|
+
if (inset <= 0) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const limit = viewportHeight - inset - LAYER_KEYBOARD_CLEARANCE_PX;
|
|
47
|
+
if (box.bottom <= limit) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return Math.max(0, limit - box.top);
|
|
51
|
+
}
|
|
@@ -23,7 +23,11 @@ export declare const layerViewportInset: {
|
|
|
23
23
|
/** The largest inline size a layer may take: the viewport minus both gutters. */
|
|
24
24
|
maxInlineSize: string;
|
|
25
25
|
maxInlineSizeFallback: string;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* The largest block size a layer may take: the viewport minus both
|
|
28
|
+
* gutters. It is no more than the room the software keyboard leaves while
|
|
29
|
+
* it caps the layer.
|
|
30
|
+
*/
|
|
27
31
|
maxBlockSize: string;
|
|
28
32
|
maxBlockSizeFallback: string;
|
|
29
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layerViewportInset.stylex.d.ts","sourceRoot":"","sources":["../../src/Layer/layerViewportInset.stylex.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layerViewportInset.stylex.d.ts","sourceRoot":"","sources":["../../src/Layer/layerViewportInset.stylex.ts"],"names":[],"mappings":"AA+DA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;IAC7B,iDAAiD;;IAEjD,+CAA+C;;IAE/C,+CAA+C;;IAE/C,gFAAgF;;;;;;IAMhF,iFAAiF;;;IAGjF;;;;OAIG;;;CAGH,CAAC"}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @file layerViewportInset.stylex.ts
|
|
5
|
-
* @input Uses the spacing token, the device safe-area insets,
|
|
6
|
-
* app-declared `--astryx-layer-inset-*` custom properties
|
|
5
|
+
* @input Uses the spacing token, the device safe-area insets, the
|
|
6
|
+
* app-declared `--astryx-layer-inset-*` custom properties, and the
|
|
7
|
+
* keyboard cap each layer's own style declares
|
|
8
|
+
* (`--_layer-keyboard-max-block-size`)
|
|
7
9
|
* @output Exports the one definition of an anchored layer's viewport gutter
|
|
8
10
|
* and the size caps derived from it
|
|
9
11
|
* @position Layer runtime geometry; read by useLayer and by consumers that
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
*
|
|
28
30
|
* SYNC: When modified, update these files to stay in sync:
|
|
29
31
|
* - /packages/core/src/Layer/useLayer.tsx
|
|
32
|
+
* - /packages/core/src/Layer/useLayerKeyboardClearance.ts
|
|
30
33
|
* - /packages/core/src/Layer/layerViewportInset.test.ts
|
|
31
34
|
* - /docs/specs/AST-059-layer-viewport-inset/spec.md
|
|
32
35
|
*/
|
|
@@ -41,6 +44,10 @@ const INSET_BLOCK_START = 'var(--astryx-layer-inset-block-start, 0px)';
|
|
|
41
44
|
const INSET_BLOCK_END = 'var(--astryx-layer-inset-block-end, 0px)';
|
|
42
45
|
const INSET_INLINE_START = 'var(--astryx-layer-inset-inline-start, 0px)';
|
|
43
46
|
const INSET_INLINE_END = 'var(--astryx-layer-inset-inline-end, 0px)';
|
|
47
|
+
// Each layer's own style declares the room the software keyboard leaves it
|
|
48
|
+
// (useLayer.tsx's `keyboardCap`, from useLayerKeyboardClearance.ts). An
|
|
49
|
+
// uncapped layer declares a limit out of reach.
|
|
50
|
+
const KEYBOARD_CAP_PROPERTY = '--_layer-keyboard-max-block-size';
|
|
44
51
|
const GUTTER_BLOCK_START = `calc(max(${SPACING}, env(safe-area-inset-top, 0px)) + ${INSET_BLOCK_START})`;
|
|
45
52
|
const GUTTER_BLOCK_END = `calc(max(${SPACING}, env(safe-area-inset-bottom, 0px)) + ${INSET_BLOCK_END})`;
|
|
46
53
|
const GUTTER_INLINE_LEFT = `calc(max(${SPACING}, env(safe-area-inset-left, 0px)) + ${INSET_INLINE_START})`;
|
|
@@ -72,6 +79,6 @@ export const layerViewportInset = {
|
|
|
72
79
|
gutterInlineFallback: "calc(var(--spacing-4) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px)))",
|
|
73
80
|
maxInlineSize: "calc(100vi - calc(max(var(--spacing-4), env(safe-area-inset-left, 0px)) + var(--astryx-layer-inset-inline-start, 0px)) - calc(max(var(--spacing-4), env(safe-area-inset-right, 0px)) + var(--astryx-layer-inset-inline-end, 0px)))",
|
|
74
81
|
maxInlineSizeFallback: "calc(100vw - var(--spacing-4) - var(--spacing-4) - var(--astryx-layer-inset-inline-start, 0px) - var(--astryx-layer-inset-inline-end, 0px))",
|
|
75
|
-
maxBlockSize: "calc(100dvb - calc(max(var(--spacing-4), env(safe-area-inset-top, 0px)) + var(--astryx-layer-inset-block-start, 0px)) - calc(max(var(--spacing-4), env(safe-area-inset-bottom, 0px)) + var(--astryx-layer-inset-block-end, 0px)))",
|
|
76
|
-
maxBlockSizeFallback: "calc(100vh - var(--spacing-4) - var(--spacing-4) - var(--astryx-layer-inset-block-start, 0px) - var(--astryx-layer-inset-block-end, 0px))"
|
|
82
|
+
maxBlockSize: "min(calc(100dvb - calc(max(var(--spacing-4), env(safe-area-inset-top, 0px)) + var(--astryx-layer-inset-block-start, 0px)) - calc(max(var(--spacing-4), env(safe-area-inset-bottom, 0px)) + var(--astryx-layer-inset-block-end, 0px))), var(--_layer-keyboard-max-block-size, 100dvb))",
|
|
83
|
+
maxBlockSizeFallback: "min(calc(100vh - var(--spacing-4) - var(--spacing-4) - var(--astryx-layer-inset-block-start, 0px) - var(--astryx-layer-inset-block-end, 0px)), var(--_layer-keyboard-max-block-size, 100vh))"
|
|
77
84
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The layer's box where its position option put it, without the transform an
|
|
3
|
+
* entry animation (or anything else) applies to it. A Tooltip enters from a
|
|
4
|
+
* few pixels toward its trigger, scaled down. So the transformed box of a
|
|
5
|
+
* tooltip that fits beside its trigger can read as covering it while it
|
|
6
|
+
* enters. For this one read, the layer's transforms are overridden with
|
|
7
|
+
* `none !important`, which outranks an animation. They are restored in the
|
|
8
|
+
* same task, so no frame paints in between and the animation keeps running.
|
|
9
|
+
* Where the engine still applies an animated transform under that override
|
|
10
|
+
* (WebKit), the read box has that transform undone instead (`untransform`). A
|
|
11
|
+
* layer that transitions a transform property is not overridden, since
|
|
12
|
+
* restoring the value would start that transition. Its box has its transform
|
|
13
|
+
* undone.
|
|
14
|
+
*/
|
|
15
|
+
export declare function settledBox(layer: HTMLElement): DOMRect;
|
|
16
|
+
//# sourceMappingURL=settledBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settledBox.d.ts","sourceRoot":"","sources":["../../src/Layer/settledBox.ts"],"names":[],"mappings":"AAoFA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAuCtD"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file settledBox.ts
|
|
5
|
+
* @input A layer element
|
|
6
|
+
* @output Exports `settledBox`: the layer's box where its position option put
|
|
7
|
+
* it, without the transform an entrance (or anything else) applies to it
|
|
8
|
+
* @position Layer runtime: the one box read the fallback order and the
|
|
9
|
+
* software keyboard's cap both measure with (useLayer.tsx,
|
|
10
|
+
* useLayerKeyboardClearance.ts)
|
|
11
|
+
*
|
|
12
|
+
* SYNC: When modified, update:
|
|
13
|
+
* - /packages/core/src/Layer/useLayer.tsx
|
|
14
|
+
* - /packages/core/src/Layer/useLayerKeyboardClearance.ts
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const TRANSFORM_PROPERTIES = ['transform', 'translate', 'scale', 'rotate'];
|
|
18
|
+
function hasTransform(style) {
|
|
19
|
+
return TRANSFORM_PROPERTIES.some(name => {
|
|
20
|
+
const value = style.getPropertyValue(name);
|
|
21
|
+
return value !== '' && value !== 'none';
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* `rect`, the box of an element whose computed style still carries a 2D
|
|
27
|
+
* transform, with that transform undone. The transformed box's centre is the
|
|
28
|
+
* image of the element's centre. So undoing the transform about its origin on
|
|
29
|
+
* that centre gives the untransformed box, at the element's layout size. A
|
|
30
|
+
* transform this cannot undo (3D, or a rotation in another unit) leaves `rect`
|
|
31
|
+
* as it is.
|
|
32
|
+
*/
|
|
33
|
+
function untransform(rect, layer, style) {
|
|
34
|
+
const set = value => value !== '' && value !== 'none';
|
|
35
|
+
if (typeof DOMMatrix === 'undefined' || layer.offsetWidth <= 0) {
|
|
36
|
+
return rect;
|
|
37
|
+
}
|
|
38
|
+
// The individual transform properties apply before `transform`, in this
|
|
39
|
+
// order (CSS Transforms 2).
|
|
40
|
+
let matrix = new DOMMatrix();
|
|
41
|
+
if (set(style.translate)) {
|
|
42
|
+
const [x = '0', y = '0', z] = style.translate.split(' ');
|
|
43
|
+
if (z != null) {
|
|
44
|
+
return rect;
|
|
45
|
+
}
|
|
46
|
+
matrix = matrix.translate(parseFloat(x), parseFloat(y));
|
|
47
|
+
}
|
|
48
|
+
if (set(style.rotate)) {
|
|
49
|
+
if (!/^-?[\d.]+deg$/.test(style.rotate)) {
|
|
50
|
+
return rect;
|
|
51
|
+
}
|
|
52
|
+
matrix = matrix.rotate(parseFloat(style.rotate));
|
|
53
|
+
}
|
|
54
|
+
if (set(style.scale)) {
|
|
55
|
+
const [x = '1', y = x, z] = style.scale.split(' ');
|
|
56
|
+
if (z != null) {
|
|
57
|
+
return rect;
|
|
58
|
+
}
|
|
59
|
+
matrix = matrix.scale(parseFloat(x), parseFloat(y));
|
|
60
|
+
}
|
|
61
|
+
if (set(style.transform)) {
|
|
62
|
+
matrix = matrix.multiply(new DOMMatrix(style.transform));
|
|
63
|
+
}
|
|
64
|
+
if (!matrix.is2D) {
|
|
65
|
+
return rect;
|
|
66
|
+
}
|
|
67
|
+
const [originX = 0, originY = 0] = style.transformOrigin.split(' ').map(value => parseFloat(value));
|
|
68
|
+
const width = layer.offsetWidth;
|
|
69
|
+
const height = layer.offsetHeight;
|
|
70
|
+
const centre = matrix.transformPoint(new DOMPoint(width / 2 - originX, height / 2 - originY));
|
|
71
|
+
const left = rect.left + rect.width / 2 - centre.x - originX;
|
|
72
|
+
const top = rect.top + rect.height / 2 - centre.y - originY;
|
|
73
|
+
return new DOMRect(left, top, width, height);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The layer's box where its position option put it, without the transform an
|
|
78
|
+
* entry animation (or anything else) applies to it. A Tooltip enters from a
|
|
79
|
+
* few pixels toward its trigger, scaled down. So the transformed box of a
|
|
80
|
+
* tooltip that fits beside its trigger can read as covering it while it
|
|
81
|
+
* enters. For this one read, the layer's transforms are overridden with
|
|
82
|
+
* `none !important`, which outranks an animation. They are restored in the
|
|
83
|
+
* same task, so no frame paints in between and the animation keeps running.
|
|
84
|
+
* Where the engine still applies an animated transform under that override
|
|
85
|
+
* (WebKit), the read box has that transform undone instead (`untransform`). A
|
|
86
|
+
* layer that transitions a transform property is not overridden, since
|
|
87
|
+
* restoring the value would start that transition. Its box has its transform
|
|
88
|
+
* undone.
|
|
89
|
+
*/
|
|
90
|
+
export function settledBox(layer) {
|
|
91
|
+
const view = layer.ownerDocument.defaultView;
|
|
92
|
+
const style = view?.getComputedStyle(layer);
|
|
93
|
+
if (style == null || !hasTransform(style)) {
|
|
94
|
+
return layer.getBoundingClientRect();
|
|
95
|
+
}
|
|
96
|
+
const transitions = style.transitionProperty.split(',').map(p => p.trim());
|
|
97
|
+
const durations = style.transitionDuration.split(',').map(parseFloat);
|
|
98
|
+
const transitioned = transitions.some((name, index) => (name === 'all' || TRANSFORM_PROPERTIES.includes(name)) && (durations[index % durations.length] ?? 0) > 0);
|
|
99
|
+
if (transitioned) {
|
|
100
|
+
return untransform(layer.getBoundingClientRect(), layer, style);
|
|
101
|
+
}
|
|
102
|
+
const saved = TRANSFORM_PROPERTIES.map(name => [name, layer.style.getPropertyValue(name), layer.style.getPropertyPriority(name)]);
|
|
103
|
+
for (const name of TRANSFORM_PROPERTIES) {
|
|
104
|
+
layer.style.setProperty(name, 'none', 'important');
|
|
105
|
+
}
|
|
106
|
+
const box = layer.getBoundingClientRect();
|
|
107
|
+
const under = view?.getComputedStyle(layer);
|
|
108
|
+
const settled = under != null && hasTransform(under) ? untransform(box, layer, under) : box;
|
|
109
|
+
for (const [name, value, priority] of saved) {
|
|
110
|
+
if (value === '') {
|
|
111
|
+
layer.style.removeProperty(name);
|
|
112
|
+
} else {
|
|
113
|
+
layer.style.setProperty(name, value, priority);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return settled;
|
|
117
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file toastHost.tsx
|
|
3
|
+
* @input The toast viewport that Toast registers, and LayerProvider's toast
|
|
4
|
+
* configuration
|
|
5
|
+
* @output ToastContext, registerToastHost, ToastHostOutlet, and the toast
|
|
6
|
+
* queue that the outlet and useToast's fallback root share
|
|
7
|
+
* @position Private layer infrastructure. LayerProvider renders the outlet,
|
|
8
|
+
* and Toast/ToastViewport.tsx registers itself and reads the context.
|
|
9
|
+
*
|
|
10
|
+
* SYNC: When modified, update /packages/core/src/Layer/toastHost.test.tsx and
|
|
11
|
+
* /docs/architecture/layer-runtime.md
|
|
12
|
+
*/
|
|
13
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
14
|
+
import type { ToastDismissReason, ToastEntry } from '../Toast/types.js';
|
|
15
|
+
import type { LayerInset, LayerToastConfig } from './LayerContext.js';
|
|
16
|
+
/** Internal context value for toast state management. */
|
|
17
|
+
export interface ToastContextValue {
|
|
18
|
+
/** Add a toast. */
|
|
19
|
+
addToast: (entry: ToastEntry) => void;
|
|
20
|
+
/** Remove a toast by ID with a reason. */
|
|
21
|
+
removeToast: (id: string, reason: ToastDismissReason) => void;
|
|
22
|
+
/** Find a toast by uniqueID. */
|
|
23
|
+
findByUniqueID: (uniqueID: string) => ToastEntry | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* React context for toast state. It lives in Layer, so LayerProvider can
|
|
27
|
+
* provide it without importing Toast. With no provider it is null, and
|
|
28
|
+
* `useToast` mounts a viewport of its own.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ToastContext: import("react").Context<ToastContextValue | null>;
|
|
31
|
+
/**
|
|
32
|
+
* Finds the toast a new one meets by uniqueID, and whether the new one is
|
|
33
|
+
* dropped. An empty uniqueID names no toast. With a namesake held, an ignored
|
|
34
|
+
* toast is dropped and an overwrite takes its place. The viewport and the
|
|
35
|
+
* waiting queue both decide through it, so the rule has one home.
|
|
36
|
+
*/
|
|
37
|
+
export declare function findToastNamesake<T extends ToastEntry>(held: ReadonlyArray<T>, entry: ToastEntry): {
|
|
38
|
+
namesake: T | undefined;
|
|
39
|
+
isDropped: boolean;
|
|
40
|
+
};
|
|
41
|
+
/** The props an outlet gives the registered viewport. */
|
|
42
|
+
export interface ToastHostProps {
|
|
43
|
+
position?: LayerToastConfig['position'];
|
|
44
|
+
maxVisible?: LayerToastConfig['maxVisible'];
|
|
45
|
+
inset?: LayerToastConfig['inset'];
|
|
46
|
+
layerInset?: LayerInset;
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Registers the toast viewport, which every LayerProvider renders from then
|
|
51
|
+
* on. Toast's viewport module calls it as it loads, so an app that never
|
|
52
|
+
* imports Toast carries none of it.
|
|
53
|
+
*/
|
|
54
|
+
export declare function registerToastHost(host: ComponentType<ToastHostProps>): void;
|
|
55
|
+
/**
|
|
56
|
+
* A toast context that holds toasts until a viewport's own context takes
|
|
57
|
+
* them. LayerProvider's outlet and useToast's fallback root each use one.
|
|
58
|
+
*/
|
|
59
|
+
export interface ToastQueue {
|
|
60
|
+
/** The context to provide. It forwards to the viewport once one connects. */
|
|
61
|
+
readonly context: ToastContextValue;
|
|
62
|
+
/** Connects the viewport's context, or disconnects it with null. */
|
|
63
|
+
connect: (viewport: ToastContextValue | null) => void;
|
|
64
|
+
}
|
|
65
|
+
export declare function createToastQueue(): ToastQueue;
|
|
66
|
+
/** Connects a queue to the toast context of the viewport that renders it. */
|
|
67
|
+
export declare function ToastQueueConnector({ queue }: {
|
|
68
|
+
queue: ToastQueue;
|
|
69
|
+
}): null;
|
|
70
|
+
/**
|
|
71
|
+
* LayerProvider's toast outlet. It always provides the toast context, so the
|
|
72
|
+
* app keeps its place in the tree when the viewport arrives. A toast added
|
|
73
|
+
* before the viewport can take it waits in the queue, and the toasts that
|
|
74
|
+
* wait show in order.
|
|
75
|
+
*/
|
|
76
|
+
export declare function ToastHostOutlet({ children, ...config }: ToastHostProps): import("react").JSX.Element;
|
|
77
|
+
//# sourceMappingURL=toastHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toastHost.d.ts","sourceRoot":"","sources":["../../src/Layer/toastHost.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,kBAAkB,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEjE,yDAAyD;AACzD,MAAM,WAAW,iBAAiB;IAChC,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,0CAA0C;IAC1C,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC9D,gCAAgC;IAChC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CAC9D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