@lvce-editor/extension-detail-view 3.23.0 → 3.25.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.
@@ -1210,23 +1210,57 @@ const create = rpcId => {
1210
1210
  };
1211
1211
  const RendererWorker$1 = 1;
1212
1212
  const {
1213
- invoke: invoke$4,
1213
+ invoke: invoke$3,
1214
1214
  set: set$3} = create(RendererWorker$1);
1215
+ const readFile$2 = async uri => {
1216
+ return invoke$3('FileSystem.readFile', uri);
1217
+ };
1218
+ const getAllExtensions$2 = async () => {
1219
+ return invoke$3('ExtensionManagement.getAllExtensions');
1220
+ };
1221
+ const getFolderSize$2 = async uri => {
1222
+ // @ts-ignore
1223
+ return await invoke$3('FileSystem.getFolderSize', uri);
1224
+ };
1225
+ const getExtension$3 = async id => {
1226
+ // @ts-ignore
1227
+ return invoke$3('ExtensionManagement.getExtension', id);
1228
+ };
1229
+ const getMarkdownDom$1 = async html => {
1230
+ // @ts-ignore
1231
+ return invoke$3('Markdown.getVirtualDom', html);
1232
+ };
1233
+ const openNativeFolder$1 = async uri => {
1234
+ // @ts-ignore
1235
+ await invoke$3('OpenNativeFolder.openNativeFolder', uri);
1236
+ };
1215
1237
  const RendererWorker = {
1216
1238
  __proto__: null,
1217
- invoke: invoke$4,
1239
+ getAllExtensions: getAllExtensions$2,
1240
+ getExtension: getExtension$3,
1241
+ getFolderSize: getFolderSize$2,
1242
+ getMarkdownDom: getMarkdownDom$1,
1243
+ invoke: invoke$3,
1244
+ openNativeFolder: openNativeFolder$1,
1245
+ readFile: readFile$2,
1218
1246
  set: set$3};
1219
1247
 
1220
1248
  const {
1221
1249
  invoke,
1222
- set
1250
+ set,
1251
+ readFile: readFile$1,
1252
+ getAllExtensions: getAllExtensions$1,
1253
+ getFolderSize: getFolderSize$1,
1254
+ openNativeFolder,
1255
+ getMarkdownDom,
1256
+ getExtension: getExtension$2
1223
1257
  } = RendererWorker;
1224
1258
 
1225
1259
  const handleClickSize = async state => {
1226
1260
  const {
1227
1261
  uri
1228
1262
  } = state.extension;
1229
- await invoke('OpenNativeFolder.openNativeFolder', uri);
1263
+ await openNativeFolder(uri);
1230
1264
  return state;
1231
1265
  };
1232
1266
 
@@ -1425,7 +1459,8 @@ const getAllExtensions = async platform => {
1425
1459
  if (platform === Web) {
1426
1460
  return [];
1427
1461
  }
1428
- return invoke('ExtensionManagement.getAllExtensions');
1462
+ // @ts-ignore
1463
+ return getAllExtensions$1();
1429
1464
  };
