@pixodesk/svg-animator-core 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -97,6 +97,18 @@ Nothing above is validated by hand. Every block of the format has a runtime sche
97
97
  turns any schema into a plain description — keys, types, and whether each is optional — which is
98
98
  how this repo generates its published `SCHEMA.json`, and `schemaKeys` lists just the keys.
99
99
 
100
+ The schema also says **what a field means when a document leaves it out**. Every optional choice
101
+ states its default there (`px.enum([...], x)`, `px.number(x)`) and every object schema offers the
102
+ stated ones as a typed `defaults` property: `PxTriggerSchema.defaults.mouseOut` is `continue`,
103
+ `PxTextPathEffectSchema.defaults.pathOverflow` is `extend`, `PxTimeTimelineSchema.defaults.duration`
104
+ is 1000 ms. Only stated fields are keys of it, so asking for a field whose absence simply means
105
+ "unset" (such as `clone.without`), or for a key the schema has renamed, does not compile. Every
106
+ reader takes the value from there rather than restating it: the player normalises an absent field
107
+ to it, and the Pixodesk editor defaults its model to it, so the two can never disagree about a
108
+ field neither of them was given. `PxTimelineSchema` is a union of the three timeline kinds;
109
+ `PxTimeTimelineSchema` is the time-driven member an absent `type` selects, exported so its own
110
+ defaults can be read the same way.
111
+
100
112
  There is one schema value per block, named after it: `PxTriggerSchema`, `PxElementAnimationSchema`,
101
113
  `PxKeyframeValueSchema`, `PxAttrValueSchema`, `PxTransformValueSchema`, `PxBezierPathSchema`,
102
114
  `PxScrollSchema`, `PxScrollRangeSchema`, `PxScrollRangePointSchema`, `PxRetimeEffectSchema` and