@pronto-tools-and-more/pronto 8.16.0 → 8.18.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/pronto",
3
- "version": "8.16.0",
3
+ "version": "8.18.0",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -17,20 +17,21 @@
17
17
  "@lvce-editor/ipc": "^11.1.0",
18
18
  "@lvce-editor/json-rpc": "^5.0.0",
19
19
  "@lvce-editor/verror": "^1.4.0",
20
- "@pronto-tools-and-more/file-watcher": "8.16.0",
21
- "@pronto-tools-and-more/files": "8.16.0",
22
- "@pronto-tools-and-more/network-process": "8.16.0",
23
- "@pronto-tools-and-more/sass-compiler": "8.16.0",
24
- "@pronto-tools-and-more/components-renderer": "8.16.0",
25
- "@pronto-tools-and-more/components": "8.16.0",
26
- "@pronto-tools-and-more/schema-process": "8.16.0",
27
- "@pronto-tools-and-more/type-checker": "8.16.0",
20
+ "@pronto-tools-and-more/file-watcher": "8.18.0",
21
+ "@pronto-tools-and-more/files": "8.18.0",
22
+ "@pronto-tools-and-more/network-process": "8.18.0",
23
+ "@pronto-tools-and-more/sass-compiler": "8.18.0",
24
+ "@pronto-tools-and-more/components-renderer": "8.18.0",
25
+ "@pronto-tools-and-more/components": "8.18.0",
26
+ "@pronto-tools-and-more/schema-process": "8.18.0",
27
+ "@pronto-tools-and-more/diff-process": "8.18.0",
28
+ "@pronto-tools-and-more/type-checker": "8.18.0",
28
29
  "execa": "^9.5.1",
29
30
  "express": "^4.21.1"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@types/express": "^5.0.0",
33
- "@types/node": "^22.8.7",
34
+ "@types/node": "^22.9.0",
34
35
  "@types/ws": "^8.5.13",
35
36
  "jest": "^29.7.0"
36
37
  }
@@ -108,3 +108,5 @@ export const splitViews = config.splitViews || false;
108
108
  export const reactComponents = config.reactComponents || false;
109
109
 
110
110
  export const pushToReleaseOnGitTag = config.pushToReleaseOnGitTag || false;
111
+
112
+ export const hotReload = config.hotReload || false;
@@ -0,0 +1,33 @@
1
+ const diffInternal = () => {};
2
+
3
+ export const diffViews = (oldViews, newViews) => {
4
+ // TODO walk all nodes
5
+ // return one of four changes
6
+ // 1. full update
7
+ // 2. classname update
8
+ // 3. text update
9
+ // 4. node update
10
+
11
+ if (!oldViews) {
12
+ return [
13
+ {
14
+ type: "full-update",
15
+ },
16
+ ];
17
+ }
18
+ if (oldViews.length !== newViews.length) {
19
+ return [
20
+ {
21
+ type: "full-update",
22
+ },
23
+ ];
24
+ }
25
+ const length = oldViews.length;
26
+
27
+ for (let i = 0; i < length; i++) {
28
+ const oldView = oldViews[i];
29
+ const newView = newViews[i];
30
+ }
31
+ for (const item of oldViews) console.log({ oldViews, newViews });
32
+ return [];
33
+ };
@@ -6,6 +6,7 @@ import * as SendUpdates from "../SendUpdates/SendUpdates.js";
6
6
 
7
7
  export const handleFileChange = async (clients, event, root, errorColor) => {
8
8
  const absolutePath = join(root, event.filename);
9
+ console.log("file change", absolutePath);
9
10
  if (event.filename === "default/readmode/custom.css") {
10
11
  const css = await readFile(absolutePath, "utf8");
11
12
  const changes = [
@@ -2,11 +2,11 @@ import { existsSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import * as ComponentsRendererPath from "../ComponentsRendererPath/ComponentsRendererPath.js";
4
4
  import * as HandleIpc from "../HandleIpc/HandleIpc.js";
5
+ import * as HandleViewsSplit from "../HandleViewsSplit/HandleViewsSplit.js";
5
6
  import * as IpcParent from "../IpcParent/IpcParent.js";
6
7
  import * as IpcParentType from "../IpcParentType/IpcParentType.js";
7
- import * as UnhandleIpc from "../UnhandleIpc/UnhandleIpc.js";
8
8
  import * as JsonRpc from "../JsonRpc/JsonRpc.js";
9
- import * as HandleViewsSplit from "../HandleViewsSplit/HandleViewsSplit.js";
9
+ import * as UnhandleIpc from "../UnhandleIpc/UnhandleIpc.js";
10
10
 
11
11
  export const handleViewsReactComponents = async (
12
12
  storeFrontPath,
@@ -1 +1 @@
1
- export const version = '8.16.0'
1
+ export const version = '8.18.0'
@@ -0,0 +1,9 @@
1
+ let views = undefined;
2
+
3
+ export const get = () => {
4
+ return views;
5
+ };
6
+
7
+ export const set = (value) => {
8
+ views = value;
9
+ };