amis-editor-core 6.13.0-beta.8 → 6.13.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.
package/esm/manager.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  /// <reference types="lodash" />
3
3
  import { DataSchema } from 'amis';
4
4
  import { RenderOptions, GlobalVariableItem } from 'amis-core';
5
- import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions, InlineEditableElement } from './plugin';
5
+ import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuItem, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions, InlineEditableElement } from './plugin';
6
6
  import { EditorStoreType, SubEditorContext } from './store/editor';
7
7
  import { EditorNodeType } from './store/node';
8
8
  import { EditorProps } from './component/Editor';
@@ -953,8 +953,11 @@ export declare class EditorManager {
953
953
  openContextMenu(id: string, region: string, info: {
954
954
  x: number;
955
955
  y: number;
956
+ clientX: number;
957
+ clientY: number;
958
+ target: HTMLElement;
956
959
  }): void;
957
- buildContextMenus(context: ContextMenuEventContext): any[];
960
+ buildContextMenus(context: ContextMenuEventContext): ContextMenuItem[];
958
961
  closeContextMenu(): void;
959
962
  /**
960
963
  * 自由容器内元素置于顶层
@@ -1156,6 +1159,7 @@ export declare class EditorManager {
1156
1159
  */
1157
1160
  deleteGlobalVariable(variable: Partial<GlobalVariableItem>): Promise<any>;
1158
1161
  beforeDispatchEvent(originHook: any, e: any, component: any, scoped: IScopedContext, data: any, broadcasts?: any): void;
1162
+ getThemeClassPrefix(): any;
1159
1163
  /**
1160
1164
  * 销毁函数
1161
1165
  */
@@ -6,7 +6,8 @@ export declare class BasicToolbarPlugin extends BasePlugin {
6
6
  static scene: string[];
7
7
  order: number;
8
8
  buildEditorToolbar({ id, schema, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
9
- buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
9
+ getElementsFromPoint(x: number, y: number, target: HTMLElement): Element[];
10
+ buildEditorContextMenu({ id, schema, region, info, selections, clientX, clientY, target }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
10
11
  buildEditorPanel(context: BuildPanelEventContext, panels: Array<BasicPanelItem>): void;
11
12
  afterInsert(event: PluginEvent<InsertEventContext>): void;
12
13
  }
package/esm/plugin.d.ts CHANGED
@@ -140,6 +140,7 @@ export interface InlineEditableElement {
140
140
  * 渲染器信息。
141
141
  */
142
142
  export interface RendererInfo extends RendererScaffoldInfo {
143
+ useLazyRender?: boolean;
143
144
  scaffolds?: Array<Partial<RendererScaffoldInfo>>;
144
145
  rendererName?: string;
145
146
  /**
@@ -413,6 +414,9 @@ export interface ContextMenuEventContext extends BaseEventContext {
413
414
  region: string;
414
415
  selections: Array<BaseEventContext>;
415
416
  data: Array<ContextMenuItem>;
417
+ clientX?: number;
418
+ clientY?: number;
419
+ target?: HTMLElement;
416
420
  }
417
421
  export interface SelectionEventContext extends BaseEventContext {
418
422
  selections: Array<BaseEventContext>;
@@ -569,6 +573,7 @@ export interface PluginEventListener {
569
573
  onMove(e: MouseEvent): void;
570
574
  onEnd(e: MouseEvent): void;
571
575
  }>) => void;
576
+ afterBuildPanelBody?: (event: PluginEvent<AfterBuildPanelBody>) => void;
572
577
  onGlobalVariableInit?: (event: PluginEvent<GlobalVariablesEventContext>) => void;
573
578
  onGlobalVariableDetail?: (event: PluginEvent<GlobalVariableEventContext>) => void;
574
579
  onGlobalVariableSave?: (event: PluginEvent<GlobalVariableEventContext>) => void;
@@ -32,9 +32,10 @@ export default class Preview extends Component<PreviewProps> {
32
32
  unSensor?: () => void;
33
33
  layer?: HTMLDivElement;
34
34
  scrollLayer?: HTMLDivElement;
35
+ handleLayerScroll(e: WheelEvent): void;
35
36
  contentsRef(ref: HTMLDivElement | null): void;
36
37
  readonly unReaction: () => void;
37
- handlePanelChange(): void;
38
+ handlePreviewViewChange(): void;
38
39
  getHighlightNodes(): string[];
39
40
  calculateHighlightBox(ids: Array<string>): void;
40
41
  handeMouseDown(e: MouseEvent): void;
@@ -16,7 +16,7 @@ export default class BackTop extends React.Component<BackTopProps, BackTopStates
16
16
  constructor(props: any);
17
17
  componentDidMount(): void;
18
18
  componentWillUnmount(): void;
19
- getDefaultTarget(): Document | (Window & typeof globalThis);
19
+ getDefaultTarget(): (Window & typeof globalThis) | Document;
20
20
  handleScroll(e: React.UIEvent<HTMLElement> | {
21
21
  target: any;
22
22
  }): void;
@@ -40,7 +40,7 @@ export declare class DefaultDNDMode implements DNDModeInterface {
40
40
  getTarget(e: DragEvent): HTMLElement | null;
41
41
  getChildren(region: HTMLElement): Array<HTMLElement>;
42
42
  detectDropPosition(event: DragEvent, dropTarget: HTMLElement): 'top' | 'bottom' | 'left' | 'right';
43
- reductionPosition(position: 'top' | 'bottom' | 'left' | 'right', isHorizontal?: boolean): "left" | "right" | "bottom" | "top";
43
+ reductionPosition(position: 'top' | 'bottom' | 'left' | 'right', isHorizontal?: boolean): "left" | "right" | "top" | "bottom";
44
44
  updateIndicator(ghost: HTMLElement, target: HTMLElement, dropPosition: 'top' | 'bottom' | 'left' | 'right' | 'center' | 'middle'): void;
45
45
  /**
46
46
  * 销毁
package/lib/dnd/flex.d.ts CHANGED
@@ -47,6 +47,6 @@ export declare class FlexDNDMode implements DNDModeInterface {
47
47
  * 销毁
48
48
  */
49
49
  dispose(): void;
50
- getDropPosition(): "left" | "right" | "bottom" | "top" | undefined;
50
+ getDropPosition(): "left" | "right" | "top" | "bottom" | undefined;
51
51
  interruptionDrop(): boolean;
52
52
  }
package/lib/editor.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-editor-core v6.13.0-beta.8
2
+ * amis-editor-core v6.13.0
3
3
  * Copyright 2018-2025 @fex
4
4
  */
5
5