nuxt-ui-elements 0.1.26 → 0.1.27

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-ui-elements",
3
3
  "configKey": "uiElements",
4
- "version": "0.1.26",
4
+ "version": "0.1.27",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,146 +1,142 @@
1
1
  import type { UploaderEvents, UploadFile, UploadOptions, UploadStatus, UploadFn, GetRemoteFileFn, Plugin as UploaderPlugin } from "./types.js";
2
2
  export declare const useUploadManager: <TUploadResult = any>(_options?: UploadOptions) => {
3
- files: Readonly<import("vue").Ref<readonly {
4
- readonly id: string;
5
- readonly name: string;
6
- readonly size: number;
7
- readonly mimeType: string;
8
- readonly data: {
3
+ files: import("vue").Ref<{
4
+ id: string;
5
+ name: string;
6
+ size: number;
7
+ mimeType: string;
8
+ data: {
9
9
  readonly lastModified: number;
10
10
  readonly name: string;
11
11
  readonly webkitRelativePath: string;
12
12
  readonly size: number;
13
13
  readonly type: string;
14
- readonly arrayBuffer: {
14
+ arrayBuffer: {
15
15
  (): Promise<ArrayBuffer>;
16
16
  (): Promise<ArrayBuffer>;
17
17
  };
18
- readonly bytes: {
18
+ bytes: {
19
19
  (): Promise<Uint8Array<ArrayBuffer>>;
20
20
  (): Promise<Uint8Array<ArrayBuffer>>;
21
21
  };
22
- readonly slice: {
22
+ slice: {
23
23
  (start?: number, end?: number, contentType?: string): Blob;
24
24
  (start?: number, end?: number, contentType?: string): Blob;
25
25
  };
26
- readonly stream: {
26
+ stream: {
27
27
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
28
28
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
29
29
  };
30
- readonly text: {
30
+ text: {
31
31
  (): Promise<string>;
32
32
  (): Promise<string>;
33
33
  };
34
34
  } | {
35
35
  readonly size: number;
36
36
  readonly type: string;
37
- readonly arrayBuffer: {
37
+ arrayBuffer: {
38
38
  (): Promise<ArrayBuffer>;
39
39
  (): Promise<ArrayBuffer>;
40
40
  };
41
- readonly bytes: {
41
+ bytes: {
42
42
  (): Promise<Uint8Array<ArrayBuffer>>;
43
43
  (): Promise<Uint8Array<ArrayBuffer>>;
44
44
  };
45
- readonly slice: {
45
+ slice: {
46
46
  (start?: number, end?: number, contentType?: string): Blob;
47
47
  (start?: number, end?: number, contentType?: string): Blob;
48
48
  };
49
- readonly stream: {
49
+ stream: {
50
50
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
51
51
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
52
52
  };
53
- readonly text: {
53
+ text: {
54
54
  (): Promise<string>;
55
55
  (): Promise<string>;
56
56
  };
57
57
  };
58
- readonly status: import("./types.js").FileStatus;
59
- readonly preview?: string | undefined;
60
- readonly progress: {
61
- readonly percentage: number;
58
+ status: import("./types.js").FileStatus;
59
+ preview?: string | undefined;
60
+ progress: {
61
+ percentage: number;
62
62
  };
63
- readonly error?: {
64
- readonly message: string;
65
- readonly details?: Readonly<unknown> | undefined;
63
+ error?: {
64
+ message: string;
65
+ details?: unknown;
66
66
  } | undefined;
67
- readonly uploadResult?: import("vue").DeepReadonly<import("vue").UnwrapRef<TUploadResult>> | undefined;
68
- readonly isRemote?: boolean | undefined;
69
- readonly remoteUrl?: string | undefined;
70
- readonly meta: {
71
- readonly [x: string]: Readonly<unknown>;
72
- };
73
- }[], readonly {
74
- readonly id: string;
75
- readonly name: string;
76
- readonly size: number;
77
- readonly mimeType: string;
78
- readonly data: {
67
+ uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
68
+ isRemote?: boolean | undefined;
69
+ remoteUrl?: string | undefined;
70
+ meta: Record<string, unknown>;
71
+ }[], UploadFile<TUploadResult>[] | {
72
+ id: string;
73
+ name: string;
74
+ size: number;
75
+ mimeType: string;
76
+ data: {
79
77
  readonly lastModified: number;
80
78
  readonly name: string;
81
79
  readonly webkitRelativePath: string;
82
80
  readonly size: number;
83
81
  readonly type: string;
84
- readonly arrayBuffer: {
82
+ arrayBuffer: {
85
83
  (): Promise<ArrayBuffer>;
86
84
  (): Promise<ArrayBuffer>;
87
85
  };
88
- readonly bytes: {
86
+ bytes: {
89
87
  (): Promise<Uint8Array<ArrayBuffer>>;
90
88
  (): Promise<Uint8Array<ArrayBuffer>>;
91
89
  };
92
- readonly slice: {
90
+ slice: {
93
91
  (start?: number, end?: number, contentType?: string): Blob;
94
92
  (start?: number, end?: number, contentType?: string): Blob;
95
93
  };
96
- readonly stream: {
94
+ stream: {
97
95
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
98
96
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
99
97
  };
100
- readonly text: {
98
+ text: {
101
99
  (): Promise<string>;
102
100
  (): Promise<string>;
103
101
  };
104
102
  } | {
105
103
  readonly size: number;
106
104
  readonly type: string;
107
- readonly arrayBuffer: {
105
+ arrayBuffer: {
108
106
  (): Promise<ArrayBuffer>;
109
107
  (): Promise<ArrayBuffer>;
110
108
  };
111
- readonly bytes: {
109
+ bytes: {
112
110
  (): Promise<Uint8Array<ArrayBuffer>>;
113
111
  (): Promise<Uint8Array<ArrayBuffer>>;
114
112
  };
115
- readonly slice: {
113
+ slice: {
116
114
  (start?: number, end?: number, contentType?: string): Blob;
117
115
  (start?: number, end?: number, contentType?: string): Blob;
118
116
  };
119
- readonly stream: {
117
+ stream: {
120
118
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
121
119
  (): ReadableStream<Uint8Array<ArrayBuffer>>;
122
120
  };
123
- readonly text: {
121
+ text: {
124
122
  (): Promise<string>;
125
123
  (): Promise<string>;
126
124
  };
127
125
  };
128
- readonly status: import("./types.js").FileStatus;
129
- readonly preview?: string | undefined;
130
- readonly progress: {
131
- readonly percentage: number;
126
+ status: import("./types.js").FileStatus;
127
+ preview?: string | undefined;
128
+ progress: {
129
+ percentage: number;
132
130
  };
133
- readonly error?: {
134
- readonly message: string;
135
- readonly details?: Readonly<unknown> | undefined;
131
+ error?: {
132
+ message: string;
133
+ details?: unknown;
136
134
  } | undefined;
137
- readonly uploadResult?: import("vue").DeepReadonly<import("vue").UnwrapRef<TUploadResult>> | undefined;
138
- readonly isRemote?: boolean | undefined;
139
- readonly remoteUrl?: string | undefined;
140
- readonly meta: {
141
- readonly [x: string]: Readonly<unknown>;
142
- };
143
- }[]>>;
135
+ uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
136
+ isRemote?: boolean | undefined;
137
+ remoteUrl?: string | undefined;
138
+ meta: Record<string, unknown>;
139
+ }[]>;
144
140
  totalProgress: import("vue").ComputedRef<number>;
145
141
  addFiles: (newFiles: File[]) => Promise<(UploadFile<any> | null)[]>;
146
142
  addFile: (file: File) => Promise<UploadFile<any> | null>;
@@ -1,5 +1,5 @@
1
1
  import mitt from "mitt";
2
- import { computed, readonly, ref } from "vue";
2
+ import { computed, ref } from "vue";
3
3
  import { ValidatorAllowedFileTypes, ValidatorMaxfileSize, ValidatorMaxFiles } from "./validators/index.js";
4
4
  import { PluginThumbnailGenerator, PluginImageCompressor } from "./plugins/index.js";
5
5
  function getExtension(fullFileName) {
@@ -344,7 +344,7 @@ The LAST storage plugin ("${plugin.id}") will be used for uploads.
344
344
  }
345
345
  return {
346
346
  // State
347
- files: readonly(files),
347
+ files,
348
348
  totalProgress,
349
349
  // Core Methods
350
350
  addFiles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ui-elements",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "A collection of beautiful, animated UI components for Nuxt applications",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/genu/nuxt-ui-elements.git",