@globalbrain/sefirot 3.46.0 → 3.47.1

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.
@@ -1,12 +1,21 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
+ import SLocalNavAvatar from './SLocalNavAvatar.vue'
4
+ import SLocalNavDescription from './SLocalNavDescription.vue'
3
5
  import SLocalNavMenu, { type MenuItem } from './SLocalNavMenu.vue'
4
6
  import SLocalNavTitle, { type Title } from './SLocalNavTitle.vue'
5
7
 
6
8
  export type { Title, MenuItem }
7
9
 
10
+ export interface Avatar {
11
+ image?: string | null
12
+ name?: string | null
13
+ }
14
+
8
15
  const props = defineProps<{
16
+ avatar?: Avatar
9
17
  title: Title[]
18
+ description?: string
10
19
  menu?: MenuItem[][]
11
20
  }>()
12
21
 
@@ -20,7 +29,18 @@ const normalizedMenu = computed(() => {
20
29
 
21
30
  <template>
22
31
  <div class="SLocalNav" :class="{ 'has-menu': normalizedMenu }">
23
- <SLocalNavTitle :title="title" />
32
+ <div class="title-bar">
33
+ <div v-if="avatar" class="title-bar-avatar">
34
+ <SLocalNavAvatar
35
+ :image="avatar.image"
36
+ :name="avatar.name"
37
+ />
38
+ </div>
39
+ <div class="title-bar-body">
40
+ <SLocalNavTitle :title="title" />
41
+ <SLocalNavDescription v-if="description" :text="description" />
42
+ </div>
43
+ </div>
24
44
  <SLocalNavMenu v-if="normalizedMenu" :menu="normalizedMenu" />
25
45
  </div>
26
46
  </template>
@@ -29,7 +49,7 @@ const normalizedMenu = computed(() => {
29
49
  .SLocalNav {
30
50
  display: flex;
31
51
  flex-direction: column;
32
- gap: 8px;
52
+ gap: 12px;
33
53
  padding: 16px 24px;
34
54
  background-color: var(--c-bg-elv-2);
35
55
 
@@ -45,4 +65,10 @@ const normalizedMenu = computed(() => {
45
65
  padding-bottom: 0;
46
66
  }
47
67
  }
68
+
69
+ .title-bar {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: 16px;
73
+ }
48
74
  </style>
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import SAvatar from './SAvatar.vue'
3
+
4
+ defineProps<{
5
+ image?: string | null
6
+ name?: string | null
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <div class="SLocalNavAvatar">
12
+ <SAvatar
13
+ size="fill"
14
+ :avatar="image"
15
+ :name="name"
16
+ />
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped lang="postcss">
21
+ .SLocalNavAvatar {
22
+ width: 64px;
23
+ height: 64px;
24
+ }
25
+ </style>
@@ -0,0 +1,19 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ text: string
4
+ }>()
5
+ </script>
6
+
7
+ <template>
8
+ <div class="SLocalNavDescription">
9
+ {{ text }}
10
+ </div>
11
+ </template>
12
+
13
+ <style scoped lang="postcss">
14
+ .SLocalNavDescription {
15
+ line-height: 24px;
16
+ font-size: 14px;
17
+ color: var(--c-text-2);
18
+ }
19
+ </style>
@@ -206,6 +206,8 @@ export function useErrorHandler({
206
206
  }
207
207
 
208
208
  resetTracking()
209
+ } else {
210
+ console.error(e)
209
211
  }
210
212
  }
211
213
  }
@@ -1,11 +1,11 @@
1
- import MarkdownIt from 'markdown-it'
1
+ import MarkdownIt, { type Options as MarkdownItOptions } from 'markdown-it'
2
2
  import { type Ref, onUnmounted } from 'vue'
3
3
  import { useRouter } from 'vue-router'
4
4
  import { type LinkAttrs, isCallbackUrl, isExternalUrl, linkPlugin } from './markdown/LinkPlugin'
5
5
 
6
6
  export type UseMarkdown = (source: string, inline: boolean) => string
7
7
 
8
- export interface UseMarkdownOptions extends MarkdownIt.Options {
8
+ export interface UseMarkdownOptions extends MarkdownItOptions {
9
9
  linkAttrs?: LinkAttrs
10
10
  config?: (md: MarkdownIt) => void
11
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "3.46.0",
4
- "packageManager": "pnpm@9.1.0",
3
+ "version": "3.47.1",
4
+ "packageManager": "pnpm@9.1.1",
5
5
  "description": "Vue Components for Global Brain Design System.",
6
6
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",
7
7
  "license": "MIT",
@@ -46,8 +46,8 @@
46
46
  "@types/body-scroll-lock": "^3.1.2",
47
47
  "@types/lodash-es": "^4.17.12",
48
48
  "@types/markdown-it": "^14.1.1",
49
- "@vue/reactivity": "^3.4.26",
50
- "@vue/runtime-core": "^3.4.26",
49
+ "@vue/reactivity": "^3.4.27",
50
+ "@vue/runtime-core": "^3.4.27",
51
51
  "@vuelidate/core": "^2.0.3",
52
52
  "@vuelidate/validators": "^2.0.4",
53
53
  "@vueuse/core": "^10.9.0",
@@ -60,11 +60,11 @@
60
60
  "postcss": "^8.4.38",
61
61
  "postcss-nested": "^6.0.1",
62
62
  "v-calendar": "^3.1.2",
63
- "vue": "^3.4.26",
63
+ "vue": "^3.4.27",
64
64
  "vue-router": "^4.3.2"
65
65
  },
66
66
  "dependencies": {
67
- "@sentry/browser": "^8.0.0-beta.3",
67
+ "@sentry/browser": "^8.0.0",
68
68
  "@tanstack/vue-virtual": "3.0.0-beta.62",
69
69
  "@tinyhttp/content-disposition": "^2.2.0",
70
70
  "@tinyhttp/cookie": "^2.1.0",
@@ -85,19 +85,19 @@
85
85
  "@types/body-scroll-lock": "^3.1.2",
86
86
  "@types/lodash-es": "^4.17.12",
87
87
  "@types/markdown-it": "^14.1.1",
88
- "@types/node": "^20.12.10",
88
+ "@types/node": "^20.12.11",
89
89
  "@vitejs/plugin-vue": "^5.0.4",
90
90
  "@vitest/coverage-v8": "^1.6.0",
91
- "@vue/reactivity": "^3.4.26",
92
- "@vue/runtime-core": "^3.4.26",
93
- "@vue/test-utils": "^2.4.5",
91
+ "@vue/reactivity": "^3.4.27",
92
+ "@vue/runtime-core": "^3.4.27",
93
+ "@vue/test-utils": "^2.4.6",
94
94
  "@vuelidate/core": "^2.0.3",
95
95
  "@vuelidate/validators": "^2.0.4",
96
96
  "@vueuse/core": "^10.9.0",
97
97
  "body-scroll-lock": "4.0.0-beta.0",
98
98
  "eslint": "^8.57.0",
99
99
  "fuse.js": "^7.0.0",
100
- "happy-dom": "^14.7.1",
100
+ "happy-dom": "^14.10.2",
101
101
  "histoire": "0.16.5",
102
102
  "lodash-es": "^4.17.21",
103
103
  "markdown-it": "^14.1.0",
@@ -112,7 +112,7 @@
112
112
  "vite": "^5.2.11",
113
113
  "vitepress": "^1.1.4",
114
114
  "vitest": "^1.6.0",
115
- "vue": "^3.4.26",
115
+ "vue": "^3.4.27",
116
116
  "vue-router": "^4.3.2",
117
117
  "vue-tsc": "^1.8.27"
118
118
  }