@open-pencil/scene-graph 0.17.0 → 0.18.0-beta.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.
- package/dist/arrow-caps.d.ts +14 -17
- package/dist/arrow-caps.d.ts.map +1 -1
- package/dist/arrow-caps.js +1 -2
- package/dist/asset-keys.d.ts +5 -8
- package/dist/asset-keys.d.ts.map +1 -1
- package/dist/asset-keys.js +2 -3
- package/dist/behaviours/index.d.ts +6 -4
- package/dist/behaviours/index.js +6 -4
- package/dist/behaviours/kinds.d.ts +38 -15
- package/dist/behaviours/kinds.d.ts.map +1 -1
- package/dist/behaviours/kinds.js +134 -12
- package/dist/behaviours/kinds.js.map +1 -1
- package/dist/behaviours/layers.d.ts +3 -6
- package/dist/behaviours/layers.d.ts.map +1 -1
- package/dist/behaviours/layers.js +1 -2
- package/dist/behaviours/listing.d.ts +58 -0
- package/dist/behaviours/listing.d.ts.map +1 -0
- package/dist/behaviours/listing.js +98 -0
- package/dist/behaviours/listing.js.map +1 -0
- package/dist/behaviours/model.d.ts +19 -16
- package/dist/behaviours/model.d.ts.map +1 -1
- package/dist/behaviours/model.js +14 -6
- package/dist/behaviours/model.js.map +1 -1
- package/dist/behaviours/schema.d.ts +150 -17
- package/dist/behaviours/schema.d.ts.map +1 -1
- package/dist/behaviours/schema.js +19 -5
- package/dist/behaviours/schema.js.map +1 -1
- package/dist/behaviours/spec.d.ts +3 -6
- package/dist/behaviours/spec.d.ts.map +1 -1
- package/dist/behaviours/spec.js +7 -4
- package/dist/behaviours/spec.js.map +1 -1
- package/dist/behaviours/transition.d.ts +20 -0
- package/dist/behaviours/transition.d.ts.map +1 -0
- package/dist/behaviours/transition.js +35 -0
- package/dist/behaviours/transition.js.map +1 -0
- package/dist/bindings.js +2 -3
- package/dist/blur.d.ts +35 -0
- package/dist/blur.d.ts.map +1 -0
- package/dist/blur.js +69 -0
- package/dist/blur.js.map +1 -0
- package/dist/buffered-events.d.ts +3 -6
- package/dist/buffered-events.d.ts.map +1 -1
- package/dist/buffered-events.js +1 -2
- package/dist/buffered-events.js.map +1 -1
- package/dist/checkpoint.d.ts +3 -6
- package/dist/checkpoint.d.ts.map +1 -1
- package/dist/checkpoint.js +4 -3
- package/dist/checkpoint.js.map +1 -1
- package/dist/clipping.d.ts +4 -7
- package/dist/clipping.d.ts.map +1 -1
- package/dist/clipping.js +4 -16
- package/dist/clipping.js.map +1 -1
- package/dist/color/contrast.d.ts +4 -7
- package/dist/color/contrast.d.ts.map +1 -1
- package/dist/color/contrast.js +2 -3
- package/dist/color/index.d.ts +21 -20
- package/dist/color/index.d.ts.map +1 -1
- package/dist/color/index.js +16 -27
- package/dist/color/index.js.map +1 -1
- package/dist/color/management.d.ts +50 -25
- package/dist/color/management.d.ts.map +1 -1
- package/dist/color/management.js +155 -151
- package/dist/color/management.js.map +1 -1
- package/dist/color/normalize.d.ts +1 -4
- package/dist/color/normalize.d.ts.map +1 -1
- package/dist/color/normalize.js +1 -2
- package/dist/color/okhcl.d.ts +36 -21
- package/dist/color/okhcl.d.ts.map +1 -1
- package/dist/color/okhcl.js +57 -42
- package/dist/color/okhcl.js.map +1 -1
- package/dist/color/schema.d.ts +6 -4
- package/dist/color/schema.d.ts.map +1 -1
- package/dist/color/schema.js +12 -4
- package/dist/color/schema.js.map +1 -1
- package/dist/comments/document.d.ts +3 -6
- package/dist/comments/document.d.ts.map +1 -1
- package/dist/comments/document.js +1 -2
- package/dist/comments/index.js +2 -2
- package/dist/comments/list.d.ts +5 -8
- package/dist/comments/list.d.ts.map +1 -1
- package/dist/comments/list.js +1 -2
- package/dist/comments/merge.d.ts +2 -5
- package/dist/comments/merge.d.ts.map +1 -1
- package/dist/comments/merge.js +1 -2
- package/dist/comments/schema.d.ts +2 -5
- package/dist/comments/schema.d.ts.map +1 -1
- package/dist/comments/schema.js +1 -2
- package/dist/comments/threads.d.ts +16 -19
- package/dist/comments/threads.d.ts.map +1 -1
- package/dist/comments/threads.js +8 -3
- package/dist/comments/threads.js.map +1 -1
- package/dist/components/exposure.d.ts +4 -7
- package/dist/components/exposure.d.ts.map +1 -1
- package/dist/components/exposure.js +1 -2
- package/dist/components/properties.d.ts +13 -16
- package/dist/components/properties.d.ts.map +1 -1
- package/dist/components/properties.js +3 -4
- package/dist/components/variants.d.ts +5 -8
- package/dist/components/variants.d.ts.map +1 -1
- package/dist/components/variants.js +1 -2
- package/dist/connectors/controls.d.ts +6 -9
- package/dist/connectors/controls.d.ts.map +1 -1
- package/dist/connectors/controls.js +2 -3
- package/dist/connectors/create.d.ts +3 -6
- package/dist/connectors/create.d.ts.map +1 -1
- package/dist/connectors/create.js +2 -3
- package/dist/connectors/elbow.js +0 -1
- package/dist/connectors/gaps.d.ts +1 -4
- package/dist/connectors/gaps.d.ts.map +1 -1
- package/dist/connectors/gaps.js +1 -2
- package/dist/connectors/hit.d.ts +1 -4
- package/dist/connectors/hit.d.ts.map +1 -1
- package/dist/connectors/hit.js +3 -4
- package/dist/connectors/index.d.ts +3 -3
- package/dist/connectors/index.js +6 -6
- package/dist/connectors/label.d.ts +4 -7
- package/dist/connectors/label.d.ts.map +1 -1
- package/dist/connectors/label.js +1 -2
- package/dist/connectors/layout.d.ts +8 -10
- package/dist/connectors/layout.d.ts.map +1 -1
- package/dist/connectors/layout.js +12 -10
- package/dist/connectors/layout.js.map +1 -1
- package/dist/connectors/pieces.d.ts +2 -5
- package/dist/connectors/pieces.d.ts.map +1 -1
- package/dist/connectors/pieces.js +3 -4
- package/dist/connectors/pieces.js.map +1 -1
- package/dist/connectors/route.d.ts +2 -5
- package/dist/connectors/route.d.ts.map +1 -1
- package/dist/connectors/route.js +4 -5
- package/dist/connectors/sides.d.ts +3 -6
- package/dist/connectors/sides.d.ts.map +1 -1
- package/dist/connectors/sides.js +2 -3
- package/dist/connectors/sublayers.d.ts +21 -24
- package/dist/connectors/sublayers.d.ts.map +1 -1
- package/dist/connectors/sublayers.js +3 -3
- package/dist/connectors/sublayers.js.map +1 -1
- package/dist/constants.d.ts +13 -16
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constraints.d.ts +6 -8
- package/dist/constraints.d.ts.map +1 -1
- package/dist/constraints.js +3 -3
- package/dist/constraints.js.map +1 -1
- package/dist/coordinate.d.ts +27 -29
- package/dist/coordinate.d.ts.map +1 -1
- package/dist/coordinate.js +19 -38
- package/dist/coordinate.js.map +1 -1
- package/dist/copy.d.ts +36 -24
- package/dist/copy.d.ts.map +1 -1
- package/dist/copy.js +33 -4
- package/dist/copy.js.map +1 -1
- package/dist/corners.d.ts +9 -9
- package/dist/corners.d.ts.map +1 -1
- package/dist/corners.js +4 -3
- package/dist/corners.js.map +1 -1
- package/dist/css/blend.d.ts +1 -4
- package/dist/css/blend.d.ts.map +1 -1
- package/dist/css/blend.js +1 -2
- package/dist/css/grid.d.ts +1 -4
- package/dist/css/grid.d.ts.map +1 -1
- package/dist/css/grid.js +3 -4
- package/dist/css/index.d.ts +2 -1
- package/dist/css/index.js +3 -2
- package/dist/css/layout.d.ts +7 -10
- package/dist/css/layout.d.ts.map +1 -1
- package/dist/css/layout.js +2 -3
- package/dist/css/motion.d.ts +9 -0
- package/dist/css/motion.d.ts.map +1 -0
- package/dist/css/motion.js +59 -0
- package/dist/css/motion.js.map +1 -0
- package/dist/css/shadows.d.ts +4 -6
- package/dist/css/shadows.d.ts.map +1 -1
- package/dist/css/shadows.js +9 -9
- package/dist/css/shadows.js.map +1 -1
- package/dist/css/text.d.ts +8 -11
- package/dist/css/text.d.ts.map +1 -1
- package/dist/css/text.js +1 -2
- package/dist/css/transform.d.ts +6 -9
- package/dist/css/transform.d.ts.map +1 -1
- package/dist/css/transform.js +2 -3
- package/dist/css/values.d.ts +11 -13
- package/dist/css/values.d.ts.map +1 -1
- package/dist/css/values.js +5 -6
- package/dist/css/values.js.map +1 -1
- package/dist/cubic.d.ts +11 -5
- package/dist/cubic.d.ts.map +1 -1
- package/dist/cubic.js +71 -3
- package/dist/cubic.js.map +1 -1
- package/dist/events.js +1 -2
- package/dist/export-format.d.ts +5 -8
- package/dist/export-format.d.ts.map +1 -1
- package/dist/export-format.js +4 -3
- package/dist/export-format.js.map +1 -1
- package/dist/export-scale.d.ts +4 -7
- package/dist/export-scale.d.ts.map +1 -1
- package/dist/export-scale.js +1 -2
- package/dist/fields/appearance.d.ts +3 -6
- package/dist/fields/appearance.d.ts.map +1 -1
- package/dist/fields/appearance.js +1 -2
- package/dist/fields/geometry.d.ts +2 -5
- package/dist/fields/geometry.d.ts.map +1 -1
- package/dist/fields/geometry.js +1 -2
- package/dist/fields/index.d.ts +2 -2
- package/dist/fields/index.js +3 -3
- package/dist/fields/layout.d.ts +5 -6
- package/dist/fields/layout.d.ts.map +1 -1
- package/dist/fields/layout.js +10 -3
- package/dist/fields/layout.js.map +1 -1
- package/dist/fields/text.d.ts +5 -8
- package/dist/fields/text.d.ts.map +1 -1
- package/dist/fields/text.js +1 -2
- package/dist/fig-compression.d.ts +3 -6
- package/dist/fig-compression.d.ts.map +1 -1
- package/dist/fig-compression.js +1 -2
- package/dist/figjam/index.js +1 -1
- package/dist/figjam/palette.d.ts +21 -23
- package/dist/figjam/palette.d.ts.map +1 -1
- package/dist/figjam/palette.js +3 -4
- package/dist/figjam/text.d.ts +10 -13
- package/dist/figjam/text.d.ts.map +1 -1
- package/dist/figjam/text.js +1 -2
- package/dist/font-style.d.ts +18 -18
- package/dist/font-style.d.ts.map +1 -1
- package/dist/font-style.js +12 -8
- package/dist/font-style.js.map +1 -1
- package/dist/generated/index.d.ts +35 -15
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +50 -12
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/kind.d.ts +17 -6
- package/dist/generated/kind.d.ts.map +1 -1
- package/dist/generated/shape-with-text.d.ts +10 -13
- package/dist/generated/shape-with-text.d.ts.map +1 -1
- package/dist/generated/shape-with-text.js +3 -3
- package/dist/generated/shape-with-text.js.map +1 -1
- package/dist/generated/spec.d.ts +45 -0
- package/dist/generated/spec.d.ts.map +1 -0
- package/dist/generated/spec.js +281 -0
- package/dist/generated/spec.js.map +1 -0
- package/dist/generated/sticky.d.ts +23 -26
- package/dist/generated/sticky.d.ts.map +1 -1
- package/dist/generated/sticky.js +4 -4
- package/dist/generated/sticky.js.map +1 -1
- package/dist/geometry.d.ts +47 -68
- package/dist/geometry.d.ts.map +1 -1
- package/dist/geometry.js +53 -77
- package/dist/geometry.js.map +1 -1
- package/dist/gradient.d.ts +15 -18
- package/dist/gradient.d.ts.map +1 -1
- package/dist/gradient.js +1 -2
- package/dist/graph.d.ts +33 -11
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +85 -28
- package/dist/graph.js.map +1 -1
- package/dist/group-bounds.d.ts +15 -14
- package/dist/group-bounds.d.ts.map +1 -1
- package/dist/group-bounds.js +41 -12
- package/dist/group-bounds.js.map +1 -1
- package/dist/guides.d.ts +5 -8
- package/dist/guides.d.ts.map +1 -1
- package/dist/guides.js +2 -3
- package/dist/hit-test.d.ts +20 -12
- package/dist/hit-test.d.ts.map +1 -1
- package/dist/hit-test.js +69 -38
- package/dist/hit-test.js.map +1 -1
- package/dist/icons/fit.d.ts +2 -4
- package/dist/icons/fit.d.ts.map +1 -1
- package/dist/icons/fit.js +1 -2
- package/dist/icons/glyph.d.ts +3 -5
- package/dist/icons/glyph.d.ts.map +1 -1
- package/dist/icons/glyph.js +3 -4
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +2 -2
- package/dist/icons/model.d.ts +8 -11
- package/dist/icons/model.d.ts.map +1 -1
- package/dist/icons/model.js +1 -2
- package/dist/icons/schema.d.ts +8 -11
- package/dist/icons/schema.d.ts.map +1 -1
- package/dist/icons/schema.js +1 -2
- package/dist/ids.d.ts +2 -5
- package/dist/ids.d.ts.map +1 -1
- package/dist/ids.js +3 -4
- package/dist/images.d.ts +20 -21
- package/dist/images.d.ts.map +1 -1
- package/dist/images.js +7 -6
- package/dist/images.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/instances/assignments.js +1 -2
- package/dist/instances/content-marks.js +98 -0
- package/dist/instances/content-marks.js.map +1 -0
- package/dist/instances/content-size.js +2 -3
- package/dist/instances/copies.js +2 -3
- package/dist/instances/cycles.d.ts +3 -6
- package/dist/instances/cycles.d.ts.map +1 -1
- package/dist/instances/cycles.js +1 -2
- package/dist/instances/deleted.d.ts +23 -0
- package/dist/instances/deleted.d.ts.map +1 -0
- package/dist/instances/deleted.js +82 -0
- package/dist/instances/deleted.js.map +1 -0
- package/dist/instances/fields.d.ts +5 -8
- package/dist/instances/fields.d.ts.map +1 -1
- package/dist/instances/fields.js +11 -7
- package/dist/instances/fields.js.map +1 -1
- package/dist/instances/index.d.ts +21 -20
- package/dist/instances/index.d.ts.map +1 -1
- package/dist/instances/index.js +116 -20
- package/dist/instances/index.js.map +1 -1
- package/dist/instances/kept-overrides.js +4 -5
- package/dist/instances/lookup.d.ts +17 -0
- package/dist/instances/lookup.d.ts.map +1 -0
- package/dist/instances/lookup.js +48 -0
- package/dist/instances/lookup.js.map +1 -0
- package/dist/instances/main-component.d.ts +2 -5
- package/dist/instances/main-component.d.ts.map +1 -1
- package/dist/instances/main-component.js +1 -2
- package/dist/instances/matching.js +1 -2
- package/dist/instances/overrides.d.ts +23 -26
- package/dist/instances/overrides.d.ts.map +1 -1
- package/dist/instances/overrides.js +1 -2
- package/dist/instances/placement.js +3 -4
- package/dist/instances/protection.js +3 -4
- package/dist/instances/source-walk.js +1 -2
- package/dist/instances/swap.js +7 -8
- package/dist/instances/sync.js +91 -18
- package/dist/instances/sync.js.map +1 -1
- package/dist/instances/vector-geometry.js +2 -3
- package/dist/layout/aspect-ratio.d.ts +7 -9
- package/dist/layout/aspect-ratio.d.ts.map +1 -1
- package/dist/layout/aspect-ratio.js +1 -2
- package/dist/layout/flow.d.ts +13 -0
- package/dist/layout/flow.d.ts.map +1 -0
- package/dist/layout/flow.js +35 -0
- package/dist/layout/flow.js.map +1 -0
- package/dist/layout/guides.d.ts +13 -16
- package/dist/layout/guides.d.ts.map +1 -1
- package/dist/layout/guides.js +4 -5
- package/dist/layout/guides.js.map +1 -1
- package/dist/layout/index.d.ts +6 -4
- package/dist/layout/index.js +7 -5
- package/dist/layout/keywords.d.ts +7 -9
- package/dist/layout/keywords.d.ts.map +1 -1
- package/dist/layout/keywords.js +8 -3
- package/dist/layout/keywords.js.map +1 -1
- package/dist/layout/limits.d.ts +13 -16
- package/dist/layout/limits.d.ts.map +1 -1
- package/dist/layout/limits.js +1 -2
- package/dist/layout/sizing.d.ts +18 -12
- package/dist/layout/sizing.d.ts.map +1 -1
- package/dist/layout/sizing.js +18 -3
- package/dist/layout/sizing.js.map +1 -1
- package/dist/layout/spacing.d.ts +7 -4
- package/dist/layout/spacing.d.ts.map +1 -1
- package/dist/layout/spacing.js +11 -3
- package/dist/layout/spacing.js.map +1 -1
- package/dist/layout/stacking.d.ts +8 -0
- package/dist/layout/stacking.d.ts.map +1 -0
- package/dist/layout/stacking.js +12 -0
- package/dist/layout/stacking.js.map +1 -0
- package/dist/layout/strokes.d.ts +1 -4
- package/dist/layout/strokes.d.ts.map +1 -1
- package/dist/layout/strokes.js +1 -2
- package/dist/layout/writes.js +1 -2
- package/dist/layout/writes.js.map +1 -1
- package/dist/masks.d.ts +4 -7
- package/dist/masks.d.ts.map +1 -1
- package/dist/masks.js +1 -2
- package/dist/matrix.d.ts +3 -4
- package/dist/matrix.d.ts.map +1 -1
- package/dist/matrix.js +11 -3
- package/dist/matrix.js.map +1 -1
- package/dist/mesh/geometry.d.ts +80 -0
- package/dist/mesh/geometry.d.ts.map +1 -0
- package/dist/mesh/geometry.js +430 -0
- package/dist/mesh/geometry.js.map +1 -0
- package/dist/mesh/index.d.ts +4 -0
- package/dist/mesh/index.js +4 -0
- package/dist/mesh/model.d.ts +25 -0
- package/dist/mesh/model.d.ts.map +1 -0
- package/dist/mesh/model.js +39 -0
- package/dist/mesh/model.js.map +1 -0
- package/dist/mesh/schema.d.ts +188 -0
- package/dist/mesh/schema.d.ts.map +1 -0
- package/dist/mesh/schema.js +55 -0
- package/dist/mesh/schema.js.map +1 -0
- package/dist/motion/apply.d.ts +42 -0
- package/dist/motion/apply.d.ts.map +1 -0
- package/dist/motion/apply.js +98 -0
- package/dist/motion/apply.js.map +1 -0
- package/dist/motion/edit.d.ts +53 -0
- package/dist/motion/edit.d.ts.map +1 -0
- package/dist/motion/edit.js +125 -0
- package/dist/motion/edit.js.map +1 -0
- package/dist/motion/effects.js +86 -0
- package/dist/motion/effects.js.map +1 -0
- package/dist/motion/evaluate.d.ts +33 -0
- package/dist/motion/evaluate.d.ts.map +1 -0
- package/dist/motion/evaluate.js +160 -0
- package/dist/motion/evaluate.js.map +1 -0
- package/dist/motion/fields.d.ts +69 -0
- package/dist/motion/fields.d.ts.map +1 -0
- package/dist/motion/fields.js +132 -0
- package/dist/motion/fields.js.map +1 -0
- package/dist/motion/index.d.ts +16 -0
- package/dist/motion/index.js +15 -0
- package/dist/motion/keyable.d.ts +32 -0
- package/dist/motion/keyable.d.ts.map +1 -0
- package/dist/motion/keyable.js +120 -0
- package/dist/motion/keyable.js.map +1 -0
- package/dist/motion/outline.d.ts +35 -0
- package/dist/motion/outline.d.ts.map +1 -0
- package/dist/motion/outline.js +59 -0
- package/dist/motion/outline.js.map +1 -0
- package/dist/motion/presets/index.d.ts +20 -0
- package/dist/motion/presets/index.d.ts.map +1 -0
- package/dist/motion/presets/index.js +166 -0
- package/dist/motion/presets/index.js.map +1 -0
- package/dist/motion/presets/settings.d.ts +43 -0
- package/dist/motion/presets/settings.d.ts.map +1 -0
- package/dist/motion/presets/settings.js +254 -0
- package/dist/motion/presets/settings.js.map +1 -0
- package/dist/motion/presets/stagger.d.ts +69 -0
- package/dist/motion/presets/stagger.d.ts.map +1 -0
- package/dist/motion/presets/stagger.js +185 -0
- package/dist/motion/presets/stagger.js.map +1 -0
- package/dist/motion/schema.d.ts +185 -0
- package/dist/motion/schema.d.ts.map +1 -0
- package/dist/motion/schema.js +62 -0
- package/dist/motion/schema.js.map +1 -0
- package/dist/motion/segment.d.ts +25 -0
- package/dist/motion/segment.d.ts.map +1 -0
- package/dist/motion/segment.js +73 -0
- package/dist/motion/segment.js.map +1 -0
- package/dist/motion/spec.d.ts +26 -0
- package/dist/motion/spec.d.ts.map +1 -0
- package/dist/motion/spec.js +175 -0
- package/dist/motion/spec.js.map +1 -0
- package/dist/motion/timeline.d.ts +16 -0
- package/dist/motion/timeline.d.ts.map +1 -0
- package/dist/motion/timeline.js +53 -0
- package/dist/motion/timeline.js.map +1 -0
- package/dist/motion/types.d.ts +49 -0
- package/dist/motion/types.d.ts.map +1 -0
- package/dist/motion/variables.d.ts +9 -0
- package/dist/motion/variables.d.ts.map +1 -0
- package/dist/motion/variables.js +25 -0
- package/dist/motion/variables.js.map +1 -0
- package/dist/mutation-impact.d.ts +9 -10
- package/dist/mutation-impact.d.ts.map +1 -1
- package/dist/mutation-impact.js +19 -9
- package/dist/mutation-impact.js.map +1 -1
- package/dist/node-defaults.d.ts +15 -14
- package/dist/node-defaults.d.ts.map +1 -1
- package/dist/node-defaults.js +153 -55
- package/dist/node-defaults.js.map +1 -1
- package/dist/order-keys.d.ts +8 -9
- package/dist/order-keys.d.ts.map +1 -1
- package/dist/order-keys.js +10 -2
- package/dist/order-keys.js.map +1 -1
- package/dist/outline/flatten.d.ts +3 -6
- package/dist/outline/flatten.d.ts.map +1 -1
- package/dist/outline/flatten.js +3 -4
- package/dist/outline/heads.js +1 -2
- package/dist/outline/hit.d.ts +2 -5
- package/dist/outline/hit.d.ts.map +1 -1
- package/dist/outline/hit.js +5 -6
- package/dist/outline/index.js +3 -3
- package/dist/outline/point.d.ts +4 -7
- package/dist/outline/point.d.ts.map +1 -1
- package/dist/outline/point.js +2 -3
- package/dist/outline/shapes.d.ts +4 -7
- package/dist/outline/shapes.d.ts.map +1 -1
- package/dist/outline/shapes.js +2 -3
- package/dist/paints/index.d.ts +5 -3
- package/dist/paints/index.js +5 -3
- package/dist/paints/pattern.d.ts +6 -5
- package/dist/paints/pattern.d.ts.map +1 -1
- package/dist/paints/pattern.js +34 -3
- package/dist/paints/pattern.js.map +1 -1
- package/dist/paints/schema.d.ts +4 -7
- package/dist/paints/schema.d.ts.map +1 -1
- package/dist/paints/schema.js +3 -4
- package/dist/paints/shows.d.ts +4 -4
- package/dist/paints/shows.d.ts.map +1 -1
- package/dist/paints/shows.js +9 -3
- package/dist/paints/shows.js.map +1 -1
- package/dist/paints/solid.d.ts +8 -0
- package/dist/paints/solid.d.ts.map +1 -0
- package/dist/paints/solid.js +17 -0
- package/dist/paints/solid.js.map +1 -0
- package/dist/paints/stills.d.ts +74 -0
- package/dist/paints/stills.d.ts.map +1 -0
- package/dist/paints/stills.js +117 -0
- package/dist/paints/stills.js.map +1 -0
- package/dist/parse-path.d.ts +12 -9
- package/dist/parse-path.d.ts.map +1 -1
- package/dist/parse-path.js +13 -3
- package/dist/parse-path.js.map +1 -1
- package/dist/paths/arc.d.ts +6 -9
- package/dist/paths/arc.d.ts.map +1 -1
- package/dist/paths/arc.js +1 -2
- package/dist/paths/index.d.ts +1 -1
- package/dist/paths/index.js +1 -1
- package/dist/paths/network.d.ts +13 -16
- package/dist/paths/network.d.ts.map +1 -1
- package/dist/paths/network.js +1 -2
- package/dist/paths/sink.d.ts +5 -8
- package/dist/paths/sink.d.ts.map +1 -1
- package/dist/paths/sink.js +1 -2
- package/dist/paths/smooth-corners.d.ts +3 -6
- package/dist/paths/smooth-corners.d.ts.map +1 -1
- package/dist/paths/smooth-corners.js +1 -2
- package/dist/plugin-data/field.d.ts +15 -18
- package/dist/plugin-data/field.d.ts.map +1 -1
- package/dist/plugin-data/field.js +3 -2
- package/dist/plugin-data/field.js.map +1 -1
- package/dist/plugin-data/fields.d.ts +104 -11
- package/dist/plugin-data/fields.d.ts.map +1 -1
- package/dist/plugin-data/fields.js +43 -13
- package/dist/plugin-data/fields.js.map +1 -1
- package/dist/plugin-data/index.d.ts +2 -2
- package/dist/plugin-data/index.js +2 -2
- package/dist/polygon.d.ts +8 -8
- package/dist/polygon.d.ts.map +1 -1
- package/dist/polygon.js +7 -7
- package/dist/polygon.js.map +1 -1
- package/dist/preview.d.ts +3 -5
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +2 -3
- package/dist/primitives/index.d.ts +7 -9
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -2
- package/dist/primitives/schema.d.ts +3 -6
- package/dist/primitives/schema.d.ts.map +1 -1
- package/dist/primitives/schema.js +1 -2
- package/dist/resize.d.ts +19 -14
- package/dist/resize.d.ts.map +1 -1
- package/dist/resize.js +38 -8
- package/dist/resize.js.map +1 -1
- package/dist/scaling/index.d.ts +2 -2
- package/dist/scaling/index.js +2 -2
- package/dist/scaling/node.d.ts +2 -4
- package/dist/scaling/node.d.ts.map +1 -1
- package/dist/scaling/node.js +30 -11
- package/dist/scaling/node.js.map +1 -1
- package/dist/scaling/snapshot.d.ts +5 -8
- package/dist/scaling/snapshot.d.ts.map +1 -1
- package/dist/scaling/snapshot.js +1 -2
- package/dist/scaling/tree.d.ts +6 -9
- package/dist/scaling/tree.d.ts.map +1 -1
- package/dist/scaling/tree.js +2 -3
- package/dist/shaders/index.d.ts +2 -3
- package/dist/shaders/index.js +2 -3
- package/dist/shaders/model.d.ts +54 -21
- package/dist/shaders/model.d.ts.map +1 -1
- package/dist/shaders/model.js +103 -35
- package/dist/shaders/model.js.map +1 -1
- package/dist/shaders/schema.d.ts +16 -9
- package/dist/shaders/schema.d.ts.map +1 -1
- package/dist/shaders/schema.js +12 -3
- package/dist/shaders/schema.js.map +1 -1
- package/dist/shape-with-text/document.js +264 -0
- package/dist/shape-with-text/document.js.map +1 -0
- package/dist/shape-with-text/fit.d.ts +6 -9
- package/dist/shape-with-text/fit.d.ts.map +1 -1
- package/dist/shape-with-text/fit.js +1 -2
- package/dist/shape-with-text/geometry.d.ts +16 -7
- package/dist/shape-with-text/geometry.d.ts.map +1 -1
- package/dist/shape-with-text/geometry.js +105 -46
- package/dist/shape-with-text/geometry.js.map +1 -1
- package/dist/shape-with-text/index.d.ts +2 -2
- package/dist/shape-with-text/index.js +3 -3
- package/dist/shape-with-text/kinds.d.ts +4 -7
- package/dist/shape-with-text/kinds.d.ts.map +1 -1
- package/dist/shape-with-text/kinds.js +1 -2
- package/dist/shared-style-index.d.ts +19 -0
- package/dist/shared-style-index.d.ts.map +1 -0
- package/dist/shared-style-index.js +71 -0
- package/dist/shared-style-index.js.map +1 -0
- package/dist/shared-styles.d.ts +18 -20
- package/dist/shared-styles.d.ts.map +1 -1
- package/dist/shared-styles.js +20 -12
- package/dist/shared-styles.js.map +1 -1
- package/dist/slides/drop.d.ts +29 -0
- package/dist/slides/drop.d.ts.map +1 -0
- package/dist/slides/drop.js +80 -0
- package/dist/slides/drop.js.map +1 -0
- package/dist/slides/index.d.ts +56 -0
- package/dist/slides/index.d.ts.map +1 -0
- package/dist/slides/index.js +137 -0
- package/dist/slides/index.js.map +1 -0
- package/dist/slides/motion.d.ts +71 -0
- package/dist/slides/motion.d.ts.map +1 -0
- package/dist/slides/motion.js +167 -0
- package/dist/slides/motion.js.map +1 -0
- package/dist/slides/playback.d.ts +62 -0
- package/dist/slides/playback.d.ts.map +1 -0
- package/dist/slides/playback.js +220 -0
- package/dist/slides/playback.js.map +1 -0
- package/dist/slides/types.d.ts +59 -0
- package/dist/slides/types.d.ts.map +1 -0
- package/dist/slides/types.js +38 -0
- package/dist/slides/types.js.map +1 -0
- package/dist/slots/authoring.d.ts +6 -9
- package/dist/slots/authoring.d.ts.map +1 -1
- package/dist/slots/authoring.js +2 -3
- package/dist/slots/content.d.ts +5 -8
- package/dist/slots/content.d.ts.map +1 -1
- package/dist/slots/content.js +4 -5
- package/dist/slots/frames.d.ts +7 -9
- package/dist/slots/frames.d.ts.map +1 -1
- package/dist/slots/frames.js +3 -4
- package/dist/slots/frames.js.map +1 -1
- package/dist/slots/index.js +1 -1
- package/dist/slots/limits.d.ts +4 -7
- package/dist/slots/limits.d.ts.map +1 -1
- package/dist/slots/limits.js +1 -2
- package/dist/snap.d.ts +4 -7
- package/dist/snap.d.ts.map +1 -1
- package/dist/snap.js +7 -8
- package/dist/source-metadata.d.ts +1 -4
- package/dist/source-metadata.d.ts.map +1 -1
- package/dist/source-metadata.js +1 -2
- package/dist/specs/index.d.ts +3 -0
- package/dist/specs/index.js +3 -0
- package/dist/specs/model.d.ts +20 -0
- package/dist/specs/model.d.ts.map +1 -0
- package/dist/specs/model.js +32 -0
- package/dist/specs/model.js.map +1 -0
- package/dist/specs/schema.d.ts +24 -0
- package/dist/specs/schema.d.ts.map +1 -0
- package/dist/specs/schema.js +32 -0
- package/dist/specs/schema.js.map +1 -0
- package/dist/statuses/impact.d.ts +2 -5
- package/dist/statuses/impact.d.ts.map +1 -1
- package/dist/statuses/impact.js +2 -3
- package/dist/statuses/index.d.ts +1 -1
- package/dist/statuses/index.js +2 -2
- package/dist/statuses/node.d.ts +4 -7
- package/dist/statuses/node.d.ts.map +1 -1
- package/dist/statuses/node.js +1 -2
- package/dist/statuses/schema.d.ts +7 -9
- package/dist/statuses/schema.d.ts.map +1 -1
- package/dist/statuses/schema.js +1 -2
- package/dist/statuses/workflow.d.ts +9 -12
- package/dist/statuses/workflow.d.ts.map +1 -1
- package/dist/statuses/workflow.js +2 -3
- package/dist/strokes.d.ts +8 -10
- package/dist/strokes.d.ts.map +1 -1
- package/dist/strokes.js +2 -3
- package/dist/text/auto-resize.d.ts +4 -6
- package/dist/text/auto-resize.d.ts.map +1 -1
- package/dist/text/auto-resize.js +1 -2
- package/dist/text/direction.d.ts +10 -10
- package/dist/text/direction.d.ts.map +1 -1
- package/dist/text/direction.js +13 -14
- package/dist/text/direction.js.map +1 -1
- package/dist/text/index.d.ts +3 -2
- package/dist/text/index.js +6 -5
- package/dist/text/lengths.d.ts +9 -12
- package/dist/text/lengths.d.ts.map +1 -1
- package/dist/text/lengths.js +1 -2
- package/dist/text/lists.d.ts +17 -13
- package/dist/text/lists.d.ts.map +1 -1
- package/dist/text/lists.js +15 -4
- package/dist/text/lists.js.map +1 -1
- package/dist/text/name.d.ts +19 -0
- package/dist/text/name.d.ts.map +1 -0
- package/dist/text/name.js +37 -0
- package/dist/text/name.js.map +1 -0
- package/dist/text/overflow.d.ts +5 -7
- package/dist/text/overflow.d.ts.map +1 -1
- package/dist/text/overflow.js +1 -2
- package/dist/text/paragraphs.d.ts +20 -23
- package/dist/text/paragraphs.d.ts.map +1 -1
- package/dist/text/paragraphs.js +8 -5
- package/dist/text/paragraphs.js.map +1 -1
- package/dist/text/path.js +1 -2
- package/dist/text/picture.d.ts +3 -6
- package/dist/text/picture.d.ts.map +1 -1
- package/dist/text/picture.js +2 -3
- package/dist/text/references.d.ts +3 -6
- package/dist/text/references.d.ts.map +1 -1
- package/dist/text/references.js +2 -4
- package/dist/text/references.js.map +1 -1
- package/dist/text/runs.d.ts +6 -9
- package/dist/text/runs.d.ts.map +1 -1
- package/dist/text/runs.js +1 -2
- package/dist/text/schema.d.ts +1 -4
- package/dist/text/schema.d.ts.map +1 -1
- package/dist/text/schema.js +1 -2
- package/dist/thumbnail.d.ts +20 -0
- package/dist/thumbnail.d.ts.map +1 -0
- package/dist/thumbnail.js +46 -0
- package/dist/thumbnail.js.map +1 -0
- package/dist/transfer/apply.d.ts +2 -5
- package/dist/transfer/apply.d.ts.map +1 -1
- package/dist/transfer/apply.js +16 -6
- package/dist/transfer/apply.js.map +1 -1
- package/dist/transfer/copied.d.ts +11 -9
- package/dist/transfer/copied.d.ts.map +1 -1
- package/dist/transfer/copied.js +5 -6
- package/dist/transfer/copied.js.map +1 -1
- package/dist/transfer/dependencies.d.ts +10 -10
- package/dist/transfer/dependencies.d.ts.map +1 -1
- package/dist/transfer/dependencies.js +21 -10
- package/dist/transfer/dependencies.js.map +1 -1
- package/dist/transfer/history.d.ts +1 -4
- package/dist/transfer/history.d.ts.map +1 -1
- package/dist/transfer/history.js +3 -2
- package/dist/transfer/history.js.map +1 -1
- package/dist/transfer/identity.js +19 -5
- package/dist/transfer/identity.js.map +1 -1
- package/dist/transfer/index.d.ts +5 -4
- package/dist/transfer/index.js +6 -5
- package/dist/transfer/library.d.ts +43 -0
- package/dist/transfer/library.d.ts.map +1 -0
- package/dist/transfer/library.js +122 -0
- package/dist/transfer/library.js.map +1 -0
- package/dist/transfer/nodes.d.ts +2 -5
- package/dist/transfer/nodes.d.ts.map +1 -1
- package/dist/transfer/nodes.js +15 -4
- package/dist/transfer/nodes.js.map +1 -1
- package/dist/transfer/plan.d.ts +11 -5
- package/dist/transfer/plan.d.ts.map +1 -1
- package/dist/transfer/plan.js +52 -8
- package/dist/transfer/plan.js.map +1 -1
- package/dist/transfer/references.js +1 -2
- package/dist/transfer/remove.d.ts +1 -4
- package/dist/transfer/remove.d.ts.map +1 -1
- package/dist/transfer/remove.js +8 -3
- package/dist/transfer/remove.js.map +1 -1
- package/dist/transfer/resources.d.ts +2 -5
- package/dist/transfer/resources.d.ts.map +1 -1
- package/dist/transfer/resources.js +3 -4
- package/dist/transfer/validation.js +9 -6
- package/dist/transfer/validation.js.map +1 -1
- package/dist/transfer/variables.d.ts +3 -6
- package/dist/transfer/variables.d.ts.map +1 -1
- package/dist/transfer/variables.js +4 -4
- package/dist/transfer/variables.js.map +1 -1
- package/dist/types.d.ts +261 -134
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +47 -3
- package/dist/types.js.map +1 -1
- package/dist/undo.d.ts +5 -8
- package/dist/undo.d.ts.map +1 -1
- package/dist/undo.js +9 -3
- package/dist/undo.js.map +1 -1
- package/dist/variables/bindings.d.ts +29 -25
- package/dist/variables/bindings.d.ts.map +1 -1
- package/dist/variables/bindings.js +184 -55
- package/dist/variables/bindings.js.map +1 -1
- package/dist/variables/corners.d.ts +1 -4
- package/dist/variables/corners.d.ts.map +1 -1
- package/dist/variables/corners.js +1 -2
- package/dist/variables/easing.d.ts +53 -0
- package/dist/variables/easing.d.ts.map +1 -0
- package/dist/variables/easing.js +321 -0
- package/dist/variables/easing.js.map +1 -0
- package/dist/variables/fields.d.ts +21 -14
- package/dist/variables/fields.d.ts.map +1 -1
- package/dist/variables/fields.js +24 -6
- package/dist/variables/fields.js.map +1 -1
- package/dist/variables/formula/check.d.ts +2 -5
- package/dist/variables/formula/check.d.ts.map +1 -1
- package/dist/variables/formula/check.js +2 -3
- package/dist/variables/formula/evaluate.d.ts +1 -4
- package/dist/variables/formula/evaluate.d.ts.map +1 -1
- package/dist/variables/formula/evaluate.js +3 -4
- package/dist/variables/formula/index.d.ts +8 -8
- package/dist/variables/formula/index.d.ts.map +1 -1
- package/dist/variables/formula/index.js +29 -13
- package/dist/variables/formula/index.js.map +1 -1
- package/dist/variables/formula/parse.js +5 -6
- package/dist/variables/formula/print.d.ts +2 -5
- package/dist/variables/formula/print.d.ts.map +1 -1
- package/dist/variables/formula/print.js +4 -5
- package/dist/variables/formula/schema.d.ts +2 -5
- package/dist/variables/formula/schema.d.ts.map +1 -1
- package/dist/variables/formula/schema.js +6 -7
- package/dist/variables/formula/signatures.d.ts +4 -7
- package/dist/variables/formula/signatures.d.ts.map +1 -1
- package/dist/variables/formula/signatures.js +1 -2
- package/dist/variables/formula/signatures.js.map +1 -1
- package/dist/variables/formula/tokens.d.ts +5 -8
- package/dist/variables/formula/tokens.d.ts.map +1 -1
- package/dist/variables/formula/tokens.js +1 -2
- package/dist/variables/formula/tree.d.ts +8 -11
- package/dist/variables/formula/tree.d.ts.map +1 -1
- package/dist/variables/formula/tree.js +1 -2
- package/dist/variables/formula/tree.js.map +1 -1
- package/dist/variables/index.d.ts +42 -27
- package/dist/variables/index.d.ts.map +1 -1
- package/dist/variables/index.js +78 -29
- package/dist/variables/index.js.map +1 -1
- package/dist/variables/lookup.d.ts +11 -7
- package/dist/variables/lookup.d.ts.map +1 -1
- package/dist/variables/lookup.js +25 -4
- package/dist/variables/lookup.js.map +1 -1
- package/dist/variables/motion.d.ts +43 -0
- package/dist/variables/motion.d.ts.map +1 -0
- package/dist/variables/motion.js +106 -0
- package/dist/variables/motion.js.map +1 -0
- package/dist/variables/paints.d.ts +25 -19
- package/dist/variables/paints.d.ts.map +1 -1
- package/dist/variables/paints.js +28 -15
- package/dist/variables/paints.js.map +1 -1
- package/dist/variables/resolution.d.ts +22 -19
- package/dist/variables/resolution.d.ts.map +1 -1
- package/dist/variables/resolution.js +23 -14
- package/dist/variables/resolution.js.map +1 -1
- package/dist/variables/schema.d.ts +62 -7
- package/dist/variables/schema.d.ts.map +1 -1
- package/dist/variables/schema.js +39 -5
- package/dist/variables/schema.js.map +1 -1
- package/dist/variables/style-bindings.d.ts +21 -0
- package/dist/variables/style-bindings.d.ts.map +1 -0
- package/dist/variables/style-bindings.js +82 -0
- package/dist/variables/style-bindings.js.map +1 -0
- package/dist/variables/subtree.js +1 -2
- package/dist/variables/text.d.ts +2 -5
- package/dist/variables/text.d.ts.map +1 -1
- package/dist/variables/text.js +3 -4
- package/dist/variables/token.d.ts +5 -8
- package/dist/variables/token.d.ts.map +1 -1
- package/dist/variables/token.js +1 -2
- package/dist/variables/units.js +3 -5
- package/dist/variables/units.js.map +1 -1
- package/dist/variables/value.d.ts +4 -7
- package/dist/variables/value.d.ts.map +1 -1
- package/dist/variables/value.js +4 -5
- package/dist/variant-name.d.ts +2 -5
- package/dist/variant-name.d.ts.map +1 -1
- package/dist/variant-name.js +1 -2
- package/dist/variant-properties.d.ts +4 -7
- package/dist/variant-properties.d.ts.map +1 -1
- package/dist/variant-properties.js +2 -3
- package/dist/vector-network.d.ts +17 -20
- package/dist/vector-network.d.ts.map +1 -1
- package/dist/vector-network.js +4 -5
- package/package.json +42 -5
- package/src/behaviours/index.ts +2 -0
- package/src/behaviours/kinds.ts +108 -2
- package/src/behaviours/listing.ts +142 -0
- package/src/behaviours/model.ts +23 -2
- package/src/behaviours/schema.ts +19 -2
- package/src/behaviours/spec.ts +5 -0
- package/src/behaviours/transition.ts +46 -0
- package/src/blur.ts +88 -0
- package/src/checkpoint.ts +2 -0
- package/src/clipping.ts +3 -4
- package/src/color/index.ts +15 -24
- package/src/color/management.ts +144 -168
- package/src/color/okhcl.ts +62 -43
- package/src/color/schema.ts +13 -0
- package/src/comments/threads.ts +8 -1
- package/src/connectors/layout.ts +10 -3
- package/src/connectors/sublayers.ts +2 -1
- package/src/constraints.ts +2 -1
- package/src/coordinate.ts +17 -25
- package/src/copy.ts +38 -0
- package/src/corners.ts +3 -0
- package/src/css/index.ts +1 -0
- package/src/css/motion.ts +51 -0
- package/src/css/shadows.ts +7 -6
- package/src/css/values.ts +7 -3
- package/src/cubic.ts +57 -1
- package/src/export-format.ts +11 -1
- package/src/fields/layout.ts +9 -0
- package/src/font-style.ts +20 -7
- package/src/generated/index.ts +58 -9
- package/src/generated/kind.ts +16 -2
- package/src/generated/shape-with-text.ts +1 -0
- package/src/generated/spec.ts +243 -0
- package/src/generated/sticky.ts +2 -1
- package/src/geometry.ts +52 -89
- package/src/graph.ts +93 -15
- package/src/group-bounds.ts +54 -13
- package/src/hit-test.ts +78 -33
- package/src/images.ts +4 -1
- package/src/instances/content-marks.ts +124 -0
- package/src/instances/deleted.ts +115 -0
- package/src/instances/fields.ts +9 -3
- package/src/instances/index.ts +165 -17
- package/src/instances/lookup.ts +61 -0
- package/src/instances/sync.ts +108 -11
- package/src/layout/flow.ts +36 -0
- package/src/layout/index.ts +2 -0
- package/src/layout/keywords.ts +7 -1
- package/src/layout/sizing.ts +30 -0
- package/src/layout/spacing.ts +12 -0
- package/src/layout/stacking.ts +14 -0
- package/src/matrix.ts +11 -1
- package/src/mesh/geometry.ts +422 -0
- package/src/mesh/index.ts +3 -0
- package/src/mesh/model.ts +50 -0
- package/src/mesh/schema.ts +81 -0
- package/src/motion/apply.ts +156 -0
- package/src/motion/edit.ts +148 -0
- package/src/motion/effects.ts +166 -0
- package/src/motion/evaluate.ts +181 -0
- package/src/motion/fields.ts +136 -0
- package/src/motion/index.ts +13 -0
- package/src/motion/keyable.ts +141 -0
- package/src/motion/outline.ts +72 -0
- package/src/motion/presets/index.ts +257 -0
- package/src/motion/presets/settings.ts +221 -0
- package/src/motion/presets/stagger.ts +242 -0
- package/src/motion/schema.ts +66 -0
- package/src/motion/segment.ts +83 -0
- package/src/motion/spec.ts +225 -0
- package/src/motion/timeline.ts +48 -0
- package/src/motion/types.ts +45 -0
- package/src/motion/variables.ts +33 -0
- package/src/mutation-impact.ts +23 -7
- package/src/node-defaults.ts +152 -53
- package/src/order-keys.ts +16 -2
- package/src/paints/index.ts +2 -0
- package/src/paints/pattern.ts +55 -0
- package/src/paints/shows.ts +9 -0
- package/src/paints/solid.ts +10 -0
- package/src/paints/stills.ts +186 -0
- package/src/parse-path.ts +15 -0
- package/src/plugin-data/field.ts +3 -0
- package/src/plugin-data/fields.ts +54 -4
- package/src/polygon.ts +6 -4
- package/src/resize.ts +32 -20
- package/src/scaling/index.ts +1 -1
- package/src/scaling/node.ts +43 -6
- package/src/shaders/index.ts +0 -1
- package/src/shaders/model.ts +133 -45
- package/src/shaders/schema.ts +13 -1
- package/src/shape-with-text/document.ts +170 -0
- package/src/shape-with-text/geometry.ts +98 -29
- package/src/shared-style-index.ts +106 -0
- package/src/shared-styles.ts +21 -14
- package/src/slides/drop.ts +94 -0
- package/src/slides/index.ts +133 -0
- package/src/slides/motion.ts +203 -0
- package/src/slides/playback.ts +242 -0
- package/src/slides/types.ts +94 -0
- package/src/slots/frames.ts +2 -3
- package/src/specs/index.ts +2 -0
- package/src/specs/model.ts +40 -0
- package/src/specs/schema.ts +43 -0
- package/src/text/direction.ts +13 -23
- package/src/text/index.ts +1 -0
- package/src/text/lists.ts +20 -7
- package/src/text/name.ts +39 -0
- package/src/text/paragraphs.ts +10 -3
- package/src/text/references.ts +3 -3
- package/src/thumbnail.ts +52 -0
- package/src/transfer/apply.ts +16 -3
- package/src/transfer/copied.ts +7 -2
- package/src/transfer/dependencies.ts +27 -12
- package/src/transfer/history.ts +2 -0
- package/src/transfer/identity.ts +34 -2
- package/src/transfer/index.ts +6 -0
- package/src/transfer/library.ts +177 -0
- package/src/transfer/nodes.ts +28 -0
- package/src/transfer/plan.ts +96 -10
- package/src/transfer/remove.ts +6 -2
- package/src/transfer/validation.ts +15 -7
- package/src/transfer/variables.ts +8 -2
- package/src/types.ts +182 -15
- package/src/undo.ts +10 -1
- package/src/variables/bindings.ts +292 -51
- package/src/variables/easing.ts +281 -0
- package/src/variables/fields.ts +30 -3
- package/src/variables/formula/index.ts +33 -14
- package/src/variables/formula/signatures.ts +6 -2
- package/src/variables/formula/tree.ts +3 -3
- package/src/variables/index.ts +90 -37
- package/src/variables/lookup.ts +25 -2
- package/src/variables/motion.ts +151 -0
- package/src/variables/paints.ts +29 -7
- package/src/variables/resolution.ts +26 -6
- package/src/variables/schema.ts +41 -0
- package/src/variables/style-bindings.ts +137 -0
- package/src/variables/units.ts +2 -3
- package/dist/shaders/still.d.ts +0 -18
- package/dist/shaders/still.d.ts.map +0 -1
- package/dist/shaders/still.js +0 -36
- package/dist/shaders/still.js.map +0 -1
- package/src/shaders/still.ts +0 -41
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop.js","names":[],"sources":["../../src/slides/drop.ts"],"sourcesContent":["import type { SceneGraph } from '../graph'\nimport type { Rect, Vector } from '../primitives'\nimport type { SceneNode } from '../types'\n\n/** Where moved slides go: beside a slide, or as a new section before another one or at the end. */\nexport type SlidePlacement =\n | { type: 'beside'; slideId: string; side: 'before' | 'after' }\n | { type: 'section'; before: string | null }\n\n/** The line that shows where a drop lands, in canvas units. */\nexport interface SlideDropLine {\n x: number\n y: number\n length: number\n direction: 'HORIZONTAL' | 'VERTICAL'\n}\n\nexport interface SlideDrop {\n placement: SlidePlacement\n line: SlideDropLine\n}\n\nfunction boxOf(graph: SceneGraph, node: SceneNode): Rect {\n const { x, y } = graph.getAbsolutePosition(node.id)\n return { x, y, width: node.width, height: node.height }\n}\n\nfunction distanceTo(box: Rect, point: Vector): number {\n const dx = Math.max(box.x - point.x, 0, point.x - box.x - box.width)\n const dy = Math.max(box.y - point.y, 0, point.y - box.y - box.height)\n return Math.hypot(dx, dy)\n}\n\n/** Beside the slide of `row` nearest the point, on the side of its middle the point is on. */\nfunction besideNearest(graph: SceneGraph, row: SceneNode, point: Vector): SlideDrop | null {\n const slides = graph\n .getChildren(row.id)\n .filter((node) => node.type === 'SLIDE')\n .map((slide) => ({ slide, box: boxOf(graph, slide) }))\n let nearest = slides.at(0)\n for (const candidate of slides) {\n if (nearest && distanceTo(candidate.box, point) < distanceTo(nearest.box, point)) {\n nearest = candidate\n }\n }\n if (!nearest) return null\n const { slide, box } = nearest\n const side = point.x < box.x + box.width / 2 ? 'before' : 'after'\n const half = row.itemSpacing / 2\n return {\n placement: { type: 'beside', slideId: slide.id, side },\n line: {\n x: side === 'before' ? box.x - half : box.x + box.width + half,\n y: box.y,\n length: box.height,\n direction: 'VERTICAL'\n }\n }\n}\n\n/**\n * Where slides dragged to a point on the page's deck land, as in Figma's grid: in a section's band,\n * beside its nearest slide; between sections, above the first, or below the last, as a new section\n * there. Null on a page without a deck.\n */\nexport function slideDropAt(graph: SceneGraph, pageId: string, point: Vector): SlideDrop | null {\n const grid = graph.getChildren(pageId).find((node) => node.type === 'SLIDE_GRID')\n if (!grid) return null\n const rows = graph\n .getChildren(grid.id)\n .filter((node) => node.type === 'SLIDE_ROW')\n .map((row) => ({ row, box: boxOf(graph, row) }))\n const within = rows.find(({ box }) => point.y >= box.y && point.y <= box.y + box.height)\n if (within) return besideNearest(graph, within.row, point)\n\n const index = rows.findIndex(({ box }) => point.y < box.y)\n const next = index === -1 ? undefined : rows[index]\n const previous = index === -1 ? rows.at(-1) : rows[index - 1]\n const half = grid.itemSpacing / 2\n const gridBox = boxOf(graph, grid)\n let y = gridBox.y + grid.paddingTop - half\n if (previous && next) y = (previous.box.y + previous.box.height + next.box.y) / 2\n else if (previous) y = previous.box.y + previous.box.height + half\n else if (next) y = next.box.y - half\n return {\n placement: { type: 'section', before: next?.row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Graph } from "../graph.js";
|
|
2
|
+
import { SceneNode } from "../types.js";
|
|
3
|
+
import { LAYER_ANIMATION_STYLES, LayerAnimation, LayerAnimationStyle, SLIDE_TRANSITION_STYLES, SlideSettings, SlideTransition, SlideTransitionStyle, SlideTransitionTiming } from "./types.js";
|
|
4
|
+
import { SlideDrop, SlideDropLine, SlidePlacement, slideDropAt } from "./drop.js";
|
|
5
|
+
import { AnimatedLayer, BuildStep, ResolvedSlideTransition, TimedLayer, TimedStep, animatedLayers, animationSlide, animationTarget, defaultLayerAnimation, defaultSlideTransition, mapSlideVariables, resolveSlideTransition, slideBuild, slideVariableIds, timedBuild } from "./motion.js";
|
|
6
|
+
import { LAYER_SLIDE_DISTANCE, LayerFrame, MOTION_DIRECTIONS, MotionDirection, SLIDE_TRANSITION_KINDS, SlideFrame, SlideTransitionKind, TransitionFrames, layerAnimationDirection, layerAnimationStyle, layerAnimationTracks, layerAtRest, layerFrameAt, transitionDirection, transitionFrames, transitionKind, transitionStyle } from "./playback.js";
|
|
7
|
+
/** Figma's slide: 1920 by 1080, with 240 between slides and 600 between the rows of a grid. */
|
|
8
|
+
export declare const DEFAULT_SLIDE_SIZE: {
|
|
9
|
+
readonly width: 1920;
|
|
10
|
+
readonly height: 1080;
|
|
11
|
+
};
|
|
12
|
+
/** The sizes a deck offers its slides, by shape; any other size is a custom one. */
|
|
13
|
+
export declare const SLIDE_SIZE_PRESETS: readonly [{
|
|
14
|
+
readonly id: "wide";
|
|
15
|
+
readonly width: 1920;
|
|
16
|
+
readonly height: 1080;
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "standard";
|
|
19
|
+
readonly width: 1440;
|
|
20
|
+
readonly height: 1080;
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: "square";
|
|
23
|
+
readonly width: 1080;
|
|
24
|
+
readonly height: 1080;
|
|
25
|
+
}, {
|
|
26
|
+
readonly id: "portrait";
|
|
27
|
+
readonly width: 1080;
|
|
28
|
+
readonly height: 1920;
|
|
29
|
+
}];
|
|
30
|
+
export type SlideSizePreset = (typeof SLIDE_SIZE_PRESETS)[number];
|
|
31
|
+
export declare function defaultSlideSettings(): SlideSettings;
|
|
32
|
+
/** What a slide keeps, whether or not it was ever set; null for any other layer. */
|
|
33
|
+
export declare function slideSettings(node: Pick<SceneNode, 'type' | 'slide'>): SlideSettings | null;
|
|
34
|
+
/** The grid that holds a deck's slides on a page, if the page has one. */
|
|
35
|
+
export declare function slideGrid(graph: SceneGraph, pageId: string): SceneNode | undefined;
|
|
36
|
+
/** A page's slides by row, in the order a deck presents them. */
|
|
37
|
+
export declare function slideRows(graph: SceneGraph, pageId: string): SceneNode[][];
|
|
38
|
+
/** The slide the deck moves on to from `slide`, passing by skipped slides, or undefined at the end. */
|
|
39
|
+
export declare function nextSlide(graph: SceneGraph, slide: SceneNode): SceneNode | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Each slide's number, by ID, in the order a deck presents them: skipped slides have none and are
|
|
42
|
+
* not counted, as in Figma.
|
|
43
|
+
*/
|
|
44
|
+
export declare function slideNumbers(graph: SceneGraph, pageId: string): Map<string, number | null>;
|
|
45
|
+
/** Names a page's slides by their numbers, and a skipped one `-`, as Figma does. */
|
|
46
|
+
export declare function renumberSlides(graph: SceneGraph, pageId: string): void;
|
|
47
|
+
/** Adds the grid a deck's slides sit in to a page. */
|
|
48
|
+
export declare function createSlideGrid(graph: SceneGraph, pageId: string): SceneNode;
|
|
49
|
+
/** Adds a row, which Figma calls a section, to the end of a grid. */
|
|
50
|
+
export declare function createSlideRow(graph: SceneGraph, gridId: string): SceneNode;
|
|
51
|
+
/** Adds an empty slide to the end of a row, at the size of the slide before it. */
|
|
52
|
+
export declare function createSlide(graph: SceneGraph, rowId: string): SceneNode;
|
|
53
|
+
/** The slides a deck on `pageId` presents, in order: skipped ones are passed by. */
|
|
54
|
+
export declare function presentedSlides(graph: SceneGraph, pageId: string): string[];
|
|
55
|
+
export { AnimatedLayer, BuildStep, LAYER_ANIMATION_STYLES, LAYER_SLIDE_DISTANCE, LayerAnimation, LayerAnimationStyle, LayerFrame, MOTION_DIRECTIONS, MotionDirection, ResolvedSlideTransition, SLIDE_TRANSITION_KINDS, SLIDE_TRANSITION_STYLES, SlideDrop, SlideDropLine, SlideFrame, SlidePlacement, SlideSettings, SlideTransition, SlideTransitionKind, SlideTransitionStyle, SlideTransitionTiming, TimedLayer, TimedStep, TransitionFrames, animatedLayers, animationSlide, animationTarget, defaultLayerAnimation, defaultSlideTransition, layerAnimationDirection, layerAnimationStyle, layerAnimationTracks, layerAtRest, layerFrameAt, mapSlideVariables, resolveSlideTransition, slideBuild, slideDropAt, slideVariableIds, timedBuild, transitionDirection, transitionFrames, transitionKind, transitionStyle };
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/slides/index.ts"],"mappings":";;;;;;;qBAUa;;;;;qBAGA;;;;;;;;;;;;;;;;;YAMD,0BAA0B;wBAOtB,wBAAwB;;wBAKxB,cAAc,MAAM,KAAK,+BAA+B;;wBAKxD,UAAU,OAAO,YAAY,iBAAiB;;wBAK9C,UAAU,OAAO,YAAY,iBAAiB;;wBAU9C,UAAU,OAAO,YAAY,OAAO,YAAY;;;;;wBAehD,aAAa,OAAO,YAAY,iBAAiB;;wBAUjD,eAAe,OAAO,YAAY;;wBAQlC,gBAAgB,OAAO,YAAY,iBAAiB;;wBAcpD,eAAe,OAAO,YAAY,iBAAiB;;wBAenD,YAAY,OAAO,YAAY,gBAAgB;;wBAc/C,gBAAgB,OAAO,YAAY"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { slideDropAt } from "./drop.js";
|
|
2
|
+
import { animatedLayers, animationSlide, animationTarget, defaultLayerAnimation, defaultSlideTransition, mapSlideVariables, resolveSlideTransition, slideBuild, slideVariableIds, timedBuild } from "./motion.js";
|
|
3
|
+
import { LAYER_SLIDE_DISTANCE, MOTION_DIRECTIONS, SLIDE_TRANSITION_KINDS, layerAnimationDirection, layerAnimationStyle, layerAnimationTracks, layerAtRest, layerFrameAt, transitionDirection, transitionFrames, transitionKind, transitionStyle } from "./playback.js";
|
|
4
|
+
import { LAYER_ANIMATION_STYLES, SLIDE_TRANSITION_STYLES } from "./types.js";
|
|
5
|
+
// src/slides/index.ts
|
|
6
|
+
/** Figma's slide: 1920 by 1080, with 240 between slides and 600 between the rows of a grid. */
|
|
7
|
+
const DEFAULT_SLIDE_SIZE = {
|
|
8
|
+
width: 1920,
|
|
9
|
+
height: 1080
|
|
10
|
+
};
|
|
11
|
+
/** The sizes a deck offers its slides, by shape; any other size is a custom one. */
|
|
12
|
+
const SLIDE_SIZE_PRESETS = [
|
|
13
|
+
{
|
|
14
|
+
id: "wide",
|
|
15
|
+
width: 1920,
|
|
16
|
+
height: 1080
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "standard",
|
|
20
|
+
width: 1440,
|
|
21
|
+
height: 1080
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "square",
|
|
25
|
+
width: 1080,
|
|
26
|
+
height: 1080
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "portrait",
|
|
30
|
+
width: 1080,
|
|
31
|
+
height: 1920
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
const SLIDE_GAP = 240;
|
|
35
|
+
const ROW_GAP = 600;
|
|
36
|
+
const SLIDES_PER_LINE = 20;
|
|
37
|
+
const WHITE = {
|
|
38
|
+
r: 1,
|
|
39
|
+
g: 1,
|
|
40
|
+
b: 1,
|
|
41
|
+
a: 1
|
|
42
|
+
};
|
|
43
|
+
function defaultSlideSettings() {
|
|
44
|
+
return {
|
|
45
|
+
skipped: false,
|
|
46
|
+
notes: "",
|
|
47
|
+
transition: null
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** What a slide keeps, whether or not it was ever set; null for any other layer. */
|
|
51
|
+
function slideSettings(node) {
|
|
52
|
+
return node.type === "SLIDE" ? node.slide ?? defaultSlideSettings() : null;
|
|
53
|
+
}
|
|
54
|
+
/** The grid that holds a deck's slides on a page, if the page has one. */
|
|
55
|
+
function slideGrid(graph, pageId) {
|
|
56
|
+
return graph.getChildren(pageId).find((node) => node.type === "SLIDE_GRID");
|
|
57
|
+
}
|
|
58
|
+
/** A page's slides by row, in the order a deck presents them. */
|
|
59
|
+
function slideRows(graph, pageId) {
|
|
60
|
+
const grid = slideGrid(graph, pageId);
|
|
61
|
+
if (!grid) return [];
|
|
62
|
+
return graph.getChildren(grid.id).filter((row) => row.type === "SLIDE_ROW").map((row) => graph.getChildren(row.id).filter((node) => node.type === "SLIDE"));
|
|
63
|
+
}
|
|
64
|
+
/** The slide the deck moves on to from `slide`, passing by skipped slides, or undefined at the end. */
|
|
65
|
+
function nextSlide(graph, slide) {
|
|
66
|
+
const page = slide.parentId ? graph.closest(slide.parentId, (node) => node.type === "CANVAS") : void 0;
|
|
67
|
+
if (!page) return void 0;
|
|
68
|
+
const slides = slideRows(graph, page.id).flat();
|
|
69
|
+
const index = slides.findIndex((node) => node.id === slide.id);
|
|
70
|
+
if (index === -1) return void 0;
|
|
71
|
+
return slides.slice(index + 1).find((node) => !slideSettings(node)?.skipped);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Each slide's number, by ID, in the order a deck presents them: skipped slides have none and are
|
|
75
|
+
* not counted, as in Figma.
|
|
76
|
+
*/
|
|
77
|
+
function slideNumbers(graph, pageId) {
|
|
78
|
+
let shown = 0;
|
|
79
|
+
return new Map(slideRows(graph, pageId).flat().map((slide) => [slide.id, slideSettings(slide)?.skipped ? null : ++shown]));
|
|
80
|
+
}
|
|
81
|
+
/** Names a page's slides by their numbers, and a skipped one `-`, as Figma does. */
|
|
82
|
+
function renumberSlides(graph, pageId) {
|
|
83
|
+
for (const [id, number] of slideNumbers(graph, pageId)) {
|
|
84
|
+
const name = number === null ? "-" : String(number);
|
|
85
|
+
if (graph.getNode(id)?.name !== name) graph.updateNode(id, { name });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/** Adds the grid a deck's slides sit in to a page. */
|
|
89
|
+
function createSlideGrid(graph, pageId) {
|
|
90
|
+
return graph.createNode("SLIDE_GRID", pageId, {
|
|
91
|
+
name: "Presentation",
|
|
92
|
+
layoutMode: "VERTICAL",
|
|
93
|
+
itemSpacing: ROW_GAP,
|
|
94
|
+
paddingTop: SLIDE_GAP,
|
|
95
|
+
paddingLeft: SLIDE_GAP,
|
|
96
|
+
primaryAxisSizing: "HUG",
|
|
97
|
+
counterAxisSizing: "HUG"
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/** Adds a row, which Figma calls a section, to the end of a grid. */
|
|
101
|
+
function createSlideRow(graph, gridId) {
|
|
102
|
+
return graph.createNode("SLIDE_ROW", gridId, {
|
|
103
|
+
name: "Section",
|
|
104
|
+
layoutMode: "HORIZONTAL",
|
|
105
|
+
layoutWrap: "WRAP",
|
|
106
|
+
layoutAlignSelf: "STRETCH",
|
|
107
|
+
itemSpacing: SLIDE_GAP,
|
|
108
|
+
counterAxisSpacing: SLIDE_GAP,
|
|
109
|
+
primaryAxisSizing: "FIXED",
|
|
110
|
+
counterAxisSizing: "HUG",
|
|
111
|
+
maxWidth: SLIDES_PER_LINE * (DEFAULT_SLIDE_SIZE.width + SLIDE_GAP) + SLIDE_GAP
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** Adds an empty slide to the end of a row, at the size of the slide before it. */
|
|
115
|
+
function createSlide(graph, rowId) {
|
|
116
|
+
const { width, height } = graph.getChildren(rowId).findLast((node) => node.type === "SLIDE") ?? DEFAULT_SLIDE_SIZE;
|
|
117
|
+
return graph.createNode("SLIDE", rowId, {
|
|
118
|
+
name: "Slide",
|
|
119
|
+
width,
|
|
120
|
+
height,
|
|
121
|
+
clipsContent: true,
|
|
122
|
+
fills: [{
|
|
123
|
+
type: "SOLID",
|
|
124
|
+
color: { ...WHITE },
|
|
125
|
+
opacity: 1,
|
|
126
|
+
visible: true
|
|
127
|
+
}],
|
|
128
|
+
slide: defaultSlideSettings()
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/** The slides a deck on `pageId` presents, in order: skipped ones are passed by. */
|
|
132
|
+
function presentedSlides(graph, pageId) {
|
|
133
|
+
return slideRows(graph, pageId).flat().filter((slide) => !slideSettings(slide)?.skipped).map((slide) => slide.id);
|
|
134
|
+
}
|
|
135
|
+
export { DEFAULT_SLIDE_SIZE, LAYER_ANIMATION_STYLES, LAYER_SLIDE_DISTANCE, MOTION_DIRECTIONS, SLIDE_SIZE_PRESETS, SLIDE_TRANSITION_KINDS, SLIDE_TRANSITION_STYLES, animatedLayers, animationSlide, animationTarget, createSlide, createSlideGrid, createSlideRow, defaultLayerAnimation, defaultSlideSettings, defaultSlideTransition, layerAnimationDirection, layerAnimationStyle, layerAnimationTracks, layerAtRest, layerFrameAt, mapSlideVariables, nextSlide, presentedSlides, renumberSlides, resolveSlideTransition, slideBuild, slideDropAt, slideGrid, slideNumbers, slideRows, slideSettings, slideVariableIds, timedBuild, transitionDirection, transitionFrames, transitionKind, transitionStyle };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/slides/index.ts"],"sourcesContent":["import type { SceneGraph } from '../graph'\nimport type { SceneNode } from '../types'\nimport type { SlideSettings } from './types'\n\nexport * from './drop'\nexport * from './motion'\nexport * from './playback'\nexport * from './types'\n\n/** Figma's slide: 1920 by 1080, with 240 between slides and 600 between the rows of a grid. */\nexport const DEFAULT_SLIDE_SIZE = { width: 1920, height: 1080 } as const\n\n/** The sizes a deck offers its slides, by shape; any other size is a custom one. */\nexport const SLIDE_SIZE_PRESETS = [\n { id: 'wide', width: 1920, height: 1080 },\n { id: 'standard', width: 1440, height: 1080 },\n { id: 'square', width: 1080, height: 1080 },\n { id: 'portrait', width: 1080, height: 1920 }\n] as const\nexport type SlideSizePreset = (typeof SLIDE_SIZE_PRESETS)[number]\nconst SLIDE_GAP = 240\nconst ROW_GAP = 600\nconst SLIDES_PER_LINE = 20\n\nconst WHITE = { r: 1, g: 1, b: 1, a: 1 } as const\n\nexport function defaultSlideSettings(): SlideSettings {\n return { skipped: false, notes: '', transition: null }\n}\n\n/** What a slide keeps, whether or not it was ever set; null for any other layer. */\nexport function slideSettings(node: Pick<SceneNode, 'type' | 'slide'>): SlideSettings | null {\n return node.type === 'SLIDE' ? (node.slide ?? defaultSlideSettings()) : null\n}\n\n/** The grid that holds a deck's slides on a page, if the page has one. */\nexport function slideGrid(graph: SceneGraph, pageId: string): SceneNode | undefined {\n return graph.getChildren(pageId).find((node) => node.type === 'SLIDE_GRID')\n}\n\n/** A page's slides by row, in the order a deck presents them. */\nexport function slideRows(graph: SceneGraph, pageId: string): SceneNode[][] {\n const grid = slideGrid(graph, pageId)\n if (!grid) return []\n return graph\n .getChildren(grid.id)\n .filter((row) => row.type === 'SLIDE_ROW')\n .map((row) => graph.getChildren(row.id).filter((node) => node.type === 'SLIDE'))\n}\n\n/** The slide the deck moves on to from `slide`, passing by skipped slides, or undefined at the end. */\nexport function nextSlide(graph: SceneGraph, slide: SceneNode): SceneNode | undefined {\n const page = slide.parentId\n ? graph.closest(slide.parentId, (node) => node.type === 'CANVAS')\n : undefined\n if (!page) return undefined\n const slides = slideRows(graph, page.id).flat()\n const index = slides.findIndex((node) => node.id === slide.id)\n if (index === -1) return undefined\n return slides.slice(index + 1).find((node) => !slideSettings(node)?.skipped)\n}\n\n/**\n * Each slide's number, by ID, in the order a deck presents them: skipped slides have none and are\n * not counted, as in Figma.\n */\nexport function slideNumbers(graph: SceneGraph, pageId: string): Map<string, number | null> {\n let shown = 0\n return new Map(\n slideRows(graph, pageId)\n .flat()\n .map((slide) => [slide.id, slideSettings(slide)?.skipped ? null : ++shown])\n )\n}\n\n/** Names a page's slides by their numbers, and a skipped one `-`, as Figma does. */\nexport function renumberSlides(graph: SceneGraph, pageId: string): void {\n for (const [id, number] of slideNumbers(graph, pageId)) {\n const name = number === null ? '-' : String(number)\n if (graph.getNode(id)?.name !== name) graph.updateNode(id, { name })\n }\n}\n\n/** Adds the grid a deck's slides sit in to a page. */\nexport function createSlideGrid(graph: SceneGraph, pageId: string): SceneNode {\n return graph.createNode('SLIDE_GRID', pageId, {\n name: 'Presentation',\n layoutMode: 'VERTICAL',\n itemSpacing: ROW_GAP,\n // Figma pads a grid before its slides only.\n paddingTop: SLIDE_GAP,\n paddingLeft: SLIDE_GAP,\n primaryAxisSizing: 'HUG',\n counterAxisSizing: 'HUG'\n })\n}\n\n/** Adds a row, which Figma calls a section, to the end of a grid. */\nexport function createSlideRow(graph: SceneGraph, gridId: string): SceneNode {\n return graph.createNode('SLIDE_ROW', gridId, {\n name: 'Section',\n layoutMode: 'HORIZONTAL',\n layoutWrap: 'WRAP',\n layoutAlignSelf: 'STRETCH',\n itemSpacing: SLIDE_GAP,\n counterAxisSpacing: SLIDE_GAP,\n primaryAxisSizing: 'FIXED',\n counterAxisSizing: 'HUG',\n maxWidth: SLIDES_PER_LINE * (DEFAULT_SLIDE_SIZE.width + SLIDE_GAP) + SLIDE_GAP\n })\n}\n\n/** Adds an empty slide to the end of a row, at the size of the slide before it. */\nexport function createSlide(graph: SceneGraph, rowId: string): SceneNode {\n const before = graph.getChildren(rowId).findLast((node) => node.type === 'SLIDE')\n const { width, height } = before ?? DEFAULT_SLIDE_SIZE\n return graph.createNode('SLIDE', rowId, {\n name: 'Slide',\n width,\n height,\n clipsContent: true,\n fills: [{ type: 'SOLID', color: { ...WHITE }, opacity: 1, visible: true }],\n slide: defaultSlideSettings()\n })\n}\n\n/** The slides a deck on `pageId` presents, in order: skipped ones are passed by. */\nexport function presentedSlides(graph: SceneGraph, pageId: string): string[] {\n return slideRows(graph, pageId)\n .flat()\n .filter((slide) => !slideSettings(slide)?.skipped)\n .map((slide) => slide.id)\n}\n"],"mappings":";;;;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,WAAW,SAAS,OAAO;EACtC,MAAM;EACN;EACA;EACA,cAAc;EACd,OAAO,CAAC;GAAE,MAAM;GAAS,OAAO,EAAE,GAAG,MAAM;GAAG,SAAS;GAAG,SAAS;EAAK,CAAC;EACzE,OAAO,qBAAqB;CAC9B,CAAC;AACH;;AAGA,SAAgB,gBAAgB,OAAmB,QAA0B;CAC3E,OAAO,UAAU,OAAO,MAAM,CAAC,CAC5B,KAAK,CAAC,CACN,QAAQ,UAAU,CAAC,cAAc,KAAK,CAAC,EAAE,OAAO,CAAC,CACjD,KAAK,UAAU,MAAM,EAAE;AAC5B"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SceneGraph } from "../graph.js";
|
|
2
|
+
import { SceneNode } from "../types.js";
|
|
3
|
+
import { ResolvedMotion } from "../variables/motion.js";
|
|
4
|
+
import { LayerAnimation, SlideTransition, SlideTransitionStyle } from "./types.js";
|
|
5
|
+
/** The transition a slide starts with when one is added. */
|
|
6
|
+
export declare function defaultSlideTransition(): SlideTransition;
|
|
7
|
+
/** The animation a layer starts with when one is added, as in Figma: it slides in from the left. */
|
|
8
|
+
export declare function defaultLayerAnimation(order: number): LayerAnimation;
|
|
9
|
+
/** A slide's transition as it plays, with its variables read for the slide. */
|
|
10
|
+
export interface ResolvedSlideTransition extends ResolvedMotion {
|
|
11
|
+
style: SlideTransitionStyle;
|
|
12
|
+
/** Seconds before the deck moves on by itself, or null when it waits for the presenter. */
|
|
13
|
+
delay: number | null;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveSlideTransition(graph: SceneGraph, slide: SceneNode): ResolvedSlideTransition | null;
|
|
16
|
+
/** The variables a layer's slide transition and animation follow. */
|
|
17
|
+
export declare function slideVariableIds(node: Pick<SceneNode, 'slide' | 'animation'>): string[];
|
|
18
|
+
/**
|
|
19
|
+
* A layer's slide transition and animation following other variables, as a copy into another
|
|
20
|
+
* document names them; a variable `map` gives nothing for is let go, keeping the value.
|
|
21
|
+
*/
|
|
22
|
+
export declare function mapSlideVariables(node: Pick<SceneNode, 'slide' | 'animation'>, map: (variableId: string) => string | undefined): Pick<SceneNode, 'slide' | 'animation'>;
|
|
23
|
+
/** A layer's animation, with the layer it moves. */
|
|
24
|
+
export interface AnimatedLayer {
|
|
25
|
+
id: string;
|
|
26
|
+
animation: LayerAnimation;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A step of a slide's build: its layers' animations, one after another. A step waits for the
|
|
30
|
+
* presenter, except a first one made only of `AFTER_PREVIOUS` animations, which plays as the slide
|
|
31
|
+
* appears.
|
|
32
|
+
*/
|
|
33
|
+
export interface BuildStep {
|
|
34
|
+
onClick: boolean;
|
|
35
|
+
layers: AnimatedLayer[];
|
|
36
|
+
}
|
|
37
|
+
/** The animated layers of a slide, in the order they play: by `order`, then by layer order. */
|
|
38
|
+
export declare function animatedLayers(graph: SceneGraph, slideId: string): AnimatedLayer[];
|
|
39
|
+
/** A slide's build: its animations grouped into the steps a presenter clicks through. */
|
|
40
|
+
export declare function slideBuild(graph: SceneGraph, slideId: string): BuildStep[];
|
|
41
|
+
/**
|
|
42
|
+
* The slide a layer animates on, or undefined for a layer that cannot have an animation: one on no
|
|
43
|
+
* slide, a slide itself, or a layer inside an instance, whose component gives it its fields.
|
|
44
|
+
*/
|
|
45
|
+
export declare function animationSlide(graph: SceneGraph, layerId: string): SceneNode | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The layer an animation for `layerId` goes on, as Figma's Animate panel picks it: the layer
|
|
48
|
+
* itself, or for a layer inside an instance the outermost instance on the slide, which Figma
|
|
49
|
+
* animates instead. Undefined for a layer on no slide, or a slide.
|
|
50
|
+
*/
|
|
51
|
+
export declare function animationTarget(graph: SceneGraph, layerId: string): string | undefined;
|
|
52
|
+
/** A layer's step in a slide's build, timed: when it starts within its step, and how long it plays. */
|
|
53
|
+
export interface TimedLayer {
|
|
54
|
+
id: string;
|
|
55
|
+
step: AnimatedLayer;
|
|
56
|
+
/** Seconds after its step starts. */
|
|
57
|
+
start: number;
|
|
58
|
+
seconds: number;
|
|
59
|
+
}
|
|
60
|
+
/** A step of a slide's build with its layers timed one after another, and how long it plays. */
|
|
61
|
+
export interface TimedStep {
|
|
62
|
+
onClick: boolean;
|
|
63
|
+
layers: TimedLayer[];
|
|
64
|
+
seconds: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A slide's build with each step's layers timed as presenting plays them: one after another, each
|
|
68
|
+
* for its duration, or, eased by a spring, for as long as the spring takes to settle.
|
|
69
|
+
*/
|
|
70
|
+
export declare function timedBuild(graph: SceneGraph, slideId: string): TimedStep[];
|
|
71
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","names":[],"sources":["../../src/slides/motion.ts"],"mappings":";;;;;wBAegB,0BAA0B;;wBAa1B,sBAAsB,gBAAgB;;iBAYrC,gCAAgC;EAC/C,OAAO;;EAEP;;wBAGc,uBACd,OAAO,YACP,OAAO,YACN;;wBAea,iBAAiB,MAAM,KAAK;;;;;wBAa5B,kBACd,MAAM,KAAK,mCACX,MAAM,4CACL,KAAK;;iBAgBS;EACf;EACA,WAAW;;;;;;;iBAQI;EACf;EACA,QAAQ;;;wBAIM,eAAe,OAAO,YAAY,kBAAkB;;wBAcpD,WAAW,OAAO,YAAY,kBAAkB;;;;;wBAchD,eAAe,OAAO,YAAY,kBAAkB;;;;;;wBAYpD,gBAAgB,OAAO,YAAY;;iBAmBlC;EACf;EACA,MAAM;;EAEN;EACA;;;iBAIe;EACf;EACA,QAAQ;EACR;;;;;;wBAOc,WAAW,OAAO,YAAY,kBAAkB"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { compact } from "es-toolkit/array";
|
|
2
|
+
import { easingPreset, easingSeconds } from "../variables/easing.js";
|
|
3
|
+
import { mapMotionVariables, motionVariableIds, resolveMotion, resolveTiming } from "../variables/motion.js";
|
|
4
|
+
// src/slides/motion.ts
|
|
5
|
+
/** The transition a slide starts with when one is added. */
|
|
6
|
+
function defaultSlideTransition() {
|
|
7
|
+
return {
|
|
8
|
+
style: "DISSOLVE",
|
|
9
|
+
duration: .3,
|
|
10
|
+
easing: easingPreset("OUT_CUBIC"),
|
|
11
|
+
timing: { type: "ON_CLICK" }
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** Figma's curve for layer animations, which its panel does not offer to change. */
|
|
15
|
+
const LAYER_ANIMATION_BEZIER = {
|
|
16
|
+
x1: .17,
|
|
17
|
+
y1: 0,
|
|
18
|
+
x2: .2,
|
|
19
|
+
y2: 1
|
|
20
|
+
};
|
|
21
|
+
/** The animation a layer starts with when one is added, as in Figma: it slides in from the left. */
|
|
22
|
+
function defaultLayerAnimation(order) {
|
|
23
|
+
return {
|
|
24
|
+
style: "SLIDE_FROM_LEFT",
|
|
25
|
+
phase: "IN",
|
|
26
|
+
trigger: "ON_CLICK",
|
|
27
|
+
duration: .6,
|
|
28
|
+
easing: {
|
|
29
|
+
easing: "CUSTOM_CUBIC",
|
|
30
|
+
bezier: { ...LAYER_ANIMATION_BEZIER }
|
|
31
|
+
},
|
|
32
|
+
order
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function resolveSlideTransition(graph, slide) {
|
|
36
|
+
const transition = slide.slide?.transition;
|
|
37
|
+
if (!transition) return null;
|
|
38
|
+
const { timing } = transition;
|
|
39
|
+
return {
|
|
40
|
+
style: transition.style,
|
|
41
|
+
...resolveMotion(graph, transition, slide.id),
|
|
42
|
+
delay: timing.type === "AFTER_DELAY" ? resolveTiming(graph, timing.delayVariableId, slide.id, timing.delay) : null
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** The variables a layer's slide transition and animation follow. */
|
|
46
|
+
function slideVariableIds(node) {
|
|
47
|
+
const transition = node.slide?.transition;
|
|
48
|
+
return [
|
|
49
|
+
...transition ? motionVariableIds(transition) : [],
|
|
50
|
+
...compact([transition?.timing.type === "AFTER_DELAY" && transition.timing.delayVariableId]),
|
|
51
|
+
...node.animation ? motionVariableIds(node.animation) : []
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A layer's slide transition and animation following other variables, as a copy into another
|
|
56
|
+
* document names them; a variable `map` gives nothing for is let go, keeping the value.
|
|
57
|
+
*/
|
|
58
|
+
function mapSlideVariables(node, map) {
|
|
59
|
+
const transition = node.slide?.transition;
|
|
60
|
+
let slide = node.slide && structuredClone(node.slide);
|
|
61
|
+
if (slide && transition) {
|
|
62
|
+
const mapped = mapMotionVariables(transition, map);
|
|
63
|
+
if (transition.timing.type === "AFTER_DELAY") {
|
|
64
|
+
const { delayVariableId, ...timing } = transition.timing;
|
|
65
|
+
const delay = delayVariableId === void 0 ? void 0 : map(delayVariableId);
|
|
66
|
+
mapped.timing = delay === void 0 ? timing : {
|
|
67
|
+
...timing,
|
|
68
|
+
delayVariableId: delay
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
slide = {
|
|
72
|
+
...slide,
|
|
73
|
+
transition: mapped
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
slide,
|
|
78
|
+
animation: node.animation && mapMotionVariables(node.animation, map)
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** The animated layers of a slide, in the order they play: by `order`, then by layer order. */
|
|
82
|
+
function animatedLayers(graph, slideId) {
|
|
83
|
+
const layers = [];
|
|
84
|
+
const visit = (id) => {
|
|
85
|
+
for (const child of graph.getChildren(id)) {
|
|
86
|
+
if (child.animation) layers.push({
|
|
87
|
+
id: child.id,
|
|
88
|
+
animation: child.animation
|
|
89
|
+
});
|
|
90
|
+
visit(child.id);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
visit(slideId);
|
|
94
|
+
return layers.sort((a, b) => a.animation.order - b.animation.order);
|
|
95
|
+
}
|
|
96
|
+
/** A slide's build: its animations grouped into the steps a presenter clicks through. */
|
|
97
|
+
function slideBuild(graph, slideId) {
|
|
98
|
+
const steps = [];
|
|
99
|
+
for (const layer of animatedLayers(graph, slideId)) {
|
|
100
|
+
const last = steps.at(-1);
|
|
101
|
+
if (layer.animation.trigger === "AFTER_PREVIOUS" && last) last.layers.push(layer);
|
|
102
|
+
else steps.push({
|
|
103
|
+
onClick: layer.animation.trigger === "ON_CLICK",
|
|
104
|
+
layers: [layer]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return steps;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The slide a layer animates on, or undefined for a layer that cannot have an animation: one on no
|
|
111
|
+
* slide, a slide itself, or a layer inside an instance, whose component gives it its fields.
|
|
112
|
+
*/
|
|
113
|
+
function animationSlide(graph, layerId) {
|
|
114
|
+
const node = graph.getNode(layerId);
|
|
115
|
+
if (!node?.parentId || node.type === "SLIDE") return void 0;
|
|
116
|
+
if (graph.closest(node.parentId, (item) => item.type === "INSTANCE")) return void 0;
|
|
117
|
+
return graph.closest(node.parentId, (item) => item.type === "SLIDE") ?? void 0;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The layer an animation for `layerId` goes on, as Figma's Animate panel picks it: the layer
|
|
121
|
+
* itself, or for a layer inside an instance the outermost instance on the slide, which Figma
|
|
122
|
+
* animates instead. Undefined for a layer on no slide, or a slide.
|
|
123
|
+
*/
|
|
124
|
+
function animationTarget(graph, layerId) {
|
|
125
|
+
const node = graph.getNode(layerId);
|
|
126
|
+
if (!node || node.type === "SLIDE") return void 0;
|
|
127
|
+
let target = layerId;
|
|
128
|
+
let id = node.parentId;
|
|
129
|
+
const seen = /* @__PURE__ */ new Set();
|
|
130
|
+
while (id && !seen.has(id)) {
|
|
131
|
+
seen.add(id);
|
|
132
|
+
const parent = graph.getNode(id);
|
|
133
|
+
if (!parent) return void 0;
|
|
134
|
+
if (parent.type === "SLIDE") return target;
|
|
135
|
+
if (parent.type === "INSTANCE") target = parent.id;
|
|
136
|
+
id = parent.parentId;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* A slide's build with each step's layers timed as presenting plays them: one after another, each
|
|
141
|
+
* for its duration, or, eased by a spring, for as long as the spring takes to settle.
|
|
142
|
+
*/
|
|
143
|
+
function timedBuild(graph, slideId) {
|
|
144
|
+
return slideBuild(graph, slideId).map((step) => {
|
|
145
|
+
let start = 0;
|
|
146
|
+
const layers = step.layers.map((layer) => {
|
|
147
|
+
const motion = resolveMotion(graph, layer.animation, layer.id);
|
|
148
|
+
const seconds = easingSeconds(motion.easing, motion.duration);
|
|
149
|
+
const timed = {
|
|
150
|
+
id: layer.id,
|
|
151
|
+
step: layer,
|
|
152
|
+
start,
|
|
153
|
+
seconds
|
|
154
|
+
};
|
|
155
|
+
start += seconds;
|
|
156
|
+
return timed;
|
|
157
|
+
});
|
|
158
|
+
return {
|
|
159
|
+
onClick: step.onClick,
|
|
160
|
+
layers,
|
|
161
|
+
seconds: start
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
export { animatedLayers, animationSlide, animationTarget, defaultLayerAnimation, defaultSlideTransition, mapSlideVariables, resolveSlideTransition, slideBuild, slideVariableIds, timedBuild };
|
|
166
|
+
|
|
167
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","names":[],"sources":["../../src/slides/motion.ts"],"sourcesContent":["import { compact } from 'es-toolkit/array'\n\nimport type { SceneGraph } from '../graph'\nimport type { SceneNode } from '../types'\nimport { easingPreset, easingSeconds } from '../variables/easing'\nimport {\n mapMotionVariables,\n motionVariableIds,\n resolveMotion,\n resolveTiming,\n type ResolvedMotion\n} from '../variables/motion'\nimport type { LayerAnimation, SlideTransition, SlideTransitionStyle } from './types'\n\n/** The transition a slide starts with when one is added. */\nexport function defaultSlideTransition(): SlideTransition {\n return {\n style: 'DISSOLVE',\n duration: 0.3,\n easing: easingPreset('OUT_CUBIC'),\n timing: { type: 'ON_CLICK' }\n }\n}\n\n/** Figma's curve for layer animations, which its panel does not offer to change. */\nconst LAYER_ANIMATION_BEZIER = { x1: 0.17, y1: 0, x2: 0.2, y2: 1 }\n\n/** The animation a layer starts with when one is added, as in Figma: it slides in from the left. */\nexport function defaultLayerAnimation(order: number): LayerAnimation {\n return {\n style: 'SLIDE_FROM_LEFT',\n phase: 'IN',\n trigger: 'ON_CLICK',\n duration: 0.6,\n easing: { easing: 'CUSTOM_CUBIC', bezier: { ...LAYER_ANIMATION_BEZIER } },\n order\n }\n}\n\n/** A slide's transition as it plays, with its variables read for the slide. */\nexport interface ResolvedSlideTransition extends ResolvedMotion {\n style: SlideTransitionStyle\n /** Seconds before the deck moves on by itself, or null when it waits for the presenter. */\n delay: number | null\n}\n\nexport function resolveSlideTransition(\n graph: SceneGraph,\n slide: SceneNode\n): ResolvedSlideTransition | null {\n const transition = slide.slide?.transition\n if (!transition) return null\n const { timing } = transition\n return {\n style: transition.style,\n ...resolveMotion(graph, transition, slide.id),\n delay:\n timing.type === 'AFTER_DELAY'\n ? resolveTiming(graph, timing.delayVariableId, slide.id, timing.delay)\n : null\n }\n}\n\n/** The variables a layer's slide transition and animation follow. */\nexport function slideVariableIds(node: Pick<SceneNode, 'slide' | 'animation'>): string[] {\n const transition = node.slide?.transition\n return [\n ...(transition ? motionVariableIds(transition) : []),\n ...compact([transition?.timing.type === 'AFTER_DELAY' && transition.timing.delayVariableId]),\n ...(node.animation ? motionVariableIds(node.animation) : [])\n ]\n}\n\n/**\n * A layer's slide transition and animation following other variables, as a copy into another\n * document names them; a variable `map` gives nothing for is let go, keeping the value.\n */\nexport function mapSlideVariables(\n node: Pick<SceneNode, 'slide' | 'animation'>,\n map: (variableId: string) => string | undefined\n): Pick<SceneNode, 'slide' | 'animation'> {\n const transition = node.slide?.transition\n let slide = node.slide && structuredClone(node.slide)\n if (slide && transition) {\n const mapped = mapMotionVariables(transition, map)\n if (transition.timing.type === 'AFTER_DELAY') {\n const { delayVariableId, ...timing } = transition.timing\n const delay = delayVariableId === undefined ? undefined : map(delayVariableId)\n mapped.timing = delay === undefined ? timing : { ...timing, delayVariableId: delay }\n }\n slide = { ...slide, transition: mapped }\n }\n return { slide, animation: node.animation && mapMotionVariables(node.animation, map) }\n}\n\n/** A layer's animation, with the layer it moves. */\nexport interface AnimatedLayer {\n id: string\n animation: LayerAnimation\n}\n\n/**\n * A step of a slide's build: its layers' animations, one after another. A step waits for the\n * presenter, except a first one made only of `AFTER_PREVIOUS` animations, which plays as the slide\n * appears.\n */\nexport interface BuildStep {\n onClick: boolean\n layers: AnimatedLayer[]\n}\n\n/** The animated layers of a slide, in the order they play: by `order`, then by layer order. */\nexport function animatedLayers(graph: SceneGraph, slideId: string): AnimatedLayer[] {\n const layers: AnimatedLayer[] = []\n const visit = (id: string) => {\n for (const child of graph.getChildren(id)) {\n if (child.animation) layers.push({ id: child.id, animation: child.animation })\n visit(child.id)\n }\n }\n visit(slideId)\n // Array sort is stable, so equal orders keep layer order.\n return layers.sort((a, b) => a.animation.order - b.animation.order)\n}\n\n/** A slide's build: its animations grouped into the steps a presenter clicks through. */\nexport function slideBuild(graph: SceneGraph, slideId: string): BuildStep[] {\n const steps: BuildStep[] = []\n for (const layer of animatedLayers(graph, slideId)) {\n const last = steps.at(-1)\n if (layer.animation.trigger === 'AFTER_PREVIOUS' && last) last.layers.push(layer)\n else steps.push({ onClick: layer.animation.trigger === 'ON_CLICK', layers: [layer] })\n }\n return steps\n}\n\n/**\n * The slide a layer animates on, or undefined for a layer that cannot have an animation: one on no\n * slide, a slide itself, or a layer inside an instance, whose component gives it its fields.\n */\nexport function animationSlide(graph: SceneGraph, layerId: string): SceneNode | undefined {\n const node = graph.getNode(layerId)\n if (!node?.parentId || node.type === 'SLIDE') return undefined\n if (graph.closest(node.parentId, (item) => item.type === 'INSTANCE')) return undefined\n return graph.closest(node.parentId, (item) => item.type === 'SLIDE') ?? undefined\n}\n\n/**\n * The layer an animation for `layerId` goes on, as Figma's Animate panel picks it: the layer\n * itself, or for a layer inside an instance the outermost instance on the slide, which Figma\n * animates instead. Undefined for a layer on no slide, or a slide.\n */\nexport function animationTarget(graph: SceneGraph, layerId: string): string | undefined {\n const node = graph.getNode(layerId)\n if (!node || node.type === 'SLIDE') return undefined\n let target = layerId\n let id = node.parentId\n // A parent cycle in bad data ends the walk.\n const seen = new Set<string>()\n while (id && !seen.has(id)) {\n seen.add(id)\n const parent = graph.getNode(id)\n if (!parent) return undefined\n if (parent.type === 'SLIDE') return target\n if (parent.type === 'INSTANCE') target = parent.id\n id = parent.parentId\n }\n return undefined\n}\n\n/** A layer's step in a slide's build, timed: when it starts within its step, and how long it plays. */\nexport interface TimedLayer {\n id: string\n step: AnimatedLayer\n /** Seconds after its step starts. */\n start: number\n seconds: number\n}\n\n/** A step of a slide's build with its layers timed one after another, and how long it plays. */\nexport interface TimedStep {\n onClick: boolean\n layers: TimedLayer[]\n seconds: number\n}\n\n/**\n * A slide's build with each step's layers timed as presenting plays them: one after another, each\n * for its duration, or, eased by a spring, for as long as the spring takes to settle.\n */\nexport function timedBuild(graph: SceneGraph, slideId: string): TimedStep[] {\n return slideBuild(graph, slideId).map((step) => {\n let start = 0\n const layers = step.layers.map((layer) => {\n const motion = resolveMotion(graph, layer.animation, layer.id)\n const seconds = easingSeconds(motion.easing, motion.duration)\n const timed = { id: layer.id, step: layer, start, seconds }\n start += seconds\n return timed\n })\n return { onClick: step.onClick, layers, seconds: start }\n })\n}\n"],"mappings":";;;;;AAeA,SAAgB,yBAA0C;CACxD,OAAO;EACL,OAAO;EACP,UAAU;EACV,QAAQ,aAAa,WAAW;EAChC,QAAQ,EAAE,MAAM,WAAW;CAC7B;AACF;;AAGA,MAAM,yBAAyB;CAAE,IAAI;CAAM,IAAI;CAAG,IAAI;CAAK,IAAI;AAAE;;AAGjE,SAAgB,sBAAsB,OAA+B;CACnE,OAAO;EACL,OAAO;EACP,OAAO;EACP,SAAS;EACT,UAAU;EACV,QAAQ;GAAE,QAAQ;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A;EACpB,IAAI,OAAO,SAAS,SAAS,OAAO;EACpC,IAAI,OAAO,SAAS,YAAY,SAAS,OAAO;EAChD,KAAK,OAAO;CACd;AAEF;;;;;AAsBA,SAAgB,WAAW,OAAmB,SAA8B;CAC1E,OAAO,WAAW,OAAO,OAAO,CAAC,CAAC,KAAK,SAAS;EAC9C,IAAI,QAAQ;EACZ,MAAM,SAAS,KAAK,OAAO,KAAK,UAAU;GACxC,MAAM,SAAS,cAAc,OAAO,MAAM,WAAW,MAAM,EAAE;GAC7D,MAAM,UAAU,cAAc,OAAO,QAAQ,OAAO,QAAQ;GAC5D,MAAM,QAAQ;IAAE,IAAI,MAAM;IAAI,MAAM;IAAO;IAAO;GAAQ;GAC1D,SAAS;GACT,OAAO;EACT,CAAC;EACD,OAAO;GAAE,SAAS,KAAK;GAAS;GAAQ,SAAS;EAAM;CACzD,CAAC;AACH"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { KeyframeTrack } from "../motion/types.js";
|
|
2
|
+
import { Easing } from "../types.js";
|
|
3
|
+
import { LayerAnimation, SlideTransitionStyle } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* How a slide is drawn at a moment of a transition: moved by fractions of its own width and
|
|
6
|
+
* height, faded, and darkened towards black.
|
|
7
|
+
*/
|
|
8
|
+
export interface SlideFrame {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
opacity: number;
|
|
12
|
+
/** How dark: 0 is the slide as it is, 1 black. */
|
|
13
|
+
dim: number;
|
|
14
|
+
}
|
|
15
|
+
/** The two slides of a transition, the one drawn first below the other. */
|
|
16
|
+
export interface TransitionFrames {
|
|
17
|
+
from: SlideFrame;
|
|
18
|
+
to: SlideFrame;
|
|
19
|
+
/** Which slide is drawn on top. */
|
|
20
|
+
above: 'from' | 'to';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Where the slides of a transition are when its easing is at `position`: 0 at the start, 1 at the
|
|
24
|
+
* end, past 1 while a spring overshoots. Smart animate plays as Dissolve for now.
|
|
25
|
+
*/
|
|
26
|
+
export declare function transitionFrames(style: SlideTransitionStyle, position: number): TransitionFrames;
|
|
27
|
+
/** How far, in slide pixels, a layer slides on or off, whatever its size, as in Figma. */
|
|
28
|
+
export declare const LAYER_SLIDE_DISTANCE = 300;
|
|
29
|
+
/** Where a layer animating onto or off its slide is drawn, relative to where it is. */
|
|
30
|
+
export interface LayerFrame {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
opacity: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A layer's animation as keyframe tracks over the `seconds` its step plays, eased by `easing`: a
|
|
37
|
+
* layer coming in fades in as it slides the last stretch to its place; one going out keeps
|
|
38
|
+
* moving the same way as it fades. A spring's step lasts as long as the spring takes to settle,
|
|
39
|
+
* so fitted into it the spring keeps its own pace.
|
|
40
|
+
*/
|
|
41
|
+
export declare function layerAnimationTracks(animation: Pick<LayerAnimation, 'style' | 'phase'>, easing: Easing, seconds: number): Record<string, KeyframeTrack>;
|
|
42
|
+
/** Where an animating layer is `elapsed` seconds into the `seconds` its step plays. */
|
|
43
|
+
export declare function layerFrameAt(animation: Pick<LayerAnimation, 'style' | 'phase'>, easing: Easing, elapsed: number, seconds: number): LayerFrame;
|
|
44
|
+
/** Where a layer is drawn before its step has played, or after. */
|
|
45
|
+
export declare function layerAtRest(animation: Pick<LayerAnimation, 'phase'>, played: boolean): LayerFrame;
|
|
46
|
+
/** The transitions Figma's panel offers, each but the first three in four directions. */
|
|
47
|
+
export declare const SLIDE_TRANSITION_KINDS: readonly ["NONE", "SMART_ANIMATE", "DISSOLVE", "PUSH", "SLIDE_IN", "SLIDE_OUT", "MOVE_IN", "MOVE_OUT"];
|
|
48
|
+
export type SlideTransitionKind = (typeof SLIDE_TRANSITION_KINDS)[number];
|
|
49
|
+
/** Which way a transition or a layer moves, as Figma's arrows show it. */
|
|
50
|
+
export declare const MOTION_DIRECTIONS: readonly ["LEFT", "RIGHT", "DOWN", "UP"];
|
|
51
|
+
export type MotionDirection = (typeof MOTION_DIRECTIONS)[number];
|
|
52
|
+
/** A style's kind, as Figma's panel lists it. */
|
|
53
|
+
export declare function transitionKind(style: SlideTransitionStyle): SlideTransitionKind;
|
|
54
|
+
/** Which way a style moves its slides, or null for one that does not move them. */
|
|
55
|
+
export declare function transitionDirection(style: SlideTransitionStyle): MotionDirection | null;
|
|
56
|
+
/** The style of a kind moving `direction`; a kind that does not move ignores it. */
|
|
57
|
+
export declare function transitionStyle(kind: SlideTransitionKind, direction: MotionDirection): SlideTransitionStyle;
|
|
58
|
+
/** Which way a layer animation moves its layer, or null for a fade. */
|
|
59
|
+
export declare function layerAnimationDirection(style: LayerAnimation['style']): MotionDirection | null;
|
|
60
|
+
/** The layer animation that slides its layer `direction`, or fades it with null. */
|
|
61
|
+
export declare function layerAnimationStyle(direction: MotionDirection | null): LayerAnimation['style'];
|
|
62
|
+
//# sourceMappingURL=playback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback.d.ts","names":[],"sources":["../../src/slides/playback.ts"],"mappings":";;;;;;;iBAUiB;EACf;EACA;EACA;;EAEA;;;iBAIe;EACf,MAAM;EACN,IAAI;;EAEJ;;;;;;wBA4Cc,iBAAiB,OAAO,sBAAsB,mBAAmB;;qBA0BpE;;iBAGI;EACf;EACA;EACA;;;;;;;;wBAgBc,qBACd,WAAW,KAAK,oCAChB,QAAQ,QACR,kBACC,eAAe;;wBA0BF,aACd,WAAW,KAAK,oCAChB,QAAQ,QACR,iBACA,kBACC;;wBAca,YAAY,WAAW,KAAK,0BAA0B,kBAAkB;;qBAM3E;YAUD,8BAA8B;;qBAG7B;YACD,0BAA0B;;wBA6BtB,eAAe,OAAO,uBAAuB;;wBAO7C,oBAAoB,OAAO,uBAAuB;;wBAKlD,gBACd,MAAM,qBACN,WAAW,kBACV;;wBAMa,wBAAwB,OAAO,0BAA0B;;wBAKzD,oBAAoB,WAAW,yBAAyB"}
|