@m4l/components 9.24.1-beta-feature-731-code-editor.0 → 9.24.1-beta-feature-731-code-editor.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,eAAO,MAAM,gBAAgB,EAAE,gBA0Z9B,CAAC"}
1
+ {"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,eAAO,MAAM,gBAAgB,EAAE,gBA2Z9B,CAAC"}
@@ -1,5 +1,5 @@
1
- import { getTypographyStyles as s } from "../../../utils/getTypographyStyles.js";
2
- import { getCodeEditorVSCodeModernPalette as d, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as n, CODE_EDITOR_MONO_FONT_FAMILY as l, CODE_EDITOR_PADDING_PX as a, CODE_EDITOR_RESIZE_HANDLE_SIZE_PX as t } from "./constants.js";
1
+ import { getTypographyStyles as l } from "../../../utils/getTypographyStyles.js";
2
+ import { getCodeEditorVSCodeModernPalette as d, CODE_EDITOR_LINE_HEIGHT_BY_SIZE as n, CODE_EDITOR_MONO_FONT_FAMILY as s, CODE_EDITOR_PADDING_PX as a, CODE_EDITOR_RESIZE_HANDLE_SIZE_PX as t } from "./constants.js";
3
3
  import { getSizeStyles as p } from "../../../utils/getSizeStyles/getSizeStyles.js";
4
4
  const f = {
5
5
  /** Resolve the interactive shell colors and focus treatment for the editor root. */
@@ -119,7 +119,7 @@ const f = {
119
119
  (i) => ({ height: i })
120
120
  ),
121
121
  "&&& .M4LTypography-root": {
122
- ...s(r.generalSettings.isMobile, e?.size || "medium", "microSlim"),
122
+ ...l(r.generalSettings.isMobile, e?.size || "medium", "microSlim"),
123
123
  color: o.surface.languageChipForeground,
124
124
  lineHeight: "normal",
125
125
  textTransform: "uppercase"
@@ -153,7 +153,7 @@ const f = {
153
153
  (o) => ({ height: o })
154
154
  ),
155
155
  "&&& .M4LTypography-root": {
156
- ...s(r.generalSettings.isMobile, e?.size || "medium", "microSlim"),
156
+ ...l(r.generalSettings.isMobile, e?.size || "medium", "microSlim"),
157
157
  color: r.vars.palette.chips.info.contained.color
158
158
  },
159
159
  backgroundColor: r.vars.palette.chips.info.contained.backgroundColor,
@@ -247,25 +247,26 @@ const f = {
247
247
  backgroundColor: "transparent",
248
248
  color: e?.disabled ? o.surface.placeholderForeground : o.surface.lineNumberForeground,
249
249
  userSelect: "none",
250
- ...s(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
251
- fontFamily: l,
250
+ ...l(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
251
+ fontFamily: s,
252
252
  lineHeight: `${n[e?.size || "medium"]}px`
253
253
  };
254
254
  },
255
255
  /** Keep each rendered line number aligned with the code line height. */
256
- lineNumber: ({ ownerState: r }) => {
257
- const e = d(
258
- r?.colorMode
256
+ lineNumber: ({ theme: r, ownerState: e }) => {
257
+ const o = d(
258
+ e?.colorMode
259
259
  );
260
260
  return {
261
261
  display: "block",
262
262
  minWidth: "2ch",
263
- height: `${r?.lineHeight || n.medium}px`,
264
- lineHeight: `${r?.lineHeight || n.medium}px`,
263
+ height: `${e?.lineHeight || n.medium}px`,
264
+ lineHeight: `${e?.lineHeight || n.medium}px`,
265
265
  textAlign: "right",
266
+ color: r.vars.palette.text.disabled,
266
267
  '&[data-code-editor-error-line="true"]': {
267
- color: e.surface.errorBorderColor,
268
- borderLeft: `1px solid ${e.surface.errorBorderColor}`
268
+ color: o.surface.errorBorderColor,
269
+ borderLeft: `1px solid ${o.surface.errorBorderColor}`
269
270
  }
270
271
  };
271
272
  },
@@ -292,13 +293,13 @@ const f = {
292
293
  minWidth: "100%",
293
294
  minHeight: `calc(${e?.minLines || 1} * ${e?.lineHeight || n.medium}px + ${c}px)`,
294
295
  backgroundColor: "transparent",
295
- fontFamily: l,
296
+ fontFamily: s,
296
297
  fontSize: "11px",
297
298
  lineHeight: `${e?.lineHeight || n.medium}px`,
298
299
  fontWeight: 400,
299
300
  "& textarea, & pre": {
300
- ...s(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
301
- fontFamily: l,
301
+ ...l(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
302
+ fontFamily: s,
302
303
  lineHeight: `${e?.lineHeight || n.medium}px`,
303
304
  whiteSpace: "pre !important",
304
305
  wordBreak: "normal",
@@ -313,7 +314,7 @@ const f = {
313
314
  backgroundColor: "transparent"
314
315
  },
315
316
  "&&& textarea": {
316
- ...s(r.generalSettings.isMobile, e?.size || "medium", "microSlim"),
317
+ ...l(r.generalSettings.isMobile, e?.size || "medium", "microSlim"),
317
318
  outline: "none",
318
319
  backgroundColor: "transparent",
319
320
  caretColor: e?.disabled ? "transparent" : o.surface.caretForeground,
@@ -350,8 +351,8 @@ const f = {
350
351
  left: `${a}px`,
351
352
  pointerEvents: "none",
352
353
  color: o.surface.placeholderForeground,
353
- ...s(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
354
- fontFamily: l,
354
+ ...l(r.generalSettings.isMobile, e?.size || "medium", "bodyStandard"),
355
+ fontFamily: s,
355
356
  lineHeight: `${e?.lineHeight || n.medium}px`,
356
357
  whiteSpace: "pre-wrap"
357
358
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.24.1-beta-feature-731-code-editor.0",
3
+ "version": "9.24.1-beta-feature-731-code-editor.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,22 +53,22 @@
53
53
  "@hookform/resolvers": "2.9.11",
54
54
  "nprogress": "0.2.0",
55
55
  "react-transition-group": "4.4.5",
56
+ "react-color": "2.19.3",
56
57
  "@mui/x-date-pickers": "6.20.2",
57
58
  "react-rnd": "10.5.2",
58
- "react-color": "2.19.3",
59
- "date-fns": "2.30.0",
60
59
  "react-draggable": "4.5.0",
61
60
  "react-dropzone": "14.4.1",
61
+ "date-fns": "2.30.0",
62
62
  "react-spinners": "0.13.8",
63
+ "react-resizable-panels": "2.1.9",
64
+ "react-simple-code-editor": "0.14.1",
63
65
  "chart.js": "4.5.1",
64
66
  "chartjs-chart-error-bars": "4.4.5",
65
67
  "qrcode.react": "3.2.0",
66
- "simplebar-react": "3.2.6",
67
- "react-resizable-panels": "2.1.9",
68
- "react-simple-code-editor": "0.14.1",
69
68
  "react-data-grid": "7.0.0-beta.47",
70
69
  "react-dnd": "16.0.1",
71
70
  "react-dnd-html5-backend": "16.0.1",
71
+ "simplebar-react": "3.2.6",
72
72
  "react-resizable": "3.1.3",
73
73
  "react-window": "1.8.11",
74
74
  "@tanstack/react-virtual": "3.13.23"