Commit graph

89 commits

Author SHA1 Message Date
saberzero1
0f4c1a233c
chore(deps): update @quartz-community/utils 2026-06-03 15:30:51 +02:00
saberzero1
e0ebef9f80
chore: regenerate package-lock.json 2026-05-24 17:33:03 +02:00
saberzero1
b6d7e80865
fix: use SPA navigation for Enter key instead of full page reload 2026-05-24 17:22:52 +02:00
saberzero1
bf319becff
fix: prefer heading matches over body text in scroll-to-search-term
Previously, scrollToSearchTerm always scrolled to the first DOM occurrence
of the search term. Now it checks headings first, then body text, so
navigating from a search result that matched a heading correctly scrolls
to that heading instead of an earlier body occurrence.
2026-05-24 16:56:12 +02:00
saberzero1
285d90a15c
fix: preserve highlight spans in search results while sanitizing other HTML
Title and content use innerHTML with a whitelist that only allows <span>
tags (used by the highlight function). All other HTML is stripped.
Tags use pre-escaped content from highlightTags with trusted structural markup.
2026-05-24 16:46:46 +02:00
saberzero1
3190d76f5d
chore: remove vestigial @jackyzha0/quartz peerDependency 2026-05-24 16:24:33 +02:00
saberzero1
d0b64d99ea
fix: sanitize search result innerHTML to prevent XSS 2026-05-24 16:21:07 +02:00
saberzero1
f63b8957e6
docs: add missing defaultOptions and optionSchema to package.json manifest 2026-05-22 20:06:19 +02:00
saberzero1
eb8be82f19
build: bundle dependencies and ship pre-built dist 2026-04-27 21:38:25 +02:00
saberzero1
5b2c55674b
build: bundle dependencies and ship pre-built dist 2026-04-27 21:38:25 +02:00
saberzero1
245cb32b1f
deps: update @quartz-community/utils 2026-04-22 18:19:27 +02:00
saberzero1
affe1296a2
deps: update @quartz-community/utils 2026-04-17 02:41:27 +02:00
saberzero1
df4528099f
deps: update @quartz-community/utils 2026-04-16 22:11:09 +02:00
saberzero1
8fc4cf210a
deps: update @quartz-community/types and @quartz-community/utils 2026-04-16 13:30:24 +02:00
saberzero1
6940ceb2d6
feat: listen for content-index-updated to incrementally index new entries
Subscribe to the content-index-updated CustomEvent and incrementally add
newly-patched entries to the FlexSearch index. The existing indexInitialized
memoization is preserved -- no full rebuild, just additive inserts via
index.addAsync(), plus updates to idDataMap, contentData, and allTags.

This enables runtime extension of the search index by other plugins. The
primary consumer is @quartz-community/encrypted-pages, which patches the
resolved fetchData object with decrypted entries from its shadow content
index and dispatches content-index-updated so users can find and open
decrypted pages via search within the same browser session.

Non-fatal: the listener swallows errors from the in-place fetchData read
and continues with whatever content-index data was loaded originally.
2026-04-11 13:49:38 +02:00
saberzero1
1a6b49d662
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:51 +02:00
saberzero1
24fa5d9477
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:48 +02:00
saberzero1
2207e2d57e
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:45 +02:00
saberzero1
81863399cd
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:42 +02:00
saberzero1
dfac501077
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:39 +02:00
saberzero1
3c51a807e3
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:36 +02:00
saberzero1
915e17c55a
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:34 +02:00
saberzero1
de0cabf85e
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:30 +02:00
saberzero1
0d23699969
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:27 +02:00
saberzero1
1d503d49d9
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:24 +02:00
saberzero1
905d179132
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:21 +02:00
saberzero1
6d52c3ef22
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:15 +02:00
saberzero1
fc5b228c98
i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:35:11 +02:00
saberzero1
e76ad13509
refactor: use shared classNames from @quartz-community/utils 2026-04-03 19:17:34 +02:00
saberzero1
db1c8b9368
deps: update @quartz-community/types and @quartz-community/utils 2026-04-03 16:20:45 +02:00
saberzero1
fa489e37d6
fix: boost sidebar z-index to 9999 when search opens to ensure modal is above all content 2026-03-30 00:36:49 +02:00
saberzero1
14b1e9e7e4
fix: resolve callout z-index overlay and scroll-to-term across element boundaries
- Set sidebar z-index to auto when search opens to break stacking context
  that trapped the fixed search modal behind page content
- Rewrite scroll-to-search-term to search textContent of block-level
  elements and walk text nodes to build cross-element Range, handling
  terms that span multiple inline elements
