@multiplatform.one/components 9.12.1 → 9.13.0
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/Lightbox/index.native.js +13 -6
- package/dist/cjs/Lightbox/index.native.js.map +1 -1
- package/dist/cjs/Lightbox/shared.cjs +20 -0
- package/dist/cjs/Lightbox/shared.native.js +22 -0
- package/dist/cjs/Lightbox/shared.native.js.map +1 -1
- package/dist/cjs/canvas/index.cjs +20 -0
- package/dist/cjs/canvas/index.native.js +23 -0
- package/dist/cjs/canvas/index.native.js.map +1 -0
- package/dist/cjs/canvas/panBounds.cjs +76 -0
- package/dist/cjs/canvas/panBounds.native.js +83 -0
- package/dist/cjs/canvas/panBounds.native.js.map +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.native.js +1 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/views/Calendar.cjs +281 -40
- package/dist/cjs/views/Calendar.native.js +291 -40
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/calendarMath.cjs +14 -0
- package/dist/cjs/views/calendarMath.native.js +14 -0
- package/dist/cjs/views/calendarMath.native.js.map +1 -1
- package/dist/esm/Lightbox/index.native.js +14 -7
- package/dist/esm/Lightbox/index.native.js.map +1 -1
- package/dist/esm/Lightbox/shared.mjs +20 -1
- package/dist/esm/Lightbox/shared.mjs.map +1 -1
- package/dist/esm/Lightbox/shared.native.js +22 -1
- package/dist/esm/Lightbox/shared.native.js.map +1 -1
- package/dist/esm/canvas/index.mjs +2 -0
- package/dist/esm/canvas/index.mjs.map +1 -0
- package/dist/esm/canvas/index.native.js +2 -0
- package/dist/esm/canvas/index.native.js.map +1 -0
- package/dist/esm/canvas/panBounds.mjs +46 -0
- package/dist/esm/canvas/panBounds.mjs.map +1 -0
- package/dist/esm/canvas/panBounds.native.js +50 -0
- package/dist/esm/canvas/panBounds.native.js.map +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +1 -0
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/views/Calendar.mjs +283 -42
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +293 -42
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/calendarMath.mjs +14 -1
- package/dist/esm/views/calendarMath.mjs.map +1 -1
- package/dist/esm/views/calendarMath.native.js +14 -1
- package/dist/esm/views/calendarMath.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 +2 -2
- 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 +14 -7
- package/dist/jsx/Lightbox/index.native.js.map +1 -1
- package/dist/jsx/Lightbox/shared.mjs +20 -1
- package/dist/jsx/Lightbox/shared.mjs.map +1 -1
- package/dist/jsx/Lightbox/shared.native.js +22 -0
- 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/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.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/SheetBodyRegion.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.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.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.native.js +1 -1
- 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.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/canvas/index.mjs +2 -0
- package/dist/jsx/canvas/index.mjs.map +1 -0
- package/dist/jsx/canvas/index.native.js +23 -0
- package/dist/jsx/canvas/index.native.js.map +1 -0
- package/dist/jsx/canvas/panBounds.mjs +46 -0
- package/dist/jsx/canvas/panBounds.mjs.map +1 -0
- package/dist/jsx/canvas/panBounds.native.js +83 -0
- package/dist/jsx/canvas/panBounds.native.js.map +1 -0
- 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 +1 -1
- 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/SeriesLegend.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 +7 -7
- 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.map +1 -1
- package/dist/jsx/code/PayloadView/index.native.js +4 -4
- 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/SingleTaskColumn.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/useDirection.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.js +1 -0
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +1 -0
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +46 -45
- 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.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.native.js +1 -1
- 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.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.native.js +1 -1
- 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.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.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.mjs +283 -42
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.js +291 -40
- 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 +1 -1
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/FilePreview.native.js +2 -2
- package/dist/jsx/views/FilePreview.native.js.map +1 -1
- package/dist/jsx/views/Gantt.native.js +1 -1
- 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/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 +1 -1
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +1 -1
- 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.mjs +14 -1
- package/dist/jsx/views/calendarMath.mjs.map +1 -1
- package/dist/jsx/views/calendarMath.native.js +14 -0
- 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/Lightbox/index.native.tsx +16 -5
- package/src/Lightbox/shared.spec.ts +39 -0
- package/src/Lightbox/shared.ts +23 -0
- package/src/canvas/index.ts +1 -0
- package/src/canvas/panBounds.spec.ts +95 -0
- package/src/canvas/panBounds.ts +84 -0
- package/src/index.ts +1 -0
- package/src/views/Calendar.eventFill.spec.tsx +118 -0
- package/src/views/Calendar.nativeResize.spec.tsx +233 -0
- package/src/views/Calendar.stories.tsx +3 -0
- package/src/views/Calendar.tsx +295 -33
- package/src/views/calendarMath.ts +21 -0
- package/src/views/dataIdentity.spec.tsx +4 -3
- package/types/Lightbox/index.native.d.ts.map +1 -1
- package/types/Lightbox/shared.d.ts +12 -0
- package/types/Lightbox/shared.d.ts.map +1 -1
- package/types/canvas/index.d.ts +2 -0
- package/types/canvas/index.d.ts.map +1 -0
- package/types/canvas/panBounds.d.ts +23 -0
- package/types/canvas/panBounds.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/views/Calendar.d.ts +7 -2
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/calendarMath.d.ts +13 -0
- package/types/views/calendarMath.d.ts.map +1 -1
|
@@ -2,10 +2,10 @@ import { motionSettleMs, transitionProps, formatCalendarDate, formatDayLong, for
|
|
|
2
2
|
import { componentColors, sectionHeading } from "../componentColors.mjs";
|
|
3
3
|
import { ViewSwitcher } from "../layouts/ViewSwitcher.mjs";
|
|
4
4
|
import { withInterp } from "../shared/t.mjs";
|
|
5
|
-
import { MINUTES_PER_DAY, computeResizeRange, createRangeFromDrag, eventAccessibleLabel, formatTimeRangeLabel, layoutDayBlocks, minutesOfDay, minutesToY, moveFocusDate, moveFocusSlot, moveRangeToSlot, snapMinutes, yToMinutes } from "./calendarMath.mjs";
|
|
5
|
+
import { MINUTES_PER_DAY, computeResizeRange, resizeGripZones, createRangeFromDrag, eventAccessibleLabel, formatTimeRangeLabel, layoutDayBlocks, minutesOfDay, minutesToY, moveFocusDate, moveFocusSlot, moveRangeToSlot, snapMinutes, yToMinutes } from "./calendarMath.mjs";
|
|
6
6
|
import React, { useState, useMemo, useCallback, useEffect, useId, useRef } from "react";
|
|
7
7
|
import { useTranslation } from "../shared/i18n.mjs";
|
|
8
|
-
import { Button, FloatingPanel, Input, zIndex } from "@multiplatform.one/forms";
|
|
8
|
+
import { Button, FloatingPanel, Input, useHoldCue, zIndex } from "@multiplatform.one/forms";
|
|
9
9
|
import { AnimatePresence, SizableText, Text as TamaguiText, XStack, YStack, isWeb, styled } from "tamagui";
|
|
10
10
|
import { ScrollView } from "../ScrollView.mjs";
|
|
11
11
|
import { useDirection } from "../hooks/useDirection.mjs";
|
|
@@ -149,6 +149,11 @@ const TOUCH_LONG_PRESS_MS = 300;
|
|
|
149
149
|
const TOUCH_SLOP_PX = 8;
|
|
150
150
|
const MIN_BLOCK_PX = 18;
|
|
151
151
|
const RESIZE_ZONE_PX = MIN_PRESS_TARGET;
|
|
152
|
+
const GRIP_DOT_PX = 10;
|
|
153
|
+
const EVENT_TINT_OPACITY = 0.22;
|
|
154
|
+
const EVENT_SELECTED_TINT_OPACITY = 0.38;
|
|
155
|
+
const EVENT_BAR_PX = 3;
|
|
156
|
+
const GRIP_DOT_INSET_PX = 6;
|
|
152
157
|
const MONTH_CHIP_MIN_PX = 24;
|
|
153
158
|
function DayNumberDisc({
|
|
154
159
|
date,
|
|
@@ -408,6 +413,8 @@ function Calendar({
|
|
|
408
413
|
onEventClick,
|
|
409
414
|
onEventMove,
|
|
410
415
|
onEventResize,
|
|
416
|
+
selectedEventId,
|
|
417
|
+
onEventSelect,
|
|
411
418
|
onEventCreate,
|
|
412
419
|
enableEventDrag,
|
|
413
420
|
viewType: initialViewType = "month",
|
|
@@ -466,6 +473,7 @@ function Calendar({
|
|
|
466
473
|
const webDragEnabled = dragEnabled && hasDom;
|
|
467
474
|
const nativeDragEnabled = dragEnabled && !isWeb;
|
|
468
475
|
const webResizeEnabled = onEventResize !== void 0 && hasDom;
|
|
476
|
+
const nativeResizeEnabled = onEventResize !== void 0 && !isWeb;
|
|
469
477
|
const webCreateEnabled = onEventCreate !== void 0 && hasDom;
|
|
470
478
|
const [dragGhost, setDragGhost] = useState(null);
|
|
471
479
|
const [dropTargetKey, setDropTargetKey] = useState(null);
|
|
@@ -491,6 +499,31 @@ function Calendar({
|
|
|
491
499
|
y: 0
|
|
492
500
|
});
|
|
493
501
|
const nativeSessionRef = useRef(null);
|
|
502
|
+
const nativeResizeRef = useRef(null);
|
|
503
|
+
const [innerSelectedId, setInnerSelectedId] = useState(null);
|
|
504
|
+
const [focusedEventId, setFocusedEventId] = useState(null);
|
|
505
|
+
const selectedId = selectedEventId !== void 0 ? selectedEventId : innerSelectedId;
|
|
506
|
+
const selectedIdRef = useRef(selectedId);
|
|
507
|
+
selectedIdRef.current = selectedId;
|
|
508
|
+
const holdTimerRef = useRef(null);
|
|
509
|
+
const heldRef = useRef(false);
|
|
510
|
+
const hold = useHoldCue();
|
|
511
|
+
const [holdCueId, setHoldCueId] = useState(null);
|
|
512
|
+
const selectEvent = useCallback(event => {
|
|
513
|
+
if ((event?.id ?? null) === selectedIdRef.current) return;
|
|
514
|
+
setInnerSelectedId(event?.id ?? null);
|
|
515
|
+
onEventSelect?.(event);
|
|
516
|
+
}, [onEventSelect]);
|
|
517
|
+
const clearHoldTimer = useCallback(() => {
|
|
518
|
+
if (holdTimerRef.current) clearTimeout(holdTimerRef.current);
|
|
519
|
+
holdTimerRef.current = null;
|
|
520
|
+
hold.stop();
|
|
521
|
+
}, [hold.stop]);
|
|
522
|
+
const startHoldCue = useCallback(event => {
|
|
523
|
+
setHoldCueId(event.id);
|
|
524
|
+
hold.start();
|
|
525
|
+
}, [hold.start]);
|
|
526
|
+
useEffect(() => clearHoldTimer, [clearHoldTimer]);
|
|
494
527
|
slotTargetRef.current = slotTarget;
|
|
495
528
|
resizePreviewRef.current = resizePreview;
|
|
496
529
|
editorStateRef.current = editorState;
|
|
@@ -609,6 +642,7 @@ function Calendar({
|
|
|
609
642
|
onCommit: pt => {
|
|
610
643
|
endVisuals();
|
|
611
644
|
suppressNextClick();
|
|
645
|
+
if (onEventResize) selectEvent(event);
|
|
612
646
|
const ghostFrom = {
|
|
613
647
|
x: pt.x + 12,
|
|
614
648
|
y: pt.y + 12
|
|
@@ -670,7 +704,7 @@ function Calendar({
|
|
|
670
704
|
}
|
|
671
705
|
});
|
|
672
706
|
dragSessionCleanupRef.current = cleanup;
|
|
673
|
-
}, [webDragEnabled, slotMinutes, hourHeight, onEventMove, commitMoveToKey, beginSettle, suppressNextClick]);
|
|
707
|
+
}, [webDragEnabled, slotMinutes, hourHeight, onEventMove, commitMoveToKey, beginSettle, suppressNextClick, onEventResize, selectEvent]);
|
|
674
708
|
const handleResizePointerDown = useCallback((event, edge, e) => {
|
|
675
709
|
if (!webResizeEnabled) return;
|
|
676
710
|
if (e.button !== void 0 && e.button !== 0) return;
|
|
@@ -735,6 +769,73 @@ function Calendar({
|
|
|
735
769
|
});
|
|
736
770
|
dragSessionCleanupRef.current = cleanup;
|
|
737
771
|
}, [webResizeEnabled, hourHeight, slotMinutes, onEventResize, suppressNextClick]);
|
|
772
|
+
const endNativeResize = useCallback(() => {
|
|
773
|
+
nativeResizeRef.current = null;
|
|
774
|
+
setResizePreview(null);
|
|
775
|
+
setScrollLocked(false);
|
|
776
|
+
}, []);
|
|
777
|
+
const handleNativeResizeGrant = useCallback((event, edge, e) => {
|
|
778
|
+
if (!nativeResizeEnabled) return;
|
|
779
|
+
const startMin = minutesOfDay(event.start);
|
|
780
|
+
const endMin = event.end ? startMin + (event.end.getTime() - event.start.getTime()) / 6e4 : startMin + slotMinutes;
|
|
781
|
+
nativeResizeRef.current = {
|
|
782
|
+
event,
|
|
783
|
+
edge,
|
|
784
|
+
startY: e.nativeEvent?.pageY ?? 0,
|
|
785
|
+
edgeMin: edge === "start" ? startMin : endMin,
|
|
786
|
+
active: false,
|
|
787
|
+
range: null
|
|
788
|
+
};
|
|
789
|
+
}, [nativeResizeEnabled, slotMinutes]);
|
|
790
|
+
const handleNativeResizeMove = useCallback(e => {
|
|
791
|
+
const session = nativeResizeRef.current;
|
|
792
|
+
if (!session) return;
|
|
793
|
+
const dy = (e.nativeEvent?.pageY ?? 0) - session.startY;
|
|
794
|
+
if (!session.active) {
|
|
795
|
+
if (Math.abs(dy) < DRAG_THRESHOLD_PX) return;
|
|
796
|
+
session.active = true;
|
|
797
|
+
setScrollLocked(true);
|
|
798
|
+
}
|
|
799
|
+
const raw = session.edgeMin + dy / hourHeight * 60;
|
|
800
|
+
const range = computeResizeRange(session.event, session.edge, raw, slotMinutes);
|
|
801
|
+
session.range = range;
|
|
802
|
+
setResizePreview({
|
|
803
|
+
id: session.event.id,
|
|
804
|
+
start: range.start,
|
|
805
|
+
end: range.end
|
|
806
|
+
});
|
|
807
|
+
}, [hourHeight, slotMinutes]);
|
|
808
|
+
const handleNativeResizeRelease = useCallback(() => {
|
|
809
|
+
const session = nativeResizeRef.current;
|
|
810
|
+
if (!session) return;
|
|
811
|
+
endNativeResize();
|
|
812
|
+
if (!session.active) {
|
|
813
|
+
onEventClick?.(session.event);
|
|
814
|
+
return;
|
|
815
|
+
}
|
|
816
|
+
suppressNextClick();
|
|
817
|
+
const {
|
|
818
|
+
event,
|
|
819
|
+
range
|
|
820
|
+
} = session;
|
|
821
|
+
if (!range) return;
|
|
822
|
+
const prevEnd = event.end ?? event.start;
|
|
823
|
+
if (range.start.getTime() !== event.start.getTime() || range.end.getTime() !== prevEnd.getTime()) {
|
|
824
|
+
onEventResize?.(event, {
|
|
825
|
+
start: range.start,
|
|
826
|
+
end: range.end
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
}, [endNativeResize, onEventClick, onEventResize, suppressNextClick]);
|
|
830
|
+
const getNativeResizeProps = (event, edge) => ({
|
|
831
|
+
onStartShouldSetResponder: () => true,
|
|
832
|
+
onMoveShouldSetResponder: () => true,
|
|
833
|
+
onResponderTerminationRequest: () => !nativeResizeRef.current?.active,
|
|
834
|
+
onResponderGrant: e => handleNativeResizeGrant(event, edge, e),
|
|
835
|
+
onResponderMove: handleNativeResizeMove,
|
|
836
|
+
onResponderRelease: handleNativeResizeRelease,
|
|
837
|
+
onResponderTerminate: endNativeResize
|
|
838
|
+
});
|
|
738
839
|
const openEditor = useCallback((dayKey, range) => {
|
|
739
840
|
setCreateDraft(null);
|
|
740
841
|
setDraftTitle("");
|
|
@@ -829,6 +930,7 @@ function Calendar({
|
|
|
829
930
|
setDropTargetKey(null);
|
|
830
931
|
setDraggingEventId(null);
|
|
831
932
|
if (!session?.dragging) return;
|
|
933
|
+
if (opts.commit) selectEvent(session.event);
|
|
832
934
|
suppressClickRef.current = true;
|
|
833
935
|
setTimeout(() => {
|
|
834
936
|
suppressClickRef.current = false;
|
|
@@ -838,7 +940,7 @@ function Calendar({
|
|
|
838
940
|
const key = findDayKeyAtPoint(opts.pageX, opts.pageY, layouts) ?? findDayKeyAtPoint(opts.pageX, opts.pageY, session.layouts);
|
|
839
941
|
commitMoveToKey(session.event, key);
|
|
840
942
|
});
|
|
841
|
-
}, [commitMoveToKey]);
|
|
943
|
+
}, [commitMoveToKey, selectEvent]);
|
|
842
944
|
const handleNativeGrant = useCallback((event, e) => {
|
|
843
945
|
if (!nativeDragEnabled) return;
|
|
844
946
|
const pageX = e.nativeEvent?.pageX ?? 0;
|
|
@@ -850,7 +952,19 @@ function Calendar({
|
|
|
850
952
|
dragging: false,
|
|
851
953
|
layouts: []
|
|
852
954
|
};
|
|
853
|
-
|
|
955
|
+
heldRef.current = false;
|
|
956
|
+
clearHoldTimer();
|
|
957
|
+
if (nativeResizeEnabled) {
|
|
958
|
+
startHoldCue(event);
|
|
959
|
+
holdTimerRef.current = setTimeout(() => {
|
|
960
|
+
holdTimerRef.current = null;
|
|
961
|
+
hold.stop();
|
|
962
|
+
if (nativeSessionRef.current?.event !== event || nativeSessionRef.current.dragging) return;
|
|
963
|
+
heldRef.current = true;
|
|
964
|
+
selectEvent(event);
|
|
965
|
+
}, TOUCH_LONG_PRESS_MS);
|
|
966
|
+
}
|
|
967
|
+
}, [nativeDragEnabled, nativeResizeEnabled, clearHoldTimer, selectEvent, startHoldCue, hold.stop]);
|
|
854
968
|
const handleNativeMove = useCallback(e => {
|
|
855
969
|
const session = nativeSessionRef.current;
|
|
856
970
|
if (!session) return;
|
|
@@ -859,6 +973,7 @@ function Calendar({
|
|
|
859
973
|
if (!session.dragging) {
|
|
860
974
|
if (Math.hypot(pageX - session.startX, pageY - session.startY) < DRAG_THRESHOLD_PX) return;
|
|
861
975
|
session.dragging = true;
|
|
976
|
+
clearHoldTimer();
|
|
862
977
|
setScrollLocked(true);
|
|
863
978
|
setDraggingEventId(session.event.id);
|
|
864
979
|
refreshContainerOffset();
|
|
@@ -872,12 +987,15 @@ function Calendar({
|
|
|
872
987
|
y: pageY - containerOffsetRef.current.y + 12
|
|
873
988
|
});
|
|
874
989
|
setDropTargetKey(findDayKeyAtPoint(pageX, pageY, session.layouts));
|
|
875
|
-
}, [refreshContainerOffset]);
|
|
990
|
+
}, [refreshContainerOffset, clearHoldTimer]);
|
|
876
991
|
const handleNativeRelease = useCallback(e => {
|
|
877
992
|
const session = nativeSessionRef.current;
|
|
878
993
|
if (!session) return;
|
|
994
|
+
clearHoldTimer();
|
|
879
995
|
if (!session.dragging) {
|
|
880
996
|
nativeSessionRef.current = null;
|
|
997
|
+
if (heldRef.current) return;
|
|
998
|
+
selectEvent(null);
|
|
881
999
|
onEventClick?.(session.event);
|
|
882
1000
|
return;
|
|
883
1001
|
}
|
|
@@ -886,12 +1004,13 @@ function Calendar({
|
|
|
886
1004
|
pageX: e.nativeEvent?.pageX,
|
|
887
1005
|
pageY: e.nativeEvent?.pageY
|
|
888
1006
|
});
|
|
889
|
-
}, [endNativeSession, onEventClick]);
|
|
1007
|
+
}, [endNativeSession, onEventClick, clearHoldTimer, selectEvent]);
|
|
890
1008
|
const handleNativeTerminate = useCallback(() => {
|
|
1009
|
+
clearHoldTimer();
|
|
891
1010
|
endNativeSession({
|
|
892
1011
|
commit: false
|
|
893
1012
|
});
|
|
894
|
-
}, [endNativeSession]);
|
|
1013
|
+
}, [endNativeSession, clearHoldTimer]);
|
|
895
1014
|
const getEventDragProps = useCallback((event, mode = "day") => {
|
|
896
1015
|
const base = {
|
|
897
1016
|
"data-calendar-event": event.id
|
|
@@ -1077,10 +1196,13 @@ function Calendar({
|
|
|
1077
1196
|
children: renderEvent(event)
|
|
1078
1197
|
}, event.id);
|
|
1079
1198
|
}
|
|
1080
|
-
return /* @__PURE__ */
|
|
1199
|
+
return /* @__PURE__ */jsxs(YStack, {
|
|
1081
1200
|
...knobProps.borderRadius,
|
|
1082
|
-
|
|
1201
|
+
position: "relative",
|
|
1202
|
+
backgroundColor: "$background",
|
|
1203
|
+
overflow: "hidden",
|
|
1083
1204
|
padding: compact ? "$1" : "$2",
|
|
1205
|
+
paddingInlineStart: EVENT_BAR_PX + 4,
|
|
1084
1206
|
minHeight: MONTH_CHIP_MIN_PX,
|
|
1085
1207
|
justifyContent: "center",
|
|
1086
1208
|
hitSlop: pressTargetHitSlop(compact ? MONTH_CHIP_MIN_PX : 32),
|
|
@@ -1099,15 +1221,42 @@ function Calendar({
|
|
|
1099
1221
|
if (suppressClickRef.current) return;
|
|
1100
1222
|
onEventClick?.(event);
|
|
1101
1223
|
},
|
|
1102
|
-
children: /* @__PURE__ */jsx(
|
|
1224
|
+
children: [/* @__PURE__ */jsx(YStack, {
|
|
1225
|
+
position: "absolute",
|
|
1226
|
+
top: 0,
|
|
1227
|
+
bottom: 0,
|
|
1228
|
+
left: 0,
|
|
1229
|
+
right: 0,
|
|
1230
|
+
backgroundColor: event.color || identity,
|
|
1231
|
+
opacity: EVENT_TINT_OPACITY,
|
|
1232
|
+
pointerEvents: "none",
|
|
1233
|
+
...{
|
|
1234
|
+
"data-calendar-event-tint": "true"
|
|
1235
|
+
}
|
|
1236
|
+
}), /* @__PURE__ */jsx(YStack, {
|
|
1237
|
+
position: "absolute",
|
|
1238
|
+
top: 0,
|
|
1239
|
+
bottom: 0,
|
|
1240
|
+
...(isRTL ? {
|
|
1241
|
+
right: 0
|
|
1242
|
+
} : {
|
|
1243
|
+
left: 0
|
|
1244
|
+
}),
|
|
1245
|
+
width: EVENT_BAR_PX,
|
|
1246
|
+
backgroundColor: event.color || identity,
|
|
1247
|
+
pointerEvents: "none",
|
|
1248
|
+
...{
|
|
1249
|
+
"data-calendar-event-bar": "true"
|
|
1250
|
+
}
|
|
1251
|
+
}), /* @__PURE__ */jsx(TamaguiText, {
|
|
1103
1252
|
...knobProps.body,
|
|
1104
1253
|
fontSize: compact ? "$1" : "$2",
|
|
1105
1254
|
numberOfLines: compact ? 1 : 2,
|
|
1106
|
-
color:
|
|
1255
|
+
color: "$color12",
|
|
1107
1256
|
children: event.title
|
|
1108
|
-
})
|
|
1257
|
+
})]
|
|
1109
1258
|
}, event.id);
|
|
1110
|
-
}, [renderEvent, onEventClick, knobProps.borderRadius, dragEnabled, webDragEnabled, nativeDragEnabled, getEventDragProps, eventA11yProps, draggingEventId,
|
|
1259
|
+
}, [renderEvent, onEventClick, knobProps.borderRadius, dragEnabled, webDragEnabled, nativeDragEnabled, getEventDragProps, eventA11yProps, draggingEventId, identity, isRTL]);
|
|
1111
1260
|
const MONTH_VISIBLE_EVENTS = 3;
|
|
1112
1261
|
const renderMonthView = () => {
|
|
1113
1262
|
const monthDays = getMonthDays(currentDate, firstDayOfWeek);
|
|
@@ -1298,7 +1447,24 @@ function Calendar({
|
|
|
1298
1447
|
const leftPct = (isRTL ? layout.columns - 1 - layout.column : layout.column) * widthPct;
|
|
1299
1448
|
const lifted = draggingEventId === event.id;
|
|
1300
1449
|
const zoneInner = Math.min(RESIZE_ZONE_PX / 2, blockHeight / 2);
|
|
1450
|
+
const gripZones = resizeGripZones(blockHeight, RESIZE_ZONE_PX);
|
|
1301
1451
|
const dragProps = getEventDragProps(event, "slot");
|
|
1452
|
+
const selected = selectedId === event.id;
|
|
1453
|
+
const gripsShown = selected || focusedEventId === event.id;
|
|
1454
|
+
const fill = event.color || identity;
|
|
1455
|
+
const titleInk = "$color12";
|
|
1456
|
+
const timeInk = "$color11";
|
|
1457
|
+
const gripDot = /* @__PURE__ */jsx(YStack, {
|
|
1458
|
+
width: GRIP_DOT_PX,
|
|
1459
|
+
height: GRIP_DOT_PX,
|
|
1460
|
+
borderRadius: GRIP_DOT_PX / 2,
|
|
1461
|
+
borderWidth: 2,
|
|
1462
|
+
borderColor: event.color || identity,
|
|
1463
|
+
backgroundColor: "$background",
|
|
1464
|
+
...{
|
|
1465
|
+
"data-calendar-grip-dot": "true"
|
|
1466
|
+
}
|
|
1467
|
+
});
|
|
1302
1468
|
return /* @__PURE__ */jsxs(YStack, {
|
|
1303
1469
|
position: "absolute",
|
|
1304
1470
|
top,
|
|
@@ -1311,36 +1477,94 @@ function Calendar({
|
|
|
1311
1477
|
...knobProps.motion.slide,
|
|
1312
1478
|
transition: webLayoutTransition
|
|
1313
1479
|
}, ["top", "height", "left", "width"]),
|
|
1314
|
-
children: [/* @__PURE__ */
|
|
1480
|
+
children: [/* @__PURE__ */jsxs(YStack, {
|
|
1315
1481
|
flex: 1,
|
|
1316
1482
|
...knobProps.borderRadius,
|
|
1317
|
-
|
|
1483
|
+
position: "relative",
|
|
1484
|
+
backgroundColor: "$background",
|
|
1318
1485
|
padding: "$1",
|
|
1486
|
+
paddingInlineStart: EVENT_BAR_PX + 4,
|
|
1319
1487
|
overflow: "hidden",
|
|
1320
1488
|
opacity: lifted ? 0.4 : 1,
|
|
1321
|
-
borderWidth: 1,
|
|
1322
|
-
borderColor: "$background",
|
|
1489
|
+
borderWidth: selected ? 2 : 1,
|
|
1490
|
+
borderColor: selected ? fill : "$background",
|
|
1323
1491
|
cursor: webDragEnabled ? "grab" : "pointer",
|
|
1324
1492
|
...eventA11yProps(event),
|
|
1325
1493
|
...dragProps,
|
|
1494
|
+
onFocus: () => setFocusedEventId(event.id),
|
|
1495
|
+
onBlur: () => setFocusedEventId(id => id === event.id ? null : id),
|
|
1326
1496
|
onPress: nativeDragEnabled ? void 0 : e => {
|
|
1327
1497
|
e?.stopPropagation?.();
|
|
1328
1498
|
if (suppressClickRef.current) return;
|
|
1499
|
+
if (heldRef.current) {
|
|
1500
|
+
heldRef.current = false;
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
if (onEventResize) selectEvent(null);
|
|
1329
1504
|
onEventClick?.(event);
|
|
1330
1505
|
},
|
|
1331
|
-
|
|
1506
|
+
...(onEventResize && !nativeDragEnabled ? {
|
|
1507
|
+
onPressIn: () => {
|
|
1508
|
+
heldRef.current = false;
|
|
1509
|
+
startHoldCue(event);
|
|
1510
|
+
},
|
|
1511
|
+
onPressOut: hold.stop,
|
|
1512
|
+
onLongPress: () => {
|
|
1513
|
+
hold.stop();
|
|
1514
|
+
heldRef.current = true;
|
|
1515
|
+
selectEvent(event);
|
|
1516
|
+
}
|
|
1517
|
+
} : {}),
|
|
1518
|
+
...(hold.holding && holdCueId === event.id ? {
|
|
1519
|
+
scale: 0.97
|
|
1520
|
+
} : {}),
|
|
1521
|
+
...{
|
|
1522
|
+
"data-hold": hold.holding && holdCueId === event.id ? "progress" : void 0
|
|
1523
|
+
},
|
|
1524
|
+
...{
|
|
1525
|
+
"data-calendar-selected": selected ? "true" : void 0
|
|
1526
|
+
},
|
|
1527
|
+
children: [/* @__PURE__ */jsx(YStack, {
|
|
1528
|
+
position: "absolute",
|
|
1529
|
+
top: 0,
|
|
1530
|
+
bottom: 0,
|
|
1531
|
+
left: 0,
|
|
1532
|
+
right: 0,
|
|
1533
|
+
backgroundColor: fill,
|
|
1534
|
+
opacity: selected ? EVENT_SELECTED_TINT_OPACITY : EVENT_TINT_OPACITY,
|
|
1535
|
+
pointerEvents: "none",
|
|
1536
|
+
...{
|
|
1537
|
+
"data-calendar-event-tint": "true"
|
|
1538
|
+
}
|
|
1539
|
+
}), /* @__PURE__ */jsx(YStack, {
|
|
1540
|
+
position: "absolute",
|
|
1541
|
+
top: 0,
|
|
1542
|
+
bottom: 0,
|
|
1543
|
+
...(isRTL ? {
|
|
1544
|
+
right: 0
|
|
1545
|
+
} : {
|
|
1546
|
+
left: 0
|
|
1547
|
+
}),
|
|
1548
|
+
width: EVENT_BAR_PX,
|
|
1549
|
+
backgroundColor: fill,
|
|
1550
|
+
pointerEvents: "none",
|
|
1551
|
+
...{
|
|
1552
|
+
"data-calendar-event-bar": "true"
|
|
1553
|
+
}
|
|
1554
|
+
}), renderEvent ? renderEvent(event) : /* @__PURE__ */jsxs(Fragment, {
|
|
1332
1555
|
children: [/* @__PURE__ */jsx(Text, {
|
|
1333
1556
|
fontSize: "$1",
|
|
1557
|
+
fontWeight: "600",
|
|
1334
1558
|
numberOfLines: 1,
|
|
1335
|
-
color:
|
|
1559
|
+
color: titleInk,
|
|
1336
1560
|
children: event.title
|
|
1337
1561
|
}), blockHeight >= 34 && /* @__PURE__ */jsx(Text, {
|
|
1338
1562
|
fontSize: "$1",
|
|
1339
1563
|
numberOfLines: 1,
|
|
1340
|
-
color:
|
|
1564
|
+
color: timeInk,
|
|
1341
1565
|
children: formatTimeRangeLabel(start, end)
|
|
1342
1566
|
})]
|
|
1343
|
-
})
|
|
1567
|
+
})]
|
|
1344
1568
|
}), webResizeEnabled && /* @__PURE__ */jsxs(Fragment, {
|
|
1345
1569
|
children: [/* @__PURE__ */jsx(YStack, {
|
|
1346
1570
|
position: "absolute",
|
|
@@ -1349,10 +1573,11 @@ function Calendar({
|
|
|
1349
1573
|
height: RESIZE_ZONE_PX / 2 + zoneInner,
|
|
1350
1574
|
cursor: "ns-resize",
|
|
1351
1575
|
zIndex: 3,
|
|
1352
|
-
justifyContent: "flex-
|
|
1353
|
-
alignItems: "
|
|
1354
|
-
|
|
1355
|
-
|
|
1576
|
+
justifyContent: "flex-start",
|
|
1577
|
+
alignItems: "flex-end",
|
|
1578
|
+
paddingTop: RESIZE_ZONE_PX / 2 - GRIP_DOT_PX / 2,
|
|
1579
|
+
paddingInlineEnd: GRIP_DOT_INSET_PX,
|
|
1580
|
+
opacity: gripsShown ? 1 : 0,
|
|
1356
1581
|
hoverStyle: {
|
|
1357
1582
|
opacity: 1
|
|
1358
1583
|
},
|
|
@@ -1360,12 +1585,7 @@ function Calendar({
|
|
|
1360
1585
|
...{
|
|
1361
1586
|
"data-calendar-resize": `start:${event.id}`
|
|
1362
1587
|
},
|
|
1363
|
-
children:
|
|
1364
|
-
width: 28,
|
|
1365
|
-
height: 3,
|
|
1366
|
-
borderRadius: 2,
|
|
1367
|
-
backgroundColor: "$accentColor"
|
|
1368
|
-
})
|
|
1588
|
+
children: gripDot
|
|
1369
1589
|
}), /* @__PURE__ */jsx(YStack, {
|
|
1370
1590
|
position: "absolute",
|
|
1371
1591
|
...overlayInset,
|
|
@@ -1373,10 +1593,11 @@ function Calendar({
|
|
|
1373
1593
|
height: RESIZE_ZONE_PX / 2 + zoneInner,
|
|
1374
1594
|
cursor: "ns-resize",
|
|
1375
1595
|
zIndex: 3,
|
|
1376
|
-
justifyContent: "flex-
|
|
1377
|
-
alignItems: "
|
|
1378
|
-
|
|
1379
|
-
|
|
1596
|
+
justifyContent: "flex-end",
|
|
1597
|
+
alignItems: "flex-start",
|
|
1598
|
+
paddingBottom: RESIZE_ZONE_PX / 2 - GRIP_DOT_PX / 2,
|
|
1599
|
+
paddingInlineStart: GRIP_DOT_INSET_PX,
|
|
1600
|
+
opacity: gripsShown ? 1 : 0,
|
|
1380
1601
|
hoverStyle: {
|
|
1381
1602
|
opacity: 1
|
|
1382
1603
|
},
|
|
@@ -1384,13 +1605,33 @@ function Calendar({
|
|
|
1384
1605
|
...{
|
|
1385
1606
|
"data-calendar-resize": `end:${event.id}`
|
|
1386
1607
|
},
|
|
1387
|
-
children:
|
|
1388
|
-
width: 28,
|
|
1389
|
-
height: 3,
|
|
1390
|
-
borderRadius: 2,
|
|
1391
|
-
backgroundColor: "$accentColor"
|
|
1392
|
-
})
|
|
1608
|
+
children: gripDot
|
|
1393
1609
|
})]
|
|
1610
|
+
}), nativeResizeEnabled && selected && ["start", "end"].map(edge => {
|
|
1611
|
+
const zone = gripZones[edge];
|
|
1612
|
+
return /* @__PURE__ */jsx(YStack, {
|
|
1613
|
+
position: "absolute",
|
|
1614
|
+
...overlayInset,
|
|
1615
|
+
top: zone.top,
|
|
1616
|
+
height: zone.height,
|
|
1617
|
+
justifyContent: edge === "start" ? "flex-start" : "flex-end",
|
|
1618
|
+
...(edge === "start" ? {
|
|
1619
|
+
paddingTop: RESIZE_ZONE_PX / 2 - GRIP_DOT_PX / 2,
|
|
1620
|
+
alignItems: "flex-end",
|
|
1621
|
+
paddingInlineEnd: GRIP_DOT_INSET_PX
|
|
1622
|
+
} : {
|
|
1623
|
+
paddingBottom: RESIZE_ZONE_PX / 2 - GRIP_DOT_PX / 2,
|
|
1624
|
+
alignItems: "flex-start",
|
|
1625
|
+
paddingInlineStart: GRIP_DOT_INSET_PX
|
|
1626
|
+
}),
|
|
1627
|
+
zIndex: 3,
|
|
1628
|
+
"aria-label": edge === "start" ? t("Resize start") : t("Resize end"),
|
|
1629
|
+
...getNativeResizeProps(event, edge),
|
|
1630
|
+
...{
|
|
1631
|
+
"data-calendar-resize": `${edge}:${event.id}`
|
|
1632
|
+
},
|
|
1633
|
+
children: gripDot
|
|
1634
|
+
}, edge);
|
|
1394
1635
|
}), preview && /* @__PURE__ */jsx(YStack, {
|
|
1395
1636
|
position: "absolute",
|
|
1396
1637
|
top: -26,
|