Skip to content

Version 1.13.0 - #97

Merged
JosunLP merged 23 commits into
mainfrom
dev
May 21, 2026
Merged

Version 1.13.0#97
JosunLP merged 23 commits into
mainfrom
dev

Conversation

@JosunLP

@JosunLP JosunLP commented May 21, 2026

Copy link
Copy Markdown
Collaborator

This pull request updates the project to version 1.13.0, introducing major new features and enhancements across several core modules, and updates all relevant documentation and guidance files to reflect the new release. The highlights include a significant expansion of the forms, component, motion, and core utilities APIs, as well as new validation and developer guidance for the updated version.

Release and Documentation Updates:

  • Bumped the release baseline and version references from 1.12.0 to 1.13.0 in all metadata, documentation, and guidance files, including AGENT.md, .github/copilot-instructions.md, .clinerules, and .cursorrules. [1] [2] [3] [4]

Major Feature Expansions:

  • Forms API:

    • @bquery/bquery/forms is now batteries-included, with many new validators and combinators, enriched field and form state, dynamic field arrays, schema-based declaration, two-way DOM bindings, scope-aware composables, and SSR helpers. [1] [2] [3]
  • Component API:

    • @bquery/bquery/component adds slot/ref/async/lifecycle/DI primitives, delegated event helpers, adoptable stylesheet support, and keyed list rendering utilities. [1] [2] [3]
  • Motion API:

    • @bquery/bquery/motion receives a major expansion, including full Penner easings, new interpolation and animation controls, timeline enhancements, new primitives (e.g., scrollProgress, inView), and improved stagger and reduced-motion support. [1] [2] [3]
  • Core Utilities:

    • @bquery/bquery/core adds a deep suite of new helpers for arrays, functions, objects, strings, numbers, miscellaneous utilities, and additional type guards. [1] [2] [3]

Changelog and Guidance:

  • Added a new section for version 1.13.0 in CHANGELOG.md, summarizing the new features and changes.
  • Updated all developer and AI guidance files with detailed 1.13.0 highlights and API notes, including validation steps for release metadata changes. [1] [2] [3]

These updates ensure that all documentation, developer guidance, and metadata accurately reflect the new capabilities and requirements introduced in version 1.13.0.

Summary by CodeRabbit

  • New Features

    • v1.13.0: Forms become "batteries‑included" — richer validators, dynamic field arrays, fluent schema builder, DOM binding, SSR serialize/hydrate, composables, and expanded form state/controls.
    • Components: refs/slots, dependency injection, delegated event helpers, imperative prop access, styled-component support, keyed-list reconciliation, async lifecycle helpers.
    • Motion: expanded easings, tweens/animateValue, timeline labels/playback controls, multi‑dimensional springs, micro‑interaction effects, scroll/in‑view utilities.
    • Core: broad expansion of utility helpers and type guards.
  • Documentation

    • Release notes, guides, and README updated for 1.13.0.
  • Tests

    • Large new and extended test suites covering forms, components, motion, and utilities.
  • Chores

    • Package version and homepage updated to reflect 1.13.0.

Review Change Stack

Copilot AI review requested due to automatic review settings May 21, 2026 07:20
@JosunLP JosunLP self-assigned this May 21, 2026
@github-actions github-actions Bot added core Changes to the core module component Changes to the component module motion Changes to the motion module docs Changes to the documentation tests Chenges to the tests build Changes to the build and meta files github Changes to the github meta data files forms Changes to the forms module labels May 21, 2026
Copilot AI and others added 3 commits May 21, 2026 09:21
…95)

Co-authored-by: JosunLP <[email protected]>
Co-authored-by: Jonas Pfalzgraf <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
fix: address PR #95 review thread issues
* feat(motion): massively expand easings, tweens, timeline, effects, stagger, reduced-motion

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e016b22c-96d6-4b8b-a7df-3a36ae4c02de

Co-authored-by: JosunLP <[email protected]>

* feat(utils): expand array/function/object/string/number/misc/type-guards utilities

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e016b22c-96d6-4b8b-a7df-3a36ae4c02de

Co-authored-by: JosunLP <[email protected]>

* fix: address all review comments on animation and utility code

- tween.ts: fix JSDoc description (resolves to `to` not `from` under reduced motion)
- tween.ts: store AbortSignal handler ref and remove it on natural completion/stop
- function.ts: schedule trailing timer on first call when leading:false, trailing:true
- string.ts: guard randomString() against empty charset with RangeError
- misc.ts: check signal.aborted before scheduling next poll tick
- reduced-motion.ts: make reducedMotionSignal() a module-level singleton
- stagger.ts: remove unused actualTotal variable and void statement
- timeline.ts: remove no-op void currentIteration statement"

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d8084c03-fbb8-4fa9-9fff-d05430c20b98

Co-authored-by: JosunLP <[email protected]>

* fix: address remaining PR review comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ba0e3ad6-6111-40b9-a0ab-1ce5c8fea82f

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest PR review comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1aa75647-f677-465e-aab9-209f490383e1

