@symbo.ls/sync 3.14.105 → 3.14.499

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 CHANGED
@@ -1,13 +1,29 @@
1
1
  # @symbo.ls/sync
2
2
 
3
+ ## 3.14.499
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
9
+ ## 3.14.232
10
+
11
+ ### Patch Changes
12
+
13
+ - Auto-generated cross-repo patch release.
14
+
3
15
  ## 3.14.105
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - @symbo.ls/default-config@3.14.105
8
- - @symbo.ls/scratch@3.14.105
9
- - @symbo.ls/utils@3.14.105
10
- - @symbo.ls/router@3.14.105
19
+ - Manual patch bump triggered via workflow_dispatch (scope: all).
20
+ No source change behind this bump — released to refresh dist or
21
+ coordinate a cross-package version line.
22
+ - Updated dependencies
23
+ - @symbo.ls/default-config@3.14.105
24
+ - @symbo.ls/router@3.14.105
25
+ - @symbo.ls/scratch@3.14.105
26
+ - @symbo.ls/utils@3.14.105
11
27
 
12
28
  ## 3.14.104
13
29
 
@@ -1 +1 @@
1
- var p=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var y=(t,o)=>{for(var e in o)p(t,e,{get:o[e],enumerable:!0})},u=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of g(o))!d.call(t,s)&&s!==e&&p(t,s,{get:()=>o[s],enumerable:!(n=l(o,s))||n.enumerable});return t};var A=t=>u(p({},"__esModule",{value:!0}),t);var O={};y(O,{onOps:()=>w,onSnapshot:()=>S});module.exports=A(O);var f=require("smbls"),c=require("@symbo.ls/utils"),h=require("./applier.js");const S=(t,o,e)=>(n={})=>{let{data:s}=n;const{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([r,a])=>{e[r]&&typeof e[r]=="object"?r==="designSystem"?(0,f.init)(a):(0,c.overwriteShallow)(e[r],a):e[r]=a}),i&&(e.schema=i))},w=(t,o,e)=>(n={})=>{let{changes:s}=n;if(!s||!Array.isArray(s)||!s.length)return;s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{});const i=(0,h.applyOpsToCtx)(e,s);if(i.has("state")&&o.update(e.state),["pages","components","snippets","functions","assets"].some(r=>i.has(r))){const{pathname:r,search:a,hash:m}=e.window.location;t.call("router",r+a+m,t.__ref.root,{},{scrollToTop:!1})}i.has("designSystem")&&(0,f.init)(e.designSystem)};
1
+ var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var u=(t,r)=>{for(var e in r)p(t,e,{get:r[e],enumerable:!0})},y=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of d(r))!g.call(t,s)&&s!==e&&p(t,s,{get:()=>r[s],enumerable:!(n=m(r,s))||n.enumerable});return t};var A=t=>y(p({},"__esModule",{value:!0}),t);var b={};u(b,{onOps:()=>w,onSnapshot:()=>S});module.exports=A(b);var c=require("smbls"),h=require("@symbo.ls/utils"),l=require("./applier.js");const S=(t,r,e)=>{let n=!1;return(s={})=>{let{data:o}=s;const{schema:a}=s;o&&(o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{}),Object.entries(o).forEach(([i,f])=>{e[i]&&typeof e[i]=="object"?i==="designSystem"?n&&(0,c.init)(f):(0,h.overwriteShallow)(e[i],f):e[i]=f}),n=!0,a&&(e.schema=a))}},w=(t,r,e)=>(n={})=>{let{changes:s}=n;if(!s||!Array.isArray(s)||!s.length)return;s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{});const o=(0,l.applyOpsToCtx)(e,s);if(o.has("state")&&r.update(e.state),["pages","components","snippets","functions","assets"].some(a=>o.has(a))){const{pathname:a,search:i,hash:f}=e.window.location;t.call("router",a+i+f,t.__ref.root,{},{scrollToTop:!1})}o.has("designSystem")&&(0,c.init)(e.designSystem)};
@@ -1 +1 @@
1
- import{init as p}from"smbls";import{overwriteShallow as c}from"@symbo.ls/utils";import{applyOpsToCtx as h}from"./applier.js";const d=(r,a,e)=>(i={})=>{let{data:s}=i;const{schema:o}=i;s&&(s=r.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([t,n])=>{e[t]&&typeof e[t]=="object"?t==="designSystem"?p(n):c(e[t],n):e[t]=n}),o&&(e.schema=o))},y=(r,a,e)=>(i={})=>{let{changes:s}=i;if(!s||!Array.isArray(s)||!s.length)return;s=r.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{});const o=h(e,s);if(o.has("state")&&a.update(e.state),["pages","components","snippets","functions","assets"].some(t=>o.has(t))){const{pathname:t,search:n,hash:f}=e.window.location;r.call("router",t+n+f,r.__ref.root,{},{scrollToTop:!1})}o.has("designSystem")&&p(e.designSystem)};export{y as onOps,d as onSnapshot};
1
+ import{init as p}from"smbls";import{overwriteShallow as c}from"@symbo.ls/utils";import{applyOpsToCtx as h}from"./applier.js";const g=(n,f,s)=>{let a=!1;return(e={})=>{let{data:t}=e;const{schema:o}=e;t&&(t=n.call("deepDestringifyFunctions",t,Array.isArray(t)?[]:{}),Object.entries(t).forEach(([r,i])=>{s[r]&&typeof s[r]=="object"?r==="designSystem"?a&&p(i):c(s[r],i):s[r]=i}),a=!0,o&&(s.schema=o))}},u=(n,f,s)=>(a={})=>{let{changes:e}=a;if(!e||!Array.isArray(e)||!e.length)return;e=n.call("deepDestringifyFunctions",e,Array.isArray(e)?[]:{});const t=h(s,e);if(t.has("state")&&f.update(s.state),["pages","components","snippets","functions","assets"].some(o=>t.has(o))){const{pathname:o,search:r,hash:i}=s.window.location;n.call("router",o+r+i,n.__ref.root,{},{scrollToTop:!1})}t.has("designSystem")&&p(s.designSystem)};export{u as onOps,g as onSnapshot};
package/handlers.js CHANGED
@@ -7,9 +7,19 @@ import { init } from 'smbls'
7
7
  import { overwriteShallow } from '@symbo.ls/utils'
