solid-intlayer 8.0.2-canary.0 → 8.0.4
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/markdown/compiler.cjs +1 -1
- package/dist/cjs/markdown/index.cjs +1 -1
- package/dist/esm/UI/ContentSelector.mjs +4 -4
- package/dist/esm/client/IntlayerProvider.mjs +3 -3
- package/dist/esm/editor/contexts/CommunicatorContext.mjs +4 -4
- package/dist/esm/editor/contexts/DictionariesRecordContext.mjs +1 -1
- package/dist/esm/editor/contexts/EditedContentContext.mjs +1 -1
- package/dist/esm/editor/contexts/EditorEnabledContext.mjs +3 -3
- package/dist/esm/html/HTMLProvider.mjs +2 -2
- package/dist/esm/markdown/compiler.mjs +1 -1
- package/dist/esm/markdown/index.mjs +4 -4
- package/package.json +7 -7
- package/dist/plugins-CYs2R9PT.js +0 -1
- package/dist/plugins-D-fEci5W.mjs +0 -222
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@intlayer/core"),c=require("./runtime.cjs"),e=(o="",r={})=>t.compileWithOptions(o,c.default,r),i=e,n=e;exports.compile=n;exports.compileMarkdown=e;exports.compiler=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./compiler.cjs"),o=require("./MarkdownProvider.cjs"),r=require("./MarkdownRenderer.cjs"),n=require("./runtime.cjs");exports.compile=e.compile;exports.compileMarkdown=e.compileMarkdown;exports.compiler=e.compiler;exports.MarkdownContext=o.MarkdownContext;exports.MarkdownProvider=o.MarkdownProvider;exports.useMarkdown=o.useMarkdown;exports.MarkdownMetadataRenderer=r.MarkdownMetadataRenderer;exports.MarkdownRenderer=r.MarkdownRenderer;exports.renderMarkdown=r.renderMarkdown;exports.useMarkdownRenderer=r.useMarkdownRenderer;exports.solidRuntime=n.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./compiler.cjs"),o=require("./MarkdownProvider.cjs"),r=require("./MarkdownRenderer.cjs"),n=require("./runtime.cjs");exports.compile=e.compile;exports.compileMarkdown=e.compileMarkdown;exports.compiler=e.compiler;exports.MarkdownContext=o.MarkdownContext;exports.MarkdownProvider=o.MarkdownProvider;exports.useMarkdown=o.useMarkdown;exports.MarkdownMetadataRenderer=r.MarkdownMetadataRenderer;exports.MarkdownRenderer=r.MarkdownRenderer;exports.renderMarkdown=r.renderMarkdown;exports.useMarkdownRenderer=r.useMarkdownRenderer;exports.solidRuntime=n.default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as p,
|
|
1
|
+
import { d as p, s as T, i as k, t as L, u as y } from "../../web-mv0y5CK4.mjs";
|
|
2
2
|
import { createSignal as m, createEffect as C, onCleanup as P, mergeProps as w } from "solid-js";
|
|
3
|
-
var D = /* @__PURE__ */
|
|
3
|
+
var D = /* @__PURE__ */ L("<span role=button tabindex=0>");
|
|
4
4
|
const O = 250, x = (t) => {
|
|
5
5
|
let n;
|
|
6
6
|
const [f, l] = m(!1), [a, r] = m(t.isSelecting);
|
|
@@ -34,7 +34,7 @@ const O = 250, x = (t) => {
|
|
|
34
34
|
};
|
|
35
35
|
return (() => {
|
|
36
36
|
var e = D(), d = n;
|
|
37
|
-
return typeof d == "function" ? y(d, e) : n = e, e.addEventListener("mouseenter", g), e.addEventListener("blur", S), e.addEventListener("touchcancel", o), e.$$touchend = o, e.$$touchstart = u, e.addEventListener("mouseleave", o), e.$$mouseup = o, e.$$mousedown = u, e.$$click = E, e.$$keyup = () => null,
|
|
37
|
+
return typeof d == "function" ? y(d, e) : n = e, e.addEventListener("mouseenter", g), e.addEventListener("blur", S), e.addEventListener("touchcancel", o), e.$$touchend = o, e.$$touchstart = u, e.addEventListener("mouseleave", o), e.$$mouseup = o, e.$$mousedown = u, e.$$click = E, e.$$keyup = () => null, T(e, w({
|
|
38
38
|
get style() {
|
|
39
39
|
return {
|
|
40
40
|
display: h ? "inline" : "inline-block",
|
|
@@ -48,7 +48,7 @@ const O = 250, x = (t) => {
|
|
|
48
48
|
transition: "all 100ms 50ms ease-in-out"
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
}, t), !1, !0),
|
|
51
|
+
}, t), !1, !0), k(e, () => t.children), e;
|
|
52
52
|
})();
|
|
53
53
|
};
|
|
54
54
|
p(["keyup", "click", "mousedown", "mouseup", "touchstart", "touchend"]);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import s from "@intlayer/config/built";
|
|
2
2
|
import { localeResolver as v } from "@intlayer/core";
|
|
3
|
-
import { createContext as y, createComponent as n,
|
|
3
|
+
import { createContext as y, createComponent as n, createSignal as I, createEffect as c, useContext as w } from "solid-js";
|
|
4
4
|
import { IntlayerEditorProvider as b } from "../editor/IntlayerEditorProvider.mjs";
|
|
5
5
|
import { localeCookie as d, setLocaleInStorage as A } from "./useLocaleStorage.mjs";
|
|
6
6
|
const f = y({
|
|
7
7
|
locale: () => d ?? s?.internationalization?.defaultLocale,
|
|
8
8
|
setLocale: () => null,
|
|
9
9
|
disableEditor: !1
|
|
10
|
-
}), R = () =>
|
|
10
|
+
}), R = () => w(f), x = (t) => {
|
|
11
11
|
const {
|
|
12
12
|
internationalization: u
|
|
13
13
|
} = s ?? {}, {
|
|
14
14
|
defaultLocale: L,
|
|
15
15
|
locales: a
|
|
16
|
-
} = u ?? {}, m = t.locale ?? d ?? t.defaultLocale ?? L, [o, l] =
|
|
16
|
+
} = u ?? {}, m = t.locale ?? d ?? t.defaultLocale ?? L, [o, l] = I(m);
|
|
17
17
|
c(() => {
|
|
18
18
|
if (typeof window < "u") {
|
|
19
19
|
const e = (r) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import i from "@intlayer/config/built";
|
|
2
|
-
import { createContext as s,
|
|
2
|
+
import { createContext as s, createMemo as a, createComponent as c, useContext as d } from "solid-js";
|
|
3
3
|
const m = () => Math.random().toString(36).slice(2), {
|
|
4
4
|
editor: o
|
|
5
5
|
} = i, t = s({
|
|
@@ -7,12 +7,12 @@ const m = () => Math.random().toString(36).slice(2), {
|
|
|
7
7
|
allowedOrigins: [o?.applicationURL, o?.editorURL, o?.cmsURL],
|
|
8
8
|
senderId: ""
|
|
9
9
|
}), g = (e) => {
|
|
10
|
-
const n = m(), r =
|
|
10
|
+
const n = m(), r = a(() => ({
|
|
11
11
|
postMessage: e.postMessage,
|
|
12
12
|
allowedOrigins: e.allowedOrigins,
|
|
13
13
|
senderId: n
|
|
14
14
|
}));
|
|
15
|
-
return
|
|
15
|
+
return c(t.Provider, {
|
|
16
16
|
get value() {
|
|
17
17
|
return r();
|
|
18
18
|
},
|
|
@@ -20,7 +20,7 @@ const m = () => Math.random().toString(36).slice(2), {
|
|
|
20
20
|
return e.children;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
}, C = () =>
|
|
23
|
+
}, C = () => d(t);
|
|
24
24
|
export {
|
|
25
25
|
g as CommunicatorProvider,
|
|
26
26
|
C as useCommunicator
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageKey as C } from "@intlayer/editor";
|
|
2
|
-
import { createContext as c,
|
|
2
|
+
import { createContext as c, createMemo as i, createComponent as n, useContext as s } from "solid-js";
|
|
3
3
|
import { useCrossFrameState as m } from "./useCrossFrameState.mjs";
|
|
4
4
|
const a = c(void 0), d = c(void 0), g = (t) => {
|
|
5
5
|
const [e, o] = m(C.INTLAYER_LOCALE_DICTIONARIES_CHANGED, void 0), u = i(() => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getContentNodeByKeyPath as f, renameContentNodeByKeyPath as j, editDictionaryByKeyPath as B } from "@intlayer/core";
|
|
2
2
|
import { MessageKey as m } from "@intlayer/editor";
|
|
3
3
|
import { NodeType as h } from "@intlayer/types";
|
|
4
|
-
import { createContext as g,
|
|
4
|
+
import { createContext as g, createComponent as T, useContext as p } from "solid-js";
|
|
5
5
|
import { useDictionariesRecord as H } from "./DictionariesRecordContext.mjs";
|
|
6
6
|
import { useCrossFrameMessageListener as _ } from "./useCrossFrameMessageListener.mjs";
|
|
7
7
|
import { useCrossFrameState as W } from "./useCrossFrameState.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageKey as t } from "@intlayer/editor";
|
|
2
|
-
import { createContext as n,
|
|
2
|
+
import { createContext as n, createComponent as E, useContext as a } from "solid-js";
|
|
3
3
|
import { useCrossFrameMessageListener as r } from "./useCrossFrameMessageListener.mjs";
|
|
4
4
|
import { useCrossFrameState as d } from "./useCrossFrameState.mjs";
|
|
5
5
|
const o = n({
|
|
@@ -9,7 +9,7 @@ const o = n({
|
|
|
9
9
|
emit: !1,
|
|
10
10
|
receive: !0
|
|
11
11
|
});
|
|
12
|
-
return
|
|
12
|
+
return E(o.Provider, {
|
|
13
13
|
value: {
|
|
14
14
|
enabled: s
|
|
15
15
|
},
|
|
@@ -17,7 +17,7 @@ const o = n({
|
|
|
17
17
|
return e.children;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
}, L = () =>
|
|
20
|
+
}, L = () => a(o);
|
|
21
21
|
export {
|
|
22
22
|
p as EditorEnabledProvider,
|
|
23
23
|
L as useEditorEnabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext as n,
|
|
2
|
-
const t = n(), s = () =>
|
|
1
|
+
import { createContext as n, createComponent as o, useContext as r } from "solid-js";
|
|
2
|
+
const t = n(), s = () => r(t), u = (e) => o(t.Provider, {
|
|
3
3
|
get value() {
|
|
4
4
|
return {
|
|
5
5
|
components: e.components
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { compile as o, compileMarkdown as d, compiler as n } from "./compiler.mjs";
|
|
2
2
|
import { MarkdownContext as t, MarkdownProvider as M, useMarkdown as k } from "./MarkdownProvider.mjs";
|
|
3
|
-
import { MarkdownMetadataRenderer as w, MarkdownRenderer as p, renderMarkdown as i, useMarkdownRenderer as
|
|
4
|
-
import {
|
|
3
|
+
import { MarkdownMetadataRenderer as w, MarkdownRenderer as p, renderMarkdown as i, useMarkdownRenderer as f } from "./MarkdownRenderer.mjs";
|
|
4
|
+
import { default as x } from "./runtime.mjs";
|
|
5
5
|
export {
|
|
6
6
|
t as MarkdownContext,
|
|
7
7
|
w as MarkdownMetadataRenderer,
|
|
@@ -11,7 +11,7 @@ export {
|
|
|
11
11
|
d as compileMarkdown,
|
|
12
12
|
n as compiler,
|
|
13
13
|
i as renderMarkdown,
|
|
14
|
-
|
|
14
|
+
x as solidRuntime,
|
|
15
15
|
k as useMarkdown,
|
|
16
|
-
|
|
16
|
+
f as useMarkdownRenderer
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-intlayer",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Solid applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@intlayer/api": "8.0.
|
|
78
|
-
"@intlayer/config": "8.0.
|
|
79
|
-
"@intlayer/core": "8.0.
|
|
80
|
-
"@intlayer/editor": "8.0.
|
|
81
|
-
"@intlayer/types": "8.0.
|
|
77
|
+
"@intlayer/api": "8.0.4",
|
|
78
|
+
"@intlayer/config": "8.0.4",
|
|
79
|
+
"@intlayer/core": "8.0.4",
|
|
80
|
+
"@intlayer/editor": "8.0.4",
|
|
81
|
+
"@intlayer/types": "8.0.4"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@intlayer/unmerged-dictionaries-entry": "8.0.
|
|
84
|
+
"@intlayer/unmerged-dictionaries-entry": "8.0.4",
|
|
85
85
|
"@solidjs/testing-library": "0.8.10",
|
|
86
86
|
"@testing-library/jest-dom": "6.9.1",
|
|
87
87
|
"@testing-library/user-event": "14.6.1",
|
package/dist/plugins-CYs2R9PT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const q=require("./web-Ch-xTpJg.js"),m=require("@intlayer/core"),s=require("@intlayer/types"),r=require("solid-js"),w=require("./cjs/client/IntlayerProvider.cjs");require("@intlayer/config/built");const T=require("./cjs/editor/useEditedContentRenderer.cjs"),p=require("./cjs/IntlayerNode.cjs");require("./cjs/markdown/MarkdownProvider.cjs");const h=require("./cjs/markdown/MarkdownRenderer.cjs"),N=require("./cjs/solidElement/renderSolidElement.cjs");require("./cjs/client/useLocaleStorage.cjs");require("./cjs/client/useLocaleBase.cjs");const M=require("./cjs/UI/ContentSelector.cjs");require("@intlayer/editor");require("./cjs/editor/contexts/ConfigurationContext.cjs");require("./cjs/editor/contexts/DictionariesRecordContext.cjs");require("./cjs/editor/contexts/EditedContentContext.cjs");const S=require("./cjs/editor/contexts/EditorEnabledContext.cjs");require("./cjs/editor/contexts/CommunicatorContext.cjs");const H=require("./cjs/editor/contexts/FocusDictionaryContext.cjs"),I=e=>{const{focusedContent:n,setFocusedContent:t}=H.useFocusDictionary(),l=r.createMemo(()=>e.keyPath.filter(a=>a.type!==s.NodeType.Translation)),i=()=>t({dictionaryKey:e.dictionaryKey,keyPath:l()}),c=r.createMemo(()=>(n?.dictionaryKey===e.dictionaryKey&&(n?.keyPath?.length??0)>0&&m.isSameKeyPath(n?.keyPath??[],l()))??!1);return r.createComponent(M.ContentSelector,{onPress:i,get isSelecting(){return c()},get children(){return e.children}})},y=e=>{const{enabled:n}=S.useEditorEnabled(),{disableEditor:t}=w.useIntlayerContext();return n()&&!t?r.createComponent(I,r.mergeProps(e,{get children(){return e.children}})):e.children},b={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:n,...t})=>p.renderIntlayerNode({...t,value:t.children,children:r.createComponent(y,r.mergeProps(t,{get children(){return r.createComponent(T.EditedContentRenderer,r.mergeProps(t,{get children(){return t.children}}))}}))})},K={id:"solid-node-plugin",canHandle:e=>typeof e=="object"&&e?.props!==void 0||typeof Node<"u"&&e instanceof Node,transform:(e,{plugins:n,...t})=>p.renderIntlayerNode({...t,value:"[[solid-element]]",children:r.createComponent(y,r.mergeProps(t,{get children(){return typeof Node<"u"&&e instanceof Node?e:N.renderSolidElement(e)}}))})},_=(e,n)=>{const t=m.splitInsertionTemplate(e,n);return t.isSimple,t.parts},E={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===s.NodeType.Insertion,transform:(e,n,t)=>{const l=[...n.keyPath,{type:s.NodeType.Insertion}],i=e[s.NodeType.Insertion];return t(i,{...n,children:i,keyPath:l,plugins:[{id:"insertion-string-plugin",canHandle:a=>typeof a=="string",transform:(a,u,g)=>{const f=g(a,{...u,children:a,plugins:[...(n.plugins??[]).filter(o=>o.id!=="intlayer-node-plugin"&&o.id!=="markdown-string-plugin"&&o.id!=="html-string-plugin")]});return o=>{const d=_(f,o);return g(d,{...u,plugins:n.plugins,children:d})}}},...n.plugins??[]]})}},P={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,n,t)=>{const{plugins:l,...i}=n,c=m.getMarkdownMetadata(e),u=t(c,{plugins:[{id:"markdown-metadata-plugin",canHandle:o=>typeof o=="string"||typeof o=="number"||typeof o=="boolean"||!o,transform:(o,d)=>p.renderIntlayerNode({...d,value:o,children:r.createComponent(y,r.mergeProps(i,{get children(){return r.createComponent(h.MarkdownMetadataRenderer,r.mergeProps(i,{get metadataKeyPath(){return d.keyPath},children:e}))}}))})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),g=o=>p.renderIntlayerNode({...n,value:e,children:r.createComponent(y,r.mergeProps(i,{get children(){return r.createComponent(h.MarkdownRenderer,r.mergeProps(i,o,{children:e}))}})),additionalProps:{metadata:u}}),f=g();return new Proxy(f,{get(o,d,k){return d==="value"?e:d==="metadata"?u:d==="use"?C=>g(C):Reflect.get(o,d,k)}})}},R={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===s.NodeType.Markdown,transform:(e,n,t)=>{const l=[...n.keyPath,{type:s.NodeType.Markdown}],i=e[s.NodeType.Markdown];return t(i,{...n,children:i,keyPath:l,plugins:[P,...n.plugins??[]]})}},v=()=>{const e={};for(const n of m.HTML_TAGS)e[n]=({children:t,...l})=>r.createComponent(q.Dynamic,r.mergeProps({component:n},l,{children:t}));return e},x=v(),L={id:"html-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===s.NodeType.HTML,transform:e=>{const n=e[s.NodeType.HTML],t=c=>{const a={...x,...c};return m.getHTML(n,a)},i=[t()];return new Proxy(i,{get(c,a,u){return a==="value"?n:a==="use"?g=>t(g):Reflect.get(c,a,u)}})}};exports.ContentSelectorRenderer=y;exports.htmlPlugin=L;exports.insertionPlugin=E;exports.intlayerNodePlugins=b;exports.markdownPlugin=R;exports.markdownStringPlugin=P;exports.solidNodePlugins=K;
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { D as w } from "./web-mv0y5CK4.mjs";
|
|
2
|
-
import { isSameKeyPath as M, HTML_TAGS as H, getMarkdownMetadata as C, getHTML as S, splitInsertionTemplate as T } from "@intlayer/core";
|
|
3
|
-
import { NodeType as d } from "@intlayer/types";
|
|
4
|
-
import { createComponent as s, mergeProps as c, createMemo as p } from "solid-js";
|
|
5
|
-
import { useIntlayerContext as b } from "./esm/client/IntlayerProvider.mjs";
|
|
6
|
-
import "@intlayer/config/built";
|
|
7
|
-
import { EditedContentRenderer as K } from "./esm/editor/useEditedContentRenderer.mjs";
|
|
8
|
-
import { renderIntlayerNode as y } from "./esm/IntlayerNode.mjs";
|
|
9
|
-
import "./esm/markdown/MarkdownProvider.mjs";
|
|
10
|
-
import { MarkdownMetadataRenderer as v, MarkdownRenderer as I } from "./esm/markdown/MarkdownRenderer.mjs";
|
|
11
|
-
import { renderSolidElement as R } from "./esm/solidElement/renderSolidElement.mjs";
|
|
12
|
-
import "./esm/client/useLocaleStorage.mjs";
|
|
13
|
-
import "./esm/client/useLocaleBase.mjs";
|
|
14
|
-
import { ContentSelector as L } from "./esm/UI/ContentSelector.mjs";
|
|
15
|
-
import "@intlayer/editor";
|
|
16
|
-
import "./esm/editor/contexts/ConfigurationContext.mjs";
|
|
17
|
-
import "./esm/editor/contexts/DictionariesRecordContext.mjs";
|
|
18
|
-
import "./esm/editor/contexts/EditedContentContext.mjs";
|
|
19
|
-
import { useEditorEnabled as E } from "./esm/editor/contexts/EditorEnabledContext.mjs";
|
|
20
|
-
import "./esm/editor/contexts/CommunicatorContext.mjs";
|
|
21
|
-
import { useFocusDictionary as N } from "./esm/editor/contexts/FocusDictionaryContext.mjs";
|
|
22
|
-
const j = (e) => {
|
|
23
|
-
const {
|
|
24
|
-
focusedContent: n,
|
|
25
|
-
setFocusedContent: t
|
|
26
|
-
} = N(), a = p(() => e.keyPath.filter((o) => o.type !== d.Translation)), i = () => t({
|
|
27
|
-
dictionaryKey: e.dictionaryKey,
|
|
28
|
-
keyPath: a()
|
|
29
|
-
}), u = p(() => (n?.dictionaryKey === e.dictionaryKey && (n?.keyPath?.length ?? 0) > 0 && M(n?.keyPath ?? [], a())) ?? !1);
|
|
30
|
-
return s(L, {
|
|
31
|
-
onPress: i,
|
|
32
|
-
get isSelecting() {
|
|
33
|
-
return u();
|
|
34
|
-
},
|
|
35
|
-
get children() {
|
|
36
|
-
return e.children;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}, f = (e) => {
|
|
40
|
-
const {
|
|
41
|
-
enabled: n
|
|
42
|
-
} = E(), {
|
|
43
|
-
disableEditor: t
|
|
44
|
-
} = b();
|
|
45
|
-
return n() && !t ? s(j, c(e, {
|
|
46
|
-
get children() {
|
|
47
|
-
return e.children;
|
|
48
|
-
}
|
|
49
|
-
})) : e.children;
|
|
50
|
-
}, ae = {
|
|
51
|
-
id: "intlayer-node-plugin",
|
|
52
|
-
canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
|
|
53
|
-
transform: (e, {
|
|
54
|
-
plugins: n,
|
|
55
|
-
// Removed to avoid next error - Functions cannot be passed directly to Client Components
|
|
56
|
-
...t
|
|
57
|
-
}) => y({
|
|
58
|
-
...t,
|
|
59
|
-
value: t.children,
|
|
60
|
-
children: s(f, c(t, {
|
|
61
|
-
get children() {
|
|
62
|
-
return s(K, c(t, {
|
|
63
|
-
get children() {
|
|
64
|
-
return t.children;
|
|
65
|
-
}
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
}))
|
|
69
|
-
})
|
|
70
|
-
}, le = {
|
|
71
|
-
id: "solid-node-plugin",
|
|
72
|
-
canHandle: (e) => typeof e == "object" && e?.props !== void 0 || typeof Node < "u" && e instanceof Node,
|
|
73
|
-
transform: (e, {
|
|
74
|
-
plugins: n,
|
|
75
|
-
// Removed to avoid next error - Functions cannot be passed directly to Client Components
|
|
76
|
-
...t
|
|
77
|
-
}) => y({
|
|
78
|
-
...t,
|
|
79
|
-
value: "[[solid-element]]",
|
|
80
|
-
children: s(f, c(t, {
|
|
81
|
-
get children() {
|
|
82
|
-
return typeof Node < "u" && e instanceof Node ? e : R(e);
|
|
83
|
-
}
|
|
84
|
-
}))
|
|
85
|
-
})
|
|
86
|
-
}, x = (e, n) => {
|
|
87
|
-
const t = T(e, n);
|
|
88
|
-
return t.isSimple, t.parts;
|
|
89
|
-
}, se = {
|
|
90
|
-
id: "insertion-plugin",
|
|
91
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType === d.Insertion,
|
|
92
|
-
transform: (e, n, t) => {
|
|
93
|
-
const a = [...n.keyPath, {
|
|
94
|
-
type: d.Insertion
|
|
95
|
-
}], i = e[d.Insertion];
|
|
96
|
-
return t(i, {
|
|
97
|
-
...n,
|
|
98
|
-
children: i,
|
|
99
|
-
keyPath: a,
|
|
100
|
-
plugins: [{
|
|
101
|
-
id: "insertion-string-plugin",
|
|
102
|
-
canHandle: (o) => typeof o == "string",
|
|
103
|
-
transform: (o, m, g) => {
|
|
104
|
-
const h = g(o, {
|
|
105
|
-
...m,
|
|
106
|
-
children: o,
|
|
107
|
-
plugins: [...(n.plugins ?? []).filter((r) => r.id !== "intlayer-node-plugin" && r.id !== "markdown-string-plugin" && r.id !== "html-string-plugin")]
|
|
108
|
-
});
|
|
109
|
-
return (r) => {
|
|
110
|
-
const l = x(h, r);
|
|
111
|
-
return g(l, {
|
|
112
|
-
...m,
|
|
113
|
-
plugins: n.plugins,
|
|
114
|
-
children: l
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}, ...n.plugins ?? []]
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}, D = {
|
|
122
|
-
id: "markdown-string-plugin",
|
|
123
|
-
canHandle: (e) => typeof e == "string",
|
|
124
|
-
transform: (e, n, t) => {
|
|
125
|
-
const {
|
|
126
|
-
plugins: a,
|
|
127
|
-
// Removed to avoid next error - Functions cannot be passed directly to Client Components
|
|
128
|
-
...i
|
|
129
|
-
} = n, u = C(e), m = t(u, {
|
|
130
|
-
plugins: [{
|
|
131
|
-
id: "markdown-metadata-plugin",
|
|
132
|
-
canHandle: (r) => typeof r == "string" || typeof r == "number" || typeof r == "boolean" || !r,
|
|
133
|
-
transform: (r, l) => y({
|
|
134
|
-
...l,
|
|
135
|
-
value: r,
|
|
136
|
-
children: s(f, c(i, {
|
|
137
|
-
get children() {
|
|
138
|
-
return s(v, c(i, {
|
|
139
|
-
get metadataKeyPath() {
|
|
140
|
-
return l.keyPath;
|
|
141
|
-
},
|
|
142
|
-
children: e
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
145
|
-
}))
|
|
146
|
-
})
|
|
147
|
-
}],
|
|
148
|
-
dictionaryKey: i.dictionaryKey,
|
|
149
|
-
keyPath: []
|
|
150
|
-
}), g = (r) => y({
|
|
151
|
-
...n,
|
|
152
|
-
value: e,
|
|
153
|
-
children: s(f, c(i, {
|
|
154
|
-
get children() {
|
|
155
|
-
return s(I, c(i, r, {
|
|
156
|
-
children: e
|
|
157
|
-
}));
|
|
158
|
-
}
|
|
159
|
-
})),
|
|
160
|
-
additionalProps: {
|
|
161
|
-
metadata: m
|
|
162
|
-
}
|
|
163
|
-
}), h = g();
|
|
164
|
-
return new Proxy(h, {
|
|
165
|
-
get(r, l, P) {
|
|
166
|
-
return l === "value" ? e : l === "metadata" ? m : l === "use" ? (k) => g(k) : Reflect.get(r, l, P);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}, ce = {
|
|
171
|
-
id: "markdown-plugin",
|
|
172
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType === d.Markdown,
|
|
173
|
-
transform: (e, n, t) => {
|
|
174
|
-
const a = [...n.keyPath, {
|
|
175
|
-
type: d.Markdown
|
|
176
|
-
}], i = e[d.Markdown];
|
|
177
|
-
return t(i, {
|
|
178
|
-
...n,
|
|
179
|
-
children: i,
|
|
180
|
-
keyPath: a,
|
|
181
|
-
plugins: [D, ...n.plugins ?? []]
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}, A = () => {
|
|
185
|
-
const e = {};
|
|
186
|
-
for (const n of H)
|
|
187
|
-
e[n] = ({
|
|
188
|
-
children: t,
|
|
189
|
-
...a
|
|
190
|
-
}) => s(w, c({
|
|
191
|
-
component: n
|
|
192
|
-
}, a, {
|
|
193
|
-
children: t
|
|
194
|
-
}));
|
|
195
|
-
return e;
|
|
196
|
-
}, F = A(), de = {
|
|
197
|
-
id: "html-plugin",
|
|
198
|
-
canHandle: (e) => typeof e == "object" && e?.nodeType === d.HTML,
|
|
199
|
-
transform: (e) => {
|
|
200
|
-
const n = e[d.HTML], t = (u) => {
|
|
201
|
-
const o = {
|
|
202
|
-
...F,
|
|
203
|
-
...u
|
|
204
|
-
};
|
|
205
|
-
return S(n, o);
|
|
206
|
-
}, i = [t()];
|
|
207
|
-
return new Proxy(i, {
|
|
208
|
-
get(u, o, m) {
|
|
209
|
-
return o === "value" ? n : o === "use" ? (g) => t(g) : Reflect.get(u, o, m);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
export {
|
|
215
|
-
f as C,
|
|
216
|
-
se as a,
|
|
217
|
-
D as b,
|
|
218
|
-
de as h,
|
|
219
|
-
ae as i,
|
|
220
|
-
ce as m,
|
|
221
|
-
le as s
|
|
222
|
-
};
|