vue-intlayer 9.0.2 → 9.1.1

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.
@@ -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));const c=require("./renderIntlayerNode.cjs"),l=require("./analytics/exposureSink.cjs"),u=require("./html/HTMLRenderer.cjs"),d=require("./markdown/installIntlayerMarkdown.cjs");let f=require("vue"),p=require("@intlayer/core/interpreter"),m=require("@intlayer/config/built"),h=require("@intlayer/core/markdown"),g=require("@intlayer/types/nodeType");g=s(g);var _=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,f.defineAsyncComponent)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs"))),v={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,...n})=>{process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&l.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`text`});let r=e=>c.renderIntlayerNode({...n,value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?()=>(0,f.h)(_,{dictionaryKey:n.dictionaryKey,keyPath:n.keyPath},{default:()=>typeof e==`function`?e():e}):e}),i=r(t);if(typeof t!=`function`)return i;let a=(...e)=>{let n=t(...e);return r(n)};Object.setPrototypeOf(a,Object.getPrototypeOf(i));for(let e of Object.getOwnPropertyNames(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}for(let e of Object.getOwnPropertySymbols(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}return(0,f.markRaw)(a)}},y=(e,t)=>{let n=new Map,r={};for(let[e,i]of Object.entries(t))typeof i==`string`||typeof i==`number`?r[e]=i:(n.set(e,i),r[e]=`__VNODE_${e}__`);let i=(0,p.splitInsertionTemplate)(e,r);if(n.size>0){let e=[];if(i.isSimple){let t=i.parts,r=0;for(let[i]of n){let a=`__VNODE_${i}__`,o=t.indexOf(a);o!==-1&&(o>r&&e.push(t.substring(r,o)),e.push(n.get(i)),r=o+a.length)}return r<t.length&&e.push(t.substring(r)),(0,f.h)(f.Fragment,null,...e)}else return i.parts.forEach(t=>{if(typeof t==`string`){let r=t;for(let[t]of n){let i=`__VNODE_${t}__`,a=r.indexOf(i);a!==-1&&(a>0&&e.push(r.substring(0,a)),e.push(n.get(t)),r=r.substring(a+i.length))}r.length>0&&e.push(r)}else e.push(t)}),(0,f.h)(f.Fragment,null,...e)}return i.isSimple?i.parts:(0,f.h)(f.Fragment,null,i.parts)},b=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?p.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.INSERTION}],i=e[g.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,p.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,p.isInterpolableWrapperNode)(e))return i=>(0,p.transformInterpolableNode)(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=y(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},x=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?p.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,a=n((0,h.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>c.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),o=n=>c.renderIntlayerNode({...t,value:e,children:()=>{let{renderMarkdown:t,components:r}=d.useMarkdown(),a=t(e,void 0,{...r??{},...n??{}});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?(0,f.h)(_,{dictionaryKey:i.dictionaryKey,keyPath:i.keyPath},{default:()=>a}):a},additionalProps:{metadata:a,use:e=>o(e)}});return o()}},S=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?p.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.MARKDOWN}],i=e[g.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[x,...t.plugins??[]]})}},C=process.env.INTLAYER_NODE_TYPE_HTML===`false`?p.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.HTML,transform:(e,t)=>{let n=e[g.HTML];e.tags;let r=(e={})=>{let i=u.renderHTML(n,{components:e});return c.renderIntlayerNode({...t,value:n,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?()=>(0,f.h)(_,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath,...e},{default:()=>i}):i,additionalProps:{use:e=>r(e)}})};return r()}},w=new Map,T=(e,t=!0)=>{let n=`${e??m.internationalization.defaultLocale}_${t}`;if(w.has(n))return w.get(n);let r=[(0,p.translationPlugin)(e??m.internationalization.defaultLocale,t?m.internationalization.defaultLocale:void 0),p.enumerationPlugin,(0,p.pluralPlugin)(e??m.internationalization.defaultLocale),p.conditionPlugin,(0,p.nestedPlugin)(e??m.internationalization.defaultLocale),p.filePlugin,p.genderPlugin,v,b,S,C];return w.set(n,r),r};exports.getPlugins=T,exports.htmlPlugin=C,exports.insertionPlugin=b,exports.intlayerNodePlugins=v,exports.markdownPlugin=S,exports.markdownStringPlugin=x;
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));const c=require("./renderIntlayerNode.cjs"),l=require("./analytics/exposureSink.cjs"),u=require("./html/HTMLRenderer.cjs"),d=require("./markdown/installIntlayerMarkdown.cjs");let f=require("vue"),p=require("@intlayer/core/interpreter"),m=require("@intlayer/config/built"),h=require("@intlayer/core/markdown"),g=require("@intlayer/types/nodeType");g=s(g);var _=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,f.defineAsyncComponent)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs"))),v={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,...n})=>{process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&l.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`text`});let r=e=>c.renderIntlayerNode({...n,value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?()=>(0,f.h)(_,{dictionaryKey:n.dictionaryKey,keyPath:n.keyPath},{default:()=>typeof e==`function`?e():e}):e}),i=r(t);if(typeof t!=`function`)return i;let a=(...e)=>{let n=t(...e);return r(n)};Object.setPrototypeOf(a,Object.getPrototypeOf(i));for(let e of Object.getOwnPropertyNames(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}for(let e of Object.getOwnPropertySymbols(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}return(0,f.markRaw)(a)}},y=(e,t)=>{let n=new Map,r={};for(let[e,i]of Object.entries(t))typeof i==`string`||typeof i==`number`?r[e]=i:(n.set(e,i),r[e]=`__VNODE_${e}__`);let i=(0,p.splitInsertionTemplate)(e,r);if(n.size>0){let e=[];if(i.isSimple){let t=i.parts,r=0;for(let[i]of n){let a=`__VNODE_${i}__`,o=t.indexOf(a);o!==-1&&(o>r&&e.push(t.substring(r,o)),e.push(n.get(i)),r=o+a.length)}return r<t.length&&e.push(t.substring(r)),(0,f.h)(f.Fragment,null,...e)}else return i.parts.forEach(t=>{if(typeof t==`string`){let r=t;for(let[t]of n){let i=`__VNODE_${t}__`,a=r.indexOf(i);a!==-1&&(a>0&&e.push(r.substring(0,a)),e.push(n.get(t)),r=r.substring(a+i.length))}r.length>0&&e.push(r)}else e.push(t)}),(0,f.h)(f.Fragment,null,...e)}return i.isSimple?i.parts:(0,f.h)(f.Fragment,null,i.parts)},b=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?p.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.INSERTION}],i=e[g.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,p.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,p.isInterpolableWrapperNode)(e))return i=>(0,p.transformInterpolableNode)(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=y(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},x=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?p.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,a=n((0,h.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>c.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),o=n=>c.renderIntlayerNode({...t,value:e,children:()=>{let{renderMarkdown:t,components:r}=d.useMarkdown(),a=t(e,void 0,{...r??{},...n??{}});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?(0,f.h)(_,{dictionaryKey:i.dictionaryKey,keyPath:i.keyPath},{default:()=>a}):a},additionalProps:{metadata:a,use:e=>o(e)}});return o()}},S=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?p.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.MARKDOWN}],i=e[g.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[x,...t.plugins??[]]})}},C=process.env.INTLAYER_NODE_TYPE_HTML===`false`?p.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.HTML,transform:(e,t)=>{let n=e[g.HTML];e.tags;let r=(e={})=>{let i=u.renderHTML(n,{components:e});return c.renderIntlayerNode({...t,value:n,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?()=>(0,f.h)(_,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath,...e},{default:()=>i}):i,additionalProps:{use:e=>r(e)}})};return r()}},w=new Map,T=(e,t=!0)=>{let n=`${e??m.internationalization.defaultLocale}_${t}`;if(w.has(n))return w.get(n);let r=[(0,p.translationPlugin)(e??m.internationalization.defaultLocale,t?m.internationalization.defaultLocale:void 0),p.enumerationPlugin,(0,p.pluralPlugin)(e??m.internationalization.defaultLocale),p.conditionPlugin,(0,p.nestedPlugin)(e??m.internationalization.defaultLocale),p.filePlugin,p.genderPlugin,p.selectPlugin,v,b,S,C];return w.set(n,r),r};exports.getPlugins=T,exports.htmlPlugin=C,exports.insertionPlugin=b,exports.intlayerNodePlugins=v,exports.markdownPlugin=S,exports.markdownStringPlugin=x;
@@ -3,12 +3,12 @@ import { reportExposure as t } from "./analytics/exposureSink.mjs";
3
3
  import { renderHTML as n } from "./html/HTMLRenderer.mjs";
