lit-intlayer 9.5.10 → 9.5.12
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/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/esm/client/useDictionary.mjs +2 -2
- package/dist/esm/client/useDictionaryDynamic.mjs +2 -2
- package/dist/esm/client/useIntlayer.mjs +2 -2
- package/dist/esm/plugins.mjs +46 -46
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/renderIntlayerNode.d.ts +11 -9
- package/dist/types/renderIntlayerNode.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-tZQDhvqk.js"),t=require("../getDictionary.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-tZQDhvqk.js"),t=require("../getDictionary.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/core/interpreter"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=e.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=e=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?t.getDictionary(a,e):t.getDictionary(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:e,contextVariant:s.variant,dictionaryKey:a.key})),u=l(c??s.locale??(0,r.resolveInterpreterLocale)());s.subscribe(e=>{u=l(c??e)});let d,f=new Proxy({},{get(e,t){if(t===`observe`)return d;if(t===Symbol.toPrimitive)return()=>u?.[Symbol.toPrimitive]?.()??``;if(t===`toString`)return()=>String(u?.toString?.()??``);if(t!==`then`&&u!=null)return u[t]}});return d=e=>(new n.IntlayerBinding(e),f),f};exports.useDictionary=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-tZQDhvqk.js"),t=require("../getDictionary.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-tZQDhvqk.js"),t=require("../getDictionary.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/core/interpreter"),i=require("@intlayer/core/dictionaryManipulator");var a=new Map,o=async(e,t)=>{if(!t)return;if(a.has(e))return a.get(e);let n=await t();return a.set(e,n),n},s=new Proxy(()=>{},{get:(e,t)=>{if(t===Symbol.toPrimitive||t===`toString`)return()=>``;if(t!==`then`&&!(typeof t==`string`&&t.startsWith(`_$`))&&t!==`nodeType`&&t!==Symbol.iterator)return s},apply:()=>s,construct:()=>({})}),c=(c,l,u)=>{let d=e.r(),f=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,i.isQualifiedDynamicLoaderMap)(c),{locale:p,selector:m}=process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?{locale:u,selector:void 0}:(0,i.parseDictionarySelector)((0,i.resolveDictionaryArgument)({localeOrSelector:u,contextLocale:d.locale,contextVariant:d.variant,dictionaryKey:String(l)})),h=()=>p??d.locale??(0,r.resolveInterpreterLocale)(),g,_=new Set,v=()=>{for(let e of _)e()},y=e=>{if(f){(0,i.resolveQualifiedDynamicContentAsync)({loaderMap:c,key:String(l),locale:e,selector:m,transform:n=>t.getDictionary(n,e)}).then(e=>{g=e,v()});return}let n=`${String(l)}.${e}`,r=(0,i.getPreloadedDictionary)(c,e);if(r){a.set(n,r),g=t.getDictionary(r,e),v();return}let s=c[e];o(n,s).then(n=>{n&&(g=t.getDictionary(n,e),v())})};y(h()),d.subscribe(e=>{y(p??e)});let b,x=new Proxy({},{get(e,t){if(t===`observe`)return b;if(t===Symbol.toPrimitive)return()=>void 0;if(t===`toString`)return()=>``;if(t!==`then`)return g==null?s:g[t]}});return b=e=>{let t=()=>e.requestUpdate();return _.add(t),new n.IntlayerBinding(e,()=>{g!=null&&e.requestUpdate()},()=>{_.delete(t)}),x},x};exports.useDictionaryDynamic=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-tZQDhvqk.js"),t=require("../getIntlayer.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-tZQDhvqk.js"),t=require("../getIntlayer.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/core/interpreter"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=e.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=e=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?t.getIntlayer(a,e):t.getIntlayer(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:e,contextVariant:s.variant,dictionaryKey:a})),u,d,f=!1,p=new Proxy({},{get(e,t){if(t===`observe`)return e=>(new n.IntlayerBinding(e),p);if(t===Symbol.toPrimitive||t===`toString`)return()=>``;if(t===`then`||typeof t==`symbol`||typeof t==`string`&&t.startsWith(`_$`))return;let i=c??s.locale??(0,r.resolveInterpreterLocale)();if((!f||u!==i)&&(d=l(i),u=i,f=!0),d!=null)return d[t]}});return p};exports.useIntlayer=a;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));const c=require("../installIntlayer-tZQDhvqk.js"),l=require("./markdown/runtime.cjs"),u=require("./renderIntlayerNode.cjs");let d=require("@intlayer/core/interpreter"),f=require("@intlayer/config/built"),p=require("@intlayer/core/markdown"),m=require("@intlayer/core/utils"),h=require("@intlayer/types/nodeType");h=s(h);let g=require("lit/directives/unsafe-html.js"),_=require("lit/static-html.js");var v=(e=``,t={})=>(0,p.compileWithOptions)(e,l.default,t),y=(e,t,n={})=>{let r=typeof e==`string`?(0,g.unsafeHTML)(e):e,i=Array.isArray(r),a=Object.assign(i?[...r]:{...r},n,{value:t,raw:t,[Symbol.iterator]:void 0,__update:()=>{},isJSX:!0});return Object.setPrototypeOf(a,(0,m.getIntlayerNodePrototype)(t,i?Array.prototype:Object.prototype))},b=e=>e.replace(/&/g,`&`).replace(/"/g,`"`),x=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),S={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,keyPath:n,dictionaryKey:r})=>{if(process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled){let e=String(t??``);return y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(n??[]))}" dictionary-key="${b(String(r??``))}">${x(e)}</intlayer-content-selector-wrapper>`,e)}return u.renderIntlayerNode({value:t,children:t})}},C=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?d.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===h.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:h.INSERTION}],i=e[h.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,d.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,d.isInterpolableWrapperNode)(e))return i=>(0,d.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=(0,d.splitInsertionTemplate)(i,e),o=a.isSimple?a.parts:a.parts.join(``);return r(o,{...n,plugins:t.plugins,children:o})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return(0,d.resolveInsertedSelector)(i,o)}},w=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?d.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,{keyPath:a,dictionaryKey:o}=i,s=n((0,p.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>u.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),c=v(e),l=t=>{let n=v(e,{components:t});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(a??[]))}" dictionary-key="${b(String(o??``))}">${n}</intlayer-content-selector-wrapper>`,e):y(n,e)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(a??[]))}" dictionary-key="${b(String(o??``))}">${c}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:l}):y(c,e,{metadata:s,use:l})}},T=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?d.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===h.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:h.MARKDOWN}],i=e[h.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[w,...t.plugins??[]]})}},E=process.env.INTLAYER_NODE_TYPE_HTML===`false`?d.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===h.HTML,transform:(e,t)=>{let n=e[h.HTML],{keyPath:r,dictionaryKey:i}=t,a=(e={})=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e).map(([e,t])=>[e,e=>t(e)])),a=new Proxy(t,{get(e,t){if(typeof t==`string`&&t in e)return e[t];if(typeof t==`string`&&/^[a-z][a-z0-9]*$/.test(t))return e=>_.html`<${(0,_.unsafeStatic)(t)} ...${e}>${e.children}</${(0,_.unsafeStatic)(t)}>`}}),o=(0,d.getHTML)(n,a);return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(r??[]))}" dictionary-key="${b(String(i??``))}">${o}</intlayer-content-selector-wrapper>`,n):y(o,n)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(r??[]))}" dictionary-key="${b(String(i??``))}">${n}</intlayer-content-selector-wrapper>`,n,{use:a}):y(n,n,{use:a})}},D=new Map,O=(e,t=!0)=>{let n=e??(typeof window<`u`&&c.r()?.locale)??
|
|
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,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));const c=require("../installIntlayer-tZQDhvqk.js"),l=require("./markdown/runtime.cjs"),u=require("./renderIntlayerNode.cjs");let d=require("@intlayer/core/interpreter"),f=require("@intlayer/config/built"),p=require("@intlayer/core/markdown"),m=require("@intlayer/core/utils"),h=require("@intlayer/types/nodeType");h=s(h);let g=require("lit/directives/unsafe-html.js"),_=require("lit/static-html.js");var v=(e=``,t={})=>(0,p.compileWithOptions)(e,l.default,t),y=(e,t,n={})=>{let r=typeof e==`string`?(0,g.unsafeHTML)(e):e,i=Array.isArray(r),a=Object.assign(i?[...r]:{...r},n,{value:t,raw:t,[Symbol.iterator]:void 0,__update:()=>{},isJSX:!0});return Object.setPrototypeOf(a,(0,m.getIntlayerNodePrototype)(t,i?Array.prototype:Object.prototype))},b=e=>e.replace(/&/g,`&`).replace(/"/g,`"`),x=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),S={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,keyPath:n,dictionaryKey:r})=>{if(process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled){let e=String(t??``);return y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(n??[]))}" dictionary-key="${b(String(r??``))}">${x(e)}</intlayer-content-selector-wrapper>`,e)}return u.renderIntlayerNode({value:t,children:t})}},C=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?d.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===h.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:h.INSERTION}],i=e[h.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,d.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,d.isInterpolableWrapperNode)(e))return i=>(0,d.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=(0,d.splitInsertionTemplate)(i,e),o=a.isSimple?a.parts:a.parts.join(``);return r(o,{...n,plugins:t.plugins,children:o})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return(0,d.resolveInsertedSelector)(i,o)}},w=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?d.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,{keyPath:a,dictionaryKey:o}=i,s=n((0,p.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>u.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),c=v(e),l=t=>{let n=v(e,{components:t});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(a??[]))}" dictionary-key="${b(String(o??``))}">${n}</intlayer-content-selector-wrapper>`,e):y(n,e)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(a??[]))}" dictionary-key="${b(String(o??``))}">${c}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:l}):y(c,e,{metadata:s,use:l})}},T=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?d.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===h.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:h.MARKDOWN}],i=e[h.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[w,...t.plugins??[]]})}},E=process.env.INTLAYER_NODE_TYPE_HTML===`false`?d.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===h.HTML,transform:(e,t)=>{let n=e[h.HTML],{keyPath:r,dictionaryKey:i}=t,a=(e={})=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e).map(([e,t])=>[e,e=>t(e)])),a=new Proxy(t,{get(e,t){if(typeof t==`string`&&t in e)return e[t];if(typeof t==`string`&&/^[a-z][a-z0-9]*$/.test(t))return e=>_.html`<${(0,_.unsafeStatic)(t)} ...${e}>${e.children}</${(0,_.unsafeStatic)(t)}>`}}),o=(0,d.getHTML)(n,a);return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(r??[]))}" dictionary-key="${b(String(i??``))}">${o}</intlayer-content-selector-wrapper>`,n):y(o,n)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?y(`<intlayer-content-selector-wrapper key-path="${b(JSON.stringify(r??[]))}" dictionary-key="${b(String(i??``))}">${n}</intlayer-content-selector-wrapper>`,n,{use:a}):y(n,n,{use:a})}},D=new Map,O=(e,t=!0)=>{let n=e??(typeof window<`u`&&c.r()?.locale)??(0,d.resolveInterpreterLocale)(),r=`${n}_${t}`;if(D.has(r))return D.get(r);let i=[S,(0,d.translationPlugin)(n,t?f.internationalization.defaultLocale:void 0),d.enumerationPlugin,(0,d.pluralPlugin)(n),d.conditionPlugin,(0,d.nestedPlugin)(n),d.filePlugin,d.genderPlugin,d.selectPlugin,C,T,E].filter(e=>e!==d.fallbackPlugin);return D.set(r,i),i};exports.getPlugins=O,exports.htmlPlugin=E,exports.insertionPlugin=C,exports.intlayerNodePlugins=S,exports.markdownPlugin=T,exports.markdownStringPlugin=w;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as e } from "../../installIntlayer-fyL4SuHX.mjs";
|
|
2
2
|
import { getDictionary as t } from "../getDictionary.mjs";
|
|
3
3
|
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveInterpreterLocale as r } from "@intlayer/core/interpreter";
|
|
5
5
|
import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
|
|
6
6
|
//#region src/client/useDictionary.ts
|
|
7
7
|
var a = (a, o) => {
|
|
@@ -10,7 +10,7 @@ var a = (a, o) => {
|
|
|
10
10
|
contextLocale: e,
|
|
11
11
|
contextVariant: s.variant,
|
|
12
12
|
dictionaryKey: a.key
|
|
13
|
-
})), u = l(c ?? s.locale ?? r
|
|
13
|
+
})), u = l(c ?? s.locale ?? r());
|
|
14
14
|
s.subscribe((e) => {
|
|
15
15
|
u = l(c ?? e);
|
|
16
16
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as e } from "../../installIntlayer-fyL4SuHX.mjs";
|
|
2
2
|
import { getDictionary as t } from "../getDictionary.mjs";
|
|
3
3
|
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveInterpreterLocale as r } from "@intlayer/core/interpreter";
|
|
5
5
|
import { getPreloadedDictionary as i, isQualifiedDynamicLoaderMap as a, parseDictionarySelector as o, resolveDictionaryArgument as s, resolveQualifiedDynamicContentAsync as c } from "@intlayer/core/dictionaryManipulator";
|
|
6
6
|
//#region src/client/useDictionaryDynamic.ts
|
|
7
7
|
var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
|
|
@@ -25,7 +25,7 @@ var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
|
|
|
25
25
|
contextLocale: h.locale,
|
|
26
26
|
contextVariant: h.variant,
|
|
27
27
|
dictionaryKey: String(p)
|
|
28
|
-
})), y = () => _ ?? h.locale ?? r
|
|
28
|
+
})), y = () => _ ?? h.locale ?? r(), b, x = /* @__PURE__ */ new Set(), S = () => {
|
|
29
29
|
for (let e of x) e();
|
|
30
30
|
}, C = (e) => {
|
|
31
31
|
if (g) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as e } from "../../installIntlayer-fyL4SuHX.mjs";
|
|
2
2
|
import { getIntlayer as t } from "../getIntlayer.mjs";
|
|
3
3
|
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveInterpreterLocale as r } from "@intlayer/core/interpreter";
|
|
5
5
|
import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
|
|
6
6
|
//#region src/client/useIntlayer.ts
|
|
7
7
|
var a = (a, o) => {
|
|
@@ -14,7 +14,7 @@ var a = (a, o) => {
|
|
|
14
14
|
if (t === "observe") return (e) => (new n(e), p);
|
|
15
15
|
if (t === Symbol.toPrimitive || t === "toString") return () => "";
|
|
16
16
|
if (t === "then" || typeof t == "symbol" || typeof t == "string" && t.startsWith("_$")) return;
|
|
17
|
-
let i = c ?? s.locale ?? r
|
|
17
|
+
let i = c ?? s.locale ?? r();
|
|
18
18
|
if ((!f || u !== i) && (d = l(i), u = i, f = !0), d != null) return d[t];
|
|
19
19
|
} });
|
|
20
20
|
return p;
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { r as e } from "../installIntlayer-fyL4SuHX.mjs";
|
|
2
2
|
import t from "./markdown/runtime.mjs";
|
|
3
3
|
import { renderIntlayerNode as n } from "./renderIntlayerNode.mjs";
|
|
4
|
-
import { conditionPlugin as r, enumerationPlugin as i, fallbackPlugin as a, filePlugin as o, genderPlugin as s, getHTML as c, isInterpolableWrapperNode as l, nestedPlugin as u, pluralPlugin as d, resolveInsertedSelector as f,
|
|
5
|
-
import { editor as
|
|
6
|
-
import { compileWithOptions as
|
|
7
|
-
import { getIntlayerNodePrototype as
|
|
8
|
-
import * as
|
|
9
|
-
import { unsafeHTML as
|
|
10
|
-
import { html as
|
|
4
|
+
import { conditionPlugin as r, enumerationPlugin as i, fallbackPlugin as a, filePlugin as o, genderPlugin as s, getHTML as c, isInterpolableWrapperNode as l, nestedPlugin as u, pluralPlugin as d, resolveInsertedSelector as f, resolveInterpreterLocale as p, selectPlugin as m, splitInsertionTemplate as h, transformInterpolableNode as g, translationPlugin as _ } from "@intlayer/core/interpreter";
|
|
5
|
+
import { editor as v, internationalization as y } from "@intlayer/config/built";
|
|
6
|
+
import { compileWithOptions as b, getMarkdownMetadata as x } from "@intlayer/core/markdown";
|
|
7
|
+
import { getIntlayerNodePrototype as S } from "@intlayer/core/utils";
|
|
8
|
+
import * as C from "@intlayer/types/nodeType";
|
|
9
|
+
import { unsafeHTML as w } from "lit/directives/unsafe-html.js";
|
|
10
|
+
import { html as T, unsafeStatic as E } from "lit/static-html.js";
|
|
11
11
|
//#region src/plugins.ts
|
|
12
|
-
var
|
|
13
|
-
let r = typeof e == "string" ?
|
|
12
|
+
var D = (e = "", n = {}) => b(e, t, n), O = (e, t, n = {}) => {
|
|
13
|
+
let r = typeof e == "string" ? w(e) : e, i = Array.isArray(r), a = Object.assign(i ? [...r] : { ...r }, n, {
|
|
14
14
|
value: t,
|
|
15
15
|
raw: t,
|
|
16
16
|
[Symbol.iterator]: void 0,
|
|
17
17
|
__update: () => {},
|
|
18
18
|
isJSX: !0
|
|
19
19
|
});
|
|
20
|
-
return Object.setPrototypeOf(a,
|
|
21
|
-
},
|
|
20
|
+
return Object.setPrototypeOf(a, S(t, i ? Array.prototype : Object.prototype));
|
|
21
|
+
}, k = (e) => e.replace(/&/g, "&").replace(/"/g, """), A = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), j = {
|
|
22
22
|
id: "intlayer-node-plugin",
|
|
23
23
|
canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
|
|
24
24
|
transform: (e, { children: t, keyPath: r, dictionaryKey: i }) => {
|
|
25
|
-
if (process.env.INTLAYER_EDITOR_ENABLED !== "false" &&
|
|
25
|
+
if (process.env.INTLAYER_EDITOR_ENABLED !== "false" && v.enabled) {
|
|
26
26
|
let e = String(t ?? "");
|
|
27
|
-
return
|
|
27
|
+
return O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(r ?? []))}" dictionary-key="${k(String(i ?? ""))}">${A(e)}</intlayer-content-selector-wrapper>`, e);
|
|
28
28
|
}
|
|
29
29
|
return n({
|
|
30
30
|
value: t,
|
|
31
31
|
children: t
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, M = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? a : {
|
|
35
35
|
id: "insertion-plugin",
|
|
36
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
36
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === C.INSERTION,
|
|
37
37
|
transform: (e, t, n) => {
|
|
38
|
-
let r = [...t.keyPath, { type:
|
|
38
|
+
let r = [...t.keyPath, { type: C.INSERTION }], i = e[C.INSERTION], a = {
|
|
39
39
|
id: "insertion-string-plugin",
|
|
40
40
|
canHandle: (e) => typeof e == "string" || l(e),
|
|
41
41
|
transform: (e, n, r) => {
|
|
42
|
-
if (l(e)) return (i) =>
|
|
42
|
+
if (l(e)) return (i) => g(e, i, n, t.plugins, r);
|
|
43
43
|
let i = r(e, {
|
|
44
44
|
...n,
|
|
45
45
|
children: e,
|
|
46
46
|
plugins: (t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")
|
|
47
47
|
});
|
|
48
48
|
return (e) => {
|
|
49
|
-
let a =
|
|
49
|
+
let a = h(i, e), o = a.isSimple ? a.parts : a.parts.join("");
|
|
50
50
|
return r(o, {
|
|
51
51
|
...n,
|
|
52
52
|
plugins: t.plugins,
|
|
@@ -62,11 +62,11 @@ var E = (e = "", n = {}) => y(e, t, n), D = (e, t, n = {}) => {
|
|
|
62
62
|
});
|
|
63
63
|
return f(i, o);
|
|
64
64
|
}
|
|
65
|
-
},
|
|
65
|
+
}, N = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? a : {
|
|
66
66
|
id: "markdown-string-plugin",
|
|
67
67
|
canHandle: (e) => typeof e == "string",
|
|
68
68
|
transform: (e, t, r) => {
|
|
69
|
-
let { plugins: i, ...a } = t, { keyPath: o, dictionaryKey: s } = a, c = r(
|
|
69
|
+
let { plugins: i, ...a } = t, { keyPath: o, dictionaryKey: s } = a, c = r(x(e) ?? {}, {
|
|
70
70
|
plugins: [{
|
|
71
71
|
id: "markdown-metadata-plugin",
|
|
72
72
|
canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
|
|
@@ -78,61 +78,61 @@ var E = (e = "", n = {}) => y(e, t, n), D = (e, t, n = {}) => {
|
|
|
78
78
|
}],
|
|
79
79
|
dictionaryKey: a.dictionaryKey,
|
|
80
80
|
keyPath: []
|
|
81
|
-
}), l =
|
|
82
|
-
let n =
|
|
83
|
-
return process.env.INTLAYER_EDITOR_ENABLED !== "false" &&
|
|
81
|
+
}), l = D(e), u = (t) => {
|
|
82
|
+
let n = D(e, { components: t });
|
|
83
|
+
return process.env.INTLAYER_EDITOR_ENABLED !== "false" && v.enabled ? O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(o ?? []))}" dictionary-key="${k(String(s ?? ""))}">${n}</intlayer-content-selector-wrapper>`, e) : O(n, e);
|
|
84
84
|
};
|
|
85
|
-
return process.env.INTLAYER_EDITOR_ENABLED !== "false" &&
|
|
85
|
+
return process.env.INTLAYER_EDITOR_ENABLED !== "false" && v.enabled ? O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(o ?? []))}" dictionary-key="${k(String(s ?? ""))}">${l}</intlayer-content-selector-wrapper>`, e, {
|
|
86
86
|
metadata: c,
|
|
87
87
|
use: u
|
|
88
|
-
}) :
|
|
88
|
+
}) : O(l, e, {
|
|
89
89
|
metadata: c,
|
|
90
90
|
use: u
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, P = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? a : {
|
|
94
94
|
id: "markdown-plugin",
|
|
95
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
95
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === C.MARKDOWN,
|
|
96
96
|
transform: (e, t, n) => {
|
|
97
|
-
let r = [...t.keyPath, { type:
|
|
97
|
+
let r = [...t.keyPath, { type: C.MARKDOWN }], i = e[C.MARKDOWN];
|
|
98
98
|
return n(i, {
|
|
99
99
|
...t,
|
|
100
100
|
children: i,
|
|
101
101
|
keyPath: r,
|
|
102
|
-
plugins: [
|
|
102
|
+
plugins: [N, ...t.plugins ?? []]
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
},
|
|
105
|
+
}, F = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? a : {
|
|
106
106
|
id: "html-plugin",
|
|
107
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
107
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === C.HTML,
|
|
108
108
|
transform: (e, t) => {
|
|
109
|
-
let n = e[
|
|
109
|
+
let n = e[C.HTML], { keyPath: r, dictionaryKey: i } = t, a = (e = {}) => {
|
|
110
110
|
let t = Object.fromEntries(Object.entries(e).filter(([, e]) => e).map(([e, t]) => [e, (e) => t(e)])), a = new Proxy(t, { get(e, t) {
|
|
111
111
|
if (typeof t == "string" && t in e) return e[t];
|
|
112
|
-
if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return (e) =>
|
|
112
|
+
if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return (e) => T`<${E(t)} ...${e}>${e.children}</${E(t)}>`;
|
|
113
113
|
} }), o = c(n, a);
|
|
114
|
-
return process.env.INTLAYER_EDITOR_ENABLED !== "false" &&
|
|
114
|
+
return process.env.INTLAYER_EDITOR_ENABLED !== "false" && v.enabled ? O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(r ?? []))}" dictionary-key="${k(String(i ?? ""))}">${o}</intlayer-content-selector-wrapper>`, n) : O(o, n);
|
|
115
115
|
};
|
|
116
|
-
return process.env.INTLAYER_EDITOR_ENABLED !== "false" &&
|
|
116
|
+
return process.env.INTLAYER_EDITOR_ENABLED !== "false" && v.enabled ? O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(r ?? []))}" dictionary-key="${k(String(i ?? ""))}">${n}</intlayer-content-selector-wrapper>`, n, { use: a }) : O(n, n, { use: a });
|
|
117
117
|
}
|
|
118
|
-
},
|
|
119
|
-
let c = t ?? (typeof window < "u" && e()?.locale) ??
|
|
120
|
-
if (
|
|
118
|
+
}, I = /* @__PURE__ */ new Map(), L = (t, n = !0) => {
|
|
119
|
+
let c = t ?? (typeof window < "u" && e()?.locale) ?? p(), l = `${c}_${n}`;
|
|
120
|
+
if (I.has(l)) return I.get(l);
|
|
121
121
|
let f = [
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
j,
|
|
123
|
+
_(c, n ? y.defaultLocale : void 0),
|
|
124
124
|
i,
|
|
125
125
|
d(c),
|
|
126
126
|
r,
|
|
127
127
|
u(c),
|
|
128
128
|
o,
|
|
129
129
|
s,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
m,
|
|
131
|
+
M,
|
|
132
|
+
P,
|
|
133
|
+
F
|
|
134
134
|
].filter((e) => e !== a);
|
|
135
|
-
return
|
|
135
|
+
return I.set(l, f), f;
|
|
136
136
|
};
|
|
137
137
|
//#endregion
|
|
138
|
-
export {
|
|
138
|
+
export { L as getPlugins, F as htmlPlugin, M as insertionPlugin, j as intlayerNodePlugins, P as markdownPlugin, N as markdownStringPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionaryDynamic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionaryDynamic.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,yBAAyB,EAG/B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAkD3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,CAAC,CAAC,SAAS,UAAU,EAC1B,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAE7E,mBACI,mBAAmB,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GACrC,yBAAyB,EAC7B,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAyIrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/plugins.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,IAAI,wBAAwB,EAMrD,KAAK,uBAAuB,IAAI,2BAA2B,EAG3D,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/plugins.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { ResolvedEditor } from '@intlayer/types/module_augmentation';
|
|
2
|
-
|
|
2
|
+
type IntlayerNodeMembers<T> = {
|
|
3
3
|
raw: T;
|
|
4
4
|
value: T;
|
|
5
5
|
toString: () => string;
|
|
6
6
|
valueOf: () => T;
|
|
7
7
|
toJSON: () => T;
|
|
8
8
|
__update: (next: IntlayerNode<T>) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Content node returned by `useIntlayer`.
|
|
12
|
+
*
|
|
13
|
+
* Without the editor it is typed as its value plus the node members, so it
|
|
14
|
+
* can be used wherever a string is expected. With the editor, the node renders the editor wrapper,
|
|
15
|
+
* so string usages must go through `.value`.
|
|
16
|
+
*/
|
|
17
|
+
export type IntlayerNode<T = string> = ResolvedEditor<T & IntlayerNodeMembers<T>, IntlayerNodeMembers<T>>;
|
|
17
18
|
export declare const renderIntlayerNode: <T>({ value, additionalProps, }: {
|
|
18
19
|
value: T;
|
|
19
20
|
children?: any;
|
|
20
21
|
additionalProps?: Record<string, unknown>;
|
|
21
22
|
[key: string]: unknown;
|
|
22
23
|
}) => IntlayerNode<T>;
|
|
24
|
+
export {};
|
|
23
25
|
//# sourceMappingURL=renderIntlayerNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderIntlayerNode.d.ts","sourceRoot":"","sources":["../../src/renderIntlayerNode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,
|
|
1
|
+
{"version":3,"file":"renderIntlayerNode.d.ts","sourceRoot":"","sources":["../../src/renderIntlayerNode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,KAAK,mBAAmB,CAAC,CAAC,IAAI;IAC5B,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,MAAM,IAAI,cAAc,CACnD,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,EAC1B,mBAAmB,CAAC,CAAC,CAAC,CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,CAAC,EACD,6BAGC;IACD,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,KAAG,YAAY,CAAC,CAAC,CAuCjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lit-intlayer",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Lit applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -104,11 +104,11 @@
|
|
|
104
104
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@intlayer/api": "9.5.
|
|
108
|
-
"@intlayer/config": "9.5.
|
|
109
|
-
"@intlayer/core": "9.5.
|
|
110
|
-
"@intlayer/editor": "9.5.
|
|
111
|
-
"@intlayer/types": "9.5.
|
|
107
|
+
"@intlayer/api": "9.5.12",
|
|
108
|
+
"@intlayer/config": "9.5.12",
|
|
109
|
+
"@intlayer/core": "9.5.12",
|
|
110
|
+
"@intlayer/editor": "9.5.12",
|
|
111
|
+
"@intlayer/types": "9.5.12"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@types/node": "^22",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"vitest": "5.0.2"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"intlayer": "9.5.
|
|
128
|
+
"intlayer": "9.5.12",
|
|
129
129
|
"lit": ">=3.0.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|