An open source design system that's fully customizable and agent ready
TypeScript
chore(core): re-export the scroll test and add the More tab's string (#10791)
Christopher Chedeaud5b0bdaa1326
diff --git a/.changeset/core-internal-touch-scroll-test.md b/.changeset/core-internal-touch-scroll-test.mdnew file mode 100644index 0000000000..84b1bed4af--- /dev/null+++ b/.changeset/core-internal-touch-scroll-test.md@@ -0,0 +1,7 @@+---+'@astryxdesign/core': patch+---++[chore] Internal: Core's internal touch entry re-exports its scroll test for Lab's TabBar. Apps import nothing new.++@vjeuxdiff --git a/.changeset/core-tab-bar-more-string.md b/.changeset/core-tab-bar-more-string.mdnew file mode 100644index 0000000000..545312c43c--- /dev/null+++ b/.changeset/core-tab-bar-more-string.md@@ -0,0 +1,7 @@+---+'@astryxdesign/core': patch+---++[chore] Internal: the More tab's label, a tab-bar string, joins Core's message catalog for Lab's TabBar. Apps import nothing new.++@vjeuxdiff --git a/packages/core/locales/en.json b/packages/core/locales/en.jsonindex 36963c0d8b..120404f345 100644--- a/packages/core/locales/en.json+++ b/packages/core/locales/en.json@@ -1023,6 +1023,10 @@"defaultMessage": "{label}, {badge}","description": "Screen-reader name of a bottom tab bar item that shows a badge (\"Library, 3\"). {label} is the tab's visible name; {badge} is the badge's count or its own label (\"3 unread\"). Translators may reorder the two or change the separator."},+ "@astryx.tabBar.more": {+ "defaultMessage": "More",+ "description": "Label of the bottom tab bar's More tab, shown under its icon when an app has more than five tabs, and the screen-reader name of the list it opens (the remaining tabs). As iOS's \"More\" tab: a short word, not \"Show more\"."+ },"@astryx.tabList.label": {"defaultMessage": "Tabs","description": "Screen-reader-only fallback name for a horizontal tab bar. Plural noun; \"Tabs\" here = UI tab panels, not browser tabs or the Tab key."diff --git a/packages/core/src/internal/touch.test.ts b/packages/core/src/internal/touch.test.tsindex 2496d07b82..2036b7baae 100644--- a/packages/core/src/internal/touch.test.ts+++ b/packages/core/src/internal/touch.test.ts@@ -188,6 +188,16 @@ describe('internal/touch', () => {}});+ it("re-exports by name the scroll test Lab's TabBar reads", async () => {+ const entry: Record<string, unknown> = await import('./touch');+ const geometry = await import('../hooks/scrollGeometry');+ // Identity alone passes when both sides are undefined.+ expect(typeof entry.measureLogicalScrollAxis).toBe('function');+ expect(entry.measureLogicalScrollAxis).toBe(+ geometry.measureLogicalScrollAxis,+ );+ });+it('attaches no window or document listeners when it loads', async () => {vi.resetModules();const onWindow = vi.spyOn(window, 'addEventListener');diff --git a/packages/core/src/internal/touch.ts b/packages/core/src/internal/touch.tsindex 17a46322c9..6dbafa0eff 100644--- a/packages/core/src/internal/touch.ts+++ b/packages/core/src/internal/touch.ts@@ -117,3 +117,6 @@ export {touchHitAreaStyles} from './touchHitArea.stylex';// Lab's TabBar tracks its press with the shared action-group tracker.export {useActionGroupTracking} from '../hooks/useActionGroupTracking';export type {ActionGroupTrackingOptions} from '../hooks/useActionGroupTracking';++// Lab's TabBar finds a panel's scroll area with Core's scroll test.+export {measureLogicalScrollAxis} from '../hooks/scrollGeometry';diff --git a/scripts/touch-support-bundle.test.mjs b/scripts/touch-support-bundle.test.mjsindex 898d48e1c5..cb5b91d27e 100644--- a/scripts/touch-support-bundle.test.mjs+++ b/scripts/touch-support-bundle.test.mjs@@ -155,6 +155,7 @@ const LAB_ONLY_NAMES = ['reducedMotionFade','useTouchHitArea','touchHitAreaStyles',+ 'measureLogicalScrollAxis',];/** The inputs matching `pattern` that put bytes in `bytes`. */