@illuma-ai/icons 2.0.0 → 2.1.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.
- package/dist/files/FileIcon.d.ts +13 -0
- package/dist/files/index.d.ts +3 -3
- package/dist/files/resolve.d.ts +5 -0
- package/dist/files.cjs +1 -1
- package/dist/files.es.js +82 -31
- package/package.json +1 -1
package/dist/files/FileIcon.d.ts
CHANGED
|
@@ -18,6 +18,19 @@ export interface FileIconProps extends Omit<SVGProps<SVGSVGElement>, 'children'>
|
|
|
18
18
|
* the consumer. Falls back to a generic Office mark for unknown types.
|
|
19
19
|
*/
|
|
20
20
|
export declare const FileIcon: import('react').ForwardRefExoticComponent<Omit<FileIconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
21
|
+
export interface ArtifactIconProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {
|
|
22
|
+
/** Artifact type identifier (e.g. `application/vnd.react`, `text/html`). */
|
|
23
|
+
type?: string;
|
|
24
|
+
/** Artifact language (e.g. `react`, `html`, `python`) — fallback when no type. */
|
|
25
|
+
language?: string;
|
|
26
|
+
/** Pixel size for width and height. Defaults to 24. */
|
|
27
|
+
size?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Icon for a side-panel code/document artifact, resolved from its type/language
|
|
31
|
+
* rather than a filename (a React artifact → react icon, HTML → html, etc.).
|
|
32
|
+
*/
|
|
33
|
+
export declare const ArtifactIcon: import('react').ForwardRefExoticComponent<Omit<ArtifactIconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
21
34
|
export interface AnimatedFileIconProps {
|
|
22
35
|
/** Filename or bare extension used to resolve the icon. */
|
|
23
36
|
file?: string;
|
package/dist/files/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FileIcon, AnimatedFileIcon, hasCodingAnimation } from './FileIcon';
|
|
2
|
-
export type { FileIconProps, AnimatedFileIconProps } from './FileIcon';
|
|
3
|
-
export { resolveFileIcon, DEFAULT_FILE_ICON, FILE_ICONS, } from './resolve';
|
|
1
|
+
export { FileIcon, ArtifactIcon, AnimatedFileIcon, hasCodingAnimation } from './FileIcon';
|
|
2
|
+
export type { FileIconProps, ArtifactIconProps, AnimatedFileIconProps } from './FileIcon';
|
|
3
|
+
export { resolveFileIcon, resolveArtifactIcon, DEFAULT_FILE_ICON, FILE_ICONS, } from './resolve';
|
|
4
4
|
export { FILE_ICON_GIFS } from './icons.generated';
|
|
5
5
|
export type { ResolvedFileIcon, FileIconName, FileIconData } from './resolve';
|
package/dist/files/resolve.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { FILE_ICONS, FileIconName, FileIconData } from './icons.generated';
|
|
2
2
|
/** Generic fallback for unknown/other file types (Office 365 mark). */
|
|
3
3
|
export declare const DEFAULT_FILE_ICON: FileIconName;
|
|
4
|
+
/**
|
|
5
|
+
* Resolve an artifact's icon from its `type` and/or `language`. Resolution
|
|
6
|
+
* order: artifact type → language → {@link DEFAULT_FILE_ICON}.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveArtifactIcon(type?: string, language?: string): ResolvedFileIcon;
|
|
4
9
|
export interface ResolvedFileIcon extends FileIconData {
|
|
5
10
|
readonly name: FileIconName;
|
|
6
11
|
}
|