modern-text 1.9.1 → 1.10.0

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.
@@ -1,6 +1,6 @@
1
- import { Fonts, SFNT } from 'modern-font';
2
1
  import { NormalizedStyle, NormalizedFill, NormalizedOutline, FullStyle, TextObject, ReactivableEvents, Reactivable, NormalizedText } from 'modern-idoc';
3
- import { BoundingBox, Path2D, Vector2, VectorLike, Path2DSet } from 'modern-path2d';
2
+ import { BoundingBox, Path2D, Vector2, VectorLike, Path2DSet, Path2DDrawStyle } from 'modern-path2d';
3
+ import { Fonts, SFNT } from 'modern-font';
4
4
 
5
5
  declare class Fragment {
6
6
  content: string;
@@ -64,39 +64,23 @@ declare class Character {
64
64
  max: Vector2;
65
65
  } | undefined;
66
66
  getGlyphBoundingBox(withStyle?: boolean): BoundingBox | undefined;
67
- drawTo(ctx: CanvasRenderingContext2D, config?: NormalizedStyle): void;
68
- }
69
-
70
- declare class Paragraph {
71
- style: NormalizedStyle;
72
- index: number;
73
- parent: Text$1;
74
- lineBox: BoundingBox;
75
- fragments: Fragment[];
76
- fill?: NormalizedFill;
77
- outline?: NormalizedOutline;
78
- computedStyle: FullStyle;
79
- get computedFill(): NormalizedFill | undefined;
80
- get computedOutline(): NormalizedOutline | undefined;
81
- constructor(style: NormalizedStyle, index: number, parent: Text$1);
82
- updateComputedStyle(): this;
83
67
  }
84
68
 