Co-authored-by: JosunLP <[email protected]>

* docs(motion): clarify scrollProgress compatibility options

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1aa75647-f677-465e-aab9-209f490383e1

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address review feedback on loops and stagger

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a1111d86-d2b6-4311-8729-43ddfbe84ada

Co-authored-by: JosunLP <[email protected]>

* fix(motion,core): address review comments - flush/stagger/effects cleanup

- debounce.flush() is now a no-op when trailing is false or no trailing
  timer is active, preventing unexpected extra calls for leading-only
  debounced functions
- grid+random stagger mode now blends with 0.5 weights on both eased and
  random contributions so randomized delay never exceeds maxDistance
- remove unused easeInOutCubic import and void dead-code from effects.ts"

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/95064e3b-5703-4073-8cc8-49b926698865

Co-authored-by: JosunLP <[email protected]>

* fix(core,motion): address latest review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/90f62f96-990c-4315-bd0c-024b02c04948

Co-authored-by: JosunLP <[email protected]>

* fix(core): address latest review comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/97d901b3-ab93-4ff4-83e6-65e46f07efa3

Co-authored-by: JosunLP <[email protected]>

* test: fix CI typecheck failures

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/70d19787-df98-4b55-a7b4-241345dceb74

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d89d97db-cdd0-4a22-9e2f-78faa0dff168

Co-authored-by: JosunLP <[email protected]>

* test(motion): cover timeline update loop guards

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c29ef8d3-a230-4161-b8e0-2dd0b8a9587a

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d5d1ce6d-eb0e-4c32-a9d6-a9c101f3235c

Co-authored-by: JosunLP <[email protected]>

* fix(motion): honor reversed reduced-motion tween start

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/7ebb3414-15bc-40b6-924c-d47a343fcc04

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/5ddabfb4-b771-4d0c-be44-09b0193e6bed

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d7eb7ffa-a2f6-44f4-98b8-482f1fadd0dc

Co-authored-by: JosunLP <[email protected]>

* fix(exports): resolve compose collision

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/5009c270-cc38-4729-8ab4-6810f88294c0

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4a5e4621-27a9-47b3-93ed-629d262e2f78

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review thread feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3826232b-fbda-4b7f-8d76-ca0a23fda25c

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address remaining review thread feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/df88b8a5-c465-4131-8b3e-492a676ca894

Co-authored-by: JosunLP <[email protected]>

* fix(core,motion): address latest review comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c756f55e-aa3c-4f95-afab-129059fba20c

Co-authored-by: JosunLP <[email protected]>

* fix(core,motion): address latest review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1879914a-77dd-4e87-a969-ae2eb1e365ac

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review thread

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b7cfd132-105c-4dca-bfda-5223a4316a51

Co-authored-by: JosunLP <[email protected]>

* test(motion): fix reduced-motion MQL test typing in CI

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/55019ba2-aeb1-43a4-b7d9-97922c108527

Co-authored-by: JosunLP <[email protected]>

* fix(core,motion): address review thread feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4c69739e-229e-4d34-a441-4f9abb10d5fe

Co-authored-by: JosunLP <[email protected]>

* fix(motion): preserve timeline at type hints

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e02d79db-f57a-46ee-81c2-279addfc1b00

Co-authored-by: JosunLP <[email protected]>

* fix(core): handle safeAssign fallback for locked props

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/24798ec3-f7ce-494a-b690-4710538e13f0

Co-authored-by: JosunLP <[email protected]>

* fix(core): avoid dynamic fallback writes in safeAssign

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/24798ec3-f7ce-494a-b690-4710538e13f0

Co-authored-by: JosunLP <[email protected]>

* fix(motion): address latest review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e01b7fe1-b4bb-4675-a9ca-ddd35bd25cb2

Co-authored-by: JosunLP <[email protected]>

* fix(core): preserve debounce trailing args and setter semantics

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/341d3775-d78d-4c49-a871-21a72619497b

Co-authored-by: JosunLP <[email protected]>

* fix(core): tighten safeAssign prototype guard

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/341d3775-d78d-4c49-a871-21a72619497b

Co-authored-by: JosunLP <[email protected]>

* fix(core): preserve safeAssign accessor semantics

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/341d3775-d78d-4c49-a871-21a72619497b

Co-authored-by: JosunLP <[email protected]>

* test(core): fix object utility typecheck compatibility

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/7f985a0a-50ad-46e6-b1d7-c022f31f14ef

Co-authored-by: JosunLP <[email protected]>

* fix: address review comments on safeAssign, tween JSDoc, interpolation, and playbackRate

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/dce551f8-62bb-46e3-827d-36d9a97602a5

Co-authored-by: JosunLP <[email protected]>

* fix(motion): remove unused tween interpolate helper

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/287b6814-bad7-4b6a-b09a-24b73d7e9f9f

Co-authored-by: JosunLP <[email protected]>

* fix(motion): rAF-throttle magnetic/tilt pointermove handlers and pre-allocate record interpolator output

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/6a54e495-6635-439a-b52c-241df04ffdb4

