livemark 0.0.0-dev → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/build/actions/changelog/build.d.ts +14 -0
- package/build/actions/changelog/build.js +158 -0
- package/build/actions/changelog/build.unit.d.ts +1 -0
- package/build/actions/changelog/build.unit.js +66 -0
- package/build/actions/config/define.unit.js +11 -16
- package/build/actions/config/load.js +6 -3
- package/build/actions/config/load.unit.js +3 -3
- package/build/commands/build.js +4 -3
- package/build/commands/escape.d.ts +9 -0
- package/build/commands/escape.js +56 -0
- package/build/docs/markdown/includes/example.d.ts +53 -4
- package/build/docs/markdown/includes/example.js +2 -2
- package/build/livemark.config.d.ts +53 -4
- package/build/livemark.config.js +22 -2
- package/build/models/config.d.ts +315 -8
- package/build/models/config.js +25 -5
- package/build/models/link.d.ts +13 -0
- package/build/models/link.js +9 -0
- package/build/models/patch.d.ts +21 -0
- package/build/models/patch.js +7 -0
- package/build/models/section.d.ts +75 -0
- package/build/models/section.js +26 -0
- package/build/models/theme.d.ts +72 -0
- package/build/models/theme.js +73 -0
- package/build/program.js +4 -2
- package/build/vite.config.d.ts +1 -1
- package/build/website/assets/logo.svg +117 -0
- package/build/website/components/Article.tsx +172 -0
- package/build/website/components/BackToTop.tsx +32 -0
- package/build/website/components/Banner.tsx +2 -2
- package/build/website/components/BlogIndex.tsx +121 -0
- package/build/website/components/BlogSidebar.tsx +162 -0
- package/build/website/components/Breadcrumbs.tsx +5 -2
- package/build/website/components/Card.tsx +48 -0
- package/build/website/components/Cards.tsx +0 -58
- package/build/website/components/ChangelogIndex.tsx +111 -0
- package/build/website/components/ChangelogSidebar.tsx +120 -0
- package/build/website/components/CodeBlock.tsx +57 -40
- package/build/website/components/Column.tsx +4 -0
- package/build/website/components/Columns.tsx +0 -5
- package/build/website/components/Footer.tsx +12 -5
- package/build/website/components/InlineIcon.tsx +2 -13
- package/build/website/components/Layout.tsx +155 -185
- package/build/website/components/Mermaid.tsx +14 -33
- package/build/website/components/MermaidRenderer.tsx +37 -0
- package/build/website/components/MiniSidebar.tsx +49 -0
- package/build/website/components/PageToolbar.tsx +21 -11
- package/build/website/components/PrevNext.tsx +20 -12
- package/build/website/components/Search.tsx +28 -0
- package/build/website/components/SearchDialog.tsx +10 -10
- package/build/website/components/Sidebar.tsx +160 -0
- package/build/website/components/SidebarLinks.tsx +70 -0
- package/build/website/components/SidebarSections.tsx +71 -0
- package/build/website/components/SiteTitle.tsx +13 -8
- package/build/website/components/TagIndex.tsx +120 -0
- package/build/website/components/Theme.tsx +0 -1
- package/build/website/components/Toc.tsx +128 -1
- package/build/website/components/ZoomImage.tsx +15 -20
- package/build/website/content/article.ts +78 -0
- package/build/website/content/tag.ts +29 -0
- package/build/website/content-collections.ts +53 -26
- package/build/website/elements/sidebar.tsx +4 -4
- package/build/website/env.d.ts +4 -0
- package/build/website/helpers/article-icon.ts +2 -0
- package/build/website/helpers/article.ts +90 -0
- package/build/website/helpers/changelog-source.ts +16 -0
- package/build/website/helpers/changelog-source.unit.ts +38 -0
- package/build/website/helpers/dynamic-icon-resolver.tsx +19 -0
- package/build/website/helpers/dynamic-icon.tsx +12 -0
- package/build/website/helpers/favicon.ts +7 -0
- package/build/website/helpers/model.ts +4 -0
- package/build/website/helpers/resolve-asset-path.ts +9 -0
- package/build/website/helpers/section.ts +50 -0
- package/build/website/helpers/section.unit.ts +71 -0
- package/build/website/helpers/toc-context.ts +1 -1
- package/build/website/helpers/toc.ts +1 -6
- package/build/website/models/article.ts +48 -33
- package/build/website/models/toc.ts +5 -0
- package/build/website/plugins/rehype-task-list-a11y.ts +33 -0
- package/build/website/plugins/remark-ansi.ts +1 -0
- package/build/website/plugins/remark-image.ts +22 -13
- package/build/website/plugins/vite-livemark.ts +91 -0
- package/build/website/routeTree.gen.ts +9 -9
- package/build/website/routes/$.tsx +74 -131
- package/build/website/routes/__root.tsx +36 -23
- package/build/website/styles/general.css +26 -210
- package/build/website/styles/markdown.css +214 -0
- package/build/website/vite.config.ts +38 -3
- package/package.json +25 -16
- package/build/website/globals.d.ts +0 -8
- package/build/website/helpers/articles.ts +0 -24
- package/build/website/public/logo.svg +0 -72
- package/build/website/routes/index.tsx +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "livemark",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Livemark description",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evgeny Karev",
|
|
@@ -16,18 +16,23 @@
|
|
|
16
16
|
"imports": {
|
|
17
17
|
"#*": "./*"
|
|
18
18
|
},
|
|
19
|
-
"exports":
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./build/index.js",
|
|
21
|
+
"./components/*": "./build/website/components/*.tsx",
|
|
22
|
+
"./elements/*": "./build/website/elements/*.tsx",
|
|
23
|
+
"./styles/*": "./build/website/styles/*.css"
|
|
24
|
+
},
|
|
20
25
|
"dependencies": {
|
|
21
26
|
"@base-ui/react": "1.3.0",
|
|
22
27
|
"@content-collections/core": "0.14.3",
|
|
23
28
|
"@content-collections/mdx": "0.2.2",
|
|
24
|
-
"@content-collections/vite": "0.
|
|
29
|
+
"@content-collections/vite": "0.3.0",
|
|
25
30
|
"@orama/orama": "^3.1.18",
|
|
26
31
|
"@shikijs/rehype": "4.0.2",
|
|
27
32
|
"@shikijs/twoslash": "^4.0.2",
|
|
28
33
|
"@sindresorhus/slugify": "^3.0.0",
|
|
29
34
|
"@tailwindcss/typography": "^0.5.19",
|
|
30
|
-
"@tailwindcss/vite": "4.2.
|
|
35
|
+
"@tailwindcss/vite": "4.2.4",
|
|
31
36
|
"@tanstack/devtools-vite": "0.6.0",
|
|
32
37
|
"@tanstack/react-devtools": "0.10.0",
|
|
33
38
|
"@tanstack/react-hotkeys": "^0.9.1",
|
|
@@ -37,6 +42,7 @@
|
|
|
37
42
|
"@tanstack/react-router-devtools": "1.166.10",
|
|
38
43
|
"@tanstack/react-router-ssr-query": "1.166.10",
|
|
39
44
|
"@tanstack/react-start": "1.167.2",
|
|
45
|
+
"@tanstack/virtual-file-routes": "^1.161.7",
|
|
40
46
|
"@types/mdast": "^4.0.4",
|
|
41
47
|
"@types/react": "19.2.14",
|
|
42
48
|
"@types/react-dom": "19.2.3",
|
|
@@ -52,6 +58,7 @@
|
|
|
52
58
|
"katex": "^0.16.44",
|
|
53
59
|
"lucide-react": "0.577.0",
|
|
54
60
|
"mdast-util-directive": "^3.1.0",
|
|
61
|
+
"mdast-util-to-string": "^4.0.0",
|
|
55
62
|
"mermaid": "^11.14.0",
|
|
56
63
|
"npm-to-yarn": "^3.0.1",
|
|
57
64
|
"picocolors": "1.1.1",
|
|
@@ -69,6 +76,8 @@
|
|
|
69
76
|
"remark-gemoji": "^8.0.0",
|
|
70
77
|
"remark-gfm": "4.0.1",
|
|
71
78
|
"remark-math": "6.0.0",
|
|
79
|
+
"remark-parse": "^11.0.0",
|
|
80
|
+
"remark-stringify": "^11.0.0",
|
|
72
81
|
"shadcn": "3.7.0",
|
|
73
82
|
"shiki": "4.0.2",
|
|
74
83
|
"sonner": "2.0.7",
|
|
@@ -78,15 +87,15 @@
|
|
|
78
87
|
"unified": "^11.0.5",
|
|
79
88
|
"unist-util-visit": "^5.1.0",
|
|
80
89
|
"vaul": "1.1.2",
|
|
81
|
-
"vite": "8.0.
|
|
82
|
-
"vite-plugin-svgr": "
|
|
90
|
+
"vite": "8.0.10",
|
|
91
|
+
"vite-plugin-svgr": "5.2.0",
|
|
83
92
|
"zod": "4.3.6"
|
|
84
93
|
},
|
|
85
94
|
"devDependencies": {
|
|
86
95
|
"@semantic-release/exec": "7.1.0",
|
|
87
96
|
"@types/node": "24.2.0",
|
|
88
97
|
"@typescript/native-preview": "7.0.0-dev.20260316.1",
|
|
89
|
-
"@vitest/coverage-v8": "4.
|
|
98
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
90
99
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
91
100
|
"husky": "9.1.7",
|
|
92
101
|
"is-ci": "4.1.0",
|
|
@@ -94,8 +103,9 @@
|
|
|
94
103
|
"npm-check-updates": "18.0.1",
|
|
95
104
|
"semantic-release": "24.2.9",
|
|
96
105
|
"tempy": "3.2.0",
|
|
97
|
-
"vite-plus": "0.1.
|
|
98
|
-
"vitest-polly": "1.
|
|
106
|
+
"vite-plus": "0.1.19",
|
|
107
|
+
"vitest-polly": "2.1.0",
|
|
108
|
+
"wrangler": "4.85.0"
|
|
99
109
|
},
|
|
100
110
|
"engines": {
|
|
101
111
|
"node": "^24.0.0",
|
|
@@ -104,16 +114,15 @@
|
|
|
104
114
|
"scripts": {
|
|
105
115
|
"build": "tsgo && rm -rf build/website && cp -r website build",
|
|
106
116
|
"bump": "ncu -u",
|
|
107
|
-
"clean": "rm -rf pnpm-lock.yaml node_modules
|
|
108
|
-
"docs:build": "node entrypoints/
|
|
109
|
-
"docs:start": "node entrypoints/
|
|
110
|
-
"docs:preview": "node entrypoints/
|
|
117
|
+
"clean": "rm -rf pnpm-lock.yaml node_modules build",
|
|
118
|
+
"docs:build": "node entrypoints/main.ts build",
|
|
119
|
+
"docs:start": "node entrypoints/main.ts start",
|
|
120
|
+
"docs:preview": "node entrypoints/main.ts preview",
|
|
111
121
|
"format": "vp fmt",
|
|
112
122
|
"lint": "vp fmt --check && vp lint",
|
|
113
|
-
"release": "pnpm
|
|
114
|
-
"setversion": "pnpm
|
|
123
|
+
"release": "pnpm publish --access public --ignore-scripts --no-git-checks",
|
|
124
|
+
"setversion": "pnpm version --no-git-tag-version",
|
|
115
125
|
"unit": "vp test",
|
|
116
|
-
"start": "pnpm -F website start",
|
|
117
126
|
"test": "pnpm lint && pnpm type && pnpm unit",
|
|
118
127
|
"type": "tsgo --noEmit"
|
|
119
128
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { allArticles } from "content-collections"
|
|
2
|
-
import { buildArticleTree, type ArticleNode } from "../models/article.ts"
|
|
3
|
-
|
|
4
|
-
/** Articles sorted by frontmatter order (unordered articles come last) */
|
|
5
|
-
export const sortedArticles = [...allArticles].sort((a, b) => {
|
|
6
|
-
const ao = a.order ?? Number.MAX_SAFE_INTEGER
|
|
7
|
-
const bo = b.order ?? Number.MAX_SAFE_INTEGER
|
|
8
|
-
return ao - bo
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
/** Articles organized as a tree based on pathname hierarchy */
|
|
12
|
-
export const articleTree = buildArticleTree(sortedArticles)
|
|
13
|
-
|
|
14
|
-
/** Articles in depth-first tree order (matches sidebar navigation) */
|
|
15
|
-
export const flatArticles = flattenTree(articleTree)
|
|
16
|
-
|
|
17
|
-
function flattenTree(nodes: ArticleNode[]) {
|
|
18
|
-
const result: string[] = []
|
|
19
|
-
for (const node of nodes) {
|
|
20
|
-
result.push(node.pathname)
|
|
21
|
-
result.push(...flattenTree(node.children))
|
|
22
|
-
}
|
|
23
|
-
return result
|
|
24
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<svg
|
|
3
|
-
data-v-0dd9719b=""
|
|
4
|
-
version="1.0"
|
|
5
|
-
viewBox="0 0 200 200"
|
|
6
|
-
preserveAspectRatio="xMidYMid"
|
|
7
|
-
color-interpolation-filters="sRGB"
|
|
8
|
-
id="svg14"
|
|
9
|
-
sodipodi:docname="fairspec-logo.svg"
|
|
10
|
-
inkscape:version="1.4.2 (1:1.4.2+202505120737+ebf0e940d0)"
|
|
11
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
12
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
13
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
-
xmlns:svg="http://www.w3.org/2000/svg">
|
|
15
|
-
<sodipodi:namedview
|
|
16
|
-
id="namedview14"
|
|
17
|
-
pagecolor="#ffffff"
|
|
18
|
-
bordercolor="#000000"
|
|
19
|
-
borderopacity="0.25"
|
|
20
|
-
inkscape:showpageshadow="2"
|
|
21
|
-
inkscape:pageopacity="0.0"
|
|
22
|
-
inkscape:pagecheckerboard="0"
|
|
23
|
-
inkscape:deskcolor="#d1d1d1"
|
|
24
|
-
inkscape:zoom="2.4555556"
|
|
25
|
-
inkscape:cx="92.239817"
|
|
26
|
-
inkscape:cy="110.56561"
|
|
27
|
-
inkscape:window-width="1920"
|
|
28
|
-
inkscape:window-height="1108"
|
|
29
|
-
inkscape:window-x="0"
|
|
30
|
-
inkscape:window-y="53"
|
|
31
|
-
inkscape:window-maximized="1"
|
|
32
|
-
inkscape:current-layer="svg14" />
|
|
33
|
-
<!---->
|
|
34
|
-
<g
|
|
35
|
-
id="g7"
|
|
36
|
-
style="overflow:visible"
|
|
37
|
-
transform="matrix(1.9217834,0,0,1.9217834,-1.7872586,9.8749299)">
|
|
38
|
-
<polygon
|
|
39
|
-
fill="#0067b5"
|
|
40
|
-
points="16.19,19.77 29.19,42.29 3.19,42.29 0.93,46.2 44.32,46.2 22.63,8.63 "
|
|
41
|
-
id="polygon2"
|
|
42
|
-
style="fill:#2c7cfd;fill-opacity:1" />
|
|
43
|
-
<polygon
|
|
44
|
-
fill="#009fe8"
|
|
45
|
-
points="57.31,1.18 44.31,23.69 31.31,1.18 26.8,1.18 48.49,38.75 70.18,1.18 "
|
|
46
|
-
id="polygon3"
|
|
47
|
-
style="fill:#8ec5ff;fill-opacity:1" />
|
|
48
|
-
<polygon
|
|
49
|
-
fill="#009fe8"
|
|
50
|
-
points="94.44,27.66 68.43,27.66 81.44,5.15 79.18,1.24 57.49,38.81 100.87,38.81 "
|
|
51
|
-
id="polygon4"
|
|
52
|
-
style="fill:#8ec5ff;fill-opacity:1" />
|
|
53
|
-
<polygon
|
|
54
|
-
fill="#009fe8"
|
|
55
|
-
points="89.74,72.81 76.74,50.3 102.74,50.3 105,46.39 61.62,46.39 83.31,83.96 "
|
|
56
|
-
id="polygon5"
|
|
57
|
-
style="fill:#8ec5ff;fill-opacity:1" />
|
|
58
|
-
<polygon
|
|
59
|
-
fill="#0067b5"
|
|
60
|
-
points="48.62,91.41 61.62,68.89 74.62,91.41 79.13,91.41 57.45,53.83 35.75,91.41 "
|
|
61
|
-
id="polygon6"
|
|
62
|
-
style="fill:#2c7cfd;fill-opacity:1" />
|
|
63
|
-
<polygon
|
|
64
|
-
fill="#0067b5"
|
|
65
|
-
points="11.49,64.92 37.49,64.92 24.5,87.43 26.75,91.34 48.44,53.78 5.05,53.78 "
|
|
66
|
-
id="polygon7"
|
|
67
|
-
style="fill:#2c7cfd;fill-opacity:1" />
|
|
68
|
-
</g>
|
|
69
|
-
<defs
|
|
70
|
-
v-gra="od"
|
|
71
|
-
id="defs14" />
|
|
72
|
-
</svg>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createFileRoute, notFound, redirect } from "@tanstack/react-router"
|
|
2
|
-
import { sortedArticles } from "../helpers/articles.ts"
|
|
3
|
-
|
|
4
|
-
export const Route = createFileRoute("/")({
|
|
5
|
-
beforeLoad: () => {
|
|
6
|
-
const first = sortedArticles[0]
|
|
7
|
-
if (!first) throw notFound()
|
|
8
|
-
throw redirect({
|
|
9
|
-
to: "/$",
|
|
10
|
-
params: { _splat: first.pathname.replace(/^\/|\/$/g, "") },
|
|
11
|
-
})
|
|
12
|
-
},
|
|
13
|
-
})
|