valaxy 0.20.5 → 0.20.7

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.
Files changed (67) hide show
  1. package/client/components/ValaxyApp.vue +10 -11
  2. package/client/components/ValaxyDecrypt.vue +9 -7
  3. package/client/components/ValaxyGalleryDecrypt.vue +1 -0
  4. package/client/components/ValaxyLogo.vue +5 -1
  5. package/client/components/ValaxyMd.vue +3 -3
  6. package/client/components/builtin/ValaxyMermaid.vue +40 -41
  7. package/client/composables/app/useValaxyHead.ts +13 -6
  8. package/client/composables/categories.ts +1 -1
  9. package/client/composables/codeGroups.ts +1 -1
  10. package/client/composables/collections.ts +1 -1
  11. package/client/composables/common.ts +3 -3
  12. package/client/composables/features/collapse-code.ts +1 -1
  13. package/client/composables/features/copy-code.ts +1 -0
  14. package/client/composables/features/index.ts +1 -1
  15. package/client/composables/helper/useInvisibleElement.ts +1 -1
  16. package/client/composables/index.ts +10 -10
  17. package/client/composables/locale.ts +4 -3
  18. package/client/composables/outline/anchor.ts +9 -8
  19. package/client/composables/outline/headers.ts +3 -3
  20. package/client/composables/outline/index.ts +1 -1
  21. package/client/composables/post/index.ts +3 -3
  22. package/client/composables/search/useFuseSearch.ts +4 -4
  23. package/client/composables/tags.ts +1 -1
  24. package/client/composables/widgets/aplayer.ts +1 -1
  25. package/client/config.ts +8 -8
  26. package/client/index.ts +5 -5
  27. package/client/main.ts +15 -15
  28. package/client/modules/devtools.ts +1 -1
  29. package/client/modules/floating-vue.ts +3 -3
  30. package/client/modules/mermaid.ts +3 -3
  31. package/client/modules/nprogress.ts +1 -1
  32. package/client/modules/pinia.ts +1 -1
  33. package/client/modules/schemaOrg.ts +1 -1
  34. package/client/modules/valaxy.ts +6 -6
  35. package/client/setup/main.ts +7 -7
  36. package/client/setup/mermaid.ts +1 -1
  37. package/client/setups.ts +2 -2
  38. package/client/stores/app.ts +1 -1
  39. package/client/stores/site.ts +2 -2
  40. package/client/styles/common/markdown.scss +4 -4
  41. package/client/styles/index.scss +0 -1
  42. package/client/types/index.ts +1 -1
  43. package/client/utils/index.ts +3 -3
  44. package/client/utils/time.ts +3 -4
  45. package/dist/chunk-JOSLTXIR.cjs +161 -0
  46. package/dist/chunk-LB5BBIUM.mjs +162 -0
  47. package/dist/node/cli/index.cjs +1 -1
  48. package/dist/node/cli/index.mjs +1 -1
  49. package/dist/node/index.cjs +1 -1
  50. package/dist/node/index.d.cts +86 -86
  51. package/dist/node/index.d.ts +86 -86
  52. package/dist/node/index.mjs +1 -1
  53. package/dist/types/index.cjs +1 -1
  54. package/dist/types/index.d.cts +3 -3
  55. package/dist/types/index.d.ts +3 -3
  56. package/dist/types/index.mjs +1 -1
  57. package/package.json +23 -23
  58. package/shims.d.ts +2 -2
  59. package/types/config.ts +1 -1
  60. package/types/index.ts +3 -3
  61. package/client/styles/common/scrollbar.scss +0 -30
  62. package/dist/chunk-5CL433IL.mjs +0 -162
  63. package/dist/chunk-VDCJKFCV.cjs +0 -161
  64. package/dist/{chunk-6GE64PZD.cjs → chunk-BJ22GQI6.cjs} +0 -0
  65. package/dist/{chunk-WE2LNW3F.mjs → chunk-XKANGEKW.mjs} +0 -0
  66. package/dist/{config-DfXD9Gt_.d.cts → config-Dxu7i2Zs.d.cts} +1 -1
  67. package/dist/{config-DfXD9Gt_.d.ts → config-Dxu7i2Zs.d.ts} +1 -1
