svg-path-commander 2.3.3 → 2.3.5

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/AGENTS.md CHANGED
@@ -2,77 +2,93 @@
2
2
 
3
3
  ## Project Overview
4
4
 
5
- SVGPathCommander v2.3.2 — TypeScript library for manipulating SVG `<path>` `d` attributes. Works in browser and Node.js.
5
+ SVGPathCommander v2.3.4 — TypeScript library for manipulating SVG `<path>` `d` attributes. Works in browser and Node.js.
6
6
 
7
7
  ## Commands
8
8
 
9
9
  ```bash
10
- pnpm install # Install dependencies
11
- pnpm dev # Serve docs on localhost:3000
12
- pnpm test # Run all tests (vitest + Istanbul coverage)
13
- pnpm test-ui # Run tests with UI
14
- pnpm test -- -t "Test name" # Run a single test by name
15
- pnpm test -- class.test.ts # Run a single test file
16
- pnpm bench # Benchmark vs svgpath (results embedded in README)
17
- pnpm lint # Deno lint + tsc type check
18
- pnpm lint:ts # Deno lint only
19
- pnpm fix:ts # Deno lint --fix
20
- pnpm format # Deno format
21
- pnpm build # Build with tsdown
22
- pnpm check:ts # tsc --noEmit (type check only)
10
+ vp install # Install dependencies
11
+ vpr dev # Serve docs on localhost:3000
12
+ vpr test # Run all tests (Vitest + Istanbul coverage)
13
+ vpr test:ui # Run tests with UI and --watch option
14
+ vpr test:watch # Run tests with --watch option
15
+ vpr test -- class.test.ts # Run a single test file
16
+ vpr test -- -t "Test name" # Run a single test by name
17
+ vpr bench # Benchmark vs svgpath (results embedded in README)
18
+ vpr lint # oxlint src + tsc --noEmit
19
+ vpr lint:ts # oxlint src
20
+ vpr fix:ts # oxlint src --fix
21
+ vpr format # oxfmt src
22
+ vpr build # Build with tsdown (vp pack) + copy the bundle to docs/
23
+ vpr check:ts # tsc --noEmit (type check only)
23
24
  ```
24
25
 
26
+ Always run `vpr lint` and `vpr test` after making changes.
27
+
25
28
  Deno equivalents (via `deno.json`):
26
29
 
27
30
  ```bash
28
31
  deno task test # vitest run
29
32
  deno task lint # deno lint src
30
33
  deno task check # deno check src (no --sloppy-imports needed)
31
- deno task build # tsdown via node
32
- deno publish # JSR dry run: deno publish --dry-run --allow-dirty
34
+ deno task format # deno fmt src
35
+ deno publish --dry-run --allow-dirty # JSR dry run
33
36
  ```
34
37
 
38
+ ## CI Workflows
39
+
40
+ The GitHub Actions workflows are driven by Vite+; they use the `voidzero-dev/setup-vp` action (pinned to the exact release that ships with the pinned Vite+ version — never the frozen `v1` tag), which installs the `vp`/`vpr`/`vpx` binaries, the Node.js runtime, the package manager and the dependency cache.
41
+
42
+ - `.github/workflows/ci.yml` — runs on pushes and pull requests; `vpr lint`, `vpr build` and `vpr test` (with `vp exec playwright install` for the browsers), then uploads the coverage report to Coveralls.
43
+ - `.github/workflows/publish.yml` — runs on a published GitHub Release; sets up Deno as well, then publishes to npm with `vp pm publish` (provenance, `--ignore-scripts` so the release is built from the committed sources instead of the `prepublishOnly` dependency bump) and to JSR with `deno publish --allow-dirty` (the build step regenerates the committed `dist/` and `docs/` artifacts).
44
+ - `.github/workflows/codeql.yml` — CodeQL analysis; the build step uses `vpr build` so the job has the same toolchain as the other workflows.
45
+
46
+ Keep the `paths` filters of all three workflows in sync when adding a file that affects the build, the tests or the toolchain.
47
+
35
48
  ## Tech Stack
36
49
 
37
50
  - **Language:** TypeScript (strict, ES2020 target, `allowImportingTsExtensions`)
