lit-intlayer 9.7.1 → 9.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/index.cjs +1 -1
- package/dist/cjs/plugins.cjs +3 -1
- package/dist/esm/client/useDictionary.mjs +7 -7
- package/dist/esm/client/useDictionaryDynamic.mjs +14 -14
- package/dist/esm/client/useIntlayer.mjs +11 -11
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/plugins.mjs +28 -26
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/html/HTMLRenderer.d.ts +1 -1
- package/dist/types/html/HTMLRenderer.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/package.json +49 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("../../installIntlayer-Btnci_ES.js"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/core/dictionaryManipulator"),i=require("@intlayer/core/interpreter");var a=(a,o)=>{let s=t.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=t=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getDictionary(a,t):e.getDictionary(a,(0,r.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:t,contextVariant:s.variant,dictionaryKey:a.key})),u=l(c??s.locale??(0,i.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("../getDictionary.cjs"),t=require("
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("../../installIntlayer-Btnci_ES.js"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/core/dictionaryManipulator"),i=require("@intlayer/core/interpreter");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=t.r(),f=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,r.isQualifiedDynamicLoaderMap)(c),{locale:p,selector:m}=process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?{locale:u,selector:void 0}:(0,r.parseDictionarySelector)((0,r.resolveDictionaryArgument)({localeOrSelector:u,contextLocale:d.locale,contextVariant:d.variant,dictionaryKey:String(l)})),h=()=>p??d.locale??(0,i.resolveInterpreterLocale)(),g,_=new Set,v=()=>{for(let e of _)e()},y=t=>{if(f){(0,r.resolveQualifiedDynamicContentAsync)({loaderMap:c,key:String(l),locale:t,selector:m,transform:n=>e.getDictionary(n,t)}).then(e=>{g=e,v()});return}let n=`${String(l)}.${t}`,i=(0,r.getPreloadedDictionary)(c,t);if(i){a.set(n,i),g=e.getDictionary(i,t),v();return}let s=c[t];o(n,s).then(n=>{n&&(g=e.getDictionary(n,t),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("../getIntlayer.cjs"),t=require("
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getIntlayer.cjs"),t=require("../../installIntlayer-Btnci_ES.js"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/core/dictionaryManipulator"),i=require("@intlayer/core/interpreter");var a=(a,o)=>{let s=t.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=t=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getIntlayer(a,t):e.getIntlayer(a,(0,r.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:t,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 r=c??s.locale??(0,i.resolveInterpreterLocale)();if(f&&u===r||(d=l(r),u=r,f=!0),d!=null)return d[t]}});return p};exports.useIntlayer=a;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client/useLocaleStorage.cjs"),t=require("../installIntlayer-Btnci_ES.js"),n=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client/useLocaleStorage.cjs"),t=require("../installIntlayer-Btnci_ES.js"),n=require("./client/IntlayerBinding.cjs"),r=require("./getDictionary.cjs"),i=require("./getIntlayer.cjs"),a=require("./client/useDictionary.cjs"),o=require("./client/useDictionaryDynamic.cjs"),s=require("./plugins.cjs"),c=require("./client/useIntlayer.cjs"),l=require("./client/useLocale.cjs"),u=require("./client/useRewriteURL.cjs");require("./client/index.cjs"),exports.IntlayerBinding=n.IntlayerBinding,exports.IntlayerClient=t.t,exports.LocaleController=l.LocaleController,exports.createIntlayerClient=t.n,exports.getDictionary=r.getDictionary,exports.getIntlayer=i.getIntlayer,exports.getIntlayerClient=t.r,exports.getLocaleInStorage=e.getLocaleInStorage,exports.getPlugins=s.getPlugins,exports.htmlPlugin=s.htmlPlugin,exports.insertionPlugin=s.insertionPlugin,exports.installIntlayer=t.i,exports.intlayerNodePlugins=s.intlayerNodePlugins,exports.localeCookie=e.localeCookie,exports.localeInStorage=e.localeInStorage,exports.markdownPlugin=s.markdownPlugin,exports.markdownStringPlugin=s.markdownStringPlugin,exports.setLocaleCookie=e.setLocaleCookie,exports.setLocaleInStorage=e.setLocaleInStorage,exports.useDictionary=a.useDictionary,exports.useDictionaryDynamic=o.useDictionaryDynamic,exports.useEditor=t.a,exports.useIntlayer=c.useIntlayer,exports.useLocale=l.useLocale,exports.useLocaleCookie=e.useLocaleCookie,exports.useLocaleStorage=e.useLocaleStorage,exports.useRewriteURL=u.useRewriteURL;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1,3 @@
|
|
|
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-Btnci_ES.js"),l=require("./markdown/runtime.cjs"),u=require("./renderIntlayerNode.cjs");let d=require("@intlayer/config/built"),f=require("@intlayer/core/
|
|
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-Btnci_ES.js"),l=require("./markdown/runtime.cjs"),u=require("./renderIntlayerNode.cjs");let d=require("@intlayer/config/built"),f=require("@intlayer/core/utils"),p=require("@intlayer/core/interpreter"),m=require("@intlayer/core/markdown"),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,m.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,f.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`&&d.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`?p.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,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=(0,p.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,p.resolveInsertedSelector)(i,o)}},w=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,{keyPath:a,dictionaryKey:o}=i,s=n((0,m.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`&&d.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`&&d.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`?p.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`?p.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}
|
|
2
|
+
>${e.children}</${(0,_.unsafeStatic)(t)}
|
|
3
|
+
>`}}),o=(0,p.getHTML)(n,a);return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.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`&&d.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,p.resolveInterpreterLocale)(),r=`${n}_${t}`;if(D.has(r))return D.get(r);let i=[S,(0,p.translationPlugin)(n,t?d.internationalization.defaultLocale:void 0),p.enumerationPlugin,(0,p.pluralPlugin)(n),p.conditionPlugin,(0,p.nestedPlugin)(n),p.filePlugin,p.genderPlugin,p.selectPlugin,C,T,E].filter(e=>e!==p.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,16 +1,16 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { r as t } from "../../installIntlayer-Dvl7Prhw.mjs";
|
|
3
|
+
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
|
+
import { resolveDictionaryArgument as r } from "@intlayer/core/dictionaryManipulator";
|
|
5
|
+
import { resolveInterpreterLocale as i } from "@intlayer/core/interpreter";
|
|
6
6
|
// src/client/useDictionary.ts
|
|
7
7
|
var a = (a, o) => {
|
|
8
|
-
let s =
|
|
8
|
+
let s = t(), c = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof o == "object" && o ? o.locale : o, l = (t) => process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(a, t) : e(a, r({
|
|
9
9
|
localeOrSelector: o,
|
|
10
10
|
contextLocale: t,
|
|
11
11
|
contextVariant: s.variant,
|
|
12
12
|
dictionaryKey: a.key
|
|
13
|
-
})), u = l(c ?? s.locale ??
|
|
13
|
+
})), u = l(c ?? s.locale ?? i());
|
|
14
14
|
s.subscribe((e) => {
|
|
15
15
|
u = l(c ?? e);
|
|
16
16
|
});
|
|
@@ -20,6 +20,6 @@ var a = (a, o) => {
|
|
|
20
20
|
if (t === "toString") return () => String(u?.toString?.() ?? "");
|
|
21
21
|
if (t !== "then" && u != null) return u[t];
|
|
22
22
|
} });
|
|
23
|
-
return d = (e) => (new
|
|
23
|
+
return d = (e) => (new n(e), f), f;
|
|
24
24
|
};
|
|
25
25
|
export { a as useDictionary };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { r as t } from "../../installIntlayer-Dvl7Prhw.mjs";
|
|
3
|
+
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
|
+
import { getPreloadedDictionary as r, isQualifiedDynamicLoaderMap as i, parseDictionarySelector as a, resolveDictionaryArgument as o, resolveQualifiedDynamicContentAsync as s } from "@intlayer/core/dictionaryManipulator";
|
|
5
|
+
import { resolveInterpreterLocale as c } from "@intlayer/core/interpreter";
|
|
6
6
|
// src/client/useDictionaryDynamic.ts
|
|
7
7
|
var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
|
|
8
8
|
if (!t) return;
|
|
@@ -17,19 +17,19 @@ var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
|
|
|
17
17
|
apply: () => d,
|
|
18
18
|
construct: () => ({})
|
|
19
19
|
}), f = (f, p, m) => {
|
|
20
|
-
let h =
|
|
20
|
+
let h = t(), g = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && i(f), { locale: _, selector: v } = process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? {
|
|
21
21
|
locale: m,
|
|
22
22
|
selector: void 0
|
|
23
|
-
} : o(
|
|
23
|
+
} : a(o({
|
|
24
24
|
localeOrSelector: m,
|
|
25
25
|
contextLocale: h.locale,
|
|
26
26
|
contextVariant: h.variant,
|
|
27
27
|
dictionaryKey: String(p)
|
|
28
|
-
})), y = () => _ ?? h.locale ??
|
|
28
|
+
})), y = () => _ ?? h.locale ?? c(), b, x = /* @__PURE__ */ new Set(), S = () => {
|
|
29
29
|
for (let e of x) e();
|
|
30
30
|
}, C = (t) => {
|
|
31
31
|
if (g) {
|
|
32
|
-
|
|
32
|
+
s({
|
|
33
33
|
loaderMap: f,
|
|
34
34
|
key: String(p),
|
|
35
35
|
locale: t,
|
|
@@ -40,9 +40,9 @@ var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
|
|
|
40
40
|
});
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
let n = `${String(p)}.${t}`,
|
|
44
|
-
if (
|
|
45
|
-
l.set(n,
|
|
43
|
+
let n = `${String(p)}.${t}`, i = r(f, t);
|
|
44
|
+
if (i) {
|
|
45
|
+
l.set(n, i), b = e(i, t), S();
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
let a = f[t];
|
|
@@ -60,11 +60,11 @@ var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
|
|
|
60
60
|
if (t !== "then") return b == null ? d : b[t];
|
|
61
61
|
} });
|
|
62
62
|
return w = (e) => {
|
|
63
|
-
let
|
|
64
|
-
return x.add(
|
|
63
|
+
let t = () => e.requestUpdate();
|
|
64
|
+
return x.add(t), new n(e, () => {
|
|
65
65
|
b != null && e.requestUpdate();
|
|
66
66
|
}, () => {
|
|
67
|
-
x.delete(
|
|
67
|
+
x.delete(t);
|
|
68
68
|
}), T;
|
|
69
69
|
}, T;
|
|
70
70
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { getIntlayer as e } from "../getIntlayer.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { r as t } from "../../installIntlayer-Dvl7Prhw.mjs";
|
|
3
|
+
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
|
+
import { resolveDictionaryArgument as r } from "@intlayer/core/dictionaryManipulator";
|
|
5
|
+
import { resolveInterpreterLocale as i } from "@intlayer/core/interpreter";
|
|
6
6
|
// src/client/useIntlayer.ts
|
|
7
7
|
var a = (a, o) => {
|
|
8
|
-
let s =
|
|
8
|
+
let s = t(), c = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof o == "object" && o ? o.locale : o, l = (t) => process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(a, t) : e(a, r({
|
|
9
9
|
localeOrSelector: o,
|
|
10
10
|
contextLocale: t,
|
|
11
11
|
contextVariant: s.variant,
|
|
12
12
|
dictionaryKey: a
|
|
13
|
-
})), u, d, f = !1, p = new Proxy({}, { get(e,
|
|
14
|
-
if (
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
18
|
-
if (f && u ===
|
|
13
|
+
})), u, d, f = !1, p = new Proxy({}, { get(e, t) {
|
|
14
|
+
if (t === "observe") return (e) => (new n(e), p);
|
|
15
|
+
if (t === Symbol.toPrimitive || t === "toString") return () => "";
|
|
16
|
+
if (t === "then" || typeof t == "symbol" || typeof t == "string" && t.startsWith("_$")) return;
|
|
17
|
+
let r = c ?? s.locale ?? i();
|
|
18
|
+
if (f && u === r || (d = l(r), u = r, f = !0), d != null) return d[t];
|
|
19
19
|
} });
|
|
20
20
|
return p;
|
|
21
21
|
};
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getLocaleInStorage as e, localeCookie as t, localeInStorage as n, setLocaleCookie as r, setLocaleInStorage as i, useLocaleCookie as a, useLocaleStorage as o } from "./client/useLocaleStorage.mjs";
|
|
2
2
|
import { a as s, i as c, n as l, r as u, t as d } from "../installIntlayer-Dvl7Prhw.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { IntlayerBinding as f } from "./client/IntlayerBinding.mjs";
|
|
4
|
+
import { getDictionary as p } from "./getDictionary.mjs";
|
|
5
5
|
import { getIntlayer as m } from "./getIntlayer.mjs";
|
|
6
6
|
import { useDictionary as h } from "./client/useDictionary.mjs";
|
|
7
7
|
import { useDictionaryDynamic as g } from "./client/useDictionaryDynamic.mjs";
|
|
@@ -10,4 +10,4 @@ import { useIntlayer as C } from "./client/useIntlayer.mjs";
|
|
|
10
10
|
import { LocaleController as w, useLocale as T } from "./client/useLocale.mjs";
|
|
11
11
|
import { useRewriteURL as E } from "./client/useRewriteURL.mjs";
|
|
12
12
|
import "./client/index.mjs";
|
|
13
|
-
export {
|
|
13
|
+
export { f as IntlayerBinding, d as IntlayerClient, w as LocaleController, l as createIntlayerClient, p as getDictionary, m as getIntlayer, u as getIntlayerClient, e as getLocaleInStorage, _ as getPlugins, v as htmlPlugin, y as insertionPlugin, c as installIntlayer, b as intlayerNodePlugins, t as localeCookie, n as localeInStorage, x as markdownPlugin, S as markdownStringPlugin, r as setLocaleCookie, i as setLocaleInStorage, h as useDictionary, g as useDictionaryDynamic, s as useEditor, C as useIntlayer, T as useLocale, a as useLocaleCookie, o as useLocaleStorage, E as useRewriteURL };
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -2,22 +2,22 @@ import { r as e } from "../installIntlayer-Dvl7Prhw.mjs";
|
|
|
2
2
|
import t from "./markdown/runtime.mjs";
|
|
3
3
|
import { renderIntlayerNode as n } from "./renderIntlayerNode.mjs";
|
|
4
4
|
import { editor as r, internationalization as i } from "@intlayer/config/built";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { getIntlayerNodePrototype as a } from "@intlayer/core/utils";
|
|
6
|
+
import { conditionPlugin as o, enumerationPlugin as s, fallbackPlugin as c, filePlugin as l, genderPlugin as u, getHTML as d, isInterpolableWrapperNode as f, nestedPlugin as p, pluralPlugin as m, resolveInsertedSelector as h, resolveInterpreterLocale as g, selectPlugin as _, splitInsertionTemplate as v, transformInterpolableNode as y, translationPlugin as b } from "@intlayer/core/interpreter";
|
|
7
|
+
import { compileWithOptions as x, getMarkdownMetadata as S } from "@intlayer/core/markdown";
|
|
8
8
|
import * as C from "@intlayer/types/nodeType";
|
|
9
9
|
import { unsafeHTML as w } from "lit/directives/unsafe-html.js";
|
|
10
10
|
import { html as T, unsafeStatic as E } from "lit/static-html.js";
|
|
11
11
|
// src/plugins.ts
|
|
12
|
-
var D = (e = "", n = {}) =>
|
|
13
|
-
let r = typeof e == "string" ? w(e) : e, i = Array.isArray(r),
|
|
12
|
+
var D = (e = "", n = {}) => x(e, t, n), O = (e, t, n = {}) => {
|
|
13
|
+
let r = typeof e == "string" ? w(e) : e, i = Array.isArray(r), o = 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(
|
|
20
|
+
return Object.setPrototypeOf(o, a(t, i ? Array.prototype : Object.prototype));
|
|
21
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",
|
|
@@ -31,22 +31,22 @@ var D = (e = "", n = {}) => b(e, t, n), O = (e, t, n = {}) => {
|
|
|
31
31
|
children: t
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
}, M = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ?
|
|
34
|
+
}, M = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? c : {
|
|
35
35
|
id: "insertion-plugin",
|
|
36
36
|
canHandle: (e) => typeof e == "object" && e?.nodeType === C.INSERTION,
|
|
37
37
|
transform: (e, t, n) => {
|
|
38
38
|
let r = [...t.keyPath, { type: C.INSERTION }], i = e[C.INSERTION], a = {
|
|
39
39
|
id: "insertion-string-plugin",
|
|
40
|
-
canHandle: (e) => typeof e == "string" ||
|
|
40
|
+
canHandle: (e) => typeof e == "string" || f(e),
|
|
41
41
|
transform: (e, n, r) => {
|
|
42
|
-
if (
|
|
42
|
+
if (f(e)) return (i) => y(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 = v(i, e), o = a.isSimple ? a.parts : a.parts.join("");
|
|
50
50
|
return r(o, {
|
|
51
51
|
...n,
|
|
52
52
|
plugins: t.plugins,
|
|
@@ -60,13 +60,13 @@ var D = (e = "", n = {}) => b(e, t, n), O = (e, t, n = {}) => {
|
|
|
60
60
|
keyPath: r,
|
|
61
61
|
plugins: [a, ...t.plugins ?? []]
|
|
62
62
|
});
|
|
63
|
-
return
|
|
63
|
+
return h(i, o);
|
|
64
64
|
}
|
|
65
|
-
}, N = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ?
|
|
65
|
+
}, N = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? c : {
|
|
66
66
|
id: "markdown-string-plugin",
|
|
67
67
|
canHandle: (e) => typeof e == "string",
|
|
68
68
|
transform: (e, t, i) => {
|
|
69
|
-
let { plugins: a, ...o } = t, { keyPath: s, dictionaryKey: c } = o, l = i(
|
|
69
|
+
let { plugins: a, ...o } = t, { keyPath: s, dictionaryKey: c } = o, l = i(S(e) ?? {}, {
|
|
70
70
|
plugins: [{
|
|
71
71
|
id: "markdown-metadata-plugin",
|
|
72
72
|
canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
|
|
@@ -90,7 +90,7 @@ var D = (e = "", n = {}) => b(e, t, n), O = (e, t, n = {}) => {
|
|
|
90
90
|
use: d
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
}, P = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ?
|
|
93
|
+
}, P = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? c : {
|
|
94
94
|
id: "markdown-plugin",
|
|
95
95
|
canHandle: (e) => typeof e == "object" && e?.nodeType === C.MARKDOWN,
|
|
96
96
|
transform: (e, t, n) => {
|
|
@@ -102,36 +102,38 @@ var D = (e = "", n = {}) => b(e, t, n), O = (e, t, n = {}) => {
|
|
|
102
102
|
plugins: [N, ...t.plugins ?? []]
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
}, F = process.env.INTLAYER_NODE_TYPE_HTML === "false" ?
|
|
105
|
+
}, F = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? c : {
|
|
106
106
|
id: "html-plugin",
|
|
107
107
|
canHandle: (e) => typeof e == "object" && e?.nodeType === C.HTML,
|
|
108
108
|
transform: (e, t) => {
|
|
109
109
|
let n = e[C.HTML], { keyPath: i, dictionaryKey: a } = t, o = (e = {}) => {
|
|
110
110
|
let t = Object.fromEntries(Object.entries(e).filter(([, e]) => e).map(([e, t]) => [e, (e) => t(e)])), o = 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) => T`<${E(t)} ...${e}
|
|
113
|
-
|
|
112
|
+
if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return (e) => T`<${E(t)} ...${e}
|
|
113
|
+
>${e.children}</${E(t)}
|
|
114
|
+
>`;
|
|
115
|
+
} }), s = d(n, o);
|
|
114
116
|
return process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(i ?? []))}" dictionary-key="${k(String(a ?? ""))}">${s}</intlayer-content-selector-wrapper>`, n) : O(s, n);
|
|
115
117
|
};
|
|
116
118
|
return process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? O(`<intlayer-content-selector-wrapper key-path="${k(JSON.stringify(i ?? []))}" dictionary-key="${k(String(a ?? ""))}">${n}</intlayer-content-selector-wrapper>`, n, { use: o }) : O(n, n, { use: o });
|
|
117
119
|
}
|
|
118
120
|
}, I = /* @__PURE__ */ new Map(), L = (t, n = !0) => {
|
|
119
|
-
let r = t ?? (typeof window < "u" && e()?.locale) ??
|
|
120
|
-
if (I.has(
|
|
121
|
+
let r = t ?? (typeof window < "u" && e()?.locale) ?? g(), a = `${r}_${n}`;
|
|
122
|
+
if (I.has(a)) return I.get(a);
|
|
121
123
|
let d = [
|
|
122
124
|
j,
|
|
123
|
-
|
|
125
|
+
b(r, n ? i.defaultLocale : void 0),
|
|
126
|
+
s,
|
|
127
|
+
m(r),
|
|
124
128
|
o,
|
|
125
129
|
p(r),
|
|
126
|
-
a,
|
|
127
|
-
f(r),
|
|
128
|
-
c,
|
|
129
130
|
l,
|
|
130
|
-
|
|
131
|
+
u,
|
|
132
|
+
_,
|
|
131
133
|
M,
|
|
132
134
|
P,
|
|
133
135
|
F
|
|
134
|
-
].filter((e) => e !==
|
|
135
|
-
return I.set(
|
|
136
|
+
].filter((e) => e !== c);
|
|
137
|
+
return I.set(a, d), d;
|
|
136
138
|
};
|
|
137
139
|
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":"useDictionary.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EAEV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EAEV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,0BAA0B,CAAC,CAAC,CAAC,GAC3D,eAAe,EAEjB,YAAY,CAAC,EACb,mBAAmB,CAAC,KACnB,gBAAgB,CACjB,oBAAoB,CAClB,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,qBAAqB,CAAC,CAAC,CAAC,CACzB,CAmEF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAEvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAiD3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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":"useIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,GACtB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAE7E,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,gBAAgB,CACjB,oBAAoB,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAqE/E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,WAAW,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,WAAW,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,0BAA0B,CAAC,CAAC,CAAC,GAC3D,eAAe,EAEjB,YAAY,CAAC,EACb,mBAAmB,CAAC,KACnB,oBAAoB,CACrB,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,qBAAqB,CAAC,CAAC,CAAC,CAazB,CAAC"}
|
|
@@ -12,7 +12,7 @@ export declare const renderHTML: (content: string, _props?: RenderHTMLProps) =>
|
|
|
12
12
|
* Returns a render function that uses the global provider's configuration
|
|
13
13
|
* (installed via `installIntlayerHTML`), falling back to identity.
|
|
14
14
|
*/
|
|
15
|
-
export declare const useHTMLRenderer: ({ components
|
|
15
|
+
export declare const useHTMLRenderer: ({ components }?: RenderHTMLProps) => ((content: string) => string);
|
|
16
16
|
/**
|
|
17
17
|
* `<intlayer-html-renderer>` — renders an HTML string into the light DOM.
|
|
18
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLRenderer.d.ts","sourceRoot":"","sources":["../../../src/html/HTMLRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,cAAc,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,EACf,SAAQ,eAAoB,KAC3B,MAAiB,CAAC;AAErB;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,
|
|
1
|
+
{"version":3,"file":"HTMLRenderer.d.ts","sourceRoot":"","sources":["../../../src/html/HTMLRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,cAAc,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,EACf,SAAQ,eAAoB,KAC3B,MAAiB,CAAC;AAErB;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,iBAAgB,eAAoB,KAAG,CAAC,CACtE,OAAO,EAAE,MAAM,KACZ,MAAM,CAKV,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,OAAgB,UAAU;;;;;;;MAGxB;IAEF,iCAAiC;IACjC,OAAO,SAAM;IACb,kDAAkD;IAClD,UAAU,CAAC,EAAE,cAAc,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE9C,mEAAmE;IAC1D,gBAAgB;IAIhB,MAAM;CAMhB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,YAAY,CAAC;KACxC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,QAAQ,4BAA4B,CAAC;IAC1C,UAAU,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM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BAAoB,CAC9B,CAAC,EACD,CAAC,SAAS,aAAa,GAAG,eAAe,IACvC,wBAAwB,CAAC,CAAC,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC;AAI5D,eAAO,MAAM,UAAU,GACrB,SAAS,aAAa,EACtB,kBAAe,KACd,OAAO,EAsCT,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lit-intlayer",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Lit applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
7
|
-
"intlayer",
|
|
8
7
|
"data",
|
|
8
|
+
"i18n",
|
|
9
9
|
"internationalization",
|
|
10
|
+
"intlayer",
|
|
11
|
+
"json",
|
|
12
|
+
"lit",
|
|
10
13
|
"multilingual",
|
|
11
|
-
"i18n",
|
|
12
14
|
"typescript",
|
|
13
|
-
"lit",
|
|
14
|
-
"web-components",
|
|
15
15
|
"vite",
|
|
16
|
-
"
|
|
16
|
+
"web-components"
|
|
17
17
|
],
|
|
18
18
|
"homepage": "https://intlayer.org",
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
21
21
|
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
25
|
-
},
|
|
26
22
|
"license": "Apache-2.0",
|
|
27
23
|
"author": {
|
|
28
24
|
"name": "Aymeric PINEAU",
|
|
@@ -35,7 +31,37 @@
|
|
|
35
31
|
"url": "https://github.com/aymericzip"
|
|
36
32
|
}
|
|
37
33
|
],
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"./dist",
|
|
40
|
+
"./package.json"
|
|
41
|
+
],
|
|
38
42
|
"sideEffects": false,
|
|
43
|
+
"main": "dist/cjs/index.cjs",
|
|
44
|
+
"module": "dist/esm/index.mjs",
|
|
45
|
+
"types": "dist/types/index.d.ts",
|
|
46
|
+
"typesVersions": {
|
|
47
|
+
"*": {
|
|
48
|
+
".": [
|
|
49
|
+
"./dist/types/index.d.ts"
|
|
50
|
+
],
|
|
51
|
+
"html": [
|
|
52
|
+
"./dist/types/html/index.d.ts"
|
|
53
|
+
],
|
|
54
|
+
"markdown": [
|
|
55
|
+
"./dist/types/markdown/index.d.ts"
|
|
56
|
+
],
|
|
57
|
+
"format": [
|
|
58
|
+
"./dist/types/format/index.d.ts"
|
|
59
|
+
],
|
|
60
|
+
"package.json": [
|
|
61
|
+
"./package.json"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
39
65
|
"exports": {
|
|
40
66
|
".": {
|
|
41
67
|
"types": "./dist/types/index.d.ts",
|
|
@@ -59,41 +85,15 @@
|
|
|
59
85
|
},
|
|
60
86
|
"./package.json": "./package.json"
|
|
61
87
|
},
|
|
62
|
-
"main": "dist/cjs/index.cjs",
|
|
63
|
-
"module": "dist/esm/index.mjs",
|
|
64
|
-
"types": "dist/types/index.d.ts",
|
|
65
|
-
"typesVersions": {
|
|
66
|
-
"*": {
|
|
67
|
-
".": [
|
|
68
|
-
"./dist/types/index.d.ts"
|
|
69
|
-
],
|
|
70
|
-
"html": [
|
|
71
|
-
"./dist/types/html/index.d.ts"
|
|
72
|
-
],
|
|
73
|
-
"markdown": [
|
|
74
|
-
"./dist/types/markdown/index.d.ts"
|
|
75
|
-
],
|
|
76
|
-
"format": [
|
|
77
|
-
"./dist/types/format/index.d.ts"
|
|
78
|
-
],
|
|
79
|
-
"package.json": [
|
|
80
|
-
"./package.json"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"files": [
|
|
85
|
-
"./dist",
|
|
86
|
-
"./package.json"
|
|
87
|
-
],
|
|
88
88
|
"scripts": {
|
|
89
89
|
"build": "bun --bun vite build",
|
|
90
90
|
"build:ci": "bun --bun vite build",
|
|
91
91
|
"clean": "bun --bun rimraf ./dist .turbo",
|
|
92
92
|
"dev": "bun --bun vite build --watch",
|
|
93
|
-
"format": "
|
|
94
|
-
"format:fix": "
|
|
95
|
-
"lint": "
|
|
96
|
-
"lint:fix": "
|
|
93
|
+
"format": "oxfmt --check .",
|
|
94
|
+
"format:fix": "oxfmt .",
|
|
95
|
+
"lint": "oxlint .",
|
|
96
|
+
"lint:fix": "oxlint --fix .",
|
|
97
97
|
"prepublish": "cp -f ../../README.md ./README.md",
|
|
98
98
|
"publish": "bun publish || true",
|
|
99
99
|
"publish:canary": "bun publish --access public --tag canary || true",
|
|
@@ -104,11 +104,11 @@
|
|
|
104
104
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@intlayer/api": "9.7.
|
|
108
|
-
"@intlayer/config": "9.7.
|
|
109
|
-
"@intlayer/core": "9.7.
|
|
110
|
-
"@intlayer/editor": "9.7.
|
|
111
|
-
"@intlayer/types": "9.7.
|
|
107
|
+
"@intlayer/api": "9.7.2",
|
|
108
|
+
"@intlayer/config": "9.7.2",
|
|
109
|
+
"@intlayer/core": "9.7.2",
|
|
110
|
+
"@intlayer/editor": "9.7.2",
|
|
111
|
+
"@intlayer/types": "9.7.2"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@types/node": "^26",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"@utils/ts-config-types": "1.0.4",
|
|
118
118
|
"@utils/tsdown-config": "1.0.4",
|
|
119
119
|
"fast-glob": "3.3.3",
|
|
120
|
-
"rimraf": "6.1.
|
|
121
|
-
"tsdown": "0.23.
|
|
120
|
+
"rimraf": "6.1.4",
|
|
121
|
+
"tsdown": "0.23.7",
|
|
122
122
|
"typescript": "7.0.2",
|
|
123
|
-
"vite": "8.3.
|
|
123
|
+
"vite": "8.3.7",
|
|
124
124
|
"vite-plugin-dts": "5.1.2",
|
|
125
125
|
"vitest": "5.1.0"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"intlayer": "9.7.
|
|
128
|
+
"intlayer": "9.7.2",
|
|
129
129
|
"lit": ">=3.0.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|