Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .changeset/warm-planes-refactor.md

This file was deleted.

20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# @openproject/stimulus-elements

## 0.3.0

### Minor Changes

- [#1](https://github.com/opf/stimulus-elements/pull/1) [`5d606a3`](https://github.com/opf/stimulus-elements/commit/5d606a38e1a14f8b5f43ddd3a49c4740852a5c0d) Thanks [@myabc](https://github.com/myabc)! - Fix `WithElements` to camelize keys like the runtime, and warn on colliding element keys

- `WithElements<{ menu_item: string }>` now yields `menuItemElement` /
`menuItemElements` / `hasMenuItemElement`, matching the runtime accessors.
Previously it produced the wrong `menu_itemElement` names; if you worked
around this by passing pre-camelized keys, those still work — but usages
typed against the old snake_case accessor names must be renamed.
- Element keys whose generated accessor names collide (e.g. `foo` and `_foo`
both produce `hasFooElement`, or `foo`'s predicate vs `hasFoo`'s getter)
now emit a console warning naming both keys; the later definition wins that
property, as before.
- The naming rule (key → accessor triple + attribute suffix) now lives in one
module, with the acronym behaviour (`htmlURL` → `html-u-r-l`) locked in by
tests.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openproject/stimulus-elements",
"version": "0.2.0",
"version": "0.3.0",
"description": "Declarative, controller-scoped element lookups for Stimulus — like targets, backed by any CSS selector.",
"type": "module",
"main": "./dist/index.js",
Expand Down