Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-window-size

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-window-size - npm Package Compare versions

Comparing version 1.0.0-0 to 1.0.0-1

dist/composition-api.d.ts

2

dist/index.common.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i,e,n=require("window-resize-subject"),t=require("vue-demi"),r="undefined"!=typeof window,u=function(i){return null!=i?i:r?window.innerWidth:0},o=function(i){return null!=i?i:r?window.innerHeight:0},d=function(i){return{width:u(null==i?void 0:i.width),height:o(null==i?void 0:i.height)}},c=function(){return i||(i=new n.WindowResizeSubject),i},h=function(){return e||(e=function(i){var e=t.reactive(d());return i.addObserver("option-api",(function(i){var n=i.width,t=i.height;e.width=n,e.height=t})).subscribe(),{computed:{windowWidth:function(){return e.width},windowHeight:function(){return e.height}}}}(c())),e},s=function(i){return{setDelay:function(e){i().setDelay(e)},init:function(){i().subscribe()},destroy:function(){i().unsubscribe()}}}(c);var w=function(i){var e=t.reactive(d());return i().addObserver("composition-api",(function(i){var n=i.width,t=i.height;e.width=n,e.height=t})).subscribe(),function(){return{width:t.computed((function(){return e.width})),height:t.computed((function(){return e.height}))}}}(c),f={install:function(e,n){var t=(void 0===n?{}:n).delay,r=void 0===t?33:t,u=h();i.setDelay(r),e.mixin({mixins:[u]})}};exports.VueWindowSizePlugin=f,exports.useWindowSize=w,exports.vueWindowSizeAPI=s,exports.vueWindowSizeMixin=h;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,i=require("vue-demi"),n=require("window-resize-subject"),t="undefined"!=typeof window,r=function(e){return null!=e?e:t?window.innerWidth:0},u=function(e){return null!=e?e:t?window.innerHeight:0},o=function(e){var n,t=i.reactive({width:r(null==n?void 0:n.width),height:u(null==n?void 0:n.height)});return e().addObserver("composition-api",(function(e){var i=e.width,n=e.height;t.width=i,t.height=n})).subscribe(),function(){return{width:i.computed((function(){return t.width})),height:i.computed((function(){return t.height}))}}}((function(){return e||(e=new n.WindowResizeSubject),e}));exports.useWindowSize=o;

@@ -1,28 +0,4 @@

import type { App } from 'vue-demi';
import type { Mixin } from './mixin';
export declare const vueWindowSizeMixin: () => Mixin;
export declare const vueWindowSizeAPI: {
setDelay(delay: number): void;
init(): void;
destroy(): void;
};
declare function install(app: App, { delay }?: {
delay?: number | undefined;
}): void;
export declare const useWindowSize: () => {
width: import("vue-demi").ComputedRef<number>;
height: import("vue-demi").ComputedRef<number>;
width: import("vue").ComputedRef<number>;
height: import("vue").ComputedRef<number>;
};
export declare const VueWindowSizePlugin: {
install: typeof install;
};
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
windowWidth: number;
windowHeight: number;
}
}
export declare type VueWindowSizeOption = {
delay?: number;
};
export {};

@@ -1,1 +0,1 @@

!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("window-resize-subject"),require("vue-demi")):"function"==typeof define&&define.amd?define(["exports","window-resize-subject","vue-demi"],i):i(((e="undefined"!=typeof globalThis?globalThis:e||self).bundle=e.bundle||{},e.bundle.umd=e.bundle.umd||{},e.bundle.umd.js={}),e.windowResizeSubject,e.vueDemi)}(this,(function(e,i,n){"use strict";var t,u,o="undefined"!=typeof window,d=function(e){return null!=e?e:o?window.innerWidth:0},r=function(e){return null!=e?e:o?window.innerHeight:0},c=function(e){return{width:d(null==e?void 0:e.width),height:r(null==e?void 0:e.height)}},f=function(){return t||(t=new i.WindowResizeSubject),t},s=function(){return u||(u=function(e){var i=n.reactive(c());return e.addObserver("option-api",(function(e){var n=e.width,t=e.height;i.width=n,i.height=t})).subscribe(),{computed:{windowWidth:function(){return i.width},windowHeight:function(){return i.height}}}}(f())),u},h=function(e){return{setDelay:function(i){e().setDelay(i)},init:function(){e().subscribe()},destroy:function(){e().unsubscribe()}}}(f);var w=function(e){var i=n.reactive(c());return e().addObserver("composition-api",(function(e){var n=e.width,t=e.height;i.width=n,i.height=t})).subscribe(),function(){return{width:n.computed((function(){return i.width})),height:n.computed((function(){return i.height}))}}}(f),l={install:function(e,i){var n=(void 0===i?{}:i).delay,u=void 0===n?33:n,o=s();t.setDelay(u),e.mixin({mixins:[o]})}};e.VueWindowSizePlugin=l,e.useWindowSize=w,e.vueWindowSizeAPI=h,e.vueWindowSizeMixin=s,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue-demi"),require("window-resize-subject")):"function"==typeof define&&define.amd?define(["exports","vue-demi","window-resize-subject"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).bundle=e.bundle||{},e.bundle.index=e.bundle.index||{},e.bundle.index.umd=e.bundle.index.umd||{},e.bundle.index.umd.js={}),e.vueDemi,e.windowResizeSubject)}(this,(function(e,n,i){"use strict";var t,u="undefined"!=typeof window,d=function(e){return null!=e?e:u?window.innerWidth:0},o=function(e){return null!=e?e:u?window.innerHeight:0},r=function(e){var i,t=n.reactive({width:d(null==i?void 0:i.width),height:o(null==i?void 0:i.height)});return e().addObserver("composition-api",(function(e){var n=e.width,i=e.height;t.width=n,t.height=i})).subscribe(),function(){return{width:n.computed((function(){return t.width})),height:n.computed((function(){return t.height}))}}}((function(){return t||(t=new i.WindowResizeSubject),t}));e.useWindowSize=r,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "vue-window-size",
"version": "1.0.0-0",
"version": "1.0.0-1",
"description": "Reactivity window size for Vue.js.",

@@ -16,5 +16,3 @@ "main": "dist/index.common.js",

"prebuild": "rimraf dist",
"build": "run-s build:*",
"build:cjs": "BUILD_FORMAT=cjs rollup --config rollup.config.js",
"build:umd": "BUILD_FORMAT=umd rollup --config rollup.config.js",
"build": "rollup --config rollup.config.js",
"format": "prettier --write .",

@@ -56,5 +54,3 @@ "format:check": "prettier --check .",

"files": [
"dist/index.common.js",
"dist/index.umd.js",
"dist/index.d.ts"
"dist"
],

@@ -61,0 +57,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc