sprae 12.4.1 → 12.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +54 -2
- package/directive/class.js +1 -4
- package/directive/each.js +15 -14
- package/directive/else.js +1 -0
- package/directive/html.js +4 -3
- package/directive/if.js +12 -9
- package/directive/portal.js +4 -3
- package/directive/scope.js +7 -3
- package/directive/style.js +3 -6
- package/dist/sprae.js +3 -3
- package/dist/sprae.js.map +3 -3
- package/dist/sprae.umd.js +3 -3
- package/dist/sprae.umd.js.map +3 -3
- package/package.json +1 -2
- package/readme.md +32 -21
- package/sprae.js +28 -55
- package/store.js +7 -2
- package/types/core.d.ts +7 -0
- package/types/core.d.ts.map +1 -1
- package/types/directive/class.d.ts.map +1 -1
- package/types/directive/each.d.ts.map +1 -1
- package/types/directive/else.d.ts.map +1 -1
- package/types/directive/html.d.ts.map +1 -1
- package/types/directive/if.d.ts.map +1 -1
- package/types/directive/portal.d.ts.map +1 -1
- package/types/directive/scope.d.ts.map +1 -1
- package/types/directive/style.d.ts.map +1 -1
- package/types/sprae.d.ts +3 -3
- package/types/sprae.d.ts.map +1 -1
- package/types/store.d.ts.map +1 -1
package/sprae.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import store from "./store.js";
|
|
7
7
|
import { batch, computed, effect, signal, untracked } from './core.js';
|
|
8
8
|
import * as signals from './signal.js';
|
|
9
|
-
import sprae, { use, decorate, directive, modifier, parse, throttle, debounce, _off, _state, _on, _dispose, _add } from './core.js';
|
|
9
|
+
import sprae, { use, decorate, directive, modifier, parse, throttle, debounce, _off, _state, _on, _dispose, _add, start } from './core.js';
|
|
10
10
|
|
|
11
11
|
import _if from "./directive/if.js";
|
|
12
12
|
import _else from "./directive/else.js";
|
|
@@ -28,7 +28,7 @@ import _hidden from "./directive/hidden.js";
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
Object.assign(directive, {
|
|
31
|
-
_:
|
|
31
|
+
_: _default,
|
|
32
32
|
'': _spread,
|
|
33
33
|
class: _class,
|
|
34
34
|
text: _text,
|
|
@@ -58,24 +58,28 @@ const dir = (target, name, expr, state) => {
|
|
|
58
58
|
let [dirName, ...mods] = name.split('.'), create = directive[dirName] || directive._
|
|
59
59
|
|
|
60
60
|
return () => {
|
|
61
|
-
|
|
61
|
+
// decorate trigger to resolve target from modifiers (parent, root, body, etc.)
|
|
62
|
+
let change = signal(0),
|
|
63
|
+
|
|
64
|
+
// throttle prevents multiple updates within one tick as well as isolates stack for each update
|
|
65
|
+
trigger = decorate(Object.assign(throttle(() => change.value++), { target }), mods),
|
|
66
|
+
|
|
67
|
+
el = trigger.target ?? target
|
|
68
|
+
|
|
69
|
+
let update = create(el, state, expr, dirName)
|
|
62
70
|
|
|
63
71
|
if (!update?.call) return update?.[_dispose]
|
|
64
72
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
change = signal(0), // signal authorized to trigger effect: 0 = init; >0 = trigger
|
|
68
|
-
count = 0, // called effect count
|
|
69
|
-
evaluate = update.eval ?? parse(expr).bind(target),
|
|
73
|
+
let count = 0,
|
|
74
|
+
evaluate = update.eval ?? parse(expr).bind(el),
|
|
70
75
|
_out, out = () => (typeof _out === 'function' && _out(), _out=null) // effect trigger and invoke may happen in the same tick, so it will be effect-within-effect call - we need to store output of evaluate to return from trigger effect
|
|
71
76
|
|
|
72
|
-
state =
|
|
77
|
+
state = el[_state] ?? state
|
|
73
78
|
|
|
74
|
-
return effect(() =>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
))
|
|
79
|
+
return effect(() => {
|
|
80
|
+
const result = change.value == count ? (trigger()) : (count = change.value, _out = evaluate(state, update))
|
|
81
|
+
return out
|
|
82
|
+
})
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -106,6 +110,10 @@ Object.assign(modifier, {
|
|
|
106
110
|
throttle: (fn, a) => throttle(fn, scheduler(a)),
|
|
107
111
|
/** Runs callback after delay. Supports: tick (default), raf, idle, N, Nms, Ns, Nm. */
|
|
108
112
|
delay: (fn, a) => ((sched = scheduler(a)) => (e) => sched(() => fn(e)))(),
|
|
113
|
+
/** Shortcut for delay-tick (next microtask). */
|
|
114
|
+
tick: (fn) => (e) => queueMicrotask(() => fn(e)),
|
|
115
|
+
/** Shortcut for delay-raf (next animation frame). */
|
|
116
|
+
raf: (fn) => (e) => requestAnimationFrame(() => fn(e)),
|
|
109
117
|
|
|
110
118
|
/** Calls handler only once. */
|
|
111
119
|
once: (fn, _done, _fn) => (_fn = (e) => !_done && (_done = 1, fn(e)), _fn.once = true, _fn),
|
|
@@ -189,11 +197,13 @@ use({
|
|
|
189
197
|
if (/\bawait\s/.test(expr)) expr = `return (async()=>{${expr}})()`
|
|
190
198
|
return sprae.constructor(`with(arguments[0]){${expr}}`)
|
|
191
199
|
},
|
|
200
|
+
// these 2 exceptions might look inconsistent, but arguably that's the cleanest way to avoid coupling
|
|
192
201
|
dir: (el, name, expr, state) => {
|
|
193
|
-
// sequences
|
|
202
|
+
// sequences: handle own modifiers, return dispose
|
|
194
203
|
if (name.includes('..')) return () => _seq(el, state, expr, name)[_dispose]
|
|
195
204
|
return name.split(':').reduce((prev, str) => {
|
|
196
|
-
|
|
205
|
+
// events: handle own modifiers, return dispose
|
|
206
|
+
let start = str.startsWith('on') ? () => _event(el, state, expr, str)[_dispose] : dir(el, str, expr, state)
|
|
197
207
|
return !prev ? start : (p, s) => (p = prev(), s = start(), () => { p(); s() })
|
|
198
208
|
}, null)
|
|
199
209
|
},
|
|
@@ -211,47 +221,10 @@ sprae.modifier = modifier
|
|
|
211
221
|
* Disposes a spraed element, cleaning up all effects and state.
|
|
212
222
|
* @param {Element} el - Element to dispose
|
|
213
223
|
*/
|
|
214
|
-
sprae.dispose = (el) => el[_dispose]?.()
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Auto-initializes sprae on dynamically added elements.
|
|
219
|
-
* Uses MutationObserver to detect new DOM nodes and apply directives.
|
|
220
|
-
*
|
|
221
|
-
* @param {Element} [root=document.body] - Root element to observe
|
|
222
|
-
* @param {Object} [values] - Initial state values
|
|
223
|
-
* @returns {Object} The reactive state object
|
|
224
|
-
*
|
|
225
|
-
* @example
|
|
226
|
-
* ```js
|
|
227
|
-
* // Auto-init on page load
|
|
228
|
-
* sprae.start(document.body, { count: 0 })
|
|
229
|
-
* ```
|
|
230
|
-
*/
|
|
231
|
-
const start = sprae.start = (root = document.body, values) => {
|
|
232
|
-
const state = store(values)
|
|
233
|
-
sprae(root, state);
|
|
234
|
-
const mo = new MutationObserver(mutations => {
|
|
235
|
-
for (const m of mutations) {
|
|
236
|
-
for (const el of m.addedNodes) {
|
|
237
|
-
// el can be spraed or removed by subsprae (like within :each/:if)
|
|
238
|
-
if (el.nodeType === 1 && el[_state] === undefined && root.contains(el)) {
|
|
239
|
-
// even if element has no spraeable attrs, some of its children can have
|
|
240
|
-
root[_add](el)
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
for (const el of m.removedNodes) el.nodeType === 1 && el[_dispose]?.()
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
mo.observe(root, { childList: true, subtree: true });
|
|
247
|
-
return state
|
|
248
|
-
}
|
|
249
|
-
|
|
224
|
+
const dispose = sprae.dispose = (el) => el[_dispose]?.()
|
|
250
225
|
|
|
251
|
-
/** Package version (injected by bundler) */
|
|
252
|
-
sprae.version = "[VI]{{inject}}[/VI]"
|
|
253
226
|
|
|
254
|
-
|
|
227
|
+
sprae.start = start
|
|
255
228
|
|
|
256
229
|
export default sprae
|
|
257
230
|
export { sprae, store, signal, effect, computed, batch, untracked, start, use, throttle, debounce, dispose }
|
package/store.js
CHANGED
|
@@ -61,8 +61,13 @@ export const store = (values, parent) => {
|
|
|
61
61
|
[_signals]: signals
|
|
62
62
|
}), {
|
|
63
63
|
get: (_, k) => {
|
|
64
|
-
if (k in signals)
|
|
65
|
-
|
|
64
|
+
if (k in signals) {
|
|
65
|
+
return (signals[k] ? signals[k].valueOf() : signals[k])
|
|
66
|
+
}
|
|
67
|
+
if (parent) {
|
|
68
|
+
return parent[k]
|
|
69
|
+
}
|
|
70
|
+
return (typeof globalThis[k] === 'function' && !globalThis[k].prototype ? globalThis[k].bind(globalThis) : globalThis[k])
|
|
66
71
|
},
|
|
67
72
|
|
|
68
73
|
set: (_, k, v) => {
|
package/types/core.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ export function use(config: SpraeConfig): void;
|
|
|
77
77
|
export function decorate(fn: Function & {
|
|
78
78
|
target?: Element;
|
|
79
79
|
}, mods: string[]): Function;
|
|
80
|
+
/** MutationObserver reference, set by sprae.start() */
|
|
81
|
+
export let mo: any;
|
|
82
|
+
export function mutate(fn: any): void;
|
|
83
|
+
export function start(root?: Element, values?: any): any;
|
|
80
84
|
export function frag(tpl: HTMLTemplateElement | FragmentLike): FragmentLike;
|
|
81
85
|
export function dashcase(str: string): string;
|
|
82
86
|
export function attr(el: Element, name: string, v: string | boolean | null | undefined): void;
|
|
@@ -219,4 +223,7 @@ export type FragmentLike = {
|
|
|
219
223
|
* @returns {SpraeState & Object} The reactive state object associated with the element.
|
|
220
224
|
*/
|
|
221
225
|
declare function sprae(el?: Element, state?: any): SpraeState & any;
|
|
226
|
+
declare namespace sprae {
|
|
227
|
+
let version: any;
|
|
228
|
+
}
|
|
222
229
|
//# sourceMappingURL=core.d.ts.map
|
package/types/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../core.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../core.js"],"names":[],"mappings":"AAIA,uEAAuE;AACvE,2BAA8D;AAE9D,oDAAoD;AACpD,mCAAqC;AAErC,0CAA0C;AAC1C,gCAA+B;AAE/B,2CAA2C;AAC3C,iCAAiC;AAEjC,yCAAyC;AACzC,iCAAkC;AAElC,sC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;;;;eAC7C,CAAC,GAAC,EAAE,EAAE,EAAE,MAAM,GAAC,KAAK,MAAM,CAAC,GAAC,CAAC;;;;YAC7B,CAAC,GAAC,EAAE,EAAE,EAAE,MAAM,GAAC,KAAK,GAAC;;;;gBACrB,CAAC,GAAC,EAAE,EAAE,EAAE,MAAM,GAAC,KAAK,GAAC;;;;UACrB,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,KAAQ,KAAK,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;;;;;;gBAmFrF,IAAI,EAAE;;;;aACN,gBAAgB;;;;YAChB,MAAM,IAAI;;;;iBACV,CAAC,EAAE,EAAE,IAAI,KAAK,IAAI;;;;gBAClB,IAAI,EAAE;;;;qBACN,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI;;AAxOpC;;;;;;;GAOG;AAEH;;;;;GAKG;AAEH;;;GAGG;AAEH;;;;;;GAMG;AACH,4BAJW,OAAO,gBAEL,UAAU,MAAS,CA4D/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../directive/class.js"],"names":[],"mappings":"AAWe,8BANJ,OAAO,eAEP,MAAM,QACN,MAAM,GACJ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../directive/class.js"],"names":[],"mappings":"AAWe,8BANJ,OAAO,eAEP,MAAM,QACN,MAAM,GACJ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAWpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"each.d.ts","sourceRoot":"","sources":["../../directive/each.js"],"names":[],"mappings":"AAUe,+BALJ,mBAAmB,GAAG,OAAO,oBAE7B,MAAM,GACJ;IAAE,IAAI,WAAW;IAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"each.d.ts","sourceRoot":"","sources":["../../directive/each.js"],"names":[],"mappings":"AAUe,+BALJ,mBAAmB,GAAG,OAAO,oBAE7B,MAAM,GACJ;IAAE,IAAI,WAAW;IAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAuG5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"else.d.ts","sourceRoot":"","sources":["../../directive/else.js"],"names":[],"mappings":"AAQe,8BAHJ,OAAO,GAAG,mBAAmB,GAC3B,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"else.d.ts","sourceRoot":"","sources":["../../directive/else.js"],"names":[],"mappings":"AAQe,8BAHJ,OAAO,GAAG,mBAAmB,GAC3B,MAAM,IAAI,CAiBtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../directive/html.js"],"names":[],"mappings":"AASe,8BAJJ,OAAO,GAAG,mBAAmB,eAE3B,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,KAAK,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../directive/html.js"],"names":[],"mappings":"AASe,8BAJJ,OAAO,GAAG,mBAAmB,eAE3B,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,KAAK,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAuB3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"if.d.ts","sourceRoot":"","sources":["../../directive/if.js"],"names":[],"mappings":"AASe,8BAJJ,OAAO,GAAG,mBAAmB,eAE3B,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"if.d.ts","sourceRoot":"","sources":["../../directive/if.js"],"names":[],"mappings":"AASe,8BAJJ,OAAO,GAAG,mBAAmB,eAE3B,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CA4ChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../directive/portal.js"],"names":[],"mappings":"AAQe,8BALJ,OAAO,oBAEP,MAAM,GACJ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../directive/portal.js"],"names":[],"mappings":"AAQe,8BALJ,OAAO,oBAEP,MAAM,GACJ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,KAAK,IAAI,CAgC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../directive/scope.js"],"names":[],"mappings":"AASe,8BAJJ,OAAO,mBAEL,CAAC,MAAM,EAAE,MAAS,CAAC,CAAC,KAAK,KAAQ,QAAW,CAAC,KAAK,IAAI,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../directive/scope.js"],"names":[],"mappings":"AASe,8BAJJ,OAAO,mBAEL,CAAC,MAAM,EAAE,MAAS,CAAC,CAAC,KAAK,KAAQ,QAAW,CAAC,KAAK,IAAI,GAAG,OAAO,CAgC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../directive/style.js"],"names":[],"mappings":"AAWe,8BANJ,OAAO,eAEP,MAAM,QACN,MAAM,GACJ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,mBAAmB,KAAK,GAAG,CAAC,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../directive/style.js"],"names":[],"mappings":"AAWe,8BANJ,OAAO,eAEP,MAAM,QACN,MAAM,GACJ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,mBAAmB,KAAK,GAAG,CAAC,KAAK,IAAI,CAehG"}
|
package/types/sprae.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { effect } from './core.js';
|
|
|
6
6
|
import { computed } from './core.js';
|
|
7
7
|
import { batch } from './core.js';
|
|
8
8
|
import { untracked } from './core.js';
|
|
9
|
-
|
|
9
|
+
import { start } from './core.js';
|
|
10
10
|
import { use } from './core.js';
|
|
11
11
|
import { throttle } from './core.js';
|
|
12
12
|
import { debounce } from './core.js';
|
|
13
|
-
export
|
|
14
|
-
export { sprae, store, signal, effect, computed, batch, untracked, use, throttle, debounce };
|
|
13
|
+
export function dispose(el: Element): any;
|
|
14
|
+
export { sprae, store, signal, effect, computed, batch, untracked, start, use, throttle, debounce };
|
|
15
15
|
//# sourceMappingURL=sprae.d.ts.map
|
package/types/sprae.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprae.d.ts","sourceRoot":"","sources":["../sprae.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"sprae.d.ts","sourceRoot":"","sources":["../sprae.js"],"names":[],"mappings":";kBAQ+H,WAAW;kBAHxH,YAAY;uBAC6B,WAAW;uBAAX,WAAW;yBAAX,WAAW;sBAAX,WAAW;0BAAX,WAAW;sBAEyD,WAAW;oBAAX,WAAW;yBAAX,WAAW;yBAAX,WAAW;AAuN1H,4BAFL,OAAO,OAEsC"}
|
package/types/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../store.js"],"names":[],"mappings":"AAOA,oDAAoD;AACpD,qCAAyC;AAEzC,2EAA2E;AAC3E,oCAAuC;AAEvC,mDAAmD;AACnD,iCAAiC;AA0B1B,sBAVe,CAAC,0BACZ,CAAC,iBAEC,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../store.js"],"names":[],"mappings":"AAOA,oDAAoD;AACpD,qCAAyC;AAEzC,2EAA2E;AAC3E,oCAAuC;AAEvC,mDAAmD;AACnD,iCAAiC;AA0B1B,sBAVe,CAAC,0BACZ,CAAC,iBAEC,aAAa,CAAC,CAAC,CAAC,CA+F5B;;;;;0BA3GY,CAAC,IACD,CAAC,GAAG;IAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;CAAE"}
|