@grida/canvas-wasm 0.0.59 → 0.0.61
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/grida-canvas-wasm.js +1 -1
- package/dist/grida_canvas_wasm.wasm +0 -0
- package/dist/index.d.mts +4 -18
- package/dist/index.d.ts +4 -18
- package/dist/index.js +141 -155
- package/dist/index.mjs +141 -155
- package/package.json +1 -1
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -23,7 +23,7 @@ declare namespace fonts {
|
|
|
23
23
|
tag: string;
|
|
24
24
|
name: string;
|
|
25
25
|
min: number;
|
|
26
|
-
|
|
26
|
+
def: number;
|
|
27
27
|
max: number;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -79,7 +79,7 @@ declare namespace fonts {
|
|
|
79
79
|
width_class: number;
|
|
80
80
|
is_variable: boolean;
|
|
81
81
|
is_strict_italic: boolean;
|
|
82
|
-
axes
|
|
82
|
+
axes?: Record<string, FontAxis>;
|
|
83
83
|
instances?: Array<FontInstance>;
|
|
84
84
|
features: Array<FontFeature>;
|
|
85
85
|
}
|
|
@@ -190,14 +190,6 @@ declare namespace fonts {
|
|
|
190
190
|
* @param ptr - Pointer to memory allocated by a WASM function
|
|
191
191
|
*/
|
|
192
192
|
_grida_fonts_free(ptr: number): void;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Returns the version of the font parsing library.
|
|
196
|
-
* This is a ping function to verify the WASM module is working.
|
|
197
|
-
*
|
|
198
|
-
* @returns Version string
|
|
199
|
-
*/
|
|
200
|
-
_grida_fonts_version(): number;
|
|
201
193
|
}
|
|
202
194
|
}
|
|
203
195
|
|
|
@@ -272,13 +264,6 @@ declare class FontsAPI {
|
|
|
272
264
|
* @returns Promise resolving to FaceRecord
|
|
273
265
|
*/
|
|
274
266
|
parseFont(fontData: ArrayBuffer | Uint8Array, faceId: string, userFontStyleItalic?: boolean): Promise<fonts.types.FaceRecord>;
|
|
275
|
-
/**
|
|
276
|
-
* Gets the version of the font parsing library.
|
|
277
|
-
* This is a ping function to verify the WASM module is working.
|
|
278
|
-
*
|
|
279
|
-
* @returns Version string
|
|
280
|
-
*/
|
|
281
|
-
getVersion(): string;
|
|
282
267
|
}
|
|
283
268
|
|
|
284
269
|
declare class Scene {
|
|
@@ -347,7 +332,8 @@ declare class Scene {
|
|
|
347
332
|
getNodeIdsFromEnvelope(envelope: types.Rectangle): string[];
|
|
348
333
|
getNodeAbsoluteBoundingBox(id: string): types.Rectangle | null;
|
|
349
334
|
/**
|
|
350
|
-
*
|
|
335
|
+
* Convert a node into a vector network representation.
|
|
336
|
+
* Supports primitive shapes and text nodes.
|
|
351
337
|
*/
|
|
352
338
|
toVectorNetwork(id: string): types.VectorNetwork | null;
|
|
353
339
|
exportNodeAs(id: string, format: types.ExportAs): {
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare namespace fonts {
|
|
|
23
23
|
tag: string;
|
|
24
24
|
name: string;
|
|
25
25
|
min: number;
|
|
26
|
-
|
|
26
|
+
def: number;
|
|
27
27
|
max: number;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -79,7 +79,7 @@ declare namespace fonts {
|
|
|
79
79
|
width_class: number;
|
|
80
80
|
is_variable: boolean;
|
|
81
81
|
is_strict_italic: boolean;
|
|
82
|
-
axes
|
|
82
|
+
axes?: Record<string, FontAxis>;
|
|
83
83
|
instances?: Array<FontInstance>;
|
|
84
84
|
features: Array<FontFeature>;
|
|
85
85
|
}
|
|
@@ -190,14 +190,6 @@ declare namespace fonts {
|
|
|
190
190
|
* @param ptr - Pointer to memory allocated by a WASM function
|
|
191
191
|
*/
|
|
192
192
|
_grida_fonts_free(ptr: number): void;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Returns the version of the font parsing library.
|
|
196
|
-
* This is a ping function to verify the WASM module is working.
|
|
197
|
-
*
|
|
198
|
-
* @returns Version string
|
|
199
|
-
*/
|
|
200
|
-
_grida_fonts_version(): number;
|
|
201
193
|
}
|
|
202
194
|
}
|
|
203
195
|
|
|
@@ -272,13 +264,6 @@ declare class FontsAPI {
|
|
|
272
264
|
* @returns Promise resolving to FaceRecord
|
|
273
265
|
*/
|
|
274
266
|
parseFont(fontData: ArrayBuffer | Uint8Array, faceId: string, userFontStyleItalic?: boolean): Promise<fonts.types.FaceRecord>;
|
|
275
|
-
/**
|
|
276
|
-
* Gets the version of the font parsing library.
|
|
277
|
-
* This is a ping function to verify the WASM module is working.
|
|
278
|
-
*
|
|
279
|
-
* @returns Version string
|
|
280
|
-
*/
|
|
281
|
-
getVersion(): string;
|
|
282
267
|
}
|
|
283
268
|
|
|
284
269
|
declare class Scene {
|
|
@@ -347,7 +332,8 @@ declare class Scene {
|
|
|
347
332
|
getNodeIdsFromEnvelope(envelope: types.Rectangle): string[];
|
|
348
333
|
getNodeAbsoluteBoundingBox(id: string): types.Rectangle | null;
|
|
349
334
|
/**
|
|
350
|
-
*
|
|
335
|
+
* Convert a node into a vector network representation.
|
|
336
|
+
* Supports primitive shapes and text nodes.
|
|
351
337
|
*/
|
|
352
338
|
toVectorNetwork(id: string): types.VectorNetwork | null;
|
|
353
339
|
exportNodeAs(id: string, format: types.ExportAs): {
|