Skip to content

Commit aebc582

Browse files
author
Ameen Saeed
committed
build: bundle dist/ for direct git installs (v0.26.0 + PR vercel#745 RTL fix)
1 parent 6681ec6 commit aebc582

33 files changed

Lines changed: 2101 additions & 0 deletions

dist/index.cjs

Lines changed: 9 additions & 0 deletions
Large diffs are not rendered by default.

dist/index.cjs.LEGAL.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Bundled license information:
2+
3+
cssesc/cssesc.js:
4+
/*! https://mths.be/cssesc v3.0.0 by @mathias */

dist/index.cjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.cts

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
import { ReactNode } from 'react';
2+
3+
declare const code: {
4+
readonly 'ja-JP': RegExp;
5+
readonly 'ko-KR': RegExp;
6+
readonly 'zh-CN': RegExp;
7+
readonly 'zh-TW': RegExp;
8+
readonly 'zh-HK': RegExp;
9+
readonly 'th-TH': RegExp;
10+
readonly 'bn-IN': RegExp;
11+
readonly 'ar-AR': RegExp;
12+
readonly 'ta-IN': RegExp;
13+
readonly 'ml-IN': RegExp;
14+
readonly 'he-IL': RegExp;
15+
readonly 'te-IN': RegExp;
16+
readonly devanagari: RegExp;
17+
readonly kannada: RegExp;
18+
};
19+
type Locale = keyof typeof code;
20+
21+
/**
22+
* This class handles everything related to fonts.
23+
*/
24+
25+
type Weight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
26+
type FontStyle = 'normal' | 'italic';
27+
interface FontOptions {
28+
data: Buffer | ArrayBuffer;
29+
name: string;
30+
weight?: Weight;
31+
style?: FontStyle;
32+
lang?: string;
33+
}
34+
35+
declare type Style = {
36+
[key: string]: string[] | string | number | boolean | Style;
37+
};
38+
declare type NotImplemented = (...args: any) => unknown;
39+
declare type AddedUtilities = Record<string, Style | string>;
40+
declare type PluginFunction = (obj: {
41+
addUtilities(utilities: AddedUtilities): unknown;
42+
/**
43+
* @deprecated not supported in @jaredh159/twrn
44+
*/
45+
addComponents: NotImplemented;
46+
/**
47+
* @deprecated not supported in @jaredh159/twrn
48+
*/
49+
addBase: NotImplemented;
50+
/**
51+
* @deprecated not supported in @jaredh159/twrn
52+
*/
53+
addVariant: NotImplemented;
54+
/**
55+
* @deprecated not supported in @jaredh159/twrn
56+
*/
57+
e: NotImplemented;
58+
/**
59+
* @deprecated not supported in @jaredh159/twrn
60+
*/
61+
prefix: NotImplemented;
62+
/**
63+
* @deprecated not supported in @jaredh159/twrn
64+
*/
65+
theme: NotImplemented;
66+
/**
67+
* @deprecated not supported in @jaredh159/twrn
68+
*/
69+
variants: NotImplemented;
70+
/**
71+
* @deprecated not supported in @jaredh159/twrn
72+
*/
73+
config: NotImplemented;
74+
/**
75+
* @deprecated not supported in @jaredh159/twrn
76+
*/
77+
corePlugins: NotImplemented;
78+
/**
79+
* @deprecated not supported in @jaredh159/twrn
80+
*/
81+
matchUtilities: NotImplemented;
82+
/**
83+
* @deprecated not supported in @jaredh159/twrn
84+
*/
85+
postcss: unknown;
86+
}) => unknown;
87+
88+
declare type TwFontSize = string | [string, string] | [string, {
89+
lineHeight?: string;
90+
letterSpacing?: string;
91+
}];
92+
declare type TwScreen = string | {
93+
max?: string;
94+
min?: string;
95+
};
96+
declare type TwColors<K extends keyof any = string, V = string> = {
97+
[key: string]: V | TwColors<K, V>;
98+
};
99+
interface TwTheme {
100+
fontSize?: Record<string, TwFontSize>;
101+
lineHeight?: Record<string, string>;
102+
spacing?: Record<string, string>;
103+
padding?: Record<string, string>;
104+
margin?: Record<string, string>;
105+
inset?: Record<string, string>;
106+
height?: Record<string, string>;
107+
width?: Record<string, string>;
108+
maxWidth?: Record<string, string>;
109+
maxHeight?: Record<string, string>;
110+
minWidth?: Record<string, string>;
111+
minHeight?: Record<string, string>;
112+
letterSpacing?: Record<string, string>;
113+
borderWidth?: Record<string, string>;
114+
borderRadius?: Record<string, string>;
115+
screens?: Record<string, TwScreen>;
116+
opacity?: Record<string, number | string>;
117+
flex?: Record<string, string>;
118+
flexGrow?: Record<string, number | string>;
119+
flexShrink?: Record<string, number | string>;
120+
fontWeight?: Record<string, number | string>;
121+
fontFamily?: Record<string, string | string[]>;
122+
zIndex?: Record<string, number | string>;
123+
colors?: TwColors;
124+
backgroundColor?: TwColors;
125+
borderColor?: TwColors;
126+
textColor?: TwColors;
127+
extend?: Omit<TwTheme, 'extend'>;
128+
}
129+
interface TwConfig {
130+
theme?: TwTheme;
131+
plugins?: Array<{
132+
handler: PluginFunction;
133+
}>;
134+
}
135+
136+
type InitInput = string | Request | URL | Response | BufferSource | Buffer | WebAssembly.Module | Promise<Response | BufferSource | Buffer | WebAssembly.Module>;
137+
138+
declare function init(input: InitInput): Promise<void>;
139+
140+
/**
141+
* This module is used to calculate the layout of the current sub-tree.
142+
*/
143+
144+
interface SatoriNode {
145+
left: number;
146+
top: number;
147+
width: number;
148+
height: number;
149+
type: string;
150+
key?: string | number;
151+
props: Record<string, any>;
152+
textContent?: string;
153+
}
154+
155+
type SatoriOptions = ({
156+
width: number;
157+
height: number;
158+
} | {
159+
width: number;
160+
} | {
161+
height: number;
162+
}) & {
163+
fonts: FontOptions[];
164+
embedFont?: boolean;
165+
debug?: boolean;
166+
graphemeImages?: Record<string, string>;
167+
loadAdditionalAsset?: (languageCode: string, segment: string) => Promise<string | Array<FontOptions>>;
168+
tailwindConfig?: TwConfig;
169+
onNodeDetected?: (node: SatoriNode) => void;
170+
pointScaleFactor?: number;
171+
};
172+
173+
declare function satori(element: ReactNode, options: SatoriOptions): Promise<string>;
174+
175+
export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default, init };

