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.
Files changed (125) hide show
  1. package/dist/ContentSelector-BaMG67_z.js +1 -0
  2. package/dist/ContentSelector-D9fc9D1G.mjs +76 -0
  3. package/dist/EditedContentRenderer-CXoF8k9R.mjs +25 -0
  4. package/dist/EditedContentRenderer-S0zWbUak.js +1 -0
  5. package/dist/cjs/UI/ContentSelector.cjs +1 -1
  6. package/dist/cjs/client/index.cjs +1 -1
  7. package/dist/cjs/client/installIntlayer.cjs +1 -1
  8. package/dist/cjs/client/useDictionary.cjs +1 -1
  9. package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
  10. package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
  11. package/dist/cjs/client/useIntlayer.cjs +1 -1
  12. package/dist/cjs/client/useLoadDynamic.cjs +1 -1
  13. package/dist/cjs/client/useLocale.cjs +1 -1
  14. package/dist/cjs/client/useLocaleStorage.cjs +1 -1
  15. package/dist/cjs/client/useRewriteURL.cjs +1 -1
  16. package/dist/cjs/editor/ContentSelectorWrapper.cjs +1 -1
  17. package/dist/cjs/editor/EditedContentRenderer.cjs +1 -1
  18. package/dist/cjs/editor/EditorSelectorRenderer.cjs +1 -1
  19. package/dist/cjs/editor/communicator.cjs +1 -1
  20. package/dist/cjs/editor/configuration.cjs +1 -1
  21. package/dist/cjs/editor/createSharedComposable.cjs +1 -1
  22. package/dist/cjs/editor/dictionariesRecord.cjs +1 -1
  23. package/dist/cjs/editor/editedContent.cjs +1 -1
  24. package/dist/cjs/editor/editorEnabled.cjs +1 -1
  25. package/dist/cjs/editor/editorLocale.cjs +1 -1
  26. package/dist/cjs/editor/focusDictionary.cjs +1 -1
  27. package/dist/cjs/editor/index.cjs +1 -1
  28. package/dist/cjs/editor/installIntlayerEditor.cjs +1 -1
  29. package/dist/cjs/editor/useCrossFrameMessageListener.cjs +1 -1
  30. package/dist/cjs/editor/useCrossFrameState.cjs +1 -1
  31. package/dist/cjs/editor/useCrossURLPathState.cjs +1 -1
  32. package/dist/cjs/editor/useEditedContentRenderer.cjs +1 -1
  33. package/dist/cjs/editor/useEditor.cjs +1 -1
  34. package/dist/cjs/editor/useIframeClickInterceptor.cjs +1 -1
  35. package/dist/cjs/format/index.cjs +1 -1
  36. package/dist/cjs/format/useCompact.cjs +1 -1
  37. package/dist/cjs/format/useCurrency.cjs +1 -1
  38. package/dist/cjs/format/useDate.cjs +1 -1
  39. package/dist/cjs/format/useIntl.cjs +1 -1
  40. package/dist/cjs/format/useList.cjs +1 -1
  41. package/dist/cjs/format/useNumber.cjs +1 -1
  42. package/dist/cjs/format/usePercentage.cjs +1 -1
  43. package/dist/cjs/format/useRelativeTime.cjs +1 -1
  44. package/dist/cjs/format/useUnit.cjs +1 -1
  45. package/dist/cjs/getDictionary.cjs +1 -1
  46. package/dist/cjs/getIntlayer.cjs +1 -1
  47. package/dist/cjs/html/HTMLRenderer.cjs +1 -1
  48. package/dist/cjs/html/index.cjs +1 -1
  49. package/dist/cjs/html/installIntlayerHTML.cjs +1 -1
  50. package/dist/cjs/html/types.cjs +1 -1
  51. package/dist/cjs/index.cjs +1 -1
  52. package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
  53. package/dist/cjs/markdown/compiler.cjs +1 -1
  54. package/dist/cjs/markdown/index.cjs +1 -1
  55. package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -1
  56. package/dist/cjs/markdown/runtime.cjs +1 -1
  57. package/dist/cjs/plugins.cjs +1 -1
  58. package/dist/cjs/renderIntlayerNode.cjs +1 -1
  59. package/dist/communicator-1rnoOTtT.js +1 -0
  60. package/dist/esm/UI/ContentSelector.mjs +2 -4
  61. package/dist/esm/client/index.mjs +3 -26
  62. package/dist/esm/client/installIntlayer.mjs +2 -16
  63. package/dist/esm/client/useDictionary.mjs +2 -100
  64. package/dist/esm/client/useDictionaryAsync.mjs +2 -21
  65. package/dist/esm/client/useDictionaryDynamic.mjs +2 -5
  66. package/dist/esm/client/useIntlayer.mjs +2 -59
  67. package/dist/esm/client/useLoadDynamic.mjs +14 -16
  68. package/dist/esm/client/useLocale.mjs +2 -34
  69. package/dist/esm/client/useLocaleStorage.mjs +24 -29
  70. package/dist/esm/client/useRewriteURL.mjs +2 -23
  71. package/dist/esm/editor/ContentSelectorWrapper.mjs +2 -4
  72. package/dist/esm/editor/EditedContentRenderer.mjs +2 -4
  73. package/dist/esm/editor/EditorSelectorRenderer.mjs +43 -38
  74. package/dist/esm/editor/communicator.mjs +26 -32
  75. package/dist/esm/editor/configuration.mjs +10 -10
  76. package/dist/esm/editor/createSharedComposable.mjs +9 -11
  77. package/dist/esm/editor/dictionariesRecord.mjs +35 -52
  78. package/dist/esm/editor/editedContent.mjs +41 -63
  79. package/dist/esm/editor/editorEnabled.mjs +37 -55
  80. package/dist/esm/editor/editorLocale.mjs +2 -12
  81. package/dist/esm/editor/focusDictionary.mjs +33 -38
  82. package/dist/esm/editor/index.mjs +3 -7
  83. package/dist/esm/editor/installIntlayerEditor.mjs +20 -16
  84. package/dist/esm/editor/useCrossFrameMessageListener.mjs +28 -28
  85. package/dist/esm/editor/useCrossFrameState.mjs +51 -43
  86. package/dist/esm/editor/useCrossURLPathState.mjs +20 -25
  87. package/dist/esm/editor/useEditedContentRenderer.mjs +9 -17
  88. package/dist/esm/editor/useEditor.mjs +2 -11
  89. package/dist/esm/editor/useIframeClickInterceptor.mjs +14 -22
  90. package/dist/esm/format/index.mjs +10 -20
  91. package/dist/esm/format/useCompact.mjs +15 -15
  92. package/dist/esm/format/useCurrency.mjs +15 -15
  93. package/dist/esm/format/useDate.mjs +15 -15
  94. package/dist/esm/format/useIntl.mjs +9 -12
  95. package/dist/esm/format/useList.mjs +15 -15
  96. package/dist/esm/format/useNumber.mjs +15 -15
  97. package/dist/esm/format/usePercentage.mjs +14 -14
  98. package/dist/esm/format/useRelativeTime.mjs +15 -15
  99. package/dist/esm/format/useUnit.mjs +15 -15
  100. package/dist/esm/getDictionary.mjs +2 -15
  101. package/dist/esm/getIntlayer.mjs +2 -15
  102. package/dist/esm/html/HTMLRenderer.mjs +25 -31
  103. package/dist/esm/html/index.mjs +3 -11
  104. package/dist/esm/html/installIntlayerHTML.mjs +23 -33
  105. package/dist/esm/html/types.mjs +0 -1
  106. package/dist/esm/index.mjs +12 -69
  107. package/dist/esm/markdown/MarkdownRenderer.mjs +105 -131
  108. package/dist/esm/markdown/compiler.mjs +6 -12
  109. package/dist/esm/markdown/index.mjs +5 -22
  110. package/dist/esm/markdown/installIntlayerMarkdown.mjs +47 -80
  111. package/dist/esm/markdown/runtime.mjs +19 -54
  112. package/dist/esm/plugins.mjs +2 -21
  113. package/dist/esm/renderIntlayerNode.mjs +33 -47
  114. package/dist/getDictionary-BE4ZLuzI.mjs +387 -0
  115. package/dist/getDictionary-DMdOvXMh.js +1 -0
  116. package/dist/types/getDictionary.d.ts +1 -2
  117. package/dist/types/getIntlayer.d.ts +1 -2
  118. package/dist/types/plugins.d.ts +5 -0
  119. package/package.json +13 -13
  120. package/dist/ContentSelector.vue_vue_type_script_setup_true_lang-87sjUiJI.js +0 -1
  121. package/dist/ContentSelector.vue_vue_type_script_setup_true_lang-CR8kSRs9.mjs +0 -73
  122. package/dist/EditedContentRenderer.vue_vue_type_script_setup_true_lang-BlN498QG.mjs +0 -36
  123. package/dist/EditedContentRenderer.vue_vue_type_script_setup_true_lang-DYN7KHa_.js +0 -1
  124. package/dist/plugins-Bzptc2vR.js +0 -1
  125. package/dist/plugins-rixQm8YE.mjs +0 -293
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@intlayer/config/built");require("@intlayer/core/interpreter");require("@intlayer/core/markdown");require("@intlayer/core/transpiler");require("@intlayer/types/nodeType");require("vue");const e=require("../plugins-Bzptc2vR.js");require("./editor/installIntlayerEditor.cjs");require("@intlayer/editor");require("./editor/communicator.cjs");require("./client/useLocaleStorage.cjs");require("@intlayer/core/localization");require("./markdown/installIntlayerMarkdown.cjs");require("./renderIntlayerNode.cjs");exports.htmlPlugin=e.htmlPlugin;exports.insertionPlugin=e.insertionPlugin;exports.intlayerNodePlugins=e.intlayerNodePlugins;exports.markdownPlugin=e.markdownPlugin;exports.markdownStringPlugin=e.markdownStringPlugin;
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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),v=({value:s,children:t,additionalProps:a={}})=>{const r=l.ref(s);let n=typeof t=="function"?e=>t(e):()=>t;const o=e=>(r.value,n(e)),u=(e=>o(e));return Object.setPrototypeOf(u,String.prototype),Object.assign(u,{render:o,toString:()=>String(r.value??""),valueOf:()=>r.value,[Symbol.toPrimitive]:()=>r.value,toJSON:()=>r.value,get raw(){return r.value},set raw(e){r.value=e},get value(){return r.value},use(e){return v({value:r.value,children:()=>n(e),additionalProps:a})},__update(e){n=e.render,this.raw=e.raw},...a}),l.markRaw(u)};exports.renderIntlayerNode=v;
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,4 +1,2 @@
1
- import { _ as f } from "../../ContentSelector.vue_vue_type_script_setup_true_lang-CR8kSRs9.mjs";
2
- export {
3
- f as default
4
- };
1
+ import { t as e } from "../../ContentSelector-D9fc9D1G.mjs";
2
+ export { e as default };
@@ -1,26 +1,3 @@
1
- import { I as r, c as t, a } from "../../plugins-rixQm8YE.mjs";
2
- import { atPath as i, createIntlayerLeafProxy as s, isComponentLike as m, isIntlayerNode as y, isObjectLike as c, toComponent as p, useDictionary as f } from "./useDictionary.mjs";
3
- import { useDictionaryAsync as x } from "./useDictionaryAsync.mjs";
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 "@intlayer/config/built";
2
- import "vue";
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 j from "@intlayer/config/built";
2
- import { markRaw as k, defineComponent as C, h as g, inject as I, isRef as D, ref as K, computed as y, toValue as P, shallowRef as O, watch as S } from "vue";
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 r from "@intlayer/config/built";
2
- import { inject as l, computed as s, ref as u, watch as f } from "vue";
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,5 +1,2 @@
1
- import { useDictionaryAsync as c } from "./useDictionaryAsync.mjs";
2
- const t = async (i, n, a) => await c(i, a);
3
- export {
4
- t as useDictionaryDynamic
5
- };
1
+ import { h as e } from "../../getDictionary-BE4ZLuzI.mjs";
2
+ export { e as useDictionaryDynamic };
@@ -1,59 +1,2 @@
1
- import C from "@intlayer/config/built";
2
- import { inject as j, isRef as k, ref as K, computed as s, toValue as h, shallowRef as O, watch as S } from "vue";
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 r } from "vue";
2
- const a = (e, o) => {
3
- const t = a._cache ?? // biome-ignore lint/suspicious/noAssignInExpressions: <To fix the error>
4
- (a._cache = /* @__PURE__ */ new Map()), c = r({});
5
- if (t.has(e))
6
- t.get(e)?.then((n) => {
7
- Object.assign(c, n);
8
- });
9
- else {
10
- const n = o.then((s) => (Object.assign(c, s), s));
11
- t.set(e, n);
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 i from "@intlayer/config/built";
2
- import { inject as c, computed as n } from "vue";
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 { localeStorageOptions as t } from "@intlayer/core/localization";
2
- import { getLocaleFromStorage as a, setLocaleInStorage as c, LocaleStorage as r } from "@intlayer/core/utils";
3
- import { computed as l } from "vue";
4
- const s = a(t), m = s, g = (e, o) => c(e, {
5
- ...t,
6
- isCookieEnabled: o
7
- }), p = g, n = (e) => {
8
- const o = r({
9
- ...t,
10
- isCookieEnabled: e
11
- });
12
- return {
13
- localeStorage: l(() => o.getLocale()),
14
- setLocaleStorage: o.setLocale
15
- };
16
- }, k = (e) => {
17
- const o = n(e);
18
- return {
19
- localeCookie: o.localeStorage,
20
- setLocaleCookie: o.setLocaleStorage
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 n from "@intlayer/config/built";
2
- import { getRewritePath as a } from "@intlayer/core/localization";
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,4 +1,2 @@
1
- import { _ as f } from "../../plugins-rixQm8YE.mjs";
2
- export {
3
- f as default
4
- };
1
+ import { c as e } from "../../getDictionary-BE4ZLuzI.mjs";
2
+ export { e as default };
@@ -1,4 +1,2 @@
1
- import { _ as f } from "../../EditedContentRenderer.vue_vue_type_script_setup_true_lang-BlN498QG.mjs";
2
- export {
3
- f as default
4
- };
1
+ import { t as e } from "../../EditedContentRenderer-CXoF8k9R.mjs";
2
+ export { e as default };
@@ -1,39 +1,44 @@
1
- import { defineComponent as d, openBlock as y, createBlock as l, unref as e, withCtx as n, createVNode as h, renderSlot as s } from "vue";
2
- import { _ } from "../../plugins-rixQm8YE.mjs";
3
- import { _ as f } from "../../EditedContentRenderer.vue_vue_type_script_setup_true_lang-BlN498QG.mjs";
4
- const P = /* @__PURE__ */ d({
5
- __name: "EditorSelectorRenderer",
6
- props: {
7
- dictionaryKey: {},
8
- keyPath: {},
9
- plugins: {},
10
- locale: {},
11
- dictionaryPath: {},
12
- children: {}
13
- },
14
- setup(o) {
15
- const a = o, { keyPath: t, children: r, dictionaryKey: i } = a;
16
- return (c, p) => (y(), l(_, {
17
- dictionaryKey: e(i),
18
- keyPath: e(t),
19
- children: e(r)
20
- }, {
21
- default: n(() => [
22
- h(f, {
23
- dictionaryKey: e(i),
24
- keyPath: e(t),
25
- children: e(r)
26
- }, {
27
- default: n(() => [
28
- s(c.$slots, "default")
29
- ]),
30
- _: 3
31
- }, 8, ["dictionaryKey", "keyPath", "children"])
32
- ]),
33
- _: 3
34
- }, 8, ["dictionaryKey", "keyPath", "children"]));
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
- export {
38
- P as default
39
- };
43
+ //#endregion
44
+ export { l as default };
@@ -1,33 +1,27 @@
1
- import i from "@intlayer/config/built";
2
- import { inject as a, reactive as u } from "vue";
3
- const l = () => Math.random().toString(36).slice(2), { editor: o } = i, e = {
4
- postMessage: () => null,
5
- allowedOrigins: [
6
- o?.applicationURL,
7
- o?.editorURL,
8
- o?.cmsURL
9
- ],
10
- senderId: ""
11
- };
12
- let n = null;
13
- const r = /* @__PURE__ */ Symbol("Communicator"), m = (t = { postMessage: () => null }) => n || (n = u({
14
- ...e,
15
- ...t,
16
- senderId: l()
17
- }), n), g = (t, c = { postMessage: () => null }) => {
18
- const s = m(c);
19
- t.provide(r, s);
20
- }, C = () => {
21
- try {
22
- return a(r, e);
23
- } catch {
24
- return console.warn(
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 { useCrossFrameState as e } from "./useCrossFrameState.mjs";
5
- const a = () => {
6
- const [o, r] = e(i.INTLAYER_CONFIGURATION);
7
- n(() => {
8
- o && r(t);
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 c, getCurrentScope as n, onScopeDispose as i } from "vue";
2
- const u = (t) => n() ? (i(t), !0) : !1, a = (t) => {
3
- let r = 0, o, e;
4
- const s = () => {
5
- r -= 1, e && r <= 0 && (e.stop(), o = void 0, e = void 0);
6
- };
7
- return ((...p) => (r += 1, e || (e = c(!0), o = e.run(() => t(...p))), u(s), o));
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 };