@payfit/unity-icons 2.46.17 → 2.46.18

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.
@@ -0,0 +1,4 @@
1
+ export * from './generated/index.js';
2
+ export * from './components/icon/Icon.js';
3
+ export * from './components/icon/parts/IconSprite.js';
4
+ export * from './components/icons-provider/UnityIconsProvider.js';
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,6 @@
1
+ export declare const spriteContent: string;
2
+ export declare class SpriteInjectionError extends Error {
3
+ constructor(message: string);
4
+ }
5
+ export declare function injectSprite(): void;
6
+ export declare function isSpriteInDocument(): boolean;
@@ -0,0 +1,32 @@
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
+ }
7
+ }
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
+ }
23
+ }
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-icons",
3
- "version": "2.46.17",
3
+ "version": "2.46.18",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -60,13 +60,13 @@
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.46.17",
63
+ "@payfit/unity-themes": "2.46.18",
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.46.17"
69
+ "@payfit/unity-themes": "2.46.18"
70
70
  },
71
71
  "keywords": [
72
72
  "tanstack-intent"