@digipair/skill-web-interact 0.113.1 → 0.114.1

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # skill-test
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build skill-web-interact` to build the library.
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ let WebInteractService = class WebInteractService {
6
4
  async setAttribute(params, _pinsSettingsList, _context) {
7
5
  const { selector, attribute, value } = params;
@@ -24,8 +22,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
24
22
  async getAttribute(params, _pinsSettingsList, _context) {
25
23
  const { selector, attribute } = params;
26
24
  const element = document.querySelector(selector);
27
- var _element_attribute;
28
- return (_element_attribute = element[attribute]) != null ? _element_attribute : element.getAttribute(attribute);
25
+ return element[attribute] ?? element.getAttribute(attribute);
29
26
  }
30
27
  async dispatchEvent(params, _pinsSettingsList, _context) {
31
28
  const { selector, name, detail } = params;
@@ -116,7 +113,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
116
113
  canvas.width = video.videoWidth;
117
114
  canvas.height = video.videoHeight;
118
115
  const ctx = canvas.getContext('2d');
119
- ctx == null ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
116
+ ctx?.drawImage(video, 0, 0, canvas.width, canvas.height);
120
117
  const image = canvas.toDataURL('image/jpeg');
121
118
  stream.getTracks().forEach((track)=>track.stop());
122
119
  return image;
@@ -20,8 +20,7 @@
20
20
  async getAttribute(params, _pinsSettingsList, _context) {
21
21
  const { selector, attribute } = params;
22
22
  const element = document.querySelector(selector);
23
- var _element_attribute;
24
- return (_element_attribute = element[attribute]) != null ? _element_attribute : element.getAttribute(attribute);
23
+ return element[attribute] ?? element.getAttribute(attribute);
25
24
  }
26
25
  async dispatchEvent(params, _pinsSettingsList, _context) {
27
26
  const { selector, name, detail } = params;
@@ -112,7 +111,7 @@
112
111
  canvas.width = video.videoWidth;
113
112
  canvas.height = video.videoHeight;
114
113
  const ctx = canvas.getContext('2d');
115
- ctx == null ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
114
+ ctx?.drawImage(video, 0, 0, canvas.width, canvas.height);
116
115
  const image = canvas.toDataURL('image/jpeg');
117
116
  stream.getTracks().forEach((track)=>track.stop());
118
117
  return image;
@@ -1 +1,2 @@
1
1
  export * from './lib/skill-web-interact';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -9,3 +9,4 @@ export declare const upload: (params: any, pinsSettingsList: PinsSettings[], con
9
9
  export declare const uploadText: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
10
10
  export declare const capture: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
11
11
  export declare const getMediaDevices: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
12
+ //# sourceMappingURL=skill-web-interact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-web-interact.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-web-interact.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAyIhD,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAE3E,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAE3E,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAE5E,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAEtE,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAEnE,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAErE,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAErE,eAAO,MAAM,UAAU,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAEzE,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC;AAEtE,eAAO,MAAM,eAAe,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACd,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,33 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-interact",
3
- "version": "0.113.1",
3
+ "version": "0.114.1",
4
+ "main": "./dist/index.cjs.js",
5
+ "module": "./dist/index.esm.js",
6
+ "types": "./dist/index.d.ts",
4
7
  "keywords": [
5
8
  "digipair",
6
9
  "web",
7
10
  "util"
8
11
  ],
9
- "dependencies": {},
10
- "main": "./index.cjs.js",
11
- "module": "./index.esm.js"
12
- }
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.esm.js",
16
+ "default": "./dist/index.cjs.js"
17
+ },
18
+ "./index.esm.js": "./dist/index.esm.js",
19
+ "./index.cjs.js": "./dist/index.cjs.js",
20
+ "./package.json": "./package.json",
21
+ "./schema.json": "./dist/schema.json",
22
+ "./schema.fr.json": "./dist/schema.fr.json"
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "README.md",
27
+ "package.json"
28
+ ],
29
+ "nx": {
30
+ "name": "skill-web-interact"
31
+ },
32
+ "dependencies": {}
33
+ }
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './libs/skill-web-intercact/src/index';
File without changes
File without changes
File without changes