@codefluss/base-types 0.0.2-alpha.1 → 0.0.2-alpha.2
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/common-types.d.ts +253 -26
- package/dist/common-types.d.ts.map +1 -1
- package/dist/common-types.js +8 -1
- package/dist/common-types.js.map +1 -1
- package/dist/dependencies.d.ts +545 -106
- package/dist/dependencies.d.ts.map +1 -1
- package/dist/dependencies.js +12 -2
- package/dist/dependencies.js.map +1 -1
- package/dist/plugin-system.d.ts +809 -204
- package/dist/plugin-system.d.ts.map +1 -1
- package/dist/plugin-system.js +8 -0
- package/dist/plugin-system.js.map +1 -1
- package/package.json +1 -1
- package/src/common-types.ts +286 -30
- package/src/dependencies.ts +770 -180
- package/src/plugin-system.ts +935 -263
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-system.d.ts","sourceRoot":"","sources":["../src/plugin-system.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plugin-system.d.ts","sourceRoot":"","sources":["../src/plugin-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,mBAAmB,GAC3B,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,QAAQ,GACR,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,kBAAkB,GAClB,MAAM,GACN,oBAAoB,GACpB,iBAAiB,GACjB,eAAe,GACf,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,QAAQ,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,EAAE,QAAQ,GAAG,SAAS,CAAC;IAEtC;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAE9B;;;;;OAKG;IACH,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAEjC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAElC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC;;;;OAIG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,YAAY,EAAE,kBAAkB,CAAC;IAEjC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB"}
|
package/dist/plugin-system.js
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
* Core types for the headless plugin architecture.
|
|
5
5
|
* These types define the contract between plugins and the Context Panel UI.
|
|
6
6
|
*
|
|
7
|
+
* The plugin system uses a **headless** approach: plugins declare metadata
|
|
8
|
+
* (properties, capabilities, UI config) and the host application renders
|
|
9
|
+
* appropriate controls automatically in the Context Panel.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link PluginConfig} — Top-level plugin definition
|
|
12
|
+
* @see {@link PropertyDefinition} — How plugins declare editable properties
|
|
13
|
+
* @see {@link PluginCapabilities} — How plugins declare structural behavior
|
|
14
|
+
*
|
|
7
15
|
* @package @codefluss/base-types
|
|
8
16
|
* @version 1.0.0
|
|
9
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-system.js","sourceRoot":"","sources":["../src/plugin-system.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plugin-system.js","sourceRoot":"","sources":["../src/plugin-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
package/package.json
CHANGED
package/src/common-types.ts
CHANGED
|
@@ -1,154 +1,410 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Common Type Definitions
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Single source of truth for types used across multiple plugins and packages.
|
|
5
|
-
* NO DUPLICATION
|
|
6
|
-
*
|
|
5
|
+
* **NO DUPLICATION** — all plugins import from here.
|
|
6
|
+
*
|
|
7
|
+
* These types cover responsive design, text styling, layout, and
|
|
8
|
+
* common data structures shared by the entire plugin system.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link ResponsiveValues} — Generic responsive wrapper
|
|
11
|
+
* @see {@link TextStyleData} — Shared text styling properties
|
|
12
|
+
* @see {@link LayoutData} — Shared layout / spacing properties
|
|
13
|
+
*
|
|
7
14
|
* @package @codefluss/base-types
|
|
8
15
|
* @version 1.0.0
|
|
9
16
|
*/
|
|
10
17
|
|
|
11
18
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
19
|
+
* Four-sided box model value for spacing (padding / margin / gap).
|
|
20
|
+
*
|
|
21
|
+
* Each property represents a side's spacing in pixels (unitless number).
|
|
22
|
+
* Used for both static and responsive spacing presets.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link ResponsiveBoxValues} for per-viewport variants
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const padding: BoxModelValue = { top: 16, right: 24, bottom: 16, left: 24 };
|
|
29
|
+
* ```
|
|
14
30
|
*/
|
|
15
31
|
export interface BoxModelValue {
|
|
32
|
+
/** Top spacing in pixels */
|
|
16
33
|
top: number;
|
|
34
|
+
|
|
35
|
+
/** Right spacing in pixels */
|
|
17
36
|
right: number;
|
|
37
|
+
|
|
38
|
+
/** Bottom spacing in pixels */
|
|
18
39
|
bottom: number;
|
|
40
|
+
|
|
41
|
+
/** Left spacing in pixels */
|
|
19
42
|
left: number;
|
|
20
43
|
}
|
|
21
44
|
|
|
22
45
|
/**
|
|
23
|
-
* Viewport
|
|
24
|
-
*
|
|
46
|
+
* Viewport breakpoint identifiers for responsive design.
|
|
47
|
+
*
|
|
48
|
+
* The system uses exactly **three** breakpoints:
|
|
49
|
+
* - `'mobile'` — Small screens (≤ 768px)
|
|
50
|
+
* - `'tablet'` — Medium screens (769px – 1024px)
|
|
51
|
+
* - `'desktop'` — Large screens (≥ 1025px)
|
|
52
|
+
*
|
|
53
|
+
* @see {@link ResponsiveValues} for responsive value wrappers
|
|
25
54
|
*/
|
|
26
55
|
export type Viewport = 'mobile' | 'tablet' | 'desktop';
|
|
27
56
|
|
|
28
57
|
/**
|
|
29
|
-
* Generic responsive values structure
|
|
30
|
-
*
|
|
58
|
+
* Generic responsive values structure — wraps any type `T` with
|
|
59
|
+
* per-viewport entries.
|
|
60
|
+
*
|
|
61
|
+
* Enforces consistent viewport naming across the entire system.
|
|
62
|
+
*
|
|
63
|
+
* @template T - The value type held at each breakpoint
|
|
64
|
+
*
|
|
65
|
+
* @see {@link Viewport} for the three breakpoints
|
|
66
|
+
* @see {@link ResponsiveBoxValues} for the `BoxModelValue` specialization
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const fontSizes: ResponsiveValues<string> = {
|
|
71
|
+
* mobile: '1rem',
|
|
72
|
+
* tablet: '1.25rem',
|
|
73
|
+
* desktop: '1.5rem',
|
|
74
|
+
* };
|
|
75
|
+
*
|
|
76
|
+
* const columns: ResponsiveValues<number> = {
|
|
77
|
+
* mobile: 1,
|
|
78
|
+
* tablet: 2,
|
|
79
|
+
* desktop: 3,
|
|
80
|
+
* };
|
|
81
|
+
* ```
|
|
31
82
|
*/
|
|
32
83
|
export interface ResponsiveValues<T> {
|
|
84
|
+
/** Value applied on mobile viewports */
|
|
33
85
|
mobile: T;
|
|
86
|
+
|
|
87
|
+
/** Value applied on tablet viewports */
|
|
34
88
|
tablet: T;
|
|
89
|
+
|
|
90
|
+
/** Value applied on desktop viewports */
|
|
35
91
|
desktop: T;
|
|
36
92
|
}
|
|
37
93
|
|
|
38
94
|
/**
|
|
39
|
-
* Responsive box model values
|
|
40
|
-
*
|
|
95
|
+
* Responsive box model values — {@link BoxModelValue} for each viewport.
|
|
96
|
+
*
|
|
97
|
+
* Used by spacing presets and responsive overrides to define per-breakpoint
|
|
98
|
+
* margin / padding values.
|
|
99
|
+
*
|
|
100
|
+
* @see {@link BoxModelValue}
|
|
101
|
+
* @see {@link ResponsiveValues}
|
|
41
102
|
*/
|
|
42
103
|
export type ResponsiveBoxValues = ResponsiveValues<BoxModelValue>;
|
|
43
104
|
|
|
44
105
|
/**
|
|
45
|
-
*
|
|
106
|
+
* CSS `text-align` options for horizontal text alignment.
|
|
107
|
+
*
|
|
108
|
+
* @see {@link TextStyleData.textAlign}
|
|
46
109
|
*/
|
|
47
110
|
export type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
48
111
|
|
|
49
112
|
/**
|
|
50
|
-
* Font weight options
|
|
51
|
-
*
|
|
113
|
+
* Font weight options.
|
|
114
|
+
*
|
|
115
|
+
* Supports named weights and numeric CSS values (100–900).
|
|
116
|
+
*
|
|
117
|
+
* @see {@link ResolvedTextStyles.fontWeight}
|
|
52
118
|
*/
|
|
53
119
|
export type FontWeight = 'normal' | 'medium' | 'semibold' | 'bold' | number;
|
|
54
120
|
|
|
55
121
|
/**
|
|
56
|
-
*
|
|
122
|
+
* CSS `text-decoration` options.
|
|
123
|
+
*
|
|
124
|
+
* @see {@link TextStyleData.textDecoration}
|
|
57
125
|
*/
|
|
58
126
|
export type TextDecoration = 'none' | 'underline' | 'line-through';
|
|
59
127
|
|
|
60
128
|
/**
|
|
61
|
-
*
|
|
129
|
+
* CSS `text-transform` options.
|
|
130
|
+
*
|
|
131
|
+
* @see {@link TextStyleData.textTransform}
|
|
62
132
|
*/
|
|
63
133
|
export type TextTransform = 'none' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
64
134
|
|
|
65
135
|
/**
|
|
66
|
-
* Vertical alignment options for content within element
|
|
67
|
-
*
|
|
136
|
+
* Vertical alignment options for content within an element.
|
|
137
|
+
*
|
|
138
|
+
* Applied via flexbox `align-items` / `align-self`.
|
|
139
|
+
*
|
|
140
|
+
* @see {@link TextStyleData.verticalAlign}
|
|
68
141
|
*/
|
|
69
142
|
export type VerticalAlign = 'start' | 'center' | 'end';
|
|
70
143
|
|
|
71
144
|
/**
|
|
72
|
-
* Multi-language content
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
145
|
+
* Multi-language content map.
|
|
146
|
+
*
|
|
147
|
+
* Keys are ISO language codes (`'en'`, `'de'`, `'fr'`, `'es'`, `'it'`).
|
|
148
|
+
* Values are the localized text strings.
|
|
149
|
+
*
|
|
150
|
+
* **Fallback chain** when resolving content:
|
|
76
151
|
* 1. Requested language
|
|
77
|
-
* 2. English ('en')
|
|
152
|
+
* 2. English (`'en'`)
|
|
78
153
|
* 3. First available language
|
|
79
154
|
* 4. Empty string
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const content: MultiLangContent = {
|
|
159
|
+
* en: 'Hello World',
|
|
160
|
+
* de: 'Hallo Welt',
|
|
161
|
+
* fr: 'Bonjour le monde',
|
|
162
|
+
* };
|
|
163
|
+
* ```
|
|
80
164
|
*/
|
|
81
165
|
export interface MultiLangContent {
|
|
82
166
|
[languageCode: string]: string;
|
|
83
167
|
}
|
|
84
168
|
|
|
85
169
|
/**
|
|
86
|
-
* Responsive font sizes for
|
|
170
|
+
* Responsive font sizes — CSS size strings for each viewport breakpoint.
|
|
171
|
+
*
|
|
172
|
+
* @see {@link ResponsiveValues}
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```typescript
|
|
176
|
+
* const sizes: ResponsiveFontSizes = {
|
|
177
|
+
* mobile: '1rem',
|
|
178
|
+
* tablet: '1.25rem',
|
|
179
|
+
* desktop: '1.5rem',
|
|
180
|
+
* };
|
|
181
|
+
* ```
|
|
87
182
|
*/
|
|
88
183
|
export interface ResponsiveFontSizes {
|
|
184
|
+
/** Font size on mobile viewports (CSS value) */
|
|
89
185
|
mobile: string;
|
|
186
|
+
|
|
187
|
+
/** Font size on tablet viewports (CSS value) */
|
|
90
188
|
tablet: string;
|
|
189
|
+
|
|
190
|
+
/** Font size on desktop viewports (CSS value) */
|
|
91
191
|
desktop: string;
|
|
92
192
|
}
|
|
93
193
|
|
|
94
194
|
/**
|
|
95
|
-
* Common style properties shared across text-based components
|
|
195
|
+
* Common text style properties shared across text-based plugin components
|
|
196
|
+
* (heading, paragraph, text, button label, etc.).
|
|
197
|
+
*
|
|
198
|
+
* All fields are optional — `null` means "inherit from Design System preset".
|
|
199
|
+
*
|
|
200
|
+
* @see {@link ResolvedTextStyles} for the resolved (non-nullable) result
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* const style: TextStyleData = {
|
|
205
|
+
* fontPresetId: 'heading-1',
|
|
206
|
+
* colorPresetId: 'foreground',
|
|
207
|
+
* textAlign: 'center',
|
|
208
|
+
* letterSpacing: 0.5,
|
|
209
|
+
* };
|
|
210
|
+
* ```
|
|
96
211
|
*/
|
|
97
212
|
export interface TextStyleData {
|
|
213
|
+
/**
|
|
214
|
+
* Design System font preset ID (e.g., `'heading-1'`, `'body'`).
|
|
215
|
+
* Resolves to font family, size, weight, and line-height via the Design System.
|
|
216
|
+
* @default null (inherit)
|
|
217
|
+
*/
|
|
98
218
|
fontPresetId?: string | null;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Design System color preset ID for the text foreground color.
|
|
222
|
+
* @default null (inherit)
|
|
223
|
+
*/
|
|
99
224
|
colorPresetId?: string | null;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Design System color preset ID for the element background color.
|
|
228
|
+
* @default null (transparent)
|
|
229
|
+
*/
|
|
100
230
|
backgroundColorPresetId?: string | null;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Horizontal text alignment
|
|
234
|
+
* @default null (inherit)
|
|
235
|
+
* @see {@link TextAlign}
|
|
236
|
+
*/
|
|
101
237
|
textAlign?: TextAlign | null;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Vertical alignment within the element (via flexbox)
|
|
241
|
+
* @default null (inherit)
|
|
242
|
+
* @see {@link VerticalAlign}
|
|
243
|
+
*/
|
|
102
244
|
verticalAlign?: VerticalAlign | null;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Text decoration (underline, line-through, or none)
|
|
248
|
+
* @default null (inherit)
|
|
249
|
+
* @see {@link TextDecoration}
|
|
250
|
+
*/
|
|
103
251
|
textDecoration?: TextDecoration | null;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Text transform (uppercase, lowercase, capitalize, or none)
|
|
255
|
+
* @default null (inherit)
|
|
256
|
+
* @see {@link TextTransform}
|
|
257
|
+
*/
|
|
104
258
|
textTransform?: TextTransform | null;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Letter spacing in pixels (can be negative)
|
|
262
|
+
* @default null (inherit)
|
|
263
|
+
*/
|
|
105
264
|
letterSpacing?: number | null;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Maximum width of the text element (CSS value, e.g., `'600px'`, `'none'`)
|
|
268
|
+
* @default null (no constraint)
|
|
269
|
+
*/
|
|
106
270
|
maxWidth?: string | null;
|
|
107
271
|
}
|
|
108
272
|
|
|
109
273
|
/**
|
|
110
|
-
* Common layout properties shared across all components
|
|
274
|
+
* Common layout properties shared across all plugin components.
|
|
275
|
+
*
|
|
276
|
+
* Handles spacing (via preset system) and optional overrides.
|
|
277
|
+
*
|
|
278
|
+
* @see {@link BoxModelValue} for the override value shape
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const layout: LayoutData = {
|
|
283
|
+
* spacingPresetId: 'spacing-text-default',
|
|
284
|
+
* spacingOverride: {
|
|
285
|
+
* padding: { top: 8, right: 16, bottom: 8, left: 16 },
|
|
286
|
+
* },
|
|
287
|
+
* context: 'default',
|
|
288
|
+
* };
|
|
289
|
+
* ```
|
|
111
290
|
*/
|
|
112
291
|
export interface LayoutData {
|
|
292
|
+
/**
|
|
293
|
+
* ID of the Design System spacing preset applied to this element.
|
|
294
|
+
* Resolves to responsive margin and padding values.
|
|
295
|
+
*/
|
|
113
296
|
spacingPresetId: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Per-element overrides that take precedence over the spacing preset.
|
|
300
|
+
* Set to `null` to clear overrides and use the preset values as-is.
|
|
301
|
+
*/
|
|
114
302
|
spacingOverride?: {
|
|
303
|
+
/** Override margin values */
|
|
115
304
|
margin?: BoxModelValue;
|
|
305
|
+
/** Override padding values */
|
|
116
306
|
padding?: BoxModelValue;
|
|
117
307
|
} | null;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Layout context hint — influences how spacing presets are resolved.
|
|
311
|
+
*
|
|
312
|
+
* - `'default'` — Standard page content
|
|
313
|
+
* - `'cards'` — Inside a card component (tighter spacing)
|
|
314
|
+
* - `'sections'` — Page section level (wider spacing)
|
|
315
|
+
*
|
|
316
|
+
* @default 'default'
|
|
317
|
+
*/
|
|
118
318
|
context?: 'default' | 'cards' | 'sections';
|
|
119
319
|
}
|
|
120
320
|
|
|
121
321
|
/**
|
|
122
|
-
* Grid placement
|
|
322
|
+
* Grid placement data for components inside CSS Grid containers.
|
|
323
|
+
*
|
|
324
|
+
* Specifies the column/row position and span of an element
|
|
325
|
+
* within its parent grid.
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* // Element spanning columns 1-2 in row 1
|
|
330
|
+
* const placement: GridPlacementData = {
|
|
331
|
+
* colStart: 1,
|
|
332
|
+
* colSpan: 2,
|
|
333
|
+
* rowStart: 1,
|
|
334
|
+
* rowSpan: 1,
|
|
335
|
+
* };
|
|
336
|
+
* ```
|
|
123
337
|
*/
|
|
124
338
|
export interface GridPlacementData {
|
|
339
|
+
/** 1-based column start position (`grid-column-start`) */
|
|
125
340
|
colStart: number;
|
|
341
|
+
|
|
342
|
+
/** Number of columns to span (`grid-column-end: span N`) */
|
|
126
343
|
colSpan: number;
|
|
344
|
+
|
|
345
|
+
/** 1-based row start position (`grid-row-start`) */
|
|
127
346
|
rowStart: number;
|
|
347
|
+
|
|
348
|
+
/** Number of rows to span (`grid-row-end: span N`) */
|
|
128
349
|
rowSpan: number;
|
|
129
350
|
}
|
|
130
351
|
|
|
131
352
|
/**
|
|
132
|
-
*
|
|
353
|
+
* Advanced properties available on all plugin components.
|
|
354
|
+
*
|
|
355
|
+
* These are typically shown in the "Advanced" section of the Context Panel.
|
|
133
356
|
*/
|
|
134
357
|
export interface AdvancedData {
|
|
358
|
+
/**
|
|
359
|
+
* Additional CSS class names applied to the root element.
|
|
360
|
+
* @default ''
|
|
361
|
+
*/
|
|
135
362
|
className?: string;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* ARIA label for accessibility (screen readers).
|
|
366
|
+
* @default ''
|
|
367
|
+
*/
|
|
136
368
|
ariaLabel?: string;
|
|
137
369
|
}
|
|
138
370
|
|
|
139
|
-
|
|
140
371
|
/**
|
|
141
|
-
*
|
|
372
|
+
* Fully resolved text styles after applying the Design System fallback chain.
|
|
373
|
+
*
|
|
374
|
+
* All values are guaranteed to be non-null CSS-ready strings.
|
|
375
|
+
* Produced by resolving a {@link TextStyleData} against the active
|
|
376
|
+
* Design System font and color presets.
|
|
377
|
+
*
|
|
378
|
+
* @see {@link TextStyleData} for the unresolved (nullable) input
|
|
142
379
|
*/
|
|
143
380
|
export interface ResolvedTextStyles {
|
|
381
|
+
/** Resolved CSS `font-size` value (e.g., `'1.5rem'`, `'24px'`) */
|
|
144
382
|
fontSize: string;
|
|
383
|
+
|
|
384
|
+
/** Resolved CSS `line-height` value (e.g., `'1.4'`, `'28px'`) */
|
|
145
385
|
lineHeight: string;
|
|
386
|
+
|
|
387
|
+
/** Resolved CSS `font-weight` value (e.g., `'700'`, `'bold'`) */
|
|
146
388
|
fontWeight: string;
|
|
389
|
+
|
|
390
|
+
/** Resolved CSS color value (e.g., `'#1a1a1a'`, `'rgb(0,0,0)'`) */
|
|
147
391
|
color: string;
|
|
392
|
+
|
|
393
|
+
/** Resolved horizontal text alignment @see {@link TextAlign} */
|
|
148
394
|
textAlign: TextAlign;
|
|
395
|
+
|
|
396
|
+
/** Resolved text decoration @see {@link TextDecoration} */
|
|
149
397
|
textDecoration: TextDecoration;
|
|
398
|
+
|
|
399
|
+
/** Resolved text transform @see {@link TextTransform} */
|
|
150
400
|
textTransform: TextTransform;
|
|
401
|
+
|
|
402
|
+
/** Resolved CSS `letter-spacing` value (e.g., `'0.5px'`, `'normal'`) */
|
|
151
403
|
letterSpacing: string;
|
|
404
|
+
|
|
405
|
+
/** Resolved CSS `max-width` value (e.g., `'600px'`, `'none'`) */
|
|
152
406
|
maxWidth: string;
|
|
407
|
+
|
|
408
|
+
/** Resolved CSS `font-family` value (e.g., `'"Inter", sans-serif'`) */
|
|
153
409
|
fontFamily: string;
|
|
154
410
|
}
|