@open-iframe-resizer/vue 1.4.0
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.
- package/LICENSE.md +20 -0
- package/dist/index.d.ts +16 -0
- package/dist/open-iframe-resizer-vue.es.js +240 -0
- package/dist/open-iframe-resizer-vue.umd.js +1 -0
- package/package.json +56 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2012-2024 Scott Chacon and others
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
3
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { DefineComponent } from 'vue';
|
|
5
|
+
import { PublicProps } from 'vue';
|
|
6
|
+
import { Settings } from '@open-iframe-resizer/core';
|
|
7
|
+
|
|
8
|
+
export declare const IframeResizer: DefineComponent<Partial<Settings>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Partial<Settings>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
9
|
+
'iframe-ref': HTMLIFrameElement;
|
|
10
|
+
}, HTMLIFrameElement>;
|
|
11
|
+
|
|
12
|
+
export declare const IframeResizerPlugin: {
|
|
13
|
+
install(app: App): void;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { }
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { defineComponent as M, useTemplateRef as k, onMounted as O, onBeforeUnmount as P, createElementBlock as A, openBlock as B, mergeProps as T } from "vue";
|
|
2
|
+
const E = () => typeof window < "u", D = () => window.self !== window.top, h = (e) => e instanceof HTMLIFrameElement, H = (e) => {
|
|
3
|
+
window.document.readyState === "complete" ? e() : window.addEventListener("load", e);
|
|
4
|
+
}, C = (e, t) => {
|
|
5
|
+
t(), e.addEventListener("load", t);
|
|
6
|
+
}, x = (e, t) => {
|
|
7
|
+
var n, r;
|
|
8
|
+
const a = ((n = e.contentWindow) == null ? void 0 : n.document.readyState) === "complete";
|
|
9
|
+
return e.src !== "about:blank" && ((r = e.contentWindow) == null ? void 0 : r.location.href) !== "about:blank" && a ? t() : e.addEventListener("load", t);
|
|
10
|
+
}, F = () => ({ offsetSize: 0, checkOrigin: !0, enableLegacyLibSupport: !1 }), W = (e) => {
|
|
11
|
+
try {
|
|
12
|
+
return new URL(e.src).origin === window.location.origin;
|
|
13
|
+
} catch {
|
|
14
|
+
return !1;
|
|
15
|
+
}
|
|
16
|
+
}, _ = (e) => {
|
|
17
|
+
try {
|
|
18
|
+
const t = new URL(e.src).origin;
|
|
19
|
+
if (t !== "about:blank")
|
|
20
|
+
return t;
|
|
21
|
+
} catch {
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}, U = (e) => (Object.keys(e).forEach((t) => e[t] === void 0 && delete e[t]), e), S = (e) => {
|
|
25
|
+
const { height: t, width: n } = e.getBoundingClientRect();
|
|
26
|
+
return { height: Math.ceil(t), width: Math.ceil(n) };
|
|
27
|
+
}, f = (e, t) => e ? t ? e.querySelector(t) : e.documentElement : null, z = (e, t) => {
|
|
28
|
+
e && (t.bodyPadding && (e.body.style.padding = t.bodyPadding), t.bodyMargin && (e.body.style.margin = t.bodyMargin));
|
|
29
|
+
}, g = (e) => e <= 100 ? 100 : e <= 120 ? 1e3 : 1e4, q = () => "[iFrameSizer]ID:0:false:false:32:true:true::auto:::0:false:child:auto:true:::true:::false";
|
|
30
|
+
function $(e) {
|
|
31
|
+
if (typeof e.data == "string" && e.data.startsWith("[iFrameSizer]")) {
|
|
32
|
+
const [t, n] = e.data.split(":"), r = +n;
|
|
33
|
+
return r > 0 ? r : null;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const w = X();
|
|
38
|
+
let l = [];
|
|
39
|
+
const j = (e, t) => {
|
|
40
|
+
if (!E())
|
|
41
|
+
return [];
|
|
42
|
+
const n = { ...F(), ...U(e ?? {}) }, r = N(t), a = G(n, r);
|
|
43
|
+
return r.map((i) => {
|
|
44
|
+
const o = {
|
|
45
|
+
iframe: i,
|
|
46
|
+
settings: n,
|
|
47
|
+
interactionState: { isHovered: !1 },
|
|
48
|
+
initContext: { isInitialized: !1, retryAttempts: 0 }
|
|
49
|
+
}, s = K(o, a);
|
|
50
|
+
return l.push(o), {
|
|
51
|
+
unsubscribe: () => {
|
|
52
|
+
s(), l = l.filter((d) => d.iframe !== i);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
function N(e) {
|
|
58
|
+
return typeof e == "string" ? Array.from(document.querySelectorAll(e)).filter(h) : e ? h(e) ? [e] : [] : Array.from(document.getElementsByTagName("iframe"));
|
|
59
|
+
}
|
|
60
|
+
function G(e, t) {
|
|
61
|
+
if (Array.isArray(e.checkOrigin))
|
|
62
|
+
return e.checkOrigin;
|
|
63
|
+
if (!e.checkOrigin)
|
|
64
|
+
return [];
|
|
65
|
+
const n = [];
|
|
66
|
+
for (const r of t) {
|
|
67
|
+
const a = _(r);
|
|
68
|
+
a && n.push(a);
|
|
69
|
+
}
|
|
70
|
+
return n;
|
|
71
|
+
}
|
|
72
|
+
function K(e, t) {
|
|
73
|
+
const n = W(e.iframe) ? J(e) : V(e, t), r = Q(e);
|
|
74
|
+
return () => {
|
|
75
|
+
n(), r();
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function V(e, t) {
|
|
79
|
+
const {
|
|
80
|
+
iframe: n,
|
|
81
|
+
initContext: r,
|
|
82
|
+
settings: { checkOrigin: a, enableLegacyLibSupport: i, targetElementSelector: o, bodyPadding: s, bodyMargin: d }
|
|
83
|
+
} = e, y = (c) => {
|
|
84
|
+
var b;
|
|
85
|
+
const I = !a || t.includes(c.origin);
|
|
86
|
+
if (!(n.contentWindow !== c.source || !I)) {
|
|
87
|
+
if (((b = c.data) == null ? void 0 : b.type) === "iframe-resized") {
|
|
88
|
+
const { height: u } = c.data;
|
|
89
|
+
u && m({ newHeight: u, registeredElement: e });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (i) {
|
|
93
|
+
const u = $(c);
|
|
94
|
+
u !== null && m({ newHeight: u, registeredElement: e });
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
window.addEventListener("message", y);
|
|
100
|
+
const R = i ? q() : { type: "iframe-child-init", targetElementSelector: o, bodyPadding: s, bodyMargin: d }, p = () => {
|
|
101
|
+
C(n, () => {
|
|
102
|
+
var c;
|
|
103
|
+
return (c = n.contentWindow) == null ? void 0 : c.postMessage(R, "*");
|
|
104
|
+
}), r.retryAttempts++, r.retryTimeoutId = window.setTimeout(p, g(r.retryAttempts));
|
|
105
|
+
};
|
|
106
|
+
return p(), () => window.removeEventListener("message", y);
|
|
107
|
+
}
|
|
108
|
+
function J(e) {
|
|
109
|
+
const { iframe: t, settings: n } = e, { targetElementSelector: r } = n;
|
|
110
|
+
let a = 0;
|
|
111
|
+
const i = () => {
|
|
112
|
+
const o = f(t.contentDocument, r);
|
|
113
|
+
if (!t.contentDocument || !o)
|
|
114
|
+
return a++, setTimeout(i, g(a));
|
|
115
|
+
z(t.contentDocument, n), w().observe(o);
|
|
116
|
+
};
|
|
117
|
+
return x(t, i), () => {
|
|
118
|
+
const o = f(t.contentDocument, r);
|
|
119
|
+
o && w().unobserve(o), t.removeEventListener("load", i);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function Q({ iframe: e, interactionState: t }) {
|
|
123
|
+
const n = () => {
|
|
124
|
+
t.isHovered = !0;
|
|
125
|
+
}, r = () => {
|
|
126
|
+
t.isHovered = !1;
|
|
127
|
+
};
|
|
128
|
+
return e.addEventListener("mouseenter", n), e.addEventListener("mouseleave", r), () => {
|
|
129
|
+
e.removeEventListener("mouseenter", n), e.removeEventListener("mouseleave", r);
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function X() {
|
|
133
|
+
let e = null;
|
|
134
|
+
return () => {
|
|
135
|
+
if (!e) {
|
|
136
|
+
const t = ({ target: n }) => {
|
|
137
|
+
const r = l.find(({ iframe: d }) => d.contentDocument === n.ownerDocument);
|
|
138
|
+
if (!r)
|
|
139
|
+
return;
|
|
140
|
+
const { iframe: a, settings: i } = r, o = f(a.contentDocument, i.targetElementSelector);
|
|
141
|
+
if (!o)
|
|
142
|
+
return;
|
|
143
|
+
const { height: s } = S(o);
|
|
144
|
+
s && m({ newHeight: s, registeredElement: r });
|
|
145
|
+
};
|
|
146
|
+
e = new ResizeObserver((n) => n.forEach(t));
|
|
147
|
+
}
|
|
148
|
+
return e;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function m({ registeredElement: e, newHeight: t }) {
|
|
152
|
+
const { iframe: n, settings: r, interactionState: a, initContext: i } = e;
|
|
153
|
+
i.isInitialized || (i.isInitialized = !0, clearTimeout(i.retryTimeoutId));
|
|
154
|
+
const o = n.getBoundingClientRect(), s = t + r.offsetSize;
|
|
155
|
+
if (n.style.height = `${s}px`, !r.onIframeResize)
|
|
156
|
+
return;
|
|
157
|
+
const d = {
|
|
158
|
+
iframe: n,
|
|
159
|
+
settings: { ...r },
|
|
160
|
+
interactionState: { ...a },
|
|
161
|
+
previousRenderState: { rect: o },
|
|
162
|
+
nextRenderState: { rect: n.getBoundingClientRect() }
|
|
163
|
+
};
|
|
164
|
+
r.onIframeResize(d);
|
|
165
|
+
}
|
|
166
|
+
const Y = ee();
|
|
167
|
+
let v = !1;
|
|
168
|
+
Z();
|
|
169
|
+
function Z() {
|
|
170
|
+
!E() || !D() || window.addEventListener("message", (e) => {
|
|
171
|
+
var t;
|
|
172
|
+
((t = e.data) == null ? void 0 : t.type) === "iframe-child-init" && H(() => L(e));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function L(e, t = 0) {
|
|
176
|
+
const { targetElementSelector: n, bodyPadding: r, bodyMargin: a } = e.data, i = f(document, n);
|
|
177
|
+
if (v || window.parent !== e.source)
|
|
178
|
+
return;
|
|
179
|
+
if (!i)
|
|
180
|
+
return setTimeout(() => L(e, t + 1), g(t));
|
|
181
|
+
z(document, { bodyMargin: a, bodyPadding: r });
|
|
182
|
+
const o = Y();
|
|
183
|
+
o.disconnect(), o.observe(i), v = !0;
|
|
184
|
+
}
|
|
185
|
+
function ee() {
|
|
186
|
+
let e = null;
|
|
187
|
+
return () => (e || (e = new ResizeObserver((t) => {
|
|
188
|
+
if (!t[0].target)
|
|
189
|
+
return;
|
|
190
|
+
const { height: n, width: r } = S(t[0].target), a = {
|
|
191
|
+
type: "iframe-resized",
|
|
192
|
+
width: r,
|
|
193
|
+
height: n
|
|
194
|
+
};
|
|
195
|
+
window.parent.postMessage(a, "*");
|
|
196
|
+
})), e);
|
|
197
|
+
}
|
|
198
|
+
const te = /* @__PURE__ */ M({
|
|
199
|
+
__name: "IframeResizer",
|
|
200
|
+
props: {
|
|
201
|
+
offsetSize: {},
|
|
202
|
+
checkOrigin: { type: [Array, Boolean] },
|
|
203
|
+
enableLegacyLibSupport: { type: Boolean },
|
|
204
|
+
targetElementSelector: {},
|
|
205
|
+
bodyPadding: {},
|
|
206
|
+
bodyMargin: {},
|
|
207
|
+
onIframeResize: { type: Function }
|
|
208
|
+
},
|
|
209
|
+
setup(e) {
|
|
210
|
+
const t = e, n = k("iframe-ref");
|
|
211
|
+
let r = [];
|
|
212
|
+
const a = (i) => {
|
|
213
|
+
const o = {
|
|
214
|
+
offsetSize: t.offsetSize,
|
|
215
|
+
enableLegacyLibSupport: t.enableLegacyLibSupport,
|
|
216
|
+
checkOrigin: t.checkOrigin,
|
|
217
|
+
onIframeResize: t.onIframeResize,
|
|
218
|
+
targetElementSelector: t.targetElementSelector,
|
|
219
|
+
bodyMargin: t.bodyMargin,
|
|
220
|
+
bodyPadding: t.bodyPadding
|
|
221
|
+
};
|
|
222
|
+
Object.keys(o).forEach((s) => {
|
|
223
|
+
o[s] === void 0 && delete o[s];
|
|
224
|
+
}), r = j(o, i);
|
|
225
|
+
};
|
|
226
|
+
return O(() => {
|
|
227
|
+
n.value && a(n.value);
|
|
228
|
+
}), P(() => {
|
|
229
|
+
r.forEach((i) => i.unsubscribe()), r = [];
|
|
230
|
+
}), (i, o) => (B(), A("iframe", T({ ref: "iframe-ref" }, i.$attrs), null, 16));
|
|
231
|
+
}
|
|
232
|
+
}), re = {
|
|
233
|
+
install(e) {
|
|
234
|
+
e.component("IframeResizer", te);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
export {
|
|
238
|
+
te as IframeResizer,
|
|
239
|
+
re as IframeResizerPlugin
|
|
240
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(d,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(d=typeof globalThis<"u"?globalThis:d||self,s(d["open-iframe-resizer-vue"]={},d.Vue))})(this,function(d,s){"use strict";const b=()=>typeof window<"u",k=()=>window.self!==window.top,h=e=>e instanceof HTMLIFrameElement,O=e=>{window.document.readyState==="complete"?e():window.addEventListener("load",e)},P=(e,t)=>{t(),e.addEventListener("load",t)},T=(e,t)=>{var n,i;const a=((n=e.contentWindow)==null?void 0:n.document.readyState)==="complete";return e.src!=="about:blank"&&((i=e.contentWindow)==null?void 0:i.location.href)!=="about:blank"&&a?t():e.addEventListener("load",t)},A=()=>({offsetSize:0,checkOrigin:!0,enableLegacyLibSupport:!1}),B=e=>{try{return new URL(e.src).origin===window.location.origin}catch{return!1}},D=e=>{try{const t=new URL(e.src).origin;if(t!=="about:blank")return t}catch{}return null},H=e=>(Object.keys(e).forEach(t=>e[t]===void 0&&delete e[t]),e),w=e=>{const{height:t,width:n}=e.getBoundingClientRect();return{height:Math.ceil(t),width:Math.ceil(n)}},m=(e,t)=>e?t?e.querySelector(t):e.documentElement:null,v=(e,t)=>{e&&(t.bodyPadding&&(e.body.style.padding=t.bodyPadding),t.bodyMargin&&(e.body.style.margin=t.bodyMargin))},y=e=>e<=100?100:e<=120?1e3:1e4,C=()=>"[iFrameSizer]ID:0:false:false:32:true:true::auto:::0:false:child:auto:true:::true:::false";function x(e){if(typeof e.data=="string"&&e.data.startsWith("[iFrameSizer]")){const[t,n]=e.data.split(":"),i=+n;return i>0?i:null}return null}const S=N();let g=[];const F=(e,t)=>{if(!b())return[];const n={...A(),...H(e??{})},i=W(t),a=_(n,i);return i.map(r=>{const o={iframe:r,settings:n,interactionState:{isHovered:!1},initContext:{isInitialized:!1,retryAttempts:0}},c=j(o,a);return g.push(o),{unsubscribe:()=>{c(),g=g.filter(l=>l.iframe!==r)}}})};function W(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)).filter(h):e?h(e)?[e]:[]:Array.from(document.getElementsByTagName("iframe"))}function _(e,t){if(Array.isArray(e.checkOrigin))return e.checkOrigin;if(!e.checkOrigin)return[];const n=[];for(const i of t){const a=D(i);a&&n.push(a)}return n}function j(e,t){const n=B(e.iframe)?U(e):q(e,t),i=$(e);return()=>{n(),i()}}function q(e,t){const{iframe:n,initContext:i,settings:{checkOrigin:a,enableLegacyLibSupport:r,targetElementSelector:o,bodyPadding:c,bodyMargin:l}}=e,R=u=>{var M;const X=!a||t.includes(u.origin);if(!(n.contentWindow!==u.source||!X)){if(((M=u.data)==null?void 0:M.type)==="iframe-resized"){const{height:f}=u.data;f&&p({newHeight:f,registeredElement:e});return}if(r){const f=x(u);f!==null&&p({newHeight:f,registeredElement:e});return}}};window.addEventListener("message",R);const Q=r?C():{type:"iframe-child-init",targetElementSelector:o,bodyPadding:c,bodyMargin:l},I=()=>{P(n,()=>{var u;return(u=n.contentWindow)==null?void 0:u.postMessage(Q,"*")}),i.retryAttempts++,i.retryTimeoutId=window.setTimeout(I,y(i.retryAttempts))};return I(),()=>window.removeEventListener("message",R)}function U(e){const{iframe:t,settings:n}=e,{targetElementSelector:i}=n;let a=0;const r=()=>{const o=m(t.contentDocument,i);if(!t.contentDocument||!o)return a++,setTimeout(r,y(a));v(t.contentDocument,n),S().observe(o)};return T(t,r),()=>{const o=m(t.contentDocument,i);o&&S().unobserve(o),t.removeEventListener("load",r)}}function $({iframe:e,interactionState:t}){const n=()=>{t.isHovered=!0},i=()=>{t.isHovered=!1};return e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",i),()=>{e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i)}}function N(){let e=null;return()=>{if(!e){const t=({target:n})=>{const i=g.find(({iframe:l})=>l.contentDocument===n.ownerDocument);if(!i)return;const{iframe:a,settings:r}=i,o=m(a.contentDocument,r.targetElementSelector);if(!o)return;const{height:c}=w(o);c&&p({newHeight:c,registeredElement:i})};e=new ResizeObserver(n=>n.forEach(t))}return e}}function p({registeredElement:e,newHeight:t}){const{iframe:n,settings:i,interactionState:a,initContext:r}=e;r.isInitialized||(r.isInitialized=!0,clearTimeout(r.retryTimeoutId));const o=n.getBoundingClientRect(),c=t+i.offsetSize;if(n.style.height=`${c}px`,!i.onIframeResize)return;const l={iframe:n,settings:{...i},interactionState:{...a},previousRenderState:{rect:o},nextRenderState:{rect:n.getBoundingClientRect()}};i.onIframeResize(l)}const V=K();let E=!1;G();function G(){!b()||!k()||window.addEventListener("message",e=>{var t;((t=e.data)==null?void 0:t.type)==="iframe-child-init"&&O(()=>z(e))})}function z(e,t=0){const{targetElementSelector:n,bodyPadding:i,bodyMargin:a}=e.data,r=m(document,n);if(E||window.parent!==e.source)return;if(!r)return setTimeout(()=>z(e,t+1),y(t));v(document,{bodyMargin:a,bodyPadding:i});const o=V();o.disconnect(),o.observe(r),E=!0}function K(){let e=null;return()=>(e||(e=new ResizeObserver(t=>{if(!t[0].target)return;const{height:n,width:i}=w(t[0].target),a={type:"iframe-resized",width:i,height:n};window.parent.postMessage(a,"*")})),e)}const L=s.defineComponent({__name:"IframeResizer",props:{offsetSize:{},checkOrigin:{type:[Array,Boolean]},enableLegacyLibSupport:{type:Boolean},targetElementSelector:{},bodyPadding:{},bodyMargin:{},onIframeResize:{type:Function}},setup(e){const t=e,n=s.useTemplateRef("iframe-ref");let i=[];const a=r=>{const o={offsetSize:t.offsetSize,enableLegacyLibSupport:t.enableLegacyLibSupport,checkOrigin:t.checkOrigin,onIframeResize:t.onIframeResize,targetElementSelector:t.targetElementSelector,bodyMargin:t.bodyMargin,bodyPadding:t.bodyPadding};Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),i=F(o,r)};return s.onMounted(()=>{n.value&&a(n.value)}),s.onBeforeUnmount(()=>{i.forEach(r=>r.unsubscribe()),i=[]}),(r,o)=>(s.openBlock(),s.createElementBlock("iframe",s.mergeProps({ref:"iframe-ref"},r.$attrs),null,16))}}),J={install(e){e.component("IframeResizer",L)}};d.IframeResizer=L,d.IframeResizerPlugin=J,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@open-iframe-resizer/vue",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.4.0",
|
|
5
|
+
"description": "Open-source modern iframe resizer component",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Lemick/open-iframe-resizer.git"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"iframe",
|
|
13
|
+
"resizing",
|
|
14
|
+
"resizer",
|
|
15
|
+
"resize",
|
|
16
|
+
"cross-domain",
|
|
17
|
+
"same-origin",
|
|
18
|
+
"responsive iframe",
|
|
19
|
+
"vue iframe",
|
|
20
|
+
"iframe-resizer"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/open-iframe-resizer-vue.umd.js",
|
|
24
|
+
"module": "./dist/open-iframe-resizer-vue.es.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/open-iframe-resizer-vue.es.js",
|
|
30
|
+
"require": "./dist/open-iframe-resizer-vue.umd.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "vue-tsc -b && npm run lint && vite build",
|
|
40
|
+
"lint": "biome lint ./src",
|
|
41
|
+
"dev": "concurrently \"vite build --watch \" \"npm run serve\"",
|
|
42
|
+
"serve": "concurrently \"vite --port 5552\" \"vite --port 5553\"",
|
|
43
|
+
"test": "npx playwright install --with-deps && npx playwright test"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@open-iframe-resizer/core": "1.4.0",
|
|
48
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
49
|
+
"@vue/tsconfig": "^0.7.0",
|
|
50
|
+
"vue-tsc": "^2.2.8",
|
|
51
|
+
"vue": "^3.5.13"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"vue": ">=3.0.0"
|
|
55
|
+
}
|
|
56
|
+
}
|