solid-intlayer 9.5.8 → 9.5.9-canary.0
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 +1 -1
- package/dist/esm/plugins.mjs +51 -51
- package/package.json +1 -1
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("./analytics/exposureSink.cjs"),l=require("./IntlayerNode.cjs"),u=require("./solidElement/renderSolidElement.cjs");let d=require("@intlayer/config/built"),f=require("solid-js"),p=require("solid-js/web"),m=require("@intlayer/core/interpreter"),h=require("@intlayer/core/markdown"),g=require("@intlayer/types/nodeType");g=s(g);var _=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,f.lazy)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs")).then(e=>({default:e.ContentSelector}))),v=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?null:Promise.resolve().then(()=>require("./markdown/MarkdownRenderer.cjs")).then(e=>({MarkdownRenderer:e.MarkdownRenderer,MarkdownMetadataRenderer:e.MarkdownMetadataRenderer})),y=process.env.INTLAYER_NODE_TYPE_HTML===`false`?null:Promise.resolve().then(()=>require("./html/HTMLRenderer.cjs")).then(e=>e.HTMLRenderer);v?.catch(()=>{}),y?.catch(()=>{});var b={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>(process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&c.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`text`}),l.renderIntlayerNode({...n,value:n.children,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get fallback(){return n.children},get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(n,{get children(){return n.children}}))}}):n.children}))},x=process.env.INTLAYER_NODE_TYPE_SOLID_NODE===`false`?m.fallbackPlugin:{id:`solid-node-plugin`,canHandle:e=>typeof e==`object`&&e?.props!==void 0||typeof Node<`u`&&e instanceof Node,transform:(e,{plugins:t,...n})=>(process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&c.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`solid-node`}),l.renderIntlayerNode({...n,value:`[[solid-element]]`,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get fallback(){return typeof Node<`u`&&e instanceof Node?e:u.renderSolidElement(e)},get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(n,{get children(){return typeof Node<`u`&&e instanceof Node?e:u.renderSolidElement(e)}}))}}):typeof Node<`u`&&e instanceof Node?e:u.renderSolidElement(e)}))},S=(e,t)=>{let n=(0,m.splitInsertionTemplate)(e,t);return n.isSimple,n.parts},C=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?m.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.INSERTION}],i=e[g.INSERTION];return e=>{let a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,m.isInterpolableWrapperNode)(e),transform:(n,r,i)=>{if((0,m.isInterpolableWrapperNode)(n))return(0,m.transformInterpolableNode)(n,e,r,t.plugins,i);let a=S(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})}}
|
|
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("./analytics/exposureSink.cjs"),l=require("./IntlayerNode.cjs"),u=require("./solidElement/renderSolidElement.cjs");let d=require("@intlayer/config/built"),f=require("solid-js"),p=require("solid-js/web"),m=require("@intlayer/core/interpreter"),h=require("@intlayer/core/markdown"),g=require("@intlayer/types/nodeType");g=s(g);var _=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,f.lazy)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs")).then(e=>({default:e.ContentSelector}))),v=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?null:Promise.resolve().then(()=>require("./markdown/MarkdownRenderer.cjs")).then(e=>({MarkdownRenderer:e.MarkdownRenderer,MarkdownMetadataRenderer:e.MarkdownMetadataRenderer})),y=process.env.INTLAYER_NODE_TYPE_HTML===`false`?null:Promise.resolve().then(()=>require("./html/HTMLRenderer.cjs")).then(e=>e.HTMLRenderer);v?.catch(()=>{}),y?.catch(()=>{});var b={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>(process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&c.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`text`}),l.renderIntlayerNode({...n,value:n.children,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get fallback(){return n.children},get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(n,{get children(){return n.children}}))}}):n.children}))},x=process.env.INTLAYER_NODE_TYPE_SOLID_NODE===`false`?m.fallbackPlugin:{id:`solid-node-plugin`,canHandle:e=>typeof e==`object`&&e?.props!==void 0||typeof Node<`u`&&e instanceof Node,transform:(e,{plugins:t,...n})=>(process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&c.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`solid-node`}),l.renderIntlayerNode({...n,value:`[[solid-element]]`,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get fallback(){return typeof Node<`u`&&e instanceof Node?e:u.renderSolidElement(e)},get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(n,{get children(){return typeof Node<`u`&&e instanceof Node?e:u.renderSolidElement(e)}}))}}):typeof Node<`u`&&e instanceof Node?e:u.renderSolidElement(e)}))},S=(e,t)=>{let n=(0,m.splitInsertionTemplate)(e,t);return n.isSimple,n.parts},C=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?m.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.INSERTION}],i=e[g.INSERTION];return e=>{let a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,m.isInterpolableWrapperNode)(e),transform:(n,r,i)=>{if((0,m.isInterpolableWrapperNode)(n))return(0,m.transformInterpolableNode)(n,e,r,t.plugins,i);let a=S(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})}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return(0,m.bindInsertedValues)(i,o,e,!0)}}},w=(0,f.lazy)(()=>v.then(e=>({default:e.MarkdownRenderer}))),T=(0,f.lazy)(()=>v.then(e=>({default:e.MarkdownMetadataRenderer}))),E=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?m.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,a=n((0,h.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>l.renderIntlayerNode({...n,value:t,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(i,{get children(){return(0,p.createComponent)(T,(0,p.mergeProps)(i,{get metadataKeyPath(){return n.keyPath},children:e}))}}))}}):(0,p.createComponent)(T,(0,p.mergeProps)(i,{get metadataKeyPath(){return n.keyPath},children:e}))})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),o=n=>l.renderIntlayerNode({...t,value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(i,{get children(){return(0,p.createComponent)(w,(0,p.mergeProps)(i,{components:n,children:e}))}}))}}):(0,p.createComponent)(w,(0,p.mergeProps)(i,{components:n,children:e})),additionalProps:{metadata:a}}),s=o();return new Proxy(s,{get(t,n,r){if(n===`value`)return e;if(n===Symbol.toPrimitive||n===`toString`||n===`valueOf`)return()=>e;if(typeof n==`string`&&n!==`constructor`){let t=String.prototype[n];if(typeof t==`function`)return t.bind(e)}return n===`metadata`?a:n===`use`?e=>o(e):Reflect.get(t,n,r)}})}},D=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?m.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.MARKDOWN}],i=e[g.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[E,...t.plugins??[]]})}},O=(0,f.lazy)(()=>y.then(e=>({default:e}))),k=process.env.INTLAYER_NODE_TYPE_HTML===`false`?m.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.HTML,transform:(e,t)=>{let n=e[g.HTML],{plugins:r,children:i,...a}=t,o=e=>l.renderIntlayerNode({...a,value:n,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?(0,p.createComponent)(f.Suspense,{get children(){return(0,p.createComponent)(_,(0,p.mergeProps)(a,{get children(){return(0,p.createComponent)(O,(0,p.mergeProps)(a,{html:n,components:e}))}}))}}):(0,p.createComponent)(O,(0,p.mergeProps)(a,{html:n,components:e}))}),s=[o()];return new Proxy(s,{get(e,t,r){if(t===`value`)return n;if(t===Symbol.toPrimitive||t===`toString`||t===`valueOf`)return()=>n;if(typeof t==`string`&&t!==`constructor`){let e=String.prototype[t];if(typeof e==`function`)return e.bind(n)}return t===`use`?e=>o(e):Reflect.get(e,t,r)}})}},A=new Map,j=(e,t=!0)=>{let n=`${e??d.internationalization.defaultLocale}_${t}`;if(A.has(n))return A.get(n);let r=[(0,m.translationPlugin)(e??d.internationalization.defaultLocale,t?d.internationalization.defaultLocale:void 0),m.enumerationPlugin,(0,m.pluralPlugin)(e??d.internationalization.defaultLocale),m.conditionPlugin,(0,m.nestedPlugin)(e??d.internationalization.defaultLocale),m.filePlugin,m.genderPlugin,m.selectPlugin,b,x,C,D,k];return A.set(n,r),r};exports.getPlugins=j,exports.htmlPlugin=k,exports.insertionPlugin=C,exports.intlayerNodePlugins=b,exports.markdownPlugin=D,exports.markdownStringPlugin=E,exports.solidNodePlugins=x;
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -4,16 +4,16 @@ import { renderSolidElement as n } from "./solidElement/renderSolidElement.mjs";
|
|
|
4
4
|
import { editor as r, internationalization as i } from "@intlayer/config/built";
|
|
5
5
|
import { Suspense as a, lazy as o } from "solid-js";
|
|
6
6
|
import { createComponent as s, mergeProps as c } from "solid-js/web";
|
|
7
|
-
import {
|
|
8
|
-
import { getMarkdownMetadata as
|
|
9
|
-
import * as
|
|
7
|
+
import { bindInsertedValues as l, conditionPlugin as u, enumerationPlugin as d, fallbackPlugin as f, filePlugin as p, genderPlugin as m, isInterpolableWrapperNode as h, nestedPlugin as g, pluralPlugin as _, selectPlugin as v, splitInsertionTemplate as y, transformInterpolableNode as b, translationPlugin as x } from "@intlayer/core/interpreter";
|
|
8
|
+
import { getMarkdownMetadata as S } from "@intlayer/core/markdown";
|
|
9
|
+
import * as C from "@intlayer/types/nodeType";
|
|
10
10
|
//#region src/plugins.tsx
|
|
11
|
-
var
|
|
11
|
+
var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : o(() => import("./editor/ContentSelector.mjs").then((e) => ({ default: e.ContentSelector }))), T = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? null : import("./markdown/MarkdownRenderer.mjs").then((e) => ({
|
|
12
12
|
MarkdownRenderer: e.MarkdownRenderer,
|
|
13
13
|
MarkdownMetadataRenderer: e.MarkdownMetadataRenderer
|
|
14
|
-
})),
|
|
15
|
-
|
|
16
|
-
var
|
|
14
|
+
})), E = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? null : import("./html/HTMLRenderer.mjs").then((e) => e.HTMLRenderer);
|
|
15
|
+
T?.catch(() => {}), E?.catch(() => {});
|
|
16
|
+
var D = {
|
|
17
17
|
id: "intlayer-node-plugin",
|
|
18
18
|
canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
|
|
19
19
|
transform: (n, { plugins: i, ...o }) => (process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && e({
|
|
@@ -29,13 +29,13 @@ var E = {
|
|
|
29
29
|
return o.children;
|
|
30
30
|
},
|
|
31
31
|
get children() {
|
|
32
|
-
return s(
|
|
32
|
+
return s(w, c(o, { get children() {
|
|
33
33
|
return o.children;
|
|
34
34
|
} }));
|
|
35
35
|
}
|
|
36
36
|
}) : o.children
|
|
37
37
|
}))
|
|
38
|
-
},
|
|
38
|
+
}, O = process.env.INTLAYER_NODE_TYPE_SOLID_NODE === "false" ? f : {
|
|
39
39
|
id: "solid-node-plugin",
|
|
40
40
|
canHandle: (e) => typeof e == "object" && e?.props !== void 0 || typeof Node < "u" && e instanceof Node,
|
|
41
41
|
transform: (i, { plugins: o, ...l }) => (process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && e({
|
|
@@ -51,27 +51,27 @@ var E = {
|
|
|
51
51
|
return typeof Node < "u" && i instanceof Node ? i : n(i);
|
|
52
52
|
},
|
|
53
53
|
get children() {
|
|
54
|
-
return s(
|
|
54
|
+
return s(w, c(l, { get children() {
|
|
55
55
|
return typeof Node < "u" && i instanceof Node ? i : n(i);
|
|
56
56
|
} }));
|
|
57
57
|
}
|
|
58
58
|
}) : typeof Node < "u" && i instanceof Node ? i : n(i)
|
|
59
59
|
}))
|
|
60
|
-
},
|
|
61
|
-
let n =
|
|
60
|
+
}, k = (e, t) => {
|
|
61
|
+
let n = y(e, t);
|
|
62
62
|
return n.isSimple, n.parts;
|
|
63
|
-
},
|
|
63
|
+
}, A = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? f : {
|
|
64
64
|
id: "insertion-plugin",
|
|
65
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
65
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === C.INSERTION,
|
|
66
66
|
transform: (e, t, n) => {
|
|
67
|
-
let r = [...t.keyPath, { type:
|
|
67
|
+
let r = [...t.keyPath, { type: C.INSERTION }], i = e[C.INSERTION];
|
|
68
68
|
return (e) => {
|
|
69
69
|
let a = {
|
|
70
70
|
id: "insertion-string-plugin",
|
|
71
|
-
canHandle: (e) => typeof e == "string" ||
|
|
71
|
+
canHandle: (e) => typeof e == "string" || h(e),
|
|
72
72
|
transform: (n, r, i) => {
|
|
73
|
-
if (
|
|
74
|
-
let a =
|
|
73
|
+
if (h(n)) return b(n, e, r, t.plugins, i);
|
|
74
|
+
let a = k(i(n, {
|
|
75
75
|
...r,
|
|
76
76
|
children: n,
|
|
77
77
|
plugins: [...(t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")]
|
|
@@ -82,20 +82,20 @@ var E = {
|
|
|
82
82
|
children: a
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
}
|
|
86
|
-
return n(i, {
|
|
85
|
+
}, o = n(i, {
|
|
87
86
|
...t,
|
|
88
87
|
children: i,
|
|
89
88
|
keyPath: r,
|
|
90
89
|
plugins: [a, ...t.plugins ?? []]
|
|
91
90
|
});
|
|
91
|
+
return l(i, o, e, !0);
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
},
|
|
94
|
+
}, j = o(() => T.then((e) => ({ default: e.MarkdownRenderer }))), M = o(() => T.then((e) => ({ default: e.MarkdownMetadataRenderer }))), N = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? f : {
|
|
95
95
|
id: "markdown-string-plugin",
|
|
96
96
|
canHandle: (e) => typeof e == "string",
|
|
97
97
|
transform: (e, n, i) => {
|
|
98
|
-
let { plugins: o, ...l } = n, u = i(
|
|
98
|
+
let { plugins: o, ...l } = n, u = i(S(e) ?? {}, {
|
|
99
99
|
plugins: [{
|
|
100
100
|
id: "markdown-metadata-plugin",
|
|
101
101
|
canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
|
|
@@ -103,15 +103,15 @@ var E = {
|
|
|
103
103
|
...i,
|
|
104
104
|
value: n,
|
|
105
105
|
children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? s(a, { get children() {
|
|
106
|
-
return s(
|
|
107
|
-
return s(
|
|
106
|
+
return s(w, c(l, { get children() {
|
|
107
|
+
return s(M, c(l, {
|
|
108
108
|
get metadataKeyPath() {
|
|
109
109
|
return i.keyPath;
|
|
110
110
|
},
|
|
111
111
|
children: e
|
|
112
112
|
}));
|
|
113
113
|
} }));
|
|
114
|
-
} }) : s(
|
|
114
|
+
} }) : s(M, c(l, {
|
|
115
115
|
get metadataKeyPath() {
|
|
116
116
|
return i.keyPath;
|
|
117
117
|
},
|
|
@@ -125,13 +125,13 @@ var E = {
|
|
|
125
125
|
...n,
|
|
126
126
|
value: e,
|
|
127
127
|
children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? s(a, { get children() {
|
|
128
|
-
return s(
|
|
129
|
-
return s(
|
|
128
|
+
return s(w, c(l, { get children() {
|
|
129
|
+
return s(j, c(l, {
|
|
130
130
|
components: i,
|
|
131
131
|
children: e
|
|
132
132
|
}));
|
|
133
133
|
} }));
|
|
134
|
-
} }) : s(
|
|
134
|
+
} }) : s(j, c(l, {
|
|
135
135
|
components: i,
|
|
136
136
|
children: e
|
|
137
137
|
})),
|
|
@@ -147,33 +147,33 @@ var E = {
|
|
|
147
147
|
return n === "metadata" ? u : n === "use" ? (e) => d(e) : Reflect.get(t, n, r);
|
|
148
148
|
} });
|
|
149
149
|
}
|
|
150
|
-
},
|
|
150
|
+
}, P = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? f : {
|
|
151
151
|
id: "markdown-plugin",
|
|
152
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
152
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === C.MARKDOWN,
|
|
153
153
|
transform: (e, t, n) => {
|
|
154
|
-
let r = [...t.keyPath, { type:
|
|
154
|
+
let r = [...t.keyPath, { type: C.MARKDOWN }], i = e[C.MARKDOWN];
|
|
155
155
|
return n(i, {
|
|
156
156
|
...t,
|
|
157
157
|
children: i,
|
|
158
158
|
keyPath: r,
|
|
159
|
-
plugins: [
|
|
159
|
+
plugins: [N, ...t.plugins ?? []]
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
},
|
|
162
|
+
}, F = o(() => E.then((e) => ({ default: e }))), I = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? f : {
|
|
163
163
|
id: "html-plugin",
|
|
164
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType ===
|
|
164
|
+
canHandle: (e) => typeof e == "object" && e?.nodeType === C.HTML,
|
|
165
165
|
transform: (e, n) => {
|
|
166
|
-
let i = e[
|
|
166
|
+
let i = e[C.HTML], { plugins: o, children: l, ...u } = n, d = (e) => t({
|
|
167
167
|
...u,
|
|
168
168
|
value: i,
|
|
169
169
|
children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? s(a, { get children() {
|
|
170
|
-
return s(
|
|
171
|
-
return s(
|
|
170
|
+
return s(w, c(u, { get children() {
|
|
171
|
+
return s(F, c(u, {
|
|
172
172
|
html: i,
|
|
173
173
|
components: e
|
|
174
174
|
}));
|
|
175
175
|
} }));
|
|
176
|
-
} }) : s(
|
|
176
|
+
} }) : s(F, c(u, {
|
|
177
177
|
html: i,
|
|
178
178
|
components: e
|
|
179
179
|
}))
|
|
@@ -188,25 +188,25 @@ var E = {
|
|
|
188
188
|
return t === "use" ? (e) => d(e) : Reflect.get(e, t, n);
|
|
189
189
|
} });
|
|
190
190
|
}
|
|
191
|
-
},
|
|
191
|
+
}, L = /* @__PURE__ */ new Map(), R = (e, t = !0) => {
|
|
192
192
|
let n = `${e ?? i.defaultLocale}_${t}`;
|
|
193
|
-
if (
|
|
193
|
+
if (L.has(n)) return L.get(n);
|
|
194
194
|
let r = [
|
|
195
|
-
|
|
195
|
+
x(e ?? i.defaultLocale, t ? i.defaultLocale : void 0),
|
|
196
|
+
d,
|
|
197
|
+
_(e ?? i.defaultLocale),
|
|
196
198
|
u,
|
|
197
199
|
g(e ?? i.defaultLocale),
|
|
198
|
-
l,
|
|
199
|
-
h(e ?? i.defaultLocale),
|
|
200
|
-
f,
|
|
201
200
|
p,
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
m,
|
|
202
|
+
v,
|
|
204
203
|
D,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
O,
|
|
205
|
+
A,
|
|
206
|
+
P,
|
|
207
|
+
I
|
|
208
208
|
];
|
|
209
|
-
return
|
|
209
|
+
return L.set(n, r), r;
|
|
210
210
|
};
|
|
211
211
|
//#endregion
|
|
212
|
-
export {
|
|
212
|
+
export { R as getPlugins, I as htmlPlugin, A as insertionPlugin, D as intlayerNodePlugins, P as markdownPlugin, N as markdownStringPlugin, O as solidNodePlugins };
|
package/package.json
CHANGED