@symbo.ls/sync 3.8.9 → 3.14.0

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/Inspect.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
- import * as smblsUI from '@symbo.ls/uikit'
4
- import { isObject, isString, isArray } from '@domql/utils'
3
+ import * as smblsUI from '@symbo.ls/default-config/components'
4
+ import { isObject, isString, isArray } from '@symbo.ls/utils'
5
5
  import { send } from './client.js'
6
6
 
7
7
  function returnStringExtend (_extends) {
@@ -51,8 +51,9 @@ export const connectedToSymbols = (clients, element, state) => {
51
51
 
52
52
  const t = setTimeout(() => {
53
53
  delete state.notifications.connected
54
- element.notifications.content.connected
55
- .setProps({ animation: 'fadeOutDown' })
54
+ element.notifications.content.connected.update({
55
+ animation: 'fadeOutDown'
56
+ })
56
57
  state.update({ connected: true })
57
58
  clearTimeout(t)
58
59
  }, 3000)
@@ -69,8 +70,9 @@ export const connectedToSymbols = (clients, element, state) => {
69
70
  const t = setTimeout(() => {
70
71
  delete state.notifications.connected
71
72
  if (element.notifications.content.connected) {
72
- element.notifications.content.connected
73
- .setProps({ animation: 'fadeOutDown' })
73
+ element.notifications.content.connected.update({
74
+ animation: 'fadeOutDown'
75
+ })
74
76
  }
75
77
  state.update({ connected: true })
76
78
  clearTimeout(t)
@@ -103,11 +105,11 @@ export const Notifications = {
103
105
  }
104
106
  },
105
107
  onRender: (e, el, s) => {
106
- el.setProps({ animation: 'fadeInUp' })
108
+ el.update({ animation: 'fadeInUp' })
107
109
  },
108
110
  onClick: (e, el, s) => {
109
111
  delete s.notifications[el.key]
110
- el.setProps({ animation: 'fadeOutDown' })
112
+ el.update({ animation: 'fadeOutDown' })
111
113
  if (s.onClose) s.onClose(e, el, s)
112
114
  }
113
115
  }),
package/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { window, isFunction, isArray } from '@domql/utils'
1
+ import { window, isFunction, isArray } from '@symbo.ls/utils'
2
2
  import io from 'socket.io-client'
3
3
 
4
4
  const defautlOpts = {}
@@ -31,8 +31,8 @@ __export(Inspect_exports, {
31
31
  Inspect: () => Inspect
32
32
  });
33
33
  module.exports = __toCommonJS(Inspect_exports);
34
- var smblsUI = __toESM(require("@symbo.ls/uikit"), 1);
35
- var import_utils = require("@domql/utils");
34
+ var smblsUI = __toESM(require("@symbo.ls/default-config/components"), 1);
35
+ var import_utils = require("@symbo.ls/utils");
36
36
  var import_client = require("./client.js");
37
37
  function returnStringExtend(_extends) {
38
38
  return (0, import_utils.isString)(_extends) ? _extends : (0, import_utils.isArray)(_extends) ? _extends.find((extItem) => (0, import_utils.isString)(extItem)) : "";
@@ -37,7 +37,9 @@ const connectedToSymbols = (clients, element, state) => {
37
37
  state.update({ connected: true });
38
38
  const t = setTimeout(() => {
39
39
  delete state.notifications.connected;
40
- element.notifications.content.connected.setProps({ animation: "fadeOutDown" });
40
+ element.notifications.content.connected.update({
41
+ animation: "fadeOutDown"
42
+ });
41
43
  state.update({ connected: true });
42
44
  clearTimeout(t);
43
45
  }, 3e3);
@@ -52,7 +54,9 @@ const connectedToSymbols = (clients, element, state) => {
52
54
  const t = setTimeout(() => {
53
55
  delete state.notifications.connected;
54
56
  if (element.notifications.content.connected) {
55
- element.notifications.content.connected.setProps({ animation: "fadeOutDown" });
57
+ element.notifications.content.connected.update({
58
+ animation: "fadeOutDown"
59
+ });
56
60
  }
57
61
  state.update({ connected: true });
58
62
  clearTimeout(t);
@@ -83,11 +87,11 @@ const Notifications = {
83
87
  }
84
88
  },
85
89
  onRender: (e, el, s) => {
86
- el.setProps({ animation: "fadeInUp" });
90
+ el.update({ animation: "fadeInUp" });
87
91
  },
88
92
  onClick: (e, el, s) => {
89
93
  delete s.notifications[el.key];
90
- el.setProps({ animation: "fadeOutDown" });
94
+ el.update({ animation: "fadeOutDown" });
91
95
  if (s.onClose) s.onClose(e, el, s);
92
96
  }
93
97
  }),
@@ -32,7 +32,7 @@ __export(client_exports, {
32
32
  send: () => send
33
33
  });
34
34
  module.exports = __toCommonJS(client_exports);
35
- var import_utils = require("@domql/utils");
35
+ var import_utils = require("@symbo.ls/utils");
36
36
  var import_socket = __toESM(require("socket.io-client"), 1);
37
37
  const defautlOpts = {};
38
38
  let CONNECT_ATTEPT = 0;
package/dist/cjs/index.js CHANGED
@@ -24,10 +24,10 @@ __export(index_exports, {
24
24
  connectToSocket: () => connectToSocket
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
- var import_router = require("@domql/router");
27
+ var import_router = require("@symbo.ls/router");
28
28
  var import_init = require("smbls/src/init.js");
29
29
  var import_socket = require("socket.io-client");
30
- var import_utils = require("@domql/utils");
30
+ var import_utils = require("@symbo.ls/utils");
31
31
  var import_SyncNotifications = require("./SyncNotifications");
32
32
  var import_Inspect = require("./Inspect");
33
33
  const isLocal = process.env.NODE_ENV === "local";
@@ -38,7 +38,7 @@ var import_express = __toESM(require("express"), 1);
38
38
  var import_http = __toESM(require("http"), 1);
39
39
  var import_socket = require("socket.io");
40
40
  var import_module = require("module");
41
- var utils = __toESM(require("@domql/utils"), 1);
41
+ var utils = __toESM(require("@symbo.ls/utils"), 1);
42
42
  const import_meta = {};
43
43
  const { overwriteDeep } = utils.default || utils;
44
44
  const require2 = (0, import_module.createRequire)(import_meta.url);
@@ -1,5 +1,5 @@
1
- import * as smblsUI from "@symbo.ls/uikit";
2
- import { isObject, isString, isArray } from "@domql/utils";
1
+ import * as smblsUI from "@symbo.ls/default-config/components";
2
+ import { isObject, isString, isArray } from "@symbo.ls/utils";
3
3
  import { send } from "./client.js";
4
4
  function returnStringExtend(_extends) {
5
5
  return isString(_extends) ? _extends : isArray(_extends) ? _extends.find((extItem) => isString(extItem)) : "";
@@ -13,7 +13,9 @@ const connectedToSymbols = (clients, element, state) => {
13
13
  state.update({ connected: true });
14
14
  const t = setTimeout(() => {
15
15
  delete state.notifications.connected;
16
- element.notifications.content.connected.setProps({ animation: "fadeOutDown" });
16
+ element.notifications.content.connected.update({
17
+ animation: "fadeOutDown"
18
+ });
17
19
  state.update({ connected: true });
18
20
  clearTimeout(t);
19
21
  }, 3e3);
@@ -28,7 +30,9 @@ const connectedToSymbols = (clients, element, state) => {
28
30
  const t = setTimeout(() => {
29
31
  delete state.notifications.connected;
30
32
  if (element.notifications.content.connected) {
31
- element.notifications.content.connected.setProps({ animation: "fadeOutDown" });
33
+ element.notifications.content.connected.update({
34
+ animation: "fadeOutDown"
35
+ });
32
36
  }
33
37
  state.update({ connected: true });
34
38
  clearTimeout(t);
@@ -59,11 +63,11 @@ const Notifications = {
59
63
  }
60
64
  },
61
65
  onRender: (e, el, s) => {
62
- el.setProps({ animation: "fadeInUp" });
66
+ el.update({ animation: "fadeInUp" });
63
67
  },
64
68
  onClick: (e, el, s) => {
65
69
  delete s.notifications[el.key];
66
- el.setProps({ animation: "fadeOutDown" });
70
+ el.update({ animation: "fadeOutDown" });
67
71
  if (s.onClose) s.onClose(e, el, s);
68
72
  }
69
73
  }),
@@ -1,4 +1,4 @@
1
- import { window, isFunction, isArray } from "@domql/utils";
1
+ import { window, isFunction, isArray } from "@symbo.ls/utils";
2
2
  import io from "socket.io-client";
3
3
  const defautlOpts = {};
4
4
  let CONNECT_ATTEPT = 0;
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { router } from "@domql/router";
1
+ import { router } from "@symbo.ls/router";
2
2
  import { init } from "smbls/src/init.js";
3
3
  import { io } from "socket.io-client";
4
- import { window, overwriteShallow, overwriteDeep } from "@domql/utils";
4
+ import { window, overwriteShallow, overwriteDeep } from "@symbo.ls/utils";
5
5
  import { connectedToSymbols, Notifications } from "./SyncNotifications";
6
6
  import { Inspect } from "./Inspect";
7
7
  const isLocal = process.env.NODE_ENV === "local";
@@ -5,7 +5,7 @@ import express from "express";
5
5
  import http from "http";
6
6
  import { Server } from "socket.io";
7
7
  import { createRequire } from "module";
8
- import * as utils from "@domql/utils";
8
+ import * as utils from "@symbo.ls/utils";
9
9
  const { overwriteDeep } = utils.default || utils;
10
10
  const require2 = createRequire(import.meta.url);
11
11
  const DES_SYS_DEFAULT_FILE = require2("./dynamic.json");
@@ -42,10 +42,10 @@ var SmblsSync = (() => {
42
42
  SyncComponent: () => SyncComponent,
43
43
  connectToSocket: () => connectToSocket
44
44
  });
45
- var import_router = __require("@domql/router");
45
+ var import_router = __require("@symbo.ls/router");
46
46
  var import_init = __require("smbls/src/init.js");
47
47
  var import_socket2 = __require("socket.io-client");
48
- var import_utils3 = __require("@domql/utils");
48
+ var import_utils3 = __require("@symbo.ls/utils");
49
49
 
50
50
  // SyncNotifications.js
51
51
  var NOTIF_COLORS = {
@@ -63,7 +63,9 @@ var SmblsSync = (() => {
63
63
  state.update({ connected: true });
64
64
  const t = setTimeout(() => {
65
65
  delete state.notifications.connected;
66
- element.notifications.content.connected.setProps({ animation: "fadeOutDown" });
66
+ element.notifications.content.connected.update({
67
+ animation: "fadeOutDown"
68
+ });
67
69
  state.update({ connected: true });
68
70
  clearTimeout(t);
69
71
  }, 3e3);
@@ -78,7 +80,9 @@ var SmblsSync = (() => {
78
80
  const t = setTimeout(() => {
79
81
  delete state.notifications.connected;
80
82
  if (element.notifications.content.connected) {
81
- element.notifications.content.connected.setProps({ animation: "fadeOutDown" });
83
+ element.notifications.content.connected.update({
84
+ animation: "fadeOutDown"
85
+ });
82
86
  }
83
87
  state.update({ connected: true });
84
88
  clearTimeout(t);
@@ -109,11 +113,11 @@ var SmblsSync = (() => {
109
113
  }
110
114
  },
111
115
  onRender: (e, el, s) => {
112
- el.setProps({ animation: "fadeInUp" });
116
+ el.update({ animation: "fadeInUp" });
113
117
  },
114
118
  onClick: (e, el, s) => {
115
119
  delete s.notifications[el.key];
116
- el.setProps({ animation: "fadeOutDown" });
120
+ el.update({ animation: "fadeOutDown" });
117
121
  if (s.onClose) s.onClose(e, el, s);
118
122
  }
119
123
  }),
@@ -124,11 +128,11 @@ var SmblsSync = (() => {
124
128
  };
125
129
 
126
130
  // Inspect.js
127
- var smblsUI = __toESM(__require("@symbo.ls/uikit"), 1);
128
- var import_utils2 = __require("@domql/utils");
131
+ var smblsUI = __toESM(__require("@symbo.ls/default-config/components"), 1);
132
+ var import_utils2 = __require("@symbo.ls/utils");
129
133
 
130
134
  // client.js
131
- var import_utils = __require("@domql/utils");
135
+ var import_utils = __require("@symbo.ls/utils");
132
136
  var import_socket = __toESM(__require("socket.io-client"), 1);
133
137
  var defautlOpts = {};
134
138
  function send(event = "change", changes, options) {
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { router } from '@domql/router'
1
+ import { router } from '@symbo.ls/router'
2
2
  import { init } from 'smbls/src/init.js'
3
3
  import { io } from 'socket.io-client'
4
- import { window, overwriteShallow, overwriteDeep } from '@domql/utils'
4
+ import { window, overwriteShallow, overwriteDeep } from '@symbo.ls/utils'
5
5
  import { connectedToSymbols, Notifications } from './SyncNotifications'
6
6
  import { Inspect } from './Inspect'
7
7
  export { Inspect, Notifications }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/sync",
3
- "version": "3.8.9",
3
+ "version": "3.14.0",
4
4
  "main": "./index.js",
5
5
  "module": "./index.js",
6
6
  "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
@@ -11,28 +11,14 @@
11
11
  ],
12
12
  "repository": "https://github.com/symbo-ls/scratch",
13
13
  "type": "module",
14
+ "license": "CC-BY-NC-4.0",
14
15
  "unpkg": "./dist/iife/index.js",
15
16
  "jsdelivr": "./dist/iife/index.js",
16
17
  "exports": {
17
- ".": {
18
- "import": "./index.js",
19
- "require": "./index.js"
20
- },
21
- "./client": {
22
- "import": "./client.js",
23
- "require": "./client.js"
24
- },
25
- "./server": {
26
- "import": "./server.js"
27
- },
28
- "./*.js": {
29
- "import": "./dist/esm/*.js",
30
- "require": "./dist/cjs/*.js"
31
- },
32
- "./*": {
33
- "import": "./dist/esm/*.js",
34
- "require": "./dist/cjs/*.js"
35
- }
18
+ ".": "./index.js",
19
+ "./client": "./client.js",
20
+ "./server": "./server.js",
21
+ "./package.json": "./package.json"
36
22
  },
37
23
  "source": "index.js",
38
24
  "publishConfig": {
@@ -40,17 +26,17 @@
40
26
  },
41
27
  "scripts": {
42
28
  "copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
43
- "build:esm": "cross-env NODE_ENV=$NODE_ENV esbuild *.js --target=es2020 --format=esm --outdir=dist/esm --define:process.env.NODE_ENV=process.env.NODE_ENV",
44
- "build:cjs": "cross-env NODE_ENV=$NODE_ENV esbuild *.js --target=node18 --format=cjs --outdir=dist/cjs --define:process.env.NODE_ENV=process.env.NODE_ENV",
45
- "build:iife": "cross-env NODE_ENV=$NODE_ENV esbuild index.js --bundle --target=es2020 --format=iife --global-name=SmblsSync --outfile=dist/iife/index.js --define:process.env.NODE_ENV=process.env.NODE_ENV --external:smbls --external:@domql/* --external:@symbo.ls/* --external:socket.io-client --external:socket.io --external:express --external:css-in-props",
29
+ "build:esm": "NODE_ENV=$NODE_ENV esbuild *.js --target=es2020 --format=esm --outdir=dist/esm --define:process.env.NODE_ENV=process.env.NODE_ENV",
30
+ "build:cjs": "NODE_ENV=$NODE_ENV esbuild *.js --target=node18 --format=cjs --outdir=dist/cjs --define:process.env.NODE_ENV=process.env.NODE_ENV",
31
+ "build:iife": "NODE_ENV=$NODE_ENV esbuild index.js --bundle --target=es2020 --format=iife --global-name=SmblsSync --outfile=dist/iife/index.js --define:process.env.NODE_ENV=process.env.NODE_ENV --external:smbls --external:@symbo.ls/* --external:@symbo.ls/* --external:socket.io-client --external:socket.io --external:express --external:css-in-props",
46
32
  "build": "node ../../build/build.js",
47
33
  "prepublish": "npm run build && npm run copy:package:cjs"
48
34
  },
49
35
  "dependencies": {
50
- "@domql/router": "^3.8.9",
51
- "@domql/utils": "^3.8.9",
52
- "@symbo.ls/scratch": "^3.8.9",
53
- "@symbo.ls/uikit": "^3.8.9",
36
+ "@symbo.ls/router": "^3.14.0",
37
+ "@symbo.ls/utils": "^3.14.0",
38
+ "@symbo.ls/scratch": "^3.14.0",
39
+ "@symbo.ls/default-config": "^3.14.0",
54
40
  "chalk": "^5.4.1",
55
41
  "express": "^4.21.2",
56
42
  "socket.io": "^4.8.1",
@@ -59,6 +45,6 @@
59
45
  "devDependencies": {
60
46
  "@babel/core": "^7.26.0"
61
47
  },
62
- "browser": "./dist/esm/index.js",
48
+ "browser": "./index.js",
63
49
  "sideEffects": false
64
50
  }
package/server.js CHANGED
@@ -6,7 +6,7 @@ import express from 'express'
6
6
  import http from 'http'
7
7
  import { Server } from 'socket.io'
8
8
  import { createRequire } from 'module'
9
- import * as utils from '@domql/utils'
9
+ import * as utils from '@symbo.ls/utils'
10
10
  const { overwriteDeep } = utils.default || utils
11
11
 
12
12
  const require = createRequire(import.meta.url)