@feelflow/ffid-sdk 8.0.0 → 9.0.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.
@@ -987,10 +987,23 @@ interface FFIDCookieBannerProps {
987
987
  * `useFFIDConsent()` instead of overriding the label.
988
988
  */
989
989
  closeLabel?: ReactNode;
990
+ /**
991
+ * Accessible name of the banner dialog (`aria-label`). Default: "Cookie 同意".
992
+ *
993
+ * Screen readers announce this before any visible copy, so localize it together with
994
+ * `message` and the button labels. Pass a non-empty string: an empty `aria-label`
995
+ * leaves the dialog without an accessible name.
996
+ */
997
+ ariaLabel?: string;
998
+ /**
999
+ * Label of the preferences button while the preference center is loading.
1000
+ * Default: "読み込み中...".
1001
+ */
1002
+ preferencesLoadingLabel?: ReactNode;
990
1003
  /** Custom root style. */
991
1004
  style?: CSSProperties;
992
1005
  }
993
- declare function FFIDCookieBanner({ className, classNames, message, acceptAllLabel, necessaryOnlyLabel, preferencesLabel, closeLabel, style, }: FFIDCookieBannerProps): React.JSX.Element | null;
1006
+ declare function FFIDCookieBanner({ className, classNames, message, acceptAllLabel, necessaryOnlyLabel, preferencesLabel, closeLabel, ariaLabel, preferencesLoadingLabel, style, }: FFIDCookieBannerProps): React.JSX.Element | null;
994
1007
 
995
1008
  /**
996
1009
  * `<FFIDCookieSettings>` — preference center modal.
@@ -1001,6 +1014,7 @@ declare function FFIDCookieBanner({ className, classNames, message, acceptAllLab
1001
1014
  *
1002
1015
  * Refs: docs/02-design/COOKIE_CONSENT.md §6.2 + §6.3
1003
1016
  */
1017
+
1004
1018
  interface FFIDCookieSettingsClassNames {
1005
1019
  root?: string;
1006
1020
  backdrop?: string;
@@ -1014,10 +1028,40 @@ interface FFIDCookieSettingsProps {
1014
1028
  classNames?: FFIDCookieSettingsClassNames;
1015
1029
  /** Open/close override; defaults to the context's `isPreferencesOpen`. */
1016
1030
  open?: boolean;
1017
- /** When true, also expose a "すべて撤回" button. Default: true. */
1031
+ /** When true, also expose the withdraw-all button (label: `withdrawLabel`). Default: true. */
1018
1032
  showWithdrawButton?: boolean;
1033
+ /**
1034
+ * Heading of the modal. Default: "Cookie 設定". Also the default accessible name of
1035
+ * the dialog unless `ariaLabel` is given, so pass a non-empty string: `title=""`
1036
+ * without `ariaLabel` leaves the dialog without an accessible name.
1037
+ */
1038
+ title?: string;
1039
+ /**
1040
+ * Accessible name of the dialog (`aria-label`). Default: `title`, then "Cookie 設定".
1041
+ * Pass a non-empty string: an empty `aria-label` leaves the dialog without an
1042
+ * accessible name.
1043
+ */
1044
+ ariaLabel?: string;
1045
+ /** Save button label. Default: "変更を保存". */
1046
+ saveLabel?: ReactNode;
1047
+ /** Save button label while the save is in flight. Default: "保存中...". */
1048
+ savingLabel?: ReactNode;
1049
+ /** Withdraw button label. Default: "すべて撤回". */
1050
+ withdrawLabel?: ReactNode;
1051
+ /** Withdraw button label while the withdrawal is in flight. Default: "撤回中...". */
1052
+ withdrawingLabel?: ReactNode;
1053
+ /**
1054
+ * Category names keyed by category code. Each given entry wins over both the category
1055
+ * master fetched from FFID and the built-in fallback shown before the master loads.
1056
+ * Missing codes keep those. Under `FFIDAnalyticsProvider` the master is always Japanese
1057
+ * (its consent client keeps the default `defaultLang: 'ja'`), so non-Japanese pages
1058
+ * need this prop.
1059
+ */
1060
+ categoryLabels?: Partial<Record<FFIDConsentCategoryCode, string>>;
1061
+ /** Category descriptions keyed by category code. Same precedence as `categoryLabels`. */
1062
+ categoryDescriptions?: Partial<Record<FFIDConsentCategoryCode, string>>;
1019
1063
  }
1020
- declare function FFIDCookieSettings({ className, classNames, open, showWithdrawButton, }: FFIDCookieSettingsProps): React.JSX.Element | null;
1064
+ declare function FFIDCookieSettings({ className, classNames, open, showWithdrawButton, title, ariaLabel, saveLabel, savingLabel, withdrawLabel, withdrawingLabel, categoryLabels, categoryDescriptions, }: FFIDCookieSettingsProps): React.JSX.Element | null;
1021
1065
 
1022
1066
  /**
1023
1067
  * `<FFIDCookieLink>` — footer link that opens the preference center.
@@ -987,10 +987,23 @@ interface FFIDCookieBannerProps {
987
987
  * `useFFIDConsent()` instead of overriding the label.
988
988
  */
989
989
  closeLabel?: ReactNode;
990
+ /**
991
+ * Accessible name of the banner dialog (`aria-label`). Default: "Cookie 同意".
992
+ *
993
+ * Screen readers announce this before any visible copy, so localize it together with
994
+ * `message` and the button labels. Pass a non-empty string: an empty `aria-label`
995
+ * leaves the dialog without an accessible name.
996
+ */
997
+ ariaLabel?: string;
998
+ /**
999
+ * Label of the preferences button while the preference center is loading.
1000
+ * Default: "読み込み中...".
1001
+ */
1002
+ preferencesLoadingLabel?: ReactNode;
990
1003
  /** Custom root style. */
991
1004
  style?: CSSProperties;
992
1005
  }
