@lvce-editor/extension-detail-view 3.23.0 → 3.24.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,16 +1210,26 @@ const create = rpcId => {
|
|
|
1210
1210
|
};
|
|
1211
1211
|
const RendererWorker$1 = 1;
|
|
1212
1212
|
const {
|
|
1213
|
-
invoke: invoke$
|
|
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 key => {
|
|
1219
|
+
return invoke$3('ExtensionManagement.getAllExtensions');
|
|
1220
|
+
};
|
|
1215
1221
|
const RendererWorker = {
|
|
1216
1222
|
__proto__: null,
|
|
1217
|
-
|
|
1223
|
+
getAllExtensions: getAllExtensions$2,
|
|
1224
|
+
invoke: invoke$3,
|
|
1225
|
+
readFile: readFile$2,
|
|
1218
1226
|
set: set$3};
|
|
1219
1227
|
|
|
1220
1228
|
const {
|
|
1221
1229
|
invoke,
|
|
1222
|
-
set
|
|
1230
|
+
set,
|
|
1231
|
+
readFile: readFile$1,
|
|
1232
|
+
getAllExtensions: getAllExtensions$1
|
|
1223
1233
|
} = RendererWorker;
|
|
1224
1234
|
|
|
1225
1235
|
const handleClickSize = async state => {
|
|
@@ -1425,7 +1435,8 @@ const getAllExtensions = async platform => {
|
|
|
1425
1435
|
if (platform === Web) {
|
|
1426
1436
|
return [];
|
|
1427
1437
|
}
|
|
1428
|
-
|
|
1438
|
+
// @ts-ignore
|
|
1439
|
+
return getAllExtensions$1();
|
|
1429
1440
|
};
|
|
1430
1441
|
const getExtension$1 = async (id, platform) => {
|
|
1431
1442
|
// TODO only ask one extension from renderer worker instead of all
|
|
@@ -1547,7 +1558,7 @@ const readFile = async uri => {
|
|
|
1547
1558
|
const result = await response.text();
|
|
1548
1559
|
return result;
|
|
1549
1560
|
}
|
|
1550
|
-
return
|
|
1561
|
+
return readFile$1(uri);
|
|
1551
1562
|
};
|
|
1552
1563
|
|
|
1553
1564
|
const ENOENT = 'ENOENT';
|
|
@@ -1680,11 +1691,51 @@ const loadContent2 = async (state, savedState) => {
|
|
|
1680
1691
|
return loadContent(state, state.platform, savedState);
|
|
1681
1692
|
};
|
|
1682
1693
|
|
|
1694
|
+
const mergeClassNames = (...classNames) => {
|
|
1695
|
+
return classNames.filter(Boolean).join(' ');
|
|
1696
|
+
};
|
|
1697
|
+
const Button$1 = 1;
|
|
1698
|
+
const Div = 4;
|
|
1699
|
+
const H1 = 5;
|
|
1700
|
+
const Table$1 = 9;
|
|
1701
|
+
const TBody = 10;
|
|
1702
|
+
const Td = 11;
|
|
1703
|
+
const Text$1 = 12;
|
|
1704
|
+
const Th = 13;
|
|
1705
|
+
const THead = 14;
|
|
1706
|
+
const Tr = 15;
|
|
1707
|
+
const Img = 17;
|
|
1708
|
+
const H2 = 22;
|
|
1709
|
+
const Pre = 51;
|
|
1710
|
+
const A = 53;
|
|
1711
|
+
const VirtualDomElements = {
|
|
1712
|
+
__proto__: null,
|
|
1713
|
+
A,
|
|
1714
|
+
Button: Button$1,
|
|
1715
|
+
Div,
|
|
1716
|
+
H1,
|
|
1717
|
+
H2,
|
|
1718
|
+
Img,
|
|
1719
|
+
Pre,
|
|
1720
|
+
TBody,
|
|
1721
|
+
THead,
|
|
1722
|
+
Table: Table$1,
|
|
1723
|
+
Td,
|
|
1724
|
+
Th,
|
|
1725
|
+
Tr};
|
|
1726
|
+
const text = data => {
|
|
1727
|
+
return {
|
|
1728
|
+
type: Text$1,
|
|
1729
|
+
text: data,
|
|
1730
|
+
childCount: 0
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1683
1734
|
const AdditionalDetails = 'AdditionalDetails';
|
|
1684
1735
|
const AdditionalDetailsEntry = 'AdditionalDetailsEntry';
|
|
1685
1736
|
const AdditionalDetailsTitle = 'AdditionalDetailsTitle';
|
|
1686
1737
|
const Aside = 'Aside';
|
|
1687
|
-
const Button
|
|
1738
|
+
const Button = 'Button';
|
|
1688
1739
|
const ButtonPrimary = 'ButtonPrimary';
|
|
1689
1740
|
const DefaultMarkdown = 'DefaultMarkdown';
|
|
1690
1741
|
const Categories = 'Categories';
|
|
@@ -1721,7 +1772,7 @@ const Normal = 'Normal';
|
|
|
1721
1772
|
const Resource = 'Resource';
|
|
1722
1773
|
const Resources = 'Resources';
|
|
1723
1774
|
const Small = 'Small';
|
|
1724
|
-
const Table
|
|
1775
|
+
const Table = 'Table';
|
|
1725
1776
|
const TableCell = 'TableCell';
|
|
1726
1777
|
const TableHeading = 'TableHeading';
|
|
1727
1778
|
const Viewlet = 'Viewlet';
|
|
@@ -1819,37 +1870,11 @@ const getDisplaySize = size => {
|
|
|
1819
1870
|
});
|
|
1820
1871
|
};
|
|
1821
1872
|
|
|
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
1873
|
const getChangelogVirtualDom = () => {
|
|
1849
1874
|
const notImplemented$1 = notImplemented();
|
|
1850
1875
|
// TODO set tabpanel role
|
|
1851
1876
|
return [{
|
|
1852
|
-
type: Div,
|
|
1877
|
+
type: VirtualDomElements.Div,
|
|
1853
1878
|
className: Changelog,
|
|
1854
1879
|
childCount: 1
|
|
1855
1880
|
}, text(notImplemented$1)];
|
|
@@ -1861,11 +1886,11 @@ const Panel = 'panel';
|
|
|
1861
1886
|
|
|
1862
1887
|
const getAdditionalDetailsEntryVirtualDom = (heading, items, renderer) => {
|
|
1863
1888
|
return [{
|
|
1864
|
-
type: Div,
|
|
1889
|
+
type: VirtualDomElements.Div,
|
|
1865
1890
|
className: AdditionalDetailsEntry,
|
|
1866
1891
|
childCount: 2
|
|
1867
1892
|
}, {
|
|
1868
|
-
type: Div,
|
|
1893
|
+
type: VirtualDomElements.Div,
|
|
1869
1894
|
className: AdditionalDetailsTitle,
|
|
1870
1895
|
childCount: 1
|
|
1871
1896
|
}, text(heading), ...renderer(items)];
|
|
@@ -1876,7 +1901,7 @@ const getCategoryVirtualDom = category => {
|
|
|
1876
1901
|
label
|
|
1877
1902
|
} = category;
|
|
1878
1903
|
return [{
|
|
1879
|
-
type: Div,
|
|
1904
|
+
type: VirtualDomElements.Div,
|
|
1880
1905
|
className: Category,
|
|
1881
1906
|
childCount: 1
|
|
1882
1907
|
}, text(label)];
|
|
@@ -1884,14 +1909,14 @@ const getCategoryVirtualDom = category => {
|
|
|
1884
1909
|
|
|
1885
1910
|
const getCategoriesDom = categories => {
|
|
1886
1911
|
return [{
|
|
1887
|
-
type: Div,
|
|
1912
|
+
type: VirtualDomElements.Div,
|
|
1888
1913
|
className: Categories,
|
|
1889
1914
|
childCount: categories.length
|
|
1890
1915
|
}, ...categories.flatMap(getCategoryVirtualDom)];
|
|
1891
1916
|
};
|
|
1892
1917
|
|
|
1893
1918
|
const parentNode$1 = {
|
|
1894
|
-
type: Div,
|
|
1919
|
+
type: VirtualDomElements.Div,
|
|
1895
1920
|
className: MoreInfoEntryKey,
|
|
1896
1921
|
childCount: 1
|
|
1897
1922
|
};
|
|
@@ -1904,13 +1929,13 @@ const getMoreInfoEntryKeyVirtualDom = item => {
|
|
|
1904
1929
|
|
|
1905
1930
|
const getTag = (onClick, code) => {
|
|
1906
1931
|
if (onClick) {
|
|
1907
|
-
return A;
|
|
1932
|
+
return VirtualDomElements.A;
|
|
1908
1933
|
}
|
|
1909
1934
|
if (code) {
|
|
1910
1935
|
// TODO use code tag
|
|
1911
|
-
return Div;
|
|
1936
|
+
return VirtualDomElements.Div;
|
|
1912
1937
|
}
|
|
1913
|
-
return Div;
|
|
1938
|
+
return VirtualDomElements.Div;
|
|
1914
1939
|
};
|
|
1915
1940
|
const getClassName = (onClick, code) => {
|
|
1916
1941
|
if (onClick) {
|
|
@@ -1938,12 +1963,12 @@ const getMoreInfoEntryValueVirtualDom = item => {
|
|
|
1938
1963
|
};
|
|
1939
1964
|
|
|
1940
1965
|
const parentNodeEven = {
|
|
1941
|
-
type: Div,
|
|
1966
|
+
type: VirtualDomElements.Div,
|
|
1942
1967
|
className: MoreInfoEntry,
|
|
1943
1968
|
childCount: 2
|
|
1944
1969
|
};
|
|
1945
1970
|
const parentNodeOdd = {
|
|
1946
|
-
type: Div,
|
|
1971
|
+
type: VirtualDomElements.Div,
|
|
1947
1972
|
className: mergeClassNames(MoreInfoEntry, MoreInfoEntryOdd),
|
|
1948
1973
|
childCount: 2
|
|
1949
1974
|
};
|
|
@@ -1957,7 +1982,7 @@ const getMoreInfoEntryVirtualDom = item => {
|
|
|
1957
1982
|
|
|
1958
1983
|
const getMoreInfoVirtualDom = items => {
|
|
1959
1984
|
return [{
|
|
1960
|
-
type: Div,
|
|
1985
|
+
type: VirtualDomElements.Div,
|
|
1961
1986
|
className: MoreInfo,
|
|
1962
1987
|
childCount: items.length
|
|
1963
1988
|
}, ...items.flatMap(getMoreInfoEntryVirtualDom)];
|
|
@@ -1965,7 +1990,7 @@ const getMoreInfoVirtualDom = items => {
|
|
|
1965
1990
|
|
|
1966
1991
|
const resourceNode = {
|
|
1967
1992
|
// TODO use link with url
|
|
1968
|
-
type: Div,
|
|
1993
|
+
type: VirtualDomElements.Div,
|
|
1969
1994
|
className: Resource,
|
|
1970
1995
|
childCount: 1
|
|
1971
1996
|
};
|
|
@@ -1978,7 +2003,7 @@ const getResourceVirtualDom = resource => {
|
|
|
1978
2003
|
|
|
1979
2004
|
const getResourcesVirtualDom = resources => {
|
|
1980
2005
|
return [{
|
|
1981
|
-
type: Div,
|
|
2006
|
+
type: VirtualDomElements.Div,
|
|
1982
2007
|
className: Resources,
|
|
1983
2008
|
childCount: resources.length
|
|
1984
2009
|
}, ...resources.flatMap(getResourceVirtualDom)];
|
|
@@ -1989,11 +2014,11 @@ const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, ent
|
|
|
1989
2014
|
return [];
|
|
1990
2015
|
}
|
|
1991
2016
|
return [{
|
|
1992
|
-
type: Div,
|
|
2017
|
+
type: VirtualDomElements.Div,
|
|
1993
2018
|
className: Aside,
|
|
1994
2019
|
childCount: 1
|
|
1995
2020
|
}, {
|
|
1996
|
-
type: Div,
|
|
2021
|
+
type: VirtualDomElements.Div,
|
|
1997
2022
|
className: AdditionalDetails,
|
|
1998
2023
|
tabIndex: 0,
|
|
1999
2024
|
childCount: 4
|
|
@@ -2076,7 +2101,7 @@ const getDetailsVirtualDom = async (sanitizedReadmeHtml, displaySize, extensionI
|
|
|
2076
2101
|
const showAdditionalDetails = width > showAdditionalDetailsBreakpoint;
|
|
2077
2102
|
const childCount = showAdditionalDetails ? 2 : 1;
|
|
2078
2103
|
const dom = [{
|
|
2079
|
-
type: Div,
|
|
2104
|
+
type: VirtualDomElements.Div,
|
|
2080
2105
|
className: ExtensionDetailPanel,
|
|
2081
2106
|
childCount: childCount,
|
|
2082
2107
|
role: Panel
|
|
@@ -2115,14 +2140,14 @@ const getCommandTableEntries = extension => {
|
|
|
2115
2140
|
|
|
2116
2141
|
const getFeatureContentHeadingVirtualDom = heading => {
|
|
2117
2142
|
return [{
|
|
2118
|
-
type: H1,
|
|
2143
|
+
type: VirtualDomElements.H1,
|
|
2119
2144
|
childCount: 1
|
|
2120
2145
|
}, text(heading)];
|
|
2121
2146
|
};
|
|
2122
2147
|
|
|
2123
2148
|
const getTableHeadingVirtualDom = heading => {
|
|
2124
2149
|
return [{
|
|
2125
|
-
type: Th,
|
|
2150
|
+
type: VirtualDomElements.Th,
|
|
2126
2151
|
className: TableHeading,
|
|
2127
2152
|
childCount: 1
|
|
2128
2153
|
}, text(heading)];
|
|
@@ -2130,11 +2155,11 @@ const getTableHeadingVirtualDom = heading => {
|
|
|
2130
2155
|
|
|
2131
2156
|
const getCellCodeVirtualDom = value => {
|
|
2132
2157
|
return [{
|
|
2133
|
-
type: Td,
|
|
2158
|
+
type: VirtualDomElements.Td,
|
|
2134
2159
|
className: TableCell,
|
|
2135
2160
|
childCount: 1
|
|
2136
2161
|
}, {
|
|
2137
|
-
type: Div,
|
|
2162
|
+
type: VirtualDomElements.Div,
|
|
2138
2163
|
// TODO use code tag
|
|
2139
2164
|
childCount: 1
|
|
2140
2165
|
}, text(value)];
|
|
@@ -2142,7 +2167,7 @@ const getCellCodeVirtualDom = value => {
|
|
|
2142
2167
|
|
|
2143
2168
|
const getCellTextVirtualDom = value => {
|
|
2144
2169
|
return [{
|
|
2145
|
-
type: Td,
|
|
2170
|
+
type: VirtualDomElements.Td,
|
|
2146
2171
|
className: TableCell,
|
|
2147
2172
|
childCount: 1
|
|
2148
2173
|
}, text(value)];
|
|
@@ -2170,7 +2195,7 @@ const getCellVirtualDom = entry => {
|
|
|
2170
2195
|
|
|
2171
2196
|
const getTableRowVirtualDom = entries => {
|
|
2172
2197
|
return [{
|
|
2173
|
-
type: Tr,
|
|
2198
|
+
type: VirtualDomElements.Tr,
|
|
2174
2199
|
childCount: entries.length
|
|
2175
2200
|
}, ...entries.flatMap(getCellVirtualDom)];
|
|
2176
2201
|
};
|
|
@@ -2181,17 +2206,17 @@ const getTableVirtualDom = tableInfo => {
|
|
|
2181
2206
|
rows
|
|
2182
2207
|
} = tableInfo;
|
|
2183
2208
|
return [{
|
|
2184
|
-
type: Table,
|
|
2185
|
-
className: Table
|
|
2209
|
+
type: VirtualDomElements.Table,
|
|
2210
|
+
className: Table,
|
|
2186
2211
|
childCount: 2
|
|
2187
2212
|
}, {
|
|
2188
|
-
type: THead,
|
|
2213
|
+
type: VirtualDomElements.THead,
|
|
2189
2214
|
childCount: 1
|
|
2190
2215
|
}, {
|
|
2191
|
-
type: Tr,
|
|
2216
|
+
type: VirtualDomElements.Tr,
|
|
2192
2217
|
childCount: headings.length
|
|
2193
2218
|
}, ...headings.flatMap(getTableHeadingVirtualDom), {
|
|
2194
|
-
type: TBody,
|
|
2219
|
+
type: VirtualDomElements.TBody,
|
|
2195
2220
|
childCount: rows.length
|
|
2196
2221
|
}, ...rows.flatMap(getTableRowVirtualDom)];
|
|
2197
2222
|
};
|
|
@@ -2201,7 +2226,7 @@ const getFeatureCommandsVirtualDom = extension => {
|
|
|
2201
2226
|
const heading = commands();
|
|
2202
2227
|
const tableInfo = getCommandTableEntries(extension);
|
|
2203
2228
|
return [{
|
|
2204
|
-
type: Div,
|
|
2229
|
+
type: VirtualDomElements.Div,
|
|
2205
2230
|
className: FeatureContent,
|
|
2206
2231
|
childCount: 2
|
|
2207
2232
|
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
@@ -2231,7 +2256,7 @@ const getJsonValidationTableEntries = extension => {
|
|
|
2231
2256
|
};
|
|
2232
2257
|
|
|
2233
2258
|
const parentNode = {
|
|
2234
|
-
type: Div,
|
|
2259
|
+
type: VirtualDomElements.Div,
|
|
2235
2260
|
className: FeatureContent,
|
|
2236
2261
|
childCount: 2
|
|
2237
2262
|
};
|
|
@@ -2244,11 +2269,11 @@ const getFeatureJsonValidationVirtualDom = extension => {
|
|
|
2244
2269
|
const getFeatureNotImplementedVirtualDom = () => {
|
|
2245
2270
|
const heading = 'Not implemented';
|
|
2246
2271
|
return [{
|
|
2247
|
-
type: Div,
|
|
2272
|
+
type: VirtualDomElements.Div,
|
|
2248
2273
|
className: FeatureContent,
|
|
2249
2274
|
childCount: 1
|
|
2250
2275
|
}, {
|
|
2251
|
-
type: H1,
|
|
2276
|
+
type: VirtualDomElements.H1,
|
|
2252
2277
|
childCount: 1
|
|
2253
2278
|
}, text(heading)];
|
|
2254
2279
|
};
|
|
@@ -2257,7 +2282,7 @@ const getFeatureProgrammingLanguagesVirtualDom = () => {
|
|
|
2257
2282
|
const heading = programmingLanguages();
|
|
2258
2283
|
// TODO
|
|
2259
2284
|
return [{
|
|
2260
|
-
type: Div,
|
|
2285
|
+
type: VirtualDomElements.Div,
|
|
2261
2286
|
className: FeatureContent,
|
|
2262
2287
|
childCount: 1
|
|
2263
2288
|
}, ...getFeatureContentHeadingVirtualDom(heading)];
|
|
@@ -2293,7 +2318,7 @@ const getFeatureSettingsVirtualDom = extension => {
|
|
|
2293
2318
|
const heading = settings();
|
|
2294
2319
|
const tableInfo = getSettingsTableEntries(extension);
|
|
2295
2320
|
return [{
|
|
2296
|
-
type: Div,
|
|
2321
|
+
type: VirtualDomElements.Div,
|
|
2297
2322
|
className: FeatureContent,
|
|
2298
2323
|
childCount: 2
|
|
2299
2324
|
}, ...getFeatureContentHeadingVirtualDom(heading), ...getTableVirtualDom(tableInfo)];
|
|
@@ -2317,11 +2342,11 @@ const getFeatureThemesVirtualDom = async themesHtml => {
|
|
|
2317
2342
|
const childCount = getVirtualDomChildCount(markdownDom);
|
|
2318
2343
|
const heading = theme();
|
|
2319
2344
|
return [{
|
|
2320
|
-
type: Div,
|
|
2345
|
+
type: VirtualDomElements.Div,
|
|
2321
2346
|
className: FeatureContent,
|
|
2322
2347
|
childCount: 2
|
|
2323
2348
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
2324
|
-
type: Div,
|
|
2349
|
+
type: VirtualDomElements.Div,
|
|
2325
2350
|
className: DefaultMarkdown,
|
|
2326
2351
|
childCount
|
|
2327
2352
|
}, ...markdownDom];
|
|
@@ -2348,17 +2373,17 @@ const getWebViews = extension => {
|
|
|
2348
2373
|
};
|
|
2349
2374
|
|
|
2350
2375
|
const heading = {
|
|
2351
|
-
type: H2,
|
|
2376
|
+
type: VirtualDomElements.H2,
|
|
2352
2377
|
className: DefinitionListItemHeading,
|
|
2353
2378
|
childCount: 1
|
|
2354
2379
|
};
|
|
2355
2380
|
const pre = {
|
|
2356
|
-
type: Pre,
|
|
2381
|
+
type: VirtualDomElements.Pre,
|
|
2357
2382
|
className: DefinitionListItemValue,
|
|
2358
2383
|
childCount: 1
|
|
2359
2384
|
};
|
|
2360
2385
|
const item = {
|
|
2361
|
-
type: Div,
|
|
2386
|
+
type: VirtualDomElements.Div,
|
|
2362
2387
|
className: DefinitionListItem,
|
|
2363
2388
|
childCount: 2
|
|
2364
2389
|
};
|
|
@@ -2374,7 +2399,7 @@ const getWebViewVirtualDom = webView => {
|
|
|
2374
2399
|
const textContentSecurityPolicy = contentSecurityPolicy();
|
|
2375
2400
|
const textElements = elements();
|
|
2376
2401
|
return [{
|
|
2377
|
-
type: Div,
|
|
2402
|
+
type: VirtualDomElements.Div,
|
|
2378
2403
|
className: FeatureWebView,
|
|
2379
2404
|
childCount: 5
|
|
2380
2405
|
}, 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 +2409,11 @@ const getFeatureWebViewsVirtualDom = extension => {
|
|
|
2384
2409
|
const webViews$1 = getWebViews(extension);
|
|
2385
2410
|
const heading = webViews();
|
|
2386
2411
|
return [{
|
|
2387
|
-
type: Div,
|
|
2412
|
+
type: VirtualDomElements.Div,
|
|
2388
2413
|
className: FeatureContent,
|
|
2389
2414
|
childCount: 2
|
|
2390
2415
|
}, ...getFeatureContentHeadingVirtualDom(heading), {
|
|
2391
|
-
type: Div,
|
|
2416
|
+
type: VirtualDomElements.Div,
|
|
2392
2417
|
childCount: webViews$1.length
|
|
2393
2418
|
}, ...webViews$1.flatMap(getWebViewVirtualDom)];
|
|
2394
2419
|
};
|
|
@@ -2421,7 +2446,7 @@ const getFeatureListItemVirtualDom = feature => {
|
|
|
2421
2446
|
const className = selected ? 'Feature FeatureSelected' : Feature;
|
|
2422
2447
|
return [{
|
|
2423
2448
|
// TODO use role list item or tab
|
|
2424
|
-
type: Button,
|
|
2449
|
+
type: VirtualDomElements.Button,
|
|
2425
2450
|
name: id,
|
|
2426
2451
|
className,
|
|
2427
2452
|
childCount: 1
|
|
@@ -2431,7 +2456,7 @@ const getFeatureListItemVirtualDom = feature => {
|
|
|
2431
2456
|
const getFeatureListVirtualDom = features => {
|
|
2432
2457
|
return [{
|
|
2433
2458
|
// TODO use either list or tabs role
|
|
2434
|
-
type: Div,
|
|
2459
|
+
type: VirtualDomElements.Div,
|
|
2435
2460
|
className: FeaturesList,
|
|
2436
2461
|
childCount: features.length,
|
|
2437
2462
|
onClick: HandleFeaturesClick
|
|
@@ -2442,17 +2467,17 @@ const getFeaturesVirtualDom = async (features, themesHtml, selectedFeature, exte
|
|
|
2442
2467
|
if (features.length === 0) {
|
|
2443
2468
|
const none$1 = none();
|
|
2444
2469
|
return [{
|
|
2445
|
-
type: Div,
|
|
2470
|
+
type: VirtualDomElements.Div,
|
|
2446
2471
|
className: Features,
|
|
2447
2472
|
childCount: 3
|
|
2448
2473
|
}, text(none$1)];
|
|
2449
2474
|
}
|
|
2450
2475
|
return [{
|
|
2451
|
-
type: Div,
|
|
2476
|
+
type: VirtualDomElements.Div,
|
|
2452
2477
|
className: Features,
|
|
2453
2478
|
childCount: 3
|
|
2454
2479
|
}, ...getFeatureListVirtualDom(features), {
|
|
2455
|
-
type: Div,
|
|
2480
|
+
type: VirtualDomElements.Div,
|
|
2456
2481
|
className: mergeClassNames(Sash, SashVertical),
|
|
2457
2482
|
childCount: 0
|
|
2458
2483
|
}, ...(await getFeatureContentVirtualDom(features, themesHtml, selectedFeature, extension))];
|
|
@@ -2473,8 +2498,8 @@ const getExtensionDetailContentVirtualDom = async (sanitizedReadmeHtml, themesHt
|
|
|
2473
2498
|
|
|
2474
2499
|
const getButtonVirtualDom = (message, onClick) => {
|
|
2475
2500
|
return [{
|
|
2476
|
-
type: Button,
|
|
2477
|
-
className: mergeClassNames(Button
|
|
2501
|
+
type: VirtualDomElements.Button,
|
|
2502
|
+
className: mergeClassNames(Button, ButtonPrimary),
|
|
2478
2503
|
onClick,
|
|
2479
2504
|
childCount: 1
|
|
2480
2505
|
}, text(message)];
|
|
@@ -2482,7 +2507,7 @@ const getButtonVirtualDom = (message, onClick) => {
|
|
|
2482
2507
|
|
|
2483
2508
|
const getExtensionDetailHeaderActionsVirtualDom = () => {
|
|
2484
2509
|
const dom = [{
|
|
2485
|
-
type: Div,
|
|
2510
|
+
type: VirtualDomElements.Div,
|
|
2486
2511
|
className: ExtensionDetailHeaderActions,
|
|
2487
2512
|
childCount: 2
|
|
2488
2513
|
}, ...getButtonVirtualDom('Disable', HandleClickDisable), ...getButtonVirtualDom('Uninstall', HandleClickUninstall)];
|
|
@@ -2496,26 +2521,26 @@ const getExtensionDetailHeaderVirtualDom = extensionDetail => {
|
|
|
2496
2521
|
description
|
|
2497
2522
|
} = extensionDetail;
|
|
2498
2523
|
const dom = [{
|
|
2499
|
-
type: Div,
|
|
2524
|
+
type: VirtualDomElements.Div,
|
|
2500
2525
|
className: ExtensionDetailHeader,
|
|
2501
2526
|
childCount: 2
|
|
2502
2527
|
}, {
|
|
2503
|
-
type: Img,
|
|
2528
|
+
type: VirtualDomElements.Img,
|
|
2504
2529
|
className: ExtensionDetailIcon,
|
|
2505
2530
|
alt: '',
|
|
2506
2531
|
draggable: false,
|
|
2507
2532
|
childCount: 0,
|
|
2508
2533
|
src: iconSrc
|
|
2509
2534
|
}, {
|
|
2510
|
-
type: Div,
|
|
2535
|
+
type: VirtualDomElements.Div,
|
|
2511
2536
|
className: ExtensionDetailHeaderDetails,
|
|
2512
2537
|
childCount: 3
|
|
2513
2538
|
}, {
|
|
2514
|
-
type: Div,
|
|
2539
|
+
type: VirtualDomElements.Div,
|
|
2515
2540
|
className: ExtensionDetailName,
|
|
2516
2541
|
childCount: 1
|
|
2517
2542
|
}, text(name), {
|
|
2518
|
-
type: Div,
|
|
2543
|
+
type: VirtualDomElements.Div,
|
|
2519
2544
|
className: ExtensionDetailDescription,
|
|
2520
2545
|
childCount: 1
|
|
2521
2546
|
}, text(description), ...getExtensionDetailHeaderActionsVirtualDom()];
|
|
@@ -2550,7 +2575,7 @@ const getTabVirtualDom = tab => {
|
|
|
2550
2575
|
const className = selected ? selectedClassName : defaultClassName;
|
|
2551
2576
|
const ariaSelected = selected ? 'true' : 'false';
|
|
2552
2577
|
return [{
|
|
2553
|
-
type: Button,
|
|
2578
|
+
type: VirtualDomElements.Button,
|
|
2554
2579
|
role: Tab,
|
|
2555
2580
|
name,
|
|
2556
2581
|
className,
|
|
@@ -2562,7 +2587,7 @@ const getTabVirtualDom = tab => {
|
|
|
2562
2587
|
|
|
2563
2588
|
const getTabsVirtualDom = tabs => {
|
|
2564
2589
|
return [{
|
|
2565
|
-
type: Div,
|
|
2590
|
+
type: VirtualDomElements.Div,
|
|
2566
2591
|
className: ExtensionDetailTabs,
|
|
2567
2592
|
childCount: tabs.length,
|
|
2568
2593
|
role: TabList,
|
|
@@ -2603,7 +2628,7 @@ const getExtensionDetailVirtualDom = async (extensionDetail, sanitizedReadmeHtml
|
|
|
2603
2628
|
const sizeValue = getViewletSize(newState?.width || 0);
|
|
2604
2629
|
const sizeClass = getClassNames(sizeValue);
|
|
2605
2630
|
const dom = [{
|
|
2606
|
-
type: Div,
|
|
2631
|
+
type: VirtualDomElements.Div,
|
|
2607
2632
|
className: mergeClassNames(Viewlet, ExtensionDetail, sizeClass),
|
|
2608
2633
|
childCount: 3
|
|
2609
2634
|
}, ...getExtensionDetailHeaderVirtualDom(extensionDetail), ...getTabsVirtualDom(tabs), ...(await getExtensionDetailContentVirtualDom(sanitizedReadmeHtml, themesHtml, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature, extension, width))];
|