dist/index.d.ts

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
import { ReactNode } from 'react';
2+
3+
declare const code: {
4+
readonly 'ja-JP': RegExp;
5+
readonly 'ko-KR': RegExp;
6+
readonly 'zh-CN': RegExp;
7+
readonly 'zh-TW': RegExp;
8+
readonly 'zh-HK': RegExp;
9+
readonly 'th-TH': RegExp;
10+
readonly 'bn-IN': RegExp;
11+
readonly 'ar-AR': RegExp;
12+
readonly 'ta-IN': RegExp;
13+
readonly 'ml-IN': RegExp;
14+
readonly 'he-IL': RegExp;
15+
readonly 'te-IN': RegExp;
16+
readonly devanagari: RegExp;
17+
readonly kannada: RegExp;
18+
};
19+
type Locale = keyof typeof code;
20+
21+
/**
22+
* This class handles everything related to fonts.
23+
*/
24+
25+
type Weight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
26+
type FontStyle = 'normal' | 'italic';
27+
interface FontOptions {
28+
data: Buffer | ArrayBuffer;
29+
name: string;
30+
weight?: Weight;
31+
style?: FontStyle;
32+
lang?: string;
33+
}
34+
35+
declare type Style = {
36+
[key: string]: string[] | string | number | boolean | Style;
37+
};
38+
declare type NotImplemented = (...args: any) => unknown;
39+
declare type AddedUtilities = Record<string, Style | string>;
40+
declare type PluginFunction = (obj: {
41+
addUtilities(utilities: AddedUtilities): unknown;
42+
/**
43+
* @deprecated not supported in @jaredh159/twrn
44+
*/
45+
addComponents: NotImplemented;
46+
/**
47+
* @deprecated not supported in @jaredh159/twrn
48+
*/
49+
addBase: NotImplemented;
50+
/**
51+
* @deprecated not supported in @jaredh159/twrn
52+
*/
53+
addVariant: NotImplemented;
54+
/**
55+
* @deprecated not supported in @jaredh159/twrn
56+
*/
57+
e: NotImplemented;
58+
/**
59+
* @deprecated not supported in @jaredh159/twrn
60+
*/
61+
prefix: NotImplemented;
62+
/**
63+
* @deprecated not supported in @jaredh159/twrn
64+
*/
65+
theme: NotImplemented;
66+
/**
67+
* @deprecated not supported in @jaredh159/twrn
68+
*/
69+
variants: NotImplemented;
70+
/**
71+
* @deprecated not supported in @jaredh159/twrn
72+
*/
73+
config: NotImplemented;
74+
/**
75+
* @deprecated not supported in @jaredh159/twrn
76+
*/
77+
corePlugins: NotImplemented;
78+
/**
79+
* @deprecated not supported in @jaredh159/twrn
80+
*/
81+
matchUtilities: NotImplemented;
82+
/**
83+
* @deprecated not supported in @jaredh159/twrn
84+
*/
85+
postcss: unknown;
86+
}) => unknown;
87+
88+
declare type TwFontSize = string | [string, string] | [string, {
89+
lineHeight?: string;
90+
letterSpacing?: string;
91+
}];
92+
declare type TwScreen = string | {
93+
max?: string;
94+
min?: string;
95+
};
96+
declare type TwColors<K extends keyof any = string, V = string> = {
97+
[key: string]: V | TwColors<K, V>;
98+
};
99+
interface TwTheme {
100+
fontSize?: Record<string, TwFontSize>;
101+
lineHeight?: Record<string, string>;
102+
spacing?: Record<string, string>;
103+
padding?: Record<string, string>;
104+
margin?: Record<string, string>;
105+
inset?: Record<string, string>;
106+
height?: Record<string, string>;
107+
width?: Record<string, string>;
108+
maxWidth?: Record<string, string>;
109+
maxHeight?: Record<string, string>;
110+
minWidth?: Record<string, string>;
111+
minHeight?: Record<string, string>;
112+
letterSpacing?: Record<string, string>;
113+
borderWidth?: Record<string, string>;
114+
borderRadius?: Record<string, string>;
115+
screens?: Record<string, TwScreen>;
116+
opacity?: Record<string, number | string>;
117+
flex?: Record<string, string>;
118+
flexGrow?: Record<string, number | string>;
119+
flexShrink?: Record<string, number | string>;
120+
fontWeight?: Record<string, number | string>;
121+
fontFamily?: Record<string, string | string[]>;
122+
zIndex?: Record<string, number | string>;
123+
colors?: TwColors;
124+
backgroundColor?: TwColors;
125+
borderColor?: TwColors;
126+
textColor?: TwColors;
127+
extend?: Omit<TwTheme, 'extend'>;
128+
}
129+
interface TwConfig {
130+
theme?: TwTheme;
131+
plugins?: Array<{
132+
handler: PluginFunction;
133+
}>;
134+
}
135+
136+
type InitInput = string | Request | URL | Response | BufferSource | Buffer | WebAssembly.Module | Promise<Response | BufferSource | Buffer | WebAssembly.Module>;
137+
138+
declare function init(input: InitInput): Promise<void>;
139+
140+
/**
141+
* This module is used to calculate the layout of the current sub-tree.
142+
*/
143+
144+
interface SatoriNode {
145+
left: number;
146+
top: number;
147+
width: number;
148+
height: number;
149+
type: string;
150+
key?: string | number;
151+
props: Record<string, any>;
152+
textContent?: string;
153+
}
154+
155+
type SatoriOptions = ({
156+
width: number;
157+
height: number;
158+
} | {
159+
width: number;
160+
} | {
161+
height: number;
162+
}) & {
163+
fonts: FontOptions[];
164+
embedFont?: boolean;
165+
debug?: boolean;
166+
graphemeImages?: Record<string, string>;
167+
loadAdditionalAsset?: (languageCode: string, segment: string) => Promise<string | Array<FontOptions>>;
168+
tailwindConfig?: TwConfig;
169+
onNodeDetected?: (node: SatoriNode) => void;
170+
pointScaleFactor?: number;
171+
};
172+
173+
declare function satori(element: ReactNode, options: SatoriOptions): Promise<string>;
174+
175+
export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default, init };

dist/index.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.LEGAL.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Bundled license information:
2+
3+
cssesc/cssesc.js:
4+
/*! https://mths.be/cssesc v3.0.0 by @mathias */

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)