993
- declare function FFIDCookieBanner({ className, classNames, message, acceptAllLabel, necessaryOnlyLabel, preferencesLabel, closeLabel, style, }: FFIDCookieBannerProps): React.JSX.Element | null;
1006
+ declare function FFIDCookieBanner({ className, classNames, message, acceptAllLabel, necessaryOnlyLabel, preferencesLabel, closeLabel, ariaLabel, preferencesLoadingLabel, style, }: FFIDCookieBannerProps): React.JSX.Element | null;
994
1007
 
995
1008
  /**
996
1009
  * `<FFIDCookieSettings>` — preference center modal.
@@ -1001,6 +1014,7 @@ declare function FFIDCookieBanner({ className, classNames, message, acceptAllLab
1001
1014
  *
1002
1015
  * Refs: docs/02-design/COOKIE_CONSENT.md §6.2 + §6.3
1003
1016
  */
1017
+
1004
1018
  interface FFIDCookieSettingsClassNames {
1005
1019
  root?: string;
1006
1020
  backdrop?: string;
@@ -1014,10 +1028,40 @@ interface FFIDCookieSettingsProps {
1014
1028
  classNames?: FFIDCookieSettingsClassNames;
1015
1029
  /** Open/close override; defaults to the context's `isPreferencesOpen`. */
1016
1030
  open?: boolean;
1017
- /** When true, also expose a "すべて撤回" button. Default: true. */
1031
+ /** When true, also expose the withdraw-all button (label: `withdrawLabel`). Default: true. */
1018
1032
  showWithdrawButton?: boolean;
1033
+ /**
1034
+ * Heading of the modal. Default: "Cookie 設定". Also the default accessible name of
1035
+ * the dialog unless `ariaLabel` is given, so pass a non-empty string: `title=""`
1036
+ * without `ariaLabel` leaves the dialog without an accessible name.
1037
+ */
1038
+ title?: string;
1039
+ /**
1040
+ * Accessible name of the dialog (`aria-label`). Default: `title`, then "Cookie 設定".
1041
+ * Pass a non-empty string: an empty `aria-label` leaves the dialog without an
1042
+ * accessible name.
1043
+ */
1044
+ ariaLabel?: string;
1045
+ /** Save button label. Default: "変更を保存". */
1046
+ saveLabel?: ReactNode;
1047
+ /** Save button label while the save is in flight. Default: "保存中...". */
1048
+ savingLabel?: ReactNode;
1049
+ /** Withdraw button label. Default: "すべて撤回". */
1050
+ withdrawLabel?: ReactNode;
1051
+ /** Withdraw button label while the withdrawal is in flight. Default: "撤回中...". */
1052
+ withdrawingLabel?: ReactNode;
1053
+ /**
1054
+ * Category names keyed by category code. Each given entry wins over both the category
1055
+ * master fetched from FFID and the built-in fallback shown before the master loads.
1056
+ * Missing codes keep those. Under `FFIDAnalyticsProvider` the master is always Japanese
1057
+ * (its consent client keeps the default `defaultLang: 'ja'`), so non-Japanese pages
1058
+ * need this prop.
1059
+ */
1060
+ categoryLabels?: Partial<Record<FFIDConsentCategoryCode, string>>;
1061
+ /** Category descriptions keyed by category code. Same precedence as `categoryLabels`. */
1062
+ categoryDescriptions?: Partial<Record<FFIDConsentCategoryCode, string>>;
1019
1063
  }
1020
- declare function FFIDCookieSettings({ className, classNames, open, showWithdrawButton, }: FFIDCookieSettingsProps): React.JSX.Element | null;
1064
+ declare function FFIDCookieSettings({ className, classNames, open, showWithdrawButton, title, ariaLabel, saveLabel, savingLabel, withdrawLabel, withdrawingLabel, categoryLabels, categoryDescriptions, }: FFIDCookieSettingsProps): React.JSX.Element | null;
1021
1065
 
1022
1066
  /**
1023
1067
  * `<FFIDCookieLink>` — footer link that opens the preference center.
@@ -228,18 +228,16 @@ function mapUserinfoSubscriptionToSession(userinfo, serviceCode) {
228
228
  ];
229
229
  }
230
230
  var JWKS_ENDPOINT = "/.well-known/jwks.json";
231
- var LEGACY_JWT_ISSUER = "https://id.feelflow.net";
232
231
  var JWT_ALGORITHM = "ES256";
233
232
  var JWT_CLOCK_TOLERANCE_SECONDS = 30;
234
- function resolveAcceptedIssuers(baseUrl) {
235
- const deployedOrigin = new URL(baseUrl).origin;
236
- return deployedOrigin === LEGACY_JWT_ISSUER ? [LEGACY_JWT_ISSUER] : [deployedOrigin, LEGACY_JWT_ISSUER];
233
+ function resolveAcceptedIssuer(baseUrl) {
234
+ return new URL(baseUrl).origin;
237
235
  }
238
236
  function createJwtVerifier(deps) {
239
237
  const { baseUrl, serviceCode, logger, createError, errorCodes } = deps;
240
238
  const jwksUrl = new URL(JWKS_ENDPOINT, baseUrl);
241
239
  const jwks = jose.createRemoteJWKSet(jwksUrl);
242
- const acceptedIssuers = resolveAcceptedIssuers(baseUrl);
240
+ const acceptedIssuer = resolveAcceptedIssuer(baseUrl);
243
241
  async function verifyJwt(accessToken) {
244
242
  if (!accessToken || !accessToken.trim()) {
245
243
  return {
@@ -252,7 +250,7 @@ function createJwtVerifier(deps) {
252
250
  try {
253
251
  const { payload } = await jose.jwtVerify(accessToken, jwks, {
254
252
  algorithms: [JWT_ALGORITHM],
255
- issuer: acceptedIssuers,
253
+ issuer: acceptedIssuer,
256
254
  audience: serviceCode,
257
255
  clockTolerance: JWT_CLOCK_TOLERANCE_SECONDS
258
256
  });
@@ -1378,7 +1376,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
1378
1376
  };
1379
1377
 
1380
1378
  // src/client/version-check.ts
1381
- var SDK_VERSION = "8.0.0";
1379
+ var SDK_VERSION = "9.0.0";
1382
1380
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1383
1381
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1384
1382
  function sdkHeaders() {
@@ -1476,6 +1476,8 @@ function useFFIDConsentPreferences() {
1476
1476
  withdraw: ctx.withdraw
1477
1477
  };
1478
1478
  }
1479
+ var DEFAULT_BANNER_ARIA_LABEL = "Cookie \u540C\u610F";
1480
+ var DEFAULT_PREFERENCES_LOADING_LABEL = "\u8AAD\u307F\u8FBC\u307F\u4E2D...";
1479
1481
  var DEFAULT_STYLE = {
1480
1482
  position: "fixed",
1481
1483
  bottom: 0,
@@ -1519,6 +1521,8 @@ function FFIDCookieBanner({
1519
1521
  necessaryOnlyLabel,
1520
1522
  preferencesLabel,
1521
1523
  closeLabel,
1524
+ ariaLabel,
1525
+ preferencesLoadingLabel,
1522
1526
  style
1523
1527
  }) {
1524
1528
  const {
@@ -1560,7 +1564,7 @@ function FFIDCookieBanner({
1560
1564
  {
1561
1565
  role: "dialog",
1562
1566
  "aria-modal": "false",
1563
- "aria-label": "Cookie \u540C\u610F",
1567
+ "aria-label": ariaLabel ?? DEFAULT_BANNER_ARIA_LABEL,
1564
1568
  "aria-busy": isOpeningPreferences,
1565
1569
  className: className ?? classNames?.root,
1566
1570
  style: style ?? DEFAULT_STYLE,
@@ -1632,7 +1636,7 @@ function FFIDCookieBanner({
1632
1636
  void handleOpenPreferences();
1633
1637
  },
1634
1638
  "data-testid": "ffid-cookie-banner-preferences",
1635
- children: pendingAction === "preferences" ? "\u8AAD\u307F\u8FBC\u307F\u4E2D..." : preferencesLabel ?? "\u8A73\u7D30\u8A2D\u5B9A"
1639
+ children: pendingAction === "preferences" ? preferencesLoadingLabel ?? DEFAULT_PREFERENCES_LOADING_LABEL : preferencesLabel ?? "\u8A73\u7D30\u8A2D\u5B9A"
1636
1640
  }
1637
1641
  ),
1638
1642
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1661,6 +1665,13 @@ function FFIDCookieBanner({
1661
1665
  );
1662
1666
  }
1663
1667
  var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
1668
+ var DEFAULT_SETTINGS_TITLE = "Cookie \u8A2D\u5B9A";
1669
+ var DEFAULT_SETTINGS_BUTTON_LABELS = {
1670
+ save: "\u5909\u66F4\u3092\u4FDD\u5B58",
1671
+ saving: "\u4FDD\u5B58\u4E2D...",
1672
+ withdraw: "\u3059\u3079\u3066\u64A4\u56DE",
1673
+ withdrawing: "\u64A4\u56DE\u4E2D..."
1674
+ };
1664
1675
  var DEFAULT_BACKDROP_STYLE = {
1665
1676
  position: "fixed",
1666
1677
  inset: 0,
@@ -1694,7 +1705,15 @@ function FFIDCookieSettings({
1694
1705
  className,
1695
1706
  classNames,
1696
1707
  open,
1697
- showWithdrawButton = true
1708
+ showWithdrawButton = true,
1709
+ title,
1710
+ ariaLabel,
1711
+ saveLabel,
1712
+ savingLabel,
1713
+ withdrawLabel,
1714
+ withdrawingLabel,
1715
+ categoryLabels,
1716
+ categoryDescriptions
1698
1717
  }) {
1699
1718
  const { isPreferencesOpen, closePreferences, error } = useFFIDConsent();
1700
1719
  const { state, categoryMetadata, save, withdraw } = useFFIDConsentPreferences();
@@ -1789,6 +1808,7 @@ function FFIDCookieSettings({
1789
1808
  };
1790
1809
  }, [visible, closePreferences]);
1791
1810
  if (!visible) return null;
1811
+ const heading = title ?? DEFAULT_SETTINGS_TITLE;
1792
1812
  return /* @__PURE__ */ jsxRuntime.jsx(
1793
1813
  "div",
1794
1814
  {
@@ -1805,14 +1825,14 @@ function FFIDCookieSettings({
1805
1825
  {
1806
1826
  role: "dialog",
1807
1827
  "aria-modal": "true",
1808
- "aria-label": "Cookie \u8A2D\u5B9A",
1828
+ "aria-label": ariaLabel ?? heading,
1809
1829
  "aria-busy": isSubmitting,
1810
1830
  className: className ?? classNames?.root,
1811
1831
  style: DEFAULT_MODAL_STYLE,
1812
1832
  "data-testid": "ffid-cookie-settings",
1813
1833
  ref: modalRef,
1814
1834
  children: [
1815
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: classNames?.header, children: /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { margin: 0, fontSize: "18px" }, children: "Cookie \u8A2D\u5B9A" }) }),
1835
+ /* @__PURE__ */ jsxRuntime.jsx("header", { className: classNames?.header, children: /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { margin: 0, fontSize: "18px" }, children: heading }) }),
1816
1836
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: (categoryMetadata ?? FALLBACK_CATEGORIES).map((cat) => {
1817
1837
  const checked = cat.code === "necessary" ? true : draft[cat.code] ?? false;
1818
1838
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1822,8 +1842,8 @@ function FFIDCookieSettings({
1822
1842
  style: ROW_STYLE,
1823
1843
  children: [
1824
1844
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
1825
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 600, fontSize: "14px" }, children: cat.label }),
1826
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#6b7280", fontSize: "13px" }, children: cat.description })
1845
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 600, fontSize: "14px" }, children: categoryLabels?.[cat.code] ?? cat.label }),
1846
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#6b7280", fontSize: "13px" }, children: categoryDescriptions?.[cat.code] ?? cat.description })
1827
1847
  ] }),
