@tb-dev/vue 3.3.4 → 3.4.1

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.
@@ -7,3 +7,4 @@ export * from './sessionRef';
7
7
  export * from './asyncComputed';
8
8
  export * from './useWindowSize';
9
9
  export * from './useElementSize';
10
+ export * from './useBreakpoints';
@@ -0,0 +1,3 @@
1
+ import { breakpointsTailwind, useBreakpoints as original } from '@vueuse/core';
2
+ export type Breakpoints = ReturnType<typeof original<keyof typeof breakpointsTailwind>>;
3
+ export declare function useBreakpoints(): Breakpoints;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { unwrap, isNil } from '@tb-dev/utils';
2
2
  import { inject as inject$1, toValue, toRef, ref, readonly, computed, effectScope } from 'vue';
3
- import { watchImmediate, useAsyncState, useLocalStorage, tryOnScopeDispose, onKeyStroke, useSessionStorage, computedAsync, useWindowSize, useElementSize as useElementSize$1 } from '@vueuse/core';
3
+ import { watchImmediate, useAsyncState, useLocalStorage, tryOnScopeDispose, onKeyStroke, useSessionStorage, computedAsync, useWindowSize, useElementSize as useElementSize$1, useBreakpoints as useBreakpoints$1, breakpointsTailwind } from '@vueuse/core';
4
4
  export { useWindowSize } from '@vueuse/core';
5
5
  import { Mutex } from 'es-toolkit';
6
6
 
@@ -294,6 +294,13 @@ function useWidthDiff(element, lhs) {
294
294
  return computed(() => lhsRef.value - width.value);
295
295
  }
296
296
 
297
+ const breakpointsKey = Symbol();
298
+ function useBreakpoints() {
299
+ return tryInjectOrElse(breakpointsKey, () => {
300
+ return useBreakpoints$1(breakpointsTailwind);
301
+ });
302
+ }
303
+
297
304
  if (!Object.hasOwn(globalThis, "__VUEUTILS__")) {
298
305
  Object.defineProperty(globalThis, "__VUEUTILS__", {
299
306
  configurable: false,
@@ -303,4 +310,4 @@ if (!Object.hasOwn(globalThis, "__VUEUTILS__")) {
303
310
  });
304
311
  }
305
312
 
306
- export { asyncComputed, asyncRef, console, getCurrentApp, getErrorHandler, handleError, inject, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, sessionRef, setCurrentApp, setErrorHandler, tryGetCurrentApp, tryInject, tryInjectOrElse, trySetCurrentApp, useElementSize, useHeight, useHeightDiff, useMutex, useWidth, useWidthDiff, useWindowHeight, useWindowWidth };
313
+ export { asyncComputed, asyncRef, console, getCurrentApp, getErrorHandler, handleError, inject, localRef, maybe, onAltKeyDown, onCtrlKeyDown, onCtrlShiftKeyDown, onKeyDown, onShiftKeyDown, provide, runWithContext, sessionRef, setCurrentApp, setErrorHandler, tryGetCurrentApp, tryInject, tryInjectOrElse, trySetCurrentApp, useBreakpoints, useElementSize, useHeight, useHeightDiff, useMutex, useWidth, useWidthDiff, useWindowHeight, useWindowWidth };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/vue",
3
- "version": "3.3.4",
3
+ "version": "3.4.1",
4
4
  "description": "Vue utilities",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,20 +24,20 @@
24
24
  "composables"
25
25
  ],
26
26
  "dependencies": {
27
- "@tb-dev/utils": "^7.0.18",
28
- "@vueuse/core": "^14.0.0",
29
- "es-toolkit": "^1.41.0",
30
- "vue": "^3.5.22"
27
+ "@tb-dev/utils": "^7.0.19",
28
+ "@vueuse/core": "^14.1.0",
29
+ "es-toolkit": "^1.42.0",
30
+ "vue": "^3.5.25"
31
31
  },
32
32
  "devDependencies": {
33
- "@tb-dev/eslint-config": "^8.1.1",
34
- "@types/node": "^24.10.0",
35
- "eslint": "^9.39.0",
33
+ "@tb-dev/eslint-config": "^8.2.0",
34
+ "@types/node": "^24.10.1",
35
+ "eslint": "^9.39.1",
36
36
  "tslib": "^2.8.1",
37
- "typedoc": "^0.28.14",
37
+ "typedoc": "^0.28.15",
38
38
  "typedoc-plugin-mdn-links": "^5.0.10",
39
39
  "typescript": "~5.9.3",
40
- "vite": "^7.1.12",
40
+ "vite": "^7.2.4",
41
41
  "vite-plugin-dts": "^4.5.4"
42
42
  },
43
43
  "files": [