@parhelia/localization 0.1.12790 → 0.1.12792

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":"LocalizeItemDialog.d.ts","sourceRoot":"","sources":["../src/LocalizeItemDialog.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,eAAe,CAAC;AAkCvB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAAG,WAAW,CAAC,uBAAuB,CAAC,2CAogBtE"}
1
+ {"version":3,"file":"LocalizeItemDialog.d.ts","sourceRoot":"","sources":["../src/LocalizeItemDialog.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,eAAe,CAAC;AAqCvB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAAG,WAAW,CAAC,uBAAuB,CAAC,2CAogBtE"}
@@ -9,6 +9,7 @@ const GlobeIcon = LucideGlobe;
9
9
  const ArrowRightIcon = LucideArrowRight;
10
10
  // Threshold for warning about large batch translations
11
11
  const LARGE_BATCH_WARNING_THRESHOLD = 100;
12
+ const getNextButtonLabel = (step) => step?.nextButtonLabel || step?.name || "Next";
12
13
  // Note: DialogButtons is an internal component that might need to be added to core exports
13
14
  // For now, we'll implement it inline
14
15
  const DialogButtons = ({ children, ...props }) => (_jsx("div", { className: "mt-auto flex shrink-0 items-center gap-3 border-t border-gray-3 bg-background px-6 py-4", ...props, children: children }));
@@ -291,7 +292,7 @@ export function LocalizeItemDialog(props) {
291
292
  if (totalTranslations <= 0)
292
293
  return "Start Translation";
293
294
  return `Start Translation (${totalTranslations}${isStreaming ? "+" : ""})`;
294
- })()) : (_jsxs(_Fragment, { children: [activeSteps[currentStepIndex + 1]?.name ?? "Next", _jsx(ArrowRightIcon, { className: "h-4 w-4", strokeWidth: 2 })] })) })] })] })] })] }), _jsx(AlertDialog, { open: showLargeBatchWarning, onOpenChange: setShowLargeBatchWarning, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsxs(AlertDialogTitle, { className: "flex items-center gap-2", children: [_jsx(AlertTriangleIcon, { className: "h-5 w-5 text-amber-500" }), "Large Translation Batch"] }), _jsx(AlertDialogDescription, { children: (() => {
295
+ })()) : (_jsxs(_Fragment, { children: [getNextButtonLabel(activeSteps[currentStepIndex + 1]), _jsx(ArrowRightIcon, { className: "h-4 w-4", strokeWidth: 2 })] })) })] })] })] })] }), _jsx(AlertDialog, { open: showLargeBatchWarning, onOpenChange: setShowLargeBatchWarning, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsxs(AlertDialogTitle, { className: "flex items-center gap-2", children: [_jsx(AlertTriangleIcon, { className: "h-5 w-5 text-amber-500" }), "Large Translation Batch"] }), _jsx(AlertDialogDescription, { children: (() => {
295
296
  const { itemCount, languageCount, totalTranslations } = calculateTranslationCounts(wizardData);
296
297
  return (_jsxs(_Fragment, { children: ["You are about to start", " ", _jsxs("strong", { children: [totalTranslations, " translations"] }), " (", itemCount, " items \u00D7 ", languageCount, " languages). Large batches may take a significant amount of time to process.", _jsx("br", {}), _jsx("br", {}), "Are you sure you want to continue?"] }));
297
298
  })() })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: isSubmitting, children: "Cancel" }), _jsx(AlertDialogAction, { onClick: handleLargeBatchConfirm, disabled: isSubmitting, children: isSubmitting ? "Starting..." : "Continue" })] })] }) })] }));
package/dist/index.d.ts CHANGED
@@ -2,17 +2,25 @@ import { ItemSelectionStep } from "./steps/ItemSelectionStep";
2
2
  import { ServiceLanguageSelectionStep } from "./steps/ServiceLanguageSelectionStep";
3
3
  import { EditorConfiguration } from "@parhelia/core";
