Commit graph

49 commits

Author SHA1 Message Date
Ayo Ayco
488743e011
chore: format code with prettier (#14) 2023-12-10 10:58:46 +01:00
Ayo
ec50f0f86e refactor(templating): attributes handling & JSX
- support unparented DOM nodes
- simpler attributes handling
- jsx-like syntax
- use .mjs for utils
2023-12-09 22:35:58 +01:00
Ayo
538aa01ecd feat(templating): support adding aria- attributes 2023-12-09 09:54:35 +01:00
Ayo
669fee1d49 feat(templating): only assign standard DOM props 2023-12-09 02:05:32 +01:00
Ayo
6844ffe9f2 feat(templating): support more standard attrs
- data- <-> dataset.
- for <-> htmlFor
- class <-> className
2023-12-09 01:57:13 +01:00
Ayo
27a5fb3024 feat(templating): support for non on-event props
- use class or className
- only on-event props are tolowercase'd
2023-12-09 00:48:56 +01:00
Ayo
b4f3b98ee4 feat: use standard event prop behavior
- call .toLowerCase() on attribute props
2023-12-09 00:15:39 +01:00
Ayo
7bf37d75db feat: use standard event handler props 2023-12-09 00:11:32 +01:00
Ayo
26129a5934 feat: helpful TypeError message 2023-12-08 23:36:01 +01:00
Ayo
07bb2d850a feat: simpler TypeError; use proxy default err 2023-12-08 23:14:03 +01:00
Ayo
bea93f69f7 feat: improve error report for type mismatch 2023-12-08 22:40:03 +01:00
Ayo
98c89624f9 feat: throw TypeError when setting different type 2023-12-08 22:34:25 +01:00
Ayo
85284e9e42 fix: wrong previous dom used in diffing 2023-12-08 22:13:34 +01:00
Ayo Ayco
3c1b3b0893
feat: templating (#9) 2023-12-08 21:31:05 +01:00
Ayo Ayco
00648883fa
feat: props blueprint (#8) 2023-12-08 18:00:40 +01:00
Ayo
f56068e76e chore: export all utils 2023-12-08 15:05:27 +01:00
Ayo
b613d8e77c refactor: use index exports 2023-12-08 14:45:12 +01:00
Ayo Ayco
703ef9e45d
feat: initial utils distribution (#7) 2023-12-08 13:15:00 +01:00
Ayo
d7651b5f33 feat: support objects in props 2023-12-07 17:30:53 +01:00
Ayo
6ae5961c4f feat(site): show link to FAQs issue 2023-12-02 09:39:37 +01:00
Ayo Ayco
73dd374a3e
feat: attach-effect (#2)
We are now able to attach "side effects" to property value changes, from inside the component and outside.
2023-12-01 08:42:10 +01:00
Ayo
9480f37844 chore: format 2023-11-26 04:19:19 +01:00
Ayo
6027f664b3 feat: preserve props type 2023-11-26 03:43:41 +01:00
Ayo
fa506c8c0f refactor: use Proxy of empty object 2023-11-23 22:15:25 +01:00
Ayo
15a3b1ce33 chore: clean up; update readme docs 2023-11-23 22:03:26 +01:00
Ayo
eeb0b1ef59 feat: allow string | Node | (string | Node)[] 2023-11-21 21:05:22 +01:00
Ayo
de673e2f12 feat: remove barrel file 2023-11-19 18:25:49 +01:00
Ayo
29c26be58c refactor: move initializeProp to constructor 2023-11-19 00:35:07 +01:00
Ayo
2c285a60bb refactor: remove constructor; move initializeProps to connectedCallback 2023-11-19 00:12:30 +01:00
Ayo
a3845b7e7c refactor: prevent attribute changing twice 2023-11-18 23:38:06 +01:00
Ayo
d54ff6fa94 fix: illegal invocation 2023-11-18 23:30:56 +01:00
Ayo
341424187b refactor: only pass setter to handler; initializeProps on attribute changes 2023-11-18 23:28:10 +01:00
Ayo
74e7c16335 refactor: add return types; organize code 2023-11-18 22:47:26 +01:00
Ayo
463136eea8 feat: assign DOMStringMap type to props 2023-11-18 02:50:03 +01:00
Ayo
b73a62dc35 feat: camelCase backwards compatibility 2023-11-18 00:45:35 +01:00
Ayo
2616591315 refactor: make props read-only 2023-11-17 23:31:10 +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
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
bfacf84b45 refactor: update jsdocs types & example 2023-11-10 22:04:46 +01:00
Ayo
157e9ed8cb fix: supper.connectedCallback doesn't exist 2023-11-09 11:01:19 +01:00
Ayo
d0e144953a feat: add jsdoc example and links 2023-11-06 23:59:46 +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
6ad2ab5707 fix: missing dts 2023-10-19 18:17:30 +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
b3892cf95d feat: publish type definitions 2023-09-18 22:52:38 +02:00