pubo-web 1.0.97 → 1.0.98
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/es/dom/drag.d.ts +19 -0
- package/es/dom/drag.js +3 -0
- package/es/load-script/index.d.ts +7 -0
- package/es/load-script/index.js +7 -0
- package/lib/dom/drag.d.ts +19 -0
- package/lib/dom/drag.js +3 -0
- package/lib/load-script/index.d.ts +7 -0
- package/lib/load-script/index.js +7 -0
- package/package.json +3 -3
package/es/dom/drag.d.ts
CHANGED
|
@@ -10,9 +10,28 @@ type OnMove = (n: {
|
|
|
10
10
|
type OnMoveEnd = () => void;
|
|
11
11
|
interface DragMethodProps {
|
|
12
12
|
key?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Tracks the movement of the drag and triggers the onMove callback.
|
|
15
|
+
* @callback OnMove
|
|
16
|
+
* @param {object} options - The options object.
|
|
17
|
+
* @param {number} options.offsetX - The X offset of the drag.
|
|
18
|
+
* @param {number} options.offsetY - The Y offset of the drag.
|
|
19
|
+
* @param {number} options.pageX - The X coordinate of the drag.
|
|
20
|
+
* @param {number} options.pageY - The Y coordinate of the drag.
|
|
21
|
+
* @param {number} options.startX - The initial X coordinate of the drag.
|
|
22
|
+
* @param {number} options.startY - The initial Y coordinate of the drag.
|
|
23
|
+
* @param {string} options.key - The key associated with the drag.
|
|
24
|
+
*/
|
|
13
25
|
onMove?: OnMove;
|
|
26
|
+
/**
|
|
27
|
+
* Ends the drag event and triggers the onMoveEnd callback.
|
|
28
|
+
* @callback OnMoveEnd
|
|
29
|
+
*/
|
|
14
30
|
onMoveEnd?: OnMoveEnd;
|
|
15
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Class for handling drag events in a UI.
|
|
34
|
+
*/
|
|
16
35
|
export declare class DragMethod {
|
|
17
36
|
private readonly key?;
|
|
18
37
|
private readonly cache;
|
package/es/dom/drag.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads a script from the given URL with the provided options.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} url - The URL of the script to load
|
|
5
|
+
* @param {any} options - Additional options for loading the script
|
|
6
|
+
* @return {Promise<any>} A Promise that resolves with the URL once the script is loaded
|
|
7
|
+
*/
|
|
1
8
|
export declare const loadScript: (url: string, options?: any) => Promise<unknown>;
|
package/es/load-script/index.js
CHANGED
|
@@ -14,6 +14,13 @@ var __values = this && this.__values || function (o) {
|
|
|
14
14
|
};
|
|
15
15
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Loads a script from the given URL with the provided options.
|
|
19
|
+
*
|
|
20
|
+
* @param {string} url - The URL of the script to load
|
|
21
|
+
* @param {any} options - Additional options for loading the script
|
|
22
|
+
* @return {Promise<any>} A Promise that resolves with the URL once the script is loaded
|
|
23
|
+
*/
|
|
17
24
|
export var loadScript = function loadScript(url, options) {
|
|
18
25
|
if (options === void 0) {
|
|
19
26
|
options = {};
|
package/lib/dom/drag.d.ts
CHANGED
|
@@ -10,9 +10,28 @@ type OnMove = (n: {
|
|
|
10
10
|
type OnMoveEnd = () => void;
|
|
11
11
|
interface DragMethodProps {
|
|
12
12
|
key?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Tracks the movement of the drag and triggers the onMove callback.
|
|
15
|
+
* @callback OnMove
|
|
16
|
+
* @param {object} options - The options object.
|
|
17
|
+
* @param {number} options.offsetX - The X offset of the drag.
|
|
18
|
+
* @param {number} options.offsetY - The Y offset of the drag.
|
|
19
|
+
* @param {number} options.pageX - The X coordinate of the drag.
|
|
20
|
+
* @param {number} options.pageY - The Y coordinate of the drag.
|
|
21
|
+
* @param {number} options.startX - The initial X coordinate of the drag.
|
|
22
|
+
* @param {number} options.startY - The initial Y coordinate of the drag.
|
|
23
|
+
* @param {string} options.key - The key associated with the drag.
|
|
24
|
+
*/
|
|
13
25
|
onMove?: OnMove;
|
|
26
|
+
/**
|
|
27
|
+
* Ends the drag event and triggers the onMoveEnd callback.
|
|
28
|
+
* @callback OnMoveEnd
|
|
29
|
+
*/
|
|
14
30
|
onMoveEnd?: OnMoveEnd;
|
|
15
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Class for handling drag events in a UI.
|
|
34
|
+
*/
|
|
16
35
|
export declare class DragMethod {
|
|
17
36
|
private readonly key?;
|
|
18
37
|
private readonly cache;
|
package/lib/dom/drag.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads a script from the given URL with the provided options.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} url - The URL of the script to load
|
|
5
|
+
* @param {any} options - Additional options for loading the script
|
|
6
|
+
* @return {Promise<any>} A Promise that resolves with the URL once the script is loaded
|
|
7
|
+
*/
|
|
1
8
|
export declare const loadScript: (url: string, options?: any) => Promise<unknown>;
|
package/lib/load-script/index.js
CHANGED
|
@@ -20,6 +20,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
22
|
exports.loadScript = void 0;
|
|
23
|
+
/**
|
|
24
|
+
* Loads a script from the given URL with the provided options.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} url - The URL of the script to load
|
|
27
|
+
* @param {any} options - Additional options for loading the script
|
|
28
|
+
* @return {Promise<any>} A Promise that resolves with the URL once the script is loaded
|
|
29
|
+
*/
|
|
23
30
|
var loadScript = function loadScript(url, options) {
|
|
24
31
|
if (options === void 0) {
|
|
25
32
|
options = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pubo-web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.98",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"node": ">=8.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"pubo-utils": "^1.0.
|
|
22
|
+
"pubo-utils": "^1.0.98"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "4f1b1c6ff194adccef99ba0cead655b0ce82a406"
|
|
25
25
|
}
|