@arraypress/covers 1.4.0 → 1.6.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 +49 -0
- package/README.md +1 -1
- package/package.json +2 -2
- package/recipes/flyers/construction.json +36 -0
- package/recipes/flyers/dissolve-poster.json +72 -0
- package/recipes/flyers/fluted-poster.json +105 -0
- package/recipes/flyers/series-card.json +81 -0
- package/schema/recipe.schema.json +556 -2
- package/src/index.d.ts +5 -5
- package/src/layer-options.js +3 -1
- package/src/layers/construction.d.ts +34 -0
- package/src/layers/construction.js +137 -0
- package/src/layers/focal.d.ts +8 -0
- package/src/layers/focal.js +109 -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 +10 -4
- 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,8 @@
|
|
|
737
738
|
"crt",
|
|
738
739
|
"vhs",
|
|
739
740
|
"jpeg",
|
|
741
|
+
"print",
|
|
742
|
+
"halftoneFade",
|
|
740
743
|
"newsprint",
|
|
741
744
|
"chromatic",
|
|
742
745
|
"rgbSplit",
|
|
@@ -2589,6 +2592,97 @@
|
|
|
2589
2592
|
}
|
|
2590
2593
|
}
|
|
2591
2594
|
},
|
|
2595
|
+
{
|
|
2596
|
+
"if": {
|
|
2597
|
+
"properties": {
|
|
2598
|
+
"kind": {
|
|
2599
|
+
"const": "fluted"
|
|
2600
|
+
}
|
|
2601
|
+
},
|
|
2602
|
+
"required": [
|
|
2603
|
+
"kind"
|
|
2604
|
+
]
|
|
2605
|
+
},
|
|
2606
|
+
"then": {
|
|
2607
|
+
"properties": {
|
|
2608
|
+
"preset": {
|
|
2609
|
+
"$ref": "#/$defs/value",
|
|
2610
|
+
"description": "fluted (default) | reeded-soft | reeded-deep | reeded-prism"
|
|
2611
|
+
},
|
|
2612
|
+
"profile": {
|
|
2613
|
+
"$ref": "#/$defs/value",
|
|
2614
|
+
"description": "concave (flutes: squeezed upright, legible) | convex (reeds: turned over)"
|
|
2615
|
+
},
|
|
2616
|
+
"ribs": {
|
|
2617
|
+
"$ref": "#/$defs/value",
|
|
2618
|
+
"description": "Count across the frame."
|
|
2619
|
+
},
|
|
2620
|
+
"width": {
|
|
2621
|
+
"$ref": "#/$defs/value",
|
|
2622
|
+
"description": "Length: each rib (wins over ribs)."
|
|
2623
|
+
},
|
|
2624
|
+
"refraction": {
|
|
2625
|
+
"$ref": "#/$defs/value",
|
|
2626
|
+
"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)."
|
|
2627
|
+
},
|
|
2628
|
+
"stretch": {
|
|
2629
|
+
"$ref": "#/$defs/value",
|
|
2630
|
+
"description": "Length: the defocus, smeared along the ribs (a little across), mostly at rib edges."
|
|
2631
|
+
},
|
|
2632
|
+
"chroma": {
|
|
2633
|
+
"$ref": "#/$defs/value",
|
|
2634
|
+
"description": "0–1+: colours parted where bright content meets a rib edge."
|
|
2635
|
+
},
|
|
2636
|
+
"ridge": {
|
|
2637
|
+
"$ref": "#/$defs/value",
|
|
2638
|
+
"description": "0–1: a specular kiss down each rib, only over bright content (about 0.1)."
|
|
2639
|
+
},
|
|
2640
|
+
"grain": {
|
|
2641
|
+
"$ref": "#/$defs/value",
|
|
2642
|
+
"description": "0–1."
|
|
2643
|
+
},
|
|
2644
|
+
"angle": {
|
|
2645
|
+
"$ref": "#/$defs/value",
|
|
2646
|
+
"description": "Degrees (0: upright ribs, 90: level)."
|
|
2647
|
+
},
|
|
2648
|
+
"seed": {
|
|
2649
|
+
"$ref": "#/$defs/value",
|
|
2650
|
+
"description": "Number or string."
|
|
2651
|
+
},
|
|
2652
|
+
"mask": {
|
|
2653
|
+
"$ref": "#/$defs/value",
|
|
2654
|
+
"description": "{ gradient: linear | radial | band, from, to, center, angle, aspect, invert, ease } or { layers, invert }: where the effect applies."
|
|
2655
|
+
},
|
|
2656
|
+
"colorSpace": {
|
|
2657
|
+
"$ref": "#/$defs/value",
|
|
2658
|
+
"description": "sRGB (default) | linearRGB: where filter primitives do their arithmetic."
|
|
2659
|
+
},
|
|
2660
|
+
"pad": {
|
|
2661
|
+
"$ref": "#/$defs/value",
|
|
2662
|
+
"description": "Filter region padding, a fraction of the canvas."
|
|
2663
|
+
}
|
|
2664
|
+
},
|
|
2665
|
+
"propertyNames": {
|
|
2666
|
+
"enum": [
|
|
2667
|
+
"preset",
|
|
2668
|
+
"profile",
|
|
2669
|
+
"ribs",
|
|
2670
|
+
"width",
|
|
2671
|
+
"refraction",
|
|
2672
|
+
"stretch",
|
|
2673
|
+
"chroma",
|
|
2674
|
+
"ridge",
|
|
2675
|
+
"grain",
|
|
2676
|
+
"angle",
|
|
2677
|
+
"seed",
|
|
2678
|
+
"kind",
|
|
2679
|
+
"mask",
|
|
2680
|
+
"colorSpace",
|
|
2681
|
+
"pad"
|
|
2682
|
+
]
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
},
|
|
2592
2686
|
{
|
|
2593
2687
|
"if": {
|
|
2594
2688
|
"properties": {
|
|
@@ -4133,6 +4227,188 @@
|
|
|
4133
4227
|
}
|
|
4134
4228
|
}
|
|
4135
4229
|
},
|
|
4230
|
+
{
|
|
4231
|
+
"if": {
|
|
4232
|
+
"properties": {
|
|
4233
|
+
"kind": {
|
|
4234
|
+
"const": "print"
|
|
4235
|
+
}
|
|
4236
|
+
},
|
|
4237
|
+
"required": [
|
|
4238
|
+
"kind"
|
|
4239
|
+
]
|
|
4240
|
+
},
|
|
4241
|
+
"then": {
|
|
4242
|
+
"properties": {
|
|
4243
|
+
"finish": {
|
|
4244
|
+
"$ref": "#/$defs/value",
|
|
4245
|
+
"description": "letterpress (default) | riso | stamp"
|
|
4246
|
+
},
|
|
4247
|
+
"amount": {
|
|
4248
|
+
"$ref": "#/$defs/value",
|
|
4249
|
+
"description": "0–1+: scales breakup, specks, uneven, squeeze and grain. Default 1."
|
|
4250
|
+
},
|
|
4251
|
+
"rough": {
|
|
4252
|
+
"$ref": "#/$defs/value",
|
|
4253
|
+
"description": "Length: edge wobble."
|
|
4254
|
+
},
|
|
4255
|
+
"edge": {
|
|
4256
|
+
"$ref": "#/$defs/value",
|
|
4257
|
+
"description": "Length: how far in from the outline ink breaks up."
|
|
4258
|
+
},
|
|
4259
|
+
"breakup": {
|
|
4260
|
+
"$ref": "#/$defs/value",
|
|
4261
|
+
"description": "0–1."
|
|
4262
|
+
},
|
|
4263
|
+
"specks": {
|
|
4264
|
+
"$ref": "#/$defs/value",
|
|
4265
|
+
"description": "0–1: holes in the body."
|
|
4266
|
+
},
|
|
4267
|
+
"size": {
|
|
4268
|
+
"$ref": "#/$defs/value",
|
|
4269
|
+
"description": "Length: the speck and breakup scale."
|
|
4270
|
+
},
|
|
4271
|
+
"uneven": {
|
|
4272
|
+
"$ref": "#/$defs/value",
|
|
4273
|
+
"description": "0–1: coverage."
|
|
4274
|
+
},
|
|
4275
|
+
"squeeze": {
|
|
4276
|
+
"$ref": "#/$defs/value",
|
|
4277
|
+
"description": "0–1: a denser rim."
|
|
4278
|
+
},
|
|
4279
|
+
"grain": {
|
|
4280
|
+
"$ref": "#/$defs/value",
|
|
4281
|
+
"description": "0–1."
|
|
4282
|
+
},
|
|
4283
|
+
"seed": {
|
|
4284
|
+
"$ref": "#/$defs/value",
|
|
4285
|
+
"description": "Number."
|
|
4286
|
+
},
|
|
4287
|
+
"mask": {
|
|
4288
|
+
"$ref": "#/$defs/value",
|
|
4289
|
+
"description": "{ gradient: linear | radial | band, from, to, center, angle, aspect, invert, ease } or { layers, invert }: where the effect applies."
|
|
4290
|
+
},
|
|
4291
|
+
"colorSpace": {
|
|
4292
|
+
"$ref": "#/$defs/value",
|
|
4293
|
+
"description": "sRGB (default) | linearRGB: where filter primitives do their arithmetic."
|
|
4294
|
+
},
|
|
4295
|
+
"pad": {
|
|
4296
|
+
"$ref": "#/$defs/value",
|
|
4297
|
+
"description": "Filter region padding, a fraction of the canvas."
|
|
4298
|
+
}
|
|
4299
|
+
},
|
|
4300
|
+
"propertyNames": {
|
|
4301
|
+
"enum": [
|
|
4302
|
+
"finish",
|
|
4303
|
+
"amount",
|
|
4304
|
+
"rough",
|
|
4305
|
+
"edge",
|
|
4306
|
+
"breakup",
|
|
4307
|
+
"specks",
|
|
4308
|
+
"size",
|
|
4309
|
+
"uneven",
|
|
4310
|
+
"squeeze",
|
|
4311
|
+
"grain",
|
|
4312
|
+
"seed",
|
|
4313
|
+
"kind",
|
|
4314
|
+
"mask",
|
|
4315
|
+
"colorSpace",
|
|
4316
|
+
"pad"
|
|
4317
|
+
]
|
|
4318
|
+
}
|
|
4319
|
+
}
|
|
4320
|
+
},
|
|
4321
|
+
{
|
|
4322
|
+
"if": {
|
|
4323
|
+
"properties": {
|
|
4324
|
+
"kind": {
|
|
4325
|
+
"const": "halftoneFade"
|
|
4326
|
+
}
|
|
4327
|
+
},
|
|
4328
|
+
"required": [
|
|
4329
|
+
"kind"
|
|
4330
|
+
]
|
|
4331
|
+
},
|
|
4332
|
+
"then": {
|
|
4333
|
+
"properties": {
|
|
4334
|
+
"color": {
|
|
4335
|
+
"$ref": "#/$defs/value",
|
|
4336
|
+
"description": "The dots: a colour, none (they erase), or the colour round the edge (default)."
|
|
4337
|
+
},
|
|
4338
|
+
"direction": {
|
|
4339
|
+
"$ref": "#/$defs/value",
|
|
4340
|
+
"description": "up (default: dissolves from the bottom) | down | left | right | radial (from the edges in)"
|
|
4341
|
+
},
|
|
4342
|
+
"angle": {
|
|
4343
|
+
"$ref": "#/$defs/value",
|
|
4344
|
+
"description": "Degrees the dissolve travels (0 along x, 90 down); wins over direction."
|
|
4345
|
+
},
|
|
4346
|
+
"start": {
|
|
4347
|
+
"$ref": "#/$defs/value",
|
|
4348
|
+
"description": "0–1 along the fade: where the dots begin. Default 0.45."
|
|
4349
|
+
},
|
|
4350
|
+
"end": {
|
|
4351
|
+
"$ref": "#/$defs/value",
|
|
4352
|
+
"description": "0–1: where they have merged into solid. Default 0.92."
|
|
4353
|
+
},
|
|
4354
|
+
"curve": {
|
|
4355
|
+
"$ref": "#/$defs/value",
|
|
4356
|
+
"description": "linear (default) | ease-in | ease-out | smooth"
|
|
4357
|
+
},
|
|
4358
|
+
"cell": {
|
|
4359
|
+
"$ref": "#/$defs/value",
|
|
4360
|
+
"description": "Length: the dot pitch. Default \"2.2vmin\"."
|
|
4361
|
+
},
|
|
4362
|
+
"grid": {
|
|
4363
|
+
"$ref": "#/$defs/value",
|
|
4364
|
+
"description": "diamond (default, a 45° screen) | square"
|
|
4365
|
+
},
|
|
4366
|
+
"shape": {
|
|
4367
|
+
"$ref": "#/$defs/value",
|
|
4368
|
+
"description": "dot (default) | square | diamond"
|
|
4369
|
+
},
|
|
4370
|
+
"jitter": {
|
|
4371
|
+
"$ref": "#/$defs/value",
|
|
4372
|
+
"description": "0–1: dot sizes varied, a few strays above start."
|
|
4373
|
+
},
|
|
4374
|
+
"seed": {
|
|
4375
|
+
"$ref": "#/$defs/value",
|
|
4376
|
+
"description": "Number or string."
|
|
4377
|
+
},
|
|
4378
|
+
"mask": {
|
|
4379
|
+
"$ref": "#/$defs/value",
|
|
4380
|
+
"description": "{ gradient: linear | radial | band, from, to, center, angle, aspect, invert, ease } or { layers, invert }: where the effect applies."
|
|
4381
|
+
},
|
|
4382
|
+
"colorSpace": {
|
|
4383
|
+
"$ref": "#/$defs/value",
|
|
4384
|
+
"description": "sRGB (default) | linearRGB: where filter primitives do their arithmetic."
|
|
4385
|
+
},
|
|
4386
|
+
"pad": {
|
|
4387
|
+
"$ref": "#/$defs/value",
|
|
4388
|
+
"description": "Filter region padding, a fraction of the canvas."
|
|
4389
|
+
}
|
|
4390
|
+
},
|
|
4391
|
+
"propertyNames": {
|
|
4392
|
+
"enum": [
|
|
4393
|
+
"color",
|
|
4394
|
+
"direction",
|
|
4395
|
+
"angle",
|
|
4396
|
+
"start",
|
|
4397
|
+
"end",
|
|
4398
|
+
"curve",
|
|
4399
|
+
"cell",
|
|
4400
|
+
"grid",
|
|
4401
|
+
"shape",
|
|
4402
|
+
"jitter",
|
|
4403
|
+
"seed",
|
|
4404
|
+
"kind",
|
|
4405
|
+
"mask",
|
|
4406
|
+
"colorSpace",
|
|
4407
|
+
"pad"
|
|
4408
|
+
]
|
|
4409
|
+
}
|
|
4410
|
+
}
|
|
4411
|
+
},
|
|
4136
4412
|
{
|
|
4137
4413
|
"if": {
|
|
4138
4414
|
"properties": {
|
|
@@ -4879,7 +5155,9 @@
|
|
|
4879
5155
|
"tear",
|
|
4880
5156
|
"texture",
|
|
4881
5157
|
"mosaic",
|
|
4882
|
-
"marks"
|
|
5158
|
+
"marks",
|
|
5159
|
+
"outline",
|
|
5160
|
+
"construction"
|
|
4883
5161
|
]
|
|
4884
5162
|
},
|
|
4885
5163
|
"id": {
|
|
@@ -5476,7 +5754,7 @@
|
|
|
5476
5754
|
},
|
|
5477
5755
|
"focus": {
|
|
5478
5756
|
"$ref": "#/$defs/value",
|
|
5479
|
-
"description": "An anchor, attention or entropy."
|
|
5757
|
+
"description": "An anchor, attention or entropy; [x, y] (0–1 in the photo) to centre that point; subject: a cut-out's head centred across, its top at the box's top."
|
|
5480
5758
|
},
|
|
5481
5759
|
"region": {
|
|
5482
5760
|
"$ref": "#/$defs/value",
|
|
@@ -9384,6 +9662,282 @@
|
|
|
9384
9662
|
]
|
|
9385
9663
|
}
|
|
9386
9664
|
}
|
|
9665
|
+
},
|
|
9666
|
+
{
|
|
9667
|
+
"if": {
|
|
9668
|
+
"properties": {
|
|
9669
|
+
"type": {
|
|
9670
|
+
"const": "outline"
|
|
9671
|
+
}
|
|
9672
|
+
},
|
|
9673
|
+
"required": [
|
|
9674
|
+
"type"
|
|
9675
|
+
]
|
|
9676
|
+
},
|
|
9677
|
+
"then": {
|
|
9678
|
+
"properties": {
|
|
9679
|
+
"markup": {
|
|
9680
|
+
"$ref": "#/$defs/value",
|
|
9681
|
+
"description": "The mark's paths (512 grid)."
|
|
9682
|
+
},
|
|
9683
|
+
"x": {
|
|
9684
|
+
"$ref": "#/$defs/value",
|
|
9685
|
+
"description": "Box x, px or %."
|
|
9686
|
+
},
|
|
9687
|
+
"y": {
|
|
9688
|
+
"$ref": "#/$defs/value",
|
|
9689
|
+
"description": "Box y."
|
|
9690
|
+
},
|
|
9691
|
+
"width": {
|
|
9692
|
+
"$ref": "#/$defs/value",
|
|
9693
|
+
"description": "Box width (default the canvas)."
|
|
9694
|
+
},
|
|
9695
|
+
"height": {
|
|
9696
|
+
"$ref": "#/$defs/value",
|
|
9697
|
+
"description": "Box height."
|
|
9698
|
+
},
|
|
9699
|
+
"size": {
|
|
9700
|
+
"$ref": "#/$defs/value",
|
|
9701
|
+
"description": "Share of the box's shorter side the whole takes. Default 1."
|
|
9702
|
+
},
|
|
9703
|
+
"lines": {
|
|
9704
|
+
"$ref": "#/$defs/value",
|
|
9705
|
+
"description": "Contour lines, 0–8: the outline and more round it (0: the mark solid). Default 4."
|
|
9706
|
+
},
|
|
9707
|
+
"gap": {
|
|
9708
|
+
"$ref": "#/$defs/value",
|
|
9709
|
+
"description": "Between lines, a share of the mark's longest side. Default 0.05."
|
|
9710
|
+
},
|
|
9711
|
+
"direction": {
|
|
9712
|
+
"$ref": "#/$defs/value",
|
|
9713
|
+
"description": "out (default) | in"
|
|
9714
|
+
},
|
|
9715
|
+
"stroke": {
|
|
9716
|
+
"$ref": "#/$defs/value",
|
|
9717
|
+
"description": "Line width. Default \"0.4vmin\"."
|
|
9718
|
+
},
|
|
9719
|
+
"color": {
|
|
9720
|
+
"$ref": "#/$defs/value",
|
|
9721
|
+
"description": "Default @text."
|
|
9722
|
+
},
|
|
9723
|
+
"opacity": {
|
|
9724
|
+
"$ref": "#/$defs/value",
|
|
9725
|
+
"description": "0–1."
|
|
9726
|
+
},
|
|
9727
|
+
"blend": {
|
|
9728
|
+
"$ref": "#/$defs/value",
|
|
9729
|
+
"description": "A CSS mix-blend-mode."
|
|
9730
|
+
},
|
|
9731
|
+
"seed": {
|
|
9732
|
+
"$ref": "#/$defs/value",
|
|
9733
|
+
"description": "This layer's own random stream."
|
|
9734
|
+
},
|
|
9735
|
+
"transform": {
|
|
9736
|
+
"$ref": "#/$defs/value",
|
|
9737
|
+
"description": "{ translate, rotate, scale, skewX, skewY, mirror: x | y, origin } (on text, a case keyword is still the case)."
|
|
9738
|
+
},
|
|
9739
|
+
"effects": {
|
|
9740
|
+
"$ref": "#/$defs/effects",
|
|
9741
|
+
"description": "[{ kind, mask, colorSpace, … }]: filters, pixel effects and copies, in order (see docs/effects.md; kinds in EFFECTS)."
|
|
9742
|
+
},
|
|
9743
|
+
"mask": {
|
|
9744
|
+
"$ref": "#/$defs/value",
|
|
9745
|
+
"description": "Layers whose luminance masks this one (white shows)."
|
|
9746
|
+
},
|
|
9747
|
+
"knockout": {
|
|
9748
|
+
"$ref": "#/$defs/value",
|
|
9749
|
+
"description": "Layers cut out of this one."
|
|
9750
|
+
},
|
|
9751
|
+
"clip": {
|
|
9752
|
+
"$ref": "#/$defs/value",
|
|
9753
|
+
"description": "Layers this one shows only inside."
|
|
9754
|
+
},
|
|
9755
|
+
"area": {
|
|
9756
|
+
"$ref": "#/$defs/value",
|
|
9757
|
+
"description": "trim | safe | bleed, or { x, y, width, height } fractions: draw the layer in that box."
|
|
9758
|
+
},
|
|
9759
|
+
"motion": {
|
|
9760
|
+
"$ref": "#/$defs/motion",
|
|
9761
|
+
"description": "A motion, a preset name (drift | spin | breathe | blink | marquee), or a list: plays in the SVG as CSS keyframes (see MOTION_OPTIONS)."
|
|
9762
|
+
}
|
|
9763
|
+
},
|
|
9764
|
+
"propertyNames": {
|
|
9765
|
+
"enum": [
|
|
9766
|
+
"type",
|
|
9767
|
+
"id",
|
|
9768
|
+
"when",
|
|
9769
|
+
"markup",
|
|
9770
|
+
"x",
|
|
9771
|
+
"y",
|
|
9772
|
+
"width",
|
|
9773
|
+
"height",
|
|
9774
|
+
"size",
|
|
9775
|
+
"lines",
|
|
9776
|
+
"gap",
|
|
9777
|
+
"direction",
|
|
9778
|
+
"stroke",
|
|
9779
|
+
"color",
|
|
9780
|
+
"opacity",
|
|
9781
|
+
"blend",
|
|
9782
|
+
"seed",
|
|
9783
|
+
"transform",
|
|
9784
|
+
"effects",
|
|
9785
|
+
"mask",
|
|
9786
|
+
"knockout",
|
|
9787
|
+
"clip",
|
|
9788
|
+
"area",
|
|
9789
|
+
"motion"
|
|
9790
|
+
]
|
|
9791
|
+
}
|
|
9792
|
+
}
|
|
9793
|
+
},
|
|
9794
|
+
{
|
|
9795
|
+
"if": {
|
|
9796
|
+
"properties": {
|
|
9797
|
+
"type": {
|
|
9798
|
+
"const": "construction"
|
|
9799
|
+
}
|
|
9800
|
+
},
|
|
9801
|
+
"required": [
|
|
9802
|
+
"type"
|
|
9803
|
+
]
|
|
9804
|
+
},
|
|
9805
|
+
"then": {
|
|
9806
|
+
"properties": {
|
|
9807
|
+
"markup": {
|
|
9808
|
+
"$ref": "#/$defs/value",
|
|
9809
|
+
"description": "The mark's paths (512 grid)."
|
|
9810
|
+
},
|
|
9811
|
+
"x": {
|
|
9812
|
+
"$ref": "#/$defs/value",
|
|
9813
|
+
"description": "Box x, px or %."
|
|
9814
|
+
},
|
|
9815
|
+
"y": {
|
|
9816
|
+
"$ref": "#/$defs/value",
|
|
9817
|
+
"description": "Box y."
|
|
9818
|
+
},
|
|
9819
|
+
"width": {
|
|
9820
|
+
"$ref": "#/$defs/value",
|
|
9821
|
+
"description": "Box width (default the canvas)."
|
|
9822
|
+
},
|
|
9823
|
+
"height": {
|
|
9824
|
+
"$ref": "#/$defs/value",
|
|
9825
|
+
"description": "Box height."
|
|
9826
|
+
},
|
|
9827
|
+
"size": {
|
|
9828
|
+
"$ref": "#/$defs/value",
|
|
9829
|
+
"description": "Share of the box's shorter side the mark's longest side takes. Default 0.6."
|
|
9830
|
+
},
|
|
9831
|
+
"grid": {
|
|
9832
|
+
"$ref": "#/$defs/value",
|
|
9833
|
+
"description": "Grid cells across the mark's longest side; 0 none. Default 8."
|
|
9834
|
+
},
|
|
9835
|
+
"circles": {
|
|
9836
|
+
"$ref": "#/$defs/value",
|
|
9837
|
+
"description": "The most circles read from its curves. Default 6."
|
|
9838
|
+
},
|
|
9839
|
+
"lines": {
|
|
9840
|
+
"$ref": "#/$defs/value",
|
|
9841
|
+
"description": "The most lines read from its straight edges. Default 6."
|
|
9842
|
+
},
|
|
9843
|
+
"color": {
|
|
9844
|
+
"$ref": "#/$defs/value",
|
|
9845
|
+
"description": "The guides. Default @accent."
|
|
9846
|
+
},
|
|
9847
|
+
"gridColor": {
|
|
9848
|
+
"$ref": "#/$defs/value",
|
|
9849
|
+
"description": "Default color."
|
|
9850
|
+
},
|
|
9851
|
+
"gridOpacity": {
|
|
9852
|
+
"$ref": "#/$defs/value",
|
|
9853
|
+
"description": "Default 0.3."
|
|
9854
|
+
},
|
|
9855
|
+
"markColor": {
|
|
9856
|
+
"$ref": "#/$defs/value",
|
|
9857
|
+
"description": "Default @text; \"none\" leaves the mark out."
|
|
9858
|
+
},
|
|
9859
|
+
"over": {
|
|
9860
|
+
"$ref": "#/$defs/value",
|
|
9861
|
+
"description": "The guides' opacity over the mark, 0–1. Default 0.4."
|
|
9862
|
+
},
|
|
9863
|
+
"stroke": {
|
|
9864
|
+
"$ref": "#/$defs/value",
|
|
9865
|
+
"description": "Guide width. Default \"0.15vmin\"."
|
|
9866
|
+
},
|
|
9867
|
+
"opacity": {
|
|
9868
|
+
"$ref": "#/$defs/value",
|
|
9869
|
+
"description": "0–1."
|
|
9870
|
+
},
|
|
9871
|
+
"blend": {
|
|
9872
|
+
"$ref": "#/$defs/value",
|
|
9873
|
+
"description": "A CSS mix-blend-mode."
|
|
9874
|
+
},
|
|
9875
|
+
"seed": {
|
|
9876
|
+
"$ref": "#/$defs/value",
|
|
9877
|
+
"description": "This layer's own random stream."
|
|
9878
|
+
},
|
|
9879
|
+
"transform": {
|
|
9880
|
+
"$ref": "#/$defs/value",
|
|
9881
|
+
"description": "{ translate, rotate, scale, skewX, skewY, mirror: x | y, origin } (on text, a case keyword is still the case)."
|
|
9882
|
+
},
|
|
9883
|
+
"effects": {
|
|
9884
|
+
"$ref": "#/$defs/effects",
|
|
9885
|
+
"description": "[{ kind, mask, colorSpace, … }]: filters, pixel effects and copies, in order (see docs/effects.md; kinds in EFFECTS)."
|
|
9886
|
+
},
|
|
9887
|
+
"mask": {
|
|
9888
|
+
"$ref": "#/$defs/value",
|
|
9889
|
+
"description": "Layers whose luminance masks this one (white shows)."
|
|
9890
|
+
},
|
|
9891
|
+
"knockout": {
|
|
9892
|
+
"$ref": "#/$defs/value",
|
|
9893
|
+
"description": "Layers cut out of this one."
|
|
9894
|
+
},
|
|
9895
|
+
"clip": {
|
|
9896
|
+
"$ref": "#/$defs/value",
|
|
9897
|
+
"description": "Layers this one shows only inside."
|
|
9898
|
+
},
|
|
9899
|
+
"area": {
|
|
9900
|
+
"$ref": "#/$defs/value",
|
|
9901
|
+
"description": "trim | safe | bleed, or { x, y, width, height } fractions: draw the layer in that box."
|
|
9902
|
+
},
|
|
9903
|
+
"motion": {
|
|
9904
|
+
"$ref": "#/$defs/motion",
|
|
9905
|
+
"description": "A motion, a preset name (drift | spin | breathe | blink | marquee), or a list: plays in the SVG as CSS keyframes (see MOTION_OPTIONS)."
|
|
9906
|
+
}
|
|
9907
|
+
},
|
|
9908
|
+
"propertyNames": {
|
|
9909
|
+
"enum": [
|
|
9910
|
+
"type",
|
|
9911
|
+
"id",
|
|
9912
|
+
"when",
|
|
9913
|
+
"markup",
|
|
9914
|
+
"x",
|
|
9915
|
+
"y",
|
|
9916
|
+
"width",
|
|
9917
|
+
"height",
|
|
9918
|
+
"size",
|
|
9919
|
+
"grid",
|
|
9920
|
+
"circles",
|
|
9921
|
+
"lines",
|
|
9922
|
+
"color",
|
|
9923
|
+
"gridColor",
|
|
9924
|
+
"gridOpacity",
|
|
9925
|
+
"markColor",
|
|
9926
|
+
"over",
|
|
9927
|
+
"stroke",
|
|
9928
|
+
"opacity",
|
|
9929
|
+
"blend",
|
|
9930
|
+
"seed",
|
|
9931
|
+
"transform",
|
|
9932
|
+
"effects",
|
|
9933
|
+
"mask",
|
|
9934
|
+
"knockout",
|
|
9935
|
+
"clip",
|
|
9936
|
+
"area",
|
|
9937
|
+
"motion"
|
|
9938
|
+
]
|
|
9939
|
+
}
|
|
9940
|
+
}
|
|
9387
9941
|
}
|
|
9388
9942
|
]
|
|
9389
9943
|
}
|
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';
|
|
@@ -259,8 +259,8 @@ export interface ImageLayer extends BaseLayer {
|
|
|
259
259
|
y?: Length | `${number}%`;
|
|
260
260
|
width?: Length | `${number}%`;
|
|
261
261
|
height?: Length | `${number}%`;
|
|
262
|
-
/** Crop focus: an anchor, or (with sharp) `'attention'` / `'entropy'
|
|
263
|
-
focus?: Anchor | 'attention' | 'entropy';
|
|
262
|
+
/** Crop focus: an anchor, or (with sharp) `'attention'` / `'entropy'`; or (with sharp) a point centred in the box, `[x, y]` 0–1 in the photo, or `'subject'`, a cut-out's head centred across with its top at the box's top. Default `'center'`. */
|
|
263
|
+
focus?: Anchor | 'attention' | 'entropy' | 'subject' | [number, number];
|
|
264
264
|
/** Default the whole canvas. */
|
|
265
265
|
region?: Region;
|
|
266
266
|
/** Map tones to two colours (shadows, highlights); `true` derives them from the palette. */
|
|
@@ -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
|
@@ -14,7 +14,7 @@ export const LAYER_OPTIONS = {
|
|
|
14
14
|
radial: { colors: 'Centre → edge.', x: 'Centre x, 0–1.', y: 'Centre y, 0–1.', radius: 'Length. Default "80vmax".', ease: 'Default true.' },
|
|
15
15
|
mesh: { colors: 'Blob colours.', hues: 'Distinct colours to use. Default 3.', hueSpan: 'Keep the colours within this many degrees of hue (OKLCH): neighbouring hues only.', count: 'Blobs. Default 4.', blur: 'Length. Default "11vmax".', spread: '0–1. Default 1 (sweep), 0.7 (ring).', size: '[min, max] radius, fractions of the longer side.', base: 'Fill under the fields: "auto" (a gradient across the sweep between the first two colours; default), "bg", a colour, or null.', arrangement: 'sweep (default: long fields along one direction) | ring', angle: 'Sweep direction in degrees. Default seeded.', streak: 'How much more the sweep blurs along than across. Default 1.5.', tone: '{ l: [min, max], c: [min, max] }: pull colours into an OKLCH band.', fold: 'true or { color, to, position, bend, softness, sheen }: a second field meeting the first along a soft curve.', streaks: 'Thin light motion streaks along the sweep. Default 0.', from: 'A photo (path or bytes) to take the colours from (needs sharp).', blobs: 'Explicit [{ x, y, r, squash, rotate, color, opacity }].' },
|
|
16
16
|
stripes: { direction: 'vertical | horizontal | diagonal', angle: 'For diagonal.', count: 'Stripes. Default 8.', widths: 'even | random | taper | [weights]', taper: 'Ratio for widths: taper.', colors: 'Cycled.', gap: 'Length.', radius: 'Length.', region: '{ x, y, width, height } fractions.', regionRadius: 'Length.' },
|
|
17
|
-
image: { x: 'Box left, px or "%" (with y, width, height: an explicit box instead of region).', y: 'Box top.', width: 'Box width.', height: 'Box height.', src: 'A local path, data: URI, URL (where allowed) or bytes ("{image}").', fit: 'cover | contain | stretch', focus: 'An anchor, attention or entropy.', region: 'Fractions.', duotone: 'true or [shadow, highlight].', grayscale: 'boolean', normalize: 'Stretch tones first.', tint: 'A colour or { color, amount, blend }.', blur: 'Length.' },
|
|
17
|
+
image: { x: 'Box left, px or "%" (with y, width, height: an explicit box instead of region).', y: 'Box top.', width: 'Box width.', height: 'Box height.', src: 'A local path, data: URI, URL (where allowed) or bytes ("{image}").', fit: 'cover | contain | stretch', focus: 'An anchor, attention or entropy; [x, y] (0–1 in the photo) to centre that point; subject: a cut-out\'s head centred across, its top at the box\'s top.', region: 'Fractions.', duotone: 'true or [shadow, highlight].', grayscale: 'boolean', normalize: 'Stretch tones first.', tint: 'A colour or { color, amount, blend }.', blur: 'Length.' },
|
|
18
18
|
grain: { amount: '0–1. Default 0.08.', size: 'Grain px. Default 1.', monochrome: 'Default true.', vary: '"edges": heavier toward the edges (spray paint).' },
|
|
19
19
|
pattern: { kind: 'grid | dots | lines | rings | waves', size: 'Cell. Length.', stroke: 'Length.', color: 'Default @text.', angle: 'For lines.', center: '{ x, y } fractions.', wavelength: 'Length.', amplitude: 'Length.', fade: 'none | radial | edges | top | bottom | left | right', dash: 'dotted | dashed | [on, off] lengths.', divisions: 'Grid/lines: N equal cells (inner lines only) instead of size; [cols, rows] for a design grid.', gaps: '[{ x, y, width, height }] fractions the lines break around.', region: 'Fractions.' },
|
|
20
20
|
shapes: { kind: 'circle | square | pill | mixed', count: 'Default 6.', size: '[min, max] lengths.', colors: 'Cycled.', placement: 'scatter | row | column', items: '[{ kind, x, y, size, color, rotate, opacity }]', region: 'Fractions.', rotate: 'Tilt squares and pills.', radius: 'Square corner, fraction of size.', outline: 'true or a width.' },
|
|
@@ -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). */
|