@ziila/sdk 0.1.95 → 0.1.115
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/entries/index.d.ts +1 -1
- package/dist/src/types.d.ts +10 -14
- package/package.json +1 -1
package/dist/entries/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ZiilaWidget } from '../src/ZiilaWidget';
|
|
2
2
|
export { isZiilaError } from '../src/utils';
|
|
3
|
-
export type { ThemeTokens, ThemeStyles, ButtonElementStyle, ButtonVariant, ButtonSize, ButtonVariantStyle, ButtonSizeStyle,
|
|
3
|
+
export type { ThemeTokens, ThemeStyles, ButtonElementStyle, ButtonVariant, ButtonSize, ButtonVariantStyle, ButtonSizeStyle, ThemeElement, ZiilaConfig, WidgetInitConfig, ZiilaEvent, ZiilaCommand, EventPayloadMap, CommandPayloadMap, AddToCartPayload, RemoveFromCartPayload, CartUpdatedItem, CartUpdatedPayload, ProductViewedPayload, SearchPayload, ErrorPayload, ParentMessage, WidgetMessage, HandshakeMessage, } from '../src/types';
|
package/dist/src/types.d.ts
CHANGED
|
@@ -7,12 +7,20 @@ export interface ThemeTokens {
|
|
|
7
7
|
borderRadius?: string;
|
|
8
8
|
buttonRadius?: string;
|
|
9
9
|
fontFamily?: string;
|
|
10
|
+
/** Stylesheet URL(s) that deliver `fontFamily`'s font files (e.g. Google
|
|
11
|
+
* Fonts css2 links). The widget runs in its own iframe, so fonts named in
|
|
12
|
+
* `fontFamily` must be loaded *inside* it — host-page fonts don't reach
|
|
13
|
+
* it. Injected into the widget document's `<head>`; https-only. Unlike
|
|
14
|
+
* the other tokens this is a resource to fetch, not a CSS value — the
|
|
15
|
+
* fetched stylesheet is trusted merchant content by design (see
|
|
16
|
+
* docs/sdk/theming.mdx). */
|
|
17
|
+
fontFamilyUrl?: string | string[];
|
|
10
18
|
buttonFontWeight?: string;
|
|
11
19
|
mutedColor?: string;
|
|
12
20
|
mutedFg?: string;
|
|
13
21
|
}
|
|
14
|
-
export type ThemeElement = 'button'
|
|
15
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'destructive' | 'success' | 'warning';
|
|
22
|
+
export type ThemeElement = 'button';
|
|
23
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'muted' | 'outline' | 'ghost' | 'link' | 'destructive' | 'success' | 'warning';
|
|
16
24
|
export type ButtonSize = 'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg';
|
|
17
25
|
export interface ButtonVariantStyle {
|
|
18
26
|
background?: string;
|
|
@@ -46,22 +54,10 @@ export interface ButtonElementStyle {
|
|
|
46
54
|
variant?: Partial<Record<ButtonVariant, ButtonVariantStyle>>;
|
|
47
55
|
size?: Partial<Record<ButtonSize, ButtonSizeStyle>>;
|
|
48
56
|
}
|
|
49
|
-
export interface InputElementStyle {
|
|
50
|
-
background?: string;
|
|
51
|
-
foreground?: string;
|
|
52
|
-
border?: string;
|
|
53
|
-
borderWidth?: string;
|
|
54
|
-
paddingX?: string;
|
|
55
|
-
paddingY?: string;
|
|
56
|
-
shadow?: string;
|
|
57
|
-
focusBorder?: string;
|
|
58
|
-
ringColor?: string;
|
|
59
|
-
}
|
|
60
57
|
export interface ThemeStyles {
|
|
61
58
|
tokens?: Partial<ThemeTokens>;
|
|
62
59
|
elements?: {
|
|
63
60
|
button?: ButtonElementStyle;
|
|
64
|
-
input?: InputElementStyle;
|
|
65
61
|
};
|
|
66
62
|
}
|
|
67
63
|
export interface ZiilaConfig {
|