20e31e4796
fix: nested components no longer wipe each other on re-render ( #59 )
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-20 23:46:14 +02:00
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
1b3e251a9d
feat!: reflect boolean props as bare attributes
...
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
c7d87086a2
feat: smart diffing
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-19 23:32:19 +02:00
133881a127
feat: composing stylesheets
Tests / Unit (push) Waiting to run
Tests / E2E (push) Waiting to run
2026-07-19 21:19:01 +02:00
861310c6bf
feat: typed props
...
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
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
eeb0b1ef59
feat: allow string | Node | (string | Node)[]
2023-11-21 21:05:22 +01:00
Ayo
ad359a60ef
refactor hello-world component
2023-11-21 11:23:20 +01:00
Ayo
f8aac1420f
counter example
2023-11-20 22:14:37 +01:00
Ayo
de673e2f12
feat: remove barrel file
2023-11-19 18:25:49 +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
fad385d5b6
move sample.html
2023-11-17 23:44:18 +01:00
Ayo
53817036d9
add quick-start sample as demo page
2023-11-17 23:43:49 +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
d3573ec5b2
chore: better example with explanations
2023-11-12 16:06:47 +01:00
Ayo
859260f578
fix: demo import
2023-11-10 22:06:55 +01:00
Ayo
feed3f7005
chore: deliver .js instead of .mjs
2023-10-29 18:10:42 +01:00
Ayo
09ffc5d99c
refactor: add class description; private camelCase util
2023-10-27 08:44:55 +02: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
16108193fd
chore: add template vs render() section to readme
2023-09-22 09:55:13 +02:00
Ayo
b3892cf95d
feat: publish type definitions
2023-09-18 22:52:38 +02:00
Ayo
d5b83ed847
refactor: revert onChanges param
2023-09-17 20:35:21 +02:00
Ayo
a5a39e314a
chore: update test component
2023-09-17 20:18:32 +02:00
Ayo
e07c97b760
feat: afterViewInit hook; change onChanges param structure
2023-09-17 20:15:55 +02:00
Ayo
e4a5ce37bd
feat: static properties
2023-09-17 14:45:46 +02:00
Ayo
0ba7738da1
feat: only call onChanges when previousValue !== currentValue
2023-09-17 13:48:57 +02:00
Ayo
5269a4dbfa
chore: update examples
2023-09-17 02:09:02 +02:00
Ayo
7cfef1b9c8
feat: onInit hook
2023-09-17 02:05:12 +02:00
Ayo
1287b42186
chore: formatting; add sample
2023-09-17 01:36:58 +02:00
Ayo
4e122a827d
feat: expose onChanges hook
2023-09-17 00:48:01 +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