@idle-screens/schema 3.13.0 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idle-screens/schema",
3
- "version": "3.13.0",
3
+ "version": "3.15.0",
4
4
  "description": "Declarative, agent-authorable saver format for idle-screens: validate a data spec, then compile it into a runnable, seeded, flash-safe SaverPlugin.",
5
5
  "license": "MIT",
6
6
  "author": "Shawn Partridge",
@@ -41,6 +41,9 @@
41
41
  "saver-spec.schema.json",
42
42
  "FORMAT.md"
43
43
  ],
44
+ "dependencies": {
45
+ "@idle-screens/validator": "^0.1.1"
46
+ },
44
47
  "peerDependencies": {
45
48
  "@idle-screens/core": "^0.4.7"
46
49
  },
@@ -47,10 +47,20 @@
47
47
  "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 0.5, "description": "Unit-box units (0.01 = 1% of the drawing's half-size)." },
48
48
  "opacity": { "type": "number", "minimum": 0, "maximum": 1 },
49
49
  "join": { "enum": ["round", "miter", "bevel"] },
50
- "cap": { "enum": ["round", "butt", "square"] }
50
+ "cap": { "enum": ["round", "butt", "square"] },
51
+ "draw": { "$ref": "#/definitions/strokeDraw" }
51
52
  },
52
53
  "description": "An outline along every subpath as drawn."
53
54
  },
55
+ "strokeDraw": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "start": { "type": "number", "minimum": 0, "maximum": 1, "description": "Where the painted stretch begins, as a fraction of the line's length (default 0)." },
60
+ "end": { "type": "number", "minimum": 0, "maximum": 1, "description": "Where it ends (default 1). Glide end 0 \u2192 1 to draw the line on; glide start after it to erase from the tail." }
61
+ },
62
+ "description": "Draw-on: paint only the stretch of the line from start to end (paint; glides). start >= end paints nothing. Native: ignored (whole line)."
63
+ },
54
64
  "pathPart": {
55
65
  "type": "object",
56
66
  "required": ["path"],
@@ -150,6 +160,12 @@
150
160
  "type": "number",
151
161
  "exclusiveMinimum": 0,
152
162
  "maximum": 1
163
+ },
164
+ "rise": {
165
+ "type": "number",
166
+ "minimum": 0,
167
+ "maximum": 1,
168
+ "description": "glyphFade only: each glyph rises into its line from this many em below as it fades in. Native: ignored."
153
169
  }
154
170
  },
155
171
  "description": "Animated reveal controls for a text block."
@@ -705,7 +721,13 @@
705
721
  "additionalProperties": false,
706
722
  "properties": {
707
723
  "type": { "const": "list" },
708
- "gap": { "type": "number", "exclusiveMinimum": 0, "description": "Row pitch in viewport units of min(w,h) (px in px specs). Default 0.06 / 40 px." }
724
+ "gap": {
725
+ "oneOf": [
726
+ { "type": "number", "exclusiveMinimum": 0 },
727
+ { "type": "object", "additionalProperties": false, "properties": { "x": { "type": "number", "exclusiveMinimum": 0 }, "y": { "type": "number", "exclusiveMinimum": 0 } } }
728
+ ],
729
+ "description": "Row pitch in viewport units of min(w,h) (px in px specs), a number or {x?, y?} where only y (the row pitch) applies to a one-column list. Default 0.06 / 40 px."
730
+ }
709
731
  },
710
732
  "description": "Data layout: entities stacked in one column in reading order; strings[i], glyphs[i] and colors[i] are taken in order. position (any count) anchors the block's top-left; otherwise centred in region."
711
733
  },
@@ -780,6 +802,16 @@
780
802
  }
781
803
  ]
782
804
  },
805
+ "rock": {
806
+ "type": "object",
807
+ "required": ["amp", "period"],
808
+ "additionalProperties": false,
809
+ "properties": {
810
+ "amp": { "type": "number", "exclusiveMinimum": 0, "maximum": 45, "description": "Degrees either side of the resting angle." },
811
+ "period": { "type": "number", "minimum": 1000, "description": "One swing there and back, ms (floor 1000; with a clock, period / rate >= 1000)." }
812
+ },
813
+ "description": "A swing back and forth about each entity's resting angle (rotate + spin), on a seeded per-entity phase (a clock's shared phase when clocked). Structural. Native: ignored (no swing)."
814
+ },
783
815
  "clock": {
784
816
  "type": "object",
785
817
  "additionalProperties": false,
@@ -817,6 +849,12 @@
817
849
  "type": "number",
818
850
  "minimum": 0,
819
851
  "description": "Fade ramp duration in ms. Default 1000."
852
+ },
853
+ "stagger": {
854
+ "type": "number",
855
+ "minimum": 0,
856
+ "maximum": 60000,
857
+ "description": "ms between successive entities' envelopes: entity i enters (and exits) i x stagger later, in entity order (reading order for list/table/grid). Paint; glides. Native: ignored (all together)."
820
858
  }
821
859
  },
822
860
  "description": "Layer lifecycle for act structure (stars first, dancers at t=3000). Pure function of t \u2014 deterministic and seekable."
