mirror of
https://github.com/quartz-community/types.git
synced 2026-07-22 02:50:26 +00:00
No description
- Add ContentDetails and ContentIndex types to src/index.ts - Create globals.d.ts with declare global block for Window, Document, CustomEventMap, and fetchData - Export globals.d.ts via package.json files and exports map - Enables community plugins to reference centralized type declarations |
||
|---|---|---|
| dist | ||
| src | ||
| .gitignore | ||
| globals.d.ts | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
@quartz-community/types
Type definitions for Quartz community plugins. This package provides TypeScript interfaces and types that mirror the internal Quartz types, enabling external plugins to have full type safety without depending on the core Quartz package.
Installation
npm install @quartz-community/types
Usage
import {
QuartzComponent,
QuartzComponentProps,
ExplorerOptions,
} from "@quartz-community/types";
const MyComponent: QuartzComponent = (props: QuartzComponentProps) => {
// Component implementation
};
MyComponent.css = `
.my-component { /* styles */ }
`;
MyComponent.afterDOMLoaded = `
// Client-side script
`;
Included Types
- Component Types:
QuartzComponent,QuartzComponentProps,StringResource - Plugin Types:
QuartzTransformerPlugin,QuartzFilterPlugin,QuartzEmitterPlugin - Data Types:
FileTrieNode,ContentIndex,ContentIndexEntry - Component Options:
ExplorerOptions,GraphOptions,SearchOptions,D3Config - Utility Types:
HTMLAttributes,EventHandler,CleanupFunction,ClassValue
License
MIT