2026-03-30 00:32:19 +02:00
saberzero1
871c7aafb9
feat: scroll to search term on destination page after navigation
Store search term in sessionStorage when clicking a result, then on
page load find the first matching text, highlight it with a fade-out
animation, and scroll it into view.
2026-03-30 00:22:01 +02:00
saberzero1
93c2c43b21
fix: use direct scrollTop on preview container instead of scrollIntoView 2026-03-30 00:17:55 +02:00
saberzero1
8ee304a73a
fix: defer scroll-to-highlight with requestAnimationFrame for proper layout timing 2026-03-30 00:11:04 +02:00
saberzero1
20db57310a
fix: hide card description on desktop with preview, scroll focused results into view 2026-03-30 00:01:13 +02:00
saberzero1
4cfc4b2110
feat: overhaul search with multi-tag support, autocomplete, and quality fixes
- Fix highlight() trim bug: slice tokenized text array, correct window math
- Fix memory leak: use event delegation instead of per-element listeners
- Fix XSS: escape content with escapeHTML before innerHTML insertion
- Add multi-tag search (#tag1 #tag2 query) with AND filtering
- Add tag autocomplete dropdown with keyboard navigation
- Add inline ghost text for selected tag suggestion
- Add configurable result ordering via fieldPriority option
- Add scroll-to-highlight in preview panel
- Add ARIA attributes (listbox, option, aria-expanded, aria-label)
- Add error handling in fetchContent (try/catch, !res.ok check)
- Add 150ms debounce on preview updates
- Add index initialization guard for tag dropdown
- Use parallel index filling (Promise.all)
- Remove debug console.log statements
- Restore button refocus after hiding search
- Use CSS custom property for z-index management
- Add max-height constraint for mobile results
- Update all 6 locales with ellipsis placeholder and tag search strings
- Export SearchField type
2026-03-29 15:44:17 +02:00
saberzero1
b40d509e85
fix: move tsconfig from dts object to top-level option
The DtsConfig type in tsup does not have a tsconfig property.
Use top-level tsconfig option instead of dts: { tsconfig: ... }.
2026-03-22 13:25:12 +01:00
saberzero1
9220c76dd5
fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
saberzero1
41c50effd3
chore: update @quartz-community/utils to 8d2e14b 2026-03-22 12:38:26 +01:00
saberzero1
e335e9b103
deps: update @quartz-community/utils to latest 2026-03-22 12:05:22 +01:00
saberzero1
efe696e1d5
fix: resolve links correctly on subdirectory deployments
Use resolveBasePath() from @quartz-community/utils/path to prepend the
base path when navigating via search results. Fixes links resolving to
the domain root instead of the subdirectory.
2026-03-18 11:50:34 +01:00
saberzero1
edb7dbb601
chore: set tsup platform to node
Plugins run server-side during the Quartz build step, not in the
browser. Setting platform: 'node' tells esbuild to treat Node builtins
as available externals and avoids CJS-in-ESM require() failures for
any bundled dependencies that use Node APIs.
2026-03-17 20:41:14 +01:00
saberzero1
e7ffc62188
ci: add dist externals verification step 2026-03-17 19:41:48 +01:00
saberzero1
a00dd1f5a7
fix: bundle non-shared deps into dist to prevent runtime resolution failures
Move non-allowlisted packages from dependencies/peerDependencies to
devDependencies so tsup bundles them into dist/ instead of leaving
them as external imports that may not resolve at runtime.
2026-03-17 19:31:51 +01:00
saberzero1
d17eab96c5
fix: use fetchData global for path-prefixed deployments
- Update types/globals.d.ts with centralized type declarations
- Use fetchData global instead of hardcoded /static/contentIndex.json
- Revert @quartz-community/types from file:../types to github:quartz-community/types
- Add .prettierignore, update .eslintrc.json with triple-slash-reference override
- Remove duplicate scripts.d.ts/styles.d.ts
2026-03-16 18:54:25 +01:00
saberzero1
fe07e645cc
fix: add flexsearch and utils transitive deps to devDependencies for build
flexsearch is imported by the inline script and bundled by esbuild at
build time. github-slugger and hast-util-to-jsx-runtime are transitive
dependencies of @quartz-community/utils needed by the inline script
bundler. Without these as devDependencies, the tsup build fails to
resolve imports and only emits .d.ts files (no .js output).
2026-03-14 22:16:02 +01:00
saberzero1
5f2df462c9
chore: commit dist/ and remove prepare script
Pre-built output is now committed to the repository so that
Quartz can skip the build step during plugin installation.
The prepare script is removed to prevent redundant builds
when installing from npm/git.
2026-03-14 22:01:25 +01:00
saberzero1
4392652830
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. Dependencies already available from the
host Quartz installation are moved to peerDependencies to avoid duplication.
2026-03-14 21:27:36 +01:00
saberzero1
e9c10e521b
feat: add render event listener for in-place DOM re-initialization 2026-03-12 19:45:41 +01:00