@zero-library/common 2.3.2 → 2.3.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.
package/dist/index.cjs.js CHANGED
@@ -8589,7 +8589,6 @@ var MarkdownEditor_default = ({
8589
8589
  content: value,
8590
8590
  contentType: "markdown",
8591
8591
  onUpdate: () => {
8592
- console.log("update \u6587\u672C\u6539\u53D8");
8593
8592
  const markdownOutput = getMarkdown();
8594
8593
  if (markdownOutput === lastContentRef.current) return;
8595
8594
  lastContentRef.current = markdownOutput;
@@ -8733,7 +8732,7 @@ var styles_module_default7 = {
8733
8732
  rect: "styles_module_rect",
8734
8733
  score: "styles_module_score"
8735
8734
  };
8736
- var MarkDrawing_default = ({ children, detections, originalSize }) => {
8735
+ var MarkDrawing_default = ({ children, detections, originalSize, scopeRender }) => {
8737
8736
  const containerRef = React.useRef(null);
8738
8737
  const [containerSize, setContainerSize] = React.useState({
8739
8738
  width: originalSize.width,
@@ -8754,7 +8753,7 @@ var MarkDrawing_default = ({ children, detections, originalSize }) => {
8754
8753
  const scaleY = containerSize.height / originalSize.height;
8755
8754
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: styles_module_default7.container, children: [
8756
8755
  children,
8757
- detections.map((det, idx) => {
8756
+ detections?.map((det, idx) => {
8758
8757
  const [x1, y1, x2, y2] = det.bbox;
8759
8758
  const left = x1 * scaleX;
8760
8759
  const top = y1 * scaleY;
@@ -8781,7 +8780,7 @@ var MarkDrawing_default = ({ children, detections, originalSize }) => {
8781
8780
  left,
8782
8781
  top: Math.max(top - 20, 0)
8783
8782
  },
8784
- children: det.score.toFixed(3)
8783
+ children: scopeRender ? scopeRender(det.score) : det.score
8785
8784
  }
8786
8785
  )
8787
8786
  ] }, idx);