@weasel-js/svg 1.9.3 → 1.9.4
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 +17 -3
- package/dist/index.js +916 -623
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mat3 } from '@weasel-js/geom';
|
|
2
|
-
import { Path, FillStyle, ScreenLength, StrokeAlign, MarkerRef, StyledRun, TextStyle, TextVerticalAlign, Stroke, MarkerEntry, RenderNeeds, TilePatternSpec, ImageNodeData, IngestCtx } from '@weasel-js/core';
|
|
2
|
+
import { Path, FillStyle, ScreenLength, StrokeAlign, MarkerRef, StyledRun, TextStyle, TextVerticalAlign, Stroke, PoseLinear, MarkerEntry, RenderNeeds, TilePatternSpec, ImageNodeData, IngestCtx } from '@weasel-js/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Media Queries 4 evaluation against a fixed environment.
|
|
@@ -235,6 +235,11 @@ interface SvgTextNode {
|
|
|
235
235
|
* AABB center `(x + width/2, y + height/2)`. Emitted as SVG
|
|
236
236
|
* `transform="rotate(angleDegrees cx cy)"`. */
|
|
237
237
|
rotation?: number;
|
|
238
|
+
/** The skew or per-axis scale the box, `rotation`, and flips cannot hold,
|
|
239
|
+
* applied about the box center inside the rotation; see `PoseLinear`.
|
|
240
|
+
* With one, the element is written with its whole frame as a
|
|
241
|
+
* `transform="matrix(...)"`. */
|
|
242
|
+
transform?: PoseLinear;
|
|
238
243
|
/** Opaque per-element bag for declared namespaces. See `NamespaceMeta`. */
|
|
239
244
|
meta?: NamespaceMeta;
|
|
240
245
|
}
|
|
@@ -279,6 +284,11 @@ interface SvgImageNode {
|
|
|
279
284
|
* AABB center `(x + width/2, y + height/2)`. Emitted as SVG
|
|
280
285
|
* `transform="rotate(angleDegrees cx cy)"`. */
|
|
281
286
|
rotation?: number;
|
|
287
|
+
/** The skew or per-axis scale the box, `rotation`, and flips cannot hold,
|
|
288
|
+
* applied about the box center inside the rotation; see `PoseLinear`.
|
|
289
|
+
* With one, the element is written with its whole frame as a
|
|
290
|
+
* `transform="matrix(...)"`. */
|
|
291
|
+
transform?: PoseLinear;
|
|
282
292
|
/** Opaque per-element bag for declared namespaces. See `NamespaceMeta`. */
|
|
283
293
|
meta?: NamespaceMeta;
|
|
284
294
|
}
|
|
@@ -321,9 +331,9 @@ interface ParseResult {
|
|
|
321
331
|
width: number;
|
|
322
332
|
height: number;
|
|
323
333
|
};
|
|
324
|
-
/** Root `width` attribute,
|
|
334
|
+
/** Root `width` attribute in user units when present, an absolute CSS unit converted at 96 per inch. */
|
|
325
335
|
width?: number;
|
|
326
|
-
/** Root `height` attribute
|
|
336
|
+
/** Root `height` attribute in user units when present, converted as `width` is. */
|
|
327
337
|
height?: number;
|
|
328
338
|
/** Text content of the first `<title>` child of `<svg>`, when present. */
|
|
329
339
|
title?: string;
|
|
@@ -473,6 +483,7 @@ declare function tilePreviewCssUrl(spec: TilePatternSpec, background?: string):
|
|
|
473
483
|
* honor the declaration ({@link isDeclarationHonored}), not whether a browser
|
|
474
484
|
* could parse it — the answer decides whether the guarded rules apply here.
|
|
475
485
|
*/
|
|
486
|
+
/** Options for evaluating a `@supports` condition. */
|
|
476
487
|
interface SupportsOptions {
|
|
477
488
|
/** Answers `selector(…)`; without it every selector test is false. */
|
|
478
489
|
readonly selector?: (selector: string) => boolean;
|
|
@@ -500,6 +511,8 @@ interface SvgKitPose {
|
|
|
500
511
|
width: number;
|
|
501
512
|
height: number;
|
|
502
513
|
rotation?: number;
|
|
514
|
+
/** Read for text and image leaves only; a path leaf's is not written. */
|
|
515
|
+
transform?: PoseLinear;
|
|
503
516
|
}
|
|
504
517
|
/** The leaf data the kit's path, text and image painters read — what
|
|
505
518
|
* `svgNodesToKitDrafts` writes. */
|
|
@@ -574,6 +587,7 @@ interface SvgDraftBounds {
|
|
|
574
587
|
}
|
|
575
588
|
type DraftPose = SvgDraftBounds & {
|
|
576
589
|
rotation?: number;
|
|
590
|
+
transform?: PoseLinear;
|
|
577
591
|
};
|
|
578
592
|
/**
|
|
579
593
|
* One node the unpack wants the scene to materialize, in parent-before-child
|