@dforge-core/diagram 0.0.5 → 0.0.7

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 CHANGED
@@ -5,6 +5,23 @@ All notable changes to `@dforge-core/diagram` are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.6] — 2026-09-22
9
+
10
+ ### Added
11
+
12
+ - **Undo/redo for layout edits** in `SimpleDiagram`: node moves, connector reshapes and
13
+ resets. Cmd/Ctrl+Z, Shift+Cmd/Ctrl+Z (or Ctrl+Y), plus toolbar buttons.
14
+ `DiagramTranslations` gains two required keys, `undo` and `redo`.
15
+
16
+ ### Fixed
17
+
18
+ - **Connectors between vertically stacked nodes no longer cut through a node.** A gap
19
+ wider than 12px (was 30px) is now used for the route; when nodes do overlap, a stub
20
+ moves outside both nodes only if it would otherwise land inside the other one.
21
+
22
+ 0.0.5 was published with an unresolved `workspace:*` dependency and cannot be installed
23
+ outside this monorepo. Use 0.0.6.
24
+
8
25
  ## [0.0.4] — 2026-09-14
9
26
 
10
27
  ### Fixed
@@ -50,7 +50,9 @@
50
50
  </div>
51
51
 
52
52
  <style>
53
+ /* Fixed heights: 2px border + 28px header = the layout's 30px header, 22px rows (model-graph.ts, simple-layout.ts) */
53
54
  .entity-node {
55
+ box-sizing: border-box;
54
56
  background: var(--bs-body-bg, #fff);
55
57
  border: 2px solid var(--module-color, #6c757d);
56
58
  border-radius: 6px;
@@ -65,7 +67,8 @@
65
67
  display: flex;
66
68
  align-items: center;
67
69
  gap: 0.35rem;
68
- padding: 0.35rem 0.5rem;
70
+ height: 28px;
71
+ padding: 0 0.5rem;
69
72
  background: var(--module-color, #6c757d);
70
73
  color: #fff;
71
74
  border-radius: 3px 3px 0 0;
@@ -95,7 +98,9 @@
95
98
  display: flex;
96
99
  align-items: center;
97
100
  gap: 0.3rem;
98
- padding: 0.15rem 0.5rem;
101
+ box-sizing: border-box;
102
+ height: 22px;
103
+ padding: 0 0.5rem;
99
104
  border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
100
105
  position: relative;
101
106
  }
@@ -22,7 +22,7 @@ export const MODULE_COLORS = [
22
22
  ];
23
23
  export const getModuleColor = (index) => MODULE_COLORS[index % MODULE_COLORS.length];
24
24
  const NODE_WIDTH = 260;
25
- const NODE_HEIGHT_BASE = 60;
25
+ const NODE_HEIGHT_BASE = 32; // 30px header (incl. top border) + 2px bottom border
26
26
  const ROW_HEIGHT = 22;
27
27
  /**
28
28
  * Build a diagram graph from the given modules.
package/package.json CHANGED
@@ -1,60 +1,59 @@
1
1
  {
2
- "name": "@dforge-core/diagram",
3
- "version": "0.0.5",
4
- "description": "Entity-relationship and workspace diagram components for dForge models. Standalone Svelte 5 library with no dForge runtime dependencies.",
5
- "license": "MIT",
6
- "author": "dForge",
7
- "homepage": "https://github.com/iash44/dForge-core/tree/main/clients/packages/diagram#readme",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/iash44/dForge-core.git",
11
- "directory": "clients/packages/diagram"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/iash44/dForge-core/issues"
15
- },
16
- "keywords": [
17
- "svelte",
18
- "diagram",
19
- "erd",
20
- "entity-relationship",
21
- "dforge",
22
- "visualization"
23
- ],
24
- "publishConfig": {
25
- "access": "public"
26
- },
27
- "type": "module",
28
- "svelte": "./dist/index.js",
29
- "types": "./dist/index.d.ts",
30
- "exports": {
31
- ".": {
32
- "source": "./src/lib/index.ts",
33
- "types": "./dist/index.d.ts",
34
- "svelte": "./dist/index.js",
35
- "default": "./dist/index.js"
36
- }
37
- },
38
- "files": [
39
- "dist",
40
- "CHANGELOG.md"
41
- ],
42
- "scripts": {
43
- "build": "svelte-package",
44
- "dev": "svelte-package --watch",
45
- "prepack": "pnpm build",
46
- "package": "pnpm pack"
47
- },
48
- "dependencies": {
49
- "@dforge-core/metadata": "workspace:*"
50
- },
51
- "peerDependencies": {
52
- "svelte": "^5.0.0"
53
- },
54
- "devDependencies": {
55
- "@sveltejs/package": "^2.5.8",
56
- "@sveltejs/vite-plugin-svelte": "^7.3.0",
57
- "svelte": "^5.56.8",
58
- "typescript": "^6.0.3"
59
- }
60
- }
2
+ "name": "@dforge-core/diagram",
3
+ "version": "0.0.7",
4
+ "description": "Entity-relationship and workspace diagram components for dForge models. Standalone Svelte 5 library with no dForge runtime dependencies.",
5
+ "license": "MIT",
6
+ "author": "dForge",
7
+ "homepage": "https://github.com/iash44/dForge-core/tree/main/clients/packages/diagram#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/iash44/dForge-core.git",
11
+ "directory": "clients/packages/diagram"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/iash44/dForge-core/issues"
15
+ },
16
+ "keywords": [
17
+ "svelte",
18
+ "diagram",
19
+ "erd",
20
+ "entity-relationship",
21
+ "dforge",
22
+ "visualization"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "type": "module",
28
+ "svelte": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "source": "./src/lib/index.ts",
33
+ "types": "./dist/index.d.ts",
34
+ "svelte": "./dist/index.js",
35
+ "default": "./dist/index.js"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "CHANGELOG.md"
41
+ ],
42
+ "dependencies": {
43
+ "@dforge-core/metadata": "0.0.29"
44
+ },
45
+ "peerDependencies": {
46
+ "svelte": "^5.0.0"
47
+ },
48
+ "devDependencies": {
49
+ "@sveltejs/package": "^2.5.8",
50
+ "@sveltejs/vite-plugin-svelte": "^7.3.0",
51
+ "svelte": "^5.56.8",
52
+ "typescript": "^6.0.3"
53
+ },
54
+ "scripts": {
55
+ "build": "svelte-package",
56
+ "dev": "svelte-package --watch",
57
+ "package": "pnpm pack"
58
+ }
59
+ }