1828
1848
  /* @__PURE__ */ jsxRuntime.jsx(
1829
1849
  "input",
@@ -1879,7 +1899,7 @@ function FFIDCookieSettings({
1879
1899
  cursor: isSubmitting ? "wait" : "pointer"
1880
1900
  },
1881
1901
  "data-testid": "ffid-cookie-settings-withdraw",
1882
- children: pendingAction === "withdraw" ? "\u64A4\u56DE\u4E2D..." : "\u3059\u3079\u3066\u64A4\u56DE"
1902
+ children: pendingAction === "withdraw" ? withdrawingLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.withdrawing : withdrawLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.withdraw
1883
1903
  }
1884
1904
  ) : null,
1885
1905
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1901,7 +1921,7 @@ function FFIDCookieSettings({
1901
1921
  cursor: isSubmitting ? "wait" : "pointer"
1902
1922
  },
1903
1923
  "data-testid": "ffid-cookie-settings-save",
1904
- children: pendingAction === "save" ? "\u4FDD\u5B58\u4E2D..." : "\u5909\u66F4\u3092\u4FDD\u5B58"
1924
+ children: pendingAction === "save" ? savingLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.saving : saveLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.save
1905
1925
  }
1906
1926
  )
1907
1927
  ]
@@ -1474,6 +1474,8 @@ function useFFIDConsentPreferences() {
1474
1474
  withdraw: ctx.withdraw
1475
1475
  };
