@ory/elements-react 1.0.0 → 1.2.0-rc.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/DEVELOPMENT.md +22 -19
- package/dist/client/config.js +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/config.mjs +1 -1
- package/dist/client/config.mjs.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +23590 -1390
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23591 -1391
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +1853 -1675
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +4 -4
- package/dist/theme/default/index.d.ts +4 -4
- package/dist/theme/default/index.js +24101 -1858
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +24097 -1849
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +4 -3
- package/tailwind/generated/variables-processed.json +6 -6
- package/tailwind/generated/variables.css +495 -0
- package/dist/theme/default/tailwind/defaults.d.mts +0 -737
- package/dist/theme/default/tailwind/defaults.d.ts +0 -737
- package/dist/theme/default/tailwind/defaults.js +0 -219
- package/dist/theme/default/tailwind/defaults.js.map +0 -1
- package/dist/theme/default/tailwind/defaults.mjs +0 -196
- package/dist/theme/default/tailwind/defaults.mjs.map +0 -1
- package/tailwind/defaults.ts +0 -34
package/DEVELOPMENT.md
CHANGED
|
@@ -64,32 +64,35 @@ The stories use stub responses
|
|
|
64
64
|
|
|
65
65
|
## Releasing
|
|
66
66
|
|
|
67
|
-
@ory/elements-react and @ory/nextjs
|
|
67
|
+
@ory/elements-react and @ory/nextjs are released using nx releases.
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Preparation:
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Check https://www.npmjs.com/package/@ory/elements-react for the latest released
|
|
72
|
+
version and determine what kind of version you want to release.
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
This is necessary, because of Ory's monorepo setup, and nx needing to push the
|
|
75
|
+
resulting change of `package.json` to master to automatically determine which
|
|
76
|
+
version to release!
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
./scripts/release.sh @ory/elements-react rc # release candidate (-rc.X)
|
|
78
|
-
```
|
|
78
|
+
:::note
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
CHANGELOG.md and dry run outputs. nx also creates git tags and commits, that
|
|
82
|
-
should be commited. The script will do that automatically.
|
|
80
|
+
Ory Internal only: Run these command in a local clone of @ory/elements!
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
:::
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
```shell
|
|
85
|
+
npx nx build @ory/elements-react
|
|
86
|
+
npx nx release -g elements 1.0.1-rc.0 --dry-run
|
|
87
|
+
# if okay:
|
|
88
|
+
npx nx release -g elements 1.0.1-rc.0
|
|
90
89
|
|
|
91
|
-
|
|
90
|
+
# or
|
|
92
91
|
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
npx nx build @ory/nextjs
|
|
93
|
+
npx nx release -g nextjs 1.0.1-rc.0 --dry-run
|
|
94
|
+
# if okay:
|
|
95
|
+
npx nx release -g nextjs 1.0.1-rc.0
|
|
95
96
|
```
|
|
97
|
+
|
|
98
|
+
Don't commit any of the results and just re-set git to the previous commit.
|
package/dist/client/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/config.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This function returns the base URL of the Ory SDK as set by environment variables `NEXT_PUBLIC_ORY_SDK_URL` or `ORY_SDK_URL`.\n */\nexport function orySdkUrl() {\n let baseUrl\n\n if (process.env.NEXT_PUBLIC_ORY_SDK_URL) {\n baseUrl = process.env.NEXT_PUBLIC_ORY_SDK_URL\n }\n\n if (process.env.ORY_SDK_URL) {\n baseUrl = process.env.
|
|
1
|
+
{"version":3,"sources":["../../src/client/config.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This function returns the base URL of the Ory SDK as set by environment variables `NEXT_PUBLIC_ORY_SDK_URL` or `ORY_SDK_URL`.\n */\nexport function orySdkUrl() {\n let baseUrl\n\n if (process.env.NEXT_PUBLIC_ORY_SDK_URL) {\n baseUrl = process.env.NEXT_PUBLIC_ORY_SDK_URL\n }\n\n if (process.env.ORY_SDK_URL) {\n baseUrl = process.env.ORY_SDK_URL\n }\n\n if (!baseUrl) {\n throw new Error(\n \"You need to set environment variable `NEXT_PUBLIC_ORY_SDK_URL` or if you don't use Next.js `ORY_SDK_URL` to your Ory Network SDK URL.\",\n )\n }\n\n return baseUrl.replace(/\\/$/, \"\")\n}\n\n/**\n * This function returns whether the current environment is a production environment.\n */\nexport function isProduction() {\n return (\n [\"production\", \"prod\"].indexOf(\n process.env.VERCEL_ENV ?? process.env.NODE_ENV ?? \"\",\n ) > -1\n )\n}\n\n/**\n * This function returns the Ory SDK URL. If the environment is not production, it tries to guess the SDK URL based on the environment variables, assuming\n * that Ory APIs are proxied through the same domain as the application.\n *\n * Currently, this is only tested for Vercel deployments.\n *\n * @param options - Options for guessing the SDK URL.\n */\nexport function guessPotentiallyProxiedOrySdkUrl(options?: {\n knownProxiedUrl?: string\n}) {\n if (isProduction()) {\n // In production, we use the production custom domain\n return orySdkUrl()\n }\n\n if (process.env.VERCEL_ENV) {\n // We are in vercel\n\n // The domain name of the generated deployment URL. Example: *.vercel.app. The value does not include the protocol scheme https://.\n //\n // This is only available for preview deployments on Vercel.\n if (!isProduction() && process.env.VERCEL_URL) {\n return `https://${process.env.VERCEL_URL}`.replace(/\\/$/, \"\")\n }\n\n // This is sometimes set by the render server.\n if (process.env.__NEXT_PRIVATE_ORIGIN) {\n return process.env.__NEXT_PRIVATE_ORIGIN.replace(/\\/$/, \"\")\n }\n }\n\n // Unable to figure out the SDK URL. Either because we are not using Vercel or because we are on a local machine.\n // Let's try to use the window location.\n if (typeof window !== \"undefined\") {\n return window.location.origin\n }\n\n if (options?.knownProxiedUrl) {\n return options.knownProxiedUrl\n }\n\n // We tried everything. Let's use the SDK URL.\n const final = orySdkUrl()\n console.warn(\n `Unable to determine a suitable SDK URL for setting up the Next.js integration of Ory Elements. Will proceed using default Ory SDK URL \"${final}\". This is likely not what you want for local development and your authentication and login may not work.`,\n )\n\n return final\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,SAAS,YAAY;AAC1B,MAAI;AAEJ,MAAI,QAAQ,IAAI,yBAAyB;AACvC,cAAU,QAAQ,IAAI;AAAA,EACxB;AAEA,MAAI,QAAQ,IAAI,aAAa;AAC3B,cAAU,QAAQ,IAAI;AAAA,EACxB;AAEA,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,SAAO,QAAQ,QAAQ,OAAO,EAAE;AAClC;AAKO,SAAS,eAAe;AA7B/B;AA8BE,SACE,CAAC,cAAc,MAAM,EAAE;AAAA,KACrB,mBAAQ,IAAI,eAAZ,YAA0B,QAAQ,IAAI,aAAtC,YAAkD;AAAA,EACpD,IAAI;AAER;AAUO,SAAS,iCAAiC,SAE9C;AACD,MAAI,aAAa,GAAG;AAElB,WAAO,UAAU;AAAA,EACnB;AAEA,MAAI,QAAQ,IAAI,YAAY;AAM1B,QAAI,CAAC,aAAa,KAAK,QAAQ,IAAI,YAAY;AAC7C,aAAO,WAAW,QAAQ,IAAI,UAAU,GAAG,QAAQ,OAAO,EAAE;AAAA,IAC9D;AAGA,QAAI,QAAQ,IAAI,uBAAuB;AACrC,aAAO,QAAQ,IAAI,sBAAsB,QAAQ,OAAO,EAAE;AAAA,IAC5D;AAAA,EACF;AAIA,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO,OAAO,SAAS;AAAA,EACzB;AAEA,MAAI,mCAAS,iBAAiB;AAC5B,WAAO,QAAQ;AAAA,EACjB;AAGA,QAAM,QAAQ,UAAU;AACxB,UAAQ;AAAA,IACN,0IAA0I,KAAK;AAAA,EACjJ;AAEA,SAAO;AACT;","names":[]}
|
package/dist/client/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/config.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This function returns the base URL of the Ory SDK as set by environment variables `NEXT_PUBLIC_ORY_SDK_URL` or `ORY_SDK_URL`.\n */\nexport function orySdkUrl() {\n let baseUrl\n\n if (process.env.NEXT_PUBLIC_ORY_SDK_URL) {\n baseUrl = process.env.NEXT_PUBLIC_ORY_SDK_URL\n }\n\n if (process.env.ORY_SDK_URL) {\n baseUrl = process.env.
|
|
1
|
+
{"version":3,"sources":["../../src/client/config.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This function returns the base URL of the Ory SDK as set by environment variables `NEXT_PUBLIC_ORY_SDK_URL` or `ORY_SDK_URL`.\n */\nexport function orySdkUrl() {\n let baseUrl\n\n if (process.env.NEXT_PUBLIC_ORY_SDK_URL) {\n baseUrl = process.env.NEXT_PUBLIC_ORY_SDK_URL\n }\n\n if (process.env.ORY_SDK_URL) {\n baseUrl = process.env.ORY_SDK_URL\n }\n\n if (!baseUrl) {\n throw new Error(\n \"You need to set environment variable `NEXT_PUBLIC_ORY_SDK_URL` or if you don't use Next.js `ORY_SDK_URL` to your Ory Network SDK URL.\",\n )\n }\n\n return baseUrl.replace(/\\/$/, \"\")\n}\n\n/**\n * This function returns whether the current environment is a production environment.\n */\nexport function isProduction() {\n return (\n [\"production\", \"prod\"].indexOf(\n process.env.VERCEL_ENV ?? process.env.NODE_ENV ?? \"\",\n ) > -1\n )\n}\n\n/**\n * This function returns the Ory SDK URL. If the environment is not production, it tries to guess the SDK URL based on the environment variables, assuming\n * that Ory APIs are proxied through the same domain as the application.\n *\n * Currently, this is only tested for Vercel deployments.\n *\n * @param options - Options for guessing the SDK URL.\n */\nexport function guessPotentiallyProxiedOrySdkUrl(options?: {\n knownProxiedUrl?: string\n}) {\n if (isProduction()) {\n // In production, we use the production custom domain\n return orySdkUrl()\n }\n\n if (process.env.VERCEL_ENV) {\n // We are in vercel\n\n // The domain name of the generated deployment URL. Example: *.vercel.app. The value does not include the protocol scheme https://.\n //\n // This is only available for preview deployments on Vercel.\n if (!isProduction() && process.env.VERCEL_URL) {\n return `https://${process.env.VERCEL_URL}`.replace(/\\/$/, \"\")\n }\n\n // This is sometimes set by the render server.\n if (process.env.__NEXT_PRIVATE_ORIGIN) {\n return process.env.__NEXT_PRIVATE_ORIGIN.replace(/\\/$/, \"\")\n }\n }\n\n // Unable to figure out the SDK URL. Either because we are not using Vercel or because we are on a local machine.\n // Let's try to use the window location.\n if (typeof window !== \"undefined\") {\n return window.location.origin\n }\n\n if (options?.knownProxiedUrl) {\n return options.knownProxiedUrl\n }\n\n // We tried everything. Let's use the SDK URL.\n const final = orySdkUrl()\n console.warn(\n `Unable to determine a suitable SDK URL for setting up the Next.js integration of Ory Elements. Will proceed using default Ory SDK URL \"${final}\". This is likely not what you want for local development and your authentication and login may not work.`,\n )\n\n return final\n}\n"],"mappings":"AAMO,SAAS,YAAY;AAC1B,MAAI;AAEJ,MAAI,QAAQ,IAAI,yBAAyB;AACvC,cAAU,QAAQ,IAAI;AAAA,EACxB;AAEA,MAAI,QAAQ,IAAI,aAAa;AAC3B,cAAU,QAAQ,IAAI;AAAA,EACxB;AAEA,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,SAAO,QAAQ,QAAQ,OAAO,EAAE;AAClC;AAKO,SAAS,eAAe;AA7B/B;AA8BE,SACE,CAAC,cAAc,MAAM,EAAE;AAAA,KACrB,mBAAQ,IAAI,eAAZ,YAA0B,QAAQ,IAAI,aAAtC,YAAkD;AAAA,EACpD,IAAI;AAER;AAUO,SAAS,iCAAiC,SAE9C;AACD,MAAI,aAAa,GAAG;AAElB,WAAO,UAAU;AAAA,EACnB;AAEA,MAAI,QAAQ,IAAI,YAAY;AAM1B,QAAI,CAAC,aAAa,KAAK,QAAQ,IAAI,YAAY;AAC7C,aAAO,WAAW,QAAQ,IAAI,UAAU,GAAG,QAAQ,OAAO,EAAE;AAAA,IAC9D;AAGA,QAAI,QAAQ,IAAI,uBAAuB;AACrC,aAAO,QAAQ,IAAI,sBAAsB,QAAQ,OAAO,EAAE;AAAA,IAC5D;AAAA,EACF;AAIA,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO,OAAO,SAAS;AAAA,EACzB;AAEA,MAAI,mCAAS,iBAAiB;AAC5B,WAAO,QAAQ;AAAA,EACjB;AAGA,QAAM,QAAQ,UAAU;AACxB,UAAQ;AAAA,IACN,0IAA0I,KAAK;AAAA,EACjJ;AAEA,SAAO;AACT;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -7,7 +7,6 @@ import { IntlShape } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
declare const buttonStyles: (props?: ({
|
|
9
9
|
intent?: "primary" | "secondary" | null | undefined;
|
|
10
|
-
defaultVariants?: "intent" | null | undefined;
|
|
11
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
11
|
type ButtonVariants = VariantProps<typeof buttonStyles>;
|
|
13
12
|
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { IntlShape } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
declare const buttonStyles: (props?: ({
|
|
9
9
|
intent?: "primary" | "secondary" | null | undefined;
|
|
10
|
-
defaultVariants?: "intent" | null | undefined;
|
|
11
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
11
|
type ButtonVariants = VariantProps<typeof buttonStyles>;
|
|
13
12
|
|