@spectratools/graphic-designer-cli 0.6.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.
@@ -511,10 +511,10 @@ declare const drawTextSchema: z.ZodObject<{
511
511
  color: string;
512
512
  opacity: number;
513
513
  text: string;
514
- fontSize: number;
515
- align: "center" | "left" | "right";
516
514
  x: number;
517
515
  y: number;
516
+ fontSize: number;
517
+ align: "center" | "left" | "right";
518
518
  fontWeight: number;
519
519
  fontFamily: "body" | "heading" | "mono";
520
520
  baseline: "top" | "alphabetic" | "bottom" | "middle";
@@ -666,10 +666,10 @@ declare const drawBadgeSchema: z.ZodObject<{
666
666
  opacity: number;
667
667
  background: string;
668
668
  text: string;
669
- fontSize: number;
670
- borderRadius: number;
671
669
  x: number;
672
670
  y: number;
671
+ fontSize: number;
672
+ borderRadius: number;
673
673
  fontFamily: "body" | "heading" | "mono";
674
674
  paddingX: number;
675
675
  paddingY: number;
@@ -792,6 +792,31 @@ declare const drawGradientRectSchema: z.ZodObject<{
792
792
  opacity?: number | undefined;
793
793
  radius?: number | undefined;
794
794
  }>;
795
+ declare const drawGridSchema: z.ZodObject<{
796
+ type: z.ZodLiteral<"grid">;
797
+ spacing: z.ZodDefault<z.ZodNumber>;
798
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
799
+ width: z.ZodDefault<z.ZodNumber>;
800
+ opacity: z.ZodDefault<z.ZodNumber>;
801
+ offsetX: z.ZodDefault<z.ZodNumber>;
802
+ offsetY: z.ZodDefault<z.ZodNumber>;
803
+ }, "strict", z.ZodTypeAny, {
804
+ width: number;
805
+ type: "grid";
806
+ color: string;
807
+ opacity: number;
808
+ offsetX: number;
809
+ offsetY: number;
810
+ spacing: number;
811
+ }, {
812
+ type: "grid";
813
+ width?: number | undefined;
814
+ color?: string | undefined;
815
+ opacity?: number | undefined;
816
+ offsetX?: number | undefined;
817
+ offsetY?: number | undefined;
818
+ spacing?: number | undefined;
819
+ }>;
795
820
  declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
796
821
  type: z.ZodLiteral<"rect">;
797
822
  x: z.ZodNumber;
@@ -871,10 +896,10 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
871
896
  color: string;
872
897
  opacity: number;
873
898
  text: string;
874
- fontSize: number;
875
- align: "center" | "left" | "right";
876
899
  x: number;
877
900
  y: number;
901
+ fontSize: number;
902
+ align: "center" | "left" | "right";
878
903
  fontWeight: number;
879
904
  fontFamily: "body" | "heading" | "mono";
880
905
  baseline: "top" | "alphabetic" | "bottom" | "middle";
@@ -1012,10 +1037,10 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1012
1037
  opacity: number;
1013
1038
  background: string;
1014
1039
  text: string;
1015
- fontSize: number;
1016
- borderRadius: number;
1017
1040
  x: number;
1018
1041
  y: number;
1042
+ fontSize: number;
1043
+ borderRadius: number;
1019
1044
  fontFamily: "body" | "heading" | "mono";
1020
1045
  paddingX: number;
1021
1046
  paddingY: number;
@@ -1136,6 +1161,30 @@ declare const drawCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1136
1161
  };
1137
1162
  opacity?: number | undefined;
1138
1163
  radius?: number | undefined;
1164
+ }>, z.ZodObject<{
1165
+ type: z.ZodLiteral<"grid">;
1166
+ spacing: z.ZodDefault<z.ZodNumber>;
1167
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1168
+ width: z.ZodDefault<z.ZodNumber>;
1169
+ opacity: z.ZodDefault<z.ZodNumber>;
1170
+ offsetX: z.ZodDefault<z.ZodNumber>;
1171
+ offsetY: z.ZodDefault<z.ZodNumber>;
1172
+ }, "strict", z.ZodTypeAny, {
1173
+ width: number;
1174
+ type: "grid";
1175
+ color: string;
1176
+ opacity: number;
1177
+ offsetX: number;
1178
+ offsetY: number;
1179
+ spacing: number;
1180
+ }, {
1181
+ type: "grid";
1182
+ width?: number | undefined;
1183
+ color?: string | undefined;
1184
+ opacity?: number | undefined;
1185
+ offsetX?: number | undefined;
1186
+ offsetY?: number | undefined;
1187
+ spacing?: number | undefined;
1139
1188
  }>]>;
1140
1189
  /** Default canvas dimensions and padding (1200 × 675 px, 48 px padding). */
