@machinerd/js-module 0.3.1 → 0.4.1
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 +147 -21
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +3 -18
- package/dist/hooks/index.d.mts +3 -18
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks-BDwkyixK.mjs +1 -0
- package/dist/hooks-D1JcFVTH.cjs +1 -0
- package/dist/index-CWgr7lXX.d.cts +661 -0
- package/dist/index-CfKO4Lbp.d.mts +661 -0
- package/dist/index-DiZ4xS_f.d.mts +37 -0
- package/dist/index-OjfbEYpE.d.cts +37 -0
- package/dist/index.d.cts +1 -36
- package/dist/index.d.mts +1 -36
- package/dist/skeleton-B1Jzl0cz.cjs +1 -0
- package/dist/skeleton-NTpsm0XR.mjs +1 -0
- package/dist/styles/index.css +331 -189
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.d.cts +40 -272
- package/dist/ui/index.d.mts +43 -275
- package/dist/ui/index.mjs +1 -1
- package/dist/ui-client/index.cjs +1 -0
- package/dist/ui-client/index.d.cts +158 -0
- package/dist/ui-client/index.d.mts +158 -0
- package/dist/ui-client/index.mjs +1 -0
- package/dist/util/index.cjs +1 -1
- package/dist/util/index.d.cts +32 -22
- package/dist/util/index.d.mts +31 -22
- package/dist/util/index.mjs +1 -1
- package/dist/util-1BLWEgZB.cjs +1 -0
- package/dist/util-Dtb82Us1.mjs +1 -0
- package/package.json +6 -4
- package/dist/hooks-C9M3V-Pb.mjs +0 -1
- package/dist/hooks-DPYIex_y.cjs +0 -1
- package/dist/ui/client-only/index.cjs +0 -1
- package/dist/ui/client-only/index.d.cts +0 -136
- package/dist/ui/client-only/index.d.mts +0 -136
- package/dist/ui/client-only/index.mjs +0 -1
- package/dist/util-BrmjOcya.mjs +0 -1
- package/dist/util-CDkao6z3.cjs +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
interface ApiConfig {
|
|
3
|
+
apiEndpoint: string;
|
|
4
|
+
cdnEndpoint: string;
|
|
5
|
+
}
|
|
6
|
+
declare class ApiClient {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(config: ApiConfig);
|
|
9
|
+
login<T>(email: string, password: string): Promise<{
|
|
10
|
+
ok: boolean;
|
|
11
|
+
errors: Array<{
|
|
12
|
+
name: T;
|
|
13
|
+
message: string;
|
|
14
|
+
}>;
|
|
15
|
+
}>;
|
|
16
|
+
getToken(): string | undefined;
|
|
17
|
+
getBearer(): string;
|
|
18
|
+
hasPermission(obj: string, act: string, exact?: boolean, silent?: boolean): Promise<any>;
|
|
19
|
+
cdnMedia(path: string, size?: number): string;
|
|
20
|
+
cdnStatic(path: string, size?: number): string;
|
|
21
|
+
getUploadPresignURL(param: {
|
|
22
|
+
contentType: string;
|
|
23
|
+
length: number;
|
|
24
|
+
key: string;
|
|
25
|
+
disposition?: string;
|
|
26
|
+
}): Promise<Response>;
|
|
27
|
+
createParaMap(file: File, prefix?: string): UploadValues;
|
|
28
|
+
upload(file: File, prefix?: string): Promise<string>;
|
|
29
|
+
}
|
|
30
|
+
interface UploadValues {
|
|
31
|
+
contentType: string;
|
|
32
|
+
length: number;
|
|
33
|
+
key: string;
|
|
34
|
+
disposition?: string;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ApiConfig as n, UploadValues as r, ApiClient as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
interface ApiConfig {
|
|
3
|
+
apiEndpoint: string;
|
|
4
|
+
cdnEndpoint: string;
|
|
5
|
+
}
|
|
6
|
+
declare class ApiClient {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(config: ApiConfig);
|
|
9
|
+
login<T>(email: string, password: string): Promise<{
|
|
10
|
+
ok: boolean;
|
|
11
|
+
errors: Array<{
|
|
12
|
+
name: T;
|
|
13
|
+
message: string;
|
|
14
|
+
}>;
|
|
15
|
+
}>;
|
|
16
|
+
getToken(): string | undefined;
|
|
17
|
+
getBearer(): string;
|
|
18
|
+
hasPermission(obj: string, act: string, exact?: boolean, silent?: boolean): Promise<any>;
|
|
19
|
+
cdnMedia(path: string, size?: number): string;
|
|
20
|
+
cdnStatic(path: string, size?: number): string;
|
|
21
|
+
getUploadPresignURL(param: {
|
|
22
|
+
contentType: string;
|
|
23
|
+
length: number;
|
|
24
|
+
key: string;
|
|
25
|
+
disposition?: string;
|
|
26
|
+
}): Promise<Response>;
|
|
27
|
+
createParaMap(file: File, prefix?: string): UploadValues;
|
|
28
|
+
upload(file: File, prefix?: string): Promise<string>;
|
|
29
|
+
}
|
|
30
|
+
interface UploadValues {
|
|
31
|
+
contentType: string;
|
|
32
|
+
length: number;
|
|
33
|
+
key: string;
|
|
34
|
+
disposition?: string;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ApiConfig as n, UploadValues as r, ApiClient as t };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface ApiConfig {
|
|
3
|
-
apiEndpoint: string;
|
|
4
|
-
cdnEndpoint: string;
|
|
5
|
-
}
|
|
6
|
-
declare class ApiClient {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(config: ApiConfig);
|
|
9
|
-
login<T>(email: string, password: string): Promise<{
|
|
10
|
-
ok: boolean;
|
|
11
|
-
errors: Array<{
|
|
12
|
-
name: T;
|
|
13
|
-
message: string;
|
|
14
|
-
}>;
|
|
15
|
-
}>;
|
|
16
|
-
getToken(): string | undefined;
|
|
17
|
-
getBearer(): string;
|
|
18
|
-
hasPermission(obj: string, act: string, exact?: boolean, silent?: boolean): Promise<any>;
|
|
19
|
-
cdnMedia(path: string, size?: number): string;
|
|
20
|
-
cdnStatic(path: string, size?: number): string;
|
|
21
|
-
getUploadPresignURL(param: {
|
|
22
|
-
contentType: string;
|
|
23
|
-
length: number;
|
|
24
|
-
key: string;
|
|
25
|
-
disposition?: string;
|
|
26
|
-
}): Promise<Response>;
|
|
27
|
-
createParaMap(file: File, prefix?: string): UploadValues;
|
|
28
|
-
upload(file: File, prefix?: string): Promise<string>;
|
|
29
|
-
}
|
|
30
|
-
interface UploadValues {
|
|
31
|
-
contentType: string;
|
|
32
|
-
length: number;
|
|
33
|
-
key: string;
|
|
34
|
-
disposition?: string;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
1
|
+
import { n as ApiConfig, r as UploadValues, t as ApiClient } from "./index-OjfbEYpE.cjs";
|
|
37
2
|
export { ApiConfig, UploadValues, ApiClient as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface ApiConfig {
|
|
3
|
-
apiEndpoint: string;
|
|
4
|
-
cdnEndpoint: string;
|
|
5
|
-
}
|
|
6
|
-
declare class ApiClient {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(config: ApiConfig);
|
|
9
|
-
login<T>(email: string, password: string): Promise<{
|
|
10
|
-
ok: boolean;
|
|
11
|
-
errors: Array<{
|
|
12
|
-
name: T;
|
|
13
|
-
message: string;
|
|
14
|
-
}>;
|
|
15
|
-
}>;
|
|
16
|
-
getToken(): string | undefined;
|
|
17
|
-
getBearer(): string;
|
|
18
|
-
hasPermission(obj: string, act: string, exact?: boolean, silent?: boolean): Promise<any>;
|
|
19
|
-
cdnMedia(path: string, size?: number): string;
|
|
20
|
-
cdnStatic(path: string, size?: number): string;
|
|
21
|
-
getUploadPresignURL(param: {
|
|
22
|
-
contentType: string;
|
|
23
|
-
length: number;
|
|
24
|
-
key: string;
|
|
25
|
-
disposition?: string;
|
|
26
|
-
}): Promise<Response>;
|
|
27
|
-
createParaMap(file: File, prefix?: string): UploadValues;
|
|
28
|
-
upload(file: File, prefix?: string): Promise<string>;
|
|
29
|
-
}
|
|
30
|
-
interface UploadValues {
|
|
31
|
-
contentType: string;
|
|
32
|
-
length: number;
|
|
33
|
-
key: string;
|
|
34
|
-
disposition?: string;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
1
|
+
import { n as ApiConfig, r as UploadValues, t as ApiClient } from "./index-DiZ4xS_f.mjs";
|
|
37
2
|
export { ApiConfig, UploadValues, ApiClient as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./util-1BLWEgZB.cjs`);let n=require(`react/jsx-runtime`),r=require(`class-variance-authority`);const i=(0,r.cva)(t.y(`komc:w-full komc:animate-pulse komc:bg-gray-200`),{variants:{size:{xs:`komc:h-4`,sm:`komc:h-8`,md:`komc:h-12`,lg:`komc:h-16`,xl:`komc:h-20`,"2xl":`komc:h-24`,"3xl":`komc:h-28`,square:`komc:h-auto komc:aspect-square`,full:`komc:h-full`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},defaultVariants:{size:`sm`,rounded:`sm`}});function a({size:e,rounded:t,width:r,height:a,className:o,...s}){let c=r?typeof r==`string`?r:`${r}px`:void 0,l=a?typeof a==`string`?a:`${a}px`:void 0;return(0,n.jsx)(`div`,{"data-komc":!0,"aria-hidden":`true`,className:i({size:e,rounded:t,className:o}),style:{width:c,height:l},...s})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as e}from"./util-Dtb82Us1.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(e(`komc:w-full komc:animate-pulse komc:bg-gray-200`),{variants:{size:{xs:`komc:h-4`,sm:`komc:h-8`,md:`komc:h-12`,lg:`komc:h-16`,xl:`komc:h-20`,"2xl":`komc:h-24`,"3xl":`komc:h-28`,square:`komc:h-auto komc:aspect-square`,full:`komc:h-full`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},defaultVariants:{size:`sm`,rounded:`sm`}});function i({size:e,rounded:n,width:i,height:a,className:o,...s}){let c=i?typeof i==`string`?i:`${i}px`:void 0,l=a?typeof a==`string`?a:`${a}px`:void 0;return t(`div`,{"data-komc":!0,"aria-hidden":`true`,className:r({size:e,rounded:n,className:o}),style:{width:c,height:l},...s})}export{i as t};
|