85
- interface TextPlugin {
69
+ interface Plugin {
86
70
  name: string;
87
71
  pathSet?: Path2DSet;
88
72
  getBoundingBox?: (text: Text$1) => BoundingBox | undefined;
89
73
  update?: (text: Text$1) => void;
90
74
  updateOrder?: number;
91
- render?: (ctx: CanvasRenderingContext2D, text: Text$1) => void;
75
+ render?: (renderer: Canvas2DRenderer) => void;
92
76
  renderOrder?: number;
93
77
  load?: (text: Text$1) => Promise<void>;
94
78
  }
95
- interface TextOptions extends TextObject {
79
+ interface Options extends TextObject {
96
80
  debug?: boolean;
97
81
  measureDom?: HTMLElement;
98
82
  fonts?: Fonts;
99
- plugins?: TextPlugin[];
83
+ plugins?: Plugin[];
100
84
  }
101
85
 
102
86
  interface MeasuredParagraph {
@@ -162,7 +146,7 @@ declare class Measurer {
162
146
  measure(paragraphs: Paragraph[], rootStyle: FullStyle, dom?: HTMLElement): MeasureDomResult;
163
147
  }
164
148
 
165
- interface TextRenderOptions {
149
+ interface RenderOptions {
166
150
  view: HTMLCanvasElement;
167
151
  pixelRatio?: number;
168
152
  onContext?: (context: CanvasRenderingContext2D) => void;
@@ -207,6 +191,7 @@ declare class Text$1 extends Reactivable {
207
191
  fonts?: Fonts;
208
192
  needsUpdate: boolean;
209
193
  computedStyle: FullStyle;
194
+ computedEffects: NormalizedStyle[];
210
195
  paragraphs: Paragraph[];
211
196
  lineBox: BoundingBox;
212
197
  rawGlyphBox: BoundingBox;
@@ -214,31 +199,65 @@ declare class Text$1 extends Reactivable {
214
199
  pathBox: BoundingBox;
215
200
  boundingBox: BoundingBox;
216
201
  measurer: Measurer;
217
- plugins: Map<string, TextPlugin>;
202
+ plugins: Map<string, Plugin>;
218
203
  pathSets: Path2DSet[];
219
204
  get fontSize(): number;
220
205
  get isVertical(): boolean;
221
206
  get characters(): Character[];
222
- constructor(options?: TextOptions);
223
- set(options?: TextOptions): void;
224
- use(plugin: TextPlugin): this;
207
+ constructor(options?: Options);
208
+ set(options?: Options): void;
209
+ use(plugin: Plugin): this;
225
210
  forEachCharacter(handle: (character: Character, ctx: {
226
211
  paragraphIndex: number;
227
212
  fragmentIndex: number;
228
213
  characterIndex: number;
229
214
  }) => void): this;
230
215
  load(): Promise<void>;
231
- updateParagraphs(): this;
216
+ protected _update(): this;
232
217
  createDom(): HTMLElement;
233
218
  measure(dom?: HTMLElement | undefined): MeasureResult;
234
219
  getGlyphBox(): BoundingBox;
235
- updatePathBox(): this;
236
- updateBoundingBox(): this;
220
+ protected _updatePathBox(): this;
221
+ protected _updateBoundingBox(): this;
237
222
  requestUpdate(): this;
238
223
  update(dom?: HTMLElement | undefined): this;
239
- render(options: TextRenderOptions): void;
224
+ render(options: RenderOptions): void;
240
225
  toString(): string;
241
226
  }
242
227
 
243
- export { Character as C, Fragment as F, Paragraph as P, Text$1 as T, Measurer as h, textDefaultStyle as t };
244
- export type { MeasureResult as M, TextPlugin as a, TextOptions as b, TextRenderOptions as c, MeasuredParagraph as d, MeasuredFragment as e, MeasuredCharacter as f, MeasureDomResult as g, TextEvents as i };
228
+ declare class Paragraph {
229
+ style: NormalizedStyle;
230
+ index: number;
231
+ parent: Text$1;
232
+ lineBox: BoundingBox;
233
+ fragments: Fragment[];
234
+ fill?: NormalizedFill;
235
+ outline?: NormalizedOutline;
236
+ computedStyle: FullStyle;
237
+ get computedFill(): NormalizedFill | undefined;
238
+ get computedOutline(): NormalizedOutline | undefined;
239
+ constructor(style: NormalizedStyle, index: number, parent: Text$1);
240
+ updateComputedStyle(): this;
241
+ }
242
+
243
+ interface DrawShapePathsOptions extends NormalizedStyle, Omit<Partial<Path2DDrawStyle>, 'fill' | 'outline'> {
244
+ fontSize?: number;
245
+ clipRect?: BoundingBox;
246
+ }
247
+ declare class Canvas2DRenderer {
248
+ text: Text$1;
249
+ context: CanvasRenderingContext2D;
250
+ pixelRatio: number;
251
+ constructor(text: Text$1, context: CanvasRenderingContext2D);
252
+ protected _setupView: () => void;
253
+ protected _setupColors: () => void;
254
+ setup: () => this;
255
+ protected _parseColor: (source: string | CanvasGradient | CanvasPattern, box: BoundingBox) => string | CanvasGradient | CanvasPattern;
256
+ protected _uploadedStyles: string[];
257
+ uploadColor: (style: NormalizedStyle, box: BoundingBox) => void;
258
+ drawPath: (path: Path2D, options?: DrawShapePathsOptions) => void;
259
+ drawCharacter: (character: Character, userStyle?: NormalizedStyle) => void;
260
+ }
261
+
262
+ export { Canvas2DRenderer as C, Fragment as F, Text$1 as T, Character as a, Paragraph as b, Measurer as g, textDefaultStyle as t };
263
+ export type { DrawShapePathsOptions as D, MeasureResult as M, Options as O, Plugin as P, RenderOptions as R, MeasuredParagraph as c, MeasuredFragment as d, MeasuredCharacter as e, MeasureDomResult as f, TextEvents as h };
@@ -1,6 +1,6 @@
1
- import { Fonts, SFNT } from 'modern-font';
2
1
  import { NormalizedStyle, NormalizedFill, NormalizedOutline, FullStyle, TextObject, ReactivableEvents, Reactivable, NormalizedText } from 'modern-idoc';
3
- import { BoundingBox, Path2D, Vector2, VectorLike, Path2DSet } from 'modern-path2d';
2
+ import { BoundingBox, Path2D, Vector2, VectorLike, Path2DSet, Path2DDrawStyle } from 'modern-path2d';
3
+ import { Fonts, SFNT } from 'modern-font';
4
4
 
5
5
  declare class Fragment {
6
6
  content: string;
@@ -64,39 +64,23 @@ declare class Character {
64
64
  max: Vector2;
65
65
  } | undefined;
66
66
  getGlyphBoundingBox(withStyle?: boolean): BoundingBox | undefined;
67
- drawTo(ctx: CanvasRenderingContext2D, config?: NormalizedStyle): void;
68
- }
69
-
70
- declare class Paragraph {
71
- style: NormalizedStyle;
72
- index: number;
73
- parent: Text$1;
74
- lineBox: BoundingBox;
75
- fragments: Fragment[];
76
- fill?: NormalizedFill;
77
- outline?: NormalizedOutline;
78
- computedStyle: FullStyle;
79
- get computedFill(): NormalizedFill | undefined;
80
- get computedOutline(): NormalizedOutline | undefined;
81
- constructor(style: NormalizedStyle, index: number, parent: Text$1);
82
- updateComputedStyle(): this;
83
67
  }
84
68
 
85
- interface TextPlugin {
69
+ interface Plugin {
86
70
  name: string;
87
71
  pathSet?: Path2DSet;
88
72
  getBoundingBox?: (text: Text$1) => BoundingBox | undefined;
89
73
  update?: (text: Text$1) => void;
90
74
  updateOrder?: number;
91
- render?: (ctx: CanvasRenderingContext2D, text: Text$1) => void;
75
+ render?: (renderer: Canvas2DRenderer) => void;
92
76
  renderOrder?: number;
93
77
  load?: (text: Text$1) => Promise<void>;
94
78
  }
95
- interface TextOptions extends TextObject {
79
+ interface Options extends TextObject {
96
80
  debug?: boolean;
97
81
  measureDom?: HTMLElement;
98
82
  fonts?: Fonts;
99
- plugins?: TextPlugin[];
83
+ plugins?: Plugin[];
100
84
  }
101
85
 
102
86
  interface MeasuredParagraph {
@@ -162,7 +146,7 @@ declare class Measurer {
162
146
  measure(paragraphs: Paragraph[], rootStyle: FullStyle, dom?: HTMLElement): MeasureDomResult;
163
147
  }
164
148
 
165
- interface TextRenderOptions {
149
+ interface RenderOptions {
166
150
  view: HTMLCanvasElement;
167
151
  pixelRatio?: number;
168
152
  onContext?: (context: CanvasRenderingContext2D) => void;
@@ -207,6 +191,7 @@ declare class Text$1 extends Reactivable {
207
191
  fonts?: Fonts;
208
192
  needsUpdate: boolean;
209
193
  computedStyle: FullStyle;
194
+ computedEffects: NormalizedStyle[];
210
195
  paragraphs: Paragraph[];
211
196
  lineBox: BoundingBox;
212
197
  rawGlyphBox: BoundingBox;
@@ -214,31 +199,65 @@ declare class Text$1 extends Reactivable {
214
199
  pathBox: BoundingBox;
215
200
  boundingBox: BoundingBox;
216
201
  measurer: Measurer;
217
- plugins: Map<string, TextPlugin>;
202
+ plugins: Map<string, Plugin>;
218
203
  pathSets: Path2DSet[];
219
204
  get fontSize(): number;
220
205
  get isVertical(): boolean;
221
206
  get characters(): Character[];
222
- constructor(options?: TextOptions);
223
- set(options?: TextOptions): void;
224
- use(plugin: TextPlugin): this;
207
+ constructor(options?: Options);
208
+ set(options?: Options): void;
209
+ use(plugin: Plugin): this;
225
210
  forEachCharacter(handle: (character: Character, ctx: {
226
211
  paragraphIndex: number;
227
212
  fragmentIndex: number;
228
213
  characterIndex: number;
229
214
  }) => void): this;
230
215
  load(): Promise<void>;
231
- updateParagraphs(): this;
216
+ protected _update(): this;
232
217
  createDom(): HTMLElement;
233
218
  measure(dom?: HTMLElement | undefined): MeasureResult;
234
219
  getGlyphBox(): BoundingBox;
235
- updatePathBox(): this;
236
- updateBoundingBox(): this;
220
+ protected _updatePathBox(): this;
221
+ protected _updateBoundingBox(): this;
237
222
  requestUpdate(): this;
238
223
  update(dom?: HTMLElement | undefined): this;
239
- render(options: TextRenderOptions): void;
224
+ render(options: RenderOptions): void;
240
225
  toString(): string;
241
226
  }
242
227
 
243
- export { Character as C, Fragment as F, Paragraph as P, Text$1 as T, Measurer as h, textDefaultStyle as t };
244
- export type { MeasureResult as M, TextPlugin as a, TextOptions as b, TextRenderOptions as c, MeasuredParagraph as d, MeasuredFragment as e, MeasuredCharacter as f, MeasureDomResult as g, TextEvents as i };
228
+ declare class Paragraph {
229
+ style: NormalizedStyle;
230
+ index: number;
231
+ parent: Text$1;
232
+ lineBox: BoundingBox;
233
+ fragments: Fragment[];
234
+ fill?: NormalizedFill;
235
+ outline?: NormalizedOutline;
236
+ computedStyle: FullStyle;
237
+ get computedFill(): NormalizedFill | undefined;
238
+ get computedOutline(): NormalizedOutline | undefined;
239
+ constructor(style: NormalizedStyle, index: number, parent: Text$1);
240
+ updateComputedStyle(): this;
241
+ }
242
+
243
+ interface DrawShapePathsOptions extends NormalizedStyle, Omit<Partial<Path2DDrawStyle>, 'fill' | 'outline'> {
244
+ fontSize?: number;
245
+ clipRect?: BoundingBox;
246
+ }
247
+ declare class Canvas2DRenderer {
248
+ text: Text$1;
249
+ context: CanvasRenderingContext2D;
250
+ pixelRatio: number;
251
+ constructor(text: Text$1, context: CanvasRenderingContext2D);
252
+ protected _setupView: () => void;
253
+ protected _setupColors: () => void;
254
+ setup: () => this;
255
+ protected _parseColor: (source: string | CanvasGradient | CanvasPattern, box: BoundingBox) => string | CanvasGradient | CanvasPattern;
256
+ protected _uploadedStyles: string[];
257
+ uploadColor: (style: NormalizedStyle, box: BoundingBox) => void;
258
+ drawPath: (path: Path2D, options?: DrawShapePathsOptions) => void;
259
+ drawCharacter: (character: Character, userStyle?: NormalizedStyle) => void;
260
+ }
261
+
262
+ export { Canvas2DRenderer as C, Fragment as F, Text$1 as T, Character as a, Paragraph as b, Measurer as g, textDefaultStyle as t };
263
+ export type { DrawShapePathsOptions as D, MeasureResult as M, Options as O, Plugin as P, RenderOptions as R, MeasuredParagraph as c, MeasuredFragment as d, MeasuredCharacter as e, MeasureDomResult as f, TextEvents as h };
@@ -1,6 +1,6 @@
1
- import { Fonts, SFNT } from 'modern-font';
2
1
  import { NormalizedStyle, NormalizedFill, NormalizedOutline, FullStyle, TextObject, ReactivableEvents, Reactivable, NormalizedText } from 'modern-idoc';
3
- import { BoundingBox, Path2D, Vector2, VectorLike, Path2DSet } from 'modern-path2d';
2
+ import { BoundingBox, Path2D, Vector2, VectorLike, Path2DSet, Path2DDrawStyle } from 'modern-path2d';
3
+ import { Fonts, SFNT } from 'modern-font';
4
4
 
5
5
  declare class Fragment {
6
6
  content: string;
@@ -64,39 +64,23 @@ declare class Character {
64
64
  max: Vector2;
65
65
  } | undefined;
66
66
  getGlyphBoundingBox(withStyle?: boolean): BoundingBox | undefined;
67
- drawTo(ctx: CanvasRenderingContext2D, config?: NormalizedStyle): void;
68
- }
69
-
70
- declare class Paragraph {
71
- style: NormalizedStyle;
72
- index: number;
73
- parent: Text$1;
74
- lineBox: BoundingBox;
75
- fragments: Fragment[];
76
- fill?: NormalizedFill;
77
- outline?: NormalizedOutline;
78
- computedStyle: FullStyle;
79
- get computedFill(): NormalizedFill | undefined;
80
- get computedOutline(): NormalizedOutline | undefined;
81
- constructor(style: NormalizedStyle, index: number, parent: Text$1);
82
- updateComputedStyle(): this;
83
67
  }
84
68
 
85
- interface TextPlugin {
69
+ interface Plugin {
86
70
  name: string;
87
71
  pathSet?: Path2DSet;
88
72
  getBoundingBox?: (text: Text$1) => BoundingBox | undefined;
89
73
  update?: (text: Text$1) => void;
90
74
  updateOrder?: number;
91
- render?: (ctx: CanvasRenderingContext2D, text: Text$1) => void;
75
+ render?: (renderer: Canvas2DRenderer) => void;
92
76
  renderOrder?: number;
93
77
  load?: (text: Text$1) => Promise<void>;
94
78
  }
95
- interface TextOptions extends TextObject {
79
+ interface Options extends TextObject {
96
80
  debug?: boolean;
97
81
  measureDom?: HTMLElement;
98
82
  fonts?: Fonts;
99
- plugins?: TextPlugin[];
83
+ plugins?: Plugin[];
100
84
  }
101
85
 
102
86
  interface MeasuredParagraph {
@@ -162,7 +146,7 @@ declare class Measurer {
162
146
  measure(paragraphs: Paragraph[], rootStyle: FullStyle, dom?: HTMLElement): MeasureDomResult;
163
147
  }
164
148
 
165
- interface TextRenderOptions {
149
+ interface RenderOptions {
166
150
  view: HTMLCanvasElement;
167
151
  pixelRatio?: number;
168
152
  onContext?: (context: CanvasRenderingContext2D) => void;
@@ -207,6 +191,7 @@ declare class Text$1 extends Reactivable {
207
191
  fonts?: Fonts;
208
192
  needsUpdate: boolean;
209
193
  computedStyle: FullStyle;
194
+ computedEffects: NormalizedStyle[];
210
195
  paragraphs: Paragraph[];
211
196
  lineBox: BoundingBox;
212
197
  rawGlyphBox: BoundingBox;
@@ -214,31 +199,65 @@ declare class Text$1 extends Reactivable {
214
199
  pathBox: BoundingBox;
215
200
  boundingBox: BoundingBox;
216
201
  measurer: Measurer;
217
- plugins: Map<string, TextPlugin>;
202
+ plugins: Map<string, Plugin>;
218
203
  pathSets: Path2DSet[];
219
204
  get fontSize(): number;
220
205
  get isVertical(): boolean;
221
206
  get characters(): Character[];
222
- constructor(options?: TextOptions);
223
- set(options?: TextOptions): void;
224
- use(plugin: TextPlugin): this;
207
+ constructor(options?: Options);
208
+ set(options?: Options): void;
209
+ use(plugin: Plugin): this;
225
210
  forEachCharacter(handle: (character: Character, ctx: {
226
211
  paragraphIndex: number;
227
212
  fragmentIndex: number;
228
213
  characterIndex: number;
229
214
  }) => void): this;
230
215
  load(): Promise<void>;
231
- updateParagraphs(): this;
216
+ protected _update(): this;
232
217
  createDom(): HTMLElement;
233
218
  measure(dom?: HTMLElement | undefined): MeasureResult;
234
219
  getGlyphBox(): BoundingBox;
235
- updatePathBox(): this;
236
- updateBoundingBox(): this;
220
+ protected _updatePathBox(): this;
221
+ protected _updateBoundingBox(): this;
237
222
  requestUpdate(): this;
238
223
  update(dom?: HTMLElement | undefined): this;
239
- render(options: TextRenderOptions): void;
224
+ render(options: RenderOptions): void;
240
225
  toString(): string;
241
226
  }
242
227
 
243
- export { Character as C, Fragment as F, Paragraph as P, Text$1 as T, Measurer as h, textDefaultStyle as t };
244
- export type { MeasureResult as M, TextPlugin as a, TextOptions as b, TextRenderOptions as c, MeasuredParagraph as d, MeasuredFragment as e, MeasuredCharacter as f, MeasureDomResult as g, TextEvents as i };
228
+ declare class Paragraph {
229
+ style: NormalizedStyle;
230
+ index: number;
231
+ parent: Text$1;
232
+ lineBox: BoundingBox;
233
+ fragments: Fragment[];
234
+ fill?: NormalizedFill;
235
+ outline?: NormalizedOutline;
236
+ computedStyle: FullStyle;
237
+ get computedFill(): NormalizedFill | undefined;
238
+ get computedOutline(): NormalizedOutline | undefined;
239
+ constructor(style: NormalizedStyle, index: number, parent: Text$1);
240
+ updateComputedStyle(): this;
241
+ }
242
+
243
+ interface DrawShapePathsOptions extends NormalizedStyle, Omit<Partial<Path2DDrawStyle>, 'fill' | 'outline'> {
244
+ fontSize?: number;
245
+ clipRect?: BoundingBox;
246
+ }
247
+ declare class Canvas2DRenderer {
248
+ text: Text$1;
249
+ context: CanvasRenderingContext2D;
250
+ pixelRatio: number;
251
+ constructor(text: Text$1, context: CanvasRenderingContext2D);
252
+ protected _setupView: () => void;
253
+ protected _setupColors: () => void;
254
+ setup: () => this;
255
+ protected _parseColor: (source: string | CanvasGradient | CanvasPattern, box: BoundingBox) => string | CanvasGradient | CanvasPattern;
256
+ protected _uploadedStyles: string[];
257
+ uploadColor: (style: NormalizedStyle, box: BoundingBox) => void;
258
+ drawPath: (path: Path2D, options?: DrawShapePathsOptions) => void;
259
+ drawCharacter: (character: Character, userStyle?: NormalizedStyle) => void;
260
+ }
261
+
262
+ export { Canvas2DRenderer as C, Fragment as F, Text$1 as T, Character as a, Paragraph as b, Measurer as g, textDefaultStyle as t };
263
+ export type { DrawShapePathsOptions as D, MeasureResult as M, Options as O, Plugin as P, RenderOptions as R, MeasuredParagraph as c, MeasuredFragment as d, MeasuredCharacter as e, MeasureDomResult as f, TextEvents as h };
@@ -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.BmTeQ51D.cjs');
5
+ const Text = require('../shared/modern-text.BUyl2x8m.cjs');
6
6
  require('modern-path2d');
7
7
  require('modern-font');
8
8
 
@@ -1,7 +1,7 @@
1
1
  import { PropertyAccessor, NormalizedTextContent } from 'modern-idoc';
2
- import { T as Text } from '../shared/modern-text.WbWB6f3d.cjs';
3
- import 'modern-font';
2
+ import { T as Text } from '../shared/modern-text.D_VtaVfs.cjs';
4
3
  import 'modern-path2d';
4
+ import 'modern-font';
5
5
 
6
6
  interface IndexCharacter {
7
7
  paragraphIndex: number;
@@ -1,7 +1,7 @@
1
1
  import { PropertyAccessor, NormalizedTextContent } from 'modern-idoc';
2
- import { T as Text } from '../shared/modern-text.WbWB6f3d.mjs';
3
- import 'modern-font';
2
+ import { T as Text } from '../shared/modern-text.D_VtaVfs.mjs';
4
3
  import 'modern-path2d';
4
+ import 'modern-font';
5
5
 
6
6
  interface IndexCharacter {
7
7
  paragraphIndex: number;
@@ -1,7 +1,7 @@
1
1
  import { PropertyAccessor, NormalizedTextContent } from 'modern-idoc';
2
- import { T as Text } from '../shared/modern-text.WbWB6f3d.js';
3
- import 'modern-font';
2
+ import { T as Text } from '../shared/modern-text.D_VtaVfs.js';
4
3
  import 'modern-path2d';
4
+ import 'modern-font';
5
5
 
6
6
  interface IndexCharacter {
7
7
  paragraphIndex: number;
@@ -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.B2pcGP3X.mjs';
3
+ import { T as Text } from '../shared/modern-text.BD1kUWDw.mjs';
4
4
  import 'modern-path2d';
5
5
  import 'modern-font';
6
6
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-text",
3
3
  "type": "module",
4
- "version": "1.9.1",
4
+ "version": "1.10.0",
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",
@@ -51,32 +51,23 @@
51
51
  "release": "bumpp package.json --commit \"release: v%s\" --push --all --tag",
52
52
  "start": "esno src/index.ts",
53
53
  "test": "vitest",
54
- "typecheck": "tsc --noEmit",
55
- "prepare": "simple-git-hooks"
54
+ "typecheck": "tsc --noEmit"
56
55
  },
57
56
  "dependencies": {
58
57
  "diff": "^8.0.2",
59
58
  "modern-font": "^0.4.4",
60
- "modern-idoc": "^0.10.1",
59
+ "modern-idoc": "^0.10.5",
61
60
  "modern-path2d": "^1.4.10"
62
61
  },
63
62
  "devDependencies": {
64
- "@antfu/eslint-config": "^6.0.0",
65
- "@types/node": "^24.8.1",
63
+ "@antfu/eslint-config": "^6.1.0",
64
+ "@types/node": "^24.9.2",
66
65
  "bumpp": "^10.3.1",
67
66
  "conventional-changelog-cli": "^5.0.0",
68
67
  "eslint": "^9.38.0",
69
- "lint-staged": "^16.2.4",
70
- "simple-git-hooks": "^2.13.1",
71
68
  "typescript": "^5.9.3",
72
69
  "unbuild": "^3.6.1",
73
- "vite": "^7.1.10",
74
- "vitest": "^3.2.4"
75
- },
76
- "simple-git-hooks": {
77
- "pre-commit": "pnpm lint-staged"
78
- },
79
- "lint-staged": {
80
- "*": ""
70
+ "vite": "^7.1.12",
71
+ "vitest": "^4.0.4"
81
72
  }
82
73
  }