38
- - **Package manager:** pnpm (v11.x)
39
- - **Build:** tsdown (ESM + UMD outputs)
40
- - **Test:** Vitest + Istanbul coverage (`test/class.test.ts`, `test/static.test.ts`)
41
- - **Lint/Format:** Deno (`deno lint`, `deno fmt`)
51
+ - **Package manager:** vite-plus aka vp — dependencies are pinned through the `catalog:` in `pnpm-workspace.yaml`
52
+ - **Build:** tsdown via `vp pack` (ESM + UMD outputs), wired through `vite.config.ts`
53
+ - **Test:** Vitest 5 in **browser mode** (Playwright + Chromium, headless) + Istanbul coverage (`test/class.test.ts`, `test/static.test.ts`)
54
+ - **Lint/Format:** Vite+ (oxlint / oxfmt via `vp lint src` and `vp fmt src`) — not Deno; `deno lint` / `deno fmt` still gate the JSR publish
42
55
  - **JSR:** `deno.json` publishes as `@thednp/svg-path-commander` — `deno check src`, `deno lint src` and `deno publish --dry-run --allow-dirty` must all pass
43
- - **Dependency:** `@thednp/dommatrix` `^3.1.1` (DOMMatrix shim)
56
+ - **Dependency:** `@thednp/dommatrix` `^3.1.3` (DOMMatrix shim)
44
57
 
45
58
  ## Source Structure (`src/`)
46
59
 
47
- | Directory | Purpose |
48
- |---|---|
49
- | `index.ts` | Main entry — exports SVGPathCommander class + all types |
50
- | `main.ts` | SVGPathCommander class (core, chainable instance methods) |
51
- | `types.ts` | TypeScript type definitions (PathCommand, PathSegment, PathArray, etc.) |
52
- | `interface.ts` | Interfaces (Options, TransformObject, PathBBox, shape attrs) |
53
- | `util.ts` | Re-export of all static methods (tree-shakeable entry) |
54
- | `convert/` | Path format conversion (absolute, relative, curve, string) |
55
- | `parser/` | SVG path string tokenizer/scanner |
56
- | `process/` | Manipulation algorithms (normalize, optimize, reverse, transform, etc.) |
57
- | `math/` | Low-level math (bezier, cubic, quad, line, arc, polygon tools) |
58
- | `morph/` | Path morphing (equalize, split, sample, classify, match) |
59
- | `util/` | Query helpers (bbox, length, point-at-length, intersection, etc.) |
60
- | `options/` | Default configuration |
60
+ | Directory | Purpose |
61
+ | -------------- | ----------------------------------------------------------------------- |
62
+ | `index.ts` | Main entry — exports SVGPathCommander class + all types |
63
+ | `main.ts` | SVGPathCommander class (core, chainable instance methods) |
64
+ | `types.ts` | TypeScript type definitions (PathCommand, PathSegment, PathArray, etc.) |
65
+ | `interface.ts` | Interfaces (Options, TransformObject, PathBBox, shape attrs) |
66
+ | `util.ts` | Re-export of all static methods (tree-shakeable entry) |
67
+ | `convert/` | Path format conversion (absolute, relative, curve, string) |
68
+ | `parser/` | SVG path string tokenizer/scanner |
69
+ | `process/` | Manipulation algorithms (normalize, optimize, reverse, transform, etc.) |
70
+ | `math/` | Low-level math (bezier, cubic, quad, line, arc, polygon tools) |
71
+ | `morph/` | Path morphing (equalize, split, sample, classify, match) |
72
+ | `util/` | Query helpers (bbox, length, point-at-length, intersection, etc.) |
73
+ | `options/` | Default configuration |
61
74
 
62
75
  ## Code Conventions
63
76
 
64
77
  ### Imports
78
+
65
79
  - Use `.ts` extension on all imports: `import { foo } from "./bar.ts"`
66
80
  - Path alias `~/*` maps to `src/` (e.g., `import SVGPathCommander from '~/index'`)
67
81
  - Group imports: external libs → internal modules → types
68
82
  - Use `import type` for type-only imports
69
83
 