1430
1465
  const getExtension$1 = async (id, platform) => {
1431
1466
  // TODO only ask one extension from renderer worker instead of all
@@ -1439,8 +1474,7 @@ const getExtension$1 = async (id, platform) => {
1439
1474
  };
1440
1475
 
1441
1476
  const getExtensionNew = async id => {
1442
- // @ts-ignore todo
1443
- return invoke('ExtensionManagement.getExtension', id);
1477
+ return getExtension$2(id);
1444
1478
  };
1445
1479
  const getExtension = async (id, platform) => {
1446
1480
  try {
@@ -1517,8 +1551,7 @@ const getFolderSize = async uri => {
1517
1551
  throw new VError(`uri is required`);
1518
1552
  }
1519
1553
  try {
1520
- // @ts-ignore todo
1521
- return await invoke('FileSystem.getFolderSize', uri);
1554
+ return await getFolderSize$1(uri);
1522
1555
  } catch {
1523
1556
  return 0;
1524
1557
  }
@@ -1547,7 +1580,7 @@ const readFile = async uri => {
1547
1580
  const result = await response.text();
1548
1581
  return result;
1549
1582
  }
1550
- return invoke('FileSystem.readFile', uri);
1583
+ return readFile$1(uri);
1551
1584
  };
1552
1585
 
1553
1586
  const ENOENT = 'ENOENT';
@@ -1680,11 +1713,51 @@ const loadContent2 = async (state, savedState) => {
1680
1713
  return loadContent(state, state.platform, savedState);
1681
1714
  };
1682
1715
 
1716
+ const mergeClassNames = (...classNames) => {
1717
+ return classNames.filter(Boolean).join(' ');
1718
+ };
1719
+ const Button$1 = 1;
1720
+ const Div = 4;
1721
+ const H1 = 5;
1722
+ const Table$1 = 9;
1723
+ const TBody = 10;
1724
+ const Td = 11;
1725
+ const Text$1 = 12;
1726
+ const Th = 13;
1727
+ const THead = 14;
1728
+ const Tr = 15;
1729
+ const Img = 17;
1730
+ const H2 = 22;
1731
+ const Pre = 51;
1732
+ const A = 53;
1733
+ const VirtualDomElements = {
1734
+ __proto__: null,
1735
+ A,
1736
+ Button: Button$1,
1737
+ Div,
1738
+ H1,
1739
+ H2,
1740
+ Img,
1741
+ Pre,
1742
+ TBody,
1743
+ THead,
1744
+ Table: Table$1,
1745
+ Td,
1746
+ Th,
1747
+ Tr};
1748
+ const text = data => {
1749
+ return {
1750
+ type: Text$1,
1751
+ text: data,
1752
+ childCount: 0
1753
+ };
1754
+ };
1755
+
1683
1756
  const AdditionalDetails = 'AdditionalDetails';
1684
1757
  const AdditionalDetailsEntry = 'AdditionalDetailsEntry';
1685
1758
  const AdditionalDetailsTitle = 'AdditionalDetailsTitle';
1686
1759
  const Aside = 'Aside';
1687
- const Button$1 = 'Button';
1760
+ const Button = 'Button';
1688
1761
  const ButtonPrimary = 'ButtonPrimary';
1689
1762
  const DefaultMarkdown = 'DefaultMarkdown';
1690
1763
  const Categories = 'Categories';
@@ -1721,7 +1794,7 @@ const Normal = 'Normal';
1721
1794
  const Resource = 'Resource';
1722
1795
  const Resources = 'Resources';
1723
1796
  const Small = 'Small';
1724
- const Table$1 = 'Table';
1797
+ const Table = 'Table';
1725
1798
  const TableCell = 'TableCell';
1726
1799
  const TableHeading = 'TableHeading';
1727
1800
  const Viewlet = 'Viewlet';
@@ -1819,37 +1892,11 @@ const getDisplaySize = size => {
1819
1892
  });
1820
1893
  };
1821
1894
 
