refactor(util/path): re-export normalizeHastElement from @quartz-community/utils

The normalizeHastElement helper and its internal _rebaseHastElement
have been promoted to @quartz-community/utils so that plugins can
consume the same cross-slug HAST rebasing logic Quartz core uses
for transclude expansion. Previously they lived only in Quartz's
internal util/path module, which out-of-tree plugins (e.g.
canvas-page, whose buildEmbeddedContent embeds vfile.data.htmlAst
from arbitrary pages) could not import from.

normalizeRelativeURLs and its DOM-element sibling _rebaseHtmlElement
stay local - those operate on DOM Elements at runtime, not HAST AST
nodes, and belong with Quartz's DOM-specific code.
This commit is contained in:
saberzero1
2026-04-17 02:27:48 +02:00
parent f711071020
commit 17d5ae76bf
2 changed files with 2 additions and 35 deletions

2
package-lock.json generated
View File

@@ -1857,7 +1857,7 @@
},
"node_modules/@quartz-community/utils": {
"version": "0.1.0",
"resolved": "git+ssh://git@github.com/quartz-community/utils.git#4dda81bc82b90f5bceaa3582e81547ce41cc581b",
"resolved": "git+ssh://git@github.com/quartz-community/utils.git#83f824b0ad495ae24b7f3524dd2049da76d24c2c",
"dev": true,
"license": "MIT",
"dependencies": {