vue-intlayer 8.3.0 → 8.3.2
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/ContentSelector-BaMG67_z.js +1 -0
- package/dist/ContentSelector-D9fc9D1G.mjs +76 -0
- package/dist/EditedContentRenderer-CXoF8k9R.mjs +25 -0
- package/dist/EditedContentRenderer-S0zWbUak.js +1 -0
- package/dist/cjs/UI/ContentSelector.cjs +1 -1
- package/dist/cjs/client/index.cjs +1 -1
- package/dist/cjs/client/installIntlayer.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +1 -1
- package/dist/cjs/client/useRewriteURL.cjs +1 -1
- package/dist/cjs/editor/ContentSelectorWrapper.cjs +1 -1
- package/dist/cjs/editor/EditedContentRenderer.cjs +1 -1
- package/dist/cjs/editor/EditorSelectorRenderer.cjs +1 -1
- package/dist/cjs/editor/communicator.cjs +1 -1
- package/dist/cjs/editor/configuration.cjs +1 -1
- package/dist/cjs/editor/createSharedComposable.cjs +1 -1
- package/dist/cjs/editor/dictionariesRecord.cjs +1 -1
- package/dist/cjs/editor/editedContent.cjs +1 -1
- package/dist/cjs/editor/editorEnabled.cjs +1 -1
- package/dist/cjs/editor/editorLocale.cjs +1 -1
- package/dist/cjs/editor/focusDictionary.cjs +1 -1
- package/dist/cjs/editor/index.cjs +1 -1
- package/dist/cjs/editor/installIntlayerEditor.cjs +1 -1
- package/dist/cjs/editor/useCrossFrameMessageListener.cjs +1 -1
- package/dist/cjs/editor/useCrossFrameState.cjs +1 -1
- package/dist/cjs/editor/useCrossURLPathState.cjs +1 -1
- package/dist/cjs/editor/useEditedContentRenderer.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/editor/useIframeClickInterceptor.cjs +1 -1
- package/dist/cjs/format/index.cjs +1 -1
- package/dist/cjs/format/useCompact.cjs +1 -1
- package/dist/cjs/format/useCurrency.cjs +1 -1
- package/dist/cjs/format/useDate.cjs +1 -1
- package/dist/cjs/format/useIntl.cjs +1 -1
- package/dist/cjs/format/useList.cjs +1 -1
- package/dist/cjs/format/useNumber.cjs +1 -1
- package/dist/cjs/format/usePercentage.cjs +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +1 -1
- package/dist/cjs/format/useUnit.cjs +1 -1
- package/dist/cjs/getDictionary.cjs +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +1 -1
- package/dist/cjs/html/index.cjs +1 -1
- package/dist/cjs/html/installIntlayerHTML.cjs +1 -1
- package/dist/cjs/html/types.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
- package/dist/cjs/markdown/compiler.cjs +1 -1
- package/dist/cjs/markdown/index.cjs +1 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -1
- package/dist/cjs/markdown/runtime.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/cjs/renderIntlayerNode.cjs +1 -1
- package/dist/communicator-1rnoOTtT.js +1 -0
- package/dist/esm/UI/ContentSelector.mjs +2 -4
- package/dist/esm/client/index.mjs +3 -26
- package/dist/esm/client/installIntlayer.mjs +2 -16
- package/dist/esm/client/useDictionary.mjs +2 -100
- package/dist/esm/client/useDictionaryAsync.mjs +2 -21
- package/dist/esm/client/useDictionaryDynamic.mjs +2 -5
- package/dist/esm/client/useIntlayer.mjs +2 -59
- package/dist/esm/client/useLoadDynamic.mjs +14 -16
- package/dist/esm/client/useLocale.mjs +2 -34
- package/dist/esm/client/useLocaleStorage.mjs +24 -29
- package/dist/esm/client/useRewriteURL.mjs +2 -23
- package/dist/esm/editor/ContentSelectorWrapper.mjs +2 -4
- package/dist/esm/editor/EditedContentRenderer.mjs +2 -4
- package/dist/esm/editor/EditorSelectorRenderer.mjs +43 -38
- package/dist/esm/editor/communicator.mjs +26 -32
- package/dist/esm/editor/configuration.mjs +10 -10
- package/dist/esm/editor/createSharedComposable.mjs +9 -11
- package/dist/esm/editor/dictionariesRecord.mjs +35 -52
- package/dist/esm/editor/editedContent.mjs +41 -63
- package/dist/esm/editor/editorEnabled.mjs +37 -55
- package/dist/esm/editor/editorLocale.mjs +2 -12
- package/dist/esm/editor/focusDictionary.mjs +33 -38
- package/dist/esm/editor/index.mjs +3 -7
- package/dist/esm/editor/installIntlayerEditor.mjs +20 -16
- package/dist/esm/editor/useCrossFrameMessageListener.mjs +28 -28
- package/dist/esm/editor/useCrossFrameState.mjs +51 -43
- package/dist/esm/editor/useCrossURLPathState.mjs +20 -25
- package/dist/esm/editor/useEditedContentRenderer.mjs +9 -17
- package/dist/esm/editor/useEditor.mjs +2 -11
- package/dist/esm/editor/useIframeClickInterceptor.mjs +14 -22
- package/dist/esm/format/index.mjs +10 -20
- package/dist/esm/format/useCompact.mjs +15 -15
- package/dist/esm/format/useCurrency.mjs +15 -15
- package/dist/esm/format/useDate.mjs +15 -15
- package/dist/esm/format/useIntl.mjs +9 -12
- package/dist/esm/format/useList.mjs +15 -15
- package/dist/esm/format/useNumber.mjs +15 -15
- package/dist/esm/format/usePercentage.mjs +14 -14
- package/dist/esm/format/useRelativeTime.mjs +15 -15
- package/dist/esm/format/useUnit.mjs +15 -15
- package/dist/esm/getDictionary.mjs +2 -15
- package/dist/esm/getIntlayer.mjs +2 -15
- package/dist/esm/html/HTMLRenderer.mjs +25 -31
- package/dist/esm/html/index.mjs +3 -11
- package/dist/esm/html/installIntlayerHTML.mjs +23 -33
- package/dist/esm/html/types.mjs +0 -1
- package/dist/esm/index.mjs +12 -69
- package/dist/esm/markdown/MarkdownRenderer.mjs +105 -131
- package/dist/esm/markdown/compiler.mjs +6 -12
- package/dist/esm/markdown/index.mjs +5 -22
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +47 -80
- package/dist/esm/markdown/runtime.mjs +19 -54
- package/dist/esm/plugins.mjs +2 -21
- package/dist/esm/renderIntlayerNode.mjs +33 -47
- package/dist/getDictionary-BE4ZLuzI.mjs +387 -0
- package/dist/getDictionary-DMdOvXMh.js +1 -0
- package/dist/types/getDictionary.d.ts +1 -2
- package/dist/types/getIntlayer.d.ts +1 -2
- package/dist/types/plugins.d.ts +5 -0
- package/package.json +13 -13
- package/dist/ContentSelector.vue_vue_type_script_setup_true_lang-87sjUiJI.js +0 -1
- package/dist/ContentSelector.vue_vue_type_script_setup_true_lang-CR8kSRs9.mjs +0 -73
- package/dist/EditedContentRenderer.vue_vue_type_script_setup_true_lang-BlN498QG.mjs +0 -36
- package/dist/EditedContentRenderer.vue_vue_type_script_setup_true_lang-DYN7KHa_.js +0 -1
- package/dist/plugins-Bzptc2vR.js +0 -1
- package/dist/plugins-rixQm8YE.mjs +0 -293
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../getDictionary-DMdOvXMh.js`);exports.getPlugins=e.n,exports.htmlPlugin=e.r,exports.insertionPlugin=e.i,exports.intlayerNodePlugins=e.a,exports.markdownPlugin=e.o,exports.markdownStringPlugin=e.s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../communicator-1rnoOTtT.js`);let e=require(`vue`);var t=({value:n,children:r,additionalProps:i={}})=>{let a=(0,e.ref)(n),o=typeof r==`function`?e=>r(e):()=>r,s=e=>(a.value,o(e)),c=(e=>s(e));return Object.setPrototypeOf(c,String.prototype),Object.assign(c,{render:s,toString:()=>String(a.value??``),valueOf:()=>a.value,[Symbol.toPrimitive]:()=>a.value,toJSON:()=>a.value,get raw(){return a.value},set raw(e){a.value=e},get value(){return a.value},use(e){return t({value:a.value,children:()=>o(e),additionalProps:i})},__update(e){o=e.render,this.raw=e.raw},...i}),(0,e.markRaw)(c)};exports.renderIntlayerNode=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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(`@intlayer/config/built`);c=s(c);let l=require(`vue`);var u=()=>Math.random().toString(36).slice(2),{editor:d}=c.default,f={postMessage:()=>null,allowedOrigins:[d?.applicationURL,d?.editorURL,d?.cmsURL],senderId:``},p=null,m=Symbol(`Communicator`),h=(e={postMessage:()=>null})=>p||(p=(0,l.reactive)({...f,...e,senderId:u()}),p),g=(e,t={postMessage:()=>null})=>{let n=h(t);e.provide(m,n)},_=()=>{try{return(0,l.inject)(m,f)}catch{return console.warn(`useCommunicator: inject can only be used in setup(). Returning default communicator.`),f}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { useDictionaryDynamic as u } from "./useDictionaryDynamic.mjs";
|
|
5
|
-
import { useIntlayer as D } from "./useIntlayer.mjs";
|
|
6
|
-
import { useLoadDynamic as R } from "./useLoadDynamic.mjs";
|
|
7
|
-
import { useLocale as k } from "./useLocale.mjs";
|
|
8
|
-
import { useRewriteURL as N } from "./useRewriteURL.mjs";
|
|
9
|
-
export {
|
|
10
|
-
r as INTLAYER_SYMBOL,
|
|
11
|
-
i as atPath,
|
|
12
|
-
t as createIntlayerClient,
|
|
13
|
-
s as createIntlayerLeafProxy,
|
|
14
|
-
a as installIntlayer,
|
|
15
|
-
m as isComponentLike,
|
|
16
|
-
y as isIntlayerNode,
|
|
17
|
-
c as isObjectLike,
|
|
18
|
-
p as toComponent,
|
|
19
|
-
f as useDictionary,
|
|
20
|
-
x as useDictionaryAsync,
|
|
21
|
-
u as useDictionaryDynamic,
|
|
22
|
-
D as useIntlayer,
|
|
23
|
-
R as useLoadDynamic,
|
|
24
|
-
k as useLocale,
|
|
25
|
-
N as useRewriteURL
|
|
26
|
-
};
|
|
1
|
+
import { C as e, E as t, S as n, T as r, _ as i, b as a, d as o, f as s, g as c, h as l, p as u, v as d, w as f, x as p, y as m } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
import { useLoadDynamic as h } from "./useLoadDynamic.mjs";
|
|
3
|
+
export { f as INTLAYER_SYMBOL, i as atPath, r as createIntlayerClient, d as createIntlayerLeafProxy, t as installIntlayer, m as isComponentLike, a as isIntlayerNode, p as isObjectLike, n as toComponent, e as useDictionary, c as useDictionaryAsync, l as useDictionaryDynamic, u as useIntlayer, h as useLoadDynamic, s as useLocale, o as useRewriteURL };
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
import "@intlayer/core/utils";
|
|
4
|
-
import "@intlayer/editor";
|
|
5
|
-
import "@intlayer/types/nodeType";
|
|
6
|
-
import "../editor/communicator.mjs";
|
|
7
|
-
import { I as c, c as y, a as L } from "../../plugins-rixQm8YE.mjs";
|
|
8
|
-
import "@intlayer/core/interpreter";
|
|
9
|
-
import "./useLocaleStorage.mjs";
|
|
10
|
-
import "@intlayer/core/localization";
|
|
11
|
-
import "../editor/installIntlayerEditor.mjs";
|
|
12
|
-
export {
|
|
13
|
-
c as INTLAYER_SYMBOL,
|
|
14
|
-
y as createIntlayerClient,
|
|
15
|
-
L as installIntlayer
|
|
16
|
-
};
|
|
1
|
+
import { E as e, T as t, w as n } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
export { n as INTLAYER_SYMBOL, t as createIntlayerClient, e as installIntlayer };
|
|
@@ -1,100 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { getDictionary as A } from "../getDictionary.mjs";
|
|
4
|
-
import { I as N } from "../../plugins-rixQm8YE.mjs";
|
|
5
|
-
const l = (e, t) => t.reduce((r, n) => r?.[n], e), d = (e) => e != null && typeof e == "object", x = (e) => typeof e == "function" || d(e) && ("render" in e || "setup" in e), T = (e) => e != null && typeof e == "object" && "__update" in e && "render" in e && "raw" in e, L = (e) => k(
|
|
6
|
-
C({
|
|
7
|
-
name: "IntlayerLeaf",
|
|
8
|
-
setup() {
|
|
9
|
-
return () => {
|
|
10
|
-
const t = e();
|
|
11
|
-
return t == null ? null : x(t) ? g(t) : Array.isArray(t) ? g("span", t) : t;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
), Y = (e) => {
|
|
16
|
-
const t = {
|
|
17
|
-
get(r, n) {
|
|
18
|
-
const i = e.value;
|
|
19
|
-
if (n === "__v_isRef") return !0;
|
|
20
|
-
if (n === "value")
|
|
21
|
-
return i ?? "";
|
|
22
|
-
if (n === "$raw")
|
|
23
|
-
return e;
|
|
24
|
-
if (n === "__v_skip") return !0;
|
|
25
|
-
if (n === "c" || n === "asComponent")
|
|
26
|
-
return L(() => e.value);
|
|
27
|
-
if (i == null)
|
|
28
|
-
return n === Symbol.toPrimitive || n === "toString" ? () => "" : void 0;
|
|
29
|
-
const o = i[n];
|
|
30
|
-
return typeof o == "function" ? o.bind(i) : o;
|
|
31
|
-
},
|
|
32
|
-
// Make Object.keys() work
|
|
33
|
-
ownKeys() {
|
|
34
|
-
const r = e.value;
|
|
35
|
-
return r != null && typeof r == "object" ? Reflect.ownKeys(r) : [];
|
|
36
|
-
},
|
|
37
|
-
getOwnPropertyDescriptor() {
|
|
38
|
-
return { enumerable: !0, configurable: !0 };
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
return new Proxy({}, t);
|
|
42
|
-
}, V = (e, t) => {
|
|
43
|
-
const r = I(N), n = D(r?.locale) ? r.locale : K(r?.locale ?? j.internationalization.defaultLocale), i = y(() => (t !== void 0 ? P(t) : void 0) ?? n.value), o = O({});
|
|
44
|
-
S(
|
|
45
|
-
[() => P(e), () => i.value],
|
|
46
|
-
([a, m]) => {
|
|
47
|
-
o.value = A(a, m);
|
|
48
|
-
},
|
|
49
|
-
{ immediate: !0, flush: "sync" }
|
|
50
|
-
);
|
|
51
|
-
const w = (a) => {
|
|
52
|
-
const m = {
|
|
53
|
-
get(v, u, $) {
|
|
54
|
-
if (u === "__v_isRef") return !0;
|
|
55
|
-
const c = y(
|
|
56
|
-
() => l(o.value, a)
|
|
57
|
-
);
|
|
58
|
-
if (u === "value") return c.value ?? "";
|
|
59
|
-
if (u === "then") return;
|
|
60
|
-
if (u === "c" || u === "asComponent")
|
|
61
|
-
return L(() => c.value);
|
|
62
|
-
if (u === "$raw") return c;
|
|
63
|
-
if (u === Symbol.toPrimitive)
|
|
64
|
-
return () => c.value;
|
|
65
|
-
const s = a.concat(u), f = l(o.value, s);
|
|
66
|
-
if (f === void 0 || d(f) && !x(f))
|
|
67
|
-
return w(s);
|
|
68
|
-
if (T(f))
|
|
69
|
-
return Y(
|
|
70
|
-
y(() => l(o.value, s))
|
|
71
|
-
);
|
|
72
|
-
const h = y(() => l(o.value, s));
|
|
73
|
-
return new Proxy(h, {
|
|
74
|
-
get(_, b, R) {
|
|
75
|
-
return b === "value" ? _.value ?? "" : Reflect.get(_, b, R);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
// Make Object.keys(), for...in, v-for on object keys work
|
|
80
|
-
ownKeys() {
|
|
81
|
-
const v = l(o.value, a);
|
|
82
|
-
return d(v) ? Reflect.ownKeys(v) : [];
|
|
83
|
-
},
|
|
84
|
-
getOwnPropertyDescriptor() {
|
|
85
|
-
return { enumerable: !0, configurable: !0 };
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
return new Proxy({}, m);
|
|
89
|
-
};
|
|
90
|
-
return w([]);
|
|
91
|
-
};
|
|
92
|
-
export {
|
|
93
|
-
l as atPath,
|
|
94
|
-
Y as createIntlayerLeafProxy,
|
|
95
|
-
x as isComponentLike,
|
|
96
|
-
T as isIntlayerNode,
|
|
97
|
-
d as isObjectLike,
|
|
98
|
-
L as toComponent,
|
|
99
|
-
V as useDictionary
|
|
100
|
-
};
|
|
1
|
+
import { C as e, S as t, _ as n, b as r, v as i, x as a, y as o } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
export { n as atPath, i as createIntlayerLeafProxy, o as isComponentLike, r as isIntlayerNode, a as isObjectLike, t as toComponent, e as useDictionary };
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { I as m } from "../../plugins-rixQm8YE.mjs";
|
|
4
|
-
import { useDictionary as y } from "./useDictionary.mjs";
|
|
5
|
-
const L = async (a, i) => {
|
|
6
|
-
const c = l(m), t = s(
|
|
7
|
-
() => i ?? c?.locale?.value ?? r?.internationalization.defaultLocale
|
|
8
|
-
), o = u(
|
|
9
|
-
await a[t.value]?.()
|
|
10
|
-
);
|
|
11
|
-
return f(
|
|
12
|
-
() => t.value,
|
|
13
|
-
async (e) => {
|
|
14
|
-
const n = await a[e]?.();
|
|
15
|
-
n && (o.value = n);
|
|
16
|
-
}
|
|
17
|
-
), y(o, t);
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
L as useDictionaryAsync
|
|
21
|
-
};
|
|
1
|
+
import { g as e } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
export { e as useDictionaryAsync };
|
|
@@ -1,59 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { getIntlayer as M } from "../getIntlayer.mjs";
|
|
4
|
-
import { I as N } from "../../plugins-rixQm8YE.mjs";
|
|
5
|
-
import { atPath as o, isObjectLike as x, toComponent as T, isComponentLike as W, isIntlayerNode as Y, createIntlayerLeafProxy as $ } from "./useDictionary.mjs";
|
|
6
|
-
const V = (R, m) => {
|
|
7
|
-
const c = j(N), w = k(c?.locale) ? c.locale : K(c?.locale ?? C.internationalization.defaultLocale), _ = s(() => (m !== void 0 ? h(m) : void 0) ?? w.value), r = O({});
|
|
8
|
-
S(
|
|
9
|
-
[() => h(R), () => _.value],
|
|
10
|
-
([t, n]) => {
|
|
11
|
-
r.value = M(t, n);
|
|
12
|
-
},
|
|
13
|
-
{ immediate: !0, flush: "sync" }
|
|
14
|
-
);
|
|
15
|
-
const f = /* @__PURE__ */ new Map(), y = (t) => {
|
|
16
|
-
const n = t.join(".");
|
|
17
|
-
if (f.has(n)) return f.get(n);
|
|
18
|
-
const i = s(
|
|
19
|
-
() => o(r.value, t)
|
|
20
|
-
), L = {
|
|
21
|
-
get(a, e, I) {
|
|
22
|
-
if (typeof e == "symbol" || typeof e == "string" && (e.startsWith("__") || e.startsWith("$")))
|
|
23
|
-
return e === "__v_isRef" ? !0 : e === "then" ? void 0 : Reflect.get(a, e, I);
|
|
24
|
-
if (e === "value") return i.value ?? "";
|
|
25
|
-
if (e === "c" || e === "asComponent")
|
|
26
|
-
return T(() => i.value);
|
|
27
|
-
if (e === "$raw") return i;
|
|
28
|
-
if (e === Symbol.toPrimitive)
|
|
29
|
-
return () => String(i.value ?? "");
|
|
30
|
-
const u = t.concat(e), l = o(r.value, u);
|
|
31
|
-
if (l === void 0 || x(l) && !W(l))
|
|
32
|
-
return y(u);
|
|
33
|
-
if (Y(l))
|
|
34
|
-
return $(
|
|
35
|
-
s(() => o(r.value, u))
|
|
36
|
-
);
|
|
37
|
-
const P = s(() => o(r.value, u));
|
|
38
|
-
return new Proxy(P, {
|
|
39
|
-
get(d, v, b) {
|
|
40
|
-
return v === "value" ? d.value ?? "" : v === "__v_isRef" ? !0 : Reflect.get(d, v, b);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
// Make Object.keys(), for...in, v-for on object keys work
|
|
45
|
-
ownKeys() {
|
|
46
|
-
const a = o(r.value, t);
|
|
47
|
-
return x(a) ? Reflect.ownKeys(a) : [];
|
|
48
|
-
},
|
|
49
|
-
getOwnPropertyDescriptor() {
|
|
50
|
-
return { enumerable: !0, configurable: !0 };
|
|
51
|
-
}
|
|
52
|
-
}, g = new Proxy({}, L);
|
|
53
|
-
return f.set(n, g), g;
|
|
54
|
-
};
|
|
55
|
-
return y([]);
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
V as useIntlayer
|
|
59
|
-
};
|
|
1
|
+
import { p as e } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
export { e as useIntlayer };
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return c;
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
a as useLoadDynamic
|
|
1
|
+
import { reactive as e } from "vue";
|
|
2
|
+
//#region src/client/useLoadDynamic.ts
|
|
3
|
+
var t = (n, r) => {
|
|
4
|
+
let i = t._cache ??= /* @__PURE__ */ new Map(), a = e({});
|
|
5
|
+
if (i.has(n)) i.get(n)?.then((e) => {
|
|
6
|
+
Object.assign(a, e);
|
|
7
|
+
});
|
|
8
|
+
else {
|
|
9
|
+
let e = r.then((e) => (Object.assign(a, e), e));
|
|
10
|
+
i.set(n, e);
|
|
11
|
+
}
|
|
12
|
+
return a;
|
|
17
13
|
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { t as useLoadDynamic };
|
|
@@ -1,34 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { I as s } from "../../plugins-rixQm8YE.mjs";
|
|
4
|
-
import { setLocaleInStorage as m } from "./useLocaleStorage.mjs";
|
|
5
|
-
const g = ({
|
|
6
|
-
isCookieEnabled: l,
|
|
7
|
-
onLocaleChange: r
|
|
8
|
-
} = {}) => {
|
|
9
|
-
const { defaultLocale: e, locales: a } = i?.internationalization ?? {}, t = c(s);
|
|
10
|
-
return {
|
|
11
|
-
locale: n(
|
|
12
|
-
() => t?.locale?.value ?? e
|
|
13
|
-
),
|
|
14
|
-
// Current locale
|
|
15
|
-
defaultLocale: e,
|
|
16
|
-
// Principal locale defined in config
|
|
17
|
-
availableLocales: a,
|
|
18
|
-
// List of the available locales defined in config
|
|
19
|
-
setLocale: (o) => {
|
|
20
|
-
if (!a?.map(String).includes(o)) {
|
|
21
|
-
console.error(`Locale ${o} is not available`);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
t && t.setLocale(o), m(
|
|
25
|
-
o,
|
|
26
|
-
l ?? t?.isCookieEnabled ?? !0
|
|
27
|
-
), r?.(o);
|
|
28
|
-
}
|
|
29
|
-
// Function to set the locale
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
g as useLocale
|
|
34
|
-
};
|
|
1
|
+
import { f as e } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
export { e as useLocale };
|
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
m as localeCookie,
|
|
25
|
-
s as localeInStorage,
|
|
26
|
-
p as setLocaleCookie,
|
|
27
|
-
g as setLocaleInStorage,
|
|
28
|
-
k as useLocaleCookie,
|
|
29
|
-
n as useLocaleStorage
|
|
1
|
+
import { computed as e } from "vue";
|
|
2
|
+
import { LocaleStorage as t, getLocaleFromStorage as n, setLocaleInStorage as r } from "@intlayer/core/utils";
|
|
3
|
+
import { localeStorageOptions as i } from "@intlayer/core/localization";
|
|
4
|
+
//#region src/client/useLocaleStorage.ts
|
|
5
|
+
var a = n(i), o = a, s = (e, t) => r(e, {
|
|
6
|
+
...i,
|
|
7
|
+
isCookieEnabled: t
|
|
8
|
+
}), c = s, l = (n) => {
|
|
9
|
+
let r = t({
|
|
10
|
+
...i,
|
|
11
|
+
isCookieEnabled: n
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
localeStorage: e(() => r.getLocale()),
|
|
15
|
+
setLocaleStorage: r.setLocale
|
|
16
|
+
};
|
|
17
|
+
}, u = (e) => {
|
|
18
|
+
let t = l(e);
|
|
19
|
+
return {
|
|
20
|
+
localeCookie: t.localeStorage,
|
|
21
|
+
setLocaleCookie: t.setLocaleStorage
|
|
22
|
+
};
|
|
30
23
|
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { o as localeCookie, a as localeInStorage, c as setLocaleCookie, s as setLocaleInStorage, u as useLocaleCookie, l as useLocaleStorage };
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { watch as w } from "vue";
|
|
4
|
-
import { useLocale as c } from "./useLocale.mjs";
|
|
5
|
-
const f = () => {
|
|
6
|
-
const { locale: i } = c(), o = n?.routing?.rewrite;
|
|
7
|
-
w(
|
|
8
|
-
i,
|
|
9
|
-
(r) => {
|
|
10
|
-
if (typeof window > "u" || !o) return;
|
|
11
|
-
const e = window.location.pathname, t = a(e, r, o);
|
|
12
|
-
t && t !== e && window.history.replaceState(
|
|
13
|
-
window.history.state,
|
|
14
|
-
"",
|
|
15
|
-
t + window.location.search + window.location.hash
|
|
16
|
-
);
|
|
17
|
-
},
|
|
18
|
-
{ immediate: !0 }
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
f as useRewriteURL
|
|
23
|
-
};
|
|
1
|
+
import { d as e } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
export { e as useRewriteURL };
|
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
import { c as e } from "../../getDictionary-BE4ZLuzI.mjs";
|
|
2
|
+
import { t } from "../../EditedContentRenderer-CXoF8k9R.mjs";
|
|
3
|
+
import { createBlock as n, createVNode as r, defineComponent as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/editor/EditorSelectorRenderer.vue
|
|
6
|
+
var l = /* @__PURE__ */ i({
|
|
7
|
+
__name: "EditorSelectorRenderer",
|
|
8
|
+
props: {
|
|
9
|
+
dictionaryKey: {},
|
|
10
|
+
keyPath: {},
|
|
11
|
+
plugins: {},
|
|
12
|
+
locale: {},
|
|
13
|
+
dictionaryPath: {},
|
|
14
|
+
children: {}
|
|
15
|
+
},
|
|
16
|
+
setup(i) {
|
|
17
|
+
let { keyPath: l, children: u, dictionaryKey: d } = i;
|
|
18
|
+
return (i, f) => (a(), n(e, {
|
|
19
|
+
dictionaryKey: s(d),
|
|
20
|
+
keyPath: s(l),
|
|
21
|
+
children: s(u)
|
|
22
|
+
}, {
|
|
23
|
+
default: c(() => [r(t, {
|
|
24
|
+
dictionaryKey: s(d),
|
|
25
|
+
keyPath: s(l),
|
|
26
|
+
children: s(u)
|
|
27
|
+
}, {
|
|
28
|
+
default: c(() => [o(i.$slots, "default")]),
|
|
29
|
+
_: 3
|
|
30
|
+
}, 8, [
|
|
31
|
+
"dictionaryKey",
|
|
32
|
+
"keyPath",
|
|
33
|
+
"children"
|
|
34
|
+
])]),
|
|
35
|
+
_: 3
|
|
36
|
+
}, 8, [
|
|
37
|
+
"dictionaryKey",
|
|
38
|
+
"keyPath",
|
|
39
|
+
"children"
|
|
40
|
+
]));
|
|
41
|
+
}
|
|
36
42
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { l as default };
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { inject as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"useCommunicator: inject can only be used in setup(). Returning default communicator."
|
|
26
|
-
), e;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
m as createCommunicator,
|
|
31
|
-
g as installCommunicator,
|
|
32
|
-
C as useCommunicator
|
|
1
|
+
import e from "@intlayer/config/built";
|
|
2
|
+
import { inject as t, reactive as n } from "vue";
|
|
3
|
+
//#region src/editor/communicator.ts
|
|
4
|
+
var r = () => Math.random().toString(36).slice(2), { editor: i } = e, a = {
|
|
5
|
+
postMessage: () => null,
|
|
6
|
+
allowedOrigins: [
|
|
7
|
+
i?.applicationURL,
|
|
8
|
+
i?.editorURL,
|
|
9
|
+
i?.cmsURL
|
|
10
|
+
],
|
|
11
|
+
senderId: ""
|
|
12
|
+
}, o = null, s = Symbol("Communicator"), c = (e = { postMessage: () => null }) => o || (o = n({
|
|
13
|
+
...a,
|
|
14
|
+
...e,
|
|
15
|
+
senderId: r()
|
|
16
|
+
}), o), l = (e, t = { postMessage: () => null }) => {
|
|
17
|
+
let n = c(t);
|
|
18
|
+
e.provide(s, n);
|
|
19
|
+
}, u = () => {
|
|
20
|
+
try {
|
|
21
|
+
return t(s, a);
|
|
22
|
+
} catch {
|
|
23
|
+
return console.warn("useCommunicator: inject can only be used in setup(). Returning default communicator."), a;
|
|
24
|
+
}
|
|
33
25
|
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { c as createCommunicator, l as installCommunicator, u as useCommunicator };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { useCrossFrameState as e } from "./useCrossFrameState.mjs";
|
|
1
2
|
import t from "@intlayer/config/built";
|
|
2
|
-
import { MessageKey as i } from "@intlayer/editor";
|
|
3
3
|
import { onMounted as n } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
a as useConfiguration
|
|
4
|
+
import { MessageKey as r } from "@intlayer/editor";
|
|
5
|
+
//#region src/editor/configuration.ts
|
|
6
|
+
var i = () => {
|
|
7
|
+
let [i, a] = e(r.INTLAYER_CONFIGURATION);
|
|
8
|
+
n(() => {
|
|
9
|
+
i && a(t);
|
|
10
|
+
});
|
|
13
11
|
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as useConfiguration };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { effectScope as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
a as createSharedComposable,
|
|
11
|
-
u as tryOnScopeDispose
|
|
1
|
+
import { effectScope as e, getCurrentScope as t, onScopeDispose as n } from "vue";
|
|
2
|
+
//#region src/editor/createSharedComposable.ts
|
|
3
|
+
var r = (e) => t() ? (n(e), !0) : !1, i = (t) => {
|
|
4
|
+
let n = 0, i, a, o = () => {
|
|
5
|
+
--n, a && n <= 0 && (a.stop(), i = void 0, a = void 0);
|
|
6
|
+
};
|
|
7
|
+
return ((...s) => (n += 1, a || (a = e(!0), i = a.run(() => t(...s))), r(o), i));
|
|
12
8
|
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { i as createSharedComposable, r as tryOnScopeDispose };
|