1141
1190
  declare const defaultCanvas: {
@@ -1351,6 +1400,16 @@ declare const flowNodeElementSchema: z.ZodObject<{
1351
1400
  offsetY?: number | undefined;
1352
1401
  } | undefined;
1353
1402
  }>;
1403
+ declare const anchorHintSchema: z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
1404
+ x: z.ZodNumber;
1405
+ y: z.ZodNumber;
1406
+ }, "strict", z.ZodTypeAny, {
1407
+ x: number;
1408
+ y: number;
1409
+ }, {
1410
+ x: number;
1411
+ y: number;
1412
+ }>]>;
1354
1413
  declare const connectionElementSchema: z.ZodObject<{
1355
1414
  type: z.ZodLiteral<"connection">;
1356
1415
  from: z.ZodString;
@@ -1364,9 +1423,30 @@ declare const connectionElementSchema: z.ZodObject<{
1364
1423
  width: z.ZodOptional<z.ZodNumber>;
1365
1424
  strokeWidth: z.ZodDefault<z.ZodNumber>;
1366
1425
  arrowSize: z.ZodOptional<z.ZodNumber>;
1426
+ arrowPlacement: z.ZodDefault<z.ZodEnum<["endpoint", "boundary"]>>;
1367
1427
  opacity: z.ZodDefault<z.ZodNumber>;
1368
1428
  routing: z.ZodDefault<z.ZodEnum<["auto", "orthogonal", "curve", "arc"]>>;
1369
1429
  tension: z.ZodDefault<z.ZodNumber>;
1430
+ fromAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
1431
+ x: z.ZodNumber;
1432
+ y: z.ZodNumber;
1433
+ }, "strict", z.ZodTypeAny, {
1434
+ x: number;
1435
+ y: number;
1436
+ }, {
1437
+ x: number;
1438
+ y: number;
1439
+ }>]>>;
1440
+ toAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
1441
+ x: z.ZodNumber;
1442
+ y: z.ZodNumber;
1443
+ }, "strict", z.ZodTypeAny, {
1444
+ x: number;
1445
+ y: number;
1446
+ }, {
1447
+ x: number;
1448
+ y: number;
1449
+ }>]>>;
1370
1450
  }, "strict", z.ZodTypeAny, {
1371
1451
  type: "connection";
1372
1452
  opacity: number;
@@ -1377,12 +1457,21 @@ declare const connectionElementSchema: z.ZodObject<{
1377
1457
  arrow: "end" | "start" | "both" | "none";
1378
1458
  labelPosition: "end" | "start" | "middle";
1379
1459
  strokeWidth: number;
1460
+ arrowPlacement: "endpoint" | "boundary";
1380
1461
  routing: "auto" | "orthogonal" | "curve" | "arc";
1381
1462
  tension: number;
1382
1463
  width?: number | undefined;
1383
1464
  label?: string | undefined;
1384
1465
  color?: string | undefined;
1385
1466
  arrowSize?: number | undefined;
1467
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1468
+ x: number;
1469
+ y: number;
1470
+ } | undefined;
1471
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1472
+ x: number;
1473
+ y: number;
1474
+ } | undefined;
1386
1475
  }, {
1387
1476
  type: "connection";
1388
1477
  from: string;
@@ -1397,8 +1486,17 @@ declare const connectionElementSchema: z.ZodObject<{
1397
1486
  labelPosition?: "end" | "start" | "middle" | undefined;
1398
1487
  strokeWidth?: number | undefined;
1399
1488
  arrowSize?: number | undefined;
1489
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
1400
1490
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
1401
1491
  tension?: number | undefined;
1492
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1493
+ x: number;
1494
+ y: number;
1495
+ } | undefined;
1496
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1497
+ x: number;
1498
+ y: number;
1499
+ } | undefined;
1402
1500
  }>;
