From 159e00c941eba1a1ef387649c6912547c838e282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Leszko?= Date: Thu, 18 Jun 2026 12:58:15 +0200 Subject: [PATCH] feat(client/copy): shared "Trained Styles" terminology + cross-client tooltips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds packages/demon-client/copy/ — a framework-agnostic module of plain string constants that is the single source of truth all three DEMON frontends (web demo, public demo, VST webui) read for: - terminology: the "LoRA" → "Trained Styles" player-facing rename - short UI labels (library header, search, blend, empty/refit states) - tooltip copy for cross-client controls (strength/structure/timbre macros + Trained Style strength/blend) The engine, wire protocol, config keys, and admin training studio keep the honest technical term "LoRA"; only player-facing UI is renamed. Wires the web demo to the catalog: relabels LibraryTile, MobileStepperRail, AdvancedDrawer, HeroMacros, OperatorStrip, ScheduleCurvesOverlay, and routes SliderTile's macro + Trained Style tooltips through the shared source. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../components/Performance/AdvancedDrawer.tsx | 4 +- .../web/components/Performance/HeroMacros.tsx | 2 +- .../components/Performance/LibraryTile.tsx | 23 +++++---- .../Performance/MobileStepperRail.tsx | 4 +- .../components/Performance/OperatorStrip.tsx | 4 +- .../Performance/ScheduleCurvesOverlay.tsx | 2 +- .../web/components/Performance/SliderTile.tsx | 26 +++++----- packages/demon-client/copy/index.ts | 8 +++ packages/demon-client/copy/labels.ts | 27 ++++++++++ packages/demon-client/copy/terms.ts | 15 ++++++ packages/demon-client/copy/tooltips.ts | 45 +++++++++++++++++ packages/demon-client/dist/demon-client.js | 49 +++++++++++++++++++ packages/demon-client/index.ts | 5 ++ 13 files changed, 184 insertions(+), 30 deletions(-) create mode 100644 packages/demon-client/copy/index.ts create mode 100644 packages/demon-client/copy/labels.ts create mode 100644 packages/demon-client/copy/terms.ts create mode 100644 packages/demon-client/copy/tooltips.ts diff --git a/demos/realtime_motion_graph_web/web/components/Performance/AdvancedDrawer.tsx b/demos/realtime_motion_graph_web/web/components/Performance/AdvancedDrawer.tsx index 11c28e8e..21e89dca 100644 --- a/demos/realtime_motion_graph_web/web/components/Performance/AdvancedDrawer.tsx +++ b/demos/realtime_motion_graph_web/web/components/Performance/AdvancedDrawer.tsx @@ -2,6 +2,8 @@ import { useEffect, useState, type ReactNode } from "react"; +import { LABELS } from "@demon/client"; + import { useCapability } from "@/hooks/useCapability"; import { useIsMobile } from "@/hooks/useIsMobile"; import { useCurveStore } from "@/store/useCurveStore"; @@ -327,7 +329,7 @@ function StylesTab({ spread }: { spread: boolean }) { {canLora && ( - + )} diff --git a/demos/realtime_motion_graph_web/web/components/Performance/HeroMacros.tsx b/demos/realtime_motion_graph_web/web/components/Performance/HeroMacros.tsx index df649f27..ed899193 100644 --- a/demos/realtime_motion_graph_web/web/components/Performance/HeroMacros.tsx +++ b/demos/realtime_motion_graph_web/web/components/Performance/HeroMacros.tsx @@ -301,7 +301,7 @@ export function HeroMacros() { aria-pressed={curveOpen} aria-label="Toggle curve editor" data-midi-learn="schedule_curves_toggle" - data-dd-tooltip="Draw param automation curves against the track timeline. Curves drive denoise / structure / timbre / LoRA strengths / etc. over time so the model performs an arrangement instead of a static patch. Right-click to MIDI-learn." + data-dd-tooltip="Draw param automation curves against the track timeline. Curves drive denoise / structure / timbre / Trained Style strengths / etc. over time so the model performs an arrangement instead of a static patch. Right-click to MIDI-learn." data-dd-tooltip-wide="" data-dd-tooltip-title="Curve Editor" > diff --git a/demos/realtime_motion_graph_web/web/components/Performance/LibraryTile.tsx b/demos/realtime_motion_graph_web/web/components/Performance/LibraryTile.tsx index a0dbd06b..02b299fc 100644 --- a/demos/realtime_motion_graph_web/web/components/Performance/LibraryTile.tsx +++ b/demos/realtime_motion_graph_web/web/components/Performance/LibraryTile.tsx @@ -19,7 +19,12 @@ import { useMidiStore } from "@/store/useMidiStore"; import { usePerformanceStore } from "@/store/usePerformanceStore"; import { useSessionStore } from "@/store/useSessionStore"; import { LORA_SLIDER_MAX } from "@/types/engine"; -import type { LoraCatalogEntry, LoraMetadata } from "@demon/client"; +import { + LABELS, + TRAINED_STYLES, + type LoraCatalogEntry, + type LoraMetadata, +} from "@demon/client"; // LoRA library tile — redesigned for a large catalog (40+ genre LoRAs). // @@ -410,7 +415,7 @@ function ActiveLoraRow({ entry }: { entry: LoraCatalogEntry }) { aria-busy={isRefitPending} title={ isRefitPending - ? "Applying… (LoRA refit in progress)" + ? LABELS.refitInProgress : undefined } > @@ -457,7 +462,7 @@ function BrowseLoraRow({ entry }: { entry: LoraCatalogEntry }) { // disabled-and-cap-reached rows become inert. const capBlocked = atCap && !enabled; const rowTitle = capBlocked - ? `Maximum ${cap} LoRAs active — disable one to enable this` + ? `Maximum ${cap} ${TRAINED_STYLES} active — disable one to enable this` : displayName; return ( @@ -652,23 +657,23 @@ export function LibraryTile() { if (catalog.length === 0) { return (
-
LoRA Library
-
no LoRAs found
+
{LABELS.library}
+
{LABELS.noneFound}
); } return (
-
LoRA Library
+
{LABELS.library}
setQuery(e.target.value)} - aria-label="Search LoRA library" + aria-label={LABELS.searchAria} />
@@ -687,7 +692,7 @@ export function LibraryTile() {
{searching ? `Results · ${filtered.length}` - : `All LoRAs · ${compatible.length}`} + : `All ${TRAINED_STYLES} · ${compatible.length}`}
{filtered.length === 0 ? ( diff --git a/demos/realtime_motion_graph_web/web/components/Performance/MobileStepperRail.tsx b/demos/realtime_motion_graph_web/web/components/Performance/MobileStepperRail.tsx index 715f83fc..6670fea1 100644 --- a/demos/realtime_motion_graph_web/web/components/Performance/MobileStepperRail.tsx +++ b/demos/realtime_motion_graph_web/web/components/Performance/MobileStepperRail.tsx @@ -2,6 +2,8 @@ import { useCallback, useEffect, useRef } from "react"; +import { LABELS } from "@demon/client"; + import { useLoraStore } from "@/store/useLoraStore"; import { usePerformanceStore } from "@/store/usePerformanceStore"; import { useSessionStore } from "@/store/useSessionStore"; @@ -211,7 +213,7 @@ export function MobileLoraBlendStepper() { side="right" param="lora_blend" max={1.0} - label="LoRA Blend" + label={LABELS.blend} sublabelTop={a ?? undefined} sublabelBottom={b ?? undefined} invert diff --git a/demos/realtime_motion_graph_web/web/components/Performance/OperatorStrip.tsx b/demos/realtime_motion_graph_web/web/components/Performance/OperatorStrip.tsx index d21f1f99..95e5bf3d 100644 --- a/demos/realtime_motion_graph_web/web/components/Performance/OperatorStrip.tsx +++ b/demos/realtime_motion_graph_web/web/components/Performance/OperatorStrip.tsx @@ -365,11 +365,11 @@ export function OperatorStrip() {