@opendaw/lib-dom 0.0.30 → 0.0.31
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/dragging.d.ts.map +1 -1
- package/dist/dragging.js +7 -6
- package/dist/frames.d.ts +1 -1
- package/dist/frames.d.ts.map +1 -1
- package/dist/frames.js +1 -3
- package/package.json +4 -4
package/dist/dragging.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dragging.d.ts","sourceRoot":"","sources":["../src/dragging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,
|
1
|
+
{"version":3,"file":"dragging.d.ts","sourceRoot":"","sources":["../src/dragging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAa,MAAM,EAAY,UAAU,EAAa,MAAM,kBAAkB,CAAA;AAG1F,OAAO,EAAS,oBAAoB,EAAC,MAAM,UAAU,CAAA;AAGrD,yBAAiB,QAAQ,CAAC;IACtB,UAAiB,OAAO;QACpB,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;QAC1B,MAAM,CAAC,IAAI,IAAI,CAAA;QACf,OAAO,CAAC,IAAI,IAAI,CAAA;QAChB,OAAO,CAAC,IAAI,IAAI,CAAA;QAChB,WAAW,CAAC,EAAE,WAAW,CAAA;KAC5B;IAED,UAAiB,KAAK;QAClB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;QACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;QAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAC5B;IAED,UAAiB,cAAc;QAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAC7B;IAEM,MAAM,MAAM,GAAI,CAAC,SAAS,oBAAoB,EAAE,QAAQ,CAAC,EACT,SAAS,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,EAC5C,UAAU,cAAc,KAAG,UA2FjF,CAAA;CACJ"}
|
package/dist/dragging.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Terminable, Terminator } from "@opendaw/lib-std";
|
1
|
+
import { isDefined, safeRead, Terminable, Terminator } from "@opendaw/lib-std";
|
2
2
|
import { Browser } from "./browser";
|
3
3
|
import { AnimationFrame } from "./frames";
|
4
4
|
import { Events } from "./events";
|
@@ -62,6 +62,7 @@ export var Dragging;
|
|
62
62
|
process.finally?.call(process);
|
63
63
|
processCycle.terminate();
|
64
64
|
};
|
65
|
+
const owner = safeRead(target, "ownerDocument", "defaultView") ?? self;
|
65
66
|
processCycle.ownAll(Events.subscribe(target, "pointerup", (event) => {
|
66
67
|
if (event.pointerId === pointerId) {
|
67
68
|
process.approve?.call(process);
|
@@ -74,11 +75,11 @@ export var Dragging;
|
|
74
75
|
target.releasePointerCapture(pointerId);
|
75
76
|
cancel();
|
76
77
|
}
|
77
|
-
}, { capture: true }), Events.subscribe(
|
78
|
-
// Workaround for Chrome (does not release or cancel pointer)
|
78
|
+
}, { capture: true }), Events.subscribe(owner, "beforeunload", (_event) => {
|
79
|
+
// Workaround for Chrome (does not release or cancel the pointer)
|
79
80
|
target.releasePointerCapture(pointerId);
|
80
81
|
cancel();
|
81
|
-
}, { capture: true }), Events.subscribe(
|
82
|
+
}, { capture: true }), Events.subscribe(owner, "keydown", (event) => {
|
82
83
|
moveEvent.altKey = event.altKey;
|
83
84
|
moveEvent.shiftKey = event.shiftKey;
|
84
85
|
moveEvent.ctrlKey = Keyboard.isControlKey(event);
|
@@ -88,13 +89,13 @@ export var Dragging;
|
|
88
89
|
else {
|
89
90
|
process.update(moveEvent);
|
90
91
|
}
|
91
|
-
}), Events.subscribe(
|
92
|
+
}), Events.subscribe(owner, "keyup", (event) => {
|
92
93
|
moveEvent.altKey = event.altKey;
|
93
94
|
moveEvent.shiftKey = event.shiftKey;
|
94
95
|
moveEvent.ctrlKey = Keyboard.isControlKey(event);
|
95
96
|
process.update(moveEvent);
|
96
97
|
}));
|
97
|
-
if (process.abortSignal) {
|
98
|
+
if (isDefined(process.abortSignal)) {
|
98
99
|
processCycle.own(Events.subscribe(process.abortSignal, "abort", () => {
|
99
100
|
target.releasePointerCapture(pointerId);
|
100
101
|
cancel();
|
package/dist/frames.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { Exec, Terminable } from "@opendaw/lib-std";
|
|
2
2
|
export declare namespace AnimationFrame {
|
3
3
|
const add: (exec: Exec) => Terminable;
|
4
4
|
const once: (exec: Exec) => void;
|
5
|
-
const start: (owner
|
5
|
+
const start: (owner: WindowProxy) => void;
|
6
6
|
const terminate: () => void;
|
7
7
|
}
|
8
8
|
export declare const deferNextFrame: (exec: Exec) => DeferExec;
|
package/dist/frames.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../src/frames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAiB,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAEhE,yBAAiB,cAAc,CAAC;IAQrB,MAAM,GAAG,GAAI,MAAM,IAAI,KAAG,UAGhC,CAAA;IAEM,MAAM,IAAI,GAAI,MAAM,IAAI,KAAG,IAAgC,CAAA;IAE3D,MAAM,KAAK,GAAI,
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../src/frames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAiB,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAEhE,yBAAiB,cAAc,CAAC;IAQrB,MAAM,GAAG,GAAI,MAAM,IAAI,KAAG,UAGhC,CAAA;IAEM,MAAM,IAAI,GAAI,MAAM,IAAI,KAAG,IAAgC,CAAA;IAE3D,MAAM,KAAK,GAAI,OAAO,WAAW,KAAG,IAiB1C,CAAA;IAEM,MAAM,SAAS,QAAO,IAM5B,CAAA;CACJ;AAED,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,SAAgC,CAAA;AAE5E,qBAAa,SAAU,YAAW,UAAU;;gBAM5B,IAAI,EAAE,IAAI;IAEtB,QAAQ,CAAC,OAAO,QAAO,IAAI,CAI1B;IAED,QAAQ,CAAC,SAAS,QAAO,IAAI,CAI5B;IAED,MAAM,IAAI,IAAI;IACd,SAAS,IAAI,IAAI;CAOpB"}
|
package/dist/frames.js
CHANGED
@@ -10,11 +10,9 @@ export var AnimationFrame;
|
|
10
10
|
return { terminate: () => recurring.delete(exec) };
|
11
11
|
};
|
12
12
|
AnimationFrame.once = (exec) => { nonrecurring.add(exec); };
|
13
|
-
AnimationFrame.start = (owner
|
14
|
-
console.debug("AnimationFrame start", owner.name);
|
13
|
+
AnimationFrame.start = (owner) => {
|
15
14
|
const exe = () => {
|
16
15
|
if (driver !== owner) {
|
17
|
-
driver = null;
|
18
16
|
return;
|
19
17
|
}
|
20
18
|
if (recurring.size > 0 || nonrecurring.size > 0) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opendaw/lib-dom",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.31",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"license": "LGPL-3.0-or-later",
|
@@ -22,13 +22,13 @@
|
|
22
22
|
"test": "vitest run"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@opendaw/lib-runtime": "^0.0.
|
26
|
-
"@opendaw/lib-std": "^0.0.
|
25
|
+
"@opendaw/lib-runtime": "^0.0.31",
|
26
|
+
"@opendaw/lib-std": "^0.0.31",
|
27
27
|
"@types/wicg-file-system-access": "^2023.10.6"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"@opendaw/eslint-config": "^0.0.19",
|
31
31
|
"@opendaw/typescript-config": "^0.0.20"
|
32
32
|
},
|
33
|
-
"gitHead": "
|
33
|
+
"gitHead": "c1718ba63c1f99d28d6a5178c39e96c89b5bb364"
|
34
34
|
}
|