@developer_tribe/react-builder 1.0.9 → 1.2.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/build-components/BIcon/BIconProps.generated.d.ts +2 -2
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +2 -2
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +2 -2
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +2 -2
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +2 -2
- package/dist/build-components/Text/TextProps.generated.d.ts +2 -2
- package/dist/build-components/patterns.generated.d.ts +78 -30
- package/dist/hooks/useProjectFonts.d.ts +13 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.cjs.js +3 -3
- package/dist/index.native.cjs.js.map +1 -1
- package/dist/index.native.esm.js +3 -3
- package/dist/index.native.esm.js.map +1 -1
- package/dist/pages/ProjectPage.d.ts +4 -1
- package/dist/store.d.ts +11 -0
- package/dist/types/Fonts.d.ts +12 -0
- package/dist/utils/fontWeight.d.ts +3 -0
- package/dist/utils/fontsDebug.d.ts +12 -0
- package/dist/utils/loadFontFamily.d.ts +30 -0
- package/package.json +1 -1
- package/scripts/prebuild/utils/createGeneratedProps.js +9 -1
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +2 -0
- package/src/AttributesEditor.tsx +237 -1
- package/src/RenderPage.tsx +15 -6
- package/src/attributes-editor/Field.tsx +18 -0
- package/src/build-components/BIcon/BIconProps.generated.ts +2 -13
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +2 -13
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +2 -13
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +2 -13
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +2 -13
- package/src/build-components/Text/TextProps.generated.ts +2 -13
- package/src/build-components/Text/pattern.json +13 -17
- package/src/build-components/patterns.generated.ts +78 -102
- package/src/components/BuilderButton.tsx +13 -11
- package/src/hooks/useProjectFonts.ts +130 -0
- package/src/index.ts +1 -0
- package/src/pages/ProjectPage.tsx +8 -0
- package/src/store.ts +46 -1
- package/src/types/Fonts.ts +16 -0
- package/src/utils/analyseNodeByPatterns.ts +9 -0
- package/src/utils/extractTextStyle.ts +98 -1
- package/src/utils/fontWeight.ts +29 -0
- package/src/utils/fontsDebug.ts +16 -0
- package/src/utils/loadFontFamily.ts +318 -0
- package/src/utils/patterns.ts +2 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { NodeData } from '../../types/Node';
|
|
2
|
-
export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3
2
|
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
4
3
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
5
4
|
export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
@@ -11,7 +10,8 @@ export interface BIconPropsGenerated {
|
|
|
11
10
|
style?: Record<string, unknown>;
|
|
12
11
|
color?: string;
|
|
13
12
|
fontSize?: string;
|
|
14
|
-
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
fontWeight?: string;
|
|
15
15
|
textAlign?: TextAlignOptionType;
|
|
16
16
|
adjustsFontSizeToFit?: boolean;
|
|
17
17
|
showEllipsis?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { NodeData } from '../../types/Node';
|
|
2
|
-
export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3
2
|
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
4
3
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
5
4
|
export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
@@ -11,7 +10,8 @@ export interface OnboardFooterPropsGenerated {
|
|
|
11
10
|
style?: Record<string, unknown>;
|
|
12
11
|
color?: string;
|
|
13
12
|
fontSize?: string;
|
|
14
|
-
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
fontWeight?: string;
|
|
15
15
|
textAlign?: TextAlignOptionType;
|
|
16
16
|
adjustsFontSizeToFit?: boolean;
|
|
17
17
|
showEllipsis?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { NodeData } from '../../types/Node';
|
|
2
|
-
export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3
2
|
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
4
3
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
5
4
|
export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
@@ -11,7 +10,8 @@ export interface OnboardSubtitlePropsGenerated {
|
|
|
11
10
|
style?: Record<string, unknown>;
|
|
12
11
|
color?: string;
|
|
13
12
|
fontSize?: string;
|
|
14
|
-
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
fontWeight?: string;
|
|
15
15
|
textAlign?: TextAlignOptionType;
|
|
16
16
|
adjustsFontSizeToFit?: boolean;
|
|
17
17
|
showEllipsis?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { NodeData } from '../../types/Node';
|
|
2
|
-
export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3
2
|
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
4
3
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
5
4
|
export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
@@ -11,7 +10,8 @@ export interface OnboardTitlePropsGenerated {
|
|
|
11
10
|
style?: Record<string, unknown>;
|
|
12
11
|
color?: string;
|
|
13
12
|
fontSize?: string;
|
|
14
|
-
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
fontWeight?: string;
|
|
15
15
|
textAlign?: TextAlignOptionType;
|
|
16
16
|
adjustsFontSizeToFit?: boolean;
|
|
17
17
|
showEllipsis?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { NodeData } from '../../types/Node';
|
|
2
|
-
export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3
2
|
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
4
3
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
5
4
|
export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
@@ -14,7 +13,8 @@ export interface PaywallCloseButtonPropsGenerated {
|
|
|
14
13
|
strokeWidth?: number;
|
|
15
14
|
color?: string;
|
|
16
15
|
fontSize?: string;
|
|
17
|
-
|
|
16
|
+
fontFamily?: string;
|
|
17
|
+
fontWeight?: string;
|
|
18
18
|
textAlign?: TextAlignOptionType;
|
|
19
19
|
adjustsFontSizeToFit?: boolean;
|
|
20
20
|
showEllipsis?: boolean;
|
|
@@ -3,7 +3,6 @@ export type FlexDirectionOptionType = 'row' | 'column';
|
|
|
3
3
|
export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
4
4
|
export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
5
5
|
export type PositionOptionType = 'relative' | 'absolute';
|
|
6
|
-
export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
7
6
|
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
8
7
|
export interface TextPropsGenerated {
|
|
9
8
|
child: string;
|
|
@@ -44,7 +43,8 @@ export interface TextPropsGenerated {
|
|
|
44
43
|
zIndex?: number;
|
|
45
44
|
color?: string;
|
|
46
45
|
fontSize?: string;
|
|
47
|
-
|
|
46
|
+
fontFamily?: string;
|
|
47
|
+
fontWeight?: string;
|
|
48
48
|
textAlign?: TextAlignOptionType;
|
|
49
49
|
adjustsFontSizeToFit?: boolean;
|
|
50
50
|
showEllipsis?: boolean;
|
|
@@ -6,7 +6,8 @@ export declare const patterns: readonly [{
|
|
|
6
6
|
readonly attributes: {
|
|
7
7
|
readonly color: "color";
|
|
8
8
|
readonly fontSize: "size";
|
|
9
|
-
readonly
|
|
9
|
+
readonly fontFamily: "fontFamily";
|
|
10
|
+
readonly fontWeight: "fontWeight";
|
|
10
11
|
readonly textAlign: readonly ["left", "center", "right", "justify"];
|
|
11
12
|
readonly adjustsFontSizeToFit: "boolean";
|
|
12
13
|
readonly showEllipsis: "boolean";
|
|
@@ -68,33 +69,40 @@ export declare const patterns: readonly [{
|
|
|
68
69
|
readonly sort: 2;
|
|
69
70
|
readonly preferedScale: "s";
|
|
70
71
|
};
|
|
72
|
+
readonly fontFamily: {
|
|
73
|
+
readonly label: "Font Family";
|
|
74
|
+
readonly description: "Font family used for the text.";
|
|
75
|
+
readonly category: "style";
|
|
76
|
+
readonly specialCategory: null;
|
|
77
|
+
readonly sort: 3;
|
|
78
|
+
};
|
|
71
79
|
readonly fontWeight: {
|
|
72
80
|
readonly label: "Font Weight";
|
|
73
81
|
readonly description: "Text weight.";
|
|
74
82
|
readonly category: "style";
|
|
75
83
|
readonly specialCategory: null;
|
|
76
|
-
readonly sort:
|
|
84
|
+
readonly sort: 4;
|
|
77
85
|
};
|
|
78
86
|
readonly textAlign: {
|
|
79
87
|
readonly label: "Text Align";
|
|
80
88
|
readonly description: "Text alignment.";
|
|
81
89
|
readonly category: "style";
|
|
82
90
|
readonly specialCategory: null;
|
|
83
|
-
readonly sort:
|
|
91
|
+
readonly sort: 5;
|
|
84
92
|
};
|
|
85
93
|
readonly adjustsFontSizeToFit: {
|
|
86
94
|
readonly label: "Adjust Font Size To Fit";
|
|
87
95
|
readonly description: "Automatically reduces font size to fit the available space.";
|
|
88
96
|
readonly category: "style";
|
|
89
97
|
readonly specialCategory: null;
|
|
90
|
-
readonly sort:
|
|
98
|
+
readonly sort: 6;
|
|
91
99
|
};
|
|
92
100
|
readonly showEllipsis: {
|
|
93
101
|
readonly label: "Show Ellipsis";
|
|
94
102
|
readonly description: "If text overflows, show ellipsis (…); applied as single-line truncation.";
|
|
95
103
|
readonly category: "style";
|
|
96
104
|
readonly specialCategory: null;
|
|
97
|
-
readonly sort:
|
|
105
|
+
readonly sort: 7;
|
|
98
106
|
};
|
|
99
107
|
readonly scrollable: {
|
|
100
108
|
readonly label: "Scrollable";
|
|
@@ -5178,7 +5186,8 @@ export declare const patterns: readonly [{
|
|
|
5178
5186
|
readonly attributes: {
|
|
5179
5187
|
readonly color: "color";
|
|
5180
5188
|
readonly fontSize: "size";
|
|
5181
|
-
readonly
|
|
5189
|
+
readonly fontFamily: "fontFamily";
|
|
5190
|
+
readonly fontWeight: "fontWeight";
|
|
5182
5191
|
readonly textAlign: readonly ["left", "center", "right", "justify"];
|
|
5183
5192
|
readonly adjustsFontSizeToFit: "boolean";
|
|
5184
5193
|
readonly showEllipsis: "boolean";
|
|
@@ -5244,33 +5253,40 @@ export declare const patterns: readonly [{
|
|
|
5244
5253
|
readonly sort: 2;
|
|
5245
5254
|
readonly preferedScale: "s";
|
|
5246
5255
|
};
|
|
5256
|
+
readonly fontFamily: {
|
|
5257
|
+
readonly label: "Font Family";
|
|
5258
|
+
readonly description: "Font family used for the text.";
|
|
5259
|
+
readonly category: "style";
|
|
5260
|
+
readonly specialCategory: null;
|
|
5261
|
+
readonly sort: 3;
|
|
5262
|
+
};
|
|
5247
5263
|
readonly fontWeight: {
|
|
5248
5264
|
readonly label: "Font Weight";
|
|
5249
5265
|
readonly description: "Text weight.";
|
|
5250
5266
|
readonly category: "style";
|
|
5251
5267
|
readonly specialCategory: null;
|
|
5252
|
-
readonly sort:
|
|
5268
|
+
readonly sort: 4;
|
|
5253
5269
|
};
|
|
5254
5270
|
readonly textAlign: {
|
|
5255
5271
|
readonly label: "Text Align";
|
|
5256
5272
|
readonly description: "Text alignment.";
|
|
5257
5273
|
readonly category: "style";
|
|
5258
5274
|
readonly specialCategory: null;
|
|
5259
|
-
readonly sort:
|
|
5275
|
+
readonly sort: 5;
|
|
5260
5276
|
};
|
|
5261
5277
|
readonly adjustsFontSizeToFit: {
|
|
5262
5278
|
readonly label: "Adjust Font Size To Fit";
|
|
5263
5279
|
readonly description: "Automatically reduces font size to fit the available space.";
|
|
5264
5280
|
readonly category: "style";
|
|
5265
5281
|
readonly specialCategory: null;
|
|
5266
|
-
readonly sort:
|
|
5282
|
+
readonly sort: 6;
|
|
5267
5283
|
};
|
|
5268
5284
|
readonly showEllipsis: {
|
|
5269
5285
|
readonly label: "Show Ellipsis";
|
|
5270
5286
|
readonly description: "If text overflows, show ellipsis (…); applied as single-line truncation.";
|
|
5271
5287
|
readonly category: "style";
|
|
5272
5288
|
readonly specialCategory: null;
|
|
5273
|
-
readonly sort:
|
|
5289
|
+
readonly sort: 7;
|
|
5274
5290
|
};
|
|
5275
5291
|
readonly scrollable: {
|
|
5276
5292
|
readonly label: "Scrollable";
|
|
@@ -6715,7 +6731,8 @@ export declare const patterns: readonly [{
|
|
|
6715
6731
|
readonly attributes: {
|
|
6716
6732
|
readonly color: "color";
|
|
6717
6733
|
readonly fontSize: "size";
|
|
6718
|
-
readonly
|
|
6734
|
+
readonly fontFamily: "fontFamily";
|
|
6735
|
+
readonly fontWeight: "fontWeight";
|
|
6719
6736
|
readonly textAlign: readonly ["left", "center", "right", "justify"];
|
|
6720
6737
|
readonly adjustsFontSizeToFit: "boolean";
|
|
6721
6738
|
readonly showEllipsis: "boolean";
|
|
@@ -6774,33 +6791,40 @@ export declare const patterns: readonly [{
|
|
|
6774
6791
|
readonly sort: 2;
|
|
6775
6792
|
readonly preferedScale: "s";
|
|
6776
6793
|
};
|
|
6794
|
+
readonly fontFamily: {
|
|
6795
|
+
readonly label: "Font Family";
|
|
6796
|
+
readonly description: "Font family used for the text.";
|
|
6797
|
+
readonly category: "style";
|
|
6798
|
+
readonly specialCategory: null;
|
|
6799
|
+
readonly sort: 3;
|
|
6800
|
+
};
|
|
6777
6801
|
readonly fontWeight: {
|
|
6778
6802
|
readonly label: "Font Weight";
|
|
6779
6803
|
readonly description: "Text weight.";
|
|
6780
6804
|
readonly category: "style";
|
|
6781
6805
|
readonly specialCategory: null;
|
|
6782
|
-
readonly sort:
|
|
6806
|
+
readonly sort: 4;
|
|
6783
6807
|
};
|
|
6784
6808
|
readonly textAlign: {
|
|
6785
6809
|
readonly label: "Text Align";
|
|
6786
6810
|
readonly description: "Text alignment.";
|
|
6787
6811
|
readonly category: "style";
|
|
6788
6812
|
readonly specialCategory: null;
|
|
6789
|
-
readonly sort:
|
|
6813
|
+
readonly sort: 5;
|
|
6790
6814
|
};
|
|
6791
6815
|
readonly adjustsFontSizeToFit: {
|
|
6792
6816
|
readonly label: "Adjust Font Size To Fit";
|
|
6793
6817
|
readonly description: "Automatically reduces font size to fit the available space.";
|
|
6794
6818
|
readonly category: "style";
|
|
6795
6819
|
readonly specialCategory: null;
|
|
6796
|
-
readonly sort:
|
|
6820
|
+
readonly sort: 6;
|
|
6797
6821
|
};
|
|
6798
6822
|
readonly showEllipsis: {
|
|
6799
6823
|
readonly label: "Show Ellipsis";
|
|
6800
6824
|
readonly description: "If text overflows, show ellipsis (…); applied as single-line truncation.";
|
|
6801
6825
|
readonly category: "style";
|
|
6802
6826
|
readonly specialCategory: null;
|
|
6803
|
-
readonly sort:
|
|
6827
|
+
readonly sort: 7;
|
|
6804
6828
|
};
|
|
6805
6829
|
readonly scrollable: {
|
|
6806
6830
|
readonly label: "Scrollable";
|
|
@@ -7112,7 +7136,8 @@ export declare const patterns: readonly [{
|
|
|
7112
7136
|
readonly attributes: {
|
|
7113
7137
|
readonly color: "color";
|
|
7114
7138
|
readonly fontSize: "size";
|
|
7115
|
-
readonly
|
|
7139
|
+
readonly fontFamily: "fontFamily";
|
|
7140
|
+
readonly fontWeight: "fontWeight";
|
|
7116
7141
|
readonly textAlign: readonly ["left", "center", "right", "justify"];
|
|
7117
7142
|
readonly adjustsFontSizeToFit: "boolean";
|
|
7118
7143
|
readonly showEllipsis: "boolean";
|
|
@@ -7171,33 +7196,40 @@ export declare const patterns: readonly [{
|
|
|
7171
7196
|
readonly sort: 2;
|
|
7172
7197
|
readonly preferedScale: "s";
|
|
7173
7198
|
};
|
|
7199
|
+
readonly fontFamily: {
|
|
7200
|
+
readonly label: "Font Family";
|
|
7201
|
+
readonly description: "Font family used for the text.";
|
|
7202
|
+
readonly category: "style";
|
|
7203
|
+
readonly specialCategory: null;
|
|
7204
|
+
readonly sort: 3;
|
|
7205
|
+
};
|
|
7174
7206
|
readonly fontWeight: {
|
|
7175
7207
|
readonly label: "Font Weight";
|
|
7176
7208
|
readonly description: "Text weight.";
|
|
7177
7209
|
readonly category: "style";
|
|
7178
7210
|
readonly specialCategory: null;
|
|
7179
|
-
readonly sort:
|
|
7211
|
+
readonly sort: 4;
|
|
7180
7212
|
};
|
|
7181
7213
|
readonly textAlign: {
|
|
7182
7214
|
readonly label: "Text Align";
|
|
7183
7215
|
readonly description: "Text alignment.";
|
|
7184
7216
|
readonly category: "style";
|
|
7185
7217
|
readonly specialCategory: null;
|
|
7186
|
-
readonly sort:
|
|
7218
|
+
readonly sort: 5;
|
|
7187
7219
|
};
|
|
7188
7220
|
readonly adjustsFontSizeToFit: {
|
|
7189
7221
|
readonly label: "Adjust Font Size To Fit";
|
|
7190
7222
|
readonly description: "Automatically reduces font size to fit the available space.";
|
|
7191
7223
|
readonly category: "style";
|
|
7192
7224
|
readonly specialCategory: null;
|
|
7193
|
-
readonly sort:
|
|
7225
|
+
readonly sort: 6;
|
|
7194
7226
|
};
|
|
7195
7227
|
readonly showEllipsis: {
|
|
7196
7228
|
readonly label: "Show Ellipsis";
|
|
7197
7229
|
readonly description: "If text overflows, show ellipsis (…); applied as single-line truncation.";
|
|
7198
7230
|
readonly category: "style";
|
|
7199
7231
|
readonly specialCategory: null;
|
|
7200
|
-
readonly sort:
|
|
7232
|
+
readonly sort: 7;
|
|
7201
7233
|
};
|
|
7202
7234
|
readonly scrollable: {
|
|
7203
7235
|
readonly label: "Scrollable";
|
|
@@ -7859,7 +7891,8 @@ export declare const patterns: readonly [{
|
|
|
7859
7891
|
readonly strokeWidth: "number";
|
|
7860
7892
|
readonly color: "color";
|
|
7861
7893
|
readonly fontSize: "size";
|
|
7862
|
-
readonly
|
|
7894
|
+
readonly fontFamily: "fontFamily";
|
|
7895
|
+
readonly fontWeight: "fontWeight";
|
|
7863
7896
|
readonly textAlign: readonly ["left", "center", "right", "justify"];
|
|
7864
7897
|
readonly adjustsFontSizeToFit: "boolean";
|
|
7865
7898
|
readonly showEllipsis: "boolean";
|
|
@@ -7939,33 +7972,40 @@ export declare const patterns: readonly [{
|
|
|
7939
7972
|
readonly sort: 2;
|
|
7940
7973
|
readonly preferedScale: "s";
|
|
7941
7974
|
};
|
|
7975
|
+
readonly fontFamily: {
|
|
7976
|
+
readonly label: "Font Family";
|
|
7977
|
+
readonly description: "Font family used for the text.";
|
|
7978
|
+
readonly category: "style";
|
|
7979
|
+
readonly specialCategory: null;
|
|
7980
|
+
readonly sort: 3;
|
|
7981
|
+
};
|
|
7942
7982
|
readonly fontWeight: {
|
|
7943
7983
|
readonly label: "Font Weight";
|
|
7944
7984
|
readonly description: "Text weight.";
|
|
7945
7985
|
readonly category: "style";
|
|
7946
7986
|
readonly specialCategory: null;
|
|
7947
|
-
readonly sort:
|
|
7987
|
+
readonly sort: 4;
|
|
7948
7988
|
};
|
|
7949
7989
|
readonly textAlign: {
|
|
7950
7990
|
readonly label: "Text Align";
|
|
7951
7991
|
readonly description: "Text alignment.";
|
|
7952
7992
|
readonly category: "style";
|
|
7953
7993
|
readonly specialCategory: null;
|
|
7954
|
-
readonly sort:
|
|
7994
|
+
readonly sort: 5;
|
|
7955
7995
|
};
|
|
7956
7996
|
readonly adjustsFontSizeToFit: {
|
|
7957
7997
|
readonly label: "Adjust Font Size To Fit";
|
|
7958
7998
|
readonly description: "Automatically reduces font size to fit the available space.";
|
|
7959
7999
|
readonly category: "style";
|
|
7960
8000
|
readonly specialCategory: null;
|
|
7961
|
-
readonly sort:
|
|
8001
|
+
readonly sort: 6;
|
|
7962
8002
|
};
|
|
7963
8003
|
readonly showEllipsis: {
|
|
7964
8004
|
readonly label: "Show Ellipsis";
|
|
7965
8005
|
readonly description: "If text overflows, show ellipsis (…); applied as single-line truncation.";
|
|
7966
8006
|
readonly category: "style";
|
|
7967
8007
|
readonly specialCategory: null;
|
|
7968
|
-
readonly sort:
|
|
8008
|
+
readonly sort: 7;
|
|
7969
8009
|
};
|
|
7970
8010
|
readonly scrollable: {
|
|
7971
8011
|
readonly label: "Scrollable";
|
|
@@ -9765,7 +9805,8 @@ export declare const patterns: readonly [{
|
|
|
9765
9805
|
readonly zIndex: "number";
|
|
9766
9806
|
readonly color: "color";
|
|
9767
9807
|
readonly fontSize: "size";
|
|
9768
|
-
readonly
|
|
9808
|
+
readonly fontFamily: "fontFamily";
|
|
9809
|
+
readonly fontWeight: "fontWeight";
|
|
9769
9810
|
readonly textAlign: readonly ["left", "center", "right", "justify"];
|
|
9770
9811
|
readonly adjustsFontSizeToFit: "boolean";
|
|
9771
9812
|
readonly showEllipsis: "boolean";
|
|
@@ -10081,33 +10122,40 @@ export declare const patterns: readonly [{
|
|
|
10081
10122
|
readonly sort: 2;
|
|
10082
10123
|
readonly preferedScale: "s";
|
|
10083
10124
|
};
|
|
10125
|
+
readonly fontFamily: {
|
|
10126
|
+
readonly label: "Font Family";
|
|
10127
|
+
readonly description: "Font family used for the text.";
|
|
10128
|
+
readonly category: "style";
|
|
10129
|
+
readonly specialCategory: null;
|
|
10130
|
+
readonly sort: 3;
|
|
10131
|
+
};
|
|
10084
10132
|
readonly fontWeight: {
|
|
10085
10133
|
readonly label: "Font Weight";
|
|
10086
10134
|
readonly description: "Text weight.";
|
|
10087
10135
|
readonly category: "style";
|
|
10088
10136
|
readonly specialCategory: null;
|
|
10089
|
-
readonly sort:
|
|
10137
|
+
readonly sort: 4;
|
|
10090
10138
|
};
|
|
10091
10139
|
readonly textAlign: {
|
|
10092
10140
|
readonly label: "Text Align";
|
|
10093
10141
|
readonly description: "Text alignment.";
|
|
10094
10142
|
readonly category: "style";
|
|
10095
10143
|
readonly specialCategory: null;
|
|
10096
|
-
readonly sort:
|
|
10144
|
+
readonly sort: 5;
|
|
10097
10145
|
};
|
|
10098
10146
|
readonly adjustsFontSizeToFit: {
|
|
10099
10147
|
readonly label: "Adjust Font Size To Fit";
|
|
10100
10148
|
readonly description: "Automatically reduces font size to fit the available space.";
|
|
10101
10149
|
readonly category: "style";
|
|
10102
10150
|
readonly specialCategory: null;
|
|
10103
|
-
readonly sort:
|
|
10151
|
+
readonly sort: 6;
|
|
10104
10152
|
};
|
|
10105
10153
|
readonly showEllipsis: {
|
|
10106
10154
|
readonly label: "Show Ellipsis";
|
|
10107
10155
|
readonly description: "If text overflows, show ellipsis (…); applied as single-line truncation.";
|
|
10108
10156
|
readonly category: "style";
|
|
10109
10157
|
readonly specialCategory: null;
|
|
10110
|
-
readonly sort:
|
|
10158
|
+
readonly sort: 7;
|
|
10111
10159
|
};
|
|
10112
10160
|
};
|
|
10113
10161
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Fonts } from '../types/Fonts';
|
|
2
|
+
type UseProjectFontsParams = {
|
|
3
|
+
fonts: Fonts;
|
|
4
|
+
appFont: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Syncs project-provided fonts into the library store and ensures appFont is loaded (web).
|
|
8
|
+
* Loading behavior:
|
|
9
|
+
* - keep waiting while the load is in-flight
|
|
10
|
+
* - stop only when it loads, an error is thrown, or 10s deadline passes
|
|
11
|
+
*/
|
|
12
|
+
export declare function useProjectFonts({ fonts, appFont }: UseProjectFontsParams): void;
|
|
13
|
+
export {};
|