@parhelia/localization 0.1.12895 → 0.1.12900

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":"ServiceLanguageSelectionStep.d.ts","sourceRoot":"","sources":["../../src/steps/ServiceLanguageSelectionStep.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,SAAS,CAAC;AAGtE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAe,EACf,IAAI,EACJ,OAAO,EACP,eAAe,EACf,WAAW,GACZ,EAAE,oBAAoB,2CA8OtB"}
1
+ {"version":3,"file":"ServiceLanguageSelectionStep.d.ts","sourceRoot":"","sources":["../../src/steps/ServiceLanguageSelectionStep.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,SAAS,CAAC;AAGtE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAe,EACf,IAAI,EACJ,OAAO,EACP,eAAe,EACf,WAAW,GACZ,EAAE,oBAAoB,2CA4OtB"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useRef, useState } from "react";
3
+ import { CountBadge } from "@parhelia/core";
3
4
  import { WizardStepShell } from "./WizardStepShell";
4
5
  /**
5
6
  * Language-only step. Item selection lives in its own step
@@ -117,7 +118,7 @@ export function ServiceLanguageSelectionStep({ isActive = true, data, setData, o
117
118
  return allLanguages.some((lang) => languageSelection[lang.code]);
118
119
  }, [allLanguages, languageSelection]);
119
120
  const selectedCount = data.targetLanguages.length;
120
- return (_jsx(WizardStepShell, { fillHeight: true, testId: "language-selection-step", children: _jsxs("div", { className: "mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col overflow-hidden rounded-xl border border-border-default bg-white", children: [_jsxs("div", { className: "flex h-[37px] shrink-0 items-center justify-between gap-2 border-b border-border-default bg-neutral-grey-5/50 px-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium tracking-wider text-neutral-grey-50 ", children: "Target Languages" }), selectedCount > 0 && (_jsx("span", { className: "text-muted-foreground text-[11px] font-medium tabular-nums", children: selectedCount }))] }), allLanguages.length > 1 && (_jsxs("label", { className: "flex cursor-pointer items-center gap-1.5 text-[11px] font-medium text-neutral-grey-50 transition-colors hover:text-neutral-grey-100", children: [_jsx("input", { type: "checkbox", checked: areAllLanguagesSelected, ref: (input) => {
121
+ return (_jsx(WizardStepShell, { fillHeight: true, testId: "language-selection-step", children: _jsxs("div", { className: "mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col overflow-hidden rounded-xl border border-border-default bg-white", children: [_jsxs("div", { className: "flex h-[37px] shrink-0 items-center justify-between gap-2 border-b border-border-default bg-neutral-grey-5/50 px-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium tracking-wider text-neutral-grey-50 ", children: "Target Languages" }), selectedCount > 0 && (_jsx(CountBadge, { children: selectedCount }))] }), allLanguages.length > 1 && (_jsxs("label", { className: "flex cursor-pointer items-center gap-1.5 text-[11px] font-medium text-neutral-grey-50 transition-colors hover:text-neutral-grey-100", children: [_jsx("input", { type: "checkbox", checked: areAllLanguagesSelected, ref: (input) => {
121
122
  if (input) {
122
123
  input.indeterminate =
123
124
  areSomeLanguagesSelected && !areAllLanguagesSelected;
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationBatches.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationBatches.tsx"],"names":[],"mappings":"AAmPA,wBAAgB,kBAAkB,4CA8sCjC"}
1
+ {"version":3,"file":"TranslationBatches.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationBatches.tsx"],"names":[],"mappings":"AAmPA,wBAAgB,kBAAkB,4CAgtCjC"}
@@ -230,10 +230,10 @@ export function TranslationBatches() {
230
230
  const loadProviders = async () => {
231
231
  try {
232
232
  const res = await getTranslationProviders();
233
- const providerData = (res?.data ??
234
- res ??
235
- []);
236
- setProviders(providerData);
233
+ const maybeProviders = res?.data ?? res;
234
+ setProviders(Array.isArray(maybeProviders)
235
+ ? maybeProviders
236
+ : []);
237
237
  }
238
238
  catch (error) {
239
239
  console.error("Failed to load translation providers:", error);
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * TranslationsTitlebar - Titlebar content for the Translation Management workspace.
3
- * Matches the AI Agents / Tasks titlebar pattern: title + subtitle stacked,
4
- * with consistent left padding so it aligns across workspaces.
3
+ * Shows desktop actions for the Translation Management workspace.
5
4
  */
6
5
  export declare function TranslationsTitlebar(): import("react/jsx-runtime").JSX.Element | null;
7
6
  //# sourceMappingURL=TranslationsTitlebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationsTitlebar.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationsTitlebar.tsx"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,oBAAoB,mDA8CnC"}
1
+ {"version":3,"file":"TranslationsTitlebar.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationsTitlebar.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,oBAAoB,mDAuBnC"}
@@ -1,16 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SimpleIconButton, useEditContext, cn } from "@parhelia/core";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { SimpleIconButton, useEditContext } from "@parhelia/core";
3
3
  import { SquarePen } from "lucide-react";
4
4
  /**
5
5
  * TranslationsTitlebar - Titlebar content for the Translation Management workspace.
6
- * Matches the AI Agents / Tasks titlebar pattern: title + subtitle stacked,
7
- * with consistent left padding so it aligns across workspaces.
6
+ * Shows desktop actions for the Translation Management workspace.
8
7
  */
9
8
  export function TranslationsTitlebar() {
10
9
  const editContext = useEditContext();
11
10
  if (!editContext?.workspace)
12
11
  return null;
13
- const showSubtitle = !editContext.isMobile;
12
+ if (editContext.isMobile)
13
+ return null;
14
14
  const { showAgentsWorkspaceEditor, setShowAgentsWorkspaceEditor } = editContext;
15
- return (_jsxs("div", { className: cn("flex w-full flex-row items-center gap-3 pl-2", editContext.isMobile && "border-b px-1.5 py-1"), children: [_jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-start justify-center leading-tight", "data-testid": "translations-titlebar-identity", children: [_jsx("span", { className: "truncate text-sm font-medium leading-tight text-neutral-grey-100", children: "Translation Management" }), showSubtitle && (_jsx("span", { className: "truncate text-[11px] leading-tight text-neutral-grey-50", children: "Track and manage content translations" }))] }), !editContext.isMobile && (_jsx("div", { className: "flex shrink-0 items-center gap-2", children: _jsx(SimpleIconButton, { icon: _jsx(SquarePen, { className: "h-5 w-5", strokeWidth: 1 }), label: showAgentsWorkspaceEditor ? "Hide Editor" : "Show Editor", size: "large", "data-testid": "translations-editor-panel-toggle", selected: showAgentsWorkspaceEditor, onClick: () => setShowAgentsWorkspaceEditor(!showAgentsWorkspaceEditor) }) }))] }));
15
+ return (_jsx("div", { className: "flex w-full items-center justify-end pr-2", children: _jsx(SimpleIconButton, { icon: _jsx(SquarePen, { className: "h-5 w-5", strokeWidth: 1 }), label: showAgentsWorkspaceEditor ? "Hide Editor" : "Show Editor", size: "large", "data-testid": "translations-editor-panel-toggle", selected: showAgentsWorkspaceEditor, onClick: () => setShowAgentsWorkspaceEditor(!showAgentsWorkspaceEditor) }) }));
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/localization",
3
- "version": "0.1.12895",
3
+ "version": "0.1.12900",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"