@datatechsolutions/tympan 0.3.0 → 0.4.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/README.md +22 -4
- package/dist/{Avatar-P14MVkK1.js → Avatar-CU7B1WsX.js} +61 -1
- package/dist/{Avatar-P14MVkK1.js.map → Avatar-CU7B1WsX.js.map} +1 -1
- package/dist/avatars.js +1 -1
- package/dist/elements-DCGBSGS8.js +14699 -0
- package/dist/elements-DCGBSGS8.js.map +1 -0
- package/dist/elements-react.d.ts +1378 -0
- package/dist/elements-react.js +3639 -0
- package/dist/elements-react.js.map +1 -0
- package/dist/elements.bundle.js +5 -0
- package/dist/elements.d.ts +13520 -0
- package/dist/elements.js +3 -0
- package/dist/flow.css +174 -3
- package/dist/flow.d.ts +86 -4
- package/dist/flow.js +200 -11
- package/dist/flow.js.map +1 -1
- package/dist/{index-C3WAwKdm.d.ts → index-J-7EBkCL.d.ts} +175 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/parse-Dq4x3Wet.js +345 -0
- package/dist/parse-Dq4x3Wet.js.map +1 -0
- package/dist/{src-Ds9ArSaP.js → src-uCyIE-Te.js} +859 -668
- package/dist/src-uCyIE-Te.js.map +1 -0
- package/dist/styles.css +6937 -2592
- package/docs/html-contract.md +644 -0
- package/package.json +25 -14
- package/src/avatars/GeneratedAvatar.tsx +41 -0
- package/src/avatars/avatarSvg.ts +252 -0
- package/src/avatars/avatars.test.tsx +268 -0
- package/src/avatars/index.ts +30 -0
- package/src/avatars/styles.ts +80 -0
- package/src/base.css +49 -0
- package/src/components/action-menu/ActionMenu.css +152 -0
- package/src/components/action-menu/ActionMenu.test.tsx +189 -0
- package/src/components/action-menu/ActionMenu.tsx +282 -0
- package/src/components/activity-feed/ActivityFeed.css +91 -0
- package/src/components/activity-feed/ActivityFeed.test.tsx +89 -0
- package/src/components/activity-feed/ActivityFeed.tsx +86 -0
- package/src/components/actor-chip/ActorChip.css +93 -0
- package/src/components/actor-chip/ActorChip.test.tsx +89 -0
- package/src/components/actor-chip/ActorChip.tsx +98 -0
- package/src/components/agent-output-card/AgentOutputCard.css +105 -0
- package/src/components/agent-output-card/AgentOutputCard.rtl.test.tsx +12 -0
- package/src/components/agent-output-card/AgentOutputCard.test.tsx +65 -0
- package/src/components/agent-output-card/AgentOutputCard.tsx +74 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.css +45 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.rtl.test.tsx +12 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.test.tsx +60 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.tsx +11 -0
- package/src/components/app-frame/AppFrame.css +285 -0
- package/src/components/app-frame/AppFrame.test.tsx +127 -0
- package/src/components/app-frame/AppFrame.tsx +231 -0
- package/src/components/app-frame/AppFrameRail.css +321 -0
- package/src/components/app-frame/RailFrame.test.tsx +159 -0
- package/src/components/app-frame/RailFrame.tsx +140 -0
- package/src/components/app-frame/RailNav.tsx +118 -0
- package/src/components/app-frame/frameContext.ts +22 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.css +140 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.test.tsx +103 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.tsx +201 -0
- package/src/components/app-navigation/AppNavigation.css +354 -0
- package/src/components/app-navigation/AppNavigation.test.tsx +129 -0
- package/src/components/app-navigation/AppNavigation.tsx +372 -0
- package/src/components/app-navigation/builders.ts +117 -0
- package/src/components/attention-list/AttentionList.css +90 -0
- package/src/components/attention-list/AttentionList.test.tsx +84 -0
- package/src/components/attention-list/AttentionList.tsx +82 -0
- package/src/components/auth-frame/AuthFrame.css +85 -0
- package/src/components/auth-frame/AuthFrame.rtl.test.tsx +14 -0
- package/src/components/auth-frame/AuthFrame.test.tsx +89 -0
- package/src/components/auth-frame/AuthFrame.tsx +35 -0
- package/src/components/avatar/Avatar.css +134 -0
- package/src/components/avatar/Avatar.test.tsx +98 -0
- package/src/components/avatar/Avatar.tsx +114 -0
- package/src/components/brand-loader/BrandLoader.css +78 -0
- package/src/components/brand-loader/BrandLoader.rtl.test.tsx +13 -0
- package/src/components/brand-loader/BrandLoader.test.tsx +83 -0
- package/src/components/brand-loader/BrandLoader.tsx +34 -0
- package/src/components/brand-mark/BrandMark.css +60 -0
- package/src/components/brand-mark/BrandMark.rtl.test.tsx +16 -0
- package/src/components/brand-mark/BrandMark.test.tsx +60 -0
- package/src/components/brand-mark/BrandMark.tsx +76 -0
- package/src/components/brand-panel/BrandPanel.css +100 -0
- package/src/components/brand-panel/BrandPanel.rtl.test.tsx +13 -0
- package/src/components/brand-panel/BrandPanel.test.tsx +59 -0
- package/src/components/brand-panel/BrandPanel.tsx +61 -0
- package/src/components/brand-wordmark/BrandWordmark.css +37 -0
- package/src/components/breadcrumbs/Breadcrumbs.css +158 -0
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +104 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +130 -0
- package/src/components/button/Button.css +214 -0
- package/src/components/button/Button.test.tsx +177 -0
- package/src/components/button/Button.tsx +205 -0
- package/src/components/calendar/Calendar.css +260 -0
- package/src/components/calendar/Calendar.test.tsx +178 -0
- package/src/components/calendar/Calendar.tsx +341 -0
- package/src/components/cascade-grid/CascadeGrid.css +31 -0
- package/src/components/cascade-grid/CascadeGrid.rtl.test.tsx +20 -0
- package/src/components/cascade-grid/CascadeGrid.test.tsx +126 -0
- package/src/components/cascade-grid/CascadeGrid.tsx +98 -0
- package/src/components/category-tabs/CategoryTabs.css +108 -0
- package/src/components/category-tabs/CategoryTabs.test.tsx +118 -0
- package/src/components/category-tabs/CategoryTabs.tsx +94 -0
- package/src/components/chart/Chart.css +215 -0
- package/src/components/chart/Chart.rtl.test.tsx +42 -0
- package/src/components/chart/Chart.test.tsx +187 -0
- package/src/components/chart/Chart.tsx +502 -0
- package/src/components/chart/chartMath.ts +73 -0
- package/src/components/chart/plot.ts +53 -0
- package/src/components/chart/types.ts +72 -0
- package/src/components/checkbox/Checkbox.css +168 -0
- package/src/components/checkbox/Checkbox.test.tsx +97 -0
- package/src/components/checkbox/Checkbox.tsx +168 -0
- package/src/components/chip-group/ChipGroup.css +182 -0
- package/src/components/chip-group/ChipGroup.test.tsx +135 -0
- package/src/components/chip-group/ChipGroup.tsx +169 -0
- package/src/components/choice-card/ChoiceCard.css +141 -0
- package/src/components/choice-card/ChoiceCard.test.tsx +111 -0
- package/src/components/choice-card/ChoiceCard.tsx +139 -0
- package/src/components/choice-grid/ChoiceGrid.css +110 -0
- package/src/components/choice-grid/ChoiceGrid.test.tsx +85 -0
- package/src/components/choice-grid/ChoiceGrid.tsx +85 -0
- package/src/components/choice-tile/ChoiceTile.css +79 -0
- package/src/components/choice-tile/ChoiceTile.test.tsx +118 -0
- package/src/components/choice-tile/ChoiceTile.tsx +57 -0
- package/src/components/command-palette/CommandPalette.css +296 -0
- package/src/components/command-palette/CommandPalette.test.tsx +190 -0
- package/src/components/command-palette/CommandPalette.tsx +340 -0
- package/src/components/command-palette/model.ts +156 -0
- package/src/components/compact-confirm/CompactConfirm.css +136 -0
- package/src/components/compact-confirm/CompactConfirm.test.tsx +119 -0
- package/src/components/compact-confirm/CompactConfirm.tsx +91 -0
- package/src/components/confirm-service/ConfirmService.test.tsx +121 -0
- package/src/components/confirm-service/ConfirmService.tsx +152 -0
- package/src/components/consent-banner/ConsentBanner.css +73 -0
- package/src/components/consent-banner/ConsentBanner.rtl.test.tsx +12 -0
- package/src/components/consent-banner/ConsentBanner.test.tsx +86 -0
- package/src/components/consent-banner/ConsentBanner.tsx +66 -0
- package/src/components/contact-card/ContactCard.css +105 -0
- package/src/components/contact-card/ContactCard.rtl.test.tsx +17 -0
- package/src/components/contact-card/ContactCard.test.tsx +58 -0
- package/src/components/contact-card/ContactCard.tsx +99 -0
- package/src/components/copy-identifier/CopyIdentifier.css +90 -0
- package/src/components/copy-identifier/CopyIdentifier.test.tsx +103 -0
- package/src/components/copy-identifier/CopyIdentifier.tsx +89 -0
- package/src/components/count-badge/CountBadge.css +54 -0
- package/src/components/count-badge/CountBadge.test.tsx +81 -0
- package/src/components/count-badge/CountBadge.tsx +68 -0
- package/src/components/currency-field/CurrencyField.css +88 -0
- package/src/components/currency-field/CurrencyField.test.tsx +147 -0
- package/src/components/currency-field/CurrencyField.tsx +219 -0
- package/src/components/data-table/DataTable.css +362 -0
- package/src/components/data-table/DataTable.test.tsx +214 -0
- package/src/components/data-table/DataTable.tsx +396 -0
- package/src/components/date-field/DateField.css +126 -0
- package/src/components/date-field/DateField.test.tsx +143 -0
- package/src/components/date-field/DateField.tsx +235 -0
- package/src/components/date-range-field/DateRangeField.css +140 -0
- package/src/components/date-range-field/DateRangeField.test.tsx +187 -0
- package/src/components/date-range-field/DateRangeField.tsx +231 -0
- package/src/components/delta-indicator/DeltaIndicator.css +58 -0
- package/src/components/delta-indicator/DeltaIndicator.rtl.test.tsx +19 -0
- package/src/components/delta-indicator/DeltaIndicator.test.tsx +69 -0
- package/src/components/delta-indicator/DeltaIndicator.tsx +88 -0
- package/src/components/details-popover/DetailsPopover.css +166 -0
- package/src/components/details-popover/DetailsPopover.test.tsx +92 -0
- package/src/components/details-popover/DetailsPopover.tsx +141 -0
- package/src/components/drawer/Drawer.css +188 -0
- package/src/components/drawer/Drawer.test.tsx +152 -0
- package/src/components/drawer/Drawer.tsx +121 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.css +66 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.rtl.test.tsx +17 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.test.tsx +86 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.tsx +104 -0
- package/src/components/empty-state/EmptyState.css +70 -0
- package/src/components/empty-state/EmptyState.test.tsx +77 -0
- package/src/components/empty-state/EmptyState.tsx +105 -0
- package/src/components/environment-banner/EnvironmentBanner.css +46 -0
- package/src/components/environment-banner/EnvironmentBanner.rtl.test.tsx +13 -0
- package/src/components/environment-banner/EnvironmentBanner.test.tsx +51 -0
- package/src/components/environment-banner/EnvironmentBanner.tsx +75 -0
- package/src/components/error-state/ErrorState.css +113 -0
- package/src/components/error-state/ErrorState.test.tsx +98 -0
- package/src/components/error-state/ErrorState.tsx +145 -0
- package/src/components/evidence-panel/EvidencePanel.css +126 -0
- package/src/components/evidence-panel/EvidencePanel.test.tsx +130 -0
- package/src/components/evidence-panel/EvidencePanel.tsx +120 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.css +136 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.rtl.test.tsx +13 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.test.tsx +91 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.tsx +76 -0
- package/src/components/feature-tile/FeatureTile.css +111 -0
- package/src/components/feature-tile/FeatureTile.rtl.test.tsx +14 -0
- package/src/components/feature-tile/FeatureTile.test.tsx +78 -0
- package/src/components/feature-tile/FeatureTile.tsx +52 -0
- package/src/components/federated-sign-in/FederatedSignIn.css +23 -0
- package/src/components/federated-sign-in/FederatedSignIn.rtl.test.tsx +12 -0
- package/src/components/federated-sign-in/FederatedSignIn.test.tsx +74 -0
- package/src/components/federated-sign-in/FederatedSignIn.tsx +68 -0
- package/src/components/field/Field.css +99 -0
- package/src/components/field/Field.test.tsx +134 -0
- package/src/components/field/Field.tsx +228 -0
- package/src/components/filter-chips/FilterChips.css +145 -0
- package/src/components/filter-chips/FilterChips.test.tsx +121 -0
- package/src/components/filter-chips/FilterChips.tsx +134 -0
- package/src/components/filter-field/FilterField.css +11 -0
- package/src/components/filter-field/FilterField.test.tsx +92 -0
- package/src/components/filter-field/FilterField.tsx +43 -0
- package/src/components/filter-tile/FilterTile.css +145 -0
- package/src/components/filter-tile/FilterTile.test.tsx +69 -0
- package/src/components/filter-tile/FilterTile.tsx +87 -0
- package/src/components/flag-set-picker/FlagSetPicker.css +32 -0
- package/src/components/flag-set-picker/FlagSetPicker.test.tsx +75 -0
- package/src/components/flag-set-picker/FlagSetPicker.tsx +92 -0
- package/src/components/floating-action-bar/FloatingActionBar.css +375 -0
- package/src/components/floating-action-bar/FloatingActionBar.test.tsx +309 -0
- package/src/components/floating-action-bar/FloatingActionBar.tsx +655 -0
- package/src/components/floating-action-bar/barModel.ts +147 -0
- package/src/components/floating-action-button/FloatingActionButton.css +54 -0
- package/src/components/floating-action-button/FloatingActionButton.test.tsx +87 -0
- package/src/components/floating-action-button/FloatingActionButton.tsx +87 -0
- package/src/components/form-actions/FormActions.css +34 -0
- package/src/components/form-actions/FormActions.test.tsx +96 -0
- package/src/components/form-actions/FormActions.tsx +83 -0
- package/src/components/form-layout/FormLayout.css +148 -0
- package/src/components/form-layout/FormLayout.test.tsx +137 -0
- package/src/components/form-layout/FormLayout.tsx +177 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.css +92 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.rtl.test.tsx +12 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.test.tsx +70 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.tsx +75 -0
- package/src/components/gradient-mark/GradientMark.css +45 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.css +80 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.test.tsx +92 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.tsx +105 -0
- package/src/components/heading/Heading.css +67 -0
- package/src/components/heading/Heading.test.tsx +93 -0
- package/src/components/heading/Heading.tsx +60 -0
- package/src/components/highlight-stat/HighlightStat.css +50 -0
- package/src/components/highlight-stat/HighlightStat.rtl.test.tsx +13 -0
- package/src/components/highlight-stat/HighlightStat.test.tsx +83 -0
- package/src/components/highlight-stat/HighlightStat.tsx +66 -0
- package/src/components/history-list/HistoryList.css +116 -0
- package/src/components/history-list/HistoryList.test.tsx +88 -0
- package/src/components/history-list/HistoryList.tsx +115 -0
- package/src/components/http-error-page/HttpErrorPage.css +70 -0
- package/src/components/http-error-page/HttpErrorPage.rtl.test.tsx +12 -0
- package/src/components/http-error-page/HttpErrorPage.test.tsx +51 -0
- package/src/components/http-error-page/HttpErrorPage.tsx +70 -0
- package/src/components/image-picker/ImagePicker.css +151 -0
- package/src/components/image-picker/ImagePicker.test.tsx +133 -0
- package/src/components/image-picker/ImagePicker.tsx +167 -0
- package/src/components/inline-notice/InlineNotice.css +101 -0
- package/src/components/inline-notice/InlineNotice.test.tsx +123 -0
- package/src/components/inline-notice/InlineNotice.tsx +98 -0
- package/src/components/insight-card/InsightCard.css +109 -0
- package/src/components/insight-card/InsightCard.rtl.test.tsx +14 -0
- package/src/components/insight-card/InsightCard.test.tsx +102 -0
- package/src/components/insight-card/InsightCard.tsx +185 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.css +163 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.rtl.test.tsx +13 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.test.tsx +123 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.tsx +167 -0
- package/src/components/link/Link.css +76 -0
- package/src/components/link/Link.test.tsx +103 -0
- package/src/components/link/Link.tsx +87 -0
- package/src/components/list-panel/ListPanel.css +95 -0
- package/src/components/list-panel/ListPanel.test.tsx +128 -0
- package/src/components/list-panel/ListPanel.tsx +137 -0
- package/src/components/list-row/ListRow.css +81 -0
- package/src/components/list-row/ListRow.test.tsx +87 -0
- package/src/components/list-row/ListRow.tsx +68 -0
- package/src/components/listbox-select/ListboxSelect.css +263 -0
- package/src/components/listbox-select/ListboxSelect.test.tsx +157 -0
- package/src/components/listbox-select/ListboxSelect.tsx +178 -0
- package/src/components/live-report-view/LiveReportView.css +111 -0
- package/src/components/live-report-view/LiveReportView.rtl.test.tsx +14 -0
- package/src/components/live-report-view/LiveReportView.test.tsx +185 -0
- package/src/components/live-report-view/LiveReportView.tsx +135 -0
- package/src/components/live-report-view/runEvents.ts +103 -0
- package/src/components/live-report-view/useRunEventStream.ts +134 -0
- package/src/components/loader-presets/LoaderPresets.test.tsx +22 -0
- package/src/components/loader-presets/LoaderPresets.tsx +80 -0
- package/src/components/locale-picker/LocalePicker.css +91 -0
- package/src/components/locale-picker/LocalePicker.test.tsx +99 -0
- package/src/components/locale-picker/LocalePicker.tsx +128 -0
- package/src/components/long-press-menu/LongPressMenu.css +97 -0
- package/src/components/long-press-menu/LongPressMenu.test.tsx +106 -0
- package/src/components/long-press-menu/LongPressMenu.tsx +100 -0
- package/src/components/markdown-view/MarkdownView.css +93 -0
- package/src/components/markdown-view/MarkdownView.test.tsx +107 -0
- package/src/components/markdown-view/MarkdownView.tsx +96 -0
- package/src/components/markdown-view/parse.ts +152 -0
- package/src/components/metric-tile/MetricTile.css +104 -0
- package/src/components/metric-tile/MetricTile.rtl.test.tsx +12 -0
- package/src/components/metric-tile/MetricTile.test.tsx +70 -0
- package/src/components/metric-tile/MetricTile.tsx +59 -0
- package/src/components/modal-dialog/ModalDialog.css +165 -0
- package/src/components/modal-dialog/ModalDialog.test.tsx +158 -0
- package/src/components/modal-dialog/ModalDialog.tsx +112 -0
- package/src/components/month-field/MonthField.css +11 -0
- package/src/components/month-field/MonthField.test.tsx +101 -0
- package/src/components/month-field/MonthField.tsx +124 -0
- package/src/components/native-select/NativeSelect.css +246 -0
- package/src/components/native-select/NativeSelect.test.tsx +160 -0
- package/src/components/native-select/NativeSelect.tsx +234 -0
- package/src/components/navigation-flyout/NavigationFlyout.css +181 -0
- package/src/components/navigation-flyout/NavigationFlyout.test.tsx +111 -0
- package/src/components/navigation-flyout/NavigationFlyout.tsx +196 -0
- package/src/components/notification-center/NotificationCenter.css +187 -0
- package/src/components/notification-center/NotificationCenter.test.tsx +140 -0
- package/src/components/notification-center/NotificationCenter.tsx +229 -0
- package/src/components/one-time-code-field/OneTimeCodeField.css +62 -0
- package/src/components/one-time-code-field/OneTimeCodeField.test.tsx +150 -0
- package/src/components/one-time-code-field/OneTimeCodeField.tsx +176 -0
- package/src/components/page-dots/PageDots.css +90 -0
- package/src/components/page-dots/PageDots.test.tsx +87 -0
- package/src/components/page-dots/PageDots.tsx +95 -0
- package/src/components/page-header/PageHeader.css +271 -0
- package/src/components/page-header/PageHeader.test.tsx +185 -0
- package/src/components/page-header/PageHeader.tsx +194 -0
- package/src/components/pagination/Pagination.css +139 -0
- package/src/components/pagination/Pagination.test.tsx +104 -0
- package/src/components/pagination/Pagination.tsx +160 -0
- package/src/components/password-strength/PasswordStrength.css +85 -0
- package/src/components/password-strength/PasswordStrength.test.tsx +90 -0
- package/src/components/password-strength/PasswordStrength.tsx +109 -0
- package/src/components/phase-bar/PhaseBar.css +95 -0
- package/src/components/phase-bar/PhaseBar.test.tsx +67 -0
- package/src/components/phase-bar/PhaseBar.tsx +66 -0
- package/src/components/popover/Popover.css +130 -0
- package/src/components/popover/Popover.test.tsx +153 -0
- package/src/components/popover/Popover.tsx +110 -0
- package/src/components/product-mark/ProductMark.css +24 -0
- package/src/components/product-mark/ProductMark.test.tsx +48 -0
- package/src/components/product-mark/ProductMark.tsx +95 -0
- package/src/components/product-mark/marks.ts +115 -0
- package/src/components/product-mark/plate.ts +42 -0
- package/src/components/profile-avatar/ProfileAvatar.css +51 -0
- package/src/components/profile-avatar/ProfileAvatar.test.tsx +78 -0
- package/src/components/profile-avatar/ProfileAvatar.tsx +58 -0
- package/src/components/profile-summary/ProfileSummary.css +43 -0
- package/src/components/profile-summary/ProfileSummary.rtl.test.tsx +12 -0
- package/src/components/profile-summary/ProfileSummary.test.tsx +52 -0
- package/src/components/profile-summary/ProfileSummary.tsx +52 -0
- package/src/components/progress-bar/ProgressBar.css +100 -0
- package/src/components/progress-bar/ProgressBar.test.tsx +68 -0
- package/src/components/progress-bar/ProgressBar.tsx +76 -0
- package/src/components/proof-badge/ProofBadge.css +178 -0
- package/src/components/proof-badge/ProofBadge.test.tsx +95 -0
- package/src/components/proof-badge/ProofBadge.tsx +113 -0
- package/src/components/pull-to-refresh/PullToRefresh.css +99 -0
- package/src/components/pull-to-refresh/PullToRefresh.rtl.test.tsx +16 -0
- package/src/components/pull-to-refresh/PullToRefresh.test.tsx +117 -0
- package/src/components/pull-to-refresh/PullToRefresh.tsx +181 -0
- package/src/components/record-card/RecordCard.css +151 -0
- package/src/components/record-card/RecordCard.rtl.test.tsx +16 -0
- package/src/components/record-card/RecordCard.test.tsx +105 -0
- package/src/components/record-card/RecordCard.tsx +159 -0
- package/src/components/recovery-code-list/RecoveryCodeList.css +66 -0
- package/src/components/recovery-code-list/RecoveryCodeList.test.tsx +108 -0
- package/src/components/recovery-code-list/RecoveryCodeList.tsx +105 -0
- package/src/components/region-map/RegionMap.css +229 -0
- package/src/components/region-map/RegionMap.test.tsx +200 -0
- package/src/components/region-map/RegionMap.tsx +400 -0
- package/src/components/region-map/useRegionMapState.ts +92 -0
- package/src/components/region-theme/countryProfile.ts +110 -0
- package/src/components/region-theme/data/br-profile.ts +41 -0
- package/src/components/region-theme/data/br.ts +80 -0
- package/src/components/region-theme/format.ts +120 -0
- package/src/components/region-theme/geometry.ts +67 -0
- package/src/components/region-theme/index.ts +7 -0
- package/src/components/region-theme/regionTheme.test.tsx +200 -0
- package/src/components/region-theme/registry.ts +163 -0
- package/src/components/report-view/ReportView.css +323 -0
- package/src/components/report-view/ReportView.rtl.test.tsx +25 -0
- package/src/components/report-view/ReportView.test.tsx +141 -0
- package/src/components/report-view/ReportView.tsx +201 -0
- package/src/components/report-view/sections.tsx +281 -0
- package/src/components/report-view/types.ts +72 -0
- package/src/components/report-view/validateReport.ts +51 -0
- package/src/components/resizable-split/ResizableSplit.css +56 -0
- package/src/components/resizable-split/ResizableSplit.test.tsx +108 -0
- package/src/components/resizable-split/ResizableSplit.tsx +76 -0
- package/src/components/resizable-split/useSplitter.ts +72 -0
- package/src/components/reveal-number/RevealNumber.css +17 -0
- package/src/components/reveal-number/RevealNumber.rtl.test.tsx +13 -0
- package/src/components/reveal-number/RevealNumber.test.tsx +136 -0
- package/src/components/reveal-number/RevealNumber.tsx +115 -0
- package/src/components/route-progress/RouteProgress.css +54 -0
- package/src/components/route-progress/RouteProgress.rtl.test.tsx +16 -0
- package/src/components/route-progress/RouteProgress.test.tsx +62 -0
- package/src/components/route-progress/RouteProgress.tsx +63 -0
- package/src/components/ruled-grid/RuledGrid.css +86 -0
- package/src/components/ruled-grid/RuledGrid.rtl.test.tsx +13 -0
- package/src/components/ruled-grid/RuledGrid.test.tsx +92 -0
- package/src/components/ruled-grid/RuledGrid.tsx +73 -0
- package/src/components/safe-area-inset/SafeAreaInset.css +65 -0
- package/src/components/safe-area-inset/SafeAreaInset.rtl.test.tsx +17 -0
- package/src/components/safe-area-inset/SafeAreaInset.test.tsx +99 -0
- package/src/components/safe-area-inset/SafeAreaInset.tsx +101 -0
- package/src/components/schema-request-form/SchemaRequestForm.css +75 -0
- package/src/components/schema-request-form/SchemaRequestForm.test.tsx +138 -0
- package/src/components/schema-request-form/SchemaRequestForm.tsx +231 -0
- package/src/components/search-bar/SearchBar.css +117 -0
- package/src/components/search-bar/SearchBar.test.tsx +134 -0
- package/src/components/search-bar/SearchBar.tsx +176 -0
- package/src/components/section-heading/SectionHeading.css +68 -0
- package/src/components/section-heading/SectionHeading.test.tsx +65 -0
- package/src/components/section-heading/SectionHeading.tsx +61 -0
- package/src/components/section-panel/SectionPanel.css +207 -0
- package/src/components/section-panel/SectionPanel.test.tsx +122 -0
- package/src/components/section-panel/SectionPanel.tsx +139 -0
- package/src/components/sectioned-modal/SectionedModal.css +325 -0
- package/src/components/sectioned-modal/SectionedModal.test.tsx +138 -0
- package/src/components/sectioned-modal/SectionedModal.tsx +258 -0
- package/src/components/segmented-control/SegmentedControl.css +123 -0
- package/src/components/segmented-control/SegmentedControl.test.tsx +109 -0
- package/src/components/segmented-control/SegmentedControl.tsx +85 -0
- package/src/components/separator/Separator.css +61 -0
- package/src/components/separator/Separator.test.tsx +65 -0
- package/src/components/separator/Separator.tsx +46 -0
- package/src/components/settings-dialog/SettingsDialog.css +151 -0
- package/src/components/settings-dialog/SettingsDialog.test.tsx +155 -0
- package/src/components/settings-dialog/SettingsDialog.tsx +126 -0
- package/src/components/settings-dialog/settingsModel.ts +63 -0
- package/src/components/settings-dialog/settingsParts.tsx +149 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.css +78 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.rtl.test.tsx +12 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.test.tsx +91 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.tsx +47 -0
- package/src/components/showcase-heading/ShowcaseHeading.css +65 -0
- package/src/components/showcase-heading/ShowcaseHeading.rtl.test.tsx +13 -0
- package/src/components/showcase-heading/ShowcaseHeading.test.tsx +79 -0
- package/src/components/showcase-heading/ShowcaseHeading.tsx +67 -0
- package/src/components/skeleton/Skeleton.css +120 -0
- package/src/components/skeleton/Skeleton.test.tsx +96 -0
- package/src/components/skeleton/Skeleton.tsx +168 -0
- package/src/components/skeleton-fill/SkeletonFill.css +67 -0
- package/src/components/skeleton-fill/SkeletonFill.rtl.test.tsx +12 -0
- package/src/components/skeleton-fill/SkeletonFill.test.tsx +61 -0
- package/src/components/skeleton-fill/SkeletonFill.tsx +48 -0
- package/src/components/skip-link/SkipLink.css +52 -0
- package/src/components/skip-link/SkipLink.test.tsx +90 -0
- package/src/components/skip-link/SkipLink.tsx +42 -0
- package/src/components/spinner/Spinner.css +134 -0
- package/src/components/spinner/Spinner.test.tsx +99 -0
- package/src/components/spinner/Spinner.tsx +100 -0
- package/src/components/stage-strip/StageStrip.css +126 -0
- package/src/components/stage-strip/StageStrip.test.tsx +82 -0
- package/src/components/stage-strip/StageStrip.tsx +100 -0
- package/src/components/stat-strip/StatStrip.css +90 -0
- package/src/components/stat-strip/StatStrip.test.tsx +75 -0
- package/src/components/stat-strip/StatStrip.tsx +62 -0
- package/src/components/stat-tile/StatTile.css +171 -0
- package/src/components/stat-tile/StatTile.rtl.test.tsx +14 -0
- package/src/components/stat-tile/StatTile.test.tsx +90 -0
- package/src/components/stat-tile/StatTile.tsx +129 -0
- package/src/components/state-switch/StateSwitch.css +113 -0
- package/src/components/state-switch/StateSwitch.test.tsx +102 -0
- package/src/components/state-switch/StateSwitch.tsx +73 -0
- package/src/components/status-pill/StatusPill.css +85 -0
- package/src/components/status-pill/StatusPill.test.tsx +91 -0
- package/src/components/status-pill/StatusPill.tsx +73 -0
- package/src/components/step-list/StepList.css +181 -0
- package/src/components/step-list/StepList.test.tsx +93 -0
- package/src/components/step-list/StepList.tsx +118 -0
- package/src/components/summary-row/SummaryRow.css +85 -0
- package/src/components/summary-row/SummaryRow.test.tsx +77 -0
- package/src/components/summary-row/SummaryRow.tsx +72 -0
- package/src/components/surface/Surface.css +157 -0
- package/src/components/surface/Surface.test.tsx +97 -0
- package/src/components/surface/Surface.tsx +124 -0
- package/src/components/swipe-row/SwipeRow.css +131 -0
- package/src/components/swipe-row/SwipeRow.rtl.test.tsx +31 -0
- package/src/components/swipe-row/SwipeRow.test.tsx +124 -0
- package/src/components/swipe-row/SwipeRow.tsx +219 -0
- package/src/components/switch/Switch.css +182 -0
- package/src/components/switch/Switch.test.tsx +112 -0
- package/src/components/switch/Switch.tsx +125 -0
- package/src/components/tabs/Tabs.css +137 -0
- package/src/components/tabs/Tabs.test.tsx +127 -0
- package/src/components/tabs/Tabs.tsx +94 -0
- package/src/components/tag/Tag.css +146 -0
- package/src/components/tag/Tag.test.tsx +129 -0
- package/src/components/tag/Tag.tsx +168 -0
- package/src/components/tag-field/TagField.css +274 -0
- package/src/components/tag-field/TagField.test.tsx +156 -0
- package/src/components/tag-field/TagField.tsx +270 -0
- package/src/components/text/Text.css +84 -0
- package/src/components/text/Text.test.tsx +91 -0
- package/src/components/text/Text.tsx +84 -0
- package/src/components/text-area/TextArea.css +125 -0
- package/src/components/text-area/TextArea.test.tsx +97 -0
- package/src/components/text-area/TextArea.tsx +145 -0
- package/src/components/text-field/TextField.css +197 -0
- package/src/components/text-field/TextField.test.tsx +136 -0
- package/src/components/text-field/TextField.tsx +208 -0
- package/src/components/theme-palette/ThemePalette.css +262 -0
- package/src/components/theme-palette/ThemePalette.test.tsx +62 -0
- package/src/components/theme-palette/ThemePalette.tsx +377 -0
- package/src/components/theme-switcher/ThemeSwitcher.css +159 -0
- package/src/components/theme-switcher/ThemeSwitcher.test.tsx +71 -0
- package/src/components/theme-switcher/ThemeSwitcher.tsx +72 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.css +56 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.rtl.test.tsx +13 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.test.tsx +100 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.tsx +218 -0
- package/src/components/ticker-card/TickerCard.css +147 -0
- package/src/components/ticker-card/TickerCard.rtl.test.tsx +14 -0
- package/src/components/ticker-card/TickerCard.test.tsx +74 -0
- package/src/components/ticker-card/TickerCard.tsx +151 -0
- package/src/components/time-field/TimeField.css +69 -0
- package/src/components/time-field/TimeField.test.tsx +138 -0
- package/src/components/time-field/TimeField.tsx +205 -0
- package/src/components/toast/Toast.css +137 -0
- package/src/components/toast/Toast.test.tsx +269 -0
- package/src/components/toast/Toast.tsx +370 -0
- package/src/components/tone-tint/ToneTint.css +74 -0
- package/src/components/tone-tint/toneTint.test.tsx +74 -0
- package/src/components/tone-tint/toneTint.ts +57 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.css +104 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.test.tsx +75 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.tsx +70 -0
- package/src/components/tooltip/Tooltip.css +70 -0
- package/src/components/tooltip/Tooltip.test.tsx +209 -0
- package/src/components/tooltip/Tooltip.tsx +102 -0
- package/src/components/tweened-number/TweenedNumber.css +7 -0
- package/src/components/tweened-number/TweenedNumber.rtl.test.tsx +19 -0
- package/src/components/tweened-number/TweenedNumber.test.tsx +97 -0
- package/src/components/tweened-number/TweenedNumber.tsx +70 -0
- package/src/components/upgrade-gate/UpgradeGate.css +94 -0
- package/src/components/upgrade-gate/UpgradeGate.rtl.test.tsx +12 -0
- package/src/components/upgrade-gate/UpgradeGate.test.tsx +56 -0
- package/src/components/upgrade-gate/UpgradeGate.tsx +56 -0
- package/src/components/wheel-picker/WheelPicker.css +149 -0
- package/src/components/wheel-picker/WheelPicker.test.tsx +150 -0
- package/src/components/wheel-picker/WheelPicker.tsx +228 -0
- package/src/components/wizard-page/WizardPage.css +114 -0
- package/src/components/wizard-page/WizardPage.test.tsx +117 -0
- package/src/components/wizard-page/WizardPage.tsx +123 -0
- package/src/elements/action-menu/definition.ts +123 -0
- package/src/elements/action-menu/element.ts +604 -0
- package/src/elements/anatomy.ts +55 -0
- package/src/elements/avatar/definition.ts +161 -0
- package/src/elements/avatar/element.ts +112 -0
- package/src/elements/base.ts +244 -0
- package/src/elements/brand-wordmark/definition.ts +37 -0
- package/src/elements/brand-wordmark/element.ts +13 -0
- package/src/elements/breadcrumbs/definition.ts +85 -0
- package/src/elements/breadcrumbs/element.ts +231 -0
- package/src/elements/button/definition.ts +74 -0
- package/src/elements/button/element.ts +25 -0
- package/src/elements/checkbox/definition.ts +132 -0
- package/src/elements/checkbox/element.ts +59 -0
- package/src/elements/command-palette/definition.ts +60 -0
- package/src/elements/command-palette/element.ts +706 -0
- package/src/elements/currency-field/definition.ts +159 -0
- package/src/elements/currency-field/element.ts +265 -0
- package/src/elements/data-table/definition.ts +54 -0
- package/src/elements/data-table/element.ts +440 -0
- package/src/elements/definition.ts +196 -0
- package/src/elements/drawer/definition.ts +156 -0
- package/src/elements/drawer/element.ts +304 -0
- package/src/elements/elements.css +156 -0
- package/src/elements/gradient-mark/definition.ts +41 -0
- package/src/elements/gradient-mark/element.ts +27 -0
- package/src/elements/heading/definition.ts +64 -0
- package/src/elements/heading/element.ts +14 -0
- package/src/elements/index.ts +146 -0
- package/src/elements/inline-notice/definition.ts +167 -0
- package/src/elements/inline-notice/element.ts +36 -0
- package/src/elements/link/definition.ts +70 -0
- package/src/elements/link/element.ts +40 -0
- package/src/elements/markdown-view/definition.ts +35 -0
- package/src/elements/markdown-view/element.ts +183 -0
- package/src/elements/modal/definition.ts +175 -0
- package/src/elements/modal/element.ts +226 -0
- package/src/elements/native-select/definition.ts +143 -0
- package/src/elements/native-select/element.ts +34 -0
- package/src/elements/notification-center/definition.ts +236 -0
- package/src/elements/notification-center/element.ts +527 -0
- package/src/elements/page-header/definition.ts +151 -0
- package/src/elements/page-header/element.ts +37 -0
- package/src/elements/popover/definition.ts +137 -0
- package/src/elements/popover/element.ts +196 -0
- package/src/elements/popover/model.ts +141 -0
- package/src/elements/progress-bar/definition.ts +84 -0
- package/src/elements/progress-bar/element.ts +82 -0
- package/src/elements/react/TyActionMenu.ts +79 -0
- package/src/elements/react/TyAvatar.ts +129 -0
- package/src/elements/react/TyBrandWordmark.ts +51 -0
- package/src/elements/react/TyBreadcrumbs.ts +82 -0
- package/src/elements/react/TyButton.ts +98 -0
- package/src/elements/react/TyCheckbox.ts +92 -0
- package/src/elements/react/TyCommandPalette.ts +120 -0
- package/src/elements/react/TyCurrencyField.ts +126 -0
- package/src/elements/react/TyDataTable.ts +105 -0
- package/src/elements/react/TyDrawer.ts +99 -0
- package/src/elements/react/TyGradientMark.ts +52 -0
- package/src/elements/react/TyHeading.ts +65 -0
- package/src/elements/react/TyInlineNotice.ts +191 -0
- package/src/elements/react/TyLink.ts +65 -0
- package/src/elements/react/TyMarkdownView.ts +46 -0
- package/src/elements/react/TyModal.ts +118 -0
- package/src/elements/react/TyNativeSelect.ts +96 -0
- package/src/elements/react/TyNotificationCenter.ts +153 -0
- package/src/elements/react/TyPageHeader.ts +126 -0
- package/src/elements/react/TyPopover.ts +95 -0
- package/src/elements/react/TyProgressBar.ts +72 -0
- package/src/elements/react/TySectionHeading.ts +78 -0
- package/src/elements/react/TySegmentedControl.ts +64 -0
- package/src/elements/react/TySeparator.ts +51 -0
- package/src/elements/react/TySkeleton.ts +61 -0
- package/src/elements/react/TySkipLink.ts +39 -0
- package/src/elements/react/TySpinner.ts +55 -0
- package/src/elements/react/TyStatusPill.ts +66 -0
- package/src/elements/react/TySurface.ts +104 -0
- package/src/elements/react/TySwitch.ts +77 -0
- package/src/elements/react/TyTabs.ts +66 -0
- package/src/elements/react/TyTag.ts +71 -0
- package/src/elements/react/TyTagField.ts +90 -0
- package/src/elements/react/TyTextArea.ts +124 -0
- package/src/elements/react/TyTextField.ts +186 -0
- package/src/elements/react/TyThemePalette.ts +126 -0
- package/src/elements/react/TyToast.ts +57 -0
- package/src/elements/react/TyWheelPicker.ts +60 -0
- package/src/elements/react/index.ts +39 -0
- package/src/elements/register.ts +7 -0
- package/src/elements/section-heading/definition.ts +81 -0
- package/src/elements/section-heading/element.ts +15 -0
- package/src/elements/segmented-control/definition.ts +72 -0
- package/src/elements/segmented-control/element.ts +253 -0
- package/src/elements/separator/definition.ts +44 -0
- package/src/elements/separator/element.ts +13 -0
- package/src/elements/skeleton/definition.ts +91 -0
- package/src/elements/skeleton/element.ts +175 -0
- package/src/elements/skip-link/definition.ts +26 -0
- package/src/elements/skip-link/element.ts +75 -0
- package/src/elements/spinner/definition.ts +52 -0
- package/src/elements/spinner/element.ts +58 -0
- package/src/elements/status-pill/definition.ts +48 -0
- package/src/elements/status-pill/element.ts +50 -0
- package/src/elements/surface/definition.ts +93 -0
- package/src/elements/surface/element.ts +42 -0
- package/src/elements/switch/definition.ts +72 -0
- package/src/elements/switch/element.ts +65 -0
- package/src/elements/tabs/definition.ts +60 -0
- package/src/elements/tabs/element.ts +319 -0
- package/src/elements/tag/definition.ts +69 -0
- package/src/elements/tag/element.ts +35 -0
- package/src/elements/tag-field/definition.ts +51 -0
- package/src/elements/tag-field/element.ts +461 -0
- package/src/elements/text-area/definition.ts +137 -0
- package/src/elements/text-area/element.ts +113 -0
- package/src/elements/text-field/definition.ts +236 -0
- package/src/elements/text-field/element.ts +151 -0
- package/src/elements/theme-palette/definition.ts +52 -0
- package/src/elements/theme-palette/element.ts +372 -0
- package/src/elements/theme-palette/model.ts +140 -0
- package/src/elements/toast/definition.ts +42 -0
- package/src/elements/toast/element.ts +479 -0
- package/src/elements/wheel-picker/definition.ts +39 -0
- package/src/elements/wheel-picker/element.ts +407 -0
- package/src/flags/Flag.css +58 -0
- package/src/flags/Flag.tsx +70 -0
- package/src/flags/art/1x1/ad.ts +2 -0
- package/src/flags/art/1x1/ae.ts +2 -0
- package/src/flags/art/1x1/af.ts +2 -0
- package/src/flags/art/1x1/ag.ts +2 -0
- package/src/flags/art/1x1/ai.ts +2 -0
- package/src/flags/art/1x1/al.ts +2 -0
- package/src/flags/art/1x1/am.ts +2 -0
- package/src/flags/art/1x1/ao.ts +2 -0
- package/src/flags/art/1x1/aq.ts +2 -0
- package/src/flags/art/1x1/ar.ts +2 -0
- package/src/flags/art/1x1/arab.ts +2 -0
- package/src/flags/art/1x1/as.ts +2 -0
- package/src/flags/art/1x1/asean.ts +2 -0
- package/src/flags/art/1x1/at.ts +2 -0
- package/src/flags/art/1x1/au.ts +2 -0
- package/src/flags/art/1x1/aw.ts +2 -0
- package/src/flags/art/1x1/ax.ts +2 -0
- package/src/flags/art/1x1/az.ts +2 -0
- package/src/flags/art/1x1/ba.ts +2 -0
- package/src/flags/art/1x1/bb.ts +2 -0
- package/src/flags/art/1x1/bd.ts +2 -0
- package/src/flags/art/1x1/be.ts +2 -0
- package/src/flags/art/1x1/bf.ts +2 -0
- package/src/flags/art/1x1/bg.ts +2 -0
- package/src/flags/art/1x1/bh.ts +2 -0
- package/src/flags/art/1x1/bi.ts +2 -0
- package/src/flags/art/1x1/bj.ts +2 -0
- package/src/flags/art/1x1/bl.ts +2 -0
- package/src/flags/art/1x1/bm.ts +2 -0
- package/src/flags/art/1x1/bn.ts +2 -0
- package/src/flags/art/1x1/bo.ts +2 -0
- package/src/flags/art/1x1/bq.ts +2 -0
- package/src/flags/art/1x1/br.ts +2 -0
- package/src/flags/art/1x1/bs.ts +2 -0
- package/src/flags/art/1x1/bt.ts +2 -0
- package/src/flags/art/1x1/bv.ts +2 -0
- package/src/flags/art/1x1/bw.ts +2 -0
- package/src/flags/art/1x1/by.ts +2 -0
- package/src/flags/art/1x1/bz.ts +2 -0
- package/src/flags/art/1x1/ca.ts +2 -0
- package/src/flags/art/1x1/cc.ts +2 -0
- package/src/flags/art/1x1/cd.ts +2 -0
- package/src/flags/art/1x1/cefta.ts +2 -0
- package/src/flags/art/1x1/cf.ts +2 -0
- package/src/flags/art/1x1/cg.ts +2 -0
- package/src/flags/art/1x1/ch.ts +2 -0
- package/src/flags/art/1x1/ci.ts +2 -0
- package/src/flags/art/1x1/ck.ts +2 -0
- package/src/flags/art/1x1/cl.ts +2 -0
- package/src/flags/art/1x1/cm.ts +2 -0
- package/src/flags/art/1x1/cn.ts +2 -0
- package/src/flags/art/1x1/co.ts +2 -0
- package/src/flags/art/1x1/cp.ts +2 -0
- package/src/flags/art/1x1/cr.ts +2 -0
- package/src/flags/art/1x1/cu.ts +2 -0
- package/src/flags/art/1x1/cv.ts +2 -0
- package/src/flags/art/1x1/cw.ts +2 -0
- package/src/flags/art/1x1/cx.ts +2 -0
- package/src/flags/art/1x1/cy.ts +2 -0
- package/src/flags/art/1x1/cz.ts +2 -0
- package/src/flags/art/1x1/de.ts +2 -0
- package/src/flags/art/1x1/dg.ts +2 -0
- package/src/flags/art/1x1/dj.ts +2 -0
- package/src/flags/art/1x1/dk.ts +2 -0
- package/src/flags/art/1x1/dm.ts +2 -0
- package/src/flags/art/1x1/do.ts +2 -0
- package/src/flags/art/1x1/dz.ts +2 -0
- package/src/flags/art/1x1/eac.ts +2 -0
- package/src/flags/art/1x1/ec.ts +2 -0
- package/src/flags/art/1x1/ee.ts +2 -0
- package/src/flags/art/1x1/eg.ts +2 -0
- package/src/flags/art/1x1/eh.ts +2 -0
- package/src/flags/art/1x1/er.ts +2 -0
- package/src/flags/art/1x1/es-ct.ts +2 -0
- package/src/flags/art/1x1/es-ga.ts +2 -0
- package/src/flags/art/1x1/es-pv.ts +2 -0
- package/src/flags/art/1x1/es.ts +2 -0
- package/src/flags/art/1x1/et.ts +2 -0
- package/src/flags/art/1x1/eu.ts +2 -0
- package/src/flags/art/1x1/fi.ts +2 -0
- package/src/flags/art/1x1/fj.ts +2 -0
- package/src/flags/art/1x1/fk.ts +2 -0
- package/src/flags/art/1x1/fm.ts +2 -0
- package/src/flags/art/1x1/fo.ts +2 -0
- package/src/flags/art/1x1/fr.ts +2 -0
- package/src/flags/art/1x1/ga.ts +2 -0
- package/src/flags/art/1x1/gb-eng.ts +2 -0
- package/src/flags/art/1x1/gb-nir.ts +2 -0
- package/src/flags/art/1x1/gb-sct.ts +2 -0
- package/src/flags/art/1x1/gb-wls.ts +2 -0
- package/src/flags/art/1x1/gb.ts +2 -0
- package/src/flags/art/1x1/gd.ts +2 -0
- package/src/flags/art/1x1/ge.ts +2 -0
- package/src/flags/art/1x1/gf.ts +2 -0
- package/src/flags/art/1x1/gg.ts +2 -0
- package/src/flags/art/1x1/gh.ts +2 -0
- package/src/flags/art/1x1/gi.ts +2 -0
- package/src/flags/art/1x1/gl.ts +2 -0
- package/src/flags/art/1x1/gm.ts +2 -0
- package/src/flags/art/1x1/gn.ts +2 -0
- package/src/flags/art/1x1/gp.ts +2 -0
- package/src/flags/art/1x1/gq.ts +2 -0
- package/src/flags/art/1x1/gr.ts +2 -0
- package/src/flags/art/1x1/gs.ts +2 -0
- package/src/flags/art/1x1/gt.ts +2 -0
- package/src/flags/art/1x1/gu.ts +2 -0
- package/src/flags/art/1x1/gw.ts +2 -0
- package/src/flags/art/1x1/gy.ts +2 -0
- package/src/flags/art/1x1/hk.ts +2 -0
- package/src/flags/art/1x1/hm.ts +2 -0
- package/src/flags/art/1x1/hn.ts +2 -0
- package/src/flags/art/1x1/hr.ts +2 -0
- package/src/flags/art/1x1/ht.ts +2 -0
- package/src/flags/art/1x1/hu.ts +2 -0
- package/src/flags/art/1x1/ic.ts +2 -0
- package/src/flags/art/1x1/id.ts +2 -0
- package/src/flags/art/1x1/ie.ts +2 -0
- package/src/flags/art/1x1/il.ts +2 -0
- package/src/flags/art/1x1/im.ts +2 -0
- package/src/flags/art/1x1/in.ts +2 -0
- package/src/flags/art/1x1/io.ts +2 -0
- package/src/flags/art/1x1/iq.ts +2 -0
- package/src/flags/art/1x1/ir.ts +2 -0
- package/src/flags/art/1x1/is.ts +2 -0
- package/src/flags/art/1x1/it.ts +2 -0
- package/src/flags/art/1x1/je.ts +2 -0
- package/src/flags/art/1x1/jm.ts +2 -0
- package/src/flags/art/1x1/jo.ts +2 -0
- package/src/flags/art/1x1/jp.ts +2 -0
- package/src/flags/art/1x1/ke.ts +2 -0
- package/src/flags/art/1x1/kg.ts +2 -0
- package/src/flags/art/1x1/kh.ts +2 -0
- package/src/flags/art/1x1/ki.ts +2 -0
- package/src/flags/art/1x1/km.ts +2 -0
- package/src/flags/art/1x1/kn.ts +2 -0
- package/src/flags/art/1x1/kp.ts +2 -0
- package/src/flags/art/1x1/kr.ts +2 -0
- package/src/flags/art/1x1/kw.ts +2 -0
- package/src/flags/art/1x1/ky.ts +2 -0
- package/src/flags/art/1x1/kz.ts +2 -0
- package/src/flags/art/1x1/la.ts +2 -0
- package/src/flags/art/1x1/lb.ts +2 -0
- package/src/flags/art/1x1/lc.ts +2 -0
- package/src/flags/art/1x1/li.ts +2 -0
- package/src/flags/art/1x1/lk.ts +2 -0
- package/src/flags/art/1x1/lr.ts +2 -0
- package/src/flags/art/1x1/ls.ts +2 -0
- package/src/flags/art/1x1/lt.ts +2 -0
- package/src/flags/art/1x1/lu.ts +2 -0
- package/src/flags/art/1x1/lv.ts +2 -0
- package/src/flags/art/1x1/ly.ts +2 -0
- package/src/flags/art/1x1/ma.ts +2 -0
- package/src/flags/art/1x1/mc.ts +2 -0
- package/src/flags/art/1x1/md.ts +2 -0
- package/src/flags/art/1x1/me.ts +2 -0
- package/src/flags/art/1x1/mf.ts +2 -0
- package/src/flags/art/1x1/mg.ts +2 -0
- package/src/flags/art/1x1/mh.ts +2 -0
- package/src/flags/art/1x1/mk.ts +2 -0
- package/src/flags/art/1x1/ml.ts +2 -0
- package/src/flags/art/1x1/mm.ts +2 -0
- package/src/flags/art/1x1/mn.ts +2 -0
- package/src/flags/art/1x1/mo.ts +2 -0
- package/src/flags/art/1x1/mp.ts +2 -0
- package/src/flags/art/1x1/mq.ts +2 -0
- package/src/flags/art/1x1/mr.ts +2 -0
- package/src/flags/art/1x1/ms.ts +2 -0
- package/src/flags/art/1x1/mt.ts +2 -0
- package/src/flags/art/1x1/mu.ts +2 -0
- package/src/flags/art/1x1/mv.ts +2 -0
- package/src/flags/art/1x1/mw.ts +2 -0
- package/src/flags/art/1x1/mx.ts +2 -0
- package/src/flags/art/1x1/my.ts +2 -0
- package/src/flags/art/1x1/mz.ts +2 -0
- package/src/flags/art/1x1/na.ts +2 -0
- package/src/flags/art/1x1/nc.ts +2 -0
- package/src/flags/art/1x1/ne.ts +2 -0
- package/src/flags/art/1x1/nf.ts +2 -0
- package/src/flags/art/1x1/ng.ts +2 -0
- package/src/flags/art/1x1/ni.ts +2 -0
- package/src/flags/art/1x1/nl.ts +2 -0
- package/src/flags/art/1x1/no.ts +2 -0
- package/src/flags/art/1x1/np.ts +2 -0
- package/src/flags/art/1x1/nr.ts +2 -0
- package/src/flags/art/1x1/nu.ts +2 -0
- package/src/flags/art/1x1/nz.ts +2 -0
- package/src/flags/art/1x1/om.ts +2 -0
- package/src/flags/art/1x1/pa.ts +2 -0
- package/src/flags/art/1x1/pc.ts +2 -0
- package/src/flags/art/1x1/pe.ts +2 -0
- package/src/flags/art/1x1/pf.ts +2 -0
- package/src/flags/art/1x1/pg.ts +2 -0
- package/src/flags/art/1x1/ph.ts +2 -0
- package/src/flags/art/1x1/pk.ts +2 -0
- package/src/flags/art/1x1/pl.ts +2 -0
- package/src/flags/art/1x1/pm.ts +2 -0
- package/src/flags/art/1x1/pn.ts +2 -0
- package/src/flags/art/1x1/pr.ts +2 -0
- package/src/flags/art/1x1/ps.ts +2 -0
- package/src/flags/art/1x1/pt.ts +2 -0
- package/src/flags/art/1x1/pw.ts +2 -0
- package/src/flags/art/1x1/py.ts +2 -0
- package/src/flags/art/1x1/qa.ts +2 -0
- package/src/flags/art/1x1/re.ts +2 -0
- package/src/flags/art/1x1/ro.ts +2 -0
- package/src/flags/art/1x1/rs.ts +2 -0
- package/src/flags/art/1x1/ru.ts +2 -0
- package/src/flags/art/1x1/rw.ts +2 -0
- package/src/flags/art/1x1/sa.ts +2 -0
- package/src/flags/art/1x1/sb.ts +2 -0
- package/src/flags/art/1x1/sc.ts +2 -0
- package/src/flags/art/1x1/sd.ts +2 -0
- package/src/flags/art/1x1/se.ts +2 -0
- package/src/flags/art/1x1/sg.ts +2 -0
- package/src/flags/art/1x1/sh-ac.ts +2 -0
- package/src/flags/art/1x1/sh-hl.ts +2 -0
- package/src/flags/art/1x1/sh-ta.ts +2 -0
- package/src/flags/art/1x1/sh.ts +2 -0
- package/src/flags/art/1x1/si.ts +2 -0
- package/src/flags/art/1x1/sj.ts +2 -0
- package/src/flags/art/1x1/sk.ts +2 -0
- package/src/flags/art/1x1/sl.ts +2 -0
- package/src/flags/art/1x1/sm.ts +2 -0
- package/src/flags/art/1x1/sn.ts +2 -0
- package/src/flags/art/1x1/so.ts +2 -0
- package/src/flags/art/1x1/sr.ts +2 -0
- package/src/flags/art/1x1/ss.ts +2 -0
- package/src/flags/art/1x1/st.ts +2 -0
- package/src/flags/art/1x1/sv.ts +2 -0
- package/src/flags/art/1x1/sx.ts +2 -0
- package/src/flags/art/1x1/sy.ts +2 -0
- package/src/flags/art/1x1/sz.ts +2 -0
- package/src/flags/art/1x1/tc.ts +2 -0
- package/src/flags/art/1x1/td.ts +2 -0
- package/src/flags/art/1x1/tf.ts +2 -0
- package/src/flags/art/1x1/tg.ts +2 -0
- package/src/flags/art/1x1/th.ts +2 -0
- package/src/flags/art/1x1/tj.ts +2 -0
- package/src/flags/art/1x1/tk.ts +2 -0
- package/src/flags/art/1x1/tl.ts +2 -0
- package/src/flags/art/1x1/tm.ts +2 -0
- package/src/flags/art/1x1/tn.ts +2 -0
- package/src/flags/art/1x1/to.ts +2 -0
- package/src/flags/art/1x1/tr.ts +2 -0
- package/src/flags/art/1x1/tt.ts +2 -0
- package/src/flags/art/1x1/tv.ts +2 -0
- package/src/flags/art/1x1/tw.ts +2 -0
- package/src/flags/art/1x1/tz.ts +2 -0
- package/src/flags/art/1x1/ua.ts +2 -0
- package/src/flags/art/1x1/ug.ts +2 -0
- package/src/flags/art/1x1/um.ts +2 -0
- package/src/flags/art/1x1/un.ts +2 -0
- package/src/flags/art/1x1/us.ts +2 -0
- package/src/flags/art/1x1/uy.ts +2 -0
- package/src/flags/art/1x1/uz.ts +2 -0
- package/src/flags/art/1x1/va.ts +2 -0
- package/src/flags/art/1x1/vc.ts +2 -0
- package/src/flags/art/1x1/ve.ts +2 -0
- package/src/flags/art/1x1/vg.ts +2 -0
- package/src/flags/art/1x1/vi.ts +2 -0
- package/src/flags/art/1x1/vn.ts +2 -0
- package/src/flags/art/1x1/vu.ts +2 -0
- package/src/flags/art/1x1/wf.ts +2 -0
- package/src/flags/art/1x1/ws.ts +2 -0
- package/src/flags/art/1x1/xk.ts +2 -0
- package/src/flags/art/1x1/xx.ts +2 -0
- package/src/flags/art/1x1/ye.ts +2 -0
- package/src/flags/art/1x1/yt.ts +2 -0
- package/src/flags/art/1x1/za.ts +2 -0
- package/src/flags/art/1x1/zm.ts +2 -0
- package/src/flags/art/1x1/zw.ts +2 -0
- package/src/flags/art/4x3/ad.ts +2 -0
- package/src/flags/art/4x3/ae.ts +2 -0
- package/src/flags/art/4x3/af.ts +2 -0
- package/src/flags/art/4x3/ag.ts +2 -0
- package/src/flags/art/4x3/ai.ts +2 -0
- package/src/flags/art/4x3/al.ts +2 -0
- package/src/flags/art/4x3/am.ts +2 -0
- package/src/flags/art/4x3/ao.ts +2 -0
- package/src/flags/art/4x3/aq.ts +2 -0
- package/src/flags/art/4x3/ar.ts +2 -0
- package/src/flags/art/4x3/arab.ts +2 -0
- package/src/flags/art/4x3/as.ts +2 -0
- package/src/flags/art/4x3/asean.ts +2 -0
- package/src/flags/art/4x3/at.ts +2 -0
- package/src/flags/art/4x3/au.ts +2 -0
- package/src/flags/art/4x3/aw.ts +2 -0
- package/src/flags/art/4x3/ax.ts +2 -0
- package/src/flags/art/4x3/az.ts +2 -0
- package/src/flags/art/4x3/ba.ts +2 -0
- package/src/flags/art/4x3/bb.ts +2 -0
- package/src/flags/art/4x3/bd.ts +2 -0
- package/src/flags/art/4x3/be.ts +2 -0
- package/src/flags/art/4x3/bf.ts +2 -0
- package/src/flags/art/4x3/bg.ts +2 -0
- package/src/flags/art/4x3/bh.ts +2 -0
- package/src/flags/art/4x3/bi.ts +2 -0
- package/src/flags/art/4x3/bj.ts +2 -0
- package/src/flags/art/4x3/bl.ts +2 -0
- package/src/flags/art/4x3/bm.ts +2 -0
- package/src/flags/art/4x3/bn.ts +2 -0
- package/src/flags/art/4x3/bo.ts +2 -0
- package/src/flags/art/4x3/bq.ts +2 -0
- package/src/flags/art/4x3/br.ts +2 -0
- package/src/flags/art/4x3/bs.ts +2 -0
- package/src/flags/art/4x3/bt.ts +2 -0
- package/src/flags/art/4x3/bv.ts +2 -0
- package/src/flags/art/4x3/bw.ts +2 -0
- package/src/flags/art/4x3/by.ts +2 -0
- package/src/flags/art/4x3/bz.ts +2 -0
- package/src/flags/art/4x3/ca.ts +2 -0
- package/src/flags/art/4x3/cc.ts +2 -0
- package/src/flags/art/4x3/cd.ts +2 -0
- package/src/flags/art/4x3/cefta.ts +2 -0
- package/src/flags/art/4x3/cf.ts +2 -0
- package/src/flags/art/4x3/cg.ts +2 -0
- package/src/flags/art/4x3/ch.ts +2 -0
- package/src/flags/art/4x3/ci.ts +2 -0
- package/src/flags/art/4x3/ck.ts +2 -0
- package/src/flags/art/4x3/cl.ts +2 -0
- package/src/flags/art/4x3/cm.ts +2 -0
- package/src/flags/art/4x3/cn.ts +2 -0
- package/src/flags/art/4x3/co.ts +2 -0
- package/src/flags/art/4x3/cp.ts +2 -0
- package/src/flags/art/4x3/cr.ts +2 -0
- package/src/flags/art/4x3/cu.ts +2 -0
- package/src/flags/art/4x3/cv.ts +2 -0
- package/src/flags/art/4x3/cw.ts +2 -0
- package/src/flags/art/4x3/cx.ts +2 -0
- package/src/flags/art/4x3/cy.ts +2 -0
- package/src/flags/art/4x3/cz.ts +2 -0
- package/src/flags/art/4x3/de.ts +2 -0
- package/src/flags/art/4x3/dg.ts +2 -0
- package/src/flags/art/4x3/dj.ts +2 -0
- package/src/flags/art/4x3/dk.ts +2 -0
- package/src/flags/art/4x3/dm.ts +2 -0
- package/src/flags/art/4x3/do.ts +2 -0
- package/src/flags/art/4x3/dz.ts +2 -0
- package/src/flags/art/4x3/eac.ts +2 -0
- package/src/flags/art/4x3/ec.ts +2 -0
- package/src/flags/art/4x3/ee.ts +2 -0
- package/src/flags/art/4x3/eg.ts +2 -0
- package/src/flags/art/4x3/eh.ts +2 -0
- package/src/flags/art/4x3/er.ts +2 -0
- package/src/flags/art/4x3/es-ct.ts +2 -0
- package/src/flags/art/4x3/es-ga.ts +2 -0
- package/src/flags/art/4x3/es-pv.ts +2 -0
- package/src/flags/art/4x3/es.ts +2 -0
- package/src/flags/art/4x3/et.ts +2 -0
- package/src/flags/art/4x3/eu.ts +2 -0
- package/src/flags/art/4x3/fi.ts +2 -0
- package/src/flags/art/4x3/fj.ts +2 -0
- package/src/flags/art/4x3/fk.ts +2 -0
- package/src/flags/art/4x3/fm.ts +2 -0
- package/src/flags/art/4x3/fo.ts +2 -0
- package/src/flags/art/4x3/fr.ts +2 -0
- package/src/flags/art/4x3/ga.ts +2 -0
- package/src/flags/art/4x3/gb-eng.ts +2 -0
- package/src/flags/art/4x3/gb-nir.ts +2 -0
- package/src/flags/art/4x3/gb-sct.ts +2 -0
- package/src/flags/art/4x3/gb-wls.ts +2 -0
- package/src/flags/art/4x3/gb.ts +2 -0
- package/src/flags/art/4x3/gd.ts +2 -0
- package/src/flags/art/4x3/ge.ts +2 -0
- package/src/flags/art/4x3/gf.ts +2 -0
- package/src/flags/art/4x3/gg.ts +2 -0
- package/src/flags/art/4x3/gh.ts +2 -0
- package/src/flags/art/4x3/gi.ts +2 -0
- package/src/flags/art/4x3/gl.ts +2 -0
- package/src/flags/art/4x3/gm.ts +2 -0
- package/src/flags/art/4x3/gn.ts +2 -0
- package/src/flags/art/4x3/gp.ts +2 -0
- package/src/flags/art/4x3/gq.ts +2 -0
- package/src/flags/art/4x3/gr.ts +2 -0
- package/src/flags/art/4x3/gs.ts +2 -0
- package/src/flags/art/4x3/gt.ts +2 -0
- package/src/flags/art/4x3/gu.ts +2 -0
- package/src/flags/art/4x3/gw.ts +2 -0
- package/src/flags/art/4x3/gy.ts +2 -0
- package/src/flags/art/4x3/hk.ts +2 -0
- package/src/flags/art/4x3/hm.ts +2 -0
- package/src/flags/art/4x3/hn.ts +2 -0
- package/src/flags/art/4x3/hr.ts +2 -0
- package/src/flags/art/4x3/ht.ts +2 -0
- package/src/flags/art/4x3/hu.ts +2 -0
- package/src/flags/art/4x3/ic.ts +2 -0
- package/src/flags/art/4x3/id.ts +2 -0
- package/src/flags/art/4x3/ie.ts +2 -0
- package/src/flags/art/4x3/il.ts +2 -0
- package/src/flags/art/4x3/im.ts +2 -0
- package/src/flags/art/4x3/in.ts +2 -0
- package/src/flags/art/4x3/io.ts +2 -0
- package/src/flags/art/4x3/iq.ts +2 -0
- package/src/flags/art/4x3/ir.ts +2 -0
- package/src/flags/art/4x3/is.ts +2 -0
- package/src/flags/art/4x3/it.ts +2 -0
- package/src/flags/art/4x3/je.ts +2 -0
- package/src/flags/art/4x3/jm.ts +2 -0
- package/src/flags/art/4x3/jo.ts +2 -0
- package/src/flags/art/4x3/jp.ts +2 -0
- package/src/flags/art/4x3/ke.ts +2 -0
- package/src/flags/art/4x3/kg.ts +2 -0
- package/src/flags/art/4x3/kh.ts +2 -0
- package/src/flags/art/4x3/ki.ts +2 -0
- package/src/flags/art/4x3/km.ts +2 -0
- package/src/flags/art/4x3/kn.ts +2 -0
- package/src/flags/art/4x3/kp.ts +2 -0
- package/src/flags/art/4x3/kr.ts +2 -0
- package/src/flags/art/4x3/kw.ts +2 -0
- package/src/flags/art/4x3/ky.ts +2 -0
- package/src/flags/art/4x3/kz.ts +2 -0
- package/src/flags/art/4x3/la.ts +2 -0
- package/src/flags/art/4x3/lb.ts +2 -0
- package/src/flags/art/4x3/lc.ts +2 -0
- package/src/flags/art/4x3/li.ts +2 -0
- package/src/flags/art/4x3/lk.ts +2 -0
- package/src/flags/art/4x3/lr.ts +2 -0
- package/src/flags/art/4x3/ls.ts +2 -0
- package/src/flags/art/4x3/lt.ts +2 -0
- package/src/flags/art/4x3/lu.ts +2 -0
- package/src/flags/art/4x3/lv.ts +2 -0
- package/src/flags/art/4x3/ly.ts +2 -0
- package/src/flags/art/4x3/ma.ts +2 -0
- package/src/flags/art/4x3/mc.ts +2 -0
- package/src/flags/art/4x3/md.ts +2 -0
- package/src/flags/art/4x3/me.ts +2 -0
- package/src/flags/art/4x3/mf.ts +2 -0
- package/src/flags/art/4x3/mg.ts +2 -0
- package/src/flags/art/4x3/mh.ts +2 -0
- package/src/flags/art/4x3/mk.ts +2 -0
- package/src/flags/art/4x3/ml.ts +2 -0
- package/src/flags/art/4x3/mm.ts +2 -0
- package/src/flags/art/4x3/mn.ts +2 -0
- package/src/flags/art/4x3/mo.ts +2 -0
- package/src/flags/art/4x3/mp.ts +2 -0
- package/src/flags/art/4x3/mq.ts +2 -0
- package/src/flags/art/4x3/mr.ts +2 -0
- package/src/flags/art/4x3/ms.ts +2 -0
- package/src/flags/art/4x3/mt.ts +2 -0
- package/src/flags/art/4x3/mu.ts +2 -0
- package/src/flags/art/4x3/mv.ts +2 -0
- package/src/flags/art/4x3/mw.ts +2 -0
- package/src/flags/art/4x3/mx.ts +2 -0
- package/src/flags/art/4x3/my.ts +2 -0
- package/src/flags/art/4x3/mz.ts +2 -0
- package/src/flags/art/4x3/na.ts +2 -0
- package/src/flags/art/4x3/nc.ts +2 -0
- package/src/flags/art/4x3/ne.ts +2 -0
- package/src/flags/art/4x3/nf.ts +2 -0
- package/src/flags/art/4x3/ng.ts +2 -0
- package/src/flags/art/4x3/ni.ts +2 -0
- package/src/flags/art/4x3/nl.ts +2 -0
- package/src/flags/art/4x3/no.ts +2 -0
- package/src/flags/art/4x3/np.ts +2 -0
- package/src/flags/art/4x3/nr.ts +2 -0
- package/src/flags/art/4x3/nu.ts +2 -0
- package/src/flags/art/4x3/nz.ts +2 -0
- package/src/flags/art/4x3/om.ts +2 -0
- package/src/flags/art/4x3/pa.ts +2 -0
- package/src/flags/art/4x3/pc.ts +2 -0
- package/src/flags/art/4x3/pe.ts +2 -0
- package/src/flags/art/4x3/pf.ts +2 -0
- package/src/flags/art/4x3/pg.ts +2 -0
- package/src/flags/art/4x3/ph.ts +2 -0
- package/src/flags/art/4x3/pk.ts +2 -0
- package/src/flags/art/4x3/pl.ts +2 -0
- package/src/flags/art/4x3/pm.ts +2 -0
- package/src/flags/art/4x3/pn.ts +2 -0
- package/src/flags/art/4x3/pr.ts +2 -0
- package/src/flags/art/4x3/ps.ts +2 -0
- package/src/flags/art/4x3/pt.ts +2 -0
- package/src/flags/art/4x3/pw.ts +2 -0
- package/src/flags/art/4x3/py.ts +2 -0
- package/src/flags/art/4x3/qa.ts +2 -0
- package/src/flags/art/4x3/re.ts +2 -0
- package/src/flags/art/4x3/ro.ts +2 -0
- package/src/flags/art/4x3/rs.ts +2 -0
- package/src/flags/art/4x3/ru.ts +2 -0
- package/src/flags/art/4x3/rw.ts +2 -0
- package/src/flags/art/4x3/sa.ts +2 -0
- package/src/flags/art/4x3/sb.ts +2 -0
- package/src/flags/art/4x3/sc.ts +2 -0
- package/src/flags/art/4x3/sd.ts +2 -0
- package/src/flags/art/4x3/se.ts +2 -0
- package/src/flags/art/4x3/sg.ts +2 -0
- package/src/flags/art/4x3/sh-ac.ts +2 -0
- package/src/flags/art/4x3/sh-hl.ts +2 -0
- package/src/flags/art/4x3/sh-ta.ts +2 -0
- package/src/flags/art/4x3/sh.ts +2 -0
- package/src/flags/art/4x3/si.ts +2 -0
- package/src/flags/art/4x3/sj.ts +2 -0
- package/src/flags/art/4x3/sk.ts +2 -0
- package/src/flags/art/4x3/sl.ts +2 -0
- package/src/flags/art/4x3/sm.ts +2 -0
- package/src/flags/art/4x3/sn.ts +2 -0
- package/src/flags/art/4x3/so.ts +2 -0
- package/src/flags/art/4x3/sr.ts +2 -0
- package/src/flags/art/4x3/ss.ts +2 -0
- package/src/flags/art/4x3/st.ts +2 -0
- package/src/flags/art/4x3/sv.ts +2 -0
- package/src/flags/art/4x3/sx.ts +2 -0
- package/src/flags/art/4x3/sy.ts +2 -0
- package/src/flags/art/4x3/sz.ts +2 -0
- package/src/flags/art/4x3/tc.ts +2 -0
- package/src/flags/art/4x3/td.ts +2 -0
- package/src/flags/art/4x3/tf.ts +2 -0
- package/src/flags/art/4x3/tg.ts +2 -0
- package/src/flags/art/4x3/th.ts +2 -0
- package/src/flags/art/4x3/tj.ts +2 -0
- package/src/flags/art/4x3/tk.ts +2 -0
- package/src/flags/art/4x3/tl.ts +2 -0
- package/src/flags/art/4x3/tm.ts +2 -0
- package/src/flags/art/4x3/tn.ts +2 -0
- package/src/flags/art/4x3/to.ts +2 -0
- package/src/flags/art/4x3/tr.ts +2 -0
- package/src/flags/art/4x3/tt.ts +2 -0
- package/src/flags/art/4x3/tv.ts +2 -0
- package/src/flags/art/4x3/tw.ts +2 -0
- package/src/flags/art/4x3/tz.ts +2 -0
- package/src/flags/art/4x3/ua.ts +2 -0
- package/src/flags/art/4x3/ug.ts +2 -0
- package/src/flags/art/4x3/um.ts +2 -0
- package/src/flags/art/4x3/un.ts +2 -0
- package/src/flags/art/4x3/us.ts +2 -0
- package/src/flags/art/4x3/uy.ts +2 -0
- package/src/flags/art/4x3/uz.ts +2 -0
- package/src/flags/art/4x3/va.ts +2 -0
- package/src/flags/art/4x3/vc.ts +2 -0
- package/src/flags/art/4x3/ve.ts +2 -0
- package/src/flags/art/4x3/vg.ts +2 -0
- package/src/flags/art/4x3/vi.ts +2 -0
- package/src/flags/art/4x3/vn.ts +2 -0
- package/src/flags/art/4x3/vu.ts +2 -0
- package/src/flags/art/4x3/wf.ts +2 -0
- package/src/flags/art/4x3/ws.ts +2 -0
- package/src/flags/art/4x3/xk.ts +2 -0
- package/src/flags/art/4x3/xx.ts +2 -0
- package/src/flags/art/4x3/ye.ts +2 -0
- package/src/flags/art/4x3/yt.ts +2 -0
- package/src/flags/art/4x3/za.ts +2 -0
- package/src/flags/art/4x3/zm.ts +2 -0
- package/src/flags/art/4x3/zw.ts +2 -0
- package/src/flags/art/index.ts +552 -0
- package/src/flags/flags.test.tsx +140 -0
- package/src/flags/index.ts +7 -0
- package/src/flags/loadFlag.ts +29 -0
- package/src/flags/names.ts +65 -0
- package/src/flow/CLEAN-ROOM.md +110 -0
- package/src/flow/PROVENANCE.md +169 -0
- package/src/flow/README.md +117 -0
- package/src/flow/agents/AgentCreationWizard.tsx +633 -0
- package/src/flow/agents/AgentEditorDialog.tsx +751 -0
- package/src/flow/agents/agents.css +563 -0
- package/src/flow/agents/agents.test.tsx +207 -0
- package/src/flow/agents/index.ts +4 -0
- package/src/flow/agents/parts.tsx +171 -0
- package/src/flow/assistant/AssistantConversation.tsx +388 -0
- package/src/flow/assistant/AssistantVisualBlock.test.tsx +86 -0
- package/src/flow/assistant/AssistantVisualBlock.tsx +75 -0
- package/src/flow/assistant/ConversationShell.test.tsx +202 -0
- package/src/flow/assistant/ConversationShell.tsx +160 -0
- package/src/flow/assistant/LiveCanvasPanel.tsx +52 -0
- package/src/flow/assistant/MarkdownView.tsx +162 -0
- package/src/flow/assistant/ThreadHistory.tsx +156 -0
- package/src/flow/assistant/assistant.css +567 -0
- package/src/flow/assistant/index.ts +10 -0
- package/src/flow/assistant/threadDays.ts +44 -0
- package/src/flow/assistant/useAssistantSession.test.tsx +172 -0
- package/src/flow/assistant/useAssistantSession.ts +457 -0
- package/src/flow/assistant/visual.ts +205 -0
- package/src/flow/catalog/RenderCatalog.tsx +98 -0
- package/src/flow/catalog/catalog.test.tsx +162 -0
- package/src/flow/catalog/icons.ts +116 -0
- package/src/flow/catalog/kindCatalog.ts +175 -0
- package/src/flow/catalog/nodeState.ts +46 -0
- package/src/flow/catalog/palette.ts +116 -0
- package/src/flow/connectors/ConditionalConnector.css +274 -0
- package/src/flow/connectors/ConditionalConnector.tsx +288 -0
- package/src/flow/connectors/ConnectionPreviewLine.tsx +31 -0
- package/src/flow/connectors/ConnectorInsertMenu.tsx +103 -0
- package/src/flow/connectors/connectors.css +2 -0
- package/src/flow/connectors/connectors.test.tsx +218 -0
- package/src/flow/connectors/index.ts +4 -0
- package/src/flow/decision/DecisionNode.tsx +182 -0
- package/src/flow/decision/decision.css +1 -0
- package/src/flow/decision/index.ts +3 -0
- package/src/flow/decision/types.ts +60 -0
- package/src/flow/dialogs/DefinitionDialogs.test.tsx +177 -0
- package/src/flow/dialogs/DefinitionExportDialog.tsx +234 -0
- package/src/flow/dialogs/DefinitionImportDialog.tsx +303 -0
- package/src/flow/dialogs/FlowSettingsDialog.test.tsx +95 -0
- package/src/flow/dialogs/FlowSettingsDialog.tsx +242 -0
- package/src/flow/dialogs/NodeConfigDialog.test.tsx +151 -0
- package/src/flow/dialogs/NodeConfigDialog.tsx +208 -0
- package/src/flow/dialogs/dialogs.css +134 -0
- package/src/flow/dialogs/index.ts +5 -0
- package/src/flow/editor/AutosaveController.tsx +25 -0
- package/src/flow/editor/CanvasCommandBar.tsx +315 -0
- package/src/flow/editor/CanvasContextMenus.tsx +287 -0
- package/src/flow/editor/FlowEditor.test.tsx +282 -0
- package/src/flow/editor/FlowEditor.tsx +1214 -0
- package/src/flow/editor/FlowOutline.tsx +196 -0
- package/src/flow/editor/FlowPreview.tsx +149 -0
- package/src/flow/editor/FlowSwitcherBar.tsx +141 -0
- package/src/flow/editor/NodePalette.tsx +447 -0
- package/src/flow/editor/RunControls.tsx +85 -0
- package/src/flow/editor/SaveStatus.tsx +45 -0
- package/src/flow/editor/editor.css +573 -0
- package/src/flow/editor/editorTools.ts +135 -0
- package/src/flow/editor/focusOut.ts +23 -0
- package/src/flow/editor/index.ts +16 -0
- package/src/flow/editor/keyMap.ts +93 -0
- package/src/flow/editor/nodeBridge.tsx +66 -0
- package/src/flow/editor/parts.test.tsx +519 -0
- package/src/flow/editor/useEditorShortcuts.ts +122 -0
- package/src/flow/editor/useSelectionArrange.ts +135 -0
- package/src/flow/expressions/ComputeInsertPanel.tsx +123 -0
- package/src/flow/expressions/ComputeNodeForm.tsx +291 -0
- package/src/flow/expressions/ComputeTrial.tsx +105 -0
- package/src/flow/expressions/ExpressionBuilder.test.tsx +161 -0
- package/src/flow/expressions/ExpressionBuilder.tsx +71 -0
- package/src/flow/expressions/ExpressionField.tsx +157 -0
- package/src/flow/expressions/RuleEditor.tsx +645 -0
- package/src/flow/expressions/RuleNodeForm.tsx +165 -0
- package/src/flow/expressions/SimulationNodeForm.tsx +175 -0
- package/src/flow/expressions/TraceTree.test.tsx +120 -0
- package/src/flow/expressions/TraceTree.tsx +210 -0
- package/src/flow/expressions/builder/ItemList.tsx +72 -0
- package/src/flow/expressions/builder/leaves.tsx +94 -0
- package/src/flow/expressions/builder/shared.tsx +55 -0
- package/src/flow/expressions/builder/tree.tsx +221 -0
- package/src/flow/expressions/catalogContext.tsx +21 -0
- package/src/flow/expressions/computeDraft.ts +105 -0
- package/src/flow/expressions/exampleCatalog.ts +42 -0
- package/src/flow/expressions/expressions.css +520 -0
- package/src/flow/expressions/forms.test.tsx +325 -0
- package/src/flow/expressions/index.ts +15 -0
- package/src/flow/expressions/labels.ts +204 -0
- package/src/flow/expressions/model.ts +194 -0
- package/src/flow/expressions/ruleActions.ts +164 -0
- package/src/flow/expressions/ruleCondition.ts +98 -0
- package/src/flow/expressions/trace.ts +98 -0
- package/src/flow/forms/AgentNodeForm.css +29 -0
- package/src/flow/forms/AgentNodeForm.test.tsx +66 -0
- package/src/flow/forms/AgentNodeForm.tsx +177 -0
- package/src/flow/forms/DataSourceNodeForm.test.tsx +121 -0
- package/src/flow/forms/DataSourceNodeForm.tsx +519 -0
- package/src/flow/forms/DecisionNodeForm.test.tsx +72 -0
- package/src/flow/forms/DecisionNodeForm.tsx +302 -0
- package/src/flow/forms/GroupNodeForm.css +72 -0
- package/src/flow/forms/GroupNodeForm.test.tsx +55 -0
- package/src/flow/forms/GroupNodeForm.tsx +148 -0
- package/src/flow/forms/NewForms.css +256 -0
- package/src/flow/forms/NodeFormFooter.tsx +44 -0
- package/src/flow/forms/OutputSchemaBuilder.test.tsx +83 -0
- package/src/flow/forms/OutputSchemaBuilder.tsx +325 -0
- package/src/flow/forms/ReportOutputNodeForm.test.tsx +63 -0
- package/src/flow/forms/ReportOutputNodeForm.tsx +180 -0
- package/src/flow/forms/SchemaConfigForm.css +7 -0
- package/src/flow/forms/SchemaConfigForm.test.tsx +74 -0
- package/src/flow/forms/SchemaConfigForm.tsx +214 -0
- package/src/flow/forms/StartNodeForm.css +29 -0
- package/src/flow/forms/StartNodeForm.test.tsx +66 -0
- package/src/flow/forms/StartNodeForm.tsx +88 -0
- package/src/flow/forms/ToolServerListField.css +58 -0
- package/src/flow/forms/ToolServerListField.test.tsx +73 -0
- package/src/flow/forms/ToolServerListField.tsx +242 -0
- package/src/flow/forms/VariableListEditor.css +82 -0
- package/src/flow/forms/VariableListEditor.test.tsx +79 -0
- package/src/flow/forms/VariableListEditor.tsx +280 -0
- package/src/flow/forms/forms-shared.css +53 -0
- package/src/flow/forms/forms.css +9 -0
- package/src/flow/forms/index.ts +12 -0
- package/src/flow/forms/nameListModel.ts +61 -0
- package/src/flow/geometry/arrange.ts +74 -0
- package/src/flow/geometry/curve.ts +58 -0
- package/src/flow/geometry/geometry.test.ts +97 -0
- package/src/flow/geometry/guides.ts +49 -0
- package/src/flow/geometry/rect.ts +101 -0
- package/src/flow/geometry/viewport.ts +70 -0
- package/src/flow/index.ts +58 -0
- package/src/flow/internal/Announcer.tsx +63 -0
- package/src/flow/internal/DockedPanel.tsx +95 -0
- package/src/flow/internal/SectionedModal.tsx +117 -0
- package/src/flow/internal/builtInLabels.test.ts +16 -0
- package/src/flow/internal/confirm.tsx +73 -0
- package/src/flow/internal/format.ts +47 -0
- package/src/flow/internal/i18n.test.tsx +109 -0
- package/src/flow/internal/ids.ts +9 -0
- package/src/flow/internal/internal.css +152 -0
- package/src/flow/internal/labels.ts +101 -0
- package/src/flow/internal/messageFormat.ts +102 -0
- package/src/flow/internal/useControllable.ts +17 -0
- package/src/flow/layout/autoLayout.test.ts +56 -0
- package/src/flow/layout/autoLayout.ts +93 -0
- package/src/flow/layout/chainLayout.ts +66 -0
- package/src/flow/model/graph.ts +123 -0
- package/src/flow/model/types.ts +83 -0
- package/src/flow/nodes/AgentIdentity.tsx +145 -0
- package/src/flow/nodes/AgentNode.tsx +152 -0
- package/src/flow/nodes/AlignmentGuides.tsx +108 -0
- package/src/flow/nodes/ConnectionPorts.tsx +277 -0
- package/src/flow/nodes/DataSourceNode.tsx +179 -0
- package/src/flow/nodes/GenericNode.tsx +114 -0
- package/src/flow/nodes/GraphNodeCard.css +314 -0
- package/src/flow/nodes/GraphNodeCard.test.tsx +117 -0
- package/src/flow/nodes/GraphNodeCard.tsx +329 -0
- package/src/flow/nodes/GroupNode.tsx +231 -0
- package/src/flow/nodes/NodeRunIndicator.tsx +139 -0
- package/src/flow/nodes/NoteNode.tsx +134 -0
- package/src/flow/nodes/RuleNode.tsx +162 -0
- package/src/flow/nodes/flow-nodes.css +687 -0
- package/src/flow/nodes/groupLayout.ts +66 -0
- package/src/flow/nodes/index.ts +18 -0
- package/src/flow/nodes/nodeChrome.tsx +113 -0
- package/src/flow/nodes/nodes.css +3 -0
- package/src/flow/nodes/nodes.test.tsx +529 -0
- package/src/flow/nodes/ports.ts +127 -0
- package/src/flow/nodes/registry.tsx +262 -0
- package/src/flow/nodes/sourceMarks.tsx +52 -0
- package/src/flow/nodes/types.ts +85 -0
- package/src/flow/provenance/EditionCompare.tsx +292 -0
- package/src/flow/provenance/NumberTrace.tsx +208 -0
- package/src/flow/provenance/ProvenanceCertificate.tsx +263 -0
- package/src/flow/provenance/ProvenanceFilters.tsx +137 -0
- package/src/flow/provenance/ProvenanceGraph.css +1156 -0
- package/src/flow/provenance/ProvenanceGraph.test.tsx +361 -0
- package/src/flow/provenance/ProvenanceGraph.tsx +725 -0
- package/src/flow/provenance/ProvenanceInspector.tsx +201 -0
- package/src/flow/provenance/ProvenanceLegend.tsx +66 -0
- package/src/flow/provenance/ProvenanceNode.tsx +171 -0
- package/src/flow/provenance/ProvenanceShellParts.test.tsx +130 -0
- package/src/flow/provenance/ProvenanceTimeline.tsx +342 -0
- package/src/flow/provenance/ProvenanceTree.tsx +143 -0
- package/src/flow/provenance/ProvenanceViews.css +828 -0
- package/src/flow/provenance/ProvenanceViews.test.tsx +307 -0
- package/src/flow/provenance/index.ts +14 -0
- package/src/flow/provenance/labels.ts +418 -0
- package/src/flow/provenance/model.ts +381 -0
- package/src/flow/provenance/proofTypes.ts +93 -0
- package/src/flow/provenance/provenance.css +3 -0
- package/src/flow/report/ClaimTitle.tsx +15 -0
- package/src/flow/report/ProvenanceTag.test.tsx +37 -0
- package/src/flow/report/ProvenanceTag.tsx +58 -0
- package/src/flow/report/ReportView.test.tsx +59 -0
- package/src/flow/report/ReportView.tsx +359 -0
- package/src/flow/report/index.ts +4 -0
- package/src/flow/report/report.css +267 -0
- package/src/flow/run/ExecutionTimeline.tsx +478 -0
- package/src/flow/run/NumberInput.tsx +59 -0
- package/src/flow/run/RunDrawer.tsx +485 -0
- package/src/flow/run/RunInputDialog.tsx +149 -0
- package/src/flow/run/RunPanel.tsx +136 -0
- package/src/flow/run/RunPreviewPanel.tsx +269 -0
- package/src/flow/run/RunReplayDialog.tsx +278 -0
- package/src/flow/run/RunRewindDialog.tsx +197 -0
- package/src/flow/run/RunStatusMark.tsx +79 -0
- package/src/flow/run/RunTimePanel.test.tsx +55 -0
- package/src/flow/run/RunTimePanel.tsx +143 -0
- package/src/flow/run/RunViews.tsx +170 -0
- package/src/flow/run/ShortId.tsx +15 -0
- package/src/flow/run/VariableInspector.tsx +198 -0
- package/src/flow/run/VersionHistoryPanel.tsx +178 -0
- package/src/flow/run/execution.ts +187 -0
- package/src/flow/run/index.ts +18 -0
- package/src/flow/run/lineage.ts +123 -0
- package/src/flow/run/rewindPlan.ts +79 -0
- package/src/flow/run/run.css +749 -0
- package/src/flow/run/run.test.tsx +533 -0
- package/src/flow/run/runData.ts +124 -0
- package/src/flow/run/types.ts +53 -0
- package/src/flow/state/dialogStack.tsx +90 -0
- package/src/flow/state/editorState.test.tsx +110 -0
- package/src/flow/state/editorState.tsx +296 -0
- package/src/flow/state/graphEdits.ts +107 -0
- package/src/flow/state/store.ts +67 -0
- package/src/flow/steps/AddStepPicker.tsx +108 -0
- package/src/flow/steps/FlowSidePanel.tsx +318 -0
- package/src/flow/steps/IssueBar.tsx +58 -0
- package/src/flow/steps/ShapeChip.tsx +41 -0
- package/src/flow/steps/StepCard.tsx +139 -0
- package/src/flow/steps/StepListView.tsx +152 -0
- package/src/flow/steps/StepPalette.tsx +194 -0
- package/src/flow/steps/StepsContext.tsx +70 -0
- package/src/flow/steps/index.ts +15 -0
- package/src/flow/steps/researchSteps.ts +269 -0
- package/src/flow/steps/shapes.ts +46 -0
- package/src/flow/steps/stepLabels.ts +160 -0
- package/src/flow/steps/stepTools.ts +37 -0
- package/src/flow/steps/steps.css +962 -0
- package/src/flow/steps/steps.test.tsx +351 -0
- package/src/flow/steps/wiring.ts +123 -0
- package/src/flow/styles.css +23 -0
- package/src/flow/surface/CanvasSurface.test.tsx +148 -0
- package/src/flow/surface/CanvasSurface.tsx +674 -0
- package/src/flow/surface/OverviewMap.tsx +50 -0
- package/src/flow/surface/SurfaceContext.tsx +28 -0
- package/src/flow/surface/surface.css +200 -0
- package/src/flow/surface/types.ts +97 -0
- package/src/flow/surface/useElementSize.ts +29 -0
- package/src/flow/surface/useNodeMeasurement.ts +71 -0
- package/src/flow/toolbar/CanvasNodeSearch.tsx +110 -0
- package/src/flow/toolbar/CanvasToolbar.test.tsx +101 -0
- package/src/flow/toolbar/CanvasToolbar.tsx +114 -0
- package/src/flow/toolbar/canvasTools.ts +114 -0
- package/src/flow/toolbar/dockItems.test.tsx +47 -0
- package/src/flow/toolbar/dockItems.tsx +51 -0
- package/src/flow/toolbar/index.ts +5 -0
- package/src/flow/toolbar/toolbar.css +217 -0
- package/src/groups/auth-brand.css +18 -0
- package/src/groups/auth-brand.ts +17 -0
- package/src/groups/charts-geo.css +6 -0
- package/src/groups/charts-geo.ts +98 -0
- package/src/groups/data-a.css +13 -0
- package/src/groups/data-a.ts +14 -0
- package/src/groups/data-b.css +11 -0
- package/src/groups/data-b.ts +11 -0
- package/src/groups/forms-a.css +17 -0
- package/src/groups/forms-a.ts +15 -0
- package/src/groups/forms-b.css +14 -0
- package/src/groups/forms-b.ts +13 -0
- package/src/groups/overlays-nav.css +15 -0
- package/src/groups/overlays-nav.ts +16 -0
- package/src/groups/platform.css +7 -0
- package/src/groups/platform.ts +101 -0
- package/src/groups/shell.css +10 -0
- package/src/groups/shell.ts +10 -0
- package/src/groups/showcase.css +8 -0
- package/src/groups/showcase.ts +9 -0
- package/src/index.ts +68 -0
- package/src/internal/ThemeScope.tsx +28 -0
- package/src/internal/VisuallyHidden.tsx +10 -0
- package/src/internal/cx.ts +4 -0
- package/src/internal/data-a/announce.ts +38 -0
- package/src/internal/data-a/clipboard.ts +11 -0
- package/src/internal/data-b/signed.ts +34 -0
- package/src/internal/data-b/tween.ts +67 -0
- package/src/internal/dev.ts +12 -0
- package/src/internal/dom.ts +42 -0
- package/src/internal/forms-a/LiveNote.tsx +18 -0
- package/src/internal/forms-a/SearchInput.css +125 -0
- package/src/internal/forms-a/SearchInput.tsx +52 -0
- package/src/internal/forms-a/marks.tsx +18 -0
- package/src/internal/forms-a/shared.css +25 -0
- package/src/internal/forms-b/digits.ts +33 -0
- package/src/internal/forms-b/forms-b.css +341 -0
- package/src/internal/forms-b/parts.tsx +151 -0
- package/src/internal/haptics.ts +77 -0
- package/src/internal/icuCatalogue.ts +60 -0
- package/src/internal/inert.ts +15 -0
- package/src/internal/media.ts +35 -0
- package/src/internal/messages/auth-brand.ts +161 -0
- package/src/internal/messages/charts-geo.ts +289 -0
- package/src/internal/messages/core-es.ts +111 -0
- package/src/internal/messages/data-a.ts +199 -0
- package/src/internal/messages/data-b.ts +99 -0
- package/src/internal/messages/forms-a.ts +309 -0
- package/src/internal/messages/forms-b.ts +293 -0
- package/src/internal/messages/overlays-nav.ts +367 -0
- package/src/internal/messages/platform.ts +63 -0
- package/src/internal/messages/plural.ts +24 -0
- package/src/internal/messages/shell.ts +144 -0
- package/src/internal/messages/showcase.ts +12 -0
- package/src/internal/messages.ts +386 -0
- package/src/internal/overlays-nav/fuzzy.ts +115 -0
- package/src/internal/overlays-nav/hold.ts +53 -0
- package/src/internal/overlays-nav/recent.ts +73 -0
- package/src/internal/overlays-nav/state.ts +54 -0
- package/src/internal/platform/touchTrack.ts +49 -0
- package/src/internal/provider.tsx +64 -0
- package/src/internal/speech.ts +24 -0
- package/src/internal/theme.test.tsx +166 -0
- package/src/internal/theme.tsx +181 -0
- package/src/internal/types.ts +4 -0
- package/src/internal/variants.test.ts +14 -0
- package/src/internal/variants.ts +48 -0
- package/src/native-states.css +364 -0
- package/src/styles.css +59 -0
- package/src/utilities/api-error-model/apiErrors.test.ts +74 -0
- package/src/utilities/api-error-model/apiErrors.ts +192 -0
- package/src/utilities/entity-list-loader/useEntityListLoader.test.tsx +72 -0
- package/src/utilities/entity-list-loader/useEntityListLoader.ts +107 -0
- package/src/utilities/formatters/formatters.locales.test.ts +30 -0
- package/src/utilities/formatters/formatters.test.tsx +86 -0
- package/src/utilities/formatters/formatters.ts +190 -0
- package/src/utilities/haptics/haptics.test.tsx +96 -0
- package/src/utilities/haptics/haptics.tsx +79 -0
- package/src/utilities/i18n-adapter/I18nAdapter.test.tsx +70 -0
- package/src/utilities/i18n-adapter/I18nAdapter.tsx +136 -0
- package/src/utilities/i18n-adapter/icu.numeric.test.ts +39 -0
- package/src/utilities/i18n-adapter/icu.ts +207 -0
- package/src/utilities/legacy-alias-map/LEGACY-ALIASES.md +65 -0
- package/src/utilities/legacy-alias-map/legacy-alias-map.test.ts +57 -0
- package/src/utilities/motion-foundation/motion.test.tsx +76 -0
- package/src/utilities/motion-foundation/motion.tsx +119 -0
- package/src/utilities/router-adapter/Routing.test.tsx +68 -0
- package/src/utilities/router-adapter/Routing.tsx +149 -0
- package/src/utilities/view-transition/animatedChange.test.ts +72 -0
- package/src/utilities/view-transition/animatedChange.ts +90 -0
- package/dist/src-Ds9ArSaP.js.map +0 -1
|
@@ -0,0 +1,1214 @@
|
|
|
1
|
+
// FlowEditor: the editable DAG canvas of an analysis. It owns one editor
|
|
2
|
+
// store per mount (FlowEditorState), draws the graph on CanvasSurface through
|
|
3
|
+
// the node and connector groups (nodeBridge) and research steps (steps/), and
|
|
4
|
+
// wires the step palette, the four ways to add a step (the "+" under a step,
|
|
5
|
+
// the "+" on a link, a palette drag, the A key and dock item), typed wiring
|
|
6
|
+
// checks, the side panel (flow summary or step settings), the list view (the
|
|
7
|
+
// keyboard view of the canvas), shortcuts, menus, dialogs and run views.
|
|
8
|
+
// Graph changes are reported debounced (onGraphChange) and immediately per
|
|
9
|
+
// commit (onGraphCommit, used by AutosaveController).
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
createContext,
|
|
13
|
+
useCallback,
|
|
14
|
+
useContext,
|
|
15
|
+
useEffect,
|
|
16
|
+
useMemo,
|
|
17
|
+
useRef,
|
|
18
|
+
useState,
|
|
19
|
+
type DragEvent,
|
|
20
|
+
type KeyboardEvent,
|
|
21
|
+
type ReactNode,
|
|
22
|
+
} from 'react'
|
|
23
|
+
import { Button, Drawer, useMediaQuery } from '../../index'
|
|
24
|
+
import { Plus } from 'lucide-react'
|
|
25
|
+
import { nodeKindCatalog } from '../catalog/kindCatalog'
|
|
26
|
+
import { useRenderCatalog } from '../catalog/RenderCatalog'
|
|
27
|
+
import { absoluteRect } from '../geometry/rect'
|
|
28
|
+
import { AnnouncerProvider, useAnnounce } from '../internal/Announcer'
|
|
29
|
+
import { ConfirmProvider } from '../internal/confirm'
|
|
30
|
+
import { createId } from '../internal/ids'
|
|
31
|
+
import { defineLabels, fill, useFlowLocale, useLabels } from '../internal/labels'
|
|
32
|
+
import { autoLayout, rankDirectionOf } from '../layout/autoLayout'
|
|
33
|
+
import { ancestorsOf } from '../model/graph'
|
|
34
|
+
import type { FlowConnector, FlowGraph, FlowNode, Point, Viewport } from '../model/types'
|
|
35
|
+
import { useAlignmentGuides } from '../nodes/AlignmentGuides'
|
|
36
|
+
import { fitGroupToMembers } from '../nodes/groupLayout'
|
|
37
|
+
import type { FlowNodeComponent, FlowReferenceData, StoredRule } from '../nodes/types'
|
|
38
|
+
import { DialogStackProvider, useActiveDialog, useDialogStack, type AgentEditorPayload, type NodeConfigPayload } from '../state/dialogStack'
|
|
39
|
+
import {
|
|
40
|
+
createFlowEditorStore,
|
|
41
|
+
FlowEditorStateProvider,
|
|
42
|
+
useFlowEditorState,
|
|
43
|
+
useFlowEditorStore,
|
|
44
|
+
type FlowEditorStore,
|
|
45
|
+
} from '../state/editorState'
|
|
46
|
+
import { CanvasSurface } from '../surface/CanvasSurface'
|
|
47
|
+
import type { CanvasApi, PortRef, SurfaceNode } from '../surface/types'
|
|
48
|
+
import { CanvasNodeSearch } from '../toolbar/CanvasNodeSearch'
|
|
49
|
+
import { CanvasToolbar } from '../toolbar/CanvasToolbar'
|
|
50
|
+
import type { CanvasToolItem } from '../toolbar/canvasTools'
|
|
51
|
+
import { AddStepPicker } from '../steps/AddStepPicker'
|
|
52
|
+
import { FlowSidePanel, type FlowFacts, type OutputPreview } from '../steps/FlowSidePanel'
|
|
53
|
+
import { IssueBar } from '../steps/IssueBar'
|
|
54
|
+
import { researchStepCatalog, specOfNode, STEP_KIND, type ReadyStep, type StepCatalog } from '../steps/researchSteps'
|
|
55
|
+
import type { DataShape } from '../steps/shapes'
|
|
56
|
+
import { alongEdge, STEP_CARD_SIZE, StepCard } from '../steps/StepCard'
|
|
57
|
+
import { StepListView } from '../steps/StepListView'
|
|
58
|
+
import { StepPalette, STEP_MEDIA_TYPE, stepOfDrag, type StepPaletteProps } from '../steps/StepPalette'
|
|
59
|
+
import { StepsProvider, useReadyCatalog } from '../steps/StepsContext'
|
|
60
|
+
import { stepEditorWords } from '../steps/stepLabels'
|
|
61
|
+
import { stepToolItems } from '../steps/stepTools'
|
|
62
|
+
import { givenShape, inputIndex, linkAfter, linkThrough, stepNode, stepsAccepting, swapNeighbours, wiringIssues, type WiringIssue } from '../steps/wiring'
|
|
63
|
+
import { NodeConfigDialog, type NodeConfigDialogProps } from '../dialogs/NodeConfigDialog'
|
|
64
|
+
import { RunViews, type RunViewsProps } from '../run/RunViews'
|
|
65
|
+
import { CanvasBackgroundMenu, isContextMenuKey, NodeContextMenu, SelectionContextMenu } from './CanvasContextMenus'
|
|
66
|
+
import type { LayoutCycle } from './editorTools'
|
|
67
|
+
import { focusAfter } from './focusOut'
|
|
68
|
+
import { anchorFor, componentForKind, connectionAllowed, guideOverlay, nodeTitle, renderConnectorParts, sizeForNode, splitConnectorThrough } from './nodeBridge'
|
|
69
|
+
import { PALETTE_MEDIA_TYPE, type PalettePayload } from './NodePalette'
|
|
70
|
+
import { flowReadingOrder } from './FlowPreview'
|
|
71
|
+
import { useEditorShortcuts } from './useEditorShortcuts'
|
|
72
|
+
import { useSelectionArrange } from './useSelectionArrange'
|
|
73
|
+
|
|
74
|
+
export interface FlowEditorLabels {
|
|
75
|
+
canvas: string
|
|
76
|
+
roleDescription: string
|
|
77
|
+
tools: string
|
|
78
|
+
outline: string
|
|
79
|
+
palette: string
|
|
80
|
+
openPalette: string
|
|
81
|
+
aligned: string
|
|
82
|
+
arranged: string
|
|
83
|
+
canConnect: string
|
|
84
|
+
cannotConnect: string
|
|
85
|
+
group: string
|
|
86
|
+
noteText: string
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const flowEditorLabels = defineLabels<FlowEditorLabels>('FlowEditor', {
|
|
90
|
+
en: {
|
|
91
|
+
canvas: 'Flow canvas',
|
|
92
|
+
roleDescription: 'canvas',
|
|
93
|
+
tools: 'Canvas tools',
|
|
94
|
+
outline: 'Flow steps',
|
|
95
|
+
palette: 'Steps to add',
|
|
96
|
+
openPalette: 'Show steps',
|
|
97
|
+
aligned: '{count, plural, one {# node} other {# nodes}} arranged',
|
|
98
|
+
arranged: '{count, plural, one {# node} other {# nodes}} grouped',
|
|
99
|
+
canConnect: '{name}: can connect',
|
|
100
|
+
cannotConnect: '{name}: cannot connect',
|
|
101
|
+
group: 'Group',
|
|
102
|
+
noteText: '',
|
|
103
|
+
},
|
|
104
|
+
'pt-BR': {
|
|
105
|
+
canvas: 'Canvas do fluxo',
|
|
106
|
+
roleDescription: 'canvas',
|
|
107
|
+
tools: 'Ferramentas do canvas',
|
|
108
|
+
outline: 'Etapas do fluxo',
|
|
109
|
+
palette: 'Etapas para adicionar',
|
|
110
|
+
openPalette: 'Mostrar passos',
|
|
111
|
+
aligned: '{count, plural, one {# nó organizado} other {# nós organizados}}',
|
|
112
|
+
arranged: '{count, plural, one {# nó agrupado} other {# nós agrupados}}',
|
|
113
|
+
canConnect: '{name}: pode conectar',
|
|
114
|
+
cannotConnect: '{name}: não pode conectar',
|
|
115
|
+
group: 'Grupo',
|
|
116
|
+
noteText: '',
|
|
117
|
+
},
|
|
118
|
+
es: {
|
|
119
|
+
canvas: 'Lienzo del flujo',
|
|
120
|
+
roleDescription: 'lienzo',
|
|
121
|
+
tools: 'Herramientas del lienzo',
|
|
122
|
+
outline: 'Pasos del flujo',
|
|
123
|
+
palette: 'Pasos para añadir',
|
|
124
|
+
openPalette: 'Mostrar pasos',
|
|
125
|
+
aligned: '{count, plural, one {# nodo organizado} other {# nodos organizados}}',
|
|
126
|
+
arranged: '{count, plural, one {# nodo agrupado} other {# nodos agrupados}}',
|
|
127
|
+
canConnect: '{name}: se puede conectar',
|
|
128
|
+
cannotConnect: '{name}: no se puede conectar',
|
|
129
|
+
group: 'Grupo',
|
|
130
|
+
noteText: '',
|
|
131
|
+
},
|
|
132
|
+
})
|
|
133
|
+
export const defaultFlowEditorLabels = flowEditorLabels.bundles.en
|
|
134
|
+
|
|
135
|
+
// ---- provider -------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
export interface FlowEditorBootstrap {
|
|
138
|
+
graph?: FlowGraph | null
|
|
139
|
+
reference?: FlowReferenceData
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface ProviderValue {
|
|
143
|
+
data: FlowEditorBootstrap | null
|
|
144
|
+
status: 'idle' | 'loading' | 'ready' | 'error'
|
|
145
|
+
error: unknown
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const ProviderContext = createContext<ProviderValue | null>(null)
|
|
149
|
+
|
|
150
|
+
export interface FlowEditorProviderProps {
|
|
151
|
+
flowId?: string
|
|
152
|
+
/** Loads the flow and its reference data from the host backend. */
|
|
153
|
+
load?: (flowId: string) => Promise<FlowEditorBootstrap>
|
|
154
|
+
onLoadError?: (error: unknown) => void
|
|
155
|
+
children: ReactNode
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** Optional context that loads a flow and its reference data by id. */
|
|
159
|
+
export function FlowEditorProvider({ flowId, load, onLoadError, children }: FlowEditorProviderProps) {
|
|
160
|
+
const [value, setValue] = useState<ProviderValue>({ data: null, status: 'idle', error: null })
|
|
161
|
+
const report = useRef(onLoadError)
|
|
162
|
+
report.current = onLoadError
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
if (!flowId || !load) return
|
|
165
|
+
let live = true
|
|
166
|
+
setValue({ data: null, status: 'loading', error: null })
|
|
167
|
+
load(flowId).then(
|
|
168
|
+
(data) => live && setValue({ data, status: 'ready', error: null }),
|
|
169
|
+
(error: unknown) => {
|
|
170
|
+
if (!live) return
|
|
171
|
+
setValue({ data: null, status: 'error', error })
|
|
172
|
+
report.current?.(error)
|
|
173
|
+
},
|
|
174
|
+
)
|
|
175
|
+
return () => {
|
|
176
|
+
live = false
|
|
177
|
+
}
|
|
178
|
+
}, [flowId, load])
|
|
179
|
+
return <ProviderContext.Provider value={value}>{children}</ProviderContext.Provider>
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function useFlowEditorBootstrap(): ProviderValue | null {
|
|
183
|
+
return useContext(ProviderContext)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ---- editor ---------------------------------------------------------------
|
|
187
|
+
|
|
188
|
+
export interface FlowEditorProps {
|
|
189
|
+
flowId?: string
|
|
190
|
+
/** Graph hydrated once on mount. */
|
|
191
|
+
initialGraph?: FlowGraph | null
|
|
192
|
+
reference?: FlowReferenceData
|
|
193
|
+
/** Debounced graph report; also flushed when the page is hidden or unloaded. */
|
|
194
|
+
onGraphChange?: (graph: FlowGraph) => void
|
|
195
|
+
/** Every committed change, undebounced (AutosaveController). */
|
|
196
|
+
onGraphCommit?: (graph: FlowGraph) => void
|
|
197
|
+
debounceMs?: number
|
|
198
|
+
onToggleRule?: (rule: StoredRule) => void
|
|
199
|
+
extraNodeKinds?: Record<string, FlowNodeComponent>
|
|
200
|
+
/** Replaces the built-in node configuration dialog. */
|
|
201
|
+
renderNodeEditor?: (ctx: { payload: NodeConfigPayload; save: (config: Record<string, unknown>) => void; close: () => void }) => ReactNode
|
|
202
|
+
/** Agent editor (host-supplied; the dialog-stack payload tells create or edit). */
|
|
203
|
+
renderAgentEditor?: (ctx: { payload: AgentEditorPayload; close: () => void }) => ReactNode
|
|
204
|
+
isCreatingAgent?: boolean
|
|
205
|
+
onCancelCreateAgent?: () => void
|
|
206
|
+
/** Props for the built-in node configuration dialog (data sources, loaders …). */
|
|
207
|
+
nodeEditorProps?: Omit<NodeConfigDialogProps, 'onSave'>
|
|
208
|
+
/** Host dock: receives the tool items; the built-in bottom toolbar otherwise. */
|
|
209
|
+
renderTools?: (items: CanvasToolItem[]) => ReactNode
|
|
210
|
+
/** Step palette props; `false` hides the palette. */
|
|
211
|
+
palette?: Pick<StepPaletteProps, 'className'> | false
|
|
212
|
+
/** Research steps and their shelves (default: the built-in research verbs). */
|
|
213
|
+
steps?: StepCatalog
|
|
214
|
+
/** False when the project allows no agents: AI steps are unavailable. */
|
|
215
|
+
agentsAllowed?: boolean
|
|
216
|
+
/** Start in the list view instead of the canvas. */
|
|
217
|
+
defaultListView?: boolean
|
|
218
|
+
/** `false` hides the side panel (flow summary / step settings). */
|
|
219
|
+
sidePanel?: boolean
|
|
220
|
+
/** Facts the summary shows next to what the editor counts. */
|
|
221
|
+
flowFacts?: FlowFacts
|
|
222
|
+
onRunFlow?: () => void
|
|
223
|
+
/** Called after "validate flow" with the wiring issues found. */
|
|
224
|
+
onValidate?: (issues: readonly WiringIssue[]) => void
|
|
225
|
+
onTestStep?: (nodeId: string) => void
|
|
226
|
+
/** Problems the host found in steps' settings (e.g. the API's validation), by node id, then field key ('' for the whole configuration). */
|
|
227
|
+
stepProblems?: ReadonlyMap<string, Record<string, string>>
|
|
228
|
+
/** A few rows of a step's output for the side panel. */
|
|
229
|
+
outputPreview?: (nodeId: string) => OutputPreview | null
|
|
230
|
+
/** Horizontal layouts read left to right even in RTL locales. */
|
|
231
|
+
keepLtrLayout?: boolean
|
|
232
|
+
locked?: boolean
|
|
233
|
+
singleKeyShortcuts?: boolean
|
|
234
|
+
historyLimit?: number
|
|
235
|
+
/** Run views (panel and drawer); shown when a loader is given. */
|
|
236
|
+
runs?: Omit<RunViewsProps, 'flowId'>
|
|
237
|
+
/** Existing store (hosts that drive runs or tests); one is created otherwise. */
|
|
238
|
+
store?: FlowEditorStore
|
|
239
|
+
labels?: Partial<FlowEditorLabels>
|
|
240
|
+
className?: string
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function graphOf(store: FlowEditorStore, viewport: Viewport): FlowGraph {
|
|
244
|
+
const s = store.getState()
|
|
245
|
+
return {
|
|
246
|
+
nodes: s.nodes.map(({ selected: _s, measured: _m, ...n }) => n),
|
|
247
|
+
connectors: s.connectors.map(({ selected: _s, ...c }) => c),
|
|
248
|
+
viewport,
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export function FlowEditor(props: FlowEditorProps) {
|
|
253
|
+
const boot = useFlowEditorBootstrap()
|
|
254
|
+
const [store] = useState(
|
|
255
|
+
() =>
|
|
256
|
+
props.store ??
|
|
257
|
+
createFlowEditorStore({
|
|
258
|
+
historyLimit: props.historyLimit ?? 50,
|
|
259
|
+
initial: {
|
|
260
|
+
nodes: props.initialGraph?.nodes ?? boot?.data?.graph?.nodes ?? [],
|
|
261
|
+
connectors: props.initialGraph?.connectors ?? boot?.data?.graph?.connectors ?? [],
|
|
262
|
+
locked: !!props.locked,
|
|
263
|
+
},
|
|
264
|
+
}),
|
|
265
|
+
)
|
|
266
|
+
// A provider that finishes loading after mount hydrates an empty editor once.
|
|
267
|
+
const hydrated = useRef(store.getState().nodes.length > 0)
|
|
268
|
+
useEffect(() => {
|
|
269
|
+
const g = boot?.data?.graph
|
|
270
|
+
if (!hydrated.current && g) {
|
|
271
|
+
hydrated.current = true
|
|
272
|
+
store.setState({ nodes: g.nodes, connectors: g.connectors })
|
|
273
|
+
}
|
|
274
|
+
}, [boot?.data?.graph, store])
|
|
275
|
+
useEffect(() => {
|
|
276
|
+
store.actions.setLocked(!!props.locked)
|
|
277
|
+
}, [props.locked, store])
|
|
278
|
+
|
|
279
|
+
return (
|
|
280
|
+
<FlowEditorStateProvider store={store}>
|
|
281
|
+
<DialogStackProvider>
|
|
282
|
+
<ConfirmProvider>
|
|
283
|
+
<AnnouncerProvider>
|
|
284
|
+
<EditorBody {...props} reference={props.reference ?? boot?.data?.reference ?? {}} />
|
|
285
|
+
</AnnouncerProvider>
|
|
286
|
+
</ConfirmProvider>
|
|
287
|
+
</DialogStackProvider>
|
|
288
|
+
</FlowEditorStateProvider>
|
|
289
|
+
)
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const LAYOUT_TO_CYCLE: Record<string, LayoutCycle> = { down: 'top-down', right: 'left-right' }
|
|
293
|
+
const NUDGE = 8
|
|
294
|
+
/** Step flows keep their main chain on one line with branches after it. */
|
|
295
|
+
const STEP_SPACING = (rtl: boolean) => ({ rankGap: 54, siblingGap: 24, alignment: 'start' as const, rtl })
|
|
296
|
+
const DRAWN = (n: FlowNode) => n.kind !== 'note' && n.kind !== 'group'
|
|
297
|
+
const isTyping = (el: HTMLElement) => !!el.closest('input, textarea, select, [contenteditable="true"]')
|
|
298
|
+
const plainA = (e: KeyboardEvent<HTMLElement>) => (e.key === 'a' || e.key === 'A') && !e.metaKey && !e.ctrlKey && !e.altKey
|
|
299
|
+
|
|
300
|
+
/** Where a new step goes: after a step, inside a link, or loose near a point. */
|
|
301
|
+
type Placement = { after: string } | { through: string } | { near: Point }
|
|
302
|
+
|
|
303
|
+
interface PickerState {
|
|
304
|
+
title: string
|
|
305
|
+
/** Shorter title for the search placeholder. */
|
|
306
|
+
placeholder?: string
|
|
307
|
+
arriving?: DataShape | null
|
|
308
|
+
options: ReadyStep[]
|
|
309
|
+
place: (stepId: string) => void
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function EditorBody(props: FlowEditorProps & { reference: FlowReferenceData }) {
|
|
313
|
+
const { reference, debounceMs = 800, extraNodeKinds, keepLtrLayout = false, singleKeyShortcuts = true } = props
|
|
314
|
+
const l = useLabels(flowEditorLabels, props.labels)
|
|
315
|
+
const sw = useLabels(stepEditorWords, undefined)
|
|
316
|
+
const { locale, rtl } = useFlowLocale()
|
|
317
|
+
const store = useFlowEditorStore()
|
|
318
|
+
const actions = store.actions
|
|
319
|
+
const catalog = useRenderCatalog()
|
|
320
|
+
const announce = useAnnounce()
|
|
321
|
+
const dialogs = useDialogStack()
|
|
322
|
+
const wide = useMediaQuery('(min-width: 1024px)', true)
|
|
323
|
+
const ready = useReadyCatalog(props.steps ?? researchStepCatalog)
|
|
324
|
+
const aiAllowed = props.agentsAllowed !== false
|
|
325
|
+
const [paletteOpen, setPaletteOpen] = useState(false)
|
|
326
|
+
|
|
327
|
+
const nodes = useFlowEditorState((s) => s.nodes)
|
|
328
|
+
const connectors = useFlowEditorState((s) => s.connectors)
|
|
329
|
+
const locked = useFlowEditorState((s) => s.locked)
|
|
330
|
+
const mode = useFlowEditorState((s) => s.controlMode)
|
|
331
|
+
const density = useFlowEditorState((s) => s.cardDensity)
|
|
332
|
+
const direction = useFlowEditorState((s) => s.layoutDirection)
|
|
333
|
+
const panels = useFlowEditorState((s) => s.panels)
|
|
334
|
+
const clipboard = useFlowEditorState((s) => !!s.clipboard)
|
|
335
|
+
const menu = useFlowEditorState((s) => s.contextMenu)
|
|
336
|
+
|
|
337
|
+
const apiRef = useRef<CanvasApi>(null)
|
|
338
|
+
const rootRef = useRef<HTMLDivElement>(null)
|
|
339
|
+
const canvasRef = useRef<HTMLDivElement>(null)
|
|
340
|
+
const sideRef = useRef<HTMLElement>(null)
|
|
341
|
+
const [viewport, setViewport] = useState<Viewport>(props.initialGraph?.viewport ?? { x: 0, y: 0, zoom: 1 })
|
|
342
|
+
const viewportRef = useRef(viewport)
|
|
343
|
+
viewportRef.current = viewport
|
|
344
|
+
const [listView, setListView] = useState(!!props.defaultListView)
|
|
345
|
+
const [searchOpen, setSearchOpen] = useState(false)
|
|
346
|
+
const [picker, setPicker] = useState<PickerState | null>(null)
|
|
347
|
+
const pickerAnchor = useRef<HTMLElement | null>(null)
|
|
348
|
+
const [dragStep, setDragStep] = useState<string | null>(null)
|
|
349
|
+
const [dropAt, setDropAt] = useState<{ start: number; top: number } | null>(null)
|
|
350
|
+
const [recent, setRecent] = useState<string[]>([])
|
|
351
|
+
const [validation, setValidation] = useState<string | null>(null)
|
|
352
|
+
const searchTrigger = useRef<HTMLElement | null>(null)
|
|
353
|
+
|
|
354
|
+
const kinds = useMemo(() => ({ [STEP_KIND]: StepCard, ...(extraNodeKinds ?? {}) }), [extraNodeKinds])
|
|
355
|
+
const sizeOf = useCallback((n: FlowNode) => (n.kind === STEP_KIND ? (n.size ?? { ...STEP_CARD_SIZE }) : sizeForNode(n, density)), [density])
|
|
356
|
+
const byId = useMemo(() => new Map(nodes.map((n) => [n.id, n])), [nodes])
|
|
357
|
+
const titleOf = useCallback(
|
|
358
|
+
(n: FlowNode) => {
|
|
359
|
+
const label = typeof n.data.label === 'string' && n.data.label ? n.data.label : undefined
|
|
360
|
+
return label ?? (n.kind === STEP_KIND ? specOfNode(n, ready.byId)?.name : undefined) ?? nodeTitle(n, catalog)
|
|
361
|
+
},
|
|
362
|
+
[ready, catalog],
|
|
363
|
+
)
|
|
364
|
+
const nameOf = useCallback((id: string) => {
|
|
365
|
+
const n = byId.get(id)
|
|
366
|
+
return n ? titleOf(n) : id
|
|
367
|
+
}, [byId, titleOf])
|
|
368
|
+
|
|
369
|
+
// ---- graph reporting -------------------------------------------------
|
|
370
|
+
const dragging = useRef(false)
|
|
371
|
+
const report = useRef({ change: props.onGraphChange, commit: props.onGraphCommit })
|
|
372
|
+
report.current = { change: props.onGraphChange, commit: props.onGraphCommit }
|
|
373
|
+
const pending = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
374
|
+
const flush = useCallback(() => {
|
|
375
|
+
if (!pending.current) return
|
|
376
|
+
clearTimeout(pending.current)
|
|
377
|
+
pending.current = null
|
|
378
|
+
report.current.change?.(graphOf(store, viewportRef.current))
|
|
379
|
+
}, [store])
|
|
380
|
+
useEffect(() => {
|
|
381
|
+
let last = { nodes: store.getState().nodes, connectors: store.getState().connectors }
|
|
382
|
+
return store.subscribe(() => {
|
|
383
|
+
const s = store.getState()
|
|
384
|
+
if (s.nodes === last.nodes && s.connectors === last.connectors) return
|
|
385
|
+
// Selection alone is not an edit.
|
|
386
|
+
const selectionOnly =
|
|
387
|
+
s.nodes.length === last.nodes.length &&
|
|
388
|
+
s.connectors.length === last.connectors.length &&
|
|
389
|
+
s.nodes.every((n, i) => n === last.nodes[i] || (n.id === last.nodes[i]!.id && n.position === last.nodes[i]!.position && n.data === last.nodes[i]!.data && n.size === last.nodes[i]!.size && n.hidden === last.nodes[i]!.hidden && n.parentId === last.nodes[i]!.parentId)) &&
|
|
390
|
+
s.connectors.every((c, i) => c === last.connectors[i] || (c.id === last.connectors[i]!.id && c.source === last.connectors[i]!.source && c.target === last.connectors[i]!.target && c.hidden === last.connectors[i]!.hidden))
|
|
391
|
+
last = { nodes: s.nodes, connectors: s.connectors }
|
|
392
|
+
if (selectionOnly || dragging.current) return
|
|
393
|
+
const graph = graphOf(store, viewportRef.current)
|
|
394
|
+
report.current.commit?.(graph)
|
|
395
|
+
if (pending.current) clearTimeout(pending.current)
|
|
396
|
+
pending.current = setTimeout(() => {
|
|
397
|
+
pending.current = null
|
|
398
|
+
report.current.change?.(graphOf(store, viewportRef.current))
|
|
399
|
+
}, debounceMs)
|
|
400
|
+
})
|
|
401
|
+
}, [store, debounceMs])
|
|
402
|
+
useEffect(() => {
|
|
403
|
+
const onHidden = () => {
|
|
404
|
+
if (document.visibilityState === 'hidden') flush()
|
|
405
|
+
}
|
|
406
|
+
document.addEventListener('visibilitychange', onHidden)
|
|
407
|
+
window.addEventListener('pagehide', flush)
|
|
408
|
+
return () => {
|
|
409
|
+
document.removeEventListener('visibilitychange', onHidden)
|
|
410
|
+
window.removeEventListener('pagehide', flush)
|
|
411
|
+
flush()
|
|
412
|
+
}
|
|
413
|
+
}, [flush])
|
|
414
|
+
|
|
415
|
+
// ---- surface model and wiring checks ----------------------------------
|
|
416
|
+
const ordered = useMemo(() => flowReadingOrder(nodes, connectors, direction === 'right'), [nodes, connectors, direction])
|
|
417
|
+
const surfaceNodes: SurfaceNode[] = useMemo(
|
|
418
|
+
() =>
|
|
419
|
+
ordered.map((n) => {
|
|
420
|
+
const sized = { ...n, size: sizeOf(n) }
|
|
421
|
+
return {
|
|
422
|
+
id: n.id,
|
|
423
|
+
rect: absoluteRect(sized, byId, sized.size),
|
|
424
|
+
layer: n.kind === 'group' ? 0 : 1,
|
|
425
|
+
fixedHeight: n.kind === 'group' || n.kind === 'note' || n.kind === STEP_KIND,
|
|
426
|
+
...(n.selected ? { selected: true } : {}),
|
|
427
|
+
...(n.hidden ? { hidden: true } : {}),
|
|
428
|
+
draggable: !locked,
|
|
429
|
+
tone: catalog.tone(n.kind),
|
|
430
|
+
}
|
|
431
|
+
}),
|
|
432
|
+
[ordered, sizeOf, byId, locked, catalog],
|
|
433
|
+
)
|
|
434
|
+
const issues = useMemo(() => wiringIssues(nodes, connectors, ready.steps, aiAllowed), [nodes, connectors, ready, aiAllowed])
|
|
435
|
+
const issuesByNode = useMemo(() => {
|
|
436
|
+
const m = new Map<string, WiringIssue[]>()
|
|
437
|
+
for (const i of issues) m.set(i.nodeId, [...(m.get(i.nodeId) ?? []), i])
|
|
438
|
+
return m
|
|
439
|
+
}, [issues])
|
|
440
|
+
|
|
441
|
+
// ---- actions ---------------------------------------------------------
|
|
442
|
+
const guides = useAlignmentGuides({ nameOf })
|
|
443
|
+
const dragOrigin = useRef(new Map<string, Point>())
|
|
444
|
+
const arrange = useSelectionArrange({
|
|
445
|
+
nodes,
|
|
446
|
+
setNodes: actions.setNodes,
|
|
447
|
+
snapshot: actions.snapshot,
|
|
448
|
+
locked,
|
|
449
|
+
groupName: l.group,
|
|
450
|
+
announce: (action, d) => announce(fill(action === 'group' ? l.arranged : l.aligned, { count: d.count }, locale)),
|
|
451
|
+
})
|
|
452
|
+
const focusNodeSoon = (id: string) => requestAnimationFrame(() => apiRef.current?.focusNode(id))
|
|
453
|
+
|
|
454
|
+
const layoutNow = useCallback(
|
|
455
|
+
(cycle: LayoutCycle, snapshot: boolean) => {
|
|
456
|
+
const dir = cycle === 'left-right' ? 'right' : 'down'
|
|
457
|
+
actions.setLayoutDirection(dir)
|
|
458
|
+
const sized = store.getState().nodes.map((n) => ({ ...n, size: sizeOf(n) }))
|
|
459
|
+
const laid = autoLayout(sized, store.getState().connectors, rankDirectionOf(dir, rtl, keepLtrLayout), STEP_SPACING(rtl && !keepLtrLayout))
|
|
460
|
+
if (snapshot) actions.snapshot()
|
|
461
|
+
const moved = new Map(laid.map((n) => [n.id, n.position]))
|
|
462
|
+
actions.setNodes((prev) => prev.map((n) => (moved.get(n.id) === n.position ? n : { ...n, position: moved.get(n.id) ?? n.position })))
|
|
463
|
+
requestAnimationFrame(() => apiRef.current?.fit())
|
|
464
|
+
},
|
|
465
|
+
[store, sizeOf, actions, rtl, keepLtrLayout],
|
|
466
|
+
)
|
|
467
|
+
const currentCycle = useCallback((): LayoutCycle => LAYOUT_TO_CYCLE[store.getState().layoutDirection] ?? 'top-down', [store])
|
|
468
|
+
|
|
469
|
+
/** A node of a host kind (old palette payloads, notes from the canvas menu). */
|
|
470
|
+
const addNode = useCallback(
|
|
471
|
+
(kind: string, at: Point, payload?: Partial<PalettePayload>) => {
|
|
472
|
+
if (locked) return null
|
|
473
|
+
const id = createId(kind)
|
|
474
|
+
const config = payload?.config ?? nodeKindCatalog.createDefaultConfig(kind) ?? {}
|
|
475
|
+
const data: Record<string, unknown> = { ...config, ...(payload?.label ? { label: payload.label } : {}) }
|
|
476
|
+
if (payload?.entityId) data[kind === 'agent' ? 'agentRef' : kind === 'rule' ? 'ruleId' : 'sourceId'] = payload.entityId
|
|
477
|
+
const size = sizeForNode({ id, kind, position: at, data }, density)
|
|
478
|
+
actions.snapshot()
|
|
479
|
+
actions.setNodes((prev) => [...prev.map((n) => (n.selected ? { ...n, selected: false } : n)), { id, kind, data, position: { x: at.x - size.width / 2, y: at.y - size.height / 2 }, selected: true }])
|
|
480
|
+
return id
|
|
481
|
+
},
|
|
482
|
+
[locked, density, actions],
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
/** Adds a research step, links it and lays the flow out again (one undo step). */
|
|
486
|
+
const insertStep = useCallback(
|
|
487
|
+
(stepId: string, place: Placement) => {
|
|
488
|
+
const step = ready.byId.get(stepId)
|
|
489
|
+
if (!step || store.getState().locked || (step.usesAI && !aiAllowed)) return null
|
|
490
|
+
const id = createId(step.kind)
|
|
491
|
+
const all = store.getState().nodes
|
|
492
|
+
const anchor = 'after' in place ? all.find((n) => n.id === place.after) : undefined
|
|
493
|
+
const link = 'through' in place ? store.getState().connectors.find((c) => c.id === place.through) : undefined
|
|
494
|
+
const ends = link ? [all.find((n) => n.id === link.source), all.find((n) => n.id === link.target)] : []
|
|
495
|
+
const at =
|
|
496
|
+
'near' in place
|
|
497
|
+
? { x: place.near.x - STEP_CARD_SIZE.width / 2, y: place.near.y - STEP_CARD_SIZE.height / 2 }
|
|
498
|
+
: anchor
|
|
499
|
+
? { x: anchor.position.x, y: anchor.position.y + 140 }
|
|
500
|
+
: ends[0] && ends[1]
|
|
501
|
+
? { x: (ends[0].position.x + ends[1].position.x) / 2, y: (ends[0].position.y + ends[1].position.y) / 2 }
|
|
502
|
+
: { x: 0, y: 0 }
|
|
503
|
+
actions.snapshot()
|
|
504
|
+
actions.setNodes((prev) => [...prev.map((n) => (n.selected ? { ...n, selected: false } : n)), { ...stepNode(step, id, at), selected: true }])
|
|
505
|
+
if ('after' in place) actions.setConnectors((prev) => linkAfter(prev, place.after, id, () => createId('connector')))
|
|
506
|
+
else if ('through' in place) actions.setConnectors((prev) => linkThrough(prev, place.through, id, () => createId('connector')))
|
|
507
|
+
if (!('near' in place)) layoutNow(currentCycle(), false)
|
|
508
|
+
setRecent((r) => [stepId, ...r.filter((x) => x !== stepId)].slice(0, 8))
|
|
509
|
+
announce(fill(sw.added, { name: step.name }, locale))
|
|
510
|
+
requestAnimationFrame(() => apiRef.current?.focusNode(id))
|
|
511
|
+
return id
|
|
512
|
+
},
|
|
513
|
+
[ready, store, aiAllowed, actions, layoutNow, currentCycle, announce, sw, locale],
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
/** Step a loose step should follow: the selection, else the nearest open end that fits. */
|
|
517
|
+
const sourceFor = useCallback(
|
|
518
|
+
(step: ReadyStep, near: Point): string | null => {
|
|
519
|
+
const accepts = step.inputs[0]
|
|
520
|
+
if (!accepts || step.primitive) return null
|
|
521
|
+
const s = store.getState()
|
|
522
|
+
const index = new Map(s.nodes.map((n) => [n.id, n]))
|
|
523
|
+
const fits = (n: FlowNode) => {
|
|
524
|
+
const g = givenShape(n, ready.byId)
|
|
525
|
+
return !!g && accepts.includes(g)
|
|
526
|
+
}
|
|
527
|
+
const chosen = s.nodes.find((n) => n.selected && fits(n))
|
|
528
|
+
if (chosen) return chosen.id
|
|
529
|
+
const open = new Set(s.nodes.map((n) => n.id))
|
|
530
|
+
for (const c of s.connectors) open.delete(c.source)
|
|
531
|
+
let best: string | null = null
|
|
532
|
+
let score = Infinity
|
|
533
|
+
for (const n of s.nodes) {
|
|
534
|
+
if (!fits(n)) continue
|
|
535
|
+
const r = absoluteRect({ ...n, size: sizeOf(n) }, index, sizeOf(n))
|
|
536
|
+
const gap = Math.hypot(r.x + r.width / 2 - near.x, r.y + r.height / 2 - near.y)
|
|
537
|
+
const d = (Number.isFinite(gap) ? gap : 0) + (open.has(n.id) ? 0 : 100000)
|
|
538
|
+
if (d < score) {
|
|
539
|
+
best = n.id
|
|
540
|
+
score = d
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return best
|
|
544
|
+
},
|
|
545
|
+
[store, ready, sizeOf],
|
|
546
|
+
)
|
|
547
|
+
|
|
548
|
+
/** Palette placement (tap, Enter or drop): follows a fitting step when there is one. */
|
|
549
|
+
const placeLoose = useCallback(
|
|
550
|
+
(stepId: string, near: Point) => {
|
|
551
|
+
const step = ready.byId.get(stepId)
|
|
552
|
+
if (!step) return null
|
|
553
|
+
const from = sourceFor(step, near)
|
|
554
|
+
return insertStep(stepId, from ? { after: from } : { near })
|
|
555
|
+
},
|
|
556
|
+
[ready, sourceFor, insertStep],
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
const canvasCentre = () => apiRef.current?.visibleCentre() ?? { x: 0, y: 0 }
|
|
560
|
+
const openPicker = (trigger: HTMLElement | null, state: PickerState) => {
|
|
561
|
+
pickerAnchor.current = trigger ?? rootRef.current
|
|
562
|
+
setPicker(state)
|
|
563
|
+
}
|
|
564
|
+
const openAfter = useCallback(
|
|
565
|
+
(nodeId: string, trigger: HTMLElement | null) => {
|
|
566
|
+
const n = store.getState().nodes.find((x) => x.id === nodeId)
|
|
567
|
+
if (!n || store.getState().locked) return
|
|
568
|
+
const shape = givenShape(n, ready.byId)
|
|
569
|
+
const name = nameOf(nodeId)
|
|
570
|
+
openPicker(trigger, {
|
|
571
|
+
title: fill(sw.pickerAfter, { name }, locale),
|
|
572
|
+
placeholder: fill(sw.pickerAfter, { name: [...name].length > 14 ? `${[...name].slice(0, 7).join('').trimEnd()}...` : name }, locale),
|
|
573
|
+
arriving: shape,
|
|
574
|
+
// After one step: steps with a single input (a join also needs its second input).
|
|
575
|
+
options: shape === null ? [] : stepsAccepting(shape, ready.steps, aiAllowed).filter((st) => st.inputs.length === 1),
|
|
576
|
+
place: (id) => insertStep(id, { after: nodeId }),
|
|
577
|
+
})
|
|
578
|
+
},
|
|
579
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
580
|
+
[store, ready, sw, nameOf, locale, aiAllowed, insertStep],
|
|
581
|
+
)
|
|
582
|
+
const openThrough = (connectorId: string) => {
|
|
583
|
+
const c = store.getState().connectors.find((x) => x.id === connectorId)
|
|
584
|
+
const from = c ? byId.get(c.source) : undefined
|
|
585
|
+
if (!c || !from) return
|
|
586
|
+
const shape = givenShape(from, ready.byId)
|
|
587
|
+
const active = document.activeElement instanceof HTMLElement && canvasRef.current?.contains(document.activeElement) ? document.activeElement : canvasRef.current
|
|
588
|
+
openPicker(active, {
|
|
589
|
+
title: fill(sw.pickerBetween, { from: nameOf(c.source), to: nameOf(c.target) }, locale),
|
|
590
|
+
arriving: shape,
|
|
591
|
+
options: shape === null ? [] : stepsAccepting(shape, ready.steps, aiAllowed),
|
|
592
|
+
place: (id) => insertStep(id, { through: connectorId }),
|
|
593
|
+
})
|
|
594
|
+
}
|
|
595
|
+
const openLoose = (trigger: HTMLElement | null) =>
|
|
596
|
+
openPicker(trigger, {
|
|
597
|
+
title: sw.pickerFree,
|
|
598
|
+
options: ready.steps.filter((s) => !s.primitive && (!s.usesAI || aiAllowed)),
|
|
599
|
+
place: (id) => placeLoose(id, canvasCentre()),
|
|
600
|
+
})
|
|
601
|
+
/** Dock item and the A key: after the selected step, else a loose step. */
|
|
602
|
+
const addFromDock = () => {
|
|
603
|
+
const chosen = store.getState().nodes.find((n) => n.selected)
|
|
604
|
+
const dockButton = rootRef.current?.querySelector<HTMLElement>('[data-tool="add-step"]') ?? null
|
|
605
|
+
if (chosen && DRAWN(chosen)) openAfter(chosen.id, rootRef.current?.querySelector<HTMLElement>(`[data-ty-add-after="${chosen.id}"]`) ?? dockButton)
|
|
606
|
+
else openLoose(dockButton)
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
const showSettings = (id: string) => {
|
|
610
|
+
actions.select([id])
|
|
611
|
+
requestAnimationFrame(() => sideRef.current?.querySelector<HTMLElement>('input, textarea')?.focus())
|
|
612
|
+
}
|
|
613
|
+
const openConfig = useCallback(
|
|
614
|
+
(id: string) => {
|
|
615
|
+
const n = store.getState().nodes.find((x) => x.id === id)
|
|
616
|
+
if (!n || store.getState().locked) return
|
|
617
|
+
if (n.kind === 'note') return
|
|
618
|
+
if (n.kind === STEP_KIND && props.sidePanel !== false) {
|
|
619
|
+
showSettings(id)
|
|
620
|
+
return
|
|
621
|
+
}
|
|
622
|
+
actions.setEditingNode(id)
|
|
623
|
+
const references = ancestorsOf(id, store.getState().connectors)
|
|
624
|
+
dialogs.open<NodeConfigPayload>('node-config', { nodeId: id, kind: n.kind, label: nodeTitle(n, catalog), config: n.data, references })
|
|
625
|
+
},
|
|
626
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
627
|
+
[store, actions, dialogs, catalog, props.sidePanel],
|
|
628
|
+
)
|
|
629
|
+
|
|
630
|
+
const saveConfig = useCallback(
|
|
631
|
+
(nodeId: string, config: Record<string, unknown>) => {
|
|
632
|
+
actions.snapshot()
|
|
633
|
+
actions.setNodes((prev) => prev.map((n) => (n.id === nodeId ? { ...n, data: { ...config, ...(typeof n.data.label === 'string' && config.label === undefined ? { label: n.data.label } : {}) } } : n)))
|
|
634
|
+
},
|
|
635
|
+
[actions],
|
|
636
|
+
)
|
|
637
|
+
const editStep = (nodeId: string, patch: Record<string, unknown>) => {
|
|
638
|
+
actions.snapshot()
|
|
639
|
+
actions.setNodes((prev) =>
|
|
640
|
+
prev.map((n) => {
|
|
641
|
+
if (n.id !== nodeId) return n
|
|
642
|
+
const data = { ...n.data, ...patch }
|
|
643
|
+
for (const k of Object.keys(patch)) if (patch[k] === undefined) delete data[k]
|
|
644
|
+
return { ...n, data }
|
|
645
|
+
}),
|
|
646
|
+
)
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const connect = useCallback(
|
|
650
|
+
(from: PortRef, to: PortRef) => {
|
|
651
|
+
if (store.getState().locked) return
|
|
652
|
+
const exists = store.getState().connectors.some((c) => c.source === from.nodeId && c.target === to.nodeId && (c.sourcePort ?? null) === (from.portId ?? null))
|
|
653
|
+
if (exists) return
|
|
654
|
+
actions.snapshot()
|
|
655
|
+
actions.setConnectors((prev) => [
|
|
656
|
+
...prev,
|
|
657
|
+
{ id: createId('connector'), source: from.nodeId, target: to.nodeId, ...(from.portId ? { sourcePort: from.portId } : {}), ...(to.portId ? { targetPort: to.portId } : {}) },
|
|
658
|
+
])
|
|
659
|
+
},
|
|
660
|
+
[store, actions],
|
|
661
|
+
)
|
|
662
|
+
|
|
663
|
+
const autoArrange = useCallback(
|
|
664
|
+
(cycle: LayoutCycle) => {
|
|
665
|
+
if (!locked) layoutNow(cycle, true)
|
|
666
|
+
},
|
|
667
|
+
[locked, layoutNow],
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
const repair = (issue: WiringIssue) => {
|
|
671
|
+
const fix = issue.repair
|
|
672
|
+
if (fix.kind === 'replace') {
|
|
673
|
+
actions.snapshot()
|
|
674
|
+
actions.setNodes((prev) => prev.map((n) => (n.id === fix.nodeId ? { ...n, data: { stepId: fix.stepId } } : n)))
|
|
675
|
+
announce(fill(sw.added, { name: ready.byId.get(fix.stepId)?.name ?? fix.stepId }, locale))
|
|
676
|
+
} else if (fix.kind === 'insert') insertStep(fix.stepId, { through: issue.connectorId })
|
|
677
|
+
else actions.removeConnector(issue.connectorId)
|
|
678
|
+
}
|
|
679
|
+
const validate = () => {
|
|
680
|
+
setValidation(issues.length ? fill(sw.issueCount, { count: issues.length }, locale) : sw.validOk)
|
|
681
|
+
props.onValidate?.(issues)
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/** List view reorder: swaps linked neighbours, else their places. */
|
|
685
|
+
const moveInList = (id: string, towards: -1 | 1) => {
|
|
686
|
+
const list = ordered.filter(DRAWN)
|
|
687
|
+
const i = list.findIndex((n) => n.id === id)
|
|
688
|
+
const other = list[i + towards]
|
|
689
|
+
if (!other || locked) return
|
|
690
|
+
const [first, second] = towards === 1 ? [id, other.id] : [other.id, id]
|
|
691
|
+
const swapped = swapNeighbours(store.getState().connectors, first, second)
|
|
692
|
+
actions.snapshot()
|
|
693
|
+
if (swapped) {
|
|
694
|
+
actions.setConnectors(() => swapped)
|
|
695
|
+
layoutNow(currentCycle(), false)
|
|
696
|
+
} else {
|
|
697
|
+
const a = list[i]!
|
|
698
|
+
actions.setNodes((prev) => prev.map((n) => (n.id === a.id ? { ...n, position: other.position } : n.id === other.id ? { ...n, position: a.position } : n)))
|
|
699
|
+
}
|
|
700
|
+
announce(fill(sw.moved, { name: nameOf(id), position: i + towards + 1 }, locale))
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
const escape = useCallback(() => {
|
|
704
|
+
const s = store.getState()
|
|
705
|
+
if (s.contextMenu) {
|
|
706
|
+
actions.closeContextMenu()
|
|
707
|
+
return true
|
|
708
|
+
}
|
|
709
|
+
if (s.nodes.some((n) => n.selected) || s.connectors.some((c) => c.selected)) {
|
|
710
|
+
actions.deselectAll()
|
|
711
|
+
return true
|
|
712
|
+
}
|
|
713
|
+
return false
|
|
714
|
+
}, [store, actions])
|
|
715
|
+
|
|
716
|
+
const leave = useCallback(() => {
|
|
717
|
+
const tools = rootRef.current?.querySelector<HTMLElement>('[data-ty-canvas-exit] button, [data-ty-canvas-exit] [role="button"]')
|
|
718
|
+
if (tools) tools.focus()
|
|
719
|
+
else focusAfter(canvasRef.current)
|
|
720
|
+
}, [])
|
|
721
|
+
|
|
722
|
+
useEditorShortcuts(
|
|
723
|
+
{
|
|
724
|
+
escape,
|
|
725
|
+
selectTool: () => actions.setControlMode('select'),
|
|
726
|
+
panTool: () => actions.setControlMode('pan'),
|
|
727
|
+
toggleGrid: () => actions.togglePanel('grid'),
|
|
728
|
+
toggleMinimap: () => actions.togglePanel('minimap'),
|
|
729
|
+
zoom100: () => apiRef.current?.zoomTo(1),
|
|
730
|
+
zoom50: () => apiRef.current?.zoomTo(0.5),
|
|
731
|
+
group: () => {
|
|
732
|
+
if (store.getState().nodes.filter((n) => n.selected).length < 2) return false
|
|
733
|
+
arrange.group()
|
|
734
|
+
},
|
|
735
|
+
ungroup: () => arrange.ungroup(),
|
|
736
|
+
undo: () => {
|
|
737
|
+
if (!store.getState().past.length) return false
|
|
738
|
+
actions.undo()
|
|
739
|
+
},
|
|
740
|
+
redo: () => {
|
|
741
|
+
if (!store.getState().future.length) return false
|
|
742
|
+
actions.redo()
|
|
743
|
+
},
|
|
744
|
+
copy: () => actions.copy(),
|
|
745
|
+
paste: () => {
|
|
746
|
+
if (!store.getState().clipboard) return false
|
|
747
|
+
actions.paste()
|
|
748
|
+
},
|
|
749
|
+
selectAll: () => actions.selectAll(),
|
|
750
|
+
duplicate: () => actions.duplicate(),
|
|
751
|
+
fit: () => apiRef.current?.fit(),
|
|
752
|
+
zoomOut: () => apiRef.current?.zoomOut(),
|
|
753
|
+
zoomIn: () => apiRef.current?.zoomIn(),
|
|
754
|
+
delete: () => {
|
|
755
|
+
if (store.getState().locked) return false
|
|
756
|
+
actions.removeSelection()
|
|
757
|
+
},
|
|
758
|
+
},
|
|
759
|
+
{ scope: canvasRef, enabled: true, singleKey: singleKeyShortcuts, onLeave: leave },
|
|
760
|
+
)
|
|
761
|
+
|
|
762
|
+
// ---- node keys: add after, nudge, context menu -----------------------
|
|
763
|
+
const onNodeKeyDown = (id: string, e: KeyboardEvent<HTMLElement>) => {
|
|
764
|
+
const target = e.target as HTMLElement
|
|
765
|
+
if (isTyping(target)) return
|
|
766
|
+
if (isContextMenuKey(e)) {
|
|
767
|
+
e.preventDefault()
|
|
768
|
+
const r = target.getBoundingClientRect()
|
|
769
|
+
const selectedCount = store.getState().nodes.filter((n) => n.selected).length
|
|
770
|
+
actions.openContextMenu({ kind: selectedCount > 1 ? 'selection' : 'node', position: { x: r.left + 8, y: r.bottom }, targetId: id })
|
|
771
|
+
return
|
|
772
|
+
}
|
|
773
|
+
if (plainA(e) && singleKeyShortcuts && !locked && target.hasAttribute('data-ty-node-focus')) {
|
|
774
|
+
e.preventDefault()
|
|
775
|
+
e.stopPropagation()
|
|
776
|
+
openAfter(id, rootRef.current?.querySelector<HTMLElement>(`[data-ty-add-after="${id}"]`) ?? target)
|
|
777
|
+
return
|
|
778
|
+
}
|
|
779
|
+
const steps: Record<string, [number, number]> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] }
|
|
780
|
+
const step = steps[e.key]
|
|
781
|
+
if (!step || locked || e.metaKey || e.ctrlKey || e.altKey) return
|
|
782
|
+
if (!target.hasAttribute('data-ty-node-focus')) return
|
|
783
|
+
e.preventDefault()
|
|
784
|
+
e.stopPropagation()
|
|
785
|
+
const amount = e.shiftKey ? NUDGE * 4 : NUDGE
|
|
786
|
+
// Arrow keys move on screen: left is left in both reading directions.
|
|
787
|
+
actions.snapshot()
|
|
788
|
+
actions.setNodes((prev) => prev.map((n) => (n.id === id ? { ...n, position: { x: n.position.x + step[0] * amount, y: n.position.y + step[1] * amount } } : n)))
|
|
789
|
+
const moved = store.getState().nodes.find((n) => n.id === id)
|
|
790
|
+
if (moved) {
|
|
791
|
+
const all = store.getState().nodes.filter((n) => !n.hidden && n.id !== id).map((n) => ({ id: n.id, rect: absoluteRect(n, byId, sizeOf(n)) }))
|
|
792
|
+
guides.onKeyboardMove(all, absoluteRect(moved, byId, sizeOf(moved)), id)
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// ---- palette drop ----------------------------------------------------
|
|
797
|
+
const onDragOver = (e: DragEvent<HTMLDivElement>) => {
|
|
798
|
+
if (locked) return
|
|
799
|
+
const types = [...e.dataTransfer.types]
|
|
800
|
+
if (types.includes(STEP_MEDIA_TYPE) || types.includes(PALETTE_MEDIA_TYPE)) {
|
|
801
|
+
e.preventDefault()
|
|
802
|
+
e.dataTransfer.dropEffect = 'copy'
|
|
803
|
+
}
|
|
804
|
+
if (types.includes(STEP_MEDIA_TYPE) && canvasRef.current) {
|
|
805
|
+
const named = stepOfDrag(types)
|
|
806
|
+
if (named && named !== dragStep) setDragStep(ready.steps.find((st) => st.id.toLowerCase() === named)?.id ?? null)
|
|
807
|
+
const r = canvasRef.current.getBoundingClientRect()
|
|
808
|
+
// The drop outline stays whole inside the canvas.
|
|
809
|
+
const half = { w: STEP_CARD_SIZE.width / 2 + 8, h: STEP_CARD_SIZE.height / 2 + 8 }
|
|
810
|
+
const clamp = (v: number, lo: number, hi: number) => Math.min(Math.max(v, lo), Math.max(lo, hi))
|
|
811
|
+
setDropAt({ start: clamp(rtl ? r.right - e.clientX : e.clientX - r.left, half.w, r.width - half.w), top: clamp(e.clientY - r.top, half.h, r.height - half.h) })
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
const onDragLeave = (e: DragEvent<HTMLDivElement>) => {
|
|
815
|
+
if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setDropAt(null)
|
|
816
|
+
}
|
|
817
|
+
const onDrop = (e: DragEvent<HTMLDivElement>) => {
|
|
818
|
+
setDropAt(null)
|
|
819
|
+
setDragStep(null)
|
|
820
|
+
if (locked) return
|
|
821
|
+
const at = apiRef.current?.clientToCanvas({ x: e.clientX, y: e.clientY }) ?? { x: 0, y: 0 }
|
|
822
|
+
const stepRaw = e.dataTransfer.getData(STEP_MEDIA_TYPE)
|
|
823
|
+
const hostRaw = e.dataTransfer.getData(PALETTE_MEDIA_TYPE)
|
|
824
|
+
if (!stepRaw && !hostRaw) return
|
|
825
|
+
e.preventDefault()
|
|
826
|
+
try {
|
|
827
|
+
if (stepRaw) {
|
|
828
|
+
const { stepId } = JSON.parse(stepRaw) as { stepId: string }
|
|
829
|
+
placeLoose(stepId, at)
|
|
830
|
+
} else {
|
|
831
|
+
const payload = JSON.parse(hostRaw) as PalettePayload
|
|
832
|
+
const id = addNode(payload.kind, at, payload)
|
|
833
|
+
if (id) focusNodeSoon(id)
|
|
834
|
+
}
|
|
835
|
+
} catch {
|
|
836
|
+
// Not a palette payload: ignore.
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
// ---- tools -----------------------------------------------------------
|
|
841
|
+
const items = stepToolItems({
|
|
842
|
+
words: sw,
|
|
843
|
+
mode,
|
|
844
|
+
onModeChange: actions.setControlMode,
|
|
845
|
+
onAdd: locked ? undefined : addFromDock,
|
|
846
|
+
onArrange: locked ? undefined : () => autoArrange(currentCycle()),
|
|
847
|
+
onFit: () => apiRef.current?.fit(),
|
|
848
|
+
listView,
|
|
849
|
+
onToggleList: () => setListView((v) => !v),
|
|
850
|
+
onSearch: () => {
|
|
851
|
+
searchTrigger.current = rootRef.current?.querySelector<HTMLElement>('[data-tool="search"]') ?? null
|
|
852
|
+
setSearchOpen(true)
|
|
853
|
+
},
|
|
854
|
+
})
|
|
855
|
+
|
|
856
|
+
// ---- rendering ---------------------------------------------------------
|
|
857
|
+
const renderNode = (sn: SurfaceNode) => {
|
|
858
|
+
const node = byId.get(sn.id)!
|
|
859
|
+
const Card = componentForKind(node.kind, kinds)
|
|
860
|
+
return (
|
|
861
|
+
<div
|
|
862
|
+
className="ty-editor__node"
|
|
863
|
+
onFocus={(e) => {
|
|
864
|
+
// Keyboard focus selects the node (unless it is already in the selection).
|
|
865
|
+
if (e.target.hasAttribute('data-ty-node-focus') && !node.selected) actions.select([node.id])
|
|
866
|
+
}}
|
|
867
|
+
// Capture phase: React Aria buttons inside cards stop key propagation.
|
|
868
|
+
onKeyDownCapture={(e) => onNodeKeyDown(node.id, e)}
|
|
869
|
+
onPointerDown={(e) => {
|
|
870
|
+
if (e.shiftKey || e.metaKey || e.ctrlKey) actions.select([node.id], true)
|
|
871
|
+
else if (!node.selected) actions.select([node.id])
|
|
872
|
+
}}
|
|
873
|
+
>
|
|
874
|
+
<Card
|
|
875
|
+
node={node}
|
|
876
|
+
density={density}
|
|
877
|
+
direction={direction}
|
|
878
|
+
locked={locked}
|
|
879
|
+
selected={!!node.selected}
|
|
880
|
+
reference={reference}
|
|
881
|
+
onConfigure={openConfig}
|
|
882
|
+
onRemove={(id) => actions.removeNodes([id])}
|
|
883
|
+
onDuplicate={(id) => actions.duplicate([id])}
|
|
884
|
+
onRename={(id, label) => {
|
|
885
|
+
actions.snapshot()
|
|
886
|
+
actions.setNodes((prev) => prev.map((n) => (n.id === id ? { ...n, data: { ...n.data, label } } : n)))
|
|
887
|
+
}}
|
|
888
|
+
{...(props.onToggleRule ? { onToggleRule: props.onToggleRule } : {})}
|
|
889
|
+
/>
|
|
890
|
+
</div>
|
|
891
|
+
)
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
const chosen = nodes.filter((n) => n.selected)
|
|
895
|
+
const single = chosen.length === 1 && DRAWN(chosen[0]!) ? chosen[0]! : null
|
|
896
|
+
const nodeConfig = useActiveDialog<NodeConfigPayload>('node-config')
|
|
897
|
+
const agentDialog = useActiveDialog<AgentEditorPayload>('agent-editor')
|
|
898
|
+
useEffect(() => {
|
|
899
|
+
if (props.isCreatingAgent) dialogs.open<AgentEditorPayload>('agent-editor', { mode: 'create' })
|
|
900
|
+
}, [props.isCreatingAgent, dialogs])
|
|
901
|
+
|
|
902
|
+
const closeConfig = () => {
|
|
903
|
+
const id = nodeConfig?.payload.nodeId
|
|
904
|
+
dialogs.close()
|
|
905
|
+
actions.setEditingNode(null)
|
|
906
|
+
if (id) focusNodeSoon(id)
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
const tools = props.renderTools ? props.renderTools(items) : <CanvasToolbar items={items} label={l.tools} placement="dock" />
|
|
910
|
+
const issueBar = <IssueBar issues={issues} nameOf={nameOf} locked={locked} onRepair={repair} onShow={(id) => (listView ? showSettings(id) : (apiRef.current?.reveal(id), actions.select([id]), focusNodeSoon(id)))} />
|
|
911
|
+
|
|
912
|
+
// Below 1024 px the palette opens as a bottom drawer and steps are placed by tap.
|
|
913
|
+
const paletteBody =
|
|
914
|
+
props.palette === false ? null : (
|
|
915
|
+
<StepPalette
|
|
916
|
+
{...(props.palette ?? {})}
|
|
917
|
+
recent={recent}
|
|
918
|
+
onDragChange={setDragStep}
|
|
919
|
+
onPlace={(stepId) => {
|
|
920
|
+
setPaletteOpen(false)
|
|
921
|
+
placeLoose(stepId, canvasCentre())
|
|
922
|
+
}}
|
|
923
|
+
/>
|
|
924
|
+
)
|
|
925
|
+
|
|
926
|
+
const dragName = dragStep ? ready.byId.get(dragStep)?.name : undefined
|
|
927
|
+
|
|
928
|
+
return (
|
|
929
|
+
<StepsProvider catalog={props.steps ?? researchStepCatalog} aiAllowed={aiAllowed} issues={issuesByNode} {...(props.stepProblems ? { problems: props.stepProblems } : {})} addAfter={openAfter}>
|
|
930
|
+
<div
|
|
931
|
+
ref={rootRef}
|
|
932
|
+
className={['ty-editor', props.className].filter(Boolean).join(' ')}
|
|
933
|
+
data-view={listView ? 'list' : 'canvas'}
|
|
934
|
+
data-side={props.sidePanel === false ? 'none' : 'shown'}
|
|
935
|
+
data-palette={props.palette === false || (listView && wide) ? 'none' : 'shown'}
|
|
936
|
+
data-locked={locked ? 'true' : 'false'}
|
|
937
|
+
>
|
|
938
|
+
{props.palette !== false && wide && !listView ? <aside className="ty-editor__palette" aria-label={l.palette}>{paletteBody}</aside> : null}
|
|
939
|
+
{props.palette !== false && !wide ? (
|
|
940
|
+
<>
|
|
941
|
+
<Button className="ty-editor__palette-open" variant="secondary" leadingIcon={<Plus />} onPress={() => setPaletteOpen(true)}>
|
|
942
|
+
{l.openPalette}
|
|
943
|
+
</Button>
|
|
944
|
+
<Drawer open={paletteOpen} onOpenChange={setPaletteOpen} title={l.palette} placement="bottom">
|
|
945
|
+
{paletteBody}
|
|
946
|
+
</Drawer>
|
|
947
|
+
</>
|
|
948
|
+
) : null}
|
|
949
|
+
{listView ? (
|
|
950
|
+
<div
|
|
951
|
+
className="ty-editor__canvas"
|
|
952
|
+
data-view="list"
|
|
953
|
+
onKeyDown={(e) => {
|
|
954
|
+
if (plainA(e) && !locked && !isTyping(e.target as HTMLElement) && !(e.target as HTMLElement).closest('.ty-flow-step-list__main')) {
|
|
955
|
+
e.preventDefault()
|
|
956
|
+
addFromDock()
|
|
957
|
+
}
|
|
958
|
+
}}
|
|
959
|
+
>
|
|
960
|
+
{issueBar}
|
|
961
|
+
<StepListView
|
|
962
|
+
nodes={ordered.filter(DRAWN)}
|
|
963
|
+
locked={locked}
|
|
964
|
+
activeId={single?.id ?? null}
|
|
965
|
+
onConfigure={showSettings}
|
|
966
|
+
onMove={moveInList}
|
|
967
|
+
onRemove={(id) => actions.removeNodes([id])}
|
|
968
|
+
onAddAfter={(id, trigger) => openAfter(id, trigger)}
|
|
969
|
+
onActiveChange={(id) => actions.select([id])}
|
|
970
|
+
/>
|
|
971
|
+
<div className="ty-editor__list-dock">{tools}</div>
|
|
972
|
+
</div>
|
|
973
|
+
) : (
|
|
974
|
+
<div
|
|
975
|
+
ref={canvasRef}
|
|
976
|
+
className="ty-editor__canvas"
|
|
977
|
+
onDragOver={onDragOver}
|
|
978
|
+
onDragLeave={onDragLeave}
|
|
979
|
+
onDrop={onDrop}
|
|
980
|
+
onKeyDown={(e) => {
|
|
981
|
+
const t = e.target as HTMLElement
|
|
982
|
+
if (plainA(e) && singleKeyShortcuts && !locked && !isTyping(t) && !t.closest('[data-ty-node-id]')) {
|
|
983
|
+
e.preventDefault()
|
|
984
|
+
addFromDock()
|
|
985
|
+
}
|
|
986
|
+
}}
|
|
987
|
+
>
|
|
988
|
+
{issueBar}
|
|
989
|
+
<CanvasSurface
|
|
990
|
+
label={l.canvas}
|
|
991
|
+
roleDescription={l.roleDescription}
|
|
992
|
+
nodes={surfaceNodes}
|
|
993
|
+
connectors={connectors}
|
|
994
|
+
viewport={viewport}
|
|
995
|
+
onViewportChange={setViewport}
|
|
996
|
+
fit="resize"
|
|
997
|
+
fitPadding={24}
|
|
998
|
+
fitAlign="top"
|
|
999
|
+
mode={mode}
|
|
1000
|
+
dragNodes={!locked}
|
|
1001
|
+
marquee
|
|
1002
|
+
grid={panels.grid}
|
|
1003
|
+
minimap={panels.minimap}
|
|
1004
|
+
apiRef={apiRef}
|
|
1005
|
+
portAnchor={(id, port, role) => {
|
|
1006
|
+
const n = byId.get(id)
|
|
1007
|
+
if (!n) return 'border'
|
|
1008
|
+
if (n.kind === STEP_KIND) {
|
|
1009
|
+
const count = specOfNode(n, ready.byId)?.inputs.length ?? 1
|
|
1010
|
+
return role === 'source' ? { side: 'bottom', along: 0.5 } : { side: 'top', along: alongEdge(inputIndex(port), Math.max(1, count)) }
|
|
1011
|
+
}
|
|
1012
|
+
return anchorFor(n, port, role, direction, catalog)
|
|
1013
|
+
}}
|
|
1014
|
+
floating={catalog.floatingConnections}
|
|
1015
|
+
renderNode={renderNode}
|
|
1016
|
+
renderConnector={(c, shape) => {
|
|
1017
|
+
const conn = c as FlowConnector
|
|
1018
|
+
return renderConnectorParts(conn, shape, {
|
|
1019
|
+
sourceName: nameOf(c.source),
|
|
1020
|
+
targetName: nameOf(c.target),
|
|
1021
|
+
locked,
|
|
1022
|
+
selected: !!conn.selected,
|
|
1023
|
+
onSelect: (id) => actions.selectConnector(id),
|
|
1024
|
+
onDelete: (id) => actions.removeConnector(id),
|
|
1025
|
+
onOpenInsertPicker: (id) => openThrough(id),
|
|
1026
|
+
onInsertStep: (id, kind, point) => {
|
|
1027
|
+
const newId = addNode(kind, point)
|
|
1028
|
+
if (!newId) return
|
|
1029
|
+
// addNode took the snapshot: the split joins the same undo step.
|
|
1030
|
+
actions.setConnectors((prev) => splitConnectorThrough(prev, id, newId))
|
|
1031
|
+
},
|
|
1032
|
+
})
|
|
1033
|
+
}}
|
|
1034
|
+
overlay={guideOverlay(guides.guides)}
|
|
1035
|
+
onNodeDrag={(e) => {
|
|
1036
|
+
if (locked) return
|
|
1037
|
+
if (e.phase === 'start') {
|
|
1038
|
+
actions.snapshot()
|
|
1039
|
+
dragging.current = true
|
|
1040
|
+
dragOrigin.current = new Map(e.ids.map((id) => [id, byId.get(id)?.position ?? { x: 0, y: 0 }]))
|
|
1041
|
+
if (!e.ids.every((id) => byId.get(id)?.selected)) actions.select(e.ids)
|
|
1042
|
+
return
|
|
1043
|
+
}
|
|
1044
|
+
actions.setNodes((prev) => prev.map((n) => {
|
|
1045
|
+
const o = dragOrigin.current.get(n.id)
|
|
1046
|
+
return o ? { ...n, position: { x: o.x + e.delta.x, y: o.y + e.delta.y } } : n
|
|
1047
|
+
}))
|
|
1048
|
+
const ref = e.ids[0]!
|
|
1049
|
+
const moving = store.getState().nodes.find((n) => n.id === ref)
|
|
1050
|
+
if (moving && e.phase === 'move') {
|
|
1051
|
+
const all = store.getState().nodes.filter((n) => !n.hidden).map((n) => ({ id: n.id, rect: absoluteRect(n, byId, sizeOf(n)) }))
|
|
1052
|
+
guides.createDragHandler(all)(absoluteRect(moving, byId, sizeOf(moving)), ref, e.ids)
|
|
1053
|
+
}
|
|
1054
|
+
if (e.phase === 'end') {
|
|
1055
|
+
guides.onDragStop()
|
|
1056
|
+
// Groups that fit their members follow them.
|
|
1057
|
+
const parents = new Set(e.ids.map((id) => byId.get(id)?.parentId).filter((p): p is string => !!p))
|
|
1058
|
+
for (const p of parents) {
|
|
1059
|
+
if (byId.get(p)?.data.autoFit !== false) actions.setNodes((prev) => fitGroupToMembers(prev, p))
|
|
1060
|
+
}
|
|
1061
|
+
dragging.current = false
|
|
1062
|
+
// Commit the whole drag as one change.
|
|
1063
|
+
actions.setNodes((prev) => [...prev])
|
|
1064
|
+
}
|
|
1065
|
+
}}
|
|
1066
|
+
onMarquee={(ids, additive) => actions.select(ids, additive)}
|
|
1067
|
+
onBackgroundPress={() => actions.deselectAll()}
|
|
1068
|
+
onBackgroundContextMenu={(screen, canvasPoint) => actions.openContextMenu({ kind: 'canvas', position: screen, targetId: `${canvasPoint.x},${canvasPoint.y}` })}
|
|
1069
|
+
onNodeContextMenu={(id, screen) => {
|
|
1070
|
+
const many = store.getState().nodes.filter((n) => n.selected).length > 1 && byId.get(id)?.selected
|
|
1071
|
+
actions.openContextMenu({ kind: many ? 'selection' : 'node', position: screen, targetId: id })
|
|
1072
|
+
}}
|
|
1073
|
+
onEscape={escape}
|
|
1074
|
+
onLeave={leave}
|
|
1075
|
+
connect={{
|
|
1076
|
+
canConnect: (a, b) => {
|
|
1077
|
+
const s = byId.get(a.nodeId)
|
|
1078
|
+
const t = byId.get(b.nodeId)
|
|
1079
|
+
return !locked && !!s && !!t && connectionAllowed(s, t, a.portId, b.portId)
|
|
1080
|
+
},
|
|
1081
|
+
onConnect: connect,
|
|
1082
|
+
nameOf,
|
|
1083
|
+
labels: { canConnect: (name) => fill(l.canConnect, { name }, locale), cannotConnect: (name) => fill(l.cannotConnect, { name }, locale) },
|
|
1084
|
+
}}
|
|
1085
|
+
data={{ 'data-locked': locked ? 'true' : undefined }}
|
|
1086
|
+
>
|
|
1087
|
+
{tools}
|
|
1088
|
+
</CanvasSurface>
|
|
1089
|
+
{dropAt && dragName ? (
|
|
1090
|
+
<div className="ty-editor__drop" style={{ insetInlineStart: dropAt.start, insetBlockStart: dropAt.top }} aria-hidden="true">
|
|
1091
|
+
{fill(sw.dropHere, { name: dragName }, locale)}
|
|
1092
|
+
</div>
|
|
1093
|
+
) : null}
|
|
1094
|
+
</div>
|
|
1095
|
+
)}
|
|
1096
|
+
{props.sidePanel !== false ? (
|
|
1097
|
+
<aside ref={sideRef} className="ty-editor__side" aria-label={single ? nameOf(single.id) : sw.summaryTitle}>
|
|
1098
|
+
<FlowSidePanel
|
|
1099
|
+
nodes={nodes}
|
|
1100
|
+
selected={single}
|
|
1101
|
+
{...(props.flowFacts ? { facts: props.flowFacts } : {})}
|
|
1102
|
+
preview={single && props.outputPreview ? props.outputPreview(single.id) : null}
|
|
1103
|
+
locked={locked}
|
|
1104
|
+
validation={validation}
|
|
1105
|
+
{...(props.onRunFlow ? { onRunFlow: props.onRunFlow } : {})}
|
|
1106
|
+
onValidate={validate}
|
|
1107
|
+
{...(props.onTestStep ? { onTestStep: props.onTestStep } : {})}
|
|
1108
|
+
onRemove={(id) => actions.removeNodes([id])}
|
|
1109
|
+
onEdit={editStep}
|
|
1110
|
+
onBack={() => actions.deselectAll()}
|
|
1111
|
+
/>
|
|
1112
|
+
</aside>
|
|
1113
|
+
) : null}
|
|
1114
|
+
{picker ? (
|
|
1115
|
+
<AddStepPicker
|
|
1116
|
+
title={picker.title}
|
|
1117
|
+
{...(picker.placeholder ? { placeholder: picker.placeholder } : {})}
|
|
1118
|
+
{...(picker.arriving !== undefined ? { arriving: picker.arriving } : {})}
|
|
1119
|
+
options={picker.options}
|
|
1120
|
+
triggerRef={pickerAnchor}
|
|
1121
|
+
onPick={picker.place}
|
|
1122
|
+
onClose={() => setPicker(null)}
|
|
1123
|
+
/>
|
|
1124
|
+
) : null}
|
|
1125
|
+
{searchOpen ? (
|
|
1126
|
+
<CanvasNodeSearch
|
|
1127
|
+
isOpen
|
|
1128
|
+
onOpenChange={setSearchOpen}
|
|
1129
|
+
triggerRef={searchTrigger}
|
|
1130
|
+
nodes={nodes.filter((n) => !n.hidden).map((n) => ({ id: n.id, label: titleOf(n), kindLabel: n.kind === STEP_KIND ? (specOfNode(n, ready.byId)?.name ?? n.kind) : (catalog.entry(n.kind)?.label ?? n.kind) }))}
|
|
1131
|
+
onPick={(id) => {
|
|
1132
|
+
if (listView) {
|
|
1133
|
+
showSettings(id)
|
|
1134
|
+
return
|
|
1135
|
+
}
|
|
1136
|
+
apiRef.current?.reveal(id)
|
|
1137
|
+
actions.select([id])
|
|
1138
|
+
focusNodeSoon(id)
|
|
1139
|
+
}}
|
|
1140
|
+
/>
|
|
1141
|
+
) : null}
|
|
1142
|
+
{menu?.kind === 'node' && menu.targetId ? (
|
|
1143
|
+
<NodeContextMenu
|
|
1144
|
+
anchor={menu.position}
|
|
1145
|
+
targetId={menu.targetId}
|
|
1146
|
+
onClose={actions.closeContextMenu}
|
|
1147
|
+
onEdit={openConfig}
|
|
1148
|
+
onDuplicate={(id) => actions.duplicate([id])}
|
|
1149
|
+
onCopy={(id) => {
|
|
1150
|
+
actions.select([id])
|
|
1151
|
+
actions.copy()
|
|
1152
|
+
}}
|
|
1153
|
+
onDelete={(id) => actions.removeNodes([id])}
|
|
1154
|
+
/>
|
|
1155
|
+
) : null}
|
|
1156
|
+
{menu?.kind === 'selection' ? (
|
|
1157
|
+
<SelectionContextMenu
|
|
1158
|
+
anchor={menu.position}
|
|
1159
|
+
count={chosen.length}
|
|
1160
|
+
onClose={actions.closeContextMenu}
|
|
1161
|
+
onCopy={actions.copy}
|
|
1162
|
+
onDuplicate={() => actions.duplicate()}
|
|
1163
|
+
onDelete={actions.removeSelection}
|
|
1164
|
+
onGroup={arrange.group}
|
|
1165
|
+
onAlign={arrange.align}
|
|
1166
|
+
onDistribute={arrange.distribute}
|
|
1167
|
+
/>
|
|
1168
|
+
) : null}
|
|
1169
|
+
{menu?.kind === 'canvas' ? (
|
|
1170
|
+
<CanvasBackgroundMenu
|
|
1171
|
+
anchor={menu.position}
|
|
1172
|
+
onClose={actions.closeContextMenu}
|
|
1173
|
+
canvasPosition={parsePoint(menu.targetId)}
|
|
1174
|
+
hasClipboardContent={clipboard}
|
|
1175
|
+
onPaste={() => actions.paste()}
|
|
1176
|
+
onSelectAll={actions.selectAll}
|
|
1177
|
+
onFitView={() => apiRef.current?.fit()}
|
|
1178
|
+
onAddNote={(p) => {
|
|
1179
|
+
const id = addNode('note', p)
|
|
1180
|
+
if (id) focusNodeSoon(id)
|
|
1181
|
+
}}
|
|
1182
|
+
/>
|
|
1183
|
+
) : null}
|
|
1184
|
+
{nodeConfig
|
|
1185
|
+
? props.renderNodeEditor
|
|
1186
|
+
? props.renderNodeEditor({
|
|
1187
|
+
payload: nodeConfig.payload,
|
|
1188
|
+
save: (config) => {
|
|
1189
|
+
saveConfig(nodeConfig.payload.nodeId, config)
|
|
1190
|
+
closeConfig()
|
|
1191
|
+
},
|
|
1192
|
+
close: closeConfig,
|
|
1193
|
+
})
|
|
1194
|
+
: <NodeConfigDialog {...(props.nodeEditorProps ?? {})} onSave={(id, config) => saveConfig(id, config)} />
|
|
1195
|
+
: null}
|
|
1196
|
+
{agentDialog && props.renderAgentEditor
|
|
1197
|
+
? props.renderAgentEditor({
|
|
1198
|
+
payload: agentDialog.payload,
|
|
1199
|
+
close: () => {
|
|
1200
|
+
dialogs.close()
|
|
1201
|
+
if (agentDialog.payload.mode === 'create') props.onCancelCreateAgent?.()
|
|
1202
|
+
},
|
|
1203
|
+
})
|
|
1204
|
+
: null}
|
|
1205
|
+
{props.runs && props.flowId ? <RunViews flowId={props.flowId} {...props.runs} /> : null}
|
|
1206
|
+
</div>
|
|
1207
|
+
</StepsProvider>
|
|
1208
|
+
)
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
function parsePoint(s: string | undefined): Point {
|
|
1212
|
+
const [x, y] = (s ?? '0,0').split(',').map(Number)
|
|
1213
|
+
return { x: x ?? 0, y: y ?? 0 }
|
|
1214
|
+
}
|