@ory/elements-react 1.0.0-rc.6 → 1.1.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 CHANGED
@@ -64,32 +64,35 @@ The stories use stub responses
64
64
 
65
65
  ## Releasing
66
66
 
67
- @ory/elements-react and @ory/nextjs is released using nx releases.
67
+ @ory/elements-react and @ory/nextjs are released using nx releases.
68
68
 
69
- There is a helper script located in `./scripts/release.sh`.
69
+ Preparation:
70
70
 
71
- Usage:
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
- ```bash
74
- ./scripts/release.sh <project> <tag>
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
- ./scripts/release.sh @ory/elements-react next # next release preview (-next.X)
77
- ./scripts/release.sh @ory/elements-react rc # release candidate (-rc.X)
78
- ```
78
+ :::note
79
79
 
80
- The script asks the user before executing each steps. Please double check
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
- ### Pre-releasing unmerged changes
82
+ :::
85
83
 
86
- You can release a PR's changes to npm to test them in a different repository,
87
- etc. These versions are released on the `pr` npm tag, and will have the version
88
- `0.0.0-pr.<git hash>`. These releases wont be pushed to master, but you might
89
- have to revert the `package.json` and `package-lock.json` files.
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
- Usage:
90
+ # or
92
91
 
93
- ```bash
94
- ./scripts/release.sh @ory/elements-react pr
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.
@@ -29,7 +29,7 @@ function orySdkUrl() {
29
29
  baseUrl = process.env.NEXT_PUBLIC_ORY_SDK_URL;
30
30
  }
31
31
  if (process.env.ORY_SDK_URL) {
32
- baseUrl = process.env._ORY_SDK_URL;
32
+ baseUrl = process.env.ORY_SDK_URL;
33
33
  }
34
34
  if (!baseUrl) {
35
35
  throw new Error(
@@ -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._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":[]}
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":[]}
@@ -4,7 +4,7 @@ function orySdkUrl() {
4
4
  baseUrl = process.env.NEXT_PUBLIC_ORY_SDK_URL;
5
5
  }
6
6
  if (process.env.ORY_SDK_URL) {
7
- baseUrl = process.env._ORY_SDK_URL;
7
+ baseUrl = process.env.ORY_SDK_URL;
8
8
  }
9
9
  if (!baseUrl) {
10
10
  throw new Error(
@@ -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._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":[]}
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
 
package/dist/index.js CHANGED
@@ -213,7 +213,7 @@ function useNodesGroups(nodes, { omit } = {}) {
213
213
  };
214
214
  }
215
215
  var findNode = (nodes, opt) => nodes.find((n) => {
216
- return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name);
216
+ return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name) && (opt.type && n.attributes.node_type === "input" ? opt.type instanceof RegExp ? n.attributes.type.match(opt.type) : n.attributes.type === opt.type : !opt.type);
217
217
  });
218
218
  function useFunctionalNodes(nodes) {
219
219
  return nodes.filter(
@@ -476,7 +476,8 @@ function useOryConfiguration() {
476
476
  };
477
477
  }
478
478
  var OryConfigurationContext = react.createContext({
479
- sdk: computeSdkConfig({}),
479
+ sdk: null,
480
+ // This is fine, because we always supply a proper default value for the SDK configuration in the provider
480
481
  project: defaultProject
481
482
  });
482
483
  function OryConfigurationProvider({
@@ -507,7 +508,7 @@ function computeSdkConfig(config) {
507
508
  }
508
509
  function getSDKUrl() {
509
510
  var _a;
510
- if (typeof process !== "undefined" && process.versions && process.versions.node) {
511
+ if (typeof process !== "undefined" && !!process.env) {
511
512
  if (isProduction()) {
512
513
  const sdkUrl = (_a = process.env["NEXT_PUBLIC_ORY_SDK_URL"]) != null ? _a : process.env["ORY_SDK_URL"];
513
514
  if (!sdkUrl) {
@@ -2252,7 +2253,7 @@ var en_default = {
2252
2253
  "identities.messages.1010011": "Sign in with hardware key",
2253
2254
  "identities.messages.1010012": "Prepare your WebAuthn device (e.g. security key, biometrics scanner, ...) and press continue.",
2254
2255
  "identities.messages.1010013": "Continue",
2255
- "identities.messages.1010014": "A code has been sent to the address you provided. If you have not received an message, check the spelling of the address and retry the login.",
2256
+ "identities.messages.1010014": "A code was sent to the address you provided. If you didn't receive it, please check the spelling of the address and try again.",
2256
2257
  "identities.messages.1010015": "Send sign in code",
2257
2258
  "identities.messages.1010016": 'You tried to sign in with "{duplicateIdentifier}", but that email is already used by another account. Sign in to your account with one of the options below to add your account "{duplicateIdentifier}" at "{provider}" as another way to sign in.',
2258
2259
  "identities.messages.1010017": "Sign in and link",
@@ -2460,7 +2461,7 @@ var en_default = {
2460
2461
  "card.header.parts.oidc": "a social provider",
2461
2462
  "card.header.parts.password.registration": "your {identifierLabel} and a password",
2462
2463
  "card.header.parts.password.login": "your {identifierLabel} and password",
2463
- "card.header.parts.code": "a code sent to you",
2464
+ "card.header.parts.code": "a one-time code",
2464
2465
  "card.header.parts.passkey": "a Passkey",
2465
2466
  "card.header.parts.webauthn": "a security key",
2466
2467
  "card.header.parts.totp": "your authenticator app",
@@ -2714,7 +2715,7 @@ var de_default = {
2714
2715
  "identities.messages.4010009": "Die Authentifizierungsmethode stimmt nicht mit der vorherigen Authentifizierungsmethode \xFCberein. Bitte versuchen Sie es erneut.",
2715
2716
  "identities.messages.4010010": "Die eingegebene Adresse stimmt nicht mit der Adresse \xFCberein, die Sie bei der Registrierung angegeben haben. Bitte versuchen Sie es erneut.",
2716
2717
  "input.placeholder": "{placeholder} eingeben",
2717
- "card.header.parts.code": "einem an Sie gesendeten Code",
2718
+ "card.header.parts.code": "ein einmaliger Code",
2718
2719
  "card.header.parts.identifier-first": "Ihrer {identifierLabel}",
2719
2720
  "card.header.parts.oidc": "einem Social-Login",
2720
2721
  "card.header.parts.passkey": "einem Passkey",
@@ -3064,7 +3065,7 @@ var es_default = {
3064
3065
  "card.header.parts.oidc": "un proveedor social",
3065
3066
  "card.header.parts.password.registration": "tu {identifierLabel} y una contrase\xF1a",
3066
3067
  "card.header.parts.password.login": "tu {identifierLabel} y contrase\xF1a",
3067
- "card.header.parts.code": "un c\xF3digo enviado a tu correo electr\xF3nico",
3068
+ "card.header.parts.code": "un c\xF3digo de un solo uso",
3068
3069
  "card.header.parts.passkey": "una clave de acceso",
3069
3070
  "card.header.parts.webauthn": "una clave de seguridad",
3070
3071
  "card.header.parts.totp": "su aplicaci\xF3n de autenticaci\xF3n",
@@ -3353,7 +3354,7 @@ var fr_default = {
3353
3354
  "card.header.parts.passkey": "une cl\xE9 d'acc\xE8s",
3354
3355
  "card.header.parts.webauthn": "une cl\xE9 de s\xE9curit\xE9",
3355
3356
  "card.header.parts.identifier-first": "votre {identifierLabel}",
3356
- "card.header.parts.code": "un code qui vous a \xE9t\xE9 envoy\xE9",
3357
+ "card.header.parts.code": "un code \xE0 usage unique",
3357
3358
  "card.header.parts.totp": "votre application d'authentification",
3358
3359
  "card.header.parts.lookup_secret": "un code de r\xE9cup\xE9ration de secours",
3359
3360
  "card.header.description.login": "Se connecter avec {identifierLabel}",
@@ -3600,7 +3601,7 @@ var nl_default = {
3600
3601
  "input.placeholder": "",
3601
3602
  "card.header.description.login": "",
3602
3603
  "card.header.description.registration": "",
3603
- "card.header.parts.code": "een code die naar je is verzonden",
3604
+ "card.header.parts.code": "een eenmalige code",
3604
3605
  "card.header.parts.totp": "je authenticator-app",
3605
3606
  "card.header.parts.lookup_secret": "een backup herstelcode",
3606
3607
  "card.header.parts.identifier-first": "",
@@ -3897,7 +3898,7 @@ var pl_default = {
3897
3898
  "card.header.parts.password.login": "",
3898
3899
  "card.header.parts.password.registration": "",
3899
3900
  "card.header.parts.webauthn": "",
3900
- "card.header.parts.code": "kod wys\u0142any do Ciebie",
3901
+ "card.header.parts.code": "jednorazowy kod",
3901
3902
  "card.header.parts.totp": "Twoja aplikacja uwierzytelniaj\u0105ca",
3902
3903
  "card.header.parts.lookup_secret": "kod odzyskiwania kopii zapasowej",
3903
3904
  "forms.label.forgot-password": "",
@@ -4182,7 +4183,7 @@ var pt_default = {
4182
4183
  "input.placeholder": "",
4183
4184
  "card.header.description.login": "",
4184
4185
  "card.header.description.registration": "",
4185
- "card.header.parts.code": "um c\xF3digo enviado para voc\xEA",
4186
+ "card.header.parts.code": "um c\xF3digo de uso \xFAnico",
4186
4187
  "card.header.parts.totp": "seu aplicativo autenticador",
4187
4188
  "card.header.parts.lookup_secret": "um c\xF3digo de recupera\xE7\xE3o de backup",
4188
4189
  "card.header.parts.identifier-first": "",
@@ -4473,7 +4474,7 @@ var sv_default = {
4473
4474
  "input.placeholder": "Ange din {placeholder}",
4474
4475
  "card.header.description.login": "Logga in med {identifierLabel}",
4475
4476
  "card.header.description.registration": "Registrera dig med {identifierLabel}",
4476
- "card.header.parts.code": "en kod skickad till dig",
4477
+ "card.header.parts.code": "en eng\xE5ngskod",
4477
4478
  "card.header.parts.totp": "din autentiseringsapp",
4478
4479
  "card.header.parts.lookup_secret": "en s\xE4kerhetskopieringskod",
4479
4480
  "card.header.parts.identifier-first": "din {identifierLabel}",
@@ -4785,7 +4786,7 @@ var no_default = {
4785
4786
  "card.header.parts.oidc": "en sosial leverand\xF8r",
4786
4787
  "card.header.parts.password.registration": "din {identifierLabel} og et passord",
4787
4788
  "card.header.parts.password.login": "din {identifierLabel} og passord",
4788
- "card.header.parts.code": "en kode sendt til deg",
4789
+ "card.header.parts.code": "en engangskode",
4789
4790
  "card.header.parts.passkey": "en passkey",
4790
4791
  "card.header.parts.webauthn": "en sikkerhetsn\xF8kkel",
4791
4792
  "card.header.parts.totp": "din autentiseringsapp",