valaxy 0.4.0 → 0.5.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.
Files changed (145) hide show
  1. package/{src/client → client}/App.vue +0 -0
  2. package/{src/client → client}/components/AppLink.vue +0 -0
  3. package/{src/client → client}/components/PostCard.vue +37 -23
  4. package/{src/client → client}/components/PostList.vue +0 -0
  5. package/{src/client → client}/components/README.md +0 -0
  6. package/{src/client → client}/components/ValaxyBg.vue +1 -1
  7. package/{src/client → client}/components/ValaxyCopyright.vue +0 -0
  8. package/{src/client → client}/components/ValaxyFooter.vue +2 -2
  9. package/{src/client → client}/components/ValaxyHamburger.vue +0 -0
  10. package/{src/client → client}/components/ValaxyMd.vue +1 -5
  11. package/{src/client → client}/components/ValaxyOverlay.vue +0 -0
  12. package/{src/client → client}/components/ValaxyPagination.vue +0 -0
  13. package/{src/client → client}/components/ValaxyRightSidebar.vue +0 -0
  14. package/{src/client → client}/components/ValaxySidebar.vue +0 -0
  15. package/{src/client → client}/components/ValaxyToc.vue +0 -0
  16. package/{src/client → client}/composables/category.ts +0 -0
  17. package/{src/client → client}/composables/comments/index.ts +0 -0
  18. package/{src/client → client}/composables/comments/twikoo.ts +0 -0
  19. package/{src/client → client}/composables/comments/waline.ts +0 -0
  20. package/{src/client → client}/composables/common.ts +0 -0
  21. package/{src/client → client}/composables/dark.ts +0 -0
  22. package/{src/client/composables/search → client/composables/features}/index.ts +0 -0
  23. package/{src/client → client}/composables/helper.ts +0 -0
  24. package/{src/client → client}/composables/index.ts +1 -1
  25. package/{src/client → client}/composables/layout.ts +0 -0
  26. package/{src/client → client}/composables/post.ts +0 -0
  27. package/client/composables/search/index.ts +0 -0
  28. package/{src/client → client}/composables/sidebar.ts +0 -0
  29. package/{src/client → client}/composables/tag.ts +0 -0
  30. package/{src/client → client}/composables/widgets/aplayer.ts +0 -0
  31. package/{src/client → client}/composables/widgets/backToTop.ts +0 -0
  32. package/{src/client → client}/composables/widgets/codepen.ts +0 -0
  33. package/{src/client → client}/composables/widgets/index.ts +0 -0
  34. package/{src/client → client}/config.ts +2 -1
  35. package/{src/client → client}/index.html +0 -0
  36. package/{src/client → client}/index.ts +0 -0
  37. package/{src/client → client}/layouts/404.vue +0 -0
  38. package/{src/client → client}/layouts/README.md +0 -0
  39. package/{src/client → client}/locales/README.md +0 -0
  40. package/{src/client → client}/locales/en.yml +1 -0
  41. package/{src/client → client}/locales/zh-CN.yml +4 -3
  42. package/{src/client → client}/main.ts +0 -0
  43. package/{src/client → client}/modules/README.md +0 -0
  44. package/{src/client → client}/modules/nprogress.ts +0 -0
  45. package/{src/client → client}/modules/pinia.ts +0 -0
  46. package/{src/client → client}/modules/valaxy.ts +0 -0
  47. package/{src/client → client}/pages/README.md +0 -0
  48. package/{src/client → client}/pages/[...all].vue +0 -0
  49. package/{src/client → client}/pages/hi/[name].vue +0 -0
  50. package/{src/client → client}/pages/index.vue +0 -0
  51. package/{src/client → client}/pages/page/[page].vue +0 -0
  52. package/{src/client → client}/shims.d.ts +1 -0
  53. package/{src/client → client}/stores/app.ts +0 -0
  54. package/{src/client → client}/stores/user.ts +0 -0
  55. package/{src/client → client}/styles/common/button.scss +0 -0
  56. package/{src/client → client}/styles/common/code.scss +0 -0
  57. package/{src/client → client}/styles/common/custom-blocks.scss +0 -0
  58. package/{src/client → client}/styles/common/hamburger.scss +0 -0
  59. package/{src/client → client}/styles/common/markdown.scss +0 -0
  60. package/client/styles/common/scrollbar.scss +28 -0
  61. package/{src/client → client}/styles/common/sidebar.scss +0 -0
  62. package/{src/client → client}/styles/common/transition.scss +0 -0
  63. package/{src/client → client}/styles/css-vars.scss +0 -0
  64. package/{src/client → client}/styles/global/helper.scss +0 -0
  65. package/{src/client → client}/styles/global/i18n.scss +0 -0
  66. package/{src/client → client}/styles/global/index.scss +0 -0
  67. package/{src/client → client}/styles/global/nprogress.scss +0 -0
  68. package/{src/client → client}/styles/global/reset.scss +0 -0
  69. package/{src/client → client}/styles/index.scss +0 -0
  70. package/{src/client → client}/styles/mixins/config.scss +0 -0
  71. package/{src/client → client}/styles/mixins/index.scss +0 -0
  72. package/{src/client → client}/styles/mixins/size.scss +0 -0
  73. package/{src/client → client}/styles/mixins/variable.scss +0 -0
  74. package/{src/client → client}/styles/palette.scss +0 -0
  75. package/client/styles/third/katex.scss +3 -0
  76. package/{src/client → client}/styles/vars.scss +0 -0
  77. package/{src/client → client}/styles/widgets/banner.scss +0 -0
  78. package/{src/client → client}/types.ts +0 -0
  79. package/{src/client → client}/utils/helper.ts +0 -0
  80. package/{src/client → client}/utils/index.ts +0 -0
  81. package/{src/client → client}/utils/time.ts +0 -0
  82. package/dist/chunk-EAN2KU6W.mjs +1 -0
  83. package/dist/chunk-RSQONJW3.mjs +86 -0
  84. package/dist/chunk-U5OMNIOK.js +1 -0
  85. package/dist/chunk-XQIGHIAX.js +86 -0
  86. package/dist/client/index.d.ts +188 -0
  87. package/dist/client/index.js +1 -0
  88. package/dist/client/index.mjs +1 -0
  89. package/dist/{config-de04677b.d.ts → config-7bd43d41.d.ts} +24 -12
  90. package/dist/node/cli.js +10 -10
  91. package/dist/node/cli.mjs +10 -10
  92. package/dist/node/index.d.ts +2 -2
  93. package/dist/node/index.js +1 -1
  94. package/dist/node/index.mjs +1 -1
  95. package/dist/posts-32f55e33.d.ts +117 -0
  96. package/dist/types/index.d.ts +8 -0
  97. package/dist/types/index.js +1 -0
  98. package/dist/types/index.mjs +0 -0
  99. package/index.d.ts +3 -0
  100. package/{src/node → node}/build.ts +0 -0
  101. package/{src/node → node}/cli.ts +3 -2
  102. package/node/config.ts +170 -0
  103. package/{src/node → node}/index.ts +0 -0
  104. package/{src/node → node}/markdown/check.ts +0 -0
  105. package/{src/node → node}/markdown/highlight.ts +0 -0
  106. package/{src/node → node}/markdown/index.ts +0 -0
  107. package/{src/node → node}/markdown/markdown-it/container.ts +0 -0
  108. package/{src/node → node}/markdown/markdown-it/headings.ts +0 -0
  109. package/{src/node → node}/markdown/markdown-it/highlightLines.ts +0 -0
  110. package/{src/node → node}/markdown/markdown-it/katex.ts +0 -0
  111. package/{src/node → node}/markdown/markdown-it/parseHeader.ts +0 -0
  112. package/{src/node → node}/markdown/slugify.ts +0 -0
  113. package/{src/node → node}/options.ts +2 -2
  114. package/{src/node → node}/plugins/extendConfig.ts +2 -1
  115. package/{src/node → node}/plugins/index.ts +10 -3
  116. package/{src/node → node}/plugins/markdown.ts +3 -6
  117. package/{src/node → node}/plugins/preset.ts +0 -0
  118. package/{src/node → node}/plugins/unocss.ts +0 -0
  119. package/{src/node → node}/plugins/valaxy.ts +0 -0
  120. package/{src/node → node}/rss.ts +0 -0
  121. package/{src/node → node}/server.ts +0 -0
  122. package/{src/node → node}/shims.d.ts +0 -0
  123. package/{src/node → node}/utils/cli.ts +1 -1
  124. package/node/utils/index.ts +48 -0
  125. package/node/utils/net.ts +20 -0
  126. package/{src/node → node}/vite.ts +5 -1
  127. package/package.json +18 -10
  128. package/tsup.config.ts +4 -3
  129. package/{src/types → types}/config.ts +27 -107
  130. package/{src/types → types}/index.ts +0 -0
  131. package/{src/types → types}/posts.ts +5 -0
  132. package/dist/chunk-6LIOFBAA.mjs +0 -1
  133. package/dist/chunk-HRARZPSA.js +0 -83
  134. package/dist/chunk-N6HD5SHF.mjs +0 -83
  135. package/dist/chunk-V3BMKLEW.js +0 -1
  136. package/dist/index.d.ts +0 -407
  137. package/dist/index.js +0 -1
  138. package/dist/index.mjs +0 -1
  139. package/src/client/composables/features/index.ts +0 -1
  140. package/src/client/composables/features/katex.ts +0 -15
  141. package/src/client/composables/search/algolia.ts +0 -115
  142. package/src/client/styles/common/scrollbar.scss +0 -34
  143. package/src/index.ts +0 -2
  144. package/src/node/config.ts +0 -52
  145. package/src/node/utils/index.ts +0 -26
