@multiplatform.one/components 8.6.0 → 9.0.1
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/README.md +37 -12
- package/dist/cjs/appShell/AppShell.cjs +8 -1
- package/dist/cjs/appShell/AppShell.native.js +8 -1
- package/dist/cjs/appShell/AppShell.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +1 -1
- package/dist/cjs/layouts/page.native.js +1 -1
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/screenScroll.cjs +5 -4
- package/dist/cjs/layouts/screenScroll.native.js +5 -3
- package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
- package/dist/cjs/shared/i18n.cjs +1 -1
- package/dist/cjs/shared/i18n.native.js +1 -1
- package/dist/cjs/shared/i18n.native.js.map +1 -1
- package/dist/esm/appShell/AppShell.mjs +8 -1
- package/dist/esm/appShell/AppShell.mjs.map +1 -1
- package/dist/esm/appShell/AppShell.native.js +8 -1
- package/dist/esm/appShell/AppShell.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +1 -1
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +1 -1
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.mjs +5 -4
- package/dist/esm/layouts/screenScroll.mjs.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js +5 -3
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/shared/i18n.mjs +1 -1
- package/dist/esm/shared/i18n.mjs.map +1 -1
- package/dist/esm/shared/i18n.native.js +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/jsx/Accordion/index.native.js +1 -1
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/Card.native.js.map +1 -1
- package/dist/jsx/CardFooter.native.js.map +1 -1
- package/dist/jsx/CardHeader.native.js.map +1 -1
- package/dist/jsx/Carousel/geometry.native.js.map +1 -1
- package/dist/jsx/Carousel/index.native.js +3 -3
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/ChatTurn/index.native.js.map +1 -1
- package/dist/jsx/CheckGlyph/MenuCheckColumn.native.js.map +1 -1
- package/dist/jsx/CheckGlyph/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/ChoiceChips/index.native.js +1 -1
- package/dist/jsx/ChoiceChips/index.native.js.map +1 -1
- package/dist/jsx/Collapsible.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/CopyField/CopyMenuButton.native.js +1 -1
- package/dist/jsx/CopyField/CopyMenuButton.native.js.map +1 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/Dialog.native.js +1 -1
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/Diff/diff.native.js.map +1 -1
- package/dist/jsx/Diff/index.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DrillStack/DrillBar.native.js.map +1 -1
- package/dist/jsx/DrillStack/context.native.js.map +1 -1
- package/dist/jsx/DrillStack/drillMotion.native.js.map +1 -1
- package/dist/jsx/DropDownPanel/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/jsx/ElapsedProgress/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/Kbd/index.native.js.map +1 -1
- package/dist/jsx/Kbd/keys.native.js.map +1 -1
- package/dist/jsx/Lightbox/MediaControl.native.js.map +1 -1
- package/dist/jsx/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/jsx/Lightbox/index.native.js +1 -1
- package/dist/jsx/Lightbox/shared.native.js.map +1 -1
- package/dist/jsx/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/jsx/MachineLiteral/index.native.js.map +1 -1
- package/dist/jsx/Material/index.native.js.map +1 -1
- package/dist/jsx/Meter/index.native.js +1 -1
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/MiddleEllipsisText/middleSplit.native.js.map +1 -1
- package/dist/jsx/MiddleEllipsisText/types.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +1 -1
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.native.js +1 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/Popover.native.js +1 -1
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/SchemeToggle/index.native.js +1 -1
- package/dist/jsx/SchemeToggle/index.native.js.map +1 -1
- package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/jsx/Separator/index.native.js.map +1 -1
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/jsx/SheetModal/detents.native.js.map +1 -1
- package/dist/jsx/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/jsx/SheetScrollView/index.native.js +1 -1
- package/dist/jsx/SheetScrollView/index.native.js.map +1 -1
- package/dist/jsx/SheetScrollView/sheetHandoff.native.js.map +1 -1
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/SortableList/useUserOrder.native.js.map +1 -1
- package/dist/jsx/SwipeDismissRow/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/Toast/store.native.js.map +1 -1
- package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
- package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +2 -2
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/types.native.js.map +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.native.js +2 -2
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.native.js.map +1 -1
- package/dist/jsx/actions/DangerSection.native.js.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/actions/HeaderActions.native.js +2 -2
- package/dist/jsx/actions/HeaderActions.native.js.map +1 -1
- package/dist/jsx/actions/StandardAction.native.js +1 -1
- package/dist/jsx/actions/StandardAction.native.js.map +1 -1
- package/dist/jsx/actions/devWarn.native.js.map +1 -1
- package/dist/jsx/actions/index.native.js.map +1 -1
- package/dist/jsx/actions/severity.native.js.map +1 -1
- package/dist/jsx/appShell/AppShell.mjs +8 -1
- package/dist/jsx/appShell/AppShell.mjs.map +1 -1
- package/dist/jsx/appShell/AppShell.native.js +9 -2
- package/dist/jsx/appShell/AppShell.native.js.map +1 -1
- package/dist/jsx/appShell/BottomChromeClearance.native.js.map +1 -1
- package/dist/jsx/appShell/Dock.native.js.map +1 -1
- package/dist/jsx/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +1 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js +1 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/appTile.native.js +1 -1
- package/dist/jsx/appShell/appTile.native.js.map +1 -1
- package/dist/jsx/appShell/bottomChrome.native.js.map +1 -1
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/appShell/stackBack.native.js.map +1 -1
- package/dist/jsx/appShell/systemBarFit.native.js.map +1 -1
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +2 -2
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/chartHeight.native.js.map +1 -1
- package/dist/jsx/charts/composeChart.native.js.map +1 -1
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/types.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +8 -8
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/jsx/code/HoldSelect/tapGate.native.js.map +1 -1
- package/dist/jsx/code/LogView.native.js +1 -1
- package/dist/jsx/code/LogView.native.js.map +1 -1
- package/dist/jsx/code/PayloadView/index.native.js +5 -5
- package/dist/jsx/code/PayloadView/index.native.js.map +1 -1
- package/dist/jsx/code/PayloadView/payloadModel.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +7 -7
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +2 -2
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/formLayouts/FormLayouts.native.js +1 -1
- package/dist/jsx/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/jsx/formLayouts/PreferencePanel.native.js +2 -2
- package/dist/jsx/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/jsx/formLayouts/index.native.js.map +1 -1
- package/dist/jsx/hooks/index.native.js +1 -1
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
- package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/images/Image/framing.native.js.map +1 -1
- package/dist/jsx/images/Image/index.native.js +1 -1
- package/dist/jsx/images/Image/mediaRadius.native.js.map +1 -1
- package/dist/jsx/images/Image/shared.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/images/Image/types.native.js.map +1 -1
- package/dist/jsx/images/RemoteArt/index.native.js +1 -1
- package/dist/jsx/images/RemoteArt/remoteArtCache.native.js.map +1 -1
- package/dist/jsx/images/RemoteArt/svgMarkup.native.js.map +1 -1
- package/dist/jsx/images/RemoteArt/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.gnome.native.js +22 -22
- package/dist/jsx/index.gnome.native.js.map +1 -1
- package/dist/jsx/index.native.js +46 -46
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/knobImmuneExports.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +2 -2
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js +1 -1
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/StatusGlyphStrip.native.js +1 -1
- package/dist/jsx/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/asyncFailure.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +2 -2
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/barTitleSpan.native.js.map +1 -1
- package/dist/jsx/layouts/bottomAccessory.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.native.js +3 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +1 -1
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +3 -3
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.mjs +5 -4
- package/dist/jsx/layouts/screenScroll.mjs.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js +5 -3
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -2
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +2 -2
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +1 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/shared/actionScan.native.js.map +1 -1
- package/dist/jsx/shared/i18n.mjs +1 -1
- package/dist/jsx/shared/i18n.mjs.map +1 -1
- package/dist/jsx/shared/i18n.native.js +1 -1
- package/dist/jsx/shared/i18n.native.js.map +1 -1
- package/dist/jsx/shared/restoreRetries.native.js.map +1 -1
- package/dist/jsx/shared/t.native.js.map +1 -1
- package/dist/jsx/shared/textRidesText.native.js.map +1 -1
- package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/jsx/surfaces.native.js +1 -1
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/tamagui.native.js +1 -1
- package/dist/jsx/tamagui.native.js.map +1 -1
- package/dist/jsx/testSetup.native.js.map +1 -1
- package/dist/jsx/utils/unwrapText.native.js.map +1 -1
- package/dist/jsx/views/Calendar.native.js +1 -1
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/CardGrid.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +2 -2
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/FilePreview.native.js +3 -3
- package/dist/jsx/views/FilePreview.native.js.map +1 -1
- package/dist/jsx/views/Gantt.native.js +2 -2
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/ImageGrid.native.js +2 -2
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -1
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/ListGroup.native.js +1 -1
- package/dist/jsx/views/ListGroup.native.js.map +1 -1
- package/dist/jsx/views/ListRow.native.js.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -2
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +2 -2
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/ShortcutCard.native.js.map +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.native.js +1 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
- package/dist/jsx/views/matrixMath.native.js.map +1 -1
- package/dist/jsx/views/sameNameScope.native.js.map +1 -1
- package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
- package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
- package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
- package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
- package/dist/jsx/views/usePageFlowLoadMore.native.js.map +1 -1
- package/dist/jsx/views/widgetChrome.native.js.map +1 -1
- package/package.json +8 -10
- package/src/appShell/AppShell.pushedTitle.spec.tsx +78 -0
- package/src/appShell/AppShell.stories.tsx +22 -3
- package/src/appShell/AppShell.tsx +14 -2
- package/src/layouts/page.tsx +1 -1
- package/src/layouts/screenScroll.tsx +11 -5
- package/src/shared/i18n.ts +7 -11
- package/src/shared/i18nPeers.spec.ts +49 -0
- package/types/appShell/AppShell.d.ts.map +1 -1
- package/types/layouts/screenScroll.d.ts +3 -2
- package/types/layouts/screenScroll.d.ts.map +1 -1
- package/types/shared/i18n.d.ts +6 -9
- package/types/shared/i18n.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","treeViewReveal_exports","treeRevealExpansion","treeRevealOffset","module","exports","nodes","expandedIds","targetId","ancestors","find","find1","items"],"sources":["
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","treeViewReveal_exports","treeRevealExpansion","treeRevealOffset","module","exports","nodes","expandedIds","targetId","ancestors","find","find1","items","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","node","_node_children","id","children","length","push","pop","err","return","every","has","Set","layout","offset","viewportHeight","y","height","Number","isFinite","Math","max"],"sources":["treeViewReveal.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar treeViewReveal_exports = {};\n__export(treeViewReveal_exports, {\n treeRevealExpansion: () => treeRevealExpansion,\n treeRevealOffset: () => treeRevealOffset\n});\nmodule.exports = __toCommonJS(treeViewReveal_exports);\nfunction treeRevealExpansion(nodes, expandedIds, targetId) {\n var ancestors = [];\n var find = function find1(items) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var node = _step.value;\n var _node_children;\n if (node.id === targetId) return true;\n if ((_node_children = node.children) === null || _node_children === void 0 ? void 0 : _node_children.length) {\n ancestors.push(node.id);\n if (find(node.children)) return true;\n ancestors.pop();\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n };\n if (!find(nodes)) return void 0;\n if (ancestors.every(function(id) {\n return expandedIds.has(id);\n })) return expandedIds;\n return /* @__PURE__ */ new Set([\n ...expandedIds,\n ...ancestors\n ]);\n}\nfunction treeRevealOffset(layout, offset, viewportHeight) {\n if (![\n layout.y,\n layout.height,\n offset,\n viewportHeight\n ].every(Number.isFinite) || viewportHeight <= 0 || layout.height <= 0) {\n return void 0;\n }\n if (layout.height > viewportHeight || layout.y < offset) return Math.max(0, layout.y);\n if (layout.y + layout.height > offset + viewportHeight) {\n return Math.max(0, layout.y + layout.height - viewportHeight);\n }\n return offset;\n}\n//# sourceMappingURL=treeViewReveal.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,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A,CAAC+B,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAE;EACxD,IAAI,CAAC,CACHF,MAAM,CAACG,CAAC,EACRH,MAAM,CAACI,MAAM,EACbH,MAAM,EACNC,cAAc,CACf,CAACL,KAAK,CAACQ,MAAM,CAACC,QAAQ,CAAC,IAAIJ,cAAc,IAAI,CAAC,IAAIF,MAAM,CAACI,MAAM,IAAI,CAAC,EAAE;IACrE,OAAO,KAAK,CAAC;EACf;EACA,IAAIJ,MAAM,CAACI,MAAM,GAAGF,cAAc,IAAIF,MAAM,CAACG,CAAC,GAAGF,MAAM,EAAE,OAAOM,IAAI,CAACC,GAAG,CAAC,CAAC,EAAER,MAAM,CAACG,CAAC,CAAC;EACrF,IAAIH,MAAM,CAACG,CAAC,GAAGH,MAAM,CAACI,MAAM,GAAGH,MAAM,GAAGC,cAAc,EAAE;IACtD,OAAOK,IAAI,CAACC,GAAG,CAAC,CAAC,EAAER,MAAM,CAACG,CAAC,GAAGH,MAAM,CAACI,MAAM,GAAGF,cAAc,CAAC;EAC/D;EACA,OAAOD,MAAM;AACf","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","usePageFlowLoadMore_exports","PAGE_FLOW_POLL_MS","usePageFlowLoadMore","module","exports","import_react","require","import_tamagui","param","sentinelRef","enabled","onLoadMore","rearmKey","onLoadMoreRef","useRef","current","width","height","useWindowDimensions","windowRef","live","Boolean","useEffect","isWeb","IntersectionObserver","el"],"sources":["
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","usePageFlowLoadMore_exports","PAGE_FLOW_POLL_MS","usePageFlowLoadMore","module","exports","import_react","require","import_tamagui","param","sentinelRef","enabled","onLoadMore","rearmKey","onLoadMoreRef","useRef","current","width","height","useWindowDimensions","windowRef","live","Boolean","useEffect","isWeb","IntersectionObserver","el","observer","entries","_onLoadMoreRef_current","some","entry","isIntersecting","observe","disconnect","active","inside","timer","setInterval","node","measureInWindow","x","y","w","h","win","now","clearInterval"],"sources":["usePageFlowLoadMore.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar usePageFlowLoadMore_exports = {};\n__export(usePageFlowLoadMore_exports, {\n PAGE_FLOW_POLL_MS: () => PAGE_FLOW_POLL_MS,\n usePageFlowLoadMore: () => usePageFlowLoadMore\n});\nmodule.exports = __toCommonJS(usePageFlowLoadMore_exports);\nvar import_react = require(\"react\");\nvar import_tamagui = require(\"tamagui\");\nvar PAGE_FLOW_POLL_MS = 250;\nfunction usePageFlowLoadMore(param) {\n var { sentinelRef, enabled, onLoadMore, rearmKey } = param;\n var onLoadMoreRef = (0, import_react.useRef)(onLoadMore);\n onLoadMoreRef.current = onLoadMore;\n var { width, height } = (0, import_tamagui.useWindowDimensions)();\n var windowRef = (0, import_react.useRef)({\n width,\n height\n });\n windowRef.current = {\n width,\n height\n };\n var live = enabled && Boolean(onLoadMore);\n (0, import_react.useEffect)(function() {\n if (!live) return;\n if (import_tamagui.isWeb) {\n if (typeof IntersectionObserver === \"undefined\") return;\n var el = sentinelRef.current;\n if (!el) return;\n var observer = new IntersectionObserver(function(entries) {\n var _onLoadMoreRef_current;\n if (entries.some(function(entry) {\n return entry.isIntersecting;\n })) (_onLoadMoreRef_current = onLoadMoreRef.current) === null || _onLoadMoreRef_current === void 0 ? void 0 : _onLoadMoreRef_current.call(onLoadMoreRef);\n });\n observer.observe(el);\n return function() {\n return observer.disconnect();\n };\n }\n var active = true;\n var inside = false;\n var timer = setInterval(function() {\n var node = sentinelRef.current;\n if (typeof (node === null || node === void 0 ? void 0 : node.measureInWindow) !== \"function\") return;\n node.measureInWindow(function(x, y, w, h) {\n var _onLoadMoreRef_current;\n if (!active || w <= 0) return;\n var win = windowRef.current;\n var now = y <= win.height && y + h >= 0 && x < win.width && x + w > 0;\n if (now && !inside) (_onLoadMoreRef_current = onLoadMoreRef.current) === null || _onLoadMoreRef_current === void 0 ? void 0 : _onLoadMoreRef_current.call(onLoadMoreRef);\n inside = now;\n });\n }, PAGE_FLOW_POLL_MS);\n return function() {\n active = false;\n clearInterval(timer);\n };\n }, [\n live,\n rearmKey,\n sentinelRef\n ]);\n}\n//# sourceMappingURL=usePageFlowLoadMore.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,E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defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role"],"sources":["
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role","param","color","radius","children","identity","useChartPalette","single","fill","ink","useReadableTextOn","jsx","YStack","alignItems","justifyContent","backgroundColor","overflow","IconSlot","icon"],"sources":["widgetChrome.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar widgetChrome_exports = {};\n__export(widgetChrome_exports, {\n NestedIconWell: () => NestedIconWell,\n splitNestedControl: () => splitNestedControl,\n useWidgetChrome: () => useWidgetChrome\n});\nmodule.exports = __toCommonJS(widgetChrome_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar import_tamagui = require(\"tamagui\");\nfunction splitNestedControl(nested) {\n var { px, hitSlop, ...box } = nested;\n return {\n px,\n hitSlop,\n box\n };\n}\nfunction useWidgetChrome(onPress) {\n var resolved = (0, import_theme.useResolvedKnobs)();\n var { knobProps, control } = resolved;\n var nested = splitNestedControl(knobProps.nestedControl);\n var interactive = onPress ? {\n cursor: \"pointer\",\n hoverStyle: control.hoverKnobProps,\n pressStyle: control.pressKnobProps,\n focusVisibleStyle: control.focusVisibleKnobProps,\n onPress,\n role: \"button\"\n } : void 0;\n return {\n knobProps,\n control,\n nested,\n interactive\n };\n}\nfunction NestedIconWell(param) {\n var { color, box, px, radius, children } = param;\n var identity = (0, import_theme.useChartPalette)().single;\n var fill = color || identity;\n var ink = (0, import_theme.useReadableTextOn)(fill);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ...box,\n ...radius,\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: fill,\n color: ink,\n overflow: \"hidden\",\n \"data-nested-px\": px,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme.IconSlot, {\n icon: children,\n color: ink\n })\n });\n}\n//# sourceMappingURL=widgetChrome.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;A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AIG,QAAQ;EAC5B,IAAII,GAAG,GAAG,CAAC,CAAC,EAAE7B,YAAY,CAAC8B,iBAAiB,EAAEF,IAAI,CAAC;EACnD,OAAO,eAAgB,CAAC,CAAC,EAAE9B,kBAAkB,CAACiC,GAAG,EAAE9B,cAAc,CAAC+B,MAAM,EAAE;IACxE,GAAG3B,GAAG;IACN,GAAGkB,MAAM;IACTU,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,eAAe,EAAEP,IAAI;IACrBN,KAAK,EAAEO,GAAG;IACVO,QAAQ,EAAE,QAAQ;IAClB,gBAAgB,EAAEjC,EAAE;IACpBqB,QAAQ,EAAE,eAAgB,CAAC,CAAC,EAAE1B,kBAAkB,CAACiC,GAAG,EAAE/B,YAAY,CAACqC,QAAQ,EAAE;MAC3EC,IAAI,EAAEd,QAAQ;MACdF,KAAK,EAAEO;IACT,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@floating-ui/react": "^0.27.20",
|
|
73
|
-
"@multiplatform.one/forms": "^
|
|
74
|
-
"@multiplatform.one/platform": "^
|
|
75
|
-
"@multiplatform.one/theme": "^
|
|
73
|
+
"@multiplatform.one/forms": "^9.0.1",
|
|
74
|
+
"@multiplatform.one/platform": "^9.0.1",
|
|
75
|
+
"@multiplatform.one/theme": "^9.0.1",
|
|
76
76
|
"@phosphor-icons/react": "^2.1.10",
|
|
77
77
|
"@shopify/flash-list": "^2.3.1",
|
|
78
78
|
"@tamagui/colors": "2.7.6",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"tamagui": "2.7.6"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@multiplatform.one/config": "
|
|
103
|
-
"@multiplatform.one/storybook": "
|
|
104
|
-
"@multiplatform.one/test-utils": "
|
|
102
|
+
"@multiplatform.one/config": "9.0.1",
|
|
103
|
+
"@multiplatform.one/storybook": "9.0.1",
|
|
104
|
+
"@multiplatform.one/test-utils": "9.0.1",
|
|
105
105
|
"@tamagui/build": "2.7.6",
|
|
106
106
|
"@testing-library/jest-dom": "^7.0.1",
|
|
107
107
|
"@testing-library/react": "^16.3.3",
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
"expo-video": "*",
|
|
133
133
|
"gray-matter": "^4.0.3",
|
|
134
134
|
"hast-util-to-html": "8.0.4",
|
|
135
|
+
"i18next": ">=25.0.0",
|
|
135
136
|
"moti": "^0.25.3 || ^0.30.0",
|
|
136
137
|
"parse-numeric-range": "^1.3.0",
|
|
137
138
|
"react": "^19.1.0",
|
|
@@ -184,9 +185,6 @@
|
|
|
184
185
|
"parse-numeric-range": {
|
|
185
186
|
"optional": true
|
|
186
187
|
},
|
|
187
|
-
"react-i18next": {
|
|
188
|
-
"optional": true
|
|
189
|
-
},
|
|
190
188
|
"react-native": {
|
|
191
189
|
"optional": true
|
|
192
190
|
},
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { HouseIcon, SparkleIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { cleanup, screen } from "@testing-library/react";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { PageHeader, PushedPage, Screen } from "../layouts/page";
|
|
7
|
+
import { AppShell, type AppShellDestination } from "./AppShell";
|
|
8
|
+
|
|
9
|
+
const size = vi.hoisted(() => ({ value: "compact" as string }));
|
|
10
|
+
vi.mock("@multiplatform.one/theme", async (importOriginal) => ({
|
|
11
|
+
...(await importOriginal<typeof import("@multiplatform.one/theme")>()),
|
|
12
|
+
useLayoutSizeClass: () => size.value,
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
vi.spyOn(Element.prototype, "getBoundingClientRect").mockImplementation(function (this: Element) {
|
|
17
|
+
const bottom = this.tagName === "H1" ? 120 : 0;
|
|
18
|
+
return { top: 0, bottom, left: 0, right: 0, width: 0, height: bottom, x: 0, y: 0 } as DOMRect;
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
afterEach(() => {
|
|
23
|
+
size.value = "compact";
|
|
24
|
+
vi.restoreAllMocks();
|
|
25
|
+
cleanup();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const destinations: AppShellDestination[] = [
|
|
29
|
+
{ key: "/", label: "Home", icon: HouseIcon },
|
|
30
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
function shell(path: string, children: ReactNode) {
|
|
34
|
+
return renderWithProviders(
|
|
35
|
+
<AppShell
|
|
36
|
+
destinations={destinations}
|
|
37
|
+
path={path}
|
|
38
|
+
onNavigate={vi.fn()}
|
|
39
|
+
onBack={vi.fn()}
|
|
40
|
+
title="multiplatform.one"
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</AppShell>,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const barTitle = () =>
|
|
48
|
+
document.querySelector("[data-testid='app-shell-bar-title']") as HTMLElement | null;
|
|
49
|
+
|
|
50
|
+
describe("a pushed page's title in the AppShell bar (LC-270)", () => {
|
|
51
|
+
it("shows the title in the shell bar from rest, as the page heading, with no large title", () => {
|
|
52
|
+
shell(
|
|
53
|
+
"/profile",
|
|
54
|
+
<PushedPage>
|
|
55
|
+
<Screen>
|
|
56
|
+
<PageHeader title="Profile" />
|
|
57
|
+
</Screen>
|
|
58
|
+
</PushedPage>,
|
|
59
|
+
);
|
|
60
|
+
const title = barTitle();
|
|
61
|
+
expect(title?.textContent).toBe("Profile");
|
|
62
|
+
expect(title?.getAttribute("aria-hidden")).not.toBe("true");
|
|
63
|
+
expect(document.querySelector("h1")).toBeNull();
|
|
64
|
+
const heading = screen.getByRole("heading", { name: "Profile", level: 1 });
|
|
65
|
+
expect(title?.contains(heading) || heading === title).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("keeps a root page's large title, with the bar title hidden until it collapses (LC-157)", () => {
|
|
69
|
+
shell(
|
|
70
|
+
"/",
|
|
71
|
+
<Screen>
|
|
72
|
+
<PageHeader title="Welcome" />
|
|
73
|
+
</Screen>,
|
|
74
|
+
);
|
|
75
|
+
expect(screen.getByRole("heading", { name: "Welcome", level: 1 }).tagName).toBe("H1");
|
|
76
|
+
expect(barTitle()?.getAttribute("aria-hidden")).toBe("true");
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -11,7 +11,7 @@ import { useEffect, useState } from "react";
|
|
|
11
11
|
import { XStack, YStack } from "tamagui";
|
|
12
12
|
import { Button } from "@multiplatform.one/forms";
|
|
13
13
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
14
|
-
import { PageBarButton, PageHeader, PageSection, Screen } from "../layouts/page";
|
|
14
|
+
import { PageBarButton, PageHeader, PageSection, PushedPage, Screen } from "../layouts/page";
|
|
15
15
|
import { Pagination } from "../Pagination";
|
|
16
16
|
import { Text } from "../Text";
|
|
17
17
|
import { AppShell, type AppShellDestination } from "./AppShell";
|
|
@@ -184,7 +184,15 @@ function ProfilePage() {
|
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
function StackDemo({
|
|
187
|
+
function StackDemo({
|
|
188
|
+
start,
|
|
189
|
+
push,
|
|
190
|
+
pushedPage,
|
|
191
|
+
}: {
|
|
192
|
+
start: string;
|
|
193
|
+
push?: string;
|
|
194
|
+
pushedPage?: boolean;
|
|
195
|
+
}) {
|
|
188
196
|
const [stack, setStack] = useState([start]);
|
|
189
197
|
const path = stack[stack.length - 1]!;
|
|
190
198
|
useEffect(() => {
|
|
@@ -203,7 +211,13 @@ function StackDemo({ start, push }: { start: string; push?: string }) {
|
|
|
203
211
|
ownChrome={["/backoffice"]}
|
|
204
212
|
>
|
|
205
213
|
{path === "/profile" ? (
|
|
206
|
-
|
|
214
|
+
pushedPage ? (
|
|
215
|
+
<PushedPage>
|
|
216
|
+
<ProfilePage />
|
|
217
|
+
</PushedPage>
|
|
218
|
+
) : (
|
|
219
|
+
<ProfilePage />
|
|
220
|
+
)
|
|
207
221
|
) : (
|
|
208
222
|
<DemoPage path={path} open={open} items={destinations} />
|
|
209
223
|
)}
|
|
@@ -219,6 +233,11 @@ export const AboveTabRoot: Story = {
|
|
|
219
233
|
/** The same route opened cold: back names the first tab and goes there (LC-295). */
|
|
220
234
|
export const ColdDeepLink: Story = { render: () => <StackDemo start="/profile" /> };
|
|
221
235
|
|
|
236
|
+
/** The same route as a PushedPage: on a phone its title rides the shell bar from rest (LC-270). */
|
|
237
|
+
export const PushedPageTitle: Story = {
|
|
238
|
+
render: () => <StackDemo start="/pokemon" push="/profile" pushedPage />,
|
|
239
|
+
};
|
|
240
|
+
|
|
222
241
|
/** A page that hands the shell a bottom accessory: the tab bar floats it above itself. */
|
|
223
242
|
export const WithAccessory: Story = {
|
|
224
243
|
render: () => <Demo initialPath="/pokemon" accessory />,
|
|
@@ -193,6 +193,7 @@ interface NavBarProps {
|
|
|
193
193
|
trailing: ReactNode;
|
|
194
194
|
title: string | null;
|
|
195
195
|
showTitle: boolean;
|
|
196
|
+
heading: boolean;
|
|
196
197
|
scrolled: boolean;
|
|
197
198
|
}
|
|
198
199
|
|
|
@@ -202,7 +203,15 @@ interface NavBarProps {
|
|
|
202
203
|
* title fades in once the page's large title has scrolled away, centred
|
|
203
204
|
* clear of the wider side group, both on the control motion role (LC-68).
|
|
204
205
|
*/
|
|
205
|
-
function AppShellNavBar({
|
|
206
|
+
function AppShellNavBar({
|
|
207
|
+
maxWidth,
|
|
208
|
+
leading,
|
|
209
|
+
trailing,
|
|
210
|
+
title,
|
|
211
|
+
showTitle,
|
|
212
|
+
heading,
|
|
213
|
+
scrolled,
|
|
214
|
+
}: NavBarProps) {
|
|
206
215
|
const { knobProps } = useResolvedKnobs({ component: "ScreenToolbar" });
|
|
207
216
|
const [sides, setSides] = useState({ leading: 0, trailing: 0 });
|
|
208
217
|
const measure = (side: "leading" | "trailing") => (event: LayoutChangeEvent) => {
|
|
@@ -266,6 +275,7 @@ function AppShellNavBar({ maxWidth, leading, trailing, title, showTitle, scrolle
|
|
|
266
275
|
pointerEvents="none"
|
|
267
276
|
aria-hidden={!showTitle}
|
|
268
277
|
data-testid="app-shell-bar-title"
|
|
278
|
+
{...(heading ? { role: "heading" as const, "aria-level": 1 } : null)}
|
|
269
279
|
opacity={showTitle ? 1 : 0}
|
|
270
280
|
{...motion}
|
|
271
281
|
>
|
|
@@ -360,7 +370,8 @@ export function AppShell({
|
|
|
360
370
|
const scrolled = isWeb ? documentScrolled : Boolean(report?.scrolled);
|
|
361
371
|
const largeTitle = report?.title ?? null;
|
|
362
372
|
const barTitle = largeTitle ?? destination?.label ?? null;
|
|
363
|
-
const
|
|
373
|
+
const inlineTitle = Boolean(largeTitle && report?.inlineTitle);
|
|
374
|
+
const showTitle = largeTitle ? inlineTitle || Boolean(report?.collapsed) : Boolean(barTitle);
|
|
364
375
|
const backTo = destination ?? tabs.find((item) => !item.onPress);
|
|
365
376
|
const back =
|
|
366
377
|
(pushed || !destination) && onBack && backTo && !pageBar ? (
|
|
@@ -409,6 +420,7 @@ export function AppShell({
|
|
|
409
420
|
maxWidth={compact ? undefined : READABLE_MAX_WIDTH}
|
|
410
421
|
title={barTitle}
|
|
411
422
|
showTitle={showTitle}
|
|
423
|
+
heading={inlineTitle}
|
|
412
424
|
scrolled={scrolled}
|
|
413
425
|
/>
|
|
414
426
|
) : null;
|
package/src/layouts/page.tsx
CHANGED
|
@@ -312,7 +312,7 @@ function PageShell({
|
|
|
312
312
|
}: ScreenProps) {
|
|
313
313
|
const { knobProps } = useResolvedKnobs({ component: "Screen" });
|
|
314
314
|
const scrollState = useScreenScrollController();
|
|
315
|
-
useReportScreenScroll(scrollState.state, Boolean(topBar));
|
|
315
|
+
useReportScreenScroll(scrollState.state, Boolean(topBar), useInlinePageTitle());
|
|
316
316
|
const [accessories] = useState(createBottomAccessoryStore);
|
|
317
317
|
const inset = noPadding ? null : (knobProps.panelPadding.padding as string);
|
|
318
318
|
const cap = maxWidth && !bleed ? maxWidth : null;
|
|
@@ -319,10 +319,11 @@ export function useTopBarSlot(): TopBarSlotValue | null {
|
|
|
319
319
|
* What the outermost Screen under an app shell tells the shell's nav bar
|
|
320
320
|
* (LC-157 under `AppShell`): its scroll state, and whether the page pins a
|
|
321
321
|
* top bar of its own, in which case that bar is the nav bar and the shell
|
|
322
|
-
* draws none.
|
|
322
|
+
* draws none, and whether its title rides the bar from rest (LC-270).
|
|
323
323
|
*/
|
|
324
324
|
export interface ShellScrollReport extends ScreenScrollState {
|
|
325
325
|
ownTopBar: boolean;
|
|
326
|
+
inlineTitle: boolean;
|
|
326
327
|
}
|
|
327
328
|
|
|
328
329
|
type ShellScrollReporter = (id: string, report: ShellScrollReport | null) => void;
|
|
@@ -343,7 +344,8 @@ export function useShellScrollReports(): {
|
|
|
343
344
|
prev.report.scrolled === report.scrolled &&
|
|
344
345
|
prev.report.collapsed === report.collapsed &&
|
|
345
346
|
prev.report.title === report.title &&
|
|
346
|
-
prev.report.ownTopBar === report.ownTopBar
|
|
347
|
+
prev.report.ownTopBar === report.ownTopBar &&
|
|
348
|
+
prev.report.inlineTitle === report.inlineTitle
|
|
347
349
|
) {
|
|
348
350
|
return prev;
|
|
349
351
|
}
|
|
@@ -371,15 +373,19 @@ export function ShellScrollReportScope({
|
|
|
371
373
|
* The Screen's half: the outermost Screen under a shell reports its state;
|
|
372
374
|
* a Screen nested in another stays quiet, so the page's own wins.
|
|
373
375
|
*/
|
|
374
|
-
export function useReportScreenScroll(
|
|
376
|
+
export function useReportScreenScroll(
|
|
377
|
+
state: ScreenScrollState,
|
|
378
|
+
ownTopBar: boolean,
|
|
379
|
+
inlineTitle = false,
|
|
380
|
+
) {
|
|
375
381
|
const reporter = useContext(ShellScrollReportContext);
|
|
376
382
|
const nested = useContext(ScreenScrollActionsContext) !== null;
|
|
377
383
|
const id = useId();
|
|
378
384
|
const live = reporter && !nested ? reporter : null;
|
|
379
385
|
const { scrolled, collapsed, title } = state;
|
|
380
386
|
useEffect(() => {
|
|
381
|
-
live?.(id, { scrolled, collapsed, title, ownTopBar });
|
|
382
|
-
}, [live, id, scrolled, collapsed, title, ownTopBar]);
|
|
387
|
+
live?.(id, { scrolled, collapsed, title, ownTopBar, inlineTitle });
|
|
388
|
+
}, [live, id, scrolled, collapsed, title, ownTopBar, inlineTitle]);
|
|
383
389
|
useEffect(() => {
|
|
384
390
|
if (!live) return;
|
|
385
391
|
return () => live(id, null);
|
package/src/shared/i18n.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import * as ReactI18next from "react-i18next";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* react-i18next is
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Every catalog usage routes through this namespace access instead, so
|
|
11
|
-
* omission stays warning-free for tree-shakers and fails loudly — naming the
|
|
12
|
-
* package and the fix — the moment an i18n-using component actually renders.
|
|
4
|
+
* react-i18next is a required peer. When an app leaves it out anyway, the
|
|
5
|
+
* bundler can substitute an empty stub for the package, and direct named
|
|
6
|
+
* imports would then surface as cryptic MISSING_EXPORT failures far from the
|
|
7
|
+
* cause. Route every usage through this namespace access instead, so the
|
|
8
|
+
* omission fails loudly, naming the package and the fix, the moment an
|
|
9
|
+
* i18n-using component actually renders.
|
|
13
10
|
*/
|
|
14
11
|
export const useTranslation = ((...args: unknown[]) => {
|
|
15
12
|
const impl = (ReactI18next as { useTranslation?: (...args: unknown[]) => unknown })
|
|
@@ -18,8 +15,7 @@ export const useTranslation = ((...args: unknown[]) => {
|
|
|
18
15
|
throw new Error(
|
|
19
16
|
"[@multiplatform.one/components] react-i18next is not installed, but a component that " +
|
|
20
17
|
"translates its built-in copy was rendered. Add react-i18next and i18next to your " +
|
|
21
|
-
"app's dependencies
|
|
22
|
-
"components can omit them).",
|
|
18
|
+
"app's dependencies.",
|
|
23
19
|
);
|
|
24
20
|
}
|
|
25
21
|
return impl(...args);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { renderHook } from "@testing-library/react";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
5
|
+
|
|
6
|
+
const manifest = JSON.parse(
|
|
7
|
+
readFileSync(join(import.meta.dirname, "..", "..", "package.json"), "utf8"),
|
|
8
|
+
) as {
|
|
9
|
+
dependencies?: Record<string, string>;
|
|
10
|
+
peerDependencies?: Record<string, string>;
|
|
11
|
+
peerDependenciesMeta?: Record<string, { optional?: boolean }>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// FZ-10637, FZ-1854. components translates its built-in copy through react-i18next on
|
|
15
|
+
// every render, so the i18n pair is a required peer. Listed as optional it
|
|
16
|
+
// left a host to find out from a failed bundle.
|
|
17
|
+
describe("the i18n peers components translates through", () => {
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
vi.doUnmock("react-i18next");
|
|
20
|
+
vi.resetModules();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("declares i18next and react-i18next as required peers, never as dependencies", () => {
|
|
24
|
+
for (const name of ["i18next", "react-i18next"]) {
|
|
25
|
+
expect(manifest.dependencies ?? {}).not.toHaveProperty(name);
|
|
26
|
+
expect(manifest.peerDependencies).toHaveProperty(name);
|
|
27
|
+
expect(manifest.peerDependenciesMeta?.[name]?.optional).not.toBe(true);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("accepts the i18next majors react-i18next 16 and 17 run on", () => {
|
|
32
|
+
expect(manifest.peerDependencies?.i18next).toBe(">=25.0.0");
|
|
33
|
+
expect(manifest.peerDependencies?.["react-i18next"]).toBe(">=14");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("translates built-in copy with the host's react-i18next", async () => {
|
|
37
|
+
const { useTranslation } = await import("./i18n");
|
|
38
|
+
const { result } = renderHook(() => useTranslation());
|
|
39
|
+
expect(result.current.t("Close")).toBe("Close");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("names the packages to install when an app leaves them out", async () => {
|
|
43
|
+
vi.doMock("react-i18next", () => ({ useTranslation: undefined }));
|
|
44
|
+
const { useTranslation } = await import("./i18n");
|
|
45
|
+
expect(() => useTranslation()).toThrow(
|
|
46
|
+
/react-i18next is not installed.*Add react-i18next and i18next to your app's dependencies\./s,
|
|
47
|
+
);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/appShell/AppShell.tsx"],"names":[],"mappings":"AAkCA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAepF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMvD,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,uEAAuE;IACvE,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IACnD;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B,gEAA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AG,SAAS,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAQnE;AA2KD,wBAAgB,QAAQ,CAAC,EACvB,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,SAAS,EACT,SAAc,EACd,QAAQ,EACR,MAAoB,GACrB,EAAE,aAAa,2CAuOf"}
|
|
@@ -118,10 +118,11 @@ export declare function useTopBarSlot(): TopBarSlotValue | null;
|
|
|
118
118
|
* What the outermost Screen under an app shell tells the shell's nav bar
|
|
119
119
|
* (LC-157 under `AppShell`): its scroll state, and whether the page pins a
|
|
120
120
|
* top bar of its own, in which case that bar is the nav bar and the shell
|
|
121
|
-
* draws none.
|
|
121
|
+
* draws none, and whether its title rides the bar from rest (LC-270).
|
|
122
122
|
*/
|
|
123
123
|
export interface ShellScrollReport extends ScreenScrollState {
|
|
124
124
|
ownTopBar: boolean;
|
|
125
|
+
inlineTitle: boolean;
|
|
125
126
|
}
|
|
126
127
|
type ShellScrollReporter = (id: string, report: ShellScrollReport | null) => void;
|
|
127
128
|
/** The shell's half: the latest report, and the scope its content sits in. */
|
|
@@ -137,7 +138,7 @@ export declare function ShellScrollReportScope({ reporter, children, }: {
|
|
|
137
138
|
* The Screen's half: the outermost Screen under a shell reports its state;
|
|
138
139
|
* a Screen nested in another stays quiet, so the page's own wins.
|
|
139
140
|
*/
|
|
140
|
-
export declare function useReportScreenScroll(state: ScreenScrollState, ownTopBar: boolean): void;
|
|
141
|
+
export declare function useReportScreenScroll(state: ScreenScrollState, ownTopBar: boolean, inlineTitle?: boolean): void;
|
|
141
142
|
/**
|
|
142
143
|
* A nested Screen's content scrolls in its parent's scroll view, so it reads
|
|
143
144
|
* the parent's scroll actions, but its own large title stays a heading in the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenScroll.d.ts","sourceRoot":"","sources":["../../src/layouts/screenScroll.tsx"],"names":[],"mappings":"AAAA;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9E,wBAAgB,qBAAqB,IAAI;IACvC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,mBAAmB,CAAC;CAC/B,CAmBA;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAMA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,OAAO,EAClB,WAAW,UAAQ,QAcpB;AAKD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAatE"}
|
package/types/shared/i18n.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as ReactI18next from "react-i18next";
|
|
2
2
|
/**
|
|
3
|
-
* react-i18next is
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Every catalog usage routes through this namespace access instead, so
|
|
10
|
-
* omission stays warning-free for tree-shakers and fails loudly — naming the
|
|
11
|
-
* package and the fix — the moment an i18n-using component actually renders.
|
|
3
|
+
* react-i18next is a required peer. When an app leaves it out anyway, the
|
|
4
|
+
* bundler can substitute an empty stub for the package, and direct named
|
|
5
|
+
* imports would then surface as cryptic MISSING_EXPORT failures far from the
|
|
6
|
+
* cause. Route every usage through this namespace access instead, so the
|
|
7
|
+
* omission fails loudly, naming the package and the fix, the moment an
|
|
8
|
+
* i18n-using component actually renders.
|
|
12
9
|
*/
|
|
13
10
|
export declare const useTranslation: typeof ReactI18next.useTranslation;
|
|
14
11
|
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/shared/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/shared/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAWrB,OAAO,YAAY,CAAC,cAAc,CAAC"}
|