@tb-dev/vue 3.2.4 → 3.3.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.
@@ -2,6 +2,7 @@ import { Ref } from 'vue';
2
2
  export interface LocalRefOptions {
3
3
  deep?: boolean;
4
4
  initOnMounted?: boolean;
5
+ listenToStorageChanges?: boolean;
5
6
  onError?: (err: unknown) => void;
6
7
  writeDefaults?: boolean;
7
8
  }
@@ -2,6 +2,7 @@ import { Ref } from 'vue';
2
2
  export interface SessionRefOptions {
3
3
  deep?: boolean;
4
4
  initOnMounted?: boolean;
5
+ listenToStorageChanges?: boolean;
5
6
  onError?: (err: unknown) => void;
6
7
  writeDefaults?: boolean;
7
8
  }
package/dist/index.js CHANGED
@@ -161,6 +161,7 @@ function localRef(key, initial, options) {
161
161
  const local = useLocalStorage(key, defaultValue, {
162
162
  deep: options?.deep ?? true,
163
163
  initOnMounted: options?.initOnMounted ?? true,
164
+ listenToStorageChanges: options?.listenToStorageChanges ?? true,
164
165
  onError: options?.onError ?? handleError,
165
166
  writeDefaults: options?.writeDefaults ?? true,
166
167
  serializer: {
@@ -240,6 +241,7 @@ function sessionRef(key, initial, options) {
240
241
  const session = useSessionStorage(key, defaultValue, {
241
242
  deep: options?.deep ?? true,
242
243
  initOnMounted: options?.initOnMounted ?? true,
244
+ listenToStorageChanges: options?.listenToStorageChanges ?? true,
243
245
  onError: options?.onError ?? handleError,
244
246
  writeDefaults: options?.writeDefaults ?? true,
245
247
  serializer: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue",
3
- "version": "3.2.4",
3
+ "version": "3.3.0",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,9 +30,9 @@
30
30
  "vue": "^3.5.21"
31
31
  },
32
32
  "devDependencies": {
33
- "@tb-dev/eslint-config": "^8.0.8",
33
+ "@tb-dev/eslint-config": "^8.0.11",
34
34
  "@types/node": "^24.3.1",
35
- "eslint": "^9.34.0",
35
+ "eslint": "^9.35.0",
36
36
  "tslib": "^2.8.1",
37
37
  "typedoc": "^0.28.12",
38
38
  "typedoc-plugin-mdn-links": "^5.0.9",