Commit graph

17 commits

Author SHA1 Message Date
Ayo
1b3e251a9d feat!: reflect boolean props as bare attributes
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
Boolean props follow the HTML presence/absence semantics.
- We stick close to standard HTML behavior: flag="false" is treated as
true in most cases. Standard bare attributes disabled and required for
form fields are interpreted as true with non-existence as false.
- The use-cases for aria-*="false" and contenteditable="false" are also
supported by typing them in the JS class as string ("true" | "false").
This "true" | "false" opt-in is types-only. At runtime it's just a
string, and strings already serialize literally and are never removed —
so the enumerated/aria path needs no runtime code.
2026-07-20 19:57:23 +02:00
Ayo
c7d87086a2 feat: smart diffing
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-19 23:32:19 +02:00
Ayo
861310c6bf feat: typed props
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
- jsdocs / types change only to enforce giving shapt to `static props`
2026-07-19 18:27:52 +02:00
Ayo
ce30b114a2 chore: new demo workspace & e2e tests
- this adds a new demo web app with vite HMR for development
- all examples are covered with e2e tests
2026-07-05 15:40:53 +02:00
Ayo
dd6dc96f1b chore: organize examples 2023-11-30 15:23:44 +01:00
Ayo
f8aac1420f counter example 2023-11-20 22:14:37 +01:00
Ayo
6869ccb3e7 feat: more explainer for using WebComponent.props
- update readme with more read/write access explanation and example
- update demo page to use .props
2023-11-18 10:31:12 +01:00
Ayo
910a5096d0 feat: props Proxy for camelCase counterparts
- provide easy access to any observed attribute.
- update README examples
- update JSDoc examples
2023-11-17 23:10:02 +01:00
Ayo
aabbb09c89 feat: better example to show observed attrs are only smallcase 2023-11-17 16:08:25 +01:00
Ayo
bef423fde1 feat: support boolean attribute
if no value is passed to an attribute it returns 'true'
2023-11-17 15:42:45 +01:00
Ayo
8a977ce3e2 feat: access kebab-case props with camelCase counterpart 2023-10-20 11:58:36 +02:00
Ayo
c360bd1b7f feat: make package type module; rename to .mjs 2023-10-19 18:10:10 +02:00
Ayo
9568c4e0d4 feat: onDestroy life-cycle hook 2023-09-25 18:15:55 +02:00
Ayo
0ba7738da1 feat: only call onChanges when previousValue !== currentValue 2023-09-17 13:48:57 +02:00
Ayo
1287b42186 chore: formatting; add sample 2023-09-17 01:36:58 +02:00
Ayo
9b10824928 chore: update examples 2023-09-17 00:00:22 +02:00
Ayo
c9db257d98 chore: initialize package; update examples 2023-09-16 23:33:46 +02:00
Renamed from index.html (Browse further)