pawajs 2.4.0-beta.7 → 2.4.0-beta.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/README.md +2 -2
- package/index.js +1 -2
- package/package.json +1 -1
- package/src/component/index.js +3 -3
- package/src/dev/index.js +1 -2
- package/src/event/index.js +0 -1
- package/src/graph/graph.js +2 -2
- /package/{src/dev → examples}/tools.js +0 -0
package/README.md
CHANGED
|
@@ -3,14 +3,14 @@ pawajs - power the web (reactivity and html runtime)
|
|
|
3
3
|
|
|
4
4
|
# PawaJS
|
|
5
5
|
|
|
6
|
-
**A lightweight and reactive JavaScript library for building modern web interfaces with a simple, declarative syntax.**
|
|
6
|
+
**A lightweight and reactive JavaScript library for building modern web interfaces with a simple, declarative syntax (15kb).**
|
|
7
7
|
|
|
8
8
|
PawaJS (reactive web runtime) 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 using pawa-ssr (server rendering runtime) and pawajs-continue (continuity runtime), PawaJS is equipped for performance and scalability.
|
|
9
9
|
|
|
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
|
-
|
|
13
|
+
|
|
14
14
|
🌐 **Website:** [pawajs.vercel.app](https://pawajs.vercel.app)
|
|
15
15
|
|
|
16
16
|
|
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Active } from "./src/builtIn/Active.js";
|
|
2
2
|
import { Transition } from "./src/builtIn/viewTransition.js";
|
|
3
3
|
import { getDev, setDev } from "./src/dev/index.js";
|
|
4
|
-
import { mountPawaDevtools, unmountPawaDevtools } from "./src/dev/tools.js";
|
|
5
4
|
import { Plugin } from "./src/dev/plugin.js";
|
|
6
5
|
import { Graph } from "./src/graph/graph.js";
|
|
7
6
|
import { PawaRender } from "./src/graph/index.js";
|
|
@@ -70,4 +69,4 @@ export {
|
|
|
70
69
|
setDev
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
export {
|
|
72
|
+
export { RootGraph };
|
package/package.json
CHANGED
package/src/component/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDev } from "../dev/index.js"
|
|
2
2
|
import { components, hmrComponentsMap, restorePawaStateFromContext, snapshotInsert } from "../global.js"
|
|
3
3
|
import { PawaRender } from "../graph/index.js"
|
|
4
4
|
import { stateWatch } from "../hooks/state.js"
|
|
@@ -68,7 +68,7 @@ export const createComponent=(el,context,graph,compareGraph)=>{
|
|
|
68
68
|
}
|
|
69
69
|
try {
|
|
70
70
|
const temp=sanitizeTemplate(component(mainProp))
|
|
71
|
-
if (
|
|
71
|
+
if (getDev() && compareGraph) {
|
|
72
72
|
restorePawaStateFromContext(compareGraph.context,renderGraph.context,compareGraph.initialInsert)
|
|
73
73
|
}
|
|
74
74
|
for (const effect of renderGraph.beforeMount) {
|
|
@@ -130,7 +130,7 @@ export const createComponent=(el,context,graph,compareGraph)=>{
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
const componentName=splitAndAdd(el.tagName)
|
|
133
|
-
if (
|
|
133
|
+
if (getDev()) {
|
|
134
134
|
const id=Date.now() + Math.random()
|
|
135
135
|
const removeFromHmrMap = () => {
|
|
136
136
|
const array = hmrComponentsMap.get(componentName)
|
package/src/dev/index.js
CHANGED
package/src/event/index.js
CHANGED
package/src/graph/graph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDev } from "../dev/index.js"
|
|
2
2
|
|
|
3
3
|
export const Graph=(graph)=>{
|
|
4
4
|
const newGraph={
|
|
@@ -173,7 +173,7 @@ export const Graph=(graph)=>{
|
|
|
173
173
|
graph.ref=newGraph
|
|
174
174
|
}
|
|
175
175
|
graph?.children?.push(newGraph)
|
|
176
|
-
if (!
|
|
176
|
+
if (!getDev()) {
|
|
177
177
|
newGraph.context={}
|
|
178
178
|
}
|
|
179
179
|
return newGraph
|
|
File without changes
|