@ease-forge/designer 1.0.29 → 1.1.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/dist/components/DesignCanvas.vue.d.ts +16 -0
- package/dist/components/DesignCanvas.vue.d.ts.map +1 -0
- package/dist/components/DragGhost.vue.d.ts +9 -0
- package/dist/components/DragGhost.vue.d.ts.map +1 -0
- package/dist/components/Workbench.vue.d.ts +14 -0
- package/dist/components/Workbench.vue.d.ts.map +1 -0
- package/dist/components/panels/MaterialPanel.vue.d.ts +14 -0
- package/dist/components/panels/MaterialPanel.vue.d.ts.map +1 -0
- package/dist/components/panels/OutlinePanel.vue.d.ts +9 -0
- package/dist/components/panels/OutlinePanel.vue.d.ts.map +1 -0
- package/dist/components/panels/SetterAdvancedPanel.vue.d.ts +15 -0
- package/dist/components/panels/SetterAdvancedPanel.vue.d.ts.map +1 -0
- package/dist/components/panels/SetterEventPanel.vue.d.ts +15 -0
- package/dist/components/panels/SetterEventPanel.vue.d.ts.map +1 -0
- package/dist/components/panels/SetterPropsGroup.vue.d.ts +12 -0
- package/dist/components/panels/SetterPropsGroup.vue.d.ts.map +1 -0
- package/dist/components/panels/SetterPropsPanel.vue.d.ts +12 -0
- package/dist/components/panels/SetterPropsPanel.vue.d.ts.map +1 -0
- package/dist/components/panels/SetterStyleGroup.vue.d.ts +12 -0
- package/dist/components/panels/SetterStyleGroup.vue.d.ts.map +1 -0
- package/dist/components/panels/SetterStylePanel.vue.d.ts +12 -0
- package/dist/components/panels/SetterStylePanel.vue.d.ts.map +1 -0
- package/dist/components/panels/style/StyleGroups.d.ts +35 -0
- package/dist/components/panels/style/StyleGroups.d.ts.map +1 -0
- package/dist/components/setter/BoolSetter.vue.d.ts +5 -0
- package/dist/components/setter/BoolSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/ColorSetter.vue.d.ts +5 -0
- package/dist/components/setter/ColorSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/DateSetter.vue.d.ts +5 -0
- package/dist/components/setter/DateSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/EditorSetter.vue.d.ts +5 -0
- package/dist/components/setter/EditorSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/NumberSetter.vue.d.ts +5 -0
- package/dist/components/setter/NumberSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/SelectSetter.vue.d.ts +5 -0
- package/dist/components/setter/SelectSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/StringSetter.vue.d.ts +5 -0
- package/dist/components/setter/StringSetter.vue.d.ts.map +1 -0
- package/dist/components/setter/TimeSetter.vue.d.ts +5 -0
- package/dist/components/setter/TimeSetter.vue.d.ts.map +1 -0
- package/dist/core/DesignerDriver.d.ts +36 -0
- package/dist/core/DesignerDriver.d.ts.map +1 -0
- package/dist/core/DesignerEffect.d.ts +30 -0
- package/dist/core/DesignerEffect.d.ts.map +1 -0
- package/dist/core/DesignerEngine.d.ts +95 -0
- package/dist/core/DesignerEngine.d.ts.map +1 -0
- package/dist/core/DesignerModule.d.ts +28 -0
- package/dist/core/DesignerModule.d.ts.map +1 -0
- package/dist/core/EventBus.d.ts +37 -0
- package/dist/core/EventBus.d.ts.map +1 -0
- package/dist/drivers/DragDropDriver.d.ts +48 -0
- package/dist/drivers/DragDropDriver.d.ts.map +1 -0
- package/dist/drivers/KeyboardDriver.d.ts +18 -0
- package/dist/drivers/KeyboardDriver.d.ts.map +1 -0
- package/dist/drivers/MouseClickDriver.d.ts +14 -0
- package/dist/drivers/MouseClickDriver.d.ts.map +1 -0
- package/dist/drivers/MouseMoveDriver.d.ts +14 -0
- package/dist/drivers/MouseMoveDriver.d.ts.map +1 -0
- package/dist/ease-forge-designer.cjs.js +2 -0
- package/dist/ease-forge-designer.cjs.js.map +1 -0
- package/dist/ease-forge-designer.cjs.prod.js +1 -0
- package/dist/ease-forge-designer.css +2 -0
- package/dist/ease-forge-designer.esm.js +3434 -0
- package/dist/ease-forge-designer.esm.js.map +1 -0
- package/dist/ease-forge-designer.esm.prod.js +3432 -0
- package/dist/effects/AuxToolEffect.d.ts +52 -0
- package/dist/effects/AuxToolEffect.d.ts.map +1 -0
- package/dist/effects/CursorEffect.d.ts +29 -0
- package/dist/effects/CursorEffect.d.ts.map +1 -0
- package/dist/effects/DraggingEffect.d.ts +17 -0
- package/dist/effects/DraggingEffect.d.ts.map +1 -0
- package/dist/events/DesignerEvent.d.ts +26 -0
- package/dist/events/DesignerEvent.d.ts.map +1 -0
- package/dist/events/cursor/AbstractCursorEvent.d.ts +22 -0
- package/dist/events/cursor/AbstractCursorEvent.d.ts.map +1 -0
- package/dist/events/cursor/DragMoveEvent.d.ts +10 -0
- package/dist/events/cursor/DragMoveEvent.d.ts.map +1 -0
- package/dist/events/cursor/DragStartEvent.d.ts +17 -0
- package/dist/events/cursor/DragStartEvent.d.ts.map +1 -0
- package/dist/events/cursor/DragStopEvent.d.ts +10 -0
- package/dist/events/cursor/DragStopEvent.d.ts.map +1 -0
- package/dist/events/cursor/MouseClickEvent.d.ts +10 -0
- package/dist/events/cursor/MouseClickEvent.d.ts.map +1 -0
- package/dist/events/cursor/MouseDoubleClickEvent.d.ts +10 -0
- package/dist/events/cursor/MouseDoubleClickEvent.d.ts.map +1 -0
- package/dist/events/cursor/MouseMoveEvent.d.ts +10 -0
- package/dist/events/cursor/MouseMoveEvent.d.ts.map +1 -0
- package/dist/events/designer/CommandEvent.d.ts +20 -0
- package/dist/events/designer/CommandEvent.d.ts.map +1 -0
- package/dist/events/designer/DragDropEvent.d.ts +29 -0
- package/dist/events/designer/DragDropEvent.d.ts.map +1 -0
- package/dist/events/engine/EngineMountEvent.d.ts +21 -0
- package/dist/events/engine/EngineMountEvent.d.ts.map +1 -0
- package/dist/events/engine/EngineUnmountEvent.d.ts +16 -0
- package/dist/events/engine/EngineUnmountEvent.d.ts.map +1 -0
- package/dist/events/keyboard/ShortcutKeyEvent.d.ts +32 -0
- package/dist/events/keyboard/ShortcutKeyEvent.d.ts.map +1 -0
- package/dist/history/Command.d.ts +21 -0
- package/dist/history/Command.d.ts.map +1 -0
- package/dist/history/CommandStack.d.ts +46 -0
- package/dist/history/CommandStack.d.ts.map +1 -0
- package/dist/index.d.ts +89 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/models/Cursor.d.ts +44 -0
- package/dist/models/Cursor.d.ts.map +1 -0
- package/dist/models/DesignerState.d.ts +76 -0
- package/dist/models/DesignerState.d.ts.map +1 -0
- package/dist/models/DraggingCmpMetas.d.ts +41 -0
- package/dist/models/DraggingCmpMetas.d.ts.map +1 -0
- package/dist/models/HoverDashed.d.ts +41 -0
- package/dist/models/HoverDashed.d.ts.map +1 -0
- package/dist/models/Insertion.d.ts +57 -0
- package/dist/models/Insertion.d.ts.map +1 -0
- package/dist/models/Selection.d.ts +8 -0
- package/dist/models/Selection.d.ts.map +1 -0
- package/dist/models/SetterShareState.d.ts +32 -0
- package/dist/models/SetterShareState.d.ts.map +1 -0
- package/dist/operations/NodeOperationEffect.d.ts +25 -0
- package/dist/operations/NodeOperationEffect.d.ts.map +1 -0
- package/dist/operations/NodePosition.d.ts +55 -0
- package/dist/operations/NodePosition.d.ts.map +1 -0
- package/dist/operations/NodeSerialize.d.ts +8 -0
- package/dist/operations/NodeSerialize.d.ts.map +1 -0
- package/dist/operations/commands/AddNodesCommand.d.ts +34 -0
- package/dist/operations/commands/AddNodesCommand.d.ts.map +1 -0
- package/dist/operations/commands/MoveNodesCommand.d.ts +42 -0
- package/dist/operations/commands/MoveNodesCommand.d.ts.map +1 -0
- package/dist/operations/commands/RemoveNodesCommand.d.ts +50 -0
- package/dist/operations/commands/RemoveNodesCommand.d.ts.map +1 -0
- package/dist/operations/commands/UpdateListenersCommand.d.ts +42 -0
- package/dist/operations/commands/UpdateListenersCommand.d.ts.map +1 -0
- package/dist/operations/commands/UpdatePropsCommand.d.ts +53 -0
- package/dist/operations/commands/UpdatePropsCommand.d.ts.map +1 -0
- package/dist/register/RegisterSetter.d.ts +8 -0
- package/dist/register/RegisterSetter.d.ts.map +1 -0
- package/dist/types/Designer.d.ts +153 -0
- package/dist/types/Designer.d.ts.map +1 -0
- package/dist/utils/ComponentMetaUtils.d.ts +13 -0
- package/dist/utils/ComponentMetaUtils.d.ts.map +1 -0
- package/dist/utils/DesignerUtils.d.ts +11 -0
- package/dist/utils/DesignerUtils.d.ts.map +1 -0
- package/dist/utils/PositionCalc.d.ts +27 -0
- package/dist/utils/PositionCalc.d.ts.map +1 -0
- package/dist/utils/SetterUtils.d.ts +59 -0
- package/dist/utils/SetterUtils.d.ts.map +1 -0
- package/dist/utils/StyleUtils.d.ts +34 -0
- package/dist/utils/StyleUtils.d.ts.map +1 -0
- package/package.json +10 -4
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type DesignBlock } from "@ease-forge/runtime";
|
|
2
|
+
import type { DesignerState } from "../models/DesignerState";
|
|
3
|
+
interface DesignCanvasProps {
|
|
4
|
+
/** 设计器页面状态 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** block配置 */
|
|
7
|
+
block?: DesignBlock;
|
|
8
|
+
/** 是否自动加载依赖的组件 */
|
|
9
|
+
autoLoadComponent?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<DesignCanvasProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DesignCanvasProps> & Readonly<{}>, {
|
|
12
|
+
autoLoadComponent: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=DesignCanvas.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignCanvas.vue.d.ts","sourceRoot":"","sources":["../../src/components/DesignCanvas.vue"],"names":[],"mappings":"AAgMA,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAO7D,UAAU,iBAAiB;IACvB,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc;IACd,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,kBAAkB;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAyMD,QAAA,MAAM,YAAY;uBA1MM,OAAO;6EA6M7B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DesignerEngine } from "../core/DesignerEngine";
|
|
2
|
+
interface DragGhostProps {
|
|
3
|
+
/** 设计器引擎 */
|
|
4
|
+
designerEngine: DesignerEngine;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<DragGhostProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DragGhostProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=DragGhost.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragGhost.vue.d.ts","sourceRoot":"","sources":["../../src/components/DragGhost.vue"],"names":[],"mappings":"AAsFA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAO7D,UAAU,cAAc;IACpB,YAAY;IACZ,cAAc,EAAE,cAAc,CAAC;CAClC;AAiFD,QAAA,MAAM,YAAY,wSAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type DesignBlock, type MaterialMetaTab } from "@ease-forge/runtime";
|
|
2
|
+
import type { DesignerState } from "../models/DesignerState";
|
|
3
|
+
interface WorkbenchProps {
|
|
4
|
+
/** 设计器状态数据 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** 画布的 DesignBlock 配置 */
|
|
7
|
+
block?: DesignBlock;
|
|
8
|
+
/** 物料分组配置 */
|
|
9
|
+
materialTabs?: Array<MaterialMetaTab>;
|
|
10
|
+
}
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<WorkbenchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WorkbenchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=Workbench.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Workbench.vue.d.ts","sourceRoot":"","sources":["../../src/components/Workbench.vue"],"names":[],"mappings":"AAuQA,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,eAAe,EAAoB,MAAM,qBAAqB,CAAC;AAC/G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAe7D,UAAU,cAAc;IACpB,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,yBAAyB;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,aAAa;IACb,YAAY,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACzC;AAijBD,QAAA,MAAM,YAAY,wSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type MaterialMetaTab } from "@ease-forge/runtime";
|
|
2
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
3
|
+
interface MaterialPanelProps {
|
|
4
|
+
/** 设计器状态数据 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** 物料分组配置 */
|
|
7
|
+
materialTabs?: Array<MaterialMetaTab>;
|
|
8
|
+
/** 物料依赖的组件类型映射(加载物料时一并加载依赖组件) */
|
|
9
|
+
dependence?: Record<string, Array<string>>;
|
|
10
|
+
}
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<MaterialPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MaterialPanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=MaterialPanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/MaterialPanel.vue"],"names":[],"mappings":"AAmLA,OAAO,EAAiC,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,UAAU,kBAAkB;IACxB,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa;IACb,YAAY,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACtC,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAC9C;AAoMD,QAAA,MAAM,YAAY,gTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
2
|
+
interface OutlinePanelProps {
|
|
3
|
+
/** 设计器状态数据 */
|
|
4
|
+
designerState: DesignerState;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<OutlinePanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OutlinePanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=OutlinePanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutlinePanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/OutlinePanel.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,UAAU,iBAAiB;IACvB,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;CAChC;AAgID,QAAA,MAAM,YAAY,8SAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
2
|
+
interface SetterAdvancedPanelProps {
|
|
3
|
+
/** 设计器状态数据 */
|
|
4
|
+
designerState: DesignerState;
|
|
5
|
+
/** 高级设置面板配置(来自 ComponentMeta.setter.advanced) */
|
|
6
|
+
advancedPanel?: {
|
|
7
|
+
disableVShow?: boolean;
|
|
8
|
+
disableVIf?: boolean;
|
|
9
|
+
disableVFor?: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterAdvancedPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterAdvancedPanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=SetterAdvancedPanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetterAdvancedPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/SetterAdvancedPanel.vue"],"names":[],"mappings":"AAsQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAOhE,UAAU,wBAAwB;IAC9B,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,iDAAiD;IACjD,aAAa,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC3F;AAiQD,QAAA,MAAM,YAAY,4TAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
2
|
+
interface SetterEventPanelProps {
|
|
3
|
+
/** 设计器状态数据 */
|
|
4
|
+
designerState: DesignerState;
|
|
5
|
+
/** 事件面板配置(来自 ComponentMeta.setter.events) */
|
|
6
|
+
eventPanel?: {
|
|
7
|
+
includeInnerEvents?: any;
|
|
8
|
+
excludeInnerEvents?: Array<string>;
|
|
9
|
+
groups?: Array<any>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterEventPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterEventPanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=SetterEventPanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetterEventPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/SetterEventPanel.vue"],"names":[],"mappings":"AA+SA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE,UAAU,qBAAqB;IAC3B,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,6CAA6C;IAC7C,UAAU,CAAC,EAAE;QAAE,kBAAkB,CAAC,EAAE,GAAG,CAAC;QAAC,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;KAAE,CAAC;CACtG;AA+ZD,QAAA,MAAM,YAAY,sTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SetterGroup } from "@ease-forge/runtime";
|
|
2
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
3
|
+
interface SetterPropsGroupProps {
|
|
4
|
+
/** 设计器状态数据 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** 属性分组(已经过隐藏过滤) */
|
|
7
|
+
group: SetterGroup;
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterPropsGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterPropsGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=SetterPropsGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetterPropsGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/SetterPropsGroup.vue"],"names":[],"mappings":"AA8LA,OAAO,EAA0B,KAAK,WAAW,EAAoB,MAAM,qBAAqB,CAAC;AACjG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAKhE,UAAU,qBAAqB;IAC3B,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,oBAAoB;IACpB,KAAK,EAAE,WAAW,CAAC;CACtB;AA6LD,QAAA,MAAM,YAAY,sTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type PropsPanel } from "@ease-forge/runtime";
|
|
2
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
3
|
+
interface SetterPropsPanelProps {
|
|
4
|
+
/** 设计器状态数据 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** 设置器面板配置(来自 ComponentMeta.setter.props) */
|
|
7
|
+
propsPanel?: PropsPanel;
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterPropsPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterPropsPanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=SetterPropsPanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetterPropsPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/SetterPropsPanel.vue"],"names":[],"mappings":"AAsGA,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,qBAAqB,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE,UAAU,qBAAqB;IAC3B,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AAuHD,QAAA,MAAM,YAAY,sTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
2
|
+
import { type StyleGroupDefine } from "./style/StyleGroups";
|
|
3
|
+
interface SetterStyleGroupProps {
|
|
4
|
+
/** 设计器状态数据 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** 生效的样式分组 */
|
|
7
|
+
group: StyleGroupDefine;
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterStyleGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterStyleGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=SetterStyleGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetterStyleGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/SetterStyleGroup.vue"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,KAAK,gBAAgB,EAAwB,MAAM,qBAAqB,CAAC;AAMlF,UAAU,qBAAqB;IAC3B,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc;IACd,KAAK,EAAE,gBAAgB,CAAC;CAC3B;AAoGD,QAAA,MAAM,YAAY,sTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StylePanel } from "@ease-forge/runtime";
|
|
2
|
+
import type { DesignerState } from "../../models/DesignerState";
|
|
3
|
+
interface SetterStylePanelProps {
|
|
4
|
+
/** 设计器状态数据 */
|
|
5
|
+
designerState: DesignerState;
|
|
6
|
+
/** 样式设置器面板配置(来自 ComponentMeta.setter.style) */
|
|
7
|
+
stylePanel?: StylePanel;
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterStylePanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterStylePanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=SetterStylePanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetterStylePanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panels/SetterStylePanel.vue"],"names":[],"mappings":"AAmJA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQhE,UAAU,qBAAqB;IAC3B,cAAc;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,+CAA+C;IAC/C,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AAoLD,QAAA,MAAM,YAAY,sTAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** 样式分组声明: 纯数据声明 + SetterStylePanel 通用渲染, 读写同一 node.props.style */
|
|
2
|
+
/** 样式设置项使用的原子 setter 控件类型 */
|
|
3
|
+
type StyleSetterCmp = "StringSetter" | "NumberSetter" | "SelectSetter" | "ColorSetter";
|
|
4
|
+
/** 单个样式设置项声明 */
|
|
5
|
+
interface StyleItemDefine {
|
|
6
|
+
/** CSS 属性名(支持 kebab-case, 存入 style 对象) */
|
|
7
|
+
property: string;
|
|
8
|
+
/** 显示名称 */
|
|
9
|
+
label: string;
|
|
10
|
+
/** 控件类型 */
|
|
11
|
+
cmp: StyleSetterCmp;
|
|
12
|
+
/** SelectSetter 的选项 */
|
|
13
|
+
options?: Array<{
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** NumberSetter 的单位后缀(显示用) */
|
|
18
|
+
suffix?: string;
|
|
19
|
+
}
|
|
20
|
+
/** 一组样式设置声明 */
|
|
21
|
+
interface StyleGroupDefine {
|
|
22
|
+
/** 分组标题 */
|
|
23
|
+
title: string;
|
|
24
|
+
/** 对应 StylePanel 配置的禁用开关字段名 */
|
|
25
|
+
disableKey?: "disableLayout" | "disableSpacing" | "disableSize" | "disablePosition" | "disableFont" | "disableBorder" | "disableEffect";
|
|
26
|
+
/** 显示条件(当前 style 值判断, 如 display=flex 时才显示 flex 项) */
|
|
27
|
+
visible?: (style: Record<string, any>) => boolean;
|
|
28
|
+
/** 样式设置项 */
|
|
29
|
+
items: Array<StyleItemDefine>;
|
|
30
|
+
}
|
|
31
|
+
/** 全部样式分组声明(顺序即面板显示顺序) */
|
|
32
|
+
declare const styleGroupDefines: Array<StyleGroupDefine>;
|
|
33
|
+
export type { StyleSetterCmp, StyleItemDefine, StyleGroupDefine, };
|
|
34
|
+
export { styleGroupDefines, };
|
|
35
|
+
//# sourceMappingURL=StyleGroups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyleGroups.d.ts","sourceRoot":"","sources":["../../../../src/components/panels/style/StyleGroups.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,6BAA6B;AAC7B,KAAK,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,CAAC;AAEvF,gBAAgB;AAChB,UAAU,eAAe;IACrB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW;IACX,GAAG,EAAE,cAAc,CAAC;IACpB,uBAAuB;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAe;AACf,UAAU,gBAAgB;IACtB,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,UAAU,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,aAAa,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;IACxI,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC;IAClD,YAAY;IACZ,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACjC;AAiBD,0BAA0B;AAC1B,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAoK9C,CAAC;AAEF,YAAY,EACR,cAAc,EACd,eAAe,EACf,gBAAgB,GACnB,CAAA;AAED,OAAO,EACH,iBAAiB,GACpB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=BoolSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoolSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/BoolSetter.vue"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AAkElF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=ColorSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/ColorSetter.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AA+ElF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=DateSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/DateSetter.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AAmFlF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=EditorSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/EditorSetter.vue"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AAuElF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=NumberSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/NumberSetter.vue"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AAyElF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=SelectSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/SelectSetter.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AA0ElF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=StringSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/StringSetter.vue"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AAsElF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SetterExpose, SetterProps } from "@ease-forge/runtime";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SetterProps, SetterExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SetterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=TimeSetter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeSetter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/setter/TimeSetter.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,qBAAqB,CAAC;AAmFlF,QAAA,MAAM,YAAY,4SAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { EventContainer } from "../types/Designer";
|
|
2
|
+
import type { DesignerEngine } from "./DesignerEngine";
|
|
3
|
+
import { DesignerModule } from "./DesignerModule";
|
|
4
|
+
/**
|
|
5
|
+
* 设计器内部业务事件生产者
|
|
6
|
+
* 监听 container 的 HTMLElement 原生事件, 转换成设计器业务事件分发到 EventBus
|
|
7
|
+
*/
|
|
8
|
+
declare abstract class DesignerDriver extends DesignerModule {
|
|
9
|
+
/**
|
|
10
|
+
* 监听 container 的 HTMLElement 事件
|
|
11
|
+
* @param type HTMLElement 事件类型
|
|
12
|
+
* @param listener HTMLElement 事件执行函数
|
|
13
|
+
* @param options 事件选项
|
|
14
|
+
*/
|
|
15
|
+
protected addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
16
|
+
protected addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
17
|
+
/**
|
|
18
|
+
* 取消 container 的 HTMLElement 事件监听
|
|
19
|
+
* @param type HTMLElement 事件类型
|
|
20
|
+
* @param listener HTMLElement 事件执行函数
|
|
21
|
+
* @param options 事件选项
|
|
22
|
+
*/
|
|
23
|
+
protected removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
24
|
+
protected removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
25
|
+
/** 阻止事件的默认动作 */
|
|
26
|
+
protected preventDefault: (event: Event) => void;
|
|
27
|
+
/** 启动当前 DesignerDriver, 开始监听 HTMLElement 事件 */
|
|
28
|
+
abstract attach(): void;
|
|
29
|
+
/** 停止当前 DesignerDriver, 取消所有 HTMLElement 事件监听 */
|
|
30
|
+
abstract detach(): void;
|
|
31
|
+
}
|
|
32
|
+
/** DesignerDriver 构造函数 */
|
|
33
|
+
type DesignerDriverConstructor = new (designerEngine: DesignerEngine, container: EventContainer, window: Window) => DesignerDriver;
|
|
34
|
+
export type { DesignerDriverConstructor, };
|
|
35
|
+
export { DesignerDriver, };
|
|
36
|
+
//# sourceMappingURL=DesignerDriver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignerDriver.d.ts","sourceRoot":"","sources":["../../src/core/DesignerDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,uBAAe,cAAe,SAAQ,cAAc;IAChD;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI;IACpL,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI;IAKzI;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GAAG,IAAI;IACpL,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GAAG,IAAI;IAKzI,gBAAgB;IAChB,SAAS,CAAC,cAAc,GAAI,OAAO,KAAK,KAAG,IAAI,CAE9C;IAED,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,IAAI,IAAI;IAEvB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,IAAI,IAAI;CAC1B;AAED,0BAA0B;AAC1B,KAAK,yBAAyB,GAAG,KAAK,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,KAAK,cAAc,CAAC;AAEnI,YAAY,EACR,yBAAyB,GAC5B,CAAA;AAED,OAAO,EACH,cAAc,GACjB,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { EventContainer } from "../types/Designer";
|
|
2
|
+
import type { DesignerEngine } from "./DesignerEngine";
|
|
3
|
+
import { DesignerModule } from "./DesignerModule";
|
|
4
|
+
/**
|
|
5
|
+
* 设计器内部业务事件消费者
|
|
6
|
+
* 订阅 EventBus 中的业务事件并做出响应(状态更新、UI 反馈等)
|
|
7
|
+
*/
|
|
8
|
+
declare abstract class DesignerEffect extends DesignerModule {
|
|
9
|
+
/** 当前效果是否已激活 */
|
|
10
|
+
protected actived: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 开始消费 EventBus 中的事件(订阅)
|
|
13
|
+
* 引擎 mount 时调用, 幂等(重复调用直接返回)
|
|
14
|
+
*/
|
|
15
|
+
effect(): void;
|
|
16
|
+
/**
|
|
17
|
+
* 停止消费 EventBus 中的事件并释放资源
|
|
18
|
+
* 引擎 unmount 时调用, 幂等(重复调用直接返回)
|
|
19
|
+
*/
|
|
20
|
+
destroy(): void;
|
|
21
|
+
/** 开始消费事件时的钩子(订阅逻辑写在这里) */
|
|
22
|
+
protected abstract onEffect(): void;
|
|
23
|
+
/** 停止消费事件时的钩子(取消订阅、释放资源写在这里) */
|
|
24
|
+
protected abstract onDestroy(): void;
|
|
25
|
+
}
|
|
26
|
+
/** DesignerEffect 构造函数 */
|
|
27
|
+
type DesignerEffectConstructor = new (designerEngine: DesignerEngine, container: EventContainer, window: Window) => DesignerEffect;
|
|
28
|
+
export type { DesignerEffectConstructor, };
|
|
29
|
+
export { DesignerEffect, };
|
|
30
|
+
//# sourceMappingURL=DesignerEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignerEffect.d.ts","sourceRoot":"","sources":["../../src/core/DesignerEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,uBAAe,cAAe,SAAQ,cAAc;IAChD,gBAAgB;IAChB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAS;IAEnC;;;OAGG;IACH,MAAM,IAAI,IAAI;IAMd;;;OAGG;IACH,OAAO,IAAI,IAAI;IAMf,2BAA2B;IAC3B,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;IAEnC,gCAAgC;IAChC,SAAS,CAAC,QAAQ,CAAC,SAAS,IAAI,IAAI;CACvC;AAED,0BAA0B;AAC1B,KAAK,yBAAyB,GAAG,KAAK,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,KAAK,cAAc,CAAC;AAEnI,YAAY,EACR,yBAAyB,GAC5B,CAAA;AAED,OAAO,EACH,cAAc,GACjB,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type Ref, type ShallowReactive } from "vue";
|
|
2
|
+
import { type ComponentManage } from "@ease-forge/runtime";
|
|
3
|
+
import type { EventContainer } from "../types/Designer";
|
|
4
|
+
import type { DesignerDriver, DesignerDriverConstructor } from "./DesignerDriver";
|
|
5
|
+
import type { DesignerEffect, DesignerEffectConstructor } from "./DesignerEffect";
|
|
6
|
+
import { EventBus } from "./EventBus";
|
|
7
|
+
import { Cursor } from "../models/Cursor";
|
|
8
|
+
import { DraggingCmpMetas } from "../models/DraggingCmpMetas";
|
|
9
|
+
import { Insertion } from "../models/Insertion";
|
|
10
|
+
import { DesignerState } from "../models/DesignerState";
|
|
11
|
+
/** 引擎初始化属性 */
|
|
12
|
+
interface DesignerEngineProps {
|
|
13
|
+
/** 组件管理器 */
|
|
14
|
+
componentManage: ComponentManage;
|
|
15
|
+
/** 设计器内部业务事件生产者集合 */
|
|
16
|
+
drivers: Array<DesignerDriverConstructor>;
|
|
17
|
+
/** 设计器内部业务事件消费者集合 */
|
|
18
|
+
effects: Array<DesignerEffectConstructor>;
|
|
19
|
+
/** 设计器画布内容区域的 CSS 选择器(MouseClickDriver 用它判断点击是否发生在画布内) */
|
|
20
|
+
designerContent: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 设计器引擎
|
|
24
|
+
* 负责设计器功能模块(Driver/Effect)的装配与生命周期管理:
|
|
25
|
+
* mount -> 创建 drivers + effects -> effects 订阅事件 -> drivers 监听 DOM -> 分发 EngineMountEvent
|
|
26
|
+
* unmount -> 分发 EngineUnmountEvent -> drivers 取消监听 -> effects 释放 -> 清空事件总线
|
|
27
|
+
*
|
|
28
|
+
* 引擎上的状态模型:
|
|
29
|
+
* - cursor: 光标状态与位置(由 CursorEffect 维护)
|
|
30
|
+
* - draggingCmpMetas: 正在拖拽的组件元信息(由 DraggingEffect 维护)
|
|
31
|
+
* - onlyPressedCtrl/onlyPressedShift: "仅仅按下 Ctrl/Shift"状态(由 KeyboardDriver 维护)
|
|
32
|
+
*/
|
|
33
|
+
declare class DesignerEngine {
|
|
34
|
+
/** 设计器事件总线 */
|
|
35
|
+
readonly eventbus: EventBus;
|
|
36
|
+
/** 初始化属性 */
|
|
37
|
+
readonly props: DesignerEngineProps;
|
|
38
|
+
/** 已创建的设计器业务事件生产者实例集合 */
|
|
39
|
+
protected readonly drivers: Array<DesignerDriver>;
|
|
40
|
+
/** 已创建的设计器业务事件消费者实例集合 */
|
|
41
|
+
protected readonly effects: Array<DesignerEffect>;
|
|
42
|
+
/** 当前光标状态 */
|
|
43
|
+
readonly cursor: Cursor;
|
|
44
|
+
/** 正在拖拽的组件的元信息 */
|
|
45
|
+
readonly draggingCmpMetas: DraggingCmpMetas;
|
|
46
|
+
/** 设计器插入组件的位置信息 */
|
|
47
|
+
readonly insertion: Insertion;
|
|
48
|
+
/** 所有的设计器页面状态数据(多页面设计器) | 页面路由路径(fullPath) -> DesignerState */
|
|
49
|
+
readonly allDesignerState: ShallowReactive<Record<string, DesignerState>>;
|
|
50
|
+
/** 当前活动的设计器页面路由路径(fullPath) */
|
|
51
|
+
protected readonly _activeDesignerPath: Ref<string | undefined>;
|
|
52
|
+
/** 当前仅仅按下 ctrl 键 */
|
|
53
|
+
protected readonly _onlyPressedCtrl: Ref<boolean>;
|
|
54
|
+
/** 当前仅仅按下 shift 键 */
|
|
55
|
+
protected readonly _onlyPressedShift: Ref<boolean>;
|
|
56
|
+
/** 当前引擎是否已挂载 */
|
|
57
|
+
protected mounted: boolean;
|
|
58
|
+
constructor(props?: Partial<DesignerEngineProps>);
|
|
59
|
+
/** 组件管理器 */
|
|
60
|
+
get componentManage(): ComponentManage;
|
|
61
|
+
/** 当前引擎是否已挂载 */
|
|
62
|
+
get isMounted(): boolean;
|
|
63
|
+
/** 当前活动的设计器页面路由路径(fullPath) */
|
|
64
|
+
get activeDesignerPath(): string | undefined;
|
|
65
|
+
set activeDesignerPath(value: string | undefined);
|
|
66
|
+
/** 当前活动的设计器页面状态 */
|
|
67
|
+
get activeDesignerState(): DesignerState | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* 新增 DesignerState 页面状态对象(如果存在直接返回已存在的)
|
|
70
|
+
* @param fullPath 设计器页面路由路径
|
|
71
|
+
*/
|
|
72
|
+
addDesignerState(fullPath: string): DesignerState;
|
|
73
|
+
/**
|
|
74
|
+
* 删除 DesignerState 页面状态对象
|
|
75
|
+
* @param fullPath 设计器页面路由路径
|
|
76
|
+
*/
|
|
77
|
+
delDesignerState(fullPath: string): DesignerState | undefined;
|
|
78
|
+
/** 当前仅仅按下 ctrl 键 */
|
|
79
|
+
get onlyPressedCtrl(): boolean;
|
|
80
|
+
set onlyPressedCtrl(value: boolean);
|
|
81
|
+
/** 当前仅仅按下 shift 键 */
|
|
82
|
+
get onlyPressedShift(): boolean;
|
|
83
|
+
set onlyPressedShift(value: boolean);
|
|
84
|
+
/**
|
|
85
|
+
* 挂载当前设计器(重复挂载会先卸载旧实例)
|
|
86
|
+
* @param container 监听原生事件的事件容器(默认: document)
|
|
87
|
+
* @param window 引擎关联的 window 对象, 考虑设计器画布运行在 iframe 中的场景(默认: 全局 window)
|
|
88
|
+
*/
|
|
89
|
+
mount(container?: EventContainer, window?: Window): void;
|
|
90
|
+
/** 卸载当前设计器(未挂载时调用无任何效果) */
|
|
91
|
+
unmount(): void;
|
|
92
|
+
}
|
|
93
|
+
export type { DesignerEngineProps, };
|
|
94
|
+
export { DesignerEngine, };
|
|
95
|
+
//# sourceMappingURL=DesignerEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignerEngine.d.ts","sourceRoot":"","sources":["../../src/core/DesignerEngine.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Property } from "csstype";
|
|
2
|
+
import { type ComponentManage } from "@ease-forge/runtime";
|
|
3
|
+
import type { EventContainer } from "../types/Designer";
|
|
4
|
+
import type { DesignerEngine } from "./DesignerEngine";
|
|
5
|
+
import type { EventBus } from "./EventBus";
|
|
6
|
+
/**
|
|
7
|
+
* 设计器模块基类(Driver 与 Effect 的公共父类)
|
|
8
|
+
* 提供模块上下文: 引擎、事件总线、组件管理器、事件容器、window 对象
|
|
9
|
+
*/
|
|
10
|
+
declare abstract class DesignerModule {
|
|
11
|
+
/** 设计器引擎 */
|
|
12
|
+
readonly designerEngine: DesignerEngine;
|
|
13
|
+
/** 设计器事件总线 */
|
|
14
|
+
readonly eventbus: EventBus;
|
|
15
|
+
/** 组件管理器 */
|
|
16
|
+
readonly componentManage: ComponentManage;
|
|
17
|
+
/** 当前模块监听事件的事件容器 */
|
|
18
|
+
readonly container: EventContainer;
|
|
19
|
+
/** 当前模块对应的 window 对象(考虑设计器运行在 iframe 中的场景) */
|
|
20
|
+
readonly window: Window;
|
|
21
|
+
constructor(designerEngine: DesignerEngine, container: EventContainer, window: Window);
|
|
22
|
+
/** 获取事件容器的光标样式 */
|
|
23
|
+
protected getContainerCursorStyle(): string;
|
|
24
|
+
/** 设置事件容器的光标样式(值可以是读取到的任意原始样式字符串) */
|
|
25
|
+
protected setContainerCursorStyle(cursorStyle: Property.Cursor | string): void;
|
|
26
|
+
}
|
|
27
|
+
export { DesignerModule, };
|
|
28
|
+
//# sourceMappingURL=DesignerModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignerModule.d.ts","sourceRoot":"","sources":["../../src/core/DesignerModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,uBAAe,cAAc;IACzB,YAAY;IACZ,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,cAAc;IACd,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,YAAY;IACZ,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,oBAAoB;IACpB,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM;IAQrF,kBAAkB;IAClB,SAAS,CAAC,uBAAuB,IAAI,MAAM;IAO3C,qCAAqC;IACrC,SAAS,CAAC,uBAAuB,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI;CAOjF;AAED,OAAO,EACH,cAAc,GACjB,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DesignerEvent, type DesignerEventConstructor } from "../events/DesignerEvent";
|
|
2
|
+
/** 事件订阅函数 */
|
|
3
|
+
type Subscriber<Event extends DesignerEvent = DesignerEvent> = (event: Event) => void;
|
|
4
|
+
/** 设计器事件总线: 事件路由使用事件类的静态 eventType 显式标识, 不依赖 constructor.name, 代码压缩混淆后依然稳定 */
|
|
5
|
+
declare class EventBus {
|
|
6
|
+
/** 事件订阅函数集合 | eventType -> 按优先级升序排列的订阅函数 */
|
|
7
|
+
private readonly subscribers;
|
|
8
|
+
/**
|
|
9
|
+
* 分发事件
|
|
10
|
+
* @param event 事件对象
|
|
11
|
+
*/
|
|
12
|
+
dispatch<Event extends DesignerEvent>(event: Event): void;
|
|
13
|
+
/**
|
|
14
|
+
* 订阅指定的事件
|
|
15
|
+
* @param eventClass 事件构造函数(事件类型)
|
|
16
|
+
* @param subscriber 事件订阅函数
|
|
17
|
+
* @param priority 优先级(越小越优先, 默认: 0)
|
|
18
|
+
* @return 返回取消订阅函数
|
|
19
|
+
*/
|
|
20
|
+
subscribe<Event extends DesignerEvent>(eventClass: DesignerEventConstructor<Event>, subscriber: Subscriber<Event>, priority?: number): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* 取消指定的订阅函数
|
|
23
|
+
* @param eventClass 事件构造函数(事件类型)
|
|
24
|
+
* @param subscriber 事件订阅函数
|
|
25
|
+
*/
|
|
26
|
+
unsubscribe<Event extends DesignerEvent>(eventClass: DesignerEventConstructor<Event>, subscriber: Subscriber<Event>): void;
|
|
27
|
+
/**
|
|
28
|
+
* 取消指定事件类型的所有订阅函数
|
|
29
|
+
* @param eventClass 事件构造函数(事件类型)
|
|
30
|
+
*/
|
|
31
|
+
unsubscribeAll(eventClass: DesignerEventConstructor): void;
|
|
32
|
+
/** 清除所有的订阅函数 */
|
|
33
|
+
clearAllSubscribe(): void;
|
|
34
|
+
}
|
|
35
|
+
export type { Subscriber, };
|
|
36
|
+
export { EventBus, };
|
|
37
|
+
//# sourceMappingURL=EventBus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventBus.d.ts","sourceRoot":"","sources":["../../src/core/EventBus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEvF,aAAa;AACb,KAAK,UAAU,CAAC,KAAK,SAAS,aAAa,GAAG,aAAa,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAUtF,8EAA8E;AAC9E,cAAM,QAAQ;IACV,4CAA4C;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqD;IAEjF;;;OAGG;IACH,QAAQ,CAAC,KAAK,SAAS,aAAa,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAezD;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,SAAS,aAAa,EACjC,UAAU,EAAE,wBAAwB,CAAC,KAAK,CAAC,EAC3C,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,EAC7B,QAAQ,GAAE,MAAU,GACrB,MAAM,IAAI;IAyBb;;;;OAIG;IACH,WAAW,CAAC,KAAK,SAAS,aAAa,EAAE,UAAU,EAAE,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI;IAO1H;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,wBAAwB,GAAG,IAAI;IAI1D,gBAAgB;IAChB,iBAAiB,IAAI,IAAI;CAG5B;AAED,YAAY,EACR,UAAU,GACb,CAAA;AAED,OAAO,EACH,QAAQ,GACX,CAAA"}
|