@parhelia/localization 0.1.12523 → 0.1.12554

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BatchTranslationView.d.ts","sourceRoot":"","sources":["../../src/translation-center/BatchTranslationView.tsx"],"names":[],"mappings":"AA0CA,OAAO,qCAAqC,CAAC;AA4C7C,UAAU,yBAAyB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAwED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,MAAM,GACP,EAAE,yBAAyB,2CAmoD3B"}
1
+ {"version":3,"file":"BatchTranslationView.d.ts","sourceRoot":"","sources":["../../src/translation-center/BatchTranslationView.tsx"],"names":[],"mappings":"AA4CA,OAAO,qCAAqC,CAAC;AA4C7C,UAAU,yBAAyB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAwED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,MAAM,GACP,EAAE,yBAAyB,2CAmoD3B"}
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import React, { useEffect, useState, useMemo, useRef, useCallback, memo, } from "react";
3
- import { useEditContext, SimpleTable, Progress as CoreProgress, Button, SimpleIconButton, CopyButton, } from "@parhelia/core";
3
+ import { useEditContext, SimpleTable, Progress as CoreProgress, Button, SimpleIconButton, CopyButton, usePathname, useRouter, useSearchParams, } from "@parhelia/core";
4
4
  import { listBatchTranslationJobs, retryBatchTranslation, subscribeToBatch, unsubscribeFromBatch, getBatchInfo, getTranslationProviders, } from "../services/translationService";
5
5
  import { ChevronDown, ChevronUp, RefreshCw, ArrowLeft, Info, Loader2, Languages, ExternalLink, } from "lucide-react";
6
- import { usePathname, useRouter, useSearchParams } from "next/navigation";
7
6
  import { toast } from "sonner";
8
7
  import { JsonView, defaultStyles } from "react-json-view-lite";
9
8
  import "react-json-view-lite/dist/index.css";
@@ -111,7 +110,7 @@ export function BatchTranslationView({ batchId, onBack, }) {
111
110
  editContext?.switchWorkspace?.("editor");
112
111
  }, [editContext]);
113
112
  const openBatchInView = useCallback((nextBatchId) => {
114
- const current = new URLSearchParams(Array.from(searchParams.entries()));
113
+ const current = new URLSearchParams(searchParams.toString());
115
114
  current.set("batchId", nextBatchId);
116
115
  router.push(`${pathname}?${current.toString()}`, { scroll: false });
117
116
  }, [pathname, router, searchParams]);
@@ -1 +1 @@
1
- {"version":3,"file":"RecentTranslations.d.ts","sourceRoot":"","sources":["../../src/translation-center/RecentTranslations.tsx"],"names":[],"mappings":"AAmEA,wBAAgB,kBAAkB,4CAyhBjC"}
1
+ {"version":3,"file":"RecentTranslations.d.ts","sourceRoot":"","sources":["../../src/translation-center/RecentTranslations.tsx"],"names":[],"mappings":"AAwEA,wBAAgB,kBAAkB,4CAyhBjC"}
@@ -1,9 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState, useMemo } from "react";
3
3
  import React from "react";
4
- import { useRouter } from "next/navigation";
5
- import { usePathname, useSearchParams } from "next/navigation";
6
- import { Button, Select, useEditContext } from "@parhelia/core";
4
+ import { Button, Select, useEditContext, usePathname, useRouter, useSearchParams, } from "@parhelia/core";
7
5
  import { listBatches, getTranslationProviders, } from "../services/translationService";
8
6
  import { useDebouncedCallback } from "use-debounce";
9
7
  import { RefreshCw, X, ChevronDown, Languages, Loader2 } from "lucide-react";
@@ -261,7 +259,7 @@ export function RecentTranslations() {
261
259
  return dateGroups;
262
260
  }, [filteredBatches]);
263
261
  const navigateToBatch = (batchId) => {
264
- const current = new URLSearchParams(Array.from(searchParams.entries()));
262
+ const current = new URLSearchParams(searchParams.toString());
265
263
  current.set("batchId", batchId);
266
264
  router.push(`${pathname}?${current.toString()}`, { scroll: false });
267
265
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationManagement.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationManagement.tsx"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,4CA+CpC"}
1
+ {"version":3,"file":"TranslationManagement.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationManagement.tsx"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,4CA+CpC"}
@@ -1,7 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRouter } from "next/navigation";
3
- import { usePathname, useSearchParams } from "next/navigation";
4
- import { useEditContext } from "@parhelia/core";
2
+ import { useEditContext, usePathname, useRouter, useSearchParams, } from "@parhelia/core";
5
3
  import { BatchTranslationView } from "./BatchTranslationView";
6
4
  export function TranslationManagement() {
7
5
  const editContext = useEditContext();
@@ -18,7 +16,7 @@ export function TranslationManagement() {
18
16
  return (_jsx("div", { className: "flex h-full flex-col items-center justify-center bg-[var(--color-gray-5)]", children: _jsxs("div", { className: "flex items-center gap-2 text-[var(--color-gray-2)]", children: [_jsx("i", { className: "pi pi-spin pi-spinner text-[#9650fb]" }), "Loading..."] }) }));
19
17
  }
20
18
  return (_jsx("div", { className: "absolute inset-0 flex flex-col bg-[var(--color-gray-5)]", "data-testid": "translation-management", children: batchId ? (_jsx(BatchTranslationView, { batchId: batchId, onBack: () => {
21
- const current = new URLSearchParams(Array.from(searchParams.entries()));
19
+ const current = new URLSearchParams(searchParams.toString());
22
20
  current.delete("batchId");
23
21
  router.push(`${pathname}?${current.toString()}`, { scroll: false });
24
22
  } })) : recentTranslationsPanel ? (_jsx("div", { className: "flex-1 min-h-0", children: recentTranslationsPanel.content })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center text-[var(--color-gray-2)]", children: [_jsx("i", { className: "pi pi-language mb-4 text-4xl text-[var(--color-gray-3)]" }), _jsx("p", { className: "font-medium text-[var(--color-gray-1)]", children: "Recent translations not available" })] })) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/localization",
3
- "version": "0.1.12523",
3
+ "version": "0.1.12554",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,8 +24,10 @@
24
24
  ],
25
25
  "scripts": {
26
26
  "build": "tsc -p tsconfig.build.json",
27
+ "build:native": "tsgo -p tsconfig.build.json",
27
28
  "lint": "eslint . --max-warnings 0",
28
- "check-types": "tsc --noEmit"
29
+ "check-types": "tsc --noEmit",
30
+ "check-types:native": "tsgo --noEmit"
29
31
  },
30
32
  "devDependencies": {
31
33
  "@repo/eslint-config": "*",
@@ -41,7 +43,6 @@
41
43
  "dependencies": {
42
44
  "@parhelia/core": "*",
43
45
  "lucide-react": "^0.486.0",
44
- "next": "16.2.1",
45
46
  "postcss": "^8.5.3",
46
47
  "react": "19.2.4",
47
48
  "react-dom": "19.2.4"