@arach/arc-iso 0.5.0 → 0.7.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/arc-iso-slim.es.js +204 -202
- package/dist/arc-iso-slim.umd.js +3 -3
- package/dist/arc-iso.es.js +451 -450
- package/dist/arc-iso.umd.js +18 -18
- package/dist/index.d.ts +68 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,21 @@ export declare interface ArcConnectorStyle {
|
|
|
22
22
|
dashed?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export declare function ArcDiagram({ data, className, interactive, mode, theme, label, labelPosition, defaultZoom, zoomLevels, showArcToggle, showAutoLayout, showControls, showMinimap, showLegend, showFocusStory, frame, hoverEffects, onNodeHover, titleBlock, maxFitZoom, }: ArcDiagramProps): JSX.Element;
|
|
25
|
+
export declare function ArcDiagram({ data, className, interactive, mode, theme, label, labelPosition, defaultZoom, zoomLevels, showArcToggle, showAutoLayout, showControls, showMinimap, showLegend, showFocusStory, frame, hoverEffects, onNodeHover, titleBlock, maxFitZoom, defaultViewMode, defaultIsoStyle, }: ArcDiagramProps): JSX.Element;
|
|
26
|
+
|
|
27
|
+
declare interface ArcDiagram_2 {
|
|
28
|
+
layout: DiagramLayout_2;
|
|
29
|
+
grid: GridConfig;
|
|
30
|
+
layoutHints?: LayoutHints_2;
|
|
31
|
+
nodes: Record<string, NodePosition_2>;
|
|
32
|
+
nodeData: Record<string, NodeData>;
|
|
33
|
+
connectors: Connector[];
|
|
34
|
+
connectorStyles: Record<string, ConnectorStyle_2>;
|
|
35
|
+
groups?: GroupShape_2[];
|
|
36
|
+
focusTargets?: Record<string, FocusTarget_2>;
|
|
37
|
+
images?: DiagramImage[];
|
|
38
|
+
exportZone?: ExportZone | null;
|
|
39
|
+
}
|
|
26
40
|
|
|
27
41
|
export declare interface ArcDiagramData {
|
|
28
42
|
id?: string;
|
|
@@ -86,6 +100,10 @@ declare interface ArcDiagramProps {
|
|
|
86
100
|
onNodeHover?: (nodeId: string | null) => void;
|
|
87
101
|
/** Override the engineering title-block fields (shown when the theme opts in). */
|
|
88
102
|
titleBlock?: TitleBlockInfo;
|
|
103
|
+
/** Render the diagram in isometric projection. Default: '2d' */
|
|
104
|
+
defaultViewMode?: ViewMode_2;
|
|
105
|
+
/** Isometric render style — 'solid' | 'blueprint' | 'cyanotype'. Default: 'solid' */
|
|
106
|
+
defaultIsoStyle?: IsoStyleId;
|
|
89
107
|
}
|
|
90
108
|
|
|
91
109
|
declare interface ArcDiagramProps_2 {
|
|
@@ -108,6 +126,8 @@ export declare interface ArcNodeData {
|
|
|
108
126
|
subtitle?: string;
|
|
109
127
|
description?: string;
|
|
110
128
|
color: DiagramColor;
|
|
129
|
+
/** Per-node silhouette. Omit to follow the theme's own node shape. */
|
|
130
|
+
shape?: NodeShape;
|
|
111
131
|
}
|
|
112
132
|
|
|
113
133
|
export declare interface ArcNodePosition {
|
|
@@ -282,7 +302,7 @@ export declare function deleteDiagramSession(id: string): void;
|
|
|
282
302
|
/** Derive a URL-safe session ID from a diagram's source path or ID */
|
|
283
303
|
export declare function deriveSessionId(source: string): string;
|
|
284
304
|
|
|
285
|
-
export declare function DiagramCanvas({ onViewportChange, embedConfig, zoomConfig, themeOverride, isDark }: DiagramCanvasProps): JSX.Element;
|
|
305
|
+
export declare function DiagramCanvas({ onViewportChange, embedConfig, zoomConfig, surface, themeOverride, isDark }: DiagramCanvasProps): JSX.Element;
|
|
286
306
|
|
|
287
307
|
declare interface DiagramCanvasProps {
|
|
288
308
|
onViewportChange?: (bounds: {
|
|
@@ -293,6 +313,10 @@ declare interface DiagramCanvasProps {
|
|
|
293
313
|
}) => void;
|
|
294
314
|
embedConfig?: EmbedConfig;
|
|
295
315
|
zoomConfig?: ZoomConfig;
|
|
316
|
+
/** Workspace backdrop: 'theme' paints the diagram theme's container (embeds,
|
|
317
|
+
* where the frame is part of the artifact), 'chrome' paints the app canvas
|
|
318
|
+
* so the editor's infinite surface matches the shell skin. */
|
|
319
|
+
surface?: 'theme' | 'chrome';
|
|
296
320
|
/** Override canvas background with an Arc theme. */
|
|
297
321
|
themeOverride?: string;
|
|
298
322
|
isDark?: boolean;
|
|
@@ -368,6 +392,17 @@ export declare function DiagramEditor({ initialData, themeId, colorMode, session
|
|
|
368
392
|
initialDiagramMeta?: Record<string, any>;
|
|
369
393
|
}): JSX.Element;
|
|
370
394
|
|
|
395
|
+
declare interface DiagramImage {
|
|
396
|
+
id: string;
|
|
397
|
+
src: string;
|
|
398
|
+
name: string;
|
|
399
|
+
x: number;
|
|
400
|
+
y: number;
|
|
401
|
+
width: number;
|
|
402
|
+
height: number;
|
|
403
|
+
opacity: number;
|
|
404
|
+
}
|
|
405
|
+
|
|
371
406
|
export declare interface DiagramLayout {
|
|
372
407
|
width: number;
|
|
373
408
|
height: number;
|
|
@@ -459,6 +494,13 @@ export declare interface EmbedConfig {
|
|
|
459
494
|
showGrid?: boolean;
|
|
460
495
|
}
|
|
461
496
|
|
|
497
|
+
declare interface ExportZone {
|
|
498
|
+
x: number;
|
|
499
|
+
y: number;
|
|
500
|
+
width: number;
|
|
501
|
+
height: number;
|
|
502
|
+
}
|
|
503
|
+
|
|
462
504
|
export declare interface FocusConnectorRef {
|
|
463
505
|
from: string;
|
|
464
506
|
to: string;
|
|
@@ -511,6 +553,14 @@ export declare function getThemeList(): {
|
|
|
511
553
|
description: string;
|
|
512
554
|
}[];
|
|
513
555
|
|
|
556
|
+
declare interface GridConfig {
|
|
557
|
+
enabled: boolean;
|
|
558
|
+
size: number;
|
|
559
|
+
color: string;
|
|
560
|
+
opacity: number;
|
|
561
|
+
type: 'dots' | 'lines';
|
|
562
|
+
}
|
|
563
|
+
|
|
514
564
|
export declare type GroupLayoutDirection = 'horizontal' | 'vertical';
|
|
515
565
|
|
|
516
566
|
declare type GroupLayoutDirection_2 = 'horizontal' | 'vertical';
|
|
@@ -628,6 +678,8 @@ declare const initialState: {
|
|
|
628
678
|
};
|
|
629
679
|
};
|
|
630
680
|
|
|
681
|
+
export declare function isDiagramShape(value: unknown): boolean;
|
|
682
|
+
|
|
631
683
|
/** Preset HSL palettes matching Arc's diagram colors. */
|
|
632
684
|
export declare const ISO_COLORS: {
|
|
633
685
|
violet: IsoColorDef;
|
|
@@ -748,6 +800,8 @@ declare interface NodeData {
|
|
|
748
800
|
subtitle?: string;
|
|
749
801
|
description?: string;
|
|
750
802
|
color: DiagramColor_2;
|
|
803
|
+
/** Per-node silhouette. Omit to follow the theme's own node shape. */
|
|
804
|
+
shape?: NodeShape;
|
|
751
805
|
}
|
|
752
806
|
|
|
753
807
|
export declare interface NodeLayoutHint {
|
|
@@ -783,11 +837,13 @@ declare interface NodePosition_2 {
|
|
|
783
837
|
size: NodeSize_2;
|
|
784
838
|
}
|
|
785
839
|
|
|
840
|
+
declare type NodeShape = 'rounded' | 'square' | 'chamfer' | 'notch' | 'pill';
|
|
841
|
+
|
|
786
842
|
export declare type NodeSize = 'xs' | 's' | 'm' | 'l';
|
|
787
843
|
|
|
788
844
|
declare type NodeSize_2 = 'xs' | 's' | 'm' | 'l';
|
|
789
845
|
|
|
790
|
-
declare type NodeSize_3 = '
|
|
846
|
+
declare type NodeSize_3 = 'xs' | 's' | 'm' | 'l';
|
|
791
847
|
|
|
792
848
|
/**
|
|
793
849
|
* Parse YAML config into DiagramConfig
|
|
@@ -936,6 +992,10 @@ declare interface TitleBlockInfo {
|
|
|
936
992
|
sheet?: string;
|
|
937
993
|
}
|
|
938
994
|
|
|
995
|
+
export declare function toExportFormat(diagram: ArcDiagram_2): ArcDiagramData_2;
|
|
996
|
+
|
|
997
|
+
export declare function toTypeScriptSource(diagram: ArcDiagram_2, name?: string): string;
|
|
998
|
+
|
|
939
999
|
export declare function useColorMode(): string;
|
|
940
1000
|
|
|
941
1001
|
export declare function useDiagram(): {
|
|
@@ -1005,8 +1065,13 @@ export declare function useThemeId(): string;
|
|
|
1005
1065
|
|
|
1006
1066
|
export declare function useViewMode(): string;
|
|
1007
1067
|
|
|
1068
|
+
/** Human-readable reason this is not a diagram, or null if it is. */
|
|
1069
|
+
export declare function validateDiagramShape(value: unknown): string | null;
|
|
1070
|
+
|
|
1008
1071
|
export declare type ViewMode = '2d' | 'isometric';
|
|
1009
1072
|
|
|
1073
|
+
declare type ViewMode_2 = '2d' | 'isometric';
|
|
1074
|
+
|
|
1010
1075
|
declare interface ZoomConfig {
|
|
1011
1076
|
defaultZoom?: number | 'fit';
|
|
1012
1077
|
zoomLevels?: number[];
|