@putkoff/abstract-utilities 1.0.98 → 1.0.101
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/client.js +138 -0
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/functions.js +279 -0
- package/dist/cjs/functions.js.map +1 -0
- package/dist/cjs/index.js +273 -17442
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/print_utils-DzyRoj6m.js +1855 -0
- package/dist/cjs/print_utils-DzyRoj6m.js.map +1 -0
- package/dist/cjs/safe_storage-CJgWghnh.js +15986 -0
- package/dist/cjs/safe_storage-CJgWghnh.js.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils.js +25 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/client.js +126 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/functions.js +18 -0
- package/dist/esm/functions.js.map +1 -0
- package/dist/esm/index.js +16 -17170
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/print_utils-qqcMhSul.js +1622 -0
- package/dist/esm/print_utils-qqcMhSul.js.map +1 -0
- package/dist/esm/safe_storage-CMuv35Vo.js +15941 -0
- package/dist/esm/safe_storage-CMuv35Vo.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.js +22 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/types/client/ui_utils/src/button.d.ts +1 -1
- package/dist/types/client/ui_utils/src/checkbox.d.ts +1 -1
- package/dist/types/client/ui_utils/src/input.d.ts +1 -1
- package/dist/types/client/ui_utils/src/spinner.d.ts +1 -1
- package/dist/types/functions/index.d.ts +17 -17
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
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", { 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 })] }));
|
|
4
|
+
|
|
5
|
+
let _cachedConfig = null;
|
|
6
|
+
async function loadConfig() {
|
|
7
|
+
if (_cachedConfig)
|
|
8
|
+
return _cachedConfig;
|
|
9
|
+
try {
|
|
10
|
+
// Use a dynamic expression so bundlers don’t resolve at build time
|
|
11
|
+
const mod = await (new Function("return import('./config.json').catch(() => ({}))"))();
|
|
12
|
+
_cachedConfig = mod.default ?? {};
|
|
13
|
+
return _cachedConfig;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
_cachedConfig = {};
|
|
17
|
+
return _cachedConfig;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { Input, loadConfig };
|
|
22
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/utils/src/Input.tsx","../../src/utils/src/config.ts"],"sourcesContent":["\nexport interface InputProps {\n label?: any;\n type?: any;\n value?: any;\n onValueChange?: any;\n disabled?: any;\n placeholder?: any;\n error?: string;\n \n}\n\nexport interface FileInputExtra {\n directory?: boolean; // true → allow folder selection\n multiple?: boolean; // true → allow multiple files\n accept?: string; // optional MIME filter\n}\n/** keep other InputProps fields … */\nexport type EnhancedInputProps = InputProps & FileInputExtra;\nexport const Input: React.FC<EnhancedInputProps> = ({\n label,\n type,\n value,\n onValueChange,\n placeholder,\n disabled,\n error,\n directory,\n multiple,\n accept,\n}) => (\n <label className=\"block\">\n <span className=\"text-sm\">{label}</span>\n <input\n type={type}\n className={`mt-1 w-full border rounded px-2 py-1 ${error ? \"border-red-500\" : \"\"}`}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={placeholder}\n disabled={disabled}\n \n {...(type === \"file\" && directory ? { webkitdirectory: \"true\", directory: \"\" } : {})}\n {...(type === \"file\" && multiple ? { multiple: true } : {})}\n {...(type === \"file\" && accept ? { accept } : {})}\n />\n {error && <p className=\"text-sm text-red-600\">{error}</p>}\n </label>\n);","let _cachedConfig: any = null;\n\nexport async function loadConfig(): Promise<any> {\n if (_cachedConfig) return _cachedConfig;\n\n try {\n // Use a dynamic expression so bundlers don’t resolve at build time\n const mod: any = await (new Function(\n \"return import('./config.json').catch(() => ({}))\"\n ))();\n _cachedConfig = mod.default ?? {};\n return _cachedConfig;\n } catch {\n _cachedConfig = {};\n return _cachedConfig;\n }\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;AAmBO,MAAM,KAAK,GAAiC,CAAC,EAClD,KAAK,EACL,IAAI,EACJ,KAAK,EACL,aAAa,EACb,WAAW,EACX,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,MAAM,GACP,MACCA,IAAA,CAAA,OAAA,EAAA,EAAO,SAAS,EAAC,OAAO,aACtBC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,SAAS,EAAA,QAAA,EAAE,KAAK,EAAA,CAAQ,EACxCA,GAAA,CAAA,OAAA,EAAA,EACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAA,qCAAA,EAAwC,KAAK,GAAG,gBAAgB,GAAG,EAAE,CAAA,CAAE,EAClF,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC9C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,MAEb,IAAI,KAAK,MAAM,IAAI,SAAS,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAA,IAC/E,IAAI,KAAK,MAAM,IAAI,QAAQ,GAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAA,IACxD,IAAI,KAAK,MAAM,IAAI,MAAM,GAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAA,CACrD,EACD,KAAK,IAAIA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,sBAAsB,EAAA,QAAA,EAAE,KAAK,EAAA,CAAK,CAAA,EAAA,CACnD;;AC9CV,IAAI,aAAa,GAAQ,IAAI;AAEtB,eAAe,UAAU,GAAA;AAC9B,IAAA,IAAI,aAAa;AAAE,QAAA,OAAO,aAAa;AAEvC,IAAA,IAAI;;QAEF,MAAM,GAAG,GAAQ,MAAM,CAAC,IAAI,QAAQ,CAClC,kDAAkD,CACnD,GAAG;AACJ,QAAA,aAAa,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE;AACjC,QAAA,OAAO,aAAa;IACtB;AAAE,IAAA,MAAM;QACN,aAAa,GAAG,EAAE;AAClB,QAAA,OAAO,aAAa;IACtB;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function Spinner(): import("react").JSX.Element;
|
|
1
|
+
export declare function Spinner(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from './auth_utils';
|
|
2
|
-
export * from './constants_utils';
|
|
3
|
-
export * from './env_utils';
|
|
4
|
-
export * from './fetch_utils';
|
|
5
|
-
export * from './path_utils';
|
|
6
|
-
export * from './rndm_utils';
|
|
7
|
-
export * from './string_utils';
|
|
8
|
-
export * from './math_utils';
|
|
9
|
-
export * from './type_utils';
|
|
10
|
-
export * from './config_utils';
|
|
11
|
-
export * from './read_utils';
|
|
12
|
-
export * from './safe_utils';
|
|
13
|
-
export * from './read_utils';
|
|
14
|
-
export * from './variable_utils';
|
|
15
|
-
export * from './size_utils';
|
|
16
|
-
export * from './print_utils';
|
|
17
|
-
export * from './inspect_utils';
|
|
1
|
+
export * from './auth_utils/index.js';
|
|
2
|
+
export * from './constants_utils/index.js';
|
|
3
|
+
export * from './env_utils/index.js';
|
|
4
|
+
export * from './fetch_utils/index.js';
|
|
5
|
+
export * from './path_utils/index.js';
|
|
6
|
+
export * from './rndm_utils/index.js';
|
|
7
|
+
export * from './string_utils/index.js';
|
|
8
|
+
export * from './math_utils/index.js';
|
|
9
|
+
export * from './type_utils/index.js';
|
|
10
|
+
export * from './config_utils/index.js';
|
|
11
|
+
export * from './read_utils/index.js';
|
|
12
|
+
export * from './safe_utils/index.js';
|
|
13
|
+
export * from './read_utils/index.js';
|
|
14
|
+
export * from './variable_utils/index.js';
|
|
15
|
+
export * from './size_utils/index.js';
|
|
16
|
+
export * from './print_utils/index.js';
|
|
17
|
+
export * from './inspect_utils/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putkoff/abstract-utilities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.101",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A reusable React Login component with JWT authentication",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@putkoff/abstract-logger": "0.0.
|
|
29
|
+
"@putkoff/abstract-logger": "0.0.63",
|
|
30
30
|
"@rollup/plugin-alias": "^5.1.1",
|
|
31
31
|
"path-browserify": "^1.0.1"
|
|
32
32
|
},
|