Co-authored-by: JosunLP <[email protected]>

* fix(docs): address PR review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1c468754-fb34-4074-b8c0-cb7df9735846

Co-authored-by: JosunLP <[email protected]>

* fix(motion): add safeRaf/safeCaf guards to magnetic() and tilt() effects

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d39c75c2-1e3f-47a4-be4e-70990160dfb4

Co-authored-by: JosunLP <[email protected]>

* fix: address latest PR review thread feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/539e3b31-182a-43be-9ce1-331fbde76be7

Co-authored-by: JosunLP <[email protected]>

* fix(tween,function): address PR review feedback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/322c05f2-0ec1-4748-a782-45339630ca35

Co-authored-by: JosunLP <[email protected]>

* fix: address PR #94 motion and object review comments

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/eee78581-7919-46df-80e0-82c966e08e1a

Co-authored-by: JosunLP <[email protected]>

* fix(core): address PR #94 review comments on object/string utils

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/5e7d035d-0785-4f81-8240-6c59d7c36fca

Co-authored-by: JosunLP <[email protected]>

* fix: address PR review thread feedback for nextTick docs and springVector subscriptions

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/37a2972e-c815-4036-847a-44a79f6ac4b2

Co-authored-by: JosunLP <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: JosunLP <[email protected]>
* docs: prepare 1.13.0 release — fold motion + utils into 1.13.0 changelog and refresh AI guidance

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b40036a6-ac4b-41d5-86e1-5989628a0568

Co-authored-by: JosunLP <[email protected]>

* docs: clarify release guidance wording

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e24f029d-b66f-4036-a7b8-0ea9d15e4958

Co-authored-by: JosunLP <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: JosunLP <[email protected]>
@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Repository-wide 1.13.0 update: expands Core utilities, Component APIs (CSS, events, DI, async, slots/refs), Forms engine (validators, bindings, schema, SSR, arrays), and Motion features (easing, tween, timeline, effects, reduced-motion). Updates exports (src/full.ts, src/index.ts), versioning, docs, guidance, audit script, and adds comprehensive tests.

Changes

Framework 1.13.0 repository-wide update

