resvg-napi 0.3.0 → 0.3.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.
- package/THIRD-PARTY-NOTICES.md +653 -0
- package/index.d.ts +26 -109
- package/index.js +81 -82
- package/package.json +24 -20
- package/resvg-napi.wasi-browser.js +2 -2
- package/resvg-napi.wasi.cjs +20 -17
- package/resvg-napi.wasi.d.cts +26 -109
- package/wasi-worker-browser.mjs +1 -3
- package/wasi-worker.mjs +31 -23
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
3
4
|
/** Read-only handle on a `usvg::ClipPath`. */
|
|
4
5
|
export declare class ClipPath {
|
|
5
6
|
/**
|
|
@@ -712,18 +713,7 @@ export declare class TextSpan {
|
|
|
712
713
|
}
|
|
713
714
|
|
|
714
715
|
/** An alignment baseline property. */
|
|
715
|
-
export type AlignmentBaseline =
|
|
716
|
-
'baseline'|
|
|
717
|
-
'beforeEdge'|
|
|
718
|
-
'textBeforeEdge'|
|
|
719
|
-
'middle'|
|
|
720
|
-
'central'|
|
|
721
|
-
'afterEdge'|
|
|
722
|
-
'textAfterEdge'|
|
|
723
|
-
'ideographic'|
|
|
724
|
-
'alphabetic'|
|
|
725
|
-
'hanging'|
|
|
726
|
-
'mathematical';
|
|
716
|
+
export type AlignmentBaseline = 'auto' | 'baseline' | 'beforeEdge' | 'textBeforeEdge' | 'middle' | 'central' | 'afterEdge' | 'textAfterEdge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical'
|
|
727
717
|
|
|
728
718
|
/** `BaselineShift::Number`. */
|
|
729
719
|
export interface BaselineShiftNumber {
|
|
@@ -758,22 +748,7 @@ export interface Blend {
|
|
|
758
748
|
*
|
|
759
749
|
* `mix-blend-mode` attribute in the SVG.
|
|
760
750
|
*/
|
|
761
|
-
export type BlendMode =
|
|
762
|
-
'multiply'|
|
|
763
|
-
'screen'|
|
|
764
|
-
'overlay'|
|
|
765
|
-
'darken'|
|
|
766
|
-
'lighten'|
|
|
767
|
-
'colorDodge'|
|
|
768
|
-
'colorBurn'|
|
|
769
|
-
'hardLight'|
|
|
770
|
-
'softLight'|
|
|
771
|
-
'difference'|
|
|
772
|
-
'exclusion'|
|
|
773
|
-
'hue'|
|
|
774
|
-
'saturation'|
|
|
775
|
-
'color'|
|
|
776
|
-
'luminosity';
|
|
751
|
+
export type BlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'colorDodge' | 'colorBurn' | 'hardLight' | 'softLight' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity'
|
|
777
752
|
|
|
778
753
|
/** Plain view of a `Color`. */
|
|
779
754
|
export interface Color {
|
|
@@ -783,18 +758,14 @@ export interface Color {
|
|
|
783
758
|
}
|
|
784
759
|
|
|
785
760
|
/** A color channel. */
|
|
786
|
-
export type ColorChannel =
|
|
787
|
-
'g'|
|
|
788
|
-
'b'|
|
|
789
|
-
'a';
|
|
761
|
+
export type ColorChannel = 'r' | 'g' | 'b' | 'a'
|
|
790
762
|
|
|
791
763
|
/**
|
|
792
764
|
* A color interpolation mode.
|
|
793
765
|
*
|
|
794
766
|
* The default is `ColorInterpolation::LinearRGB`.
|
|
795
767
|
*/
|
|
796
|
-
export type ColorInterpolation =
|
|
797
|
-
'linearRgb';
|
|
768
|
+
export type ColorInterpolation = 'srgb' | 'linearRgb'
|
|
798
769
|
|
|
799
770
|
/** Plain view of a `ColorMatrix`. */
|
|
800
771
|
export interface ColorMatrix {
|
|
@@ -911,18 +882,7 @@ export interface DistantLight {
|
|
|
911
882
|
}
|
|
912
883
|
|
|
913
884
|
/** A dominant baseline property. */
|
|
914
|
-
export type DominantBaseline =
|
|
915
|
-
'useScript'|
|
|
916
|
-
'noChange'|
|
|
917
|
-
'resetSize'|
|
|
918
|
-
'ideographic'|
|
|
919
|
-
'alphabetic'|
|
|
920
|
-
'hanging'|
|
|
921
|
-
'mathematical'|
|
|
922
|
-
'central'|
|
|
923
|
-
'middle'|
|
|
924
|
-
'textAfterEdge'|
|
|
925
|
-
'textBeforeEdge';
|
|
885
|
+
export type DominantBaseline = 'auto' | 'useScript' | 'noChange' | 'resetSize' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'central' | 'middle' | 'textAfterEdge' | 'textBeforeEdge'
|
|
926
886
|
|
|
927
887
|
/** Plain view of a `DropShadow`. */
|
|
928
888
|
export interface DropShadow {
|
|
@@ -936,9 +896,7 @@ export interface DropShadow {
|
|
|
936
896
|
}
|
|
937
897
|
|
|
938
898
|
/** An edges processing mode. */
|
|
939
|
-
export type EdgeMode =
|
|
940
|
-
'duplicate'|
|
|
941
|
-
'wrap';
|
|
899
|
+
export type EdgeMode = 'none' | 'duplicate' | 'wrap'
|
|
942
900
|
|
|
943
901
|
/** Plain view of a `Fill`. */
|
|
944
902
|
export interface Fill {
|
|
@@ -952,8 +910,7 @@ export interface Fill {
|
|
|
952
910
|
*
|
|
953
911
|
* `fill-rule` attribute in the SVG.
|
|
954
912
|
*/
|
|
955
|
-
export type FillRule =
|
|
956
|
-
'evenOdd';
|
|
913
|
+
export type FillRule = 'nonZero' | 'evenOdd'
|
|
957
914
|
|
|
958
915
|
/** Plain view of a `Flood`. */
|
|
959
916
|
export interface Flood {
|
|
@@ -962,9 +919,7 @@ export interface Flood {
|
|
|
962
919
|
}
|
|
963
920
|
|
|
964
921
|
/** Allows italic or oblique faces to be selected. */
|
|
965
|
-
export type FontFaceStyle =
|
|
966
|
-
'italic'|
|
|
967
|
-
'oblique';
|
|
922
|
+
export type FontFaceStyle = 'normal' | 'italic' | 'oblique'
|
|
968
923
|
|
|
969
924
|
/**
|
|
970
925
|
* A font optical sizing property.
|
|
@@ -972,24 +927,13 @@ export type FontFaceStyle = 'normal'|
|
|
|
972
927
|
* Controls automatic adjustment of the `opsz` axis in variable fonts
|
|
973
928
|
* based on font size. Matches CSS `font-optical-sizing`.
|
|
974
929
|
*/
|
|
975
|
-
export type FontOpticalSizing =
|
|
976
|
-
'none';
|
|
930
|
+
export type FontOpticalSizing = 'auto' | 'none'
|
|
977
931
|
|
|
978
932
|
/** A font stretch property. */
|
|
979
|
-
export type FontStretch =
|
|
980
|
-
'extraCondensed'|
|
|
981
|
-
'condensed'|
|
|
982
|
-
'semiCondensed'|
|
|
983
|
-
'normal'|
|
|
984
|
-
'semiExpanded'|
|
|
985
|
-
'expanded'|
|
|
986
|
-
'extraExpanded'|
|
|
987
|
-
'ultraExpanded';
|
|
933
|
+
export type FontStretch = 'ultraCondensed' | 'extraCondensed' | 'condensed' | 'semiCondensed' | 'normal' | 'semiExpanded' | 'expanded' | 'extraExpanded' | 'ultraExpanded'
|
|
988
934
|
|
|
989
935
|
/** A font style property. */
|
|
990
|
-
export type FontStyle =
|
|
991
|
-
'italic'|
|
|
992
|
-
'oblique';
|
|
936
|
+
export type FontStyle = 'normal' | 'italic' | 'oblique'
|
|
993
937
|
|
|
994
938
|
/** Plain view of a `FontVariation`. */
|
|
995
939
|
export interface FontVariation {
|
|
@@ -1015,12 +959,7 @@ export interface ImageKindSvg {
|
|
|
1015
959
|
*
|
|
1016
960
|
* `image-rendering` attribute in the SVG.
|
|
1017
961
|
*/
|
|
1018
|
-
export type ImageRendering =
|
|
1019
|
-
'optimizeSpeed'|
|
|
1020
|
-
'smooth'|
|
|
1021
|
-
'highQuality'|
|
|
1022
|
-
'crispEdges'|
|
|
1023
|
-
'pixelated';
|
|
962
|
+
export type ImageRendering = 'optimizeQuality' | 'optimizeSpeed' | 'smooth' | 'highQuality' | 'crispEdges' | 'pixelated'
|
|
1024
963
|
|
|
1025
964
|
/** The payload-free variants of `Input`. */
|
|
1026
965
|
export interface InputPlain {
|
|
@@ -1154,8 +1093,7 @@ export interface KindTurbulence {
|
|
|
1154
1093
|
}
|
|
1155
1094
|
|
|
1156
1095
|
/** A length adjust property. */
|
|
1157
|
-
export type LengthAdjust =
|
|
1158
|
-
'spacingAndGlyphs';
|
|
1096
|
+
export type LengthAdjust = 'spacing' | 'spacingAndGlyphs'
|
|
1159
1097
|
|
|
1160
1098
|
/** `LightSource::DistantLight`. */
|
|
1161
1099
|
export interface LightSourceDistantLight {
|
|
@@ -1183,23 +1121,17 @@ export interface LightSourceSpotLight {
|
|
|
1183
1121
|
*
|
|
1184
1122
|
* `stroke-linecap` attribute in the SVG.
|
|
1185
1123
|
*/
|
|
1186
|
-
export type LineCap =
|
|
1187
|
-
'round'|
|
|
1188
|
-
'square';
|
|
1124
|
+
export type LineCap = 'butt' | 'round' | 'square'
|
|
1189
1125
|
|
|
1190
1126
|
/**
|
|
1191
1127
|
* A line join.
|
|
1192
1128
|
*
|
|
1193
1129
|
* `stroke-linejoin` attribute in the SVG.
|
|
1194
1130
|
*/
|
|
1195
|
-
export type LineJoin =
|
|
1196
|
-
'miterClip'|
|
|
1197
|
-
'round'|
|
|
1198
|
-
'bevel';
|
|
1131
|
+
export type LineJoin = 'miter' | 'miterClip' | 'round' | 'bevel'
|
|
1199
1132
|
|
|
1200
1133
|
/** A mask type. */
|
|
1201
|
-
export type MaskType =
|
|
1202
|
-
'alpha';
|
|
1134
|
+
export type MaskType = 'luminance' | 'alpha'
|
|
1203
1135
|
|
|
1204
1136
|
/**
|
|
1205
1137
|
* An affine transform. Field names and order are tiny-skia's.
|
|
@@ -1234,14 +1166,10 @@ export interface Morphology {
|
|
|
1234
1166
|
}
|
|
1235
1167
|
|
|
1236
1168
|
/** A morphology operation. */
|
|
1237
|
-
export type MorphologyOperator =
|
|
1238
|
-
'dilate';
|
|
1169
|
+
export type MorphologyOperator = 'erode' | 'dilate'
|
|
1239
1170
|
|
|
1240
1171
|
/** Which flavour of node this is. */
|
|
1241
|
-
export type NodeKind =
|
|
1242
|
-
'path'|
|
|
1243
|
-
'image'|
|
|
1244
|
-
'text';
|
|
1172
|
+
export type NodeKind = 'group' | 'path' | 'image' | 'text'
|
|
1245
1173
|
|
|
1246
1174
|
/** Plain view of a `Offset`. */
|
|
1247
1175
|
export interface Offset {
|
|
@@ -1272,8 +1200,7 @@ export interface PaintLinearGradient {
|
|
|
1272
1200
|
*
|
|
1273
1201
|
* [`paint-order`]: https://www.w3.org/TR/SVG2/painting.html#PaintOrder
|
|
1274
1202
|
*/
|
|
1275
|
-
export type PaintOrder =
|
|
1276
|
-
'strokeAndFill';
|
|
1203
|
+
export type PaintOrder = 'fillAndStroke' | 'strokeAndFill'
|
|
1277
1204
|
|
|
1278
1205
|
/** `Paint::Pattern`. */
|
|
1279
1206
|
export interface PaintPattern {
|
|
@@ -1479,9 +1406,7 @@ export declare function setLogLevel(level: 'off' | 'error' | 'warn' | 'info' | '
|
|
|
1479
1406
|
*
|
|
1480
1407
|
* `shape-rendering` attribute in the SVG.
|
|
1481
1408
|
*/
|
|
1482
|
-
export type ShapeRendering =
|
|
1483
|
-
'crispEdges'|
|
|
1484
|
-
'geometricPrecision';
|
|
1409
|
+
export type ShapeRendering = 'optimizeSpeed' | 'crispEdges' | 'geometricPrecision'
|
|
1485
1410
|
|
|
1486
1411
|
/** Plain view of a `SpecularLighting`. */
|
|
1487
1412
|
export interface SpecularLighting {
|
|
@@ -1510,9 +1435,7 @@ export interface SpotLight {
|
|
|
1510
1435
|
*
|
|
1511
1436
|
* `spreadMethod` attribute in the SVG.
|
|
1512
1437
|
*/
|
|
1513
|
-
export type SpreadMethod =
|
|
1514
|
-
'reflect'|
|
|
1515
|
-
'repeat';
|
|
1438
|
+
export type SpreadMethod = 'pad' | 'reflect' | 'repeat'
|
|
1516
1439
|
|
|
1517
1440
|
/** Plain view of a `Stop`. */
|
|
1518
1441
|
export interface Stop {
|
|
@@ -1537,9 +1460,7 @@ export interface Stroke {
|
|
|
1537
1460
|
export declare function takeLogs(): Array<string>
|
|
1538
1461
|
|
|
1539
1462
|
/** A text chunk anchor property. */
|
|
1540
|
-
export type TextAnchor =
|
|
1541
|
-
'middle'|
|
|
1542
|
-
'end';
|
|
1463
|
+
export type TextAnchor = 'start' | 'middle' | 'end'
|
|
1543
1464
|
|
|
1544
1465
|
/** Plain view of a `TextDecoration`. */
|
|
1545
1466
|
export interface TextDecoration {
|
|
@@ -1572,9 +1493,7 @@ export interface TextFlowPlain {
|
|
|
1572
1493
|
*
|
|
1573
1494
|
* `text-rendering` attribute in the SVG.
|
|
1574
1495
|
*/
|
|
1575
|
-
export type TextRendering =
|
|
1576
|
-
'optimizeLegibility'|
|
|
1577
|
-
'geometricPrecision';
|
|
1496
|
+
export type TextRendering = 'optimizeSpeed' | 'optimizeLegibility' | 'geometricPrecision'
|
|
1578
1497
|
|
|
1579
1498
|
/** Plain view of a `Tile`. */
|
|
1580
1499
|
export interface Tile {
|
|
@@ -1629,8 +1548,7 @@ export interface Turbulence {
|
|
|
1629
1548
|
}
|
|
1630
1549
|
|
|
1631
1550
|
/** A turbulence kind for the `feTurbulence` filter. */
|
|
1632
|
-
export type TurbulenceKind =
|
|
1633
|
-
'turbulence';
|
|
1551
|
+
export type TurbulenceKind = 'fractalNoise' | 'turbulence'
|
|
1634
1552
|
|
|
1635
1553
|
/**
|
|
1636
1554
|
* Mirror of `usvg::WriteOptions`, for `Resvg.toString()`. Every field is
|
|
@@ -1684,5 +1602,4 @@ export interface WriteOptions {
|
|
|
1684
1602
|
}
|
|
1685
1603
|
|
|
1686
1604
|
/** A writing mode. */
|
|
1687
|
-
export type WritingMode =
|
|
1688
|
-
'topToBottom';
|
|
1605
|
+
export type WritingMode = 'leftToRight' | 'topToBottom'
|