animl-cli 0.0.0-stage → 0.1.1
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 +25 -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 +58 -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,279 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import "animl/all";
|
|
4
|
+
import { ELEMENTS, NODE_TYPES } from "animl";
|
|
5
|
+
import { distance } from "./schema-view.js";
|
|
6
|
+
const ROOT = resolve(import.meta.dirname, "../../..");
|
|
7
|
+
const read = (path) => readFileSync(resolve(ROOT, path), "utf8");
|
|
8
|
+
const compact = (value) => value.replace(/[^a-z0-9]/gi, "").toLowerCase();
|
|
9
|
+
const slug = (title) => title.toLowerCase().replace(/^[0-9]+(?:\.[0-9]+)*[.\s-]*/, "").replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
10
|
+
function headings(source, levels = [2, 3]) {
|
|
11
|
+
return [...source.matchAll(/^(#{2,6}) (.+)$/gm)].map((match) => ({
|
|
12
|
+
level: match[1].length,
|
|
13
|
+
title: match[2],
|
|
14
|
+
slug: slug(match[2]),
|
|
15
|
+
at: match.index
|
|
16
|
+
})).filter((entry) => levels.includes(entry.level));
|
|
17
|
+
}
|
|
18
|
+
function section(source, entry, entries = headings(source)) {
|
|
19
|
+
const next = entries.find(
|
|
20
|
+
(candidate) => candidate.at > entry.at && candidate.level <= entry.level
|
|
21
|
+
);
|
|
22
|
+
return source.slice(entry.at, next?.at ?? source.length).trim();
|
|
23
|
+
}
|
|
24
|
+
function nearest(word, candidates) {
|
|
25
|
+
const key = compact(word);
|
|
26
|
+
const first = [...new Set(candidates)].map((candidate) => ({ candidate, d: distance(key, compact(candidate)) })).sort((a, b) => a.d - b.d || a.candidate.localeCompare(b.candidate))[0];
|
|
27
|
+
return first && first.d <= Math.max(2, Math.floor(key.length / 3)) ? first.candidate : void 0;
|
|
28
|
+
}
|
|
29
|
+
function moduleDocs() {
|
|
30
|
+
return new Map(
|
|
31
|
+
readdirSync(resolve(ROOT, "modules"), { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => [
|
|
32
|
+
entry.name,
|
|
33
|
+
["AUTHORING.md", "SPEC.md"].map((file) => "modules/" + entry.name + "/" + file).filter((file) => existsSync(resolve(ROOT, file)))
|
|
34
|
+
])
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function parityRows() {
|
|
38
|
+
return JSON.parse(read("docs/parity/inventory.json"));
|
|
39
|
+
}
|
|
40
|
+
function resolveHeadingForWord(source, word) {
|
|
41
|
+
const entries = headings(source);
|
|
42
|
+
const key = compact(word);
|
|
43
|
+
const bySlug = entries.find(
|
|
44
|
+
(entry) => compact(entry.slug) === key || compact(entry.title) === key
|
|
45
|
+
);
|
|
46
|
+
if (bySlug) return bySlug;
|
|
47
|
+
const lower = source.toLowerCase();
|
|
48
|
+
const terms = [word, word.replace(/[A-Z]/g, (letter) => "-" + letter.toLowerCase())];
|
|
49
|
+
let at = -1;
|
|
50
|
+
for (const term of terms) {
|
|
51
|
+
const index = lower.indexOf(term.toLowerCase());
|
|
52
|
+
if (index >= 0 && (at < 0 || index < at)) at = index;
|
|
53
|
+
}
|
|
54
|
+
if (at < 0) return void 0;
|
|
55
|
+
return entries.filter((entry) => entry.at <= at).at(-1);
|
|
56
|
+
}
|
|
57
|
+
function resolver() {
|
|
58
|
+
const guide = read("docs/AUTHORING.md") + "\n\n" + read("packages/cli/src/font/README.md");
|
|
59
|
+
const spec = read("spec/SPEC.md");
|
|
60
|
+
const modules = moduleDocs();
|
|
61
|
+
const guideHeadings = headings(guide);
|
|
62
|
+
const specHeadings = headings(spec);
|
|
63
|
+
const moduleNames = [...modules.keys()];
|
|
64
|
+
const aliases = {
|
|
65
|
+
constraint: "rig",
|
|
66
|
+
constraints: "rig",
|
|
67
|
+
semantic: "a11y",
|
|
68
|
+
semantics: "a11y",
|
|
69
|
+
accessibility: "a11y",
|
|
70
|
+
a11y: "a11y"
|
|
71
|
+
};
|
|
72
|
+
const canonicalModule = (word) => moduleNames.find((name) => compact(name) === compact(word));
|
|
73
|
+
const resolve2 = (word) => {
|
|
74
|
+
if (word === "authoring") return { kind: "authoring", topic: "authoring" };
|
|
75
|
+
if (word === "spec") return { kind: "spec", topic: "spec" };
|
|
76
|
+
if (word === "markup") return { kind: "markup", topic: "markup" };
|
|
77
|
+
const alias = aliases[word] ?? aliases[compact(word)];
|
|
78
|
+
if (alias && alias !== word) return resolve2(alias);
|
|
79
|
+
const module = canonicalModule(word);
|
|
80
|
+
if (module) return { kind: "module", topic: module };
|
|
81
|
+
const guideHeading = guideHeadings.find(
|
|
82
|
+
(entry) => compact(entry.slug) === compact(word) || compact(entry.title) === compact(word)
|
|
83
|
+
);
|
|
84
|
+
if (guideHeading)
|
|
85
|
+
return { kind: "guide-section", topic: guideHeading.slug, heading: guideHeading };
|
|
86
|
+
const specHeading = specHeadings.find(
|
|
87
|
+
(entry) => compact(entry.slug) === compact(word) || compact(entry.title) === compact(word)
|
|
88
|
+
);
|
|
89
|
+
if (specHeading) return { kind: "spec-section", topic: specHeading.slug, heading: specHeading };
|
|
90
|
+
const row = parityRows().find((candidate) => compact(candidate.id) === compact(word));
|
|
91
|
+
if (row) {
|
|
92
|
+
const suffix = row.id.split(".").at(-1);
|
|
93
|
+
const suffixResolved = resolve2(suffix);
|
|
94
|
+
if (suffixResolved) return suffixResolved;
|
|
95
|
+
if (row.anima?.module) {
|
|
96
|
+
const moduleResolved = resolve2(row.anima.module);
|
|
97
|
+
if (moduleResolved) return moduleResolved;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const element = Object.entries(ELEMENTS).find(
|
|
101
|
+
([name, form]) => compact(name) === compact(word) || form.values?.kind && compact(form.values.kind) === compact(word)
|
|
102
|
+
);
|
|
103
|
+
if (element) {
|
|
104
|
+
const heading2 = resolveHeadingForWord(spec, element[0]) ?? resolveHeadingForWord(spec, word);
|
|
105
|
+
if (heading2) return { kind: "spec-section", topic: heading2.slug, heading: heading2 };
|
|
106
|
+
const feature = element[1].shape.feature;
|
|
107
|
+
if (feature) {
|
|
108
|
+
const featureResolved = resolve2(String(feature).split("|")[0]);
|
|
109
|
+
if (featureResolved) return featureResolved;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (NODE_TYPES.some((name) => compact(name) === compact(word))) {
|
|
113
|
+
const heading2 = resolveHeadingForWord(spec, word);
|
|
114
|
+
if (heading2) return { kind: "spec-section", topic: heading2.slug, heading: heading2 };
|
|
115
|
+
}
|
|
116
|
+
const heading = resolveHeadingForWord(spec, word);
|
|
117
|
+
if (heading) return { kind: "spec-section", topic: heading.slug, heading };
|
|
118
|
+
return void 0;
|
|
119
|
+
};
|
|
120
|
+
const candidates = [
|
|
121
|
+
"authoring",
|
|
122
|
+
"spec",
|
|
123
|
+
"markup",
|
|
124
|
+
...guideHeadings.map((entry) => entry.slug),
|
|
125
|
+
...specHeadings.map((entry) => entry.slug),
|
|
126
|
+
...moduleNames,
|
|
127
|
+
...Object.keys(aliases),
|
|
128
|
+
...Object.keys(ELEMENTS),
|
|
129
|
+
...Object.values(ELEMENTS).map((form) => form.values?.kind).filter((value) => !!value),
|
|
130
|
+
...NODE_TYPES,
|
|
131
|
+
...parityRows().map((row) => row.id)
|
|
132
|
+
];
|
|
133
|
+
return { guide, spec, modules, guideHeadings, specHeadings, resolve: resolve2, candidates };
|
|
134
|
+
}
|
|
135
|
+
function moduleText(topic, spec, modules) {
|
|
136
|
+
const specEntries = headings(spec, [2]);
|
|
137
|
+
const chapter = specEntries.find((entry) => compact(entry.title) === compact(topic));
|
|
138
|
+
let text = chapter ? section(spec, chapter, specEntries) : "";
|
|
139
|
+
for (const file of modules.get(topic) ?? []) {
|
|
140
|
+
const body = read(file).trim();
|
|
141
|
+
text += "\n\n" + (chapter ? body.replace(/^#/gm, "###") : body);
|
|
142
|
+
}
|
|
143
|
+
const examples = resolve(ROOT, "modules", topic, "examples");
|
|
144
|
+
if (existsSync(examples)) {
|
|
145
|
+
const files = readdirSync(examples).filter((file) => file.endsWith(".animl")).sort();
|
|
146
|
+
if (files.length)
|
|
147
|
+
text += "\n\nExamples (AniML sources with built .ani siblings):\n" + files.map((file) => "- modules/" + topic + "/examples/" + file).join("\n");
|
|
148
|
+
}
|
|
149
|
+
return text.trim();
|
|
150
|
+
}
|
|
151
|
+
function contents(title, command, entries) {
|
|
152
|
+
return title + "\n\nContents (" + command + " <section>):\n" + entries.map((entry) => "- " + entry.slug + ": " + entry.title).join("\n");
|
|
153
|
+
}
|
|
154
|
+
function miss(topic, candidates, io, json = false) {
|
|
155
|
+
const suggestion = nearest(topic, candidates);
|
|
156
|
+
if (json) {
|
|
157
|
+
const suggestions = suggestion ? [suggestion] : [];
|
|
158
|
+
io.err(
|
|
159
|
+
JSON.stringify({ error: `no docs topic "${topic}"`, suggestions, help: "anima docs --list" })
|
|
160
|
+
);
|
|
161
|
+
return 2;
|
|
162
|
+
}
|
|
163
|
+
io.err(
|
|
164
|
+
suggestion ? 'no docs topic "' + topic + '"; did you mean "' + suggestion + '"? Try anima docs ' + suggestion + "\nSee 'anima docs --list'." : 'no docs topic "' + topic + `"
|
|
165
|
+
See 'anima docs --list'.`
|
|
166
|
+
);
|
|
167
|
+
return 2;
|
|
168
|
+
}
|
|
169
|
+
function docsImpl(topic, list, json, io, requestedSection, full = false) {
|
|
170
|
+
const state = resolver();
|
|
171
|
+
if (topic === "spec" && (list || requestedSection)) {
|
|
172
|
+
const entries = state.specHeadings;
|
|
173
|
+
if (list) {
|
|
174
|
+
io.out(
|
|
175
|
+
json ? JSON.stringify(entries.map(({ title, slug: name }) => ({ title, slug: name }))) : entries.map((entry) => entry.slug + " " + entry.title).join("\n")
|
|
176
|
+
);
|
|
177
|
+
return 0;
|
|
178
|
+
}
|
|
179
|
+
const found = entries.find((entry) => compact(entry.slug) === compact(requestedSection));
|
|
180
|
+
if (!found)
|
|
181
|
+
return miss(
|
|
182
|
+
requestedSection,
|
|
183
|
+
entries.map((entry) => entry.slug),
|
|
184
|
+
io,
|
|
185
|
+
json
|
|
186
|
+
);
|
|
187
|
+
const text2 = section(state.spec, found, entries);
|
|
188
|
+
io.out(json ? JSON.stringify({ topic: "spec", section: found.slug, text: text2 }) : text2);
|
|
189
|
+
return 0;
|
|
190
|
+
}
|
|
191
|
+
if (topic === "authoring" && requestedSection) {
|
|
192
|
+
const found = state.guideHeadings.find(
|
|
193
|
+
(entry) => compact(entry.slug) === compact(requestedSection)
|
|
194
|
+
);
|
|
195
|
+
if (!found)
|
|
196
|
+
return miss(
|
|
197
|
+
requestedSection,
|
|
198
|
+
state.guideHeadings.map((entry) => entry.slug),
|
|
199
|
+
io,
|
|
200
|
+
json
|
|
201
|
+
);
|
|
202
|
+
const text2 = section(state.guide, found, state.guideHeadings);
|
|
203
|
+
io.out(json ? JSON.stringify({ topic: "authoring", section: found.slug, text: text2 }) : text2);
|
|
204
|
+
return 0;
|
|
205
|
+
}
|
|
206
|
+
if (list) {
|
|
207
|
+
const listed = [
|
|
208
|
+
.../* @__PURE__ */ new Set([
|
|
209
|
+
"authoring",
|
|
210
|
+
"spec",
|
|
211
|
+
"markup",
|
|
212
|
+
...state.guideHeadings.map((entry) => entry.slug),
|
|
213
|
+
...state.specHeadings.map((entry) => entry.slug),
|
|
214
|
+
...state.modules.keys()
|
|
215
|
+
])
|
|
216
|
+
].sort();
|
|
217
|
+
io.out(json ? JSON.stringify(listed) : listed.join("\n"));
|
|
218
|
+
return 0;
|
|
219
|
+
}
|
|
220
|
+
if (!topic) {
|
|
221
|
+
const text2 = contents(state.guide.split("\n")[0], "anima docs authoring", state.guideHeadings);
|
|
222
|
+
io.out(json ? JSON.stringify({ topic: "authoring", text: text2 }) : text2);
|
|
223
|
+
return 0;
|
|
224
|
+
}
|
|
225
|
+
const resolved = state.resolve(topic);
|
|
226
|
+
if (!resolved) return miss(topic, state.candidates, io, json);
|
|
227
|
+
let text;
|
|
228
|
+
switch (resolved.kind) {
|
|
229
|
+
case "authoring": {
|
|
230
|
+
const index = contents(
|
|
231
|
+
state.guide.split("\n")[0],
|
|
232
|
+
"anima docs authoring",
|
|
233
|
+
state.guideHeadings
|
|
234
|
+
);
|
|
235
|
+
text = full ? state.guide : index + "\n\nThe whole guide: anima docs authoring --full";
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
case "spec":
|
|
239
|
+
text = full ? state.spec : contents(state.spec.split("\n")[0], "anima docs spec", state.specHeadings);
|
|
240
|
+
break;
|
|
241
|
+
case "markup":
|
|
242
|
+
text = read("spec/ANIML.md");
|
|
243
|
+
break;
|
|
244
|
+
case "guide-section":
|
|
245
|
+
text = section(state.guide, resolved.heading, state.guideHeadings);
|
|
246
|
+
break;
|
|
247
|
+
case "spec-section":
|
|
248
|
+
text = section(state.spec, resolved.heading, state.specHeadings);
|
|
249
|
+
break;
|
|
250
|
+
case "module":
|
|
251
|
+
text = moduleText(resolved.topic, state.spec, state.modules);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
if (requestedSection) {
|
|
255
|
+
const entries = headings(text, [2, 3, 4, 5, 6]);
|
|
256
|
+
const matches = entries.filter((entry) => compact(entry.slug) === compact(requestedSection));
|
|
257
|
+
const found = matches.find((entry) => entry.at > 0) ?? matches[0];
|
|
258
|
+
if (!found)
|
|
259
|
+
return miss(
|
|
260
|
+
requestedSection,
|
|
261
|
+
entries.map((entry) => entry.slug),
|
|
262
|
+
io,
|
|
263
|
+
json
|
|
264
|
+
);
|
|
265
|
+
text = section(text, found, entries);
|
|
266
|
+
}
|
|
267
|
+
io.out(json ? JSON.stringify({ topic: resolved.topic, text }) : text);
|
|
268
|
+
return 0;
|
|
269
|
+
}
|
|
270
|
+
function docs(topic, list, json, io, requestedSection) {
|
|
271
|
+
return docsImpl(topic, list, json, io, requestedSection, false);
|
|
272
|
+
}
|
|
273
|
+
function docsFull(topic, list, json, io, requestedSection) {
|
|
274
|
+
return docsImpl(topic, list, json, io, requestedSection, true);
|
|
275
|
+
}
|
|
276
|
+
export {
|
|
277
|
+
docs,
|
|
278
|
+
docsFull
|
|
279
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { accessSync, constants, existsSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
2
|
+
import { createServer } from "node:net";
|
|
3
|
+
import { findProject } from "./project.js";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { resolve, dirname } from "node:path";
|
|
6
|
+
import { spawnSync } from "node:child_process";
|
|
7
|
+
async function doctor(cwd = process.cwd()) {
|
|
8
|
+
const { firefox, chromium, devices } = await import("playwright-core");
|
|
9
|
+
const checks = [];
|
|
10
|
+
checks.push({
|
|
11
|
+
name: "authentication",
|
|
12
|
+
pass: true,
|
|
13
|
+
message: "not applicable: Anima has no accounts",
|
|
14
|
+
hint: "no authentication required"
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
const project = findProject(cwd);
|
|
18
|
+
checks.push({
|
|
19
|
+
name: "project",
|
|
20
|
+
pass: true,
|
|
21
|
+
message: project?.file ?? "no anima.json (optional)",
|
|
22
|
+
hint: "create anima.json to configure this project"
|
|
23
|
+
});
|
|
24
|
+
} catch (e) {
|
|
25
|
+
checks.push({
|
|
26
|
+
name: "project",
|
|
27
|
+
pass: false,
|
|
28
|
+
message: e.message,
|
|
29
|
+
hint: "repair anima.json; run a project command for its field pointer"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const port = await new Promise((resolve2) => {
|
|
33
|
+
const server = createServer();
|
|
34
|
+
server.once("error", () => resolve2(false));
|
|
35
|
+
server.listen(4519, "127.0.0.1", () => server.close(() => resolve2(true)));
|
|
36
|
+
});
|
|
37
|
+
checks.push({
|
|
38
|
+
name: "port",
|
|
39
|
+
pass: port,
|
|
40
|
+
message: "127.0.0.1:4519",
|
|
41
|
+
hint: "stop the process using port 4519 or choose another playground --port"
|
|
42
|
+
});
|
|
43
|
+
try {
|
|
44
|
+
const browser = await chromium.launch({
|
|
45
|
+
executablePath: process.env.CHROMIUM_PATH ?? resolve(
|
|
46
|
+
homedir(),
|
|
47
|
+
".cache/ms-playwright/chromium_headless_shell-1248/chrome-headless-shell-linux64/chrome-headless-shell"
|
|
48
|
+
),
|
|
49
|
+
headless: true
|
|
50
|
+
});
|
|
51
|
+
try {
|
|
52
|
+
const context = await browser.newContext({ ...devices["iPhone 13"] });
|
|
53
|
+
const page = await context.newPage();
|
|
54
|
+
const pass = await page.evaluate(() => innerWidth > 0 && navigator.maxTouchPoints > 0);
|
|
55
|
+
checks.push({
|
|
56
|
+
name: "devices",
|
|
57
|
+
pass,
|
|
58
|
+
message: "Chromium mobile viewport and touch emulation",
|
|
59
|
+
hint: "install a working cached Playwright Chromium"
|
|
60
|
+
});
|
|
61
|
+
await context.close();
|
|
62
|
+
} finally {
|
|
63
|
+
await browser.close();
|
|
64
|
+
}
|
|
65
|
+
} catch (e) {
|
|
66
|
+
checks.push({
|
|
67
|
+
name: "devices",
|
|
68
|
+
pass: false,
|
|
69
|
+
message: e.message,
|
|
70
|
+
hint: "install cached Playwright Chromium or set CHROMIUM_PATH"
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const node = Number(process.versions.node.split(".")[0]);
|
|
74
|
+
checks.push({
|
|
75
|
+
name: "node",
|
|
76
|
+
pass: node >= 24,
|
|
77
|
+
message: process.version,
|
|
78
|
+
hint: "install Node 24 or newer"
|
|
79
|
+
});
|
|
80
|
+
for (const [name, path] of [
|
|
81
|
+
[
|
|
82
|
+
"chromium",
|
|
83
|
+
process.env.CHROMIUM_PATH ?? resolve(
|
|
84
|
+
homedir(),
|
|
85
|
+
".cache/ms-playwright/chromium_headless_shell-1248/chrome-headless-shell-linux64/chrome-headless-shell"
|
|
86
|
+
)
|
|
87
|
+
],
|
|
88
|
+
["firefox", firefox.executablePath()]
|
|
89
|
+
]) {
|
|
90
|
+
let pass = false;
|
|
91
|
+
try {
|
|
92
|
+
accessSync(path, constants.X_OK);
|
|
93
|
+
pass = true;
|
|
94
|
+
} catch {
|
|
95
|
+
}
|
|
96
|
+
checks.push({
|
|
97
|
+
name,
|
|
98
|
+
pass,
|
|
99
|
+
message: path,
|
|
100
|
+
hint: "install the Playwright browser or set CHROMIUM_PATH for Chromium"
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
const cache = process.env.XDG_CACHE_HOME ?? resolve(homedir(), ".cache");
|
|
104
|
+
let writable = false;
|
|
105
|
+
try {
|
|
106
|
+
mkdirSync(cache, { recursive: true });
|
|
107
|
+
accessSync(cache, constants.W_OK);
|
|
108
|
+
const probe = mkdtempSync(resolve(cache, ".anima-doctor-"));
|
|
109
|
+
rmSync(probe, { recursive: true });
|
|
110
|
+
writable = true;
|
|
111
|
+
} catch {
|
|
112
|
+
}
|
|
113
|
+
checks.push({
|
|
114
|
+
name: "cache",
|
|
115
|
+
pass: writable,
|
|
116
|
+
message: cache,
|
|
117
|
+
hint: "grant write access to the cache directory"
|
|
118
|
+
});
|
|
119
|
+
let repo = resolve(cwd);
|
|
120
|
+
while (!(existsSync(resolve(repo, "tools/modules.ts")) && existsSync(resolve(repo, "spec/MODULES.md")))) {
|
|
121
|
+
const parent = dirname(repo);
|
|
122
|
+
if (parent === repo) break;
|
|
123
|
+
repo = parent;
|
|
124
|
+
}
|
|
125
|
+
if (existsSync(resolve(repo, "tools/modules.ts")) && existsSync(resolve(repo, "spec/MODULES.md"))) {
|
|
126
|
+
const result = spawnSync(process.execPath, ["tools/modules.ts", "--check"], {
|
|
127
|
+
cwd: repo,
|
|
128
|
+
encoding: "utf8"
|
|
129
|
+
});
|
|
130
|
+
checks.push({
|
|
131
|
+
name: "module-wiring",
|
|
132
|
+
pass: result.status === 0,
|
|
133
|
+
message: (result.stdout + result.stderr).trim(),
|
|
134
|
+
hint: "run node tools/modules.ts and commit generated wiring"
|
|
135
|
+
});
|
|
136
|
+
} else {
|
|
137
|
+
checks.push({
|
|
138
|
+
name: "module-wiring",
|
|
139
|
+
pass: true,
|
|
140
|
+
message: "installed package: repository wiring check not applicable",
|
|
141
|
+
hint: "run this check from an Anima source checkout to verify generated wiring"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
ok: checks.every((c) => c.pass),
|
|
146
|
+
checks: checks.map((c) => ({ ...c, code: "doctor-" + c.name, pointer: "/checks/" + c.name }))
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
doctor
|
|
151
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Browser } from 'playwright-core';
|
|
2
|
+
import type { AssetInfo } from './asset-info.js';
|
|
3
|
+
export declare class ImageEncoder {
|
|
4
|
+
#private;
|
|
5
|
+
close(): Promise<void>;
|
|
6
|
+
browser(): Promise<Browser>;
|
|
7
|
+
}
|
|
8
|
+
export declare function validateWebP(bytes: Buffer, info: AssetInfo, session?: ImageEncoder): Promise<void>;
|
|
9
|
+
export declare function encodeImage(bytes: Buffer, info: AssetInfo, encode: string, quality?: number, session?: ImageEncoder): Promise<Buffer>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { Resvg } from "@resvg/resvg-js";
|
|
5
|
+
import { PNG } from "pngjs";
|
|
6
|
+
class ImageEncoder {
|
|
7
|
+
#browser;
|
|
8
|
+
async close() {
|
|
9
|
+
await (await this.#browser)?.close();
|
|
10
|
+
}
|
|
11
|
+
async browser() {
|
|
12
|
+
if (!this.#browser) {
|
|
13
|
+
const executablePath = process.env.CHROMIUM_PATH ?? resolve(
|
|
14
|
+
homedir(),
|
|
15
|
+
".cache/ms-playwright/chromium_headless_shell-1248/chrome-headless-shell-linux64/chrome-headless-shell"
|
|
16
|
+
);
|
|
17
|
+
this.#browser = (async () => {
|
|
18
|
+
if (!existsSync(executablePath)) throw Error("missing executable");
|
|
19
|
+
const { chromium } = await import("playwright-core");
|
|
20
|
+
return chromium.launch({ executablePath, headless: true });
|
|
21
|
+
})().catch(() => {
|
|
22
|
+
this.#browser = void 0;
|
|
23
|
+
throw Object.assign(Error("cached Chromium image encoder/decoder is unavailable"), {
|
|
24
|
+
code: "build-encoder-unavailable",
|
|
25
|
+
pointer: "",
|
|
26
|
+
hint: "install cached Playwright Chromium or set CHROMIUM_PATH to a Chromium executable"
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return this.#browser;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async function browserImage(bytes, info, encode, quality, session) {
|
|
34
|
+
const owned = session === void 0;
|
|
35
|
+
session ??= new ImageEncoder();
|
|
36
|
+
const browser = await session.browser();
|
|
37
|
+
let page;
|
|
38
|
+
try {
|
|
39
|
+
page = await browser.newPage();
|
|
40
|
+
return await page.evaluate(
|
|
41
|
+
async ({ uri, encode: encode2, quality: quality2 }) => {
|
|
42
|
+
const image = new Image();
|
|
43
|
+
image.src = uri;
|
|
44
|
+
await image.decode();
|
|
45
|
+
const canvas = document.createElement("canvas");
|
|
46
|
+
canvas.width = image.naturalWidth;
|
|
47
|
+
canvas.height = image.naturalHeight;
|
|
48
|
+
const ctx = canvas.getContext("2d");
|
|
49
|
+
ctx.drawImage(image, 0, 0);
|
|
50
|
+
if (!encode2)
|
|
51
|
+
return {
|
|
52
|
+
width: canvas.width,
|
|
53
|
+
height: canvas.height,
|
|
54
|
+
data: Array.from(ctx.getImageData(0, 0, canvas.width, canvas.height).data)
|
|
55
|
+
};
|
|
56
|
+
const result = canvas.toDataURL("image/" + encode2, quality2);
|
|
57
|
+
if (!result.startsWith("data:image/" + encode2 + ";"))
|
|
58
|
+
throw Error("encoder returned a different format");
|
|
59
|
+
return result.split(",")[1];
|
|
60
|
+
},
|
|
61
|
+
{ uri: `data:${info.mime};base64,${bytes.toString("base64")}`, encode, quality }
|
|
62
|
+
);
|
|
63
|
+
} finally {
|
|
64
|
+
try {
|
|
65
|
+
await page?.close();
|
|
66
|
+
} finally {
|
|
67
|
+
if (owned) await session.close();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function validateWebP(bytes, info, session) {
|
|
72
|
+
await browserImage(bytes, info, void 0, void 0, session);
|
|
73
|
+
}
|
|
74
|
+
async function encodeImage(bytes, info, encode, quality, session) {
|
|
75
|
+
if (encode === "png") {
|
|
76
|
+
if (info.mime === "image/webp") {
|
|
77
|
+
const pixels = await browserImage(bytes, info, void 0, void 0, session);
|
|
78
|
+
if (typeof pixels === "string") throw Error("decoder returned no pixels");
|
|
79
|
+
return PNG.sync.write({
|
|
80
|
+
width: pixels.width,
|
|
81
|
+
height: pixels.height,
|
|
82
|
+
data: Buffer.from(pixels.data)
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const uri = `data:${info.mime};base64,${bytes.toString("base64")}`;
|
|
86
|
+
return Buffer.from(
|
|
87
|
+
new Resvg(
|
|
88
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${info.width}" height="${info.height}"><image href="${uri}" width="${info.width}" height="${info.height}"/></svg>`
|
|
89
|
+
).render().asPng()
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
const encoded = await browserImage(bytes, info, encode, quality, session);
|
|
93
|
+
if (typeof encoded !== "string") throw Error("encoder returned no bytes");
|
|
94
|
+
return Buffer.from(encoded, "base64");
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
ImageEncoder,
|
|
98
|
+
encodeImage,
|
|
99
|
+
validateWebP
|
|
100
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Tool fonts
|
|
2
|
+
|
|
3
|
+
This directory is Node-only tooling. `reader.ts` exposes `Font` and diagnostic-safe `readFont`;
|
|
4
|
+
`measure.ts` supplies the DESIGN §4 `ToolMeasurer`. `document.ts` loads local document faces,
|
|
5
|
+
builds subsets and installs the optional text-module seam. `svg.ts` turns rendered text into paths;
|
|
6
|
+
`browser.ts` owns the explicit Chromium fallback. `flatten.ts` freezes default text into geometry.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
anima import-font fixtures/fonts/anima-test.ttf -o /tmp/local.ttf --chars 'AVé'
|
|
10
|
+
anima import-font --google 'Example:wght@400;600' -o /tmp/example.ttf --chars 'Hello'
|
|
11
|
+
anima validate scene.animl --font 'Example=/tmp/example.ttf'
|
|
12
|
+
anima sample scene.animl --font 'Example=/tmp/example.ttf' -e snapshot
|
|
13
|
+
anima render scene.animl --font 'Example=/tmp/example.ttf' -o /tmp/scene.png
|
|
14
|
+
anima render scene.animl --browser-text -o /tmp/complex.png
|
|
15
|
+
anima flatten scene.animl --node title -o /tmp/outlined.animl
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Register fixtures for tool clients with `new ToolMeasurer()`, `register(family, new Font(bytes))`,
|
|
19
|
+
then call `measure(fontSpec, text)` or `outline(fontSpec, text, x, baseline)`. Register separate static
|
|
20
|
+
faces with weight/style arguments; variable `wght` comes from FontSpec.weight by default. No system
|
|
21
|
+
fonts are used by this measurer. The optional text module must export `setTextMeasurer` (or
|
|
22
|
+
`setMeasurer`) for CLI/conformance installation. See the spec's “Tool font processing” for limits.
|
|
23
|
+
|
|
24
|
+
Flatten accepts the text backend's inline font/paint CSS and whitespace/geometricPrecision hints, translating paint to SVG presentation attributes and removing text-only hints after outlining. Unsupported CSS still reports font-unsupported instead of silently dropping visible effects.
|
|
25
|
+
|
|
26
|
+
## Local font options
|
|
27
|
+
|
|
28
|
+
`anima sample`, `session` (including reload), `bench`, `inspect`, `validate`, `render`, `flatten` and `build` accept repeatable
|
|
29
|
+
`--font Name=path` overrides. This includes semantic snapshots and bounds during sampling,
|
|
30
|
+
render comparisons and sheets, and both document and HTML builds. Font assets declared in the
|
|
31
|
+
document are loaded automatically; overrides supply CSS families or replace an asset alias.
|
|
32
|
+
Commands that only inspect structure (`schema`, `fmt`, `decompile`) do not lay out
|
|
33
|
+
text and do not load font overrides. Inspect steps a preview player, so semantic text in that preview also uses these fonts.
|
|
34
|
+
|
|
35
|
+
Semantic sampling retains `font-missing` with a script-line pointer and a
|
|
36
|
+
`--font Name=path` repair hint when layout requests an unregistered family.
|
|
37
|
+
|
|
38
|
+
## Decoded-face inspection
|
|
39
|
+
|
|
40
|
+
`@anima-format/core/fonts-info` exports `decodeFont(SFNTBytes)` and `FontInfo`. Tool clients can
|
|
41
|
+
wrap their existing decoded face with `new FontInfo(new Font(bytes))`, including after the Node
|
|
42
|
+
reader has unpacked a WOFF/WOFF2 container. Both use the same bounded platform-neutral parser.
|
|
43
|
+
The optional browser entry adds `await icon.fonts.info(bytesOrURLOrOwnedDecodedFace)`.
|
|
44
|
+
See `modules/fonts/INFO.md` for metrics/coverage, immutable effective options, derivation and
|
|
45
|
+
context-free glyph path access, coordinate conventions and deliberately unsupported formats.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Bytes as ByteReader } from 'animl/internal/modules/fonts/core/opentype/binary.js';
|
|
2
|
+
export { fault, diagnostic, MAX_FONT } from 'animl/internal/modules/fonts/core/opentype/binary.js';
|
|
3
|
+
export declare function checksum(data: Uint8Array): number;
|
|
4
|
+
/** Canonical sfnt directory; deterministic padding and checkSumAdjustment. */
|
|
5
|
+
export declare function sfnt(tables: ReadonlyMap<string, Uint8Array>, flavor?: number): Buffer;
|
|
6
|
+
export declare class Bytes extends ByteReader {
|
|
7
|
+
slice(p: number, n: number): Buffer;
|
|
8
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Bytes as ByteReader } from "animl/internal/modules/fonts/core/opentype/binary.js";
|
|
2
|
+
import { fault } from "animl/internal/modules/fonts/core/opentype/binary.js";
|
|
3
|
+
import { fault as fault2, diagnostic, MAX_FONT } from "animl/internal/modules/fonts/core/opentype/binary.js";
|
|
4
|
+
function checksum(data) {
|
|
5
|
+
let sum = 0;
|
|
6
|
+
for (let i = 0; i < data.length; i += 4)
|
|
7
|
+
sum = sum + ((data[i] ?? 0) * 16777216 + ((data[i + 1] ?? 0) << 16) + ((data[i + 2] ?? 0) << 8) + (data[i + 3] ?? 0)) >>> 0;
|
|
8
|
+
return sum;
|
|
9
|
+
}
|
|
10
|
+
function sfnt(tables, flavor = 65536) {
|
|
11
|
+
const entries = [...tables].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
12
|
+
const n = entries.length;
|
|
13
|
+
if (!n || n > 256) fault("invalid sfnt table count");
|
|
14
|
+
let offset = 12 + n * 16;
|
|
15
|
+
const out = Buffer.alloc(offset + entries.reduce((s, [, b]) => s + (b.length + 3 & ~3), 0));
|
|
16
|
+
out.writeUInt32BE(flavor);
|
|
17
|
+
out.writeUInt16BE(n, 4);
|
|
18
|
+
const power = 2 ** Math.floor(Math.log2(n));
|
|
19
|
+
out.writeUInt16BE(power * 16, 6);
|
|
20
|
+
out.writeUInt16BE(Math.log2(power), 8);
|
|
21
|
+
out.writeUInt16BE((n - power) * 16, 10);
|
|
22
|
+
let head = 0;
|
|
23
|
+
entries.forEach(([tag, raw], i) => {
|
|
24
|
+
const data = Buffer.from(raw);
|
|
25
|
+
if (tag === "head") {
|
|
26
|
+
if (data.length < 54) fault("short head table");
|
|
27
|
+
data.writeUInt32BE(0, 8);
|
|
28
|
+
head = offset;
|
|
29
|
+
}
|
|
30
|
+
const p = 12 + i * 16;
|
|
31
|
+
out.write(tag, p, 4, "ascii");
|
|
32
|
+
out.writeUInt32BE(checksum(data), p + 4);
|
|
33
|
+
out.writeUInt32BE(offset, p + 8);
|
|
34
|
+
out.writeUInt32BE(data.length, p + 12);
|
|
35
|
+
data.copy(out, offset);
|
|
36
|
+
offset += data.length + 3 & ~3;
|
|
37
|
+
});
|
|
38
|
+
if (head) out.writeUInt32BE(2981146554 - checksum(out) >>> 0, head + 8);
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
class Bytes extends ByteReader {
|
|
42
|
+
slice(p, n) {
|
|
43
|
+
const bytes = super.slice(p, n);
|
|
44
|
+
return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
Bytes,
|
|
49
|
+
MAX_FONT,
|
|
50
|
+
checksum,
|
|
51
|
+
diagnostic,
|
|
52
|
+
fault2 as fault,
|
|
53
|
+
sfnt
|
|
54
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ToolMeasurer } from './measure.js';
|
|
2
|
+
/** Browser shaping is an explicit rendering choice; same lazy Chromium as image encoding. */
|
|
3
|
+
export declare function browserTextPNG(svg: string, measurer: ToolMeasurer): Promise<Buffer>;
|
|
4
|
+
export declare function embedFontCSS(svg: string, measurer: ToolMeasurer): string;
|