ice-entity-designer 0.0.39 → 0.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/README.md +69 -14
- package/dist/index.cjs +1 -6
- package/dist/index.mjs +1 -6
- package/dist/index.umd.js +1 -6
- package/dist/react.cjs +1 -6
- package/dist/react.mjs +1 -6
- package/dist/types/bpmn/BpmnSimulator.d.mts +3 -3
- package/dist/types/bpmn/BpmnSimulator.d.ts +3 -3
- package/dist/types/bpmn/bpmn_shapes.d.mts +1 -1
- package/dist/types/bpmn/bpmn_shapes.d.ts +1 -1
- package/dist/types/bpmn/bpmn_validate.d.mts +1 -1
- package/dist/types/bpmn/bpmn_validate.d.ts +1 -1
- package/dist/types/bpmn/bpmn_xml.d.mts +1 -1
- package/dist/types/bpmn/bpmn_xml.d.ts +1 -1
- package/dist/types/designer/EntityDesigner.d.mts +3 -3
- package/dist/types/designer/EntityDesigner.d.ts +3 -3
- package/dist/types/er-component/Entity.d.mts +2 -2
- package/dist/types/er-component/Entity.d.ts +2 -2
- package/dist/types/er-component/Relation.d.mts +1 -1
- package/dist/types/er-component/Relation.d.ts +1 -1
- package/dist/types/flow/FlowDesigner.d.mts +4 -4
- package/dist/types/flow/FlowDesigner.d.ts +4 -4
- package/dist/types/flow/FlowEdge.d.mts +2 -2
- package/dist/types/flow/FlowEdge.d.ts +2 -2
- package/dist/types/flow/FlowNode.d.mts +3 -3
- package/dist/types/flow/FlowNode.d.ts +3 -3
- package/dist/types/flow/flow_shapes.d.mts +1 -1
- package/dist/types/flow/flow_shapes.d.ts +1 -1
- package/dist/types/gantt/GanttDependency.d.mts +1 -1
- package/dist/types/gantt/GanttDependency.d.ts +1 -1
- package/dist/types/gantt/GanttDesigner.d.mts +2 -2
- package/dist/types/gantt/GanttDesigner.d.ts +2 -2
- package/dist/types/gantt/GanttRuler.d.mts +2 -2
- package/dist/types/gantt/GanttRuler.d.ts +2 -2
- package/dist/types/gantt/GanttTask.d.mts +1 -1
- package/dist/types/gantt/GanttTask.d.ts +1 -1
- package/dist/types/gantt/gantt_text.d.mts +1 -1
- package/dist/types/gantt/gantt_text.d.ts +1 -1
- package/dist/types/index.d.mts +4 -13
- package/dist/types/index.d.ts +4 -13
- package/dist/types/power/PowerDesigner.d.mts +2 -2
- package/dist/types/power/PowerDesigner.d.ts +2 -2
- package/dist/types/power/power_shapes.d.mts +4 -4
- package/dist/types/power/power_shapes.d.ts +4 -4
- package/dist/types/power/power_voltage.d.mts +1 -1
- package/dist/types/power/power_voltage.d.ts +1 -1
- package/dist/types/react/context.d.mts +2 -2
- package/dist/types/react/context.d.ts +2 -2
- package/dist/types/react/index.d.mts +0 -1
- package/dist/types/react/index.d.ts +0 -1
- package/dist/types/react/session.d.mts +4 -4
- package/dist/types/react/session.d.ts +4 -4
- package/dist/types/react/types.d.mts +7 -7
- package/dist/types/react/types.d.ts +7 -7
- package/dist/types/secondary/SecondaryDesigner.d.mts +1 -1
- package/dist/types/secondary/SecondaryDesigner.d.ts +1 -1
- package/dist/types/secondary/secondary_shapes.d.mts +2 -2
- package/dist/types/secondary/secondary_shapes.d.ts +2 -2
- package/dist/types/statechart/StateNode.d.mts +2 -2
- package/dist/types/statechart/StateNode.d.ts +2 -2
- package/dist/types/statechart/StateTransition.d.mts +1 -1
- package/dist/types/statechart/StateTransition.d.ts +1 -1
- package/dist/types/statechart/StatechartDesigner.d.mts +1 -1
- package/dist/types/statechart/StatechartDesigner.d.ts +1 -1
- package/dist/types/statechart/statechart_text.d.mts +1 -1
- package/dist/types/statechart/statechart_text.d.ts +1 -1
- package/dist/types/uml/UmlClass.d.mts +2 -2
- package/dist/types/uml/UmlClass.d.ts +2 -2
- package/dist/types/uml/UmlDesigner.d.mts +1 -1
- package/dist/types/uml/UmlDesigner.d.ts +1 -1
- package/dist/types/uml/UmlRelation.d.mts +4 -4
- package/dist/types/uml/UmlRelation.d.ts +4 -4
- package/dist/types/uml/uml_text.d.mts +1 -1
- package/dist/types/uml/uml_text.d.ts +1 -1
- package/dist/types/utils/project_codec.d.mts +2 -2
- package/dist/types/utils/project_codec.d.ts +2 -2
- package/dist/types/utils/project_schema.d.mts +1 -1
- package/dist/types/utils/project_schema.d.ts +1 -1
- package/dist/types/utils/schema_validator.d.mts +1 -1
- package/dist/types/utils/schema_validator.d.ts +1 -1
- package/package.json +24 -20
- package/dist/types/gl-matrix.d.mts +0 -3273
- package/dist/types/gl-matrix.d.ts +0 -3273
- package/dist/types/ice-render/FrameManager.d.mts +0 -26
- package/dist/types/ice-render/FrameManager.d.ts +0 -26
- package/dist/types/ice-render/ICE.d.mts +0 -424
- package/dist/types/ice-render/ICE.d.ts +0 -424
- package/dist/types/ice-render/a11y/accessibility.d.mts +0 -46
- package/dist/types/ice-render/a11y/accessibility.d.ts +0 -46
- package/dist/types/ice-render/animation/AnimationManager.d.mts +0 -96
- package/dist/types/ice-render/animation/AnimationManager.d.ts +0 -96
- package/dist/types/ice-render/animation/Easing.d.mts +0 -33
- package/dist/types/ice-render/animation/Easing.d.ts +0 -33
- package/dist/types/ice-render/consts/BIG_ZINDEX_NUMBER.d.mts +0 -14
- package/dist/types/ice-render/consts/BIG_ZINDEX_NUMBER.d.ts +0 -14
- package/dist/types/ice-render/consts/COMPONENT_TYPE_MAPPING.d.mts +0 -45
- package/dist/types/ice-render/consts/COMPONENT_TYPE_MAPPING.d.ts +0 -45
- package/dist/types/ice-render/consts/DOM_EVENT_MAPPING_CONSTS.d.mts +0 -37
- package/dist/types/ice-render/consts/DOM_EVENT_MAPPING_CONSTS.d.ts +0 -37
- package/dist/types/ice-render/consts/ICE_EVENT_NAME_CONSTS.d.mts +0 -27
- package/dist/types/ice-render/consts/ICE_EVENT_NAME_CONSTS.d.ts +0 -27
- package/dist/types/ice-render/control-panel/AlignmentGuideManager.d.mts +0 -92
- package/dist/types/ice-render/control-panel/AlignmentGuideManager.d.ts +0 -92
- package/dist/types/ice-render/control-panel/ICEControlPanel.d.mts +0 -37
- package/dist/types/ice-render/control-panel/ICEControlPanel.d.ts +0 -37
- package/dist/types/ice-render/control-panel/ICEControlPanelManager.d.mts +0 -25
- package/dist/types/ice-render/control-panel/ICEControlPanelManager.d.ts +0 -25
- package/dist/types/ice-render/control-panel/link-controls/LineControlPanel.d.mts +0 -39
- package/dist/types/ice-render/control-panel/link-controls/LineControlPanel.d.ts +0 -39
- package/dist/types/ice-render/control-panel/transform-controls/ResizeControl.d.mts +0 -38
- package/dist/types/ice-render/control-panel/transform-controls/ResizeControl.d.ts +0 -38
- package/dist/types/ice-render/control-panel/transform-controls/RotateControl.d.mts +0 -12
- package/dist/types/ice-render/control-panel/transform-controls/RotateControl.d.ts +0 -12
- package/dist/types/ice-render/control-panel/transform-controls/TransformControlPanel.d.mts +0 -83
- package/dist/types/ice-render/control-panel/transform-controls/TransformControlPanel.d.ts +0 -83
- package/dist/types/ice-render/control-panel/transform-controls/constraints.d.mts +0 -24
- package/dist/types/ice-render/control-panel/transform-controls/constraints.d.ts +0 -24
- package/dist/types/ice-render/cross-platform/Path2DRecorder.d.mts +0 -76
- package/dist/types/ice-render/cross-platform/Path2DRecorder.d.ts +0 -76
- package/dist/types/ice-render/cross-platform/PolyfillPath2D.d.mts +0 -21
- package/dist/types/ice-render/cross-platform/PolyfillPath2D.d.ts +0 -21
- package/dist/types/ice-render/cross-platform/root.d.mts +0 -7
- package/dist/types/ice-render/cross-platform/root.d.ts +0 -7
- package/dist/types/ice-render/event/DOMEventDispatcher.d.mts +0 -75
- package/dist/types/ice-render/event/DOMEventDispatcher.d.ts +0 -75
- package/dist/types/ice-render/event/DOMEventInterceptor.d.mts +0 -36
- package/dist/types/ice-render/event/DOMEventInterceptor.d.ts +0 -36
- package/dist/types/ice-render/event/EventBus.d.mts +0 -27
- package/dist/types/ice-render/event/EventBus.d.ts +0 -27
- package/dist/types/ice-render/event/ICEEvent.d.mts +0 -46
- package/dist/types/ice-render/event/ICEEvent.d.ts +0 -46
- package/dist/types/ice-render/event/ICEEventTarget.d.mts +0 -106
- package/dist/types/ice-render/event/ICEEventTarget.d.ts +0 -106
- package/dist/types/ice-render/event/input-normalize.d.mts +0 -75
- package/dist/types/ice-render/event/input-normalize.d.ts +0 -75
- package/dist/types/ice-render/export/SvgExporter.d.mts +0 -54
- package/dist/types/ice-render/export/SvgExporter.d.ts +0 -54
- package/dist/types/ice-render/geometry/GeoLine.d.mts +0 -24
- package/dist/types/ice-render/geometry/GeoLine.d.ts +0 -24
- package/dist/types/ice-render/geometry/GeoPoint.d.mts +0 -53
- package/dist/types/ice-render/geometry/GeoPoint.d.ts +0 -53
- package/dist/types/ice-render/geometry/GeoUtil.d.mts +0 -73
- package/dist/types/ice-render/geometry/GeoUtil.d.ts +0 -73
- package/dist/types/ice-render/geometry/ICEBoundingBox.d.mts +0 -81
- package/dist/types/ice-render/geometry/ICEBoundingBox.d.ts +0 -81
- package/dist/types/ice-render/graphic/ICEComponent.d.mts +0 -535
- package/dist/types/ice-render/graphic/ICEComponent.d.ts +0 -535
- package/dist/types/ice-render/graphic/ICEDotPath.d.mts +0 -99
- package/dist/types/ice-render/graphic/ICEDotPath.d.ts +0 -99
- package/dist/types/ice-render/graphic/ICEImage.d.mts +0 -17
- package/dist/types/ice-render/graphic/ICEImage.d.ts +0 -17
- package/dist/types/ice-render/graphic/ICEPath.d.mts +0 -46
- package/dist/types/ice-render/graphic/ICEPath.d.ts +0 -46
- package/dist/types/ice-render/graphic/container/ICEGroup.d.mts +0 -111
- package/dist/types/ice-render/graphic/container/ICEGroup.d.ts +0 -111
- package/dist/types/ice-render/graphic/link/ICEBezier.d.mts +0 -23
- package/dist/types/ice-render/graphic/link/ICEBezier.d.ts +0 -23
- package/dist/types/ice-render/graphic/link/ICELinkHook.d.mts +0 -52
- package/dist/types/ice-render/graphic/link/ICELinkHook.d.ts +0 -52
- package/dist/types/ice-render/graphic/link/ICELinkSlot.d.mts +0 -54
- package/dist/types/ice-render/graphic/link/ICELinkSlot.d.ts +0 -54
- package/dist/types/ice-render/graphic/link/ICELinkSlotManager.d.mts +0 -28
- package/dist/types/ice-render/graphic/link/ICELinkSlotManager.d.ts +0 -28
- package/dist/types/ice-render/graphic/link/ICEPolyLine.d.mts +0 -316
- package/dist/types/ice-render/graphic/link/ICEPolyLine.d.ts +0 -316
- package/dist/types/ice-render/graphic/link/ICEVisioLink.d.mts +0 -163
- package/dist/types/ice-render/graphic/link/ICEVisioLink.d.ts +0 -163
- package/dist/types/ice-render/graphic/shape/ICECircle.d.mts +0 -19
- package/dist/types/ice-render/graphic/shape/ICECircle.d.ts +0 -19
- package/dist/types/ice-render/graphic/shape/ICEEllipse.d.mts +0 -29
- package/dist/types/ice-render/graphic/shape/ICEEllipse.d.ts +0 -29
- package/dist/types/ice-render/graphic/shape/ICEIsogon.d.mts +0 -52
- package/dist/types/ice-render/graphic/shape/ICEIsogon.d.ts +0 -52
- package/dist/types/ice-render/graphic/shape/ICERect.d.mts +0 -10
- package/dist/types/ice-render/graphic/shape/ICERect.d.ts +0 -10
- package/dist/types/ice-render/graphic/shape/ICERose.d.mts +0 -41
- package/dist/types/ice-render/graphic/shape/ICERose.d.ts +0 -41
- package/dist/types/ice-render/graphic/shape/ICEStar.d.mts +0 -45
- package/dist/types/ice-render/graphic/shape/ICEStar.d.ts +0 -45
- package/dist/types/ice-render/graphic/text/ICEText.d.mts +0 -158
- package/dist/types/ice-render/graphic/text/ICEText.d.ts +0 -158
- package/dist/types/ice-render/index.d.mts +0 -59
- package/dist/types/ice-render/index.d.ts +0 -59
- package/dist/types/ice-render/layout/ICEBorderLayout.d.mts +0 -34
- package/dist/types/ice-render/layout/ICEBorderLayout.d.ts +0 -34
- package/dist/types/ice-render/layout/ICEBoxLayout.d.mts +0 -30
- package/dist/types/ice-render/layout/ICEBoxLayout.d.ts +0 -30
- package/dist/types/ice-render/layout/ICECardLayout.d.mts +0 -36
- package/dist/types/ice-render/layout/ICECardLayout.d.ts +0 -36
- package/dist/types/ice-render/layout/ICEFlowLayout.d.mts +0 -31
- package/dist/types/ice-render/layout/ICEFlowLayout.d.ts +0 -31
- package/dist/types/ice-render/layout/ICEGridLayout.d.mts +0 -33
- package/dist/types/ice-render/layout/ICEGridLayout.d.ts +0 -33
- package/dist/types/ice-render/layout/ICELayeredLayout.d.mts +0 -49
- package/dist/types/ice-render/layout/ICELayeredLayout.d.ts +0 -49
- package/dist/types/ice-render/layout/ICELayoutManager.d.mts +0 -33
- package/dist/types/ice-render/layout/ICELayoutManager.d.ts +0 -33
- package/dist/types/ice-render/layout/ICEOverlayLayout.d.mts +0 -25
- package/dist/types/ice-render/layout/ICEOverlayLayout.d.ts +0 -25
- package/dist/types/ice-render/persistence/Deserializer.d.mts +0 -43
- package/dist/types/ice-render/persistence/Deserializer.d.ts +0 -43
- package/dist/types/ice-render/persistence/Serializer.d.mts +0 -35
- package/dist/types/ice-render/persistence/Serializer.d.ts +0 -35
- package/dist/types/ice-render/plugin/PluginHost.d.mts +0 -86
- package/dist/types/ice-render/plugin/PluginHost.d.ts +0 -86
- package/dist/types/ice-render/renderer/CanvasRenderer.d.mts +0 -150
- package/dist/types/ice-render/renderer/CanvasRenderer.d.ts +0 -150
- package/dist/types/ice-render/renderer/ObjectCache.d.mts +0 -79
- package/dist/types/ice-render/renderer/ObjectCache.d.ts +0 -79
- package/dist/types/ice-render/renderer/dirty-rect-util.d.mts +0 -86
- package/dist/types/ice-render/renderer/dirty-rect-util.d.ts +0 -86
- package/dist/types/ice-render/theme/ICETheme.d.mts +0 -382
- package/dist/types/ice-render/theme/ICETheme.d.ts +0 -382
- package/dist/types/ice-render/util/ImageCache.d.mts +0 -19
- package/dist/types/ice-render/util/ImageCache.d.ts +0 -19
- package/dist/types/ice-render/util/data-util.d.mts +0 -43
- package/dist/types/ice-render/util/data-util.d.ts +0 -43
- package/dist/types/ice-render/util/gl-matrix-skew.d.mts +0 -14
- package/dist/types/ice-render/util/gl-matrix-skew.d.ts +0 -14
- package/dist/types/ice-render/util/lang.d.mts +0 -28
- package/dist/types/ice-render/util/lang.d.ts +0 -28
- package/dist/types/ice-render/util/uuid.d.mts +0 -1
- package/dist/types/ice-render/util/uuid.d.ts +0 -1
|
@@ -4,7 +4,7 @@ import type { EntityDesigner, FlowDesigner } from '../index.mjs';
|
|
|
4
4
|
* 由 <EntityDesignerCanvas>(或 <EntityDesignerProvider>)提供,供子树内的 useEntityDesigner() 读取。
|
|
5
5
|
*/
|
|
6
6
|
export declare const EntityDesignerContext: import("react").Context<EntityDesigner>;
|
|
7
|
-
export
|
|
7
|
+
export type EntityDesignerProviderProps = {
|
|
8
8
|
/** 要共享的 EntityDesigner 实例(通常来自 createDesignerSession) */
|
|
9
9
|
designer: EntityDesigner | null;
|
|
10
10
|
children?: any;
|
|
@@ -28,7 +28,7 @@ export declare function useEntityDesigner(): EntityDesigner | null;
|
|
|
28
28
|
* 由 <FlowDesignerCanvas>(或 <FlowDesignerProvider>)提供,供子树内的 useFlowDesigner() 读取。
|
|
29
29
|
*/
|
|
30
30
|
export declare const FlowDesignerContext: import("react").Context<FlowDesigner>;
|
|
31
|
-
export
|
|
31
|
+
export type FlowDesignerProviderProps = {
|
|
32
32
|
/** 要共享的 FlowDesigner 实例(通常来自 createFlowSession) */
|
|
33
33
|
designer: FlowDesigner | null;
|
|
34
34
|
children?: any;
|
|
@@ -4,7 +4,7 @@ import type { EntityDesigner, FlowDesigner } from '../index';
|
|
|
4
4
|
* 由 <EntityDesignerCanvas>(或 <EntityDesignerProvider>)提供,供子树内的 useEntityDesigner() 读取。
|
|
5
5
|
*/
|
|
6
6
|
export declare const EntityDesignerContext: import("react").Context<EntityDesigner>;
|
|
7
|
-
export
|
|
7
|
+
export type EntityDesignerProviderProps = {
|
|
8
8
|
/** 要共享的 EntityDesigner 实例(通常来自 createDesignerSession) */
|
|
9
9
|
designer: EntityDesigner | null;
|
|
10
10
|
children?: any;
|
|
@@ -28,7 +28,7 @@ export declare function useEntityDesigner(): EntityDesigner | null;
|
|
|
28
28
|
* 由 <FlowDesignerCanvas>(或 <FlowDesignerProvider>)提供,供子树内的 useFlowDesigner() 读取。
|
|
29
29
|
*/
|
|
30
30
|
export declare const FlowDesignerContext: import("react").Context<FlowDesigner>;
|
|
31
|
-
export
|
|
31
|
+
export type FlowDesignerProviderProps = {
|
|
32
32
|
/** 要共享的 FlowDesigner 实例(通常来自 createFlowSession) */
|
|
33
33
|
designer: FlowDesigner | null;
|
|
34
34
|
children?: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntityDesigner, FlowDesigner } from '../index.mjs';
|
|
2
|
-
export
|
|
2
|
+
export type DesignerSessionOptions = {
|
|
3
3
|
/** 渲染模式,默认 dirty-rect */
|
|
4
4
|
renderMode?: 'dirty-rect' | 'full';
|
|
5
5
|
/** 初始项目快照,等价于 loadProject(initialProject) */
|
|
@@ -7,7 +7,7 @@ export declare type DesignerSessionOptions = {
|
|
|
7
7
|
/** 模型变更回调 */
|
|
8
8
|
onChange?: (snapshot: string) => void;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type DesignerSession = {
|
|
11
11
|
ice: any;
|
|
12
12
|
designer: EntityDesigner;
|
|
13
13
|
/** 销毁会话:退订 + dispose designer + destroy ICE(可重复调用) */
|
|
@@ -28,7 +28,7 @@ export declare function createDesignerSession(canvas: any, options?: DesignerSes
|
|
|
28
28
|
* 此时 lastApplied 已经等于该值,因此这里返回 false,避免「onChange → setState → 再 loadProject」的回环。
|
|
29
29
|
*/
|
|
30
30
|
export declare function shouldApplyControlledValue(value: string | undefined, lastApplied: string | null | undefined): boolean;
|
|
31
|
-
export
|
|
31
|
+
export type FlowSessionOptions = {
|
|
32
32
|
/** 渲染模式,默认 dirty-rect */
|
|
33
33
|
renderMode?: 'dirty-rect' | 'full';
|
|
34
34
|
/** 初始流程图快照,等价于 load(initialFlow) */
|
|
@@ -36,7 +36,7 @@ export declare type FlowSessionOptions = {
|
|
|
36
36
|
/** 流程变更回调(含画布拖动节点) */
|
|
37
37
|
onChange?: (snapshot: string) => void;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type FlowSession = {
|
|
40
40
|
ice: any;
|
|
41
41
|
designer: FlowDesigner;
|
|
42
42
|
/** 销毁会话:退订 + dispose designer + destroy ICE(可重复调用) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntityDesigner, FlowDesigner } from '../index';
|
|
2
|
-
export
|
|
2
|
+
export type DesignerSessionOptions = {
|
|
3
3
|
/** 渲染模式,默认 dirty-rect */
|
|
4
4
|
renderMode?: 'dirty-rect' | 'full';
|
|
5
5
|
/** 初始项目快照,等价于 loadProject(initialProject) */
|
|
@@ -7,7 +7,7 @@ export declare type DesignerSessionOptions = {
|
|
|
7
7
|
/** 模型变更回调 */
|
|
8
8
|
onChange?: (snapshot: string) => void;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type DesignerSession = {
|
|
11
11
|
ice: any;
|
|
12
12
|
designer: EntityDesigner;
|
|
13
13
|
/** 销毁会话:退订 + dispose designer + destroy ICE(可重复调用) */
|
|
@@ -28,7 +28,7 @@ export declare function createDesignerSession(canvas: any, options?: DesignerSes
|
|
|
28
28
|
* 此时 lastApplied 已经等于该值,因此这里返回 false,避免「onChange → setState → 再 loadProject」的回环。
|
|
29
29
|
*/
|
|
30
30
|
export declare function shouldApplyControlledValue(value: string | undefined, lastApplied: string | null | undefined): boolean;
|
|
31
|
-
export
|
|
31
|
+
export type FlowSessionOptions = {
|
|
32
32
|
/** 渲染模式,默认 dirty-rect */
|
|
33
33
|
renderMode?: 'dirty-rect' | 'full';
|
|
34
34
|
/** 初始流程图快照,等价于 load(initialFlow) */
|
|
@@ -36,7 +36,7 @@ export declare type FlowSessionOptions = {
|
|
|
36
36
|
/** 流程变更回调(含画布拖动节点) */
|
|
37
37
|
onChange?: (snapshot: string) => void;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type FlowSession = {
|
|
40
40
|
ice: any;
|
|
41
41
|
designer: FlowDesigner;
|
|
42
42
|
/** 销毁会话:退订 + dispose designer + destroy ICE(可重复调用) */
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* React 绑定层的类型定义。
|
|
3
3
|
*/
|
|
4
4
|
import type { EntityDesigner, FlowDesigner, FlowLoadReport, FlowNodeKind, ProjectLoadReport } from '../index.mjs';
|
|
5
|
-
export
|
|
5
|
+
export type EntityDesignerChangePayload = {
|
|
6
6
|
/** 项目快照,等价于 designer.serializeProject() 的结果 */
|
|
7
7
|
snapshot: string;
|
|
8
8
|
/** 当前 TypeORM Schema(toSchemaObject 的结果) */
|
|
9
9
|
schema: object;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type EntityDesignerErrorPayload = {
|
|
12
12
|
/** 出错阶段:挂载时载入初始快照 / 受控模式同步外部 value */
|
|
13
13
|
phase: 'load-initial' | 'load-controlled';
|
|
14
14
|
/** 触发失败的快照(value 或 defaultValue) */
|
|
@@ -16,7 +16,7 @@ export declare type EntityDesignerErrorPayload = {
|
|
|
16
16
|
/** 原始错误(loadProject 对非法 / 版本不兼容的快照会抛错) */
|
|
17
17
|
error: Error;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type EntityDesignerHandle = {
|
|
20
20
|
/** 底层 ICE 实例(卸载后为 null) */
|
|
21
21
|
ice: any;
|
|
22
22
|
/** 底层 EntityDesigner 实例(卸载后为 null) */
|
|
@@ -34,7 +34,7 @@ export declare type EntityDesignerHandle = {
|
|
|
34
34
|
validate(): any[];
|
|
35
35
|
serializeProject(): string;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type EntityDesignerCanvasProps = {
|
|
38
38
|
/**
|
|
39
39
|
* 受控模式:项目快照。变化时会同步进画布(内部变更通过 onChange 上报,带循环保护)。
|
|
40
40
|
* 与 defaultValue 互斥,value 优先。
|
|
@@ -62,7 +62,7 @@ export declare type EntityDesignerCanvasProps = {
|
|
|
62
62
|
/** 子节点渲染在上下文内部,可直接使用 useEntityDesigner() */
|
|
63
63
|
children?: any;
|
|
64
64
|
};
|
|
65
|
-
export
|
|
65
|
+
export type FlowDesignerChangePayload = {
|
|
66
66
|
/** 流程图快照,等价于 designer.serialize() 的结果 */
|
|
67
67
|
snapshot: string;
|
|
68
68
|
/** 当前节点 / 连线条数,便于直接渲染统计信息 */
|
|
@@ -71,7 +71,7 @@ export declare type FlowDesignerChangePayload = {
|
|
|
71
71
|
edges: number;
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type FlowDesignerHandle = {
|
|
75
75
|
/** 底层 ICE 实例(卸载后为 null) */
|
|
76
76
|
ice: any;
|
|
77
77
|
/** 底层 FlowDesigner 实例(卸载后为 null) */
|
|
@@ -88,7 +88,7 @@ export declare type FlowDesignerHandle = {
|
|
|
88
88
|
toSnapshot(): any;
|
|
89
89
|
fitViewport(padding?: number): void;
|
|
90
90
|
};
|
|
91
|
-
export
|
|
91
|
+
export type FlowDesignerCanvasProps = {
|
|
92
92
|
/**
|
|
93
93
|
* 受控模式:流程图快照。变化时会同步进画布(内部变更通过 onChange 上报,带循环保护)。
|
|
94
94
|
* 与 defaultValue 互斥,value 优先。
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* React 绑定层的类型定义。
|
|
3
3
|
*/
|
|
4
4
|
import type { EntityDesigner, FlowDesigner, FlowLoadReport, FlowNodeKind, ProjectLoadReport } from '../index';
|
|
5
|
-
export
|
|
5
|
+
export type EntityDesignerChangePayload = {
|
|
6
6
|
/** 项目快照,等价于 designer.serializeProject() 的结果 */
|
|
7
7
|
snapshot: string;
|
|
8
8
|
/** 当前 TypeORM Schema(toSchemaObject 的结果) */
|
|
9
9
|
schema: object;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type EntityDesignerErrorPayload = {
|
|
12
12
|
/** 出错阶段:挂载时载入初始快照 / 受控模式同步外部 value */
|
|
13
13
|
phase: 'load-initial' | 'load-controlled';
|
|
14
14
|
/** 触发失败的快照(value 或 defaultValue) */
|
|
@@ -16,7 +16,7 @@ export declare type EntityDesignerErrorPayload = {
|
|
|
16
16
|
/** 原始错误(loadProject 对非法 / 版本不兼容的快照会抛错) */
|
|
17
17
|
error: Error;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type EntityDesignerHandle = {
|
|
20
20
|
/** 底层 ICE 实例(卸载后为 null) */
|
|
21
21
|
ice: any;
|
|
22
22
|
/** 底层 EntityDesigner 实例(卸载后为 null) */
|
|
@@ -34,7 +34,7 @@ export declare type EntityDesignerHandle = {
|
|
|
34
34
|
validate(): any[];
|
|
35
35
|
serializeProject(): string;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type EntityDesignerCanvasProps = {
|
|
38
38
|
/**
|
|
39
39
|
* 受控模式:项目快照。变化时会同步进画布(内部变更通过 onChange 上报,带循环保护)。
|
|
40
40
|
* 与 defaultValue 互斥,value 优先。
|
|
@@ -62,7 +62,7 @@ export declare type EntityDesignerCanvasProps = {
|
|
|
62
62
|
/** 子节点渲染在上下文内部,可直接使用 useEntityDesigner() */
|
|
63
63
|
children?: any;
|
|
64
64
|
};
|
|
65
|
-
export
|
|
65
|
+
export type FlowDesignerChangePayload = {
|
|
66
66
|
/** 流程图快照,等价于 designer.serialize() 的结果 */
|
|
67
67
|
snapshot: string;
|
|
68
68
|
/** 当前节点 / 连线条数,便于直接渲染统计信息 */
|
|
@@ -71,7 +71,7 @@ export declare type FlowDesignerChangePayload = {
|
|
|
71
71
|
edges: number;
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type FlowDesignerHandle = {
|
|
75
75
|
/** 底层 ICE 实例(卸载后为 null) */
|
|
76
76
|
ice: any;
|
|
77
77
|
/** 底层 FlowDesigner 实例(卸载后为 null) */
|
|
@@ -88,7 +88,7 @@ export declare type FlowDesignerHandle = {
|
|
|
88
88
|
toSnapshot(): any;
|
|
89
89
|
fitViewport(padding?: number): void;
|
|
90
90
|
};
|
|
91
|
-
export
|
|
91
|
+
export type FlowDesignerCanvasProps = {
|
|
92
92
|
/**
|
|
93
93
|
* 受控模式:流程图快照。变化时会同步进画布(内部变更通过 onChange 上报,带循环保护)。
|
|
94
94
|
* 与 defaultValue 互斥,value 优先。
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import FlowDesigner from '../flow/FlowDesigner.mjs';
|
|
18
18
|
import FlowEdge from '../flow/FlowEdge.mjs';
|
|
19
19
|
import type { SecondarySymbolKind } from './secondary_shapes.mjs';
|
|
20
|
-
export
|
|
20
|
+
export type SecondaryIssue = {
|
|
21
21
|
level: 'error' | 'warning';
|
|
22
22
|
message: string;
|
|
23
23
|
id?: string;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import FlowDesigner from '../flow/FlowDesigner';
|
|
18
18
|
import FlowEdge from '../flow/FlowEdge';
|
|
19
19
|
import type { SecondarySymbolKind } from './secondary_shapes';
|
|
20
|
-
export
|
|
20
|
+
export type SecondaryIssue = {
|
|
21
21
|
level: 'error' | 'warning';
|
|
22
22
|
message: string;
|
|
23
23
|
id?: string;
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* 49 过流继电器、33 位置开关、63 压力…),与一次侧的 QF/QS 体系分开;
|
|
15
15
|
* - 回路编号(A411/B411/C411/N411)、端子号(201…)、电缆编号(1D1…)是数据字段,画成标注。
|
|
16
16
|
*/
|
|
17
|
-
import { ICEGroup } from '
|
|
17
|
+
import { ICEGroup } from 'ice-render';
|
|
18
18
|
export declare const SECONDARY_SYMBOL_KINDS: readonly ["contactNO", "contactNC", "pushButton", "switchRemoteLocal", "linkPlate", "indicatorLamp", "relayDevice", "ctWinding", "terminal", "earth"];
|
|
19
|
-
export
|
|
19
|
+
export type SecondarySymbolKind = (typeof SECONDARY_SYMBOL_KINDS)[number];
|
|
20
20
|
/** 二次侧文字符号(IEEE C37.2 功能编号),与一次侧的 QF/QS 体系分开 */
|
|
21
21
|
export declare const SECONDARY_SYMBOL_PRESETS: Record<SecondarySymbolKind, {
|
|
22
22
|
label: string;
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* 49 过流继电器、33 位置开关、63 压力…),与一次侧的 QF/QS 体系分开;
|
|
15
15
|
* - 回路编号(A411/B411/C411/N411)、端子号(201…)、电缆编号(1D1…)是数据字段,画成标注。
|
|
16
16
|
*/
|
|
17
|
-
import { ICEGroup } from '
|
|
17
|
+
import { ICEGroup } from 'ice-render';
|
|
18
18
|
export declare const SECONDARY_SYMBOL_KINDS: readonly ["contactNO", "contactNC", "pushButton", "switchRemoteLocal", "linkPlate", "indicatorLamp", "relayDevice", "ctWinding", "terminal", "earth"];
|
|
19
|
-
export
|
|
19
|
+
export type SecondarySymbolKind = (typeof SECONDARY_SYMBOL_KINDS)[number];
|
|
20
20
|
/** 二次侧文字符号(IEEE C37.2 功能编号),与一次侧的 QF/QS 体系分开 */
|
|
21
21
|
export declare const SECONDARY_SYMBOL_PRESETS: Record<SecondarySymbolKind, {
|
|
22
22
|
label: string;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ICEGroup, ICEText } from '
|
|
8
|
+
import { ICEGroup, ICEText } from 'ice-render';
|
|
9
9
|
export declare const STATECHART_NODE_KINDS: readonly ["initial", "final", "state", "composite"];
|
|
10
|
-
export
|
|
10
|
+
export type StatechartNodeKind = (typeof STATECHART_NODE_KINDS)[number];
|
|
11
11
|
/**
|
|
12
12
|
* @class StateNode 状态机的节点(伪状态 / 状态 / 复合状态)
|
|
13
13
|
*
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ICEGroup, ICEText } from '
|
|
8
|
+
import { ICEGroup, ICEText } from 'ice-render';
|
|
9
9
|
export declare const STATECHART_NODE_KINDS: readonly ["initial", "final", "state", "composite"];
|
|
10
|
-
export
|
|
10
|
+
export type StatechartNodeKind = (typeof STATECHART_NODE_KINDS)[number];
|
|
11
11
|
/**
|
|
12
12
|
* @class StateNode 状态机的节点(伪状态 / 状态 / 复合状态)
|
|
13
13
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ICEGroup, ICEPolyLine, ICERect, ICEText } from '
|
|
9
|
-
export
|
|
8
|
+
import { ICEGroup, ICEPolyLine, ICERect, ICEText } from 'ice-render';
|
|
9
|
+
export type UmlClassKind = 'class' | 'interface' | 'enum';
|
|
10
10
|
/**
|
|
11
11
|
* @class UmlClass UML 类图的类框(三段式:类名 / 属性 / 方法)
|
|
12
12
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ICEGroup, ICEPolyLine, ICERect, ICEText } from '
|
|
9
|
-
export
|
|
8
|
+
import { ICEGroup, ICEPolyLine, ICERect, ICEText } from 'ice-render';
|
|
9
|
+
export type UmlClassKind = 'class' | 'interface' | 'enum';
|
|
10
10
|
/**
|
|
11
11
|
* @class UmlClass UML 类图的类框(三段式:类名 / 属性 / 方法)
|
|
12
12
|
*
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ICEPolyLine } from '
|
|
8
|
+
import { ICEPolyLine } from 'ice-render';
|
|
9
9
|
/** UML 类图里的六种关系(记法见下方 STYLE_BY_KIND) */
|
|
10
10
|
export declare const UML_RELATION_KINDS: readonly ["inheritance", "realization", "association", "aggregation", "composition", "dependency"];
|
|
11
|
-
export
|
|
11
|
+
export type UmlRelationKind = (typeof UML_RELATION_KINDS)[number];
|
|
12
12
|
/** 端点标记种类 */
|
|
13
|
-
export
|
|
14
|
-
|
|
13
|
+
export type UmlMarker = 'none' | 'triangle' | 'diamond' | 'open';
|
|
14
|
+
type UmlRelationStyle = {
|
|
15
15
|
marker: UmlMarker;
|
|
16
16
|
/** 标记画在哪一端:整体(owner)一侧 / 目标(被继承、被依赖)一侧 */
|
|
17
17
|
markerEnd: 'start' | 'end';
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ICEPolyLine } from '
|
|
8
|
+
import { ICEPolyLine } from 'ice-render';
|
|
9
9
|
/** UML 类图里的六种关系(记法见下方 STYLE_BY_KIND) */
|
|
10
10
|
export declare const UML_RELATION_KINDS: readonly ["inheritance", "realization", "association", "aggregation", "composition", "dependency"];
|
|
11
|
-
export
|
|
11
|
+
export type UmlRelationKind = (typeof UML_RELATION_KINDS)[number];
|
|
12
12
|
/** 端点标记种类 */
|
|
13
|
-
export
|
|
14
|
-
|
|
13
|
+
export type UmlMarker = 'none' | 'triangle' | 'diamond' | 'open';
|
|
14
|
+
type UmlRelationStyle = {
|
|
15
15
|
marker: UmlMarker;
|
|
16
16
|
/** 标记画在哪一端:整体(owner)一侧 / 目标(被继承、被依赖)一侧 */
|
|
17
17
|
markerEnd: 'start' | 'end';
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* 应用层因为要输出**扁平的领域文档**(AI/DSL/工具链消费),才需要这份显式契约,
|
|
13
13
|
* 但实现方式与引擎保持同构:类型分派走 typeId、可选值缺省即合法、未知类型跳过。
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type CodecFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'any';
|
|
16
|
+
export type CodecField = {
|
|
17
17
|
key: string;
|
|
18
18
|
/** 出现时校验的类型;缺省表示 any(透传) */
|
|
19
19
|
type?: CodecFieldType;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* 应用层因为要输出**扁平的领域文档**(AI/DSL/工具链消费),才需要这份显式契约,
|
|
13
13
|
* 但实现方式与引擎保持同构:类型分派走 typeId、可选值缺省即合法、未知类型跳过。
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type CodecFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'any';
|
|
16
|
+
export type CodecField = {
|
|
17
17
|
key: string;
|
|
18
18
|
/** 出现时校验的类型;缺省表示 any(透传) */
|
|
19
19
|
type?: CodecFieldType;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "大漠穷秋",
|
|
3
3
|
"name": "ice-entity-designer",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"description": "An entity designer based on ice-render.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"start": "rollup -c -w --environment NODE_ENV:development",
|
|
44
44
|
"build": "npm run clean && npm run build:types && npm run build:js",
|
|
45
45
|
"build:js": "rollup -c --environment NODE_ENV:production",
|
|
46
|
-
"build:types": "tsc --emitDeclarationOnly && node scripts/
|
|
46
|
+
"build:types": "tsc --emitDeclarationOnly && node scripts/emit-dmts.cjs",
|
|
47
47
|
"clean": "rimraf dist",
|
|
48
48
|
"prepare": "husky install",
|
|
49
49
|
"test": "jest --runInBand",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"types:watch": "npm run types:check -- --watch"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
+
"ice-render": "^1.4.11",
|
|
62
63
|
"react": "^18 || ^19",
|
|
63
64
|
"react-dom": "^18 || ^19"
|
|
64
65
|
},
|
|
@@ -72,23 +73,27 @@
|
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@arethetypeswrong/cli": "0.18.5",
|
|
75
|
-
"@babel/core": "7.
|
|
76
|
-
"@babel/preset-env": "7.
|
|
77
|
-
"@babel/preset-typescript": "7.
|
|
76
|
+
"@babel/core": "7.28.5",
|
|
77
|
+
"@babel/preset-env": "7.28.5",
|
|
78
|
+
"@babel/preset-typescript": "7.28.5",
|
|
78
79
|
"@commitlint/cli": "8.3.5",
|
|
79
80
|
"@commitlint/config-conventional": "8.3.4",
|
|
80
81
|
"@playwright/test": "1.63.0",
|
|
81
|
-
"@rollup/plugin-
|
|
82
|
-
"@rollup/plugin-
|
|
83
|
-
"@rollup/plugin-
|
|
84
|
-
"@rollup/plugin-
|
|
85
|
-
"@
|
|
82
|
+
"@rollup/plugin-babel": "6.1.0",
|
|
83
|
+
"@rollup/plugin-commonjs": "28.0.1",
|
|
84
|
+
"@rollup/plugin-json": "6.1.0",
|
|
85
|
+
"@rollup/plugin-node-resolve": "15.3.1",
|
|
86
|
+
"@rollup/plugin-strip": "3.0.4",
|
|
87
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
88
|
+
"@types/jest": "29.5.14",
|
|
86
89
|
"@types/lodash": "4.14.180",
|
|
90
|
+
"@types/node": "18.19.130",
|
|
87
91
|
"@types/react": "^18.2.0",
|
|
88
92
|
"@types/react-dom": "^18.2.0",
|
|
89
93
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
90
94
|
"@typescript-eslint/parser": "5.62.0",
|
|
91
95
|
"antd": "5.26.5",
|
|
96
|
+
"babel-jest": "29.7.0",
|
|
92
97
|
"eslint": "8.57.1",
|
|
93
98
|
"eslint-config-prettier": "8.10.0",
|
|
94
99
|
"eslint-plugin-jest": "27.9.0",
|
|
@@ -96,20 +101,19 @@
|
|
|
96
101
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
97
102
|
"http-server": "14.1.1",
|
|
98
103
|
"husky": "8.0.3",
|
|
99
|
-
"ice-render": "
|
|
100
|
-
"jest": "
|
|
104
|
+
"ice-render": "^1.4.11",
|
|
105
|
+
"jest": "29.7.0",
|
|
106
|
+
"jest-environment-jsdom": "29.7.0",
|
|
101
107
|
"lint-staged": "15.5.2",
|
|
102
108
|
"lodash": "4.17.21",
|
|
103
109
|
"prettier": "2.8.8",
|
|
104
110
|
"publint": "0.3.24",
|
|
105
111
|
"react": "^18.2.0",
|
|
106
112
|
"react-dom": "^18.2.0",
|
|
107
|
-
"rimraf": "
|
|
108
|
-
"rollup": "
|
|
109
|
-
"rollup-plugin-
|
|
110
|
-
"
|
|
111
|
-
"rollup-plugin-terser": "5.3.0",
|
|
112
|
-
"typescript": "4.6.2"
|
|
113
|
+
"rimraf": "5.0.10",
|
|
114
|
+
"rollup": "3.29.5",
|
|
115
|
+
"rollup-plugin-license": "3.6.0",
|
|
116
|
+
"typescript": "5.9.3"
|
|
113
117
|
},
|
|
114
118
|
"commitlint": {
|
|
115
119
|
"extends": [
|
|
@@ -138,8 +142,8 @@
|
|
|
138
142
|
]
|
|
139
143
|
},
|
|
140
144
|
"engines": {
|
|
141
|
-
"npm": ">=
|
|
142
|
-
"node": ">=
|
|
145
|
+
"npm": ">=9",
|
|
146
|
+
"node": ">=18"
|
|
143
147
|
},
|
|
144
148
|
"license": "MIT"
|
|
145
149
|
}
|