fabric 6.4.2 → 6.4.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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ## [next]
3
+ ## [6.4.3]
4
+
5
+ - fix(Controls): changeWidth can change width with decimals [#10186](https://github.com/fabricjs/fabric.js/pull/10186)
6
+ - ci(): Add some prebuilt fabric in the dist folder [#10178](https://github.com/fabricjs/fabric.js/pull/10178)
7
+ - chore(): Add more generic font families to FabricText.genericFonts [#10167](https://github.com/fabricjs/fabric.js/pull/10167)
4
8
 
5
9
  ## [6.4.2]
6
10
 
package/dist/index.js CHANGED
@@ -411,7 +411,7 @@
411
411
  }
412
412
  const cache = new Cache();
413
413
 
414
- var version = "6.4.2";
414
+ var version = "6.4.3";
415
415
 
416
416
  // use this syntax so babel plugin see this import here
417
417
  const VERSION = version;
@@ -8233,8 +8233,8 @@
8233
8233
  strokePadding = target.strokeWidth / (target.strokeUniform ? target.scaleX : 1),
8234
8234
  multiplier = isTransformCentered(transform) ? 2 : 1,
8235
8235
  oldWidth = target.width,
8236
- newWidth = Math.ceil(Math.abs(localPoint.x * multiplier / target.scaleX) - strokePadding);
8237
- target.set('width', Math.max(newWidth, 0));
8236
+ newWidth = Math.abs(localPoint.x * multiplier / target.scaleX) - strokePadding;
8237
+ target.set('width', Math.max(newWidth, 1));
8238
8238
  // check against actual target width in case `newWidth` was rejected
8239
8239
  return oldWidth !== target.width;
8240
8240
  }
@@ -20038,6 +20038,12 @@
20038
20038
  complexity() {
20039
20039
  return 1;
20040
20040
  }
20041
+
20042
+ /**
20043
+ * List of generic font families
20044
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
20045
+ */
20046
+
20041
20047
  /**
20042
20048
  * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
20043
20049
  * @static
@@ -20122,7 +20128,7 @@
20122
20128
  _defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
20123
20129
  _defineProperty(FabricText, "ownDefaults", textDefaultValues);
20124
20130
  _defineProperty(FabricText, "type", 'Text');
20125
- _defineProperty(FabricText, "genericFonts", ['sans-serif', 'serif', 'cursive', 'fantasy', 'monospace']);
20131
+ _defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
20126
20132
  /* _FROM_SVG_START_ */
20127
20133
  /**
20128
20134
  * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})