70
84
  ### Formatting & Linting
85
+
71
86
  - **No comments** unless explicitly asked
72
- - Run `pnpm format` then `pnpm lint:ts` before committing
73
- - Deno formatter and linter enforced (`deno fmt`, `deno lint`)
87
+ - Run `vpr format` then `vpr lint:ts` before committing
88
+ - Vite+ formatter and linter enforced (`vp fmt`, `vp lint`); `deno fmt` / `deno lint` still gate the JSR publish
74
89
 
75
90
  ### TypeScript
91
+
76
92
  - Strict mode enabled — no `any`, no implicit `any`
77
93
  - `noUnusedLocals` and `noUnusedParameters` enforced
78
94
  - `noImplicitReturns` enforced
@@ -80,6 +96,7 @@ deno publish # JSR dry run: deno publish --dry-run --allow-dirty
80
96
  - Use `type` aliases for unions, `interface` for object shapes
81
97
 
82
98
  ### Naming Conventions
99
+
83
100
  - **Classes:** PascalCase (`SVGPathCommander`, `PathParser`)
84
101
  - **Functions/Methods:** camelCase (`parsePathString`, `normalizePath`)
85
102
  - **Types:** PascalCase ending in semantic suffix (`PathArray`, `NormalSegment`, `IteratorCallback`)
@@ -88,19 +105,22 @@ deno publish # JSR dry run: deno publish --dry-run --allow-dirty
88
105
  - **Test descriptions:** Start with `Test` (`Test init with no parameter`)
89
106
 
90
107
  ### Error Handling
108
+
91
109
  - Throw `TypeError` with descriptive message for invalid inputs
92
110
  - Use the shared `error` prefix from `~/util/error.ts`
93
111
  - Validate inputs early, fail fast with clear messages
94
112
  - Static methods return safe defaults for empty/invalid input (e.g., `getPathBBox('')`)
95
113
 
96
114
  ### Class Design
115
+
97
116
  - Instance methods are chainable — always `return this`
98
117
  - Expose functionality as both instance methods and static methods
99
118
  - Use getters for computed properties (`get bbox()`, `get length()`)
100
119
  - Instance options validated in constructor with fallback to `defaultOptions`
101
120
 
102
121
  ### Testing
103
- - Tests run with Vitest + Istanbul coverage via `pnpm test`
122
+
123
+ - Tests run with Vitest + Istanbul coverage via `vpr test`
104
124
  - Test files: `test/class.test.ts` (instance API), `test/static.test.ts` (static methods)
105
125
  - Fixtures in `test/fixtures/`
106
126
  - Use `expect().to.deep.equal()` for object comparison, `expect().to.equal()` for primitives
@@ -108,9 +128,55 @@ deno publish # JSR dry run: deno publish --dry-run --allow-dirty
108
128
 
109
129
  ## Build Outputs
110
130
 
111
- | File | Description |
112
- |---|---|
131
+ | File | Description |
132
+ | ------------------- | -------------------------------------------------------- |
113
133
  | `dist/index.min.js` | UMD bundle (minified, browser-ready, includes dommatrix) |
