@arach/arc 0.4.3 → 0.4.4
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 +35 -10
- package/lib/arc.es.js +38 -32973
- package/lib/arc.umd.js +266 -144
- package/lib/index.d.ts +18 -7
- package/package.json +4 -2
package/lib/index.d.ts
CHANGED
|
@@ -163,6 +163,16 @@ declare interface BrandSpec {
|
|
|
163
163
|
frame?: 'hairline' | 'inset' | 'brackets' | 'ticks' | 'cropmarks' | 'corners' | 'sheet' | 'reticle' | 'none';
|
|
164
164
|
/** Render an engineering-drawing title block in the bottom-right corner. */
|
|
165
165
|
titleBlock?: boolean;
|
|
166
|
+
/** Node silhouette when nodeRadius is not set explicitly. */
|
|
167
|
+
nodeShape?: 'rounded' | 'square' | 'chamfer' | 'pill';
|
|
168
|
+
/** Overall node opacity (0–1). */
|
|
169
|
+
nodeOpacity?: number;
|
|
170
|
+
/** Frosted glass backdrop on nodes. */
|
|
171
|
+
nodeGlass?: boolean;
|
|
172
|
+
/** Colored accent stripe on the node shell. */
|
|
173
|
+
accentBar?: 'left' | 'top' | 'none';
|
|
174
|
+
/** Soft bloom on connector strokes. */
|
|
175
|
+
connectorGlow?: boolean;
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
export declare interface ColorPalette {
|
|
@@ -331,9 +341,7 @@ declare interface DiagramConfig_2 {
|
|
|
331
341
|
}[];
|
|
332
342
|
}
|
|
333
343
|
|
|
334
|
-
export declare function DiagramEditor({
|
|
335
|
-
isDark: boolean;
|
|
336
|
-
onToggleTheme: () => void;
|
|
344
|
+
export declare function DiagramEditor({ initialData, themeId, colorMode, sessionId, initialDiagramMeta, }: {
|
|
337
345
|
initialData?: any;
|
|
338
346
|
themeId?: string | null;
|
|
339
347
|
colorMode?: 'light' | 'dark';
|
|
@@ -496,7 +504,7 @@ declare const initialState: {
|
|
|
496
504
|
template: string;
|
|
497
505
|
zoom: number;
|
|
498
506
|
viewMode: string;
|
|
499
|
-
themeId:
|
|
507
|
+
themeId: string;
|
|
500
508
|
colorMode: string;
|
|
501
509
|
};
|
|
502
510
|
meta: {
|
|
@@ -737,7 +745,7 @@ declare interface ThemeBackground {
|
|
|
737
745
|
};
|
|
738
746
|
}
|
|
739
747
|
|
|
740
|
-
export declare type ThemeId = 'default' | 'warm' | 'cool' | 'mono' | 'engineering' | 'workbench' | 'tactical';
|
|
748
|
+
export declare type ThemeId = 'default' | 'warm' | 'cool' | 'mono' | 'engineering' | 'workbench' | 'tactical' | 'command';
|
|
741
749
|
|
|
742
750
|
export declare const THEMES: Record<ThemeId, Theme>;
|
|
743
751
|
|
|
@@ -831,10 +839,13 @@ export declare function useEditorState(): {
|
|
|
831
839
|
template: string;
|
|
832
840
|
zoom: number;
|
|
833
841
|
viewMode: string;
|
|
834
|
-
themeId:
|
|
842
|
+
themeId: string;
|
|
835
843
|
colorMode: string;
|
|
836
844
|
};
|
|
837
845
|
|
|
846
|
+
/** Returns the active theme's brand spec (typography, node shape, connector treatment). */
|
|
847
|
+
export declare function useResolvedBrand(): BrandSpec;
|
|
848
|
+
|
|
838
849
|
/** Returns the resolved theme palette (light or dark) for the current theme and color mode. */
|
|
839
850
|
export declare function useResolvedTheme(): {
|
|
840
851
|
palette: ColorPalette;
|
|
@@ -846,7 +857,7 @@ export declare function useResolvedTheme(): {
|
|
|
846
857
|
};
|
|
847
858
|
};
|
|
848
859
|
|
|
849
|
-
export declare function useThemeId():
|
|
860
|
+
export declare function useThemeId(): string;
|
|
850
861
|
|
|
851
862
|
export declare function useViewMode(): string;
|
|
852
863
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arach/arc",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "bun@1.3.11",
|
|
6
6
|
"workspaces": [
|
|
7
7
|
"packages/*"
|
|
8
8
|
],
|
|
9
|
-
"description": "
|
|
9
|
+
"description": "Diagrams as code for React — design, render, and export typed architecture diagrams",
|
|
10
10
|
"author": "Arach Tchoupani",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"repository": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"diagram",
|
|
18
18
|
"editor",
|
|
19
19
|
"architecture",
|
|
20
|
+
"diagrams-as-code",
|
|
20
21
|
"visualization",
|
|
21
22
|
"react",
|
|
22
23
|
"isometric"
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"dependencies": {
|
|
62
63
|
"@arach/dewey": "^0.2.0",
|
|
63
64
|
"@base-ui/react": "^1.0.0",
|
|
65
|
+
"hudsonkit": "^0.3.3",
|
|
64
66
|
"js-yaml": "^4.1.1",
|
|
65
67
|
"react": "^19.2.0",
|
|
66
68
|
"react-dom": "^19.2.0",
|