@pelatform/starter 0.1.6 → 0.1.8

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/server.js CHANGED
@@ -70,7 +70,7 @@ var setServerLastVisitedWorkspace = async (workspace, maxAge = 30 * 86400) => {
70
70
  maxAge,
71
71
  sameSite: "lax",
72
72
  httpOnly: true,
73
- secure: process.env.NODE_ENV === "production"
73
+ secure: process.env.NODE_ENV !== "development"
74
74
  });
75
75
  };
76
76
  var getServerLastVisitedWorkspace = async () => {
@@ -1,13 +1,10 @@
1
1
  import { AnyUseQueryOptions, QueryKey } from '@tanstack/react-query';
2
+ import * as better_auth_client_plugins from 'better-auth/client/plugins';
2
3
  import * as better_auth_react from 'better-auth/react';
3
4
  import { createAuthClient, BetterFetchResponse, BetterFetchOption } from 'better-auth/react';
4
- import * as better_auth_client_plugins from 'better-auth/client/plugins';
5
- import * as _simplewebauthn_server from '@simplewebauthn/server';
6
- import { CredentialDeviceType, AuthenticationResponseJSON } from '@simplewebauthn/server';
5
+ import * as better_auth from 'better-auth';
7
6
  import * as better_auth_plugins_organization from 'better-auth/plugins/organization';
8
7
  import { Organization } from 'better-auth/plugins/organization';
9
- import * as better_auth from 'better-auth';
10
- import * as _better_fetch_fetch from '@better-fetch/fetch';
11
8
  import { ComponentType, ComponentProps, ReactNode } from 'react';
12
9
  import { Avatar, buttonVariants, Dialog, Card } from 'pelatform-ui/default';
13
10
 
@@ -40,6 +37,12 @@ type AuthQueryOptions = {
40
37
  listPasskeys: QueryKey;
41
38
  listSessions: QueryKey;
42
39
  session: QueryKey;
40
+ workspaceById: (id: string) => QueryKey;
41
+ workspaceBySlug: (slug: string) => QueryKey;
42
+ workspaceList: QueryKey;
43
+ webhooks: (workspaceId: string) => QueryKey;
44
+ billings: (workspaceId: string) => QueryKey;
45
+ billingUsage: (workspaceId: string) => QueryKey;
43
46
  };
44
47
  };
45
48
  declare const defaultAuthQueryOptions: AuthQueryOptions;
@@ -176,7 +179,6 @@ type PathConfig = {
176
179
  PRICING: string;
177
180
  TERMS: string;
178
181
  PRIVACY: string;
179
- [key: string]: string;
180
182
  };
181
183
  /** Authentication related paths */
