modern-text 1.6.4 → 1.7.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/dist/index.cjs +7 -7
- package/dist/index.d.cts +12 -12
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +6 -6
- package/dist/index.mjs +2 -2
- package/dist/shared/{modern-text.BkGahE0H.d.cts → modern-text.BExNokxh.d.cts} +32 -23
- package/dist/shared/{modern-text.BkGahE0H.d.mts → modern-text.BExNokxh.d.mts} +32 -23
- package/dist/shared/{modern-text.BkGahE0H.d.ts → modern-text.BExNokxh.d.ts} +32 -23
- package/dist/shared/{modern-text.Dr7A9mkS.cjs → modern-text.DRQ7O0S3.cjs} +99 -52
- package/dist/shared/{modern-text.BlKjdf2Q.mjs → modern-text.dDnrIDEG.mjs} +95 -48
- package/dist/web-components/index.cjs +2 -2
- 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 +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const Text = require('./shared/modern-text.
|
|
3
|
+
const Text = require('./shared/modern-text.DRQ7O0S3.cjs');
|
|
4
4
|
require('modern-idoc');
|
|
5
5
|
require('modern-path2d');
|
|
6
6
|
require('modern-font');
|
|
@@ -30,7 +30,7 @@ exports.Fragment = Text.Fragment;
|
|
|
30
30
|
exports.Measurer = Text.Measurer;
|
|
31
31
|
exports.Paragraph = Text.Paragraph;
|
|
32
32
|
exports.Text = Text.Text;
|
|
33
|
-
exports.
|
|
33
|
+
exports.backgroundPlugin = Text.backgroundPlugin;
|
|
34
34
|
exports.createSVGLoader = Text.createSVGLoader;
|
|
35
35
|
exports.createSVGParser = Text.createSVGParser;
|
|
36
36
|
exports.definePlugin = Text.definePlugin;
|
|
@@ -39,17 +39,17 @@ exports.filterEmpty = Text.filterEmpty;
|
|
|
39
39
|
exports.getHighlightStyle = Text.getHighlightStyle;
|
|
40
40
|
exports.getTransform2D = Text.getTransform2D;
|
|
41
41
|
exports.hexToRgb = Text.hexToRgb;
|
|
42
|
-
exports.
|
|
42
|
+
exports.highlightPlugin = Text.highlightPlugin;
|
|
43
43
|
exports.isEqualObject = Text.isEqualObject;
|
|
44
44
|
exports.isEqualValue = Text.isEqualValue;
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
45
|
+
exports.listStylePlugin = Text.listStylePlugin;
|
|
46
|
+
exports.outlinePlugin = Text.outlinePlugin;
|
|
47
47
|
exports.parseColor = Text.parseColor;
|
|
48
48
|
exports.parseColormap = Text.parseColormap;
|
|
49
49
|
exports.parseValueNumber = Text.parseValueNumber;
|
|
50
|
-
exports.
|
|
50
|
+
exports.renderPlugin = Text.renderPlugin;
|
|
51
51
|
exports.setupView = Text.setupView;
|
|
52
|
-
exports.
|
|
52
|
+
exports.textDecorationPlugin = Text.textDecorationPlugin;
|
|
53
53
|
exports.textDefaultStyle = Text.textDefaultStyle;
|
|
54
54
|
exports.uploadColor = Text.uploadColor;
|
|
55
55
|
exports.uploadColors = Text.uploadColors;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NormalizedStyle, NormalizedHighlight } from 'modern-idoc';
|
|
2
2
|
import { BoundingBox, Path2DDrawStyle, Path2D, Matrix3, Path2DSet } from 'modern-path2d';
|
|
3
|
-
import { T as Text, a as TextPlugin, b as TextOptions, M as MeasureResult, c as TextRenderOptions } from './shared/modern-text.
|
|
4
|
-
export { C as Character, F as Fragment, f as MeasuredCharacter, e as MeasuredFragment, d as MeasuredParagraph, g as Measurer, P as Paragraph, h as TextEventMap, m as measureDOMResult, t as textDefaultStyle } from './shared/modern-text.
|
|
3
|
+
import { T as Text, a as TextPlugin, b as TextOptions, M as MeasureResult, c as TextRenderOptions } from './shared/modern-text.BExNokxh.cjs';
|
|
4
|
+
export { C as Character, F as Fragment, f as MeasuredCharacter, e as MeasuredFragment, d as MeasuredParagraph, g as Measurer, P as Paragraph, h as TextEventMap, m as measureDOMResult, t as textDefaultStyle } from './shared/modern-text.BExNokxh.cjs';
|
|
5
5
|
import 'modern-font';
|
|
6
6
|
|
|
7
7
|
declare function parseColor(ctx: CanvasRenderingContext2D, source: string | CanvasGradient | CanvasPattern, box: BoundingBox): string | CanvasGradient | CanvasPattern;
|
|
8
|
-
declare function uploadColor(style:
|
|
8
|
+
declare function uploadColor(style: NormalizedStyle, box: BoundingBox, ctx: CanvasRenderingContext2D): void;
|
|
9
9
|
interface LinearGradient {
|
|
10
10
|
x0: number;
|
|
11
11
|
y0: number;
|
|
@@ -17,7 +17,7 @@ interface LinearGradient {
|
|
|
17
17
|
}[];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
interface DrawShapePathsOptions extends
|
|
20
|
+
interface DrawShapePathsOptions extends NormalizedStyle, Omit<Partial<Path2DDrawStyle>, 'fill' | 'outline'> {
|
|
21
21
|
ctx: CanvasRenderingContext2D;
|
|
22
22
|
path: Path2D;
|
|
23
23
|
fontSize: number;
|
|
@@ -38,19 +38,19 @@ type RenderTextOptions = TextOptions & TextRenderOptions;
|
|
|
38
38
|
declare function renderText(options: RenderTextOptions, load: true): Promise<void>;
|
|
39
39
|
declare function renderText(options: RenderTextOptions): void;
|
|
40
40
|
|
|
41
|
-
declare function
|
|
41
|
+
declare function backgroundPlugin(): TextPlugin;
|
|
42
42
|
|
|
43
43
|
declare function getHighlightStyle(style: NormalizedStyle): NormalizedHighlight;
|
|
44
|
-
declare function
|
|
44
|
+
declare function highlightPlugin(): TextPlugin;
|
|
45
45
|
|
|
46
|
-
declare function
|
|
46
|
+
declare function listStylePlugin(): TextPlugin;
|
|
47
47
|
|
|
48
|
-
declare function
|
|
48
|
+
declare function outlinePlugin(): TextPlugin;
|
|
49
49
|
|
|
50
|
-
declare function
|
|
51
|
-
declare function getTransform2D(text: Text, style:
|
|
50
|
+
declare function renderPlugin(): TextPlugin;
|
|
51
|
+
declare function getTransform2D(text: Text, style: NormalizedStyle): Matrix3;
|
|
52
52
|
|
|
53
|
-
declare function
|
|
53
|
+
declare function textDecorationPlugin(): TextPlugin;
|
|
54
54
|
|
|
55
55
|
interface SVGLoader {
|
|
56
56
|
loaded: Map<string, string>;
|
|
@@ -82,5 +82,5 @@ declare function isEqualValue(val1: any, val2: any): boolean;
|
|
|
82
82
|
declare function hexToRgb(hex: string): string | null;
|
|
83
83
|
declare function filterEmpty(val: Record<string, any> | undefined): Record<string, any> | undefined;
|
|
84
84
|
|
|
85
|
-
export { MeasureResult, Text, TextOptions, TextPlugin, TextRenderOptions,
|
|
85
|
+
export { MeasureResult, Text, TextOptions, TextPlugin, TextRenderOptions, backgroundPlugin, createSVGLoader, createSVGParser, definePlugin, drawPath, filterEmpty, getHighlightStyle, getTransform2D, hexToRgb, highlightPlugin, isEqualObject, isEqualValue, listStylePlugin, measureText, outlinePlugin, parseColor, parseColormap, parseValueNumber, renderPlugin, renderText, setupView, textDecorationPlugin, uploadColor, uploadColors };
|
|
86
86
|
export type { DrawShapePathsOptions, LinearGradient, RenderTextOptions, SVGLoader, SVGParser };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NormalizedStyle, NormalizedHighlight } from 'modern-idoc';
|
|
2
2
|
import { BoundingBox, Path2DDrawStyle, Path2D, Matrix3, Path2DSet } from 'modern-path2d';
|
|
3
|
-
import { T as Text, a as TextPlugin, b as TextOptions, M as MeasureResult, c as TextRenderOptions } from './shared/modern-text.
|
|
4
|
-
export { C as Character, F as Fragment, f as MeasuredCharacter, e as MeasuredFragment, d as MeasuredParagraph, g as Measurer, P as Paragraph, h as TextEventMap, m as measureDOMResult, t as textDefaultStyle } from './shared/modern-text.
|
|
3
|
+
import { T as Text, a as TextPlugin, b as TextOptions, M as MeasureResult, c as TextRenderOptions } from './shared/modern-text.BExNokxh.mjs';
|
|
4
|
+
export { C as Character, F as Fragment, f as MeasuredCharacter, e as MeasuredFragment, d as MeasuredParagraph, g as Measurer, P as Paragraph, h as TextEventMap, m as measureDOMResult, t as textDefaultStyle } from './shared/modern-text.BExNokxh.mjs';
|
|
5
5
|
import 'modern-font';
|
|
6
6
|
|
|
7
7
|
declare function parseColor(ctx: CanvasRenderingContext2D, source: string | CanvasGradient | CanvasPattern, box: BoundingBox): string | CanvasGradient | CanvasPattern;
|
|
8
|
-
declare function uploadColor(style:
|
|
8
|
+
declare function uploadColor(style: NormalizedStyle, box: BoundingBox, ctx: CanvasRenderingContext2D): void;
|
|
9
9
|
interface LinearGradient {
|
|
10
10
|
x0: number;
|
|
11
11
|
y0: number;
|
|
@@ -17,7 +17,7 @@ interface LinearGradient {
|
|
|
17
17
|
}[];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
interface DrawShapePathsOptions extends
|
|
20
|
+
interface DrawShapePathsOptions extends NormalizedStyle, Omit<Partial<Path2DDrawStyle>, 'fill' | 'outline'> {
|
|
21
21
|
ctx: CanvasRenderingContext2D;
|
|
22
22
|
path: Path2D;
|
|
23
23
|
fontSize: number;
|
|
@@ -38,19 +38,19 @@ type RenderTextOptions = TextOptions & TextRenderOptions;
|
|
|
38
38
|
declare function renderText(options: RenderTextOptions, load: true): Promise<void>;
|
|
39
39
|
declare function renderText(options: RenderTextOptions): void;
|
|
40
40
|
|
|
41
|
-
declare function
|
|
41
|
+
declare function backgroundPlugin(): TextPlugin;
|
|
42
42
|
|
|
43
43
|
declare function getHighlightStyle(style: NormalizedStyle): NormalizedHighlight;
|
|
44
|
-
declare function
|
|
44
|
+
declare function highlightPlugin(): TextPlugin;
|
|
45
45
|
|
|
46
|
-
declare function
|
|
46
|
+
declare function listStylePlugin(): TextPlugin;
|
|
47
47
|
|
|
48
|
-
declare function
|
|
48
|
+
declare function outlinePlugin(): TextPlugin;
|
|
49
49
|
|
|
50
|
-
declare function
|
|
51
|
-
declare function getTransform2D(text: Text, style:
|
|
50
|
+
declare function renderPlugin(): TextPlugin;
|
|
51
|
+
declare function getTransform2D(text: Text, style: NormalizedStyle): Matrix3;
|
|
52
52
|
|
|
53
|
-
declare function
|
|
53
|
+
declare function textDecorationPlugin(): TextPlugin;
|
|
54
54
|
|
|
55
55
|
interface SVGLoader {
|
|
56
56
|
loaded: Map<string, string>;
|
|
@@ -82,5 +82,5 @@ declare function isEqualValue(val1: any, val2: any): boolean;
|
|
|
82
82
|
declare function hexToRgb(hex: string): string | null;
|
|
83
83
|
declare function filterEmpty(val: Record<string, any> | undefined): Record<string, any> | undefined;
|
|
84
84
|
|
|
85
|
-
export { MeasureResult, Text, TextOptions, TextPlugin, TextRenderOptions,
|
|
85
|
+
export { MeasureResult, Text, TextOptions, TextPlugin, TextRenderOptions, backgroundPlugin, createSVGLoader, createSVGParser, definePlugin, drawPath, filterEmpty, getHighlightStyle, getTransform2D, hexToRgb, highlightPlugin, isEqualObject, isEqualValue, listStylePlugin, measureText, outlinePlugin, parseColor, parseColormap, parseValueNumber, renderPlugin, renderText, setupView, textDecorationPlugin, uploadColor, uploadColors };
|
|
86
86
|
export type { DrawShapePathsOptions, LinearGradient, RenderTextOptions, SVGLoader, SVGParser };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NormalizedStyle, NormalizedHighlight } from 'modern-idoc';
|
|
2
2
|
import { BoundingBox, Path2DDrawStyle, Path2D, Matrix3, Path2DSet } from 'modern-path2d';
|
|
3
|
-
import { T as Text, a as TextPlugin, b as TextOptions, M as MeasureResult, c as TextRenderOptions } from './shared/modern-text.
|
|
4
|
-
export { C as Character, F as Fragment, f as MeasuredCharacter, e as MeasuredFragment, d as MeasuredParagraph, g as Measurer, P as Paragraph, h as TextEventMap, m as measureDOMResult, t as textDefaultStyle } from './shared/modern-text.
|
|
3
|
+
import { T as Text, a as TextPlugin, b as TextOptions, M as MeasureResult, c as TextRenderOptions } from './shared/modern-text.BExNokxh.js';
|
|
4
|
+
export { C as Character, F as Fragment, f as MeasuredCharacter, e as MeasuredFragment, d as MeasuredParagraph, g as Measurer, P as Paragraph, h as TextEventMap, m as measureDOMResult, t as textDefaultStyle } from './shared/modern-text.BExNokxh.js';
|
|
5
5
|
import 'modern-font';
|
|
6
6
|
|
|
7
7
|
declare function parseColor(ctx: CanvasRenderingContext2D, source: string | CanvasGradient | CanvasPattern, box: BoundingBox): string | CanvasGradient | CanvasPattern;
|
|
8
|
-
declare function uploadColor(style:
|
|
8
|
+
declare function uploadColor(style: NormalizedStyle, box: BoundingBox, ctx: CanvasRenderingContext2D): void;
|
|
9
9
|
interface LinearGradient {
|
|
10
10
|
x0: number;
|
|
11
11
|
y0: number;
|
|
@@ -17,7 +17,7 @@ interface LinearGradient {
|
|
|
17
17
|
}[];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
interface DrawShapePathsOptions extends
|
|
20
|
+
interface DrawShapePathsOptions extends NormalizedStyle, Omit<Partial<Path2DDrawStyle>, 'fill' | 'outline'> {
|
|
21
21
|
ctx: CanvasRenderingContext2D;
|
|
22
22
|
path: Path2D;
|
|
23
23
|
fontSize: number;
|
|
@@ -38,19 +38,19 @@ type RenderTextOptions = TextOptions & TextRenderOptions;
|
|
|
38
38
|
declare function renderText(options: RenderTextOptions, load: true): Promise<void>;
|
|
39
39
|
declare function renderText(options: RenderTextOptions): void;
|
|
40
40
|
|
|
41
|
-
declare function
|
|
41
|
+
declare function backgroundPlugin(): TextPlugin;
|
|
42
42
|
|
|
43
43
|
declare function getHighlightStyle(style: NormalizedStyle): NormalizedHighlight;
|
|
44
|
-
declare function
|
|
44
|
+
declare function highlightPlugin(): TextPlugin;
|
|
45
45
|
|
|
46
|
-
declare function
|
|
46
|
+
declare function listStylePlugin(): TextPlugin;
|
|
47
47
|
|
|
48
|
-
declare function
|
|
48
|
+
declare function outlinePlugin(): TextPlugin;
|
|
49
49
|
|
|
50
|
-
declare function
|
|
51
|
-
declare function getTransform2D(text: Text, style:
|
|
50
|
+
declare function renderPlugin(): TextPlugin;
|
|
51
|
+
declare function getTransform2D(text: Text, style: NormalizedStyle): Matrix3;
|
|
52
52
|
|
|
53
|
-
declare function
|
|
53
|
+
declare function textDecorationPlugin(): TextPlugin;
|
|
54
54
|
|
|
55
55
|
interface SVGLoader {
|
|
56
56
|
loaded: Map<string, string>;
|
|
@@ -82,5 +82,5 @@ declare function isEqualValue(val1: any, val2: any): boolean;
|
|
|
82
82
|
declare function hexToRgb(hex: string): string | null;
|
|
83
83
|
declare function filterEmpty(val: Record<string, any> | undefined): Record<string, any> | undefined;
|
|
84
84
|
|
|
85
|
-
export { MeasureResult, Text, TextOptions, TextPlugin, TextRenderOptions,
|
|
85
|
+
export { MeasureResult, Text, TextOptions, TextPlugin, TextRenderOptions, backgroundPlugin, createSVGLoader, createSVGParser, definePlugin, drawPath, filterEmpty, getHighlightStyle, getTransform2D, hexToRgb, highlightPlugin, isEqualObject, isEqualValue, listStylePlugin, measureText, outlinePlugin, parseColor, parseColormap, parseValueNumber, renderPlugin, renderText, setupView, textDecorationPlugin, uploadColor, uploadColors };
|
|
86
86
|
export type { DrawShapePathsOptions, LinearGradient, RenderTextOptions, SVGLoader, SVGParser };
|