@lvce-editor/extension-detail-view 7.14.2 → 7.16.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 +311 -233
- package/package.json +1 -1
|
@@ -325,6 +325,7 @@ const featureActivationEventsEnabled = extension => {
|
|
|
325
325
|
return Array.isArray(extension.activation);
|
|
326
326
|
};
|
|
327
327
|
|
|
328
|
+
const Alert = 'alert';
|
|
328
329
|
const None$3 = 'none';
|
|
329
330
|
const Panel = 'panel';
|
|
330
331
|
const Tab = 'tab';
|
|
@@ -782,17 +783,14 @@ const diffTrees = (oldTree, newTree, patches, path) => {
|
|
|
782
783
|
};
|
|
783
784
|
|
|
784
785
|
const removeTrailingNavigationPatches = patches => {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
for (let i = patches.length - 1; i >= 0; i--) {
|
|
788
|
-
const patch = patches[i];
|
|
786
|
+
while (patches.length > 0) {
|
|
787
|
+
const patch = patches.at(-1);
|
|
789
788
|
if (patch.type !== NavigateChild && patch.type !== NavigateParent && patch.type !== NavigateSibling) {
|
|
790
|
-
lastNonNavigationIndex = i;
|
|
791
789
|
break;
|
|
792
790
|
}
|
|
791
|
+
patches.pop();
|
|
793
792
|
}
|
|
794
|
-
|
|
795
|
-
return lastNonNavigationIndex === -1 ? [] : patches.slice(0, lastNonNavigationIndex + 1);
|
|
793
|
+
return patches;
|
|
796
794
|
};
|
|
797
795
|
|
|
798
796
|
const diffTree = (oldNodes, newNodes) => {
|
|
@@ -891,7 +889,7 @@ const getActivationEventVirtualDom = event => {
|
|
|
891
889
|
if (!isValid) {
|
|
892
890
|
return [{
|
|
893
891
|
childCount: 1,
|
|
894
|
-
className: 'ListItem ListItemInvalid',
|
|
892
|
+
className: mergeClassNames('ListItem', 'ListItemInvalid'),
|
|
895
893
|
title: errorMessage,
|
|
896
894
|
type: Li
|
|
897
895
|
}, code, text(stringValue)];
|
|
@@ -899,27 +897,32 @@ const getActivationEventVirtualDom = event => {
|
|
|
899
897
|
return [li, code, text(stringValue)];
|
|
900
898
|
};
|
|
901
899
|
|
|
900
|
+
const featureContentHeadingNode = {
|
|
901
|
+
childCount: 1,
|
|
902
|
+
type: H1
|
|
903
|
+
};
|
|
902
904
|
const getFeatureContentHeadingVirtualDom = heading => {
|
|
903
|
-
return [
|
|
904
|
-
childCount: 1,
|
|
905
|
-
type: H1
|
|
906
|
-
}, text(heading)];
|
|
905
|
+
return [featureContentHeadingNode, text(heading)];
|
|
907
906
|
};
|
|
908
907
|
|
|
908
|
+
const featureContentNode$7 = {
|
|
909
|
+
childCount: 2,
|
|
910
|
+
className: FeatureContent,
|
|
911
|
+
type: Div
|
|
912
|
+
};
|
|
909
913
|
const getFeatureActivationEventsVirtualDom = activationEvents$1 => {
|
|
910
914
|
const heading = activationEvents();
|
|
911
|
-
return [{
|
|
912
|
-
childCount: 2,
|
|
913
|
-
className: FeatureContent,
|
|
914
|
-
type: Div
|
|
915
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
915
|
+
return [featureContentNode$7, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
916
916
|
childCount: activationEvents$1.length,
|
|
917
917
|
type: Ul
|
|
918
918
|
}, ...activationEvents$1.flatMap(getActivationEventVirtualDom)];
|
|
919
919
|
};
|
|
920
920
|
|
|
921
921
|
const getActivationEventsVirtualDom = state => {
|
|
922
|
-
|
|
922
|
+
const {
|
|
923
|
+
activationEntries
|
|
924
|
+
} = state;
|
|
925
|
+
return getFeatureActivationEventsVirtualDom(activationEntries);
|
|
923
926
|
};
|
|
924
927
|
|
|
925
928
|
const Text = 1;
|
|
@@ -967,27 +970,35 @@ const getCommandTableEntries = rows => {
|
|
|
967
970
|
};
|
|
968
971
|
};
|
|
969
972
|
|
|
973
|
+
const featureContentNode$6 = {
|
|
974
|
+
childCount: 2,
|
|
975
|
+
className: FeatureContent,
|
|
976
|
+
type: Div
|
|
977
|
+
};
|
|
978
|
+
const emptyCommandsNode = {
|
|
979
|
+
childCount: 1,
|
|
980
|
+
type: P
|
|
981
|
+
};
|
|
970
982
|
const getFeatureCommandsEmptyVirtualDom = () => {
|
|
971
983
|
const heading = commands$1();
|
|
972
984
|
const emptyCommandsArray$1 = emptyCommandsArray();
|
|
973
|
-
return [
|
|
974
|
-
childCount: 2,
|
|
975
|
-
className: FeatureContent,
|
|
976
|
-
type: Div
|
|
977
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
978
|
-
childCount: 1,
|
|
979
|
-
type: P
|
|
980
|
-
}, text(emptyCommandsArray$1)];
|
|
985
|
+
return [featureContentNode$6, ...getFeatureContentHeadingVirtualDom(heading), emptyCommandsNode, text(emptyCommandsArray$1)];
|
|
981
986
|
};
|
|
982
987
|
|
|
988
|
+
const tableHeadingNode = {
|
|
989
|
+
childCount: 1,
|
|
990
|
+
className: TableHeading,
|
|
991
|
+
type: Th
|
|
992
|
+
};
|
|
983
993
|
const getTableHeadingVirtualDom = heading => {
|
|
984
|
-
return [
|
|
985
|
-
childCount: 1,
|
|
986
|
-
className: TableHeading,
|
|
987
|
-
type: Th
|
|
988
|
-
}, text(heading)];
|
|
994
|
+
return [tableHeadingNode, text(heading)];
|
|
989
995
|
};
|
|
990
996
|
|
|
997
|
+
const tableCellNode = {
|
|
998
|
+
childCount: 1,
|
|
999
|
+
className: TableCell,
|
|
1000
|
+
type: Td
|
|
1001
|
+
};
|
|
991
1002
|
const getCheckedText = checked => {
|
|
992
1003
|
if (checked) {
|
|
993
1004
|
return 'yes';
|
|
@@ -999,18 +1010,15 @@ const getCellCheckMarkVirtualDom = (value, props) => {
|
|
|
999
1010
|
checked
|
|
1000
1011
|
} = props;
|
|
1001
1012
|
const checkedText = getCheckedText(checked);
|
|
1002
|
-
return [
|
|
1003
|
-
childCount: 1,
|
|
1004
|
-
className: TableCell,
|
|
1005
|
-
type: Td
|
|
1006
|
-
}, text(checkedText)];
|
|
1013
|
+
return [tableCellNode, text(checkedText)];
|
|
1007
1014
|
};
|
|
1008
1015
|
|
|
1016
|
+
const codeNode$1 = {
|
|
1017
|
+
childCount: 1,
|
|
1018
|
+
type: Code$2
|
|
1019
|
+
};
|
|
1009
1020
|
const getListItemDom = item => {
|
|
1010
|
-
return [
|
|
1011
|
-
childCount: 1,
|
|
1012
|
-
type: Code$2
|
|
1013
|
-
}, text(item)];
|
|
1021
|
+
return [codeNode$1, text(item)];
|
|
1014
1022
|
};
|
|
1015
1023
|
const getCellCodeListVirtualDom = (value, props) => {
|
|
1016
1024
|
const {
|
|
@@ -1023,8 +1031,12 @@ const getCellCodeListVirtualDom = (value, props) => {
|
|
|
1023
1031
|
}, ...listItems.flatMap(getListItemDom)];
|
|
1024
1032
|
};
|
|
1025
1033
|
|
|
1034
|
+
const codeNode = {
|
|
1035
|
+
childCount: 1,
|
|
1036
|
+
type: Code$2
|
|
1037
|
+
};
|
|
1026
1038
|
const getCellCodeVirtualDom = (value, props) => {
|
|
1027
|
-
const tdClassName =
|
|
1039
|
+
const tdClassName = mergeClassNames(TableCell, props?.className || '');
|
|
1028
1040
|
return [{
|
|
1029
1041
|
childCount: 1,
|
|
1030
1042
|
className: tdClassName,
|
|
@@ -1032,10 +1044,7 @@ const getCellCodeVirtualDom = (value, props) => {
|
|
|
1032
1044
|
...(props?.title && {
|
|
1033
1045
|
title: props.title
|
|
1034
1046
|
})
|
|
1035
|
-
},
|
|
1036
|
-
childCount: 1,
|
|
1037
|
-
type: Code$2
|
|
1038
|
-
}, text(value)];
|
|
1047
|
+
}, codeNode, text(value)];
|
|
1039
1048
|
};
|
|
1040
1049
|
|
|
1041
1050
|
const getTitleProps = title => {
|
|
@@ -1047,7 +1056,7 @@ const getTitleProps = title => {
|
|
|
1047
1056
|
return {};
|
|
1048
1057
|
};
|
|
1049
1058
|
const getCellLinkVirtualDom = (value, props) => {
|
|
1050
|
-
const tdClassName =
|
|
1059
|
+
const tdClassName = mergeClassNames(TableCell, props?.className || '');
|
|
1051
1060
|
return [{
|
|
1052
1061
|
childCount: 1,
|
|
1053
1062
|
className: tdClassName,
|
|
@@ -1062,7 +1071,7 @@ const getCellLinkVirtualDom = (value, props) => {
|
|
|
1062
1071
|
};
|
|
1063
1072
|
|
|
1064
1073
|
const getCellTextVirtualDom = (value, props) => {
|
|
1065
|
-
const tdClassName =
|
|
1074
|
+
const tdClassName = mergeClassNames(TableCell, props?.className || '');
|
|
1066
1075
|
return [{
|
|
1067
1076
|
childCount: 1,
|
|
1068
1077
|
className: tdClassName,
|
|
@@ -1107,19 +1116,21 @@ const getTableRowVirtualDom = entries => {
|
|
|
1107
1116
|
}, ...entries.flatMap(getCellVirtualDom)];
|
|
1108
1117
|
};
|
|
1109
1118
|
|
|
1119
|
+
const tableNode = {
|
|
1120
|
+
childCount: 2,
|
|
1121
|
+
className: Table,
|
|
1122
|
+
type: Table$1
|
|
1123
|
+
};
|
|
1124
|
+
const tableHeadNode = {
|
|
1125
|
+
childCount: 1,
|
|
1126
|
+
type: THead
|
|
1127
|
+
};
|
|
1110
1128
|
const getTableVirtualDom = tableInfo => {
|
|
1111
1129
|
const {
|
|
1112
1130
|
headings,
|
|
1113
1131
|
rows
|
|
1114
1132
|
} = tableInfo;
|
|
1115
|
-
return [{
|
|
1116
|
-
childCount: 2,
|
|
1117
|
-
className: Table,
|
|
1118
|
-
type: Table$1
|
|
1119
|
-
}, {
|
|
1120
|
-
childCount: 1,
|
|
1121
|
-
type: THead
|
|
1122
|
-
}, {
|
|
1133
|
+
return [tableNode, tableHeadNode, {
|
|
1123
1134
|
childCount: headings.length,
|
|
1124
1135
|
type: Tr
|
|
1125
1136
|
}, ...headings.flatMap(getTableHeadingVirtualDom), {
|
|
@@ -1128,6 +1139,12 @@ const getTableVirtualDom = tableInfo => {
|
|
|
1128
1139
|
}, ...rows.flatMap(getTableRowVirtualDom)];
|
|
1129
1140
|
};
|
|
1130
1141
|
|
|
1142
|
+
const featureContentNode$5 = {
|
|
1143
|
+
childCount: 2,
|
|
1144
|
+
className: FeatureContent,
|
|
1145
|
+
type: Div
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1131
1148
|
// TODO have typed view-model
|
|
1132
1149
|
const getFeatureCommandsVirtualDom = commands => {
|
|
1133
1150
|
if (commands.length === 0) {
|
|
@@ -1135,15 +1152,14 @@ const getFeatureCommandsVirtualDom = commands => {
|
|
|
1135
1152
|
}
|
|
1136
1153
|
const heading = commands$1();
|
|
1137
1154
|
const tableInfo = getCommandTableEntries(commands);
|
|
1138
|
-
return [
|
|
1139
|
-
childCount: 2,
|
|
1140
|
-
className: FeatureContent,
|
|
1141
|
-
type: Div
|
|
1142
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
1155
|
+
return [featureContentNode$5, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
1143
1156
|
};
|
|
1144
1157
|
|
|
1145
1158
|
const getCommandsVirtualDom = state => {
|
|
1146
|
-
|
|
1159
|
+
const {
|
|
1160
|
+
commands
|
|
1161
|
+
} = state;
|
|
1162
|
+
return getFeatureCommandsVirtualDom(commands);
|
|
1147
1163
|
};
|
|
1148
1164
|
|
|
1149
1165
|
const existsJson = async schemaUrl => {
|
|
@@ -1357,7 +1373,10 @@ const getFeatureJsonValidationVirtualDom = jsonValidation$1 => {
|
|
|
1357
1373
|
};
|
|
1358
1374
|
|
|
1359
1375
|
const getJsonValidationVirtualDom = state => {
|
|
1360
|
-
|
|
1376
|
+
const {
|
|
1377
|
+
jsonValidation
|
|
1378
|
+
} = state;
|
|
1379
|
+
return getFeatureJsonValidationVirtualDom(jsonValidation);
|
|
1361
1380
|
};
|
|
1362
1381
|
|
|
1363
1382
|
const getProgrammingLanguageTableEntry = programmingLanguage => {
|
|
@@ -1420,18 +1439,20 @@ const getProgrammingLanguagesTableEntries = rows => {
|
|
|
1420
1439
|
};
|
|
1421
1440
|
};
|
|
1422
1441
|
|
|
1442
|
+
const featureContentNode$4 = {
|
|
1443
|
+
childCount: 2,
|
|
1444
|
+
className: FeatureContent,
|
|
1445
|
+
type: Div
|
|
1446
|
+
};
|
|
1447
|
+
const emptyProgrammingLanguagesNode = {
|
|
1448
|
+
childCount: 1,
|
|
1449
|
+
type: P
|
|
1450
|
+
};
|
|
1423
1451
|
const getFeatureProgrammingLanguagesVirtualDom = programmingLanguages$1 => {
|
|
1424
1452
|
const heading = programmingLanguages();
|
|
1425
|
-
const top = [
|
|
1426
|
-
childCount: 2,
|
|
1427
|
-
className: FeatureContent,
|
|
1428
|
-
type: Div
|
|
1429
|
-
}, ...getFeatureContentHeadingVirtualDom(heading)];
|
|
1453
|
+
const top = [featureContentNode$4, ...getFeatureContentHeadingVirtualDom(heading)];
|
|
1430
1454
|
if (programmingLanguages$1.length === 0) {
|
|
1431
|
-
return [...top,
|
|
1432
|
-
childCount: 1,
|
|
1433
|
-
type: P
|
|
1434
|
-
}, text('Empty Array.')];
|
|
1455
|
+
return [...top, emptyProgrammingLanguagesNode, text('Empty Array.')];
|
|
1435
1456
|
}
|
|
1436
1457
|
const tableInfo = getProgrammingLanguagesTableEntries(programmingLanguages$1);
|
|
1437
1458
|
return [...top, ...getTableVirtualDom(tableInfo)];
|
|
@@ -1451,17 +1472,20 @@ class FeatureNotFoundError extends Error {
|
|
|
1451
1472
|
}
|
|
1452
1473
|
}
|
|
1453
1474
|
|
|
1475
|
+
const unsupportedFeatureNode = {
|
|
1476
|
+
childCount: 2,
|
|
1477
|
+
type: Div
|
|
1478
|
+
};
|
|
1479
|
+
const unsupportedFeatureHeadingNode = {
|
|
1480
|
+
childCount: 1,
|
|
1481
|
+
type: H1
|
|
1482
|
+
};
|
|
1483
|
+
const unsupportedFeatureMessageNode = {
|
|
1484
|
+
childCount: 1,
|
|
1485
|
+
type: P
|
|
1486
|
+
};
|
|
1454
1487
|
const getFeatureUnsupportedVirtualDom = state => {
|
|
1455
|
-
return [
|
|
1456
|
-
childCount: 2,
|
|
1457
|
-
type: Div
|
|
1458
|
-
}, {
|
|
1459
|
-
childCount: 1,
|
|
1460
|
-
type: H1
|
|
1461
|
-
}, text(unsupportedFeature()), {
|
|
1462
|
-
childCount: 1,
|
|
1463
|
-
type: P
|
|
1464
|
-
}, text(selectedFeatureUnknownOrUnsupported())];
|
|
1488
|
+
return [unsupportedFeatureNode, unsupportedFeatureHeadingNode, text(unsupportedFeature()), unsupportedFeatureMessageNode, text(selectedFeatureUnknownOrUnsupported())];
|
|
1465
1489
|
};
|
|
1466
1490
|
|
|
1467
1491
|
const features = Object.create(null);
|
|
@@ -2089,7 +2113,10 @@ const constructError = (message, type, name) => {
|
|
|
2089
2113
|
if (ErrorConstructor === Error) {
|
|
2090
2114
|
const error = new Error(message);
|
|
2091
2115
|
if (name && name !== 'VError') {
|
|
2092
|
-
error
|
|
2116
|
+
Object.defineProperty(error, 'name', {
|
|
2117
|
+
configurable: true,
|
|
2118
|
+
value: name
|
|
2119
|
+
});
|
|
2093
2120
|
}
|
|
2094
2121
|
return error;
|
|
2095
2122
|
}
|
|
@@ -2120,31 +2147,45 @@ const getParentStack = error => {
|
|
|
2120
2147
|
};
|
|
2121
2148
|
const MethodNotFound = -32601;
|
|
2122
2149
|
const Custom = -32001;
|
|
2150
|
+
const setStack = (error, stack) => {
|
|
2151
|
+
const descriptor = Object.getOwnPropertyDescriptor(error, 'stack');
|
|
2152
|
+
if (descriptor) {
|
|
2153
|
+
if (!descriptor.configurable && !descriptor.writable) {
|
|
2154
|
+
return;
|
|
2155
|
+
}
|
|
2156
|
+
if (!descriptor.configurable && descriptor.writable) {
|
|
2157
|
+
error.stack = stack;
|
|
2158
|
+
return;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
Object.defineProperty(error, 'stack', {
|
|
2162
|
+
configurable: true,
|
|
2163
|
+
value: stack,
|
|
2164
|
+
writable: true
|
|
2165
|
+
});
|
|
2166
|
+
};
|
|
2123
2167
|
const restoreExistingError = (error, currentStack) => {
|
|
2124
2168
|
if (typeof error.stack === 'string') {
|
|
2125
|
-
error
|
|
2169
|
+
setStack(error, `${error.stack}${NewLine}${currentStack}`);
|
|
2126
2170
|
}
|
|
2127
2171
|
return error;
|
|
2128
2172
|
};
|
|
2129
2173
|
const restoreMethodNotFoundError = (error, currentStack) => {
|
|
2130
2174
|
const restoredError = new JsonRpcError(error.message);
|
|
2131
2175
|
const parentStack = getParentStack(error);
|
|
2132
|
-
restoredError
|
|
2176
|
+
setStack(restoredError, `${parentStack}${NewLine}${currentStack}`);
|
|
2133
2177
|
return restoredError;
|
|
2134
2178
|
};
|
|
2135
2179
|
const restoreStackFromData = (restoredError, error, currentStack) => {
|
|
2136
2180
|
if (error.data.stack && error.data.type && error.message) {
|
|
2137
|
-
restoredError
|
|
2181
|
+
setStack(restoredError, `${error.data.type}: ${error.message}${NewLine}${error.data.stack}${NewLine}${currentStack}`);
|
|
2138
2182
|
return;
|
|
2139
2183
|
}
|
|
2140
2184
|
if (error.data.stack) {
|
|
2141
|
-
restoredError
|
|
2185
|
+
setStack(restoredError, error.data.stack);
|
|
2142
2186
|
}
|
|
2143
2187
|
};
|
|
2144
2188
|
const applyDataProperties = (restoredError, error) => {
|
|
2145
|
-
if (!error.data) {
|
|
2146
|
-
return;
|
|
2147
|
-
}
|
|
2148
2189
|
restoreStackFromData(restoredError, error, getCurrentStack());
|
|
2149
2190
|
if (error.data.codeFrame) {
|
|
2150
2191
|
// @ts-ignore
|
|
@@ -2165,7 +2206,7 @@ const applyDirectProperties = (restoredError, error) => {
|
|
|
2165
2206
|
const indexNewLine = getNewLineIndex(lowerStack);
|
|
2166
2207
|
const parentStack = getParentStack(error);
|
|
2167
2208
|
// @ts-ignore
|
|
2168
|
-
restoredError
|
|
2209
|
+
setStack(restoredError, `${parentStack}${lowerStack.slice(indexNewLine)}`);
|
|
2169
2210
|
}
|
|
2170
2211
|
if (error.codeFrame) {
|
|
2171
2212
|
// @ts-ignore
|
|
@@ -2801,7 +2842,6 @@ const getAllPreferences = async () => {
|
|
|
2801
2842
|
return invoke$1('Preferences.getAll');
|
|
2802
2843
|
};
|
|
2803
2844
|
|
|
2804
|
-
/* eslint-disable unicorn/prefer-export-from */
|
|
2805
2845
|
const {
|
|
2806
2846
|
getRuntimeStatus: getRuntimeStatus$1,
|
|
2807
2847
|
set: set$4
|
|
@@ -2840,25 +2880,21 @@ const formatTime = time => {
|
|
|
2840
2880
|
return time.toFixed(2) + 'ms';
|
|
2841
2881
|
};
|
|
2842
2882
|
|
|
2883
|
+
const definitionTermNode = {
|
|
2884
|
+
childCount: 1,
|
|
2885
|
+
type: Dt
|
|
2886
|
+
};
|
|
2887
|
+
const definitionDescriptionNode = {
|
|
2888
|
+
childCount: 1,
|
|
2889
|
+
type: Dd
|
|
2890
|
+
};
|
|
2843
2891
|
const getActivationTimeVirtualDom = (importTime$1, activationTime$1) => {
|
|
2844
2892
|
if (!activationTime$1 && !importTime$1) {
|
|
2845
2893
|
return [];
|
|
2846
2894
|
}
|
|
2847
2895
|
const formattedImportTime = formatTime(importTime$1);
|
|
2848
2896
|
const formattedTime = formatTime(activationTime$1);
|
|
2849
|
-
return [
|
|
2850
|
-
childCount: 1,
|
|
2851
|
-
type: Dt
|
|
2852
|
-
}, text(importTime()), {
|
|
2853
|
-
childCount: 1,
|
|
2854
|
-
type: Dd
|
|
2855
|
-
}, text(formattedImportTime), {
|
|
2856
|
-
childCount: 1,
|
|
2857
|
-
type: Dt
|
|
2858
|
-
}, text(activationTime()), {
|
|
2859
|
-
childCount: 1,
|
|
2860
|
-
type: Dd
|
|
2861
|
-
}, text(formattedTime)];
|
|
2897
|
+
return [definitionTermNode, text(importTime()), definitionDescriptionNode, text(formattedImportTime), definitionTermNode, text(activationTime()), definitionDescriptionNode, text(formattedTime)];
|
|
2862
2898
|
};
|
|
2863
2899
|
|
|
2864
2900
|
const None$1 = 0;
|
|
@@ -2900,6 +2936,11 @@ const getStatusVirtualDom = status$1 => {
|
|
|
2900
2936
|
return [key, text(`${statusKey}: `), value, text(`${statusValue}`)];
|
|
2901
2937
|
};
|
|
2902
2938
|
|
|
2939
|
+
const featureContentNode$3 = {
|
|
2940
|
+
childCount: 2,
|
|
2941
|
+
className: FeatureContent,
|
|
2942
|
+
type: Div
|
|
2943
|
+
};
|
|
2903
2944
|
const getChildCount$1 = (status, activationTime, importTime) => {
|
|
2904
2945
|
let childCount = 0;
|
|
2905
2946
|
childCount += 2; // status
|
|
@@ -2916,11 +2957,7 @@ const getRuntimeStatusVirtualDom = state => {
|
|
|
2916
2957
|
} = state;
|
|
2917
2958
|
const heading = runtimeStatus();
|
|
2918
2959
|
const childCount = getChildCount$1(status, displayedActivationTime, displayedImportTime);
|
|
2919
|
-
return [{
|
|
2920
|
-
childCount: 2,
|
|
2921
|
-
className: FeatureContent,
|
|
2922
|
-
type: Div
|
|
2923
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
2960
|
+
return [featureContentNode$3, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
2924
2961
|
childCount,
|
|
2925
2962
|
className: 'RuntimeStatusDefinitionList',
|
|
2926
2963
|
type: Dl
|
|
@@ -2966,18 +3003,22 @@ const getSettingsTableEntries = rows => {
|
|
|
2966
3003
|
};
|
|
2967
3004
|
};
|
|
2968
3005
|
|
|
3006
|
+
const featureContentNode$2 = {
|
|
3007
|
+
childCount: 2,
|
|
3008
|
+
className: FeatureContent,
|
|
3009
|
+
type: Div
|
|
3010
|
+
};
|
|
2969
3011
|
const getFeatureSettingsVirtualDom = rows => {
|
|
2970
3012
|
const heading = settings();
|
|
2971
3013
|
const tableInfo = getSettingsTableEntries(rows);
|
|
2972
|
-
return [
|
|
2973
|
-
childCount: 2,
|
|
2974
|
-
className: FeatureContent,
|
|
2975
|
-
type: Div
|
|
2976
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
3014
|
+
return [featureContentNode$2, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
2977
3015
|
};
|
|
2978
3016
|
|
|
2979
3017
|
const getSettingsVirtualDom = state => {
|
|
2980
|
-
|
|
3018
|
+
const {
|
|
3019
|
+
settings
|
|
3020
|
+
} = state;
|
|
3021
|
+
return getFeatureSettingsVirtualDom(settings);
|
|
2981
3022
|
};
|
|
2982
3023
|
|
|
2983
3024
|
const HandleClickCategory = 1;
|
|
@@ -3054,7 +3095,6 @@ const getScrollToTopVirtualDom = scrollToTopButtonEnabled => {
|
|
|
3054
3095
|
}];
|
|
3055
3096
|
};
|
|
3056
3097
|
|
|
3057
|
-
/* eslint-disable unicorn/prefer-export-from */
|
|
3058
3098
|
const {
|
|
3059
3099
|
getVirtualDom,
|
|
3060
3100
|
render,
|
|
@@ -3271,14 +3311,15 @@ const getVirtualDomChildCount = dom => {
|
|
|
3271
3311
|
return stack.length;
|
|
3272
3312
|
};
|
|
3273
3313
|
|
|
3314
|
+
const featureContentNode$1 = {
|
|
3315
|
+
childCount: 2,
|
|
3316
|
+
className: FeatureContent,
|
|
3317
|
+
type: Div
|
|
3318
|
+
};
|
|
3274
3319
|
const getFeatureThemesVirtualDom = themesDom => {
|
|
3275
3320
|
const childCount = getVirtualDomChildCount(themesDom);
|
|
3276
3321
|
const heading = theme();
|
|
3277
|
-
return [{
|
|
3278
|
-
childCount: 2,
|
|
3279
|
-
className: FeatureContent,
|
|
3280
|
-
type: Div
|
|
3281
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
3322
|
+
return [featureContentNode$1, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
3282
3323
|
childCount,
|
|
3283
3324
|
className: DefaultMarkdown,
|
|
3284
3325
|
type: Div
|
|
@@ -3286,7 +3327,10 @@ const getFeatureThemesVirtualDom = themesDom => {
|
|
|
3286
3327
|
};
|
|
3287
3328
|
|
|
3288
3329
|
const getThemeVirtualDom = state => {
|
|
3289
|
-
|
|
3330
|
+
const {
|
|
3331
|
+
themesMarkdownDom
|
|
3332
|
+
} = state;
|
|
3333
|
+
return getFeatureThemesVirtualDom(themesMarkdownDom);
|
|
3290
3334
|
};
|
|
3291
3335
|
|
|
3292
3336
|
const toWebView = rawWebView => {
|
|
@@ -3338,6 +3382,11 @@ const item = {
|
|
|
3338
3382
|
className: DefinitionListItem,
|
|
3339
3383
|
type: Div
|
|
3340
3384
|
};
|
|
3385
|
+
const featureWebViewNode = {
|
|
3386
|
+
childCount: 4,
|
|
3387
|
+
className: FeatureWebView,
|
|
3388
|
+
type: Div
|
|
3389
|
+
};
|
|
3341
3390
|
const getWebViewVirtualDom = webView => {
|
|
3342
3391
|
const {
|
|
3343
3392
|
contentSecurityPolicyString,
|
|
@@ -3349,27 +3398,27 @@ const getWebViewVirtualDom = webView => {
|
|
|
3349
3398
|
const textSelector = selector();
|
|
3350
3399
|
const textContentSecurityPolicy = contentSecurityPolicy();
|
|
3351
3400
|
const textElements = elements();
|
|
3352
|
-
return [
|
|
3353
|
-
childCount: 4,
|
|
3354
|
-
className: FeatureWebView,
|
|
3355
|
-
type: Div
|
|
3356
|
-
}, 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)];
|
|
3401
|
+
return [featureWebViewNode, 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)];
|
|
3357
3402
|
};
|
|
3358
3403
|
|
|
3404
|
+
const featureContentNode = {
|
|
3405
|
+
childCount: 2,
|
|
3406
|
+
className: FeatureContent,
|
|
3407
|
+
type: Div
|
|
3408
|
+
};
|
|
3359
3409
|
const getFeatureWebViewsVirtualDom = webViews$1 => {
|
|
3360
3410
|
const heading = webViews();
|
|
3361
|
-
return [{
|
|
3362
|
-
childCount: 2,
|
|
3363
|
-
className: FeatureContent,
|
|
3364
|
-
type: Div
|
|
3365
|
-
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
3411
|
+
return [featureContentNode, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
3366
3412
|
childCount: webViews$1.length,
|
|
3367
3413
|
type: Div
|
|
3368
3414
|
}, ...webViews$1.flatMap(getWebViewVirtualDom)];
|
|
3369
3415
|
};
|
|
3370
3416
|
|
|
3371
3417
|
const getWebViewsVirtualDom = state => {
|
|
3372
|
-
|
|
3418
|
+
const {
|
|
3419
|
+
webViews
|
|
3420
|
+
} = state;
|
|
3421
|
+
return getFeatureWebViewsVirtualDom(webViews);
|
|
3373
3422
|
};
|
|
3374
3423
|
|
|
3375
3424
|
const registerAllFeatures = () => {
|
|
@@ -3684,7 +3733,6 @@ const writeText = async text => {
|
|
|
3684
3733
|
await writeText$1(text);
|
|
3685
3734
|
};
|
|
3686
3735
|
|
|
3687
|
-
/* eslint-disable unicorn/prefer-export-from */
|
|
3688
3736
|
const {
|
|
3689
3737
|
exists,
|
|
3690
3738
|
invoke,
|
|
@@ -5477,12 +5525,13 @@ const handleImageContextMenu = async (state, eventX, eventY) => {
|
|
|
5477
5525
|
return state;
|
|
5478
5526
|
};
|
|
5479
5527
|
|
|
5528
|
+
const markdownImageErrorNode = {
|
|
5529
|
+
childCount: 1,
|
|
5530
|
+
className: MarkdownImageError,
|
|
5531
|
+
type: Span
|
|
5532
|
+
};
|
|
5480
5533
|
const getMarkdownImageErrorVirtualDom = () => {
|
|
5481
|
-
return [
|
|
5482
|
-
childCount: 1,
|
|
5483
|
-
className: MarkdownImageError,
|
|
5484
|
-
type: Span
|
|
5485
|
-
}, text(imageCannotBeLoaded())];
|
|
5534
|
+
return [markdownImageErrorNode, text(imageCannotBeLoaded())];
|
|
5486
5535
|
};
|
|
5487
5536
|
|
|
5488
5537
|
const isMatchingImageSrc = (nodeSrc, failedSrc) => {
|
|
@@ -6185,22 +6234,24 @@ const getChangelogVirtualDom = changelogDom => {
|
|
|
6185
6234
|
// TODO set tabpanel role
|
|
6186
6235
|
return [{
|
|
6187
6236
|
childCount: 1,
|
|
6188
|
-
className:
|
|
6237
|
+
className: mergeClassNames(ExtensionDetailPanel, Changelog$1),
|
|
6189
6238
|
role: Panel,
|
|
6190
6239
|
type: Div
|
|
6191
6240
|
}, ...changelogDom];
|
|
6192
6241
|
};
|
|
6193
6242
|
|
|
6243
|
+
const additionalDetailsEntryNode = {
|
|
6244
|
+
childCount: 2,
|
|
6245
|
+
className: AdditionalDetailsEntry,
|
|
6246
|
+
type: Div
|
|
6247
|
+
};
|
|
6248
|
+
const additionalDetailsTitleNode = {
|
|
6249
|
+
childCount: 1,
|
|
6250
|
+
className: AdditionalDetailsTitle,
|
|
6251
|
+
type: Div
|
|
6252
|
+
};
|
|
6194
6253
|
const getAdditionalDetailsEntryVirtualDom = (heading, items, renderer) => {
|
|
6195
|
-
return [
|
|
6196
|
-
childCount: 2,
|
|
6197
|
-
className: AdditionalDetailsEntry,
|
|
6198
|
-
type: Div
|
|
6199
|
-
}, {
|
|
6200
|
-
childCount: 1,
|
|
6201
|
-
className: AdditionalDetailsTitle,
|
|
6202
|
-
type: Div
|
|
6203
|
-
}, text(heading), ...renderer(items)];
|
|
6254
|
+
return [additionalDetailsEntryNode, additionalDetailsTitleNode, text(heading), ...renderer(items)];
|
|
6204
6255
|
};
|
|
6205
6256
|
|
|
6206
6257
|
const getCategoryVirtualDom = category => {
|
|
@@ -6315,15 +6366,16 @@ const getMoreInfoVirtualDom = items => {
|
|
|
6315
6366
|
}, ...items.flatMap(getMoreInfoEntryVirtualDom)];
|
|
6316
6367
|
};
|
|
6317
6368
|
|
|
6369
|
+
const resourceIconNode = {
|
|
6370
|
+
childCount: 1,
|
|
6371
|
+
className: ResourceIcon,
|
|
6372
|
+
type: Div
|
|
6373
|
+
};
|
|
6318
6374
|
const getIconDom = icon => {
|
|
6319
6375
|
if (!icon) {
|
|
6320
6376
|
return [];
|
|
6321
6377
|
}
|
|
6322
|
-
return [{
|
|
6323
|
-
childCount: 1,
|
|
6324
|
-
className: ResourceIcon,
|
|
6325
|
-
type: Div
|
|
6326
|
-
}, {
|
|
6378
|
+
return [resourceIconNode, {
|
|
6327
6379
|
childCount: 0,
|
|
6328
6380
|
className: mergeClassNames(MaskIcon, `MaskIcon${icon}`),
|
|
6329
6381
|
type: Div
|
|
@@ -6373,31 +6425,35 @@ const getResourcesVirtualDom = resources => {
|
|
|
6373
6425
|
}, ...resources.flatMap(getResourceVirtualDom)];
|
|
6374
6426
|
};
|
|
6375
6427
|
|
|
6428
|
+
const Focusable = 0;
|
|
6429
|
+
|
|
6430
|
+
const asideNode = {
|
|
6431
|
+
childCount: 1,
|
|
6432
|
+
className: Aside,
|
|
6433
|
+
type: Aside$1
|
|
6434
|
+
};
|
|
6376
6435
|
const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, entries, secondHeading, secondEntries, thirdHeading, categories, fourthHeading, resources) => {
|
|
6377
6436
|
if (!showAdditionalDetails) {
|
|
6378
6437
|
return [];
|
|
6379
6438
|
}
|
|
6380
6439
|
const sections = [...getAdditionalDetailsEntryVirtualDom(firstHeading, entries, getMoreInfoVirtualDom), ...(secondEntries.length > 0 ? getAdditionalDetailsEntryVirtualDom(secondHeading, secondEntries, getMoreInfoVirtualDom) : []), ...(categories.length > 0 ? getAdditionalDetailsEntryVirtualDom(thirdHeading, categories, getCategoriesDom) : []), ...getAdditionalDetailsEntryVirtualDom(fourthHeading, resources, getResourcesVirtualDom)];
|
|
6381
6440
|
const childCount = 1 + (secondEntries.length > 0 ? 1 : 0) + (categories.length > 0 ? 1 : 0) + 1;
|
|
6382
|
-
return [{
|
|
6383
|
-
childCount: 1,
|
|
6384
|
-
className: Aside,
|
|
6385
|
-
type: Aside$1
|
|
6386
|
-
}, {
|
|
6441
|
+
return [asideNode, {
|
|
6387
6442
|
childCount: childCount,
|
|
6388
6443
|
className: AdditionalDetails,
|
|
6389
6444
|
onContextMenu: HandleAdditionalDetailContextMenu,
|
|
6390
|
-
tabIndex:
|
|
6445
|
+
tabIndex: Focusable,
|
|
6391
6446
|
type: Div
|
|
6392
6447
|
}, ...sections];
|
|
6393
6448
|
};
|
|
6394
6449
|
|
|
6450
|
+
const noReadmeNode = {
|
|
6451
|
+
childCount: 1,
|
|
6452
|
+
className: Markdown,
|
|
6453
|
+
type: Div
|
|
6454
|
+
};
|
|
6395
6455
|
const getNoReadmeVirtualDom = () => {
|
|
6396
|
-
return [
|
|
6397
|
-
childCount: 1,
|
|
6398
|
-
className: Markdown,
|
|
6399
|
-
type: Div
|
|
6400
|
-
}, text(noReadmeFound())];
|
|
6456
|
+
return [noReadmeNode, text(noReadmeFound())];
|
|
6401
6457
|
};
|
|
6402
6458
|
|
|
6403
6459
|
const getChildCount = (additionalDetails, scrollToTopEnabled) => {
|
|
@@ -6445,18 +6501,20 @@ const getFeatureListVirtualDom = features => {
|
|
|
6445
6501
|
childCount: features.length,
|
|
6446
6502
|
className: FeaturesList,
|
|
6447
6503
|
onClick: HandleFeaturesClick,
|
|
6504
|
+
role: None$3,
|
|
6448
6505
|
// TODO use either list or tabs role
|
|
6449
6506
|
type: Div
|
|
6450
6507
|
}, ...features.flatMap(getFeatureListItemVirtualDom)];
|
|
6451
6508
|
};
|
|
6452
6509
|
|
|
6510
|
+
const featuresNode$1 = {
|
|
6511
|
+
childCount: 1,
|
|
6512
|
+
className: Features$1,
|
|
6513
|
+
type: Div
|
|
6514
|
+
};
|
|
6453
6515
|
const getFeaturesEmptyVirtualDom = () => {
|
|
6454
6516
|
const none$1 = none();
|
|
6455
|
-
return [
|
|
6456
|
-
childCount: 1,
|
|
6457
|
-
className: Features$1,
|
|
6458
|
-
type: Div
|
|
6459
|
-
}, text(none$1)];
|
|
6517
|
+
return [featuresNode$1, text(none$1)];
|
|
6460
6518
|
};
|
|
6461
6519
|
|
|
6462
6520
|
const sash = {
|
|
@@ -6464,63 +6522,76 @@ const sash = {
|
|
|
6464
6522
|
className: mergeClassNames(Sash, SashVertical),
|
|
6465
6523
|
type: Div
|
|
6466
6524
|
};
|
|
6525
|
+
const featuresNode = {
|
|
6526
|
+
childCount: 3,
|
|
6527
|
+
className: Features$1,
|
|
6528
|
+
type: Div
|
|
6529
|
+
};
|
|
6467
6530
|
const getFeaturesVirtualDom = (features, selectedFeature, state) => {
|
|
6468
6531
|
if (features.length === 0) {
|
|
6469
6532
|
return getFeaturesEmptyVirtualDom();
|
|
6470
6533
|
}
|
|
6471
6534
|
const fn = getFeatureVirtualDomHandler(selectedFeature);
|
|
6472
6535
|
const featureVirtualDom = fn(state);
|
|
6473
|
-
return [
|
|
6474
|
-
childCount: 3,
|
|
6475
|
-
className: Features$1,
|
|
6476
|
-
type: Div
|
|
6477
|
-
}, ...getFeatureListVirtualDom(features), sash, ...featureVirtualDom];
|
|
6536
|
+
return [featuresNode, ...getFeatureListVirtualDom(features), sash, ...featureVirtualDom];
|
|
6478
6537
|
};
|
|
6479
6538
|
|
|
6480
6539
|
const getExtensionDetailContentVirtualDom = (sanitizedReadmeHtml, selectedTab, width, scrollToTopButtonEnabled, categories, resources, breakpoint, changelogDom, state) => {
|
|
6540
|
+
const {
|
|
6541
|
+
features,
|
|
6542
|
+
hasReadme,
|
|
6543
|
+
installationEntries,
|
|
6544
|
+
marketplaceEntries,
|
|
6545
|
+
selectedFeature,
|
|
6546
|
+
showSideBar
|
|
6547
|
+
} = state;
|
|
6481
6548
|
switch (selectedTab) {
|
|
6482
6549
|
case Changelog:
|
|
6483
6550
|
return getChangelogVirtualDom(changelogDom);
|
|
6484
6551
|
case Details:
|
|
6485
|
-
return getDetailsVirtualDom(sanitizedReadmeHtml, width, scrollToTopButtonEnabled, categories, resources, breakpoint,
|
|
6552
|
+
return getDetailsVirtualDom(sanitizedReadmeHtml, width, scrollToTopButtonEnabled, categories, resources, breakpoint, installationEntries, marketplaceEntries, hasReadme, showSideBar);
|
|
6486
6553
|
case Features:
|
|
6487
|
-
return getFeaturesVirtualDom(
|
|
6554
|
+
return getFeaturesVirtualDom(features, selectedFeature, state);
|
|
6488
6555
|
default:
|
|
6489
6556
|
return [];
|
|
6490
6557
|
}
|
|
6491
6558
|
};
|
|
6492
6559
|
|
|
6560
|
+
const extensionDetailErrorCardNode = {
|
|
6561
|
+
childCount: 3,
|
|
6562
|
+
className: ExtensionDetailErrorCard,
|
|
6563
|
+
role: Alert,
|
|
6564
|
+
type: Div
|
|
6565
|
+
};
|
|
6566
|
+
const extensionDetailErrorTitleNode = {
|
|
6567
|
+
childCount: 1,
|
|
6568
|
+
className: ExtensionDetailErrorTitle,
|
|
6569
|
+
type: H1
|
|
6570
|
+
};
|
|
6571
|
+
const extensionDetailErrorMessageNode = {
|
|
6572
|
+
childCount: 1,
|
|
6573
|
+
className: ExtensionDetailErrorMessage,
|
|
6574
|
+
type: P
|
|
6575
|
+
};
|
|
6493
6576
|
const getExtensionDetailErrorVirtualDom = (title, message) => {
|
|
6494
6577
|
return [{
|
|
6495
6578
|
childCount: 1,
|
|
6496
6579
|
className: mergeClassNames(Viewlet, ExtensionDetail, ExtensionDetailError),
|
|
6497
6580
|
type: Div
|
|
6498
|
-
}, {
|
|
6499
|
-
childCount: 3,
|
|
6500
|
-
className: ExtensionDetailErrorCard,
|
|
6501
|
-
role: 'alert',
|
|
6502
|
-
type: Div
|
|
6503
|
-
}, {
|
|
6581
|
+
}, extensionDetailErrorCardNode, {
|
|
6504
6582
|
childCount: 0,
|
|
6505
6583
|
className: mergeClassNames(MaskIcon, MaskIconWarning, ExtensionDetailErrorIcon),
|
|
6506
6584
|
type: Div
|
|
6507
|
-
},
|
|
6508
|
-
childCount: 1,
|
|
6509
|
-
className: ExtensionDetailErrorTitle,
|
|
6510
|
-
type: H1
|
|
6511
|
-
}, text(title), {
|
|
6512
|
-
childCount: 1,
|
|
6513
|
-
className: ExtensionDetailErrorMessage,
|
|
6514
|
-
type: P
|
|
6515
|
-
}, text(message)];
|
|
6585
|
+
}, extensionDetailErrorTitleNode, text(title), extensionDetailErrorMessageNode, text(message)];
|
|
6516
6586
|
};
|
|
6517
6587
|
|
|
6588
|
+
const extensionDetailDescriptionNode = {
|
|
6589
|
+
childCount: 1,
|
|
6590
|
+
className: ExtensionDetailDescription,
|
|
6591
|
+
type: Div
|
|
6592
|
+
};
|
|
6518
6593
|
const getExtensionDetailDescriptionVirtualDom = description => {
|
|
6519
|
-
return [
|
|
6520
|
-
childCount: 1,
|
|
6521
|
-
className: ExtensionDetailDescription,
|
|
6522
|
-
type: Div
|
|
6523
|
-
}, text(description)];
|
|
6594
|
+
return [extensionDetailDescriptionNode, text(description)];
|
|
6524
6595
|
};
|
|
6525
6596
|
|
|
6526
6597
|
const className = mergeClassNames(Button, ButtonPrimary);
|
|
@@ -6541,23 +6612,25 @@ const getButtonVirtualDom = (message, onClick, name, onMouseEnter, onMouseLeave)
|
|
|
6541
6612
|
return [button, text(message)];
|
|
6542
6613
|
};
|
|
6543
6614
|
|
|
6615
|
+
const settingsButtonNode = {
|
|
6616
|
+
childCount: 1,
|
|
6617
|
+
className: SettingsButton,
|
|
6618
|
+
name: Settings,
|
|
6619
|
+
onClick: HandleClickSettings,
|
|
6620
|
+
title: 'Settings',
|
|
6621
|
+
type: Button$1
|
|
6622
|
+
};
|
|
6623
|
+
const settingsIconNode = {
|
|
6624
|
+
childCount: 0,
|
|
6625
|
+
className: SettingsIcon,
|
|
6626
|
+
text: '⚙️',
|
|
6627
|
+
type: Span
|
|
6628
|
+
};
|
|
6544
6629
|
const getSettingsButtonVirtualDom = enabled => {
|
|
6545
6630
|
if (!enabled) {
|
|
6546
6631
|
return [];
|
|
6547
6632
|
}
|
|
6548
|
-
return [
|
|
6549
|
-
childCount: 1,
|
|
6550
|
-
className: SettingsButton,
|
|
6551
|
-
name: Settings,
|
|
6552
|
-
onClick: HandleClickSettings,
|
|
6553
|
-
title: 'Settings',
|
|
6554
|
-
type: Button$1
|
|
6555
|
-
}, {
|
|
6556
|
-
childCount: 0,
|
|
6557
|
-
className: SettingsIcon,
|
|
6558
|
-
text: '⚙️',
|
|
6559
|
-
type: Span
|
|
6560
|
-
}];
|
|
6633
|
+
return [settingsButtonNode, settingsIconNode];
|
|
6561
6634
|
};
|
|
6562
6635
|
|
|
6563
6636
|
const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEnabled) => {
|
|
@@ -6609,33 +6682,37 @@ const getExtensionDetailMetadataVirtualDom = (downloadCount$1, rating$1) => {
|
|
|
6609
6682
|
}, ...downloadCountDom, ...ratingDom];
|
|
6610
6683
|
};
|
|
6611
6684
|
|
|
6685
|
+
const nameBadgeNode = {
|
|
6686
|
+
childCount: 1,
|
|
6687
|
+
className: ExtensionDetailNameBadge,
|
|
6688
|
+
type: Span
|
|
6689
|
+
};
|
|
6612
6690
|
const getNameBadgeVirtualDom = badge => {
|
|
6613
6691
|
if (!badge) {
|
|
6614
6692
|
return [];
|
|
6615
6693
|
}
|
|
6616
|
-
return [
|
|
6617
|
-
childCount: 1,
|
|
6618
|
-
className: ExtensionDetailNameBadge,
|
|
6619
|
-
type: Span
|
|
6620
|
-
}, text(badge)];
|
|
6694
|
+
return [nameBadgeNode, text(badge)];
|
|
6621
6695
|
};
|
|
6622
6696
|
|
|
6697
|
+
const extensionDetailNameWithBadgeNode = {
|
|
6698
|
+
childCount: 2,
|
|
6699
|
+
className: ExtensionDetailName,
|
|
6700
|
+
type: Div
|
|
6701
|
+
};
|
|
6702
|
+
const extensionDetailNameTextNode = {
|
|
6703
|
+
childCount: 1,
|
|
6704
|
+
type: Span
|
|
6705
|
+
};
|
|
6706
|
+
const extensionDetailNameNode = {
|
|
6707
|
+
childCount: 1,
|
|
6708
|
+
className: ExtensionDetailName,
|
|
6709
|
+
type: Div
|
|
6710
|
+
};
|
|
6623
6711
|
const getExtensionDetailNameWithBadgeVirtualDom = (name, badge) => {
|
|
6624
|
-
return [
|
|
6625
|
-
childCount: 2,
|
|
6626
|
-
className: ExtensionDetailName,
|
|
6627
|
-
type: Div
|
|
6628
|
-
}, {
|
|
6629
|
-
childCount: 1,
|
|
6630
|
-
type: Span
|
|
6631
|
-
}, text(name), ...getNameBadgeVirtualDom(badge)];
|
|
6712
|
+
return [extensionDetailNameWithBadgeNode, extensionDetailNameTextNode, text(name), ...getNameBadgeVirtualDom(badge)];
|
|
6632
6713
|
};
|
|
6633
6714
|
const getExtensionDetailNameDefaultVirtualDom = name => {
|
|
6634
|
-
return [
|
|
6635
|
-
childCount: 1,
|
|
6636
|
-
className: ExtensionDetailName,
|
|
6637
|
-
type: Div
|
|
6638
|
-
}, text(name)];
|
|
6715
|
+
return [extensionDetailNameNode, text(name)];
|
|
6639
6716
|
};
|
|
6640
6717
|
const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
6641
6718
|
if (badge) {
|
|
@@ -6644,13 +6721,14 @@ const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
|
6644
6721
|
return getExtensionDetailNameDefaultVirtualDom(name);
|
|
6645
6722
|
};
|
|
6646
6723
|
|
|
6724
|
+
const extensionDetailHeaderNode = {
|
|
6725
|
+
childCount: 2,
|
|
6726
|
+
className: ExtensionDetailHeader,
|
|
6727
|
+
type: Div
|
|
6728
|
+
};
|
|
6647
6729
|
const getExtensionDetailHeaderVirtualDom = (name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled, downloadCount = 'n/a', rating = 'n/a') => {
|
|
6648
6730
|
const metadataDom = getExtensionDetailMetadataVirtualDom(downloadCount, rating);
|
|
6649
|
-
const dom = [{
|
|
6650
|
-
childCount: 2,
|
|
6651
|
-
className: ExtensionDetailHeader,
|
|
6652
|
-
type: Div
|
|
6653
|
-
}, getExtensionDetailIconVirtualDom(iconSrc), {
|
|
6731
|
+
const dom = [extensionDetailHeaderNode, getExtensionDetailIconVirtualDom(iconSrc), {
|
|
6654
6732
|
childCount: metadataDom.length > 0 ? 4 : 3,
|
|
6655
6733
|
className: ExtensionDetailHeaderDetails,
|
|
6656
6734
|
onContextMenu: HandleHeaderContextMenu,
|