Skip to content

feat(stdlib): motion binding — animateMini/tween/spring/ease (bindings #4 → ●)#436

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/bindings-4-motion-complete
May 28, 2026
Merged

feat(stdlib): motion binding — animateMini/tween/spring/ease (bindings #4 → ●)#436
hyperpolymath merged 1 commit into
mainfrom
feat/bindings-4-motion-complete

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Promotes bindings roadmap row #4 (motion) from ◐ scaffold to ● usable by landing the four deferred surfaces flagged in docs/bindings-roadmap.adoc:

  • motionAnimateMini — lightweight variant of animate (no autoplay, no built-in thenable).
  • motionTween — one-shot interpolation between explicit from/to values.
  • motionSpring — physics-based spring animation (stiffness/damping/mass).
  • motionEase + opaque Easing type — easing-function constructor by canonical motion name.

Changes

  • stdlib/Motion.affine: 4 new extern fn declarations + the new extern type Easing opaque carrier; module docstring updated to reflect the now-comprehensive surface.
  • lib/codegen_deno.ml: 4 new runtime helpers (__as_motionAnimateMini / __as_motionTween / __as_motionSpring / __as_motionEase) inserted right after __as_motionCancel in the prelude; 4 matching lowering-table entries inserted after b "motionCancel". Each helper resolves the host method on globalThis.__as_motion lazily, so partial mocks still work for the rest of the surface.
  • tests/codegen-deno/motion_smoke.{affine,harness.mjs}: extended in place with smokeAnimateMini / smokeTween / smokeSpring / smokeEase wrappers + arg-routing and return-value assertions for every new extern (the original animate + cancel assertions are preserved).
  • docs/bindings-roadmap.adoc: row ci: Bump actions/cache from 5.0.2 to 5.0.4 #4 status ◐ scaffold● usable; rationale lists the full extern surface, calls out the smoke fixture, and notes the remaining (out-of-scope-for-●) follow-ups (typed keyframe shapes, typed transform-property surface, migration to a dedicated affinescript-motion package).

Test plan

  • dune build bin/main.exe clean.
  • bash tools/run_codegen_deno_tests.sh — all 8 harnesses pass, including the extended motion_smoke with 4 new wrappers and full ease/spring/tween/animateMini coverage.
  • CI green on the standard PR matrix.

Notes for reviewers

Closes part of bindings roadmap #4.

🤖 Generated with Claude Code

@hyperpolymath hyperpolymath enabled auto-merge (squash) May 28, 2026 12:57
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 81 issues detected

Severity Count
🔴 Critical 4
🟠 High 10
🟡 Medium 67

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action actions/checkout@v6 needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action denoland/setup-deno@v2 needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in affine-vscode-publish.yml",
    "type": "unknown",
    "file": "affine-vscode-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "unknown",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "unknown",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

…#4 → ●)

Promotes bindings #4 (motion) from ◐ scaffold to ● usable by adding the
four deferred surfaces flagged in docs/bindings-roadmap.adoc:

- motionAnimateMini — lightweight variant (no autoplay / no thenable).
- motionTween       — one-shot from/to interpolation.
- motionSpring      — physics-based spring with stiffness/damping/mass.
- motionEase        — easing-function constructor + opaque Easing type.

stdlib/Motion.affine gains the four extern fns plus the new opaque
`Easing` type. The Deno-ESM codegen prelude gains `__as_motionAnimateMini`
/ `__as_motionTween` / `__as_motionSpring` / `__as_motionEase` runtime
helpers (each resolves the host method on globalThis.__as_motion at call
time so a partial mock still works); the lowering table gains the four
matching extern entries.

The motion_smoke fixture is extended (same .affine + .harness.mjs pair —
no new files) with smokeAnimateMini / smokeTween / smokeSpring / smokeEase
wrappers and arg-routing + return-value assertions for each. All 8
codegen-deno harnesses pass locally.

The bindings-roadmap row #4 flips ◐ → ● and the rationale lists the full
surface; remaining follow-ups (typed keyframe shapes, typed transform
properties, migration to a dedicated affinescript-motion package) are
explicitly out of scope for the ● promotion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath force-pushed the feat/bindings-4-motion-complete branch from 02515ac to e7dd3de Compare May 28, 2026 13:18
@hyperpolymath hyperpolymath merged commit c50ffdc into main May 28, 2026
13 of 23 checks passed
@hyperpolymath hyperpolymath deleted the feat/bindings-4-motion-complete branch May 28, 2026 13:19
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 81 issues detected

Severity Count
🔴 Critical 4
🟠 High 10
🟡 Medium 67

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action actions/checkout@v6 needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action denoland/setup-deno@v2 needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in affine-vscode-publish.yml",
    "type": "unknown",
    "file": "affine-vscode-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "unknown",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "unknown",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "unknown",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant