canvu-react 0.4.26 → 0.4.27

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/react.cjs CHANGED
@@ -166,10 +166,11 @@ function buildTextFixedBoundsSvg(content, width, height, fillColor = "#1d1d1d",
166
166
  const body = escapeHtmlText(content);
167
167
  return `<foreignObject width="${w}" height="${h}"><div xmlns="http://www.w3.org/1999/xhtml" style="box-sizing:border-box;width:100%;height:100%;margin:0;padding:${padTop}px 4px 0 4px;font-size:${fontSize}px;line-height:${lh}px;font-family:${TEXT_FONT_FAMILY};white-space:pre-wrap;word-wrap:break-word;overflow:hidden;color:${fillColor}">${body}</div></foreignObject>`;
168
168
  }
169
- var DEFAULT_TEXT_FONT_SIZE, TEXT_FONT_FAMILY, LINE_HEIGHT_RATIO, FIRST_LINE_BASELINE_RATIO, EDIT_TOP_PAD_RATIO, BOTTOM_PAD_RATIO, PLACEHOLDER, MIN_TEXT_BOX_W, MIN_TEXT_BOX_H, TEXT_PAD_X, MAX_TEXT_MEASURE_CACHE_ENTRIES, sharedMeasureContext, textMeasureCache;
169
+ var DEFAULT_TEXT_FONT_SIZE, DEFAULT_TEXT_TOOL_FONT_SIZE, TEXT_FONT_FAMILY, LINE_HEIGHT_RATIO, FIRST_LINE_BASELINE_RATIO, EDIT_TOP_PAD_RATIO, BOTTOM_PAD_RATIO, PLACEHOLDER, MIN_TEXT_BOX_W, MIN_TEXT_BOX_H, TEXT_PAD_X, MAX_TEXT_MEASURE_CACHE_ENTRIES, sharedMeasureContext, textMeasureCache;
170
170
  var init_text_svg = __esm({
171
171
  "src/scene/text-svg.ts"() {
172
172
  DEFAULT_TEXT_FONT_SIZE = 18;
173
+ DEFAULT_TEXT_TOOL_FONT_SIZE = 28;
173
174
  TEXT_FONT_FAMILY = "Inter, -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif";
174
175
  LINE_HEIGHT_RATIO = 22 / 18;
175
176
  FIRST_LINE_BASELINE_RATIO = 20 / 18;
@@ -8344,11 +8345,11 @@ var VectorViewport = react.forwardRef(
8344
8345
  const rememberedImageBlobHrefsRef = react.useRef(/* @__PURE__ */ new Set());
8345
8346
  const strokeStyleRef = react.useRef({
8346
8347
  ...DEFAULT_STROKE_STYLE,
8347
- textFontSize: DEFAULT_TEXT_FONT_SIZE
8348
+ textFontSize: DEFAULT_TEXT_TOOL_FONT_SIZE
8348
8349
  });
8349
8350
  const [strokeStyleState, setStrokeStyleState] = react.useState({
8350
8351
  ...DEFAULT_STROKE_STYLE,
8351
- textFontSize: DEFAULT_TEXT_FONT_SIZE
8352
+ textFontSize: DEFAULT_TEXT_TOOL_FONT_SIZE
8352
8353
  });
8353
8354
  const setCurrentStrokeStyle = react.useCallback((next) => {
8354
8355
  strokeStyleRef.current = next;