Layer / File(s) Summary
Release metadata & docs
.clinerules, .cursorrules, .github/copilot-instructions.md, AGENT.md, CHANGELOG.md, README.md, docs/**, llms.txt, CNAME
Bumped baseline to 1.13.0, updated homepage, and added 1.13.0 highlights/API notes across guidance and documentation.
Package & CI scripts
package.json, scripts/check-full-bundle.mjs
Package version and homepage bumped; added forms:compose to intentional omissions for the full-bundle audit.
Component API additions
src/component/* (async.ts, css.ts, events.ts, index.ts, inject.ts, keyed-list.ts, refs.ts, scope.ts, slots.ts, types.ts, component.ts)
Adds css tagged-template & adoptable styles, scoped refs/slots, delegated events + bindDelegatedEvents, DI (provide/inject), keyed-list helpers, async helpers (whenIdle, useAsync), rendering/scope lifecycle flags, imperative setProp/getProp, and expanded component exports/types.
Core utils expansion
src/core/index.ts, src/core/utils/*, src/core/utils/index.ts
Large addition of utility helpers: array, function (debounce/throttle/memoize/compose/curry/partial/retry), misc (uuid/tryCatch/pollUntil/nextFrame), number/string/object helpers, and many type-guards; updated utils interface and re-exports.
Forms engine (batteries-included)
src/forms/* (bind.ts, composables.ts, create-form.ts, field-array.ts, index.ts, schema.ts, ssr.ts, types.ts, use-field.ts, validators.ts)
Refactor/extend createForm: richer field/form state, async-safe validators, field arrays, schema builder, DOM bindings, SSR helpers, composables for components, expanded validator set and types, and broadened public API surface.
Motion feature set
src/motion/* (animate.ts, easing.ts, effects.ts, index.ts, reduced-motion*.ts, scroll-progress.ts, spring.ts, stagger.ts, timeline.ts, tween.ts, types.ts)
Expanded easing toolkit (many Penner families, cubicBezier, steps, mix, chain), animateTo/start-state derivation, tween/animateValue, timeline label/relative offsets/repeat/yoyo/progress/onUpdate, springVector, micro-interactions (magnetic/tilt/shake/pulse/countUp), reduced-motion subscriptions/signal, scroll progress & in-view helpers.
Top-level exports & full bundle
src/index.ts, src/full.ts
Explicit top-level re-exports for forms (compose intentionally omitted), and broadening of src/full.ts re-exports to include expanded core/component/motion/forms surfaces and types.
Tests
tests/** (many new/expanded suites)
Extensive new and updated Bun tests covering components, forms, motion, and core utils.

Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • bQuery/bQuery#93: Introduces the full-bundle drift checker that this PR extends by adding the forms:compose intentional omission.

Suggested labels
ssr, reactive

Poem

A rabbit taps its merge with glee,
New springs and tweens in harmony. 🐇✨
Forms now dance with schema light,
Components style in shadow bright.
Core learns countless clever tricks,
Motion hums with easing kicks—

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment thread tests/forms-extensions.test.ts Fixed
Comment thread tests/forms-extensions.test.ts Fixed
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Jonas Pfalzgraf <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps bQuery.js to v1.13.0 and delivers a large, cross-module feature expansion (forms “batteries-included” tier, component ergonomics, and major motion enhancements), while updating docs/guidance and adding broad test coverage for the new utilities and motion surfaces.

Changes:

  • Version baseline update to 1.13.0 across package metadata, changelog, docs, and AI/dev guidance.
  • Major new/expanded APIs in forms, component, motion, and core utils, with corresponding exports wired into module barrels.
  • Significant test additions for new utilities and motion behaviors (tweens/easing/effects/scroll progress, etc.).

Reviewed changes

Copilot reviewed 74 out of 75 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/utils-type-guards-extras.test.ts Adds coverage for newly introduced core type guards.
tests/utils-string-extras.test.ts Adds coverage for new string utilities (case transforms, template, stripHtml, etc.).
tests/utils-object-extras.test.ts Adds coverage for new object utilities (deep get/set/has, deepEqual, freeze, defaults, typed keys/entries).
tests/utils-number-extras.test.ts Adds coverage for new number utilities (formatBytes, lerp/mapRange, stats, etc.).
tests/utils-misc-extras.test.ts Adds coverage for misc utilities (uuid, tryCatch, pollUntil, nextFrame/nextTick, etc.).
tests/utils-function-extras.test.ts Adds coverage for function utilities (memoize, retry, debounce/throttle options/flush).
tests/utils-array-extras.test.ts Adds coverage for array utilities (groupBy/keyBy, sortBy, range, move, etc.).
tests/motion.test.ts Extends motion tests for animate() abort/playbackRate, animateTo(), timeline commitStyles behavior, stagger fallbacks.
tests/motion-tween.test.ts New test suite for tween() and animateValue() controls and reduced-motion behavior.
tests/motion-scroll-progress.test.ts New tests for scrollProgress() and inView() including cleanup and DOM-less fallbacks.
tests/motion-effects.test.ts New tests for micro-interactions (magnetic/tilt/shake/pulse/countUp) and reduced-motion behavior.
tests/motion-easing.test.ts New tests for expanded Penner easings plus cubicBezier, steps, mix, chain.
tests/forms.test.ts Updates/extends forms tests (field validating state reset; silent setValue vs explicit validation; subscription assertions).
src/motion/types.ts Expands motion public types (spring vector, timeline labels/at, animate signal/playbackRate, richer stagger options).
src/motion/stagger.ts Implements grid/axis/randomized stagger behavior and non-finite from fallbacks.
src/motion/spring.ts Adds spring velocity/set APIs and introduces springVector() plus new presets.
src/motion/scroll-progress.ts Introduces scrollProgress() and inView() primitives with cleanup/SSR-friendly handling.
src/motion/reduced-motion.ts Adds change subscription API (onReducedMotionChange) with matchMedia lifecycle management.
src/motion/reduced-motion-signal.ts Adds a reactive singleton wrapper (reducedMotionSignal()) over reduced-motion preference.
src/motion/index.ts Re-exports the expanded motion surface (easings, tween, effects, scroll helpers, types).
src/motion/animate.ts Adds AbortSignal + playbackRate support to animate() and introduces animateTo() helper.
src/index.ts Refactors root exports for forms to avoid compose collision with core compose.
src/forms/use-field.ts Enriches field state (focused/disabled/dirtySince) and adds setValue/setError/clearError and blur/focus helpers.
src/forms/ssr.ts Adds SSR serialization/hydration helpers for forms using shared SSR escaping.
src/forms/schema.ts Adds fluent field() + schema() helpers to build form field configs.
src/forms/index.ts Expands forms module exports (field arrays, schema, bindings, SSR, composables, validator suite).
src/forms/field-array.ts Introduces dynamic field arrays (createFieldArray) with mutation helpers and validation.
src/forms/composables.ts Adds component-scope-aware wrappers (useForm, useField, useFieldArray).
src/core/utils/type-guards.ts Adds new type guards (Error/Map/Set/RegExp/Symbol/BigInt/iterables/nullish/defined, etc.).
src/core/utils/number.ts Adds number utilities (round/roundTo, lerp/mapRange, formatBytes, stats, angle conversion).
src/core/utils/misc.ts Adds misc utilities (uuid, tryCatch, times, pollUntil, nextFrame/nextTick).
src/core/index.ts Re-exports the enlarged utils surface + associated utility types.
src/component/types.ts Expands component definition/element types (setProp/getProp, styles payload type, beforeUnmount, errorBoundary).
src/component/slots.ts Adds reactive slot helpers (useSlot, hasSlot, slotText).
src/component/scope.ts Adds render-phase guard wiring (setCurrentScopeIsRendering) and enforces hook usage outside render.
src/component/refs.ts Introduces useRef() for element refs.
src/component/keyed-list.ts Adds keyedList string helper and reconcileKeyed DOM reordering utility.
src/component/inject.ts Adds provide/inject DI primitives and typed injection keys (incl. formContextKey).
src/component/index.ts Re-exports new component helpers (refs/slots/events/DI/async/css/keyed lists) and additional types.
src/component/events.ts Adds delegated event system (on* helpers + bindDelegatedEvents) and handler cleanup helper.
src/component/css.ts Adds css tagged template + adoptable stylesheet integration and escaping.
src/component/component.ts Integrates adopted styles, delegated handler cleanup, render-phase scoping, beforeUnmount, and errorBoundary.
src/component/async.ts Adds whenIdle() and useAsync() lifecycle-aware async helpers.
scripts/check-full-bundle.mjs Records an intentional omission for forms:compose due to /full collision with core.compose.
README.md Updates “New in …” release highlights to 1.13.0 feature set.
package.json Bumps package version to 1.13.0.
llms.txt Updates version + adds 1.13.0 highlight summary for AI-friendly repo overview.
docs/index.md Updates landing page “New in …” section to 1.13.0 summary.
docs/guide/motion.md Documents new motion APIs (reduced-motion subscription, easing factories, tween, animateTo, labels, scroll helpers, effects, stagger).
docs/guide/forms.md Adds 1.13.0 “batteries-included” section documenting new forms APIs.
docs/guide/components.md Adds 1.13.0 section documenting new component primitives and patterns.
docs/guide/api-core.md Updates core API guide with the expanded utils catalog.
CHANGELOG.md Adds the 1.13.0 release entry with detailed module-level additions/changes.
bun.lock Updates dependency lock to newer versions associated with this release.
AGENT.md Bumps baseline and documents 1.13.0 highlights and validation expectations.
.github/copilot-instructions.md Updates Copilot guidance baseline and documents 1.13.0 module expansions.
.cursorrules Updates Cursor snapshot baseline and 1.13.0 API notes.
.clinerules Updates Cline snapshot baseline and 1.13.0 release summary.

Comment thread src/component/events.ts
Comment thread src/component/refs.ts
Comment thread src/forms/composables.ts Outdated
Comment thread src/forms/field-array.ts
Comment thread tests/forms-extensions.test.ts Fixed

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/bQuery/bQuery/pulls/97/reviews/4334827935
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (6)
src/forms/bind.ts (1)

13-20: ⚡ Quick win

Mark internal helpers with @internal JSDoc.

These non-exported helper functions are currently undocumented as internal utilities, which violates the repo rule for src/**/*.ts.