1403
1501
  declare const codeBlockStyleSchema: z.ZodObject<{
1404
1502
  paddingVertical: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -1814,9 +1912,30 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1814
1912
  width: z.ZodOptional<z.ZodNumber>;
1815
1913
  strokeWidth: z.ZodDefault<z.ZodNumber>;
1816
1914
  arrowSize: z.ZodOptional<z.ZodNumber>;
1915
+ arrowPlacement: z.ZodDefault<z.ZodEnum<["endpoint", "boundary"]>>;
1817
1916
  opacity: z.ZodDefault<z.ZodNumber>;
1818
1917
  routing: z.ZodDefault<z.ZodEnum<["auto", "orthogonal", "curve", "arc"]>>;
1819
1918
  tension: z.ZodDefault<z.ZodNumber>;
1919
+ fromAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
1920
+ x: z.ZodNumber;
1921
+ y: z.ZodNumber;
1922
+ }, "strict", z.ZodTypeAny, {
1923
+ x: number;
1924
+ y: number;
1925
+ }, {
1926
+ x: number;
1927
+ y: number;
1928
+ }>]>>;
1929
+ toAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
1930
+ x: z.ZodNumber;
1931
+ y: z.ZodNumber;
1932
+ }, "strict", z.ZodTypeAny, {
1933
+ x: number;
1934
+ y: number;
1935
+ }, {
1936
+ x: number;
1937
+ y: number;
1938
+ }>]>>;
1820
1939
  }, "strict", z.ZodTypeAny, {
1821
1940
  type: "connection";
1822
1941
  opacity: number;
@@ -1827,12 +1946,21 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1827
1946
  arrow: "end" | "start" | "both" | "none";
1828
1947
  labelPosition: "end" | "start" | "middle";
1829
1948
  strokeWidth: number;
1949
+ arrowPlacement: "endpoint" | "boundary";
1830
1950
  routing: "auto" | "orthogonal" | "curve" | "arc";
1831
1951
  tension: number;
1832
1952
  width?: number | undefined;
1833
1953
  label?: string | undefined;
1834
1954
  color?: string | undefined;
1835
1955
  arrowSize?: number | undefined;
1956
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1957
+ x: number;
1958
+ y: number;
1959
+ } | undefined;
1960
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1961
+ x: number;
1962
+ y: number;
1963
+ } | undefined;
1836
1964
  }, {
1837
1965
  type: "connection";
1838
1966
  from: string;
@@ -1847,8 +1975,17 @@ declare const elementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1847
1975
  labelPosition?: "end" | "start" | "middle" | undefined;
1848
1976
  strokeWidth?: number | undefined;
1849
1977
  arrowSize?: number | undefined;
1978
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
1850
1979
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
1851
1980
  tension?: number | undefined;
1981
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1982
+ x: number;
1983
+ y: number;
1984
+ } | undefined;
1985
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
1986
+ x: number;
1987
+ y: number;
1988
+ } | undefined;
1852
1989
  }>, z.ZodObject<{
1853
1990
  type: z.ZodLiteral<"code-block">;
1854
1991
  id: z.ZodString;
@@ -2847,9 +2984,30 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
2847
2984
  width: z.ZodOptional<z.ZodNumber>;
2848
2985
  strokeWidth: z.ZodDefault<z.ZodNumber>;
2849
2986
  arrowSize: z.ZodOptional<z.ZodNumber>;
2987
+ arrowPlacement: z.ZodDefault<z.ZodEnum<["endpoint", "boundary"]>>;
2850
2988
  opacity: z.ZodDefault<z.ZodNumber>;
2851
2989
  routing: z.ZodDefault<z.ZodEnum<["auto", "orthogonal", "curve", "arc"]>>;
2852
2990
  tension: z.ZodDefault<z.ZodNumber>;
2991
+ fromAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
2992
+ x: z.ZodNumber;
2993
+ y: z.ZodNumber;
2994
+ }, "strict", z.ZodTypeAny, {
2995
+ x: number;
2996
+ y: number;
2997
+ }, {
2998
+ x: number;
2999
+ y: number;
3000
+ }>]>>;
3001
+ toAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
3002
+ x: z.ZodNumber;
3003
+ y: z.ZodNumber;
3004
+ }, "strict", z.ZodTypeAny, {
3005
+ x: number;
3006
+ y: number;
3007
+ }, {
3008
+ x: number;
3009
+ y: number;
3010
+ }>]>>;
2853
3011
  }, "strict", z.ZodTypeAny, {
2854
3012
  type: "connection";
2855
3013
  opacity: number;
@@ -2860,12 +3018,21 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
2860
3018
  arrow: "end" | "start" | "both" | "none";
2861
3019
  labelPosition: "end" | "start" | "middle";
2862
3020
  strokeWidth: number;
3021
+ arrowPlacement: "endpoint" | "boundary";
2863
3022
  routing: "auto" | "orthogonal" | "curve" | "arc";
2864
3023
  tension: number;
2865
3024
  width?: number | undefined;
2866
3025
  label?: string | undefined;
2867
3026
  color?: string | undefined;
2868
3027
  arrowSize?: number | undefined;
3028
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3029
+ x: number;
3030
+ y: number;
3031
+ } | undefined;
3032
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3033
+ x: number;
3034
+ y: number;
3035
+ } | undefined;
2869
3036
  }, {
2870
3037
  type: "connection";
2871
3038
  from: string;
@@ -2880,8 +3047,17 @@ declare const diagramElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
2880
3047
  labelPosition?: "end" | "start" | "middle" | undefined;
2881
3048
  strokeWidth?: number | undefined;
2882
3049
  arrowSize?: number | undefined;
3050
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
2883
3051
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
2884
3052
  tension?: number | undefined;
3053
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3054
+ x: number;
3055
+ y: number;
3056
+ } | undefined;
3057
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3058
+ x: number;
3059
+ y: number;
3060
+ } | undefined;
2885
3061
  }>]>;
