@opendaw/lib-dom 0.0.20 → 0.0.22

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.
@@ -0,0 +1,5 @@
1
+ import { Nullish } from "@opendaw/lib-std";
2
+ export declare namespace ConstrainDOM {
3
+ const resolveString: (constrain: Nullish<ConstrainDOMString>) => Nullish<string>;
4
+ }
5
+ //# sourceMappingURL=constraint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constraint.d.ts","sourceRoot":"","sources":["../src/constraint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAErD,yBAAiB,YAAY,CAAC;IACnB,MAAM,aAAa,GAAI,WAAW,OAAO,CAAC,kBAAkB,CAAC,KAAG,OAAO,CAAC,MAAM,CAWpF,CAAA;CACJ"}
@@ -0,0 +1,30 @@
1
+ import { isUndefined } from "@opendaw/lib-std";
2
+ export var ConstrainDOM;
3
+ (function (ConstrainDOM) {
4
+ ConstrainDOM.resolveString = (constrain) => {
5
+ if (isUndefined(constrain)) {
6
+ return undefined;
7
+ }
8
+ if (typeof constrain === "string") {
9
+ return constrain;
10
+ }
11
+ if (Array.isArray(constrain)) {
12
+ return constrain.join(",");
13
+ }
14
+ if (typeof constrain === "object") {
15
+ if (typeof constrain.exact === "string") {
16
+ return constrain.exact;
17
+ }
18
+ if (Array.isArray(constrain.exact)) {
19
+ return constrain.exact.join(",");
20
+ }
21
+ if (typeof constrain.ideal === "string") {
22
+ return constrain.ideal;
23
+ }
24
+ if (Array.isArray(constrain.ideal)) {
25
+ return constrain.ideal.join(",");
26
+ }
27
+ }
28
+ return undefined;
29
+ };
30
+ })(ConstrainDOM || (ConstrainDOM = {}));
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./browser";
2
2
  export * from "./compression";
3
3
  export * from "./console-commands";
4
+ export * from "./constraint";
4
5
  export * from "./context-2d";
5
6
  export * from "./css-utils";
6
7
  export * from "./dragging";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ else {
9
9
  export * from "./browser";
10
10
  export * from "./compression";
11
11
  export * from "./console-commands";
12
+ export * from "./constraint";
12
13
  export * from "./context-2d";
13
14
  export * from "./css-utils";
14
15
  export * from "./dragging";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendaw/lib-dom",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
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.20",
26
- "@opendaw/lib-std": "^0.0.20",
25
+ "@opendaw/lib-runtime": "^0.0.22",
26
+ "@opendaw/lib-std": "^0.0.22",
27
27
  "@types/wicg-file-system-access": "^2023.10.6"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@opendaw/eslint-config": "^0.0.18",
31
31
  "@opendaw/typescript-config": "^0.0.19"
32
32
  },
33
- "gitHead": "de891be4fc9e418776b3a6c433748e287abab912"
33
+ "gitHead": "da2ae5f53ef758017d6b8069a5f118f809c6db1a"
34
34
  }