4
4
  import { useMarkdown as r } from "./markdown/installIntlayerMarkdown.mjs";
5
5
  import { Fragment as i, defineAsyncComponent as a, h as o, markRaw as s } from "vue";
6
- import { conditionPlugin as c, enumerationPlugin as l, fallbackPlugin as u, filePlugin as d, genderPlugin as f, isInterpolableWrapperNode as p, nestedPlugin as m, pluralPlugin as h, splitInsertionTemplate as g, transformInterpolableNode as _, translationPlugin as v } from "@intlayer/core/interpreter";
7
- import { editor as y, internationalization as b } from "@intlayer/config/built";
8
- import { getMarkdownMetadata as x } from "@intlayer/core/markdown";
9
- import * as S from "@intlayer/types/nodeType";
6
+ import { conditionPlugin as c, enumerationPlugin as l, fallbackPlugin as u, filePlugin as d, genderPlugin as f, isInterpolableWrapperNode as p, nestedPlugin as m, pluralPlugin as h, selectPlugin as g, splitInsertionTemplate as _, transformInterpolableNode as v, translationPlugin as y } from "@intlayer/core/interpreter";
7
+ import { editor as b, internationalization as x } from "@intlayer/config/built";
8
+ import { getMarkdownMetadata as S } from "@intlayer/core/markdown";
9
+ import * as C from "@intlayer/types/nodeType";
10
10
  //#region src/plugins.ts