2886
3062
  declare const diagramLayoutSchema: z.ZodObject<{
2887
3063
  mode: z.ZodDefault<z.ZodEnum<["manual", "auto"]>>;
@@ -3199,9 +3375,30 @@ declare const diagramSpecSchema: z.ZodObject<{
3199
3375
  width: z.ZodOptional<z.ZodNumber>;
3200
3376
  strokeWidth: z.ZodDefault<z.ZodNumber>;
3201
3377
  arrowSize: z.ZodOptional<z.ZodNumber>;
3378
+ arrowPlacement: z.ZodDefault<z.ZodEnum<["endpoint", "boundary"]>>;
3202
3379
  opacity: z.ZodDefault<z.ZodNumber>;
3203
3380
  routing: z.ZodDefault<z.ZodEnum<["auto", "orthogonal", "curve", "arc"]>>;
3204
3381
  tension: z.ZodDefault<z.ZodNumber>;
3382
+ fromAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
3383
+ x: z.ZodNumber;
3384
+ y: z.ZodNumber;
3385
+ }, "strict", z.ZodTypeAny, {
3386
+ x: number;
3387
+ y: number;
3388
+ }, {
3389
+ x: number;
3390
+ y: number;
3391
+ }>]>>;
3392
+ toAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
3393
+ x: z.ZodNumber;
3394
+ y: z.ZodNumber;
3395
+ }, "strict", z.ZodTypeAny, {
3396
+ x: number;
3397
+ y: number;
3398
+ }, {
3399
+ x: number;
3400
+ y: number;
3401
+ }>]>>;
3205
3402
  }, "strict", z.ZodTypeAny, {
3206
3403
  type: "connection";
3207
3404
  opacity: number;
@@ -3212,12 +3409,21 @@ declare const diagramSpecSchema: z.ZodObject<{
3212
3409
  arrow: "end" | "start" | "both" | "none";
3213
3410
  labelPosition: "end" | "start" | "middle";
3214
3411
  strokeWidth: number;
3412
+ arrowPlacement: "endpoint" | "boundary";
3215
3413
  routing: "auto" | "orthogonal" | "curve" | "arc";
3216
3414
  tension: number;
3217
3415
  width?: number | undefined;
3218
3416
  label?: string | undefined;
3219
3417
  color?: string | undefined;
3220
3418
  arrowSize?: number | undefined;
3419
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3420
+ x: number;
3421
+ y: number;
3422
+ } | undefined;
3423
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3424
+ x: number;
3425
+ y: number;
3426
+ } | undefined;
3221
3427
  }, {
3222
3428
  type: "connection";
3223
3429
  from: string;
@@ -3232,8 +3438,17 @@ declare const diagramSpecSchema: z.ZodObject<{
3232
3438
  labelPosition?: "end" | "start" | "middle" | undefined;
3233
3439
  strokeWidth?: number | undefined;
3234
3440
  arrowSize?: number | undefined;
3441
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
3235
3442
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
3236
3443
  tension?: number | undefined;
3444
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3445
+ x: number;
3446
+ y: number;
3447
+ } | undefined;
3448
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3449
+ x: number;
3450
+ y: number;
3451
+ } | undefined;
3237
3452
  }>]>, "many">;
3238
3453
  layout: z.ZodDefault<z.ZodObject<{
3239
3454
  mode: z.ZodDefault<z.ZodEnum<["manual", "auto"]>>;
@@ -3335,12 +3550,21 @@ declare const diagramSpecSchema: z.ZodObject<{
3335
3550
  arrow: "end" | "start" | "both" | "none";
3336
3551
  labelPosition: "end" | "start" | "middle";
3337
3552
  strokeWidth: number;
3553
+ arrowPlacement: "endpoint" | "boundary";
3338
3554
  routing: "auto" | "orthogonal" | "curve" | "arc";
3339
3555
  tension: number;
3340
3556
  width?: number | undefined;
3341
3557
  label?: string | undefined;
3342
3558
  color?: string | undefined;
3343
3559
  arrowSize?: number | undefined;
3560
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3561
+ x: number;
3562
+ y: number;
3563
+ } | undefined;
3564
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3565
+ x: number;
3566
+ y: number;
3567
+ } | undefined;
3344
3568
  })[];
3345
3569
  layout: {
3346
3570
  mode: "auto" | "manual";
@@ -3437,8 +3661,17 @@ declare const diagramSpecSchema: z.ZodObject<{
3437
3661
  labelPosition?: "end" | "start" | "middle" | undefined;
3438
3662
  strokeWidth?: number | undefined;
3439
3663
  arrowSize?: number | undefined;
3664
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
3440
3665
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
3441
3666
  tension?: number | undefined;
3667
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3668
+ x: number;
3669
+ y: number;
3670
+ } | undefined;
3671
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
3672
+ x: number;
3673
+ y: number;
3674
+ } | undefined;
3442
3675
  })[];
