@tanstack/devtools 0.6.19 → 0.6.21

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.
@@ -1,11 +1,15 @@
1
- import { usePiPWindow, keyboardModifiers, getAllPermutations, TANSTACK_DEVTOOLS, DevtoolsContext, PLUGIN_TITLE_CONTAINER_ID, PLUGIN_CONTAINER_ID, uppercaseFirstLetter } from '../chunk/XFQ6P775.js';
2
- import { delegateEvents, createComponent, Portal, template, use, setAttribute, insert, memo, effect, className, addEventListener } from 'solid-js/web';
3
- import { createContext, createSignal, createEffect, onCleanup, Show, createMemo, For, useContext, onMount } from 'solid-js';
4
- import { createShortcut } from '@solid-primitives/keyboard';
5
- import { ThemeContextProvider, MainPanel as MainPanel$1, Section, SectionTitle, SectionIcon, SectionDescription, Checkbox, Input, Select, Button } from '@tanstack/devtools-ui';
1
+ import { usePiPWindow, keyboardModifiers, getAllPermutations, TANSTACK_DEVTOOLS, DevtoolsContext, PLUGIN_TITLE_CONTAINER_ID, PLUGIN_CONTAINER_ID, uppercaseFirstLetter } from '../chunk/XF4JFOLU.js';
2
+ import { delegateEvents, createComponent, Portal, template, use, setAttribute, insert, memo, effect, className, addEventListener, style, classList } from 'solid-js/web';
3
+ import { createContext, createSignal, createEffect, Show, createMemo, For, useContext, onCleanup, onMount } from 'solid-js';
4
+ import { createShortcut, useKeyDownList } from '@solid-primitives/keyboard';
5
+ import { ThemeContextProvider, MainPanel as MainPanel$1, Section, SectionTitle, SectionIcon, SectionDescription, Checkbox, Input, Select, Button, ChevronDownIcon, CloseIcon, SearchIcon, SettingsIcon, PackageIcon, ExternalLinkIcon, CheckCircleIcon, XCircleIcon } from '@tanstack/devtools-ui';
6
6
  import clsx3 from 'clsx';
7
7
  import * as goober from 'goober';
8
8
  import { PiP, X, List, PageSearch, Cogs, SettingsCog, Link, Keyboard, GeoTag, SocialBubble } from '@tanstack/devtools-ui/icons';
9
+ import { devtoolsEventClient } from '@tanstack/devtools-client';
10
+ import { createStore } from 'solid-js/store';
11
+ import { createElementSize } from '@solid-primitives/resize-observer';
12
+ import { createEventListener } from '@solid-primitives/event-listener';
9
13
 
