vue-intlayer 7.1.7 → 7.1.8

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.
@@ -6,8 +6,7 @@ import { _ as k } from "./ContentSelector.vue_vue_type_script_setup_true_lang-pC
6
6
  import { useCommunicator as K } from "./esm/editor/communicator.mjs";
7
7
  import { useEditorEnabled as P } from "./esm/editor/editorEnabled.mjs";
8
8
  import { useFocusDictionary as N } from "./esm/editor/focusDictionary.mjs";
9
- import { useEditor as T } from "./esm/editor/useEditor.mjs";
10
- const B = /* @__PURE__ */ m({
9
+ const b = /* @__PURE__ */ m({
11
10
  __name: "ContentSelectorWrapper",
12
11
  props: {
13
12
  dictionaryKey: {},
@@ -18,9 +17,7 @@ const B = /* @__PURE__ */ m({
18
17
  children: {}
19
18
  },
20
19
  setup(c) {
21
- const e = c, t = N(), l = P(), a = K();
22
- T();
23
- const n = r(
20
+ const e = c, t = N(), l = P(), a = K(), n = r(
24
21
  () => e.keyPath.filter((o) => o.type !== C.Translation)
25
22
  ), d = r(
26
23
  () => t?.focusedContent.value?.dictionaryKey === e.dictionaryKey && (t?.focusedContent.value.keyPath?.length ?? 0) > 0 && v(
@@ -46,7 +43,7 @@ const B = /* @__PURE__ */ m({
46
43
  data: null
47
44
  });
48
45
  };
49
- return (o, g) => h(l)?.enabled.value ? (_(), f(k, {
46
+ return (o, T) => h(l)?.enabled.value ? (_(), f(k, {
50
47
  key: 0,
51
48
  onPress: y,
52
49
  isSelecting: d.value,
@@ -61,5 +58,5 @@ const B = /* @__PURE__ */ m({
61
58
  }
62
59
  });
63
60
  export {
64
- B as _
61
+ b as _
65
62
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),_=require("@intlayer/core"),a=require("@intlayer/editor"),p=require("@intlayer/types"),h=require("./ContentSelector.vue_vue_type_script_setup_true_lang-87sjUiJI.js"),f=require("./cjs/editor/communicator.cjs"),v=require("./cjs/editor/editorEnabled.cjs"),m=require("./cjs/editor/focusDictionary.cjs"),E=e.defineComponent({__name:"ContentSelectorWrapper",props:{dictionaryKey:{},keyPath:{},plugins:{},locale:{},dictionaryPath:{},children:{}},setup(c){const t=c,o=m.useFocusDictionary(),i=v.useEditorEnabled(),s=f.useCommunicator(),r=e.computed(()=>t.keyPath.filter(n=>n.type!==p.NodeType.Translation)),u=e.computed(()=>o?.focusedContent.value?.dictionaryKey===t.dictionaryKey&&(o?.focusedContent.value.keyPath?.length??0)>0&&_.isSameKeyPath(o?.focusedContent.value.keyPath??[],r.value)),l=()=>{o?.setFocusedContent({dictionaryKey:t.dictionaryKey,keyPath:r.value})},d=()=>{s?.postMessage({type:`${a.MessageKey.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,data:{dictionaryKey:t.dictionaryKey,keyPath:r.value}})},y=()=>{s?.postMessage({type:`${a.MessageKey.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,data:null})};return(n,C)=>e.unref(i)?.enabled.value?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,onPress:l,isSelecting:u.value,onHover:d,onUnhover:y},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["isSelecting"])):e.renderSlot(n.$slots,"default",{key:1})}});exports._sfc_main=E;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@intlayer/config/built"),i=require("vue");require("@intlayer/core");require("@intlayer/editor");require("@intlayer/types");require("../editor/communicator.cjs");require("@intlayer/unmerged-dictionaries-entry");require("./useLocaleStorage.cjs");const y=require("../editor/installIntlayerEditor.cjs"),o=Symbol("intlayer");let r=null;const a=(t,n=!0)=>{if(r)return r;const{defaultLocale:l}=s.internationalization??{},e=i.ref(t??l),c=u=>{e.value=u};return r={locale:i.readonly(e),setLocale:c,isCookieEnabled:n},r},q=(t,n,l=!0)=>{const e=a(n,l);t.provide(o,e),y.installIntlayerEditor(t,e)};exports.INTLAYER_SYMBOL=o;exports.createIntlayerClient=a;exports.installIntlayer=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@intlayer/config/built"),i=require("vue");require("@intlayer/core");require("@intlayer/editor");require("@intlayer/types");require("../editor/communicator.cjs");const y=require("../editor/installIntlayerEditor.cjs"),o=Symbol("intlayer");let r=null;const a=(t,n=!0)=>{if(r)return r;const{defaultLocale:l}=s.internationalization??{},e=i.ref(t??l),c=u=>{e.value=u};return r={locale:i.readonly(e),setLocale:c,isCookieEnabled:n},r},d=(t,n,l=!0)=>{const e=a(n,l);t.provide(o,e),y.installIntlayerEditor(t,e)};exports.INTLAYER_SYMBOL=o;exports.createIntlayerClient=a;exports.installIntlayer=d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B4fMFrZy.js");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CJxI24VF.js");exports.default=e._sfc_main;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B4fMFrZy.js"),u=require("../../EditedContentRenderer.vue_vue_type_script_setup_true_lang-CilQuo_6.js"),d=e.defineComponent({__name:"EditorSelectorRenderer",props:{dictionaryKey:{},keyPath:{},plugins:{},locale:{},dictionaryPath:{},children:{}},setup(i){const c=i,{keyPath:t,children:r,dictionaryKey:n}=c;return(o,_)=>(e.openBlock(),e.createBlock(a._sfc_main,{dictionaryKey:e.unref(n),keyPath:e.unref(t),children:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(u._sfc_main,{dictionaryKey:e.unref(n),keyPath:e.unref(t),children:e.unref(r)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["dictionaryKey","keyPath","children"])]),_:3},8,["dictionaryKey","keyPath","children"]))}});exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CJxI24VF.js"),u=require("../../EditedContentRenderer.vue_vue_type_script_setup_true_lang-CilQuo_6.js"),d=e.defineComponent({__name:"EditorSelectorRenderer",props:{dictionaryKey:{},keyPath:{},plugins:{},locale:{},dictionaryPath:{},children:{}},setup(i){const c=i,{keyPath:t,children:r,dictionaryKey:n}=c;return(o,_)=>(e.openBlock(),e.createBlock(a._sfc_main,{dictionaryKey:e.unref(n),keyPath:e.unref(t),children:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(u._sfc_main,{dictionaryKey:e.unref(n),keyPath:e.unref(t),children:e.unref(r)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["dictionaryKey","keyPath","children"])]),_:3},8,["dictionaryKey","keyPath","children"]))}});exports.default=d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@intlayer/editor"),r=require("vue"),a=require("../client/installIntlayer.cjs");require("@intlayer/core");require("@intlayer/types");require("./communicator.cjs");require("@intlayer/config/built");const s=require("./createSharedComposable.cjs"),u=require("./useCrossFrameState.cjs");require("@intlayer/unmerged-dictionaries-entry");require("./installIntlayerEditor.cjs");require("../client/useLocaleStorage.cjs");const n=s.createSharedComposable(()=>{const e=r.inject(a.INTLAYER_SYMBOL);if(!e)throw new Error("IntlayerEditor state not found");const[c,t]=u.useCrossFrameState(i.MessageKey.INTLAYER_CURRENT_LOCALE);return r.watch(e.locale,o=>{t(o)},{immediate:!0}),e});exports.useEditorLocale=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@intlayer/editor"),r=require("vue"),a=require("../client/installIntlayer.cjs");require("@intlayer/core");require("@intlayer/types");require("./communicator.cjs");require("@intlayer/config/built");const s=require("./createSharedComposable.cjs"),u=require("./useCrossFrameState.cjs");require("./installIntlayerEditor.cjs");require("../client/useLocaleStorage.cjs");const n=s.createSharedComposable(()=>{const e=r.inject(a.INTLAYER_SYMBOL);if(!e)throw new Error("IntlayerEditor state not found");const[c,t]=u.useCrossFrameState(i.MessageKey.INTLAYER_CURRENT_LOCALE);return r.watch(e.locale,o=>{t(o)},{immediate:!0}),e});exports.useEditorLocale=n;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B4fMFrZy.js"),t=require("./installIntlayerEditor.cjs");exports.ContentSelectorWrapper=e._sfc_main;exports.installIntlayerEditor=t.installIntlayerEditor;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CJxI24VF.js"),t=require("./installIntlayerEditor.cjs");exports.ContentSelectorWrapper=e._sfc_main;exports.installIntlayerEditor=t.installIntlayerEditor;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@intlayer/core"),i=require("@intlayer/types"),l=require("vue"),y=require("../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B4fMFrZy.js");require("./editor/installIntlayerEditor.cjs");const k=require("./markdown/installIntlayerMarkdown.cjs"),o=require("./renderIntlayerNode.cjs"),m={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{children:n,...r})=>o.renderIntlayerNode({...r,value:n,children:()=>l.h(y._sfc_main,{dictionaryKey:r.dictionaryKey,keyPath:r.keyPath},{default:()=>n})})},u={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,n,r)=>{const{plugins:d,...a}=n,s=p.getMarkdownMetadata(e),c=r(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:t=>typeof t=="string"||typeof t=="number"||typeof t=="boolean"||!t,transform:(t,g)=>o.renderIntlayerNode({...g,value:t,children:e})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return o.renderIntlayerNode({...n,value:e,children:()=>l.h(y._sfc_main,{dictionaryKey:a.dictionaryKey,keyPath:a.keyPath},{default:()=>{const{renderMarkdown:t}=k.useMarkdown();return t(e)}}),additionalProps:{metadata:c}})}},P={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===i.NodeType.Markdown,transform:(e,n,r)=>{const d=[...n.keyPath,{type:i.NodeType.Markdown}],a=e[i.NodeType.Markdown];return r(a,{...n,children:a,keyPath:d,plugins:[u,...n.plugins??[]]})}};exports.intlayerNodePlugins=m;exports.markdownPlugin=P;exports.markdownStringPlugin=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@intlayer/core"),i=require("@intlayer/types"),l=require("vue"),y=require("../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CJxI24VF.js");require("./editor/installIntlayerEditor.cjs");const k=require("./markdown/installIntlayerMarkdown.cjs"),o=require("./renderIntlayerNode.cjs"),m={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{children:n,...r})=>o.renderIntlayerNode({...r,value:n,children:()=>l.h(y._sfc_main,{dictionaryKey:r.dictionaryKey,keyPath:r.keyPath},{default:()=>n})})},u={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,n,r)=>{const{plugins:d,...a}=n,s=p.getMarkdownMetadata(e),c=r(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:t=>typeof t=="string"||typeof t=="number"||typeof t=="boolean"||!t,transform:(t,g)=>o.renderIntlayerNode({...g,value:t,children:e})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return o.renderIntlayerNode({...n,value:e,children:()=>l.h(y._sfc_main,{dictionaryKey:a.dictionaryKey,keyPath:a.keyPath},{default:()=>{const{renderMarkdown:t}=k.useMarkdown();return t(e)}}),additionalProps:{metadata:c}})}},P={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===i.NodeType.Markdown,transform:(e,n,r)=>{const d=[...n.keyPath,{type:i.NodeType.Markdown}],a=e[i.NodeType.Markdown];return r(a,{...n,children:a,keyPath:d,plugins:[u,...n.plugins??[]]})}};exports.intlayerNodePlugins=m;exports.markdownPlugin=P;exports.markdownStringPlugin=u;
@@ -4,27 +4,25 @@ import "@intlayer/core";
4
4
  import "@intlayer/editor";
5
5
  import "@intlayer/types";
6
6
  import "../editor/communicator.mjs";
7
- import "@intlayer/unmerged-dictionaries-entry";
8
- import "./useLocaleStorage.mjs";
9
7
  import { installIntlayerEditor as s } from "../editor/installIntlayerEditor.mjs";
10
- const p = Symbol("intlayer");
8
+ const u = Symbol("intlayer");
11
9
  let r = null;
12
- const u = (o, e = !0) => {
10
+ const f = (o, e = !0) => {
13
11
  if (r) return r;
14
- const { defaultLocale: n } = a.internationalization ?? {}, t = c(o ?? n), i = (l) => {
15
- t.value = l;
12
+ const { defaultLocale: n } = a.internationalization ?? {}, t = c(o ?? n), l = (i) => {
13
+ t.value = i;
16
14
  };
17
15
  return r = {
18
16
  locale: m(t),
19
- setLocale: i,
17
+ setLocale: l,
20
18
  isCookieEnabled: e
21
19
  }, r;
22
- }, Y = (o, e, n = !0) => {
23
- const t = u(e, n);
24
- o.provide(p, t), s(o, t);
20
+ }, E = (o, e, n = !0) => {
21
+ const t = f(e, n);
22
+ o.provide(u, t), s(o, t);
25
23
  };
26
24
  export {
27
- p as INTLAYER_SYMBOL,
28
- u as createIntlayerClient,
29
- Y as installIntlayer
25
+ u as INTLAYER_SYMBOL,
26
+ f as createIntlayerClient,
27
+ E as installIntlayer
30
28
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-HcQvp9bv.mjs";
1
+ import { _ as f } from "../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B3aaeQtq.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as d, createBlock as y, openBlock as l, unref as e, withCtx as n, createVNode as h, renderSlot as s } from "vue";
2
- import { _ } from "../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-HcQvp9bv.mjs";
2
+ import { _ } from "../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B3aaeQtq.mjs";
3
3
  import { _ as f } from "../../EditedContentRenderer.vue_vue_type_script_setup_true_lang-GmacOkG4.mjs";
4
4
  const P = /* @__PURE__ */ d({
5
5
  __name: "EditorSelectorRenderer",
@@ -7,10 +7,9 @@ import "./communicator.mjs";
7
7
  import "@intlayer/config/built";
8
8
  import { createSharedComposable as p } from "./createSharedComposable.mjs";
9
9
  import { useCrossFrameState as s } from "./useCrossFrameState.mjs";
10
- import "@intlayer/unmerged-dictionaries-entry";
11
10
  import "./installIntlayerEditor.mjs";
12
11
  import "../client/useLocaleStorage.mjs";
13
- const A = p(() => {
12
+ const w = p(() => {
14
13
  const t = m(a);
15
14
  if (!t)
16
15
  throw new Error("IntlayerEditor state not found");
@@ -26,5 +25,5 @@ const A = p(() => {
26
25
  ), t;
27
26
  });
28
27
  export {
29
- A as useEditorLocale
28
+ w as useEditorLocale
30
29
  };
@@ -1,4 +1,4 @@
1
- import { _ as e } from "../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-HcQvp9bv.mjs";
1
+ import { _ as e } from "../../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B3aaeQtq.mjs";
2
2
  import { installIntlayerEditor as a } from "./installIntlayerEditor.mjs";
3
3
  export {
4
4
  e as ContentSelectorWrapper,
@@ -1,7 +1,7 @@
1
1
  import { getMarkdownMetadata as u } from "@intlayer/core";
2
2
  import { NodeType as o } from "@intlayer/types";
3
3
  import { h as y } from "vue";
4
- import { _ as l } from "../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-HcQvp9bv.mjs";
4
+ import { _ as l } from "../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B3aaeQtq.mjs";
5
5
  import "./editor/installIntlayerEditor.mjs";
6
6
  import { useMarkdown as p } from "./markdown/installIntlayerMarkdown.mjs";
7
7
  import { renderIntlayerNode as i } from "./renderIntlayerNode.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "7.1.7",
3
+ "version": "7.1.8",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -86,12 +86,12 @@
86
86
  "typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
87
87
  },
88
88
  "dependencies": {
89
- "@intlayer/api": "7.1.7",
90
- "@intlayer/config": "7.1.7",
91
- "@intlayer/core": "7.1.7",
92
- "@intlayer/editor": "7.1.7",
93
- "@intlayer/types": "7.1.7",
94
- "@intlayer/unmerged-dictionaries-entry": "7.1.7"
89
+ "@intlayer/api": "7.1.8",
90
+ "@intlayer/config": "7.1.8",
91
+ "@intlayer/core": "7.1.8",
92
+ "@intlayer/editor": "7.1.8",
93
+ "@intlayer/types": "7.1.8",
94
+ "@intlayer/unmerged-dictionaries-entry": "7.1.8"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@types/node": "24.10.1",
@@ -110,7 +110,7 @@
110
110
  "vue-tsc": "3.1.1"
111
111
  },
112
112
  "peerDependencies": {
113
- "intlayer": "7.1.7",
113
+ "intlayer": "7.1.8",
114
114
  "vue": ">=3.0.0"
115
115
  },
116
116
  "peerDependenciesMeta": {
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),_=require("@intlayer/core"),c=require("@intlayer/editor"),p=require("@intlayer/types"),h=require("./ContentSelector.vue_vue_type_script_setup_true_lang-87sjUiJI.js"),E=require("./cjs/editor/communicator.cjs"),f=require("./cjs/editor/editorEnabled.cjs"),v=require("./cjs/editor/focusDictionary.cjs"),m=require("./cjs/editor/useEditor.cjs"),C=e.defineComponent({__name:"ContentSelectorWrapper",props:{dictionaryKey:{},keyPath:{},plugins:{},locale:{},dictionaryPath:{},children:{}},setup(i){const t=i,o=v.useFocusDictionary(),a=f.useEditorEnabled(),s=E.useCommunicator();m.useEditor();const r=e.computed(()=>t.keyPath.filter(n=>n.type!==p.NodeType.Translation)),u=e.computed(()=>o?.focusedContent.value?.dictionaryKey===t.dictionaryKey&&(o?.focusedContent.value.keyPath?.length??0)>0&&_.isSameKeyPath(o?.focusedContent.value.keyPath??[],r.value)),d=()=>{o?.setFocusedContent({dictionaryKey:t.dictionaryKey,keyPath:r.value})},l=()=>{s?.postMessage({type:`${c.MessageKey.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,data:{dictionaryKey:t.dictionaryKey,keyPath:r.value}})},y=()=>{s?.postMessage({type:`${c.MessageKey.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,data:null})};return(n,K)=>e.unref(a)?.enabled.value?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,onPress:d,isSelecting:u.value,onHover:l,onUnhover:y},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["isSelecting"])):e.renderSlot(n.$slots,"default",{key:1})}});exports._sfc_main=C;