modelence 0.1.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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Modelence
2
+
3
+ Full-stack JavaScript framework for interactive applications
@@ -0,0 +1 @@
1
+ var t=Object.create;var u=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var r=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var i=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var b=(s,e,n,M)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!d.call(s,o)&&o!==n&&u(s,o,{get:()=>e[o],enumerable:!(M=c(e,o))||M.enumerable});return s};var a=(s,e,n)=>(n=s!=null?t(r(s)):{},b(e||!s||!s.__esModule?u(n,"default",{value:s,enumerable:!0}):n,s));var y={seconds:s=>s*1e3,minutes:s=>s*6e4,hours:s=>s*36e5,days:s=>s*864e5,weeks:s=>s*6048e5};export{i as a,a as b,y as c};
@@ -0,0 +1,42 @@
1
+ import { C as ConfigKey } from './types-DAn43Whw.js';
2
+ export { Route, Routes, useNavigate } from 'react-router-dom';
3
+ import React from 'react';
4
+
5
+ declare function getConfig(key: ConfigKey): string | number | boolean;
6
+
7
+ type ErrorHandler = (error: Error, methodName: string) => void;
8
+
9
+ declare function renderApp({ loadingElement, routesElement, favicon, errorHandler }: {
10
+ loadingElement: React.ReactNode;
11
+ routesElement: React.ReactNode;
12
+ favicon?: string;
13
+ errorHandler?: ErrorHandler;
14
+ }): void;
15
+
16
+ type Args = Record<string, unknown>;
17
+ type MethodResult<T> = {
18
+ isLoading: boolean;
19
+ error: Error | null;
20
+ data: T | null;
21
+ };
22
+ declare function useLoader<T>(methodName: string, args?: Args): MethodResult<T>;
23
+
24
+ declare function useSession(): {
25
+ user: {
26
+ id: string;
27
+ handle: string;
28
+ } | null;
29
+ };
30
+
31
+ declare function signupWithPassword({ email, password }: {
32
+ email: string;
33
+ password: string;
34
+ }): Promise<unknown>;
35
+ declare function loginWithPassword({ email, password }: {
36
+ email: string;
37
+ password: string;
38
+ }): Promise<unknown>;
39
+
40
+ declare const AppProvider: any;
41
+
42
+ export { AppProvider, getConfig, loginWithPassword, renderApp, signupWithPassword, useLoader, useSession };