Commit graph

127 commits

Author SHA1 Message Date
b476b8651e
Bump minor version number 2023-12-30 13:09:35 +01:00
cdc56f5848
Add nested state change forwarding 2023-12-27 19:58:49 +01:00
37948987b0
Add composed states 2023-12-27 18:52:42 +01:00
b7bb093a0c
Compare strings in component attributes 2023-12-27 18:50:11 +01:00
7febebce65
Map names of forward states to "value" 2023-12-27 18:50:11 +01:00
64b73676cb
Make state components update attributes on state change 2023-12-23 21:16:58 +01:00
b46c5d1d5c
Fix oversights in forwarded state caching 2023-12-23 21:05:55 +01:00
99d791921e
Move description above import block in readme 2023-12-23 18:25:05 +01:00
b372b33f6c
Bump minor version number 2023-12-23 17:48:10 +01:00
e80801b639
Cache forwarded states to avoid duplication 2023-12-23 17:46:43 +01:00
e38d556531
Add fallback option to forwarded state 2023-12-23 17:31:45 +01:00
cebd867bd2
Make reactive elements keep a weak ref to their reactive source 2023-12-23 17:31:01 +01:00
ac484b223d
Re-structure readme 2023-12-22 18:43:47 +01:00
4a348f7806
Remove bind function from readme 2023-12-22 01:02:59 +01:00
3664c59cc0
Bump minor version number 2023-12-22 01:00:28 +01:00
04ab913b72
Fix error when accessing undefined StoredState values 2023-12-22 00:59:28 +01:00
de88e6a9d6
Bump minor version number 2023-12-22 00:41:32 +01:00
ae334801d4
Add forward method do state
This returns a thin wrapper State with its value proxied to a given
attribute on the backend state.
2023-12-22 00:38:54 +01:00
2a515dc47d
Bump minor version number and add website link 2023-12-21 23:58:24 +01:00
f1f79945dd
Add state management module
Moved over from darkwiiplayer/js project
2023-12-21 23:54:06 +01:00
1e8b033817
Bump minor version number 2023-12-21 23:50:01 +01:00
79a728520e
Replace bind function with proper reactivity
* Detects state elements
* Two-Way binding for supported attributes
2023-12-21 23:36:48 +01:00
bc1383f07d
Fix unnecessary "is" attribute being added to nodes 2023-12-15 00:23:05 +01:00
0bb3bd4631 Add import examples to readme 2023-12-11 10:52:49 +01:00
cc7b49d438 Update metadata 2023-10-04 10:35:56 +02:00
ee51af8176
Add package.json (yes, this is now on npm) 2023-09-29 17:51:49 +02:00
ee88c467ee
Rework the readme somewhat 2023-09-29 17:16:24 +02:00
3f865aa7c1
Extract from darkwiiplayer/js repository
All commits before this one have been cherry-picked and partly modified
from the `darkwiiplayer/js` repository, where skooma was originally at
home, and may at times have some weird wording, as they were written in
the context of that mixed repository.
2023-09-29 16:53:49 +02:00
e7afbaf3c1
Allow returning text in skooma bind method 2023-09-29 15:10:46 +02:00
633332d4ea
Further refactor code 2023-09-29 15:10:35 +02:00
53e25e223e
Mildly refactor skooma.js 2023-09-29 15:10:28 +02:00
77af61fc45
Improve skooma warning on undefined arguments 2023-09-29 15:10:28 +02:00
4128cb53aa
Add fragment helper to skooma.js 2023-09-29 15:10:26 +02:00
0f2e596c54
Fix bug introduced in latest version 2023-09-29 15:10:16 +02:00
d706e09da1
Replace mechanism for creating customized built-in elements 2023-09-29 15:09:37 +02:00
3be6f513b3
Fix error in skooma 2023-09-29 15:09:30 +02:00
64f28972c0
Remove promise handling from skooma.js
This was really just feature creep and doesn't have to be part of
skooma. It could easily be implemented as an independent function or
module.
2023-09-29 15:09:30 +02:00
4621790fbd
Add mechanism for custom built-in elements
Note: Fuck Javascript
2023-09-29 15:09:30 +02:00
16ac15b7c3
Add explicit empty value to skooma
Optional arguments in skooma can be very annoying at times:

	html.span("foo: ", may_return_undefined())

Skooma will produce a warning to inform the user that one of their
arguments is undefined as is is often unintended.
The new `empty` value provides a mechanism to explicitly ignore a single
argument, should it be optional

	html.span("foo: ", may_return_undefined() || empty)
2023-09-29 15:09:30 +02:00
9bb5f82302
Add check for null in skooma as well 2023-09-29 15:09:30 +02:00
0366b3822b
Handle undefined arguments without crashing in skooma 2023-09-29 15:09:30 +02:00
5f165d1071
Refactor CSS and add "style" function 2023-09-29 15:09:28 +02:00
b40ee8d5b1
Rework skooma.bind function 2023-09-29 15:09:17 +02:00
0d67ca1f5e
Make skooma/bind more robust 2023-09-29 15:09:09 +02:00
e8d18ae19a
Extend skooma.text function to support template strings 2023-09-29 15:09:09 +02:00
694b4da6a4
Add current property to skooma bound elements
Elements bound witht he skooma bind function now get a `current`
property patched in.
2023-09-29 15:09:09 +02:00
60b40e2bc0
Add the skooma bind function 2023-09-29 15:09:09 +02:00
b440eec373
Add text wrapper to skooma.js 2023-09-29 15:09:09 +02:00
6094fd602d
Add handle helper function to skooma 2023-09-29 15:09:09 +02:00
5687ba9b22
Add more examples to show off skooma's features 2023-09-29 15:09:09 +02:00