@billgangcom/theme-lib 1.63.0 → 1.65.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/abstractions/PageContext.d.ts +2 -1
- package/dist/builder/constants/theme-settings.d.ts +6 -5
- package/dist/builder/store/useThemeSettingsStore.d.ts +4 -4
- package/dist/builder.cjs.js +4 -4
- package/dist/builder.es.js +899 -883
- package/dist/{index-DV89YV-L.js → index-BPn2qi_o.js} +4276 -4242
- package/dist/{index-DnpjVF1z.cjs → index-Dc4CgFbD.cjs} +21 -21
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui/ItemsSettings/index.d.ts +1 -1
- package/dist/ui/ProductCardButtons/index.d.ts +9 -1
- package/dist/ui/ProductCardModal/index.d.ts +9 -0
- package/dist/ui/ProductOptions/index.d.ts +4 -0
- package/dist/ui/TextSettings/index.d.ts +2 -2
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1358 -1051
- package/package.json +2 -2
|
@@ -24,7 +24,7 @@ export interface Product {
|
|
|
24
24
|
amount: number;
|
|
25
25
|
currency: string;
|
|
26
26
|
};
|
|
27
|
-
chargeTypes
|
|
27
|
+
chargeTypes?: Array<'ONE_TIME' | 'RECURRING'>;
|
|
28
28
|
subscriptionSettings?: {
|
|
29
29
|
price: {
|
|
30
30
|
amount: number;
|
|
@@ -57,6 +57,7 @@ export interface Product {
|
|
|
57
57
|
};
|
|
58
58
|
}>;
|
|
59
59
|
customFields: Array<{
|
|
60
|
+
id: string;
|
|
60
61
|
name: string;
|
|
61
62
|
required: boolean;
|
|
62
63
|
placeholder?: string;
|
|
@@ -5,9 +5,9 @@ export interface ThemeSettingsBlock {
|
|
|
5
5
|
name: ThemeSettingsName;
|
|
6
6
|
}
|
|
7
7
|
export declare const themeSettingsBlocks: ThemeSettingsBlock[];
|
|
8
|
-
export type FontTypeHeading = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
9
|
-
export type
|
|
10
|
-
export type FontType = 'heading' | '
|
|
8
|
+
export type FontTypeHeading = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7';
|
|
9
|
+
export type FontTypeBody = 'lg' | 'md' | 'sm';
|
|
10
|
+
export type FontType = 'heading' | 'body';
|
|
11
11
|
export type BorderType = 'radius' | 'thickness';
|
|
12
12
|
export type ButtonType = 'primary' | 'secondary' | 'link';
|
|
13
13
|
export type Weight = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
@@ -15,6 +15,7 @@ export interface FontFields {
|
|
|
15
15
|
font: string;
|
|
16
16
|
size: number;
|
|
17
17
|
weight: Weight;
|
|
18
|
+
boldWeight: Weight;
|
|
18
19
|
}
|
|
19
20
|
export interface ButtonFields {
|
|
20
21
|
size: number;
|
|
@@ -37,7 +38,7 @@ export interface BorderFields {
|
|
|
37
38
|
thickness: string;
|
|
38
39
|
}
|
|
39
40
|
type Font = {
|
|
40
|
-
[head in FontTypeHeading |
|
|
41
|
+
[head in FontTypeHeading | FontTypeBody]: FontFields;
|
|
41
42
|
};
|
|
42
43
|
export type Alignment = 'left' | 'center' | 'right';
|
|
43
44
|
export type BorderStyle = 'solid' | 'dashed';
|
|
@@ -107,7 +108,7 @@ export interface ThemeSettings {
|
|
|
107
108
|
};
|
|
108
109
|
desktop: {
|
|
109
110
|
heading: Partial<Font>;
|
|
110
|
-
|
|
111
|
+
body: Partial<Font>;
|
|
111
112
|
};
|
|
112
113
|
};
|
|
113
114
|
borders: BorderFields;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { BorderFields, ButtonFields, FontFields, FontType, FontTypeHeading,
|
|
1
|
+
import { BorderFields, ButtonFields, FontFields, FontType, FontTypeHeading, FontTypeBody, ThemeSettings, ThemeSettingsBlock } from '../constants';
|
|
2
2
|
interface Options {
|
|
3
3
|
activeBlock: ThemeSettingsBlock | null;
|
|
4
4
|
setActiveBlock: (activeBlock: ThemeSettingsBlock | null) => void;
|
|
5
5
|
themeSettings: ThemeSettings;
|
|
6
6
|
setThemeSettings: (themeSettings: ThemeSettings) => void;
|
|
7
7
|
updateColor: (category: keyof ThemeSettings['colors'], colorType: string, newColor: string) => void;
|
|
8
|
-
updateFont: (deviceType: 'mobile' | 'tablet' | 'desktop', fontType: FontType, id: FontTypeHeading |
|
|
8
|
+
updateFont: (deviceType: 'mobile' | 'tablet' | 'desktop', fontType: FontType, id: FontTypeHeading | FontTypeBody, field: keyof FontFields, newValue: string | number) => void;
|
|
9
9
|
updateBorder: (field: keyof BorderFields, newValue: string | number) => void;
|
|
10
10
|
updateButton: (category: keyof ThemeSettings['buttons'], field: keyof ButtonFields, newValue: string | number | boolean | object) => void;
|
|
11
11
|
activeColorCategory: keyof ThemeSettings['colors'] | null;
|
|
12
12
|
setActiveColorCategory: (activeColorCategory: keyof ThemeSettings['colors'] | null) => void;
|
|
13
|
-
activeFont: FontTypeHeading |
|
|
14
|
-
setActiveFont: (activeFont: FontTypeHeading |
|
|
13
|
+
activeFont: FontTypeHeading | FontTypeBody | null;
|
|
14
|
+
setActiveFont: (activeFont: FontTypeHeading | FontTypeBody | null) => void;
|
|
15
15
|
updateInput: (category: keyof ThemeSettings['inputs'], value: string | number | boolean, field: keyof ThemeSettings['inputs']['general'] | keyof ThemeSettings['inputs']['border'] | keyof ThemeSettings['inputs']['label'] | keyof ThemeSettings['inputs']['field']) => void;
|
|
16
16
|
updateFontSizePercentage: (fontType: 'mobile' | 'tablet', newValue: number) => void;
|
|
17
17
|
isLoadingThemeSettings: boolean;
|