@mastergo/plugin-typings 2.8.0-beta.3 → 2.8.0-beta.4
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/index.d.ts +25 -29
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1185,13 +1185,6 @@ declare global {
|
|
|
1185
1185
|
* @param description
|
|
1186
1186
|
*/
|
|
1187
1187
|
createStyleCopy<T extends StyleType = "PAINT">(sourceStyleId: string, styleName?: string, description?: string): StyleReturnType<T>
|
|
1188
|
-
/**
|
|
1189
|
-
* 创建某一个样式引用
|
|
1190
|
-
* @param sourceStyleId 引用源样式id
|
|
1191
|
-
* @param styleName
|
|
1192
|
-
* @param description
|
|
1193
|
-
*/
|
|
1194
|
-
createStyleRef<T extends StyleType = "PAINT">(sourceStyleId: string, styleName?: string, description?: string): StyleReturnType<T>
|
|
1195
1188
|
|
|
1196
1189
|
getLocalPaintStyles(): PaintStyle[]
|
|
1197
1190
|
getLocalEffectStyles(): EffectStyle[]
|
|
@@ -1451,7 +1444,9 @@ declare global {
|
|
|
1451
1444
|
layoutGrids: ReadonlyArray<LayoutGrid>
|
|
1452
1445
|
}
|
|
1453
1446
|
|
|
1454
|
-
type Style = PaintStyle | EffectStyle | TextStyle |
|
|
1447
|
+
type Style = PaintStyle | EffectStyle | TextStyle |
|
|
1448
|
+
GridStyle | StrokeWidthStyle | CornerRadiusStyle |
|
|
1449
|
+
PaddingStyle | SpacingStyle
|
|
1455
1450
|
|
|
1456
1451
|
/// /////////////////////////////////////////////////////////////////////////////
|
|
1457
1452
|
// Datatypes
|
|
@@ -1650,7 +1645,7 @@ declare global {
|
|
|
1650
1645
|
| 'PLUS_LIGHTER'
|
|
1651
1646
|
| 'PASS_THROUGH'
|
|
1652
1647
|
|
|
1653
|
-
|
|
1648
|
+
type FontReferrer = 'team' | 'org' | 'local' | 'official'
|
|
1654
1649
|
|
|
1655
1650
|
interface Font {
|
|
1656
1651
|
fontName: FontName
|
|
@@ -2196,6 +2191,7 @@ declare global {
|
|
|
2196
2191
|
name?: string
|
|
2197
2192
|
defaultValue?: string | boolean
|
|
2198
2193
|
preferredValues?: InstanceSwapPreferredValue[]
|
|
2194
|
+
alias?: string
|
|
2199
2195
|
},
|
|
2200
2196
|
): string
|
|
2201
2197
|
deleteComponentProperty(propertyId: string): void
|
|
@@ -2499,9 +2495,9 @@ declare global {
|
|
|
2499
2495
|
| 'SLICE'
|
|
2500
2496
|
| 'CONNECTOR'
|
|
2501
2497
|
| 'SECTION'
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
|
|
2505
2501
|
// d2c
|
|
2506
2502
|
type CodeFile = {
|
|
2507
2503
|
/**
|
|
@@ -2530,15 +2526,15 @@ declare global {
|
|
|
2530
2526
|
/**
|
|
2531
2527
|
* @param event a callback function that is triggered when the plugin generates the DSL, and the parameter of the callback function is the modified DSL data
|
|
2532
2528
|
*/
|
|
2533
|
-
on(type: 'generateDSL', event: (generateData: {data: MGDSL.MGDSLData, callback: (modifiedData: MGDSL.MGDSLData) => void}) => void)
|
|
2529
|
+
on(type: 'generateDSL', event: (generateData: { data: MGDSL.MGDSLData, callback: (modifiedData: MGDSL.MGDSLData) => void }) => void): void
|
|
2534
2530
|
/**
|
|
2535
2531
|
* @param event a callback function that is triggered when the plugin generates the DSL, and the parameter of the callback function is the custom code, and when the callback returns the custom code, the custom code will be used as the standard, and the code will not be generated according to the DSL
|
|
2536
2532
|
*/
|
|
2537
|
-
on(type: 'generate', event: (generateData: {data: MGDSL.MGDSLData, callback: (modifiedData: MGDSL.CustomCode) => void}) => void)
|
|
2533
|
+
on(type: 'generate', event: (generateData: { data: MGDSL.MGDSLData, callback: (modifiedData: MGDSL.CustomCode) => void }) => void): void
|
|
2538
2534
|
/**
|
|
2539
2535
|
* @param event a callback function that is triggered when the plugin generates the code, and the parameter of the callback function is the generated code
|
|
2540
2536
|
*/
|
|
2541
|
-
on(type: 'codeChange', event: (data: MGDSL.CustomCode['data']) => void)
|
|
2537
|
+
on(type: 'codeChange', event: (data: MGDSL.CustomCode['data']) => void): void
|
|
2542
2538
|
/**
|
|
2543
2539
|
* Set the component template
|
|
2544
2540
|
* @description used to set the component mapping relationship
|
|
@@ -2568,21 +2564,21 @@ declare global {
|
|
|
2568
2564
|
getCodeByDSL(data: MGDSL.MGDSLData, type: MGDSL.Framework): Promise<CodeFile | null>;
|
|
2569
2565
|
}
|
|
2570
2566
|
|
|
2571
|
-
type StyleReturnType<T extends StyleType> =
|
|
2572
|
-
T extends 'PAINT' ? PaintStyle :
|
|
2573
|
-
T extends 'TEXT' ? TextStyle :
|
|
2574
|
-
T extends 'EFFECT' ? EffectStyle :
|
|
2575
|
-
T extends 'GRID' ? GridStyle :
|
|
2576
|
-
T extends 'STROKE_WIDTH' ? StrokeWidthStyle :
|
|
2577
|
-
T extends 'CORNER_RADIUS' ? CornerRadiusStyle :
|
|
2578
|
-
T extends 'PADDING' ? PaddingStyle :
|
|
2567
|
+
type StyleReturnType<T extends StyleType> =
|
|
2568
|
+
T extends 'PAINT' ? PaintStyle :
|
|
2569
|
+
T extends 'TEXT' ? TextStyle :
|
|
2570
|
+
T extends 'EFFECT' ? EffectStyle :
|
|
2571
|
+
T extends 'GRID' ? GridStyle :
|
|
2572
|
+
T extends 'STROKE_WIDTH' ? StrokeWidthStyle :
|
|
2573
|
+
T extends 'CORNER_RADIUS' ? CornerRadiusStyle :
|
|
2574
|
+
T extends 'PADDING' ? PaddingStyle :
|
|
2579
2575
|
T extends 'SPACING' ? SpacingStyle : never
|
|
2580
2576
|
|
|
2581
|
-
type NodeStyleReturnType<T extends NodeStyleType> =
|
|
2582
|
-
T extends 'fill' ? PaintStyle :
|
|
2583
|
-
T extends 'strokeFill' ? PaintStyle :
|
|
2584
|
-
T extends 'strokeWidth' ? StrokeWidthStyle :
|
|
2585
|
-
T extends 'cornerRadius' ? CornerRadiusStyle :
|
|
2586
|
-
T extends 'padding' ? PaddingStyle :
|
|
2577
|
+
type NodeStyleReturnType<T extends NodeStyleType> =
|
|
2578
|
+
T extends 'fill' ? PaintStyle :
|
|
2579
|
+
T extends 'strokeFill' ? PaintStyle :
|
|
2580
|
+
T extends 'strokeWidth' ? StrokeWidthStyle :
|
|
2581
|
+
T extends 'cornerRadius' ? CornerRadiusStyle :
|
|
2582
|
+
T extends 'padding' ? PaddingStyle :
|
|
2587
2583
|
T extends 'spacing' ? SpacingStyle : never
|
|
2588
2584
|
}
|