@voicenter-team/voicenter-ui-plus 3.3.0 → 3.3.1

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.
@@ -29,20 +29,11 @@ class FontLoader {
29
29
  try {
30
30
  const link = document.createElement("link");
31
31
  link.rel = "stylesheet";
32
- let url = "https://fonts.googleapis.com/css?";
33
- const familiesParams = [];
34
- filteredFamilies.forEach((family, index) => {
35
- let familyUrl = "";
36
- if (index === 0) {
37
- familyUrl = "family=";
38
- }
39
- familyUrl += family.replace(/ /g, "+");
40
- familiesParams.push(familyUrl);
32
+ let url = "https://fonts.googleapis.com/css2?";
33
+ const params = filteredFamilies.map((family) => {
41
34
  this.loadedFonts.add(family);
35
+ return `family=${family.replace(/ /g, "+")}`;
42
36
  });
43
- const params = [
44
- familiesParams.join("|")
45
- ];
46
37
  params.push("display=swap");
47
38
  if (text) {
48
39
  params.push(`text=${encodeURIComponent(text)}`);
@@ -10,17 +10,9 @@ function loadIconFont() {
10
10
  });
11
11
  }
12
12
  async function loadTextFont() {
13
- const step = 100;
14
- const from = 300;
15
- const upTo = 900;
16
- const fontWeights = [];
17
- for (let weight = from; weight <= upTo; weight += step) {
18
- fontWeights.push(weight);
19
- }
20
- const fontWeightsString = fontWeights.join(",");
21
13
  FontLoaderAPI.load({
22
14
  google: {
23
- families: [`Rubik:${fontWeightsString}`]
15
+ families: ["Rubik:ital,wght@0,300..900;1,300..900"]
24
16
  }
25
17
  });
26
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicenter-team/voicenter-ui-plus",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",