8
8
  import { applyOpsToCtx } from './applier.js'
9
9
 
10
- export const onSnapshot =
11
- (el, s, ctx) =>
12
- (payload = {}) => {
10
+ export const onSnapshot = (el, s, ctx) => {
11
+ // The FIRST snapshot the server pushes on connect is just the already-rendered
12
+ // project echoed back. Its `designSystem` is the SERVER copy, which does NOT
13
+ // carry the shared-library merge (e.g. the brand design system) that the client
14
+ // applied at boot via prepareSharedLibs/mergeSharedLibraries. Re-running `init`
15
+ // from that brand-less DS reverts the page to the generic default-config theme
16
+ // — the visible, multi-second "design-system flash" (gray→black bg, navbar
17
+ // font-sizes jumping) that appears 5–10s after load when the socket connects.
18
+ // So skip the redundant DS re-init on that boot snapshot; the booted client
19
+ // design system (shared-library-merged) is authoritative. Genuine DS changes
20
+ // pushed in LATER snapshots are still honored.
21
+ let booted = false
22
+ return (payload = {}) => {
13
23
  let { data } = payload
14
24
  const { schema } = payload
15
25
  if (!data) return
@@ -23,7 +33,7 @@ export const onSnapshot =
23
33
  Object.entries(data).forEach(([key, val]) => {
24
34
  if (ctx[key] && typeof ctx[key] === 'object') {
25
35
  if (key === 'designSystem') {
26
- init(val)
36
+ if (booted) init(val)
27
37
  } else {
28
38
  overwriteShallow(ctx[key], val)
29
39
  }
@@ -32,8 +42,10 @@ export const onSnapshot =
32
42
  }
33
43
  })
34
44
 
45
+ booted = true
35
46
  if (schema) ctx.schema = schema
36
47
  }
48
+ }
37
49
 
38
50
  export const onOps =
39
51
  (el, s, ctx) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/sync",
3
- "version": "3.14.105",
3
+ "version": "3.14.499",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
@@ -50,7 +50,7 @@
50
50
  "@symbo.ls/scratch": "^3.14.105",
51
51
  "@symbo.ls/default-config": "^3.14.105",
52
52
  "chalk": "^5.4.1",
53
- "socket.io-client": "^4.8.1"
53
+ "socket.io-client": "^4.8.3"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/core": "^7.26.0"