As per coding guidelines: "Use @internal JSDoc tag for non-public helper functions and internal utilities."

Also applies to: 22-90, 189-200

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/forms/bind.ts` around lines 13 - 20, Add `@internal` JSDoc tags to the
non-exported helper type-guard functions so they are marked as internal
utilities: add a short JSDoc block with `@internal` above isInput, isTextarea,
isSelect, and isButton, and likewise add `@internal` to the other non-exported
helpers in the file (the ones around lines 22-90 and 189-200) so all internal,
non-public functions comply with the repo rule; keep the JSDoc minimal
(description optional) and place it immediately above each function declaration.
src/forms/ssr.ts (2)

41-60: 💤 Low value

Add @example block to readSerializedFormState.

Per coding guidelines, public APIs should carry JSDoc with @example where helpful. This function would benefit from a usage example showing the client-side hydration pattern.

📝 Suggested addition
 /**
  * Read a previously-serialized form snapshot from the DOM. Returns `undefined`
  * if no matching `<script data-bq-form="...">` is found.
  *
  * `@param` id - The id used when calling {`@link` serializeFormState}
  * `@returns` The decoded snapshot or `undefined`
+ *
+ * `@example`
+ * ```ts
+ * import { readSerializedFormState } from '`@bquery/bquery/forms`';
+ *
+ * const snapshot = readSerializedFormState<MyFormValues>('register');
+ * if (snapshot) {
+ *   form.restore(snapshot);
+ * }
+ * ```
  */

As per coding guidelines: src/**/*.ts: Add JSDoc comments with @example blocks for all public APIs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/forms/ssr.ts` around lines 41 - 60, The JSDoc for the public function
readSerializedFormState is missing an `@example` usage; update the comment block
above the exported readSerializedFormState<T> function to include an `@example`
that demonstrates importing readSerializedFormState, calling it with a typed id
(e.g. readSerializedFormState<MyFormValues>('register')), checking the returned
FormSnapshot<T> and restoring a form (e.g. form.restore(snapshot)); keep the
text concise, use TypeScript fenced code example, and ensure it references
FormSnapshot and the id string so consumers see the client-side hydration
pattern.

62-71: 💤 Low value

Add @example block to hydrateForm.

Per coding guidelines, public APIs should carry JSDoc with @example where helpful.

