@iqworksai/common-components 0.1.21 → 0.1.22
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/components/Favicons/index.d.ts +83 -0
- package/dist/components/Favicons/index.d.ts.map +1 -0
- package/dist/{index--e0eFmJz.js → index-CONA5Li5.js} +8494 -8424
- package/dist/{index-DuYopz3l.cjs → index-CUUuCzyM.cjs} +44 -32
- package/dist/{index-Bsibz5yn.js → index-DMtOfWE5.js} +1 -1
- package/dist/{index-CM7jFsCE.cjs → index-DtVOjJk3.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +50 -46
- package/dist/jquery-BKuE7Afe.cjs +13 -0
- package/dist/jquery-DkIPk6Xa.js +3641 -0
- package/dist/{jstree-CXGKFWK1.cjs → jstree-CtrCtuMv.cjs} +3 -3
- package/dist/{jstree-ETZgxxT1.js → jstree-HPMBlHvS.js} +13 -13
- package/package.json +1 -1
- package/dist/jquery-B5k82Ft4.js +0 -3622
- package/dist/jquery-DJhgA209.cjs +0 -13
- package/dist/jquery-DXFsjw95.js +0 -26
- package/dist/jquery-DeHtnyTt.cjs +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Products that have favicon icons available.
|
|
3
|
+
* Add new product keys here as icon assets are added.
|
|
4
|
+
*/
|
|
5
|
+
export type FaviconProductKey = 'iqworks';
|
|
6
|
+
export type FaviconFormat = 'svg' | 'png';
|
|
7
|
+
export type FaviconTheme = 'dark' | 'light';
|
|
8
|
+
export interface FaviconData {
|
|
9
|
+
/** Data URL for use in <link rel="icon"> href */
|
|
10
|
+
dataUrl: string;
|
|
11
|
+
/** Direct URL to the asset file */
|
|
12
|
+
url: string;
|
|
13
|
+
/** Raw SVG string (only for SVG format) */
|
|
14
|
+
raw?: string;
|
|
15
|
+
/** The format of the favicon */
|
|
16
|
+
format: FaviconFormat;
|
|
17
|
+
/** The theme variant */
|
|
18
|
+
theme: FaviconTheme;
|
|
19
|
+
}
|
|
20
|
+
export interface GetFaviconOptions {
|
|
21
|
+
/** Favicon format: 'svg' (default) or 'png' */
|
|
22
|
+
format?: FaviconFormat;
|
|
23
|
+
/** Theme variant: 'dark' (default) or 'light' */
|
|
24
|
+
theme?: FaviconTheme;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get favicon data for a product.
|
|
28
|
+
*
|
|
29
|
+
* @param product - The product key (e.g., 'iqworks')
|
|
30
|
+
* @param options - Optional format and theme settings
|
|
31
|
+
* @returns FaviconData object with dataUrl, url, and raw SVG (if applicable)
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* // Get SVG favicon (default)
|
|
36
|
+
* const favicon = getFavicon('iqworks');
|
|
37
|
+
*
|
|
38
|
+
* // Use in document head
|
|
39
|
+
* <link rel="icon" type="image/svg+xml" href={favicon.dataUrl} />
|
|
40
|
+
*
|
|
41
|
+
* // Get PNG favicon for light theme
|
|
42
|
+
* const pngFavicon = getFavicon('iqworks', { format: 'png', theme: 'light' });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function getFavicon(product: FaviconProductKey, options?: GetFaviconOptions): FaviconData | null;
|
|
46
|
+
/**
|
|
47
|
+
* Get all available favicon product keys
|
|
48
|
+
*/
|
|
49
|
+
export declare function getAvailableFaviconProducts(): FaviconProductKey[];
|
|
50
|
+
/**
|
|
51
|
+
* Check if a product has a favicon available
|
|
52
|
+
*/
|
|
53
|
+
export declare function hasFavicon(product: string): product is FaviconProductKey;
|
|
54
|
+
export interface UseFaviconOptions extends GetFaviconOptions {
|
|
55
|
+
/** Whether to apply the favicon to the document (default: true) */
|
|
56
|
+
apply?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* React hook to set the document favicon for a product.
|
|
60
|
+
* Automatically updates the favicon when the product or options change.
|
|
61
|
+
*
|
|
62
|
+
* @param product - The product key (e.g., 'iqworks')
|
|
63
|
+
* @param options - Optional format, theme, and apply settings
|
|
64
|
+
* @returns The favicon data object
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* function App() {
|
|
69
|
+
* // Automatically sets the document favicon
|
|
70
|
+
* useFavicon('iqworks');
|
|
71
|
+
*
|
|
72
|
+
* return <div>...</div>;
|
|
73
|
+
* }
|
|
74
|
+
*
|
|
75
|
+
* // With options
|
|
76
|
+
* useFavicon('iqworks', { format: 'png', theme: 'light' });
|
|
77
|
+
*
|
|
78
|
+
* // Get data without applying
|
|
79
|
+
* const favicon = useFavicon('iqworks', { apply: false });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function useFavicon(product: FaviconProductKey, options?: UseFaviconOptions): FaviconData | null;
|
|
83
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Favicons/index.tsx"],"names":[],"mappings":"AAYA;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAG1C,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC;AAC1C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAsC5C,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,wBAAwB;IACxB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iDAAiD;IACjD,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,WAAW,GAAG,IAAI,CA4BpB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,iBAAiB,EAAE,CAEjE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,iBAAiB,CAExE;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,WAAW,GAAG,IAAI,CAwBpB"}
|