exodeui 2.5.3 → 2.5.4

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.mjs CHANGED
@@ -4705,6 +4705,27 @@ class KC {
4705
4705
  duration: I.duration
4706
4706
  });
4707
4707
  }
4708
+ this.loadFonts();
4709
+ }
4710
+ loadFonts() {
4711
+ if (!this.artboard) return;
4712
+ const A = /* @__PURE__ */ new Set();
4713
+ if (this.artboard.objects.forEach((C) => {
4714
+ C.geometry && C.geometry.type === "Text" && C.geometry.fontFamily && A.add(C.geometry.fontFamily);
4715
+ }), A.size === 0) return;
4716
+ let I = "";
4717
+ A.forEach((C) => {
4718
+ const B = C.replace(/ /g, "+");
4719
+ I += `&family=${B}:wght@400;700`;
4720
+ });
4721
+ const g = "exodeui-google-fonts";
4722
+ if (document.getElementById(g)) {
4723
+ const C = document.getElementById(g);
4724
+ C.href = `https://fonts.googleapis.com/css2?display=swap${I}`;
4725
+ } else {
4726
+ const C = document.createElement("link");
4727
+ C.id = g, C.rel = "stylesheet", C.href = `https://fonts.googleapis.com/css2?display=swap${I}`, document.head.appendChild(C);
4728
+ }
4708
4729
  }
4709
4730
  enterStates(A, I) {
4710
4731
  if (I.length === 0) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodeui",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "description": "React Runtime for ExodeUI Animation Engine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",