📝 Suggested addition
 /**
  * Convenience: hydrate a {`@link` Form} from a previously-serialized snapshot.
  * Returns `true` when state was applied.
+ *
+ * `@param` form - The form instance to hydrate
+ * `@param` id - The id used when calling {`@link` serializeFormState}
+ * `@returns` `true` if snapshot was found and applied, `false` otherwise
+ *
+ * `@example`
+ * ```ts
+ * import { createForm, hydrateForm } from '`@bquery/bquery/forms`';
+ *
+ * const form = createForm({ fields: { ... } });
+ * if (!hydrateForm(form, 'register')) {
+ *   // No serialized state found, use defaults
+ * }
+ * ```
  */

As per coding guidelines: src/**/*.ts: Add JSDoc comments with @example blocks for all public APIs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/forms/ssr.ts` around lines 62 - 71, Add a JSDoc `@example` block to the
hydrateForm function's comment that demonstrates importing createForm and
hydrateForm, creating a form instance, calling hydrateForm(form, 'register'),
and handling the false return (no serialized state found) — update the comment
above hydrateForm (referencing hydrateForm, Form, and readSerializedFormState)
to include that illustrative example following the project's JSDoc style.
src/motion/effects.ts (2)

42-105: 💤 Low value

Add @example block to magnetic() JSDoc.

Per coding guidelines, public APIs should carry JSDoc including @example where helpful. The magnetic function would benefit from a usage example showing typical integration.

📝 Suggested JSDoc addition
 /**
  * Apply a pointer-following micro-interaction to an element. The element
  * is translated toward the pointer when it is within `radius` pixels of
  * the element's center.
  *
  * `@returns` Cleanup function that detaches listeners and resets transforms.
+ *
+ * `@example`
+ * ```ts
+ * const cleanup = magnetic(button, { strength: 0.4, radius: 100 });
+ * // Later: cleanup();
+ * ```
  */

As per coding guidelines: "Public APIs should carry JSDoc, including @example where helpful."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/motion/effects.ts` around lines 42 - 105, Add an `@example` block to the
JSDoc for the exported magnetic function showing typical usage and cleanup:
update the comment above export const magnetic(...) to include a short code
snippet (e.g., obtaining an element, calling magnetic(element, { strength: 0.4,
radius: 100 }), and later calling the returned cleanup()) so consumers see how
to integrate and tear down the effect.

107-196: 💤 Low value

Add @example block to tilt() JSDoc.

