@bcc-code/vue-bcc-chat-ui 7.2.6 → 7.3.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.
- package/dist/definitions-D2uFt784.js +11 -0
- package/dist/definitions-D2uFt784.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +8872 -8839
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/dist/web-BXfaCfgZ.js +55 -0
- package/dist/web-BXfaCfgZ.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { n as e } from "./dist-BJ6-Om37.js";
|
|
2
|
+
import { n as t, t as n } from "./definitions-D2uFt784.js";
|
|
3
|
+
//#region node_modules/.pnpm/@capacitor+haptics@8.0.1_@capacitor+core@8.5.1/node_modules/@capacitor/haptics/dist/esm/web.js
|
|
4
|
+
var r = class extends e {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments), this.selectionStarted = !1;
|
|
7
|
+
}
|
|
8
|
+
async impact(e) {
|
|
9
|
+
let t = this.patternForImpact(e?.style);
|
|
10
|
+
this.vibrateWithPattern(t);
|
|
11
|
+
}
|
|
12
|
+
async notification(e) {
|
|
13
|
+
let t = this.patternForNotification(e?.type);
|
|
14
|
+
this.vibrateWithPattern(t);
|
|
15
|
+
}
|
|
16
|
+
async vibrate(e) {
|
|
17
|
+
let t = e?.duration || 300;
|
|
18
|
+
this.vibrateWithPattern([t]);
|
|
19
|
+
}
|
|
20
|
+
async selectionStart() {
|
|
21
|
+
this.selectionStarted = !0;
|
|
22
|
+
}
|
|
23
|
+
async selectionChanged() {
|
|
24
|
+
this.selectionStarted && this.vibrateWithPattern([70]);
|
|
25
|
+
}
|
|
26
|
+
async selectionEnd() {
|
|
27
|
+
this.selectionStarted = !1;
|
|
28
|
+
}
|
|
29
|
+
patternForImpact(e = n.Heavy) {
|
|
30
|
+
return e === n.Medium ? [43] : e === n.Light ? [20] : [61];
|
|
31
|
+
}
|
|
32
|
+
patternForNotification(e = t.Success) {
|
|
33
|
+
return e === t.Warning ? [
|
|
34
|
+
30,
|
|
35
|
+
40,
|
|
36
|
+
30,
|
|
37
|
+
50,
|
|
38
|
+
60
|
|
39
|
+
] : e === t.Error ? [
|
|
40
|
+
27,
|
|
41
|
+
45,
|
|
42
|
+
50
|
|
43
|
+
] : [
|
|
44
|
+
35,
|
|
45
|
+
65,
|
|
46
|
+
21
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
vibrateWithPattern(e) {
|
|
50
|
+
if (navigator.vibrate) navigator.vibrate(e);
|
|
51
|
+
else throw this.unavailable("Browser does not support the vibrate API");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { r as HapticsWeb };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-BXfaCfgZ.js","names":[],"sources":["../node_modules/.pnpm/@capacitor+haptics@8.0.1_@capacitor+core@8.5.1/node_modules/@capacitor/haptics/dist/esm/web.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport { ImpactStyle, NotificationType } from './definitions';\nexport class HapticsWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.selectionStarted = false;\n }\n async impact(options) {\n const pattern = this.patternForImpact(options === null || options === void 0 ? void 0 : options.style);\n this.vibrateWithPattern(pattern);\n }\n async notification(options) {\n const pattern = this.patternForNotification(options === null || options === void 0 ? void 0 : options.type);\n this.vibrateWithPattern(pattern);\n }\n async vibrate(options) {\n const duration = (options === null || options === void 0 ? void 0 : options.duration) || 300;\n this.vibrateWithPattern([duration]);\n }\n async selectionStart() {\n this.selectionStarted = true;\n }\n async selectionChanged() {\n if (this.selectionStarted) {\n this.vibrateWithPattern([70]);\n }\n }\n async selectionEnd() {\n this.selectionStarted = false;\n }\n patternForImpact(style = ImpactStyle.Heavy) {\n if (style === ImpactStyle.Medium) {\n return [43];\n }\n else if (style === ImpactStyle.Light) {\n return [20];\n }\n return [61];\n }\n patternForNotification(type = NotificationType.Success) {\n if (type === NotificationType.Warning) {\n return [30, 40, 30, 50, 60];\n }\n else if (type === NotificationType.Error) {\n return [27, 45, 50];\n }\n return [35, 65, 21];\n }\n vibrateWithPattern(pattern) {\n if (navigator.vibrate) {\n navigator.vibrate(pattern);\n }\n else {\n throw this.unavailable('Browser does not support the vibrate API');\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAa,IAAb,cAAgC,EAAU;CACtC,cAAc;EAEV,AADA,MAAM,GAAG,SAAS,GAClB,KAAK,mBAAmB;CAC5B;CACA,MAAM,OAAO,GAAS;EAClB,IAAM,IAAU,KAAK,iBAAiB,GAA0D,KAAK;EACrG,KAAK,mBAAmB,CAAO;CACnC;CACA,MAAM,aAAa,GAAS;EACxB,IAAM,IAAU,KAAK,uBAAuB,GAA0D,IAAI;EAC1G,KAAK,mBAAmB,CAAO;CACnC;CACA,MAAM,QAAQ,GAAS;EACnB,IAAM,IAAY,GAA0D,YAAa;EACzF,KAAK,mBAAmB,CAAC,CAAQ,CAAC;CACtC;CACA,MAAM,iBAAiB;EACnB,KAAK,mBAAmB;CAC5B;CACA,MAAM,mBAAmB;EACrB,AAAI,KAAK,oBACL,KAAK,mBAAmB,CAAC,EAAE,CAAC;CAEpC;CACA,MAAM,eAAe;EACjB,KAAK,mBAAmB;CAC5B;CACA,iBAAiB,IAAQ,EAAY,OAAO;EAOxC,OANI,MAAU,EAAY,SACf,CAAC,EAAE,IAEL,MAAU,EAAY,QACpB,CAAC,EAAE,IAEP,CAAC,EAAE;CACd;CACA,uBAAuB,IAAO,EAAiB,SAAS;EAOpD,OANI,MAAS,EAAiB,UACnB;GAAC;GAAI;GAAI;GAAI;GAAI;EAAE,IAErB,MAAS,EAAiB,QACxB;GAAC;GAAI;GAAI;EAAE,IAEf;GAAC;GAAI;GAAI;EAAE;CACtB;CACA,mBAAmB,GAAS;EACxB,IAAI,UAAU,SACV,UAAU,QAAQ,CAAO;OAGzB,MAAM,KAAK,YAAY,0CAA0C;CAEzE;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcc-code/vue-bcc-chat-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/vue-bcc-chat-ui.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@capacitor/app": ">=5 <9",
|
|
39
39
|
"@capacitor/browser": ">=5 <9",
|
|
40
40
|
"@capacitor/core": ">=5 <9",
|
|
41
|
+
"@capacitor/haptics": ">=5 <=9",
|
|
41
42
|
"vue": "^3.5.29"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
50
51
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
51
52
|
"@vue/eslint-config-typescript": "^14.9.0",
|
|
52
|
-
"eslint": "^
|
|
53
|
+
"eslint": "^10.10.0",
|
|
53
54
|
"eslint-config-prettier": "^10.1.8",
|
|
54
55
|
"eslint-plugin-prettier": "^5.5.6",
|
|
55
56
|
"eslint-plugin-vue": "^10.11.0",
|