1476
1476
  }
1477
+ var DEFAULT_BANNER_ARIA_LABEL = "Cookie \u540C\u610F";
1478
+ var DEFAULT_PREFERENCES_LOADING_LABEL = "\u8AAD\u307F\u8FBC\u307F\u4E2D...";
1477
1479
  var DEFAULT_STYLE = {
1478
1480
  position: "fixed",
1479
1481
  bottom: 0,
@@ -1517,6 +1519,8 @@ function FFIDCookieBanner({
1517
1519
  necessaryOnlyLabel,
1518
1520
  preferencesLabel,
1519
1521
  closeLabel,
1522
+ ariaLabel,
1523
+ preferencesLoadingLabel,
1520
1524
  style
1521
1525
  }) {
1522
1526
  const {
@@ -1558,7 +1562,7 @@ function FFIDCookieBanner({
1558
1562
  {
1559
1563
  role: "dialog",
1560
1564
  "aria-modal": "false",
1561
- "aria-label": "Cookie \u540C\u610F",
1565
+ "aria-label": ariaLabel ?? DEFAULT_BANNER_ARIA_LABEL,
1562
1566
  "aria-busy": isOpeningPreferences,
1563
1567
  className: className ?? classNames?.root,
1564
1568
  style: style ?? DEFAULT_STYLE,
@@ -1630,7 +1634,7 @@ function FFIDCookieBanner({
1630
1634
  void handleOpenPreferences();
1631
1635
  },
1632
1636
  "data-testid": "ffid-cookie-banner-preferences",
1633
- children: pendingAction === "preferences" ? "\u8AAD\u307F\u8FBC\u307F\u4E2D..." : preferencesLabel ?? "\u8A73\u7D30\u8A2D\u5B9A"
1637
+ children: pendingAction === "preferences" ? preferencesLoadingLabel ?? DEFAULT_PREFERENCES_LOADING_LABEL : preferencesLabel ?? "\u8A73\u7D30\u8A2D\u5B9A"
1634
1638
  }
1635
1639
  ),
1636
1640
  /* @__PURE__ */ jsx(
@@ -1659,6 +1663,13 @@ function FFIDCookieBanner({
1659
1663
  );
1660
1664
  }
1661
1665
  var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
1666
+ var DEFAULT_SETTINGS_TITLE = "Cookie \u8A2D\u5B9A";
1667
+ var DEFAULT_SETTINGS_BUTTON_LABELS = {
1668
+ save: "\u5909\u66F4\u3092\u4FDD\u5B58",
1669
+ saving: "\u4FDD\u5B58\u4E2D...",
1670
+ withdraw: "\u3059\u3079\u3066\u64A4\u56DE",
1671
+ withdrawing: "\u64A4\u56DE\u4E2D..."
1672
+ };
1662
1673
  var DEFAULT_BACKDROP_STYLE = {
1663
1674
  position: "fixed",
1664
1675
  inset: 0,
@@ -1692,7 +1703,15 @@ function FFIDCookieSettings({
1692
1703
  className,
1693
1704
  classNames,
1694
1705
  open,
1695
- showWithdrawButton = true
1706
+ showWithdrawButton = true,
1707
+ title,
1708
+ ariaLabel,
1709
+ saveLabel,
1710
+ savingLabel,
1711
+ withdrawLabel,
1712
+ withdrawingLabel,
1713
+ categoryLabels,
1714
+ categoryDescriptions
1696
1715
  }) {
1697
1716
  const { isPreferencesOpen, closePreferences, error } = useFFIDConsent();
1698
1717
  const { state, categoryMetadata, save, withdraw } = useFFIDConsentPreferences();
@@ -1787,6 +1806,7 @@ function FFIDCookieSettings({
1787
1806
  };
1788
1807
  }, [visible, closePreferences]);
1789
1808
  if (!visible) return null;
1809
+ const heading = title ?? DEFAULT_SETTINGS_TITLE;
1790
1810
  return /* @__PURE__ */ jsx(
1791
1811
  "div",
1792
1812
  {
@@ -1803,14 +1823,14 @@ function FFIDCookieSettings({
1803
1823
  {
1804
1824
  role: "dialog",
1805
1825
  "aria-modal": "true",
1806
- "aria-label": "Cookie \u8A2D\u5B9A",
1826
+ "aria-label": ariaLabel ?? heading,
1807
1827
  "aria-busy": isSubmitting,
1808
1828
  className: className ?? classNames?.root,
1809
1829
  style: DEFAULT_MODAL_STYLE,
1810
1830
  "data-testid": "ffid-cookie-settings",
1811
1831
  ref: modalRef,
1812
1832
  children: [
1813
- /* @__PURE__ */ jsx("header", { className: classNames?.header, children: /* @__PURE__ */ jsx("h2", { style: { margin: 0, fontSize: "18px" }, children: "Cookie \u8A2D\u5B9A" }) }),
1833
+ /* @__PURE__ */ jsx("header", { className: classNames?.header, children: /* @__PURE__ */ jsx("h2", { style: { margin: 0, fontSize: "18px" }, children: heading }) }),
1814
1834
  /* @__PURE__ */ jsx("div", { children: (categoryMetadata ?? FALLBACK_CATEGORIES).map((cat) => {
1815
1835
  const checked = cat.code === "necessary" ? true : draft[cat.code] ?? false;
1816
1836
  return /* @__PURE__ */ jsxs(
@@ -1820,8 +1840,8 @@ function FFIDCookieSettings({
1820
1840
  style: ROW_STYLE,
1821
1841
  children: [
1822
1842
  /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
1823
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 600, fontSize: "14px" }, children: cat.label }),
1824
- /* @__PURE__ */ jsx("div", { style: { color: "#6b7280", fontSize: "13px" }, children: cat.description })
1843
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 600, fontSize: "14px" }, children: categoryLabels?.[cat.code] ?? cat.label }),
1844
+ /* @__PURE__ */ jsx("div", { style: { color: "#6b7280", fontSize: "13px" }, children: categoryDescriptions?.[cat.code] ?? cat.description })
1825
1845
  ] }),
1826
1846
  /* @__PURE__ */ jsx(
1827
1847
  "input",
@@ -1877,7 +1897,7 @@ function FFIDCookieSettings({
1877
1897
  cursor: isSubmitting ? "wait" : "pointer"
1878
1898
  },
1879
1899
  "data-testid": "ffid-cookie-settings-withdraw",
1880
- children: pendingAction === "withdraw" ? "\u64A4\u56DE\u4E2D..." : "\u3059\u3079\u3066\u64A4\u56DE"
1900
+ children: pendingAction === "withdraw" ? withdrawingLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.withdrawing : withdrawLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.withdraw
1881
1901
  }
1882
1902
  ) : null,
1883
1903
  /* @__PURE__ */ jsx(
@@ -1899,7 +1919,7 @@ function FFIDCookieSettings({
1899
1919
  cursor: isSubmitting ? "wait" : "pointer"
1900
1920
  },
1901
1921
  "data-testid": "ffid-cookie-settings-save",
1902
- children: pendingAction === "save" ? "\u4FDD\u5B58\u4E2D..." : "\u5909\u66F4\u3092\u4FDD\u5B58"
1922
+ children: pendingAction === "save" ? savingLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.saving : saveLabel ?? DEFAULT_SETTINGS_BUTTON_LABELS.save
1903
1923
  }
1904
1924
  )
1905
1925
  ]
@@ -226,18 +226,16 @@ function mapUserinfoSubscriptionToSession(userinfo, serviceCode) {
226
226
  ];
227
227
  }
228
228
  var JWKS_ENDPOINT = "/.well-known/jwks.json";
229
- var LEGACY_JWT_ISSUER = "https://id.feelflow.net";
230
229
  var JWT_ALGORITHM = "ES256";
231
230
  var JWT_CLOCK_TOLERANCE_SECONDS = 30;
232
- function resolveAcceptedIssuers(baseUrl) {
233
- const deployedOrigin = new URL(baseUrl).origin;
234
- return deployedOrigin === LEGACY_JWT_ISSUER ? [LEGACY_JWT_ISSUER] : [deployedOrigin, LEGACY_JWT_ISSUER];
231
+ function resolveAcceptedIssuer(baseUrl) {
232
+ return new URL(baseUrl).origin;
235
233
  }
236
234
  function createJwtVerifier(deps) {
237
235
  const { baseUrl, serviceCode, logger, createError, errorCodes } = deps;
238
236
  const jwksUrl = new URL(JWKS_ENDPOINT, baseUrl);
239
237
  const jwks = createRemoteJWKSet(jwksUrl);
240
- const acceptedIssuers = resolveAcceptedIssuers(baseUrl);
238
+ const acceptedIssuer = resolveAcceptedIssuer(baseUrl);
241
239
  async function verifyJwt(accessToken) {
242
240
  if (!accessToken || !accessToken.trim()) {
243
241
  return {
@@ -250,7 +248,7 @@ function createJwtVerifier(deps) {
250
248
  try {
251
249
  const { payload } = await jwtVerify(accessToken, jwks, {
252
250
  algorithms: [JWT_ALGORITHM],
253
- issuer: acceptedIssuers,
251
+ issuer: acceptedIssuer,
254
252
  audience: serviceCode,
255
253
  clockTolerance: JWT_CLOCK_TOLERANCE_SECONDS
256
254
  });
@@ -1376,7 +1374,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
1376
1374
  };
1377
1375
 
1378
1376
  // src/client/version-check.ts
1379
- var SDK_VERSION = "8.0.0";
1377
+ var SDK_VERSION = "9.0.0";
1380
1378
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1381
1379
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1382
1380
  function sdkHeaders() {
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNCK5E3Y_cjs = require('../chunk-RNCK5E3Y.cjs');
3
+ var chunkQ2ZQJS36_cjs = require('../chunk-Q2ZQJS36.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkRNCK5E3Y_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkRNCK5E3Y_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkRNCK5E3Y_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkRNCK5E3Y_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkRNCK5E3Y_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkRNCK5E3Y_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkRNCK5E3Y_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkQ2ZQJS36_cjs.FFIDUserMenu; }
34
34
  });
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-YKBAFPX5.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-TUXIJEEZ.js';