satori 0.36.0 → 0.37.1

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.
@@ -133,10 +133,6 @@ interface TwConfig {
133
133
  }>;
134
134
  }
135
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
136
  /**
141
137
  * This module is used to calculate the layout of the current sub-tree.
142
138
  */
@@ -172,4 +168,17 @@ type SatoriOptions = ({
172
168
 
173
169
  declare const satori: (element: ReactNode, options: SatoriOptions) => Promise<string>;
174
170
 
171
+ /**
172
+ * Loads the layout engine from a WebAssembly module provided by the user, for
173
+ * `satori/standalone`.
174
+ */
175
+
176
+ type InitInput = string | Request | URL | Response | BufferSource | Buffer | WebAssembly.Module | Promise<Response | BufferSource | Buffer | WebAssembly.Module>;
177
+
178
+ /**
179
+ * Initializes `satori/standalone` with the `layout.wasm` module. The default
180
+ * build bundles it.
181
+ */
182
+ declare function init(input: InitInput): Promise<void>;
183
+
175
184
  export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default, init };
@@ -133,10 +133,6 @@ interface TwConfig {
133
133
  }>;
134
134
  }
135
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
136
  /**
141
137
  * This module is used to calculate the layout of the current sub-tree.
142
138
  */
@@ -172,4 +168,17 @@ type SatoriOptions = ({
172
168
 
173
169
  declare const satori: (element: ReactNode, options: SatoriOptions) => Promise<string>;
174
170
 
171
+ /**
172
+ * Loads the layout engine from a WebAssembly module provided by the user, for
173
+ * `satori/standalone`.
174
+ */
175
+
176
+ type InitInput = string | Request | URL | Response | BufferSource | Buffer | WebAssembly.Module | Promise<Response | BufferSource | Buffer | WebAssembly.Module>;
177
+
178
+ /**
179
+ * Initializes `satori/standalone` with the `layout.wasm` module. The default
180
+ * build bundles it.
181
+ */
182
+ declare function init(input: InitInput): Promise<void>;
183
+
175
184
  export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default, init };