@lvce-editor/renderer-process 30.68.7 → 30.68.8

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.
@@ -1702,7 +1702,7 @@ const serialize = value => {
1702
1702
  const isCommand = value => {
1703
1703
  return typeof value === 'object' && value !== null && 'method' in value && typeof value.method === 'string';
1704
1704
  };
1705
- const initialize = search => {
1705
+ const initialize$1 = search => {
1706
1706
  const searchParams = new URLSearchParams(search);
1707
1707
  state$l.enabled = searchParams.has('traceRendererWorker');
1708
1708
  state$l.entries = [];
@@ -1969,6 +1969,37 @@ const dispose$l = async () => {
1969
1969
  }
1970
1970
  };
1971
1971
 
1972
+ const initialize = () => {
1973
+ try {
1974
+ const savedLayout = JSON.parse(localStorage.getItem('Layout') || 'null');
1975
+ if (savedLayout?.aiNativeLayout !== true) return;
1976
+ let settings;
1977
+ try {
1978
+ settings = JSON.parse(localStorage.getItem('settings') || 'null');
1979
+ } catch {
1980
+ settings = null;
1981
+ }
1982
+ const root = document.documentElement;
1983
+ root.classList.add('AiNativeLayoutStartup');
1984
+ if (settings?.['chat2.aiNativeTheme'] === 'claude') {
1985
+ root.classList.add('AiNativeLayoutStartupClaude');
1986
+ }
1987
+ const observer = new MutationObserver(() => {
1988
+ if (!document.querySelector('.Workbench.AiNativeLayout')) return;
1989
+ root.classList.remove('AiNativeLayoutStartup', 'AiNativeLayoutStartupClaude');
1990
+ observer.disconnect();
1991
+ });
1992
+ observer.observe(document, {
1993
+ attributeFilter: ['class'],
1994
+ attributes: true,
1995
+ childList: true,
1996
+ subtree: true
1997
+ });
1998
+ } catch {
1999
+ // Storage can be unavailable in restricted browser contexts.
2000
+ }
2001
+ };
2002
+
1972
2003
  const isAvailable = () => {
1973
2004
  const tauriWindow = window;
1974
2005
  return typeof tauriWindow.__TAURI__?.core?.invoke === 'function';
@@ -12478,8 +12509,9 @@ const enable = async window => {
12478
12509
  };
12479
12510
 
12480
12511
  const main = async () => {
12512
+ initialize();
12481
12513
  if (await initializeLayout(location.href)) return;
12482
- initialize(location.search);
12514
+ initialize$1(location.search);
12483
12515
  Object.assign(commandMapRef, commandMap);
12484
12516
  enable(window);
12485
12517
  state$4.modules[ColorPicker] = ViewletColorPicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.68.7",
3
+ "version": "30.68.8",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"