@lvce-editor/renderer-process 30.68.4 → 30.68.6

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.
@@ -9352,7 +9352,7 @@ const invoke = (viewletId, method, ...args) => {
9352
9352
  string(method);
9353
9353
  const instance = get$b(viewletId);
9354
9354
  if (!instance?.factory) {
9355
- if (viewletId && method !== 'setActionsDom') {
9355
+ if (viewletId && method !== 'setActionsDom' && method !== 'setTitle') {
9356
9356
  warn(`cannot execute ${method} viewlet instance ${viewletId} not found`);
9357
9357
  }
9358
9358
  return;
@@ -10465,6 +10465,15 @@ const setPathName = pathName => {
10465
10465
  }
10466
10466
  history.pushState(null, '', pathName);
10467
10467
  };
10468
+ const setHash = hash => {
10469
+ const currentHref = getHref();
10470
+ const url = new URL(currentHref);
10471
+ url.hash = hash.startsWith('#') ? hash.slice(1) : hash;
10472
+ if (url.href === currentHref) {
10473
+ return;
10474
+ }
10475
+ history.replaceState(null, '', url.href);
10476
+ };
10468
10477
  const setWorkspaceUri = workspaceUri => {
10469
10478
  const currentHref = getHref();
10470
10479
  const url = new URL(currentHref);
@@ -11992,6 +12001,7 @@ const commandMap = {
11992
12001
  'Location.getHref': getHref,
11993
12002
  'Location.getPathName': getPathName,
11994
12003
  'Location.hydrate': hydrate,
12004
+ 'Location.setHash': setHash,
11995
12005
  'Location.setPathName': setPathName,
11996
12006
  'Location.setWorkspaceUri': setWorkspaceUri,
11997
12007
  'Main.openUri': openUri,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.68.4",
3
+ "version": "30.68.6",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"