@lvce-editor/renderer-process 30.68.7 → 30.68.9
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 +35 -2
- package/package.json +1 -1
|
@@ -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';
|
|
@@ -8348,6 +8379,7 @@ const getTitleBarLeftInset = () => {
|
|
|
8348
8379
|
};
|
|
8349
8380
|
const getBounds = () => {
|
|
8350
8381
|
return {
|
|
8382
|
+
isStandalone: globalThis.matchMedia?.('(display-mode: standalone)').matches ?? false,
|
|
8351
8383
|
titleBarHeight: getTitleBarHeight(),
|
|
8352
8384
|
windowHeight: window.innerHeight,
|
|
8353
8385
|
windowWidth: window.innerWidth
|
|
@@ -12478,8 +12510,9 @@ const enable = async window => {
|
|
|
12478
12510
|
};
|
|
12479
12511
|
|
|
12480
12512
|
const main = async () => {
|
|
12513
|
+
initialize();
|
|
12481
12514
|
if (await initializeLayout(location.href)) return;
|
|
12482
|
-
initialize(location.search);
|
|
12515
|
+
initialize$1(location.search);
|
|
12483
12516
|
Object.assign(commandMapRef, commandMap);
|
|
12484
12517
|
enable(window);
|
|
12485
12518
|
state$4.modules[ColorPicker] = ViewletColorPicker;
|