@lvce-editor/renderer-process 5.0.0 → 6.0.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/rendererProcessMain.js +1329 -1380
- package/package.json +1 -1
|
@@ -493,10 +493,10 @@ const getPlatform = () => {
|
|
|
493
493
|
};
|
|
494
494
|
const platform = getPlatform();
|
|
495
495
|
|
|
496
|
-
const Two
|
|
496
|
+
const Two = '2.0';
|
|
497
497
|
const create$4$1 = (method, params) => {
|
|
498
498
|
return {
|
|
499
|
-
jsonrpc: Two
|
|
499
|
+
jsonrpc: Two,
|
|
500
500
|
method,
|
|
501
501
|
params
|
|
502
502
|
};
|
|
@@ -598,7 +598,7 @@ const create$2$1 = (method, params) => {
|
|
|
598
598
|
promise
|
|
599
599
|
} = registerPromise();
|
|
600
600
|
const message = {
|
|
601
|
-
jsonrpc: Two
|
|
601
|
+
jsonrpc: Two,
|
|
602
602
|
method,
|
|
603
603
|
params,
|
|
604
604
|
id
|
|
@@ -744,7 +744,7 @@ const unwrapJsonRpcResult = responseMessage => {
|
|
|
744
744
|
};
|
|
745
745
|
const create$1$1 = (message, error) => {
|
|
746
746
|
return {
|
|
747
|
-
jsonrpc: Two
|
|
747
|
+
jsonrpc: Two,
|
|
748
748
|
id: message.id,
|
|
749
749
|
error
|
|
750
750
|
};
|
|
@@ -777,7 +777,7 @@ const getErrorResponse = (message, error, ipc, preparePrettyError, logError) =>
|
|
|
777
777
|
};
|
|
778
778
|
const create$M = (message, result) => {
|
|
779
779
|
return {
|
|
780
|
-
jsonrpc: Two
|
|
780
|
+
jsonrpc: Two,
|
|
781
781
|
id: message.id,
|
|
782
782
|
result: result ?? null
|
|
783
783
|
};
|
|
@@ -819,7 +819,17 @@ const send$1 = (transport, method, ...params) => {
|
|
|
819
819
|
const message = create$4$1(method, params);
|
|
820
820
|
transport.send(message);
|
|
821
821
|
};
|
|
822
|
-
const
|
|
822
|
+
const invoke$2 = async (ipc, method, ...params) => {
|
|
823
|
+
const {
|
|
824
|
+
message,
|
|
825
|
+
promise
|
|
826
|
+
} = create$2$1(method, params);
|
|
827
|
+
ipc.send(message);
|
|
828
|
+
const responseMessage = await promise;
|
|
829
|
+
const result = unwrapJsonRpcResult(responseMessage);
|
|
830
|
+
return result;
|
|
831
|
+
};
|
|
832
|
+
const invokeAndTransfer$1 = async (ipc, handle, method, ...params) => {
|
|
823
833
|
const {
|
|
824
834
|
message,
|
|
825
835
|
promise
|
|
@@ -981,13 +991,39 @@ const hydrate$1 = async () => {
|
|
|
981
991
|
// @ts-expect-error
|
|
982
992
|
state$9.ipc = ipc;
|
|
983
993
|
};
|
|
994
|
+
|
|
995
|
+
// TODO needed?
|
|
996
|
+
const dispose$j = () => {
|
|
997
|
+
// @ts-expect-error
|
|
998
|
+
if (state$9.rendererWorker) {
|
|
999
|
+
// @ts-expect-error
|
|
1000
|
+
state$9.rendererWorker.terminate();
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
984
1003
|
const send = (method, ...params) => {
|
|
985
1004
|
send$1(state$9.ipc, method, ...params);
|
|
986
1005
|
};
|
|
1006
|
+
const invoke$1 = (method, ...params) => {
|
|
1007
|
+
return invoke$2(state$9.ipc, method, ...params);
|
|
1008
|
+
};
|
|
987
1009
|
const sendAndTransfer = (message, transfer) => {
|
|
988
1010
|
// @ts-expect-error
|
|
989
1011
|
state$9.ipc.sendAndTransfer(message, transfer);
|
|
990
1012
|
};
|
|
1013
|
+
const invokeAndTransfer = (method, transfer, ...params) => {
|
|
1014
|
+
return invokeAndTransfer$1(state$9.ipc, transfer, method, ...params);
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
const RendererWorker = {
|
|
1018
|
+
__proto__: null,
|
|
1019
|
+
dispose: dispose$j,
|
|
1020
|
+
hydrate: hydrate$1,
|
|
1021
|
+
invoke: invoke$1,
|
|
1022
|
+
invokeAndTransfer,
|
|
1023
|
+
send,
|
|
1024
|
+
sendAndTransfer,
|
|
1025
|
+
state: state$9
|
|
1026
|
+
};
|
|
991
1027
|
|
|
992
1028
|
let AssertionError$1 = class AssertionError extends Error {
|
|
993
1029
|
constructor(message) {
|
|
@@ -1739,1394 +1775,1438 @@ const handleUnhandledError = (message, filename, lineno, colno, error) => {
|
|
|
1739
1775
|
handleError$8(error, Boolean(error), '[renderer-process] Unhandled Error: ');
|
|
1740
1776
|
};
|
|
1741
1777
|
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
self.addEventListener('securitypolicyviolation', handleContentSecurityPolicyViolation);
|
|
1747
|
-
}
|
|
1748
|
-
setLoad(load$1);
|
|
1749
|
-
if (platform === Web) {
|
|
1750
|
-
// disable prompt to download app as pwa
|
|
1751
|
-
// @ts-expect-error
|
|
1752
|
-
window.onbeforeinstallprompt = handleBeforeInstallPrompt;
|
|
1753
|
-
}
|
|
1754
|
-
// TODO this is discovered very late
|
|
1755
|
-
await hydrate$1();
|
|
1756
|
-
};
|
|
1757
|
-
|
|
1758
|
-
main();
|
|
1759
|
-
|
|
1760
|
-
const play = async src => {
|
|
1761
|
-
const audio = new Audio(src);
|
|
1762
|
-
await audio.play();
|
|
1763
|
-
};
|
|
1764
|
-
|
|
1765
|
-
const name$y = 'Audio';
|
|
1766
|
-
const Commands$z = {
|
|
1767
|
-
play: play
|
|
1768
|
-
};
|
|
1769
|
-
|
|
1770
|
-
const Audio_ipc = {
|
|
1771
|
-
__proto__: null,
|
|
1772
|
-
Commands: Commands$z,
|
|
1773
|
-
name: name$y
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
const readText = async () => {
|
|
1777
|
-
return navigator.clipboard.readText();
|
|
1778
|
-
};
|
|
1779
|
-
const writeText = async text => {
|
|
1780
|
-
string(text);
|
|
1781
|
-
await navigator.clipboard.writeText(text);
|
|
1782
|
-
};
|
|
1783
|
-
const writeImage = async blob => {
|
|
1784
|
-
await navigator.clipboard.write([new ClipboardItem({
|
|
1785
|
-
[blob.type]: blob
|
|
1786
|
-
})]);
|
|
1787
|
-
};
|
|
1788
|
-
const execCopy = async () => {
|
|
1789
|
-
// @ts-expect-error
|
|
1790
|
-
const text = getSelection().toString();
|
|
1791
|
-
await writeText(text);
|
|
1792
|
-
};
|
|
1793
|
-
|
|
1794
|
-
const name$x = 'ClipBoard';
|
|
1795
|
-
const Commands$y = {
|
|
1796
|
-
execCopy: execCopy,
|
|
1797
|
-
readText: readText,
|
|
1798
|
-
writeImage: writeImage,
|
|
1799
|
-
writeText: writeText
|
|
1800
|
-
};
|
|
1801
|
-
|
|
1802
|
-
const ClipBoard_ipc = {
|
|
1803
|
-
__proto__: null,
|
|
1804
|
-
Commands: Commands$y,
|
|
1805
|
-
name: name$x
|
|
1806
|
-
};
|
|
1807
|
-
|
|
1808
|
-
const prompt$1 = message => {
|
|
1809
|
-
return confirm(message);
|
|
1810
|
-
};
|
|
1811
|
-
|
|
1812
|
-
const name$w = 'ConfirmPrompt';
|
|
1813
|
-
const Commands$x = {
|
|
1814
|
-
prompt: prompt$1
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
const ConfirmPrompt_ipc = {
|
|
1818
|
-
__proto__: null,
|
|
1819
|
-
Commands: Commands$x,
|
|
1820
|
-
name: name$w
|
|
1821
|
-
};
|
|
1822
|
-
|
|
1823
|
-
const state$8 = {
|
|
1824
|
-
styleSheets: Object.create(null)
|
|
1825
|
-
};
|
|
1826
|
-
const set$4 = (id, sheet) => {
|
|
1827
|
-
state$8.styleSheets[id] = sheet;
|
|
1828
|
-
};
|
|
1829
|
-
const get$5 = id => {
|
|
1830
|
-
return state$8.styleSheets[id];
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
const addCssStyleSheet = async (id, text) => {
|
|
1834
|
-
const existing = get$5(id);
|
|
1835
|
-
if (existing) {
|
|
1836
|
-
await existing.replace(text);
|
|
1837
|
-
return;
|
|
1838
|
-
}
|
|
1839
|
-
const sheet = new CSSStyleSheet({});
|
|
1840
|
-
set$4(id, sheet);
|
|
1841
|
-
await sheet.replace(text);
|
|
1842
|
-
document.adoptedStyleSheets.push(sheet);
|
|
1843
|
-
};
|
|
1844
|
-
|
|
1845
|
-
const name$v = 'Css';
|
|
1846
|
-
const Commands$w = {
|
|
1847
|
-
addCssStyleSheet: addCssStyleSheet
|
|
1848
|
-
};
|
|
1849
|
-
|
|
1850
|
-
const Css_ipc = {
|
|
1851
|
-
__proto__: null,
|
|
1852
|
-
Commands: Commands$w,
|
|
1853
|
-
name: name$v
|
|
1778
|
+
// src/parts/ComponentUid/ComponentUid.ts
|
|
1779
|
+
var uidSymbol = Symbol("uid");
|
|
1780
|
+
var setComponentUid = ($Element, uid) => {
|
|
1781
|
+
$Element[uidSymbol] = uid;
|
|
1854
1782
|
};
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
const showState = async () => {
|
|
1860
|
-
const state = Object.create(null);
|
|
1861
|
-
for (const module of modules) {
|
|
1862
|
-
let imported;
|
|
1863
|
-
try {
|
|
1864
|
-
imported = await import(`../${module}/${module}.js`);
|
|
1865
|
-
} catch {}
|
|
1866
|
-
if (imported?.state) {
|
|
1867
|
-
state[module] = imported.state;
|
|
1783
|
+
var getUidTarget = $Element => {
|
|
1784
|
+
while ($Element) {
|
|
1785
|
+
if ($Element[uidSymbol]) {
|
|
1786
|
+
return $Element;
|
|
1868
1787
|
}
|
|
1788
|
+
$Element = $Element.parentNode;
|
|
1869
1789
|
}
|
|
1870
|
-
|
|
1790
|
+
return void 0;
|
|
1871
1791
|
};
|
|
1872
|
-
|
|
1873
|
-
const
|
|
1874
|
-
|
|
1875
|
-
showState: showState
|
|
1792
|
+
var getComponentUid = $Element => {
|
|
1793
|
+
const $Target = getUidTarget($Element);
|
|
1794
|
+
return $Target[uidSymbol];
|
|
1876
1795
|
};
|
|
1877
|
-
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1796
|
+
var getComponentUidFromEvent = event => {
|
|
1797
|
+
const {
|
|
1798
|
+
target,
|
|
1799
|
+
currentTarget
|
|
1800
|
+
} = event;
|
|
1801
|
+
return getComponentUid(currentTarget || target);
|
|
1882
1802
|
};
|
|
1883
1803
|
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
a.download = fileName;
|
|
1888
|
-
a.click();
|
|
1804
|
+
// src/parts/IpcState/IpcState.ts
|
|
1805
|
+
var state$8 = {
|
|
1806
|
+
ipc: void 0
|
|
1889
1807
|
};
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
const Commands$u = {
|
|
1893
|
-
downloadFile: downloadFile
|
|
1808
|
+
var getIpc = () => {
|
|
1809
|
+
return state$8.ipc;
|
|
1894
1810
|
};
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
__proto__: null,
|
|
1898
|
-
Commands: Commands$u,
|
|
1899
|
-
name: name$t
|
|
1811
|
+
var setIpc = value => {
|
|
1812
|
+
state$8.ipc = value;
|
|
1900
1813
|
};
|
|
1901
1814
|
|
|
1902
|
-
//
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
$AriaAlert1: undefined,
|
|
1906
|
-
$AriaAlert2: undefined,
|
|
1907
|
-
$AriaMessages: undefined
|
|
1908
|
-
};
|
|
1909
|
-
const getAriaAlert1 = () => {
|
|
1910
|
-
return state$7.$AriaAlert1;
|
|
1911
|
-
};
|
|
1912
|
-
const getAriaAlert2 = () => {
|
|
1913
|
-
return state$7.$AriaAlert2;
|
|
1914
|
-
};
|
|
1915
|
-
const setElements = ($AriaMessages, $AriaAlert1, $AriaAlert2) => {
|
|
1916
|
-
state$7.$AriaMessages = $AriaMessages;
|
|
1917
|
-
state$7.$AriaAlert1 = $AriaAlert1;
|
|
1918
|
-
state$7.$AriaAlert2 = $AriaAlert2;
|
|
1919
|
-
};
|
|
1920
|
-
const hasElements = () => {
|
|
1921
|
-
return state$7.$AriaMessages;
|
|
1815
|
+
// src/parts/ClearNode/ClearNode.ts
|
|
1816
|
+
var clearNode = $Node => {
|
|
1817
|
+
$Node.textContent = "";
|
|
1922
1818
|
};
|
|
1923
1819
|
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
const $AriaMessages = document.createElement('div');
|
|
1977
|
-
$AriaMessages.className = 'AriaContainer';
|
|
1978
|
-
$AriaMessages.append($AriaAlert1, $AriaAlert2);
|
|
1979
|
-
document.body.append($AriaMessages);
|
|
1980
|
-
setElements($AriaMessages, $AriaAlert1, $AriaAlert2);
|
|
1981
|
-
}
|
|
1982
|
-
const $AriaAlert1 = getAriaAlert1();
|
|
1983
|
-
const $AriaAlert2 = getAriaAlert2();
|
|
1984
|
-
// @ts-expect-error
|
|
1985
|
-
if ($AriaAlert1.textContent === message) {
|
|
1986
|
-
setMessage$3($AriaAlert1, $AriaAlert2, message);
|
|
1987
|
-
} else {
|
|
1988
|
-
setMessage$3($AriaAlert2, $AriaAlert1, message);
|
|
1989
|
-
}
|
|
1990
|
-
};
|
|
1820
|
+
// src/parts/ElementTags/ElementTags.ts
|
|
1821
|
+
var Audio$2 = "audio";
|
|
1822
|
+
var Button = "button";
|
|
1823
|
+
var Col = "col";
|
|
1824
|
+
var ColGroup = "colgroup";
|
|
1825
|
+
var Del = "del";
|
|
1826
|
+
var Div = "div";
|
|
1827
|
+
var H1 = "h1";
|
|
1828
|
+
var H2 = "h2";
|
|
1829
|
+
var H3 = "h3";
|
|
1830
|
+
var H4 = "h4";
|
|
1831
|
+
var H5 = "h5";
|
|
1832
|
+
var H6 = "h6";
|
|
1833
|
+
var I = "i";
|
|
1834
|
+
var Img = "img";
|
|
1835
|
+
var Input$1 = "input";
|
|
1836
|
+
var Ins = "ins";
|
|
1837
|
+
var Kbd = "kbd";
|
|
1838
|
+
var Span = "span";
|
|
1839
|
+
var Table = "table";
|
|
1840
|
+
var TBody = "tbody";
|
|
1841
|
+
var Td = "td";
|
|
1842
|
+
var Th = "th";
|
|
1843
|
+
var THead = "thead";
|
|
1844
|
+
var Tr = "tr";
|
|
1845
|
+
var Article = "article";
|
|
1846
|
+
var Aside = "aside";
|
|
1847
|
+
var Footer = "footer";
|
|
1848
|
+
var Header = "header";
|
|
1849
|
+
var Nav = "nav";
|
|
1850
|
+
var Section = "section";
|
|
1851
|
+
var Search$1 = "search";
|
|
1852
|
+
var Dd = "dd";
|
|
1853
|
+
var Dl = "dl";
|
|
1854
|
+
var Figcaption = "figcaption";
|
|
1855
|
+
var Figure = "figure";
|
|
1856
|
+
var Hr = "hr";
|
|
1857
|
+
var Li = "li";
|
|
1858
|
+
var Ol = "ol";
|
|
1859
|
+
var P = "p";
|
|
1860
|
+
var Pre = "pre";
|
|
1861
|
+
var A = "a";
|
|
1862
|
+
var Br = "br";
|
|
1863
|
+
var Cite = "cite";
|
|
1864
|
+
var Data = "data";
|
|
1865
|
+
var Time$1 = "time";
|
|
1866
|
+
var Tfoot = "tfoot";
|
|
1867
|
+
var Ul = "ul";
|
|
1868
|
+
var Video$1 = "video";
|
|
1869
|
+
var TextArea = "textarea";
|
|
1870
|
+
var Select = "select";
|
|
1871
|
+
var Option = "option";
|
|
1991
1872
|
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1873
|
+
// src/parts/VirtualDomElements/VirtualDomElements.ts
|
|
1874
|
+
var Audio2 = 0;
|
|
1875
|
+
var Button2 = 1;
|
|
1876
|
+
var Col2 = 2;
|
|
1877
|
+
var ColGroup2 = 3;
|
|
1878
|
+
var Div2 = 4;
|
|
1879
|
+
var H12 = 5;
|
|
1880
|
+
var Input2 = 6;
|
|
1881
|
+
var Kbd2 = 7;
|
|
1882
|
+
var Span2 = 8;
|
|
1883
|
+
var Table2 = 9;
|
|
1884
|
+
var TBody2 = 10;
|
|
1885
|
+
var Td2 = 11;
|
|
1886
|
+
var Text$2 = 12;
|
|
1887
|
+
var Th2 = 13;
|
|
1888
|
+
var THead2 = 14;
|
|
1889
|
+
var Tr2 = 15;
|
|
1890
|
+
var I2 = 16;
|
|
1891
|
+
var Img2 = 17;
|
|
1892
|
+
var Ins2 = 20;
|
|
1893
|
+
var Del2 = 21;
|
|
1894
|
+
var H22 = 22;
|
|
1895
|
+
var H32 = 23;
|
|
1896
|
+
var H42 = 24;
|
|
1897
|
+
var H52 = 25;
|
|
1898
|
+
var H62 = 26;
|
|
1899
|
+
var Article2 = 27;
|
|
1900
|
+
var Aside2 = 28;
|
|
1901
|
+
var Footer2 = 29;
|
|
1902
|
+
var Header2 = 30;
|
|
1903
|
+
var Nav2 = 40;
|
|
1904
|
+
var Section2 = 41;
|
|
1905
|
+
var Search2 = 42;
|
|
1906
|
+
var Dd2 = 43;
|
|
1907
|
+
var Dl2 = 44;
|
|
1908
|
+
var Figcaption2 = 45;
|
|
1909
|
+
var Figure2 = 46;
|
|
1910
|
+
var Hr2 = 47;
|
|
1911
|
+
var Li2 = 48;
|
|
1912
|
+
var Ol2 = 49;
|
|
1913
|
+
var P2 = 50;
|
|
1914
|
+
var Pre2 = 51;
|
|
1915
|
+
var A2 = 53;
|
|
1916
|
+
var Br2 = 55;
|
|
1917
|
+
var Cite2 = 56;
|
|
1918
|
+
var Data2 = 57;
|
|
1919
|
+
var Time2 = 58;
|
|
1920
|
+
var Tfoot2 = 59;
|
|
1921
|
+
var Ul2 = 60;
|
|
1922
|
+
var Video2 = 61;
|
|
1923
|
+
var TextArea2 = 62;
|
|
1924
|
+
var Select2 = 63;
|
|
1925
|
+
var Option2 = 64;
|
|
1996
1926
|
|
|
1997
|
-
//
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
1927
|
+
// src/parts/ElementTagMap/ElementTagMap.ts
|
|
1928
|
+
var getElementTag = type => {
|
|
1929
|
+
switch (type) {
|
|
1930
|
+
case Audio2:
|
|
1931
|
+
return Audio$2;
|
|
1932
|
+
case H12:
|
|
1933
|
+
return H1;
|
|
1934
|
+
case H22:
|
|
1935
|
+
return H2;
|
|
1936
|
+
case H32:
|
|
1937
|
+
return H3;
|
|
1938
|
+
case H42:
|
|
1939
|
+
return H4;
|
|
1940
|
+
case H52:
|
|
1941
|
+
return H5;
|
|
1942
|
+
case H62:
|
|
1943
|
+
return H6;
|
|
1944
|
+
case Div2:
|
|
1945
|
+
return Div;
|
|
1946
|
+
case Kbd2:
|
|
1947
|
+
return Kbd;
|
|
1948
|
+
case Table2:
|
|
1949
|
+
return Table;
|
|
1950
|
+
case TBody2:
|
|
1951
|
+
return TBody;
|
|
1952
|
+
case Th2:
|
|
1953
|
+
return Th;
|
|
1954
|
+
case Td2:
|
|
1955
|
+
return Td;
|
|
1956
|
+
case THead2:
|
|
1957
|
+
return THead;
|
|
1958
|
+
case Tr2:
|
|
1959
|
+
return Tr;
|
|
1960
|
+
case Input2:
|
|
1961
|
+
return Input$1;
|
|
1962
|
+
case ColGroup2:
|
|
1963
|
+
return ColGroup;
|
|
1964
|
+
case Col2:
|
|
1965
|
+
return Col;
|
|
1966
|
+
case Button2:
|
|
1967
|
+
return Button;
|
|
1968
|
+
case Span2:
|
|
1969
|
+
return Span;
|
|
1970
|
+
case I2:
|
|
1971
|
+
return I;
|
|
1972
|
+
case Img2:
|
|
1973
|
+
return Img;
|
|
1974
|
+
case Ins2:
|
|
1975
|
+
return Ins;
|
|
1976
|
+
case Del2:
|
|
1977
|
+
return Del;
|
|
1978
|
+
case Article2:
|
|
1979
|
+
return Article;
|
|
1980
|
+
case Aside2:
|
|
1981
|
+
return Aside;
|
|
1982
|
+
case Footer2:
|
|
1983
|
+
return Footer;
|
|
1984
|
+
case Header2:
|
|
1985
|
+
return Header;
|
|
1986
|
+
case Nav2:
|
|
1987
|
+
return Nav;
|
|
1988
|
+
case Section2:
|
|
1989
|
+
return Section;
|
|
1990
|
+
case Search2:
|
|
1991
|
+
return Search$1;
|
|
1992
|
+
case Dd2:
|
|
1993
|
+
return Dd;
|
|
1994
|
+
case Dl2:
|
|
1995
|
+
return Dl;
|
|
1996
|
+
case Figcaption2:
|
|
1997
|
+
return Figcaption;
|
|
1998
|
+
case Figure2:
|
|
1999
|
+
return Figure;
|
|
2000
|
+
case Hr2:
|
|
2001
|
+
return Hr;
|
|
2002
|
+
case Li2:
|
|
2003
|
+
return Li;
|
|
2004
|
+
case Ol2:
|
|
2005
|
+
return Ol;
|
|
2006
|
+
case P2:
|
|
2007
|
+
return P;
|
|
2008
|
+
case Pre2:
|
|
2009
|
+
return Pre;
|
|
2010
|
+
case A2:
|
|
2011
|
+
return A;
|
|
2012
|
+
case Br2:
|
|
2013
|
+
return Br;
|
|
2014
|
+
case Cite2:
|
|
2015
|
+
return Cite;
|
|
2016
|
+
case Data2:
|
|
2017
|
+
return Data;
|
|
2018
|
+
case Time2:
|
|
2019
|
+
return Time$1;
|
|
2020
|
+
case Tfoot2:
|
|
2021
|
+
return Tfoot;
|
|
2022
|
+
case Ul2:
|
|
2023
|
+
return Ul;
|
|
2024
|
+
case Video2:
|
|
2025
|
+
return Video$1;
|
|
2026
|
+
case TextArea2:
|
|
2027
|
+
return TextArea;
|
|
2028
|
+
case Select2:
|
|
2029
|
+
return Select;
|
|
2030
|
+
case Option2:
|
|
2031
|
+
return Option;
|
|
2032
|
+
default:
|
|
2033
|
+
throw new Error(`element tag not found ${type}`);
|
|
2040
2034
|
}
|
|
2041
2035
|
};
|
|
2042
2036
|
|
|
2043
|
-
//
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
const create$J = (message, x, y) => {
|
|
2054
|
-
const $EditorError = document.createElement('div');
|
|
2055
|
-
$EditorError.className = 'EditorWidgetError';
|
|
2056
|
-
$EditorError.textContent = message;
|
|
2057
|
-
$EditorError.style.left = `${x}px`;
|
|
2058
|
-
$EditorError.style.top = `${y}px`;
|
|
2059
|
-
alert$1(message);
|
|
2060
|
-
append$1($EditorError);
|
|
2061
|
-
return {
|
|
2062
|
-
$EditorError
|
|
2063
|
-
};
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
const name$s = 'EditorError';
|
|
2067
|
-
const Commands$t = {
|
|
2068
|
-
create: create$J
|
|
2037
|
+
// src/parts/GetEventListenerOptions/GetEventListenerOptions.ts
|
|
2038
|
+
var getEventListenerOptions$1 = eventName => {
|
|
2039
|
+
switch (eventName) {
|
|
2040
|
+
case "wheel":
|
|
2041
|
+
return {
|
|
2042
|
+
passive: true
|
|
2043
|
+
};
|
|
2044
|
+
default:
|
|
2045
|
+
return void 0;
|
|
2046
|
+
}
|
|
2069
2047
|
};
|
|
2070
2048
|
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2049
|
+
// src/parts/NameAnonymousFunction/NameAnonymousFunction.ts
|
|
2050
|
+
var nameAnonymousFunction$1 = (fn, name) => {
|
|
2051
|
+
Object.defineProperty(fn, "name", {
|
|
2052
|
+
value: name
|
|
2053
|
+
});
|
|
2075
2054
|
};
|
|
2076
2055
|
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2056
|
+
// src/parts/GetWrappedListener/GetWrappedListener.ts
|
|
2057
|
+
var cache$1 = /* @__PURE__ */new Map();
|
|
2058
|
+
var getWrappedListener$1 = (listener, returnValue) => {
|
|
2059
|
+
if (!returnValue) {
|
|
2060
|
+
return listener;
|
|
2061
|
+
}
|
|
2062
|
+
if (!cache$1.has(listener)) {
|
|
2063
|
+
const wrapped = event => {
|
|
2064
|
+
const uid = getComponentUidFromEvent(event);
|
|
2065
|
+
const result = listener(event);
|
|
2066
|
+
if (result.length === 0) {
|
|
2067
|
+
return;
|
|
2068
|
+
}
|
|
2069
|
+
const ipc = getIpc();
|
|
2070
|
+
ipc.send("Viewlet.executeViewletCommand", uid, ...result);
|
|
2071
|
+
};
|
|
2072
|
+
nameAnonymousFunction$1(wrapped, listener.name);
|
|
2073
|
+
cache$1.set(listener, wrapped);
|
|
2074
|
+
}
|
|
2075
|
+
return cache$1.get(listener);
|
|
2089
2076
|
};
|
|
2090
2077
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2078
|
+
// src/parts/AttachEvent/AttachEvent.ts
|
|
2079
|
+
var attachEvent$1 = ($Node, eventMap, key, value) => {
|
|
2080
|
+
const listener = eventMap[value];
|
|
2081
|
+
if (!listener) {
|
|
2082
|
+
console.warn("listener not found", value);
|
|
2093
2083
|
return;
|
|
2094
2084
|
}
|
|
2095
|
-
|
|
2096
|
-
$
|
|
2097
|
-
|
|
2098
|
-
});
|
|
2085
|
+
const options = getEventListenerOptions$1(eventMap);
|
|
2086
|
+
const wrapped = getWrappedListener$1(listener, eventMap.returnValue);
|
|
2087
|
+
$Node.addEventListener(key, wrapped, options);
|
|
2099
2088
|
};
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2089
|
+
|
|
2090
|
+
// src/parts/VirtualDomElementProp/VirtualDomElementProp.ts
|
|
2091
|
+
var setProp = ($Element, key, value, eventMap) => {
|
|
2092
|
+
switch (key) {
|
|
2093
|
+
case "maskImage":
|
|
2094
|
+
$Element.style.maskImage = `url('${value}')`;
|
|
2095
|
+
$Element.style.webkitMaskImage = `url('${value}')`;
|
|
2096
|
+
break;
|
|
2097
|
+
case "paddingLeft":
|
|
2098
|
+
case "paddingRight":
|
|
2099
|
+
case "top":
|
|
2100
|
+
case "left":
|
|
2101
|
+
case "marginTop":
|
|
2102
|
+
$Element.style[key] = typeof value === "number" ? `${value}px` : value;
|
|
2103
|
+
break;
|
|
2104
|
+
case "translate":
|
|
2105
|
+
$Element.style[key] = value;
|
|
2106
|
+
break;
|
|
2107
|
+
case "width":
|
|
2108
|
+
case "height":
|
|
2109
|
+
if ($Element instanceof HTMLImageElement) {
|
|
2110
|
+
$Element[key] = value;
|
|
2111
|
+
} else if (typeof value === "number") {
|
|
2112
|
+
$Element.style[key] = `${value}px`;
|
|
2113
|
+
} else {
|
|
2114
|
+
$Element.style[key] = value;
|
|
2115
|
+
}
|
|
2116
|
+
break;
|
|
2117
|
+
case "style":
|
|
2118
|
+
throw new Error("style property is not supported");
|
|
2119
|
+
case "childCount":
|
|
2120
|
+
case "type":
|
|
2121
|
+
break;
|
|
2122
|
+
case "ariaOwns":
|
|
2123
|
+
if (value) {
|
|
2124
|
+
$Element.setAttribute("aria-owns", value);
|
|
2125
|
+
} else {
|
|
2126
|
+
$Element.removeAttribute("aria-owns");
|
|
2127
|
+
}
|
|
2128
|
+
break;
|
|
2129
|
+
case "inputType":
|
|
2130
|
+
$Element.type = value;
|
|
2131
|
+
break;
|
|
2132
|
+
case "ariaLabelledBy":
|
|
2133
|
+
$Element.setAttribute("aria-labelledby", value);
|
|
2134
|
+
break;
|
|
2135
|
+
case "onBlur":
|
|
2136
|
+
case "onChange":
|
|
2137
|
+
case "onClick":
|
|
2138
|
+
case "onContextMenu":
|
|
2139
|
+
case "onDblClick":
|
|
2140
|
+
case "onFocus":
|
|
2141
|
+
case "onFocusIn":
|
|
2142
|
+
case "onFocusIn":
|
|
2143
|
+
case "onFocusOut":
|
|
2144
|
+
case "onInput":
|
|
2145
|
+
case "onKeyDown":
|
|
2146
|
+
case "onMouseDown":
|
|
2147
|
+
case "onPointerDown":
|
|
2148
|
+
case "onPointerOut":
|
|
2149
|
+
case "onPointerOver":
|
|
2150
|
+
case "onWheel":
|
|
2151
|
+
const eventName = key.slice(2).toLowerCase();
|
|
2152
|
+
if (!eventMap || !value) {
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
attachEvent$1($Element, eventMap, eventName, value);
|
|
2156
|
+
break;
|
|
2157
|
+
default:
|
|
2158
|
+
if (key.startsWith("data-")) {
|
|
2159
|
+
$Element.dataset[key.slice("data-".length)] = value;
|
|
2160
|
+
} else {
|
|
2161
|
+
$Element[key] = value;
|
|
2162
|
+
}
|
|
2105
2163
|
}
|
|
2106
2164
|
};
|
|
2107
2165
|
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
$InputBox.autocapitalize = 'off';
|
|
2113
|
-
// $InputBox.autocomplete = 'off' // TODO needed?
|
|
2114
|
-
$InputBox.type = 'text';
|
|
2115
|
-
$InputBox.setAttribute('autocorrect', 'off'); // for ios
|
|
2116
|
-
return $InputBox;
|
|
2117
|
-
};
|
|
2118
|
-
|
|
2119
|
-
const setBounds$6 = ($Element, x, y, width, height) => {
|
|
2120
|
-
$Element.style.top = `${y}px`;
|
|
2121
|
-
$Element.style.left = `${x}px`;
|
|
2122
|
-
$Element.style.width = `${width}px`;
|
|
2123
|
-
$Element.style.height = `${height}px`;
|
|
2124
|
-
};
|
|
2125
|
-
const setYAndHeight = ($Element, y, height) => {
|
|
2126
|
-
if (!$Element) {
|
|
2127
|
-
return;
|
|
2166
|
+
// src/parts/VirtualDomElementProps/VirtualDomElementProps.ts
|
|
2167
|
+
var setProps = ($Element, props, eventMap) => {
|
|
2168
|
+
for (const key in props) {
|
|
2169
|
+
setProp($Element, key, props[key], eventMap);
|
|
2128
2170
|
}
|
|
2129
|
-
$Element.style.translate = typeof y === 'string' ? y : `0 ${y}px`;
|
|
2130
|
-
$Element.style.height = typeof height === 'string' ? height : `${height}px`;
|
|
2131
|
-
};
|
|
2132
|
-
const setXAndWidth = ($Element, x, width) => {
|
|
2133
|
-
$Element.style.translate = `${x}px 0`;
|
|
2134
|
-
$Element.style.width = `${width}px`;
|
|
2135
|
-
};
|
|
2136
|
-
const setTop = ($Element, top) => {
|
|
2137
|
-
$Element.style.top = `${top}px`;
|
|
2138
|
-
};
|
|
2139
|
-
const setWidth = ($Element, width) => {
|
|
2140
|
-
$Element.style.width = `${width}px`;
|
|
2141
|
-
};
|
|
2142
|
-
const setXAndY = ($Element, x, y) => {
|
|
2143
|
-
$Element.style.left = `${x}px`;
|
|
2144
|
-
$Element.style.top = `${y}px`;
|
|
2145
|
-
};
|
|
2146
|
-
|
|
2147
|
-
/**
|
|
2148
|
-
*
|
|
2149
|
-
* @param {HTMLElement} $Element
|
|
2150
|
-
* @param {number} x
|
|
2151
|
-
* @param {number} y
|
|
2152
|
-
*/
|
|
2153
|
-
const setXAndYTransform = ($Element, x, y) => {
|
|
2154
|
-
$Element.style.translate = `${x}px ${y}px`;
|
|
2155
|
-
};
|
|
2156
|
-
const setHeight = ($Element, height) => {
|
|
2157
|
-
$Element.style.height = `${height}px`;
|
|
2158
2171
|
};
|
|
2159
2172
|
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
const FocusExplorerEditBox = 14;
|
|
2164
|
-
const FocusLocationList = 17;
|
|
2165
|
-
const FocusMenu = 18;
|
|
2166
|
-
const FocusQuickPickInput = 20;
|
|
2167
|
-
const FocusSearchInput = 21;
|
|
2168
|
-
const FocusSimpleBrowserInput = 23;
|
|
2169
|
-
const FocusOutput = 28;
|
|
2170
|
-
|
|
2171
|
-
const handleBlur$a = () => {
|
|
2172
|
-
send( /* EditorRename.abort */'EditorRename.abort');
|
|
2173
|
+
// src/parts/VirtualDomElement/VirtualDomElement.ts
|
|
2174
|
+
var renderDomTextNode = element => {
|
|
2175
|
+
return document.createTextNode(element.text);
|
|
2173
2176
|
};
|
|
2174
|
-
|
|
2175
|
-
const
|
|
2176
|
-
$
|
|
2177
|
-
$
|
|
2178
|
-
|
|
2179
|
-
$RenameWidget.className = 'RenameWidget';
|
|
2180
|
-
$RenameWidget.append($RenameWidgetInputBox);
|
|
2181
|
-
setXAndY($RenameWidget, x, y);
|
|
2182
|
-
append$1($RenameWidget);
|
|
2183
|
-
focus$i($RenameWidgetInputBox);
|
|
2184
|
-
send('Focus.setFocus', FocusEditorRename);
|
|
2185
|
-
return {
|
|
2186
|
-
$RenameWidget,
|
|
2187
|
-
$RenameWidgetInputBox
|
|
2188
|
-
};
|
|
2177
|
+
var renderDomElement = (element, eventMap) => {
|
|
2178
|
+
const tag = getElementTag(element.type);
|
|
2179
|
+
const $Element = document.createElement(tag);
|
|
2180
|
+
setProps($Element, element, eventMap);
|
|
2181
|
+
return $Element;
|
|
2189
2182
|
};
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2183
|
+
var render = (element, eventMap) => {
|
|
2184
|
+
switch (element.type) {
|
|
2185
|
+
case Text$2:
|
|
2186
|
+
return renderDomTextNode(element);
|
|
2187
|
+
default:
|
|
2188
|
+
return renderDomElement(element, eventMap);
|
|
2189
|
+
}
|
|
2193
2190
|
};
|
|
2194
2191
|
|
|
2195
|
-
//
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2192
|
+
// src/parts/RenderInternal/RenderInternal.ts
|
|
2193
|
+
var renderInternal2 = ($Parent, elements, eventMap) => {
|
|
2194
|
+
const max = elements.length - 1;
|
|
2195
|
+
let stack = [];
|
|
2196
|
+
for (let i = max; i >= 0; i--) {
|
|
2197
|
+
const element = elements[i];
|
|
2198
|
+
const $Element = render(element, eventMap);
|
|
2199
|
+
if (element.childCount > 0) {
|
|
2200
|
+
$Element.append(...stack.slice(0, element.childCount));
|
|
2201
|
+
stack = stack.slice(element.childCount);
|
|
2202
|
+
}
|
|
2203
|
+
stack.unshift($Element);
|
|
2204
|
+
}
|
|
2205
|
+
$Parent.append(...stack);
|
|
2202
2206
|
};
|
|
2203
2207
|
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
finish: finish
|
|
2208
|
+
// src/parts/VirtualDom/VirtualDom.ts
|
|
2209
|
+
var renderInto = ($Parent, dom, eventMap = {}) => {
|
|
2210
|
+
clearNode($Parent);
|
|
2211
|
+
renderInternal2($Parent, dom, eventMap);
|
|
2209
2212
|
};
|
|
2210
|
-
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
name: name$r
|
|
2213
|
+
var render2 = (elements, eventMap = {}) => {
|
|
2214
|
+
const $Root = document.createElement("div");
|
|
2215
|
+
renderInternal2($Root, elements, eventMap);
|
|
2216
|
+
return $Root;
|
|
2215
2217
|
};
|
|
2216
2218
|
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
return
|
|
2219
|
+
// src/parts/RememberFocus/RememberFocus.ts
|
|
2220
|
+
var queryInputs = $Viewlet => {
|
|
2221
|
+
return [...$Viewlet.querySelectorAll("input, textarea")];
|
|
2220
2222
|
};
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
const
|
|
2226
|
-
|
|
2227
|
-
|
|
2223
|
+
var rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
|
|
2224
|
+
const oldLeft = $Viewlet.style.left;
|
|
2225
|
+
const oldTop = $Viewlet.style.top;
|
|
2226
|
+
const oldWidth = $Viewlet.style.width;
|
|
2227
|
+
const oldHeight = $Viewlet.style.height;
|
|
2228
|
+
const focused = document.activeElement.getAttribute("name");
|
|
2229
|
+
const $$Inputs = queryInputs($Viewlet);
|
|
2230
|
+
const inputMap = /* @__PURE__ */Object.create(null);
|
|
2231
|
+
for (const $Input of $$Inputs) {
|
|
2232
|
+
inputMap[$Input.name] = $Input.value;
|
|
2233
|
+
}
|
|
2234
|
+
if (uid) {
|
|
2235
|
+
const $New = render2(dom, eventMap).firstChild;
|
|
2236
|
+
setComponentUid($New, uid);
|
|
2237
|
+
$Viewlet.replaceWith($New);
|
|
2238
|
+
$Viewlet = $New;
|
|
2239
|
+
} else {
|
|
2240
|
+
renderInto($Viewlet, dom, eventMap);
|
|
2241
|
+
}
|
|
2242
|
+
const $$NewInputs = queryInputs($Viewlet);
|
|
2243
|
+
for (const $Input of $$NewInputs) {
|
|
2244
|
+
$Input.value = inputMap[$Input.name] || $Input.value || "";
|
|
2245
|
+
}
|
|
2246
|
+
if (focused) {
|
|
2247
|
+
const $Focused = $Viewlet.querySelector(`[name="${focused}"]`);
|
|
2248
|
+
if ($Focused) {
|
|
2249
|
+
$Focused.focus();
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
$Viewlet.style.top = oldTop;
|
|
2253
|
+
$Viewlet.style.left = oldLeft;
|
|
2254
|
+
$Viewlet.style.height = oldHeight;
|
|
2255
|
+
$Viewlet.style.width = oldWidth;
|
|
2256
|
+
return $Viewlet;
|
|
2228
2257
|
};
|
|
2229
2258
|
|
|
2230
|
-
const
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2259
|
+
const main = async () => {
|
|
2260
|
+
onerror = handleUnhandledError;
|
|
2261
|
+
onunhandledrejection = handleUnhandledRejection;
|
|
2262
|
+
if ('SecurityPolicyViolationEvent' in self) {
|
|
2263
|
+
self.addEventListener('securitypolicyviolation', handleContentSecurityPolicyViolation);
|
|
2264
|
+
}
|
|
2265
|
+
setLoad(load$1);
|
|
2266
|
+
if (platform === Web) {
|
|
2267
|
+
// disable prompt to download app as pwa
|
|
2268
|
+
// @ts-expect-error
|
|
2269
|
+
window.onbeforeinstallprompt = handleBeforeInstallPrompt;
|
|
2270
|
+
}
|
|
2271
|
+
// TODO this is discovered very late
|
|
2272
|
+
await hydrate$1();
|
|
2273
|
+
setIpc(RendererWorker);
|
|
2235
2274
|
};
|
|
2236
2275
|
|
|
2237
|
-
|
|
2238
|
-
__proto__: null,
|
|
2239
|
-
Commands: Commands$r,
|
|
2240
|
-
name: name$q
|
|
2241
|
-
};
|
|
2276
|
+
main();
|
|
2242
2277
|
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2278
|
+
const play = async src => {
|
|
2279
|
+
const audio = new Audio(src);
|
|
2280
|
+
await audio.play();
|
|
2245
2281
|
};
|
|
2246
2282
|
|
|
2247
|
-
const name$
|
|
2248
|
-
const Commands$
|
|
2249
|
-
|
|
2283
|
+
const name$y = 'Audio';
|
|
2284
|
+
const Commands$z = {
|
|
2285
|
+
play: play
|
|
2250
2286
|
};
|
|
2251
2287
|
|
|
2252
|
-
const
|
|
2288
|
+
const Audio_ipc = {
|
|
2253
2289
|
__proto__: null,
|
|
2254
|
-
Commands: Commands$
|
|
2255
|
-
name: name$
|
|
2290
|
+
Commands: Commands$z,
|
|
2291
|
+
name: name$y
|
|
2256
2292
|
};
|
|
2257
2293
|
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
const $ImagePreviewCaption = $ImagePreviewImage.nextSibling;
|
|
2261
|
-
const width = $ImagePreviewImage.naturalWidth;
|
|
2262
|
-
const height = $ImagePreviewImage.naturalHeight;
|
|
2263
|
-
$ImagePreviewCaption.textContent = `${width} × ${height}`;
|
|
2264
|
-
};
|
|
2265
|
-
const handleImageError$1 = event => {
|
|
2266
|
-
const $ImagePreviewImage = event.target;
|
|
2267
|
-
const $ImagePreviewCaption = $ImagePreviewImage.nextSibling;
|
|
2268
|
-
$ImagePreviewCaption.textContent = 'Image could not be loaded';
|
|
2294
|
+
const readText = async () => {
|
|
2295
|
+
return navigator.clipboard.readText();
|
|
2269
2296
|
};
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
const showError = (message, y, x) => {
|
|
2274
|
-
const $ImagePreviewImage = document.createElement('img');
|
|
2275
|
-
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
2276
|
-
$ImagePreviewImage.alt = '';
|
|
2277
|
-
const $ImagePreviewCaption = document.createElement('figcaption');
|
|
2278
|
-
$ImagePreviewCaption.className = 'ImagePreviewCaption';
|
|
2279
|
-
$ImagePreviewCaption.textContent = message;
|
|
2280
|
-
const $ImagePreview = document.createElement('figure');
|
|
2281
|
-
$ImagePreview.className = 'ImagePreview';
|
|
2282
|
-
$ImagePreview.append($ImagePreviewImage, $ImagePreviewCaption);
|
|
2283
|
-
setXAndY($ImagePreview, x, y);
|
|
2284
|
-
$ImagePreview.style.display = 'none';
|
|
2285
|
-
append$1($ImagePreview);
|
|
2286
|
-
return {
|
|
2287
|
-
$ImagePreview,
|
|
2288
|
-
$ImagePreviewCaption,
|
|
2289
|
-
$ImagePreviewImage
|
|
2290
|
-
};
|
|
2297
|
+
const writeText = async text => {
|
|
2298
|
+
string(text);
|
|
2299
|
+
await navigator.clipboard.writeText(text);
|
|
2291
2300
|
};
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
$ImagePreviewImage.alt = '';
|
|
2297
|
-
const $ImagePreviewCaption = document.createElement('figcaption');
|
|
2298
|
-
$ImagePreviewCaption.className = 'ImagePreviewCaption';
|
|
2299
|
-
const $ImagePreview = document.createElement('figure');
|
|
2300
|
-
$ImagePreview.className = 'ImagePreview';
|
|
2301
|
-
$ImagePreview.append($ImagePreviewImage, $ImagePreviewCaption);
|
|
2302
|
-
$ImagePreviewImage.onload = handleImageLoad;
|
|
2303
|
-
$ImagePreviewImage.onerror = handleImageError$1;
|
|
2304
|
-
$ImagePreview.style.top = `${top}px`;
|
|
2305
|
-
$ImagePreview.style.left = `${left}px`;
|
|
2306
|
-
$ImagePreview.style.display = 'none';
|
|
2307
|
-
append$1($ImagePreview);
|
|
2308
|
-
return {
|
|
2309
|
-
$ImagePreview,
|
|
2310
|
-
$ImagePreviewCaption,
|
|
2311
|
-
$ImagePreviewImage
|
|
2312
|
-
};
|
|
2301
|
+
const writeImage = async blob => {
|
|
2302
|
+
await navigator.clipboard.write([new ClipboardItem({
|
|
2303
|
+
[blob.type]: blob
|
|
2304
|
+
})]);
|
|
2313
2305
|
};
|
|
2314
|
-
const
|
|
2315
|
-
|
|
2306
|
+
const execCopy = async () => {
|
|
2307
|
+
// @ts-expect-error
|
|
2308
|
+
const text = getSelection().toString();
|
|
2309
|
+
await writeText(text);
|
|
2316
2310
|
};
|
|
2317
|
-
|
|
2318
|
-
|
|
2311
|
+
|
|
2312
|
+
const name$x = 'ClipBoard';
|
|
2313
|
+
const Commands$y = {
|
|
2314
|
+
execCopy: execCopy,
|
|
2315
|
+
readText: readText,
|
|
2316
|
+
writeImage: writeImage,
|
|
2317
|
+
writeText: writeText
|
|
2319
2318
|
};
|
|
2320
2319
|
|
|
2321
|
-
const
|
|
2320
|
+
const ClipBoard_ipc = {
|
|
2322
2321
|
__proto__: null,
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
showError,
|
|
2326
|
-
update
|
|
2322
|
+
Commands: Commands$y,
|
|
2323
|
+
name: name$x
|
|
2327
2324
|
};
|
|
2328
2325
|
|
|
2329
|
-
const
|
|
2330
|
-
|
|
2331
|
-
create: create$G,
|
|
2332
|
-
dispose: dispose$h,
|
|
2333
|
-
showError: showError,
|
|
2334
|
-
update: update
|
|
2326
|
+
const prompt$1 = message => {
|
|
2327
|
+
return confirm(message);
|
|
2335
2328
|
};
|
|
2336
2329
|
|
|
2337
|
-
const
|
|
2330
|
+
const name$w = 'ConfirmPrompt';
|
|
2331
|
+
const Commands$x = {
|
|
2332
|
+
prompt: prompt$1
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
const ConfirmPrompt_ipc = {
|
|
2338
2336
|
__proto__: null,
|
|
2339
|
-
Commands: Commands$
|
|
2340
|
-
name: name$
|
|
2337
|
+
Commands: Commands$x,
|
|
2338
|
+
name: name$w
|
|
2341
2339
|
};
|
|
2342
2340
|
|
|
2343
|
-
const
|
|
2344
|
-
|
|
2341
|
+
const state$7 = {
|
|
2342
|
+
styleSheets: Object.create(null)
|
|
2345
2343
|
};
|
|
2346
|
-
const
|
|
2347
|
-
|
|
2344
|
+
const set$4 = (id, sheet) => {
|
|
2345
|
+
state$7.styleSheets[id] = sheet;
|
|
2348
2346
|
};
|
|
2349
|
-
const
|
|
2350
|
-
return
|
|
2347
|
+
const get$5 = id => {
|
|
2348
|
+
return state$7.styleSheets[id];
|
|
2351
2349
|
};
|
|
2352
2350
|
|
|
2353
|
-
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2356
|
-
|
|
2351
|
+
const addCssStyleSheet = async (id, text) => {
|
|
2352
|
+
const existing = get$5(id);
|
|
2353
|
+
if (existing) {
|
|
2354
|
+
await existing.replace(text);
|
|
2357
2355
|
return;
|
|
2358
2356
|
}
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
// addEventListener('popstate', handlePopState)
|
|
2357
|
+
const sheet = new CSSStyleSheet({});
|
|
2358
|
+
set$4(id, sheet);
|
|
2359
|
+
await sheet.replace(text);
|
|
2360
|
+
document.adoptedStyleSheets.push(sheet);
|
|
2364
2361
|
};
|
|
2365
2362
|
|
|
2366
|
-
const
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
navigator.windowControlsOverlay?.getTitlebarAreaRect) {
|
|
2370
|
-
// @ts-expect-error
|
|
2371
|
-
const titleBarRect = navigator.windowControlsOverlay.getTitlebarAreaRect();
|
|
2372
|
-
return titleBarRect.height;
|
|
2373
|
-
}
|
|
2374
|
-
return 0;
|
|
2363
|
+
const name$v = 'Css';
|
|
2364
|
+
const Commands$w = {
|
|
2365
|
+
addCssStyleSheet: addCssStyleSheet
|
|
2375
2366
|
};
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
};
|
|
2367
|
+
|
|
2368
|
+
const Css_ipc = {
|
|
2369
|
+
__proto__: null,
|
|
2370
|
+
Commands: Commands$w,
|
|
2371
|
+
name: name$v
|
|
2382
2372
|
};
|
|
2383
2373
|
|
|
2384
|
-
const
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2374
|
+
const modules = ['ActivityBar', 'Ajax', 'Allocator', 'Callback', 'Command', 'Context', 'ContextMenu', 'Delay', 'Developer', 'DomPool', 'Editor', 'Exec', 'ExtensionHost', 'FileSystem', 'KeyBindings', 'Layout', 'Main', 'Notification', 'Panel', 'Parts', 'QuickPick', 'Renderer', 'RendererWorker', 'Search', 'SharedProcess', 'SideBar', 'StatusBar', 'TitleBar', 'Viewlet', 'ViewletController', 'ViewService', 'Vscode', 'Window', 'Workbench', 'Worker', 'Workspace'];
|
|
2375
|
+
|
|
2376
|
+
// TODO send to renderer worker -> renderer worker has all state
|
|
2377
|
+
const showState = async () => {
|
|
2378
|
+
const state = Object.create(null);
|
|
2379
|
+
for (const module of modules) {
|
|
2380
|
+
let imported;
|
|
2381
|
+
try {
|
|
2382
|
+
imported = await import(`../${module}/${module}.js`);
|
|
2383
|
+
} catch {}
|
|
2384
|
+
if (imported?.state) {
|
|
2385
|
+
state[module] = imported.state;
|
|
2391
2386
|
}
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2387
|
+
}
|
|
2388
|
+
info(state);
|
|
2394
2389
|
};
|
|
2395
2390
|
|
|
2396
|
-
const name$
|
|
2397
|
-
const Commands$
|
|
2398
|
-
|
|
2391
|
+
const name$u = 'Developer';
|
|
2392
|
+
const Commands$v = {
|
|
2393
|
+
showState: showState
|
|
2399
2394
|
};
|
|
2400
2395
|
|
|
2401
|
-
const
|
|
2396
|
+
const Developer_ipc = {
|
|
2402
2397
|
__proto__: null,
|
|
2403
|
-
Commands: Commands$
|
|
2404
|
-
name: name$
|
|
2398
|
+
Commands: Commands$v,
|
|
2399
|
+
name: name$u
|
|
2405
2400
|
};
|
|
2406
2401
|
|
|
2407
|
-
const
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2402
|
+
const downloadFile = (fileName, url) => {
|
|
2403
|
+
const a = document.createElement('a');
|
|
2404
|
+
a.href = url;
|
|
2405
|
+
a.download = fileName;
|
|
2406
|
+
a.click();
|
|
2410
2407
|
};
|
|
2411
2408
|
|
|
2412
|
-
const
|
|
2409
|
+
const name$t = 'Download';
|
|
2410
|
+
const Commands$u = {
|
|
2411
|
+
downloadFile: downloadFile
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2414
|
+
const Download_ipc = {
|
|
2413
2415
|
__proto__: null,
|
|
2414
|
-
Commands: Commands$
|
|
2415
|
-
name: name$
|
|
2416
|
+
Commands: Commands$u,
|
|
2417
|
+
name: name$t
|
|
2416
2418
|
};
|
|
2417
2419
|
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2420
|
+
// based on https://github.com/microsoft/vscode/blob/5f87632829dc3ac80203e2377727935184399431/src/vs/base/browser/ui/aria/aria.ts (License MIT)
|
|
2421
|
+
|
|
2422
|
+
const state$6 = {
|
|
2423
|
+
$AriaAlert1: undefined,
|
|
2424
|
+
$AriaAlert2: undefined,
|
|
2425
|
+
$AriaMessages: undefined
|
|
2426
|
+
};
|
|
2427
|
+
const getAriaAlert1 = () => {
|
|
2428
|
+
return state$6.$AriaAlert1;
|
|
2429
|
+
};
|
|
2430
|
+
const getAriaAlert2 = () => {
|
|
2431
|
+
return state$6.$AriaAlert2;
|
|
2432
|
+
};
|
|
2433
|
+
const setElements = ($AriaMessages, $AriaAlert1, $AriaAlert2) => {
|
|
2434
|
+
state$6.$AriaMessages = $AriaMessages;
|
|
2435
|
+
state$6.$AriaAlert1 = $AriaAlert1;
|
|
2436
|
+
state$6.$AriaAlert2 = $AriaAlert2;
|
|
2437
|
+
};
|
|
2438
|
+
const hasElements = () => {
|
|
2439
|
+
return state$6.$AriaMessages;
|
|
2440
|
+
};
|
|
2441
|
+
|
|
2442
|
+
const True = 'true';
|
|
2443
|
+
const False = 'false';
|
|
2444
|
+
|
|
2445
|
+
const Alert = 'alert';
|
|
2446
|
+
const Application = 'application';
|
|
2447
|
+
const Code = 'code';
|
|
2448
|
+
const Complementary = 'complementary';
|
|
2449
|
+
const ContentInfo = 'contentinfo';
|
|
2450
|
+
const Group = 'group';
|
|
2451
|
+
const List$1 = 'list';
|
|
2452
|
+
const ListBox = 'listbox';
|
|
2453
|
+
const Log = 'log';
|
|
2454
|
+
const Main$1 = 'main';
|
|
2455
|
+
const Menu = 'menu';
|
|
2456
|
+
const None$2 = 'none';
|
|
2457
|
+
const Status = 'status';
|
|
2458
|
+
const TabList = 'tablist';
|
|
2459
|
+
const TextBox = 'textbox';
|
|
2460
|
+
const ToolBar = 'toolbar';
|
|
2461
|
+
const Tree = 'tree';
|
|
2462
|
+
const ComboBox = 'combobox';
|
|
2463
|
+
|
|
2464
|
+
const AriaOwns = 'aria-owns';
|
|
2465
|
+
const AriaLabelledBy = 'aria-labelledby';
|
|
2466
|
+
const AriaDescribedBy = 'aria-describedby';
|
|
2467
|
+
const AriaActiveDescendant = 'aria-activedescendant';
|
|
2468
|
+
const AriaSelected = 'aria-selected';
|
|
2469
|
+
const AriaControls = 'aria-controls';
|
|
2470
|
+
const AriaHidden = 'aria-hidden';
|
|
2471
|
+
|
|
2472
|
+
// based on https://github.com/microsoft/vscode/blob/5f87632829dc3ac80203e2377727935184399431/src/vs/base/browser/ui/aria/aria.ts (License MIT)
|
|
2473
|
+
const create$AriaAlert = () => {
|
|
2474
|
+
const $AriaAlert = document.createElement('div');
|
|
2475
|
+
$AriaAlert.className = 'AriaAlert';
|
|
2476
|
+
$AriaAlert.role = Alert;
|
|
2477
|
+
$AriaAlert.ariaAtomic = True;
|
|
2478
|
+
return $AriaAlert;
|
|
2479
|
+
};
|
|
2480
|
+
const setMessage$3 = ($Old, $New, message) => {
|
|
2481
|
+
$Old.textContent = String(Math.random());
|
|
2482
|
+
$Old.ariaHidden = True;
|
|
2483
|
+
$New.removeAttribute(AriaHidden);
|
|
2484
|
+
$New.textContent = message;
|
|
2485
|
+
};
|
|
2486
|
+
const alert$1 = message => {
|
|
2487
|
+
if (!message) {
|
|
2488
|
+
return;
|
|
2489
|
+
}
|
|
2490
|
+
if (!hasElements()) {
|
|
2491
|
+
const $AriaAlert1 = create$AriaAlert();
|
|
2492
|
+
const $AriaAlert2 = create$AriaAlert();
|
|
2493
|
+
// TODO find better name, for example AriaMessages, AriaOutlet, AriaContainer, ScreenReaderMessages
|
|
2494
|
+
const $AriaMessages = document.createElement('div');
|
|
2495
|
+
$AriaMessages.className = 'AriaContainer';
|
|
2496
|
+
$AriaMessages.append($AriaAlert1, $AriaAlert2);
|
|
2497
|
+
document.body.append($AriaMessages);
|
|
2498
|
+
setElements($AriaMessages, $AriaAlert1, $AriaAlert2);
|
|
2499
|
+
}
|
|
2500
|
+
const $AriaAlert1 = getAriaAlert1();
|
|
2501
|
+
const $AriaAlert2 = getAriaAlert2();
|
|
2502
|
+
// @ts-expect-error
|
|
2503
|
+
if ($AriaAlert1.textContent === message) {
|
|
2504
|
+
setMessage$3($AriaAlert1, $AriaAlert2, message);
|
|
2505
|
+
} else {
|
|
2506
|
+
setMessage$3($AriaAlert2, $AriaAlert1, message);
|
|
2507
|
+
}
|
|
2421
2508
|
};
|
|
2422
2509
|
|
|
2423
|
-
const
|
|
2510
|
+
const AriaAlert = {
|
|
2424
2511
|
__proto__: null,
|
|
2425
|
-
|
|
2426
|
-
name: name$l
|
|
2512
|
+
alert: alert$1
|
|
2427
2513
|
};
|
|
2428
2514
|
|
|
2429
|
-
|
|
2430
|
-
const
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2515
|
+
// TODO this file is not needed when all elements are position fixed
|
|
2516
|
+
const state$5 = {
|
|
2517
|
+
isInDom: false,
|
|
2518
|
+
$PreviousFocusElement: undefined,
|
|
2519
|
+
widgetSet: new Set(),
|
|
2520
|
+
$Widgets: undefined
|
|
2435
2521
|
};
|
|
2436
|
-
|
|
2437
|
-
const
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2522
|
+
const create$Widgets = () => {
|
|
2523
|
+
const $Widgets = document.createElement('div');
|
|
2524
|
+
$Widgets.id = 'Widgets';
|
|
2525
|
+
$Widgets.className = 'Widgets';
|
|
2526
|
+
return $Widgets;
|
|
2441
2527
|
};
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2528
|
+
const append$1 = $Element => {
|
|
2529
|
+
// TODO should not call append in the first place if it is already in dom
|
|
2530
|
+
if (state$5.widgetSet.has($Element)) {
|
|
2531
|
+
return;
|
|
2532
|
+
}
|
|
2533
|
+
state$5.widgetSet.add($Element);
|
|
2534
|
+
if (state$5.$Widgets) {
|
|
2535
|
+
// @ts-expect-error
|
|
2536
|
+
state$5.$Widgets.append($Element);
|
|
2537
|
+
} else {
|
|
2538
|
+
// @ts-expect-error
|
|
2539
|
+
state$5.$Widgets = create$Widgets();
|
|
2540
|
+
// @ts-expect-error
|
|
2541
|
+
state$5.$Widgets.append($Element);
|
|
2542
|
+
// @ts-expect-error
|
|
2543
|
+
document.body.append(state$5.$Widgets);
|
|
2544
|
+
}
|
|
2545
|
+
};
|
|
2546
|
+
const remove$1 = $Element => {
|
|
2547
|
+
if (!$Element) {
|
|
2548
|
+
// TODO $Element should always be defined
|
|
2549
|
+
return;
|
|
2550
|
+
}
|
|
2551
|
+
state$5.widgetSet.delete($Element);
|
|
2446
2552
|
$Element.remove();
|
|
2447
|
-
|
|
2553
|
+
// TODO state.$Widgets should always be defined at this point
|
|
2554
|
+
if (state$5.widgetSet.size === 0 && state$5.$Widgets) {
|
|
2555
|
+
// @ts-expect-error
|
|
2556
|
+
state$5.$Widgets.remove();
|
|
2557
|
+
state$5.$Widgets = undefined;
|
|
2558
|
+
}
|
|
2448
2559
|
};
|
|
2449
2560
|
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2561
|
+
// TODO not sure whether created dom node
|
|
2562
|
+
// should stay in state or be removed
|
|
2563
|
+
// one option would result in less memory usage
|
|
2564
|
+
// the other option would result in less garbage collection
|
|
2565
|
+
|
|
2566
|
+
// probably should optimize for less memory usage by default
|
|
2567
|
+
// unless the element is very likely to be used again soon (<30s)
|
|
2568
|
+
// but that's difficult to know
|
|
2569
|
+
|
|
2570
|
+
// TODO hide widget after timeout or mousemove
|
|
2571
|
+
const create$J = (message, x, y) => {
|
|
2572
|
+
const $EditorError = document.createElement('div');
|
|
2573
|
+
$EditorError.className = 'EditorWidgetError';
|
|
2574
|
+
$EditorError.textContent = message;
|
|
2575
|
+
$EditorError.style.left = `${x}px`;
|
|
2576
|
+
$EditorError.style.top = `${y}px`;
|
|
2577
|
+
alert$1(message);
|
|
2578
|
+
append$1($EditorError);
|
|
2579
|
+
return {
|
|
2580
|
+
$EditorError
|
|
2581
|
+
};
|
|
2461
2582
|
};
|
|
2462
2583
|
|
|
2463
|
-
const name$
|
|
2464
|
-
const Commands$
|
|
2465
|
-
|
|
2584
|
+
const name$s = 'EditorError';
|
|
2585
|
+
const Commands$t = {
|
|
2586
|
+
create: create$J
|
|
2466
2587
|
};
|
|
2467
2588
|
|
|
2468
|
-
const
|
|
2589
|
+
const EditorError_ipc = {
|
|
2469
2590
|
__proto__: null,
|
|
2470
|
-
Commands: Commands$
|
|
2471
|
-
name: name$
|
|
2591
|
+
Commands: Commands$t,
|
|
2592
|
+
name: name$s
|
|
2472
2593
|
};
|
|
2473
2594
|
|
|
2474
|
-
const
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
const $Measure = document.createElement('div');
|
|
2481
|
-
$Measure.style.width = `${width}px`;
|
|
2482
|
-
$Measure.style.contain = 'content';
|
|
2483
|
-
$Measure.style.position = 'absolute';
|
|
2484
|
-
$Measure.style.top = '-9999px';
|
|
2485
|
-
$Measure.style.left = '-9999px';
|
|
2486
|
-
$Measure.style.fontSize = `${fontSize}px`;
|
|
2487
|
-
$Measure.style.lineHeight = lineHeight;
|
|
2488
|
-
$Measure.textContent = text;
|
|
2489
|
-
return getElementHeight($Measure);
|
|
2595
|
+
const state$4 = {
|
|
2596
|
+
/**
|
|
2597
|
+
* @type {HTMLElement|undefined}
|
|
2598
|
+
*/
|
|
2599
|
+
$PreviousFocusElement: undefined,
|
|
2600
|
+
currentFocus: ''
|
|
2490
2601
|
};
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
const Commands$j = {
|
|
2494
|
-
measureTextBlockHeight: measureTextBlockHeight
|
|
2602
|
+
const setElement = $Element => {
|
|
2603
|
+
state$4.$PreviousFocusElement = $Element;
|
|
2495
2604
|
};
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
__proto__: null,
|
|
2499
|
-
Commands: Commands$j,
|
|
2500
|
-
name: name$i
|
|
2605
|
+
const getElement = () => {
|
|
2606
|
+
return state$4.$PreviousFocusElement;
|
|
2501
2607
|
};
|
|
2502
2608
|
|
|
2503
|
-
const
|
|
2504
|
-
|
|
2505
|
-
if (!meta) {
|
|
2609
|
+
const focus$i = $Element => {
|
|
2610
|
+
if ($Element === document.activeElement) {
|
|
2506
2611
|
return;
|
|
2507
2612
|
}
|
|
2508
|
-
|
|
2509
|
-
|
|
2613
|
+
setElement(document.activeElement);
|
|
2614
|
+
$Element.focus({
|
|
2615
|
+
preventScroll: true
|
|
2616
|
+
});
|
|
2510
2617
|
};
|
|
2511
|
-
|
|
2512
|
-
const
|
|
2513
|
-
|
|
2514
|
-
|
|
2618
|
+
const focusPrevious$1 = () => {
|
|
2619
|
+
const $Element = getElement();
|
|
2620
|
+
if ($Element) {
|
|
2621
|
+
// @ts-expect-error
|
|
2622
|
+
$Element.focus();
|
|
2623
|
+
}
|
|
2515
2624
|
};
|
|
2516
2625
|
|
|
2517
|
-
const
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2626
|
+
const create$I = () => {
|
|
2627
|
+
const $InputBox = document.createElement('input');
|
|
2628
|
+
$InputBox.className = 'InputBox';
|
|
2629
|
+
$InputBox.spellcheck = false;
|
|
2630
|
+
$InputBox.autocapitalize = 'off';
|
|
2631
|
+
// $InputBox.autocomplete = 'off' // TODO needed?
|
|
2632
|
+
$InputBox.type = 'text';
|
|
2633
|
+
$InputBox.setAttribute('autocorrect', 'off'); // for ios
|
|
2634
|
+
return $InputBox;
|
|
2521
2635
|
};
|
|
2522
2636
|
|
|
2523
|
-
const
|
|
2524
|
-
|
|
2525
|
-
$
|
|
2526
|
-
$
|
|
2527
|
-
|
|
2528
|
-
};
|
|
2529
|
-
const create$F = (type, message) => {
|
|
2530
|
-
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
2531
|
-
const $Notification = create$Notification(message);
|
|
2532
|
-
append$1($Notification);
|
|
2637
|
+
const setBounds$6 = ($Element, x, y, width, height) => {
|
|
2638
|
+
$Element.style.top = `${y}px`;
|
|
2639
|
+
$Element.style.left = `${x}px`;
|
|
2640
|
+
$Element.style.width = `${width}px`;
|
|
2641
|
+
$Element.style.height = `${height}px`;
|
|
2533
2642
|
};
|
|
2534
|
-
const
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
if ($Parent.children[i] === $Child) {
|
|
2538
|
-
return i;
|
|
2539
|
-
}
|
|
2643
|
+
const setYAndHeight = ($Element, y, height) => {
|
|
2644
|
+
if (!$Element) {
|
|
2645
|
+
return;
|
|
2540
2646
|
}
|
|
2541
|
-
|
|
2647
|
+
$Element.style.translate = typeof y === 'string' ? y : `0 ${y}px`;
|
|
2648
|
+
$Element.style.height = typeof height === 'string' ? height : `${height}px`;
|
|
2542
2649
|
};
|
|
2543
|
-
const
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
case 'NotificationOption':
|
|
2547
|
-
const index = findIndex$1($Target);
|
|
2548
|
-
send( /* Notification.handleClick */'Notification.handleClick', /* index */index);
|
|
2549
|
-
break;
|
|
2550
|
-
}
|
|
2650
|
+
const setXAndWidth = ($Element, x, width) => {
|
|
2651
|
+
$Element.style.translate = `${x}px 0`;
|
|
2652
|
+
$Element.style.width = `${width}px`;
|
|
2551
2653
|
};
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2654
|
+
const setTop = ($Element, top) => {
|
|
2655
|
+
$Element.style.top = `${top}px`;
|
|
2656
|
+
};
|
|
2657
|
+
const setWidth = ($Element, width) => {
|
|
2658
|
+
$Element.style.width = `${width}px`;
|
|
2659
|
+
};
|
|
2660
|
+
const setXAndY = ($Element, x, y) => {
|
|
2661
|
+
$Element.style.left = `${x}px`;
|
|
2662
|
+
$Element.style.top = `${y}px`;
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
*
|
|
2667
|
+
* @param {HTMLElement} $Element
|
|
2668
|
+
* @param {number} x
|
|
2669
|
+
* @param {number} y
|
|
2670
|
+
*/
|
|
2671
|
+
const setXAndYTransform = ($Element, x, y) => {
|
|
2672
|
+
$Element.style.translate = `${x}px ${y}px`;
|
|
2673
|
+
};
|
|
2674
|
+
const setHeight = ($Element, height) => {
|
|
2675
|
+
$Element.style.height = `${height}px`;
|
|
2676
|
+
};
|
|
2677
|
+
|
|
2678
|
+
const FocusDebugInput = 6;
|
|
2679
|
+
const FocusEditorRename = 11;
|
|
2680
|
+
const FocusExplorerEditBox = 14;
|
|
2681
|
+
const FocusLocationList = 17;
|
|
2682
|
+
const FocusMenu = 18;
|
|
2683
|
+
const FocusQuickPickInput = 20;
|
|
2684
|
+
const FocusSearchInput = 21;
|
|
2685
|
+
const FocusSimpleBrowserInput = 23;
|
|
2686
|
+
const FocusOutput = 28;
|
|
2687
|
+
|
|
2688
|
+
const handleBlur$a = () => {
|
|
2689
|
+
send( /* EditorRename.abort */'EditorRename.abort');
|
|
2569
2690
|
};
|
|
2570
|
-
const
|
|
2571
|
-
const $
|
|
2572
|
-
|
|
2691
|
+
const create$H = (x, y) => {
|
|
2692
|
+
const $RenameWidgetInputBox = create$I();
|
|
2693
|
+
$RenameWidgetInputBox.className = 'RenameWidgetInputBox';
|
|
2694
|
+
$RenameWidgetInputBox.onblur = handleBlur$a;
|
|
2695
|
+
const $RenameWidget = document.createElement('div');
|
|
2696
|
+
$RenameWidget.className = 'RenameWidget';
|
|
2697
|
+
$RenameWidget.append($RenameWidgetInputBox);
|
|
2698
|
+
setXAndY($RenameWidget, x, y);
|
|
2699
|
+
append$1($RenameWidget);
|
|
2700
|
+
focus$i($RenameWidgetInputBox);
|
|
2701
|
+
send('Focus.setFocus', FocusEditorRename);
|
|
2702
|
+
return {
|
|
2703
|
+
$RenameWidget,
|
|
2704
|
+
$RenameWidgetInputBox
|
|
2705
|
+
};
|
|
2573
2706
|
};
|
|
2574
|
-
const dispose$
|
|
2575
|
-
//
|
|
2707
|
+
const dispose$i = state => {
|
|
2708
|
+
// TODO focus editor
|
|
2709
|
+
remove$1(state.$RenameWidget);
|
|
2576
2710
|
};
|
|
2577
2711
|
|
|
2578
|
-
|
|
2712
|
+
// TODO could also be event based
|
|
2713
|
+
// finish -> finish -> finishWithValue
|
|
2579
2714
|
|
|
2580
|
-
|
|
2581
|
-
const
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
dispose: dispose$g
|
|
2715
|
+
const finish = state => {
|
|
2716
|
+
const value = state.$RenameWidgetInputBox.value;
|
|
2717
|
+
// TODO don't like side effect here
|
|
2718
|
+
return value;
|
|
2585
2719
|
};
|
|
2586
2720
|
|
|
2587
|
-
const
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2721
|
+
const name$r = 'EditorRename';
|
|
2722
|
+
const Commands$s = {
|
|
2723
|
+
create: create$H,
|
|
2724
|
+
dispose: dispose$i,
|
|
2725
|
+
finish: finish
|
|
2591
2726
|
};
|
|
2592
2727
|
|
|
2593
|
-
const
|
|
2728
|
+
const EditorRename_ipc = {
|
|
2729
|
+
__proto__: null,
|
|
2730
|
+
Commands: Commands$s,
|
|
2731
|
+
name: name$r
|
|
2732
|
+
};
|
|
2594
2733
|
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2734
|
+
const showDirectoryPicker = options => {
|
|
2735
|
+
// @ts-expect-error
|
|
2736
|
+
return window.showDirectoryPicker(options);
|
|
2597
2737
|
};
|
|
2598
|
-
const
|
|
2599
|
-
|
|
2738
|
+
const showFilePicker = options => {
|
|
2739
|
+
// @ts-expect-error
|
|
2740
|
+
return window.showFilePicker(options);
|
|
2600
2741
|
};
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2742
|
+
const showSaveFilePicker = options => {
|
|
2743
|
+
// @ts-expect-error
|
|
2744
|
+
return window.showSaveFilePicker(options);
|
|
2603
2745
|
};
|
|
2604
2746
|
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2747
|
+
const name$q = 'FilePicker';
|
|
2748
|
+
const Commands$r = {
|
|
2749
|
+
showDirectoryPicker: showDirectoryPicker,
|
|
2750
|
+
showFilePicker: showFilePicker,
|
|
2751
|
+
showSaveFilePicker: showSaveFilePicker
|
|
2607
2752
|
};
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
jsonrpc: Two,
|
|
2614
|
-
id: callbackId,
|
|
2615
|
-
params: [offscreenCanvas]
|
|
2616
|
-
}, [offscreenCanvas]);
|
|
2753
|
+
|
|
2754
|
+
const FilePicker_ipc = {
|
|
2755
|
+
__proto__: null,
|
|
2756
|
+
Commands: Commands$r,
|
|
2757
|
+
name: name$q
|
|
2617
2758
|
};
|
|
2618
2759
|
|
|
2619
|
-
const
|
|
2760
|
+
const requestPermission = (handle, options) => {
|
|
2761
|
+
return handle.requestPermission(options);
|
|
2762
|
+
};
|
|
2620
2763
|
|
|
2621
|
-
|
|
2622
|
-
const Commands$
|
|
2623
|
-
|
|
2764
|
+
const name$p = 'FileSystemHandle';
|
|
2765
|
+
const Commands$q = {
|
|
2766
|
+
requestPermission: requestPermission
|
|
2624
2767
|
};
|
|
2625
2768
|
|
|
2626
|
-
const
|
|
2769
|
+
const FileSystemHandle_ipc = {
|
|
2627
2770
|
__proto__: null,
|
|
2628
|
-
Commands: Commands$
|
|
2629
|
-
name: name$
|
|
2771
|
+
Commands: Commands$q,
|
|
2772
|
+
name: name$p
|
|
2630
2773
|
};
|
|
2631
2774
|
|
|
2632
|
-
|
|
2775
|
+
const handleImageLoad = event => {
|
|
2776
|
+
const $ImagePreviewImage = event.target;
|
|
2777
|
+
const $ImagePreviewCaption = $ImagePreviewImage.nextSibling;
|
|
2778
|
+
const width = $ImagePreviewImage.naturalWidth;
|
|
2779
|
+
const height = $ImagePreviewImage.naturalHeight;
|
|
2780
|
+
$ImagePreviewCaption.textContent = `${width} × ${height}`;
|
|
2781
|
+
};
|
|
2782
|
+
const handleImageError$1 = event => {
|
|
2783
|
+
const $ImagePreviewImage = event.target;
|
|
2784
|
+
const $ImagePreviewCaption = $ImagePreviewImage.nextSibling;
|
|
2785
|
+
$ImagePreviewCaption.textContent = 'Image could not be loaded';
|
|
2786
|
+
};
|
|
2633
2787
|
|
|
2634
|
-
// TODO
|
|
2635
|
-
// maybe duplicate the code per file for better chunks
|
|
2788
|
+
// TODO duplicate code with below
|
|
2636
2789
|
|
|
2637
|
-
const
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2790
|
+
const showError = (message, y, x) => {
|
|
2791
|
+
const $ImagePreviewImage = document.createElement('img');
|
|
2792
|
+
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
2793
|
+
$ImagePreviewImage.alt = '';
|
|
2794
|
+
const $ImagePreviewCaption = document.createElement('figcaption');
|
|
2795
|
+
$ImagePreviewCaption.className = 'ImagePreviewCaption';
|
|
2796
|
+
$ImagePreviewCaption.textContent = message;
|
|
2797
|
+
const $ImagePreview = document.createElement('figure');
|
|
2798
|
+
$ImagePreview.className = 'ImagePreview';
|
|
2799
|
+
$ImagePreview.append($ImagePreviewImage, $ImagePreviewCaption);
|
|
2800
|
+
setXAndY($ImagePreview, x, y);
|
|
2801
|
+
$ImagePreview.style.display = 'none';
|
|
2802
|
+
append$1($ImagePreview);
|
|
2803
|
+
return {
|
|
2804
|
+
$ImagePreview,
|
|
2805
|
+
$ImagePreviewCaption,
|
|
2806
|
+
$ImagePreviewImage
|
|
2807
|
+
};
|
|
2808
|
+
};
|
|
2809
|
+
const create$G = (uri, top, left) => {
|
|
2810
|
+
const $ImagePreviewImage = document.createElement('img');
|
|
2811
|
+
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
2812
|
+
$ImagePreviewImage.src = uri;
|
|
2813
|
+
$ImagePreviewImage.alt = '';
|
|
2814
|
+
const $ImagePreviewCaption = document.createElement('figcaption');
|
|
2815
|
+
$ImagePreviewCaption.className = 'ImagePreviewCaption';
|
|
2816
|
+
const $ImagePreview = document.createElement('figure');
|
|
2817
|
+
$ImagePreview.className = 'ImagePreview';
|
|
2818
|
+
$ImagePreview.append($ImagePreviewImage, $ImagePreviewCaption);
|
|
2819
|
+
$ImagePreviewImage.onload = handleImageLoad;
|
|
2820
|
+
$ImagePreviewImage.onerror = handleImageError$1;
|
|
2821
|
+
$ImagePreview.style.top = `${top}px`;
|
|
2822
|
+
$ImagePreview.style.left = `${left}px`;
|
|
2823
|
+
$ImagePreview.style.display = 'none';
|
|
2824
|
+
append$1($ImagePreview);
|
|
2825
|
+
return {
|
|
2826
|
+
$ImagePreview,
|
|
2827
|
+
$ImagePreviewCaption,
|
|
2828
|
+
$ImagePreviewImage
|
|
2829
|
+
};
|
|
2830
|
+
};
|
|
2831
|
+
const update = (state, uri) => {
|
|
2832
|
+
state.$ImagePreviewImage.uri = uri;
|
|
2833
|
+
};
|
|
2834
|
+
const dispose$h = state => {
|
|
2835
|
+
remove$1(state.$ImagePreview);
|
|
2650
2836
|
};
|
|
2651
2837
|
|
|
2652
|
-
const
|
|
2653
|
-
|
|
2654
|
-
$
|
|
2655
|
-
|
|
2838
|
+
const ImagePreview$1 = {
|
|
2839
|
+
__proto__: null,
|
|
2840
|
+
create: create$G,
|
|
2841
|
+
dispose: dispose$h,
|
|
2842
|
+
showError,
|
|
2843
|
+
update
|
|
2656
2844
|
};
|
|
2657
2845
|
|
|
2658
|
-
const
|
|
2659
|
-
const
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
const Cut = 'cut';
|
|
2666
|
-
const DoubleClick = 'dblclick';
|
|
2667
|
-
const DragEnd = 'dragend';
|
|
2668
|
-
const DragLeave = 'dragleave';
|
|
2669
|
-
const DragOver = 'dragover';
|
|
2670
|
-
const DragStart = 'dragstart';
|
|
2671
|
-
const Drop = 'drop';
|
|
2672
|
-
const Error$3 = 'error';
|
|
2673
|
-
const Focus = 'focus';
|
|
2674
|
-
const FocusIn = 'focusin';
|
|
2675
|
-
const FocusOut = 'focusout';
|
|
2676
|
-
const Input$1 = 'input';
|
|
2677
|
-
const KeyDown = 'keydown';
|
|
2678
|
-
const KeyUp = 'keyup';
|
|
2679
|
-
const LostPointerCapture = 'lostpointercapture';
|
|
2680
|
-
const MouseDown = 'mousedown';
|
|
2681
|
-
const MouseEnter = 'mouseenter';
|
|
2682
|
-
const MouseLeave = 'mouseleave';
|
|
2683
|
-
const MouseUp = 'mouseup';
|
|
2684
|
-
const Paste = 'paste';
|
|
2685
|
-
const PointerDown = 'pointerdown';
|
|
2686
|
-
const PointerMove = 'pointermove';
|
|
2687
|
-
const PointerUp = 'pointerup';
|
|
2688
|
-
const Resize = 'resize';
|
|
2689
|
-
const Scroll = 'scroll';
|
|
2690
|
-
const TouchEnd = 'touchend';
|
|
2691
|
-
const TouchMove = 'touchmove';
|
|
2692
|
-
const TouchStart = 'touchstart';
|
|
2693
|
-
const Wheel = 'wheel';
|
|
2846
|
+
const name$o = 'ImagePreview';
|
|
2847
|
+
const Commands$p = {
|
|
2848
|
+
create: create$G,
|
|
2849
|
+
dispose: dispose$h,
|
|
2850
|
+
showError: showError,
|
|
2851
|
+
update: update
|
|
2852
|
+
};
|
|
2694
2853
|
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
if ($Element[uidSymbol$1]) {
|
|
2700
|
-
return $Element;
|
|
2701
|
-
}
|
|
2702
|
-
$Element = $Element.parentNode;
|
|
2703
|
-
}
|
|
2704
|
-
return void 0;
|
|
2854
|
+
const ImagePreview_ipc = {
|
|
2855
|
+
__proto__: null,
|
|
2856
|
+
Commands: Commands$p,
|
|
2857
|
+
name: name$o
|
|
2705
2858
|
};
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
return
|
|
2859
|
+
|
|
2860
|
+
const getOrigin = () => {
|
|
2861
|
+
return location.origin;
|
|
2862
|
+
};
|
|
2863
|
+
const getPathName = () => {
|
|
2864
|
+
return location.pathname;
|
|
2865
|
+
};
|
|
2866
|
+
const getHref = () => {
|
|
2867
|
+
return location.href;
|
|
2868
|
+
};
|
|
2869
|
+
|
|
2870
|
+
// TODO should do nothing if it is already at this path
|
|
2871
|
+
const setPathName = pathName => {
|
|
2872
|
+
const currentPathName = getPathName();
|
|
2873
|
+
if (currentPathName === pathName) {
|
|
2874
|
+
return;
|
|
2875
|
+
}
|
|
2876
|
+
// @ts-expect-error
|
|
2877
|
+
history.pushState(null, null, pathName);
|
|
2709
2878
|
};
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
target,
|
|
2713
|
-
currentTarget
|
|
2714
|
-
} = event;
|
|
2715
|
-
return getComponentUid(currentTarget || target);
|
|
2879
|
+
const hydrate = () => {
|
|
2880
|
+
// addEventListener('popstate', handlePopState)
|
|
2716
2881
|
};
|
|
2717
2882
|
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2883
|
+
const getTitleBarHeight = () => {
|
|
2884
|
+
if (
|
|
2885
|
+
// @ts-expect-error
|
|
2886
|
+
navigator.windowControlsOverlay?.getTitlebarAreaRect) {
|
|
2887
|
+
// @ts-expect-error
|
|
2888
|
+
const titleBarRect = navigator.windowControlsOverlay.getTitlebarAreaRect();
|
|
2889
|
+
return titleBarRect.height;
|
|
2890
|
+
}
|
|
2891
|
+
return 0;
|
|
2721
2892
|
};
|
|
2722
|
-
|
|
2723
|
-
return
|
|
2893
|
+
const getBounds = () => {
|
|
2894
|
+
return {
|
|
2895
|
+
windowWidth: window.innerWidth,
|
|
2896
|
+
windowHeight: window.innerHeight,
|
|
2897
|
+
titleBarHeight: getTitleBarHeight()
|
|
2898
|
+
};
|
|
2724
2899
|
};
|
|
2725
2900
|
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2901
|
+
const getInitData = () => {
|
|
2902
|
+
const initData = {
|
|
2903
|
+
Location: {
|
|
2904
|
+
href: getHref()
|
|
2905
|
+
},
|
|
2906
|
+
Layout: {
|
|
2907
|
+
bounds: getBounds()
|
|
2908
|
+
}
|
|
2909
|
+
};
|
|
2910
|
+
return initData;
|
|
2729
2911
|
};
|
|
2730
2912
|
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
var Col = "col";
|
|
2735
|
-
var ColGroup = "colgroup";
|
|
2736
|
-
var Del = "del";
|
|
2737
|
-
var Div = "div";
|
|
2738
|
-
var H1 = "h1";
|
|
2739
|
-
var H2 = "h2";
|
|
2740
|
-
var H3 = "h3";
|
|
2741
|
-
var H4 = "h4";
|
|
2742
|
-
var H5 = "h5";
|
|
2743
|
-
var H6 = "h6";
|
|
2744
|
-
var I = "i";
|
|
2745
|
-
var Img = "img";
|
|
2746
|
-
var Input = "input";
|
|
2747
|
-
var Ins = "ins";
|
|
2748
|
-
var Kbd = "kbd";
|
|
2749
|
-
var Span = "span";
|
|
2750
|
-
var Table = "table";
|
|
2751
|
-
var TBody = "tbody";
|
|
2752
|
-
var Td = "td";
|
|
2753
|
-
var Th = "th";
|
|
2754
|
-
var THead = "thead";
|
|
2755
|
-
var Tr = "tr";
|
|
2756
|
-
var Article = "article";
|
|
2757
|
-
var Aside = "aside";
|
|
2758
|
-
var Footer = "footer";
|
|
2759
|
-
var Header = "header";
|
|
2760
|
-
var Nav = "nav";
|
|
2761
|
-
var Section = "section";
|
|
2762
|
-
var Search$1 = "search";
|
|
2763
|
-
var Dd = "dd";
|
|
2764
|
-
var Dl = "dl";
|
|
2765
|
-
var Figcaption = "figcaption";
|
|
2766
|
-
var Figure = "figure";
|
|
2767
|
-
var Hr = "hr";
|
|
2768
|
-
var Li = "li";
|
|
2769
|
-
var Ol = "ol";
|
|
2770
|
-
var P = "p";
|
|
2771
|
-
var Pre = "pre";
|
|
2772
|
-
var A = "a";
|
|
2773
|
-
var Br = "br";
|
|
2774
|
-
var Cite = "cite";
|
|
2775
|
-
var Data = "data";
|
|
2776
|
-
var Time$1 = "time";
|
|
2777
|
-
var Tfoot = "tfoot";
|
|
2778
|
-
var Ul = "ul";
|
|
2779
|
-
var Video$1 = "video";
|
|
2780
|
-
var TextArea = "textarea";
|
|
2781
|
-
var Select = "select";
|
|
2782
|
-
var Option = "option";
|
|
2783
|
-
|
|
2784
|
-
// src/parts/VirtualDomElements/VirtualDomElements.ts
|
|
2785
|
-
var Audio2 = 0;
|
|
2786
|
-
var Button2 = 1;
|
|
2787
|
-
var Col2 = 2;
|
|
2788
|
-
var ColGroup2 = 3;
|
|
2789
|
-
var Div2 = 4;
|
|
2790
|
-
var H12 = 5;
|
|
2791
|
-
var Input2 = 6;
|
|
2792
|
-
var Kbd2 = 7;
|
|
2793
|
-
var Span2 = 8;
|
|
2794
|
-
var Table2 = 9;
|
|
2795
|
-
var TBody2 = 10;
|
|
2796
|
-
var Td2 = 11;
|
|
2797
|
-
var Text$2 = 12;
|
|
2798
|
-
var Th2 = 13;
|
|
2799
|
-
var THead2 = 14;
|
|
2800
|
-
var Tr2 = 15;
|
|
2801
|
-
var I2 = 16;
|
|
2802
|
-
var Img2 = 17;
|
|
2803
|
-
var Ins2 = 20;
|
|
2804
|
-
var Del2 = 21;
|
|
2805
|
-
var H22 = 22;
|
|
2806
|
-
var H32 = 23;
|
|
2807
|
-
var H42 = 24;
|
|
2808
|
-
var H52 = 25;
|
|
2809
|
-
var H62 = 26;
|
|
2810
|
-
var Article2 = 27;
|
|
2811
|
-
var Aside2 = 28;
|
|
2812
|
-
var Footer2 = 29;
|
|
2813
|
-
var Header2 = 30;
|
|
2814
|
-
var Nav2 = 40;
|
|
2815
|
-
var Section2 = 41;
|
|
2816
|
-
var Search2 = 42;
|
|
2817
|
-
var Dd2 = 43;
|
|
2818
|
-
var Dl2 = 44;
|
|
2819
|
-
var Figcaption2 = 45;
|
|
2820
|
-
var Figure2 = 46;
|
|
2821
|
-
var Hr2 = 47;
|
|
2822
|
-
var Li2 = 48;
|
|
2823
|
-
var Ol2 = 49;
|
|
2824
|
-
var P2 = 50;
|
|
2825
|
-
var Pre2 = 51;
|
|
2826
|
-
var A2 = 53;
|
|
2827
|
-
var Br2 = 55;
|
|
2828
|
-
var Cite2 = 56;
|
|
2829
|
-
var Data2 = 57;
|
|
2830
|
-
var Time2 = 58;
|
|
2831
|
-
var Tfoot2 = 59;
|
|
2832
|
-
var Ul2 = 60;
|
|
2833
|
-
var Video2 = 61;
|
|
2834
|
-
var TextArea2 = 62;
|
|
2835
|
-
var Select2 = 63;
|
|
2836
|
-
var Option2 = 64;
|
|
2837
|
-
|
|
2838
|
-
// src/parts/ElementTagMap/ElementTagMap.ts
|
|
2839
|
-
var getElementTag = type => {
|
|
2840
|
-
switch (type) {
|
|
2841
|
-
case Audio2:
|
|
2842
|
-
return Audio$2;
|
|
2843
|
-
case H12:
|
|
2844
|
-
return H1;
|
|
2845
|
-
case H22:
|
|
2846
|
-
return H2;
|
|
2847
|
-
case H32:
|
|
2848
|
-
return H3;
|
|
2849
|
-
case H42:
|
|
2850
|
-
return H4;
|
|
2851
|
-
case H52:
|
|
2852
|
-
return H5;
|
|
2853
|
-
case H62:
|
|
2854
|
-
return H6;
|
|
2855
|
-
case Div2:
|
|
2856
|
-
return Div;
|
|
2857
|
-
case Kbd2:
|
|
2858
|
-
return Kbd;
|
|
2859
|
-
case Table2:
|
|
2860
|
-
return Table;
|
|
2861
|
-
case TBody2:
|
|
2862
|
-
return TBody;
|
|
2863
|
-
case Th2:
|
|
2864
|
-
return Th;
|
|
2865
|
-
case Td2:
|
|
2866
|
-
return Td;
|
|
2867
|
-
case THead2:
|
|
2868
|
-
return THead;
|
|
2869
|
-
case Tr2:
|
|
2870
|
-
return Tr;
|
|
2871
|
-
case Input2:
|
|
2872
|
-
return Input;
|
|
2873
|
-
case ColGroup2:
|
|
2874
|
-
return ColGroup;
|
|
2875
|
-
case Col2:
|
|
2876
|
-
return Col;
|
|
2877
|
-
case Button2:
|
|
2878
|
-
return Button;
|
|
2879
|
-
case Span2:
|
|
2880
|
-
return Span;
|
|
2881
|
-
case I2:
|
|
2882
|
-
return I;
|
|
2883
|
-
case Img2:
|
|
2884
|
-
return Img;
|
|
2885
|
-
case Ins2:
|
|
2886
|
-
return Ins;
|
|
2887
|
-
case Del2:
|
|
2888
|
-
return Del;
|
|
2889
|
-
case Article2:
|
|
2890
|
-
return Article;
|
|
2891
|
-
case Aside2:
|
|
2892
|
-
return Aside;
|
|
2893
|
-
case Footer2:
|
|
2894
|
-
return Footer;
|
|
2895
|
-
case Header2:
|
|
2896
|
-
return Header;
|
|
2897
|
-
case Nav2:
|
|
2898
|
-
return Nav;
|
|
2899
|
-
case Section2:
|
|
2900
|
-
return Section;
|
|
2901
|
-
case Search2:
|
|
2902
|
-
return Search$1;
|
|
2903
|
-
case Dd2:
|
|
2904
|
-
return Dd;
|
|
2905
|
-
case Dl2:
|
|
2906
|
-
return Dl;
|
|
2907
|
-
case Figcaption2:
|
|
2908
|
-
return Figcaption;
|
|
2909
|
-
case Figure2:
|
|
2910
|
-
return Figure;
|
|
2911
|
-
case Hr2:
|
|
2912
|
-
return Hr;
|
|
2913
|
-
case Li2:
|
|
2914
|
-
return Li;
|
|
2915
|
-
case Ol2:
|
|
2916
|
-
return Ol;
|
|
2917
|
-
case P2:
|
|
2918
|
-
return P;
|
|
2919
|
-
case Pre2:
|
|
2920
|
-
return Pre;
|
|
2921
|
-
case A2:
|
|
2922
|
-
return A;
|
|
2923
|
-
case Br2:
|
|
2924
|
-
return Br;
|
|
2925
|
-
case Cite2:
|
|
2926
|
-
return Cite;
|
|
2927
|
-
case Data2:
|
|
2928
|
-
return Data;
|
|
2929
|
-
case Time2:
|
|
2930
|
-
return Time$1;
|
|
2931
|
-
case Tfoot2:
|
|
2932
|
-
return Tfoot;
|
|
2933
|
-
case Ul2:
|
|
2934
|
-
return Ul;
|
|
2935
|
-
case Video2:
|
|
2936
|
-
return Video$1;
|
|
2937
|
-
case TextArea2:
|
|
2938
|
-
return TextArea;
|
|
2939
|
-
case Select2:
|
|
2940
|
-
return Select;
|
|
2941
|
-
case Option2:
|
|
2942
|
-
return Option;
|
|
2943
|
-
default:
|
|
2944
|
-
throw new Error(`element tag not found ${type}`);
|
|
2945
|
-
}
|
|
2913
|
+
const name$n = 'InitData';
|
|
2914
|
+
const Commands$o = {
|
|
2915
|
+
getInitData: getInitData
|
|
2946
2916
|
};
|
|
2947
2917
|
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
return {
|
|
2953
|
-
passive: true
|
|
2954
|
-
};
|
|
2955
|
-
default:
|
|
2956
|
-
return void 0;
|
|
2957
|
-
}
|
|
2918
|
+
const InitData_ipc = {
|
|
2919
|
+
__proto__: null,
|
|
2920
|
+
Commands: Commands$o,
|
|
2921
|
+
name: name$n
|
|
2958
2922
|
};
|
|
2959
2923
|
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
value: name
|
|
2964
|
-
});
|
|
2924
|
+
const name$m = 'IpcParent';
|
|
2925
|
+
const Commands$n = {
|
|
2926
|
+
create: create$L
|
|
2965
2927
|
};
|
|
2966
2928
|
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
return listener;
|
|
2972
|
-
}
|
|
2973
|
-
if (!cache$1.has(listener)) {
|
|
2974
|
-
const wrapped = event => {
|
|
2975
|
-
const uid = getComponentUidFromEvent(event);
|
|
2976
|
-
const result = listener(event);
|
|
2977
|
-
if (result.length === 0) {
|
|
2978
|
-
return;
|
|
2979
|
-
}
|
|
2980
|
-
const ipc = getIpc();
|
|
2981
|
-
ipc.send("Viewlet.executeViewletCommand", uid, ...result);
|
|
2982
|
-
};
|
|
2983
|
-
nameAnonymousFunction$1(wrapped, listener.name);
|
|
2984
|
-
cache$1.set(listener, wrapped);
|
|
2985
|
-
}
|
|
2986
|
-
return cache$1.get(listener);
|
|
2929
|
+
const IpcParent_ipc = {
|
|
2930
|
+
__proto__: null,
|
|
2931
|
+
Commands: Commands$n,
|
|
2932
|
+
name: name$m
|
|
2987
2933
|
};
|
|
2988
2934
|
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2935
|
+
const name$l = 'Layout';
|
|
2936
|
+
const Commands$m = {
|
|
2937
|
+
getBounds: getBounds
|
|
2938
|
+
};
|
|
2939
|
+
|
|
2940
|
+
const Layout_ipc = {
|
|
2941
|
+
__proto__: null,
|
|
2942
|
+
Commands: Commands$m,
|
|
2943
|
+
name: name$l
|
|
2944
|
+
};
|
|
2945
|
+
|
|
2946
|
+
const name$k = 'Location';
|
|
2947
|
+
const Commands$l = {
|
|
2948
|
+
getHref: getHref,
|
|
2949
|
+
getPathName: getPathName,
|
|
2950
|
+
hydrate: hydrate,
|
|
2951
|
+
setPathName: setPathName
|
|
2952
|
+
};
|
|
2953
|
+
|
|
2954
|
+
const Location_ipc = {
|
|
2955
|
+
__proto__: null,
|
|
2956
|
+
Commands: Commands$l,
|
|
2957
|
+
name: name$k
|
|
2958
|
+
};
|
|
2959
|
+
|
|
2960
|
+
const getElementHeight = $Element => {
|
|
2961
|
+
document.body.append($Element);
|
|
2962
|
+
const height = $Element.offsetHeight;
|
|
2963
|
+
$Element.remove();
|
|
2964
|
+
return height;
|
|
2965
|
+
};
|
|
2966
|
+
|
|
2967
|
+
const measureTextHeight = (text, fontSize, fontFamily) => {
|
|
2968
|
+
string(text);
|
|
2969
|
+
string(fontSize);
|
|
2970
|
+
string(fontFamily);
|
|
2971
|
+
const $Measure = document.createElement('div');
|
|
2972
|
+
$Measure.style.contain = 'content';
|
|
2973
|
+
$Measure.style.position = 'absolute';
|
|
2974
|
+
$Measure.style.top = '-9999px';
|
|
2975
|
+
$Measure.style.left = '-9999px';
|
|
2976
|
+
$Measure.textContent = text;
|
|
2977
|
+
return getElementHeight($Measure);
|
|
2978
|
+
};
|
|
2979
|
+
|
|
2980
|
+
const name$j = 'MeasureTextHeight';
|
|
2981
|
+
const Commands$k = {
|
|
2982
|
+
measureTextHeight: measureTextHeight
|
|
2983
|
+
};
|
|
2984
|
+
|
|
2985
|
+
const MeasureTextHeight_ipc = {
|
|
2986
|
+
__proto__: null,
|
|
2987
|
+
Commands: Commands$k,
|
|
2988
|
+
name: name$j
|
|
2989
|
+
};
|
|
2990
|
+
|
|
2991
|
+
const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) => {
|
|
2992
|
+
string(text);
|
|
2993
|
+
number(fontSize);
|
|
2994
|
+
string(fontFamily);
|
|
2995
|
+
number(width);
|
|
2996
|
+
string(lineHeight);
|
|
2997
|
+
const $Measure = document.createElement('div');
|
|
2998
|
+
$Measure.style.width = `${width}px`;
|
|
2999
|
+
$Measure.style.contain = 'content';
|
|
3000
|
+
$Measure.style.position = 'absolute';
|
|
3001
|
+
$Measure.style.top = '-9999px';
|
|
3002
|
+
$Measure.style.left = '-9999px';
|
|
3003
|
+
$Measure.style.fontSize = `${fontSize}px`;
|
|
3004
|
+
$Measure.style.lineHeight = lineHeight;
|
|
3005
|
+
$Measure.textContent = text;
|
|
3006
|
+
return getElementHeight($Measure);
|
|
3007
|
+
};
|
|
3008
|
+
|
|
3009
|
+
const name$i = 'MeasureTextBlockHeight';
|
|
3010
|
+
const Commands$j = {
|
|
3011
|
+
measureTextBlockHeight: measureTextBlockHeight
|
|
3012
|
+
};
|
|
3013
|
+
|
|
3014
|
+
const MeasureTextBlockHeight_ipc = {
|
|
3015
|
+
__proto__: null,
|
|
3016
|
+
Commands: Commands$j,
|
|
3017
|
+
name: name$i
|
|
3018
|
+
};
|
|
3019
|
+
|
|
3020
|
+
const setThemeColor = color => {
|
|
3021
|
+
const meta = document.querySelector('meta[name="theme-color"]');
|
|
3022
|
+
if (!meta) {
|
|
2994
3023
|
return;
|
|
2995
3024
|
}
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
$Node.addEventListener(key, wrapped, options);
|
|
3025
|
+
// @ts-expect-error
|
|
3026
|
+
meta.content = color;
|
|
2999
3027
|
};
|
|
3000
3028
|
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
}
|
|
3039
|
-
break;
|
|
3040
|
-
case "inputType":
|
|
3041
|
-
$Element.type = value;
|
|
3042
|
-
break;
|
|
3043
|
-
case "ariaLabelledBy":
|
|
3044
|
-
$Element.setAttribute("aria-labelledby", value);
|
|
3045
|
-
break;
|
|
3046
|
-
case "onBlur":
|
|
3047
|
-
case "onChange":
|
|
3048
|
-
case "onClick":
|
|
3049
|
-
case "onContextMenu":
|
|
3050
|
-
case "onDblClick":
|
|
3051
|
-
case "onFocus":
|
|
3052
|
-
case "onFocusIn":
|
|
3053
|
-
case "onFocusIn":
|
|
3054
|
-
case "onFocusOut":
|
|
3055
|
-
case "onInput":
|
|
3056
|
-
case "onKeyDown":
|
|
3057
|
-
case "onMouseDown":
|
|
3058
|
-
case "onPointerDown":
|
|
3059
|
-
case "onPointerOut":
|
|
3060
|
-
case "onPointerOver":
|
|
3061
|
-
case "onWheel":
|
|
3062
|
-
const eventName = key.slice(2).toLowerCase();
|
|
3063
|
-
if (!eventMap || !value) {
|
|
3064
|
-
return;
|
|
3065
|
-
}
|
|
3066
|
-
attachEvent$1($Element, eventMap, eventName, value);
|
|
3029
|
+
const name$h = 'Meta';
|
|
3030
|
+
const Commands$i = {
|
|
3031
|
+
setThemeColor: setThemeColor
|
|
3032
|
+
};
|
|
3033
|
+
|
|
3034
|
+
const Meta_ipc = {
|
|
3035
|
+
__proto__: null,
|
|
3036
|
+
Commands: Commands$i,
|
|
3037
|
+
name: name$h
|
|
3038
|
+
};
|
|
3039
|
+
|
|
3040
|
+
const create$Notification = message => {
|
|
3041
|
+
const $Notification = document.createElement('div');
|
|
3042
|
+
$Notification.className = 'Notification';
|
|
3043
|
+
$Notification.textContent = message;
|
|
3044
|
+
return $Notification;
|
|
3045
|
+
};
|
|
3046
|
+
const create$F = (type, message) => {
|
|
3047
|
+
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
3048
|
+
const $Notification = create$Notification(message);
|
|
3049
|
+
append$1($Notification);
|
|
3050
|
+
};
|
|
3051
|
+
const findIndex$1 = $Child => {
|
|
3052
|
+
const $Parent = $Child.parentNode;
|
|
3053
|
+
for (let i = 0; i < $Parent.children.length; i++) {
|
|
3054
|
+
if ($Parent.children[i] === $Child) {
|
|
3055
|
+
return i;
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
return -1;
|
|
3059
|
+
};
|
|
3060
|
+
const handleNotificationClick = event => {
|
|
3061
|
+
const $Target = event.target;
|
|
3062
|
+
switch ($Target.className) {
|
|
3063
|
+
case 'NotificationOption':
|
|
3064
|
+
const index = findIndex$1($Target);
|
|
3065
|
+
send( /* Notification.handleClick */'Notification.handleClick', /* index */index);
|
|
3067
3066
|
break;
|
|
3068
|
-
default:
|
|
3069
|
-
if (key.startsWith("data-")) {
|
|
3070
|
-
$Element.dataset[key.slice("data-".length)] = value;
|
|
3071
|
-
} else {
|
|
3072
|
-
$Element[key] = value;
|
|
3073
|
-
}
|
|
3074
3067
|
}
|
|
3075
3068
|
};
|
|
3069
|
+
const create$NotificationWithOptions = (message, options) => {
|
|
3070
|
+
const $NotificationMessage = document.createElement('p');
|
|
3071
|
+
$NotificationMessage.className = 'NotificationMessage';
|
|
3072
|
+
$NotificationMessage.textContent = message;
|
|
3073
|
+
const $NotificationOptions = document.createElement('div');
|
|
3074
|
+
$NotificationOptions.className = 'NotificationOptions';
|
|
3075
|
+
for (const option of options) {
|
|
3076
|
+
const $NotificationOption = document.createElement('button');
|
|
3077
|
+
$NotificationOption.className = 'NotificationOption';
|
|
3078
|
+
$NotificationOption.textContent = option;
|
|
3079
|
+
$NotificationOptions.append($NotificationOption);
|
|
3080
|
+
}
|
|
3081
|
+
const $Notification = document.createElement('div');
|
|
3082
|
+
$Notification.className = 'Notification';
|
|
3083
|
+
$Notification.append($NotificationMessage, $NotificationOptions);
|
|
3084
|
+
$Notification.onclick = handleNotificationClick;
|
|
3085
|
+
return $Notification;
|
|
3086
|
+
};
|
|
3087
|
+
const createWithOptions = (type, message, options) => {
|
|
3088
|
+
const $Notification = create$NotificationWithOptions(message, options);
|
|
3089
|
+
append$1($Notification);
|
|
3090
|
+
};
|
|
3091
|
+
const dispose$g = id => {
|
|
3092
|
+
// const $Notification = state.$Notifications
|
|
3093
|
+
};
|
|
3076
3094
|
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3095
|
+
const name$g = 'Notification';
|
|
3096
|
+
|
|
3097
|
+
// prettier-ignore
|
|
3098
|
+
const Commands$h = {
|
|
3099
|
+
create: create$F,
|
|
3100
|
+
createWithOptions: createWithOptions,
|
|
3101
|
+
dispose: dispose$g
|
|
3082
3102
|
};
|
|
3083
3103
|
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3104
|
+
const Notification_ipc = {
|
|
3105
|
+
__proto__: null,
|
|
3106
|
+
Commands: Commands$h,
|
|
3107
|
+
name: name$g
|
|
3087
3108
|
};
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
setProps($Element, element, eventMap);
|
|
3092
|
-
return $Element;
|
|
3109
|
+
|
|
3110
|
+
const state$3 = {
|
|
3111
|
+
canvasObjects: Object.create(null)
|
|
3093
3112
|
};
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
return renderDomElement(element, eventMap);
|
|
3100
|
-
}
|
|
3113
|
+
const get$4 = id => {
|
|
3114
|
+
return state$3.canvasObjects[id];
|
|
3115
|
+
};
|
|
3116
|
+
const set$3 = (canvasId, canvas) => {
|
|
3117
|
+
state$3.canvasObjects[canvasId] = canvas;
|
|
3101
3118
|
};
|
|
3102
3119
|
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3120
|
+
const get$3 = id => {
|
|
3121
|
+
return get$4(id);
|
|
3122
|
+
};
|
|
3123
|
+
const create$E = (canvasId, callbackId) => {
|
|
3124
|
+
const canvas = document.createElement('canvas');
|
|
3125
|
+
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
3126
|
+
set$3(canvasId, canvas);
|
|
3127
|
+
sendAndTransfer({
|
|
3128
|
+
jsonrpc: '2.0',
|
|
3129
|
+
id: callbackId,
|
|
3130
|
+
params: [offscreenCanvas]
|
|
3131
|
+
}, [offscreenCanvas]);
|
|
3132
|
+
};
|
|
3133
|
+
|
|
3134
|
+
const name$f = 'OffscreenCanvas';
|
|
3135
|
+
|
|
3136
|
+
// prettier-ignore
|
|
3137
|
+
const Commands$g = {
|
|
3138
|
+
create: create$E
|
|
3139
|
+
};
|
|
3140
|
+
|
|
3141
|
+
const OffscreenCanvas_ipc = {
|
|
3142
|
+
__proto__: null,
|
|
3143
|
+
Commands: Commands$g,
|
|
3144
|
+
name: name$f
|
|
3145
|
+
};
|
|
3146
|
+
|
|
3147
|
+
// TODO this module should be called dom or dom utils
|
|
3148
|
+
|
|
3149
|
+
// TODO this module makes for weird code splitting chunks,
|
|
3150
|
+
// maybe duplicate the code per file for better chunks
|
|
3151
|
+
|
|
3152
|
+
const findIndex = ($Container, $Target) => {
|
|
3153
|
+
while ($Target && $Target.parentNode !== $Container) {
|
|
3154
|
+
$Target = $Target.parentNode;
|
|
3155
|
+
}
|
|
3156
|
+
if (!$Target) {
|
|
3157
|
+
return -1;
|
|
3158
|
+
}
|
|
3159
|
+
for (let i = 0; i < $Container.children.length; i++) {
|
|
3160
|
+
if ($Container.children[i] === $Target) {
|
|
3161
|
+
return i;
|
|
3113
3162
|
}
|
|
3114
|
-
stack.unshift($Element);
|
|
3115
3163
|
}
|
|
3116
|
-
|
|
3164
|
+
return -1;
|
|
3117
3165
|
};
|
|
3118
3166
|
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
};
|
|
3124
|
-
var render2 = (elements, eventMap = {}) => {
|
|
3125
|
-
const $Root = document.createElement("div");
|
|
3126
|
-
renderInternal2($Root, elements, eventMap);
|
|
3127
|
-
return $Root;
|
|
3167
|
+
const create$BackDrop = () => {
|
|
3168
|
+
const $BackDrop = document.createElement('div');
|
|
3169
|
+
$BackDrop.className = 'BackDrop';
|
|
3170
|
+
return $BackDrop;
|
|
3128
3171
|
};
|
|
3129
3172
|
|
|
3173
|
+
const BeforeInput = 'beforeinput';
|
|
3174
|
+
const Blur = 'blur';
|
|
3175
|
+
const Click = 'click';
|
|
3176
|
+
const CompositionEnd = 'compositionend';
|
|
3177
|
+
const CompositionStart = 'compositionstart';
|
|
3178
|
+
const CompositionUpdate = 'compositionupdate';
|
|
3179
|
+
const ContextMenu = 'contextmenu';
|
|
3180
|
+
const Cut = 'cut';
|
|
3181
|
+
const DoubleClick = 'dblclick';
|
|
3182
|
+
const DragEnd = 'dragend';
|
|
3183
|
+
const DragLeave = 'dragleave';
|
|
3184
|
+
const DragOver = 'dragover';
|
|
3185
|
+
const DragStart = 'dragstart';
|
|
3186
|
+
const Drop = 'drop';
|
|
3187
|
+
const Error$3 = 'error';
|
|
3188
|
+
const Focus = 'focus';
|
|
3189
|
+
const FocusIn = 'focusin';
|
|
3190
|
+
const FocusOut = 'focusout';
|
|
3191
|
+
const Input = 'input';
|
|
3192
|
+
const KeyDown = 'keydown';
|
|
3193
|
+
const KeyUp = 'keyup';
|
|
3194
|
+
const LostPointerCapture = 'lostpointercapture';
|
|
3195
|
+
const MouseDown = 'mousedown';
|
|
3196
|
+
const MouseEnter = 'mouseenter';
|
|
3197
|
+
const MouseLeave = 'mouseleave';
|
|
3198
|
+
const MouseUp = 'mouseup';
|
|
3199
|
+
const Paste = 'paste';
|
|
3200
|
+
const PointerDown = 'pointerdown';
|
|
3201
|
+
const PointerMove = 'pointermove';
|
|
3202
|
+
const PointerUp = 'pointerup';
|
|
3203
|
+
const Resize = 'resize';
|
|
3204
|
+
const Scroll = 'scroll';
|
|
3205
|
+
const TouchEnd = 'touchend';
|
|
3206
|
+
const TouchMove = 'touchmove';
|
|
3207
|
+
const TouchStart = 'touchstart';
|
|
3208
|
+
const Wheel = 'wheel';
|
|
3209
|
+
|
|
3130
3210
|
// TODO when pressing tab -> focus next element in tab order and close menu
|
|
3131
3211
|
|
|
3132
3212
|
// TODO menu and contextmenu should have own keybinding logic
|
|
@@ -4073,30 +4153,9 @@ const Transferrable_ipc = {
|
|
|
4073
4153
|
name: name$8
|
|
4074
4154
|
};
|
|
4075
4155
|
|
|
4076
|
-
const
|
|
4077
|
-
const
|
|
4078
|
-
|
|
4079
|
-
};
|
|
4080
|
-
const getUidTarget = $Element => {
|
|
4081
|
-
while ($Element) {
|
|
4082
|
-
if ($Element[uidSymbol]) {
|
|
4083
|
-
return $Element;
|
|
4084
|
-
}
|
|
4085
|
-
$Element = $Element.parentNode;
|
|
4086
|
-
}
|
|
4087
|
-
return undefined;
|
|
4088
|
-
};
|
|
4089
|
-
const get = $Element => {
|
|
4090
|
-
const $Target = getUidTarget($Element);
|
|
4091
|
-
return $Target[uidSymbol];
|
|
4092
|
-
};
|
|
4093
|
-
const fromEvent = event => {
|
|
4094
|
-
const {
|
|
4095
|
-
target,
|
|
4096
|
-
currentTarget
|
|
4097
|
-
} = event;
|
|
4098
|
-
return get(currentTarget || target);
|
|
4099
|
-
};
|
|
4156
|
+
const set$1 = setComponentUid;
|
|
4157
|
+
const get = getComponentUid;
|
|
4158
|
+
const fromEvent = getComponentUidFromEvent;
|
|
4100
4159
|
|
|
4101
4160
|
const state$1 = {
|
|
4102
4161
|
identifiers: new Uint32Array()
|
|
@@ -4123,47 +4182,7 @@ const setIdentifiers = identifiers => {
|
|
|
4123
4182
|
setIdentifiers$1(identifiers);
|
|
4124
4183
|
};
|
|
4125
4184
|
|
|
4126
|
-
const
|
|
4127
|
-
return [...$Viewlet.querySelectorAll('input, textarea')];
|
|
4128
|
-
};
|
|
4129
|
-
const rememberFocus = ($Viewlet, dom, eventMap, uid = 0) => {
|
|
4130
|
-
// TODO replace this workaround with
|
|
4131
|
-
// virtual dom diffing
|
|
4132
|
-
const oldLeft = $Viewlet.style.left;
|
|
4133
|
-
const oldTop = $Viewlet.style.top;
|
|
4134
|
-
const oldWidth = $Viewlet.style.width;
|
|
4135
|
-
const oldHeight = $Viewlet.style.height;
|
|
4136
|
-
// @ts-expect-error
|
|
4137
|
-
const focused = document.activeElement.getAttribute('name');
|
|
4138
|
-
const $$Inputs = queryInputs($Viewlet);
|
|
4139
|
-
const inputMap = Object.create(null);
|
|
4140
|
-
for (const $Input of $$Inputs) {
|
|
4141
|
-
inputMap[$Input.name] = $Input.value;
|
|
4142
|
-
}
|
|
4143
|
-
if (uid) {
|
|
4144
|
-
const $New = render2(dom, eventMap).firstChild;
|
|
4145
|
-
set$1($New, uid);
|
|
4146
|
-
$Viewlet.replaceWith($New);
|
|
4147
|
-
$Viewlet = $New;
|
|
4148
|
-
} else {
|
|
4149
|
-
renderInto($Viewlet, dom, eventMap);
|
|
4150
|
-
}
|
|
4151
|
-
const $$NewInputs = queryInputs($Viewlet);
|
|
4152
|
-
for (const $Input of $$NewInputs) {
|
|
4153
|
-
$Input.value = inputMap[$Input.name] || $Input.value || '';
|
|
4154
|
-
}
|
|
4155
|
-
if (focused) {
|
|
4156
|
-
const $Focused = $Viewlet.querySelector(`[name="${focused}"]`);
|
|
4157
|
-
if ($Focused) {
|
|
4158
|
-
$Focused.focus();
|
|
4159
|
-
}
|
|
4160
|
-
}
|
|
4161
|
-
$Viewlet.style.top = oldTop;
|
|
4162
|
-
$Viewlet.style.left = oldLeft;
|
|
4163
|
-
$Viewlet.style.height = oldHeight;
|
|
4164
|
-
$Viewlet.style.width = oldWidth;
|
|
4165
|
-
return $Viewlet;
|
|
4166
|
-
};
|
|
4185
|
+
const rememberFocus = rememberFocus$1;
|
|
4167
4186
|
|
|
4168
4187
|
const ActivityBar = 'ActivityBar';
|
|
4169
4188
|
const Audio$1 = 'Audio';
|
|
@@ -4967,7 +4986,7 @@ const ModuleWorkerAndMessagePort = 8;
|
|
|
4967
4986
|
const getData$1 = event => {
|
|
4968
4987
|
return event.data;
|
|
4969
4988
|
};
|
|
4970
|
-
const attachEvents$
|
|
4989
|
+
const attachEvents$c = that => {
|
|
4971
4990
|
const handleMessage = (...args) => {
|
|
4972
4991
|
const data = that.getData(...args);
|
|
4973
4992
|
that.dispatchEvent(new MessageEvent('message', {
|
|
@@ -4984,7 +5003,7 @@ class Ipc extends EventTarget {
|
|
|
4984
5003
|
constructor(rawIpc) {
|
|
4985
5004
|
super();
|
|
4986
5005
|
this._rawIpc = rawIpc;
|
|
4987
|
-
attachEvents$
|
|
5006
|
+
attachEvents$c(this);
|
|
4988
5007
|
}
|
|
4989
5008
|
}
|
|
4990
5009
|
const readyMessage = 'ready';
|
|
@@ -5650,7 +5669,7 @@ const create$z = async ({
|
|
|
5650
5669
|
// TODO await promise
|
|
5651
5670
|
// TODO call separate method HandleMessagePort.handleMessagePort or
|
|
5652
5671
|
// HandleIncomingIpc.handleIncomingIpc
|
|
5653
|
-
invokeAndTransfer(ipc, [port], 'initialize', 'message-port', port);
|
|
5672
|
+
invokeAndTransfer$1(ipc, [port], 'initialize', 'message-port', port);
|
|
5654
5673
|
unhandleIpc(ipc);
|
|
5655
5674
|
return undefined;
|
|
5656
5675
|
};
|
|
@@ -5682,7 +5701,7 @@ const create$y = async ({
|
|
|
5682
5701
|
}
|
|
5683
5702
|
const windowIpc = IpcChildWithWindow$1.wrap(window);
|
|
5684
5703
|
handleIpcOnce(windowIpc);
|
|
5685
|
-
const webContentsIds = await invokeAndTransfer(windowIpc, [port], 'CreateMessagePort.createMessagePort', ipcId);
|
|
5704
|
+
const webContentsIds = await invokeAndTransfer$1(windowIpc, [port], 'CreateMessagePort.createMessagePort', ipcId);
|
|
5686
5705
|
return webContentsIds;
|
|
5687
5706
|
};
|
|
5688
5707
|
|
|
@@ -5753,11 +5772,11 @@ const ViewletActivityBarEvents = {
|
|
|
5753
5772
|
returnValue: returnValue$6
|
|
5754
5773
|
};
|
|
5755
5774
|
|
|
5756
|
-
const Events$
|
|
5775
|
+
const Events$a = ViewletActivityBarEvents;
|
|
5757
5776
|
|
|
5758
5777
|
const ViewletActivityBar = {
|
|
5759
5778
|
__proto__: null,
|
|
5760
|
-
Events: Events$
|
|
5779
|
+
Events: Events$a
|
|
5761
5780
|
};
|
|
5762
5781
|
|
|
5763
5782
|
const executeViewletCommand = (uid, command, ...args) => {
|
|
@@ -5895,11 +5914,11 @@ const ViewletAudioEvents = {
|
|
|
5895
5914
|
handleAudioError
|
|
5896
5915
|
};
|
|
5897
5916
|
|
|
5898
|
-
const Events$
|
|
5917
|
+
const Events$9 = ViewletAudioEvents;
|
|
5899
5918
|
|
|
5900
5919
|
const ViewletAudio = {
|
|
5901
5920
|
__proto__: null,
|
|
5902
|
-
Events: Events$
|
|
5921
|
+
Events: Events$9
|
|
5903
5922
|
};
|
|
5904
5923
|
|
|
5905
5924
|
const create$x = () => {
|
|
@@ -6275,7 +6294,7 @@ const ViewletDiffEditor = {
|
|
|
6275
6294
|
setScrollBar: setScrollBar$2
|
|
6276
6295
|
};
|
|
6277
6296
|
|
|
6278
|
-
const attachEvents$
|
|
6297
|
+
const attachEvents$b = ($Node, eventMap) => {
|
|
6279
6298
|
for (const [key, value] of Object.entries(eventMap)) {
|
|
6280
6299
|
$Node.addEventListener(key, value);
|
|
6281
6300
|
}
|
|
@@ -6397,17 +6416,17 @@ const create$s = () => {
|
|
|
6397
6416
|
$ScrollBarThumb
|
|
6398
6417
|
};
|
|
6399
6418
|
};
|
|
6400
|
-
const attachEvents$
|
|
6419
|
+
const attachEvents$a = state => {
|
|
6401
6420
|
const {
|
|
6402
6421
|
$Viewlet,
|
|
6403
6422
|
$ListItems,
|
|
6404
6423
|
$ScrollBar
|
|
6405
6424
|
} = state;
|
|
6406
6425
|
$Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
|
|
6407
|
-
attachEvents$
|
|
6426
|
+
attachEvents$b($ListItems, {
|
|
6408
6427
|
[MouseDown]: handleMousedown
|
|
6409
6428
|
});
|
|
6410
|
-
attachEvents$
|
|
6429
|
+
attachEvents$b($ScrollBar, {
|
|
6411
6430
|
[PointerDown]: handleScrollBarPointerDown$3
|
|
6412
6431
|
});
|
|
6413
6432
|
};
|
|
@@ -6455,7 +6474,7 @@ const setBounds$4 = (state, x, y, width, height) => {
|
|
|
6455
6474
|
|
|
6456
6475
|
const ViewletEditorCompletion = {
|
|
6457
6476
|
__proto__: null,
|
|
6458
|
-
attachEvents: attachEvents$
|
|
6477
|
+
attachEvents: attachEvents$a,
|
|
6459
6478
|
create: create$s,
|
|
6460
6479
|
dispose: dispose$c,
|
|
6461
6480
|
handleError: handleError$6,
|
|
@@ -6699,11 +6718,11 @@ const create$p = () => {
|
|
|
6699
6718
|
$Viewlet
|
|
6700
6719
|
};
|
|
6701
6720
|
};
|
|
6702
|
-
const attachEvents$
|
|
6721
|
+
const attachEvents$9 = state => {
|
|
6703
6722
|
const {
|
|
6704
6723
|
$Viewlet
|
|
6705
6724
|
} = state;
|
|
6706
|
-
attachEvents$
|
|
6725
|
+
attachEvents$b($Viewlet, {
|
|
6707
6726
|
[PointerDown]: handlePointerDown$5,
|
|
6708
6727
|
[PointerUp]: handlePointerUp,
|
|
6709
6728
|
[ContextMenu]: handleContextMenu$7,
|
|
@@ -6734,7 +6753,7 @@ const setDom$5 = (state, dom) => {
|
|
|
6734
6753
|
|
|
6735
6754
|
const ViewletEditorImage = {
|
|
6736
6755
|
__proto__: null,
|
|
6737
|
-
attachEvents: attachEvents$
|
|
6756
|
+
attachEvents: attachEvents$9,
|
|
6738
6757
|
create: create$p,
|
|
6739
6758
|
setDom: setDom$5,
|
|
6740
6759
|
setDragging,
|
|
@@ -7330,7 +7349,7 @@ const showOverlayMessage = (state, x, y, content) => {
|
|
|
7330
7349
|
};
|
|
7331
7350
|
const hideOverlayMessage = state => {
|
|
7332
7351
|
// TODO pass id of the overlay message and remove widget by id
|
|
7333
|
-
for (const $Widget of state$
|
|
7352
|
+
for (const $Widget of state$5.widgetSet) {
|
|
7334
7353
|
// @ts-expect-error
|
|
7335
7354
|
if ($Widget.className === 'EditorOverlayMessage') {
|
|
7336
7355
|
remove$1($Widget);
|
|
@@ -7637,8 +7656,6 @@ const ViewletExplorerEvents = {
|
|
|
7637
7656
|
handleWheel: handleWheel$3
|
|
7638
7657
|
};
|
|
7639
7658
|
|
|
7640
|
-
const activeId$2 = 'TreeItemActive';
|
|
7641
|
-
const focusClassName = 'FocusOutline';
|
|
7642
7659
|
const create$i = () => {
|
|
7643
7660
|
const $Viewlet = document.createElement('div');
|
|
7644
7661
|
$Viewlet.className = 'Viewlet Explorer';
|
|
@@ -7649,25 +7666,7 @@ const create$i = () => {
|
|
|
7649
7666
|
$Viewlet
|
|
7650
7667
|
};
|
|
7651
7668
|
};
|
|
7652
|
-
const
|
|
7653
|
-
const {
|
|
7654
|
-
$Viewlet
|
|
7655
|
-
} = state;
|
|
7656
|
-
// TODO use the other mouse events that capture automatically
|
|
7657
|
-
$Viewlet.addEventListener(MouseEnter, handleMouseEnter, Capture);
|
|
7658
|
-
$Viewlet.addEventListener(MouseLeave, handleMouseLeave, Capture);
|
|
7659
|
-
$Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
|
|
7660
|
-
attachEvents$c($Viewlet, {
|
|
7661
|
-
[Blur]: handleBlur$5,
|
|
7662
|
-
[Click]: handleClick$6,
|
|
7663
|
-
[ContextMenu]: handleContextMenu$5,
|
|
7664
|
-
[DragOver]: handleDragOver,
|
|
7665
|
-
[DragStart]: handleDragStart$1,
|
|
7666
|
-
[Drop]: handleDrop,
|
|
7667
|
-
[Focus]: handleFocus$7,
|
|
7668
|
-
[PointerDown]: handlePointerDown$4
|
|
7669
|
-
});
|
|
7670
|
-
};
|
|
7669
|
+
const Events$8 = ViewletExplorerEvents;
|
|
7671
7670
|
const handleError$3 = (state, message) => {
|
|
7672
7671
|
object(state);
|
|
7673
7672
|
string(message);
|
|
@@ -7676,59 +7675,6 @@ const handleError$3 = (state, message) => {
|
|
|
7676
7675
|
} = state;
|
|
7677
7676
|
$Viewlet.textContent = message;
|
|
7678
7677
|
};
|
|
7679
|
-
const setFocusedIndex$4 = (state, oldIndex, newIndex, focused) => {
|
|
7680
|
-
object(state);
|
|
7681
|
-
number(oldIndex);
|
|
7682
|
-
number(newIndex);
|
|
7683
|
-
const {
|
|
7684
|
-
$Viewlet
|
|
7685
|
-
} = state;
|
|
7686
|
-
switch (oldIndex) {
|
|
7687
|
-
case -2:
|
|
7688
|
-
break;
|
|
7689
|
-
case -1:
|
|
7690
|
-
$Viewlet.classList.remove(focusClassName);
|
|
7691
|
-
break;
|
|
7692
|
-
default:
|
|
7693
|
-
const $Dirent = $Viewlet.children[oldIndex];
|
|
7694
|
-
if ($Dirent) {
|
|
7695
|
-
$Dirent.classList.remove(activeId$2);
|
|
7696
|
-
$Dirent.classList.remove(focusClassName);
|
|
7697
|
-
$Dirent.removeAttribute('id');
|
|
7698
|
-
}
|
|
7699
|
-
break;
|
|
7700
|
-
}
|
|
7701
|
-
switch (newIndex) {
|
|
7702
|
-
case -2:
|
|
7703
|
-
$Viewlet.classList.remove(focusClassName);
|
|
7704
|
-
$Viewlet.removeAttribute(AriaActiveDescendant);
|
|
7705
|
-
break;
|
|
7706
|
-
case -1:
|
|
7707
|
-
if (focused) {
|
|
7708
|
-
$Viewlet.classList.add(focusClassName);
|
|
7709
|
-
$Viewlet.removeAttribute(AriaActiveDescendant);
|
|
7710
|
-
}
|
|
7711
|
-
break;
|
|
7712
|
-
default:
|
|
7713
|
-
if (newIndex >= 0) {
|
|
7714
|
-
const $Dirent = $Viewlet.children[newIndex];
|
|
7715
|
-
if (!$Dirent) {
|
|
7716
|
-
break;
|
|
7717
|
-
}
|
|
7718
|
-
$Dirent.id = activeId$2;
|
|
7719
|
-
$Dirent.classList.add(activeId$2);
|
|
7720
|
-
$Viewlet.setAttribute(AriaActiveDescendant, activeId$2);
|
|
7721
|
-
if (focused) {
|
|
7722
|
-
$Dirent.classList.add(focusClassName);
|
|
7723
|
-
}
|
|
7724
|
-
}
|
|
7725
|
-
break;
|
|
7726
|
-
}
|
|
7727
|
-
if (focused) {
|
|
7728
|
-
$Viewlet.focus();
|
|
7729
|
-
send('Focus.setFocus', FocusExplorer);
|
|
7730
|
-
}
|
|
7731
|
-
};
|
|
7732
7678
|
const focusInput = (state, id) => {
|
|
7733
7679
|
const $Input = document.getElementById(id);
|
|
7734
7680
|
if (!$Input) {
|
|
@@ -7762,19 +7708,18 @@ const setDom$4 = (state, dom) => {
|
|
|
7762
7708
|
const {
|
|
7763
7709
|
$Viewlet
|
|
7764
7710
|
} = state;
|
|
7765
|
-
rememberFocus($Viewlet, dom, ViewletExplorerEvents);
|
|
7711
|
+
rememberFocus($Viewlet, dom, ViewletExplorerEvents, 0);
|
|
7766
7712
|
};
|
|
7767
7713
|
|
|
7768
7714
|
const ViewletExplorer = {
|
|
7769
7715
|
__proto__: null,
|
|
7770
|
-
|
|
7716
|
+
Events: Events$8,
|
|
7771
7717
|
create: create$i,
|
|
7772
7718
|
dispose: dispose$9,
|
|
7773
7719
|
focusInput,
|
|
7774
7720
|
handleError: handleError$3,
|
|
7775
7721
|
setDom: setDom$4,
|
|
7776
|
-
setDropTargets
|
|
7777
|
-
setFocusedIndex: setFocusedIndex$4
|
|
7722
|
+
setDropTargets
|
|
7778
7723
|
};
|
|
7779
7724
|
|
|
7780
7725
|
const handleIconError = event => {
|
|
@@ -7958,10 +7903,10 @@ const attachEvents$8 = state => {
|
|
|
7958
7903
|
$ListItems,
|
|
7959
7904
|
$ScrollBar
|
|
7960
7905
|
} = state;
|
|
7961
|
-
$ExtensionHeader.addEventListener(Input
|
|
7906
|
+
$ExtensionHeader.addEventListener(Input, handleInput$6, Capture);
|
|
7962
7907
|
// @ts-expect-error
|
|
7963
7908
|
$ExtensionHeader.addEventListener(Click, undefined);
|
|
7964
|
-
attachEvents$
|
|
7909
|
+
attachEvents$b($ListItems, {
|
|
7965
7910
|
[ContextMenu]: handleContextMenu$5,
|
|
7966
7911
|
[PointerDown]: handlePointerDown$3,
|
|
7967
7912
|
[Focus]: handleFocus$6,
|
|
@@ -7971,7 +7916,7 @@ const attachEvents$8 = state => {
|
|
|
7971
7916
|
$ListItems.addEventListener(TouchMove, handleTouchMove, Passive);
|
|
7972
7917
|
$ListItems.addEventListener(TouchEnd, handleTouchEnd, Passive);
|
|
7973
7918
|
$ListItems.addEventListener(Wheel, handleWheel$3, Passive);
|
|
7974
|
-
attachEvents$
|
|
7919
|
+
attachEvents$b($ScrollBar, {
|
|
7975
7920
|
[PointerDown]: handleScrollBarPointerDown$2
|
|
7976
7921
|
});
|
|
7977
7922
|
};
|
|
@@ -8176,7 +8121,7 @@ const setDom$3 = (state, dom) => {
|
|
|
8176
8121
|
const {
|
|
8177
8122
|
$Viewlet
|
|
8178
8123
|
} = state;
|
|
8179
|
-
rememberFocus($Viewlet, dom, ViewletFindWidgetEvents);
|
|
8124
|
+
rememberFocus($Viewlet, dom, ViewletFindWidgetEvents, 0);
|
|
8180
8125
|
};
|
|
8181
8126
|
|
|
8182
8127
|
const ViewletFindWidget = {
|
|
@@ -8877,15 +8822,15 @@ const attachEvents$7 = state => {
|
|
|
8877
8822
|
$SashSideBar,
|
|
8878
8823
|
$SashPanel
|
|
8879
8824
|
} = state;
|
|
8880
|
-
attachEvents$
|
|
8825
|
+
attachEvents$b($SashSideBar, {
|
|
8881
8826
|
[PointerDown]: handleSashPointerDown,
|
|
8882
8827
|
[DoubleClick]: handleSashDoubleClick
|
|
8883
8828
|
});
|
|
8884
|
-
attachEvents$
|
|
8829
|
+
attachEvents$b($SashPanel, {
|
|
8885
8830
|
[PointerDown]: handleSashPointerDown,
|
|
8886
8831
|
[DoubleClick]: handleSashDoubleClick
|
|
8887
8832
|
});
|
|
8888
|
-
attachEvents$
|
|
8833
|
+
attachEvents$b(window, {
|
|
8889
8834
|
[Resize]: handleResize,
|
|
8890
8835
|
[Focus]: handleFocus$3,
|
|
8891
8836
|
[Blur]: handleBlur$3,
|
|
@@ -8950,7 +8895,7 @@ const attachEvents$6 = state => {
|
|
|
8950
8895
|
const {
|
|
8951
8896
|
$Viewlet
|
|
8952
8897
|
} = state;
|
|
8953
|
-
attachEvents$
|
|
8898
|
+
attachEvents$b($Viewlet, {
|
|
8954
8899
|
[Drop]: handleDrop,
|
|
8955
8900
|
[DragOver]: handleDragOver,
|
|
8956
8901
|
[DragEnd]: handleDragEnd,
|
|
@@ -9037,7 +8982,11 @@ const ViewletMain = {
|
|
|
9037
8982
|
|
|
9038
8983
|
// TODO
|
|
9039
8984
|
const getUid = () => {
|
|
9040
|
-
|
|
8985
|
+
const $Main = document.getElementById('Main');
|
|
8986
|
+
if (!$Main) {
|
|
8987
|
+
return 0;
|
|
8988
|
+
}
|
|
8989
|
+
return get($Main);
|
|
9041
8990
|
};
|
|
9042
8991
|
const handleTabsWheel = event => {
|
|
9043
8992
|
const uid = getUid();
|
|
@@ -9084,7 +9033,7 @@ const attachEvents$5 = state => {
|
|
|
9084
9033
|
const {
|
|
9085
9034
|
$MainTabs
|
|
9086
9035
|
} = state;
|
|
9087
|
-
attachEvents$
|
|
9036
|
+
attachEvents$b($MainTabs, {
|
|
9088
9037
|
[MouseDown]: handleTabsMouseDown,
|
|
9089
9038
|
[ContextMenu]: handleTabsContextMenu,
|
|
9090
9039
|
[DragStart]: handleDragStart
|
|
@@ -9261,13 +9210,13 @@ const attachEvents$4 = state => {
|
|
|
9261
9210
|
$ButtonClose,
|
|
9262
9211
|
$PanelHeader
|
|
9263
9212
|
} = state;
|
|
9264
|
-
attachEvents$
|
|
9213
|
+
attachEvents$b($PanelHeader, {
|
|
9265
9214
|
[Click]: handleHeaderClick$2
|
|
9266
9215
|
});
|
|
9267
|
-
attachEvents$
|
|
9216
|
+
attachEvents$b($ButtonMaximize, {
|
|
9268
9217
|
[Click]: handleClickMaximize
|
|
9269
9218
|
});
|
|
9270
|
-
attachEvents$
|
|
9219
|
+
attachEvents$b($ButtonClose, {
|
|
9271
9220
|
[Click]: handleClickClose$1
|
|
9272
9221
|
});
|
|
9273
9222
|
};
|
|
@@ -9324,7 +9273,7 @@ const setActionsDom$1 = (state$1, actions, childUid) => {
|
|
|
9324
9273
|
throw new Error(`child instance not found`);
|
|
9325
9274
|
}
|
|
9326
9275
|
const eventMap = instance.factory.EventMap;
|
|
9327
|
-
rememberFocus($PanelActions, actions, eventMap);
|
|
9276
|
+
rememberFocus($PanelActions, actions, eventMap, 0);
|
|
9328
9277
|
};
|
|
9329
9278
|
|
|
9330
9279
|
const ViewletPanel = {
|
|
@@ -9583,11 +9532,11 @@ const attachEvents$3 = state => {
|
|
|
9583
9532
|
$QuickPickItems,
|
|
9584
9533
|
$QuickPickInput
|
|
9585
9534
|
} = state;
|
|
9586
|
-
attachEvents$
|
|
9535
|
+
attachEvents$b($QuickPickItems, {
|
|
9587
9536
|
[PointerDown]: handlePointerDown
|
|
9588
9537
|
});
|
|
9589
9538
|
$QuickPickItems.addEventListener(Wheel, handleWheel$3, Passive);
|
|
9590
|
-
attachEvents$
|
|
9539
|
+
attachEvents$b($QuickPickInput, {
|
|
9591
9540
|
[Blur]: handleBlur$2,
|
|
9592
9541
|
[BeforeInput]: handleBeforeInput
|
|
9593
9542
|
});
|
|
@@ -10062,7 +10011,7 @@ const attachEvents$2 = state => {
|
|
|
10062
10011
|
const {
|
|
10063
10012
|
$SideBarTitleArea
|
|
10064
10013
|
} = state;
|
|
10065
|
-
attachEvents$
|
|
10014
|
+
attachEvents$b($SideBarTitleArea, {
|
|
10066
10015
|
[Click]: handleHeaderClick
|
|
10067
10016
|
});
|
|
10068
10017
|
};
|
|
@@ -10635,7 +10584,7 @@ const attachEvents = state => {
|
|
|
10635
10584
|
const {
|
|
10636
10585
|
$Viewlet
|
|
10637
10586
|
} = state;
|
|
10638
|
-
attachEvents$
|
|
10587
|
+
attachEvents$b($Viewlet, {
|
|
10639
10588
|
[ContextMenu]: handleContextMenu$1
|
|
10640
10589
|
});
|
|
10641
10590
|
};
|