@stackframe/stack 2.2.4 → 2.3.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/dist/components/card-frame.d.ts +0 -1
- package/dist/components/credential-sign-in.d.ts +0 -1
- package/dist/components/credential-sign-up.d.ts +0 -1
- package/dist/components/forgot-password.d.ts +0 -1
- package/dist/components/form-warning.d.ts +0 -1
- package/dist/components/magic-link-sign-in.d.ts +1 -0
- package/dist/components/magic-link-sign-in.d.ts.map +1 -0
- package/dist/components/magic-link-sign-in.js +33 -0
- package/dist/components/message-card.d.ts +0 -1
- package/dist/components/oauth-button.d.ts +0 -1
- package/dist/components/oauth-group.d.ts +0 -1
- package/dist/components/password-field.d.ts +0 -1
- package/dist/components/password-reset-inner.d.ts +0 -1
- package/dist/components/redirect-message-card.d.ts +0 -1
- package/dist/components/separator-with-text.d.ts +0 -1
- package/dist/components/user-avatar.d.ts +0 -1
- package/dist/components/user-button.d.ts +0 -1
- package/dist/components/user-button.js +1 -1
- package/dist/components-core/avatar.d.ts +0 -1
- package/dist/components-core/button.d.ts +0 -1
- package/dist/components-core/card.d.ts +0 -1
- package/dist/components-core/collapsible.d.ts +0 -1
- package/dist/components-core/container.d.ts +0 -1
- package/dist/components-core/dropdown.d.ts +0 -1
- package/dist/components-core/index.d.ts +17 -14
- package/dist/components-core/index.d.ts.map +1 -1
- package/dist/components-core/index.js +35 -99
- package/dist/components-core/input.d.ts +0 -1
- package/dist/components-core/label.d.ts +0 -1
- package/dist/components-core/label.js +2 -2
- package/dist/components-core/link.d.ts +0 -1
- package/dist/components-core/loading-indicator.d.ts +0 -1
- package/dist/components-core/popover.d.ts +0 -1
- package/dist/components-core/separator.d.ts +0 -1
- package/dist/components-core/tabs.d.ts +7 -0
- package/dist/components-core/tabs.d.ts.map +1 -0
- package/dist/components-core/tabs.js +50 -0
- package/dist/components-core/text.d.ts +0 -1
- package/dist/components-core-joy/button.d.ts +0 -1
- package/dist/components-core-joy/input.d.ts +0 -1
- package/dist/components-core-joy/separator.d.ts +1 -2
- package/dist/components-core-joy/separator.d.ts.map +1 -1
- package/dist/components-core-joy/tabs.d.ts +5 -0
- package/dist/components-core-joy/tabs.d.ts.map +1 -0
- package/dist/components-core-joy/tabs.js +20 -0
- package/dist/components-core-joy/text.d.ts +0 -1
- package/dist/components-page/account-settings.d.ts +0 -1
- package/dist/components-page/account-settings.js +1 -1
- package/dist/components-page/auth-page.d.ts +4 -0
- package/dist/components-page/auth-page.d.ts.map +1 -0
- package/dist/components-page/auth-page.js +20 -0
- package/dist/components-page/email-verification.d.ts +0 -1
- package/dist/components-page/forgot-password.d.ts +0 -1
- package/dist/components-page/magic-link-callback.d.ts +4 -0
- package/dist/components-page/magic-link-callback.d.ts.map +1 -0
- package/dist/components-page/magic-link-callback.js +35 -0
- package/dist/components-page/oauth-callback.d.ts +0 -1
- package/dist/components-page/password-reset.d.ts +0 -1
- package/dist/components-page/sign-in.d.ts +0 -1
- package/dist/components-page/sign-in.d.ts.map +1 -1
- package/dist/components-page/sign-in.js +3 -16
- package/dist/components-page/sign-out.d.ts +0 -1
- package/dist/components-page/sign-out.d.ts.map +1 -1
- package/dist/components-page/sign-out.js +1 -2
- package/dist/components-page/sign-up.d.ts +0 -1
- package/dist/components-page/sign-up.d.ts.map +1 -1
- package/dist/components-page/sign-up.js +3 -16
- package/dist/components-page/stack-handler.d.ts +0 -1
- package/dist/components-page/stack-handler.d.ts.map +1 -1
- package/dist/components-page/stack-handler.js +5 -0
- package/dist/index.d.ts +0 -1
- package/dist/joy.d.ts +0 -1
- package/dist/lib/auth.d.ts +0 -1
- package/dist/lib/cookie.d.ts +0 -1
- package/dist/lib/cookie.d.ts.map +1 -1
- package/dist/lib/cookie.js +1 -1
- package/dist/lib/hooks.d.ts +13 -6
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +11 -2
- package/dist/lib/stack-app.d.ts +22 -10
- package/dist/lib/stack-app.d.ts.map +1 -1
- package/dist/lib/stack-app.js +89 -15
- package/dist/providers/component-provider.d.ts +8 -1
- package/dist/providers/component-provider.d.ts.map +1 -1
- package/dist/providers/component-provider.js +5 -0
- package/dist/providers/design-provider.d.ts +0 -1
- package/dist/providers/joy-provider.d.ts +5 -2
- package/dist/providers/joy-provider.d.ts.map +1 -1
- package/dist/providers/joy-provider.js +5 -0
- package/dist/providers/stack-provider-client.d.ts +0 -1
- package/dist/providers/stack-provider.d.ts +0 -1
- package/dist/providers/styled-components-registry.d.ts +0 -1
- package/dist/providers/theme-provider.d.ts +0 -1
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/email.d.ts +0 -1
- package/dist/utils/next.d.ts +0 -1
- package/dist/utils/url.d.ts +0 -1
- package/package.json +5 -4
package/dist/lib/stack-app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { use, useCallback, useMemo } from "react";
|
|
2
|
-
import { StackAdminInterface, StackClientInterface, StackServerInterface } from "@stackframe/stack-shared";
|
|
2
|
+
import { KnownError, StackAdminInterface, StackClientInterface, StackServerInterface } from "@stackframe/stack-shared";
|
|
3
3
|
import { getCookie, setOrDeleteCookie } from "./cookie";
|
|
4
4
|
import { StackAssertionError, throwErr } from "@stackframe/stack-shared/dist/utils/errors";
|
|
5
5
|
import { generateUuid } from "@stackframe/stack-shared/dist/utils/uuids";
|
|
@@ -29,6 +29,7 @@ function getUrls(partial) {
|
|
|
29
29
|
passwordReset: `${handler}/password-reset`,
|
|
30
30
|
forgotPassword: `${handler}/forgot-password`,
|
|
31
31
|
oauthCallback: `${handler}/oauth-callback`,
|
|
32
|
+
magicLinkCallback: `${handler}/magic-link-callback`,
|
|
32
33
|
home: "/",
|
|
33
34
|
accountSettings: `${handler}/account-settings`,
|
|
34
35
|
...filterUndefined(partial),
|
|
@@ -240,6 +241,9 @@ class _StackClientAppImpl {
|
|
|
240
241
|
signedUpAt: new Date(json.signedUpAtMillis),
|
|
241
242
|
clientMetadata: json.clientMetadata,
|
|
242
243
|
authMethod: json.authMethod,
|
|
244
|
+
hasPassword: json.hasPassword,
|
|
245
|
+
authWithEmail: json.authWithEmail,
|
|
246
|
+
oauthProviders: json.oauthProviders,
|
|
243
247
|
toJson() {
|
|
244
248
|
return json;
|
|
245
249
|
}
|
|
@@ -249,7 +253,7 @@ class _StackClientAppImpl {
|
|
|
249
253
|
if (json === null)
|
|
250
254
|
return null;
|
|
251
255
|
const app = this;
|
|
252
|
-
const
|
|
256
|
+
const currentUser = {
|
|
253
257
|
...this._userFromJson(json),
|
|
254
258
|
tokenStore,
|
|
255
259
|
update(update) {
|
|
@@ -263,10 +267,31 @@ class _StackClientAppImpl {
|
|
|
263
267
|
},
|
|
264
268
|
updatePassword(options) {
|
|
265
269
|
return app._updatePassword(options, tokenStore);
|
|
266
|
-
}
|
|
270
|
+
},
|
|
267
271
|
};
|
|
268
|
-
|
|
269
|
-
|
|
272
|
+
if (this.isInternalProject()) {
|
|
273
|
+
const internalUser = {
|
|
274
|
+
...currentUser,
|
|
275
|
+
createProject(newProject) {
|
|
276
|
+
return app._createProject(newProject);
|
|
277
|
+
},
|
|
278
|
+
listOwnedProjects() {
|
|
279
|
+
return app._listOwnedProjects();
|
|
280
|
+
},
|
|
281
|
+
useOwnedProjects() {
|
|
282
|
+
return app._useOwnedProjects();
|
|
283
|
+
},
|
|
284
|
+
onOwnedProjectsChange(callback) {
|
|
285
|
+
return app._onOwnedProjectsChange(callback);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
Object.freeze(internalUser);
|
|
289
|
+
return internalUser;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
Object.freeze(currentUser);
|
|
293
|
+
return currentUser;
|
|
294
|
+
}
|
|
270
295
|
}
|
|
271
296
|
_userToJson(user) {
|
|
272
297
|
return {
|
|
@@ -279,6 +304,9 @@ class _StackClientAppImpl {
|
|
|
279
304
|
signedUpAtMillis: user.signedUpAt.getTime(),
|
|
280
305
|
clientMetadata: user.clientMetadata,
|
|
281
306
|
authMethod: user.authMethod,
|
|
307
|
+
hasPassword: user.hasPassword,
|
|
308
|
+
authWithEmail: user.authWithEmail,
|
|
309
|
+
oauthProviders: user.oauthProviders,
|
|
282
310
|
};
|
|
283
311
|
}
|
|
284
312
|
_projectAdminFromJson(data, adminInterface, onRefresh) {
|
|
@@ -340,6 +368,7 @@ class _StackClientAppImpl {
|
|
|
340
368
|
async redirectToForgotPassword() { return await this._redirectTo("forgotPassword"); }
|
|
341
369
|
async redirectToHome() { return await this._redirectTo("home"); }
|
|
342
370
|
async redirectToOAuthCallback() { return await this._redirectTo("oauthCallback"); }
|
|
371
|
+
async redirectToMagicLinkCallback() { return await this._redirectTo("magicLinkCallback"); }
|
|
343
372
|
async redirectToAfterSignIn() { return await this._redirectTo("afterSignIn"); }
|
|
344
373
|
async redirectToAfterSignUp() { return await this._redirectTo("afterSignUp"); }
|
|
345
374
|
async redirectToAfterSignOut() { return await this._redirectTo("afterSignOut"); }
|
|
@@ -349,6 +378,11 @@ class _StackClientAppImpl {
|
|
|
349
378
|
const error = await this._interface.sendForgotPasswordEmail(email, redirectUrl);
|
|
350
379
|
return error;
|
|
351
380
|
}
|
|
381
|
+
async sendMagicLinkEmail(email) {
|
|
382
|
+
const magicLinkRedirectUrl = constructRedirectUrl(this.urls.magicLinkCallback);
|
|
383
|
+
const error = await this._interface.sendMagicLinkEmail(email, magicLinkRedirectUrl);
|
|
384
|
+
return error;
|
|
385
|
+
}
|
|
352
386
|
async resetPassword(options) {
|
|
353
387
|
const error = await this._interface.resetPassword(options);
|
|
354
388
|
return error;
|
|
@@ -394,8 +428,9 @@ class _StackClientAppImpl {
|
|
|
394
428
|
case 'throw': {
|
|
395
429
|
throw new Error("User is not signed in but useUser was called with { or: 'throw' }");
|
|
396
430
|
}
|
|
397
|
-
|
|
398
|
-
|
|
431
|
+
case undefined:
|
|
432
|
+
case "return-null": {
|
|
433
|
+
// do nothing
|
|
399
434
|
}
|
|
400
435
|
}
|
|
401
436
|
}
|
|
@@ -438,6 +473,21 @@ class _StackClientAppImpl {
|
|
|
438
473
|
}
|
|
439
474
|
return errorCode;
|
|
440
475
|
}
|
|
476
|
+
async signInWithMagicLink(code) {
|
|
477
|
+
this._ensurePersistentTokenStore();
|
|
478
|
+
const tokenStore = getTokenStore(this._tokenStoreOptions);
|
|
479
|
+
const result = await this._interface.signInWithMagicLink(code, tokenStore);
|
|
480
|
+
if (result instanceof KnownError) {
|
|
481
|
+
return result;
|
|
482
|
+
}
|
|
483
|
+
if (result.newUser) {
|
|
484
|
+
window.location.replace(this.urls.afterSignUp);
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
window.location.replace(this.urls.afterSignIn);
|
|
488
|
+
}
|
|
489
|
+
await neverResolve();
|
|
490
|
+
}
|
|
441
491
|
async callOAuthCallback() {
|
|
442
492
|
this._ensurePersistentTokenStore();
|
|
443
493
|
const tokenStore = getTokenStore(this._tokenStoreOptions);
|
|
@@ -476,26 +526,26 @@ class _StackClientAppImpl {
|
|
|
476
526
|
onProjectChange(callback) {
|
|
477
527
|
return this._currentProjectCache.onChange([], callback);
|
|
478
528
|
}
|
|
479
|
-
async
|
|
529
|
+
async _listOwnedProjects() {
|
|
480
530
|
this._ensureInternalProject();
|
|
481
531
|
const tokenStore = getTokenStore(this._tokenStoreOptions);
|
|
482
532
|
const json = await this._ownedProjectsCache.getOrWait([tokenStore], "write-only");
|
|
483
533
|
return json.map((j) => this._projectAdminFromJson(j, this._createAdminInterface(j.id, tokenStore), () => this._refreshOwnedProjects(tokenStore)));
|
|
484
534
|
}
|
|
485
|
-
|
|
535
|
+
_useOwnedProjects() {
|
|
486
536
|
this._ensureInternalProject();
|
|
487
537
|
const tokenStore = getTokenStore(this._tokenStoreOptions);
|
|
488
538
|
const json = useCache(this._ownedProjectsCache, [tokenStore], "useOwnedProjects()");
|
|
489
539
|
return useMemo(() => json.map((j) => this._projectAdminFromJson(j, this._createAdminInterface(j.id, tokenStore), () => this._refreshOwnedProjects(tokenStore))), [json]);
|
|
490
540
|
}
|
|
491
|
-
|
|
541
|
+
_onOwnedProjectsChange(callback) {
|
|
492
542
|
this._ensureInternalProject();
|
|
493
543
|
const tokenStore = getTokenStore(this._tokenStoreOptions);
|
|
494
544
|
return this._ownedProjectsCache.onChange([tokenStore], (projects) => {
|
|
495
545
|
callback(projects.map((j) => this._projectAdminFromJson(j, this._createAdminInterface(j.id, tokenStore), () => this._refreshOwnedProjects(tokenStore))));
|
|
496
546
|
});
|
|
497
547
|
}
|
|
498
|
-
async
|
|
548
|
+
async _createProject(newProject) {
|
|
499
549
|
this._ensureInternalProject();
|
|
500
550
|
const tokenStore = getTokenStore(this._tokenStoreOptions);
|
|
501
551
|
const json = await this._interface.createProject(newProject, tokenStore);
|
|
@@ -620,7 +670,7 @@ class _StackServerAppImpl extends _StackClientAppImpl {
|
|
|
620
670
|
return null;
|
|
621
671
|
const app = this;
|
|
622
672
|
const nonCurrentServerUser = this._serverUserFromJson(json);
|
|
623
|
-
const
|
|
673
|
+
const currentUser = {
|
|
624
674
|
...nonCurrentServerUser,
|
|
625
675
|
tokenStore,
|
|
626
676
|
async delete() {
|
|
@@ -644,10 +694,31 @@ class _StackServerAppImpl extends _StackClientAppImpl {
|
|
|
644
694
|
},
|
|
645
695
|
updatePassword(options) {
|
|
646
696
|
return app._updatePassword(options, tokenStore);
|
|
647
|
-
}
|
|
697
|
+
},
|
|
648
698
|
};
|
|
649
|
-
|
|
650
|
-
|
|
699
|
+
if (this.isInternalProject()) {
|
|
700
|
+
const internalUser = {
|
|
701
|
+
...currentUser,
|
|
702
|
+
createProject(newProject) {
|
|
703
|
+
return app._createProject(newProject);
|
|
704
|
+
},
|
|
705
|
+
listOwnedProjects() {
|
|
706
|
+
return app._listOwnedProjects();
|
|
707
|
+
},
|
|
708
|
+
useOwnedProjects() {
|
|
709
|
+
return app._useOwnedProjects();
|
|
710
|
+
},
|
|
711
|
+
onOwnedProjectsChange(callback) {
|
|
712
|
+
return app._onOwnedProjectsChange(callback);
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
Object.freeze(internalUser);
|
|
716
|
+
return internalUser;
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
Object.freeze(currentUser);
|
|
720
|
+
return currentUser;
|
|
721
|
+
}
|
|
651
722
|
}
|
|
652
723
|
_serverUserToJson(user) {
|
|
653
724
|
return {
|
|
@@ -661,6 +732,9 @@ class _StackServerAppImpl extends _StackClientAppImpl {
|
|
|
661
732
|
clientMetadata: user.clientMetadata,
|
|
662
733
|
serverMetadata: user.serverMetadata,
|
|
663
734
|
authMethod: user.authMethod,
|
|
735
|
+
hasPassword: user.hasPassword,
|
|
736
|
+
authWithEmail: user.authWithEmail,
|
|
737
|
+
oauthProviders: user.oauthProviders,
|
|
664
738
|
};
|
|
665
739
|
}
|
|
666
740
|
async getServerUser() {
|
|
@@ -36,6 +36,10 @@ export declare const Components: {
|
|
|
36
36
|
readonly CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
37
37
|
readonly CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
readonly CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
readonly Tabs: React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
readonly TabsList: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
readonly TabsContent: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
readonly TabsTrigger: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
39
43
|
};
|
|
40
44
|
export type ComponentConfig = {
|
|
41
45
|
components?: Partial<typeof Components>;
|
|
@@ -75,8 +79,11 @@ export declare function useComponents(): {
|
|
|
75
79
|
readonly CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
76
80
|
readonly CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
77
81
|
readonly CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
readonly Tabs: React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
+
readonly TabsList: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
readonly TabsContent: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
readonly TabsTrigger: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
78
86
|
};
|
|
79
87
|
export declare function StackComponentProvider(props: {
|
|
80
88
|
children?: React.ReactNode;
|
|
81
89
|
} & ComponentConfig): import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
//# sourceMappingURL=component-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-provider.d.ts","sourceRoot":"","sources":["../../src/providers/component-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"component-provider.d.ts","sourceRoot":"","sources":["../../src/providers/component-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAiB/C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bb,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,OAAO,UAAU,CAAC,CAAC;CACzC,CAAA;AAID,wBAAgB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM5B;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,eAAe,2CAM7F"}
|
|
@@ -13,6 +13,7 @@ import { Popover, PopoverTrigger, PopoverContent } from '../components-core/popo
|
|
|
13
13
|
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, } from '../components-core/dropdown';
|
|
14
14
|
import { Avatar, AvatarFallback, AvatarImage } from '../components-core/avatar';
|
|
15
15
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../components-core/collapsible';
|
|
16
|
+
import { Tabs, TabsList, TabsContent, TabsTrigger } from '../components-core/tabs';
|
|
16
17
|
export const Components = {
|
|
17
18
|
Input,
|
|
18
19
|
Button,
|
|
@@ -40,6 +41,10 @@ export const Components = {
|
|
|
40
41
|
CardHeader,
|
|
41
42
|
CardContent,
|
|
42
43
|
CardFooter,
|
|
44
|
+
Tabs,
|
|
45
|
+
TabsList,
|
|
46
|
+
TabsContent,
|
|
47
|
+
TabsTrigger,
|
|
43
48
|
};
|
|
44
49
|
const ComponentContext = createContext(undefined);
|
|
45
50
|
export function useComponents() {
|
|
@@ -8,10 +8,13 @@ export declare const defaultComponents: {
|
|
|
8
8
|
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | undefined;
|
|
9
9
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
10
10
|
} & Omit<import("react").HTMLProps<HTMLParagraphElement>, "size">, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
11
|
-
Separator: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-separator").SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<
|
|
11
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-separator").SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Tabs: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
TabsList: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-tabs").TabsListProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
TabsTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-tabs").TabsTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
TabsContent: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-tabs").TabsContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
16
|
};
|
|
13
17
|
export declare function StackJoyTheme(props: {
|
|
14
18
|
theme?: ThemeConfig;
|
|
15
19
|
children?: React.ReactNode;
|
|
16
20
|
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
//# sourceMappingURL=joy-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joy-provider.d.ts","sourceRoot":"","sources":["../../src/providers/joy-provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"joy-provider.d.ts","sourceRoot":"","sources":["../../src/providers/joy-provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAS7B,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAiBxF"}
|
|
@@ -6,11 +6,16 @@ import { Button } from '../components-core-joy/button';
|
|
|
6
6
|
import { Input } from '../components-core-joy/input';
|
|
7
7
|
import { Text } from '../components-core-joy/text';
|
|
8
8
|
import { Separator } from '../components-core-joy/separator';
|
|
9
|
+
import { Tabs, TabsList, TabsTrigger, TabsContent } from '../components-core-joy/tabs';
|
|
9
10
|
export const defaultComponents = {
|
|
10
11
|
Button,
|
|
11
12
|
Input,
|
|
12
13
|
Text,
|
|
13
14
|
Separator,
|
|
15
|
+
Tabs,
|
|
16
|
+
TabsList,
|
|
17
|
+
TabsTrigger,
|
|
18
|
+
TabsContent,
|
|
14
19
|
};
|
|
15
20
|
export function StackJoyTheme(props) {
|
|
16
21
|
const { mode, systemMode, setMode } = useColorScheme();
|
|
@@ -8,4 +8,3 @@ export declare function StackTheme({ theme, children, colorModeConfig, }: {
|
|
|
8
8
|
theme?: DesignConfig & ComponentConfig;
|
|
9
9
|
colorModeConfig?: Omit<ComponentProps<typeof NextThemeProvider>, "themes" | "children">;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=theme-provider.d.ts.map
|
package/dist/utils/email.d.ts
CHANGED
package/dist/utils/next.d.ts
CHANGED
package/dist/utils/url.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@radix-ui/react-separator": "^1.0.3",
|
|
20
|
+
"@radix-ui/react-tabs": "^1.0.4",
|
|
19
21
|
"@radix-ui/react-avatar": "^1.0.4",
|
|
20
22
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
21
23
|
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
22
24
|
"@radix-ui/react-label": "^2.0.2",
|
|
23
25
|
"@radix-ui/react-popover": "^1.0.7",
|
|
24
|
-
"@radix-ui/react-separator": "^1.0.3",
|
|
25
26
|
"color": "^4.2.3",
|
|
26
27
|
"js-cookie": "^3.0.5",
|
|
27
28
|
"next-themes": "^0.2.1",
|
|
@@ -30,8 +31,8 @@
|
|
|
30
31
|
"server-only": "^0.0.1",
|
|
31
32
|
"styled-components": "^6.1.8",
|
|
32
33
|
"tailwindcss-scoped-preflight": "^2.1.0",
|
|
33
|
-
"@stackframe/stack-sc": "1.
|
|
34
|
-
"@stackframe/stack-shared": "2.
|
|
34
|
+
"@stackframe/stack-sc": "1.4.0",
|
|
35
|
+
"@stackframe/stack-shared": "2.3.0"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"@mui/joy": "^5.0.0-beta.30",
|