@hkdigital/lib-core 0.4.30 → 0.4.32
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/auth/jwt/constants.d.ts +1 -1
- package/dist/auth/jwt/errors.d.ts +5 -5
- package/dist/auth/jwt/typedef.d.ts +30 -30
- package/dist/config/generators/imagetools.d.ts +3 -3
- package/dist/config/generators/vite.d.ts +11 -11
- package/dist/config/generators/vite.js +1 -1
- package/dist/design/generators/index.d.ts +9 -9
- package/dist/design/utils/clamp.d.ts +1 -1
- package/dist/design/utils/root-vars.d.ts +1 -1
- package/dist/design/utils/scaling.d.ts +2 -2
- package/dist/generic/data/classes/IterableTree.d.ts +2 -2
- package/dist/generic/data/classes/IterableTree.js +1 -0
- package/dist/generic/data/classes/Selector.d.ts +5 -5
- package/dist/generic/data/classes/Selector.js +53 -60
- package/dist/generic/data/classes/typedef.d.ts +5 -5
- package/dist/generic/errors/generic.d.ts +3 -1
- package/dist/generic/errors/promise.d.ts +2 -2
- package/dist/generic/events/classes/EventEmitter.js +1 -0
- package/dist/generic/promises/classes/HkPromise.js +9 -15
- package/dist/logging/internal/adapters/console.d.ts +5 -5
- package/dist/logging/internal/adapters/pino.d.ts +3 -3
- package/dist/logging/internal/adapters/typedef.d.ts +7 -7
- package/dist/logging/internal/factories/client.d.ts +1 -1
- package/dist/logging/internal/factories/server.d.ts +1 -1
- package/dist/logging/internal/logger/Logger.d.ts +3 -3
- package/dist/logging/internal/transports/pretty-transport.d.ts +3 -3
- package/dist/logging/internal/transports/test-transport.d.ts +5 -5
- package/dist/logging/typedef.d.ts +1 -1
- package/dist/network/cache/IndexedDbCache.d.ts +10 -10
- package/dist/network/cache/MemoryResponseCache.d.ts +3 -3
- package/dist/network/cache/typedef.d.ts +3 -3
- package/dist/network/errors/http.d.ts +2 -2
- package/dist/network/http/caching.d.ts +2 -2
- package/dist/network/http/http-request.d.ts +1 -1
- package/dist/network/http/typedef.d.ts +31 -31
- package/dist/network/loaders/audio/AudioScene.svelte.d.ts +2 -2
- package/dist/network/loaders/base/SceneBase.svelte.d.ts +4 -4
- package/dist/network/loaders/base/SceneBase.svelte.js +1 -1
- package/dist/network/loaders/image/ImageLoader.svelte.d.ts +1 -1
- package/dist/network/loaders/image/ImageVariantsLoader.svelte.d.ts +5 -5
- package/dist/network/loaders/image/utils/index.d.ts +3 -3
- package/dist/services/manager-plugins/ConfigPlugin.d.ts +1 -1
- package/dist/services/service-base/ServiceBase.d.ts +13 -3
- package/dist/services/service-base/ServiceBase.js +27 -9
- package/dist/services/service-base/typedef.d.ts +8 -8
- package/dist/services/service-manager/ServiceManager.d.ts +10 -2
- package/dist/services/service-manager/ServiceManager.js +55 -27
- package/dist/services/service-manager/typedef.d.ts +12 -11
- package/dist/services/service-manager/typedef.js +2 -1
- package/dist/state/machines/finite-state-machine/FiniteStateMachine.svelte.d.ts +1 -1
- package/dist/state/machines/loading-state-machine/LoadingStateMachine.svelte.d.ts +1 -1
- package/dist/state/stores/theme.d.ts +1 -1
- package/dist/ui/components/button-group/ButtonGroup.svelte.d.ts +7 -7
- package/dist/ui/components/button-group/typedef.d.ts +1 -1
- package/dist/ui/components/compare-left-right/CompareLeftRight.svelte.d.ts +5 -5
- package/dist/ui/components/drag-drop/DragController.d.ts +1 -1
- package/dist/ui/components/drag-drop/DragDropContext.svelte.d.ts +3 -3
- package/dist/ui/components/drag-drop/Draggable.svelte.d.ts +20 -20
- package/dist/ui/components/drag-drop/DropZone.svelte.d.ts +27 -27
- package/dist/ui/components/drag-drop/DropZoneArea.svelte.d.ts +26 -26
- package/dist/ui/components/drag-drop/DropZoneList.svelte.d.ts +27 -27
- package/dist/ui/components/drag-drop/drag-state.svelte.d.ts +4 -4
- package/dist/ui/components/drag-drop/typedef/drag.d.ts +1 -1
- package/dist/ui/components/game-box/GameBox.svelte.d.ts +19 -19
- package/dist/ui/components/game-box/gamebox.util.d.ts +2 -2
- package/dist/ui/components/grid-layers/GridLayers.svelte.d.ts +7 -7
- package/dist/ui/components/image-box/ImageBox.svelte.d.ts +14 -14
- package/dist/ui/components/presenter/ImageSlide.svelte.d.ts +8 -8
- package/dist/ui/components/presenter/Presenter.state.svelte.d.ts +1 -1
- package/dist/ui/components/presenter/Presenter.svelte.d.ts +5 -5
- package/dist/ui/components/presenter/typedef.d.ts +13 -13
- package/dist/ui/components/rows/panel-grid-row/PanelGridRow.svelte.d.ts +7 -7
- package/dist/ui/components/rows/panel-row-2/PanelRow2.svelte.d.ts +7 -7
- package/dist/ui/components/tab-bar/HkTabBar.svelte.d.ts +10 -10
- package/dist/ui/components/tab-bar/HkTabBarSelector.state.svelte.d.ts +1 -1
- package/dist/ui/components/tab-bar/HkTabBarSelector.svelte.d.ts +10 -10
- package/dist/ui/components/tab-bar/typedef.d.ts +3 -3
- package/dist/ui/components/virtual-viewport/VirtualViewport.svelte.d.ts +17 -17
- package/dist/ui/dev/blocks/TextBlock.svelte.d.ts +6 -6
- package/dist/ui/dev/buttons/CheckButton.svelte.d.ts +11 -11
- package/dist/ui/primitives/area/HkArea.svelte.d.ts +6 -6
- package/dist/ui/primitives/area/HkGridArea.svelte.d.ts +12 -12
- package/dist/ui/primitives/buttons/button/Button.svelte.d.ts +16 -16
- package/dist/ui/primitives/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +2 -2
- package/dist/ui/primitives/buttons/button-submit/SubmitButton.svelte +21 -0
- package/dist/ui/primitives/buttons/button-submit/SubmitButton.svelte.d.ts +12 -0
- package/dist/ui/primitives/buttons/index.d.ts +2 -1
- package/dist/ui/primitives/buttons/index.js +2 -1
- package/dist/ui/primitives/icons/HkIcon.svelte.d.ts +4 -4
- package/dist/ui/primitives/icons/HkTabIcon.svelte.d.ts +13 -13
- package/dist/ui/primitives/icons/SteezeIcon.svelte.d.ts +4 -4
- package/dist/ui/primitives/inputs/text-input/TextInput.svelte.d.ts +22 -22
- package/dist/ui/primitives/inputs/text-input/assets/IconInvalid.svelte.d.ts +1 -1
- package/dist/ui/primitives/inputs/text-input/assets/IconValid.svelte.d.ts +1 -1
- package/dist/ui/primitives/panels/panel/Panel.svelte.d.ts +6 -6
- package/dist/util/array/index.d.ts +17 -17
- package/dist/util/array/index.js +5 -5
- package/dist/util/compare/index.d.ts +2 -1
- package/dist/util/compare/index.js +1 -0
- package/dist/util/exceptions/index.d.ts +3 -2
- package/dist/util/exceptions/index.js +13 -9
- package/dist/util/expect/arrays.d.ts +1 -0
- package/dist/util/expect/arrays.js +1 -0
- package/dist/util/expect/primitives.d.ts +18 -0
- package/dist/util/expect/primitives.js +18 -0
- package/dist/util/function/index.d.ts +14 -1
- package/dist/util/geometry/index.d.ts +2 -2
- package/dist/util/geometry/index.js +1 -1
- package/dist/util/iterate/index.d.ts +7 -7
- package/dist/util/object/index.d.ts +13 -13
- package/dist/util/singleton/index.d.ts +3 -3
- package/dist/util/svelte/loading/loading-tracker.svelte.d.ts +1 -1
- package/dist/util/sveltekit/env/all.d.ts +7 -18
- package/dist/util/sveltekit/env/all.js +4 -22
- package/dist/util/sveltekit/env/parsers.d.ts +23 -37
- package/dist/util/sveltekit/env/parsers.js +15 -15
- package/dist/util/sveltekit/env/private.d.ts +9 -11
- package/dist/util/sveltekit/env/private.js +4 -4
- package/dist/util/sveltekit/env/public.d.ts +9 -11
- package/dist/util/sveltekit/env/public.js +3 -3
- package/dist/util/sveltekit/env-all.d.ts +1 -1
- package/dist/util/sveltekit/env-all.js +2 -4
- package/dist/util/sveltekit/route-folders/index.d.ts +2 -2
- package/dist/util/sveltekit/route-folders.d.ts +1 -0
- package/dist/util/{sveltekit.js → sveltekit/route-folders.js} +1 -1
- package/dist/util/time/index.d.ts +4 -4
- package/dist/valibot/parsers/url.d.ts +3 -3
- package/dist/valibot/parsers/url.js +6 -2
- package/package.json +1 -1
- package/dist/util/sveltekit.d.ts +0 -1
|
@@ -3,22 +3,22 @@ type VirtualViewport = {
|
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
[attr: string]: any;
|
|
6
|
-
base?: string;
|
|
7
|
-
bg?: string;
|
|
8
|
-
classes?: string;
|
|
9
|
-
width?: string;
|
|
10
|
-
height?: string;
|
|
11
|
-
overflow?: string;
|
|
12
|
-
designWidth?: number;
|
|
13
|
-
designHeight?: number;
|
|
14
|
-
scaleViewport?: number;
|
|
15
|
-
scaleW?: number;
|
|
16
|
-
scaleH?: number;
|
|
17
|
-
scaleUI?: number;
|
|
18
|
-
scaleTextBase?: number;
|
|
19
|
-
scaleTextHeading?: number;
|
|
20
|
-
scaleTextUI?: number;
|
|
21
|
-
children?: Snippet<[]
|
|
6
|
+
base?: string | undefined;
|
|
7
|
+
bg?: string | undefined;
|
|
8
|
+
classes?: string | undefined;
|
|
9
|
+
width?: string | undefined;
|
|
10
|
+
height?: string | undefined;
|
|
11
|
+
overflow?: string | undefined;
|
|
12
|
+
designWidth?: number | undefined;
|
|
13
|
+
designHeight?: number | undefined;
|
|
14
|
+
scaleViewport?: number | undefined;
|
|
15
|
+
scaleW?: number | undefined;
|
|
16
|
+
scaleH?: number | undefined;
|
|
17
|
+
scaleUI?: number | undefined;
|
|
18
|
+
scaleTextBase?: number | undefined;
|
|
19
|
+
scaleTextHeading?: number | undefined;
|
|
20
|
+
scaleTextUI?: number | undefined;
|
|
21
|
+
children?: Snippet<[]> | undefined;
|
|
22
22
|
}>): void;
|
|
23
23
|
};
|
|
24
24
|
declare const VirtualViewport: import("svelte").Component<{
|
|
@@ -39,4 +39,4 @@ declare const VirtualViewport: import("svelte").Component<{
|
|
|
39
39
|
scaleTextHeading?: number;
|
|
40
40
|
scaleTextUI?: number;
|
|
41
41
|
children?: import("svelte").Snippet;
|
|
42
|
-
}, {}, "
|
|
42
|
+
}, {}, "scaleW" | "scaleH" | "scaleViewport" | "scaleUI" | "scaleTextBase" | "scaleTextHeading" | "scaleTextUI" | "designWidth" | "designHeight">;
|
|
@@ -2,12 +2,12 @@ export default TextBlock;
|
|
|
2
2
|
type TextBlock = {
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
|
-
base?: string;
|
|
6
|
-
bg?: string;
|
|
7
|
-
classes?: string;
|
|
8
|
-
title?: Snippet<[]
|
|
9
|
-
content?: Snippet<[]
|
|
10
|
-
footer?: Snippet<[]
|
|
5
|
+
base?: string | undefined;
|
|
6
|
+
bg?: string | undefined;
|
|
7
|
+
classes?: string | undefined;
|
|
8
|
+
title?: Snippet<[]> | undefined;
|
|
9
|
+
content?: Snippet<[]> | undefined;
|
|
10
|
+
footer?: Snippet<[]> | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
[attr: string]: any;
|
|
13
13
|
}>): void;
|
|
@@ -2,19 +2,19 @@ export default CheckButton;
|
|
|
2
2
|
type CheckButton = {
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
activeChild?: boolean;
|
|
7
|
-
inactiveChild?: boolean;
|
|
8
|
-
iconActiveBase?: string;
|
|
9
|
-
classes?: string;
|
|
10
|
-
disabled?: boolean;
|
|
5
|
+
checked?: boolean | undefined;
|
|
6
|
+
activeChild?: boolean | undefined;
|
|
7
|
+
inactiveChild?: boolean | undefined;
|
|
8
|
+
iconActiveBase?: string | undefined;
|
|
9
|
+
classes?: string | undefined;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
11
11
|
title: string;
|
|
12
|
-
iconInactiveBase?: string;
|
|
13
|
-
inactiveClasses?: string;
|
|
12
|
+
iconInactiveBase?: string | undefined;
|
|
13
|
+
inactiveClasses?: string | undefined;
|
|
14
14
|
activeClasses: string;
|
|
15
|
-
onclick?: () => void;
|
|
16
|
-
onchange?: () => void;
|
|
17
|
-
topic?: string;
|
|
15
|
+
onclick?: (() => void) | undefined;
|
|
16
|
+
onchange?: (() => void) | undefined;
|
|
17
|
+
topic?: string | undefined;
|
|
18
18
|
}>): void;
|
|
19
19
|
};
|
|
20
20
|
declare const CheckButton: import("svelte").Component<{
|
|
@@ -2,12 +2,12 @@ export default HkArea;
|
|
|
2
2
|
type HkArea = {
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
|
-
base?: string;
|
|
6
|
-
bg?: string;
|
|
7
|
-
padding?: string;
|
|
8
|
-
margin?: string;
|
|
9
|
-
classes?: string;
|
|
10
|
-
style?: string;
|
|
5
|
+
base?: string | undefined;
|
|
6
|
+
bg?: string | undefined;
|
|
7
|
+
padding?: string | undefined;
|
|
8
|
+
margin?: string | undefined;
|
|
9
|
+
classes?: string | undefined;
|
|
10
|
+
style?: string | undefined;
|
|
11
11
|
children: Snippet<[]>;
|
|
12
12
|
} & {
|
|
13
13
|
[attr: string]: any;
|
|
@@ -2,20 +2,20 @@ export default HkGridArea;
|
|
|
2
2
|
type HkGridArea = {
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
|
-
base?: string;
|
|
6
|
-
bg?: string;
|
|
7
|
-
padding?: string;
|
|
8
|
-
margin?: string;
|
|
9
|
-
classes?: string;
|
|
10
|
-
style?: string;
|
|
11
|
-
boxBase?: string;
|
|
12
|
-
boxBg?: string;
|
|
13
|
-
boxPadding?: string;
|
|
14
|
-
boxMargin?: string;
|
|
15
|
-
boxClasses?: string;
|
|
5
|
+
base?: string | undefined;
|
|
6
|
+
bg?: string | undefined;
|
|
7
|
+
padding?: string | undefined;
|
|
8
|
+
margin?: string | undefined;
|
|
9
|
+
classes?: string | undefined;
|
|
10
|
+
style?: string | undefined;
|
|
11
|
+
boxBase?: string | undefined;
|
|
12
|
+
boxBg?: string | undefined;
|
|
13
|
+
boxPadding?: string | undefined;
|
|
14
|
+
boxMargin?: string | undefined;
|
|
15
|
+
boxClasses?: string | undefined;
|
|
16
16
|
boxAttrs?: {
|
|
17
17
|
[attr: string]: any;
|
|
18
|
-
};
|
|
18
|
+
} | undefined;
|
|
19
19
|
children: Snippet<[]>;
|
|
20
20
|
} & {
|
|
21
21
|
[attr: string]: any;
|
|
@@ -3,22 +3,22 @@ type Button = {
|
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
[key: string]: any;
|
|
6
|
-
base?: string;
|
|
7
|
-
bg?: string;
|
|
8
|
-
classes?: string;
|
|
9
|
-
type?: string;
|
|
10
|
-
role?: "custom" | "primary" | "secondary" | "tertiary";
|
|
11
|
-
size?: "sm" | "md" | "lg";
|
|
12
|
-
variant?: string;
|
|
13
|
-
mode?: "light" | "dark";
|
|
14
|
-
buttonType?: "reset" | "submit" | "button";
|
|
15
|
-
active?: boolean;
|
|
16
|
-
selected?: boolean;
|
|
17
|
-
loading?: boolean;
|
|
18
|
-
error?: boolean;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
snippetLoading?: Snippet<[]
|
|
21
|
-
snippetError?: Snippet<[]
|
|
6
|
+
base?: string | undefined;
|
|
7
|
+
bg?: string | undefined;
|
|
8
|
+
classes?: string | undefined;
|
|
9
|
+
type?: string | undefined;
|
|
10
|
+
role?: "custom" | "primary" | "secondary" | "tertiary" | undefined;
|
|
11
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
12
|
+
variant?: string | undefined;
|
|
13
|
+
mode?: "light" | "dark" | undefined;
|
|
14
|
+
buttonType?: "reset" | "submit" | "button" | undefined;
|
|
15
|
+
active?: boolean | undefined;
|
|
16
|
+
selected?: boolean | undefined;
|
|
17
|
+
loading?: boolean | undefined;
|
|
18
|
+
error?: boolean | undefined;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
20
|
+
snippetLoading?: Snippet<[]> | undefined;
|
|
21
|
+
snippetError?: Snippet<[]> | undefined;
|
|
22
22
|
children: Snippet<[]>;
|
|
23
23
|
}>): void;
|
|
24
24
|
};
|
|
@@ -4,8 +4,8 @@ type SteezeIconButton = {
|
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
src: IconSource;
|
|
7
|
-
iconSize?: string;
|
|
8
|
-
theme?: string;
|
|
7
|
+
iconSize?: string | undefined;
|
|
8
|
+
theme?: string | undefined;
|
|
9
9
|
}>): void;
|
|
10
10
|
};
|
|
11
11
|
declare const SteezeIconButton: import("svelte").Component<{
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../button/Button.svelte';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {{
|
|
6
|
+
* children: import('svelte').Snippet,
|
|
7
|
+
* [key: string]: any
|
|
8
|
+
* }}
|
|
9
|
+
*/
|
|
10
|
+
const {
|
|
11
|
+
// Snippets
|
|
12
|
+
children,
|
|
13
|
+
|
|
14
|
+
// Attributes
|
|
15
|
+
...attrs
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Button buttonType="submit" type="text" {...attrs}>
|
|
20
|
+
{@render children()}
|
|
21
|
+
</Button>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default SubmitButton;
|
|
2
|
+
type SubmitButton = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<{
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
children: Snippet<[]>;
|
|
7
|
+
}>): void;
|
|
8
|
+
};
|
|
9
|
+
declare const SubmitButton: import("svelte").Component<{
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
children: import("svelte").Snippet;
|
|
12
|
+
}, {}, "">;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as Button } from "./button/Button.svelte";
|
|
2
|
-
export { default as TextButton } from "./button-text/TextButton.svelte";
|
|
3
2
|
export { default as SteezeIconButton } from "./button-icon-steeze/SteezeIconButton.svelte";
|
|
3
|
+
export { default as SubmitButton } from "./button-submit/SubmitButton.svelte";
|
|
4
|
+
export { default as TextButton } from "./button-text/TextButton.svelte";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as Button } from './button/Button.svelte';
|
|
2
|
-
export { default as TextButton } from './button-text/TextButton.svelte';
|
|
3
2
|
export { default as SteezeIconButton } from './button-icon-steeze/SteezeIconButton.svelte';
|
|
3
|
+
export { default as SubmitButton } from './button-submit/SubmitButton.svelte';
|
|
4
|
+
export { default as TextButton } from './button-text/TextButton.svelte';
|
|
@@ -3,10 +3,10 @@ type HkIcon = {
|
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
src: IconSource;
|
|
6
|
-
size?: string;
|
|
7
|
-
theme?: string;
|
|
8
|
-
base?: string;
|
|
9
|
-
classes?: string;
|
|
6
|
+
size?: string | undefined;
|
|
7
|
+
theme?: string | undefined;
|
|
8
|
+
base?: string | undefined;
|
|
9
|
+
classes?: string | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
[attr: string]: any;
|
|
12
12
|
}>): void;
|
|
@@ -3,19 +3,19 @@ type HkTabIcon = {
|
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
src: IconSource;
|
|
6
|
-
iconTheme?: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
route?: string;
|
|
9
|
-
active?: boolean;
|
|
10
|
-
base?: string;
|
|
11
|
-
bg?: string;
|
|
12
|
-
padding?: string;
|
|
13
|
-
margin?: string;
|
|
14
|
-
classes?: string;
|
|
15
|
-
iconClasses?: string;
|
|
16
|
-
iconHeight?: string;
|
|
17
|
-
labelClasses?: string;
|
|
18
|
-
rect?: DOMRect;
|
|
6
|
+
iconTheme?: string | undefined;
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
route?: string | undefined;
|
|
9
|
+
active?: boolean | undefined;
|
|
10
|
+
base?: string | undefined;
|
|
11
|
+
bg?: string | undefined;
|
|
12
|
+
padding?: string | undefined;
|
|
13
|
+
margin?: string | undefined;
|
|
14
|
+
classes?: string | undefined;
|
|
15
|
+
iconClasses?: string | undefined;
|
|
16
|
+
iconHeight?: string | undefined;
|
|
17
|
+
labelClasses?: string | undefined;
|
|
18
|
+
rect?: DOMRect | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
[attr: string]: any;
|
|
21
21
|
}>): void;
|
|
@@ -3,10 +3,10 @@ type SteezeIcon = {
|
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
src: IconSource;
|
|
6
|
-
size?: string;
|
|
7
|
-
theme?: string;
|
|
8
|
-
base?: string;
|
|
9
|
-
classes?: string;
|
|
6
|
+
size?: string | undefined;
|
|
7
|
+
theme?: string | undefined;
|
|
8
|
+
base?: string | undefined;
|
|
9
|
+
classes?: string | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
[attr: string]: any;
|
|
12
12
|
}>): void;
|
|
@@ -2,28 +2,28 @@ export default TextInput;
|
|
|
2
2
|
type TextInput = {
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
|
-
base?: string;
|
|
6
|
-
borderShape?: string;
|
|
7
|
-
classes?: string;
|
|
8
|
-
inputBase?: string;
|
|
9
|
-
inputClasses?: string;
|
|
10
|
-
legendBase?: string;
|
|
11
|
-
legendClasses?: string;
|
|
12
|
-
iconClasses?: string;
|
|
13
|
-
initialValue?: string;
|
|
14
|
-
value?: string;
|
|
15
|
-
type?: "number" | "url" | "text" | "email";
|
|
16
|
-
pattern?: string;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
title?: string;
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
isValid?: boolean;
|
|
21
|
-
isPristine?: boolean;
|
|
22
|
-
hasFocus?: boolean;
|
|
23
|
-
validate?: (value: string) => string;
|
|
24
|
-
iconRequired?: Snippet<[]
|
|
25
|
-
iconValid?: Snippet<[]
|
|
26
|
-
iconInvalid?: Snippet<[]
|
|
5
|
+
base?: string | undefined;
|
|
6
|
+
borderShape?: string | undefined;
|
|
7
|
+
classes?: string | undefined;
|
|
8
|
+
inputBase?: string | undefined;
|
|
9
|
+
inputClasses?: string | undefined;
|
|
10
|
+
legendBase?: string | undefined;
|
|
11
|
+
legendClasses?: string | undefined;
|
|
12
|
+
iconClasses?: string | undefined;
|
|
13
|
+
initialValue?: string | undefined;
|
|
14
|
+
value?: string | undefined;
|
|
15
|
+
type?: "number" | "url" | "text" | "email" | undefined;
|
|
16
|
+
pattern?: string | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
title?: string | undefined;
|
|
19
|
+
placeholder?: string | undefined;
|
|
20
|
+
isValid?: boolean | undefined;
|
|
21
|
+
isPristine?: boolean | undefined;
|
|
22
|
+
hasFocus?: boolean | undefined;
|
|
23
|
+
validate?: ((value: string) => string | undefined) | undefined;
|
|
24
|
+
iconRequired?: Snippet<[]> | undefined;
|
|
25
|
+
iconValid?: Snippet<[]> | undefined;
|
|
26
|
+
iconInvalid?: Snippet<[]> | undefined;
|
|
27
27
|
} & {
|
|
28
28
|
[attr: string]: any;
|
|
29
29
|
}>): void;
|
|
@@ -2,12 +2,12 @@ export default Panel;
|
|
|
2
2
|
type Panel = {
|
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
4
|
$set?(props: Partial<{
|
|
5
|
-
base?: string;
|
|
6
|
-
bg?: string;
|
|
7
|
-
classes?: string;
|
|
8
|
-
width?: "sm" | "md" | "lg";
|
|
9
|
-
variant?: string;
|
|
10
|
-
children?: Snippet<[]
|
|
5
|
+
base?: string | undefined;
|
|
6
|
+
bg?: string | undefined;
|
|
7
|
+
classes?: string | undefined;
|
|
8
|
+
width?: "sm" | "md" | "lg" | undefined;
|
|
9
|
+
variant?: string | undefined;
|
|
10
|
+
children?: Snippet<[]> | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
[attr: string]: any;
|
|
13
13
|
}>): void;
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
*
|
|
16
16
|
* --
|
|
17
17
|
*
|
|
18
|
-
* @returns {Array} array
|
|
18
|
+
* @returns {Array<any>} array
|
|
19
19
|
*
|
|
20
20
|
* --
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* toArray( [ 1, 2, 3, 4, 5 ], 2, 4 ) returns [ 3, 4 ]
|
|
24
24
|
*/
|
|
25
|
-
export function toArray(value: any, start?: number, end?: number): any
|
|
25
|
+
export function toArray(value: any, start?: number, end?: number): Array<any>;
|
|
26
26
|
/**
|
|
27
27
|
* Convert an async iterator to an array
|
|
28
28
|
* - If no async iterator is passed, the value will be processed by `from()`
|
|
@@ -30,9 +30,9 @@ export function toArray(value: any, start?: number, end?: number): any[];
|
|
|
30
30
|
* @param {AsyncIterator|any} value
|
|
31
31
|
* Async iterator or value to convert to array
|
|
32
32
|
*
|
|
33
|
-
* @returns {Promise<Array
|
|
33
|
+
* @returns {Promise<Array<any>>} list of items returned by the iterator
|
|
34
34
|
*/
|
|
35
|
-
export function toArrayAsync(value: AsyncIterator<any, any, any> | any): Promise<any
|
|
35
|
+
export function toArrayAsync(value: AsyncIterator<any, any, any> | any): Promise<Array<any>>;
|
|
36
36
|
/**
|
|
37
37
|
* Convert a path string to an array path
|
|
38
38
|
* - The path string will be spit at the `pathSeparator` token
|
|
@@ -57,7 +57,7 @@ export function toArrayPath(path: string | string[], pathSeparator?: string): st
|
|
|
57
57
|
*
|
|
58
58
|
* @returns {T} arr
|
|
59
59
|
*/
|
|
60
|
-
export function pushNotEmpty<T extends
|
|
60
|
+
export function pushNotEmpty<T extends array>(arr: T, value: any): T;
|
|
61
61
|
/**
|
|
62
62
|
* Loop over the supplied array and call the callback for every element
|
|
63
63
|
* - The callback will receive the current element of the array as
|
|
@@ -65,11 +65,11 @@ export function pushNotEmpty<T extends any[]>(arr: T, value: any): T;
|
|
|
65
65
|
* - Via [additionalArguments], additional arguments may be supplied that
|
|
66
66
|
* will be passed to the callback function
|
|
67
67
|
*
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {Array<any>} arr - The array to loop
|
|
69
69
|
* @param {function} callback - Callback to call for every element
|
|
70
|
-
* @param {
|
|
70
|
+
* @param {Array<any>} additionalArguments The additional arguments
|
|
71
71
|
*/
|
|
72
|
-
export function loop(arr: any
|
|
72
|
+
export function loop(arr: Array<any>, callback: Function, additionalArguments: Array<any>): void;
|
|
73
73
|
/**
|
|
74
74
|
* Get a list of all values from the items in the array at the
|
|
75
75
|
* specified path
|
|
@@ -89,8 +89,8 @@ export function loop(arr: any[], callback: Function, additionalArguments: any[])
|
|
|
89
89
|
* @returns {any[]|Set<any>} values
|
|
90
90
|
*/
|
|
91
91
|
export function pathValues(items: object[], path: any, options?: {
|
|
92
|
-
outputAsSet?: boolean;
|
|
93
|
-
pathSeparator?: string;
|
|
92
|
+
outputAsSet?: boolean | undefined;
|
|
93
|
+
pathSeparator?: string | undefined;
|
|
94
94
|
}): any[] | Set<any>;
|
|
95
95
|
/**
|
|
96
96
|
* Sort function that sorts a list of objects by values encountered at the
|
|
@@ -107,7 +107,7 @@ export function pathValues(items: object[], path: any, options?: {
|
|
|
107
107
|
* @param {function} [compareFn=smallestFirst]
|
|
108
108
|
* Function to use to compare values. See `compare.js`.
|
|
109
109
|
*/
|
|
110
|
-
export function sortByKeyValue(items:
|
|
110
|
+
export function sortByKeyValue(items: Object[], key: string, compareFn?: Function): void;
|
|
111
111
|
/**
|
|
112
112
|
* Sort function that sorts a list of objects by values encountered at the
|
|
113
113
|
* specified key values of the object.
|
|
@@ -123,7 +123,7 @@ export function sortByKeyValue(items: any[], key: string, compareFn?: Function):
|
|
|
123
123
|
* @param {function} [compareFn=smallestFirst]
|
|
124
124
|
* Function to use to compare values. See `compare.js`.
|
|
125
125
|
*/
|
|
126
|
-
export function sortByKeyValueReversed(items:
|
|
126
|
+
export function sortByKeyValueReversed(items: Object[], key: string, compareFn?: Function): void;
|
|
127
127
|
/**
|
|
128
128
|
* Sort function that sorts a list of objects by values encountered at the
|
|
129
129
|
* specified object path.
|
|
@@ -140,7 +140,7 @@ export function sortByKeyValueReversed(items: any[], key: string, compareFn?: Fu
|
|
|
140
140
|
* @param {function} [compareFn=smallestFirst]
|
|
141
141
|
* Function to use to compare values. See `compare.js`.
|
|
142
142
|
*/
|
|
143
|
-
export function sortByPathValue(items:
|
|
143
|
+
export function sortByPathValue(items: Object[], path: string[] | string, compareFn?: Function): void;
|
|
144
144
|
/**
|
|
145
145
|
* Find the first item in the list of objects that matches the selector
|
|
146
146
|
* - All items in the supplied array must be objects
|
|
@@ -151,7 +151,7 @@ export function sortByPathValue(items: any[], path: string[] | string, compareFn
|
|
|
151
151
|
*
|
|
152
152
|
* @returns {T|null} first matched item
|
|
153
153
|
*/
|
|
154
|
-
export function findFirst<T extends
|
|
154
|
+
export function findFirst<T extends object>(arr: T[], selector: object | null): T | null;
|
|
155
155
|
/**
|
|
156
156
|
* Returns all items from the list of items that match the selector
|
|
157
157
|
* - All items in the supplied array must be objects
|
|
@@ -162,16 +162,16 @@ export function findFirst<T extends unknown>(arr: T[], selector: object | null):
|
|
|
162
162
|
*
|
|
163
163
|
* @returns {T[]} matching items
|
|
164
164
|
*/
|
|
165
|
-
export function findAll<T extends
|
|
165
|
+
export function findAll<T extends object>(arr: T[], selector: object | null): T[];
|
|
166
166
|
/**
|
|
167
167
|
* Convert array to an object using a list of keys for each index
|
|
168
168
|
*
|
|
169
|
-
* @param {
|
|
169
|
+
* @param {Array<any>} arr
|
|
170
170
|
* @param {string[]} keys
|
|
171
171
|
*
|
|
172
172
|
* @returns {object}
|
|
173
173
|
*/
|
|
174
|
-
export function arrayToObject(arr: any
|
|
174
|
+
export function arrayToObject(arr: Array<any>, keys: string[]): object;
|
|
175
175
|
export const arraySlice: (start?: number, end?: number) => any[];
|
|
176
176
|
export const arrayConcat: {
|
|
177
177
|
(...items: ConcatArray<any>[]): any[];
|
package/dist/util/array/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export { arraySlice, arrayConcat };
|
|
|
34
34
|
*
|
|
35
35
|
* --
|
|
36
36
|
*
|
|
37
|
-
* @returns {Array} array
|
|
37
|
+
* @returns {Array<any>} array
|
|
38
38
|
*
|
|
39
39
|
* --
|
|
40
40
|
*
|
|
@@ -88,7 +88,7 @@ export function toArray(value, start, end) {
|
|
|
88
88
|
* @param {AsyncIterator|any} value
|
|
89
89
|
* Async iterator or value to convert to array
|
|
90
90
|
*
|
|
91
|
-
* @returns {Promise<Array
|
|
91
|
+
* @returns {Promise<Array<any>>} list of items returned by the iterator
|
|
92
92
|
*/
|
|
93
93
|
export async function toArrayAsync(value) {
|
|
94
94
|
if (
|
|
@@ -164,9 +164,9 @@ export function pushNotEmpty(arr, value) {
|
|
|
164
164
|
* - Via [additionalArguments], additional arguments may be supplied that
|
|
165
165
|
* will be passed to the callback function
|
|
166
166
|
*
|
|
167
|
-
* @param {
|
|
167
|
+
* @param {Array<any>} arr - The array to loop
|
|
168
168
|
* @param {function} callback - Callback to call for every element
|
|
169
|
-
* @param {
|
|
169
|
+
* @param {Array<any>} additionalArguments The additional arguments
|
|
170
170
|
*/
|
|
171
171
|
export function loop(arr, callback, additionalArguments) {
|
|
172
172
|
expect.function(callback);
|
|
@@ -411,7 +411,7 @@ export function findAll(arr, selector) {
|
|
|
411
411
|
/**
|
|
412
412
|
* Convert array to an object using a list of keys for each index
|
|
413
413
|
*
|
|
414
|
-
* @param {
|
|
414
|
+
* @param {Array<any>} arr
|
|
415
415
|
* @param {string[]} keys
|
|
416
416
|
*
|
|
417
417
|
* @returns {object}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {any} value1 - First value for comparison
|
|
5
5
|
* @param {any} value2 - Second value for comparison
|
|
6
|
+
* @param {any} [_pendingComparisons] - Internal parameter for tracking comparisons
|
|
6
7
|
*
|
|
7
8
|
* @return {boolean} true if the two values can be considered the same
|
|
8
9
|
*/
|
|
9
|
-
export function equals(value1: any, value2: any, _pendingComparisons
|
|
10
|
+
export function equals(value1: any, value2: any, _pendingComparisons?: any): boolean;
|
|
10
11
|
/**
|
|
11
12
|
* Returns true if x is greater than y
|
|
12
13
|
*
|
|
@@ -9,6 +9,7 @@ import { objectGet } from '../object/index.js';
|
|
|
9
9
|
*
|
|
10
10
|
* @param {any} value1 - First value for comparison
|
|
11
11
|
* @param {any} value2 - Second value for comparison
|
|
12
|
+
* @param {any} [_pendingComparisons] - Internal parameter for tracking comparisons
|
|
12
13
|
*
|
|
13
14
|
* @return {boolean} true if the two values can be considered the same
|
|
14
15
|
*/
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* - The originating Error is set as `cause` property
|
|
5
5
|
*
|
|
6
6
|
* @param {string} message - New error message
|
|
7
|
-
* @param {Error|string} originalErrorOrMessage
|
|
7
|
+
* @param {Error|string|any} originalErrorOrMessage
|
|
8
8
|
* @param {string|Object.<string, any>|null} [details]
|
|
9
9
|
* New error details (a DetailError will be thrown)
|
|
10
10
|
*
|
|
11
11
|
* @throws {DetailedError}
|
|
12
|
+
*
|
|
12
13
|
* @returns {never} This function never returns
|
|
13
14
|
*/
|
|
14
|
-
export function rethrow(message: string, originalErrorOrMessage: Error | string, details?: string | {
|
|
15
|
+
export function rethrow(message: string, originalErrorOrMessage: Error | string | any, details?: string | {
|
|
15
16
|
[x: string]: any;
|
|
16
17
|
} | null): never;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { DetailedError } from "../../generic/errors.js";
|
|
1
|
+
import { DetailedError } from '../../generic/errors.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Creates a new Error from the error message and throws it with a reference
|
|
@@ -7,23 +6,28 @@ import { DetailedError } from "../../generic/errors.js";
|
|
|
7
6
|
* - The originating Error is set as `cause` property
|
|
8
7
|
*
|
|
9
8
|
* @param {string} message - New error message
|
|
10
|
-
* @param {Error|string} originalErrorOrMessage
|
|
9
|
+
* @param {Error|string|any} originalErrorOrMessage
|
|
11
10
|
* @param {string|Object.<string, any>|null} [details]
|
|
12
11
|
* New error details (a DetailError will be thrown)
|
|
13
12
|
*
|
|
14
13
|
* @throws {DetailedError}
|
|
14
|
+
*
|
|
15
15
|
* @returns {never} This function never returns
|
|
16
16
|
*/
|
|
17
|
-
export function rethrow(message, originalErrorOrMessage, details
|
|
17
|
+
export function rethrow(message, originalErrorOrMessage, details) {
|
|
18
18
|
let error;
|
|
19
19
|
|
|
20
|
-
if (
|
|
20
|
+
if (typeof originalErrorOrMessage === 'string') {
|
|
21
21
|
// Convert non-Error values to Error objects
|
|
22
|
-
error = new Error(
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
22
|
+
error = new Error(originalErrorOrMessage);
|
|
23
|
+
} else if (originalErrorOrMessage instanceof Error) {
|
|
25
24
|
error = originalErrorOrMessage;
|
|
25
|
+
} else {
|
|
26
|
+
throw new DetailedError(
|
|
27
|
+
'rethrow: invalid parameter [originalErrorOrMessage]',
|
|
28
|
+
{ originalErrorOrMessage, details }
|
|
29
|
+
);
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
throw new DetailedError(message, details, error
|
|
32
|
+
throw new DetailedError(message, details, error);
|
|
29
33
|
}
|