pawajs 1.4.33 → 1.4.34

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.d.ts CHANGED
@@ -194,6 +194,13 @@ export function getPrimaryDirectives(): Set<string>;
194
194
  */
195
195
  export function RegisterComponent(...args: (string | Function)[]): void;
196
196
 
197
+ export namespace RegisterComponent {
198
+ /**
199
+ * Registers components lazily. The component's bundle is only fetched when the element enters the viewport.
200
+ */
201
+ export function lazy(...args: (string | Function)[]): Promise<void>;
202
+ }
203
+
197
204
  /**
198
205
  * Runs a side effect or lifecycle hook.
199
206
  * @param {(comment:PawaComment) => void | (() => void)} callback - Effect function,comment for component hacking and optionally returning cleanup .
package/merger/switch.js CHANGED
@@ -99,7 +99,7 @@ export const merger_switch=(el,attr,stateContext,resume=false,{comment,endCommen
99
99
  }
100
100
  }
101
101
 
102
- if(firstEnter === false && resume && oldChain.id !== latestChain.id){
102
+ if(firstEnter === false && resume && oldChain.id === latestChain.id){
103
103
  el.removeAttribute(attr.name)
104
104
  if (stateContext._hasRun) {
105
105
  stateContext._hasRun = false
@@ -109,7 +109,7 @@ export const merger_switch=(el,attr,stateContext,resume=false,{comment,endCommen
109
109
  let isIndex=0
110
110
  children.forEach((value, index) => {
111
111
  number.index = isIndex
112
- isIndex++
112
+ isIndex++
113
113
  if (number.notRender !== null && isIndex <= number.notRender) return
114
114
  render(value,context,number)
115
115
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "1.4.33",
3
+ "version": "1.4.34",
4
4
  "type":"module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend etc ",
6
6
  "main": "index.js",