4
4
  declare const DEFAULT_TRANSLATION_WIZARD_CONFIGURATION: {
5
- steps: {
5
+ steps: ({
6
6
  id: string;
7
7
  name: string;
8
8
  description: string;
9
9
  component: typeof ItemSelectionStep;
10
- }[];
10
+ nextButtonLabel?: undefined;
11
+ } | {
12
+ id: string;
13
+ name: string;
14
+ nextButtonLabel: string;
15
+ description: string;
16
+ component: typeof ServiceLanguageSelectionStep;
17
+ })[];
11
18
  };
12
19
  declare const SINGLE_ITEM_TRANSLATION_WIZARD_CONFIGURATION: {
13
20
  steps: {
14
21
  id: string;
15
22
  name: string;
23
+ nextButtonLabel: string;
16
24
  description: string;
17
25
  component: typeof ServiceLanguageSelectionStep;
18
26
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAepF,OAAO,EACL,mBAAmB,EAGpB,MAAM,gBAAgB,CAAC;AAUxB,QAAA,MAAM,wCAAwC;;;;;;;CAqB7C,CAAC;AAEF,QAAA,MAAM,4CAA4C;;;;;;;CAejD,CAAC;AAkCF,OAAO,EACL,wCAAwC,EACxC,4CAA4C,GAC7C,CAAC;AACF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,YAAY,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;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,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,mBAAmB,EAClC,OAAO,CAAC,EAAE,yBAAyB,uBAyHpC"}
package/dist/index.js CHANGED
@@ -23,12 +23,14 @@ const DEFAULT_TRANSLATION_WIZARD_CONFIGURATION = {
23
23
  {
24
24
  id: "language-selection",
25
25
  name: "Languages",
26
+ nextButtonLabel: "Select Languages",
26
27
  description: "Select target languages for your content.",
27
28
  component: ServiceLanguageSelectionStep,
28
29
  },
29
30
  {
30
31
  id: "prompt-customization",
31
32
  name: "Provider",
33
+ nextButtonLabel: "Select Provider",
32
34
  description: "Choose the translation provider and provider settings.",
33
35
  component: PromptCustomizationStep,
34
36
  },
@@ -39,12 +41,14 @@ const SINGLE_ITEM_TRANSLATION_WIZARD_CONFIGURATION = {
39
41
  {
40
42
  id: "language-selection",
41
43
  name: "Languages",
44
+ nextButtonLabel: "Select Languages",
42
45
  description: "Select target languages for your content.",
43
46
  component: ServiceLanguageSelectionStep,
44
47
  },
45
48
  {
46
49
  id: "prompt-customization",
47
50
  name: "Provider",
51
+ nextButtonLabel: "Select Provider",
48
52
  description: "Choose the translation provider and provider settings.",
49
53
  component: PromptCustomizationStep,
50
54
  },
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationManagement.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationManagement.tsx"],"names":[],"mappings":"AAOA,wBAAgB,qBAAqB,4CAwEpC"}
1
+ {"version":3,"file":"TranslationManagement.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationManagement.tsx"],"names":[],"mappings":"AAOA,wBAAgB,qBAAqB,4CAoEpC"}
@@ -27,5 +27,5 @@ export function TranslationManagement() {
27
27
  content: (_jsx("div", { className: "h-full overflow-hidden border-l border-gray-200 bg-gray-50", children: _jsx(ItemEditorPane, { name: "translation-management-preview", emptyDescription: "Select a translation batch item or language row to preview and edit it here." }) })),
28
28
  });
29
29
  }
30
- return (_jsx("div", { className: "absolute inset-0 flex flex-col bg-[var(--color-gray-5)]", "data-testid": "translation-management", children: showEditorPanel ? (_jsx(Splitter, { panels: panels, direction: isMobile ? "vertical" : "horizontal", localStorageKey: "translation-management.panelSizes" })) : (managementContent) }));
30
+ return (_jsx("div", { className: "absolute inset-0 flex flex-col bg-[var(--color-gray-5)]", "data-testid": "translation-management", children: _jsx(Splitter, { panels: panels, direction: isMobile ? "vertical" : "horizontal", localStorageKey: "translation-management.panelSizes" }) }));
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/localization",
3
- "version": "0.1.12790",
3
+ "version": "0.1.12792",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"