182
184
  auth: {
@@ -190,13 +192,11 @@ type PathConfig = {
190
192
  SIGN_OUT: string;
191
193
  SIGN_UP: string;
192
194
  TWO_FACTOR: string;
193
- [key: string]: string;
194
195
  };
195
196
  /** Onboarding flow paths */
196
197
  onboarding: {
197
198
  WELCOME: string;
198
199
  WORKSPACE: string;
199
- [key: string]: string;
200
200
  };
201
201
  /** User account settings paths */
202
202
  account: {
@@ -204,7 +204,6 @@ type PathConfig = {
204
204
  SECURITY: string;
205
205
  API_KEYS: string;
206
206
  WORKSPACES: string;
207
- [key: string]: string;
208
207
  };
209
208
  /** Workspace settings paths */
210
209
  workspaces: {
@@ -213,19 +212,17 @@ type PathConfig = {
213
212
  API_KEYS: string;
214
213
  BILLINGS: string;
215
214
  WEBHOOKS: string;
216
- [key: string]: string;
217
215
  };
218
216
  /** Admin paths */
219
217
  admin: {
220
218
  OVERVIEW: string;
221
219
  USERS: string;
222
- [key: string]: string;
223
220
  };
224
221
  /** Custom paths */
225
222
  custom: {
226
223
  ACCEPT_INVITATION: string;
227
224
  NEW_WORKSPACE: string;
228
- [key: string]: string;
225
+ VERIFY_EMAIL: string;
229
226
  };
230
227
  };
231
228
  /**
@@ -258,32 +255,8 @@ type Config = {
258
255
  ui: UIConfig;
259
256
  };
260
257
 
261
- type Passkey = {
262
- id: string;
263
- name?: string | undefined;
264
- publicKey: string;
265
- userId: string;
266
- credentialID: string;
267
- counter: number;
268
- deviceType: CredentialDeviceType;
269
- backedUp: boolean;
270
- transports?: string | undefined;
271
- createdAt: Date;
272
- aaguid?: string | undefined;
273
- };
274
-
275
258
  type AnyAuthClient = Omit<ReturnType<typeof createAuthClient>, "signUp" | "getSession">;
276
259
  declare const authClient: {} & {
277
- useListPasskeys: () => {
278
- data: Passkey[] | null;
279
- error: null | _better_fetch_fetch.BetterFetchError;
280
- isPending: boolean;
281
- isRefetching: boolean;
282
- refetch: (queryParams?: {
283
- query?: better_auth.SessionQueryParams;
284
- } | undefined) => Promise<void>;
285
- };
286
- } & {
287
260
  useActiveOrganization: () => {
288
261
  data: better_auth.Prettify<{
289
262
  id: string;
@@ -317,7 +290,7 @@ declare const authClient: {} & {
317
290
  createdAt: Date;
318
291
  }[];
319
292
  }> | null;
320
- error: null | _better_fetch_fetch.BetterFetchError;
293
+ error: null | better_auth_react.BetterFetchError;
321
294
  isPending: boolean;
322
295
  isRefetching: boolean;
323
296
  refetch: (queryParams?: {
@@ -333,7 +306,7 @@ declare const authClient: {} & {
333
306
  logo?: string | null | undefined | undefined;
334
307
  metadata?: any;
335
308
  }[] | null;
336
- error: null | _better_fetch_fetch.BetterFetchError;
309
+ error: null | better_auth_react.BetterFetchError;
337
310
  isPending: boolean;
338
311
  isRefetching: boolean;
339
312
  refetch: (queryParams?: {
@@ -348,7 +321,7 @@ declare const authClient: {} & {
348
321
  role: string;
349
322
  createdAt: Date;
350
323
  } | null;
351
- error: null | _better_fetch_fetch.BetterFetchError;
324
+ error: null | better_auth_react.BetterFetchError;
352
325
  isPending: boolean;
353
326
  isRefetching: boolean;
354
327
  refetch: (queryParams?: {
@@ -359,7 +332,7 @@ declare const authClient: {} & {
359
332
  data: {
360
333
  role: string;
361
334
  } | null;
362
- error: null | _better_fetch_fetch.BetterFetchError;
335
+ error: null | better_auth_react.BetterFetchError;
363
336
  isPending: boolean;
364
337
  isRefetching: boolean;
365
338
  refetch: (queryParams?: {
@@ -1179,113 +1152,6 @@ declare const authClient: {} & {
1179
1152
  message?: string | undefined;
1180
1153
  }, FetchOptions["throw"] extends true ? true : false>>;
1181
1154
  };
1182
- } & {
1183
- passkey: {
1184
- generateRegisterOptions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1185
- authenticatorAttachment?: "platform" | "cross-platform" | undefined;
1186
- name?: string | undefined;
1187
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1188
- query?: {
1189
- authenticatorAttachment?: "platform" | "cross-platform" | undefined;
1190
- name?: string | undefined;
1191
- } | undefined;
1192
- fetchOptions?: FetchOptions | undefined;
1193
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<_simplewebauthn_server.PublicKeyCredentialCreationOptionsJSON, {
1194
- code?: string | undefined;
1195
- message?: string | undefined;
1196
- }, FetchOptions["throw"] extends true ? true : false>>;
1197
- };
1198
- } & {
1199
- passkey: {
1200
- generateAuthenticateOptions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1201
- query?: Record<string, any> | undefined;
1202
- fetchOptions?: FetchOptions | undefined;
1203
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<_simplewebauthn_server.PublicKeyCredentialRequestOptionsJSON, {
1204
- code?: string | undefined;
1205
- message?: string | undefined;
1206
- }, FetchOptions["throw"] extends true ? true : false>>;
1207
- };
1208
- } & {
1209
- passkey: {
1210
- verifyRegistration: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1211
- response: any;
1212
- name?: string | undefined;
1213
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1214
- response: any;
1215
- name?: string | undefined;
1216
- } & {
1217
- fetchOptions?: FetchOptions | undefined;
1218
- }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<Passkey, {
1219
- code?: string | undefined;
1220
- message?: string | undefined;
1221
- }, FetchOptions["throw"] extends true ? true : false>>;
1222
- };
1223
- } & {
1224
- passkey: {
1225
- verifyAuthentication: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1226
- response: AuthenticationResponseJSON;
1227
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1228
- response: AuthenticationResponseJSON;
1229
- } & {
1230
- fetchOptions?: FetchOptions | undefined;
1231
- }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1232
- session: {
1233
- id: string;
1234
- createdAt: Date;
1235
- updatedAt: Date;
1236
- userId: string;
1237
- expiresAt: Date;
1238
- token: string;
1239
- ipAddress?: string | null | undefined;
1240
- userAgent?: string | null | undefined;
1241
- };
1242
- }, {
1243
- code?: string | undefined;
1244
- message?: string | undefined;
1245
- }, FetchOptions["throw"] extends true ? true : false>>;
1246
- };
1247
- } & {
1248
- passkey: {
1249
- listUserPasskeys: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1250
- query?: Record<string, any> | undefined;
1251
- fetchOptions?: FetchOptions | undefined;
1252
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<Passkey[], {
1253
- code?: string | undefined;
1254
- message?: string | undefined;
1255
- }, FetchOptions["throw"] extends true ? true : false>>;
1256
- };
1257
- } & {
1258
- passkey: {
1259
- deletePasskey: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1260
- id: string;
1261
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1262
- id: string;
1263
- } & {
1264
- fetchOptions?: FetchOptions | undefined;
1265
- }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1266
- status: boolean;
1267
- }, {
1268
- code?: string | undefined;
1269
- message?: string | undefined;
1270
- }, FetchOptions["throw"] extends true ? true : false>>;
1271
- };
1272
- } & {
1273
- passkey: {
1274
- updatePasskey: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1275
- id: string;
1276
- name: string;
1277
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1278
- id: string;
1279
- name: string;
1280
- } & {
1281
- fetchOptions?: FetchOptions | undefined;
1282
- }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1283
- passkey: Passkey;
1284
- }, {
1285
- code?: string | undefined;
1286
- message?: string | undefined;
1287
- }, FetchOptions["throw"] extends true ? true : false>>;
1288
- };
1289
1155
  } & {
1290
1156
  signIn: {
1291
1157
  phoneNumber: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
@@ -2900,63 +2766,6 @@ declare const authClient: {} & {
2900
2766
  };
2901
2767
  } & {
2902
2768
  oneTap: (opts?: better_auth_client_plugins.GoogleOneTapActionOptions | undefined, fetchOptions?: better_auth.ClientFetchOption | undefined) => Promise<void>;
2903
- } & {
2904
- signIn: {
2905
- passkey: (opts?: {
2906
- autoFill?: boolean;
2907
- fetchOptions?: better_auth.ClientFetchOption;
2908
- } | undefined, options?: better_auth.ClientFetchOption | undefined) => Promise<{
2909
- data: null;
2910
- error: {
2911
- message?: string | undefined;
2912
- status: number;
2913
- statusText: string;
2914
- };
2915
- } | {
2916
- data: {
2917
- session: better_auth.Session;
2918
- user: better_auth.User;
2919
- };
2920
- error: null;
2921
- } | {
2922
- data: null;
2923
- error: {
2924
- code: string;
2925
- message: string;
2926
- status: number;
2927
- statusText: string;
2928
- };
2929
- }>;
2930
- };
2931
- passkey: {
2932
- addPasskey: (opts?: {
2933
- fetchOptions?: better_auth.ClientFetchOption;
2934
- name?: string;
2935
- authenticatorAttachment?: "platform" | "cross-platform";
2936
- useAutoRegister?: boolean;
2937
- } | undefined, fetchOpts?: better_auth.ClientFetchOption | undefined) => Promise<{
2938
- data: null;
2939
- error: {
2940
- message?: string | undefined;
2941
- status: number;
2942
- statusText: string;
2943
- };
2944
- } | {
2945
- data: Passkey;
2946
- error: null;
2947
- } | {
2948
- data: null;
2949
- error: {
2950
- code: string;
2951
- message: string;
2952
- status: number;
2953
- statusText: string;
2954
- };
2955
- }>;
2956
- };
2957
- $Infer: {
2958
- Passkey: Passkey;
2959
- };
2960
2769
  } & {
2961
2770
  admin: {
2962
2771
  checkRolePermission: <R extends "user" | "admin">(data: ({
@@ -3112,7 +2921,7 @@ declare const authClient: {} & {
3112
2921
  } | null;
3113
2922
  isPending: boolean;
3114
2923
  isRefetching: boolean;
3115
- error: _better_fetch_fetch.BetterFetchError | null;
2924
+ error: better_auth_react.BetterFetchError | null;
3116
2925
  refetch: (queryParams?: {
3117
2926
  query?: better_auth.SessionQueryParams;
3118
2927
  } | undefined) => Promise<void>;
@@ -3152,21 +2961,21 @@ declare const authClient: {} & {
3152
2961
  };
3153
2962
  };
3154
2963
  };
3155
- $fetch: _better_fetch_fetch.BetterFetch<{
3156
- plugins: (_better_fetch_fetch.BetterFetchPlugin | {
2964
+ $fetch: better_auth_react.BetterFetch<{
2965
+ plugins: (better_auth_react.BetterFetchPlugin | {
3157
2966
  id: string;
3158
2967
  name: string;
3159
2968
  hooks: {
3160
- onSuccess(context: _better_fetch_fetch.SuccessContext<any>): void;
2969
+ onSuccess(context: better_auth_react.SuccessContext<any>): void;
3161
2970
  };
3162
2971
  } | {
3163
2972
  id: string;
3164
2973
  name: string;
3165
2974
  hooks: {
3166
- onSuccess: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
3167
- onError: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
3168
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
3169
- onResponse: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2975
+ onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2976
+ onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2977
+ onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2978
+ onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3170
2979
  };
3171
2980
  })[];
3172
2981
  cache?: RequestCache | undefined;
@@ -3186,12 +2995,12 @@ declare const authClient: {} & {
3186
2995
  referrerPolicy?: ReferrerPolicy | undefined;
3187
2996
  signal?: (AbortSignal | null) | undefined;
3188
2997
  window?: null | undefined;
3189
- onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2998
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3190
2999
  hookOptions?: {
3191
3000
  cloneResponse?: boolean;
3192
3001
  } | undefined;
3193
3002
  timeout?: number | undefined;
3194
- customFetchImpl: _better_fetch_fetch.FetchEsque;
3003
+ customFetchImpl: better_auth_react.FetchEsque;
3195
3004
  baseURL: string;
3196
3005
  throw?: boolean | undefined;
3197
3006
  auth?: ({
@@ -3211,10 +3020,10 @@ declare const authClient: {} & {
3211
3020
  params?: any;
3212
3021
  duplex?: "full" | "half" | undefined;
3213
3022
  jsonParser: (text: string) => Promise<any> | any;
3214
- retry?: _better_fetch_fetch.RetryOptions | undefined;
3023
+ retry?: better_auth_react.RetryOptions | undefined;
3215
3024
  retryAttempt?: number | undefined;
3216
- output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3217
- errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
3025
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3026
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3218
3027
  disableValidation?: boolean | undefined;
3219
3028
  disableSignal?: boolean | undefined;
3220
3029
  }, unknown, unknown, {}>;
@@ -3311,13 +3120,6 @@ declare const authClient: {} & {
3311
3120
  readonly PROVIDER_ID_REQUIRED: "Provider ID is required";
3312
3121
  readonly INVALID_OAUTH_CONFIG: "Invalid OAuth configuration.";
3313
3122
  readonly SESSION_REQUIRED: "Session is required";
3314
- readonly CHALLENGE_NOT_FOUND: "Challenge not found";
3315
- readonly YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey";
3316
- readonly FAILED_TO_VERIFY_REGISTRATION: "Failed to verify registration";
3317
- readonly PASSKEY_NOT_FOUND: "Passkey not found";
3318
- readonly AUTHENTICATION_FAILED: "Authentication failed";
3319
- readonly UNABLE_TO_CREATE_SESSION: "Unable to create session";
3320
- readonly FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey";
3321
3123
  readonly INVALID_PHONE_NUMBER: "Invalid phone number";
3322
3124
  readonly PHONE_NUMBER_EXIST: "Phone number already exists";
3323
3125
  readonly PHONE_NUMBER_NOT_EXIST: "phone number isn't registered";
@@ -3579,4 +3381,51 @@ interface CardComponentProps extends Omit<ComponentProps<typeof Card>, "title" |
3579
3381
  isSubmitting?: boolean;
3580
3382
  }
3581
3383
 
3582
- export { type AuthQueryOptions as A, type BetterFetchRequest as B, type Config as C, type DialogClassNames as D, type Passkey as E, type FeaturesConfig as F, type I18nConfig as I, type LocaleConfig as L, type NonThrowableResult as N, type PathConfig as P, type Refetch as R, type SessionData as S, type ThrowableResult as T, type UIConfig as U, type ViewClassNames as V, type AppConfig as a, type AuthenticationConfig as b, type AuthConfig as c, defaultAuthQueryOptions as d, type AnyAuthClient as e, authClient as f, type AuthClient as g, type Session as h, type User as i, type ActiveOrganization as j, type Locale as k, type FieldType as l, type ImageOptions as m, type ProviderIcon as n, type Provider as o, type ApiKey as p, type Invitation as q, type PasswordValidation as r, type Profile as s, type FetchError as t, type AvatarClassNames as u, type CardClassNames as v, type AvatarProps as w, type ViewProps as x, type DialogComponentProps as y, type CardComponentProps as z };
3384
+ type Workspace = {
3385
+ id: string;
3386
+ name: string;
3387
+ slug: string;
3388
+ logo: string | null;
3389
+ metadata: Record<string, unknown> | null;
3390
+ createdAt: Date | string;
3391
+ currentUserRole: string | null;
3392
+ members: Array<{
3393
+ id: string;
3394
+ organizationId: string;
3395
+ userId: string;
3396
+ role: string;
3397
+ createdAt: Date | string;
3398
+ user: {
3399
+ id: string;
3400
+ name: string | null;
3401
+ email: string;
3402
+ image: string | null;
3403
+ };
3404
+ }>;
3405
+ invitations?: Array<{
3406
+ id: string;
3407
+ organizationId: string;
3408
+ inviterId: string;
3409
+ email: string;
3410
+ role: string | null;
3411
+ status: string;
3412
+ expiresAt: Date | string;
3413
+ }>;
3414
+ subscription: {
3415
+ id: string;
3416
+ userId: string | null;
3417
+ workspaceId: string;
3418
+ subscriptionId: string | null;
3419
+ externalId: string;
3420
+ provider: string;
3421
+ status: string;
3422
+ plan: string;
3423
+ currentPeriodStart?: string | Date;
3424
+ currentPeriodEnd?: string | Date;
3425
+ cancelAtPeriodEnd?: boolean;
3426
+ canceledAt?: string | Date | null;
3427
+ isLifetime: boolean;
3428
+ } | null;
3429
+ };
3430
+
3431
+ export { type AuthQueryOptions as A, type BetterFetchRequest as B, type Config as C, type DialogClassNames as D, type FeaturesConfig as F, type I18nConfig as I, type LocaleConfig as L, type NonThrowableResult as N, type PathConfig as P, type Refetch as R, type SessionData as S, type ThrowableResult as T, type UIConfig as U, type ViewClassNames as V, type Workspace as W, type AppConfig as a, type AuthenticationConfig as b, type AuthConfig as c, defaultAuthQueryOptions as d, type AnyAuthClient as e, authClient as f, type AuthClient as g, type Session as h, type User as i, type ActiveOrganization as j, type Locale as k, type FieldType as l, type ImageOptions as m, type ProviderIcon as n, type Provider as o, type ApiKey as p, type Invitation as q, type PasswordValidation as r, type Profile as s, type FetchError as t, type AvatarClassNames as u, type CardClassNames as v, type AvatarProps as w, type ViewProps as x, type DialogComponentProps as y, type CardComponentProps as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelatform/starter",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "A collection of SaaS starter kit components and utilities for Pelatform applications.",
5
5
  "author": "Pelatform",
6
6
  "license": "MIT",
@@ -9,26 +9,49 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "sideEffects": false,
11
11
  "exports": {
12
- "./css": "./dist/style.css",
12
+ "./css": {
13
+ "development": "./src/style.css",
14
+ "default": "./dist/style.css"
15
+ },
13
16
  ".": {
14
- "types": "./dist/index.d.ts",
15
- "default": "./dist/index.js"
17
+ "development": {
18
+ "types": "./src/index.ts",
19
+ "default": "./src/index.ts"
20
+ },
21
+ "import": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ }
16
25
  },
17
26
  "./extend": {
18
- "types": "./dist/extend.d.ts",
19
- "default": "./dist/extend.js"
27
+ "development": {
28
+ "types": "./src/extend.ts",
29
+ "default": "./src/extend.ts"
30
+ },
31
+ "import": {
32
+ "types": "./dist/extend.d.ts",
33
+ "default": "./dist/extend.js"
34
+ }
20
35
  },
21
36
  "./server": {
22
- "types": "./dist/server.d.ts",
23
- "default": "./dist/server.js"
37
+ "development": {
38
+ "types": "./src/server.ts",
39
+ "default": "./src/server.ts"
40
+ },
41
+ "import": {
42
+ "types": "./dist/server.d.ts",
43
+ "default": "./dist/server.js"
44
+ }
24
45
  }
25
46
  },
26
47
  "scripts": {
27
48
  "clean": "rimraf dist",
28
49
  "clean:all": "rimraf .turbo dist node_modules",
29
- "dev": "tsup --watch",
50
+ "dev": "tsup --watch --onSuccess \"cp src/style.css dist/style.css\"",
30
51
  "build": "tsup && cp src/style.css dist/style.css",
31
- "types:check": "tsc --noEmit"
52
+ "types:check": "tsc --noEmit",
53
+ "prepack": "node scripts/prepare-publish.mjs",
54
+ "postpack": "git checkout -- package.json"
32
55
  },
33
56
  "files": [
34
57
  "dist"
@@ -40,8 +63,7 @@
40
63
  "utilities"
41
64
  ],
42
65
  "dependencies": {
43
- "@better-auth/passkey": "^1.4.5",
44
- "@better-fetch/fetch": "^1.1.18",
66
+ "@better-fetch/fetch": "^1.1.19",
45
67
  "@tanstack/react-query-devtools": "^5.91.1",
46
68
  "qrcode": "^1.5.4",
47
69
  "slugify": "^1.6.6",
@@ -49,21 +71,19 @@
49
71
  },
50
72
  "devDependencies": {
51
73
  "@hookform/resolvers": "^5.2.2",
52
- "@pelatform/tsconfig": "^0.1.1",
53
- "@pelatform/utils": "^1.0.4",
54
- "@simplewebauthn/server": "^13.2.2",
55
- "@tanstack/query-core": "^5.90.11",
56
- "@tanstack/react-query": "^5.90.11",
74
+ "@pelatform/tsconfig": "^0.1.3",
75
+ "@tanstack/query-core": "^5.90.12",
76
+ "@tanstack/react-query": "^5.90.12",
57
77
  "@types/node": "^24.10.1",
58
78
  "@types/qrcode": "^1.5.6",
59
79
  "@types/react": "^19.2.7",
60
80
  "better-auth": "^1.4.5",
61
- "lucide-react": "^0.555.0",
81
+ "lucide-react": "^0.556.0",
62
82
  "next": "^16.0.7",
63
83
  "next-intl": "^4.5.8",
64
- "pelatform-ui": "^1.1.0",
84
+ "pelatform-ui": "^1.1.3",
65
85
  "react": "^19.2.1",
66
- "react-hook-form": "^7.67.0",
86
+ "react-hook-form": "^7.68.0",
67
87
  "tailwindcss": "^4.1.17",
68
88
  "tsup": "^8.5.1",
69
89
  "typescript": "^5.9.3",
@@ -71,7 +91,6 @@
71
91
  },
72
92
  "peerDependencies": {
73
93
  "@hookform/resolvers": ">=5.2.0",
74
- "@pelatform/utils": ">=1.0.0",
75
94
  "@tanstack/query-core": ">=5.90.0",
76
95
  "@tanstack/react-query": ">=5.90.0",
77
96
  "better-auth": ">=1.4.0",