@redotech/redo-hydrogen 1.2.1 → 1.3.0

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,24 @@
1
+ <svg
2
+ width="24"
3
+ height="24"
4
+ viewBox="0 0 24 24"
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ >
7
+ <path
8
+ d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"
9
+ fill="currentColor"
10
+ opacity=".25"
11
+ />
12
+ <path
13
+ d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
14
+ fill="currentColor"
15
+ >
16
+ <animateTransform
17
+ attributeName="transform"
18
+ type="rotate"
19
+ dur="0.75s"
20
+ values="0 12 12;360 12 12"
21
+ repeatCount="indefinite"
22
+ />
23
+ </path>
24
+ </svg>
@@ -0,0 +1,12 @@
1
+ export async function executeWithTimeout<T, E extends Error>(
2
+ promise: Promise<T>,
3
+ timeoutMs: number,
4
+ error: E = new Error("timeout") as E,
5
+ ): Promise<T> {
6
+ return Promise.race([
7
+ promise,
8
+ new Promise<never>((_, reject) =>
9
+ setTimeout(() => reject(error), timeoutMs),
10
+ ),
11
+ ]);
12
+ }
package/tsconfig.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "noEmit": true,
17
17
  "jsx": "react-jsx"
18
18
  },
19
- "include": ["src", "src/index.ts"]
19
+ "include": ["src", "src/index.ts", "src/svg.d.ts"]
20
20
  }