@speckle/ui-components 2.23.4 → 2.23.6

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.
@@ -3,7 +3,7 @@ import type { ToastNotification } from '../../helpers/global/toast';
3
3
  * Set up a new global toast manager/renderer (don't use this in multiple components that live at the same time)
4
4
  */
5
5
  export declare function useGlobalToastManager(): {
6
- currentNotifications: import("vue").ComputedRef<{
6
+ currentNotification: import("vue").ComputedRef<{
7
7
  title?: string | undefined;
8
8
  description?: string | undefined;
9
9
  type: import('../../helpers/global/toast').ToastNotificationType;
@@ -14,9 +14,8 @@ export declare function useGlobalToastManager(): {
14
14
  } | undefined;
15
15
  autoClose?: boolean | undefined;
16
16
  id?: string | undefined;
17
- }[]>;
18
- dismiss: (notification: ToastNotification) => void;
19
- dismissAll: () => void;
17
+ } | null>;
18
+ dismiss: () => void;
20
19
  };
21
20
  /**
22
21
  * Trigger global toast notifications
package/eslint.config.mjs CHANGED
@@ -147,6 +147,14 @@ const configs = [
147
147
  '@typescript-eslint/ban-types': 'off'
148
148
  }
149
149
  },
150
+ {
151
+ files: ['utils/*.cjs'],
152
+ languageOptions: {
153
+ globals: {
154
+ ...globals.node
155
+ }
156
+ }
157
+ },
150
158
  prettierConfig
151
159
  ]
152
160
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speckle/ui-components",
3
3
  "description": "Speckle theme UI components built with Vue 3 & Tailwind",
4
- "version": "2.23.4",
4
+ "version": "2.23.6",
5
5
  "scripts": {
6
6
  "dev:vite": "vite",
7
7
  "dev": "yarn storybook",
@@ -45,19 +45,19 @@
45
45
  }
46
46
  },
47
47
  "peerDependencies": {
48
+ "vee-validate": "^4.7.0",
48
49
  "vue": "^3.3.0"
49
50
  },
50
51
  "dependencies": {
51
52
  "@headlessui/vue": "^1.7.18",
52
53
  "@heroicons/vue": "^2.0.12",
53
- "@speckle/shared": "^2.23.4",
54
+ "@speckle/shared": "^2.23.6",
54
55
  "@storybook/test": "^8.1.10",
55
56
  "@vueuse/core": "^9.13.0",
56
57
  "lodash": "^4.0.0",
57
58
  "lodash-es": "^4.0.0",
58
59
  "nanoid": "^3.0.0",
59
60
  "v3-infinite-loading": "^1.2.2",
60
- "vee-validate": "^4.7.0",
61
61
  "vue-advanced-cropper": "^2.8.8",
62
62
  "vue-tippy": "^6.0.0"
63
63
  },
@@ -65,7 +65,7 @@
65
65
  "@babel/preset-env": "^7.21.5",
66
66
  "@babel/preset-react": "^7.18.6",
67
67
  "@rollup/plugin-typescript": "^11.1.0",
68
- "@speckle/tailwind-theme": "^2.23.4",
68
+ "@speckle/tailwind-theme": "^2.23.6",
69
69
  "@storybook/addon-essentials": "^8.1.10",
70
70
  "@storybook/addon-interactions": "^8.1.10",
71
71
  "@storybook/addon-links": "^8.1.10",
@@ -97,6 +97,7 @@
97
97
  "type-fest": "^2.13.1",
98
98
  "typescript": "^5.0.4",
99
99
  "unplugin-vue-macros": "^2.7.0",
100
+ "vee-validate": "4.7.0",
100
101
  "vite": "^4.5.2",
101
102
  "vite-plugin-dts": "^3.6.3",
102
103
  "vue": "^3.3.8",
@@ -1,5 +1,5 @@
1
1
  const speckleTheme = require('@speckle/tailwind-theme')
2
- const { tailwindContentEntry } = require('@speckle/tailwind-theme/tailwind-configure')
2
+ const { tailwindContentEntries } = require('@speckle/tailwind-theme/tailwind-configure')
3
3
  const formsPlugin = require('@tailwindcss/forms')
4
4
 
5
5
  /** @type {import('tailwindcss').Config} */
@@ -8,7 +8,7 @@ module.exports = {
8
8
  content: [
9
9
  './index.html',
10
10
  './src/**/*.{js,ts,jsx,tsx,vue}',
11
- tailwindContentEntry(require)
11
+ ...tailwindContentEntries()
12
12
  ],
13
13
  plugins: [speckleTheme.default, formsPlugin]
14
14
  }
@@ -1,15 +1,13 @@
1
- const { resolve, dirname } = require('path')
1
+ const { resolve } = require('path')
2
2
 
3
3
  /**
4
4
  * Use this to generate an entry for the Tailwind 'content' config key that will ensure
5
5
  * this library is scanned to prevent unnecessary purging
6
- * @param {NodeRequire} req Feed in the 'require' object. It needs to be fed in because it may be
7
- * unavailable in certain environments and might need to be created manually with 'createRequire'
6
+ * @returns {string[]}
8
7
  */
9
- function tailwindContentEntry(req) {
10
- const packageLocaton = req.resolve('@speckle/ui-components')
11
- const packageDir = dirname(packageLocaton)
12
- return resolve(packageDir, '**/*.{js,cjs,mjs}')
8
+ function tailwindContentEntries() {
9
+ const currentLocation = __dirname
10
+ return [resolve(currentLocation, '../dist', '**/*.{js,cjs,mjs}')]
13
11
  }
14
12
 
15
- module.exports = { tailwindContentEntry }
13
+ module.exports = { tailwindContentEntries }
@@ -1 +1 @@
1
- export declare function tailwindContentEntry(req: NodeRequire): string
1
+ export declare function tailwindContentEntries(): string[]
@@ -1,13 +1,13 @@
1
1
  import { resolve, dirname } from 'path'
2
+ import { fileURLToPath } from 'url'
2
3
 
3
4
  /**
4
5
  * Use this to generate an entry for the Tailwind 'content' config key that will ensure
5
6
  * this library is scanned to prevent unnecessary purging
6
- * @param {NodeRequire} req Feed in the 'require' object. It needs to be fed in because it may be
7
- * unavailable in certain environments and might need to be created manually with 'createRequire'
7
+ * @returns {string[]}
8
8
  */
9
- export function tailwindContentEntry(req) {
10
- const packageLocaton = req.resolve('@speckle/ui-components')
11
- const packageDir = dirname(packageLocaton)
12
- return resolve(packageDir, '**/*.{js,cjs,mjs}')
9
+ export function tailwindContentEntries() {
10
+ const __filename = fileURLToPath(import.meta.url)
11
+ const __dirname = dirname(__filename)
12
+ return [resolve(__dirname, '../dist', '**/*.{js,cjs,mjs}')]
13
13
  }
@@ -1,9 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="webpack-env" />
3
- /**
4
- * Use this to generate an entry for the Tailwind 'content' config key that will ensure
5
- * this library is scanned to prevent unnecessary purging
6
- * @param {NodeRequire} req Feed in the 'require' object. It needs to be fed in because it may be
7
- * unavailable in certain environments and might need to be created manually with 'createRequire'
8
- */
9
- export declare function tailwindContentEntry(req: NodeRequire): string;