@imaginario27/air-ui-utils 1.0.2 → 1.0.3

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.
@@ -0,0 +1,4 @@
1
+ export enum StackCounterType {
2
+ COUNTER = 'counter',
3
+ ELLIPSIS = 'ellipsis',
4
+ }
@@ -0,0 +1,4 @@
1
+ export enum PageTitleFormat {
2
+ FULL = 'full',
3
+ SIMPLE = 'simple',
4
+ }
@@ -0,0 +1,14 @@
1
+ export interface SelectOption {
2
+ id?: string | number
3
+ value: string | number
4
+ text?: string
5
+ icon?: any
6
+ customIcon?: string
7
+ userDisplayName?: string
8
+ userProfileImg?: string
9
+ imgUrl?: string
10
+ alt?: string
11
+ helpText?: string
12
+ to?: string
13
+ isExternal?: boolean
14
+ }
package/nuxt.config.ts CHANGED
@@ -5,7 +5,9 @@ export default defineNuxtConfig({
5
5
  devtools: { enabled: false },
6
6
  ssr: false,
7
7
 
8
- eslint: {
9
- // options here
8
+ imports: {
9
+ dirs: [
10
+ "models/**"
11
+ ],
10
12
  },
11
13
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imaginario27/air-ui-utils",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "author": "imaginario27",
5
5
  "type": "module",
6
6
  "homepage": "https://air-ui.netlify.app/",
@@ -17,10 +17,10 @@
17
17
  "generate": "nuxt generate",
18
18
  "preview": "nuxt preview",
19
19
  "postinstall": "nuxt prepare",
20
- "test": "vitest"
20
+ "test": "vitest",
21
+ "typecheck": "vue-tsc --noEmit -p tsconfig.typecheck.json"
21
22
  },
22
23
  "dependencies": {
23
- "eslint": "^9.36.0",
24
24
  "jspdf": "^3.0.3",
25
25
  "jspdf-autotable": "^5.0.2",
26
26
  "nuxt": "^4.1.2",
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "skipLibCheck": true
5
+ },
6
+ "exclude": [
7
+ "node_modules",
8
+ "../../node_modules",
9
+ "tests",
10
+ "**/*.spec.ts",
11
+ "**/*.test.ts"
12
+ ]
13
+ }
package/utils/events.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { AppNotification } from "../models/constants/notifications"
2
-
3
1
  /**
4
2
  * A composable to handle clicks outside a specified element.
5
3
  *
@@ -31,25 +29,18 @@ export const useClickOutside = (
31
29
 
32
30
 
33
31
  /**
34
- * Copies text to the clipboard and shows success or error notifications.
35
- * @param text - The text to copy to the clipboard.
36
- * @param successMessage - The success message to display.
37
- * @param errorMessage - The error message to display.
32
+ * Copies text to the clipboard.
33
+ * @param text - The text to copy.
34
+ * @returns A promise that resolves to true if successful, false otherwise.
38
35
  */
39
- export const copyToClipboard = async (
40
- text: string,
41
- successMessage: string = 'Copied to clipboard',
42
- errorMessage: string = 'Failed to copy to clipboard'
43
- ): Promise<void> => {
44
- if (!text) return
45
-
46
- const { $toast } = useNuxtApp()
36
+ export const copyToClipboard = async (text: string): Promise<boolean> => {
37
+ if (!text) return false
47
38
 
48
39
  try {
49
40
  await navigator.clipboard.writeText(text)
50
- $toast.success(successMessage, { toastId: 'clipboard-success' })
41
+ return true
51
42
  } catch {
52
- $toast.error(errorMessage, { toastId: 'clipboard-error' })
43
+ return false
53
44
  }
54
45
  }
55
46
 
package/eslint.config.mjs DELETED
@@ -1,14 +0,0 @@
1
- // https://eslint.nuxt.com/packages/module
2
-
3
- // @ts-check
4
- import withNuxt from './.nuxt/eslint.config.mjs'
5
-
6
- export default withNuxt({
7
- rules: {
8
- 'vue/attribute-hyphenation': 'off',
9
- 'vue/no-multiple-template-root': 'off',
10
- 'vue/require-default-prop': 'off',
11
- 'vue/multi-word-component-names': 'off',
12
- '@typescript-eslint/no-explicit-any': 'warn',
13
- }
14
- })