@nice2dev/ui-diagrams 1.1.6 → 1.1.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
@@ -1,5 +1,53 @@
1
1
  # @nice2dev/ui-diagrams — Changelog
2
2
 
3
+ ## 1.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Close the three items left open in the 1.1.6 response to OmniVerk.
8
+
9
+ **Every value control works without state in the parent.** The `audit-controllable-state` gate
10
+ counted 87 value props that were required with no `default*`, so the control could not render from a
11
+ manifest without data. It now reports 0 and gates CI at `--max=0`. 48 controls gained `default*` props
12
+ through `useControllableState` (existing `value` + handler call sites behave as before); 33 read-only
13
+ data lists are optional with a stable empty default; 4 props paired with a handler only by name are
14
+ optional; `NiceWhiteboard` and `NiceMetricsDashboard` render an empty state until a session or
15
+ dashboard arrives. Additive API only — nothing renamed or removed.
16
+
17
+ - `NicePivotGrid.fields`, `NiceScheduler.events` and `NiceGitHooks.hooks` are controlled only together
18
+ with their change handler, as `NiceScheduler` already documented for `currentDate`/`view`. A bare
19
+ prop stays an initial value; prop plus handler now always wins (later prop updates used to be
20
+ ignored). `NiceGitHooks.onHookChange` is now called; `onHooksChange` and
21
+ `NiceLocaleManager.onTranslationsChange` are new.
22
+ - `NiceCodeEditor` / `NiceCodeDiffEditor` no longer report a value written from the prop back through
23
+ `onChange`, and call the latest handler rather than the one captured at mount.
24
+ - `NiceHtmlEditor` no longer rewrites its content on every render (React 19 compares the
25
+ `dangerouslySetInnerHTML` object, not its string), which moved the caret; the HTML source and
26
+ Markdown views can be closed again.
27
+ - Selections seeded once from the first item (access manager, automation/scene editors, git diff
28
+ viewer, ribbon, setup wizard) follow data that arrives after mount.
29
+ - `useControllableState`: new `fallbackValue` seed that never triggers the value/default clash warning;
30
+ two functional updates in one tick no longer lose the first; `onChange` is called with one argument
31
+ when there is no meta. `UseControllableStateOptions` is now a union type alias.
32
+
33
+ **`--nice-*` is the source of truth for design tokens.** Controls read only `--nice-*` (9,225 reads in
34
+ 339 files). The unprefixed names (`--color-primary`, `--bg-primary`, `--text-muted`, …) stay declared
35
+ as aliases pointing at the Nice tokens, so reading them works, but setting them no longer repaints Nice
36
+ controls. Apps that relied on that can import `@nice2dev/ui/css/legacy-bg-text-aliases.css` after
37
+ `style.css` (removed in 1.2), or set `--nice-color-primary` and friends directly. 13 tokens that were
38
+ read and never declared (`--color-danger`, `--text-on-primary`, `--color-white`, …) are defined; the
39
+ dark blocks define the canonical names, so `.nice-dark` on `<body>` no longer leaves them on light
40
+ values; `--nice-primary-bg` and `--nice-selected-bg` are a primary tint instead of falling through to
41
+ grey. New gate `audit-token-names`.
42
+
43
+ **Node ESM and `require()`.** `@nice2dev/spatial-core` imports from plain Node ESM (51 relative
44
+ specifiers gained extensions, enforced by `nodenext`), and so does `@nice2dev/ui-buildings`, which
45
+ failed through it. `require()` works for `ui-3d`, `ui-graphics` and `game-engine`. The package-exports
46
+ gate now loads every entry in both module systems.
47
+
48
+ **Hygiene.** Sources are prettier-formatted and CI gates on it; 640 stale `.d.ts` files were removed
49
+ from source trees (never published).
50
+
3
51
  ## 1.1.6
4
52
 
5
53
  No changes in this release.
@@ -9,7 +9,7 @@ export interface NiceI18nProviderProps {
9
9
  overrides?: Record<string, string>;
10
10
  children: ReactNode;
11
11
  }
12
- export declare function NiceI18nProvider({ locale, overrides, children, }: NiceI18nProviderProps): React.FunctionComponentElement<React.ProviderProps<I18nContextValue>>;
12
+ export declare function NiceI18nProvider({ locale, overrides, children }: NiceI18nProviderProps): React.FunctionComponentElement<React.ProviderProps<I18nContextValue>>;
13
13
  export declare function useNiceTranslation(): {
14
14
  t: NiceTranslateFn;
15
15
  locale: string;
package/dist/index.mjs CHANGED
@@ -433,11 +433,7 @@ const Nt = {
433
433
  locale: "en",
434
434
  t: (r, e) => e ?? r
435
435
  });
