@ory/elements-react 1.0.0-next.30 → 1.0.0-next.31

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.
@@ -135,7 +135,10 @@ function RegistrationCardFooter() {
135
135
  function handleScreenSelection() {
136
136
  setValue("method", "profile");
137
137
  if (screenSelectionNode) {
138
- setValue("screen", "credential-selection");
138
+ setValue(
139
+ screenSelectionNode.attributes.name,
140
+ screenSelectionNode.attributes.value
141
+ );
139
142
  }
140
143
  }
141
144
  return /* @__PURE__ */ jsx4("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ jsx4(Fragment, { children: screenSelectionNode && /* @__PURE__ */ jsx4(
@@ -143,6 +146,8 @@ function RegistrationCardFooter() {
143
146
  {
144
147
  className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
145
148
  type: "submit",
149
+ name: screenSelectionNode.attributes.name,
150
+ value: screenSelectionNode.attributes.value,
146
151
  onClick: handleScreenSelection,
147
152
  children: intl.formatMessage({
148
153
  id: "card.footer.select-another-method",
@@ -544,6 +549,10 @@ import {
544
549
  uiTextToFormattedMessage,
545
550
  useOryFlow as useOryFlow5
546
551
  } from "@ory/elements-react";
552
+ import { useEffect } from "react";
553
+ import { useFormContext as useFormContext2 } from "react-hook-form";
554
+ import { useIntl as useIntl3 } from "react-intl";
555
+ import { useDebounceValue } from "usehooks-ts";
547
556
 
548
557
  // src/theme/default/provider-logos/apple.svg
549
558
  import * as React4 from "react";
@@ -733,11 +742,6 @@ var logos = {
733
742
  };
734
743
  var provider_logos_default = logos;
735
744
 
736
- // src/theme/default/components/form/social.tsx
737
- import { useIntl as useIntl3 } from "react-intl";
738
- import { useEffect, useState } from "react";
739
- import { useFormContext as useFormContext2 } from "react-hook-form";
740
-
741
745
  // src/theme/default/components/form/spinner.tsx
742
746
  import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
743
747
  function Spinner({ className }) {
@@ -778,7 +782,7 @@ function Spinner({ className }) {
778
782
  }
779
783
 
780
784
  // src/theme/default/components/form/social.tsx
781
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
785
+ import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
782
786
  function extractProvider(context) {
783
787
  if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
784
788
  return context.provider;
@@ -803,7 +807,7 @@ function DefaultButtonSocial({
803
807
  const {
804
808
  flow: { ui }
805
809
  } = useOryFlow5();
806
- const [clicked, setClicked] = useState(false);
810
+ const [clicked, setClicked] = useDebounceValue(false, 100);
807
811
  const intl = useIntl3();
808
812
  const {
809
813
  formState: { isSubmitting }
@@ -813,14 +817,14 @@ function DefaultButtonSocial({
813
817
  const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
814
818
  const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
815
819
  const localOnClick = () => {
816
- setClicked(true);
817
820
  onClick == null ? void 0 : onClick();
821
+ setClicked(true);
818
822
  };
819
823
  useEffect(() => {
820
824
  if (!isSubmitting) {
821
825
  setClicked(false);
822
826
  }
823
- }, [isSubmitting]);
827
+ }, [isSubmitting, setClicked]);
824
828
  return /* @__PURE__ */ jsxs19(
825
829
  "button",
826
830
  {
@@ -835,7 +839,10 @@ function DefaultButtonSocial({
835
839
  disabled: isSubmitting,
836
840
  children: [
837
841
  /* @__PURE__ */ jsx26("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx26(Logo, { size: 20 }) : /* @__PURE__ */ jsx26("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ jsx26(Spinner, { className: "size-5" }) }),
838
- showLabel && node.meta.label ? /* @__PURE__ */ jsx26("span", { className: "grow text-left font-medium leading-none text-button-social-foreground-default", children: uiTextToFormattedMessage(node.meta.label, intl) }) : null
842
+ showLabel && node.meta.label ? /* @__PURE__ */ jsxs19(Fragment2, { children: [
843
+ /* @__PURE__ */ jsx26("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: uiTextToFormattedMessage(node.meta.label, intl) }),
844
+ /* @__PURE__ */ jsx26("span", { className: "size-5 block" })
845
+ ] }) : null
839
846
  ]
840
847
  }
841
848
  );
@@ -998,7 +1005,7 @@ import {
998
1005
  import { cva } from "class-variance-authority";
999
1006
  import { useFormContext as useFormContext3 } from "react-hook-form";
1000
1007
  import { useIntl as useIntl6 } from "react-intl";
1001
- import { useEffect as useEffect2, useState as useState2 } from "react";
1008
+ import { useEffect as useEffect2, useState } from "react";
1002
1009
  import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
1003
1010
  var buttonStyles = cva(
1004
1011
  [
@@ -1046,10 +1053,11 @@ var DefaultButton = ({
1046
1053
  autocomplete: _ignoredAutocomplete,
1047
1054
  label: _ignoredLabel,
1048
1055
  node_type: _ignoredNodeType,
1056
+ maxlength: _ignoredMaxLength,
1049
1057
  // End of skipped attributes
1050
1058
  ...rest
1051
1059
  } = attributes;
1052
- const [clicked, setClicked] = useState2(false);
1060
+ const [clicked, setClicked] = useState(false);
1053
1061
  const intl = useIntl6();
1054
1062
  const label = getNodeLabel(node);
1055
1063
  const {
@@ -1159,7 +1167,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
1159
1167
  };
1160
1168
 
1161
1169
  // src/theme/default/components/ui/checkbox-label.tsx
1162
- import { Fragment as Fragment2, jsx as jsx34 } from "react/jsx-runtime";
1170
+ import { Fragment as Fragment3, jsx as jsx34 } from "react/jsx-runtime";
1163
1171
  var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
1164
1172
  function computeLabelElements(labelText) {
1165
1173
  const elements = [];
@@ -1200,7 +1208,7 @@ function CheckboxLabel({ label }) {
1200
1208
  return null;
1201
1209
  }
1202
1210
  const labelText = uiTextToFormattedMessage4(label, intl);
1203
- return /* @__PURE__ */ jsx34(Fragment2, { children: computeLabelElements(labelText) });
1211
+ return /* @__PURE__ */ jsx34(Fragment3, { children: computeLabelElements(labelText) });
1204
1212
  }
1205
1213
 
1206
1214
  // src/theme/default/components/form/checkbox.tsx
@@ -1596,21 +1604,35 @@ var DefaultFormSectionFooter = ({
1596
1604
  // src/theme/default/components/form/text.tsx
1597
1605
  import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
1598
1606
  import { useIntl as useIntl12 } from "react-intl";
1599
- import { Fragment as Fragment3, jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
1607
+ import { Fragment as Fragment4, jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
1600
1608
  function DefaultText({ node, attributes }) {
1601
1609
  var _a;
1602
1610
  const intl = useIntl12();
1603
- return /* @__PURE__ */ jsxs26(Fragment3, { children: [
1604
- /* @__PURE__ */ jsx45("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
1605
- (_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ jsx45(
1606
- "pre",
1607
- {
1608
- "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
1609
- children: /* @__PURE__ */ jsx45("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
1610
- },
1611
- index
1612
- ))
1613
- ] });
1611
+ const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
1612
+ if (lookup) {
1613
+ return /* @__PURE__ */ jsxs26(Fragment4, { children: [
1614
+ /* @__PURE__ */ jsx45("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
1615
+ lookup.map((text, index) => /* @__PURE__ */ jsx45(
1616
+ "pre",
1617
+ {
1618
+ "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
1619
+ children: /* @__PURE__ */ jsx45("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
1620
+ },
1621
+ index
1622
+ ))
1623
+ ] });
1624
+ }
1625
+ return /* @__PURE__ */ jsx45(Fragment4, { children: /* @__PURE__ */ jsxs26(
1626
+ "p",
1627
+ {
1628
+ "data-testid": `ory/form/node/text/${attributes.id}/label`,
1629
+ id: attributes.id,
1630
+ children: [
1631
+ node.meta.label ? /* @__PURE__ */ jsx45("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
1632
+ attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
1633
+ ]
1634
+ }
1635
+ ) });
1614
1636
  }
1615
1637
 
1616
1638
  // src/theme/default/components/generic/page-header.tsx
@@ -1618,7 +1640,7 @@ import { useComponents as useComponents3 } from "@ory/elements-react";
1618
1640
 
1619
1641
  // src/theme/default/components/ui/user-menu.tsx
1620
1642
  import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
1621
- import { useCallback, useEffect as useEffect3, useState as useState3 } from "react";
1643
+ import { useCallback, useEffect as useEffect3, useState as useState2 } from "react";
1622
1644
  import { useOryFlow as useOryFlow10 } from "@ory/elements-react";
1623
1645
 
1624
1646
  // src/util/client.ts
@@ -1798,7 +1820,7 @@ import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
1798
1820
  var UserMenu = ({ session }) => {
1799
1821
  const { config } = useOryFlow10();
1800
1822
  const initials = getUserInitials(session);
1801
- const [logoutFlow, setLogoutFlow] = useState3();
1823
+ const [logoutFlow, setLogoutFlow] = useState2();
1802
1824
  const fetchLogoutFlow = useCallback(async () => {
1803
1825
  const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
1804
1826
  setLogoutFlow(flow);
@@ -1841,8 +1863,9 @@ var DefaultPageHeader = (_props) => {
1841
1863
  };
1842
1864
 
1843
1865
  // src/theme/default/components/settings/settings-oidc.tsx
1844
- import { useEffect as useEffect4, useState as useState4 } from "react";
1866
+ import { useEffect as useEffect4 } from "react";
1845
1867
  import { useFormContext as useFormContext7 } from "react-hook-form";
1868
+ import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
1846
1869
 
1847
1870
  // src/theme/default/assets/icons/trash.svg
1848
1871
  import * as React26 from "react";
@@ -1886,27 +1909,25 @@ function DefaultSettingsOidc({
1886
1909
  }
1887
1910
  function UnlinkRow({ button }) {
1888
1911
  var _a, _b;
1889
- const [clicked, setClicked] = useState4(false);
1912
+ const [clicked, setClicked] = useDebounceValue2(false, 100);
1890
1913
  const {
1891
1914
  formState: { isSubmitting }
1892
1915
  } = useFormContext7();
1893
1916
  const attrs = button.attributes;
1894
1917
  const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
1895
- const Logo = attrs.value in provider_logos_default ? provider_logos_default[attrs.value] : provider_logos_default.generic;
1918
+ const Logo = provider_logos_default[attrs.value.split("-")[0]];
1896
1919
  const localOnClick = () => {
1897
1920
  button.onClick();
1898
- setTimeout(() => {
1899
- setClicked(true);
1900
- }, 100);
1921
+ setClicked(true);
1901
1922
  };
1902
1923
  useEffect4(() => {
1903
1924
  if (!isSubmitting) {
1904
1925
  setClicked(false);
1905
1926
  }
1906
- }, [isSubmitting]);
1927
+ }, [isSubmitting, setClicked]);
1907
1928
  return /* @__PURE__ */ jsxs30("div", { className: "flex justify-between", children: [
1908
1929
  /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-6", children: [
1909
- /* @__PURE__ */ jsx54(Logo, { size: 32 }),
1930
+ Logo ? /* @__PURE__ */ jsx54(Logo, { size: 32 }) : /* @__PURE__ */ jsx54(provider_logos_default.generic, { size: 32 }),
1910
1931
  /* @__PURE__ */ jsx54("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
1911
1932
  ] }),
1912
1933
  /* @__PURE__ */ jsx54(
@@ -1941,11 +1962,11 @@ function DefaultSettingsPasskey({
1941
1962
  const {
1942
1963
  formState: { isSubmitting }
1943
1964
  } = useFormContext8();
1944
- const { Node } = useComponents4();
1965
+ const { Node: Node2 } = useComponents4();
1945
1966
  const hasRemoveButtons = removeButtons.length > 0;
1946
1967
  return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
1947
1968
  /* @__PURE__ */ jsx55("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx55(
1948
- Node.Button,
1969
+ Node2.Button,
1949
1970
  {
1950
1971
  node: triggerButton,
1951
1972
  attributes: triggerButton.attributes,
@@ -2041,7 +2062,7 @@ var refresh_default = SvgRefresh;
2041
2062
 
2042
2063
  // src/theme/default/components/settings/settings-recovery-codes.tsx
2043
2064
  import { useFormContext as useFormContext9 } from "react-hook-form";
2044
- import { Fragment as Fragment4, jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
2065
+ import { Fragment as Fragment5, jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
2045
2066
  function DefaultSettingsRecoveryCodes({
2046
2067
  codes,
2047
2068
  regnerateButton,
@@ -2086,7 +2107,7 @@ function DefaultSettingsRecoveryCodes({
2086
2107
  )
2087
2108
  }
2088
2109
  ),
2089
- revealButton && /* @__PURE__ */ jsx59(Fragment4, { children: /* @__PURE__ */ jsx59(
2110
+ revealButton && /* @__PURE__ */ jsx59(Fragment5, { children: /* @__PURE__ */ jsx59(
2090
2111
  "button",
2091
2112
  {
2092
2113
  ...revealButton.attributes,
@@ -2155,7 +2176,7 @@ function DefaultSettingsTotp({
2155
2176
  totpUnlink,
2156
2177
  onUnlink
2157
2178
  }) {
2158
- const { Node, Card } = useComponents5();
2179
+ const { Node: Node2, Card } = useComponents5();
2159
2180
  const {
2160
2181
  formState: { isSubmitting }
2161
2182
  } = useFormContext10();
@@ -2195,7 +2216,7 @@ function DefaultSettingsTotp({
2195
2216
  return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2196
2217
  /* @__PURE__ */ jsx61("div", { className: "col-span-full", children: /* @__PURE__ */ jsx61(DefaultHorizontalDivider, {}) }),
2197
2218
  /* @__PURE__ */ jsx61("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx61("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx61("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx61(
2198
- Node.Image,
2219
+ Node2.Image,
2199
2220
  {
2200
2221
  node: totpImage,
2201
2222
  attributes: {
@@ -2205,12 +2226,12 @@ function DefaultSettingsTotp({
2205
2226
  ) }) }) }),
2206
2227
  /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-6", children: [
2207
2228
  /* @__PURE__ */ jsx61(
2208
- Node.Label,
2229
+ Node2.Label,
2209
2230
  {
2210
2231
  node: totpSecret,
2211
2232
  attributes: totpSecret.attributes,
2212
2233
  children: /* @__PURE__ */ jsx61(
2213
- Node.Input,
2234
+ Node2.Input,
2214
2235
  {
2215
2236
  node: totpSecret,
2216
2237
  attributes: {
@@ -2225,12 +2246,12 @@ function DefaultSettingsTotp({
2225
2246
  }
2226
2247
  ),
2227
2248
  /* @__PURE__ */ jsx61(
2228
- Node.Label,
2249
+ Node2.Label,
2229
2250
  {
2230
2251
  attributes: totpInput.attributes,
2231
2252
  node: totpInput,
2232
2253
  children: /* @__PURE__ */ jsx61(
2233
- Node.CodeInput,
2254
+ Node2.CodeInput,
2234
2255
  {
2235
2256
  node: totpInput,
2236
2257
  attributes: totpInput.attributes
@@ -2266,17 +2287,17 @@ function DefaultSettingsWebauthn({
2266
2287
  const {
2267
2288
  formState: { isSubmitting }
2268
2289
  } = useFormContext11();
2269
- const { Node, Card } = useComponents6();
2290
+ const { Node: Node2, Card } = useComponents6();
2270
2291
  const hasRemoveButtons = removeButtons.length > 0;
2271
2292
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
2272
2293
  /* @__PURE__ */ jsxs35("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2273
2294
  /* @__PURE__ */ jsx63("div", { className: "flex-1", children: /* @__PURE__ */ jsx63(
2274
- Node.Label,
2295
+ Node2.Label,
2275
2296
  {
2276
2297
  node: nameInput,
2277
2298
  attributes: nameInput.attributes,
2278
2299
  children: /* @__PURE__ */ jsx63(
2279
- Node.Input,
2300
+ Node2.Input,
2280
2301
  {
2281
2302
  node: nameInput,
2282
2303
  attributes: nameInput.attributes
@@ -2285,7 +2306,7 @@ function DefaultSettingsWebauthn({
2285
2306
  }
2286
2307
  ) }),
2287
2308
  triggerButton ? /* @__PURE__ */ jsx63(
2288
- Node.Button,
2309
+ Node2.Button,
2289
2310
  {
2290
2311
  node: triggerButton,
2291
2312
  attributes: triggerButton.attributes,
@@ -2358,9 +2379,418 @@ function DefaultAuthMethodListContainer({
2358
2379
  return /* @__PURE__ */ jsx64("div", { className: "grid grid-cols-1 gap-2", children });
2359
2380
  }
2360
2381
 
2382
+ // src/theme/default/components/form/captcha.tsx
2383
+ import { isUiNodeInputAttributes as isUiNodeInputAttributes7 } from "@ory/client-fetch";
2384
+ import { Turnstile } from "@marsidev/react-turnstile";
2385
+ import { useRef as useRef2 } from "react";
2386
+ import { useFormContext as useFormContext23 } from "react-hook-form";
2387
+
2388
+ // src/context/component.tsx
2389
+ import {
2390
+ isUiNodeInputAttributes as isUiNodeInputAttributes2,
2391
+ UiNodeGroupEnum
2392
+ } from "@ory/client-fetch";
2393
+ import { createContext, useContext as useContext2 } from "react";
2394
+ import { jsx as jsx65 } from "react/jsx-runtime";
2395
+ var ComponentContext = createContext({
2396
+ components: null,
2397
+ // fine because we throw an error if it's not provided
2398
+ nodeSorter: () => 0,
2399
+ groupSorter: () => 0
2400
+ });
2401
+ function useComponents7() {
2402
+ const ctx = useContext2(ComponentContext);
2403
+ if (!ctx) {
2404
+ throw new Error("useComponents must be used within a ComponentProvider");
2405
+ }
2406
+ return ctx.components;
2407
+ }
2408
+ var defaultGroupOrder = [
2409
+ UiNodeGroupEnum.Default,
2410
+ UiNodeGroupEnum.Profile,
2411
+ UiNodeGroupEnum.Password,
2412
+ UiNodeGroupEnum.Oidc,
2413
+ UiNodeGroupEnum.Code,
2414
+ UiNodeGroupEnum.LookupSecret,
2415
+ UiNodeGroupEnum.Passkey,
2416
+ UiNodeGroupEnum.Webauthn,
2417
+ UiNodeGroupEnum.Totp
2418
+ ];
2419
+
2420
+ // src/context/flow-context.tsx
2421
+ import {
2422
+ createContext as createContext2,
2423
+ useContext as useContext3,
2424
+ useState as useState3
2425
+ } from "react";
2426
+
2427
+ // src/context/form-state.ts
2428
+ import { FlowType as FlowType8 } from "@ory/client-fetch";
2429
+ import { useReducer } from "react";
2430
+
2431
+ // src/components/card/card-two-step.utils.ts
2432
+ import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
2433
+
2434
+ // src/util/ui/index.ts
2435
+ import { UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
2436
+ import { useMemo } from "react";
2437
+ function triggerToWindowCall(trigger) {
2438
+ if (!trigger) {
2439
+ return;
2440
+ }
2441
+ const fn = triggerToFunction(trigger);
2442
+ if (fn) {
2443
+ fn();
2444
+ return;
2445
+ }
2446
+ let i = 0;
2447
+ const ms = 100;
2448
+ const interval = setInterval(() => {
2449
+ i++;
2450
+ if (i > 100) {
2451
+ clearInterval(interval);
2452
+ throw new Error(
2453
+ "Unable to load Ory's WebAuthn script. Is it being blocked or otherwise failing to load? If you are running an old version of Ory Elements, please upgrade. For more information, please check your browser's developer console."
2454
+ );
2455
+ }
2456
+ const fn2 = triggerToFunction(trigger);
2457
+ if (fn2) {
2458
+ clearInterval(interval);
2459
+ return fn2();
2460
+ }
2461
+ }, ms);
2462
+ return;
2463
+ }
2464
+ function triggerToFunction(trigger) {
2465
+ if (typeof window === "undefined") {
2466
+ console.debug(
2467
+ "The Ory SDK is missing a required function: window is undefined."
2468
+ );
2469
+ return void 0;
2470
+ }
2471
+ const typedWindow = window;
2472
+ if (!(trigger in typedWindow) || !typedWindow[trigger]) {
2473
+ console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
2474
+ return void 0;
2475
+ }
2476
+ const triggerFn = typedWindow[trigger];
2477
+ if (typeof triggerFn !== "function") {
2478
+ console.debug(
2479
+ `The Ory SDK is missing a required function: ${trigger}. It is not a function.`
2480
+ );
2481
+ return void 0;
2482
+ }
2483
+ return triggerFn;
2484
+ }
2485
+
2486
+ // src/context/flow-context.tsx
2487
+ import { jsx as jsx66 } from "react/jsx-runtime";
2488
+ var OryFlowContext = createContext2(null);
2489
+
2490
+ // src/context/intl-context.tsx
2491
+ import { IntlProvider as OriginalIntlProvider } from "react-intl";
2492
+
2493
+ // src/components/card/header.tsx
2494
+ import { jsx as jsx67 } from "react/jsx-runtime";
2495
+
2496
+ // src/components/form/form-provider.tsx
2497
+ import { UiNodeGroupEnum as UiNodeGroupEnum5 } from "@ory/client-fetch";
2498
+ import { FormProvider, useForm as useForm2 } from "react-hook-form";
2499
+
2500
+ // src/components/form/form-helpers.ts
2501
+ import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
2502
+
2503
+ // src/components/form/form-resolver.ts
2504
+ import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client-fetch";
2505
+
2506
+ // src/components/form/form-provider.tsx
2507
+ import { jsx as jsx68 } from "react/jsx-runtime";
2508
+
2509
+ // src/components/card/card.tsx
2510
+ import { jsx as jsx69 } from "react/jsx-runtime";
2511
+
2512
+ // src/components/card/footer.tsx
2513
+ import { jsx as jsx70 } from "react/jsx-runtime";
2514
+
2515
+ // src/components/card/content.tsx
2516
+ import { jsx as jsx71 } from "react/jsx-runtime";
2517
+
2518
+ // src/components/card/card-two-step.tsx
2519
+ import { UiNodeGroupEnum as UiNodeGroupEnum7 } from "@ory/client-fetch";
2520
+ import { useFormContext as useFormContext15 } from "react-hook-form";
2521
+
2522
+ // src/components/form/form.tsx
2523
+ import {
2524
+ isUiNodeAnchorAttributes,
2525
+ isUiNodeImageAttributes,
2526
+ isUiNodeInputAttributes as isUiNodeInputAttributes5,
2527
+ isUiNodeScriptAttributes
2528
+ } from "@ory/client-fetch";
2529
+ import { useFormContext as useFormContext13 } from "react-hook-form";
2530
+ import { useIntl as useIntl13 } from "react-intl";
2531
+
2532
+ // src/components/form/useOryFormSubmit.ts
2533
+ import {
2534
+ FlowType as FlowType14
2535
+ } from "@ory/client-fetch";
2536
+ import { useFormContext as useFormContext12 } from "react-hook-form";
2537
+
2538
+ // src/util/onSubmitLogin.ts
2539
+ import {
2540
+ FlowType as FlowType9,
2541
+ handleFlowError,
2542
+ loginUrl
2543
+ } from "@ory/client-fetch";
2544
+
2545
+ // src/util/onSubmitRecovery.ts
2546
+ import {
2547
+ FlowType as FlowType10,
2548
+ handleContinueWith,
2549
+ handleFlowError as handleFlowError2,
2550
+ instanceOfContinueWithRecoveryUi,
2551
+ recoveryUrl
2552
+ } from "@ory/client-fetch";
2553
+
2554
+ // src/util/onSubmitRegistration.ts
2555
+ import {
2556
+ FlowType as FlowType11,
2557
+ handleContinueWith as handleContinueWith2,
2558
+ handleFlowError as handleFlowError3,
2559
+ registrationUrl
2560
+ } from "@ory/client-fetch";
2561
+
2562
+ // src/util/onSubmitSettings.ts
2563
+ import {
2564
+ FlowType as FlowType12,
2565
+ handleContinueWith as handleContinueWith3,
2566
+ handleFlowError as handleFlowError4,
2567
+ isResponseError,
2568
+ loginUrl as loginUrl2,
2569
+ settingsUrl
2570
+ } from "@ory/client-fetch";
2571
+
2572
+ // src/util/onSubmitVerification.ts
2573
+ import {
2574
+ FlowType as FlowType13,
2575
+ handleFlowError as handleFlowError5,
2576
+ verificationUrl
2577
+ } from "@ory/client-fetch";
2578
+
2579
+ // src/components/form/form.tsx
2580
+ import { jsx as jsx72 } from "react/jsx-runtime";
2581
+
2582
+ // src/components/form/messages.tsx
2583
+ import { jsx as jsx73 } from "react/jsx-runtime";
2584
+
2585
+ // src/components/form/nodes/node.tsx
2586
+ import {
2587
+ isUiNodeAnchorAttributes as isUiNodeAnchorAttributes2,
2588
+ isUiNodeImageAttributes as isUiNodeImageAttributes2,
2589
+ isUiNodeInputAttributes as isUiNodeInputAttributes6,
2590
+ isUiNodeScriptAttributes as isUiNodeScriptAttributes2,
2591
+ isUiNodeTextAttributes,
2592
+ UiNodeGroupEnum as UiNodeGroupEnum6
2593
+ } from "@ory/client-fetch";
2594
+ import { jsx as jsx74 } from "react/jsx-runtime";
2595
+
2596
+ // src/components/form/social.tsx
2597
+ import { useFormContext as useFormContext14 } from "react-hook-form";
2598
+ import { jsx as jsx75 } from "react/jsx-runtime";
2599
+
2600
+ // src/components/card/card-two-step.tsx
2601
+ import { Fragment as Fragment6, jsx as jsx76, jsxs as jsxs36 } from "react/jsx-runtime";
2602
+
2603
+ // src/components/form/groups.tsx
2604
+ import { jsx as jsx77 } from "react/jsx-runtime";
2605
+
2606
+ // src/components/form/section.tsx
2607
+ import { useFormContext as useFormContext16 } from "react-hook-form";
2608
+ import { jsx as jsx78 } from "react/jsx-runtime";
2609
+
2610
+ // src/components/generic/divider.tsx
2611
+ import { jsx as jsx79 } from "react/jsx-runtime";
2612
+
2613
+ // src/components/generic/page-header.tsx
2614
+ import { jsx as jsx80 } from "react/jsx-runtime";
2615
+
2616
+ // src/components/settings/settings-card.tsx
2617
+ import { UiNodeGroupEnum as UiNodeGroupEnum8 } from "@ory/client-fetch";
2618
+ import { useIntl as useIntl19 } from "react-intl";
2619
+
2620
+ // src/components/settings/oidc-settings.tsx
2621
+ import { useIntl as useIntl14 } from "react-intl";
2622
+ import { useFormContext as useFormContext17 } from "react-hook-form";
2623
+ import { Fragment as Fragment7, jsx as jsx81, jsxs as jsxs37 } from "react/jsx-runtime";
2624
+
2625
+ // src/components/settings/passkey-settings.tsx
2626
+ import { useFormContext as useFormContext18 } from "react-hook-form";
2627
+ import { useIntl as useIntl15 } from "react-intl";
2628
+ import { Fragment as Fragment8, jsx as jsx82, jsxs as jsxs38 } from "react/jsx-runtime";
2629
+
2630
+ // src/components/settings/recovery-codes-settings.tsx
2631
+ import { useIntl as useIntl16 } from "react-intl";
2632
+ import { useFormContext as useFormContext19 } from "react-hook-form";
2633
+ import { Fragment as Fragment9, jsx as jsx83, jsxs as jsxs39 } from "react/jsx-runtime";
2634
+
2635
+ // src/components/settings/totp-settings.tsx
2636
+ import { useFormContext as useFormContext20 } from "react-hook-form";
2637
+ import { useIntl as useIntl17 } from "react-intl";
2638
+ import { Fragment as Fragment10, jsx as jsx84, jsxs as jsxs40 } from "react/jsx-runtime";
2639
+
2640
+ // src/components/settings/webauthn-settings.tsx
2641
+ import { useFormContext as useFormContext21 } from "react-hook-form";
2642
+ import { useIntl as useIntl18 } from "react-intl";
2643
+ import { Fragment as Fragment11, jsx as jsx85, jsxs as jsxs41 } from "react/jsx-runtime";
2644
+
2645
+ // src/components/settings/settings-card.tsx
2646
+ import { Fragment as Fragment12, jsx as jsx86, jsxs as jsxs42 } from "react/jsx-runtime";
2647
+
2648
+ // src/context/intl-context.tsx
2649
+ import { jsx as jsx87 } from "react/jsx-runtime";
2650
+
2651
+ // src/context/provider.tsx
2652
+ import { jsx as jsx88 } from "react/jsx-runtime";
2653
+
2654
+ // src/components/form/nodes/input.tsx
2655
+ import {
2656
+ UiNodeInputAttributesTypeEnum
2657
+ } from "@ory/client-fetch";
2658
+ import { useEffect as useEffect5, useRef } from "react";
2659
+ import { useFormContext as useFormContext22 } from "react-hook-form";
2660
+ import { jsx as jsx89 } from "react/jsx-runtime";
2661
+ var NodeInput = ({
2662
+ node,
2663
+ attributes
2664
+ }) => {
2665
+ var _a;
2666
+ const { Node: Node2 } = useComponents7();
2667
+ const { setValue } = useFormContext22();
2668
+ const {
2669
+ onloadTrigger,
2670
+ onclickTrigger,
2671
+ // These properties do not exist on input fields so we remove them (as we already have handled them).
2672
+ onclick: _ignoredOnclick,
2673
+ onload: _ignoredOnload,
2674
+ //
2675
+ ...attrs
2676
+ } = attributes;
2677
+ const isResendNode = ((_a = node.meta.label) == null ? void 0 : _a.id) === 1070008;
2678
+ const isScreenSelectionNode = "name" in node.attributes && node.attributes.name === "screen";
2679
+ const setFormValue = () => {
2680
+ if (attrs.value && !(isResendNode || isScreenSelectionNode)) {
2681
+ setValue(attrs.name, attrs.value);
2682
+ }
2683
+ };
2684
+ const hasRun = useRef(false);
2685
+ useEffect5(
2686
+ () => {
2687
+ setFormValue();
2688
+ if (!hasRun.current && onloadTrigger) {
2689
+ hasRun.current = true;
2690
+ triggerToWindowCall(onloadTrigger);
2691
+ }
2692
+ },
2693
+ // TODO(jonas): make sure onloadTrigger is stable
2694
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
2695
+ []
2696
+ );
2697
+ const handleClick = () => {
2698
+ setFormValue();
2699
+ if (onclickTrigger) {
2700
+ triggerToWindowCall(onclickTrigger);
2701
+ }
2702
+ };
2703
+ const isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc";
2704
+ const isPinCodeInput = attrs.name === "code" && node.group === "code" || attrs.name === "totp_code" && node.group === "totp";
2705
+ switch (attributes.type) {
2706
+ case UiNodeInputAttributesTypeEnum.Submit:
2707
+ case UiNodeInputAttributesTypeEnum.Button:
2708
+ if (isSocial) {
2709
+ return null;
2710
+ }
2711
+ if (isResendNode || isScreenSelectionNode) {
2712
+ return null;
2713
+ }
2714
+ return /* @__PURE__ */ jsx89(
2715
+ Node2.Label,
2716
+ {
2717
+ attributes: { ...attrs, label: void 0 },
2718
+ node: { ...node, meta: { ...node.meta, label: void 0 } },
2719
+ children: /* @__PURE__ */ jsx89(Node2.Button, { attributes: attrs, node, onClick: handleClick })
2720
+ }
2721
+ );
2722
+ case UiNodeInputAttributesTypeEnum.DatetimeLocal:
2723
+ throw new Error("Not implemented");
2724
+ case UiNodeInputAttributesTypeEnum.Checkbox:
2725
+ return /* @__PURE__ */ jsx89(
2726
+ Node2.Label,
2727
+ {
2728
+ attributes: { ...attrs, label: void 0 },
2729
+ node: { ...node, meta: { ...node.meta, label: void 0 } },
2730
+ children: /* @__PURE__ */ jsx89(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
2731
+ }
2732
+ );
2733
+ case UiNodeInputAttributesTypeEnum.Hidden:
2734
+ return /* @__PURE__ */ jsx89(Node2.Input, { attributes: attrs, node, onClick: handleClick });
2735
+ default:
2736
+ if (isPinCodeInput) {
2737
+ return /* @__PURE__ */ jsx89(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx89(
2738
+ Node2.CodeInput,
2739
+ {
2740
+ attributes: attrs,
2741
+ node,
2742
+ onClick: handleClick
2743
+ }
2744
+ ) });
2745
+ }
2746
+ return /* @__PURE__ */ jsx89(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx89(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
2747
+ }
2748
+ };
2749
+
2750
+ // src/theme/default/components/form/captcha.tsx
2751
+ import { jsx as jsx90 } from "react/jsx-runtime";
2752
+ var DefaultCaptcha = ({ node }) => {
2753
+ const { setValue } = useFormContext23();
2754
+ const ref = useRef2();
2755
+ const nodes = [];
2756
+ if (isUiNodeInputAttributes7(node.attributes)) {
2757
+ if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
2758
+ nodes.push(/* @__PURE__ */ jsx90(NodeInput, { node, attributes: node.attributes }, 1));
2759
+ }
2760
+ }
2761
+ if (isUiNodeInputAttributes7(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2762
+ const options = JSON.parse(node.attributes.value);
2763
+ nodes.push(
2764
+ /* @__PURE__ */ jsx90(
2765
+ Turnstile,
2766
+ {
2767
+ ref,
2768
+ siteKey: options.sitekey,
2769
+ options: {
2770
+ action: options.action,
2771
+ size: "flexible",
2772
+ theme: options.theme,
2773
+ responseField: false,
2774
+ responseFieldName: options.response_field_name
2775
+ },
2776
+ onExpire: () => {
2777
+ var _a;
2778
+ return (_a = ref.current) == null ? void 0 : _a.reset();
2779
+ },
2780
+ onSuccess: (token) => {
2781
+ setValue(options.response_field_name, token);
2782
+ }
2783
+ },
2784
+ 2
2785
+ )
2786
+ );
2787
+ }
2788
+ return nodes;
2789
+ };
2790
+
2361
2791
  // src/theme/default/components/default-components.tsx
2362
2792
  function getOryComponents(overrides) {
2363
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha;
2793
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja;
2364
2794
  return {
2365
2795
  Card: {
2366
2796
  Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
@@ -2384,44 +2814,45 @@ function getOryComponents(overrides) {
2384
2814
  Label: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Label) != null ? _H : DefaultLabel,
2385
2815
  Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
2386
2816
  Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
2387
- Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton
2817
+ Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton,
2818
+ Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha
2388
2819
  },
2389
2820
  Form: {
2390
- Root: (_P = (_O = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _O.Root) != null ? _P : DefaultFormContainer,
2391
- Group: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Group) != null ? _R : DefaultGroupContainer,
2392
- OidcRoot: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.OidcRoot) != null ? _T : DefaultSocialButtonContainer,
2393
- RecoveryCodesSettings: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.RecoveryCodesSettings) != null ? _V : DefaultSettingsRecoveryCodes,
2394
- TotpSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.TotpSettings) != null ? _X : DefaultSettingsTotp,
2395
- OidcSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.OidcSettings) != null ? _Z : DefaultSettingsOidc,
2396
- WebauthnSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.WebauthnSettings) != null ? _$ : DefaultSettingsWebauthn,
2397
- PasskeySettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.PasskeySettings) != null ? _ba : DefaultSettingsPasskey
2821
+ Root: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Root) != null ? _R : DefaultFormContainer,
2822
+ Group: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Group) != null ? _T : DefaultGroupContainer,
2823
+ OidcRoot: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.OidcRoot) != null ? _V : DefaultSocialButtonContainer,
2824
+ RecoveryCodesSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.RecoveryCodesSettings) != null ? _X : DefaultSettingsRecoveryCodes,
2825
+ TotpSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.TotpSettings) != null ? _Z : DefaultSettingsTotp,
2826
+ OidcSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.OidcSettings) != null ? _$ : DefaultSettingsOidc,
2827
+ WebauthnSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.WebauthnSettings) != null ? _ba : DefaultSettingsWebauthn,
2828
+ PasskeySettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.PasskeySettings) != null ? _da : DefaultSettingsPasskey
2398
2829
  },
2399
2830
  Message: {
2400
- Root: (_da = (_ca = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ca.Root) != null ? _da : DefaultMessageContainer,
2401
- Content: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Content) != null ? _fa : DefaultMessage
2831
+ Root: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Root) != null ? _fa : DefaultMessageContainer,
2832
+ Content: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Content) != null ? _ha : DefaultMessage
2402
2833
  },
2403
2834
  Page: {
2404
- Header: (_ha = (_ga = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ga.Header) != null ? _ha : DefaultPageHeader
2835
+ Header: (_ja = (_ia = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ia.Header) != null ? _ja : DefaultPageHeader
2405
2836
  }
2406
2837
  };
2407
2838
  }
2408
2839
 
2409
2840
  // src/theme/default/flows/error.tsx
2410
- import { jsx as jsx65 } from "react/jsx-runtime";
2411
- function Error({
2841
+ import { jsx as jsx91 } from "react/jsx-runtime";
2842
+ function Error2({
2412
2843
  error,
2413
2844
  children
2414
2845
  }) {
2415
- return /* @__PURE__ */ jsx65("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
2846
+ return /* @__PURE__ */ jsx91("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
2416
2847
  }
2417
2848
 
2418
2849
  // src/theme/default/flows/login.tsx
2419
- import { FlowType as FlowType8 } from "@ory/client-fetch";
2850
+ import { FlowType as FlowType15 } from "@ory/client-fetch";
2420
2851
  import {
2421
2852
  OryProvider,
2422
- OryTwoStepCard
2853
+ OryTwoStepCard as OryTwoStepCard2
2423
2854
  } from "@ory/elements-react";
2424
- import { jsx as jsx66 } from "react/jsx-runtime";
2855
+ import { jsx as jsx92 } from "react/jsx-runtime";
2425
2856
  function Login({
2426
2857
  flow,
2427
2858
  config,
@@ -2429,25 +2860,25 @@ function Login({
2429
2860
  components: flowOverrideComponents
2430
2861
  }) {
2431
2862
  const components = getOryComponents(flowOverrideComponents);
2432
- return /* @__PURE__ */ jsx66(
2863
+ return /* @__PURE__ */ jsx92(
2433
2864
  OryProvider,
2434
2865
  {
2435
2866
  config,
2436
2867
  flow,
2437
- flowType: FlowType8.Login,
2868
+ flowType: FlowType15.Login,
2438
2869
  components,
2439
- children: children != null ? children : /* @__PURE__ */ jsx66(OryTwoStepCard, {})
2870
+ children: children != null ? children : /* @__PURE__ */ jsx92(OryTwoStepCard2, {})
2440
2871
  }
2441
2872
  );
2442
2873
  }
2443
2874
 
2444
2875
  // src/theme/default/flows/recovery.tsx
2445
- import { FlowType as FlowType9 } from "@ory/client-fetch";
2876
+ import { FlowType as FlowType16 } from "@ory/client-fetch";
2446
2877
  import {
2447
2878
  OryProvider as OryProvider2,
2448
- OryTwoStepCard as OryTwoStepCard2
2879
+ OryTwoStepCard as OryTwoStepCard3
2449
2880
  } from "@ory/elements-react";
2450
- import { jsx as jsx67 } from "react/jsx-runtime";
2881
+ import { jsx as jsx93 } from "react/jsx-runtime";
2451
2882
  function Recovery({
2452
2883
  flow,
2453
2884
  config,
@@ -2455,25 +2886,25 @@ function Recovery({
2455
2886
  components: flowOverrideComponents
2456
2887
  }) {
2457
2888
  const components = getOryComponents(flowOverrideComponents);
2458
- return /* @__PURE__ */ jsx67(
2889
+ return /* @__PURE__ */ jsx93(
2459
2890
  OryProvider2,
2460
2891
  {
2461
2892
  config,
2462
2893
  flow,
2463
- flowType: FlowType9.Recovery,
2894
+ flowType: FlowType16.Recovery,
2464
2895
  components,
2465
- children: children != null ? children : /* @__PURE__ */ jsx67(OryTwoStepCard2, {})
2896
+ children: children != null ? children : /* @__PURE__ */ jsx93(OryTwoStepCard3, {})
2466
2897
  }
2467
2898
  );
2468
2899
  }
2469
2900
 
2470
2901
  // src/theme/default/flows/registration.tsx
2471
- import { FlowType as FlowType10 } from "@ory/client-fetch";
2902
+ import { FlowType as FlowType17 } from "@ory/client-fetch";
2472
2903
  import {
2473
2904
  OryProvider as OryProvider3,
2474
- OryTwoStepCard as OryTwoStepCard3
2905
+ OryTwoStepCard as OryTwoStepCard4
2475
2906
  } from "@ory/elements-react";
2476
- import { jsx as jsx68 } from "react/jsx-runtime";
2907
+ import { jsx as jsx94 } from "react/jsx-runtime";
2477
2908
  function Registration({
2478
2909
  flow,
2479
2910
  children,
@@ -2481,26 +2912,26 @@ function Registration({
2481
2912
  config
2482
2913
  }) {
2483
2914
  const components = getOryComponents(flowOverrideComponents);
2484
- return /* @__PURE__ */ jsx68(
2915
+ return /* @__PURE__ */ jsx94(
2485
2916
  OryProvider3,
2486
2917
  {
2487
2918
  config,
2488
2919
  flow,
2489
- flowType: FlowType10.Registration,
2920
+ flowType: FlowType17.Registration,
2490
2921
  components,
2491
- children: children != null ? children : /* @__PURE__ */ jsx68(OryTwoStepCard3, {})
2922
+ children: children != null ? children : /* @__PURE__ */ jsx94(OryTwoStepCard4, {})
2492
2923
  }
2493
2924
  );
2494
2925
  }
2495
2926
 
2496
2927
  // src/theme/default/flows/settings.tsx
2497
- import { FlowType as FlowType11 } from "@ory/client-fetch";
2928
+ import { FlowType as FlowType18 } from "@ory/client-fetch";
2498
2929
  import {
2499
2930
  HeadlessPageHeader,
2500
2931
  OryProvider as OryProvider4,
2501
2932
  OrySettingsCard
2502
2933
  } from "@ory/elements-react";
2503
- import { Fragment as Fragment5, jsx as jsx69, jsxs as jsxs36 } from "react/jsx-runtime";
2934
+ import { Fragment as Fragment13, jsx as jsx95, jsxs as jsxs43 } from "react/jsx-runtime";
2504
2935
  function Settings({
2505
2936
  flow,
2506
2937
  config,
@@ -2508,28 +2939,28 @@ function Settings({
2508
2939
  components: flowOverrideComponents
2509
2940
  }) {
2510
2941
  const components = getOryComponents(flowOverrideComponents);
2511
- return /* @__PURE__ */ jsx69(
2942
+ return /* @__PURE__ */ jsx95(
2512
2943
  OryProvider4,
2513
2944
  {
2514
2945
  config,
2515
2946
  flow,
2516
- flowType: FlowType11.Settings,
2947
+ flowType: FlowType18.Settings,
2517
2948
  components,
2518
- children: children != null ? children : /* @__PURE__ */ jsxs36(Fragment5, { children: [
2519
- /* @__PURE__ */ jsx69(HeadlessPageHeader, {}),
2520
- /* @__PURE__ */ jsx69(OrySettingsCard, {})
2949
+ children: children != null ? children : /* @__PURE__ */ jsxs43(Fragment13, { children: [
2950
+ /* @__PURE__ */ jsx95(HeadlessPageHeader, {}),
2951
+ /* @__PURE__ */ jsx95(OrySettingsCard, {})
2521
2952
  ] })
2522
2953
  }
2523
2954
  );
2524
2955
  }
2525
2956
 
2526
2957
  // src/theme/default/flows/verification.tsx
2527
- import { FlowType as FlowType12 } from "@ory/client-fetch";
2958
+ import { FlowType as FlowType19 } from "@ory/client-fetch";
2528
2959
  import {
2529
2960
  OryProvider as OryProvider5,
2530
- OryTwoStepCard as OryTwoStepCard4
2961
+ OryTwoStepCard as OryTwoStepCard5
2531
2962
  } from "@ory/elements-react";
2532
- import { jsx as jsx70 } from "react/jsx-runtime";
2963
+ import { jsx as jsx96 } from "react/jsx-runtime";
2533
2964
  function Verification({
2534
2965
  flow,
2535
2966
  config,
@@ -2537,14 +2968,14 @@ function Verification({
2537
2968
  components: flowOverrideComponents
2538
2969
  }) {
2539
2970
  const components = getOryComponents(flowOverrideComponents);
2540
- return /* @__PURE__ */ jsx70(
2971
+ return /* @__PURE__ */ jsx96(
2541
2972
  OryProvider5,
2542
2973
  {
2543
2974
  config,
2544
2975
  flow,
2545
- flowType: FlowType12.Verification,
2976
+ flowType: FlowType19.Verification,
2546
2977
  components,
2547
- children: children != null ? children : /* @__PURE__ */ jsx70(OryTwoStepCard4, {})
2978
+ children: children != null ? children : /* @__PURE__ */ jsx96(OryTwoStepCard5, {})
2548
2979
  }
2549
2980
  );
2550
2981
  }
@@ -2560,7 +2991,7 @@ export {
2560
2991
  DefaultFormContainer,
2561
2992
  DefaultMessage,
2562
2993
  DefaultMessageContainer,
2563
- Error,
2994
+ Error2 as Error,
2564
2995
  Login,
2565
2996
  Recovery,
2566
2997
  Registration,