@shotstack/schemas 1.7.1 → 1.8.2

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.
Files changed (36) hide show
  1. package/README.md +89 -89
  2. package/dist/api.bundled.json +49 -833
  3. package/dist/json-schema/asset.json +84 -855
  4. package/dist/json-schema/clip.json +84 -855
  5. package/dist/json-schema/edit.json +84 -855
  6. package/dist/json-schema/rich-caption-asset.json +221 -140
  7. package/dist/json-schema/schemas.json +93 -951
  8. package/dist/json-schema/svg-asset.json +6 -857
  9. package/dist/json-schema/timeline.json +84 -855
  10. package/dist/json-schema/track.json +84 -855
  11. package/dist/schema.d.ts +43 -660
  12. package/dist/zod/zod.gen.cjs +914 -1640
  13. package/dist/zod/zod.gen.d.ts +306 -8714
  14. package/dist/zod/zod.gen.js +911 -1636
  15. package/dist/zod/zod.gen.ts +1593 -1880
  16. package/package.json +79 -79
  17. package/dist/json-schema/svg-arrow-shape.json +0 -49
  18. package/dist/json-schema/svg-circle-shape.json +0 -28
  19. package/dist/json-schema/svg-cross-shape.json +0 -42
  20. package/dist/json-schema/svg-ellipse-shape.json +0 -35
  21. package/dist/json-schema/svg-fill.json +0 -169
  22. package/dist/json-schema/svg-gradient-stop.json +0 -25
  23. package/dist/json-schema/svg-heart-shape.json +0 -28
  24. package/dist/json-schema/svg-line-shape.json +0 -35
  25. package/dist/json-schema/svg-linear-gradient-fill.json +0 -80
  26. package/dist/json-schema/svg-path-shape.json +0 -26
  27. package/dist/json-schema/svg-polygon-shape.json +0 -35
  28. package/dist/json-schema/svg-radial-gradient-fill.json +0 -66
  29. package/dist/json-schema/svg-rectangle-shape.json +0 -49
  30. package/dist/json-schema/svg-ring-shape.json +0 -35
  31. package/dist/json-schema/svg-shadow.json +0 -79
  32. package/dist/json-schema/svg-shape.json +0 -404
  33. package/dist/json-schema/svg-solid-fill.json +0 -40
  34. package/dist/json-schema/svg-star-shape.json +0 -42
  35. package/dist/json-schema/svg-stroke.json +0 -115
  36. package/dist/json-schema/svg-transform.json +0 -93
@@ -1934,7 +1934,49 @@
1934
1934
  },
1935
1935
  "font": {
1936
1936
  "description": "Font styling properties for inactive words.",
1937
- "$ref": "#/components/schemas/RichTextFont"
1937
+ "properties": {
1938
+ "family": {
1939
+ "description": "The font family name. This must be the Family name embedded in the font, i.e. \"Roboto\".",
1940
+ "type": "string",
1941
+ "example": "Roboto",
1942
+ "default": "Roboto"
1943
+ },
1944
+ "size": {
1945
+ "description": "The size of the font in pixels (px). Must be between 1 and 500.",
1946
+ "type": "integer",
1947
+ "minimum": 1,
1948
+ "maximum": 500,
1949
+ "default": 24,
1950
+ "example": 48
1951
+ },
1952
+ "weight": {
1953
+ "description": "The weight of the font. Can be a number (100-900) or a string ('normal', 'bold', etc.). 100 is lightest, 900 is heaviest (boldest).",
1954
+ "default": "400"
1955
+ },
1956
+ "color": {
1957
+ "description": "The text color using hexadecimal color notation.",
1958
+ "type": "string",
1959
+ "pattern": "^#[A-Fa-f0-9]{6}$",
1960
+ "default": "#ffffff",
1961
+ "example": "#ffffff"
1962
+ },
1963
+ "opacity": {
1964
+ "description": "The opacity of the text where 1 is opaque and 0 is transparent.",
1965
+ "type": "number",
1966
+ "minimum": 0,
1967
+ "maximum": 1,
1968
+ "default": 1,
1969
+ "example": 0.9
1970
+ },
1971
+ "background": {
1972
+ "description": "The background color behind the text using hexadecimal color notation.",
1973
+ "type": "string",
1974
+ "pattern": "^#[A-Fa-f0-9]{6}$",
1975
+ "example": "#000000"
1976
+ }
1977
+ },
1978
+ "additionalProperties": false,
1979
+ "type": "object"
1938
1980
  },
1939
1981
  "style": {
1940
1982
  "description": "Text style properties including spacing, line height, and transformations.",
@@ -2461,11 +2503,11 @@
2461
2503
  ]
2462
2504
  },
