pawa-ssr 1.3.24 → 1.3.26

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/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {getServerInstance, setServer} from 'pawajs/server.js'
2
+ import { pluginsMap, lazyComponents,components } from "pawajs/index.js";
2
3
  import { DOMParser,parseHTML, HTMLElement} from 'linkedom'
3
4
  import PawaComponent from './pawaComponent.js'
4
5
  import { propsValidator, evaluateExpr,extractAtExpressions, reArrangeAttri,resumeAttribute, pawaGenerateId, escapeHtml, splitAndAdd } from './utils.js'
5
6
  import {AsyncLocalStorage} from'node:async_hooks'
6
7
  import { If,For,State,Switch, Key } from'./power.js';
7
8
  import PawaElement from'./pawaElement.js'
8
- import { pluginsMap, lazyComponents,components } from "pawajs/index.js";
9
9
 
10
10
  const PAWA_STORE_SYMBOL = Symbol.for('pawa.ssr.store');
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawa-ssr",
3
- "version": "1.3.24",
3
+ "version": "1.3.26",
4
4
  "type": "module",
5
5
  "description": "pawajs ssr libary",
6
6
  "main": "index.js",
@@ -25,6 +25,6 @@
25
25
  "homepage": "https://github.com/Allisboy/pawajs-ssr#readme",
26
26
  "dependencies": {
27
27
  "linkedom": "^0.18.11",
28
- "pawajs": "^1.4.39"
28
+ "pawajs": "^1.4.40"
29
29
  }
30
30
  }
package/pawaElement.js CHANGED
@@ -80,6 +80,8 @@ class PawaElement {
80
80
  })
81
81
  }
82
82
  checkLazy(){
83
+ console.log(lazyComponents.has(splitAndAdd(this._el.tagName)),this._el.tagName,components.has(splitAndAdd(this._el.tagName)));
84
+
83
85
  if (lazyComponents.has(splitAndAdd(this._el.tagName))) {
84
86
  this._lazy=true
85
87
  }
@@ -87,7 +89,7 @@ class PawaElement {
87
89
  setResumeAttr(name){
88
90
  if(name.startsWith(':')) return
89
91
  this._resumeAttr+=`${name};`
90
- this._el.setAttribute('p:C',this._resumeAttr)
92
+ this._el.setAttribute('p:c',this._resumeAttr)
91
93
  }
92
94
  pawaAttribute(){
93
95
  const componentAllowedAttribute=['if','else-if','for-each','switch','case','key','s-default','else']
@@ -104,7 +106,6 @@ class PawaElement {
104
106
  if (this._el.hasAttribute('p:c')) {
105
107
  this._resumeAttr=this._el.getAttribute('p:c')
106
108
  this._el.attributes.forEach((value, index, array) => {
107
- // if (this._componentName && !componentAllowedAttribute.includes(value.name)) return
108
109
  if(this._resumeAttr.includes(value.name) || value.name === 'p:c')return
109
110
  if (value.name.startsWith(':')) return
110
111
  this._resumeAttr+=`${value.name};`