@globalbrain/sefirot 3.42.0 → 3.43.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.
@@ -5,7 +5,18 @@ import { tryOnMounted } from './Utils'
5
5
  export interface Query<Data = any> {
6
6
  loading: Ref<boolean>
7
7
  data: Ref<Data | undefined>
8
- execute(): Promise<Data>
8
+ execute(options?: {
9
+ /**
10
+ * controls whether the response should be assigned to the data ref
11
+ * @default true
12
+ */
13
+ assign?: boolean
14
+ /**
15
+ * controls whether the loading state should not be set before fetching
16
+ * @default false
17
+ */
18
+ silent?: boolean
19
+ }): Promise<Data>
9
20
  }
10
21
 
11
22
  export interface UseQueryOptions {
@@ -40,14 +51,14 @@ export function useQuery<Data = any>(
40
51
  }
41
52
 
42
53
  if (options.watch) {
43
- watch(options.watch, execute, { deep: true })
54
+ watch(options.watch, () => { execute() }, { deep: true })
44
55
  }
45
56
 
46
- async function execute(): Promise<Data> {
47
- loading.value = true
57
+ async function execute({ assign = true, silent = false } = {}): Promise<Data> {
58
+ if (!silent) { loading.value = true }
48
59
 
49
60
  const res: Data = await req(new Http())
50
- data.value = res
61
+ if (assign) { data.value = res }
51
62
 
52
63
  loading.value = false
53
64
  return res
@@ -60,7 +60,7 @@ export function useGrid(options: UseGridOptions = {}): Grid {
60
60
 
61
61
  const fragment = createSpacers(lack, spacerTag, spacerClass, type)
62
62
 
63
- container.value?.appendChild(fragment!)
63
+ container.value?.appendChild(fragment)
64
64
  }
65
65
 
66
66
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "3.42.0",
4
- "packageManager": "pnpm@8.15.7",
3
+ "version": "3.43.0",
4
+ "packageManager": "pnpm@9.0.5",
5
5
  "description": "Vue Components for Global Brain Design System.",
6
6
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",
7
7
  "license": "MIT",
@@ -42,12 +42,12 @@
42
42
  "peerDependencies": {
43
43
  "@iconify-icons/ph": "^1.2.5",
44
44
  "@iconify-icons/ri": "^1.2.10",
45
- "@iconify/vue": "^4.1.1",
45
+ "@iconify/vue": "^4.1.2",
46
46
  "@types/body-scroll-lock": "^3.1.2",
47
47
  "@types/lodash-es": "^4.17.12",
48
48
  "@types/markdown-it": "^14.0.1",
49
- "@vue/reactivity": "^3.4.22",
50
- "@vue/runtime-core": "^3.4.22",
49
+ "@vue/reactivity": "^3.4.23",
50
+ "@vue/runtime-core": "^3.4.23",
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.22",
64
- "vue-router": "^4.3.0"
63
+ "vue": "^3.4.23",
64
+ "vue-router": "^4.3.2"
65
65
  },
66
66
  "dependencies": {
67
- "@sentry/browser": "^8.0.0-beta.1",
67
+ "@sentry/browser": "^8.0.0-beta.3",
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",
@@ -80,7 +80,7 @@
80
80
  "@histoire/plugin-vue": "0.16.5",
81
81
  "@iconify-icons/ph": "^1.2.5",
82
82
  "@iconify-icons/ri": "^1.2.10",
83
- "@iconify/vue": "^4.1.1",
83
+ "@iconify/vue": "^4.1.2",
84
84
  "@release-it/conventional-changelog": "^8.0.1",
85
85
  "@types/body-scroll-lock": "^3.1.2",
86
86
  "@types/lodash-es": "^4.17.12",
@@ -88,8 +88,8 @@
88
88
  "@types/node": "^20.12.7",
89
89
  "@vitejs/plugin-vue": "^5.0.4",
90
90
  "@vitest/coverage-v8": "^1.5.0",
91
- "@vue/reactivity": "^3.4.22",
92
- "@vue/runtime-core": "^3.4.22",
91
+ "@vue/reactivity": "^3.4.23",
92
+ "@vue/runtime-core": "^3.4.23",
93
93
  "@vue/test-utils": "^2.4.5",
94
94
  "@vuelidate/core": "^2.0.3",
95
95
  "@vuelidate/validators": "^2.0.4",
@@ -109,11 +109,11 @@
109
109
  "release-it": "^17.2.0",
110
110
  "typescript": "~5.4.5",
111
111
  "v-calendar": "^3.1.2",
112
- "vite": "^5.2.9",
113
- "vitepress": "^1.1.0",
112
+ "vite": "^5.2.10",
113
+ "vitepress": "^1.1.3",
114
114
  "vitest": "^1.5.0",
115
- "vue": "^3.4.22",
116
- "vue-router": "^4.3.0",
115
+ "vue": "^3.4.23",
116
+ "vue-router": "^4.3.2",
117
117
  "vue-tsc": "^1.8.27"
118
118
  }
119
119
  }