feat!: adopt object-based menu and helper APIs#126
Merged
Conversation
QuentinRoy
force-pushed
the
feat/new-item-api
branch
from
July 23, 2026 17:04
09f121e to
1be0e28
Compare
Menu items are now a single recursive shape `{ label, children? }`:
- the `name` property is renamed to `label` (#108),
- the string shorthand is removed; every item is an object,
- `MMItem#getChildrenByName` is renamed to `getChildrenByLabel`.
`MarkingMenu(items, parentDOM, options)` becomes
`MarkingMenu({ items, parent, ...options })` (#109).
BREAKING CHANGE: item `name` is now `label`, string items are no longer
accepted, and MarkingMenu takes a single options object.
Closes #108, closes #109.
QuentinRoy
force-pushed
the
feat/new-item-api
branch
from
July 23, 2026 17:09
1be0e28 to
fa36187
Compare
QuentinRoy
force-pushed
the
feat/new-item-api
branch
from
July 23, 2026 17:42
2e1415d to
643eb2d
Compare
8 tasks
QuentinRoy
added a commit
that referenced
this pull request
Jul 26, 2026
Replaces the conventional-commits-driven standard-version flow with Changesets for changelog/version management: - CI-driven release via changesets/action: opens/updates a Version Packages PR on push to master and publishes on merge, using npm trusted publishing (OIDC) instead of a long-lived NPM_TOKEN, with GitHub Releases enabled. - Keep GitHub-linked changelog entries via @changesets/changelog-github. - Drop the PR-title conventional-commit lint and Renovate's :semanticCommits preset, since nothing consumes that format anymore. - Renovate dependency PRs get no automatic changeset, matching prior behavior where deps bumps didn't trigger a release on their own. - Backfill a changeset for the unreleased breaking change in #126 (object-based menu API), filed as minor rather than major to stay in the 0.x range per this project's convention. Two manual follow-ups outside this PR: install the changesets bot GitHub App, and configure npm trusted publishing for this package (workflow filename: release.yml). Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Breaking API redesign for #108 and #109, plus a consistency pass that converts the remaining multi-argument helper APIs to named options objects. This is a clean break for the pre-1.0 package; there is no deprecation shim. The TypeScript migration (#123) will build on top of this PR.
Public API changes
#108 — single recursive
MenuItemshape{ label, children? }objects recursively.nameis renamed tolabelthroughout the model, layout, demo, documentation, and selection values.MMItem#getChildrenByNameis renamed togetChildrenByLabel.idsupport is preserved.#109 — options-object call signature
MarkingMenu(items, parentDOM, options)becomes:Example migration:
Selections now expose
labelinstead ofname.Helper API consistency
The internal and exported helper APIs now use named configuration objects where positional arguments were ambiguous or numerous, including:
connectLayout,createStrokeCanvas, and gesture feedback factories;MMItemconstruction and recursive model creation;walkMMModel,findMMItem, articulation-point detection, and point lookup).Related call sites, tests, and JSDoc were updated together. A small number of local helpers remain positional where their call sites are unambiguous.
Review notes
Validation
yarn test— 101/101 tests passyarn lint— 0 errors; 4 warnings remainyarn format:check— cleanyarn buildandyarn build-demo— passCloses #108, closes #109.