Bundle data was carrying localized strings (name, usage, items, description, imageAlt, badge) directly, so EN visitors saw German copy on the bundle page and home grid. Strings are now keyed under bundle.<id>.<field> in the i18n catalogue (DE + EN); src/api/bundles.js keeps only structural data + i18n key references. HomePage builds a localizedBundles computed that resolves the keys through t() before passing to the Bundles design-system component, so the existing component stays agnostic of i18n. BundlePage exposes a `bundleCopy` computed for the same reason, and resolvedItems now maps over `itemKeys` instead of static labels. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 line
5.4 KiB
JavaScript
1 line
5.4 KiB
JavaScript
import{B as e,C as t,G as n,T as r,c as i,dt as a,ft as o,j as s,r as c,s as l,u}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{t as d}from"./i18n-XDSWEyNo.js";import{t as f}from"./_plugin-vue_export-helper-0vLWKQyu.js";import{t as p}from"./SectionShell-CyPmh1h8.js";var m={class:`font-display text-2xl font-normal text-ink mb-4`},h={class:`space-y-3 text-[15px] text-muted leading-relaxed max-w-2xl`},g={class:`font-display text-2xl font-normal text-ink mb-4`},_={class:`grid sm:grid-cols-2 lg:grid-cols-3 gap-5`},v={class:`font-mono text-[12px] text-ink block`},y={class:`mt-3 mb-3 text-[13px] text-muted`},b={class:`text-[13px] text-muted leading-relaxed`},x={class:`mb-4 flex items-end justify-between gap-4 flex-wrap`},S={class:`font-display text-2xl font-normal text-ink`},C={class:`grid sm:grid-cols-3 gap-5`},w={class:`font-mono text-[12px] text-ink block`},T={class:`mt-3 text-[12px] text-muted leading-relaxed`},E={class:`font-display text-2xl font-normal text-ink mb-4`},D={class:`grid sm:grid-cols-3 gap-5`},O={class:`rounded-md border border-line bg-paper p-5`},k={class:`mt-3 text-[12px] text-muted leading-relaxed`},A={class:`rounded-md border border-line bg-paper p-5`},j={class:`flex items-center justify-between gap-2`},M={class:`mt-4 flex h-32 items-center justify-center`},N={class:`mt-3 text-[12px] text-muted leading-relaxed`},P={class:`rounded-md border border-line bg-paper p-5`},F={class:`mt-3 text-[12px] text-muted leading-relaxed`},I={class:`font-display text-2xl font-normal text-ink mb-4`},L={class:`text-[15px] text-muted leading-relaxed max-w-2xl`},R=f({__name:`MotionSection`,setup(f){let{t:R}=d(),z=[R(`ds.motion.principle.purpose`),R(`ds.motion.principle.cadence`),R(`ds.motion.principle.scenic`),R(`ds.motion.principle.reduced`)],B=[{name:`fast`,value:`120ms`,note:R(`ds.motion.duration.fast.note`)},{name:`base`,value:`200ms`,note:R(`ds.motion.duration.base.note`)},{name:`slow`,value:`320ms`,note:R(`ds.motion.duration.slow.note`)},{name:`scene`,value:`480ms`,note:R(`ds.motion.duration.scene.note`)},{name:`orbit`,value:`16s`,note:R(`ds.motion.duration.orbit.note`)}],V=[{name:`out`,curve:`cubic-bezier(0.16, 1, 0.3, 1)`,note:R(`ds.motion.ease.out.note`)},{name:`in-out`,curve:`cubic-bezier(0.65, 0, 0.35, 1)`,note:R(`ds.motion.ease.inOut.note`)},{name:`linear`,curve:`linear`,note:R(`ds.motion.ease.linear.note`)}],H=[{name:`orbit`,token:`--animate-orbit`,note:R(`ds.motion.animate.orbit.note`)},{name:`fade-in-up`,token:`--animate-fade-in-up`,note:R(`ds.motion.animate.fadeInUp.note`)},{name:`pulse-soft`,token:`--animate-pulse-soft`,note:R(`ds.motion.animate.pulseSoft.note`)}],U=e(0);function W(){U.value+=1}let G=e(0);function K(){G.value+=1}return(e,d)=>(t(),i(p,{eyebrow:n(R)(`ds.eyebrow.tokens`),title:n(R)(`ds.motion.title`),description:n(R)(`ds.motion.description`)},{default:s(()=>[l(`section`,null,[l(`h2`,m,o(n(R)(`ds.motion.philosophy.title`)),1),l(`ul`,h,[(t(),u(c,null,r(z,(e,t)=>l(`li`,{key:t,class:`flex gap-3`},[d[0]||=l(`span`,{class:`mt-2 inline-block h-1.5 w-1.5 rounded-full bg-brand flex-shrink-0`},null,-1),l(`span`,null,o(e),1)])),64))])]),l(`section`,null,[l(`h2`,g,o(n(R)(`ds.motion.durations.title`)),1),l(`div`,_,[(t(),u(c,null,r(B,e=>l(`div`,{key:e.name,class:`rounded-md border border-line bg-paper p-5`},[l(`code`,v,`--duration-`+o(e.name),1),l(`div`,y,o(e.value),1),l(`p`,b,o(e.note),1)])),64))])]),l(`section`,null,[l(`header`,x,[l(`h2`,S,o(n(R)(`ds.motion.easings.title`)),1),l(`button`,{type:`button`,class:`text-[12px] font-semibold uppercase tracking-label text-brand hover:underline`,onClick:W},o(n(R)(`ds.motion.replay`)),1)]),l(`div`,C,[(t(),u(c,null,r(V,e=>l(`div`,{key:e.name,class:`rounded-md border border-line bg-paper p-5`},[l(`code`,w,`--ease-`+o(e.name),1),(t(),u(`div`,{key:`${e.name}-${U.value}`,class:`relative mt-4 h-12 rounded-sm bg-cream overflow-hidden cursor-pointer`,onClick:W},[l(`span`,{class:`absolute top-1/2 left-1 h-6 w-6 -mt-3 rounded-sm bg-brand`,style:a({animation:`ds-ease-demo 1200ms ${e.curve} forwards`})},null,4)])),l(`p`,T,o(e.note),1)])),64))])]),l(`section`,null,[l(`h2`,E,o(n(R)(`ds.motion.animations.title`)),1),l(`div`,D,[l(`div`,O,[d[1]||=l(`code`,{class:`font-mono text-[12px] text-ink block`},`--animate-orbit`,-1),d[2]||=l(`div`,{class:`mt-4 flex h-32 items-center justify-center`},[l(`span`,{class:`ds-orbit-demo`},[l(`span`,{class:`ds-orbit-demo-ring`},[l(`span`,{class:`ds-orbit-demo-dot`})])])],-1),l(`p`,k,o(H[0].note),1)]),l(`div`,A,[l(`header`,j,[d[3]||=l(`code`,{class:`font-mono text-[12px] text-ink`},`--animate-fade-in-up`,-1),l(`button`,{type:`button`,class:`text-[11px] font-semibold uppercase tracking-label text-brand hover:underline`,onClick:K},o(n(R)(`ds.motion.replay`)),1)]),l(`div`,M,[(t(),u(`span`,{key:G.value,class:`rounded-sm bg-brand text-cream text-[12px] font-semibold tracking-label uppercase px-4 py-2`,style:{animation:`var(--animate-fade-in-up)`}},o(n(R)(`ds.motion.fadePreview`)),1))]),l(`p`,N,o(H[1].note),1)]),l(`div`,P,[d[4]||=l(`code`,{class:`font-mono text-[12px] text-ink block`},`--animate-pulse-soft`,-1),d[5]||=l(`div`,{class:`mt-4 flex h-32 items-center justify-center`},[l(`span`,{class:`inline-block h-3 w-3 rounded-full bg-accent`,style:{animation:`var(--animate-pulse-soft)`}})],-1),l(`p`,F,o(H[2].note),1)])])]),l(`section`,null,[l(`h2`,I,o(n(R)(`ds.motion.reduced.title`)),1),l(`p`,L,o(n(R)(`ds.motion.reduced.body`)),1)])]),_:1},8,[`eyebrow`,`title`,`description`]))}},[[`__scopeId`,`data-v-fa318f09`]]);export{R as default}; |