File without changes
File without changes
@@ -13,32 +13,46 @@ const { icon, styles } = usePostProperty(props.post.type)
13
13
  </script>
14
14
 
15
15
  <template>
16
- <YunCard m="y-4 auto" class="post-card" :style="styles">
17
- <AppLink
18
- class="post-title-link"
19
- :to="post.path || ''"
20
- m="t-3"
21
- >
22
- <div class="flex justify-center items-center title text-2xl" font="serif black">
23
- <div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />{{ post.title }}
24
- </div>
25
- </AppLink>
16
+ <YunCard m="y-4 auto" :class="post.cover ? 'post-card-image' : 'post-card'" :style="styles">
17
+ <div class="flex flex-1 of-hidden justify-start items-start post-card-info" w="full">
18
+ <img
19
+ v-if="post.cover"
20
+ :src="post.cover"
21
+ :alt="t('post.cover')"
22
+ w="40%"
23
+ class="object-contain self-center"
24
+ >
25
+
26
+ <div class="post-card-image-info-text flex-1" w="full">
27
+ <div class="flex flex-col flex-1 justify-center items-center" w="full">
28
+ <AppLink
29
+ class="post-title-link"
30
+ :to="post.path || ''"
31
+ m="t-3"
32
+ >
33
+ <div class="flex justify-center items-center title text-2xl" font="serif black">
34
+ <div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />{{ post.title }}
35
+ </div>
36
+ </AppLink>
26
37
 
