@globalbrain/sefirot 4.32.0 → 4.33.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.
package/client.d.ts CHANGED
@@ -1,14 +1,10 @@
1
1
  /// <reference types="vite/client" />
2
2
  /// <reference types="unplugin-icons/types/vue3" />
3
+ /// <reference path="shared.d.ts" />
3
4
 
4
5
  // this file contains public types which are exposed to external modules
5
6
 
6
7
  declare module 'v-calendar' {
7
- export * from 'v-calendar/dist/types/src/index.d.ts'
8
- export { default } from 'v-calendar/dist/types/src/index.d.ts'
9
- }
10
-
11
- interface NumberConstructor {
12
- isFinite(value: unknown): value is number
13
- isInteger(value: unknown): value is number
8
+ export type * from 'v-calendar/dist/types/src/index.d.ts'
9
+ export type { default } from 'v-calendar/dist/types/src/index.d.ts'
14
10
  }
package/config/vite.js CHANGED
@@ -54,6 +54,7 @@ export const baseConfig = {
54
54
  'file-saver',
55
55
  'fuse.js',
56
56
  'html2canvas',
57
+ 'isomorphic-dompurify',
57
58
  'lodash-es',
58
59
  'markdown-it',
59
60
  'normalize.css',
@@ -74,6 +75,7 @@ export const baseConfig = {
74
75
  'dayjs/plugin/relativeTime',
75
76
  'dayjs/plugin/timezone',
76
77
  'dayjs/plugin/utc',
78
+ 'dompurify',
77
79
  'file-saver',
78
80
  'isomorphic-dompurify',
79
81
  'markdown-it > argparse',
@@ -134,11 +134,11 @@ function onClick(): void {
134
134
  </span>
135
135
  </span>
136
136
 
137
- <transition name="fade">
137
+ <Transition name="fade">
138
138
  <span v-if="loading" key="loading" class="loader">
139
139
  <SSpinner class="loader-icon" />
140
140
  </span>
141
- </transition>
141
+ </Transition>
142
142
  </component>
143
143
  </SFragment>
144
144
  </template>
@@ -6,9 +6,9 @@ const snackbars = useSnackbars()
6
6
  </script>
7
7
 
8
8
  <template>
9
- <transition name="fade">
9
+ <Transition name="fade">
10
10
  <div v-if="snackbars.items.length" class="SSnackbars">
11
- <transition-group name="fade-up">
11
+ <TransitionGroup name="fade-up">
12
12
  <div v-for="item in snackbars.items" :key="item.id" class="item">
13
13
  <SSnackbar
14
14
  :id="item.id"
@@ -17,9 +17,9 @@ const snackbars = useSnackbars()
17
17
  :actions="item.actions"
18
18
  />
19
19
  </div>
20
- </transition-group>
20
+ </TransitionGroup>
21
21
  </div>
22
- </transition>
22
+ </Transition>
23
23
  </template>
24
24
 
25
25
  <style lang="postcss" scoped>
@@ -152,11 +152,11 @@ function stopDialogPositionListener() {
152
152
  <IconDotsThree class="icon" />
153
153
  </button>
154
154
 
155
- <transition name="fade">
155
+ <Transition name="fade">
156
156
  <div v-if="isOpen" ref="dialog" class="dialog" :style="{ top, left }">
157
157
  <SDropdown :sections="dropdown" />
158
158
  </div>
159
- </transition>
159
+ </Transition>
160
160
  </div>
161
161
 
162
162
  <div v-if="resizable" class="grip" @mousedown="grip" />
@@ -75,24 +75,22 @@ export interface UseMarkdownOptions extends MarkdownItOptions {
75
75
 
76
76
  const EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i
77
77
 
78
- if (typeof document !== 'undefined') {
79
- DOMPurify.addHook('afterSanitizeAttributes', (node) => {
80
- if (node.tagName === 'A') {
81
- const target = node.getAttribute('target')
82
- if (target && target !== '_blank' && target !== '_self') {
83
- node.removeAttribute('target')
84
- }
85
-
86
- const href = node.getAttribute('href')
87
- if (href && EXTERNAL_URL_RE.test(href)) {
88
- node.setAttribute('target', '_blank')
89
- node.setAttribute('rel', 'noreferrer')
90
- }
91
-
92
- node.classList.add('SMarkdown-link')
78
+ DOMPurify.addHook('afterSanitizeAttributes', (node) => {
79
+ if (node.tagName === 'A') {
80
+ const target = node.getAttribute('target')
81
+ if (target && target !== '_blank' && target !== '_self') {
82
+ node.removeAttribute('target')
93
83
  }
94
- })
95
- }
84
+
85
+ const href = node.getAttribute('href')
86
+ if (href && EXTERNAL_URL_RE.test(href)) {
87
+ node.setAttribute('target', '_blank')
88
+ node.setAttribute('rel', 'noreferrer')
89
+ }
90
+
91
+ node.classList.add('SMarkdown-link')
92
+ }
93
+ })
96
94
 
97
95
  export function useMarkdown({
98
96
  config,
@@ -1,5 +1,5 @@
1
1
  export function maxTotalFileSize(value: unknown, size: string): boolean {
2
- if (!Array.isArray(value) || value.some((v) => !(v instanceof File))) { return false }
2
+ if (!Array.isArray(value) || !value.every((v) => v instanceof File)) { return false }
3
3
 
4
4
  const factor = /gb/i.test(size) ? 1e9 : /mb/i.test(size) ? 1e6 : /kb/i.test(size) ? 1e3 : 1
5
5
  const total = value.reduce((total, file) => total + file.size, 0)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
3
  "type": "module",
4
- "version": "4.32.0",
4
+ "version": "4.33.0",
5
5
  "packageManager": "pnpm@10.28.0",
6
6
  "description": "Vue Components for Global Brain Design System.",
7
7
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",
@@ -21,7 +21,8 @@
21
21
  "files": [
22
22
  "lib",
23
23
  "config",
24
- "client.d.ts"
24
+ "client.d.ts",
25
+ "shared.d.ts"
25
26
  ],
26
27
  "scripts": {
27
28
  "docs": "pnpm docs:dev",
@@ -55,6 +56,7 @@
55
56
  "@vueuse/core": "^12 || ^13 || ^14",
56
57
  "body-scroll-lock": "4.0.0-beta.0",
57
58
  "dayjs": "^1.11.19",
59
+ "dompurify": "^3.3.1",
58
60
  "fuse.js": "^7.1.0",
59
61
  "lodash-es": "^4.17.22",
60
62
  "markdown-it": "^14.1.0",
@@ -72,6 +74,7 @@
72
74
  "@tanstack/vue-virtual": "3.0.0-beta.62",
73
75
  "@tinyhttp/content-disposition": "^2.2.2",
74
76
  "@tinyhttp/cookie": "^2.1.1",
77
+ "@total-typescript/ts-reset": "^0.6.1",
75
78
  "@types/d3": "^7.4.3",
76
79
  "@types/file-saver": "^2.0.7",
77
80
  "@types/qs": "^6.14.0",
@@ -104,6 +107,7 @@
104
107
  "@vueuse/core": "^14.1.0",
105
108
  "body-scroll-lock": "4.0.0-beta.0",
106
109
  "dayjs": "^1.11.19",
110
+ "dompurify": "^3.3.1",
107
111
  "eslint": "^9.39.2",
108
112
  "fuse.js": "^7.1.0",
109
113
  "happy-dom": "^20.1.0",
package/shared.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /// <reference types="@total-typescript/ts-reset/dom" />
2
+
3
+ interface NumberConstructor {
4
+ isFinite(value: unknown): value is number
5
+ isInteger(value: unknown): value is number
6
+ }