pawajs 2.4.0-beta.4 → 2.4.0-beta.6
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/README.md +1 -0
- package/package.json +1 -1
- package/src/builtIn/viewTransition.js +1 -1
- package/src/control-flow/attribute.js +0 -1
- package/src/control-flow/await.js +0 -1
- package/src/control-flow/ref.js +1 -1
- package/src/dev/index.js +1 -1
- package/src/dev/plugin.js +1 -1
- package/src/graph/index.js +4 -1
- package/src/hooks/state.js +1 -0
- package/src/pawaElement.js +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ PawaJS (reactive web runtime) is a JavaScript library designed for building dyna
|
|
|
10
10
|
PawaJS is a **reactive web runtime** for HTML-first UIs: components, directives, and fine-grained `$state` updates with **no virtual DOM**.
|
|
11
11
|
|
|
12
12
|
On the client it powers widgets through SPAs. With **pawa-ssr** and **pawajs-continue** it uses **selective continue** (SCP): the server sends HTML plus a sparse index of reactive areas; the client continues only those areas. **Static components are stripped** from that index so they are not re-executed on the client.
|
|
13
|
+
pawajs@2.4.0-beta.4 — ~6.6 kB min+gzip (Bundlephobia)
|
|
13
14
|
🌐 **Website:** [pawajs.vercel.app](https://pawajs.vercel.app)
|
|
14
15
|
|
|
15
16
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getComponentGraph } from "../component/index.js";
|
|
2
|
-
import { forwardProps, html } from "../hooks/index.js";
|
|
2
|
+
import { forwardProps, html, useValidateComponent } from "../hooks/index.js";
|
|
3
3
|
|
|
4
4
|
export const Transition = ({ name, duration, enter, exit, ...props }) => {
|
|
5
5
|
forwardProps(props);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getComponentGraph, keepComponentGraph } from "../component/index.js";
|
|
2
2
|
import { PawaRender } from "../graph/index.js";
|
|
3
|
-
import { createEffect } from "../reactive.js";
|
|
4
3
|
import { getContexters, safeEval } from "../utils.js";
|
|
5
4
|
export const Awaits=(el, attr, context, componentContext, graph)=>{
|
|
6
5
|
const comment = document.createComment("Await");
|
package/src/control-flow/ref.js
CHANGED
package/src/dev/index.js
CHANGED
package/src/dev/plugin.js
CHANGED
package/src/graph/index.js
CHANGED
|
@@ -26,6 +26,9 @@ export const PawaRender=(graph,contexts)=>{
|
|
|
26
26
|
const renderGraph=Graph(graph)
|
|
27
27
|
const server=typeof window === 'undefined'
|
|
28
28
|
const render=(el,refresh=true)=>{
|
|
29
|
+
if (el.hasAttribute('pawa-avoid')) {
|
|
30
|
+
return
|
|
31
|
+
}
|
|
29
32
|
try {
|
|
30
33
|
const manifest=createManifest(el)
|
|
31
34
|
let control={
|
|
@@ -74,7 +77,7 @@ export const PawaRender=(graph,contexts)=>{
|
|
|
74
77
|
if(control.stop)return
|
|
75
78
|
if (Array.from(el.childNodes).some(node =>
|
|
76
79
|
node.nodeType === Node.TEXT_NODE && node.nodeValue.includes('@{')
|
|
77
|
-
)) {
|
|
80
|
+
) && refresh) {
|
|
78
81
|
text(el,context,renderGraph)
|
|
79
82
|
}
|
|
80
83
|
if(control.stop)return
|
package/src/hooks/state.js
CHANGED
package/src/pawaElement.js
CHANGED
|
@@ -139,7 +139,7 @@ export const ElementProperty=(el,name,value,graph,context)=>{
|
|
|
139
139
|
|
|
140
140
|
if(propertyName.includes('.')){
|
|
141
141
|
return setToProperties(el,propertyName,value)
|
|
142
|
-
}else if(pluginMap.has(name)){
|
|
142
|
+
}else if(pluginMap.has(name) && typeof window !== 'undefined' && graph){
|
|
143
143
|
initializePlugin(name,el,graph,{name,value},context)
|
|
144
144
|
return true
|
|
145
145
|
}
|