animl-cli 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/NOTICE +34 -0
- package/README.md +21 -2
- package/docs/AUTHORING.md +1530 -0
- package/docs/CLI.md +627 -0
- package/docs/parity/inventory.json +34570 -0
- package/examples/bell.ani +359 -0
- package/examples/bell.animl +114 -0
- package/examples/composite.ani +110 -0
- package/examples/composite.animl +21 -0
- package/examples/feather.ani +56 -0
- package/examples/feather.animl +20 -0
- package/examples/image-paints.ani +32 -0
- package/examples/image-paints.animl +8 -0
- package/examples/lib/cards.animl +9 -0
- package/examples/lib/shared.animl +10 -0
- package/examples/lib/ui.animl +8 -0
- package/examples/moon-toggle.png +0 -0
- package/examples/moon.ani +250 -0
- package/examples/moon.animl +55 -0
- package/examples/motion.ani +94 -0
- package/examples/motion.animl +24 -0
- package/examples/paint.ani +91 -0
- package/examples/paint.animl +21 -0
- package/examples/photo.ani +29 -0
- package/examples/photo.animl +6 -0
- package/examples/progress.ani +43 -0
- package/examples/progress.animl +6 -0
- package/examples/shapes.ani +109 -0
- package/examples/shapes.animl +16 -0
- package/examples/slice.ani +32 -0
- package/examples/slice.animl +9 -0
- package/examples/switch.ani +91 -0
- package/examples/switch.animl +22 -0
- package/examples/toolbar.ani +480 -0
- package/examples/toolbar.animl +115 -0
- package/examples/trash-ring.png +0 -0
- package/examples/trash.ani +357 -0
- package/examples/trash.animl +88 -0
- package/examples/web/index.html +520 -0
- package/examples/web/template.html +162 -0
- package/fixtures/bell/rive-reference/frames/00-rest.png +0 -0
- package/fixtures/bell/rive-reference/frames/01-hover.png +0 -0
- package/fixtures/bell/rive-reference/frames/02-ring-f3.png +0 -0
- package/fixtures/bell/rive-reference/frames/03-ring-f7.png +0 -0
- package/fixtures/bell/rive-reference/frames/04-ring-f17.png +0 -0
- package/fixtures/bell/rive-reference/frames/05-ring-f27.png +0 -0
- package/fixtures/bell/rive-reference/frames/06-ring-f57.png +0 -0
- package/fixtures/bell/rive-reference/frames/07-rested.png +0 -0
- package/fixtures/bell/rive-reference/frames/08-out.png +0 -0
- package/fixtures/bell/rive-reference/frames/commands.txt +24 -0
- package/llms.txt +30 -0
- package/modules/a11y/AUTHORING.md +108 -0
- package/modules/a11y/SPEC.md +304 -0
- package/modules/a11y/capabilities/a11y-focus-condition/example.ani +69 -0
- package/modules/a11y/capabilities/a11y-focus-condition/example.animl +17 -0
- package/modules/a11y/capabilities/a11y-inferred-text/example.ani +47 -0
- package/modules/a11y/capabilities/a11y-inferred-text/example.animl +13 -0
- package/modules/a11y/capabilities/a11y-property-heading-level/example.ani +26 -0
- package/modules/a11y/capabilities/a11y-property-heading-level/example.animl +6 -0
- package/modules/a11y/capabilities/a11y-tree-bounds/example.ani +88 -0
- package/modules/a11y/capabilities/a11y-tree-bounds/example.animl +18 -0
- package/modules/a11y/capabilities/a11y-tree-visibility/example.ani +16 -0
- package/modules/a11y/capabilities/a11y-tree-visibility/example.animl +4 -0
- package/modules/a11y/core/commands.source +135 -0
- package/modules/a11y/examples/contract.ani +74 -0
- package/modules/a11y/examples/contract.animl +15 -0
- package/modules/a11y/examples/focus-ancestor-policy.ani +72 -0
- package/modules/a11y/examples/focus-ancestor-policy.animl +16 -0
- package/modules/a11y/examples/painted-extents.ani +331 -0
- package/modules/a11y/examples/painted-extents.animl +62 -0
- package/modules/a11y/examples/painted-groups.ani +88 -0
- package/modules/a11y/examples/painted-groups.animl +18 -0
- package/modules/a11y/examples/slider-value-text.ani +53 -0
- package/modules/a11y/examples/slider-value-text.animl +11 -0
- package/modules/a11y/manifest.source +49 -0
- package/modules/a11y-actions/manifest.source +22 -0
- package/modules/a11y-dom/AUTHORING.md +35 -0
- package/modules/a11y-dom/SPEC.md +165 -0
- package/modules/a11y-dom/examples/mute.ani +28 -0
- package/modules/a11y-dom/examples/mute.animl +6 -0
- package/modules/a11y-dom/examples/navigation.ani +152 -0
- package/modules/a11y-dom/examples/navigation.animl +35 -0
- package/modules/a11y-dom/manifest.source +22 -0
- package/modules/assetio/SPEC.md +16 -0
- package/modules/assetio/manifest.source +12 -0
- package/modules/assets/SPEC.md +23 -0
- package/modules/assets/capabilities/assets-audio/example.ani +60 -0
- package/modules/assets/capabilities/assets-audio/example.animl +16 -0
- package/modules/assets/capabilities/assets-audio-clip/example.ani +62 -0
- package/modules/assets/capabilities/assets-audio-clip/example.animl +17 -0
- package/modules/assets/capabilities/assets-audio-export-source/example.ani +60 -0
- package/modules/assets/capabilities/assets-audio-export-source/example.animl +16 -0
- package/modules/assets/capabilities/assets-audio-import-flac/example.ani +63 -0
- package/modules/assets/capabilities/assets-audio-import-flac/example.animl +17 -0
- package/modules/assets/capabilities/assets-audio-import-mp3/example.ani +63 -0
- package/modules/assets/capabilities/assets-audio-import-mp3/example.animl +17 -0
- package/modules/assets/capabilities/assets-audio-import-wav/example.ani +60 -0
- package/modules/assets/capabilities/assets-audio-import-wav/example.animl +16 -0
- package/modules/assets/capabilities/assets-blob/example.ani +52 -0
- package/modules/assets/capabilities/assets-blob/example.animl +13 -0
- package/modules/assets/capabilities/assets-cdn-disable/example.ani +48 -0
- package/modules/assets/capabilities/assets-cdn-disable/example.animl +12 -0
- package/modules/assets/capabilities/assets-exclude-export/example.ani +49 -0
- package/modules/assets/capabilities/assets-exclude-export/example.animl +12 -0
- package/modules/assets/capabilities/assets-host-decode-audio/example.ani +60 -0
- package/modules/assets/capabilities/assets-host-decode-audio/example.animl +16 -0
- package/modules/assets/capabilities/assets-image-encoding-jpeg/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-encoding-jpeg/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-encoding-png/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-encoding-png/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-encoding-webp/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-encoding-webp/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-export-controls/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-export-controls/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-filter-bilinear/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-filter-bilinear/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-filter-nearest/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-filter-nearest/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-import-jpeg/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-import-jpeg/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-import-jpg/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-import-jpg/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-import-png/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-import-png/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-import-webp/example.ani +49 -0
- package/modules/assets/capabilities/assets-image-import-webp/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-wrap-x-clamp/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-wrap-x-clamp/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-wrap-x-mirror/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-wrap-x-mirror/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-wrap-x-repeat/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-wrap-x-repeat/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-wrap-y-clamp/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-wrap-y-clamp/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-wrap-y-mirror/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-wrap-y-mirror/example.animl +12 -0
- package/modules/assets/capabilities/assets-image-wrap-y-repeat/example.ani +50 -0
- package/modules/assets/capabilities/assets-image-wrap-y-repeat/example.animl +12 -0
- package/modules/assets/capabilities/assets-lottie-import/example.ani +58 -0
- package/modules/assets/capabilities/assets-lottie-import/example.animl +20 -0
- package/modules/assets/capabilities/assets-metadata/example.ani +53 -0
- package/modules/assets/capabilities/assets-metadata/example.animl +12 -0
- package/modules/assets/capabilities/assets-replacement-scope-image/example.ani +48 -0
- package/modules/assets/capabilities/assets-replacement-scope-image/example.animl +12 -0
- package/modules/assets/capabilities/assets-svg-import/example.ani +52 -0
- package/modules/assets/capabilities/assets-svg-import/example.animl +11 -0
- package/modules/assets/capabilities/host-api-asset-cdn-policy/example.ani +48 -0
- package/modules/assets/capabilities/host-api-asset-cdn-policy/example.animl +12 -0
- package/modules/assets/capabilities/host-api-asset-loader/example.ani +48 -0
- package/modules/assets/capabilities/host-api-asset-loader/example.animl +12 -0
- package/modules/assets/capabilities/host-api-asset-metadata/example.ani +53 -0
- package/modules/assets/capabilities/host-api-asset-metadata/example.animl +12 -0
- package/modules/assets/manifest.source +79 -0
- package/modules/bind/AUTHORING.md +49 -0
- package/modules/bind/capabilities/data-bind-listener-actions/example.ani +30 -0
- package/modules/bind/capabilities/data-bind-listener-actions/example.animl +5 -0
- package/modules/bind/core/expression.source +224 -0
- package/modules/bind/examples/filtering-list.ani +122 -0
- package/modules/bind/examples/filtering-list.animl +29 -0
- package/modules/bind/manifest.source +58 -0
- package/modules/canvas/capabilities/host-api-device-pixel-ratio/example.ani +16 -0
- package/modules/canvas/capabilities/host-api-device-pixel-ratio/example.animl +3 -0
- package/modules/canvas/capabilities/host-api-resize-backing-surface/example.ani +16 -0
- package/modules/canvas/capabilities/host-api-resize-backing-surface/example.animl +3 -0
- package/modules/canvas/capabilities/platforms-web-canvas/example.ani +16 -0
- package/modules/canvas/capabilities/platforms-web-canvas/example.animl +3 -0
- package/modules/canvas/manifest.source +16 -0
- package/modules/colormix/examples/switch.ani +51 -0
- package/modules/colormix/examples/switch.animl +13 -0
- package/modules/colormix/manifest.source +39 -0
- package/modules/componentpaint/capabilities/drawing-paint-paint-artboard/example.ani +72 -0
- package/modules/componentpaint/capabilities/drawing-paint-paint-artboard/example.animl +13 -0
- package/modules/componentpaint/examples/live.ani +72 -0
- package/modules/componentpaint/examples/live.animl +13 -0
- package/modules/componentpaint/manifest.source +29 -0
- package/modules/components/manifest.source +61 -0
- package/modules/composite/manifest.source +49 -0
- package/modules/contour/capabilities/drawing-paint-asymmetric-vertex/example.ani +32 -0
- package/modules/contour/capabilities/drawing-paint-asymmetric-vertex/example.animl +5 -0
- package/modules/contour/capabilities/drawing-paint-detached-vertex/example.ani +32 -0
- package/modules/contour/capabilities/drawing-paint-detached-vertex/example.animl +5 -0
- package/modules/contour/capabilities/drawing-paint-effect-order/example.ani +28 -0
- package/modules/contour/capabilities/drawing-paint-effect-order/example.animl +3 -0
- package/modules/contour/capabilities/drawing-paint-fill-rule-clockwise/example.ani +17 -0
- package/modules/contour/capabilities/drawing-paint-fill-rule-clockwise/example.animl +3 -0
- package/modules/contour/capabilities/drawing-paint-geometry-origin/example.ani +35 -0
- package/modules/contour/capabilities/drawing-paint-geometry-origin/example.animl +5 -0
- package/modules/contour/capabilities/drawing-paint-mirrored-vertex/example.ani +31 -0
- package/modules/contour/capabilities/drawing-paint-mirrored-vertex/example.animl +5 -0
- package/modules/contour/capabilities/drawing-paint-rounded-vertex/example.ani +31 -0
- package/modules/contour/capabilities/drawing-paint-rounded-vertex/example.animl +5 -0
- package/modules/contour/capabilities/drawing-paint-shared-effects/example.ani +26 -0
- package/modules/contour/capabilities/drawing-paint-shared-effects/example.animl +3 -0
- package/modules/contour/capabilities/drawing-paint-straight-vertex/example.ani +30 -0
- package/modules/contour/capabilities/drawing-paint-straight-vertex/example.animl +5 -0
- package/modules/contour/capabilities/drawing-paint-trim-sequential/example.ani +22 -0
- package/modules/contour/capabilities/drawing-paint-trim-sequential/example.animl +3 -0
- package/modules/contour/capabilities/drawing-paint-trim-synchronized/example.ani +22 -0
- package/modules/contour/capabilities/drawing-paint-trim-synchronized/example.animl +3 -0
- package/modules/contour/manifest.source +47 -0
- package/modules/convert/SPEC.md +140 -0
- package/modules/convert/capabilities/data-converter-color-formatting/example.ani +44 -0
- package/modules/convert/capabilities/data-converter-color-formatting/example.animl +8 -0
- package/modules/convert/capabilities/data-converter-trigger/example.ani +78 -0
- package/modules/convert/capabilities/data-converter-trigger/example.animl +22 -0
- package/modules/convert/core/math.source +126 -0
- package/modules/convert/examples/score.ani +60 -0
- package/modules/convert/examples/score.animl +12 -0
- package/modules/convert/examples/travelling-indicator.ani +41 -0
- package/modules/convert/examples/travelling-indicator.animl +8 -0
- package/modules/convert/manifest.source +53 -0
- package/modules/corners/examples/switch.ani +20 -0
- package/modules/corners/examples/switch.animl +3 -0
- package/modules/corners/manifest.source +25 -0
- package/modules/data/SPEC.md +216 -0
- package/modules/data/capabilities/data-bind-conditions/example.ani +52 -0
- package/modules/data/capabilities/data-bind-conditions/example.animl +17 -0
- package/modules/data/capabilities/data-bind-converter-options/example.ani +16 -0
- package/modules/data/capabilities/data-bind-converter-options/example.animl +4 -0
- package/modules/data/capabilities/data-bind-instance-values/example.ani +66 -0
- package/modules/data/capabilities/data-bind-instance-values/example.animl +17 -0
- package/modules/data/capabilities/data-bind-keyframes/example.ani +16 -0
- package/modules/data/capabilities/data-bind-keyframes/example.animl +4 -0
- package/modules/data/capabilities/data-bind-script-inputs/example.ani +16 -0
- package/modules/data/capabilities/data-bind-script-inputs/example.animl +4 -0
- package/modules/data/capabilities/data-bind-text/example.ani +16 -0
- package/modules/data/capabilities/data-bind-text/example.animl +4 -0
- package/modules/data/capabilities/data-binding-absolute/example.ani +43 -0
- package/modules/data/capabilities/data-binding-absolute/example.animl +13 -0
- package/modules/data/capabilities/data-binding-once/example.ani +58 -0
- package/modules/data/capabilities/data-binding-once/example.animl +20 -0
- package/modules/data/capabilities/data-binding-relative/example.ani +16 -0
- package/modules/data/capabilities/data-binding-relative/example.animl +4 -0
- package/modules/data/capabilities/data-binding-to-source/example.ani +58 -0
- package/modules/data/capabilities/data-binding-to-source/example.animl +20 -0
- package/modules/data/capabilities/data-binding-two-way-prefer-source/example.ani +59 -0
- package/modules/data/capabilities/data-binding-two-way-prefer-source/example.animl +20 -0
- package/modules/data/capabilities/data-binding-two-way-prefer-target/example.ani +59 -0
- package/modules/data/capabilities/data-binding-two-way-prefer-target/example.animl +20 -0
- package/modules/data/capabilities/data-component-public-data/example.ani +66 -0
- package/modules/data/capabilities/data-component-public-data/example.animl +17 -0
- package/modules/data/capabilities/data-custom-property-boolean/example.ani +35 -0
- package/modules/data/capabilities/data-custom-property-boolean/example.animl +9 -0
- package/modules/data/capabilities/data-custom-property-color/example.ani +38 -0
- package/modules/data/capabilities/data-custom-property-color/example.animl +9 -0
- package/modules/data/capabilities/data-custom-property-enum/example.ani +40 -0
- package/modules/data/capabilities/data-custom-property-enum/example.animl +9 -0
- package/modules/data/capabilities/data-custom-property-number/example.ani +35 -0
- package/modules/data/capabilities/data-custom-property-number/example.animl +9 -0
- package/modules/data/capabilities/data-custom-property-string/example.ani +35 -0
- package/modules/data/capabilities/data-custom-property-string/example.animl +9 -0
- package/modules/data/capabilities/data-custom-property-trigger/example.ani +52 -0
- package/modules/data/capabilities/data-custom-property-trigger/example.animl +15 -0
- package/modules/data/capabilities/data-default-instance/example.ani +43 -0
- package/modules/data/capabilities/data-default-instance/example.animl +13 -0
- package/modules/data/capabilities/data-editor-preview-instance/example.ani +16 -0
- package/modules/data/capabilities/data-editor-preview-instance/example.animl +4 -0
- package/modules/data/capabilities/data-enum-members/example.ani +41 -0
- package/modules/data/capabilities/data-enum-members/example.animl +8 -0
- package/modules/data/capabilities/data-global-model/example.ani +64 -0
- package/modules/data/capabilities/data-global-model/example.animl +17 -0
- package/modules/data/capabilities/data-instance-export/example.ani +41 -0
- package/modules/data/capabilities/data-instance-export/example.animl +8 -0
- package/modules/data/capabilities/data-list-items/example.ani +55 -0
- package/modules/data/capabilities/data-list-items/example.animl +16 -0
- package/modules/data/capabilities/data-model-definition/example.ani +43 -0
- package/modules/data/capabilities/data-model-definition/example.animl +13 -0
- package/modules/data/capabilities/data-named-instances/example.ani +43 -0
- package/modules/data/capabilities/data-named-instances/example.animl +13 -0
- package/modules/data/capabilities/data-operation-operand-view-model/example.ani +32 -0
- package/modules/data/capabilities/data-operation-operand-view-model/example.animl +9 -0
- package/modules/data/capabilities/data-property-artboard/example.ani +16 -0
- package/modules/data/capabilities/data-property-artboard/example.animl +4 -0
- package/modules/data/capabilities/data-property-asset-blob/example.ani +40 -0
- package/modules/data/capabilities/data-property-asset-blob/example.animl +10 -0
- package/modules/data/capabilities/data-property-asset-font/example.ani +40 -0
- package/modules/data/capabilities/data-property-asset-font/example.animl +10 -0
- package/modules/data/capabilities/data-property-asset-image/example.ani +40 -0
- package/modules/data/capabilities/data-property-asset-image/example.animl +12 -0
- package/modules/data/capabilities/data-property-boolean/example.ani +28 -0
- package/modules/data/capabilities/data-property-boolean/example.animl +7 -0
- package/modules/data/capabilities/data-property-color/example.ani +29 -0
- package/modules/data/capabilities/data-property-color/example.animl +7 -0
- package/modules/data/capabilities/data-property-enum-custom/example.ani +29 -0
- package/modules/data/capabilities/data-property-enum-custom/example.animl +7 -0
- package/modules/data/capabilities/data-property-enum-system/example.ani +29 -0
- package/modules/data/capabilities/data-property-enum-system/example.animl +7 -0
- package/modules/data/capabilities/data-property-list/example.ani +55 -0
- package/modules/data/capabilities/data-property-list/example.animl +16 -0
- package/modules/data/capabilities/data-property-number/example.ani +29 -0
- package/modules/data/capabilities/data-property-number/example.animl +7 -0
- package/modules/data/capabilities/data-property-string/example.ani +29 -0
- package/modules/data/capabilities/data-property-string/example.animl +7 -0
- package/modules/data/capabilities/data-property-symbol-list-index/example.ani +16 -0
- package/modules/data/capabilities/data-property-symbol-list-index/example.animl +4 -0
- package/modules/data/capabilities/data-property-text-style/example.ani +16 -0
- package/modules/data/capabilities/data-property-text-style/example.animl +4 -0
- package/modules/data/capabilities/data-property-trigger/example.ani +51 -0
- package/modules/data/capabilities/data-property-trigger/example.animl +17 -0
- package/modules/data/capabilities/data-property-view-model/example.ani +55 -0
- package/modules/data/capabilities/data-property-view-model/example.animl +16 -0
- package/modules/data/capabilities/data-script-model-api/example.ani +16 -0
- package/modules/data/capabilities/data-script-model-api/example.animl +4 -0
- package/modules/data/capabilities/data-scripted-converter/example.ani +16 -0
- package/modules/data/capabilities/data-scripted-converter/example.animl +4 -0
- package/modules/data/capabilities/data-state-action-trigger/example.ani +51 -0
- package/modules/data/capabilities/data-state-action-trigger/example.animl +17 -0
- package/modules/data/capabilities/data-system-enum-horizontal-text-align/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-horizontal-text-align/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-alignment/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-alignment/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-direction/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-direction/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-display/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-display/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-flex-direction/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-flex-direction/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-position/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-position/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-position-units/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-position-units/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-scale-type/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-scale-type/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-layout-wrap/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-layout-wrap/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-scroll-direction/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-scroll-direction/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-semantic-check-state/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-semantic-check-state/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-text-box/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-text-box/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-text-overflow/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-text-overflow/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-text-trim-bottom/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-text-trim-bottom/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-text-trim-top/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-text-trim-top/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-vertical-text-align/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-vertical-text-align/example.animl +7 -0
- package/modules/data/capabilities/data-system-enum-word-wrap/example.ani +29 -0
- package/modules/data/capabilities/data-system-enum-word-wrap/example.animl +7 -0
- package/modules/data/capabilities/drawing-paint-gradient-channel-binding/example.ani +46 -0
- package/modules/data/capabilities/drawing-paint-gradient-channel-binding/example.animl +14 -0
- package/modules/data/capabilities/input-data-listener/example.ani +41 -0
- package/modules/data/capabilities/input-data-listener/example.animl +10 -0
- package/modules/data/capabilities/input-write-data-constant/example.ani +41 -0
- package/modules/data/capabilities/input-write-data-constant/example.animl +10 -0
- package/modules/data/capabilities/input-write-data-copy/example.ani +39 -0
- package/modules/data/capabilities/input-write-data-copy/example.animl +10 -0
- package/modules/data/capabilities/input-write-focused/example.ani +39 -0
- package/modules/data/capabilities/input-write-focused/example.animl +11 -0
- package/modules/data/capabilities/input-write-gamepad-axis/example.ani +38 -0
- package/modules/data/capabilities/input-write-gamepad-axis/example.animl +9 -0
- package/modules/data/capabilities/input-write-gamepad-button-pressed/example.ani +38 -0
- package/modules/data/capabilities/input-write-gamepad-button-pressed/example.animl +9 -0
- package/modules/data/capabilities/input-write-gamepad-button-value/example.ani +38 -0
- package/modules/data/capabilities/input-write-gamepad-button-value/example.animl +9 -0
- package/modules/data/capabilities/input-write-gamepad-changed-value/example.ani +38 -0
- package/modules/data/capabilities/input-write-gamepad-changed-value/example.animl +9 -0
- package/modules/data/examples/data-extras.ani +109 -0
- package/modules/data/examples/data-extras.animl +28 -0
- package/modules/data/examples/scoreboard.ani +74 -0
- package/modules/data/examples/scoreboard.animl +18 -0
- package/modules/data/manifest.source +111 -0
- package/modules/data-artboard/SPEC.md +94 -0
- package/modules/data-artboard/capabilities/components-host-artboard-reference/example.ani +16 -0
- package/modules/data-artboard/capabilities/components-host-artboard-reference/example.animl +26 -0
- package/modules/data-artboard/capabilities/data-host-artboard/example.ani +16 -0
- package/modules/data-artboard/capabilities/data-host-artboard/example.animl +18 -0
- package/modules/data-artboard/capabilities/host-api-bindable-artboards/example.ani +16 -0
- package/modules/data-artboard/capabilities/host-api-bindable-artboards/example.animl +34 -0
- package/modules/data-artboard/capabilities/host-api-data-artboard/example.ani +16 -0
- package/modules/data-artboard/capabilities/host-api-data-artboard/example.animl +18 -0
- package/modules/data-artboard/manifest.source +41 -0
- package/modules/data-host/SPEC.md +50 -0
- package/modules/data-host/examples/nested.ani +82 -0
- package/modules/data-host/examples/nested.animl +21 -0
- package/modules/data-host/manifest.source +26 -0
- package/modules/derive/SPEC.md +66 -0
- package/modules/derive/examples/scoreboard.ani +121 -0
- package/modules/derive/examples/scoreboard.animl +27 -0
- package/modules/derive/manifest.source +24 -0
- package/modules/devtools/SPEC.md +25 -0
- package/modules/devtools/capabilities/host-api-deprecation-policy/example.ani +16 -0
- package/modules/devtools/capabilities/host-api-deprecation-policy/example.animl +3 -0
- package/modules/devtools/capabilities/host-api-fps-counter/example.ani +16 -0
- package/modules/devtools/capabilities/host-api-fps-counter/example.animl +9 -0
- package/modules/devtools/capabilities/host-api-performance-marks/example.ani +16 -0
- package/modules/devtools/capabilities/host-api-performance-marks/example.animl +3 -0
- package/modules/devtools/capabilities/host-api-stop/example.ani +16 -0
- package/modules/devtools/capabilities/host-api-stop/example.animl +3 -0
- package/modules/devtools/manifest.source +13 -0
- package/modules/events/examples/events.ani +75 -0
- package/modules/events/examples/events.animl +23 -0
- package/modules/events/examples/share-evidence/README.md +48 -0
- package/modules/events/examples/share-evidence/clicks.jsonl +51 -0
- package/modules/events/examples/share-evidence/clicks.script +102 -0
- package/modules/events/examples/share-evidence/interrupt.jsonl +3 -0
- package/modules/events/examples/share-evidence/interrupt.script +7 -0
- package/modules/events/examples/share-evidence/perf.txt +4 -0
- package/modules/events/examples/share-evidence/pulse.jsonl +10 -0
- package/modules/events/examples/share-evidence/pulse.script +20 -0
- package/modules/events/examples/share-evidence/rest-diff.txt +1 -0
- package/modules/events/examples/share-evidence/size.txt +18 -0
- package/modules/events/examples/share-evidence/verify.py +48 -0
- package/modules/events/examples/share-tone.wav +0 -0
- package/modules/events/examples/share.ani +186 -0
- package/modules/events/examples/share.animl +40 -0
- package/modules/events/manifest.source +74 -0
- package/modules/focus/capabilities/input-focus-clear/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-clear/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-down/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-down/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-edge-closed-loop/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-edge-closed-loop/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-edge-parent-scope/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-edge-parent-scope/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-edge-stop/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-edge-stop/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-enabled/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-enabled/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-left/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-left/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-next/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-next/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-pointer/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-pointer/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-previous/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-previous/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-right/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-right/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-target/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-target/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-traverse/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-traverse/example.animl +28 -0
- package/modules/focus/capabilities/input-focus-up/example.ani +116 -0
- package/modules/focus/capabilities/input-focus-up/example.animl +28 -0
- package/modules/focus/capabilities/input-listen-blur/example.ani +116 -0
- package/modules/focus/capabilities/input-listen-blur/example.animl +28 -0
- package/modules/focus/capabilities/input-listen-focus/example.ani +116 -0
- package/modules/focus/capabilities/input-listen-focus/example.animl +28 -0
- package/modules/focus/examples/README.md +10 -0
- package/modules/focus/examples/traversal.ani +70 -0
- package/modules/focus/examples/traversal.animl +16 -0
- package/modules/focus/manifest.source +48 -0
- package/modules/fonts/SPEC.md +92 -0
- package/modules/fonts/capabilities/assets-font/example.ani +23 -0
- package/modules/fonts/capabilities/assets-font/example.animl +5 -0
- package/modules/fonts/capabilities/assets-host-decode-font/example.ani +23 -0
- package/modules/fonts/capabilities/assets-host-decode-font/example.animl +5 -0
- package/modules/fonts/capabilities/assets-replacement-scope-font/example.ani +23 -0
- package/modules/fonts/capabilities/assets-replacement-scope-font/example.animl +5 -0
- package/modules/fonts/capabilities/data-host-font/example.ani +23 -0
- package/modules/fonts/capabilities/data-host-font/example.animl +5 -0
- package/modules/fonts/capabilities/host-api-data-font/example.ani +23 -0
- package/modules/fonts/capabilities/host-api-data-font/example.animl +5 -0
- package/modules/fonts/capabilities/host-api-font-fallback/example.ani +23 -0
- package/modules/fonts/capabilities/host-api-font-fallback/example.animl +5 -0
- package/modules/fonts/capabilities/text-font-assets/example.ani +23 -0
- package/modules/fonts/capabilities/text-font-assets/example.animl +5 -0
- package/modules/fonts/capabilities/text-font-decoding/example.ani +43 -0
- package/modules/fonts/capabilities/text-font-decoding/example.animl +9 -0
- package/modules/fonts/capabilities/text-font-fallback/example.ani +23 -0
- package/modules/fonts/capabilities/text-font-fallback/example.animl +5 -0
- package/modules/fonts/capabilities/text-font-metrics/example.ani +40 -0
- package/modules/fonts/capabilities/text-font-metrics/example.animl +9 -0
- package/modules/fonts/capabilities/text-opentype-features/example.ani +23 -0
- package/modules/fonts/capabilities/text-opentype-features/example.animl +7 -0
- package/modules/fonts/capabilities/text-variable-axes/example.ani +23 -0
- package/modules/fonts/capabilities/text-variable-axes/example.animl +9 -0
- package/modules/fonts/manifest.source +57 -0
- package/modules/host/AUTHORING.md +33 -0
- package/modules/host/SPEC.md +76 -0
- package/modules/host/examples/page.html +23 -0
- package/modules/host/examples/score.ani +48 -0
- package/modules/host/examples/score.animl +10 -0
- package/modules/host/manifest.source +19 -0
- package/modules/host-edit/AUTHORING.md +66 -0
- package/modules/host-edit/SPEC.md +96 -0
- package/modules/host-edit/examples/board.ani +72 -0
- package/modules/host-edit/examples/board.animl +17 -0
- package/modules/host-edit/examples/page.html +34 -0
- package/modules/host-edit/manifest.source +21 -0
- package/modules/host-fit/capabilities/host-api-fit-layout/example.ani +55 -0
- package/modules/host-fit/capabilities/host-api-fit-layout/example.animl +11 -0
- package/modules/host-fit/examples/tile.ani +19 -0
- package/modules/host-fit/examples/tile.animl +3 -0
- package/modules/host-fit/manifest.source +22 -0
- package/modules/host-values/SPEC.md +9 -0
- package/modules/host-values/manifest.source +22 -0
- package/modules/ik/capabilities/rigging-ik/example.ani +16 -0
- package/modules/ik/capabilities/rigging-ik/example.animl +11 -0
- package/modules/ik/capabilities/rigging-ik-bend/example.ani +16 -0
- package/modules/ik/capabilities/rigging-ik-bend/example.animl +11 -0
- package/modules/ik/examples/reach.ani +100 -0
- package/modules/ik/examples/reach.animl +18 -0
- package/modules/ik/manifest.source +30 -0
- package/modules/input/SPEC.md +397 -0
- package/modules/input/capabilities/host-api-coordinate-mapping/example.ani +32 -0
- package/modules/input/capabilities/host-api-coordinate-mapping/example.animl +7 -0
- package/modules/input/capabilities/host-api-dom-listener-control/example.ani +32 -0
- package/modules/input/capabilities/host-api-dom-listener-control/example.animl +7 -0
- package/modules/input/capabilities/host-api-gamepad/example.ani +34 -0
- package/modules/input/capabilities/host-api-gamepad/example.animl +7 -0
- package/modules/input/capabilities/host-api-low-level-pointer/example.ani +32 -0
- package/modules/input/capabilities/host-api-low-level-pointer/example.animl +7 -0
- package/modules/input/capabilities/host-api-low-level-scroll/example.ani +32 -0
- package/modules/input/capabilities/host-api-low-level-scroll/example.animl +7 -0
- package/modules/input/capabilities/host-api-manual-gamepad-batch/example.ani +34 -0
- package/modules/input/capabilities/host-api-manual-gamepad-batch/example.animl +7 -0
- package/modules/input/capabilities/host-api-multitouch/example.ani +32 -0
- package/modules/input/capabilities/host-api-multitouch/example.animl +7 -0
- package/modules/input/capabilities/host-api-pointer-exit/example.ani +31 -0
- package/modules/input/capabilities/host-api-pointer-exit/example.animl +7 -0
- package/modules/input/capabilities/host-api-scroll-hit-policy/example.ani +32 -0
- package/modules/input/capabilities/host-api-scroll-hit-policy/example.animl +7 -0
- package/modules/input/capabilities/host-api-scroll-latching/example.ani +32 -0
- package/modules/input/capabilities/host-api-scroll-latching/example.animl +7 -0
- package/modules/input/capabilities/input-align-preserve/example.ani +43 -0
- package/modules/input/capabilities/input-align-preserve/example.animl +9 -0
- package/modules/input/capabilities/input-align-snap/example.ani +43 -0
- package/modules/input/capabilities/input-align-snap/example.animl +9 -0
- package/modules/input/capabilities/input-bounded-hit-tests/example.ani +32 -0
- package/modules/input/capabilities/input-bounded-hit-tests/example.animl +7 -0
- package/modules/input/capabilities/input-button-middle/example.ani +33 -0
- package/modules/input/capabilities/input-button-middle/example.animl +7 -0
- package/modules/input/capabilities/input-button-secondary/example.ani +33 -0
- package/modules/input/capabilities/input-button-secondary/example.animl +7 -0
- package/modules/input/capabilities/input-capture-phase/example.ani +60 -0
- package/modules/input/capabilities/input-capture-phase/example.animl +11 -0
- package/modules/input/capabilities/input-cursor-arrow/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-arrow/example.animl +7 -0
- package/modules/input/capabilities/input-cursor-hidden/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-hidden/example.animl +7 -0
- package/modules/input/capabilities/input-cursor-intent/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-intent/example.animl +7 -0
- package/modules/input/capabilities/input-cursor-pointer/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-pointer/example.animl +7 -0
- package/modules/input/capabilities/input-cursor-resize-horizontal/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-resize-horizontal/example.animl +7 -0
- package/modules/input/capabilities/input-cursor-resize-vertical/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-resize-vertical/example.animl +7 -0
- package/modules/input/capabilities/input-cursor-text/example.ani +33 -0
- package/modules/input/capabilities/input-cursor-text/example.animl +7 -0
- package/modules/input/capabilities/input-disable-listeners/example.ani +32 -0
- package/modules/input/capabilities/input-disable-listeners/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-axis/example.ani +34 -0
- package/modules/input/capabilities/input-gamepad-axis/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-button/example.ani +32 -0
- package/modules/input/capabilities/input-gamepad-button/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-button-phases/example.ani +33 -0
- package/modules/input/capabilities/input-gamepad-button-phases/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-connected/example.ani +31 -0
- package/modules/input/capabilities/input-gamepad-connected/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-disconnected/example.ani +31 -0
- package/modules/input/capabilities/input-gamepad-disconnected/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-host/example.ani +34 -0
- package/modules/input/capabilities/input-gamepad-host/example.animl +7 -0
- package/modules/input/capabilities/input-gamepad-index-mapping/example.ani +34 -0
- package/modules/input/capabilities/input-gamepad-index-mapping/example.animl +7 -0
- package/modules/input/capabilities/input-hit-occlusion-query/example.ani +42 -0
- package/modules/input/capabilities/input-hit-occlusion-query/example.animl +8 -0
- package/modules/input/capabilities/input-hit-parent-chain/example.ani +39 -0
- package/modules/input/capabilities/input-hit-parent-chain/example.animl +9 -0
- package/modules/input/capabilities/input-hit-shape-geometry/example.ani +32 -0
- package/modules/input/capabilities/input-hit-shape-geometry/example.animl +7 -0
- package/modules/input/capabilities/input-hit-test-host/example.ani +32 -0
- package/modules/input/capabilities/input-hit-test-host/example.animl +7 -0
- package/modules/input/capabilities/input-key-down/example.ani +32 -0
- package/modules/input/capabilities/input-key-down/example.animl +7 -0
- package/modules/input/capabilities/input-key-filter/example.ani +32 -0
- package/modules/input/capabilities/input-key-filter/example.animl +7 -0
- package/modules/input/capabilities/input-key-modifiers/example.ani +33 -0
- package/modules/input/capabilities/input-key-modifiers/example.animl +7 -0
- package/modules/input/capabilities/input-key-repeat/example.ani +32 -0
- package/modules/input/capabilities/input-key-repeat/example.animl +7 -0
- package/modules/input/capabilities/input-key-up/example.ani +32 -0
- package/modules/input/capabilities/input-key-up/example.animl +7 -0
- package/modules/input/capabilities/input-keyboard-bubbling/example.ani +45 -0
- package/modules/input/capabilities/input-keyboard-bubbling/example.animl +10 -0
- package/modules/input/capabilities/input-multi-touch/example.ani +32 -0
- package/modules/input/capabilities/input-multi-touch/example.animl +7 -0
- package/modules/input/capabilities/input-multi-trigger-listener/example.ani +32 -0
- package/modules/input/capabilities/input-multi-trigger-listener/example.animl +7 -0
- package/modules/input/capabilities/input-opaque-targets/example.ani +42 -0
- package/modules/input/capabilities/input-opaque-targets/example.animl +8 -0
- package/modules/input/capabilities/input-pointer-cancel/example.ani +31 -0
- package/modules/input/capabilities/input-pointer-cancel/example.animl +7 -0
- package/modules/input/capabilities/input-pointer-drag/example.ani +58 -0
- package/modules/input/capabilities/input-pointer-drag/example.animl +17 -0
- package/modules/input/capabilities/input-pointer-drag-end/example.ani +58 -0
- package/modules/input/capabilities/input-pointer-drag-end/example.animl +17 -0
- package/modules/input/capabilities/input-pointer-drag-start/example.ani +58 -0
- package/modules/input/capabilities/input-pointer-drag-start/example.animl +17 -0
- package/modules/input/capabilities/input-pointer-enable/example.ani +32 -0
- package/modules/input/capabilities/input-pointer-enable/example.animl +7 -0
- package/modules/input/capabilities/input-touch-page-scroll/example.ani +32 -0
- package/modules/input/capabilities/input-touch-page-scroll/example.animl +7 -0
- package/modules/input/capabilities/input-trackpad-scroll/example.ani +32 -0
- package/modules/input/capabilities/input-trackpad-scroll/example.animl +7 -0
- package/modules/input/capabilities/input-wheel-scroll/example.ani +32 -0
- package/modules/input/capabilities/input-wheel-scroll/example.animl +7 -0
- package/modules/input/capabilities/input-write-key-pressed/example.ani +39 -0
- package/modules/input/capabilities/input-write-key-pressed/example.animl +7 -0
- package/modules/input/capabilities/input-write-pointer-delta-x/example.ani +39 -0
- package/modules/input/capabilities/input-write-pointer-delta-x/example.animl +7 -0
- package/modules/input/capabilities/input-write-pointer-delta-y/example.ani +39 -0
- package/modules/input/capabilities/input-write-pointer-delta-y/example.animl +7 -0
- package/modules/input/capabilities/input-write-pointer-x/example.ani +39 -0
- package/modules/input/capabilities/input-write-pointer-x/example.animl +7 -0
- package/modules/input/capabilities/input-write-pointer-y/example.ani +39 -0
- package/modules/input/capabilities/input-write-pointer-y/example.animl +7 -0
- package/modules/input/capabilities/transforms-collapse/example.ani +39 -0
- package/modules/input/capabilities/transforms-collapse/example.animl +9 -0
- package/modules/input/capabilities/transforms-solo/example.ani +48 -0
- package/modules/input/capabilities/transforms-solo/example.animl +10 -0
- package/modules/input/core/commands.source +64 -0
- package/modules/input/core/types.source +97 -0
- package/modules/input/examples/README.md +9 -0
- package/modules/input/examples/drag-slider.ani +50 -0
- package/modules/input/examples/drag-slider.animl +11 -0
- package/modules/input/manifest.source +98 -0
- package/modules/layout/SPEC.md +210 -0
- package/modules/layout/capabilities/data-bind-layout/example.ani +60 -0
- package/modules/layout/capabilities/data-bind-layout/example.animl +10 -0
- package/modules/layout/capabilities/layout-alignment/example.ani +44 -0
- package/modules/layout/capabilities/layout-alignment/example.animl +6 -0
- package/modules/layout/capabilities/layout-animated-reflow/example.ani +62 -0
- package/modules/layout/capabilities/layout-animated-reflow/example.animl +12 -0
- package/modules/layout/capabilities/layout-containers/example.ani +62 -0
- package/modules/layout/capabilities/layout-containers/example.animl +9 -0
- package/modules/layout/capabilities/layout-fill-sizing/example.ani +45 -0
- package/modules/layout/capabilities/layout-fill-sizing/example.animl +6 -0
- package/modules/layout/capabilities/layout-fixed-sizing/example.ani +46 -0
- package/modules/layout/capabilities/layout-fixed-sizing/example.animl +6 -0
- package/modules/layout/capabilities/layout-flex-align-items/example.ani +43 -0
- package/modules/layout/capabilities/layout-flex-align-items/example.animl +6 -0
- package/modules/layout/capabilities/layout-flex-direction/example.ani +43 -0
- package/modules/layout/capabilities/layout-flex-direction/example.animl +6 -0
- package/modules/layout/capabilities/layout-flex-justify/example.ani +42 -0
- package/modules/layout/capabilities/layout-flex-justify/example.animl +6 -0
- package/modules/layout/capabilities/layout-hug-sizing/example.ani +42 -0
- package/modules/layout/capabilities/layout-hug-sizing/example.animl +6 -0
- package/modules/layout/capabilities/layout-intrinsic/example.ani +40 -0
- package/modules/layout/capabilities/layout-intrinsic/example.animl +6 -0
- package/modules/layout/capabilities/layout-paint/example.ani +60 -0
- package/modules/layout/capabilities/layout-paint/example.animl +8 -0
- package/modules/layout/capabilities/layout-participants/example.ani +40 -0
- package/modules/layout/capabilities/layout-participants/example.animl +6 -0
- package/modules/layout/capabilities/layout-self-alignment/example.ani +45 -0
- package/modules/layout/capabilities/layout-self-alignment/example.animl +6 -0
- package/modules/layout/capabilities/layout-size-bounds/example.ani +49 -0
- package/modules/layout/capabilities/layout-size-bounds/example.animl +6 -0
- package/modules/layout/capabilities/layout-spacing/example.ani +45 -0
- package/modules/layout/capabilities/layout-spacing/example.animl +6 -0
- package/modules/layout/capabilities/layout-visibility/example.ani +56 -0
- package/modules/layout/capabilities/layout-visibility/example.animl +7 -0
- package/modules/layout/examples/button.ani +61 -0
- package/modules/layout/examples/button.animl +12 -0
- package/modules/layout/examples/reflow.ani +62 -0
- package/modules/layout/examples/reflow.animl +12 -0
- package/modules/layout/examples/wrapped.ani +55 -0
- package/modules/layout/examples/wrapped.animl +11 -0
- package/modules/layout/manifest.source +73 -0
- package/modules/lists/SPEC.md +44 -0
- package/modules/lists/capabilities/components-explicit-context/example.ani +81 -0
- package/modules/lists/capabilities/components-explicit-context/example.animl +22 -0
- package/modules/lists/capabilities/components-inherited-context/example.ani +99 -0
- package/modules/lists/capabilities/components-inherited-context/example.animl +24 -0
- package/modules/lists/capabilities/components-list/example.ani +77 -0
- package/modules/lists/capabilities/components-list/example.animl +19 -0
- package/modules/lists/capabilities/components-list-map/example.ani +116 -0
- package/modules/lists/capabilities/components-list-map/example.animl +29 -0
- package/modules/lists/capabilities/components-list-size-override/example.ani +83 -0
- package/modules/lists/capabilities/components-list-size-override/example.animl +20 -0
- package/modules/lists/capabilities/data-binding-relative/example.ani +77 -0
- package/modules/lists/capabilities/data-binding-relative/example.animl +19 -0
- package/modules/lists/capabilities/data-converter-number-to-list/example.ani +109 -0
- package/modules/lists/capabilities/data-converter-number-to-list/example.animl +29 -0
- package/modules/lists/capabilities/data-property-symbol-list-index/example.ani +77 -0
- package/modules/lists/capabilities/data-property-symbol-list-index/example.animl +19 -0
- package/modules/lists/examples/players.ani +77 -0
- package/modules/lists/examples/players.animl +19 -0
- package/modules/lists/manifest.source +43 -0
- package/modules/machine/capabilities/state-machine-any-state/example.ani +62 -0
- package/modules/machine/capabilities/state-machine-any-state/example.animl +22 -0
- package/modules/machine/capabilities/state-machine-blend-1d-data/example.ani +74 -0
- package/modules/machine/capabilities/state-machine-blend-1d-data/example.animl +23 -0
- package/modules/machine/capabilities/state-machine-blend-1d-input/example.ani +70 -0
- package/modules/machine/capabilities/state-machine-blend-1d-input/example.animl +23 -0
- package/modules/machine/capabilities/state-machine-blend-additive/example.ani +69 -0
- package/modules/machine/capabilities/state-machine-blend-additive/example.animl +23 -0
- package/modules/machine/capabilities/state-machine-blend-direct/example.ani +64 -0
- package/modules/machine/capabilities/state-machine-blend-direct/example.animl +21 -0
- package/modules/machine/capabilities/state-machine-blend-exit-clock/example.ani +72 -0
- package/modules/machine/capabilities/state-machine-blend-exit-clock/example.animl +25 -0
- package/modules/machine/capabilities/state-machine-blend-weight-constant/example.ani +64 -0
- package/modules/machine/capabilities/state-machine-blend-weight-constant/example.animl +21 -0
- package/modules/machine/capabilities/state-machine-blend-weight-data/example.ani +71 -0
- package/modules/machine/capabilities/state-machine-blend-weight-data/example.animl +23 -0
- package/modules/machine/capabilities/state-machine-blend-weight-input/example.ani +69 -0
- package/modules/machine/capabilities/state-machine-blend-weight-input/example.animl +23 -0
- package/modules/machine/capabilities/state-machine-condition-artboard/example.ani +50 -0
- package/modules/machine/capabilities/state-machine-condition-artboard/example.animl +13 -0
- package/modules/machine/capabilities/state-machine-condition-component/example.ani +76 -0
- package/modules/machine/capabilities/state-machine-condition-component/example.animl +19 -0
- package/modules/machine/capabilities/state-machine-condition-data/example.ani +54 -0
- package/modules/machine/capabilities/state-machine-condition-data/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-condition-focus/example.ani +49 -0
- package/modules/machine/capabilities/state-machine-condition-focus/example.animl +13 -0
- package/modules/machine/capabilities/state-machine-continue-on-exit/example.ani +58 -0
- package/modules/machine/capabilities/state-machine-continue-on-exit/example.animl +21 -0
- package/modules/machine/capabilities/state-machine-entry-state/example.ani +56 -0
- package/modules/machine/capabilities/state-machine-entry-state/example.animl +19 -0
- package/modules/machine/capabilities/state-machine-exit-state/example.ani +46 -0
- package/modules/machine/capabilities/state-machine-exit-state/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-exit-time-relative/example.ani +52 -0
- package/modules/machine/capabilities/state-machine-exit-time-relative/example.animl +19 -0
- package/modules/machine/capabilities/state-machine-literal-asset/example.ani +62 -0
- package/modules/machine/capabilities/state-machine-literal-asset/example.animl +18 -0
- package/modules/machine/capabilities/state-machine-literal-boolean/example.ani +53 -0
- package/modules/machine/capabilities/state-machine-literal-boolean/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-literal-color/example.ani +54 -0
- package/modules/machine/capabilities/state-machine-literal-color/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-literal-enum/example.ani +54 -0
- package/modules/machine/capabilities/state-machine-literal-enum/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-literal-string/example.ani +54 -0
- package/modules/machine/capabilities/state-machine-literal-string/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-literal-trigger/example.ani +53 -0
- package/modules/machine/capabilities/state-machine-literal-trigger/example.animl +15 -0
- package/modules/machine/capabilities/state-machine-state-entry-actions/example.ani +56 -0
- package/modules/machine/capabilities/state-machine-state-entry-actions/example.animl +16 -0
- package/modules/machine/capabilities/state-machine-state-exit-actions/example.ani +56 -0
- package/modules/machine/capabilities/state-machine-state-exit-actions/example.animl +16 -0
- package/modules/machine/capabilities/state-machine-state-random/example.ani +53 -0
- package/modules/machine/capabilities/state-machine-state-random/example.animl +17 -0
- package/modules/machine/capabilities/state-machine-state-reset/example.ani +52 -0
- package/modules/machine/capabilities/state-machine-state-reset/example.animl +18 -0
- package/modules/machine/capabilities/state-machine-transition-actions/example.ani +56 -0
- package/modules/machine/capabilities/state-machine-transition-actions/example.animl +16 -0
- package/modules/machine/capabilities/state-machine-transition-disabled/example.ani +57 -0
- package/modules/machine/capabilities/state-machine-transition-disabled/example.animl +19 -0
- package/modules/machine/capabilities/state-machine-transition-duration-relative/example.ani +57 -0
- package/modules/machine/capabilities/state-machine-transition-duration-relative/example.animl +21 -0
- package/modules/machine/capabilities/state-machine-transition-end-actions/example.ani +56 -0
- package/modules/machine/capabilities/state-machine-transition-end-actions/example.animl +16 -0
- package/modules/machine/capabilities/state-machine-transition-random-weight/example.ani +53 -0
- package/modules/machine/capabilities/state-machine-transition-random-weight/example.animl +17 -0
- package/modules/machine/examples/README.md +12 -0
- package/modules/machine/examples/blend-pulse.ani +115 -0
- package/modules/machine/examples/blend-pulse.animl +32 -0
- package/modules/machine/manifest.source +73 -0
- package/modules/markup/manifest.source +26 -0
- package/modules/markup-animation/manifest.source +23 -0
- package/modules/markup-hooks/manifest.source +13 -0
- package/modules/markup-libraries/SPEC.md +56 -0
- package/modules/markup-libraries/capabilities/components-library-export/example.ani +45 -0
- package/modules/markup-libraries/capabilities/components-library-export/example.animl +4 -0
- package/modules/markup-libraries/capabilities/components-library-models/example.ani +45 -0
- package/modules/markup-libraries/capabilities/components-library-models/example.animl +4 -0
- package/modules/markup-libraries/capabilities/components-library-update/example.ani +45 -0
- package/modules/markup-libraries/capabilities/components-library-update/example.animl +4 -0
- package/modules/markup-libraries/manifest.source +38 -0
- package/modules/media/manifest.source +21 -0
- package/modules/mesh/capabilities/rigging-mesh/example.ani +50 -0
- package/modules/mesh/capabilities/rigging-mesh/example.animl +9 -0
- package/modules/mesh/capabilities/rigging-mesh-animation/example.ani +65 -0
- package/modules/mesh/capabilities/rigging-mesh-animation/example.animl +15 -0
- package/modules/mesh/examples/flag.ani +108 -0
- package/modules/mesh/examples/flag.animl +23 -0
- package/modules/mesh/manifest.source +37 -0
- package/modules/mix/capabilities/drawing-paint-additive-strength/example.ani +34 -0
- package/modules/mix/capabilities/drawing-paint-additive-strength/example.animl +4 -0
- package/modules/mix/capabilities/drawing-paint-blend-additive/example.ani +33 -0
- package/modules/mix/capabilities/drawing-paint-blend-additive/example.animl +4 -0
- package/modules/mix/capabilities/drawing-paint-paint-blend-override/example.ani +37 -0
- package/modules/mix/capabilities/drawing-paint-paint-blend-override/example.animl +4 -0
- package/modules/mix/capabilities/host-api-factory/example.ani +16 -0
- package/modules/mix/capabilities/host-api-factory/example.animl +3 -0
- package/modules/mix/capabilities/host-api-renderer/example.ani +16 -0
- package/modules/mix/capabilities/host-api-renderer/example.animl +3 -0
- package/modules/mix/manifest.source +36 -0
- package/modules/motion/capabilities/animation-cubic-value/example.ani +40 -0
- package/modules/motion/capabilities/animation-cubic-value/example.animl +9 -0
- package/modules/motion/capabilities/animation-elastic-in/example.ani +40 -0
- package/modules/motion/capabilities/animation-elastic-in/example.animl +9 -0
- package/modules/motion/capabilities/animation-elastic-in-out/example.ani +40 -0
- package/modules/motion/capabilities/animation-elastic-in-out/example.animl +9 -0
- package/modules/motion/capabilities/animation-host-loop-override/example.ani +28 -0
- package/modules/motion/capabilities/animation-host-loop-override/example.animl +6 -0
- package/modules/motion/capabilities/animation-host-play-pause-stop/example.ani +28 -0
- package/modules/motion/capabilities/animation-host-play-pause-stop/example.animl +6 -0
- package/modules/motion/capabilities/animation-keys-reference/example.ani +55 -0
- package/modules/motion/capabilities/animation-keys-reference/example.animl +12 -0
- package/modules/motion/capabilities/animation-keys-signed-integer/example.ani +46 -0
- package/modules/motion/capabilities/animation-keys-signed-integer/example.animl +11 -0
- package/modules/motion/capabilities/animation-keys-string/example.ani +46 -0
- package/modules/motion/capabilities/animation-keys-string/example.animl +11 -0
- package/modules/motion/capabilities/animation-keys-unsigned-integer/example.ani +46 -0
- package/modules/motion/capabilities/animation-keys-unsigned-integer/example.animl +11 -0
- package/modules/motion/capabilities/animation-mix-discrete/example.ani +38 -0
- package/modules/motion/capabilities/animation-mix-discrete/example.animl +9 -0
- package/modules/motion/capabilities/animation-mix-numeric/example.ani +42 -0
- package/modules/motion/capabilities/animation-mix-numeric/example.animl +11 -0
- package/modules/motion/capabilities/animation-quantized-playback/example.ani +41 -0
- package/modules/motion/capabilities/animation-quantized-playback/example.animl +9 -0
- package/modules/motion/capabilities/animation-reverse/example.ani +47 -0
- package/modules/motion/capabilities/animation-reverse/example.animl +12 -0
- package/modules/motion/capabilities/animation-seek/example.ani +28 -0
- package/modules/motion/capabilities/animation-seek/example.animl +6 -0
- package/modules/motion/capabilities/animation-work-area/example.ani +42 -0
- package/modules/motion/capabilities/animation-work-area/example.animl +9 -0
- package/modules/motion/capabilities/data-bind-keyframes/example.ani +52 -0
- package/modules/motion/capabilities/data-bind-keyframes/example.animl +15 -0
- package/modules/motion/capabilities/host-api-animation-metadata/example.ani +31 -0
- package/modules/motion/capabilities/host-api-animation-metadata/example.animl +6 -0
- package/modules/motion/capabilities/host-api-low-level-animation/example.ani +28 -0
- package/modules/motion/capabilities/host-api-low-level-animation/example.animl +6 -0
- package/modules/motion/capabilities/host-api-low-level-scene-query/example.ani +41 -0
- package/modules/motion/capabilities/host-api-low-level-scene-query/example.animl +9 -0
- package/modules/motion/capabilities/host-api-multi-state-machine/example.ani +62 -0
- package/modules/motion/capabilities/host-api-multi-state-machine/example.animl +22 -0
- package/modules/motion/capabilities/host-api-scrub/example.ani +29 -0
- package/modules/motion/capabilities/host-api-scrub/example.animl +6 -0
- package/modules/motion/capabilities/state-machine-exit-time-seconds/example.ani +60 -0
- package/modules/motion/capabilities/state-machine-exit-time-seconds/example.animl +15 -0
- package/modules/motion/capabilities/transforms-origin-animation/example.ani +45 -0
- package/modules/motion/capabilities/transforms-origin-animation/example.animl +10 -0
- package/modules/motion/examples/README.md +42 -0
- package/modules/motion/examples/data-keys.ani +52 -0
- package/modules/motion/examples/data-keys.animl +15 -0
- package/modules/motion/examples/evidence/hover.jsonl +8 -0
- package/modules/motion/examples/evidence/phase.jsonl +9 -0
- package/modules/motion/examples/evidence/reduced.jsonl +6 -0
- package/modules/motion/examples/evidence/rest.jsonl +1 -0
- package/modules/motion/examples/evidence/spin.jsonl +6 -0
- package/modules/motion/examples/evidence/stop.jsonl +10 -0
- package/modules/motion/examples/evidence/sweep.jsonl +26 -0
- package/modules/motion/examples/scripts/hover.txt +21 -0
- package/modules/motion/examples/scripts/phase.txt +28 -0
- package/modules/motion/examples/scripts/reduced.txt +16 -0
- package/modules/motion/examples/scripts/rest.txt +2 -0
- package/modules/motion/examples/scripts/spin.txt +14 -0
- package/modules/motion/examples/scripts/stop.txt +26 -0
- package/modules/motion/examples/scripts/sweep.txt +71 -0
- package/modules/motion/examples/sync.ani +272 -0
- package/modules/motion/examples/sync.animl +64 -0
- package/modules/motion/examples/verify.py +71 -0
- package/modules/motion/manifest.source +67 -0
- package/modules/nested/SPEC.md +79 -0
- package/modules/nested/capabilities/components-leaf-fit/example.ani +50 -0
- package/modules/nested/capabilities/components-leaf-fit/example.animl +9 -0
- package/modules/nested/capabilities/components-nested-quantize/example.ani +65 -0
- package/modules/nested/capabilities/components-nested-quantize/example.animl +15 -0
- package/modules/nested/capabilities/components-nested-remap/example.ani +65 -0
- package/modules/nested/capabilities/components-nested-remap/example.animl +15 -0
- package/modules/nested/capabilities/components-stateful-output/example.ani +51 -0
- package/modules/nested/capabilities/components-stateful-output/example.animl +12 -0
- package/modules/nested/capabilities/data-property-artboard/example.ani +63 -0
- package/modules/nested/capabilities/data-property-artboard/example.animl +14 -0
- package/modules/nested/capabilities/state-machine-literal-artboard/example.ani +76 -0
- package/modules/nested/capabilities/state-machine-literal-artboard/example.animl +19 -0
- package/modules/nested/examples/component-guard.ani +76 -0
- package/modules/nested/examples/component-guard.animl +19 -0
- package/modules/nested/examples/controls.ani +100 -0
- package/modules/nested/examples/controls.animl +21 -0
- package/modules/nested/manifest.source +39 -0
- package/modules/paint/capabilities/drawing-paint-gradient-angular/example.ani +33 -0
- package/modules/paint/capabilities/drawing-paint-gradient-angular/example.animl +8 -0
- package/modules/paint/capabilities/drawing-paint-gradient-transform/example.ani +34 -0
- package/modules/paint/capabilities/drawing-paint-gradient-transform/example.animl +8 -0
- package/modules/paint/capabilities/drawing-paint-image-fit-resize/example.ani +49 -0
- package/modules/paint/capabilities/drawing-paint-image-fit-resize/example.animl +12 -0
- package/modules/paint/capabilities/drawing-paint-image-wrap-clamp/example.ani +50 -0
- package/modules/paint/capabilities/drawing-paint-image-wrap-clamp/example.animl +12 -0
- package/modules/paint/capabilities/drawing-paint-image-wrap-mirror/example.ani +50 -0
- package/modules/paint/capabilities/drawing-paint-image-wrap-mirror/example.animl +12 -0
- package/modules/paint/capabilities/drawing-paint-image-wrap-repeat/example.ani +50 -0
- package/modules/paint/capabilities/drawing-paint-image-wrap-repeat/example.animl +12 -0
- package/modules/paint/manifest.source +77 -0
- package/modules/pathfollow/capabilities/rigging-follow-path/example.ani +16 -0
- package/modules/pathfollow/capabilities/rigging-follow-path/example.animl +7 -0
- package/modules/pathfollow/capabilities/rigging-list-follow-path/example.ani +16 -0
- package/modules/pathfollow/capabilities/rigging-list-follow-path/example.animl +9 -0
- package/modules/pathfollow/examples/orbit.ani +130 -0
- package/modules/pathfollow/examples/orbit.animl +17 -0
- package/modules/pathfollow/manifest.source +35 -0
- package/modules/posepad/examples/look.ani +124 -0
- package/modules/posepad/examples/look.animl +22 -0
- package/modules/posepad/manifest.source +43 -0
- package/modules/rig/AUTHORING.md +24 -0
- package/modules/rig/capabilities/rigging-bone-chains/example.ani +61 -0
- package/modules/rig/capabilities/rigging-bone-chains/example.animl +22 -0
- package/modules/rig/capabilities/rigging-constraint-order/example.ani +123 -0
- package/modules/rig/capabilities/rigging-constraint-order/example.animl +33 -0
- package/modules/rig/capabilities/rigging-constraint-strength/example.ani +105 -0
- package/modules/rig/capabilities/rigging-constraint-strength/example.animl +28 -0
- package/modules/rig/capabilities/rigging-distance-closer/example.ani +160 -0
- package/modules/rig/capabilities/rigging-distance-closer/example.animl +44 -0
- package/modules/rig/capabilities/rigging-distance-exact/example.ani +160 -0
- package/modules/rig/capabilities/rigging-distance-exact/example.animl +44 -0
- package/modules/rig/capabilities/rigging-distance-further/example.ani +160 -0
- package/modules/rig/capabilities/rigging-distance-further/example.animl +44 -0
- package/modules/rig/capabilities/rigging-root-bones/example.ani +63 -0
- package/modules/rig/capabilities/rigging-root-bones/example.animl +22 -0
- package/modules/rig/capabilities/rigging-rotation/example.ani +143 -0
- package/modules/rig/capabilities/rigging-rotation/example.animl +32 -0
- package/modules/rig/capabilities/rigging-scale/example.ani +144 -0
- package/modules/rig/capabilities/rigging-scale/example.animl +32 -0
- package/modules/rig/capabilities/rigging-transform/example.ani +132 -0
- package/modules/rig/capabilities/rigging-transform/example.animl +30 -0
- package/modules/rig/capabilities/rigging-translation/example.ani +248 -0
- package/modules/rig/capabilities/rigging-translation/example.animl +54 -0
- package/modules/rig/examples/arm.ani +120 -0
- package/modules/rig/examples/arm.animl +29 -0
- package/modules/rig/manifest.source +55 -0
- package/modules/scroll/capabilities/rigging-scroll/example.ani +16 -0
- package/modules/scroll/capabilities/rigging-scroll/example.animl +11 -0
- package/modules/scroll/examples/list.ani +115 -0
- package/modules/scroll/examples/list.animl +15 -0
- package/modules/scroll/manifest.source +31 -0
- package/modules/skin/capabilities/rigging-cubic-weights/example.ani +66 -0
- package/modules/skin/capabilities/rigging-cubic-weights/example.animl +17 -0
- package/modules/skin/capabilities/rigging-skin/example.ani +165 -0
- package/modules/skin/capabilities/rigging-skin/example.animl +33 -0
- package/modules/skin/capabilities/rigging-weights/example.ani +147 -0
- package/modules/skin/capabilities/rigging-weights/example.animl +37 -0
- package/modules/skin/examples/sleeve.ani +91 -0
- package/modules/skin/examples/sleeve.animl +14 -0
- package/modules/skin/manifest.source +41 -0
- package/modules/surface/manifest.source +52 -0
- package/modules/text/SPEC.md +269 -0
- package/modules/text/capabilities/data-bind-text/example.ani +63 -0
- package/modules/text/capabilities/data-bind-text/example.animl +8 -0
- package/modules/text/capabilities/data-property-text-style/example.ani +63 -0
- package/modules/text/capabilities/data-property-text-style/example.animl +8 -0
- package/modules/text/capabilities/host-api-nested-text-run/example.ani +44 -0
- package/modules/text/capabilities/host-api-nested-text-run/example.animl +10 -0
- package/modules/text/capabilities/host-api-text-run/example.ani +27 -0
- package/modules/text/capabilities/host-api-text-run/example.animl +6 -0
- package/modules/text/capabilities/text-fit-baseline/example.ani +30 -0
- package/modules/text/capabilities/text-fit-baseline/example.animl +6 -0
- package/modules/text/capabilities/text-fit-layout-measure/example.ani +30 -0
- package/modules/text/capabilities/text-fit-layout-measure/example.animl +6 -0
- package/modules/text/capabilities/text-flatten/example.ani +16 -0
- package/modules/text/capabilities/text-flatten/example.animl +6 -0
- package/modules/text/capabilities/text-font-size/example.ani +59 -0
- package/modules/text/capabilities/text-font-size/example.animl +15 -0
- package/modules/text/capabilities/text-horizontal-alignment/example.ani +28 -0
- package/modules/text/capabilities/text-horizontal-alignment/example.animl +6 -0
- package/modules/text/capabilities/text-line-spacing/example.ani +28 -0
- package/modules/text/capabilities/text-line-spacing/example.animl +6 -0
- package/modules/text/capabilities/text-origin/example.ani +32 -0
- package/modules/text/capabilities/text-origin/example.animl +6 -0
- package/modules/text/capabilities/text-overflow-clipped/example.ani +29 -0
- package/modules/text/capabilities/text-overflow-clipped/example.animl +6 -0
- package/modules/text/capabilities/text-overflow-ellipsis/example.ani +29 -0
- package/modules/text/capabilities/text-overflow-ellipsis/example.animl +6 -0
- package/modules/text/capabilities/text-overflow-fit/example.ani +29 -0
- package/modules/text/capabilities/text-overflow-fit/example.animl +6 -0
- package/modules/text/capabilities/text-overflow-fit-font-size/example.ani +29 -0
- package/modules/text/capabilities/text-overflow-fit-font-size/example.animl +6 -0
- package/modules/text/capabilities/text-overflow-hidden/example.ani +29 -0
- package/modules/text/capabilities/text-overflow-hidden/example.animl +7 -0
- package/modules/text/capabilities/text-overflow-visible/example.ani +29 -0
- package/modules/text/capabilities/text-overflow-visible/example.animl +6 -0
- package/modules/text/capabilities/text-paint/example.ani +30 -0
- package/modules/text/capabilities/text-paint/example.animl +6 -0
- package/modules/text/capabilities/text-paragraph-spacing/example.ani +28 -0
- package/modules/text/capabilities/text-paragraph-spacing/example.animl +7 -0
- package/modules/text/capabilities/text-rich-runs/example.ani +34 -0
- package/modules/text/capabilities/text-rich-runs/example.animl +8 -0
- package/modules/text/capabilities/text-run-list/example.ani +59 -0
- package/modules/text/capabilities/text-run-list/example.animl +7 -0
- package/modules/text/capabilities/text-script-hit-testing/example.ani +47 -0
- package/modules/text/capabilities/text-script-hit-testing/example.animl +10 -0
- package/modules/text/capabilities/text-sizing-auto-height/example.ani +28 -0
- package/modules/text/capabilities/text-sizing-auto-height/example.animl +6 -0
- package/modules/text/capabilities/text-sizing-auto-width/example.ani +27 -0
- package/modules/text/capabilities/text-sizing-auto-width/example.animl +6 -0
- package/modules/text/capabilities/text-sizing-fixed/example.ani +26 -0
- package/modules/text/capabilities/text-sizing-fixed/example.animl +6 -0
- package/modules/text/capabilities/text-style-reference/example.ani +31 -0
- package/modules/text/capabilities/text-style-reference/example.animl +7 -0
- package/modules/text/capabilities/text-tracking/example.ani +28 -0
- package/modules/text/capabilities/text-tracking/example.animl +6 -0
- package/modules/text/capabilities/text-vertical-alignment/example.ani +28 -0
- package/modules/text/capabilities/text-vertical-alignment/example.animl +6 -0
- package/modules/text/capabilities/text-vertical-trim/example.ani +29 -0
- package/modules/text/capabilities/text-vertical-trim/example.animl +6 -0
- package/modules/text/capabilities/text-word-break/example.ani +28 -0
- package/modules/text/capabilities/text-word-break/example.animl +6 -0
- package/modules/text/capabilities/text-wrap/example.ani +28 -0
- package/modules/text/capabilities/text-wrap/example.animl +6 -0
- package/modules/text/manifest.source +92 -0
- package/modules/text-effects/SPEC.md +134 -0
- package/modules/text-effects/capabilities/text-background/example.ani +32 -0
- package/modules/text-effects/capabilities/text-background/example.animl +7 -0
- package/modules/text-effects/capabilities/text-modifier-follow-path/example.ani +34 -0
- package/modules/text-effects/capabilities/text-modifier-follow-path/example.animl +8 -0
- package/modules/text-effects/capabilities/text-modifier-opacity/example.ani +34 -0
- package/modules/text-effects/capabilities/text-modifier-opacity/example.animl +8 -0
- package/modules/text-effects/capabilities/text-modifier-origin/example.ani +36 -0
- package/modules/text-effects/capabilities/text-modifier-origin/example.animl +8 -0
- package/modules/text-effects/capabilities/text-modifier-rotation/example.ani +34 -0
- package/modules/text-effects/capabilities/text-modifier-rotation/example.animl +8 -0
- package/modules/text-effects/capabilities/text-modifier-scale/example.ani +35 -0
- package/modules/text-effects/capabilities/text-modifier-scale/example.animl +8 -0
- package/modules/text-effects/capabilities/text-modifier-translation/example.ani +35 -0
- package/modules/text-effects/capabilities/text-modifier-translation/example.animl +8 -0
- package/modules/text-effects/capabilities/text-modifier-variation/example.ani +36 -0
- package/modules/text-effects/capabilities/text-modifier-variation/example.animl +8 -0
- package/modules/text-effects/capabilities/text-range-combine/example.ani +47 -0
- package/modules/text-effects/capabilities/text-range-combine/example.animl +11 -0
- package/modules/text-effects/capabilities/text-range-easing/example.ani +38 -0
- package/modules/text-effects/capabilities/text-range-easing/example.animl +8 -0
- package/modules/text-effects/capabilities/text-range-falloff/example.ani +37 -0
- package/modules/text-effects/capabilities/text-range-falloff/example.animl +8 -0
- package/modules/text-effects/capabilities/text-range-run/example.ani +37 -0
- package/modules/text-effects/capabilities/text-range-run/example.animl +8 -0
- package/modules/text-effects/capabilities/text-range-units/example.ani +37 -0
- package/modules/text-effects/capabilities/text-range-units/example.animl +8 -0
- package/modules/text-effects/capabilities/text-script-direction/example.ani +30 -0
- package/modules/text-effects/capabilities/text-script-direction/example.animl +7 -0
- package/modules/text-effects/examples/title-wave.ani +68 -0
- package/modules/text-effects/examples/title-wave.animl +15 -0
- package/modules/text-effects/manifest.source +58 -0
- package/modules/text-input/SPEC.md +189 -0
- package/modules/text-input/capabilities/text-input-placeholder/example.ani +16 -0
- package/modules/text-input/capabilities/text-input-placeholder/example.animl +13 -0
- package/modules/text-input/capabilities/text-input-selection/example.ani +66 -0
- package/modules/text-input/capabilities/text-input-selection/example.animl +13 -0
- package/modules/text-input/examples/search-card.ani +195 -0
- package/modules/text-input/examples/search-card.animl +49 -0
- package/modules/text-input/examples/search.txt +6 -0
- package/modules/text-input/manifest.source +79 -0
- package/modules/tooling/capabilities/tooling-benchmark/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-benchmark/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-data-breakpoints/example.ani +75 -0
- package/modules/tooling/capabilities/tooling-data-breakpoints/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-data-debugger/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-data-debugger/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-command-session/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-command-session/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-data/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-data/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-data-dump/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-data-dump/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-data-filter/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-data-filter/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-data-stream/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-data-stream/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-gamepad/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-gamepad/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-key/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-key/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-pointer/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-pointer/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-touch/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-touch/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-headless-wheel/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-headless-wheel/example.animl +13 -0
- package/modules/tooling/capabilities/tooling-seed/example.ani +76 -0
- package/modules/tooling/capabilities/tooling-seed/example.animl +21 -0
- package/modules/tooling/capabilities/tooling-test-assertions/example.ani +16 -0
- package/modules/tooling/capabilities/tooling-test-assertions/example.animl +13 -0
- package/modules/tooling/examples/agent-tools.ani +75 -0
- package/modules/tooling/examples/agent-tools.animl +13 -0
- package/modules/tooling/manifest.source +15 -0
- package/package.json +57 -4
- package/packages/cli/package.json +4 -0
- package/packages/cli/src/asset-info.d.ts +8 -0
- package/packages/cli/src/asset-info.js +122 -0
- package/packages/cli/src/assets.d.ts +8 -0
- package/packages/cli/src/assets.js +66 -0
- package/packages/cli/src/audio.d.ts +3 -0
- package/packages/cli/src/audio.js +77 -0
- package/packages/cli/src/bench.d.ts +32 -0
- package/packages/cli/src/bench.js +46 -0
- package/packages/cli/src/build-assets.d.ts +10 -0
- package/packages/cli/src/build-assets.js +139 -0
- package/packages/cli/src/bundle.d.ts +7 -0
- package/packages/cli/src/bundle.js +53 -0
- package/packages/cli/src/cli.d.ts +19 -0
- package/packages/cli/src/cli.js +1532 -0
- package/packages/cli/src/commands.d.ts +47 -0
- package/packages/cli/src/commands.js +608 -0
- package/packages/cli/src/compare-png.d.ts +21 -0
- package/packages/cli/src/compare-png.js +39 -0
- package/packages/cli/src/compare.d.ts +7 -0
- package/packages/cli/src/compare.js +84 -0
- package/packages/cli/src/completion.d.ts +2 -0
- package/packages/cli/src/completion.js +153 -0
- package/packages/cli/src/discover/api.d.ts +55 -0
- package/packages/cli/src/discover/api.js +185 -0
- package/packages/cli/src/discover/build.d.ts +14 -0
- package/packages/cli/src/discover/build.js +590 -0
- package/packages/cli/src/discover/synonyms.d.ts +1 -0
- package/packages/cli/src/discover/synonyms.js +68 -0
- package/packages/cli/src/docs-view.d.ts +4 -0
- package/packages/cli/src/docs-view.js +279 -0
- package/packages/cli/src/doctor.d.ts +11 -0
- package/packages/cli/src/doctor.js +151 -0
- package/packages/cli/src/encode.d.ts +9 -0
- package/packages/cli/src/encode.js +100 -0
- package/packages/cli/src/font/README.md +45 -0
- package/packages/cli/src/font/binary.d.ts +8 -0
- package/packages/cli/src/font/binary.js +54 -0
- package/packages/cli/src/font/browser.d.ts +4 -0
- package/packages/cli/src/font/browser.js +54 -0
- package/packages/cli/src/font/cff.d.ts +6 -0
- package/packages/cli/src/font/cff.js +154 -0
- package/packages/cli/src/font/container.d.ts +5 -0
- package/packages/cli/src/font/container.js +97 -0
- package/packages/cli/src/font/document.d.ts +28 -0
- package/packages/cli/src/font/document.js +143 -0
- package/packages/cli/src/font/features.d.ts +1 -0
- package/packages/cli/src/font/features.js +1 -0
- package/packages/cli/src/font/flatten.d.ts +5 -0
- package/packages/cli/src/font/flatten.js +146 -0
- package/packages/cli/src/font/import.d.ts +12 -0
- package/packages/cli/src/font/import.js +92 -0
- package/packages/cli/src/font/index.d.ts +8 -0
- package/packages/cli/src/font/index.js +27 -0
- package/packages/cli/src/font/measure.d.ts +37 -0
- package/packages/cli/src/font/measure.js +131 -0
- package/packages/cli/src/font/reader.d.ts +13 -0
- package/packages/cli/src/font/reader.js +26 -0
- package/packages/cli/src/font/subset.d.ts +6 -0
- package/packages/cli/src/font/subset.js +87 -0
- package/packages/cli/src/font/svg.d.ts +3 -0
- package/packages/cli/src/font/svg.js +109 -0
- package/packages/cli/src/font/truetype.d.ts +3 -0
- package/packages/cli/src/font/truetype.js +38 -0
- package/packages/cli/src/font/variation.d.ts +1 -0
- package/packages/cli/src/font/variation.js +1 -0
- package/packages/cli/src/font/woff2.d.ts +3 -0
- package/packages/cli/src/font/woff2.js +166 -0
- package/packages/cli/src/glyphs.d.ts +5 -0
- package/packages/cli/src/glyphs.js +59 -0
- package/packages/cli/src/help.d.ts +5 -0
- package/packages/cli/src/help.js +149 -0
- package/packages/cli/src/html.d.ts +5 -0
- package/packages/cli/src/html.js +119 -0
- package/packages/cli/src/import-lottie.d.ts +2 -0
- package/packages/cli/src/import-lottie.js +274 -0
- package/packages/cli/src/import-svg.d.ts +8 -0
- package/packages/cli/src/import-svg.js +300 -0
- package/packages/cli/src/index.d.ts +1 -0
- package/packages/cli/src/index.js +4 -0
- package/packages/cli/src/inspect-summary.d.ts +7 -0
- package/packages/cli/src/inspect-summary.js +158 -0
- package/packages/cli/src/library.d.ts +6 -0
- package/packages/cli/src/library.js +67 -0
- package/packages/cli/src/locate.d.ts +13 -0
- package/packages/cli/src/locate.js +118 -0
- package/packages/cli/src/main.d.ts +2 -0
- package/packages/cli/src/main.js +13 -0
- package/packages/cli/src/playground.d.ts +11 -0
- package/packages/cli/src/playground.js +169 -0
- package/packages/cli/src/project.d.ts +15 -0
- package/packages/cli/src/project.js +160 -0
- package/packages/cli/src/render-options.d.ts +6 -0
- package/packages/cli/src/render-options.js +40 -0
- package/packages/cli/src/render.d.ts +30 -0
- package/packages/cli/src/render.js +90 -0
- package/packages/cli/src/scaffold.d.ts +17 -0
- package/packages/cli/src/scaffold.js +96 -0
- package/packages/cli/src/schema-view.d.ts +9 -0
- package/packages/cli/src/schema-view.js +493 -0
- package/packages/cli/src/session.d.ts +8 -0
- package/packages/cli/src/session.js +96 -0
- package/packages/cli/src/suggest.d.ts +3 -0
- package/packages/cli/src/suggest.js +62 -0
- package/packages/cli/src/video.d.ts +2 -0
- package/packages/cli/src/video.js +73 -0
- package/packages/core/src/script.source +897 -0
- package/spec/ANIML.md +598 -0
- package/spec/MODULES.md +406 -0
- package/spec/SPEC.md +4083 -0
|
@@ -0,0 +1,897 @@
|
|
|
1
|
+
// seam(P8-5): preserve mesh point tuples alongside existing scalar/colour values.
|
|
2
|
+
import { installRandom } from './random.ts';
|
|
3
|
+
import { captureStep } from './script-events.ts';
|
|
4
|
+
import { occurrence, eventSource, type CapturedEvent } from './event-capture.ts';
|
|
5
|
+
import { traceWrites } from './script-writes.ts';
|
|
6
|
+
import { formatHex } from './color.ts';
|
|
7
|
+
// The command language of `anima sample` and the conformance suite (spec §11.2). Tooling only.
|
|
8
|
+
|
|
9
|
+
import { COMMON, OWN, PAINT, markupName } from './registry.ts';
|
|
10
|
+
import { semanticCommand } from '../../../modules/a11y/core/commands.ts';
|
|
11
|
+
import { inputCommand } from '../../../modules/input/core/commands.ts';
|
|
12
|
+
import type { TimelineInstance } from '../../../modules/motion/core/api.ts';
|
|
13
|
+
import { modules } from './modules.ts';
|
|
14
|
+
import { resolveAddress, type Model } from './load.ts';
|
|
15
|
+
import { type AnimaEvent, Player } from './player.ts';
|
|
16
|
+
|
|
17
|
+
export interface Snapshot {
|
|
18
|
+
time: number;
|
|
19
|
+
values: Record<string, number | boolean | string | [number, number]>;
|
|
20
|
+
states: Record<string, string>;
|
|
21
|
+
events: AnimaEvent[];
|
|
22
|
+
settled: boolean;
|
|
23
|
+
data?: Record<string, unknown>;
|
|
24
|
+
semantics?: unknown;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class ScriptError extends Error {
|
|
28
|
+
readonly code: string;
|
|
29
|
+
readonly pointer: string;
|
|
30
|
+
readonly hint: string;
|
|
31
|
+
readonly line: number;
|
|
32
|
+
constructor(message: string, line: number, code = 'script-usage') {
|
|
33
|
+
super(`line ${line}: ${message}`);
|
|
34
|
+
this.code = code;
|
|
35
|
+
this.hint =
|
|
36
|
+
code === 'script-target'
|
|
37
|
+
? 'inspect declared inputs or run semantics before targeting a node; hidden nodes cannot receive semantic actions'
|
|
38
|
+
: 'check the command syntax in spec §11.2';
|
|
39
|
+
this.line = line;
|
|
40
|
+
this.pointer = `/script/${line - 1}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ScriptOptions {
|
|
45
|
+
reducedMotion?: boolean;
|
|
46
|
+
all?: boolean;
|
|
47
|
+
semantics?: boolean;
|
|
48
|
+
seed?: number;
|
|
49
|
+
/** Tooling events with absolute occurrence times and their declaring asset scope. */
|
|
50
|
+
onEvents?: (events: CapturedEvent[]) => void;
|
|
51
|
+
}
|
|
52
|
+
export interface ScriptDiagnostic {
|
|
53
|
+
code: string;
|
|
54
|
+
pointer: string;
|
|
55
|
+
message: string;
|
|
56
|
+
hint: string;
|
|
57
|
+
writer?: string[];
|
|
58
|
+
}
|
|
59
|
+
type Operation = (p: Player, instances: Map<string, TimelineInstance>) => void;
|
|
60
|
+
class Breakpoint extends Error {}
|
|
61
|
+
|
|
62
|
+
/** Persistent, tooling-only script interpreter. No browser runtime hooks are installed. */
|
|
63
|
+
export function createScriptSession(model: Model, opts: ScriptOptions = {}) {
|
|
64
|
+
installRandom(Player);
|
|
65
|
+
const p = new Player(model, opts);
|
|
66
|
+
const out: Snapshot[] = [];
|
|
67
|
+
const output: unknown[] = [];
|
|
68
|
+
const diagnostics: ScriptDiagnostic[] = [];
|
|
69
|
+
const instances = new Map<string, TimelineInstance>();
|
|
70
|
+
const journal: { op: Operation; writer: string }[] = [];
|
|
71
|
+
const watched = new Map<string, string | undefined>();
|
|
72
|
+
const changedData = new Set<string>();
|
|
73
|
+
const breaks = new Map<string, { value?: unknown }>();
|
|
74
|
+
let events: AnimaEvent[] = [];
|
|
75
|
+
let settled = false;
|
|
76
|
+
let stopped = false;
|
|
77
|
+
let line = 0;
|
|
78
|
+
let writer = 'script';
|
|
79
|
+
let lastWriter = writer;
|
|
80
|
+
let seed = opts.seed;
|
|
81
|
+
let replaying = false;
|
|
82
|
+
// A running semantic command: its live mutations are replayed on breakpoint probes and journaled
|
|
83
|
+
// as one operation (steps counts the session steps it has completed).
|
|
84
|
+
let semantic: { cmd: string; args: string[]; steps: number } | undefined;
|
|
85
|
+
const stop = {};
|
|
86
|
+
const replaySemantic = (player: Player, cmd: string, args: string[], limit: number) => {
|
|
87
|
+
let n = 0;
|
|
88
|
+
try {
|
|
89
|
+
semanticCommand(
|
|
90
|
+
player,
|
|
91
|
+
cmd,
|
|
92
|
+
args,
|
|
93
|
+
[],
|
|
94
|
+
(dt) => {
|
|
95
|
+
if (n++ >= limit) throw stop;
|
|
96
|
+
player.step(dt);
|
|
97
|
+
},
|
|
98
|
+
() => ({}) as Snapshot,
|
|
99
|
+
);
|
|
100
|
+
} catch {
|
|
101
|
+
// The stop sentinel, or the same failure the live command reported at this boundary.
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const groups: string[] = [];
|
|
105
|
+
let expectedError: string | undefined;
|
|
106
|
+
const targetError = (message: string) => {
|
|
107
|
+
throw new ScriptError(message, line, 'script-target');
|
|
108
|
+
};
|
|
109
|
+
const requireInput = (name: string) => {
|
|
110
|
+
// get resolves component-scoped inputs as well as root inputs.
|
|
111
|
+
if (!model.inputs.has(name) && p.get(name) === undefined)
|
|
112
|
+
targetError('no input "' + name + '"; inspect inputs before targeting them');
|
|
113
|
+
};
|
|
114
|
+
const act = (op: Operation) => {
|
|
115
|
+
op(p, instances);
|
|
116
|
+
journal.push({ op, writer });
|
|
117
|
+
lastWriter = writer;
|
|
118
|
+
};
|
|
119
|
+
const data = (player = p) => {
|
|
120
|
+
if (!model.doc.requires?.includes('data') || !('data' in player))
|
|
121
|
+
throw new Error('data commands need a document with data and the host module loaded');
|
|
122
|
+
return player.data;
|
|
123
|
+
};
|
|
124
|
+
const dataPath = (path: string) => {
|
|
125
|
+
if (model.inputs.has(path)) return model.inputs.get(path)!.name;
|
|
126
|
+
const alias = [...model.inputs].find(
|
|
127
|
+
([name, input]) => name.startsWith('$') && !name.includes(':') && input.name.includes(':'),
|
|
128
|
+
);
|
|
129
|
+
return !path.includes(':') && alias ? alias[1].name.split(':')[0] + ':' + path.slice(1) : path;
|
|
130
|
+
};
|
|
131
|
+
const writeData = (player: Player, path: string, value: unknown): void => {
|
|
132
|
+
const api = data(player),
|
|
133
|
+
canonical = dataPath(path);
|
|
134
|
+
const [instanceName, propertyPath] = canonical.slice(1).split(':');
|
|
135
|
+
const instance = api.instances().find((item) => item.name === instanceName);
|
|
136
|
+
const document = model.doc.data as import('../../../modules/data/core/types.ts').DataDocument;
|
|
137
|
+
let properties = document.models[instance?.model ?? '']?.properties;
|
|
138
|
+
let property: import('../../../modules/data/core/types.ts').Property | undefined;
|
|
139
|
+
const keys = propertyPath?.split('.') ?? [];
|
|
140
|
+
for (let i = 0; i < keys.length; i++) {
|
|
141
|
+
property = properties?.[keys[i]!];
|
|
142
|
+
if (property?.type === 'model-ref') properties = document.models[property.model!]?.properties;
|
|
143
|
+
if (property?.type === 'list' && i + 1 < keys.length) {
|
|
144
|
+
properties = document.models[property.of!]?.properties;
|
|
145
|
+
i++;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (
|
|
149
|
+
property?.type === 'model-ref' &&
|
|
150
|
+
value &&
|
|
151
|
+
typeof value === 'object' &&
|
|
152
|
+
!Array.isArray(value)
|
|
153
|
+
) {
|
|
154
|
+
const fields = (value as { values?: Record<string, unknown> }).values ?? value;
|
|
155
|
+
for (const [key, item] of Object.entries(fields))
|
|
156
|
+
writeData(player, canonical + '.' + key, item);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const method =
|
|
160
|
+
property?.type === 'bool'
|
|
161
|
+
? 'boolean'
|
|
162
|
+
: property?.type === 'asset-ref'
|
|
163
|
+
? property.assetType === 'image'
|
|
164
|
+
? 'image'
|
|
165
|
+
: property.assetType === 'font'
|
|
166
|
+
? 'font'
|
|
167
|
+
: 'string'
|
|
168
|
+
: property?.type;
|
|
169
|
+
if (
|
|
170
|
+
!method ||
|
|
171
|
+
![
|
|
172
|
+
'number',
|
|
173
|
+
'string',
|
|
174
|
+
'boolean',
|
|
175
|
+
'enum',
|
|
176
|
+
'color',
|
|
177
|
+
'component',
|
|
178
|
+
'list',
|
|
179
|
+
'image',
|
|
180
|
+
'font',
|
|
181
|
+
].includes(method)
|
|
182
|
+
)
|
|
183
|
+
throw new Error('unknown or non-writable data path ' + path);
|
|
184
|
+
api[method as 'number'](canonical).set(value as never);
|
|
185
|
+
};
|
|
186
|
+
const dataValues = (player = p): Record<string, unknown> => {
|
|
187
|
+
const api = data(player);
|
|
188
|
+
const values: Record<string, unknown> = {};
|
|
189
|
+
const defaultPrefix = dataPath('$__prefix').split(':')[0] + ':';
|
|
190
|
+
const visit = (path: string, value: unknown, depth = 0): void => {
|
|
191
|
+
values[path] = value;
|
|
192
|
+
if (path.startsWith(defaultPrefix)) values['$' + path.slice(defaultPrefix.length)] = value;
|
|
193
|
+
if (depth >= 32 || value === null || typeof value !== 'object') return;
|
|
194
|
+
if (Array.isArray(value)) visit(path + '.length', value.length, depth + 1);
|
|
195
|
+
for (const [key, child] of Object.entries(value)) visit(path + '.' + key, child, depth + 1);
|
|
196
|
+
};
|
|
197
|
+
for (const instance of api.instances()) {
|
|
198
|
+
const def = api.models().find((m) => m.name === instance.model)!;
|
|
199
|
+
for (const prop of def.properties) {
|
|
200
|
+
if (prop.type === 'trigger') continue;
|
|
201
|
+
const path = '$' + instance.name + ':' + prop.name;
|
|
202
|
+
visit(path, api.get(path));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return values;
|
|
206
|
+
};
|
|
207
|
+
const step = (dt: number) => {
|
|
208
|
+
if (breaks.size) {
|
|
209
|
+
const probe = new Player(model, opts);
|
|
210
|
+
const handles = new Map<string, TimelineInstance>();
|
|
211
|
+
const trace = traceWrites(probe, (write) => {
|
|
212
|
+
if (replaying) return;
|
|
213
|
+
for (const [path, condition] of breaks) {
|
|
214
|
+
if (
|
|
215
|
+
dataPath(path) !== write.path ||
|
|
216
|
+
('value' in condition &&
|
|
217
|
+
JSON.stringify(write.value) !== JSON.stringify(condition.value))
|
|
218
|
+
)
|
|
219
|
+
continue;
|
|
220
|
+
diagnostics.push({
|
|
221
|
+
code: 'script-breakpoint',
|
|
222
|
+
pointer: `/script/${line - 1}`,
|
|
223
|
+
message: `${path} would write ${JSON.stringify(write.value)} (before ${JSON.stringify(write.before)})`,
|
|
224
|
+
hint: 'use data break clear, then advance to resume',
|
|
225
|
+
writer: [write.writer],
|
|
226
|
+
});
|
|
227
|
+
stopped = true;
|
|
228
|
+
throw new Breakpoint();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
try {
|
|
232
|
+
// Replay establishes pending writes with their original script provenance. Only trap
|
|
233
|
+
// the proposed step: historical writes have already been accepted by the live player.
|
|
234
|
+
replaying = true;
|
|
235
|
+
for (const { op, writer } of journal) trace.run(writer, () => op(probe, handles));
|
|
236
|
+
const s = semantic,
|
|
237
|
+
last = s ? writer : lastWriter;
|
|
238
|
+
if (s) trace.run(last, () => replaySemantic(probe, s.cmd, s.args, s.steps));
|
|
239
|
+
replaying = false;
|
|
240
|
+
trace.run(last, () => probe.step(dt));
|
|
241
|
+
} finally {
|
|
242
|
+
replaying = false;
|
|
243
|
+
trace.close();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// Counts attempted live steps: a step that throws has still mutated the player.
|
|
247
|
+
if (semantic) semantic.steps++;
|
|
248
|
+
const r = opts.onEvents ? captureStep(() => p.step(dt)) : p.step(dt);
|
|
249
|
+
if (!semantic)
|
|
250
|
+
journal.push({
|
|
251
|
+
op: (player) => {
|
|
252
|
+
player.step(dt);
|
|
253
|
+
},
|
|
254
|
+
writer,
|
|
255
|
+
});
|
|
256
|
+
opts.onEvents?.(
|
|
257
|
+
r.events.map((event) => {
|
|
258
|
+
const e = event as CapturedEvent;
|
|
259
|
+
return {
|
|
260
|
+
...e,
|
|
261
|
+
time: p.time - dt + dt * (e[occurrence] ?? 0),
|
|
262
|
+
[eventSource]: e[eventSource] ?? model,
|
|
263
|
+
};
|
|
264
|
+
}),
|
|
265
|
+
);
|
|
266
|
+
events.push(...r.events);
|
|
267
|
+
settled = r.settled;
|
|
268
|
+
for (const [path, previous] of watched) {
|
|
269
|
+
const stamp = JSON.stringify(data().get(dataPath(path)));
|
|
270
|
+
if (stamp !== previous) changedData.add(path);
|
|
271
|
+
watched.set(path, stamp);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
const allValues = (player = p): Record<string, number | string | boolean | [number, number]> => {
|
|
275
|
+
const source = player.model;
|
|
276
|
+
const values = player.values();
|
|
277
|
+
for (const node of source.nodes) {
|
|
278
|
+
const keys = [
|
|
279
|
+
...Object.keys(COMMON),
|
|
280
|
+
...Object.keys(OWN[node.type]),
|
|
281
|
+
...Object.entries(PAINT).flatMap(([paint, fields]) =>
|
|
282
|
+
Object.keys(fields).map((key) => paint + '.' + key),
|
|
283
|
+
),
|
|
284
|
+
];
|
|
285
|
+
for (const key of keys) {
|
|
286
|
+
const address = node.id + '.' + key;
|
|
287
|
+
if (address in values) continue;
|
|
288
|
+
const resolved = resolveAddress(address, source.nodes, source.ids);
|
|
289
|
+
if (!Array.isArray(resolved)) {
|
|
290
|
+
const v = resolved.rest;
|
|
291
|
+
if (v !== undefined)
|
|
292
|
+
values[address] = Array.isArray(v) && v.length === 4 ? formatHex(v) : v;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
for (const [name, input] of source.inputs) {
|
|
297
|
+
if (input.type === 'trigger') continue;
|
|
298
|
+
const v = player.get(name);
|
|
299
|
+
if (v !== undefined) values[name] = Array.isArray(v) && v.length === 4 ? formatHex(v) : v;
|
|
300
|
+
}
|
|
301
|
+
const children = (player.nested as { players?: Map<string, Player> } | undefined)?.players;
|
|
302
|
+
for (const [id, child] of children ?? [])
|
|
303
|
+
for (const [address, value] of Object.entries(allValues(child)))
|
|
304
|
+
values[id + '/' + address] = value;
|
|
305
|
+
const lists = modules.get('lists') as
|
|
306
|
+
typeof import('../../../modules/lists/core/index.ts').lists | undefined;
|
|
307
|
+
for (const run of lists?.listState(player)?.runs ?? []) {
|
|
308
|
+
for (const item of run.items) {
|
|
309
|
+
const prefix =
|
|
310
|
+
source.nodes[run.spec.node]!.id.replaceAll('.', '/') + '/' + item.index + '/';
|
|
311
|
+
for (const [address, value] of Object.entries(allValues(item.player)))
|
|
312
|
+
values[prefix + address] = value;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return values;
|
|
316
|
+
};
|
|
317
|
+
const canonicalAddress = (address: string): string => {
|
|
318
|
+
const aliases = [
|
|
319
|
+
...[
|
|
320
|
+
...Object.entries(COMMON),
|
|
321
|
+
...Object.values(OWN).flatMap((props) => Object.entries(props)),
|
|
322
|
+
].map(([key, prop]) => [key, markupName(prop, key)]),
|
|
323
|
+
...Object.entries(PAINT).flatMap(([paint, props]) =>
|
|
324
|
+
Object.entries(props).map(([key, prop]) => [paint + '.' + key, markupName(prop, key)]),
|
|
325
|
+
),
|
|
326
|
+
];
|
|
327
|
+
return p.get(address) !== undefined || p.value(address) !== undefined
|
|
328
|
+
? address
|
|
329
|
+
: (Object.keys(allValues()).find((key) =>
|
|
330
|
+
aliases.some(
|
|
331
|
+
([path, alias]) =>
|
|
332
|
+
key.endsWith('.' + path) && key.slice(0, -path!.length) + alias === address,
|
|
333
|
+
),
|
|
334
|
+
) ?? address);
|
|
335
|
+
};
|
|
336
|
+
const read = (address: string) => {
|
|
337
|
+
address = canonicalAddress(address);
|
|
338
|
+
if (address.startsWith('$')) {
|
|
339
|
+
const value = p.get(address) ?? data().get(dataPath(address));
|
|
340
|
+
return model.inputs.get(address)?.type === 'color' && Array.isArray(value)
|
|
341
|
+
? formatHex(value as [number, number, number, number])
|
|
342
|
+
: value;
|
|
343
|
+
}
|
|
344
|
+
return p.get(address) ?? p.value(address) ?? allValues()[address];
|
|
345
|
+
};
|
|
346
|
+
const execute = (text: string) => {
|
|
347
|
+
stopped = false;
|
|
348
|
+
out.length = output.length = diagnostics.length = 0;
|
|
349
|
+
const start = { snapshots: out.length, output: output.length, diagnostics: diagnostics.length };
|
|
350
|
+
for (const raw of text.split('\n')) {
|
|
351
|
+
line++;
|
|
352
|
+
let words: string[];
|
|
353
|
+
try {
|
|
354
|
+
words = tokenize(raw, line);
|
|
355
|
+
} catch (e) {
|
|
356
|
+
// A pending `expect-error` also covers a line that does not tokenize.
|
|
357
|
+
if (!expectedError) throw e;
|
|
358
|
+
const code = (e as ScriptError).code ?? 'script-usage';
|
|
359
|
+
if (code !== expectedError)
|
|
360
|
+
diagnostics.push({
|
|
361
|
+
code: 'script-expect-error',
|
|
362
|
+
pointer: `/script/${line - 1}`,
|
|
363
|
+
message: 'expected ' + expectedError + ', received ' + code,
|
|
364
|
+
hint: 'check the expected diagnostic code',
|
|
365
|
+
});
|
|
366
|
+
expectedError = undefined;
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
if (!words.length) continue;
|
|
370
|
+
const [cmd, ...args] = words;
|
|
371
|
+
const num = (s: string | undefined, what: string) => {
|
|
372
|
+
const n = Number(s);
|
|
373
|
+
if (s === undefined || !Number.isFinite(n))
|
|
374
|
+
throw new ScriptError(`${what} must be a number`, line);
|
|
375
|
+
return n;
|
|
376
|
+
};
|
|
377
|
+
const expected = cmd === 'expect-error' ? undefined : expectedError;
|
|
378
|
+
if (cmd !== 'expect-error') expectedError = undefined;
|
|
379
|
+
const diagnosticStart = diagnostics.length;
|
|
380
|
+
try {
|
|
381
|
+
writer = `script line ${line}: ${raw.trim()}`;
|
|
382
|
+
const literal = (v: string | undefined) => {
|
|
383
|
+
if (v === undefined) throw new ScriptError('missing value', line);
|
|
384
|
+
try {
|
|
385
|
+
return JSON.parse(v);
|
|
386
|
+
} catch {
|
|
387
|
+
return v;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
if (cmd === 'semantic' && args.length === 2) {
|
|
391
|
+
const find = (
|
|
392
|
+
nodes: import('../../../modules/a11y/core/types.ts').SemanticNode[],
|
|
393
|
+
): boolean => nodes.some((n) => n.id === args[0] || find(n.children));
|
|
394
|
+
if (!find(p.semantics?.() ?? []))
|
|
395
|
+
targetError(
|
|
396
|
+
'hidden or absent semantic node "' +
|
|
397
|
+
args[0] +
|
|
398
|
+
'"; inspect semantics before targeting it',
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
const s = (semantic = { cmd: cmd!, args, steps: 0 });
|
|
402
|
+
let handled = false;
|
|
403
|
+
try {
|
|
404
|
+
handled =
|
|
405
|
+
cmd !== 'snapshot' &&
|
|
406
|
+
semanticCommand(p, cmd!, args, output, step, () => ({}) as Snapshot);
|
|
407
|
+
} catch (e) {
|
|
408
|
+
handled = true;
|
|
409
|
+
throw e;
|
|
410
|
+
} finally {
|
|
411
|
+
semantic = undefined;
|
|
412
|
+
if (handled) {
|
|
413
|
+
// A failure or breakpoint keeps the accepted mutations, up to the step it stopped.
|
|
414
|
+
const limit = s.steps;
|
|
415
|
+
journal.push({ op: (player) => replaySemantic(player, s.cmd, s.args, limit), writer });
|
|
416
|
+
lastWriter = writer;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (!handled)
|
|
420
|
+
switch (cmd) {
|
|
421
|
+
case 'group':
|
|
422
|
+
if (args.length !== 1) throw new ScriptError('use group <name>', line);
|
|
423
|
+
groups.push(args[0]!);
|
|
424
|
+
break;
|
|
425
|
+
case 'end':
|
|
426
|
+
if (args.length || !groups.length)
|
|
427
|
+
throw new ScriptError('end requires an open group', line);
|
|
428
|
+
groups.pop();
|
|
429
|
+
break;
|
|
430
|
+
case 'expect-error':
|
|
431
|
+
if (args.length !== 1 || expectedError)
|
|
432
|
+
throw new ScriptError('use expect-error <code> before one command', line);
|
|
433
|
+
expectedError = args[0];
|
|
434
|
+
break;
|
|
435
|
+
case 'seed': {
|
|
436
|
+
if (
|
|
437
|
+
args.length !== 1 ||
|
|
438
|
+
!Number.isInteger(num(args[0], 'seed')) ||
|
|
439
|
+
Number(args[0]) < 0 ||
|
|
440
|
+
Number(args[0]) > 0xffffffff
|
|
441
|
+
)
|
|
442
|
+
throw new ScriptError('seed must be a uint32 integer', line);
|
|
443
|
+
seed = Number(args[0]);
|
|
444
|
+
const nextSeed = seed;
|
|
445
|
+
act((player) => player.randomSource.reset(nextSeed));
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
case 'data': {
|
|
449
|
+
const [op, path] = args;
|
|
450
|
+
if (op === 'set' && args.length === 3 && path?.startsWith('$')) {
|
|
451
|
+
const value = literal(args[2]);
|
|
452
|
+
act((player) => {
|
|
453
|
+
writeData(player, path, value);
|
|
454
|
+
});
|
|
455
|
+
} else if (op === 'dump') {
|
|
456
|
+
const prefixes = args.slice(1);
|
|
457
|
+
const values = Object.fromEntries(
|
|
458
|
+
Object.entries(dataValues()).filter(
|
|
459
|
+
([key]) =>
|
|
460
|
+
!prefixes.length || prefixes.some((prefix) => key.startsWith(prefix)),
|
|
461
|
+
),
|
|
462
|
+
);
|
|
463
|
+
output.push({ data: values });
|
|
464
|
+
} else if (op === 'watch' && args.length > 1) {
|
|
465
|
+
for (const path of args.slice(1)) {
|
|
466
|
+
if (!path.startsWith('$')) throw new ScriptError('data watch needs $paths', line);
|
|
467
|
+
watched.set(path, JSON.stringify(data().get(dataPath(path))));
|
|
468
|
+
}
|
|
469
|
+
} else if (op === 'break' && path === 'clear' && args.length === 2) breaks.clear();
|
|
470
|
+
else if (
|
|
471
|
+
op === 'break' &&
|
|
472
|
+
path?.startsWith('$') &&
|
|
473
|
+
(args.length === 2 || (args.length === 4 && args[2] === '=='))
|
|
474
|
+
) {
|
|
475
|
+
data().get(dataPath(path));
|
|
476
|
+
breaks.set(path, args.length === 4 ? { value: literal(args[3]) } : {});
|
|
477
|
+
} else
|
|
478
|
+
throw new ScriptError(
|
|
479
|
+
'use data set <$path> <value> | dump [prefix…] | watch <$path…> | break <$path> [== value] | break clear',
|
|
480
|
+
line,
|
|
481
|
+
);
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
case 'expect': {
|
|
485
|
+
if (args.length !== 3 || !['==', '!=', '<', '>', '~'].includes(args[1]!))
|
|
486
|
+
throw new ScriptError('use expect <address|$path|input> ==|!=|<|>|~ <value>', line);
|
|
487
|
+
const actual = read(args[0]!);
|
|
488
|
+
if (actual === undefined)
|
|
489
|
+
throw new ScriptError(`unknown assertion address "${args[0]}"`, line);
|
|
490
|
+
const expected = literal(args[2]),
|
|
491
|
+
op = args[1];
|
|
492
|
+
const same = JSON.stringify(actual) === JSON.stringify(expected);
|
|
493
|
+
const pass =
|
|
494
|
+
op === '=='
|
|
495
|
+
? same
|
|
496
|
+
: op === '!='
|
|
497
|
+
? !same
|
|
498
|
+
: typeof actual === 'number' &&
|
|
499
|
+
typeof expected === 'number' &&
|
|
500
|
+
(op === '<'
|
|
501
|
+
? actual < expected
|
|
502
|
+
: op === '>'
|
|
503
|
+
? actual > expected
|
|
504
|
+
: Math.abs(actual - expected) <= 1e-6);
|
|
505
|
+
if (!pass)
|
|
506
|
+
diagnostics.push({
|
|
507
|
+
code: 'script-expect',
|
|
508
|
+
pointer: `/script/${line - 1}`,
|
|
509
|
+
message: `${groups.length ? '[' + groups.join('/') + '] ' : ''}${args[0]} ${op} ${args[2]} failed (actual ${JSON.stringify(actual)})`,
|
|
510
|
+
hint: 'check the expected value or advance queued writes before asserting',
|
|
511
|
+
});
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
case 'touch': {
|
|
515
|
+
if (args.length !== 4 || !['down', 'move', 'up'].includes(args[0]!))
|
|
516
|
+
throw new ScriptError('use touch down|move|up <id> <x> <y>', line);
|
|
517
|
+
const id = num(args[1], 'pointer id'),
|
|
518
|
+
x = num(args[2], 'x'),
|
|
519
|
+
y = num(args[3], 'y');
|
|
520
|
+
if (!Number.isInteger(id) || id < 0)
|
|
521
|
+
throw new ScriptError('pointer id must be a nonnegative integer', line);
|
|
522
|
+
act((player) => {
|
|
523
|
+
player.input().pointer(args[0] as 'down' | 'move' | 'up', x, y, { id });
|
|
524
|
+
});
|
|
525
|
+
step(0);
|
|
526
|
+
if (args[0] === 'up') {
|
|
527
|
+
act((player) => {
|
|
528
|
+
player.input().pointer('leave', 0, 0, { id });
|
|
529
|
+
});
|
|
530
|
+
step(0);
|
|
531
|
+
}
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
case 'advance': {
|
|
535
|
+
const t = num(args[0], 'advance time');
|
|
536
|
+
if (t < 0) throw new ScriptError('advance time must be ≥ 0', line);
|
|
537
|
+
let n = 1;
|
|
538
|
+
if (!args.length) throw new ScriptError('advance needs seconds', line);
|
|
539
|
+
if (args.length > 1) {
|
|
540
|
+
if (args[1] !== 'in' || args.length !== 3)
|
|
541
|
+
throw new ScriptError('use "advance <seconds> [in <n>]"', line);
|
|
542
|
+
n = num(args[2], 'step count');
|
|
543
|
+
if (!Number.isInteger(n) || n < 1)
|
|
544
|
+
throw new ScriptError('step count must be a whole number ≥ 1', line);
|
|
545
|
+
}
|
|
546
|
+
for (let k = 0; k < n; k++) step(t / n);
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
case 'set': {
|
|
550
|
+
if (args.length !== 2) throw new ScriptError('use "set <input> <value>"', line);
|
|
551
|
+
requireInput(args[0]!);
|
|
552
|
+
const type = model.inputs.get(args[0]!)?.type;
|
|
553
|
+
const v =
|
|
554
|
+
args[0]!.startsWith('$') && (type === 'string' || type === 'color')
|
|
555
|
+
? args[1]!.startsWith('"')
|
|
556
|
+
? JSON.parse(args[1]!)
|
|
557
|
+
: args[1]!
|
|
558
|
+
: args[1] === 'true'
|
|
559
|
+
? true
|
|
560
|
+
: args[1] === 'false'
|
|
561
|
+
? false
|
|
562
|
+
: num(args[1], 'value');
|
|
563
|
+
act((player) => {
|
|
564
|
+
player.set(args[0]!, v);
|
|
565
|
+
});
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
case 'fire':
|
|
569
|
+
case 'toggle':
|
|
570
|
+
if (args.length !== 1) throw new ScriptError(`use "${cmd} <input>"`, line);
|
|
571
|
+
requireInput(args[0]!);
|
|
572
|
+
act((player) => {
|
|
573
|
+
if (cmd === 'fire') player.fire(args[0]!);
|
|
574
|
+
else player.toggle(args[0]!);
|
|
575
|
+
});
|
|
576
|
+
break;
|
|
577
|
+
case 'pointer': {
|
|
578
|
+
const kind = args[0];
|
|
579
|
+
if (kind === 'drag') {
|
|
580
|
+
if (args.length !== 5 && !(args.length === 7 && args[5] === 'in'))
|
|
581
|
+
throw new ScriptError('use pointer drag <x0> <y0> <x1> <y1> [in <n>]', line);
|
|
582
|
+
const x0 = num(args[1], 'x0'),
|
|
583
|
+
y0 = num(args[2], 'y0'),
|
|
584
|
+
x1 = num(args[3], 'x1'),
|
|
585
|
+
y1 = num(args[4], 'y1');
|
|
586
|
+
const n = args[6] === undefined ? 1 : num(args[6], 'step count');
|
|
587
|
+
if (!Number.isInteger(n) || n < 1)
|
|
588
|
+
throw new ScriptError('step count must be a whole number ≥ 1', line);
|
|
589
|
+
act((player) => {
|
|
590
|
+
player.pointer('move', x0, y0);
|
|
591
|
+
});
|
|
592
|
+
step(0);
|
|
593
|
+
act((player) => {
|
|
594
|
+
player.pointer('down', x0, y0);
|
|
595
|
+
});
|
|
596
|
+
step(0);
|
|
597
|
+
for (let i = 1; i <= n; i++) {
|
|
598
|
+
act((player) => {
|
|
599
|
+
player.pointer('move', x0 + ((x1 - x0) * i) / n, y0 + ((y1 - y0) * i) / n);
|
|
600
|
+
});
|
|
601
|
+
step(0);
|
|
602
|
+
}
|
|
603
|
+
act((player) => {
|
|
604
|
+
player.pointer('up', x1, y1);
|
|
605
|
+
});
|
|
606
|
+
step(0);
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
if (kind === 'leave' && args.length === 1) {
|
|
610
|
+
act((player) => {
|
|
611
|
+
player.pointer('leave');
|
|
612
|
+
});
|
|
613
|
+
step(0);
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
if (!['move', 'down', 'up', 'click'].includes(kind!) || args.length !== 3)
|
|
617
|
+
throw new ScriptError(
|
|
618
|
+
'use "pointer move|down|up|click <x> <y>" or "pointer leave"',
|
|
619
|
+
line,
|
|
620
|
+
);
|
|
621
|
+
const x = num(args[1], 'x');
|
|
622
|
+
const y = num(args[2], 'y');
|
|
623
|
+
for (const k of kind === 'click'
|
|
624
|
+
? (['move', 'down', 'up'] as const)
|
|
625
|
+
: [kind as 'move' | 'down' | 'up']) {
|
|
626
|
+
act((player) => {
|
|
627
|
+
player.pointer(k, x, y);
|
|
628
|
+
});
|
|
629
|
+
step(0);
|
|
630
|
+
}
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
|
+
case 'focus': {
|
|
634
|
+
act((player) => {
|
|
635
|
+
if (args[0] === 'clear' && args.length === 1) player.focusClear();
|
|
636
|
+
else if (args[0] === 'target' && args.length === 2) player.focusTarget(args[1]!);
|
|
637
|
+
else if (args[0] === 'traverse' && args.length === 2)
|
|
638
|
+
player.focusTraverse(
|
|
639
|
+
args[1] as import('../../../modules/focus/core/index.ts').Direction,
|
|
640
|
+
);
|
|
641
|
+
else
|
|
642
|
+
throw new ScriptError('use "focus clear|target <id>|traverse <direction>"', line);
|
|
643
|
+
});
|
|
644
|
+
step(0);
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
case 'key': {
|
|
648
|
+
if (model.doc.requires?.includes('input')) {
|
|
649
|
+
act((player) => {
|
|
650
|
+
inputCommand(player, 'key', args);
|
|
651
|
+
});
|
|
652
|
+
step(0);
|
|
653
|
+
break;
|
|
654
|
+
}
|
|
655
|
+
if (
|
|
656
|
+
!['down', 'up'].includes(args[0]!) ||
|
|
657
|
+
args.length < 2 ||
|
|
658
|
+
args.length > 3 ||
|
|
659
|
+
(args.length === 3 && args[2] !== 'shift')
|
|
660
|
+
)
|
|
661
|
+
throw new ScriptError('use "key down|up <key> [shift]"', line);
|
|
662
|
+
act((player) => {
|
|
663
|
+
player.focusKey(args[1]!, args[0] === 'down', args[2] === 'shift');
|
|
664
|
+
});
|
|
665
|
+
step(0);
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
case 'instance': {
|
|
669
|
+
if (args.length < 2 || args.length > 3)
|
|
670
|
+
throw new ScriptError('use "instance <id> <timeline> [mix]"', line);
|
|
671
|
+
act((player, handles) => {
|
|
672
|
+
handles.set(
|
|
673
|
+
args[0]!,
|
|
674
|
+
player.createTimeline(args[1]!, {
|
|
675
|
+
name: args[0]!,
|
|
676
|
+
mix: args[2] === undefined ? 1 : num(args[2], 'mix'),
|
|
677
|
+
}),
|
|
678
|
+
);
|
|
679
|
+
});
|
|
680
|
+
break;
|
|
681
|
+
}
|
|
682
|
+
case 'timeline': {
|
|
683
|
+
const name = args[0]!,
|
|
684
|
+
op = args[1];
|
|
685
|
+
act((player, handles) => {
|
|
686
|
+
const t = handles.get(name) ?? player.timeline(name);
|
|
687
|
+
if (op === 'play' || op === 'pause' || op === 'stop') t[op]();
|
|
688
|
+
else if (op === 'seek' || op === 'scrub') t[op](num(args[2], op));
|
|
689
|
+
else if (op === 'speed' || op === 'mix') t[op] = num(args[2], op);
|
|
690
|
+
else if (
|
|
691
|
+
op === 'loop' &&
|
|
692
|
+
['once', 'loop', 'pingpong', 'authored'].includes(args[2]!)
|
|
693
|
+
)
|
|
694
|
+
t.loop = args[2] === 'authored' ? null : (args[2] as TimelineInstance['loop']);
|
|
695
|
+
else
|
|
696
|
+
throw new ScriptError(
|
|
697
|
+
'use "timeline <name> play|pause|stop|seek|scrub|speed|mix|loop [value]"',
|
|
698
|
+
line,
|
|
699
|
+
);
|
|
700
|
+
});
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
703
|
+
case 'machine': {
|
|
704
|
+
act((player) => {
|
|
705
|
+
const m = player.machine(args[0]!),
|
|
706
|
+
op = args[1];
|
|
707
|
+
if (op === 'play' || op === 'pause' || op === 'stop') m[op]();
|
|
708
|
+
else if (op === 'mix') m.mix = num(args[2], 'mix');
|
|
709
|
+
else if (op === 'fire') m.fire(args[2]!);
|
|
710
|
+
else if (op === 'set')
|
|
711
|
+
m.set(
|
|
712
|
+
args[2]!,
|
|
713
|
+
args[3] === 'true' ? true : args[3] === 'false' ? false : num(args[3], 'value'),
|
|
714
|
+
);
|
|
715
|
+
else
|
|
716
|
+
throw new ScriptError(
|
|
717
|
+
'use "machine <name> play|pause|stop|mix|fire|set [value …]"',
|
|
718
|
+
line,
|
|
719
|
+
);
|
|
720
|
+
});
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
case 'motion':
|
|
724
|
+
if (args[0] !== 'reduce' && args[0] !== 'full')
|
|
725
|
+
throw new ScriptError('use "motion reduce|full"', line);
|
|
726
|
+
act((player) => {
|
|
727
|
+
player.reducedMotion = args[0] === 'reduce';
|
|
728
|
+
});
|
|
729
|
+
break;
|
|
730
|
+
case 'snapshot': {
|
|
731
|
+
const all = opts.all || args.includes('--all');
|
|
732
|
+
const semantics = opts.semantics || args.includes('--semantics');
|
|
733
|
+
const addresses = args.filter((arg) => arg !== '--all' && arg !== '--semantics');
|
|
734
|
+
let values = all ? allValues() : p.values();
|
|
735
|
+
if (addresses.length) {
|
|
736
|
+
const pick: typeof values = {};
|
|
737
|
+
// Prefer exact input/JSON addresses. Resolve AniML aliases from the same registry
|
|
738
|
+
// as the compiler, including slash-scoped component snapshot addresses.
|
|
739
|
+
for (const a of addresses) {
|
|
740
|
+
const canonical = canonicalAddress(a);
|
|
741
|
+
const v = read(canonical);
|
|
742
|
+
if (v === undefined)
|
|
743
|
+
throw new ScriptError(
|
|
744
|
+
`"${a}" is not an animated address or a bool/number input`,
|
|
745
|
+
line,
|
|
746
|
+
);
|
|
747
|
+
pick[canonical] =
|
|
748
|
+
Array.isArray(v) && v.length === 4
|
|
749
|
+
? formatHex(v as [number, number, number, number])
|
|
750
|
+
: (v as number | boolean | string | [number, number]);
|
|
751
|
+
}
|
|
752
|
+
values = pick;
|
|
753
|
+
}
|
|
754
|
+
const snapshot: Snapshot = {
|
|
755
|
+
time: p.time,
|
|
756
|
+
values,
|
|
757
|
+
states: p.states(),
|
|
758
|
+
events,
|
|
759
|
+
settled,
|
|
760
|
+
};
|
|
761
|
+
if (watched.size) {
|
|
762
|
+
snapshot.data = {};
|
|
763
|
+
for (const path of changedData) snapshot.data[path] = data().get(dataPath(path));
|
|
764
|
+
changedData.clear();
|
|
765
|
+
}
|
|
766
|
+
if (semantics) {
|
|
767
|
+
const semanticPlayer = p as Player & { semantics?: () => unknown };
|
|
768
|
+
if (!semanticPlayer.semantics)
|
|
769
|
+
throw new ScriptError('semantics module is not loaded', line);
|
|
770
|
+
snapshot.semantics = semanticPlayer.semantics();
|
|
771
|
+
}
|
|
772
|
+
out.push(snapshot);
|
|
773
|
+
output.push(snapshot);
|
|
774
|
+
events = [];
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
default:
|
|
778
|
+
if (
|
|
779
|
+
['contact', 'scroll', 'gamepads', 'pointer-enable', 'scroll-cancel'].includes(cmd!)
|
|
780
|
+
) {
|
|
781
|
+
act((player) => {
|
|
782
|
+
inputCommand(player, cmd!, args);
|
|
783
|
+
});
|
|
784
|
+
step(0);
|
|
785
|
+
break;
|
|
786
|
+
}
|
|
787
|
+
throw new ScriptError(`unknown command "${cmd}"`, line);
|
|
788
|
+
}
|
|
789
|
+
if (expected) {
|
|
790
|
+
const emitted = diagnostics.splice(diagnosticStart);
|
|
791
|
+
if (!emitted.some((d) => d.code === expected))
|
|
792
|
+
diagnostics.push({
|
|
793
|
+
code: 'script-expect-error',
|
|
794
|
+
pointer: `/script/${line - 1}`,
|
|
795
|
+
message: 'expected error ' + expected + ' in ' + groups.join('/'),
|
|
796
|
+
hint: 'follow expect-error with a command producing that code',
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
} catch (e) {
|
|
800
|
+
const error = e as Error & { code?: string; hint?: string };
|
|
801
|
+
if (expected) {
|
|
802
|
+
if ((error.code ?? 'script-usage') !== expected)
|
|
803
|
+
diagnostics.push({
|
|
804
|
+
code: 'script-expect-error',
|
|
805
|
+
pointer: `/script/${line - 1}`,
|
|
806
|
+
message: 'expected ' + expected + ', received ' + (error.code ?? 'script-usage'),
|
|
807
|
+
hint: 'check the expected diagnostic code',
|
|
808
|
+
});
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
if (e instanceof Breakpoint) break;
|
|
812
|
+
if (e instanceof ScriptError) throw e;
|
|
813
|
+
// seam(P6-9b): preserve structured layout/font diagnostics through script sampling.
|
|
814
|
+
const failure = new ScriptError(error.message.replace(/^anima: /, ''), line, error.code);
|
|
815
|
+
if (error.hint) Object.assign(failure, { hint: error.hint });
|
|
816
|
+
throw failure;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return {
|
|
820
|
+
snapshots: out.slice(start.snapshots),
|
|
821
|
+
output: output.slice(start.output),
|
|
822
|
+
diagnostics: diagnostics.slice(start.diagnostics),
|
|
823
|
+
stopped,
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
if (opts.seed !== undefined) {
|
|
827
|
+
execute('seed ' + opts.seed);
|
|
828
|
+
line = 0;
|
|
829
|
+
}
|
|
830
|
+
return {
|
|
831
|
+
player: p,
|
|
832
|
+
execute,
|
|
833
|
+
dataValues,
|
|
834
|
+
finish() {
|
|
835
|
+
if (groups.length) throw new ScriptError('unclosed group ' + groups.join('/'), line);
|
|
836
|
+
if (expectedError)
|
|
837
|
+
throw new ScriptError(
|
|
838
|
+
'expect-error needs a following command',
|
|
839
|
+
line,
|
|
840
|
+
'script-expect-error',
|
|
841
|
+
);
|
|
842
|
+
},
|
|
843
|
+
get seed() {
|
|
844
|
+
return seed;
|
|
845
|
+
},
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/** Run a script against a fresh player; assertion failures accumulate without aborting. */
|
|
850
|
+
export function runScript(model: Model, text: string, opts: ScriptOptions = {}) {
|
|
851
|
+
const session = createScriptSession(model, opts);
|
|
852
|
+
const result = session.execute(text);
|
|
853
|
+
session.finish();
|
|
854
|
+
return { ...result, player: session.player };
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/** JSON strings/arrays/objects stay together; #hex is a value, # otherwise begins a comment. */
|
|
858
|
+
function tokenize(raw: string, line: number): string[] {
|
|
859
|
+
const words: string[] = [];
|
|
860
|
+
let token = '',
|
|
861
|
+
quoted = false,
|
|
862
|
+
escaped = false,
|
|
863
|
+
depth = 0;
|
|
864
|
+
for (let i = 0; i < raw.length; i++) {
|
|
865
|
+
const c = raw[i]!;
|
|
866
|
+
if (
|
|
867
|
+
!quoted &&
|
|
868
|
+
depth === 0 &&
|
|
869
|
+
!token &&
|
|
870
|
+
c === '#' &&
|
|
871
|
+
!(
|
|
872
|
+
((words[0] === 'set' && words.length === 2) ||
|
|
873
|
+
(words[0] === 'data' && words[1] === 'set' && words.length === 3) ||
|
|
874
|
+
(words[0] === 'data' && words[1] === 'break' && words.length === 4) ||
|
|
875
|
+
(words[0] === 'expect' && words.length === 3)) &&
|
|
876
|
+
/^#[a-f\d]{3,8}(?=\s|$)/i.test(raw.slice(i))
|
|
877
|
+
)
|
|
878
|
+
)
|
|
879
|
+
break;
|
|
880
|
+
if (!quoted && depth === 0 && /\s/.test(c)) {
|
|
881
|
+
if (token) words.push(token);
|
|
882
|
+
token = '';
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
token += c;
|
|
886
|
+
if (quoted) {
|
|
887
|
+
if (escaped) escaped = false;
|
|
888
|
+
else if (c === '\\') escaped = true;
|
|
889
|
+
else if (c === '"') quoted = false;
|
|
890
|
+
} else if (c === '"') quoted = true;
|
|
891
|
+
else if (c === '[' || c === '{') depth++;
|
|
892
|
+
else if (c === ']' || c === '}') depth--;
|
|
893
|
+
}
|
|
894
|
+
if (quoted || depth !== 0) throw new ScriptError('unterminated JSON value', line);
|
|
895
|
+
if (token) words.push(token);
|
|
896
|
+
return words;
|
|
897
|
+
}
|