3443
3676
  theme?: {
3444
3677
  code: {
@@ -3861,9 +4094,30 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3861
4094
  width: z.ZodOptional<z.ZodNumber>;
3862
4095
  strokeWidth: z.ZodDefault<z.ZodNumber>;
3863
4096
  arrowSize: z.ZodOptional<z.ZodNumber>;
4097
+ arrowPlacement: z.ZodDefault<z.ZodEnum<["endpoint", "boundary"]>>;
3864
4098
  opacity: z.ZodDefault<z.ZodNumber>;
3865
4099
  routing: z.ZodDefault<z.ZodEnum<["auto", "orthogonal", "curve", "arc"]>>;
3866
4100
  tension: z.ZodDefault<z.ZodNumber>;
4101
+ fromAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
4102
+ x: z.ZodNumber;
4103
+ y: z.ZodNumber;
4104
+ }, "strict", z.ZodTypeAny, {
4105
+ x: number;
4106
+ y: number;
4107
+ }, {
4108
+ x: number;
4109
+ y: number;
4110
+ }>]>>;
4111
+ toAnchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center"]>, z.ZodObject<{
4112
+ x: z.ZodNumber;
4113
+ y: z.ZodNumber;
4114
+ }, "strict", z.ZodTypeAny, {
4115
+ x: number;
4116
+ y: number;
4117
+ }, {
4118
+ x: number;
4119
+ y: number;
4120
+ }>]>>;
3867
4121
  }, "strict", z.ZodTypeAny, {
3868
4122
  type: "connection";
3869
4123
  opacity: number;
@@ -3874,12 +4128,21 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3874
4128
  arrow: "end" | "start" | "both" | "none";
3875
4129
  labelPosition: "end" | "start" | "middle";
3876
4130
  strokeWidth: number;
4131
+ arrowPlacement: "endpoint" | "boundary";
3877
4132
  routing: "auto" | "orthogonal" | "curve" | "arc";
3878
4133
  tension: number;
3879
4134
  width?: number | undefined;
3880
4135
  label?: string | undefined;
3881
4136
  color?: string | undefined;
3882
4137
  arrowSize?: number | undefined;
4138
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
4139
+ x: number;
4140
+ y: number;
4141
+ } | undefined;
4142
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
4143
+ x: number;
4144
+ y: number;
4145
+ } | undefined;
3883
4146
  }, {
3884
4147
  type: "connection";
3885
4148
  from: string;
@@ -3894,8 +4157,17 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
3894
4157
  labelPosition?: "end" | "start" | "middle" | undefined;
3895
4158
  strokeWidth?: number | undefined;
3896
4159
  arrowSize?: number | undefined;
4160
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
3897
4161
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
3898
4162
  tension?: number | undefined;
4163
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
4164
+ x: number;
4165
+ y: number;
4166
+ } | undefined;
4167
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
4168
+ x: number;
4169
+ y: number;
4170
+ } | undefined;
3899
4171
  }>, z.ZodObject<{
3900
4172
  type: z.ZodLiteral<"code-block">;
3901
4173
  id: z.ZodString;
@@ -4339,10 +4611,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4339
4611
  color: string;
4340
4612
  opacity: number;
4341
4613
  text: string;
4342
- fontSize: number;
4343
- align: "center" | "left" | "right";
4344
4614
  x: number;
4345
4615
  y: number;
4616
+ fontSize: number;
4617
+ align: "center" | "left" | "right";
4346
4618
  fontWeight: number;
4347
4619
  fontFamily: "body" | "heading" | "mono";
4348
4620
  baseline: "top" | "alphabetic" | "bottom" | "middle";
@@ -4480,10 +4752,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4480
4752
  opacity: number;
4481
4753
  background: string;
4482
4754
  text: string;
4483
- fontSize: number;
4484
- borderRadius: number;
4485
4755
  x: number;
4486
4756
  y: number;
4757
+ fontSize: number;
4758
+ borderRadius: number;
4487
4759
  fontFamily: "body" | "heading" | "mono";
4488
4760
  paddingX: number;
4489
4761
  paddingY: number;
@@ -4604,6 +4876,30 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4604
4876
  };
4605
4877
  opacity?: number | undefined;
4606
4878
  radius?: number | undefined;
