@rasamjs/core 0.1.1 → 0.1.2
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/CHANGELOG.md +13 -1
- package/README.md +1 -1
- package/RELEASING.md +13 -10
- package/dist/changes/restore.js +2 -0
- package/dist/changes/restore.js.map +1 -1
- package/dist/elements/text.js +4 -4
- package/dist/elements/text.js.map +1 -1
- package/dist/text/rich-textual.js +3 -3
- package/dist/text/rich-textual.js.map +1 -1
- package/package.json +1 -1
- package/reports/adoption.json +20 -20
- package/reports/animation-benchmark.json +617 -617
- package/reports/benchmark.json +42 -42
- package/reports/creation.json +26 -26
- package/reports/interchange-benchmark.json +85 -85
- package/reports/size-parity.json +4 -4
- package/reports/svgjs-comparison.json +3245 -3245
- package/reports/svgjs-comparison.md +17 -17
- package/reports/svgjs-parity-current.json +16 -19
- package/src/changes/restore.ts +2 -0
- package/src/elements/text.ts +3 -3
- package/src/text/rich-textual.ts +2 -2
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
# Rasam vs SVG.js
|
|
2
2
|
|
|
3
|
-
SVG.js 3.2.8; Rasam 0.1.
|
|
3
|
+
SVG.js 3.2.8; Rasam 0.1.2 workspace. CPU: Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz.
|
|
4
4
|
|
|
5
5
|
All timings below are medians in milliseconds. Ratios above 1 mean Rasam took longer.
|
|
6
6
|
|
|
7
7
|
| Browser | Workload | Nodes | Samples | Rasam | SVG.js | Rasam / SVG.js |
|
|
8
8
|
| --- | --- | ---: | ---: | ---: | ---: | ---: |
|
|
9
|
-
| chromium 156.0.8078.4 | creation | 2000 | 15 |
|
|
10
|
-
| chromium 156.0.8078.4 | creation | 8000 | 15 |
|
|
11
|
-
| chromium 156.0.8078.4 | fill | 1000 | 100 | 0.
|
|
12
|
-
| chromium 156.0.8078.4 | repeated-fill | 1000 | 100 | 0.
|
|
13
|
-
| chromium 156.0.8078.4 | pointer-one | 8000 | 40 |
|
|
14
|
-
| chromium 156.0.8078.4 | pointer-all | 8000 | 40 | 4.
|
|
15
|
-
| firefox 157.0 | creation | 2000 | 15 | 23.00 |
|
|
16
|
-
| firefox 157.0 | creation | 8000 | 15 |
|
|
17
|
-
| firefox 157.0 | fill | 1000 | 100 | 1.
|
|
18
|
-
| firefox 157.0 | repeated-fill | 1000 | 100 | 1.
|
|
19
|
-
| firefox 157.0 | pointer-one | 8000 | 40 | 4.
|
|
20
|
-
| firefox 157.0 | pointer-all | 8000 | 40 | 4.
|
|
21
|
-
| webkit 27.2 | creation | 2000 | 15 | 15.00 |
|
|
22
|
-
| webkit 27.2 | creation | 8000 | 15 |
|
|
9
|
+
| chromium 156.0.8078.4 | creation | 2000 | 15 | 9.70 | 12.20 | 0.80 |
|
|
10
|
+
| chromium 156.0.8078.4 | creation | 8000 | 15 | 36.50 | 45.10 | 0.81 |
|
|
11
|
+
| chromium 156.0.8078.4 | fill | 1000 | 100 | 0.50 | 1.39 | 0.36 |
|
|
12
|
+
| chromium 156.0.8078.4 | repeated-fill | 1000 | 100 | 0.71 | 4.23 | 0.17 |
|
|
13
|
+
| chromium 156.0.8078.4 | pointer-one | 8000 | 40 | 4.00 | 3.82 | 1.05 |
|
|
14
|
+
| chromium 156.0.8078.4 | pointer-all | 8000 | 40 | 4.02 | 3.80 | 1.06 |
|
|
15
|
+
| firefox 157.0 | creation | 2000 | 15 | 23.00 | 25.00 | 0.92 |
|
|
16
|
+
| firefox 157.0 | creation | 8000 | 15 | 93.00 | 85.00 | 1.09 |
|
|
17
|
+
| firefox 157.0 | fill | 1000 | 100 | 1.20 | 1.60 | 0.75 |
|
|
18
|
+
| firefox 157.0 | repeated-fill | 1000 | 100 | 1.70 | 5.00 | 0.34 |
|
|
19
|
+
| firefox 157.0 | pointer-one | 8000 | 40 | 4.40 | 3.80 | 1.16 |
|
|
20
|
+
| firefox 157.0 | pointer-all | 8000 | 40 | 4.60 | 3.80 | 1.21 |
|
|
21
|
+
| webkit 27.2 | creation | 2000 | 15 | 15.00 | 20.00 | 0.75 |
|
|
22
|
+
| webkit 27.2 | creation | 8000 | 15 | 56.00 | 73.00 | 0.77 |
|
|
23
23
|
| webkit 27.2 | fill | 1000 | 100 | 0.70 | 1.80 | 0.39 |
|
|
24
|
-
| webkit 27.2 | repeated-fill | 1000 | 100 | 1.
|
|
24
|
+
| webkit 27.2 | repeated-fill | 1000 | 100 | 1.35 | 6.85 | 0.20 |
|
|
25
25
|
| webkit 27.2 | pointer-one | 8000 | 40 | 4.40 | 3.60 | 1.22 |
|
|
26
|
-
| webkit 27.2 | pointer-all | 8000 | 40 | 4.
|
|
26
|
+
| webkit 27.2 | pointer-all | 8000 | 40 | 4.20 | 3.60 | 1.17 |
|
|
27
27
|
|
|
28
28
|
## Methodology
|
|
29
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-
|
|
3
|
-
"revision": "
|
|
2
|
+
"generatedAt": "2026-11-02T00:13:40.368Z",
|
|
3
|
+
"revision": "cf520e325957ab98952540b7234db122a672d9ed",
|
|
4
4
|
"dirtyTree": [
|
|
5
5
|
"M packages/rasam/reports/adoption.json",
|
|
6
6
|
" M packages/rasam/reports/creation.json",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"path": "src/changes/restore.ts",
|
|
88
|
-
"sha256": "
|
|
88
|
+
"sha256": "a8ab84b53c4b11771af26f64e17c341862c6582756a3158796137c9c3f4ce47f"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"path": "src/changes/service.ts",
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"path": "src/elements/text.ts",
|
|
292
|
-
"sha256": "
|
|
292
|
+
"sha256": "0d42353408aed12961785ac6dfff511b62ec76df77d075768cfbd138abc6e820"
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
295
|
"path": "src/elements/tspan.ts",
|
|
@@ -601,7 +601,7 @@
|
|
|
601
601
|
},
|
|
602
602
|
{
|
|
603
603
|
"path": "src/text/rich-textual.ts",
|
|
604
|
-
"sha256": "
|
|
604
|
+
"sha256": "52dce3a3bb91da57261dec67b8682c020bbe1ea0f22eea7aa1c02e386eb610d2"
|
|
605
605
|
},
|
|
606
606
|
{
|
|
607
607
|
"path": "src/text/types.ts",
|
|
@@ -653,7 +653,7 @@
|
|
|
653
653
|
},
|
|
654
654
|
{
|
|
655
655
|
"path": "../../package-lock.json",
|
|
656
|
-
"sha256": "
|
|
656
|
+
"sha256": "a9244a1f25a62dc4fd328605dbb09b0639edaaa42939757fdfbccc7cdea963f6"
|
|
657
657
|
}
|
|
658
658
|
],
|
|
659
659
|
"svgjs": "3.2.8",
|
|
@@ -9660,7 +9660,7 @@
|
|
|
9660
9660
|
},
|
|
9661
9661
|
"performance": {
|
|
9662
9662
|
"fixture": "scripts/benchmark.mjs",
|
|
9663
|
-
"date": "2026-
|
|
9663
|
+
"date": "2026-11-02T00:13:34.754Z",
|
|
9664
9664
|
"browser": "Chromium 156.0.8078.4",
|
|
9665
9665
|
"node": "v24.21.0",
|
|
9666
9666
|
"os": "win32 10.0.26200",
|
|
@@ -9669,31 +9669,28 @@
|
|
|
9669
9669
|
"count": 1000,
|
|
9670
9670
|
"warmup": 20,
|
|
9671
9671
|
"iterations": 100,
|
|
9672
|
-
"medianMs": 0.
|
|
9673
|
-
"p95Ms": 0.
|
|
9672
|
+
"medianMs": 0.5,
|
|
9673
|
+
"p95Ms": 0.699999988079071,
|
|
9674
9674
|
"targetMedianMs": 16,
|
|
9675
9675
|
"includes": "logical mutations and synchronous DOM commit; excludes paint",
|
|
9676
9676
|
"timings": [
|
|
9677
|
+
0.3999999761581421, 0.3999999761581421, 0.3999999761581421, 0.3999999761581421,
|
|
9678
|
+
0.3999999761581421, 0.3999999761581421, 0.3999999761581421, 0.3999999761581421,
|
|
9679
|
+
0.3999999761581421, 0.3999999761581421, 0.40000003576278687, 0.40000003576278687,
|
|
9680
|
+
0.40000003576278687, 0.40000003576278687, 0.40000003576278687, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
|
|
9677
9681
|
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
|
|
9678
|
-
0.5, 0.5, 0.
|
|
9682
|
+
0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
|
|
9679
9683
|
0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
|
|
9680
9684
|
0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
|
|
9681
9685
|
0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.5999999642372131,
|
|
9682
|
-
0.5999999642372131, 0.5999999642372131, 0.5999999642372131, 0.6000000238418579,
|
|
9683
9686
|
0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
|
|
9684
9687
|
0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
|
|
9685
9688
|
0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
|
|
9686
9689
|
0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
|
|
9687
9690
|
0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 0.6000000238418579,
|
|
9688
|
-
0.6000000238418579, 0.699999988079071, 0.699999988079071, 0.699999988079071,
|
|
9689
9691
|
0.699999988079071, 0.699999988079071, 0.699999988079071, 0.699999988079071, 0.699999988079071,
|
|
9690
|
-
0.
|
|
9691
|
-
|
|
9692
|
-
0.7000000476837158, 0.7000000476837158, 0.7999999523162842, 0.800000011920929,
|
|
9693
|
-
0.800000011920929, 0.800000011920929, 0.800000011920929, 0.800000011920929, 0.800000011920929,
|
|
9694
|
-
0.800000011920929, 0.800000011920929, 0.8999999761581421, 0.8999999761581421,
|
|
9695
|
-
0.8999999761581421, 0.9000000357627869, 0.9000000357627869, 1, 1, 1.100000023841858,
|
|
9696
|
-
1.199999988079071, 1.4000000357627869
|
|
9692
|
+
0.7000000476837158, 0.7000000476837158, 0.800000011920929, 1.0999999642372131,
|
|
9693
|
+
1.399999976158142
|
|
9697
9694
|
]
|
|
9698
9695
|
}
|
|
9699
9696
|
}
|
package/src/changes/restore.ts
CHANGED
package/src/elements/text.ts
CHANGED
|
@@ -63,10 +63,10 @@ export class Text extends TextBase<SVGTextElement, TextAttributes> {
|
|
|
63
63
|
leading(): number;
|
|
64
64
|
leading(value: number): this;
|
|
65
65
|
leading(value?: number): number | this {
|
|
66
|
+
this.assertLive();
|
|
67
|
+
const content = contentFor(this);
|
|
68
|
+
if (value === undefined) return content.leading;
|
|
66
69
|
return mutation(this, () => {
|
|
67
|
-
this.assertLive();
|
|
68
|
-
const content = contentFor(this);
|
|
69
|
-
if (value === undefined) return content.leading;
|
|
70
70
|
if (!Number.isFinite(value) || value < 0)
|
|
71
71
|
throw new RangeError('Leading must be finite and nonnegative');
|
|
72
72
|
content.leading = value;
|
package/src/text/rich-textual.ts
CHANGED
|
@@ -65,9 +65,9 @@ export const RichTextual: MixinFactory<RichTextFeature, ParentNode> = (BaseClass
|
|
|
65
65
|
text(): string;
|
|
66
66
|
text(value: string): this;
|
|
67
67
|
text(value?: string): string | this {
|
|
68
|
+
this.assertLive();
|
|
69
|
+
if (value === undefined) return this.#content.text();
|
|
68
70
|
return mutation(this, () => {
|
|
69
|
-
this.assertLive();
|
|
70
|
-
if (value === undefined) return this.#content.text();
|
|
71
71
|
this.#content.plain(value);
|
|
72
72
|
return this;
|
|
73
73
|
});
|