@omnikit-js/ui 0.5.4 → 0.6.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 +100 -255
- package/dist/components/client/index.d.mts +7 -0
- package/dist/components/client/index.mjs +6 -0
- package/dist/components/client/index.mjs.map +1 -0
- package/dist/components/server/index.d.mts +2 -0
- package/dist/components/server/index.mjs +201 -0
- package/dist/components/server/index.mjs.map +1 -0
- package/dist/index-D-5etDTV.d.mts +80 -0
- package/dist/index.d.mts +48 -0
- package/dist/index.mjs +204 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +41 -77
- package/LICENSE +0 -21
- package/dist/styles.css +0 -2486
- package/dist/styles.isolated.css +0 -2643
- package/dist/styles.prefixed.css +0 -248
- package/src/components/BillingClient.tsx +0 -686
- package/src/components/BillingServer.tsx +0 -129
- package/src/components/PaymentMethodForm.tsx +0 -125
- package/src/components/SubscriptionConfirmModal.tsx +0 -213
- package/src/components/theme-provider.tsx +0 -11
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/avatar.tsx +0 -53
- package/src/components/ui/badge.tsx +0 -46
- package/src/components/ui/button.tsx +0 -59
- package/src/components/ui/card-brand-icon.tsx +0 -88
- package/src/components/ui/card.tsx +0 -92
- package/src/components/ui/chart.tsx +0 -353
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/dropdown-menu.tsx +0 -257
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/navigation-menu.tsx +0 -168
- package/src/components/ui/progress.tsx +0 -31
- package/src/components/ui/radio-group.tsx +0 -44
- package/src/components/ui/select.tsx +0 -185
- package/src/components/ui/separator.tsx +0 -28
- package/src/components/ui/switch.tsx +0 -31
- package/src/components/ui/tabs.tsx +0 -66
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/index.ts +0 -13
- package/src/lib/utils.ts +0 -6
- package/src/styles/globals.css +0 -1
- package/src/styles/isolated.css +0 -316
- package/src/styles/main.css +0 -95
- package/src/styles/prefixed-main.css +0 -95
- package/src/styles/prefixed.css +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OmniKit API shared types
|
|
5
|
+
*/
|
|
6
|
+
interface QueryOptions {
|
|
7
|
+
filter?: Record<string, any> | FilterExpression;
|
|
8
|
+
sort?: string;
|
|
9
|
+
limit?: number;
|
|
10
|
+
offset?: number;
|
|
11
|
+
}
|
|
12
|
+
interface FilterExpression {
|
|
13
|
+
operator?: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'in';
|
|
14
|
+
value: any;
|
|
15
|
+
}
|
|
16
|
+
interface QueryResponse<T = any> {
|
|
17
|
+
success: boolean;
|
|
18
|
+
data: T[];
|
|
19
|
+
total?: number;
|
|
20
|
+
error?: string;
|
|
21
|
+
}
|
|
22
|
+
interface SingleRecordResponse<T = any> {
|
|
23
|
+
success: boolean;
|
|
24
|
+
data: T;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
interface MutationResponse {
|
|
28
|
+
success: boolean;
|
|
29
|
+
data?: any;
|
|
30
|
+
error?: string;
|
|
31
|
+
}
|
|
32
|
+
interface OmniKitConfig {
|
|
33
|
+
baseUrl: string;
|
|
34
|
+
apiKey?: string;
|
|
35
|
+
jwt?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ColumnDefinition<T = any> {
|
|
39
|
+
key: string;
|
|
40
|
+
label?: string;
|
|
41
|
+
render?: (value: any, row: T) => React.ReactNode;
|
|
42
|
+
sortable?: boolean;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
type Column<T = any> = string | ColumnDefinition<T>;
|
|
46
|
+
interface DataListProps<T = any> {
|
|
47
|
+
/** Table name to query */
|
|
48
|
+
table: string;
|
|
49
|
+
/** OmniKit API base URL (e.g., http://localhost:3000/omnikit) */
|
|
50
|
+
baseUrl: string;
|
|
51
|
+
/** API Key for authentication */
|
|
52
|
+
apiKey?: string;
|
|
53
|
+
/** JWT token for authentication (alternative to apiKey) */
|
|
54
|
+
jwt?: string;
|
|
55
|
+
/** Columns to display */
|
|
56
|
+
columns: Column<T>[];
|
|
57
|
+
/** Key field for row identification (defaults to 'id') */
|
|
58
|
+
keyField?: keyof T;
|
|
59
|
+
/** Query options (filter, sort, limit, offset) */
|
|
60
|
+
filter?: QueryOptions['filter'];
|
|
61
|
+
sort?: string;
|
|
62
|
+
limit?: number;
|
|
63
|
+
offset?: number;
|
|
64
|
+
/** Custom class names */
|
|
65
|
+
className?: string;
|
|
66
|
+
headerClassName?: string;
|
|
67
|
+
rowClassName?: string | ((row: T) => string);
|
|
68
|
+
cellClassName?: string | ((column: Column<T>, row: T) => string);
|
|
69
|
+
/** Messages */
|
|
70
|
+
emptyMessage?: string;
|
|
71
|
+
errorMessage?: string;
|
|
72
|
+
/** Loading state (for client-side refetching) */
|
|
73
|
+
loading?: boolean;
|
|
74
|
+
/** Custom row click handler (converts to client component behavior) */
|
|
75
|
+
onRowClick?: (row: T) => void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare function DataList<T extends Record<string, any>>({ table, baseUrl, apiKey, jwt, columns, keyField, filter, sort, limit, offset, className, headerClassName, rowClassName, cellClassName, emptyMessage, errorMessage, }: DataListProps<T>): Promise<react_jsx_runtime.JSX.Element>;
|
|
79
|
+
|
|
80
|
+
export { type Column as C, DataList as D, type FilterExpression as F, type MutationResponse as M, type OmniKitConfig as O, type QueryOptions as Q, type SingleRecordResponse as S, type QueryResponse as a, type DataListProps as b, type ColumnDefinition as c };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { O as OmniKitConfig, Q as QueryOptions, a as QueryResponse, S as SingleRecordResponse, M as MutationResponse } from './index-D-5etDTV.mjs';
|
|
2
|
+
export { C as Column, c as ColumnDefinition, D as DataList, b as DataListProps, F as FilterExpression } from './index-D-5etDTV.mjs';
|
|
3
|
+
export { OMNIKIT_CLIENT_VERSION } from './components/client/index.mjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* OmniKit API Client
|
|
8
|
+
* Wrapper for making requests to OmniKit serverless platform
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare class OmniKitClient {
|
|
12
|
+
private baseUrl;
|
|
13
|
+
private apiKey?;
|
|
14
|
+
private jwt?;
|
|
15
|
+
constructor(config: OmniKitConfig);
|
|
16
|
+
private getHeaders;
|
|
17
|
+
private request;
|
|
18
|
+
/**
|
|
19
|
+
* Query records from a table
|
|
20
|
+
*/
|
|
21
|
+
query<T = any>(table: string, options?: QueryOptions): Promise<QueryResponse<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Find a record by ID
|
|
24
|
+
*/
|
|
25
|
+
findById<T = any>(table: string, id: string | number): Promise<SingleRecordResponse<T>>;
|
|
26
|
+
/**
|
|
27
|
+
* Insert a new record
|
|
28
|
+
*/
|
|
29
|
+
insert(table: string, data: Record<string, any>): Promise<MutationResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an existing record
|
|
32
|
+
*/
|
|
33
|
+
update(table: string, id: string | number, data: Record<string, any>): Promise<MutationResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete a record
|
|
36
|
+
*/
|
|
37
|
+
delete(table: string, id: string | number): Promise<MutationResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Upsert a record (insert or update)
|
|
40
|
+
*/
|
|
41
|
+
upsert(table: string, data: Record<string, any>): Promise<MutationResponse>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Create a new OmniKit client instance
|
|
45
|
+
*/
|
|
46
|
+
declare function createOmniKitClient(config: OmniKitConfig): OmniKitClient;
|
|
47
|
+
|
|
48
|
+
export { MutationResponse, OmniKitClient, OmniKitConfig, QueryOptions, QueryResponse, SingleRecordResponse, createOmniKitClient };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/lib/omnikit-client.ts
|
|
4
|
+
var OmniKitClient = class {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
7
|
+
this.apiKey = config.apiKey;
|
|
8
|
+
this.jwt = config.jwt;
|
|
9
|
+
}
|
|
10
|
+
getHeaders() {
|
|
11
|
+
const headers = {
|
|
12
|
+
"Content-Type": "application/json"
|
|
13
|
+
};
|
|
14
|
+
if (this.jwt) {
|
|
15
|
+
headers["Authorization"] = `Bearer ${this.jwt}`;
|
|
16
|
+
} else if (this.apiKey) {
|
|
17
|
+
headers["X-API-Key"] = this.apiKey;
|
|
18
|
+
}
|
|
19
|
+
return headers;
|
|
20
|
+
}
|
|
21
|
+
async request(endpoint, options) {
|
|
22
|
+
const url = `${this.baseUrl}${endpoint}`;
|
|
23
|
+
const response = await fetch(url, {
|
|
24
|
+
...options,
|
|
25
|
+
headers: {
|
|
26
|
+
...this.getHeaders(),
|
|
27
|
+
...options?.headers
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
if (!response.ok) {
|
|
31
|
+
const error = await response.json().catch(() => ({ error: "Request failed" }));
|
|
32
|
+
throw new Error(error.error || `HTTP ${response.status}`);
|
|
33
|
+
}
|
|
34
|
+
return response.json();
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Query records from a table
|
|
38
|
+
*/
|
|
39
|
+
async query(table, options) {
|
|
40
|
+
const params = new URLSearchParams();
|
|
41
|
+
if (options?.filter) {
|
|
42
|
+
params.append("filter", JSON.stringify(options.filter));
|
|
43
|
+
}
|
|
44
|
+
if (options?.sort) {
|
|
45
|
+
params.append("sort", options.sort);
|
|
46
|
+
}
|
|
47
|
+
if (options?.limit) {
|
|
48
|
+
params.append("limit", options.limit.toString());
|
|
49
|
+
}
|
|
50
|
+
if (options?.offset) {
|
|
51
|
+
params.append("offset", options.offset.toString());
|
|
52
|
+
}
|
|
53
|
+
const queryString = params.toString();
|
|
54
|
+
const endpoint = `/data/${table}${queryString ? `?${queryString}` : ""}`;
|
|
55
|
+
return this.request(endpoint);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Find a record by ID
|
|
59
|
+
*/
|
|
60
|
+
async findById(table, id) {
|
|
61
|
+
return this.request(`/data/${table}/${id}`);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Insert a new record
|
|
65
|
+
*/
|
|
66
|
+
async insert(table, data) {
|
|
67
|
+
return this.request(`/data/${table}`, {
|
|
68
|
+
method: "POST",
|
|
69
|
+
body: JSON.stringify(data)
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Update an existing record
|
|
74
|
+
*/
|
|
75
|
+
async update(table, id, data) {
|
|
76
|
+
return this.request(`/data/${table}/${id}`, {
|
|
77
|
+
method: "PUT",
|
|
78
|
+
body: JSON.stringify(data)
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Delete a record
|
|
83
|
+
*/
|
|
84
|
+
async delete(table, id) {
|
|
85
|
+
return this.request(`/data/${table}/${id}`, {
|
|
86
|
+
method: "DELETE"
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Upsert a record (insert or update)
|
|
91
|
+
*/
|
|
92
|
+
async upsert(table, data) {
|
|
93
|
+
return this.request(`/data/${table}`, {
|
|
94
|
+
method: "PUT",
|
|
95
|
+
body: JSON.stringify(data)
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
function createOmniKitClient(config) {
|
|
100
|
+
return new OmniKitClient(config);
|
|
101
|
+
}
|
|
102
|
+
function normalizeColumn(column) {
|
|
103
|
+
if (typeof column === "string") {
|
|
104
|
+
return {
|
|
105
|
+
key: column,
|
|
106
|
+
label: column.charAt(0).toUpperCase() + column.slice(1).replace(/_/g, " "),
|
|
107
|
+
sortable: true
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
...column,
|
|
112
|
+
label: column.label || column.key.charAt(0).toUpperCase() + column.key.slice(1).replace(/_/g, " ")
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function getCellValue(row, key) {
|
|
116
|
+
return key.split(".").reduce((obj, k) => obj?.[k], row);
|
|
117
|
+
}
|
|
118
|
+
async function DataList({
|
|
119
|
+
table,
|
|
120
|
+
baseUrl,
|
|
121
|
+
apiKey,
|
|
122
|
+
jwt,
|
|
123
|
+
columns,
|
|
124
|
+
keyField = "id",
|
|
125
|
+
filter,
|
|
126
|
+
sort,
|
|
127
|
+
limit,
|
|
128
|
+
offset,
|
|
129
|
+
className = "",
|
|
130
|
+
headerClassName = "",
|
|
131
|
+
rowClassName = "",
|
|
132
|
+
cellClassName = "",
|
|
133
|
+
emptyMessage = "No data found",
|
|
134
|
+
errorMessage = "Failed to load data"
|
|
135
|
+
}) {
|
|
136
|
+
const client = createOmniKitClient({ baseUrl, apiKey, jwt });
|
|
137
|
+
let data = [];
|
|
138
|
+
let error = null;
|
|
139
|
+
try {
|
|
140
|
+
const response = await client.query(table, {
|
|
141
|
+
filter,
|
|
142
|
+
sort,
|
|
143
|
+
limit,
|
|
144
|
+
offset
|
|
145
|
+
});
|
|
146
|
+
if (response.success) {
|
|
147
|
+
data = response.data;
|
|
148
|
+
} else {
|
|
149
|
+
error = response.error || errorMessage;
|
|
150
|
+
}
|
|
151
|
+
} catch (err) {
|
|
152
|
+
error = err instanceof Error ? err.message : errorMessage;
|
|
153
|
+
}
|
|
154
|
+
const normalizedColumns = columns.map(normalizeColumn);
|
|
155
|
+
if (error) {
|
|
156
|
+
return /* @__PURE__ */ jsxs("div", { className: `rounded-lg border border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20 p-4 text-red-800 dark:text-red-200 ${className}`, children: [
|
|
157
|
+
/* @__PURE__ */ jsx("p", { className: "font-medium", children: "Error" }),
|
|
158
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm", children: error })
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
161
|
+
if (data.length === 0) {
|
|
162
|
+
return /* @__PURE__ */ jsx("div", { className: `rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 p-8 text-center text-gray-600 dark:text-gray-400 ${className}`, children: /* @__PURE__ */ jsx("p", { children: emptyMessage }) });
|
|
163
|
+
}
|
|
164
|
+
return /* @__PURE__ */ jsx("div", { className: `overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700 ${className}`, children: /* @__PURE__ */ jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [
|
|
165
|
+
/* @__PURE__ */ jsx("thead", { className: `bg-gray-50 dark:bg-gray-800 ${headerClassName}`, children: /* @__PURE__ */ jsx("tr", { children: normalizedColumns.map((column) => /* @__PURE__ */ jsx(
|
|
166
|
+
"th",
|
|
167
|
+
{
|
|
168
|
+
className: `px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-700 dark:text-gray-300 ${column.className || ""}`,
|
|
169
|
+
children: column.label
|
|
170
|
+
},
|
|
171
|
+
column.key
|
|
172
|
+
)) }) }),
|
|
173
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-700 bg-white dark:bg-gray-900", children: data.map((row) => {
|
|
174
|
+
const rowKey = String(row[keyField]);
|
|
175
|
+
const computedRowClassName = typeof rowClassName === "function" ? rowClassName(row) : rowClassName;
|
|
176
|
+
return /* @__PURE__ */ jsx(
|
|
177
|
+
"tr",
|
|
178
|
+
{
|
|
179
|
+
className: `hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors ${computedRowClassName}`,
|
|
180
|
+
children: normalizedColumns.map((column) => {
|
|
181
|
+
const cellValue = getCellValue(row, column.key);
|
|
182
|
+
const computedCellClassName = typeof cellClassName === "function" ? cellClassName(column, row) : cellClassName;
|
|
183
|
+
return /* @__PURE__ */ jsx(
|
|
184
|
+
"td",
|
|
185
|
+
{
|
|
186
|
+
className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 ${computedCellClassName}`,
|
|
187
|
+
children: column.render ? column.render(cellValue, row) : cellValue
|
|
188
|
+
},
|
|
189
|
+
column.key
|
|
190
|
+
);
|
|
191
|
+
})
|
|
192
|
+
},
|
|
193
|
+
rowKey
|
|
194
|
+
);
|
|
195
|
+
}) })
|
|
196
|
+
] }) });
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// src/components/client/index.ts
|
|
200
|
+
var OMNIKIT_CLIENT_VERSION = "0.1.0";
|
|
201
|
+
|
|
202
|
+
export { DataList, OMNIKIT_CLIENT_VERSION, OmniKitClient, createOmniKitClient };
|
|
203
|
+
//# sourceMappingURL=index.mjs.map
|
|
204
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/omnikit-client.ts","../src/components/server/DataList/index.tsx","../src/components/client/index.ts"],"names":[],"mappings":";;;AAaO,IAAM,gBAAN,MAAoB;AAAA,EAKzB,YAAY,MAAA,EAAuB;AACjC,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA,CAAO,OAAA,CAAQ,OAAA,CAAQ,OAAO,EAAE,CAAA;AAC/C,IAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AACrB,IAAA,IAAA,CAAK,MAAM,MAAA,CAAO,GAAA;AAAA,EACpB;AAAA,EAEQ,UAAA,GAA0B;AAChC,IAAA,MAAM,OAAA,GAAuB;AAAA,MAC3B,cAAA,EAAgB;AAAA,KAClB;AAEA,IAAA,IAAI,KAAK,GAAA,EAAK;AACZ,MAAA,OAAA,CAAQ,eAAe,CAAA,GAAI,CAAA,OAA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M,SAAA,EAAU,2EACd,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAC,GAAA,KAAQ;AACjB,MAAA,MAAM,MAAA,GAAS,MAAA,CAAO,GAAA,CAAI,QAAQ,CAAC,CAAA;AACnC,MAAA,MAAM,uBAAuB,OAAO,YAAA,KAAiB,UAAA,GACjD,YAAA,CAAa,GAAG,CAAA,GAChB,YAAA;AAEJ,MAAA,uBACE,GAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UAEC,SAAA,EAAW,6DAA6D,oBAAoB,CAAA,CAAA;AAAA,UAE3F,QAAA,EAAA,iBAAA,CAAkB,GAAA,CAAI,CAAC,MAAA,KAAW;AACjC,YAAA,MAAM,SAAA,GAAY,YAAA,CAAa,GAAA,EAAK,MAAA,CAAO,GAAG,CAAA;AAC9C,YAAA,MAAM,wBAAwB,OAAO,aAAA,KAAkB,aACnD,aAAA,CAAc,MAAA,EAAQ,GAAG,CAAA,GACzB,aAAA;AAEJ,YAAA,uBACE,GAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBAEC,SAAA,EAAW,sDAAsD,qBAAqB,CAAA,CAAA;AAAA,gBAErF,iBAAO,MAAA,GAAS,MAAA,CAAO,MAAA,CAAO,SAAA,EAAW,GAAG,CAAA,GAAI;AAAA,eAAA;AAAA,cAH5C,MAAA,CAAO;AAAA,aAId;AAAA,UAEJ,CAAC;AAAA,SAAA;AAAA,QAjBI;AAAA,OAkBP;AAAA,IAEJ,CAAC,CAAA,EACH;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;AC1JO,IAAM,sBAAA,GAAyB","file":"index.mjs","sourcesContent":["/**\n * OmniKit API Client\n * Wrapper for making requests to OmniKit serverless platform\n */\n\nimport type {\n QueryOptions,\n QueryResponse,\n SingleRecordResponse,\n MutationResponse,\n OmniKitConfig,\n} from './types'\n\nexport class OmniKitClient {\n private baseUrl: string\n private apiKey?: string\n private jwt?: string\n\n constructor(config: OmniKitConfig) {\n this.baseUrl = config.baseUrl.replace(/\\/$/, '') // Remove trailing slash\n this.apiKey = config.apiKey\n this.jwt = config.jwt\n }\n\n private getHeaders(): HeadersInit {\n const headers: HeadersInit = {\n 'Content-Type': 'application/json',\n }\n\n if (this.jwt) {\n headers['Authorization'] = `Bearer ${this.jwt}`\n } else if (this.apiKey) {\n headers['X-API-Key'] = this.apiKey\n }\n\n return headers\n }\n\n private async request<T>(\n endpoint: string,\n options?: RequestInit\n ): Promise<T> {\n const url = `${this.baseUrl}${endpoint}`\n\n const response = await fetch(url, {\n ...options,\n headers: {\n ...this.getHeaders(),\n ...options?.headers,\n },\n })\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({ error: 'Request failed' }))\n throw new Error(error.error || `HTTP ${response.status}`)\n }\n\n return response.json()\n }\n\n /**\n * Query records from a table\n */\n async query<T = any>(\n table: string,\n options?: QueryOptions\n ): Promise<QueryResponse<T>> {\n const params = new URLSearchParams()\n\n if (options?.filter) {\n params.append('filter', JSON.stringify(options.filter))\n }\n if (options?.sort) {\n params.append('sort', options.sort)\n }\n if (options?.limit) {\n params.append('limit', options.limit.toString())\n }\n if (options?.offset) {\n params.append('offset', options.offset.toString())\n }\n\n const queryString = params.toString()\n const endpoint = `/data/${table}${queryString ? `?${queryString}` : ''}`\n\n return this.request<QueryResponse<T>>(endpoint)\n }\n\n /**\n * Find a record by ID\n */\n async findById<T = any>(\n table: string,\n id: string | number\n ): Promise<SingleRecordResponse<T>> {\n return this.request<SingleRecordResponse<T>>(`/data/${table}/${id}`)\n }\n\n /**\n * Insert a new record\n */\n async insert(\n table: string,\n data: Record<string, any>\n ): Promise<MutationResponse> {\n return this.request<MutationResponse>(`/data/${table}`, {\n method: 'POST',\n body: JSON.stringify(data),\n })\n }\n\n /**\n * Update an existing record\n */\n async update(\n table: string,\n id: string | number,\n data: Record<string, any>\n ): Promise<MutationResponse> {\n return this.request<MutationResponse>(`/data/${table}/${id}`, {\n method: 'PUT',\n body: JSON.stringify(data),\n })\n }\n\n /**\n * Delete a record\n */\n async delete(table: string, id: string | number): Promise<MutationResponse> {\n return this.request<MutationResponse>(`/data/${table}/${id}`, {\n method: 'DELETE',\n })\n }\n\n /**\n * Upsert a record (insert or update)\n */\n async upsert(\n table: string,\n data: Record<string, any>\n ): Promise<MutationResponse> {\n return this.request<MutationResponse>(`/data/${table}`, {\n method: 'PUT',\n body: JSON.stringify(data),\n })\n }\n}\n\n/**\n * Create a new OmniKit client instance\n */\nexport function createOmniKitClient(config: OmniKitConfig): OmniKitClient {\n return new OmniKitClient(config)\n}\n","/**\n * DataList Component\n *\n * A server-side React component that fetches and displays data from OmniKit API.\n * Renders on the server with zero client JavaScript for data fetching.\n *\n * @example\n * ```tsx\n * import { DataList } from '@omnikit-js/ui'\n *\n * export default function UsersPage() {\n * return (\n * <DataList\n * table=\"users\"\n * baseUrl={process.env.OMNIKIT_BASE_URL}\n * apiKey={process.env.OMNIKIT_API_KEY}\n * columns={['name', 'email', 'created_at']}\n * filter={{ active: true }}\n * limit={20}\n * />\n * )\n * }\n * ```\n */\n\nimport { createOmniKitClient } from '../../../lib/omnikit-client'\nimport type { DataListProps, Column, ColumnDefinition } from './types'\n\nfunction normalizeColumn<T>(column: Column<T>): ColumnDefinition<T> {\n if (typeof column === 'string') {\n return {\n key: column,\n label: column.charAt(0).toUpperCase() + column.slice(1).replace(/_/g, ' '),\n sortable: true,\n }\n }\n return {\n ...column,\n label: column.label || column.key.charAt(0).toUpperCase() + column.key.slice(1).replace(/_/g, ' '),\n }\n}\n\nfunction getCellValue(row: any, key: string): any {\n return key.split('.').reduce((obj, k) => obj?.[k], row)\n}\n\nexport async function DataList<T extends Record<string, any>>({\n table,\n baseUrl,\n apiKey,\n jwt,\n columns,\n keyField = 'id' as keyof T,\n filter,\n sort,\n limit,\n offset,\n className = '',\n headerClassName = '',\n rowClassName = '',\n cellClassName = '',\n emptyMessage = 'No data found',\n errorMessage = 'Failed to load data',\n}: DataListProps<T>) {\n // Create API client\n const client = createOmniKitClient({ baseUrl, apiKey, jwt })\n\n // Fetch data\n let data: T[] = []\n let error: string | null = null\n\n try {\n const response = await client.query<T>(table, {\n filter,\n sort,\n limit,\n offset,\n })\n\n if (response.success) {\n data = response.data\n } else {\n error = response.error || errorMessage\n }\n } catch (err) {\n error = err instanceof Error ? err.message : errorMessage\n }\n\n // Normalize columns\n const normalizedColumns = columns.map(normalizeColumn)\n\n // Error state\n if (error) {\n return (\n <div className={`rounded-lg border border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20 p-4 text-red-800 dark:text-red-200 ${className}`}>\n <p className=\"font-medium\">Error</p>\n <p className=\"mt-1 text-sm\">{error}</p>\n </div>\n )\n }\n\n // Empty state\n if (data.length === 0) {\n return (\n <div className={`rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 p-8 text-center text-gray-600 dark:text-gray-400 ${className}`}>\n <p>{emptyMessage}</p>\n </div>\n )\n }\n\n // Render table\n return (\n <div className={`overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700 ${className}`}>\n <table className=\"min-w-full divide-y divide-gray-200 dark:divide-gray-700\">\n <thead className={`bg-gray-50 dark:bg-gray-800 ${headerClassName}`}>\n <tr>\n {normalizedColumns.map((column) => (\n <th\n key={column.key}\n className={`px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-700 dark:text-gray-300 ${column.className || ''}`}\n >\n {column.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className=\"divide-y divide-gray-200 dark:divide-gray-700 bg-white dark:bg-gray-900\">\n {data.map((row) => {\n const rowKey = String(row[keyField])\n const computedRowClassName = typeof rowClassName === 'function'\n ? rowClassName(row)\n : rowClassName\n\n return (\n <tr\n key={rowKey}\n className={`hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors ${computedRowClassName}`}\n >\n {normalizedColumns.map((column) => {\n const cellValue = getCellValue(row, column.key)\n const computedCellClassName = typeof cellClassName === 'function'\n ? cellClassName(column, row)\n : cellClassName\n\n return (\n <td\n key={column.key}\n className={`px-6 py-4 text-sm text-gray-900 dark:text-gray-100 ${computedCellClassName}`}\n >\n {column.render ? column.render(cellValue, row) : cellValue}\n </td>\n )\n })}\n </tr>\n )\n })}\n </tbody>\n </table>\n </div>\n )\n}\n","/**\n * Client Components\n * These components run on the client side\n */\n\n// Placeholder for future client components\nexport const OMNIKIT_CLIENT_VERSION = '0.1.0'\n"]}
|
package/package.json
CHANGED
|
@@ -1,99 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnikit-js/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
7
|
-
"types": "src/index.ts",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "React component library for OmniKit serverless platform",
|
|
5
|
+
"main": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.mts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
|
-
"types": "./
|
|
11
|
-
"import": "./
|
|
12
|
-
"
|
|
9
|
+
"types": "./dist/index.d.mts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
13
12
|
},
|
|
14
|
-
"./
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
"./server": {
|
|
14
|
+
"types": "./dist/components/server/index.d.mts",
|
|
15
|
+
"import": "./dist/components/server/index.mjs",
|
|
16
|
+
"default": "./dist/components/server/index.mjs"
|
|
17
|
+
},
|
|
18
|
+
"./client": {
|
|
19
|
+
"types": "./dist/components/client/index.d.mts",
|
|
20
|
+
"import": "./dist/components/client/index.mjs",
|
|
21
|
+
"default": "./dist/components/client/index.mjs"
|
|
22
|
+
}
|
|
17
23
|
},
|
|
18
24
|
"files": [
|
|
19
|
-
"
|
|
20
|
-
"dist/styles.css",
|
|
21
|
-
"dist/styles.prefixed.css",
|
|
22
|
-
"dist/styles.isolated.css"
|
|
25
|
+
"dist"
|
|
23
26
|
],
|
|
24
27
|
"scripts": {
|
|
25
|
-
"build
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
28
|
+
"build": "tsup",
|
|
29
|
+
"dev": "tsup --watch",
|
|
30
|
+
"dev:demo": "npm run dev --prefix demo",
|
|
31
|
+
"dev:all": "npm run dev & npm run dev:demo",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"prepublishOnly": "npm run build",
|
|
34
|
+
"preversion": "npm run typecheck && npm run build"
|
|
32
35
|
},
|
|
33
36
|
"keywords": [
|
|
34
37
|
"react",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"component"
|
|
38
|
+
"components",
|
|
39
|
+
"omnikit",
|
|
40
|
+
"serverless",
|
|
41
|
+
"ui"
|
|
40
42
|
],
|
|
41
|
-
"author": "
|
|
43
|
+
"author": "",
|
|
42
44
|
"license": "MIT",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/omnikit-js/ui"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/omnikit-js/ui#readme",
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/omnikit-js/ui/issues"
|
|
45
52
|
},
|
|
46
53
|
"peerDependencies": {
|
|
47
|
-
"next": "^14.0.0 || ^15.0.0",
|
|
48
54
|
"react": "^18.0.0 || ^19.0.0",
|
|
49
55
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
50
56
|
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@radix-ui/react-avatar": "^1.1.10",
|
|
53
|
-
"@radix-ui/react-dialog": "^1.1.14",
|
|
54
|
-
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
55
|
-
"@radix-ui/react-label": "^2.1.7",
|
|
56
|
-
"@radix-ui/react-navigation-menu": "^1.2.13",
|
|
57
|
-
"@radix-ui/react-progress": "^1.1.7",
|
|
58
|
-
"@radix-ui/react-radio-group": "^1.3.7",
|
|
59
|
-
"@radix-ui/react-select": "^2.2.5",
|
|
60
|
-
"@radix-ui/react-separator": "^1.1.7",
|
|
61
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
62
|
-
"@radix-ui/react-switch": "^1.2.5",
|
|
63
|
-
"@radix-ui/react-tabs": "^1.1.12",
|
|
64
|
-
"@radix-ui/react-tooltip": "^1.2.7",
|
|
65
|
-
"@stripe/react-stripe-js": "^3.7.0",
|
|
66
|
-
"@stripe/stripe-js": "^7.4.0",
|
|
67
|
-
"class-variance-authority": "^0.7.1",
|
|
68
|
-
"clsx": "^2.1.1",
|
|
69
|
-
"lucide-react": "^0.525.0",
|
|
70
|
-
"tailwind-merge": "^3.3.1"
|
|
71
|
-
},
|
|
72
57
|
"devDependencies": {
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
78
|
-
"@rollup/plugin-commonjs": "^25.0.7",
|
|
79
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
80
|
-
"@rollup/plugin-replace": "^6.0.2",
|
|
81
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
82
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
83
|
-
"@tailwindcss/postcss": "^4.1.11",
|
|
84
|
-
"@types/node": "^20",
|
|
85
|
-
"@types/react": "^18.3.3",
|
|
86
|
-
"@types/react-dom": "^18.3.0",
|
|
87
|
-
"postcss": "^8.4.38",
|
|
88
|
-
"react": "^18.3.1",
|
|
89
|
-
"react-dom": "^18.3.1",
|
|
90
|
-
"rollup": "^4.17.2",
|
|
91
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
92
|
-
"rollup-plugin-delete": "^2.0.0",
|
|
93
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
94
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
95
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
96
|
-
"tailwindcss": "^4.1.11",
|
|
97
|
-
"typescript": "^5.4.5"
|
|
58
|
+
"@types/react": "^19",
|
|
59
|
+
"@types/react-dom": "^19",
|
|
60
|
+
"tsup": "^8.3.5",
|
|
61
|
+
"typescript": "^5"
|
|
98
62
|
}
|
|
99
63
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 OmniKit UI
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|