@lvce-editor/extension-detail-view 3.61.0 → 3.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensionDetailViewWorkerMain.js +492 -165
- package/package.json +1 -1
|
@@ -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
|
|
227
|
+
const Tab = 'tab';
|
|
228
228
|
const TabList = 'tablist';
|
|
229
|
-
|
|
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
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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:
|
|
325
|
+
type: Li,
|
|
347
326
|
childCount: 1
|
|
348
327
|
};
|
|
349
328
|
const code = {
|
|
350
|
-
type:
|
|
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:
|
|
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:
|
|
346
|
+
type: Div,
|
|
368
347
|
className: FeatureContent,
|
|
369
348
|
childCount: 2
|
|
370
349
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
371
|
-
type:
|
|
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:
|
|
405
|
+
type: Div,
|
|
427
406
|
className: FeatureContent,
|
|
428
407
|
childCount: 2
|
|
429
408
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
430
|
-
type:
|
|
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:
|
|
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:
|
|
424
|
+
type: Td,
|
|
446
425
|
className: TableCell,
|
|
447
426
|
childCount: 1
|
|
448
427
|
}, {
|
|
449
|
-
type:
|
|
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:
|
|
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:
|
|
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:
|
|
474
|
+
type: Table$1,
|
|
496
475
|
className: Table,
|
|
497
476
|
childCount: 2
|
|
498
477
|
}, {
|
|
499
|
-
type:
|
|
478
|
+
type: THead,
|
|
500
479
|
childCount: 1
|
|
501
480
|
}, {
|
|
502
|
-
type:
|
|
481
|
+
type: Tr,
|
|
503
482
|
childCount: headings.length
|
|
504
483
|
}, ...headings.flatMap(getTableHeadingVirtualDom), {
|
|
505
|
-
type:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
597
|
+
type: Div,
|
|
619
598
|
childCount: 2
|
|
620
599
|
}, {
|
|
621
|
-
type:
|
|
600
|
+
type: H1,
|
|
622
601
|
childCount: 1
|
|
623
602
|
}, text(unsupportedFeature()), {
|
|
624
|
-
type:
|
|
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$
|
|
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$
|
|
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
|
-
|
|
694
|
-
const FileSystemWorker$1 = 209;
|
|
695
|
-
const MarkdownWorker$1 = 300;
|
|
696
|
-
const RendererWorker$1 = 1;
|
|
670
|
+
|
|
697
671
|
const {
|
|
698
|
-
invoke: invoke$
|
|
699
|
-
|
|
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$
|
|
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$
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
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$
|
|
743
|
+
return invoke$4('FileSystem.exists', uri);
|
|
744
|
+
};
|
|
745
|
+
const getFolderSize$2 = async uri => {
|
|
746
|
+
// @ts-ignore
|
|
747
|
+
return invoke$4('FileSystem.getFolderSize', uri);
|
|
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);
|
|
718
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
|
-
|
|
723
|
-
|
|
724
|
-
|
|
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$
|
|
727
|
-
|
|
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$
|
|
789
|
+
return invoke$3('Markdown.getVirtualDom', html);
|
|
731
790
|
};
|
|
732
791
|
const render$1 = async (markdown, options) => {
|
|
733
792
|
// @ts-ignore
|
|
734
|
-
return invoke$
|
|
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$
|
|
803
|
+
set: set$7
|
|
741
804
|
};
|
|
805
|
+
|
|
742
806
|
const {
|
|
743
|
-
invoke: invoke$
|
|
744
|
-
invokeAndTransfer: invokeAndTransfer$
|
|
745
|
-
set: set$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
928
|
+
await invoke$2('ClipBoard.writeText', /* text */text);
|
|
772
929
|
};
|
|
773
930
|
const writeClipBoardImage$1 = async blob => {
|
|
774
931
|
// @ts-ignore
|
|
775
|
-
await invoke$
|
|
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$
|
|
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$
|
|
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$
|
|
1029
|
+
await invoke$2('OpenNativeFolder.openNativeFolder', uri);
|
|
787
1030
|
};
|
|
788
1031
|
const uninstallExtension$1 = async id => {
|
|
789
|
-
return invoke$
|
|
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$
|
|
1040
|
+
return invoke$2('SideBar.openViewlet', 'Extensions');
|
|
794
1041
|
};
|
|
795
1042
|
const setExtensionsSearchValue$1 = async searchValue => {
|
|
796
1043
|
// @ts-ignore
|
|
797
|
-
return invoke$
|
|
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$
|
|
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');
|
|
802
1061
|
};
|
|
1062
|
+
const getLogsDir = async () => {
|
|
1063
|
+
// @ts-ignore
|
|
1064
|
+
return invoke$2('PlatformPaths.getLogsDir');
|
|
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
|
-
|
|
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:
|
|
1194
|
+
type: Dt,
|
|
872
1195
|
childCount: 1
|
|
873
1196
|
}, text(importTime()), {
|
|
874
|
-
type:
|
|
1197
|
+
type: Dd,
|
|
875
1198
|
childCount: 1
|
|
876
1199
|
}, text(formattedImportTime), {
|
|
877
|
-
type:
|
|
1200
|
+
type: Dt,
|
|
878
1201
|
childCount: 1
|
|
879
1202
|
}, text(activationTime()), {
|
|
880
|
-
type:
|
|
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:
|
|
1232
|
+
type: Dt,
|
|
910
1233
|
childCount: 1,
|
|
911
1234
|
className: 'RuntimeStatusDefinitionListKey'
|
|
912
1235
|
};
|
|
913
1236
|
const value = {
|
|
914
|
-
type:
|
|
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:
|
|
1265
|
+
type: Div,
|
|
943
1266
|
className: FeatureContent,
|
|
944
1267
|
childCount: 2
|
|
945
1268
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
946
|
-
type:
|
|
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:
|
|
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:
|
|
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:
|
|
1412
|
+
type: Div,
|
|
1090
1413
|
className: 'MaskIcon MaskIconChevronUp',
|
|
1091
1414
|
childCount: 0,
|
|
1092
|
-
role:
|
|
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:
|
|
1534
|
+
type: Div,
|
|
1212
1535
|
className: FeatureContent,
|
|
1213
1536
|
childCount: 2
|
|
1214
1537
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
1215
|
-
type:
|
|
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:
|
|
1583
|
+
type: H2,
|
|
1261
1584
|
className: DefinitionListItemHeading,
|
|
1262
1585
|
childCount: 1
|
|
1263
1586
|
};
|
|
1264
1587
|
const pre = {
|
|
1265
|
-
type:
|
|
1588
|
+
type: Pre,
|
|
1266
1589
|
className: DefinitionListItemValue,
|
|
1267
1590
|
childCount: 1
|
|
1268
1591
|
};
|
|
1269
1592
|
const item = {
|
|
1270
|
-
type:
|
|
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:
|
|
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:
|
|
1618
|
+
type: Div,
|
|
1296
1619
|
className: FeatureContent,
|
|
1297
1620
|
childCount: 2
|
|
1298
1621
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
1299
|
-
type:
|
|
1622
|
+
type: Div,
|
|
1300
1623
|
childCount: webViews$1.length
|
|
1301
1624
|
}, ...webViews$1.flatMap(getWebViewVirtualDom)];
|
|
1302
1625
|
};
|
|
@@ -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
|
});
|
|
@@ -2746,10 +3069,6 @@ const handleClickScrollToTop = state => {
|
|
|
2746
3069
|
};
|
|
2747
3070
|
};
|
|
2748
3071
|
|
|
2749
|
-
const setColorTheme = id => {
|
|
2750
|
-
return setColorTheme$1(id);
|
|
2751
|
-
};
|
|
2752
|
-
|
|
2753
3072
|
const getColorThemeId = extension => {
|
|
2754
3073
|
if (extension && Array.isArray(extension.colorThemes) && extension.colorThemes.length > 0) {
|
|
2755
3074
|
const colorTheme = extension.colorThemes[0];
|
|
@@ -2757,13 +3076,21 @@ const getColorThemeId = extension => {
|
|
|
2757
3076
|
}
|
|
2758
3077
|
return undefined;
|
|
2759
3078
|
};
|
|
3079
|
+
|
|
3080
|
+
const setColorTheme = id => {
|
|
3081
|
+
return setColorTheme$1(id);
|
|
3082
|
+
};
|
|
3083
|
+
|
|
2760
3084
|
const handleClickSetColorTheme = async state => {
|
|
2761
3085
|
const {
|
|
2762
3086
|
extension
|
|
2763
3087
|
} = state;
|
|
2764
3088
|
const colorThemeId = getColorThemeId(extension);
|
|
2765
3089
|
if (colorThemeId) {
|
|
2766
|
-
await setColorTheme(colorThemeId);
|
|
3090
|
+
const error = await setColorTheme(colorThemeId);
|
|
3091
|
+
if (error) {
|
|
3092
|
+
await confirm(`${error}`);
|
|
3093
|
+
}
|
|
2767
3094
|
}
|
|
2768
3095
|
return state;
|
|
2769
3096
|
};
|
|
@@ -3723,7 +4050,7 @@ const getChangelogVirtualDom = changelogDom => {
|
|
|
3723
4050
|
// const notImplemented = ExtensionDetailStrings.notImplemented()
|
|
3724
4051
|
// TODO set tabpanel role
|
|
3725
4052
|
return [{
|
|
3726
|
-
type:
|
|
4053
|
+
type: Div,
|
|
3727
4054
|
className: Changelog$1,
|
|
3728
4055
|
childCount: 1
|
|
3729
4056
|
}, ...changelogDom];
|
|
@@ -3731,11 +4058,11 @@ const getChangelogVirtualDom = changelogDom => {
|
|
|
3731
4058
|
|
|
3732
4059
|
const getAdditionalDetailsEntryVirtualDom = (heading, items, renderer) => {
|
|
3733
4060
|
return [{
|
|
3734
|
-
type:
|
|
4061
|
+
type: Div,
|
|
3735
4062
|
className: AdditionalDetailsEntry,
|
|
3736
4063
|
childCount: 2
|
|
3737
4064
|
}, {
|
|
3738
|
-
type:
|
|
4065
|
+
type: Div,
|
|
3739
4066
|
className: AdditionalDetailsTitle,
|
|
3740
4067
|
childCount: 1
|
|
3741
4068
|
}, text(heading), ...renderer(items)];
|
|
@@ -3747,7 +4074,7 @@ const getCategoryVirtualDom = category => {
|
|
|
3747
4074
|
label
|
|
3748
4075
|
} = category;
|
|
3749
4076
|
return [{
|
|
3750
|
-
type:
|
|
4077
|
+
type: Button$1,
|
|
3751
4078
|
className: Category,
|
|
3752
4079
|
childCount: 1,
|
|
3753
4080
|
onClick: HandleClickCategory,
|
|
@@ -3757,14 +4084,14 @@ const getCategoryVirtualDom = category => {
|
|
|
3757
4084
|
|
|
3758
4085
|
const getCategoriesDom = categories => {
|
|
3759
4086
|
return [{
|
|
3760
|
-
type:
|
|
4087
|
+
type: Div,
|
|
3761
4088
|
className: Categories,
|
|
3762
4089
|
childCount: categories.length
|
|
3763
4090
|
}, ...categories.flatMap(getCategoryVirtualDom)];
|
|
3764
4091
|
};
|
|
3765
4092
|
|
|
3766
4093
|
const parentNode = {
|
|
3767
|
-
type:
|
|
4094
|
+
type: Dt,
|
|
3768
4095
|
className: MoreInfoEntryKey,
|
|
3769
4096
|
childCount: 1
|
|
3770
4097
|
};
|
|
@@ -3789,12 +4116,12 @@ const getMoreInfoEntryValueClassName = (onClick, code) => {
|
|
|
3789
4116
|
|
|
3790
4117
|
const getMoreInfoEntryValueTag = (onClick, code) => {
|
|
3791
4118
|
if (onClick) {
|
|
3792
|
-
return
|
|
4119
|
+
return A;
|
|
3793
4120
|
}
|
|
3794
4121
|
if (code) {
|
|
3795
|
-
return
|
|
4122
|
+
return Code$2;
|
|
3796
4123
|
}
|
|
3797
|
-
return
|
|
4124
|
+
return Dd;
|
|
3798
4125
|
};
|
|
3799
4126
|
|
|
3800
4127
|
const getMoreInfoEntryValueVirtualDom = item => {
|
|
@@ -3816,12 +4143,12 @@ const getMoreInfoEntryValueVirtualDom = item => {
|
|
|
3816
4143
|
};
|
|
3817
4144
|
|
|
3818
4145
|
const parentNodeEven = {
|
|
3819
|
-
type:
|
|
4146
|
+
type: Div,
|
|
3820
4147
|
className: MoreInfoEntry,
|
|
3821
4148
|
childCount: 2
|
|
3822
4149
|
};
|
|
3823
4150
|
const parentNodeOdd = {
|
|
3824
|
-
type:
|
|
4151
|
+
type: Div,
|
|
3825
4152
|
className: mergeClassNames(MoreInfoEntry, MoreInfoEntryOdd),
|
|
3826
4153
|
childCount: 2
|
|
3827
4154
|
};
|
|
@@ -3835,7 +4162,7 @@ const getMoreInfoEntryVirtualDom = item => {
|
|
|
3835
4162
|
|
|
3836
4163
|
const getMoreInfoVirtualDom = items => {
|
|
3837
4164
|
return [{
|
|
3838
|
-
type:
|
|
4165
|
+
type: Dl,
|
|
3839
4166
|
className: MoreInfo,
|
|
3840
4167
|
childCount: items.length
|
|
3841
4168
|
}, ...items.flatMap(getMoreInfoEntryVirtualDom)];
|
|
@@ -3843,7 +4170,7 @@ const getMoreInfoVirtualDom = items => {
|
|
|
3843
4170
|
|
|
3844
4171
|
const resourceNode = {
|
|
3845
4172
|
// TODO use link with url
|
|
3846
|
-
type:
|
|
4173
|
+
type: Div,
|
|
3847
4174
|
className: Resource,
|
|
3848
4175
|
childCount: 1
|
|
3849
4176
|
};
|
|
@@ -3856,7 +4183,7 @@ const getResourceVirtualDom = resource => {
|
|
|
3856
4183
|
|
|
3857
4184
|
const getResourcesVirtualDom = resources => {
|
|
3858
4185
|
return [{
|
|
3859
|
-
type:
|
|
4186
|
+
type: Div,
|
|
3860
4187
|
className: Resources,
|
|
3861
4188
|
childCount: resources.length
|
|
3862
4189
|
}, ...resources.flatMap(getResourceVirtualDom)];
|
|
@@ -3867,11 +4194,11 @@ const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, ent
|
|
|
3867
4194
|
return [];
|
|
3868
4195
|
}
|
|
3869
4196
|
return [{
|
|
3870
|
-
type:
|
|
4197
|
+
type: Aside$1,
|
|
3871
4198
|
className: Aside,
|
|
3872
4199
|
childCount: 1
|
|
3873
4200
|
}, {
|
|
3874
|
-
type:
|
|
4201
|
+
type: Div,
|
|
3875
4202
|
className: AdditionalDetails,
|
|
3876
4203
|
tabIndex: 0,
|
|
3877
4204
|
childCount: 4
|
|
@@ -3893,15 +4220,15 @@ const getDetailsVirtualDom = (sanitizedReadmeHtml, width, scrollToTopButtonEnabl
|
|
|
3893
4220
|
const showAdditionalDetails = showSideBar;
|
|
3894
4221
|
const childCount = getChildCount(showAdditionalDetails);
|
|
3895
4222
|
const contentDom = hasReadme ? sanitizedReadmeHtml : [{
|
|
3896
|
-
type:
|
|
4223
|
+
type: Div,
|
|
3897
4224
|
childCount: 1,
|
|
3898
4225
|
className: 'Markdown'
|
|
3899
4226
|
}, text(noReadmeFound())];
|
|
3900
4227
|
const dom = [{
|
|
3901
|
-
type:
|
|
4228
|
+
type: Div,
|
|
3902
4229
|
className: ExtensionDetailPanel,
|
|
3903
4230
|
childCount: childCount,
|
|
3904
|
-
role:
|
|
4231
|
+
role: Panel
|
|
3905
4232
|
}, ...contentDom, ...getAdditionalDetailsVirtualDom(showAdditionalDetails, firstHeading, installationEntries, secondHeading, marketplaceEntries, thirdHeading, categories$1, fourthHeading, resources$1)];
|
|
3906
4233
|
return dom;
|
|
3907
4234
|
};
|
|
@@ -3915,7 +4242,7 @@ const getFeatureListItemVirtualDom = feature => {
|
|
|
3915
4242
|
const className = selected ? 'Feature FeatureSelected' : Feature;
|
|
3916
4243
|
return [{
|
|
3917
4244
|
// TODO use role list item or tab
|
|
3918
|
-
type:
|
|
4245
|
+
type: Button$1,
|
|
3919
4246
|
name: id,
|
|
3920
4247
|
className,
|
|
3921
4248
|
childCount: 1
|
|
@@ -3925,7 +4252,7 @@ const getFeatureListItemVirtualDom = feature => {
|
|
|
3925
4252
|
const getFeatureListVirtualDom = features => {
|
|
3926
4253
|
return [{
|
|
3927
4254
|
// TODO use either list or tabs role
|
|
3928
|
-
type:
|
|
4255
|
+
type: Div,
|
|
3929
4256
|
className: FeaturesList,
|
|
3930
4257
|
childCount: features.length,
|
|
3931
4258
|
onClick: HandleFeaturesClick
|
|
@@ -3935,14 +4262,14 @@ const getFeatureListVirtualDom = features => {
|
|
|
3935
4262
|
const getFeaturesEmptyVirtualDom = () => {
|
|
3936
4263
|
const none$1 = none();
|
|
3937
4264
|
return [{
|
|
3938
|
-
type:
|
|
4265
|
+
type: Div,
|
|
3939
4266
|
className: Features$1,
|
|
3940
4267
|
childCount: 1
|
|
3941
4268
|
}, text(none$1)];
|
|
3942
4269
|
};
|
|
3943
4270
|
|
|
3944
4271
|
const sash = {
|
|
3945
|
-
type:
|
|
4272
|
+
type: Div,
|
|
3946
4273
|
className: mergeClassNames(Sash, SashVertical),
|
|
3947
4274
|
childCount: 0
|
|
3948
4275
|
};
|
|
@@ -3953,7 +4280,7 @@ const getFeaturesVirtualDom = (features, selectedFeature, state) => {
|
|
|
3953
4280
|
const fn = getFeatureVirtualDomHandler(selectedFeature);
|
|
3954
4281
|
const featureVirtualDom = fn(state);
|
|
3955
4282
|
return [{
|
|
3956
|
-
type:
|
|
4283
|
+
type: Div,
|
|
3957
4284
|
className: Features$1,
|
|
3958
4285
|
childCount: 3
|
|
3959
4286
|
}, ...getFeatureListVirtualDom(features), sash, ...featureVirtualDom];
|
|
@@ -3974,7 +4301,7 @@ const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, selectedTab, w
|
|
|
3974
4301
|
|
|
3975
4302
|
const getExtensionDetailDescriptionVirtualDom = description => {
|
|
3976
4303
|
return [{
|
|
3977
|
-
type:
|
|
4304
|
+
type: Div,
|
|
3978
4305
|
className: ExtensionDetailDescription,
|
|
3979
4306
|
childCount: 1
|
|
3980
4307
|
}, text(description)];
|
|
@@ -3982,7 +4309,7 @@ const getExtensionDetailDescriptionVirtualDom = description => {
|
|
|
3982
4309
|
|
|
3983
4310
|
const getButtonVirtualDom = (message, onClick, name) => {
|
|
3984
4311
|
return [{
|
|
3985
|
-
type:
|
|
4312
|
+
type: Button$1,
|
|
3986
4313
|
className: mergeClassNames(Button, ButtonPrimary),
|
|
3987
4314
|
onClick,
|
|
3988
4315
|
name,
|
|
@@ -3995,14 +4322,14 @@ const getSettingsButtonVirtualDom = enabled => {
|
|
|
3995
4322
|
return [];
|
|
3996
4323
|
}
|
|
3997
4324
|
return [{
|
|
3998
|
-
type:
|
|
4325
|
+
type: Button$1,
|
|
3999
4326
|
className: SettingsButton,
|
|
4000
4327
|
onClick: HandleClickSettings,
|
|
4001
4328
|
childCount: 1,
|
|
4002
4329
|
title: 'Settings',
|
|
4003
4330
|
name: Settings
|
|
4004
4331
|
}, {
|
|
4005
|
-
type:
|
|
4332
|
+
type: Span,
|
|
4006
4333
|
className: SettingsIcon,
|
|
4007
4334
|
childCount: 0,
|
|
4008
4335
|
text: '⚙️'
|
|
@@ -4014,7 +4341,7 @@ const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEna
|
|
|
4014
4341
|
const buttons = enabledButtons.flatMap(btn => getButtonVirtualDom(btn.label, btn.onClick, btn.name));
|
|
4015
4342
|
const settingsButton = getSettingsButtonVirtualDom(settingsButtonEnabled);
|
|
4016
4343
|
const dom = [{
|
|
4017
|
-
type:
|
|
4344
|
+
type: Div,
|
|
4018
4345
|
className: ExtensionDetailHeaderActions,
|
|
4019
4346
|
childCount: enabledButtons.length + settingsButton.length
|
|
4020
4347
|
}, ...buttons, ...settingsButton];
|
|
@@ -4023,7 +4350,7 @@ const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEna
|
|
|
4023
4350
|
|
|
4024
4351
|
const getExtensionDetailIconVirtualDom = iconSrc => {
|
|
4025
4352
|
return {
|
|
4026
|
-
type:
|
|
4353
|
+
type: Img,
|
|
4027
4354
|
className: ExtensionDetailIcon,
|
|
4028
4355
|
alt: '',
|
|
4029
4356
|
childCount: 0,
|
|
@@ -4038,7 +4365,7 @@ const getNameBadgeVirtualDom = badge => {
|
|
|
4038
4365
|
return [];
|
|
4039
4366
|
}
|
|
4040
4367
|
return [{
|
|
4041
|
-
type:
|
|
4368
|
+
type: Span,
|
|
4042
4369
|
className: ExtensionDetailNameBadge,
|
|
4043
4370
|
childCount: 1
|
|
4044
4371
|
}, text(badge)];
|
|
@@ -4046,7 +4373,7 @@ const getNameBadgeVirtualDom = badge => {
|
|
|
4046
4373
|
|
|
4047
4374
|
const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
4048
4375
|
return [{
|
|
4049
|
-
type:
|
|
4376
|
+
type: Div,
|
|
4050
4377
|
className: ExtensionDetailName,
|
|
4051
4378
|
childCount: badge ? 2 : 1
|
|
4052
4379
|
}, text(name), ...getNameBadgeVirtualDom(badge)];
|
|
@@ -4054,11 +4381,11 @@ const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
|
4054
4381
|
|
|
4055
4382
|
const getExtensionDetailHeaderVirtualDom = (name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled) => {
|
|
4056
4383
|
const dom = [{
|
|
4057
|
-
type:
|
|
4384
|
+
type: Div,
|
|
4058
4385
|
className: ExtensionDetailHeader,
|
|
4059
4386
|
childCount: 2
|
|
4060
4387
|
}, getExtensionDetailIconVirtualDom(iconSrc), {
|
|
4061
|
-
type:
|
|
4388
|
+
type: Div,
|
|
4062
4389
|
className: ExtensionDetailHeaderDetails,
|
|
4063
4390
|
childCount: 3
|
|
4064
4391
|
}, ...getExtensionDetailNameVirtualDom(name, badge), ...getExtensionDetailDescriptionVirtualDom(description), ...getExtensionDetailHeaderActionsVirtualDom(buttonDefs, settingsButtonEnabled)];
|
|
@@ -4080,8 +4407,8 @@ const getTabVirtualDom = tab => {
|
|
|
4080
4407
|
const className = getTabClassName(selected);
|
|
4081
4408
|
const ariaSelected = selected;
|
|
4082
4409
|
return [{
|
|
4083
|
-
type:
|
|
4084
|
-
role:
|
|
4410
|
+
type: Button$1,
|
|
4411
|
+
role: Tab,
|
|
4085
4412
|
name,
|
|
4086
4413
|
className,
|
|
4087
4414
|
childCount: 1,
|
|
@@ -4092,10 +4419,10 @@ const getTabVirtualDom = tab => {
|
|
|
4092
4419
|
|
|
4093
4420
|
const getTabsVirtualDom = tabs => {
|
|
4094
4421
|
return [{
|
|
4095
|
-
type:
|
|
4422
|
+
type: Div,
|
|
4096
4423
|
className: ExtensionDetailTabs,
|
|
4097
4424
|
childCount: tabs.length,
|
|
4098
|
-
role:
|
|
4425
|
+
role: TabList,
|
|
4099
4426
|
onClick: HandleTabsClick,
|
|
4100
4427
|
tabIndex: 0
|
|
4101
4428
|
}, ...tabs.flatMap(getTabVirtualDom)];
|
|
@@ -4139,7 +4466,7 @@ const getExtensionDetailVirtualDom = (newState, selectedTab) => {
|
|
|
4139
4466
|
const width = newState?.width || 500;
|
|
4140
4467
|
const sizeClass = getClassNames(sizeValue);
|
|
4141
4468
|
const dom = [{
|
|
4142
|
-
type:
|
|
4469
|
+
type: Div,
|
|
4143
4470
|
className: mergeClassNames(Viewlet, ExtensionDetail, sizeClass),
|
|
4144
4471
|
childCount: 3
|
|
4145
4472
|
}, ...getExtensionDetailHeaderVirtualDom(name, iconSrc, description, badge, buttons, settingsButtonEnabled), ...getTabsVirtualDom(tabs), ...getExtensionDetailContentVirtualDom(detailsVirtualDom, selectedTab, width, scrollToTopButtonEnabled, categories, resources, showAdditionalDetailsBreakpoint, changelogVirtualDom, newState)];
|