solid-intlayer 8.6.0 → 8.6.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.
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-C91j1N6u.js`),t=require(`./IntlayerNode.cjs`),n=require(`./editor/ContentSelector.cjs`),r=require(`./solidElement/renderSolidElement.cjs`);let i=require(`@intlayer/core/interpreter`),a=require(`solid-js/web`),o=require(`@intlayer/config/built`);o=e.t(o);let s=require(`@intlayer/core/markdown`),c=require(`@intlayer/types/nodeType`);c=e.t(c);let l=require(`solid-js`);var u=(0,l.lazy)(()=>Promise.resolve().then(()=>require(`./markdown/MarkdownRenderer.cjs`)).then(e=>({default:e.MarkdownMetadataRenderer}))),d=(0,l.lazy)(()=>Promise.resolve().then(()=>require(`./markdown/MarkdownRenderer.cjs`)).then(e=>({default:e.MarkdownRenderer}))),f={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:r,...i})=>t.renderIntlayerNode({...i,value:i.children,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(i,{get children(){return i.children}})):i.children})},p={id:`solid-node-plugin`,canHandle:e=>typeof e==`object`&&e?.props!==void 0||typeof Node<`u`&&e instanceof Node,transform:(e,{plugins:i,...s})=>t.renderIntlayerNode({...s,value:`[[solid-element]]`,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(s,{get children(){return typeof Node<`u`&&e instanceof Node?e:r.renderSolidElement(e)}})):typeof Node<`u`&&e instanceof Node?e:r.renderSolidElement(e)})},m=(e,t)=>{let n=(0,i.splitInsertionTemplate)(e,t);return n.isSimple,n.parts},h={id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.INSERTION}],i=e[c.INSERTION];return e=>{let a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(n,r,i)=>{let a=m(i(n,{...r,children:n,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]}),e);return i(a,{...r,plugins:t.plugins,children:a})}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}}},g={id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,r,i)=>{let{plugins:c,...f}=r,p=i((0,s.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(r,i)=>t.renderIntlayerNode({...i,value:r,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(f,{get children(){return(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(u,(0,a.mergeProps)(f,{get metadataKeyPath(){return i.keyPath},children:e}))}})}})):(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(u,(0,a.mergeProps)(f,{get metadataKeyPath(){return i.keyPath},children:e}))}})})}],dictionaryKey:f.dictionaryKey,keyPath:[]}),m=i=>t.renderIntlayerNode({...r,value:e,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(f,{get children(){return(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(d,(0,a.mergeProps)(f,{components:i,children:e}))}})}})):(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(d,(0,a.mergeProps)(f,{components:i,children:e}))}}),additionalProps:{metadata:p}}),h=m();return new Proxy(h,{get(t,n,r){return n===`value`?e:n===`metadata`?p:n===`use`?e=>m(e):Reflect.get(t,n,r)}})}},_={id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.MARKDOWN}],i=e[c.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[g,...t.plugins??[]]})}},v=(0,l.lazy)(()=>Promise.resolve().then(()=>require(`./html/HTMLRenderer.cjs`)).then(e=>({default:e.HTMLRenderer}))),y={id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.HTML,transform:(e,n)=>{let r=e[c.HTML],{plugins:i,...o}=n,s=e=>t.renderIntlayerNode({...o,value:r,children:(0,a.createComponent)(l.Suspense,{fallback:r,get children(){return(0,a.createComponent)(v,(0,a.mergeProps)(o,{html:r,components:e}))}})}),u=[s()];return new Proxy(u,{get(e,t,n){return t===`value`?r:t===`use`?e=>s(e):Reflect.get(e,t,n)}})}},b=(e,t=!0)=>[(0,i.translationPlugin)(e??o.default.internationalization.defaultLocale,t?o.default.internationalization.defaultLocale:void 0),i.enumerationPlugin,i.conditionPlugin,(0,i.nestedPlugin)(e??o.default.internationalization.defaultLocale),i.filePlugin,i.genderPlugin,f,p,h,_,y];exports.getPlugins=b,exports.htmlPlugin=y,exports.insertionPlugin=h,exports.intlayerNodePlugins=f,exports.markdownPlugin=_,exports.markdownStringPlugin=g,exports.solidNodePlugins=p;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-C91j1N6u.js`),t=require(`./IntlayerNode.cjs`),n=require(`./editor/ContentSelector.cjs`),r=require(`./solidElement/renderSolidElement.cjs`);let i=require(`@intlayer/core/interpreter`),a=require(`solid-js/web`),o=require(`@intlayer/config/built`);o=e.t(o);let s=require(`@intlayer/core/markdown`),c=require(`@intlayer/types/nodeType`);c=e.t(c);let l=require(`solid-js`);var u=(0,l.lazy)(()=>Promise.resolve().then(()=>require(`./markdown/MarkdownRenderer.cjs`)).then(e=>({default:e.MarkdownMetadataRenderer}))),d=(0,l.lazy)(()=>Promise.resolve().then(()=>require(`./markdown/MarkdownRenderer.cjs`)).then(e=>({default:e.MarkdownRenderer}))),f=process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE===`false`?i.fallbackPlugin:{id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:r,...i})=>t.renderIntlayerNode({...i,value:i.children,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(i,{get children(){return i.children}})):i.children})},p=process.env.INTLAYER_NODE_TYPE_SOLID_NODE===`false`?i.fallbackPlugin:{id:`solid-node-plugin`,canHandle:e=>typeof e==`object`&&e?.props!==void 0||typeof Node<`u`&&e instanceof Node,transform:(e,{plugins:i,...s})=>t.renderIntlayerNode({...s,value:`[[solid-element]]`,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(s,{get children(){return typeof Node<`u`&&e instanceof Node?e:r.renderSolidElement(e)}})):typeof Node<`u`&&e instanceof Node?e:r.renderSolidElement(e)})},m=(e,t)=>{let n=(0,i.splitInsertionTemplate)(e,t);return n.isSimple,n.parts},h=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?i.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.INSERTION}],i=e[c.INSERTION];return e=>{let a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(n,r,i)=>{let a=m(i(n,{...r,children:n,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]}),e);return i(a,{...r,plugins:t.plugins,children:a})}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}}},g=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?i.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,r,i)=>{let{plugins:c,...f}=r,p=i((0,s.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(r,i)=>t.renderIntlayerNode({...i,value:r,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(f,{get children(){return(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(u,(0,a.mergeProps)(f,{get metadataKeyPath(){return i.keyPath},children:e}))}})}})):(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(u,(0,a.mergeProps)(f,{get metadataKeyPath(){return i.keyPath},children:e}))}})})}],dictionaryKey:f.dictionaryKey,keyPath:[]}),m=i=>t.renderIntlayerNode({...r,value:e,children:o.default.editor.enabled?(0,a.createComponent)(n.ContentSelector,(0,a.mergeProps)(f,{get children(){return(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(d,(0,a.mergeProps)(f,{components:i,children:e}))}})}})):(0,a.createComponent)(l.Suspense,{fallback:e,get children(){return(0,a.createComponent)(d,(0,a.mergeProps)(f,{components:i,children:e}))}}),additionalProps:{metadata:p}}),h=m();return new Proxy(h,{get(t,n,r){return n===`value`?e:n===`metadata`?p:n===`use`?e=>m(e):Reflect.get(t,n,r)}})}},_=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?i.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.MARKDOWN}],i=e[c.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[g,...t.plugins??[]]})}},v=(0,l.lazy)(()=>Promise.resolve().then(()=>require(`./html/HTMLRenderer.cjs`)).then(e=>({default:e.HTMLRenderer}))),y=process.env.INTLAYER_NODE_TYPE_HTML===`false`?i.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.HTML,transform:(e,n)=>{let r=e[c.HTML],{plugins:i,...o}=n,s=e=>t.renderIntlayerNode({...o,value:r,children:(0,a.createComponent)(l.Suspense,{fallback:r,get children(){return(0,a.createComponent)(v,(0,a.mergeProps)(o,{html:r,components:e}))}})}),u=[s()];return new Proxy(u,{get(e,t,n){return t===`value`?r:t===`use`?e=>s(e):Reflect.get(e,t,n)}})}},b=(e,t=!0)=>[(0,i.translationPlugin)(e??o.default.internationalization.defaultLocale,t?o.default.internationalization.defaultLocale:void 0),i.enumerationPlugin,i.conditionPlugin,(0,i.nestedPlugin)(e??o.default.internationalization.defaultLocale),i.filePlugin,i.genderPlugin,f,p,h,_,y].filter(Boolean);exports.getPlugins=b,exports.htmlPlugin=y,exports.insertionPlugin=h,exports.intlayerNodePlugins=f,exports.markdownPlugin=_,exports.markdownStringPlugin=g,exports.solidNodePlugins=p;
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { renderIntlayerNode as e } from "./IntlayerNode.mjs";
|
|
2
2
|
import { ContentSelector as t } from "./editor/ContentSelector.mjs";
|
|
3
3
|
import { renderSolidElement as n } from "./solidElement/renderSolidElement.mjs";
|
|
4
|
-
import { conditionPlugin as r, enumerationPlugin as i,
|
|
5
|
-
import { createComponent as
|
|
6
|
-
import
|
|
7
|
-
import { getMarkdownMetadata as
|
|
8
|
-
import * as
|
|
9
|
-
import { Suspense as
|
|
4
|
+
import { conditionPlugin as r, enumerationPlugin as i, fallbackPlugin as a, filePlugin as o, genderPlugin as s, nestedPlugin as c, splitInsertionTemplate as l, translationPlugin as u } from "@intlayer/core/interpreter";
|
|
5
|
+
import { createComponent as d, mergeProps as f } from "solid-js/web";
|
|
6
|
+
import p from "@intlayer/config/built";
|
|
7
|
+
import { getMarkdownMetadata as m } from "@intlayer/core/markdown";
|
|
8
|
+
import * as h from "@intlayer/types/nodeType";
|
|
9
|
+
import { Suspense as g, lazy as _ } from "solid-js";
|
|
10
10
|
//#region src/plugins.tsx
|
|
11
|
-
var
|
|
11
|
+
var v = _(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default: e.MarkdownMetadataRenderer }))), y = _(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default: e.MarkdownRenderer }))), b = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? a : {
|
|
12
12
|
id: "intlayer-node-plugin",
|
|
13
13
|
canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
|
|
14
14
|
transform: (n, { plugins: r, ...i }) => e({
|
|
15
15
|
...i,
|
|
16
16
|
value: i.children,
|
|
17
|
-
children:
|
|
17
|
+
children: p.editor.enabled ? d(t, f(i, { get children() {
|
|
18
18
|
return i.children;
|
|
19
19
|
} })) : i.children
|
|
20
20
|
})
|
|
21
|
-
},
|
|
21
|
+
}, x = process.env.INTLAYER_NODE_TYPE_SOLID_NODE === "false" ? a : {
|
|
22
22
|
id: "solid-node-plugin",
|
|
23
23
|
canHandle: (e) => typeof e == "object" && e?.props !== void 0 || typeof Node < "u" && e instanceof Node,
|
|
24
24
|
transform: (r, { plugins: i, ...a }) => e({
|
|
25
25
|
...a,
|
|
26
26
|
value: "[[solid-element]]",
|
|
27
|
-
children:
|
|
27
|
+
children: p.editor.enabled ? d(t, f(a, { get children() {
|
|
28
28
|
return typeof Node < "u" && r instanceof Node ? r : n(r);
|
|
29
29
|
} })) : typeof Node < "u" && r instanceof Node ? r : n(r)
|
|
30
30
|
})
|
|
31
|
-
},
|
|
32
|
-
let n =
|
|
31
|
+
}, S = (e, t) => {
|
|
32
|
+
let n = l(e, t);
|
|
33
33
|
return n.isSimple, n.parts;
|
|
34
|
-
},
|
|
34
|
+
}, C = 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 === h.INSERTION,
|
|
37
37
|
transform: (e, t, n) => {
|
|
38
|
-
let r = [...t.keyPath, { type:
|
|
38
|
+
let r = [...t.keyPath, { type: h.INSERTION }], i = e[h.INSERTION];
|
|
39
39
|
return (e) => {
|
|
40
40
|
let a = {
|
|
41
41
|
id: "insertion-string-plugin",
|
|
42
42
|
canHandle: (e) => typeof e == "string",
|
|
43
43
|
transform: (n, r, i) => {
|
|
44
|
-
let a =
|
|
44
|
+
let a = S(i(n, {
|
|
45
45
|
...r,
|
|
46
46
|
children: n,
|
|
47
47
|
plugins: [...(t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")]
|
|
@@ -61,22 +61,22 @@ var _ = g(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
},
|
|
64
|
+
}, w = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? a : {
|
|
65
65
|
id: "markdown-string-plugin",
|
|
66
66
|
canHandle: (e) => typeof e == "string",
|
|
67
67
|
transform: (n, r, i) => {
|
|
68
|
-
let { plugins: a, ...o } = r, s = i(
|
|
68
|
+
let { plugins: a, ...o } = r, s = i(m(n) ?? {}, {
|
|
69
69
|
plugins: [{
|
|
70
70
|
id: "markdown-metadata-plugin",
|
|
71
71
|
canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
|
|
72
72
|
transform: (r, i) => e({
|
|
73
73
|
...i,
|
|
74
74
|
value: r,
|
|
75
|
-
children:
|
|
76
|
-
return
|
|
75
|
+
children: p.editor.enabled ? d(t, f(o, { get children() {
|
|
76
|
+
return d(g, {
|
|
77
77
|
fallback: n,
|
|
78
78
|
get children() {
|
|
79
|
-
return
|
|
79
|
+
return d(v, f(o, {
|
|
80
80
|
get metadataKeyPath() {
|
|
81
81
|
return i.keyPath;
|
|
82
82
|
},
|
|
@@ -84,10 +84,10 @@ var _ = g(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default
|
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
} })) :
|
|
87
|
+
} })) : d(g, {
|
|
88
88
|
fallback: n,
|
|
89
89
|
get children() {
|
|
90
|
-
return
|
|
90
|
+
return d(v, f(o, {
|
|
91
91
|
get metadataKeyPath() {
|
|
92
92
|
return i.keyPath;
|
|
93
93
|
},
|
|
@@ -102,20 +102,20 @@ var _ = g(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default
|
|
|
102
102
|
}), c = (i) => e({
|
|
103
103
|
...r,
|
|
104
104
|
value: n,
|
|
105
|
-
children:
|
|
106
|
-
return
|
|
105
|
+
children: p.editor.enabled ? d(t, f(o, { get children() {
|
|
106
|
+
return d(g, {
|
|
107
107
|
fallback: n,
|
|
108
108
|
get children() {
|
|
109
|
-
return
|
|
109
|
+
return d(y, f(o, {
|
|
110
110
|
components: i,
|
|
111
111
|
children: n
|
|
112
112
|
}));
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
} })) :
|
|
115
|
+
} })) : d(g, {
|
|
116
116
|
fallback: n,
|
|
117
117
|
get children() {
|
|
118
|
-
return
|
|
118
|
+
return d(y, f(o, {
|
|
119
119
|
components: i,
|
|
120
120
|
children: n
|
|
121
121
|
}));
|
|
@@ -127,29 +127,29 @@ var _ = g(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default
|
|
|
127
127
|
return t === "value" ? n : t === "metadata" ? s : t === "use" ? (e) => c(e) : Reflect.get(e, t, r);
|
|
128
128
|
} });
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, T = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? a : {
|
|
131
131
|
id: "markdown-plugin",
|
|
132
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
132
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === h.MARKDOWN,
|
|
133
133
|
transform: (e, t, n) => {
|
|
134
|
-
let r = [...t.keyPath, { type:
|
|
134
|
+
let r = [...t.keyPath, { type: h.MARKDOWN }], i = e[h.MARKDOWN];
|
|
135
135
|
return n(i, {
|
|
136
136
|
...t,
|
|
137
137
|
children: i,
|
|
138
138
|
keyPath: r,
|
|
139
|
-
plugins: [
|
|
139
|
+
plugins: [w, ...t.plugins ?? []]
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, E = _(() => import("./html/HTMLRenderer.mjs").then((e) => ({ default: e.HTMLRenderer }))), D = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? a : {
|
|
143
143
|
id: "html-plugin",
|
|
144
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
144
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === h.HTML,
|
|
145
145
|
transform: (t, n) => {
|
|
146
|
-
let r = t[
|
|
146
|
+
let r = t[h.HTML], { plugins: i, ...a } = n, o = (t) => e({
|
|
147
147
|
...a,
|
|
148
148
|
value: r,
|
|
149
|
-
children:
|
|
149
|
+
children: d(g, {
|
|
150
150
|
fallback: r,
|
|
151
151
|
get children() {
|
|
152
|
-
return
|
|
152
|
+
return d(E, f(a, {
|
|
153
153
|
html: r,
|
|
154
154
|
components: t
|
|
155
155
|
}));
|
|
@@ -160,18 +160,18 @@ var _ = g(() => import("./markdown/MarkdownRenderer.mjs").then((e) => ({ default
|
|
|
160
160
|
return t === "value" ? r : t === "use" ? (e) => o(e) : Reflect.get(e, t, n);
|
|
161
161
|
} });
|
|
162
162
|
}
|
|
163
|
-
},
|
|
164
|
-
|
|
163
|
+
}, O = (e, t = !0) => [
|
|
164
|
+
u(e ?? p.internationalization.defaultLocale, t ? p.internationalization.defaultLocale : void 0),
|
|
165
165
|
i,
|
|
166
166
|
r,
|
|
167
|
-
|
|
168
|
-
a,
|
|
167
|
+
c(e ?? p.internationalization.defaultLocale),
|
|
169
168
|
o,
|
|
170
|
-
|
|
169
|
+
s,
|
|
171
170
|
b,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
x,
|
|
172
|
+
C,
|
|
173
|
+
T,
|
|
174
|
+
D
|
|
175
|
+
].filter(Boolean);
|
|
176
176
|
//#endregion
|
|
177
|
-
export {
|
|
177
|
+
export { O as getPlugins, D as htmlPlugin, C as insertionPlugin, b as intlayerNodePlugins, T as markdownPlugin, w as markdownStringPlugin, x as solidNodePlugins };
|
|
@@ -3,7 +3,7 @@ import { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
|
|
|
3
3
|
* On the client side, hook to get the translation content based on the locale
|
|
4
4
|
*/
|
|
5
5
|
export declare const useContent: <Content>(languageContent: StrictModeLocaleMap<Content>) => {
|
|
6
|
-
locale: import('intlayer').Locale;
|
|
6
|
+
locale: import('@intlayer/types/allLocales').Locale;
|
|
7
7
|
content: Content;
|
|
8
8
|
t: <Content_1 = string>(languageContent: StrictModeLocaleMap<Content_1>) => Content_1;
|
|
9
9
|
};
|
|
@@ -2,13 +2,13 @@ import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
|
2
2
|
/**
|
|
3
3
|
* Get the locale cookie
|
|
4
4
|
*/
|
|
5
|
-
export declare const localeInStorage: import('intlayer').Locale | undefined;
|
|
5
|
+
export declare const localeInStorage: import('@intlayer/types/allLocales').Locale | undefined;
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated Use localeInStorage instead
|
|
8
8
|
*
|
|
9
9
|
* Get the locale cookie
|
|
10
10
|
*/
|
|
11
|
-
export declare const localeCookie: import('intlayer').Locale | undefined;
|
|
11
|
+
export declare const localeCookie: import('@intlayer/types/allLocales').Locale | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Set the locale cookie
|
|
14
14
|
*/
|
|
@@ -23,7 +23,7 @@ export declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled?:
|
|
|
23
23
|
* Hook that provides the locale storage and a function to set it
|
|
24
24
|
*/
|
|
25
25
|
export declare const useLocaleStorage: (isCookieEnabled?: boolean) => import('solid-js').Accessor<{
|
|
26
|
-
getLocale: () => import('intlayer').Locale;
|
|
26
|
+
getLocale: () => import('@intlayer/types/allLocales').Locale;
|
|
27
27
|
setLocale: (locale: LocalesValues) => void;
|
|
28
28
|
}>;
|
|
29
29
|
/**
|
|
@@ -34,6 +34,6 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => import('so
|
|
|
34
34
|
* Hook that provides the locale cookie and a function to set it
|
|
35
35
|
*/
|
|
36
36
|
export declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
37
|
-
localeCookie: import('intlayer').Locale;
|
|
37
|
+
localeCookie: import('@intlayer/types/allLocales').Locale;
|
|
38
38
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
39
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-intlayer",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Solid 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": "8.6.
|
|
108
|
-
"@intlayer/config": "8.6.
|
|
109
|
-
"@intlayer/core": "8.6.
|
|
110
|
-
"@intlayer/editor": "8.6.
|
|
111
|
-
"@intlayer/types": "8.6.
|
|
107
|
+
"@intlayer/api": "8.6.1",
|
|
108
|
+
"@intlayer/config": "8.6.1",
|
|
109
|
+
"@intlayer/core": "8.6.1",
|
|
110
|
+
"@intlayer/editor": "8.6.1",
|
|
111
|
+
"@intlayer/types": "8.6.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@solidjs/testing-library": "0.8.10",
|