1822
- const A = 53;
1823
- const Button = 1;
1824
- const Div = 4;
1825
- const H1 = 5;
1826
- const H2 = 22;
1827
- const Img = 17;
1828
- const Pre = 51;
1829
- const Table = 9;
1830
- const TBody = 10;
1831
- const Td = 11;
1832
- const Th = 13;
1833
- const THead = 14;
1834
- const Tr = 15;
1835
-
1836
- const mergeClassNames = (...classNames) => {
1837
- return classNames.filter(Boolean).join(' ');
1838
- };
1839
- const Text$1 = 12;
1840
- const text = data => {
1841
- return {
1842
- type: Text$1,
1843
- text: data,
1844
- childCount: 0
1845
- };
1846
- };
1847
-
1848
1895
  const getChangelogVirtualDom = () => {
1849
1896
  const notImplemented$1 = notImplemented();
1850
1897
  // TODO set tabpanel role
1851
1898
  return [{
1852
- type: Div,
1899
+ type: VirtualDomElements.Div,
1853
1900
  className: Changelog,
1854
1901
  childCount: 1
1855
1902
  }, text(notImplemented$1)];
@@ -1861,11 +1908,11 @@ const Panel = 'panel';
1861
1908
 
1862
1909
  const getAdditionalDetailsEntryVirtualDom = (heading, items, renderer) => {
1863
1910
  return [{
1864
- type: Div,
1911
+ type: VirtualDomElements.Div,
1865
1912
  className: AdditionalDetailsEntry,
1866
1913
  childCount: 2
1867
1914
  }, {
1868
- type: Div,
1915
+ type: VirtualDomElements.Div,
1869
1916
  className: AdditionalDetailsTitle,
1870
1917
  childCount: 1
1871
1918
  }, text(heading), ...renderer(items)];
@@ -1876,7 +1923,7 @@ const getCategoryVirtualDom = category => {
1876
1923
  label
1877
1924
  } = category;
1878
1925
  return [{
1879
- type: Div,
1926
+ type: VirtualDomElements.Div,
1880
1927
  className: Category,
1881
1928
  childCount: 1
1882
1929
  }, text(label)];
@@ -1884,14 +1931,14 @@ const getCategoryVirtualDom = category => {
1884
1931
 
1885
1932
  const getCategoriesDom = categories => {
1886
1933
  return [{
1887
- type: Div,
1934
+ type: VirtualDomElements.Div,
1888
1935
  className: Categories,
1889
1936
  childCount: categories.length
1890
1937
  }, ...categories.flatMap(getCategoryVirtualDom)];
1891
1938
  };
1892
1939
 
1893
1940
  const parentNode$1 = {
1894
- type: Div,
1941
+ type: VirtualDomElements.Div,
1895
1942
  className: MoreInfoEntryKey,
1896
1943
  childCount: 1
1897
1944
  };
@@ -1904,13 +1951,13 @@ const getMoreInfoEntryKeyVirtualDom = item => {
1904
1951
 
1905
1952
  const getTag = (onClick, code) => {
1906
1953
  if (onClick) {
1907
- return A;
1954
+ return VirtualDomElements.A;
1908
1955
  }
1909
1956
  if (code) {
1910
1957
  // TODO use code tag
1911
- return Div;
1958
+ return VirtualDomElements.Div;
1912
1959
  }
1913
- return Div;
1960
+ return VirtualDomElements.Div;
1914
1961
  };
1915
1962
  const getClassName = (onClick, code) => {
1916
1963
  if (onClick) {
@@ -1938,12 +1985,12 @@ const getMoreInfoEntryValueVirtualDom = item => {
1938
1985
  };
1939
1986
 
1940
1987
  const parentNodeEven = {
1941
- type: Div,
1988
+ type: VirtualDomElements.Div,
1942
1989
  className: MoreInfoEntry,
1943
1990
  childCount: 2
1944
1991
  };
1945
1992
  const parentNodeOdd = {
1946
- type: Div,
1993
+ type: VirtualDomElements.Div,
1947
1994
  className: mergeClassNames(MoreInfoEntry, MoreInfoEntryOdd),
1948
1995
  childCount: 2
1949
1996
  };
@@ -1957,7 +2004,7 @@ const getMoreInfoEntryVirtualDom = item => {
1957
2004
 
1958
2005
  const getMoreInfoVirtualDom = items => {
1959
2006
  return [{
1960
- type: Div,
2007
+ type: VirtualDomElements.Div,
1961
2008
  className: MoreInfo,
1962
2009
  childCount: items.length
1963
2010
  }, ...items.flatMap(getMoreInfoEntryVirtualDom)];
@@ -1965,7 +2012,7 @@ const getMoreInfoVirtualDom = items => {
1965
2012
 
1966
2013
  const resourceNode = {
1967
2014
  // TODO use link with url
1968
- type: Div,
2015
+ type: VirtualDomElements.Div,
1969
2016
  className: Resource,
1970
2017
  childCount: 1
1971
2018
  };
@@ -1978,7 +2025,7 @@ const getResourceVirtualDom = resource => {
1978
2025
 
1979
2026
  const getResourcesVirtualDom = resources => {
1980
2027
  return [{
1981
- type: Div,
2028
+ type: VirtualDomElements.Div,
1982
2029
  className: Resources,
1983
2030
  childCount: resources.length
1984
2031
  }, ...resources.flatMap(getResourceVirtualDom)];
@@ -1989,11 +2036,11 @@ const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, ent
1989
2036
  return [];
1990
2037
  }
1991
2038
  return [{
1992
- type: Div,
2039
+ type: VirtualDomElements.Div,
1993
2040
  className: Aside,
1994
2041
  childCount: 1
1995
2042
  }, {
1996
- type: Div,
2043
+ type: VirtualDomElements.Div,
1997
2044
  className: AdditionalDetails,
1998
2045
  tabIndex: 0,
1999
2046
  childCount: 4
@@ -2032,8 +2079,7 @@ const getInstallationEntries = (displaySize, extensionId, extensionVersion) => {
2032
2079
 
2033
2080
  const getMarkdownVirtualDom = async html => {
2034
2081
  string(html);
2035
- // @ts-ignore todo
2036
- const dom = await invoke('Markdown.getVirtualDom', html);
2082
+ const dom = await getMarkdownDom(html);
2037
2083
  return dom;
2038
2084
  };
2039
2085
 
@@ -2076,7 +2122,7 @@ const getDetailsVirtualDom = async (sanitizedReadmeHtml, displaySize, extensionI
2076
2122
  const showAdditionalDetails = width > showAdditionalDetailsBreakpoint;
2077
2123
  const childCount = showAdditionalDetails ? 2 : 1;
2078
2124
  const dom = [{
2079
- type: Div,
2125
+ type: VirtualDomElements.Div,
2080
2126
  className: ExtensionDetailPanel,
2081
2127
  childCount: childCount,
2082
2128
  role: Panel
@@ -2115,14 +2161,14 @@ const getCommandTableEntries = extension => {
2115
2161
 
2116
2162
  const getFeatureContentHeadingVirtualDom = heading => {
2117
2163
  return [{
2118
- type: H1,
2164
+ type: VirtualDomElements.H1,
2119
2165
  childCount: 1
2120
2166
  }, text(heading)];
2121
2167
  };
2122
2168
 
2123
2169
  const getTableHeadingVirtualDom = heading => {
2124
2170
  return [{
2125
- type: Th,
2171
+ type: VirtualDomElements.Th,
2126
2172
  className: TableHeading,
2127
2173
  childCount: 1
2128
2174
  }, text(heading)];
@@ -2130,11 +2176,11 @@ const getTableHeadingVirtualDom = heading => {
2130
2176
 
2131
2177
  const getCellCodeVirtualDom = value => {
2132
2178
  return [{
2133
- type: Td,
2179
+ type: VirtualDomElements.Td,
2134
2180
  className: TableCell,
2135
2181
  childCount: 1
2136
2182
  }, {
2137
- type: Div,
2183
+ type: VirtualDomElements.Div,
2138
2184
  // TODO use code tag
2139
2185
  childCount: 1
2140
2186
  }, text(value)];
@@ -2142,7 +2188,7 @@ const getCellCodeVirtualDom = value => {
2142
2188
 
2143
2189
  const getCellTextVirtualDom = value => {
2144
2190
  return [{
2145
- type: Td,
2191
+ type: VirtualDomElements.Td,
2146
2192
  className: TableCell,
2147
2193
  childCount: 1
2148
2194
  }, text(value)];
@@ -2170,7 +2216,7 @@ const getCellVirtualDom = entry => {
2170
2216
 
2171
2217
  const getTableRowVirtualDom = entries => {
2172
2218
  return [{
2173
- type: Tr,
2219
+ type: VirtualDomElements.Tr,
2174
2220
  childCount: entries.length
2175
2221
  }, ...entries.flatMap(getCellVirtualDom)];
2176
2222
  };
@@ -2181,17 +2227,17 @@ const getTableVirtualDom = tableInfo => {
2181
2227
  rows
2182
2228
  } = tableInfo;
2183
2229
  return [{
2184
- type: Table,
2185
- className: Table$1,
2230
+ type: VirtualDomElements.Table,
2231
+ className: Table,
2186
2232
  childCount: 2
2187
2233
  }, {
2188
- type: THead,
2234
+ type: VirtualDomElements.THead,
2189
2235
  childCount: 1
2190
2236
  }, {
2191
- type: Tr,
2237
+ type: VirtualDomElements.Tr,
2192
2238
  childCount: headings.length
2193
2239
  }, ...headings.flatMap(getTableHeadingVirtualDom), {
2194
- type: TBody,
2240
+ type: VirtualDomElements.TBody,
2195
2241
  childCount: rows.length
2196
2242
  }, ...rows.flatMap(getTableRowVirtualDom)];
2197
2243
  };
@@ -2201,7 +2247,7 @@ const getFeatureCommandsVirtualDom = extension => {
2201
2247
  const heading = commands();
2202
2248
  const tableInfo = getCommandTableEntries(extension);
2203
2249
  return [{
2204
- type: Div,
2250
+ type: VirtualDomElements.Div,
2205
2251
  className: FeatureContent,
2206
2252
  childCount: 2
2207
2253
  }, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
@@ -2231,7 +2277,7 @@ const getJsonValidationTableEntries = extension => {
2231
2277
  };
2232
2278
 
2233
2279
  const parentNode = {
2234
- type: Div,
2280
+ type: VirtualDomElements.Div,
2235
2281
  className: FeatureContent,
2236
2282
  childCount: 2
2237
2283
  };
@@ -2244,11 +2290,11 @@ const getFeatureJsonValidationVirtualDom = extension => {
2244
2290
  const getFeatureNotImplementedVirtualDom = () => {
2245
2291
  const heading = 'Not implemented';
2246
2292
  return [{
2247
- type: Div,
2293
+ type: VirtualDomElements.Div,
2248
2294
  className: FeatureContent,
2249
2295
  childCount: 1
2250
2296
  }, {
2251
- type: H1,
2297
+ type: VirtualDomElements.H1,
2252
2298
  childCount: 1
2253
2299
  }, text(heading)];
2254
2300
  };
@@ -2257,7 +2303,7 @@ const getFeatureProgrammingLanguagesVirtualDom = () => {
2257
2303
  const heading = programmingLanguages();
2258
2304
  // TODO
2259
2305
  return [{
2260
- type: Div,
2306
+ type: VirtualDomElements.Div,
2261
2307
  className: FeatureContent,
2262
2308
  childCount: 1
2263
2309
  }, ...getFeatureContentHeadingVirtualDom(heading)];
@@ -2293,7 +2339,7 @@ const getFeatureSettingsVirtualDom = extension => {
2293
2339
  const heading = settings();
2294
2340
  const tableInfo = getSettingsTableEntries(extension);
2295
2341
  return [{
2296
- type: Div,
2342
+ type: VirtualDomElements.Div,
2297
2343
  className: FeatureContent,
2298
2344
  childCount: 2
2299
2345
  }, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
@@ -2317,11 +2363,11 @@ const getFeatureThemesVirtualDom = async themesHtml => {
2317
2363
  const childCount = getVirtualDomChildCount(markdownDom);
2318
2364
  const heading = theme();
2319
2365
  return [{
2320
- type: Div,
2366
+ type: VirtualDomElements.Div,
2321
2367
  className: FeatureContent,
2322
2368
  childCount: 2
2323
2369
  }, ...getFeatureContentHeadingVirtualDom(heading), {
2324
- type: Div,
2370
+ type: VirtualDomElements.Div,
2325
2371
  className: DefaultMarkdown,
2326
2372
  childCount
2327
2373
  }, ...markdownDom];
@@ -2348,17 +2394,17 @@ const getWebViews = extension => {
2348
2394
  };
2349
2395
 
2350
2396
  const heading = {
2351
- type: H2,
2397
+ type: VirtualDomElements.H2,
2352
2398
  className: DefinitionListItemHeading,
2353
2399
  childCount: 1
2354
2400
  };
2355
2401
  const pre = {
2356
- type: Pre,
2402
+ type: VirtualDomElements.Pre,
2357
2403
  className: DefinitionListItemValue,
2358
2404
  childCount: 1
2359
2405
  };
2360
2406
  const item = {
2361
- type: Div,
2407
+ type: VirtualDomElements.Div,
2362
2408
  className: DefinitionListItem,
2363
2409
  childCount: 2
2364
2410
  };
@@ -2374,7 +2420,7 @@ const getWebViewVirtualDom = webView => {
2374
2420
  const textContentSecurityPolicy = contentSecurityPolicy();
2375
2421
  const textElements = elements();
2376
2422
  return [{
2377
- type: Div,
2423
+ type: VirtualDomElements.Div,
2378
2424
  className: FeatureWebView,
2379
2425
  childCount: 5
2380
2426
  }, item, heading, text(textId), pre, text(id$1), item, heading, text(textSelector), pre, text(selectorString), item, heading, text(textContentSecurityPolicy), pre, text(contentSecurityPolicyString), item, heading, text(textElements), pre, text(elementsString)];
@@ -2384,11 +2430,11 @@ const getFeatureWebViewsVirtualDom = extension => {
2384
2430
  const webViews$1 = getWebViews(extension);
2385
2431
  const heading = webViews();
2386
2432
  return [{
2387
- type: Div,
2433
+ type: VirtualDomElements.Div,
2388
2434
  className: FeatureContent,
2389
2435
  childCount: 2
2390
2436
  }, ...getFeatureContentHeadingVirtualDom(heading), {
2391
- type: Div,
2437
+ type: VirtualDomElements.Div,
2392
2438
  childCount: webViews$1.length
2393
2439
  }, ...webViews$1.flatMap(getWebViewVirtualDom)];
2394
2440
  };
@@ -2421,7 +2467,7 @@ const getFeatureListItemVirtualDom = feature => {
2421
2467
  const className = selected ? 'Feature FeatureSelected' : Feature;
2422
2468
  return [{
2423
2469
  // TODO use role list item or tab
2424
- type: Button,
2470
+ type: VirtualDomElements.Button,
2425
2471
  name: id,
2426
2472
  className,
2427
2473
  childCount: 1
@@ -2431,7 +2477,7 @@ const getFeatureListItemVirtualDom = feature => {
2431
2477
  const getFeatureListVirtualDom = features => {
2432
2478
  return [{
2433
2479
  // TODO use either list or tabs role
2434
- type: Div,
2480
+ type: VirtualDomElements.Div,
2435
2481
  className: FeaturesList,
2436
2482
  childCount: features.length,
2437
2483
  onClick: HandleFeaturesClick
@@ -2442,17 +2488,17 @@ const getFeaturesVirtualDom = async (features, themesHtml, selectedFeature, exte
2442
2488
  if (features.length === 0) {
2443
2489
  const none$1 = none();
2444
2490
  return [{
2445
- type: Div,
2491
+ type: VirtualDomElements.Div,
2446
2492
  className: Features,
2447
2493
  childCount: 3
2448
2494
  }, text(none$1)];
2449
2495
  }
2450
2496
  return [{
2451
- type: Div,
2497
+ type: VirtualDomElements.Div,
2452
2498
  className: Features,
2453
2499
  childCount: 3
2454
2500
  }, ...getFeatureListVirtualDom(features), {
2455
- type: Div,
2501
+ type: VirtualDomElements.Div,
2456
2502
  className: mergeClassNames(Sash, SashVertical),
2457
2503
  childCount: 0
2458
2504
  }, ...(await getFeatureContentVirtualDom(features, themesHtml, selectedFeature, extension))];
@@ -2473,8 +2519,8 @@ const getExtensionDetailContentVirtualDom = async (sanitizedReadmeHtml, themesHt
2473
2519
 
2474
2520
  const getButtonVirtualDom = (message, onClick) => {
2475
2521
  return [{
2476
- type: Button,
2477
- className: mergeClassNames(Button$1, ButtonPrimary),
2522
+ type: VirtualDomElements.Button,
2523
+ className: mergeClassNames(Button, ButtonPrimary),
2478
2524
  onClick,
2479
2525
  childCount: 1
2480
2526
  }, text(message)];
@@ -2482,7 +2528,7 @@ const getButtonVirtualDom = (message, onClick) => {
2482
2528
 
2483
2529
  const getExtensionDetailHeaderActionsVirtualDom = () => {
2484
2530
  const dom = [{
2485
- type: Div,
2531
+ type: VirtualDomElements.Div,
2486
2532
  className: ExtensionDetailHeaderActions,
2487
2533
  childCount: 2
2488
2534
  }, ...getButtonVirtualDom('Disable', HandleClickDisable), ...getButtonVirtualDom('Uninstall', HandleClickUninstall)];
@@ -2496,26 +2542,26 @@ const getExtensionDetailHeaderVirtualDom = extensionDetail => {
2496
2542
  description
2497
2543
  } = extensionDetail;
2498
2544
  const dom = [{
2499
- type: Div,
2545
+ type: VirtualDomElements.Div,
2500
2546
  className: ExtensionDetailHeader,
2501
2547
  childCount: 2
2502
2548
  }, {
2503
- type: Img,
2549
+ type: VirtualDomElements.Img,
2504
2550
  className: ExtensionDetailIcon,
2505
2551
  alt: '',
2506
2552
  draggable: false,
2507
2553
  childCount: 0,
2508
2554
  src: iconSrc
2509
2555
  }, {
2510
- type: Div,
2556
+ type: VirtualDomElements.Div,
2511
2557
  className: ExtensionDetailHeaderDetails,
2512
2558
  childCount: 3
2513
2559
  }, {
2514
- type: Div,
2560
+ type: VirtualDomElements.Div,
2515
2561
  className: ExtensionDetailName,
2516
2562
  childCount: 1
2517
2563
  }, text(name), {
2518
- type: Div,
2564
+ type: VirtualDomElements.Div,
2519
2565
  className: ExtensionDetailDescription,
2520
2566
  childCount: 1
2521
2567
  }, text(description), ...getExtensionDetailHeaderActionsVirtualDom()];
@@ -2548,9 +2594,9 @@ const getTabVirtualDom = tab => {
2548
2594
  name
2549
2595
  } = tab;
2550
2596
  const className = selected ? selectedClassName : defaultClassName;
2551
- const ariaSelected = selected ? 'true' : 'false';
2597
+ const ariaSelected = selected;
2552
2598
  return [{
2553
- type: Button,
2599
+ type: VirtualDomElements.Button,
2554
2600
  role: Tab,
2555
2601
  name,
2556
2602
  className,
@@ -2562,7 +2608,7 @@ const getTabVirtualDom = tab => {
2562
2608
 
2563
2609
  const getTabsVirtualDom = tabs => {
2564
2610
  return [{
2565
- type: Div,
2611
+ type: VirtualDomElements.Div,
2566
2612
  className: ExtensionDetailTabs,
2567
2613
  childCount: tabs.length,
2568
2614
  role: TabList,
@@ -2603,7 +2649,7 @@ const getExtensionDetailVirtualDom = async (extensionDetail, sanitizedReadmeHtml
2603
2649
  const sizeValue = getViewletSize(newState?.width || 0);
2604
2650
  const sizeClass = getClassNames(sizeValue);
2605
2651
  const dom = [{
2606
- type: Div,
2652
+ type: VirtualDomElements.Div,
2607
2653
  className: mergeClassNames(Viewlet, ExtensionDetail, sizeClass),
2608
2654
  childCount: 3
2609
2655
  }, ...getExtensionDetailHeaderVirtualDom(extensionDetail), ...getTabsVirtualDom(tabs), ...(await getExtensionDetailContentVirtualDom(sanitizedReadmeHtml, themesHtml, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature, extension, width))];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-detail-view",
3
- "version": "3.23.0",
3
+ "version": "3.25.0",
4
4
  "description": "Extension Detail View Worker",
5
5
  "license": "MIT",
6
6
  "author": "Lvce Editor",