solid-intlayer 8.1.2 → 8.1.3

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.
Files changed (77) hide show
  1. package/dist/cjs/UI/ContentSelector.cjs +1 -1
  2. package/dist/cjs/client/IntlayerProvider.cjs +1 -1
  3. package/dist/cjs/client/format/useIntl.cjs +1 -1
  4. package/dist/cjs/client/getBrowserLocale.cjs +1 -1
  5. package/dist/cjs/client/t.cjs +1 -1
  6. package/dist/cjs/client/useLocaleStorage.cjs +1 -1
  7. package/dist/cjs/client/useRewriteURL.cjs +1 -1
  8. package/dist/cjs/client/useTraduction.cjs +1 -1
  9. package/dist/cjs/editor/ContentSelectorWrapper.cjs +1 -1
  10. package/dist/cjs/editor/IntlayerEditorProvider.cjs +1 -1
  11. package/dist/cjs/editor/contexts/CommunicatorContext.cjs +1 -1
  12. package/dist/cjs/editor/contexts/ConfigurationContext.cjs +1 -1
  13. package/dist/cjs/editor/contexts/DictionariesRecordContext.cjs +1 -1
  14. package/dist/cjs/editor/contexts/EditedContentContext.cjs +1 -1
  15. package/dist/cjs/editor/contexts/EditorEnabledContext.cjs +1 -1
  16. package/dist/cjs/editor/contexts/EditorProvider.cjs +1 -1
  17. package/dist/cjs/editor/contexts/FocusDictionaryContext.cjs +1 -1
  18. package/dist/cjs/editor/index.cjs +1 -1
  19. package/dist/cjs/editor/useEditedContentRenderer.cjs +1 -1
  20. package/dist/cjs/getDictionary.cjs +1 -1
  21. package/dist/cjs/getIntlayer.cjs +1 -1
  22. package/dist/cjs/html/HTMLProvider.cjs +1 -1
  23. package/dist/cjs/html/HTMLRenderer.cjs +1 -1
  24. package/dist/cjs/index.cjs +1 -1
  25. package/dist/cjs/markdown/MarkdownProvider.cjs +1 -1
  26. package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
  27. package/dist/cjs/markdown/compiler.cjs +1 -1
  28. package/dist/cjs/markdown/runtime.cjs +1 -1
  29. package/dist/cjs/plugins.cjs +1 -1
  30. package/dist/cjs/solidElement/renderSolidElement.cjs +1 -1
  31. package/dist/esm/UI/ContentSelector.mjs +7 -7
  32. package/dist/esm/client/IntlayerProvider.mjs +7 -6
  33. package/dist/esm/client/format/useIntl.mjs +1 -1
  34. package/dist/esm/client/getBrowserLocale.mjs +1 -1
  35. package/dist/esm/client/t.mjs +1 -1
  36. package/dist/esm/client/useLocaleStorage.mjs +8 -7
  37. package/dist/esm/client/useRewriteURL.mjs +1 -1
  38. package/dist/esm/client/useTraduction.mjs +1 -1
  39. package/dist/esm/editor/ContentSelectorWrapper.mjs +7 -3
  40. package/dist/esm/editor/IntlayerEditorProvider.mjs +5 -5
  41. package/dist/esm/editor/contexts/CommunicatorContext.mjs +13 -12
  42. package/dist/esm/editor/contexts/ConfigurationContext.mjs +9 -8
  43. package/dist/esm/editor/contexts/DictionariesRecordContext.mjs +12 -11
  44. package/dist/esm/editor/contexts/EditedContentContext.mjs +14 -13
  45. package/dist/esm/editor/contexts/EditorEnabledContext.mjs +10 -9
  46. package/dist/esm/editor/contexts/EditorProvider.mjs +6 -6
  47. package/dist/esm/editor/contexts/FocusDictionaryContext.mjs +14 -13
  48. package/dist/esm/editor/index.mjs +1 -1
  49. package/dist/esm/editor/useEditedContentRenderer.mjs +4 -3
  50. package/dist/esm/getDictionary.mjs +2 -2
  51. package/dist/esm/getIntlayer.mjs +2 -2
  52. package/dist/esm/html/HTMLProvider.mjs +5 -4
  53. package/dist/esm/html/HTMLRenderer.mjs +12 -11
  54. package/dist/esm/index.mjs +50 -49
  55. package/dist/esm/markdown/MarkdownProvider.mjs +29 -28
  56. package/dist/esm/markdown/MarkdownRenderer.mjs +18 -17
  57. package/dist/esm/markdown/compiler.mjs +1 -1
  58. package/dist/esm/markdown/runtime.mjs +7 -8
  59. package/dist/esm/plugins.mjs +11 -10
  60. package/dist/esm/solidElement/renderSolidElement.mjs +1 -1
  61. package/dist/{plugins-BKpuMxBh.mjs → plugins-BDLeP00w.mjs} +80 -75
  62. package/dist/plugins-BNX3Lsth.js +1 -0
  63. package/dist/types/IntlayerNode.d.ts +1 -1
  64. package/dist/types/client/useDictionaryAsync.d.ts +1 -1
  65. package/dist/types/client/useDictionaryDynamic.d.ts +1 -1
  66. package/dist/types/editor/ContentSelectorWrapper.d.ts +1 -1
  67. package/dist/types/getDictionary.d.ts +1 -1
  68. package/dist/types/getIntlayer.d.ts +1 -1
  69. package/dist/types/html/types.d.ts +1 -1
  70. package/dist/types/index.d.ts +1 -1
  71. package/dist/types/markdown/compiler.d.ts +1 -1
  72. package/dist/types/markdown/runtime.d.ts +1 -1
  73. package/dist/types/plugins.d.ts +4 -4
  74. package/package.json +7 -7
  75. package/dist/plugins-CR0xYCzd.js +0 -1
  76. package/dist/web-Ch-xTpJg.js +0 -1
  77. package/dist/web-mv0y5CK4.mjs +0 -567
