valaxy 0.24.0 → 0.24.2

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/client/App.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- // import it in setup/main.ts for ssg
2
+ // vite-ssg build for client
3
3
  import 'virtual:group-icons.css'
4
4
  // import { defineAsyncComponent } from 'vue'
5
5
  /**
@@ -2,7 +2,7 @@
2
2
  // https://router.vuejs.org/guide/advanced/extending-router-link.html#extending-routerlink
3
3
  import { computed } from 'vue'
4
4
  import { RouterLink } from 'vue-router'
5
- import { EXTERNAL_URL_RE } from '../../node/constants'
5
+ import { EXTERNAL_URL_RE } from '../../shared'
6
6
 
7
7
  const props = defineProps<{
8
8
  showExternalIcon?: boolean
package/client/main.ts CHANGED
@@ -20,7 +20,6 @@ import { setupValaxyDevTools } from './utils/dev'
20
20
  */
21
21
  import '#valaxy/styles'
22
22
  import 'uno.css'
23
- import 'virtual:group-icons.css'
24
23
 
25
24
  const valaxyConfig = initValaxyConfig()
26
25
 
@@ -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.24.0";
7
+ var version = "0.24.2";
8
8
 
9
9
  // node/modules/fuse.ts
10
10
  import path4 from "path";
@@ -120,6 +120,9 @@ function getRollupOptions(options) {
120
120
  if (id.includes("plugin-vue:export-helper")) {
121
121
  return "framework";
122
122
  }
123
+ if (id.includes("virtual:group-icons.css")) {
124
+ return "group-icons";
125
+ }
123
126
  const libs = [
124
127
  "@vueuse/motion",
125
128
  "dayjs",
@@ -512,42 +515,16 @@ function getGitTimestamp(file, type = "updated") {
512
515
  });
513
516
  }
514
517
 
515
- // node/constants/index.ts
516
- var EXCERPT_SEPARATOR = "<!-- more -->";
518
+ // shared/constants.ts
517
519
  var EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i;
518
- var PATHNAME_PROTOCOL_RE = /^pathname:\/\//;
519
- var ALL_ROUTE = "/:all(.*)*";
520
- var customElements = /* @__PURE__ */ new Set([
521
- // katex
522
- "annotation",
523
- "math",
524
- "menclose",
525
- "mfrac",
526
- "mglyph",
527
- "mi",
528
- "mlabeledtr",
529
- "mn",
530
- "mo",
531
- "mover",
532
- "mpadded",
533
- "mphantom",
534
- "mroot",
535
- "mrow",
536
- "mspace",
537
- "msqrt",
538
- "mstyle",
539
- "msub",
540
- "msubsup",
541
- "msup",
542
- "mtable",
543
- "mtd",
544
- "mtext",
545
- "mtr",
546
- "munder",
547
- "munderover",
548
- "semantics"
549
- ]);
550
- var defaultViteConfig = {};
520
+
521
+ // shared/utils/i18n.ts
522
+ function tObject(data, lang) {
523
+ if (typeof data === "object") {
524
+ return data[lang] || Object.values(data)[0] || "";
525
+ }
526
+ return data;
527
+ }
551
528
 
552
529
  // node/utils/helper.ts
