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

@takuma-ru/vue-swipe-modal

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@takuma-ru/vue-swipe-modal - npm Package Compare versions

Comparing version 5.0.2-beta.0 to 5.0.2

67

dist/vueSwipeModal.js
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.swipe-modal[data-v-8a63990a]{position:fixed;top:auto;bottom:var(--ef0a5750);box-sizing:border-box;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;padding:0;margin:0;overflow:hidden;border:none}.swipe-modal[data-v-8a63990a]::backdrop{background-color:#00000080;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.swipe-modal-content[data-v-8a63990a]{width:100%;height:100%}.swipe-modal-content>.panel[data-v-8a63990a]{max-height:calc(100dvh - 36px);overflow-y:scroll}.modal-style[data-v-8a63990a]{box-sizing:border-box;width:100%;color:#fff;background-color:#1d1b20;border-radius:1rem 1rem 0 0}@media (prefers-color-scheme: light){.modal-style[data-v-8a63990a]{color:#000;background-color:#f7f2fa;box-shadow:0 1px 4px #0000005e}}.swipe-modal-drag-handle-wrapper[data-v-8a63990a]{position:relative;top:0;flex-shrink:0;height:36px;cursor:grab}.swipe-modal-drag-handle-wrapper[data-v-8a63990a]:active{cursor:grabbing}.swipe-modal-drag-handle[data-v-8a63990a]{position:absolute;left:50%;width:32px;height:4px;margin:16px 0;content:"";background-color:#ccc;border-radius:2px;transform:translate(-50%)}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
import { getCurrentInstance as z, ref as m, watch as _, nextTick as O, computed as R, defineComponent as D, useCssVars as F, unref as N, onMounted as Y, openBlock as I, createElementBlock as A, createElementVNode as C, renderSlot as $, createCommentVNode as H, pushScopeId as L, popScopeId as J } from "vue";
import { getCurrentInstance as z, ref as m, watch as C, nextTick as O, computed as R, defineComponent as D, useCssVars as F, unref as N, onMounted as Y, openBlock as I, createElementBlock as A, createElementVNode as V, renderSlot as $, createCommentVNode as H, pushScopeId as L, popScopeId as J } from "vue";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;

@@ -8,4 +8,4 @@ const G = (a) => typeof a < "u";

}
function W(a, d, o, k = {}) {
var t, B, f;
function W(a, d, o, _ = {}) {
var t, k, f;
const {

@@ -18,23 +18,23 @@ clone: u = !1,

shouldEmit: v
} = k, c = z(), E = o || (c == null ? void 0 : c.emit) || ((t = c == null ? void 0 : c.$emit) == null ? void 0 : t.bind(c)) || ((f = (B = c == null ? void 0 : c.proxy) == null ? void 0 : B.$emit) == null ? void 0 : f.bind(c == null ? void 0 : c.proxy));
} = _, c = z(), B = o || (c == null ? void 0 : c.emit) || ((t = c == null ? void 0 : c.$emit) == null ? void 0 : t.bind(c)) || ((f = (k = c == null ? void 0 : c.proxy) == null ? void 0 : k.$emit) == null ? void 0 : f.bind(c == null ? void 0 : c.proxy));
let y = h;
d || (d = "modelValue"), y = y || `update:${d.toString()}`;
const p = (s) => u ? typeof u == "function" ? u(s) : U(s) : s, M = () => G(a[d]) ? p(a[d]) : r, V = (s) => {
v ? v(s) && E(y, s) : E(y, s);
const p = (s) => u ? typeof u == "function" ? u(s) : U(s) : s, M = () => G(a[d]) ? p(a[d]) : r, T = (s) => {
v ? v(s) && B(y, s) : B(y, s);
};
if (b) {
const s = M(), T = m(s);
const s = M(), E = m(s);
let g = !1;
return _(
return C(
() => a[d],
(P) => {
g || (g = !0, T.value = p(P), O(() => g = !1));
g || (g = !0, E.value = p(P), O(() => g = !1));
}
), _(
T,
), C(
E,
(P) => {
!g && (P !== a[d] || i) && V(P);
!g && (P !== a[d] || i) && T(P);
},
{ deep: i }
), T;
), E;
} else

@@ -46,7 +46,7 @@ return R({

set(s) {
V(s);
T(s);
}
});
}
const X = (a) => (L("data-v-8a63990a"), a = a(), J(), a), j = /* @__PURE__ */ X(() => /* @__PURE__ */ C("div", { class: "swipe-modal-drag-handle" }, null, -1)), q = /* @__PURE__ */ D({
const X = (a) => (L("data-v-8a63990a"), a = a(), J(), a), j = /* @__PURE__ */ X(() => /* @__PURE__ */ V("div", { class: "swipe-modal-drag-handle" }, null, -1)), q = /* @__PURE__ */ D({
__name: "SwipeModal",

@@ -67,5 +67,5 @@ props: {

}));
const o = a, k = d, t = m(null), B = m(null), f = W(o, "modelValue", k), u = m("-100%"), b = m(!1), h = m(0), i = m(0), r = m("close"), v = R(() => {
const o = a, _ = d, t = m(null), k = m(null), f = W(o, "modelValue", _), u = m("-100%"), b = m(!1), h = m(0), i = m(0), r = m("close"), v = R(() => {
var e;
return o.snapPoint ? o.snapPoint === "auto" ? `calc(${((e = B.value) == null ? void 0 : e.getBoundingClientRect().height) || 0}px + 36px - 100%)` : `calc(${o.snapPoint} - 100%)` : "0px";
return o.snapPoint ? o.snapPoint === "auto" ? `calc(${((e = k.value) == null ? void 0 : e.getBoundingClientRect().height) || 0}px + 36px - 100%)` : `calc(${o.snapPoint} - 100%)` : "0px";
}), c = ({

@@ -77,3 +77,3 @@ mouseEvent: e,

l === "mouse" ? h.value = e.y : h.value = n.touches[0].clientY, b.value = !0;
}, E = ({
}, B = ({
mouseEvent: e,

@@ -100,3 +100,3 @@ touchEvent: n,

case "snap":
return o.isFullScreen ? V() : p();
return o.isFullScreen ? T() : p();
default:

@@ -140,3 +140,3 @@ return;

});
}, V = () => {
}, T = () => {
t.value && (t.value.animate(

@@ -162,3 +162,3 @@ [

}
}, T = (e) => {
}, E = (e) => {
e.stopPropagation();

@@ -217,3 +217,3 @@ }, g = () => {

};
return _(
return C(
() => f.value,

@@ -223,3 +223,3 @@ (e) => {

}
), _(
), C(
() => o.isScrollLock,

@@ -237,8 +237,8 @@ (e) => {

}, [
C("div", {
V("div", {
tabindex: "-1",
class: "swipe-modal-content",
onClick: T
onClick: E
}, [
C("div", {
V("div", {
class: "swipe-modal-drag-handle-wrapper",

@@ -249,3 +249,3 @@ onMousedown: n[0] || (n[0] = (l) => c({

})),
onMousemove: n[1] || (n[1] = (l) => E({
onMousemove: n[1] || (n[1] = (l) => B({
mouseEvent: l,

@@ -259,3 +259,3 @@ eventType: "mouse"

})),
onTouchmove: n[3] || (n[3] = (l) => E({
onTouchmove: n[3] || (n[3] = (l) => B({
touchEvent: l,

@@ -270,5 +270,5 @@ eventType: "touch"

], 32),
C("div", {
V("div", {
ref_key: "panelRef",
ref: B,
ref: k,
class: "panel"

@@ -281,6 +281,7 @@ }, [

}
}), K = (a, d) => {
});
const K = (a, d) => {
const o = a.__vccOpts || a;
for (const [k, t] of d)
o[k] = t;
for (const [_, t] of d)
o[_] = t;
return o;

@@ -287,0 +288,0 @@ }, Z = /* @__PURE__ */ K(q, [["__scopeId", "data-v-8a63990a"]]);

{
"name": "@takuma-ru/vue-swipe-modal",
"private": false,
"version": "5.0.2-beta.0",
"version": "5.0.2",
"description": "Swipeable Bottom Sheet library for vue2 and vue3",

@@ -96,3 +96,3 @@ "license": "MIT",

"typescript": "^5.3.3",
"vite": "^5.0.6",
"vite": "^4.5.2",
"vite-plugin-css-injected-by-js": "^3.3.0",

@@ -99,0 +99,0 @@ "vue-tsc": "^1.8.5"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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