@daaler/jutils 0.4.2 → 0.4.4
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/browser.d.ts +2 -2
- package/dist/exception/exceptions.d.ts +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/jdom/jdom-node-linkedom.d.ts +5 -0
- package/dist/jdom/jdom-node-linkedom.js +14 -0
- package/dist/jdom/jdom-node-linkedom.js.map +1 -0
- package/dist/jschema/integer.d.ts +1 -1
- package/dist/jschema/jschema-types.d.ts +4 -4
- package/dist/jschema/jschema.d.ts +1 -1
- package/dist/jschema/tuple.d.ts +2 -2
- package/dist/jschema/tuple.js.map +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/react/calculate-layout-style.d.ts +1 -1
- package/dist/react/types.d.ts +1 -0
- package/dist/react/useElementDimensions.d.ts +8 -0
- package/dist/react/useElementDimensions.js +23 -0
- package/dist/react/useElementDimensions.js.map +1 -0
- package/dist/react/useJLocation.js.map +1 -1
- package/dist/react/useJNavigate.js.map +1 -1
- package/dist/react/useLayoutStyle.d.ts +1 -1
- package/dist/react/useLayoutStyle.js.map +1 -1
- package/dist/react/useToggle.js.map +1 -1
- package/dist/react/useWindowLayoutStyle.d.ts +1 -1
- package/dist/react/useWindowLayoutStyle.js.map +1 -1
- package/dist/react.d.ts +7 -6
- package/dist/react.js +1 -0
- package/dist/react.js.map +1 -1
- package/package.json +54 -49
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./index.
|
|
2
|
-
export { jwindow, jdocument, domParser, xmlSerializer } from "./jdom/jdom-browser.
|
|
1
|
+
export * from "./index.ts";
|
|
2
|
+
export { jwindow, jdocument, domParser, xmlSerializer } from "./jdom/jdom-browser.ts";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import interrupt from "./async-tricks/interrupt.
|
|
2
|
-
import wait from "./async-tricks/wait.
|
|
3
|
-
import timedifference from "./time/timedifference.
|
|
4
|
-
import timefromnow from "./time/timefromnow.
|
|
5
|
-
import timefromx from "./time/timefromx.
|
|
6
|
-
import zeroDate from "./time/zero-date.
|
|
7
|
-
import maxDate from "./time/max-date.
|
|
8
|
-
import JSchema from "./jschema/jschema.
|
|
9
|
-
import UUID from "./jschema/uuid.
|
|
10
|
-
import Integer from "./jschema/integer.
|
|
11
|
-
import jdebug from "./debug/jdebug.
|
|
12
|
-
import WeakValueCache from "./cache/weak-value-cache.
|
|
13
|
-
import IdBasedLRUCache from "./cache/id-based-lru-cache.
|
|
14
|
-
import IdBasedCache from "./cache/id-based-cache.
|
|
15
|
-
import Notifications from "./notifications/notifications.
|
|
16
|
-
import { noop, noopn, pass } from "./op/noop.
|
|
17
|
-
import Exception from "./exception/exception.
|
|
18
|
-
import matchExceptions from "./exception/match-exceptions.
|
|
19
|
-
import { registerException, getException, getExceptionNoError } from "./exception/exceptions.
|
|
20
|
-
import NotImplementedError, { notImplemented } from "./error/not-implemented.
|
|
21
|
-
import recursiveMerge from "./data/recursive-merge.
|
|
1
|
+
import interrupt from "./async-tricks/interrupt.ts";
|
|
2
|
+
import wait from "./async-tricks/wait.ts";
|
|
3
|
+
import timedifference from "./time/timedifference.ts";
|
|
4
|
+
import timefromnow from "./time/timefromnow.ts";
|
|
5
|
+
import timefromx from "./time/timefromx.ts";
|
|
6
|
+
import zeroDate from "./time/zero-date.ts";
|
|
7
|
+
import maxDate from "./time/max-date.ts";
|
|
8
|
+
import JSchema from "./jschema/jschema.ts";
|
|
9
|
+
import UUID from "./jschema/uuid.ts";
|
|
10
|
+
import Integer from "./jschema/integer.ts";
|
|
11
|
+
import jdebug from "./debug/jdebug.ts";
|
|
12
|
+
import WeakValueCache from "./cache/weak-value-cache.ts";
|
|
13
|
+
import IdBasedLRUCache from "./cache/id-based-lru-cache.ts";
|
|
14
|
+
import IdBasedCache from "./cache/id-based-cache.ts";
|
|
15
|
+
import Notifications from "./notifications/notifications.ts";
|
|
16
|
+
import { noop, noopn, pass } from "./op/noop.ts";
|
|
17
|
+
import Exception from "./exception/exception.ts";
|
|
18
|
+
import matchExceptions from "./exception/match-exceptions.ts";
|
|
19
|
+
import { registerException, getException, getExceptionNoError } from "./exception/exceptions.ts";
|
|
20
|
+
import NotImplementedError, { notImplemented } from "./error/not-implemented.ts";
|
|
21
|
+
import recursiveMerge from "./data/recursive-merge.ts";
|
|
22
22
|
export { interrupt, wait, timedifference, timefromnow, timefromx, zeroDate as zeroTime, // legacy naming
|
|
23
23
|
zeroDate, maxDate, JSchema, UUID, Integer, jdebug, WeakValueCache, IdBasedLRUCache, IdBasedCache, Notifications, noop, noopn, pass, Exception, matchExceptions, registerException, getException, getExceptionNoError, NotImplementedError, notImplemented, recursiveMerge, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const jdocument: import("linkedom/types/xml/document").XMLDocument;
|
|
2
|
+
declare const jwindow: Window & typeof globalThis;
|
|
3
|
+
declare function serializeDomToXml(dom: XMLDocument): string;
|
|
4
|
+
declare function parseXmlToDom(xml: string): import("linkedom/types/xml/document").XMLDocument;
|
|
5
|
+
export { jwindow, jdocument, parseXmlToDom, serializeDomToXml };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DOMParser } from "linkedom";
|
|
2
|
+
const domParser = new DOMParser();
|
|
3
|
+
const jdocument = domParser.parseFromString("", "text/xml");
|
|
4
|
+
const jwindow = jdocument.defaultView;
|
|
5
|
+
function serializeDomToXml(dom) {
|
|
6
|
+
const xml = dom.toString();
|
|
7
|
+
return xml;
|
|
8
|
+
}
|
|
9
|
+
function parseXmlToDom(xml) {
|
|
10
|
+
const dom = domParser.parseFromString(xml, "text/xml");
|
|
11
|
+
return dom;
|
|
12
|
+
}
|
|
13
|
+
export { jwindow, jdocument, parseXmlToDom, serializeDomToXml };
|
|
14
|
+
//# sourceMappingURL=jdom-node-linkedom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdom-node-linkedom.js","sourceRoot":"","sources":["../../src/jdom/jdom-node-linkedom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAIrC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAClC,MAAM,SAAS,GAAG,SAAS,CAAC,eAAe,CAAC,EAAE,EAAC,UAAU,CAAC,CAAC;AAC3D,MAAM,OAAO,GAAG,SAAS,CAAC,WAAW,CAAC;AAEtC,SAAS,iBAAiB,CAAC,GAAe;IACzC,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC3B,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,SAAS,aAAa,CAAC,GAAU;IAChC,MAAM,GAAG,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,EAAC,UAAU,CAAC,CAAC;IACtD,OAAO,GAAG,CAAC;AACZ,CAAC;AAID,OAAO,EAAE,OAAO,EAAC,SAAS,EAAC,aAAa,EAAC,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type JSchema from "./jschema.
|
|
2
|
-
import type any from "./any.
|
|
3
|
-
import type { IntegerConstructor } from "./integer.
|
|
4
|
-
import type { TupleConstructor } from "./tuple.
|
|
1
|
+
import type JSchema from "./jschema.ts";
|
|
2
|
+
import type any from "./any.ts";
|
|
3
|
+
import type { IntegerConstructor } from "./integer.ts";
|
|
4
|
+
import type { TupleConstructor } from "./tuple.ts";
|
|
5
5
|
export type SchemaDefinition = null | JSchema<any> | StringConstructor | {
|
|
6
6
|
type: StringConstructor;
|
|
7
7
|
} | NumberConstructor | {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SchemaDefinition, InferSchemaType } from "./jschema-types.
|
|
1
|
+
import type { SchemaDefinition, InferSchemaType } from "./jschema-types.ts";
|
|
2
2
|
export default class JSchema<T extends SchemaDefinition> {
|
|
3
3
|
_schema: InferSchemaType<T>;
|
|
4
4
|
get schema(): InferSchemaType<T>;
|
package/dist/jschema/tuple.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../src/jschema/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAI/B,MAAM,CAAC,OAAO,OAAgB,KAAM,SAAQ,KAAK;IAChD,MAAM,CAAU,KAAK,
|
|
1
|
+
{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../src/jschema/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAI/B,MAAM,CAAC,OAAO,OAAgB,KAAM,SAAQ,KAAK;IAChD,MAAM,CAAU,KAAK,GAAI,OAAO,CAAC;;AACjC,CAAC"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./index.
|
|
2
|
-
export { jwindow, jdocument, domParser, xmlSerializer } from "./jdom/jdom-node.
|
|
3
|
-
export { default as randomInteger } from "./random/random-integer-node.
|
|
1
|
+
export * from "./index.ts";
|
|
2
|
+
export { jwindow, jdocument, domParser, xmlSerializer } from "./jdom/jdom-node.ts";
|
|
3
|
+
export { default as randomInteger } from "./random/random-integer-node.ts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Options, LayoutStyle } from "./types.
|
|
1
|
+
import type { Options, LayoutStyle } from "./types.ts";
|
|
2
2
|
export default function calculateStyle(width: number, height: number, options: Options): LayoutStyle;
|
package/dist/react/types.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
import { type Dimensions } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Measure an element in the browser ui
|
|
5
|
+
* @param element Element to measure
|
|
6
|
+
* @return Width and height of the element
|
|
7
|
+
*/
|
|
8
|
+
export default function useElementDimensions(element: RefObject<HTMLElement>): Dimensions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useState, useLayoutEffect } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Measure an element in the browser ui
|
|
4
|
+
* @param element Element to measure
|
|
5
|
+
* @return Width and height of the element
|
|
6
|
+
*/
|
|
7
|
+
export default function useElementDimensions(element) {
|
|
8
|
+
const [dimensions, setDimensions] = useState([0, 0]);
|
|
9
|
+
const handleResize = () => {
|
|
10
|
+
if (!element.current)
|
|
11
|
+
return;
|
|
12
|
+
const { clientWidth, clientHeight } = element.current;
|
|
13
|
+
setDimensions([clientWidth, clientHeight]);
|
|
14
|
+
};
|
|
15
|
+
useLayoutEffect(() => {
|
|
16
|
+
handleResize();
|
|
17
|
+
window.addEventListener("resize", handleResize);
|
|
18
|
+
return () => { window.removeEventListener("resize", handleResize); };
|
|
19
|
+
}, [element]);
|
|
20
|
+
return dimensions;
|
|
21
|
+
}
|
|
22
|
+
;
|
|
23
|
+
//# sourceMappingURL=useElementDimensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useElementDimensions.js","sourceRoot":"","sources":["../../src/react/useElementDimensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAC,eAAe,EAAY,MAAM,OAAO,CAAC;AAK3D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,OAA8B;IAC1E,MAAM,CAAE,UAAU,EAAC,aAAa,CAAE,GAAG,QAAQ,CAAa,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAAA;IAEhE,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAG,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO;QAC5B,MAAM,EAAE,WAAW,EAAC,YAAY,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;QACrD,aAAa,CAAC,CAAE,WAAW,EAAC,YAAY,CAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEF,eAAe,CAAC,GAAG,EAAE;QACpB,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;QAC/C,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA,CAAC,CAAC,CAAA;IACpE,CAAC,EAAC,CAAE,OAAO,CAAE,CAAC,CAAA;IAEd,OAAO,UAAU,CAAC;AACnB,CAAC;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useJLocation.js","sourceRoot":"","sources":["../../src/react/useJLocation.
|
|
1
|
+
{"version":3,"file":"useJLocation.js","sourceRoot":"","sources":["../../src/react/useJLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAC,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,MAAM,IAAI,CAAC;AAIpB,MAAM,CAAC,OAAO,UAAU,YAAY;IACnC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAE5B,MAAM,SAAS,GAAG;QACjB,GAAG,QAAQ;QACX,MAAM;QACN,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC;IAEF,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useJNavigate.js","sourceRoot":"","sources":["../../src/react/useJNavigate.
|
|
1
|
+
{"version":3,"file":"useJNavigate.js","sourceRoot":"","sources":["../../src/react/useJNavigate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,MAAM,IAAI,CAAC;AAQpB,MAAM,CAAC,OAAO,UAAU,YAAY;IACnC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,SAAS,SAAS,CAAC,IAAW,EAAC,OAAwB;QACtD,MAAM,EAAE,KAAK,EAAC,GAAG,eAAe,EAAE,GAAG,OAAO,CAAC;QAC7C,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,QAAQ,CAAC,WAAW,EAAC,eAAe,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayoutStyle.js","sourceRoot":"","sources":["../../src/react/useLayoutStyle.
|
|
1
|
+
{"version":3,"file":"useLayoutStyle.js","sourceRoot":"","sources":["../../src/react/useLayoutStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAC,eAAe,EAAY,MAAM,OAAO,CAAC;AAE3D,OAAO,cAAc,MAAM,6BAA6B,CAAC;AAIzD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,OAA8B,EAAC,UAAgB,EAAE;IACvF,MAAM,CAAE,WAAW,EAAC,cAAc,CAAE,GAAG,QAAQ,CAAc,CAAE,QAAQ,EAAC,KAAK,CAAE,CAAC,CAAC;IAEjF,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAG,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO;QAC5B,MAAM,EAAE,WAAW,EAAC,YAAY,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;QACrD,MAAM,KAAK,GAAG,cAAc,CAAC,WAAW,EAAC,YAAY,EAAC,OAAO,CAAC,CAAC;QAC/D,cAAc,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,eAAe,CAAC,GAAG,EAAE;QACpB,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;QAC/C,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA,CAAC,CAAC,CAAA;IACpE,CAAC,EAAC,CAAE,OAAO,CAAE,CAAC,CAAA;IAEd,OAAO,WAAW,CAAC;AACpB,CAAC;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.js","sourceRoot":"","sources":["../../src/react/useToggle.
|
|
1
|
+
{"version":3,"file":"useToggle.js","sourceRoot":"","sources":["../../src/react/useToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,eAAqB,KAAK;IAC3D,MAAM,CAAE,KAAK,EAAC,QAAQ,CAAE,GAAG,QAAQ,CAAU,YAAY,CAAC,CAAC;IAE3D,MAAM,MAAM,GAAG,GAAG,EAAE;QACnB,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,GAAG,EAAE;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,GAAG,EAAE;QACrB,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,CAAE,KAAK,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,CAAE,CAAC;AAC1C,CAAC;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowLayoutStyle.js","sourceRoot":"","sources":["../../src/react/useWindowLayoutStyle.
|
|
1
|
+
{"version":3,"file":"useWindowLayoutStyle.js","sourceRoot":"","sources":["../../src/react/useWindowLayoutStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAC,eAAe,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,cAAc,MAAM,6BAA6B,CAAC;AAIzD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,UAAgB,EAAE;IAC9D,MAAM,CAAE,WAAW,EAAC,cAAc,CAAE,GAAG,QAAQ,CAAc,CAAE,QAAQ,EAAC,KAAK,CAAE,CAAC,CAAC;IAEjF,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,MAAM,EAAE,UAAU,EAAC,WAAW,EAAE,GAAG,MAAM,CAAC;QAC1C,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,EAAC,WAAW,EAAC,OAAO,CAAC,CAAC;QAC7D,cAAc,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,eAAe,CAAC,GAAG,EAAE;QACpB,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;QAC/C,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA,CAAC,CAAC,CAAA;IACpE,CAAC,EAAC,EAAE,CAAC,CAAA;IAEL,OAAO,WAAW,CAAC;AACpB,CAAC;AAAA,CAAC"}
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from "./browser.
|
|
2
|
-
export { default as useToggle } from "./react/useToggle.
|
|
3
|
-
export { default as useLayoutStyle } from "./react/useLayoutStyle.
|
|
4
|
-
export { default as useWindowLayoutStyle } from "./react/useWindowLayoutStyle.
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
1
|
+
export * from "./browser.ts";
|
|
2
|
+
export { default as useToggle } from "./react/useToggle.ts";
|
|
3
|
+
export { default as useLayoutStyle } from "./react/useLayoutStyle.ts";
|
|
4
|
+
export { default as useWindowLayoutStyle } from "./react/useWindowLayoutStyle.ts";
|
|
5
|
+
export { default as useElementDimensions } from "./react/useElementDimensions.ts";
|
|
6
|
+
export { default as useJLocation } from "./react/useJLocation.ts";
|
|
7
|
+
export { default as useJNavigate } from "./react/useJNavigate.ts";
|
package/dist/react.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./browser.js";
|
|
|
2
2
|
export { default as useToggle } from "./react/useToggle.js";
|
|
3
3
|
export { default as useLayoutStyle } from "./react/useLayoutStyle.js";
|
|
4
4
|
export { default as useWindowLayoutStyle } from "./react/useWindowLayoutStyle.js";
|
|
5
|
+
export { default as useElementDimensions } from "./react/useElementDimensions.js";
|
|
5
6
|
export { default as useJLocation } from "./react/useJLocation.js";
|
|
6
7
|
export { default as useJNavigate } from "./react/useJNavigate.js";
|
|
7
8
|
//# sourceMappingURL=react.js.map
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,50 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
2
|
+
"name": "@daaler/jutils",
|
|
3
|
+
"version": "0.4.4",
|
|
4
|
+
"description": "Utility functions for js",
|
|
5
|
+
"author": "Jarno Parviainen - jarno.parviainen@gmail.com",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/index.js",
|
|
12
|
+
"./node": "./dist/node.js",
|
|
13
|
+
"./browser": "./dist/browser.js",
|
|
14
|
+
"./react": "./dist/react.js",
|
|
15
|
+
"./jdom-node-linkedom": "./dist/jdom/jdom-node-linkedom.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^24.1.0",
|
|
22
|
+
"typescript": "^5.9.3"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"jsdom": "^27.0.0",
|
|
26
|
+
"linkedom": "^0.18.12",
|
|
27
|
+
"qs": "^6.14.0",
|
|
28
|
+
"react": "^19.1.0",
|
|
29
|
+
"react-router-dom": "^7.7.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependenciesMeta": {
|
|
32
|
+
"jsdom": {
|
|
33
|
+
"optional": true
|
|
34
|
+
},
|
|
35
|
+
"linkedom": {
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
"qs": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"react": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"react-router-dom": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "pnpm tsc",
|
|
50
|
+
"clean": "rm -r dist",
|
|
51
|
+
"test:run": "NODE_OPTIONS=--expose-gc node --test",
|
|
52
|
+
"test": "pnpm run build && pnpm run test:run",
|
|
53
|
+
"publish-to-npm": "pnpm run clean && pnpm run build && pnpm publish --access public"
|
|
54
|
+
}
|
|
55
|
+
}
|