@salilvnair/dui 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/DuiShowcase-C2jk2ySV.js +74705 -0
- package/dist/assets/DuiShowcase-CZLjKDpL.css +1 -0
- package/dist/assets/abap-DLDM7-KI.js +1 -0
- package/dist/assets/apex-DNDY2TF8.js +1 -0
- package/dist/assets/azcli-Y6nb8tq_.js +1 -0
- package/dist/assets/bat-BwHxbl9M.js +1 -0
- package/dist/assets/bicep-CFznDFnq.js +2 -0
- package/dist/assets/cameligo-Bf6VGUru.js +1 -0
- package/dist/assets/clojure-Dnu-v4kV.js +1 -0
- package/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
- package/dist/assets/coffee-Bd8akH9Z.js +1 -0
- package/dist/assets/cpp-BbWJElDN.js +1 -0
- package/dist/assets/csharp-Co3qMtFm.js +1 -0
- package/dist/assets/csp-D-4FJmMZ.js +1 -0
- package/dist/assets/css-DdJfP1eB.js +3 -0
- package/dist/assets/css.worker-B4z49cGk.js +93 -0
- package/dist/assets/cssMode-CZYOZ1AO.js +1 -0
- package/dist/assets/cypher-cTPe9QuQ.js +1 -0
- package/dist/assets/dart-BOtBlQCF.js +1 -0
- package/dist/assets/dockerfile-BG73LgW2.js +1 -0
- package/dist/assets/ecl-BEgZUVRK.js +1 -0
- package/dist/assets/elixir-BkW5O-1t.js +1 -0
- package/dist/assets/flow9-BeJ5waoc.js +1 -0
- package/dist/assets/freemarker2-CGSa1nHJ.js +3 -0
- package/dist/assets/fsharp-PahG7c26.js +1 -0
- package/dist/assets/go-acbASCJo.js +1 -0
- package/dist/assets/graphql-BxJiqAUM.js +1 -0
- package/dist/assets/handlebars-mB8dxbcs.js +1 -0
- package/dist/assets/hcl-DtV1sZF8.js +1 -0
- package/dist/assets/html-l7YRKuHI.js +1 -0
- package/dist/assets/html.worker-DtiGdgqp.js +470 -0
- package/dist/assets/htmlMode-CuoiFE2t.js +1 -0
- package/dist/assets/index-B12PznEF.js +50 -0
- package/dist/assets/index-B_5G6LrJ.css +10 -0
- package/dist/assets/ini-Kd9XrMLS.js +1 -0
- package/dist/assets/java-CXBNlu9o.js +1 -0
- package/dist/assets/javascript-9UYwmKgx.js +1 -0
- package/dist/assets/json.worker-leyajbqV.js +58 -0
- package/dist/assets/jsonMode-6uegdfHj.js +7 -0
- package/dist/assets/julia-cl7-CwDS.js +1 -0
- package/dist/assets/kotlin-s7OhZKlX.js +1 -0
- package/dist/assets/less-9HpZscsL.js +2 -0
- package/dist/assets/lexon-OrD6JF1K.js +1 -0
- package/dist/assets/liquid-C8P3CEDc.js +1 -0
- package/dist/assets/lspLanguageFeatures-Ju8ugRgx.js +4 -0
- package/dist/assets/lua-Cyyb5UIc.js +1 -0
- package/dist/assets/m3-B8OfTtLu.js +1 -0
- package/dist/assets/markdown-BFxVWTOG.js +1 -0
- package/dist/assets/mdx-D4_p5PzA.js +1 -0
- package/dist/assets/mips-CiqrrVzr.js +1 -0
- package/dist/assets/monaco-editor-CN2OOCze.js +908 -0
- package/dist/assets/monaco-editor-qiF_U8vl.css +1 -0
- package/dist/assets/msdax-DmeGPVcC.js +1 -0
- package/dist/assets/mysql-C_tMU-Nz.js +1 -0
- package/dist/assets/objective-c-BDtDVThU.js +1 -0
- package/dist/assets/pascal-vHIfCaH5.js +1 -0
- package/dist/assets/pascaligo-DtZ0uQbO.js +1 -0
- package/dist/assets/perl-Ub6l9XKa.js +1 -0
- package/dist/assets/pgsql-BlNEE0v7.js +1 -0
- package/dist/assets/php-BBUBE1dy.js +1 -0
- package/dist/assets/pla-DSh2-awV.js +1 -0
- package/dist/assets/postiats-CocnycG-.js +1 -0
- package/dist/assets/powerquery-tScXyioY.js +1 -0
- package/dist/assets/powershell-COWaemsV.js +1 -0
- package/dist/assets/protobuf-Brw8urJB.js +2 -0
- package/dist/assets/pug-8SOpv6rk.js +1 -0
- package/dist/assets/python-BDvE0baC.js +1 -0
- package/dist/assets/qsharp-Bw9ernYp.js +1 -0
- package/dist/assets/r-j7ic8hl3.js +1 -0
- package/dist/assets/razor-3AZt1jFw.js +1 -0
- package/dist/assets/redis-Bu5POkcn.js +1 -0
- package/dist/assets/redshift-Bs9aos_-.js +1 -0
- package/dist/assets/restructuredtext-CqXO7rUv.js +1 -0
- package/dist/assets/ruby-zBfavPgS.js +1 -0
- package/dist/assets/rust-BzKRNQWT.js +1 -0
- package/dist/assets/sb-BBc9UKZt.js +1 -0
- package/dist/assets/scala-D9hQfWCl.js +1 -0
- package/dist/assets/scheme-BPhDTwHR.js +1 -0
- package/dist/assets/scss-CBJaRo0y.js +3 -0
- package/dist/assets/shell-DiJ1NA_G.js +1 -0
- package/dist/assets/solidity-Db0IVjzk.js +1 -0
- package/dist/assets/sophia-CnS9iZB_.js +1 -0
- package/dist/assets/sparql-CJmd_6j2.js +1 -0
- package/dist/assets/sql-ClhHkBeG.js +1 -0
- package/dist/assets/st-CHwy0fLd.js +1 -0
- package/dist/assets/swift-Bqt4WxQ4.js +3 -0
- package/dist/assets/systemverilog-Bs9z6M-B.js +1 -0
- package/dist/assets/tcl-Dm6ycUr_.js +1 -0
- package/dist/assets/ts.worker-59MjiAqk.js +67731 -0
- package/dist/assets/tsMode-2fAJOXuF.js +11 -0
- package/dist/assets/twig-Csy3S7wG.js +1 -0
- package/dist/assets/typescript-Bv1W4NlY.js +1 -0
- package/dist/assets/typespec-Btyra-wh.js +1 -0
- package/dist/assets/vb-Db0cS2oM.js +1 -0
- package/dist/assets/wgsl-BTesnYfV.js +298 -0
- package/dist/assets/xml-CR03X85Q.js +1 -0
- package/dist/assets/yaml-Qi3RsNvX.js +1 -0
- package/dist/chunks/{EditorView.shell-BGH2VhWM.js → EditorView.shell-DWGMOgiy.js} +215 -165
- package/dist/chunks/EditorView.shell-DWGMOgiy.js.map +1 -0
- package/dist/chunks/daakia-icons-BpwUOdSO.js +4665 -0
- package/dist/chunks/daakia-icons-BpwUOdSO.js.map +1 -0
- package/dist/chunks/vis-runtime-DkpA8K_T.js +32 -0
- package/dist/chunks/vis-runtime-DkpA8K_T.js.map +1 -0
- package/dist/icons/daakia-icons.d.ts +366 -0
- package/dist/index.html +15 -0
- package/dist/index.js +24420 -13385
- package/dist/index.js.map +1 -1
- package/dist/lib/components/button/AIButtonView.d.ts +1 -1
- package/dist/lib/components/button/BookmarkButtonView.d.ts +10 -0
- package/dist/lib/components/button/FabView.d.ts +20 -0
- package/dist/lib/components/button/FollowButtonView.d.ts +10 -0
- package/dist/lib/components/button/HoldToConfirmView.d.ts +14 -0
- package/dist/lib/components/button/IconButtonView.d.ts +1 -1
- package/dist/lib/components/button/LikeButtonView.d.ts +11 -0
- package/dist/lib/components/button/MorphingIconButtonView.d.ts +14 -0
- package/dist/lib/components/button/ThemeToggleView.d.ts +12 -0
- package/dist/lib/components/button/VoteWidgetView.d.ts +13 -0
- package/dist/lib/components/chips/ChipView.d.ts +5 -2
- package/dist/lib/components/chips/CommandChipView.d.ts +28 -0
- package/dist/lib/components/display/AIStreamingTextView.d.ts +16 -0
- package/dist/lib/components/display/ActivityFeedView.d.ts +19 -0
- package/dist/lib/components/display/ApiKeyRowView.d.ts +12 -0
- package/dist/lib/components/display/ArticleCardView.d.ts +16 -0
- package/dist/lib/components/display/AudioPlayerView.d.ts +10 -0
- package/dist/lib/components/display/AudioWaveformView.d.ts +15 -0
- package/dist/lib/components/display/AuditLogRowView.d.ts +14 -0
- package/dist/lib/components/display/AvatarGroupView.d.ts +17 -0
- package/dist/lib/components/display/AvatarView.d.ts +15 -0
- package/dist/lib/components/display/BannerView.d.ts +17 -0
- package/dist/lib/components/display/BarcodeView.d.ts +11 -0
- package/dist/lib/components/display/BreathingLoaderView.d.ts +11 -0
- package/dist/lib/components/display/CalloutView.d.ts +10 -0
- package/dist/lib/components/display/CarouselView.d.ts +12 -0
- package/dist/lib/components/display/ChangelogEntryView.d.ts +16 -0
- package/dist/lib/components/display/CodeBlockView.d.ts +15 -1
- package/dist/lib/components/display/ColumnVisibilityMenuView.d.ts +26 -0
- package/dist/lib/components/display/CommandOrbView.d.ts +15 -0
- package/dist/lib/components/display/CommentThreadView.d.ts +20 -0
- package/dist/lib/components/display/ComparisonSliderView.d.ts +12 -0
- package/dist/lib/components/display/ConfettiBurstView.d.ts +17 -0
- package/dist/lib/components/display/ConnectionPulseLineView.d.ts +14 -0
- package/dist/lib/components/display/ConstellationLoaderView.d.ts +14 -0
- package/dist/lib/components/display/ContactCardView.d.ts +19 -0
- package/dist/lib/components/display/CookieConsentBannerView.d.ts +14 -0
- package/dist/lib/components/display/CountUpNumberView.d.ts +16 -0
- package/dist/lib/components/display/CountdownRingView.d.ts +19 -0
- package/dist/lib/components/display/DataGridToolbarView.d.ts +20 -0
- package/dist/lib/components/display/DataTableView.d.ts +2 -1
- package/dist/lib/components/display/DescriptionsView.d.ts +19 -0
- package/dist/lib/components/display/DiffMorphView.d.ts +13 -0
- package/dist/lib/components/display/DragHandleView.d.ts +10 -0
- package/dist/lib/components/display/EditableCellView.d.ts +13 -0
- package/dist/lib/components/display/EmptyInboxView.d.ts +11 -0
- package/dist/lib/components/display/EnvironmentBadgeView.d.ts +13 -0
- package/dist/lib/components/display/FeatureSpotlightBadgeView.d.ts +11 -0
- package/dist/lib/components/display/FileIconView.d.ts +11 -0
- package/dist/lib/components/display/FileListView.d.ts +20 -0
- package/dist/lib/components/display/FilterBarView.d.ts +17 -0
- package/dist/lib/components/display/GaugeView.d.ts +12 -0
- package/dist/lib/components/display/GlowBorderView.d.ts +11 -0
- package/dist/lib/components/display/GradientTextView.d.ts +13 -0
- package/dist/lib/components/display/HeatmapCalendarView.d.ts +14 -0
- package/dist/lib/components/display/HoloCardView.d.ts +10 -0
- package/dist/lib/components/display/HudView.d.ts +36 -4
- package/dist/lib/components/display/ImageCropperView.d.ts +19 -0
- package/dist/lib/components/display/ImageGalleryView.d.ts +15 -0
- package/dist/lib/components/display/ImageZoomView.d.ts +10 -0
- package/dist/lib/components/display/InfoView.d.ts +23 -0
- package/dist/lib/components/display/InspectorPanelView.d.ts +29 -0
- package/dist/lib/components/display/IntegrationCardView.d.ts +16 -0
- package/dist/lib/components/display/KanbanBoardView.d.ts +27 -0
- package/dist/lib/components/display/KbdView.d.ts +11 -0
- package/dist/lib/components/display/KeyValueListView.d.ts +14 -0
- package/dist/lib/components/display/LatencyPulseView.d.ts +16 -0
- package/dist/lib/components/display/LicenseBadgeView.d.ts +11 -0
- package/dist/lib/components/display/ListView.d.ts +19 -0
- package/dist/lib/components/display/LiveCursorPresenceView.d.ts +19 -0
- package/dist/lib/components/display/LoaderView.d.ts +12 -1
- package/dist/lib/components/display/MagneticButtonView.d.ts +14 -0
- package/dist/lib/components/display/MaintenanceBannerView.d.ts +12 -0
- package/dist/lib/components/display/MessageBannerView.d.ts +13 -0
- package/dist/lib/components/display/MessageBubbleView.d.ts +14 -0
- package/dist/lib/components/display/NetworkGraphView.d.ts +59 -0
- package/dist/lib/components/display/NetworkGraphView.fallback.d.ts +11 -0
- package/dist/lib/components/display/NetworkGraphView.vis.d.ts +2 -0
- package/dist/lib/components/display/NetworkWeatherView.d.ts +12 -0
- package/dist/lib/components/display/NotificationBadgeView.d.ts +17 -0
- package/dist/lib/components/display/ParticleBackgroundView.d.ts +12 -0
- package/dist/lib/components/display/PathRevealView.d.ts +16 -0
- package/dist/lib/components/display/PdfViewerView.d.ts +11 -0
- package/dist/lib/components/display/PermissionMatrixView.d.ts +15 -0
- package/dist/lib/components/display/PresenceDotView.d.ts +12 -0
- package/dist/lib/components/display/PricingCardView.d.ts +16 -0
- package/dist/lib/components/display/ProgressBarView.d.ts +15 -0
- package/dist/lib/components/display/ProgressRingView.d.ts +13 -0
- package/dist/lib/components/display/PulseDotView.d.ts +10 -0
- package/dist/lib/components/display/QRCodeView.d.ts +11 -0
- package/dist/lib/components/display/QuoteBlockView.d.ts +14 -0
- package/dist/lib/components/display/RateLimitMeterView.d.ts +12 -0
- package/dist/lib/components/display/RatingBreakdownView.d.ts +12 -0
- package/dist/lib/components/display/RequestFlowView.d.ts +23 -0
- package/dist/lib/components/display/ResultView.d.ts +14 -0
- package/dist/lib/components/display/RevealOnScrollView.d.ts +14 -0
- package/dist/lib/components/display/SchemaBlueprintView.d.ts +23 -0
- package/dist/lib/components/display/SegmentedProgressBarView.d.ts +17 -0
- package/dist/lib/components/display/ShareSheetView.d.ts +19 -0
- package/dist/lib/components/display/SignaturePadView.d.ts +10 -0
- package/dist/lib/components/display/SkeletonView.d.ts +14 -0
- package/dist/lib/components/display/SnackbarView.d.ts +18 -0
- package/dist/lib/components/display/SortableHeaderView.d.ts +14 -0
- package/dist/lib/components/display/SparklineView.d.ts +14 -0
- package/dist/lib/components/display/StackedSwipeCardView.d.ts +14 -0
- package/dist/lib/components/display/StatTrendCardView.d.ts +16 -0
- package/dist/lib/components/display/StatisticView.d.ts +18 -0
- package/dist/lib/components/display/StatsCardView.d.ts +5 -1
- package/dist/lib/components/display/StatusPageRowView.d.ts +13 -0
- package/dist/lib/components/display/StickyTableHeaderView.d.ts +21 -0
- package/dist/lib/components/display/TablePaginationView.d.ts +16 -0
- package/dist/lib/components/display/TagCloudView.d.ts +17 -0
- package/dist/lib/components/display/TeamMemberRowView.d.ts +13 -0
- package/dist/lib/components/display/TerminalBlockView.d.ts +8 -0
- package/dist/lib/components/display/TestimonialCardView.d.ts +13 -0
- package/dist/lib/components/display/TiltCardView.d.ts +12 -0
- package/dist/lib/components/display/TimelineView.d.ts +20 -0
- package/dist/lib/components/display/TrialCountdownBannerView.d.ts +12 -0
- package/dist/lib/components/display/TypewriterTextView.d.ts +16 -0
- package/dist/lib/components/display/TypingIndicatorView.d.ts +11 -0
- package/dist/lib/components/display/UndoRedoTimelineView.d.ts +19 -0
- package/dist/lib/components/display/UsageMeterView.d.ts +17 -0
- package/dist/lib/components/display/VersionBadgeView.d.ts +13 -0
- package/dist/lib/components/display/VideoPlayerView.d.ts +10 -0
- package/dist/lib/components/display/VirtualizedListView.d.ts +13 -0
- package/dist/lib/components/display/WebhookStatusView.d.ts +15 -0
- package/dist/lib/components/input/AvatarUploadView.d.ts +14 -0
- package/dist/lib/components/input/CalendarView.d.ts +25 -0
- package/dist/lib/components/input/CascaderView.d.ts +23 -0
- package/dist/lib/components/input/ChatInputView.d.ts +17 -0
- package/dist/lib/components/input/ChecklistView.d.ts +17 -0
- package/dist/lib/components/input/ColorPickerView.d.ts +14 -0
- package/dist/lib/components/input/ComboBoxView.d.ts +23 -0
- package/dist/lib/components/input/DateInputView.d.ts +17 -0
- package/dist/lib/components/input/DateRangePickerView.d.ts +26 -0
- package/dist/lib/components/input/DateTimeInputView.d.ts +30 -0
- package/dist/lib/components/input/DialKnobInputView.d.ts +17 -0
- package/dist/lib/components/input/EditorView.d.ts +1 -1
- package/dist/lib/components/input/EmojiPickerView.d.ts +14 -0
- package/dist/lib/components/input/FeedbackWidgetView.d.ts +16 -0
- package/dist/lib/components/input/FileDropzoneView.d.ts +23 -0
- package/dist/lib/components/input/FloatingLabelInputView.d.ts +17 -0
- package/dist/lib/components/input/GhostTypingPlaceholderView.d.ts +19 -0
- package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +1 -1
- package/dist/lib/components/input/HighlightedInputView.d.ts +1 -1
- package/dist/lib/components/input/IconPickerView.d.ts +14 -0
- package/dist/lib/components/input/InlineEditTextView.d.ts +30 -0
- package/dist/lib/components/input/InviteInputView.d.ts +15 -0
- package/dist/lib/components/input/MaskedInputView.d.ts +21 -0
- package/dist/lib/components/input/MentionInputView.d.ts +21 -0
- package/dist/lib/components/input/MergedInputView.d.ts +1 -0
- package/dist/lib/components/input/NpsSurveyView.d.ts +16 -0
- package/dist/lib/components/input/OtpInputView.d.ts +17 -0
- package/dist/lib/components/input/PhoneInputView.d.ts +25 -0
- package/dist/lib/components/input/PickerView.d.ts +38 -0
- package/dist/lib/components/input/PriorityPickerView.d.ts +13 -0
- package/dist/lib/components/input/RadioCardView.d.ts +22 -0
- package/dist/lib/components/input/RadioGroupView.d.ts +21 -0
- package/dist/lib/components/input/RangeSliderView.d.ts +18 -0
- package/dist/lib/components/input/RatingView.d.ts +16 -0
- package/dist/lib/components/input/RichTextToolbarView.d.ts +13 -0
- package/dist/lib/components/input/RoleSelectView.d.ts +21 -0
- package/dist/lib/components/input/SegmentedControlView.d.ts +15 -8
- package/dist/lib/components/input/ShortcutRecorderView.d.ts +15 -0
- package/dist/lib/components/input/SpectrumSliderView.d.ts +16 -0
- package/dist/lib/components/input/StepperInputView.d.ts +16 -0
- package/dist/lib/components/input/SwitchGroupView.d.ts +21 -0
- package/dist/lib/components/input/TabView.d.ts +10 -0
- package/dist/lib/components/input/TimeTravelSliderView.d.ts +21 -0
- package/dist/lib/components/input/TimeWheelView.d.ts +21 -0
- package/dist/lib/components/input/TransferListView.d.ts +21 -0
- package/dist/lib/components/input/TreeSelectView.d.ts +19 -0
- package/dist/lib/components/input/WizardStepperView.d.ts +19 -0
- package/dist/lib/components/layout/AccordionGroupView.d.ts +18 -0
- package/dist/lib/components/layout/AffixView.d.ts +11 -0
- package/dist/lib/components/layout/AnchorView.d.ts +18 -0
- package/dist/lib/components/layout/AspectRatioView.d.ts +12 -0
- package/dist/lib/components/layout/BackToTopView.d.ts +10 -0
- package/dist/lib/components/layout/BreadcrumbView.d.ts +14 -0
- package/dist/lib/components/layout/DockView.d.ts +17 -0
- package/dist/lib/components/layout/FaqAccordionView.d.ts +16 -0
- package/dist/lib/components/layout/HeroView.d.ts +15 -0
- package/dist/lib/components/layout/LevelView.d.ts +13 -0
- package/dist/lib/components/layout/MasonryGridView.d.ts +11 -0
- package/dist/lib/components/layout/MediaObjectView.d.ts +12 -0
- package/dist/lib/components/layout/NavbarView.d.ts +19 -0
- package/dist/lib/components/layout/OnboardingChecklistView.d.ts +19 -0
- package/dist/lib/components/layout/PaginationView.d.ts +12 -0
- package/dist/lib/components/layout/PanelListView.d.ts +28 -0
- package/dist/lib/components/layout/ScrollAreaView.d.ts +11 -0
- package/dist/lib/components/layout/SettingsRowView.d.ts +12 -0
- package/dist/lib/components/layout/SettingsSectionView.d.ts +12 -0
- package/dist/lib/components/layout/SideNavView.d.ts +3 -1
- package/dist/lib/components/layout/StickyHeaderView.d.ts +11 -0
- package/dist/lib/components/layout/TileGridView.d.ts +21 -0
- package/dist/lib/components/layout/WatermarkView.d.ts +16 -0
- package/dist/lib/components/modal/ActionSheetView.d.ts +19 -0
- package/dist/lib/components/modal/AlertDialogView.d.ts +15 -0
- package/dist/lib/components/modal/BottomSheetView.d.ts +14 -0
- package/dist/lib/components/modal/CommandPaletteView.d.ts +21 -0
- package/dist/lib/components/modal/DrawerView.d.ts +15 -0
- package/dist/lib/components/modal/ModalView.d.ts +11 -2
- package/dist/lib/components/modal/NotificationCenterView.d.ts +20 -0
- package/dist/lib/components/modal/PopoverView.d.ts +20 -0
- package/dist/lib/components/modal/SpotlightTourView.d.ts +18 -0
- package/dist/lib/components/modal/StackedToastDeckView.d.ts +17 -0
- package/dist/lib/components/modal/TooltipView.d.ts +28 -0
- package/dist/lib/components/rearrange/RearrangeView.d.ts +3 -3
- package/dist/lib/components/rearrange/SortableView.d.ts +33 -0
- package/dist/lib/components/tabs/TabBarView.d.ts +29 -1
- package/dist/lib/core/AvatarBase.d.ts +21 -0
- package/dist/lib/core/DateBase.d.ts +23 -0
- package/dist/lib/core/DuiTokens.d.ts +10 -0
- package/dist/lib/core/FeedbackBase.d.ts +27 -0
- package/dist/lib/core/LayoutBase.d.ts +21 -0
- package/dist/lib/core/MediaBase.d.ts +20 -0
- package/dist/lib/index.d.ts +392 -1
- package/dist/lib/vis-runtime.d.ts +19 -0
- package/dist/monaco-setup.js +348 -343
- package/dist/monaco-setup.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/editor.js +2 -2
- package/dist/vis-setup.d.ts +1 -0
- package/dist/vis-setup.js +501 -0
- package/dist/vis-setup.js.map +1 -0
- package/package.json +18 -2
- package/dist/chunks/EditorView.shell-BGH2VhWM.js.map +0 -1
- package/dist/chunks/daakia-icons-DxWnX_IQ.js +0 -1726
- package/dist/chunks/daakia-icons-DxWnX_IQ.js.map +0 -1
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { m as Xt, r as Yt } from "./chunks/vis-runtime-DkpA8K_T.js";
|
|
2
|
+
import { jsxs as Ut, jsx as Mt } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as M, useEffect as Et } from "react";
|
|
4
|
+
import { DataSet as Rt } from "vis-data/peer";
|
|
5
|
+
import { Network as Kt } from "vis-network/peer";
|
|
6
|
+
const ut = [
|
|
7
|
+
"#4E79A7",
|
|
8
|
+
"#F28E2B",
|
|
9
|
+
"#E15759",
|
|
10
|
+
"#76B7B2",
|
|
11
|
+
"#59A14F",
|
|
12
|
+
"#EDC948",
|
|
13
|
+
"#B07AA1",
|
|
14
|
+
"#FF9DA7",
|
|
15
|
+
"#9C755F",
|
|
16
|
+
"#BAB0AC"
|
|
17
|
+
], at = 0.12, Vt = 300, Zt = 0.45, Tt = 220, qt = 120, lt = 96, kt = {
|
|
18
|
+
dark: {
|
|
19
|
+
text: "#d4d4d4",
|
|
20
|
+
chipBg: "rgba(37, 37, 38, 0.85)",
|
|
21
|
+
chipBorder: "rgba(255,255,255,0.12)",
|
|
22
|
+
minimapBg: "rgba(17, 24, 39, 0.85)",
|
|
23
|
+
minimapBorder: "rgba(255,255,255,0.2)",
|
|
24
|
+
viewportStroke: "#ffffff"
|
|
25
|
+
},
|
|
26
|
+
light: {
|
|
27
|
+
text: "#1f2328",
|
|
28
|
+
chipBg: "rgba(255, 255, 255, 0.9)",
|
|
29
|
+
chipBorder: "rgba(0,0,0,0.12)",
|
|
30
|
+
minimapBg: "rgba(249, 250, 251, 0.92)",
|
|
31
|
+
minimapBorder: "rgba(0,0,0,0.15)",
|
|
32
|
+
viewportStroke: "#1f2328"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
function Wt(e) {
|
|
36
|
+
return e.color ? e.color : e.communityId != null ? ut[e.communityId % ut.length] : "#6B7280";
|
|
37
|
+
}
|
|
38
|
+
const Jt = (e, s) => e.left < s.right && e.right > s.left && e.top < s.bottom && e.bottom > s.top;
|
|
39
|
+
function Qt() {
|
|
40
|
+
const e = /* @__PURE__ */ new Map(), s = (i, c) => i * 73856093 ^ c * 19349663, f = (i, c) => {
|
|
41
|
+
const m = Math.floor(i.left / lt), C = Math.floor(i.right / lt), O = Math.floor(i.top / lt), K = Math.floor(i.bottom / lt);
|
|
42
|
+
for (let N = m; N <= C; N++) for (let x = O; x <= K; x++) c(s(N, x));
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
collides(i) {
|
|
46
|
+
let c = !1;
|
|
47
|
+
return f(i, (m) => {
|
|
48
|
+
if (c) return;
|
|
49
|
+
const C = e.get(m);
|
|
50
|
+
if (C) {
|
|
51
|
+
for (let O = 0; O < C.length; O++) if (Jt(i, C[O])) {
|
|
52
|
+
c = !0;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}), c;
|
|
57
|
+
},
|
|
58
|
+
insert(i) {
|
|
59
|
+
f(i, (c) => {
|
|
60
|
+
const m = e.get(c);
|
|
61
|
+
m ? m.push(i) : e.set(c, [i]);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function te(e) {
|
|
67
|
+
const s = document.createElement("div");
|
|
68
|
+
return s.style.position = "absolute", s.style.borderRadius = "9999px", s.style.letterSpacing = "0.01em", s.style.whiteSpace = "nowrap", s.style.pointerEvents = "none", s.style.display = "none", e == null || e.appendChild(s), s;
|
|
69
|
+
}
|
|
70
|
+
function _t(e, s, f) {
|
|
71
|
+
e.textContent !== s && (e.textContent = s), e.style.padding !== f.padding && (e.style.padding = f.padding);
|
|
72
|
+
const i = `${f.fontSize}px`;
|
|
73
|
+
e.style.fontSize !== i && (e.style.fontSize = i);
|
|
74
|
+
const c = String(f.fontWeight);
|
|
75
|
+
e.style.fontWeight !== c && (e.style.fontWeight = c), e.style.background !== f.bg && (e.style.background = f.bg);
|
|
76
|
+
const m = `1px solid ${f.border}`;
|
|
77
|
+
e.style.border !== m && (e.style.border = m), e.style.color !== f.color && (e.style.color = f.color);
|
|
78
|
+
}
|
|
79
|
+
function ee(e) {
|
|
80
|
+
return {
|
|
81
|
+
color: e,
|
|
82
|
+
bg: `color-mix(in srgb, ${e} 16%, transparent)`,
|
|
83
|
+
border: `color-mix(in srgb, ${e} 40%, transparent)`,
|
|
84
|
+
fontSize: 12,
|
|
85
|
+
fontWeight: 600,
|
|
86
|
+
padding: "3px 9px"
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function ne(e) {
|
|
90
|
+
return {
|
|
91
|
+
color: e.text,
|
|
92
|
+
bg: e.chipBg,
|
|
93
|
+
border: e.chipBorder,
|
|
94
|
+
fontSize: 10,
|
|
95
|
+
fontWeight: 500,
|
|
96
|
+
padding: "2px 7px"
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function $t(e, s, f) {
|
|
100
|
+
const i = new Set(f.filter((x) => x.communityId === s).map((x) => x.id));
|
|
101
|
+
if (i.size < 2) return;
|
|
102
|
+
for (const x of i)
|
|
103
|
+
if (!e.findNode(x).length || e.isCluster(x)) return;
|
|
104
|
+
const c = ut[s % ut.length], m = `cluster:community:${s}`, C = `Community ${s} (${i.size})`, O = Math.min(20 + i.size * 2, 60), K = Math.max(11, Math.min(16, Math.round(O * 0.32))), N = -(O + K * 0.5);
|
|
105
|
+
e.cluster({
|
|
106
|
+
joinCondition: (x) => i.has(x.id),
|
|
107
|
+
// vis-network genuinely accepts `id` in clusterNodeProperties at runtime
|
|
108
|
+
// (it's how you address the cluster later via openCluster/isCluster) —
|
|
109
|
+
// the shipped .d.ts's NodeOptions type just doesn't declare it.
|
|
110
|
+
clusterNodeProperties: {
|
|
111
|
+
id: m,
|
|
112
|
+
// Member count only — the full name is tooltip + legend-panel only
|
|
113
|
+
// (see the doc comment above). Not empty string: vis-network defaults
|
|
114
|
+
// `label` to the literal "cluster" when it's `undefined`, which would
|
|
115
|
+
// otherwise draw a stray caption under every collapsed community.
|
|
116
|
+
label: String(i.size),
|
|
117
|
+
font: { color: "#ffffff", size: K, vadjust: N },
|
|
118
|
+
title: C,
|
|
119
|
+
shape: "dot",
|
|
120
|
+
// Larger + white-ringed so a collapsed community reads as a distinct
|
|
121
|
+
// "group" at a glance, not just another same-sized leaf node.
|
|
122
|
+
size: O,
|
|
123
|
+
borderWidth: 3,
|
|
124
|
+
color: { background: c, border: "#ffffff", highlight: { background: c, border: "#ffffff" } },
|
|
125
|
+
// Soft colored glow (a hint of the community's own color) instead of a
|
|
126
|
+
// flat plain circle — same "elevated card" depth language dui's own
|
|
127
|
+
// panels use, just expressed on canvas.
|
|
128
|
+
shadow: { enabled: !0, color: `${c}66`, size: 16, x: 0, y: 4 }
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function oe({
|
|
133
|
+
nodes: e,
|
|
134
|
+
edges: s,
|
|
135
|
+
onNodeClick: f,
|
|
136
|
+
selectedId: i,
|
|
137
|
+
fitTrigger: c,
|
|
138
|
+
onReady: m,
|
|
139
|
+
colorBy: C,
|
|
140
|
+
sizeBy: O,
|
|
141
|
+
className: K = "",
|
|
142
|
+
style: N,
|
|
143
|
+
enableClustering: x = !1,
|
|
144
|
+
enableHoverDim: St = !1,
|
|
145
|
+
enableMinimap: q = !1,
|
|
146
|
+
theme: ft = "dark"
|
|
147
|
+
}) {
|
|
148
|
+
const V = M(null), dt = M(null), j = M(null), Dt = M(null), Bt = M(null), Z = M(/* @__PURE__ */ new Map()), Ct = M(/* @__PURE__ */ new Map()), Ot = M(/* @__PURE__ */ new Map()), zt = M(null), pt = M([]), ht = M([]), gt = M(/* @__PURE__ */ new Map()), k = M(i);
|
|
149
|
+
k.current = i;
|
|
150
|
+
const X = M(!1);
|
|
151
|
+
Et(() => {
|
|
152
|
+
if (!V.current) return;
|
|
153
|
+
let u = null;
|
|
154
|
+
Z.current = new Map(e.map((t) => [t.id, t]));
|
|
155
|
+
const w = {}, y = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
|
|
156
|
+
s.forEach((t, n) => {
|
|
157
|
+
w[t.source] = (w[t.source] ?? 0) + 1, w[t.target] = (w[t.target] ?? 0) + 1, y.has(t.source) || y.set(t.source, /* @__PURE__ */ new Set()), y.has(t.target) || y.set(t.target, /* @__PURE__ */ new Set()), y.get(t.source).add(t.target), y.get(t.target).add(t.source);
|
|
158
|
+
const r = t.id ?? n;
|
|
159
|
+
z.has(t.source) || z.set(t.source, /* @__PURE__ */ new Set()), z.has(t.target) || z.set(t.target, /* @__PURE__ */ new Set()), z.get(t.source).add(r), z.get(t.target).add(r);
|
|
160
|
+
}), Ct.current = y, Ot.current = z;
|
|
161
|
+
const L = Math.max(1, ...Object.values(w)), R = kt[ft], J = /* @__PURE__ */ new Map(), bt = e.map((t) => {
|
|
162
|
+
const n = C ? C(t) : Wt(t);
|
|
163
|
+
J.set(t.id, n);
|
|
164
|
+
const r = w[t.id] ?? 1, a = O ? O(t, r, L) : 10 + 30 * (r / L);
|
|
165
|
+
return {
|
|
166
|
+
id: t.id,
|
|
167
|
+
title: t.label,
|
|
168
|
+
// No `label` here on purpose: every label is a pooled DOM chip
|
|
169
|
+
// positioned by syncAllChipPositions. Collapsed community nodes are
|
|
170
|
+
// the one exception and set their own label natively — see
|
|
171
|
+
// clusterCommunity.
|
|
172
|
+
// Selection keeps the node's own fill and flags it with a themed
|
|
173
|
+
// border instead — the old highlight swapped the fill to the theme
|
|
174
|
+
// text color, which read as a jarring near-black circle in light
|
|
175
|
+
// mode (and near-white in dark).
|
|
176
|
+
color: { background: n, border: n, highlight: { background: n, border: R.text } },
|
|
177
|
+
size: Math.round(a * 10) / 10,
|
|
178
|
+
shape: "dot"
|
|
179
|
+
};
|
|
180
|
+
}), nt = s.map((t, n) => ({
|
|
181
|
+
id: t.id ?? n,
|
|
182
|
+
from: t.source,
|
|
183
|
+
to: t.target,
|
|
184
|
+
title: t.type,
|
|
185
|
+
// Blends from the source node's color to the target's at the
|
|
186
|
+
// midpoint instead of a flat gray line — a vis-network-native
|
|
187
|
+
// stand-in for the gradient edges ck8t's ReactFlow canvas uses.
|
|
188
|
+
color: { inherit: "both", opacity: 0.55 },
|
|
189
|
+
arrows: { to: { enabled: !0, scaleFactor: 0.6 } }
|
|
190
|
+
})), F = new Rt(bt), W = new Rt(nt);
|
|
191
|
+
Dt.current = F, Bt.current = W;
|
|
192
|
+
const Q = e.length > Vt, wt = {
|
|
193
|
+
// vis-network defaults `layout.improvedLayout` to true, which runs a
|
|
194
|
+
// Kamada-Kawai pre-positioning pass whenever the graph exceeds its
|
|
195
|
+
// internal clusterThreshold (150 nodes). On graphs with many
|
|
196
|
+
// uneven-sized communities that pass regularly fails to reduce the
|
|
197
|
+
// graph within its own iteration budget: it logs "This network could
|
|
198
|
+
// not be positioned by this version of the improved layout
|
|
199
|
+
// algorithm" and falls back to leaving most nodes near their default
|
|
200
|
+
// circular starting positions with a ±35px jitter — the stray ring of
|
|
201
|
+
// dots around the outside that physics then can't pull in within its
|
|
202
|
+
// stabilization budget. Skipping the pre-pass (vis's own documented
|
|
203
|
+
// suggestion, printed in that same message) lets forceAtlas2Based
|
|
204
|
+
// position everything from a clean random start instead.
|
|
205
|
+
layout: { improvedLayout: !1 },
|
|
206
|
+
physics: {
|
|
207
|
+
enabled: !0,
|
|
208
|
+
solver: "forceAtlas2Based",
|
|
209
|
+
forceAtlas2Based: {
|
|
210
|
+
gravitationalConstant: -60,
|
|
211
|
+
centralGravity: 5e-3,
|
|
212
|
+
springLength: 120,
|
|
213
|
+
springConstant: 0.08,
|
|
214
|
+
damping: 0.4,
|
|
215
|
+
avoidOverlap: 0.8
|
|
216
|
+
},
|
|
217
|
+
stabilization: { iterations: 200, fit: !0 }
|
|
218
|
+
},
|
|
219
|
+
// hideEdgesOnZoom mirrors hideEdgesOnDrag below — edges (continuous
|
|
220
|
+
// smooth curves + shadows) are by far the most expensive thing on
|
|
221
|
+
// canvas to redraw every frame; hiding them for the duration of a
|
|
222
|
+
// zoom gesture (mouse wheel or pinch) is what actually fixes "zoom
|
|
223
|
+
// feels like a turtle" on a large graph, vs. anything in our own
|
|
224
|
+
// event handlers (which only ever ran custom code on TOP of vis's
|
|
225
|
+
// own native per-frame draw loop, never touched by throttling it).
|
|
226
|
+
interaction: {
|
|
227
|
+
hover: !0,
|
|
228
|
+
tooltipDelay: 100,
|
|
229
|
+
hideEdgesOnDrag: !0,
|
|
230
|
+
hideEdgesOnZoom: !0,
|
|
231
|
+
navigationButtons: !1
|
|
232
|
+
},
|
|
233
|
+
// Soft drop shadow on every node — same elevated-card depth cue dui's
|
|
234
|
+
// own panels use, expressed via canvas shadow instead of CSS box-shadow.
|
|
235
|
+
// Shadows aren't covered by hideEdgesOnZoom (nodes stay visible while
|
|
236
|
+
// zooming) and shadowBlur is one of canvas's most expensive per-shape
|
|
237
|
+
// operations — skip them above LARGE_GRAPH_NODE_THRESHOLD.
|
|
238
|
+
nodes: {
|
|
239
|
+
shape: "dot",
|
|
240
|
+
borderWidth: 1.5,
|
|
241
|
+
borderWidthSelected: 3,
|
|
242
|
+
shadow: { enabled: !Q, color: "rgba(0,0,0,0.35)", size: 8, x: 0, y: 3 }
|
|
243
|
+
},
|
|
244
|
+
edges: {
|
|
245
|
+
// 'continuous' recomputes bezier control points per edge per draw —
|
|
246
|
+
// the most expensive of vis-network's smooth types. Straight lines
|
|
247
|
+
// above the threshold; edges are hidden during zoom either way.
|
|
248
|
+
smooth: Q ? !1 : { enabled: !0, type: "continuous", roundness: 0.25 },
|
|
249
|
+
shadow: { enabled: !Q, color: "rgba(0,0,0,0.12)", size: 3, x: 0, y: 1 }
|
|
250
|
+
}
|
|
251
|
+
}, o = new Kt(V.current, { nodes: F, edges: W }, wt);
|
|
252
|
+
j.current = o;
|
|
253
|
+
const G = () => {
|
|
254
|
+
const t = dt.current;
|
|
255
|
+
if (!t || !q) return;
|
|
256
|
+
const n = t.getContext("2d");
|
|
257
|
+
if (!n) return;
|
|
258
|
+
const r = o.getPositions(), a = Object.values(r).map((l) => l.x), d = Object.values(r).map((l) => l.y);
|
|
259
|
+
if (a.length === 0) return;
|
|
260
|
+
const S = Math.min(...a), D = Math.max(...a), p = Math.min(...d), et = Math.max(...d), U = t.width, H = t.height, it = Math.max(1, D - S), st = Math.max(1, et - p), h = (l, v) => [
|
|
261
|
+
(l - S) / it * (U - 10) + 5,
|
|
262
|
+
(v - p) / st * (H - 10) + 5
|
|
263
|
+
];
|
|
264
|
+
n.clearRect(0, 0, U, H), n.fillStyle = R.minimapBg, n.fillRect(0, 0, U, H), Object.entries(r).forEach(([l, v]) => {
|
|
265
|
+
const [B, b] = h(v.x, v.y), A = Z.current.get(l);
|
|
266
|
+
n.fillStyle = A ? C ? C(A) : Wt(A) : "#6B7280", n.beginPath();
|
|
267
|
+
const _ = w[l] ?? 0;
|
|
268
|
+
n.arc(B, b, 1 + 1.5 * (_ / L), 0, Math.PI * 2), n.fill();
|
|
269
|
+
});
|
|
270
|
+
const g = o.getScale(), E = o.getViewPosition(), T = V.current;
|
|
271
|
+
if (T && g > 0) {
|
|
272
|
+
const l = T.clientWidth / g, v = T.clientHeight / g, [B, b] = h(E.x - l / 2, E.y - v / 2), [A, _] = h(E.x + l / 2, E.y + v / 2);
|
|
273
|
+
n.strokeStyle = R.viewportStroke, n.lineWidth = 1, n.strokeRect(B, b, A - B, _ - b);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
let I = null;
|
|
277
|
+
const ot = () => {
|
|
278
|
+
I = null;
|
|
279
|
+
};
|
|
280
|
+
let xt = null, vt = null;
|
|
281
|
+
const At = /* @__PURE__ */ new Map();
|
|
282
|
+
s.forEach((t, n) => {
|
|
283
|
+
t.type && At.set(t.id ?? n, t.type);
|
|
284
|
+
});
|
|
285
|
+
const Pt = (t, n) => {
|
|
286
|
+
let r = t[n];
|
|
287
|
+
return r || (r = te(zt.current), t[n] = r), r;
|
|
288
|
+
}, Lt = (t, n, r) => {
|
|
289
|
+
const a = `${n}\0${r}`;
|
|
290
|
+
let d = gt.current.get(a);
|
|
291
|
+
return d || (d = { w: t.offsetWidth, h: t.offsetHeight }, gt.current.set(a, d)), d;
|
|
292
|
+
}, rt = (t, n) => {
|
|
293
|
+
for (let r = n; r < t.length; r++)
|
|
294
|
+
t[r].style.display !== "none" && (t[r].style.display = "none");
|
|
295
|
+
}, Y = () => {
|
|
296
|
+
var it, st;
|
|
297
|
+
const t = pt.current, n = ht.current, r = ((it = V.current) == null ? void 0 : it.clientWidth) ?? 0, a = ((st = V.current) == null ? void 0 : st.clientHeight) ?? 0;
|
|
298
|
+
if (o.getScale() < Zt || !r || !a) {
|
|
299
|
+
rt(t, 0), rt(n, 0);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
I || (I = o.getPositions());
|
|
303
|
+
const d = o.DOMtoCanvas({ x: 0, y: 0 }), S = o.DOMtoCanvas({ x: r, y: a }), D = [];
|
|
304
|
+
for (const h in I) {
|
|
305
|
+
const g = I[h];
|
|
306
|
+
g.x < d.x || g.x > S.x || g.y < d.y || g.y > S.y || Z.current.has(h) && D.push({ id: h, deg: w[h] ?? 0 });
|
|
307
|
+
}
|
|
308
|
+
D.length > Tt && (D.sort((h, g) => g.deg - h.deg), D.length = Tt);
|
|
309
|
+
const p = Qt(), et = 12;
|
|
310
|
+
let U = 0;
|
|
311
|
+
for (const h of D) {
|
|
312
|
+
const g = Z.current.get(h.id);
|
|
313
|
+
if (!(g != null && g.label) || o.findNode(h.id).length !== 1) continue;
|
|
314
|
+
const E = o.getBoundingBox(h.id);
|
|
315
|
+
if (!E) continue;
|
|
316
|
+
const T = o.canvasToDOM({ x: (E.left + E.right) / 2, y: E.bottom }), l = Pt(t, U);
|
|
317
|
+
_t(l, g.label, ee(J.get(h.id) ?? "#6B7280")), l.style.display !== "" && (l.style.display = "");
|
|
318
|
+
const v = !xt || xt.has(h.id) ? "1" : String(at);
|
|
319
|
+
l.style.opacity !== v && (l.style.opacity = v);
|
|
320
|
+
const { w: B, h: b } = Lt(l, "n", g.label), A = T.x - B / 2, _ = T.y + 6;
|
|
321
|
+
let $ = A, P = _;
|
|
322
|
+
for (let ct = 0; ct < et; ct++) {
|
|
323
|
+
const Nt = Math.floor(ct / 3), jt = ct % 3 - 1;
|
|
324
|
+
if ($ = A + jt * (B + 6), P = _ + Nt * (b + 3), !p.collides({ left: $, top: P, right: $ + B, bottom: P + b })) break;
|
|
325
|
+
}
|
|
326
|
+
l.style.left = `${$}px`, l.style.top = `${P}px`, p.insert({ left: $, top: P, right: $ + B, bottom: P + b }), U++;
|
|
327
|
+
}
|
|
328
|
+
rt(t, U);
|
|
329
|
+
let H = 0;
|
|
330
|
+
for (const [h, g] of At) {
|
|
331
|
+
if (H >= qt) break;
|
|
332
|
+
const E = W.get(h);
|
|
333
|
+
if (!E) continue;
|
|
334
|
+
const T = I[E.from], l = I[E.to];
|
|
335
|
+
if (!T || !l) continue;
|
|
336
|
+
const v = { x: (T.x + l.x) / 2, y: (T.y + l.y) / 2 };
|
|
337
|
+
if (v.x < d.x || v.x > S.x || v.y < d.y || v.y > S.y || o.findNode(E.from).length !== 1 || o.findNode(E.to).length !== 1) continue;
|
|
338
|
+
const B = o.canvasToDOM(v), b = Pt(n, H);
|
|
339
|
+
_t(b, g, ne(R)), b.style.display !== "" && (b.style.display = "");
|
|
340
|
+
const A = !vt || vt.has(h) ? "1" : String(at);
|
|
341
|
+
b.style.opacity !== A && (b.style.opacity = A);
|
|
342
|
+
const { w: _, h: $ } = Lt(b, "e", g), P = { left: B.x - _ / 2, top: B.y - $ / 2, right: B.x + _ / 2, bottom: B.y + $ / 2 };
|
|
343
|
+
if (p.collides(P)) {
|
|
344
|
+
b.style.display = "none";
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
b.style.left = `${P.left}px`, b.style.top = `${P.top}px`, p.insert(P), H++;
|
|
348
|
+
}
|
|
349
|
+
rt(n, H);
|
|
350
|
+
};
|
|
351
|
+
let tt = null;
|
|
352
|
+
const Ht = () => {
|
|
353
|
+
X.current || tt === null && (tt = requestAnimationFrame(() => {
|
|
354
|
+
tt = null, Y();
|
|
355
|
+
}));
|
|
356
|
+
};
|
|
357
|
+
if (o.once("stabilizationIterationsDone", () => {
|
|
358
|
+
o.setOptions({ physics: { enabled: !1 } });
|
|
359
|
+
let t = !1;
|
|
360
|
+
if (x) {
|
|
361
|
+
const r = new Set(e.map((a) => a.communityId).filter((a) => a != null));
|
|
362
|
+
r.forEach((a) => $t(o, a, e)), r.size > 1 && (t = !0, o.once("stabilizationIterationsDone", () => {
|
|
363
|
+
o.setOptions({ physics: { enabled: !1 } }), G(), ot(), Y(), k.current && o.findNode(k.current).length > 0 && (o.selectNodes([k.current]), o.focus(k.current, { scale: 1.4, animation: !0 }), X.current = !0), m == null || m();
|
|
364
|
+
}), o.setOptions({
|
|
365
|
+
physics: { enabled: !0, stabilization: { iterations: 80, fit: !1 } }
|
|
366
|
+
}), o.stabilize(80));
|
|
367
|
+
}
|
|
368
|
+
const n = o.getScale();
|
|
369
|
+
n > 0 && o.moveTo({ scale: n * 0.92 }), G(), ot(), Y(), t || (k.current && o.findNode(k.current).length > 0 && (o.selectNodes([k.current]), o.focus(k.current, { scale: 1.4, animation: !0 }), X.current = !0), m == null || m());
|
|
370
|
+
}), o.on("afterDrawing", Ht), o.on("dragEnd", () => {
|
|
371
|
+
ot(), Y();
|
|
372
|
+
}), o.on("animationFinished", () => {
|
|
373
|
+
X.current = !1, Y(), q && G();
|
|
374
|
+
}), o.on("click", (t) => {
|
|
375
|
+
if (t.nodes.length === 0) return;
|
|
376
|
+
const n = t.nodes[0], r = Z.current.get(n);
|
|
377
|
+
if (r) {
|
|
378
|
+
f == null || f(r);
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
o.isCluster(n) && (f == null || f({ id: n, label: n }));
|
|
382
|
+
}), x && o.on("doubleClick", (t) => {
|
|
383
|
+
if (t.nodes.length !== 1) return;
|
|
384
|
+
const n = t.nodes[0];
|
|
385
|
+
if (o.isCluster(n))
|
|
386
|
+
o.openCluster(n);
|
|
387
|
+
else {
|
|
388
|
+
const r = Z.current.get(n);
|
|
389
|
+
(r == null ? void 0 : r.communityId) != null && $t(o, r.communityId, e);
|
|
390
|
+
}
|
|
391
|
+
G(), ot(), Y();
|
|
392
|
+
}), St) {
|
|
393
|
+
let t = new Set(F.getIds()), n = new Set(W.getIds());
|
|
394
|
+
const r = (a, d) => {
|
|
395
|
+
const S = [];
|
|
396
|
+
for (const p of a) t.has(p) || S.push({ id: p, opacity: 1 });
|
|
397
|
+
for (const p of t) a.has(p) || S.push({ id: p, opacity: at });
|
|
398
|
+
S.length && F.update(S);
|
|
399
|
+
const D = [];
|
|
400
|
+
for (const p of d)
|
|
401
|
+
n.has(p) || D.push({ id: p, color: { inherit: "both", opacity: 0.9 } });
|
|
402
|
+
for (const p of n)
|
|
403
|
+
d.has(p) || D.push({ id: p, color: { inherit: "both", opacity: at } });
|
|
404
|
+
D.length && W.update(D), xt = a, vt = d, Y(), t = a, n = d;
|
|
405
|
+
};
|
|
406
|
+
o.on("hoverNode", (a) => {
|
|
407
|
+
u !== null && (clearTimeout(u), u = null);
|
|
408
|
+
const d = a.node, S = Ct.current.get(d) ?? /* @__PURE__ */ new Set(), D = new Set(
|
|
409
|
+
[d, ...S].filter((et) => F.get(et) != null)
|
|
410
|
+
), p = Ot.current.get(d) ?? /* @__PURE__ */ new Set();
|
|
411
|
+
r(D, p);
|
|
412
|
+
}), o.on("blurNode", () => {
|
|
413
|
+
u = setTimeout(() => {
|
|
414
|
+
u = null, r(new Set(F.getIds()), new Set(W.getIds()));
|
|
415
|
+
}, 80);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
if (q) {
|
|
419
|
+
o.on("dragEnd", G);
|
|
420
|
+
let t = 0;
|
|
421
|
+
const n = () => {
|
|
422
|
+
if (X.current) return;
|
|
423
|
+
const r = Date.now();
|
|
424
|
+
r - t < 100 || (t = r, G());
|
|
425
|
+
};
|
|
426
|
+
o.on("zoom", n), o.on("afterDrawing", n);
|
|
427
|
+
}
|
|
428
|
+
return () => {
|
|
429
|
+
u !== null && clearTimeout(u), tt !== null && cancelAnimationFrame(tt), o.destroy(), j.current = null, Dt.current = null, Bt.current = null;
|
|
430
|
+
for (const t of pt.current) t.remove();
|
|
431
|
+
pt.current = [];
|
|
432
|
+
for (const t of ht.current) t.remove();
|
|
433
|
+
ht.current = [], gt.current.clear();
|
|
434
|
+
};
|
|
435
|
+
}, [e, s, x, St, q, ft]), Et(() => {
|
|
436
|
+
const u = j.current;
|
|
437
|
+
!u || !i || u.findNode(i).length > 0 && (u.selectNodes([i]), u.focus(i, { scale: 1.4, animation: !0 }), X.current = !0);
|
|
438
|
+
}, [i, e]);
|
|
439
|
+
const mt = M(c);
|
|
440
|
+
Et(() => {
|
|
441
|
+
const u = j.current;
|
|
442
|
+
if (!u || c === void 0 || c === mt.current) {
|
|
443
|
+
mt.current = c;
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
mt.current = c, u.unselectAll(), u.fit({ animation: !0 }), X.current = !0;
|
|
447
|
+
}, [c]);
|
|
448
|
+
const It = (u) => {
|
|
449
|
+
const w = j.current, y = dt.current;
|
|
450
|
+
if (!w || !y) return null;
|
|
451
|
+
const z = w.getPositions(), L = Object.values(z).map((I) => I.x), R = Object.values(z).map((I) => I.y);
|
|
452
|
+
if (L.length === 0) return null;
|
|
453
|
+
const J = Math.min(...L), bt = Math.max(...L), nt = Math.min(...R), F = Math.max(...R), W = y.getBoundingClientRect(), Q = u.clientX - W.left, wt = u.clientY - W.top, o = Math.max(1, bt - J), G = Math.max(1, F - nt);
|
|
454
|
+
return {
|
|
455
|
+
x: (Q - 5) / (y.width - 10) * o + J,
|
|
456
|
+
y: (wt - 5) / (y.height - 10) * G + nt
|
|
457
|
+
};
|
|
458
|
+
}, Ft = (u) => {
|
|
459
|
+
var y;
|
|
460
|
+
const w = It(u);
|
|
461
|
+
w && ((y = j.current) == null || y.moveTo({ position: w, animation: !0 }));
|
|
462
|
+
}, yt = M(!1), Gt = (u) => {
|
|
463
|
+
yt.current = !0;
|
|
464
|
+
const w = (z) => {
|
|
465
|
+
var R;
|
|
466
|
+
if (!yt.current) return;
|
|
467
|
+
const L = It(z);
|
|
468
|
+
L && ((R = j.current) == null || R.moveTo({ position: L }));
|
|
469
|
+
}, y = () => {
|
|
470
|
+
yt.current = !1, window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", y);
|
|
471
|
+
};
|
|
472
|
+
window.addEventListener("mousemove", w), window.addEventListener("mouseup", y), u.preventDefault();
|
|
473
|
+
};
|
|
474
|
+
return /* @__PURE__ */ Ut("div", { className: K, style: { width: "100%", height: "100%", position: "relative", ...N }, children: [
|
|
475
|
+
/* @__PURE__ */ Mt("div", { ref: V, style: { width: "100%", height: "100%" } }),
|
|
476
|
+
/* @__PURE__ */ Mt("div", { ref: zt, style: { position: "absolute", inset: 0, overflow: "hidden", pointerEvents: "none" } }),
|
|
477
|
+
q && /* @__PURE__ */ Mt(
|
|
478
|
+
"canvas",
|
|
479
|
+
{
|
|
480
|
+
ref: dt,
|
|
481
|
+
width: 140,
|
|
482
|
+
height: 100,
|
|
483
|
+
onClick: Ft,
|
|
484
|
+
onMouseDown: Gt,
|
|
485
|
+
style: {
|
|
486
|
+
// bottom 72 (not 8): host apps commonly float a chat/action
|
|
487
|
+
// orb in the bottom-right corner — leave that spot free.
|
|
488
|
+
position: "absolute",
|
|
489
|
+
bottom: 72,
|
|
490
|
+
right: 8,
|
|
491
|
+
borderRadius: 4,
|
|
492
|
+
border: `1px solid ${kt[ft].minimapBorder}`,
|
|
493
|
+
cursor: "grab"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
] });
|
|
498
|
+
}
|
|
499
|
+
Yt(oe);
|
|
500
|
+
Xt();
|
|
501
|
+
//# sourceMappingURL=vis-setup.js.map
|