@eocrm/design-system 0.6.24 → 0.7.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/AI-PRIMER.md +1 -1
- package/README.md +65 -26
- package/dist/app/AppProvider.d.ts +53 -0
- package/dist/app/AppProvider.js +32 -0
- package/dist/app/index.d.ts +3 -0
- package/dist/app/themeTokens.d.ts +18 -0
- package/dist/app/themeTokens.js +61 -0
- package/dist/calendar/dateMath.d.ts +45 -0
- package/dist/calendar/dateMath.js +92 -0
- package/dist/calendar/formatters.d.ts +30 -0
- package/dist/calendar/formatters.js +73 -0
- package/dist/calendar/index.d.ts +12 -0
- package/dist/calendar/types.d.ts +34 -0
- package/dist/calendar/useAgenda.d.ts +23 -0
- package/dist/calendar/useAgenda.js +48 -0
- package/dist/calendar/useDay.d.ts +19 -0
- package/dist/calendar/useDay.js +34 -0
- package/dist/calendar/useMonth.d.ts +17 -0
- package/dist/calendar/useMonth.js +60 -0
- package/dist/calendar/useWeek.d.ts +22 -0
- package/dist/calendar/useWeek.js +44 -0
- package/dist/calendar/weekInfo.d.ts +18 -0
- package/dist/calendar/weekInfo.js +67 -0
- package/dist/components/Accordion/Accordion.css +266 -0
- package/dist/components/Accordion/Accordion.d.ts +92 -0
- package/dist/components/Accordion/Accordion.js +111 -0
- package/dist/components/Accordion/Accordion.module.js +29 -0
- package/dist/components/Accordion/AccordionContent.d.ts +9 -0
- package/dist/components/Accordion/AccordionContent.js +31 -0
- package/dist/components/Accordion/AccordionItem.d.ts +19 -0
- package/dist/components/Accordion/AccordionItem.js +45 -0
- package/dist/components/Accordion/AccordionTrigger.d.ts +21 -0
- package/dist/components/Accordion/AccordionTrigger.js +74 -0
- package/dist/components/Accordion/context.d.ts +28 -0
- package/dist/components/Accordion/context.js +20 -0
- package/dist/components/Accordion/index.d.ts +5 -0
- package/dist/components/Alert/Alert.css +116 -0
- package/dist/components/Alert/Alert.d.ts +79 -0
- package/dist/components/Alert/Alert.js +78 -0
- package/dist/components/Alert/Alert.module.js +17 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AppLayout/AppLayout.css +72 -0
- package/dist/components/AppLayout/AppLayout.d.ts +111 -0
- package/dist/components/AppLayout/AppLayout.js +81 -0
- package/dist/components/AppLayout/AppLayout.module.js +27 -0
- package/dist/components/AppLayout/index.d.ts +2 -0
- package/dist/components/Avatar/AgentAvatar.css +185 -0
- package/dist/components/Avatar/AgentAvatar.d.ts +39 -0
- package/dist/components/Avatar/AgentAvatar.js +78 -0
- package/dist/components/Avatar/AgentAvatar.module.js +25 -0
- package/dist/components/Avatar/Avatar.css +195 -0
- package/dist/components/Avatar/Avatar.d.ts +77 -0
- package/dist/components/Avatar/Avatar.js +102 -0
- package/dist/components/Avatar/Avatar.module.js +23 -0
- package/dist/components/Avatar/AvatarGroup.css +165 -0
- package/dist/components/Avatar/AvatarGroup.d.ts +44 -0
- package/dist/components/Avatar/AvatarGroup.js +54 -0
- package/dist/components/Avatar/AvatarGroup.module.js +21 -0
- package/dist/components/Avatar/AvatarGroupContext.d.ts +14 -0
- package/dist/components/Avatar/AvatarGroupContext.js +13 -0
- package/dist/components/Avatar/index.d.ts +6 -0
- package/dist/components/Badge/Badge.css +170 -0
- package/dist/components/Badge/Badge.d.ts +85 -0
- package/dist/components/Badge/Badge.js +54 -0
- package/dist/components/Badge/Badge.module.js +29 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Banner/Banner.css +147 -0
- package/dist/components/Banner/Banner.d.ts +71 -0
- package/dist/components/Banner/Banner.js +82 -0
- package/dist/components/Banner/Banner.module.js +15 -0
- package/dist/components/Banner/index.d.ts +2 -0
- package/dist/components/BrandIcon/BrandIcon.css +5 -0
- package/dist/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/dist/components/BrandIcon/BrandIcon.js +68 -0
- package/dist/components/BrandIcon/BrandIcon.module.js +5 -0
- package/dist/components/BrandIcon/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.css +37 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +61 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +59 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.js +15 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/Button.css +194 -0
- package/dist/components/Button/Button.d.ts +129 -0
- package/dist/components/Button/Button.js +28 -0
- package/dist/components/Button/Button.module.js +32 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/ButtonGroup/ButtonGroup.css +117 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +68 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +126 -0
- package/dist/components/ButtonGroup/ButtonGroup.module.js +17 -0
- package/dist/components/ButtonGroup/ButtonGroupItem.d.ts +24 -0
- package/dist/components/ButtonGroup/ButtonGroupItem.js +42 -0
- package/dist/components/ButtonGroup/context.d.ts +35 -0
- package/dist/components/ButtonGroup/context.js +10 -0
- package/dist/components/ButtonGroup/index.d.ts +2 -0
- package/dist/components/Calendar/AgendaView.css +334 -0
- package/dist/components/Calendar/AgendaView.d.ts +32 -0
- package/dist/components/Calendar/AgendaView.js +149 -0
- package/dist/components/Calendar/AgendaView.module.js +43 -0
- package/dist/components/Calendar/AllDayBand.css +188 -0
- package/dist/components/Calendar/AllDayBand.d.ts +26 -0
- package/dist/components/Calendar/AllDayBand.js +48 -0
- package/dist/components/Calendar/AllDayBand.module.js +11 -0
- package/dist/components/Calendar/Calendar.css +193 -0
- package/dist/components/Calendar/Calendar.d.ts +143 -0
- package/dist/components/Calendar/Calendar.js +173 -0
- package/dist/components/Calendar/Calendar.module.js +11 -0
- package/dist/components/Calendar/DayCell.css +197 -0
- package/dist/components/Calendar/DayCell.d.ts +26 -0
- package/dist/components/Calendar/DayCell.js +36 -0
- package/dist/components/Calendar/DayCell.module.js +13 -0
- package/dist/components/Calendar/DayView.css +180 -0
- package/dist/components/Calendar/DayView.d.ts +45 -0
- package/dist/components/Calendar/DayView.js +106 -0
- package/dist/components/Calendar/DayView.module.js +5 -0
- package/dist/components/Calendar/EventChip.css +298 -0
- package/dist/components/Calendar/EventChip.d.ts +34 -0
- package/dist/components/Calendar/EventChip.js +87 -0
- package/dist/components/Calendar/EventChip.module.js +37 -0
- package/dist/components/Calendar/HourGrid.css +281 -0
- package/dist/components/Calendar/HourGrid.d.ts +60 -0
- package/dist/components/Calendar/HourGrid.js +201 -0
- package/dist/components/Calendar/HourGrid.module.js +39 -0
- package/dist/components/Calendar/MonthView.css +260 -0
- package/dist/components/Calendar/MonthView.d.ts +48 -0
- package/dist/components/Calendar/MonthView.js +227 -0
- package/dist/components/Calendar/MonthView.module.js +27 -0
- package/dist/components/Calendar/TimedEvent.css +309 -0
- package/dist/components/Calendar/TimedEvent.d.ts +32 -0
- package/dist/components/Calendar/TimedEvent.js +157 -0
- package/dist/components/Calendar/TimedEvent.module.js +41 -0
- package/dist/components/Calendar/ViewSwitcher.css +3 -0
- package/dist/components/Calendar/ViewSwitcher.d.ts +19 -0
- package/dist/components/Calendar/ViewSwitcher.js +49 -0
- package/dist/components/Calendar/ViewSwitcher.module.js +5 -0
- package/dist/components/Calendar/WeekView.css +180 -0
- package/dist/components/Calendar/WeekView.d.ts +47 -0
- package/dist/components/Calendar/WeekView.js +77 -0
- package/dist/components/Calendar/WeekView.module.js +5 -0
- package/dist/components/Calendar/eventColor.d.ts +34 -0
- package/dist/components/Calendar/eventColor.js +23 -0
- package/dist/components/Calendar/index.d.ts +3 -0
- package/dist/components/Calendar/types.d.ts +430 -0
- package/dist/components/Calendar/useEventDrag.d.ts +112 -0
- package/dist/components/Calendar/useEventDrag.js +414 -0
- package/dist/components/Calendar/utils.d.ts +92 -0
- package/dist/components/Calendar/utils.js +434 -0
- package/dist/components/Card/Card.css +220 -0
- package/dist/components/Card/Card.d.ts +78 -0
- package/dist/components/Card/Card.js +63 -0
- package/dist/components/Card/Card.module.js +49 -0
- package/dist/components/Card/CardBody.d.ts +16 -0
- package/dist/components/Card/CardBody.js +19 -0
- package/dist/components/Card/CardHeader.d.ts +58 -0
- package/dist/components/Card/CardHeader.js +54 -0
- package/dist/components/Card/CardList.d.ts +10 -0
- package/dist/components/Card/CardList.js +19 -0
- package/dist/components/Card/CardListRow.d.ts +10 -0
- package/dist/components/Card/CardListRow.js +19 -0
- package/dist/components/Card/index.d.ts +7 -0
- package/dist/components/CatalogPicker/CatalogPicker.css +205 -0
- package/dist/components/CatalogPicker/CatalogPicker.d.ts +46 -0
- package/dist/components/CatalogPicker/CatalogPicker.js +281 -0
- package/dist/components/CatalogPicker/CatalogPicker.module.js +45 -0
- package/dist/components/CatalogPicker/index.d.ts +2 -0
- package/dist/components/Chart/Chart.css +324 -0
- package/dist/components/Chart/Chart.d.ts +52 -0
- package/dist/components/Chart/Chart.js +370 -0
- package/dist/components/Chart/Chart.module.js +63 -0
- package/dist/components/Chart/ChartLegend.d.ts +21 -0
- package/dist/components/Chart/ChartLegend.js +64 -0
- package/dist/components/Chart/ChartTable.d.ts +17 -0
- package/dist/components/Chart/ChartTable.js +41 -0
- package/dist/components/Chart/ChartTooltip.d.ts +26 -0
- package/dist/components/Chart/ChartTooltip.js +88 -0
- package/dist/components/Chart/chartModel.d.ts +188 -0
- package/dist/components/Chart/chartModel.js +449 -0
- package/dist/components/Chart/index.d.ts +2 -0
- package/dist/components/ChatBubble/ChatBubble.css +98 -0
- package/dist/components/ChatBubble/ChatBubble.d.ts +24 -0
- package/dist/components/ChatBubble/ChatBubble.js +38 -0
- package/dist/components/ChatBubble/ChatBubble.module.js +22 -0
- package/dist/components/ChatBubble/ChatBubbleList.d.ts +10 -0
- package/dist/components/ChatBubble/ChatBubbleList.js +20 -0
- package/dist/components/ChatBubble/index.d.ts +3 -0
- package/dist/components/ChatLauncher/ChatLauncher.css +83 -0
- package/dist/components/ChatLauncher/ChatLauncher.d.ts +27 -0
- package/dist/components/ChatLauncher/ChatLauncher.js +144 -0
- package/dist/components/ChatLauncher/ChatLauncher.module.js +17 -0
- package/dist/components/ChatLauncher/index.d.ts +2 -0
- package/dist/components/ChatLauncher/isAtBottom.d.ts +5 -0
- package/dist/components/ChatLauncher/isAtBottom.js +9 -0
- package/dist/components/Checkbox/Checkbox.css +143 -0
- package/dist/components/Checkbox/Checkbox.d.ts +64 -0
- package/dist/components/Checkbox/Checkbox.js +70 -0
- package/dist/components/Checkbox/Checkbox.module.js +20 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/CircularProgress/CircularProgress.css +115 -0
- package/dist/components/CircularProgress/CircularProgress.d.ts +61 -0
- package/dist/components/CircularProgress/CircularProgress.js +64 -0
- package/dist/components/CircularProgress/CircularProgress.module.js +32 -0
- package/dist/components/CircularProgress/index.d.ts +2 -0
- package/dist/components/Cluster/Cluster.css +107 -0
- package/dist/components/Cluster/Cluster.d.ts +143 -0
- package/dist/components/Cluster/Cluster.js +38 -0
- package/dist/components/Cluster/Cluster.module.js +45 -0
- package/dist/components/Cluster/index.d.ts +2 -0
- package/dist/components/Code/Code.css +36 -0
- package/dist/components/Code/Code.d.ts +21 -0
- package/dist/components/Code/Code.js +25 -0
- package/dist/components/Code/Code.module.js +15 -0
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.css +153 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +64 -0
- package/dist/components/CodeBlock/CodeBlock.js +147 -0
- package/dist/components/CodeBlock/CodeBlock.module.js +46 -0
- package/dist/components/CodeBlock/highlight.d.ts +11 -0
- package/dist/components/CodeBlock/highlight.js +159 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/CodeBlock/sampleSync.d.ts +10 -0
- package/dist/components/CodeBlock/sampleSync.js +35 -0
- package/dist/components/ColorPicker/ColorPicker.css +227 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +116 -0
- package/dist/components/ColorPicker/ColorPicker.js +171 -0
- package/dist/components/ColorPicker/ColorPicker.module.js +37 -0
- package/dist/components/ColorPicker/ColorPickerPanel.d.ts +39 -0
- package/dist/components/ColorPicker/ColorPickerPanel.js +169 -0
- package/dist/components/ColorPicker/SVSquare.d.ts +30 -0
- package/dist/components/ColorPicker/SVSquare.js +127 -0
- package/dist/components/ColorPicker/colorMath.d.ts +53 -0
- package/dist/components/ColorPicker/colorMath.js +102 -0
- package/dist/components/ColorPicker/index.d.ts +6 -0
- package/dist/components/ConfirmationPopover/ConfirmationPopover.css +52 -0
- package/dist/components/ConfirmationPopover/ConfirmationPopover.d.ts +118 -0
- package/dist/components/ConfirmationPopover/ConfirmationPopover.js +186 -0
- package/dist/components/ConfirmationPopover/ConfirmationPopover.module.js +12 -0
- package/dist/components/ConfirmationPopover/index.d.ts +2 -0
- package/dist/components/Constrain/Constrain.css +190 -0
- package/dist/components/Constrain/Constrain.d.ts +47 -0
- package/dist/components/Constrain/Constrain.js +19 -0
- package/dist/components/Constrain/Constrain.module.js +51 -0
- package/dist/components/Constrain/index.d.ts +2 -0
- package/dist/components/CurrencySelect/CurrencySelect.css +6 -0
- package/dist/components/CurrencySelect/CurrencySelect.d.ts +44 -0
- package/dist/components/CurrencySelect/CurrencySelect.js +68 -0
- package/dist/components/CurrencySelect/CurrencySelect.module.js +5 -0
- package/dist/components/CurrencySelect/index.d.ts +3 -0
- package/dist/components/CursorPagination/CursorPagination.css +82 -0
- package/dist/components/CursorPagination/CursorPagination.d.ts +52 -0
- package/dist/components/CursorPagination/CursorPagination.js +41 -0
- package/dist/components/CursorPagination/CursorPagination.module.js +12 -0
- package/dist/components/CursorPagination/index.d.ts +2 -0
- package/dist/components/DashboardCanvas/DashboardCanvas.css +220 -0
- package/dist/components/DashboardCanvas/DashboardCanvas.d.ts +92 -0
- package/dist/components/DashboardCanvas/DashboardCanvas.js +649 -0
- package/dist/components/DashboardCanvas/DashboardCanvas.module.js +35 -0
- package/dist/components/DashboardCanvas/DashboardCanvasItem.d.ts +51 -0
- package/dist/components/DashboardCanvas/DashboardCanvasItem.js +71 -0
- package/dist/components/DashboardCanvas/DashboardCanvasSection.d.ts +53 -0
- package/dist/components/DashboardCanvas/DashboardCanvasSection.js +102 -0
- package/dist/components/DashboardCanvas/engine.d.ts +131 -0
- package/dist/components/DashboardCanvas/engine.js +232 -0
- package/dist/components/DashboardCanvas/index.d.ts +4 -0
- package/dist/components/DashboardWidget/DashboardWidget.css +104 -0
- package/dist/components/DashboardWidget/DashboardWidget.d.ts +69 -0
- package/dist/components/DashboardWidget/DashboardWidget.js +84 -0
- package/dist/components/DashboardWidget/DashboardWidget.module.js +26 -0
- package/dist/components/DashboardWidget/index.d.ts +2 -0
- package/dist/components/DataTable/BodyRow.d.ts +29 -0
- package/dist/components/DataTable/BodyRow.js +138 -0
- package/dist/components/DataTable/ColumnVisibilityTrigger.d.ts +34 -0
- package/dist/components/DataTable/ColumnVisibilityTrigger.js +43 -0
- package/dist/components/DataTable/DataTable.css +726 -0
- package/dist/components/DataTable/DataTable.d.ts +95 -0
- package/dist/components/DataTable/DataTable.js +303 -0
- package/dist/components/DataTable/DataTable.module.js +53 -0
- package/dist/components/DataTable/HeaderCell.css +203 -0
- package/dist/components/DataTable/HeaderCell.d.ts +12 -0
- package/dist/components/DataTable/HeaderCell.js +190 -0
- package/dist/components/DataTable/HeaderCell.module.js +39 -0
- package/dist/components/DataTable/columnShift.d.ts +66 -0
- package/dist/components/DataTable/columnShift.js +46 -0
- package/dist/components/DataTable/index.d.ts +6 -0
- package/dist/components/DataTable/pinStyle.d.ts +27 -0
- package/dist/components/DataTable/pinStyle.js +28 -0
- package/dist/components/DataTable/reorderColumns.d.ts +29 -0
- package/dist/components/DataTable/reorderColumns.js +42 -0
- package/dist/components/DataTable/types.d.ts +254 -0
- package/dist/components/DataTable/useColumnDragShift.d.ts +85 -0
- package/dist/components/DataTable/useColumnDragShift.js +114 -0
- package/dist/components/DataTable/useDataTable.d.ts +60 -0
- package/dist/components/DataTable/useDataTable.js +305 -0
- package/dist/components/DataTable/useResizeHandle.d.ts +34 -0
- package/dist/components/DataTable/useResizeHandle.js +76 -0
- package/dist/components/DatePicker/DatePicker.css +251 -0
- package/dist/components/DatePicker/DatePicker.d.ts +72 -0
- package/dist/components/DatePicker/DatePicker.js +374 -0
- package/dist/components/DatePicker/DatePicker.module.js +26 -0
- package/dist/components/DatePicker/DatePickerGrid.css +253 -0
- package/dist/components/DatePicker/DatePickerGrid.d.ts +58 -0
- package/dist/components/DatePicker/DatePickerGrid.js +234 -0
- package/dist/components/DatePicker/DatePickerGrid.module.js +39 -0
- package/dist/components/DatePicker/InlineDatePicker.css +129 -0
- package/dist/components/DatePicker/InlineDatePicker.d.ts +59 -0
- package/dist/components/DatePicker/InlineDatePicker.js +98 -0
- package/dist/components/DatePicker/InlineDatePicker.module.js +11 -0
- package/dist/components/DatePicker/index.d.ts +4 -0
- package/dist/components/DatePicker/utils.d.ts +165 -0
- package/dist/components/DatePicker/utils.js +301 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +363 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +79 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +438 -0
- package/dist/components/DateRangePicker/DateRangePicker.module.js +36 -0
- package/dist/components/DateRangePicker/InlineDateRangePicker.css +241 -0
- package/dist/components/DateRangePicker/InlineDateRangePicker.d.ts +67 -0
- package/dist/components/DateRangePicker/InlineDateRangePicker.js +222 -0
- package/dist/components/DateRangePicker/InlineDateRangePicker.module.js +21 -0
- package/dist/components/DateRangePicker/index.d.ts +5 -0
- package/dist/components/DateRangePicker/utils.d.ts +62 -0
- package/dist/components/DateRangePicker/utils.js +128 -0
- package/dist/components/DateStrip/DateStrip.css +181 -0
- package/dist/components/DateStrip/DateStrip.d.ts +42 -0
- package/dist/components/DateStrip/DateStrip.js +144 -0
- package/dist/components/DateStrip/DateStrip.module.js +23 -0
- package/dist/components/DateStrip/index.d.ts +2 -0
- package/dist/components/DefinitionList/DefinitionList.css +89 -0
- package/dist/components/DefinitionList/DefinitionList.d.ts +74 -0
- package/dist/components/DefinitionList/DefinitionList.js +93 -0
- package/dist/components/DefinitionList/DefinitionList.module.js +15 -0
- package/dist/components/DefinitionList/index.d.ts +1 -0
- package/dist/components/Divider/Divider.css +136 -0
- package/dist/components/Divider/Divider.d.ts +36 -0
- package/dist/components/Divider/Divider.js +56 -0
- package/dist/components/Divider/Divider.module.js +23 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Dot/Dot.css +88 -0
- package/dist/components/Dot/Dot.d.ts +20 -0
- package/dist/components/Dot/Dot.js +25 -0
- package/dist/components/Dot/Dot.module.js +5 -0
- package/dist/components/Dot/index.d.ts +2 -0
- package/dist/components/Drawer/Body.d.ts +6 -0
- package/dist/components/Drawer/Body.js +15 -0
- package/dist/components/Drawer/Close.d.ts +13 -0
- package/dist/components/Drawer/Close.js +17 -0
- package/dist/components/Drawer/Content.d.ts +12 -0
- package/dist/components/Drawer/Content.js +77 -0
- package/dist/components/Drawer/Drawer.css +228 -0
- package/dist/components/Drawer/Drawer.d.ts +18 -0
- package/dist/components/Drawer/Drawer.js +18 -0
- package/dist/components/Drawer/Drawer.module.js +29 -0
- package/dist/components/Drawer/DrawerRoot.d.ts +37 -0
- package/dist/components/Drawer/DrawerRoot.js +89 -0
- package/dist/components/Drawer/Footer.d.ts +6 -0
- package/dist/components/Drawer/Footer.js +16 -0
- package/dist/components/Drawer/Header.d.ts +10 -0
- package/dist/components/Drawer/Header.js +54 -0
- package/dist/components/Drawer/Overlay.d.ts +13 -0
- package/dist/components/Drawer/Overlay.js +60 -0
- package/dist/components/Drawer/context.d.ts +34 -0
- package/dist/components/Drawer/context.js +10 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/useDragToClose.d.ts +24 -0
- package/dist/components/Drawer/useDragToClose.js +108 -0
- package/dist/components/DropdownMenu/CheckboxItem.d.ts +58 -0
- package/dist/components/DropdownMenu/CheckboxItem.js +76 -0
- package/dist/components/DropdownMenu/Content.d.ts +32 -0
- package/dist/components/DropdownMenu/Content.js +227 -0
- package/dist/components/DropdownMenu/DropdownMenu.css +324 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +27 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +27 -0
- package/dist/components/DropdownMenu/DropdownMenu.module.js +29 -0
- package/dist/components/DropdownMenu/Group.d.ts +33 -0
- package/dist/components/DropdownMenu/Group.js +43 -0
- package/dist/components/DropdownMenu/Item.d.ts +56 -0
- package/dist/components/DropdownMenu/Item.js +81 -0
- package/dist/components/DropdownMenu/ItemIndicator.d.ts +20 -0
- package/dist/components/DropdownMenu/ItemIndicator.js +16 -0
- package/dist/components/DropdownMenu/Radio.d.ts +77 -0
- package/dist/components/DropdownMenu/Radio.js +97 -0
- package/dist/components/DropdownMenu/Root.d.ts +20 -0
- package/dist/components/DropdownMenu/Root.js +62 -0
- package/dist/components/DropdownMenu/Sub.d.ts +58 -0
- package/dist/components/DropdownMenu/Sub.js +218 -0
- package/dist/components/DropdownMenu/Trigger.d.ts +16 -0
- package/dist/components/DropdownMenu/Trigger.js +38 -0
- package/dist/components/DropdownMenu/context.d.ts +43 -0
- package/dist/components/DropdownMenu/context.js +19 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/EmojiPicker/EmojiPicker.css +85 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +59 -0
- package/dist/components/EmojiPicker/EmojiPicker.js +221 -0
- package/dist/components/EmojiPicker/EmojiPicker.module.js +25 -0
- package/dist/components/EmojiPicker/emojiData.d.ts +18 -0
- package/dist/components/EmojiPicker/emojiData.js +968 -0
- package/dist/components/EmojiPicker/index.d.ts +3 -0
- package/dist/components/EmptyState/EmptyState.css +99 -0
- package/dist/components/EmptyState/EmptyState.d.ts +57 -0
- package/dist/components/EmptyState/EmptyState.js +39 -0
- package/dist/components/EmptyState/EmptyState.module.js +20 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EntityChip/EntityChip.css +220 -0
- package/dist/components/EntityChip/EntityChip.d.ts +279 -0
- package/dist/components/EntityChip/EntityChip.js +208 -0
- package/dist/components/EntityChip/EntityChip.module.js +47 -0
- package/dist/components/EntityChip/index.d.ts +3 -0
- package/dist/components/ErrorState/ErrorState.css +112 -0
- package/dist/components/ErrorState/ErrorState.d.ts +63 -0
- package/dist/components/ErrorState/ErrorState.js +44 -0
- package/dist/components/ErrorState/ErrorState.module.js +24 -0
- package/dist/components/ErrorState/index.d.ts +2 -0
- package/dist/components/Field/Field.css +43 -0
- package/dist/components/Field/Field.d.ts +58 -0
- package/dist/components/Field/Field.js +87 -0
- package/dist/components/Field/Field.module.js +21 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.css +181 -0
- package/dist/components/FileUpload/FileUpload.d.ts +136 -0
- package/dist/components/FileUpload/FileUpload.js +303 -0
- package/dist/components/FileUpload/FileUpload.module.js +43 -0
- package/dist/components/FileUpload/formatBytes.d.ts +21 -0
- package/dist/components/FileUpload/formatBytes.js +32 -0
- package/dist/components/FileUpload/iconForFile.d.ts +17 -0
- package/dist/components/FileUpload/iconForFile.js +28 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FilterChip/FilterChip.css +72 -0
- package/dist/components/FilterChip/FilterChip.d.ts +88 -0
- package/dist/components/FilterChip/FilterChip.js +84 -0
- package/dist/components/FilterChip/FilterChip.module.js +15 -0
- package/dist/components/FilterChip/index.d.ts +3 -0
- package/dist/components/FlowCanvas/FlowCanvas.css +287 -0
- package/dist/components/FlowCanvas/FlowCanvas.d.ts +118 -0
- package/dist/components/FlowCanvas/FlowCanvas.js +1151 -0
- package/dist/components/FlowCanvas/FlowCanvas.module.js +47 -0
- package/dist/components/FlowCanvas/FlowControls.d.ts +8 -0
- package/dist/components/FlowCanvas/FlowControls.js +51 -0
- package/dist/components/FlowCanvas/FlowEdge.d.ts +18 -0
- package/dist/components/FlowCanvas/FlowEdge.js +29 -0
- package/dist/components/FlowCanvas/FlowNode.d.ts +19 -0
- package/dist/components/FlowCanvas/FlowNode.js +48 -0
- package/dist/components/FlowCanvas/edgePath.d.ts +31 -0
- package/dist/components/FlowCanvas/edgePath.js +88 -0
- package/dist/components/FlowCanvas/index.d.ts +4 -0
- package/dist/components/FlowCanvas/layout.d.ts +35 -0
- package/dist/components/FlowCanvas/layout.js +119 -0
- package/dist/components/FlowCanvas/spatialNav.d.ts +12 -0
- package/dist/components/FlowCanvas/spatialNav.js +63 -0
- package/dist/components/FlowCanvas/types.d.ts +58 -0
- package/dist/components/FlowCanvas/useViewport.d.ts +35 -0
- package/dist/components/FlowCanvas/useViewport.js +90 -0
- package/dist/components/FormRow/FormRow.d.ts +17 -0
- package/dist/components/FormRow/FormRow.js +26 -0
- package/dist/components/FormRow/index.d.ts +2 -0
- package/dist/components/FormSection/FormSection.css +22 -0
- package/dist/components/FormSection/FormSection.d.ts +17 -0
- package/dist/components/FormSection/FormSection.js +37 -0
- package/dist/components/FormSection/FormSection.module.js +11 -0
- package/dist/components/FormSection/index.d.ts +2 -0
- package/dist/components/FunnelChart/FunnelChart.css +322 -0
- package/dist/components/FunnelChart/FunnelChart.d.ts +44 -0
- package/dist/components/FunnelChart/FunnelChart.js +462 -0
- package/dist/components/FunnelChart/FunnelChart.module.js +47 -0
- package/dist/components/FunnelChart/funnelModel.d.ts +64 -0
- package/dist/components/FunnelChart/funnelModel.js +69 -0
- package/dist/components/FunnelChart/index.d.ts +2 -0
- package/dist/components/Grid/Grid.css +122 -0
- package/dist/components/Grid/Grid.d.ts +99 -0
- package/dist/components/Grid/Grid.js +67 -0
- package/dist/components/Grid/Grid.module.js +53 -0
- package/dist/components/Grid/GridItem.d.ts +23 -0
- package/dist/components/Grid/GridItem.js +28 -0
- package/dist/components/Grid/index.d.ts +3 -0
- package/dist/components/Highlight/Highlight.css +68 -0
- package/dist/components/Highlight/Highlight.d.ts +56 -0
- package/dist/components/Highlight/Highlight.js +82 -0
- package/dist/components/Highlight/Highlight.module.js +8 -0
- package/dist/components/Highlight/HighlightOverlay.d.ts +30 -0
- package/dist/components/Highlight/HighlightOverlay.js +82 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/HighlightedText/HighlightedText.css +12 -0
- package/dist/components/HighlightedText/HighlightedText.d.ts +22 -0
- package/dist/components/HighlightedText/HighlightedText.js +24 -0
- package/dist/components/HighlightedText/HighlightedText.module.js +5 -0
- package/dist/components/HighlightedText/highlightRanges.d.ts +18 -0
- package/dist/components/HighlightedText/highlightRanges.js +32 -0
- package/dist/components/HighlightedText/index.d.ts +2 -0
- package/dist/components/IconPicker/IconPicker.css +193 -0
- package/dist/components/IconPicker/IconPicker.d.ts +107 -0
- package/dist/components/IconPicker/IconPicker.js +392 -0
- package/dist/components/IconPicker/IconPicker.module.js +34 -0
- package/dist/components/IconPicker/index.d.ts +2 -0
- package/dist/components/IconTile/IconTile.css +55 -0
- package/dist/components/IconTile/IconTile.d.ts +52 -0
- package/dist/components/IconTile/IconTile.js +34 -0
- package/dist/components/IconTile/IconTile.module.js +14 -0
- package/dist/components/IconTile/index.d.ts +2 -0
- package/dist/components/Image/Image.css +245 -0
- package/dist/components/Image/Image.d.ts +102 -0
- package/dist/components/Image/Image.js +111 -0
- package/dist/components/Image/Image.module.js +43 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/ImageCrop/ImageCrop.css +222 -0
- package/dist/components/ImageCrop/ImageCrop.d.ts +64 -0
- package/dist/components/ImageCrop/ImageCrop.js +353 -0
- package/dist/components/ImageCrop/ImageCrop.module.js +45 -0
- package/dist/components/ImageCrop/cropGeometry.d.ts +25 -0
- package/dist/components/ImageCrop/cropGeometry.js +92 -0
- package/dist/components/ImageCrop/extractCropBlob.d.ts +72 -0
- package/dist/components/ImageCrop/extractCropBlob.js +74 -0
- package/dist/components/ImageCrop/index.d.ts +6 -0
- package/dist/components/ImageCrop/useCropPreview.d.ts +100 -0
- package/dist/components/ImageCrop/useCropPreview.js +122 -0
- package/dist/components/Indent/Indent.css +36 -0
- package/dist/components/Indent/Indent.d.ts +22 -0
- package/dist/components/Indent/Indent.js +24 -0
- package/dist/components/Indent/Indent.module.js +13 -0
- package/dist/components/Indent/index.d.ts +2 -0
- package/dist/components/Input/Input.css +120 -0
- package/dist/components/Input/Input.d.ts +59 -0
- package/dist/components/Input/Input.js +34 -0
- package/dist/components/Input/Input.module.js +18 -0
- package/dist/components/Input/Suggestions.d.ts +17 -0
- package/dist/components/Input/Suggestions.js +180 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Kanban/Kanban.css +47 -0
- package/dist/components/Kanban/Kanban.d.ts +157 -0
- package/dist/components/Kanban/Kanban.js +494 -0
- package/dist/components/Kanban/Kanban.module.js +11 -0
- package/dist/components/Kanban/index.d.ts +1 -0
- package/dist/components/Kbd/Kbd.css +63 -0
- package/dist/components/Kbd/Kbd.d.ts +36 -0
- package/dist/components/Kbd/Kbd.js +35 -0
- package/dist/components/Kbd/Kbd.module.js +15 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Lightbox/Lightbox.css +249 -0
- package/dist/components/Lightbox/Lightbox.d.ts +75 -0
- package/dist/components/Lightbox/Lightbox.js +313 -0
- package/dist/components/Lightbox/Lightbox.module.js +45 -0
- package/dist/components/Lightbox/index.d.ts +2 -0
- package/dist/components/Link/Link.css +71 -0
- package/dist/components/Link/Link.d.ts +65 -0
- package/dist/components/Link/Link.js +28 -0
- package/dist/components/Link/Link.module.js +16 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/LinkCard/LinkCard.css +101 -0
- package/dist/components/LinkCard/LinkCard.d.ts +28 -0
- package/dist/components/LinkCard/LinkCard.js +28 -0
- package/dist/components/LinkCard/LinkCard.module.js +15 -0
- package/dist/components/LinkCard/index.d.ts +2 -0
- package/dist/components/LiquidEditor/AutocompleteMenu.d.ts +24 -0
- package/dist/components/LiquidEditor/AutocompleteMenu.js +91 -0
- package/dist/components/LiquidEditor/HighlightLayer.d.ts +14 -0
- package/dist/components/LiquidEditor/HighlightLayer.js +38 -0
- package/dist/components/LiquidEditor/InsertVariableMenu.d.ts +17 -0
- package/dist/components/LiquidEditor/InsertVariableMenu.js +49 -0
- package/dist/components/LiquidEditor/LiquidEditor.css +298 -0
- package/dist/components/LiquidEditor/LiquidEditor.d.ts +6 -0
- package/dist/components/LiquidEditor/LiquidEditor.js +284 -0
- package/dist/components/LiquidEditor/LiquidEditor.module.js +73 -0
- package/dist/components/LiquidEditor/PreviewPane.d.ts +10 -0
- package/dist/components/LiquidEditor/PreviewPane.js +21 -0
- package/dist/components/LiquidEditor/caretCoordinates.d.ts +9 -0
- package/dist/components/LiquidEditor/caretCoordinates.js +68 -0
- package/dist/components/LiquidEditor/index.d.ts +2 -0
- package/dist/components/LiquidEditor/liquidFilters.d.ts +2 -0
- package/dist/components/LiquidEditor/liquidFilters.js +21 -0
- package/dist/components/LiquidEditor/liquidTokenizer.d.ts +27 -0
- package/dist/components/LiquidEditor/liquidTokenizer.js +163 -0
- package/dist/components/LiquidEditor/types.d.ts +97 -0
- package/dist/components/LiquidEditor/useLiquidAutocomplete.d.ts +78 -0
- package/dist/components/LiquidEditor/useLiquidAutocomplete.js +117 -0
- package/dist/components/List/List.css +120 -0
- package/dist/components/List/List.d.ts +47 -0
- package/dist/components/List/List.js +60 -0
- package/dist/components/List/List.module.js +19 -0
- package/dist/components/List/index.d.ts +1 -0
- package/dist/components/LiveRegion/LiveRegion.d.ts +41 -0
- package/dist/components/LiveRegion/LiveRegion.js +53 -0
- package/dist/components/LiveRegion/index.d.ts +2 -0
- package/dist/components/Logo/Logo.css +95 -0
- package/dist/components/Logo/Logo.d.ts +42 -0
- package/dist/components/Logo/Logo.js +72 -0
- package/dist/components/Logo/Logo.module.js +27 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/Masonry/Masonry.css +49 -0
- package/dist/components/Masonry/Masonry.d.ts +25 -0
- package/dist/components/Masonry/Masonry.js +80 -0
- package/dist/components/Masonry/Masonry.module.js +23 -0
- package/dist/components/Masonry/index.d.ts +2 -0
- package/dist/components/Masonry/masonryUtils.d.ts +8 -0
- package/dist/components/Masonry/masonryUtils.js +36 -0
- package/dist/components/MediaTile/MediaTile.css +204 -0
- package/dist/components/MediaTile/MediaTile.d.ts +81 -0
- package/dist/components/MediaTile/MediaTile.js +81 -0
- package/dist/components/MediaTile/MediaTile.module.js +43 -0
- package/dist/components/MediaTile/index.d.ts +2 -0
- package/dist/components/Modal/Body.d.ts +10 -0
- package/dist/components/Modal/Body.js +19 -0
- package/dist/components/Modal/Close.d.ts +14 -0
- package/dist/components/Modal/Close.js +19 -0
- package/dist/components/Modal/Content.d.ts +15 -0
- package/dist/components/Modal/Content.js +79 -0
- package/dist/components/Modal/Footer.d.ts +10 -0
- package/dist/components/Modal/Footer.js +20 -0
- package/dist/components/Modal/Header.d.ts +10 -0
- package/dist/components/Modal/Header.js +46 -0
- package/dist/components/Modal/Modal.css +202 -0
- package/dist/components/Modal/Modal.d.ts +18 -0
- package/dist/components/Modal/Modal.js +18 -0
- package/dist/components/Modal/Modal.module.js +26 -0
- package/dist/components/Modal/ModalRoot.d.ts +111 -0
- package/dist/components/Modal/ModalRoot.js +95 -0
- package/dist/components/Modal/Overlay.d.ts +21 -0
- package/dist/components/Modal/Overlay.js +68 -0
- package/dist/components/Modal/context.d.ts +49 -0
- package/dist/components/Modal/context.js +10 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/MoneyInput/MoneyInput.css +90 -0
- package/dist/components/MoneyInput/MoneyInput.d.ts +52 -0
- package/dist/components/MoneyInput/MoneyInput.js +298 -0
- package/dist/components/MoneyInput/MoneyInput.module.js +18 -0
- package/dist/components/MoneyInput/index.d.ts +2 -0
- package/dist/components/OptionsPicker/OptionsPicker.css +174 -0
- package/dist/components/OptionsPicker/OptionsPicker.d.ts +135 -0
- package/dist/components/OptionsPicker/OptionsPicker.js +557 -0
- package/dist/components/OptionsPicker/OptionsPicker.module.js +41 -0
- package/dist/components/OptionsPicker/index.d.ts +2 -0
- package/dist/components/OtpInput/OtpInput.css +121 -0
- package/dist/components/OtpInput/OtpInput.d.ts +92 -0
- package/dist/components/OtpInput/OtpInput.js +141 -0
- package/dist/components/OtpInput/OtpInput.module.js +15 -0
- package/dist/components/OtpInput/index.d.ts +2 -0
- package/dist/components/Page/Page.css +37 -0
- package/dist/components/Page/Page.d.ts +24 -0
- package/dist/components/Page/Page.js +27 -0
- package/dist/components/Page/Page.module.js +19 -0
- package/dist/components/Page/index.d.ts +2 -0
- package/dist/components/PageHeader/PageHeader.css +136 -0
- package/dist/components/PageHeader/PageHeader.d.ts +135 -0
- package/dist/components/PageHeader/PageHeader.js +185 -0
- package/dist/components/PageHeader/PageHeader.module.js +27 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.css +133 -0
- package/dist/components/Pagination/Pagination.d.ts +53 -0
- package/dist/components/Pagination/Pagination.js +82 -0
- package/dist/components/Pagination/Pagination.module.js +20 -0
- package/dist/components/Pagination/index.d.ts +4 -0
- package/dist/components/Pagination/paginationRange.d.ts +27 -0
- package/dist/components/Pagination/paginationRange.js +40 -0
- package/dist/components/PasswordInput/PasswordInput.css +113 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +47 -0
- package/dist/components/PasswordInput/PasswordInput.js +116 -0
- package/dist/components/PasswordInput/PasswordInput.module.js +20 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/PasswordStrengthMeter/PasswordStrengthMeter.css +89 -0
- package/dist/components/PasswordStrengthMeter/PasswordStrengthMeter.d.ts +28 -0
- package/dist/components/PasswordStrengthMeter/PasswordStrengthMeter.js +68 -0
- package/dist/components/PasswordStrengthMeter/PasswordStrengthMeter.module.js +21 -0
- package/dist/components/PasswordStrengthMeter/index.d.ts +2 -0
- package/dist/components/PersonDisplay/PersonDisplay.css +92 -0
- package/dist/components/PersonDisplay/PersonDisplay.d.ts +99 -0
- package/dist/components/PersonDisplay/PersonDisplay.js +214 -0
- package/dist/components/PersonDisplay/PersonDisplay.module.js +23 -0
- package/dist/components/PersonDisplay/index.d.ts +2 -0
- package/dist/components/PhoneInput/PhoneInput.css +21 -0
- package/dist/components/PhoneInput/PhoneInput.d.ts +61 -0
- package/dist/components/PhoneInput/PhoneInput.js +124 -0
- package/dist/components/PhoneInput/PhoneInput.module.js +13 -0
- package/dist/components/PhoneInput/index.d.ts +4 -0
- package/dist/components/PhoneInput/phone.d.ts +50 -0
- package/dist/components/PhoneInput/phone.js +80 -0
- package/dist/components/PillMenu/PillMenu.css +210 -0
- package/dist/components/PillMenu/PillMenu.d.ts +116 -0
- package/dist/components/PillMenu/PillMenu.js +135 -0
- package/dist/components/PillMenu/PillMenu.module.js +23 -0
- package/dist/components/PillMenu/index.d.ts +2 -0
- package/dist/components/Popover/Anchor.d.ts +23 -0
- package/dist/components/Popover/Anchor.js +16 -0
- package/dist/components/Popover/Close.d.ts +14 -0
- package/dist/components/Popover/Close.js +19 -0
- package/dist/components/Popover/Content.d.ts +30 -0
- package/dist/components/Popover/Content.js +127 -0
- package/dist/components/Popover/Heading.d.ts +294 -0
- package/dist/components/Popover/Heading.js +23 -0
- package/dist/components/Popover/Popover.css +145 -0
- package/dist/components/Popover/Popover.d.ts +15 -0
- package/dist/components/Popover/Popover.js +15 -0
- package/dist/components/Popover/Popover.module.js +9 -0
- package/dist/components/Popover/PopoverRoot.d.ts +29 -0
- package/dist/components/Popover/PopoverRoot.js +42 -0
- package/dist/components/Popover/Trigger.d.ts +25 -0
- package/dist/components/Popover/Trigger.js +35 -0
- package/dist/components/Popover/context.d.ts +13 -0
- package/dist/components/Popover/context.js +10 -0
- package/dist/components/Popover/index.d.ts +7 -0
- package/dist/components/Progress/Progress.css +103 -0
- package/dist/components/Progress/Progress.d.ts +64 -0
- package/dist/components/Progress/Progress.js +51 -0
- package/dist/components/Progress/Progress.module.js +30 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/QrCode/QrCode.css +79 -0
- package/dist/components/QrCode/QrCode.d.ts +36 -0
- package/dist/components/QrCode/QrCode.js +141 -0
- package/dist/components/QrCode/QrCode.module.js +21 -0
- package/dist/components/QrCode/index.d.ts +2 -0
- package/dist/components/QrCode/qr.d.ts +59 -0
- package/dist/components/QrCode/qr.js +113 -0
- package/dist/components/Radio/Radio.css +176 -0
- package/dist/components/Radio/Radio.d.ts +48 -0
- package/dist/components/Radio/Radio.js +53 -0
- package/dist/components/Radio/Radio.module.js +22 -0
- package/dist/components/Radio/RadioGroup.css +69 -0
- package/dist/components/Radio/RadioGroup.d.ts +34 -0
- package/dist/components/Radio/RadioGroup.js +54 -0
- package/dist/components/Radio/RadioGroup.module.js +15 -0
- package/dist/components/Radio/RadioGroupContext.d.ts +25 -0
- package/dist/components/Radio/RadioGroupContext.js +13 -0
- package/dist/components/Radio/index.d.ts +4 -0
- package/dist/components/Rail/Rail.css +423 -0
- package/dist/components/Rail/Rail.d.ts +134 -0
- package/dist/components/Rail/Rail.js +116 -0
- package/dist/components/Rail/Rail.module.js +57 -0
- package/dist/components/Rail/RailCollapseToggle.d.ts +14 -0
- package/dist/components/Rail/RailCollapseToggle.js +40 -0
- package/dist/components/Rail/RailFooter.d.ts +7 -0
- package/dist/components/Rail/RailFooter.js +18 -0
- package/dist/components/Rail/RailGroup.d.ts +60 -0
- package/dist/components/Rail/RailGroup.js +445 -0
- package/dist/components/Rail/RailGroupContext.d.ts +2 -0
- package/dist/components/Rail/RailGroupContext.js +6 -0
- package/dist/components/Rail/RailHeader.d.ts +7 -0
- package/dist/components/Rail/RailHeader.js +22 -0
- package/dist/components/Rail/RailItem.d.ts +50 -0
- package/dist/components/Rail/RailItem.js +47 -0
- package/dist/components/Rail/RailSection.d.ts +18 -0
- package/dist/components/Rail/RailSection.js +24 -0
- package/dist/components/Rail/RailSpacer.d.ts +7 -0
- package/dist/components/Rail/RailSpacer.js +19 -0
- package/dist/components/Rail/index.d.ts +9 -0
- package/dist/components/RelativeDateInput/RelativeDateInput.css +15 -0
- package/dist/components/RelativeDateInput/RelativeDateInput.d.ts +39 -0
- package/dist/components/RelativeDateInput/RelativeDateInput.js +397 -0
- package/dist/components/RelativeDateInput/RelativeDateInput.module.js +11 -0
- package/dist/components/RelativeDateInput/index.d.ts +4 -0
- package/dist/components/RelativeDateInput/relativeDate.d.ts +46 -0
- package/dist/components/RelativeDateInput/relativeDate.js +110 -0
- package/dist/components/RichText/RichText.css +61 -0
- package/dist/components/RichText/RichText.d.ts +48 -0
- package/dist/components/RichText/RichText.js +25 -0
- package/dist/components/RichText/RichText.module.js +5 -0
- package/dist/components/RichText/RichTextAttachment.css +51 -0
- package/dist/components/RichText/RichTextAttachment.d.ts +5 -0
- package/dist/components/RichText/RichTextAttachment.js +104 -0
- package/dist/components/RichText/RichTextAttachment.module.js +19 -0
- package/dist/components/RichText/attachmentIcon.d.ts +1 -0
- package/dist/components/RichText/attachmentIcon.js +21 -0
- package/dist/components/RichText/engine/attachment.d.ts +67 -0
- package/dist/components/RichText/engine/attachment.js +127 -0
- package/dist/components/RichText/engine/autolink.d.ts +10 -0
- package/dist/components/RichText/engine/autolink.js +77 -0
- package/dist/components/RichText/engine/blockUnit.d.ts +53 -0
- package/dist/components/RichText/engine/blockUnit.js +223 -0
- package/dist/components/RichText/engine/colorMarks.d.ts +18 -0
- package/dist/components/RichText/engine/colorMarks.js +59 -0
- package/dist/components/RichText/engine/escape.d.ts +4 -0
- package/dist/components/RichText/engine/escape.js +16 -0
- package/dist/components/RichText/engine/fromHtml.d.ts +11 -0
- package/dist/components/RichText/engine/fromHtml.js +346 -0
- package/dist/components/RichText/engine/fromMarkdown.d.ts +11 -0
- package/dist/components/RichText/engine/fromMarkdown.js +16 -0
- package/dist/components/RichText/engine/inlines.d.ts +22 -0
- package/dist/components/RichText/engine/inlines.js +88 -0
- package/dist/components/RichText/engine/listDepths.d.ts +11 -0
- package/dist/components/RichText/engine/listDepths.js +28 -0
- package/dist/components/RichText/engine/marks.d.ts +31 -0
- package/dist/components/RichText/engine/marks.js +60 -0
- package/dist/components/RichText/engine/mdToHtml.d.ts +2 -0
- package/dist/components/RichText/engine/mdToHtml.js +156 -0
- package/dist/components/RichText/engine/model.d.ts +124 -0
- package/dist/components/RichText/engine/model.js +39 -0
- package/dist/components/RichText/engine/position.d.ts +55 -0
- package/dist/components/RichText/engine/position.js +125 -0
- package/dist/components/RichText/engine/renderDoc.d.ts +41 -0
- package/dist/components/RichText/engine/renderDoc.js +257 -0
- package/dist/components/RichText/engine/renderLink.d.ts +13 -0
- package/dist/components/RichText/engine/renderMention.d.ts +14 -0
- package/dist/components/RichText/engine/safeHref.d.ts +1 -0
- package/dist/components/RichText/engine/safeHref.js +9 -0
- package/dist/components/RichText/engine/toHtml.d.ts +15 -0
- package/dist/components/RichText/engine/toHtml.js +117 -0
- package/dist/components/RichText/engine/toMarkdown.d.ts +13 -0
- package/dist/components/RichText/engine/toMarkdown.js +84 -0
- package/dist/components/RichText/engine/transforms.d.ts +120 -0
- package/dist/components/RichText/engine/transforms.js +516 -0
- package/dist/components/RichText/imageMaxHeightStyle.d.ts +3 -0
- package/dist/components/RichText/imageMaxHeightStyle.js +10 -0
- package/dist/components/RichText/index.d.ts +9 -0
- package/dist/components/RichTextEditor/RichTextAttachmentConfig.d.ts +34 -0
- package/dist/components/RichTextEditor/RichTextAttachmentConfig.js +207 -0
- package/dist/components/RichTextEditor/RichTextBlockControls.d.ts +62 -0
- package/dist/components/RichTextEditor/RichTextBlockControls.js +211 -0
- package/dist/components/RichTextEditor/RichTextBlockMenu.d.ts +28 -0
- package/dist/components/RichTextEditor/RichTextBlockMenu.js +137 -0
- package/dist/components/RichTextEditor/RichTextColorMenu.d.ts +23 -0
- package/dist/components/RichTextEditor/RichTextColorMenu.js +99 -0
- package/dist/components/RichTextEditor/RichTextEditor.css +280 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +127 -0
- package/dist/components/RichTextEditor/RichTextEditor.js +1156 -0
- package/dist/components/RichTextEditor/RichTextEditor.module.js +55 -0
- package/dist/components/RichTextEditor/RichTextImageResizer.d.ts +36 -0
- package/dist/components/RichTextEditor/RichTextImageResizer.js +69 -0
- package/dist/components/RichTextEditor/RichTextLinkEditor.d.ts +28 -0
- package/dist/components/RichTextEditor/RichTextLinkEditor.js +97 -0
- package/dist/components/RichTextEditor/RichTextMentionMenu.d.ts +23 -0
- package/dist/components/RichTextEditor/RichTextMentionMenu.js +56 -0
- package/dist/components/RichTextEditor/RichTextToolbar.d.ts +73 -0
- package/dist/components/RichTextEditor/RichTextToolbar.js +275 -0
- package/dist/components/RichTextEditor/autolinkInput.d.ts +20 -0
- package/dist/components/RichTextEditor/autolinkInput.js +69 -0
- package/dist/components/RichTextEditor/blockDrop.d.ts +4 -0
- package/dist/components/RichTextEditor/blockDrop.js +6 -0
- package/dist/components/RichTextEditor/blockReflow.d.ts +26 -0
- package/dist/components/RichTextEditor/blockReflow.js +32 -0
- package/dist/components/RichTextEditor/commands.d.ts +105 -0
- package/dist/components/RichTextEditor/commands.js +255 -0
- package/dist/components/RichTextEditor/history.d.ts +35 -0
- package/dist/components/RichTextEditor/history.js +62 -0
- package/dist/components/RichTextEditor/icons.d.ts +15 -0
- package/dist/components/RichTextEditor/icons.js +298 -0
- package/dist/components/RichTextEditor/imageSize.d.ts +30 -0
- package/dist/components/RichTextEditor/imageSize.js +51 -0
- package/dist/components/RichTextEditor/index.d.ts +5 -0
- package/dist/components/RichTextEditor/input.d.ts +38 -0
- package/dist/components/RichTextEditor/input.js +166 -0
- package/dist/components/RichTextEditor/inputRules.d.ts +27 -0
- package/dist/components/RichTextEditor/inputRules.js +63 -0
- package/dist/components/RichTextEditor/links.d.ts +32 -0
- package/dist/components/RichTextEditor/links.js +87 -0
- package/dist/components/RichTextEditor/mentionContext.d.ts +17 -0
- package/dist/components/RichTextEditor/mentionContext.js +27 -0
- package/dist/components/RichTextEditor/mentions.d.ts +25 -0
- package/dist/components/RichTextEditor/preventSelectionLoss.d.ts +10 -0
- package/dist/components/RichTextEditor/preventSelectionLoss.js +13 -0
- package/dist/components/RichTextEditor/selection.d.ts +86 -0
- package/dist/components/RichTextEditor/selection.js +371 -0
- package/dist/components/RichTextEditor/shortcuts.d.ts +30 -0
- package/dist/components/RichTextEditor/shortcuts.js +28 -0
- package/dist/components/RichTextEditor/useAnchoredFloating.d.ts +33 -0
- package/dist/components/RichTextEditor/useAnchoredFloating.js +42 -0
- package/dist/components/RichTextEditor/useAttachmentConfig.d.ts +52 -0
- package/dist/components/RichTextEditor/useAttachmentConfig.js +57 -0
- package/dist/components/RichTextEditor/useDismissOnOutsidePointerDown.d.ts +8 -0
- package/dist/components/RichTextEditor/useDismissOnOutsidePointerDown.js +19 -0
- package/dist/components/RichTextEditor/useLinkEditor.d.ts +48 -0
- package/dist/components/RichTextEditor/useLinkEditor.js +86 -0
- package/dist/components/RichTextEditor/useMention.d.ts +44 -0
- package/dist/components/RichTextEditor/useMention.js +147 -0
- package/dist/components/RichTextEditor/useOverlayRect.d.ts +25 -0
- package/dist/components/RichTextEditor/useOverlayRect.js +56 -0
- package/dist/components/RichTextEditor/useUpload.d.ts +73 -0
- package/dist/components/RichTextEditor/useUpload.js +135 -0
- package/dist/components/Screen/Screen.css +54 -0
- package/dist/components/Screen/Screen.d.ts +39 -0
- package/dist/components/Screen/Screen.js +46 -0
- package/dist/components/Screen/Screen.module.js +23 -0
- package/dist/components/Screen/index.d.ts +2 -0
- package/dist/components/ScrollArea/ScrollArea.css +32 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +25 -0
- package/dist/components/ScrollArea/ScrollArea.js +89 -0
- package/dist/components/ScrollArea/ScrollArea.module.js +10 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/Select/Chip.d.ts +18 -0
- package/dist/components/Select/Chip.js +38 -0
- package/dist/components/Select/Empty.d.ts +25 -0
- package/dist/components/Select/Empty.js +28 -0
- package/dist/components/Select/Error.d.ts +28 -0
- package/dist/components/Select/Error.js +34 -0
- package/dist/components/Select/HiddenInputs.d.ts +15 -0
- package/dist/components/Select/HiddenInputs.js +38 -0
- package/dist/components/Select/Listbox.d.ts +11 -0
- package/dist/components/Select/Listbox.js +371 -0
- package/dist/components/Select/Loading.d.ts +19 -0
- package/dist/components/Select/Loading.js +35 -0
- package/dist/components/Select/Select.css +537 -0
- package/dist/components/Select/Select.d.ts +274 -0
- package/dist/components/Select/Select.js +215 -0
- package/dist/components/Select/Select.module.js +78 -0
- package/dist/components/Select/Trigger.d.ts +24 -0
- package/dist/components/Select/Trigger.js +652 -0
- package/dist/components/Select/context.d.ts +76 -0
- package/dist/components/Select/context.js +14 -0
- package/dist/components/Select/emptyStateText.d.ts +11 -0
- package/dist/components/Select/emptyStateText.js +14 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/useSelectState.d.ts +60 -0
- package/dist/components/Select/useSelectState.js +59 -0
- package/dist/components/Select/utils-types.d.ts +2 -0
- package/dist/components/Select/utils.d.ts +64 -0
- package/dist/components/Select/utils.js +98 -0
- package/dist/components/SettingRow/SettingRow.css +129 -0
- package/dist/components/SettingRow/SettingRow.d.ts +99 -0
- package/dist/components/SettingRow/SettingRow.js +104 -0
- package/dist/components/SettingRow/SettingRow.module.js +33 -0
- package/dist/components/SettingRow/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.css +49 -0
- package/dist/components/Skeleton/Skeleton.d.ts +56 -0
- package/dist/components/Skeleton/Skeleton.js +41 -0
- package/dist/components/Skeleton/Skeleton.module.js +13 -0
- package/dist/components/Skeleton/index.d.ts +4 -0
- package/dist/components/Skeleton/useSkeletonVisibility.d.ts +35 -0
- package/dist/components/Skeleton/useSkeletonVisibility.js +73 -0
- package/dist/components/Slider/Slider.css +282 -0
- package/dist/components/Slider/Slider.d.ts +120 -0
- package/dist/components/Slider/Slider.js +344 -0
- package/dist/components/Slider/Slider.module.js +34 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/SlotGrid/SlotGrid.css +162 -0
- package/dist/components/SlotGrid/SlotGrid.d.ts +43 -0
- package/dist/components/SlotGrid/SlotGrid.js +55 -0
- package/dist/components/SlotGrid/SlotGrid.module.js +17 -0
- package/dist/components/SlotGrid/index.d.ts +2 -0
- package/dist/components/SocialButton/SocialButton.d.ts +23 -0
- package/dist/components/SocialButton/SocialButton.js +29 -0
- package/dist/components/SocialButton/index.d.ts +2 -0
- package/dist/components/Sortable/Sortable.css +127 -0
- package/dist/components/Sortable/Sortable.d.ts +146 -0
- package/dist/components/Sortable/Sortable.js +262 -0
- package/dist/components/Sortable/Sortable.module.js +31 -0
- package/dist/components/Sortable/containerAwareCollision.d.ts +56 -0
- package/dist/components/Sortable/containerAwareCollision.js +105 -0
- package/dist/components/Sortable/index.d.ts +2 -0
- package/dist/components/SortableGroup/SortableGroup.css +31 -0
- package/dist/components/SortableGroup/SortableGroup.d.ts +27 -0
- package/dist/components/SortableGroup/SortableGroup.js +227 -0
- package/dist/components/SortableGroup/SortableGroup.module.js +11 -0
- package/dist/components/SortableGroup/index.d.ts +4 -0
- package/dist/components/SortableGroup/moveSortableItem.d.ts +25 -0
- package/dist/components/SortableGroup/moveSortableItem.js +26 -0
- package/dist/components/Sparkline/Sparkline.css +33 -0
- package/dist/components/Sparkline/Sparkline.d.ts +30 -0
- package/dist/components/Sparkline/Sparkline.js +96 -0
- package/dist/components/Sparkline/Sparkline.module.js +17 -0
- package/dist/components/Sparkline/index.d.ts +2 -0
- package/dist/components/Sparkline/sparklineModel.d.ts +34 -0
- package/dist/components/Sparkline/sparklineModel.js +58 -0
- package/dist/components/Split/Split.css +114 -0
- package/dist/components/Split/Split.d.ts +96 -0
- package/dist/components/Split/Split.js +90 -0
- package/dist/components/Split/Split.module.js +43 -0
- package/dist/components/Split/index.d.ts +2 -0
- package/dist/components/Stack/Stack.css +57 -0
- package/dist/components/Stack/Stack.d.ts +61 -0
- package/dist/components/Stack/Stack.js +32 -0
- package/dist/components/Stack/Stack.module.js +29 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/StagePath/StagePath.css +220 -0
- package/dist/components/StagePath/StagePath.d.ts +38 -0
- package/dist/components/StagePath/StagePath.js +86 -0
- package/dist/components/StagePath/StagePath.module.js +21 -0
- package/dist/components/StagePath/index.d.ts +2 -0
- package/dist/components/StatGroup/StatGroup.css +5 -0
- package/dist/components/StatGroup/StatGroup.d.ts +35 -0
- package/dist/components/StatGroup/StatGroup.js +32 -0
- package/dist/components/StatGroup/StatGroup.module.js +5 -0
- package/dist/components/StatGroup/StatGroupContext.d.ts +7 -0
- package/dist/components/StatGroup/StatGroupContext.js +9 -0
- package/dist/components/StatGroup/StatTile.css +141 -0
- package/dist/components/StatGroup/StatTile.d.ts +54 -0
- package/dist/components/StatGroup/StatTile.js +100 -0
- package/dist/components/StatGroup/StatTile.module.js +23 -0
- package/dist/components/StatGroup/index.d.ts +4 -0
- package/dist/components/Sticky/Sticky.css +61 -0
- package/dist/components/Sticky/Sticky.d.ts +51 -0
- package/dist/components/Sticky/Sticky.js +39 -0
- package/dist/components/Sticky/Sticky.module.js +20 -0
- package/dist/components/Sticky/index.d.ts +2 -0
- package/dist/components/Switch/Switch.css +211 -0
- package/dist/components/Switch/Switch.d.ts +86 -0
- package/dist/components/Switch/Switch.js +86 -0
- package/dist/components/Switch/Switch.module.js +31 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.css +245 -0
- package/dist/components/Table/Table.d.ts +149 -0
- package/dist/components/Table/Table.js +136 -0
- package/dist/components/Table/Table.module.js +52 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/TableOfContents/TableOfContents.css +70 -0
- package/dist/components/TableOfContents/TableOfContents.d.ts +25 -0
- package/dist/components/TableOfContents/TableOfContents.js +133 -0
- package/dist/components/TableOfContents/TableOfContents.module.js +19 -0
- package/dist/components/TableOfContents/activeSection.d.ts +9 -0
- package/dist/components/TableOfContents/activeSection.js +14 -0
- package/dist/components/TableOfContents/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.css +273 -0
- package/dist/components/Tabs/Tabs.d.ts +152 -0
- package/dist/components/Tabs/Tabs.js +250 -0
- package/dist/components/Tabs/Tabs.module.js +43 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Text/Text.css +123 -0
- package/dist/components/Text/Text.d.ts +94 -0
- package/dist/components/Text/Text.js +55 -0
- package/dist/components/Text/Text.module.js +51 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.css +107 -0
- package/dist/components/Textarea/Textarea.d.ts +81 -0
- package/dist/components/Textarea/Textarea.js +95 -0
- package/dist/components/Textarea/Textarea.module.js +25 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Thread/Thread.css +124 -0
- package/dist/components/Thread/Thread.d.ts +50 -0
- package/dist/components/Thread/Thread.js +90 -0
- package/dist/components/Thread/Thread.module.js +25 -0
- package/dist/components/Thread/index.d.ts +2 -0
- package/dist/components/TimeField/TimeField.css +287 -0
- package/dist/components/TimeField/TimeField.d.ts +94 -0
- package/dist/components/TimeField/TimeField.js +543 -0
- package/dist/components/TimeField/TimeField.module.js +35 -0
- package/dist/components/TimeField/index.d.ts +2 -0
- package/dist/components/Timeline/Timeline.css +66 -0
- package/dist/components/Timeline/Timeline.d.ts +19 -0
- package/dist/components/Timeline/Timeline.js +41 -0
- package/dist/components/Timeline/Timeline.module.js +19 -0
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Title/Title.css +100 -0
- package/dist/components/Title/Title.d.ts +66 -0
- package/dist/components/Title/Title.js +56 -0
- package/dist/components/Title/Title.module.js +41 -0
- package/dist/components/Title/index.d.ts +2 -0
- package/dist/components/Toast/Toast.css +299 -0
- package/dist/components/Toast/Toast.d.ts +14 -0
- package/dist/components/Toast/Toast.js +103 -0
- package/dist/components/Toast/Toast.module.js +53 -0
- package/dist/components/Toast/ToastViewport.d.ts +22 -0
- package/dist/components/Toast/ToastViewport.js +102 -0
- package/dist/components/Toast/api.d.ts +116 -0
- package/dist/components/Toast/api.js +127 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/store.d.ts +44 -0
- package/dist/components/Toast/store.js +82 -0
- package/dist/components/Toast/useToastTimer.d.ts +25 -0
- package/dist/components/Toast/useToastTimer.js +65 -0
- package/dist/components/Tooltip/Tooltip.css +89 -0
- package/dist/components/Tooltip/Tooltip.d.ts +46 -0
- package/dist/components/Tooltip/Tooltip.js +178 -0
- package/dist/components/Tooltip/Tooltip.module.js +9 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TopBar/TopBar.css +233 -0
- package/dist/components/TopBar/TopBar.d.ts +49 -0
- package/dist/components/TopBar/TopBar.js +36 -0
- package/dist/components/TopBar/TopBar.module.js +47 -0
- package/dist/components/TopBar/TopBarEnd.d.ts +11 -0
- package/dist/components/TopBar/TopBarEnd.js +18 -0
- package/dist/components/TopBar/TopBarIconButton.d.ts +47 -0
- package/dist/components/TopBar/TopBarIconButton.js +33 -0
- package/dist/components/TopBar/TopBarSearch.d.ts +96 -0
- package/dist/components/TopBar/TopBarSearch.js +171 -0
- package/dist/components/TopBar/TopBarSearchPanel.d.ts +57 -0
- package/dist/components/TopBar/TopBarSearchPanel.js +171 -0
- package/dist/components/TopBar/TopBarStart.d.ts +11 -0
- package/dist/components/TopBar/TopBarStart.js +18 -0
- package/dist/components/TopBar/index.d.ts +6 -0
- package/dist/components/Tour/Spotlight.d.ts +27 -0
- package/dist/components/Tour/Spotlight.js +111 -0
- package/dist/components/Tour/Tour.css +234 -0
- package/dist/components/Tour/Tour.d.ts +103 -0
- package/dist/components/Tour/Tour.js +400 -0
- package/dist/components/Tour/Tour.module.js +28 -0
- package/dist/components/Tour/index.d.ts +2 -0
- package/dist/components/Tour/useTourTarget.d.ts +18 -0
- package/dist/components/Tour/useTourTarget.js +101 -0
- package/dist/components/TreeView/TreeView.css +263 -0
- package/dist/components/TreeView/TreeView.d.ts +43 -0
- package/dist/components/TreeView/TreeView.js +349 -0
- package/dist/components/TreeView/TreeView.module.js +23 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/TreeView/treeModel.d.ts +84 -0
- package/dist/components/TreeView/treeModel.js +139 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.css +11 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +17 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +18 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.module.js +5 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/WidgetPreview/WidgetPreview.css +26 -0
- package/dist/components/WidgetPreview/WidgetPreview.d.ts +20 -0
- package/dist/components/WidgetPreview/WidgetPreview.js +24 -0
- package/dist/components/WidgetPreview/WidgetPreview.module.js +5 -0
- package/dist/components/WidgetPreview/WidgetShape.css +153 -0
- package/dist/components/WidgetPreview/WidgetShape.d.ts +12 -0
- package/dist/components/WidgetPreview/WidgetShape.js +122 -0
- package/dist/components/WidgetPreview/WidgetShape.module.js +53 -0
- package/dist/components/WidgetPreview/index.d.ts +2 -0
- package/dist/components/_internal/Trend.d.ts +9 -0
- package/dist/components/_internal/Trend.js +42 -0
- package/dist/components/_internal/collapse.d.ts +45 -0
- package/dist/components/_internal/collapse.js +33 -0
- package/dist/components/_internal/currency.d.ts +46 -0
- package/dist/components/_internal/currency.js +198 -0
- package/dist/components/_internal/dragAnnouncements.d.ts +83 -0
- package/dist/components/_internal/dragAnnouncements.js +123 -0
- package/dist/components/_internal/fieldWiring.d.ts +84 -0
- package/dist/components/_internal/fieldWiring.js +102 -0
- package/dist/components/_internal/gridSpan.d.ts +29 -0
- package/dist/components/_internal/gridSpan.js +35 -0
- package/dist/components/_internal/isoDay.d.ts +6 -0
- package/dist/components/_internal/isoDay.js +29 -0
- package/dist/components/_internal/letterKey.d.ts +22 -0
- package/dist/components/_internal/letterKey.js +24 -0
- package/dist/components/_internal/overlay/focusRestore.d.ts +11 -0
- package/dist/components/_internal/overlay/focusRestore.js +22 -0
- package/dist/components/_internal/overlay/index.d.ts +6 -0
- package/dist/components/_internal/overlay/tourHold.d.ts +14 -0
- package/dist/components/_internal/overlay/tourHold.js +20 -0
- package/dist/components/_internal/overlay/useFocusTrap.d.ts +18 -0
- package/dist/components/_internal/overlay/useFocusTrap.js +96 -0
- package/dist/components/_internal/overlay/useInOverlay.d.ts +37 -0
- package/dist/components/_internal/overlay/useInOverlay.js +51 -0
- package/dist/components/_internal/overlay/useOverlayStack.d.ts +75 -0
- package/dist/components/_internal/overlay/useOverlayStack.js +184 -0
- package/dist/components/_internal/overlay/useScrollLock.d.ts +13 -0
- package/dist/components/_internal/overlay/useScrollLock.js +83 -0
- package/dist/components/_internal/refs.d.ts +25 -0
- package/dist/components/_internal/refs.js +45 -0
- package/dist/components/_internal/statusColor.d.ts +14 -0
- package/dist/components/_internal/statusColor.js +15 -0
- package/dist/components/_internal/timeUtils.d.ts +16 -0
- package/dist/components/_internal/useAsyncOptions.d.ts +58 -0
- package/dist/components/_internal/useAsyncOptions.js +86 -0
- package/dist/components/_internal/useClippedTooltip.d.ts +33 -0
- package/dist/components/_internal/useClippedTooltip.js +42 -0
- package/dist/components/_internal/useControllableState.d.ts +21 -0
- package/dist/components/_internal/useControllableState.js +34 -0
- package/dist/components/_internal/useSize.d.ts +5 -0
- package/dist/components/_internal/useSize.js +31 -0
- package/dist/hooks/useBelowBreakpoint.d.ts +26 -0
- package/dist/hooks/useBelowBreakpoint.js +45 -0
- package/dist/i18n/I18nProvider.d.ts +35 -0
- package/dist/i18n/I18nProvider.js +41 -0
- package/dist/i18n/LocaleProvider.d.ts +12 -0
- package/dist/i18n/LocaleProvider.js +16 -0
- package/dist/i18n/en.d.ts +7 -0
- package/dist/i18n/en.js +623 -0
- package/dist/i18n/format.d.ts +33 -0
- package/dist/i18n/format.js +53 -0
- package/dist/i18n/index.d.ts +10 -0
- package/dist/i18n/messages.d.ts +1458 -0
- package/dist/i18n/ru.d.ts +7 -0
- package/dist/i18n/ru.js +694 -0
- package/dist/i18n/useLocale.d.ts +11 -0
- package/dist/i18n/useLocale.js +21 -0
- package/dist/i18n/useTranslation.d.ts +25 -0
- package/dist/i18n/useTranslation.js +52 -0
- package/dist/index.d.ts +270 -0
- package/dist/index.js +168 -0
- package/dist/palette/index.d.ts +2 -0
- package/dist/palette/palette.d.ts +40 -0
- package/dist/palette/palette.js +61 -0
- package/dist/styles/global.css +1033 -0
- package/dist/styles/tokens.css +935 -0
- package/dist/styles.css +22283 -0
- package/docs/components/Calendar.md +1 -1
- package/docs/components/Sticky.md +1 -1
- package/docs/i18n.md +10 -5
- package/docs/setup.md +30 -4
- package/docs/theming.md +2 -2
- package/docs/tokens.md +5 -2
- package/docs/typescript.md +2 -1
- package/package.json +25 -27
- package/src/_meta/manifest.ts +0 -294
- package/src/app/AppProvider.tsx +0 -78
- package/src/app/index.ts +0 -3
- package/src/app/themeTokens.ts +0 -95
- package/src/calendar/dateMath.ts +0 -114
- package/src/calendar/formatters.ts +0 -75
- package/src/calendar/index.ts +0 -39
- package/src/calendar/types.ts +0 -36
- package/src/calendar/useAgenda.ts +0 -70
- package/src/calendar/useDay.ts +0 -51
- package/src/calendar/useMonth.ts +0 -82
- package/src/calendar/useWeek.ts +0 -62
- package/src/calendar/weekInfo.ts +0 -83
- package/src/components/Accordion/Accordion.module.scss +0 -304
- package/src/components/Accordion/Accordion.tokens.scss +0 -64
- package/src/components/Accordion/Accordion.tsx +0 -272
- package/src/components/Accordion/AccordionContent.tsx +0 -36
- package/src/components/Accordion/AccordionItem.tsx +0 -66
- package/src/components/Accordion/AccordionTrigger.tsx +0 -121
- package/src/components/Accordion/context.ts +0 -47
- package/src/components/Accordion/index.ts +0 -14
- package/src/components/Alert/Alert.module.scss +0 -92
- package/src/components/Alert/Alert.tokens.scss +0 -60
- package/src/components/Alert/Alert.tsx +0 -136
- package/src/components/Alert/index.ts +0 -2
- package/src/components/AppLayout/AppLayout.module.scss +0 -130
- package/src/components/AppLayout/AppLayout.tokens.scss +0 -27
- package/src/components/AppLayout/AppLayout.tsx +0 -211
- package/src/components/AppLayout/index.ts +0 -2
- package/src/components/Avatar/AgentAvatar.module.scss +0 -117
- package/src/components/Avatar/AgentAvatar.tsx +0 -122
- package/src/components/Avatar/Avatar.module.scss +0 -181
- package/src/components/Avatar/Avatar.tokens.scss +0 -107
- package/src/components/Avatar/Avatar.tsx +0 -210
- package/src/components/Avatar/AvatarGroup.module.scss +0 -128
- package/src/components/Avatar/AvatarGroup.tsx +0 -119
- package/src/components/Avatar/AvatarGroupContext.tsx +0 -20
- package/src/components/Avatar/index.ts +0 -6
- package/src/components/Badge/Badge.module.scss +0 -124
- package/src/components/Badge/Badge.tokens.scss +0 -74
- package/src/components/Badge/Badge.tsx +0 -164
- package/src/components/Badge/index.ts +0 -2
- package/src/components/Banner/Banner.module.scss +0 -73
- package/src/components/Banner/Banner.tokens.scss +0 -51
- package/src/components/Banner/Banner.tsx +0 -138
- package/src/components/Banner/index.ts +0 -2
- package/src/components/BrandIcon/BrandIcon.module.scss +0 -5
- package/src/components/BrandIcon/BrandIcon.tsx +0 -99
- package/src/components/BrandIcon/index.ts +0 -2
- package/src/components/Breadcrumb/Breadcrumb.module.scss +0 -32
- package/src/components/Breadcrumb/Breadcrumb.tokens.scss +0 -9
- package/src/components/Breadcrumb/Breadcrumb.tsx +0 -146
- package/src/components/Breadcrumb/index.ts +0 -2
- package/src/components/Button/Button.module.scss +0 -167
- package/src/components/Button/Button.tokens.scss +0 -90
- package/src/components/Button/Button.tsx +0 -205
- package/src/components/Button/index.ts +0 -2
- package/src/components/ButtonGroup/ButtonGroup.module.scss +0 -134
- package/src/components/ButtonGroup/ButtonGroup.tokens.scss +0 -42
- package/src/components/ButtonGroup/ButtonGroup.tsx +0 -278
- package/src/components/ButtonGroup/ButtonGroupItem.tsx +0 -74
- package/src/components/ButtonGroup/context.ts +0 -45
- package/src/components/ButtonGroup/index.ts +0 -2
- package/src/components/Calendar/AgendaView.module.scss +0 -231
- package/src/components/Calendar/AgendaView.tsx +0 -214
- package/src/components/Calendar/AllDayBand.module.scss +0 -18
- package/src/components/Calendar/AllDayBand.tsx +0 -75
- package/src/components/Calendar/Calendar.module.scss +0 -23
- package/src/components/Calendar/Calendar.tokens.scss +0 -262
- package/src/components/Calendar/Calendar.tsx +0 -370
- package/src/components/Calendar/DayCell.module.scss +0 -30
- package/src/components/Calendar/DayCell.tsx +0 -50
- package/src/components/Calendar/DayView.module.scss +0 -10
- package/src/components/Calendar/DayView.tsx +0 -163
- package/src/components/Calendar/EventChip.module.scss +0 -171
- package/src/components/Calendar/EventChip.tsx +0 -115
- package/src/components/Calendar/HourGrid.module.scss +0 -123
- package/src/components/Calendar/HourGrid.tsx +0 -381
- package/src/components/Calendar/MonthView.module.scss +0 -99
- package/src/components/Calendar/MonthView.tsx +0 -296
- package/src/components/Calendar/TimedEvent.module.scss +0 -205
- package/src/components/Calendar/TimedEvent.tsx +0 -247
- package/src/components/Calendar/ViewSwitcher.module.scss +0 -3
- package/src/components/Calendar/ViewSwitcher.tsx +0 -47
- package/src/components/Calendar/WeekView.module.scss +0 -10
- package/src/components/Calendar/WeekView.tsx +0 -137
- package/src/components/Calendar/eventColor.ts +0 -60
- package/src/components/Calendar/index.ts +0 -18
- package/src/components/Calendar/types.ts +0 -451
- package/src/components/Calendar/useEventDrag.ts +0 -783
- package/src/components/Calendar/utils.ts +0 -622
- package/src/components/Card/Card.module.scss +0 -264
- package/src/components/Card/Card.tokens.scss +0 -55
- package/src/components/Card/Card.tsx +0 -170
- package/src/components/Card/CardBody.tsx +0 -45
- package/src/components/Card/CardHeader.tsx +0 -113
- package/src/components/Card/CardList.tsx +0 -24
- package/src/components/Card/CardListRow.tsx +0 -24
- package/src/components/Card/index.ts +0 -7
- package/src/components/CatalogPicker/CatalogPicker.module.scss +0 -193
- package/src/components/CatalogPicker/CatalogPicker.tokens.scss +0 -26
- package/src/components/CatalogPicker/CatalogPicker.tsx +0 -339
- package/src/components/CatalogPicker/index.ts +0 -2
- package/src/components/Chart/Chart.module.scss +0 -287
- package/src/components/Chart/Chart.tokens.scss +0 -63
- package/src/components/Chart/Chart.tsx +0 -586
- package/src/components/Chart/ChartLegend.tsx +0 -99
- package/src/components/Chart/ChartTable.tsx +0 -62
- package/src/components/Chart/ChartTooltip.tsx +0 -93
- package/src/components/Chart/chartModel.ts +0 -689
- package/src/components/Chart/index.ts +0 -2
- package/src/components/ChatBubble/ChatBubble.module.scss +0 -93
- package/src/components/ChatBubble/ChatBubble.tokens.scss +0 -17
- package/src/components/ChatBubble/ChatBubble.tsx +0 -61
- package/src/components/ChatBubble/ChatBubbleList.tsx +0 -27
- package/src/components/ChatBubble/index.ts +0 -3
- package/src/components/ChatLauncher/ChatLauncher.module.scss +0 -68
- package/src/components/ChatLauncher/ChatLauncher.tokens.scss +0 -27
- package/src/components/ChatLauncher/ChatLauncher.tsx +0 -202
- package/src/components/ChatLauncher/index.ts +0 -2
- package/src/components/ChatLauncher/isAtBottom.ts +0 -12
- package/src/components/Checkbox/Checkbox.module.scss +0 -147
- package/src/components/Checkbox/Checkbox.tokens.scss +0 -44
- package/src/components/Checkbox/Checkbox.tsx +0 -188
- package/src/components/Checkbox/index.ts +0 -2
- package/src/components/CircularProgress/CircularProgress.module.scss +0 -133
- package/src/components/CircularProgress/CircularProgress.tokens.scss +0 -40
- package/src/components/CircularProgress/CircularProgress.tsx +0 -139
- package/src/components/CircularProgress/index.ts +0 -7
- package/src/components/Cluster/Cluster.module.scss +0 -145
- package/src/components/Cluster/Cluster.tokens.scss +0 -11
- package/src/components/Cluster/Cluster.tsx +0 -215
- package/src/components/Cluster/index.ts +0 -2
- package/src/components/Code/Code.module.scss +0 -28
- package/src/components/Code/Code.tokens.scss +0 -15
- package/src/components/Code/Code.tsx +0 -44
- package/src/components/Code/index.ts +0 -2
- package/src/components/CodeBlock/CodeBlock.module.scss +0 -146
- package/src/components/CodeBlock/CodeBlock.tokens.scss +0 -27
- package/src/components/CodeBlock/CodeBlock.tsx +0 -274
- package/src/components/CodeBlock/highlight.ts +0 -179
- package/src/components/CodeBlock/index.ts +0 -8
- package/src/components/CodeBlock/sampleSync.ts +0 -42
- package/src/components/ColorPicker/ColorPicker.module.scss +0 -286
- package/src/components/ColorPicker/ColorPicker.tokens.scss +0 -60
- package/src/components/ColorPicker/ColorPicker.tsx +0 -367
- package/src/components/ColorPicker/ColorPickerPanel.tsx +0 -265
- package/src/components/ColorPicker/SVSquare.tsx +0 -189
- package/src/components/ColorPicker/colorMath.ts +0 -141
- package/src/components/ColorPicker/index.ts +0 -6
- package/src/components/ConfirmationPopover/ConfirmationPopover.module.scss +0 -39
- package/src/components/ConfirmationPopover/ConfirmationPopover.tokens.scss +0 -13
- package/src/components/ConfirmationPopover/ConfirmationPopover.tsx +0 -395
- package/src/components/ConfirmationPopover/index.ts +0 -2
- package/src/components/Constrain/Constrain.module.scss +0 -99
- package/src/components/Constrain/Constrain.tsx +0 -79
- package/src/components/Constrain/index.ts +0 -2
- package/src/components/CurrencySelect/CurrencySelect.module.scss +0 -7
- package/src/components/CurrencySelect/CurrencySelect.tsx +0 -167
- package/src/components/CurrencySelect/index.ts +0 -3
- package/src/components/CursorPagination/CursorPagination.module.scss +0 -69
- package/src/components/CursorPagination/CursorPagination.tokens.scss +0 -32
- package/src/components/CursorPagination/CursorPagination.tsx +0 -121
- package/src/components/CursorPagination/index.ts +0 -2
- package/src/components/DashboardCanvas/DashboardCanvas.module.scss +0 -360
- package/src/components/DashboardCanvas/DashboardCanvas.tokens.scss +0 -48
- package/src/components/DashboardCanvas/DashboardCanvas.tsx +0 -1270
- package/src/components/DashboardCanvas/DashboardCanvasItem.tsx +0 -140
- package/src/components/DashboardCanvas/DashboardCanvasSection.tsx +0 -174
- package/src/components/DashboardCanvas/engine.ts +0 -363
- package/src/components/DashboardCanvas/index.ts +0 -9
- package/src/components/DashboardWidget/DashboardWidget.module.scss +0 -100
- package/src/components/DashboardWidget/DashboardWidget.tokens.scss +0 -16
- package/src/components/DashboardWidget/DashboardWidget.tsx +0 -188
- package/src/components/DashboardWidget/index.ts +0 -7
- package/src/components/DataTable/BodyRow.tsx +0 -197
- package/src/components/DataTable/ColumnVisibilityTrigger.module.scss +0 -7
- package/src/components/DataTable/ColumnVisibilityTrigger.tsx +0 -105
- package/src/components/DataTable/DataTable.module.scss +0 -511
- package/src/components/DataTable/DataTable.tokens.scss +0 -80
- package/src/components/DataTable/DataTable.tsx +0 -749
- package/src/components/DataTable/HeaderCell.module.scss +0 -215
- package/src/components/DataTable/HeaderCell.tsx +0 -440
- package/src/components/DataTable/columnShift.ts +0 -117
- package/src/components/DataTable/index.ts +0 -23
- package/src/components/DataTable/pinStyle.ts +0 -50
- package/src/components/DataTable/reorderColumns.ts +0 -66
- package/src/components/DataTable/types.ts +0 -289
- package/src/components/DataTable/useColumnDragShift.ts +0 -217
- package/src/components/DataTable/useDataTable.ts +0 -371
- package/src/components/DataTable/useResizeHandle.ts +0 -97
- package/src/components/DatePicker/DatePicker.module.scss +0 -180
- package/src/components/DatePicker/DatePicker.tokens.scss +0 -152
- package/src/components/DatePicker/DatePicker.tsx +0 -664
- package/src/components/DatePicker/DatePickerGrid.module.scss +0 -172
- package/src/components/DatePicker/DatePickerGrid.tsx +0 -341
- package/src/components/DatePicker/InlineDatePicker.module.scss +0 -32
- package/src/components/DatePicker/InlineDatePicker.tsx +0 -201
- package/src/components/DatePicker/index.ts +0 -4
- package/src/components/DatePicker/utils.ts +0 -364
- package/src/components/DateRangePicker/DateRangePicker.module.scss +0 -237
- package/src/components/DateRangePicker/DateRangePicker.tokens.scss +0 -78
- package/src/components/DateRangePicker/DateRangePicker.tsx +0 -720
- package/src/components/DateRangePicker/InlineDateRangePicker.module.scss +0 -94
- package/src/components/DateRangePicker/InlineDateRangePicker.tsx +0 -376
- package/src/components/DateRangePicker/index.ts +0 -5
- package/src/components/DateRangePicker/utils.ts +0 -151
- package/src/components/DateStrip/DateStrip.module.scss +0 -78
- package/src/components/DateStrip/DateStrip.tokens.scss +0 -23
- package/src/components/DateStrip/DateStrip.tsx +0 -205
- package/src/components/DateStrip/index.ts +0 -2
- package/src/components/DefinitionList/DefinitionList.module.scss +0 -102
- package/src/components/DefinitionList/DefinitionList.tokens.scss +0 -29
- package/src/components/DefinitionList/DefinitionList.tsx +0 -198
- package/src/components/DefinitionList/index.ts +0 -9
- package/src/components/Divider/Divider.module.scss +0 -144
- package/src/components/Divider/Divider.tokens.scss +0 -21
- package/src/components/Divider/Divider.tsx +0 -103
- package/src/components/Divider/index.ts +0 -2
- package/src/components/Dot/Dot.module.scss +0 -40
- package/src/components/Dot/Dot.tokens.scss +0 -4
- package/src/components/Dot/Dot.tsx +0 -45
- package/src/components/Dot/index.ts +0 -2
- package/src/components/Drawer/Body.tsx +0 -23
- package/src/components/Drawer/Close.tsx +0 -35
- package/src/components/Drawer/Content.tsx +0 -93
- package/src/components/Drawer/Drawer.module.scss +0 -232
- package/src/components/Drawer/Drawer.tokens.scss +0 -38
- package/src/components/Drawer/Drawer.tsx +0 -23
- package/src/components/Drawer/DrawerRoot.tsx +0 -190
- package/src/components/Drawer/Footer.tsx +0 -24
- package/src/components/Drawer/Header.tsx +0 -64
- package/src/components/Drawer/Overlay.tsx +0 -82
- package/src/components/Drawer/context.ts +0 -44
- package/src/components/Drawer/index.ts +0 -12
- package/src/components/Drawer/useDragToClose.ts +0 -149
- package/src/components/DropdownMenu/CheckboxItem.tsx +0 -144
- package/src/components/DropdownMenu/Content.tsx +0 -419
- package/src/components/DropdownMenu/DropdownMenu.module.scss +0 -280
- package/src/components/DropdownMenu/DropdownMenu.tokens.scss +0 -88
- package/src/components/DropdownMenu/DropdownMenu.tsx +0 -43
- package/src/components/DropdownMenu/Group.tsx +0 -76
- package/src/components/DropdownMenu/Item.tsx +0 -148
- package/src/components/DropdownMenu/ItemIndicator.tsx +0 -30
- package/src/components/DropdownMenu/Radio.tsx +0 -178
- package/src/components/DropdownMenu/Root.tsx +0 -100
- package/src/components/DropdownMenu/Sub.tsx +0 -332
- package/src/components/DropdownMenu/Trigger.tsx +0 -76
- package/src/components/DropdownMenu/context.ts +0 -65
- package/src/components/DropdownMenu/index.ts +0 -20
- package/src/components/EmojiPicker/EmojiPicker.module.scss +0 -84
- package/src/components/EmojiPicker/EmojiPicker.tokens.scss +0 -24
- package/src/components/EmojiPicker/EmojiPicker.tsx +0 -341
- package/src/components/EmojiPicker/emojiData.ts +0 -245
- package/src/components/EmojiPicker/index.ts +0 -3
- package/src/components/EmptyState/EmptyState.module.scss +0 -102
- package/src/components/EmptyState/EmptyState.tokens.scss +0 -28
- package/src/components/EmptyState/EmptyState.tsx +0 -112
- package/src/components/EmptyState/index.ts +0 -7
- package/src/components/EntityChip/EntityChip.module.scss +0 -275
- package/src/components/EntityChip/EntityChip.tokens.scss +0 -66
- package/src/components/EntityChip/EntityChip.tsx +0 -649
- package/src/components/EntityChip/index.ts +0 -10
- package/src/components/ErrorState/ErrorState.module.scss +0 -105
- package/src/components/ErrorState/ErrorState.tokens.scss +0 -32
- package/src/components/ErrorState/ErrorState.tsx +0 -125
- package/src/components/ErrorState/index.ts +0 -8
- package/src/components/Field/Field.module.scss +0 -46
- package/src/components/Field/Field.tsx +0 -185
- package/src/components/Field/index.ts +0 -2
- package/src/components/FileUpload/FileUpload.module.scss +0 -187
- package/src/components/FileUpload/FileUpload.tokens.scss +0 -81
- package/src/components/FileUpload/FileUpload.tsx +0 -569
- package/src/components/FileUpload/formatBytes.ts +0 -34
- package/src/components/FileUpload/iconForFile.ts +0 -40
- package/src/components/FileUpload/index.ts +0 -2
- package/src/components/FilterChip/FilterChip.module.scss +0 -61
- package/src/components/FilterChip/FilterChip.tokens.scss +0 -25
- package/src/components/FilterChip/FilterChip.tsx +0 -208
- package/src/components/FilterChip/index.ts +0 -5
- package/src/components/FlowCanvas/FlowCanvas.module.scss +0 -329
- package/src/components/FlowCanvas/FlowCanvas.tokens.scss +0 -45
- package/src/components/FlowCanvas/FlowCanvas.tsx +0 -1867
- package/src/components/FlowCanvas/FlowControls.tsx +0 -46
- package/src/components/FlowCanvas/FlowEdge.tsx +0 -58
- package/src/components/FlowCanvas/FlowNode.tsx +0 -76
- package/src/components/FlowCanvas/edgePath.ts +0 -85
- package/src/components/FlowCanvas/index.ts +0 -4
- package/src/components/FlowCanvas/layout.ts +0 -148
- package/src/components/FlowCanvas/spatialNav.ts +0 -76
- package/src/components/FlowCanvas/types.ts +0 -59
- package/src/components/FlowCanvas/useViewport.ts +0 -122
- package/src/components/FormRow/FormRow.module.scss +0 -2
- package/src/components/FormRow/FormRow.tsx +0 -37
- package/src/components/FormRow/index.ts +0 -2
- package/src/components/FormSection/FormSection.module.scss +0 -24
- package/src/components/FormSection/FormSection.tsx +0 -46
- package/src/components/FormSection/index.ts +0 -2
- package/src/components/FunnelChart/FunnelChart.module.scss +0 -265
- package/src/components/FunnelChart/FunnelChart.tokens.scss +0 -72
- package/src/components/FunnelChart/FunnelChart.tsx +0 -607
- package/src/components/FunnelChart/funnelModel.ts +0 -124
- package/src/components/FunnelChart/index.ts +0 -2
- package/src/components/Grid/Grid.module.scss +0 -162
- package/src/components/Grid/Grid.tokens.scss +0 -13
- package/src/components/Grid/Grid.tsx +0 -226
- package/src/components/Grid/GridItem.tsx +0 -77
- package/src/components/Grid/index.ts +0 -11
- package/src/components/Highlight/Highlight.module.scss +0 -43
- package/src/components/Highlight/Highlight.tokens.scss +0 -35
- package/src/components/Highlight/Highlight.tsx +0 -164
- package/src/components/Highlight/HighlightOverlay.tsx +0 -100
- package/src/components/Highlight/index.ts +0 -2
- package/src/components/HighlightedText/HighlightedText.module.scss +0 -11
- package/src/components/HighlightedText/HighlightedText.tokens.scss +0 -9
- package/src/components/HighlightedText/HighlightedText.tsx +0 -50
- package/src/components/HighlightedText/highlightRanges.ts +0 -44
- package/src/components/HighlightedText/index.ts +0 -2
- package/src/components/IconPicker/IconPicker.module.scss +0 -175
- package/src/components/IconPicker/IconPicker.tokens.scss +0 -40
- package/src/components/IconPicker/IconPicker.tsx +0 -629
- package/src/components/IconPicker/index.ts +0 -9
- package/src/components/IconTile/IconTile.module.scss +0 -57
- package/src/components/IconTile/IconTile.tokens.scss +0 -16
- package/src/components/IconTile/IconTile.tsx +0 -91
- package/src/components/IconTile/index.ts +0 -2
- package/src/components/Image/Image.module.scss +0 -266
- package/src/components/Image/Image.tokens.scss +0 -55
- package/src/components/Image/Image.tsx +0 -342
- package/src/components/Image/index.ts +0 -2
- package/src/components/ImageCrop/ImageCrop.module.scss +0 -274
- package/src/components/ImageCrop/ImageCrop.tokens.scss +0 -33
- package/src/components/ImageCrop/ImageCrop.tsx +0 -542
- package/src/components/ImageCrop/cropGeometry.ts +0 -120
- package/src/components/ImageCrop/extractCropBlob.ts +0 -140
- package/src/components/ImageCrop/index.ts +0 -11
- package/src/components/ImageCrop/useCropPreview.ts +0 -161
- package/src/components/Indent/Indent.module.scss +0 -33
- package/src/components/Indent/Indent.tokens.scss +0 -10
- package/src/components/Indent/Indent.tsx +0 -46
- package/src/components/Indent/index.ts +0 -2
- package/src/components/Input/Input.module.scss +0 -99
- package/src/components/Input/Input.tokens.scss +0 -54
- package/src/components/Input/Input.tsx +0 -105
- package/src/components/Input/Suggestions.tsx +0 -260
- package/src/components/Input/index.ts +0 -2
- package/src/components/Kanban/Kanban.module.scss +0 -39
- package/src/components/Kanban/Kanban.tokens.scss +0 -15
- package/src/components/Kanban/Kanban.tsx +0 -951
- package/src/components/Kanban/index.ts +0 -7
- package/src/components/Kbd/Kbd.module.scss +0 -47
- package/src/components/Kbd/Kbd.tokens.scss +0 -26
- package/src/components/Kbd/Kbd.tsx +0 -73
- package/src/components/Kbd/index.ts +0 -2
- package/src/components/Lightbox/Lightbox.module.scss +0 -283
- package/src/components/Lightbox/Lightbox.tokens.scss +0 -36
- package/src/components/Lightbox/Lightbox.tsx +0 -506
- package/src/components/Lightbox/index.ts +0 -2
- package/src/components/Link/Link.module.scss +0 -78
- package/src/components/Link/Link.tokens.scss +0 -29
- package/src/components/Link/Link.tsx +0 -114
- package/src/components/Link/index.ts +0 -2
- package/src/components/LinkCard/LinkCard.module.scss +0 -92
- package/src/components/LinkCard/LinkCard.tokens.scss +0 -9
- package/src/components/LinkCard/LinkCard.tsx +0 -72
- package/src/components/LinkCard/index.ts +0 -2
- package/src/components/LiquidEditor/AutocompleteMenu.tsx +0 -133
- package/src/components/LiquidEditor/HighlightLayer.tsx +0 -53
- package/src/components/LiquidEditor/InsertVariableMenu.tsx +0 -81
- package/src/components/LiquidEditor/LiquidEditor.module.scss +0 -339
- package/src/components/LiquidEditor/LiquidEditor.tokens.scss +0 -81
- package/src/components/LiquidEditor/LiquidEditor.tsx +0 -412
- package/src/components/LiquidEditor/PreviewPane.tsx +0 -29
- package/src/components/LiquidEditor/caretCoordinates.ts +0 -97
- package/src/components/LiquidEditor/index.ts +0 -7
- package/src/components/LiquidEditor/liquidFilters.ts +0 -23
- package/src/components/LiquidEditor/liquidTokenizer.ts +0 -235
- package/src/components/LiquidEditor/types.ts +0 -101
- package/src/components/LiquidEditor/useLiquidAutocomplete.ts +0 -178
- package/src/components/List/List.module.scss +0 -105
- package/src/components/List/List.tokens.scss +0 -42
- package/src/components/List/List.tsx +0 -124
- package/src/components/List/index.ts +0 -9
- package/src/components/LiveRegion/LiveRegion.module.scss +0 -3
- package/src/components/LiveRegion/LiveRegion.tsx +0 -116
- package/src/components/LiveRegion/index.ts +0 -2
- package/src/components/Logo/Logo.module.scss +0 -139
- package/src/components/Logo/Logo.tokens.scss +0 -14
- package/src/components/Logo/Logo.tsx +0 -126
- package/src/components/Logo/index.ts +0 -2
- package/src/components/Masonry/Masonry.module.scss +0 -42
- package/src/components/Masonry/Masonry.tokens.scss +0 -8
- package/src/components/Masonry/Masonry.tsx +0 -136
- package/src/components/Masonry/index.ts +0 -2
- package/src/components/Masonry/masonryUtils.ts +0 -42
- package/src/components/MediaTile/MediaTile.module.scss +0 -183
- package/src/components/MediaTile/MediaTile.tokens.scss +0 -60
- package/src/components/MediaTile/MediaTile.tsx +0 -208
- package/src/components/MediaTile/index.ts +0 -8
- package/src/components/Modal/Body.tsx +0 -27
- package/src/components/Modal/Close.tsx +0 -45
- package/src/components/Modal/Content.tsx +0 -98
- package/src/components/Modal/Footer.tsx +0 -28
- package/src/components/Modal/Header.tsx +0 -51
- package/src/components/Modal/Modal.module.scss +0 -262
- package/src/components/Modal/Modal.tokens.scss +0 -50
- package/src/components/Modal/Modal.tsx +0 -23
- package/src/components/Modal/ModalRoot.tsx +0 -299
- package/src/components/Modal/Overlay.tsx +0 -101
- package/src/components/Modal/context.ts +0 -60
- package/src/components/Modal/index.ts +0 -11
- package/src/components/MoneyInput/MoneyInput.module.scss +0 -57
- package/src/components/MoneyInput/MoneyInput.tsx +0 -433
- package/src/components/MoneyInput/index.ts +0 -2
- package/src/components/OptionsPicker/OptionsPicker.module.scss +0 -216
- package/src/components/OptionsPicker/OptionsPicker.tokens.scss +0 -68
- package/src/components/OptionsPicker/OptionsPicker.tsx +0 -936
- package/src/components/OptionsPicker/index.ts +0 -9
- package/src/components/OtpInput/OtpInput.module.scss +0 -69
- package/src/components/OtpInput/OtpInput.tokens.scss +0 -45
- package/src/components/OtpInput/OtpInput.tsx +0 -368
- package/src/components/OtpInput/index.ts +0 -2
- package/src/components/Page/Page.module.scss +0 -30
- package/src/components/Page/Page.tokens.scss +0 -11
- package/src/components/Page/Page.tsx +0 -53
- package/src/components/Page/index.ts +0 -2
- package/src/components/PageHeader/PageHeader.module.scss +0 -197
- package/src/components/PageHeader/PageHeader.tokens.scss +0 -41
- package/src/components/PageHeader/PageHeader.tsx +0 -310
- package/src/components/PageHeader/index.ts +0 -20
- package/src/components/Pagination/Pagination.module.scss +0 -117
- package/src/components/Pagination/Pagination.tokens.scss +0 -54
- package/src/components/Pagination/Pagination.tsx +0 -165
- package/src/components/Pagination/index.ts +0 -4
- package/src/components/Pagination/paginationRange.ts +0 -72
- package/src/components/PasswordInput/PasswordInput.module.scss +0 -120
- package/src/components/PasswordInput/PasswordInput.tokens.scss +0 -44
- package/src/components/PasswordInput/PasswordInput.tsx +0 -210
- package/src/components/PasswordInput/index.ts +0 -2
- package/src/components/PasswordStrengthMeter/PasswordStrengthMeter.module.scss +0 -80
- package/src/components/PasswordStrengthMeter/PasswordStrengthMeter.tokens.scss +0 -40
- package/src/components/PasswordStrengthMeter/PasswordStrengthMeter.tsx +0 -96
- package/src/components/PasswordStrengthMeter/index.ts +0 -2
- package/src/components/PersonDisplay/PersonDisplay.module.scss +0 -180
- package/src/components/PersonDisplay/PersonDisplay.tokens.scss +0 -35
- package/src/components/PersonDisplay/PersonDisplay.tsx +0 -420
- package/src/components/PersonDisplay/index.ts +0 -10
- package/src/components/PhoneInput/PhoneInput.module.scss +0 -23
- package/src/components/PhoneInput/PhoneInput.tsx +0 -271
- package/src/components/PhoneInput/index.ts +0 -4
- package/src/components/PhoneInput/phone.ts +0 -128
- package/src/components/PillMenu/PillMenu.module.scss +0 -117
- package/src/components/PillMenu/PillMenu.tokens.scss +0 -22
- package/src/components/PillMenu/PillMenu.tsx +0 -324
- package/src/components/PillMenu/index.ts +0 -2
- package/src/components/Popover/Anchor.tsx +0 -37
- package/src/components/Popover/Close.tsx +0 -45
- package/src/components/Popover/Content.tsx +0 -213
- package/src/components/Popover/Heading.tsx +0 -33
- package/src/components/Popover/Popover.module.scss +0 -177
- package/src/components/Popover/Popover.tokens.scss +0 -22
- package/src/components/Popover/Popover.tsx +0 -23
- package/src/components/Popover/PopoverRoot.tsx +0 -75
- package/src/components/Popover/Trigger.tsx +0 -86
- package/src/components/Popover/context.ts +0 -22
- package/src/components/Popover/index.ts +0 -7
- package/src/components/Progress/Progress.module.scss +0 -110
- package/src/components/Progress/Progress.tokens.scss +0 -44
- package/src/components/Progress/Progress.tsx +0 -129
- package/src/components/Progress/index.ts +0 -2
- package/src/components/QrCode/QrCode.module.scss +0 -97
- package/src/components/QrCode/QrCode.tokens.scss +0 -17
- package/src/components/QrCode/QrCode.tsx +0 -233
- package/src/components/QrCode/index.ts +0 -2
- package/src/components/QrCode/qr.ts +0 -161
- package/src/components/Radio/Radio.module.scss +0 -175
- package/src/components/Radio/Radio.tokens.scss +0 -59
- package/src/components/Radio/Radio.tsx +0 -127
- package/src/components/Radio/RadioGroup.module.scss +0 -42
- package/src/components/Radio/RadioGroup.tsx +0 -120
- package/src/components/Radio/RadioGroupContext.tsx +0 -30
- package/src/components/Radio/index.ts +0 -4
- package/src/components/Rail/Rail.module.scss +0 -510
- package/src/components/Rail/Rail.tokens.scss +0 -92
- package/src/components/Rail/Rail.tsx +0 -287
- package/src/components/Rail/RailCollapseToggle.tsx +0 -57
- package/src/components/Rail/RailFooter.tsx +0 -17
- package/src/components/Rail/RailGroup.tsx +0 -728
- package/src/components/Rail/RailGroupContext.ts +0 -9
- package/src/components/Rail/RailHeader.tsx +0 -23
- package/src/components/Rail/RailItem.tsx +0 -119
- package/src/components/Rail/RailSection.tsx +0 -39
- package/src/components/Rail/RailSpacer.tsx +0 -19
- package/src/components/Rail/index.ts +0 -9
- package/src/components/RelativeDateInput/RelativeDateInput.module.scss +0 -15
- package/src/components/RelativeDateInput/RelativeDateInput.tokens.scss +0 -6
- package/src/components/RelativeDateInput/RelativeDateInput.tsx +0 -474
- package/src/components/RelativeDateInput/index.ts +0 -10
- package/src/components/RelativeDateInput/relativeDate.ts +0 -127
- package/src/components/RichText/RichText.module.scss +0 -5
- package/src/components/RichText/RichText.tsx +0 -70
- package/src/components/RichText/RichTextAttachment.module.scss +0 -82
- package/src/components/RichText/RichTextAttachment.tsx +0 -122
- package/src/components/RichText/_prose.scss +0 -79
- package/src/components/RichText/attachmentIcon.tsx +0 -24
- package/src/components/RichText/engine/attachment.ts +0 -154
- package/src/components/RichText/engine/autolink.ts +0 -64
- package/src/components/RichText/engine/blockUnit.ts +0 -174
- package/src/components/RichText/engine/colorMarks.ts +0 -85
- package/src/components/RichText/engine/escape.ts +0 -11
- package/src/components/RichText/engine/fromHtml.ts +0 -353
- package/src/components/RichText/engine/fromMarkdown.ts +0 -20
- package/src/components/RichText/engine/inlines.ts +0 -82
- package/src/components/RichText/engine/listDepths.ts +0 -32
- package/src/components/RichText/engine/marks.ts +0 -80
- package/src/components/RichText/engine/mdToHtml.ts +0 -178
- package/src/components/RichText/engine/model.ts +0 -157
- package/src/components/RichText/engine/position.ts +0 -118
- package/src/components/RichText/engine/renderDoc.tsx +0 -395
- package/src/components/RichText/engine/renderLink.ts +0 -15
- package/src/components/RichText/engine/renderMention.ts +0 -16
- package/src/components/RichText/engine/safeHref.ts +0 -22
- package/src/components/RichText/engine/toHtml.ts +0 -154
- package/src/components/RichText/engine/toMarkdown.ts +0 -97
- package/src/components/RichText/engine/transforms.ts +0 -434
- package/src/components/RichText/imageMaxHeightStyle.ts +0 -10
- package/src/components/RichText/index.ts +0 -31
- package/src/components/RichTextEditor/RichTextAttachmentConfig.tsx +0 -264
- package/src/components/RichTextEditor/RichTextBlockControls.tsx +0 -365
- package/src/components/RichTextEditor/RichTextBlockMenu.tsx +0 -162
- package/src/components/RichTextEditor/RichTextColorMenu.tsx +0 -115
- package/src/components/RichTextEditor/RichTextEditor.module.scss +0 -298
- package/src/components/RichTextEditor/RichTextEditor.tsx +0 -1910
- package/src/components/RichTextEditor/RichTextImageResizer.tsx +0 -131
- package/src/components/RichTextEditor/RichTextLinkEditor.tsx +0 -151
- package/src/components/RichTextEditor/RichTextMentionMenu.tsx +0 -99
- package/src/components/RichTextEditor/RichTextToolbar.tsx +0 -379
- package/src/components/RichTextEditor/autolinkInput.ts +0 -65
- package/src/components/RichTextEditor/blockDrop.ts +0 -9
- package/src/components/RichTextEditor/blockReflow.ts +0 -62
- package/src/components/RichTextEditor/commands.ts +0 -300
- package/src/components/RichTextEditor/history.ts +0 -93
- package/src/components/RichTextEditor/icons.tsx +0 -152
- package/src/components/RichTextEditor/imageSize.ts +0 -70
- package/src/components/RichTextEditor/index.ts +0 -5
- package/src/components/RichTextEditor/input.ts +0 -209
- package/src/components/RichTextEditor/inputRules.ts +0 -71
- package/src/components/RichTextEditor/links.ts +0 -103
- package/src/components/RichTextEditor/mentionContext.ts +0 -37
- package/src/components/RichTextEditor/mentions.ts +0 -28
- package/src/components/RichTextEditor/preventSelectionLoss.ts +0 -15
- package/src/components/RichTextEditor/selection.ts +0 -415
- package/src/components/RichTextEditor/shortcuts.ts +0 -44
- package/src/components/RichTextEditor/useAnchoredFloating.ts +0 -50
- package/src/components/RichTextEditor/useAttachmentConfig.ts +0 -134
- package/src/components/RichTextEditor/useDismissOnOutsidePointerDown.ts +0 -26
- package/src/components/RichTextEditor/useLinkEditor.ts +0 -107
- package/src/components/RichTextEditor/useMention.ts +0 -226
- package/src/components/RichTextEditor/useOverlayRect.ts +0 -73
- package/src/components/RichTextEditor/useUpload.ts +0 -246
- package/src/components/Screen/Screen.module.scss +0 -46
- package/src/components/Screen/Screen.tokens.scss +0 -20
- package/src/components/Screen/Screen.tsx +0 -97
- package/src/components/Screen/index.ts +0 -2
- package/src/components/ScrollArea/ScrollArea.module.scss +0 -39
- package/src/components/ScrollArea/ScrollArea.tokens.scss +0 -15
- package/src/components/ScrollArea/ScrollArea.tsx +0 -154
- package/src/components/ScrollArea/index.ts +0 -2
- package/src/components/Select/Chip.tsx +0 -45
- package/src/components/Select/Empty.tsx +0 -39
- package/src/components/Select/Error.tsx +0 -51
- package/src/components/Select/HiddenInputs.tsx +0 -44
- package/src/components/Select/Listbox.tsx +0 -557
- package/src/components/Select/Loading.tsx +0 -30
- package/src/components/Select/Select.module.scss +0 -512
- package/src/components/Select/Select.tokens.scss +0 -140
- package/src/components/Select/Select.tsx +0 -685
- package/src/components/Select/Trigger.tsx +0 -952
- package/src/components/Select/context.ts +0 -101
- package/src/components/Select/emptyStateText.ts +0 -19
- package/src/components/Select/index.ts +0 -9
- package/src/components/Select/useSelectState.ts +0 -157
- package/src/components/Select/utils-types.ts +0 -7
- package/src/components/Select/utils.ts +0 -122
- package/src/components/SettingRow/SettingRow.module.scss +0 -166
- package/src/components/SettingRow/SettingRow.tokens.scss +0 -37
- package/src/components/SettingRow/SettingRow.tsx +0 -242
- package/src/components/SettingRow/index.ts +0 -7
- package/src/components/Skeleton/Skeleton.module.scss +0 -55
- package/src/components/Skeleton/Skeleton.tokens.scss +0 -17
- package/src/components/Skeleton/Skeleton.tsx +0 -131
- package/src/components/Skeleton/index.ts +0 -4
- package/src/components/Skeleton/useSkeletonVisibility.ts +0 -95
- package/src/components/Slider/Slider.module.scss +0 -293
- package/src/components/Slider/Slider.tokens.scss +0 -98
- package/src/components/Slider/Slider.tsx +0 -624
- package/src/components/Slider/index.ts +0 -9
- package/src/components/SlotGrid/SlotGrid.module.scss +0 -61
- package/src/components/SlotGrid/SlotGrid.tokens.scss +0 -21
- package/src/components/SlotGrid/SlotGrid.tsx +0 -111
- package/src/components/SlotGrid/index.ts +0 -2
- package/src/components/SocialButton/SocialButton.module.scss +0 -4
- package/src/components/SocialButton/SocialButton.tsx +0 -40
- package/src/components/SocialButton/index.ts +0 -2
- package/src/components/Sortable/Sortable.module.scss +0 -177
- package/src/components/Sortable/Sortable.tokens.scss +0 -27
- package/src/components/Sortable/Sortable.tsx +0 -572
- package/src/components/Sortable/containerAwareCollision.ts +0 -125
- package/src/components/Sortable/index.ts +0 -13
- package/src/components/SortableGroup/SortableGroup.module.scss +0 -23
- package/src/components/SortableGroup/SortableGroup.tsx +0 -315
- package/src/components/SortableGroup/index.ts +0 -4
- package/src/components/SortableGroup/moveSortableItem.ts +0 -39
- package/src/components/Sparkline/Sparkline.module.scss +0 -28
- package/src/components/Sparkline/Sparkline.tokens.scss +0 -7
- package/src/components/Sparkline/Sparkline.tsx +0 -133
- package/src/components/Sparkline/index.ts +0 -2
- package/src/components/Sparkline/sparklineModel.ts +0 -119
- package/src/components/Split/Split.module.scss +0 -158
- package/src/components/Split/Split.tokens.scss +0 -10
- package/src/components/Split/Split.tsx +0 -231
- package/src/components/Split/index.ts +0 -2
- package/src/components/Stack/Stack.module.scss +0 -67
- package/src/components/Stack/Stack.tokens.scss +0 -11
- package/src/components/Stack/Stack.tsx +0 -100
- package/src/components/Stack/index.ts +0 -2
- package/src/components/StagePath/StagePath.module.scss +0 -255
- package/src/components/StagePath/StagePath.tokens.scss +0 -43
- package/src/components/StagePath/StagePath.tsx +0 -176
- package/src/components/StagePath/index.ts +0 -2
- package/src/components/StatGroup/StatGroup.module.scss +0 -6
- package/src/components/StatGroup/StatGroup.tsx +0 -70
- package/src/components/StatGroup/StatGroupContext.ts +0 -10
- package/src/components/StatGroup/StatTile.module.scss +0 -99
- package/src/components/StatGroup/StatTile.tokens.scss +0 -35
- package/src/components/StatGroup/StatTile.tsx +0 -143
- package/src/components/StatGroup/index.ts +0 -4
- package/src/components/Sticky/Sticky.module.scss +0 -98
- package/src/components/Sticky/Sticky.tokens.scss +0 -17
- package/src/components/Sticky/Sticky.tsx +0 -103
- package/src/components/Sticky/index.ts +0 -2
- package/src/components/Switch/Switch.module.scss +0 -182
- package/src/components/Switch/Switch.tokens.scss +0 -59
- package/src/components/Switch/Switch.tsx +0 -214
- package/src/components/Switch/index.ts +0 -2
- package/src/components/Table/Table.module.scss +0 -308
- package/src/components/Table/Table.tokens.scss +0 -79
- package/src/components/Table/Table.tsx +0 -381
- package/src/components/Table/index.ts +0 -15
- package/src/components/TableOfContents/TableOfContents.module.scss +0 -83
- package/src/components/TableOfContents/TableOfContents.tokens.scss +0 -26
- package/src/components/TableOfContents/TableOfContents.tsx +0 -192
- package/src/components/TableOfContents/activeSection.ts +0 -18
- package/src/components/TableOfContents/index.ts +0 -2
- package/src/components/Tabs/Tabs.module.scss +0 -359
- package/src/components/Tabs/Tabs.tokens.scss +0 -50
- package/src/components/Tabs/Tabs.tsx +0 -538
- package/src/components/Tabs/index.ts +0 -2
- package/src/components/Text/Text.module.scss +0 -115
- package/src/components/Text/Text.tokens.scss +0 -55
- package/src/components/Text/Text.tsx +0 -197
- package/src/components/Text/index.ts +0 -2
- package/src/components/Textarea/Textarea.module.scss +0 -94
- package/src/components/Textarea/Textarea.tokens.scss +0 -48
- package/src/components/Textarea/Textarea.tsx +0 -246
- package/src/components/Textarea/index.ts +0 -2
- package/src/components/Thread/Thread.module.scss +0 -161
- package/src/components/Thread/Thread.tokens.scss +0 -32
- package/src/components/Thread/Thread.tsx +0 -176
- package/src/components/Thread/index.ts +0 -2
- package/src/components/TimeField/TimeField.module.scss +0 -232
- package/src/components/TimeField/TimeField.tsx +0 -793
- package/src/components/TimeField/index.ts +0 -2
- package/src/components/Timeline/Timeline.module.scss +0 -58
- package/src/components/Timeline/Timeline.tokens.scss +0 -13
- package/src/components/Timeline/Timeline.tsx +0 -53
- package/src/components/Timeline/index.ts +0 -2
- package/src/components/Title/Title.module.scss +0 -84
- package/src/components/Title/Title.tokens.scss +0 -37
- package/src/components/Title/Title.tsx +0 -150
- package/src/components/Title/index.ts +0 -2
- package/src/components/Toast/Toast.module.scss +0 -299
- package/src/components/Toast/Toast.tokens.scss +0 -65
- package/src/components/Toast/Toast.tsx +0 -122
- package/src/components/Toast/ToastViewport.tsx +0 -166
- package/src/components/Toast/api.ts +0 -175
- package/src/components/Toast/index.ts +0 -5
- package/src/components/Toast/store.ts +0 -133
- package/src/components/Toast/useToastTimer.ts +0 -94
- package/src/components/Tooltip/Tooltip.module.scss +0 -99
- package/src/components/Tooltip/Tooltip.tokens.scss +0 -23
- package/src/components/Tooltip/Tooltip.tsx +0 -341
- package/src/components/Tooltip/index.ts +0 -2
- package/src/components/TopBar/TopBar.module.scss +0 -235
- package/src/components/TopBar/TopBar.tokens.scss +0 -79
- package/src/components/TopBar/TopBar.tsx +0 -87
- package/src/components/TopBar/TopBarEnd.tsx +0 -20
- package/src/components/TopBar/TopBarIconButton.tsx +0 -86
- package/src/components/TopBar/TopBarSearch.tsx +0 -319
- package/src/components/TopBar/TopBarSearchPanel.tsx +0 -268
- package/src/components/TopBar/TopBarStart.tsx +0 -20
- package/src/components/TopBar/index.ts +0 -11
- package/src/components/Tour/Spotlight.tsx +0 -121
- package/src/components/Tour/Tour.module.scss +0 -210
- package/src/components/Tour/Tour.tokens.scss +0 -58
- package/src/components/Tour/Tour.tsx +0 -617
- package/src/components/Tour/index.ts +0 -2
- package/src/components/Tour/useTourTarget.ts +0 -115
- package/src/components/TreeView/TreeView.module.scss +0 -268
- package/src/components/TreeView/TreeView.tokens.scss +0 -36
- package/src/components/TreeView/TreeView.tsx +0 -536
- package/src/components/TreeView/index.ts +0 -3
- package/src/components/TreeView/treeModel.ts +0 -224
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +0 -7
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +0 -29
- package/src/components/VisuallyHidden/index.ts +0 -2
- package/src/components/WidgetPreview/WidgetPreview.module.scss +0 -11
- package/src/components/WidgetPreview/WidgetPreview.tokens.scss +0 -26
- package/src/components/WidgetPreview/WidgetPreview.tsx +0 -36
- package/src/components/WidgetPreview/WidgetShape.module.scss +0 -140
- package/src/components/WidgetPreview/WidgetShape.tsx +0 -159
- package/src/components/WidgetPreview/index.ts +0 -2
- package/src/components/_internal/Trend.tsx +0 -27
- package/src/components/_internal/choiceTile.scss +0 -74
- package/src/components/_internal/collapse.scss +0 -10
- package/src/components/_internal/collapse.ts +0 -58
- package/src/components/_internal/currency.ts +0 -257
- package/src/components/_internal/dragAnnouncements.ts +0 -200
- package/src/components/_internal/fieldWiring.ts +0 -225
- package/src/components/_internal/gridSpan.ts +0 -54
- package/src/components/_internal/isoDay.ts +0 -35
- package/src/components/_internal/letterKey.ts +0 -26
- package/src/components/_internal/overlay/focusRestore.ts +0 -21
- package/src/components/_internal/overlay/index.ts +0 -12
- package/src/components/_internal/overlay/tourHold.ts +0 -23
- package/src/components/_internal/overlay/useFocusTrap.ts +0 -120
- package/src/components/_internal/overlay/useInOverlay.ts +0 -81
- package/src/components/_internal/overlay/useOverlayStack.ts +0 -232
- package/src/components/_internal/overlay/useScrollLock.ts +0 -112
- package/src/components/_internal/refs.ts +0 -48
- package/src/components/_internal/statusColor.ts +0 -26
- package/src/components/_internal/timeUtils.ts +0 -23
- package/src/components/_internal/useAsyncOptions.ts +0 -145
- package/src/components/_internal/useClippedTooltip.ts +0 -50
- package/src/components/_internal/useControllableState.ts +0 -50
- package/src/components/_internal/useSize.ts +0 -23
- package/src/components.manifest.json +0 -1157
- package/src/hooks/useBelowBreakpoint.ts +0 -58
- package/src/i18n/I18nProvider.tsx +0 -52
- package/src/i18n/LocaleProvider.tsx +0 -17
- package/src/i18n/en.ts +0 -658
- package/src/i18n/format.ts +0 -71
- package/src/i18n/index.ts +0 -13
- package/src/i18n/messages.ts +0 -1293
- package/src/i18n/ru.ts +0 -688
- package/src/i18n/useLocale.ts +0 -19
- package/src/i18n/useTranslation.ts +0 -58
- package/src/index.ts +0 -920
- package/src/palette/index.ts +0 -2
- package/src/palette/palette.ts +0 -108
- package/src/styles/dark.scss +0 -4
- package/src/styles/global.scss +0 -7
- package/src/styles/mixins.scss +0 -143
- package/src/styles/reset.scss +0 -78
- package/src/styles/tokens.scss +0 -18
- package/src/styles/typography.scss +0 -44
|
@@ -1,1867 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useCallback,
|
|
4
|
-
useEffect,
|
|
5
|
-
useId,
|
|
6
|
-
useLayoutEffect,
|
|
7
|
-
useMemo,
|
|
8
|
-
useRef,
|
|
9
|
-
useState,
|
|
10
|
-
} from 'react';
|
|
11
|
-
import type {
|
|
12
|
-
FocusEvent as ReactFocusEvent,
|
|
13
|
-
HTMLAttributes,
|
|
14
|
-
KeyboardEvent as ReactKeyboardEvent,
|
|
15
|
-
MouseEvent as ReactMouseEvent,
|
|
16
|
-
PointerEvent as ReactPointerEvent,
|
|
17
|
-
ReactNode,
|
|
18
|
-
} from 'react';
|
|
19
|
-
import clsx from 'clsx';
|
|
20
|
-
import { Maximize2, Minimize2 } from 'lucide-react';
|
|
21
|
-
import { Button } from '../Button';
|
|
22
|
-
import {
|
|
23
|
-
overlayStack,
|
|
24
|
-
useFloatingSurface,
|
|
25
|
-
useFocusTrap,
|
|
26
|
-
useScrollLock,
|
|
27
|
-
} from '../_internal/overlay';
|
|
28
|
-
import { useTranslation } from '../../i18n/useTranslation';
|
|
29
|
-
import { isLetterKey } from '../_internal/letterKey';
|
|
30
|
-
import { mergeAriaDescribedby, mergeRefs, sanitizeId } from '../_internal/refs';
|
|
31
|
-
import { useControllableState } from '../_internal/useControllableState';
|
|
32
|
-
import { computeLayout, ESTIMATED_NODE_SIZE } from './layout';
|
|
33
|
-
import type { NodeSize } from './layout';
|
|
34
|
-
import { edgeGeometry, selfLoopGeometry } from './edgePath';
|
|
35
|
-
import type { Rect } from './edgePath';
|
|
36
|
-
import { nearestInDirection, topLeftMost } from './spatialNav';
|
|
37
|
-
import type { NavDirection } from './spatialNav';
|
|
38
|
-
import { FlowControls } from './FlowControls';
|
|
39
|
-
import { FlowEdge } from './FlowEdge';
|
|
40
|
-
import { FlowNode } from './FlowNode';
|
|
41
|
-
import type { FlowCanvasEdge, FlowCanvasNode, FlowCanvasPoint, FlowCanvasSelection } from './types';
|
|
42
|
-
import { PAN_STEP, ZOOM_STEP, useViewport } from './useViewport';
|
|
43
|
-
import styles from './FlowCanvas.module.scss';
|
|
44
|
-
|
|
45
|
-
/** Props for {@link FlowCanvas}. */
|
|
46
|
-
export interface FlowCanvasProps extends HTMLAttributes<HTMLDivElement> {
|
|
47
|
-
/** Nodes to render. The canvas never mutates this array. */
|
|
48
|
-
nodes: FlowCanvasNode[];
|
|
49
|
-
/** Directed edges between nodes. Edges referencing unknown ids are skipped (dev warning). */
|
|
50
|
-
edges: FlowCanvasEdge[];
|
|
51
|
-
/** Called when the user requests a node at a canvas point (double-click empty canvas). */
|
|
52
|
-
onNodeCreate?: (position: FlowCanvasPoint) => void;
|
|
53
|
-
/** Called when a node's position is committed (drag end, keyboard nudge). */
|
|
54
|
-
onNodeMove?: (id: string, position: FlowCanvasPoint) => void;
|
|
55
|
-
/** Called when a node is opened (Enter/Space or double-click). */
|
|
56
|
-
onNodeOpen?: (id: string) => void;
|
|
57
|
-
/** Called when deletion of the selected node is requested (Delete/Backspace). */
|
|
58
|
-
onNodeDelete?: (id: string) => void;
|
|
59
|
-
/** Called when the user draws or confirms a connection between two nodes. */
|
|
60
|
-
onEdgeCreate?: (from: string, to: string) => void;
|
|
61
|
-
/**
|
|
62
|
-
* Called when the user drags an existing edge's endpoint onto a different
|
|
63
|
-
* node, or confirms a keyboard rewire (`R` / `Shift+R`). `id` is the edge;
|
|
64
|
-
* `from`/`to` are its NEW endpoints. The canvas never mutates the edge — apply
|
|
65
|
-
* this to your state. Not fired on revert (empty-canvas drop, invalid target,
|
|
66
|
-
* or no change). Disabled by `readOnly` and `allowConnections={false}`.
|
|
67
|
-
*/
|
|
68
|
-
onEdgeReconnect?: (id: string, from: string, to: string) => void;
|
|
69
|
-
/** Called when an edge is opened (Enter/Space or double-click). */
|
|
70
|
-
onEdgeOpen?: (id: string) => void;
|
|
71
|
-
/** Called when deletion of the selected edge is requested (Delete/Backspace). */
|
|
72
|
-
onEdgeDelete?: (id: string) => void;
|
|
73
|
-
/**
|
|
74
|
-
* Live validation while drawing a connection. Invalid targets can't be
|
|
75
|
-
* dropped on (pointer) and are skipped (keyboard).
|
|
76
|
-
* @default rejects self-loops and duplicate (from, to) pairs
|
|
77
|
-
*/
|
|
78
|
-
isValidConnection?: (from: string, to: string) => boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Controlled selection. Use with `onSelectionChange`. A selection whose id
|
|
81
|
-
* is not (or no longer) in `nodes`/`edges` acts as no selection — e.g.
|
|
82
|
-
* after applying a delete intent — until the id reappears in the graph.
|
|
83
|
-
*/
|
|
84
|
-
selection?: FlowCanvasSelection;
|
|
85
|
-
/** Initial selection when uncontrolled. Stale ids act as no selection. @default null */
|
|
86
|
-
defaultSelection?: FlowCanvasSelection;
|
|
87
|
-
/** Fires whenever the selection changes (click, focus, Escape). */
|
|
88
|
-
onSelectionChange?: (selection: FlowCanvasSelection) => void;
|
|
89
|
-
/**
|
|
90
|
-
* Render-only mode: create/move/connect/delete are disabled; selection and
|
|
91
|
-
* open still work. @default false
|
|
92
|
-
*/
|
|
93
|
-
readOnly?: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* When false, disables creating and rewiring connections — the node connect
|
|
96
|
-
* handle is hidden, pointer/keyboard connect (`C`, handle drag) and edge
|
|
97
|
-
* rewiring (`R`, endpoint drag) are inert. Node drag/move/delete/selection
|
|
98
|
-
* still work. `readOnly` overrides this (it disables everything). @default true
|
|
99
|
-
*/
|
|
100
|
-
allowConnections?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* When true, a dragged node is clamped so its whole card stays within the
|
|
103
|
-
* currently-visible canvas area (accounting for pan/zoom). Applies to pointer
|
|
104
|
-
* drag, the committed `onNodeMove`, and Shift+Arrow nudges. @default false
|
|
105
|
-
*/
|
|
106
|
-
confineNodesToView?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Render a floating toolbar anchored to the top-right corner of the selected
|
|
109
|
-
* NODE. Called with the node id; return `null` to show nothing for that node.
|
|
110
|
-
* The toolbar is a screen-positioned overlay (a sibling of the transformed
|
|
111
|
-
* stage, so it is not scaled) that follows pan/zoom. Pressing it never starts
|
|
112
|
-
* a pan or clears the selection. Only rendered for the current single
|
|
113
|
-
* selection. @default none
|
|
114
|
-
*/
|
|
115
|
-
renderNodeActions?: (id: string) => ReactNode;
|
|
116
|
-
/**
|
|
117
|
-
* Render a floating toolbar anchored near the midpoint of the selected EDGE.
|
|
118
|
-
* Called with the edge id; return `null` to show nothing for that edge. Same
|
|
119
|
-
* screen-positioned, pan/zoom-following overlay as `renderNodeActions`; safe
|
|
120
|
-
* to host a `ConfirmationPopover` here. @default none
|
|
121
|
-
*/
|
|
122
|
-
renderEdgeActions?: (id: string) => ReactNode;
|
|
123
|
-
/**
|
|
124
|
-
* Consumer-rendered controls shown in a top-left toolbar overlay. Put design-
|
|
125
|
-
* system `<Button>`s here (e.g. an "Add node" button wired to your own state).
|
|
126
|
-
* Stays pinned when the canvas is maximized. @default none
|
|
127
|
-
*/
|
|
128
|
-
controls?: ReactNode;
|
|
129
|
-
/**
|
|
130
|
-
* Show the built-in maximize / restore toggle (top-right). Set false to drive
|
|
131
|
-
* maximize entirely via the `maximized` prop. @default true
|
|
132
|
-
*/
|
|
133
|
-
maximizeControl?: boolean;
|
|
134
|
-
/** Controlled maximize state. Use with `onMaximizedChange`. */
|
|
135
|
-
maximized?: boolean;
|
|
136
|
-
/** Initial maximize state when uncontrolled. @default false */
|
|
137
|
-
defaultMaximized?: boolean;
|
|
138
|
-
/** Fires whenever maximize is toggled (button, `F` key, or Escape). */
|
|
139
|
-
onMaximizedChange?: (maximized: boolean) => void;
|
|
140
|
-
/**
|
|
141
|
-
* Re-fit signal. Whenever this value CHANGES, the canvas re-runs its
|
|
142
|
-
* fit-to-content — the same fit as the Fit control / `0` key — re-centering
|
|
143
|
-
* and re-zooming to frame all content. It does this WITHOUT remounting, so the
|
|
144
|
-
* viewport, selection, keyboard focus, and the built-in maximize focus
|
|
145
|
-
* management are all preserved (unlike forcing a re-fit with a changing React
|
|
146
|
-
* `key`, which remounts and drops focus to `<body>`).
|
|
147
|
-
*
|
|
148
|
-
* Bind it to whatever should trigger a re-center: `refitKey={maximized}` to
|
|
149
|
-
* re-fit on maximize enter/exit (the container resizes), or bump a counter
|
|
150
|
-
* after a programmatic re-arrange that moves every node. The FIRST value never
|
|
151
|
-
* fits on its own — the mount fit handles the first frame — so any initial
|
|
152
|
-
* value is safe. @default none
|
|
153
|
-
*/
|
|
154
|
-
refitKey?: string | number | boolean;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* A pan/zoom canvas for directed node-edge diagrams, the primitive behind visual workflow builders.
|
|
159
|
-
* @see docs/components/FlowCanvas.md
|
|
160
|
-
*/
|
|
161
|
-
export const FlowCanvas = forwardRef<HTMLDivElement, FlowCanvasProps>(function FlowCanvas(
|
|
162
|
-
{
|
|
163
|
-
nodes,
|
|
164
|
-
edges,
|
|
165
|
-
onNodeCreate,
|
|
166
|
-
onNodeMove,
|
|
167
|
-
onNodeOpen,
|
|
168
|
-
onNodeDelete,
|
|
169
|
-
onEdgeCreate,
|
|
170
|
-
onEdgeReconnect,
|
|
171
|
-
onEdgeOpen,
|
|
172
|
-
onEdgeDelete,
|
|
173
|
-
isValidConnection,
|
|
174
|
-
selection: selectionProp,
|
|
175
|
-
defaultSelection = null,
|
|
176
|
-
onSelectionChange,
|
|
177
|
-
readOnly = false,
|
|
178
|
-
allowConnections = true,
|
|
179
|
-
confineNodesToView = false,
|
|
180
|
-
renderNodeActions,
|
|
181
|
-
renderEdgeActions,
|
|
182
|
-
controls,
|
|
183
|
-
maximizeControl = true,
|
|
184
|
-
maximized: maximizedProp,
|
|
185
|
-
defaultMaximized = false,
|
|
186
|
-
onMaximizedChange,
|
|
187
|
-
refitKey,
|
|
188
|
-
className,
|
|
189
|
-
'aria-describedby': ariaDescribedby,
|
|
190
|
-
onPointerDown,
|
|
191
|
-
onPointerMove,
|
|
192
|
-
onPointerUp,
|
|
193
|
-
onPointerCancel,
|
|
194
|
-
onKeyDown,
|
|
195
|
-
onDoubleClick,
|
|
196
|
-
onBlur,
|
|
197
|
-
onFocusCapture,
|
|
198
|
-
...rest
|
|
199
|
-
},
|
|
200
|
-
ref,
|
|
201
|
-
) {
|
|
202
|
-
const t = useTranslation();
|
|
203
|
-
const rootRef = useRef<HTMLDivElement | null>(null);
|
|
204
|
-
const uid = sanitizeId(useId());
|
|
205
|
-
const instructionsId = `flow-instructions-${uid}`;
|
|
206
|
-
const markerId = `flow-arrow-${uid}`;
|
|
207
|
-
const markerActiveId = `flow-arrow-active-${uid}`;
|
|
208
|
-
// Gate for all connect/rewire entry points. `readOnly` disables everything;
|
|
209
|
-
// `allowConnections={false}` disables only connecting/rewiring while leaving
|
|
210
|
-
// node drag/move/delete/selection intact.
|
|
211
|
-
const canConnect = !readOnly && allowConnections;
|
|
212
|
-
|
|
213
|
-
const nodeById = useMemo(() => new Map(nodes.map((n) => [n.id, n])), [nodes]);
|
|
214
|
-
const edgeIds = useMemo(() => new Set(edges.map((e) => e.id)), [edges]);
|
|
215
|
-
|
|
216
|
-
const [rawSelection, setSelection] = useControllableState<FlowCanvasSelection>({
|
|
217
|
-
value: selectionProp,
|
|
218
|
-
defaultValue: defaultSelection,
|
|
219
|
-
onChange: onSelectionChange,
|
|
220
|
-
});
|
|
221
|
-
const [maximized, setMaximized] = useControllableState<boolean>({
|
|
222
|
-
value: maximizedProp,
|
|
223
|
-
defaultValue: defaultMaximized,
|
|
224
|
-
onChange: onMaximizedChange,
|
|
225
|
-
});
|
|
226
|
-
// Toggle + announce in one place so the button, the F key, and the Escape
|
|
227
|
-
// exit all narrate consistently.
|
|
228
|
-
const setMaximizedAnnounced = (next: boolean) => {
|
|
229
|
-
setMaximized(next);
|
|
230
|
-
announce(t(next ? 'flowCanvas.maximized' : 'flowCanvas.restored'));
|
|
231
|
-
};
|
|
232
|
-
// --- maximize: scroll lock, focus trap, focus move/restore ----------------
|
|
233
|
-
useScrollLock(maximized);
|
|
234
|
-
useFocusTrap(rootRef, maximized);
|
|
235
|
-
// Capture the pre-maximize focus and move focus into the canvas on enter;
|
|
236
|
-
// restore it on exit. Passive effect, ordered after useFocusTrap so the trap
|
|
237
|
-
// has torn down before we restore focus outward (see note above).
|
|
238
|
-
const prevMaximizedRef = useRef(maximized);
|
|
239
|
-
const previouslyFocusedRef = useRef<HTMLElement | null>(null);
|
|
240
|
-
useEffect(() => {
|
|
241
|
-
const was = prevMaximizedRef.current;
|
|
242
|
-
prevMaximizedRef.current = maximized;
|
|
243
|
-
if (maximized && !was) {
|
|
244
|
-
previouslyFocusedRef.current = (document.activeElement as HTMLElement | null) ?? null;
|
|
245
|
-
rootRef.current?.focus({ preventScroll: true });
|
|
246
|
-
} else if (!maximized && was) {
|
|
247
|
-
const target = previouslyFocusedRef.current;
|
|
248
|
-
previouslyFocusedRef.current = null;
|
|
249
|
-
if (target && document.contains(target)) target.focus({ preventScroll: true });
|
|
250
|
-
else rootRef.current?.focus({ preventScroll: true });
|
|
251
|
-
}
|
|
252
|
-
}, [maximized]);
|
|
253
|
-
// The consumer applies a delete intent by removing the node/edge from
|
|
254
|
-
// props — but the retained (uncontrolled) selection state still holds the
|
|
255
|
-
// dead id afterwards, and there is no imperative API to clear it. Every
|
|
256
|
-
// read below goes through this derived selection instead: an id absent
|
|
257
|
-
// from the current graph acts as no selection, so intents (Delete/Enter)
|
|
258
|
-
// can never target ids that are not in the graph. The raw state is
|
|
259
|
-
// deliberately kept — if the id returns (e.g. the consumer undoes the
|
|
260
|
-
// delete), the selection resurrects.
|
|
261
|
-
const selection = useMemo(() => {
|
|
262
|
-
if (!rawSelection) return null;
|
|
263
|
-
const exists =
|
|
264
|
-
rawSelection.type === 'node' ? nodeById.has(rawSelection.id) : edgeIds.has(rawSelection.id);
|
|
265
|
-
return exists ? rawSelection : null;
|
|
266
|
-
}, [rawSelection, nodeById, edgeIds]);
|
|
267
|
-
// Latest selection, readable from the stable node/edge pointer handlers:
|
|
268
|
-
// they guard re-selects against it without taking `selection` as a
|
|
269
|
-
// dependency (which would re-create the handlers and re-render every
|
|
270
|
-
// memoized node/edge on each selection change).
|
|
271
|
-
const selectionRef = useRef(selection);
|
|
272
|
-
selectionRef.current = selection;
|
|
273
|
-
|
|
274
|
-
// --- node registry + measurement -----------------------------------------
|
|
275
|
-
const nodeEls = useRef(new Map<string, HTMLDivElement>());
|
|
276
|
-
const edgeEls = useRef(new Map<string, SVGPathElement>());
|
|
277
|
-
const [sizes, setSizes] = useState<Map<string, NodeSize>>(new Map());
|
|
278
|
-
// A ref detach for the element that holds focus is EITHER that element
|
|
279
|
-
// unmounting (the consumer applied a delete intent — focus is about to
|
|
280
|
-
// collapse to <body>) OR ref-identity churn on a re-render of a
|
|
281
|
-
// still-focused node/edge (FlowNode/FlowEdge attach inline ref callbacks,
|
|
282
|
-
// so every memo re-render detaches and re-attaches within one commit). The
|
|
283
|
-
// two are indistinguishable here in the mutation phase, so the registers
|
|
284
|
-
// only raise this flag; the post-commit effect below (see "focus reclaim")
|
|
285
|
-
// decides — a churned element still holds focus, a deleted one has lost it.
|
|
286
|
-
const pendingFocusReclaim = useRef(false);
|
|
287
|
-
const flagFocusReclaim = useCallback((el: Element | undefined) => {
|
|
288
|
-
if (el && (el === document.activeElement || el.contains(document.activeElement))) {
|
|
289
|
-
pendingFocusReclaim.current = true;
|
|
290
|
-
}
|
|
291
|
-
}, []);
|
|
292
|
-
const registerNodeEl = useCallback(
|
|
293
|
-
(id: string, el: HTMLDivElement | null) => {
|
|
294
|
-
if (el) {
|
|
295
|
-
nodeEls.current.set(id, el);
|
|
296
|
-
} else {
|
|
297
|
-
flagFocusReclaim(nodeEls.current.get(id));
|
|
298
|
-
nodeEls.current.delete(id);
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
[flagFocusReclaim],
|
|
302
|
-
);
|
|
303
|
-
const registerEdgeEl = useCallback(
|
|
304
|
-
(id: string, el: SVGPathElement | null) => {
|
|
305
|
-
if (el) {
|
|
306
|
-
edgeEls.current.set(id, el);
|
|
307
|
-
} else {
|
|
308
|
-
flagFocusReclaim(edgeEls.current.get(id));
|
|
309
|
-
edgeEls.current.delete(id);
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
[flagFocusReclaim],
|
|
313
|
-
);
|
|
314
|
-
|
|
315
|
-
const nodeIdsKey = nodes.map((n) => n.id).join(' ');
|
|
316
|
-
useEffect(() => {
|
|
317
|
-
if (typeof ResizeObserver === 'undefined') return; // jsdom — estimates are used
|
|
318
|
-
const observer = new ResizeObserver(() => {
|
|
319
|
-
const next = new Map<string, NodeSize>();
|
|
320
|
-
for (const [id, el] of nodeEls.current) {
|
|
321
|
-
// Hidden mounts (display: none Modal/Tab) measure 0x0 — treat those
|
|
322
|
-
// as unmeasured so ESTIMATED_NODE_SIZE keeps applying and the
|
|
323
|
-
// corrective 'estimated' -> 'done' re-fit still runs on reveal.
|
|
324
|
-
if (el.offsetWidth > 0 && el.offsetHeight > 0) {
|
|
325
|
-
next.set(id, { width: el.offsetWidth, height: el.offsetHeight });
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
setSizes(next);
|
|
329
|
-
});
|
|
330
|
-
for (const el of nodeEls.current.values()) observer.observe(el);
|
|
331
|
-
return () => observer.disconnect();
|
|
332
|
-
// Re-observe when the node set changes.
|
|
333
|
-
}, [nodeIdsKey]);
|
|
334
|
-
|
|
335
|
-
// --- positions: live drag > explicit prop > session override > layout ----
|
|
336
|
-
// `dragOverrides` retains committed drags of auto-laid-out nodes for the
|
|
337
|
-
// session; `liveDrag` is the in-flight gesture position and wins over
|
|
338
|
-
// everything so controlled nodes track the pointer too (they snap back on
|
|
339
|
-
// release unless the consumer persists the move from `onNodeMove`).
|
|
340
|
-
const [dragOverrides, setDragOverrides] = useState<Map<string, FlowCanvasPoint>>(new Map());
|
|
341
|
-
const [liveDrag, setLiveDrag] = useState<{ id: string; position: FlowCanvasPoint } | null>(null);
|
|
342
|
-
const dragState = useRef<{
|
|
343
|
-
id: string;
|
|
344
|
-
pointerId: number;
|
|
345
|
-
/** Pointerdown coordinates — the click-tolerance baseline (screen px). */
|
|
346
|
-
startClientX: number;
|
|
347
|
-
startClientY: number;
|
|
348
|
-
/** Last processed coordinates — the per-segment conversion baseline. */
|
|
349
|
-
lastClientX: number;
|
|
350
|
-
lastClientY: number;
|
|
351
|
-
/** Node position so far, accumulated per segment in canvas units. */
|
|
352
|
-
position: FlowCanvasPoint;
|
|
353
|
-
moved: boolean;
|
|
354
|
-
} | null>(null);
|
|
355
|
-
const layoutPositions = useMemo(() => computeLayout(nodes, edges, sizes), [nodes, edges, sizes]);
|
|
356
|
-
const positionOf = useCallback(
|
|
357
|
-
(node: FlowCanvasNode): FlowCanvasPoint => {
|
|
358
|
-
if (liveDrag?.id === node.id) return liveDrag.position;
|
|
359
|
-
return (
|
|
360
|
-
node.position ??
|
|
361
|
-
dragOverrides.get(node.id) ??
|
|
362
|
-
layoutPositions.get(node.id) ?? { x: 0, y: 0 }
|
|
363
|
-
);
|
|
364
|
-
},
|
|
365
|
-
[liveDrag, dragOverrides, layoutPositions],
|
|
366
|
-
);
|
|
367
|
-
const rects = useMemo(() => {
|
|
368
|
-
const map = new Map<string, Rect>();
|
|
369
|
-
for (const node of nodes) {
|
|
370
|
-
const pos = positionOf(node);
|
|
371
|
-
const size = sizes.get(node.id) ?? ESTIMATED_NODE_SIZE;
|
|
372
|
-
map.set(node.id, { x: pos.x, y: pos.y, width: size.width, height: size.height });
|
|
373
|
-
}
|
|
374
|
-
return map;
|
|
375
|
-
}, [nodes, positionOf, sizes]);
|
|
376
|
-
|
|
377
|
-
// --- connections: pointer draw + keyboard connect mode -------------------
|
|
378
|
-
// `connect` is the in-flight connection gesture. Pointer mode tracks the
|
|
379
|
-
// cursor for the ghost edge; keyboard mode steps the target with arrows.
|
|
380
|
-
const [connect, setConnect] = useState<{
|
|
381
|
-
from: string;
|
|
382
|
-
mode: 'pointer' | 'keyboard';
|
|
383
|
-
/** Pointer that started a pointer-mode draw; null in keyboard mode. */
|
|
384
|
-
pointerId: number | null;
|
|
385
|
-
target: string | null;
|
|
386
|
-
cursor: FlowCanvasPoint | null; // pointer mode ghost end
|
|
387
|
-
/** Set only when rewiring an existing edge (distinguishes rewire from create). */
|
|
388
|
-
edgeId?: string;
|
|
389
|
-
/** Which endpoint of the edge is being moved (rewire only). */
|
|
390
|
-
end?: 'source' | 'target';
|
|
391
|
-
/** The edge's OTHER (fixed) endpoint that stays put during a rewire. */
|
|
392
|
-
fixed?: string;
|
|
393
|
-
} | null>(null);
|
|
394
|
-
// Latest connect gesture, readable from the stable node/edge/handle pointer
|
|
395
|
-
// handlers without taking `connect` as a dependency (same reasoning as
|
|
396
|
-
// `selectionRef` above).
|
|
397
|
-
const connectRef = useRef(connect);
|
|
398
|
-
connectRef.current = connect;
|
|
399
|
-
// #282: an armed connect gesture (drawing / rewiring an edge) is an
|
|
400
|
-
// Escape-consuming MODE — register it as a floating surface so a host
|
|
401
|
-
// Modal/Drawer yields the Escape that cancels the connect (the mode cancels;
|
|
402
|
-
// the host survives that press). A mere selection deliberately does NOT
|
|
403
|
-
// register — deselect shouldn't hold the host hostage.
|
|
404
|
-
useFloatingSurface(connect != null);
|
|
405
|
-
|
|
406
|
-
const defaultIsValid = useCallback(
|
|
407
|
-
(from: string, to: string) => from !== to && !edges.some((e) => e.from === from && e.to === to),
|
|
408
|
-
[edges],
|
|
409
|
-
);
|
|
410
|
-
const isValid = isValidConnection ?? defaultIsValid;
|
|
411
|
-
|
|
412
|
-
// Rewire validation. Unlike `isValid`, it excludes the edge being rewired so
|
|
413
|
-
// dropping the endpoint back near its own current node isn't flagged as a
|
|
414
|
-
// self-duplicate — that case is a silent no-op (revert), handled at commit.
|
|
415
|
-
const isRewireValid = useCallback(
|
|
416
|
-
(edgeId: string, from: string, to: string): boolean =>
|
|
417
|
-
from !== to &&
|
|
418
|
-
!edges.some((e) => e.id !== edgeId && e.from === from && e.to === to) &&
|
|
419
|
-
(isValidConnection ? isValidConnection(from, to) : true),
|
|
420
|
-
[edges, isValidConnection],
|
|
421
|
-
);
|
|
422
|
-
|
|
423
|
-
// The edge's NEW (from, to) given the in-flight rewire: the moving end takes
|
|
424
|
-
// the hovered/stepped `target` (falling back to `fixed` — a no-op — when none
|
|
425
|
-
// is picked); the other end stays `fixed`.
|
|
426
|
-
const rewireEndpoints = (c: NonNullable<typeof connect>): [string, string] =>
|
|
427
|
-
c.end === 'source' ? [c.target ?? c.fixed!, c.fixed!] : [c.fixed!, c.target ?? c.fixed!];
|
|
428
|
-
|
|
429
|
-
const nodeAtPoint = useCallback(
|
|
430
|
-
(point: FlowCanvasPoint): string | null => {
|
|
431
|
-
// Reverse iteration matches paint order: later nodes render on top, so
|
|
432
|
-
// when nodes overlap the hit must go to the visually-topmost one.
|
|
433
|
-
for (const [id, rect] of [...rects].reverse()) {
|
|
434
|
-
if (
|
|
435
|
-
point.x >= rect.x &&
|
|
436
|
-
point.x <= rect.x + rect.width &&
|
|
437
|
-
point.y >= rect.y &&
|
|
438
|
-
point.y <= rect.y + rect.height
|
|
439
|
-
) {
|
|
440
|
-
return id;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
return null;
|
|
444
|
-
},
|
|
445
|
-
[rects],
|
|
446
|
-
);
|
|
447
|
-
|
|
448
|
-
// Commit-time revalidation: `connect.target` was validated when it was
|
|
449
|
-
// LAST SET (pointer move / arrow step), but the graph is live props — the
|
|
450
|
-
// consumer can remove either node or add an identical edge between then
|
|
451
|
-
// and the commit (pointerup / Enter). Re-checking here keeps the same
|
|
452
|
-
// invariant as the derived selection above: intents never fire with ids
|
|
453
|
-
// that are not in (or no longer valid against) the current graph.
|
|
454
|
-
const canCommitConnect = (from: string, to: string): boolean =>
|
|
455
|
-
nodeById.has(from) && nodeById.has(to) && isValid(from, to);
|
|
456
|
-
|
|
457
|
-
// --- edges: resolve + skip broken ones (one-time dev warning) ------------
|
|
458
|
-
const warnedEdges = useRef(new Set<string>());
|
|
459
|
-
const resolvedEdges = useMemo(() => {
|
|
460
|
-
const reverse = new Set(edges.map((e) => `${e.to} ${e.from}`));
|
|
461
|
-
return edges.flatMap((edge) => {
|
|
462
|
-
const source = rects.get(edge.from);
|
|
463
|
-
const target = rects.get(edge.to);
|
|
464
|
-
if (!source || !target) {
|
|
465
|
-
if (process.env.NODE_ENV !== 'production' && !warnedEdges.current.has(edge.id)) {
|
|
466
|
-
warnedEdges.current.add(edge.id);
|
|
467
|
-
console.warn(
|
|
468
|
-
`[FlowCanvas] edge "${edge.id}" references a missing node (${edge.from} → ${edge.to}) and was skipped.`,
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
return [];
|
|
472
|
-
}
|
|
473
|
-
const geometry =
|
|
474
|
-
edge.from === edge.to
|
|
475
|
-
? selfLoopGeometry(source)
|
|
476
|
-
: edgeGeometry(
|
|
477
|
-
source,
|
|
478
|
-
target,
|
|
479
|
-
reverse.has(`${edge.from} ${edge.to}`) ? (edge.from < edge.to ? 1 : -1) : 0,
|
|
480
|
-
);
|
|
481
|
-
return [{ edge, geometry }];
|
|
482
|
-
});
|
|
483
|
-
}, [edges, rects]);
|
|
484
|
-
|
|
485
|
-
// --- viewport: pan/zoom/fit --------------------------------------------
|
|
486
|
-
const { viewport, panBy, zoomBy, fitTo } = useViewport(rootRef);
|
|
487
|
-
// The nonce forces a DOM mutation even for back-to-back identical messages
|
|
488
|
-
// (select A, Escape, select B, Escape) — with a plain string, React bails
|
|
489
|
-
// on the identical state and the live region never re-announces. The nonce
|
|
490
|
-
// keys a child <span> so the region node itself stays stable (screen
|
|
491
|
-
// readers can miss announcements when the live region is replaced).
|
|
492
|
-
const [announcement, setAnnouncement] = useState({ text: '', nonce: 0 });
|
|
493
|
-
const announce = useCallback(
|
|
494
|
-
(message: string) => setAnnouncement((prev) => ({ text: message, nonce: prev.nonce + 1 })),
|
|
495
|
-
[],
|
|
496
|
-
);
|
|
497
|
-
|
|
498
|
-
// Commit a rewire — shared by pointer-up and keyboard Enter. Fires
|
|
499
|
-
// onEdgeReconnect only when a target is picked, the gesture wasn't
|
|
500
|
-
// preventDefault-ed, the result is still valid against the live graph, AND it
|
|
501
|
-
// actually changes the edge (dropping back on the current endpoint is a
|
|
502
|
-
// silent no-op / revert). Never touches the create (onEdgeCreate) path.
|
|
503
|
-
// Returns whether the reconnect intent fired (callers use it to narrate).
|
|
504
|
-
const commitRewire = (c: NonNullable<typeof connect>, prevented = false): boolean => {
|
|
505
|
-
if (!c.edgeId || !c.target || prevented) return false;
|
|
506
|
-
const edge = edges.find((e) => e.id === c.edgeId);
|
|
507
|
-
if (!edge) return false;
|
|
508
|
-
const [newFrom, newTo] = rewireEndpoints(c);
|
|
509
|
-
if (newFrom === edge.from && newTo === edge.to) return false; // unchanged → revert
|
|
510
|
-
if (!isRewireValid(c.edgeId, newFrom, newTo)) return false;
|
|
511
|
-
onEdgeReconnect?.(c.edgeId, newFrom, newTo);
|
|
512
|
-
announce(
|
|
513
|
-
t('flowCanvas.rewireDone', {
|
|
514
|
-
// `||` on every `node.label || id` in this file, not `??`: the id tail
|
|
515
|
-
// exists so a live-region sentence always names something, and
|
|
516
|
-
// `label: ''` — ordinary consumer code — announced "Reconnected to ".
|
|
517
|
-
from: nodeById.get(newFrom)?.label || newFrom,
|
|
518
|
-
to: nodeById.get(newTo)?.label || newTo,
|
|
519
|
-
}),
|
|
520
|
-
);
|
|
521
|
-
return true;
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
// Clamp a node position so its whole card stays inside the visible canvas
|
|
525
|
-
// rect (derived from the root's screen size and the current pan/zoom). A
|
|
526
|
-
// no-op unless `confineNodesToView` is on. Shared by the pointer-drag move,
|
|
527
|
-
// the drag commit, and the Shift+Arrow nudge so all three honor the bound.
|
|
528
|
-
const clampToView = useCallback(
|
|
529
|
-
(id: string, position: FlowCanvasPoint): FlowCanvasPoint => {
|
|
530
|
-
if (!confineNodesToView) return position;
|
|
531
|
-
const root = rootRef.current;
|
|
532
|
-
if (!root) return position;
|
|
533
|
-
const { width: rw, height: rh } = root.getBoundingClientRect();
|
|
534
|
-
const { tx, ty, z } = viewport;
|
|
535
|
-
const visX = -tx / z;
|
|
536
|
-
const visY = -ty / z;
|
|
537
|
-
const visW = rw / z;
|
|
538
|
-
const visH = rh / z;
|
|
539
|
-
const size = sizes.get(id) ?? ESTIMATED_NODE_SIZE;
|
|
540
|
-
const maxX = Math.max(visX, visX + visW - size.width);
|
|
541
|
-
const maxY = Math.max(visY, visY + visH - size.height);
|
|
542
|
-
return {
|
|
543
|
-
x: Math.min(Math.max(position.x, visX), maxX),
|
|
544
|
-
y: Math.min(Math.max(position.y, visY), maxY),
|
|
545
|
-
};
|
|
546
|
-
},
|
|
547
|
-
[confineNodesToView, viewport, sizes],
|
|
548
|
-
);
|
|
549
|
-
|
|
550
|
-
const contentBounds = useMemo(() => {
|
|
551
|
-
if (rects.size === 0) return null;
|
|
552
|
-
let minX = Infinity,
|
|
553
|
-
minY = Infinity,
|
|
554
|
-
maxX = -Infinity,
|
|
555
|
-
maxY = -Infinity;
|
|
556
|
-
for (const rect of rects.values()) {
|
|
557
|
-
minX = Math.min(minX, rect.x);
|
|
558
|
-
minY = Math.min(minY, rect.y);
|
|
559
|
-
maxX = Math.max(maxX, rect.x + rect.width);
|
|
560
|
-
maxY = Math.max(maxY, rect.y + rect.height);
|
|
561
|
-
}
|
|
562
|
-
return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
|
|
563
|
-
}, [rects]);
|
|
564
|
-
|
|
565
|
-
// Explicit svg box spanning the full content extent: the default SVG box
|
|
566
|
-
// is 300x150 and some engines (historically WebKit) hit-test SVG children
|
|
567
|
-
// unreliably outside the element's box — any multi-rank layout exceeds the
|
|
568
|
-
// default, and dragged/consumer positions can go negative. The box is
|
|
569
|
-
// anchored at the (clamped-to-zero) minimum via left/top, with a viewBox
|
|
570
|
-
// starting at the same origin so child path coordinates stay plain canvas
|
|
571
|
-
// coordinates. The margin absorbs arrowheads, self-loops, and pair bows.
|
|
572
|
-
const svgExtent = useMemo(() => {
|
|
573
|
-
const MARGIN = 64;
|
|
574
|
-
if (!contentBounds) return { x: 0, y: 0, width: 1, height: 1 };
|
|
575
|
-
const x = Math.min(0, contentBounds.x) - MARGIN;
|
|
576
|
-
const y = Math.min(0, contentBounds.y) - MARGIN;
|
|
577
|
-
return {
|
|
578
|
-
x,
|
|
579
|
-
y,
|
|
580
|
-
width: Math.max(1, contentBounds.x + contentBounds.width + MARGIN - x),
|
|
581
|
-
height: Math.max(1, contentBounds.y + contentBounds.height + MARGIN - y),
|
|
582
|
-
};
|
|
583
|
-
}, [contentBounds]);
|
|
584
|
-
|
|
585
|
-
// Fit once, as soon as the fit can actually apply. `fitTo` reports whether
|
|
586
|
-
// it did (a 0x0 root is a no-op), so when the canvas mounts hidden — Modal
|
|
587
|
-
// not yet open, inactive Tab, display: none panel — we retry on the root's
|
|
588
|
-
// first non-zero measurement instead of permanently skipping the fit.
|
|
589
|
-
// The mount fit necessarily runs before ResizeObserver delivers node sizes,
|
|
590
|
-
// so its bounds come from ESTIMATED_NODE_SIZE rects ('estimated'); when the
|
|
591
|
-
// first real measurements land a frame later and shift the bounds, the fit
|
|
592
|
-
// re-applies once to correct itself ('done').
|
|
593
|
-
const fitState = useRef<'pending' | 'estimated' | 'done'>('pending');
|
|
594
|
-
const hasMeasuredSizes = sizes.size > 0;
|
|
595
|
-
useEffect(() => {
|
|
596
|
-
if (fitState.current === 'done' || !contentBounds) return;
|
|
597
|
-
if (fitState.current === 'estimated') {
|
|
598
|
-
if (hasMeasuredSizes && fitTo(contentBounds)) fitState.current = 'done';
|
|
599
|
-
return;
|
|
600
|
-
}
|
|
601
|
-
if (fitTo(contentBounds)) {
|
|
602
|
-
fitState.current = hasMeasuredSizes ? 'done' : 'estimated';
|
|
603
|
-
return;
|
|
604
|
-
}
|
|
605
|
-
if (typeof ResizeObserver === 'undefined') return; // jsdom — stays unfit
|
|
606
|
-
const el = rootRef.current;
|
|
607
|
-
if (!el) return;
|
|
608
|
-
const observer = new ResizeObserver(() => {
|
|
609
|
-
if (fitState.current === 'pending' && fitTo(contentBounds)) {
|
|
610
|
-
fitState.current = hasMeasuredSizes ? 'done' : 'estimated';
|
|
611
|
-
observer.disconnect();
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
observer.observe(el);
|
|
615
|
-
return () => observer.disconnect();
|
|
616
|
-
}, [contentBounds, fitTo, hasMeasuredSizes]);
|
|
617
|
-
|
|
618
|
-
// Programmatic re-fit: when `refitKey` CHANGES, re-frame content without a
|
|
619
|
-
// remount. `fitTo`/`contentBounds` are read through refs so this fires ONLY on
|
|
620
|
-
// a refitKey change — depending on them directly would re-fit on every node
|
|
621
|
-
// move (which changes contentBounds). The first value is skipped: the mount
|
|
622
|
-
// fit above owns the first frame. useLayoutEffect (not useEffect) so a
|
|
623
|
-
// maximize-driven re-fit lands before paint — the container has already
|
|
624
|
-
// resized to its new bounds, so we frame the new size with no flash.
|
|
625
|
-
const fitToRef = useRef(fitTo);
|
|
626
|
-
fitToRef.current = fitTo;
|
|
627
|
-
const contentBoundsRef = useRef(contentBounds);
|
|
628
|
-
contentBoundsRef.current = contentBounds;
|
|
629
|
-
// Compare the previous value (not a mounted flag) so the first render AND a
|
|
630
|
-
// StrictMode double-invoked mount both no-op — only a real refitKey CHANGE
|
|
631
|
-
// fits. The mount fit above owns the first frame.
|
|
632
|
-
const prevRefitKeyRef = useRef(refitKey);
|
|
633
|
-
useLayoutEffect(() => {
|
|
634
|
-
if (prevRefitKeyRef.current === refitKey) return;
|
|
635
|
-
prevRefitKeyRef.current = refitKey;
|
|
636
|
-
const bounds = contentBoundsRef.current;
|
|
637
|
-
if (bounds) fitToRef.current(bounds);
|
|
638
|
-
}, [refitKey]);
|
|
639
|
-
|
|
640
|
-
const zoomIn = useCallback(() => {
|
|
641
|
-
zoomBy(ZOOM_STEP);
|
|
642
|
-
}, [zoomBy]);
|
|
643
|
-
const zoomOut = useCallback(() => {
|
|
644
|
-
zoomBy(1 / ZOOM_STEP);
|
|
645
|
-
}, [zoomBy]);
|
|
646
|
-
|
|
647
|
-
// Announce zoom changes (skip the initial render).
|
|
648
|
-
const lastZoom = useRef(viewport.z);
|
|
649
|
-
useEffect(() => {
|
|
650
|
-
if (viewport.z !== lastZoom.current) {
|
|
651
|
-
lastZoom.current = viewport.z;
|
|
652
|
-
announce(t('flowCanvas.zoomLevel', { percent: Math.round(viewport.z * 100) }));
|
|
653
|
-
}
|
|
654
|
-
}, [viewport.z, announce, t]);
|
|
655
|
-
|
|
656
|
-
// Background pan: press on empty canvas (not node/edge/chip/controls) drags
|
|
657
|
-
// the viewport; a press-without-move clears the selection. `isPanning`
|
|
658
|
-
// mirrors `panState.current?.moved` as state because the render output
|
|
659
|
-
// (cursor class) depends on it — reading the ref during render would leave
|
|
660
|
-
// a stale grabbing cursor after release.
|
|
661
|
-
const [isPanning, setIsPanning] = useState(false);
|
|
662
|
-
const panState = useRef<{
|
|
663
|
-
pointerId: number;
|
|
664
|
-
startX: number;
|
|
665
|
-
startY: number;
|
|
666
|
-
moved: boolean;
|
|
667
|
-
} | null>(null);
|
|
668
|
-
const isBackgroundTarget = (target: EventTarget | null): boolean => {
|
|
669
|
-
const el = target as HTMLElement | null;
|
|
670
|
-
// Events from a portaled overlay opened inside `controls` (a Popover /
|
|
671
|
-
// ConfirmationPopover / DropdownMenu whose content renders into
|
|
672
|
-
// document.body) still bubble to these React handlers — React portals
|
|
673
|
-
// bubble through the React tree, not the DOM tree — even though the DOM
|
|
674
|
-
// target lives outside the canvas. Never treat those as canvas background:
|
|
675
|
-
// doing so starts a background pan (setPointerCapture swallows the
|
|
676
|
-
// overlay's own click) or creates a node on double-click. #290
|
|
677
|
-
if (!el || !rootRef.current?.contains(el)) return false;
|
|
678
|
-
return !el.closest?.(
|
|
679
|
-
'[data-flow-node], [data-flow-edge], [data-flow-chip], [data-flow-controls], [data-flow-handle]',
|
|
680
|
-
);
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
// Any pointer press elsewhere on the canvas visibly abandons an in-flight
|
|
684
|
-
// KEYBOARD connect: without this, the ghost edge stays pinned after the
|
|
685
|
-
// user clicks/drags other nodes, arrows keep stepping the stale target, and
|
|
686
|
-
// Enter would create an edge from the long-forgotten source. Reads through
|
|
687
|
-
// `connectRef` so the stable node/edge handlers can call it without
|
|
688
|
-
// re-rendering every memoized node when the connect state changes.
|
|
689
|
-
// (Pointer-mode connects are unaffected — they end with their own pointer.)
|
|
690
|
-
const cancelKeyboardConnect = useCallback(() => {
|
|
691
|
-
if (connectRef.current?.mode !== 'keyboard') return;
|
|
692
|
-
setConnect(null);
|
|
693
|
-
announce(t('flowCanvas.connectCancelled'));
|
|
694
|
-
}, [announce, t]);
|
|
695
|
-
|
|
696
|
-
// Consumer handlers (composed below) run before the canvas's own gesture
|
|
697
|
-
// handling; `event.preventDefault()` in a consumer handler opts out of it.
|
|
698
|
-
const handleRootPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {
|
|
699
|
-
onPointerDown?.(event);
|
|
700
|
-
if (event.defaultPrevented) return;
|
|
701
|
-
if (event.button !== 0 || !isBackgroundTarget(event.target)) return;
|
|
702
|
-
cancelKeyboardConnect(); // pressing empty canvas abandons a keyboard connect
|
|
703
|
-
panState.current = {
|
|
704
|
-
pointerId: event.pointerId,
|
|
705
|
-
startX: event.clientX,
|
|
706
|
-
startY: event.clientY,
|
|
707
|
-
moved: false,
|
|
708
|
-
};
|
|
709
|
-
try {
|
|
710
|
-
event.currentTarget.setPointerCapture(event.pointerId);
|
|
711
|
-
} catch {
|
|
712
|
-
/* jsdom */
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
const handleRootPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {
|
|
716
|
-
onPointerMove?.(event);
|
|
717
|
-
if (event.defaultPrevented) return;
|
|
718
|
-
// Only the pointer that started the draw moves the ghost — a second
|
|
719
|
-
// finger's moves fall through to the drag/pan branches below (same
|
|
720
|
-
// pointerId discipline as `dragState`/`panState`).
|
|
721
|
-
if (connect?.mode === 'pointer' && event.pointerId === connect.pointerId) {
|
|
722
|
-
const point = toCanvasPoint(event.clientX, event.clientY);
|
|
723
|
-
const over = nodeAtPoint(point);
|
|
724
|
-
// Rewire (connect.edgeId set) validates against the OTHER endpoint via
|
|
725
|
-
// isRewireValid; a plain create validates against connect.from.
|
|
726
|
-
const target =
|
|
727
|
-
over &&
|
|
728
|
-
(connect.edgeId
|
|
729
|
-
? over !== connect.fixed &&
|
|
730
|
-
isRewireValid(
|
|
731
|
-
connect.edgeId,
|
|
732
|
-
connect.end === 'target' ? connect.fixed! : over,
|
|
733
|
-
connect.end === 'target' ? over : connect.fixed!,
|
|
734
|
-
)
|
|
735
|
-
: over !== connect.from && isValid(connect.from, over))
|
|
736
|
-
? over
|
|
737
|
-
: null;
|
|
738
|
-
setConnect({ ...connect, target, cursor: point });
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
const drag = dragState.current;
|
|
742
|
-
if (drag && event.pointerId === drag.pointerId) {
|
|
743
|
-
// 3px screen-space click tolerance, measured from the pointerdown point.
|
|
744
|
-
if (
|
|
745
|
-
!drag.moved &&
|
|
746
|
-
Math.abs(event.clientX - drag.startClientX) + Math.abs(event.clientY - drag.startClientY) <
|
|
747
|
-
3
|
|
748
|
-
) {
|
|
749
|
-
return;
|
|
750
|
-
}
|
|
751
|
-
drag.moved = true;
|
|
752
|
-
// Convert each move's own segment at the zoom in effect NOW and
|
|
753
|
-
// accumulate, re-baselining like the pan branch below. Dividing the
|
|
754
|
-
// total delta since pointerdown by the current z would retroactively
|
|
755
|
-
// reconvert the whole gesture when the zoom changes mid-drag — a second
|
|
756
|
-
// touch on the zoom controls, or '+'/'-'/'0' on the mousedown-focused
|
|
757
|
-
// node — and jump the node.
|
|
758
|
-
drag.position = clampToView(drag.id, {
|
|
759
|
-
x: drag.position.x + (event.clientX - drag.lastClientX) / viewport.z,
|
|
760
|
-
y: drag.position.y + (event.clientY - drag.lastClientY) / viewport.z,
|
|
761
|
-
});
|
|
762
|
-
drag.lastClientX = event.clientX;
|
|
763
|
-
drag.lastClientY = event.clientY;
|
|
764
|
-
setLiveDrag({ id: drag.id, position: drag.position });
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
|
-
const pan = panState.current;
|
|
768
|
-
if (!pan || event.pointerId !== pan.pointerId) return;
|
|
769
|
-
const dx = event.clientX - pan.startX;
|
|
770
|
-
const dy = event.clientY - pan.startY;
|
|
771
|
-
if (!pan.moved && Math.abs(dx) + Math.abs(dy) < 3) return; // click tolerance
|
|
772
|
-
pan.moved = true;
|
|
773
|
-
setIsPanning(true);
|
|
774
|
-
pan.startX = event.clientX;
|
|
775
|
-
pan.startY = event.clientY;
|
|
776
|
-
panBy(dx, dy);
|
|
777
|
-
};
|
|
778
|
-
const handleRootPointerUp = (event: ReactPointerEvent<HTMLDivElement>) => {
|
|
779
|
-
onPointerUp?.(event);
|
|
780
|
-
// Only the drawing pointer's release ends the connection — a second
|
|
781
|
-
// finger lifting must neither commit nor cancel it (it falls through to
|
|
782
|
-
// its own drag/pan cleanup below).
|
|
783
|
-
if (connect?.mode === 'pointer' && event.pointerId === connect.pointerId) {
|
|
784
|
-
// End-of-gesture cleanup always runs (like drag/pan below); the intent
|
|
785
|
-
// honors a consumer's preventDefault() the same way the drag commit does,
|
|
786
|
-
// and revalidates against the live graph (the target was only
|
|
787
|
-
// known-valid when the pointer last moved).
|
|
788
|
-
if (connect.edgeId) {
|
|
789
|
-
// Rewire branch — MUST NOT fall through to onEdgeCreate.
|
|
790
|
-
commitRewire(connect, event.defaultPrevented);
|
|
791
|
-
setConnect(null);
|
|
792
|
-
return;
|
|
793
|
-
}
|
|
794
|
-
if (
|
|
795
|
-
connect.target &&
|
|
796
|
-
!event.defaultPrevented &&
|
|
797
|
-
canCommitConnect(connect.from, connect.target)
|
|
798
|
-
) {
|
|
799
|
-
onEdgeCreate?.(connect.from, connect.target);
|
|
800
|
-
announce(
|
|
801
|
-
t('flowCanvas.connectDone', {
|
|
802
|
-
from: nodeById.get(connect.from)?.label || connect.from,
|
|
803
|
-
to: nodeById.get(connect.target)?.label || connect.target,
|
|
804
|
-
}),
|
|
805
|
-
);
|
|
806
|
-
}
|
|
807
|
-
setConnect(null);
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
const drag = dragState.current;
|
|
811
|
-
if (drag && event.pointerId === drag.pointerId) {
|
|
812
|
-
// Like the pan below, end-of-gesture cleanup (dropping the drag state
|
|
813
|
-
// and the live position) always runs so a drag can't get stuck; the
|
|
814
|
-
// commit below (session override, onNodeMove, announcement) is what a
|
|
815
|
-
// consumer's preventDefault() opts out of — the node then snaps back
|
|
816
|
-
// exactly like a cancelled gesture.
|
|
817
|
-
dragState.current = null;
|
|
818
|
-
const node = nodeById.get(drag.id);
|
|
819
|
-
// Commit-time revalidation, same as connect/Delete/Enter intents: a
|
|
820
|
-
// node deleted mid-drag must not emit onNodeMove with a dead id.
|
|
821
|
-
if (drag.moved && !event.defaultPrevented && node) {
|
|
822
|
-
// Fold in any final movement carried by the pointerup itself, at the
|
|
823
|
-
// current zoom — the same per-segment conversion as the move handler —
|
|
824
|
-
// then clamp to the visible rect (no-op unless confineNodesToView).
|
|
825
|
-
const position = clampToView(drag.id, {
|
|
826
|
-
x: drag.position.x + (event.clientX - drag.lastClientX) / viewport.z,
|
|
827
|
-
y: drag.position.y + (event.clientY - drag.lastClientY) / viewport.z,
|
|
828
|
-
});
|
|
829
|
-
if (node.position === undefined) {
|
|
830
|
-
// Session-local arrangement for auto-laid-out nodes.
|
|
831
|
-
setDragOverrides((prev) => new Map(prev).set(drag.id, position));
|
|
832
|
-
}
|
|
833
|
-
onNodeMove?.(drag.id, position);
|
|
834
|
-
announce(t('flowCanvas.nodeMoved', { label: node.label }));
|
|
835
|
-
}
|
|
836
|
-
setLiveDrag(null);
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
const pan = panState.current;
|
|
840
|
-
if (!pan || event.pointerId !== pan.pointerId) return;
|
|
841
|
-
// End-of-gesture cleanup always runs (a stuck pan is unrecoverable);
|
|
842
|
-
// consumer preventDefault() only opts out of click-clears-selection.
|
|
843
|
-
panState.current = null;
|
|
844
|
-
setIsPanning(false);
|
|
845
|
-
if (!pan.moved && !event.defaultPrevented && selection != null) {
|
|
846
|
-
// Guarded on selection: useControllableState has no equality check, so
|
|
847
|
-
// an unguarded clear would fire onSelectionChange(null) and announce
|
|
848
|
-
// "Selection cleared" even when nothing was selected.
|
|
849
|
-
setSelection(null); // click on empty canvas clears selection
|
|
850
|
-
announce(t('flowCanvas.selectionCleared'));
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
const handleRootPointerCancel = (event: ReactPointerEvent<HTMLDivElement>) => {
|
|
854
|
-
onPointerCancel?.(event);
|
|
855
|
-
if (connect?.mode === 'pointer' && event.pointerId === connect.pointerId) {
|
|
856
|
-
// The system aborted the gesture — drop the pending connection without
|
|
857
|
-
// creating an edge; the ghost edge disappears.
|
|
858
|
-
setConnect(null);
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
const drag = dragState.current;
|
|
862
|
-
if (drag && event.pointerId === drag.pointerId) {
|
|
863
|
-
// The system aborted the gesture — drop the drag without committing
|
|
864
|
-
// (no onNodeMove, no session override); the node snaps back.
|
|
865
|
-
dragState.current = null;
|
|
866
|
-
setLiveDrag(null);
|
|
867
|
-
return;
|
|
868
|
-
}
|
|
869
|
-
const pan = panState.current;
|
|
870
|
-
if (!pan || event.pointerId !== pan.pointerId) return;
|
|
871
|
-
// The system aborted the gesture (palm rejection, OS interruption, pen
|
|
872
|
-
// leaving range) — drop the pan silently. Unlike pointerup, this is not
|
|
873
|
-
// a deliberate click, so it must not clear the selection.
|
|
874
|
-
panState.current = null;
|
|
875
|
-
setIsPanning(false);
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
// --- roving focus: spatial arrows, Home/End, E edge cycling --------------
|
|
879
|
-
// The in-flight E-cycle: which node's edges are being cycled and where the
|
|
880
|
-
// cycle stands. Any node focus (arrow, Home/End, click) resets it.
|
|
881
|
-
const edgeCycle = useRef<{ nodeId: string; index: number } | null>(null);
|
|
882
|
-
|
|
883
|
-
// Keyboard focus must never rely on native focus-scrolling: the
|
|
884
|
-
// overflow:hidden root is still a scroll container, so a browser
|
|
885
|
-
// scroll-into-view would silently offset root.scrollLeft/Top and desync
|
|
886
|
-
// the dot-grid and all pointer→canvas math from the transform-based
|
|
887
|
-
// viewport. Focus calls pass preventScroll and reveal via the viewport
|
|
888
|
-
// transform instead — panning just enough to bring the rect fully into
|
|
889
|
-
// view (with padding so the focus ring isn't clipped at the edge).
|
|
890
|
-
const REVEAL_PAD = 24;
|
|
891
|
-
const revealRect = useCallback(
|
|
892
|
-
(rect: Rect) => {
|
|
893
|
-
const rootRect = rootRef.current?.getBoundingClientRect();
|
|
894
|
-
if (!rootRect || rootRect.width === 0 || rootRect.height === 0) return;
|
|
895
|
-
const { tx, ty, z } = viewport;
|
|
896
|
-
const left = rect.x * z + tx;
|
|
897
|
-
const top = rect.y * z + ty;
|
|
898
|
-
const right = (rect.x + rect.width) * z + tx;
|
|
899
|
-
const bottom = (rect.y + rect.height) * z + ty;
|
|
900
|
-
let dx = 0;
|
|
901
|
-
let dy = 0;
|
|
902
|
-
if (right > rootRect.width) dx = rootRect.width - REVEAL_PAD - right;
|
|
903
|
-
if (left + dx < 0) dx = REVEAL_PAD - left; // left/top win for over-wide rects
|
|
904
|
-
if (bottom > rootRect.height) dy = rootRect.height - REVEAL_PAD - bottom;
|
|
905
|
-
if (top + dy < 0) dy = REVEAL_PAD - top;
|
|
906
|
-
if (dx !== 0 || dy !== 0) panBy(dx, dy);
|
|
907
|
-
},
|
|
908
|
-
[viewport, panBy],
|
|
909
|
-
);
|
|
910
|
-
|
|
911
|
-
const focusNode = useCallback(
|
|
912
|
-
(id: string) => {
|
|
913
|
-
const el = nodeEls.current.get(id);
|
|
914
|
-
if (!el) return;
|
|
915
|
-
edgeCycle.current = null;
|
|
916
|
-
el.focus({ preventScroll: true });
|
|
917
|
-
const rect = rects.get(id);
|
|
918
|
-
if (rect) revealRect(rect);
|
|
919
|
-
const index = nodes.findIndex((n) => n.id === id);
|
|
920
|
-
announce(
|
|
921
|
-
t('flowCanvas.nodeFocused', {
|
|
922
|
-
label: nodeById.get(id)?.label || id,
|
|
923
|
-
index: index + 1,
|
|
924
|
-
total: nodes.length,
|
|
925
|
-
}),
|
|
926
|
-
);
|
|
927
|
-
},
|
|
928
|
-
[nodes, nodeById, announce, t, rects, revealRect],
|
|
929
|
-
);
|
|
930
|
-
|
|
931
|
-
const focusEdge = useCallback(
|
|
932
|
-
(id: string, index: number, total: number) => {
|
|
933
|
-
const el = edgeEls.current.get(id);
|
|
934
|
-
if (!el) return;
|
|
935
|
-
el.focus({ preventScroll: true });
|
|
936
|
-
const resolved = resolvedEdges.find((r) => r.edge.id === id);
|
|
937
|
-
if (resolved) {
|
|
938
|
-
// Reveal around the midpoint — where the focus highlight and the
|
|
939
|
-
// label chip sit — rather than the edge's full bounding box, which
|
|
940
|
-
// for a long edge could exceed the viewport and force a max zoom-out.
|
|
941
|
-
const { midpoint } = resolved.geometry;
|
|
942
|
-
revealRect({ x: midpoint.x - 20, y: midpoint.y - 20, width: 40, height: 40 });
|
|
943
|
-
}
|
|
944
|
-
const edge = edges.find((e) => e.id === id);
|
|
945
|
-
if (edge) {
|
|
946
|
-
announce(
|
|
947
|
-
t('flowCanvas.edgeFocused', {
|
|
948
|
-
from: nodeById.get(edge.from)?.label || edge.from,
|
|
949
|
-
to: nodeById.get(edge.to)?.label || edge.to,
|
|
950
|
-
index,
|
|
951
|
-
total,
|
|
952
|
-
}),
|
|
953
|
-
);
|
|
954
|
-
}
|
|
955
|
-
},
|
|
956
|
-
[edges, nodeById, announce, t, resolvedEdges, revealRect],
|
|
957
|
-
);
|
|
958
|
-
|
|
959
|
-
// Focus reclaim: when the focused node/edge unmounts (the consumer applied
|
|
960
|
-
// a delete intent), the browser drops focus to <body> — the keyboard user
|
|
961
|
-
// is silently ejected from the application widget. The registers flag that
|
|
962
|
-
// unregister; this post-commit effect returns focus to the canvas root and
|
|
963
|
-
// announces the move. No dependency array — the flag can only be raised
|
|
964
|
-
// during a commit, and the check costs a ref read.
|
|
965
|
-
useEffect(() => {
|
|
966
|
-
if (!pendingFocusReclaim.current) return;
|
|
967
|
-
pendingFocusReclaim.current = false;
|
|
968
|
-
const active = document.activeElement;
|
|
969
|
-
// Focus still on a live element? Then the detach was ref-identity churn
|
|
970
|
-
// on a re-render (the node/edge kept focus), or the consumer already
|
|
971
|
-
// moved focus deliberately (e.g. into a confirm dialog) — don't steal it.
|
|
972
|
-
// (`isConnected` guards jsdom, which can leave activeElement detached.)
|
|
973
|
-
if (
|
|
974
|
-
active &&
|
|
975
|
-
active !== document.body &&
|
|
976
|
-
active !== document.documentElement &&
|
|
977
|
-
active.isConnected
|
|
978
|
-
) {
|
|
979
|
-
return;
|
|
980
|
-
}
|
|
981
|
-
const root = rootRef.current;
|
|
982
|
-
if (!root || !root.isConnected) return; // the whole canvas unmounted
|
|
983
|
-
root.focus({ preventScroll: true });
|
|
984
|
-
announce(t('flowCanvas.focusReturned'));
|
|
985
|
-
});
|
|
986
|
-
|
|
987
|
-
// Viewport, roving-focus, and selection-intent keys.
|
|
988
|
-
const handleRootKeyDown = (event: ReactKeyboardEvent<HTMLDivElement>) => {
|
|
989
|
-
onKeyDown?.(event);
|
|
990
|
-
if (event.defaultPrevented) return;
|
|
991
|
-
// Only act when the key targets the canvas itself, a node, or an edge —
|
|
992
|
-
// never the consumer's interactive adornment content (e.g. an input
|
|
993
|
-
// inside a node adornment must keep its own keystrokes).
|
|
994
|
-
const targetEl = event.target as HTMLElement;
|
|
995
|
-
const isCanvasKeyTarget =
|
|
996
|
-
targetEl === event.currentTarget ||
|
|
997
|
-
targetEl.hasAttribute('data-flow-node') ||
|
|
998
|
-
targetEl.hasAttribute('data-flow-edge');
|
|
999
|
-
if (!isCanvasKeyTarget) return;
|
|
1000
|
-
const { key, ctrlKey, metaKey } = event;
|
|
1001
|
-
// Escape also aborts an in-flight pointer draw (spec: "Esc/miss
|
|
1002
|
-
// cancels"). Dropping the connect state makes the gesture's eventual
|
|
1003
|
-
// pointerup a no-op — its connect branch matches on the stored state,
|
|
1004
|
-
// which is gone.
|
|
1005
|
-
if (connect?.mode === 'pointer' && key === 'Escape') {
|
|
1006
|
-
event.preventDefault();
|
|
1007
|
-
// Layered dismiss, same as the selection-clearing Escape below: this
|
|
1008
|
-
// Escape is consumed here; a consumer's own bubble-phase Escape
|
|
1009
|
-
// handler (panel/overlay) must not co-fire on a mere gesture cancel.
|
|
1010
|
-
event.stopPropagation();
|
|
1011
|
-
setConnect(null);
|
|
1012
|
-
announce(t('flowCanvas.connectCancelled'));
|
|
1013
|
-
return;
|
|
1014
|
-
}
|
|
1015
|
-
// Keyboard connect mode swallows every key first — Escape must cancel the
|
|
1016
|
-
// connection (not clear the selection), Enter must confirm (not open),
|
|
1017
|
-
// and arrows must step the target (not navigate/pan).
|
|
1018
|
-
if (connect?.mode === 'keyboard') {
|
|
1019
|
-
if (key === 'Tab') {
|
|
1020
|
-
// Never a keyboard trap (WCAG 2.1.2): let Tab move focus out
|
|
1021
|
-
// untouched; the focus-out handler cancels the connect (and
|
|
1022
|
-
// announces) once focus actually leaves the canvas.
|
|
1023
|
-
return;
|
|
1024
|
-
}
|
|
1025
|
-
if (ctrlKey || metaKey) {
|
|
1026
|
-
if (key.startsWith('Arrow')) {
|
|
1027
|
-
// The instructions promise Ctrl/Cmd+Arrow pans — keep that true
|
|
1028
|
-
// mid-connect too (same directions as the main pan branch).
|
|
1029
|
-
event.preventDefault();
|
|
1030
|
-
if (key === 'ArrowRight') panBy(-PAN_STEP, 0);
|
|
1031
|
-
else if (key === 'ArrowLeft') panBy(PAN_STEP, 0);
|
|
1032
|
-
else if (key === 'ArrowDown') panBy(0, -PAN_STEP);
|
|
1033
|
-
else if (key === 'ArrowUp') panBy(0, PAN_STEP);
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
// Other modifier combos stay the browser's: page zoom (ctrl +/-/0,
|
|
1037
|
-
// WCAG 1.4.4), copy, etc. — same carve-out the plain keys make.
|
|
1038
|
-
return;
|
|
1039
|
-
}
|
|
1040
|
-
event.preventDefault();
|
|
1041
|
-
if (key === 'Escape') {
|
|
1042
|
-
// Layered dismiss — see the pointer-draw Escape above.
|
|
1043
|
-
event.stopPropagation();
|
|
1044
|
-
setConnect(null);
|
|
1045
|
-
// The arrow-step reveals may have panned the (still-focused) source
|
|
1046
|
-
// off-screen; bring its focus ring back into view on exit.
|
|
1047
|
-
const sourceRect = rects.get(connect.from);
|
|
1048
|
-
if (sourceRect) revealRect(sourceRect);
|
|
1049
|
-
announce(t('flowCanvas.connectCancelled'));
|
|
1050
|
-
return;
|
|
1051
|
-
}
|
|
1052
|
-
if (key === 'Enter') {
|
|
1053
|
-
// Rewire commits through onEdgeReconnect — MUST NOT fall through to the
|
|
1054
|
-
// create (onEdgeCreate) branch below.
|
|
1055
|
-
if (connect.edgeId) {
|
|
1056
|
-
if (!commitRewire(connect)) announce(t('flowCanvas.connectCancelled'));
|
|
1057
|
-
setConnect(null);
|
|
1058
|
-
const exitRect = rects.get(connect.fixed ?? connect.from);
|
|
1059
|
-
if (exitRect) revealRect(exitRect);
|
|
1060
|
-
return;
|
|
1061
|
-
}
|
|
1062
|
-
// Same commit-time revalidation as pointerup: the target was only
|
|
1063
|
-
// known-valid when the last arrow press set it.
|
|
1064
|
-
if (connect.target && canCommitConnect(connect.from, connect.target)) {
|
|
1065
|
-
onEdgeCreate?.(connect.from, connect.target);
|
|
1066
|
-
announce(
|
|
1067
|
-
t('flowCanvas.connectDone', {
|
|
1068
|
-
from: nodeById.get(connect.from)?.label || connect.from,
|
|
1069
|
-
to: nodeById.get(connect.target)?.label || connect.target,
|
|
1070
|
-
}),
|
|
1071
|
-
);
|
|
1072
|
-
} else {
|
|
1073
|
-
// No target picked (or the graph changed under the gesture): the
|
|
1074
|
-
// mode still ends, and that must be audible — Escape parity. A
|
|
1075
|
-
// silent exit would leave a screen-reader user pressing arrows
|
|
1076
|
-
// that now navigate/pan instead of stepping targets.
|
|
1077
|
-
announce(t('flowCanvas.connectCancelled'));
|
|
1078
|
-
}
|
|
1079
|
-
setConnect(null);
|
|
1080
|
-
// Focus stayed on the source throughout the gesture — reveal it, as
|
|
1081
|
-
// on Escape, in case target-stepping panned it off-screen.
|
|
1082
|
-
const exitRect = rects.get(connect.from);
|
|
1083
|
-
if (exitRect) revealRect(exitRect);
|
|
1084
|
-
return;
|
|
1085
|
-
}
|
|
1086
|
-
if (key.startsWith('Arrow')) {
|
|
1087
|
-
const candidates = new Map<string, Rect>();
|
|
1088
|
-
for (const [id, rect] of rects) {
|
|
1089
|
-
// Rewire filters against the OTHER (fixed) endpoint via isRewireValid;
|
|
1090
|
-
// a plain create validates against connect.from.
|
|
1091
|
-
const ok = connect.edgeId
|
|
1092
|
-
? id !== connect.fixed &&
|
|
1093
|
-
isRewireValid(
|
|
1094
|
-
connect.edgeId,
|
|
1095
|
-
connect.end === 'target' ? connect.fixed! : id,
|
|
1096
|
-
connect.end === 'target' ? id : connect.fixed!,
|
|
1097
|
-
)
|
|
1098
|
-
: id !== connect.from && isValid(connect.from, id);
|
|
1099
|
-
if (ok) candidates.set(id, rect);
|
|
1100
|
-
}
|
|
1101
|
-
// Navigate among candidates from the current target (or the source —
|
|
1102
|
-
// included so the first arrow press has an origin to measure from).
|
|
1103
|
-
const sourceRect = rects.get(connect.from);
|
|
1104
|
-
if (sourceRect) candidates.set(connect.from, sourceRect);
|
|
1105
|
-
const fromId = connect.target ?? connect.from;
|
|
1106
|
-
const direction = key.replace('Arrow', '').toLowerCase() as NavDirection;
|
|
1107
|
-
let next = nearestInDirection(fromId, candidates, direction);
|
|
1108
|
-
if (next === connect.from) {
|
|
1109
|
-
// The source is not a valid target but can sit between targets
|
|
1110
|
-
// (A — S — B: stepping left from B hits S first). Hop over it by
|
|
1111
|
-
// re-measuring from the source's rect in the same direction —
|
|
1112
|
-
// nearestInDirection excludes the cursor id, so this terminates.
|
|
1113
|
-
next = nearestInDirection(connect.from, candidates, direction);
|
|
1114
|
-
}
|
|
1115
|
-
if (next && next !== connect.from) {
|
|
1116
|
-
setConnect({ ...connect, target: next });
|
|
1117
|
-
// Same pan-to-reveal invariant as roving focus: a zoomed-in
|
|
1118
|
-
// keyboard user must see the target ring, and zoom keys are
|
|
1119
|
-
// swallowed while connecting.
|
|
1120
|
-
const targetRect = candidates.get(next);
|
|
1121
|
-
if (targetRect) revealRect(targetRect);
|
|
1122
|
-
announce(t('flowCanvas.connectTarget', { label: nodeById.get(next)?.label || next }));
|
|
1123
|
-
} else {
|
|
1124
|
-
// Nothing valid that way — say so; a silent no-op reads as a
|
|
1125
|
-
// dead keyboard to a screen-reader user mid-connect.
|
|
1126
|
-
announce(t('flowCanvas.connectNoTarget'));
|
|
1127
|
-
}
|
|
1128
|
-
return;
|
|
1129
|
-
}
|
|
1130
|
-
return; // swallow other keys while connecting
|
|
1131
|
-
}
|
|
1132
|
-
// Plain C starts keyboard connect mode; ctrl/cmd+C stays the browser's
|
|
1133
|
-
// copy shortcut.
|
|
1134
|
-
if (isLetterKey(event, 'c') && !ctrlKey && !metaKey) {
|
|
1135
|
-
if (!canConnect) return;
|
|
1136
|
-
// One gesture at a time (mirror of handleHandlePointerDown's guard):
|
|
1137
|
-
// C mid-pointer-draw must not replace the in-flight draw with a
|
|
1138
|
-
// keyboard connect — the discarded drag would turn its eventual
|
|
1139
|
-
// pointerup into a silent no-op.
|
|
1140
|
-
if (connect?.mode === 'pointer') return;
|
|
1141
|
-
const nodeId =
|
|
1142
|
-
targetEl.getAttribute('data-flow-node') ??
|
|
1143
|
-
(selection?.type === 'node' ? selection.id : null);
|
|
1144
|
-
if (!nodeId) return;
|
|
1145
|
-
event.preventDefault();
|
|
1146
|
-
setConnect({ from: nodeId, mode: 'keyboard', pointerId: null, target: null, cursor: null });
|
|
1147
|
-
announce(t('flowCanvas.connectStart', { label: nodeById.get(nodeId)?.label || nodeId }));
|
|
1148
|
-
return;
|
|
1149
|
-
}
|
|
1150
|
-
// Plain R starts a keyboard rewire of the selected edge's TARGET endpoint;
|
|
1151
|
-
// Shift+R rewires the SOURCE. Only acts when an edge is selected/focused;
|
|
1152
|
-
// ctrl/cmd+R stays the browser's reload.
|
|
1153
|
-
if (isLetterKey(event, 'r') && !ctrlKey && !metaKey) {
|
|
1154
|
-
if (!canConnect) return;
|
|
1155
|
-
if (connect?.mode === 'pointer') return; // one gesture at a time
|
|
1156
|
-
const edgeId =
|
|
1157
|
-
targetEl.getAttribute('data-flow-edge') ??
|
|
1158
|
-
(selection?.type === 'edge' ? selection.id : null);
|
|
1159
|
-
if (!edgeId) return;
|
|
1160
|
-
const edge = edges.find((e) => e.id === edgeId);
|
|
1161
|
-
if (!edge) return;
|
|
1162
|
-
event.preventDefault();
|
|
1163
|
-
const end: 'source' | 'target' = event.shiftKey ? 'source' : 'target';
|
|
1164
|
-
const fixed = end === 'target' ? edge.from : edge.to;
|
|
1165
|
-
setConnect({
|
|
1166
|
-
from: fixed,
|
|
1167
|
-
mode: 'keyboard',
|
|
1168
|
-
pointerId: null,
|
|
1169
|
-
target: null,
|
|
1170
|
-
cursor: null,
|
|
1171
|
-
edgeId,
|
|
1172
|
-
end,
|
|
1173
|
-
fixed,
|
|
1174
|
-
});
|
|
1175
|
-
announce(
|
|
1176
|
-
t(end === 'source' ? 'flowCanvas.rewireStartSource' : 'flowCanvas.rewireStartTarget'),
|
|
1177
|
-
);
|
|
1178
|
-
return;
|
|
1179
|
-
}
|
|
1180
|
-
// Shift+Arrow nudges the focused/selected node (checked before ctrl+arrow
|
|
1181
|
-
// pan so shift wins when both modifiers are held).
|
|
1182
|
-
if (event.shiftKey && key.startsWith('Arrow')) {
|
|
1183
|
-
if (readOnly) return;
|
|
1184
|
-
const nodeId =
|
|
1185
|
-
targetEl.getAttribute('data-flow-node') ??
|
|
1186
|
-
(selection?.type === 'node' ? selection.id : null);
|
|
1187
|
-
if (!nodeId) return;
|
|
1188
|
-
event.preventDefault();
|
|
1189
|
-
const node = nodeById.get(nodeId);
|
|
1190
|
-
if (!node) return;
|
|
1191
|
-
const current = positionOf(node);
|
|
1192
|
-
const NUDGE = 8;
|
|
1193
|
-
const next = clampToView(nodeId, {
|
|
1194
|
-
x: current.x + (key === 'ArrowRight' ? NUDGE : key === 'ArrowLeft' ? -NUDGE : 0),
|
|
1195
|
-
y: current.y + (key === 'ArrowDown' ? NUDGE : key === 'ArrowUp' ? -NUDGE : 0),
|
|
1196
|
-
});
|
|
1197
|
-
if (node.position === undefined) {
|
|
1198
|
-
setDragOverrides((prev) => new Map(prev).set(nodeId, next));
|
|
1199
|
-
}
|
|
1200
|
-
onNodeMove?.(nodeId, next);
|
|
1201
|
-
// Keep the pan-to-reveal invariant: repeated nudges must not push the
|
|
1202
|
-
// focused node (and its focus ring) out of the viewport.
|
|
1203
|
-
const size = rects.get(nodeId);
|
|
1204
|
-
if (size) revealRect({ x: next.x, y: next.y, width: size.width, height: size.height });
|
|
1205
|
-
announce(t('flowCanvas.nodeMoved', { label: node.label }));
|
|
1206
|
-
return;
|
|
1207
|
-
}
|
|
1208
|
-
if ((ctrlKey || metaKey) && key.startsWith('Arrow')) {
|
|
1209
|
-
event.preventDefault();
|
|
1210
|
-
// Pan moves the stage opposite to the look direction: ArrowRight looks
|
|
1211
|
-
// right, so the stage shifts left (tx decreases).
|
|
1212
|
-
if (key === 'ArrowRight') panBy(-PAN_STEP, 0);
|
|
1213
|
-
else if (key === 'ArrowLeft') panBy(PAN_STEP, 0);
|
|
1214
|
-
else if (key === 'ArrowDown') panBy(0, -PAN_STEP);
|
|
1215
|
-
else if (key === 'ArrowUp') panBy(0, PAN_STEP);
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
// Ctrl/Cmd + '+'/'-'/'0' are the browser's page-zoom shortcuts — a WCAG
|
|
1219
|
-
// 1.4.4 resize path. Only the plain (unmodified) keys zoom the canvas.
|
|
1220
|
-
if (ctrlKey || metaKey) return;
|
|
1221
|
-
// Everything below acts on the FOCUSED node/edge when there is one, and
|
|
1222
|
-
// falls back to the selection (the two are normally in sync via
|
|
1223
|
-
// selection-follows-focus — belt and braces).
|
|
1224
|
-
const focusedNodeId = targetEl.getAttribute('data-flow-node');
|
|
1225
|
-
const focusedEdgeId = targetEl.getAttribute('data-flow-edge');
|
|
1226
|
-
// Plain arrows rove focus spatially (nudge/pan/connect arrows returned above).
|
|
1227
|
-
if (key.startsWith('Arrow')) {
|
|
1228
|
-
event.preventDefault();
|
|
1229
|
-
if (focusedEdgeId) {
|
|
1230
|
-
// Any arrow on an edge returns to a node: the E-cycle's origin when
|
|
1231
|
-
// the cycle belongs to this edge (also right for incoming edges);
|
|
1232
|
-
// otherwise — an edge focused by pointer click has no cycle, and a
|
|
1233
|
-
// cycle left over from an unrelated node is stale — the edge's source.
|
|
1234
|
-
const edge = edges.find((e) => e.id === focusedEdgeId);
|
|
1235
|
-
const cycleOrigin = edgeCycle.current?.nodeId;
|
|
1236
|
-
const originId =
|
|
1237
|
-
edge && cycleOrigin != null && (edge.from === cycleOrigin || edge.to === cycleOrigin)
|
|
1238
|
-
? cycleOrigin
|
|
1239
|
-
: edge?.from;
|
|
1240
|
-
if (originId) {
|
|
1241
|
-
focusNode(originId);
|
|
1242
|
-
return;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
const direction = key.replace('Arrow', '').toLowerCase() as NavDirection;
|
|
1246
|
-
if (!focusedNodeId) {
|
|
1247
|
-
// Resume roving where the user left off: a selected node (e.g. after
|
|
1248
|
-
// tabbing out to the zoom controls and back) beats the top-left
|
|
1249
|
-
// default — Enter/Delete already fall back to the selection the
|
|
1250
|
-
// same way.
|
|
1251
|
-
const first =
|
|
1252
|
-
selection?.type === 'node' && rects.has(selection.id) ? selection.id : topLeftMost(rects);
|
|
1253
|
-
if (first) focusNode(first);
|
|
1254
|
-
return;
|
|
1255
|
-
}
|
|
1256
|
-
const next = nearestInDirection(focusedNodeId, rects, direction);
|
|
1257
|
-
if (next) focusNode(next);
|
|
1258
|
-
return;
|
|
1259
|
-
}
|
|
1260
|
-
if (key === 'Home' || key === 'End') {
|
|
1261
|
-
event.preventDefault();
|
|
1262
|
-
const target = key === 'Home' ? nodes[0] : nodes[nodes.length - 1];
|
|
1263
|
-
if (target) focusNode(target.id);
|
|
1264
|
-
return;
|
|
1265
|
-
}
|
|
1266
|
-
// E cycles through the origin node's edges (outgoing first, then
|
|
1267
|
-
// incoming); pressing E on a focused edge steps to the next one.
|
|
1268
|
-
if (isLetterKey(event, 'e')) {
|
|
1269
|
-
// Origin resolution on a focused edge applies the arrow branch's
|
|
1270
|
-
// staleness rule: the E-cycle only counts when it belongs to this edge
|
|
1271
|
-
// (its origin is the edge's from/to) — a cycle left over from an
|
|
1272
|
-
// unrelated node must not hijack the key. Otherwise (click-focused
|
|
1273
|
-
// edge, no cycle or a stale one) the edge's source is the origin.
|
|
1274
|
-
const focusedEdge = focusedEdgeId ? edges.find((e) => e.id === focusedEdgeId) : undefined;
|
|
1275
|
-
const cycleOrigin = edgeCycle.current?.nodeId;
|
|
1276
|
-
const cycleOwnsFocusedEdge =
|
|
1277
|
-
focusedEdge != null &&
|
|
1278
|
-
cycleOrigin != null &&
|
|
1279
|
-
(focusedEdge.from === cycleOrigin || focusedEdge.to === cycleOrigin);
|
|
1280
|
-
const originId =
|
|
1281
|
-
focusedNodeId ??
|
|
1282
|
-
(focusedEdge ? (cycleOwnsFocusedEdge ? cycleOrigin : focusedEdge.from) : cycleOrigin);
|
|
1283
|
-
if (!originId) return;
|
|
1284
|
-
event.preventDefault();
|
|
1285
|
-
// Cycle only over rendered edges: a broken edge (skipped from rendering
|
|
1286
|
-
// for referencing a missing node) has no element to focus, so cycling
|
|
1287
|
-
// onto it would be a silent dead E press.
|
|
1288
|
-
const renderable = new Set(resolvedEdges.map((r) => r.edge.id));
|
|
1289
|
-
const attached = [
|
|
1290
|
-
...edges.filter((e) => e.from === originId),
|
|
1291
|
-
...edges.filter((e) => e.to === originId && e.from !== originId),
|
|
1292
|
-
].filter((e) => renderable.has(e.id));
|
|
1293
|
-
if (attached.length === 0) return;
|
|
1294
|
-
// A cycle left over from another node (focus moved by click, not
|
|
1295
|
-
// focusNode) must restart at 0, not resume that node's index.
|
|
1296
|
-
const index =
|
|
1297
|
-
edgeCycle.current?.nodeId === originId
|
|
1298
|
-
? (edgeCycle.current.index + 1) % attached.length
|
|
1299
|
-
: 0;
|
|
1300
|
-
edgeCycle.current = { nodeId: originId, index };
|
|
1301
|
-
focusEdge(attached[index].id, index + 1, attached.length);
|
|
1302
|
-
return;
|
|
1303
|
-
}
|
|
1304
|
-
if (key === '+' || key === '=') {
|
|
1305
|
-
event.preventDefault();
|
|
1306
|
-
zoomIn();
|
|
1307
|
-
return;
|
|
1308
|
-
}
|
|
1309
|
-
if (key === '-' || key === '_') {
|
|
1310
|
-
event.preventDefault();
|
|
1311
|
-
zoomOut();
|
|
1312
|
-
return;
|
|
1313
|
-
}
|
|
1314
|
-
if (key === '0') {
|
|
1315
|
-
event.preventDefault();
|
|
1316
|
-
fitTo(contentBounds);
|
|
1317
|
-
return;
|
|
1318
|
-
}
|
|
1319
|
-
if (isLetterKey(event, 'f') && !ctrlKey && !metaKey) {
|
|
1320
|
-
// Maximize works in readOnly too (viewing a large graph fullscreen is valid).
|
|
1321
|
-
event.preventDefault();
|
|
1322
|
-
setMaximizedAnnounced(!maximized);
|
|
1323
|
-
return;
|
|
1324
|
-
}
|
|
1325
|
-
if (key === 'Delete' || key === 'Backspace') {
|
|
1326
|
-
if (readOnly) return;
|
|
1327
|
-
const target =
|
|
1328
|
-
focusedNodeId != null
|
|
1329
|
-
? ({ type: 'node', id: focusedNodeId } as const)
|
|
1330
|
-
: focusedEdgeId != null
|
|
1331
|
-
? ({ type: 'edge', id: focusedEdgeId } as const)
|
|
1332
|
-
: selection;
|
|
1333
|
-
if (!target) return;
|
|
1334
|
-
event.preventDefault();
|
|
1335
|
-
if (target.type === 'node') onNodeDelete?.(target.id);
|
|
1336
|
-
else onEdgeDelete?.(target.id);
|
|
1337
|
-
return;
|
|
1338
|
-
}
|
|
1339
|
-
if (key === 'Escape') {
|
|
1340
|
-
// Tier 1 (#274): an open consumer floating surface (DropdownMenu/Popover
|
|
1341
|
-
// rendered in `controls`) owns this press — let it close first.
|
|
1342
|
-
if (overlayStack.hasOpenFloating() || overlayStack.wasEscapeConsumed(event.nativeEvent)) {
|
|
1343
|
-
return;
|
|
1344
|
-
}
|
|
1345
|
-
if (selection) {
|
|
1346
|
-
event.preventDefault();
|
|
1347
|
-
event.stopPropagation();
|
|
1348
|
-
setSelection(null);
|
|
1349
|
-
announce(t('flowCanvas.selectionCleared'));
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1352
|
-
if (maximized) {
|
|
1353
|
-
event.preventDefault();
|
|
1354
|
-
event.stopPropagation();
|
|
1355
|
-
setMaximizedAnnounced(false);
|
|
1356
|
-
}
|
|
1357
|
-
return;
|
|
1358
|
-
}
|
|
1359
|
-
if (key === 'Enter' || key === ' ') {
|
|
1360
|
-
const target =
|
|
1361
|
-
focusedNodeId != null
|
|
1362
|
-
? ({ type: 'node', id: focusedNodeId } as const)
|
|
1363
|
-
: focusedEdgeId != null
|
|
1364
|
-
? ({ type: 'edge', id: focusedEdgeId } as const)
|
|
1365
|
-
: selection;
|
|
1366
|
-
if (!target) return;
|
|
1367
|
-
event.preventDefault();
|
|
1368
|
-
// Open stays allowed in readOnly — only create/move/connect/delete are gated.
|
|
1369
|
-
if (target.type === 'node') onNodeOpen?.(target.id);
|
|
1370
|
-
else onEdgeOpen?.(target.id);
|
|
1371
|
-
return;
|
|
1372
|
-
}
|
|
1373
|
-
};
|
|
1374
|
-
|
|
1375
|
-
// Node/edge presses select immediately; a node press also arms a drag
|
|
1376
|
-
// (committed on pointerup only if the pointer actually moved). Re-selects
|
|
1377
|
-
// are guarded: useControllableState has no equality check, so re-pressing
|
|
1378
|
-
// the current selection would fire onSelectionChange with a fresh object on
|
|
1379
|
-
// every click (and twice more per double-click before the open intent).
|
|
1380
|
-
const handleNodePointerDown = useCallback(
|
|
1381
|
-
(id: string, event: ReactPointerEvent<HTMLDivElement>) => {
|
|
1382
|
-
if (event.button !== 0) return;
|
|
1383
|
-
// Portal-bubbled press (#290 class, #362): a Modal/Popover opened from
|
|
1384
|
-
// a node's label/adornment renders into document.body but its events
|
|
1385
|
-
// bubble through the REACT tree into this handler — the press landed on
|
|
1386
|
-
// the overlay, not the node. Never a select/drag. Same guard on the
|
|
1387
|
-
// edge/handle/endpoint handlers below and the edge-label chip. The
|
|
1388
|
-
// overlay-stack arming gate + mid-gesture abort stay DashboardCanvas-
|
|
1389
|
-
// only for now (#362): here, arming under an overlay is already blocked
|
|
1390
|
-
// by inert + this guard.
|
|
1391
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target)) return;
|
|
1392
|
-
event.stopPropagation();
|
|
1393
|
-
cancelKeyboardConnect(); // the user visibly moved on to another node
|
|
1394
|
-
const current = selectionRef.current;
|
|
1395
|
-
if (!(current?.type === 'node' && current.id === id)) {
|
|
1396
|
-
setSelection({ type: 'node', id });
|
|
1397
|
-
}
|
|
1398
|
-
if (readOnly) return;
|
|
1399
|
-
// One drag at a time: a second pointer going down mid-gesture (second
|
|
1400
|
-
// finger on this or another node) must not overwrite dragState — that
|
|
1401
|
-
// would orphan the first gesture (no commit) and snap it back on the
|
|
1402
|
-
// second pointer's tap-release.
|
|
1403
|
-
if (dragState.current) return;
|
|
1404
|
-
const node = nodeById.get(id);
|
|
1405
|
-
if (!node) return;
|
|
1406
|
-
const start = node.position ??
|
|
1407
|
-
dragOverrides.get(id) ??
|
|
1408
|
-
layoutPositions.get(id) ?? { x: 0, y: 0 };
|
|
1409
|
-
dragState.current = {
|
|
1410
|
-
id,
|
|
1411
|
-
pointerId: event.pointerId,
|
|
1412
|
-
startClientX: event.clientX,
|
|
1413
|
-
startClientY: event.clientY,
|
|
1414
|
-
lastClientX: event.clientX,
|
|
1415
|
-
lastClientY: event.clientY,
|
|
1416
|
-
position: start,
|
|
1417
|
-
moved: false,
|
|
1418
|
-
};
|
|
1419
|
-
try {
|
|
1420
|
-
event.currentTarget.setPointerCapture(event.pointerId);
|
|
1421
|
-
} catch {
|
|
1422
|
-
/* jsdom */
|
|
1423
|
-
}
|
|
1424
|
-
},
|
|
1425
|
-
[setSelection, cancelKeyboardConnect, readOnly, nodeById, dragOverrides, layoutPositions],
|
|
1426
|
-
);
|
|
1427
|
-
// Dragging from a node's connect handle starts a pointer connection. The
|
|
1428
|
-
// ROOT captures the pointer (not the handle) so the move/up stream keeps
|
|
1429
|
-
// flowing to the root handlers while the ghost edge tracks the cursor.
|
|
1430
|
-
const handleHandlePointerDown = useCallback(
|
|
1431
|
-
(id: string, event: ReactPointerEvent<HTMLElement>) => {
|
|
1432
|
-
if (event.button !== 0 || !canConnect) return;
|
|
1433
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target)) return;
|
|
1434
|
-
// One draw at a time (matching the drag guard): a second pointer
|
|
1435
|
-
// grabbing a handle mid-draw must not hijack the first ghost. A
|
|
1436
|
-
// keyboard connect, by contrast, is superseded by the new draw.
|
|
1437
|
-
if (connectRef.current?.mode === 'pointer') return;
|
|
1438
|
-
setConnect({
|
|
1439
|
-
from: id,
|
|
1440
|
-
mode: 'pointer',
|
|
1441
|
-
pointerId: event.pointerId,
|
|
1442
|
-
target: null,
|
|
1443
|
-
cursor: null,
|
|
1444
|
-
});
|
|
1445
|
-
try {
|
|
1446
|
-
rootRef.current?.setPointerCapture(event.pointerId);
|
|
1447
|
-
} catch {
|
|
1448
|
-
/* jsdom */
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
[canConnect],
|
|
1452
|
-
);
|
|
1453
|
-
// Dragging an existing edge's endpoint handle starts a pointer REWIRE. Like
|
|
1454
|
-
// the connect handle, the ROOT captures the pointer so move/up flow to the
|
|
1455
|
-
// root handlers; `fixed` is the endpoint that stays put (dragging `target`
|
|
1456
|
-
// keeps `source` fixed, and vice-versa).
|
|
1457
|
-
const handleEndpointPointerDown = useCallback(
|
|
1458
|
-
(edgeId: string, end: 'source' | 'target', event: ReactPointerEvent<Element>) => {
|
|
1459
|
-
if (event.button !== 0 || !canConnect) return;
|
|
1460
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target)) return;
|
|
1461
|
-
event.stopPropagation();
|
|
1462
|
-
if (connectRef.current?.mode === 'pointer') return; // one gesture at a time
|
|
1463
|
-
const edge = edges.find((e) => e.id === edgeId);
|
|
1464
|
-
if (!edge) return;
|
|
1465
|
-
const fixed = end === 'target' ? edge.from : edge.to;
|
|
1466
|
-
setConnect({
|
|
1467
|
-
from: fixed,
|
|
1468
|
-
mode: 'pointer',
|
|
1469
|
-
pointerId: event.pointerId,
|
|
1470
|
-
target: null,
|
|
1471
|
-
cursor: null,
|
|
1472
|
-
edgeId,
|
|
1473
|
-
end,
|
|
1474
|
-
fixed,
|
|
1475
|
-
});
|
|
1476
|
-
try {
|
|
1477
|
-
rootRef.current?.setPointerCapture(event.pointerId);
|
|
1478
|
-
} catch {
|
|
1479
|
-
/* jsdom */
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
[edges, canConnect],
|
|
1483
|
-
);
|
|
1484
|
-
const handleEdgePointerDown = useCallback(
|
|
1485
|
-
(id: string, event: ReactPointerEvent<SVGPathElement>) => {
|
|
1486
|
-
if (event.button !== 0) return;
|
|
1487
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target)) return;
|
|
1488
|
-
event.stopPropagation();
|
|
1489
|
-
cancelKeyboardConnect(); // the user visibly moved on to an edge
|
|
1490
|
-
const current = selectionRef.current;
|
|
1491
|
-
if (current?.type === 'edge' && current.id === id) return;
|
|
1492
|
-
setSelection({ type: 'edge', id });
|
|
1493
|
-
},
|
|
1494
|
-
[setSelection, cancelKeyboardConnect],
|
|
1495
|
-
);
|
|
1496
|
-
// Same portal-press guard as the pointerdown handlers above (#362/#363): a
|
|
1497
|
-
// backdrop double-click on a modal opened from a node adornment / edge
|
|
1498
|
-
// label bubbles React-wise into these — never an open intent.
|
|
1499
|
-
const handleNodeDoubleClick = useCallback(
|
|
1500
|
-
(id: string, event: ReactMouseEvent<Element>) => {
|
|
1501
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target)) return;
|
|
1502
|
-
onNodeOpen?.(id);
|
|
1503
|
-
},
|
|
1504
|
-
[onNodeOpen],
|
|
1505
|
-
);
|
|
1506
|
-
const handleEdgeDoubleClick = useCallback(
|
|
1507
|
-
(id: string, event: ReactMouseEvent<Element>) => {
|
|
1508
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target)) return;
|
|
1509
|
-
onEdgeOpen?.(id);
|
|
1510
|
-
},
|
|
1511
|
-
[onEdgeOpen],
|
|
1512
|
-
);
|
|
1513
|
-
|
|
1514
|
-
/** Client (screen) coordinates → canvas coordinates, inverting the viewport transform. */
|
|
1515
|
-
const toCanvasPoint = useCallback(
|
|
1516
|
-
(clientX: number, clientY: number): FlowCanvasPoint => {
|
|
1517
|
-
const rect = rootRef.current?.getBoundingClientRect();
|
|
1518
|
-
const x = (clientX - (rect?.left ?? 0) - viewport.tx) / viewport.z;
|
|
1519
|
-
const y = (clientY - (rect?.top ?? 0) - viewport.ty) / viewport.z;
|
|
1520
|
-
return { x, y };
|
|
1521
|
-
},
|
|
1522
|
-
[viewport],
|
|
1523
|
-
);
|
|
1524
|
-
|
|
1525
|
-
// Keyboard connect must not outlive focus: if focus leaves the canvas
|
|
1526
|
-
// entirely, the mode would persist invisibly — the ghost edge stays pinned
|
|
1527
|
-
// and a later Enter would still create an edge from the forgotten source.
|
|
1528
|
-
// Focus moves WITHIN the canvas (root ↔ node ↔ adornment) keep it alive.
|
|
1529
|
-
// React's onBlur is backed by the bubbling focusout event, so node blurs
|
|
1530
|
-
// reach this root handler. (focusout is not cancelable, so there is no
|
|
1531
|
-
// preventDefault opt-out here.)
|
|
1532
|
-
const handleRootBlur = (event: ReactFocusEvent<HTMLDivElement>) => {
|
|
1533
|
-
onBlur?.(event);
|
|
1534
|
-
const next = event.relatedTarget;
|
|
1535
|
-
if (next instanceof Node && event.currentTarget.contains(next)) return;
|
|
1536
|
-
cancelKeyboardConnect();
|
|
1537
|
-
};
|
|
1538
|
-
|
|
1539
|
-
// Selection follows focus: focusing a node/edge (roving arrows, E cycling,
|
|
1540
|
-
// or a browser click-focus) selects it, keeping the two in sync. Re-selects
|
|
1541
|
-
// are guarded like the pointer handlers — useControllableState has no
|
|
1542
|
-
// equality check, so an unguarded set would re-fire onSelectionChange with
|
|
1543
|
-
// a fresh object every time focus lands on the already-selected element.
|
|
1544
|
-
const handleRootFocusCapture = (event: ReactFocusEvent<HTMLDivElement>) => {
|
|
1545
|
-
onFocusCapture?.(event);
|
|
1546
|
-
const el = event.target as HTMLElement;
|
|
1547
|
-
const nodeId = el.getAttribute?.('data-flow-node');
|
|
1548
|
-
const edgeId = el.getAttribute?.('data-flow-edge');
|
|
1549
|
-
const current = selectionRef.current;
|
|
1550
|
-
if (nodeId && !(current?.type === 'node' && current.id === nodeId)) {
|
|
1551
|
-
setSelection({ type: 'node', id: nodeId });
|
|
1552
|
-
} else if (edgeId && !(current?.type === 'edge' && current.id === edgeId)) {
|
|
1553
|
-
setSelection({ type: 'edge', id: edgeId });
|
|
1554
|
-
}
|
|
1555
|
-
};
|
|
1556
|
-
|
|
1557
|
-
// Double-click on empty canvas requests a node there. Nodes/edges/chips
|
|
1558
|
-
// stopPropagation on their own dblclick, but guard on the target anyway.
|
|
1559
|
-
const handleRootDoubleClick = (event: ReactMouseEvent<HTMLDivElement>) => {
|
|
1560
|
-
onDoubleClick?.(event);
|
|
1561
|
-
if (event.defaultPrevented) return;
|
|
1562
|
-
if (readOnly || !isBackgroundTarget(event.target)) return;
|
|
1563
|
-
onNodeCreate?.(toCanvasPoint(event.clientX, event.clientY));
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
// Screen-positioned toolbar anchored to the current single selection. It is
|
|
1567
|
-
// rendered as a sibling of the transformed .stage (not inside it), so its
|
|
1568
|
-
// content keeps its intrinsic size regardless of zoom; left/top are computed
|
|
1569
|
-
// in screen px from the element's canvas rect × the viewport, so it follows
|
|
1570
|
-
// pan/zoom/drag. Only the matching render prop that returns non-null shows.
|
|
1571
|
-
const selectionActions = (() => {
|
|
1572
|
-
if (!selection) return null;
|
|
1573
|
-
const { tx, ty, z } = viewport;
|
|
1574
|
-
if (selection.type === 'node' && renderNodeActions) {
|
|
1575
|
-
const rect = rects.get(selection.id);
|
|
1576
|
-
if (!rect) return null;
|
|
1577
|
-
const content = renderNodeActions(selection.id);
|
|
1578
|
-
if (content == null) return null;
|
|
1579
|
-
// Node top-right corner, in screen px.
|
|
1580
|
-
const left = rect.x * z + tx + rect.width * z;
|
|
1581
|
-
const top = rect.y * z + ty;
|
|
1582
|
-
return { left, top, content };
|
|
1583
|
-
}
|
|
1584
|
-
if (selection.type === 'edge' && renderEdgeActions) {
|
|
1585
|
-
const resolved = resolvedEdges.find((r) => r.edge.id === selection.id);
|
|
1586
|
-
if (!resolved) return null;
|
|
1587
|
-
const content = renderEdgeActions(selection.id);
|
|
1588
|
-
if (content == null) return null;
|
|
1589
|
-
// The edge's midpoint. CSS (`.selectionActions[data-flow-selection-edge]`)
|
|
1590
|
-
// centers the toolbar horizontally on this point and lifts it above the
|
|
1591
|
-
// edge, so it floats "by the middle" of the edge without sitting on the
|
|
1592
|
-
// line itself.
|
|
1593
|
-
const { midpoint } = resolved.geometry;
|
|
1594
|
-
return { left: midpoint.x * z + tx, top: midpoint.y * z + ty, content };
|
|
1595
|
-
}
|
|
1596
|
-
return null;
|
|
1597
|
-
})();
|
|
1598
|
-
|
|
1599
|
-
// Gates the root's focus ring (see .module.scss). Keyed on the selection
|
|
1600
|
-
// actually resolving to a RENDERED node/edge — not merely on `selection`
|
|
1601
|
-
// being non-null — so a dangling selection (e.g. the retained id after a
|
|
1602
|
-
// keyboard delete, before the consumer drops it from props) does NOT suppress
|
|
1603
|
-
// the ring and strand a keyboard user with no visible focus. Mirrors the
|
|
1604
|
-
// dangling-selection guards in `selectionActions` above.
|
|
1605
|
-
const selectionResolves =
|
|
1606
|
-
selection != null &&
|
|
1607
|
-
(selection.type === 'node'
|
|
1608
|
-
? // Redundant with the derived-selection filter above (a node id survives
|
|
1609
|
-
// there iff it is in `rects`), kept for symmetry with `selectionActions`.
|
|
1610
|
-
rects.has(selection.id)
|
|
1611
|
-
: // Load-bearing: the derived filter keeps an edge whose id is in `edges`,
|
|
1612
|
-
// but a dangling-endpoint edge is skipped by resolvedEdges (never
|
|
1613
|
-
// rendered), so this is what withholds the flag for it.
|
|
1614
|
-
resolvedEdges.some((r) => r.edge.id === selection.id));
|
|
1615
|
-
|
|
1616
|
-
const setRootRef = useMemo(() => mergeRefs(rootRef, ref), [ref]);
|
|
1617
|
-
|
|
1618
|
-
return (
|
|
1619
|
-
// aria-label before {...rest} so consumers can override it; role/tabIndex
|
|
1620
|
-
// after so the application-widget contract survives whatever is spread.
|
|
1621
|
-
// Pointer/key/double-click handlers are destructured out of the props and composed:
|
|
1622
|
-
// the consumer's handler runs first, and preventDefault() skips the
|
|
1623
|
-
// canvas's own gesture handling (except end-of-gesture state cleanup on
|
|
1624
|
-
// pointerup/pointercancel, which always runs so a pan can't get stuck).
|
|
1625
|
-
<div
|
|
1626
|
-
aria-label={t('flowCanvas.canvasLabel')}
|
|
1627
|
-
{...rest}
|
|
1628
|
-
ref={setRootRef}
|
|
1629
|
-
role="application"
|
|
1630
|
-
tabIndex={0}
|
|
1631
|
-
aria-describedby={mergeAriaDescribedby(ariaDescribedby, instructionsId)}
|
|
1632
|
-
className={clsx(
|
|
1633
|
-
styles.root,
|
|
1634
|
-
isPanning && styles.rootPanning,
|
|
1635
|
-
maximized && styles.rootMaximized,
|
|
1636
|
-
className,
|
|
1637
|
-
)}
|
|
1638
|
-
data-flowcanvas-maximized={maximized ? '' : undefined}
|
|
1639
|
-
// Gates the root's own focus ring (see .module.scss): a resolved
|
|
1640
|
-
// selection's own highlight is the focus indicator, so the whole-canvas
|
|
1641
|
-
// ring is suppressed while an item is selected and reserved for the
|
|
1642
|
-
// focused-but-empty state.
|
|
1643
|
-
data-flow-has-selection={selectionResolves ? '' : undefined}
|
|
1644
|
-
onPointerDown={handleRootPointerDown}
|
|
1645
|
-
onPointerMove={handleRootPointerMove}
|
|
1646
|
-
onPointerUp={handleRootPointerUp}
|
|
1647
|
-
onPointerCancel={handleRootPointerCancel}
|
|
1648
|
-
onKeyDown={handleRootKeyDown}
|
|
1649
|
-
onDoubleClick={handleRootDoubleClick}
|
|
1650
|
-
onBlur={handleRootBlur}
|
|
1651
|
-
onFocusCapture={handleRootFocusCapture}
|
|
1652
|
-
>
|
|
1653
|
-
<div
|
|
1654
|
-
className={styles.stage}
|
|
1655
|
-
data-flow-stage=""
|
|
1656
|
-
style={{ transform: `translate(${viewport.tx}px, ${viewport.ty}px) scale(${viewport.z})` }}
|
|
1657
|
-
>
|
|
1658
|
-
{/* NOT aria-hidden: the child hit-paths are the focusable edges —
|
|
1659
|
-
hiding the svg would strip every edge out of the a11y tree. */}
|
|
1660
|
-
<svg
|
|
1661
|
-
className={styles.edges}
|
|
1662
|
-
style={{ left: svgExtent.x, top: svgExtent.y }}
|
|
1663
|
-
width={svgExtent.width}
|
|
1664
|
-
height={svgExtent.height}
|
|
1665
|
-
viewBox={`${svgExtent.x} ${svgExtent.y} ${svgExtent.width} ${svgExtent.height}`}
|
|
1666
|
-
>
|
|
1667
|
-
<defs>
|
|
1668
|
-
<marker
|
|
1669
|
-
id={markerId}
|
|
1670
|
-
viewBox="0 0 10 10"
|
|
1671
|
-
refX="9"
|
|
1672
|
-
refY="5"
|
|
1673
|
-
markerWidth="7"
|
|
1674
|
-
markerHeight="7"
|
|
1675
|
-
orient="auto-start-reverse"
|
|
1676
|
-
>
|
|
1677
|
-
<path d="M0,0 L10,5 L0,10 z" className={styles.markerFill} />
|
|
1678
|
-
</marker>
|
|
1679
|
-
<marker
|
|
1680
|
-
id={markerActiveId}
|
|
1681
|
-
viewBox="0 0 10 10"
|
|
1682
|
-
refX="9"
|
|
1683
|
-
refY="5"
|
|
1684
|
-
markerWidth="7"
|
|
1685
|
-
markerHeight="7"
|
|
1686
|
-
orient="auto-start-reverse"
|
|
1687
|
-
>
|
|
1688
|
-
<path d="M0,0 L10,5 L0,10 z" className={styles.markerFillActive} />
|
|
1689
|
-
</marker>
|
|
1690
|
-
</defs>
|
|
1691
|
-
{resolvedEdges.map(({ edge, geometry }) => (
|
|
1692
|
-
<FlowEdge
|
|
1693
|
-
key={edge.id}
|
|
1694
|
-
edge={edge}
|
|
1695
|
-
geometry={geometry}
|
|
1696
|
-
active={selection?.type === 'edge' && selection.id === edge.id}
|
|
1697
|
-
markerId={markerId}
|
|
1698
|
-
markerActiveId={markerActiveId}
|
|
1699
|
-
ariaLabel={t('flowCanvas.edgeLabel', {
|
|
1700
|
-
from: nodeById.get(edge.from)?.label || edge.from,
|
|
1701
|
-
to: nodeById.get(edge.to)?.label || edge.to,
|
|
1702
|
-
})}
|
|
1703
|
-
roleDescription={t('flowCanvas.edgeRole')}
|
|
1704
|
-
registerEl={registerEdgeEl}
|
|
1705
|
-
onEdgePointerDown={handleEdgePointerDown}
|
|
1706
|
-
onEdgeDoubleClick={handleEdgeDoubleClick}
|
|
1707
|
-
/>
|
|
1708
|
-
))}
|
|
1709
|
-
{connect
|
|
1710
|
-
? (() => {
|
|
1711
|
-
// Dashed ghost edge for the in-flight connection: the fixed
|
|
1712
|
-
// anchor → hovered/stepped target (or the pointer-mode cursor
|
|
1713
|
-
// stub). For a create, `fixed` is undefined so this is just
|
|
1714
|
-
// `from`. For a `source` rewire the moving end IS the source,
|
|
1715
|
-
// so we draw moving→fixed (inverted) to keep the arrowhead on
|
|
1716
|
-
// the fixed target.
|
|
1717
|
-
const anchorRect = rects.get(connect.fixed ?? connect.from);
|
|
1718
|
-
if (!anchorRect) return null;
|
|
1719
|
-
const otherRect = connect.target ? rects.get(connect.target) : null;
|
|
1720
|
-
const movingEnd: Rect = otherRect ?? {
|
|
1721
|
-
x: (connect.cursor?.x ?? anchorRect.x + anchorRect.width + 40) - 1,
|
|
1722
|
-
y: (connect.cursor?.y ?? anchorRect.y) - 1,
|
|
1723
|
-
width: 2,
|
|
1724
|
-
height: 2,
|
|
1725
|
-
};
|
|
1726
|
-
const [a, b] =
|
|
1727
|
-
connect.end === 'source' ? [movingEnd, anchorRect] : [anchorRect, movingEnd];
|
|
1728
|
-
return <path className={styles.ghostEdge} d={edgeGeometry(a, b).path} />;
|
|
1729
|
-
})()
|
|
1730
|
-
: null}
|
|
1731
|
-
</svg>
|
|
1732
|
-
{resolvedEdges.map(({ edge, geometry }) =>
|
|
1733
|
-
edge.label != null ? (
|
|
1734
|
-
<div
|
|
1735
|
-
key={`chip-${edge.id}`}
|
|
1736
|
-
className={styles.chip}
|
|
1737
|
-
data-flow-chip={edge.id}
|
|
1738
|
-
style={{ left: geometry.midpoint.x, top: geometry.midpoint.y }}
|
|
1739
|
-
onPointerDown={(event) => {
|
|
1740
|
-
if (event.button !== 0) return;
|
|
1741
|
-
// Same portal-press guard as handleNodePointerDown (#362).
|
|
1742
|
-
if (!(event.target instanceof Node) || !rootRef.current?.contains(event.target))
|
|
1743
|
-
return;
|
|
1744
|
-
event.stopPropagation();
|
|
1745
|
-
cancelKeyboardConnect(); // same abandon rule as handleEdgePointerDown
|
|
1746
|
-
// Same re-select guard as handleEdgePointerDown.
|
|
1747
|
-
if (selection?.type === 'edge' && selection.id === edge.id) return;
|
|
1748
|
-
setSelection({ type: 'edge', id: edge.id });
|
|
1749
|
-
}}
|
|
1750
|
-
onDoubleClick={(event) => {
|
|
1751
|
-
event.stopPropagation();
|
|
1752
|
-
handleEdgeDoubleClick(edge.id, event);
|
|
1753
|
-
}}
|
|
1754
|
-
>
|
|
1755
|
-
{edge.label}
|
|
1756
|
-
</div>
|
|
1757
|
-
) : null,
|
|
1758
|
-
)}
|
|
1759
|
-
{nodes.map((node) => (
|
|
1760
|
-
<FlowNode
|
|
1761
|
-
key={node.id}
|
|
1762
|
-
node={node}
|
|
1763
|
-
position={positionOf(node)}
|
|
1764
|
-
selected={selection?.type === 'node' && selection.id === node.id}
|
|
1765
|
-
dragging={liveDrag?.id === node.id}
|
|
1766
|
-
connectTarget={connect?.target === node.id}
|
|
1767
|
-
canConnect={canConnect}
|
|
1768
|
-
roleDescription={t('flowCanvas.nodeRole')}
|
|
1769
|
-
registerEl={registerNodeEl}
|
|
1770
|
-
onNodePointerDown={handleNodePointerDown}
|
|
1771
|
-
onNodeDoubleClick={handleNodeDoubleClick}
|
|
1772
|
-
onHandlePointerDown={handleHandlePointerDown}
|
|
1773
|
-
/>
|
|
1774
|
-
))}
|
|
1775
|
-
</div>
|
|
1776
|
-
{/* Edge rewire endpoint handles — an HTML overlay ABOVE the nodes (a
|
|
1777
|
-
sibling of the transformed .stage, not inside the below-nodes edges
|
|
1778
|
-
<svg>). Rendering them here is what makes them grabbable: SVG circles
|
|
1779
|
-
inside the edge layer are occluded by the node <div>s, which paint on
|
|
1780
|
-
top and intercept the pointer at the endpoint (which sits on a node's
|
|
1781
|
-
edge). Positioned in screen px from the endpoint's canvas coords ×
|
|
1782
|
-
viewport, exactly like selectionActions. */}
|
|
1783
|
-
{canConnect && selection?.type === 'edge'
|
|
1784
|
-
? (() => {
|
|
1785
|
-
const resolved = resolvedEdges.find((r) => r.edge.id === selection.id);
|
|
1786
|
-
if (!resolved) return null;
|
|
1787
|
-
const { z, tx, ty } = viewport;
|
|
1788
|
-
return (['source', 'target'] as const).map((end) => {
|
|
1789
|
-
const p = resolved.geometry[end];
|
|
1790
|
-
return (
|
|
1791
|
-
<div
|
|
1792
|
-
key={end}
|
|
1793
|
-
className={styles.endpointHandle}
|
|
1794
|
-
data-flow-edge-endpoint={end}
|
|
1795
|
-
data-flow-edge-endpoint-hit={end}
|
|
1796
|
-
aria-hidden="true"
|
|
1797
|
-
style={{ left: p.x * z + tx, top: p.y * z + ty }}
|
|
1798
|
-
onPointerDown={(event) => handleEndpointPointerDown(selection.id, end, event)}
|
|
1799
|
-
>
|
|
1800
|
-
<span className={styles.endpointDot} />
|
|
1801
|
-
</div>
|
|
1802
|
-
);
|
|
1803
|
-
});
|
|
1804
|
-
})()
|
|
1805
|
-
: null}
|
|
1806
|
-
<FlowControls onZoomIn={zoomIn} onZoomOut={zoomOut} onFit={() => fitTo(contentBounds)} />
|
|
1807
|
-
{controls != null ? (
|
|
1808
|
-
// data-flow-controls: background-pan hit-testing skips this subtree, so
|
|
1809
|
-
// pressing a control never starts a canvas pan (same carve-out as the
|
|
1810
|
-
// zoom cluster).
|
|
1811
|
-
<div
|
|
1812
|
-
className={styles.controlsTopLeft}
|
|
1813
|
-
data-flow-controls=""
|
|
1814
|
-
role="toolbar"
|
|
1815
|
-
aria-label={t('flowCanvas.controlsLabel')}
|
|
1816
|
-
>
|
|
1817
|
-
{controls}
|
|
1818
|
-
</div>
|
|
1819
|
-
) : null}
|
|
1820
|
-
{maximizeControl ? (
|
|
1821
|
-
<div className={styles.controlsTopRight} data-flow-controls="">
|
|
1822
|
-
<Button
|
|
1823
|
-
variant="secondary"
|
|
1824
|
-
size="sm"
|
|
1825
|
-
iconOnly
|
|
1826
|
-
aria-label={t(maximized ? 'flowCanvas.exitFullscreen' : 'flowCanvas.enterFullscreen')}
|
|
1827
|
-
aria-pressed={maximized}
|
|
1828
|
-
onClick={() => setMaximizedAnnounced(!maximized)}
|
|
1829
|
-
>
|
|
1830
|
-
{maximized ? (
|
|
1831
|
-
<Minimize2 size={16} aria-hidden="true" />
|
|
1832
|
-
) : (
|
|
1833
|
-
<Maximize2 size={16} aria-hidden="true" />
|
|
1834
|
-
)}
|
|
1835
|
-
</Button>
|
|
1836
|
-
</div>
|
|
1837
|
-
) : null}
|
|
1838
|
-
{selectionActions ? (
|
|
1839
|
-
// data-flow-controls: like the zoom/maximize clusters, this overlay is
|
|
1840
|
-
// exempted from background-pan hit-testing (isBackgroundTarget) and the
|
|
1841
|
-
// #290 dismissal guards, so pressing an action never starts a pan or
|
|
1842
|
-
// clears the selection. It is a sibling of the transformed .stage — its
|
|
1843
|
-
// left/top are screen px, so its content is not scaled by the zoom.
|
|
1844
|
-
<div
|
|
1845
|
-
className={styles.selectionActions}
|
|
1846
|
-
data-flow-controls=""
|
|
1847
|
-
// Edge toolbar anchors at the edge midpoint; the attribute switches
|
|
1848
|
-
// its transform to centered-above (vs the node's up-right corner).
|
|
1849
|
-
data-flow-selection-edge={selection?.type === 'edge' ? '' : undefined}
|
|
1850
|
-
style={{ left: selectionActions.left, top: selectionActions.top }}
|
|
1851
|
-
>
|
|
1852
|
-
{selectionActions.content}
|
|
1853
|
-
</div>
|
|
1854
|
-
) : null}
|
|
1855
|
-
<div id={instructionsId} className={styles.srOnly}>
|
|
1856
|
-
{/* readOnly gets its own cheat-sheet: describing Delete/move/connect
|
|
1857
|
-
on a canvas where those keys are inert would contradict behavior. */}
|
|
1858
|
-
{t(readOnly ? 'flowCanvas.instructionsReadOnly' : 'flowCanvas.instructions')}
|
|
1859
|
-
</div>
|
|
1860
|
-
<div role="status" className={styles.srOnly}>
|
|
1861
|
-
<span key={announcement.nonce}>{announcement.text}</span>
|
|
1862
|
-
</div>
|
|
1863
|
-
</div>
|
|
1864
|
-
);
|
|
1865
|
-
});
|
|
1866
|
-
|
|
1867
|
-
FlowCanvas.displayName = 'FlowCanvas';
|