@lvce-editor/renderer-process 30.3.0 → 30.5.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.
@@ -1520,19 +1520,6 @@ const render = (elements, eventMap = {}, newEventMap = {}) => {
1520
1520
  return $Root;
1521
1521
  };
1522
1522
 
1523
- const rememberFocus2 = ($Viewlet, dom, eventMap, uid = 0) => {
1524
- if (uid) {
1525
- const newEventMap = getEventListenerMap(uid);
1526
- const $New = render(dom, eventMap, newEventMap).firstChild;
1527
- setComponentUid($New, uid);
1528
- $Viewlet.replaceWith($New);
1529
- $Viewlet = $New;
1530
- } else {
1531
- renderInto($Viewlet, dom, eventMap);
1532
- }
1533
- return $Viewlet;
1534
- };
1535
-
1536
1523
  const setText$1 = ($Element, value) => {
1537
1524
  $Element.nodeValue = value;
1538
1525
  };
@@ -1880,18 +1867,16 @@ const getPathName = () => {
1880
1867
  const getHref = () => {
1881
1868
  return location.href;
1882
1869
  };
1883
- const matchesPathName = (a, b) => {
1884
- return a === b || a === '/' && b === '' || a === '' && b === '/';
1870
+ const matchesPathName = (currentPathName, pathName) => {
1871
+ const resolvedPathName = new URL(pathName, getHref()).pathname;
1872
+ return currentPathName === resolvedPathName;
1885
1873
  };
1886
-
1887
- // TODO should do nothing if it is already at this path
1888
1874
  const setPathName = pathName => {
1889
1875
  const currentPathName = getPathName();
1890
1876
  if (matchesPathName(currentPathName, pathName)) {
1891
1877
  return;
1892
1878
  }
1893
- // @ts-expect-error
1894
- history.pushState(null, null, pathName);
1879
+ history.pushState(null, '', pathName);
1895
1880
  };
1896
1881
  const hydrate$4 = () => {
1897
1882
  // addEventListener('popstate', handlePopState)
@@ -2275,7 +2260,6 @@ const walkValue = (value, transferrables, isTransferrable) => {
2275
2260
  for (const property of Object.values(value)) {
2276
2261
  walkValue(property, transferrables, isTransferrable);
2277
2262
  }
2278
- return;
2279
2263
  }
2280
2264
  };
2281
2265
  const getTransferrables = value => {
@@ -4991,7 +4975,7 @@ const setIdentifiers = identifiers => {
4991
4975
  setIdentifiers$1(identifiers);
4992
4976
  };
4993
4977
 
4994
- const rememberFocus = rememberFocus2;
4978
+ const rememberFocus = rememberFocus$1;
4995
4979
 
4996
4980
  const handleImageLoad = event => {
4997
4981
  const $ImagePreviewImage = event.target;
@@ -9095,6 +9079,12 @@ const unmaximize = () => {};
9095
9079
  const close = () => {
9096
9080
  // window.close()
9097
9081
  };
9082
+ const toggleFullScreen = () => {
9083
+ if (document.fullscreenElement) {
9084
+ return document.exitFullscreen();
9085
+ }
9086
+ return document.documentElement.requestFullscreen();
9087
+ };
9098
9088
  const sendVisibilityChangeHint = () => {
9099
9089
  send(/* SaveState.handleVisibilityChange */'SaveState.handleVisibilityChange', /* visibilityState */'hidden');
9100
9090
  };
@@ -9324,6 +9314,7 @@ const commandMap = {
9324
9314
  'Window.minimize': minimize,
9325
9315
  'Window.onVisibilityChange': onVisibilityChange,
9326
9316
  'Window.reload': reload,
9317
+ 'Window.toggleFullScreen': toggleFullScreen,
9327
9318
  'Window.unmaximize': unmaximize,
9328
9319
  'WindowTitle.set': set$1
9329
9320
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.3.0",
3
+ "version": "30.5.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"