Commit graph

10 commits

Author SHA1 Message Date
saberzero1
20b1ac1844
feat: add getDate and byDateAndAlphabetical sort utilities 2026-04-03 15:39:35 +02:00
saberzero1
8b6e32ba07
feat: add formatDate and getIconCode utility exports 2026-04-03 15:04:35 +02:00
saberzero1
81189f697c
chore: commit dist/ and remove prepare script
With build tools (tsup, typescript) moved to devDependencies, the prepare
script can no longer build when npm fetches this package from GitHub (npm
does not install devDependencies for git dependencies). Commit the pre-built
dist/ output so GitHub-based installs work without a build step.
2026-03-14 21:30:17 +01:00
saberzero1
61cbfb9807
chore: move build tools to devDependencies, shared deps to peerDependencies
tsup and typescript are only needed at build time — move to devDependencies
so they can be pruned after build. hast-util-to-jsx-runtime and github-slugger
are available from the host Quartz installation — move to peerDependencies
to avoid duplication across 42+ plugins.
2026-03-14 21:26:13 +01:00
saberzero1
98ee433a93
feat: add htmlToJsx wrapper for safe HAST-to-JSX rendering
Provides a wrapped toJsxRuntime that prevents HTML-escaping of <style>
and <script> content by using dangerouslySetInnerHTML overrides.
Exported as @quartz-community/utils/jsx entry point.
2026-03-08 19:25:27 +01:00
saberzero1
eaa6160504
fix: move tsup and typescript to dependencies for git install compatibility
When installed as a git dependency, npm skips devDependencies. Since
dist/ is gitignored and the prepare script needs tsup to build, these
must be regular dependencies so the prepare hook works on install.
2026-02-22 22:05:35 +01:00
saberzero1
15d75b89e1
fix: use FullSlug/FilePath types from @quartz-community/types for type compatibility
Import branded types from the canonical types package instead of
re-defining them with different brand names. This ensures plugins
using both @quartz-community/types and @quartz-community/utils
have structurally compatible FullSlug and FilePath types.
2026-02-13 22:28:05 +01:00
saberzero1
d4a5e3b97d
feat: add path utilities, escape helpers, and capitalize for transformer plugins
Add splitAnchor, transformLink, transformInternalLink, resolveRelative,
pathToRoot, slugifyFilePath, slugTag, FilePath type, and various type
guards to path.ts. Add escapeHTML/unescapeHTML in new escape.ts module.
Add capitalize to lang.ts. Add github-slugger dependency.
2026-02-13 22:24:41 +01:00
saberzero1
61970ce89f
feat: migrate to shared utility library
- Remove plugin template code
- Add path utilities (simplifySlug, joinSegments, etc.)
- Add DOM utilities (removeAllChildren, registerEscapeHandler)
- Add lang utilities (classNames)
- Update package.json for @quartz-community/utils
- Add tests for path utilities
2026-02-09 12:38:53 +01:00
Emile Bangma
09c5a21ea0
Initial commit 2026-02-09 12:28:32 +01:00