@@ -1146,6 +1184,7 @@
1146
1184
  "curve": { "enum": ["smooth", "linear"], "description": "Catmull-Rom spline through the points (default) or a polyline." },
1147
1185
  "taper": { "type": "boolean", "description": "Thin the mark to almost nothing at both ends \u2014 a brush stroke rather than a line." },
1148
1186
  "orient": { "type": "boolean", "description": "Turn the path's +x along the entity's heading (like streak)." },
1187
+ "draw": { "$ref": "#/definitions/strokeDraw" },
1149
1188
  "colors": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/hexColor" }, "description": "Per-entity color palette (seeded pick)." },
1150
1189
  "colorWeights": { "$ref": "#/definitions/colorWeights" }
1151
1190
  },
@@ -1230,6 +1269,19 @@
1230
1269
  },
1231
1270
  "role": {
1232
1271
  "$ref": "#/definitions/textRole"
1272
+ },
1273
+ "number": {
1274
+ "type": "object",
1275
+ "required": ["value"],
1276
+ "additionalProperties": false,
1277
+ "properties": {
1278
+ "value": { "type": "number", "description": "The number shown. Paint: steer or key sprite.number.value and the digits roll over the glide." },
1279
+ "decimals": { "type": "integer", "minimum": 0, "maximum": 6, "description": "Places after the point (default 0)." },
1280
+ "prefix": { "type": "string", "maxLength": 64 },
1281
+ "suffix": { "type": "string", "maxLength": 64 },
1282
+ "grouping": { "type": "boolean", "description": "Thousands separated by commas (default true). Locale-free." }
1283
+ },
1284
+ "description": "A counter: the block paints prefix + value + suffix instead of text. text is what clients that do not read number show - author it as the rest value. Native: ignored (text)."
1233
1285
  }
1234
1286
  },
1235
1287
  "description": "Multi-line text block with deterministic line-breaking. All dimensions are viewport fractions. Use with count: 1, static motion, and position; add anchor: 'center' to centre the block at position."
@@ -1307,7 +1359,7 @@
1307
1359
  },
1308
1360
  "bob": {
1309
1361
  "type": "number",
1310
- "description": "Vertical wobble amplitude in px."
1362
+ "description": "Vertical wobble amplitude, a fraction of min(w,h) like speed (px only under units: px). Typical 0.002-0.02; above 0.25 warns motion-amplitude."
1311
1363
  }
1312
1364
  }
1313
1365
  },
@@ -1337,7 +1389,7 @@
1337
1389
  },
1338
1390
  "sway": {
1339
1391
  "type": "number",
1340
- "description": "Horizontal sway amplitude in px (bubbles)."
1392
+ "description": "Horizontal sway amplitude (bubbles), a fraction of min(w,h) like speed (px only under units: px). Typical 0.002-0.02; above 0.25 warns motion-amplitude."
1341
1393
  }
1342
1394
  }
1343
1395
  },
@@ -1703,7 +1755,7 @@
1703
1755
  "t": { "type": "number", "minimum": 0, "description": "Scene time in ms (a sequence segment's own clock)." },
1704
1756
  "path": { "type": "string", "minLength": 1, "description": "A setParam dot-path that already exists on the spec (layers.0.sprite.color, key.opacity, background.stops.1.color, …)." },
1705
1757
  "value": { "description": "The target value; the spec must still validate with it applied." },
1706
- "ease": { "enum": ["step", "linear", "smooth"], "description": "Default smooth." },
1758
+ "ease": { "enum": ["step", "linear", "smooth", "in", "out", "spring"], "description": "Default smooth. in = accelerate from rest; out = arrive and decelerate; spring = critically damped, fast start, no overshoot. Native: unknown eases read as smooth." },
1707
1759
  "dur": { "type": "number", "minimum": 0, "maximum": 30000, "description": "Glide length in ms from t (default 1000; 0 = cut)." }
1708
1760
  }
1709
1761
  }
@@ -1866,6 +1918,18 @@
1866
1918
  },
1867
1919
  "required": ["type", "dur"],
1868
1920
  "additionalProperties": false
1921
+ },
1922
+ {
1923
+ "properties": {
1924
+ "type": { "const": "wipe" },
1925
+ "dur": { "type": "number", "minimum": 200, "maximum": 5000, "description": "Wipe duration in ms. Same machinery and tier gate as fade (basic/minimal hosts cut). Native: cross-fades over dur." },
1926
+ "shape": { "enum": ["circle", "line"], "description": "circle (default): an iris opening from origin until it clears the farthest corner. line: a straight edge sweeping along angle." },
1927
+ "origin": { "type": "object", "required": ["x", "y"], "additionalProperties": false, "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 } }, "description": "Where an iris opens (circle only). Default the centre." },
1928
+ "angle": { "type": "number", "minimum": -360, "maximum": 360, "description": "Sweep direction for a line wipe, degrees (0 = left to right, 90 = top to bottom)." },
1929
+ "feather": { "type": "number", "minimum": 0, "maximum": 1, "description": "Edge softness as a fraction of the distance the edge travels. Default 0.08." }
1930
+ },
1931
+ "required": ["type", "dur"],
1932
+ "additionalProperties": false
1869
1933
  }
1870
1934
  ]
1871
1935
  }