@scalar/use-toasts 0.5.6 → 0.5.7
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/CHANGELOG.md +6 -0
- package/README.md +3 -3
- package/dist/FlowProgressRing.vue.d.ts +13 -10
- package/dist/FlowProgressRing.vue.d.ts.map +1 -1
- package/dist/FlowToast.vue.d.ts +13 -10
- package/dist/FlowToast.vue.d.ts.map +1 -1
- package/dist/FlowToastContainer.vue.d.ts.map +1 -1
- package/dist/FlowToastLayout.vue.d.ts +14 -9
- package/dist/FlowToastLayout.vue.d.ts.map +1 -1
- package/dist/index.js +1 -13
- package/package.json +27 -26
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Scalar useToasts()
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-

|
|
3
|
+
[](https://www.npmjs.com/package/@scalar/use-toasts)
|
|
4
|
+
[](https://www.npmjs.com/package/@scalar/use-toasts)
|
|
5
|
+
[](https://www.npmjs.com/package/@scalar/use-toasts)
|
|
6
6
|
[](https://discord.gg/8HeZcRGPFS)
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
duration:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
duration: number;
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
duration: number;
|
|
5
|
+
}>>>, {}, {}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
9
13
|
required: true;
|
|
10
14
|
};
|
|
11
|
-
}
|
|
12
|
-
export default _default;
|
|
15
|
+
};
|
|
13
16
|
//# sourceMappingURL=FlowProgressRing.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowProgressRing.vue.d.ts","sourceRoot":"","sources":["../src/FlowProgressRing.vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowProgressRing.vue.d.ts","sourceRoot":"","sources":["../src/FlowProgressRing.vue.ts"],"names":[],"mappings":";cA+EY,MAAM;;cAAN,MAAM;;AAFlB,wBAQG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
package/dist/FlowToast.vue.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { Toast } from './FlowToast';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
toast:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
toast: Toast;
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
toast: Toast;
|
|
6
|
+
}>>>, {}, {}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: import('vue').PropType<T[K]>;
|
|
10
14
|
required: true;
|
|
11
15
|
};
|
|
12
|
-
}
|
|
13
|
-
export default _default;
|
|
16
|
+
};
|
|
14
17
|
//# sourceMappingURL=FlowToast.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowToast.vue.d.ts","sourceRoot":"","sources":["../src/FlowToast.vue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,KAAK,EAAE,MAAM,aAAa,CAAA
|
|
1
|
+
{"version":3,"file":"FlowToast.vue.d.ts","sourceRoot":"","sources":["../src/FlowToast.vue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,KAAK,EAAE,MAAM,aAAa,CAAA;;WAkL5C,KAAK;;WAAL,KAAK;;AAFd,wBAQG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowToastContainer.vue.d.ts","sourceRoot":"","sources":["../src/FlowToastContainer.vue.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FlowToastContainer.vue.d.ts","sourceRoot":"","sources":["../src/FlowToastContainer.vue.ts"],"names":[],"mappings":";AAyFA,wBAKG"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
status
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
status: {
|
|
7
|
-
type: import("vue").PropType<"Error">;
|
|
8
|
-
};
|
|
9
|
-
}>>, {}, {}>, {
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
status?: "Error" | undefined;
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
status?: "Error" | undefined;
|
|
5
|
+
}>>>, {}, {}>, {
|
|
10
6
|
icon?(_: {}): any;
|
|
11
7
|
title?(_: {}): any;
|
|
12
8
|
description?(_: {}): any;
|
|
13
9
|
timeout?(_: {}): any;
|
|
14
10
|
}>;
|
|
15
11
|
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
16
21
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
22
|
new (): {
|
|
18
23
|
$slots: S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowToastLayout.vue.d.ts","sourceRoot":"","sources":["../src/FlowToastLayout.vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowToastLayout.vue.d.ts","sourceRoot":"","sources":["../src/FlowToastLayout.vue.ts"],"names":[],"mappings":";;;;;;;;;;AAmKA,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,20 +10,8 @@
|
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
+
import { nanoid } from "nanoid";
|
|
13
14
|
import { reactive, readonly, defineComponent, useCssVars, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, Fragment, TransitionGroup, renderList, unref } from "vue";
|
|
14
|
-
let nanoid = (size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
15
|
-
byte &= 63;
|
|
16
|
-
if (byte < 36) {
|
|
17
|
-
id += byte.toString(36);
|
|
18
|
-
} else if (byte < 62) {
|
|
19
|
-
id += (byte - 26).toString(36).toUpperCase();
|
|
20
|
-
} else if (byte > 62) {
|
|
21
|
-
id += "-";
|
|
22
|
-
} else {
|
|
23
|
-
id += "_";
|
|
24
|
-
}
|
|
25
|
-
return id;
|
|
26
|
-
}, "");
|
|
27
15
|
const toasts = reactive([]);
|
|
28
16
|
function createToast(content, options) {
|
|
29
17
|
const id = nanoid();
|
package/package.json
CHANGED
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalar/use-toasts",
|
|
3
3
|
"description": "display toasts in Vue",
|
|
4
|
-
"
|
|
4
|
+
"license": "MIT",
|
|
5
5
|
"author": "Scalar (https://github.com/scalar)",
|
|
6
|
-
"bugs": "https://github.com/scalar/scalar/issues/new",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"nanoid": "5.0.1"
|
|
9
|
-
},
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"@vitejs/plugin-vue": "4.3.4",
|
|
12
|
-
"@vitest/coverage-v8": "0.34.4",
|
|
13
|
-
"tsc-alias": "1.8.8",
|
|
14
|
-
"vite": "4.4.9",
|
|
15
|
-
"vite-plugin-css-injected-by-js": "3.3.0",
|
|
16
|
-
"vitest": "0.34.4",
|
|
17
|
-
"vue-tsc": "1.8.13"
|
|
18
|
-
},
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"dist",
|
|
24
|
-
"CHANGELOG.md"
|
|
25
|
-
],
|
|
26
6
|
"homepage": "https://github.com/scalar/scalar",
|
|
7
|
+
"bugs": "https://github.com/scalar/scalar/issues/new/choose",
|
|
27
8
|
"keywords": [
|
|
28
9
|
"composable",
|
|
29
10
|
"notifcation",
|
|
@@ -31,17 +12,37 @@
|
|
|
31
12
|
"vue",
|
|
32
13
|
"vue3"
|
|
33
14
|
],
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
"vue": "3.3.4"
|
|
15
|
+
"version": "0.5.7",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=20"
|
|
38
18
|
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"CHANGELOG.md"
|
|
24
|
+
],
|
|
39
25
|
"repository": {
|
|
40
26
|
"type": "git",
|
|
41
27
|
"url": "https://github.com/scalar/scalar.git",
|
|
42
28
|
"directory": "packages/use-toasts"
|
|
43
29
|
},
|
|
44
|
-
"
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"nanoid": "^5.0.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@vitejs/plugin-vue": "^4.4.0",
|
|
35
|
+
"@vitest/coverage-v8": "^0.34.4",
|
|
36
|
+
"tsc-alias": "^1.8.8",
|
|
37
|
+
"vite": "^4.4.11",
|
|
38
|
+
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
39
|
+
"vitest": "^0.34.4",
|
|
40
|
+
"vue": "^3.3.4",
|
|
41
|
+
"vue-tsc": "^1.8.19"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"vue": "3.3.4"
|
|
45
|
+
},
|
|
45
46
|
"scripts": {
|
|
46
47
|
"build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
|
|
47
48
|
"dev": "vite",
|