11
- var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import("./editor/ContentSelector.mjs")), w = {
11
+ var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import("./editor/ContentSelector.mjs")), T = {
12
12
  id: "intlayer-node-plugin",
13
13
  canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
14
14
  transform: (n, { children: r, ...i }) => {
@@ -21,7 +21,7 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
21
21
  let a = (t) => e({
22
22
  ...i,
23
23
  value: t,
24
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && y.enabled ? () => o(C, {
24
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && b.enabled ? () => o(w, {
25
25
  dictionaryKey: i.dictionaryKey,
26
26
  keyPath: i.keyPath
27
27
  }, { default: () => typeof t == "function" ? t() : t }) : t
@@ -42,10 +42,10 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
42
42
  }
43
43
  return s(l);
44
44
  }
45
- }, T = (e, t) => {
45
+ }, E = (e, t) => {
46
46
  let n = /* @__PURE__ */ new Map(), r = {};
47
47
  for (let [e, i] of Object.entries(t)) typeof i == "string" || typeof i == "number" ? r[e] = i : (n.set(e, i), r[e] = `__VNODE_${e}__`);
48
- let a = g(e, r);
48
+ let a = _(e, r);
49
49
  if (n.size > 0) {
50
50
  let e = [];
51
51
  if (a.isSimple) {
@@ -67,22 +67,22 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
67
67
  }), o(i, null, ...e);
68
68
  }
69
69
  return a.isSimple ? a.parts : o(i, null, a.parts);
70
- }, E = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? u : {
70
+ }, D = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? u : {
71
71
  id: "insertion-plugin",
72
- canHandle: (e) => typeof e == "object" && e?.nodeType === S.INSERTION,
72
+ canHandle: (e) => typeof e == "object" && e?.nodeType === C.INSERTION,
73
73
  transform: (e, t, n) => {
74
- let r = [...t.keyPath, { type: S.INSERTION }], i = e[S.INSERTION], a = {
74
+ let r = [...t.keyPath, { type: C.INSERTION }], i = e[C.INSERTION], a = {
75
75
  id: "insertion-string-plugin",
76
76
  canHandle: (e) => typeof e == "string" || p(e),
77
77
  transform: (e, n, r) => {
78
- if (p(e)) return (i) => _(e, i, n, t.plugins, r);
78
+ if (p(e)) return (i) => v(e, i, n, t.plugins, r);
79
79
  let i = r(e, {
80
80
  ...n,
81
81
  children: e,
82
82
  plugins: [...(t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")]
83
83
  });
84
84
  return (e) => {
85
- let a = T(i, e);
85
+ let a = E(i, e);
86
86
  return r(a, {
87
87
  ...n,
88
88
  plugins: t.plugins,
@@ -98,11 +98,11 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
98
98
  plugins: [a, ...t.plugins ?? []]
99
99
  });
100
100
  }
101
- }, D = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? u : {
101
+ }, O = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? u : {
102
102
  id: "markdown-string-plugin",
103
103
  canHandle: (e) => typeof e == "string",
104
104
  transform: (t, n, i) => {
105
- let { plugins: a, ...s } = n, c = i(x(t) ?? {}, {
105
+ let { plugins: a, ...s } = n, c = i(S(t) ?? {}, {
106
106
  plugins: [{
107
107
  id: "markdown-metadata-plugin",
108
108
  canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
@@ -122,7 +122,7 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
122
122
  ...n ?? {},
123
123
  ...i ?? {}
124
124
  });
125
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && y.enabled ? o(C, {
125
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && b.enabled ? o(w, {
126
126
  dictionaryKey: s.dictionaryKey,
127
127
  keyPath: s.keyPath
128
128
  }, { default: () => a }) : a;
@@ -134,30 +134,30 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
134
134
  });
135
135
  return l();
136
136
  }
137
- }, O = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? u : {
137
+ }, k = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? u : {
138
138
  id: "markdown-plugin",
139
- canHandle: (e) => typeof e == "object" && e?.nodeType === S.MARKDOWN,
139
+ canHandle: (e) => typeof e == "object" && e?.nodeType === C.MARKDOWN,
140
140
  transform: (e, t, n) => {
141
- let r = [...t.keyPath, { type: S.MARKDOWN }], i = e[S.MARKDOWN];
141
+ let r = [...t.keyPath, { type: C.MARKDOWN }], i = e[C.MARKDOWN];
142
142
  return n(i, {
143
143
  ...t,
144
144
  children: i,
145
145
  keyPath: r,
146
- plugins: [D, ...t.plugins ?? []]
146
+ plugins: [O, ...t.plugins ?? []]
147
147
  });
148
148
  }
149
- }, k = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? u : {
149
+ }, A = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? u : {
150
150
  id: "html-plugin",
151
- canHandle: (e) => typeof e == "object" && e?.nodeType === S.HTML,
151
+ canHandle: (e) => typeof e == "object" && e?.nodeType === C.HTML,
152
152
  transform: (t, r) => {
153
- let i = t[S.HTML];
153
+ let i = t[C.HTML];
154
154
  t.tags;
155
155
  let a = (t = {}) => {
156
156
  let s = n(i, { components: t });
157
157
  return e({
158
158
  ...r,
159
159
  value: i,
160
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && y.enabled ? () => o(C, {
160
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && b.enabled ? () => o(w, {
161
161
  dictionaryKey: r.dictionaryKey,
162
162
  keyPath: r.keyPath,
163
163
  ...t
@@ -167,23 +167,24 @@ var C = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
167
167
  };
168
168
  return a();
169
169
  }
170
- }, A = /* @__PURE__ */ new Map(), j = (e, t = !0) => {
171
- let n = `${e ?? b.defaultLocale}_${t}`;
172
- if (A.has(n)) return A.get(n);
170
+ }, j = /* @__PURE__ */ new Map(), M = (e, t = !0) => {
171
+ let n = `${e ?? x.defaultLocale}_${t}`;
172
+ if (j.has(n)) return j.get(n);
173
173
  let r = [
174
- v(e ?? b.defaultLocale, t ? b.defaultLocale : void 0),
174
+ y(e ?? x.defaultLocale, t ? x.defaultLocale : void 0),
175
175
  l,
176
- h(e ?? b.defaultLocale),
176
+ h(e ?? x.defaultLocale),
177
177
  c,
178
- m(e ?? b.defaultLocale),
178
+ m(e ?? x.defaultLocale),
179
179
  d,
180
180
  f,
181
- w,
182
- E,
183
- O,
184
- k
181
+ g,
182
+ T,
183
+ D,
184
+ k,
185
+ A
185
186
  ];
186
- return A.set(n, r), r;
187
+ return j.set(n, r), r;
187
188
  };
188
189
  //#endregion
189
- export { j as getPlugins, k as htmlPlugin, E as insertionPlugin, w as intlayerNodePlugins, O as markdownPlugin, D as markdownStringPlugin };
190
+ export { M as getPlugins, A as htmlPlugin, D as insertionPlugin, T as intlayerNodePlugins, k as markdownPlugin, O as markdownStringPlugin };
@@ -1,5 +1,5 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
3
3
  import { ComputedRef, MaybeRefOrGetter } from 'vue';
4
4
  import { DeepTransformContent } from '../plugins';
5
5
  export declare const atPath: (obj: any, path: (string | number)[]) => any;
@@ -17,4 +17,4 @@ export declare const toComponent: (getter: () => any) => import('vue').Raw<impor
17
17
  * - Passes through other IntlayerNode properties (render, toString, etc.)
18
18
  */
19
19
  export declare const createIntlayerLeafProxy: (leafRef: ComputedRef<any>) => any;
20
- export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: MaybeRefOrGetter<T>, localeOrSelector?: MaybeRefOrGetter<A | null | undefined>) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
20
+ export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: MaybeRefOrGetter<T>, localeOrSelector?: MaybeRefOrGetter<A | null | undefined>) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
@@ -1,6 +1,6 @@
1
1
  import { QualifiedDynamicLoaderMap } from '@intlayer/core/dictionaryManipulator';
2
2
  import { Dictionary } from '@intlayer/types/dictionary';
3
- import { DictionaryKeys, DictionarySelectorForKey, LocalesValues, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
3
+ import { DictionaryKeys, DictionarySelectorForKey, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
4
4
  import { MaybeRefOrGetter } from 'vue';
5
5
  /**
6
6
  * Lazily loads a dictionary (plain or qualified) and returns its content.
@@ -12,4 +12,4 @@ import { MaybeRefOrGetter } from 'vue';
12
12
  * If the locale is not provided (directly or through the selector), it will use
13
13
  * the locale from the client context.
14
14
  */
15
- export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = LocalesValues>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: MaybeRefOrGetter<A | null | undefined>) => Promise<any>;
15
+ export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: MaybeRefOrGetter<A | null | undefined>) => Promise<any>;
@@ -1,4 +1,4 @@
1
- import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
2
2
  import { MaybeRefOrGetter } from 'vue';
3
3
  import { DeepTransformContent } from '../plugins';
4
4
  /**
@@ -24,4 +24,4 @@ import { DeepTransformContent } from '../plugins';
24
24
  * </template>
25
25
  * ```
26
26
  */
27
- export declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: MaybeRefOrGetter<A | null | undefined>) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
27
+ export declare const useIntlayer: <const T extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: MaybeRefOrGetter<A | null | undefined>) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
@@ -1,9 +1,9 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
3
3
  import { DeepTransformContent } from './plugins';
4
4
  /**
5
5
  * Transforms a dictionary (or qualified dictionary group) and returns its
6
6
  * content for the given locale or selector (`{ item }`, `{ variant }`,
7
7
  * optionally combined with `locale`).
8
8
  */
9
- export declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
9
+ export declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
@@ -1,8 +1,8 @@
1
- import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
2
2
  import { DeepTransformContent } from './plugins';
3
3
  /**
4
4
  * Picks one dictionary by its key and returns its content for the given
5
5
  * locale or selector (`{ item }`, `{ variant }`,
6
6
  * optionally combined with `locale`).
7
7
  */
8
- export declare const getIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
8
+ export declare const getIntlayer: <const T extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "9.0.2",
3
+ "version": "9.1.1",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -102,14 +102,14 @@
102
102
  "typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
103
103
  },
104
104
  "dependencies": {
105
- "@intlayer/api": "9.0.2",
106
- "@intlayer/config": "9.0.2",
107
- "@intlayer/core": "9.0.2",
108
- "@intlayer/editor": "9.0.2",
109
- "@intlayer/types": "9.0.2"
105
+ "@intlayer/api": "9.1.1",
106
+ "@intlayer/config": "9.1.1",
107
+ "@intlayer/core": "9.1.1",
108
+ "@intlayer/editor": "9.1.1",
109
+ "@intlayer/types": "9.1.1"
110
110
  },
111
111
  "devDependencies": {
112
- "@types/node": "26.1.1",
112
+ "@types/node": "26.1.2",
113
113
  "@utils/ts-config": "1.0.4",
114
114
  "@utils/ts-config-types": "1.0.4",
115
115
  "@utils/tsdown-config": "1.0.4",
@@ -119,13 +119,13 @@
119
119
  "rimraf": "6.1.3",
120
120
  "tsdown": "0.22.14",
121
121
  "typescript": "7.0.2",
122
- "vite": "8.1.5",
122
+ "vite": "8.2.0",
123
123
  "vite-plugin-dts": "5.0.3",
124
124
  "vitest": "4.1.10",
125
125
  "vue-tsc": "3.3.7"
126
126
  },
127
127
  "peerDependencies": {
128
- "intlayer": "9.0.2",
128
+ "intlayer": "9.1.1",
129
129
  "vue": ">=3.0.0"
130
130
  },
131
131
  "peerDependenciesMeta": {
@@ -134,7 +134,7 @@
134
134
  }
135
135
  },
136
136
  "optionalDependencies": {
137
- "@intlayer/analytics": "9.0.2"
137
+ "@intlayer/analytics": "9.1.1"
138
138
  },
139
139
  "engines": {
140
140
  "node": ">=14.18"