@lvce-editor/renderer-process 30.68.6 → 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';
@@ -2375,6 +2406,9 @@ const getEventListenerArg = (param, event) => {
2375
2406
  if (param === 'event.clipboardData.files2') {
2376
2407
  return handleClipboardDataFiles2(event);
2377
2408
  }
2409
+ if (param === 'event.clipboardData.text') {
2410
+ return event.clipboardData?.getData('text/plain') || '';
2411
+ }
2378
2412
  switch (param) {
2379
2413
  case 'event.altKey':
2380
2414
  return event.altKey;
@@ -3354,7 +3388,7 @@ const setStyle = ($Element, styleString) => {
3354
3388
 
3355
3389
  const removedAttributeProps = new Map([['ariaActivedescendant', 'aria-activedescendant'], ['ariaControls', 'aria-controls'], ['ariaDescribedBy', 'aria-describedby'], ['ariaInvalid', 'aria-invalid'], ['ariaLabelledBy', 'aria-labelledby'], ['ariaOwns', 'aria-owns'], ['className', 'class'], ['htmlFor', 'for'], ['inputType', 'type']]);
3356
3390
  const pixelStyleProps = new Set(['height', 'left', 'marginTop', 'paddingLeft', 'paddingRight', 'top', 'width']);
3357
- const eventProps = new Set(['onBlur', 'onChange', 'onClick', 'onContextMenu', 'onBeforeInput', 'onDblClick', 'onDragEnd', 'onDragEnter', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onError', 'onFocus', 'onFocusIn', 'onFocusOut', 'onInput', 'onKeydown', 'onKeyDown', 'onKeyUp', 'onLoad', 'onLoadedData', 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onPointerDown', 'onPointerMove', 'onPointerOut', 'onPointerOver', 'onScroll', 'onSelectionChange', 'onSubmit', 'onTimeUpdate', 'onWheel']);
3391
+ const eventProps = new Set(['onBlur', 'onChange', 'onClick', 'onContextMenu', 'onBeforeInput', 'onDblClick', 'onDragEnd', 'onDragEnter', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onError', 'onFocus', 'onFocusIn', 'onFocusOut', 'onInput', 'onKeydown', 'onKeyDown', 'onKeyUp', 'onLoad', 'onLoadedData', 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onPaste', 'onPointerDown', 'onPointerMove', 'onPointerOut', 'onPointerOver', 'onScroll', 'onSelectionChange', 'onSubmit', 'onTimeUpdate', 'onWheel']);
3358
3392
  const setOptionalAttribute = ($Element, attributeName, value) => {
3359
3393
  if (value) {
3360
3394
  $Element.setAttribute(attributeName, value);
@@ -12475,8 +12509,9 @@ const enable = async window => {
12475
12509
  };
12476
12510
 
12477
12511
  const main = async () => {
12512
+ initialize();
12478
12513
  if (await initializeLayout(location.href)) return;
12479
- initialize(location.search);
12514
+ initialize$1(location.search);
12480
12515
  Object.assign(commandMapRef, commandMap);
12481
12516
  enable(window);
12482
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.6",
3
+ "version": "30.68.8",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"