@putkoff/abstract-utilities 0.1.244 → 1.0.0
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/cjs/index.js +262 -346
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +261 -330
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +14 -40
- package/dist/types/functions/auth_utils/imports.d.ts +0 -0
- package/dist/types/functions/auth_utils/index.d.ts +0 -0
- package/dist/types/functions/auth_utils/src/index.d.ts +0 -0
- package/dist/types/functions/auth_utils/src/token_utils.d.ts +0 -1
- package/dist/types/functions/config_utils/imports.d.ts +0 -0
- package/dist/types/functions/config_utils/index.d.ts +0 -0
- package/dist/types/functions/config_utils/src/config_utils.d.ts +6 -2
- package/dist/types/functions/config_utils/src/index.d.ts +0 -0
- package/dist/types/functions/constants_utils/index.d.ts +0 -0
- package/dist/types/functions/constants_utils/src/constants.d.ts +0 -0
- package/dist/types/functions/constants_utils/src/index.d.ts +0 -0
- package/dist/types/functions/env_utils/imports.d.ts +0 -0
- package/dist/types/functions/env_utils/index.d.ts +0 -0
- package/dist/types/functions/env_utils/src/index.d.ts +0 -0
- package/dist/types/functions/env_utils/src/window_utils.d.ts +0 -0
- package/dist/types/functions/fetch_utils/imports.d.ts +0 -0
- package/dist/types/functions/fetch_utils/index.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/fetch_utils.d.ts +2 -2
- package/dist/types/functions/fetch_utils/src/index.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/url_utils.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/utils.d.ts +1 -2
- package/dist/types/functions/index.d.ts +1 -2
- package/dist/types/functions/math_utils/index.d.ts +0 -0
- package/dist/types/functions/math_utils/safe_math.d.ts +0 -0
- package/dist/types/functions/path_utils/imports.d.ts +0 -0
- package/dist/types/functions/path_utils/index.d.ts +0 -0
- package/dist/types/functions/path_utils/src/base_dirs.d.ts +0 -0
- package/dist/types/functions/path_utils/src/function_dirs.d.ts +0 -0
- package/dist/types/functions/path_utils/src/index.d.ts +0 -0
- package/dist/types/functions/path_utils/src/misc_dirs.d.ts +0 -0
- package/dist/types/functions/path_utils/src/path_utils.d.ts +0 -4
- package/dist/types/functions/path_utils/src/paths.d.ts +0 -0
- package/dist/types/functions/path_utils/src/src_dirs.d.ts +0 -0
- package/dist/types/functions/read_utils/imports.d.ts +0 -0
- package/dist/types/functions/read_utils/index.d.ts +0 -0
- package/dist/types/functions/read_utils/src/index.d.ts +0 -0
- package/dist/types/functions/read_utils/src/utils.d.ts +0 -0
- package/dist/types/functions/rndm_utils/imports.d.ts +0 -0
- package/dist/types/functions/rndm_utils/index.d.ts +0 -0
- package/dist/types/functions/rndm_utils/src/index.d.ts +0 -0
- package/dist/types/functions/rndm_utils/src/utils.d.ts +0 -1
- package/dist/types/functions/safe_utils/imports.d.ts +0 -0
- package/dist/types/functions/safe_utils/index.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/index.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_document.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_globals.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_storage.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_window.d.ts +0 -0
- package/dist/types/functions/string_utils/index.d.ts +0 -0
- package/dist/types/functions/string_utils/src/index.d.ts +0 -0
- package/dist/types/functions/string_utils/src/string_utils.d.ts +0 -2
- package/dist/types/functions/type_utils/imports.d.ts +0 -0
- package/dist/types/functions/type_utils/index.d.ts +0 -0
- package/dist/types/functions/type_utils/src/clean_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/ensure_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/imports.d.ts +0 -0
- package/dist/types/functions/type_utils/src/index.d.ts +0 -0
- package/dist/types/functions/type_utils/src/json_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/mime_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/type_utils.d.ts +0 -0
- package/dist/types/functions/ui_utils/imports.d.ts +0 -0
- package/dist/types/functions/ui_utils/index.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/button.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/checkbox.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/index.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/input.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/spinner.d.ts +0 -0
- package/dist/types/functions/variable_utils/imports.d.ts +0 -0
- package/dist/types/functions/variable_utils/index.d.ts +0 -0
- package/dist/types/functions/variable_utils/src/index.d.ts +0 -0
- package/dist/types/functions/variable_utils/src/variable_utils.d.ts +0 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/types/index.d.ts +0 -0
- package/dist/types/types/src/ChangePassword.d.ts +0 -0
- package/dist/types/types/src/Files.d.ts +0 -0
- package/dist/types/types/src/index.d.ts +0 -0
- package/dist/types/types/src/login.d.ts +0 -0
- package/dist/types/types/src/logout.d.ts +0 -0
- package/dist/types/types/src/utils.d.ts +0 -0
- package/dist/types/utils/imports.d.ts +0 -0
- package/dist/types/utils/index.d.ts +0 -0
- package/dist/types/utils/src/Input.d.ts +0 -0
- package/dist/types/utils/src/config.d.ts +0 -0
- package/dist/types/utils/src/index.d.ts +0 -0
- package/package.json +89 -72
- package/dist/functions/auth_utils/imports.js +0 -1
- package/dist/functions/auth_utils/index.js +0 -1
- package/dist/functions/auth_utils/src/index.js +0 -1
- package/dist/functions/auth_utils/src/token_utils.js +0 -104
- package/dist/functions/config_utils/imports.js +0 -2
- package/dist/functions/config_utils/index.js +0 -1
- package/dist/functions/config_utils/src/config_utils.js +0 -16
- package/dist/functions/config_utils/src/index.js +0 -1
- package/dist/functions/constants_utils/index.js +0 -1
- package/dist/functions/constants_utils/src/constants.js +0 -7
- package/dist/functions/constants_utils/src/index.js +0 -1
- package/dist/functions/env_utils/imports.js +0 -1
- package/dist/functions/env_utils/index.js +0 -1
- package/dist/functions/env_utils/src/index.js +0 -1
- package/dist/functions/env_utils/src/window_utils.js +0 -47
- package/dist/functions/fetch_utils/imports.js +0 -2
- package/dist/functions/fetch_utils/index.js +0 -1
- package/dist/functions/fetch_utils/src/fetch_utils.js +0 -65
- package/dist/functions/fetch_utils/src/index.js +0 -3
- package/dist/functions/fetch_utils/src/url_utils.js +0 -83
- package/dist/functions/fetch_utils/src/utils.js +0 -101
- package/dist/functions/index.js +0 -17
- package/dist/functions/math_utils/index.js +0 -1
- package/dist/functions/math_utils/safe_math.js +0 -26
- package/dist/functions/path_utils/imports.js +0 -28
- package/dist/functions/path_utils/index.js +0 -1
- package/dist/functions/path_utils/src/base_dirs.js +0 -17
- package/dist/functions/path_utils/src/function_dirs.js +0 -42
- package/dist/functions/path_utils/src/index.js +0 -6
- package/dist/functions/path_utils/src/misc_dirs.js +0 -15
- package/dist/functions/path_utils/src/path_utils.browser.js +0 -3
- package/dist/functions/path_utils/src/path_utils.js +0 -112
- package/dist/functions/path_utils/src/path_utils.node.js +0 -3
- package/dist/functions/path_utils/src/paths.js +0 -12
- package/dist/functions/path_utils/src/src_dirs.js +0 -25
- package/dist/functions/read_utils/imports.js +0 -1
- package/dist/functions/read_utils/index.js +0 -1
- package/dist/functions/read_utils/src/index.js +0 -1
- package/dist/functions/read_utils/src/read_utils.browser.js +0 -17
- package/dist/functions/read_utils/src/utils.browser.js +0 -32
- package/dist/functions/read_utils/src/utils.js +0 -70
- package/dist/functions/rndm_utils/imports.js +0 -1
- package/dist/functions/rndm_utils/index.js +0 -1
- package/dist/functions/rndm_utils/src/index.js +0 -1
- package/dist/functions/rndm_utils/src/utils.js +0 -13
- package/dist/functions/safe_utils/imports.js +0 -1
- package/dist/functions/safe_utils/index.js +0 -1
- package/dist/functions/safe_utils/src/index.js +0 -4
- package/dist/functions/safe_utils/src/safe_document.js +0 -12
- package/dist/functions/safe_utils/src/safe_globals.js +0 -14
- package/dist/functions/safe_utils/src/safe_storage.js +0 -52
- package/dist/functions/safe_utils/src/safe_window.js +0 -42
- package/dist/functions/string_utils/index.js +0 -1
- package/dist/functions/string_utils/src/index.js +0 -1
- package/dist/functions/string_utils/src/string_utils.js +0 -153
- package/dist/functions/type_utils/imports.js +0 -1
- package/dist/functions/type_utils/index.js +0 -1
- package/dist/functions/type_utils/src/clean_utils.js +0 -38
- package/dist/functions/type_utils/src/ensure_utils.js +0 -33
- package/dist/functions/type_utils/src/index.js +0 -5
- package/dist/functions/type_utils/src/json_utils.js +0 -22
- package/dist/functions/type_utils/src/mime_utils.js +0 -311
- package/dist/functions/type_utils/src/type_utils.js +0 -39
- package/dist/functions/ui_utils/imports.js +0 -5
- package/dist/functions/ui_utils/index.js +0 -1
- package/dist/functions/ui_utils/src/button.js +0 -22
- package/dist/functions/ui_utils/src/checkbox.js +0 -6
- package/dist/functions/ui_utils/src/index.js +0 -4
- package/dist/functions/ui_utils/src/input.js +0 -6
- package/dist/functions/ui_utils/src/spinner.js +0 -4
- package/dist/functions/url_utils/index.js +0 -1
- package/dist/functions/url_utils/uri_utils.js +0 -69
- package/dist/functions/variable_utils/imports.js +0 -1
- package/dist/functions/variable_utils/index.js +0 -1
- package/dist/functions/variable_utils/src/index.js +0 -1
- package/dist/functions/variable_utils/src/variable_utils.js +0 -34
- package/dist/functions.json +0 -1727
- package/dist/index.js +0 -2
- package/dist/types/functions/path_utils/src/path_utils.browser.d.ts +0 -2
- package/dist/types/functions/path_utils/src/path_utils.node.d.ts +0 -2
- package/dist/types/functions/read_utils/src/read_utils.browser.d.ts +0 -1
- package/dist/types/functions/read_utils/src/utils.browser.d.ts +0 -3
- package/dist/types/functions/url_utils/index.d.ts +0 -1
- package/dist/types/functions/url_utils/uri_utils.d.ts +0 -19
- package/dist/types/index.js +0 -1
- package/dist/types/src/ChangePassword.js +0 -1
- package/dist/types/src/Files.js +0 -1
- package/dist/types/src/index.js +0 -5
- package/dist/types/src/login.js +0 -1
- package/dist/types/src/logout.js +0 -1
- package/dist/types/src/utils.js +0 -1
- package/dist/utils/imports.js +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/src/Input.js +0 -2
- package/dist/utils/src/config.js +0 -12
- package/dist/utils/src/index.js +0 -3
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function readJsonFile<T = any>(url: string): Promise<T | null>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './uri_utils';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** Encode a single query value/key safely */
|
|
2
|
-
export declare const encode: (v: unknown) => string;
|
|
3
|
-
/** Decode a single query value/key safely (never throws) */
|
|
4
|
-
export declare const decodeSafe: (v: string | null | undefined) => string;
|
|
5
|
-
/** Decode strings that might be double-encoded (up to 2 passes) */
|
|
6
|
-
export declare const decodeMaybeDouble: (v: string) => string;
|
|
7
|
-
/** Convert + to spaces (legacy www-form behavior) then decode */
|
|
8
|
-
export declare const decodeFormComponent: (v: string) => string;
|
|
9
|
-
/** Build a URL with query params (skips null/undefined) */
|
|
10
|
-
export declare const buildUrl: (base: string, params?: Record<string, unknown>) => string;
|
|
11
|
-
/** Parse a query string into an object (first value wins; arrays if repeat=true) */
|
|
12
|
-
export declare const parseQuery: (qs: string, opts?: {
|
|
13
|
-
repeat?: boolean;
|
|
14
|
-
form?: boolean;
|
|
15
|
-
}) => Record<string, any>;
|
|
16
|
-
/** Quick helper: percent-encode whole strings for placement in URLs */
|
|
17
|
-
export declare const encodeTextForUrl: (text: string) => string;
|
|
18
|
-
/** Quick helper: decode long blobs coming from share-intents/UTMs */
|
|
19
|
-
export declare const decodeShareBlob: (blob: string) => string;
|
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/src/Files.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/src/index.js
DELETED
package/dist/types/src/login.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/src/logout.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/src/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/utils/imports.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/utils/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src';
|
package/dist/utils/src/Input.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const Input = ({ label, type, value, onValueChange, placeholder, disabled, error, directory, multiple, accept, }) => (_jsxs("label", { className: "block", children: [_jsx("span", { className: "text-sm", children: label }), _jsx("input", Object.assign({ type: type, className: `mt-1 w-full border rounded px-2 py-1 ${error ? "border-red-500" : ""}`, value: value, onChange: (e) => onValueChange(e.target.value), placeholder: placeholder, disabled: disabled }, (type === "file" && directory ? { webkitdirectory: "true", directory: "" } : {}), (type === "file" && multiple ? { multiple: true } : {}), (type === "file" && accept ? { accept } : {}))), error && _jsx("p", { className: "text-sm text-red-600", children: error })] }));
|
package/dist/utils/src/config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
export let AppConfig;
|
|
3
|
-
export function loadConfig() {
|
|
4
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5
|
-
const base = (process.env.BASE_API_URL || "").replace(/\/+$/, "");
|
|
6
|
-
const url = `${base}/config.json`;
|
|
7
|
-
const res = yield fetch(url);
|
|
8
|
-
if (!res.ok)
|
|
9
|
-
throw new Error(`Failed to load ${url}: ${res.status}`);
|
|
10
|
-
AppConfig = yield res.json();
|
|
11
|
-
});
|
|
12
|
-
}
|
package/dist/utils/src/index.js
DELETED