Skip to content

Commit

Permalink
merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xy-241 committed Dec 18, 2024
2 parents 09e7879 + ff9e60a commit bcca32d
Show file tree
Hide file tree
Showing 7 changed files with 223 additions and 261 deletions.
426 changes: 194 additions & 232 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,35 @@
"quartz": "./quartz/bootstrap-cli.mjs"
},
"dependencies": {
"@clack/prompts": "^0.8.1",
"@clack/prompts": "^0.8.2",
"@floating-ui/dom": "^1.6.12",
"@myriaddreamin/rehype-typst": "^0.5.0-rc7",
"@myriaddreamin/rehype-typst": "^0.5.0-rc9",
"@napi-rs/simple-git": "0.1.19",
"@tweenjs/tween.js": "^25.0.0",
"async-mutex": "^0.5.0",
"chalk": "^5.3.0",
"chokidar": "^4.0.1",
"chokidar": "^4.0.2",
"cli-spinner": "^0.2.10",
"d3": "^7.9.0",
"esbuild-sass-plugin": "^3.3.1",
"flexsearch": "0.7.43",
"github-slugger": "^2.0.0",
"globby": "^14.0.2",
"gray-matter": "^4.0.3",
"hast-util-to-html": "^9.0.3",
"hast-util-to-html": "^9.0.4",
"hast-util-to-jsx-runtime": "^2.3.2",
"hast-util-to-string": "^3.0.1",
"is-absolute-url": "^4.0.1",
"js-yaml": "^4.1.0",
"lightningcss": "^1.28.1",
"lightningcss": "^1.28.2",
"mdast-util-find-and-replace": "^3.0.1",
"mdast-util-to-hast": "^13.2.0",
"mdast-util-to-string": "^4.0.0",
"mermaid": "^11.4.0",
"mermaid": "^11.4.1",
"micromorph": "^0.4.5",
"pixi.js": "^8.5.2",
"preact": "^10.24.3",
"preact-render-to-string": "^6.5.11",
"pixi.js": "^8.6.5",
"preact": "^10.25.2",
"preact-render-to-string": "^6.5.12",
"pretty-bytes": "^6.1.1",
"pretty-time": "^1.1.0",
"reading-time": "^1.5.0",
Expand All @@ -84,10 +84,10 @@
"remark-smartypants": "^3.0.2",
"rfdc": "^1.4.1",
"rimraf": "^6.0.1",
"satori": "^0.11.3",
"satori": "^0.12.0",
"serve-handler": "^6.1.6",
"sharp": "^0.33.5",
"shiki": "^1.23.1",
"shiki": "^1.24.2",
"source-map-support": "^0.5.21",
"to-vfile": "^8.0.0",
"toml": "^3.0.0",
Expand All @@ -103,14 +103,14 @@
"@types/d3": "^7.4.3",
"@types/hast": "^3.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.9.0",
"@types/node": "^22.10.2",
"@types/pretty-time": "^1.1.5",
"@types/source-map-support": "^0.5.10",
"@types/ws": "^8.5.13",
"@types/yargs": "^17.0.33",
"esbuild": "^0.24.0",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"tsx": "^4.19.2",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
}
}
6 changes: 3 additions & 3 deletions quartz/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ async function startServing(

const buildFromEntry = argv.fastRebuild ? partialRebuildFromEntrypoint : rebuildFromEntrypoint
watcher
.on("add", (fp) => buildFromEntry(fp, "add", clientRefresh, buildData))
.on("change", (fp) => buildFromEntry(fp, "change", clientRefresh, buildData))
.on("unlink", (fp) => buildFromEntry(fp, "delete", clientRefresh, buildData))
.on("add", (fp) => buildFromEntry(fp as string, "add", clientRefresh, buildData))
.on("change", (fp) => buildFromEntry(fp as string, "change", clientRefresh, buildData))
.on("unlink", (fp) => buildFromEntry(fp as string, "delete", clientRefresh, buildData))

return async () => {
await watcher.close()
Expand Down
6 changes: 3 additions & 3 deletions quartz/components/pages/FolderContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default ((opts?: Partial<FolderContentOptions>) => {
})

const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
const classes = ["popover-hint", ...cssClasses].join(" ")
const classes = cssClasses.join(" ")
const listProps = {
...props,
sort: options.sort,
Expand All @@ -84,8 +84,8 @@ export default ((opts?: Partial<FolderContentOptions>) => {
: htmlToJsx(fileData.filePath!, tree)

return (
<div class={classes}>
<article>{content}</article>
<div class="popover-hint">
<article class={classes}>{content}</article>
<div class="page-listing">
{options.showFolderCount && (
<p>
Expand Down
6 changes: 3 additions & 3 deletions quartz/components/pages/TagContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default ((opts?: Partial<TagContentOptions>) => {
? fileData.description
: htmlToJsx(fileData.filePath!, tree)
const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
const classes = ["popover-hint", ...cssClasses].join(" ")
const classes = cssClasses.join(" ")
if (tag === "/") {
const tags = [
...new Set(
Expand All @@ -50,8 +50,8 @@ export default ((opts?: Partial<TagContentOptions>) => {
tagItemMap.set(tag, allPagesWithTag(tag))
}
return (
<div class={classes}>
<article>
<div class="popover-hint">
<article class={classes}>
<p>{content}</p>
</article>
<p>{i18n(cfg.locale).pages.tagContent.totalTags({ count: tags.length })}</p>
Expand Down
4 changes: 2 additions & 2 deletions quartz/components/styles/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
flex: 0 0 min(30%, 450px);
}

@media all and not ($tablet) {
@media all and not ($mobile) {
&[data-preview] {
& .result-card > p.preview {
display: none;
Expand All @@ -132,7 +132,7 @@
border-radius: 5px;
}

@media all and ($tablet) {
@media all and ($mobile) {
& > #preview-container {
display: none !important;
}
Expand Down
8 changes: 4 additions & 4 deletions quartz/plugins/transformers/ofm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
src = src.toString()
}

src = src.replace(commentRegex, "")
src = (src as string).replace(commentRegex, "")
}

// pre-transform blockquotes
Expand All @@ -165,7 +165,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
src = src.toString()
}

src = src.replace(calloutLineRegex, (value) => {
src = (src as string).replace(calloutLineRegex, (value) => {
// force newline after title of callout
return value + "\n> "
})
Expand All @@ -178,7 +178,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
}

// replace all wikilinks inside a table first
src = src.replace(tableRegex, (value) => {
src = (src as string).replace(tableRegex, (value) => {
// escape all aliases and headers in wikilinks inside a table
return value.replace(tableWikilinkRegex, (_value, raw) => {
// const [raw]: (string | undefined)[] = capture
Expand All @@ -192,7 +192,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
})

// replace all other wikilinks
src = src.replace(wikilinkRegex, (value, ...capture) => {
src = (src as string).replace(wikilinkRegex, (value, ...capture) => {
const [rawFp, rawHeader, rawAlias]: (string | undefined)[] = capture

const [fp, anchor] = splitAnchor(`${rawFp ?? ""}${rawHeader ?? ""}`)
Expand Down

0 comments on commit bcca32d

Please sign in to comment.