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

@featherds/menu

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@featherds/menu - npm Package Compare versions

Comparing version 0.12.5 to 0.12.6

12

package.json
{
"name": "@featherds/menu",
"version": "0.12.5",
"version": "0.12.6",
"publishConfig": {

@@ -12,6 +12,6 @@ "access": "public"

"dependencies": {
"@featherds/composables": "^0.12.5",
"@featherds/ripple": "^0.12.5",
"@featherds/styles": "^0.12.5",
"@featherds/utils": "^0.12.5",
"@featherds/composables": "^0.12.6",
"@featherds/ripple": "^0.12.6",
"@featherds/styles": "^0.12.6",
"@featherds/utils": "^0.12.6",
"vue": "^3.1.0-0"

@@ -24,3 +24,3 @@ },

"types": "./src/index.d.ts",
"gitHead": "902fb935f136f66098ff1f777f7ca1294854cd42"
"gitHead": "efae40a88230bf71e4927f9e40604d095fb92d35"
}

@@ -6,3 +6,4 @@ import { nextTick } from "vue";

import * as id from "@featherds/utils/id";
jest.spyOn(id, "getSafeId").mockImplementation((x) => x);
import { vi, expect, describe, it } from "vitest";
vi.spyOn(id, "getSafeId").mockImplementation((x) => x);
const getWrapper = async (options: Record<string, unknown> = {}) => {

@@ -97,3 +98,3 @@ const wrapper = mount(FeatherMenu, options);

const wrapper = await getWrapper({ slots });
const documentRemove = jest.spyOn(document, "removeEventListener");
const documentRemove = vi.spyOn(document, "removeEventListener");
wrapper.unmount();

@@ -113,21 +114,23 @@ expect(documentRemove).toHaveBeenCalled();

});
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height: 100,
width: 20,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 100,
width: 50,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height: 100,
width: 20,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 100,
width: 50,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -147,21 +150,23 @@ await nextTick();

});
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height: 100,
width: 200,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 100,
width: 50,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height: 100,
width: 200,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 100,
width: 50,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -185,20 +190,22 @@ await nextTick();

});
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height: 100,
width: 100,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 120,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height: 100,
width: 100,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 120,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -221,20 +228,22 @@ await nextTick();

const windowHeight = window.innerHeight;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 120,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 120,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -256,20 +265,22 @@ await nextTick();

const width = 100;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 10,
right: 30,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 10,
right: 30,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -293,20 +304,22 @@ await nextTick();

const windowHeight = window.innerHeight;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -327,20 +340,22 @@ await nextTick();

const windowHeight = window.innerHeight;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 10,
right: 30,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 10,
right: 30,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -359,20 +374,22 @@ await nextTick();

const wrapper = await getWrapper({ slots, props: { open: true } });
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height: 100,
width: 100,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 80,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height: 100,
width: 100,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 80,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -393,20 +410,22 @@ await nextTick();

const windowHeight = window.innerHeight;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 80,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 80,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -426,20 +445,22 @@ await nextTick();

const windowWidth = window.innerWidth;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: windowWidth - 30,
right: windowWidth,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: windowWidth - 30,
right: windowWidth,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -460,20 +481,22 @@ await nextTick();

const windowHeight = window.innerHeight;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -494,20 +517,22 @@ await nextTick();

const windowHeight = window.innerHeight;
jest
.spyOn(wrapper.vm.$refs.menu as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
jest
.spyOn(wrapper.vm.$refs.root as HTMLElement, "getBoundingClientRect")
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: windowWidth - 30,
right: windowWidth,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.menu as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
height,
width,
} as DOMRect;
});
vi.spyOn(
wrapper.vm.$refs.root as HTMLElement,
"getBoundingClientRect"
).mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: windowWidth - 30,
right: windowWidth,
} as DOMRect;
});
wrapper.vm.calculatePosition();

@@ -514,0 +539,0 @@ await nextTick();

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