pawajs 1.4.7 → 1.4.8
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/CHANGELOG.md +1 -0
- package/README.md +3 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/power.js +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ pawajs - power the web (reactivity and html runtime)
|
|
|
7
7
|
|
|
8
8
|
PawaJS is a JavaScript library designed for building dynamic user interfaces. It combines a component-based architecture and progressive enhancement with a powerful reactivity system no v-dom. Its intuitive, directive-based templating feels familiar and makes it easy to create interactive applications, from simple widgets to complex single-page apps. With built-in support for server-side rendering, PawaJS is equipped for performance and scalability.
|
|
9
9
|
|
|
10
|
+
🌐 **Website:** [pawajs.vercel.app](https://pawajs.vercel.app)
|
|
11
|
+
|
|
10
12
|
---
|
|
11
13
|
|
|
12
14
|
## Features
|
|
@@ -340,6 +342,7 @@ useValidateComponent(TodoList, {
|
|
|
340
342
|
- `pawaStartApp(rootElement, initialContext)`: Initializes the PawaJS application on a given root DOM element.
|
|
341
343
|
- `RegisterComponent(...components)`: Registers one or more components to be used in templates.
|
|
342
344
|
- `$state(initialValue, localStorageKey?)`: Creates a new reactive state object.
|
|
345
|
+
- `PluginSystem(plugin)`: Registers a plugin to extend PawaJS functionality (e.g., Routers, Global Stores).
|
|
343
346
|
- `html`: A tagged template literal for syntax highlighting and potential future optimizations.
|
|
344
347
|
|
|
345
348
|
### Component Hooks
|
package/index.js
CHANGED
|
@@ -894,7 +894,7 @@ const component = (el, resume = false, attr, notRender, stopResume) => {
|
|
|
894
894
|
getComment(el)
|
|
895
895
|
getEndComment(comment)
|
|
896
896
|
el.removeAttribute(attr.name)
|
|
897
|
-
const numberComponentChildren = notRender.index + children.length -
|
|
897
|
+
const numberComponentChildren = notRender.index + children.length - 1
|
|
898
898
|
notRender.notRender = numberComponentChildren
|
|
899
899
|
resumer.resume_component?.(el, attr, setStateContext, mapsPlugins, formerStateContext, pawaContext, stateWatch, { comment, endComment, name, serialized, id, children })
|
|
900
900
|
}
|
package/package.json
CHANGED
package/power.js
CHANGED
|
@@ -63,7 +63,7 @@ export const If = (el, attr, stateContext,resume=false,notRender,stopResume) =>
|
|
|
63
63
|
const setEndComment=(c)=>endComment=c
|
|
64
64
|
getComment(el,setComment,id)
|
|
65
65
|
getEndComment(comment,setEndComment,id,children)
|
|
66
|
-
const numberIfChildren=notRender.index + children.length -
|
|
66
|
+
const numberIfChildren=notRender.index + children.length - 2
|
|
67
67
|
notRender.notRender=numberIfChildren
|
|
68
68
|
resumer.resume_if?.(el,attr,stateContext,{comment,endComment,id,children})
|
|
69
69
|
|
|
@@ -126,7 +126,7 @@ export const Switch = (el, attr, stateContext,resume=false,notRender,stopResume)
|
|
|
126
126
|
const setEndComment=(c)=>endComment=c
|
|
127
127
|
getComment(el,setComment,id)
|
|
128
128
|
getEndComment(comment,setEndComment,id,children)
|
|
129
|
-
const numberIfChildren=notRender.index + children.length -
|
|
129
|
+
const numberIfChildren=notRender.index + children.length - 2
|
|
130
130
|
notRender.notRender=numberIfChildren
|
|
131
131
|
resumer.resume_switch?.(el,attr,stateContext,{comment,endComment,id,children})
|
|
132
132
|
|