10
14
  var useDraw = (props) => {
11
15
  const [activeHover, setActiveHover] = createSignal(false);
@@ -476,8 +480,8 @@ var stylesFactory = (theme) => {
476
480
  padding: 0;
477
481
  margin: 0 auto;
478
482
  background: ${t(colors.white, colors.darkGray[700])};
479
- border-radius: 12px;
480
- box-shadow: 0 2px 16px ${t("rgba(0, 0, 0, 0.04)", "rgba(0, 0, 0, 0.08)")};
483
+ border-radius: 8px;
484
+ box-shadow: none;
481
485
  overflow-y: auto;
482
486
  height: 100%;
483
487
  display: flex;
@@ -489,16 +493,16 @@ var stylesFactory = (theme) => {
489
493
  seoTabTitle: css2`
490
494
  font-size: 1.25rem;
491
495
  font-weight: 600;
492
- color: ${t(colors.purple[500], colors.purple[400])};
496
+ color: ${t(colors.gray[900], colors.gray[100])};
493
497
  margin: 0;
494
498
  padding: 1rem 1.5rem 0.5rem 1.5rem;
495
499
  text-align: left;
496
- border-bottom: 1px solid ${t(colors.gray[300], colors.gray[700])};
500
+ border-bottom: 1px solid ${t(colors.gray[200], colors.gray[800])};
497
501
  `,
498
502
  seoTabSection: css2`
499
503
  padding: 1.5rem;
500
- background: ${t(colors.gray[100], colors.gray[800])};
501
- border: 1px solid ${t(colors.gray[300], colors.gray[700])};
504
+ background: ${t(colors.gray[50], colors.darkGray[800])};
505
+ border: 1px solid ${t(colors.gray[200], colors.gray[800])};
502
506
  display: flex;
503
507
  flex-direction: column;
504
508
  gap: 0.5rem;
@@ -517,12 +521,12 @@ var stylesFactory = (theme) => {
517
521
  padding-bottom: 0.5rem;
518
522
  `,
519
523
  seoPreviewCard: css2`
520
- border: 1px solid ${t(colors.gray[300], colors.gray[700])};
524
+ border: 1px solid ${t(colors.gray[200], colors.gray[800])};
521
525
  border-radius: 8px;
522
526
  padding: 12px 10px;
523
527
  background: ${t(colors.white, colors.darkGray[900])};
524
528
  margin-bottom: 0;
525
- box-shadow: 0 1px 4px ${t("rgba(0,0,0,0.02)", "rgba(0,0,0,0.04)")};
529
+ box-shadow: 0 1px 3px ${t("rgba(0,0,0,0.05)", "rgba(0,0,0,0.1)")};
526
530
  display: flex;
527
531
  flex-direction: column;
528
532
  align-items: flex-start;
@@ -532,10 +536,10 @@ var stylesFactory = (theme) => {
532
536
  gap: 4px;
533
537
  `,
534
538
  seoPreviewHeader: css2`
535
- font-size: 1rem;
536
- font-weight: 500;
537
- margin-bottom: 6px;
538
- color: ${t(colors.purple[500], colors.purple[400])};
539
+ font-size: 0.875rem;
540
+ font-weight: 600;
541
+ margin-bottom: 0;
542
+ color: ${t(colors.gray[700], colors.gray[300])};
539
543
  `,
540
544
  seoPreviewImage: css2`
541
545
  max-width: 100%;
@@ -543,28 +547,29 @@ var stylesFactory = (theme) => {
543
547
  margin-bottom: 6px;
544
548
  box-shadow: 0 1px 2px ${t("rgba(0,0,0,0.03)", "rgba(0,0,0,0.06)")};
545
549
  height: 160px;
550
+ object-fit: cover;
546
551
  `,
547
552
  seoPreviewTitle: css2`
548
- font-size: 1rem;
553
+ font-size: 0.9rem;
549
554
  font-weight: 600;
550
- margin-bottom: 2px;
555
+ margin-bottom: 4px;
551
556
  color: ${t(colors.gray[900], colors.gray[100])};
552
557
  `,
553
558
  seoPreviewDesc: css2`
554
- color: ${t(colors.gray[700], colors.gray[300])};
555
- margin-bottom: 2px;
556
- font-size: 0.95rem;
559
+ color: ${t(colors.gray[600], colors.gray[400])};
560
+ margin-bottom: 4px;
561
+ font-size: 0.8rem;
557
562
  `,
558
563
  seoPreviewUrl: css2`
559
564
  color: ${t(colors.gray[500], colors.gray[500])};
560
- font-size: 0.9rem;
561
- margin-bottom: 2px;
565
+ font-size: 0.75rem;
566
+ margin-bottom: 0;
562
567
  word-break: break-all;
563
568
  `,
564
569
  seoMissingTagsSection: css2`
565
570
  margin-top: 4px;
566
- font-size: 0.95rem;
567
- color: ${t(colors.red[400], colors.red[400])};
571
+ font-size: 0.875rem;
572
+ color: ${t(colors.red[500], colors.red[400])};
568
573
  `,
569
574
  seoMissingTagsList: css2`
570
575
  margin: 4px 0 0 0;
@@ -572,22 +577,23 @@ var stylesFactory = (theme) => {
572
577
  list-style: none;
573
578
  display: flex;
574
579
  flex-wrap: wrap;
575
- gap: 6px;
580
+ gap: 4px;
576
581
  max-width: 240px;
577
582
  `,
578
583
  seoMissingTag: css2`
579
584
  background: ${t(colors.red[100], colors.red[500] + "22")};
580
585
  color: ${t(colors.red[700], colors.red[500])};
581
- border-radius: 4px;
582
- padding: 1px 6px;
583
- font-size: 0.9rem;
586
+ border-radius: 3px;
587
+ padding: 2px 6px;
588
+ font-size: 0.75rem;
584
589
  font-weight: 500;
585
590
  `,
586
591
  seoAllTagsFound: css2`
587
592
  color: ${t(colors.green[700], colors.green[500])};
588
593
  font-weight: 500;
589
- margin-left: 6px;
590
- font-size: 0.95rem;
594
+ margin-left: 0;
595
+ padding: 0 10px 8px 10px;
596
+ font-size: 0.875rem;
591
597
  `,
592
598
  devtoolsPanelContainer: (panelLocation, isDetached) => css2`
593
599
  direction: ltr;
@@ -599,7 +605,7 @@ var stylesFactory = (theme) => {
599
605
  z-index: 99999;
600
606
  width: 100%;
601
607
  ${isDetached ? "" : "max-height: 90%;"}
602
- border-top: 1px solid ${t(colors.gray[300], colors.gray[700])};
608
+ border-top: 1px solid ${t(colors.gray[200], colors.gray[800])};
603
609
  transform-origin: top;
604
610
  `,
605
611
  devtoolsPanelContainerVisibility: (isOpen) => {
@@ -652,7 +658,7 @@ var stylesFactory = (theme) => {
652
658
  user-select: none;
653
659
  z-index: 100000;
654
660
  &:hover {
655
- background-color: ${t(colors.purple[700], colors.purple[400])};
661
+ background-color: ${t(colors.gray[400], colors.gray[500])};
656
662
  }
657
663
  `,
658
664
  mainCloseBtn: css2`
@@ -731,9 +737,9 @@ var stylesFactory = (theme) => {
731
737
  align-items: center;
732
738
  justify-content: flex-start;
733
739
  height: 100%;
734
- background-color: ${t(colors.gray[100], colors.darkGray[800])};
735
- border-right: 1px solid ${t(colors.gray[300], colors.gray[700])};
736
- box-shadow: 0 1px 0 ${t(colors.gray[200], colors.gray[700])};
740
+ background-color: ${t(colors.gray[50], colors.darkGray[900])};
741
+ border-right: 1px solid ${t(colors.gray[200], colors.gray[800])};
742
+ box-shadow: none;
737
743
  position: relative;
738
744
  width: ${size[10]};
739
745
  `,
@@ -746,24 +752,24 @@ var stylesFactory = (theme) => {
746
752
  cursor: pointer;
747
753
  font-size: ${fontSize.sm};
748
754
  font-family: ${fontFamily.sans};
749
- color: ${t(colors.gray[700], colors.gray[300])};
755
+ color: ${t(colors.gray[600], colors.gray[400])};
750
756
  background-color: transparent;
751
757
  border: none;
752
- transition: all 0.2s ease-in-out;
758
+ transition: all 0.15s ease;
753
759
  border-left: 2px solid transparent;
754
760
  &:hover:not(.close):not(.active):not(.detach) {
755
- background-color: ${t(colors.gray[200], colors.gray[700])};
761
+ background-color: ${t(colors.gray[100], colors.gray[800])};
756
762
  color: ${t(colors.gray[900], colors.gray[100])};
757
- border-left: 2px solid ${t(colors.purple[700], colors.purple[500])};
763
+ border-left: 2px solid ${t(colors.gray[900], colors.gray[100])};
758
764
  }
759
765
  &.active {
760
- background-color: ${t(colors.purple[200], colors.purple[500])};
766
+ background-color: ${t(colors.gray[100], colors.gray[800])};
761
767
  color: ${t(colors.gray[900], colors.gray[100])};
762
- border-left: 2px solid ${t(colors.purple[700], colors.purple[500])};
768
+ border-left: 2px solid ${t(colors.gray[900], colors.gray[100])};
763
769
  }
764
770
  &.detach {
765
771
  &:hover {
766
- background-color: ${t(colors.gray[200], colors.gray[700])};
772
+ background-color: ${t(colors.gray[100], colors.gray[800])};
767
773
  }
768
774
  &:hover {
769
775
  color: ${t(colors.green[700], colors.green[500])};
@@ -772,7 +778,7 @@ var stylesFactory = (theme) => {
772
778
  &.close {
773
779
  margin-top: auto;
774
780
  &:hover {
775
- background-color: ${t(colors.gray[200], colors.gray[700])};
781
+ background-color: ${t(colors.gray[100], colors.gray[800])};
776
782
  }
777
783
  &:hover {
778
784
  color: ${t(colors.red[700], colors.red[500])};
@@ -788,93 +794,925 @@ var stylesFactory = (theme) => {
788
794
  color: ${colors.gray[300]};
789
795
  }
790
796
  `,
791
- tabContent: css2`
792
- transition: all 0.2s ease-in-out;
793
- width: 100%;
794
- height: 100%;
797
+ tabContent: css2`
798
+ transition: all 0.2s ease-in-out;
799
+ width: 100%;
800
+ height: 100%;
801
+ `,
802
+ pluginsTabPanel: css2`
803
+ display: flex;
804
+ flex-direction: row;
805
+ width: 100%;
806
+ height: 100%;
807
+ overflow: hidden;
808
+ `,
809
+ pluginsTabDraw: (isExpanded) => css2`
810
+ width: ${isExpanded ? size[48] : 0};
811
+ height: 100%;
812
+ background-color: ${t(colors.white, colors.darkGray[900])};
813
+ box-shadow: none;
814
+ ${isExpanded ? `border-right: 1px solid ${t(colors.gray[200], colors.gray[800])};` : ""}
815
+ `,
816
+ pluginsTabDrawExpanded: css2`
817
+ width: ${size[48]};
818
+ border-right: 1px solid ${t(colors.gray[200], colors.gray[800])};
819
+ `,
820
+ pluginsTabDrawTransition: (mSeconds) => {
821
+ return css2`
822
+ transition: width ${mSecondsToCssSeconds(mSeconds)} ease;
823
+ `;
824
+ },
825
+ pluginsTabSidebar: (isExpanded) => css2`
826
+ width: ${size[48]};
827
+ overflow-y: auto;
828
+ transform: ${isExpanded ? "translateX(0)" : "translateX(-100%)"};
829
+ display: flex;
830
+ flex-direction: column;
831
+ `,
832
+ pluginsTabSidebarTransition: (mSeconds) => {
833
+ return css2`
834
+ transition: transform ${mSecondsToCssSeconds(mSeconds)} ease;
835
+ `;
836
+ },
837
+ pluginsList: css2`
838
+ flex: 1;
839
+ overflow-y: auto;
840
+ `,
841
+ pluginName: css2`
842
+ font-size: ${fontSize.xs};
843
+ font-family: ${fontFamily.sans};
844
+ color: ${t(colors.gray[600], colors.gray[400])};
845
+ padding: ${size[2]};
846
+ cursor: pointer;
847
+ text-align: center;
848
+ transition: all 0.15s ease;
849
+ border-left: 2px solid transparent;
850
+
851
+ &:hover {
852
+ background-color: ${t(colors.gray[100], colors.gray[800])};
853
+ color: ${t(colors.gray[900], colors.gray[100])};
854
+ padding: ${size[2]};
855
+ }
856
+ &.active {
857
+ background-color: ${t(colors.gray[100], colors.gray[800])};
858
+ color: ${t(colors.gray[900], colors.gray[100])};
859
+ border-left: 2px solid ${t(colors.gray[900], colors.gray[100])};
860
+ }
861
+ &.active:hover {
862
+ background-color: ${t(colors.gray[200], colors.gray[700])};
863
+ }
864
+ `,
865
+ pluginsTabContent: css2`
866
+ width: 100%;
867
+ height: 100%;
868
+ overflow-y: auto;
869
+
870
+ &:not(:last-child) {
871
+ border-right: 5px solid ${t(colors.purple[200], colors.purple[800])};
872
+ }
873
+ `,
874
+ settingsGroup: css2`
875
+ display: flex;
876
+ flex-direction: column;
877
+ gap: 0.75rem;
878
+ `,
879
+ conditionalSetting: css2`
880
+ margin-left: 1.5rem;
881
+ padding-left: 1rem;
882
+ border-left: 2px solid ${t(colors.gray[300], colors.gray[600])};
883
+ background-color: ${t(colors.gray[50], colors.darkGray[900])};
884
+ padding: 0.75rem;
885
+ border-radius: 0.375rem;
886
+ margin-top: 0.5rem;
887
+ `,
888
+ settingRow: css2`
889
+ display: grid;
890
+ grid-template-columns: 1fr 1fr;
891
+ gap: 1rem;
892
+
893
+ @media (max-width: 768px) {
894
+ grid-template-columns: 1fr;
895
+ }
896
+ `,
897
+ settingsModifiers: css2`
898
+ display: flex;
899
+ gap: 0.5rem;
900
+ `,
901
+ // No Plugins Fallback Styles
902
+ noPluginsFallback: css2`
903
+ display: flex;
904
+ align-items: center;
905
+ justify-content: center;
906
+ min-height: 400px;
907
+ padding: 2rem;
908
+ background: ${t(colors.gray[50], colors.darkGray[700])};
909
+ width: 100%;
910
+ height: 100%;
911
+ `,
912
+ noPluginsFallbackContent: css2`
913
+ max-width: 600px;
914
+ text-align: center;
915
+ display: flex;
916
+ flex-direction: column;
917
+ align-items: center;
918
+ gap: 1rem;
919
+ `,
920
+ noPluginsFallbackIcon: css2`
921
+ width: 64px;
922
+ height: 64px;
923
+ color: ${t(colors.gray[400], colors.gray[600])};
924
+ margin-bottom: 0.5rem;
925
+
926
+ svg {
927
+ width: 100%;
928
+ height: 100%;
929
+ }
930
+ `,
931
+ noPluginsFallbackTitle: css2`
932
+ font-size: 1.5rem;
933
+ font-weight: 600;
934
+ color: ${t(colors.gray[900], colors.gray[100])};
935
+ margin: 0;
936
+ `,
937
+ noPluginsFallbackDescription: css2`
938
+ font-size: 0.95rem;
939
+ color: ${t(colors.gray[600], colors.gray[400])};
940
+ line-height: 1.5;
941
+ margin: 0;
942
+ `,
943
+ noPluginsSuggestions: css2`
944
+ width: 100%;
945
+ margin-top: 1.5rem;
946
+ padding: 1.5rem;
947
+ background: ${t(colors.white, colors.darkGray[800])};
948
+ border: 1px solid ${t(colors.gray[200], colors.gray[700])};
949
+ border-radius: 0.5rem;
950
+ `,
951
+ noPluginsSuggestionsTitle: css2`
952
+ font-size: 1.125rem;
953
+ font-weight: 600;
954
+ color: ${t(colors.gray[900], colors.gray[100])};
955
+ margin: 0 0 0.5rem 0;
956
+ `,
957
+ noPluginsSuggestionsDesc: css2`
958
+ font-size: 0.875rem;
959
+ color: ${t(colors.gray[600], colors.gray[400])};
960
+ margin: 0 0 1rem 0;
961
+ `,
962
+ noPluginsSuggestionsList: css2`
963
+ display: flex;
964
+ flex-direction: column;
965
+ gap: 0.75rem;
966
+ `,
967
+ noPluginsSuggestionCard: css2`
968
+ display: flex;
969
+ align-items: center;
970
+ justify-content: space-between;
971
+ padding: 1rem;
972
+ background: ${t(colors.gray[50], colors.darkGray[900])};
973
+ border: 1px solid ${t(colors.gray[200], colors.gray[700])};
974
+ border-radius: 0.375rem;
975
+ transition: all 0.15s ease;
976
+
977
+ &:hover {
978
+ border-color: ${t(colors.gray[300], colors.gray[600])};
979
+ background: ${t(colors.gray[100], colors.darkGray[800])};
980
+ }
981
+ `,
982
+ noPluginsSuggestionInfo: css2`
983
+ display: flex;
984
+ flex-direction: column;
985
+ align-items: flex-start;
986
+ gap: 0.25rem;
987
+ flex: 1;
988
+ `,
989
+ noPluginsSuggestionPackage: css2`
990
+ font-size: 0.95rem;
991
+ font-weight: 600;
992
+ color: ${t(colors.gray[900], colors.gray[100])};
993
+ margin: 0;
994
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
995
+ `,
996
+ noPluginsSuggestionSource: css2`
997
+ font-size: 0.8rem;
998
+ color: ${t(colors.gray[500], colors.gray[500])};
999
+ margin: 0;
1000
+ `,
1001
+ noPluginsSuggestionStatus: css2`
1002
+ display: flex;
1003
+ align-items: center;
1004
+ gap: 0.5rem;
1005
+ color: ${t(colors.green[600], colors.green[400])};
1006
+
1007
+ svg {
1008
+ width: 18px;
1009
+ height: 18px;
1010
+ }
1011
+ `,
1012
+ noPluginsSuggestionStatusText: css2`
1013
+ font-size: 0.875rem;
1014
+ font-weight: 500;
1015
+ `,
1016
+ noPluginsSuggestionStatusTextError: css2`
1017
+ font-size: 0.875rem;
1018
+ font-weight: 500;
1019
+ color: ${t(colors.red[600], colors.red[400])};
1020
+ `,
1021
+ noPluginsEmptyState: css2`
1022
+ margin-top: 1.5rem;
1023
+ padding: 1.5rem;
1024
+ background: ${t(colors.white, colors.darkGray[800])};
1025
+ border: 1px solid ${t(colors.gray[200], colors.gray[700])};
1026
+ border-radius: 0.5rem;
1027
+ `,
1028
+ noPluginsEmptyStateText: css2`
1029
+ font-size: 0.875rem;
1030
+ color: ${t(colors.gray[600], colors.gray[400])};
1031
+ margin: 0;
1032
+ line-height: 1.5;
1033
+ `,
1034
+ noPluginsFallbackLinks: css2`
1035
+ display: flex;
1036
+ align-items: center;
1037
+ gap: 0.75rem;
1038
+ margin-top: 1.5rem;
1039
+ `,
1040
+ noPluginsFallbackLink: css2`
1041
+ font-size: 0.875rem;
1042
+ color: ${t(colors.gray[700], colors.gray[300])};
1043
+ text-decoration: none;
1044
+ transition: color 0.15s ease;
1045
+
1046
+ &:hover {
1047
+ color: ${t(colors.gray[900], colors.gray[100])};
1048
+ text-decoration: underline;
1049
+ }
1050
+ `,
1051
+ noPluginsFallbackLinkSeparator: css2`
1052
+ color: ${t(colors.gray[400], colors.gray[600])};
1053
+ `,
1054
+ // Plugin Marketplace Styles (for "Add More" tab)
1055
+ pluginMarketplace: css2`
1056
+ width: 100%;
1057
+ overflow-y: auto;
1058
+ padding: 2rem;
1059
+ background: ${t(
1060
+ "linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)",
1061
+ "linear-gradient(135deg, #1a1d23 0%, #13161a 100%)"
1062
+ )};
1063
+ animation: fadeIn 0.3s ease;
1064
+
1065
+ @keyframes fadeIn {
1066
+ from {
1067
+ opacity: 0;
1068
+ transform: translateY(10px);
1069
+ }
1070
+ to {
1071
+ opacity: 1;
1072
+ transform: translateY(0);
1073
+ }
1074
+ }
1075
+ `,
1076
+ pluginMarketplaceHeader: css2`
1077
+ margin-bottom: 2rem;
1078
+ padding-bottom: 1rem;
1079
+ border-bottom: 2px solid ${t(colors.gray[200], colors.gray[700])};
1080
+ `,
1081
+ pluginMarketplaceTitleRow: css2`
1082
+ display: flex;
1083
+ align-items: center;
1084
+ justify-content: space-between;
1085
+ gap: 2rem;
1086
+ margin-bottom: 0.5rem;
1087
+ `,
1088
+ pluginMarketplaceTitle: css2`
1089
+ font-size: 1.5rem;
1090
+ font-weight: 700;
1091
+ color: ${t(colors.gray[900], colors.gray[100])};
1092
+ margin: 0;
1093
+ letter-spacing: -0.02em;
1094
+ `,
1095
+ pluginMarketplaceDescription: css2`
1096
+ font-size: 0.95rem;
1097
+ color: ${t(colors.gray[600], colors.gray[400])};
1098
+ margin: 0 0 1rem 0;
1099
+ line-height: 1.5;
1100
+ `,
1101
+ pluginMarketplaceSearchWrapper: css2`
1102
+ position: relative;
1103
+ display: flex;
1104
+ align-items: center;
1105
+ max-width: 400px;
1106
+ flex-shrink: 0;
1107
+
1108
+ svg {
1109
+ position: absolute;
1110
+ left: 1rem;
1111
+ color: ${t(colors.gray[400], colors.gray[500])};
1112
+ pointer-events: none;
1113
+ }
1114
+ `,
1115
+ pluginMarketplaceSearch: css2`
1116
+ width: 100%;
1117
+ padding: 0.75rem 1rem 0.75rem 2.75rem;
1118
+ background: ${t(colors.gray[50], colors.darkGray[900])};
1119
+ border: 2px solid ${t(colors.gray[200], colors.gray[700])};
1120
+ border-radius: 0.5rem;
1121
+ color: ${t(colors.gray[900], colors.gray[100])};
1122
+ font-size: 0.875rem;
1123
+ font-family: ${fontFamily.sans};
1124
+ transition: all 0.2s ease;
1125
+
1126
+ &::placeholder {
1127
+ color: ${t(colors.gray[400], colors.gray[500])};
1128
+ }
1129
+
1130
+ &:focus {
1131
+ outline: none;
1132
+ border-color: ${t(colors.blue[500], colors.blue[400])};
1133
+ background: ${t(colors.white, colors.darkGray[800])};
1134
+ box-shadow: 0 0 0 3px
1135
+ ${t("rgba(59, 130, 246, 0.1)", "rgba(96, 165, 250, 0.1)")};
1136
+ }
1137
+ `,
1138
+ pluginMarketplaceFilters: css2`
1139
+ margin-top: 1.5rem;
1140
+ padding-top: 1rem;
1141
+ `,
1142
+ pluginMarketplaceTagsContainer: css2`
1143
+ display: flex;
1144
+ flex-wrap: wrap;
1145
+ gap: 0.5rem;
1146
+ margin-top: 1.5rem;
1147
+ padding: 1rem;
1148
+ background: ${t(colors.gray[50], colors.darkGray[800])};
1149
+ border: 1px solid ${t(colors.gray[200], colors.gray[700])};
1150
+ border-radius: 0.5rem;
1151
+ `,
1152
+ pluginMarketplaceTagButton: css2`
1153
+ padding: 0.5rem 1rem;
1154
+ font-size: 0.875rem;
1155
+ font-weight: 500;
1156
+ background: ${t(colors.white, colors.darkGray[700])};
1157
+ border: 2px solid ${t(colors.gray[300], colors.gray[600])};
1158
+ border-radius: 0.375rem;
1159
+ color: ${t(colors.gray[700], colors.gray[300])};
1160
+ cursor: pointer;
1161
+ transition: all 0.15s ease;
1162
+
1163
+ &:hover {
1164
+ background: ${t(colors.gray[100], colors.darkGray[600])};
1165
+ border-color: ${t(colors.gray[400], colors.gray[500])};
1166
+ color: ${t(colors.gray[900], colors.gray[100])};
1167
+ }
1168
+ `,
1169
+ pluginMarketplaceTagButtonActive: css2`
1170
+ background: ${t(
1171
+ "linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)",
1172
+ "linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%)"
1173
+ )} !important;
1174
+ border-color: ${t("#2563eb", "#3b82f6")} !important;
1175
+ color: white !important;
1176
+
1177
+ &:hover {
1178
+ background: ${t(
1179
+ "linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%)",
1180
+ "linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)"
1181
+ )} !important;
1182
+ border-color: ${t("#1d4ed8", "#2563eb")} !important;
1183
+ }
1184
+ `,
1185
+ pluginMarketplaceSettingsButton: css2`
1186
+ display: flex;
1187
+ align-items: center;
1188
+ justify-content: center;
1189
+ padding: 0.75rem;
1190
+ background: ${t(colors.gray[100], colors.darkGray[800])};
1191
+ border: 2px solid ${t(colors.gray[200], colors.gray[700])};
1192
+ border-radius: 0.5rem;
1193
+ color: ${t(colors.gray[700], colors.gray[300])};
1194
+ cursor: pointer;
1195
+ transition: all 0.2s ease;
1196
+ margin-left: 0.5rem;
1197
+
1198
+ &:hover {
1199
+ background: ${t(colors.gray[200], colors.darkGray[700])};
1200
+ border-color: ${t(colors.gray[300], colors.gray[600])};
1201
+ color: ${t(colors.gray[900], colors.gray[100])};
1202
+ }
1203
+
1204
+ &:active {
1205
+ transform: scale(0.95);
1206
+ }
1207
+ `,
1208
+ pluginMarketplaceSettingsPanel: css2`
1209
+ position: fixed;
1210
+ top: 0;
1211
+ right: 0;
1212
+ bottom: 0;
1213
+ width: 350px;
1214
+ background: ${t(colors.white, colors.darkGray[800])};
1215
+ border-left: 1px solid ${t(colors.gray[200], colors.gray[700])};
1216
+ box-shadow: -4px 0 12px ${t("rgba(0, 0, 0, 0.1)", "rgba(0, 0, 0, 0.4)")};
1217
+ z-index: 1000;
1218
+ display: flex;
1219
+ flex-direction: column;
1220
+ animation: slideInRight 0.3s ease;
1221
+
1222
+ @keyframes slideInRight {
1223
+ from {
1224
+ transform: translateX(100%);
1225
+ }
1226
+ to {
1227
+ transform: translateX(0);
1228
+ }
1229
+ }
1230
+ `,
1231
+ pluginMarketplaceSettingsPanelHeader: css2`
1232
+ display: flex;
1233
+ align-items: center;
1234
+ justify-content: space-between;
1235
+ padding: 1.5rem;
1236
+ border-bottom: 1px solid ${t(colors.gray[200], colors.gray[700])};
1237
+ `,
1238
+ pluginMarketplaceSettingsPanelTitle: css2`
1239
+ font-size: 1.125rem;
1240
+ font-weight: 600;
1241
+ color: ${t(colors.gray[900], colors.gray[100])};
1242
+ margin: 0;
1243
+ `,
1244
+ pluginMarketplaceSettingsPanelClose: css2`
1245
+ display: flex;
1246
+ align-items: center;
1247
+ justify-content: center;
1248
+ padding: 0.5rem;
1249
+ background: transparent;
1250
+ border: none;
1251
+ color: ${t(colors.gray[600], colors.gray[400])};
1252
+ cursor: pointer;
1253
+ border-radius: 0.375rem;
1254
+ transition: all 0.15s ease;
1255
+
1256
+ &:hover {
1257
+ background: ${t(colors.gray[100], colors.darkGray[700])};
1258
+ color: ${t(colors.gray[900], colors.gray[100])};
1259
+ }
1260
+ `,
1261
+ pluginMarketplaceSettingsPanelContent: css2`
1262
+ flex: 1;
1263
+ padding: 1.5rem;
1264
+ overflow-y: auto;
1265
+ `,
1266
+ pluginMarketplaceGrid: css2`
1267
+ display: grid;
1268
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
1269
+ gap: 1.25rem;
1270
+ animation: slideUp 0.4s ease;
1271
+
1272
+ @keyframes slideUp {
1273
+ from {
1274
+ opacity: 0;
1275
+ transform: translateY(20px);
1276
+ }
1277
+ to {
1278
+ opacity: 1;
1279
+ transform: translateY(0);
1280
+ }
1281
+ }
1282
+ `,
1283
+ pluginMarketplaceCard: css2`
1284
+ background: ${t(colors.white, colors.darkGray[800])};
1285
+ border: 2px solid ${t(colors.gray[200], colors.gray[700])};
1286
+ border-radius: 0.75rem;
1287
+ padding: 1.5rem;
1288
+ display: flex;
1289
+ flex-direction: column;
1290
+ gap: 1rem;
1291
+ transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
1292
+ position: relative;
1293
+ overflow: hidden;
1294
+
1295
+ &::before {
1296
+ content: '';
1297
+ position: absolute;
1298
+ top: 0;
1299
+ left: 0;
1300
+ right: 0;
1301
+ height: 3px;
1302
+ background: ${t(
1303
+ "linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%)",
1304
+ "linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%)"
1305
+ )};
1306
+ transform: scaleX(0);
1307
+ transform-origin: left;
1308
+ transition: transform 0.25s ease;
1309
+ }
1310
+
1311
+ &:hover {
1312
+ border-color: ${t(colors.gray[400], colors.gray[500])};
1313
+ box-shadow: 0 8px 24px ${t("rgba(0,0,0,0.1)", "rgba(0,0,0,0.4)")};
1314
+ transform: translateY(-4px);
1315
+
1316
+ &::before {
1317
+ transform: scaleX(1);
1318
+ }
1319
+ }
1320
+ `,
1321
+ pluginMarketplaceCardIcon: css2`
1322
+ width: 40px;
1323
+ height: 40px;
1324
+ display: flex;
1325
+ align-items: center;
1326
+ justify-content: center;
1327
+ background: ${t(
1328
+ "linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)",
1329
+ "linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%)"
1330
+ )};
1331
+ border-radius: 0.5rem;
1332
+ color: white;
1333
+ transition: transform 0.25s ease;
1334
+
1335
+ svg {
1336
+ width: 20px;
1337
+ height: 20px;
1338
+ }
1339
+
1340
+ &.custom-logo {
1341
+ }
1342
+ `,
1343
+ pluginMarketplaceCardHeader: css2`
1344
+ flex: 1;
1345
+ `,
1346
+ pluginMarketplaceCardTitle: css2`
1347
+ font-size: 0.95rem;
1348
+ font-weight: 600;
1349
+ color: ${t(colors.gray[900], colors.gray[100])};
1350
+ margin: 0 0 0.5rem 0;
1351
+ line-height: 1.4;
1352
+ `,
1353
+ pluginMarketplaceCardDescription: css2`
1354
+ font-size: 0.8rem;
1355
+ color: ${t(colors.gray[500], colors.gray[500])};
1356
+ margin: 0;
1357
+ padding: 0;
1358
+ background: transparent;
1359
+ border-radius: 0.375rem;
1360
+ display: block;
1361
+ font-weight: 500;
1362
+ `,
1363
+ pluginMarketplaceCardPackageBadge: css2`
1364
+ margin-top: 4px;
1365
+ margin-bottom: 8px;
1366
+ font-size: 0.6875rem;
1367
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
1368
+ opacity: 0.6;
1369
+ padding: 4px 8px;
1370
+ padding-left: 0;
1371
+ background-color: var(--bg-tertiary);
1372
+ border-radius: 4px;
1373
+ word-break: break-all;
1374
+ display: inline-block;
1375
+ `,
1376
+ pluginMarketplaceCardDescriptionText: css2`
1377
+ line-height: 1.5;
1378
+ margin-top: 0;
1379
+ `,
1380
+ pluginMarketplaceCardVersionInfo: css2`
1381
+ margin-top: 8px;
1382
+ font-size: 0.6875rem;
1383
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
1384
+ `,
1385
+ pluginMarketplaceCardVersionSatisfied: css2`
1386
+ color: ${t(colors.green[600], colors.green[400])};
1387
+ `,
1388
+ pluginMarketplaceCardVersionUnsatisfied: css2`
1389
+ color: ${t(colors.red[600], colors.red[400])};
1390
+ `,
1391
+ pluginMarketplaceCardDocsLink: css2`
1392
+ display: inline-flex;
1393
+ align-items: center;
1394
+ gap: 0.25rem;
1395
+ font-size: 0.75rem;
1396
+ color: ${t(colors.blue[600], colors.blue[400])};
1397
+ text-decoration: none;
1398
+ margin-top: 0.5rem;
1399
+ transition: color 0.15s ease;
1400
+
1401
+ &:hover {
1402
+ color: ${t(colors.blue[700], colors.blue[300])};
1403
+ text-decoration: underline;
1404
+ }
1405
+
1406
+ svg {
1407
+ width: 12px;
1408
+ height: 12px;
1409
+ }
1410
+ `,
1411
+ pluginMarketplaceCardTags: css2`
1412
+ display: flex;
1413
+ flex-wrap: wrap;
1414
+ gap: 0.375rem;
1415
+ margin-top: 0.75rem;
1416
+ `,
1417
+ pluginMarketplaceCardTag: css2`
1418
+ font-size: 0.6875rem;
1419
+ font-weight: 500;
1420
+ padding: 0.25rem 0.5rem;
1421
+ background: ${t(colors.gray[100], colors.darkGray[700])};
1422
+ border: 1px solid ${t(colors.gray[300], colors.gray[600])};
1423
+ border-radius: 0.25rem;
1424
+ color: ${t(colors.gray[700], colors.gray[300])};
1425
+ `,
1426
+ pluginMarketplaceCardImage: css2`
1427
+ width: 28px;
1428
+ height: 28px;
1429
+ object-fit: contain;
1430
+ `,
1431
+ pluginMarketplaceNewBanner: css2`
1432
+ position: absolute;
1433
+ top: 12px;
1434
+ right: -35px;
1435
+ background-color: ${t(colors.green[500], colors.green[500])};
1436
+ color: white;
1437
+ padding: 4px 40px;
1438
+ font-size: 0.6875rem;
1439
+ font-weight: bold;
1440
+ text-transform: uppercase;
1441
+ transform: rotate(45deg);
1442
+ box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
1443
+ z-index: 10;
1444
+ letter-spacing: 0.5px;
1445
+ `,
1446
+ pluginMarketplaceCardFeatured: css2`
1447
+ border-color: ${t(colors.blue[500], colors.blue[400])};
1448
+ border-width: 2px;
1449
+ `,
1450
+ pluginMarketplaceCardActive: css2`
1451
+ border-color: ${t(colors.green[500], colors.green[600])};
1452
+ border-width: 2px;
1453
+
1454
+ &:hover {
1455
+ border-color: ${t(colors.green[500], colors.green[600])};
1456
+ box-shadow: none;
1457
+ transform: none;
1458
+
1459
+ &::before {
1460
+ transform: scaleX(0);
1461
+ }
1462
+ }
1463
+ `,
1464
+ pluginMarketplaceCardStatus: css2`
1465
+ display: flex;
1466
+ align-items: center;
1467
+ gap: 0.5rem;
1468
+ color: ${t(colors.green[600], colors.green[400])};
1469
+ animation: statusFadeIn 0.3s ease;
1470
+
1471
+ @keyframes statusFadeIn {
1472
+ from {
1473
+ opacity: 0;
1474
+ }
1475
+ to {
1476
+ opacity: 1;
1477
+ }
1478
+ }
1479
+
1480
+ svg {
1481
+ width: 18px;
1482
+ height: 18px;
1483
+ animation: iconPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
1484
+ }
1485
+
1486
+ @keyframes iconPop {
1487
+ 0% {
1488
+ transform: scale(0);
1489
+ }
1490
+ 50% {
1491
+ transform: scale(1.2);
1492
+ }
1493
+ 100% {
1494
+ transform: scale(1);
1495
+ }
1496
+ }
1497
+ `,
1498
+ pluginMarketplaceCardSpinner: css2`
1499
+ width: 18px;
1500
+ height: 18px;
1501
+ border: 2px solid ${t(colors.gray[200], colors.gray[700])};
1502
+ border-top-color: ${t(colors.blue[600], colors.blue[400])};
1503
+ border-radius: 50%;
1504
+ animation: spin 0.8s linear infinite;
1505
+
1506
+ @keyframes spin {
1507
+ to {
1508
+ transform: rotate(360deg);
1509
+ }
1510
+ }
1511
+ `,
1512
+ pluginMarketplaceCardStatusText: css2`
1513
+ font-size: 0.875rem;
1514
+ font-weight: 600;
1515
+ `,
1516
+ pluginMarketplaceCardStatusTextError: css2`
1517
+ font-size: 0.875rem;
1518
+ font-weight: 600;
1519
+ color: ${t(colors.red[600], colors.red[400])};
1520
+ `,
1521
+ pluginMarketplaceEmpty: css2`
1522
+ padding: 3rem 2rem;
1523
+ text-align: center;
1524
+ background: ${t(colors.white, colors.darkGray[800])};
1525
+ border: 2px dashed ${t(colors.gray[300], colors.gray[700])};
1526
+ border-radius: 0.75rem;
1527
+ animation: fadeIn 0.3s ease;
1528
+ `,
1529
+ pluginMarketplaceEmptyText: css2`
1530
+ font-size: 0.95rem;
1531
+ color: ${t(colors.gray[600], colors.gray[400])};
1532
+ margin: 0;
1533
+ line-height: 1.6;
1534
+ `,
1535
+ // Framework sections
1536
+ pluginMarketplaceSection: css2`
1537
+ margin-bottom: 2.5rem;
1538
+
1539
+ &:last-child {
1540
+ margin-bottom: 0;
1541
+ }
1542
+ `,
1543
+ pluginMarketplaceSectionHeader: css2`
1544
+ margin-bottom: 1rem;
1545
+ padding: 1rem 1.25rem;
1546
+ display: flex;
1547
+ align-items: center;
1548
+ gap: 0.75rem;
1549
+ cursor: pointer;
1550
+ user-select: none;
1551
+ background: ${t(colors.gray[50], colors.darkGray[800])};
1552
+ border: 1px solid ${t(colors.gray[200], colors.gray[700])};
1553
+ border-radius: 0.5rem;
1554
+ transition: all 0.15s ease;
1555
+
1556
+ &:hover {
1557
+ background: ${t(colors.gray[100], colors.darkGray[700])};
1558
+ border-color: ${t(colors.gray[300], colors.gray[600])};
1559
+ }
795
1560
  `,
796
- pluginsTabPanel: css2`
1561
+ pluginMarketplaceSectionHeaderLeft: css2`
797
1562
  display: flex;
798
- flex-direction: row;
799
- width: 100%;
800
- height: 100%;
801
- overflow: hidden;
1563
+ align-items: center;
1564
+ gap: 0.5rem;
802
1565
  `,
803
- pluginsTabDraw: (isExpanded) => css2`
804
- width: ${isExpanded ? size[48] : 0};
805
- height: 100%;
806
- background-color: ${t(colors.white, colors.darkGray[800])};
807
- box-shadow: 0 1px 0 ${colors.gray[700]};
808
- ${isExpanded ? `border-right: 1px solid ${t(colors.gray[300], colors.gray[700])};` : ""}
1566
+ pluginMarketplaceSectionChevron: css2`
1567
+ width: 24px;
1568
+ height: 24px;
1569
+ display: flex;
1570
+ align-items: center;
1571
+ justify-content: center;
1572
+ color: ${t(colors.gray[700], colors.gray[300])};
1573
+ transition: transform 0.2s ease;
809
1574
  `,
810
- pluginsTabDrawExpanded: css2`
811
- width: ${size[48]};
812
- border-right: 1px solid ${t(colors.gray[300], colors.gray[700])};
1575
+ pluginMarketplaceSectionChevronCollapsed: css2`
1576
+ transform: rotate(-90deg);
813
1577
  `,
814
- pluginsTabDrawTransition: (mSeconds) => {
815
- return css2`
816
- transition: width ${mSecondsToCssSeconds(mSeconds)} ease;
817
- `;
818
- },
819
- pluginsTabSidebar: (isExpanded) => css2`
820
- width: ${size[48]};
821
- overflow-y: auto;
822
- transform: ${isExpanded ? "translateX(0)" : "translateX(-100%)"};
1578
+ pluginMarketplaceSectionTitle: css2`
1579
+ font-size: 1.25rem;
1580
+ font-weight: 700;
1581
+ color: ${t(colors.gray[900], colors.gray[50])};
1582
+ margin: 0;
1583
+ display: flex;
1584
+ align-items: center;
1585
+ gap: 0.5rem;
823
1586
  `,
824
- pluginsTabSidebarTransition: (mSeconds) => {
825
- return css2`
826
- transition: transform ${mSecondsToCssSeconds(mSeconds)} ease;
827
- `;
828
- },
829
- pluginName: css2`
1587
+ pluginMarketplaceSectionBadge: css2`
1588
+ font-size: 0.75rem;
1589
+ font-weight: 600;
1590
+ padding: 0.25rem 0.5rem;
1591
+ background: ${t(
1592
+ "linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)",
1593
+ "linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%)"
1594
+ )};
1595
+ color: white;
1596
+ border-radius: 0.25rem;
1597
+ text-transform: uppercase;
1598
+ letter-spacing: 0.05em;
1599
+ `,
1600
+ pluginMarketplaceCardDisabled: css2`
1601
+ opacity: 0.6;
1602
+ filter: grayscale(0.3);
1603
+ cursor: not-allowed;
1604
+
1605
+ &:hover {
1606
+ transform: none;
1607
+ box-shadow: none;
1608
+ }
1609
+ `,
1610
+ // Card state badges
1611
+ pluginMarketplaceCardBadge: css2`
1612
+ position: absolute;
1613
+ top: 1rem;
1614
+ right: 1rem;
1615
+ padding: 0.25rem 0.5rem;
1616
+ font-size: 0.65rem;
1617
+ font-weight: 600;
1618
+ text-transform: uppercase;
1619
+ border-radius: 0.25rem;
1620
+ letter-spacing: 0.05em;
1621
+ `,
1622
+ pluginMarketplaceCardBadgeInstall: css2`
1623
+ background: ${t(colors.green[100], colors.green[900])};
1624
+ color: ${t(colors.green[700], colors.green[300])};
1625
+ `,
1626
+ pluginMarketplaceCardBadgeAdd: css2`
1627
+ background: ${t(colors.blue[100], colors.blue[900])};
1628
+ color: ${t(colors.blue[700], colors.blue[300])};
1629
+ `,
1630
+ pluginMarketplaceCardBadgeRequires: css2`
1631
+ background: ${t(colors.gray[100], colors.gray[800])};
1632
+ color: ${t(colors.gray[600], colors.gray[400])};
1633
+ `,
1634
+ // Button style for already installed plugins
1635
+ pluginMarketplaceButtonInstalled: css2`
1636
+ opacity: 0.5;
1637
+ `,
1638
+ // Add More Tab Style (visually distinct from regular plugins)
1639
+ pluginNameAddMore: css2`
830
1640
  font-size: ${fontSize.xs};
831
1641
  font-family: ${fontFamily.sans};
832
- color: ${t(colors.gray[700], colors.gray[300])};
833
- padding: ${size[2]};
1642
+ color: ${t(colors.gray[600], colors.gray[400])};
1643
+ padding: ${size[3]} ${size[2]};
834
1644
  cursor: pointer;
835
1645
  text-align: center;
836
- transition: all 0.2s ease-in-out;
1646
+ transition: all 0.15s ease;
1647
+ border-left: 2px solid transparent;
1648
+ background: ${t(
1649
+ "linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)",
1650
+ "linear-gradient(135deg, #1f2937 0%, #111827 100%)"
1651
+ )};
1652
+ font-weight: 600;
1653
+ position: relative;
1654
+ margin-top: auto;
1655
+
1656
+ h3 {
1657
+ margin: 0;
1658
+ display: flex;
1659
+ align-items: center;
1660
+ justify-content: center;
1661
+ gap: 0.25rem;
1662
+
1663
+ &::before {
1664
+ content: '✨';
1665
+ font-size: 0.875rem;
1666
+ animation: sparkle 2s ease-in-out infinite;
1667
+ }
1668
+ }
1669
+
1670
+ @keyframes sparkle {
1671
+ 0%,
1672
+ 100% {
1673
+ opacity: 1;
1674
+ transform: scale(1) rotate(0deg);
1675
+ }
1676
+ 50% {
1677
+ opacity: 0.6;
1678
+ transform: scale(1.1) rotate(10deg);
1679
+ }
1680
+ }
1681
+
837
1682
  &:hover {
838
- background-color: ${t(colors.gray[200], colors.gray[700])};
1683
+ background: ${t(
1684
+ "linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%)",
1685
+ "linear-gradient(135deg, #374151 0%, #1f2937 100%)"
1686
+ )};
839
1687
  color: ${t(colors.gray[900], colors.gray[100])};
840
- padding: ${size[2]};
1688
+ border-left-color: ${t(colors.blue[500], colors.blue[400])};
1689
+
1690
+ h3::before {
1691
+ animation: sparkle 0.5s ease-in-out infinite;
1692
+ }
841
1693
  }
1694
+
842
1695
  &.active {
843
- background-color: ${t(colors.purple[200], colors.purple[500])};
844
- color: ${t(colors.gray[900], colors.gray[100])};
1696
+ background: ${t(
1697
+ "linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)",
1698
+ "linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%)"
1699
+ )};
1700
+ color: ${t(colors.white, colors.white)};
1701
+ border-left: 2px solid ${t(colors.blue[600], colors.blue[300])};
1702
+ box-shadow: 0 4px 12px
1703
+ ${t("rgba(59, 130, 246, 0.3)", "rgba(96, 165, 250, 0.3)")};
1704
+
1705
+ h3::before {
1706
+ filter: brightness(0) invert(1);
1707
+ }
845
1708
  }
846
- `,
847
- pluginsTabContent: css2`
848
- width: 100%;
849
- height: 100%;
850
- overflow-y: auto;
851
- `,
852
- settingsGroup: css2`
853
- display: flex;
854
- flex-direction: column;
855
- gap: 1rem;
856
- `,
857
- conditionalSetting: css2`
858
- margin-left: 1.5rem;
859
- padding-left: 1rem;
860
- border-left: 2px solid ${t(colors.purple[600], colors.purple[400])};
861
- background-color: ${t(colors.gray[100], colors.darkGray[800])};
862
- padding: 1rem;
863
- border-radius: 0.5rem;
864
- margin-top: 0.5rem;
865
- `,
866
- settingRow: css2`
867
- display: grid;
868
- grid-template-columns: 1fr 1fr;
869
- gap: 1rem;
870
1709
 
871
- @media (max-width: 768px) {
872
- grid-template-columns: 1fr;
1710
+ &.active:hover {
1711
+ background: ${t(
1712
+ "linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%)",
1713
+ "linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)"
1714
+ )};
873
1715
  }
874
- `,
875
- settingsModifiers: css2`
876
- display: flex;
877
- gap: 0.5rem;
878
1716
  `
879
1717
  };
880
1718
  };
@@ -1294,9 +2132,1109 @@ var SettingsTab = () => {
1294
2132
  }
1295
2133
  });
1296
2134
  };
1297
- var _tmpl$5 = /* @__PURE__ */ template(`<div><div><div>`);
1298
- var _tmpl$23 = /* @__PURE__ */ template(`<div><h3>`);
1299
- var _tmpl$33 = /* @__PURE__ */ template(`<div>`);
2135
+
2136
+ // src/tabs/marketplace/card-utils.ts
2137
+ var getButtonText = (card) => {
2138
+ if (card.status === "installing") return "Installing...";
2139
+ if (card.status === "success") return "Installed!";
2140
+ if (card.status === "error") return "Error";
2141
+ switch (card.actionType) {
2142
+ case "install":
2143
+ return "Install";
2144
+ case "install-devtools":
2145
+ return "Install Devtools";
2146
+ case "add-to-devtools":
2147
+ return "Add to Devtools";
2148
+ case "requires-package":
2149
+ return `Requires ${card.requiredPackageName}`;
2150
+ case "wrong-framework":
2151
+ return "Different Framework";
2152
+ case "already-installed":
2153
+ return "Already Installed";
2154
+ case "bump-version":
2155
+ return "Bump Version";
2156
+ case "version-mismatch":
2157
+ return "Version Mismatch";
2158
+ default:
2159
+ return "Install";
2160
+ }
2161
+ };
2162
+ var getButtonVariant = (card) => {
2163
+ if (card.actionType === "requires-package" || card.actionType === "wrong-framework" || card.actionType === "version-mismatch")
2164
+ return "danger";
2165
+ if (card.actionType === "bump-version") return "warning";
2166
+ if (card.actionType === "already-installed") return "secondary";
2167
+ return "primary";
2168
+ };
2169
+ var getBadgeClass = (card, styles) => {
2170
+ const s = styles();
2171
+ const base = s.pluginMarketplaceCardBadge;
2172
+ switch (card.actionType) {
2173
+ case "install":
2174
+ case "install-devtools":
2175
+ return `${base} ${s.pluginMarketplaceCardBadgeInstall}`;
2176
+ case "add-to-devtools":
2177
+ return `${base} ${s.pluginMarketplaceCardBadgeAdd}`;
2178
+ case "already-installed":
2179
+ return `${base} ${s.pluginMarketplaceCardBadgeAdd}`;
2180
+ case "bump-version":
2181
+ return `${base} ${s.pluginMarketplaceCardBadgeRequires}`;
2182
+ case "version-mismatch":
2183
+ return `${base} ${s.pluginMarketplaceCardBadgeRequires}`;
2184
+ case "requires-package":
2185
+ case "wrong-framework":
2186
+ return `${base} ${s.pluginMarketplaceCardBadgeRequires}`;
2187
+ default:
2188
+ return base;
2189
+ }
2190
+ };
2191
+ var getBadgeText = (card) => {
2192
+ switch (card.actionType) {
2193
+ case "install":
2194
+ case "install-devtools":
2195
+ return "Available";
2196
+ case "add-to-devtools":
2197
+ return "Installed";
2198
+ case "already-installed":
2199
+ return "Active";
2200
+ case "version-mismatch":
2201
+ return "Incompatible";
2202
+ case "requires-package":
2203
+ return "Unavailable";
2204
+ case "wrong-framework":
2205
+ return "Other Framework";
2206
+ default:
2207
+ return "";
2208
+ }
2209
+ };
2210
+
2211
+ // src/tabs/marketplace/plugin-card.tsx
2212
+ var _tmpl$5 = /* @__PURE__ */ template(`<div>New`);
2213
+ var _tmpl$23 = /* @__PURE__ */ template(`<img>`);
2214
+ var _tmpl$33 = /* @__PURE__ */ template(`<span>\u2713 v<!> \u2022 Min v`);
2215
+ var _tmpl$42 = /* @__PURE__ */ template(`<p>`);
2216
+ var _tmpl$52 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer">Documentation `);
2217
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
2218
+ var _tmpl$7 = /* @__PURE__ */ template(`<div><span></span><div></div><div><h3></h3><p></p><p>`);
2219
+ var _tmpl$8 = /* @__PURE__ */ template(`<span>\u26A0\uFE0F v<!> \u2022 Requires v<!>+`);
2220
+ var _tmpl$9 = /* @__PURE__ */ template(`<span>`);
2221
+ var _tmpl$0 = /* @__PURE__ */ template(`<span>Installing...`);
2222
+ var _tmpl$1 = /* @__PURE__ */ template(`<span>Installed!`);
2223
+ var PluginCardComponent = (props) => {
2224
+ const styles = useStyles();
2225
+ const {
2226
+ card
2227
+ } = props;
2228
+ return (() => {
2229
+ var _el$ = _tmpl$7(), _el$3 = _el$.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling;
2230
+ _el$.style.setProperty("position", "relative");
2231
+ insert(_el$, createComponent(Show, {
2232
+ get when() {
2233
+ return card.metadata?.isNew;
2234
+ },
2235
+ get children() {
2236
+ var _el$2 = _tmpl$5();
2237
+ effect(() => className(_el$2, styles().pluginMarketplaceNewBanner));
2238
+ return _el$2;
2239
+ }
2240
+ }), _el$3);
2241
+ insert(_el$3, () => getBadgeText(card));
2242
+ insert(_el$4, createComponent(Show, {
2243
+ get when() {
2244
+ return card.metadata?.logoUrl;
2245
+ },
2246
+ get fallback() {
2247
+ return createComponent(PackageIcon, {});
2248
+ },
2249
+ get children() {
2250
+ var _el$5 = _tmpl$23();
2251
+ effect((_p$) => {
2252
+ var _v$ = card.metadata?.logoUrl, _v$2 = card.metadata?.title || card.devtoolsPackage, _v$3 = styles().pluginMarketplaceCardImage;
2253
+ _v$ !== _p$.e && setAttribute(_el$5, "src", _p$.e = _v$);
2254
+ _v$2 !== _p$.t && setAttribute(_el$5, "alt", _p$.t = _v$2);
2255
+ _v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
2256
+ return _p$;
2257
+ }, {
2258
+ e: void 0,
2259
+ t: void 0,
2260
+ a: void 0
2261
+ });
2262
+ return _el$5;
2263
+ }
2264
+ }));
2265
+ insert(_el$7, () => card.metadata?.title || card.devtoolsPackage);
2266
+ insert(_el$8, () => card.devtoolsPackage);
2267
+ insert(_el$9, () => card.actionType === "requires-package" ? `Requires ${card.requiredPackageName}` : card.actionType === "wrong-framework" ? `For different framework projects` : card.actionType === "already-installed" ? `Active in your devtools` : card.actionType === "version-mismatch" ? card.versionInfo?.reason || "Version incompatible" : card.metadata?.description || `For ${card.requiredPackageName}`);
2268
+ insert(_el$6, createComponent(Show, {
2269
+ get when() {
2270
+ return card.versionInfo;
2271
+ },
2272
+ get children() {
2273
+ var _el$0 = _tmpl$42();
2274
+ insert(_el$0, createComponent(Show, {
2275
+ get when() {
2276
+ return card.versionInfo?.satisfied;
2277
+ },
2278
+ get fallback() {
2279
+ return (() => {
2280
+ var _el$16 = _tmpl$8(), _el$17 = _el$16.firstChild, _el$20 = _el$17.nextSibling, _el$18 = _el$20.nextSibling, _el$21 = _el$18.nextSibling; _el$21.nextSibling;
2281
+ insert(_el$16, () => card.versionInfo?.current, _el$20);
2282
+ insert(_el$16, () => card.versionInfo?.required, _el$21);
2283
+ effect(() => className(_el$16, styles().pluginMarketplaceCardVersionUnsatisfied));
2284
+ return _el$16;
2285
+ })();
2286
+ },
2287
+ get children() {
2288
+ var _el$1 = _tmpl$33(), _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling; _el$12.nextSibling;
2289
+ insert(_el$1, () => card.versionInfo?.current, _el$12);
2290
+ insert(_el$1, () => card.versionInfo?.required, null);
2291
+ effect(() => className(_el$1, styles().pluginMarketplaceCardVersionSatisfied));
2292
+ return _el$1;
2293
+ }
2294
+ }));
2295
+ effect(() => className(_el$0, styles().pluginMarketplaceCardVersionInfo));
2296
+ return _el$0;
2297
+ }
2298
+ }), null);
2299
+ insert(_el$6, createComponent(Show, {
2300
+ get when() {
2301
+ return card.metadata?.docsUrl;
2302
+ },
2303
+ get children() {
2304
+ var _el$13 = _tmpl$52(); _el$13.firstChild;
2305
+ insert(_el$13, createComponent(ExternalLinkIcon, {}), null);
2306
+ effect((_p$) => {
2307
+ var _v$4 = card.metadata?.docsUrl, _v$5 = styles().pluginMarketplaceCardDocsLink;
2308
+ _v$4 !== _p$.e && setAttribute(_el$13, "href", _p$.e = _v$4);
2309
+ _v$5 !== _p$.t && className(_el$13, _p$.t = _v$5);
2310
+ return _p$;
2311
+ }, {
2312
+ e: void 0,
2313
+ t: void 0
2314
+ });
2315
+ return _el$13;
2316
+ }
2317
+ }), null);
2318
+ insert(_el$6, createComponent(Show, {
2319
+ get when() {
2320
+ return card.metadata?.tags && card.metadata.tags.length > 0;
2321
+ },
2322
+ get children() {
2323
+ var _el$15 = _tmpl$6();
2324
+ insert(_el$15, createComponent(For, {
2325
+ get each() {
2326
+ return card.metadata?.tags;
2327
+ },
2328
+ children: (tag) => (() => {
2329
+ var _el$22 = _tmpl$9();
2330
+ insert(_el$22, tag);
2331
+ effect(() => className(_el$22, styles().pluginMarketplaceCardTag));
2332
+ return _el$22;
2333
+ })()
2334
+ }));
2335
+ effect(() => className(_el$15, styles().pluginMarketplaceCardTags));
2336
+ return _el$15;
2337
+ }
2338
+ }), null);
2339
+ insert(_el$, createComponent(Show, {
2340
+ get when() {
2341
+ return card.status === "idle";
2342
+ },
2343
+ get fallback() {
2344
+ return (() => {
2345
+ var _el$23 = _tmpl$6();
2346
+ insert(_el$23, createComponent(Show, {
2347
+ get when() {
2348
+ return card.status === "installing";
2349
+ },
2350
+ get children() {
2351
+ return [(() => {
2352
+ var _el$24 = _tmpl$6();
2353
+ effect(() => className(_el$24, styles().pluginMarketplaceCardSpinner));
2354
+ return _el$24;
2355
+ })(), (() => {
2356
+ var _el$25 = _tmpl$0();
2357
+ effect(() => className(_el$25, styles().pluginMarketplaceCardStatusText));
2358
+ return _el$25;
2359
+ })()];
2360
+ }
2361
+ }), null);
2362
+ insert(_el$23, createComponent(Show, {
2363
+ get when() {
2364
+ return card.status === "success";
2365
+ },
2366
+ get children() {
2367
+ return [createComponent(CheckCircleIcon, {}), (() => {
2368
+ var _el$26 = _tmpl$1();
2369
+ effect(() => className(_el$26, styles().pluginMarketplaceCardStatusText));
2370
+ return _el$26;
2371
+ })()];
2372
+ }
2373
+ }), null);
2374
+ insert(_el$23, createComponent(Show, {
2375
+ get when() {
2376
+ return card.status === "error";
2377
+ },
2378
+ get children() {
2379
+ return [createComponent(XCircleIcon, {}), (() => {
2380
+ var _el$27 = _tmpl$9();
2381
+ insert(_el$27, () => card.error || "Failed to install");
2382
+ effect(() => className(_el$27, styles().pluginMarketplaceCardStatusTextError));
2383
+ return _el$27;
2384
+ })()];
2385
+ }
2386
+ }), null);
2387
+ effect(() => className(_el$23, styles().pluginMarketplaceCardStatus));
2388
+ return _el$23;
2389
+ })();
2390
+ },
2391
+ get children() {
2392
+ return createComponent(Button, {
2393
+ get variant() {
2394
+ return getButtonVariant(card);
2395
+ },
2396
+ onClick: () => props.onAction(card),
2397
+ get disabled() {
2398
+ return card.status !== "idle" || card.actionType === "requires-package" || card.actionType === "wrong-framework" || card.actionType === "already-installed" || card.actionType === "version-mismatch";
2399
+ },
2400
+ get ["class"]() {
2401
+ return memo(() => card.actionType === "already-installed")() ? styles().pluginMarketplaceButtonInstalled : "";
2402
+ },
2403
+ get children() {
2404
+ return getButtonText(card);
2405
+ }
2406
+ });
2407
+ }
2408
+ }), null);
2409
+ effect((_p$) => {
2410
+ var _v$6 = styles().pluginMarketplaceCard, _v$7 = {
2411
+ [styles().pluginMarketplaceCardDisabled]: !card.isCurrentFramework && card.actionType !== "already-installed",
2412
+ [styles().pluginMarketplaceCardFeatured]: !!card.metadata?.featured && card.actionType !== "already-installed",
2413
+ [styles().pluginMarketplaceCardActive]: card.actionType === "already-installed"
2414
+ }, _v$8 = getBadgeClass(card, styles), _v$9 = styles().pluginMarketplaceCardIcon, _v$0 = !!card.metadata?.logoUrl, _v$1 = styles().pluginMarketplaceCardHeader, _v$10 = styles().pluginMarketplaceCardTitle, _v$11 = styles().pluginMarketplaceCardPackageBadge, _v$12 = styles().pluginMarketplaceCardDescriptionText;
2415
+ _v$6 !== _p$.e && className(_el$, _p$.e = _v$6);
2416
+ _p$.t = classList(_el$, _v$7, _p$.t);
2417
+ _v$8 !== _p$.a && className(_el$3, _p$.a = _v$8);
2418
+ _v$9 !== _p$.o && className(_el$4, _p$.o = _v$9);
2419
+ _v$0 !== _p$.i && _el$4.classList.toggle("custom-logo", _p$.i = _v$0);
2420
+ _v$1 !== _p$.n && className(_el$6, _p$.n = _v$1);
2421
+ _v$10 !== _p$.s && className(_el$7, _p$.s = _v$10);
2422
+ _v$11 !== _p$.h && className(_el$8, _p$.h = _v$11);
2423
+ _v$12 !== _p$.r && className(_el$9, _p$.r = _v$12);
2424
+ return _p$;
2425
+ }, {
2426
+ e: void 0,
2427
+ t: void 0,
2428
+ a: void 0,
2429
+ o: void 0,
2430
+ i: void 0,
2431
+ n: void 0,
2432
+ s: void 0,
2433
+ h: void 0,
2434
+ r: void 0
2435
+ });
2436
+ return _el$;
2437
+ })();
2438
+ };
2439
+
2440
+ // src/tabs/marketplace/plugin-section.tsx
2441
+ var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
2442
+ var _tmpl$24 = /* @__PURE__ */ template(`<div><div><div><div></div><h3>`);
2443
+ var PluginSectionComponent = (props) => {
2444
+ const styles = useStyles();
2445
+ return (() => {
2446
+ var _el$ = _tmpl$24(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
2447
+ addEventListener(_el$2, "click", props.onToggleCollapse, true);
2448
+ insert(_el$4, createComponent(ChevronDownIcon, {}));
2449
+ insert(_el$5, () => props.section.displayName);
2450
+ insert(_el$, createComponent(Show, {
2451
+ get when() {
2452
+ return !props.isCollapsed();
2453
+ },
2454
+ get children() {
2455
+ var _el$6 = _tmpl$10();
2456
+ insert(_el$6, createComponent(For, {
2457
+ get each() {
2458
+ return props.section.cards;
2459
+ },
2460
+ children: (card) => createComponent(PluginCardComponent, {
2461
+ card,
2462
+ get onAction() {
2463
+ return props.onCardAction;
2464
+ }
2465
+ })
2466
+ }));
2467
+ effect(() => className(_el$6, styles().pluginMarketplaceGrid));
2468
+ return _el$6;
2469
+ }
2470
+ }), null);
2471
+ effect((_p$) => {
2472
+ var _v$ = styles().pluginMarketplaceSection, _v$2 = styles().pluginMarketplaceSectionHeader, _v$3 = styles().pluginMarketplaceSectionHeaderLeft, _v$4 = styles().pluginMarketplaceSectionChevron, _v$5 = {
2473
+ [styles().pluginMarketplaceSectionChevronCollapsed]: props.isCollapsed()
2474
+ }, _v$6 = styles().pluginMarketplaceSectionTitle;
2475
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2476
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
2477
+ _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
2478
+ _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
2479
+ _p$.i = classList(_el$4, _v$5, _p$.i);
2480
+ _v$6 !== _p$.n && className(_el$5, _p$.n = _v$6);
2481
+ return _p$;
2482
+ }, {
2483
+ e: void 0,
2484
+ t: void 0,
2485
+ a: void 0,
2486
+ o: void 0,
2487
+ i: void 0,
2488
+ n: void 0
2489
+ });
2490
+ return _el$;
2491
+ })();
2492
+ };
2493
+ delegateEvents(["click"]);
2494
+ var _tmpl$11 = /* @__PURE__ */ template(`<div><div><h3>Marketplace Settings</h3><button></button></div><div>`);
2495
+ var SettingsPanel = (props) => {
2496
+ const styles = useStyles();
2497
+ return createComponent(Show, {
2498
+ get when() {
2499
+ return props.isOpen();
2500
+ },
2501
+ get children() {
2502
+ var _el$ = _tmpl$11(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2503
+ addEventListener(_el$4, "click", props.onClose, true);
2504
+ insert(_el$4, createComponent(CloseIcon, {}));
2505
+ insert(_el$5, createComponent(Checkbox, {
2506
+ label: "Show active plugins",
2507
+ description: "Display installed plugins in a separate section",
2508
+ get checked() {
2509
+ return props.showActivePlugins();
2510
+ },
2511
+ onChange: (checked) => props.setShowActivePlugins(checked)
2512
+ }));
2513
+ effect((_p$) => {
2514
+ var _v$ = styles().pluginMarketplaceSettingsPanel, _v$2 = styles().pluginMarketplaceSettingsPanelHeader, _v$3 = styles().pluginMarketplaceSettingsPanelTitle, _v$4 = styles().pluginMarketplaceSettingsPanelClose, _v$5 = styles().pluginMarketplaceSettingsPanelContent;
2515
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2516
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
2517
+ _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
2518
+ _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
2519
+ _v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
2520
+ return _p$;
2521
+ }, {
2522
+ e: void 0,
2523
+ t: void 0,
2524
+ a: void 0,
2525
+ o: void 0,
2526
+ i: void 0
2527
+ });
2528
+ return _el$;
2529
+ }
2530
+ });
2531
+ };
2532
+ delegateEvents(["click"]);
2533
+ var _tmpl$12 = /* @__PURE__ */ template(`<div>`);
2534
+ var _tmpl$25 = /* @__PURE__ */ template(`<button>`);
2535
+ var TagFilters = (props) => {
2536
+ const styles = useStyles();
2537
+ return createComponent(Show, {
2538
+ get when() {
2539
+ return props.tags().length > 0;
2540
+ },
2541
+ get children() {
2542
+ var _el$ = _tmpl$12();
2543
+ insert(_el$, createComponent(For, {
2544
+ get each() {
2545
+ return props.tags();
2546
+ },
2547
+ children: (tag) => (() => {
2548
+ var _el$2 = _tmpl$25();
2549
+ _el$2.$$click = () => props.onToggleTag(tag);
2550
+ insert(_el$2, tag);
2551
+ effect((_p$) => {
2552
+ var _v$ = styles().pluginMarketplaceTagButton, _v$2 = {
2553
+ [styles().pluginMarketplaceTagButtonActive]: props.selectedTags().has(tag)
2554
+ };
2555
+ _v$ !== _p$.e && className(_el$2, _p$.e = _v$);
2556
+ _p$.t = classList(_el$2, _v$2, _p$.t);
2557
+ return _p$;
2558
+ }, {
2559
+ e: void 0,
2560
+ t: void 0
2561
+ });
2562
+ return _el$2;
2563
+ })()
2564
+ }));
2565
+ effect(() => className(_el$, styles().pluginMarketplaceTagsContainer));
2566
+ return _el$;
2567
+ }
2568
+ });
2569
+ };
2570
+ delegateEvents(["click"]);
2571
+
2572
+ // src/tabs/marketplace/marketplace-header.tsx
2573
+ var _tmpl$13 = /* @__PURE__ */ template(`<div><div><h2>Plugin Marketplace</h2><div><div><input type=text placeholder="Search plugins..."></div><button></button></div></div><p>Discover and install devtools for TanStack Query, Router, Form, and Pacer`);
2574
+ var MarketplaceHeader = (props) => {
2575
+ const styles = useStyles();
2576
+ return (() => {
2577
+ var _el$ = _tmpl$13(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$2.nextSibling;
2578
+ _el$4.style.setProperty("display", "flex");
2579
+ _el$4.style.setProperty("align-items", "center");
2580
+ insert(_el$5, createComponent(SearchIcon, {}), _el$6);
2581
+ _el$6.$$input = (e) => props.onSearchInput(e.currentTarget.value);
2582
+ addEventListener(_el$7, "click", props.onSettingsClick, true);
2583
+ insert(_el$7, createComponent(SettingsIcon, {}));
2584
+ insert(_el$, createComponent(TagFilters, {
2585
+ get tags() {
2586
+ return props.tags;
2587
+ },
2588
+ get selectedTags() {
2589
+ return props.selectedTags;
2590
+ },
2591
+ get onToggleTag() {
2592
+ return props.onToggleTag;
2593
+ }
2594
+ }), null);
2595
+ effect((_p$) => {
2596
+ var _v$ = styles().pluginMarketplaceHeader, _v$2 = styles().pluginMarketplaceTitleRow, _v$3 = styles().pluginMarketplaceTitle, _v$4 = styles().pluginMarketplaceSearchWrapper, _v$5 = styles().pluginMarketplaceSearch, _v$6 = styles().pluginMarketplaceSettingsButton, _v$7 = styles().pluginMarketplaceDescription;
2597
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2598
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
2599
+ _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
2600
+ _v$4 !== _p$.o && className(_el$5, _p$.o = _v$4);
2601
+ _v$5 !== _p$.i && className(_el$6, _p$.i = _v$5);
2602
+ _v$6 !== _p$.n && className(_el$7, _p$.n = _v$6);
2603
+ _v$7 !== _p$.s && className(_el$8, _p$.s = _v$7);
2604
+ return _p$;
2605
+ }, {
2606
+ e: void 0,
2607
+ t: void 0,
2608
+ a: void 0,
2609
+ o: void 0,
2610
+ i: void 0,
2611
+ n: void 0,
2612
+ s: void 0
2613
+ });
2614
+ effect(() => _el$6.value = props.searchInput());
2615
+ return _el$;
2616
+ })();
2617
+ };
2618
+ delegateEvents(["input", "click"]);
2619
+
2620
+ // src/tabs/marketplace/types.ts
2621
+ var FRAMEWORKS = [
2622
+ "react",
2623
+ "solid",
2624
+ "vue",
2625
+ "svelte",
2626
+ "angular"
2627
+ ];
2628
+
2629
+ // src/tabs/plugin-registry.ts
2630
+ var PLUGIN_REGISTRY = {
2631
+ // TanStack Query
2632
+ "@tanstack/react-query-devtools": {
2633
+ packageName: "@tanstack/react-query-devtools",
2634
+ title: "TanStack Query Devtools",
2635
+ description: "Powerful devtools for TanStack Query - inspect queries, mutations, and cache",
2636
+ requires: {
2637
+ packageName: "@tanstack/react-query",
2638
+ minVersion: "5.0.0"
2639
+ },
2640
+ pluginId: "tanstack-query",
2641
+ docsUrl: "https://tanstack.com/query/latest/docs/devtools",
2642
+ author: "TanStack",
2643
+ framework: "react",
2644
+ featured: true,
2645
+ // Featured plugin
2646
+ tags: ["TanStack", "data-fetching", "caching", "state-management"]
2647
+ },
2648
+ "@tanstack/solid-query-devtools": {
2649
+ packageName: "@tanstack/solid-query-devtools",
2650
+ title: "TanStack Query Devtools",
2651
+ description: "Powerful devtools for TanStack Query - inspect queries, mutations, and cache",
2652
+ requires: {
2653
+ packageName: "@tanstack/solid-query",
2654
+ minVersion: "5.0.0"
2655
+ },
2656
+ pluginId: "tanstack-query",
2657
+ docsUrl: "https://tanstack.com/query/latest/docs/devtools",
2658
+ author: "TanStack",
2659
+ framework: "solid",
2660
+ tags: ["TanStack", "data-fetching", "caching", "state-management"]
2661
+ },
2662
+ // TanStack Router
2663
+ "@tanstack/react-router-devtools": {
2664
+ packageName: "@tanstack/react-router-devtools",
2665
+ title: "TanStack Router Devtools",
2666
+ description: "Inspect routes, navigation, and router state in real-time",
2667
+ requires: {
2668
+ packageName: "@tanstack/react-router",
2669
+ minVersion: "1.0.0"
2670
+ },
2671
+ pluginId: "tanstack-router",
2672
+ docsUrl: "https://tanstack.com/router/latest/docs/devtools",
2673
+ author: "TanStack",
2674
+ framework: "react",
2675
+ featured: true,
2676
+ // Featured plugin
2677
+ tags: ["TanStack", "routing", "navigation"]
2678
+ },
2679
+ "@tanstack/solid-router-devtools": {
2680
+ packageName: "@tanstack/solid-router-devtools",
2681
+ title: "TanStack Router Devtools",
2682
+ description: "Inspect routes, navigation, and router state in real-time",
2683
+ requires: {
2684
+ packageName: "@tanstack/solid-router",
2685
+ minVersion: "1.0.0"
2686
+ },
2687
+ pluginId: "tanstack-router",
2688
+ docsUrl: "https://tanstack.com/router/latest/docs/devtools",
2689
+ author: "TanStack",
2690
+ framework: "solid",
2691
+ tags: ["TanStack", "routing", "navigation"]
2692
+ },
2693
+ // TanStack Form
2694
+ "@tanstack/react-form-devtools": {
2695
+ packageName: "@tanstack/react-form-devtools",
2696
+ title: "TanStack Form Devtools",
2697
+ description: "Debug form state, validation, and field values",
2698
+ requires: {
2699
+ packageName: "@tanstack/react-form",
2700
+ minVersion: "1.23.0"
2701
+ },
2702
+ pluginImport: {
2703
+ importName: "FormDevtoolsPlugin",
2704
+ type: "function"
2705
+ },
2706
+ pluginId: "tanstack-form",
2707
+ docsUrl: "https://tanstack.com/form/latest/docs/devtools",
2708
+ author: "TanStack",
2709
+ framework: "react",
2710
+ isNew: true,
2711
+ tags: ["TanStack", "forms", "validation"]
2712
+ },
2713
+ "@tanstack/solid-form-devtools": {
2714
+ packageName: "@tanstack/solid-form-devtools",
2715
+ title: "TanStack Form Devtools",
2716
+ description: "Debug form state, validation, and field values",
2717
+ requires: {
2718
+ packageName: "@tanstack/solid-form",
2719
+ minVersion: "1.23.0"
2720
+ },
2721
+ pluginImport: {
2722
+ importName: "FormDevtoolsPlugin",
2723
+ type: "function"
2724
+ },
2725
+ pluginId: "tanstack-form",
2726
+ docsUrl: "https://tanstack.com/form/latest/docs/devtools",
2727
+ author: "TanStack",
2728
+ isNew: true,
2729
+ framework: "solid",
2730
+ tags: ["TanStack", "forms", "validation"]
2731
+ },
2732
+ // TanStack Pacer (Example - adjust as needed)
2733
+ "@tanstack/react-pacer-devtools": {
2734
+ packageName: "@tanstack/react-pacer-devtools",
2735
+ title: "Pacer Devtools",
2736
+ description: "Monitor and debug your Pacer animations and transitions",
2737
+ requires: {
2738
+ packageName: "@tanstack/react-pacer",
2739
+ minVersion: "0.16.4"
2740
+ },
2741
+ author: "TanStack",
2742
+ framework: "react",
2743
+ isNew: true,
2744
+ // New plugin banner
2745
+ tags: ["TanStack"]
2746
+ },
2747
+ "@tanstack/solid-pacer-devtools": {
2748
+ packageName: "@tanstack/solid-pacer-devtools",
2749
+ title: "Pacer Devtools",
2750
+ description: "Monitor and debug your Pacer animations and transitions",
2751
+ requires: {
2752
+ packageName: "@tanstack/solid-pacer",
2753
+ minVersion: "0.14.4"
2754
+ },
2755
+ author: "TanStack",
2756
+ framework: "solid",
2757
+ isNew: true,
2758
+ // New plugin banner
2759
+ tags: ["TanStack"]
2760
+ }
2761
+ // ==========================================
2762
+ // THIRD-PARTY PLUGINS - Examples
2763
+ // ==========================================
2764
+ // External contributors can add their plugins below!
2765
+ };
2766
+ function getAllPluginMetadata() {
2767
+ return Object.values(PLUGIN_REGISTRY);
2768
+ }
2769
+
2770
+ // src/tabs/semver-utils.ts
2771
+ function parseVersion(version) {
2772
+ if (!version) return null;
2773
+ const cleanVersion = version.replace(/^[v^~]/, "").split("-")[0]?.split("+")[0];
2774
+ if (!cleanVersion) return null;
2775
+ const parts = cleanVersion.split(".");
2776
+ if (parts.length < 2) return null;
2777
+ const major = parseInt(parts[0] ?? "0", 10);
2778
+ const minor = parseInt(parts[1] ?? "0", 10);
2779
+ const patch = parseInt(parts[2] ?? "0", 10);
2780
+ if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
2781
+ return null;
2782
+ }
2783
+ return {
2784
+ major,
2785
+ minor,
2786
+ patch,
2787
+ raw: version
2788
+ };
2789
+ }
2790
+ function compareVersions(v1, v2) {
2791
+ if (v1.major !== v2.major) return v1.major - v2.major;
2792
+ if (v1.minor !== v2.minor) return v1.minor - v2.minor;
2793
+ return v1.patch - v2.patch;
2794
+ }
2795
+ function satisfiesMinVersion(currentVersion, minVersion) {
2796
+ const current = parseVersion(currentVersion);
2797
+ const min = parseVersion(minVersion);
2798
+ if (!current || !min) return true;
2799
+ return compareVersions(current, min) >= 0;
2800
+ }
2801
+ function satisfiesMaxVersion(currentVersion, maxVersion) {
2802
+ const current = parseVersion(currentVersion);
2803
+ const max = parseVersion(maxVersion);
2804
+ if (!current || !max) return true;
2805
+ return compareVersions(current, max) <= 0;
2806
+ }
2807
+ function satisfiesVersionRange(currentVersion, minVersion, maxVersion) {
2808
+ if (!minVersion && !maxVersion) {
2809
+ return { satisfied: true };
2810
+ }
2811
+ if (minVersion && !satisfiesMinVersion(currentVersion, minVersion)) {
2812
+ return {
2813
+ satisfied: false,
2814
+ reason: `Requires v${minVersion} or higher (current: v${currentVersion})`
2815
+ };
2816
+ }
2817
+ if (maxVersion && !satisfiesMaxVersion(currentVersion, maxVersion)) {
2818
+ return {
2819
+ satisfied: false,
2820
+ reason: `Requires v${maxVersion} or lower (current: v${currentVersion})`
2821
+ };
2822
+ }
2823
+ return { satisfied: true };
2824
+ }
2825
+
2826
+ // src/tabs/marketplace/plugin-utils.ts
2827
+ var detectFramework = (pkg, frameworks) => {
2828
+ const allDeps = {
2829
+ ...pkg.dependencies,
2830
+ ...pkg.devDependencies
2831
+ };
2832
+ const frameworkPackageMap = {
2833
+ react: ["react", "react-dom"],
2834
+ vue: ["vue", "@vue/core"],
2835
+ solid: ["solid-js"],
2836
+ svelte: ["svelte"],
2837
+ angular: ["@angular/core"]
2838
+ };
2839
+ for (const framework of frameworks) {
2840
+ const frameworkPackages = frameworkPackageMap[framework];
2841
+ if (frameworkPackages && frameworkPackages.some((pkg2) => allDeps[pkg2])) {
2842
+ return framework;
2843
+ }
2844
+ }
2845
+ return "unknown";
2846
+ };
2847
+ var isPluginRegistered = (registeredPlugins, packageName, pluginName, framework, pluginId) => {
2848
+ if (pluginId) {
2849
+ return Array.from(registeredPlugins).some((id) => {
2850
+ const idLower = id.toLowerCase();
2851
+ const pluginIdLower = pluginId.toLowerCase();
2852
+ return idLower.startsWith(pluginIdLower) || idLower.includes(pluginIdLower);
2853
+ });
2854
+ }
2855
+ if (registeredPlugins.has(packageName)) return true;
2856
+ const pluginWords = pluginName.toLowerCase().split(/[-_/@]/).filter((word) => word.length > 0);
2857
+ const frameworkPart = framework.toLowerCase();
2858
+ return Array.from(registeredPlugins).some((id) => {
2859
+ const idLower = id.toLowerCase();
2860
+ if (idLower.includes(pluginName.toLowerCase())) {
2861
+ return true;
2862
+ }
2863
+ const matchedWords = pluginWords.filter((word) => idLower.includes(word));
2864
+ if (matchedWords.length >= 2) {
2865
+ return true;
2866
+ }
2867
+ if (idLower.includes(frameworkPart) && matchedWords.length >= 1) {
2868
+ return true;
2869
+ }
2870
+ return false;
2871
+ });
2872
+ };
2873
+ var buildPluginCards = (pkg, currentFramework, registeredPlugins, existingCards) => {
2874
+ const allDeps = {
2875
+ ...pkg.dependencies,
2876
+ ...pkg.devDependencies
2877
+ };
2878
+ const allCards = [];
2879
+ const allPlugins = getAllPluginMetadata();
2880
+ allPlugins.forEach((metadata) => {
2881
+ const devtoolsPackage = metadata.packageName;
2882
+ const isCurrentFramework = metadata.framework === currentFramework || metadata.framework === "other";
2883
+ const requiredPackageName = metadata.requires?.packageName;
2884
+ const hasPackage = requiredPackageName ? !!allDeps[requiredPackageName] : false;
2885
+ const hasDevtools = !!allDeps[devtoolsPackage];
2886
+ let versionInfo;
2887
+ if (hasPackage && metadata.requires) {
2888
+ const currentVersion = requiredPackageName ? allDeps[requiredPackageName] : void 0;
2889
+ if (currentVersion) {
2890
+ const versionCheck = satisfiesVersionRange(
2891
+ currentVersion,
2892
+ metadata.requires.minVersion,
2893
+ metadata.requires.maxVersion
2894
+ );
2895
+ versionInfo = {
2896
+ current: currentVersion,
2897
+ required: metadata.requires.minVersion,
2898
+ satisfied: versionCheck.satisfied,
2899
+ reason: versionCheck.reason
2900
+ };
2901
+ }
2902
+ }
2903
+ const isRegistered = isPluginRegistered(
2904
+ registeredPlugins,
2905
+ devtoolsPackage,
2906
+ metadata.packageName,
2907
+ metadata.framework,
2908
+ metadata.pluginId
2909
+ );
2910
+ let actionType;
2911
+ if (!isCurrentFramework) {
2912
+ actionType = "wrong-framework";
2913
+ } else if (metadata.requires && !hasPackage) {
2914
+ actionType = "requires-package";
2915
+ } else if (versionInfo && !versionInfo.satisfied) {
2916
+ actionType = "bump-version";
2917
+ } else if (hasDevtools && isRegistered) {
2918
+ actionType = "already-installed";
2919
+ } else if (hasDevtools && !isRegistered) {
2920
+ actionType = "add-to-devtools";
2921
+ } else if (!hasDevtools && metadata.requires && hasPackage) {
2922
+ actionType = "install-devtools";
2923
+ } else if (!hasDevtools) {
2924
+ actionType = "install";
2925
+ } else {
2926
+ actionType = "install";
2927
+ }
2928
+ const existing = existingCards.find(
2929
+ (c) => c.devtoolsPackage === devtoolsPackage
2930
+ );
2931
+ allCards.push({
2932
+ requiredPackageName: requiredPackageName || "",
2933
+ devtoolsPackage,
2934
+ framework: metadata.framework,
2935
+ hasPackage,
2936
+ hasDevtools,
2937
+ isRegistered,
2938
+ actionType,
2939
+ status: existing?.status || "idle",
2940
+ error: existing?.error,
2941
+ isCurrentFramework,
2942
+ metadata,
2943
+ versionInfo
2944
+ });
2945
+ });
2946
+ return allCards;
2947
+ };
2948
+ var groupIntoSections = (allCards) => {
2949
+ const sections = [];
2950
+ const activeCards = allCards.filter(
2951
+ (c) => c.actionType === "already-installed" && c.isRegistered
2952
+ );
2953
+ if (activeCards.length > 0) {
2954
+ sections.push({
2955
+ id: "active",
2956
+ displayName: "\u2713 Active Plugins",
2957
+ cards: activeCards
2958
+ });
2959
+ }
2960
+ const featuredCards = allCards.filter(
2961
+ (c) => c.metadata?.featured && c.actionType !== "already-installed" && c.isCurrentFramework
2962
+ // Only show featured plugins for current framework
2963
+ );
2964
+ if (featuredCards.length > 0) {
2965
+ sections.push({
2966
+ id: "featured",
2967
+ displayName: "\u2B50 Featured",
2968
+ cards: featuredCards
2969
+ });
2970
+ }
2971
+ const availableCards = allCards.filter(
2972
+ (c) => c.isCurrentFramework && c.actionType !== "already-installed" && !c.metadata?.featured
2973
+ // Not featured (already in featured section)
2974
+ );
2975
+ if (availableCards.length > 0) {
2976
+ sections.push({
2977
+ id: "available",
2978
+ displayName: "Available Plugins",
2979
+ cards: availableCards
2980
+ });
2981
+ }
2982
+ return sections;
2983
+ };
2984
+
2985
+ // src/tabs/plugin-marketplace.tsx
2986
+ var _tmpl$14 = /* @__PURE__ */ template(`<div><p>`);
2987
+ var _tmpl$26 = /* @__PURE__ */ template(`<div>`);
2988
+ var PluginMarketplace = () => {
2989
+ const styles = useStyles();
2990
+ const {
2991
+ plugins
2992
+ } = usePlugins();
2993
+ const [pluginSections, setPluginSections] = createSignal([]);
2994
+ const [currentPackageJson, setCurrentPackageJson] = createSignal(null);
2995
+ const [searchInput, setSearchInput] = createSignal("");
2996
+ const [searchQuery, setSearchQuery] = createSignal("");
2997
+ const [collapsedSections, setCollapsedSections] = createSignal(/* @__PURE__ */ new Set());
2998
+ const [showActivePlugins, setShowActivePlugins] = createSignal(true);
2999
+ const [selectedTags, setSelectedTags] = createSignal(/* @__PURE__ */ new Set());
3000
+ const [isSettingsOpen, setIsSettingsOpen] = createSignal(false);
3001
+ let debounceTimeout;
3002
+ const handleSearchInput = (value) => {
3003
+ setSearchInput(value);
3004
+ if (debounceTimeout) {
3005
+ clearTimeout(debounceTimeout);
3006
+ }
3007
+ debounceTimeout = setTimeout(() => {
3008
+ setSearchQuery(value);
3009
+ }, 300);
3010
+ };
3011
+ const toggleSection = (framework) => {
3012
+ setCollapsedSections((prev) => {
3013
+ const newSet = new Set(prev);
3014
+ if (newSet.has(framework)) {
3015
+ newSet.delete(framework);
3016
+ } else {
3017
+ newSet.add(framework);
3018
+ }
3019
+ return newSet;
3020
+ });
3021
+ };
3022
+ const matchesSearch = (card, query) => {
3023
+ if (!query) return true;
3024
+ const lowerQuery = query.toLowerCase();
3025
+ return card.devtoolsPackage.toLowerCase().includes(lowerQuery) || card.requiredPackageName.toLowerCase().includes(lowerQuery) || card.framework.toLowerCase().includes(lowerQuery);
3026
+ };
3027
+ const getFilteredSections = () => {
3028
+ const query = searchQuery();
3029
+ const showActive = showActivePlugins();
3030
+ const tags = selectedTags();
3031
+ const pkg = currentPackageJson();
3032
+ if (!pkg) return [];
3033
+ const currentFramework = detectFramework(pkg, FRAMEWORKS);
3034
+ const registeredPlugins = new Set(plugins()?.map((p) => p.id || "") || []);
3035
+ const allCards = buildPluginCards(
3036
+ pkg,
3037
+ currentFramework,
3038
+ registeredPlugins,
3039
+ pluginSections().flatMap((s) => s.cards)
3040
+ // Preserve status from existing cards
3041
+ );
3042
+ let sections = groupIntoSections(allCards);
3043
+ if (!showActive) {
3044
+ sections = sections.filter((section) => section.id !== "active");
3045
+ }
3046
+ if (tags.size > 0) {
3047
+ sections = sections.map((section) => ({
3048
+ ...section,
3049
+ cards: section.cards.filter((card) => {
3050
+ if (!card.metadata?.tags) return false;
3051
+ return card.metadata.tags.some((tag) => tags.has(tag));
3052
+ })
3053
+ })).filter((section) => section.cards.length > 0);
3054
+ }
3055
+ if (!query) return sections;
3056
+ return sections.map((section) => ({
3057
+ ...section,
3058
+ cards: section.cards.filter((card) => matchesSearch(card, query))
3059
+ })).filter((section) => section.cards.length > 0);
3060
+ };
3061
+ onMount(() => {
3062
+ const cleanupJsonRead = devtoolsEventClient.on("package-json-read", (event) => {
3063
+ setCurrentPackageJson(event.payload.packageJson);
3064
+ updatePluginCards(event.payload.packageJson);
3065
+ });
3066
+ const cleanupJsonUpdated = devtoolsEventClient.on("package-json-updated", (event) => {
3067
+ setCurrentPackageJson(event.payload.packageJson);
3068
+ updatePluginCards(event.payload.packageJson);
3069
+ });
3070
+ const cleanupDevtoolsInstalled = devtoolsEventClient.on("devtools-installed", (event) => {
3071
+ setPluginSections((prevSections) => prevSections.map((section) => ({
3072
+ ...section,
3073
+ cards: section.cards.map((card) => card.devtoolsPackage === event.payload.packageName ? {
3074
+ ...card,
3075
+ status: event.payload.success ? "success" : "error",
3076
+ error: event.payload.error
3077
+ } : card)
3078
+ })));
3079
+ });
3080
+ const cleanupPluginAdded = devtoolsEventClient.on("plugin-added", (event) => {
3081
+ setPluginSections((prevSections) => prevSections.map((section) => ({
3082
+ ...section,
3083
+ cards: section.cards.map((card) => card.devtoolsPackage === event.payload.packageName ? {
3084
+ ...card,
3085
+ status: event.payload.success ? "success" : "error",
3086
+ error: event.payload.error
3087
+ } : card)
3088
+ })));
3089
+ if (event.payload.success) {
3090
+ const pkg = currentPackageJson();
3091
+ if (pkg) {
3092
+ updatePluginCards(pkg);
3093
+ }
3094
+ }
3095
+ });
3096
+ onCleanup(() => {
3097
+ cleanupJsonRead();
3098
+ cleanupJsonUpdated();
3099
+ cleanupDevtoolsInstalled();
3100
+ cleanupPluginAdded();
3101
+ });
3102
+ devtoolsEventClient.emit("mounted", void 0);
3103
+ });
3104
+ const updatePluginCards = (pkg) => {
3105
+ if (!pkg) return;
3106
+ const currentFramework = detectFramework(pkg, FRAMEWORKS);
3107
+ const registeredPlugins = new Set(plugins()?.map((p) => p.id || "") || []);
3108
+ const allCards = buildPluginCards(pkg, currentFramework, registeredPlugins, pluginSections().flatMap((s) => s.cards));
3109
+ const sections = groupIntoSections(allCards);
3110
+ setPluginSections(sections);
3111
+ };
3112
+ const handleAction = (card) => {
3113
+ if (card.actionType === "requires-package" || card.actionType === "wrong-framework" || card.actionType === "already-installed" || card.actionType === "version-mismatch") {
3114
+ return;
3115
+ }
3116
+ setPluginSections((prevSections) => prevSections.map((section) => ({
3117
+ ...section,
3118
+ cards: section.cards.map((c) => c.devtoolsPackage === card.devtoolsPackage ? {
3119
+ ...c,
3120
+ status: "installing"
3121
+ } : c)
3122
+ })));
3123
+ if (card.actionType === "bump-version") {
3124
+ devtoolsEventClient.emit("bump-package-version", {
3125
+ packageName: card.requiredPackageName,
3126
+ devtoolsPackage: card.devtoolsPackage,
3127
+ pluginName: card.metadata?.title || card.devtoolsPackage,
3128
+ minVersion: card.metadata?.requires?.minVersion,
3129
+ pluginImport: card.metadata?.pluginImport
3130
+ });
3131
+ return;
3132
+ }
3133
+ if (card.actionType === "add-to-devtools") {
3134
+ devtoolsEventClient.emit("add-plugin-to-devtools", {
3135
+ packageName: card.devtoolsPackage,
3136
+ // should always be defined
3137
+ pluginName: card.metadata?.title ?? card.devtoolsPackage,
3138
+ pluginImport: card.metadata?.pluginImport
3139
+ });
3140
+ return;
3141
+ }
3142
+ devtoolsEventClient.emit("install-devtools", {
3143
+ packageName: card.devtoolsPackage,
3144
+ // should always be defined
3145
+ pluginName: card.metadata?.title ?? card.devtoolsPackage,
3146
+ pluginImport: card.metadata?.pluginImport
3147
+ });
3148
+ };
3149
+ const getAllTags = () => {
3150
+ const tags = /* @__PURE__ */ new Set();
3151
+ pluginSections().forEach((section) => {
3152
+ if (section.id === "featured" || section.id === "available") {
3153
+ section.cards.forEach((card) => {
3154
+ if (card.metadata?.tags) {
3155
+ card.metadata.tags.forEach((tag) => tags.add(tag));
3156
+ }
3157
+ });
3158
+ }
3159
+ });
3160
+ return Array.from(tags).sort();
3161
+ };
3162
+ const toggleTag = (tag) => {
3163
+ setSelectedTags((prev) => {
3164
+ const newTags = new Set(prev);
3165
+ if (newTags.has(tag)) {
3166
+ newTags.delete(tag);
3167
+ } else {
3168
+ newTags.add(tag);
3169
+ }
3170
+ return newTags;
3171
+ });
3172
+ };
3173
+ return (() => {
3174
+ var _el$ = _tmpl$26();
3175
+ insert(_el$, createComponent(SettingsPanel, {
3176
+ isOpen: isSettingsOpen,
3177
+ onClose: () => setIsSettingsOpen(false),
3178
+ showActivePlugins,
3179
+ setShowActivePlugins
3180
+ }), null);
3181
+ insert(_el$, createComponent(MarketplaceHeader, {
3182
+ searchInput,
3183
+ onSearchInput: handleSearchInput,
3184
+ onSettingsClick: () => setIsSettingsOpen(!isSettingsOpen()),
3185
+ tags: getAllTags,
3186
+ selectedTags,
3187
+ onToggleTag: toggleTag
3188
+ }), null);
3189
+ insert(_el$, createComponent(Show, {
3190
+ get when() {
3191
+ return getFilteredSections().length > 0;
3192
+ },
3193
+ get children() {
3194
+ return createComponent(For, {
3195
+ get each() {
3196
+ return getFilteredSections();
3197
+ },
3198
+ children: (section) => createComponent(PluginSectionComponent, {
3199
+ section,
3200
+ isCollapsed: () => collapsedSections().has(section.id),
3201
+ onToggleCollapse: () => toggleSection(section.id),
3202
+ onCardAction: handleAction
3203
+ })
3204
+ });
3205
+ }
3206
+ }), null);
3207
+ insert(_el$, createComponent(Show, {
3208
+ get when() {
3209
+ return getFilteredSections().length === 0;
3210
+ },
3211
+ get children() {
3212
+ var _el$2 = _tmpl$14(), _el$3 = _el$2.firstChild;
3213
+ insert(_el$3, (() => {
3214
+ var _c$ = memo(() => !!searchQuery());
3215
+ return () => _c$() ? `No plugins found matching "${searchQuery()}"` : "No additional plugins available. You have all compatible devtools installed and registered!";
3216
+ })());
3217
+ effect((_p$) => {
3218
+ var _v$ = styles().pluginMarketplaceEmpty, _v$2 = styles().pluginMarketplaceEmptyText;
3219
+ _v$ !== _p$.e && className(_el$2, _p$.e = _v$);
3220
+ _v$2 !== _p$.t && className(_el$3, _p$.t = _v$2);
3221
+ return _p$;
3222
+ }, {
3223
+ e: void 0,
3224
+ t: void 0
3225
+ });
3226
+ return _el$2;
3227
+ }
3228
+ }), null);
3229
+ effect(() => className(_el$, styles().pluginMarketplace));
3230
+ return _el$;
3231
+ })();
3232
+ };
3233
+
3234
+ // src/tabs/plugins-tab.tsx
3235
+ var _tmpl$15 = /* @__PURE__ */ template(`<div><div><div><div></div><div><h3>Add More`);
3236
+ var _tmpl$27 = /* @__PURE__ */ template(`<div><h3>`);
3237
+ var _tmpl$34 = /* @__PURE__ */ template(`<div>`);
1300
3238
  var PluginsTab = () => {
1301
3239
  const {
1302
3240
  plugins,
@@ -1306,13 +3244,19 @@ var PluginsTab = () => {
1306
3244
  const {
1307
3245
  expanded,
1308
3246
  hoverUtils,
1309
- animationMs
3247
+ animationMs,
3248
+ setForceExpand
1310
3249
  } = useDrawContext();
1311
3250
  const [pluginRefs, setPluginRefs] = createSignal(/* @__PURE__ */ new Map());
3251
+ const [showMarketplace, setShowMarketplace] = createSignal(false);
1312
3252
  const styles = useStyles();
1313
3253
  const {
1314
3254
  theme
1315
3255
  } = useTheme();
3256
+ const hasPlugins = createMemo(() => plugins()?.length && plugins().length > 0);
3257
+ createEffect(() => {
3258
+ setForceExpand(showMarketplace());
3259
+ });
1316
3260
  createEffect(() => {
1317
3261
  const currentActivePlugins = plugins()?.filter((plugin) => activePlugins().includes(plugin.id));
1318
3262
  currentActivePlugins?.forEach((plugin) => {
@@ -1322,77 +3266,111 @@ var PluginsTab = () => {
1322
3266
  }
1323
3267
  });
1324
3268
  });
1325
- return (() => {
1326
- var _el$ = _tmpl$5(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
1327
- _el$2.addEventListener("mouseleave", () => hoverUtils.leave());
1328
- _el$2.addEventListener("mouseenter", () => hoverUtils.enter());
1329
- insert(_el$3, createComponent(For, {
1330
- get each() {
1331
- return plugins();
1332
- },
1333
- children: (plugin) => {
1334
- let pluginHeading;
1335
- createEffect(() => {
1336
- if (pluginHeading) {
1337
- typeof plugin.name === "string" ? pluginHeading.textContent = plugin.name : plugin.name(pluginHeading, theme());
1338
- }
1339
- });
1340
- const isActive = createMemo(() => activePlugins().includes(plugin.id));
1341
- return (() => {
1342
- var _el$4 = _tmpl$23(), _el$5 = _el$4.firstChild;
1343
- _el$4.$$click = () => {
1344
- toggleActivePlugins(plugin.id);
1345
- };
1346
- var _ref$ = pluginHeading;
1347
- typeof _ref$ === "function" ? use(_ref$, _el$5) : pluginHeading = _el$5;
1348
- effect((_p$) => {
1349
- var _v$4 = clsx3(styles().pluginName, {
1350
- active: isActive()
1351
- }), _v$5 = `${PLUGIN_TITLE_CONTAINER_ID}-${plugin.id}`;
1352
- _v$4 !== _p$.e && className(_el$4, _p$.e = _v$4);
1353
- _v$5 !== _p$.t && setAttribute(_el$5, "id", _p$.t = _v$5);
1354
- return _p$;
1355
- }, {
1356
- e: void 0,
1357
- t: void 0
3269
+ const handleMarketplaceClick = () => setShowMarketplace(!showMarketplace());
3270
+ const handlePluginClick = (pluginId) => {
3271
+ if (showMarketplace()) {
3272
+ setShowMarketplace(false);
3273
+ }
3274
+ toggleActivePlugins(pluginId);
3275
+ };
3276
+ return createComponent(Show, {
3277
+ get when() {
3278
+ return hasPlugins();
3279
+ },
3280
+ get fallback() {
3281
+ return createComponent(PluginMarketplace, {});
3282
+ },
3283
+ get children() {
3284
+ var _el$ = _tmpl$15(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
3285
+ _el$2.addEventListener("mouseleave", () => {
3286
+ if (!showMarketplace()) {
3287
+ hoverUtils.leave();
3288
+ }
3289
+ });
3290
+ _el$2.addEventListener("mouseenter", () => hoverUtils.enter());
3291
+ insert(_el$4, createComponent(For, {
3292
+ get each() {
3293
+ return plugins();
3294
+ },
3295
+ children: (plugin) => {
3296
+ let pluginHeading;
3297
+ createEffect(() => {
3298
+ if (pluginHeading) {
3299
+ typeof plugin.name === "string" ? pluginHeading.textContent = plugin.name : plugin.name(pluginHeading, theme());
3300
+ }
1358
3301
  });
1359
- return _el$4;
1360
- })();
1361
- }
1362
- }));
1363
- insert(_el$, createComponent(For, {
1364
- get each() {
1365
- return activePlugins();
1366
- },
1367
- children: (pluginId) => (() => {
1368
- var _el$6 = _tmpl$33();
1369
- use((el) => {
1370
- setPluginRefs((prev) => {
1371
- const updated = new Map(prev);
1372
- updated.set(pluginId, el);
1373
- return updated;
3302
+ const isActive = createMemo(() => activePlugins().includes(plugin.id));
3303
+ return (() => {
3304
+ var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
3305
+ _el$6.$$click = () => handlePluginClick(plugin.id);
3306
+ var _ref$ = pluginHeading;
3307
+ typeof _ref$ === "function" ? use(_ref$, _el$7) : pluginHeading = _el$7;
3308
+ effect((_p$) => {
3309
+ var _v$6 = clsx3(styles().pluginName, {
3310
+ active: isActive()
3311
+ }), _v$7 = `${PLUGIN_TITLE_CONTAINER_ID}-${plugin.id}`;
3312
+ _v$6 !== _p$.e && className(_el$6, _p$.e = _v$6);
3313
+ _v$7 !== _p$.t && setAttribute(_el$7, "id", _p$.t = _v$7);
3314
+ return _p$;
3315
+ }, {
3316
+ e: void 0,
3317
+ t: void 0
3318
+ });
3319
+ return _el$6;
3320
+ })();
3321
+ }
3322
+ }));
3323
+ _el$5.$$click = handleMarketplaceClick;
3324
+ insert(_el$, createComponent(Show, {
3325
+ get when() {
3326
+ return showMarketplace();
3327
+ },
3328
+ get fallback() {
3329
+ return createComponent(For, {
3330
+ get each() {
3331
+ return activePlugins();
3332
+ },
3333
+ children: (pluginId) => (() => {
3334
+ var _el$8 = _tmpl$34();
3335
+ use((el) => {
3336
+ setPluginRefs((prev) => {
3337
+ const updated = new Map(prev);
3338
+ updated.set(pluginId, el);
3339
+ return updated;
3340
+ });
3341
+ }, _el$8);
3342
+ setAttribute(_el$8, "id", `${PLUGIN_CONTAINER_ID}-${pluginId}`);
3343
+ effect(() => className(_el$8, styles().pluginsTabContent));
3344
+ return _el$8;
3345
+ })()
1374
3346
  });
1375
- }, _el$6);
1376
- setAttribute(_el$6, "id", `${PLUGIN_CONTAINER_ID}-${pluginId}`);
1377
- effect(() => className(_el$6, styles().pluginsTabContent));
1378
- return _el$6;
1379
- })()
1380
- }), null);
1381
- effect((_p$) => {
1382
- var _v$ = styles().pluginsTabPanel, _v$2 = clsx3(styles().pluginsTabDraw(expanded()), {
1383
- [styles().pluginsTabDraw(expanded())]: expanded()
1384
- }, styles().pluginsTabDrawTransition(animationMs)), _v$3 = clsx3(styles().pluginsTabSidebar(expanded()), styles().pluginsTabSidebarTransition(animationMs));
1385
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
1386
- _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
1387
- _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
1388
- return _p$;
1389
- }, {
1390
- e: void 0,
1391
- t: void 0,
1392
- a: void 0
1393
- });
1394
- return _el$;
1395
- })();
3347
+ },
3348
+ get children() {
3349
+ return createComponent(PluginMarketplace, {});
3350
+ }
3351
+ }), null);
3352
+ effect((_p$) => {
3353
+ var _v$ = styles().pluginsTabPanel, _v$2 = clsx3(styles().pluginsTabDraw(expanded()), {
3354
+ [styles().pluginsTabDraw(expanded())]: expanded()
3355
+ }, styles().pluginsTabDrawTransition(animationMs)), _v$3 = clsx3(styles().pluginsTabSidebar(expanded()), styles().pluginsTabSidebarTransition(animationMs)), _v$4 = styles().pluginsList, _v$5 = clsx3(styles().pluginNameAddMore, {
3356
+ active: showMarketplace()
3357
+ });
3358
+ _v$ !== _p$.e && className(_el$, _p$.e = _v$);
3359
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
3360
+ _v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
3361
+ _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
3362
+ _v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
3363
+ return _p$;
3364
+ }, {
3365
+ e: void 0,
3366
+ t: void 0,
3367
+ a: void 0,
3368
+ o: void 0,
3369
+ i: void 0
3370
+ });
3371
+ return _el$;
3372
+ }
3373
+ });
1396
3374
  };
1397
3375
  delegateEvents(["click"]);
1398
3376
  function useHeadChanges(onChange, opts = {}) {
@@ -1457,11 +3435,11 @@ function useHeadChanges(onChange, opts = {}) {
1457
3435
  }
1458
3436
 
1459
3437
  // src/tabs/seo-tab.tsx
1460
- var _tmpl$6 = /* @__PURE__ */ template(`<div><div> Preview</div><div></div><div></div><div>`);
1461
- var _tmpl$24 = /* @__PURE__ */ template(`<img alt=Preview>`);
1462
- var _tmpl$34 = /* @__PURE__ */ template(`<div>No Image`);
1463
- var _tmpl$42 = /* @__PURE__ */ template(`<div>`);
1464
- var _tmpl$52 = /* @__PURE__ */ template(`<div><strong>Missing tags for <!>:</strong><ul>`);
3438
+ var _tmpl$16 = /* @__PURE__ */ template(`<div><div> Preview</div><div></div><div></div><div>`);
3439
+ var _tmpl$28 = /* @__PURE__ */ template(`<img alt=Preview>`);
3440
+ var _tmpl$35 = /* @__PURE__ */ template(`<div>No Image`);
3441
+ var _tmpl$43 = /* @__PURE__ */ template(`<div>`);
3442
+ var _tmpl$53 = /* @__PURE__ */ template(`<div><strong>Missing tags for <!>:</strong><ul>`);
1465
3443
  var _tmpl$62 = /* @__PURE__ */ template(`<li>`);
1466
3444
  var SOCIALS = [
1467
3445
  {
@@ -1588,12 +3566,12 @@ var SOCIALS = [
1588
3566
  function SocialPreview(props) {
1589
3567
  const styles = useStyles();
1590
3568
  return (() => {
1591
- var _el$ = _tmpl$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
3569
+ var _el$ = _tmpl$16(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
1592
3570
  insert(_el$2, () => props.network, _el$3);
1593
3571
  insert(_el$, (() => {
1594
3572
  var _c$ = memo(() => !!props.meta.image);
1595
3573
  return () => _c$() ? (() => {
1596
- var _el$7 = _tmpl$24();
3574
+ var _el$7 = _tmpl$28();
1597
3575
  effect((_p$) => {
1598
3576
  var _v$8 = props.meta.image, _v$9 = styles().seoPreviewImage;
1599
3577
  _v$8 !== _p$.e && setAttribute(_el$7, "src", _p$.e = _v$8);
@@ -1605,7 +3583,7 @@ function SocialPreview(props) {
1605
3583
  });
1606
3584
  return _el$7;
1607
3585
  })() : (() => {
1608
- var _el$8 = _tmpl$34();
3586
+ var _el$8 = _tmpl$35();
1609
3587
  _el$8.style.setProperty("background", "#222");
1610
3588
  _el$8.style.setProperty("color", "#888");
1611
3589
  _el$8.style.setProperty("display", "flex");
@@ -1686,7 +3664,7 @@ var SeoTab = () => {
1686
3664
  }), createComponent(SectionDescription, {
1687
3665
  children: "See how your current page will look when shared on popular social networks. The tool checks for essential meta tags and highlights any that are missing."
1688
3666
  }), (() => {
1689
- var _el$9 = _tmpl$42();
3667
+ var _el$9 = _tmpl$43();
1690
3668
  insert(_el$9, createComponent(For, {
1691
3669
  get each() {
1692
3670
  return reports();
@@ -1694,7 +3672,7 @@ var SeoTab = () => {
1694
3672
  children: (report, i) => {
1695
3673
  const social = SOCIALS[i()];
1696
3674
  return (() => {
1697
- var _el$0 = _tmpl$42();
3675
+ var _el$0 = _tmpl$43();
1698
3676
  insert(_el$0, createComponent(SocialPreview, {
1699
3677
  get meta() {
1700
3678
  return report.found;
@@ -1709,7 +3687,7 @@ var SeoTab = () => {
1709
3687
  insert(_el$0, (() => {
1710
3688
  var _c$2 = memo(() => report.missing.length > 0);
1711
3689
  return () => _c$2() ? (() => {
1712
- var _el$1 = _tmpl$52(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$13 = _el$11.nextSibling; _el$13.nextSibling; var _el$14 = _el$10.nextSibling;
3690
+ var _el$1 = _tmpl$53(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$13 = _el$11.nextSibling; _el$13.nextSibling; var _el$14 = _el$10.nextSibling;
1713
3691
  insert(_el$10, () => social?.network, _el$13);
1714
3692
  insert(_el$14, createComponent(For, {
1715
3693
  get each() {
@@ -1766,9 +3744,9 @@ var tabs = [{
1766
3744
  }];
1767
3745
 
1768
3746
  // src/components/tabs.tsx
1769
- var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
1770
- var _tmpl$25 = /* @__PURE__ */ template(`<button type=button>`);
1771
- var _tmpl$35 = /* @__PURE__ */ template(`<div><button type=button></button><button type=button>`);
3747
+ var _tmpl$17 = /* @__PURE__ */ template(`<div>`);
3748
+ var _tmpl$29 = /* @__PURE__ */ template(`<button type=button>`);
3749
+ var _tmpl$36 = /* @__PURE__ */ template(`<div><button type=button></button><button type=button>`);
1772
3750
  var Tabs = (props) => {
1773
3751
  const styles = useStyles();
1774
3752
  const {
@@ -1783,11 +3761,11 @@ var Tabs = (props) => {
1783
3761
  hoverUtils
1784
3762
  } = useDrawContext();
1785
3763
  return (() => {
1786
- var _el$ = _tmpl$7();
3764
+ var _el$ = _tmpl$17();
1787
3765
  insert(_el$, createComponent(For, {
1788
3766
  each: tabs,
1789
3767
  children: (tab) => (() => {
1790
- var _el$2 = _tmpl$25();
3768
+ var _el$2 = _tmpl$29();
1791
3769
  _el$2.addEventListener("mouseleave", () => {
1792
3770
  if (tab.id === "plugins") hoverUtils.leave();
1793
3771
  });
@@ -1807,7 +3785,7 @@ var Tabs = (props) => {
1807
3785
  insert(_el$, (() => {
1808
3786
  var _c$ = memo(() => pipWindow().pipWindow !== null);
1809
3787
  return () => _c$() ? null : (() => {
1810
- var _el$3 = _tmpl$35(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
3788
+ var _el$3 = _tmpl$36(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
1811
3789
  _el$3.style.setProperty("margin-top", "auto");
1812
3790
  _el$4.$$click = handleDetachment;
1813
3791
  insert(_el$4, createComponent(PiP, {}));
@@ -1830,7 +3808,7 @@ var Tabs = (props) => {
1830
3808
  })();
1831
3809
  };
1832
3810
  delegateEvents(["click"]);
1833
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3811
+ var _tmpl$18 = /* @__PURE__ */ template(`<div>`);
1834
3812
  var TabContent = () => {
1835
3813
  const {
1836
3814
  state
@@ -1838,15 +3816,160 @@ var TabContent = () => {
1838
3816
  const styles = useStyles();
1839
3817
  const component = createMemo(() => tabs.find((t) => t.id === state().activeTab)?.component || null);
1840
3818
  return (() => {
1841
- var _el$ = _tmpl$8();
3819
+ var _el$ = _tmpl$18();
1842
3820
  insert(_el$, () => component()?.());
1843
3821
  effect(() => className(_el$, styles().tabContent));
1844
3822
  return _el$;
1845
3823
  })();
1846
3824
  };
3825
+ var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
3826
+ var SourceInspector = () => {
3827
+ const highlightStateInit = () => ({
3828
+ element: null,
3829
+ bounding: {
3830
+ width: 0,
3831
+ height: 0,
3832
+ left: 0,
3833
+ top: 0
3834
+ },
3835
+ dataSource: ""
3836
+ });
3837
+ const [highlightState, setHighlightState] = createStore(highlightStateInit());
3838
+ const resetHighlight = () => {
3839
+ setHighlightState(highlightStateInit());
3840
+ };
3841
+ const [nameTagRef, setNameTagRef] = createSignal(null);
3842
+ const nameTagSize = createElementSize(() => nameTagRef());
3843
+ const [mousePosition, setMousePosition] = createStore({
3844
+ x: 0,
3845
+ y: 0
3846
+ });
3847
+ createEventListener(document, "mousemove", (e) => {
3848
+ setMousePosition({
3849
+ x: e.clientX,
3850
+ y: e.clientY
3851
+ });
3852
+ });
3853
+ const downList = useKeyDownList();
3854
+ const isHighlightingKeysHeld = createMemo(() => {
3855
+ const keys = downList();
3856
+ const isShiftHeld = keys.includes("SHIFT");
3857
+ const isCtrlHeld = keys.includes("CONTROL");
3858
+ const isMetaHeld = keys.includes("META");
3859
+ return isShiftHeld && (isCtrlHeld || isMetaHeld);
3860
+ });
3861
+ createEffect(() => {
3862
+ if (!isHighlightingKeysHeld()) {
3863
+ resetHighlight();
3864
+ return;
3865
+ }
3866
+ const target = document.elementFromPoint(mousePosition.x, mousePosition.y);
3867
+ if (!(target instanceof HTMLElement)) {
3868
+ resetHighlight();
3869
+ return;
3870
+ }
3871
+ if (target === highlightState.element) {
3872
+ return;
3873
+ }
3874
+ const dataSource = target.getAttribute("data-tsd-source");
3875
+ if (!dataSource) {
3876
+ resetHighlight();
3877
+ return;
3878
+ }
3879
+ const rect = target.getBoundingClientRect();
3880
+ const bounding = {
3881
+ width: rect.width,
3882
+ height: rect.height,
3883
+ left: rect.left,
3884
+ top: rect.top
3885
+ };
3886
+ setHighlightState({
3887
+ element: target,
3888
+ bounding,
3889
+ dataSource
3890
+ });
3891
+ });
3892
+ createEventListener(document, "click", (e) => {
3893
+ if (!highlightState.element) return;
3894
+ window.getSelection()?.removeAllRanges();
3895
+ e.preventDefault();
3896
+ e.stopPropagation();
3897
+ fetch(`${location.origin}/__tsd/open-source?source=${encodeURIComponent(highlightState.dataSource)}`).catch(() => {
3898
+ });
3899
+ });
3900
+ const currentElementBoxStyles = createMemo(() => {
3901
+ if (highlightState.element) {
3902
+ return {
3903
+ display: "block",
3904
+ width: `${highlightState.bounding.width}px`,
3905
+ height: `${highlightState.bounding.height}px`,
3906
+ left: `${highlightState.bounding.left}px`,
3907
+ top: `${highlightState.bounding.top}px`,
3908
+ "background-color": "oklch(55.4% 0.046 257.417 /0.25)",
3909
+ transition: "all 0.05s linear",
3910
+ position: "fixed",
3911
+ "z-index": 9999
3912
+ };
3913
+ }
3914
+ return {
3915
+ display: "none"
3916
+ };
3917
+ });
3918
+ const fileNameStyles = createMemo(() => {
3919
+ if (highlightState.element && nameTagRef()) {
3920
+ const windowWidth = window.innerWidth;
3921
+ const nameTagHeight = nameTagSize.height || 26;
3922
+ const nameTagWidth = nameTagSize.width || 0;
3923
+ let left = highlightState.bounding.left;
3924
+ let top = highlightState.bounding.top - nameTagHeight - 4;
3925
+ if (top < 0) {
3926
+ top = highlightState.bounding.top + highlightState.bounding.height + 4;
3927
+ }
3928
+ if (left + nameTagWidth > windowWidth) {
3929
+ left = windowWidth - nameTagWidth - 4;
3930
+ }
3931
+ if (left < 0) {
3932
+ left = 4;
3933
+ }
3934
+ return {
3935
+ position: "fixed",
3936
+ left: `${left}px`,
3937
+ top: `${top}px`,
3938
+ "background-color": "oklch(55.4% 0.046 257.417 /0.80)",
3939
+ color: "white",
3940
+ padding: "2px 4px",
3941
+ fontSize: "12px",
3942
+ "border-radius": "2px",
3943
+ "z-index": 1e4,
3944
+ visibility: "visible",
3945
+ transition: "all 0.05s linear"
3946
+ };
3947
+ }
3948
+ return {
3949
+ display: "none"
3950
+ };
3951
+ });
3952
+ return [(() => {
3953
+ var _el$ = _tmpl$19();
3954
+ use(setNameTagRef, _el$);
3955
+ insert(_el$, () => highlightState.dataSource);
3956
+ effect((_$p) => style(_el$, {
3957
+ ...fileNameStyles(),
3958
+ "pointer-events": "none"
3959
+ }, _$p));
3960
+ return _el$;
3961
+ })(), (() => {
3962
+ var _el$2 = _tmpl$19();
3963
+ effect((_$p) => style(_el$2, {
3964
+ ...currentElementBoxStyles(),
3965
+ "pointer-events": "none"
3966
+ }, _$p));
3967
+ return _el$2;
3968
+ })()];
3969
+ };
1847
3970
 
1848
3971
  // src/devtools.tsx
1849
- var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
3972
+ var _tmpl$20 = /* @__PURE__ */ template(`<div>`);
1850
3973
  function DevTools() {
1851
3974
  const {
1852
3975
  settings
@@ -1959,27 +4082,6 @@ function DevTools() {
1959
4082
  });
1960
4083
  }
1961
4084
  });
1962
- createEffect(() => {
1963
- const openSourceHandler = (e) => {
1964
- const isShiftHeld = e.shiftKey;
1965
- const isCtrlHeld = e.ctrlKey || e.metaKey;
1966
- if (!isShiftHeld || !isCtrlHeld) return;
1967
- if (e.target instanceof HTMLElement) {
1968
- const dataSource = e.target.getAttribute("data-tsd-source");
1969
- window.getSelection()?.removeAllRanges();
1970
- if (dataSource) {
1971
- e.preventDefault();
1972
- e.stopPropagation();
1973
- fetch(`${location.origin}/__tsd/open-source?source=${encodeURIComponent(dataSource)}`).catch(() => {
1974
- });
1975
- }
1976
- }
1977
- };
1978
- window.addEventListener("click", openSourceHandler);
1979
- onCleanup(() => {
1980
- window.removeEventListener("click", openSourceHandler);
1981
- });
1982
- });
1983
4085
  const {
1984
4086
  theme
1985
4087
  } = useTheme();
@@ -1993,7 +4095,7 @@ function DevTools() {
1993
4095
  return (pip().pipWindow ?? window).document.body;
1994
4096
  },
1995
4097
  get children() {
1996
- var _el$ = _tmpl$9();
4098
+ var _el$ = _tmpl$20();
1997
4099
  use(setRootEl, _el$);
1998
4100
  setAttribute(_el$, "data-testid", TANSTACK_DEVTOOLS);
1999
4101
  insert(_el$, createComponent(Show, {
@@ -2023,7 +4125,8 @@ function DevTools() {
2023
4125
  }
2024
4126
  })];
2025
4127
  }
2026
- }));
4128
+ }), null);
4129
+ insert(_el$, createComponent(SourceInspector, {}), null);
2027
4130
  return _el$;
2028
4131
  }
2029
4132
  });