valaxy 0.23.4 → 0.23.6

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.
@@ -4,7 +4,7 @@ import yargs from "yargs";
4
4
  import { hideBin } from "yargs/helpers";
5
5
 
6
6
  // package.json
7
- var version = "0.23.4";
7
+ var version = "0.23.6";
8
8
 
9
9
  // node/modules/fuse.ts
10
10
  import path4 from "path";
@@ -547,15 +547,7 @@ var customElements = /* @__PURE__ */ new Set([
547
547
  "munderover",
548
548
  "semantics"
549
549
  ]);
550
- var defaultViteConfig = {
551
- css: {
552
- preprocessorOptions: {
553
- scss: {
554
- api: "modern-compiler"
555
- }
556
- }
557
- }
558
- };
550
+ var defaultViteConfig = {};
559
551
 
560
552
  // node/utils/helper.ts
561
553
  function isExternal(str) {
@@ -2118,7 +2110,8 @@ var defaultBlocksOptions = {
2118
2110
  }
2119
2111
  };
2120
2112
  function containerPlugin(md3, options, containerOptions = {}) {
2121
- Object.keys(defaultBlocksOptions).forEach((optionKey) => {
2113
+ const blockKeys = Object.keys(Object.assign(defaultBlocksOptions, containerOptions));
2114
+ blockKeys.forEach((optionKey) => {
2122
2115
  const option = {
2123
2116
  ...defaultBlocksOptions[optionKey],
2124
2117
  ...containerOptions[optionKey] || {}
@@ -2344,8 +2337,10 @@ function math_plugin(md3, options) {
2344
2337
  try {
2345
2338
  return katex.renderToString(latex, options);
2346
2339
  } catch (error) {
2347
- if (options.throwOnError)
2348
- console.warn(error);
2340
+ if (options.throwOnError) {
2341
+ throw error;
2342
+ }
2343
+ console.warn(error);
2349
2344
  return latex;
2350
2345
  }
2351
2346
  };
@@ -2357,8 +2352,10 @@ function math_plugin(md3, options) {
2357
2352
  try {
2358
2353
  return `<p>${katex.renderToString(latex, options)}</p>`;
2359
2354
  } catch (error) {
2360
- if (options.throwOnError)
2361
- console.warn(error);
2355
+ if (options.throwOnError) {
2356
+ throw error;
2357
+ }
2358
+ console.warn(error);
2362
2359
  return latex;
2363
2360
  }
2364
2361
  };
@@ -3408,8 +3405,8 @@ function transformHexoTags(code, id) {
3408
3405
  `} Please ${colors10.red("remove")} ${colors10.cyan("{% %}")}, because it conflicts with ${colors10.yellow("markdown-it-attrs")}.`
3409
3406
  );
3410
3407
  }
3411
- code.replace("{%", "{%");
3412
- code.replace("%}", "%}");
3408
+ code = code.replaceAll("{%", "\\{\\%");
3409
+ code = code.replaceAll("%}", "\\%\\}");
3413
3410
  return code;
3414
3411
  }
3415
3412
 
@@ -3,7 +3,7 @@ import {
3
3
  registerDevCommand,
4
4
  run,
5
5
  startValaxyDev
6
- } from "../../chunk-VMMD3G2Q.js";
6
+ } from "../../chunk-SBITNE3A.js";
7
7
  export {
8
8
  cli,
9
9
  registerDevCommand,
@@ -168,7 +168,7 @@ interface MarkdownOptions extends Options$1 {
168
168
  /**
169
169
  * Custom block configurations based on `markdown-it-container`
170
170
  */
171
- blocks?: Blocks;
171
+ blocks?: Record<string, BlockItem> | Blocks;
172
172
  /**
173
173
  * @see [markdown-it-image-figures](https://www.npmjs.com/package/markdown-it-image-figures)
174
174
  */
@@ -612,6 +612,7 @@ declare const ALL_ROUTE = "/:all(.*)*";
612
612
  declare const customElements: Set<string>;
613
613
  /**
614
614
  * @see https://vitejs.dev/config/shared-options.html#css-preprocessoroptions for sass@2
615
+ * vite@7 default use sass modern api
615
616
  */
616
617
  declare const defaultViteConfig: UserConfig;
617
618
 
@@ -50,7 +50,7 @@ import {
50
50
  startValaxyDev,
51
51
  toAtFS,
52
52
  transformObject
53
- } from "../chunk-VMMD3G2Q.js";
53
+ } from "../chunk-SBITNE3A.js";
54
54
  export {
55
55
  ALL_ROUTE,
56
56
  EXCERPT_SEPARATOR,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.23.4",
4
+ "version": "0.23.6",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -57,17 +57,17 @@
57
57
  "@clack/prompts": "^0.11.0",
58
58
  "@iconify-json/ri": "^1.2.5",
59
59
  "@intlify/unplugin-vue-i18n": "^6.0.8",
60
- "@shikijs/transformers": "^3.4.2",
60
+ "@shikijs/transformers": "^3.7.0",
61
61
  "@types/katex": "^0.16.7",
62
- "@unhead/addons": "^2.0.10",
63
- "@unhead/schema-org": "^2.0.10",
64
- "@unhead/vue": "^2.0.10",
65
- "@vitejs/plugin-vue": "^5.2.4",
62
+ "@unhead/addons": "^2.0.11",
63
+ "@unhead/schema-org": "^2.0.11",
64
+ "@unhead/vue": "^2.0.11",
65
+ "@vitejs/plugin-vue": "^6.0.0",
66
66
  "@vue/devtools-api": "7.7.2",
67
- "@vueuse/core": "^13.2.0",
68
- "@vueuse/integrations": "^13.2.0",
67
+ "@vueuse/core": "^13.4.0",
68
+ "@vueuse/integrations": "^13.4.0",
69
69
  "beasties": "^0.3.4",
70
- "birpc": "^2.3.0",
70
+ "birpc": "^2.4.0",
71
71
  "consola": "^3.4.2",
72
72
  "cross-spawn": "^7.0.6",
73
73
  "css-i18n": "^0.0.5",
@@ -99,40 +99,40 @@
99
99
  "markdown-it-table-of-contents": "^0.9.0",
100
100
  "markdown-it-task-lists": "^2.1.1",
101
101
  "medium-zoom": "^1.1.0",
102
- "mermaid": "^11.6.0",
102
+ "mermaid": "^11.7.0",
103
103
  "mlly": "^1.7.4",
104
104
  "nprogress": "^0.2.0",
105
105
  "open": "10.1.0",
106
106
  "ora": "^8.2.0",
107
107
  "pascalcase": "^2.0.0",
108
108
  "pathe": "^2.0.3",
109
- "pinia": "^3.0.2",
109
+ "pinia": "^3.0.3",
110
110
  "qrcode": "^1.5.4",
111
111
  "resolve-global": "^2.0.0",
112
- "sass": "^1.89.0",
113
- "shiki": "^3.4.2",
112
+ "sass": "^1.89.2",
113
+ "shiki": "^3.7.0",
114
114
  "star-markdown-css": "^0.5.3",
115
115
  "table": "^6.9.0",
116
- "unhead": "^2.0.10",
117
- "unocss": "^66.1.2",
116
+ "unhead": "^2.0.11",
117
+ "unocss": "^66.3.2",
118
118
  "unplugin-vue-components": "28.0.0",
119
- "unplugin-vue-markdown": "^28.3.1",
120
- "unplugin-vue-router": "^0.12.0",
119
+ "unplugin-vue-markdown": "^29.0.0",
120
+ "unplugin-vue-router": "^0.13.0",
121
121
  "vanilla-lazyload": "^19.1.3",
122
- "vite": "^6.3.5",
123
- "vite-dev-rpc": "^1.0.7",
124
- "vite-plugin-vue-devtools": "^7.7.6",
122
+ "vite": "^7.0.0",
123
+ "vite-dev-rpc": "^1.1.0",
124
+ "vite-plugin-vue-devtools": "^7.7.7",
125
125
  "vite-plugin-vue-layouts": "^0.11.0",
126
- "vite-ssg": "^27.0.1",
126
+ "vite-ssg": "^28.0.0",
127
127
  "vite-ssg-sitemap": "^0.9.0",
128
- "vitepress-plugin-group-icons": "^1.5.5",
129
- "vue": "^3.5.14",
130
- "vue-i18n": "^11.1.4",
128
+ "vitepress-plugin-group-icons": "^1.6.0",
129
+ "vue": "^3.5.17",
130
+ "vue-i18n": "^11.1.7",
131
131
  "vue-router": "^4.5.1",
132
- "yargs": "^17.7.2",
133
- "zfeed": "^0.2.2",
134
- "@valaxyjs/utils": "0.23.4",
135
- "@valaxyjs/devtools": "0.23.4"
132
+ "yargs": "^18.0.0",
133
+ "zfeed": "^0.2.3",
134
+ "@valaxyjs/devtools": "0.23.6",
135
+ "@valaxyjs/utils": "0.23.6"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@mdit-vue/plugin-component": "^2.1.4",
@@ -157,7 +157,10 @@
157
157
  "diacritics": "^1.3.0",
158
158
  "gh-pages": "^6.3.0",
159
159
  "https-localhost": "^4.7.1",
160
- "rollup-plugin-visualizer": "^6.0.0"
160
+ "rollup-plugin-visualizer": "^6.0.3"
161
+ },
162
+ "resolutions": {
163
+ "vite": "catalog:"
161
164
  },
162
165
  "scripts": {
163
166
  "clean": "rimraf dist",
package/types/data.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { Header } from '@valaxyjs/utils'
2
2
  import type { Post } from './posts'
3
3
 
4
- export type CleanUrlsMode =
5
- | 'disabled'
6
- | 'without-subfolders'
7
- | 'with-subfolders'
4
+ export type CleanUrlsMode
5
+ = | 'disabled'
6
+ | 'without-subfolders'
7
+ | 'with-subfolders'
8
8
 
9
9
  export interface PageData {
10
10
  relativePath: string
@@ -26,6 +26,6 @@ export interface PageDataPayload {
26
26
  pageData: PageData
27
27
  }
28
28
 
29
- export type HeadConfig =
30
- | [string, Record<string, string>]
31
- | [string, Record<string, string>, string]
29
+ export type HeadConfig
30
+ = | [string, Record<string, string>]
31
+ | [string, Record<string, string>, string]