@mastergo/plugin-typings 2.9.1-beta.4 → 2.10.0-beta.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/index.d.ts +48 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1174,6 +1174,10 @@ declare global {
|
|
|
1174
1174
|
notify(message: string, options?: NotifyOptions): NotificationHandler
|
|
1175
1175
|
|
|
1176
1176
|
getStyleById(id: string): Style | null
|
|
1177
|
+
getStyleCodeById(id: string, options?: StyleCodeOptions): CodeString | null
|
|
1178
|
+
getWebStyleCodeById(id: string, options?: WebStyleCodeOptions): CodeString | null
|
|
1179
|
+
getAndroidStyleCodeById(id: string, options?: AndroidStyleCodeOptions): CodeString | null
|
|
1180
|
+
getIOSStyleCodeById(id: string, options?: IOSStyleCodeOptions): CodeString | null
|
|
1177
1181
|
getTitleByFontFamilyAndStyle(fontFamily: string, fontStyle: string): FontAlias | null
|
|
1178
1182
|
|
|
1179
1183
|
createFillStyle(config: CreateStyleConfig): PaintStyle
|
|
@@ -1346,6 +1350,50 @@ declare global {
|
|
|
1346
1350
|
isLoading?: boolean
|
|
1347
1351
|
}
|
|
1348
1352
|
|
|
1353
|
+
type CodeType = 'Web' | 'iOS' | 'Android'
|
|
1354
|
+
|
|
1355
|
+
type WebCodeLang = 'css' | 'less' | 'sass'
|
|
1356
|
+
type AndroidCodeLang = 'xml'
|
|
1357
|
+
type IOSCodeLang = 'swift'
|
|
1358
|
+
type CodeLang = WebCodeLang | AndroidCodeLang | IOSCodeLang
|
|
1359
|
+
|
|
1360
|
+
type WebCodeUnit = 'px' | 'rem' | 'rpx'
|
|
1361
|
+
type AndroidCodeUnit = 'dp' | 'dp/sp'
|
|
1362
|
+
type IOSCodeUnit = 'pt'
|
|
1363
|
+
type CodeUnit = WebCodeUnit | AndroidCodeUnit | IOSCodeUnit
|
|
1364
|
+
|
|
1365
|
+
interface StyleCodeOptions {
|
|
1366
|
+
codeType?: CodeType
|
|
1367
|
+
codeLang?: CodeLang
|
|
1368
|
+
unit?: CodeUnit
|
|
1369
|
+
pixelRatio?: number
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
interface WebStyleCodeOptions {
|
|
1373
|
+
codeLang?: WebCodeLang
|
|
1374
|
+
unit?: WebCodeUnit
|
|
1375
|
+
pixelRatio?: number
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
interface AndroidStyleCodeOptions {
|
|
1379
|
+
pixelRatio?: number
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
interface IOSStyleCodeOptions {
|
|
1383
|
+
pixelRatio?: number
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
type CodeData = {
|
|
1387
|
+
layout?: string;
|
|
1388
|
+
style?: string;
|
|
1389
|
+
typography?: string;
|
|
1390
|
+
other?: string;
|
|
1391
|
+
}
|
|
1392
|
+
interface CodeString {
|
|
1393
|
+
type: 'CSS' | 'iOS' | 'Android'
|
|
1394
|
+
data: CodeData | ''
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1349
1397
|
interface UIViewport extends Bound {
|
|
1350
1398
|
readonly headerHeight: number
|
|
1351
1399
|
readonly visible: boolean
|