@quikturn/logos-react 1.0.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/README.md +323 -0
- package/dist/index.cjs +675 -0
- package/dist/index.d.cts +100 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.mjs +665 -0
- package/package.json +56 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { SupportedOutputFormat, FormatShorthand, ThemeOption } from '@quikturn/logos';
|
|
3
|
+
import React$1 from 'react';
|
|
4
|
+
|
|
5
|
+
/** Options that control logo image generation. */
|
|
6
|
+
interface LogoOptions {
|
|
7
|
+
size?: number;
|
|
8
|
+
format?: SupportedOutputFormat | FormatShorthand;
|
|
9
|
+
greyscale?: boolean;
|
|
10
|
+
theme?: ThemeOption;
|
|
11
|
+
}
|
|
12
|
+
/** Per-logo configuration in carousel/grid components. */
|
|
13
|
+
interface LogoConfig extends LogoOptions {
|
|
14
|
+
domain: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Internal resolved logo with pre-built URL. */
|
|
19
|
+
interface ResolvedLogo {
|
|
20
|
+
domain: string;
|
|
21
|
+
url: string;
|
|
22
|
+
alt: string;
|
|
23
|
+
href?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Props for the QuikturnLogo component. */
|
|
26
|
+
interface QuikturnLogoProps extends LogoOptions {
|
|
27
|
+
domain: string;
|
|
28
|
+
token?: string;
|
|
29
|
+
baseUrl?: string;
|
|
30
|
+
alt?: string;
|
|
31
|
+
href?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
loading?: "lazy" | "eager";
|
|
35
|
+
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
36
|
+
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
37
|
+
}
|
|
38
|
+
/** Props for the QuikturnLogoCarousel component. */
|
|
39
|
+
interface QuikturnLogoCarouselProps {
|
|
40
|
+
domains?: string[];
|
|
41
|
+
logos?: LogoConfig[];
|
|
42
|
+
token?: string;
|
|
43
|
+
baseUrl?: string;
|
|
44
|
+
speed?: number;
|
|
45
|
+
direction?: "left" | "right" | "up" | "down";
|
|
46
|
+
pauseOnHover?: boolean;
|
|
47
|
+
hoverSpeed?: number;
|
|
48
|
+
logoHeight?: number;
|
|
49
|
+
gap?: number;
|
|
50
|
+
width?: number | string;
|
|
51
|
+
fadeOut?: boolean;
|
|
52
|
+
fadeOutColor?: string;
|
|
53
|
+
scaleOnHover?: boolean;
|
|
54
|
+
logoSize?: number;
|
|
55
|
+
logoFormat?: SupportedOutputFormat | FormatShorthand;
|
|
56
|
+
logoGreyscale?: boolean;
|
|
57
|
+
logoTheme?: ThemeOption;
|
|
58
|
+
renderItem?: (logo: ResolvedLogo, index: number) => React.ReactNode;
|
|
59
|
+
className?: string;
|
|
60
|
+
style?: React.CSSProperties;
|
|
61
|
+
ariaLabel?: string;
|
|
62
|
+
}
|
|
63
|
+
/** Props for the QuikturnLogoGrid component. */
|
|
64
|
+
interface QuikturnLogoGridProps {
|
|
65
|
+
domains?: string[];
|
|
66
|
+
logos?: LogoConfig[];
|
|
67
|
+
token?: string;
|
|
68
|
+
baseUrl?: string;
|
|
69
|
+
columns?: number;
|
|
70
|
+
gap?: number;
|
|
71
|
+
logoSize?: number;
|
|
72
|
+
logoFormat?: SupportedOutputFormat | FormatShorthand;
|
|
73
|
+
logoGreyscale?: boolean;
|
|
74
|
+
logoTheme?: ThemeOption;
|
|
75
|
+
renderItem?: (logo: ResolvedLogo, index: number) => React.ReactNode;
|
|
76
|
+
className?: string;
|
|
77
|
+
style?: React.CSSProperties;
|
|
78
|
+
ariaLabel?: string;
|
|
79
|
+
}
|
|
80
|
+
/** Props for the QuikturnProvider component. */
|
|
81
|
+
interface QuikturnProviderProps {
|
|
82
|
+
token: string;
|
|
83
|
+
baseUrl?: string;
|
|
84
|
+
children: React.ReactNode;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare function QuikturnProvider({ token, baseUrl, children, }: QuikturnProviderProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
|
|
89
|
+
declare function useLogoUrl(domain: string, options?: LogoOptions & {
|
|
90
|
+
token?: string;
|
|
91
|
+
baseUrl?: string;
|
|
92
|
+
}): string;
|
|
93
|
+
|
|
94
|
+
declare function QuikturnLogo({ domain, token, baseUrl, size, format, greyscale, theme, alt, href, className, style, loading, onError, onLoad, }: QuikturnLogoProps): react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
96
|
+
declare const QuikturnLogoCarousel: React$1.NamedExoticComponent<QuikturnLogoCarouselProps>;
|
|
97
|
+
|
|
98
|
+
declare function QuikturnLogoGrid({ domains, logos, token, baseUrl, columns, gap, logoSize, logoFormat, logoGreyscale, logoTheme, renderItem, className, style, ariaLabel, }: QuikturnLogoGridProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
export { type LogoConfig, type LogoOptions, QuikturnLogo, QuikturnLogoCarousel, type QuikturnLogoCarouselProps, QuikturnLogoGrid, type QuikturnLogoGridProps, type QuikturnLogoProps, QuikturnProvider, type QuikturnProviderProps, type ResolvedLogo, useLogoUrl };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { SupportedOutputFormat, FormatShorthand, ThemeOption } from '@quikturn/logos';
|
|
3
|
+
import React$1 from 'react';
|
|
4
|
+
|
|
5
|
+
/** Options that control logo image generation. */
|
|
6
|
+
interface LogoOptions {
|
|
7
|
+
size?: number;
|
|
8
|
+
format?: SupportedOutputFormat | FormatShorthand;
|
|
9
|
+
greyscale?: boolean;
|
|
10
|
+
theme?: ThemeOption;
|
|
11
|
+
}
|
|
12
|
+
/** Per-logo configuration in carousel/grid components. */
|
|
13
|
+
interface LogoConfig extends LogoOptions {
|
|
14
|
+
domain: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Internal resolved logo with pre-built URL. */
|
|
19
|
+
interface ResolvedLogo {
|
|
20
|
+
domain: string;
|
|
21
|
+
url: string;
|
|
22
|
+
alt: string;
|
|
23
|
+
href?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Props for the QuikturnLogo component. */
|
|
26
|
+
interface QuikturnLogoProps extends LogoOptions {
|
|
27
|
+
domain: string;
|
|
28
|
+
token?: string;
|
|
29
|
+
baseUrl?: string;
|
|
30
|
+
alt?: string;
|
|
31
|
+
href?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
loading?: "lazy" | "eager";
|
|
35
|
+
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
36
|
+
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
37
|
+
}
|
|
38
|
+
/** Props for the QuikturnLogoCarousel component. */
|
|
39
|
+
interface QuikturnLogoCarouselProps {
|
|
40
|
+
domains?: string[];
|
|
41
|
+
logos?: LogoConfig[];
|
|
42
|
+
token?: string;
|
|
43
|
+
baseUrl?: string;
|
|
44
|
+
speed?: number;
|
|
45
|
+
direction?: "left" | "right" | "up" | "down";
|
|
46
|
+
pauseOnHover?: boolean;
|
|
47
|
+
hoverSpeed?: number;
|
|
48
|
+
logoHeight?: number;
|
|
49
|
+
gap?: number;
|
|
50
|
+
width?: number | string;
|
|
51
|
+
fadeOut?: boolean;
|
|
52
|
+
fadeOutColor?: string;
|
|
53
|
+
scaleOnHover?: boolean;
|
|
54
|
+
logoSize?: number;
|
|
55
|
+
logoFormat?: SupportedOutputFormat | FormatShorthand;
|
|
56
|
+
logoGreyscale?: boolean;
|
|
57
|
+
logoTheme?: ThemeOption;
|
|
58
|
+
renderItem?: (logo: ResolvedLogo, index: number) => React.ReactNode;
|
|
59
|
+
className?: string;
|
|
60
|
+
style?: React.CSSProperties;
|
|
61
|
+
ariaLabel?: string;
|
|
62
|
+
}
|
|
63
|
+
/** Props for the QuikturnLogoGrid component. */
|
|
64
|
+
interface QuikturnLogoGridProps {
|
|
65
|
+
domains?: string[];
|
|
66
|
+
logos?: LogoConfig[];
|
|
67
|
+
token?: string;
|
|
68
|
+
baseUrl?: string;
|
|
69
|
+
columns?: number;
|
|
70
|
+
gap?: number;
|
|
71
|
+
logoSize?: number;
|
|
72
|
+
logoFormat?: SupportedOutputFormat | FormatShorthand;
|
|
73
|
+
logoGreyscale?: boolean;
|
|
74
|
+
logoTheme?: ThemeOption;
|
|
75
|
+
renderItem?: (logo: ResolvedLogo, index: number) => React.ReactNode;
|
|
76
|
+
className?: string;
|
|
77
|
+
style?: React.CSSProperties;
|
|
78
|
+
ariaLabel?: string;
|
|
79
|
+
}
|
|
80
|
+
/** Props for the QuikturnProvider component. */
|
|
81
|
+
interface QuikturnProviderProps {
|
|
82
|
+
token: string;
|
|
83
|
+
baseUrl?: string;
|
|
84
|
+
children: React.ReactNode;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare function QuikturnProvider({ token, baseUrl, children, }: QuikturnProviderProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
|
|
89
|
+
declare function useLogoUrl(domain: string, options?: LogoOptions & {
|
|
90
|
+
token?: string;
|
|
91
|
+
baseUrl?: string;
|
|
92
|
+
}): string;
|
|
93
|
+
|
|
94
|
+
declare function QuikturnLogo({ domain, token, baseUrl, size, format, greyscale, theme, alt, href, className, style, loading, onError, onLoad, }: QuikturnLogoProps): react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
96
|
+
declare const QuikturnLogoCarousel: React$1.NamedExoticComponent<QuikturnLogoCarouselProps>;
|
|
97
|
+
|
|
98
|
+
declare function QuikturnLogoGrid({ domains, logos, token, baseUrl, columns, gap, logoSize, logoFormat, logoGreyscale, logoTheme, renderItem, className, style, ariaLabel, }: QuikturnLogoGridProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
export { type LogoConfig, type LogoOptions, QuikturnLogo, QuikturnLogoCarousel, type QuikturnLogoCarouselProps, QuikturnLogoGrid, type QuikturnLogoGridProps, type QuikturnLogoProps, QuikturnProvider, type QuikturnProviderProps, type ResolvedLogo, useLogoUrl };
|