2463
2505
  "SvgAsset": {
2464
- "description": "The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.\nIt provides two mutually exclusive ways to define shapes:\n\n**Option 1: Import SVG markup using `src`**\n```json\n{\n \"type\": \"svg\",\n \"src\": \"<svg width=\\\"100\\\" height=\\\"100\\\"><circle cx=\\\"50\\\" cy=\\\"50\\\" r=\\\"40\\\" fill=\\\"#FF0000\\\"/></svg>\"\n}\n```\nWhen using `src`, no other properties are allowed. The fill, stroke, and dimensions\nare automatically extracted from the SVG markup.\n\n**Option 2: Define shapes programmatically using `shape`**\n```json\n{\n \"type\": \"svg\",\n \"shape\": { \"type\": \"circle\", \"radius\": 50 },\n \"fill\": { \"type\": \"solid\", \"color\": \"#FF0000\" }\n}\n```\nWhen using `shape`, you can customize fill, stroke, shadow, transform, and other properties.\nThe `src` property is not allowed in this mode.\n\n**Important:** You must provide either `src` OR `shape`, but not both.\nThese two modes are mutually exclusive.\n\n**Available Shapes (Option 2 only):**\n- `rectangle` - Rectangles with optional rounded corners\n- `circle` - Perfect circles\n- `ellipse` - Ellipses/ovals with separate x and y radii\n- `line` - Straight lines with configurable thickness\n- `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)\n- `star` - Multi-pointed stars\n- `arrow` - Directional arrows\n- `heart` - Heart shapes\n- `cross` - Plus/cross shapes\n- `ring` - Donut/ring shapes\n- `path` - Custom shapes using SVG path data\n\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.\n",
2506
+ "description": "The SvgAsset is used to create scalable vector graphic (SVG) assets using\nraw SVG markup.\n\n```json\n{\n \"type\": \"svg\",\n \"src\": \"<svg width=\\\"100\\\" height=\\\"100\\\"><circle cx=\\\"50\\\" cy=\\\"50\\\" r=\\\"40\\\" fill=\\\"#FF0000\\\"/></svg>\"\n}\n```\n\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for SVG markup syntax.\n",
2465
2507
  "type": "object",
2466
2508
  "properties": {
2467
2509
  "type": {
2468
- "description": "The asset type - set to `svg` for SVG shapes.",
2510
+ "description": "The asset type - set to `svg` for SVG assets.",
2469
2511
  "type": "string",
2470
2512
  "enum": [
2471
2513
  "svg"
@@ -2474,847 +2516,21 @@
2474
2516
  "example": "svg"
2475
2517
  },
2476
2518
  "src": {
2477
- "description": "Raw SVG markup string to import. When provided, the shape is extracted\nautomatically from the SVG content.\n\n**Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,\n`<line>`, `<polygon>`, `<polyline>`\n\n**Automatically extracted:**\n- Path data (converted to a single combined path)\n- Fill color (from `fill` attribute or `style`)\n- Stroke color and width (from attributes or `style`)\n- Dimensions (from `width`/`height` or `viewBox`)\n- Opacity (from `opacity` attribute)\n\n**Important:** When using `src`, no other properties (shape, fill, stroke, etc.)\nare allowed. All styling must be defined within the SVG markup itself.\n",
2519
+ "description": "Raw SVG markup string to import.\n\n**Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,\n`<line>`, `<polygon>`, `<polyline>`\n",
2478
2520
  "type": "string",
2479
2521
  "minLength": 1,
2480
2522
  "maxLength": 500000,
2481
2523
  "example": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#3498db\"/></svg>"
2482
- },
2483
- "shape": {
2484
- "description": "The shape definition using primitives. The `type` property within determines\nthe shape kind and its specific properties.\n\n**Important:** When using `shape`, the `src` property is not allowed.\n",
2485
- "$ref": "#/components/schemas/SvgShape"
2486
- },
2487
- "fill": {
2488
- "description": "Fill properties for the shape interior.\nCan be a solid color or a gradient (linear/radial).\nIf omitted, the shape will have no fill (transparent interior).\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2489
- "$ref": "#/components/schemas/SvgFill"
2490
- },
2491
- "stroke": {
2492
- "description": "Stroke (outline) properties for the shape.\nIf omitted, the shape will have no stroke (no outline).\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2493
- "$ref": "#/components/schemas/SvgStroke"
2494
- },
2495
- "shadow": {
2496
- "description": "Drop shadow properties for the shape.\nCreates a shadow effect behind the shape.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2497
- "$ref": "#/components/schemas/SvgShadow"
2498
- },
2499
- "transform": {
2500
- "description": "Transform properties for positioning, rotating, and scaling the shape.\nThe transform is applied relative to the transformation origin.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2501
- "$ref": "#/components/schemas/SvgTransform"
2502
- },
2503
- "opacity": {
2504
- "description": "The overall opacity of the entire shape (including fill, stroke, and shadow).\n`1` is fully opaque, `0` is fully transparent.\nThis is applied on top of individual fill/stroke/shadow opacity values.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2505
- "type": "number",
2506
- "minimum": 0,
2507
- "maximum": 1,
2508
- "default": 1,
2509
- "example": 1
2510
- },
2511
- "width": {
2512
- "description": "The width of the bounding box in pixels.\nIf specified, the shape may be scaled to fit within this width.\nIf omitted, the shape uses its natural dimensions.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2513
- "type": "integer",
2514
- "minimum": 1,
2515
- "maximum": 4096,
2516
- "example": 400
2517
- },
2518
- "height": {
2519
- "description": "The height of the bounding box in pixels.\nIf specified, the shape may be scaled to fit within this height.\nIf omitted, the shape uses its natural dimensions.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
2520
- "type": "integer",
2521
- "minimum": 1,
2522
- "maximum": 4096,
2523
- "example": 300
2524
2524
  }
2525
2525
  },
2526
2526
  "additionalProperties": false,
2527
2527
  "required": [
2528
- "type"
2528
+ "type",
2529
+ "src"
2529
2530
  ],
2530
2531
  "example": {
2531
2532
  "type": "svg",
2532
- "shape": {
2533
- "type": "star",
2534
- "points": 5,
2535
- "outerRadius": 100,
2536
- "innerRadius": 50
2537
- },
2538
- "fill": {
2539
- "type": "linear",
2540
- "angle": 45,
2541
- "stops": [
2542
- {
2543
- "offset": 0,
2544
- "color": "#FFD700"
2545
- },
2546
- {
2547
- "offset": 1,
2548
- "color": "#FF6B6B"
2549
- }
2550
- ],
2551
- "opacity": 1
2552
- },
2553
- "stroke": {
2554
- "color": "#2C3E50",
2555
- "width": 3,
2556
- "opacity": 1,
2557
- "lineCap": "round",
2558
- "lineJoin": "round"
2559
- },
2560
- "transform": {
2561
- "x": 200,
2562
- "y": 150,
2563
- "rotation": 0,
2564
- "scale": 1
2565
- },
2566
- "opacity": 1
2567
- }
2568
- },
2569
- "SvgShape": {
2570
- "description": "The shape definition for an SVG asset. Each shape type has its own specific\nproperties. The `type` field determines which shape is rendered.\n",
2571
- "oneOf": [
2572
- {
2573
- "$ref": "#/components/schemas/SvgRectangleShape"
2574
- },
2575
- {
2576
- "$ref": "#/components/schemas/SvgCircleShape"
2577
- },
2578
- {
2579
- "$ref": "#/components/schemas/SvgEllipseShape"
2580
- },
2581
- {
2582
- "$ref": "#/components/schemas/SvgLineShape"
2583
- },
2584
- {
2585
- "$ref": "#/components/schemas/SvgPolygonShape"
2586
- },
2587
- {
2588
- "$ref": "#/components/schemas/SvgStarShape"
2589
- },
2590
- {
2591
- "$ref": "#/components/schemas/SvgArrowShape"
2592
- },
2593
- {
2594
- "$ref": "#/components/schemas/SvgHeartShape"
2595
- },
2596
- {
2597
- "$ref": "#/components/schemas/SvgCrossShape"
2598
- },
2599
- {
2600
- "$ref": "#/components/schemas/SvgRingShape"
2601
- },
2602
- {
2603
- "$ref": "#/components/schemas/SvgPathShape"
2604
- }
2605
- ],
2606
- "discriminator": {
2607
- "propertyName": "type",
2608
- "mapping": {
2609
- "rectangle": "#/components/schemas/SvgRectangleShape",
2610
- "circle": "#/components/schemas/SvgCircleShape",
2611
- "ellipse": "#/components/schemas/SvgEllipseShape",
2612
- "line": "#/components/schemas/SvgLineShape",
2613
- "polygon": "#/components/schemas/SvgPolygonShape",
2614
- "star": "#/components/schemas/SvgStarShape",
2615
- "arrow": "#/components/schemas/SvgArrowShape",
2616
- "heart": "#/components/schemas/SvgHeartShape",
2617
- "cross": "#/components/schemas/SvgCrossShape",
2618
- "ring": "#/components/schemas/SvgRingShape",
2619
- "path": "#/components/schemas/SvgPathShape"
2620
- }
2621
- }
2622
- },
2623
- "SvgRectangleShape": {
2624
- "description": "A rectangle shape with optional rounded corners.\nThe rectangle is defined by its width and height dimensions.\n",
2625
- "type": "object",
2626
- "additionalProperties": false,
2627
- "properties": {
2628
- "type": {
2629
- "description": "The shape type - set to `rectangle`.",
2630
- "type": "string",
2631
- "enum": [
2632
- "rectangle"
2633
- ]
2634
- },
2635
- "width": {
2636
- "description": "The width of the rectangle in pixels.",
2637
- "type": "number",
2638
- "minimum": 1,
2639
- "maximum": 4096,
2640
- "example": 200
2641
- },
2642
- "height": {
2643
- "description": "The height of the rectangle in pixels.",
2644
- "type": "number",
2645
- "minimum": 1,
2646
- "maximum": 4096,
2647
- "example": 100
2648
- },
2649
- "cornerRadius": {
2650
- "description": "The corner radius for rounded corners in pixels.\nSet to `0` for sharp corners. The radius is automatically clamped\nto half of the smallest dimension.\n",
2651
- "type": "number",
2652
- "minimum": 0,
2653
- "maximum": 2048,
2654
- "default": 0,
2655
- "example": 10
2656
- }
2657
- },
2658
- "required": [
2659
- "type",
2660
- "width",
2661
- "height"
2662
- ]
2663
- },
2664
- "SvgCircleShape": {
2665
- "description": "A perfect circle shape defined by its radius.\nThe circle is centered at the shape's position.\n",
2666
- "type": "object",
2667
- "additionalProperties": false,
2668
- "properties": {
2669
- "type": {
2670
- "description": "The shape type - set to `circle`.",
2671
- "type": "string",
2672
- "enum": [
2673
- "circle"
2674
- ]
2675
- },
2676
- "radius": {
2677
- "description": "The radius of the circle in pixels.",
2678
- "type": "number",
2679
- "minimum": 1,
2680
- "maximum": 2048,
2681
- "example": 50
2682
- }
2683
- },
2684
- "required": [
2685
- "type",
2686
- "radius"
2687
- ]
2688
- },
2689
- "SvgEllipseShape": {
2690
- "description": "An ellipse (oval) shape with separate horizontal and vertical radii.\nThe ellipse is centered at the shape's position.\n",
2691
- "type": "object",
2692
- "additionalProperties": false,
2693
- "properties": {
2694
- "type": {
2695
- "description": "The shape type - set to `ellipse`.",
2696
- "type": "string",
2697
- "enum": [
2698
- "ellipse"
2699
- ]
2700
- },
2701
- "radiusX": {
2702
- "description": "The horizontal radius (semi-major axis) in pixels.",
2703
- "type": "number",
2704
- "minimum": 1,
2705
- "maximum": 2048,
2706
- "example": 80
2707
- },
2708
- "radiusY": {
2709
- "description": "The vertical radius (semi-minor axis) in pixels.",
2710
- "type": "number",
2711
- "minimum": 1,
2712
- "maximum": 2048,
2713
- "example": 50
2714
- }
2715
- },
2716
- "required": [
2717
- "type",
2718
- "radiusX",
2719
- "radiusY"
2720
- ]
2721
- },
2722
- "SvgLineShape": {
2723
- "description": "A straight line shape with a specified length and thickness.\nThe line is drawn horizontally by default and can be rotated using transform.\n",
2724
- "type": "object",
2725
- "additionalProperties": false,
2726
- "properties": {
2727
- "type": {
2728
- "description": "The shape type - set to `line`.",
2729
- "type": "string",
2730
- "enum": [
2731
- "line"
2732
- ]
2733
- },
2734
- "length": {
2735
- "description": "The length of the line in pixels.",
2736
- "type": "number",
2737
- "minimum": 1,
2738
- "maximum": 4096,
2739
- "example": 100
2740
- },
2741
- "thickness": {
2742
- "description": "The thickness of the line in pixels.",
2743
- "type": "number",
2744
- "minimum": 1,
2745
- "maximum": 500,
2746
- "example": 4
2747
- }
2748
- },
2749
- "required": [
2750
- "type",
2751
- "length",
2752
- "thickness"
2753
- ]
2754
- },
2755
- "SvgPolygonShape": {
2756
- "description": "A regular polygon shape with a specified number of sides.\nExamples: triangle (3), square (4), pentagon (5), hexagon (6), etc.\nThe polygon is inscribed in a circle of the given radius.\n",
2757
- "type": "object",
2758
- "additionalProperties": false,
2759
- "properties": {
2760
- "type": {
2761
- "description": "The shape type - set to `polygon`.",
2762
- "type": "string",
2763
- "enum": [
2764
- "polygon"
2765
- ]
2766
- },
2767
- "sides": {
2768
- "description": "The number of sides of the polygon.\nMinimum 3 (triangle), maximum 100 for practical use.\n",
2769
- "type": "integer",
2770
- "minimum": 3,
2771
- "maximum": 100,
2772
- "example": 6
2773
- },
2774
- "radius": {
2775
- "description": "The radius of the circumscribed circle in pixels.\nThis determines the size of the polygon.\n",
2776
- "type": "number",
2777
- "minimum": 1,
2778
- "maximum": 2048,
2779
- "example": 50
2780
- }
2781
- },
2782
- "required": [
2783
- "type",
2784
- "sides",
2785
- "radius"
2786
- ]
2787
- },
2788
- "SvgStarShape": {
2789
- "description": "A star shape with a specified number of points.\nThe star is defined by outer and inner radii, creating the characteristic\npointed appearance.\n",
2790
- "type": "object",
2791
- "additionalProperties": false,
2792
- "properties": {
2793
- "type": {
2794
- "description": "The shape type - set to `star`.",
2795
- "type": "string",
2796
- "enum": [
2797
- "star"
2798
- ]
2799
- },
2800
- "points": {
2801
- "description": "The number of points on the star.\nMinimum 3 for a triangle-like star, typically 5 for a classic star.\n",
2802
- "type": "integer",
2803
- "minimum": 3,
2804
- "maximum": 100,
2805
- "example": 5
2806
- },
2807
- "outerRadius": {
2808
- "description": "The outer radius in pixels - the distance from center to the tips of the points.\n",
2809
- "type": "number",
2810
- "minimum": 1,
2811
- "maximum": 2048,
2812
- "example": 50
2813
- },
2814
- "innerRadius": {
2815
- "description": "The inner radius in pixels - the distance from center to the inner vertices.\nShould be smaller than outerRadius for a star effect.\n",
2816
- "type": "number",
2817
- "minimum": 1,
2818
- "maximum": 2048,
2819
- "example": 25
2820
- }
2821
- },
2822
- "required": [
2823
- "type",
2824
- "points",
2825
- "outerRadius",
2826
- "innerRadius"
2827
- ]
2828
- },
2829
- "SvgArrowShape": {
2830
- "description": "An arrow shape pointing to the right by default.\nUse transform rotation to change direction.\n",
2831
- "type": "object",
2832
- "additionalProperties": false,
2833
- "properties": {
2834
- "type": {
2835
- "description": "The shape type - set to `arrow`.",
2836
- "type": "string",
2837
- "enum": [
2838
- "arrow"
2839
- ]
2840
- },
2841
- "length": {
2842
- "description": "The total length of the arrow from tail to tip in pixels.",
2843
- "type": "number",
2844
- "minimum": 1,
2845
- "maximum": 4096,
2846
- "example": 100
2847
- },
2848
- "headWidth": {
2849
- "description": "The width of the arrow head (the widest part) in pixels.",
2850
- "type": "number",
2851
- "minimum": 1,
2852
- "maximum": 1000,
2853
- "example": 40
2854
- },
2855
- "headLength": {
2856
- "description": "The length of the arrow head portion in pixels.",
2857
- "type": "number",
2858
- "minimum": 1,
2859
- "maximum": 1000,
2860
- "example": 30
2861
- },
2862
- "shaftWidth": {
2863
- "description": "The width of the arrow shaft (body) in pixels.",
2864
- "type": "number",
2865
- "minimum": 1,
2866
- "maximum": 1000,
2867
- "example": 20
2868
- }
2869
- },
2870
- "required": [
2871
- "type",
2872
- "length",
2873
- "headWidth",
2874
- "headLength",
2875
- "shaftWidth"
2876
- ]
2877
- },
2878
- "SvgHeartShape": {
2879
- "description": "A heart shape commonly used for love/like icons.\nThe heart is defined by a single size parameter.\n",
2880
- "type": "object",
2881
- "additionalProperties": false,
2882
- "properties": {
2883
- "type": {
2884
- "description": "The shape type - set to `heart`.",
2885
- "type": "string",
2886
- "enum": [
2887
- "heart"
2888
- ]
2889
- },
2890
- "size": {
2891
- "description": "The size of the heart in pixels.\nThis determines both the width and height proportionally.\n",
2892
- "type": "number",
2893
- "minimum": 1,
2894
- "maximum": 4096,
2895
- "example": 100
2896
- }
2897
- },
2898
- "required": [
2899
- "type",
2900
- "size"
2901
- ]
2902
- },
2903
- "SvgCrossShape": {
2904
- "description": "A cross or plus shape with equal or different arm lengths.\nCan be styled as a plus sign (+) or a cross (x with rotation).\n",
2905
- "type": "object",
2906
- "additionalProperties": false,
2907
- "properties": {
2908
- "type": {
2909
- "description": "The shape type - set to `cross`.",
2910
- "type": "string",
2911
- "enum": [
2912
- "cross"
2913
- ]
2914
- },
2915
- "width": {
2916
- "description": "The total width of the cross in pixels.",
2917
- "type": "number",
2918
- "minimum": 1,
2919
- "maximum": 4096,
2920
- "example": 100
2921
- },
2922
- "height": {
2923
- "description": "The total height of the cross in pixels.",
2924
- "type": "number",
2925
- "minimum": 1,
2926
- "maximum": 4096,
2927
- "example": 100
2928
- },
2929
- "thickness": {
2930
- "description": "The thickness of the cross arms in pixels.",
2931
- "type": "number",
2932
- "minimum": 1,
2933
- "maximum": 500,
2934
- "example": 20
2935
- }
2936
- },
2937
- "required": [
2938
- "type",
2939
- "width",
2940
- "height",
2941
- "thickness"
2942
- ]
2943
- },
2944
- "SvgRingShape": {
2945
- "description": "A ring (donut/annulus) shape - a circle with a circular hole in the center.\nThe ring is defined by outer and inner radii.\n",
2946
- "type": "object",
2947
- "additionalProperties": false,
2948
- "properties": {
2949
- "type": {
2950
- "description": "The shape type - set to `ring`.",
2951
- "type": "string",
2952
- "enum": [
2953
- "ring"
2954
- ]
2955
- },
2956
- "outerRadius": {
2957
- "description": "The outer radius of the ring in pixels.",
2958
- "type": "number",
2959
- "minimum": 1,
2960
- "maximum": 2048,
2961
- "example": 50
2962
- },
2963
- "innerRadius": {
2964
- "description": "The inner radius (hole) of the ring in pixels.\nMust be smaller than outerRadius.\n",
2965
- "type": "number",
2966
- "minimum": 0,
2967
- "maximum": 2048,
2968
- "example": 30
2969
- }
2970
- },
2971
- "required": [
2972
- "type",
2973
- "outerRadius",
2974
- "innerRadius"
2975
- ]
2976
- },
2977
- "SvgPathShape": {
2978
- "description": "A custom shape defined by SVG path data.\nSupports all standard SVG path commands for creating complex shapes.\n\n**Path Commands:**\n- `M x y` / `m dx dy` - Move to (absolute/relative)\n- `L x y` / `l dx dy` - Line to\n- `H x` / `h dx` - Horizontal line to\n- `V y` / `v dy` - Vertical line to\n- `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve\n- `S x2 y2 x y` / `s` - Smooth cubic Bezier\n- `Q x1 y1 x y` / `q` - Quadratic Bezier curve\n- `T x y` / `t` - Smooth quadratic Bezier\n- `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc\n- `Z` / `z` - Close path\n",
2979
- "type": "object",
2980
- "additionalProperties": false,
2981
- "properties": {
2982
- "type": {
2983
- "description": "The shape type - set to `path`.",
2984
- "type": "string",
2985
- "enum": [
2986
- "path"
2987
- ]
2988
- },
2989
- "d": {
2990
- "description": "The SVG path data string defining the shape.\nUses standard SVG path commands (M, L, C, Q, A, Z, etc.).\nExample: `M 0 0 L 100 0 L 100 100 L 0 100 Z` draws a square.\n",
2991
- "type": "string",
2992
- "minLength": 1,
2993
- "maxLength": 100000,
2994
- "example": "M 0 0 L 100 0 L 50 86.6 Z"
2995
- }
2996
- },
2997
- "required": [
2998
- "type",
2999
- "d"
3000
- ]
3001
- },
3002
- "SvgFill": {
3003
- "description": "Fill properties for SVG shapes. Supports solid colors and gradients.\nThe fill defines how the interior of a shape is painted.\n",
3004
- "oneOf": [
3005
- {
3006
- "$ref": "#/components/schemas/SvgSolidFill"
3007
- },
3008
- {
3009
- "$ref": "#/components/schemas/SvgLinearGradientFill"
3010
- },
3011
- {
3012
- "$ref": "#/components/schemas/SvgRadialGradientFill"
3013
- }
3014
- ],
3015
- "discriminator": {
3016
- "propertyName": "type",
3017
- "mapping": {
3018
- "solid": "#/components/schemas/SvgSolidFill",
3019
- "linear": "#/components/schemas/SvgLinearGradientFill",
3020
- "radial": "#/components/schemas/SvgRadialGradientFill"
3021
- }
3022
- }
3023
- },
3024
- "SvgSolidFill": {
3025
- "description": "A solid color fill for SVG shapes.",
3026
- "type": "object",
3027
- "additionalProperties": false,
3028
- "properties": {
3029
- "type": {
3030
- "description": "The fill type - set to `solid` for a single color fill.",
3031
- "type": "string",
3032
- "enum": [
3033
- "solid"
3034
- ],
3035
- "default": "solid"
3036
- },
3037
- "color": {
3038
- "description": "The fill color using hexadecimal color notation (e.g., `#FF0000` for red).\nMust be a 6-digit hex color code prefixed with `#`.\n",
3039
- "type": "string",
3040
- "pattern": "^#[A-Fa-f0-9]{6}$",
3041
- "default": "#000000",
3042
- "example": "#3498db"
3043
- },
3044
- "opacity": {
3045
- "description": "The opacity of the fill where `1` is fully opaque and `0` is fully transparent.\nValues between 0 and 1 create semi-transparent fills.\n",
3046
- "type": "number",
3047
- "minimum": 0,
3048
- "maximum": 1,
3049
- "default": 1,
3050
- "example": 0.8
3051
- }
3052
- },
3053
- "required": [
3054
- "type",
3055
- "color"
3056
- ]
3057
- },
3058
- "SvgLinearGradientFill": {
3059
- "description": "A linear gradient fill that transitions colors along a straight line.\nThe gradient direction is controlled by the `angle` property.\n",
3060
- "type": "object",
3061
- "additionalProperties": false,
3062
- "properties": {
3063
- "type": {
3064
- "description": "The fill type - set to `linear` for a linear gradient fill.",
3065
- "type": "string",
3066
- "enum": [
3067
- "linear"
3068
- ]
3069
- },
3070
- "angle": {
3071
- "description": "The angle of the gradient in degrees. `0` is horizontal (left to right),\n`90` is vertical (bottom to top), `180` is right to left, etc.\n",
3072
- "type": "number",
3073
- "minimum": 0,
3074
- "maximum": 360,
3075
- "default": 0,
3076
- "example": 45
3077
- },
3078
- "stops": {
3079
- "description": "Array of color stops that define the gradient colors and their positions.\nMust have at least 2 stops. Offsets should increase from 0 to 1.\n",
3080
- "type": "array",
3081
- "minItems": 2,
3082
- "items": {
3083
- "$ref": "#/components/schemas/SvgGradientStop"
3084
- }
3085
- },
3086
- "opacity": {
3087
- "description": "The overall opacity of the gradient where `1` is fully opaque and `0` is fully transparent.\n",
3088
- "type": "number",
3089
- "minimum": 0,
3090
- "maximum": 1,
3091
- "default": 1,
3092
- "example": 1
3093
- }
3094
- },
3095
- "required": [
3096
- "type",
3097
- "stops"
3098
- ]
3099
- },
3100
- "SvgRadialGradientFill": {
3101
- "description": "A radial gradient fill that transitions colors radiating outward from a center point.\nThe gradient creates a circular or elliptical color transition.\n",
3102
- "type": "object",
3103
- "additionalProperties": false,
3104
- "properties": {
3105
- "type": {
3106
- "description": "The fill type - set to `radial` for a radial gradient fill.",
3107
- "type": "string",
3108
- "enum": [
3109
- "radial"
3110
- ]
3111
- },
3112
- "stops": {
3113
- "description": "Array of color stops that define the gradient colors and their positions.\nMust have at least 2 stops. Offset `0` is the center, `1` is the outer edge.\n",
3114
- "type": "array",
3115
- "minItems": 2,
3116
- "items": {
3117
- "$ref": "#/components/schemas/SvgGradientStop"
3118
- }
3119
- },
3120
- "opacity": {
3121
- "description": "The overall opacity of the gradient where `1` is fully opaque and `0` is fully transparent.\n",
3122
- "type": "number",
3123
- "minimum": 0,
3124
- "maximum": 1,
3125
- "default": 1,
3126
- "example": 1
3127
- }
3128
- },
3129
- "required": [
3130
- "type",
3131
- "stops"
3132
- ]
3133
- },
3134
- "SvgGradientStop": {
3135
- "description": "A color stop in a gradient. Each stop defines a color at a specific position\nalong the gradient vector. Gradients require at least 2 stops.\n",
3136
- "type": "object",
3137
- "additionalProperties": false,
3138
- "properties": {
3139
- "offset": {
3140
- "description": "Position of the color stop along the gradient vector.\n`0` represents the start and `1` represents the end of the gradient.\n",
3141
- "type": "number",
3142
- "minimum": 0,
3143
- "maximum": 1,
3144
- "example": 0.5
3145
- },
3146
- "color": {
3147
- "description": "The color at this stop using hexadecimal color notation.",
3148
- "type": "string",
3149
- "pattern": "^#[A-Fa-f0-9]{6}$",
3150
- "example": "#e74c3c"
3151
- }
3152
- },
3153
- "required": [
3154
- "offset",
3155
- "color"
3156
- ]
3157
- },
3158
- "SvgStroke": {
3159
- "description": "Stroke (outline) properties for SVG shapes. The stroke defines how the outline\nof a shape is painted, including its color, width, and line style.\n",
3160
- "type": "object",
3161
- "additionalProperties": false,
3162
- "properties": {
3163
- "color": {
3164
- "description": "The stroke color using hexadecimal color notation.",
3165
- "type": "string",
3166
- "pattern": "^#[A-Fa-f0-9]{6}$",
3167
- "default": "#000000",
3168
- "example": "#2c3e50"
3169
- },
3170
- "width": {
3171
- "description": "The width of the stroke in pixels. Must be greater than 0.\nLarger values create thicker outlines.\n",
3172
- "type": "number",
3173
- "minimum": 0,
3174
- "maximum": 100,
3175
- "default": 1,
3176
- "example": 2
3177
- },
3178
- "opacity": {
3179
- "description": "The opacity of the stroke where `1` is opaque and `0` is transparent.",
3180
- "type": "number",
3181
- "minimum": 0,
3182
- "maximum": 1,
3183
- "default": 1,
3184
- "example": 1
3185
- },
3186
- "lineCap": {
3187
- "description": "The shape at the end of open paths (lines, polylines, unclosed paths).\n<ul>\n <li>`butt` - flat edge perpendicular to the line (default)</li>\n <li>`round` - semicircular cap extending beyond the endpoint</li>\n <li>`square` - rectangular cap extending beyond the endpoint</li>\n</ul>\n",
3188
- "type": "string",
3189
- "enum": [
3190
- "butt",
3191
- "round",
3192
- "square"
3193
- ],
3194
- "default": "butt",
3195
- "example": "round"
3196
- },
3197
- "lineJoin": {
3198
- "description": "The shape at the corners where two lines meet.\n<ul>\n <li>`miter` - sharp corner (default)</li>\n <li>`round` - rounded corner</li>\n <li>`bevel` - flattened corner</li>\n</ul>\n",
3199
- "type": "string",
3200
- "enum": [
3201
- "miter",
3202
- "round",
3203
- "bevel"
3204
- ],
3205
- "default": "miter",
3206
- "example": "round"
3207
- },
3208
- "dashArray": {
3209
- "description": "Pattern of dashes and gaps for the stroke. An array of numbers where\nodd indices are dash lengths and even indices are gap lengths.\nFor example, `[10, 5]` creates 10px dashes with 5px gaps.\n`[10, 5, 2, 5]` creates alternating 10px and 2px dashes with 5px gaps.\n",
3210
- "type": "array",
3211
- "items": {
3212
- "type": "number",
3213
- "minimum": 0
3214
- },
3215
- "example": [
3216
- 10,
3217
- 5
3218
- ]
3219
- },
3220
- "dashOffset": {
3221
- "description": "Offset for the dash pattern. Positive values shift the pattern\nforward along the path, negative values shift it backward.\n",
3222
- "type": "number",
3223
- "default": 0,
3224
- "example": 5
3225
- }
3226
- }
3227
- },
3228
- "SvgShadow": {
3229
- "description": "Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.\n",
3230
- "type": "object",
3231
- "additionalProperties": false,
3232
- "properties": {
3233
- "offsetX": {
3234
- "description": "Horizontal offset of the shadow in pixels.\nPositive values move the shadow to the right, negative to the left.\n",
3235
- "type": "number",
3236
- "default": 0,
3237
- "example": 4
3238
- },
3239
- "offsetY": {
3240
- "description": "Vertical offset of the shadow in pixels.\nPositive values move the shadow down, negative values move it up.\n",
3241
- "type": "number",
3242
- "default": 0,
3243
- "example": 4
3244
- },
3245
- "blur": {
3246
- "description": "The blur radius of the shadow in pixels. Must be 0 or greater.",
3247
- "type": "number",
3248
- "minimum": 0,
3249
- "default": 0,
3250
- "example": 8
3251
- },
3252
- "color": {
3253
- "description": "The shadow color using hexadecimal color notation.",
3254
- "type": "string",
3255
- "pattern": "^#[A-Fa-f0-9]{6}$",
3256
- "default": "#000000",
3257
- "example": "#000000"
3258
- },
3259
- "opacity": {
3260
- "description": "The opacity of the shadow where `1` is opaque and `0` is transparent.",
3261
- "type": "number",
3262
- "minimum": 0,
3263
- "maximum": 1,
3264
- "default": 0.5,
3265
- "example": 0.3
3266
- }
3267
- }
3268
- },
3269
- "SvgTransform": {
3270
- "description": "Transformation properties for positioning, rotating, and scaling SVG shapes.\n",
3271
- "type": "object",
3272
- "additionalProperties": false,
3273
- "properties": {
3274
- "x": {
3275
- "description": "The x-coordinate position of the shape in pixels.\nRelative to the top-left corner of the viewport.\n",
3276
- "type": "number",
3277
- "default": 0,
3278
- "example": 100
3279
- },
3280
- "y": {
3281
- "description": "The y-coordinate position of the shape in pixels.\nRelative to the top-left corner of the viewport.\n",
3282
- "type": "number",
3283
- "default": 0,
3284
- "example": 100
3285
- },
3286
- "rotation": {
3287
- "description": "Rotation angle in degrees. Positive values rotate clockwise,\nnegative values rotate counter-clockwise. Range: -360 to 360.\n",
3288
- "type": "number",
3289
- "minimum": -360,
3290
- "maximum": 360,
3291
- "default": 0,
3292
- "example": 45
3293
- },
3294
- "scale": {
3295
- "description": "Scale factor for the shape. `1` is original size, `2` is double size,\n`0.5` is half size. Must be greater than 0.\n",
3296
- "type": "number",
3297
- "minimum": 0.01,
3298
- "maximum": 100,
3299
- "default": 1,
3300
- "example": 1.5
3301
- },
3302
- "originX": {
3303
- "description": "The x-coordinate of the transformation origin as a value from 0 to 1.\n`0` is the left edge, `0.5` is the center, `1` is the right edge.\n",
3304
- "type": "number",
3305
- "minimum": 0,
3306
- "maximum": 1,
3307
- "default": 0.5,
3308
- "example": 0.5
3309
- },
3310
- "originY": {
3311
- "description": "The y-coordinate of the transformation origin as a value from 0 to 1.\n`0` is the top edge, `0.5` is the center, `1` is the bottom edge.\n",
3312
- "type": "number",
3313
- "minimum": 0,
3314
- "maximum": 1,
3315
- "default": 0.5,
3316
- "example": 0.5
3317
- }
2533
+ "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#3498db\"/></svg>"
3318
2534
  }
3319
2535
  },
3320
2536
  "Transition": {