From 3bfc360faec2ec20c5295542b662bb39e2d2d8c4 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Sat, 7 Feb 2026 06:16:49 +0100 Subject: [PATCH] fix: use any for all types to avoid Quartz type conflicts --- src/components/Explorer.tsx | 56 +++++++++++-------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/src/components/Explorer.tsx b/src/components/Explorer.tsx index 593720d..304851c 100644 --- a/src/components/Explorer.tsx +++ b/src/components/Explorer.tsx @@ -1,37 +1,28 @@ import type { VNode, JSX } from "preact"; import OverflowListFactory from "./OverflowList"; -// Local type definitions to match Quartz interfaces -// These mirror the types from @jackyzha0/quartz for build-time checking - -type QuartzPluginData = { - slug: string; - title: string; - filePath: string; - [key: string]: any; -}; - -type BuildCtx = { - cfg: any; - allFiles: any[]; - [key: string]: any; -}; - -type StaticResources = { - css: Array<{ content: string }>; - js: Array<{ src?: string; content?: string; loadTime: string; moduleType?: string }>; -}; - type StringResource = string | undefined; +interface FileTrieNode { + isFolder: boolean; + children: FileTrieNode[]; + data: any; + slugSegment: string; + displayName: string; + slug: string; + filter(filterFn: (node: FileTrieNode) => boolean): void; + map(mapFn: (node: FileTrieNode) => void): void; + sort(sortFn: (a: FileTrieNode, b: FileTrieNode) => number): void; +} + export type QuartzComponentProps = { - ctx: BuildCtx; - externalResources: StaticResources; - fileData: QuartzPluginData; + ctx: any; + externalResources: any; + fileData: any; cfg: any; - children: any[]; + children: any; tree: any; - allFiles: any[]; + allFiles: any; displayClass?: "mobile-only" | "desktop-only"; } & JSX.IntrinsicAttributes & { [key: string]: any; @@ -47,19 +38,6 @@ export type QuartzComponentConstructor QuartzComponent; -// Simplified FileTrieNode interface for the external component -interface FileTrieNode { - isFolder: boolean; - children: FileTrieNode[]; - data: QuartzPluginData | null; - slugSegment: string; - displayName: string; - slug: string; - filter(filterFn: (node: FileTrieNode) => boolean): void; - map(mapFn: (node: FileTrieNode) => void): void; - sort(sortFn: (a: FileTrieNode, b: FileTrieNode) => number): void; -} - export function concatenateResources(...resources: (string | undefined)[]): string { return resources.filter((r): r is string => !!r).join("\n"); }