Commit graph

23 commits

Author SHA1 Message Date
ayo
20e31e4796
fix: nested components no longer wipe each other on re-render (#59)
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-20 23:46:14 +02:00
Ayo
d230d962ec fix: string templates also renders in shadow DOM
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-20 20:46:43 +02:00
Ayo
f290e049bd feat: custom prop <> attr conversion
Override `toAttribute()` and `fromAttribute()` methods to
implement custom conversion between props and attributes
2026-07-20 20:18:06 +02:00
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
133881a127 feat: composing stylesheets
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-19 21:19:01 +02:00
Ayo
2da6cd5afc feat: new cem analyzer plugin (cem-plugin)
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-19 21:06:22 +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
737ef54763 fix: boolean props w/ bare attr as true
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-19 18:14:13 +02:00
Ayo
f320e845bb chore: nightly full e2e and size limit tests
Some checks are pending
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-05 16:33:10 +02:00
Ayo
6af7598973 chore: add github test actions
Some checks are pending
Tests / Unit (happy-dom) (push) Waiting to run
Tests / E2E (Chromium + Firefox + WebKit) (push) Waiting to run
Tests / Size limit (push) Waiting to run
2026-07-05 16:10:35 +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
5503e57897 feat: buffer attribute changes until end of onInit
The assumption of everything starting at `onInit` breaks when browsers
triggers `attributeChanged` first after parsing HTML. This buffers all
property initialization after `onInit` logic for more predictable
behavior
2026-07-05 11:54:44 +02:00
Ayo
61d0a5adf9 feat!: better distinction between props & attr
`onChanges` now introduces an `attribute` in its arguments and
repurposes the `property` to be used for this.props lookup
- `property` is now the camelCase key for `this.props`
- `attribute` is the kebab-case attribute name (i.e., what used to be
  `property` before v5)
2026-07-05 11:43:56 +02:00
Ayo
0e367fa2ec fix: wrong attr behavior caused by empty strings 2026-07-05 11:25:05 +02:00
Ayo
248ef14322 fix: no TypeErorr for default props; add strictProps
- Remove thrown error if type difference is found in defined props
- Introduce strictProps toggle for error behavior
- Extract size changes to its own log file
2026-07-05 11:11:36 +02:00
Ayo
394e094693 fix: safer prop clone w/ define-time validation
- This implements clear errors & warnings when non-serializeable values are assigned to properties
- Adjusts the size limit budget to allow better messages
- Updates references to size limits
2026-07-05 10:49:16 +02:00
Ayo
4ffb5f0674 fix: no attribute writes in constructor 2026-07-05 10:30:01 +02:00
Ayo
ec2033fe26 test: cover current behavior 2026-07-05 09:37:08 +02:00
Ayo
03d4788514 test: add WebComponent test 2026-01-25 19:29:37 +01:00
a35e1901f0 test: organize test files 2025-03-22 10:14:35 +01:00
833e835f65 chore: format code 2024-12-19 22:43:12 +01:00
4f6f441b3b test: add vitest & initial tests 2024-11-10 21:31:48 +01:00