themekit-js 1.49.2618 → 1.49.2714

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/dist/node/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as getDefaultExportFromCjs, q as c, t as clearCache, n as init, b as build, o as serve, v as version, p as createServer } from './serve-DQeart1n.js';
1
+ import { a as getDefaultExportFromCjs, q as c, t as clearCache, n as init, b as build, o as serve, v as version, p as createServer } from './serve-CazsxtXb.js';
2
2
  import { createLogger } from 'vite';
3
3
  import 'path';
4
4
  import 'shiki';
@@ -1,7 +1,7 @@
1
1
  import { normalizePath } from 'vite';
2
2
  export { loadEnv } from 'vite';
3
- import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-DQeart1n.js';
4
- export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-DQeart1n.js';
3
+ import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-CazsxtXb.js';
4
+ export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-CazsxtXb.js';
5
5
  import path from 'path';
6
6
  import 'crypto';
7
7
  import 'module';
@@ -38225,7 +38225,7 @@ async function seedunk_mdparser(src) {
38225
38225
  let plain = src;
38226
38226
  while ((matchmd = regexmd.exec(src)) !== null) {
38227
38227
  if (matchmd[1].indexOf("?include=markdown") >= 0) {
38228
- const mdresponse = await axios.get(matchmd[1]);
38228
+ const mdresponse = await axios({ url: matchmd[1], method: "get", responseType: "blob" });
38229
38229
  if (mdresponse.status == 200) {
38230
38230
  let mdraw = mdresponse.data;
38231
38231
  let imgmatch;
@@ -38236,7 +38236,18 @@ async function seedunk_mdparser(src) {
38236
38236
  const imgsrc = args[1];
38237
38237
  if (imgsrc.indexOf("http") < 0 && imgsrc.substring(0, 1) != "/") {
38238
38238
  const parsedPath = path$q.parse(matchmd[1]);
38239
- mdraw = mdraw.replace(imgsrc, parsedPath.dir + "/" + imgsrc);
38239
+ const imgpath = parsedPath.dir + "/" + imgsrc;
38240
+ const imgraw = await axios({ url: imgpath, method: "get", responseType: "arraybuffer" });
38241
+ if (imgraw.status == 200) {
38242
+ const base64Data = btoa(
38243
+ new Uint8Array(imgraw.data).reduce(
38244
+ (data, byte) => data + String.fromCharCode(byte),
38245
+ ""
38246
+ )
38247
+ );
38248
+ const imgbase64 = "data:image/" + path$q.parse(imgpath.split("?")[0]).ext.substring(1) + ";base64," + base64Data;
38249
+ mdraw = mdraw.replace(imgsrc, imgbase64);
38250
+ }
38240
38251
  }
38241
38252
  }
38242
38253
  }
@@ -38294,7 +38305,6 @@ async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild
38294
38305
  src = fs$a.readFileSync(bindPath).toString();
38295
38306
  layoutVal = param(/(?<=<!--\$layout).*?(?=-->)/g, src);
38296
38307
  }
38297
- console.log("Layout:" + layoutVal);
38298
38308
  const env = {
38299
38309
  path: file,
38300
38310
  relativePath,
@@ -46773,7 +46783,7 @@ function escapeHtml(string) {
46773
46783
 
46774
46784
  var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
46775
46785
 
46776
- var version = "1.49.2618";
46786
+ var version = "1.49.2714";
46777
46787
 
46778
46788
  async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
46779
46789
  const routePath = `/${page.replace(/\.md$/, "")}`;
package/package.json CHANGED
@@ -1,227 +1 @@
1
- {
2
- "name": "themekit-js",
3
- "version": "1.49.2618",
4
- "description": "基于VitePress开发的Markdown静态网站生成器",
5
- "type": "module",
6
- "packageManager": "pnpm@8.15.6",
7
- "main": "dist/node/index.js",
8
- "types": "types/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./types/index.d.ts",
12
- "default": "./dist/node/index.js"
13
- },
14
- "./dist/*": "./dist/*",
15
- "./package.json": "./package.json",
16
- "./client": {
17
- "types": "./client.d.ts",
18
- "default": "./dist/client/index.js"
19
- },
20
- "./theme": {
21
- "types": "./theme.d.ts",
22
- "default": "./dist/client/theme-default/index.js"
23
- },
24
- "./theme-without-fonts": {
25
- "types": "./theme-without-fonts.d.ts",
26
- "default": "./dist/client/theme-default/without-fonts.js"
27
- },
28
- "./vue-demi": {
29
- "default": "./lib/vue-demi.mjs"
30
- }
31
- },
32
- "bin": {
33
- "themekit": "bin/themekit.js"
34
- },
35
- "files": [
36
- "bin",
37
- "dist",
38
- "types",
39
- "template",
40
- "client.d.ts",
41
- "theme.d.ts",
42
- "theme-without-fonts.d.ts",
43
- "lib"
44
- ],
45
- "repository": {
46
- "type": "git",
47
- "url": "git+https://github.com/seedunk/themekit-js.git"
48
- },
49
- "keywords": [
50
- "vite",
51
- "vue",
52
- "themekit-js"
53
- ],
54
- "author": "Seedunk",
55
- "license": "MIT",
56
- "homepage": "https://seedunk.github.io/themekit-js",
57
- "scripts": {
58
- "dev": "rimraf dist && run-s dev:shared dev:start",
59
- "dev:start": "run-p dev:client dev:node dev:watch",
60
- "dev:client": "tsc --sourcemap -w -p src/client",
61
- "dev:node": "DEV=true pnpm build:node -w",
62
- "dev:shared": "node scripts/copyShared",
63
- "dev:watch": "node scripts/watchAndCopy",
64
- "build": "run-s build:prepare build:client build:node",
65
- "build:prepare": "rimraf dist && node scripts/copyShared",
66
- "build:client": "vue-tsc --noEmit -p src/client && tsc -p src/client && node scripts/copyClient",
67
- "build:node": "tsc -p src/node --noEmit && rollup --config rollup.config.ts --configPlugin esbuild",
68
- "test": "run-p --aggregate-output test:unit test:e2e test:init",
69
- "test:unit": "vitest run -r __tests__/unit",
70
- "test:unit:watch": "vitest -r __tests__/unit",
71
- "test:e2e": "run-s test:e2e-dev test:e2e-build",
72
- "test:e2e:site:dev": "pnpm -F=tests-e2e site:dev",
73
- "test:e2e:site:build": "pnpm -F=tests-e2e site:build",
74
- "test:e2e:site:preview": "pnpm -F=tests-e2e site:preview",
75
- "test:e2e-dev": "pnpm -F=tests-e2e test",
76
- "test:e2e-dev:watch": "pnpm -F=tests-e2e watch",
77
- "test:e2e-build": "VITE_TEST_BUILD=1 pnpm test:e2e-dev",
78
- "test:e2e-build:watch": "VITE_TEST_BUILD=1 pnpm test:e2e-dev:watch",
79
- "test:init": "pnpm -F=tests-init test",
80
- "test:init:watch": "pnpm -F=tests-init watch",
81
- "docs": "run-p dev docs:dev",
82
- "docs:dev": "themekit-js dev",
83
- "docs:debug": "NODE_OPTIONS='--inspect-brk' pnpm docs:dev",
84
- "docs:build": "themekit-js build",
85
- "docs:build:only": "pnpm -F=docs build",
86
- "docs:preview": "themekit-js preview",
87
- "docs:lunaria:build": "pnpm -F=docs lunaria:build",
88
- "docs:lunaria:open": "pnpm -F=docs lunaria:open",
89
- "format": "prettier --check --write .",
90
- "format:fail": "prettier --check .",
91
- "check": "run-s format:fail build test",
92
- "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
93
- "release": "node scripts/release.js"
94
- },
95
- "dependencies": {
96
- "@docsearch/css": "^3.6.0",
97
- "@docsearch/js": "^3.6.0",
98
- "@fortawesome/fontawesome-svg-core": "^6.5.2",
99
- "@fortawesome/free-solid-svg-icons": "^6.5.2",
100
- "@shikijs/core": "^1.2.4",
101
- "@shikijs/transformers": "^1.2.4",
102
- "@types/markdown-it": "^13.0.7",
103
- "@vitejs/plugin-vue": "^5.0.4",
104
- "@vue/devtools-api": "^7.0.25",
105
- "@vueuse/core": "^10.9.0",
106
- "@vueuse/integrations": "^10.9.0",
107
- "axios": "^1.7.2",
108
- "focus-trap": "^7.5.4",
109
- "github-markdown-css": "^5.5.1",
110
- "mark.js": "8.11.1",
111
- "minisearch": "^6.3.0",
112
- "shiki": "^1.2.4",
113
- "vite": "^5.2.8",
114
- "vue": "^3.4.21"
115
- },
116
- "peerDependencies": {
117
- "markdown-it-mathjax3": "^4",
118
- "postcss": "^8"
119
- },
120
- "peerDependenciesMeta": {
121
- "markdown-it-mathjax3": {
122
- "optional": true
123
- },
124
- "postcss": {
125
- "optional": true
126
- }
127
- },
128
- "devDependencies": {
129
- "@clack/prompts": "^0.7.0",
130
- "@mdit-vue/plugin-component": "2.0.0",
131
- "@mdit-vue/plugin-frontmatter": "2.0.0",
132
- "@mdit-vue/plugin-headers": "2.0.0",
133
- "@mdit-vue/plugin-sfc": "2.0.0",
134
- "@mdit-vue/plugin-title": "2.0.0",
135
- "@mdit-vue/plugin-toc": "2.0.0",
136
- "@mdit-vue/shared": "2.0.0",
137
- "@polka/compression": "1.0.0-next.25",
138
- "@rollup/plugin-alias": "^5.1.0",
139
- "@rollup/plugin-commonjs": "^25.0.7",
140
- "@rollup/plugin-json": "^6.1.0",
141
- "@rollup/plugin-node-resolve": "^15.2.3",
142
- "@rollup/plugin-replace": "^5.0.5",
143
- "@types/cross-spawn": "^6.0.6",
144
- "@types/debug": "^4.1.12",
145
- "@types/escape-html": "^1.0.4",
146
- "@types/fs-extra": "^11.0.4",
147
- "@types/lodash.template": "^4.5.3",
148
- "@types/mark.js": "^8.11.12",
149
- "@types/markdown-it-attrs": "^4.1.3",
150
- "@types/markdown-it-container": "^2.0.10",
151
- "@types/markdown-it-emoji": "^2.0.5",
152
- "@types/micromatch": "^4.0.6",
153
- "@types/minimist": "^1.2.5",
154
- "@types/node": "^20.12.6",
155
- "@types/postcss-prefix-selector": "^1.16.3",
156
- "@types/prompts": "^2.4.9",
157
- "@vue/shared": "^3.4.21",
158
- "chokidar": "^3.6.0",
159
- "conventional-changelog-cli": "^4.1.0",
160
- "cross-spawn": "^7.0.3",
161
- "debug": "^4.3.4",
162
- "esbuild": "^0.20.2",
163
- "escape-html": "^1.0.3",
164
- "execa": "^8.0.1",
165
- "fast-glob": "^3.3.2",
166
- "fs-extra": "^11.2.0",
167
- "get-port": "^7.1.0",
168
- "gray-matter": "^4.0.3",
169
- "lint-staged": "^15.2.2",
170
- "lodash.template": "^4.5.0",
171
- "lru-cache": "^10.2.0",
172
- "markdown-it": "^14.1.0",
173
- "markdown-it-anchor": "^8.6.7",
174
- "markdown-it-attrs": "^4.1.6",
175
- "markdown-it-container": "^4.0.0",
176
- "markdown-it-emoji": "^3.0.0",
177
- "markdown-it-mathjax3": "^4.3.2",
178
- "micromatch": "^4.0.5",
179
- "minimist": "^1.2.8",
180
- "nanoid": "^5.0.7",
181
- "npm-run-all": "^4.1.5",
182
- "ora": "^8.0.1",
183
- "p-map": "^7.0.2",
184
- "path-to-regexp": "^6.2.2",
185
- "picocolors": "^1.0.0",
186
- "pkg-dir": "^8.0.0",
187
- "playwright-chromium": "^1.43.0",
188
- "polka": "1.0.0-next.25",
189
- "postcss-prefix-selector": "^1.16.0",
190
- "prettier": "^3.2.5",
191
- "prompts": "^2.4.2",
192
- "punycode": "^2.3.1",
193
- "rimraf": "^5.0.5",
194
- "rollup": "^4.14.1",
195
- "rollup-plugin-dts": "^6.1.0",
196
- "rollup-plugin-esbuild": "^6.1.1",
197
- "semver": "^7.6.0",
198
- "simple-git-hooks": "^2.11.1",
199
- "sirv": "^2.0.4",
200
- "sitemap": "^7.1.1",
201
- "supports-color": "^9.4.0",
202
- "typescript": "^5.4.4",
203
- "vitest": "^1.4.0",
204
- "vue-tsc": "^2.0.11",
205
- "wait-on": "^7.2.0"
206
- },
207
- "simple-git-hooks": {
208
- "pre-commit": "pnpm lint-staged"
209
- },
210
- "lint-staged": {
211
- "*": [
212
- "prettier --write --ignore-unknown"
213
- ]
214
- },
215
- "pnpm": {
216
- "overrides": {
217
- "ora>string-width": "^5"
218
- },
219
- "peerDependencyRules": {
220
- "ignoreMissing": [
221
- "@algolia/client-search",
222
- "search-insights",
223
- "postcss"
224
- ]
225
- }
226
- }
227
- }
1
+ {"name":"themekit-js","version":"1.49.2714","description":"基于VitePress开发的Markdown静态网站生成器","type":"module","packageManager":"pnpm@8.15.6","main":"dist/node/index.js","types":"types/index.d.ts","exports":{".":{"types":"./types/index.d.ts","default":"./dist/node/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json","./client":{"types":"./client.d.ts","default":"./dist/client/index.js"},"./theme":{"types":"./theme.d.ts","default":"./dist/client/theme-default/index.js"},"./theme-without-fonts":{"types":"./theme-without-fonts.d.ts","default":"./dist/client/theme-default/without-fonts.js"},"./vue-demi":{"default":"./lib/vue-demi.mjs"}},"bin":{"themekit":"bin/themekit.js"},"files":["bin","dist","types","template","client.d.ts","theme.d.ts","theme-without-fonts.d.ts","lib"],"repository":{"type":"git","url":"git+https://github.com/seedunk/themekit-js.git"},"keywords":["vite","vue","themekit-js"],"author":"Seedunk","license":"MIT","homepage":"https://seedunk.github.io/themekit-js","scripts":{"dev":"rimraf dist && run-s dev:shared dev:start","dev:start":"run-p dev:client dev:node dev:watch","dev:client":"tsc --sourcemap -w -p src/client","dev:node":"DEV=true pnpm build:node -w","dev:shared":"node scripts/copyShared","dev:watch":"node scripts/watchAndCopy","build":"run-s build:prepare build:client build:node","build:prepare":"rimraf dist && node scripts/copyShared","build:client":"vue-tsc --noEmit -p src/client && tsc -p src/client && node scripts/copyClient","build:node":"tsc -p src/node --noEmit && rollup --config rollup.config.ts --configPlugin esbuild","test":"run-p --aggregate-output test:unit test:e2e test:init","test:unit":"vitest run -r __tests__/unit","test:unit:watch":"vitest -r __tests__/unit","test:e2e":"run-s test:e2e-dev test:e2e-build","test:e2e:site:dev":"pnpm -F=tests-e2e site:dev","test:e2e:site:build":"pnpm -F=tests-e2e site:build","test:e2e:site:preview":"pnpm -F=tests-e2e site:preview","test:e2e-dev":"pnpm -F=tests-e2e test","test:e2e-dev:watch":"pnpm -F=tests-e2e watch","test:e2e-build":"VITE_TEST_BUILD=1 pnpm test:e2e-dev","test:e2e-build:watch":"VITE_TEST_BUILD=1 pnpm test:e2e-dev:watch","test:init":"pnpm -F=tests-init test","test:init:watch":"pnpm -F=tests-init watch","docs":"run-p dev docs:dev","docs:dev":"themekit-js dev","docs:debug":"NODE_OPTIONS='--inspect-brk' pnpm docs:dev","docs:build":"themekit-js build","docs:build:only":"pnpm -F=docs build","docs:preview":"themekit-js preview","docs:lunaria:build":"pnpm -F=docs lunaria:build","docs:lunaria:open":"pnpm -F=docs lunaria:open","format":"prettier --check --write .","format:fail":"prettier --check .","check":"run-s format:fail build test","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s","release":"node scripts/release.js"},"dependencies":{"@docsearch/css":"^3.6.0","@docsearch/js":"^3.6.0","@fortawesome/fontawesome-svg-core":"^6.5.2","@fortawesome/free-solid-svg-icons":"^6.5.2","@shikijs/core":"^1.2.4","@shikijs/transformers":"^1.2.4","@types/markdown-it":"^13.0.7","@vitejs/plugin-vue":"^5.0.4","@vue/devtools-api":"^7.0.25","@vueuse/core":"^10.9.0","@vueuse/integrations":"^10.9.0","axios":"^1.7.2","focus-trap":"^7.5.4","github-markdown-css":"^5.5.1","js-base64":"^3.7.7","mark.js":"8.11.1","minisearch":"^6.3.0","shiki":"^1.2.4","vite":"^5.2.8","vue":"^3.4.21"},"peerDependencies":{"markdown-it-mathjax3":"^4","postcss":"^8"},"peerDependenciesMeta":{"markdown-it-mathjax3":{"optional":true},"postcss":{"optional":true}},"devDependencies":{"@clack/prompts":"^0.7.0","@mdit-vue/plugin-component":"2.0.0","@mdit-vue/plugin-frontmatter":"2.0.0","@mdit-vue/plugin-headers":"2.0.0","@mdit-vue/plugin-sfc":"2.0.0","@mdit-vue/plugin-title":"2.0.0","@mdit-vue/plugin-toc":"2.0.0","@mdit-vue/shared":"2.0.0","@polka/compression":"1.0.0-next.25","@rollup/plugin-alias":"^5.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.5","@types/cross-spawn":"^6.0.6","@types/debug":"^4.1.12","@types/escape-html":"^1.0.4","@types/fs-extra":"^11.0.4","@types/lodash.template":"^4.5.3","@types/mark.js":"^8.11.12","@types/markdown-it-attrs":"^4.1.3","@types/markdown-it-container":"^2.0.10","@types/markdown-it-emoji":"^2.0.5","@types/micromatch":"^4.0.6","@types/minimist":"^1.2.5","@types/node":"^20.12.6","@types/postcss-prefix-selector":"^1.16.3","@types/prompts":"^2.4.9","@vue/shared":"^3.4.21","chokidar":"^3.6.0","conventional-changelog-cli":"^4.1.0","cross-spawn":"^7.0.3","debug":"^4.3.4","esbuild":"^0.20.2","escape-html":"^1.0.3","execa":"^8.0.1","fast-glob":"^3.3.2","fs-extra":"^11.2.0","get-port":"^7.1.0","gray-matter":"^4.0.3","lint-staged":"^15.2.2","lodash.template":"^4.5.0","lru-cache":"^10.2.0","markdown-it":"^14.1.0","markdown-it-anchor":"^8.6.7","markdown-it-attrs":"^4.1.6","markdown-it-container":"^4.0.0","markdown-it-emoji":"^3.0.0","markdown-it-mathjax3":"^4.3.2","micromatch":"^4.0.5","minimist":"^1.2.8","nanoid":"^5.0.7","npm-run-all":"^4.1.5","ora":"^8.0.1","p-map":"^7.0.2","path-to-regexp":"^6.2.2","picocolors":"^1.0.0","pkg-dir":"^8.0.0","playwright-chromium":"^1.43.0","polka":"1.0.0-next.25","postcss-prefix-selector":"^1.16.0","prettier":"^3.2.5","prompts":"^2.4.2","punycode":"^2.3.1","rimraf":"^5.0.5","rollup":"^4.14.1","rollup-plugin-dts":"^6.1.0","rollup-plugin-esbuild":"^6.1.1","semver":"^7.6.0","simple-git-hooks":"^2.11.1","sirv":"^2.0.4","sitemap":"^7.1.1","supports-color":"^9.4.0","typescript":"^5.4.4","vitest":"^1.4.0","vue-tsc":"^2.0.11","wait-on":"^7.2.0"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":["prettier --write --ignore-unknown"]},"pnpm":{"overrides":{"ora>string-width":"^5"},"peerDependencyRules":{"ignoreMissing":["@algolia/client-search","search-insights","postcss"]}}}