@multiplatform.one/components 9.0.0 → 9.0.2
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/cjs/DropdownMenu/index.cjs +44 -25
- package/dist/cjs/DropdownMenu/index.native.js +42 -21
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +4 -3
- package/dist/cjs/appShell/AppShell.cjs +21 -9
- package/dist/cjs/appShell/AppShell.native.js +21 -9
- package/dist/cjs/appShell/AppShell.native.js.map +1 -1
- package/dist/cjs/code/PayloadView/index.cjs +4 -1
- package/dist/cjs/code/PayloadView/index.native.js +4 -1
- package/dist/cjs/code/PayloadView/index.native.js.map +1 -1
- package/dist/cjs/images/RemoteArt/index.native.js +3 -1
- package/dist/cjs/images/RemoteArt/index.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.cjs +9 -8
- package/dist/cjs/layouts/AsyncBoundary.native.js +9 -8
- package/dist/cjs/layouts/AsyncBoundary.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/views/Dashboard.cjs +5 -1
- package/dist/cjs/views/Dashboard.native.js +3 -1
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/ListGroup.cjs +2 -2
- package/dist/cjs/views/ListGroup.native.js +8 -6
- package/dist/cjs/views/ListGroup.native.js.map +1 -1
- package/dist/cjs/views/ListRow.cjs +2 -1
- package/dist/cjs/views/ListRow.native.js +2 -1
- package/dist/cjs/views/ListRow.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +44 -25
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +42 -21
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +4 -3
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/appShell/AppShell.mjs +21 -9
- package/dist/esm/appShell/AppShell.mjs.map +1 -1
- package/dist/esm/appShell/AppShell.native.js +21 -9
- package/dist/esm/appShell/AppShell.native.js.map +1 -1
- package/dist/esm/code/PayloadView/index.mjs +4 -1
- package/dist/esm/code/PayloadView/index.mjs.map +1 -1
- package/dist/esm/code/PayloadView/index.native.js +4 -1
- package/dist/esm/code/PayloadView/index.native.js.map +1 -1
- package/dist/esm/images/RemoteArt/index.native.js +3 -1
- package/dist/esm/images/RemoteArt/index.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.mjs +9 -8
- package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js +9 -8
- package/dist/esm/layouts/AsyncBoundary.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/views/Dashboard.mjs +5 -1
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +3 -1
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/ListGroup.mjs +3 -3
- package/dist/esm/views/ListGroup.mjs.map +1 -1
- package/dist/esm/views/ListGroup.native.js +9 -7
- package/dist/esm/views/ListGroup.native.js.map +1 -1
- package/dist/esm/views/ListRow.mjs +2 -1
- package/dist/esm/views/ListRow.mjs.map +1 -1
- package/dist/esm/views/ListRow.native.js +2 -1
- package/dist/esm/views/ListRow.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.mjs +44 -25
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +42 -21
- 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/index.mjs +4 -3
- package/dist/jsx/SheetModal/index.mjs.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 +21 -9
- package/dist/jsx/appShell/AppShell.mjs.map +1 -1
- package/dist/jsx/appShell/AppShell.native.js +22 -10
- 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.mjs +4 -1
- package/dist/jsx/code/PayloadView/index.mjs.map +1 -1
- package/dist/jsx/code/PayloadView/index.native.js +9 -6
- 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 +4 -2
- package/dist/jsx/images/RemoteArt/index.native.js.map +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.mjs +9 -8
- package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +11 -10
- 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.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.mjs +5 -1
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +5 -3
- 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.mjs +3 -3
- package/dist/jsx/views/ListGroup.mjs.map +1 -1
- package/dist/jsx/views/ListGroup.native.js +9 -7
- package/dist/jsx/views/ListGroup.native.js.map +1 -1
- package/dist/jsx/views/ListRow.mjs +2 -1
- package/dist/jsx/views/ListRow.mjs.map +1 -1
- package/dist/jsx/views/ListRow.native.js +2 -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 +7 -7
- package/src/DropdownMenu/index.tsx +39 -26
- package/src/SheetModal/index.tsx +2 -1
- package/src/SwipeDismissRow/SwipeDismissRow.stories.tsx +2 -1
- package/src/appShell/AppShell.pushedTitle.spec.tsx +78 -0
- package/src/appShell/AppShell.stories.tsx +23 -7
- package/src/appShell/AppShell.tsx +21 -7
- package/src/code/PayloadView/index.tsx +4 -2
- package/src/images/RemoteArt/index.native.tsx +1 -1
- package/src/layouts/AsyncBoundary.tsx +9 -5
- package/src/layouts/page.tsx +1 -1
- package/src/layouts/screenScroll.tsx +11 -5
- package/src/views/Dashboard.tsx +5 -9
- package/src/views/ListGroup.stories.tsx +1 -1
- package/src/views/ListGroup.tsx +13 -2
- package/src/views/ListRow.tsx +2 -1
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/appShell/AppShell.d.ts.map +1 -1
- package/types/layouts/AsyncBoundary.d.ts.map +1 -1
- package/types/layouts/screenScroll.d.ts +3 -2
- package/types/layouts/screenScroll.d.ts.map +1 -1
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/ListGroup.d.ts.map +1 -1
- package/types/views/ListRow.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,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YA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C,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,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,E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AGC,WAAW,CAAC,YAAW;MACjC,IAAIC,IAAI,GAAG7B,WAAW,CAACM,OAAO;MAC9B,IAAI,QAAQuB,IAAI,KAAK,IAAI,IAAIA,IAAI,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,IAAI,CAACC,eAAe,CAAC,KAAK,UAAU,EAAE;MAC9FD,IAAI,CAACC,eAAe,CAAC,UAASC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAE;QACxC,IAAIf,sBAAsB;QAC1B,IAAI,CAACM,MAAM,IAAIQ,CAAC,IAAI,CAAC,EAAE;QACvB,IAAIE,GAAG,GAAGzB,SAAS,CAACJ,OAAO;QAC3B,IAAI8B,GAAG,GAAGJ,CAAC,IAAIG,GAAG,CAAC3B,MAAM,IAAIwB,CAAC,GAAGE,CAAC,IAAI,CAAC,IAAIH,CAAC,GAAGI,GAAG,CAAC5B,KAAK,IAAIwB,CAAC,GAAGE,CAAC,GAAG,CAAC;QACrE,IAAIG,GAAG,IAAI,CAACV,MAAM,EAAE,CAACP,sBAAsB,GAAGf,aAAa,CAACE,OAAO,MAAM,IAAI,IAAIa,sBAAsB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,sBAAsB,CAAChC,IAAI,CAACiB,aAAa,CAAC;QACxKsB,MAAM,GAAGU,GAAG;MACd,CAAC,CAAC;IACJ,CAAC,EAAE5C,iBAAiB,CAAC;IACrB,OAAO,YAAW;MAChBiC,MAAM,GAAG,KAAK;MACdY,aAAa,CAACV,KAAK,CAAC;IACtB,CAAC;EACH,CAAC,EAAE,CACDhB,IAAI,EACJR,QAAQ,EACRH,WAAW,CACZ,CAAC;AACJ","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","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;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAA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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": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
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": "^9.0.
|
|
74
|
-
"@multiplatform.one/platform": "^9.0.
|
|
75
|
-
"@multiplatform.one/theme": "^9.0.
|
|
73
|
+
"@multiplatform.one/forms": "^9.0.2",
|
|
74
|
+
"@multiplatform.one/platform": "^9.0.2",
|
|
75
|
+
"@multiplatform.one/theme": "^9.0.2",
|
|
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": "9.0.
|
|
103
|
-
"@multiplatform.one/storybook": "9.0.
|
|
104
|
-
"@multiplatform.one/test-utils": "9.0.
|
|
102
|
+
"@multiplatform.one/config": "9.0.2",
|
|
103
|
+
"@multiplatform.one/storybook": "9.0.2",
|
|
104
|
+
"@multiplatform.one/test-utils": "9.0.2",
|
|
105
105
|
"@tamagui/build": "2.7.6",
|
|
106
106
|
"@testing-library/jest-dom": "^7.0.1",
|
|
107
107
|
"@testing-library/react": "^16.3.3",
|
|
@@ -375,10 +375,15 @@ function decorateTrigger(
|
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
function renderEntries(items: DropdownMenuEntry[]): ReactNode[] {
|
|
378
|
-
return items.map((entry, index) =>
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
return items.map((entry, index) => renderEntry(entry, index));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function renderEntry(entry: DropdownMenuEntry, index: number): ReactNode {
|
|
382
|
+
if ("separator" in entry && entry.separator) {
|
|
383
|
+
return <DropdownMenuSeparator key={`separator-${index}`} />;
|
|
384
|
+
}
|
|
385
|
+
if ((entry as DropdownMenuItemSpec).items) {
|
|
386
|
+
return (
|
|
382
387
|
<DropdownMenuSub
|
|
383
388
|
key={(entry as DropdownMenuItemSpec).key ?? index}
|
|
384
389
|
stayOnPick={(entry as DropdownMenuItemSpec).stayOnPick}
|
|
@@ -395,7 +400,10 @@ function renderEntries(items: DropdownMenuEntry[]): ReactNode[] {
|
|
|
395
400
|
{renderEntries((entry as DropdownMenuItemSpec).items!)}
|
|
396
401
|
</DropdownMenuSubContent>
|
|
397
402
|
</DropdownMenuSub>
|
|
398
|
-
)
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
if ("checked" in entry && (entry as DropdownMenuItemSpec).checked !== undefined) {
|
|
406
|
+
return (
|
|
399
407
|
<DropdownMenuCheckboxItem
|
|
400
408
|
key={(entry as DropdownMenuItemSpec).key ?? index}
|
|
401
409
|
checked={(entry as DropdownMenuItemSpec).checked!}
|
|
@@ -409,20 +417,21 @@ function renderEntries(items: DropdownMenuEntry[]): ReactNode[] {
|
|
|
409
417
|
>
|
|
410
418
|
{(entry as DropdownMenuItemSpec).label}
|
|
411
419
|
</DropdownMenuCheckboxItem>
|
|
412
|
-
)
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
return (
|
|
423
|
+
<DropdownMenuItem
|
|
424
|
+
key={(entry as DropdownMenuItemSpec).key ?? index}
|
|
425
|
+
icon={(entry as DropdownMenuItemSpec).icon}
|
|
426
|
+
shortcut={(entry as DropdownMenuItemSpec).shortcut}
|
|
427
|
+
disabled={(entry as DropdownMenuItemSpec).disabled}
|
|
428
|
+
disabledReason={(entry as DropdownMenuItemSpec).disabledReason}
|
|
429
|
+
destructive={(entry as DropdownMenuItemSpec).destructive}
|
|
430
|
+
closeOnSelect={(entry as DropdownMenuItemSpec).closeOnSelect}
|
|
431
|
+
onSelect={(entry as DropdownMenuItemSpec).onSelect}
|
|
432
|
+
>
|
|
433
|
+
{(entry as DropdownMenuItemSpec).label}
|
|
434
|
+
</DropdownMenuItem>
|
|
426
435
|
);
|
|
427
436
|
}
|
|
428
437
|
|
|
@@ -679,6 +688,11 @@ function DropdownMenuContent({ children }: DropdownMenuContentProps) {
|
|
|
679
688
|
return <>{children}</>;
|
|
680
689
|
}
|
|
681
690
|
|
|
691
|
+
function menuLabel(levelTitle: string | undefined, ariaLabel: string | undefined) {
|
|
692
|
+
if (levelTitle) return { "aria-label": levelTitle };
|
|
693
|
+
return ariaLabel ? { "aria-label": ariaLabel } : {};
|
|
694
|
+
}
|
|
695
|
+
|
|
682
696
|
function DropdownMenuList({
|
|
683
697
|
children,
|
|
684
698
|
maxHeight,
|
|
@@ -835,11 +849,7 @@ function DropdownMenuList({
|
|
|
835
849
|
<YStack
|
|
836
850
|
ref={innerRef}
|
|
837
851
|
role="menu"
|
|
838
|
-
{...(levelTitle
|
|
839
|
-
? { "aria-label": levelTitle }
|
|
840
|
-
: ariaLabel
|
|
841
|
-
? { "aria-label": ariaLabel }
|
|
842
|
-
: {})}
|
|
852
|
+
{...menuLabel(levelTitle, ariaLabel)}
|
|
843
853
|
data-dismiss-class="commit"
|
|
844
854
|
data-mp-width-mode="at-least-trigger"
|
|
845
855
|
width="100%"
|
|
@@ -1193,6 +1203,10 @@ function subTitle(children: ReactNode): ReactNode {
|
|
|
1193
1203
|
return null;
|
|
1194
1204
|
}
|
|
1195
1205
|
|
|
1206
|
+
function levelFace(ctx: DropdownMenuContextValue, id: string): "level" | null {
|
|
1207
|
+
return ctx.levels.some((level) => level.id === id) ? "level" : null;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1196
1210
|
/**
|
|
1197
1211
|
* A row that drills into its own level in the same panel (LC-282), the iOS
|
|
1198
1212
|
* UIMenu submenu. Nest Subs for deeper levels.
|
|
@@ -1203,8 +1217,7 @@ function DropdownMenuSub({ children, stayOnPick = false }: DropdownMenuSubProps)
|
|
|
1203
1217
|
const id = useId();
|
|
1204
1218
|
const title = subTitle(children);
|
|
1205
1219
|
const active = activeLevelId(ctx);
|
|
1206
|
-
const face: SubContextValue["face"] | null =
|
|
1207
|
-
active === owner ? "trigger" : ctx.levels.some((level) => level.id === id) ? "level" : null;
|
|
1220
|
+
const face: SubContextValue["face"] | null = active === owner ? "trigger" : levelFace(ctx, id);
|
|
1208
1221
|
const sub = useMemo<SubContextValue | null>(
|
|
1209
1222
|
() => (face ? { id, title, stayOnPick, face } : null),
|
|
1210
1223
|
[face, id, title, stayOnPick],
|
package/src/SheetModal/index.tsx
CHANGED
|
@@ -188,6 +188,7 @@ export function SheetModal({
|
|
|
188
188
|
useSheetFrameFocus(open, frameRef);
|
|
189
189
|
useSheetEscapeDismiss(open, () => onOpenChange(false));
|
|
190
190
|
useBandDismiss(open && regular, frameRef, () => onOpenChange(false));
|
|
191
|
+
const flushHeader = flush ? { paddingHorizontal: knobProps.panelPadding.padding } : null;
|
|
191
192
|
|
|
192
193
|
return (
|
|
193
194
|
<Sheet
|
|
@@ -240,7 +241,7 @@ export function SheetModal({
|
|
|
240
241
|
<View
|
|
241
242
|
id={overlayHeader || headerActions ? undefined : titleId}
|
|
242
243
|
{...(fill ? nonShrinking : null)}
|
|
243
|
-
{...
|
|
244
|
+
{...flushHeader}
|
|
244
245
|
>
|
|
245
246
|
<OverlayTitleIdContext.Provider value={overlayHeader ? titleId : undefined}>
|
|
246
247
|
{header}
|
|
@@ -30,6 +30,7 @@ const seed = [
|
|
|
30
30
|
|
|
31
31
|
function Demo({ caught }: { caught?: boolean }) {
|
|
32
32
|
const [items, setItems] = useState(seed);
|
|
33
|
+
const dismiss = (id: string) => setItems((all) => all.filter((x) => x.id !== id));
|
|
33
34
|
return (
|
|
34
35
|
<YStack width="100%">
|
|
35
36
|
<ListGroup variant="plain" aria-label="Needs you">
|
|
@@ -37,7 +38,7 @@ function Demo({ caught }: { caught?: boolean }) {
|
|
|
37
38
|
<SwipeDismissRow
|
|
38
39
|
key={item.id}
|
|
39
40
|
swipeProgress={caught && index === 0 ? 0.35 : undefined}
|
|
40
|
-
onDismiss={() =>
|
|
41
|
+
onDismiss={() => dismiss(item.id)}
|
|
41
42
|
>
|
|
42
43
|
<ListGroupItem onPress={() => {}}>
|
|
43
44
|
<ListRow
|
|
@@ -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,13 +184,28 @@ 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(() => {
|
|
191
199
|
if (push) setStack((prev) => [...prev, push]);
|
|
192
200
|
}, [push]);
|
|
193
201
|
const open = (next: string) => setStack((prev) => [...prev, next]);
|
|
202
|
+
const profile = pushedPage ? (
|
|
203
|
+
<PushedPage>
|
|
204
|
+
<ProfilePage />
|
|
205
|
+
</PushedPage>
|
|
206
|
+
) : (
|
|
207
|
+
<ProfilePage />
|
|
208
|
+
);
|
|
194
209
|
return (
|
|
195
210
|
<AppShell
|
|
196
211
|
destinations={destinations}
|
|
@@ -202,11 +217,7 @@ function StackDemo({ start, push }: { start: string; push?: string }) {
|
|
|
202
217
|
actions={<PageBarButton aria-label="Theme" icon={GearIcon} edge="end" />}
|
|
203
218
|
ownChrome={["/backoffice"]}
|
|
204
219
|
>
|
|
205
|
-
{path === "/profile" ?
|
|
206
|
-
<ProfilePage />
|
|
207
|
-
) : (
|
|
208
|
-
<DemoPage path={path} open={open} items={destinations} />
|
|
209
|
-
)}
|
|
220
|
+
{path === "/profile" ? profile : <DemoPage path={path} open={open} items={destinations} />}
|
|
210
221
|
</AppShell>
|
|
211
222
|
);
|
|
212
223
|
}
|
|
@@ -219,6 +230,11 @@ export const AboveTabRoot: Story = {
|
|
|
219
230
|
/** The same route opened cold: back names the first tab and goes there (LC-295). */
|
|
220
231
|
export const ColdDeepLink: Story = { render: () => <StackDemo start="/profile" /> };
|
|
221
232
|
|
|
233
|
+
/** The same route as a PushedPage: on a phone its title rides the shell bar from rest (LC-270). */
|
|
234
|
+
export const PushedPageTitle: Story = {
|
|
235
|
+
render: () => <StackDemo start="/pokemon" push="/profile" pushedPage />,
|
|
236
|
+
};
|
|
237
|
+
|
|
222
238
|
/** A page that hands the shell a bottom accessory: the tab bar floats it above itself. */
|
|
223
239
|
export const WithAccessory: Story = {
|
|
224
240
|
render: () => <Demo initialPath="/pokemon" accessory />,
|
|
@@ -159,6 +159,11 @@ function useDocumentScrolled(enabled: boolean): boolean {
|
|
|
159
159
|
const sticky = (edge: "top" | "bottom") =>
|
|
160
160
|
isWeb ? { position: "sticky" as const, [edge]: 0, zIndex: zIndex.stickyHeader } : null;
|
|
161
161
|
|
|
162
|
+
function frameHeight(ownsChrome: boolean) {
|
|
163
|
+
if (ownsChrome) return { minHeight: 0, ...(isWeb ? { height: "100dvh" as never } : null) };
|
|
164
|
+
return isWeb ? { minHeight: "100dvh" as never } : null;
|
|
165
|
+
}
|
|
166
|
+
|
|
162
167
|
function HomeControl({
|
|
163
168
|
title,
|
|
164
169
|
onPress,
|
|
@@ -193,6 +198,7 @@ interface NavBarProps {
|
|
|
193
198
|
trailing: ReactNode;
|
|
194
199
|
title: string | null;
|
|
195
200
|
showTitle: boolean;
|
|
201
|
+
heading: boolean;
|
|
196
202
|
scrolled: boolean;
|
|
197
203
|
}
|
|
198
204
|
|
|
@@ -202,7 +208,15 @@ interface NavBarProps {
|
|
|
202
208
|
* title fades in once the page's large title has scrolled away, centred
|
|
203
209
|
* clear of the wider side group, both on the control motion role (LC-68).
|
|
204
210
|
*/
|
|
205
|
-
function AppShellNavBar({
|
|
211
|
+
function AppShellNavBar({
|
|
212
|
+
maxWidth,
|
|
213
|
+
leading,
|
|
214
|
+
trailing,
|
|
215
|
+
title,
|
|
216
|
+
showTitle,
|
|
217
|
+
heading,
|
|
218
|
+
scrolled,
|
|
219
|
+
}: NavBarProps) {
|
|
206
220
|
const { knobProps } = useResolvedKnobs({ component: "ScreenToolbar" });
|
|
207
221
|
const [sides, setSides] = useState({ leading: 0, trailing: 0 });
|
|
208
222
|
const measure = (side: "leading" | "trailing") => (event: LayoutChangeEvent) => {
|
|
@@ -211,6 +225,7 @@ function AppShellNavBar({ maxWidth, leading, trailing, title, showTitle, scrolle
|
|
|
211
225
|
};
|
|
212
226
|
const motion = transitionProps(knobProps.motion.control);
|
|
213
227
|
const clearance = Math.max(sides.leading, sides.trailing);
|
|
228
|
+
const headingProps = heading ? { role: "heading" as const, "aria-level": 1 } : null;
|
|
214
229
|
return (
|
|
215
230
|
<Surface bar>
|
|
216
231
|
<YStack
|
|
@@ -266,6 +281,7 @@ function AppShellNavBar({ maxWidth, leading, trailing, title, showTitle, scrolle
|
|
|
266
281
|
pointerEvents="none"
|
|
267
282
|
aria-hidden={!showTitle}
|
|
268
283
|
data-testid="app-shell-bar-title"
|
|
284
|
+
{...headingProps}
|
|
269
285
|
opacity={showTitle ? 1 : 0}
|
|
270
286
|
{...motion}
|
|
271
287
|
>
|
|
@@ -360,7 +376,8 @@ export function AppShell({
|
|
|
360
376
|
const scrolled = isWeb ? documentScrolled : Boolean(report?.scrolled);
|
|
361
377
|
const largeTitle = report?.title ?? null;
|
|
362
378
|
const barTitle = largeTitle ?? destination?.label ?? null;
|
|
363
|
-
const
|
|
379
|
+
const inlineTitle = Boolean(largeTitle && report?.inlineTitle);
|
|
380
|
+
const showTitle = largeTitle ? inlineTitle || Boolean(report?.collapsed) : Boolean(barTitle);
|
|
364
381
|
const backTo = destination ?? tabs.find((item) => !item.onPress);
|
|
365
382
|
const back =
|
|
366
383
|
(pushed || !destination) && onBack && backTo && !pageBar ? (
|
|
@@ -409,6 +426,7 @@ export function AppShell({
|
|
|
409
426
|
maxWidth={compact ? undefined : READABLE_MAX_WIDTH}
|
|
410
427
|
title={barTitle}
|
|
411
428
|
showTitle={showTitle}
|
|
429
|
+
heading={inlineTitle}
|
|
412
430
|
scrolled={scrolled}
|
|
413
431
|
/>
|
|
414
432
|
) : null;
|
|
@@ -514,11 +532,7 @@ export function AppShell({
|
|
|
514
532
|
flex={1}
|
|
515
533
|
flexDirection={compact || ownsChrome ? "column" : "row"}
|
|
516
534
|
backgroundColor="$background"
|
|
517
|
-
{...(ownsChrome
|
|
518
|
-
? { minHeight: 0, ...(isWeb ? { height: "100dvh" as never } : null) }
|
|
519
|
-
: isWeb
|
|
520
|
-
? { minHeight: "100dvh" as never }
|
|
521
|
-
: null)}
|
|
535
|
+
{...frameHeight(ownsChrome)}
|
|
522
536
|
data-testid={testID}
|
|
523
537
|
data-size={compact ? "compact" : "regular"}
|
|
524
538
|
data-chrome={ownsChrome ? "own" : undefined}
|
|
@@ -125,7 +125,7 @@ function Frame({
|
|
|
125
125
|
}) {
|
|
126
126
|
const { t } = useTranslation();
|
|
127
127
|
const { knobProps } = useResolvedKnobs();
|
|
128
|
-
const { region, copy } = useCopyFeedback();
|
|
128
|
+
const { region, report, copy } = useCopyFeedback();
|
|
129
129
|
return (
|
|
130
130
|
<YStack gap="$1">
|
|
131
131
|
<YStack
|
|
@@ -163,7 +163,9 @@ function Frame({
|
|
|
163
163
|
size="$2"
|
|
164
164
|
aria-label={t("Copy")}
|
|
165
165
|
accentInk
|
|
166
|
-
onPress={() =>
|
|
166
|
+
onPress={() => {
|
|
167
|
+
copy(text).catch(() => report(false));
|
|
168
|
+
}}
|
|
167
169
|
testID={`${testID}-copy`}
|
|
168
170
|
/>
|
|
169
171
|
</XStack>
|
|
@@ -15,7 +15,7 @@ import type { RemoteArtProps } from "./types";
|
|
|
15
15
|
|
|
16
16
|
export type { RemoteArtProps } from "./types";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const ignore = (): undefined => undefined;
|
|
19
19
|
|
|
20
20
|
export function RemoteArt({ uri, size, alt = "", fallback = null }: RemoteArtProps) {
|
|
21
21
|
const art = useRemoteArt(uri);
|
|
@@ -532,6 +532,12 @@ function defaultErrorBody({
|
|
|
532
532
|
/>
|
|
533
533
|
);
|
|
534
534
|
}
|
|
535
|
+
const signInAction =
|
|
536
|
+
onSignIn && copy.signIn ? (
|
|
537
|
+
<Button size={small ? "$3" : "$4"} onPress={onSignIn}>
|
|
538
|
+
<Text fontWeight="400">{signInLabel}</Text>
|
|
539
|
+
</Button>
|
|
540
|
+
) : undefined;
|
|
535
541
|
return (
|
|
536
542
|
<EmptyState
|
|
537
543
|
size={size}
|
|
@@ -545,11 +551,9 @@ function defaultErrorBody({
|
|
|
545
551
|
<Button size={small ? "$3" : "$4"} onPress={onRetry}>
|
|
546
552
|
<Text fontWeight="400">{retryLabel}</Text>
|
|
547
553
|
</Button>
|
|
548
|
-
) :
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
</Button>
|
|
552
|
-
) : undefined
|
|
554
|
+
) : (
|
|
555
|
+
signInAction
|
|
556
|
+
)
|
|
553
557
|
}
|
|
554
558
|
/>
|
|
555
559
|
);
|
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);
|