@serhii.olishevskyi/docs 1.2.14 → 1.2.15
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.
|
@@ -1434,6 +1434,11 @@ var TranslationDialog = ({
|
|
|
1434
1434
|
const [translatingCode, setTranslatingCode] = useState8(null);
|
|
1435
1435
|
const [isTranslatingAll, setIsTranslatingAll] = useState8(false);
|
|
1436
1436
|
const [error, setError] = useState8(null);
|
|
1437
|
+
useEffect6(() => {
|
|
1438
|
+
if (open) {
|
|
1439
|
+
setSelectedProvider(defaultProvider || "auto");
|
|
1440
|
+
}
|
|
1441
|
+
}, [open, defaultProvider]);
|
|
1437
1442
|
useEffect6(() => {
|
|
1438
1443
|
if (!open) return;
|
|
1439
1444
|
const fetchData = async () => {
|
|
@@ -1464,7 +1469,7 @@ var TranslationDialog = ({
|
|
|
1464
1469
|
}
|
|
1465
1470
|
};
|
|
1466
1471
|
fetchData();
|
|
1467
|
-
}, [open, translationKey, namespace]);
|
|
1472
|
+
}, [open, translationKey, namespace, supabase]);
|
|
1468
1473
|
const effectiveProvider = selectedProvider === "auto" ? void 0 : selectedProvider;
|
|
1469
1474
|
const handleAutoTranslate = async (e, targetLang) => {
|
|
1470
1475
|
e.preventDefault();
|
|
@@ -1602,13 +1607,15 @@ var TranslationDialog = ({
|
|
|
1602
1607
|
onChange: (_, val) => val && setSelectedProvider(val),
|
|
1603
1608
|
disabled: isBusy,
|
|
1604
1609
|
children: [
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
")"
|
|
1610
|
+
/* @__PURE__ */ jsx10(ToggleButton, { value: "auto", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: "Auto" }),
|
|
1611
|
+
/* @__PURE__ */ jsxs3(ToggleButton, { value: "gemini", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1612
|
+
"Gemini ",
|
|
1613
|
+
defaultProvider === "gemini" && "(Default)"
|
|
1609
1614
|
] }),
|
|
1610
|
-
/* @__PURE__ */
|
|
1611
|
-
|
|
1615
|
+
/* @__PURE__ */ jsxs3(ToggleButton, { value: "openai", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1616
|
+
"OpenAI ",
|
|
1617
|
+
defaultProvider === "openai" && "(Default)"
|
|
1618
|
+
] })
|
|
1612
1619
|
]
|
|
1613
1620
|
}
|
|
1614
1621
|
)
|
package/dist/index.js
CHANGED
|
@@ -1031,6 +1031,11 @@ var init_TranslationDialog = __esm({
|
|
|
1031
1031
|
const [translatingCode, setTranslatingCode] = (0, import_react5.useState)(null);
|
|
1032
1032
|
const [isTranslatingAll, setIsTranslatingAll] = (0, import_react5.useState)(false);
|
|
1033
1033
|
const [error, setError] = (0, import_react5.useState)(null);
|
|
1034
|
+
(0, import_react5.useEffect)(() => {
|
|
1035
|
+
if (open) {
|
|
1036
|
+
setSelectedProvider(defaultProvider || "auto");
|
|
1037
|
+
}
|
|
1038
|
+
}, [open, defaultProvider]);
|
|
1034
1039
|
(0, import_react5.useEffect)(() => {
|
|
1035
1040
|
if (!open) return;
|
|
1036
1041
|
const fetchData = async () => {
|
|
@@ -1061,7 +1066,7 @@ var init_TranslationDialog = __esm({
|
|
|
1061
1066
|
}
|
|
1062
1067
|
};
|
|
1063
1068
|
fetchData();
|
|
1064
|
-
}, [open, translationKey, namespace]);
|
|
1069
|
+
}, [open, translationKey, namespace, supabase]);
|
|
1065
1070
|
const effectiveProvider = selectedProvider === "auto" ? void 0 : selectedProvider;
|
|
1066
1071
|
const handleAutoTranslate = async (e, targetLang) => {
|
|
1067
1072
|
e.preventDefault();
|
|
@@ -1199,13 +1204,15 @@ var init_TranslationDialog = __esm({
|
|
|
1199
1204
|
onChange: (_, val) => val && setSelectedProvider(val),
|
|
1200
1205
|
disabled: isBusy,
|
|
1201
1206
|
children: [
|
|
1202
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
")"
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material.ToggleButton, { value: "auto", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: "Auto" }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material.ToggleButton, { value: "gemini", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1209
|
+
"Gemini ",
|
|
1210
|
+
defaultProvider === "gemini" && "(Default)"
|
|
1206
1211
|
] }),
|
|
1207
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
1208
|
-
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material.ToggleButton, { value: "openai", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1213
|
+
"OpenAI ",
|
|
1214
|
+
defaultProvider === "openai" && "(Default)"
|
|
1215
|
+
] })
|
|
1209
1216
|
]
|
|
1210
1217
|
}
|
|
1211
1218
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
useTranslationEdit,
|
|
44
44
|
useTranslationNamespace,
|
|
45
45
|
useUserSettings
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4NEOJ5KZ.mjs";
|
|
47
47
|
|
|
48
48
|
// src/UI/components/inputs/TextFieldComponent.tsx
|
|
49
49
|
import { useState } from "react";
|
|
@@ -741,7 +741,7 @@ var EmailInputComponent = ({
|
|
|
741
741
|
import { useState as useState5, useEffect as useEffect2, lazy, Suspense } from "react";
|
|
742
742
|
import { Avatar, Tooltip as Tooltip3, Typography as Typography2 } from "@mui/material";
|
|
743
743
|
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
744
|
-
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-
|
|
744
|
+
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-RAEPOSIE.mjs"));
|
|
745
745
|
var getInitials = (name) => {
|
|
746
746
|
if (!name) return "?";
|
|
747
747
|
const parts = name.trim().split(" ");
|