@stackframe/stack 2.3.5 → 2.3.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/components/card-frame.d.mts +9 -0
- package/dist/components/card-frame.d.ts +8 -5
- package/dist/components/card-frame.js +58 -23
- package/dist/components/credential-sign-in.d.mts +5 -0
- package/dist/components/credential-sign-in.d.ts +5 -1
- package/dist/components/credential-sign-in.js +109 -41
- package/dist/components/credential-sign-up.d.mts +5 -0
- package/dist/components/credential-sign-up.d.ts +5 -1
- package/dist/components/credential-sign-up.js +140 -62
- package/dist/components/forgot-password.d.mts +7 -0
- package/dist/components/forgot-password.d.ts +6 -2
- package/dist/components/forgot-password.js +83 -26
- package/dist/components/form-warning.d.mts +7 -0
- package/dist/components/form-warning.d.ts +6 -2
- package/dist/components/form-warning.js +34 -8
- package/dist/components/magic-link-sign-in.d.mts +5 -0
- package/dist/components/magic-link-sign-in.d.ts +5 -1
- package/dist/components/magic-link-sign-in.js +89 -31
- package/dist/components/message-card.d.mts +10 -0
- package/dist/components/message-card.d.ts +8 -4
- package/dist/components/message-card.js +45 -6
- package/dist/components/oauth-button.d.mts +8 -0
- package/dist/components/oauth-button.d.ts +6 -2
- package/dist/components/oauth-button.js +142 -63
- package/dist/components/oauth-group.d.mts +7 -0
- package/dist/components/oauth-group.d.ts +6 -2
- package/dist/components/oauth-group.js +46 -8
- package/dist/components/password-field.d.mts +5 -0
- package/dist/components/password-field.d.ts +5 -3
- package/dist/components/password-field.js +111 -41
- package/dist/components/password-reset-inner.d.mts +8 -0
- package/dist/components/password-reset-inner.d.ts +6 -2
- package/dist/components/password-reset-inner.js +120 -58
- package/dist/components/redirect-message-card.d.mts +8 -0
- package/dist/components/redirect-message-card.d.ts +6 -2
- package/dist/components/redirect-message-card.js +110 -58
- package/dist/components/separator-with-text.d.mts +7 -0
- package/dist/components/separator-with-text.d.ts +6 -2
- package/dist/components/separator-with-text.js +35 -5
- package/dist/components/user-avatar.d.mts +13 -0
- package/dist/components/user-avatar.d.ts +11 -3
- package/dist/components/user-avatar.js +34 -6
- package/dist/components/user-button.d.mts +15 -0
- package/dist/components/user-button.d.ts +12 -3
- package/dist/components/user-button.js +156 -26
- package/dist/components-core/avatar.d.mts +8 -0
- package/dist/components-core/avatar.d.ts +7 -5
- package/dist/components-core/avatar.js +73 -18
- package/dist/components-core/button.d.mts +12 -0
- package/dist/components-core/button.d.ts +8 -6
- package/dist/components-core/button.js +177 -113
- package/dist/components-core/card.d.mts +8 -0
- package/dist/components-core/card.d.ts +4 -2
- package/dist/components-core/card.js +73 -22
- package/dist/components-core/collapsible.d.mts +8 -0
- package/dist/components-core/collapsible.d.ts +8 -6
- package/dist/components-core/collapsible.js +48 -5
- package/dist/components-core/container.d.mts +8 -0
- package/dist/components-core/container.d.ts +5 -3
- package/dist/components-core/container.js +61 -11
- package/dist/components-core/dropdown.d.mts +15 -0
- package/dist/components-core/dropdown.d.ts +10 -8
- package/dist/components-core/dropdown.js +108 -36
- package/dist/components-core/index.d.mts +59 -0
- package/dist/components-core/index.d.ts +51 -40
- package/dist/components-core/index.js +144 -46
- package/dist/components-core/input.d.mts +6 -0
- package/dist/components-core/input.d.ts +5 -3
- package/dist/components-core/input.js +97 -28
- package/dist/components-core/label.d.mts +6 -0
- package/dist/components-core/label.d.ts +5 -3
- package/dist/components-core/label.js +65 -15
- package/dist/components-core/link.d.mts +10 -0
- package/dist/components-core/link.d.ts +7 -6
- package/dist/components-core/link.js +72 -18
- package/dist/components-core/loading-indicator.d.mts +13 -0
- package/dist/components-core/loading-indicator.d.ts +11 -4
- package/dist/components-core/loading-indicator.js +46 -6
- package/dist/components-core/popover.d.mts +8 -0
- package/dist/components-core/popover.d.ts +8 -6
- package/dist/components-core/popover.js +72 -16
- package/dist/components-core/separator.d.mts +6 -0
- package/dist/components-core/separator.d.ts +5 -3
- package/dist/components-core/separator.js +66 -16
- package/dist/components-core/skeleton.d.mts +7 -0
- package/dist/components-core/skeleton.d.ts +5 -3
- package/dist/components-core/skeleton.js +75 -21
- package/dist/components-core/tabs.d.mts +9 -0
- package/dist/components-core/tabs.d.ts +8 -6
- package/dist/components-core/tabs.js +87 -20
- package/dist/components-core/text.d.mts +10 -0
- package/dist/components-core/text.d.ts +5 -3
- package/dist/components-core/text.js +95 -40
- package/dist/components-core-joy/button.d.mts +6 -0
- package/dist/components-core-joy/button.d.ts +6 -2
- package/dist/components-core-joy/button.js +86 -28
- package/dist/components-core-joy/input.d.mts +5 -0
- package/dist/components-core-joy/input.d.ts +5 -2
- package/dist/components-core-joy/input.js +51 -6
- package/dist/components-core-joy/separator.d.mts +6 -0
- package/dist/components-core-joy/separator.d.ts +6 -2
- package/dist/components-core-joy/separator.js +50 -6
- package/dist/components-core-joy/tabs.d.mts +9 -0
- package/dist/components-core-joy/tabs.d.ts +9 -5
- package/dist/components-core-joy/tabs.js +62 -16
- package/dist/components-core-joy/text.d.mts +9 -0
- package/dist/components-core-joy/text.d.ts +6 -3
- package/dist/components-core-joy/text.js +68 -28
- package/dist/components-page/account-settings.d.mts +7 -0
- package/dist/components-page/account-settings.d.ts +6 -2
- package/dist/components-page/account-settings.js +213 -81
- package/dist/components-page/auth-page.d.mts +8 -0
- package/dist/components-page/auth-page.d.ts +6 -2
- package/dist/components-page/auth-page.js +79 -19
- package/dist/components-page/email-verification.d.mts +8 -0
- package/dist/components-page/email-verification.d.ts +6 -2
- package/dist/components-page/email-verification.js +65 -28
- package/dist/components-page/forgot-password.d.mts +7 -0
- package/dist/components-page/forgot-password.d.ts +6 -2
- package/dist/components-page/forgot-password.js +64 -20
- package/dist/components-page/magic-link-callback.d.mts +8 -0
- package/dist/components-page/magic-link-callback.d.ts +6 -2
- package/dist/components-page/magic-link-callback.js +72 -34
- package/dist/components-page/oauth-callback.d.mts +5 -0
- package/dist/components-page/oauth-callback.d.ts +5 -1
- package/dist/components-page/oauth-callback.js +52 -16
- package/dist/components-page/password-reset.d.mts +8 -0
- package/dist/components-page/password-reset.d.ts +6 -2
- package/dist/components-page/password-reset.js +70 -34
- package/dist/components-page/sign-in.d.mts +7 -0
- package/dist/components-page/sign-in.d.ts +6 -2
- package/dist/components-page/sign-in.js +41 -5
- package/dist/components-page/sign-out.d.mts +5 -0
- package/dist/components-page/sign-out.d.ts +5 -1
- package/dist/components-page/sign-out.js +47 -11
- package/dist/components-page/sign-up.d.mts +7 -0
- package/dist/components-page/sign-up.d.ts +6 -2
- package/dist/components-page/sign-up.js +41 -5
- package/dist/components-page/stack-handler.d.mts +16 -0
- package/dist/components-page/stack-handler.d.ts +11 -3
- package/dist/components-page/stack-handler.js +102 -64
- package/dist/esm/components/card-frame.js +39 -0
- package/dist/esm/components/credential-sign-in.js +82 -0
- package/dist/esm/components/credential-sign-up.js +114 -0
- package/dist/esm/components/forgot-password.js +55 -0
- package/dist/esm/components/form-warning.js +15 -0
- package/dist/esm/components/magic-link-sign-in.js +61 -0
- package/dist/esm/components/message-card.js +16 -0
- package/dist/esm/components/oauth-button.js +124 -0
- package/dist/esm/components/oauth-group.js +17 -0
- package/dist/esm/components/password-field.js +82 -0
- package/dist/esm/components/password-reset-inner.js +93 -0
- package/dist/esm/components/redirect-message-card.js +83 -0
- package/dist/esm/components/separator-with-text.js +16 -0
- package/dist/esm/components/user-avatar.js +14 -0
- package/dist/esm/components/user-button.js +133 -0
- package/dist/esm/components-core/avatar.js +56 -0
- package/dist/esm/components-core/button.js +165 -0
- package/dist/esm/components-core/card.js +51 -0
- package/dist/esm/components-core/collapsible.js +13 -0
- package/dist/esm/components-core/container.js +35 -0
- package/dist/esm/components-core/dropdown.js +106 -0
- package/dist/esm/components-core/index.js +93 -0
- package/dist/esm/components-core/input.js +80 -0
- package/dist/esm/components-core/label.js +38 -0
- package/dist/esm/components-core/link.js +38 -0
- package/dist/esm/components-core/loading-indicator.js +27 -0
- package/dist/esm/components-core/popover.js +43 -0
- package/dist/esm/components-core/separator.js +36 -0
- package/dist/esm/components-core/skeleton.js +52 -0
- package/dist/esm/components-core/tabs.js +79 -0
- package/dist/esm/components-core/text.js +63 -0
- package/dist/esm/components-core-joy/button.js +53 -0
- package/dist/esm/components-core-joy/input.js +18 -0
- package/dist/esm/components-core-joy/separator.js +17 -0
- package/dist/esm/components-core-joy/tabs.js +29 -0
- package/dist/esm/components-core-joy/text.js +35 -0
- package/dist/esm/components-page/account-settings.js +197 -0
- package/dist/esm/components-page/auth-page.js +50 -0
- package/dist/esm/components-page/email-verification.js +36 -0
- package/dist/esm/components-page/forgot-password.js +35 -0
- package/dist/esm/components-page/magic-link-callback.js +43 -0
- package/dist/esm/components-page/oauth-callback.js +23 -0
- package/dist/esm/components-page/password-reset.js +42 -0
- package/dist/esm/components-page/sign-in.js +12 -0
- package/dist/esm/components-page/sign-out.js +18 -0
- package/dist/esm/components-page/sign-up.js +12 -0
- package/dist/esm/components-page/stack-handler.js +75 -0
- package/dist/esm/index.js +47 -0
- package/dist/esm/joy.js +5 -0
- package/dist/esm/lib/auth.js +62 -0
- package/dist/esm/lib/cookie.js +185 -0
- package/dist/esm/lib/hooks.js +29 -0
- package/dist/esm/lib/stack-app.js +940 -0
- package/dist/esm/providers/component-provider.js +76 -0
- package/dist/esm/providers/design-provider.js +36 -0
- package/dist/esm/providers/joy-provider.js +35 -0
- package/dist/esm/providers/stack-provider-client.js +31 -0
- package/dist/esm/providers/stack-provider.js +21 -0
- package/dist/esm/providers/styled-components-registry.js +24 -0
- package/dist/esm/providers/theme-provider.js +22 -0
- package/dist/esm/utils/browser-script.js +25 -0
- package/dist/esm/utils/constants.js +34 -0
- package/dist/esm/utils/email.js +10 -0
- package/dist/esm/utils/next.js +7 -0
- package/dist/esm/utils/url.js +21 -0
- package/dist/index.d.mts +37 -0
- package/dist/index.d.ts +37 -22
- package/dist/index.js +106 -21
- package/dist/joy.d.mts +16 -0
- package/dist/joy.d.ts +16 -1
- package/dist/joy.js +30 -1
- package/dist/lib/auth.d.mts +11 -0
- package/dist/lib/auth.d.ts +8 -4
- package/dist/lib/auth.js +83 -57
- package/dist/lib/cookie.d.mts +14 -0
- package/dist/lib/cookie.d.ts +8 -6
- package/dist/lib/cookie.js +217 -45
- package/dist/lib/hooks.d.mts +35 -0
- package/dist/lib/hooks.d.ts +14 -8
- package/dist/lib/hooks.js +53 -28
- package/dist/lib/stack-app.d.mts +227 -0
- package/dist/lib/stack-app.d.ts +43 -41
- package/dist/lib/stack-app.js +937 -849
- package/dist/providers/component-provider.d.mts +113 -0
- package/dist/providers/component-provider.d.ts +95 -77
- package/dist/providers/component-provider.js +92 -58
- package/dist/providers/design-provider.d.mts +34 -0
- package/dist/providers/design-provider.d.ts +16 -21
- package/dist/providers/design-provider.js +57 -58
- package/dist/providers/joy-provider.d.mts +36 -0
- package/dist/providers/joy-provider.d.ts +30 -14
- package/dist/providers/joy-provider.js +58 -30
- package/dist/providers/stack-provider-client.d.mts +20 -0
- package/dist/providers/stack-provider-client.d.ts +15 -8
- package/dist/providers/stack-provider-client.js +64 -20
- package/dist/providers/stack-provider.d.mts +14 -0
- package/dist/providers/stack-provider.d.ts +13 -5
- package/dist/providers/stack-provider.js +39 -8
- package/dist/providers/styled-components-registry.d.mts +8 -0
- package/dist/providers/styled-components-registry.d.ts +8 -4
- package/dist/providers/styled-components-registry.js +43 -17
- package/dist/providers/theme-provider.d.mts +22 -0
- package/dist/providers/theme-provider.d.ts +21 -9
- package/dist/providers/theme-provider.js +55 -19
- package/dist/utils/browser-script.d.mts +5 -0
- package/dist/utils/browser-script.d.ts +5 -0
- package/dist/utils/browser-script.js +50 -0
- package/dist/utils/constants.d.mts +48 -0
- package/dist/utils/constants.d.ts +11 -9
- package/dist/utils/constants.js +66 -21
- package/dist/utils/email.d.mts +3 -0
- package/dist/utils/email.d.ts +3 -1
- package/dist/utils/email.js +44 -6
- package/dist/utils/next.d.mts +3 -0
- package/dist/utils/next.d.ts +3 -1
- package/dist/utils/next.js +31 -3
- package/dist/utils/url.d.mts +4 -0
- package/dist/utils/url.d.ts +4 -2
- package/dist/utils/url.js +44 -13
- package/package.json +20 -10
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { DesignConfig } from './design-provider.mjs';
|
|
4
|
+
import { ComponentConfig } from './component-provider.mjs';
|
|
5
|
+
import '@radix-ui/react-tabs';
|
|
6
|
+
import '@radix-ui/react-collapsible';
|
|
7
|
+
import '@radix-ui/react-avatar';
|
|
8
|
+
import '@radix-ui/react-dropdown-menu';
|
|
9
|
+
import '@radix-ui/react-popover';
|
|
10
|
+
import 'url';
|
|
11
|
+
import '@radix-ui/react-label';
|
|
12
|
+
import '@radix-ui/react-separator';
|
|
13
|
+
import '../components-core/button.mjs';
|
|
14
|
+
import '../components-core/container.mjs';
|
|
15
|
+
|
|
16
|
+
type ThemeConfig = DesignConfig & ComponentConfig;
|
|
17
|
+
declare function StackTheme({ theme, children, }: {
|
|
18
|
+
children?: React__default.ReactNode;
|
|
19
|
+
theme?: DesignConfig & ComponentConfig;
|
|
20
|
+
}): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { StackTheme, type ThemeConfig };
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { DesignConfig } from './design-provider.js';
|
|
4
|
+
import { ComponentConfig } from './component-provider.js';
|
|
5
|
+
import '@radix-ui/react-tabs';
|
|
6
|
+
import '@radix-ui/react-collapsible';
|
|
7
|
+
import '@radix-ui/react-avatar';
|
|
8
|
+
import '@radix-ui/react-dropdown-menu';
|
|
9
|
+
import '@radix-ui/react-popover';
|
|
10
|
+
import 'url';
|
|
11
|
+
import '@radix-ui/react-label';
|
|
12
|
+
import '@radix-ui/react-separator';
|
|
13
|
+
import '../components-core/button.js';
|
|
14
|
+
import '../components-core/container.js';
|
|
15
|
+
|
|
16
|
+
type ThemeConfig = DesignConfig & ComponentConfig;
|
|
17
|
+
declare function StackTheme({ theme, children, }: {
|
|
18
|
+
children?: React__default.ReactNode;
|
|
8
19
|
theme?: DesignConfig & ComponentConfig;
|
|
9
|
-
|
|
10
|
-
|
|
20
|
+
}): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { StackTheme, type ThemeConfig };
|
|
@@ -1,20 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
|
|
32
|
+
// src/providers/theme-provider.tsx
|
|
33
|
+
var theme_provider_exports = {};
|
|
34
|
+
__export(theme_provider_exports, {
|
|
35
|
+
StackTheme: () => StackTheme
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(theme_provider_exports);
|
|
38
|
+
var import_design_provider = require("./design-provider");
|
|
39
|
+
var import_component_provider = require("./component-provider");
|
|
40
|
+
var import_styled_components_registry = __toESM(require("./styled-components-registry"));
|
|
41
|
+
var import_browser_script = require("../utils/browser-script");
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
function StackTheme({
|
|
44
|
+
theme,
|
|
45
|
+
children
|
|
46
|
+
}) {
|
|
47
|
+
const componentProps = { components: theme?.components };
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled_components_registry.default, { children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_browser_script.BrowserScript, {}),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design_provider.StackDesignProvider, { ...theme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_component_provider.StackComponentProvider, { ...componentProps, children }) })
|
|
51
|
+
] });
|
|
20
52
|
}
|
|
53
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
+
0 && (module.exports = {
|
|
55
|
+
StackTheme
|
|
56
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/browser-script.tsx
|
|
21
|
+
var browser_script_exports = {};
|
|
22
|
+
__export(browser_script_exports, {
|
|
23
|
+
BrowserScript: () => BrowserScript
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(browser_script_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var script = () => {
|
|
28
|
+
const observer = new MutationObserver((mutations) => {
|
|
29
|
+
mutations.forEach((mutation) => {
|
|
30
|
+
if (mutation.attributeName === "data-joy-color-scheme") {
|
|
31
|
+
const joyColorScheme = document.documentElement.getAttribute("data-joy-color-scheme");
|
|
32
|
+
if (!joyColorScheme) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
document.documentElement.setAttribute("data-theme", joyColorScheme);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
observer.observe(document.documentElement, {
|
|
40
|
+
attributes: true,
|
|
41
|
+
attributeFilter: ["data-joy-color-scheme"]
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
function BrowserScript() {
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("script", { dangerouslySetInnerHTML: { __html: `(${script.toString()})()` } });
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
BrowserScript
|
|
50
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare const FONT_SIZES: {
|
|
2
|
+
xs: string;
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
xl: string;
|
|
7
|
+
};
|
|
8
|
+
declare const LINE_HEIGHTS: {
|
|
9
|
+
xs: string;
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
};
|
|
15
|
+
declare const FONT_FAMILY = "ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"";
|
|
16
|
+
declare const PRIMARY_FONT_COLORS: {
|
|
17
|
+
dark: string;
|
|
18
|
+
light: string;
|
|
19
|
+
};
|
|
20
|
+
declare const SECONDARY_FONT_COLORS: {
|
|
21
|
+
dark: string;
|
|
22
|
+
light: string;
|
|
23
|
+
};
|
|
24
|
+
declare const SELECTED_BACKGROUND_COLORS: {
|
|
25
|
+
dark: string;
|
|
26
|
+
light: string;
|
|
27
|
+
};
|
|
28
|
+
declare const LINK_COLORS: {
|
|
29
|
+
dark: string;
|
|
30
|
+
light: string;
|
|
31
|
+
};
|
|
32
|
+
declare const BORDER_RADIUS = "0.375rem";
|
|
33
|
+
declare const DEFAULT_COLORS: {
|
|
34
|
+
readonly dark: {
|
|
35
|
+
readonly primaryColor: "#570df8";
|
|
36
|
+
readonly secondaryColor: "#404040";
|
|
37
|
+
readonly backgroundColor: "black";
|
|
38
|
+
readonly neutralColor: "#27272a";
|
|
39
|
+
};
|
|
40
|
+
readonly light: {
|
|
41
|
+
readonly primaryColor: "#570df8";
|
|
42
|
+
readonly secondaryColor: "#e0e0e0";
|
|
43
|
+
readonly backgroundColor: "white";
|
|
44
|
+
readonly neutralColor: "#e4e4e7";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { BORDER_RADIUS, DEFAULT_COLORS, FONT_FAMILY, FONT_SIZES, LINE_HEIGHTS, LINK_COLORS, PRIMARY_FONT_COLORS, SECONDARY_FONT_COLORS, SELECTED_BACKGROUND_COLORS };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
declare const FONT_SIZES: {
|
|
2
2
|
xs: string;
|
|
3
3
|
sm: string;
|
|
4
4
|
md: string;
|
|
5
5
|
lg: string;
|
|
6
6
|
xl: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
declare const LINE_HEIGHTS: {
|
|
9
9
|
xs: string;
|
|
10
10
|
sm: string;
|
|
11
11
|
md: string;
|
|
12
12
|
lg: string;
|
|
13
13
|
xl: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
declare const FONT_FAMILY = "ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"";
|
|
16
|
+
declare const PRIMARY_FONT_COLORS: {
|
|
17
17
|
dark: string;
|
|
18
18
|
light: string;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
declare const SECONDARY_FONT_COLORS: {
|
|
21
21
|
dark: string;
|
|
22
22
|
light: string;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
declare const SELECTED_BACKGROUND_COLORS: {
|
|
25
25
|
dark: string;
|
|
26
26
|
light: string;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
declare const LINK_COLORS: {
|
|
29
29
|
dark: string;
|
|
30
30
|
light: string;
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
declare const BORDER_RADIUS = "0.375rem";
|
|
33
|
+
declare const DEFAULT_COLORS: {
|
|
34
34
|
readonly dark: {
|
|
35
35
|
readonly primaryColor: "#570df8";
|
|
36
36
|
readonly secondaryColor: "#404040";
|
|
@@ -44,3 +44,5 @@ export declare const DEFAULT_COLORS: {
|
|
|
44
44
|
readonly neutralColor: "#e4e4e7";
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
+
|
|
48
|
+
export { BORDER_RADIUS, DEFAULT_COLORS, FONT_FAMILY, FONT_SIZES, LINE_HEIGHTS, LINK_COLORS, PRIMARY_FONT_COLORS, SECONDARY_FONT_COLORS, SELECTED_BACKGROUND_COLORS };
|
package/dist/utils/constants.js
CHANGED
|
@@ -1,22 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export const DEFAULT_COLORS = {
|
|
10
|
-
dark: {
|
|
11
|
-
primaryColor: '#570df8',
|
|
12
|
-
secondaryColor: '#404040',
|
|
13
|
-
backgroundColor: 'black',
|
|
14
|
-
neutralColor: '#27272a',
|
|
15
|
-
},
|
|
16
|
-
light: {
|
|
17
|
-
primaryColor: '#570df8',
|
|
18
|
-
secondaryColor: '#e0e0e0',
|
|
19
|
-
backgroundColor: 'white',
|
|
20
|
-
neutralColor: '#e4e4e7',
|
|
21
|
-
},
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
9
|
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/constants.tsx
|
|
21
|
+
var constants_exports = {};
|
|
22
|
+
__export(constants_exports, {
|
|
23
|
+
BORDER_RADIUS: () => BORDER_RADIUS,
|
|
24
|
+
DEFAULT_COLORS: () => DEFAULT_COLORS,
|
|
25
|
+
FONT_FAMILY: () => FONT_FAMILY,
|
|
26
|
+
FONT_SIZES: () => FONT_SIZES,
|
|
27
|
+
LINE_HEIGHTS: () => LINE_HEIGHTS,
|
|
28
|
+
LINK_COLORS: () => LINK_COLORS,
|
|
29
|
+
PRIMARY_FONT_COLORS: () => PRIMARY_FONT_COLORS,
|
|
30
|
+
SECONDARY_FONT_COLORS: () => SECONDARY_FONT_COLORS,
|
|
31
|
+
SELECTED_BACKGROUND_COLORS: () => SELECTED_BACKGROUND_COLORS
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(constants_exports);
|
|
34
|
+
var FONT_SIZES = { "xs": "0.75rem", "sm": "0.875rem", "md": "1rem", "lg": "1.25rem", "xl": "1.5rem" };
|
|
35
|
+
var LINE_HEIGHTS = { "xs": "1rem", "sm": "1.25rem", "md": "1.5rem", "lg": "1.75rem", "xl": "2rem" };
|
|
36
|
+
var FONT_FAMILY = 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
|
|
37
|
+
var PRIMARY_FONT_COLORS = { "dark": "white", "light": "black" };
|
|
38
|
+
var SECONDARY_FONT_COLORS = { "dark": "#a8a8a8", "light": "#737373" };
|
|
39
|
+
var SELECTED_BACKGROUND_COLORS = { "dark": "rgba(255, 255, 255, 0.1)", "light": "rgba(0, 0, 0, 0.04)" };
|
|
40
|
+
var LINK_COLORS = { "dark": "#fff", "light": "#000" };
|
|
41
|
+
var BORDER_RADIUS = "0.375rem";
|
|
42
|
+
var DEFAULT_COLORS = {
|
|
43
|
+
dark: {
|
|
44
|
+
primaryColor: "#570df8",
|
|
45
|
+
secondaryColor: "#404040",
|
|
46
|
+
backgroundColor: "black",
|
|
47
|
+
neutralColor: "#27272a"
|
|
48
|
+
},
|
|
49
|
+
light: {
|
|
50
|
+
primaryColor: "#570df8",
|
|
51
|
+
secondaryColor: "#e0e0e0",
|
|
52
|
+
backgroundColor: "white",
|
|
53
|
+
neutralColor: "#e4e4e7"
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
BORDER_RADIUS,
|
|
59
|
+
DEFAULT_COLORS,
|
|
60
|
+
FONT_FAMILY,
|
|
61
|
+
FONT_SIZES,
|
|
62
|
+
LINE_HEIGHTS,
|
|
63
|
+
LINK_COLORS,
|
|
64
|
+
PRIMARY_FONT_COLORS,
|
|
65
|
+
SECONDARY_FONT_COLORS,
|
|
66
|
+
SELECTED_BACKGROUND_COLORS
|
|
67
|
+
});
|
package/dist/utils/email.d.ts
CHANGED
package/dist/utils/email.js
CHANGED
|
@@ -1,7 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/utils/email.tsx
|
|
31
|
+
var email_exports = {};
|
|
32
|
+
__export(email_exports, {
|
|
33
|
+
validateEmail: () => validateEmail
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(email_exports);
|
|
36
|
+
var yup = __toESM(require("yup"));
|
|
37
|
+
function validateEmail(email) {
|
|
38
|
+
if (typeof email !== "string")
|
|
39
|
+
throw new Error("Email must be a string");
|
|
40
|
+
return yup.string().email().isValidSync(email);
|
|
6
41
|
}
|
|
7
|
-
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
validateEmail
|
|
45
|
+
});
|
package/dist/utils/next.d.ts
CHANGED
package/dist/utils/next.js
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/next.tsx
|
|
21
|
+
var next_exports = {};
|
|
22
|
+
__export(next_exports, {
|
|
23
|
+
isClient: () => isClient
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(next_exports);
|
|
26
|
+
function isClient() {
|
|
27
|
+
return typeof window !== "undefined";
|
|
4
28
|
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
isClient
|
|
32
|
+
});
|
package/dist/utils/url.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function autoRedirect(): void;
|
|
2
|
+
declare function constructRedirectUrl(redirectUrl: URL | string | undefined): string;
|
|
3
|
+
|
|
4
|
+
export { autoRedirect, constructRedirectUrl };
|
package/dist/utils/url.js
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/url.tsx
|
|
21
|
+
var url_exports = {};
|
|
22
|
+
__export(url_exports, {
|
|
23
|
+
autoRedirect: () => autoRedirect,
|
|
24
|
+
constructRedirectUrl: () => constructRedirectUrl
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(url_exports);
|
|
27
|
+
function autoRedirect() {
|
|
28
|
+
const url = new URL(window.location.href);
|
|
29
|
+
const redirectUrl = url.searchParams.get("auto-redirect-url");
|
|
30
|
+
if (redirectUrl) {
|
|
31
|
+
const urlObject = new URL(redirectUrl);
|
|
32
|
+
if (urlObject.origin !== window.location.origin) {
|
|
33
|
+
throw new Error("auto-redirect-url is not same origin (" + urlObject.origin + " !== " + window.location.origin + ")");
|
|
11
34
|
}
|
|
35
|
+
url.searchParams.delete("auto-redirect-url");
|
|
36
|
+
window.location.replace(urlObject.href);
|
|
37
|
+
}
|
|
12
38
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
39
|
+
function constructRedirectUrl(redirectUrl) {
|
|
40
|
+
const url = redirectUrl ? new URL(redirectUrl, window.location.href) : new URL(window.location.href);
|
|
41
|
+
return url.href.split("#")[0];
|
|
16
42
|
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
autoRedirect,
|
|
46
|
+
constructRedirectUrl
|
|
47
|
+
});
|
package/package.json
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"
|
|
3
|
+
"version": "2.3.8",
|
|
4
|
+
"sideEffects": false,
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"
|
|
8
|
+
"import": {
|
|
9
|
+
"default": "./dist/esm/index.js"
|
|
10
|
+
},
|
|
11
|
+
"require": {
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
9
14
|
},
|
|
10
15
|
"./joy": {
|
|
11
16
|
"types": "./dist/joy.d.ts",
|
|
12
|
-
"
|
|
17
|
+
"import": {
|
|
18
|
+
"default": "./dist/esm/joy.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"default": "./dist/joy.js"
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
},
|
|
15
25
|
"homepage": "https://stack-auth.com",
|
|
@@ -27,15 +37,13 @@
|
|
|
27
37
|
"@radix-ui/react-popover": "^1.0.7",
|
|
28
38
|
"color": "^4.2.3",
|
|
29
39
|
"js-cookie": "^3.0.5",
|
|
30
|
-
"next-themes": "^0.2.1",
|
|
31
40
|
"oauth4webapi": "^2.10.3",
|
|
32
41
|
"react-icons": "^5.0.1",
|
|
33
42
|
"server-only": "^0.0.1",
|
|
34
43
|
"styled-components": "^6.1.8",
|
|
35
|
-
"tailwindcss-scoped-preflight": "^2.1.0",
|
|
36
44
|
"yup": "^1.4.0",
|
|
37
45
|
"@stackframe/stack-sc": "1.4.1",
|
|
38
|
-
"@stackframe/stack-shared": "2.3.
|
|
46
|
+
"@stackframe/stack-shared": "2.3.6"
|
|
39
47
|
},
|
|
40
48
|
"peerDependencies": {
|
|
41
49
|
"@mui/joy": "^5.0.0-beta.30",
|
|
@@ -50,13 +58,15 @@
|
|
|
50
58
|
"devDependencies": {
|
|
51
59
|
"@types/color": "^3.0.6",
|
|
52
60
|
"@types/js-cookie": "^3.0.6",
|
|
53
|
-
"@types/react": "^18.2.66"
|
|
61
|
+
"@types/react": "^18.2.66",
|
|
62
|
+
"esbuild": "^0.20.2",
|
|
63
|
+
"tsup": "^8.0.2"
|
|
54
64
|
},
|
|
55
65
|
"scripts": {
|
|
56
66
|
"typecheck": "tsc --noEmit",
|
|
57
|
-
"build": "
|
|
67
|
+
"build": "rimraf dist && tsup-node",
|
|
58
68
|
"clean": "rimraf dist && rimraf node_modules",
|
|
59
|
-
"dev": "
|
|
69
|
+
"dev": "rimraf dist && tsup-node --watch",
|
|
60
70
|
"lint": "eslint --ext .tsx,.ts ."
|
|
61
71
|
}
|
|
62
72
|
}
|