@hkdigital/lib-core 0.3.1 → 0.3.3
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/README.md +1 -1
- package/dist/components/drag-drop/Draggable.svelte +1 -1
- package/dist/components/drag-drop/DropZone.svelte +1 -1
- package/dist/components/inputs/text-input/TextInput.svelte +2 -2
- package/dist/constants/index.d.ts +5 -1
- package/dist/constants/index.js +5 -2
- package/dist/constants/states/index.d.ts +4 -0
- package/dist/constants/states/index.js +4 -0
- package/dist/util/exceptions/index.d.ts +3 -3
- package/dist/util/exceptions/index.js +2 -2
- package/dist/util/http/http-request.js +1 -1
- package/dist/util/http/index.js +1 -1
- package/dist/util/http/json-request.js +1 -1
- package/dist/util/http/response.js +1 -1
- package/dist/util/http/url.js +1 -1
- package/dist/util/time/index.js +1 -1
- package/dist/util/unique/index.js +1 -1
- package/package.json +1 -1
- /package/dist/constants/{bases.d.ts → bases/index.d.ts} +0 -0
- /package/dist/constants/{bases.js → bases/index.js} +0 -0
- /package/dist/constants/{state-labels/drag-states.d.ts → states/drag.d.ts} +0 -0
- /package/dist/constants/{state-labels/drag-states.js → states/drag.js} +0 -0
- /package/dist/constants/{state-labels/drop-states.d.ts → states/drop.d.ts} +0 -0
- /package/dist/constants/{state-labels/drop-states.js → states/drop.js} +0 -0
- /package/dist/constants/{state-labels/input-states.d.ts → states/input.d.ts} +0 -0
- /package/dist/constants/{state-labels/input-states.js → states/input.js} +0 -0
- /package/dist/constants/{state-labels/submit-states.d.ts → states/submit.d.ts} +0 -0
- /package/dist/constants/{state-labels/submit-states.js → states/submit.js} +0 -0
- /package/dist/constants/{time.d.ts → time/index.d.ts} +0 -0
- /package/dist/constants/{time.js → time/index.js} +0 -0
- /package/dist/{constants/errors → errors}/api.d.ts +0 -0
- /package/dist/{constants/errors → errors}/api.js +0 -0
- /package/dist/{constants/errors → errors}/generic.d.ts +0 -0
- /package/dist/{constants/errors → errors}/generic.js +0 -0
- /package/dist/{constants/errors → errors}/http.d.ts +0 -0
- /package/dist/{constants/errors → errors}/http.js +0 -0
- /package/dist/{constants/errors → errors}/index.d.ts +0 -0
- /package/dist/{constants/errors → errors}/index.js +0 -0
- /package/dist/{constants/errors → errors}/jwt.d.ts +0 -0
- /package/dist/{constants/errors → errors}/jwt.js +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HKdigital's lib-core
|
|
2
2
|
|
|
3
|
-
Core library that we use to power up our
|
|
3
|
+
Core library that we use to power up our SvelteKit projects
|
|
4
4
|
|
|
5
5
|
This is a library for [SvelteKit](https://svelte.dev/) projects.
|
|
6
6
|
It contains common code and components that we use to create our projects.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
DRAG_OVER,
|
|
9
9
|
CAN_DROP,
|
|
10
10
|
CANNOT_DROP
|
|
11
|
-
} from '../../constants/
|
|
11
|
+
} from '../../constants/states/drop.js';
|
|
12
12
|
|
|
13
13
|
/** @typedef {import('../../typedef').DragData} DragData */
|
|
14
14
|
/** @typedef {import('../../typedef').DropData} DropData */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
INVALID,
|
|
16
16
|
REQUIRED,
|
|
17
17
|
DISABLED
|
|
18
|
-
} from '../../../constants/
|
|
18
|
+
} from '../../../constants/states/input.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @type {{
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
//
|
|
134
134
|
// Return CSS classes that indicate the component's state
|
|
135
135
|
//
|
|
136
|
-
// @see $lib/constants/
|
|
136
|
+
// @see $lib/constants/states
|
|
137
137
|
//
|
|
138
138
|
const outArr = [];
|
|
139
139
|
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
export * as bases from "./bases/index.js";
|
|
2
|
+
export * as http from "./http/index.js";
|
|
3
|
+
export * as mime from "./mime/index.js";
|
|
1
4
|
export * as regexp from "./regexp/index.js";
|
|
2
|
-
export * as
|
|
5
|
+
export * as states from "./states/index.js";
|
|
6
|
+
export * as time from "./time/index.js";
|
package/dist/constants/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * as bases from './bases/index.js';
|
|
2
|
+
export * as http from './http/index.js';
|
|
3
|
+
export * as mime from './mime/index.js';
|
|
1
4
|
export * as regexp from './regexp/index.js';
|
|
2
|
-
export * as
|
|
3
|
-
|
|
5
|
+
export * as states from './states/index.js';
|
|
6
|
+
export * as time from './time/index.js';
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @param {string} message - Additional message to prepend
|
|
7
7
|
* @param {Error|string} error - Original error
|
|
8
|
-
* @param {string|Object.<string, any
|
|
8
|
+
* @param {string|Object.<string, any>|null} [details]
|
|
9
9
|
*
|
|
10
10
|
* @throws {DetailedError}
|
|
11
11
|
* @returns {never} This function never returns
|
|
12
12
|
*/
|
|
13
|
-
export function rethrow(message: string, error: Error | string, details
|
|
13
|
+
export function rethrow(message: string, error: Error | string, details?: string | {
|
|
14
14
|
[x: string]: any;
|
|
15
|
-
}): never;
|
|
15
|
+
} | null): never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { DetailedError } from "../../
|
|
2
|
+
import { DetailedError } from "../../errors/generic.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a new Error from the error message and throws it with a reference
|
|
@@ -8,7 +8,7 @@ import { DetailedError } from "../../constants/errors/generic.js";
|
|
|
8
8
|
*
|
|
9
9
|
* @param {string} message - Additional message to prepend
|
|
10
10
|
* @param {Error|string} error - Original error
|
|
11
|
-
* @param {string|Object.<string, any
|
|
11
|
+
* @param {string|Object.<string, any>|null} [details]
|
|
12
12
|
*
|
|
13
13
|
* @throws {DetailedError}
|
|
14
14
|
* @returns {never} This function never returns
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { APPLICATION_JSON } from '../../constants/mime/application.js';
|
|
12
12
|
import { CONTENT_TYPE } from '../../constants/http/headers.js';
|
|
13
13
|
|
|
14
|
-
import { AbortError, TimeoutError } from '../../
|
|
14
|
+
import { AbortError, TimeoutError } from '../../errors/api.js';
|
|
15
15
|
|
|
16
16
|
import * as expect from '../expect/index.js';
|
|
17
17
|
|
package/dist/util/http/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { METHOD_GET, METHOD_POST } from '../../constants/http/methods.js';
|
|
|
2
2
|
|
|
3
3
|
import { APPLICATION_JSON } from '../../constants/mime/application.js';
|
|
4
4
|
import { CONTENT_TYPE } from '../../constants/http/headers.js';
|
|
5
|
-
import { ResponseError } from '../../
|
|
5
|
+
import { ResponseError } from '../../errors/index.js';
|
|
6
6
|
|
|
7
7
|
import * as expect from '../expect/index.js';
|
|
8
8
|
|
package/dist/util/http/url.js
CHANGED
package/dist/util/time/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
MINUTE_MS,
|
|
34
34
|
HOUR_MS,
|
|
35
35
|
DAY_MS,
|
|
36
|
-
TIME_2025_01_01 } from '../../constants/time.js';
|
|
36
|
+
TIME_2025_01_01 } from '../../constants/time/index.js';
|
|
37
37
|
|
|
38
38
|
import * as expect from '../expect';
|
|
39
39
|
import { HkPromise } from '../../classes/promise/index.js';
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
/* ------------------------------------------------------------------ Imports */
|
|
19
19
|
|
|
20
|
-
import { ALPHABET_BASE_HUMAN, ALPHABET_BASE_58 } from '../../constants/bases.js';
|
|
20
|
+
import { ALPHABET_BASE_HUMAN, ALPHABET_BASE_58 } from '../../constants/bases/index.js';
|
|
21
21
|
|
|
22
22
|
import { base58fromNumber } from '../bases';
|
|
23
23
|
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|