4879
+ }>, z.ZodObject<{
4880
+ type: z.ZodLiteral<"grid">;
4881
+ spacing: z.ZodDefault<z.ZodNumber>;
4882
+ color: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
4883
+ width: z.ZodDefault<z.ZodNumber>;
4884
+ opacity: z.ZodDefault<z.ZodNumber>;
4885
+ offsetX: z.ZodDefault<z.ZodNumber>;
4886
+ offsetY: z.ZodDefault<z.ZodNumber>;
4887
+ }, "strict", z.ZodTypeAny, {
4888
+ width: number;
4889
+ type: "grid";
4890
+ color: string;
4891
+ opacity: number;
4892
+ offsetX: number;
4893
+ offsetY: number;
4894
+ spacing: number;
4895
+ }, {
4896
+ type: "grid";
4897
+ width?: number | undefined;
4898
+ color?: string | undefined;
4899
+ opacity?: number | undefined;
4900
+ offsetX?: number | undefined;
4901
+ offsetY?: number | undefined;
4902
+ spacing?: number | undefined;
4607
4903
  }>]>, "many">>;
4608
4904
  layout: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
4609
4905
  mode: z.ZodLiteral<"auto">;
@@ -4834,10 +5130,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4834
5130
  color: string;
4835
5131
  opacity: number;
4836
5132
  text: string;
4837
- fontSize: number;
4838
- align: "center" | "left" | "right";
4839
5133
  x: number;
4840
5134
  y: number;
5135
+ fontSize: number;
5136
+ align: "center" | "left" | "right";
4841
5137
  fontWeight: number;
4842
5138
  fontFamily: "body" | "heading" | "mono";
4843
5139
  baseline: "top" | "alphabetic" | "bottom" | "middle";
@@ -4880,10 +5176,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4880
5176
  opacity: number;
4881
5177
  background: string;
4882
5178
  text: string;
4883
- fontSize: number;
4884
- borderRadius: number;
4885
5179
  x: number;
4886
5180
  y: number;
5181
+ fontSize: number;
5182
+ borderRadius: number;
4887
5183
  fontFamily: "body" | "heading" | "mono";
4888
5184
  paddingX: number;
4889
5185
  paddingY: number;
@@ -4909,6 +5205,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
4909
5205
  offset: number;
4910
5206
  }[];
4911
5207
  };
5208
+ } | {
5209
+ width: number;
5210
+ type: "grid";
5211
+ color: string;
5212
+ opacity: number;
5213
+ offsetX: number;
5214
+ offsetY: number;
5215
+ spacing: number;
4912
5216
  })[];
4913
5217
  theme: {
4914
5218
  code: {
@@ -5001,12 +5305,21 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5001
5305
  arrow: "end" | "start" | "both" | "none";
5002
5306
  labelPosition: "end" | "start" | "middle";
5003
5307
  strokeWidth: number;
5308
+ arrowPlacement: "endpoint" | "boundary";
5004
5309
  routing: "auto" | "orthogonal" | "curve" | "arc";
5005
5310
  tension: number;
5006
5311
  width?: number | undefined;
5007
5312
  label?: string | undefined;
5008
5313
  color?: string | undefined;
5009
5314
  arrowSize?: number | undefined;
5315
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
5316
+ x: number;
5317
+ y: number;
5318
+ } | undefined;
5319
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
5320
+ x: number;
5321
+ y: number;
5322
+ } | undefined;
5010
5323
  } | {
5011
5324
  type: "code-block";
5012
5325
  code: string;
@@ -5307,6 +5620,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5307
5620
  };
5308
5621
  opacity?: number | undefined;
5309
5622
  radius?: number | undefined;
5623
+ } | {
5624
+ type: "grid";
5625
+ width?: number | undefined;
5626
+ color?: string | undefined;
5627
+ opacity?: number | undefined;
5628
+ offsetX?: number | undefined;
5629
+ offsetY?: number | undefined;
5630
+ spacing?: number | undefined;
5310
5631
  })[] | undefined;
5311
5632
  theme?: {
5312
5633
  code: {
@@ -5403,8 +5724,17 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5403
5724
  labelPosition?: "end" | "start" | "middle" | undefined;
5404
5725
  strokeWidth?: number | undefined;
5405
5726
  arrowSize?: number | undefined;
5727
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
5406
5728
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
5407
5729
  tension?: number | undefined;
5730
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
5731
+ x: number;
5732
+ y: number;
5733
+ } | undefined;
5734
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
5735
+ x: number;
5736
+ y: number;
5737
+ } | undefined;
5408
5738
  } | {
5409
5739
  type: "code-block";
5410
5740
  code: string;
@@ -5627,10 +5957,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5627
5957
  color: string;
5628
5958
  opacity: number;
5629
5959
  text: string;
5630
- fontSize: number;
5631
- align: "center" | "left" | "right";
5632
5960
  x: number;
5633
5961
  y: number;
5962
+ fontSize: number;
5963
+ align: "center" | "left" | "right";
5634
5964
  fontWeight: number;
5635
5965
  fontFamily: "body" | "heading" | "mono";
5636
5966
  baseline: "top" | "alphabetic" | "bottom" | "middle";
@@ -5673,10 +6003,10 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5673
6003
  opacity: number;
5674
6004
  background: string;
5675
6005
  text: string;
5676
- fontSize: number;
5677
- borderRadius: number;
5678
6006
  x: number;
5679
6007
  y: number;
6008
+ fontSize: number;
6009
+ borderRadius: number;
5680
6010
  fontFamily: "body" | "heading" | "mono";
5681
6011
  paddingX: number;
5682
6012
  paddingY: number;
@@ -5702,6 +6032,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5702
6032
  offset: number;
5703
6033
  }[];
5704
6034
  };
6035
+ } | {
6036
+ width: number;
6037
+ type: "grid";
6038
+ color: string;
6039
+ opacity: number;
6040
+ offsetX: number;
6041
+ offsetY: number;
6042
+ spacing: number;
5705
6043
  })[];
5706
6044
  theme: {
5707
6045
  code: {
@@ -5794,12 +6132,21 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
5794
6132
  arrow: "end" | "start" | "both" | "none";
5795
6133
  labelPosition: "end" | "start" | "middle";
5796
6134
  strokeWidth: number;
6135
+ arrowPlacement: "endpoint" | "boundary";
5797
6136
  routing: "auto" | "orthogonal" | "curve" | "arc";
5798
6137
  tension: number;
5799
6138
  width?: number | undefined;
5800
6139
  label?: string | undefined;
5801
6140
  color?: string | undefined;
5802
6141
  arrowSize?: number | undefined;
6142
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
6143
+ x: number;
6144
+ y: number;
6145
+ } | undefined;
6146
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
6147
+ x: number;
6148
+ y: number;
6149
+ } | undefined;
5803
6150
  } | {
5804
6151
  type: "code-block";
5805
6152
  code: string;
@@ -6051,6 +6398,14 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6051
6398
  };
6052
6399
  opacity?: number | undefined;
6053
6400
  radius?: number | undefined;
6401
+ } | {
6402
+ type: "grid";
6403
+ width?: number | undefined;
6404
+ color?: string | undefined;
6405
+ opacity?: number | undefined;
6406
+ offsetX?: number | undefined;
6407
+ offsetY?: number | undefined;
6408
+ spacing?: number | undefined;
6054
6409
  })[] | undefined;
