@underverse-ui/underverse 1.0.68 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1547,40 +1547,87 @@ function normalizeLocale(locale, fallback) {
1547
1547
  return fallback;
1548
1548
  }
1549
1549
  var NextIntlBridgeContext = React5.createContext(null);
1550
- function NextIntlAdapter({ children }) {
1551
- const locale = normalizeLocale(useLocale(), "en");
1552
- const messages = useMessages();
1553
- const translatorCache = React5.useMemo(() => /* @__PURE__ */ new Map(), [locale, messages]);
1554
- const translate = React5.useCallback((namespace, key) => {
1550
+ function isMissingIntlContextError(error) {
1551
+ if (!(error instanceof Error)) return false;
1552
+ const message = error.message || "";
1553
+ const stack = error.stack || "";
1554
+ return message.includes("No intl context found.") || !message && stack.includes("use-intl/dist/esm/") && stack.includes("NextIntlAdapterWithContext");
1555
+ }
1556
+ var NextIntlAdapterBoundary = class extends React5.Component {
1557
+ constructor() {
1558
+ super(...arguments);
1559
+ this.state = { error: null };
1560
+ }
1561
+ static getDerivedStateFromError(error) {
1562
+ return { error };
1563
+ }
1564
+ componentDidUpdate(prevProps) {
1565
+ if (this.state.error && prevProps.children !== this.props.children) {
1566
+ this.setState({ error: null });
1567
+ }
1568
+ }
1569
+ render() {
1570
+ if (!this.state.error) {
1571
+ return this.props.children;
1572
+ }
1573
+ if (isMissingIntlContextError(this.state.error)) {
1574
+ return this.props.fallback;
1575
+ }
1576
+ throw this.state.error;
1577
+ }
1578
+ };
1579
+ function NextIntlAdapterProvider({
1580
+ children,
1581
+ locale,
1582
+ messages
1583
+ }) {
1584
+ const normalizedLocale = normalizeLocale(locale, "en");
1585
+ const translatorCache = React5.useMemo(
1586
+ () => /* @__PURE__ */ new Map(),
1587
+ [normalizedLocale, messages]
1588
+ );
1589
+ const translate = React5.useCallback((namespace, key, values) => {
1555
1590
  let translator = translatorCache.get(namespace);
1556
1591
  if (!translator) {
1557
- translator = createTranslator({
1558
- locale,
1592
+ const runtimeTranslator = createTranslator({
1593
+ locale: normalizedLocale,
1559
1594
  messages,
1560
1595
  namespace,
1561
1596
  onError: () => {
1562
1597
  }
1563
1598
  });
1599
+ translator = (translationKey, translationValues) => runtimeTranslator(translationKey, translationValues);
1564
1600
  translatorCache.set(namespace, translator);
1565
1601
  }
1566
1602
  try {
1567
1603
  return {
1568
- locale,
1569
- translated: translator(key)
1604
+ locale: normalizedLocale,
1605
+ translated: translator(key, values)
1570
1606
  };
1571
1607
  } catch {
1572
1608
  return {
1573
- locale,
1609
+ locale: normalizedLocale,
1574
1610
  translated: null
1575
1611
  };
1576
1612
  }
1577
- }, [locale, messages, translatorCache]);
1613
+ }, [messages, normalizedLocale, translatorCache]);
1578
1614
  const value = React5.useMemo(() => ({
1579
- locale,
1615
+ locale: normalizedLocale,
1580
1616
  translate
1581
- }), [locale, translate]);
1617
+ }), [normalizedLocale, translate]);
1582
1618
  return /* @__PURE__ */ jsx6(NextIntlBridgeContext.Provider, { value, children });
1583
1619
  }