Same as above—tilt() is a public API missing an example.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/motion/effects.ts` around lines 107 - 196, The JSDoc for the exported
tilt function lacks an `@example` showing how to call it; add an `@example` block to
the tilt(...) JSDoc that demonstrates typical usage (import/selection of an
element, calling tilt(el, { max, perspective, scale, respectReducedMotion }) and
handling the returned cleanup function). Update the comment above export const
tilt so it references the TiltOptions shape and shows a minimal real-world
example (including calling the returned EffectCleanup to detach listeners) to
help consumers understand usage.
tests/motion-timeline-extras.test.ts (1)

12-26: ⚡ Quick win

Standardize DOM lifecycle cleanup in this helper.

Tests created through this helper don’t follow the repository’s preferred DOM pattern (append + explicit remove), which can leave state hanging across tests when cases evolve.

As per coding guidelines tests/**/*.test.ts: "Create DOM elements inline in tests, append to document.body, then call .remove() to clean up after testing."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/motion-timeline-extras.test.ts` around lines 12 - 26, The helper
createElement currently creates a detached element (el) and mock animation
(anim) but does not follow the repo pattern of appending and explicit removal;
update createElement to append the created el to document.body before returning
and expose a clear way to remove it (either return the el so callers can call
el.remove(), or return a cleanup function as part of the result), leaving anim
and the mocked animate implementation intact; this ensures tests using
createElement follow the "append to document.body, then call .remove()"
lifecycle and avoid DOM state leakage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guide/forms.md`:
- Around line 353-364: The example uses createForm but the import only lists
schema and field; update the import statement to include createForm so the
snippet compiles — e.g., add createForm to the named imports alongside schema
and field in the top import (refer to createForm, schema, and field in the
example).

In `@src/component/component.ts`:
- Around line 212-218: setProp currently assigns the value directly which can
leave required prop tracking stale and skips validator logic; update setProp
(and use existing helpers like cloneProps, missingRequiredProps,
definition.props) to: 1) run the prop validator if
definition.props[name]?.validator exists and only accept the value if it passes
(or coerce/normalize as your attribute path does), 2) if the prop was previously
in missingRequiredProps and a valid value is now provided remove that name from
missingRequiredProps and, if missingRequiredProps becomes empty, allow the
initial mount to proceed, and 3) still call this.render(true, previousProps,
undefined, true) after successful validation/mutations so behavior matches
attribute-driven updates.

In `@src/component/slots.ts`:
- Around line 68-73: The code attaches 'slotchange' only to the initially found
slot, so if the <slot> element is replaced the new element is never observed;
update useSlot/finding logic (the block that calls schedule -> findSlot(host,
name) -> slot.addEventListener('slotchange', update)) to detect slot
replacements: track the currentSlot element, and whenever you call findSlot
re-check if it's different, remove the old listener from currentSlot, attach the
'slotchange' listener to the new slot, and store currentSlot; ensure this
cleanup happens when disposed (remove listener and disconnect any observer).
Apply the same change to the other identical block (the second scheduled
findSlot block) so both code paths rebind listeners when the slot node is
replaced.

In `@src/core/utils/object.ts`:
- Around line 517-528: The Map/Set branches in deep equality (compare) use
identity checks (right.has / right.has(value)) which fails for structurally
equal but non-identical objects; update the Map handling in the compare function
to iterate left entries and for each key/value perform recursive comparison
against right's entries (use compare for keys and compare for values rather than
right.has/right.get identity checks), and update the Set handling to, for each
value in left, search through right's elements and use compare to find a
structurally equal match (removing matched elements or tracking matches to
respect multiplicity), ensuring both Map and Set use recursive compare for keys
and values instead of identity membership.

In `@src/forms/schema.ts`:
- Around line 131-137: The type guard isFieldConfig currently treats any object
with an own 'initialValue' property as FieldConfig, so raw initial-value objects
like { initialValue: 'x', other: 1 } are misclassified; update isFieldConfig to
check for 'initialValue' plus at least one other known FieldConfig-specific key
(e.g., 'validate', 'disabled', or whatever keys are defined on the
FieldConfig<T> interface) or validate that the object shape exactly matches
FieldConfig (import/compare against the FieldConfig type keys), so only true
config objects (not ordinary objects that happen to have an initialValue key)
return true; adjust the guard logic in isFieldConfig to reference those
FieldConfig keys (and update any uses in the same module such as where initial
values are stored) so object-shaped initial values are preserved.

In `@tests/motion-timeline-extras.test.ts`:
- Around line 107-109: The current assertion
expect(updates.length).toBeGreaterThanOrEqual(0) is tautological; change it to
assert the expected reduced-motion behavior by checking that no updates occurred
(e.g., expect(updates).toHaveLength(0) or expect(updates).toEqual([])). Locate
the test that builds the updates array (variable updates in this test block) and
replace the length check with a direct behavioral assertion, ensuring the test
sets the reduced-motion preference before running the timeline so the no-updates
expectation is valid.

In `@tests/motion.test.ts`:
- Around line 511-526: The test sets global reduced-motion state via
setReducedMotion(true) but resets it at the end unprotected, risking leakage if
an assertion throws; modify the test around the call to animateTo/expect
assertions to ensure setReducedMotion(null) runs in a finally block (e.g., wrap
the body after setReducedMotion(true) in try { ... } finally {
setReducedMotion(null); }) so reduced-motion is always cleared; reference
setReducedMotion and animateTo in the change.

---

Nitpick comments:
In `@src/forms/bind.ts`:
- Around line 13-20: Add `@internal` JSDoc tags to the non-exported helper
type-guard functions so they are marked as internal utilities: add a short JSDoc
block with `@internal` above isInput, isTextarea, isSelect, and isButton, and
likewise add `@internal` to the other non-exported helpers in the file (the ones
around lines 22-90 and 189-200) so all internal, non-public functions comply
with the repo rule; keep the JSDoc minimal (description optional) and place it
immediately above each function declaration.

In `@src/forms/ssr.ts`:
- Around line 41-60: The JSDoc for the public function readSerializedFormState
is missing an `@example` usage; update the comment block above the exported
readSerializedFormState<T> function to include an `@example` that demonstrates
importing readSerializedFormState, calling it with a typed id (e.g.
readSerializedFormState<MyFormValues>('register')), checking the returned
FormSnapshot<T> and restoring a form (e.g. form.restore(snapshot)); keep the
text concise, use TypeScript fenced code example, and ensure it references
FormSnapshot and the id string so consumers see the client-side hydration
pattern.
- Around line 62-71: Add a JSDoc `@example` block to the hydrateForm function's
comment that demonstrates importing createForm and hydrateForm, creating a form
instance, calling hydrateForm(form, 'register'), and handling the false return
(no serialized state found) — update the comment above hydrateForm (referencing
hydrateForm, Form, and readSerializedFormState) to include that illustrative
example following the project's JSDoc style.

In `@src/motion/effects.ts`:
- Around line 42-105: Add an `@example` block to the JSDoc for the exported
magnetic function showing typical usage and cleanup: update the comment above
export const magnetic(...) to include a short code snippet (e.g., obtaining an
element, calling magnetic(element, { strength: 0.4, radius: 100 }), and later
calling the returned cleanup()) so consumers see how to integrate and tear down
the effect.
- Around line 107-196: The JSDoc for the exported tilt function lacks an
`@example` showing how to call it; add an `@example` block to the tilt(...) JSDoc
that demonstrates typical usage (import/selection of an element, calling
tilt(el, { max, perspective, scale, respectReducedMotion }) and handling the
returned cleanup function). Update the comment above export const tilt so it
references the TiltOptions shape and shows a minimal real-world example
(including calling the returned EffectCleanup to detach listeners) to help
consumers understand usage.

In `@tests/motion-timeline-extras.test.ts`:
- Around line 12-26: The helper createElement currently creates a detached
element (el) and mock animation (anim) but does not follow the repo pattern of
appending and explicit removal; update createElement to append the created el to
document.body before returning and expose a clear way to remove it (either
return the el so callers can call el.remove(), or return a cleanup function as
part of the result), leaving anim and the mocked animate implementation intact;
this ensures tests using createElement follow the "append to document.body, then
call .remove()" lifecycle and avoid DOM state leakage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2abd3892-a9bb-4588-8221-dbbd0b26cdf9

📥 Commits

Reviewing files that changed from the base of the PR and between bb2959d and 4cc1bbc.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (74)
  • .clinerules
  • .cursorrules
  • .github/copilot-instructions.md
  • AGENT.md
  • CHANGELOG.md
  • README.md
  • docs/guide/api-core.md
  • docs/guide/components.md
  • docs/guide/forms.md
  • docs/guide/motion.md
  • docs/index.md
  • llms.txt
  • package.json
  • scripts/check-full-bundle.mjs
  • src/component/async.ts
  • src/component/component.ts
  • src/component/css.ts
  • src/component/events.ts
  • src/component/index.ts
  • src/component/inject.ts
  • src/component/keyed-list.ts
  • src/component/refs.ts
  • src/component/scope.ts
  • src/component/slots.ts
  • src/component/types.ts
  • src/core/index.ts
  • src/core/utils/array.ts
  • src/core/utils/function.ts
  • src/core/utils/index.ts
  • src/core/utils/misc.ts
  • src/core/utils/number.ts
  • src/core/utils/object.ts
  • src/core/utils/string.ts
  • src/core/utils/type-guards.ts
  • src/forms/bind.ts
  • src/forms/composables.ts
  • src/forms/create-form.ts
  • src/forms/field-array.ts
  • src/forms/index.ts
  • src/forms/schema.ts
  • src/forms/ssr.ts
  • src/forms/types.ts
  • src/forms/use-field.ts
  • src/forms/validators.ts
  • src/full.ts
  • src/index.ts
  • src/motion/animate.ts
  • src/motion/easing.ts
  • src/motion/effects.ts
  • src/motion/index.ts
  • src/motion/reduced-motion-signal.ts
  • src/motion/reduced-motion.ts
  • src/motion/scroll-progress.ts
  • src/motion/spring.ts
  • src/motion/stagger.ts
  • src/motion/timeline.ts
  • src/motion/tween.ts
  • src/motion/types.ts
  • tests/component-extensions.test.ts
  • tests/forms-extensions.test.ts
  • tests/forms.test.ts
  • tests/motion-easing.test.ts
  • tests/motion-effects.test.ts
  • tests/motion-scroll-progress.test.ts
  • tests/motion-timeline-extras.test.ts
  • tests/motion-tween.test.ts
  • tests/motion.test.ts
  • tests/utils-array-extras.test.ts
  • tests/utils-function-extras.test.ts
  • tests/utils-misc-extras.test.ts
  • tests/utils-number-extras.test.ts
  • tests/utils-object-extras.test.ts
  • tests/utils-string-extras.test.ts
  • tests/utils-type-guards-extras.test.ts

Comment thread docs/guide/forms.md Outdated
Comment thread src/component/component.ts
Comment thread src/component/slots.ts
Comment thread src/core/utils/object.ts
Comment thread src/forms/schema.ts
Comment thread tests/motion-timeline-extras.test.ts Outdated
Comment thread tests/motion.test.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 74 out of 75 changed files in this pull request and generated 1 comment.

Comment thread src/component/keyed-list.ts Outdated
@JosunLP

JosunLP commented May 21, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot fix the code rabbit comments

Copilot AI review requested due to automatic review settings May 21, 2026 13:07
@JosunLP
JosunLP removed the request for review from Copilot May 21, 2026 13:07
Copilot AI review requested due to automatic review settings May 21, 2026 13:08
@JosunLP
JosunLP removed the request for review from Copilot May 21, 2026 13:08
Copilot AI review requested due to automatic review settings May 21, 2026 13:10
@JosunLP
JosunLP removed the request for review from Copilot May 21, 2026 13:10
Copilot AI review requested due to automatic review settings May 21, 2026 13:11
@JosunLP
JosunLP removed the request for review from Copilot May 21, 2026 13:11
@JosunLP
JosunLP requested a review from Copilot May 21, 2026 13:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 75 out of 76 changed files in this pull request and generated 1 comment.

Comment thread src/motion/spring.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 75 out of 76 changed files in this pull request and generated 1 comment.

Comment thread src/component/events.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 75 out of 76 changed files in this pull request and generated 1 comment.

Comment thread src/core/utils/misc.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 75 out of 76 changed files in this pull request and generated no new comments.

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

Labels

build Changes to the build and meta files component Changes to the component module core Changes to the core module docs Changes to the documentation forms Changes to the forms module github Changes to the github meta data files motion Changes to the motion module tests Chenges to the tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants