@spectratools/graphic-designer-cli 0.11.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -1
- package/dist/cli.js +104 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +104 -8
- package/dist/qa.d.ts +1 -1
- package/dist/qa.js +21 -0
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +104 -8
- package/dist/{spec.schema-CYlOLxmK.d.ts → spec.schema-BkbcnVcm.d.ts} +466 -117
- package/dist/spec.schema.d.ts +1 -1
- package/dist/spec.schema.js +21 -0
- package/package.json +2 -2
package/dist/spec.schema.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'zod';
|
|
2
|
-
export { A as AnchorHint, e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement,
|
|
2
|
+
export { A as AnchorHint, e as AutoLayoutConfig, B as BuiltInTheme, f as CardElement, g as CodeBlockElement, ax as CodeBlockStyle, C as ConnectionElement, h as ConstraintSpec, k as Decorator, l as DesignCardSpec, m as DesignSafeFrame, D as DesignSpec, n as DesignTheme, o as DiagramElement, p as DiagramLayout, q as DiagramSpec, r as DrawArc, s as DrawBadge, t as DrawBezier, u as DrawCircle, b as DrawCommand, v as DrawFontFamily, w as DrawGradientRect, ay as DrawGrid, x as DrawLine, y as DrawPath, z as DrawPoint, E as DrawRect, F as DrawShadow, az as DrawStrokeGradient, G as DrawText, H as DrawTextRow, I as DrawTextRowSegment, J as Element, K as EllipseLayoutConfig, L as FlowNodeElement, aA as FlowNodeShadow, M as Gradient, N as GradientOverlayDecorator, aB as GradientStop, Q as GridLayoutConfig, S as ImageElement, V as LayoutConfig, aC as LinearGradient, X as ManualLayoutConfig, aD as RadialGradient, Y as RainbowRuleDecorator, $ as ShapeElement, a0 as StackLayoutConfig, a1 as TerminalElement, a2 as TextElement, c as Theme, a3 as ThemeInput, a4 as VignetteDecorator, a6 as builtInThemeBackgrounds, a7 as builtInThemes, a9 as connectionElementSchema, aa as defaultAutoLayout, ab as defaultCanvas, ac as defaultConstraints, ad as defaultGridLayout, ae as defaultLayout, af as defaultStackLayout, ag as defaultTheme, ah as deriveSafeFrame, ai as designSpecSchema, aj as diagramElementSchema, ak as diagramLayoutSchema, al as diagramSpecSchema, ap as flowNodeElementSchema, aq as inferLayout, as as parseDesignSpec, at as parseDiagramSpec, av as resolveTheme } from './spec.schema-BkbcnVcm.js';
|
|
3
3
|
import '@napi-rs/canvas';
|
package/dist/spec.schema.js
CHANGED
|
@@ -285,6 +285,10 @@ var drawShadowSchema = z2.object({
|
|
|
285
285
|
offsetY: z2.number().default(4)
|
|
286
286
|
}).strict();
|
|
287
287
|
var drawFontFamilySchema = z2.enum(["heading", "body", "mono"]);
|
|
288
|
+
var strokeGradientSchema = z2.object({
|
|
289
|
+
from: colorHexSchema2,
|
|
290
|
+
to: colorHexSchema2
|
|
291
|
+
}).strict();
|
|
288
292
|
var drawRectSchema = z2.object({
|
|
289
293
|
type: z2.literal("rect"),
|
|
290
294
|
x: z2.number(),
|
|
@@ -332,6 +336,7 @@ var drawLineSchema = z2.object({
|
|
|
332
336
|
x2: z2.number(),
|
|
333
337
|
y2: z2.number(),
|
|
334
338
|
color: colorHexSchema2.default("#FFFFFF"),
|
|
339
|
+
strokeGradient: strokeGradientSchema.optional(),
|
|
335
340
|
width: z2.number().min(0.5).max(32).default(2),
|
|
336
341
|
dash: z2.array(z2.number()).max(6).optional(),
|
|
337
342
|
arrow: z2.enum(["none", "end", "start", "both"]).default("none"),
|
|
@@ -362,6 +367,7 @@ var drawBezierSchema = z2.object({
|
|
|
362
367
|
type: z2.literal("bezier"),
|
|
363
368
|
points: z2.array(drawPointSchema).min(2).max(20),
|
|
364
369
|
color: colorHexSchema2.default("#FFFFFF"),
|
|
370
|
+
strokeGradient: strokeGradientSchema.optional(),
|
|
365
371
|
width: z2.number().min(0.5).max(32).default(2),
|
|
366
372
|
dash: z2.array(z2.number()).max(6).optional(),
|
|
367
373
|
arrow: z2.enum(["none", "end", "start", "both"]).default("none"),
|
|
@@ -709,6 +715,20 @@ var stackLayoutConfigSchema = z2.object({
|
|
|
709
715
|
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
710
716
|
ellipseRy: z2.number().positive().optional()
|
|
711
717
|
}).strict();
|
|
718
|
+
var ellipseLayoutConfigSchema = z2.object({
|
|
719
|
+
mode: z2.literal("ellipse"),
|
|
720
|
+
cx: z2.number().optional(),
|
|
721
|
+
cy: z2.number().optional(),
|
|
722
|
+
rx: z2.number().positive(),
|
|
723
|
+
ry: z2.number().positive(),
|
|
724
|
+
startAngle: z2.number().default(-90),
|
|
725
|
+
/** Explicit center used by curve/arc connection routing. */
|
|
726
|
+
diagramCenter: diagramCenterSchema.optional(),
|
|
727
|
+
/** Horizontal radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
728
|
+
ellipseRx: z2.number().positive().optional(),
|
|
729
|
+
/** Vertical radius for shared ellipse used by curveMode: 'ellipse'. */
|
|
730
|
+
ellipseRy: z2.number().positive().optional()
|
|
731
|
+
}).strict();
|
|
712
732
|
var manualPositionSchema = z2.object({
|
|
713
733
|
x: z2.number().int(),
|
|
714
734
|
y: z2.number().int(),
|
|
@@ -729,6 +749,7 @@ var layoutConfigSchema = z2.discriminatedUnion("mode", [
|
|
|
729
749
|
autoLayoutConfigSchema,
|
|
730
750
|
gridLayoutConfigSchema,
|
|
731
751
|
stackLayoutConfigSchema,
|
|
752
|
+
ellipseLayoutConfigSchema,
|
|
732
753
|
manualLayoutConfigSchema
|
|
733
754
|
]);
|
|
734
755
|
var constraintsSchema = z2.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectratools/graphic-designer-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Deterministic visual content generator — code screenshots, terminal shots, flowcharts, and infographics. No browser dependency.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"sharp": "^0.34.4",
|
|
41
41
|
"shiki": "^4.0.2",
|
|
42
42
|
"zod": "^3.24.1",
|
|
43
|
-
"@spectratools/cli-shared": "0.1.
|
|
43
|
+
"@spectratools/cli-shared": "0.1.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"typescript": "5.7.3",
|