@arraypress/covers 1.4.0 → 1.5.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/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/package.json +2 -2
- package/recipes/flyers/construction.json +36 -0
- package/recipes/flyers/fluted-poster.json +95 -0
- package/recipes/flyers/series-card.json +81 -0
- package/schema/recipe.schema.json +463 -1
- package/src/index.d.ts +3 -3
- package/src/layer-options.js +2 -0
- package/src/layers/construction.d.ts +34 -0
- package/src/layers/construction.js +137 -0
- package/src/layers/guides.d.ts +38 -0
- package/src/layers/guides.js +212 -0
- package/src/layers/index.d.ts +6 -0
- package/src/layers/index.js +3 -0
- package/src/layers/isolines.d.ts +21 -0
- package/src/layers/isolines.js +271 -0
- package/src/layers/mark-draw.d.ts +21 -0
- package/src/layers/mark-draw.js +93 -0
- package/src/layers/outline.d.ts +26 -0
- package/src/layers/outline.js +105 -0
- package/src/layers.js +2 -2
- package/src/version.js +1 -1
|
@@ -709,6 +709,7 @@
|
|
|
709
709
|
"pinch",
|
|
710
710
|
"fisheye",
|
|
711
711
|
"glass",
|
|
712
|
+
"fluted",
|
|
712
713
|
"displace",
|
|
713
714
|
"kaleidoscope",
|
|
714
715
|
"mirror",
|
|
@@ -737,6 +738,7 @@
|
|
|
737
738
|
"crt",
|
|
738
739
|
"vhs",
|
|
739
740
|
"jpeg",
|
|
741
|
+
"print",
|
|
740
742
|
"newsprint",
|
|
741
743
|
"chromatic",
|
|
742
744
|
"rgbSplit",
|
|
@@ -2589,6 +2591,97 @@
|
|
|
2589
2591
|
}
|
|
2590
2592
|
}
|
|
2591
2593
|
},
|
|
2594
|
+
{
|
|
2595
|
+
"if": {
|
|
2596
|
+
"properties": {
|
|
2597
|
+
"kind": {
|
|
2598
|
+
"const": "fluted"
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
"required": [
|
|
2602
|
+
"kind"
|
|
2603
|
+
]
|
|
2604
|
+
},
|
|
2605
|
+
"then": {
|
|
2606
|
+
"properties": {
|
|
2607
|
+
"preset": {
|
|
2608
|
+
"$ref": "#/$defs/value",
|
|
2609
|
+
"description": "fluted (default) | reeded-soft | reeded-deep | reeded-prism"
|
|
2610
|
+
},
|
|
2611
|
+
"profile": {
|
|
2612
|
+
"$ref": "#/$defs/value",
|
|
2613
|
+
"description": "concave (flutes: squeezed upright, legible) | convex (reeds: turned over)"
|
|
2614
|
+
},
|
|
2615
|
+
"ribs": {
|
|
2616
|
+
"$ref": "#/$defs/value",
|
|
2617
|
+
"description": "Count across the frame."
|
|
2618
|
+
},
|
|
2619
|
+
"width": {
|
|
2620
|
+
"$ref": "#/$defs/value",
|
|
2621
|
+
"description": "Length: each rib (wins over ribs)."
|
|
2622
|
+
},
|
|
2623
|
+
"refraction": {
|
|
2624
|
+
"$ref": "#/$defs/value",
|
|
2625
|
+
"description": "How strongly each rib bends what is behind it: how far its edge looks, in rib widths (about 1 legible; convex past 2: deep)."
|
|
2626
|
+
},
|
|
2627
|
+
"stretch": {
|
|
2628
|
+
"$ref": "#/$defs/value",
|
|
2629
|
+
"description": "Length: the defocus, smeared along the ribs (a little across), mostly at rib edges."
|
|
2630
|
+
},
|
|
2631
|
+
"chroma": {
|
|
2632
|
+
"$ref": "#/$defs/value",
|
|
2633
|
+
"description": "0–1+: colours parted where bright content meets a rib edge."
|
|
2634
|
+
},
|
|
2635
|
+
"ridge": {
|
|
2636
|
+
"$ref": "#/$defs/value",
|
|
2637
|
+
"description": "0–1: a specular kiss down each rib, only over bright content (about 0.1)."
|
|
2638
|
+
},
|
|
2639
|
+
"grain": {
|
|
2640
|
+
"$ref": "#/$defs/value",
|
|
2641
|
+
"description": "0–1."
|
|
2642
|
+
},
|
|
2643
|
+
"angle": {
|
|
2644
|
+
"$ref": "#/$defs/value",
|
|
2645
|
+
"description": "Degrees (0: upright ribs, 90: level)."
|
|
2646
|
+
},
|
|
2647
|
+
"seed": {
|
|
2648
|
+
"$ref": "#/$defs/value",
|
|
2649
|
+
"description": "Number or string."
|
|
2650
|
+
},
|
|
2651
|
+
"mask": {
|
|
2652
|
+
"$ref": "#/$defs/value",
|
|
2653
|
+
"description": "{ gradient: linear | radial | band, from, to, center, angle, aspect, invert, ease } or { layers, invert }: where the effect applies."
|
|
2654
|
+
},
|
|
2655
|
+
"colorSpace": {
|
|
2656
|
+
"$ref": "#/$defs/value",
|
|
2657
|
+
"description": "sRGB (default) | linearRGB: where filter primitives do their arithmetic."
|
|
2658
|
+
},
|
|
2659
|
+
"pad": {
|
|
2660
|
+
"$ref": "#/$defs/value",
|
|
2661
|
+
"description": "Filter region padding, a fraction of the canvas."
|
|
2662
|
+
}
|
|
2663
|
+
},
|
|
2664
|
+
"propertyNames": {
|
|
2665
|
+
"enum": [
|
|
2666
|
+
"preset",
|
|
2667
|
+
"profile",
|
|
2668
|
+
"ribs",
|
|
2669
|
+
"width",
|
|
2670
|
+
"refraction",
|
|
2671
|
+
"stretch",
|
|
2672
|
+
"chroma",
|
|
2673
|
+
"ridge",
|
|
2674
|
+
"grain",
|
|
2675
|
+
"angle",
|
|
2676
|
+
"seed",
|
|
2677
|
+
"kind",
|
|
2678
|
+
"mask",
|
|
2679
|
+
"colorSpace",
|
|
2680
|
+
"pad"
|
|
2681
|
+
]
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
},
|
|
2592
2685
|
{
|
|
2593
2686
|
"if": {
|
|
2594
2687
|
"properties": {
|
|
@@ -4133,6 +4226,97 @@
|
|
|
4133
4226
|
}
|
|
4134
4227
|
}
|
|
4135
4228
|
},
|
|
4229
|
+
{
|
|
4230
|
+
"if": {
|
|
4231
|
+
"properties": {
|
|
4232
|
+
"kind": {
|
|
4233
|
+
"const": "print"
|
|
4234
|
+
}
|
|
4235
|
+
},
|
|
4236
|
+
"required": [
|
|
4237
|
+
"kind"
|
|
4238
|
+
]
|
|
4239
|
+
},
|
|
4240
|
+
"then": {
|
|
4241
|
+
"properties": {
|
|
4242
|
+
"finish": {
|
|
4243
|
+
"$ref": "#/$defs/value",
|
|
4244
|
+
"description": "letterpress (default) | riso | stamp"
|
|
4245
|
+
},
|
|
4246
|
+
"amount": {
|
|
4247
|
+
"$ref": "#/$defs/value",
|
|
4248
|
+
"description": "0–1+: scales breakup, specks, uneven, squeeze and grain. Default 1."
|
|
4249
|
+
},
|
|
4250
|
+
"rough": {
|
|
4251
|
+
"$ref": "#/$defs/value",
|
|
4252
|
+
"description": "Length: edge wobble."
|
|
4253
|
+
},
|
|
4254
|
+
"edge": {
|
|
4255
|
+
"$ref": "#/$defs/value",
|
|
4256
|
+
"description": "Length: how far in from the outline ink breaks up."
|
|
4257
|
+
},
|
|
4258
|
+
"breakup": {
|
|
4259
|
+
"$ref": "#/$defs/value",
|
|
4260
|
+
"description": "0–1."
|
|
4261
|
+
},
|
|
4262
|
+
"specks": {
|
|
4263
|
+
"$ref": "#/$defs/value",
|
|
4264
|
+
"description": "0–1: holes in the body."
|
|
4265
|
+
},
|
|
4266
|
+
"size": {
|
|
4267
|
+
"$ref": "#/$defs/value",
|
|
4268
|
+
"description": "Length: the speck and breakup scale."
|
|
4269
|
+
},
|
|
4270
|
+
"uneven": {
|
|
4271
|
+
"$ref": "#/$defs/value",
|
|
4272
|
+
"description": "0–1: coverage."
|
|
4273
|
+
},
|
|
4274
|
+
"squeeze": {
|
|
4275
|
+
"$ref": "#/$defs/value",
|
|
4276
|
+
"description": "0–1: a denser rim."
|
|
4277
|
+
},
|
|
4278
|
+
"grain": {
|
|
4279
|
+
"$ref": "#/$defs/value",
|
|
4280
|
+
"description": "0–1."
|
|
4281
|
+
},
|
|
4282
|
+
"seed": {
|
|
4283
|
+
"$ref": "#/$defs/value",
|
|
4284
|
+
"description": "Number."
|
|
4285
|
+
},
|
|
4286
|
+
"mask": {
|
|
4287
|
+
"$ref": "#/$defs/value",
|
|
4288
|
+
"description": "{ gradient: linear | radial | band, from, to, center, angle, aspect, invert, ease } or { layers, invert }: where the effect applies."
|
|
4289
|
+
},
|
|
4290
|
+
"colorSpace": {
|
|
4291
|
+
"$ref": "#/$defs/value",
|
|
4292
|
+
"description": "sRGB (default) | linearRGB: where filter primitives do their arithmetic."
|
|
4293
|
+
},
|
|
4294
|
+
"pad": {
|
|
4295
|
+
"$ref": "#/$defs/value",
|
|
4296
|
+
"description": "Filter region padding, a fraction of the canvas."
|
|
4297
|
+
}
|
|
4298
|
+
},
|
|
4299
|
+
"propertyNames": {
|
|
4300
|
+
"enum": [
|
|
4301
|
+
"finish",
|
|
4302
|
+
"amount",
|
|
4303
|
+
"rough",
|
|
4304
|
+
"edge",
|
|
4305
|
+
"breakup",
|
|
4306
|
+
"specks",
|
|
4307
|
+
"size",
|
|
4308
|
+
"uneven",
|
|
4309
|
+
"squeeze",
|
|
4310
|
+
"grain",
|
|
4311
|
+
"seed",
|
|
4312
|
+
"kind",
|
|
4313
|
+
"mask",
|
|
4314
|
+
"colorSpace",
|
|
4315
|
+
"pad"
|
|
4316
|
+
]
|
|
4317
|
+
}
|
|
4318
|
+
}
|
|
4319
|
+
},
|
|
4136
4320
|
{
|
|
4137
4321
|
"if": {
|
|
4138
4322
|
"properties": {
|
|
@@ -4879,7 +5063,9 @@
|
|
|
4879
5063
|
"tear",
|
|
4880
5064
|
"texture",
|
|
4881
5065
|
"mosaic",
|
|
4882
|
-
"marks"
|
|
5066
|
+
"marks",
|
|
5067
|
+
"outline",
|
|
5068
|
+
"construction"
|
|
4883
5069
|
]
|
|
4884
5070
|
},
|
|
4885
5071
|
"id": {
|
|
@@ -9384,6 +9570,282 @@
|
|
|
9384
9570
|
]
|
|
9385
9571
|
}
|
|
9386
9572
|
}
|
|
9573
|
+
},
|
|
9574
|
+
{
|
|
9575
|
+
"if": {
|
|
9576
|
+
"properties": {
|
|
9577
|
+
"type": {
|
|
9578
|
+
"const": "outline"
|
|
9579
|
+
}
|
|
9580
|
+
},
|
|
9581
|
+
"required": [
|
|
9582
|
+
"type"
|
|
9583
|
+
]
|
|
9584
|
+
},
|
|
9585
|
+
"then": {
|
|
9586
|
+
"properties": {
|
|
9587
|
+
"markup": {
|
|
9588
|
+
"$ref": "#/$defs/value",
|
|
9589
|
+
"description": "The mark's paths (512 grid)."
|
|
9590
|
+
},
|
|
9591
|
+
"x": {
|
|
9592
|
+
"$ref": "#/$defs/value",
|
|
9593
|
+
"description": "Box x, px or %."
|
|
9594
|
+
},
|
|
9595
|
+
"y": {
|
|
9596
|
+
"$ref": "#/$defs/value",
|
|
9597
|
+
"description": "Box y."
|
|
9598
|
+
},
|
|
9599
|
+
"width": {
|
|
9600
|
+
"$ref": "#/$defs/value",
|
|
9601
|
+
"description": "Box width (default the canvas)."
|
|
9602
|
+
},
|
|
9603
|
+
"height": {
|
|
9604
|
+
"$ref": "#/$defs/value",
|
|
9605
|
+
"description": "Box height."
|
|
9606
|
+
},
|
|
9607
|
+
"size": {
|
|
9608
|
+
"$ref": "#/$defs/value",
|
|
9609
|
+
"description": "Share of the box's shorter side the whole takes. Default 1."
|
|
9610
|
+
},
|
|
9611
|
+
"lines": {
|
|
9612
|
+
"$ref": "#/$defs/value",
|
|
9613
|
+
"description": "Contour lines, 0–8: the outline and more round it (0: the mark solid). Default 4."
|
|
9614
|
+
},
|
|
9615
|
+
"gap": {
|
|
9616
|
+
"$ref": "#/$defs/value",
|
|
9617
|
+
"description": "Between lines, a share of the mark's longest side. Default 0.05."
|
|
9618
|
+
},
|
|
9619
|
+
"direction": {
|
|
9620
|
+
"$ref": "#/$defs/value",
|
|
9621
|
+
"description": "out (default) | in"
|
|
9622
|
+
},
|
|
9623
|
+
"stroke": {
|
|
9624
|
+
"$ref": "#/$defs/value",
|
|
9625
|
+
"description": "Line width. Default \"0.4vmin\"."
|
|
9626
|
+
},
|
|
9627
|
+
"color": {
|
|
9628
|
+
"$ref": "#/$defs/value",
|
|
9629
|
+
"description": "Default @text."
|
|
9630
|
+
},
|
|
9631
|
+
"opacity": {
|
|
9632
|
+
"$ref": "#/$defs/value",
|
|
9633
|
+
"description": "0–1."
|
|
9634
|
+
},
|
|
9635
|
+
"blend": {
|
|
9636
|
+
"$ref": "#/$defs/value",
|
|
9637
|
+
"description": "A CSS mix-blend-mode."
|
|
9638
|
+
},
|
|
9639
|
+
"seed": {
|
|
9640
|
+
"$ref": "#/$defs/value",
|
|
9641
|
+
"description": "This layer's own random stream."
|
|
9642
|
+
},
|
|
9643
|
+
"transform": {
|
|
9644
|
+
"$ref": "#/$defs/value",
|
|
9645
|
+
"description": "{ translate, rotate, scale, skewX, skewY, mirror: x | y, origin } (on text, a case keyword is still the case)."
|
|
9646
|
+
},
|
|
9647
|
+
"effects": {
|
|
9648
|
+
"$ref": "#/$defs/effects",
|
|
9649
|
+
"description": "[{ kind, mask, colorSpace, … }]: filters, pixel effects and copies, in order (see docs/effects.md; kinds in EFFECTS)."
|
|
9650
|
+
},
|
|
9651
|
+
"mask": {
|
|
9652
|
+
"$ref": "#/$defs/value",
|
|
9653
|
+
"description": "Layers whose luminance masks this one (white shows)."
|
|
9654
|
+
},
|
|
9655
|
+
"knockout": {
|
|
9656
|
+
"$ref": "#/$defs/value",
|
|
9657
|
+
"description": "Layers cut out of this one."
|
|
9658
|
+
},
|
|
9659
|
+
"clip": {
|
|
9660
|
+
"$ref": "#/$defs/value",
|
|
9661
|
+
"description": "Layers this one shows only inside."
|
|
9662
|
+
},
|
|
9663
|
+
"area": {
|
|
9664
|
+
"$ref": "#/$defs/value",
|
|
9665
|
+
"description": "trim | safe | bleed, or { x, y, width, height } fractions: draw the layer in that box."
|
|
9666
|
+
},
|
|
9667
|
+
"motion": {
|
|
9668
|
+
"$ref": "#/$defs/motion",
|
|
9669
|
+
"description": "A motion, a preset name (drift | spin | breathe | blink | marquee), or a list: plays in the SVG as CSS keyframes (see MOTION_OPTIONS)."
|
|
9670
|
+
}
|
|
9671
|
+
},
|
|
9672
|
+
"propertyNames": {
|
|
9673
|
+
"enum": [
|
|
9674
|
+
"type",
|
|
9675
|
+
"id",
|
|
9676
|
+
"when",
|
|
9677
|
+
"markup",
|
|
9678
|
+
"x",
|
|
9679
|
+
"y",
|
|
9680
|
+
"width",
|
|
9681
|
+
"height",
|
|
9682
|
+
"size",
|
|
9683
|
+
"lines",
|
|
9684
|
+
"gap",
|
|
9685
|
+
"direction",
|
|
9686
|
+
"stroke",
|
|
9687
|
+
"color",
|
|
9688
|
+
"opacity",
|
|
9689
|
+
"blend",
|
|
9690
|
+
"seed",
|
|
9691
|
+
"transform",
|
|
9692
|
+
"effects",
|
|
9693
|
+
"mask",
|
|
9694
|
+
"knockout",
|
|
9695
|
+
"clip",
|
|
9696
|
+
"area",
|
|
9697
|
+
"motion"
|
|
9698
|
+
]
|
|
9699
|
+
}
|
|
9700
|
+
}
|
|
9701
|
+
},
|
|
9702
|
+
{
|
|
9703
|
+
"if": {
|
|
9704
|
+
"properties": {
|
|
9705
|
+
"type": {
|
|
9706
|
+
"const": "construction"
|
|
9707
|
+
}
|
|
9708
|
+
},
|
|
9709
|
+
"required": [
|
|
9710
|
+
"type"
|
|
9711
|
+
]
|
|
9712
|
+
},
|
|
9713
|
+
"then": {
|
|
9714
|
+
"properties": {
|
|
9715
|
+
"markup": {
|
|
9716
|
+
"$ref": "#/$defs/value",
|
|
9717
|
+
"description": "The mark's paths (512 grid)."
|
|
9718
|
+
},
|
|
9719
|
+
"x": {
|
|
9720
|
+
"$ref": "#/$defs/value",
|
|
9721
|
+
"description": "Box x, px or %."
|
|
9722
|
+
},
|
|
9723
|
+
"y": {
|
|
9724
|
+
"$ref": "#/$defs/value",
|
|
9725
|
+
"description": "Box y."
|
|
9726
|
+
},
|
|
9727
|
+
"width": {
|
|
9728
|
+
"$ref": "#/$defs/value",
|
|
9729
|
+
"description": "Box width (default the canvas)."
|
|
9730
|
+
},
|
|
9731
|
+
"height": {
|
|
9732
|
+
"$ref": "#/$defs/value",
|
|
9733
|
+
"description": "Box height."
|
|
9734
|
+
},
|
|
9735
|
+
"size": {
|
|
9736
|
+
"$ref": "#/$defs/value",
|
|
9737
|
+
"description": "Share of the box's shorter side the mark's longest side takes. Default 0.6."
|
|
9738
|
+
},
|
|
9739
|
+
"grid": {
|
|
9740
|
+
"$ref": "#/$defs/value",
|
|
9741
|
+
"description": "Grid cells across the mark's longest side; 0 none. Default 8."
|
|
9742
|
+
},
|
|
9743
|
+
"circles": {
|
|
9744
|
+
"$ref": "#/$defs/value",
|
|
9745
|
+
"description": "The most circles read from its curves. Default 6."
|
|
9746
|
+
},
|
|
9747
|
+
"lines": {
|
|
9748
|
+
"$ref": "#/$defs/value",
|
|
9749
|
+
"description": "The most lines read from its straight edges. Default 6."
|
|
9750
|
+
},
|
|
9751
|
+
"color": {
|
|
9752
|
+
"$ref": "#/$defs/value",
|
|
9753
|
+
"description": "The guides. Default @accent."
|
|
9754
|
+
},
|
|
9755
|
+
"gridColor": {
|
|
9756
|
+
"$ref": "#/$defs/value",
|
|
9757
|
+
"description": "Default color."
|
|
9758
|
+
},
|
|
9759
|
+
"gridOpacity": {
|
|
9760
|
+
"$ref": "#/$defs/value",
|
|
9761
|
+
"description": "Default 0.3."
|
|
9762
|
+
},
|
|
9763
|
+
"markColor": {
|
|
9764
|
+
"$ref": "#/$defs/value",
|
|
9765
|
+
"description": "Default @text; \"none\" leaves the mark out."
|
|
9766
|
+
},
|
|
9767
|
+
"over": {
|
|
9768
|
+
"$ref": "#/$defs/value",
|
|
9769
|
+
"description": "The guides' opacity over the mark, 0–1. Default 0.4."
|
|
9770
|
+
},
|
|
9771
|
+
"stroke": {
|
|
9772
|
+
"$ref": "#/$defs/value",
|
|
9773
|
+
"description": "Guide width. Default \"0.15vmin\"."
|
|
9774
|
+
},
|
|
9775
|
+
"opacity": {
|
|
9776
|
+
"$ref": "#/$defs/value",
|
|
9777
|
+
"description": "0–1."
|
|
9778
|
+
},
|
|
9779
|
+
"blend": {
|
|
9780
|
+
"$ref": "#/$defs/value",
|
|
9781
|
+
"description": "A CSS mix-blend-mode."
|
|
9782
|
+
},
|
|
9783
|
+
"seed": {
|
|
9784
|
+
"$ref": "#/$defs/value",
|
|
9785
|
+
"description": "This layer's own random stream."
|
|
9786
|
+
},
|
|
9787
|
+
"transform": {
|
|
9788
|
+
"$ref": "#/$defs/value",
|
|
9789
|
+
"description": "{ translate, rotate, scale, skewX, skewY, mirror: x | y, origin } (on text, a case keyword is still the case)."
|
|
9790
|
+
},
|
|
9791
|
+
"effects": {
|
|
9792
|
+
"$ref": "#/$defs/effects",
|
|
9793
|
+
"description": "[{ kind, mask, colorSpace, … }]: filters, pixel effects and copies, in order (see docs/effects.md; kinds in EFFECTS)."
|
|
9794
|
+
},
|
|
9795
|
+
"mask": {
|
|
9796
|
+
"$ref": "#/$defs/value",
|
|
9797
|
+
"description": "Layers whose luminance masks this one (white shows)."
|
|
9798
|
+
},
|
|
9799
|
+
"knockout": {
|
|
9800
|
+
"$ref": "#/$defs/value",
|
|
9801
|
+
"description": "Layers cut out of this one."
|
|
9802
|
+
},
|
|
9803
|
+
"clip": {
|
|
9804
|
+
"$ref": "#/$defs/value",
|
|
9805
|
+
"description": "Layers this one shows only inside."
|
|
9806
|
+
},
|
|
9807
|
+
"area": {
|
|
9808
|
+
"$ref": "#/$defs/value",
|
|
9809
|
+
"description": "trim | safe | bleed, or { x, y, width, height } fractions: draw the layer in that box."
|
|
9810
|
+
},
|
|
9811
|
+
"motion": {
|
|
9812
|
+
"$ref": "#/$defs/motion",
|
|
9813
|
+
"description": "A motion, a preset name (drift | spin | breathe | blink | marquee), or a list: plays in the SVG as CSS keyframes (see MOTION_OPTIONS)."
|
|
9814
|
+
}
|
|
9815
|
+
},
|
|
9816
|
+
"propertyNames": {
|
|
9817
|
+
"enum": [
|
|
9818
|
+
"type",
|
|
9819
|
+
"id",
|
|
9820
|
+
"when",
|
|
9821
|
+
"markup",
|
|
9822
|
+
"x",
|
|
9823
|
+
"y",
|
|
9824
|
+
"width",
|
|
9825
|
+
"height",
|
|
9826
|
+
"size",
|
|
9827
|
+
"grid",
|
|
9828
|
+
"circles",
|
|
9829
|
+
"lines",
|
|
9830
|
+
"color",
|
|
9831
|
+
"gridColor",
|
|
9832
|
+
"gridOpacity",
|
|
9833
|
+
"markColor",
|
|
9834
|
+
"over",
|
|
9835
|
+
"stroke",
|
|
9836
|
+
"opacity",
|
|
9837
|
+
"blend",
|
|
9838
|
+
"seed",
|
|
9839
|
+
"transform",
|
|
9840
|
+
"effects",
|
|
9841
|
+
"mask",
|
|
9842
|
+
"knockout",
|
|
9843
|
+
"clip",
|
|
9844
|
+
"area",
|
|
9845
|
+
"motion"
|
|
9846
|
+
]
|
|
9847
|
+
}
|
|
9848
|
+
}
|
|
9387
9849
|
}
|
|
9388
9850
|
]
|
|
9389
9851
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ import type { RepeatLayer } from './layers/repeat.js';
|
|
|
14
14
|
import type { TextSpan } from './type/spans.js';
|
|
15
15
|
import type { GlyphControl } from './type/glyphs.js';
|
|
16
16
|
import type { Cut } from './formats/cut.js';
|
|
17
|
-
import type { ShapeLayer, SvgLayer, TableLayer, BarcodeLayer, PerforationLayer, TearLayer, TextureLayer, MosaicLayer, MarksLayer } from './layers/index.js';
|
|
17
|
+
import type { ShapeLayer, SvgLayer, TableLayer, BarcodeLayer, PerforationLayer, TearLayer, TextureLayer, MosaicLayer, MarksLayer, OutlineLayer, ConstructionLayer } from './layers/index.js';
|
|
18
18
|
import type { Zones, PrintInfo, FormatName } from './formats/index.js';
|
|
19
19
|
import type { Motion, MotionPreset, Easing } from './animate/index.js';
|
|
20
20
|
|
|
21
21
|
export type { RepeatLayer, DefsLayer, UseLayer, TextSpan, GlyphControl, Cut, Motion, MotionPreset, Easing };
|
|
22
|
-
export type { Color, Length, Rng, LayerTransform, EffectKind, Paint, TextPath, GroupLayer, ShapeLayer, SvgLayer, TableLayer, BarcodeLayer, PerforationLayer, TearLayer, TextureLayer, MosaicLayer, MarksLayer, Zones, PrintInfo, FormatName };
|
|
22
|
+
export type { Color, Length, Rng, LayerTransform, EffectKind, Paint, TextPath, GroupLayer, ShapeLayer, SvgLayer, TableLayer, BarcodeLayer, PerforationLayer, TearLayer, TextureLayer, MosaicLayer, MarksLayer, OutlineLayer, ConstructionLayer, Zones, PrintInfo, FormatName };
|
|
23
23
|
export type { ShapeSpec, TableCell } from './layers/index.js';
|
|
24
24
|
export type { Format } from './formats/index.js';
|
|
25
25
|
export type { LintIssue } from './lint/index.js';
|
|
@@ -720,7 +720,7 @@ export interface RuleLayer extends BaseLayer {
|
|
|
720
720
|
}
|
|
721
721
|
|
|
722
722
|
export type Layer =
|
|
723
|
-
| GroupLayer | ShapeLayer | SvgLayer | TableLayer | BarcodeLayer | PerforationLayer | TearLayer | TextureLayer | MosaicLayer | MarksLayer
|
|
723
|
+
| GroupLayer | ShapeLayer | SvgLayer | TableLayer | BarcodeLayer | PerforationLayer | TearLayer | TextureLayer | MosaicLayer | MarksLayer | OutlineLayer | ConstructionLayer
|
|
724
724
|
| InkLayer | DitherLayer | ContourLayer | WaveformLayer | TilesLayer | RuleLayer
|
|
725
725
|
| DiagramLayer | PaperLayer | ScribbleLayer
|
|
726
726
|
| SolidLayer | LinearLayer | RadialLayer | MeshLayer | StripesLayer | ImageLayer
|
package/src/layer-options.js
CHANGED
|
@@ -45,6 +45,8 @@ export const LAYER_OPTIONS = {
|
|
|
45
45
|
texture: { kind: 'paper | creases | concrete | speck | wood | folds | dust', color: 'Fibre, aggregate or dust colour.', amount: 'Paper: fibre density.', frequency: 'Noise frequency (number or [x, y]).', octaves: 'Noise octaves.', depth: 'Creases: relief.', azimuth: 'Creases: light direction.', elevation: 'Creases: light height.', x: 'Folds: vertical fold positions, fractions.', y: 'Folds: horizontal fold positions, fractions.', width: 'Folds: band width.', strength: 'Folds: shading.', count: 'Dust: specks.', size: 'Dust: [min, max] radius.', region: 'Clip to { x, y, width, height } (px or "%").' },
|
|
46
46
|
mosaic: { markup: 'The mark\'s paths (512 grid).', x: 'Box x, px or %.', y: 'Box y.', width: 'Box width (default the canvas).', height: 'Box height.', cells: 'Cells across the mark\'s longest side, 4–48. Default 10.', gap: 'Gap between cells, a share of a cell. Default 0.12.', radius: 'Cell corner radius, a share of a cell. Default 0.', drop: 'Share of filled cells left out (seeded), 0–0.9. Default 0.12.', color: 'Default @accent.', accent: 'asterisk | dot: a small glyph in one empty cell beside the mark.', accentColor: 'Default color.' },
|
|
47
47
|
marks: { marks: 'The marks: paths on a 512 grid (or { markup }).', cols: 'Default from the count: 3 × 3 up to 10 × 7.', rows: 'Default from the count.', x: 'Box x, px or %.', y: 'Box y.', width: 'Box width (default the canvas).', height: 'Box height.', size: 'Share of a cell a mark\'s area takes. Default 0.5.', optical: 'false: fit each mark\'s bounds to the same box instead. Default true.', color: 'Default @text.' },
|
|
48
|
+
outline: { markup: 'The mark\'s paths (512 grid).', x: 'Box x, px or %.', y: 'Box y.', width: 'Box width (default the canvas).', height: 'Box height.', size: 'Share of the box\'s shorter side the whole takes. Default 1.', lines: 'Contour lines, 0–8: the outline and more round it (0: the mark solid). Default 4.', gap: 'Between lines, a share of the mark\'s longest side. Default 0.05.', direction: 'out (default) | in', stroke: 'Line width. Default "0.4vmin".', color: 'Default @text.' },
|
|
49
|
+
construction: { markup: 'The mark\'s paths (512 grid).', x: 'Box x, px or %.', y: 'Box y.', width: 'Box width (default the canvas).', height: 'Box height.', size: 'Share of the box\'s shorter side the mark\'s longest side takes. Default 0.6.', grid: 'Grid cells across the mark\'s longest side; 0 none. Default 8.', circles: 'The most circles read from its curves. Default 6.', lines: 'The most lines read from its straight edges. Default 6.', color: 'The guides. Default @accent.', gridColor: 'Default color.', gridOpacity: 'Default 0.3.', markColor: 'Default @text; "none" leaves the mark out.', over: 'The guides\' opacity over the mark, 0–1. Default 0.4.', stroke: 'Guide width. Default "0.15vmin".' },
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
/** @type {Record<string, string>} Options every layer takes (besides type, id and when). */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// The `construction` layer.
|
|
2
|
+
import type { Color, Length, BaseLayer } from '../index.js';
|
|
3
|
+
import type { RenderContext, Markup } from '../render/context.js';
|
|
4
|
+
|
|
5
|
+
export interface ConstructionLayer extends BaseLayer {
|
|
6
|
+
type: 'construction';
|
|
7
|
+
/** The mark's paths, on a 512 grid. */
|
|
8
|
+
markup: string;
|
|
9
|
+
/** The box the sheet fills (default the canvas); the mark is centred in it. */
|
|
10
|
+
x?: Length | `${number}%`; y?: Length | `${number}%`; width?: Length | `${number}%`; height?: Length | `${number}%`;
|
|
11
|
+
/** The share of the box's shorter side the mark's longest side takes. Default 0.6. */
|
|
12
|
+
size?: number;
|
|
13
|
+
/** Grid cells across the mark's longest side; 0 none. Default 8. */
|
|
14
|
+
grid?: number;
|
|
15
|
+
/** The most circles read from its curves. Default 6. */
|
|
16
|
+
circles?: number;
|
|
17
|
+
/** The most lines read from its straight edges. Default 6. */
|
|
18
|
+
lines?: number;
|
|
19
|
+
/** The guides. Default the palette's accent. */
|
|
20
|
+
color?: Color;
|
|
21
|
+
/** Default `color`. */
|
|
22
|
+
gridColor?: Color;
|
|
23
|
+
/** Default 0.3. */
|
|
24
|
+
gridOpacity?: number;
|
|
25
|
+
/** Default the palette's text; `'none'` leaves the mark out. */
|
|
26
|
+
markColor?: Color | 'none';
|
|
27
|
+
/** The guides' opacity over the mark, 0–1. Default 0.4. */
|
|
28
|
+
over?: number;
|
|
29
|
+
/** Guide width. Default `'0.15vmin'`. */
|
|
30
|
+
stroke?: Length;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Draw a mark over its own construction: grid, box, centre cross, its circles and lines. */
|
|
34
|
+
export function construction(layer: ConstructionLayer, ctx: RenderContext): Markup;
|