@@ -1,11 +1,12 @@
1
- import { getContentNodeByKeyPath as f, renameContentNodeByKeyPath as j, editDictionaryByKeyPath as B } from "@intlayer/core";
1
+ import { createComponent as h } from "solid-js/web";
2
+ import { getContentNodeByKeyPath as f, renameContentNodeByKeyPath as j, editDictionaryByKeyPath as B } from "@intlayer/core/dictionaryManipulator";
2
3
  import { MessageKey as m } from "@intlayer/editor";
3
- import { NodeType as h } from "@intlayer/types";
4
- import { createContext as g, createComponent as T, useContext as p } from "solid-js";
4
+ import { NodeType as T } from "@intlayer/types";
5
+ import { createContext as g, useContext as p } from "solid-js";
5
6
  import { useDictionariesRecord as H } from "./DictionariesRecordContext.mjs";
6
7
  import { useCrossFrameMessageListener as _ } from "./useCrossFrameMessageListener.mjs";
7
8
  import { useCrossFrameState as W } from "./useCrossFrameState.mjs";
8
- const x = g(void 0), Q = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u), U = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/get`, u), A = g(void 0), X = (u) => {
9
+ const x = g(void 0), U = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u), X = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/get`, u), A = g(void 0), Z = (u) => {
9
10
  const {
10
11
  localeDictionaries: a
11
12
  } = H(), [N, c] = W(m.INTLAYER_EDITED_CONTENT_CHANGED), P = (t) => {
@@ -70,7 +71,7 @@ const x = g(void 0), Q = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u
70
71
  c((e) => {
71
72
  const s = a[t]?.content, d = structuredClone(e?.[t]?.content ?? s), C = structuredClone(d), o = n.slice(0, -1), r = n[n.length - 1]?.key;
72
73
  if (r) {
73
- const i = f(C, o.filter((l) => l.type !== h.Translation));
74
+ const i = f(C, o.filter((l) => l.type !== T.Translation));
74
75
  i && typeof i == "object" && r in i && delete i[r];
75
76
  }
76
77
  return {
@@ -101,7 +102,7 @@ const x = g(void 0), Q = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u
101
102
  }, y = (t, n) => {
102
103
  const e = N();
103
104
  if (!e) return;
104
- const s = n.filter((o) => o.type !== h.Translation);
105
+ const s = n.filter((o) => o.type !== T.Translation);
105
106
  if (t.includes(":local:") || t.includes(":remote:")) {
106
107
  const o = e?.[t]?.content ?? {};
107
108
  return f(o, s);
@@ -125,10 +126,10 @@ const x = g(void 0), Q = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u
125
126
  clearEditedContent: k,
126
127
  getEditedContentValue: y
127
128
  };
128
- return T(x.Provider, {
129
+ return h(x.Provider, {
129
130
  value: F,
130
131
  get children() {
131
- return T(A.Provider, {
132
+ return h(A.Provider, {
132
133
  value: G,
133
134
  get children() {
134
135
  return u.children;
@@ -136,7 +137,7 @@ const x = g(void 0), Q = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u
136
137
  });
137
138
  }
138
139
  });
139
- }, Y = () => p(A), Z = () => {
140
+ }, Y = () => p(A), K = () => {
140
141
  const u = Y(), a = p(x);
141
142
  if (!a)
142
143
  throw new Error("useEditedContent must be used within a EditedContentProvider");
@@ -146,9 +147,9 @@ const x = g(void 0), Q = (u) => _(`${m.INTLAYER_EDITED_CONTENT_CHANGED}/post`, u
146
147
  };
147
148
  };
148
149
  export {
149
- X as EditedContentProvider,
150
- Z as useEditedContent,
150
+ Z as EditedContentProvider,
151
+ K as useEditedContent,
151
152
  Y as useEditedContentActions,
152
- U as useGetEditedContentState,
153
- Q as usePostEditedContentState
153
+ X as useGetEditedContentState,
154
+ U as usePostEditedContentState
154
155
  };
@@ -1,15 +1,16 @@
1
+ import { createComponent as n } from "solid-js/web";
1
2
  import { MessageKey as t } from "@intlayer/editor";
2
- import { createContext as n, createComponent as E, useContext as a } from "solid-js";
3
+ import { createContext as E, useContext as a } from "solid-js";
3
4
  import { useCrossFrameMessageListener as r } from "./useCrossFrameMessageListener.mjs";
4
5
  import { useCrossFrameState as d } from "./useCrossFrameState.mjs";
5
- const o = n({
6
+ const o = E({
6
7
  enabled: () => !1
7
- }), i = (e) => d(t.INTLAYER_EDITOR_ENABLED, !1, e), b = (e) => r(`${t.INTLAYER_EDITOR_ENABLED}/post`, e), f = (e) => r(`${t.INTLAYER_EDITOR_ENABLED}/get`, e), p = (e) => {
8
+ }), i = (e) => d(t.INTLAYER_EDITOR_ENABLED, !1, e), f = (e) => r(`${t.INTLAYER_EDITOR_ENABLED}/post`, e), p = (e) => r(`${t.INTLAYER_EDITOR_ENABLED}/get`, e), L = (e) => {
8
9
  const [s] = i({
9
10
  emit: !1,
10
11
  receive: !0
11
12
  });
12
- return E(o.Provider, {
13
+ return n(o.Provider, {
13
14
  value: {
14
15
  enabled: s
15
16
  },
@@ -17,11 +18,11 @@ const o = n({
17
18
  return e.children;
18
19
  }
19
20
  });
20
- }, L = () => a(o);
21
+ }, A = () => a(o);
21
22
  export {
22
- p as EditorEnabledProvider,
23
- L as useEditorEnabled,
23
+ L as EditorEnabledProvider,
24
+ A as useEditorEnabled,
24
25
  i as useEditorEnabledState,
25
- f as useGetEditorEnabledState,
26
- b as usePostEditorEnabledState
26
+ p as useGetEditorEnabledState,
27
+ f as usePostEditorEnabledState
27
28
  };
@@ -1,10 +1,10 @@
1
- import { m as i } from "../../../web-mv0y5CK4.mjs";
2
- import { createComponent as r, createSignal as d, createEffect as o } from "solid-js";
1
+ import { createComponent as r, memo as i } from "solid-js/web";
2
+ import { createSignal as d, createEffect as o } from "solid-js";
3
3
  import { CommunicatorProvider as c } from "./CommunicatorContext.mjs";
4
4
  import { ConfigurationProvider as a } from "./ConfigurationContext.mjs";
5
5
  import { DictionariesRecordProvider as l } from "./DictionariesRecordContext.mjs";
6
- import { useGetEditedContentState as u, EditedContentProvider as m } from "./EditedContentContext.mjs";
7
- import { EditorEnabledProvider as g, useGetEditorEnabledState as f, useEditorEnabled as s } from "./EditorEnabledContext.mjs";
6
+ import { useGetEditedContentState as u, EditedContentProvider as g } from "./EditedContentContext.mjs";
7
+ import { EditorEnabledProvider as m, useGetEditorEnabledState as f, useEditorEnabled as s } from "./EditorEnabledContext.mjs";
8
8
  import { FocusDictionaryProvider as h } from "./FocusDictionaryContext.mjs";
9
9
  const E = (e) => {
10
10
  const t = u();
@@ -12,7 +12,7 @@ const E = (e) => {
12
12
  t();
13
13
  }), r(l, {
14
14
  get children() {
15
- return r(m, {
15
+ return r(g, {
16
16
  get children() {
17
17
  return r(h, {
18
18
  get children() {
@@ -35,7 +35,7 @@ const E = (e) => {
35
35
  return o(() => {
36
36
  n(window.self !== window.top);
37
37
  }), i(() => i(() => !!t())() ? e.children : e.fallback);
38
- }, G = (e) => r(g, {
38
+ }, G = (e) => r(m, {
39
39
  get children() {
40
40
  return r(a, {
41
41
  get configuration() {
@@ -1,23 +1,24 @@
1
+ import { createComponent as n } from "solid-js/web";
1
2
  import { MessageKey as C } from "@intlayer/editor";
2
- import { createContext as i, createComponent as r, useContext as s } from "solid-js";
3
+ import { createContext as i, useContext as s } from "solid-js";
3
4
  import { useCrossFrameState as F } from "./useCrossFrameState.mjs";
4
- const c = i(void 0), u = i(void 0), f = (t) => {
5
- const [o, n] = F(C.INTLAYER_FOCUSED_CONTENT_CHANGED, null), a = (d) => {
6
- n((e) => e && {
5
+ const c = i(void 0), u = i(void 0), h = (t) => {
6
+ const [o, r] = F(C.INTLAYER_FOCUSED_CONTENT_CHANGED, null), a = (d) => {
7
+ r((e) => e && {
7
8
  ...e,
8
9
  keyPath: d
9
10
  });
10
11
  };
11
- return r(c.Provider, {
12
+ return n(c.Provider, {
12
13
  get value() {
13
14
  return {
14
15
  focusedContent: o()
15
16
  };
16
17
  },
17
18
  get children() {
18
- return r(u.Provider, {
19
+ return n(u.Provider, {
19
20
  value: {
20
- setFocusedContent: n,
21
+ setFocusedContent: r,
21
22
  setFocusedContentKeyPath: a
22
23
  },
23
24
  get children() {
@@ -26,13 +27,13 @@ const c = i(void 0), u = i(void 0), f = (t) => {
26
27
  });
27
28
  }
28
29
  });
29
- }, y = () => {
30
+ }, m = () => {
30
31
  const t = s(u);
31
32
  if (t === void 0)
32
33
  throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");
33
34
  return t;
34
- }, h = () => {
35
- const t = y(), o = s(c);
35
+ }, x = () => {
36
+ const t = m(), o = s(c);
36
37
  if (o === void 0)
37
38
  throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");
38
39
  return {
@@ -41,7 +42,7 @@ const c = i(void 0), u = i(void 0), f = (t) => {
41
42
  };
42
43
  };
43
44
  export {
44
- f as FocusDictionaryProvider,
45
- h as useFocusDictionary,
46
- y as useFocusDictionaryActions
45
+ h as FocusDictionaryProvider,
46
+ x as useFocusDictionary,
47
+ m as useFocusDictionaryActions
47
48
  };
@@ -1,4 +1,4 @@
1
- import { C as o } from "../../plugins-BKpuMxBh.mjs";
1
+ import { C as o } from "../../plugins-BDLeP00w.mjs";
2
2
  export {
3
3
  o as ContentSelectorRenderer
4
4
  };
@@ -1,9 +1,10 @@
1
- import { getContent as r } from "@intlayer/core";
1
+ import { getContent as r } from "@intlayer/core/interpreter";
2
2
  import "@intlayer/editor";
3
3
  import "./contexts/ConfigurationContext.mjs";
4
4
  import "./contexts/DictionariesRecordContext.mjs";
5
5
  import { useEditedContentActions as i } from "./contexts/EditedContentContext.mjs";
6
6
  import "./contexts/EditorEnabledContext.mjs";
7
+ import "solid-js/web";
7
8
  import "solid-js";
8
9
  import "./contexts/CommunicatorContext.mjs";
9
10
  import "./contexts/FocusDictionaryContext.mjs";
@@ -14,7 +15,7 @@ const d = ({
14
15
  }) => {
15
16
  const o = i();
16
17
  return o ? o.getEditedContentValue(e, n) ?? t : t;
17
- }, y = (e) => {
18
+ }, V = (e) => {
18
19
  const n = d(e);
19
20
  if (typeof n == "object") {
20
21
  const t = r(n, e, e.locale);
@@ -23,6 +24,6 @@ const d = ({
23
24
  return n;
24
25
  };
25
26
  export {
26
- y as EditedContentRenderer,
27
+ V as EditedContentRenderer,
27
28
  d as useEditedContentRenderer
28
29
  };
@@ -1,5 +1,5 @@
1
- import { getDictionary as s } from "@intlayer/core";
2
- import { i as r, s as a, a as e, m as g, h as l } from "../plugins-BKpuMxBh.mjs";
1
+ import { getDictionary as s } from "@intlayer/core/interpreter";
2
+ import { i as r, s as a, a as e, m as g, h as l } from "../plugins-BDLeP00w.mjs";
3
3
  const c = (i, n, o) => {
4
4
  const t = [
5
5
  r,
@@ -1,5 +1,5 @@
1
- import { getIntlayer as r } from "@intlayer/core";
2
- import { i as a, s as e, a as l, m as o, h as g } from "../plugins-BKpuMxBh.mjs";
1
+ import { getIntlayer as r } from "@intlayer/core/interpreter";
2
+ import { i as a, s as e, a as l, m as o, h as g } from "../plugins-BDLeP00w.mjs";
3
3
  const P = (n, t, s) => {
4
4
  const i = [
5
5
  a,
@@ -1,5 +1,6 @@
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, {
1
+ import { createComponent as o } from "solid-js/web";
2
+ import { createContext as n, useContext as r } from "solid-js";
3
+ const t = n(), i = () => r(t), s = (e) => o(t.Provider, {
3
4
  get value() {
4
5
  return {
5
6
  components: e.components
@@ -10,6 +11,6 @@ const t = n(), s = () => r(t), u = (e) => o(t.Provider, {
10
11
  }
11
12
  });
12
13
  export {
13
- u as HTMLProvider,
14
- s as useHTMLContext
14
+ s as HTMLProvider,
15
+ i as useHTMLContext
15
16
  };
@@ -1,15 +1,16 @@
1
- import { m as c, D as m } from "../../web-mv0y5CK4.mjs";
2
- import { HTML_TAGS as s, getHTML as d } from "@intlayer/core";
3
- import { createMemo as i, createComponent as a, mergeProps as u } from "solid-js";
4
- import { useEditedContentRenderer as y } from "../editor/useEditedContentRenderer.mjs";
5
- import { useHTMLContext as f } from "./HTMLProvider.mjs";
1
+ import { memo as c, createComponent as m, Dynamic as s, mergeProps as i } from "solid-js/web";
2
+ import { getHTML as d } from "@intlayer/core/interpreter";
3
+ import { HTML_TAGS as a } from "@intlayer/core/transpiler";
4
+ import { createMemo as f } from "solid-js";
5
+ import { useEditedContentRenderer as u } from "../editor/useEditedContentRenderer.mjs";
6
+ import { useHTMLContext as y } from "./HTMLProvider.mjs";
6
7
  const T = () => {
7
8
  const e = {};
8
- for (const t of s)
9
+ for (const t of a)
9
10
  e[t] = ({
10
11
  children: n,
11
12
  ...o
12
- }) => a(m, u({
13
+ }) => m(s, i({
13
14
  component: t
14
15
  }, o, {
15
16
  children: n
@@ -26,17 +27,17 @@ const T = () => {
26
27
  }, H = ({
27
28
  components: e
28
29
  } = {}) => {
29
- const t = f();
30
+ const t = y();
30
31
  return (n) => M(n, {
31
32
  components: {
32
33
  ...t?.components,
33
34
  ...e
34
35
  }
35
36
  });
36
- }, x = (e) => {
37
+ }, P = (e) => {
37
38
  const t = H({
38
39
  components: e.components || e.userComponents
39
- }), n = () => e.children || e.html || "", o = i(() => y({
40
+ }), n = () => e.children || e.html || "", o = f(() => u({
40
41
  dictionaryKey: e.dictionaryKey,
41
42
  keyPath: e.keyPath,
42
43
  children: n()
@@ -44,7 +45,7 @@ const T = () => {
44
45
  return c(() => t(r()));
45
46
  };
46
47
  export {
47
- x as HTMLRenderer,
48
+ P as HTMLRenderer,
48
49
  C as defaultHTMLComponents,
49
50
  M as renderHTML,
50
51
  H as useHTMLRenderer
@@ -1,53 +1,54 @@
1
- import { useIntl as r } from "./client/format/useIntl.mjs";
2
- import { getBrowserLocale as a } from "./client/getBrowserLocale.mjs";
3
- import { IntlayerClientContext as m, IntlayerProvider as x, IntlayerProviderContent as p, useIntlayerContext as f } from "./client/IntlayerProvider.mjs";
4
- import { t as l } from "./client/t.mjs";
5
- import { useDictionary as c } from "./client/useDictionary.mjs";
6
- import { useDictionaryAsync as d } from "./client/useDictionaryAsync.mjs";
7
- import { useDictionaryDynamic as L } from "./client/useDictionaryDynamic.mjs";
8
- import { useIntlayer as M } from "./client/useIntlayer.mjs";
9
- import { useLoadDynamic as C } from "./client/useLoadDynamic.mjs";
10
- import { useLocale as w } from "./client/useLocale.mjs";
11
- import { useLocaleBase as R } from "./client/useLocaleBase.mjs";
12
- import { localeCookie as H, localeInStorage as P, setLocaleCookie as T, setLocaleInStorage as S, useLocaleCookie as B, useLocaleStorage as A } from "./client/useLocaleStorage.mjs";
13
- import { useRewriteURL as b } from "./client/useRewriteURL.mjs";
14
- import { getDictionary as j } from "./getDictionary.mjs";
15
- import { getIntlayer as z } from "./getIntlayer.mjs";
16
- import { HTMLProvider as F } from "./html/HTMLProvider.mjs";
17
- import { HTMLRenderer as J, renderHTML as K, useHTMLRenderer as N } from "./html/HTMLRenderer.mjs";
18
- import { compileMarkdown as Q } from "./markdown/compiler.mjs";
19
- import { MarkdownProvider as W, useMarkdown as X } from "./markdown/MarkdownProvider.mjs";
20
- import { MarkdownRenderer as Z } from "./markdown/MarkdownRenderer.mjs";
1
+ import { useIntl as t } from "./client/format/useIntl.mjs";
2
+ import { getBrowserLocale as n } from "./client/getBrowserLocale.mjs";
3
+ import { IntlayerClientContext as p, IntlayerProvider as x, IntlayerProviderContent as i, useIntlayerContext as f } from "./client/IntlayerProvider.mjs";
4
+ import { t as s } from "./client/t.mjs";
5
+ import { useDictionary as u } from "./client/useDictionary.mjs";
6
+ import { useDictionaryAsync as y } from "./client/useDictionaryAsync.mjs";
7
+ import { useDictionaryDynamic as I } from "./client/useDictionaryDynamic.mjs";
8
+ import { useIntlayer as k } from "./client/useIntlayer.mjs";
9
+ import { useLoadDynamic as g } from "./client/useLoadDynamic.mjs";
10
+ import { useLocale as D } from "./client/useLocale.mjs";
11
+ import { useLocaleBase as v } from "./client/useLocaleBase.mjs";
12
+ import { localeCookie as P, localeInStorage as T, setLocaleCookie as S, setLocaleInStorage as B, useLocaleCookie as A, useLocaleStorage as U } from "./client/useLocaleStorage.mjs";
13
+ import { useRewriteURL as h } from "./client/useRewriteURL.mjs";
14
+ import { getDictionary as q } from "./getDictionary.mjs";
15
+ import { getIntlayer as E } from "./getIntlayer.mjs";
16
+ import { HTMLProvider as G } from "./html/HTMLProvider.mjs";
17
+ import { HTMLRenderer as K, renderHTML as N, useHTMLRenderer as O } from "./html/HTMLRenderer.mjs";
18
+ import { compileMarkdown as V } from "./markdown/compiler.mjs";
19
+ import { MarkdownProvider as X, useMarkdown as Y } from "./markdown/MarkdownProvider.mjs";
20
+ import { MarkdownRenderer as _ } from "./markdown/MarkdownRenderer.mjs";
21
+ import "solid-js/web";
21
22
  export {
22
- F as HTMLProvider,
23
- J as HTMLRenderer,
24
- m as IntlayerClientContext,
23
+ G as HTMLProvider,
24
+ K as HTMLRenderer,
25
+ p as IntlayerClientContext,
25
26
  x as IntlayerProvider,
26
- p as IntlayerProviderContent,
27
- W as MarkdownProvider,
28
- Z as MarkdownRenderer,
29
- Q as compileMarkdown,
30
- a as getBrowserLocale,
31
- j as getDictionary,
32
- z as getIntlayer,
33
- H as localeCookie,
34
- P as localeInStorage,
35
- K as renderHTML,
36
- T as setLocaleCookie,
37
- S as setLocaleInStorage,
38
- l as t,
39
- c as useDictionary,
40
- d as useDictionaryAsync,
41
- L as useDictionaryDynamic,
42
- N as useHTMLRenderer,
43
- r as useIntl,
44
- M as useIntlayer,
27
+ i as IntlayerProviderContent,
28
+ X as MarkdownProvider,
29
+ _ as MarkdownRenderer,
30
+ V as compileMarkdown,
31
+ n as getBrowserLocale,
32
+ q as getDictionary,
33
+ E as getIntlayer,
34
+ P as localeCookie,
35
+ T as localeInStorage,
36
+ N as renderHTML,
37
+ S as setLocaleCookie,
38
+ B as setLocaleInStorage,
39
+ s as t,
40
+ u as useDictionary,
41
+ y as useDictionaryAsync,
42
+ I as useDictionaryDynamic,
43
+ O as useHTMLRenderer,
44
+ t as useIntl,
45
+ k as useIntlayer,
45
46
  f as useIntlayerContext,
46
- C as useLoadDynamic,
47
- w as useLocale,
48
- R as useLocaleBase,
49
- B as useLocaleCookie,
50
- A as useLocaleStorage,
51
- X as useMarkdown,
52
- b as useRewriteURL
47
+ g as useLoadDynamic,
48
+ D as useLocale,
49
+ v as useLocaleBase,
50
+ A as useLocaleCookie,
51
+ U as useLocaleStorage,
52
+ Y as useMarkdown,
53
+ h as useRewriteURL
53
54
  };
@@ -1,46 +1,47 @@
1
- import { createContext as k, createComponent as s, useContext as u } from "solid-js";
1
+ import { createComponent as k } from "solid-js/web";
2
+ import { createContext as s, useContext as u } from "solid-js";
2
3
  import { compileMarkdown as M } from "./compiler.mjs";
3
- const n = k(), h = (e) => {
4
- const o = (t, r) => {
5
- if (e.renderMarkdown)
6
- return e.renderMarkdown(t, r);
7
- const a = r && typeof r == "object" && ("components" in r || "wrapper" in r || "forceBlock" in r || "preserveFrontmatter" in r || "tagfilter" in r), {
4
+ const o = s(), x = (r) => {
5
+ const n = (e, t) => {
6
+ if (r.renderMarkdown)
7
+ return r.renderMarkdown(e, t);
8
+ const a = t && typeof t == "object" && ("components" in t || "wrapper" in t || "forceBlock" in t || "preserveFrontmatter" in t || "tagfilter" in t), {
8
9
  components: c,
9
- wrapper: l,
10
- forceBlock: m,
10
+ wrapper: m,
11
+ forceBlock: l,
11
12
  preserveFrontmatter: i,
12
13
  tagfilter: w,
13
14
  ...p
14
- } = a ? r : {
15
- components: r
16
- }, d = c || p, f = {
17
- forceBlock: m ?? e.forceBlock,
18
- preserveFrontmatter: i ?? e.preserveFrontmatter,
19
- tagfilter: w ?? e.tagfilter,
20
- wrapper: l || e.wrapper,
15
+ } = a ? t : {
16
+ components: t
17
+ }, f = c || p, d = {
18
+ forceBlock: l ?? r.forceBlock,
19
+ preserveFrontmatter: i ?? r.preserveFrontmatter,
20
+ tagfilter: w ?? r.tagfilter,
21
+ wrapper: m || r.wrapper,
21
22
  components: {
22
- ...e.components,
23
- ...d
23
+ ...r.components,
24
+ ...f
24
25
  }
25
26
  };
26
- return M(t, f);
27
+ return M(e, d);
27
28
  };
28
- return s(n.Provider, {
29
+ return k(o.Provider, {
29
30
  value: {
30
- renderMarkdown: o
31
+ renderMarkdown: n
31
32
  },
32
33
  get children() {
33
- return e.children;
34
+ return r.children;
34
35
  }
35
36
  });
36
- }, x = () => {
37
- const e = u(n);
38
- if (!e)
37
+ }, C = () => {
38
+ const r = u(o);
39
+ if (!r)
39
40
  throw new Error("useMarkdown must be used within a MarkdownProvider. To fix this error, wrap your component with <MarkdownProvider>.");
40
- return e;
41
+ return r;
41
42
  };
42
43
  export {
43
- n as MarkdownContext,
44
- h as MarkdownProvider,
45
- x as useMarkdown
44
+ o as MarkdownContext,
45
+ x as MarkdownProvider,
46
+ C as useMarkdown
46
47
  };
@@ -1,12 +1,13 @@
1
- import { getMarkdownMetadata as M, getContentNodeByKeyPath as h } from "@intlayer/core";
1
+ import { getContentNodeByKeyPath as M } from "@intlayer/core/dictionaryManipulator";
2
+ import { getMarkdownMetadata as h } from "@intlayer/core/markdown";
2
3
  import { createMemo as n, useContext as l } from "solid-js";
3
4
  import { useEditedContentRenderer as a } from "../editor/useEditedContentRenderer.mjs";
4
5
  import { compileMarkdown as s } from "./compiler.mjs";
5
- import { useMarkdown as w, MarkdownContext as u } from "./MarkdownProvider.mjs";
6
- const f = (e, t = {}) => s(e, t), F = (e = {}) => {
7
- const t = l(u);
8
- return (r) => t ? t.renderMarkdown(r, e) : f(r, e);
9
- }, N = (e) => {
6
+ import { useMarkdown as w, MarkdownContext as f } from "./MarkdownProvider.mjs";
7
+ const u = (e, t = {}) => s(e, t), N = (e = {}) => {
8
+ const t = l(f);
9
+ return (r) => t ? t.renderMarkdown(r, e) : u(r, e);
10
+ }, T = (e) => {
10
11
  const {
11
12
  renderMarkdown: t
12
13
  } = w(), r = n(() => a({
@@ -21,29 +22,29 @@ const f = (e, t = {}) => s(e, t), F = (e = {}) => {
21
22
  components: d,
22
23
  wrapper: c,
23
24
  forceBlock: i,
24
- preserveFrontmatter: y,
25
- tagfilter: m,
25
+ preserveFrontmatter: m,
26
+ tagfilter: y,
26
27
  ...k
27
28
  } = e;
28
29
  return t(o(), {
29
30
  components: d,
30
31
  wrapper: c,
31
32
  forceBlock: i,
32
- preserveFrontmatter: y,
33
- tagfilter: m,
33
+ preserveFrontmatter: m,
34
+ tagfilter: y,
34
35
  ...k
35
36
  });
36
- }, T = (e) => {
37
+ }, b = (e) => {
37
38
  const t = n(() => a({
38
39
  dictionaryKey: e.dictionaryKey,
39
40
  keyPath: e.keyPath,
40
41
  children: e.children
41
- })), r = n(() => M(t()));
42
- return n(() => h(r(), e.metadataKeyPath))();
42
+ })), r = n(() => h(t()));
43
+ return n(() => M(r(), e.metadataKeyPath))();
43
44
  };
44
45
  export {
45
- T as MarkdownMetadataRenderer,
46
- N as MarkdownRenderer,
47
- f as renderMarkdown,
48
- F as useMarkdownRenderer
46
+ b as MarkdownMetadataRenderer,
47
+ T as MarkdownRenderer,
48
+ u as renderMarkdown,
49
+ N as useMarkdownRenderer
49
50
  };
@@ -1,4 +1,4 @@
1
- import { compileWithOptions as m } from "@intlayer/core";
1
+ import { compileWithOptions as m } from "@intlayer/core/markdown";
2
2
  import r from "./runtime.mjs";
3
3
  const o = (i = "", t = {}) => m(i, r, t), e = o, n = o;
4
4
  export {
@@ -1,15 +1,14 @@
1
- import { D as s } from "../../web-mv0y5CK4.mjs";
2
- import { createComponent as a } from "solid-js";
1
+ import { createComponent as a, Dynamic as c } from "solid-js/web";
3
2
  const i = {
4
3
  /**
5
4
  * Creates a Solid JSX Element.
6
5
  * Uses Solid's Dynamic component for element creation.
7
6
  */
8
- createElement: (e, r, ...t) => a(s, {
7
+ createElement: (e, n, ...t) => a(c, {
9
8
  get component() {
10
9
  return e;
11
10
  },
12
- ...r,
11
+ ...n,
13
12
  get children() {
14
13
  return t.length === 1 ? t[0] : t;
15
14
  }
@@ -19,7 +18,7 @@ const i = {
19
18
  * In the context of markdown rendering, we usually don't need to deep-clone
20
19
  * but rather merge props if we're wrapping a result.
21
20
  */
22
- cloneElement: (e, r) => typeof e == "function" ? a(e, r) : e,
21
+ cloneElement: (e, n) => typeof e == "function" ? a(e, n) : e,
23
22
  /**
24
23
  * Solid Fragment equivalent.
25
24
  * In Solid, a fragment is just an array or a function returning children.
@@ -29,10 +28,10 @@ const i = {
29
28
  * Solid-specific prop normalization.
30
29
  * Solid uses 'class' instead of 'className'.
31
30
  */
32
- normalizeProps: (e, r) => {
31
+ normalizeProps: (e, n) => {
33
32
  const t = {};
34
- for (const [n, o] of Object.entries(r))
35
- n === "className" ? t.class = o : t[n] = o;
33
+ for (const [r, o] of Object.entries(n))
34
+ r === "className" ? t.class = o : t[r] = o;
36
35
  return t;
37
36
  }
38
37
  };
@@ -1,18 +1,19 @@
1
- import "../web-mv0y5CK4.mjs";
2
- import "@intlayer/core";
1
+ import "solid-js/web";
2
+ import "@intlayer/core/interpreter";
3
+ import "@intlayer/core/markdown";
4
+ import "@intlayer/core/transpiler";
3
5
  import "@intlayer/types";
4
- import { h as u, a as P, i as d, m as e, b as h, s as k } from "../plugins-BKpuMxBh.mjs";
6
+ import { h as P, a as d, i as e, m as h, b as k, s as w } from "../plugins-BDLeP00w.mjs";
5
7
  import "./editor/useEditedContentRenderer.mjs";
6
8
  import "./IntlayerNode.mjs";
7
9
  import "./markdown/MarkdownProvider.mjs";
8
10
  import "./markdown/MarkdownRenderer.mjs";
9
11
  import "./solidElement/renderSolidElement.mjs";
10
- import "solid-js";
11
12
  export {
12
- u as htmlPlugin,
13
- P as insertionPlugin,
14
- d as intlayerNodePlugins,
15
- e as markdownPlugin,
16
- h as markdownStringPlugin,
17
- k as solidNodePlugins
13
+ P as htmlPlugin,
14
+ d as insertionPlugin,
15
+ e as intlayerNodePlugins,
16
+ h as markdownPlugin,
17
+ k as markdownStringPlugin,
18
+ w as solidNodePlugins
18
19
  };