@astryxdesign/core 0.7.2-canary.caec7ca → 0.7.2-canary.caf5673
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/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +40 -1
- package/dist/AspectRatio/AspectRatio.d.ts +6 -8
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/AspectRatio/AspectRatio.js +44 -3
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +3 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +37 -5
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +82 -10
- package/dist/DropdownMenu/DropdownMenuContext.d.ts +17 -0
- package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.js +21 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +15 -4
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +24 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +46 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +4 -10
- package/dist/Field/Field.d.ts +1 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +8 -4
- package/dist/Grid/GridSpan.d.ts.map +1 -1
- package/dist/Grid/GridSpan.js +1 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +4 -2
- package/dist/List/List.d.ts +46 -19
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +28 -10
- package/dist/List/ListContext.d.ts +8 -3
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +7 -2
- package/dist/List/ListItem.d.ts +4 -3
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +19 -8
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.d.ts.map +1 -1
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +8 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +5 -1
- package/dist/MetadataList/MetadataListContext.d.ts +1 -1
- package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.d.ts +9 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +30 -3
- package/dist/RadioList/RadioList.d.ts +1 -1
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +6 -2
- package/dist/SideNav/SideNavItem.d.ts +8 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +71 -9
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +4 -2
- package/dist/ToggleButton/ToggleButton.d.ts +3 -2
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +12 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +3 -3
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +3 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +2 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +57 -9
- package/dist/astryx.css +21 -3
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +18 -13
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +15 -9
- package/package.json +3 -3
- package/scripts/agent-doc-state.mjs +38 -0
- package/scripts/postinstall.mjs +1 -1
- package/src/AppShell/AppShell.tsx +45 -1
- package/src/AspectRatio/AspectRatio.test.tsx +44 -43
- package/src/AspectRatio/AspectRatio.tsx +38 -18
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +157 -0
- package/src/Avatar/Avatar.doc.mjs +5 -3
- package/src/AvatarGroup/AvatarGroup.doc.mjs +3 -2
- package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +30 -1
- package/src/Card/Card.doc.mjs +1 -1
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +3 -1
- package/src/CheckboxInput/CheckboxInput.test.tsx +34 -0
- package/src/CheckboxInput/CheckboxInput.tsx +3 -1
- package/src/Code/Code.doc.mjs +1 -0
- package/src/CommandPalette/CommandPalette.doc.mjs +2 -0
- package/src/CommandPalette/CommandPaletteInput.test.tsx +53 -4
- package/src/CommandPalette/CommandPaletteInput.tsx +33 -3
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +335 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +292 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +2 -3
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +438 -0
- package/src/Dialog/Dialog.test.tsx +46 -0
- package/src/Dialog/Dialog.tsx +20 -7
- package/src/Dialog/__tests__/Dialog.a11y.known-failures.ts +0 -14
- package/src/Drawer/Drawer.doc.mjs +1 -0
- package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +57 -0
- package/src/DropdownMenu/DropdownMenu.test.tsx +55 -2
- package/src/DropdownMenu/DropdownMenu.tsx +81 -10
- package/src/DropdownMenu/DropdownMenuContext.tsx +24 -0
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +192 -0
- package/src/DropdownMenu/DropdownMenuLazySheet.test.tsx +126 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +185 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +17 -3
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +280 -0
- package/src/DropdownMenu/__tests__/warmMenuBottomSheet.tsx +43 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +71 -0
- package/src/EmptyState/EmptyState.doc.mjs +3 -2
- package/src/EmptyState/EmptyState.spec.md +189 -0
- package/src/EmptyState/EmptyState.test.tsx +74 -3
- package/src/EmptyState/EmptyState.tsx +4 -8
- package/src/Field/Field.doc.mjs +14 -8
- package/src/Field/Field.spec.md +217 -0
- package/src/Field/Field.test.tsx +60 -2
- package/src/Field/Field.tsx +17 -8
- package/src/Grid/GridSpan.tsx +3 -0
- package/src/Heading/Heading.test.tsx +57 -0
- package/src/Heading/Heading.tsx +6 -2
- package/src/Icon/Icon.doc.mjs +36 -0
- package/src/Item/Item.doc.mjs +1 -1
- package/src/Item/Item.tsx +1 -1
- package/src/Layout/LayoutHeader.doc.mjs +5 -0
- package/src/List/List.doc.mjs +14 -1
- package/src/List/List.spec.md +129 -77
- package/src/List/List.test.tsx +144 -94
- package/src/List/List.tsx +74 -18
- package/src/List/ListContext.tsx +9 -3
- package/src/List/ListItem.tsx +46 -26
- package/src/List/index.ts +1 -1
- package/src/Markdown/Markdown.tsx +14 -1
- package/src/MetadataList/MetadataList.doc.mjs +3 -3
- package/src/MetadataList/MetadataList.test.tsx +38 -0
- package/src/MetadataList/MetadataList.tsx +8 -1
- package/src/MetadataList/MetadataListContext.tsx +1 -1
- package/src/MobileNav/MobileNav.tsx +30 -3
- package/src/MobileNav/MobileNavCloseEdgeCases.test.tsx +173 -15
- package/src/MoreMenu/MoreMenu.test.tsx +5 -1
- package/src/ProgressBar/ProgressBar.doc.mjs +1 -0
- package/src/RadioList/RadioList.fr10.test.tsx +45 -2
- package/src/RadioList/RadioList.tsx +4 -1
- package/src/Resizable/useResizable.doc.mjs +2 -0
- package/src/ScrollableArea/ScrollableArea.doc.mjs +1 -1
- package/src/SideNav/SideNav.test.tsx +179 -0
- package/src/SideNav/SideNavItem.doc.mjs +2 -2
- package/src/SideNav/SideNavItem.tsx +96 -17
- package/src/Slider/Slider.spec.md +39 -18
- package/src/Spinner/Spinner.doc.mjs +1 -1
- package/src/TabList/TabList.spec.md +57 -44
- package/src/Text/Text.test.tsx +57 -0
- package/src/Text/Text.tsx +6 -2
- package/src/TimeInput/TimeInput.fr10.test.tsx +15 -0
- package/src/Timestamp/Timestamp.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.test.tsx +95 -0
- package/src/ToggleButton/ToggleButton.tsx +12 -1
- package/src/ToggleButton/ToggleButtonGroup.doc.mjs +4 -0
- package/src/TopNav/TopNavMegaMenu.test.tsx +22 -0
- package/src/TopNav/TopNavMegaMenu.tsx +7 -3
- package/src/TopNav/TopNavMenu.test.tsx +19 -0
- package/src/TopNav/TopNavMenu.tsx +11 -3
- package/src/TreeList/TreeList.doc.mjs +1 -0
- package/src/TreeList/TreeList.test.tsx +327 -6
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListBranches.tsx +6 -0
- package/src/TreeList/TreeListItem.tsx +88 -13
- package/src/docPropLiterals.test.ts +36 -10
- package/src/hooks/useMenuHover.ts +18 -13
- package/src/postinstall.test.mjs +46 -0
- package/src/reset.css +0 -29
- package/src/theme/derivedVarRegistry.test.ts +7 -0
- package/src/utils/plainDate.test.ts +37 -1
- package/src/utils/plainDate.ts +15 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavMegaMenu.d.ts","sourceRoot":"","sources":["../../src/TopNav/TopNavMegaMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAkBf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TopNavMegaMenu.d.ts","sourceRoot":"","sources":["../../src/TopNav/TopNavMegaMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAkBf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgN5C,MAAM,WAAW,mBAAoB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACvE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAW,EACX,SAAe,EACf,YAAY,EACZ,GAAG,IAAI,EACR,EAAE,mBAAmB,4BAuCrB;yBAhDe,cAAc"}
|
|
@@ -411,15 +411,15 @@ function DrawerMegaMenu({
|
|
|
411
411
|
id: `${menuId}-items`,
|
|
412
412
|
...{
|
|
413
413
|
0: {
|
|
414
|
-
className: "xrvj5dj xihq33y
|
|
414
|
+
className: "xrvj5dj xihq33y xb3r6kr x6kj92 xd00j3c x1eizr8u xlr8y92"
|
|
415
415
|
},
|
|
416
416
|
1: {
|
|
417
|
-
className: "xrvj5dj
|
|
417
|
+
className: "xrvj5dj x6kj92 xd00j3c x1eizr8u xlr8y92 x1tu4anv x1rea2x4 xostmdb"
|
|
418
418
|
}
|
|
419
419
|
}[!!isExpanded << 0],
|
|
420
420
|
children: /*#__PURE__*/_jsxs("div", {
|
|
421
421
|
...{
|
|
422
|
-
className: "
|
|
422
|
+
className: "x2lwn1j"
|
|
423
423
|
},
|
|
424
424
|
children: [items, featured != null && /*#__PURE__*/_jsx("div", {
|
|
425
425
|
...{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavMenu.d.ts","sourceRoot":"","sources":["../../src/TopNav/TopNavMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TopNavMenu.d.ts","sourceRoot":"","sources":["../../src/TopNav/TopNavMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAkN5C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAMD,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAE5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,KAAK,EACL,KAAK,EACL,KAAW,EACX,SAAe,EACf,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,GAAG,IAAI,EACR,EAAE,eAAe,4BA4QjB;yBAzRe,UAAU"}
|
|
@@ -311,15 +311,15 @@ export function TopNavMenu({
|
|
|
311
311
|
id: `${menuId}-items`,
|
|
312
312
|
...{
|
|
313
313
|
0: {
|
|
314
|
-
className: "xrvj5dj xihq33y
|
|
314
|
+
className: "xrvj5dj xihq33y xb3r6kr x6kj92 xd00j3c x1eizr8u xlr8y92"
|
|
315
315
|
},
|
|
316
316
|
1: {
|
|
317
|
-
className: "xrvj5dj
|
|
317
|
+
className: "xrvj5dj x6kj92 xd00j3c x1eizr8u xlr8y92 x1tu4anv x1rea2x4 xostmdb"
|
|
318
318
|
}
|
|
319
319
|
}[!!drawerExpanded << 0],
|
|
320
320
|
children: /*#__PURE__*/_jsx("div", {
|
|
321
321
|
...{
|
|
322
|
-
className: "
|
|
322
|
+
className: "x2lwn1j"
|
|
323
323
|
},
|
|
324
324
|
children: items.map(item => /*#__PURE__*/_jsxs(LinkComponent, {
|
|
325
325
|
href: item.href,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeList.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAwC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI5E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAAC,KAAK,eAAe,EAAE,KAAK,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAE3E,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;;OAGG;IACH,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAE1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"TreeList.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAwC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI5E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAAC,KAAK,eAAe,EAAE,KAAK,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAE3E,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;;OAGG;IACH,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAE1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAuFD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,OAAoB,EACpB,OAAsB,EACtB,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,GAAG,EACH,SAAS,EAAE,aAAa,EACxB,GAAG,SAAS,EACb,EAAE,aAAa,+BA8Lf;yBA5Me,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeListBranches.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeListBranches.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeListBranches.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeListBranches.tsx"],"names":[],"mappings":"AA8EA,UAAU,qBAAqB;IAC7B,eAAe,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,MAAM,EACN,WAAW,GACZ,EAAE,qBAAqB,+BAsDvB;yBA1De,gBAAgB"}
|
|
@@ -61,7 +61,7 @@ export function TreeListBranches({
|
|
|
61
61
|
// with the correct terminus/continuation style.
|
|
62
62
|
!ancestorIsLast && level !== nestedLevel - 1 && /*#__PURE__*/_jsx("div", {
|
|
63
63
|
...mergeProps({
|
|
64
|
-
className: "x5yr21d x10l6tqk xfyiiit"
|
|
64
|
+
className: "x5yr21d x10l6tqk xfyiiit x1vjfegm x47corl"
|
|
65
65
|
}, {
|
|
66
66
|
style: {
|
|
67
67
|
insetInlineStart: branchOffset
|
|
@@ -76,7 +76,7 @@ export function TreeListBranches({
|
|
|
76
76
|
);
|
|
77
77
|
}), nestedLevel > 0 && /*#__PURE__*/_jsx("div", {
|
|
78
78
|
...mergeProps({
|
|
79
|
-
className: "x5yr21d x10l6tqk xfyiiit"
|
|
79
|
+
className: "x5yr21d x10l6tqk xfyiiit x1vjfegm x47corl"
|
|
80
80
|
}, {
|
|
81
81
|
style: {
|
|
82
82
|
insetInlineStart: `calc(${BRANCH_MARGIN} + ${nestedLevel - 1} * ${LEVEL_INDENT})`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeListItem.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"TreeListItem.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAyB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,K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ACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,IAAI,EACJ,MAAM,EACN,UAAkB,EAClB,UAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,eAAe,EACf,UAAU,EACV,QAAQ,EACR,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,UAAU,GACX,EAAE,yBAAyB,+BA+S3B;yBA1Ue,YAAY"}
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* - /packages/core/src/TreeList/TreeList.tsx
|
|
14
14
|
* - /packages/cli/assets/templates/blocks/components/TreeList/ (showcase blocks)
|
|
15
15
|
*/
|
|
16
|
-
import { useId, useMemo } from 'react';
|
|
16
|
+
import { useId, useMemo, useRef } from 'react';
|
|
17
17
|
import * as stylex from '@stylexjs/stylex';
|
|
18
18
|
import "../theme/tokens.stylex.js";
|
|
19
19
|
import { colorVars, radiusVars, spacingVars, durationVars, easeVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
20
20
|
import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
21
21
|
import { interactionOverlayStyles } from "../utils/interactionOverlay.stylex.js";
|
|
22
22
|
import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
23
|
+
import { hasInteractiveAncestor, useClickableContainer } from "../hooks/useClickableContainer.js";
|
|
23
24
|
import { Icon } from "../Icon/index.js";
|
|
24
25
|
import { mergeProps } from "../utils/index.js";
|
|
25
26
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
@@ -38,6 +39,7 @@ const styles = {
|
|
|
38
39
|
kmVPX3: "x1717udv",
|
|
39
40
|
kVAEAm: "x1n2onr6",
|
|
40
41
|
kzqmXN: "xh8yej3",
|
|
42
|
+
"--_tree-focus-z": "x70muob x1sk5w8o",
|
|
41
43
|
kI3sdo: "x1a2a7pz",
|
|
42
44
|
$$css: true
|
|
43
45
|
},
|
|
@@ -51,7 +53,10 @@ const styles = {
|
|
|
51
53
|
kVAEAm: "x1n2onr6",
|
|
52
54
|
kB7OPa: "x9f619",
|
|
53
55
|
k9WMMc: "x1yc453h",
|
|
54
|
-
|
|
56
|
+
$$css: true
|
|
57
|
+
},
|
|
58
|
+
focusLift: {
|
|
59
|
+
kY2c9j: "x6tapwc x3x83r7",
|
|
55
60
|
$$css: true
|
|
56
61
|
},
|
|
57
62
|
interactive: {
|
|
@@ -177,6 +182,7 @@ export function TreeListItem({
|
|
|
177
182
|
const labelId = useId();
|
|
178
183
|
const descriptionId = useId();
|
|
179
184
|
const LinkComponent = useLinkComponent();
|
|
185
|
+
const linkRef = useRef(null);
|
|
180
186
|
const isInteractive = onClick != null || href != null;
|
|
181
187
|
const handleToggle = useMemo(() => hasChildren && onToggle != null ? e => {
|
|
182
188
|
e.stopPropagation();
|
|
@@ -188,8 +194,10 @@ export function TreeListItem({
|
|
|
188
194
|
if (isDisabled) {
|
|
189
195
|
return;
|
|
190
196
|
}
|
|
191
|
-
|
|
192
|
-
|
|
197
|
+
// Controls inside the row, native or role-based, keep their own
|
|
198
|
+
// activation (FR7): the same rule link rows get from the shared
|
|
199
|
+
// enlarged-surface hook below.
|
|
200
|
+
if (hasInteractiveAncestor(e.target, e.currentTarget)) {
|
|
193
201
|
return;
|
|
194
202
|
}
|
|
195
203
|
if (onClick != null) {
|
|
@@ -202,6 +210,38 @@ export function TreeListItem({
|
|
|
202
210
|
return undefined;
|
|
203
211
|
}, [onClick, hasChildren, onToggle, id, isDisabled]);
|
|
204
212
|
|
|
213
|
+
// A link row (an `href` and no other row action) is an enlarged surface for
|
|
214
|
+
// its link: the indent is part of the row, so a click anywhere in it must
|
|
215
|
+
// follow the link, as Enter already does. Built on the shared
|
|
216
|
+
// enlarged-surface hook (family:navigation-destinations), which skips
|
|
217
|
+
// clicks on nested controls, native or role-based, and text selections.
|
|
218
|
+
// - Clicks are delegated: the hook re-dispatches the click on the anchor
|
|
219
|
+
// with its modifier keys, so the link component and the browser handle
|
|
220
|
+
// same-tab, new-tab and new-window activation, and stops the original, so
|
|
221
|
+
// ancestors see one click per press.
|
|
222
|
+
// - Middle-click has no synthetic equivalent, so it takes the hook's href
|
|
223
|
+
// path, which opens the destination in a new tab after the shared
|
|
224
|
+
// navigation rule.
|
|
225
|
+
// The container ref is attached to link rows only, so every other row stays
|
|
226
|
+
// a plain element and both hook instances stay inert on it.
|
|
227
|
+
const forwardsToLink = href != null && handleClick == null;
|
|
228
|
+
const linkRowRef = useRef(null);
|
|
229
|
+
const {
|
|
230
|
+
onClick: delegateToLink
|
|
231
|
+
} = useClickableContainer({
|
|
232
|
+
containerRef: linkRowRef,
|
|
233
|
+
interactiveRef: linkRef,
|
|
234
|
+
disabled: isDisabled || !forwardsToLink
|
|
235
|
+
});
|
|
236
|
+
const {
|
|
237
|
+
onMouseUp: openLinkOnMiddleClick
|
|
238
|
+
} = useClickableContainer({
|
|
239
|
+
containerRef: linkRowRef,
|
|
240
|
+
href,
|
|
241
|
+
target,
|
|
242
|
+
disabled: isDisabled || !forwardsToLink
|
|
243
|
+
});
|
|
244
|
+
|
|
205
245
|
// Per-level indent distance. The per-level step is the public, themeable
|
|
206
246
|
// `--tree-list-indent` lever (default `--spacing-4`, set on the tree-list
|
|
207
247
|
// root). A leaf adds a fixed chevron-column offset (chevron width + gap) so
|
|
@@ -211,8 +251,8 @@ export function TreeListItem({
|
|
|
211
251
|
// every row sits flush, like a parent at that level. That offset is tied to
|
|
212
252
|
// the chevron's own dimensions, not the indent step, so it does not scale
|
|
213
253
|
// with the lever. Published as the private `--_tree-indent` and consumed by
|
|
214
|
-
// `
|
|
215
|
-
//
|
|
254
|
+
// `indentedContent`'s stylesheet `padding-inline-start`; the step stays
|
|
255
|
+
// themeable through `--tree-list-indent` (see #4308).
|
|
216
256
|
const reservesChevronColumn = !hasChildren && hasExpandableItems;
|
|
217
257
|
const indentDistance = reservesChevronColumn ? `calc(${nestedLevel} * var(--tree-list-indent) + ${spacingVars['--spacing-4']} + ${spacingVars['--spacing-2']})` : `calc(${nestedLevel} * var(--tree-list-indent))`;
|
|
218
258
|
const indentStyle = {
|
|
@@ -308,6 +348,7 @@ export function TreeListItem({
|
|
|
308
348
|
},
|
|
309
349
|
children: startContent
|
|
310
350
|
}), href != null ? /*#__PURE__*/_jsx(LinkComponent, {
|
|
351
|
+
ref: linkRef,
|
|
311
352
|
href: href,
|
|
312
353
|
target: target,
|
|
313
354
|
"aria-disabled": isDisabled || undefined,
|
|
@@ -389,7 +430,7 @@ export function TreeListItem({
|
|
|
389
430
|
density,
|
|
390
431
|
selected: isSelected ? 'selected' : null,
|
|
391
432
|
disabled: isDisabled ? 'disabled' : null
|
|
392
|
-
}), isInteractive || hasChildren && onClick == null ? focusOutlineProps.focusWithinOrPublished(styles.contentWrapper, densityStyles[density], styles.interactive, interactionOverlayStyles.backgroundImage, isDisabled && styles.disabled, isSelected && styles.selected, xstyle) : stylex.props(styles.contentWrapper, densityStyles[density], isDisabled && styles.disabled, isSelected && styles.selected, xstyle),
|
|
433
|
+
}), isInteractive || hasChildren && onClick == null ? focusOutlineProps.focusWithinOrPublished(styles.contentWrapper, styles.focusLift, densityStyles[density], styles.interactive, interactionOverlayStyles.backgroundImage, isDisabled && styles.disabled, isSelected && styles.selected, xstyle) : stylex.props(styles.contentWrapper, densityStyles[density], isDisabled && styles.disabled, isSelected && styles.selected, xstyle),
|
|
393
434
|
// Consumer row props are merged last so useContainerReveal can
|
|
394
435
|
// publish both its classes and inline custom properties. Seed the
|
|
395
436
|
// private indent first, then preserve the standard inline-style
|
|
@@ -398,8 +439,15 @@ export function TreeListItem({
|
|
|
398
439
|
...indentStyle,
|
|
399
440
|
...style
|
|
400
441
|
}),
|
|
401
|
-
|
|
402
|
-
|
|
442
|
+
ref: forwardsToLink ? linkRowRef : undefined,
|
|
443
|
+
onClick: forwardsToLink ? delegateToLink : handleClick,
|
|
444
|
+
onMouseUp: forwardsToLink ? openLinkOnMiddleClick : undefined,
|
|
445
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
446
|
+
...{
|
|
447
|
+
className: "x78zum5 x98rzlu xeuugli x1h91t0o x14kbac9 xw2xrtw"
|
|
448
|
+
},
|
|
449
|
+
children: innerContent
|
|
450
|
+
})
|
|
403
451
|
})
|
|
404
452
|
}), isExpanded && renderedChildren != null && /*#__PURE__*/_jsx("ul", {
|
|
405
453
|
role: "group",
|
package/dist/astryx.css
CHANGED
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
.xqxtgf4{--_input-clear-hit-content:none}
|
|
135
135
|
.xtoycft{--_input-clear-hit-inset:0px}
|
|
136
136
|
.xqlix59{--_item-description-color:var(--color-error)}
|
|
137
|
+
.x1nwg5ib{--_item-inset-inline:0px}
|
|
137
138
|
.xw1s368{--_item-inset-inline:var(--spacing-2)}
|
|
138
139
|
.x1ytau7y{--_item-inset-inline:var(--spacing-3)}
|
|
139
140
|
.xufyqxy{--_item-label-color:var(--color-error)}
|
|
@@ -173,6 +174,7 @@
|
|
|
173
174
|
.x1ur4yav{--_thumbnail-hit-inset:0px}
|
|
174
175
|
.x87gnkx{--_toast-slide-y:calc(-1 * var(--spacing-2))}
|
|
175
176
|
.x1heqljd{--_toast-slide-y:var(--spacing-2)}
|
|
177
|
+
.x70muob{--_tree-focus-z:auto}
|
|
176
178
|
.x16bblx1{--button-focus-offset:var(--focus-outline-offset)}
|
|
177
179
|
.x1v15ycx{--button-icon-only-aspect:1 / 1}
|
|
178
180
|
.x1mtvhk1{--color-syntax-background:transparent}
|
|
@@ -415,6 +417,7 @@
|
|
|
415
417
|
.x1mjsb9v:focus-within{--_reveal-delay:0s,0s}
|
|
416
418
|
.xi33vf3:focus-within{--_reveal-opacity:1}
|
|
417
419
|
.xoa21yc:focus-within{--_reveal-position:static}
|
|
420
|
+
.x1sk5w8o:focus-visible{--_tree-focus-z:2}
|
|
418
421
|
.x11woleg:focus-visible{--indicator-color:var(--color-accent)}
|
|
419
422
|
.x1i79oho.x1i79oho:hover:where(:not(:disabled,[aria-disabled="true"])){--indicator-color:var(--resize-hint-gate,var(--color-accent))}
|
|
420
423
|
.x1qs65gq:has(> [data-size="lg"]){--_field-status-overlap:calc(var(--size-element-lg) / 2)}
|
|
@@ -682,6 +685,7 @@
|
|
|
682
685
|
.xpqajaz:not(#\#):not(#\#):not(#\#){align-items:end}
|
|
683
686
|
.xuk3077:not(#\#):not(#\#):not(#\#){align-items:flex-end}
|
|
684
687
|
.x1cy8zhl:not(#\#):not(#\#):not(#\#){align-items:flex-start}
|
|
688
|
+
.x1h91t0o:not(#\#):not(#\#):not(#\#){align-items:inherit}
|
|
685
689
|
.xaz6w31:not(#\#):not(#\#):not(#\#){align-items:last baseline}
|
|
686
690
|
.x7a106z:not(#\#):not(#\#):not(#\#){align-items:start}
|
|
687
691
|
.x1qjc9v5:not(#\#):not(#\#):not(#\#){align-items:stretch}
|
|
@@ -1042,6 +1046,7 @@
|
|
|
1042
1046
|
.x1pmbctz:not(#\#):not(#\#):not(#\#){grid-template-columns:auto 1fr}
|
|
1043
1047
|
.x1rkzygb:not(#\#):not(#\#):not(#\#){grid-template-columns:auto minmax(0,1fr)}
|
|
1044
1048
|
.x1wthsqz:not(#\#):not(#\#):not(#\#){grid-template-columns:auto repeat(7,1fr)}
|
|
1049
|
+
.x1mkdm3x:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}
|
|
1045
1050
|
.x1mzazjb:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(7,1fr)}
|
|
1046
1051
|
.x189bvgu:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
|
|
1047
1052
|
.x1xx4m37:not(#\#):not(#\#):not(#\#){grid-template-columns:var(--_codeblock-gutter-width) 1fr}
|
|
@@ -1112,13 +1117,13 @@
|
|
|
1112
1117
|
.x3ct3a4:not(#\#):not(#\#):not(#\#){list-style-type:none}
|
|
1113
1118
|
.x14z9mp:not(#\#):not(#\#):not(#\#){margin-inline-end:0}
|
|
1114
1119
|
.x11t971q:not(#\#):not(#\#):not(#\#){margin-inline-end:auto}
|
|
1115
|
-
.x1cphv78:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * min(var(--_item-inset-inline),var(--container-padding-inline-end,0px)))}
|
|
1116
1120
|
.x1fcf3bl:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--container-padding-inline-end,0px))}
|
|
1117
1121
|
.x1kpg4um:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--layout-padding-inner-x,var(--spacing-4)))}
|
|
1118
1122
|
.xkd40ry:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--spacing-1))}
|
|
1119
1123
|
.x3kzqx6:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--spacing-2))}
|
|
1120
1124
|
.xmequkd:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(var(--spacing-1) * -1)}
|
|
1121
1125
|
.x144kxal:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(calc(var(--spacing-4) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))));margin-inline-end:calc(calc(max(var(--spacing-4), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))))}
|
|
1126
|
+
.x2gtn1o:not(#\#):not(#\#):not(#\#){margin-inline-end:max(var(--container-padding-inline-end,0px) - var(--_item-inset-inline),0px)}
|
|
1122
1127
|
.xnur1sd:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--spacing-1)}
|
|
1123
1128
|
.x1pezmd8:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--spacing-2)}
|
|
1124
1129
|
.x1c9tiao:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--x-marginInlineEnd)}
|
|
@@ -1126,7 +1131,6 @@
|
|
|
1126
1131
|
.x1qfufaz:not(#\#):not(#\#):not(#\#){margin-inline-start:-8px}
|
|
1127
1132
|
.x1lziwak:not(#\#):not(#\#):not(#\#){margin-inline-start:0}
|
|
1128
1133
|
.xvc5jky:not(#\#):not(#\#):not(#\#){margin-inline-start:auto}
|
|
1129
|
-
.x1t1czy8:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * min(var(--_item-inset-inline),var(--container-padding-inline-start,0px)))}
|
|
1130
1134
|
.xd10s4z:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--border-width))}
|
|
1131
1135
|
.xojxgvx:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--container-padding-inline-start,0px))}
|
|
1132
1136
|
.x1wim8z0:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--layout-padding-inner-x,var(--spacing-4)))}
|
|
@@ -1138,8 +1142,8 @@
|
|
|
1138
1142
|
.x1xrm450:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
|
|
1139
1143
|
.x6w1cxl:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(var(--spacing-3) + var(--border-width) + var(--spacing-4))}
|
|
1140
1144
|
.xpdk1p0:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(calc(var(--spacing-4) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))));margin-inline-start:calc(calc(max(var(--spacing-4), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))))}
|
|
1145
|
+
.xch736x:not(#\#):not(#\#):not(#\#){margin-inline-start:max(var(--container-padding-inline-start,0px) - var(--_item-inset-inline),0px)}
|
|
1141
1146
|
.x13hpdyo:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--_avatar-group-overlap)}
|
|
1142
|
-
.x12vn87o:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--_tree-indent,0px)}
|
|
1143
1147
|
.xladpz9:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--spacing-0-5)}
|
|
1144
1148
|
.x17lnmll:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--spacing-1-5)}
|
|
1145
1149
|
.x11g1kdw:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--spacing-1)}
|
|
@@ -1192,6 +1196,7 @@
|
|
|
1192
1196
|
.x12frdag:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--container-padding-inline-end) - var(--border-width))}
|
|
1193
1197
|
.x1ahicqp:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),calc((100cqi - var(--layout-alignment-width)) / 2 + var(--container-padding-inline-end,0px)))}
|
|
1194
1198
|
.xy07wb4:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),calc(100cqi - var(--layout-alignment-width) + var(--container-padding-inline-end,0px)))}
|
|
1199
|
+
.x1pyz5s7:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),var(--_item-inset-inline))}
|
|
1195
1200
|
.x1g0rcpp:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--spacing-4),env(safe-area-inset-right,0px))}
|
|
1196
1201
|
.x1p6hqjl:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--_tokenizer-end-lane-reserve,0px)}
|
|
1197
1202
|
.x1by8st6:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--astryx-dialog-padding-inline-end,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-right,0px)))))}
|
|
@@ -1223,7 +1228,9 @@
|
|
|
1223
1228
|
.x2a0j69:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
|
|
1224
1229
|
.xhlv5e7:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),calc((100cqi - var(--layout-alignment-width)) / 2 + var(--container-padding-inline-start,0px)))}
|
|
1225
1230
|
.xxjme2g:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),calc(100cqi - var(--layout-alignment-width) + var(--container-padding-inline-start,0px)))}
|
|
1231
|
+
.xua885n:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),var(--_item-inset-inline))}
|
|
1226
1232
|
.xf4btlh:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--spacing-4),env(safe-area-inset-left,0px))}
|
|
1233
|
+
.xw2xrtw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--_tree-indent,0px)}
|
|
1227
1234
|
.xqmdmw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-left,0px)))))}
|
|
1228
1235
|
.x1jni19p:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-number-input-padding-inline-start,var(--astryx-number-input-padding-inline,var(--astryx-number-input-padding,var(--spacing-2))))}
|
|
1229
1236
|
.x1c35znw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--container-padding-inline-start)}
|
|
@@ -1351,6 +1358,8 @@
|
|
|
1351
1358
|
.xsqj5wx:not(#\#):not(#\#):not(#\#){transform:var(--x-transform)}
|
|
1352
1359
|
.xd00j3c:not(#\#):not(#\#):not(#\#){transition-behavior:allow-discrete}
|
|
1353
1360
|
.x5h36tt:not(#\#):not(#\#):not(#\#){transition-delay:.15s}
|
|
1361
|
+
.xf1rc6:not(#\#):not(#\#):not(#\#){transition-delay:0s,0s}
|
|
1362
|
+
.xostmdb:not(#\#):not(#\#):not(#\#){transition-delay:0s,var(--duration-medium)}
|
|
1354
1363
|
.x1ahifba:not(#\#):not(#\#):not(#\#){transition-delay:0s}
|
|
1355
1364
|
.x4avkj2:not(#\#):not(#\#):not(#\#){transition-delay:var(--_fade-delay,0s)}
|
|
1356
1365
|
.x1rq8cwj:not(#\#):not(#\#):not(#\#){transition-delay:var(--_reveal-delay,0s,0s)}
|
|
@@ -1366,6 +1375,7 @@
|
|
|
1366
1375
|
.x1tw3moq:not(#\#):not(#\#):not(#\#){transition-duration:var(--duration-fast),0s}
|
|
1367
1376
|
.xuedmi6:not(#\#):not(#\#):not(#\#){transition-duration:var(--duration-fast)}
|
|
1368
1377
|
.xgneliz:not(#\#):not(#\#):not(#\#){transition-duration:var(--duration-medium-min)}
|
|
1378
|
+
.x1eizr8u:not(#\#):not(#\#):not(#\#){transition-duration:var(--duration-medium),0s}
|
|
1369
1379
|
.x80gvsz:not(#\#):not(#\#):not(#\#){transition-duration:var(--duration-medium)}
|
|
1370
1380
|
.x1eaenvl:not(#\#):not(#\#):not(#\#){transition-property:background-color,border-color,color}
|
|
1371
1381
|
.xts7igz:not(#\#):not(#\#):not(#\#){transition-property:background-color,border-color}
|
|
@@ -1388,6 +1398,7 @@
|
|
|
1388
1398
|
.x1mpt4pi:not(#\#):not(#\#):not(#\#){transition-property:color,text-decoration}
|
|
1389
1399
|
.xt3l3uh:not(#\#):not(#\#):not(#\#){transition-property:color}
|
|
1390
1400
|
.xrgi2yo:not(#\#):not(#\#):not(#\#){transition-property:display}
|
|
1401
|
+
.x6kj92:not(#\#):not(#\#):not(#\#){transition-property:grid-template-rows,overflow}
|
|
1391
1402
|
.xjshnde:not(#\#):not(#\#):not(#\#){transition-property:grid-template-rows,padding}
|
|
1392
1403
|
.x1qn9uv2:not(#\#):not(#\#):not(#\#){transition-property:grid-template-rows}
|
|
1393
1404
|
.x157bb6t:not(#\#):not(#\#):not(#\#){transition-property:mask-image}
|
|
@@ -1442,6 +1453,7 @@
|
|
|
1442
1453
|
.xzkaem6:not(#\#):not(#\#):not(#\#){z-index:3}
|
|
1443
1454
|
.x6cuj84:not(#\#):not(#\#):not(#\#){z-index:500}
|
|
1444
1455
|
.x1q2oy4v:not(#\#):not(#\#):not(#\#){z-index:9999}
|
|
1456
|
+
.x6tapwc:not(#\#):not(#\#):not(#\#){z-index:var(--_tree-focus-z,auto)}
|
|
1445
1457
|
.x1wphrdb[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#){--_press-overlay-transition:0s}
|
|
1446
1458
|
.xbb2ue6[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#){--_press-overlay-transition:0s}
|
|
1447
1459
|
.x11z29ks[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#){--astryx-press-alpha:1}
|
|
@@ -1480,6 +1492,8 @@
|
|
|
1480
1492
|
.x1nwey30:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){mask-image:linear-gradient(to left,transparent var(--_tab-strip-bleed),black calc(var(--_tab-strip-bleed) + var(--spacing-8)))}
|
|
1481
1493
|
.x8ulde1:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){mask-image:linear-gradient(to right,transparent 0%,rgba(0,0,0,.3) 2px,black var(--spacing-1))}
|
|
1482
1494
|
.x1rxa4r8:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){mask-image:linear-gradient(to right,transparent var(--_tab-strip-bleed),black calc(var(--_tab-strip-bleed) + var(--spacing-8)))}
|
|
1495
|
+
.x16lv2iq:not([stylex-hack]) > :is(img, video):not(#\#):not(#\#):not(#\#){object-fit:contain}
|
|
1496
|
+
.x492jj3:not([stylex-hack]) > :is(img, video):not(#\#):not(#\#):not(#\#){object-fit:cover}
|
|
1483
1497
|
.x1euntei:focus-within:not(#\#):not(#\#):not(#\#){opacity:1}
|
|
1484
1498
|
.x25t5g8:focus-visible:not(#\#):not(#\#):not(#\#){opacity:1}
|
|
1485
1499
|
.xof6bs:is(th:hover *):not(#\#):not(#\#):not(#\#){opacity:1}
|
|
@@ -1535,6 +1549,7 @@
|
|
|
1535
1549
|
.xxdn8bs:has(> div > .astryx-layout-content):not(#\#):not(#\#):not(#\#){padding-inline-end:max(0px,calc((100% - var(--layout-content-width)) / 2))}
|
|
1536
1550
|
.xmnmr5y:has(.astryx-nav-icon):not(#\#):not(#\#):not(#\#){padding-inline-start:0}
|
|
1537
1551
|
.x1vvd0s7:has(> div > .astryx-layout-content):not(#\#):not(#\#):not(#\#){padding-inline-start:max(0px,calc((100% - var(--layout-content-width)) / 2))}
|
|
1552
|
+
.x3x83r7:has(:focus-visible):not(#\#):not(#\#):not(#\#){z-index:2}
|
|
1538
1553
|
.xbw113y:dir(rtl):not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}
|
|
1539
1554
|
.x1eqdj8u:dir(rtl):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}
|
|
1540
1555
|
.x1xrp5p4:first-child:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--radius-element)}
|
|
@@ -1596,6 +1611,7 @@
|
|
|
1596
1611
|
@media (pointer: coarse){.x1bjav06.x1bjav06:not(#\#):not(#\#):not(#\#){pointer-events:none}}
|
|
1597
1612
|
@media (prefers-reduced-motion: reduce){.xg83hb1.xg83hb1:not(#\#):not(#\#):not(#\#){scroll-behavior:auto}}
|
|
1598
1613
|
@media (forced-colors: active){.xrih18v.xrih18v:not(#\#):not(#\#):not(#\#){scrollbar-color:auto}}
|
|
1614
|
+
@media (prefers-reduced-motion: reduce){.x1k6wr6r.x1k6wr6r:not(#\#):not(#\#):not(#\#){transition-delay:0s,0s}}
|
|
1599
1615
|
@media (prefers-reduced-motion: reduce){.xwgk2z2.xwgk2z2:not(#\#):not(#\#):not(#\#){transition-delay:var(--_reveal-delay-reduced,0s,0s)}}
|
|
1600
1616
|
@media (prefers-reduced-motion: reduce){.xsagj69.xsagj69:not(#\#):not(#\#):not(#\#){transition-duration:.01ms}}
|
|
1601
1617
|
@media (prefers-reduced-motion: reduce){.xzg1mie.xzg1mie:not(#\#):not(#\#):not(#\#){transition-duration:.01s}}
|
|
@@ -2014,11 +2030,13 @@
|
|
|
2014
2030
|
.x1uyokj7:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x-inlineSize)}
|
|
2015
2031
|
.x5lhr3w:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x-width)}
|
|
2016
2032
|
.x1wp2rvj.x1wp2rvj:where(.x139im0d:last-child *):not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-width:0}
|
|
2033
|
+
.x1m6kvgq:not([stylex-hack]) > *:not(#\#):not(#\#):not(#\#):not(#\#){height:100%}
|
|
2017
2034
|
.x1vonza8.x1vonza8:where(.astryx-input-group > *):not(#\#):not(#\#):not(#\#):not(#\#){height:100%}
|
|
2018
2035
|
.x132qfvm:focus-within:not(#\#):not(#\#):not(#\#):not(#\#){height:auto}
|
|
2019
2036
|
.xsg11nj.xsg11nj:where(.x-default-marker:has(> .astryx-layout-footer:not([data-divider])) *):not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:0}
|
|
2020
2037
|
.x1ioh5az.x1ioh5az:where(.x-default-marker:has(> .astryx-layout-header:not([data-divider])) *):not(#\#):not(#\#):not(#\#):not(#\#){padding-top:0}
|
|
2021
2038
|
.x1kw28su:focus-within:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--spacing-1)}
|
|
2039
|
+
.xyz6fim:not([stylex-hack]) > *:not(#\#):not(#\#):not(#\#):not(#\#){width:100%}
|
|
2022
2040
|
.x10okhzq:focus-within:not(#\#):not(#\#):not(#\#):not(#\#){width:auto}
|
|
2023
2041
|
.x5du68j:has(~ * [data-chat-name]):not(#\#):not(#\#):not(#\#):not(#\#){margin-top:var(--spacing-5)}
|
|
2024
2042
|
.xzzx6db:has([role="radio"]:not([aria-label])):not(#\#):not(#\#):not(#\#):not(#\#){max-width:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuHover.d.ts","sourceRoot":"","sources":["../../src/hooks/useMenuHover.ts"],"names":[],"mappings":"AA8DA,UAAU,KAAK;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAA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O,CAAC;IAC1B;;;OAGG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAChC;;;;OAIG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,YAAY,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC9D,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAAC,CAAC,CAAC,CAmVvB"}
|
|
@@ -147,19 +147,6 @@ export function useMenuHover(options) {
|
|
|
147
147
|
/** When the current open began as a hover-open; 0 once confirmed or closed. */
|
|
148
148
|
const hoverOpenedAtRef = useRef(0);
|
|
149
149
|
const prevIsOpenRef = useRef(isOpen);
|
|
150
|
-
|
|
151
|
-
// Catches every close, whatever caused it. A layout effect, not render: it
|
|
152
|
-
// must land before the browser hit-tests the vanished panel and fires the
|
|
153
|
-
// mouseenter REOPEN_SUPPRESS_MS exists to swallow.
|
|
154
|
-
useIsomorphicLayoutEffect(() => {
|
|
155
|
-
const wasOpen = prevIsOpenRef.current;
|
|
156
|
-
prevIsOpenRef.current = isOpen;
|
|
157
|
-
if (wasOpen && !isOpen) {
|
|
158
|
-
hoverModeRef.current = false;
|
|
159
|
-
hoverOpenedAtRef.current = 0;
|
|
160
|
-
closedAtRef.current = Date.now();
|
|
161
|
-
}
|
|
162
|
-
}, [isOpen]);
|
|
163
150
|
const clearTimeouts = useCallback(() => {
|
|
164
151
|
if (showTimerRef.current) {
|
|
165
152
|
clearTimeout(showTimerRef.current);
|
|
@@ -173,6 +160,24 @@ export function useMenuHover(options) {
|
|
|
173
160
|
safeTriangleCleanupRef.current = null;
|
|
174
161
|
}, []);
|
|
175
162
|
|
|
163
|
+
// Catches every close, whatever caused it. A layout effect, not render: it
|
|
164
|
+
// must land before the browser hit-tests the vanished panel and fires the
|
|
165
|
+
// mouseenter REOPEN_SUPPRESS_MS exists to swallow.
|
|
166
|
+
useIsomorphicLayoutEffect(() => {
|
|
167
|
+
const wasOpen = prevIsOpenRef.current;
|
|
168
|
+
prevIsOpenRef.current = isOpen;
|
|
169
|
+
if (wasOpen && !isOpen) {
|
|
170
|
+
// A hover-open scheduled before the close must not fire afterwards and
|
|
171
|
+
// reopen what just closed from elsewhere — e.g. the root menu's light
|
|
172
|
+
// dismiss closing a submenu flyout mid hover-intent (#6893). A fresh
|
|
173
|
+
// mouseenter still opens; only the stale timer is cancelled.
|
|
174
|
+
clearTimeouts();
|
|
175
|
+
hoverModeRef.current = false;
|
|
176
|
+
hoverOpenedAtRef.current = 0;
|
|
177
|
+
closedAtRef.current = Date.now();
|
|
178
|
+
}
|
|
179
|
+
}, [isOpen, clearTimeouts]);
|
|
180
|
+
|
|
176
181
|
// useListFocus needs an onEscape that is defined in terms of its own listRef;
|
|
177
182
|
// the indirection avoids the use-before-declare.
|
|
178
183
|
const escapeHandlerRef = useRef(() => {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plainDate.d.ts","sourceRoot":"","sources":["../../src/utils/plainDate.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAE1C,YAAY,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,SAAS,CAcX;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,CAG9D;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,GAAG,aAAa,CAK3D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAMnD;AAED,w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ACpB,MAAM,CAKR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM,CAYpE;AAMD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAC1B,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,OAAO,CAAC,gBAAgB,EAAE,aAAa,CAAC,EACxC,IAAI,CAAC,qBAAqB,CAK3B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,gBAAgB,EACxB,MAAM,GAAE,MAAa,GACpB,MAAM,CAKR"}
|
package/dist/utils/plainDate.js
CHANGED
|
@@ -202,15 +202,21 @@ export function plainDateSetEndOfWeekExclusive(pd, weekStartsOn) {
|
|
|
202
202
|
return plainDateAddDays(plainDateSetStartOfWeek(pd, weekStartsOn), 7);
|
|
203
203
|
}
|
|
204
204
|
export function plainDateGetWeekNumber(pd) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
205
|
+
// ISO week number: ceil(day-of-year of the week's Thursday / 7). Computed
|
|
206
|
+
// entirely on UTC anchors — the same DST immunity plainDateDiffDays relies
|
|
207
|
+
// on — because mixing local-time instants leaks the host zone's DST offset
|
|
208
|
+
// into the day count. When Jan 1 is a Friday (so every Thursday's day-of-year
|
|
209
|
+
// is an exact multiple of 7), a one-hour offset from a zone whose DST ends
|
|
210
|
+
// after New Year rounds a whole week up: Sydney, Auckland and Santiago users
|
|
211
|
+
// saw week 15 for the week that is ISO week 14. utcTime keeps years 1-99
|
|
212
|
+
// as given, like the other Calendar date helpers.
|
|
213
|
+
const msPerDay = 24 * 60 * 60 * 1000;
|
|
214
|
+
const utcMidnight = utcTime(pd.year, pd.month - 1, pd.day);
|
|
215
|
+
const dayNum = new Date(utcMidnight).getUTCDay() || 7;
|
|
216
|
+
const thursday = utcMidnight + (4 - dayNum) * msPerDay;
|
|
217
|
+
const yearStart = utcTime(new Date(thursday).getUTCFullYear(), 0, 1);
|
|
218
|
+
const dayOfYear = (thursday - yearStart) / msPerDay + 1;
|
|
219
|
+
return Math.ceil(dayOfYear / 7);
|
|
214
220
|
}
|
|
215
221
|
|
|
216
222
|
// e.g. "Wednesday, May 21, 2026" (locale-dependent)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.7.2-canary.
|
|
3
|
+
"version": "0.7.2-canary.caf5673",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -792,8 +792,8 @@
|
|
|
792
792
|
"react-dom": ">=19.0.0"
|
|
793
793
|
},
|
|
794
794
|
"devDependencies": {
|
|
795
|
-
"@astryxdesign/a11y-spec": "0.7.2-canary.
|
|
796
|
-
"@astryxdesign/cli": "0.7.2-canary.
|
|
795
|
+
"@astryxdesign/a11y-spec": "0.7.2-canary.caf5673",
|
|
796
|
+
"@astryxdesign/cli": "0.7.2-canary.caf5673",
|
|
797
797
|
"@babel/cli": "^7.29.7",
|
|
798
798
|
"@babel/core": "^7.29.7",
|
|
799
799
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -106,6 +106,44 @@ export function isAstryxInitialized(targetDir = process.cwd()) {
|
|
|
106
106
|
return false;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Does an agent working in `startDir` already have the Astryx prompt in reach?
|
|
111
|
+
*
|
|
112
|
+
* Coding agents read the agent docs between the repository root and the folder
|
|
113
|
+
* they work in. So inside a git repository, init's block in any folder from
|
|
114
|
+
* `startDir` up to the repository root counts: a workspace package of a
|
|
115
|
+
* monorepo initialized at its root is set up. Outside a repository only
|
|
116
|
+
* `startDir` itself is checked, as {@link isAstryxInitialized} does. Both the
|
|
117
|
+
* per-command nudge and the postinstall nudges ask this.
|
|
118
|
+
*
|
|
119
|
+
* @param {string} [startDir=process.cwd()]
|
|
120
|
+
* @returns {boolean}
|
|
121
|
+
*/
|
|
122
|
+
export function isAstryxPromptInReach(startDir = process.cwd()) {
|
|
123
|
+
const start = path.resolve(startDir);
|
|
124
|
+
const repositoryRoot = findRepositoryRoot(start);
|
|
125
|
+
if (!repositoryRoot) return isAstryxInitialized(start);
|
|
126
|
+
for (let dir = start; ; dir = path.dirname(dir)) {
|
|
127
|
+
if (isAstryxInitialized(dir)) return true;
|
|
128
|
+
if (dir === repositoryRoot) return false;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The nearest folder at or above `start` that holds `.git` (a folder, or the
|
|
134
|
+
* file a worktree uses), or null outside a repository.
|
|
135
|
+
* @param {string} start
|
|
136
|
+
* @returns {string | null}
|
|
137
|
+
*/
|
|
138
|
+
function findRepositoryRoot(start) {
|
|
139
|
+
for (let dir = start; ; ) {
|
|
140
|
+
if (fs.existsSync(path.join(dir, '.git'))) return dir;
|
|
141
|
+
const parent = path.dirname(dir);
|
|
142
|
+
if (parent === dir) return null;
|
|
143
|
+
dir = parent;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
109
147
|
/**
|
|
110
148
|
* The one-line next-step both postinstall nudges print. Kept here so layer 1
|
|
111
149
|
* (core) and layer 2 (cli) can never word it differently.
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -45,7 +45,7 @@ async function main() {
|
|
|
45
45
|
contract.shouldNudge({
|
|
46
46
|
scriptPath: HERE,
|
|
47
47
|
npmCommand: process.env.npm_command,
|
|
48
|
-
isSetUp: contract.
|
|
48
|
+
isSetUp: contract.isAstryxPromptInReach(root),
|
|
49
49
|
})
|
|
50
50
|
) {
|
|
51
51
|
process.stdout.write(contract.SETUP_NUDGE);
|