modern-text 2.0.1 → 2.0.3
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/README.md +5 -4
- package/dist/deformations/index.d.cts +2 -2
- package/dist/deformations/index.d.mts +2 -2
- package/dist/deformations/index.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -6
- package/dist/index.mjs +2 -2
- package/dist/shared/{modern-text.EUexrM_5.mjs → modern-text.BZDfPcWk.mjs} +1 -1
- package/dist/shared/{modern-text.DYc0f8rj.d.mts → modern-text.BZegXnct.d.cts} +1 -1
- package/dist/shared/{modern-text.9z5yZjKR.cjs → modern-text.BZmgmU_p.cjs} +1 -1
- package/dist/shared/{modern-text.C6VOXPvn.d.cts → modern-text.D7MgNoyD.d.cts} +1 -1
- package/dist/shared/{modern-text.C6VOXPvn.d.mts → modern-text.D7MgNoyD.d.mts} +1 -1
- package/dist/shared/{modern-text.C6VOXPvn.d.ts → modern-text.D7MgNoyD.d.ts} +1 -1
- package/dist/shared/{modern-text.i19sSLm-.d.ts → modern-text.DjrdQUs8.d.ts} +1 -1
- package/dist/shared/{modern-text.c9v5Qvut.d.cts → modern-text.iF9i8B86.d.mts} +1 -1
- package/dist/web-components/index.cjs +1 -1
- package/dist/web-components/index.d.cts +1 -1
- package/dist/web-components/index.d.mts +1 -1
- package/dist/web-components/index.d.ts +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Text } from './shared/modern-text.
|
|
2
|
-
export { C as Canvas2DRenderer, a as Character, D as DomMeasurer, F as FontMeasurer, b as Fragment, P as Paragraph, c as backgroundPlugin, d as createSvgLoader, e as createSvgParser, g as getEffectTransform2D, f as getHighlightStyle, h as highlightPlugin, i as isEqualObject, j as isEqualValue, l as listStylePlugin, o as outlinePlugin, p as parseColormap, k as parseTransformOrigin, m as parseValueNumber, r as renderPlugin, t as textDecorationPlugin, n as textDefaultStyle } from './shared/modern-text.
|
|
1
|
+
import { T as Text } from './shared/modern-text.BZDfPcWk.mjs';
|
|
2
|
+
export { C as Canvas2DRenderer, a as Character, D as DomMeasurer, F as FontMeasurer, b as Fragment, P as Paragraph, c as backgroundPlugin, d as createSvgLoader, e as createSvgParser, g as getEffectTransform2D, f as getHighlightStyle, h as highlightPlugin, i as isEqualObject, j as isEqualValue, l as listStylePlugin, o as outlinePlugin, p as parseColormap, k as parseTransformOrigin, m as parseValueNumber, r as renderPlugin, t as textDecorationPlugin, n as textDefaultStyle } from './shared/modern-text.BZDfPcWk.mjs';
|
|
3
3
|
export { d as defineDeformation, a as definePlugin, b as deformationPlugin, g as getDeformationNames, r as removeDeformation } from './shared/modern-text.JF1ny7A-.mjs';
|
|
4
4
|
export { C as CircleCurve, E as EllipseCurve, H as HeartCurve, P as PolygonCurve, R as RectangularCurve } from './shared/modern-text.fT17R5HY.mjs';
|
|
5
5
|
import 'modern-font';
|
|
@@ -2143,7 +2143,7 @@ class Text extends Reactivable {
|
|
|
2143
2143
|
if (options.measurer && typeof options.measurer !== "string") {
|
|
2144
2144
|
this.measurer = options.measurer;
|
|
2145
2145
|
} else {
|
|
2146
|
-
const kind = options.measurer ??
|
|
2146
|
+
const kind = options.measurer ?? "font";
|
|
2147
2147
|
this.measurer = kind === "font" ? new FontMeasurer() : new DomMeasurer();
|
|
2148
2148
|
}
|
|
2149
2149
|
this.debug = options.debug ?? false;
|
|
@@ -2145,7 +2145,7 @@ class Text extends modernIdoc.Reactivable {
|
|
|
2145
2145
|
if (options.measurer && typeof options.measurer !== "string") {
|
|
2146
2146
|
this.measurer = options.measurer;
|
|
2147
2147
|
} else {
|
|
2148
|
-
const kind = options.measurer ??
|
|
2148
|
+
const kind = options.measurer ?? "font";
|
|
2149
2149
|
this.measurer = kind === "font" ? new FontMeasurer() : new DomMeasurer();
|
|
2150
2150
|
}
|
|
2151
2151
|
this.debug = options.debug ?? false;
|
|
@@ -194,7 +194,7 @@ interface Options extends TextObject {
|
|
|
194
194
|
plugins?: Plugin[];
|
|
195
195
|
/**
|
|
196
196
|
* Layout backend: `'font'` (pure-JS) or `'dom'` (browser), or a custom
|
|
197
|
-
* `TextMeasurer`. Defaults to `'font'
|
|
197
|
+
* `TextMeasurer`. Defaults to `'font'`.
|
|
198
198
|
*/
|
|
199
199
|
measurer?: MeasurerKind | TextMeasurer;
|
|
200
200
|
}
|
|
@@ -194,7 +194,7 @@ interface Options extends TextObject {
|
|
|
194
194
|
plugins?: Plugin[];
|
|
195
195
|
/**
|
|
196
196
|
* Layout backend: `'font'` (pure-JS) or `'dom'` (browser), or a custom
|
|
197
|
-
* `TextMeasurer`. Defaults to `'font'
|
|
197
|
+
* `TextMeasurer`. Defaults to `'font'`.
|
|
198
198
|
*/
|
|
199
199
|
measurer?: MeasurerKind | TextMeasurer;
|
|
200
200
|
}
|
|
@@ -194,7 +194,7 @@ interface Options extends TextObject {
|
|
|
194
194
|
plugins?: Plugin[];
|
|
195
195
|
/**
|
|
196
196
|
* Layout backend: `'font'` (pure-JS) or `'dom'` (browser), or a custom
|
|
197
|
-
* `TextMeasurer`. Defaults to `'font'
|
|
197
|
+
* `TextMeasurer`. Defaults to `'font'`.
|
|
198
198
|
*/
|
|
199
199
|
measurer?: MeasurerKind | TextMeasurer;
|
|
200
200
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const diff = require('diff');
|
|
4
4
|
const modernIdoc = require('modern-idoc');
|
|
5
|
-
const Text = require('../shared/modern-text.
|
|
5
|
+
const Text = require('../shared/modern-text.BZmgmU_p.cjs');
|
|
6
6
|
require('modern-font');
|
|
7
7
|
require('modern-path2d');
|
|
8
8
|
require('../shared/modern-text.B2xfrqDc.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { diffChars } from 'diff';
|
|
2
2
|
import { isCRLF, textContentToString, normalizeCRLF, normalizeTextContent, property } from 'modern-idoc';
|
|
3
|
-
import { T as Text } from '../shared/modern-text.
|
|
3
|
+
import { T as Text } from '../shared/modern-text.BZDfPcWk.mjs';
|
|
4
4
|
import 'modern-font';
|
|
5
5
|
import 'modern-path2d';
|
|
6
6
|
import '../shared/modern-text.JF1ny7A-.mjs';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-text",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"packageManager": "pnpm@10.18.1",
|
|
6
6
|
"description": "Measure and render text in a way that describes the DOM.",
|
|
7
7
|
"author": "wxm",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"diff": "^9.0.0",
|
|
63
63
|
"modern-font": "^0.6.0",
|
|
64
64
|
"modern-idoc": "^0.11.5",
|
|
65
|
-
"modern-path2d": "^1.
|
|
65
|
+
"modern-path2d": "^1.7.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@antfu/eslint-config": "^9.0.0",
|