nuxt-viewport
Advanced tools
Comparing version 2.1.6 to 2.2.0
@@ -7,7 +7,7 @@ { | ||
"name": "nuxt-viewport", | ||
"version": "2.1.6", | ||
"version": "2.2.0", | ||
"builder": { | ||
"@nuxt/module-builder": "0.8.3", | ||
"@nuxt/module-builder": "0.8.4", | ||
"unbuild": "2.0.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ import { type Ref } from 'vue-demi'; | ||
export declare function createViewportManager(options: ViewportOptions, state: Ref<string>): { | ||
breakpoint: import("vue").WritableComputedRef<string>; | ||
breakpoint: import("vue").WritableComputedRef<string, string>; | ||
breakpointValue: (searchBreakpoint: string) => number; | ||
@@ -11,2 +11,3 @@ isGreaterThan: (searchBreakpoint: string) => boolean; | ||
isLessThan: (searchBreakpoint: string) => boolean; | ||
isLessOrEquals: (searchBreakpoint: string) => boolean; | ||
match: (breakpointToMatch: string) => boolean; | ||
@@ -13,0 +14,0 @@ matches: (...breakpointsToMatch: string[]) => boolean; |
@@ -56,2 +56,3 @@ import cookie from "cookiejs"; | ||
isLessThan, | ||
isLessOrEquals, | ||
match, | ||
@@ -84,2 +85,5 @@ matches, | ||
} | ||
function isLessOrEquals(searchBreakpoint) { | ||
return isLessThan(searchBreakpoint) || match(searchBreakpoint); | ||
} | ||
function match(breakpointToMatch) { | ||
@@ -86,0 +90,0 @@ return breakpoint.value === breakpointToMatch; |
{ | ||
"name": "nuxt-viewport", | ||
"version": "2.1.6", | ||
"version": "2.2.0", | ||
"description": "Define custom viewports for your Nuxt project", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -260,2 +260,12 @@ # nuxt-viewport | ||
### `viewport.isLessOrEquals` | ||
- Type: Boolean | ||
```js | ||
// Example: viewport.breakpoint is "tablet". | ||
viewport.isLessOrEquals('tablet') // Result: true. | ||
viewport.isLessOrEquals('mobile') // Result: false. | ||
``` | ||
### `viewport.match` | ||
@@ -262,0 +272,0 @@ - Type: Boolean |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21117
365
322
0