@opendaw/lib-jsx 0.0.62 → 0.0.63

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.
@@ -88,7 +88,7 @@ const transferAttributes = (element, attributes) => {
88
88
  value.addTarget(element);
89
89
  }
90
90
  else {
91
- element.classList.add(...value.split(" "));
91
+ element.classList.add(...value.split(" ").filter(x => x !== ""));
92
92
  }
93
93
  }
94
94
  else if (key === "style") {
@@ -1 +1 @@
1
- {"version":3,"file":"Await.d.ts","sourceRoot":"","sources":["../../src/std/Await.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAc,MAAM,kBAAkB,CAAA;AAE7E,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,UAAU,CAAA;AAE7C,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IACxB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC3B,OAAO,EAAE,IAAI,CAAC;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,EAAE,QAAQ,CAAC,CAAA;IACrD,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,CAAC,EAAI,gDAA8C,UAAU,CAAC,CAAC,CAAC,eAWrF,CAAA"}
1
+ {"version":3,"file":"Await.d.ts","sourceRoot":"","sources":["../../src/std/Await.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAc,MAAM,kBAAkB,CAAA;AAE7E,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,UAAU,CAAA;AAE7C,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IACxB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC3B,OAAO,EAAE,IAAI,CAAC;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,EAAE,QAAQ,CAAC,CAAA;IACrD,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,CAAC,EAAI,gDAA8C,UAAU,CAAC,CAAC,CAAC,eAcrF,CAAA"}
package/dist/std/Await.js CHANGED
@@ -4,7 +4,10 @@ export const Await = ({ factory, loading, success, failure, repeat }) => {
4
4
  const contents = createElement("div", { style: { display: "contents" } });
5
5
  const start = () => {
6
6
  replaceChildren(contents, loading());
7
- factory().then(result => replaceChildren(contents, success(result)), reason => replaceChildren(contents, failure({ reason, retry: () => start() })));
7
+ factory().then(result => replaceChildren(contents, success(result)), reason => replaceChildren(contents, failure({
8
+ reason: reason instanceof Error ? `${reason.name} (${reason.message})` : reason,
9
+ retry: () => start()
10
+ })));
8
11
  };
9
12
  start();
10
13
  safeExecute(repeat, start);
@@ -1,4 +1,5 @@
1
- export declare const LocalLink: ({ href }: {
1
+ export declare const LocalLink: ({ href, className }: {
2
2
  href: string;
3
+ className?: string;
3
4
  }) => HTMLAnchorElement;
4
5
  //# sourceMappingURL=LocalLink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalLink.d.ts","sourceRoot":"","sources":["../../src/std/LocalLink.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,GAAI,UAAQ;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,sBAQgD,CAAA"}
1
+ {"version":3,"file":"LocalLink.d.ts","sourceRoot":"","sources":["../../src/std/LocalLink.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,GAAI,qBAAmB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,sBASiB,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { TerminatorUtils } from "@opendaw/lib-dom";
2
2
  import { createElement } from "../create-element";
3
3
  import { RouteLocation, RouteMatcher } from "../routes";
4
- export const LocalLink = ({ href }) => TerminatorUtils
5
- .watchWeak(createElement("a", { href: href, onclick: (event) => {
4
+ export const LocalLink = ({ href, className }) => TerminatorUtils
5
+ .watchWeak(createElement("a", { href: href, className: className, onclick: (event) => {
6
6
  event.preventDefault();
7
7
  RouteLocation.get().navigateTo(href);
8
8
  }, link: true }), weakRef => RouteLocation.get().catchupAndSubscribe(location => weakRef.deref()?.classList.toggle("active", RouteMatcher.match(location.path, href))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendaw/lib-jsx",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -23,12 +23,12 @@
23
23
  "test": "echo \"No tests to run\""
24
24
  },
25
25
  "dependencies": {
26
- "@opendaw/lib-dom": "^0.0.62",
27
- "@opendaw/lib-std": "^0.0.61"
26
+ "@opendaw/lib-dom": "^0.0.63",
27
+ "@opendaw/lib-std": "^0.0.62"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@opendaw/eslint-config": "^0.0.27",
31
- "@opendaw/typescript-config": "^0.0.27"
31
+ "@opendaw/typescript-config": "^0.0.28"
32
32
  },
33
- "gitHead": "b33275f0f9dbfc525fe517560b484514bdae3dad"
33
+ "gitHead": "100e759378d7150e6eb7165232d8c4a1fbb77bbc"
34
34
  }