pawajs 2.4.0-beta.4 → 2.4.0-beta.5

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 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,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "2.4.0-beta.4",
3
+ "version": "2.4.0-beta.5",
4
4
  "type": "module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend, spa etc",
6
6
  "main": "index.js",
@@ -1,4 +1,3 @@
1
- import { InProxyCaller } from "../hooks/state.js";
2
1
  import { ElementProperty } from "../pawaElement.js";
3
2
  import { createEffect, errorControl } from "../reactive.js";
4
3
  import { getContexters, safeEval } from "../utils.js";
@@ -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");
@@ -1,4 +1,4 @@
1
- import { getContexters, safeEval } from "../utils.js";
1
+ import { safeEval } from "../utils.js";
2
2
 
3
3
  export const ref=(el,attr,context,graph)=>{
4
4
 
package/src/dev/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { components } from "../global";
1
+ import { components } from "../global.js";
2
2
 
3
3
  let devTool=false
4
4
  export const setDev=(devs=false)=>{
package/src/dev/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createEffect } from "../reactive"
1
+ import { createEffect } from "../reactive.js"
2
2
 
3
3
  export const pluginMap=new Map()
4
4
  /**
@@ -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
@@ -263,6 +263,7 @@ export const $state = (initialValue, section = null) => {
263
263
  } else {
264
264
  return main
265
265
  }
266
+
266
267
 
267
268
  }
268
269
 
@@ -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
  }