@m4l/components 9.24.0-beta-feature-731-m4l-components-code-editor.3 → 9.24.0-beta-feature-731-m4l-components-code-editor.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,SAAS,CAAC;AAgBjB;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,oDAsXhD"}
1
+ {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,SAAS,CAAC;AAyBjB;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,oDAwXhD"}
@@ -1,150 +1,154 @@
1
1
  import { jsx as a, jsxs as D } from "@emotion/react/jsx-runtime";
2
- import { useModuleDictionary as Ae, useModuleSkeleton as Me } from "@m4l/core";
2
+ import { useModuleDictionary as Me, useModuleSkeleton as Ve } from "@m4l/core";
3
3
  import _ from "clsx";
4
- import { useId as Ve, useState as J, useRef as Pe, useMemo as E, useEffect as Q, useCallback as k } from "react";
5
- import { useTheme as ke } from "@mui/material/styles";
6
- import { getPropDataTestId as x, getNameDataTestId as ze } from "../../../test/getNameDataTestId.js";
7
- import { CODE_EDITOR_DEFAULT_MAX_LINES as Be, CODE_EDITOR_DEFAULT_MIN_LINES as He, CODE_EDITOR_DEFAULT_LANGUAGE as we, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as Ge, CODE_EDITOR_CLASSES as C, CODE_EDITOR_KEY_COMPONENT as p, CODE_EDITOR_READ_ONLY_LABEL as Ue, CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID as Ye } from "./constants.js";
8
- import { CODE_EDITOR_DICTIONARY as W } from "./dictionary.js";
9
- import { resolveCodeEditorLanguageIcon as Fe } from "./helpers/languageIcon.js";
10
- import { ensureCodeEditorRuntimeDependencies as je, getCodeEditorLineCount as qe, createCodeEditorPrismTheme as Ke, resolveCodeEditorLanguageTemplate as Xe, validateCodeEditorSyntax as Ze, highlightCode as $e } from "./helpers/highlighting.js";
11
- import { SkeletonStyled as Je, RootStyled as Qe, HeaderStyled as We, LanguageChipStyled as et, LanguageChipIconStyled as tt, HeaderBadgesStyled as at, ReadOnlyChipStyled as nt, BodyStyled as rt, LineNumbersStyled as ot, LineNumberStyled as lt, EditorScrollerStyled as it, PlaceholderStyled as st, EditorStyled as dt } from "./slots/CodeEditorSlots.js";
12
- import { CodeEditorSlots as f } from "./slots/CodeEditorEnum.js";
13
- function ct(L, y) {
14
- return L.length !== y.length ? !1 : L.every((S, o) => S === y[o]);
4
+ import { useId as ke, useState as Q, useRef as ze, useMemo as C, useEffect as W, useCallback as B } from "react";
5
+ import { useTheme as Pe } from "@mui/material/styles";
6
+ import { getPropDataTestId as x, getNameDataTestId as Be } from "../../../test/getNameDataTestId.js";
7
+ import { CODE_EDITOR_DEFAULT_MAX_LINES as He, CODE_EDITOR_DEFAULT_MIN_LINES as we, CODE_EDITOR_DEFAULT_LANGUAGE as Ge, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as Ue, CODE_EDITOR_CLASSES as p, CODE_EDITOR_KEY_COMPONENT as f, CODE_EDITOR_READ_ONLY_LABEL as Ye, CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID as Fe } from "./constants.js";
8
+ import { CODE_EDITOR_DICTIONARY as ee } from "./dictionary.js";
9
+ import { resolveCodeEditorLanguageIcon as je } from "./helpers/languageIcon.js";
10
+ import { ensureCodeEditorRuntimeDependencies as qe, getCodeEditorLineCount as Ke, createCodeEditorPrismTheme as Xe, resolveCodeEditorLanguageTemplate as Ze, validateCodeEditorSyntax as $e, highlightCode as Je } from "./helpers/highlighting.js";
11
+ import { SkeletonStyled as Qe, RootStyled as We, HeaderStyled as et, LanguageChipStyled as tt, LanguageChipIconStyled as at, HeaderBadgesStyled as nt, ReadOnlyChipStyled as rt, BodyStyled as ot, LineNumbersStyled as lt, LineNumberStyled as it, EditorScrollerStyled as st, PlaceholderStyled as dt, EditorStyled as ct } from "./slots/CodeEditorSlots.js";
12
+ import { CodeEditorSlots as L } from "./slots/CodeEditorEnum.js";
13
+ function ut(o) {
14
+ return o === "dark" ? "dark" : "light";
15
15
  }
16
- function Dt(L) {
16
+ function mt(o, y) {
17
+ return o.length !== y.length ? !1 : o.every((S, l) => S === y[l]);
18
+ }
19
+ function xt(o) {
17
20
  const {
18
21
  className: y,
19
22
  customLanguages: S,
20
- dataTestId: o,
21
- defaultValue: ee,
23
+ dataTestId: l,
24
+ defaultValue: te,
22
25
  disabled: I = !1,
23
- editorClassName: te,
24
- error: ae = !1,
25
- highlightTheme: z,
26
- id: ne,
27
- insertSpaces: re,
28
- languageIcon: oe,
29
- languageLabel: le,
26
+ editorClassName: ae,
27
+ error: ne = !1,
28
+ highlightTheme: H,
29
+ id: re,
30
+ insertSpaces: oe,
31
+ languageIcon: le,
32
+ languageLabel: ie,
30
33
  languageTemplate: n,
31
- languageText: ie,
32
- maxLines: se = Be,
33
- minLines: O = He,
34
- onBlur: de,
34
+ languageText: se,
35
+ maxLines: de = He,
36
+ minLines: O = we,
37
+ onBlur: ce,
35
38
  onChange: v,
36
39
  placeholder: R,
37
- preClassName: ce,
38
- readOnly: d = !1,
39
- readOnlyLabel: ue,
40
- runtimeDependencies: c,
41
- showLineNumbers: B = !1,
42
- showPlaceholder: H = !0,
43
- size: w = "medium",
40
+ preClassName: ue,
41
+ readOnly: c = !1,
42
+ readOnlyLabel: me,
43
+ runtimeDependencies: u,
44
+ showLineNumbers: w = !1,
45
+ showPlaceholder: G = !0,
46
+ size: U = "medium",
44
47
  syntaxValidator: N,
45
- skeleton: me = !1,
46
- textareaClassName: ge,
47
- validateSyntax: G = !1,
48
- value: u,
49
- variant: he = "outlined",
48
+ skeleton: ge = !1,
49
+ textareaClassName: he,
50
+ validateSyntax: Y = !1,
51
+ value: m,
52
+ variant: Ee = "outlined",
50
53
  ...T
51
- } = L, Ee = Ve(), Ce = ne || Ee, U = ke(), { getLabel: pe } = Ae(), fe = Me() || me, m = v === void 0, [b, Le] = J(0), A = Pe([]), [ye, Y] = J(
52
- u ?? ee ?? ""
53
- ), F = E(() => c ? Array.isArray(c) ? c : [c] : [], [c]);
54
- ct(
55
- A.current,
56
- F
57
- ) || (A.current = F);
58
- const M = A.current;
59
- Q(() => {
60
- m && u !== void 0 && Y(u);
61
- }, [m, u]), Q(() => {
62
- if (!M.length)
54
+ } = o, Ce = ke(), pe = re || Ce, b = Pe(), { getLabel: fe } = Me(), Le = Ve() || ge, g = v === void 0, [A, ye] = Q(0), M = ze([]), [Se, F] = Q(
55
+ m ?? te ?? ""
56
+ ), V = ut(b.palette.mode), j = C(() => u ? Array.isArray(u) ? u : [u] : [], [u]);
57
+ mt(
58
+ M.current,
59
+ j
60
+ ) || (M.current = j);
61
+ const k = M.current;
62
+ W(() => {
63
+ g && m !== void 0 && F(m);
64
+ }, [g, m]), W(() => {
65
+ if (!k.length)
63
66
  return;
64
67
  let e = !0;
65
- return je(M).catch(() => {
68
+ return qe(k).catch(() => {
66
69
  }).then(() => {
67
- e && Le((s) => s + 1);
70
+ e && ye((d) => d + 1);
68
71
  }), () => {
69
72
  e = !1;
70
73
  };
71
- }, [M]);
72
- const r = m ? ye : u ?? "", Se = H && r.length === 0 && !!R, Ie = Ge[w], j = qe(r), q = Math.max(j, O), V = Math.max(O, se), Te = Math.min(q, V), De = j >= V, K = E(
73
- () => z ?? Ke(U),
74
- [z, U]
75
- ), l = E(
76
- () => Xe(n),
77
- [n, b]
78
- ), g = ie ?? l?.languageText ?? we, X = le ?? l?.languageLabel, Z = !!X, _e = Fe(
79
- oe ?? l?.languageIcon
80
- ), P = d ? pe(W.readOnly) : void 0, xe = ue ?? (P && P !== W.readOnly ? P : Ue), h = E(() => {
74
+ }, [k]);
75
+ const r = g ? Se : m ?? "", Ie = G && r.length === 0 && !!R, Te = Ue[U], q = Ke(r), K = Math.max(q, O), z = Math.max(O, de), De = Math.min(K, z), _e = q >= z, X = C(
76
+ () => H ?? Xe(b, V),
77
+ [V, H, b]
78
+ ), i = C(
79
+ () => Ze(n),
80
+ [n, A]
81
+ ), h = se ?? i?.languageText ?? Ge, Z = ie ?? i?.languageLabel, $ = !!Z, xe = je(
82
+ le ?? i?.languageIcon
83
+ ), P = c ? fe(ee.readOnly) : void 0, Oe = me ?? (P && P !== ee.readOnly ? P : Ye), E = C(() => {
81
84
  if (N)
82
85
  return N({
83
86
  code: r,
84
- languageTemplate: l ?? n,
85
- languageText: g
87
+ languageTemplate: i ?? n,
88
+ languageText: h
86
89
  });
87
- if (G)
88
- return Ze({
90
+ if (Y)
91
+ return $e({
89
92
  code: r,
90
- languageTemplate: l ?? n,
91
- languageText: g
93
+ languageTemplate: i ?? n,
94
+ languageText: h
92
95
  });
93
96
  }, [
94
97
  n,
95
- l,
96
- g,
98
+ i,
99
+ h,
97
100
  r,
98
- b,
101
+ A,
99
102
  N,
100
- G
101
- ]), $ = ae || !!h && !h.isValid, i = h && !h.isValid ? h.errorRange : void 0, Oe = E(() => {
102
- if (!i)
103
+ Y
104
+ ]), J = ne || !!E && !E.isValid, s = E && !E.isValid ? E.errorRange : void 0, ve = C(() => {
105
+ if (!s)
103
106
  return /* @__PURE__ */ new Set();
104
- const e = i.start.line, s = i.end?.line ?? e;
107
+ const e = s.start.line, d = s.end?.line ?? e;
105
108
  return new Set(
106
109
  Array.from(
107
- { length: Math.max(s - e + 1, 1) },
108
- (ut, be) => e + be
110
+ { length: Math.max(d - e + 1, 1) },
111
+ (gt, Ae) => e + Ae
109
112
  )
110
113
  );
111
- }, [i]), t = {
114
+ }, [s]), t = {
115
+ colorMode: V,
112
116
  disabled: I,
113
- error: $,
114
- isLineCapped: De,
117
+ error: J,
118
+ isLineCapped: _e,
115
119
  isEmpty: r.length === 0,
116
- isPlaceholderVisible: Se,
117
- lineHeight: Ie,
118
- maxLines: V,
120
+ isPlaceholderVisible: Ie,
121
+ lineHeight: Te,
122
+ maxLines: z,
119
123
  minLines: O,
120
- readOnly: d,
121
- showLineNumbers: B,
122
- size: w,
123
- variant: he,
124
- visibleLineCount: Te
125
- }, ve = k(
126
- (e) => $e({
124
+ readOnly: c,
125
+ showLineNumbers: w,
126
+ size: U,
127
+ variant: Ee,
128
+ visibleLineCount: De
129
+ }, Re = B(
130
+ (e) => Je({
127
131
  code: e,
128
132
  customLanguages: S,
129
133
  languageTemplate: n,
130
- languageText: g,
131
- prismTheme: K,
132
- syntaxErrorRange: i
134
+ languageText: h,
135
+ prismTheme: X,
136
+ syntaxErrorRange: s
133
137
  }),
134
138
  [
135
139
  S,
136
140
  n,
137
- K,
138
- g,
139
- b,
140
- i
141
+ X,
142
+ h,
143
+ A,
144
+ s
141
145
  ]
142
- ), Re = k(
146
+ ), Ne = B(
143
147
  (e) => {
144
- m && Y(e), v?.(e);
148
+ g && F(e), v?.(e);
145
149
  },
146
- [v, m]
147
- ), Ne = k(
150
+ [v, g]
151
+ ), be = B(
148
152
  (e) => {
149
153
  if (I || e.target instanceof Element && e.target.closest("textarea"))
150
154
  return;
@@ -152,100 +156,100 @@ function Dt(L) {
152
156
  },
153
157
  [I]
154
158
  );
155
- return fe ? /* @__PURE__ */ a(Je, { ownerState: t }) : /* @__PURE__ */ D(
156
- Qe,
159
+ return Le ? /* @__PURE__ */ a(Qe, { ownerState: t }) : /* @__PURE__ */ D(
160
+ We,
157
161
  {
158
162
  ownerState: t,
159
163
  "aria-disabled": t.disabled || void 0,
160
- className: _(C.root, y),
161
- ...x(p, f.root, o),
164
+ className: _(p.root, y),
165
+ ...x(f, L.root, l),
162
166
  children: [
163
- Z || d ? /* @__PURE__ */ D(We, { ownerState: t, className: C.header, children: [
164
- Z ? /* @__PURE__ */ a(
165
- et,
167
+ $ || c ? /* @__PURE__ */ D(et, { ownerState: t, className: p.header, children: [
168
+ $ ? /* @__PURE__ */ a(
169
+ tt,
166
170
  {
167
- label: X,
171
+ label: Z,
168
172
  size: "small",
169
173
  variant: "outlined",
170
174
  color: "default",
171
175
  startIcon: /* @__PURE__ */ a(
172
- tt,
176
+ at,
173
177
  {
174
178
  ...x(
175
- p,
176
- f.languageChipIcon,
177
- Ye
179
+ f,
180
+ L.languageChipIcon,
181
+ Fe
178
182
  ),
179
- children: /* @__PURE__ */ a(_e, { fontSize: "small" })
183
+ children: /* @__PURE__ */ a(xe, { fontSize: "small" })
180
184
  }
181
185
  )
182
186
  }
183
187
  ) : null,
184
- /* @__PURE__ */ a(at, { ownerState: t, children: d ? /* @__PURE__ */ a(
185
- nt,
188
+ /* @__PURE__ */ a(nt, { ownerState: t, children: c ? /* @__PURE__ */ a(
189
+ rt,
186
190
  {
187
- label: xe,
191
+ label: Oe,
188
192
  size: "small"
189
193
  }
190
194
  ) : null })
191
195
  ] }) : null,
192
196
  /* @__PURE__ */ D(
193
- rt,
197
+ ot,
194
198
  {
195
199
  ownerState: t,
196
- onClick: Ne,
197
- ...x(p, f.body, o),
200
+ onClick: be,
201
+ ...x(f, L.body, l),
198
202
  children: [
199
- B ? /* @__PURE__ */ a(ot, { ownerState: t, "aria-hidden": "true", children: Array.from({ length: q }, (e, s) => s + 1).map(
203
+ w ? /* @__PURE__ */ a(lt, { ownerState: t, "aria-hidden": "true", children: Array.from({ length: K }, (e, d) => d + 1).map(
200
204
  (e) => /* @__PURE__ */ a(
201
- lt,
205
+ it,
202
206
  {
203
207
  ownerState: t,
204
- "data-code-editor-error-line": Oe.has(e) || void 0,
208
+ "data-code-editor-error-line": ve.has(e) || void 0,
205
209
  children: e
206
210
  },
207
211
  `code-editor-line-${e}`
208
212
  )
209
213
  ) }) : null,
210
- /* @__PURE__ */ D(it, { ownerState: t, children: [
211
- H && t.isEmpty && R ? /* @__PURE__ */ a(
212
- st,
214
+ /* @__PURE__ */ D(st, { ownerState: t, children: [
215
+ G && t.isEmpty && R ? /* @__PURE__ */ a(
216
+ dt,
213
217
  {
214
218
  ownerState: t,
215
219
  ...x(
216
- p,
217
- f.placeholder,
218
- o
220
+ f,
221
+ L.placeholder,
222
+ l
219
223
  ),
220
224
  children: R
221
225
  }
222
226
  ) : null,
223
227
  /* @__PURE__ */ a(
224
- dt,
228
+ ct,
225
229
  {
226
230
  ...T,
227
231
  ownerState: t,
228
232
  "aria-label": T["aria-label"] ?? "Code editor",
229
- "aria-invalid": T["aria-invalid"] ?? ($ || void 0),
230
- className: _(C.editor, te),
231
- "data-testid": ze(
232
- p,
233
- f.textarea,
234
- o
233
+ "aria-invalid": T["aria-invalid"] ?? (J || void 0),
234
+ className: _(p.editor, ae),
235
+ "data-testid": Be(
236
+ f,
237
+ L.textarea,
238
+ l
235
239
  ),
236
240
  disabled: I,
237
- highlight: ve,
238
- insertSpaces: re,
239
- onBlur: de,
240
- onValueChange: Re,
241
- preClassName: _(C.pre, ce),
242
- readOnly: d,
241
+ highlight: Re,
242
+ insertSpaces: oe,
243
+ onBlur: ce,
244
+ onValueChange: Ne,
245
+ preClassName: _(p.pre, ue),
246
+ readOnly: c,
243
247
  tabSize: T.tabSize,
244
248
  textareaClassName: _(
245
- C.textarea,
246
- ge
249
+ p.textarea,
250
+ he
247
251
  ),
248
- textareaId: Ce,
252
+ textareaId: pe,
249
253
  value: r
250
254
  }
251
255
  )
@@ -258,5 +262,5 @@ function Dt(L) {
258
262
  );
259
263
  }
260
264
  export {
261
- Dt as CodeEditor
265
+ xt as CodeEditor
262
266
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,eAAO,MAAM,gBAAgB,EAAE,gBA6U9B,CAAC"}
1
+ {"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,eAAO,MAAM,gBAAgB,EAAE,gBA6U9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { getTypographyStyles as d } from "../../../utils/getTypographyStyles.js";
2
- import { getCodeEditorVSCodeModernPalette as s, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as n, CODE_EDITOR_MONO_FONT_FAMILY as t, CODE_EDITOR_PADDING_PX as i } from "./constants.js";
2
+ import { getCodeEditorVSCodeModernPalette as l, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as n, CODE_EDITOR_MONO_FONT_FAMILY as s, CODE_EDITOR_PADDING_PX as i } from "./constants.js";
3
3
  import { getSizeStyles as p } from "../../../utils/getSizeStyles/getSizeStyles.js";
4
4
  const b = {
5
5
  /** Resolve the interactive shell colors and focus treatment for the editor root. */
@@ -57,7 +57,7 @@ const b = {
57
57
  },
58
58
  /** Layout the language badge row above the editing surface. */
59
59
  header: ({ theme: r, ownerState: e }) => {
60
- const o = s(r);
60
+ const o = l(r, e?.colorMode);
61
61
  return {
62
62
  display: "flex",
63
63
  alignItems: "center",
@@ -95,7 +95,7 @@ const b = {
95
95
  }),
96
96
  /** Keep the leading language chip aligned with the editor header layout. */
97
97
  languageChip: ({ theme: r, ownerState: e }) => {
98
- const o = s(r);
98
+ const o = l(r, e?.colorMode);
99
99
  return {
100
100
  flexShrink: 0,
101
101
  minWidth: 0,
@@ -156,14 +156,14 @@ const b = {
156
156
  }),
157
157
  /** Build the two-column layout used by the gutter and editor scroller. */
158
158
  body: ({ theme: r, ownerState: e }) => {
159
- const o = e?.visibleLineCount || e?.minLines || 1, a = e?.lineHeight || n.medium, l = e?.isLineCapped ? i : i * 2;
159
+ const o = e?.visibleLineCount || e?.minLines || 1, a = e?.lineHeight || n.medium, t = e?.isLineCapped ? i : i * 2;
160
160
  return {
161
161
  display: "grid",
162
162
  gridTemplateColumns: e?.showLineNumbers ? "auto minmax(0, 1fr)" : "minmax(0, 1fr)",
163
163
  width: "100%",
164
164
  alignItems: "start",
165
165
  columnGap: 0,
166
- maxHeight: `${o * a + l}px`,
166
+ maxHeight: `${o * a + t}px`,
167
167
  minHeight: 0,
168
168
  overflow: "auto",
169
169
  pointerEvents: e?.disabled ? "none" : "auto",
@@ -173,7 +173,7 @@ const b = {
173
173
  },
174
174
  /** Style the optional line-number gutter. */
175
175
  lineNumbers: ({ theme: r, ownerState: e }) => {
176
- const o = s(r);
176
+ const o = l(r, e?.colorMode);
177
177
  return {
178
178
  display: "flex",
179
179
  flexDirection: "column",
@@ -183,13 +183,13 @@ const b = {
183
183
  color: e?.disabled ? o.surface.placeholderForeground : o.surface.lineNumberForeground,
184
184
  userSelect: "none",
185
185
  ...d(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
186
- fontFamily: t,
186
+ fontFamily: s,
187
187
  lineHeight: `${n[e?.size || "medium"]}px`
188
188
  };
189
189
  },
190
190
  /** Keep each rendered line number aligned with the code line height. */
191
191
  lineNumber: ({ theme: r, ownerState: e }) => {
192
- const o = s(r);
192
+ const o = l(r, e?.colorMode);
193
193
  return {
194
194
  display: "block",
195
195
  minWidth: "2ch",
@@ -203,7 +203,7 @@ const b = {
203
203
  };
204
204
  },
205
205
  /** Provide horizontal overflow for long code lines without wrapping them. */
206
- editorScroller: ({ theme: r, ownerState: e }) => ({
206
+ editorScroller: ({ theme: r }) => ({
207
207
  position: "relative",
208
208
  width: "fit-content",
209
209
  minWidth: "100%",
@@ -215,21 +215,21 @@ const b = {
215
215
  }),
216
216
  /** Style the underlying react-simple-code-editor surface and its inner elements. */
217
217
  editor: ({ theme: r, ownerState: e }) => {
218
- const o = s(r), a = e?.isLineCapped ? 0 : i, l = i + a;
218
+ const o = l(r, e?.colorMode), a = e?.isLineCapped ? 0 : i, t = i + a;
219
219
  return {
220
220
  position: "relative",
221
221
  zIndex: 0,
222
222
  width: "max-content",
223
223
  minWidth: "100%",
224
- minHeight: `calc(${e?.minLines || 1} * ${e?.lineHeight || n.medium}px + ${l}px)`,
224
+ minHeight: `calc(${e?.minLines || 1} * ${e?.lineHeight || n.medium}px + ${t}px)`,
225
225
  backgroundColor: "transparent",
226
- fontFamily: t,
226
+ fontFamily: s,
227
227
  fontSize: "11px",
228
228
  lineHeight: `${e?.lineHeight || n.medium}px`,
229
229
  fontWeight: 400,
230
230
  "& textarea, & pre": {
231
231
  ...d(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
232
- fontFamily: t,
232
+ fontFamily: s,
233
233
  lineHeight: `${e?.lineHeight || n.medium}px`,
234
234
  whiteSpace: "pre !important",
235
235
  wordBreak: "normal",
@@ -271,7 +271,7 @@ const b = {
271
271
  },
272
272
  /** Position the empty-state placeholder above the editor surface. */
273
273
  placeholder: ({ theme: r, ownerState: e }) => {
274
- const o = s(r);
274
+ const o = l(r, e?.colorMode);
275
275
  return {
276
276
  position: "absolute",
277
277
  zIndex: 1,
@@ -280,7 +280,7 @@ const b = {
280
280
  pointerEvents: "none",
281
281
  color: o.surface.placeholderForeground,
282
282
  ...d(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
283
- fontFamily: t,
283
+ fontFamily: s,
284
284
  lineHeight: `${e?.lineHeight || n.medium}px`,
285
285
  whiteSpace: "pre-wrap"
286
286
  };
@@ -76,7 +76,7 @@ export declare const CODE_EDITOR_FALLBACK_LANGUAGE_ICON: import('@mui/material/O
76
76
  muiName: string;
77
77
  };
78
78
  /** Resolve the exact VS Code Modern palette for the current light or dark theme mode. */
79
- export declare function getCodeEditorVSCodeModernPalette(theme: Theme): CodeEditorVSCodeModernPalette;
79
+ export declare function getCodeEditorVSCodeModernPalette(theme: Theme, modeOverride?: Theme['palette']['mode']): CodeEditorVSCodeModernPalette;
80
80
  export declare const CODE_EDITOR_CLASSES: Record<"root" | "skeleton" | "body" | "header" | "pre" | "textarea" | "placeholder" | "headerBadges" | "languageChip" | "languageChipIcon" | "readOnlyChip" | "lineNumbers" | "lineNumber" | "editorScroller" | "editor", string>;
81
81
  export {};
82
82
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAS3C,KAAK,oCAAoC,GAAG;IAC1C,2BAA2B,EAAE,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B,EAAE,MAAM,CAAC;IACpC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,s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ACvF,eAAO,MAAM,8BAA8B;;;;;CAKjC,CAAC;AACX,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/D,CAAC;AAEF,eAAO,MAAM,kCAAkC;;CAAyB,CAAC;AAEzE,yFAAyF;AACzF,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,KAAK,GACX,6BAA6B,CAM/B;AAED,eAAO,MAAM,mBAAmB,mOAG/B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAS3C,KAAK,oCAAoC,GAAG;IAC1C,2BAA2B,EAAE,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B,EAAE,MAAM,CAAC;IACpC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,k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AO,MAAM,0CAA0C,+BAA+B,CAAC;AACvF,eAAO,MAAM,8BAA8B;;;;;CAKjC,CAAC;AACX,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/D,CAAC;AAEF,eAAO,MAAM,kCAAkC;;CAAyB,CAAC;AAEzE,yFAAyF;AACzF,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,KAAK,EACZ,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GACtC,6BAA6B,CAM/B;AAED,eAAO,MAAM,mBAAmB,mOAG/B,CAAC"}
@@ -1,7 +1,7 @@
1
- import { FileFolderFileOutlined as n } from "@m4l/icons";
2
- import { getComponentClasses as a } from "../../../utils/getComponentSlotRoot.js";
3
- import { CodeEditorSlots as t } from "./slots/CodeEditorEnum.js";
4
- const C = {
1
+ import { FileFolderFileOutlined as a } from "@m4l/icons";
2
+ import { getComponentClasses as t } from "../../../utils/getComponentSlotRoot.js";
3
+ import { CodeEditorSlots as C } from "./slots/CodeEditorEnum.js";
4
+ const d = {
5
5
  dark: {
6
6
  bracketPalette: ["#FFD700", "#DA70D6", "#179FFF"],
7
7
  surface: {
@@ -100,15 +100,15 @@ const C = {
100
100
  variable: "#001080"
101
101
  }
102
102
  }
103
- }, d = "M4LCodeEditor", i = "text", g = 4, u = 10, D = 12, _ = {
103
+ }, E = "M4LCodeEditor", g = "text", u = 4, D = 10, _ = 12, B = {
104
104
  small: 18,
105
105
  medium: 20
106
- }, B = '"Geist Mono", "JetBrains Mono", "Cascadia Code", "Liberation Mono", monospace', s = "Read Only", r = "at-commands", l = "at-basic", A = "AT Commands", O = "CodeEditorLanguageChipIcon", T = {
106
+ }, s = '"Geist Mono", "JetBrains Mono", "Cascadia Code", "Liberation Mono", monospace', l = "Read Only", r = "at-commands", A = "at-basic", O = "AT Commands", T = "CodeEditorLanguageChipIcon", m = {
107
107
  commandPrefixes: ["AT+", "+"],
108
108
  concatenationSeparators: [";"],
109
109
  argumentSeparators: [","],
110
110
  reservedWords: ["SET", "INFO", "SAVE", "CLEAR"]
111
- }, m = {
111
+ }, p = {
112
112
  js: "javascript",
113
113
  jsx: "jsx",
114
114
  ts: "typescript",
@@ -119,31 +119,31 @@ const C = {
119
119
  yml: "yaml",
120
120
  at: r,
121
121
  "telemetry-at": r
122
- }, p = n;
123
- function I(o) {
124
- const e = o.palette.mode === "dark" ? "dark" : "light";
125
- return C[e];
122
+ }, I = a;
123
+ function L(o, e) {
124
+ const n = (e ?? o.palette.mode) === "dark" ? "dark" : "light";
125
+ return d[n];
126
126
  }
127
- const L = a(
128
- d,
129
- t
127
+ const h = t(
128
+ E,
129
+ C
130
130
  );
131
131
  export {
132
132
  r as CODE_EDITOR_AT_LANGUAGE,
133
- A as CODE_EDITOR_AT_TEMPLATE_LANGUAGE_LABEL,
134
- l as CODE_EDITOR_AT_TEMPLATE_NAME,
135
- T as CODE_EDITOR_AT_TEMPLATE_TOKENS,
136
- L as CODE_EDITOR_CLASSES,
137
- i as CODE_EDITOR_DEFAULT_LANGUAGE,
138
- u as CODE_EDITOR_DEFAULT_MAX_LINES,
139
- g as CODE_EDITOR_DEFAULT_MIN_LINES,
140
- p as CODE_EDITOR_FALLBACK_LANGUAGE_ICON,
141
- d as CODE_EDITOR_KEY_COMPONENT,
142
- m as CODE_EDITOR_LANGUAGE_ALIASES,
143
- O as CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID,
144
- _ as CODE_EDITOR_LINE_HEIGHT_BY_SIZE,
145
- B as CODE_EDITOR_MONO_FONT_FAMILY,
146
- D as CODE_EDITOR_PADDING_PX,
147
- s as CODE_EDITOR_READ_ONLY_LABEL,
148
- I as getCodeEditorVSCodeModernPalette
133
+ O as CODE_EDITOR_AT_TEMPLATE_LANGUAGE_LABEL,
134
+ A as CODE_EDITOR_AT_TEMPLATE_NAME,
135
+ m as CODE_EDITOR_AT_TEMPLATE_TOKENS,
136
+ h as CODE_EDITOR_CLASSES,
137
+ g as CODE_EDITOR_DEFAULT_LANGUAGE,
138
+ D as CODE_EDITOR_DEFAULT_MAX_LINES,
139
+ u as CODE_EDITOR_DEFAULT_MIN_LINES,
140
+ I as CODE_EDITOR_FALLBACK_LANGUAGE_ICON,
141
+ E as CODE_EDITOR_KEY_COMPONENT,
142
+ p as CODE_EDITOR_LANGUAGE_ALIASES,
143
+ T as CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID,
144
+ B as CODE_EDITOR_LINE_HEIGHT_BY_SIZE,
145
+ s as CODE_EDITOR_MONO_FONT_FAMILY,
146
+ _ as CODE_EDITOR_PADDING_PX,
147
+ l as CODE_EDITOR_READ_ONLY_LABEL,
148
+ L as getCodeEditorVSCodeModernPalette
149
149
  };
@@ -51,7 +51,7 @@ export declare function getCodeEditorLineCount(value: string): number;
51
51
  /**
52
52
  * Build the Prism theme used by CodeEditor from the exact VS Code Modern palettes.
53
53
  */
54
- export declare function createCodeEditorPrismTheme(theme: Theme): PrismTheme;
54
+ export declare function createCodeEditorPrismTheme(theme: Theme, modeOverride?: Theme['palette']['mode']): PrismTheme;
55
55
  /**
56
56
  * Render the highlighted code tree consumed by react-simple-code-editor.
57
57
  */
@@ -1 +1 @@
1
- {"version":3,"file":"highlighting.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/helpers/highlighting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAUjF,OAAO,KAAK,EACV,yBAAyB,EAEzB,qCAAqC,EACrC,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EAGpB,iCAAiC,EACjC,yBAAyB,EACzB,gC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BAAyB,GAC1C,IAAI,CAQN;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAKR;AAmqBD,qGAAqG;AACrG,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,gBAAgB,EAChB,YAAY,GACb,EAAE,iCAAiC,GAAG,gCAAgC,CAkBtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AA+HD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAiInE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,gBAAgB,GACjB,EAAE,oBAAoB,GAAG,YAAY,CA6QrC"}
1
+ {"version":3,"file":"highlighting.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/helpers/highlighting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAUjF,OAAO,KAAK,EACV,yBAAyB,EAEzB,qCAAqC,EACrC,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EAGpB,iCAAiC,EACjC,yBAAyB,EACzB,gCAAgC,EACjC,MAAM,UAAU,CAAC;AA2GlB,eAAO,MAAM,wCAAwC,EAAE,0BAWtD,CAAC;AAgSF,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,MAAM,CAA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G,gCAAgC,CAkBtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AA+HD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,KAAK,EACZ,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GACtC,UAAU,CAiIZ;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,gBAAgB,GACjB,EAAE,oBAAoB,GAAG,YAAY,CA6QrC"}
@@ -1,4 +1,4 @@
1
- import { jsx as f, Fragment as st } from "@emotion/react/jsx-runtime";
1
+ import { jsx as d, Fragment as st } from "@emotion/react/jsx-runtime";
2
2
  import K from "prismjs";
3
3
  import { Highlight as Tt } from "prism-react-renderer";
4
4
  import { CODE_EDITOR_AT_TEMPLATE_TOKENS as S, CODE_EDITOR_AT_LANGUAGE as B, CODE_EDITOR_AT_TEMPLATE_NAME as St, CODE_EDITOR_AT_TEMPLATE_LANGUAGE_LABEL as vt, CODE_EDITOR_DEFAULT_LANGUAGE as at, CODE_EDITOR_LANGUAGE_ALIASES as Ot, getCodeEditorVSCodeModernPalette as Q } from "../constants.js";
@@ -67,15 +67,15 @@ const V = K.languages, ct = {}, lt = {}, j = /* @__PURE__ */ new WeakMap(), At =
67
67
  reservedWords: [...S.reservedWords]
68
68
  }
69
69
  };
70
- function Nt(t) {
71
- return [...Q(t).bracketPalette];
70
+ function Nt(t, e) {
71
+ return [...Q(t, e).bracketPalette];
72
72
  }
73
- function Rt(t) {
74
- const e = Q(t);
73
+ function Rt(t, e) {
74
+ const n = Q(t, e);
75
75
  return {
76
- constant: e.syntax.constant,
77
- type: e.syntax.type,
78
- variable: e.syntax.variable
76
+ constant: n.syntax.constant,
77
+ type: n.syntax.type,
78
+ variable: n.syntax.variable
79
79
  };
80
80
  }
81
81
  function Pt(t) {
@@ -298,7 +298,7 @@ function m(t, e) {
298
298
  offset: n
299
299
  };
300
300
  }
301
- function dt(t, e, n) {
301
+ function ft(t, e, n) {
302
302
  const r = t.split(`
303
303
  `), s = Math.min(Math.max(e, 1), Math.max(r.length, 1)), o = r.slice(0, s - 1).join(`
304
304
  `), i = s === 1 ? 0 : o.length + 1, c = r[s - 1] || "";
@@ -310,7 +310,7 @@ function dt(t, e, n) {
310
310
  function it(t, e) {
311
311
  return typeof e.offset == "number" ? m(t, e.offset) : m(
312
312
  t,
313
- dt(t, e.line, e.column)
313
+ ft(t, e.line, e.column)
314
314
  );
315
315
  }
316
316
  function w(t, e, n) {
@@ -379,7 +379,7 @@ function Jt(t, e) {
379
379
  return D(t, Number(n[1]));
380
380
  const r = e.match(/\bline\s+(\d+)\s+column\s+(\d+)\b/i);
381
381
  if (r)
382
- return dt(
382
+ return ft(
383
383
  t,
384
384
  Number(r[1]),
385
385
  Number(r[2])
@@ -719,129 +719,129 @@ function le(t, e, n) {
719
719
  text: t.slice(c)
720
720
  }), a.filter((l) => l.text.length > 0);
721
721
  }
722
- function Se(t) {
723
- const e = Q(t), n = Rt(t);
722
+ function Se(t, e) {
723
+ const n = Q(t, e), r = Rt(t, e);
724
724
  return {
725
725
  plain: {
726
726
  backgroundColor: "transparent",
727
- color: e.surface.editorForeground
727
+ color: n.surface.editorForeground
728
728
  },
729
- bracketPalette: Nt(t),
730
- semanticPalette: n,
729
+ bracketPalette: Nt(t, e),
730
+ semanticPalette: r,
731
731
  styles: [
732
732
  {
733
733
  types: ["comment", "prolog", "doctype", "cdata"],
734
734
  style: {
735
- color: e.syntax.comment,
735
+ color: n.syntax.comment,
736
736
  fontStyle: "italic"
737
737
  }
738
738
  },
739
739
  {
740
740
  types: ["punctuation"],
741
741
  style: {
742
- color: e.surface.editorForeground
742
+ color: n.surface.editorForeground
743
743
  }
744
744
  },
745
745
  {
746
746
  types: ["operator"],
747
747
  style: {
748
- color: e.syntax.operator
748
+ color: n.syntax.operator
749
749
  }
750
750
  },
751
751
  {
752
752
  types: ["property", "literal-property", "selector"],
753
753
  style: {
754
- color: n.variable
754
+ color: r.variable
755
755
  }
756
756
  },
757
757
  {
758
758
  types: ["attr-name"],
759
759
  style: {
760
- color: e.syntax.attributeName
760
+ color: n.syntax.attributeName
761
761
  }
762
762
  },
763
763
  {
764
764
  types: ["tag"],
765
765
  style: {
766
- color: e.syntax.tag
766
+ color: n.syntax.tag
767
767
  }
768
768
  },
769
769
  {
770
770
  types: ["boolean"],
771
771
  style: {
772
- color: e.syntax.boolean
772
+ color: n.syntax.boolean
773
773
  }
774
774
  },
775
775
  {
776
776
  types: ["number"],
777
777
  style: {
778
- color: e.syntax.number
778
+ color: n.syntax.number
779
779
  }
780
780
  },
781
781
  {
782
782
  types: ["symbol"],
783
783
  style: {
784
- color: e.syntax.constant
784
+ color: n.syntax.constant
785
785
  }
786
786
  },
787
787
  {
788
788
  types: ["atrule"],
789
789
  style: {
790
- color: e.syntax.keyword
790
+ color: n.syntax.keyword
791
791
  }
792
792
  },
793
793
  {
794
794
  types: ["constant"],
795
795
  style: {
796
- color: n.constant
796
+ color: r.constant
797
797
  }
798
798
  },
799
799
  {
800
800
  types: ["string", "char", "inserted"],
801
801
  style: {
802
- color: e.syntax.string
802
+ color: n.syntax.string
803
803
  }
804
804
  },
805
805
  {
806
806
  types: ["regex"],
807
807
  style: {
808
- color: e.syntax.regex
808
+ color: n.syntax.regex
809
809
  }
810
810
  },
811
811
  {
812
812
  types: ["constant.character.escape"],
813
813
  style: {
814
- color: e.syntax.escape
814
+ color: n.syntax.escape
815
815
  }
816
816
  },
817
817
  {
818
818
  types: ["keyword"],
819
819
  style: {
820
- color: e.syntax.keyword
820
+ color: n.syntax.keyword
821
821
  }
822
822
  },
823
823
  {
824
824
  types: ["function", "function-variable", "method", "method-variable"],
825
825
  style: {
826
- color: e.syntax.function
826
+ color: n.syntax.function
827
827
  }
828
828
  },
829
829
  {
830
830
  types: ["builtin", "class-name", "known-class-name", "maybe-class-name"],
831
831
  style: {
832
- color: n.type
832
+ color: r.type
833
833
  }
834
834
  },
835
835
  {
836
836
  types: ["alias", "imports", "parameter", "variable"],
837
837
  style: {
838
- color: n.variable
838
+ color: r.variable
839
839
  }
840
840
  },
841
841
  {
842
842
  types: ["deleted"],
843
843
  style: {
844
- color: e.surface.errorBorderColor
844
+ color: n.surface.errorBorderColor
845
845
  }
846
846
  }
847
847
  ]
@@ -864,8 +864,8 @@ function ve({
864
864
  `), M = q(l), C = jt(
865
865
  t,
866
866
  o
867
- ), ft = ce(c, a);
868
- return !a || c === at ? /* @__PURE__ */ f(st, { children: l.map((L, _) => {
867
+ ), dt = ce(c, a);
868
+ return !a || c === at ? /* @__PURE__ */ d(st, { children: l.map((L, _) => {
869
869
  const k = M[_] || 0, N = A(
870
870
  C,
871
871
  k,
@@ -875,12 +875,12 @@ function ve({
875
875
  k,
876
876
  C
877
877
  ) : [{ hasError: !1, text: L || " " }];
878
- return /* @__PURE__ */ f(
878
+ return /* @__PURE__ */ d(
879
879
  "div",
880
880
  {
881
881
  className: "token-line",
882
882
  "data-code-editor-error-line": N || void 0,
883
- children: R.map(($, z) => /* @__PURE__ */ f(
883
+ children: R.map(($, z) => /* @__PURE__ */ d(
884
884
  "span",
885
885
  {
886
886
  className: "token plain",
@@ -892,18 +892,18 @@ function ve({
892
892
  },
893
893
  `plain-line-${_}`
894
894
  );
895
- }) }) : /* @__PURE__ */ f(
895
+ }) }) : /* @__PURE__ */ d(
896
896
  Tt,
897
897
  {
898
898
  code: t || " ",
899
899
  language: c,
900
- prism: ft,
900
+ prism: dt,
901
901
  theme: s,
902
902
  children: ({ tokens: L, getLineProps: _, getTokenProps: k }) => {
903
903
  const N = s.bracketPalette, R = s.semanticPalette, $ = !!R && Pt(c);
904
904
  let z = 0;
905
905
  const x = {};
906
- return /* @__PURE__ */ f(st, { children: L.map((W, O) => {
906
+ return /* @__PURE__ */ d(st, { children: L.map((W, O) => {
907
907
  const H = M[O] || 0, mt = l[O] || "", pt = A(
908
908
  C,
909
909
  H,
@@ -911,7 +911,7 @@ function ve({
911
911
  );
912
912
  let et = 0;
913
913
  const gt = _({ line: W });
914
- return /* @__PURE__ */ f(
914
+ return /* @__PURE__ */ d(
915
915
  "div",
916
916
  {
917
917
  ...gt,
@@ -930,28 +930,28 @@ function ve({
930
930
  const g = It(u.content);
931
931
  if (g.some((h) => h.isIdentifier)) {
932
932
  let h = 0;
933
- return g.map((d, F) => {
934
- const P = `token-${O}-${G}-${F}`, rt = T + h, yt = rt + d.content.length, ot = A(
933
+ return g.map((f, F) => {
934
+ const P = `token-${O}-${G}-${F}`, rt = T + h, yt = rt + f.content.length, ot = A(
935
935
  C,
936
936
  rt,
937
937
  yt
938
938
  );
939
- if (h += d.content.length, !d.isIdentifier || !R)
939
+ if (h += f.content.length, !f.isIdentifier || !R)
940
940
  return I(
941
941
  x,
942
- d.content
943
- ), /* @__PURE__ */ f(
942
+ f.content
943
+ ), /* @__PURE__ */ d(
944
944
  "span",
945
945
  {
946
946
  className: p.className,
947
947
  style: p.style,
948
948
  "data-code-editor-error-token": ot || void 0,
949
- children: d.content
949
+ children: f.content
950
950
  },
951
951
  P
952
952
  );
953
953
  const Ct = g.slice(F + 1).map((xt) => xt.content).join(""), U = Gt({
954
- identifier: d.content,
954
+ identifier: f.content,
955
955
  nextSignificantText: wt(
956
956
  W,
957
957
  G,
@@ -962,9 +962,9 @@ function ve({
962
962
  });
963
963
  return I(
964
964
  x,
965
- d.content,
965
+ f.content,
966
966
  U
967
- ), /* @__PURE__ */ f(
967
+ ), /* @__PURE__ */ d(
968
968
  "span",
969
969
  {
970
970
  className: p.className,
@@ -974,7 +974,7 @@ function ve({
974
974
  } : p.style,
975
975
  "data-code-editor-error-token": ot || void 0,
976
976
  "data-code-editor-token-group": U,
977
- children: d.content
977
+ children: f.content
978
978
  },
979
979
  P
980
980
  );
@@ -985,7 +985,7 @@ function ve({
985
985
  x,
986
986
  u.content,
987
987
  nt
988
- ), /* @__PURE__ */ f(
988
+ ), /* @__PURE__ */ d(
989
989
  "span",
990
990
  {
991
991
  ...p,
@@ -994,9 +994,9 @@ function ve({
994
994
  },
995
995
  `token-${O}-${G}`
996
996
  )) : Array.from(u.content).map((g, h) => {
997
- const d = `token-${O}-${G}-${h}`;
997
+ const f = `token-${O}-${G}-${h}`;
998
998
  if (!Ft(g))
999
- return I(x, g), /* @__PURE__ */ f(
999
+ return I(x, g), /* @__PURE__ */ d(
1000
1000
  "span",
1001
1001
  {
1002
1002
  className: p.className,
@@ -1008,13 +1008,13 @@ function ve({
1008
1008
  ) || void 0,
1009
1009
  children: g
1010
1010
  },
1011
- d
1011
+ f
1012
1012
  );
1013
1013
  const {
1014
1014
  nextBracketDepth: F,
1015
1015
  renderedBracketDepth: P
1016
1016
  } = Ut(g, z);
1017
- return z = F, I(x, g), /* @__PURE__ */ f(
1017
+ return z = F, I(x, g), /* @__PURE__ */ d(
1018
1018
  "span",
1019
1019
  {
1020
1020
  className: p.className,
@@ -1030,7 +1030,7 @@ function ve({
1030
1030
  "data-code-editor-bracket-depth": P,
1031
1031
  children: g
1032
1032
  },
1033
- d
1033
+ f
1034
1034
  );
1035
1035
  });
1036
1036
  })
@@ -99,6 +99,7 @@ export interface CodeEditorProps extends Omit<BaseEditorProps, 'className' | 'de
99
99
  variant?: CodeEditorVariant;
100
100
  }
101
101
  export interface CodeEditorOwnerState extends Record<string, unknown> {
102
+ colorMode: Theme['palette']['mode'];
102
103
  disabled: boolean;
103
104
  error: boolean;
104
105
  isLineCapped: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAA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AE,OAAO,CAAC;IACnE,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CACnD,mBAAmB,EACnB,OAAO,yBAAyB,EAChC,KAAK,CACN,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;IACnD,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,KAA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QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CACnD,mBAAmB,EACnB,OAAO,yBAAyB,EAChC,KAAK,CACN,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;IACnD,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.24.0-beta-feature-731-m4l-components-code-editor.3",
3
+ "version": "9.24.0-beta-feature-731-m4l-components-code-editor.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,19 +53,19 @@
53
53
  "@hookform/resolvers": "2.9.11",
54
54
  "nprogress": "0.2.0",
55
55
  "react-transition-group": "4.4.5",
56
- "react-dropzone": "14.4.1",
57
56
  "react-color": "2.19.3",
58
- "react-rnd": "10.5.2",
59
57
  "@mui/x-date-pickers": "6.20.2",
60
58
  "react-draggable": "4.5.0",
61
- "date-fns": "2.30.0",
59
+ "react-rnd": "10.5.2",
60
+ "react-dropzone": "14.4.1",
62
61
  "react-spinners": "0.13.8",
62
+ "date-fns": "2.30.0",
63
63
  "chart.js": "4.5.1",
64
64
  "chartjs-chart-error-bars": "4.4.5",
65
65
  "qrcode.react": "3.2.0",
66
+ "simplebar-react": "3.2.6",
66
67
  "react-resizable-panels": "2.1.9",
67
68
  "react-simple-code-editor": "0.14.1",
68
- "simplebar-react": "3.2.6",
69
69
  "react-data-grid": "7.0.0-beta.47",
70
70
  "react-dnd": "16.0.1",
71
71
  "react-dnd-html5-backend": "16.0.1",