@thednp/shorty 2.0.0-alpha7 → 2.0.0-alpha9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thednp/shorty",
3
- "version": "2.0.0alpha7",
3
+ "version": "2.0.0alpha9",
4
4
  "type": "module",
5
5
  "description": "TypeScript shorties for the web",
6
6
  "source": "./src/index.ts",
@@ -52,25 +52,22 @@
52
52
  "devDependencies": {
53
53
  "@bahmutov/cypress-esbuild-preprocessor": "^2.1.3",
54
54
  "@cypress/code-coverage": "^3.10.0",
55
- "@rollup/plugin-json": "^5.0.2",
56
55
  "@types/istanbul-lib-instrument": "^1.7.4",
57
56
  "@typescript-eslint/eslint-plugin": "^5.35.1",
58
57
  "@typescript-eslint/parser": "^5.35.1",
59
- "cypress": "^12.0.2",
60
- "dts-bundle-generator": "^7.1.0",
61
- "esbuild": "^0.14.30",
62
- "eslint": "^8.23.0",
58
+ "cypress": "^12.4.1",
59
+ "dts-bundle-generator": "^7.2.0",
60
+ "eslint": "^8.29.0",
63
61
  "eslint-plugin-jsdoc": "^39.3.6",
64
62
  "eslint-plugin-prefer-arrow": "^1.2.3",
65
63
  "eslint-plugin-prettier": "^4.2.1",
66
64
  "istanbul-lib-coverage": "^3.2.0",
67
65
  "istanbul-lib-instrument": "^5.2.0",
68
66
  "ncp": "^2.0.0",
69
- "npm-run-all": "^4.1.5",
70
67
  "nyc": "^15.1.0",
71
- "prettier": "^2.7.1",
68
+ "prettier": "^2.8.3",
72
69
  "rimraf": "^3.0.2",
73
70
  "typescript": "^4.9.4",
74
- "vite": "^3.0.9"
71
+ "vite": "^4.0.4"
75
72
  }
76
73
  }
@@ -6,7 +6,7 @@ import getDocument from './getDocument';
6
6
  * @param node the reference node
7
7
  * @returns the parent `<body>` of the specified node
8
8
  */
9
- const getDocumentBody = (node?: Node): HTMLElement => {
9
+ const getDocumentBody = (node?: Node | Document | Window): HTMLElement => {
10
10
  return getDocument(node).body;
11
11
  };
12
12
 
@@ -6,7 +6,7 @@ import getDocument from './getDocument';
6
6
  * @param node the reference node
7
7
  * @returns the parent `<HTML>` of the node's parent document
8
8
  */
9
- const getDocumentElement = (node?: Node): HTMLElement => {
9
+ const getDocumentElement = (node?: Node | Document | Window): HTMLElement => {
10
10
  return getDocument(node).documentElement;
11
11
  };
12
12
 
@@ -5,7 +5,7 @@ import getDocument from './getDocument';
5
5
  * @param node the reference node
6
6
  * @returns the `<head>` of the node's parent document
7
7
  */
8
- const getDocumentHead = (node?: Node): HTMLElement & HTMLHeadElement => {
8
+ const getDocumentHead = (node?: Node | Document | Window): HTMLElement & HTMLHeadElement => {
9
9
  return getDocument(node).head;
10
10
  };
11
11
 
package/src/index.ts CHANGED
@@ -20,6 +20,12 @@ import abortEvent from './strings/abortEvent';
20
20
  import blurEvent from './strings/blurEvent';
21
21
  import moveEvent from './strings/moveEvent';
22
22
  import changeEvent from './strings/changeEvent';
23
+ import dragEvent from './strings/dragEvent';
24
+ import dragstartEvent from './strings/dragstartEvent';
25
+ import dragenterEvent from './strings/dragenterEvent';
26
+ import dragleaveEvent from './strings/dragleaveEvent';
27
+ import dragoverEvent from './strings/dragoverEvent';
28
+ import dragendEvent from './strings/dragendEvent';
23
29
  import errorEvent from './strings/errorEvent';
24
30
  import resetEvent from './strings/resetEvent';
25
31
  import resizeEvent from './strings/resizeEvent';
@@ -264,6 +270,12 @@ export {
264
270
  blurEvent,
265
271
  moveEvent,
266
272
  changeEvent,
273
+ dragEvent,
274
+ dragstartEvent,
275
+ dragenterEvent,
276
+ dragoverEvent,
277
+ dragleaveEvent,
278
+ dragendEvent,
267
279
  errorEvent,
268
280
  resetEvent,
269
281
  resizeEvent,
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global namespace for `drag` event.
3
+ */
4
+ const dragEvent = 'drag';
5
+ export default dragEvent;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global namespace for `dragend` event.
3
+ */
4
+ const dragendEvent = 'dragend';
5
+ export default dragendEvent;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global namespace for `dragenter` event.
3
+ */
4
+ const dragenterEvent = 'dragenter';
5
+ export default dragenterEvent;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global namespace for `dragleave` event.
3
+ */
4
+ const dragleaveEvent = 'dragleave';
5
+ export default dragleaveEvent;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global namespace for `dragover` event.
3
+ */
4
+ const dragoverEvent = 'dragover';
5
+ export default dragoverEvent;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global namespace for `dragstart` event.
3
+ */
4
+ const dragstartEvent = 'dragstart';
5
+ export default dragstartEvent;