@nice2dev/ui-diagrams 1.0.29 → 1.1.6
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/CHANGELOG.md +8 -0
- package/dist/__tests__/DiagramModel.test.d.ts +0 -1
- package/dist/__tests__/animationEngine.test.d.ts +0 -1
- package/dist/__tests__/businessVisualizers.test.d.ts +0 -1
- package/dist/__tests__/dataBinding.test.d.ts +0 -1
- package/dist/__tests__/diagramTemplateGallery.test.d.ts +0 -1
- package/dist/__tests__/exportEngine.test.d.ts +0 -1
- package/dist/__tests__/i18n-locales.test.d.ts +0 -1
- package/dist/__tests__/layoutEngine.test.d.ts +0 -1
- package/dist/__tests__/serialization.test.d.ts +0 -1
- package/dist/__tests__/setup.d.ts +0 -2
- package/dist/__tests__/snapGrid.test.d.ts +0 -1
- package/dist/__tests__/sprint24-diagrams.test.d.ts +0 -1
- package/dist/components/AnimationTimeline.d.ts +0 -2
- package/dist/components/DiagramCanvas.d.ts +0 -2
- package/dist/components/DiagramCellRenderer.d.ts +0 -2
- package/dist/components/DiagramMinimap.d.ts +0 -2
- package/dist/components/DiagramPropertyPanel.d.ts +0 -2
- package/dist/components/DiagramToolbar.d.ts +0 -2
- package/dist/components/NiceDatabaseSchemaViewer.d.ts +0 -2
- package/dist/components/NiceDecisionTreeEditor.d.ts +0 -2
- package/dist/components/NiceDependencyGraph.d.ts +0 -2
- package/dist/components/NiceDiagramEditor.d.ts +0 -2
- package/dist/components/NiceDiagramViewer.d.ts +0 -2
- package/dist/components/NiceNetworkTopology.d.ts +0 -2
- package/dist/components/NiceOrgChartVisualizer.d.ts +0 -2
- package/dist/components/NiceProcessMiningDiagram.d.ts +0 -2
- package/dist/components/NiceWorkflowVisualizer.d.ts +0 -2
- package/dist/components/collaborativeDiagram.d.ts +0 -2
- package/dist/components/diagramAdapters.d.ts +0 -2
- package/dist/components/diagramTemplates.d.ts +0 -2
- package/dist/components/shapeRegistry.d.ts +0 -2
- package/dist/components/snapGuides.d.ts +0 -2
- package/dist/components/workflowIntegrations.d.ts +0 -2
- package/dist/core/DiagramModel.d.ts +0 -2
- package/dist/core/animationEngine.d.ts +0 -2
- package/dist/core/conditionalStyling.d.ts +0 -2
- package/dist/core/dataBinding.d.ts +0 -2
- package/dist/core/diagramComments.d.ts +0 -1
- package/dist/core/diagramParticleEngine.d.ts +0 -2
- package/dist/core/diagramSearch.d.ts +0 -2
- package/dist/core/diagramStylePresets.d.ts +0 -2
- package/dist/core/diagramTemplateGallery.d.ts +0 -2
- package/dist/core/diagramVersioning.d.ts +0 -2
- package/dist/core/exportEngine.d.ts +0 -2
- package/dist/core/i18n.d.ts +0 -2
- package/dist/core/layoutEngine.d.ts +0 -2
- package/dist/core/serialization.d.ts +0 -2
- package/dist/core/snapGrid.d.ts +0 -2
- package/dist/hooks/useDiagramEditor.d.ts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/types/diagramTypes.d.ts +0 -1
- package/dist/ui-diagrams.css +1 -0
- package/package.json +18 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DiagramAnimation } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface AnimationTimelineProps {
|
|
5
4
|
animations: readonly DiagramAnimation[];
|
|
6
5
|
onAdd?: (anim: Omit<DiagramAnimation, 'id'>) => void;
|
|
@@ -18,4 +17,3 @@ export interface AnimationTimelineProps {
|
|
|
18
17
|
className?: string;
|
|
19
18
|
}
|
|
20
19
|
export declare const AnimationTimeline: React.FC<AnimationTimelineProps>;
|
|
21
|
-
//# sourceMappingURL=AnimationTimeline.d.ts.map
|
|
@@ -2,7 +2,6 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { AnimationState } from '../core/animationEngine';
|
|
3
3
|
import { ParticleEngineState } from '../core/diagramParticleEngine';
|
|
4
4
|
import { DiagramNode, DiagramEdge, DiagramGroup, DiagramViewport, DiagramThemeOverrides, DiagramViewMode, Point, Size } from '../types/diagramTypes';
|
|
5
|
-
|
|
6
5
|
export interface DiagramCanvasProps {
|
|
7
6
|
nodes: readonly DiagramNode[];
|
|
8
7
|
edges: readonly DiagramEdge[];
|
|
@@ -51,4 +50,3 @@ export interface DiagramCanvasProps {
|
|
|
51
50
|
className?: string;
|
|
52
51
|
}
|
|
53
52
|
export declare const DiagramCanvas: React.FC<DiagramCanvasProps>;
|
|
54
|
-
//# sourceMappingURL=DiagramCanvas.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { NiceDiagramDocument, DiagramNode, DiagramEdge } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface DiagramCellRendererProps {
|
|
5
4
|
/** Full diagram document to render. */
|
|
6
5
|
document?: NiceDiagramDocument;
|
|
@@ -33,4 +32,3 @@ export interface DiagramCellRendererProps {
|
|
|
33
32
|
}
|
|
34
33
|
export declare const DiagramCellRenderer: React.FC<DiagramCellRendererProps>;
|
|
35
34
|
export default DiagramCellRenderer;
|
|
36
|
-
//# sourceMappingURL=DiagramCellRenderer.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DiagramNode, DiagramEdge, DiagramViewport } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface DiagramMinimapProps {
|
|
5
4
|
nodes: readonly DiagramNode[];
|
|
6
5
|
edges: readonly DiagramEdge[];
|
|
@@ -14,4 +13,3 @@ export interface DiagramMinimapProps {
|
|
|
14
13
|
className?: string;
|
|
15
14
|
}
|
|
16
15
|
export declare const DiagramMinimap: React.FC<DiagramMinimapProps>;
|
|
17
|
-
//# sourceMappingURL=DiagramMinimap.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DiagramNode, DiagramEdge } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface DiagramPropertyPanelProps {
|
|
5
4
|
selectedNode?: DiagramNode | null;
|
|
6
5
|
selectedEdge?: DiagramEdge | null;
|
|
@@ -10,4 +9,3 @@ export interface DiagramPropertyPanelProps {
|
|
|
10
9
|
className?: string;
|
|
11
10
|
}
|
|
12
11
|
export declare const DiagramPropertyPanel: React.FC<DiagramPropertyPanelProps>;
|
|
13
|
-
//# sourceMappingURL=DiagramPropertyPanel.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { LayoutAlgorithm, NodeShape, DiagramType, DiagramViewMode } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export type DiagramTool = 'select' | 'addNode' | 'addEdge' | 'pan' | 'delete' | 'text' | 'freehand';
|
|
5
4
|
export interface DiagramToolbarProps {
|
|
6
5
|
activeTool: DiagramTool;
|
|
@@ -62,4 +61,3 @@ export interface DiagramToolbarProps {
|
|
|
62
61
|
className?: string;
|
|
63
62
|
}
|
|
64
63
|
export declare const DiagramToolbar: React.FC<DiagramToolbarProps>;
|
|
65
|
-
//# sourceMappingURL=DiagramToolbar.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface DatabaseColumn {
|
|
4
3
|
name: string;
|
|
5
4
|
type: string;
|
|
@@ -74,4 +73,3 @@ export declare function parseSQLToSchema(sql: string): DatabaseSchema;
|
|
|
74
73
|
*/
|
|
75
74
|
export declare function schemaToSQL(schema: DatabaseSchema, _dialect?: 'mysql' | 'postgres' | 'mssql'): string;
|
|
76
75
|
export default NiceDatabaseSchemaViewer;
|
|
77
|
-
//# sourceMappingURL=NiceDatabaseSchemaViewer.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface DecisionNode {
|
|
4
3
|
id: string;
|
|
5
4
|
type: DecisionNodeType;
|
|
@@ -125,4 +124,3 @@ export declare function predictWithTree(tree: DecisionTreeData, input: Record<st
|
|
|
125
124
|
path: string[];
|
|
126
125
|
};
|
|
127
126
|
export default NiceDecisionTreeEditor;
|
|
128
|
-
//# sourceMappingURL=NiceDecisionTreeEditor.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface DependencyNode {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
@@ -101,4 +100,3 @@ export declare function analyzeDependencyGraph(data: DependencyGraphData): {
|
|
|
101
100
|
avgDependencies: number;
|
|
102
101
|
};
|
|
103
102
|
export default NiceDependencyGraph;
|
|
104
|
-
//# sourceMappingURL=NiceDependencyGraph.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NiceComponentTutorial } from '@nice2dev/ui';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { NiceDiagramDocument, DiagramType } from '../types/diagramTypes';
|
|
4
|
-
|
|
5
4
|
export interface NiceDiagramEditorProps {
|
|
6
5
|
/** Initial document (optional — empty diagram created if omitted) */
|
|
7
6
|
initialDocument?: NiceDiagramDocument;
|
|
@@ -24,4 +23,3 @@ export interface NiceDiagramEditorProps {
|
|
|
24
23
|
tutorial?: NiceComponentTutorial;
|
|
25
24
|
}
|
|
26
25
|
export declare const NiceDiagramEditor: React.FC<NiceDiagramEditorProps>;
|
|
27
|
-
//# sourceMappingURL=NiceDiagramEditor.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { NiceDiagramDocument } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface NiceDiagramViewerProps {
|
|
5
4
|
/** The document to display */
|
|
6
5
|
document: NiceDiagramDocument;
|
|
@@ -23,4 +22,3 @@ export interface NiceDiagramViewerProps {
|
|
|
23
22
|
style?: React.CSSProperties;
|
|
24
23
|
}
|
|
25
24
|
export declare const NiceDiagramViewer: React.FC<NiceDiagramViewerProps>;
|
|
26
|
-
//# sourceMappingURL=NiceDiagramViewer.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface NetworkDevice {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
@@ -122,4 +121,3 @@ export declare function calculateNetworkHealth(data: NetworkTopologyData): {
|
|
|
122
121
|
degradedConnections: number;
|
|
123
122
|
};
|
|
124
123
|
export default NiceNetworkTopology;
|
|
125
|
-
//# sourceMappingURL=NiceNetworkTopology.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface OrgEmployee {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
@@ -88,4 +87,3 @@ export declare function calculateOrgStats(data: OrgChartData): {
|
|
|
88
87
|
managers: number;
|
|
89
88
|
};
|
|
90
89
|
export default NiceOrgChartVisualizer;
|
|
91
|
-
//# sourceMappingURL=NiceOrgChartVisualizer.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface ProcessEvent {
|
|
4
3
|
caseId: string;
|
|
5
4
|
activity: string;
|
|
@@ -81,4 +80,3 @@ export declare const NiceProcessMiningDiagram: React.FC<ProcessMiningDiagramProp
|
|
|
81
80
|
*/
|
|
82
81
|
export declare function mineProcessFromLog(log: ProcessLog): ProcessModel;
|
|
83
82
|
export default NiceProcessMiningDiagram;
|
|
84
|
-
//# sourceMappingURL=NiceProcessMiningDiagram.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { NodeShape } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface WorkflowStep {
|
|
5
4
|
id: string;
|
|
6
5
|
name: string;
|
|
@@ -67,4 +66,3 @@ export declare function createLinearWorkflow(stepNames: string[], _options?: {
|
|
|
67
66
|
decisionBranches?: string[];
|
|
68
67
|
}): WorkflowData;
|
|
69
68
|
export default NiceWorkflowVisualizer;
|
|
70
|
-
//# sourceMappingURL=NiceWorkflowVisualizer.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { NiceDiagramDocument, DiagramNode, DiagramEdge, DiagramGroup } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface YDoc {
|
|
5
4
|
getMap<T>(name: string): YMap<T>;
|
|
6
5
|
getArray<T>(name: string): YArray<T>;
|
|
@@ -250,4 +249,3 @@ declare const _default: {
|
|
|
250
249
|
ConnectionStatus: typeof ConnectionStatus;
|
|
251
250
|
};
|
|
252
251
|
export default _default;
|
|
253
|
-
//# sourceMappingURL=collaborativeDiagram.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument, DiagramNode, DiagramEdge, DiagramGroup, DiagramAnimation, DiagramType } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface SimpleNode {
|
|
4
3
|
id: string;
|
|
5
4
|
label: string;
|
|
@@ -77,4 +76,3 @@ export declare function createDiagramDocument(options: {
|
|
|
77
76
|
animations?: SimpleAnimation[];
|
|
78
77
|
metadata?: Record<string, unknown>;
|
|
79
78
|
}): NiceDiagramDocument;
|
|
80
|
-
//# sourceMappingURL=diagramAdapters.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface DiagramTemplate {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
@@ -59,4 +58,3 @@ declare const _default: {
|
|
|
59
58
|
diagramTemplates: DiagramTemplate[];
|
|
60
59
|
};
|
|
61
60
|
export default _default;
|
|
62
|
-
//# sourceMappingURL=diagramTemplates.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface ShapeDefinition {
|
|
4
3
|
/** Unique shape identifier */
|
|
5
4
|
id: string;
|
|
@@ -131,4 +130,3 @@ declare const _default: {
|
|
|
131
130
|
};
|
|
132
131
|
};
|
|
133
132
|
export default _default;
|
|
134
|
-
//# sourceMappingURL=shapeRegistry.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface Point {
|
|
4
3
|
x: number;
|
|
5
4
|
y: number;
|
|
@@ -164,4 +163,3 @@ declare const _default: {
|
|
|
164
163
|
defaultSnapConfig: SnapConfig;
|
|
165
164
|
};
|
|
166
165
|
export default _default;
|
|
167
|
-
//# sourceMappingURL=snapGuides.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { WorkflowData } from './NiceWorkflowVisualizer';
|
|
2
|
-
|
|
3
2
|
export interface BPMNDefinitions {
|
|
4
3
|
process?: BPMNProcess | BPMNProcess[];
|
|
5
4
|
collaboration?: BPMNCollaboration;
|
|
@@ -277,4 +276,3 @@ export interface WorkflowEngineConfig {
|
|
|
277
276
|
* Detect workflow engine type from data structure.
|
|
278
277
|
*/
|
|
279
278
|
export declare function detectWorkflowEngine(data: unknown): WorkflowEngineType | null;
|
|
280
|
-
//# sourceMappingURL=workflowIntegrations.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument, DiagramNode, DiagramEdge, DiagramGroup, DiagramAnimation, DiagramAnimationMode, DiagramViewport, DiagramViewMode, DiagramPlayerConfig, DiagramStylePresetConfig, DiagramType, Point, Size, NodeShape } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export declare class DiagramModel {
|
|
4
3
|
private doc;
|
|
5
4
|
private undoStack;
|
|
@@ -53,4 +52,3 @@ export declare class DiagramModel {
|
|
|
53
52
|
updateAnimation(id: string, patch: Partial<Omit<DiagramAnimation, 'id'>>): void;
|
|
54
53
|
loadDocument(doc: NiceDiagramDocument): void;
|
|
55
54
|
}
|
|
56
|
-
//# sourceMappingURL=DiagramModel.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiagramAnimation, EasingType } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export declare function getEasing(name: EasingType): (t: number) => number;
|
|
4
3
|
export interface AnimationState {
|
|
5
4
|
opacity: number;
|
|
@@ -37,4 +36,3 @@ export declare class AnimationPlayer {
|
|
|
37
36
|
isPlaying(): boolean;
|
|
38
37
|
private tick;
|
|
39
38
|
}
|
|
40
|
-
//# sourceMappingURL=animationEngine.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiagramNode, DiagramEdge, NodeStyle, EdgeStyle, NodeShape } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
/** Condition operator for style rules. */
|
|
4
3
|
export type StyleConditionOperator = 'equals' | 'not_equals' | 'greater_than' | 'greater_than_or_equals' | 'less_than' | 'less_than_or_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'regex' | 'is_null' | 'is_not_null' | 'is_empty' | 'is_not_empty' | 'in' | 'not_in' | 'between';
|
|
5
4
|
/** A single condition. */
|
|
@@ -148,4 +147,3 @@ export declare function createRuleFromPreset(presetId: string): ConditionalStyle
|
|
|
148
147
|
/** Create a new conditional styling engine with presets. */
|
|
149
148
|
export declare function createConditionalStylingEngine(loadPresets?: boolean): ConditionalStylingEngine;
|
|
150
149
|
export default ConditionalStylingEngine;
|
|
151
|
-
//# sourceMappingURL=conditionalStyling.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiagramNode, DiagramEdge, DiagramDataBinding, NodeShape } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface DataRecord {
|
|
4
3
|
[key: string]: unknown;
|
|
5
4
|
}
|
|
@@ -18,4 +17,3 @@ export declare function fetchAndGenerateDiagram(binding: DiagramDataBinding, def
|
|
|
18
17
|
nodes: DiagramNode[];
|
|
19
18
|
edges: DiagramEdge[];
|
|
20
19
|
}>;
|
|
21
|
-
//# sourceMappingURL=dataBinding.d.ts.map
|
|
@@ -205,4 +205,3 @@ export declare function formatCommentDate(isoDate: string): string;
|
|
|
205
205
|
/** Render text with mentions highlighted. */
|
|
206
206
|
export declare function renderTextWithMentions(text: string, mentions: CommentMention[]): string;
|
|
207
207
|
export default DiagramCommentManager;
|
|
208
|
-
//# sourceMappingURL=diagramComments.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LiquidFlowConfig, Point } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface Particle {
|
|
4
3
|
x: number;
|
|
5
4
|
y: number;
|
|
@@ -93,4 +92,3 @@ export declare function getPointOnPath(pathData: string, t: number, svgElement?:
|
|
|
93
92
|
*/
|
|
94
93
|
export declare function createGlowFilterId(elementId: string): string;
|
|
95
94
|
export declare function computeGlowRadius(intensity: number, pulse: number): number;
|
|
96
|
-
//# sourceMappingURL=diagramParticleEngine.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiagramNode, DiagramEdge, DiagramGroup, NodeShape } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
/** Search scope. */
|
|
4
3
|
export type SearchScope = 'all' | 'nodes' | 'edges' | 'groups' | 'labels' | 'data';
|
|
5
4
|
/** Match type. */
|
|
@@ -166,4 +165,3 @@ export declare function highlightMatches(text: string, positions: Array<{
|
|
|
166
165
|
/** Create quick filter for common scenarios. */
|
|
167
166
|
export declare function createQuickFilter(scenario: 'by-type' | 'by-layer' | 'by-status' | 'custom', value?: unknown): DiagramFilter;
|
|
168
167
|
export default DiagramSearchFilterEngine;
|
|
169
|
-
//# sourceMappingURL=diagramSearch.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiagramStylePreset, DiagramStylePresetConfig, DiagramStylePresetCategory, NodeStyle, EdgeStyle, DiagramThemeOverrides } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export declare const DIAGRAM_STYLE_PRESETS: DiagramStylePreset[];
|
|
4
3
|
export interface NodeStyleCatalogEntry {
|
|
5
4
|
id: string;
|
|
@@ -53,4 +52,3 @@ export declare function createPresetFromTheme(id: string, themeName: string, col
|
|
|
53
52
|
}, borders: {
|
|
54
53
|
color: string;
|
|
55
54
|
}): DiagramStylePreset;
|
|
56
|
-
//# sourceMappingURL=diagramStylePresets.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument, DiagramType } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface DiagramTemplate {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
@@ -24,4 +23,3 @@ export declare function getTemplatesByCategory(category: DiagramTemplateCategory
|
|
|
24
23
|
* Search templates by name, description, or tags.
|
|
25
24
|
*/
|
|
26
25
|
export declare function searchTemplates(query: string): DiagramTemplate[];
|
|
27
|
-
//# sourceMappingURL=diagramTemplateGallery.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
/** Type of change in a version. */
|
|
4
3
|
export type DiagramChangeType = 'node-added' | 'node-removed' | 'node-moved' | 'node-resized' | 'node-restyled' | 'node-relabeled' | 'edge-added' | 'edge-removed' | 'edge-restyled' | 'edge-rerouted' | 'group-added' | 'group-removed' | 'group-modified' | 'viewport-changed' | 'metadata-changed' | 'animation-added' | 'animation-removed' | 'animation-modified' | 'theme-changed' | 'title-changed';
|
|
5
4
|
/** A single change in a diff. */
|
|
@@ -121,4 +120,3 @@ export declare function createVersioningHook(config?: DiagramVersioningConfig):
|
|
|
121
120
|
diff: (fromVersionId: string, toVersionId: string) => DiagramVersionDiff | null;
|
|
122
121
|
};
|
|
123
122
|
export default DiagramVersioningManager;
|
|
124
|
-
//# sourceMappingURL=diagramVersioning.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument, DiagramExportOptions } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Export diagram to SVG string.
|
|
5
4
|
*/
|
|
@@ -8,4 +7,3 @@ export declare function exportToSvg(doc: NiceDiagramDocument, options?: Partial<
|
|
|
8
7
|
* Export diagram to Mermaid syntax string.
|
|
9
8
|
*/
|
|
10
9
|
export declare function exportToMermaid(doc: NiceDiagramDocument): string;
|
|
11
|
-
//# sourceMappingURL=exportEngine.d.ts.map
|
package/dist/core/i18n.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
|
|
3
2
|
export type NiceTranslateFn = (key: string, fallback?: string) => string;
|
|
4
3
|
interface I18nContextValue {
|
|
5
4
|
locale: string;
|
|
@@ -16,4 +15,3 @@ export declare function useNiceTranslation(): {
|
|
|
16
15
|
locale: string;
|
|
17
16
|
};
|
|
18
17
|
export {};
|
|
19
|
-
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DiagramNode as _DiagramNode, DiagramEdge as _DiagramEdge, LayoutOptions, Point as _Point } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface LayoutResult {
|
|
4
3
|
positions: Map<string, _Point>;
|
|
5
4
|
}
|
|
@@ -7,4 +6,3 @@ export interface LayoutResult {
|
|
|
7
6
|
* Apply an auto-layout algorithm and return computed positions.
|
|
8
7
|
*/
|
|
9
8
|
export declare function computeLayout(nodes: readonly _DiagramNode[], edges: readonly _DiagramEdge[], options: LayoutOptions): LayoutResult;
|
|
10
|
-
//# sourceMappingURL=layoutEngine.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NiceDiagramDocument } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface ParseResult {
|
|
4
3
|
ok: boolean;
|
|
5
4
|
document?: NiceDiagramDocument;
|
|
@@ -13,4 +12,3 @@ export declare function parseNddJson(json: string): ParseResult;
|
|
|
13
12
|
* Stringify a NiceDiagramDocument to `.ndd.json`.
|
|
14
13
|
*/
|
|
15
14
|
export declare function stringifyNddJson(doc: NiceDiagramDocument, pretty?: boolean): string;
|
|
16
|
-
//# sourceMappingURL=serialization.d.ts.map
|
package/dist/core/snapGrid.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Point, Size } from '../types/diagramTypes';
|
|
2
|
-
|
|
3
2
|
export interface GridConfig {
|
|
4
3
|
/** Grid cell size in px (default 20) */
|
|
5
4
|
size: number;
|
|
@@ -48,4 +47,3 @@ export declare function applyAlignmentSnap(position: Point, size: Size, guides:
|
|
|
48
47
|
snappedPosition: Point;
|
|
49
48
|
activeGuides: AlignmentGuide[];
|
|
50
49
|
};
|
|
51
|
-
//# sourceMappingURL=snapGrid.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DiagramModel } from '../core/DiagramModel';
|
|
2
2
|
import { NiceDiagramDocument, DiagramNode, DiagramEdge, DiagramGroup, DiagramAnimation, DiagramAnimationMode, DiagramViewport, DiagramViewMode, DiagramPlayerConfig, DiagramStylePresetConfig, LayoutOptions, NodeShape, Point, Size } from '../types/diagramTypes';
|
|
3
|
-
|
|
4
3
|
export interface UseDiagramEditorReturn {
|
|
5
4
|
/** Current document (read-only) */
|
|
6
5
|
document: Readonly<NiceDiagramDocument>;
|
|
@@ -61,4 +60,3 @@ export interface UseDiagramEditorReturn {
|
|
|
61
60
|
model: DiagramModel;
|
|
62
61
|
}
|
|
63
62
|
export declare function useDiagramEditor(initialDoc?: NiceDiagramDocument): UseDiagramEditorReturn;
|
|
64
|
-
//# sourceMappingURL=useDiagramEditor.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
export { NiceDiagramEditor, type NiceDiagramEditorProps } from './components/NiceDiagramEditor';
|
|
3
2
|
export { NiceDiagramViewer, type NiceDiagramViewerProps } from './components/NiceDiagramViewer';
|
|
4
3
|
export { NiceDiagramViewer as NiceDiagram, type NiceDiagramViewerProps as NiceDiagramProps, } from './components/NiceDiagramViewer';
|
|
@@ -33,4 +32,3 @@ export { DiagramVersioningManager, createVersioningHook, type DiagramChangeType,
|
|
|
33
32
|
export { DiagramCommentManager, COMMENT_PRIORITY_STYLES, formatCommentDate, renderTextWithMentions, type CommentStatus, type CommentAnchorType, type CommentAnchor, type CommentMention, type CommentReply, type DiagramComment, type CommentStyle, type CommentManagerConfig, type CommentFilter, } from './core/diagramComments';
|
|
34
33
|
export { ConditionalStylingEngine, createConditionalStylingEngine, createRuleFromPreset, PRESET_RULES, type StyleConditionOperator, type StyleCondition, type ConditionGroup, type StyleActionType, type StyleAction, type ConditionalStyleRule, type ConditionalStyleProfile, type AppliedStyles, } from './core/conditionalStyling';
|
|
35
34
|
export { DiagramSearchFilterEngine, highlightMatches, createQuickFilter, type SearchScope, type MatchType, type DiagramSearchOptions, type DiagramFilter, type SearchResult, type FilterPreset, type SearchState, } from './core/diagramSearch';
|
|
36
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nice-diagram-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--nice-bg, #FFF);color:var(--nice-text, #222);border:1px solid var(--nice-border, #ddd);border-radius:var(--nice-radius-md, 6px);overflow:hidden}.nice-diagram-toolbar{display:flex;align-items:center;gap:var(--nice-space-0-5, 2px);padding:var(--nice-space-1, 4px) var(--nice-space-2, 8px);background:var(--nice-bg-secondary, #f5f5f5);border-bottom:1px solid var(--nice-border, #ddd);flex-wrap:wrap}.nice-diagram-toolbar__group{display:flex;gap:var(--nice-space-0-5, 2px);padding-right:var(--nice-space-1-5, 6px);border-right:1px solid var(--nice-border, #e0e0e0);margin-right:var(--nice-space-1, 4px)}.nice-diagram-toolbar__group:last-child{border-right:none;margin-right:0}.nice-diagram-toolbar__group--relative{position:relative}.nice-diagram-toolbar__btn{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px);padding:var(--nice-space-1, 4px) var(--nice-space-2, 8px);border:1px solid transparent;border-radius:var(--nice-radius-sm, 4px);background:transparent;cursor:pointer;font-size:13px;color:var(--nice-text, #444);white-space:nowrap;transition:background .15s,border-color .15s}.nice-diagram-toolbar__btn:hover{background:var(--nice-border, #e8e8e8)}.nice-diagram-toolbar__btn--active{background:var(--nice-primary-bg, #dbeafe);border-color:var(--nice-primary, #2196f3);color:var(--nice-primary-dark, #1565c0)}.nice-diagram-toolbar__btn:disabled{opacity:.4;cursor:default}.nice-diagram-toolbar__dropdown{position:absolute;top:100%;left:0;z-index:10;background:var(--nice-bg, #FFF);border:1px solid var(--nice-border, #ccc);border-radius:var(--nice-radius-sm, 4px);box-shadow:0 4px 12px var(--nice-overlay-12, rgba(0, 0, 0, .12));min-width:140px;padding:var(--nice-space-1, 4px) 0}.nice-diagram-toolbar__dropdown-item{display:block;width:100%;text-align:left;padding:var(--nice-space-1-5, 6px) var(--nice-space-3, 12px);border:none;background:none;cursor:pointer;font-size:13px;color:var(--nice-text, #333)}.nice-diagram-toolbar__dropdown-item:hover{background:var(--nice-primary-bg, #f0f4ff)}.nice-diagram-property-panel{padding:var(--nice-space-3, 12px);font-size:13px}.nice-diagram-property-panel--empty{display:flex;align-items:center;justify-content:center;min-height:100px}.nice-diagram-property-panel__hint{color:var(--nice-text-muted, #999);font-style:italic}.nice-diagram-property-panel__title{font-size:14px;font-weight:600;margin:0 0 var(--nice-space-3, 12px);color:var(--nice-text, #333)}.nice-diagram-property-panel__label{display:flex;flex-direction:column;gap:var(--nice-space-0-75, 3px);margin-bottom:var(--nice-space-2-5, 10px);font-size:12px;color:var(--nice-text-secondary, #666)}.nice-diagram-property-panel__label--half{flex:1;min-width:0}.nice-diagram-property-panel__label--check{flex-direction:row;align-items:center;gap:var(--nice-space-1-5, 6px)}.nice-diagram-property-panel__row{display:flex;gap:var(--nice-space-2, 8px)}.nice-diagram-property-panel__input,.nice-diagram-property-panel__select{padding:var(--nice-space-1, 4px) var(--nice-space-1-5, 6px);border:1px solid var(--nice-border, #ccc);border-radius:var(--nice-radius-sm, 4px);font-size:13px;outline:none}.nice-diagram-property-panel__input:focus,.nice-diagram-property-panel__select:focus{border-color:var(--nice-primary, #2196f3)}.nice-diagram-property-panel__color{width:100%;height:28px;padding:0;border:1px solid var(--nice-border, #ccc);border-radius:var(--nice-radius-sm, 4px);cursor:pointer}.nice-diagram-property-panel__btn{width:100%;padding:var(--nice-space-1-5, 6px) var(--nice-space-3, 12px);border:1px solid var(--nice-border, #ccc);border-radius:var(--nice-radius-sm, 4px);cursor:pointer;font-size:13px;margin-top:var(--nice-space-2, 8px);transition:background .15s}.nice-diagram-property-panel__btn--danger{color:var(--nice-danger-dark, #d32f2f);border-color:var(--nice-danger-dark, #d32f2f);background:var(--nice-danger-bg, #fff5f5)}.nice-diagram-property-panel__btn--danger:hover{background:var(--nice-danger-bg, #ffebee)}.nice-diagram-minimap{box-shadow:0 2px 8px var(--nice-overlay-10, rgba(0, 0, 0, .1))}.nice-diagram-timeline{padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);font-size:13px;min-height:80px}.nice-diagram-timeline__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--nice-space-2, 8px)}.nice-diagram-timeline__title{font-size:13px;font-weight:600;margin:0;color:var(--nice-text, #333)}.nice-diagram-timeline__controls{display:flex;gap:var(--nice-space-1, 4px)}.nice-diagram-timeline__btn{padding:var(--nice-space-0-75, 3px) var(--nice-space-2, 8px);border:1px solid var(--nice-border, #ccc);border-radius:var(--nice-radius-sm, 4px);background:var(--nice-bg, #FFF);cursor:pointer;font-size:12px}.nice-diagram-timeline__btn:hover{background:var(--nice-bg-secondary, #f0f0f0)}.nice-diagram-timeline__empty{color:var(--nice-text-muted, #999);font-style:italic;text-align:center;padding:var(--nice-space-3, 12px);margin:0}.nice-diagram-timeline__tracks{display:flex;flex-direction:column;gap:var(--nice-space-1, 4px)}.nice-diagram-timeline__track{display:flex;align-items:center;gap:var(--nice-space-2, 8px)}.nice-diagram-timeline__track-label{display:flex;align-items:center;gap:var(--nice-space-1, 4px);min-width:160px;font-size:12px}.nice-diagram-timeline__track-name{font-weight:500;color:var(--nice-text, #333)}.nice-diagram-timeline__track-effect{color:var(--nice-text-secondary, #888);font-size:11px}.nice-diagram-timeline__track-remove{margin-left:auto;border:none;background:none;color:var(--nice-danger-dark, #d32f2f);cursor:pointer;font-size:16px;line-height:1;padding:0 var(--nice-space-0-5, 2px)}.nice-diagram-timeline__track-bar{flex:1;height:20px;background:var(--nice-bg-secondary, #f0f0f0);border-radius:var(--nice-radius-sm, 3px);position:relative;overflow:hidden}.nice-diagram-timeline__track-segment{position:absolute;top:2px;bottom:2px;background:var(--nice-primary-light, #64b5f6);border-radius:var(--nice-radius-sm, 2px);min-width:4px}.nice-diagram-timeline__ruler{position:relative;height:16px;margin-top:var(--nice-space-1, 4px);margin-left:168px}.nice-diagram-timeline__ruler-mark{position:absolute;font-size:10px;color:var(--nice-text-muted, #aaa);transform:translate(-50%)}.nice-diagram-viewer{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--nice-bg, #FFF);border:1px solid var(--nice-border, #ddd);border-radius:var(--nice-radius-md, 6px);overflow:hidden}.nice-diagram-viewer__btn{padding:var(--nice-space-0-75, 3px) var(--nice-space-2, 8px);border:1px solid var(--nice-border, #ccc);border-radius:var(--nice-radius-sm, 4px);background:var(--nice-bg, #FFF);cursor:pointer;font-size:12px}.nice-diagram-viewer__btn:hover{background:var(--nice-bg-secondary, #f0f0f0)}.nice-diagram-canvas{-webkit-user-select:none;user-select:none}._cell_9ewd0_9{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--nice-border-light, #e2e8f0);transition:all .15s ease}._cell_9ewd0_9._expandable_9ewd0_29{cursor:pointer}._cell_9ewd0_9._expandable_9ewd0_29:hover{border-color:var(--nice-primary-light, #93c5fd);box-shadow:0 1px 4px var(--nice-primary-tint-15, rgba(59, 130, 246, .15))}._cell_9ewd0_9._expandable_9ewd0_29:active{transform:scale(.98)}._svg_9ewd0_57{display:block}._emptyText_9ewd0_67{color:var(--nice-text-tertiary, #94a3b8);font-size:.75rem}._badge_9ewd0_79{position:absolute;top:2px;right:2px;display:flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 var(--nice-space-1, 4px);border-radius:var(--nice-radius-lg, 8px);background:var(--nice-bg-tertiary, #e2e8f0);color:var(--nice-text-secondary, #64748b);font-size:.625rem;font-weight:600;line-height:1}._expandIcon_9ewd0_117{position:absolute;bottom:2px;right:2px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--nice-radius-sm, 4px);background:var(--nice-overlay-light-85, rgba(255, 255, 255, .85));color:var(--nice-text-secondary, #64748b);opacity:0;transition:opacity .15s ease}._cell_9ewd0_9._expandable_9ewd0_29:hover ._expandIcon_9ewd0_117{opacity:1}._modalOverlay_9ewd0_165{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:var(--nice-overlay-50, rgba(0, 0, 0, .5));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:10000;animation:_fadeIn_9ewd0_1 .15s ease}@keyframes _fadeIn_9ewd0_1{0%{opacity:0}to{opacity:1}}._modalContent_9ewd0_213{display:flex;flex-direction:column;width:90vw;max-width:800px;height:80vh;max-height:600px;background:var(--nice-bg-primary, #ffffff);border-radius:var(--nice-radius-xl, 12px);box-shadow:0 20px 40px var(--nice-overlay-20, rgba(0, 0, 0, .2));overflow:hidden;animation:_slideUp_9ewd0_1 .2s ease}@keyframes _slideUp_9ewd0_1{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}._modalHeader_9ewd0_263{display:flex;align-items:center;justify-content:space-between;padding:var(--nice-space-4, 16px) var(--nice-space-5, 20px);border-bottom:1px solid var(--nice-border, #e2e8f0);background:var(--nice-bg-secondary, #f8fafc)}._modalTitle_9ewd0_281{margin:0;font-size:1rem;font-weight:600;color:var(--nice-text-primary, #1e293b)}._modalClose_9ewd0_295{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--nice-radius-md, 6px);background:transparent;color:var(--nice-text-secondary, #64748b);cursor:pointer;transition:all .15s ease}._modalClose_9ewd0_295:hover{background:var(--nice-bg-tertiary, #e2e8f0);color:var(--nice-text-primary, #1e293b)}._modalBody_9ewd0_333{flex:1;display:flex;align-items:center;justify-content:center;padding:var(--nice-space-5, 20px);background:var(--nice-bg-primary, #ffffff);overflow:hidden}._modalSvg_9ewd0_353{max-width:100%;max-height:100%;width:auto;height:auto}._modalFooter_9ewd0_367{display:flex;align-items:center;justify-content:flex-end;padding:var(--nice-space-3, 12px) var(--nice-space-5, 20px);border-top:1px solid var(--nice-border, #e2e8f0);background:var(--nice-bg-secondary, #f8fafc)}._modalInfo_9ewd0_385{font-size:.75rem;color:var(--nice-text-secondary, #64748b)}@media(prefers-color-scheme:dark){._cell_9ewd0_9{border-color:var(--nice-border-dark, #374151)}._badge_9ewd0_79{background:var(--nice-bg-dark-tertiary, #374151);color:var(--nice-text-dark-secondary, #9ca3af)}._expandIcon_9ewd0_117{background:var(--nice-overlay-75, rgba(0, 0, 0, .75));color:var(--nice-text-dark-secondary, #9ca3af)}._modalContent_9ewd0_213{box-shadow:0 20px 40px var(--nice-overlay-50, rgba(0, 0, 0, .5))}}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui-diagrams",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Nice2Dev Diagram Editor & Viewer — flowcharts, org charts, BPMN, ER diagrams with animations, data binding, and custom .ndd.json format",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
8
|
-
"types": "
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"types": "./
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.mjs",
|
|
13
13
|
"require": "./dist/index.cjs",
|
|
14
|
-
"default": "./
|
|
14
|
+
"default": "./dist/index.mjs"
|
|
15
15
|
},
|
|
16
|
-
"./style.css": "./dist/
|
|
16
|
+
"./style.css": "./dist/ui-diagrams.css"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
@@ -40,17 +40,19 @@
|
|
|
40
40
|
"react-dom": ">=17.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@testing-library/
|
|
45
|
-
"@
|
|
46
|
-
"@types/react
|
|
47
|
-
"@
|
|
48
|
-
"react": "^
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
43
|
+
"@nice2dev/ui": "^1.1.6",
|
|
44
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
45
|
+
"@testing-library/react": "^16.3.3",
|
|
46
|
+
"@types/react": "^19.2.18",
|
|
47
|
+
"@types/react-dom": "^19.2.7",
|
|
48
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
49
|
+
"jsdom": "^29.0.0",
|
|
50
|
+
"react": "^19.2.8",
|
|
51
|
+
"react-dom": "^19.2.8",
|
|
52
|
+
"typescript": "^5.9.3",
|
|
53
|
+
"vite": "^6.4.1",
|
|
54
|
+
"vite-plugin-dts": "^4.5.4",
|
|
55
|
+
"vitest": "^4.1.11"
|
|
54
56
|
},
|
|
55
57
|
"keywords": [
|
|
56
58
|
"react",
|