@tecof/theme-editor 0.0.13 → 0.0.14

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/index.js CHANGED
@@ -22350,9 +22350,8 @@ var FileItemRenderer = ({
22350
22350
  data: file2,
22351
22351
  alt: file2.meta?.originalName || file2.name,
22352
22352
  size: "thumbnail",
22353
- fill: true,
22354
22353
  className: "tecof-upload-file-thumb",
22355
- imgStyle: { objectFit: "cover", borderRadius: "10px" }
22354
+ imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "10px" }
22356
22355
  }
22357
22356
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-file-icon", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 20 }) }),
22358
22357
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-info", children: [
@@ -22794,9 +22793,8 @@ var UploadField = ({
22794
22793
  data: file2,
22795
22794
  alt: file2.name,
22796
22795
  size: "thumbnail",
22797
- fill: true,
22798
22796
  className: "tecof-upload-gallery-thumb",
22799
- imgStyle: { objectFit: "cover", borderRadius: "6px" }
22797
+ imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
22800
22798
  }
22801
22799
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-thumb tecof-upload-gallery-file-icon-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 24, color: "#a1a1aa" }) }),
22802
22800
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
@@ -23475,9 +23473,15 @@ var CodeEditorField = React__default.forwardRef(({
23475
23473
  theme = "vs-dark"
23476
23474
  }, ref) => {
23477
23475
  const editorRef = React__default.useRef(null);
23478
- const handleEditorDidMount = (editor2) => {
23476
+ const onChangeRef = React__default.useRef(onChange);
23477
+ onChangeRef.current = onChange;
23478
+ const handleEditorDidMount = React__default.useCallback((editor2) => {
23479
23479
  editorRef.current = editor2;
23480
- };
23480
+ editor2.onDidChangeModelContent(() => {
23481
+ const newValue = editor2.getValue();
23482
+ onChangeRef.current(newValue);
23483
+ });
23484
+ }, []);
23481
23485
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: "tecof-code-editor-container", children: /* @__PURE__ */ jsxRuntime.jsx(
23482
23486
  Ft,
23483
23487
  {
@@ -23486,8 +23490,7 @@ var CodeEditorField = React__default.forwardRef(({
23486
23490
  width: "100%",
23487
23491
  height,
23488
23492
  defaultLanguage,
23489
- value: value || "",
23490
- onChange: (val) => onChange(val || ""),
23493
+ defaultValue: value || "",
23491
23494
  options: {
23492
23495
  readOnly,
23493
23496
  minimap: { enabled: false },