553
530
  function isExternal(str) {
@@ -837,6 +814,44 @@ async function resolveThemeValaxyConfig(options) {
837
814
 
838
815
  // node/plugins/markdown/transform/matter.ts
839
816
  import yaml, { CORE_SCHEMA } from "js-yaml";
817
+
818
+ // node/constants/index.ts
819
+ var EXCERPT_SEPARATOR = "<!-- more -->";
820
+ var PATHNAME_PROTOCOL_RE = /^pathname:\/\//;
821
+ var ALL_ROUTE = "/:all(.*)*";
822
+ var customElements = /* @__PURE__ */ new Set([
823
+ // katex
824
+ "annotation",
825
+ "math",
826
+ "menclose",
827
+ "mfrac",
828
+ "mglyph",
829
+ "mi",
830
+ "mlabeledtr",
831
+ "mn",
832
+ "mo",
833
+ "mover",
834
+ "mpadded",
835
+ "mphantom",
836
+ "mroot",
837
+ "mrow",
838
+ "mspace",
839
+ "msqrt",
840
+ "mstyle",
841
+ "msub",
842
+ "msubsup",
843
+ "msup",
844
+ "mtable",
845
+ "mtd",
846
+ "mtext",
847
+ "mtr",
848
+ "munder",
849
+ "munderover",
850
+ "semantics"
851
+ ]);
852
+ var defaultViteConfig = {};
853
+
854
+ // node/plugins/markdown/transform/matter.ts
840
855
  var matterOptions = {
841
856
  excerpt_separator: EXCERPT_SEPARATOR,
842
857
  engines: {
@@ -980,14 +995,6 @@ import MarkdownIt from "markdown-it";
980
995
  import ora3 from "ora";
981
996
  import { getBorderCharacters, table } from "table";
982
997
 
983
- // shared/utils/i18n.ts
984
- function tObject(data, lang) {
985
- if (typeof data === "object") {
986
- return data[lang] || Object.values(data)[0] || "";
987
- }
988
- return data;
989
- }
990
-
991
998
  // node/utils/date.ts
992
999
  import fs8 from "fs-extra";
993
1000
  async function getCreatedTime(file) {
@@ -1221,6 +1228,7 @@ import { consola as consola13 } from "consola";
1221
1228
  import { resolve as resolve12 } from "pathe";
1222
1229
  import Components from "unplugin-vue-components/vite";
1223
1230
  import Layouts from "vite-plugin-vue-layouts";
1231
+ import { groupIconVitePlugin } from "vitepress-plugin-group-icons";
1224
1232
 
1225
1233
  // node/plugins/extendConfig.ts
1226
1234
  import { dirname as dirname4, join as join3, resolve as resolve6 } from "path";
@@ -1947,6 +1955,7 @@ import { full as emojiPlugin } from "markdown-it-emoji";
1947
1955
  import footnotePlugin from "markdown-it-footnote";
1948
1956
  import imageFigures from "markdown-it-image-figures";
1949
1957
  import TaskLists from "markdown-it-task-lists";
1958
+ import { groupIconMdPlugin } from "vitepress-plugin-group-icons";
1950
1959
 
1951
1960
  // node/plugins/markdown/plugins/link.ts
1952
1961
  import { URL as URL2 } from "url";
@@ -2610,7 +2619,6 @@ async function setupMarkdownPlugins(md3, options, base = "/") {
2610
2619
  ...mdOptions.imageFigures
2611
2620
  });
2612
2621
  md3.use(TaskLists);
2613
- const { groupIconMdPlugin } = await import("vitepress-plugin-group-icons");
2614
2622
  md3.use(groupIconMdPlugin, {
2615
2623
  titleBar: { includeSnippet: true }
2616
2624
  });
@@ -4033,18 +4041,6 @@ async function ViteValaxyPlugins(valaxyApp, serverOptions = {}) {
4033
4041
  }),
4034
4042
  createFixPlugins(options)
4035
4043
  ];
4036
- const { groupIconVitePlugin } = await import("vitepress-plugin-group-icons");
4037
- plugins.push(
4038
- groupIconVitePlugin({
4039
- customIcon: {
4040
- nodejs: "vscode-icons:file-type-node",
4041
- playwright: "vscode-icons:file-type-playwright",
4042
- typedoc: "vscode-icons:file-type-typedoc",
4043
- eslint: "vscode-icons:file-type-eslint"
4044
- },
4045
- ...valaxyConfig.groupIcons
4046
- })
4047
- );
4048
4044
  if (valaxyConfig.visualizer) {
4049
4045
  try {
4050
4046
  const visualizer = (await import("rollup-plugin-visualizer")).visualizer;
@@ -4064,6 +4060,22 @@ async function ViteValaxyPlugins(valaxyApp, serverOptions = {}) {
4064
4060
  console.log();
4065
4061
  }
4066
4062
  }
4063
+ const customIcon = {
4064
+ nodejs: "vscode-icons:file-type-node",
4065
+ playwright: "vscode-icons:file-type-playwright",
4066
+ typedoc: "vscode-icons:file-type-typedoc",
4067
+ eslint: "vscode-icons:file-type-eslint"
4068
+ };
4069
+ plugins.push(
4070
+ groupIconVitePlugin({
4071
+ customIcon,
4072
+ ...valaxyConfig.groupIcons,
4073
+ defaultLabels: [
4074
+ ...valaxyConfig.groupIcons?.defaultLabels || [],
4075
+ ...Object.keys(valaxyConfig.groupIcons?.customIcon || {})
4076
+ ]
4077
+ })
4078
+ );
4067
4079
  return plugins;
4068
4080
  }
4069
4081
 
@@ -4785,7 +4797,6 @@ function run() {
4785
4797
 
4786
4798
  export {
4787
4799
  EXCERPT_SEPARATOR,
4788
- EXTERNAL_URL_RE,
4789
4800
  PATHNAME_PROTOCOL_RE,
4790
4801
  ALL_ROUTE,
4791
4802
  customElements,
@@ -3,7 +3,7 @@ import {
3
3
  registerDevCommand,
4
4
  run,
5
5
  startValaxyDev
6
- } from "../../chunk-UBPYRQAO.js";
6
+ } from "../../chunk-O3SOO3BN.js";
7
7
  export {
8
8
  cli,
9
9
  registerDevCommand,
@@ -609,7 +609,6 @@ type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | undefined>;
609
609
  declare function defineUnoSetup(fn: UnoSetup): UnoSetup;
610
610
 
611
611
  declare const EXCERPT_SEPARATOR = "<!-- more -->";
612
- declare const EXTERNAL_URL_RE: RegExp;
613
612
  declare const PATHNAME_PROTOCOL_RE: RegExp;
614
613
  declare const ALL_ROUTE = "/:all(.*)*";
615
614
  declare const customElements: Set<string>;
@@ -669,4 +668,4 @@ declare function toAtFS(path: string): string;
669
668
  declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
670
669
  declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
671
670
 
672
- export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, type HookResult, type LoadConfigFromFileOptions, PATHNAME_PROTOCOL_RE, type ResolvedConfig, type ResolvedValaxyOptions, type UnoSetup, type UserInputConfig, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyApp, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
671
+ export { ALL_ROUTE, EXCERPT_SEPARATOR, type HookResult, type LoadConfigFromFileOptions, PATHNAME_PROTOCOL_RE, type ResolvedConfig, type ResolvedValaxyOptions, type UnoSetup, type UserInputConfig, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyApp, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  ALL_ROUTE,
3
3
  EXCERPT_SEPARATOR,
4
- EXTERNAL_URL_RE,
5
4
  PATHNAME_PROTOCOL_RE,
6
5
  ViteValaxyPlugins,
7
6
  build,
@@ -50,11 +49,10 @@ import {
50
49
  startValaxyDev,
51
50
  toAtFS,
52
51
  transformObject
53
- } from "../chunk-UBPYRQAO.js";
52
+ } from "../chunk-O3SOO3BN.js";
54
53
  export {
55
54
  ALL_ROUTE,
56
55
  EXCERPT_SEPARATOR,
57
- EXTERNAL_URL_RE,
58
56
  PATHNAME_PROTOCOL_RE,
59
57
  ViteValaxyPlugins,
60
58
  build,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.24.0",
4
+ "version": "0.24.2",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -132,8 +132,8 @@
132
132
  "vue-i18n": "^11.1.9",
133
133
  "vue-router": "^4.5.1",
134
134
  "yargs": "^18.0.0",
135
- "@valaxyjs/devtools": "0.24.0",
136
- "@valaxyjs/utils": "0.24.0"
135
+ "@valaxyjs/devtools": "0.24.2",
136
+ "@valaxyjs/utils": "0.24.2"
137
137
  },
138
138
  "devDependencies": {
139
139
  "@mdit-vue/plugin-component": "^2.1.4",
@@ -0,0 +1 @@
1
+ export const EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i
package/shared/index.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './constants'
1
2
  export * from './utils'