@live-change/vue3-ssr 0.8.86 → 0.8.88

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.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -88,6 +88,15 @@ function useUid(context) {
88
88
  }
89
89
 
90
90
  function useTimeSynchronization(context, onUnmountedCb) {
91
+ if(typeof window === 'undefined') return { // on server we use current server time
92
+ waitForSynchronized: () => Promise.resolve(),
93
+ diff: ref(0),
94
+ synchronized: ref(true),
95
+ serverToLocal: (ts) => ts,
96
+ localToServer: (ts) => ts,
97
+ serverToLocalComputed: (ts) => ts,
98
+ localToServerComputed: (ts) => ts,
99
+ }
91
100
  const api = useApi(context)
92
101
  const timeSynchronization = api.settings.timeSynchronization
93
102
  if(!timeSynchronization) throw new Error("Time synchronization not configured")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/vue3-ssr",
3
- "version": "0.8.86",
3
+ "version": "0.8.88",
4
4
  "description": "Live Change Framework - vue components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "homepage": "https://github.com/live-change/live-change-stack",
23
23
  "dependencies": {
24
- "@live-change/dao-vue3": "^0.8.86",
25
- "@live-change/uid": "^0.8.86",
24
+ "@live-change/dao-vue3": "^0.8.88",
25
+ "@live-change/uid": "^0.8.88",
26
26
  "@vueuse/core": "^10.11.0",
27
27
  "debug": "^4.3.4"
28
28
  },
29
- "gitHead": "3db6ec0c618b4e17974a525ef184fa6fae9b8ee0"
29
+ "gitHead": "f80b7c8bf00dc6cc41124fa402edebc7b596e83c"
30
30
  }