mirror of
https://github.com/quartz-community/external-quartz-leaflet-map-plugin.git
synced 2026-07-22 03:00:24 +00:00
* Port to Quartz v5 Bases view plugin Rewrite the v4 transformer plugin as a v5 Bases view plugin that registers a 'leaflet-map' view type via the bases-page view registry. - Add v5 plugin structure: package.json, tsup.config.ts, tsconfig.json - Add view renderer (src/view.tsx) that builds server-side marker HTML - Add client-side Leaflet initialization (src/scripts/leaflet-map.inline.ts) - Add full Leaflet + custom marker styles (src/styles/leaflet-map.scss) - Add type definitions for view config and marker data (src/types.ts) - Auto-register view on import via viewRegistry.register() - Mark @quartz-community/bases-page as external peer dependency - ESM + DTS build via tsup with inline-script and SCSS loaders * fix: move bases-page from dependencies to devDependencies bases-page must only be a peerDependency at runtime so Node resolves to the host's installed copy. Keeping it as a regular dependency caused npm to install a private copy in node_modules/, creating a separate ViewRegistry instance that never communicated with the host plugin. Now bases-page is a devDependency (needed for TypeScript compilation) and a peerDependency (resolved at runtime from the host). * feat: resolve image paths via transformLink for correct link resolution - Import transformLink and FullSlug from @quartz-community/bases-page - Use slug, allSlugs, linkResolution props from ViewRendererProps - Remove stale ambient module declaration that shadowed real package types - Add @quartz-community/utils and @quartz-community/types as devDependencies * fix: defer ControlContainer class definition to avoid L is not defined at parse time * fix: add CDN fallback and error handling for dependency loading Switch primary CDN from unpkg.com to cdn.jsdelivr.net with unpkg.com as fallback. Add loadScript() helper that tries multiple URLs sequentially. Add try/catch around loadDependencies() in the nav listener with early return when no map elements found, and user-visible error message when all CDN sources fail. Fixes maps not loading when browser content blocking (e.g. Firefox Enhanced Tracking Protection) blocks unpkg.com. * chore: linting * feat: add render event listener for in-place DOM re-initialization * fix: update to bases-page changes * feat: allow plugin views to pass options * Cleanup typing * Remove quartz v4plugin files * Removal of duplicated imports * Cleanup typing * Removal of duplicated imports * chore: commit dist/ and remove prepare script * Update README.md * fix: update to bases-page changes * chore: rebase * Cleanup typing * Removal of duplicated imports * Cleanup typing * Remove quartz v4plugin files * Removal of duplicated imports --------- Co-authored-by: saberzero1 <github@emilebangma.com>
14 lines
258 B
TypeScript
14 lines
258 B
TypeScript
declare module "*.scss" {
|
|
const content: string;
|
|
export default content;
|
|
}
|
|
|
|
declare module "*.inline" {
|
|
const content: string;
|
|
export default content;
|
|
}
|
|
|
|
declare module "*.inline.ts" {
|
|
const content: string;
|
|
export default content;
|
|
}
|