@lvce-editor/extension-detail-view 3.61.0 → 3.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,7 +72,7 @@ const categories = () => {
72
72
  const resources = () => {
73
73
  return i18nString(Resources$1);
74
74
  };
75
- const copy = () => {
75
+ const copy$1 = () => {
76
76
  return i18nString(Copy);
77
77
  };
78
78
  const copyImage$1 = () => {
@@ -224,17 +224,9 @@ const featureActivationEventsEnabled = extension => {
224
224
 
225
225
  const None$2 = 'none';
226
226
  const Panel = 'panel';
227
- const Tab$1 = 'tab';
227
+ const Tab = 'tab';
228
228
  const TabList = 'tablist';
229
- const AriaRoles = {
230
- __proto__: null,
231
- None: None$2,
232
- Panel,
233
- Tab: Tab$1,
234
- TabList};
235
- const mergeClassNames = (...classNames) => {
236
- return classNames.filter(Boolean).join(' ');
237
- };
229
+
238
230
  const Button$1 = 1;
239
231
  const Div = 4;
240
232
  const H1 = 5;
@@ -258,30 +250,17 @@ const A = 53;
258
250
  const Ul = 60;
259
251
  const Code$2 = 65;
260
252
  const Dt = 67;
261
- const VirtualDomElements = {
262
- __proto__: null,
263
- A,
264
- Aside: Aside$1,
265
- Button: Button$1,
266
- Code: Code$2,
267
- Dd,
268
- Div,
269
- Dl,
270
- Dt,
271
- H1,
272
- H2,
273
- Img,
274
- Li,
275
- P,
276
- Pre,
277
- Span,
278
- TBody,
279
- THead,
280
- Table: Table$1,
281
- Td,
282
- Th,
283
- Tr,
284
- Ul};
253
+
254
+ const DebugWorker = 55;
255
+ const ExtensionHostWorker = 44;
256
+ const FileSystemWorker$1 = 209;
257
+ const MarkdownWorker$1 = 300;
258
+ const RendererWorker$1 = 1;
259
+
260
+ const mergeClassNames = (...classNames) => {
261
+ return classNames.filter(Boolean).join(' ');
262
+ };
263
+
285
264
  const text = data => {
286
265
  return {
287
266
  type: Text$1,
@@ -343,11 +322,11 @@ const TableHeading = 'TableHeading';
343
322
  const Viewlet = 'Viewlet';
344
323
 
345
324
  const li = {
346
- type: VirtualDomElements.Li,
325
+ type: Li,
347
326
  childCount: 1
348
327
  };
349
328
  const code = {
350
- type: VirtualDomElements.Code,
329
+ type: Code$2,
351
330
  childCount: 1
352
331
  };
353
332
  const getActivationEventVirtualDom = event => {
@@ -356,7 +335,7 @@ const getActivationEventVirtualDom = event => {
356
335
 
357
336
  const getFeatureContentHeadingVirtualDom = heading => {
358
337
  return [{
359
- type: VirtualDomElements.H1,
338
+ type: H1,
360
339
  childCount: 1
361
340
  }, text(heading)];
362
341
  };
@@ -364,11 +343,11 @@ const getFeatureContentHeadingVirtualDom = heading => {
364
343
  const getFeatureActivationEventsVirtualDom = activationEvents$1 => {
365
344
  const heading = activationEvents();
366
345
  return [{
367
- type: VirtualDomElements.Div,
346
+ type: Div,
368
347
  className: FeatureContent,
369
348
  childCount: 2
370
349
  }, ...getFeatureContentHeadingVirtualDom(heading), {
371
- type: VirtualDomElements.Ul,
350
+ type: Ul,
372
351
  childCount: activationEvents$1.length
373
352
  }, ...activationEvents$1.flatMap(getActivationEventVirtualDom)];
374
353
  };
@@ -423,18 +402,18 @@ const getFeatureCommandsEmptyVirtualDom = () => {
423
402
  const heading = commands$1();
424
403
  const emptyCommandsArray$1 = emptyCommandsArray();
425
404
  return [{
426
- type: VirtualDomElements.Div,
405
+ type: Div,
427
406
  className: FeatureContent,
428
407
  childCount: 2
429
408
  }, ...getFeatureContentHeadingVirtualDom(heading), {
430
- type: VirtualDomElements.P,
409
+ type: P,
431
410
  childCount: 1
432
411
  }, text(emptyCommandsArray$1)];
433
412
  };
434
413
 
435
414
  const getTableHeadingVirtualDom = heading => {
436
415
  return [{
437
- type: VirtualDomElements.Th,
416
+ type: Th,
438
417
  className: TableHeading,
439
418
  childCount: 1
440
419
  }, text(heading)];
@@ -442,18 +421,18 @@ const getTableHeadingVirtualDom = heading => {
442
421
 
443
422
  const getCellCodeVirtualDom = value => {
444
423
  return [{
445
- type: VirtualDomElements.Td,
424
+ type: Td,
446
425
  className: TableCell,
447
426
  childCount: 1
448
427
  }, {
449
- type: VirtualDomElements.Code,
428
+ type: Code$2,
450
429
  childCount: 1
451
430
  }, text(value)];
452
431
  };
453
432
 
454
433
  const getCellTextVirtualDom = value => {
455
434
  return [{
456
- type: VirtualDomElements.Td,
435
+ type: Td,
457
436
  className: TableCell,
458
437
  childCount: 1
459
438
  }, text(value)];
@@ -481,7 +460,7 @@ const getCellVirtualDom = entry => {
481
460
 
482
461
  const getTableRowVirtualDom = entries => {
483
462
  return [{
484
- type: VirtualDomElements.Tr,
463
+ type: Tr,
485
464
  childCount: entries.length
486
465
  }, ...entries.flatMap(getCellVirtualDom)];
487
466
  };
@@ -492,17 +471,17 @@ const getTableVirtualDom = tableInfo => {
492
471
  rows
493
472
  } = tableInfo;
494
473
  return [{
495
- type: VirtualDomElements.Table,
474
+ type: Table$1,
496
475
  className: Table,
497
476
  childCount: 2
498
477
  }, {
499
- type: VirtualDomElements.THead,
478
+ type: THead,
500
479
  childCount: 1
501
480
  }, {
502
- type: VirtualDomElements.Tr,
481
+ type: Tr,
503
482
  childCount: headings.length
504
483
  }, ...headings.flatMap(getTableHeadingVirtualDom), {
505
- type: VirtualDomElements.TBody,
484
+ type: TBody,
506
485
  childCount: rows.length
507
486
  }, ...rows.flatMap(getTableRowVirtualDom)];
508
487
  };
@@ -515,7 +494,7 @@ const getFeatureCommandsVirtualDom = commands => {
515
494
  const heading = commands$1();
516
495
  const tableInfo = getCommandTableEntries(commands);
517
496
  return [{
518
- type: VirtualDomElements.Div,
497
+ type: Div,
519
498
  className: FeatureContent,
520
499
  childCount: 2
521
500
  }, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
@@ -563,7 +542,7 @@ const getJsonValidationTableEntries = rows => {
563
542
  };
564
543
 
565
544
  const parentNode$1 = {
566
- type: VirtualDomElements.Div,
545
+ type: Div,
567
546
  className: FeatureContent,
568
547
  childCount: 2
569
548
  };
@@ -596,7 +575,7 @@ const getFeatureProgrammingLanguagesVirtualDom = () => {
596
575
  const heading = programmingLanguages();
597
576
  // TODO
598
577
  return [{
599
- type: VirtualDomElements.Div,
578
+ type: Div,
600
579
  className: FeatureContent,
601
580
  childCount: 1
602
581
  }, ...getFeatureContentHeadingVirtualDom(heading)];
@@ -615,13 +594,13 @@ class FeatureNotFoundError extends Error {
615
594
 
616
595
  const getFeatureUnsupportedVirtualDom = state => {
617
596
  return [{
618
- type: VirtualDomElements.Div,
597
+ type: Div,
619
598
  childCount: 2
620
599
  }, {
621
- type: VirtualDomElements.H1,
600
+ type: H1,
622
601
  childCount: 1
623
602
  }, text(unsupportedFeature()), {
624
- type: VirtualDomElements.P,
603
+ type: P,
625
604
  childCount: 1
626
605
  }, text(selectedFeatureUnknownOrUnsupported())];
627
606
  };
@@ -658,15 +637,13 @@ const getFeatureVirtualDomHandler = featureName => {
658
637
  };
659
638
 
660
639
  const rpcs = Object.create(null);
661
- const set$g = (id, rpc) => {
640
+ const set$a = (id, rpc) => {
662
641
  rpcs[id] = rpc;
663
642
  };
664
643
  const get$2 = id => {
665
644
  return rpcs[id];
666
645
  };
667
646
 
668
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
669
-
670
647
  const create$7 = rpcId => {
671
648
  return {
672
649
  // @ts-ignore
@@ -682,7 +659,7 @@ const create$7 = rpcId => {
682
659
  return rpc.invokeAndTransfer(method, ...params);
683
660
  },
684
661
  set(rpc) {
685
- set$g(rpcId, rpc);
662
+ set$a(rpcId, rpc);
686
663
  },
687
664
  async dispose() {
688
665
  const rpc = get$2(rpcId);
@@ -690,132 +667,478 @@ const create$7 = rpcId => {
690
667
  }
691
668
  };
692
669
  };
693
- const ExtensionHostWorker = 44;
694
- const FileSystemWorker$1 = 209;
695
- const MarkdownWorker$1 = 300;
696
- const RendererWorker$1 = 1;
670
+
697
671
  const {
698
- invoke: invoke$9,
699
- set: set$9} = create$7(ExtensionHostWorker);
672
+ invoke: invoke$5,
673
+ invokeAndTransfer: invokeAndTransfer$4,
674
+ set: set$9,
675
+ dispose: dispose$5
676
+ } = create$7(ExtensionHostWorker);
677
+ const executeReferenceProvider = async (id, offset) => {
678
+ // @ts-ignore
679
+ return invoke$5('ExtensionHostReference.executeReferenceProvider', id, offset);
680
+ };
681
+ const executeFileReferenceProvider = async id => {
682
+ // @ts-ignore
683
+ return invoke$5('ExtensionHostReference.executeFileReferenceProvider', id);
684
+ };
700
685
  const getRuntimeStatus$2 = async extensionId => {
701
686
  // @ts-ignore
702
- return invoke$9('ExtensionHost.getRuntimeStatus', extensionId);
687
+ return invoke$5('ExtensionHost.getRuntimeStatus', extensionId);
703
688
  };
689
+
704
690
  const ExtensionHost = {
705
691
  __proto__: null,
692
+ dispose: dispose$5,
693
+ executeFileReferenceProvider,
694
+ executeReferenceProvider,
706
695
  getRuntimeStatus: getRuntimeStatus$2,
696
+ invoke: invoke$5,
697
+ invokeAndTransfer: invokeAndTransfer$4,
707
698
  set: set$9
708
699
  };
700
+
709
701
  const {
710
- invoke: invoke$7,
711
- set: set$7} = create$7(FileSystemWorker$1);
712
- const readFile$1$1 = async uri => {
713
- return invoke$7('FileSystem.readFile', uri);
702
+ invoke: invoke$4,
703
+ invokeAndTransfer: invokeAndTransfer$3,
704
+ set: set$8,
705
+ dispose: dispose$4
706
+ } = create$7(FileSystemWorker$1);
707
+ const remove$1 = async dirent => {
708
+ return invoke$4('FileSystem.remove', dirent);
709
+ };
710
+ const readDirWithFileTypes = async uri => {
711
+ return invoke$4('FileSystem.readDirWithFileTypes', uri);
712
+ };
713
+ const getPathSeparator = async root => {
714
+ // @ts-ignore
715
+ return invoke$4('FileSystem.getPathSeparator', root);
716
+ };
717
+ const getRealPath = async path => {
718
+ return invoke$4('FileSystem.getRealPath', path);
719
+ };
720
+ const stat = async dirent => {
721
+ return invoke$4('FileSystem.stat', dirent);
722
+ };
723
+ const createFile = async uri => {
724
+ return invoke$4('FileSystem.writeFile', uri, '');
725
+ };
726
+ const readFile$3 = async uri => {
727
+ return invoke$4('FileSystem.readFile', uri);
728
+ };
729
+ const writeFile = async (uri, content) => {
730
+ return invoke$4('FileSystem.writeFile', uri, content);
731
+ };
732
+ const mkdir = async uri => {
733
+ return invoke$4('FileSystem.mkdir', uri);
734
+ };
735
+ const rename = async (oldUri, newUri) => {
736
+ return invoke$4('FileSystem.rename', oldUri, newUri);
737
+ };
738
+ const copy = async (oldUri, newUri) => {
739
+ return invoke$4('FileSystem.copy', oldUri, newUri);
714
740
  };
715
741
  const exists$1 = async uri => {
716
742
  // @ts-ignore
717
- return invoke$7('FileSystem.exists', uri);
743
+ return invoke$4('FileSystem.exists', uri);
744
+ };
745
+ const getFolderSize$2 = async uri => {
746
+ // @ts-ignore
747
+ return invoke$4('FileSystem.getFolderSize', uri);
718
748
  };
749
+ const readFileAsBlob$1 = async uri => {
750
+ // @ts-ignore
751
+ return invoke$4('FileSystem.readFileAsBlob', uri);
752
+ };
753
+ const appendFile = async (uri, text) => {
754
+ // @ts-ignore
755
+ return invoke$4('FileSystem.appendFile', uri, text);
756
+ };
757
+
719
758
  const FileSystemWorker = {
720
759
  __proto__: null,
760
+ appendFile,
761
+ copy,
762
+ createFile,
763
+ dispose: dispose$4,
721
764
  exists: exists$1,
722
- invoke: invoke$7,
723
- readFile: readFile$1$1,
724
- set: set$7};
765
+ getFolderSize: getFolderSize$2,
766
+ getPathSeparator,
767
+ getRealPath,
768
+ invoke: invoke$4,
769
+ invokeAndTransfer: invokeAndTransfer$3,
770
+ mkdir,
771
+ readDirWithFileTypes,
772
+ readFile: readFile$3,
773
+ readFileAsBlob: readFileAsBlob$1,
774
+ remove: remove$1,
775
+ rename,
776
+ set: set$8,
777
+ stat,
778
+ writeFile
779
+ };
780
+
725
781
  const {
726
- invoke: invoke$5,
727
- set: set$5$1} = create$7(MarkdownWorker$1);
782
+ invoke: invoke$3,
783
+ invokeAndTransfer: invokeAndTransfer$2,
784
+ set: set$7,
785
+ dispose: dispose$3
786
+ } = create$7(MarkdownWorker$1);
728
787
  const getVirtualDom$1 = async html => {
729
788
  // @ts-ignore
730
- return invoke$5('Markdown.getVirtualDom', html);
789
+ return invoke$3('Markdown.getVirtualDom', html);
731
790
  };
732
791
  const render$1 = async (markdown, options) => {
733
792
  // @ts-ignore
734
- return invoke$5('Markdown.render', markdown, options);
793
+ return invoke$3('Markdown.render', markdown, options);
735
794
  };
795
+
736
796
  const MarkdownWorker = {
737
797
  __proto__: null,
798
+ dispose: dispose$3,
738
799
  getVirtualDom: getVirtualDom$1,
800
+ invoke: invoke$3,
801
+ invokeAndTransfer: invokeAndTransfer$2,
739
802
  render: render$1,
740
- set: set$5$1
803
+ set: set$7
741
804
  };
805
+
742
806
  const {
743
- invoke: invoke$3,
744
- invokeAndTransfer: invokeAndTransfer$3,
745
- set: set$3$1} = create$7(RendererWorker$1);
807
+ invoke: invoke$2,
808
+ invokeAndTransfer: invokeAndTransfer$1,
809
+ set: set$6,
810
+ dispose: dispose$2
811
+ } = create$7(RendererWorker$1);
812
+ const searchFileHtml = async uri => {
813
+ return invoke$2('ExtensionHost.searchFileWithHtml', uri);
814
+ };
815
+ const getFilePathElectron = async file => {
816
+ return invoke$2('FileSystemHandle.getFilePathElectron', file);
817
+ };
746
818
  const showContextMenu$1 = async (x, y, id, ...args) => {
747
- return invoke$3('ContextMenu.show', x, y, id, ...args);
819
+ return invoke$2('ContextMenu.show', x, y, id, ...args);
820
+ };
821
+ const getElectronVersion = async () => {
822
+ return invoke$2('Process.getElectronVersion');
823
+ };
824
+ const applyBulkReplacement = async bulkEdits => {
825
+ await invoke$2('BulkReplacement.applyBulkReplacement', bulkEdits);
748
826
  };
749
827
  const setColorTheme$2 = async id => {
750
828
  // @ts-ignore
751
- return invoke$3(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
829
+ return invoke$2(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
830
+ };
831
+ const getNodeVersion = async () => {
832
+ return invoke$2('Process.getNodeVersion');
833
+ };
834
+ const getChromeVersion = async () => {
835
+ return invoke$2('Process.getChromeVersion');
836
+ };
837
+ const getV8Version = async () => {
838
+ return invoke$2('Process.getV8Version');
839
+ };
840
+ const getFileHandles = async fileIds => {
841
+ const files = await invoke$2('FileSystemHandle.getFileHandles', fileIds);
842
+ return files;
843
+ };
844
+ const setWorkspacePath = async path => {
845
+ await invoke$2('Workspace.setPath', path);
846
+ };
847
+ const registerWebViewInterceptor = async (id, port) => {
848
+ await invokeAndTransfer$1('WebView.registerInterceptor', id, port);
849
+ };
850
+ const unregisterWebViewInterceptor = async id => {
851
+ await invoke$2('WebView.unregisterInterceptor', id);
852
+ };
853
+ const sendMessagePortToEditorWorker = async (port, rpcId) => {
854
+ const command = 'HandleMessagePort.handleMessagePort';
855
+ // @ts-ignore
856
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
857
+ };
858
+ const sendMessagePortToErrorWorker = async (port, rpcId) => {
859
+ const command = 'Errors.handleMessagePort';
860
+ // @ts-ignore
861
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
752
862
  };
753
863
  const sendMessagePortToMarkdownWorker$2 = async (port, rpcId) => {
754
864
  const command = 'Markdown.handleMessagePort';
755
865
  // @ts-ignore
756
- await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
866
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
757
867
  };
758
868
  const sendMessagePortToFileSystemWorker$2 = async (port, rpcId) => {
759
869
  const command = 'FileSystem.handleMessagePort';
760
870
  // @ts-ignore
761
- await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
871
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
872
+ };
873
+ const readFile$2 = async uri => {
874
+ return invoke$2('FileSystem.readFile', uri);
875
+ };
876
+ const getWebViewSecret = async key => {
877
+ // @ts-ignore
878
+ return invoke$2('WebView.getSecret', key);
879
+ };
880
+ const setWebViewPort = async (uid, port, origin, portType) => {
881
+ return invokeAndTransfer$1('WebView.setPort', uid, port, origin, portType);
882
+ };
883
+ const setFocus = key => {
884
+ return invoke$2('Focus.setFocus', key);
885
+ };
886
+ const getFileIcon = async options => {
887
+ return invoke$2('IconTheme.getFileIcon', options);
888
+ };
889
+ const getColorThemeNames = async () => {
890
+ return invoke$2('ColorTheme.getColorThemeNames');
762
891
  };
763
892
  const disableExtension$2 = async id => {
764
- return invoke$3('ExtensionManagement.disable', id);
893
+ return invoke$2('ExtensionManagement.disable', id);
894
+ };
895
+ const enableExtension = async id => {
896
+ // @ts-ignore
897
+ return invoke$2('ExtensionManagement.enable', id);
898
+ };
899
+ const handleDebugChange = async params => {
900
+ // @ts-ignore
901
+ return invoke$2('Run And Debug.handleChange', params);
902
+ };
903
+ const getFolderIcon = async options => {
904
+ return invoke$2('IconTheme.getFolderIcon', options);
905
+ };
906
+ const closeWidget = async widgetId => {
907
+ return invoke$2('Viewlet.closeWidget', widgetId);
765
908
  };
766
909
  const sendMessagePortToExtensionHostWorker$2 = async (port, rpcId = 0) => {
767
910
  const command = 'HandleMessagePort.handleMessagePort2';
768
- await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
911
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
912
+ };
913
+ const sendMessagePortToSearchProcess = async port => {
914
+ await invokeAndTransfer$1('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
915
+ };
916
+ const confirm = async (message, options) => {
917
+ // @ts-ignore
918
+ const result = await invoke$2('Confirmprompt.prompt', message, options);
919
+ return result;
920
+ };
921
+ const getRecentlyOpened = async () => {
922
+ return invoke$2(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
923
+ };
924
+ const getKeyBindings = async () => {
925
+ return invoke$2('KeyBindingsInitial.getKeyBindings');
769
926
  };
770
927
  const writeClipBoardText$1 = async text => {
771
- await invoke$3('ClipBoard.writeText', /* text */text);
928
+ await invoke$2('ClipBoard.writeText', /* text */text);
772
929
  };
773
930
  const writeClipBoardImage$1 = async blob => {
774
931
  // @ts-ignore
775
- await invoke$3('ClipBoard.writeImage', /* text */blob);
932
+ await invoke$2('ClipBoard.writeImage', /* text */blob);
933
+ };
934
+ const searchFileMemory = async uri => {
935
+ // @ts-ignore
936
+ return invoke$2('ExtensionHost.searchFileWithMemory', uri);
937
+ };
938
+ const searchFileFetch = async uri => {
939
+ return invoke$2('ExtensionHost.searchFileWithFetch', uri);
940
+ };
941
+ const showMessageBox = async options => {
942
+ return invoke$2('ElectronDialog.showMessageBox', options);
943
+ };
944
+ const handleDebugResumed = async params => {
945
+ await invoke$2('Run And Debug.handleResumed', params);
946
+ };
947
+ const openWidget = async name => {
948
+ await invoke$2('Viewlet.openWidget', name);
949
+ };
950
+ const getIcons = async requests => {
951
+ const icons = await invoke$2('IconTheme.getIcons', requests);
952
+ return icons;
953
+ };
954
+ const activateByEvent = event => {
955
+ return invoke$2('ExtensionHostManagement.activateByEvent', event);
956
+ };
957
+ const setAdditionalFocus = focusKey => {
958
+ // @ts-ignore
959
+ return invoke$2('Focus.setAdditionalFocus', focusKey);
960
+ };
961
+ const getActiveEditorId = () => {
962
+ // @ts-ignore
963
+ return invoke$2('GetActiveEditor.getActiveEditorId');
964
+ };
965
+ const getWorkspacePath = () => {
966
+ return invoke$2('Workspace.getPath');
967
+ };
968
+ const sendMessagePortToRendererProcess = async port => {
969
+ const command = 'HandleMessagePort.handleMessagePort';
970
+ // @ts-ignore
971
+ await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
972
+ };
973
+ const getPreference = async key => {
974
+ return await invoke$2('Preferences.get', key);
776
975
  };
777
976
  const getAllExtensions$2 = async () => {
778
- return invoke$3('ExtensionManagement.getAllExtensions');
977
+ return invoke$2('ExtensionManagement.getAllExtensions');
978
+ };
979
+ const rerenderEditor = async key => {
980
+ // @ts-ignore
981
+ return invoke$2('Editor.rerender', key);
982
+ };
983
+ const handleDebugPaused = async params => {
984
+ await invoke$2('Run And Debug.handlePaused', params);
985
+ };
986
+ const openUri = async (uri, focus, options) => {
987
+ await invoke$2('Main.openUri', uri, focus, options);
988
+ };
989
+ const sendMessagePortToSyntaxHighlightingWorker = async port => {
990
+ await invokeAndTransfer$1(
991
+ // @ts-ignore
992
+ 'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
993
+ };
994
+ const handleDebugScriptParsed = async script => {
995
+ await invoke$2('Run And Debug.handleScriptParsed', script);
996
+ };
997
+ const getWindowId = async () => {
998
+ return invoke$2('GetWindowId.getWindowId');
999
+ };
1000
+ const getBlob = async uri => {
1001
+ // @ts-ignore
1002
+ return invoke$2('FileSystem.getBlob', uri);
1003
+ };
1004
+ const getExtensionCommands = async () => {
1005
+ return invoke$2('ExtensionHost.getCommands');
1006
+ };
1007
+ const showErrorDialog = async errorInfo => {
1008
+ // @ts-ignore
1009
+ await invoke$2('ErrorHandling.showErrorDialog', errorInfo);
1010
+ };
1011
+ const getFolderSize$1 = async uri => {
1012
+ // @ts-ignore
1013
+ return await invoke$2('FileSystem.getFolderSize', uri);
779
1014
  };
780
1015
  const getExtension$3 = async id => {
781
1016
  // @ts-ignore
782
- return invoke$3('ExtensionManagement.getExtension', id);
1017
+ return invoke$2('ExtensionManagement.getExtension', id);
1018
+ };
1019
+ const getMarkdownDom = async html => {
1020
+ // @ts-ignore
1021
+ return invoke$2('Markdown.getVirtualDom', html);
1022
+ };
1023
+ const renderMarkdown$1 = async (markdown, options) => {
1024
+ // @ts-ignore
1025
+ return invoke$2('Markdown.renderMarkdown', markdown, options);
783
1026
  };
784
1027
  const openNativeFolder$1 = async uri => {
785
1028
  // @ts-ignore
786
- await invoke$3('OpenNativeFolder.openNativeFolder', uri);
1029
+ await invoke$2('OpenNativeFolder.openNativeFolder', uri);
787
1030
  };
788
1031
  const uninstallExtension$1 = async id => {
789
- return invoke$3('ExtensionManagement.uninstall', id);
1032
+ return invoke$2('ExtensionManagement.uninstall', id);
1033
+ };
1034
+ const installExtension = async id => {
1035
+ // @ts-ignore
1036
+ return invoke$2('ExtensionManagement.install', id);
790
1037
  };
791
1038
  const openExtensionSearch$2 = async () => {
792
1039
  // @ts-ignore
793
- return invoke$3('SideBar.openViewlet', 'Extensions');
1040
+ return invoke$2('SideBar.openViewlet', 'Extensions');
794
1041
  };
795
1042
  const setExtensionsSearchValue$1 = async searchValue => {
796
1043
  // @ts-ignore
797
- return invoke$3('Extensions.handleInput', searchValue);
1044
+ return invoke$2('Extensions.handleInput', searchValue);
1045
+ };
1046
+ const openExternal = async uri => {
1047
+ // @ts-ignore
1048
+ await invoke$2('Open.openExternal', uri);
798
1049
  };
799
1050
  const openUrl$2 = async uri => {
800
1051
  // @ts-ignore
801
- await invoke$3('Open.openUrl', uri);
1052
+ await invoke$2('Open.openUrl', uri);
1053
+ };
1054
+ const getAllPreferences = async () => {
1055
+ // @ts-ignore
1056
+ return invoke$2('Preferences.getAll');
1057
+ };
1058
+ const showSaveFilePicker = async () => {
1059
+ // @ts-ignore
1060
+ return invoke$2('FilePicker.showSaveFilePicker');
1061
+ };
1062
+ const getLogsDir = async () => {
1063
+ // @ts-ignore
1064
+ return invoke$2('PlatformPaths.getLogsDir');
802
1065
  };
1066
+
803
1067
  const RendererWorker = {
804
1068
  __proto__: null,
1069
+ activateByEvent,
1070
+ applyBulkReplacement,
1071
+ closeWidget,
1072
+ confirm,
805
1073
  disableExtension: disableExtension$2,
1074
+ dispose: dispose$2,
1075
+ enableExtension,
1076
+ getActiveEditorId,
806
1077
  getAllExtensions: getAllExtensions$2,
1078
+ getAllPreferences,
1079
+ getBlob,
1080
+ getChromeVersion,
1081
+ getColorThemeNames,
1082
+ getElectronVersion,
807
1083
  getExtension: getExtension$3,
1084
+ getExtensionCommands,
1085
+ getFileHandles,
1086
+ getFileIcon,
1087
+ getFilePathElectron,
1088
+ getFolderIcon,
1089
+ getFolderSize: getFolderSize$1,
1090
+ getIcons,
1091
+ getKeyBindings,
1092
+ getLogsDir,
1093
+ getMarkdownDom,
1094
+ getNodeVersion,
1095
+ getPreference,
1096
+ getRecentlyOpened,
1097
+ getV8Version,
1098
+ getWebViewSecret,
1099
+ getWindowId,
1100
+ getWorkspacePath,
1101
+ handleDebugChange,
1102
+ handleDebugPaused,
1103
+ handleDebugResumed,
1104
+ handleDebugScriptParsed,
1105
+ installExtension,
1106
+ invoke: invoke$2,
1107
+ invokeAndTransfer: invokeAndTransfer$1,
808
1108
  openExtensionSearch: openExtensionSearch$2,
1109
+ openExternal,
809
1110
  openNativeFolder: openNativeFolder$1,
1111
+ openUri,
810
1112
  openUrl: openUrl$2,
1113
+ openWidget,
1114
+ readFile: readFile$2,
1115
+ registerWebViewInterceptor,
1116
+ renderMarkdown: renderMarkdown$1,
1117
+ rerenderEditor,
1118
+ searchFileFetch,
1119
+ searchFileHtml,
1120
+ searchFileMemory,
1121
+ sendMessagePortToEditorWorker,
1122
+ sendMessagePortToErrorWorker,
811
1123
  sendMessagePortToExtensionHostWorker: sendMessagePortToExtensionHostWorker$2,
812
1124
  sendMessagePortToFileSystemWorker: sendMessagePortToFileSystemWorker$2,
813
1125
  sendMessagePortToMarkdownWorker: sendMessagePortToMarkdownWorker$2,
814
- set: set$3$1,
1126
+ sendMessagePortToRendererProcess,
1127
+ sendMessagePortToSearchProcess,
1128
+ sendMessagePortToSyntaxHighlightingWorker,
1129
+ set: set$6,
1130
+ setAdditionalFocus,
815
1131
  setColorTheme: setColorTheme$2,
816
1132
  setExtensionsSearchValue: setExtensionsSearchValue$1,
1133
+ setFocus,
1134
+ setWebViewPort,
1135
+ setWorkspacePath,
817
1136
  showContextMenu: showContextMenu$1,
1137
+ showErrorDialog,
1138
+ showMessageBox,
1139
+ showSaveFilePicker,
818
1140
  uninstallExtension: uninstallExtension$1,
1141
+ unregisterWebViewInterceptor,
819
1142
  writeClipBoardImage: writeClipBoardImage$1,
820
1143
  writeClipBoardText: writeClipBoardText$1
821
1144
  };
@@ -868,16 +1191,16 @@ const getActivationTimeVirtualDom = (importTime$1, activationTime$1) => {
868
1191
  const formattedImportTime = formatTime(importTime$1);
869
1192
  const formattedTime = formatTime(activationTime$1);
870
1193
  return [{
871
- type: VirtualDomElements.Dt,
1194
+ type: Dt,
872
1195
  childCount: 1
873
1196
  }, text(importTime()), {
874
- type: VirtualDomElements.Dd,
1197
+ type: Dd,
875
1198
  childCount: 1
876
1199
  }, text(formattedImportTime), {
877
- type: VirtualDomElements.Dt,
1200
+ type: Dt,
878
1201
  childCount: 1
879
1202
  }, text(activationTime()), {
880
- type: VirtualDomElements.Dd,
1203
+ type: Dd,
881
1204
  childCount: 1
882
1205
  }, text(formattedTime)];
883
1206
  };
@@ -906,12 +1229,12 @@ const getStatusMessage = statusType => {
906
1229
  };
907
1230
 
908
1231
  const key = {
909
- type: VirtualDomElements.Dt,
1232
+ type: Dt,
910
1233
  childCount: 1,
911
1234
  className: 'RuntimeStatusDefinitionListKey'
912
1235
  };
913
1236
  const value = {
914
- type: VirtualDomElements.Dd,
1237
+ type: Dd,
915
1238
  className: 'RuntimeStatusDefinitionListValue',
916
1239
  childCount: 1
917
1240
  };
@@ -939,11 +1262,11 @@ const getRuntimeStatusVirtualDom = state => {
939
1262
  const heading = runtimeStatus();
940
1263
  const childCount = getChildCount$1(status, activationTime, importTime);
941
1264
  return [{
942
- type: VirtualDomElements.Div,
1265
+ type: Div,
943
1266
  className: FeatureContent,
944
1267
  childCount: 2
945
1268
  }, ...getFeatureContentHeadingVirtualDom(heading), {
946
- type: VirtualDomElements.Dl,
1269
+ type: Dl,
947
1270
  className: 'RuntimeStatusDefinitionList',
948
1271
  childCount
949
1272
  }, ...getStatusVirtualDom(status), ...getActivationTimeVirtualDom(activationTime, importTime)];
@@ -992,7 +1315,7 @@ const getFeatureSettingsVirtualDom = rows => {
992
1315
  const heading = settings();
993
1316
  const tableInfo = getSettingsTableEntries(rows);
994
1317
  return [{
995
- type: VirtualDomElements.Div,
1318
+ type: Div,
996
1319
  className: FeatureContent,
997
1320
  childCount: 2
998
1321
  }, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
@@ -1079,17 +1402,17 @@ const WebViews = 'WebViews';
1079
1402
 
1080
1403
  const getScrollToTopVirtualDom = scrollToTopButtonEnabled => {
1081
1404
  return [{
1082
- type: VirtualDomElements.Button,
1405
+ type: Button$1,
1083
1406
  className: ScrollToTopButton,
1084
1407
  childCount: 1,
1085
1408
  onClick: HandleClickScrollToTop,
1086
1409
  ariaLabel: scrollToTop(),
1087
1410
  name: ScrollToTop
1088
1411
  }, {
1089
- type: VirtualDomElements.Div,
1412
+ type: Div,
1090
1413
  className: 'MaskIcon MaskIconChevronUp',
1091
1414
  childCount: 0,
1092
- role: AriaRoles.None
1415
+ role: None$2
1093
1416
  }];
1094
1417
  };
1095
1418
 
@@ -1208,11 +1531,11 @@ const getFeatureThemesVirtualDom = themesDom => {
1208
1531
  const childCount = getVirtualDomChildCount(themesDom);
1209
1532
  const heading = theme();
1210
1533
  return [{
1211
- type: VirtualDomElements.Div,
1534
+ type: Div,
1212
1535
  className: FeatureContent,
1213
1536
  childCount: 2
1214
1537
  }, ...getFeatureContentHeadingVirtualDom(heading), {
1215
- type: VirtualDomElements.Div,
1538
+ type: Div,
1216
1539
  className: DefaultMarkdown,
1217
1540
  childCount
1218
1541
  }, ...themesDom];
@@ -1257,17 +1580,17 @@ const featureWebViewsEnabled = extension => {
1257
1580
  };
1258
1581
 
1259
1582
  const heading = {
1260
- type: VirtualDomElements.H2,
1583
+ type: H2,
1261
1584
  className: DefinitionListItemHeading,
1262
1585
  childCount: 1
1263
1586
  };
1264
1587
  const pre = {
1265
- type: VirtualDomElements.Pre,
1588
+ type: Pre,
1266
1589
  className: DefinitionListItemValue,
1267
1590
  childCount: 1
1268
1591
  };
1269
1592
  const item = {
1270
- type: VirtualDomElements.Div,
1593
+ type: Div,
1271
1594
  className: DefinitionListItem,
1272
1595
  childCount: 2
1273
1596
  };
@@ -1283,7 +1606,7 @@ const getWebViewVirtualDom = webView => {
1283
1606
  const textContentSecurityPolicy = contentSecurityPolicy();
1284
1607
  const textElements = elements();
1285
1608
  return [{
1286
- type: VirtualDomElements.Div,
1609
+ type: Div,
1287
1610
  className: FeatureWebView,
1288
1611
  childCount: 5
1289
1612
  }, item, heading, text(textId), pre, text(id), item, heading, text(textSelector), pre, text(selectorString), item, heading, text(textContentSecurityPolicy), pre, text(contentSecurityPolicyString), item, heading, text(textElements), pre, text(elementsString)];
@@ -1292,11 +1615,11 @@ const getWebViewVirtualDom = webView => {
1292
1615
  const getFeatureWebViewsVirtualDom = webViews$1 => {
1293
1616
  const heading = webViews();
1294
1617
  return [{
1295
- type: VirtualDomElements.Div,
1618
+ type: Div,
1296
1619
  className: FeatureContent,
1297
1620
  childCount: 2
1298
1621
  }, ...getFeatureContentHeadingVirtualDom(heading), {
1299
- type: VirtualDomElements.Div,
1622
+ type: Div,
1300
1623
  childCount: webViews$1.length
1301
1624
  }, ...webViews$1.flatMap(getWebViewVirtualDom)];
1302
1625
  };
@@ -2564,7 +2887,7 @@ const isEqual$2 = (oldState, newState) => {
2564
2887
  };
2565
2888
 
2566
2889
  const isEqual$1 = (oldState, newState) => {
2567
- return oldState.activationEvents === newState.activationEvents && oldState.badge === newState.badge && oldState.categories === newState.categories && oldState.changelogVirtualDom === newState.changelogVirtualDom && oldState.commands === newState.commands && oldState.description === newState.description && oldState.detailsVirtualDom === newState.detailsVirtualDom && oldState.displaySize === newState.displaySize && oldState.extensionId === newState.extensionId && oldState.extensionVersion === newState.extensionVersion && oldState.jsonValidation === newState.jsonValidation && oldState.selectedFeature === newState.selectedFeature && oldState.selectedTab === newState.selectedTab && oldState.settings === newState.settings && oldState.themesMarkdownDom === newState.themesMarkdownDom && oldState.webViews === newState.webViews && oldState.sizeValue === newState.sizeValue && oldState.showSideBar === newState.showSideBar;
2890
+ return oldState.activationEvents === newState.activationEvents && oldState.badge === newState.badge && oldState.buttons === newState.buttons && oldState.categories === newState.categories && oldState.changelogVirtualDom === newState.changelogVirtualDom && oldState.commands === newState.commands && oldState.description === newState.description && oldState.detailsVirtualDom === newState.detailsVirtualDom && oldState.disabled === newState.disabled && oldState.displaySize === newState.displaySize && oldState.extensionId === newState.extensionId && oldState.extensionVersion === newState.extensionVersion && oldState.jsonValidation === newState.jsonValidation && oldState.selectedFeature === newState.selectedFeature && oldState.selectedTab === newState.selectedTab && oldState.settings === newState.settings && oldState.showSideBar === newState.showSideBar && oldState.sizeValue === newState.sizeValue && oldState.themesMarkdownDom === newState.themesMarkdownDom && oldState.webViews === newState.webViews;
2568
2891
  };
2569
2892
 
2570
2893
  const User = 1;
@@ -2605,7 +2928,7 @@ const None = 0;
2605
2928
 
2606
2929
  const getCopyMenuEntry = () => ({
2607
2930
  id: 'copy',
2608
- label: copy(),
2931
+ label: copy$1(),
2609
2932
  flags: None,
2610
2933
  command: 'ClipBoard.execCopy'
2611
2934
  });
@@ -2689,13 +3012,87 @@ const disableExtension = id => {
2689
3012
  return disableExtension$1(id);
2690
3013
  };
2691
3014
 
2692
- const handleClickDisable = async state => {
3015
+ const Web = 1;
3016
+ const Electron = 2;
3017
+ const Remote = 3;
3018
+
3019
+ const getAllExtensions = async platform => {
3020
+ if (platform === Web) {
3021
+ return [];
3022
+ }
3023
+ // @ts-ignore
3024
+ return getAllExtensions$1();
3025
+ };
3026
+ const getExtension$1 = async (id, platform) => {
3027
+ // TODO only ask one extension from renderer worker instead of all
3028
+ const allExtensions = await getAllExtensions(platform);
3029
+ for (const extension of allExtensions) {
3030
+ if (extension.id === id) {
3031
+ return extension;
3032
+ }
3033
+ }
3034
+ return undefined;
3035
+ };
3036
+
3037
+ const getExtensionNew = async id => {
3038
+ return getExtension$2(id);
3039
+ };
3040
+ const getExtension = async (id, platform) => {
3041
+ try {
3042
+ return await getExtensionNew(id);
3043
+ } catch {
3044
+ return getExtension$1(id, platform);
3045
+ }
3046
+ };
3047
+
3048
+ const getExtensionDetailButtons = (hasColorTheme, isBuiltin, isDisabled) => {
3049
+ const allActions = [{
3050
+ label: setColorTheme$3(),
3051
+ onClick: HandleClickSetColorTheme,
3052
+ enabled: hasColorTheme,
3053
+ name: SetColorTheme
3054
+ }, {
3055
+ label: enable(),
3056
+ onClick: HandleClickEnable,
3057
+ enabled: isDisabled,
3058
+ name: Enable
3059
+ }, {
3060
+ label: disable(),
3061
+ onClick: HandleClickDisable,
3062
+ enabled: !isDisabled,
3063
+ name: Disable
3064
+ }, {
3065
+ label: uninstall(),
3066
+ onClick: HandleClickUninstall,
3067
+ enabled: !isBuiltin,
3068
+ name: Uninstall
3069
+ }];
3070
+ const filteredButtons = allActions.filter(button => button.enabled);
3071
+ return filteredButtons;
3072
+ };
3073
+
3074
+ const updateExtensionStatus = async (state, updateFunction) => {
2693
3075
  const {
2694
- extensionId
3076
+ extensionId,
3077
+ platform,
3078
+ hasColorTheme
2695
3079
  } = state;
2696
- await disableExtension(extensionId);
2697
- // TODO when it fails, show dialog / alert?
2698
- return state;
3080
+ const error = await updateFunction(extensionId);
3081
+ if (error) {
3082
+ await confirm(`${error}`);
3083
+ }
3084
+ const extension = await getExtension(extensionId, platform);
3085
+ const disabled = extension?.disabled;
3086
+ const buttons = getExtensionDetailButtons(hasColorTheme, false, disabled);
3087
+ return {
3088
+ ...state,
3089
+ disabled: extension?.disabled,
3090
+ buttons
3091
+ };
3092
+ };
3093
+
3094
+ const handleClickDisable = async state => {
3095
+ return updateExtensionStatus(state, disableExtension);
2699
3096
  };
2700
3097
 
2701
3098
  const selectFeature = async (state, name) => {
@@ -2746,10 +3143,6 @@ const handleClickScrollToTop = state => {
2746
3143
  };
2747
3144
  };
2748
3145
 
2749
- const setColorTheme = id => {
2750
- return setColorTheme$1(id);
2751
- };
2752
-
2753
3146
  const getColorThemeId = extension => {
2754
3147
  if (extension && Array.isArray(extension.colorThemes) && extension.colorThemes.length > 0) {
2755
3148
  const colorTheme = extension.colorThemes[0];
@@ -2757,13 +3150,21 @@ const getColorThemeId = extension => {
2757
3150
  }
2758
3151
  return undefined;
2759
3152
  };
3153
+
3154
+ const setColorTheme = id => {
3155
+ return setColorTheme$1(id);
3156
+ };
3157
+
2760
3158
  const handleClickSetColorTheme = async state => {
2761
3159
  const {
2762
3160
  extension
2763
3161
  } = state;
2764
3162
  const colorThemeId = getColorThemeId(extension);
2765
3163
  if (colorThemeId) {
2766
- await setColorTheme(colorThemeId);
3164
+ const error = await setColorTheme(colorThemeId);
3165
+ if (error) {
3166
+ await confirm(`${error}`);
3167
+ }
2767
3168
  }
2768
3169
  return state;
2769
3170
  };
@@ -3065,39 +3466,6 @@ const existsFile = async uri => {
3065
3466
  return exists(uri);
3066
3467
  };
3067
3468
 
3068
- const Web = 1;
3069
- const Electron = 2;
3070
- const Remote = 3;
3071
-
3072
- const getAllExtensions = async platform => {
3073
- if (platform === Web) {
3074
- return [];
3075
- }
3076
- // @ts-ignore
3077
- return getAllExtensions$1();
3078
- };
3079
- const getExtension$1 = async (id, platform) => {
3080
- // TODO only ask one extension from renderer worker instead of all
3081
- const allExtensions = await getAllExtensions(platform);
3082
- for (const extension of allExtensions) {
3083
- if (extension.id === id) {
3084
- return extension;
3085
- }
3086
- }
3087
- return undefined;
3088
- };
3089
-
3090
- const getExtensionNew = async id => {
3091
- return getExtension$2(id);
3092
- };
3093
- const getExtension = async (id, platform) => {
3094
- try {
3095
- return await getExtensionNew(id);
3096
- } catch {
3097
- return getExtension$1(id, platform);
3098
- }
3099
- };
3100
-
3101
3469
  class ExtensionNotFoundError extends Error {
3102
3470
  constructor(extensionId) {
3103
3471
  super(`extension not found: ${extensionId}`);
@@ -3120,31 +3488,6 @@ const getBaseUrl = (extensionPath, platform) => {
3120
3488
  }
3121
3489
  };
3122
3490
 
3123
- const getExtensionDetailButtons = (hasColorTheme, isBuiltin, isDisabled) => {
3124
- const allActions = [{
3125
- label: setColorTheme$3(),
3126
- onClick: HandleClickSetColorTheme,
3127
- enabled: hasColorTheme,
3128
- name: SetColorTheme
3129
- }, {
3130
- label: enable(),
3131
- onClick: HandleClickEnable,
3132
- enabled: isDisabled,
3133
- name: Enable
3134
- }, {
3135
- label: disable(),
3136
- onClick: HandleClickDisable,
3137
- enabled: !isDisabled,
3138
- name: Disable
3139
- }, {
3140
- label: uninstall(),
3141
- onClick: HandleClickUninstall,
3142
- enabled: !isBuiltin,
3143
- name: Uninstall
3144
- }];
3145
- return allActions;
3146
- };
3147
-
3148
3491
  const getExtensionIdFromUri = uri => {
3149
3492
  const id = uri.slice('extension-detail://'.length);
3150
3493
  return id;
@@ -3613,7 +3956,6 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
3613
3956
  const isBuiltin = extension?.isBuiltin;
3614
3957
  const disabled = extension?.disabled;
3615
3958
  const buttons = getExtensionDetailButtons(hasColorTheme, isBuiltin, disabled);
3616
- const enabledButtons = buttons.filter(button => button.enabled);
3617
3959
  const size = getViewletSize(width);
3618
3960
  const {
3619
3961
  selectedFeature,
@@ -3641,7 +3983,7 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
3641
3983
  ...state,
3642
3984
  badge,
3643
3985
  baseUrl,
3644
- buttons: enabledButtons,
3986
+ buttons,
3645
3987
  categories,
3646
3988
  changelogScrollTop,
3647
3989
  description,
@@ -3723,7 +4065,7 @@ const getChangelogVirtualDom = changelogDom => {
3723
4065
  // const notImplemented = ExtensionDetailStrings.notImplemented()
3724
4066
  // TODO set tabpanel role
3725
4067
  return [{
3726
- type: VirtualDomElements.Div,
4068
+ type: Div,
3727
4069
  className: Changelog$1,
3728
4070
  childCount: 1
3729
4071
  }, ...changelogDom];
@@ -3731,11 +4073,11 @@ const getChangelogVirtualDom = changelogDom => {
3731
4073
 
3732
4074
  const getAdditionalDetailsEntryVirtualDom = (heading, items, renderer) => {
3733
4075
  return [{
3734
- type: VirtualDomElements.Div,
4076
+ type: Div,
3735
4077
  className: AdditionalDetailsEntry,
3736
4078
  childCount: 2
3737
4079
  }, {
3738
- type: VirtualDomElements.Div,
4080
+ type: Div,
3739
4081
  className: AdditionalDetailsTitle,
3740
4082
  childCount: 1
3741
4083
  }, text(heading), ...renderer(items)];
@@ -3747,7 +4089,7 @@ const getCategoryVirtualDom = category => {
3747
4089
  label
3748
4090
  } = category;
3749
4091
  return [{
3750
- type: VirtualDomElements.Button,
4092
+ type: Button$1,
3751
4093
  className: Category,
3752
4094
  childCount: 1,
3753
4095
  onClick: HandleClickCategory,
@@ -3757,14 +4099,14 @@ const getCategoryVirtualDom = category => {
3757
4099
 
3758
4100
  const getCategoriesDom = categories => {
3759
4101
  return [{
3760
- type: VirtualDomElements.Div,
4102
+ type: Div,
3761
4103
  className: Categories,
3762
4104
  childCount: categories.length
3763
4105
  }, ...categories.flatMap(getCategoryVirtualDom)];
3764
4106
  };
3765
4107
 
3766
4108
  const parentNode = {
3767
- type: VirtualDomElements.Dt,
4109
+ type: Dt,
3768
4110
  className: MoreInfoEntryKey,
3769
4111
  childCount: 1
3770
4112
  };
@@ -3789,12 +4131,12 @@ const getMoreInfoEntryValueClassName = (onClick, code) => {
3789
4131
 
3790
4132
  const getMoreInfoEntryValueTag = (onClick, code) => {
3791
4133
  if (onClick) {
3792
- return VirtualDomElements.A;
4134
+ return A;
3793
4135
  }
3794
4136
  if (code) {
3795
- return VirtualDomElements.Code;
4137
+ return Code$2;
3796
4138
  }
3797
- return VirtualDomElements.Dd;
4139
+ return Dd;
3798
4140
  };
3799
4141
 
3800
4142
  const getMoreInfoEntryValueVirtualDom = item => {
@@ -3816,12 +4158,12 @@ const getMoreInfoEntryValueVirtualDom = item => {
3816
4158
  };
3817
4159
 
3818
4160
  const parentNodeEven = {
3819
- type: VirtualDomElements.Div,
4161
+ type: Div,
3820
4162
  className: MoreInfoEntry,
3821
4163
  childCount: 2
3822
4164
  };
3823
4165
  const parentNodeOdd = {
3824
- type: VirtualDomElements.Div,
4166
+ type: Div,
3825
4167
  className: mergeClassNames(MoreInfoEntry, MoreInfoEntryOdd),
3826
4168
  childCount: 2
3827
4169
  };
@@ -3835,7 +4177,7 @@ const getMoreInfoEntryVirtualDom = item => {
3835
4177
 
3836
4178
  const getMoreInfoVirtualDom = items => {
3837
4179
  return [{
3838
- type: VirtualDomElements.Dl,
4180
+ type: Dl,
3839
4181
  className: MoreInfo,
3840
4182
  childCount: items.length
3841
4183
  }, ...items.flatMap(getMoreInfoEntryVirtualDom)];
@@ -3843,7 +4185,7 @@ const getMoreInfoVirtualDom = items => {
3843
4185
 
3844
4186
  const resourceNode = {
3845
4187
  // TODO use link with url
3846
- type: VirtualDomElements.Div,
4188
+ type: Div,
3847
4189
  className: Resource,
3848
4190
  childCount: 1
3849
4191
  };
@@ -3856,7 +4198,7 @@ const getResourceVirtualDom = resource => {
3856
4198
 
3857
4199
  const getResourcesVirtualDom = resources => {
3858
4200
  return [{
3859
- type: VirtualDomElements.Div,
4201
+ type: Div,
3860
4202
  className: Resources,
3861
4203
  childCount: resources.length
3862
4204
  }, ...resources.flatMap(getResourceVirtualDom)];
@@ -3867,11 +4209,11 @@ const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, ent
3867
4209
  return [];
3868
4210
  }
3869
4211
  return [{
3870
- type: VirtualDomElements.Aside,
4212
+ type: Aside$1,
3871
4213
  className: Aside,
3872
4214
  childCount: 1
3873
4215
  }, {
3874
- type: VirtualDomElements.Div,
4216
+ type: Div,
3875
4217
  className: AdditionalDetails,
3876
4218
  tabIndex: 0,
3877
4219
  childCount: 4
@@ -3893,15 +4235,15 @@ const getDetailsVirtualDom = (sanitizedReadmeHtml, width, scrollToTopButtonEnabl
3893
4235
  const showAdditionalDetails = showSideBar;
3894
4236
  const childCount = getChildCount(showAdditionalDetails);
3895
4237
  const contentDom = hasReadme ? sanitizedReadmeHtml : [{
3896
- type: VirtualDomElements.Div,
4238
+ type: Div,
3897
4239
  childCount: 1,
3898
4240
  className: 'Markdown'
3899
4241
  }, text(noReadmeFound())];
3900
4242
  const dom = [{
3901
- type: VirtualDomElements.Div,
4243
+ type: Div,
3902
4244
  className: ExtensionDetailPanel,
3903
4245
  childCount: childCount,
3904
- role: AriaRoles.Panel
4246
+ role: Panel
3905
4247
  }, ...contentDom, ...getAdditionalDetailsVirtualDom(showAdditionalDetails, firstHeading, installationEntries, secondHeading, marketplaceEntries, thirdHeading, categories$1, fourthHeading, resources$1)];
3906
4248
  return dom;
3907
4249
  };
@@ -3915,7 +4257,7 @@ const getFeatureListItemVirtualDom = feature => {
3915
4257
  const className = selected ? 'Feature FeatureSelected' : Feature;
3916
4258
  return [{
3917
4259
  // TODO use role list item or tab
3918
- type: VirtualDomElements.Button,
4260
+ type: Button$1,
3919
4261
  name: id,
3920
4262
  className,
3921
4263
  childCount: 1
@@ -3925,7 +4267,7 @@ const getFeatureListItemVirtualDom = feature => {
3925
4267
  const getFeatureListVirtualDom = features => {
3926
4268
  return [{
3927
4269
  // TODO use either list or tabs role
3928
- type: VirtualDomElements.Div,
4270
+ type: Div,
3929
4271
  className: FeaturesList,
3930
4272
  childCount: features.length,
3931
4273
  onClick: HandleFeaturesClick
@@ -3935,14 +4277,14 @@ const getFeatureListVirtualDom = features => {
3935
4277
  const getFeaturesEmptyVirtualDom = () => {
3936
4278
  const none$1 = none();
3937
4279
  return [{
3938
- type: VirtualDomElements.Div,
4280
+ type: Div,
3939
4281
  className: Features$1,
3940
4282
  childCount: 1
3941
4283
  }, text(none$1)];
3942
4284
  };
3943
4285
 
3944
4286
  const sash = {
3945
- type: VirtualDomElements.Div,
4287
+ type: Div,
3946
4288
  className: mergeClassNames(Sash, SashVertical),
3947
4289
  childCount: 0
3948
4290
  };
@@ -3953,7 +4295,7 @@ const getFeaturesVirtualDom = (features, selectedFeature, state) => {
3953
4295
  const fn = getFeatureVirtualDomHandler(selectedFeature);
3954
4296
  const featureVirtualDom = fn(state);
3955
4297
  return [{
3956
- type: VirtualDomElements.Div,
4298
+ type: Div,
3957
4299
  className: Features$1,
3958
4300
  childCount: 3
3959
4301
  }, ...getFeatureListVirtualDom(features), sash, ...featureVirtualDom];
@@ -3974,7 +4316,7 @@ const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, selectedTab, w
3974
4316
 
3975
4317
  const getExtensionDetailDescriptionVirtualDom = description => {
3976
4318
  return [{
3977
- type: VirtualDomElements.Div,
4319
+ type: Div,
3978
4320
  className: ExtensionDetailDescription,
3979
4321
  childCount: 1
3980
4322
  }, text(description)];
@@ -3982,7 +4324,7 @@ const getExtensionDetailDescriptionVirtualDom = description => {
3982
4324
 
3983
4325
  const getButtonVirtualDom = (message, onClick, name) => {
3984
4326
  return [{
3985
- type: VirtualDomElements.Button,
4327
+ type: Button$1,
3986
4328
  className: mergeClassNames(Button, ButtonPrimary),
3987
4329
  onClick,
3988
4330
  name,
@@ -3995,14 +4337,14 @@ const getSettingsButtonVirtualDom = enabled => {
3995
4337
  return [];
3996
4338
  }
3997
4339
  return [{
3998
- type: VirtualDomElements.Button,
4340
+ type: Button$1,
3999
4341
  className: SettingsButton,
4000
4342
  onClick: HandleClickSettings,
4001
4343
  childCount: 1,
4002
4344
  title: 'Settings',
4003
4345
  name: Settings
4004
4346
  }, {
4005
- type: VirtualDomElements.Span,
4347
+ type: Span,
4006
4348
  className: SettingsIcon,
4007
4349
  childCount: 0,
4008
4350
  text: '⚙️'
@@ -4014,7 +4356,7 @@ const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEna
4014
4356
  const buttons = enabledButtons.flatMap(btn => getButtonVirtualDom(btn.label, btn.onClick, btn.name));
4015
4357
  const settingsButton = getSettingsButtonVirtualDom(settingsButtonEnabled);
4016
4358
  const dom = [{
4017
- type: VirtualDomElements.Div,
4359
+ type: Div,
4018
4360
  className: ExtensionDetailHeaderActions,
4019
4361
  childCount: enabledButtons.length + settingsButton.length
4020
4362
  }, ...buttons, ...settingsButton];
@@ -4023,7 +4365,7 @@ const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEna
4023
4365
 
4024
4366
  const getExtensionDetailIconVirtualDom = iconSrc => {
4025
4367
  return {
4026
- type: VirtualDomElements.Img,
4368
+ type: Img,
4027
4369
  className: ExtensionDetailIcon,
4028
4370
  alt: '',
4029
4371
  childCount: 0,
@@ -4038,7 +4380,7 @@ const getNameBadgeVirtualDom = badge => {
4038
4380
  return [];
4039
4381
  }
4040
4382
  return [{
4041
- type: VirtualDomElements.Span,
4383
+ type: Span,
4042
4384
  className: ExtensionDetailNameBadge,
4043
4385
  childCount: 1
4044
4386
  }, text(badge)];
@@ -4046,7 +4388,7 @@ const getNameBadgeVirtualDom = badge => {
4046
4388
 
4047
4389
  const getExtensionDetailNameVirtualDom = (name, badge) => {
4048
4390
  return [{
4049
- type: VirtualDomElements.Div,
4391
+ type: Div,
4050
4392
  className: ExtensionDetailName,
4051
4393
  childCount: badge ? 2 : 1
4052
4394
  }, text(name), ...getNameBadgeVirtualDom(badge)];
@@ -4054,11 +4396,11 @@ const getExtensionDetailNameVirtualDom = (name, badge) => {
4054
4396
 
4055
4397
  const getExtensionDetailHeaderVirtualDom = (name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled) => {
4056
4398
  const dom = [{
4057
- type: VirtualDomElements.Div,
4399
+ type: Div,
4058
4400
  className: ExtensionDetailHeader,
4059
4401
  childCount: 2
4060
4402
  }, getExtensionDetailIconVirtualDom(iconSrc), {
4061
- type: VirtualDomElements.Div,
4403
+ type: Div,
4062
4404
  className: ExtensionDetailHeaderDetails,
4063
4405
  childCount: 3
4064
4406
  }, ...getExtensionDetailNameVirtualDom(name, badge), ...getExtensionDetailDescriptionVirtualDom(description), ...getExtensionDetailHeaderActionsVirtualDom(buttonDefs, settingsButtonEnabled)];
@@ -4080,8 +4422,8 @@ const getTabVirtualDom = tab => {
4080
4422
  const className = getTabClassName(selected);
4081
4423
  const ariaSelected = selected;
4082
4424
  return [{
4083
- type: VirtualDomElements.Button,
4084
- role: AriaRoles.Tab,
4425
+ type: Button$1,
4426
+ role: Tab,
4085
4427
  name,
4086
4428
  className,
4087
4429
  childCount: 1,
@@ -4092,10 +4434,10 @@ const getTabVirtualDom = tab => {
4092
4434
 
4093
4435
  const getTabsVirtualDom = tabs => {
4094
4436
  return [{
4095
- type: VirtualDomElements.Div,
4437
+ type: Div,
4096
4438
  className: ExtensionDetailTabs,
4097
4439
  childCount: tabs.length,
4098
- role: AriaRoles.TabList,
4440
+ role: TabList,
4099
4441
  onClick: HandleTabsClick,
4100
4442
  tabIndex: 0
4101
4443
  }, ...tabs.flatMap(getTabVirtualDom)];
@@ -4139,7 +4481,7 @@ const getExtensionDetailVirtualDom = (newState, selectedTab) => {
4139
4481
  const width = newState?.width || 500;
4140
4482
  const sizeClass = getClassNames(sizeValue);
4141
4483
  const dom = [{
4142
- type: VirtualDomElements.Div,
4484
+ type: Div,
4143
4485
  className: mergeClassNames(Viewlet, ExtensionDetail, sizeClass),
4144
4486
  childCount: 3
4145
4487
  }, ...getExtensionDetailHeaderVirtualDom(name, iconSrc, description, badge, buttons, settingsButtonEnabled), ...getTabsVirtualDom(tabs), ...getExtensionDetailContentVirtualDom(detailsVirtualDom, selectedTab, width, scrollToTopButtonEnabled, categories, resources, showAdditionalDetailsBreakpoint, changelogVirtualDom, newState)];