@@ -1,5 +1,5 @@
1
- import { initValaxyConfig } from 'valaxy'
2
1
  import type { UserModule } from '../types'
2
+ import { initValaxyConfig } from 'valaxy'
3
3
 
4
4
  // https://unhead-schema-org.harlanzw.com/
5
5
  export const install: UserModule = async ({ head, isClient, router }) => {
@@ -1,4 +1,4 @@
1
- import { createI18n } from 'vue-i18n'
1
+ import type { DefaultTheme, ValaxyConfig } from 'valaxy/types'
2
2
 
3
3
  /*
4
4
  * All i18n resources specified in the plugin `include` option can be loaded
@@ -8,14 +8,14 @@ import { createI18n } from 'vue-i18n'
8
8
  */
9
9
  // import messages from '@intlify/unplugin-vue-i18n/messages'
10
10
 
11
- import { useStorage } from '@vueuse/core'
11
+ import type { ViteSSGContext } from 'vite-ssg'
12
12
 
13
- import type { Router } from 'vue-router'
14
- import { ensureSuffix } from '@antfu/utils'
15
13
  import type { ComputedRef } from 'vue'
16
- import type { ViteSSGContext } from 'vite-ssg'
17
- import type { DefaultTheme, ValaxyConfig } from 'valaxy/types'
14
+ import type { Router } from 'vue-router'
18
15
  import type { PageDataPayload } from '../../types'
16
+ import { ensureSuffix } from '@antfu/utils'
17
+ import { useStorage } from '@vueuse/core'
18
+ import { createI18n } from 'vue-i18n'
19
19
 
20
20
  // @ts-expect-error virtual
21
21
  import valaxyMessages from '/@valaxyjs/locales'
@@ -1,19 +1,19 @@
1
- /* __imports__ */
2
- import type { ViteSSGContext } from 'vite-ssg'
3
- import type { ComputedRef } from 'vue'
4
-
5
1
  // import type { RouteMeta } from 'vue-router'
6
2
  // fix build caused by pnpm
7
3
  // This is likely not portable. A type annotation is necessary.
8
4
  // https://github.com/microsoft/TypeScript/issues/42873
9
5
  import type { DefaultTheme, ValaxyConfig } from 'valaxy/types'
6
+ /* __imports__ */
7
+ import type { ViteSSGContext } from 'vite-ssg'
8
+
9
+ import type { ComputedRef } from 'vue'
10
10
 
11
11
  import consola from 'consola'
12
- import { install as installValaxy } from '../modules/valaxy'
13
- import { install as installPinia } from '../modules/pinia'
12
+ import { install as installFloatingVue } from '../modules/floating-vue'
14
13
  import { install as installNprogress } from '../modules/nprogress'
14
+ import { install as installPinia } from '../modules/pinia'
15
15
  import { install as installSchema } from '../modules/schemaOrg'
16
- import { install as installFloatingVue } from '../modules/floating-vue'
16
+ import { install as installValaxy } from '../modules/valaxy'
17
17
 
18
18
  export default function setupMain(ctx: ViteSSGContext, config: ComputedRef<ValaxyConfig<DefaultTheme.Config>>) {
19
19
  // @ts-expect-error inject in runtime
@@ -1,7 +1,7 @@
1
1
  /* __imports__ */
2
2
 
3
- import { defineMermaidSetup } from 'valaxy'
4
3
  import type { MermaidOptions } from '../types'
4
+ import { defineMermaidSetup } from 'valaxy'
5
5
 
6
6
  /**
7
7
  * @en
package/client/setups.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { ViteSSGContext } from 'vite-ssg'
2
1
  import type { Awaitable } from '@antfu/utils'
2
+ import type { ViteSSGContext } from 'vite-ssg'
3
3
  import type { MermaidOptions } from './types'
4
4
 
5
5
  /**
@@ -8,7 +8,7 @@ import type { MermaidOptions } from './types'
8
8
  * The context object for the application setup function.
9
9
  *
10
10
  * @zh
11
- * 应用 setup 函数的上下文对象。(包括了 ViteSSG context)
11
+ * 应用 setup 函数的上下文对象。(包括了 `ViteSSGContext`)
12
12
  */
13
13
  export type AppContext = ViteSSGContext
14
14
 
@@ -1,6 +1,6 @@
1
1
  import { acceptHMRUpdate, defineStore } from 'pinia'
2
- import { computed, ref } from 'vue'
3
2
  import { useMobile, useSiteConfig, useThemeConfig, useValaxyDark } from 'valaxy'
3
+ import { computed, ref } from 'vue'
4
4
 
5
5
  /**
6
6
  * Global store for users
@@ -1,7 +1,7 @@
1
- import { computed, ref } from 'vue'
1
+ import type { PageDataPayload } from '../../types'
2
2
  import { acceptHMRUpdate, defineStore } from 'pinia'
3
+ import { computed, ref } from 'vue'
3
4
  import { usePostList, useRouterStore } from '..'
4
- import type { PageDataPayload } from '../../types'
5
5
  import { setWindowValaxyProp } from '../utils/dev'
6
6
 
7
7
  /**
@@ -25,15 +25,15 @@
25
25
 
26
26
  // custom block
27
27
  .custom-block {
28
- margin: 16px 0;
29
-
30
28
  p {
31
29
  margin: 8px 0;
32
30
  line-height: 24px;
33
31
  }
32
+ }
34
33
 
35
- p:first-child {
36
- margin: 0;
34
+ .custom-block div[lang] {
35
+ p {
36
+ margin: 8px 0;
37
37
  }
38
38
  }
39
39
 
@@ -12,7 +12,6 @@ $c-primary: #0078e7 !default;
12
12
  // common
13
13
  @use "./common/code.scss" as *;
14
14
  @use "./common/hamburger.scss" as *;
15
- @use "./common/scrollbar.scss" as *;
16
15
  @use "./common/transition.scss" as *;
17
16
 
18
17
  // markdown
@@ -1,5 +1,5 @@
1
- import type { ViteSSGContext } from 'vite-ssg'
2
1
  import type mermaid from 'mermaid'
2
+ import type { ViteSSGContext } from 'vite-ssg'
3
3
 
4
4
  export type UserModule = (ctx: ViteSSGContext) => void
5
5
 
@@ -1,8 +1,8 @@
1
1
  export * from './cdn'
2
2
  export * from './code'
3
+ export * from './content'
3
4
  export * from './helper'
5
+ export * from './router'
4
6
  export * from './time'
5
- export * from './wrap'
6
7
  export * from './types'
7
- export * from './content'
8
- export * from './router'
8
+ export * from './wrap'
@@ -1,11 +1,10 @@
1
1
  import type { ToDateOptionsWithTZ } from 'date-fns-tz'
2
+ import type { Post } from '../../types'
3
+ import { format, toDate } from 'date-fns'
2
4
  import { format as formatWithTZ, toZonedTime } from 'date-fns-tz'
3
- import { format } from 'date-fns/format'
4
- import { toDate } from 'date-fns/toDate'
5
5
  import { DateTime } from 'luxon'
6
- import type { Post } from '../../types'
7
- import { i18n } from '../modules/valaxy'
8
6
  import { timezone as globalTimezone } from '../composables/global'
7
+ import { i18n } from '../modules/valaxy'
9
8
 
10
9
  const referenceDate = new Date(1986, 3 /* Apr */, 4, 10, 32, 0, 900)
11
10