114
- | `dist/index.js` | ESM bundle (tree-shakeable, neutral platform) |
115
- | `dist/util.js` | Static methods only (tree-shakeable) |
116
- | `dist/index.d.ts` | Type declarations |
134
+ | `dist/index.js` | ESM bundle (tree-shakeable, neutral platform) |
135
+ | `dist/util.js` | Static methods only (tree-shakeable) |
136
+ | `dist/index.d.ts` | Type declarations |
137
+
138
+ <!--VITE PLUS START-->
139
+
140
+ # Using Vite+, the Unified Toolchain for the Web
141
+
142
+ This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
143
+
144
+ Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.
145
+
146
+ ## Built-in Commands vs Scripts
147
+
148
+ `vp <name>` runs a built-in command. `vp run <name>` runs a `package.json` script or a `vite.config.ts` task. Scripts cannot overwrite built-ins, so `vp dev` and `vp run dev` may do different things. Check `package.json` and `vite.config.ts` first, and run `vp run <name>` when the project defines a script or task with that name.
149
+
150
+ ## Running Scripts
151
+
152
+ Run TypeScript and JavaScript files with `vpx <file>`, for example `vpx ./scripts/seed.ts --dry-run`. It handles enums, decorators, JSX, and tsconfig `paths`, so do not add `tsx` or `ts-node` to run scripts. `vpx --watch <file>` reruns the file when a file it uses changes, in place of `tsx watch`. `vp node <file>` runs plain Node.js.
153
+
154
+ ## Tool Versions
155
+
156
+ Run `vp toolchain` to show versions and relationships in the active Vite+
157
+ release. Add a tool name to select part of the graph. For example, run
158
+ `vp toolchain vite`. Use `--global` to ignore the local `vite-plus` package. Use
159
+ `vp why <package>` to show the package-manager dependency graph.
160
+
161
+ ## Review Checklist
162
+
163
+ - [ ] Run `vp install` after pulling remote changes and before getting started.
164
+ - [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
165
+ - [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
166
+ - [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.
167
+
168
+ <!--VITE PLUS END-->
169
+
170
+ ## Workflow notes
171
+ - **Harness folders**: dev repro/harness scaffolding (debugging the Vite plugin,
172
+ a compiler, or the browser) goes in `TMP/`; fixtures imported by vitest suites
173
+ go in `tests/fixtures/` — **never** in the root or in OS temp dirs. Root-level
174
+ harness files break `tsdown`/`vitest` path resolution, and temp dirs outside
175
+ the project get swept by OS cleaners and leave stale `node_modules`/`.vite`
176
+ state that corrupts the next run. (`tests/fixtures/` is covered by
177
+ `vp lint` + `tsc` like the rest of `tests/` — keep fixtures valid;
178
+ intentionally-broken inputs don't belong there.)
179
+ - **Never delete files**: do not `rm` source/test files. If a file must be
180
+ removed from the tree, **rename it to `<name>-bak.<ext>`** (e.g. `foo.ts` →
181
+ `foo-bak.ts`) and leave it in place. The `-bak` suffix is the only sanctioned
182
+ way to retire a file; the repo may be scanned for history or references later.
package/CHANGELOG.md CHANGED
@@ -1,50 +1,95 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.3.5] - 2026-11-16
4
+
5
+ ### Fixed
6
+
7
+ - `reversePath()` no longer loses the `Z` of a sub-path ([#65](https://github.com/thednp/svg-path-commander/issues/65)) — the reversal was applied to the whole path as a single shape, so the `M`/`Z` pairs of the sub-paths were mixed up and the closing command was dropped; e.g. `reversePath("M0 0L10 0L10 10Zm4 4")` returned `M4 4M0 0M10 10L10 0L0 0` instead of `M10 10L10 0L0 0ZM4 4`; every sub-path is now reversed on its own and the sub-paths keep their original order, so the static method returns the same result as the `reverse()` instance method (this was still broken in 2.3.4)
8
+ - `reversePath()` no longer throws for an empty path — it returns an empty array, like the other static methods
9
+ - No `dist` bundle contains `istanbul` comments anymore (except for the source maps) — the bundled `@thednp/dommatrix` shipped its coverage hints with the `@preserve` suffix, which the bundlers treat as a legal-comment marker, so the comment survived the minification of the UMD bundle
10
+
11
+ ### Changed
12
+
13
+ - The `istanbul` coverage hints no longer carry the `@preserve` suffix — the suffix is a legal-comment marker for the bundlers, not a coverage hint
14
+ - Removed dependencies: `vite-plugin-strip-comments` — the comments are now stripped by the bundler itself through `outputOptions.comments`; the `vite` and `tsdown` packages are no longer direct dev dependencies (`vite-plus` provides them), and the browser provider comes from `vite-plus/test/browser-playwright`
15
+ - Updated dependencies: `@thednp/dommatrix` `^3.1.4` — the dependency is now published with its comments stripped, so the `dist` bundles no longer carry its `istanbul` comments
16
+ - Rebuilt `dist` and `docs` bundles
17
+
18
+ ## [2.3.4] - 2026-11-15
19
+
20
+ ### Fixed
21
+
22
+ - `getPathBBox()` returned mirrored extrema for elliptical arcs rotated by more than 90 degrees ([#65](https://github.com/thednp/svg-path-commander/issues/65)) — `getArcBBox()` (`src/math/arcTools.ts:440`) assumed the same extremum order for the X and Y axis, but the extrema swap sides when `cos(alpha) < 0`, so e.g. `M-4 0A22 5 156 0 0 3 -21` reported `[-34.21, -21, 3, 6.26]` instead of `[-4, -27.26, 33.21, 0]`
23
+ - `S`/`s` smooth-cubic shorthand no longer reflects a control point that does not exist ([#65](https://github.com/thednp/svg-path-commander/issues/65)) — per the SVG spec the control point of an `S` is only reflected when the previous command is a `C`/`c`/`S`/`s`, otherwise it coincides with the current point; `normalizePath()`, `pathToCurve()` and `optimizePath()` read the reflectable control point from the previous segment whatever its type, so an `S` after a `Q` or an `A` reflected a quadratic control point or even an arc flag, and a legitimate `0` coordinate was treated as a missing value
24
+ - `reversePath()` no longer produces `NaN` coordinates for a path with a trailing moveto or a segment following a `Z` ([#65](https://github.com/thednp/svg-path-commander/issues/65)) — the previous point was read from the previous segment, which has no coordinates for a `Z` segment
25
+ - `reverse()` no longer collapses the control points of an `S` segment that is not preceded by a cubic ([#66](https://github.com/thednp/svg-path-commander/issues/66)) — the reversed segment kept the `S` shorthand although the reflected control point cannot be recovered from the previous segment of the reversed path, so the control points collapsed onto the current point and the path length changed
26
+ - `optimize()` no longer rewrites a cubic as a smooth cubic when the control points do not match ([#66](https://github.com/thednp/svg-path-commander/issues/66)) — `shortenSegment()` (`src/process/shortenSegment.ts:54`) checked a second, unrelated condition that ignored the control points of the cubic, so any cubic following a segment whose control point matched its end point was shortened to an `s`, changing the shape of the path
27
+
28
+ ### Changed
29
+
30
+ - `ParserParams.x2` / `ParserParams.y2` are now `number | null`, `null` marks a previous segment without a reflectable control point (the same sentinel used by `ParserParams.qx` / `ParserParams.qy`)
31
+ - `normalizeSegment()` accepts the command of the previous segment as an optional third argument, required to tell a reflectable control point from a missing one
32
+ - Migrated the toolchain from pnpm to Vite+ (`vp`) — the `package.json` scripts now run through `vp` / `vpr` (`vp test`, `vp pack`, `vp lint src`, `vp fmt src`), the docs are served with `vp dev docs --port 3000`, the shared dependencies are pinned through the `catalog:` in `pnpm-workspace.yaml` and the GitHub Actions workflows are driven by the `voidzero-dev/setup-vp` action (`vpr lint`, `vpr build`, `vpr test`, `vp pm publish`)
33
+ - The source is now formatted with oxfmt (`vp fmt src`) instead of `deno fmt src`, and linted with oxlint (`vp lint src`) instead of `deno lint src`; `deno lint` / `deno check` still gate the JSR publish
34
+ - The `lint` script now runs the type check as well (`vpr lint:ts && vpr check:ts`), so `vpr lint` covers both oxlint and `tsc --noEmit`
35
+ - Updated dev dependencies: `vitest` / `@vitest/*` `5.1.0`, `vite-plus` `1.6.0`, `happy-dom` `^21.0.4`, `playwright` `^1.65.1`, `@types/node` `^26.6.6` — `tsdown` is no longer a direct dev dependency, `vite-plus` provides it, and the browser provider comes from `vite-plus/test/browser-playwright`
36
+ - Updated dependencies: `@thednp/dommatrix` `^3.1.3`
37
+ - Rebuilt `dist` and `docs` bundles
38
+
3
39
  ## [2.3.3] - 2026-09-02
4
40
 
5
41
  ### Changed
42
+
6
43
  - Updated dependencies: `@thednp/dommatrix` `^3.1.2`
7
44
 
8
45
  ## [2.3.2] - 2026-09-02
9
46
 
10
47
  ### Fixed
48
+
11
49
  - `T`/`t` smooth-quadratic shorthand without a preceding `Q`/`q`/`T`/`t` now correctly uses the current point as control point per the SVG spec ([#64](https://github.com/thednp/svg-path-commander/pull/64), thanks @nattyluke) — `normalizeSegment` (`src/process/normalizeSegment.ts:4`), `getPathBBox` (`src/util/getPathBBox.ts:12`) and `getTotalLength` (`src/util/getTotalLength.ts:12`) previously reflected a `0`-defaulted control point, so a `t` following a non-`Q` command (e.g. Illustrator `c...t` output) produced an inflated control/bbox/length (thanks @nattyluke)
12
50
 
13
51
  ### Changed
52
+
14
53
  - Updated dev dependencies: `@types/node` `^26.4.1`, `vitest` / `@vitest/*` `^4.1.11`, `happy-dom` `^20.12.2`, `vite` `^8.2.2`
15
54
  - Rebuilt `dist` and `docs` bundles
16
55
 
17
56
  ## [2.3.1] - 2026-08-05
18
57
 
19
58
  ### Changed
59
+
20
60
  - Updated `@thednp/dommatrix` to `^3.1.1` — the 3.1.x line carries the shim's matrix-math rework (specialized `translate` / `scale` / `skew` / `multiply` and constructor fast paths), which directly accelerates the 3D transform path through `getSVGMatrix()` and `projection2d()`; 3.1.1 makes `setMatrixValue()` mutate the instance in place and return `this`, matching native `DOMMatrix` (SVGPathCommander does not use `setMatrixValue()`, so output is byte-identical and the 2D single-pass fast path is untouched)
21
61
  - Rebuilt `dist` and `docs` bundles
22
62
 
23
63
  ## [2.3.0] - 2026-08-04
24
64
 
25
65
  ### Added
66
+
26
67
  - `pnpm bench` — head-to-head benchmark against the [SvgPath](https://github.com/fontello/svgpath) library (vendored reference in `scripts/svgpath/`), comparing parse / bbox / transform / string output, with results embedded in the README
27
68
 
28
69
  ### Changed
70
+
29
71
  - **Performance**: allocation-free parsing — `scanParam()` converts validated number substrings without allocating new strings, `finalizeSegment()` builds segments with pre-sized arrays and index-based slicing instead of `splice()`
30
72
  - **Performance**: single-pass 2D transforms — `transformPath()` now uses a dedicated `transform2D()` fast path that transforms segments in place (no per-segment absolutize / copy / DOMMatrix projection), falling back to the 3D-capable `iterate()` path for 3D matrices; output is byte-identical to the previous implementation (~2.8x faster 2D transforms)
31
73
  - **Performance**: fast 2D branch in `projection2d()`, char-code based command detection in `iterate()` / `getPathBBox()`, allocation-free rounding in `pathToString()`, and a dedicated `C` case in `absolutizeSegment()`
32
74
  - Rebuilt `dist` and `docs` bundles
33
75
 
34
76
  ## [2.2.4] - 2026-08-04
77
+
35
78
  ### Fixed
79
+
36
80
  - Build warnings: UMD bundle now uses a dedicated `src/browser.ts` entry so the `SVGPathCommander` global remains the class itself (no mixed-exports namespace), and the `output.dir`/`output.file` conflict is resolved — tree-shaking, named exports and type declarations are unaffected
37
81
  - ESM bundle exports the `SVGPathCommander` named export alongside the default, with all types available in `dist/index.d.ts`
38
82
 
39
-
40
83
  ## [2.2.3] - 2026-08-04
41
84
 
42
85
  ### Added
86
+
43
87
  - Named `SVGPathCommander` export alongside the default export for better JSR documentation rendering
44
88
  - Full JSDoc coverage for all class statics, instance properties, getters and every interface / type member — zero undocumented symbols per `deno doc --json` on both `index` and `util` entry points
45
89
  - JSR `./util` subpath export in `deno.json`, mirroring the npm `svg-path-commander/util` entry
46
90
 
47
91
  ### Changed
92
+
48
93
  - Documentation moved from the GitHub wiki into the repository `wiki/` folder — the GitHub-hosted wiki pages are no longer available, and the README and wiki pages now reference the local `wiki/` folder instead
49
94
  - Merged `NPM.md` and `JSR.md` into a single `Installation.md` (npm, pnpm, bun, Deno/JSR and CDN installation)
50
95
  - Updated `Usage-Examples.md` with corrected output values verified against the current implementation
@@ -53,12 +98,14 @@
53
98
  ## [2.2.2] - 2026-08-03
54
99
 
55
100
  ### Added
101
+
56
102
  - `getBezierLengthAtT()` / `bezierLengthAtT()` — arc length up to a `t` ratio via Gauss-Legendre quadrature
57
103
  - `arcLength()` / `arcLengthAtAngle()` / `arcLengthBetween()` — Gauss-Legendre ellipse arc length helpers
58
104
  - Static-method cross-consistency tests (length/point lookup, conversions, transforms, geometry measurements, intersections)
59
105
  - Native browser API parity tests — `getBBox()`, `getTotalLength()`, `getPointAtLength()` verified against real Chromium
60
106
 
61
107
  ### Fixed
108
+
62
109
  - `getPointAtLength()` returning the start of the next segment at interior distances on a `Z` (closing line) segment (#61)
63
110
  - `getPointAtLength()` returning stale coordinates for distances beyond the path end
64
111
  - Arc length accuracy for `getTotalLength()` and `getPointAtLength()` (Gauss-Legendre quadrature)
@@ -66,6 +113,7 @@
66
113
  - Deno minimum-dependency-age policy blocking fresh `@thednp/dommatrix` releases — `minimumDependencyAge` disabled in `deno.json` (mirrors the pnpm `minimumReleaseAgeExclude` in `pnpm-workspace.yaml`)
67
114
 
68
115
  ### Changed
116
+
69
117
  - Migrated tests to Vitest browser mode (Playwright Chromium) with Istanbul coverage — 100% line, branch, function and statement coverage
70
118
  - Updated test fixtures and expected values to match the current implementation
71
119
  - Rebuilt `dist` and `docs` bundles
@@ -73,20 +121,24 @@
73
121
  - Upgraded `@thednp/dommatrix` to v3.0.6 and toolchain (tsdown, Vite, Vitest, pnpm 11)
74
122
 
75
123
  ### Added
124
+
76
125
  - `llms.txt` with an LLM-friendly project summary
77
126
  - README installation section for JSR (`deno add jsr:@thednp/svg-path-commander`, raw TypeScript import) and JSR badge fix
78
127
 
79
128
  ## [2.2.1] - 2026-04-06
80
129
 
81
130
  ### Added
131
+
82
132
  - Reorganized intersection tools into `src/intersect/` — `pathsIntersection()`, `boundingBoxIntersect()`, `isPointInsideBBox()`, `interHelper()`
83
133
 
84
134
  ### Changed
135
+
85
136
  - tsdown config and CI workflow versions, `.npmignore` cleanup, demo fixes
86
137
 
87
138
  ## [2.2.0] - 2026-04-06
88
139
 
89
140
  ### Added
141
+
90
142
  - **Path intersection** — `pathsIntersection()`, `boundingBoxIntersect()`, `isPointInsideBBox()`
91
143
  - **Path equalization** — `equalizePaths()`, `equalizeSegments()` for matching segment counts
92
144
  - Full JSDoc coverage with `@param`, `@returns`, `@example` tags
@@ -96,13 +148,16 @@
96
148
  - CHANGELOG.md and AGENTS.md
97
149
 
98
150
  ### Removed
151
+
99
152
  - badge workflow and script in package.json
100
153
 
101
154
  ### Fixed
155
+
102
156
  - **pathToCurve** inconsistencies
103
157
  - reworked all exports as named exports
104
158
 
105
159
  ### Changed
160
+
106
161
  - Added a separate export for utilities in `svg-path-commander/util`
107
162
  - Migrated test runner from Playwright to happy-dom
108
163
  - updated tests
package/LICENSE CHANGED
File without changes