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,493 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { relative, resolve } from "node:path";
|
|
3
|
+
import "animl/all";
|
|
4
|
+
import {
|
|
5
|
+
COMMON,
|
|
6
|
+
DOC,
|
|
7
|
+
ELEMENTS,
|
|
8
|
+
NODE_TYPES,
|
|
9
|
+
OWN,
|
|
10
|
+
PAINT,
|
|
11
|
+
PAINTED,
|
|
12
|
+
STATIC,
|
|
13
|
+
jsonSchema,
|
|
14
|
+
markupName,
|
|
15
|
+
nodeShape
|
|
16
|
+
} from "animl";
|
|
17
|
+
import { nodeAttrs } from "animl/internal/packages/markup/src/names.js";
|
|
18
|
+
const ROOT = resolve(import.meta.dirname, "../../..");
|
|
19
|
+
const compact = (s) => s.replace(/[^a-z0-9]/gi, "").toLowerCase();
|
|
20
|
+
function distance(a, b) {
|
|
21
|
+
let row = Array.from({ length: b.length + 1 }, (_, i) => i);
|
|
22
|
+
for (let i = 0; i < a.length; i++) {
|
|
23
|
+
const next = [i + 1];
|
|
24
|
+
for (let j = 0; j < b.length; j++)
|
|
25
|
+
next.push(Math.min(next[j] + 1, row[j + 1] + 1, row[j] + Number(a[i] !== b[j])));
|
|
26
|
+
row = next;
|
|
27
|
+
}
|
|
28
|
+
return row[b.length];
|
|
29
|
+
}
|
|
30
|
+
function lookupTopic(topic, topics, _command) {
|
|
31
|
+
if (!topic) return topic;
|
|
32
|
+
if (topics.includes(topic)) return topic;
|
|
33
|
+
return [...topics].sort((a, b) => Number(b.includes("-")) - Number(a.includes("-"))).find((candidate) => compact(candidate) === compact(topic)) ?? topic;
|
|
34
|
+
}
|
|
35
|
+
function nearestTopic(topic, topics) {
|
|
36
|
+
const key = compact(topic);
|
|
37
|
+
const nearest = [...new Set(topics)].map((candidate) => ({ candidate, d: distance(key, compact(candidate)) })).sort((a, b) => a.d - b.d || a.candidate.localeCompare(b.candidate))[0];
|
|
38
|
+
return nearest && nearest.d <= Math.max(2, Math.floor(key.length / 3)) ? nearest.candidate : void 0;
|
|
39
|
+
}
|
|
40
|
+
const objectPaths = {
|
|
41
|
+
fill: [],
|
|
42
|
+
stroke: [],
|
|
43
|
+
anima: [],
|
|
44
|
+
meta: ["meta"],
|
|
45
|
+
color: ["colors", "*"],
|
|
46
|
+
glyph: ["glyphs", "*"],
|
|
47
|
+
hit: ["hit"],
|
|
48
|
+
timeline: ["timelines", "*"],
|
|
49
|
+
track: ["timelines", "*", "tracks"],
|
|
50
|
+
event: ["timelines", "*", "events", "*"],
|
|
51
|
+
layer: ["machine", "layers", "*"],
|
|
52
|
+
state: ["machine", "layers", "*", "states", "*"],
|
|
53
|
+
pose: ["machine", "layers", "*", "states", "*", "pose"],
|
|
54
|
+
ease: ["machine", "layers", "*", "states", "*", "on", "*", "ease"],
|
|
55
|
+
on: ["machine", "layers", "*", "states", "*", "on", "*"],
|
|
56
|
+
bool: ["inputs", "*"],
|
|
57
|
+
number: ["inputs", "*"],
|
|
58
|
+
trigger: ["inputs", "*"],
|
|
59
|
+
transition: ["machine", "layers", "*", "states", "*", "on", "*"],
|
|
60
|
+
listener: ["listeners", "*"],
|
|
61
|
+
input: ["inputs", "*"]
|
|
62
|
+
};
|
|
63
|
+
function markupLabel(shape, key) {
|
|
64
|
+
const name = markupName(shape, key);
|
|
65
|
+
if (name) return name;
|
|
66
|
+
if (shape?.element === "layout-item") return "(no attribute; use layout-* attributes)";
|
|
67
|
+
if (shape?.element) return "(no attribute; use <" + shape.element + ">)";
|
|
68
|
+
return "(no markup attribute)";
|
|
69
|
+
}
|
|
70
|
+
function objectPreview(shape) {
|
|
71
|
+
const entries = Object.entries(shape.p);
|
|
72
|
+
const shown = entries.slice(0, 6).map(([key, value]) => key + (value.k === "arr" ? "[]" : ""));
|
|
73
|
+
return "{ " + shown.join(", ") + (entries.length > shown.length ? ", \u2026" : "") + " }";
|
|
74
|
+
}
|
|
75
|
+
function shortShape(shape) {
|
|
76
|
+
switch (shape.k) {
|
|
77
|
+
case "str":
|
|
78
|
+
return shape.of ? shape.of.map((v) => JSON.stringify(v)).join(" | ") : "string";
|
|
79
|
+
case "num":
|
|
80
|
+
return "number";
|
|
81
|
+
case "bool":
|
|
82
|
+
return "bool";
|
|
83
|
+
case "any":
|
|
84
|
+
return "any";
|
|
85
|
+
case "node":
|
|
86
|
+
return "node";
|
|
87
|
+
case "alt":
|
|
88
|
+
return shape.of.map(shortShape).join(" | ");
|
|
89
|
+
case "tup":
|
|
90
|
+
return "[" + shape.of.map(shortShape).join(", ") + "]";
|
|
91
|
+
case "map":
|
|
92
|
+
return "map<" + shortShape(shape.of) + ">";
|
|
93
|
+
case "arr":
|
|
94
|
+
return shape.of.k === "obj" ? objectPreview(shape.of) + "[]" : "array<" + shortShape(shape.of) + ">";
|
|
95
|
+
case "obj":
|
|
96
|
+
return objectPreview(shape);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function shapeAt(path, root = DOC) {
|
|
100
|
+
let shape = root;
|
|
101
|
+
for (const key of path) {
|
|
102
|
+
if (shape.k === "obj") shape = shape.p[key];
|
|
103
|
+
else if (shape.k === "map" || shape.k === "arr") shape = shape.of;
|
|
104
|
+
else throw new Error("invalid schema registry path");
|
|
105
|
+
}
|
|
106
|
+
return shape;
|
|
107
|
+
}
|
|
108
|
+
function fields(path, root = DOC, topicName) {
|
|
109
|
+
let shape = shapeAt(path, root);
|
|
110
|
+
if (shape.k !== "obj") {
|
|
111
|
+
const p = shape.k === "map" ? { "<address>": shape.of } : shape.k === "tup" ? Object.fromEntries(shape.of.map((item, i) => [i === 0 ? "at" : "name", item])) : { [topicName === "ease" ? "curve" : "value"]: shape };
|
|
112
|
+
shape = { k: "obj", p };
|
|
113
|
+
}
|
|
114
|
+
return Object.entries(shape.p).map(([key, value]) => {
|
|
115
|
+
const composite = value.k === "obj" || value.k === "arr" && value.of.k === "obj";
|
|
116
|
+
return {
|
|
117
|
+
markup: markupLabel(value, key),
|
|
118
|
+
ani: key,
|
|
119
|
+
type: shortShape(value),
|
|
120
|
+
required: shape.req?.includes(key) ?? false,
|
|
121
|
+
...value.default !== void 0 ? { default: value.default } : {},
|
|
122
|
+
...value.feature ?? shape.feature ? { feature: value.feature ?? shape.feature } : {},
|
|
123
|
+
...value.description ? { description: value.description } : {},
|
|
124
|
+
...value.k === "num" && value.min !== void 0 ? { min: value.min } : {},
|
|
125
|
+
...composite ? { details: topicName ? topicName + "." + key : key } : {}
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const props = (rec) => Object.entries(rec).map(([name, prop]) => ({
|
|
130
|
+
name,
|
|
131
|
+
type: prop.type,
|
|
132
|
+
default: prop.def ?? null,
|
|
133
|
+
...prop.min !== void 0 ? { min: prop.min } : {},
|
|
134
|
+
...prop.max !== void 0 ? { max: prop.max } : {},
|
|
135
|
+
animatable: true,
|
|
136
|
+
...prop.feature ? { feature: prop.feature } : {}
|
|
137
|
+
}));
|
|
138
|
+
const spellings = (type, paint) => nodeAttrs(type).filter((attr) => (!paint || attr.path[0] === paint) && attr.attr !== attr.path.join(".")).map((attr) => ({ markup: attr.attr, ani: attr.path.join(".") }));
|
|
139
|
+
function typeInfo(type) {
|
|
140
|
+
return {
|
|
141
|
+
type,
|
|
142
|
+
fields: fields([], nodeShape(type), type),
|
|
143
|
+
spellings: spellings(type),
|
|
144
|
+
animatable: props({ ...COMMON, ...OWN[type] }),
|
|
145
|
+
static: [
|
|
146
|
+
"id",
|
|
147
|
+
"type",
|
|
148
|
+
"pivot",
|
|
149
|
+
...Object.keys(STATIC[type]),
|
|
150
|
+
...PAINTED.includes(type) ? ["fill", "stroke", "knockout"] : []
|
|
151
|
+
]
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function schemaTopics() {
|
|
155
|
+
const structural = [nodeShape("path").p, DOC.p].flatMap(
|
|
156
|
+
(record) => Object.entries(record).filter(([, value]) => value.k === "obj" || value.k === "arr" && value.of.k === "obj").map(([key, value]) => markupName(value, key) || key)
|
|
157
|
+
);
|
|
158
|
+
return [
|
|
159
|
+
.../* @__PURE__ */ new Set([
|
|
160
|
+
...NODE_TYPES,
|
|
161
|
+
...Object.keys(ELEMENTS),
|
|
162
|
+
...structural,
|
|
163
|
+
...Object.keys(objectPaths),
|
|
164
|
+
"a11y",
|
|
165
|
+
"fill",
|
|
166
|
+
"stroke"
|
|
167
|
+
])
|
|
168
|
+
].filter(Boolean);
|
|
169
|
+
}
|
|
170
|
+
function schemaTopic(topic) {
|
|
171
|
+
if (!topic) return topic;
|
|
172
|
+
const form = Object.entries(ELEMENTS).find(([, candidate]) => candidate.values?.kind === topic);
|
|
173
|
+
if (form) topic = form[0];
|
|
174
|
+
const [head, ...tail] = topic.split(".");
|
|
175
|
+
return [lookupTopic(head, schemaTopics(), "schema"), ...tail].join(".");
|
|
176
|
+
}
|
|
177
|
+
function nodeFieldFor(topic) {
|
|
178
|
+
return Object.entries(nodeShape("path").p).find(
|
|
179
|
+
([key, value]) => key === topic || markupName(value, key) === topic
|
|
180
|
+
)?.[1] ?? DOC.p[topic];
|
|
181
|
+
}
|
|
182
|
+
function schemaData(topic) {
|
|
183
|
+
const nodeField = nodeFieldFor(topic);
|
|
184
|
+
const compositeField = nodeField && (nodeField.k === "arr" ? { ...nodeField.of, feature: nodeField.feature } : nodeField);
|
|
185
|
+
const objectFields = Object.hasOwn(objectPaths, topic) ? fields(
|
|
186
|
+
objectPaths[topic],
|
|
187
|
+
topic === "fill" || topic === "stroke" ? nodeShape("path").p[topic] : DOC,
|
|
188
|
+
topic
|
|
189
|
+
) : ELEMENTS[topic] ? fields([], ELEMENTS[topic].shape, topic) : compositeField && compositeField.k === "obj" && !NODE_TYPES.includes(topic) ? fields([], compositeField, topic) : void 0;
|
|
190
|
+
if (topic === "a11y")
|
|
191
|
+
return {
|
|
192
|
+
topic,
|
|
193
|
+
scope: "node.a11y",
|
|
194
|
+
fields: fields([], nodeShape("path").p.a11y, topic),
|
|
195
|
+
actions: ["tap", "increase", "decrease", "focus"],
|
|
196
|
+
root: { scope: "doc.a11y (root icon semantics)", fields: fields(["a11y"], DOC, topic) }
|
|
197
|
+
};
|
|
198
|
+
if (objectFields)
|
|
199
|
+
return {
|
|
200
|
+
topic,
|
|
201
|
+
fields: objectFields,
|
|
202
|
+
...topic === "fill" || topic === "stroke" ? {
|
|
203
|
+
[topic]: props(PAINT[topic]),
|
|
204
|
+
spellings: spellings("path", topic),
|
|
205
|
+
static: objectFields.filter((field) => !(field.ani in PAINT[topic])).map((field) => field.ani)
|
|
206
|
+
} : {}
|
|
207
|
+
};
|
|
208
|
+
if (NODE_TYPES.includes(topic))
|
|
209
|
+
return typeInfo(topic);
|
|
210
|
+
return void 0;
|
|
211
|
+
}
|
|
212
|
+
function allSchemaData() {
|
|
213
|
+
return {
|
|
214
|
+
nodeTypes: NODE_TYPES.map(typeInfo),
|
|
215
|
+
paint: { fill: props(PAINT.fill), stroke: props(PAINT.stroke) },
|
|
216
|
+
paintFields: {
|
|
217
|
+
fill: fields([], nodeShape("path").p.fill, "fill"),
|
|
218
|
+
stroke: fields([], nodeShape("path").p.stroke, "stroke")
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function topicFeature(topic, data) {
|
|
223
|
+
if (NODE_TYPES.includes(topic)) return "core";
|
|
224
|
+
if (topic === "fill" || topic === "stroke") return "core";
|
|
225
|
+
const features = /* @__PURE__ */ new Set();
|
|
226
|
+
const take = (feature) => {
|
|
227
|
+
for (const name of String(feature ?? "").split("|")) if (name) features.add(name);
|
|
228
|
+
};
|
|
229
|
+
take(ELEMENTS[topic]?.shape.feature);
|
|
230
|
+
for (const field of data?.fields ?? []) take(field.feature);
|
|
231
|
+
if (!features.size) take(nodeFieldFor(topic)?.feature);
|
|
232
|
+
return [...features].sort().join(", ") || "core";
|
|
233
|
+
}
|
|
234
|
+
function exampleFiles() {
|
|
235
|
+
const result = [];
|
|
236
|
+
const visit = (dir) => {
|
|
237
|
+
if (!existsSync(dir)) return;
|
|
238
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
239
|
+
const path = resolve(dir, entry.name);
|
|
240
|
+
if (entry.isDirectory()) visit(path);
|
|
241
|
+
else if (entry.isFile() && entry.name.endsWith(".animl") && (path.includes("/examples/") || path.includes("/capabilities/")))
|
|
242
|
+
result.push(relative(ROOT, path));
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
visit(resolve(ROOT, "examples"));
|
|
246
|
+
visit(resolve(ROOT, "modules"));
|
|
247
|
+
return result.sort();
|
|
248
|
+
}
|
|
249
|
+
let cachedExamples;
|
|
250
|
+
function examplesFor(topic, feature) {
|
|
251
|
+
cachedExamples ??= exampleFiles().map((path) => ({
|
|
252
|
+
path,
|
|
253
|
+
text: readFileSync(resolve(ROOT, path), "utf8")
|
|
254
|
+
}));
|
|
255
|
+
const terms = /* @__PURE__ */ new Set([topic, ...feature.split(/,\s*/).filter((name) => name !== "core")]);
|
|
256
|
+
const matches = cachedExamples.filter(({ path, text }) => {
|
|
257
|
+
for (const term of terms) {
|
|
258
|
+
if (path.startsWith("modules/" + term + "/")) return true;
|
|
259
|
+
if (text.toLowerCase().includes("<" + term.toLowerCase())) return true;
|
|
260
|
+
if (text.toLowerCase().includes(term.toLowerCase())) return true;
|
|
261
|
+
}
|
|
262
|
+
return false;
|
|
263
|
+
});
|
|
264
|
+
return matches.slice(0, 3).map((entry) => entry.path);
|
|
265
|
+
}
|
|
266
|
+
function metadata(topic, data) {
|
|
267
|
+
const page = data;
|
|
268
|
+
const requires = topicFeature(topic, page);
|
|
269
|
+
const examples = examplesFor(topic, requires);
|
|
270
|
+
return [
|
|
271
|
+
"Requires: " + requires,
|
|
272
|
+
"Docs: anima docs " + topic,
|
|
273
|
+
"Examples: " + (examples.length ? examples.join(", ") : "(none found)")
|
|
274
|
+
].join("\n");
|
|
275
|
+
}
|
|
276
|
+
function fieldLine(field, prefix = "") {
|
|
277
|
+
return " " + field.markup + " \u2194 " + prefix + field.ani + ": " + field.type + (field.required ? " (required)" : "") + ("default" in field ? " (default " + JSON.stringify(field.default) + ")" : "") + (field.feature ? " [" + field.feature + "]" : "") + (field.description ? " \u2014 " + field.description : "") + (field.details ? "; details: anima schema " + field.details : "");
|
|
278
|
+
}
|
|
279
|
+
function table(rows) {
|
|
280
|
+
return rows.map(
|
|
281
|
+
(row) => " " + row.name.padEnd(12) + " " + row.type.padEnd(7) + " default " + JSON.stringify(row.default) + (row.min !== void 0 || row.max !== void 0 ? " range [" + (row.min ?? "-\u221E") + ", " + (row.max ?? "\u221E") + "]" : "") + (row.feature ? " [" + row.feature + "]" : "")
|
|
282
|
+
).join("\n");
|
|
283
|
+
}
|
|
284
|
+
const mapping = (rows) => rows.map((row) => " " + row.markup + " \u2194 " + row.ani).join("\n");
|
|
285
|
+
function showType(data) {
|
|
286
|
+
return data.type + "\n attributes (markup \u2194 .ani: type)\n" + data.fields.map((field) => fieldLine(field)).join("\n") + "\n animatable (address: <id>.<property>)\n" + table(data.animatable) + "\n not animatable: " + data.static.join(", ") + "\n markup \u2194 .ani\n" + mapping(data.spellings) + "\n module fields\n" + data.fields.filter((field) => field.feature).map((field) => " " + field.ani + " [" + field.feature + "]").join("\n") + "\n" + metadata(data.type, data);
|
|
287
|
+
}
|
|
288
|
+
function showObject(topic, data) {
|
|
289
|
+
const prefix = topic === "fill" || topic === "stroke" ? topic + "." : "";
|
|
290
|
+
let text = topic + " (markup \u2194 .ani: type)\n" + data.fields.map((field) => fieldLine(field, prefix)).join("\n");
|
|
291
|
+
if (topic === "fill" || topic === "stroke")
|
|
292
|
+
text += "\n animatable (address: <id>." + topic + ".<field>)\n" + table(props(PAINT[topic]));
|
|
293
|
+
return text + "\n" + metadata(topic, data);
|
|
294
|
+
}
|
|
295
|
+
function schemaMiss(topic, io, json = false) {
|
|
296
|
+
const suggestion = nearestTopic(topic.split(".")[0], schemaTopics());
|
|
297
|
+
if (json) {
|
|
298
|
+
const suggestions = suggestion ? [suggestion] : [];
|
|
299
|
+
io.err(
|
|
300
|
+
JSON.stringify({
|
|
301
|
+
error: `no schema topic "${topic}"`,
|
|
302
|
+
suggestions,
|
|
303
|
+
help: "anima help schema"
|
|
304
|
+
})
|
|
305
|
+
);
|
|
306
|
+
return 2;
|
|
307
|
+
}
|
|
308
|
+
io.err(
|
|
309
|
+
suggestion ? 'no schema topic "' + topic + '"; did you mean "' + suggestion + '"? Try anima schema ' + suggestion + "\nSee 'anima schema --help'." : 'no schema topic "' + topic + `"
|
|
310
|
+
See 'anima schema --help'.`
|
|
311
|
+
);
|
|
312
|
+
return 2;
|
|
313
|
+
}
|
|
314
|
+
function topicIndex(json, io) {
|
|
315
|
+
const base = new Set(NODE_TYPES);
|
|
316
|
+
const rows = schemaTopics().map((topic) => ({
|
|
317
|
+
topic,
|
|
318
|
+
kind: base.has(topic) ? "node" : "object",
|
|
319
|
+
summary: base.has(topic) ? topic + " node fields, animation addresses and markup spellings" : topic + " object/element fields and markup spellings",
|
|
320
|
+
open: "anima schema " + topic
|
|
321
|
+
})).sort(
|
|
322
|
+
(a, b) => Number(a.kind !== "node") - Number(b.kind !== "node") || a.topic.localeCompare(b.topic)
|
|
323
|
+
);
|
|
324
|
+
io.out(
|
|
325
|
+
json ? JSON.stringify({ topics: rows }) : rows.map((row) => row.topic + " " + row.summary + "; open: " + row.open).join("\n")
|
|
326
|
+
);
|
|
327
|
+
return 0;
|
|
328
|
+
}
|
|
329
|
+
function schema(topic, full, json, io) {
|
|
330
|
+
if (full) {
|
|
331
|
+
io.out(JSON.stringify(jsonSchema(), null, 2));
|
|
332
|
+
return 0;
|
|
333
|
+
}
|
|
334
|
+
if (!topic) return topicIndex(json, io);
|
|
335
|
+
if (topic.includes(".")) {
|
|
336
|
+
const [head, ...path] = topic.split(".");
|
|
337
|
+
const canonical = schemaTopic(head);
|
|
338
|
+
const data2 = schemaData(canonical);
|
|
339
|
+
if (!data2) return schemaMiss(topic, io, json);
|
|
340
|
+
const key = path.join(".");
|
|
341
|
+
const field = data2.fields?.find(
|
|
342
|
+
(candidate) => candidate.ani === key || candidate.markup === key
|
|
343
|
+
);
|
|
344
|
+
if (!field) {
|
|
345
|
+
if (json)
|
|
346
|
+
io.err(
|
|
347
|
+
JSON.stringify({
|
|
348
|
+
error: `unknown schema field ${topic}`,
|
|
349
|
+
suggestions: [],
|
|
350
|
+
help: `anima schema ${canonical}`
|
|
351
|
+
})
|
|
352
|
+
);
|
|
353
|
+
else io.err("unknown schema field " + topic + "\nSee 'anima schema " + canonical + "'.");
|
|
354
|
+
return 2;
|
|
355
|
+
}
|
|
356
|
+
io.out(JSON.stringify({ topic, ...field }));
|
|
357
|
+
return 0;
|
|
358
|
+
}
|
|
359
|
+
topic = schemaTopic(topic);
|
|
360
|
+
const data = topic ? schemaData(topic) : void 0;
|
|
361
|
+
if (!topic || !data) return schemaMiss(topic ?? "", io, json);
|
|
362
|
+
if (json) {
|
|
363
|
+
io.out(JSON.stringify(data));
|
|
364
|
+
return 0;
|
|
365
|
+
}
|
|
366
|
+
if (topic === "a11y") {
|
|
367
|
+
const a11y = data;
|
|
368
|
+
const rows = a11y.fields.map((field) => fieldLine(field)).join("\n");
|
|
369
|
+
const rootRows = a11y.root.fields.map((field) => fieldLine(field)).join("\n");
|
|
370
|
+
io.out(
|
|
371
|
+
"node.a11y (node semantics; markup \u2194 .ani: type)\n" + rows + "\nActions: tap, increase, decrease, focus\n\ndoc.a11y (root icon semantics; markup \u2194 .ani: type)\n" + rootRows + "\n" + metadata(topic, data)
|
|
372
|
+
);
|
|
373
|
+
return 0;
|
|
374
|
+
}
|
|
375
|
+
if (NODE_TYPES.includes(topic))
|
|
376
|
+
io.out(showType(data));
|
|
377
|
+
else io.out(showObject(topic, data));
|
|
378
|
+
return 0;
|
|
379
|
+
}
|
|
380
|
+
function schemaAll(json, io) {
|
|
381
|
+
if (json) {
|
|
382
|
+
io.out(JSON.stringify(allSchemaData()));
|
|
383
|
+
return 0;
|
|
384
|
+
}
|
|
385
|
+
const pages = schemaTopics().map((topic) => {
|
|
386
|
+
const data = schemaData(topic);
|
|
387
|
+
if (!data) return "";
|
|
388
|
+
return NODE_TYPES.includes(topic) ? showType(data) : showObject(topic, data);
|
|
389
|
+
}).filter(Boolean);
|
|
390
|
+
io.out(pages.join("\n\n"));
|
|
391
|
+
return 0;
|
|
392
|
+
}
|
|
393
|
+
function schemaSearch(words, json, io) {
|
|
394
|
+
if (!words.trim()) {
|
|
395
|
+
io.err("--search needs at least one word\nSee 'anima schema --help'.");
|
|
396
|
+
return 2;
|
|
397
|
+
}
|
|
398
|
+
const entries = [];
|
|
399
|
+
for (const topic of schemaTopics()) {
|
|
400
|
+
const data = schemaData(topic);
|
|
401
|
+
if (!data) continue;
|
|
402
|
+
entries.push({ name: topic, description: "registry topic " + topic, kind: "type" });
|
|
403
|
+
for (const field of data.fields ?? []) {
|
|
404
|
+
if (field.markup !== field.ani)
|
|
405
|
+
entries.push({
|
|
406
|
+
name: topic + "." + field.markup,
|
|
407
|
+
description: [field.description, field.type, field.ani].filter(Boolean).join(" "),
|
|
408
|
+
kind: "field"
|
|
409
|
+
});
|
|
410
|
+
entries.push({
|
|
411
|
+
name: topic + "." + field.ani,
|
|
412
|
+
description: [field.description, field.type, field.markup].filter(Boolean).join(" "),
|
|
413
|
+
kind: "field"
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
const spec = readFileSync(resolve(ROOT, "spec/SPEC.md"), "utf8");
|
|
418
|
+
for (const match of spec.matchAll(/^\| \x60([^\x60]+)\x60 \| (?:error|warning) \| (.+) \|$/gm))
|
|
419
|
+
entries.push({ name: match[1], description: match[2], kind: "diagnostic" });
|
|
420
|
+
const terms = words.toLowerCase().trim().split(/\s+/);
|
|
421
|
+
const results = entries.map((entry) => ({
|
|
422
|
+
...entry,
|
|
423
|
+
score: terms.reduce(
|
|
424
|
+
(score, term) => score + (entry.name.toLowerCase() === term ? 100 : entry.name.toLowerCase().includes(term) ? 10 : entry.description.toLowerCase().includes(term) ? 1 : 0),
|
|
425
|
+
0
|
|
426
|
+
)
|
|
427
|
+
})).filter((entry) => entry.score > 0).sort((a, b) => b.score - a.score || a.name.localeCompare(b.name));
|
|
428
|
+
io.out(
|
|
429
|
+
json ? JSON.stringify({ results }) : results.map((entry) => entry.name + " " + entry.kind + " " + entry.description).join("\n")
|
|
430
|
+
);
|
|
431
|
+
return 0;
|
|
432
|
+
}
|
|
433
|
+
function filteredSchema(topic, options, json, io) {
|
|
434
|
+
if (options["editor-only"]) {
|
|
435
|
+
const result2 = { applicable: false, reason: "Anima has no editor-only entries", fields: [] };
|
|
436
|
+
io.out(json ? JSON.stringify(result2) : result2.reason);
|
|
437
|
+
return 0;
|
|
438
|
+
}
|
|
439
|
+
topic = schemaTopic(topic);
|
|
440
|
+
const nodeRows = (type, info) => info.fields.map((field) => {
|
|
441
|
+
const prop = COMMON[field.ani] ?? OWN[type][field.ani];
|
|
442
|
+
return {
|
|
443
|
+
...field,
|
|
444
|
+
animatable: !!prop,
|
|
445
|
+
bindable: !!prop,
|
|
446
|
+
inherited: Object.hasOwn(COMMON, field.ani)
|
|
447
|
+
};
|
|
448
|
+
});
|
|
449
|
+
let rows;
|
|
450
|
+
if (!topic)
|
|
451
|
+
rows = NODE_TYPES.flatMap(
|
|
452
|
+
(type) => nodeRows(type, typeInfo(type)).map((field) => ({ ...field, ani: type + "." + field.ani }))
|
|
453
|
+
);
|
|
454
|
+
else if (NODE_TYPES.includes(topic))
|
|
455
|
+
rows = nodeRows(topic, typeInfo(topic));
|
|
456
|
+
else if (topic.includes(".")) {
|
|
457
|
+
const [type, key] = topic.split(".");
|
|
458
|
+
if (!NODE_TYPES.includes(type)) return schemaMiss(topic, io, json);
|
|
459
|
+
const data = schemaData(type);
|
|
460
|
+
const field = data.fields.find(
|
|
461
|
+
(candidate) => candidate.ani === key || candidate.markup === key
|
|
462
|
+
);
|
|
463
|
+
if (!field) return schemaMiss(topic, io, json);
|
|
464
|
+
rows = nodeRows(type, { fields: [field] });
|
|
465
|
+
} else {
|
|
466
|
+
const data = schemaData(topic);
|
|
467
|
+
if (!data) return schemaMiss(topic, io, json);
|
|
468
|
+
rows = (data.fields ?? []).map((field) => ({
|
|
469
|
+
...field,
|
|
470
|
+
animatable: !!PAINT[topic]?.[field.ani],
|
|
471
|
+
bindable: !!PAINT[topic]?.[field.ani],
|
|
472
|
+
inherited: false
|
|
473
|
+
}));
|
|
474
|
+
}
|
|
475
|
+
const result = rows.filter(
|
|
476
|
+
(field) => (!options.animatable || field.animatable) && (!options.bindable || field.bindable) && (!options.inherited || field.inherited)
|
|
477
|
+
);
|
|
478
|
+
io.out(
|
|
479
|
+
json ? JSON.stringify({ topic, fields: result }) : result.map(
|
|
480
|
+
(field) => field.ani + ": " + field.type + "; animatable=" + field.animatable + " bindable=" + field.bindable + " inherited=" + field.inherited
|
|
481
|
+
).join("\n")
|
|
482
|
+
);
|
|
483
|
+
return 0;
|
|
484
|
+
}
|
|
485
|
+
export {
|
|
486
|
+
distance,
|
|
487
|
+
filteredSchema,
|
|
488
|
+
lookupTopic,
|
|
489
|
+
schema,
|
|
490
|
+
schemaAll,
|
|
491
|
+
schemaSearch,
|
|
492
|
+
schemaTopic
|
|
493
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Model } from 'animl';
|
|
2
|
+
import { type ScriptOptions } from 'animl/internal/packages/core/src/script.js';
|
|
3
|
+
export interface SessionIO {
|
|
4
|
+
out(s: string): void;
|
|
5
|
+
input?: AsyncIterable<string>;
|
|
6
|
+
}
|
|
7
|
+
/** One JSON reply per input line, including errors, without restarting the interpreter. */
|
|
8
|
+
export declare function session(load: () => Model | undefined | Promise<Model | undefined>, io: SessionIO, opts?: ScriptOptions): Promise<number>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { createInterface } from "node:readline";
|
|
2
|
+
import { createScriptSession, ScriptError } from "animl/internal/packages/core/src/script.js";
|
|
3
|
+
async function session(load, io, opts = {}) {
|
|
4
|
+
let model = await load();
|
|
5
|
+
if (!model) {
|
|
6
|
+
io.out(
|
|
7
|
+
JSON.stringify({
|
|
8
|
+
ok: false,
|
|
9
|
+
diagnostics: [
|
|
10
|
+
{
|
|
11
|
+
code: "session-load",
|
|
12
|
+
pointer: "",
|
|
13
|
+
message: "cannot load session document",
|
|
14
|
+
hint: "validate the file, fix diagnostics and start the session again"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
return 1;
|
|
20
|
+
}
|
|
21
|
+
let engine = createScriptSession(model, opts);
|
|
22
|
+
const lines = io.input ?? createInterface({ input: process.stdin, crlfDelay: Infinity });
|
|
23
|
+
for await (const raw of lines) {
|
|
24
|
+
try {
|
|
25
|
+
let cmd = raw.trim();
|
|
26
|
+
if (cmd.startsWith("{")) {
|
|
27
|
+
const request = JSON.parse(cmd);
|
|
28
|
+
if (!request || typeof request !== "object" || !("cmd" in request) || typeof request.cmd !== "string")
|
|
29
|
+
throw new ScriptError("JSON request needs a string cmd", 1);
|
|
30
|
+
cmd = request.cmd;
|
|
31
|
+
}
|
|
32
|
+
if (cmd.includes("\n") || cmd.includes("\r"))
|
|
33
|
+
throw new ScriptError("one command per request", 1);
|
|
34
|
+
if (cmd === "quit") {
|
|
35
|
+
io.out(JSON.stringify({ ok: true, quit: true }));
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
if (cmd === "reload") {
|
|
39
|
+
const saved = model.doc.requires?.includes("data") ? engine.dataValues() : {};
|
|
40
|
+
const next = await load();
|
|
41
|
+
if (!next) {
|
|
42
|
+
io.out(
|
|
43
|
+
JSON.stringify({
|
|
44
|
+
ok: false,
|
|
45
|
+
diagnostics: [
|
|
46
|
+
{
|
|
47
|
+
code: "session-reload",
|
|
48
|
+
pointer: "",
|
|
49
|
+
message: "reload failed",
|
|
50
|
+
hint: "fix the file and retry reload"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const replacement = createScriptSession(next, opts);
|
|
58
|
+
const restored = [], skipped = [];
|
|
59
|
+
for (const [path, value] of Object.entries(saved)) {
|
|
60
|
+
try {
|
|
61
|
+
replacement.execute(`data set ${path} ${JSON.stringify(value)}`);
|
|
62
|
+
restored.push(path);
|
|
63
|
+
} catch {
|
|
64
|
+
skipped.push(path);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
replacement.execute("advance 0");
|
|
68
|
+
model = next;
|
|
69
|
+
engine = replacement;
|
|
70
|
+
io.out(JSON.stringify({ ok: true, reloaded: true, restored, skipped }));
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const result = engine.execute(cmd);
|
|
74
|
+
io.out(JSON.stringify({ ok: result.diagnostics.length === 0, ...result }));
|
|
75
|
+
} catch (error) {
|
|
76
|
+
const e = error;
|
|
77
|
+
io.out(
|
|
78
|
+
JSON.stringify({
|
|
79
|
+
ok: false,
|
|
80
|
+
diagnostics: [
|
|
81
|
+
{
|
|
82
|
+
code: e.code ?? "session-command",
|
|
83
|
+
pointer: e.pointer ?? "",
|
|
84
|
+
message: e.message,
|
|
85
|
+
hint: e.hint ?? 'send a script command or {"cmd":"\u2026"}'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
session
|
|
96
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const ALIASES = {
|
|
2
|
+
check: "validate",
|
|
3
|
+
lint: "validate",
|
|
4
|
+
show: "render",
|
|
5
|
+
draw: "render",
|
|
6
|
+
find: "search",
|
|
7
|
+
grep: "search",
|
|
8
|
+
topics: "docs"
|
|
9
|
+
};
|
|
10
|
+
function resolveAlias(word) {
|
|
11
|
+
return ALIASES[word];
|
|
12
|
+
}
|
|
13
|
+
function compact(word) {
|
|
14
|
+
return word.replace(/^--?/, "").toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
function distance(source, target) {
|
|
17
|
+
const a = compact(source);
|
|
18
|
+
const b = compact(target);
|
|
19
|
+
const rows = Array.from({ length: a.length + 1 }, () => Array(b.length + 1).fill(0));
|
|
20
|
+
for (let i = 0; i <= a.length; i++) rows[i][0] = i;
|
|
21
|
+
for (let j = 0; j <= b.length; j++) rows[0][j] = j * 1.5;
|
|
22
|
+
for (let i = 1; i <= a.length; i++) {
|
|
23
|
+
for (let j = 1; j <= b.length; j++) {
|
|
24
|
+
const substitution = a[i - 1] === b[j - 1] ? 0 : 1.5;
|
|
25
|
+
let best = Math.min(
|
|
26
|
+
rows[i - 1][j] + 1,
|
|
27
|
+
rows[i][j - 1] + 1.5,
|
|
28
|
+
rows[i - 1][j - 1] + substitution
|
|
29
|
+
);
|
|
30
|
+
if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1])
|
|
31
|
+
best = Math.min(best, rows[i - 2][j - 2]);
|
|
32
|
+
rows[i][j] = best;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return rows[a.length][b.length];
|
|
36
|
+
}
|
|
37
|
+
function cutoff(word) {
|
|
38
|
+
const n = compact(word).length;
|
|
39
|
+
if (n <= 2) return 0.75;
|
|
40
|
+
if (n <= 4) return 1.6;
|
|
41
|
+
return Math.min(3.25, 1.1 + n * 0.3);
|
|
42
|
+
}
|
|
43
|
+
function suggest(word, candidates) {
|
|
44
|
+
const alias = resolveAlias(compact(word));
|
|
45
|
+
if (alias && candidates.includes(alias)) return [alias];
|
|
46
|
+
const needle = compact(word);
|
|
47
|
+
const ranked = candidates.map((candidate) => {
|
|
48
|
+
const name = compact(candidate);
|
|
49
|
+
const prefix = name.startsWith(needle) || needle.startsWith(name);
|
|
50
|
+
return { candidate, prefix, score: distance(word, candidate) };
|
|
51
|
+
}).filter(({ score, prefix }) => prefix || score <= cutoff(word)).sort(
|
|
52
|
+
(a, b) => Number(b.prefix) - Number(a.prefix) || a.score - b.score || a.candidate.localeCompare(b.candidate)
|
|
53
|
+
);
|
|
54
|
+
if (!ranked.length) return [];
|
|
55
|
+
const best = ranked[0].score;
|
|
56
|
+
return ranked.filter(({ prefix, score }) => prefix || score <= best + 0.75).slice(0, 3).map(({ candidate }) => candidate);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
ALIASES,
|
|
60
|
+
resolveAlias,
|
|
61
|
+
suggest
|
|
62
|
+
};
|