1620
+ function NextIntlAdapterWithContext({ children }) {
1621
+ const locale = useLocale();
1622
+ const messages = useMessages();
1623
+ return /* @__PURE__ */ jsx6(NextIntlAdapterProvider, { locale, messages, children });
1624
+ }
1625
+ function NextIntlAdapter({ children, locale, messages }) {
1626
+ if (locale && messages) {
1627
+ return /* @__PURE__ */ jsx6(NextIntlAdapterProvider, { locale, messages, children });
1628
+ }
1629
+ return /* @__PURE__ */ jsx6(NextIntlAdapterBoundary, { fallback: children, children: /* @__PURE__ */ jsx6(NextIntlAdapterWithContext, { children }) });
1630
+ }
1584
1631
  var UnderverseNextIntlProvider = NextIntlAdapter;
1585
1632
  function useNextIntlBridge() {
1586
1633
  return React5.useContext(NextIntlBridgeContext);
@@ -21620,396 +21667,8 @@ var VARIANT_STYLES_ALERT = {
21620
21667
  // ../../lib/i18n/translation-adapter.tsx
21621
21668
  import * as React64 from "react";
21622
21669
  import { jsx as jsx72 } from "react/jsx-runtime";
21623
- var defaultTranslations2 = {
21624
- en: {
21625
- Common: {
21626
- close: "Close",
21627
- closeAlert: "Close alert",
21628
- notifications: "Notifications",
21629
- newNotification: "New",
21630
- readStatus: "Read",
21631
- openLink: "Open link",
21632
- theme: "Theme",
21633
- lightTheme: "Light",
21634
- darkTheme: "Dark",
21635
- systemTheme: "System",
21636
- density: "Density",
21637
- compact: "Compact",
21638
- normal: "Normal",
21639
- comfortable: "Comfortable",
21640
- columns: "Columns"
21641
- },
21642
- ValidationInput: {
21643
- required: "This field is required",
21644
- typeMismatch: "Invalid format",
21645
- pattern: "Invalid pattern",
21646
- tooShort: "Too short",
21647
- tooLong: "Too long",
21648
- rangeUnderflow: "Below minimum",
21649
- rangeOverflow: "Above maximum",
21650
- stepMismatch: "Step mismatch",
21651
- badInput: "Bad input",
21652
- invalid: "Invalid value"
21653
- },
21654
- Loading: {
21655
- loadingPage: "Loading page",
21656
- pleaseWait: "Please wait"
21657
- },
21658
- DatePicker: {
21659
- placeholder: "Select date",
21660
- today: "Today",
21661
- clear: "Clear"
21662
- },
21663
- CalendarTimeline: {
21664
- today: "Today",
21665
- prev: "Previous",
21666
- next: "Next",
21667
- month: "Month",
21668
- week: "Week",
21669
- day: "Day",
21670
- sprint: "Sprint",
21671
- newEvent: "New event",
21672
- createEventTitle: "Create event",
21673
- create: "Create",
21674
- cancel: "Cancel",
21675
- resource: "Resource",
21676
- start: "Start",
21677
- end: "End",
21678
- sprints: "{n} sprints",
21679
- resourcesHeader: "Resources",
21680
- expandGroup: "Expand group",
21681
- collapseGroup: "Collapse group",
21682
- more: "+{n} more",
21683
- deleteConfirm: "Delete?"
21684
- },
21685
- Pagination: {
21686
- navigationLabel: "Pagination navigation",
21687
- showingResults: "Showing {startItem}\u2013{endItem} of {totalItems}",
21688
- firstPage: "First page",
21689
- previousPage: "Previous page",
21690
- previous: "Previous",
21691
- nextPage: "Next page",
21692
- next: "Next",
21693
- lastPage: "Last page",
21694
- pageNumber: "Page {page}",
21695
- itemsPerPage: "Items per page",
21696
- search: "Search",
21697
- noOptions: "No options"
21698
- },
21699
- Form: {
21700
- required: "This field is required"
21701
- },
21702
- OCR: {
21703
- imageUpload: {
21704
- dragDropText: "Drag & drop files here",
21705
- browseFiles: "Browse files",
21706
- supportedFormats: "Supported formats: images"
21707
- }
21708
- }
21709
- },
21710
- vi: {
21711
- Common: {
21712
- close: "\u0110\xF3ng",
21713
- closeAlert: "\u0110\xF3ng c\u1EA3nh b\xE1o",
21714
- notifications: "Th\xF4ng b\xE1o",
21715
- newNotification: "M\u1EDBi",
21716
- readStatus: "\u0110\xE3 \u0111\u1ECDc",
21717
- openLink: "M\u1EDF li\xEAn k\u1EBFt",
21718
- theme: "Ch\u1EE7 \u0111\u1EC1",
21719
- lightTheme: "Giao di\u1EC7n s\xE1ng",
21720
- darkTheme: "Giao di\u1EC7n t\u1ED1i",
21721
- systemTheme: "Theo h\u1EC7 th\u1ED1ng",
21722
- density: "M\u1EADt \u0111\u1ED9",
21723
- compact: "G\u1ECDn",
21724
- normal: "Th\u01B0\u1EDDng",
21725
- comfortable: "Tho\u1EA3i m\xE1i",
21726
- columns: "C\u1ED9t"
21727
- },
21728
- ValidationInput: {
21729
- required: "Tr\u01B0\u1EDDng n\xE0y l\xE0 b\u1EAFt bu\u1ED9c",
21730
- typeMismatch: "\u0110\u1ECBnh d\u1EA1ng kh\xF4ng h\u1EE3p l\u1EC7",
21731
- pattern: "Sai m\u1EABu",
21732
- tooShort: "Qu\xE1 ng\u1EAFn",
21733
- tooLong: "Qu\xE1 d\xE0i",
21734
- rangeUnderflow: "Nh\u1ECF h\u01A1n gi\xE1 tr\u1ECB t\u1ED1i thi\u1EC3u",
21735
- rangeOverflow: "L\u1EDBn h\u01A1n gi\xE1 tr\u1ECB t\u1ED1i \u0111a",
21736
- stepMismatch: "Sai b\u01B0\u1EDBc",
21737
- badInput: "Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7",
21738
- invalid: "Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7"
21739
- },
21740
- Loading: {
21741
- loadingPage: "\u0110ang t\u1EA3i trang",
21742
- pleaseWait: "Vui l\xF2ng ch\u1EDD"
21743
- },
21744
- DatePicker: {
21745
- placeholder: "Ch\u1ECDn ng\xE0y",
21746
- today: "H\xF4m nay",
21747
- clear: "X\xF3a"
21748
- },
21749
- CalendarTimeline: {
21750
- today: "H\xF4m nay",
21751
- prev: "Tr\u01B0\u1EDBc",
21752
- next: "Sau",
21753
- month: "Th\xE1ng",
21754
- week: "Tu\u1EA7n",
21755
- day: "Ng\xE0y",
21756
- sprint: "Sprint",
21757
- newEvent: "Th\xEAm s\u1EF1 ki\u1EC7n",
21758
- createEventTitle: "T\u1EA1o s\u1EF1 ki\u1EC7n",
21759
- create: "T\u1EA1o",
21760
- cancel: "H\u1EE7y",
21761
- resource: "T\xE0i nguy\xEAn",
21762
- start: "B\u1EAFt \u0111\u1EA7u",
21763
- end: "K\u1EBFt th\xFAc",
21764
- sprints: "{n} sprint",
21765
- resourcesHeader: "T\xE0i nguy\xEAn",
21766
- expandGroup: "M\u1EDF nh\xF3m",
21767
- collapseGroup: "Thu g\u1ECDn nh\xF3m",
21768
- more: "+{n} th\xEAm",
21769
- deleteConfirm: "X\xF3a?"
21770
- },
21771
- Pagination: {
21772
- navigationLabel: "\u0110i\u1EC1u h\u01B0\u1EDBng ph\xE2n trang",
21773
- showingResults: "Hi\u1EC3n th\u1ECB {startItem}\u2013{endItem} trong t\u1ED5ng {totalItems}",
21774
- firstPage: "Trang \u0111\u1EA7u",
21775
- previousPage: "Trang tr\u01B0\u1EDBc",
21776
- previous: "Tr\u01B0\u1EDBc",
21777
- nextPage: "Trang sau",
21778
- next: "Sau",
21779
- lastPage: "Trang cu\u1ED1i",
21780
- pageNumber: "Trang {page}",
21781
- itemsPerPage: "S\u1ED1 m\u1EE5c/trang",
21782
- search: "T\xECm ki\u1EBFm",
21783
- noOptions: "Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn"
21784
- },
21785
- Form: {
21786
- required: "Tr\u01B0\u1EDDng n\xE0y l\xE0 b\u1EAFt bu\u1ED9c"
21787
- },
21788
- OCR: {
21789
- imageUpload: {
21790
- dragDropText: "K\xE9o & th\u1EA3 \u1EA3nh v\xE0o \u0111\xE2y",
21791
- browseFiles: "Ch\u1ECDn t\u1EC7p",
21792
- supportedFormats: "H\u1ED7 tr\u1EE3 c\xE1c \u0111\u1ECBnh d\u1EA1ng \u1EA3nh"
21793
- }
21794
- }
21795
- },
21796
- ko: {
21797
- Common: {
21798
- close: "\uB2EB\uAE30",
21799
- closeAlert: "\uC54C\uB9BC \uB2EB\uAE30",
21800
- notifications: "\uC54C\uB9BC",
21801
- newNotification: "\uC0C8\uB85C\uC6B4",
21802
- readStatus: "\uC77D\uC74C",
21803
- openLink: "\uB9C1\uD06C \uC5F4\uAE30",
21804
- theme: "\uD14C\uB9C8",
21805
- lightTheme: "\uB77C\uC774\uD2B8",
21806
- darkTheme: "\uB2E4\uD06C",
21807
- systemTheme: "\uC2DC\uC2A4\uD15C",
21808
- density: "\uBC00\uB3C4",
21809
- compact: "\uCEF4\uD329\uD2B8",
21810
- normal: "\uBCF4\uD1B5",
21811
- comfortable: "\uC5EC\uC720",
21812
- columns: "\uC5F4"
21813
- },
21814
- ValidationInput: {
21815
- required: "\uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4",
21816
- typeMismatch: "\uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",
21817
- pattern: "\uD328\uD134\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",
21818
- tooShort: "\uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4",
21819
- tooLong: "\uB108\uBB34 \uAE41\uB2C8\uB2E4",
21820
- rangeUnderflow: "\uCD5C\uC19F\uAC12\uBCF4\uB2E4 \uC791\uC2B5\uB2C8\uB2E4",
21821
- rangeOverflow: "\uCD5C\uB313\uAC12\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4",
21822
- stepMismatch: "\uB2E8\uACC4\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",
21823
- badInput: "\uC798\uBABB\uB41C \uC785\uB825\uC785\uB2C8\uB2E4",
21824
- invalid: "\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 \uAC12\uC785\uB2C8\uB2E4"
21825
- },
21826
- Loading: {
21827
- loadingPage: "\uD398\uC774\uC9C0 \uB85C\uB529 \uC911",
21828
- pleaseWait: "\uC7A0\uC2DC\uB9CC \uAE30\uB2E4\uB824 \uC8FC\uC138\uC694"
21829
- },
21830
- DatePicker: {
21831
- placeholder: "\uB0A0\uC9DC \uC120\uD0DD",
21832
- today: "\uC624\uB298",
21833
- clear: "\uC9C0\uC6B0\uAE30"
21834
- },
21835
- CalendarTimeline: {
21836
- today: "\uC624\uB298",
21837
- prev: "\uC774\uC804",
21838
- next: "\uB2E4\uC74C",
21839
- month: "\uC6D4",
21840
- week: "\uC8FC",
21841
- day: "\uC77C",
21842
- sprint: "\uC2A4\uD504\uB9B0\uD2B8",
21843
- newEvent: "\uC0C8 \uC774\uBCA4\uD2B8",
21844
- createEventTitle: "\uC774\uBCA4\uD2B8 \uC0DD\uC131",
21845
- create: "\uC0DD\uC131",
21846
- cancel: "\uCDE8\uC18C",
21847
- resource: "\uB9AC\uC18C\uC2A4",
21848
- start: "\uC2DC\uC791",
21849
- end: "\uC885\uB8CC",
21850
- sprints: "{n} \uC2A4\uD504\uB9B0\uD2B8",
21851
- resourcesHeader: "\uB9AC\uC18C\uC2A4",
21852
- expandGroup: "\uADF8\uB8F9 \uD3BC\uCE58\uAE30",
21853
- collapseGroup: "\uADF8\uB8F9 \uC811\uAE30",
21854
- more: "+{n}\uAC1C \uB354",
21855
- deleteConfirm: "\uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?"
21856
- },
21857
- Pagination: {
21858
- navigationLabel: "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158",
21859
- showingResults: "{startItem}\u2013{endItem} / \uCD1D {totalItems}\uAC1C",
21860
- firstPage: "\uCCAB \uD398\uC774\uC9C0",
21861
- previousPage: "\uC774\uC804 \uD398\uC774\uC9C0",
21862
- previous: "\uC774\uC804",
21863
- nextPage: "\uB2E4\uC74C \uD398\uC774\uC9C0",
21864
- next: "\uB2E4\uC74C",
21865
- lastPage: "\uB9C8\uC9C0\uB9C9 \uD398\uC774\uC9C0",
21866
- pageNumber: "{page}\uD398\uC774\uC9C0",
21867
- itemsPerPage: "\uD398\uC774\uC9C0\uB2F9 \uD56D\uBAA9 \uC218",
21868
- search: "\uAC80\uC0C9",
21869
- noOptions: "\uC635\uC158 \uC5C6\uC74C"
21870
- },
21871
- Form: {
21872
- required: "\uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4"
21873
- },
21874
- OCR: {
21875
- imageUpload: {
21876
- dragDropText: "\uC5EC\uAE30\uC5D0 \uD30C\uC77C\uC744 \uB4DC\uB798\uADF8 \uC564 \uB4DC\uB86D\uD558\uC138\uC694",
21877
- browseFiles: "\uD30C\uC77C \uCC3E\uC544\uBCF4\uAE30",
21878
- supportedFormats: "\uC9C0\uC6D0 \uD615\uC2DD: \uC774\uBBF8\uC9C0"
21879
- }
21880
- }
21881
- },
21882
- ja: {
21883
- Common: {
21884
- close: "\u9589\u3058\u308B",
21885
- closeAlert: "\u30A2\u30E9\u30FC\u30C8\u3092\u9589\u3058\u308B",
21886
- notifications: "\u901A\u77E5",
21887
- newNotification: "\u65B0\u898F",
21888
- readStatus: "\u65E2\u8AAD",
21889
- openLink: "\u30EA\u30F3\u30AF\u3092\u958B\u304F",
21890
- theme: "\u30C6\u30FC\u30DE",
21891
- lightTheme: "\u30E9\u30A4\u30C8",
21892
- darkTheme: "\u30C0\u30FC\u30AF",
21893
- systemTheme: "\u30B7\u30B9\u30C6\u30E0",
21894
- density: "\u5BC6\u5EA6",
21895
- compact: "\u30B3\u30F3\u30D1\u30AF\u30C8",
21896
- normal: "\u901A\u5E38",
21897
- comfortable: "\u3086\u3063\u305F\u308A",
21898
- columns: "\u5217"
21899
- },
21900
- ValidationInput: {
21901
- required: "\u3053\u306E\u9805\u76EE\u306F\u5FC5\u9808\u3067\u3059",
21902
- typeMismatch: "\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093",
21903
- pattern: "\u30D1\u30BF\u30FC\u30F3\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093",
21904
- tooShort: "\u77ED\u3059\u304E\u307E\u3059",
21905
- tooLong: "\u9577\u3059\u304E\u307E\u3059",
21906
- rangeUnderflow: "\u6700\u5C0F\u5024\u3088\u308A\u5C0F\u3055\u3044\u3067\u3059",
21907
- rangeOverflow: "\u6700\u5927\u5024\u3092\u8D85\u3048\u3066\u3044\u307E\u3059",
21908
- stepMismatch: "\u30B9\u30C6\u30C3\u30D7\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093",
21909
- badInput: "\u5165\u529B\u304C\u7121\u52B9\u3067\u3059",
21910
- invalid: "\u7121\u52B9\u306A\u5024\u3067\u3059"
21911
- },
21912
- Loading: {
21913
- loadingPage: "\u30DA\u30FC\u30B8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D",
21914
- pleaseWait: "\u3057\u3070\u3089\u304F\u304A\u5F85\u3061\u304F\u3060\u3055\u3044"
21915
- },
21916
- DatePicker: {
21917
- placeholder: "\u65E5\u4ED8\u3092\u9078\u629E",
21918
- today: "\u4ECA\u65E5",
21919
- clear: "\u30AF\u30EA\u30A2"
21920
- },
21921
- CalendarTimeline: {
21922
- today: "\u4ECA\u65E5",
21923
- prev: "\u524D\u3078",
21924
- next: "\u6B21\u3078",
21925
- month: "\u6708",
21926
- week: "\u9031",
21927
- day: "\u65E5",
21928
- sprint: "\u30B9\u30D7\u30EA\u30F3\u30C8",
21929
- newEvent: "\u65B0\u898F\u30A4\u30D9\u30F3\u30C8",
21930
- createEventTitle: "\u30A4\u30D9\u30F3\u30C8\u4F5C\u6210",
21931
- create: "\u4F5C\u6210",
21932
- cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
21933
- resource: "\u30EA\u30BD\u30FC\u30B9",
21934
- start: "\u958B\u59CB",
21935
- end: "\u7D42\u4E86",
21936
- sprints: "{n} \u30B9\u30D7\u30EA\u30F3\u30C8",
21937
- resourcesHeader: "\u30EA\u30BD\u30FC\u30B9",
21938
- expandGroup: "\u30B0\u30EB\u30FC\u30D7\u3092\u5C55\u958B",
21939
- collapseGroup: "\u30B0\u30EB\u30FC\u30D7\u3092\u6298\u308A\u305F\u305F\u3080",
21940
- more: "+{n}\u4EF6",
21941
- deleteConfirm: "\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F"
21942
- },
21943
- Pagination: {
21944
- navigationLabel: "\u30DA\u30FC\u30B8\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3",
21945
- showingResults: "{startItem}\u2013{endItem} / \u5168{totalItems}\u4EF6",
21946
- firstPage: "\u6700\u521D\u306E\u30DA\u30FC\u30B8",
21947
- previousPage: "\u524D\u306E\u30DA\u30FC\u30B8",
21948
- previous: "\u524D\u3078",
21949
- nextPage: "\u6B21\u306E\u30DA\u30FC\u30B8",
21950
- next: "\u6B21\u3078",
21951
- lastPage: "\u6700\u5F8C\u306E\u30DA\u30FC\u30B8",
21952
- pageNumber: "{page}\u30DA\u30FC\u30B8",
21953
- itemsPerPage: "1\u30DA\u30FC\u30B8\u3042\u305F\u308A\u306E\u9805\u76EE\u6570",
21954
- search: "\u691C\u7D22",
21955
- noOptions: "\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057"
21956
- },
21957
- Form: {
21958
- required: "\u3053\u306E\u9805\u76EE\u306F\u5FC5\u9808\u3067\u3059"
21959
- },
21960
- OCR: {
21961
- imageUpload: {
21962
- dragDropText: "\u3053\u3053\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7",
21963
- browseFiles: "\u30D5\u30A1\u30A4\u30EB\u3092\u53C2\u7167",
21964
- supportedFormats: "\u5BFE\u5FDC\u5F62\u5F0F\uFF1A\u753B\u50CF"
21965
- }
21966
- }
21967
- }
21968
- };
21969
- function resolveObjectPath2(input, path) {
21970
- const parts = path.split(".");
21971
- let current = input;
21972
- for (const part of parts) {
21973
- if (current && typeof current === "object" && part in current) {
21974
- current = current[part];
21975
- } else {
21976
- return null;
21977
- }
21978
- }
21979
- return current;
21980
- }
21981
- function resolveTranslationValue2(translations, namespace, key) {
21982
- const namespaceValue = resolveObjectPath2(translations, namespace);
21983
- const value = resolveObjectPath2(namespaceValue, key);
21984
- return typeof value === "string" ? value : null;
21985
- }
21986
- var TranslationContext2 = React64.createContext(null);
21987
- var UnderverseProvider = ({ children, locale = "en", translations }) => {
21988
- const t = React64.useCallback(
21989
- (namespace) => {
21990
- return (key) => {
21991
- const mergedTranslations = {
21992
- ...defaultTranslations2[locale],
21993
- ...translations
21994
- };
21995
- return resolveTranslationValue2(mergedTranslations, namespace, key) ?? key;
21996
- };
21997
- },
21998
- [locale, translations]
21999
- );
22000
- return /* @__PURE__ */ jsx72(TranslationContext2.Provider, { value: { locale, t }, children });
22001
- };
22002
- var nextIntlAvailable = false;
22003
- var nextIntlUseTranslations = null;
22004
- var nextIntlUseLocale = null;
22005
- try {
22006
- const nextIntl = __require("next-intl");
22007
- if (nextIntl && typeof nextIntl.useTranslations === "function") {
22008
- nextIntlAvailable = true;
22009
- nextIntlUseTranslations = nextIntl.useTranslations;
22010
- nextIntlUseLocale = nextIntl.useLocale;
22011
- }
22012
- } catch {
21670
+ function isUnresolvedTranslation2(value, namespace, key) {
21671
+ return value === key || value === `${namespace}.${key}`;
22013
21672
  }
22014
21673
  function interpolate(template, params) {
22015
21674
  if (!params) return template;
@@ -22018,47 +21677,41 @@ function interpolate(template, params) {
22018
21677
  return value !== void 0 ? String(value) : `{${key}}`;
22019
21678
  });
22020
21679
  }
22021
- function getInternalTranslation(namespace, locale) {
22022
- return (key, params) => {
22023
- const localeTranslations = defaultTranslations2[locale] || defaultTranslations2.en;
22024
- const value = resolveTranslationValue2(localeTranslations, namespace, key);
22025
- return typeof value === "string" ? interpolate(value, params) : interpolate(key, params);
21680
+ function toLocaleTranslations(locale, translations) {
21681
+ if (!translations) return void 0;
21682
+ return {
21683
+ [locale]: translations
22026
21684
  };
22027
21685
  }
21686
+ var UnderverseProvider = ({ children, locale = "en", translations }) => {
21687
+ return /* @__PURE__ */ jsx72(TranslationProvider, { locale, translations: toLocaleTranslations(locale, translations), children });
21688
+ };
22028
21689
  function useTranslations(namespace) {
22029
- const underverseContext = React64.useContext(TranslationContext2);
22030
- if (underverseContext) {
22031
- return (key, params) => {
22032
- const result = underverseContext.t(namespace)(key);
22033
- return interpolate(result, params);
22034
- };
22035
- }
22036
- if (nextIntlAvailable && nextIntlUseTranslations) {
22037
- try {
22038
- const nextIntlT = nextIntlUseTranslations(namespace);
22039
- return nextIntlT;
22040
- } catch {
21690
+ const nextIntlBridge = useNextIntlBridge();
21691
+ const internalLocale = useUnderverseLocale();
21692
+ const internalT = useUnderverseTranslations(namespace);
21693
+ return React64.useCallback((key, params) => {
21694
+ if (nextIntlBridge) {
21695
+ const nextIntlResult = nextIntlBridge.translate(namespace, key, params);
21696
+ if (nextIntlResult.translated && !isUnresolvedTranslation2(nextIntlResult.translated, namespace, key)) {
21697
+ return nextIntlResult.translated;
21698
+ }
21699
+ const localizedDefault = getUnderverseDefaultTranslation(nextIntlResult.locale, namespace, key);
21700
+ if (localizedDefault !== key) {
21701
+ return interpolate(localizedDefault, params);
21702
+ }
22041
21703
  }
22042
- }
22043
- return getInternalTranslation(namespace, "en");
21704
+ const internalValue = internalT(key);
21705
+ if (internalValue !== key) {
21706
+ return interpolate(internalValue, params);
21707
+ }
21708
+ return interpolate(getUnderverseDefaultTranslation(internalLocale, namespace, key), params);
21709
+ }, [internalLocale, internalT, namespace, nextIntlBridge]);
22044
21710
  }
22045
21711
  function useLocale2() {
22046
- const underverseContext = React64.useContext(TranslationContext2);
22047
- if (underverseContext) {
22048
- return underverseContext.locale;
22049
- }
22050
- if (nextIntlAvailable && nextIntlUseLocale) {
22051
- try {
22052
- const locale = nextIntlUseLocale();
22053
- if (locale === "en" || locale === "vi" || locale === "ko" || locale === "ja") return locale;
22054
- if (locale?.startsWith?.("vi")) return "vi";
22055
- if (locale?.startsWith?.("ko")) return "ko";
22056
- if (locale?.startsWith?.("ja")) return "ja";
22057
- return "en";
22058
- } catch {
22059
- }
22060
- }
22061
- return "en";
21712
+ const nextIntlBridge = useNextIntlBridge();
21713
+ const internalLocale = useUnderverseLocale();
21714
+ return nextIntlBridge?.locale ?? internalLocale;
22062
21715
  }
22063
21716
 
22064
21717
  // src/components/UEditor/UEditor.tsx
@@ -23130,6 +22783,7 @@ function buildUEditorExtensions({
23130
22783
  Table3.configure({
23131
22784
  resizable: true,
23132
22785
  handleWidth: 10,
22786
+ allowTableNodeSelection: true,
23133
22787
  HTMLAttributes: {
23134
22788
  class: "border-collapse w-full my-4"
23135
22789
  }
@@ -25067,8 +24721,24 @@ var UEditor = React73.forwardRef(({
25067
24721
  "[&_pre]:text-[#d4d4d4]!",
25068
24722
  "[&_pre_code]:bg-transparent!",
25069
24723
  "[&_.tableWrapper]:overflow-x-auto",
24724
+ "[&_.tableWrapper]:select-text",
24725
+ "[&_table]:table-fixed",
24726
+ "[&_table]:overflow-hidden",
24727
+ "[&_table]:select-text",
25070
24728
  "[&_td]:relative",
24729
+ "[&_td]:align-top",
24730
+ "[&_td]:box-border",
24731
+ "[&_td]:select-text",
25071
24732
  "[&_th]:relative",
24733
+ "[&_th]:align-top",
24734
+ "[&_th]:box-border",
24735
+ "[&_th]:select-text",
24736
+ "[&_.selectedCell]:after:content-['']",
24737
+ "[&_.selectedCell]:after:absolute",
24738
+ "[&_.selectedCell]:after:inset-0",
24739
+ "[&_.selectedCell]:after:z-[2]",
24740
+ "[&_.selectedCell]:after:bg-primary/15",
24741
+ "[&_.selectedCell]:after:pointer-events-none",
25072
24742
  "[&_.column-resize-handle]:pointer-events-auto",
25073
24743
  "[&_.column-resize-handle]:cursor-col-resize",
25074
24744
  "[&_.column-resize-handle]:bg-primary/65",