@lvce-editor/extension-detail-view 5.6.0 → 5.8.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 +577 -876
- package/package.json +2 -2
|
@@ -126,7 +126,7 @@ const schema = () => {
|
|
|
126
126
|
const status = () => {
|
|
127
127
|
return i18nString(Status);
|
|
128
128
|
};
|
|
129
|
-
const setColorTheme$
|
|
129
|
+
const setColorTheme$2 = () => {
|
|
130
130
|
return i18nString(SetColorTheme$1);
|
|
131
131
|
};
|
|
132
132
|
const enable = () => {
|
|
@@ -247,22 +247,22 @@ const invalidLink = () => {
|
|
|
247
247
|
const getActivationEntry = value => {
|
|
248
248
|
if (typeof value !== 'string') {
|
|
249
249
|
return {
|
|
250
|
+
errorMessage: propertyMustBeOfTypeString(),
|
|
250
251
|
isValid: false,
|
|
251
|
-
stringValue: JSON.stringify(value)
|
|
252
|
-
errorMessage: propertyMustBeOfTypeString()
|
|
252
|
+
stringValue: JSON.stringify(value)
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
if (!value) {
|
|
256
256
|
return {
|
|
257
|
+
errorMessage: stringMustNotBeEmpty(),
|
|
257
258
|
isValid: false,
|
|
258
|
-
stringValue: ''
|
|
259
|
-
errorMessage: stringMustNotBeEmpty()
|
|
259
|
+
stringValue: ''
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
262
|
return {
|
|
263
|
+
errorMessage: '',
|
|
263
264
|
isValid: true,
|
|
264
|
-
stringValue: value
|
|
265
|
-
errorMessage: ''
|
|
265
|
+
stringValue: value
|
|
266
266
|
};
|
|
267
267
|
};
|
|
268
268
|
const getActivationEntries = activation => {
|
|
@@ -273,8 +273,8 @@ const getActivationEventsDetails = async extension => {
|
|
|
273
273
|
const activationEvents = extension.activation || [];
|
|
274
274
|
const activationEntries = getActivationEntries(activationEvents);
|
|
275
275
|
return {
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
activationEntries,
|
|
277
|
+
activationEvents
|
|
278
278
|
};
|
|
279
279
|
};
|
|
280
280
|
|
|
@@ -326,6 +326,8 @@ const ClientY = 'event.clientY';
|
|
|
326
326
|
const TargetHref = 'event.target.href';
|
|
327
327
|
const TargetName = 'event.target.name';
|
|
328
328
|
|
|
329
|
+
const Script$1 = 2;
|
|
330
|
+
|
|
329
331
|
const ExtensionDetailReadme = 20;
|
|
330
332
|
const ExtensionDetailIconContextMenu$3 = 4091;
|
|
331
333
|
|
|
@@ -333,11 +335,10 @@ const None$2 = 0;
|
|
|
333
335
|
|
|
334
336
|
const Web$1 = 1;
|
|
335
337
|
|
|
336
|
-
const DebugWorker = 55;
|
|
337
338
|
const ExtensionHostWorker = 44;
|
|
338
339
|
const FileSystemWorker$1 = 209;
|
|
339
340
|
const MarkdownWorker$1 = 300;
|
|
340
|
-
const RendererWorker
|
|
341
|
+
const RendererWorker = 1;
|
|
341
342
|
|
|
342
343
|
const mergeClassNames = (...classNames) => {
|
|
343
344
|
return classNames.filter(Boolean).join(' ');
|
|
@@ -364,6 +365,7 @@ const MaskIcon = 'MaskIcon';
|
|
|
364
365
|
const ResourceIcon = 'ResourceIcon';
|
|
365
366
|
const Code$1 = 'Code';
|
|
366
367
|
const DefaultMarkdown = 'DefaultMarkdown';
|
|
368
|
+
const MaskIconChevronUp = 'MaskIconChevronUp';
|
|
367
369
|
const DefinitionListItem = 'DefinitionListItem';
|
|
368
370
|
const DefinitionListItemHeading = 'DefinitionListItemHeading';
|
|
369
371
|
const DefinitionListItemValue = 'DefinitionListItemValue';
|
|
@@ -408,25 +410,25 @@ const TableHeading = 'TableHeading';
|
|
|
408
410
|
const Viewlet = 'Viewlet';
|
|
409
411
|
|
|
410
412
|
const li = {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
+
childCount: 1,
|
|
414
|
+
type: Li
|
|
413
415
|
};
|
|
414
416
|
const code = {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
+
childCount: 1,
|
|
418
|
+
type: Code$2
|
|
417
419
|
};
|
|
418
420
|
const getActivationEventVirtualDom = event => {
|
|
419
421
|
const {
|
|
420
|
-
stringValue,
|
|
421
422
|
errorMessage,
|
|
422
|
-
isValid
|
|
423
|
+
isValid,
|
|
424
|
+
stringValue
|
|
423
425
|
} = event;
|
|
424
426
|
if (!isValid) {
|
|
425
427
|
return [{
|
|
426
|
-
type: Li,
|
|
427
428
|
childCount: 1,
|
|
429
|
+
className: 'ListItem ListItemInvalid',
|
|
428
430
|
title: errorMessage,
|
|
429
|
-
|
|
431
|
+
type: Li
|
|
430
432
|
}, code, text(stringValue)];
|
|
431
433
|
}
|
|
432
434
|
return [li, code, text(stringValue)];
|
|
@@ -434,20 +436,20 @@ const getActivationEventVirtualDom = event => {
|
|
|
434
436
|
|
|
435
437
|
const getFeatureContentHeadingVirtualDom = heading => {
|
|
436
438
|
return [{
|
|
437
|
-
|
|
438
|
-
|
|
439
|
+
childCount: 1,
|
|
440
|
+
type: H1
|
|
439
441
|
}, text(heading)];
|
|
440
442
|
};
|
|
441
443
|
|
|
442
444
|
const getFeatureActivationEventsVirtualDom = activationEvents$1 => {
|
|
443
445
|
const heading = activationEvents();
|
|
444
446
|
return [{
|
|
445
|
-
|
|
447
|
+
childCount: 2,
|
|
446
448
|
className: FeatureContent,
|
|
447
|
-
|
|
449
|
+
type: Div
|
|
448
450
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
+
childCount: activationEvents$1.length,
|
|
452
|
+
type: Ul
|
|
451
453
|
}, ...activationEvents$1.flatMap(getActivationEventVirtualDom)];
|
|
452
454
|
};
|
|
453
455
|
|
|
@@ -504,20 +506,20 @@ const getFeatureCommandsEmptyVirtualDom = () => {
|
|
|
504
506
|
const heading = commands$1();
|
|
505
507
|
const emptyCommandsArray$1 = emptyCommandsArray();
|
|
506
508
|
return [{
|
|
507
|
-
|
|
509
|
+
childCount: 2,
|
|
508
510
|
className: FeatureContent,
|
|
509
|
-
|
|
511
|
+
type: Div
|
|
510
512
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
+
childCount: 1,
|
|
514
|
+
type: P
|
|
513
515
|
}, text(emptyCommandsArray$1)];
|
|
514
516
|
};
|
|
515
517
|
|
|
516
518
|
const getTableHeadingVirtualDom = heading => {
|
|
517
519
|
return [{
|
|
518
|
-
|
|
520
|
+
childCount: 1,
|
|
519
521
|
className: TableHeading,
|
|
520
|
-
|
|
522
|
+
type: Th
|
|
521
523
|
}, text(heading)];
|
|
522
524
|
};
|
|
523
525
|
|
|
@@ -533,16 +535,16 @@ const getCellCheckMarkVirtualDom = (value, props) => {
|
|
|
533
535
|
} = props;
|
|
534
536
|
const checkedText = getCheckedText(checked);
|
|
535
537
|
return [{
|
|
536
|
-
|
|
538
|
+
childCount: 1,
|
|
537
539
|
className: TableCell,
|
|
538
|
-
|
|
540
|
+
type: Td
|
|
539
541
|
}, text(checkedText)];
|
|
540
542
|
};
|
|
541
543
|
|
|
542
544
|
const getListItemDom = item => {
|
|
543
545
|
return [{
|
|
544
|
-
|
|
545
|
-
|
|
546
|
+
childCount: 1,
|
|
547
|
+
type: Code$2
|
|
546
548
|
}, text(item)];
|
|
547
549
|
};
|
|
548
550
|
const getCellCodeListVirtualDom = (value, props) => {
|
|
@@ -550,24 +552,24 @@ const getCellCodeListVirtualDom = (value, props) => {
|
|
|
550
552
|
listItems
|
|
551
553
|
} = props;
|
|
552
554
|
return [{
|
|
553
|
-
|
|
555
|
+
childCount: listItems.length,
|
|
554
556
|
className: TableCell,
|
|
555
|
-
|
|
557
|
+
type: Td
|
|
556
558
|
}, ...listItems.flatMap(getListItemDom)];
|
|
557
559
|
};
|
|
558
560
|
|
|
559
561
|
const getCellCodeVirtualDom = (value, props) => {
|
|
560
562
|
const tdClassName = props?.className ? `${TableCell} ${props.className}` : TableCell;
|
|
561
563
|
return [{
|
|
562
|
-
type: Td,
|
|
563
|
-
className: tdClassName,
|
|
564
564
|
childCount: 1,
|
|
565
|
+
className: tdClassName,
|
|
566
|
+
type: Td,
|
|
565
567
|
...(props?.title ? {
|
|
566
568
|
title: props.title
|
|
567
569
|
} : {})
|
|
568
570
|
}, {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
+
childCount: 1,
|
|
572
|
+
type: Code$2
|
|
571
573
|
}, text(value)];
|
|
572
574
|
};
|
|
573
575
|
|
|
@@ -582,24 +584,24 @@ const getTitleProps = title => {
|
|
|
582
584
|
const getCellLinkVirtualDom = (value, props) => {
|
|
583
585
|
const tdClassName = props?.className ? `${TableCell} ${props.className}` : TableCell;
|
|
584
586
|
return [{
|
|
585
|
-
type: Td,
|
|
586
|
-
className: tdClassName,
|
|
587
587
|
childCount: 1,
|
|
588
|
+
className: tdClassName,
|
|
589
|
+
type: Td,
|
|
588
590
|
...getTitleProps(props?.title)
|
|
589
591
|
}, {
|
|
590
|
-
|
|
592
|
+
childCount: 1,
|
|
591
593
|
className: Link$1,
|
|
592
594
|
href: props?.href,
|
|
593
|
-
|
|
595
|
+
type: A
|
|
594
596
|
}, text(value)];
|
|
595
597
|
};
|
|
596
598
|
|
|
597
599
|
const getCellTextVirtualDom = (value, props) => {
|
|
598
600
|
const tdClassName = props?.className ? `${TableCell} ${props.className}` : TableCell;
|
|
599
601
|
return [{
|
|
600
|
-
type: Td,
|
|
601
|
-
className: tdClassName,
|
|
602
602
|
childCount: 1,
|
|
603
|
+
className: tdClassName,
|
|
604
|
+
type: Td,
|
|
603
605
|
...(props?.title ? {
|
|
604
606
|
title: props.title
|
|
605
607
|
} : {})
|
|
@@ -608,16 +610,16 @@ const getCellTextVirtualDom = (value, props) => {
|
|
|
608
610
|
|
|
609
611
|
const getCellRenderer = type => {
|
|
610
612
|
switch (type) {
|
|
613
|
+
case CheckMark:
|
|
614
|
+
return getCellCheckMarkVirtualDom;
|
|
611
615
|
case Code:
|
|
612
616
|
return getCellCodeVirtualDom;
|
|
613
|
-
case Text:
|
|
614
|
-
return getCellTextVirtualDom;
|
|
615
|
-
case Link:
|
|
616
|
-
return getCellLinkVirtualDom;
|
|
617
617
|
case CodeList:
|
|
618
618
|
return getCellCodeListVirtualDom;
|
|
619
|
-
case
|
|
620
|
-
return
|
|
619
|
+
case Link:
|
|
620
|
+
return getCellLinkVirtualDom;
|
|
621
|
+
case Text:
|
|
622
|
+
return getCellTextVirtualDom;
|
|
621
623
|
default:
|
|
622
624
|
throw new Error(`unexpected cell type ${type}`);
|
|
623
625
|
}
|
|
@@ -625,8 +627,8 @@ const getCellRenderer = type => {
|
|
|
625
627
|
|
|
626
628
|
const getCellVirtualDom = entry => {
|
|
627
629
|
const {
|
|
628
|
-
value,
|
|
629
630
|
type,
|
|
631
|
+
value,
|
|
630
632
|
...props
|
|
631
633
|
} = entry;
|
|
632
634
|
const fn = getCellRenderer(type);
|
|
@@ -635,8 +637,8 @@ const getCellVirtualDom = entry => {
|
|
|
635
637
|
|
|
636
638
|
const getTableRowVirtualDom = entries => {
|
|
637
639
|
return [{
|
|
638
|
-
|
|
639
|
-
|
|
640
|
+
childCount: entries.length,
|
|
641
|
+
type: Tr
|
|
640
642
|
}, ...entries.flatMap(getCellVirtualDom)];
|
|
641
643
|
};
|
|
642
644
|
|
|
@@ -646,18 +648,18 @@ const getTableVirtualDom = tableInfo => {
|
|
|
646
648
|
rows
|
|
647
649
|
} = tableInfo;
|
|
648
650
|
return [{
|
|
649
|
-
|
|
651
|
+
childCount: 2,
|
|
650
652
|
className: Table,
|
|
651
|
-
|
|
653
|
+
type: Table$1
|
|
652
654
|
}, {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
+
childCount: 1,
|
|
656
|
+
type: THead
|
|
655
657
|
}, {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
+
childCount: headings.length,
|
|
659
|
+
type: Tr
|
|
658
660
|
}, ...headings.flatMap(getTableHeadingVirtualDom), {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
+
childCount: rows.length,
|
|
662
|
+
type: TBody
|
|
661
663
|
}, ...rows.flatMap(getTableRowVirtualDom)];
|
|
662
664
|
};
|
|
663
665
|
|
|
@@ -669,9 +671,9 @@ const getFeatureCommandsVirtualDom = commands => {
|
|
|
669
671
|
const heading = commands$1();
|
|
670
672
|
const tableInfo = getCommandTableEntries(commands);
|
|
671
673
|
return [{
|
|
672
|
-
|
|
674
|
+
childCount: 2,
|
|
673
675
|
className: FeatureContent,
|
|
674
|
-
|
|
676
|
+
type: Div
|
|
675
677
|
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
676
678
|
};
|
|
677
679
|
|
|
@@ -761,46 +763,46 @@ const getJsonValidationInfos = async (extensionUri, validations) => {
|
|
|
761
763
|
} = validation;
|
|
762
764
|
if (typeof schema !== 'string') {
|
|
763
765
|
validationInfos.push({
|
|
766
|
+
errorMessage: propertyMustBeOfTypeString(),
|
|
767
|
+
fileMatch,
|
|
764
768
|
isValid: false,
|
|
765
|
-
stringValue: JSON.stringify(schema),
|
|
766
769
|
schemaUrl: '',
|
|
767
|
-
|
|
768
|
-
fileMatch
|
|
770
|
+
stringValue: JSON.stringify(schema)
|
|
769
771
|
});
|
|
770
772
|
} else if (schema && !schemaLinkUrl) {
|
|
771
773
|
validationInfos.push({
|
|
774
|
+
errorMessage: invalidLink(),
|
|
775
|
+
fileMatch,
|
|
772
776
|
isValid: false,
|
|
773
|
-
stringValue: schema,
|
|
774
777
|
schemaUrl: schemaLinkUrl,
|
|
775
|
-
|
|
776
|
-
fileMatch
|
|
778
|
+
stringValue: schema
|
|
777
779
|
});
|
|
778
780
|
} else if (schemaLinkUrl) {
|
|
779
781
|
// TODO maybe better use filesystem.exists
|
|
780
782
|
if (await existsJson(schemaLinkUrl)) {
|
|
781
783
|
validationInfos.push({
|
|
784
|
+
errorMessage: '',
|
|
785
|
+
fileMatch,
|
|
782
786
|
isValid: true,
|
|
783
|
-
stringValue: schema,
|
|
784
787
|
schemaUrl: schemaLinkUrl,
|
|
785
|
-
|
|
786
|
-
fileMatch
|
|
788
|
+
stringValue: schema
|
|
787
789
|
});
|
|
788
790
|
} else {
|
|
789
791
|
validationInfos.push({
|
|
792
|
+
errorMessage: schemaNotFound(),
|
|
793
|
+
fileMatch,
|
|
790
794
|
isValid: false,
|
|
791
|
-
stringValue: schema,
|
|
792
795
|
schemaUrl: schemaLinkUrl,
|
|
793
|
-
|
|
794
|
-
fileMatch
|
|
796
|
+
stringValue: schema
|
|
795
797
|
});
|
|
796
798
|
}
|
|
797
799
|
} else {
|
|
798
800
|
validationInfos.push({
|
|
801
|
+
errorMessage: '',
|
|
802
|
+
fileMatch,
|
|
799
803
|
isValid: true,
|
|
800
|
-
stringValue: schema,
|
|
801
804
|
schemaUrl: schemaLinkUrl,
|
|
802
|
-
|
|
803
|
-
fileMatch
|
|
805
|
+
stringValue: schema
|
|
804
806
|
});
|
|
805
807
|
}
|
|
806
808
|
}
|
|
@@ -809,22 +811,22 @@ const getJsonValidationInfos = async (extensionUri, validations) => {
|
|
|
809
811
|
|
|
810
812
|
const getJsonValidationTableEntry = validationInfo => {
|
|
811
813
|
const {
|
|
812
|
-
isValid,
|
|
813
814
|
errorMessage,
|
|
815
|
+
fileMatch,
|
|
816
|
+
isValid,
|
|
814
817
|
schemaUrl,
|
|
815
|
-
stringValue
|
|
816
|
-
fileMatch
|
|
818
|
+
stringValue
|
|
817
819
|
} = validationInfo;
|
|
818
820
|
if (!isValid && schemaUrl) {
|
|
819
821
|
return [{
|
|
820
822
|
type: Code,
|
|
821
823
|
value: fileMatch
|
|
822
824
|
}, {
|
|
823
|
-
type: Link,
|
|
824
|
-
value: stringValue,
|
|
825
|
-
href: schemaUrl,
|
|
826
825
|
className: TableCellInvalid,
|
|
827
|
-
|
|
826
|
+
href: schemaUrl,
|
|
827
|
+
title: errorMessage,
|
|
828
|
+
type: Link,
|
|
829
|
+
value: stringValue
|
|
828
830
|
}];
|
|
829
831
|
}
|
|
830
832
|
if (!isValid) {
|
|
@@ -832,10 +834,10 @@ const getJsonValidationTableEntry = validationInfo => {
|
|
|
832
834
|
type: Text,
|
|
833
835
|
value: fileMatch
|
|
834
836
|
}, {
|
|
835
|
-
type: Text,
|
|
836
|
-
value: stringValue,
|
|
837
837
|
className: TableCellInvalid,
|
|
838
|
-
title: errorMessage
|
|
838
|
+
title: errorMessage,
|
|
839
|
+
type: Text,
|
|
840
|
+
value: stringValue
|
|
839
841
|
}];
|
|
840
842
|
}
|
|
841
843
|
if (schemaUrl) {
|
|
@@ -843,9 +845,9 @@ const getJsonValidationTableEntry = validationInfo => {
|
|
|
843
845
|
type: Code,
|
|
844
846
|
value: fileMatch
|
|
845
847
|
}, {
|
|
848
|
+
href: schemaUrl,
|
|
846
849
|
type: Link,
|
|
847
|
-
value: stringValue
|
|
848
|
-
href: schemaUrl
|
|
850
|
+
value: stringValue
|
|
849
851
|
}];
|
|
850
852
|
}
|
|
851
853
|
return [{
|
|
@@ -882,9 +884,9 @@ const getJsonValidationTableEntries = rows => {
|
|
|
882
884
|
};
|
|
883
885
|
|
|
884
886
|
const parentNode$1 = {
|
|
885
|
-
|
|
887
|
+
childCount: 2,
|
|
886
888
|
className: FeatureContent,
|
|
887
|
-
|
|
889
|
+
type: Div
|
|
888
890
|
};
|
|
889
891
|
const getFeatureJsonValidationVirtualDom = jsonValidation$1 => {
|
|
890
892
|
const heading = jsonValidation();
|
|
@@ -898,9 +900,9 @@ const getJsonValidationVirtualDom = state => {
|
|
|
898
900
|
|
|
899
901
|
const getProgrammingLanguageTableEntry = programmingLanguage => {
|
|
900
902
|
const {
|
|
901
|
-
id,
|
|
902
903
|
configuration,
|
|
903
|
-
extensions
|
|
904
|
+
extensions,
|
|
905
|
+
id
|
|
904
906
|
} = programmingLanguage;
|
|
905
907
|
const name = ''; // TODO
|
|
906
908
|
const snippets = ''; // TODO
|
|
@@ -911,17 +913,17 @@ const getProgrammingLanguageTableEntry = programmingLanguage => {
|
|
|
911
913
|
type: Text,
|
|
912
914
|
value: name
|
|
913
915
|
}, {
|
|
916
|
+
listItems: extensions,
|
|
914
917
|
type: CodeList,
|
|
915
|
-
value: ''
|
|
916
|
-
listItems: extensions
|
|
918
|
+
value: ''
|
|
917
919
|
}, {
|
|
920
|
+
checked: Boolean(configuration),
|
|
918
921
|
type: CheckMark,
|
|
919
|
-
value: ''
|
|
920
|
-
checked: Boolean(configuration)
|
|
922
|
+
value: ''
|
|
921
923
|
}, {
|
|
924
|
+
checked: Boolean(snippets),
|
|
922
925
|
type: CheckMark,
|
|
923
|
-
value: ''
|
|
924
|
-
checked: Boolean(snippets)
|
|
926
|
+
value: ''
|
|
925
927
|
}];
|
|
926
928
|
};
|
|
927
929
|
|
|
@@ -960,9 +962,9 @@ const getFeatureProgrammingLanguagesVirtualDom = programmingLanguages$1 => {
|
|
|
960
962
|
const heading = programmingLanguages();
|
|
961
963
|
const tableInfo = getProgrammingLanguagesTableEntries(programmingLanguages$1);
|
|
962
964
|
return [{
|
|
963
|
-
|
|
965
|
+
childCount: 2,
|
|
964
966
|
className: FeatureContent,
|
|
965
|
-
|
|
967
|
+
type: Div
|
|
966
968
|
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
967
969
|
};
|
|
968
970
|
|
|
@@ -982,14 +984,14 @@ class FeatureNotFoundError extends Error {
|
|
|
982
984
|
|
|
983
985
|
const getFeatureUnsupportedVirtualDom = state => {
|
|
984
986
|
return [{
|
|
985
|
-
|
|
986
|
-
|
|
987
|
+
childCount: 2,
|
|
988
|
+
type: Div
|
|
987
989
|
}, {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
+
childCount: 1,
|
|
991
|
+
type: H1
|
|
990
992
|
}, text(unsupportedFeature()), {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
+
childCount: 1,
|
|
994
|
+
type: P
|
|
993
995
|
}, text(selectedFeatureUnknownOrUnsupported())];
|
|
994
996
|
};
|
|
995
997
|
|
|
@@ -1025,7 +1027,7 @@ const getFeatureVirtualDomHandler = featureName => {
|
|
|
1025
1027
|
};
|
|
1026
1028
|
|
|
1027
1029
|
const rpcs = Object.create(null);
|
|
1028
|
-
const set$
|
|
1030
|
+
const set$a = (id, rpc) => {
|
|
1029
1031
|
rpcs[id] = rpc;
|
|
1030
1032
|
};
|
|
1031
1033
|
const get$3 = id => {
|
|
@@ -1047,7 +1049,7 @@ const create$7 = rpcId => {
|
|
|
1047
1049
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1048
1050
|
},
|
|
1049
1051
|
set(rpc) {
|
|
1050
|
-
set$
|
|
1052
|
+
set$a(rpcId, rpc);
|
|
1051
1053
|
},
|
|
1052
1054
|
async dispose() {
|
|
1053
1055
|
const rpc = get$3(rpcId);
|
|
@@ -1573,7 +1575,7 @@ const create$4 = (method, params) => {
|
|
|
1573
1575
|
};
|
|
1574
1576
|
};
|
|
1575
1577
|
const callbacks = Object.create(null);
|
|
1576
|
-
const set$
|
|
1578
|
+
const set$9 = (id, fn) => {
|
|
1577
1579
|
callbacks[id] = fn;
|
|
1578
1580
|
};
|
|
1579
1581
|
const get$2 = id => {
|
|
@@ -1592,7 +1594,7 @@ const registerPromise = () => {
|
|
|
1592
1594
|
resolve,
|
|
1593
1595
|
promise
|
|
1594
1596
|
} = Promise.withResolvers();
|
|
1595
|
-
set$
|
|
1597
|
+
set$9(id, resolve);
|
|
1596
1598
|
return {
|
|
1597
1599
|
id,
|
|
1598
1600
|
promise
|
|
@@ -1937,7 +1939,7 @@ const send = (transport, method, ...params) => {
|
|
|
1937
1939
|
const message = create$4(method, params);
|
|
1938
1940
|
transport.send(message);
|
|
1939
1941
|
};
|
|
1940
|
-
const invoke$
|
|
1942
|
+
const invoke$5 = (ipc, method, ...params) => {
|
|
1941
1943
|
return invokeHelper(ipc, method, params, false);
|
|
1942
1944
|
};
|
|
1943
1945
|
const invokeAndTransfer$4 = (ipc, method, ...params) => {
|
|
@@ -1976,7 +1978,7 @@ const createRpc = ipc => {
|
|
|
1976
1978
|
send(ipc, method, ...params);
|
|
1977
1979
|
},
|
|
1978
1980
|
invoke(method, ...params) {
|
|
1979
|
-
return invoke$
|
|
1981
|
+
return invoke$5(ipc, method, ...params);
|
|
1980
1982
|
},
|
|
1981
1983
|
invokeAndTransfer(method, ...params) {
|
|
1982
1984
|
return invokeAndTransfer$4(ipc, method, ...params);
|
|
@@ -2086,104 +2088,104 @@ const createMockRpc = ({
|
|
|
2086
2088
|
};
|
|
2087
2089
|
|
|
2088
2090
|
const {
|
|
2089
|
-
invoke: invoke$
|
|
2091
|
+
invoke: invoke$4,
|
|
2090
2092
|
invokeAndTransfer: invokeAndTransfer$3,
|
|
2091
|
-
set: set$
|
|
2092
|
-
dispose: dispose$
|
|
2093
|
+
set: set$8,
|
|
2094
|
+
dispose: dispose$4
|
|
2093
2095
|
} = create$7(ExtensionHostWorker);
|
|
2094
2096
|
const executeReferenceProvider = async (id, offset) => {
|
|
2095
2097
|
// @ts-ignore
|
|
2096
|
-
return invoke$
|
|
2098
|
+
return invoke$4('ExtensionHostReference.executeReferenceProvider', id, offset);
|
|
2097
2099
|
};
|
|
2098
2100
|
const executeFileReferenceProvider = async id => {
|
|
2099
2101
|
// @ts-ignore
|
|
2100
|
-
return invoke$
|
|
2102
|
+
return invoke$4('ExtensionHostReference.executeFileReferenceProvider', id);
|
|
2101
2103
|
};
|
|
2102
2104
|
const getRuntimeStatus$2 = async extensionId => {
|
|
2103
2105
|
// @ts-ignore
|
|
2104
|
-
return invoke$
|
|
2106
|
+
return invoke$4('ExtensionHost.getRuntimeStatus', extensionId);
|
|
2105
2107
|
};
|
|
2106
|
-
const registerMockRpc$
|
|
2108
|
+
const registerMockRpc$2 = commandMap => {
|
|
2107
2109
|
const mockRpc = createMockRpc({
|
|
2108
2110
|
commandMap
|
|
2109
2111
|
});
|
|
2110
|
-
set$
|
|
2112
|
+
set$8(mockRpc);
|
|
2111
2113
|
return mockRpc;
|
|
2112
2114
|
};
|
|
2113
2115
|
|
|
2114
2116
|
const ExtensionHost = {
|
|
2115
2117
|
__proto__: null,
|
|
2116
|
-
dispose: dispose$
|
|
2118
|
+
dispose: dispose$4,
|
|
2117
2119
|
executeFileReferenceProvider,
|
|
2118
2120
|
executeReferenceProvider,
|
|
2119
2121
|
getRuntimeStatus: getRuntimeStatus$2,
|
|
2120
|
-
invoke: invoke$
|
|
2122
|
+
invoke: invoke$4,
|
|
2121
2123
|
invokeAndTransfer: invokeAndTransfer$3,
|
|
2122
|
-
registerMockRpc: registerMockRpc$
|
|
2123
|
-
set: set$
|
|
2124
|
+
registerMockRpc: registerMockRpc$2,
|
|
2125
|
+
set: set$8
|
|
2124
2126
|
};
|
|
2125
2127
|
|
|
2126
2128
|
const {
|
|
2127
|
-
invoke: invoke$
|
|
2129
|
+
invoke: invoke$3,
|
|
2128
2130
|
invokeAndTransfer: invokeAndTransfer$2,
|
|
2129
|
-
set: set$
|
|
2130
|
-
dispose: dispose$
|
|
2131
|
+
set: set$7,
|
|
2132
|
+
dispose: dispose$3
|
|
2131
2133
|
} = create$7(FileSystemWorker$1);
|
|
2132
2134
|
const remove = async dirent => {
|
|
2133
|
-
return invoke$
|
|
2135
|
+
return invoke$3('FileSystem.remove', dirent);
|
|
2134
2136
|
};
|
|
2135
2137
|
const readDirWithFileTypes = async uri => {
|
|
2136
|
-
return invoke$
|
|
2138
|
+
return invoke$3('FileSystem.readDirWithFileTypes', uri);
|
|
2137
2139
|
};
|
|
2138
2140
|
const getPathSeparator = async root => {
|
|
2139
2141
|
// @ts-ignore
|
|
2140
|
-
return invoke$
|
|
2142
|
+
return invoke$3('FileSystem.getPathSeparator', root);
|
|
2141
2143
|
};
|
|
2142
2144
|
const getRealPath = async path => {
|
|
2143
|
-
return invoke$
|
|
2145
|
+
return invoke$3('FileSystem.getRealPath', path);
|
|
2144
2146
|
};
|
|
2145
2147
|
const stat = async dirent => {
|
|
2146
|
-
return invoke$
|
|
2148
|
+
return invoke$3('FileSystem.stat', dirent);
|
|
2147
2149
|
};
|
|
2148
2150
|
const createFile = async uri => {
|
|
2149
|
-
return invoke$
|
|
2151
|
+
return invoke$3('FileSystem.writeFile', uri, '');
|
|
2150
2152
|
};
|
|
2151
|
-
const readFile$
|
|
2152
|
-
return invoke$
|
|
2153
|
+
const readFile$2 = async uri => {
|
|
2154
|
+
return invoke$3('FileSystem.readFile', uri);
|
|
2153
2155
|
};
|
|
2154
2156
|
const writeFile = async (uri, content) => {
|
|
2155
|
-
return invoke$
|
|
2157
|
+
return invoke$3('FileSystem.writeFile', uri, content);
|
|
2156
2158
|
};
|
|
2157
2159
|
const mkdir = async uri => {
|
|
2158
|
-
return invoke$
|
|
2160
|
+
return invoke$3('FileSystem.mkdir', uri);
|
|
2159
2161
|
};
|
|
2160
2162
|
const rename = async (oldUri, newUri) => {
|
|
2161
|
-
return invoke$
|
|
2163
|
+
return invoke$3('FileSystem.rename', oldUri, newUri);
|
|
2162
2164
|
};
|
|
2163
2165
|
const copy = async (oldUri, newUri) => {
|
|
2164
|
-
return invoke$
|
|
2166
|
+
return invoke$3('FileSystem.copy', oldUri, newUri);
|
|
2165
2167
|
};
|
|
2166
2168
|
const exists$1 = async uri => {
|
|
2167
2169
|
// @ts-ignore
|
|
2168
|
-
return invoke$
|
|
2170
|
+
return invoke$3('FileSystem.exists', uri);
|
|
2169
2171
|
};
|
|
2170
|
-
const getFolderSize$
|
|
2172
|
+
const getFolderSize$1 = async uri => {
|
|
2171
2173
|
// @ts-ignore
|
|
2172
|
-
return invoke$
|
|
2174
|
+
return invoke$3('FileSystem.getFolderSize', uri);
|
|
2173
2175
|
};
|
|
2174
2176
|
const readFileAsBlob$1 = async uri => {
|
|
2175
2177
|
// @ts-ignore
|
|
2176
|
-
return invoke$
|
|
2178
|
+
return invoke$3('FileSystem.readFileAsBlob', uri);
|
|
2177
2179
|
};
|
|
2178
2180
|
const appendFile = async (uri, text) => {
|
|
2179
2181
|
// @ts-ignore
|
|
2180
|
-
return invoke$
|
|
2182
|
+
return invoke$3('FileSystem.appendFile', uri, text);
|
|
2181
2183
|
};
|
|
2182
|
-
const registerMockRpc$
|
|
2184
|
+
const registerMockRpc$1 = commandMap => {
|
|
2183
2185
|
const mockRpc = createMockRpc({
|
|
2184
2186
|
commandMap
|
|
2185
2187
|
});
|
|
2186
|
-
set$
|
|
2188
|
+
set$7(mockRpc);
|
|
2187
2189
|
return mockRpc;
|
|
2188
2190
|
};
|
|
2189
2191
|
|
|
@@ -2192,418 +2194,133 @@ const FileSystemWorker = {
|
|
|
2192
2194
|
appendFile,
|
|
2193
2195
|
copy,
|
|
2194
2196
|
createFile,
|
|
2195
|
-
dispose: dispose$
|
|
2197
|
+
dispose: dispose$3,
|
|
2196
2198
|
exists: exists$1,
|
|
2197
|
-
getFolderSize: getFolderSize$
|
|
2199
|
+
getFolderSize: getFolderSize$1,
|
|
2198
2200
|
getPathSeparator,
|
|
2199
2201
|
getRealPath,
|
|
2200
|
-
invoke: invoke$
|
|
2202
|
+
invoke: invoke$3,
|
|
2201
2203
|
invokeAndTransfer: invokeAndTransfer$2,
|
|
2202
2204
|
mkdir,
|
|
2203
2205
|
readDirWithFileTypes,
|
|
2204
|
-
readFile: readFile$
|
|
2206
|
+
readFile: readFile$2,
|
|
2205
2207
|
readFileAsBlob: readFileAsBlob$1,
|
|
2206
|
-
registerMockRpc: registerMockRpc$
|
|
2208
|
+
registerMockRpc: registerMockRpc$1,
|
|
2207
2209
|
remove,
|
|
2208
2210
|
rename,
|
|
2209
|
-
set: set$
|
|
2211
|
+
set: set$7,
|
|
2210
2212
|
stat,
|
|
2211
2213
|
writeFile
|
|
2212
2214
|
};
|
|
2213
2215
|
|
|
2214
2216
|
const {
|
|
2215
|
-
invoke: invoke$
|
|
2217
|
+
invoke: invoke$2,
|
|
2216
2218
|
invokeAndTransfer: invokeAndTransfer$1,
|
|
2217
|
-
set: set$
|
|
2218
|
-
dispose: dispose$
|
|
2219
|
+
set: set$6,
|
|
2220
|
+
dispose: dispose$2
|
|
2219
2221
|
} = create$7(MarkdownWorker$1);
|
|
2220
2222
|
const getVirtualDom$1 = async html => {
|
|
2221
2223
|
// @ts-ignore
|
|
2222
|
-
return invoke$
|
|
2224
|
+
return invoke$2('Markdown.getVirtualDom', html);
|
|
2223
2225
|
};
|
|
2224
2226
|
const render$1 = async (markdown, options) => {
|
|
2225
2227
|
// @ts-ignore
|
|
2226
|
-
return invoke$
|
|
2228
|
+
return invoke$2('Markdown.render', markdown, options);
|
|
2227
2229
|
};
|
|
2228
|
-
const registerMockRpc
|
|
2230
|
+
const registerMockRpc = commandMap => {
|
|
2229
2231
|
const mockRpc = createMockRpc({
|
|
2230
2232
|
commandMap
|
|
2231
2233
|
});
|
|
2232
|
-
set$
|
|
2234
|
+
set$6(mockRpc);
|
|
2233
2235
|
return mockRpc;
|
|
2234
2236
|
};
|
|
2235
2237
|
|
|
2236
2238
|
const MarkdownWorker = {
|
|
2237
2239
|
__proto__: null,
|
|
2238
|
-
dispose: dispose$
|
|
2240
|
+
dispose: dispose$2,
|
|
2239
2241
|
getVirtualDom: getVirtualDom$1,
|
|
2240
|
-
invoke: invoke$
|
|
2242
|
+
invoke: invoke$2,
|
|
2241
2243
|
invokeAndTransfer: invokeAndTransfer$1,
|
|
2242
|
-
registerMockRpc
|
|
2244
|
+
registerMockRpc,
|
|
2243
2245
|
render: render$1,
|
|
2244
|
-
set: set$
|
|
2246
|
+
set: set$6
|
|
2245
2247
|
};
|
|
2246
2248
|
|
|
2247
2249
|
const {
|
|
2248
|
-
invoke: invoke$
|
|
2250
|
+
invoke: invoke$1,
|
|
2249
2251
|
invokeAndTransfer,
|
|
2250
|
-
set: set$
|
|
2251
|
-
|
|
2252
|
-
} = create$7(RendererWorker$1);
|
|
2253
|
-
const searchFileHtml = async uri => {
|
|
2254
|
-
return invoke$2('ExtensionHost.searchFileWithHtml', uri);
|
|
2255
|
-
};
|
|
2256
|
-
const getFilePathElectron = async file => {
|
|
2257
|
-
return invoke$2('FileSystemHandle.getFilePathElectron', file);
|
|
2258
|
-
};
|
|
2259
|
-
const showContextMenu = async (x, y, id, ...args) => {
|
|
2260
|
-
return invoke$2('ContextMenu.show', x, y, id, ...args);
|
|
2261
|
-
};
|
|
2262
|
-
const getElectronVersion = async () => {
|
|
2263
|
-
return invoke$2('Process.getElectronVersion');
|
|
2264
|
-
};
|
|
2265
|
-
const applyBulkReplacement = async bulkEdits => {
|
|
2266
|
-
await invoke$2('BulkReplacement.applyBulkReplacement', bulkEdits);
|
|
2267
|
-
};
|
|
2268
|
-
const setColorTheme$2 = async id => {
|
|
2252
|
+
set: set$5} = create$7(RendererWorker);
|
|
2253
|
+
const setColorTheme$1 = async id => {
|
|
2269
2254
|
// @ts-ignore
|
|
2270
|
-
return invoke$
|
|
2271
|
-
};
|
|
2272
|
-
const getNodeVersion = async () => {
|
|
2273
|
-
return invoke$2('Process.getNodeVersion');
|
|
2274
|
-
};
|
|
2275
|
-
const getChromeVersion = async () => {
|
|
2276
|
-
return invoke$2('Process.getChromeVersion');
|
|
2277
|
-
};
|
|
2278
|
-
const getV8Version = async () => {
|
|
2279
|
-
return invoke$2('Process.getV8Version');
|
|
2280
|
-
};
|
|
2281
|
-
const getFileHandles = async fileIds => {
|
|
2282
|
-
const files = await invoke$2('FileSystemHandle.getFileHandles', fileIds);
|
|
2283
|
-
return files;
|
|
2284
|
-
};
|
|
2285
|
-
const setWorkspacePath = async path => {
|
|
2286
|
-
await invoke$2('Workspace.setPath', path);
|
|
2255
|
+
return invoke$1(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
|
|
2287
2256
|
};
|
|
2288
|
-
const
|
|
2289
|
-
await invokeAndTransfer('WebView.registerInterceptor', id, port);
|
|
2290
|
-
};
|
|
2291
|
-
const unregisterWebViewInterceptor = async id => {
|
|
2292
|
-
await invoke$2('WebView.unregisterInterceptor', id);
|
|
2293
|
-
};
|
|
2294
|
-
const sendMessagePortToEditorWorker = async (port, rpcId) => {
|
|
2295
|
-
const command = 'HandleMessagePort.handleMessagePort';
|
|
2296
|
-
// @ts-ignore
|
|
2297
|
-
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
|
|
2298
|
-
};
|
|
2299
|
-
const sendMessagePortToErrorWorker = async (port, rpcId) => {
|
|
2300
|
-
const command = 'Errors.handleMessagePort';
|
|
2301
|
-
// @ts-ignore
|
|
2302
|
-
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
|
|
2303
|
-
};
|
|
2304
|
-
const sendMessagePortToMarkdownWorker$2 = async (port, rpcId) => {
|
|
2257
|
+
const sendMessagePortToMarkdownWorker$1 = async (port, rpcId) => {
|
|
2305
2258
|
const command = 'Markdown.handleMessagePort';
|
|
2306
2259
|
// @ts-ignore
|
|
2307
2260
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
|
|
2308
2261
|
};
|
|
2309
|
-
const
|
|
2310
|
-
const command = 'IconTheme.handleMessagePort';
|
|
2311
|
-
// @ts-ignore
|
|
2312
|
-
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToIconThemeWorker', port, command, rpcId);
|
|
2313
|
-
};
|
|
2314
|
-
const sendMessagePortToFileSystemWorker$2 = async (port, rpcId) => {
|
|
2262
|
+
const sendMessagePortToFileSystemWorker$1 = async (port, rpcId) => {
|
|
2315
2263
|
const command = 'FileSystem.handleMessagePort';
|
|
2316
2264
|
// @ts-ignore
|
|
2317
2265
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
|
|
2318
2266
|
};
|
|
2319
|
-
const
|
|
2320
|
-
return invoke$2('FileSystem.readFile', uri);
|
|
2321
|
-
};
|
|
2322
|
-
const getWebViewSecret = async key => {
|
|
2323
|
-
// @ts-ignore
|
|
2324
|
-
return invoke$2('WebView.getSecret', key);
|
|
2325
|
-
};
|
|
2326
|
-
const setWebViewPort = async (uid, port, origin, portType) => {
|
|
2327
|
-
return invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
|
|
2328
|
-
};
|
|
2329
|
-
const setFocus = key => {
|
|
2330
|
-
return invoke$2('Focus.setFocus', key);
|
|
2331
|
-
};
|
|
2332
|
-
const getFileIcon = async options => {
|
|
2333
|
-
return invoke$2('IconTheme.getFileIcon', options);
|
|
2334
|
-
};
|
|
2335
|
-
const getColorThemeNames = async () => {
|
|
2336
|
-
return invoke$2('ColorTheme.getColorThemeNames');
|
|
2337
|
-
};
|
|
2338
|
-
const disableExtension$2 = async id => {
|
|
2267
|
+
const disableExtension$1 = async id => {
|
|
2339
2268
|
// @ts-ignore
|
|
2340
|
-
return invoke$
|
|
2269
|
+
return invoke$1('ExtensionManagement.disable', id);
|
|
2341
2270
|
};
|
|
2342
|
-
const enableExtension$
|
|
2271
|
+
const enableExtension$1 = async id => {
|
|
2343
2272
|
// @ts-ignore
|
|
2344
|
-
return invoke$
|
|
2273
|
+
return invoke$1('ExtensionManagement.enable', id);
|
|
2345
2274
|
};
|
|
2346
|
-
const
|
|
2347
|
-
// @ts-ignore
|
|
2348
|
-
return invoke$2('Run And Debug.handleChange', params);
|
|
2349
|
-
};
|
|
2350
|
-
const getFolderIcon = async options => {
|
|
2351
|
-
return invoke$2('IconTheme.getFolderIcon', options);
|
|
2352
|
-
};
|
|
2353
|
-
const closeWidget = async widgetId => {
|
|
2354
|
-
return invoke$2('Viewlet.closeWidget', widgetId);
|
|
2355
|
-
};
|
|
2356
|
-
const sendMessagePortToExtensionHostWorker$2 = async (port, rpcId = 0) => {
|
|
2275
|
+
const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
|
|
2357
2276
|
const command = 'HandleMessagePort.handleMessagePort2';
|
|
2358
2277
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
2359
2278
|
};
|
|
2360
|
-
const sendMessagePortToSearchProcess = async port => {
|
|
2361
|
-
await invokeAndTransfer('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
|
|
2362
|
-
};
|
|
2363
2279
|
const confirm = async (message, options) => {
|
|
2364
2280
|
// @ts-ignore
|
|
2365
|
-
const result = await invoke$
|
|
2281
|
+
const result = await invoke$1('ConfirmPrompt.prompt', message, options);
|
|
2366
2282
|
return result;
|
|
2367
2283
|
};
|
|
2368
|
-
const
|
|
2369
|
-
|
|
2370
|
-
};
|
|
2371
|
-
const getKeyBindings = async () => {
|
|
2372
|
-
return invoke$2('KeyBindingsInitial.getKeyBindings');
|
|
2373
|
-
};
|
|
2374
|
-
const writeClipBoardText$1 = async text => {
|
|
2375
|
-
await invoke$2('ClipBoard.writeText', /* text */text);
|
|
2376
|
-
};
|
|
2377
|
-
const writeClipBoardImage$1 = async blob => {
|
|
2378
|
-
// @ts-ignore
|
|
2379
|
-
await invoke$2('ClipBoard.writeImage', /* text */blob);
|
|
2284
|
+
const writeClipBoardText = async text => {
|
|
2285
|
+
await invoke$1('ClipBoard.writeText', /* text */text);
|
|
2380
2286
|
};
|
|
2381
|
-
const
|
|
2287
|
+
const writeClipBoardImage = async blob => {
|
|
2382
2288
|
// @ts-ignore
|
|
2383
|
-
|
|
2384
|
-
};
|
|
2385
|
-
const searchFileFetch = async uri => {
|
|
2386
|
-
return invoke$2('ExtensionHost.searchFileWithFetch', uri);
|
|
2387
|
-
};
|
|
2388
|
-
const showMessageBox = async options => {
|
|
2389
|
-
return invoke$2('ElectronDialog.showMessageBox', options);
|
|
2390
|
-
};
|
|
2391
|
-
const handleDebugResumed = async params => {
|
|
2392
|
-
await invoke$2('Run And Debug.handleResumed', params);
|
|
2289
|
+
await invoke$1('ClipBoard.writeImage', /* text */blob);
|
|
2393
2290
|
};
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2291
|
+
const getAllExtensions$1 = async () => {
|
|
2292
|
+
return invoke$1('ExtensionManagement.getAllExtensions');
|
|
2396
2293
|
};
|
|
2397
|
-
const
|
|
2398
|
-
const icons = await invoke$2('IconTheme.getIcons', requests);
|
|
2399
|
-
return icons;
|
|
2400
|
-
};
|
|
2401
|
-
const activateByEvent = event => {
|
|
2402
|
-
return invoke$2('ExtensionHostManagement.activateByEvent', event);
|
|
2403
|
-
};
|
|
2404
|
-
const setAdditionalFocus = focusKey => {
|
|
2294
|
+
const getExtension$2 = async id => {
|
|
2405
2295
|
// @ts-ignore
|
|
2406
|
-
return invoke$
|
|
2296
|
+
return invoke$1('ExtensionManagement.getExtension', id);
|
|
2407
2297
|
};
|
|
2408
|
-
const
|
|
2298
|
+
const openNativeFolder = async uri => {
|
|
2409
2299
|
// @ts-ignore
|
|
2410
|
-
|
|
2300
|
+
await invoke$1('OpenNativeFolder.openNativeFolder', uri);
|
|
2411
2301
|
};
|
|
2412
|
-
const
|
|
2413
|
-
return invoke$
|
|
2302
|
+
const uninstallExtension = async id => {
|
|
2303
|
+
return invoke$1('ExtensionManagement.uninstall', id);
|
|
2414
2304
|
};
|
|
2415
|
-
const
|
|
2416
|
-
const command = 'HandleMessagePort.handleMessagePort';
|
|
2305
|
+
const openExtensionSearch$1 = async () => {
|
|
2417
2306
|
// @ts-ignore
|
|
2418
|
-
|
|
2419
|
-
};
|
|
2420
|
-
const getPreference = async key => {
|
|
2421
|
-
return await invoke$2('Preferences.get', key);
|
|
2422
|
-
};
|
|
2423
|
-
const getAllExtensions$2 = async () => {
|
|
2424
|
-
return invoke$2('ExtensionManagement.getAllExtensions');
|
|
2307
|
+
return invoke$1('SideBar.openViewlet', 'Extensions');
|
|
2425
2308
|
};
|
|
2426
|
-
const
|
|
2309
|
+
const setExtensionsSearchValue = async searchValue => {
|
|
2427
2310
|
// @ts-ignore
|
|
2428
|
-
return invoke$
|
|
2311
|
+
return invoke$1('Extensions.handleInput', searchValue, Script$1);
|
|
2429
2312
|
};
|
|
2430
|
-
const
|
|
2431
|
-
await invoke$2('Run And Debug.handlePaused', params);
|
|
2432
|
-
};
|
|
2433
|
-
const openUri = async (uri, focus, options) => {
|
|
2434
|
-
await invoke$2('Main.openUri', uri, focus, options);
|
|
2435
|
-
};
|
|
2436
|
-
const sendMessagePortToSyntaxHighlightingWorker = async port => {
|
|
2437
|
-
await invokeAndTransfer(
|
|
2438
|
-
// @ts-ignore
|
|
2439
|
-
'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
|
|
2440
|
-
};
|
|
2441
|
-
const handleDebugScriptParsed = async script => {
|
|
2442
|
-
await invoke$2('Run And Debug.handleScriptParsed', script);
|
|
2443
|
-
};
|
|
2444
|
-
const getWindowId = async () => {
|
|
2445
|
-
return invoke$2('GetWindowId.getWindowId');
|
|
2446
|
-
};
|
|
2447
|
-
const getBlob = async uri => {
|
|
2448
|
-
// @ts-ignore
|
|
2449
|
-
return invoke$2('FileSystem.getBlob', uri);
|
|
2450
|
-
};
|
|
2451
|
-
const getExtensionCommands = async () => {
|
|
2452
|
-
return invoke$2('ExtensionHost.getCommands');
|
|
2453
|
-
};
|
|
2454
|
-
const showErrorDialog = async errorInfo => {
|
|
2455
|
-
// @ts-ignore
|
|
2456
|
-
await invoke$2('ErrorHandling.showErrorDialog', errorInfo);
|
|
2457
|
-
};
|
|
2458
|
-
const getFolderSize$1 = async uri => {
|
|
2313
|
+
const openUrl$1 = async uri => {
|
|
2459
2314
|
// @ts-ignore
|
|
2460
|
-
|
|
2461
|
-
};
|
|
2462
|
-
const getExtension$3 = async id => {
|
|
2463
|
-
// @ts-ignore
|
|
2464
|
-
return invoke$2('ExtensionManagement.getExtension', id);
|
|
2465
|
-
};
|
|
2466
|
-
const getMarkdownDom = async html => {
|
|
2467
|
-
// @ts-ignore
|
|
2468
|
-
return invoke$2('Markdown.getVirtualDom', html);
|
|
2469
|
-
};
|
|
2470
|
-
const renderMarkdown$1 = async (markdown, options) => {
|
|
2471
|
-
// @ts-ignore
|
|
2472
|
-
return invoke$2('Markdown.renderMarkdown', markdown, options);
|
|
2473
|
-
};
|
|
2474
|
-
const openNativeFolder$1 = async uri => {
|
|
2475
|
-
// @ts-ignore
|
|
2476
|
-
await invoke$2('OpenNativeFolder.openNativeFolder', uri);
|
|
2477
|
-
};
|
|
2478
|
-
const uninstallExtension$1 = async id => {
|
|
2479
|
-
return invoke$2('ExtensionManagement.uninstall', id);
|
|
2480
|
-
};
|
|
2481
|
-
const installExtension = async id => {
|
|
2482
|
-
// @ts-ignore
|
|
2483
|
-
return invoke$2('ExtensionManagement.install', id);
|
|
2484
|
-
};
|
|
2485
|
-
const openExtensionSearch$2 = async () => {
|
|
2486
|
-
// @ts-ignore
|
|
2487
|
-
return invoke$2('SideBar.openViewlet', 'Extensions');
|
|
2488
|
-
};
|
|
2489
|
-
const setExtensionsSearchValue$1 = async searchValue => {
|
|
2490
|
-
// @ts-ignore
|
|
2491
|
-
return invoke$2('Extensions.handleInput', searchValue);
|
|
2492
|
-
};
|
|
2493
|
-
const openExternal = async uri => {
|
|
2494
|
-
// @ts-ignore
|
|
2495
|
-
await invoke$2('Open.openExternal', uri);
|
|
2496
|
-
};
|
|
2497
|
-
const openUrl$2 = async uri => {
|
|
2498
|
-
// @ts-ignore
|
|
2499
|
-
await invoke$2('Open.openUrl', uri);
|
|
2500
|
-
};
|
|
2501
|
-
const getAllPreferences = async () => {
|
|
2502
|
-
// @ts-ignore
|
|
2503
|
-
return invoke$2('Preferences.getAll');
|
|
2504
|
-
};
|
|
2505
|
-
const showSaveFilePicker = async () => {
|
|
2506
|
-
// @ts-ignore
|
|
2507
|
-
return invoke$2('FilePicker.showSaveFilePicker');
|
|
2508
|
-
};
|
|
2509
|
-
const getLogsDir = async () => {
|
|
2510
|
-
// @ts-ignore
|
|
2511
|
-
return invoke$2('PlatformPaths.getLogsDir');
|
|
2512
|
-
};
|
|
2513
|
-
const registerMockRpc = commandMap => {
|
|
2514
|
-
const mockRpc = createMockRpc({
|
|
2515
|
-
commandMap
|
|
2516
|
-
});
|
|
2517
|
-
set$6(mockRpc);
|
|
2518
|
-
return mockRpc;
|
|
2519
|
-
};
|
|
2520
|
-
|
|
2521
|
-
const RendererWorker = {
|
|
2522
|
-
__proto__: null,
|
|
2523
|
-
activateByEvent,
|
|
2524
|
-
applyBulkReplacement,
|
|
2525
|
-
closeWidget,
|
|
2526
|
-
confirm,
|
|
2527
|
-
disableExtension: disableExtension$2,
|
|
2528
|
-
dispose: dispose$2,
|
|
2529
|
-
enableExtension: enableExtension$2,
|
|
2530
|
-
getActiveEditorId,
|
|
2531
|
-
getAllExtensions: getAllExtensions$2,
|
|
2532
|
-
getAllPreferences,
|
|
2533
|
-
getBlob,
|
|
2534
|
-
getChromeVersion,
|
|
2535
|
-
getColorThemeNames,
|
|
2536
|
-
getElectronVersion,
|
|
2537
|
-
getExtension: getExtension$3,
|
|
2538
|
-
getExtensionCommands,
|
|
2539
|
-
getFileHandles,
|
|
2540
|
-
getFileIcon,
|
|
2541
|
-
getFilePathElectron,
|
|
2542
|
-
getFolderIcon,
|
|
2543
|
-
getFolderSize: getFolderSize$1,
|
|
2544
|
-
getIcons,
|
|
2545
|
-
getKeyBindings,
|
|
2546
|
-
getLogsDir,
|
|
2547
|
-
getMarkdownDom,
|
|
2548
|
-
getNodeVersion,
|
|
2549
|
-
getPreference,
|
|
2550
|
-
getRecentlyOpened,
|
|
2551
|
-
getV8Version,
|
|
2552
|
-
getWebViewSecret,
|
|
2553
|
-
getWindowId,
|
|
2554
|
-
getWorkspacePath,
|
|
2555
|
-
handleDebugChange,
|
|
2556
|
-
handleDebugPaused,
|
|
2557
|
-
handleDebugResumed,
|
|
2558
|
-
handleDebugScriptParsed,
|
|
2559
|
-
installExtension,
|
|
2560
|
-
invoke: invoke$2,
|
|
2561
|
-
invokeAndTransfer,
|
|
2562
|
-
openExtensionSearch: openExtensionSearch$2,
|
|
2563
|
-
openExternal,
|
|
2564
|
-
openNativeFolder: openNativeFolder$1,
|
|
2565
|
-
openUri,
|
|
2566
|
-
openUrl: openUrl$2,
|
|
2567
|
-
openWidget,
|
|
2568
|
-
readFile: readFile$2,
|
|
2569
|
-
registerMockRpc,
|
|
2570
|
-
registerWebViewInterceptor,
|
|
2571
|
-
renderMarkdown: renderMarkdown$1,
|
|
2572
|
-
rerenderEditor,
|
|
2573
|
-
searchFileFetch,
|
|
2574
|
-
searchFileHtml,
|
|
2575
|
-
searchFileMemory,
|
|
2576
|
-
sendMessagePortToEditorWorker,
|
|
2577
|
-
sendMessagePortToErrorWorker,
|
|
2578
|
-
sendMessagePortToExtensionHostWorker: sendMessagePortToExtensionHostWorker$2,
|
|
2579
|
-
sendMessagePortToFileSystemWorker: sendMessagePortToFileSystemWorker$2,
|
|
2580
|
-
sendMessagePortToIconThemeWorker,
|
|
2581
|
-
sendMessagePortToMarkdownWorker: sendMessagePortToMarkdownWorker$2,
|
|
2582
|
-
sendMessagePortToRendererProcess,
|
|
2583
|
-
sendMessagePortToSearchProcess,
|
|
2584
|
-
sendMessagePortToSyntaxHighlightingWorker,
|
|
2585
|
-
set: set$6,
|
|
2586
|
-
setAdditionalFocus,
|
|
2587
|
-
setColorTheme: setColorTheme$2,
|
|
2588
|
-
setExtensionsSearchValue: setExtensionsSearchValue$1,
|
|
2589
|
-
setFocus,
|
|
2590
|
-
setWebViewPort,
|
|
2591
|
-
setWorkspacePath,
|
|
2592
|
-
showContextMenu,
|
|
2593
|
-
showErrorDialog,
|
|
2594
|
-
showMessageBox,
|
|
2595
|
-
showSaveFilePicker,
|
|
2596
|
-
uninstallExtension: uninstallExtension$1,
|
|
2597
|
-
unregisterWebViewInterceptor,
|
|
2598
|
-
writeClipBoardImage: writeClipBoardImage$1,
|
|
2599
|
-
writeClipBoardText: writeClipBoardText$1
|
|
2315
|
+
await invoke$1('Open.openUrl', uri);
|
|
2600
2316
|
};
|
|
2601
2317
|
|
|
2602
2318
|
/* eslint-disable unicorn/prefer-export-from */
|
|
2603
2319
|
|
|
2604
2320
|
const {
|
|
2605
|
-
|
|
2606
|
-
|
|
2321
|
+
getRuntimeStatus: getRuntimeStatus$1,
|
|
2322
|
+
set: set$4
|
|
2323
|
+
} = ExtensionHost;
|
|
2607
2324
|
|
|
2608
2325
|
const getRuntimeStatus = async extensionId => {
|
|
2609
2326
|
// @ts-ignore
|
|
@@ -2615,15 +2332,15 @@ const getRuntimeStatus = async extensionId => {
|
|
|
2615
2332
|
const getRuntimeStatusDetails = async extension => {
|
|
2616
2333
|
const {
|
|
2617
2334
|
activationEvent,
|
|
2618
|
-
status,
|
|
2619
2335
|
activationTime,
|
|
2620
|
-
importTime
|
|
2336
|
+
importTime,
|
|
2337
|
+
status
|
|
2621
2338
|
} = await getRuntimeStatus(extension.id);
|
|
2622
2339
|
return {
|
|
2623
|
-
wasActivatedByEvent: activationEvent,
|
|
2624
2340
|
activationTime,
|
|
2341
|
+
importTime,
|
|
2625
2342
|
status,
|
|
2626
|
-
|
|
2343
|
+
wasActivatedByEvent: activationEvent
|
|
2627
2344
|
};
|
|
2628
2345
|
};
|
|
2629
2346
|
|
|
@@ -2648,17 +2365,17 @@ const getActivationTimeVirtualDom = (importTime$1, activationTime$1) => {
|
|
|
2648
2365
|
const formattedImportTime = formatTime(importTime$1);
|
|
2649
2366
|
const formattedTime = formatTime(activationTime$1);
|
|
2650
2367
|
return [{
|
|
2651
|
-
|
|
2652
|
-
|
|
2368
|
+
childCount: 1,
|
|
2369
|
+
type: Dt
|
|
2653
2370
|
}, text(importTime()), {
|
|
2654
|
-
|
|
2655
|
-
|
|
2371
|
+
childCount: 1,
|
|
2372
|
+
type: Dd
|
|
2656
2373
|
}, text(formattedImportTime), {
|
|
2657
|
-
|
|
2658
|
-
|
|
2374
|
+
childCount: 1,
|
|
2375
|
+
type: Dt
|
|
2659
2376
|
}, text(activationTime()), {
|
|
2660
|
-
|
|
2661
|
-
|
|
2377
|
+
childCount: 1,
|
|
2378
|
+
type: Dd
|
|
2662
2379
|
}, text(formattedTime)];
|
|
2663
2380
|
};
|
|
2664
2381
|
|
|
@@ -2672,28 +2389,28 @@ const getStatusMessage = statusType => {
|
|
|
2672
2389
|
switch (statusType) {
|
|
2673
2390
|
case Activated:
|
|
2674
2391
|
return 'activated';
|
|
2675
|
-
case None$1:
|
|
2676
|
-
return 'none';
|
|
2677
2392
|
case Activating:
|
|
2678
2393
|
return 'Activating';
|
|
2679
2394
|
case Error$1:
|
|
2680
2395
|
return 'error';
|
|
2681
2396
|
case Importing:
|
|
2682
2397
|
return 'importing';
|
|
2398
|
+
case None$1:
|
|
2399
|
+
return 'none';
|
|
2683
2400
|
default:
|
|
2684
2401
|
return 'unknown';
|
|
2685
2402
|
}
|
|
2686
2403
|
};
|
|
2687
2404
|
|
|
2688
2405
|
const key = {
|
|
2689
|
-
type: Dt,
|
|
2690
2406
|
childCount: 1,
|
|
2691
|
-
className: 'RuntimeStatusDefinitionListKey'
|
|
2407
|
+
className: 'RuntimeStatusDefinitionListKey',
|
|
2408
|
+
type: Dt
|
|
2692
2409
|
};
|
|
2693
2410
|
const value = {
|
|
2694
|
-
|
|
2411
|
+
childCount: 1,
|
|
2695
2412
|
className: 'RuntimeStatusDefinitionListValue',
|
|
2696
|
-
|
|
2413
|
+
type: Dd
|
|
2697
2414
|
};
|
|
2698
2415
|
const getStatusVirtualDom = status$1 => {
|
|
2699
2416
|
const statusKey = status();
|
|
@@ -2711,20 +2428,20 @@ const getChildCount$1 = (status, activationTime, importTime) => {
|
|
|
2711
2428
|
};
|
|
2712
2429
|
const getRuntimeStatusVirtualDom = state => {
|
|
2713
2430
|
const {
|
|
2714
|
-
status,
|
|
2715
2431
|
activationTime,
|
|
2716
|
-
importTime
|
|
2432
|
+
importTime,
|
|
2433
|
+
status
|
|
2717
2434
|
} = state;
|
|
2718
2435
|
const heading = runtimeStatus();
|
|
2719
2436
|
const childCount = getChildCount$1(status, activationTime, importTime);
|
|
2720
2437
|
return [{
|
|
2721
|
-
|
|
2438
|
+
childCount: 2,
|
|
2722
2439
|
className: FeatureContent,
|
|
2723
|
-
|
|
2440
|
+
type: Div
|
|
2724
2441
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
2725
|
-
|
|
2442
|
+
childCount,
|
|
2726
2443
|
className: 'RuntimeStatusDefinitionList',
|
|
2727
|
-
|
|
2444
|
+
type: Dl
|
|
2728
2445
|
}, ...getStatusVirtualDom(status), ...getActivationTimeVirtualDom(activationTime, importTime)];
|
|
2729
2446
|
};
|
|
2730
2447
|
|
|
@@ -2771,9 +2488,9 @@ const getFeatureSettingsVirtualDom = rows => {
|
|
|
2771
2488
|
const heading = settings();
|
|
2772
2489
|
const tableInfo = getSettingsTableEntries(rows);
|
|
2773
2490
|
return [{
|
|
2774
|
-
|
|
2491
|
+
childCount: 2,
|
|
2775
2492
|
className: FeatureContent,
|
|
2776
|
-
|
|
2493
|
+
type: Div
|
|
2777
2494
|
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
2778
2495
|
};
|
|
2779
2496
|
|
|
@@ -2818,26 +2535,27 @@ const WebViews = 'WebViews';
|
|
|
2818
2535
|
|
|
2819
2536
|
const getScrollToTopVirtualDom = scrollToTopButtonEnabled => {
|
|
2820
2537
|
return [{
|
|
2821
|
-
|
|
2822
|
-
className: ScrollToTopButton,
|
|
2538
|
+
ariaLabel: scrollToTop(),
|
|
2823
2539
|
childCount: 1,
|
|
2540
|
+
className: ScrollToTopButton,
|
|
2541
|
+
name: ScrollToTop,
|
|
2824
2542
|
onClick: HandleClickScrollToTop,
|
|
2825
|
-
|
|
2826
|
-
name: ScrollToTop
|
|
2543
|
+
type: Button$1
|
|
2827
2544
|
}, {
|
|
2828
|
-
type: Div,
|
|
2829
|
-
className: 'MaskIcon MaskIconChevronUp',
|
|
2830
2545
|
childCount: 0,
|
|
2831
|
-
|
|
2546
|
+
className: mergeClassNames(MaskIcon, MaskIconChevronUp),
|
|
2547
|
+
role: None$3,
|
|
2548
|
+
type: Div
|
|
2832
2549
|
}];
|
|
2833
2550
|
};
|
|
2834
2551
|
|
|
2835
2552
|
/* eslint-disable unicorn/prefer-export-from */
|
|
2836
2553
|
|
|
2837
2554
|
const {
|
|
2838
|
-
set: set$4,
|
|
2839
2555
|
getVirtualDom,
|
|
2840
|
-
render
|
|
2556
|
+
render,
|
|
2557
|
+
set: set$3
|
|
2558
|
+
} = MarkdownWorker;
|
|
2841
2559
|
|
|
2842
2560
|
const getMarkdownVirtualDom = async (html, options) => {
|
|
2843
2561
|
string(html);
|
|
@@ -2847,9 +2565,9 @@ const getMarkdownVirtualDom = async (html, options) => {
|
|
|
2847
2565
|
const extraDom = getScrollToTopVirtualDom();
|
|
2848
2566
|
return [{
|
|
2849
2567
|
...firstNode,
|
|
2850
|
-
onScroll: HandleReadmeScroll,
|
|
2851
2568
|
childCount: firstNode.childCount + 1,
|
|
2852
2569
|
onClick: HandleReadmeClick,
|
|
2570
|
+
onScroll: HandleReadmeScroll,
|
|
2853
2571
|
onSelectionChange: HandleSelectionChange
|
|
2854
2572
|
}, ...extraDom, ...rest];
|
|
2855
2573
|
}
|
|
@@ -2937,9 +2655,8 @@ const getCacheInternal = async cacheName => {
|
|
|
2937
2655
|
const twoWeeks = 14 * 24 * 60 * 60 * 1000;
|
|
2938
2656
|
// @ts-ignore
|
|
2939
2657
|
const bucket = await navigator.storageBuckets.open(bucketName, {
|
|
2940
|
-
|
|
2941
|
-
// 20MB
|
|
2942
|
-
expires: Date.now() + twoWeeks
|
|
2658
|
+
expires: Date.now() + twoWeeks,
|
|
2659
|
+
quota: 20 * 1024 * 1024 // 20MB
|
|
2943
2660
|
});
|
|
2944
2661
|
const cache = await bucket.caches.open(cacheName);
|
|
2945
2662
|
return cache;
|
|
@@ -2964,12 +2681,12 @@ const get$1 = async key => {
|
|
|
2964
2681
|
const text = await response?.text();
|
|
2965
2682
|
return text || '';
|
|
2966
2683
|
};
|
|
2967
|
-
const set$
|
|
2684
|
+
const set$2 = async (key, value) => {
|
|
2968
2685
|
const cache = await getCache(cacheName);
|
|
2969
2686
|
await cache.put(key, new Response(value, {
|
|
2970
2687
|
headers: {
|
|
2971
|
-
'Content-
|
|
2972
|
-
'Content-
|
|
2688
|
+
'Content-Length': `${value.length}`,
|
|
2689
|
+
'Content-Type': 'application/markdown'
|
|
2973
2690
|
}
|
|
2974
2691
|
}));
|
|
2975
2692
|
};
|
|
@@ -2982,7 +2699,7 @@ const renderMarkdownCached = async (markdown, options) => {
|
|
|
2982
2699
|
return value; // TODO validate if it's valid
|
|
2983
2700
|
}
|
|
2984
2701
|
const html = await render(markdown, options);
|
|
2985
|
-
await set$
|
|
2702
|
+
await set$2(cacheKey, html);
|
|
2986
2703
|
return html;
|
|
2987
2704
|
};
|
|
2988
2705
|
|
|
@@ -3050,13 +2767,13 @@ const getFeatureThemesVirtualDom = themesDom => {
|
|
|
3050
2767
|
const childCount = getVirtualDomChildCount(themesDom);
|
|
3051
2768
|
const heading = theme();
|
|
3052
2769
|
return [{
|
|
3053
|
-
|
|
2770
|
+
childCount: 2,
|
|
3054
2771
|
className: FeatureContent,
|
|
3055
|
-
|
|
2772
|
+
type: Div
|
|
3056
2773
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
3057
|
-
|
|
2774
|
+
childCount,
|
|
3058
2775
|
className: DefaultMarkdown,
|
|
3059
|
-
|
|
2776
|
+
type: Div
|
|
3060
2777
|
}, ...themesDom];
|
|
3061
2778
|
};
|
|
3062
2779
|
|
|
@@ -3066,16 +2783,16 @@ const getThemeVirtualDom = state => {
|
|
|
3066
2783
|
|
|
3067
2784
|
const toWebView = rawWebView => {
|
|
3068
2785
|
const {
|
|
3069
|
-
id,
|
|
3070
|
-
selector,
|
|
3071
2786
|
contentSecurityPolicy,
|
|
3072
|
-
elements
|
|
2787
|
+
elements,
|
|
2788
|
+
id,
|
|
2789
|
+
selector
|
|
3073
2790
|
} = rawWebView;
|
|
3074
2791
|
return {
|
|
3075
|
-
id,
|
|
3076
|
-
selectorString: JSON.stringify(selector),
|
|
3077
2792
|
contentSecurityPolicyString: JSON.stringify(contentSecurityPolicy),
|
|
3078
|
-
elementsString: JSON.stringify(elements, null, 2)
|
|
2793
|
+
elementsString: JSON.stringify(elements, null, 2),
|
|
2794
|
+
id,
|
|
2795
|
+
selectorString: JSON.stringify(selector)
|
|
3079
2796
|
};
|
|
3080
2797
|
};
|
|
3081
2798
|
|
|
@@ -3099,47 +2816,47 @@ const featureWebViewsEnabled = extension => {
|
|
|
3099
2816
|
};
|
|
3100
2817
|
|
|
3101
2818
|
const heading = {
|
|
3102
|
-
|
|
2819
|
+
childCount: 1,
|
|
3103
2820
|
className: DefinitionListItemHeading,
|
|
3104
|
-
|
|
2821
|
+
type: H2
|
|
3105
2822
|
};
|
|
3106
2823
|
const pre = {
|
|
3107
|
-
|
|
2824
|
+
childCount: 1,
|
|
3108
2825
|
className: DefinitionListItemValue,
|
|
3109
|
-
|
|
2826
|
+
type: Pre
|
|
3110
2827
|
};
|
|
3111
2828
|
const item = {
|
|
3112
|
-
|
|
2829
|
+
childCount: 2,
|
|
3113
2830
|
className: DefinitionListItem,
|
|
3114
|
-
|
|
2831
|
+
type: Div
|
|
3115
2832
|
};
|
|
3116
2833
|
const getWebViewVirtualDom = webView => {
|
|
3117
2834
|
const {
|
|
3118
|
-
id,
|
|
3119
|
-
selectorString,
|
|
3120
2835
|
contentSecurityPolicyString,
|
|
3121
|
-
elementsString
|
|
2836
|
+
elementsString,
|
|
2837
|
+
id,
|
|
2838
|
+
selectorString
|
|
3122
2839
|
} = webView;
|
|
3123
2840
|
const textId = id$1();
|
|
3124
2841
|
const textSelector = selector();
|
|
3125
2842
|
const textContentSecurityPolicy = contentSecurityPolicy();
|
|
3126
2843
|
const textElements = elements();
|
|
3127
2844
|
return [{
|
|
3128
|
-
|
|
2845
|
+
childCount: 4,
|
|
3129
2846
|
className: FeatureWebView,
|
|
3130
|
-
|
|
2847
|
+
type: Div
|
|
3131
2848
|
}, 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)];
|
|
3132
2849
|
};
|
|
3133
2850
|
|
|
3134
2851
|
const getFeatureWebViewsVirtualDom = webViews$1 => {
|
|
3135
2852
|
const heading = webViews();
|
|
3136
2853
|
return [{
|
|
3137
|
-
|
|
2854
|
+
childCount: 2,
|
|
3138
2855
|
className: FeatureContent,
|
|
3139
|
-
|
|
2856
|
+
type: Div
|
|
3140
2857
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
3141
|
-
|
|
3142
|
-
|
|
2858
|
+
childCount: webViews$1.length,
|
|
2859
|
+
type: Div
|
|
3143
2860
|
}, ...webViews$1.flatMap(getWebViewVirtualDom)];
|
|
3144
2861
|
};
|
|
3145
2862
|
|
|
@@ -3149,60 +2866,60 @@ const getWebViewsVirtualDom = state => {
|
|
|
3149
2866
|
|
|
3150
2867
|
const registerAllFeatures = () => {
|
|
3151
2868
|
register$1({
|
|
3152
|
-
id: Theme,
|
|
3153
|
-
getLabel: theme,
|
|
3154
|
-
isEnabled: featureThemeEnabled,
|
|
3155
2869
|
getDetails: getThemeDetails,
|
|
3156
|
-
|
|
2870
|
+
getLabel: theme,
|
|
2871
|
+
getVirtualDom: getThemeVirtualDom,
|
|
2872
|
+
id: Theme,
|
|
2873
|
+
isEnabled: featureThemeEnabled
|
|
3157
2874
|
});
|
|
3158
2875
|
register$1({
|
|
3159
|
-
id: Commands,
|
|
3160
|
-
getLabel: commands$1,
|
|
3161
|
-
isEnabled: featureCommandsEnabled,
|
|
3162
2876
|
getDetails: getCommandsDetails,
|
|
3163
|
-
|
|
2877
|
+
getLabel: commands$1,
|
|
2878
|
+
getVirtualDom: getCommandsVirtualDom,
|
|
2879
|
+
id: Commands,
|
|
2880
|
+
isEnabled: featureCommandsEnabled
|
|
3164
2881
|
});
|
|
3165
2882
|
register$1({
|
|
3166
|
-
id: Settings,
|
|
3167
|
-
getLabel: settings,
|
|
3168
|
-
isEnabled: featureSettingsEnabled,
|
|
3169
2883
|
getDetails: getSettingsDetails,
|
|
3170
|
-
|
|
2884
|
+
getLabel: settings,
|
|
2885
|
+
getVirtualDom: getSettingsVirtualDom,
|
|
2886
|
+
id: Settings,
|
|
2887
|
+
isEnabled: featureSettingsEnabled
|
|
3171
2888
|
});
|
|
3172
2889
|
register$1({
|
|
3173
|
-
id: JsonValidation,
|
|
3174
|
-
getLabel: jsonValidation,
|
|
3175
|
-
isEnabled: featureJsonValidationEnabled,
|
|
3176
2890
|
getDetails: getJsonValidationDetails,
|
|
3177
|
-
|
|
2891
|
+
getLabel: jsonValidation,
|
|
2892
|
+
getVirtualDom: getJsonValidationVirtualDom,
|
|
2893
|
+
id: JsonValidation,
|
|
2894
|
+
isEnabled: featureJsonValidationEnabled
|
|
3178
2895
|
});
|
|
3179
2896
|
register$1({
|
|
3180
|
-
id: ProgrammingLanguages,
|
|
3181
|
-
getLabel: programmingLanguages,
|
|
3182
|
-
isEnabled: featureProgrammingLanguagesEnabled,
|
|
3183
2897
|
getDetails: getFeatureDetailsProgrammingLanguages,
|
|
3184
|
-
|
|
2898
|
+
getLabel: programmingLanguages,
|
|
2899
|
+
getVirtualDom: getProgrammingLanguagesVirtualDom,
|
|
2900
|
+
id: ProgrammingLanguages,
|
|
2901
|
+
isEnabled: featureProgrammingLanguagesEnabled
|
|
3185
2902
|
});
|
|
3186
2903
|
register$1({
|
|
3187
|
-
id: WebViews,
|
|
3188
|
-
getLabel: webViews,
|
|
3189
|
-
isEnabled: featureWebViewsEnabled,
|
|
3190
2904
|
getDetails: getWebViewsDetails,
|
|
3191
|
-
|
|
2905
|
+
getLabel: webViews,
|
|
2906
|
+
getVirtualDom: getWebViewsVirtualDom,
|
|
2907
|
+
id: WebViews,
|
|
2908
|
+
isEnabled: featureWebViewsEnabled
|
|
3192
2909
|
});
|
|
3193
2910
|
register$1({
|
|
3194
|
-
id: ActivationEvents,
|
|
3195
|
-
getLabel: activationEvents,
|
|
3196
|
-
isEnabled: featureActivationEventsEnabled,
|
|
3197
2911
|
getDetails: getActivationEventsDetails,
|
|
3198
|
-
|
|
2912
|
+
getLabel: activationEvents,
|
|
2913
|
+
getVirtualDom: getActivationEventsVirtualDom,
|
|
2914
|
+
id: ActivationEvents,
|
|
2915
|
+
isEnabled: featureActivationEventsEnabled
|
|
3199
2916
|
});
|
|
3200
2917
|
register$1({
|
|
3201
|
-
id: RuntimeStatus,
|
|
3202
|
-
getLabel: runtimeStatus,
|
|
3203
|
-
isEnabled: featureRuntimeStatusEnabled,
|
|
3204
2918
|
getDetails: getRuntimeStatusDetails,
|
|
3205
|
-
|
|
2919
|
+
getLabel: runtimeStatus,
|
|
2920
|
+
getVirtualDom: getRuntimeStatusVirtualDom,
|
|
2921
|
+
id: RuntimeStatus,
|
|
2922
|
+
isEnabled: featureRuntimeStatusEnabled
|
|
3206
2923
|
});
|
|
3207
2924
|
};
|
|
3208
2925
|
|
|
@@ -3239,10 +2956,11 @@ const create$1 = () => {
|
|
|
3239
2956
|
wrapCommand(fn) {
|
|
3240
2957
|
const wrapped = async (uid, ...args) => {
|
|
3241
2958
|
const {
|
|
2959
|
+
oldState,
|
|
3242
2960
|
newState
|
|
3243
2961
|
} = states[uid];
|
|
3244
2962
|
const newerState = await fn(newState, ...args);
|
|
3245
|
-
if (newState === newerState) {
|
|
2963
|
+
if (oldState === newerState || newState === newerState) {
|
|
3246
2964
|
return;
|
|
3247
2965
|
}
|
|
3248
2966
|
const latest = states[uid];
|
|
@@ -3290,27 +3008,6 @@ const terminate = () => {
|
|
|
3290
3008
|
globalThis.close();
|
|
3291
3009
|
};
|
|
3292
3010
|
|
|
3293
|
-
/* eslint-disable unicorn/prefer-export-from */
|
|
3294
|
-
|
|
3295
|
-
const {
|
|
3296
|
-
disableExtension: disableExtension$1,
|
|
3297
|
-
enableExtension: enableExtension$1,
|
|
3298
|
-
getAllExtensions: getAllExtensions$1,
|
|
3299
|
-
getExtension: getExtension$2,
|
|
3300
|
-
invoke: invoke$1,
|
|
3301
|
-
openExtensionSearch: openExtensionSearch$1,
|
|
3302
|
-
openNativeFolder,
|
|
3303
|
-
openUrl: openUrl$1,
|
|
3304
|
-
sendMessagePortToExtensionHostWorker: sendMessagePortToExtensionHostWorker$1,
|
|
3305
|
-
sendMessagePortToFileSystemWorker: sendMessagePortToFileSystemWorker$1,
|
|
3306
|
-
sendMessagePortToMarkdownWorker: sendMessagePortToMarkdownWorker$1,
|
|
3307
|
-
set: set$2,
|
|
3308
|
-
setColorTheme: setColorTheme$1,
|
|
3309
|
-
setExtensionsSearchValue,
|
|
3310
|
-
uninstallExtension,
|
|
3311
|
-
writeClipBoardImage,
|
|
3312
|
-
writeClipBoardText} = RendererWorker;
|
|
3313
|
-
|
|
3314
3011
|
const writeClipboardImage = async blob => {
|
|
3315
3012
|
await writeClipBoardImage(blob);
|
|
3316
3013
|
};
|
|
@@ -3321,10 +3018,11 @@ const writeText = async text => {
|
|
|
3321
3018
|
/* eslint-disable unicorn/prefer-export-from */
|
|
3322
3019
|
|
|
3323
3020
|
const {
|
|
3324
|
-
set: set$1,
|
|
3325
3021
|
exists,
|
|
3022
|
+
invoke,
|
|
3326
3023
|
readFile: readFile$1,
|
|
3327
|
-
|
|
3024
|
+
set: set$1
|
|
3025
|
+
} = FileSystemWorker;
|
|
3328
3026
|
const readFileAsBlob = async uri => {
|
|
3329
3027
|
// TODO maybe readAsObjectUrl?
|
|
3330
3028
|
// @ts-ignore
|
|
@@ -3364,13 +3062,13 @@ const copyReadmeLink = async (state, href) => {
|
|
|
3364
3062
|
};
|
|
3365
3063
|
|
|
3366
3064
|
const {
|
|
3065
|
+
dispose: dispose$1,
|
|
3367
3066
|
get,
|
|
3067
|
+
getCommandIds,
|
|
3068
|
+
registerCommands,
|
|
3368
3069
|
set,
|
|
3369
|
-
dispose: dispose$1,
|
|
3370
3070
|
wrapCommand,
|
|
3371
|
-
wrapGetter
|
|
3372
|
-
getCommandIds,
|
|
3373
|
-
registerCommands
|
|
3071
|
+
wrapGetter
|
|
3374
3072
|
} = create$1();
|
|
3375
3073
|
|
|
3376
3074
|
const create = (uid, uri, x, y, width, height, platform, assetDir) => {
|
|
@@ -3425,6 +3123,7 @@ const create = (uid, uri, x, y, width, height, platform, assetDir) => {
|
|
|
3425
3123
|
settingsButtonEnabled: false,
|
|
3426
3124
|
showAdditionalDetailsBreakpoint: 700,
|
|
3427
3125
|
showSideBar: true,
|
|
3126
|
+
showSizeLink: false,
|
|
3428
3127
|
sideBarWidth: 0,
|
|
3429
3128
|
sizeOnDisk: 0,
|
|
3430
3129
|
sizeValue: 0,
|
|
@@ -3435,8 +3134,7 @@ const create = (uid, uri, x, y, width, height, platform, assetDir) => {
|
|
|
3435
3134
|
uri,
|
|
3436
3135
|
wasActivatedByEvent: '',
|
|
3437
3136
|
webViews: [],
|
|
3438
|
-
width
|
|
3439
|
-
showSizeLink: false
|
|
3137
|
+
width
|
|
3440
3138
|
};
|
|
3441
3139
|
set(uid, state, state);
|
|
3442
3140
|
};
|
|
@@ -3470,8 +3168,8 @@ const numbers = [RenderItems, RenderFocus, RenderScrollTop, RenderCss];
|
|
|
3470
3168
|
|
|
3471
3169
|
const diff2 = uid => {
|
|
3472
3170
|
const {
|
|
3473
|
-
|
|
3474
|
-
|
|
3171
|
+
newState,
|
|
3172
|
+
oldState
|
|
3475
3173
|
} = get(uid);
|
|
3476
3174
|
const diffResult = [];
|
|
3477
3175
|
for (let i = 0; i < modules.length; i++) {
|
|
@@ -3496,17 +3194,17 @@ const executeCopy = async state => {
|
|
|
3496
3194
|
|
|
3497
3195
|
const getMenuEntriesImage = (state, props) => {
|
|
3498
3196
|
return [{
|
|
3499
|
-
|
|
3500
|
-
label: copyImage$1(),
|
|
3501
|
-
flags: None$2,
|
|
3197
|
+
args: [],
|
|
3502
3198
|
command: 'ExtensionDetail.copyImage',
|
|
3503
|
-
args: []
|
|
3504
|
-
}, {
|
|
3505
|
-
id: 'copyImage',
|
|
3506
|
-
label: copyImageUrl$1(),
|
|
3507
3199
|
flags: None$2,
|
|
3200
|
+
id: 'copyImage',
|
|
3201
|
+
label: copyImage$1()
|
|
3202
|
+
}, {
|
|
3203
|
+
args: [],
|
|
3508
3204
|
command: 'ExtensionDetail.copyImageUrl',
|
|
3509
|
-
|
|
3205
|
+
flags: None$2,
|
|
3206
|
+
id: 'copyImage',
|
|
3207
|
+
label: copyImageUrl$1()
|
|
3510
3208
|
}];
|
|
3511
3209
|
};
|
|
3512
3210
|
|
|
@@ -3515,21 +3213,21 @@ const getMenuEntries2 = (state, props) => {
|
|
|
3515
3213
|
return getMenuEntriesImage();
|
|
3516
3214
|
}
|
|
3517
3215
|
return [{
|
|
3518
|
-
|
|
3519
|
-
label: copy$1(),
|
|
3520
|
-
flags: None$2,
|
|
3216
|
+
args: [],
|
|
3521
3217
|
command: 'ExtensionDetail.executeCopy',
|
|
3522
|
-
|
|
3218
|
+
flags: None$2,
|
|
3219
|
+
id: 'copy',
|
|
3220
|
+
label: copy$1()
|
|
3523
3221
|
}];
|
|
3524
3222
|
};
|
|
3525
3223
|
|
|
3526
3224
|
const None = 0;
|
|
3527
3225
|
|
|
3528
3226
|
const getCopyMenuEntry = () => ({
|
|
3529
|
-
|
|
3530
|
-
label: copy$1(),
|
|
3227
|
+
command: 'ClipBoard.execCopy',
|
|
3531
3228
|
flags: None,
|
|
3532
|
-
|
|
3229
|
+
id: 'copy',
|
|
3230
|
+
label: copy$1()
|
|
3533
3231
|
});
|
|
3534
3232
|
|
|
3535
3233
|
const getImageMenuEntries = props => {
|
|
@@ -3537,17 +3235,17 @@ const getImageMenuEntries = props => {
|
|
|
3537
3235
|
return [];
|
|
3538
3236
|
}
|
|
3539
3237
|
return [{
|
|
3540
|
-
|
|
3541
|
-
label: openImageInNewTab$1(),
|
|
3542
|
-
flags: None,
|
|
3238
|
+
args: [props.url || ''],
|
|
3543
3239
|
command: 'Open.openUrl',
|
|
3544
|
-
args: [props.url || '']
|
|
3545
|
-
}, {
|
|
3546
|
-
id: 'saveImageAs',
|
|
3547
|
-
label: saveImageAs(),
|
|
3548
3240
|
flags: None,
|
|
3241
|
+
id: 'openImageInNewTab',
|
|
3242
|
+
label: openImageInNewTab$1()
|
|
3243
|
+
}, {
|
|
3244
|
+
args: ['image.png', props.url || ''],
|
|
3549
3245
|
command: 'SaveFileAs.saveFileAs',
|
|
3550
|
-
|
|
3246
|
+
flags: None,
|
|
3247
|
+
id: 'saveImageAs',
|
|
3248
|
+
label: saveImageAs()
|
|
3551
3249
|
}];
|
|
3552
3250
|
};
|
|
3553
3251
|
|
|
@@ -3556,11 +3254,11 @@ const getLinkMenuEntries = props => {
|
|
|
3556
3254
|
return [];
|
|
3557
3255
|
}
|
|
3558
3256
|
return [{
|
|
3559
|
-
|
|
3560
|
-
label: openInNewTab(),
|
|
3561
|
-
flags: None,
|
|
3257
|
+
args: [props.url || ''],
|
|
3562
3258
|
command: 'Open.openUrl',
|
|
3563
|
-
|
|
3259
|
+
flags: None,
|
|
3260
|
+
id: 'openInNewTab',
|
|
3261
|
+
label: openInNewTab()
|
|
3564
3262
|
}];
|
|
3565
3263
|
};
|
|
3566
3264
|
|
|
@@ -3572,39 +3270,39 @@ const getMenuIds = () => {
|
|
|
3572
3270
|
};
|
|
3573
3271
|
|
|
3574
3272
|
const getMenuEntriesReadme = () => [{
|
|
3575
|
-
|
|
3576
|
-
label: copy$1(),
|
|
3577
|
-
flags: None$2,
|
|
3273
|
+
args: [],
|
|
3578
3274
|
command: 'ExtensionDetail.copyReadmeText',
|
|
3579
|
-
|
|
3275
|
+
flags: None$2,
|
|
3276
|
+
id: 'copy',
|
|
3277
|
+
label: copy$1()
|
|
3580
3278
|
}];
|
|
3581
3279
|
|
|
3582
3280
|
const ExtensionDetailIconContextMenu$1 = 4091;
|
|
3583
3281
|
const getMenus = () => {
|
|
3584
3282
|
return [{
|
|
3585
|
-
|
|
3586
|
-
|
|
3283
|
+
entries: getMenuEntriesReadme(),
|
|
3284
|
+
id: ExtensionDetailReadme
|
|
3587
3285
|
}, {
|
|
3588
|
-
id: ExtensionDetailIconContextMenu$1,
|
|
3589
3286
|
entries: [{
|
|
3590
|
-
|
|
3591
|
-
label: openImageInNewTab$1(),
|
|
3592
|
-
flags: None,
|
|
3287
|
+
args: [],
|
|
3593
3288
|
command: 'ExtensionDetail.openImageInNewTab',
|
|
3594
|
-
args: []
|
|
3595
|
-
}, {
|
|
3596
|
-
id: 'copyImage',
|
|
3597
|
-
label: copyImage$1(),
|
|
3598
3289
|
flags: None,
|
|
3599
|
-
|
|
3600
|
-
|
|
3290
|
+
id: 'openImageInNewTab',
|
|
3291
|
+
label: openImageInNewTab$1()
|
|
3601
3292
|
}, {
|
|
3602
|
-
|
|
3603
|
-
|
|
3293
|
+
args: [],
|
|
3294
|
+
command: 'ExtensionDetail.copyImage',
|
|
3604
3295
|
flags: None,
|
|
3296
|
+
id: 'copyImage',
|
|
3297
|
+
label: copyImage$1()
|
|
3298
|
+
}, {
|
|
3299
|
+
args: [],
|
|
3605
3300
|
command: 'ExtensionDetail.copyImageUrl',
|
|
3606
|
-
|
|
3607
|
-
|
|
3301
|
+
flags: None,
|
|
3302
|
+
id: 'copyImageUrl',
|
|
3303
|
+
label: copyImageUrl$1()
|
|
3304
|
+
}],
|
|
3305
|
+
id: ExtensionDetailIconContextMenu$1
|
|
3608
3306
|
}];
|
|
3609
3307
|
};
|
|
3610
3308
|
|
|
@@ -3612,6 +3310,10 @@ const handleAdditionalDetailContextMenu = state => {
|
|
|
3612
3310
|
return state;
|
|
3613
3311
|
};
|
|
3614
3312
|
|
|
3313
|
+
const getCategorySearchValue = categoryId => {
|
|
3314
|
+
return `@category:"${categoryId}"`;
|
|
3315
|
+
};
|
|
3316
|
+
|
|
3615
3317
|
const openExtensionSearch = async searchValue => {
|
|
3616
3318
|
await openExtensionSearch$1();
|
|
3617
3319
|
await setExtensionsSearchValue(searchValue);
|
|
@@ -3621,7 +3323,7 @@ const handleClickCategory = async (state, categoryId) => {
|
|
|
3621
3323
|
if (!categoryId) {
|
|
3622
3324
|
return state;
|
|
3623
3325
|
}
|
|
3624
|
-
const searchValue =
|
|
3326
|
+
const searchValue = getCategorySearchValue(categoryId);
|
|
3625
3327
|
await openExtensionSearch(searchValue);
|
|
3626
3328
|
return state;
|
|
3627
3329
|
};
|
|
@@ -3665,25 +3367,25 @@ const getExtension = async (id, platform) => {
|
|
|
3665
3367
|
|
|
3666
3368
|
const getExtensionDetailButtons = (hasColorTheme, isBuiltin, isDisabled) => {
|
|
3667
3369
|
const allActions = [{
|
|
3668
|
-
label: setColorTheme$3(),
|
|
3669
|
-
onClick: HandleClickSetColorTheme,
|
|
3670
3370
|
enabled: hasColorTheme,
|
|
3671
|
-
|
|
3371
|
+
label: setColorTheme$2(),
|
|
3372
|
+
name: SetColorTheme,
|
|
3373
|
+
onClick: HandleClickSetColorTheme
|
|
3672
3374
|
}, {
|
|
3673
|
-
label: enable(),
|
|
3674
|
-
onClick: HandleClickEnable,
|
|
3675
3375
|
enabled: isDisabled,
|
|
3676
|
-
|
|
3376
|
+
label: enable(),
|
|
3377
|
+
name: Enable,
|
|
3378
|
+
onClick: HandleClickEnable
|
|
3677
3379
|
}, {
|
|
3678
|
-
label: disable(),
|
|
3679
|
-
onClick: HandleClickDisable,
|
|
3680
3380
|
enabled: !isDisabled,
|
|
3681
|
-
|
|
3381
|
+
label: disable(),
|
|
3382
|
+
name: Disable,
|
|
3383
|
+
onClick: HandleClickDisable
|
|
3682
3384
|
}, {
|
|
3683
|
-
label: uninstall(),
|
|
3684
|
-
onClick: HandleClickUninstall,
|
|
3685
3385
|
enabled: !isBuiltin,
|
|
3686
|
-
|
|
3386
|
+
label: uninstall(),
|
|
3387
|
+
name: Uninstall,
|
|
3388
|
+
onClick: HandleClickUninstall
|
|
3687
3389
|
}];
|
|
3688
3390
|
const filteredButtons = allActions.filter(button => button.enabled);
|
|
3689
3391
|
return filteredButtons;
|
|
@@ -3692,8 +3394,8 @@ const getExtensionDetailButtons = (hasColorTheme, isBuiltin, isDisabled) => {
|
|
|
3692
3394
|
const updateExtensionStatus = async (state, updateFunction) => {
|
|
3693
3395
|
const {
|
|
3694
3396
|
extensionId,
|
|
3695
|
-
|
|
3696
|
-
|
|
3397
|
+
hasColorTheme,
|
|
3398
|
+
platform
|
|
3697
3399
|
} = state;
|
|
3698
3400
|
const error = await updateFunction(extensionId);
|
|
3699
3401
|
if (error) {
|
|
@@ -3704,8 +3406,8 @@ const updateExtensionStatus = async (state, updateFunction) => {
|
|
|
3704
3406
|
const buttons = getExtensionDetailButtons(hasColorTheme, false, disabled);
|
|
3705
3407
|
return {
|
|
3706
3408
|
...state,
|
|
3707
|
-
|
|
3708
|
-
|
|
3409
|
+
buttons,
|
|
3410
|
+
disabled: extension?.disabled
|
|
3709
3411
|
};
|
|
3710
3412
|
};
|
|
3711
3413
|
|
|
@@ -3726,9 +3428,9 @@ const selectFeature = async (state, name) => {
|
|
|
3726
3428
|
return state;
|
|
3727
3429
|
}
|
|
3728
3430
|
const {
|
|
3729
|
-
features,
|
|
3730
|
-
extension,
|
|
3731
3431
|
baseUrl,
|
|
3432
|
+
extension,
|
|
3433
|
+
features,
|
|
3732
3434
|
locationProtocol
|
|
3733
3435
|
} = state;
|
|
3734
3436
|
const newFeatures = features.map(feature => {
|
|
@@ -3748,8 +3450,8 @@ const selectFeature = async (state, name) => {
|
|
|
3748
3450
|
return {
|
|
3749
3451
|
...state,
|
|
3750
3452
|
...partialNewState,
|
|
3751
|
-
|
|
3752
|
-
|
|
3453
|
+
features: newFeatures,
|
|
3454
|
+
selectedFeature: name
|
|
3753
3455
|
};
|
|
3754
3456
|
};
|
|
3755
3457
|
|
|
@@ -3837,8 +3539,8 @@ const extensionTheme = assetDir => {
|
|
|
3837
3539
|
|
|
3838
3540
|
const handleIconError = state => {
|
|
3839
3541
|
const {
|
|
3840
|
-
|
|
3841
|
-
|
|
3542
|
+
assetDir,
|
|
3543
|
+
iconSrc
|
|
3842
3544
|
} = state;
|
|
3843
3545
|
if (iconSrc === extensionDefaultIcon(assetDir)) {
|
|
3844
3546
|
return state;
|
|
@@ -3875,7 +3577,7 @@ const handleReadmeClick = async (state, nodeName, href) => {
|
|
|
3875
3577
|
}
|
|
3876
3578
|
// TODO what to do about relative links? open them in editor?
|
|
3877
3579
|
// TODO what to do about mail links?
|
|
3878
|
-
await openUrl$
|
|
3580
|
+
await openUrl$1(href);
|
|
3879
3581
|
// TODO check node name and href
|
|
3880
3582
|
return state;
|
|
3881
3583
|
};
|
|
@@ -3886,9 +3588,9 @@ const handleReadmeContextMenu = async (state, x, y, nodeName, href) => {
|
|
|
3886
3588
|
} = state;
|
|
3887
3589
|
// TODO maybe also pass other args
|
|
3888
3590
|
await show2(uid, ExtensionDetailReadme, x, y, {
|
|
3591
|
+
href,
|
|
3889
3592
|
menuId: ExtensionDetailReadme,
|
|
3890
|
-
nodeName
|
|
3891
|
-
href
|
|
3593
|
+
nodeName
|
|
3892
3594
|
});
|
|
3893
3595
|
// TODO
|
|
3894
3596
|
return state;
|
|
@@ -3944,10 +3646,10 @@ const loadChangelogContent = async path => {
|
|
|
3944
3646
|
|
|
3945
3647
|
const selectTabChangelog = async state => {
|
|
3946
3648
|
const {
|
|
3947
|
-
extension,
|
|
3948
3649
|
baseUrl,
|
|
3949
|
-
|
|
3950
|
-
locationProtocol
|
|
3650
|
+
extension,
|
|
3651
|
+
locationProtocol,
|
|
3652
|
+
tabs
|
|
3951
3653
|
} = state;
|
|
3952
3654
|
const changelogContent = await loadChangelogContent(extension.path); // TODO use uri
|
|
3953
3655
|
const changelogMarkdownHtml = await renderMarkdown(changelogContent, {
|
|
@@ -3963,8 +3665,8 @@ const selectTabChangelog = async state => {
|
|
|
3963
3665
|
});
|
|
3964
3666
|
return {
|
|
3965
3667
|
...state,
|
|
3966
|
-
selectedTab: Changelog,
|
|
3967
3668
|
changelogVirtualDom: changelogDom,
|
|
3669
|
+
selectedTab: Changelog,
|
|
3968
3670
|
tabs: newTabs
|
|
3969
3671
|
};
|
|
3970
3672
|
};
|
|
@@ -3991,9 +3693,9 @@ const loadReadmeContent = async readmeUrl => {
|
|
|
3991
3693
|
const selectTabDetails = async state => {
|
|
3992
3694
|
const {
|
|
3993
3695
|
baseUrl,
|
|
3696
|
+
locationProtocol,
|
|
3994
3697
|
readmeUrl,
|
|
3995
|
-
tabs
|
|
3996
|
-
locationProtocol
|
|
3698
|
+
tabs
|
|
3997
3699
|
} = state;
|
|
3998
3700
|
const readmeContent = await loadReadmeContent(readmeUrl);
|
|
3999
3701
|
const readmeHtml = await renderMarkdown(readmeContent, {
|
|
@@ -4010,20 +3712,20 @@ const selectTabDetails = async state => {
|
|
|
4010
3712
|
});
|
|
4011
3713
|
return {
|
|
4012
3714
|
...state,
|
|
4013
|
-
selectedTab: Details,
|
|
4014
3715
|
detailsVirtualDom: detailsDom,
|
|
3716
|
+
selectedTab: Details,
|
|
4015
3717
|
tabs: newTabs
|
|
4016
3718
|
};
|
|
4017
3719
|
};
|
|
4018
3720
|
|
|
4019
3721
|
const selectTabFeatures = async state => {
|
|
4020
3722
|
const {
|
|
4021
|
-
extension,
|
|
4022
3723
|
baseUrl,
|
|
4023
|
-
|
|
3724
|
+
extension,
|
|
4024
3725
|
features,
|
|
4025
|
-
|
|
4026
|
-
|
|
3726
|
+
locationProtocol,
|
|
3727
|
+
selectedFeature,
|
|
3728
|
+
tabs
|
|
4027
3729
|
} = state;
|
|
4028
3730
|
if (features.length === 0) {
|
|
4029
3731
|
return state;
|
|
@@ -4039,8 +3741,8 @@ const selectTabFeatures = async state => {
|
|
|
4039
3741
|
});
|
|
4040
3742
|
return {
|
|
4041
3743
|
...state,
|
|
4042
|
-
selectedTab: Features,
|
|
4043
3744
|
selectedFeature: features[0].id || '',
|
|
3745
|
+
selectedTab: Features,
|
|
4044
3746
|
tabs: newTabs,
|
|
4045
3747
|
...partialNewState
|
|
4046
3748
|
};
|
|
@@ -4048,12 +3750,12 @@ const selectTabFeatures = async state => {
|
|
|
4048
3750
|
|
|
4049
3751
|
const getSelectTabHandler = name => {
|
|
4050
3752
|
switch (name) {
|
|
3753
|
+
case Changelog:
|
|
3754
|
+
return selectTabChangelog;
|
|
4051
3755
|
case Details:
|
|
4052
3756
|
return selectTabDetails;
|
|
4053
3757
|
case Features:
|
|
4054
3758
|
return selectTabFeatures;
|
|
4055
|
-
case Changelog:
|
|
4056
|
-
return selectTabChangelog;
|
|
4057
3759
|
default:
|
|
4058
3760
|
return selectTabDefault;
|
|
4059
3761
|
}
|
|
@@ -4074,27 +3776,26 @@ const getSizeEntries = (showSizeLink, displaySize, extensionUri) => {
|
|
|
4074
3776
|
}
|
|
4075
3777
|
return [{
|
|
4076
3778
|
key: size(),
|
|
4077
|
-
value: displaySize,
|
|
4078
3779
|
onClick: HandleClickSize,
|
|
4079
|
-
title: extensionUri
|
|
3780
|
+
title: extensionUri,
|
|
3781
|
+
value: displaySize
|
|
4080
3782
|
}];
|
|
4081
3783
|
};
|
|
4082
3784
|
|
|
4083
3785
|
const getInstallationEntries = (displaySize, extensionId, extensionVersion, extensionUri, showSizeLink) => {
|
|
4084
3786
|
const entries = [{
|
|
3787
|
+
code: true,
|
|
4085
3788
|
key: identifier(),
|
|
4086
|
-
value: extensionId,
|
|
4087
3789
|
odd: true,
|
|
4088
|
-
|
|
3790
|
+
value: extensionId
|
|
4089
3791
|
}, {
|
|
3792
|
+
code: true,
|
|
4090
3793
|
key: version(),
|
|
4091
|
-
value: extensionVersion
|
|
4092
|
-
code: true
|
|
3794
|
+
value: extensionVersion
|
|
4093
3795
|
}, {
|
|
4094
3796
|
key: lastUpdated(),
|
|
4095
|
-
|
|
4096
|
-
// TODO get this from somewhere
|
|
4097
|
-
odd: true
|
|
3797
|
+
odd: true,
|
|
3798
|
+
value: 'n/a' // TODO get this from somewhere
|
|
4098
3799
|
}, ...getSizeEntries(showSizeLink, displaySize, extensionUri)];
|
|
4099
3800
|
return entries;
|
|
4100
3801
|
};
|
|
@@ -4103,8 +3804,8 @@ const hideSizeLink = state => {
|
|
|
4103
3804
|
const {
|
|
4104
3805
|
displaySize,
|
|
4105
3806
|
extensionId,
|
|
4106
|
-
|
|
4107
|
-
|
|
3807
|
+
extensionUri,
|
|
3808
|
+
extensionVersion
|
|
4108
3809
|
} = state;
|
|
4109
3810
|
const newShowSizeLink = false;
|
|
4110
3811
|
const installationEntries = getInstallationEntries(displaySize, extensionId, extensionVersion, extensionUri, newShowSizeLink);
|
|
@@ -4133,7 +3834,7 @@ const createExtensionHostWorkerRpc = async () => {
|
|
|
4133
3834
|
|
|
4134
3835
|
const initializeExtensionHostWorker = async () => {
|
|
4135
3836
|
const rpc = await createExtensionHostWorkerRpc();
|
|
4136
|
-
set$
|
|
3837
|
+
set$4(rpc);
|
|
4137
3838
|
};
|
|
4138
3839
|
|
|
4139
3840
|
const sendMessagePortToFileSystemWorker = async port => {
|
|
@@ -4175,7 +3876,7 @@ const createMarkdownWorkerRpc = async () => {
|
|
|
4175
3876
|
|
|
4176
3877
|
const initializeMarkdownWorker = async () => {
|
|
4177
3878
|
const rpc = await createMarkdownWorkerRpc();
|
|
4178
|
-
set$
|
|
3879
|
+
set$3(rpc);
|
|
4179
3880
|
};
|
|
4180
3881
|
|
|
4181
3882
|
const initialize = async () => {
|
|
@@ -4205,8 +3906,8 @@ const getRemoteSrc = uri => {
|
|
|
4205
3906
|
|
|
4206
3907
|
const getBaseUrl = (extensionPath, platform) => {
|
|
4207
3908
|
switch (platform) {
|
|
4208
|
-
case Remote:
|
|
4209
3909
|
case Electron:
|
|
3910
|
+
case Remote:
|
|
4210
3911
|
return getRemoteSrc(extensionPath + '/');
|
|
4211
3912
|
default:
|
|
4212
3913
|
return extensionPath;
|
|
@@ -4252,20 +3953,20 @@ const getSideBarWidth = width => {
|
|
|
4252
3953
|
|
|
4253
3954
|
const getTabs = (selectedTab, hasReadme, hasFeatures, hasChangelog) => {
|
|
4254
3955
|
const tabs = [{
|
|
3956
|
+
enabled: hasReadme,
|
|
4255
3957
|
label: details(),
|
|
4256
3958
|
name: Details,
|
|
4257
|
-
selected: selectedTab === Details
|
|
4258
|
-
enabled: hasReadme
|
|
3959
|
+
selected: selectedTab === Details
|
|
4259
3960
|
}, {
|
|
3961
|
+
enabled: hasFeatures,
|
|
4260
3962
|
label: features$1(),
|
|
4261
3963
|
name: Features,
|
|
4262
|
-
selected: selectedTab === Features
|
|
4263
|
-
enabled: hasFeatures
|
|
3964
|
+
selected: selectedTab === Features
|
|
4264
3965
|
}, {
|
|
3966
|
+
enabled: hasChangelog,
|
|
4265
3967
|
label: changelog(),
|
|
4266
3968
|
name: Changelog,
|
|
4267
|
-
selected: selectedTab === Changelog
|
|
4268
|
-
enabled: hasChangelog
|
|
3969
|
+
selected: selectedTab === Changelog
|
|
4269
3970
|
}];
|
|
4270
3971
|
return tabs;
|
|
4271
3972
|
};
|
|
@@ -4572,8 +4273,8 @@ const getMarketplaceEntries = isBuiltin => {
|
|
|
4572
4273
|
}
|
|
4573
4274
|
return [{
|
|
4574
4275
|
key: published(),
|
|
4575
|
-
|
|
4576
|
-
|
|
4276
|
+
odd: true,
|
|
4277
|
+
value: 'n/a'
|
|
4577
4278
|
}, {
|
|
4578
4279
|
key: lastReleased(),
|
|
4579
4280
|
value: 'n/a'
|
|
@@ -4615,21 +4316,21 @@ const getResources = (isBuiltin, extension) => {
|
|
|
4615
4316
|
const licenseLink = getLicenseLink();
|
|
4616
4317
|
// TODO
|
|
4617
4318
|
return [{
|
|
4319
|
+
icon: 'LinkExternal',
|
|
4618
4320
|
label: marketplace(),
|
|
4619
|
-
url: '#'
|
|
4620
|
-
icon: 'LinkExternal'
|
|
4321
|
+
url: '#'
|
|
4621
4322
|
}, {
|
|
4323
|
+
icon: 'LinkExternal',
|
|
4622
4324
|
label: issues(),
|
|
4623
|
-
url: '#'
|
|
4624
|
-
icon: 'LinkExternal'
|
|
4325
|
+
url: '#'
|
|
4625
4326
|
}, {
|
|
4327
|
+
icon: 'Repo',
|
|
4626
4328
|
label: repository(),
|
|
4627
|
-
url: repositoryLink
|
|
4628
|
-
icon: 'Repo'
|
|
4329
|
+
url: repositoryLink
|
|
4629
4330
|
}, {
|
|
4331
|
+
icon: 'LinkExternal',
|
|
4630
4332
|
label: license(),
|
|
4631
|
-
url: licenseLink
|
|
4632
|
-
icon: 'LinkExternal'
|
|
4333
|
+
url: licenseLink
|
|
4633
4334
|
}];
|
|
4634
4335
|
};
|
|
4635
4336
|
|
|
@@ -4684,10 +4385,10 @@ const restoreState = savedState => {
|
|
|
4684
4385
|
const readmeScrollTop = getSavedReadmeScrollTop(savedState);
|
|
4685
4386
|
const changelogScrollTop = getSavedChangelogScrollTop(savedState);
|
|
4686
4387
|
return {
|
|
4687
|
-
|
|
4688
|
-
selectedTab,
|
|
4388
|
+
changelogScrollTop,
|
|
4689
4389
|
readmeScrollTop,
|
|
4690
|
-
|
|
4390
|
+
selectedFeature,
|
|
4391
|
+
selectedTab
|
|
4691
4392
|
};
|
|
4692
4393
|
};
|
|
4693
4394
|
|
|
@@ -4696,8 +4397,8 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
|
|
|
4696
4397
|
savedState = undefined;
|
|
4697
4398
|
}
|
|
4698
4399
|
const {
|
|
4699
|
-
|
|
4700
|
-
|
|
4400
|
+
uri,
|
|
4401
|
+
width
|
|
4701
4402
|
} = state;
|
|
4702
4403
|
const id = getExtensionIdFromUri(uri);
|
|
4703
4404
|
const extension = await getExtension(id, platform);
|
|
@@ -4736,10 +4437,10 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
|
|
|
4736
4437
|
const buttons = getExtensionDetailButtons(hasColorTheme, isBuiltin, disabled);
|
|
4737
4438
|
const size = getViewletSize(width);
|
|
4738
4439
|
const {
|
|
4739
|
-
|
|
4740
|
-
selectedTab,
|
|
4440
|
+
changelogScrollTop,
|
|
4741
4441
|
readmeScrollTop,
|
|
4742
|
-
|
|
4442
|
+
selectedFeature,
|
|
4443
|
+
selectedTab
|
|
4743
4444
|
} = restoreState(savedState);
|
|
4744
4445
|
const features = getFeatures(selectedFeature || Theme, extension);
|
|
4745
4446
|
const hasFeatures = features.length > 0;
|
|
@@ -4748,12 +4449,12 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
|
|
|
4748
4449
|
const sizeValue = getViewletSize(width || 0);
|
|
4749
4450
|
const showSizeLink = platform !== Web$1;
|
|
4750
4451
|
const {
|
|
4452
|
+
categories,
|
|
4453
|
+
displaySize,
|
|
4454
|
+
folderSize,
|
|
4751
4455
|
installationEntries,
|
|
4752
4456
|
marketplaceEntries,
|
|
4753
|
-
|
|
4754
|
-
categories,
|
|
4755
|
-
resources,
|
|
4756
|
-
folderSize
|
|
4457
|
+
resources
|
|
4757
4458
|
} = await loadSideBarContent(extensionId, extensionVersion, extensionUri, isBuiltin, extension, showSizeLink);
|
|
4758
4459
|
const padding = getPadding(width);
|
|
4759
4460
|
const sideBarWidth = getSideBarWidth(width);
|
|
@@ -4826,16 +4527,16 @@ const createCss = object => {
|
|
|
4826
4527
|
|
|
4827
4528
|
const renderCss = (oldState, newState) => {
|
|
4828
4529
|
const {
|
|
4829
|
-
uid,
|
|
4830
4530
|
paddingLeft,
|
|
4831
4531
|
paddingRight,
|
|
4832
|
-
sideBarWidth
|
|
4532
|
+
sideBarWidth,
|
|
4533
|
+
uid
|
|
4833
4534
|
} = newState;
|
|
4834
4535
|
const css = createCss({
|
|
4536
|
+
ExtensionDetailMaxWidth: 1250,
|
|
4835
4537
|
ExtensionDetailPaddingLeft: paddingLeft,
|
|
4836
4538
|
ExtensionDetailPaddingRight: paddingRight,
|
|
4837
|
-
ExtensionDetailSideBarWidth: sideBarWidth
|
|
4838
|
-
ExtensionDetailMaxWidth: 1250
|
|
4539
|
+
ExtensionDetailSideBarWidth: sideBarWidth
|
|
4839
4540
|
});
|
|
4840
4541
|
return ['Viewlet.setCss', uid, css];
|
|
4841
4542
|
};
|
|
@@ -4844,21 +4545,21 @@ const getChangelogVirtualDom = changelogDom => {
|
|
|
4844
4545
|
// const notImplemented = ExtensionDetailStrings.notImplemented()
|
|
4845
4546
|
// TODO set tabpanel role
|
|
4846
4547
|
return [{
|
|
4847
|
-
|
|
4548
|
+
childCount: 1,
|
|
4848
4549
|
className: Changelog$1,
|
|
4849
|
-
|
|
4550
|
+
type: Div
|
|
4850
4551
|
}, ...changelogDom];
|
|
4851
4552
|
};
|
|
4852
4553
|
|
|
4853
4554
|
const getAdditionalDetailsEntryVirtualDom = (heading, items, renderer) => {
|
|
4854
4555
|
return [{
|
|
4855
|
-
|
|
4556
|
+
childCount: 2,
|
|
4856
4557
|
className: AdditionalDetailsEntry,
|
|
4857
|
-
|
|
4558
|
+
type: Div
|
|
4858
4559
|
}, {
|
|
4859
|
-
|
|
4560
|
+
childCount: 1,
|
|
4860
4561
|
className: AdditionalDetailsTitle,
|
|
4861
|
-
|
|
4562
|
+
type: Div
|
|
4862
4563
|
}, text(heading), ...renderer(items)];
|
|
4863
4564
|
};
|
|
4864
4565
|
|
|
@@ -4868,26 +4569,26 @@ const getCategoryVirtualDom = category => {
|
|
|
4868
4569
|
label
|
|
4869
4570
|
} = category;
|
|
4870
4571
|
return [{
|
|
4871
|
-
type: Button$1,
|
|
4872
|
-
className: Category,
|
|
4873
4572
|
childCount: 1,
|
|
4573
|
+
className: Category,
|
|
4574
|
+
name: id,
|
|
4874
4575
|
onClick: HandleClickCategory,
|
|
4875
|
-
|
|
4576
|
+
type: Button$1
|
|
4876
4577
|
}, text(label)];
|
|
4877
4578
|
};
|
|
4878
4579
|
|
|
4879
4580
|
const getCategoriesDom = categories => {
|
|
4880
4581
|
return [{
|
|
4881
|
-
|
|
4582
|
+
childCount: categories.length,
|
|
4882
4583
|
className: Categories,
|
|
4883
|
-
|
|
4584
|
+
type: Div
|
|
4884
4585
|
}, ...categories.flatMap(getCategoryVirtualDom)];
|
|
4885
4586
|
};
|
|
4886
4587
|
|
|
4887
4588
|
const parentNode = {
|
|
4888
|
-
|
|
4589
|
+
childCount: 1,
|
|
4889
4590
|
className: MoreInfoEntryKey,
|
|
4890
|
-
|
|
4591
|
+
type: Dt
|
|
4891
4592
|
};
|
|
4892
4593
|
const getMoreInfoEntryKeyVirtualDom = item => {
|
|
4893
4594
|
const {
|
|
@@ -4930,32 +4631,32 @@ const getExtraProps = (title, onClick) => {
|
|
|
4930
4631
|
};
|
|
4931
4632
|
const getMoreInfoEntryValueVirtualDom = item => {
|
|
4932
4633
|
const {
|
|
4933
|
-
value,
|
|
4934
|
-
onClick,
|
|
4935
4634
|
code,
|
|
4936
|
-
|
|
4635
|
+
onClick,
|
|
4636
|
+
title,
|
|
4637
|
+
value
|
|
4937
4638
|
} = item;
|
|
4938
4639
|
const type = getMoreInfoEntryValueTag(onClick, code);
|
|
4939
4640
|
const className = getMoreInfoEntryValueClassName(onClick, code);
|
|
4940
4641
|
const extraProps = getExtraProps(title, onClick);
|
|
4941
4642
|
return [{
|
|
4942
|
-
type,
|
|
4943
|
-
className,
|
|
4944
4643
|
childCount: 1,
|
|
4644
|
+
className,
|
|
4945
4645
|
onClick,
|
|
4646
|
+
type,
|
|
4946
4647
|
...extraProps
|
|
4947
4648
|
}, text(value)];
|
|
4948
4649
|
};
|
|
4949
4650
|
|
|
4950
4651
|
const parentNodeEven = {
|
|
4951
|
-
|
|
4652
|
+
childCount: 2,
|
|
4952
4653
|
className: MoreInfoEntry,
|
|
4953
|
-
|
|
4654
|
+
type: Div
|
|
4954
4655
|
};
|
|
4955
4656
|
const parentNodeOdd = {
|
|
4956
|
-
|
|
4657
|
+
childCount: 2,
|
|
4957
4658
|
className: mergeClassNames(MoreInfoEntry, MoreInfoEntryOdd),
|
|
4958
|
-
|
|
4659
|
+
type: Div
|
|
4959
4660
|
};
|
|
4960
4661
|
const getMoreInfoEntryVirtualDom = item => {
|
|
4961
4662
|
const {
|
|
@@ -4967,9 +4668,9 @@ const getMoreInfoEntryVirtualDom = item => {
|
|
|
4967
4668
|
|
|
4968
4669
|
const getMoreInfoVirtualDom = items => {
|
|
4969
4670
|
return [{
|
|
4970
|
-
|
|
4671
|
+
childCount: items.length,
|
|
4971
4672
|
className: MoreInfo,
|
|
4972
|
-
|
|
4673
|
+
type: Dl
|
|
4973
4674
|
}, ...items.flatMap(getMoreInfoEntryVirtualDom)];
|
|
4974
4675
|
};
|
|
4975
4676
|
|
|
@@ -4978,38 +4679,38 @@ const getIconDom = icon => {
|
|
|
4978
4679
|
return [];
|
|
4979
4680
|
}
|
|
4980
4681
|
return [{
|
|
4981
|
-
|
|
4682
|
+
childCount: 1,
|
|
4982
4683
|
className: ResourceIcon,
|
|
4983
|
-
|
|
4684
|
+
type: Div
|
|
4984
4685
|
}, {
|
|
4985
|
-
|
|
4686
|
+
childCount: 0,
|
|
4986
4687
|
className: mergeClassNames(MaskIcon, `MaskIcon${icon}`),
|
|
4987
|
-
|
|
4688
|
+
type: Div
|
|
4988
4689
|
}];
|
|
4989
4690
|
};
|
|
4990
4691
|
const getResourceLinkVirtualDom = resource => {
|
|
4991
4692
|
const {
|
|
4693
|
+
icon,
|
|
4992
4694
|
label,
|
|
4993
|
-
url
|
|
4994
|
-
icon
|
|
4695
|
+
url
|
|
4995
4696
|
} = resource;
|
|
4996
4697
|
const iconDom = getIconDom(icon);
|
|
4997
4698
|
const iconDomCount = iconDom.length > 0 ? 1 : 0;
|
|
4998
4699
|
return [{
|
|
4999
|
-
type: A,
|
|
5000
|
-
className: Resource,
|
|
5001
4700
|
childCount: 1 + iconDomCount,
|
|
5002
|
-
|
|
4701
|
+
className: Resource,
|
|
4702
|
+
href: url,
|
|
5003
4703
|
rel: 'noopener noreferrer',
|
|
5004
|
-
|
|
4704
|
+
target: '_blank',
|
|
4705
|
+
type: A
|
|
5005
4706
|
}, ...iconDom, text(label)];
|
|
5006
4707
|
};
|
|
5007
4708
|
|
|
5008
4709
|
const resourceNode = {
|
|
5009
|
-
|
|
5010
|
-
type: Div,
|
|
4710
|
+
childCount: 1,
|
|
5011
4711
|
className: Resource,
|
|
5012
|
-
|
|
4712
|
+
// TODO use link with url
|
|
4713
|
+
type: Div
|
|
5013
4714
|
};
|
|
5014
4715
|
const getResourceVirtualDom = resource => {
|
|
5015
4716
|
const {
|
|
@@ -5024,9 +4725,9 @@ const getResourceVirtualDom = resource => {
|
|
|
5024
4725
|
|
|
5025
4726
|
const getResourcesVirtualDom = resources => {
|
|
5026
4727
|
return [{
|
|
5027
|
-
|
|
4728
|
+
childCount: resources.length,
|
|
5028
4729
|
className: Resources,
|
|
5029
|
-
|
|
4730
|
+
type: Div
|
|
5030
4731
|
}, ...resources.flatMap(getResourceVirtualDom)];
|
|
5031
4732
|
};
|
|
5032
4733
|
|
|
@@ -5035,23 +4736,23 @@ const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, ent
|
|
|
5035
4736
|
return [];
|
|
5036
4737
|
}
|
|
5037
4738
|
return [{
|
|
5038
|
-
|
|
4739
|
+
childCount: 1,
|
|
5039
4740
|
className: Aside,
|
|
5040
|
-
|
|
4741
|
+
type: Aside$1
|
|
5041
4742
|
}, {
|
|
5042
|
-
|
|
4743
|
+
childCount: 4,
|
|
5043
4744
|
className: AdditionalDetails,
|
|
4745
|
+
onClick: HandleAdditionalDetailContextMenu,
|
|
5044
4746
|
tabIndex: 0,
|
|
5045
|
-
|
|
5046
|
-
onClick: HandleAdditionalDetailContextMenu
|
|
4747
|
+
type: Div
|
|
5047
4748
|
}, ...getAdditionalDetailsEntryVirtualDom(firstHeading, entries, getMoreInfoVirtualDom), ...getAdditionalDetailsEntryVirtualDom(secondHeading, secondEntries, getMoreInfoVirtualDom), ...getAdditionalDetailsEntryVirtualDom(thirdHeading, categories, getCategoriesDom), ...getAdditionalDetailsEntryVirtualDom(fourthHeading, resources, getResourcesVirtualDom)];
|
|
5048
4749
|
};
|
|
5049
4750
|
|
|
5050
4751
|
const getNoReadmeVirtualDom = () => {
|
|
5051
4752
|
return [{
|
|
5052
|
-
type: Div,
|
|
5053
4753
|
childCount: 1,
|
|
5054
|
-
className: Markdown
|
|
4754
|
+
className: Markdown,
|
|
4755
|
+
type: Div
|
|
5055
4756
|
}, text(noReadmeFound())];
|
|
5056
4757
|
};
|
|
5057
4758
|
|
|
@@ -5071,53 +4772,53 @@ const getDetailsVirtualDom = (sanitizedReadmeHtml, width, scrollToTopButtonEnabl
|
|
|
5071
4772
|
const childCount = getChildCount(showAdditionalDetails);
|
|
5072
4773
|
const contentDom = hasReadme ? sanitizedReadmeHtml : getNoReadmeVirtualDom();
|
|
5073
4774
|
const dom = [{
|
|
5074
|
-
type: Div,
|
|
5075
|
-
className: ExtensionDetailPanel,
|
|
5076
4775
|
childCount: childCount,
|
|
5077
|
-
|
|
4776
|
+
className: ExtensionDetailPanel,
|
|
4777
|
+
role: Panel,
|
|
4778
|
+
type: Div
|
|
5078
4779
|
}, ...contentDom, ...getAdditionalDetailsVirtualDom(showAdditionalDetails, firstHeading, installationEntries, secondHeading, marketplaceEntries, thirdHeading, categories$1, fourthHeading, resources$1)];
|
|
5079
4780
|
return dom;
|
|
5080
4781
|
};
|
|
5081
4782
|
|
|
5082
4783
|
const getFeatureListItemVirtualDom = feature => {
|
|
5083
4784
|
const {
|
|
4785
|
+
id,
|
|
5084
4786
|
label,
|
|
5085
|
-
selected
|
|
5086
|
-
id
|
|
4787
|
+
selected
|
|
5087
4788
|
} = feature;
|
|
5088
4789
|
const className = selected ? 'Feature FeatureSelected' : Feature;
|
|
5089
4790
|
return [{
|
|
5090
|
-
|
|
5091
|
-
type: Button$1,
|
|
5092
|
-
name: id,
|
|
4791
|
+
childCount: 1,
|
|
5093
4792
|
className,
|
|
5094
|
-
|
|
4793
|
+
name: id,
|
|
4794
|
+
// TODO use role list item or tab
|
|
4795
|
+
type: Button$1
|
|
5095
4796
|
}, text(label)];
|
|
5096
4797
|
};
|
|
5097
4798
|
|
|
5098
4799
|
const getFeatureListVirtualDom = features => {
|
|
5099
4800
|
return [{
|
|
5100
|
-
// TODO use either list or tabs role
|
|
5101
|
-
type: Div,
|
|
5102
|
-
className: FeaturesList,
|
|
5103
4801
|
childCount: features.length,
|
|
5104
|
-
|
|
4802
|
+
className: FeaturesList,
|
|
4803
|
+
onClick: HandleFeaturesClick,
|
|
4804
|
+
// TODO use either list or tabs role
|
|
4805
|
+
type: Div
|
|
5105
4806
|
}, ...features.flatMap(getFeatureListItemVirtualDom)];
|
|
5106
4807
|
};
|
|
5107
4808
|
|
|
5108
4809
|
const getFeaturesEmptyVirtualDom = () => {
|
|
5109
4810
|
const none$1 = none();
|
|
5110
4811
|
return [{
|
|
5111
|
-
|
|
4812
|
+
childCount: 1,
|
|
5112
4813
|
className: Features$1,
|
|
5113
|
-
|
|
4814
|
+
type: Div
|
|
5114
4815
|
}, text(none$1)];
|
|
5115
4816
|
};
|
|
5116
4817
|
|
|
5117
4818
|
const sash = {
|
|
5118
|
-
|
|
4819
|
+
childCount: 0,
|
|
5119
4820
|
className: mergeClassNames(Sash, SashVertical),
|
|
5120
|
-
|
|
4821
|
+
type: Div
|
|
5121
4822
|
};
|
|
5122
4823
|
const getFeaturesVirtualDom = (features, selectedFeature, state) => {
|
|
5123
4824
|
if (features.length === 0) {
|
|
@@ -5126,20 +4827,20 @@ const getFeaturesVirtualDom = (features, selectedFeature, state) => {
|
|
|
5126
4827
|
const fn = getFeatureVirtualDomHandler(selectedFeature);
|
|
5127
4828
|
const featureVirtualDom = fn(state);
|
|
5128
4829
|
return [{
|
|
5129
|
-
|
|
4830
|
+
childCount: 3,
|
|
5130
4831
|
className: Features$1,
|
|
5131
|
-
|
|
4832
|
+
type: Div
|
|
5132
4833
|
}, ...getFeatureListVirtualDom(features), sash, ...featureVirtualDom];
|
|
5133
4834
|
};
|
|
5134
4835
|
|
|
5135
4836
|
const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, selectedTab, width, scrollToTopButtonEnabled, categories, resources, breakpoint, changelogDom, state) => {
|
|
5136
4837
|
switch (selectedTab) {
|
|
4838
|
+
case Changelog:
|
|
4839
|
+
return getChangelogVirtualDom(changelogDom);
|
|
5137
4840
|
case Details:
|
|
5138
4841
|
return getDetailsVirtualDom(sanitizedReadmeHtml, width, scrollToTopButtonEnabled, categories, resources, breakpoint, state.installationEntries, state.marketplaceEntries, state.hasReadme, state.showSideBar);
|
|
5139
4842
|
case Features:
|
|
5140
4843
|
return getFeaturesVirtualDom(state.features, state.selectedFeature, state);
|
|
5141
|
-
case Changelog:
|
|
5142
|
-
return getChangelogVirtualDom(changelogDom);
|
|
5143
4844
|
default:
|
|
5144
4845
|
return [];
|
|
5145
4846
|
}
|
|
@@ -5147,19 +4848,19 @@ const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, selectedTab, w
|
|
|
5147
4848
|
|
|
5148
4849
|
const getExtensionDetailDescriptionVirtualDom = description => {
|
|
5149
4850
|
return [{
|
|
5150
|
-
|
|
4851
|
+
childCount: 1,
|
|
5151
4852
|
className: ExtensionDetailDescription,
|
|
5152
|
-
|
|
4853
|
+
type: Div
|
|
5153
4854
|
}, text(description)];
|
|
5154
4855
|
};
|
|
5155
4856
|
|
|
5156
4857
|
const getButtonVirtualDom = (message, onClick, name) => {
|
|
5157
4858
|
return [{
|
|
5158
|
-
|
|
4859
|
+
childCount: 1,
|
|
5159
4860
|
className: mergeClassNames(Button, ButtonPrimary),
|
|
5160
|
-
onClick,
|
|
5161
4861
|
name,
|
|
5162
|
-
|
|
4862
|
+
onClick,
|
|
4863
|
+
type: Button$1
|
|
5163
4864
|
}, text(message)];
|
|
5164
4865
|
};
|
|
5165
4866
|
|
|
@@ -5168,17 +4869,17 @@ const getSettingsButtonVirtualDom = enabled => {
|
|
|
5168
4869
|
return [];
|
|
5169
4870
|
}
|
|
5170
4871
|
return [{
|
|
5171
|
-
|
|
4872
|
+
childCount: 1,
|
|
5172
4873
|
className: SettingsButton,
|
|
4874
|
+
name: Settings,
|
|
5173
4875
|
onClick: HandleClickSettings,
|
|
5174
|
-
childCount: 1,
|
|
5175
4876
|
title: 'Settings',
|
|
5176
|
-
|
|
4877
|
+
type: Button$1
|
|
5177
4878
|
}, {
|
|
5178
|
-
type: Span,
|
|
5179
|
-
className: SettingsIcon,
|
|
5180
4879
|
childCount: 0,
|
|
5181
|
-
|
|
4880
|
+
className: SettingsIcon,
|
|
4881
|
+
text: '⚙️',
|
|
4882
|
+
type: Span
|
|
5182
4883
|
}];
|
|
5183
4884
|
};
|
|
5184
4885
|
|
|
@@ -5187,22 +4888,22 @@ const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEna
|
|
|
5187
4888
|
const buttons = enabledButtons.flatMap(btn => getButtonVirtualDom(btn.label, btn.onClick, btn.name));
|
|
5188
4889
|
const settingsButton = getSettingsButtonVirtualDom(settingsButtonEnabled);
|
|
5189
4890
|
const dom = [{
|
|
5190
|
-
|
|
4891
|
+
childCount: enabledButtons.length + settingsButton.length,
|
|
5191
4892
|
className: ExtensionDetailHeaderActions,
|
|
5192
|
-
|
|
4893
|
+
type: Div
|
|
5193
4894
|
}, ...buttons, ...settingsButton];
|
|
5194
4895
|
return dom;
|
|
5195
4896
|
};
|
|
5196
4897
|
|
|
5197
4898
|
const getExtensionDetailIconVirtualDom = iconSrc => {
|
|
5198
4899
|
return {
|
|
5199
|
-
type: Img,
|
|
5200
|
-
className: ExtensionDetailIcon,
|
|
5201
4900
|
alt: '',
|
|
5202
4901
|
childCount: 0,
|
|
4902
|
+
className: ExtensionDetailIcon,
|
|
5203
4903
|
draggable: false,
|
|
5204
4904
|
onContextMenu: HandleImageContextMenu,
|
|
5205
|
-
src: iconSrc
|
|
4905
|
+
src: iconSrc,
|
|
4906
|
+
type: Img
|
|
5206
4907
|
};
|
|
5207
4908
|
};
|
|
5208
4909
|
|
|
@@ -5211,29 +4912,29 @@ const getNameBadgeVirtualDom = badge => {
|
|
|
5211
4912
|
return [];
|
|
5212
4913
|
}
|
|
5213
4914
|
return [{
|
|
5214
|
-
|
|
4915
|
+
childCount: 1,
|
|
5215
4916
|
className: ExtensionDetailNameBadge,
|
|
5216
|
-
|
|
4917
|
+
type: Span
|
|
5217
4918
|
}, text(badge)];
|
|
5218
4919
|
};
|
|
5219
4920
|
|
|
5220
4921
|
const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
5221
4922
|
return [{
|
|
5222
|
-
|
|
4923
|
+
childCount: badge ? 2 : 1,
|
|
5223
4924
|
className: ExtensionDetailName,
|
|
5224
|
-
|
|
4925
|
+
type: Div
|
|
5225
4926
|
}, text(name), ...getNameBadgeVirtualDom(badge)];
|
|
5226
4927
|
};
|
|
5227
4928
|
|
|
5228
4929
|
const getExtensionDetailHeaderVirtualDom = (name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled) => {
|
|
5229
4930
|
const dom = [{
|
|
5230
|
-
|
|
4931
|
+
childCount: 2,
|
|
5231
4932
|
className: ExtensionDetailHeader,
|
|
5232
|
-
|
|
4933
|
+
type: Div
|
|
5233
4934
|
}, getExtensionDetailIconVirtualDom(iconSrc), {
|
|
5234
|
-
|
|
4935
|
+
childCount: 3,
|
|
5235
4936
|
className: ExtensionDetailHeaderDetails,
|
|
5236
|
-
|
|
4937
|
+
type: Div
|
|
5237
4938
|
}, ...getExtensionDetailNameVirtualDom(name, badge), ...getExtensionDetailDescriptionVirtualDom(description), ...getExtensionDetailHeaderActionsVirtualDom(buttonDefs, settingsButtonEnabled)];
|
|
5238
4939
|
return dom;
|
|
5239
4940
|
};
|
|
@@ -5247,41 +4948,41 @@ const getTabClassName = isSelected => {
|
|
|
5247
4948
|
const getTabVirtualDom = tab => {
|
|
5248
4949
|
const {
|
|
5249
4950
|
label,
|
|
5250
|
-
|
|
5251
|
-
|
|
4951
|
+
name,
|
|
4952
|
+
selected
|
|
5252
4953
|
} = tab;
|
|
5253
4954
|
const className = getTabClassName(selected);
|
|
5254
4955
|
const ariaSelected = selected;
|
|
5255
4956
|
return [{
|
|
5256
|
-
|
|
5257
|
-
role: Tab,
|
|
5258
|
-
name,
|
|
5259
|
-
className,
|
|
4957
|
+
ariaSelected,
|
|
5260
4958
|
childCount: 1,
|
|
4959
|
+
className,
|
|
4960
|
+
name,
|
|
4961
|
+
role: Tab,
|
|
5261
4962
|
tabIndex: -1,
|
|
5262
|
-
|
|
4963
|
+
type: Button$1
|
|
5263
4964
|
}, text(label)];
|
|
5264
4965
|
};
|
|
5265
4966
|
|
|
5266
4967
|
const getTabsVirtualDom = tabs => {
|
|
5267
4968
|
return [{
|
|
5268
|
-
type: Div,
|
|
5269
|
-
className: ExtensionDetailTabs,
|
|
5270
4969
|
childCount: tabs.length,
|
|
5271
|
-
|
|
4970
|
+
className: ExtensionDetailTabs,
|
|
5272
4971
|
onClick: HandleTabsClick,
|
|
5273
|
-
|
|
4972
|
+
role: TabList,
|
|
4973
|
+
tabIndex: 0,
|
|
4974
|
+
type: Div
|
|
5274
4975
|
}, ...tabs.flatMap(getTabVirtualDom)];
|
|
5275
4976
|
};
|
|
5276
4977
|
|
|
5277
4978
|
const getClassNames = size => {
|
|
5278
4979
|
switch (size) {
|
|
5279
|
-
case Small:
|
|
5280
|
-
return Small$1;
|
|
5281
|
-
case Normal:
|
|
5282
|
-
return Normal$1;
|
|
5283
4980
|
case Large:
|
|
5284
4981
|
return Large$1;
|
|
4982
|
+
case Normal:
|
|
4983
|
+
return Normal$1;
|
|
4984
|
+
case Small:
|
|
4985
|
+
return Small$1;
|
|
5285
4986
|
default:
|
|
5286
4987
|
return '';
|
|
5287
4988
|
}
|
|
@@ -5312,9 +5013,9 @@ const getExtensionDetailVirtualDom = (newState, selectedTab) => {
|
|
|
5312
5013
|
const width = newState?.width || 500;
|
|
5313
5014
|
const sizeClass = getClassNames(sizeValue);
|
|
5314
5015
|
const dom = [{
|
|
5315
|
-
|
|
5016
|
+
childCount: 3,
|
|
5316
5017
|
className: mergeClassNames(Viewlet, ExtensionDetail, sizeClass),
|
|
5317
|
-
|
|
5018
|
+
type: Div
|
|
5318
5019
|
}, ...getExtensionDetailHeaderVirtualDom(name, iconSrc, description, badge, buttons, settingsButtonEnabled), ...getTabsVirtualDom(tabs), ...getExtensionDetailContentVirtualDom(detailsVirtualDom, selectedTab, width, scrollToTopButtonEnabled, categories, resources, showAdditionalDetailsBreakpoint, changelogVirtualDom, newState)];
|
|
5319
5020
|
return dom;
|
|
5320
5021
|
};
|
|
@@ -5341,10 +5042,10 @@ const renderScrollTop = (oldState, newState) => {
|
|
|
5341
5042
|
const selector = '.ExtensionDetailPanel .Markdown';
|
|
5342
5043
|
const property = 'scrollTop';
|
|
5343
5044
|
const {
|
|
5344
|
-
uid,
|
|
5345
|
-
readmeScrollTop,
|
|
5346
5045
|
changelogScrollTop,
|
|
5347
|
-
|
|
5046
|
+
readmeScrollTop,
|
|
5047
|
+
selectedTab,
|
|
5048
|
+
uid
|
|
5348
5049
|
} = newState;
|
|
5349
5050
|
const scrollTop = getScrollTop(selectedTab, readmeScrollTop, changelogScrollTop);
|
|
5350
5051
|
if (scrollTop === -1) {
|
|
@@ -5355,14 +5056,14 @@ const renderScrollTop = (oldState, newState) => {
|
|
|
5355
5056
|
|
|
5356
5057
|
const getRenderer = diffType => {
|
|
5357
5058
|
switch (diffType) {
|
|
5358
|
-
case
|
|
5359
|
-
return
|
|
5059
|
+
case RenderCss:
|
|
5060
|
+
return renderCss;
|
|
5360
5061
|
case RenderFocus:
|
|
5361
5062
|
return renderFocus;
|
|
5063
|
+
case RenderItems:
|
|
5064
|
+
return renderDom;
|
|
5362
5065
|
case RenderScrollTop:
|
|
5363
5066
|
return renderScrollTop;
|
|
5364
|
-
case RenderCss:
|
|
5365
|
-
return renderCss;
|
|
5366
5067
|
default:
|
|
5367
5068
|
throw new Error('unknown renderer');
|
|
5368
5069
|
}
|
|
@@ -5382,8 +5083,8 @@ const applyRender = (oldState, newState, diffResult) => {
|
|
|
5382
5083
|
|
|
5383
5084
|
const render2 = (uid, diffResult) => {
|
|
5384
5085
|
const {
|
|
5385
|
-
|
|
5386
|
-
|
|
5086
|
+
newState,
|
|
5087
|
+
oldState
|
|
5387
5088
|
} = get(uid);
|
|
5388
5089
|
set(uid, newState, newState);
|
|
5389
5090
|
const commands = applyRender(oldState, newState, diffResult);
|
|
@@ -5455,25 +5156,25 @@ const resize = (state, dimensions) => {
|
|
|
5455
5156
|
return {
|
|
5456
5157
|
...state,
|
|
5457
5158
|
...dimensions,
|
|
5458
|
-
showSideBar,
|
|
5459
5159
|
paddingLeft: padding,
|
|
5460
5160
|
paddingRight: padding,
|
|
5161
|
+
showSideBar,
|
|
5461
5162
|
sideBarWidth
|
|
5462
5163
|
};
|
|
5463
5164
|
};
|
|
5464
5165
|
|
|
5465
5166
|
const saveState = state => {
|
|
5466
5167
|
const {
|
|
5467
|
-
|
|
5468
|
-
selectedFeature,
|
|
5168
|
+
changelogScrollTop,
|
|
5469
5169
|
readmeScrollTop,
|
|
5470
|
-
|
|
5170
|
+
selectedFeature,
|
|
5171
|
+
selectedTab
|
|
5471
5172
|
} = state;
|
|
5472
5173
|
return {
|
|
5473
|
-
|
|
5474
|
-
selectedFeature,
|
|
5174
|
+
changelogScrollTop,
|
|
5475
5175
|
readmeScrollTop,
|
|
5476
|
-
|
|
5176
|
+
selectedFeature,
|
|
5177
|
+
selectedTab
|
|
5477
5178
|
};
|
|
5478
5179
|
};
|
|
5479
5180
|
|
|
@@ -5527,7 +5228,7 @@ const listen = async () => {
|
|
|
5527
5228
|
const rpc = await WebWorkerRpcClient.create({
|
|
5528
5229
|
commandMap: commandMap
|
|
5529
5230
|
});
|
|
5530
|
-
set$
|
|
5231
|
+
set$5(rpc);
|
|
5531
5232
|
};
|
|
5532
5233
|
|
|
5533
5234
|
const main = async () => {
|