mirror of
https://github.com/quartz-community/latex.git
synced 2026-07-22 02:50:29 +00:00
fix: centralize type declarations and add missing dependency
- Update types/globals.d.ts with centralized type declarations - Add @myriaddreamin/rehype-typst as devDependency - Add .prettierignore, update .eslintrc.json with triple-slash-reference override
This commit is contained in:
parent
32abcd87e8
commit
07df2ef097
5 changed files with 276 additions and 2 deletions
|
|
@ -22,5 +22,13 @@
|
|||
"caughtErrorsIgnorePattern": "^_"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["types/**/*.d.ts"],
|
||||
"rules": {
|
||||
"@typescript-eslint/triple-slash-reference": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
dist
|
||||
228
package-lock.json
generated
228
package-lock.json
generated
|
|
@ -12,6 +12,7 @@
|
|||
"@quartz-community/types": "github:quartz-community/types"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@myriaddreamin/rehype-typst": "^0.7.0-rc2",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@types/mdast": "^4.0.4",
|
||||
|
|
@ -836,6 +837,233 @@
|
|||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/rehype-typst": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/rehype-typst/-/rehype-typst-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-LYRHKk6RfB9+ygDpQqYSdOjNR4063ed9ZhKHBJLb7dQ7wv81EJi5wp2sHfvGspe4Xyg/Fj26JXZ286xak2PtVA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@myriaddreamin/typst-ts-node-compiler": "^0.7.0-rc2",
|
||||
"@types/hast": "^3.0.0",
|
||||
"@types/katex": "^0.16.0",
|
||||
"hast-util-from-html-isomorphic": "^2.0.0",
|
||||
"hast-util-to-text": "^4.0.0",
|
||||
"https-proxy-agent": "^7.0.2",
|
||||
"unist-util-visit-parents": "^6.0.0",
|
||||
"vfile": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler/-/typst-ts-node-compiler-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-a4Vicil6Tu0S87C3+J2EMtFDdQEmT18zYAW6Srmt32lgjrTq3HLy+WN0lA/bgaBgw2wNEkXdogz3yRg49vXs8w==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@myriaddreamin/typst-ts-node-compiler-android-arm-eabi": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-android-arm64": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-darwin-arm64": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-darwin-x64": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-linux-x64-musl": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc": "0.7.0-rc2",
|
||||
"@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc": "0.7.0-rc2"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-android-arm-eabi": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-android-arm-eabi/-/typst-ts-node-compiler-android-arm-eabi-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-OnfUH3XbGel3+QUZc4G3+V1npXYGCDc3b7WhFw88ihCH/Xpw+NNjidLrFkY6kK2a5vVHnY2AEG0hJSwZzvOw0Q==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-android-arm64": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-android-arm64/-/typst-ts-node-compiler-android-arm64-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-LR76t0jXcKp0F0vMViinS6+RBxyTFqBUFiUoZcGRPQD/DhLNBReTS7tJ14Jp5Mwuqe76RUshSeQSrKbJUoaQ3A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-darwin-arm64": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-darwin-arm64/-/typst-ts-node-compiler-darwin-arm64-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-xJndoR6Kn6UUYQDui41R7tx/avpfyY6c8dV5udyHP5FkeUSVgRAoFcjOtlI9Lpc84alFusIPwp4QR6V+xjOAhA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-darwin-x64": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-darwin-x64/-/typst-ts-node-compiler-darwin-x64-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-kmh37eshR40LVAM6P59uLWEYt5ffyUhKWcBOzsd/1QYNtsH28kLRUOShugAdxQN164Re+47z2nkSgd7HejASFg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf/-/typst-ts-node-compiler-linux-arm-gnueabihf-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-giroa96wdN0mxARN1NbRrKp9t+qqUNUSBzWBQp1RMPqGNPwtahEqJnpf5zmRSrEJYhEzVZbs9+CwxFjj5lw7VQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu/-/typst-ts-node-compiler-linux-arm64-gnu-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-pDdc6hQrGdqr0BT+nNe0tJmdcmyp9yhn3WDeGlTi4YpYG2IybP7fBVIwDI3Mzr/IdCMtPbQxew4AfmAoJwIz6A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-arm64-musl/-/typst-ts-node-compiler-linux-arm64-musl-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-wNEYhpjuwnhd7VrArL4EHd652z8YEGxG6C8haUjkVhGseFBetrL51yD1Ymg5fWEa+3+O4oZ1+IUN0Fu4/fKgHw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-x64-gnu/-/typst-ts-node-compiler-linux-x64-gnu-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-Z4i78r5MtFDYGHqgYrWfAcvqb3xW49WlLI35l1G818lYmkmGZAjAkVKb946ChOx+bBQIuMWefykCABLOlBkgKA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-linux-x64-musl": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-linux-x64-musl/-/typst-ts-node-compiler-linux-x64-musl-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-PXteqxa3RITEh5v3lQ4c5VGn16KHvUKVXjSZ2BudCe6C0gEuOO16JS9JU8DZVwd0dbtH0Mky6Q5V7tf6erpXGA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc/-/typst-ts-node-compiler-win32-arm64-msvc-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-wN1tjdRxabJzT8WuDVdOs2QKQuMzKht3QWPU/H7OjuDta1WcrYs/3IKnF67HNiphe/33MU8bKeih2GBVU+AuLg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc": {
|
||||
"version": "0.7.0-rc2",
|
||||
"resolved": "https://registry.npmjs.org/@myriaddreamin/typst-ts-node-compiler-win32-x64-msvc/-/typst-ts-node-compiler-win32-x64-msvc-0.7.0-rc2.tgz",
|
||||
"integrity": "sha512-6DUe2iepqptLkJsOdUC4yHWM3/USCW82YieA+lPAeky37XSJ5KuLuLL6zOQiQt3IWot7jB+m9oKIvBqJh7yriA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"@jackyzha0/quartz": "^4.5.2",
|
||||
"preact": "^10.0.0",
|
||||
"@myriaddreamin/rehype-typst": "^0.5.0",
|
||||
"preact": "^10.0.0",
|
||||
"rehype-katex": "^7.0.1",
|
||||
"rehype-mathjax": "^6.0.0",
|
||||
"remark-math": "^6.0.0"
|
||||
|
|
@ -76,6 +76,7 @@
|
|||
"@quartz-community/types": "github:quartz-community/types"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@myriaddreamin/rehype-typst": "^0.7.0-rc2",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@types/mdast": "^4.0.4",
|
||||
|
|
|
|||
36
types/globals.d.ts
vendored
Normal file
36
types/globals.d.ts
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
declare module "*.scss" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*.inline.ts" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
interface CustomEventMap {
|
||||
nav: CustomEvent<{ url: string }>;
|
||||
prenav: CustomEvent<undefined>;
|
||||
themechange: CustomEvent<{ theme: "light" | "dark" }>;
|
||||
readermodechange: CustomEvent<{ mode: "on" | "off" }>;
|
||||
render: CustomEvent<object>;
|
||||
}
|
||||
|
||||
interface Document {
|
||||
addEventListener<K extends keyof CustomEventMap>(
|
||||
type: K,
|
||||
listener: (this: Document, ev: CustomEventMap[K]) => void,
|
||||
): void;
|
||||
removeEventListener<K extends keyof CustomEventMap>(
|
||||
type: K,
|
||||
listener: (this: Document, ev: CustomEventMap[K]) => void,
|
||||
): void;
|
||||
dispatchEvent<K extends keyof CustomEventMap>(ev: CustomEventMap[K] | UIEvent): void;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
addCleanup(fn: (...args: unknown[]) => void): void;
|
||||
spaNavigate?(url: URL, isBack: boolean): Promise<void>;
|
||||
}
|
||||
|
||||
declare const fetchData: Promise<Record<string, unknown>>;
|
||||
Loading…
Reference in a new issue