@symbo.ls/sync 2.27.18 → 2.28.2

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/dist/cjs/index.js CHANGED
@@ -61,8 +61,10 @@ const onChange = (el, s, ctx) => {
61
61
  }
62
62
  if (state) {
63
63
  const route = state.route;
64
- if (route) (utils.router || import_router.router)(route.replace("/state", "") || "/", el, {});
65
- else if (!(snippets && functions && components && pages)) s.update(state);
64
+ if (route)
65
+ (utils.router || import_router.router)(route.replace("/state", "") || "/", el, {});
66
+ else if (!(snippets && functions && components && pages))
67
+ s.update(state);
66
68
  }
67
69
  if (snippets || functions || components || pages) {
68
70
  const { pathname, search, hash } = ctx.window.location;
@@ -78,7 +80,7 @@ const onChange = (el, s, ctx) => {
78
80
  const connectToSocket = (el, s, ctx) => {
79
81
  return (0, import_client.connect)(ctx.key, {
80
82
  source: isLocalhost ? "localhost" : "client",
81
- socketUrl: isLocalhost ? "localhost:13336" : "socket.symbols.app",
83
+ socketUrl: isLocalhost ? "localhost:13335" : "api.symbols.app",
82
84
  location: import_utils.window.location.host,
83
85
  onConnect: onConnect(el, s, ctx),
84
86
  onDisconnect: onDisconnect(el, s, ctx),
package/dist/esm/index.js CHANGED
@@ -34,8 +34,10 @@ const onChange = (el, s, ctx) => {
34
34
  }
35
35
  if (state) {
36
36
  const route = state.route;
37
- if (route) (utils.router || router)(route.replace("/state", "") || "/", el, {});
38
- else if (!(snippets && functions && components && pages)) s.update(state);
37
+ if (route)
38
+ (utils.router || router)(route.replace("/state", "") || "/", el, {});
39
+ else if (!(snippets && functions && components && pages))
40
+ s.update(state);
39
41
  }
40
42
  if (snippets || functions || components || pages) {
41
43
  const { pathname, search, hash } = ctx.window.location;
@@ -51,7 +53,7 @@ const onChange = (el, s, ctx) => {
51
53
  const connectToSocket = (el, s, ctx) => {
52
54
  return connect(ctx.key, {
53
55
  source: isLocalhost ? "localhost" : "client",
54
- socketUrl: isLocalhost ? "localhost:13336" : "socket.symbols.app",
56
+ socketUrl: isLocalhost ? "localhost:13335" : "api.symbols.app",
55
57
  location: window.location.host,
56
58
  onConnect: onConnect(el, s, ctx),
57
59
  onDisconnect: onDisconnect(el, s, ctx),
package/index.js CHANGED
@@ -8,7 +8,8 @@ import { connectedToSymbols, Notifications } from './SyncNotifications'
8
8
  import { Inspect } from './Inspect'
9
9
  export { Inspect, Notifications }
10
10
 
11
- const isLocalhost = window && window.location && window.location.host.includes('local')
11
+ const isLocalhost =
12
+ window && window.location && window.location.host.includes('local')
12
13
 
13
14
  const onConnect = (element, state) => {
14
15
  return (socketId, socket) => {
@@ -25,7 +26,8 @@ const onChange = (el, s, ctx) => {
25
26
  if (event === 'change') {
26
27
  const obj = JSON.parse(data)
27
28
  if (!obj?.DATA) return
28
- const { state, designSystem, pages, components, snippets, functions } = obj.DATA
29
+ const { state, designSystem, pages, components, snippets, functions } =
30
+ obj.DATA
29
31
  const { utils } = ctx
30
32
 
31
33
  if (pages) {
@@ -47,8 +49,10 @@ const onChange = (el, s, ctx) => {
47
49
 
48
50
  if (state) {
49
51
  const route = state.route
50
- if (route) (utils.router || router)(route.replace('/state', '') || '/', el, {})
51
- else if (!(snippets && functions && components && pages)) s.update(state)
52
+ if (route)
53
+ (utils.router || router)(route.replace('/state', '') || '/', el, {})
54
+ else if (!(snippets && functions && components && pages))
55
+ s.update(state)
52
56
  }
53
57
 
54
58
  if (snippets || functions || components || pages) {
@@ -68,7 +72,7 @@ const onChange = (el, s, ctx) => {
68
72
  export const connectToSocket = (el, s, ctx) => {
69
73
  return connect(ctx.key, {
70
74
  source: isLocalhost ? 'localhost' : 'client',
71
- socketUrl: isLocalhost ? 'localhost:13336' : 'socket.symbols.app',
75
+ socketUrl: isLocalhost ? 'localhost:13335' : 'api.symbols.app',
72
76
  location: window.location.host,
73
77
  onConnect: onConnect(el, s, ctx),
74
78
  onDisconnect: onDisconnect(el, s, ctx),
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/sync",
3
- "version": "2.27.18",
3
+ "version": "2.28.2",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
- "gitHead": "0d6418dd1eabd119d4ef1b6bb07b7733151878a5",
6
+ "gitHead": "3c5e8b68269799a0e2382f9c79c51e41f33863bf",
7
7
  "files": [
8
8
  "*.js",
9
9
  "dist"
@@ -29,12 +29,12 @@
29
29
  "prepublish": "rimraf -I dist && npm run build && npm run copy:package:cjs"
30
30
  },
31
31
  "dependencies": {
32
- "@domql/router": "^2.27.18",
33
- "@domql/utils": "^2.27.18",
34
- "@symbo.ls/init": "^2.27.18",
35
- "@symbo.ls/scratch": "^2.27.18",
36
- "@symbo.ls/socket": "^2.27.18",
37
- "@symbo.ls/uikit": "^2.27.18"
32
+ "@domql/router": "^2.28.2",
33
+ "@domql/utils": "^2.28.2",
34
+ "@symbo.ls/init": "^2.28.2",
35
+ "@symbo.ls/scratch": "^2.28.2",
36
+ "@symbo.ls/socket": "^2.28.2",
37
+ "@symbo.ls/uikit": "^2.28.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/core": "^7.26.0"