27
- <YunPostMeta :frontmatter="post" />
38
+ <YunPostMeta :frontmatter="post" />
28
39
 
29
- <div v-if="post.excerpt" class="markdown-body" text="left" w="full" p="x-6 lt-sm:4" v-html="post.excerpt" />
30
- <div m="b-5" />
40
+ <div v-if="post.excerpt" class="markdown-body" text="left" w="full" p="x-6 lt-sm:4" v-html="post.excerpt" />
41
+ <div m="b-5" />
31
42
 
32
- <a
33
- v-if="post.url"
34
- :href="post.url"
35
- class="post-link-btn shadow hover:shadow-md"
36
- rounded
37
- target="_blank"
38
- m="b-4"
39
- >
40
- {{ t('post.view_link') }}
41
- </a>
43
+ <a
44
+ v-if="post.url"
45
+ :href="post.url"
46
+ class="post-link-btn shadow hover:shadow-md"
47
+ rounded
48
+ target="_blank"
49
+ m="b-4"
50
+ >
51
+ {{ t('post.view_link') }}
52
+ </a>
53
+ </div>
54
+ </div>
55
+ </div>
42
56
 
43
57
  <div v-if="post.categories || post.tags" w="full" class="yun-card-actions flex justify-between" border="t" text="sm">
44
58
  <div class="inline-flex">
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed } from 'vue'
3
- import { useThemeConfig } from 'valaxy'
3
+ import { useThemeConfig } from 'valaxy/client'
4
4
  import { useCssVar } from '@vueuse/core'
5
5
  import { isDark } from '~/composables'
6
6
 
@@ -1,9 +1,9 @@
1
1
  <script lang="ts" setup>
2
2
  import { capitalize, computed } from 'vue'
3
- import { useConfig, useThemeConfig } from 'valaxy'
3
+ import { useConfig, useThemeConfig } from 'valaxy/client'
4
4
  import { useI18n } from 'vue-i18n'
5
5
 
6
- import pkg from '~/../../package.json'
6
+ import pkg from '../../package.json'
7
7
 
8
8
  const { t } = useI18n()
9
9
 
@@ -2,7 +2,7 @@
2
2
  import type { Post } from 'valaxy'
3
3
  import { onMounted, ref } from 'vue'
4
4
  import { useI18n } from 'vue-i18n'
5
- import { useAplayer, useCodePen, useKatex } from '~/composables'
5
+ import { useAplayer, useCodePen } from '~/composables'
6
6
  import { wrapTable } from '~/utils'
