@versini/ui-icon-renderer 2.5.0 → 2.6.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.
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useState, useEffect } from "./184.js";
2
+ import { useEffect, useState } from "react";
3
+
3
4
 
4
5
 
5
6
 
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was automatically generated.
3
+ * Please do not edit manually.
4
+ *
5
+ * To update this file, run `npm run build:list`.
6
+ *
7
+ */
8
+ export { IconWarningLight as default } from "@versini/ui-icons/icon-warning-light";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was automatically generated.
3
+ * Please do not edit manually.
4
+ *
5
+ * To update this file, run `npm run build:list`.
6
+ *
7
+ */
8
+ export { IconWarning as default } from "@versini/ui-icons/icon-warning";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IconsProps } from '@versini/ui-icons';
2
- import { JSX } from 'react/jsx-runtime';
2
+ import { JSX } from 'react';
3
3
 
4
4
  export declare function useIconRenderer(): readonly [(({ icon, ...rest }: {
5
5
  icon: string;
package/dist/index.js CHANGED
@@ -1,2 +1,28 @@
1
+ import { useCallback, useEffect, useRef, useState } from "react";
1
2
 
2
- export { useIconRenderer } from "./184.js";
3
+
4
+
5
+ function useIconRenderer() {
6
+ const modRef = useRef(null);
7
+ const [mod, setMod] = useState(null);
8
+ useEffect(()=>{
9
+ /* v8 ignore start -- dynamic imports are not fully instrumented by V8 */ import("./IconRenderer.js").then((m)=>{
10
+ modRef.current = m;
11
+ setMod(m);
12
+ }).catch(()=>{});
13
+ /* v8 ignore stop */ }, []);
14
+ /* v8 ignore start -- dynamic imports are not fully instrumented by V8 */ const preload = useCallback((icons)=>{
15
+ const ensure = modRef.current ? Promise.resolve(modRef.current) : import("./IconRenderer.js").then((m)=>{
16
+ modRef.current = m;
17
+ setMod(m);
18
+ return m;
19
+ });
20
+ return ensure.then((m)=>m.preloadIcons(icons)).catch(()=>{});
21
+ }, []);
22
+ /* v8 ignore stop */ return [
23
+ mod?.IconRenderer ?? null,
24
+ preload
25
+ ];
26
+ }
27
+
28
+ export { useIconRenderer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-icon-renderer",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -47,10 +47,10 @@
47
47
  "clsx": ">=2"
48
48
  },
49
49
  "devDependencies": {
50
- "@versini/ui-icons": "4.28.0"
50
+ "@versini/ui-icons": "4.29.1"
51
51
  },
52
52
  "sideEffects": [
53
53
  "**/*.css"
54
54
  ],
55
- "gitHead": "63d56d9b97daf5a7cf90dae3a35090c003bf3bf4"
55
+ "gitHead": "a8dda653c1654ea4c1294ea7d5506ceb733bc696"
56
56
  }
package/dist/184.js DELETED
@@ -1,28 +0,0 @@
1
- import { useCallback, useEffect, useRef, useState } from "react";
2
-
3
-
4
-
5
- function useIconRenderer() {
6
- const modRef = useRef(null);
7
- const [mod, setMod] = useState(null);
8
- useEffect(()=>{
9
- /* v8 ignore start -- dynamic imports are not fully instrumented by V8 */ import("./475.js").then((mod) => ({ IconRenderer: mod.IconRenderer,preloadIcon: mod.preloadIcon,preloadIcons: mod.preloadIcons })).then((m)=>{
10
- modRef.current = m;
11
- setMod(m);
12
- }).catch(()=>{});
13
- /* v8 ignore stop */ }, []);
14
- /* v8 ignore start -- dynamic imports are not fully instrumented by V8 */ const preload = useCallback((icons)=>{
15
- const ensure = modRef.current ? Promise.resolve(modRef.current) : import("./475.js").then((mod) => ({ IconRenderer: mod.IconRenderer,preloadIcon: mod.preloadIcon,preloadIcons: mod.preloadIcons })).then((m)=>{
16
- modRef.current = m;
17
- setMod(m);
18
- return m;
19
- });
20
- return ensure.then((m)=>m.preloadIcons(icons)).catch(()=>{});
21
- }, []);
22
- /* v8 ignore stop */ return [
23
- mod?.IconRenderer ?? null,
24
- preload
25
- ];
26
- }
27
-
28
- export { useEffect, useIconRenderer, useState };