436
- function Ft({
437
- locale: r = "en",
438
- overrides: e,
439
- children: t
440
- }) {
436
+ function Ft({ locale: r = "en", overrides: e, children: t }) {
441
437
  const i = ie(() => {
442
438
  const a = { ...Nt.en, ...Nt[r], ...e };
443
439
  return { locale: r, t: (s, n) => a[s] ?? n ?? s };
@@ -459,15 +455,9 @@ function ko(r) {
459
455
  return { ok: !1, errors: ["Root must be a JSON object"] };
460
456
  const i = t;
461
457
  if (i.version !== "1.0" && e.push(`Unsupported version "${String(i.version)}", expected "1.0"`), (typeof i.id != "string" || i.id.length === 0) && e.push('Missing or invalid "id" field'), typeof i.title != "string" && e.push('Missing or invalid "title" field'), Array.isArray(i.nodes) || e.push('Missing or invalid "nodes" array'), Array.isArray(i.edges) || e.push('Missing or invalid "edges" array'), Array.isArray(i.nodes) && Array.isArray(i.edges)) {
462
- const a = new Set(
463
- i.nodes.map((o) => o.id).filter(Boolean)
464
- );
458
+ const a = new Set(i.nodes.map((o) => o.id).filter(Boolean));
465
459
  for (const o of i.edges)
466
- o.sourceNodeId && !a.has(o.sourceNodeId) && e.push(
467
- `Edge "${o.id}" references non-existent source node "${o.sourceNodeId}"`
468
- ), o.targetNodeId && !a.has(o.targetNodeId) && e.push(
469
- `Edge "${o.id}" references non-existent target node "${o.targetNodeId}"`
470
- );
460
+ o.sourceNodeId && !a.has(o.sourceNodeId) && e.push(`Edge "${o.id}" references non-existent source node "${o.sourceNodeId}"`), o.targetNodeId && !a.has(o.targetNodeId) && e.push(`Edge "${o.id}" references non-existent target node "${o.targetNodeId}"`);
471
461
  }
472
462
  return e.length > 0 ? { ok: !1, errors: e } : { ok: !0, document: t, errors: [] };
473
463
  }
@@ -1024,7 +1014,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1024
1014
  category: "corporate",
1025
1015
  themeSource: "Light",
1026
1016
  config: fe(
1027
- { background: "var(--nice-bg, #fff)", gridColor: "#e2e8f020", gridSize: 20, selectionColor: "var(--nice-primary, #3b82f6)" },
1017
+ {
1018
+ background: "var(--nice-bg, #fff)",
1019
+ gridColor: "#e2e8f020",
1020
+ gridSize: 20,
1021
+ selectionColor: "var(--nice-primary, #3b82f6)"
1022
+ },
1028
1023
  ue({}),
1029
1024
  Ne
1030
1025
  )
@@ -1048,7 +1043,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1048
1043
  category: "dark",
1049
1044
  themeSource: "Dark",
1050
1045
  config: fe(
1051
- { background: "var(--nice-text, #0f172a)", gridColor: "var(--nice-text, #334155)", gridSize: 20, selectionColor: "var(--nice-primary-light, #60a5fa)" },
1046
+ {
1047
+ background: "var(--nice-text, #0f172a)",
1048
+ gridColor: "var(--nice-text, #334155)",
1049
+ gridSize: 20,
1050
+ selectionColor: "var(--nice-primary-light, #60a5fa)"
1051
+ },
1052
1052
  Nr,
1053
1053
  Ne,
1054
1054
  { shadow: !1 },
@@ -1070,7 +1070,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1070
1070
  category: "corporate",
1071
1071
  themeSource: "Blue",
1072
1072
  config: fe(
1073
- { background: "#f0f5ff", gridColor: "#93c5fd20", gridSize: 20, selectionColor: "var(--nice-primary-dark, #1d4ed8)" },
1073
+ {
1074
+ background: "#f0f5ff",
1075
+ gridColor: "#93c5fd20",
1076
+ gridSize: 20,
1077
+ selectionColor: "var(--nice-primary-dark, #1d4ed8)"
1078
+ },
1074
1079
  $r,
1075
1080
  Ne,
1076
1081
  { borderWidth: 2, borderRadius: 6 },
@@ -1095,7 +1100,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1095
1100
  name: "Neon Glow",
1096
1101
  category: "dark",
1097
1102
  config: fe(
1098
- { background: "#0a0a1a", gridColor: "#00ff8810", gridSize: 20, selectionColor: "var(--nice-success, #00ff88)" },
1103
+ {
1104
+ background: "#0a0a1a",
1105
+ gridColor: "#00ff8810",
1106
+ gridSize: 20,
1107
+ selectionColor: "var(--nice-success, #00ff88)"
1108
+ },
1099
1109
  Ar,
1100
1110
  vt,
1101
1111
  {
@@ -1134,7 +1144,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1134
1144
  name: "Cyberpunk",
1135
1145
  category: "dark",
1136
1146
  config: fe(
1137
- { background: "#0d001a", gridColor: "#ff2d9510", gridSize: 24, selectionColor: "var(--nice-accent-pink, #ff2d95)" },
1147
+ {
1148
+ background: "#0d001a",
1149
+ gridColor: "#ff2d9510",
1150
+ gridSize: 24,
1151
+ selectionColor: "var(--nice-accent-pink, #ff2d95)"
1152
+ },
1138
1153
  Tr,
1139
1154
  vt,
1140
1155
  {
@@ -1171,7 +1186,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1171
1186
  name: "Technical Blueprint",
1172
1187
  category: "technical",
1173
1188
  config: fe(
1174
- { background: "#0a1929", gridColor: "#4da6ff30", gridSize: 16, selectionColor: "var(--nice-bg, #fff)" },
1189
+ {
1190
+ background: "#0a1929",
1191
+ gridColor: "#4da6ff30",
1192
+ gridSize: 16,
1193
+ selectionColor: "var(--nice-bg, #fff)"
1194
+ },
1175
1195
  Or,
1176
1196
  vt,
1177
1197
  {
@@ -1209,7 +1229,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1209
1229
  name: "Pastel Dream",
1210
1230
  category: "pastel",
1211
1231
  config: fe(
1212
- { background: "#fefcff", gridColor: "#e2d8f420", gridSize: 20, selectionColor: "var(--nice-accent, #a78bfa)" },
1232
+ {
1233
+ background: "#fefcff",
1234
+ gridColor: "#e2d8f420",
1235
+ gridSize: 20,
1236
+ selectionColor: "var(--nice-accent, #a78bfa)"
1237
+ },
1213
1238
  Er,
1214
1239
  "'Nunito', 'Quicksand', sans-serif",
1215
1240
  { borderColor: "var(--nice-accent, #c4b5fd)", borderWidth: 2, borderRadius: 16, shadow: !0 },
@@ -1235,13 +1260,22 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1235
1260
  name: "Nature Forest",
1236
1261
  category: "nature",
1237
1262
  config: fe(
1238
- { background: "#f0fdf4", gridColor: "#a7d7c520", gridSize: 20, selectionColor: "var(--nice-success, #059669)" },
1263
+ {
1264
+ background: "#f0fdf4",
1265
+ gridColor: "#a7d7c520",
1266
+ gridSize: 20,
1267
+ selectionColor: "var(--nice-success, #059669)"
1268
+ },
1239
1269
  Wr,
1240
1270
  Ne,
1241
1271
  { borderColor: "var(--nice-success, #059669)", borderRadius: 12 },
1242
1272
  { strokeColor: "var(--nice-success-light, #6ee7b7)" },
1243
1273
  { backgroundColor: "#05966910", borderColor: "var(--nice-success-light, #6ee7b7)" },
1244
- { liquidColor: "var(--nice-success, #059669)", liquidColorEnd: "var(--nice-success-light, #6ee7b7)", particleColor: "var(--nice-warning, #f59e0b)" }
1274
+ {
1275
+ liquidColor: "var(--nice-success, #059669)",
1276
+ liquidColorEnd: "var(--nice-success-light, #6ee7b7)",
1277
+ particleColor: "var(--nice-warning, #f59e0b)"
1278
+ }
1245
1279
  )
1246
1280
  }, qr = ue({
1247
1281
  primary: "var(--nice-success, #00ff00)",
@@ -1258,7 +1292,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1258
1292
  name: "Retro Terminal",
1259
1293
  category: "retro",
1260
1294
  config: fe(
1261
- { background: "#000800", gridColor: "#00ff0010", gridSize: 16, selectionColor: "var(--nice-success, #00ff00)" },
1295
+ {
1296
+ background: "#000800",
1297
+ gridColor: "#00ff0010",
1298
+ gridSize: 16,
1299
+ selectionColor: "var(--nice-success, #00ff00)"
1300
+ },
1262
1301
  qr,
1263
1302
  "'Courier New', 'Fira Code', monospace",
1264
1303
  {
@@ -1272,7 +1311,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1272
1311
  },
1273
1312
  { strokeColor: "#00ff0060", strokeWidth: 1 },
1274
1313
  {},
1275
- { glowColor: "var(--nice-success, #00ff00)", glowIntensity: 0.6, particleColor: "var(--nice-success, #00ff00)", liquidColor: "var(--nice-success, #00ff00)" }
1314
+ {
1315
+ glowColor: "var(--nice-success, #00ff00)",
1316
+ glowIntensity: 0.6,
1317
+ particleColor: "var(--nice-success, #00ff00)",
1318
+ liquidColor: "var(--nice-success, #00ff00)"
1319
+ }
1276
1320
  )
1277
1321
  }, Vr = ue({
1278
1322
  primary: "#0000ff",
@@ -1290,10 +1334,20 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1290
1334
  category: "accessibility",
1291
1335
  themeSource: "High Contrast",
1292
1336
  config: fe(
1293
- { background: "var(--nice-bg, #fff)", gridColor: "#00000020", gridSize: 20, selectionColor: "#0000ff" },
1337
+ {
1338
+ background: "var(--nice-bg, #fff)",
1339
+ gridColor: "#00000020",
1340
+ gridSize: 20,
1341
+ selectionColor: "#0000ff"
1342
+ },
1294
1343
  Vr,
1295
1344
  "Arial, sans-serif",
1296
- { borderColor: "var(--nice-text, #000000)", borderWidth: 3, fontColor: "var(--nice-text, #000000)", fontWeight: "bold" },
1345
+ {
1346
+ borderColor: "var(--nice-text, #000000)",
1347
+ borderWidth: 3,
1348
+ fontColor: "var(--nice-text, #000000)",
1349
+ fontWeight: "bold"
1350
+ },
1297
1351
  { strokeColor: "var(--nice-text, #000000)", strokeWidth: 3 },
1298
1352
  { borderColor: "var(--nice-text, #000000)", borderWidth: 2 }
1299
1353
  )
@@ -1317,7 +1371,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1317
1371
  category: "theme-based",
1318
1372
  themeSource: "Material",
1319
1373
  config: fe(
1320
- { background: "var(--nice-bg-secondary, #fafafa)", gridColor: "#e0e0e020", gridSize: 20, selectionColor: "var(--nice-primary-hover, #1976d2)" },
1374
+ {
1375
+ background: "var(--nice-bg-secondary, #fafafa)",
1376
+ gridColor: "#e0e0e020",
1377
+ gridSize: 20,
1378
+ selectionColor: "var(--nice-primary-hover, #1976d2)"
1379
+ },
1321
1380
  Br,
1322
1381
  "'Roboto', 'Noto Sans', sans-serif",
1323
1382
  { borderRadius: 4, borderWidth: 0, shadow: !0 },
@@ -1369,13 +1428,26 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1369
1428
  name: "Sunset Warm",
1370
1429
  category: "creative",
1371
1430
  config: fe(
1372
- { background: "#fffde7", gridColor: "#ffccbc20", gridSize: 20, selectionColor: "var(--nice-warning-dark, #e65100)" },
1431
+ {
1432
+ background: "#fffde7",
1433
+ gridColor: "#ffccbc20",
1434
+ gridSize: 20,
1435
+ selectionColor: "var(--nice-warning-dark, #e65100)"
1436
+ },
1373
1437
  jr,
1374
1438
  Ne,
1375
- { borderColor: "#ff9e80", gradientColor: "var(--nice-warning-bg, #fff3e0)", gradientDirection: "vertical" },
1439
+ {
1440
+ borderColor: "#ff9e80",
1441
+ gradientColor: "var(--nice-warning-bg, #fff3e0)",
1442
+ gradientDirection: "vertical"
1443
+ },
1376
1444
  { strokeColor: "#ff9e80" },
1377
1445
  {},
1378
- { liquidColor: "var(--nice-warning-dark, #e65100)", liquidColorEnd: "#ffd600", particleColor: "#ffd600" }
1446
+ {
1447
+ liquidColor: "var(--nice-warning-dark, #e65100)",
1448
+ liquidColorEnd: "#ffd600",
1449
+ particleColor: "#ffd600"
1450
+ }
1379
1451
  )
1380
1452
  }, Kr = ue({
1381
1453
  primary: "#006064",
@@ -1441,7 +1513,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1441
1513
  name: "Wireframe",
1442
1514
  category: "technical",
1443
1515
  config: fe(
1444
- { background: "var(--nice-bg, #fff)", gridColor: "#00000008", gridSize: 16, selectionColor: "#ff6600" },
1516
+ {
1517
+ background: "var(--nice-bg, #fff)",
1518
+ gridColor: "#00000008",
1519
+ gridSize: 16,
1520
+ selectionColor: "#ff6600"
1521
+ },
1445
1522
  ti,
1446
1523
  "'Balsamiq Sans', 'Comic Sans MS', cursive",
1447
1524
  {
@@ -1479,7 +1556,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1479
1556
  name: "Mint Fresh",
1480
1557
  category: "nature",
1481
1558
  config: fe(
1482
- { background: "var(--nice-success-bg, #e8f5e9)", gridColor: "#a7ffeb20", gridSize: 20, selectionColor: "#00bfa5" },
1559
+ {
1560
+ background: "var(--nice-success-bg, #e8f5e9)",
1561
+ gridColor: "#a7ffeb20",
1562
+ gridSize: 20,
1563
+ selectionColor: "#00bfa5"
1564
+ },
1483
1565
  ii,
1484
1566
  Ne,
1485
1567
  {
@@ -1508,10 +1590,20 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1508
1590
  name: "Monochrome",
1509
1591
  category: "corporate",
1510
1592
  config: fe(
1511
- { background: "var(--nice-bg-secondary, #fafafa)", gridColor: "#e0e0e020", gridSize: 20, selectionColor: "#424242" },
1593
+ {
1594
+ background: "var(--nice-bg-secondary, #fafafa)",
1595
+ gridColor: "#e0e0e020",
1596
+ gridSize: 20,
1597
+ selectionColor: "#424242"
1598
+ },
1512
1599
  oi,
1513
1600
  Ne,
1514
- { borderColor: "var(--nice-text-secondary, #9e9e9e)", borderWidth: 1, shadow: !0, borderRadius: 4 },
1601
+ {
1602
+ borderColor: "var(--nice-text-secondary, #9e9e9e)",
1603
+ borderWidth: 1,
1604
+ shadow: !0,
1605
+ borderRadius: 4
1606
+ },
1515
1607
  { strokeColor: "var(--nice-text-secondary, #9e9e9e)", strokeWidth: 1.5 }
1516
1608
  )
1517
1609
  }, si = ue({
@@ -1533,7 +1625,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1533
1625
  name: "Candy Pop",
1534
1626
  category: "creative",
1535
1627
  config: fe(
1536
- { background: "#fff0f5", gridColor: "#f8bbd020", gridSize: 20, selectionColor: "var(--nice-accent-pink, #e91e63)" },
1628
+ {
1629
+ background: "#fff0f5",
1630
+ gridColor: "#f8bbd020",
1631
+ gridSize: 20,
1632
+ selectionColor: "var(--nice-accent-pink, #e91e63)"
1633
+ },
1537
1634
  si,
1538
1635
  "'Quicksand', 'Nunito', sans-serif",
1539
1636
  {
@@ -1545,7 +1642,11 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1545
1642
  },
1546
1643
  { strokeColor: "#f48fb1", strokeWidth: 3 },
1547
1644
  { borderRadius: 20, borderColor: "#f48fb1" },
1548
- { glowColor: "var(--nice-accent-pink, #e91e63)", glowIntensity: 0.5, particleColor: "var(--nice-warning, #ffeb3b)" }
1645
+ {
1646
+ glowColor: "var(--nice-accent-pink, #e91e63)",
1647
+ glowIntensity: 0.5,
1648
+ particleColor: "var(--nice-warning, #ffeb3b)"
1649
+ }
1549
1650
  )
1550
1651
  }, li = ue({
1551
1652
  primary: "var(--nice-text-secondary, #475569)",
@@ -1562,7 +1663,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1562
1663
  name: "Slate Professional",
1563
1664
  category: "corporate",
1564
1665
  config: fe(
1565
- { background: "var(--nice-bg-secondary, #f8fafc)", gridColor: "#cbd5e120", gridSize: 20, selectionColor: "var(--nice-text-secondary, #475569)" },
1666
+ {
1667
+ background: "var(--nice-bg-secondary, #f8fafc)",
1668
+ gridColor: "#cbd5e120",
1669
+ gridSize: 20,
1670
+ selectionColor: "var(--nice-text-secondary, #475569)"
1671
+ },
1566
1672
  li,
1567
1673
  "'Inter', system-ui, sans-serif",
1568
1674
  { borderColor: "var(--nice-border, #cbd5e1)", borderWidth: 1, borderRadius: 6, shadow: !0 },
@@ -1588,7 +1694,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1588
1694
  name: "Aurora Borealis",
1589
1695
  category: "dark",
1590
1696
  config: fe(
1591
- { background: "#0f0b2e", gridColor: "#7c3aed15", gridSize: 24, selectionColor: "var(--nice-accent, #a78bfa)" },
1697
+ {
1698
+ background: "#0f0b2e",
1699
+ gridColor: "#7c3aed15",
1700
+ gridSize: 24,
1701
+ selectionColor: "var(--nice-accent, #a78bfa)"
1702
+ },
1592
1703
  ui,
1593
1704
  Ne,
1594
1705
  {
@@ -1656,7 +1767,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1656
1767
  name: "Infographic Bold",
1657
1768
  category: "creative",
1658
1769
  config: fe(
1659
- { background: "#eceff1", gridColor: "#b0bec520", gridSize: 24, selectionColor: "var(--nice-danger, #ff5722)" },
1770
+ {
1771
+ background: "#eceff1",
1772
+ gridColor: "#b0bec520",
1773
+ gridSize: 24,
1774
+ selectionColor: "var(--nice-danger, #ff5722)"
1775
+ },
1660
1776
  gi,
1661
1777
  "'Montserrat', 'Roboto', sans-serif",
1662
1778
  {
@@ -1686,7 +1802,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1686
1802
  name: "Midnight Purple",
1687
1803
  category: "dark",
1688
1804
  config: fe(
1689
- { background: "#0f0720", gridColor: "#9333ea10", gridSize: 20, selectionColor: "var(--nice-accent, #c084fc)" },
1805
+ {
1806
+ background: "#0f0720",
1807
+ gridColor: "#9333ea10",
1808
+ gridSize: 20,
1809
+ selectionColor: "var(--nice-accent, #c084fc)"
1810
+ },
1690
1811
  yi,
1691
1812
  Ne,
1692
1813
  {
@@ -1698,7 +1819,12 @@ const Ne = "'Inter', system-ui, sans-serif", vt = "'Fira Code', 'Cascadia Code',
1698
1819
  },
1699
1820
  { strokeColor: "#9333ea80", strokeWidth: 2 },
1700
1821
  {},
1701
- { glowColor: "#9333ea", glowIntensity: 0.6, liquidColor: "#9333ea", liquidColorEnd: "var(--nice-accent, #c084fc)" }
1822
+ {
1823
+ glowColor: "#9333ea",
1824
+ glowIntensity: 0.6,
1825
+ liquidColor: "#9333ea",
1826
+ liquidColorEnd: "var(--nice-accent, #c084fc)"
1827
+ }
1702
1828
  )
1703
1829
  }, wt = [
1704
1830
  Sr,
@@ -3077,7 +3203,15 @@ const _i = 0.1, Mi = 5, it = 8, gt = [
3077
3203
  markerWidth: "8",
3078
3204
  markerHeight: "8",
3079
3205
  orient: "auto-start-reverse",
3080
- children: /* @__PURE__ */ d("path", { d: "M 0 0 L 10 5 L 0 10", fill: "none", stroke: "var(--nice-text, #333)", strokeWidth: "1.5" })
3206
+ children: /* @__PURE__ */ d(
3207
+ "path",
3208
+ {
3209
+ d: "M 0 0 L 10 5 L 0 10",
3210
+ fill: "none",
3211
+ stroke: "var(--nice-text, #333)",
3212
+ strokeWidth: "1.5"
3213
+ }
3214
+ )
3081
3215
  }
3082
3216
  ),
3083
3217
  /* @__PURE__ */ d(
@@ -3160,15 +3294,45 @@ const _i = 0.1, Mi = 5, it = 8, gt = [
3160
3294
  Array.from({ length: 100 }, (f, k) => {
3161
3295
  const $ = k * $e * i.zoom + i.x, D = k * $e;
3162
3296
  return $ > 20 ? /* @__PURE__ */ x("g", { children: [
3163
- /* @__PURE__ */ d("line", { x1: $, y1: "0", x2: $, y2: "20", stroke: "var(--nice-text-muted, #999)", strokeWidth: "0.5" }),
3297
+ /* @__PURE__ */ d(
3298
+ "line",
3299
+ {
3300
+ x1: $,
3301
+ y1: "0",
3302
+ x2: $,
3303
+ y2: "20",
3304
+ stroke: "var(--nice-text-muted, #999)",
3305
+ strokeWidth: "0.5"
3306
+ }
3307
+ ),
3164
3308
  /* @__PURE__ */ d("text", { x: $ + 2, y: "14", fontSize: "9", fill: "var(--nice-text-secondary, #666)", children: D })
3165
3309
  ] }, `rx${k}`) : null;
3166
3310
  }),
3167
3311
  Array.from({ length: 100 }, (f, k) => {
3168
3312
  const $ = k * $e * i.zoom + i.y, D = k * $e;
3169
3313
  return $ > 20 ? /* @__PURE__ */ x("g", { children: [
3170
- /* @__PURE__ */ d("line", { x1: "0", y1: $, x2: "20", y2: $, stroke: "var(--nice-text-muted, #999)", strokeWidth: "0.5" }),
3171
- /* @__PURE__ */ d("text", { x: "2", y: $ - 2, fontSize: "9", fill: "var(--nice-text-secondary, #666)", writingMode: "tb", children: D })
3314
+ /* @__PURE__ */ d(
3315
+ "line",
3316
+ {
3317
+ x1: "0",
3318
+ y1: $,
3319
+ x2: "20",
3320
+ y2: $,
3321
+ stroke: "var(--nice-text-muted, #999)",
3322
+ strokeWidth: "0.5"
3323
+ }
3324
+ ),
3325
+ /* @__PURE__ */ d(
3326
+ "text",
3327
+ {
3328
+ x: "2",
3329
+ y: $ - 2,
3330
+ fontSize: "9",
3331
+ fill: "var(--nice-text-secondary, #666)",
3332
+ writingMode: "tb",
3333
+ children: D
3334
+ }
3335
+ )
3172
3336
  ] }, `ry${k}`) : null;
3173
3337
  })
3174
3338
  ] }),
@@ -3272,7 +3436,17 @@ const _i = 0.1, Mi = 5, it = 8, gt = [
3272
3436
  strokeWidth: 1
3273
3437
  }
3274
3438
  ),
3275
- /* @__PURE__ */ d("text", { x: z - 14, y: F + 3, textAnchor: "middle", fontSize: "12", fill: "var(--nice-text-secondary, #666)", children: "▼" })
3439
+ /* @__PURE__ */ d(
3440
+ "text",
3441
+ {
3442
+ x: z - 14,
3443
+ y: F + 3,
3444
+ textAnchor: "middle",
3445
+ fontSize: "12",
3446
+ fill: "var(--nice-text-secondary, #666)",
3447
+ children: "▼"
3448
+ }
3449
+ )
3276
3450
  ]
3277
3451
  }
3278
3452
  )
@@ -3395,7 +3569,17 @@ const _i = 0.1, Mi = 5, it = 8, gt = [
3395
3569
  fillOpacity: 0.85
3396
3570
  }
3397
3571
  ),
3398
- /* @__PURE__ */ d("text", { x: ye, y: Me - 2, textAnchor: "start", fontSize: "11", fill: "var(--nice-text-secondary, #555)", children: f.label })
3572
+ /* @__PURE__ */ d(
3573
+ "text",
3574
+ {
3575
+ x: ye,
3576
+ y: Me - 2,
3577
+ textAnchor: "start",
3578
+ fontSize: "11",
3579
+ fill: "var(--nice-text-secondary, #555)",
3580
+ children: f.label
3581
+ }
3582
+ )
3399
3583
  ] });
3400
3584
  })()
3401
3585
  ] }, f.id);
@@ -3742,7 +3926,12 @@ const Si = 180, Ni = 120, Vt = ({
3742
3926
  className: `nice-diagram-minimap ${c ?? ""}`,
3743
3927
  width: s,
3744
3928
  height: n,
3745
- style: { border: "1px solid var(--nice-border, #ccc)", background: "var(--nice-bg, #fff)", borderRadius: 4, cursor: "pointer" },
3929
+ style: {
3930
+ border: "1px solid var(--nice-border, #ccc)",
3931
+ background: "var(--nice-bg, #fff)",
3932
+ borderRadius: 4,
3933
+ cursor: "pointer"
3934
+ },
3746
3935
  onClick: h,
3747
3936
  children: [
3748
3937
  e.map((b) => {
@@ -3750,7 +3939,18 @@ const Si = 180, Ni = 120, Vt = ({
3750
3939
  if (!v || !y)
3751
3940
  return null;
3752
3941
  const S = (v.position.x + v.size.width / 2 - u.minX) * p, C = (v.position.y + v.size.height / 2 - u.minY) * p, N = (y.position.x + y.size.width / 2 - u.minX) * p, _ = (y.position.y + y.size.height / 2 - u.minY) * p;
3753
- return /* @__PURE__ */ d("line", { x1: S, y1: C, x2: N, y2: _, stroke: "var(--nice-text-muted, #aaa)", strokeWidth: 0.5 }, b.id);
3942
+ return /* @__PURE__ */ d(
3943
+ "line",
3944
+ {
3945
+ x1: S,
3946
+ y1: C,
3947
+ x2: N,
3948
+ y2: _,
3949
+ stroke: "var(--nice-text-muted, #aaa)",
3950
+ strokeWidth: 0.5
3951
+ },
3952
+ b.id
3953
+ );
3754
3954
  }),
3755
3955
  r.map((b) => /* @__PURE__ */ d(
3756
3956
  "rect",
@@ -3954,7 +4154,12 @@ const Ii = [
3954
4154
  "h4",
3955
4155
  {
3956
4156
  className: "nice-diagram-property-panel__section-title",
3957
- style: { fontSize: 12, marginTop: 12, marginBottom: 4, color: "var(--nice-text-secondary, #666)" },
4157
+ style: {
4158
+ fontSize: 12,
4159
+ marginTop: 12,
4160
+ marginBottom: 4,
4161
+ color: "var(--nice-text-secondary, #666)"
4162
+ },
3958
4163
  children: "Effects"
3959
4164
  }
3960
4165
  ),
@@ -4227,7 +4432,12 @@ const Ii = [
4227
4432
  "h4",
4228
4433
  {
4229
4434
  className: "nice-diagram-property-panel__section-title",
4230
- style: { fontSize: 12, marginTop: 12, marginBottom: 4, color: "var(--nice-text-secondary, #666)" },
4435
+ style: {
4436
+ fontSize: 12,
4437
+ marginTop: 12,
4438
+ marginBottom: 4,
4439
+ color: "var(--nice-text-secondary, #666)"
4440
+ },
4231
4441
  children: "Liquid Flow"
4232
4442
  }
4233
4443
  ),
@@ -5979,7 +6189,12 @@ const na = ({ document: r, onClose: e }) => {
5979
6189
  edgeColor: p = "var(--nice-text-muted, #94a3b8)",
5980
6190
  tooltip: m
5981
6191
  }) => {
5982
- const [h, b] = J(!1), v = ie(() => r || (e || t ? oa(e ?? [], t ?? []) : null), [r, e, t]), y = ie(() => v ? new Map(v.nodes.map((I) => [I.id, I])) : /* @__PURE__ */ new Map(), [v]), { bounds: S, scale: C, translateX: N, translateY: _ } = ie(() => {
6192
+ const [h, b] = J(!1), v = ie(() => r || (e || t ? oa(e ?? [], t ?? []) : null), [r, e, t]), y = ie(() => v ? new Map(v.nodes.map((I) => [I.id, I])) : /* @__PURE__ */ new Map(), [v]), {
6193
+ bounds: S,
6194
+ scale: C,
6195
+ translateX: N,
6196
+ translateY: _
6197
+ } = ie(() => {
5983
6198
  if (!v || v.nodes.length === 0)
5984
6199
  return {
5985
6200
  bounds: { minX: 0, minY: 0, width: 100, height: 100 },
@@ -7275,7 +7490,11 @@ function Aa(r, e, t, i, a) {
7275
7490
  const o = r.frequency / t;
7276
7491
  switch (e) {
7277
7492
  case "frequency":
7278
- return mt("var(--nice-success, #10b981)", "var(--nice-primary, #3b82f6)", o);
7493
+ return mt(
7494
+ "var(--nice-success, #10b981)",
7495
+ "var(--nice-primary, #3b82f6)",
7496
+ o
7497
+ );
7279
7498
  case "duration":
7280
7499
  return r.avgDuration ? mt("var(--nice-success, #10b981)", "var(--nice-warning, #f59e0b)", o) : "var(--nice-text-secondary, #6b7280)";
7281
7500
  case "cost":
@@ -8895,15 +9114,23 @@ function Ye(r, e, t, i) {
8895
9114
  }
8896
9115
  function no() {
8897
9116
  const r = re("Commit", { x: 40, y: 200 }, "circle", { width: 80, height: 80 }), e = re("Build", { x: 200, y: 200 }, "roundedRect"), t = re("Test", { x: 420, y: 200 }, "roundedRect"), i = re("Deploy", { x: 640, y: 200 }, "roundedRect"), a = re("Production", { x: 860, y: 200 }, "hexagon", { width: 140, height: 80 });
8898
- return Ye("CI/CD Pipeline", "flowchart", [r, e, t, i, a], [
8899
- oe(r, e, "right", "left"),
8900
- oe(e, t, "right", "left"),
8901
- oe(t, i, "right", "left"),
8902
- oe(i, a, "right", "left")
8903
- ]);
9117
+ return Ye(
9118
+ "CI/CD Pipeline",
9119
+ "flowchart",
9120
+ [r, e, t, i, a],
9121
+ [
9122
+ oe(r, e, "right", "left"),
9123
+ oe(e, t, "right", "left"),
9124
+ oe(t, i, "right", "left"),
9125
+ oe(i, a, "right", "left")
9126
+ ]
9127
+ );
8904
9128
  }
8905
9129
  function so() {
8906
- const r = re("API Gateway", { x: 350, y: 40 }, "hexagon", { width: 160, height: 80 }), e = re("Auth Service", { x: 80, y: 200 }, "roundedRect"), t = re("User Service", { x: 300, y: 200 }, "roundedRect"), i = re("Order Service", { x: 520, y: 200 }, "roundedRect"), a = re("Notification", { x: 740, y: 200 }, "roundedRect"), o = re("Users DB", { x: 180, y: 380 }, "cylinder", { width: 120, height: 70 }), s = re("Orders DB", { x: 520, y: 380 }, "cylinder", { width: 120, height: 70 }), n = re("Message Queue", { x: 620, y: 380 }, "parallelogram", { width: 160, height: 60 }), c = [r, e, t, i, a, o, s, n], u = [
9130
+ const r = re("API Gateway", { x: 350, y: 40 }, "hexagon", { width: 160, height: 80 }), e = re("Auth Service", { x: 80, y: 200 }, "roundedRect"), t = re("User Service", { x: 300, y: 200 }, "roundedRect"), i = re("Order Service", { x: 520, y: 200 }, "roundedRect"), a = re("Notification", { x: 740, y: 200 }, "roundedRect"), o = re("Users DB", { x: 180, y: 380 }, "cylinder", { width: 120, height: 70 }), s = re("Orders DB", { x: 520, y: 380 }, "cylinder", { width: 120, height: 70 }), n = re("Message Queue", { x: 620, y: 380 }, "parallelogram", {
9131
+ width: 160,
9132
+ height: 60
9133
+ }), c = [r, e, t, i, a, o, s, n], u = [
8907
9134
  oe(r, e, "bottom", "top"),
8908
9135
  oe(r, t, "bottom", "top"),
8909
9136
  oe(r, i, "bottom", "top"),
@@ -8916,43 +9143,69 @@ function so() {
8916
9143
  }
8917
9144
  function co() {
8918
9145
  const r = re("Start", { x: 350, y: 20 }, "circle", { width: 70, height: 70 }), e = re("Landing Page", { x: 310, y: 140 }, "roundedRect"), t = re("Sign Up", { x: 140, y: 280 }, "roundedRect"), i = re("Log In", { x: 480, y: 280 }, "roundedRect"), a = re("Dashboard", { x: 310, y: 420 }, "roundedRect"), o = re("End", { x: 350, y: 560 }, "circle", { width: 70, height: 70 });
8919
- return Ye("User Flow", "flowchart", [r, e, t, i, a, o], [
8920
- oe(r, e, "bottom", "top"),
8921
- oe(e, t, "bottom", "top", "New user"),
8922
- oe(e, i, "bottom", "top", "Returning"),
8923
- oe(t, a, "bottom", "top"),
8924
- oe(i, a, "bottom", "top"),
8925
- oe(a, o, "bottom", "top")
8926
- ]);
9146
+ return Ye(
9147
+ "User Flow",
9148
+ "flowchart",
9149
+ [r, e, t, i, a, o],
9150
+ [
9151
+ oe(r, e, "bottom", "top"),
9152
+ oe(e, t, "bottom", "top", "New user"),
9153
+ oe(e, i, "bottom", "top", "Returning"),
9154
+ oe(t, a, "bottom", "top"),
9155
+ oe(i, a, "bottom", "top"),
9156
+ oe(a, o, "bottom", "top")
9157
+ ]
9158
+ );
8927
9159
  }
8928
9160
  function lo() {
8929
- const r = re("Users", { x: 80, y: 100 }, "rectangle", { width: 180, height: 100 }), e = re("Orders", { x: 380, y: 100 }, "rectangle", { width: 180, height: 100 }), t = re("Products", { x: 380, y: 320 }, "rectangle", { width: 180, height: 100 }), i = re("Categories", { x: 680, y: 320 }, "rectangle", { width: 180, height: 100 });
8930
- return Ye("Entity Relationship", "er", [r, e, t, i], [
8931
- oe(r, e, "right", "left", "1:N"),
8932
- oe(e, t, "bottom", "top", "N:M"),
8933
- oe(t, i, "right", "left", "N:1")
8934
- ]);
9161
+ const r = re("Users", { x: 80, y: 100 }, "rectangle", { width: 180, height: 100 }), e = re("Orders", { x: 380, y: 100 }, "rectangle", { width: 180, height: 100 }), t = re("Products", { x: 380, y: 320 }, "rectangle", {
9162
+ width: 180,
9163
+ height: 100
9164
+ }), i = re("Categories", { x: 680, y: 320 }, "rectangle", {
9165
+ width: 180,
9166
+ height: 100
9167
+ });
9168
+ return Ye(
9169
+ "Entity Relationship",
9170
+ "er",
9171
+ [r, e, t, i],
9172
+ [
9173
+ oe(r, e, "right", "left", "1:N"),
9174
+ oe(e, t, "bottom", "top", "N:M"),
9175
+ oe(t, i, "right", "left", "N:1")
9176
+ ]
9177
+ );
8935
9178
  }
8936
9179
  function uo() {
8937
9180
  const r = re("CEO", { x: 350, y: 40 }, "roundedRect"), e = re("CTO", { x: 150, y: 180 }, "roundedRect"), t = re("CFO", { x: 550, y: 180 }, "roundedRect"), i = re("Engineering", { x: 50, y: 320 }, "roundedRect"), a = re("DevOps", { x: 250, y: 320 }, "roundedRect"), o = re("Accounting", { x: 550, y: 320 }, "roundedRect");
8938
- return Ye("Organization Chart", "orgchart", [r, e, t, i, a, o], [
8939
- oe(r, e, "bottom", "top"),
8940
- oe(r, t, "bottom", "top"),
8941
- oe(e, i, "bottom", "top"),
8942
- oe(e, a, "bottom", "top"),
8943
- oe(t, o, "bottom", "top")
8944
- ]);
9181
+ return Ye(
9182
+ "Organization Chart",
9183
+ "orgchart",
9184
+ [r, e, t, i, a, o],
9185
+ [
9186
+ oe(r, e, "bottom", "top"),
9187
+ oe(r, t, "bottom", "top"),
9188
+ oe(e, i, "bottom", "top"),
9189
+ oe(e, a, "bottom", "top"),
9190
+ oe(t, o, "bottom", "top")
9191
+ ]
9192
+ );
8945
9193
  }
8946
9194
  function fo() {
8947
9195
  const r = re("Idle", { x: 80, y: 200 }, "circle", { width: 90, height: 90 }), e = re("Loading", { x: 300, y: 80 }, "roundedRect"), t = re("Success", { x: 520, y: 80 }, "roundedRect"), i = re("Error", { x: 520, y: 320 }, "roundedRect"), a = re("Retry", { x: 300, y: 320 }, "diamond", { width: 100, height: 100 });
8948
- return Ye("State Machine", "stateMachine", [r, e, t, i, a], [
8949
- oe(r, e, "right", "left", "fetch"),
8950
- oe(e, t, "right", "left", "ok"),
8951
- oe(e, i, "bottom", "top", "fail"),
8952
- oe(i, a, "left", "right"),
8953
- oe(a, e, "top", "bottom", "retry"),
8954
- oe(a, r, "left", "right", "cancel")
8955
- ]);
9196
+ return Ye(
9197
+ "State Machine",
9198
+ "stateMachine",
9199
+ [r, e, t, i, a],
9200
+ [
9201
+ oe(r, e, "right", "left", "fetch"),
9202
+ oe(e, t, "right", "left", "ok"),
9203
+ oe(e, i, "bottom", "top", "fail"),
9204
+ oe(i, a, "left", "right"),
9205
+ oe(a, e, "top", "bottom", "retry"),
9206
+ oe(a, r, "left", "right", "cancel")
9207
+ ]
9208
+ );
8956
9209
  }
8957
9210
  const _t = [
8958
9211
  {
@@ -1 +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))}}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/ui-diagrams",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
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",
@@ -40,7 +40,7 @@
40
40
  "react-dom": ">=17.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@nice2dev/ui": "^1.1.6",
43
+ "@nice2dev/ui": "^1.1.7",
44
44
  "@testing-library/jest-dom": "^7.0.1",
45
45
  "@testing-library/react": "^16.3.3",
46
46
  "@types/react": "^19.2.18",