@dyrected/vue 2.5.1 → 2.5.3
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/dist/bridge/react-in-vue.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +40 -40
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`vue`),l=require(`react`);l=s(l,1);let u=require(`@dyrected/sdk`);function d(e){let t=t=>{let n=
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`vue`),l=require(`react`);l=s(l,1);let u=require(`@dyrected/sdk`);function d(e){let t=t=>{let n=l.useRef(null),r=l.useRef(null),i=l.useRef((0,c.ref)(t));return l.useEffect(()=>{i.current.value=t},[t]),l.useEffect(()=>{if(n.current){let t=(0,c.createApp)({setup(){return()=>(0,c.h)(e,i.current.value)}});t.mount(n.current),r.current=t}return()=>{r.current&&r.current.unmount()}},[]),l.createElement(`div`,{ref:n,className:`dyrected-vue-bridge-container`,style:{display:`contents`}})};return t.displayName=`VueWrapper(${e.name||`Component`})`,t}function f(e){if(!e)return e;let t={};for(let[n,r]of Object.entries(e))typeof r==`object`&&r&&!(`render`in r)&&!(`setup`in r)?t[n]=f(r):typeof r==`function`||typeof r==`object`&&r?t[n]=d(r):t[n]=r;return t}var p=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,c.defineComponent)({__name:`DyrectedAdmin`,props:{config:{},basename:{},components:{}},setup(e){let t=e,n=(0,c.ref)(null),r=null,i=(0,c.computed)(()=>f(t.components)),a=async()=>{if(r&&r(),n.value)try{let{renderAdminUI:e}=await import(`@dyrected/admin`);r=e(n.value,{apiKey:t.config.apiKey,siteId:t.config.siteId,baseUrl:t.config.baseUrl,basename:t.basename||`/admin`,isEmbedded:!1,components:i.value})}catch(e){console.error(`[DyrectedAdmin] Failed to mount admin UI:`,e)}};return(0,c.onMounted)(async()=>{await(0,c.nextTick)(),await a()}),(0,c.watch)(()=>[t.config,t.components],a,{deep:!0}),(0,c.onUnmounted)(()=>{r&&r()}),(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{ref_key:`container`,ref:n,class:`dyrected-admin-wrapper`},null,512))}}),[[`__scopeId`,`data-v-aa7453b9`]]),m=[`src`,`width`,`height`,`alt`],h=[`src`,`width`,`height`,`alt`],g=(0,c.defineComponent)({__name:`DyrectedImage`,props:{media:{},width:{},height:{},alt:{}},setup(e){return(t,n)=>typeof e.media==`string`?((0,c.openBlock)(),(0,c.createElementBlock)(`img`,(0,c.mergeProps)({key:0,src:e.media,width:e.width||500,height:e.height||500,alt:e.alt||``},t.$attrs),null,16,m)):((0,c.openBlock)(),(0,c.createElementBlock)(`img`,(0,c.mergeProps)({key:1,src:e.media.url,width:e.width||e.media.width||500,height:e.height||e.media.height||500,alt:e.alt||e.media.filename},t.$attrs),null,16,h))}}),_={key:0,class:`dyrected-media-video`,style:{position:`relative`,"padding-bottom":`56.25%`,height:`0`}},v=[`src`],y=[`src`,`width`,`height`,`alt`],b=[`src`,`width`,`height`],x={key:3,class:`dyrected-media-file`},S=[`href`],C=(0,c.defineComponent)({__name:`DyrectedMedia`,props:{media:{},width:{},height:{},alt:{}},setup(e){let t=e,n=(0,c.computed)(()=>typeof t.media==`string`?t.media:t.media.url),r=(0,c.computed)(()=>typeof t.media==`string`?``:t.media.filename),i=(0,c.computed)(()=>typeof t.media==`string`?null:t.media.mimeType),a=(0,c.computed)(()=>{let e=n.value.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return e&&e[2].length===11?e[2]:null}),o=(0,c.computed)(()=>i.value?.startsWith(`image/`)||n.value.match(/\.(jpg|jpeg|png|gif|webp|avif|svg)$/i)),s=(0,c.computed)(()=>i.value?.startsWith(`video/`)||n.value.match(/\.(mp4|webm|ogg)$/i));return(t,i)=>a.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,_,[(0,c.createElementVNode)(`iframe`,{src:`https://www.youtube.com/embed/${a.value}`,frameborder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowfullscreen:``,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},null,8,v)])):o.value?((0,c.openBlock)(),(0,c.createElementBlock)(`img`,(0,c.mergeProps)({key:1,src:n.value,width:e.width||500,height:e.height||500,alt:e.alt||r.value},t.$attrs),null,16,y)):s.value?((0,c.openBlock)(),(0,c.createElementBlock)(`video`,(0,c.mergeProps)({key:2,src:n.value,controls:``,width:e.width||500,height:e.height||500,class:`dyrected-media-video`},t.$attrs),null,16,b)):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,x,[(0,c.renderSlot)(t.$slots,`fallback`,{},()=>[(0,c.createElementVNode)(`a`,{href:n.value,target:`_blank`,rel:`noopener noreferrer`,class:`dyrected-file-link`},` Download `+(0,c.toDisplayString)(r.value||`File`),9,S)])]))}}),w=Symbol(`dyrected-client`);function T(){let e=(0,c.inject)(w);if(!e)throw Error(`Dyrected client not found. Use provideDyrectedClient() or the DyrectedVue plugin.`);return e}function E(e){return{[w]:e}}function D(e,t,n={}){let r=T(),i=(0,c.ref)(null),a=(0,c.ref)(!0),o=(0,c.ref)(null),s=async()=>{a.value=!0;try{i.value=await r.findOne(e,t,n),o.value=null}catch(n){console.error(`[useDyrected] Error fetching ${e}:${t}`,n),o.value=n}finally{a.value=!1}};return(0,c.onMounted)(s),(0,c.watch)(()=>[e,t,JSON.stringify(n)],s),{doc:i,pending:a,error:o,refresh:s}}function O(e,t={}){let n=T(),r=(0,c.ref)([]),i=(0,c.ref)(!0),a=(0,c.ref)(null),o=async()=>{i.value=!0;try{r.value=(await n.collection(e).find(t).exec()).docs||[],a.value=null}catch(t){console.error(`[useDyrectedCollection] Error fetching ${e}`,t),a.value=t}finally{i.value=!1}};return(0,c.onMounted)(o),(0,c.watch)(()=>[e,JSON.stringify(t)],o),{docs:r,pending:i,error:a,refresh:o}}function k(e,t={}){let n=T(),r=(0,c.ref)(null),i=(0,c.ref)(!0),a=(0,c.ref)(null),o=async()=>{i.value=!0;try{r.value=await n.global(e).get(t),a.value=null}catch(t){console.error(`[useDyrectedGlobal] Error fetching ${e}`,t),a.value=t}finally{i.value=!1}};return(0,c.onMounted)(o),(0,c.watch)(()=>[e,JSON.stringify(t)],o),{data:r,pending:i,error:a,refresh:o}}function A(e){let t=(0,c.ref)(e.initialData),n=(0,c.ref)(!1),r=e.serverURL||`*`,i=null;function a(){let e=document.querySelectorAll(`[data-dy-path]`),t=Array.from(e).map(e=>{let t=e.dataset.dyPath,n=e=>{e.preventDefault(),e.stopPropagation(),window.parent.postMessage({type:`dyrected-element-clicked`,path:t},r)},i=()=>{e.style.outline=`2px solid rgba(99,102,241,0.7)`,e.style.outlineOffset=`2px`,e.style.cursor=`pointer`},a=()=>{e.style.outline=``,e.style.outlineOffset=``,e.style.cursor=``};return e.addEventListener(`click`,n,!0),e.addEventListener(`mouseenter`,i),e.addEventListener(`mouseleave`,a),()=>{e.removeEventListener(`click`,n,!0),e.removeEventListener(`mouseenter`,i),e.removeEventListener(`mouseleave`,a),e.style.outline=``,e.style.outlineOffset=``,e.style.cursor=``}});return()=>t.forEach(e=>e())}function o(e){if(r!==`*`&&e.origin!==r)return;let{type:o,data:s}=e.data||{};o===`dyrected-live-preview`&&(t.value=s,n.value=!0),o===`dyrected-live-preview-ready`&&window.parent.postMessage({type:`dyrected-live-preview-ack`},r),o===`dyrected-enter-edit-mode`&&(i?.(),i=a()),o===`dyrected-exit-edit-mode`&&(i?.(),i=null)}return(0,c.onMounted)(()=>{window.addEventListener(`message`,o),window.parent.postMessage({type:`dyrected-live-preview-ready`},r)}),(0,c.onUnmounted)(()=>{window.removeEventListener(`message`,o),i?.(),i=null}),{data:t,isLive:n}}function j(e,t){let n=t.storage||(typeof window<`u`?window.localStorage:null),r=`dyrected_token_${e}`,i=(0,c.ref)(n?.getItem(r)||null),a=(0,c.ref)(null),o=(0,c.computed)(()=>!!i.value),s=(0,u.createClient)({baseUrl:t.baseUrl,apiKey:t.apiKey,siteId:t.siteId});i.value&&s.setToken(i.value);async function l(t,o){let{token:c,user:l}=await s.collection(e).login(t,o);return i.value=c,a.value=l,n&&n.setItem(r,c),s.setToken(c),l}async function d(){if(i.value)try{await s.collection(e).logout()}catch{}i.value=null,a.value=null,n&&n.removeItem(r)}async function f(){if(!i.value)return null;try{let t=await s.collection(e).me();return a.value=t,t}catch{return i.value=null,a.value=null,n&&n.removeItem(r),null}}return{user:a,isLoggedIn:o,token:i,login:l,logout:d,fetchMe:f,client:s}}exports.DYRECTED_CLIENT_KEY=w,exports.DyrectedAdmin=p,exports.DyrectedImage=g,exports.DyrectedMedia=C,exports.provideDyrectedClient=E,exports.useDyrected=D,exports.useDyrectedAuth=j,exports.useDyrectedClient=T,exports.useDyrectedCollection=O,exports.useDyrectedGlobal=k,exports.useLivePreview=A,exports.wrapComponents=f,exports.wrapVueComponent=d;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as e, createApp as t, createElementBlock as n, createElementVNode as r, defineComponent as i, h as a, inject as o, mergeProps as s, nextTick as c, onMounted as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, watch as h } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { createClient as
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { createClient as _ } from "@dyrected/sdk";
|
|
4
4
|
//#region src/bridge/react-in-vue.ts
|
|
5
|
-
function
|
|
5
|
+
function v(e) {
|
|
6
6
|
let n = (n) => {
|
|
7
|
-
let r =
|
|
8
|
-
return
|
|
7
|
+
let r = g.useRef(null), i = g.useRef(null), o = g.useRef(f(n));
|
|
8
|
+
return g.useEffect(() => {
|
|
9
9
|
o.current.value = n;
|
|
10
|
-
}, [n]),
|
|
10
|
+
}, [n]), g.useEffect(() => {
|
|
11
11
|
if (r.current) {
|
|
12
12
|
let n = t({ setup() {
|
|
13
13
|
return () => a(e, o.current.value);
|
|
@@ -25,15 +25,15 @@ function b(e) {
|
|
|
25
25
|
};
|
|
26
26
|
return n.displayName = `VueWrapper(${e.name || "Component"})`, n;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function y(e) {
|
|
29
29
|
if (!e) return e;
|
|
30
30
|
let t = {};
|
|
31
|
-
for (let [n, r] of Object.entries(e)) typeof r == "object" && r && !("render" in r) && !("setup" in r) ? t[n] =
|
|
31
|
+
for (let [n, r] of Object.entries(e)) typeof r == "object" && r && !("render" in r) && !("setup" in r) ? t[n] = y(r) : typeof r == "function" || typeof r == "object" && r ? t[n] = v(r) : t[n] = r;
|
|
32
32
|
return t;
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/components/DyrectedAdmin.vue
|
|
36
|
-
var
|
|
36
|
+
var b = /* @__PURE__ */ ((e, t) => {
|
|
37
37
|
let n = e.__vccOpts || e;
|
|
38
38
|
for (let [e, r] of t) n[e] = r;
|
|
39
39
|
return n;
|
|
@@ -45,7 +45,7 @@ var S = /* @__PURE__ */ ((e, t) => {
|
|
|
45
45
|
components: {}
|
|
46
46
|
},
|
|
47
47
|
setup(t) {
|
|
48
|
-
let r = t, i = f(null), a = null, o = e(() =>
|
|
48
|
+
let r = t, i = f(null), a = null, o = e(() => y(r.components)), s = async () => {
|
|
49
49
|
if (a && a(), i.value) try {
|
|
50
50
|
let { renderAdminUI: e } = await import("@dyrected/admin");
|
|
51
51
|
a = e(i.value, {
|
|
@@ -70,17 +70,17 @@ var S = /* @__PURE__ */ ((e, t) => {
|
|
|
70
70
|
class: "dyrected-admin-wrapper"
|
|
71
71
|
}, null, 512));
|
|
72
72
|
}
|
|
73
|
-
}), [["__scopeId", "data-v-aa7453b9"]]),
|
|
73
|
+
}), [["__scopeId", "data-v-aa7453b9"]]), x = [
|
|
74
74
|
"src",
|
|
75
75
|
"width",
|
|
76
76
|
"height",
|
|
77
77
|
"alt"
|
|
78
|
-
],
|
|
78
|
+
], S = [
|
|
79
79
|
"src",
|
|
80
80
|
"width",
|
|
81
81
|
"height",
|
|
82
82
|
"alt"
|
|
83
|
-
],
|
|
83
|
+
], C = /* @__PURE__ */ i({
|
|
84
84
|
__name: "DyrectedImage",
|
|
85
85
|
props: {
|
|
86
86
|
media: {},
|
|
@@ -95,15 +95,15 @@ var S = /* @__PURE__ */ ((e, t) => {
|
|
|
95
95
|
width: e.width || 500,
|
|
96
96
|
height: e.height || 500,
|
|
97
97
|
alt: e.alt || ""
|
|
98
|
-
}, t.$attrs), null, 16,
|
|
98
|
+
}, t.$attrs), null, 16, x)) : (d(), n("img", s({
|
|
99
99
|
key: 1,
|
|
100
100
|
src: e.media.url,
|
|
101
101
|
width: e.width || e.media.width || 500,
|
|
102
102
|
height: e.height || e.media.height || 500,
|
|
103
103
|
alt: e.alt || e.media.filename
|
|
104
|
-
}, t.$attrs), null, 16,
|
|
104
|
+
}, t.$attrs), null, 16, S));
|
|
105
105
|
}
|
|
106
|
-
}),
|
|
106
|
+
}), w = {
|
|
107
107
|
key: 0,
|
|
108
108
|
class: "dyrected-media-video",
|
|
109
109
|
style: {
|
|
@@ -111,19 +111,19 @@ var S = /* @__PURE__ */ ((e, t) => {
|
|
|
111
111
|
"padding-bottom": "56.25%",
|
|
112
112
|
height: "0"
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, T = ["src"], E = [
|
|
115
115
|
"src",
|
|
116
116
|
"width",
|
|
117
117
|
"height",
|
|
118
118
|
"alt"
|
|
119
|
-
],
|
|
119
|
+
], D = [
|
|
120
120
|
"src",
|
|
121
121
|
"width",
|
|
122
122
|
"height"
|
|
123
|
-
],
|
|
123
|
+
], O = {
|
|
124
124
|
key: 3,
|
|
125
125
|
class: "dyrected-media-file"
|
|
126
|
-
},
|
|
126
|
+
}, k = ["href"], A = /* @__PURE__ */ i({
|
|
127
127
|
__name: "DyrectedMedia",
|
|
128
128
|
props: {
|
|
129
129
|
media: {},
|
|
@@ -136,7 +136,7 @@ var S = /* @__PURE__ */ ((e, t) => {
|
|
|
136
136
|
let e = a.value.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
|
|
137
137
|
return e && e[2].length === 11 ? e[2] : null;
|
|
138
138
|
}), u = e(() => c.value?.startsWith("image/") || a.value.match(/\.(jpg|jpeg|png|gif|webp|avif|svg)$/i)), f = e(() => c.value?.startsWith("video/") || a.value.match(/\.(mp4|webm|ogg)$/i));
|
|
139
|
-
return (e, i) => l.value ? (d(), n("div",
|
|
139
|
+
return (e, i) => l.value ? (d(), n("div", w, [r("iframe", {
|
|
140
140
|
src: `https://www.youtube.com/embed/${l.value}`,
|
|
141
141
|
frameborder: "0",
|
|
142
142
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
@@ -148,37 +148,37 @@ var S = /* @__PURE__ */ ((e, t) => {
|
|
|
148
148
|
width: "100%",
|
|
149
149
|
height: "100%"
|
|
150
150
|
}
|
|
151
|
-
}, null, 8,
|
|
151
|
+
}, null, 8, T)])) : u.value ? (d(), n("img", s({
|
|
152
152
|
key: 1,
|
|
153
153
|
src: a.value,
|
|
154
154
|
width: t.width || 500,
|
|
155
155
|
height: t.height || 500,
|
|
156
156
|
alt: t.alt || o.value
|
|
157
|
-
}, e.$attrs), null, 16,
|
|
157
|
+
}, e.$attrs), null, 16, E)) : f.value ? (d(), n("video", s({
|
|
158
158
|
key: 2,
|
|
159
159
|
src: a.value,
|
|
160
160
|
controls: "",
|
|
161
161
|
width: t.width || 500,
|
|
162
162
|
height: t.height || 500,
|
|
163
163
|
class: "dyrected-media-video"
|
|
164
|
-
}, e.$attrs), null, 16,
|
|
164
|
+
}, e.$attrs), null, 16, D)) : (d(), n("div", O, [p(e.$slots, "fallback", {}, () => [r("a", {
|
|
165
165
|
href: a.value,
|
|
166
166
|
target: "_blank",
|
|
167
167
|
rel: "noopener noreferrer",
|
|
168
168
|
class: "dyrected-file-link"
|
|
169
|
-
}, " Download " + m(o.value || "File"), 9,
|
|
169
|
+
}, " Download " + m(o.value || "File"), 9, k)])]));
|
|
170
170
|
}
|
|
171
|
-
}),
|
|
172
|
-
function
|
|
173
|
-
let e = o(
|
|
171
|
+
}), j = Symbol("dyrected-client");
|
|
172
|
+
function M() {
|
|
173
|
+
let e = o(j);
|
|
174
174
|
if (!e) throw Error("Dyrected client not found. Use provideDyrectedClient() or the DyrectedVue plugin.");
|
|
175
175
|
return e;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
return { [
|
|
177
|
+
function N(e) {
|
|
178
|
+
return { [j]: e };
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
let r =
|
|
180
|
+
function P(e, t, n = {}) {
|
|
181
|
+
let r = M(), i = f(null), a = f(!0), o = f(null), s = async () => {
|
|
182
182
|
a.value = !0;
|
|
183
183
|
try {
|
|
184
184
|
i.value = await r.findOne(e, t, n), o.value = null;
|
|
@@ -199,8 +199,8 @@ function I(e, t, n = {}) {
|
|
|
199
199
|
refresh: s
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
let n =
|
|
202
|
+
function F(e, t = {}) {
|
|
203
|
+
let n = M(), r = f([]), i = f(!0), a = f(null), o = async () => {
|
|
204
204
|
i.value = !0;
|
|
205
205
|
try {
|
|
206
206
|
r.value = (await n.collection(e).find(t).exec()).docs || [], a.value = null;
|
|
@@ -217,8 +217,8 @@ function L(e, t = {}) {
|
|
|
217
217
|
refresh: o
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
let n =
|
|
220
|
+
function I(e, t = {}) {
|
|
221
|
+
let n = M(), r = f(null), i = f(!0), a = f(null), o = async () => {
|
|
222
222
|
i.value = !0;
|
|
223
223
|
try {
|
|
224
224
|
r.value = await n.global(e).get(t), a.value = null;
|
|
@@ -237,7 +237,7 @@ function R(e, t = {}) {
|
|
|
237
237
|
}
|
|
238
238
|
//#endregion
|
|
239
239
|
//#region src/composables/useLivePreview.ts
|
|
240
|
-
function
|
|
240
|
+
function L(e) {
|
|
241
241
|
let t = f(e.initialData), n = f(!1), r = e.serverURL || "*", i = null;
|
|
242
242
|
function a() {
|
|
243
243
|
let e = document.querySelectorAll("[data-dy-path]"), t = Array.from(e).map((e) => {
|
|
@@ -273,8 +273,8 @@ function z(e) {
|
|
|
273
273
|
}
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/composables/useDyrectedAuth.ts
|
|
276
|
-
function
|
|
277
|
-
let r = n.storage || (typeof window < "u" ? window.localStorage : null), i = `dyrected_token_${t}`, a = f(r?.getItem(i) || null), o = f(null), s = e(() => !!a.value), c =
|
|
276
|
+
function R(t, n) {
|
|
277
|
+
let r = n.storage || (typeof window < "u" ? window.localStorage : null), i = `dyrected_token_${t}`, a = f(r?.getItem(i) || null), o = f(null), s = e(() => !!a.value), c = _({
|
|
278
278
|
baseUrl: n.baseUrl,
|
|
279
279
|
apiKey: n.apiKey,
|
|
280
280
|
siteId: n.siteId
|
|
@@ -310,4 +310,4 @@ function B(t, n) {
|
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
312
|
//#endregion
|
|
313
|
-
export {
|
|
313
|
+
export { j as DYRECTED_CLIENT_KEY, b as DyrectedAdmin, C as DyrectedImage, A as DyrectedMedia, N as provideDyrectedClient, P as useDyrected, R as useDyrectedAuth, M as useDyrectedClient, F as useDyrectedCollection, I as useDyrectedGlobal, L as useLivePreview, y as wrapComponents, v as wrapVueComponent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dyrected/vue",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dyrected/sdk": "2.4.
|
|
21
|
+
"@dyrected/sdk": "2.4.4",
|
|
22
22
|
"@dyrected/admin": "2.5.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|