@payfit/unity-icons 2.47.5 → 2.47.6

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/esm/index.js CHANGED
@@ -1,11 +1,5 @@
1
1
  import { iconNames as e } from "./generated/index.js";
2
- import { Icon as n } from "./components/icon/Icon.js";
3
- import { IconSprite as m } from "./components/icon/parts/IconSprite.js";
4
- import { UnityIconsProvider as x, useIconsContext as f } from "./components/icons-provider/UnityIconsProvider.js";
5
- export {
6
- n as Icon,
7
- m as IconSprite,
8
- x as UnityIconsProvider,
9
- e as iconNames,
10
- f as useIconsContext
11
- };
2
+ import { UnityIconsProvider as t, useIconsContext as n } from "./components/icons-provider/UnityIconsProvider.js";
3
+ import { IconSprite as r } from "./components/icon/parts/IconSprite.js";
4
+ import { Icon as i } from "./components/icon/Icon.js";
5
+ export { i as Icon, r as IconSprite, t as UnityIconsProvider, e as iconNames, n as useIconsContext };
package/dist/esm/utils.js CHANGED
@@ -1,32 +1,21 @@
1
- import i from "./generated/sprite.svg.js";
2
- const o = i;
3
- class n extends Error {
4
- constructor(r) {
5
- super(r), this.name = "SpriteInjectionError";
6
- }
1
+ import e from "./generated/sprite.js";
2
+ //#region src/utils.ts
3
+ var t = e, n = class extends Error {
4
+ constructor(e) {
5
+ super(e), this.name = "SpriteInjectionError";
6
+ }
7
+ }, r = !1;
8
+ function i() {
9
+ if (typeof document > "u") throw new n("Cannot inject sprite in non-browser environment");
10
+ if (!r) try {
11
+ let e = document.createElement("div");
12
+ e.setAttribute("data-testid", "unity-sprite-container"), e.style.display = "none", e.innerHTML = t, document.body.appendChild(e), r = !0;
13
+ } catch (e) {
14
+ throw new n(`Failed to inject sprite: ${e instanceof Error ? e.message : "Unknown error"}`);
15
+ }
7
16
  }
8
- let t = !1;
9
- function c() {
10
- if (typeof document > "u")
11
- throw new n(
12
- "Cannot inject sprite in non-browser environment"
13
- );
14
- if (!t)
15
- try {
16
- const e = document.createElement("div");
17
- e.setAttribute("data-testid", "unity-sprite-container"), e.style.display = "none", e.innerHTML = o, document.body.appendChild(e), t = !0;
18
- } catch (e) {
19
- throw new n(
20
- `Failed to inject sprite: ${e instanceof Error ? e.message : "Unknown error"}`
21
- );
22
- }
17
+ function a() {
18
+ return typeof document < "u" && r;
23
19
  }
24
- function d() {
25
- return typeof document < "u" && t;
26
- }
27
- export {
28
- n as SpriteInjectionError,
29
- c as injectSprite,
30
- d as isSpriteInDocument,
31
- o as spriteContent
32
- };
20
+ //#endregion
21
+ export { i as injectSprite, a as isSpriteInDocument };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-icons",
3
- "version": "2.47.5",
3
+ "version": "2.47.6",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -47,26 +47,26 @@
47
47
  "@types/libsodium-wrappers": "0.7.14",
48
48
  "@types/react": "18.3.18",
49
49
  "@types/react-dom": "18.3.5",
50
- "@vitest/browser": "4.1.0",
50
+ "@vitest/browser": "4.1.9",
51
51
  "glob": "11.1.0",
52
52
  "libsodium-wrappers": "0.7.15",
53
53
  "playwright": "1.55.1",
54
54
  "storybook": "10.4.4",
55
55
  "tailwindcss": "4.3.0",
56
56
  "tsx": "4.20.5",
57
- "vite": "7.1.12",
58
- "vitest": "4.1.0",
57
+ "vite": "8.0.16",
58
+ "vitest": "4.1.9",
59
59
  "@payfit/figma-tools": "0.0.0-use.local",
60
60
  "@payfit/hr-app-eslint": "0.0.0-use.local",
61
61
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
62
62
  "@payfit/storybook-config": "0.0.0-use.local",
63
- "@payfit/unity-themes": "2.47.5",
63
+ "@payfit/unity-themes": "2.47.6",
64
64
  "@payfit/vite-configs": "0.0.0-use.local"
65
65
  },
66
66
  "dependencies": {
67
67
  "react": "18.3.1",
68
68
  "react-dom": "18.3.1",
69
- "@payfit/unity-themes": "2.47.5"
69
+ "@payfit/unity-themes": "2.47.6"
70
70
  },
71
71
  "keywords": [
72
72
  "tanstack-intent"