7
7
 
8
8
  const props = defineProps<{
@@ -21,10 +21,6 @@ onMounted(() => {
21
21
  updateDom()
22
22
  })
23
23
 
24
- // features
25
- if (props.frontmatter.katex)
26
- useKatex()
27
-
28
24
  // widgets
29
25
  if (props.frontmatter.aplayer)
30
26
  useAplayer()
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -5,7 +5,7 @@ export * from './tag'
5
5
 
6
6
  // common
7
7
  export * from './common'
8
- export * from './features'
8
+ // export * from './features'
9
9
  export * from './helper'
10
10
  export * from './dark'
11
11
  export * from './layout'
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,7 +2,7 @@
2
2
  import valaxyConfig from '@valaxyjs/config'
3
3
  import type { ComputedRef, InjectionKey } from 'vue'
4
4
  import { computed, inject, readonly, shallowRef } from 'vue'
5
- import type { ThemeConfig } from '../../../valaxy-theme-yun'
5
+ import type { ThemeConfig } from 'valaxy-theme-yun'
6
6
  import type { ValaxyConfig } from '../types'
7
7
 
8
8
  /**
@@ -49,3 +49,4 @@ export function useThemeConfig() {
49
49
  const config = useConfig()
50
50
  return computed(() => config!.value.themeConfig)
51
51
  }
52
+
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -43,6 +43,7 @@ post:
43
43
  related_posts: Related Posts
44
44
  view_link: View Link
45
45
  read_more: READ MORE
46
+ cover: Cover
46
47
  copyright:
47
48
  author: Post author
48
49
  link: Post link
@@ -43,6 +43,7 @@ post:
43
43
  related_posts: 相关文章
44
44
  view_link: 查看链接
45
45
  read_more: 阅读更多
46
+ cover: 封面
46
47
  copyright:
47
48
  author: 本文作者
48
49
  link: 本文链接
@@ -59,9 +60,9 @@ footer:
59
60
  total_visitors: 总访客量
60
61
 
61
62
  counter:
62
- archives: 暂无日志 | 共计 {count} 篇日志
63
- categories: 暂无分类 | 共计 {count} 个分类
64
- tags: 暂无标签 | 共计 {count} 个标签
63
+ archives: 暂无日志 | 共计 1 篇日志 | 共计 {count} 篇日志
64
+ categories: 暂无分类 | 共计 1 个分类 | 共计 {count} 个分类
65
+ tags: 暂无标签 | 共计 1 个标签 | 共计 {count} 个标签
65
66
  albums:
66
67
  zero: 暂无相册
67
68
  one: 共计 1 个相册
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -34,3 +34,4 @@ declare module 'vue-router' {
34
34
  frontmatter: Post
35
35
  }
36
36
  }
37
+
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,28 @@
1
+ @use "~/styles/mixins" as *;
2
+
3
+ ::-webkit-scrollbar {
4
+ width: 8px;
5
+ height: 8px;
6
+ }
7
+
8
+ ::-webkit-scrollbar-track {
9
+ border-radius: 2px;
10
+ background-color: rgba(255, 255, 255, 0.1);
11
+ }
12
+
13
+ ::-webkit-scrollbar-thumb {
14
+ border-radius: 2px;
15
+ background-color: rgba(122, 122, 122, 0.3);
16
+
17
+ &:window-inactive {
18
+ background-color: rgba(122, 122, 122, 0.3);
19
+ }
20
+
21
+ &:hover {
22
+ background-color: rgba(get-css-var("c", "primary", "rgb"), 0.7);
23
+ }
24
+
25
+ &:active {
26
+ background-color: rgba(get-css-var("c", "primary", "rgb"), 0.9);
27
+ }
28
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ .katex-display > .katex > .katex-html > .tag {
2
+ right: 2px;
3
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ var j=Object.create;var e=Object.defineProperty,k=Object.defineProperties,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var h=(b,a,c)=>a in b?e(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c,r=(b,a)=>{for(var c in a||(a={}))i.call(a,c)&&h(b,c,a[c]);if(g)for(var c of g(a))p.call(a,c)&&h(b,c,a[c]);return b},s=(b,a)=>k(b,m(a));var t=(b=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(b,{get:(a,c)=>(typeof require!="undefined"?require:a)[c]}):b)(function(b){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+b+'" is not supported')});var u=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);var q=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of n(a))!i.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=l(a,d))||f.enumerable});return b};var v=(b,a,c)=>(c=b!=null?j(o(b)):{},q(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{r as a,s as b,t as c,u as d,v as e};