satori 0.0.44 → 0.0.46

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 CHANGED
@@ -1,8 +1,23 @@
1
1
  import { ReactNode } from 'react';
2
2
  import * as yoga_layout from 'yoga-layout';
3
3
 
4
- declare let Yoga: typeof yoga_layout;
5
- declare function init(yoga: typeof Yoga): void;
4
+ declare const code: {
5
+ readonly 'ja-JP': RegExp;
6
+ readonly 'ko-KR': RegExp;
7
+ readonly 'zh-CN': RegExp;
8
+ readonly 'zh-TW': RegExp;
9
+ readonly 'zh-HK': RegExp;
10
+ readonly 'th-TH': RegExp;
11
+ readonly 'bn-IN': RegExp;
12
+ readonly 'ar-AR': RegExp;
13
+ readonly 'ta-IN': RegExp;
14
+ readonly 'ml-IN': RegExp;
15
+ readonly 'he-IL': RegExp;
16
+ readonly 'te-IN': RegExp;
17
+ readonly devanagari: RegExp;
18
+ readonly kannada: RegExp;
19
+ };
20
+ declare type Locale = keyof typeof code;
6
21
 
7
22
  /**
8
23
  * This class handles everything related to fonts.
@@ -15,8 +30,12 @@ interface FontOptions {
15
30
  name: string;
16
31
  weight?: Weight;
17
32
  style?: Style;
33
+ lang?: string;
18
34
  }
19
35
 
36
+ declare let Yoga: typeof yoga_layout;
37
+ declare function init(yoga: typeof Yoga): void;
38
+
20
39
  declare type SatoriOptions = ({
21
40
  width: number;
22
41
  height: number;
@@ -34,4 +53,4 @@ declare type SatoriOptions = ({
34
53
 
35
54
  declare function satori(element: ReactNode, options: SatoriOptions): Promise<string>;
36
55
 
37
- export { SatoriOptions, satori as default, init };
56
+ export { FontOptions as Font, Style as FontStyle, Weight as FontWeight, Locale, SatoriOptions, satori as default, init };