6055
6410
  theme?: {
6056
6411
  code: {
@@ -6147,8 +6502,17 @@ declare const designSpecSchema: z.ZodEffects<z.ZodObject<{
6147
6502
  labelPosition?: "end" | "start" | "middle" | undefined;
6148
6503
  strokeWidth?: number | undefined;
6149
6504
  arrowSize?: number | undefined;
6505
+ arrowPlacement?: "endpoint" | "boundary" | undefined;
6150
6506
  routing?: "auto" | "orthogonal" | "curve" | "arc" | undefined;
6151
6507
  tension?: number | undefined;
6508
+ fromAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
6509
+ x: number;
6510
+ y: number;
6511
+ } | undefined;
6512
+ toAnchor?: "top" | "center" | "left" | "right" | "bottom" | {
6513
+ x: number;
6514
+ y: number;
6515
+ } | undefined;
6152
6516
  } | {
6153
6517
  type: "code-block";
6154
6518
  code: string;
@@ -6303,6 +6667,7 @@ type CardElement = z.infer<typeof cardElementSchema>;
6303
6667
  type FlowNodeElement = z.infer<typeof flowNodeElementSchema>;
6304
6668
  type FlowNodeShadow = z.infer<typeof flowNodeShadowSchema>;
6305
6669
  type ConnectionElement = z.infer<typeof connectionElementSchema>;
6670
+ type AnchorHint = z.infer<typeof anchorHintSchema>;
6306
6671
  type DiagramElement = z.infer<typeof diagramElementSchema>;
6307
6672
  type DiagramLayout = z.infer<typeof diagramLayoutSchema>;
6308
6673
  type DiagramSpec = z.infer<typeof diagramSpecSchema>;
@@ -6322,6 +6687,7 @@ type DrawBezier = z.infer<typeof drawBezierSchema>;
6322
6687
  type DrawPath = z.infer<typeof drawPathSchema>;
6323
6688
  type DrawBadge = z.infer<typeof drawBadgeSchema>;
6324
6689
  type DrawGradientRect = z.infer<typeof drawGradientRectSchema>;
6690
+ type DrawGrid = z.infer<typeof drawGridSchema>;
6325
6691
  type DrawCommand = z.infer<typeof drawCommandSchema>;
6326
6692
  type LayoutConfig = z.infer<typeof layoutConfigSchema>;
6327
6693
  type AutoLayoutConfig = z.infer<typeof autoLayoutConfigSchema>;
@@ -6379,4 +6745,4 @@ declare function deriveSafeFrame(spec: DesignSpec): DesignSafeFrame;
6379
6745
  declare function parseDiagramSpec(input: unknown): DiagramSpec;
6380
6746
  declare function parseDesignSpec(input: unknown): DesignSpec;
6381
6747
 
6382
- export { builtInThemes as $, type AutoLayoutConfig as A, type BuiltInTheme as B, type ConnectionElement as C, type DesignSpec as D, type Element as E, type FlowNodeElement as F, type Gradient as G, type GradientOverlayDecorator as H, type GradientSpec as I, type GradientStop$1 as J, type GridLayoutConfig as K, type ImageElement as L, type LayoutConfig as M, type LayoutSnapshot as N, type ManualLayoutConfig as O, type RainbowRuleDecorator as P, type RenderResult as Q, type RenderMetadata as R, type ShapeElement as S, type ThemeInput$1 as T, type StackLayoutConfig as U, type TerminalElement as V, type TextElement as W, type ThemeInput as X, type VignetteDecorator as Y, type WrittenArtifacts as Z, builtInThemeBackgrounds as _, type Rect as a, computeSpecHash as a0, connectionElementSchema as a1, defaultAutoLayout as a2, defaultCanvas as a3, defaultConstraints as a4, defaultGridLayout as a5, defaultLayout as a6, defaultStackLayout as a7, defaultTheme as a8, deriveSafeFrame as a9, designSpecSchema as aa, diagramElementSchema as ab, diagramLayoutSchema as ac, diagramSpecSchema as ad, drawGradientRect as ae, drawRainbowRule as af, drawVignette as ag, flowNodeElementSchema as ah, inferLayout as ai, inferSidecarPath as aj, parseDesignSpec as ak, parseDiagramSpec as al, renderDesign as am, resolveTheme as an, writeRenderArtifacts as ao, type CodeBlockStyle as ap, type FlowNodeShadow as aq, type GradientStop as ar, type LinearGradient as as, type RadialGradient as at, type DrawCommand as b, type Theme as c, type RenderedElement as d, type CardElement as e, type CodeBlockElement as f, type ConstraintSpec as g, DEFAULT_GENERATOR_VERSION as h, DEFAULT_RAINBOW_COLORS as i, type Decorator as j, type DesignCardSpec as k, type DesignSafeFrame as l, type DesignTheme as m, type DiagramElement as n, type DiagramLayout as o, type DiagramSpec as p, type DrawBadge as q, type DrawBezier as r, type DrawCircle as s, type DrawFontFamily as t, type DrawGradientRect as u, type DrawLine as v, type DrawPath as w, type DrawPoint as x, type DrawRect as y, type DrawText as z };
6748
+ export { builtInThemeBackgrounds as $, type AnchorHint as A, type BuiltInTheme as B, type ConnectionElement as C, type DesignSpec as D, type DrawText as E, type Element as F, type FlowNodeElement as G, type Gradient as H, type GradientOverlayDecorator as I, type GradientSpec as J, type GradientStop$1 as K, type GridLayoutConfig as L, type ImageElement as M, type LayoutConfig as N, type LayoutSnapshot as O, type ManualLayoutConfig as P, type RainbowRuleDecorator as Q, type RenderMetadata as R, type RenderResult as S, type ThemeInput$1 as T, type ShapeElement as U, type StackLayoutConfig as V, type TerminalElement as W, type TextElement as X, type ThemeInput as Y, type VignetteDecorator as Z, type WrittenArtifacts as _, type Rect as a, builtInThemes as a0, computeSpecHash as a1, connectionElementSchema as a2, defaultAutoLayout as a3, defaultCanvas as a4, defaultConstraints as a5, defaultGridLayout as a6, defaultLayout as a7, defaultStackLayout as a8, defaultTheme as a9, deriveSafeFrame as aa, designSpecSchema as ab, diagramElementSchema as ac, diagramLayoutSchema as ad, diagramSpecSchema as ae, drawGradientRect as af, drawRainbowRule as ag, drawVignette as ah, flowNodeElementSchema as ai, inferLayout as aj, inferSidecarPath as ak, parseDesignSpec as al, parseDiagramSpec as am, renderDesign as an, resolveTheme as ao, writeRenderArtifacts as ap, type CodeBlockStyle as aq, type DrawGrid as ar, type FlowNodeShadow as as, type GradientStop as at, type LinearGradient as au, type RadialGradient as av, type DrawCommand as b, type Theme as c, type RenderedElement as d, type AutoLayoutConfig as e, type CardElement as f, type CodeBlockElement as g, type ConstraintSpec as h, DEFAULT_GENERATOR_VERSION as i, DEFAULT_RAINBOW_COLORS as j, type Decorator as k, type DesignCardSpec as l, type DesignSafeFrame as m, type DesignTheme as n, type DiagramElement as o, type DiagramLayout as p, type DiagramSpec as q, type DrawBadge as r, type DrawBezier as s, type DrawCircle as t, type DrawFontFamily as u, type DrawGradientRect as v, type DrawLine as w, type DrawPath as x, type DrawPoint as y, type DrawRect as z };