@weppy/roblox-mcp 2.14.5 → 2.15.0
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.
- package/CHANGELOG.md +40 -0
- package/README.md +5 -2
- package/dashboard/dist/assets/{AssetsPage-CNX7DCV_.js → AssetsPage-D3-InAlf.js} +1 -1
- package/dashboard/dist/assets/{ChangelogDetailPage-DLvmebHY.js → ChangelogDetailPage-fmLGEZVO.js} +1 -1
- package/dashboard/dist/assets/{ChangelogPage-0aA43feO.js → ChangelogPage-6KtWInS5.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-zVAe5VBr.js → ConfirmModal-DJp4ax33.js} +1 -1
- package/dashboard/dist/assets/ConnectionPage-D375gmxK.js +11 -0
- package/dashboard/dist/assets/{ControlsPage-B2bjY0jv.js → ControlsPage-C7zSLjWc.js} +1 -1
- package/dashboard/dist/assets/{CurrentPlaceScope-DeLb8cR4.js → CurrentPlaceScope-DrtUw6py.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-DCbGMtO_.js → GameChangeDetail-Bd5Hg2ZD.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-DjHpz03t.js → InfoLabel-HLPMIIL4.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-BIglETRP.js → OverviewPage-Bmem2hyc.js} +1 -1
- package/dashboard/dist/assets/{PageHeader-D-x0uGJu.js → PageHeader-Cvi0LO4r.js} +1 -1
- package/dashboard/dist/assets/{PlaytestPage-DCKGzlBd.js → PlaytestPage-ChFkixWj.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-v3EWZSAn.js +1 -0
- package/dashboard/dist/assets/{StatusBadge-DqdYVuOn.js → StatusBadge-Cf1Ncow3.js} +1 -1
- package/dashboard/dist/assets/SyncPage-BG7u00IT.js +1 -0
- package/dashboard/dist/assets/SyncPage-sHUpW30U.css +1 -0
- package/dashboard/dist/assets/{Tabs-fJOR1mc6.js → Tabs-2QEkInbt.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-Bv0CkVUl.js → ToolsPage-DbtQxCAM.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-BAHqtajG.js → TooltipText-1fJvqtMt.js} +1 -1
- package/dashboard/dist/assets/{UiPrimitive-DGkX6nPT.js → UiPrimitive-CsV5QE01.js} +1 -1
- package/dashboard/dist/assets/{UiStudioPage-BOnzb7DH.js → UiStudioPage-ZLA3xIIN.js} +1 -1
- package/dashboard/dist/assets/{WhatsNewPage-CXu_qUFe.js → WhatsNewPage-S4qEx4iN.js} +1 -1
- package/dashboard/dist/assets/{copy-BH9EvKHQ.js → copy-d0x3Roiq.js} +1 -1
- package/dashboard/dist/assets/{index-CkZeRxRT.css → index-BDzb8NjS.css} +1 -1
- package/dashboard/dist/assets/{index-5nAADWD6.js → index-C_exRd2o.js} +151 -55
- package/dashboard/dist/assets/{sample-requests-CCiQt0Pe.js → sample-requests-BRAniRWZ.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-CLDBTvFQ.js → useLiveUptime-D0TQTjV7.js} +1 -1
- package/dashboard/dist/assets/useSettings-Ce19GEW2.css +1 -0
- package/dashboard/dist/assets/useSettings-DlZqZGnP.js +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +241 -236
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/ConnectionPage-D8FF2toA.js +0 -11
- package/dashboard/dist/assets/SettingsPage-lgifXJ6E.js +0 -1
- package/dashboard/dist/assets/SyncPage-BbqGQ8N-.js +0 -4
- package/dashboard/dist/assets/SyncPage-BnVXEQel.css +0 -1
- package/dashboard/dist/assets/useSettings-BNH9ENDy.css +0 -1
- package/dashboard/dist/assets/useSettings-_F_53t5J.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as X,e as le,r,j as e,a as U,g as me,d as ye,T as je,A as xe,S as fe}from"./index-C_exRd2o.js";import{P as be}from"./PageHeader-Cvi0LO4r.js";import{I as R}from"./InfoLabel-HLPMIIL4.js";import{T as m}from"./TooltipText-1fJvqtMt.js";import{s as a,u as ve}from"./useSettings-DlZqZGnP.js";import{C as ce}from"./ConfirmModal-DJp4ax33.js";import{D as de,f as ue,r as Se,s as Ce,a as pe,d as se,S as ae,b as Ne}from"./sample-requests-BRAniRWZ.js";import{C as _e}from"./UiPrimitive-CsV5QE01.js";import"./ConfirmModal.module-DJksQHBd.js";const ke="_card_1ende_4",Pe="_cardEmbedded_1ende_14",Le="_cardTitle_1ende_21",Re="_storageConsoleGrid_1ende_30",we="_storageUsageColumn_1ende_37",He="_storagePolicyColumn_1ende_38",Be="_usageRow_1ende_43",Me="_usageTotal_1ende_49",Ae="_usageBreakdown_1ende_56",$e="_usageCounts_1ende_62",De="_storageFooter_1ende_69",Ee="_lastRunRow_1ende_78",Te="_lastRunLabel_1ende_88",Ie="_errorIcon_1ende_94",Ue="_tooltip_1ende_102",ze="_cleanupRow_1ende_125",Fe="_cleanupLabel_1ende_132",Oe="_cleanupBtn_1ende_139",Ge="_cleanupBtnDanger_1ende_168",qe="_retentionSection_1ende_181",We="_retentionTitle_1ende_187",Ye="_retentionFieldset_1ende_194",Ke="_proOverlay_1ende_209",Ve="_modeSegments_1ende_221",Je="_radioLabel_1ende_242",Qe="_radioLabelActive_1ende_263",Ze="_presetGroup_1ende_277",Xe="_presetBtn_1ende_285",et="_presetBtnActive_1ende_308",tt="_freeInput_1ende_315",st="_inputError_1ende_332",at="_inputUnit_1ende_336",nt="_cascadeRow_1ende_343",it="_retentionActions_1ende_359",ot="_saveBtn_1ende_365",rt="_runNowBtn_1ende_393",lt="_errorMsg_1ende_437",ct="_freeInputHitArea_1ende_499",o={card:ke,cardEmbedded:Pe,cardTitle:Le,storageConsoleGrid:Re,storageUsageColumn:we,storagePolicyColumn:He,usageRow:Be,usageTotal:Me,usageBreakdown:Ae,usageCounts:$e,storageFooter:De,lastRunRow:Ee,lastRunLabel:Te,errorIcon:Ie,tooltip:Ue,cleanupRow:ze,cleanupLabel:Fe,cleanupBtn:Oe,cleanupBtnDanger:Ge,retentionSection:qe,retentionTitle:We,retentionFieldset:Ye,proOverlay:Ke,modeSegments:Ve,radioLabel:Je,radioLabelActive:Qe,presetGroup:Ze,presetBtn:Xe,presetBtnActive:et,freeInput:tt,inputError:st,inputUnit:at,cascadeRow:nt,retentionActions:it,saveBtn:ot,runNowBtn:rt,errorMsg:lt,freeInputHitArea:ct};function dt(t,s){return!!(t.mode==="off"&&s.mode!=="off"||t.mode==="age"&&s.mode==="age"&&(s.ageDays??0)<(t.ageDays??0)||t.mode==="size"&&s.mode==="size"&&(s.sizeMb??0)<(t.sizeMb??0)||!t.cascadeSnapshots&&s.cascadeSnapshots)}function ne(t){return t.mode==="age"?Number.isInteger(t.ageDays)&&t.ageDays>=1&&t.ageDays<=365:t.mode==="size"?Number.isInteger(t.sizeMb)&&t.sizeMb>=50&&t.sizeMb<=1e4:!0}function ut(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function Y(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function pt({placeId:t,tier:s,currentPolicy:l,onSaved:d}){const{t:i}=X(),{trackEvent:b}=le(),[n,g]=r.useState(l),[p,_]=r.useState(()=>[7,14,30,90].includes(l.ageDays??-1)?"":String(l.ageDays??30)),[v,k]=r.useState(()=>[100,500,1e3].includes(l.sizeMb??-1)?"":String(l.sizeMb??500)),[P,D]=r.useState(null),[x,f]=r.useState(!1),[E,w]=r.useState(!1),[y,H]=r.useState(!1),[L,A]=r.useState(null);r.useEffect(()=>{g(l);const h=[7,14,30,90],M=[100,500,1e3];_(h.includes(l.ageDays??-1)?"":String(l.ageDays??30)),k(M.includes(l.sizeMb??-1)?"":String(l.sizeMb??500))},[l]);const $=s==="basic",N=ne(n),j=ut(l,n),T=N&&!j&&!E,S=h=>{g(M=>{const O={...M,mode:h};return h==="age"&&(O.ageDays=parseInt(p,10)||30),h==="size"&&(O.sizeMb=parseInt(v,10)||500),O})},B=h=>{_(""),g(M=>({...M,ageDays:h}))},z=h=>{k(""),g(M=>({...M,sizeMb:h}))},F=h=>{_(h);const M=parseInt(h,10);Number.isNaN(M)||g(O=>({...O,ageDays:M}))},c=h=>{k(h);const M=parseInt(h,10);Number.isNaN(M)||g(O=>({...O,sizeMb:M}))},I=async()=>{if(A(null),b("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),dt(l,n)){try{const h=await ue(t,{mode:n.mode,ageDays:n.ageDays,sizeMb:n.sizeMb,cascadeSnapshots:n.cascadeSnapshots});D(h.dryRun),f(!0)}catch(h){A(h.message)}return}await W()},W=async()=>{w(!0);try{await Ce(t,n),f(!1),d()}catch(h){throw A(h.message),h}finally{w(!1)}},u=async()=>{A(null),b("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),H(!0);try{await Se(t),d()}catch(h){A(h.message)}finally{H(!1)}},C=P?`${i("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${P.wouldRemoveRequests}${i("uiStudio.cleanup.policy.confirm.requests","건")} / ${P.wouldRemoveSnapshots}${i("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${Y(P.wouldFreeBytes)} ${i("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",K=n.mode==="age"&&!ne(n),q=n.mode==="size"&&!ne(n);return e.jsxs("div",{className:o.retentionSection,children:[e.jsx("h3",{className:o.retentionTitle,children:e.jsx(R,{label:i("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:i("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[$&&e.jsx("div",{className:o.proOverlay,title:i("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능"),children:e.jsx("div",{className:o.tooltip,children:i("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능")})}),e.jsxs("fieldset",{className:o.retentionFieldset,disabled:$,"aria-label":i("uiStudio.cleanup.policy.title","자동 삭제 정책"),style:$?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsxs("div",{className:o.modeSegments,"data-testid":"cleanup-mode-segments",children:[e.jsx(m,{text:i("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:`${o.radioLabel} ${n.mode==="off"?o.radioLabelActive:""}`,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:n.mode==="off",onChange:()=>S("off")}),i("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})}),e.jsx(m,{text:i("uiStudio.cleanup.policy.modeAge.tooltip","Automatically delete data older than the configured number of days."),children:e.jsxs("label",{className:`${o.radioLabel} ${n.mode==="age"?o.radioLabelActive:""}`,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"age",checked:n.mode==="age",onChange:()=>S("age")}),i("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})}),e.jsx(m,{text:i("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:`${o.radioLabel} ${n.mode==="size"?o.radioLabelActive:""}`,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:n.mode==="size",onChange:()=>S("size")}),i("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})]}),n.mode==="age"&&e.jsxs("div",{className:o.presetGroup,children:[[7,14,30,90].map(h=>e.jsx(m,{text:i("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${n.ageDays===h&&p===""?o.presetBtnActive:""}`,onClick:()=>B(h),children:[h,i("uiStudio.cleanup.policy.daysUnit","일")]})},h)),e.jsx(m,{text:i("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("label",{className:o.freeInputHitArea,children:e.jsx("input",{type:"number",className:`${o.freeInput} ${K?o.inputError:""}`,value:p,min:1,max:365,onChange:h=>F(h.target.value)})})}),e.jsxs("span",{className:o.inputUnit,children:["1–365",i("uiStudio.cleanup.policy.daysUnit","일")]})]}),n.mode==="size"&&e.jsxs("div",{className:o.presetGroup,children:[[100,500,1e3].map(h=>e.jsx(m,{text:i("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${o.presetBtn} ${n.sizeMb===h&&v===""?o.presetBtnActive:""}`,onClick:()=>z(h),children:[h,i("uiStudio.cleanup.policy.mbUnit","MB")]})},h)),e.jsx(m,{text:i("uiStudio.cleanup.policy.sizeInput.tooltip","Enter any value between 50 MB and 10000 MB (10 GB)."),children:e.jsx("label",{className:o.freeInputHitArea,children:e.jsx("input",{type:"number",className:`${o.freeInput} ${q?o.inputError:""}`,value:v,min:50,max:1e4,onChange:h=>c(h.target.value)})})}),e.jsxs("span",{className:o.inputUnit,children:["50–10000",i("uiStudio.cleanup.policy.mbUnit","MB")]})]}),e.jsx(m,{text:i("uiStudio.cleanup.policy.cascade.tooltip","Also delete the capture images linked to those records. If off, the images stay."),children:e.jsxs("label",{className:o.cascadeRow,children:[e.jsx(_e,{checked:n.cascadeSnapshots,onChange:h=>g(M=>({...M,cascadeSnapshots:h.target.checked}))}),i("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:o.retentionActions,children:[e.jsx(m,{text:i("uiStudio.cleanup.policy.save.tooltip","Save the current cleanup rule. It runs in the background from then on."),children:e.jsx("button",{type:"button",className:o.saveBtn,onClick:()=>void I(),disabled:!T,children:i("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(m,{text:i("uiStudio.cleanup.policy.runNow.tooltip","저장된 정리 정책을 다음 자동 실행까지 기다리지 않고 지금 한 번 실행합니다."),children:e.jsx("button",{type:"button",className:o.runNowBtn,onClick:()=>void u(),disabled:y,children:i("uiStudio.cleanup.policy.runNow","저장된 정책으로 정리")})})]}),L&&e.jsx("div",{className:o.errorMsg,children:L})]})]}),x&&P&&e.jsx(de,{title:i("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:C,danger:!0,confirmLabel:i("uiStudio.cleanup.policy.save","정책 저장"),busy:E,onConfirm:W,onClose:()=>f(!1)})]})}function gt({placeId:t,tier:s,onChanged:l,sampleUsage:d,sampleRetention:i,embedded:b=!1}){const{t:n}=X(),g=s==="basic"&&d!=null&&i!=null,[p,_]=r.useState(g?d:null),[v,k]=r.useState(g?i:null),[P,D]=r.useState(null),[x,f]=r.useState(null),[E,w]=r.useState(null),y=r.useCallback(async()=>{if(!g&&t!=null){D(null);try{const[S,B]=await Promise.all([pe(t),ue(t)]);_(S),k(B.policy)}catch(S){D(S.message)}}},[t,g]);r.useEffect(()=>{y()},[y]);const H=r.useCallback(()=>{y(),l==null||l()},[y,l]),L=r.useCallback(async()=>{if(x&&t!=null){w(null);try{x.kind==="keep7"?await se(t,{olderThanDays:7,alsoSnapshots:!0}):x.kind==="keep30"?await se(t,{olderThanDays:30,alsoSnapshots:!0}):await se(t,{all:!0,alsoSnapshots:!0}),f(null),y(),l==null||l()}catch(S){throw w(S.message),S}}},[x,t,y,l]);function A(S){const B=n("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return S.kind==="keep7"?`${n("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${B}`:S.kind==="keep30"?`${n("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${B}`:`${((p==null?void 0:p.requestCount)??0)+((p==null?void 0:p.snapshotCount)??0)}${n("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${B}`}if(t==null&&!g)return null;if(P)return e.jsx("div",{className:`${o.card} ${b?o.cardEmbedded:""}`,children:e.jsx("p",{className:o.errorMsg,children:P})});if(!p||!v)return e.jsx("div",{className:`${o.card} ${b?o.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:n("uiStudio.storage.loading","로딩 중...")})});const $=v.lastRunAt,N=v.lastRunStats,j=$?new Date($).toLocaleString():null,T=t??0;return e.jsxs("div",{className:`${o.card} ${b?o.cardEmbedded:""}`,children:[!b&&e.jsx("h3",{className:o.cardTitle,children:e.jsx(R,{label:n("uiStudio.storage.title","UI Studio 저장 데이터"),tooltip:n("uiStudio.storage.title.tooltip","Disk usage of UI Studio change records and screenshots.")})}),e.jsxs("div",{className:o.storageConsoleGrid,"data-testid":"ui-studio-storage-console-grid",children:[e.jsx("section",{className:o.storageUsageColumn,children:e.jsxs("div",{className:o.usageRow,children:[e.jsx(m,{text:n("uiStudio.storage.usageLabel.tooltip","Disk space currently used by UI Studio for this project."),children:e.jsxs("div",{className:o.usageTotal,children:[n("uiStudio.storage.usageLabel","사용 중")," ",Y(p.totalBytes)]})}),e.jsxs("div",{className:o.usageBreakdown,children:[e.jsx(m,{text:n("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[n("uiStudio.storage.historyBytes","변경 이력")," ",Y(p.historyBytes)]})})," · ",e.jsx(m,{text:n("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[n("uiStudio.storage.snapshotBytes","화면 캡처")," ",Y(p.snapshotBytes)]})})]}),e.jsxs("div",{className:o.usageCounts,children:[e.jsx(m,{text:n("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[n("uiStudio.storage.requestCount","변경 기록")," ",p.requestCount.toLocaleString(),n("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(m,{text:n("uiStudio.storage.mutationCount.tooltip","Number of detail changes inside actions (one property edit = 1)."),children:e.jsxs("span",{children:[n("uiStudio.storage.mutationCount","변경 상세")," ",p.mutationCount.toLocaleString(),n("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(m,{text:n("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[n("uiStudio.storage.snapshotCount","화면 캡처")," ",p.snapshotCount.toLocaleString(),n("uiStudio.storage.countSuffix","개")]})})]})]})}),e.jsx("section",{className:o.storagePolicyColumn,children:e.jsx(pt,{placeId:T,tier:s,currentPolicy:v,onSaved:H})})]}),e.jsxs("div",{className:o.storageFooter,"data-testid":"ui-studio-storage-footer",children:[e.jsxs("div",{className:o.lastRunRow,children:[e.jsx("span",{className:o.lastRunLabel,children:e.jsx(R,{label:n("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:n("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),j?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:j}),N&&e.jsxs("span",{children:["· ",n("uiStudio.storage.requestCount","변경 기록")," ",N.removedRequests,n("uiStudio.storage.countSuffix","개")," / ",n("uiStudio.storage.snapshotCount","화면 캡처")," ",N.removedSnapshots,n("uiStudio.storage.countSuffix","개")," / ",Y(N.freedBytes)," ",n("uiStudio.storage.lastRunFreed","회수")]}),N&&N.errors>0&&e.jsxs("span",{className:o.errorIcon,title:`${n("uiStudio.storage.lastRunErrors","오류")} ${N.errors}건`,children:["⚠",e.jsxs("span",{className:o.tooltip,children:[n("uiStudio.storage.lastRunErrors","오류")," ",N.errors,n("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:n("uiStudio.storage.lastRunNever","—")})]}),e.jsxs("div",{className:o.cleanupRow,children:[e.jsx("span",{className:o.cleanupLabel,children:e.jsx(R,{label:n("uiStudio.cleanup.label","수동 정리"),tooltip:n("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(m,{text:n("uiStudio.cleanup.keep7.tooltip","Delete change records and captures older than 7 days."),children:e.jsx("button",{type:"button",className:o.cleanupBtn,onClick:()=>f({kind:"keep7"}),disabled:s==="basic",children:n("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(m,{text:n("uiStudio.cleanup.keep30.tooltip","Delete change records and captures older than 30 days."),children:e.jsx("button",{type:"button",className:o.cleanupBtn,onClick:()=>f({kind:"keep30"}),disabled:s==="basic",children:n("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),!b&&e.jsx(m,{text:n("uiStudio.cleanup.deleteAll.tooltip","Delete every change record and capture for this project. The actual UI in Roblox Studio is not affected."),children:e.jsx("button",{type:"button",className:`${o.cleanupBtn} ${o.cleanupBtnDanger}`,onClick:()=>f({kind:"all"}),disabled:s==="basic",children:n("uiStudio.cleanup.deleteAll","전체 삭제…")})})]})]}),E&&e.jsx("div",{className:o.errorMsg,children:E}),x&&e.jsx(de,{title:n("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:A(x),danger:!0,confirmLabel:n("common.delete","삭제"),onConfirm:L,onClose:()=>{f(null),w(null)}})]})}function ie(t,s){const l={placeId:String(t)};return s&&(l["preview.mode"]=s.mode,s.mode==="size"&&(l["preview.sizeMb"]=String(s.sizeMb))),U.get("/api/dashboard/changelog/cleanup",l)}function oe(t){return U.put("/api/dashboard/changelog/cleanup",t)}function ht(t){return U.post(`/api/dashboard/changelog/cleanup/run?placeId=${encodeURIComponent(t)}`)}const mt=[100,500,1e3];function re(t,s){return t.mode!==s.mode?!1:t.mode==="off"||s.mode==="size"&&t.sizeMb===s.sizeMb}function yt(t,s){return t.mode==="off"?!1:s.mode==="off"||t.sizeMb<s.sizeMb}function J(t){return t<1e3?`${t} B`:t<1e6?`${(t/1e3).toFixed(1)} KB`:t<1e9?`${(t/1e6).toFixed(1)} MB`:`${(t/1e9).toFixed(2)} GB`}function jt({placeId:t,onChanged:s}){const{locale:l,t:d}=X(),[i,b]=r.useState(null),[n,g]=r.useState({mode:"size",sizeMb:500}),[p,_]=r.useState(t!==null),[v,k]=r.useState(!1),[P,D]=r.useState(!1),[x,f]=r.useState(!1),[E,w]=r.useState(!1),[y,H]=r.useState(null),L=r.useCallback(async()=>{if(t===null){b(null),_(!1);return}D(!1);try{const u=await ie(t);b(u),g(u.policy)}catch{D(!0)}finally{_(!1)}},[t]);r.useEffect(()=>{_(t!==null),L()},[L,t]);const A=r.useCallback(async u=>{k(!0),f(!1),w(!1);try{await oe(u),H(null),await L(),w(!0),s==null||s()}catch{f(!0)}finally{k(!1)}},[L,s]),$=r.useCallback(async()=>{if(!(!i||t===null||re(n,i.policy))){k(!0),f(!1),w(!1);try{if(yt(n,i.policy)){const u=await ie(t,n);if(u.preview.affectedPlaceCount>0){H({policy:n,preview:u});return}}await oe(n),await L(),w(!0),s==null||s()}catch{f(!0)}finally{k(!1)}}},[i,n,L,s,t]),N=r.useCallback(async()=>{if(t!==null){k(!0),f(!1),w(!1);try{await ht(t),await L(),s==null||s()}catch{f(!0)}finally{k(!1)}}},[L,s,t]),j=i==null?void 0:i.selectedPlace.currentUsage,T=(i==null?void 0:i.policy.mode)==="size"?i.policy.sizeMb*1e6:null,S=T??Math.max((j==null?void 0:j.bytes)??0,1),B=Math.min(100,((j==null?void 0:j.sessionBytes)??0)/S*100),z=Math.min(Math.max(0,100-B),((j==null?void 0:j.contextBytes)??0)/S*100),F=i?!re(n,i.policy):!1,c=u=>u.mode==="off"?d("settings.projectChanges.cleanup.unlimited","Unlimited"):`${u.sizeMb} MB`,I=r.useMemo(()=>{if(!y)return"";const u=y.preview.preview,C=d("settings.projectChanges.cleanup.confirm.message","{places} Places · {sessions} sessions · {bytes} expected to be freed.").replace("{places}",u.affectedPlaceCount.toLocaleString()).replace("{sessions}",u.deleteSessionCount.toLocaleString()).replace("{bytes}",J(u.estimatedFreedBytes));return u.wouldRemainOverLimitPlaceCount===0?C:`${C} ${d("settings.projectChanges.cleanup.confirm.protected","{places} Place may remain over the limit because active data is protected.").replace("{places}",u.wouldRemainOverLimitPlaceCount.toLocaleString())}`},[y,d]);if(t===null)return e.jsx("div",{className:a.projectChangesPanel,children:e.jsx("p",{className:a.projectChangesEmpty,children:d("settings.projectChanges.cleanup.noPlace","Select a Place to manage saved project changes.")})});if(p)return e.jsx("div",{className:a.projectChangesPanel,children:e.jsx("p",{className:a.projectChangesEmpty,children:d("settings.projectChanges.cleanup.loading","Loading storage settings…")})});if(P||!i||!j)return e.jsxs("div",{className:a.projectChangesPanel,children:[e.jsx("p",{className:a.projectChangesError,role:"alert",children:d("settings.projectChanges.cleanup.loadFailed","Could not load storage settings.")}),e.jsx("button",{className:a.projectChangesSecondaryButton,type:"button",onClick:()=>{_(!0),L()},children:d("common.retry","Retry")})]});const W=T===null?d("settings.projectChanges.cleanup.usageUnlimited","{used} used · Unlimited").replace("{used}",J(j.bytes)):d("settings.projectChanges.cleanup.usageLimited","{used} used of {limit}").replace("{used}",J(j.bytes)).replace("{limit}",c(i.policy));return e.jsxs("div",{className:a.projectChangesPanel,children:[e.jsxs("div",{className:a.projectChangesConsoleGrid,"data-testid":"project-storage-console-grid",children:[e.jsxs("section",{className:a.projectChangesUsageColumn,children:[e.jsx("h3",{className:a.projectChangesPanelTitle,children:e.jsx(R,{label:d("settings.projectChanges.cleanup.title","Storage management"),tooltip:d("settings.projectChanges.cleanup.title.tooltip","Set how much Project Change Summary history each Place can keep.")})}),e.jsxs("div",{className:a.projectChangesUsageBlock,children:[e.jsx("div",{className:a.projectChangesUsageSummary,children:W}),e.jsxs("div",{className:a.projectChangesQuotaRail,role:"meter","aria-label":d("settings.projectChanges.cleanup.usageAria","Place storage usage"),"aria-valuemin":0,"aria-valuenow":j.bytes,"aria-valuemax":T??j.bytes,children:[e.jsx("span",{className:a.projectChangesSessionRail,style:{width:`${B}%`}}),e.jsx("span",{className:a.projectChangesContextRail,style:{width:`${z}%`}})]}),e.jsxs("div",{className:a.projectChangesUsageLegend,children:[e.jsxs("span",{children:[d("settings.projectChanges.cleanup.sessions","Sessions")," ",e.jsx("strong",{children:J(j.sessionBytes)})]}),e.jsxs("span",{children:[d("settings.projectChanges.cleanup.contexts","Contexts")," ",e.jsx("strong",{children:J(j.contextBytes)})]})]})]})]}),e.jsxs("section",{className:a.projectChangesPolicyColumn,children:[e.jsx("p",{className:a.projectChangesScope,children:d("settings.projectChanges.cleanup.scope","One setting applies the selected limit separately to every Place.")}),e.jsxs("fieldset",{className:a.projectChangesPolicyFieldset,disabled:v,children:[e.jsx("legend",{className:a.projectChangesPolicyLegend,children:d("settings.projectChanges.cleanup.limit","Limit per Place")}),e.jsxs("div",{className:a.projectChangesPresetGroup,children:[mt.map(u=>{const C=n.mode==="size"&&n.sizeMb===u;return e.jsx("button",{className:`${a.projectChangesPresetButton} ${C?a.projectChangesPresetButtonActive:""}`,type:"button","aria-pressed":C,onClick:()=>g({mode:"size",sizeMb:u}),children:d("settings.projectChanges.cleanup.preset","{sizeMb}MB").replace("{sizeMb}",String(u))},u)}),e.jsx("button",{className:`${a.projectChangesPresetButton} ${n.mode==="off"?a.projectChangesPresetButtonActive:""}`,type:"button","aria-pressed":n.mode==="off",onClick:()=>g({mode:"off"}),children:d("settings.projectChanges.cleanup.unlimited","Unlimited")})]})]}),e.jsxs("div",{className:a.projectChangesActions,children:[e.jsx("button",{className:a.projectChangesSaveButton,type:"button",disabled:!F||v,onClick:()=>void $(),children:d("common.save","Save")}),e.jsx("button",{className:a.projectChangesSecondaryButton,type:"button",disabled:v,onClick:()=>void N(),children:d("settings.projectChanges.cleanup.runNow","Run saved policy")}),E&&e.jsx("span",{className:a.projectChangesSaved,role:"status",children:d("settings.projectChanges.cleanup.saved","Saved")})]})]})]}),i.selectedPlace.dryRun.wouldRemainOverLimit&&e.jsx("p",{className:a.projectChangesWarning,children:d("settings.projectChanges.cleanup.protectedWarning","Active changes are protected, so this Place may stay over the limit.")}),e.jsxs("div",{className:a.projectChangesLastRun,"data-testid":"project-storage-footer",children:[e.jsx("span",{className:a.projectChangesLastRunLabel,children:d("settings.projectChanges.cleanup.lastRun","Last cleanup")}),i.selectedPlace.lastRun?e.jsxs("span",{children:[new Date(i.selectedPlace.lastRun.ranAt).toLocaleString(l)," · ",d("settings.projectChanges.cleanup.lastRunSummary","{sessions} sessions · {bytes} freed").replace("{sessions}",i.selectedPlace.lastRun.deletedSessionCount.toLocaleString()).replace("{bytes}",J(i.selectedPlace.lastRun.freedBytes))]}):e.jsx("span",{children:d("settings.projectChanges.cleanup.neverRun","Not run yet")})]}),x&&e.jsx("p",{className:a.projectChangesError,role:"alert",children:d("settings.projectChanges.cleanup.actionFailed","Could not update storage settings.")}),e.jsx(ce,{open:y!==null,title:d("settings.projectChanges.cleanup.confirm.title","Apply this limit and clean saved changes?"),message:I,cancelLabel:d("common.cancel","Cancel"),confirmLabel:d("settings.projectChanges.cleanup.confirm.apply","Apply and clean"),loading:v,onCancel:()=>!v&&H(null),onConfirm:()=>{y&&A(y.policy)}})]})}const xt={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},ft={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function bt(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function G(t){try{return await t}catch{return null}}function ee(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function te(t,s,l,d){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(l,d)}`}function Q(t,s,l){const d=l===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):Y(l);return`${s} · ${d}`}function Z(t,s){var d;const l=(d=t==null?void 0:t[s])==null?void 0:d.bytes;return typeof l=="number"&&Number.isFinite(l)?l:null}function vt(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,Y(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function St({tier:t}){const{t:s}=X(),[l,d]=r.useState(xt),[i,b]=r.useState(ft),[n,g]=r.useState(t==="basic"?ae:null),[p,_]=r.useState(null),[v,k]=r.useState(!0),[P,D]=r.useState(!0),[x,f]=r.useState(null),[E,w]=r.useState(()=>new Set),[y,H]=r.useState(null),[L,A]=r.useState(!1),[$,N]=r.useState(null),j=r.useCallback(async()=>{k(!0);const u=await G(me()),C=bt(u);_(C);const[K,q,h,M,O,ge,V]=await Promise.all([G(U.get("/api/dashboard/history",{limit:"1",offset:"0"})),G(U.get("/api/dashboard/tool-stats")),G(U.get("/sync/history",{limit:"1",offset:"0"})),G(U.get("/api/dashboard/playtest/history")),G(U.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),G(U.get("/api/dashboard/connection-log")),G(U.get("/api/dashboard/storage-summary"))]),he=t==="basic"?ae:C===null?null:await G(pe(C));d({toolsActivity:ee(K),toolStats:(q==null?void 0:q.totalCalls)??null,toolSessions:(q==null?void 0:q.totalSessions)??null,syncLog:ee(h),playtestReports:ee(M),projectChanges:ee(O),connectionLog:ee(ge)}),b({toolsActivity:Z(V,"toolsActivity"),toolStats:Z(V,"toolStats"),syncLog:Z(V,"syncLog"),playtestReports:Z(V,"playtestReports"),projectChanges:Z(V,"projectChanges"),connectionLog:Z(V,"connectionLog")}),g(he),k(!1)},[t]);r.useEffect(()=>{j()},[j]);const T=r.useCallback(u=>{w(C=>{if(C.has(u))return C;const K=new Set(C);return K.add(u),K}),f(C=>C===u?null:u)},[]),S=r.useMemo(()=>[{key:"toolsActivity",title:s("settings.dataHistory.toolsActivity.title","Tool activity"),description:s("settings.dataHistory.toolsActivity.description","Saved tool runs shown on the Tools page."),metric:Q(s,te(s,l.toolsActivity,"settings.dataHistory.metric.records","records"),i.toolsActivity),metricTooltip:s("settings.dataHistory.toolsActivity.metric.tooltip","Number of saved tool runs and the disk space they use."),route:"/tools",clearEndpoint:"/api/dashboard/tools/history/clear"},{key:"toolStats",title:s("settings.dataHistory.toolStats.title","Tool usage statistics"),description:s("settings.dataHistory.toolStats.description","Aggregated tool counts and status totals."),metric:Q(s,l.toolStats===null?s("settings.dataHistory.metric.unavailable","Unavailable"):`${l.toolStats.toLocaleString()} ${s("settings.dataHistory.metric.runs","runs")} · ${(l.toolSessions??0).toLocaleString()} ${s("settings.dataHistory.metric.sessions","sessions")}`,i.toolStats),metricTooltip:s("settings.dataHistory.toolStats.metric.tooltip","Aggregated total runs and session counts."),route:"/tools",clearEndpoint:"/api/dashboard/tools/statistics/clear"},{key:"syncLog",title:s("settings.dataHistory.syncLog.title","Sync log"),description:s("settings.dataHistory.syncLog.description","Saved file sync events for the active place."),metric:Q(s,te(s,l.syncLog,"settings.dataHistory.metric.records","records"),i.syncLog),metricTooltip:s("settings.dataHistory.syncLog.metric.tooltip","Number of saved sync events and the disk space they use."),route:"/sync",clearEndpoint:"/api/dashboard/sync/history/clear"},{key:"playtestReports",title:s("settings.dataHistory.playtest.title","Playtest reports"),description:s("settings.dataHistory.playtest.description","Saved automated playtest reports and logs."),metric:Q(s,te(s,l.playtestReports,"settings.dataHistory.metric.reports","reports"),i.playtestReports),metricTooltip:s("settings.dataHistory.playtestReports.metric.tooltip","Number of saved playtest reports and the disk space they use."),route:"/playtest",clearEndpoint:"/api/dashboard/playtest/history/clear"},{key:"projectChanges",title:s("settings.dataHistory.projectChanges.title","Project change summary"),description:s("settings.dataHistory.projectChanges.description","Saved summaries of project changes."),metric:Q(s,te(s,l.projectChanges,"settings.dataHistory.metric.records","records"),i.projectChanges),metricTooltip:s("settings.dataHistory.projectChanges.metric.tooltip","Number of saved project change summaries and the disk space they use."),route:"/changelog",clearEndpoint:"/api/dashboard/changelog/clear"},{key:"connectionLog",title:s("settings.dataHistory.connectionLog.title","Connection log"),description:s("settings.dataHistory.connectionLog.description","Saved MCP and Studio connection events."),metric:Q(s,te(s,l.connectionLog,"settings.dataHistory.metric.records","records"),i.connectionLog),metricTooltip:s("settings.dataHistory.connectionLog.metric.tooltip","Number of saved connection events and the disk space they use."),route:"/connection",clearEndpoint:"/api/dashboard/connection-log/clear"}],[l,i,s]),B=async()=>{if(y){A(!0),N(null);try{if(y.kind==="uiStudio"){if(t!=="pro"||p===null)throw new Error("UI Studio place is unavailable");await se(p,{all:!0,alsoSnapshots:!0}),N(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else{const u=y.row.key==="projectChanges";if(u&&p===null)throw new Error("Project changes place is unavailable");let C=y.row.clearEndpoint;u&&p!==null&&(C=`${C}?placeId=${encodeURIComponent(p)}`),await U.post(C),N(u?s("settings.dataHistory.projectChanges.clear.success","Project change summaries cleared."):s("settings.dataHistory.clear.success","Saved data cleared."))}H(null),await j()}catch{N(y.kind==="uiStudio"?s("settings.dataHistory.uiStudio.clear.failed","Failed to clear UI Studio saved data."):s("settings.dataHistory.clear.failed","Failed to clear saved data."))}finally{A(!1)}}},z=t==="pro"?p:0,F=t==="pro"&&p!==null,c=(y==null?void 0:y.kind)==="uiStudio",I=(y==null?void 0:y.kind)==="row"&&y.row.key==="projectChanges",W=s("settings.dataHistory.title","Data & History");return e.jsxs(e.Fragment,{children:[e.jsxs("section",{id:"data-history",className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:s("settings.dataHistory.title","Data & History"),tooltip:s("settings.dataHistory.title.tooltip","Manage saved dashboard data in one place.")}),e.jsxs("div",{className:a.cardHeaderActions,children:[e.jsx(m,{text:s("settings.dataHistory.scope.tooltip","Clear actions apply to the current project and active place where applicable."),children:e.jsx("span",{className:a.headerBadge,children:v?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(m,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:a.collapseButton,type:"button","aria-expanded":P,"aria-controls":"settings-data-history-body","aria-label":P?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",W):s("settings.dataHistory.expand","Expand {title}").replace("{title}",W),onClick:()=>D(u=>!u),children:P?"▾":"▸"})})]})]}),P&&e.jsxs("div",{id:"settings-data-history-body",children:[e.jsx("p",{className:a.dataHistoryIntro,children:s("settings.dataHistory.intro","Review saved dashboard data, open the related page, or clear stored records from one place.")}),e.jsxs("div",{className:a.dataHistoryList,children:[S.map(u=>e.jsxs(r.Fragment,{children:[e.jsxs("div",{className:`${a.dataHistoryRow} ${u.key==="projectChanges"&&x==="projectChanges"?a.dataHistoryRowExpanded:""}`,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:u.title}),e.jsx("div",{className:a.dataHistoryDescription,children:u.description})]}),e.jsx(m,{text:u.metricTooltip,children:e.jsx("div",{className:a.dataHistoryMetric,children:u.metric})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(m,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:`#${u.route}`,children:s("settings.dataHistory.open","Open")})}),u.key==="projectChanges"&&e.jsx(m,{text:s("settings.dataHistory.manageStorage.tooltip","Show or hide storage policy and cleanup controls."),children:e.jsxs("button",{className:a.manageStorageButton,type:"button","aria-expanded":x==="projectChanges","aria-controls":"settings-project-changes-storage","aria-label":s("settings.dataHistory.manageStorage.projectChanges.aria","Manage Project change summary storage"),onClick:()=>T("projectChanges"),children:[s("settings.dataHistory.manageStorage","Manage storage"),e.jsx("span",{"aria-hidden":"true",children:x==="projectChanges"?"▴":"▾"})]})}),e.jsx(m,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:a.dangerButton,type:"button",disabled:u.key==="projectChanges"&&p===null,onClick:()=>H({kind:"row",row:u}),children:u.key==="projectChanges"?s("settings.dataHistory.clearAll","Clear all"):s("common.clear","Clear")})})]})]}),u.key==="projectChanges"&&E.has("projectChanges")&&e.jsx("div",{id:"settings-project-changes-storage",className:`${a.dataHistoryDetail} ${a.projectChangesDataHistoryDetail}`,hidden:x!=="projectChanges",children:e.jsx(jt,{placeId:p,onChanged:j})})]},u.key)),e.jsxs("div",{className:`${a.dataHistoryRow} ${x==="uiStudio"?a.dataHistoryRowExpanded:""}`,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:s("settings.dataHistory.uiStudio.title","UI Studio history and screenshots")}),e.jsx("div",{className:a.dataHistoryDescription,children:s("settings.dataHistory.uiStudio.description","Saved UI Studio change records, screenshots, and cleanup policy.")})]}),e.jsx(m,{text:s("settings.dataHistory.uiStudio.metric.tooltip","UI Studio change record and capture counts, plus total disk usage."),children:e.jsx("div",{className:a.dataHistoryMetric,children:vt(s,n)})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(m,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:"#/ui-studio?tab=history",children:s("settings.dataHistory.open","Open")})}),e.jsx(m,{text:s("settings.dataHistory.manageStorage.tooltip","Show or hide storage policy and cleanup controls."),children:e.jsxs("button",{className:a.manageStorageButton,type:"button","aria-expanded":x==="uiStudio","aria-controls":"settings-ui-studio-storage","aria-label":s("settings.dataHistory.manageStorage.uiStudio.aria","Manage UI Studio history and screenshots storage"),onClick:()=>T("uiStudio"),children:[s("settings.dataHistory.manageStorage","Manage storage"),e.jsx("span",{"aria-hidden":"true",children:x==="uiStudio"?"▴":"▾"})]})}),e.jsx(m,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:a.dangerButton,type:"button",disabled:!F,onClick:()=>H({kind:"uiStudio"}),children:s("settings.dataHistory.clearAll","Clear all")})})]})]}),E.has("uiStudio")&&e.jsx("div",{id:"settings-ui-studio-storage",className:`${a.dataHistoryDetail} ${a.uiStudioDataHistoryDetail}`,hidden:x!=="uiStudio",children:e.jsx(gt,{placeId:z,tier:t,onChanged:j,embedded:!0,...t==="basic"?{sampleUsage:ae,sampleRetention:Ne}:{}})})]}),$&&e.jsx("p",{className:a.inlineStatus,children:$})]})]}),e.jsx(ce,{open:y!==null,title:c?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):I?s("settings.dataHistory.projectChanges.clear.title","Clear project change summaries?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:c?s("settings.dataHistory.uiStudio.clear.message","This deletes saved UI Studio change records and screenshots only. Roblox Studio instances and project objects are not changed."):I?s("settings.dataHistory.projectChanges.clear.message","This deletes completed sessions and ended context history for the selected Place. Active work and Roblox Studio project data stay intact."):s("settings.dataHistory.clear.message","This deletes saved dashboard records only. Roblox Studio instances and project objects are not changed."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:I||c?s("settings.dataHistory.clearAll","Clear all"):s("common.clear","Clear"),loading:L,onCancel:()=>!L&&H(null),onConfirm:()=>void B()})]})}const Ct=r.forwardRef(function({autoOpen:s,settingsFilePath:l,saving:d,targeted:i,updateDashboardPreferences:b},n){const{t:g}=X(),[p,_]=r.useState("idle"),v="settings-dashboard-auto-open-label",k=d||p==="saving",P=async x=>{_("saving");try{await b({autoOpen:x}),_("saved")}catch{_("error")}},D=p==="saving"?g("settings.dashboard.autoOpen.saving","Saving…"):p==="saved"?g("settings.dashboard.autoOpen.saved","Saved for the next server start."):p==="error"?g("settings.dashboard.autoOpen.error","Could not save. The previous setting was restored."):" ";return e.jsxs("div",{id:"settings-dashboard",ref:n,tabIndex:-1,"data-testid":"settings-dashboard-card",className:[a.card,a.dashboardCard,i?a.dashboardCardTarget:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:g("settings.dashboard.title","Dashboard"),tooltip:g("settings.dashboard.title.tooltip","Choose how WEPPY Dashboard behaves when the MCP Server starts.")}),e.jsx(m,{text:g("settings.dashboard.autoOpen.nextStart","Applies the next time the MCP Server starts."),children:e.jsx("span",{className:a.headerBadge,children:g("settings.dashboard.nextStartBadge","Next Start")})})]}),e.jsxs("div",{className:a.dashboardSettingRow,children:[e.jsxs("div",{className:a.dashboardSettingCopy,children:[e.jsx("span",{id:v,className:a.dashboardSettingLabel,children:g("settings.dashboard.autoOpen.label","Open Dashboard when WEPPY starts")}),e.jsx("span",{className:a.dashboardSettingDescription,children:g("settings.dashboard.autoOpen.description","Automatically opens this Dashboard after the MCP Server starts.")}),e.jsx("span",{className:a.dashboardSettingMeta,children:g("settings.dashboard.autoOpen.nextStart","Applies the next time the MCP Server starts.")})]}),e.jsxs("label",{className:`${a.toggleSwitch} ${a.dashboardToggleTarget}`,children:[e.jsx("input",{className:a.toggleInput,type:"checkbox",role:"switch","aria-labelledby":v,checked:s,disabled:k,onChange:x=>{P(x.target.checked)}}),e.jsx("span",{className:a.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:a.toggleThumb})})]})]}),e.jsxs("dl",{className:a.dashboardDetails,children:[e.jsxs("div",{className:a.dashboardDetailRow,children:[e.jsx("dt",{children:g("settings.dashboard.settingsFile.label","Settings file")}),e.jsx("dd",{children:e.jsx("code",{className:a.dashboardSettingsFilePath,children:l})})]}),e.jsxs("div",{className:a.dashboardDetailRow,children:[e.jsx("dt",{children:g("settings.dashboard.agentExample.label","Ask your Agent")}),e.jsx("dd",{className:a.dashboardAgentPrompt,children:g("settings.dashboard.agentExample.prompt","“Turn off Dashboard auto-open.”")})]})]}),e.jsx("p",{className:`${a.dashboardSaveFeedback} ${p==="error"?a.dashboardSaveFeedbackError:""}`,"aria-live":"polite",children:D})]})}),Nt={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch","fr-fr":"Français"};function _t(t){return t==="active"?a.statusActive:t==="grace"?a.statusGrace:t==="invalid"||t==="revoked"?a.statusError:a.statusInactive}function kt(t){return t?t.refreshBlockedReason==="missing_session_token"?!0:t.status==="active"||t.status==="grace"||t.status==="invalid"||t.status==="revoked"||t.status==="unknown":!1}function Pt(t,s){return t.refreshBlockedReason==="missing_session_token"?{label:s("settings.license.status.activationRequired","Activation Required"),tooltip:s("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:s("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:a.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:s("settings.license.active","Active"),tooltip:s("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:s("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:a.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:s("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:a.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:s("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:a.licenseNoticeInfo}:{label:s(`settings.license.${t.status}`,t.status),tooltip:s(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?s("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:a.licenseNoticeMuted}}function Et(){const{t,selectedLocale:s,setLocale:l}=X(),{trackEvent:d}=le(),{search:i}=ye(),{settings:b,license:n,licenseControlsDisabled:g,licenseSubmitting:p,licenseMessage:_,activateLicense:v,refreshLicense:k,resetLicense:P,saving:D,updateDashboardPreferences:x,loading:f}=ve(),[E,w]=r.useState(""),y=n?Pt(n,t):null,H=kt(n),L=H&&(n==null?void 0:n.refreshBlockedReason)!=="missing_session_token",A=H,$=H?n==null?void 0:n.maskedKey:void 0,N=n!=null&&n.provider&&n.provider!=="auto"?n.provider:void 0,j=(n==null?void 0:n.tier)==="pro"?"pro":"basic",T=r.useRef(null),S=r.useRef(null),B=r.useRef(null),z=r.useMemo(()=>new URLSearchParams(i).get("section")==="license",[i]),F=r.useMemo(()=>new URLSearchParams(i).get("section")==="dashboard",[i]);return r.useEffect(()=>{var I;if(!z||f)return;const c=T.current;if((I=c==null?void 0:c.scrollIntoView)==null||I.call(c,{block:"start",behavior:"smooth"}),B.current&&!B.current.disabled){B.current.focus();return}c==null||c.focus()},[f,g,p,z]),r.useEffect(()=>{var I;if(!F||f)return;const c=S.current;(I=c==null?void 0:c.scrollIntoView)==null||I.call(c,{block:"start",behavior:"smooth"}),c==null||c.focus()},[f,F]),f?e.jsx("div",{className:a.page,children:e.jsx("div",{className:a.loading,children:t("common.loading")})}):e.jsxs("div",{className:a.page,children:[e.jsx(be,{title:t("page.settings.title","Settings"),description:t("page.settings.description","Manage license, saved data, server environment, and language."),helpTopicId:"settings",helpState:{tier:j}}),e.jsxs("div",{id:"settings-license",ref:T,tabIndex:-1,"data-testid":"settings-license-card",className:[a.card,z?a.licenseCardTarget:"",(n==null?void 0:n.tier)==="pro"?a.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(m,{text:g?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${a.headerBadge} ${g?"":a.headerBadgeLive}`,children:g?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[n?e.jsxs(e.Fragment,{children:[(()=>{const c=y;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.licenseGrid,children:[e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${a.statusDot} ${_t(n.status)}`}),e.jsx(m,{text:(c==null?void 0:c.tooltip)??t(`settings.license.${n.status}.tooltip`,"Current license activation state."),children:(c==null?void 0:c.label)??t(`settings.license.${n.status}`,n.status)})]}),e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:n.tier==="pro"?a.proBadge:"",children:e.jsx(m,{text:t(`tier.${n.tier}.tooltip`,"Available feature set for the connected license."),children:n.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),$&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(m,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:$})})]}),N&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(R,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(m,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:N})})]})]}),(c==null?void 0:c.detail)&&e.jsx("p",{className:`${a.licenseNotice} ${c.detailTone}`,children:n.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):c.detail}),n.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${a.licenseNotice} ${a.licenseNoticeMuted}`,children:c==null?void 0:c.detail})]})})(),n.tier==="basic"&&e.jsx(m,{text:t("tier.upgrade.tooltip","View Pro features and purchase options."),children:e.jsx("a",{className:a.upgradeLink,href:je.settingsLicense,target:"_blank",rel:"noopener noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"settings_license",page:"settings"}),children:t("tier.upgrade","View Pro")})})]}):e.jsx("div",{className:a.loading,children:t("settings.license.unavailable")}),e.jsxs("div",{className:a.licenseControls,children:[e.jsxs("div",{className:a.licenseControlRow,children:[e.jsx(m,{text:t("settings.license.refresh.tooltip","Re-fetch the current state from the license server. Useful when a billing change hasn't appeared yet."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:g||p||!L,onClick:()=>{k()},children:p?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(m,{text:t("settings.license.reset.tooltip","Remove the currently registered license key. Use this before activating with a different key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:g||p||!A,onClick:()=>{P()},children:p?t("common.loading"):t("settings.license.reset","Reset License")})})]}),e.jsxs("div",{className:a.licenseControlRow,children:[e.jsxs("label",{className:`${a.licenseField} ${a.licenseFieldGrow}`,children:[e.jsx("span",{className:a.controlLabel,children:e.jsx(R,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{ref:B,"aria-label":t("settings.license.keyInput","License Key"),className:a.textInput,type:"text",value:E,disabled:g||p,onChange:c=>w(c.target.value)})]}),e.jsx(m,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:g||p,onClick:()=>{(async()=>await v(E)&&w(""))()},children:p?t("common.loading"):t("settings.license.activate","Activate License")})})]}),_&&e.jsx("p",{className:a.licenseMessage,children:_})]})]})]}),e.jsx(St,{tier:j}),b&&e.jsx(Ct,{ref:S,autoOpen:b.dashboard.autoOpen,settingsFilePath:b.dashboard.settingsFilePath,saving:D,targeted:F,updateDashboardPreferences:x}),e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(R,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(m,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:a.headerBadge,children:t("settings.readOnly","Read-only")})})]}),b?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.coldGrid,children:[e.jsx("dt",{children:e.jsx(R,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:b.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(R,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:b.cold.HTTP_HOST})]}),e.jsx("p",{className:a.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:a.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:a.card,children:[e.jsx("div",{className:a.cardHeader,children:e.jsx(R,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:a.langRow,children:[e.jsx("label",{children:e.jsx(R,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsx(m,{text:t("settings.language.auto.tooltip","Follow the operating system's language. Falls back to English when not supported."),children:e.jsxs("select",{className:a.select,value:s,onChange:c=>l(c.target.value),children:[e.jsx("option",{value:xe,children:t("settings.language.auto","Auto")}),fe.map(c=>e.jsx("option",{value:c,children:Nt[c]??c},c))]})})]})]})]})}export{Et as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,j as s}from"./index-
|
|
1
|
+
import{u as o,j as s}from"./index-C_exRd2o.js";const e="_badge_1ucqq_2",c="_dot_1ucqq_12",a="_online_1ucqq_20",l="_offline_1ucqq_25",_="_idle_1ucqq_30",u="_syncing_1ucqq_34",d="_initializing_1ucqq_35",n={badge:e,dot:c,online:a,offline:l,idle:_,syncing:u,initializing:d},g={online:"status.online",offline:"status.offline",idle:"status.idle",syncing:"status.syncing",initializing:"status.initializing"};function f({status:i}){const{t}=o();return s.jsxs("span",{className:n.badge,children:[s.jsx("span",{className:`${n.dot} ${n[i]}`}),t(g[i])]})}export{f as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,a as I,m as A,D as V,e as H,d as W,n as q,j as e,u as M,f as G,h as z,l as Y,T as K}from"./index-C_exRd2o.js";import{P as J}from"./PageHeader-Cvi0LO4r.js";import{I as L}from"./InfoLabel-HLPMIIL4.js";import{T as S}from"./TooltipText-1fJvqtMt.js";import{C as F}from"./ConfirmModal-DJp4ax33.js";import{C as E}from"./CurrentPlaceScope-DrtUw6py.js";import{S as Q}from"./StatusBadge-Cf1Ncow3.js";import{B as R,a as B}from"./UiPrimitive-CsV5QE01.js";import"./ConfirmModal.module-DJksQHBd.js";const X=5e3;function Z(){const[t,s]=r.useState(null),[c,a]=r.useState([]),[x,y]=r.useState(!0),[d,f]=r.useState(null),[h,j]=r.useState(null),[n,u]=r.useState({report:null,loading:!1,applying:!1,error:null}),k=r.useRef(null),N=r.useRef(null),v=r.useCallback(async()=>{var p;try{const[l,g]=await Promise.all([I.get("/sync/status"),I.get("/api/dashboard/place-summary")]);s(l);const D=(p=g.places)==null?void 0:p.find(U=>U.isActive);return f((D==null?void 0:D.placeDirName)??null),j(g.activePlaceId),g.activePlaceId}catch{return null}},[]),T=r.useCallback(async()=>{try{const p=await I.get("/sync/history",{limit:"30"});a(p.entries??[])}catch{a([])}},[]),o=r.useCallback(async p=>{if(p===null){u({report:null,loading:!1,applying:!1,error:null});return}u(l=>({...l,loading:!0,error:null}));try{const l=await I.get("/api/sync/migration",{placeId:String(p)});u(g=>({...g,report:l,loading:!1,error:l.status==="blocked"?"migration_blocked":null}))}catch(l){if(l instanceof A&&(l.status===404||l.status===503)){u(g=>({...g,report:null,loading:!1,error:null}));return}u(g=>({...g,loading:!1,error:"unknown"}))}},[]),_=r.useCallback(async()=>{const[p]=await Promise.all([v(),T()]);await o(p),y(!1)},[v,T,o]),P=r.useCallback(()=>{_()},[_]),C=r.useCallback(async()=>{await o(h)},[h,o]),m=r.useCallback(async()=>{const p=n.report;if(!(!p||p.status!=="ready"||n.applying)){u(l=>({...l,applying:!0,error:null}));try{const l=await I.post("/api/sync/migration",{placeId:p.placeId,fromVersion:2,previewFingerprint:p.previewFingerprint,apply:!0});u({report:l,loading:!1,applying:!1,error:null}),await v()}catch(l){if(l instanceof A&&l.status===409&&(l.error==="preview_stale"||l.error==="migration_blocked")){const g=l.error;await o(p.placeId),u(D=>({...D,applying:!1,error:g}));return}u(g=>({...g,applying:!1,error:"unknown"}))}}},[o,v,n.applying,n.report]),b=r.useCallback(async()=>{await I.post("/api/dashboard/sync/history/clear"),a([]),v()},[v]);return r.useEffect(()=>(_(),N.current=setInterval(_,X),()=>{N.current&&clearInterval(N.current)}),[_]),r.useEffect(()=>{const p=new V;k.current=p,p.connect();const l=p.on("sync",()=>{_()});return()=>{l(),p.disconnect(),k.current=null}},[_]),{status:t,history:c,loading:x,activePlaceDirName:d,migration:n,refresh:P,refreshMigration:C,applyMigration:m,clearHistory:b}}const ee="_actions_1j3p3_60",te="_btn_1j3p3_68",ie="_btnPrimary_1j3p3_99",oe="_panel_1j3p3_109",ae="_panelIcon_1j3p3_116",se="_panelTitle_1j3p3_122",ne="_panelDesc_1j3p3_131",ce="_benefitList_1j3p3_139",le="_benefitItem_1j3p3_148",w={actions:ee,btn:te,btnPrimary:ie,panel:oe,panelIcon:ae,panelTitle:se,panelDesc:ne,benefitList:ce,benefitItem:le};function re({icon:t,title:s,description:c,benefits:a,upgradeLabel:x,upgradeHref:y}){const{trackEvent:d}=H(),{pathname:f,search:h}=W(),j=q(f,h);return e.jsxs("div",{className:w.panel,children:[t&&e.jsx("div",{className:w.panelIcon,children:t}),e.jsx("div",{className:w.panelTitle,children:s}),e.jsx("div",{className:w.panelDesc,children:c}),e.jsx("ul",{className:w.benefitList,children:a.map(n=>e.jsx("li",{className:w.benefitItem,children:n},n))}),e.jsx("div",{className:w.actions,children:e.jsx("a",{className:`${w.btn} ${w.btnPrimary}`,href:y,target:"_blank",rel:"noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"tier_panel",...j}),children:x})})]})}const pe="_page_1o0wf_2",de="_card_1o0wf_10",ye="_cardHeader_1o0wf_17",me="_clearButton_1o0wf_29",ue="_statusRow_1o0wf_53",ge="_metaItem_1o0wf_60",fe="_statusGrid_1o0wf_66",he="_migrationPanel_1o0wf_85",_e="_migrationHeader_1o0wf_92",xe="_migrationTitle_1o0wf_99",we="_migrationDescription_1o0wf_108",je="_migrationLedger_1o0wf_116",ve="_migrationLedgerItem_1o0wf_123",Se="_migrationLedgerBlocked_1o0wf_148",be="_migrationSection_1o0wf_152",Ne="_migrationList_1o0wf_166",Ie="_migrationRow_1o0wf_176",Le="_migrationOperation_1o0wf_189",Te="_migrationRowBody_1o0wf_194",De="_migrationNotice_1o0wf_215",Re="_migrationActions_1o0wf_222",ke="_migrationButton_1o0wf_228",Pe="_policySummary_1o0wf_265",Ce="_policySummaryItem_1o0wf_276",Ae="_policyPrimaryValue_1o0wf_301",Ee="_policyReviewNotice_1o0wf_307",Be="_policyApplySection_1o0wf_318",$e="_policyApplyHeader_1o0wf_322",Oe="_policyApplyTitle_1o0wf_326",He="_policyApplyDescription_1o0wf_334",Me="_policyInfoLabel_1o0wf_342",Fe="_policySafetyRow_1o0wf_353",Ue="_policySafetyLabel_1o0wf_365",Ve="_policySafetyBadge_1o0wf_371",We="_policyDisclosure_1o0wf_375",qe="_policyDisclosureIcon_1o0wf_407",Ge="_policyDisclosureIconOpen_1o0wf_414",ze="_policyScopeList_1o0wf_418",Ye="_policyScopeRow_1o0wf_425",Ke="_policyScopeName_1o0wf_439",Je="_policyDirectionRail_1o0wf_451",Qe="_policyDirectionEndpoint_1o0wf_467",Xe="_policyDirectionEndpointStudio_1o0wf_474",Ze="_policyDirectionArrow_1o0wf_478",et="_forwardBadge_1o0wf_521",tt="_logContainer_1o0wf_536",it="_logEntry_1o0wf_543",ot="_logTime_1o0wf_555",at="_logType_1o0wf_561",st="_logTypeWrite_1o0wf_570",nt="_logTypeUpdate_1o0wf_574",ct="_logTypeDelete_1o0wf_578",lt="_logTypeIdle_1o0wf_582",rt="_logPath_1o0wf_586",pt="_logEmpty_1o0wf_593",dt="_overlay_1o0wf_600",yt="_overlayTitle_1o0wf_610",mt="_overlayMessage_1o0wf_617",ut="_checklist_1o0wf_623",gt="_checkItem_1o0wf_633",i={page:pe,card:de,cardHeader:ye,clearButton:me,statusRow:ue,metaItem:ge,statusGrid:fe,migrationPanel:he,migrationHeader:_e,migrationTitle:xe,migrationDescription:we,migrationLedger:je,migrationLedgerItem:ve,migrationLedgerBlocked:Se,migrationSection:be,migrationList:Ne,migrationRow:Ie,migrationOperation:Le,migrationRowBody:Te,migrationNotice:De,migrationActions:Re,migrationButton:ke,policySummary:Pe,policySummaryItem:Ce,policyPrimaryValue:Ae,policyReviewNotice:Ee,policyApplySection:Be,policyApplyHeader:$e,policyApplyTitle:Oe,policyApplyDescription:He,policyInfoLabel:Me,policySafetyRow:Fe,policySafetyLabel:Ue,policySafetyBadge:Ve,policyDisclosure:We,policyDisclosureIcon:qe,policyDisclosureIconOpen:Ge,policyScopeList:ze,policyScopeRow:Ye,policyScopeName:Ke,policyDirectionRail:Je,policyDirectionEndpoint:Qe,policyDirectionEndpointStudio:Xe,policyDirectionArrow:Ze,forwardBadge:et,logContainer:tt,logEntry:it,logTime:ot,logType:at,logTypeWrite:st,logTypeUpdate:nt,logTypeDelete:ct,logTypeIdle:lt,logPath:rt,logEmpty:pt,overlay:dt,overlayTitle:yt,overlayMessage:mt,checklist:ut,checkItem:gt};function ft(t){return t==="add"?"success":t==="delete"?"danger":"accent"}function ht(t){return`sync.migration.reason.${t}`}function _t(t){return`sync.migration.reason.${t}`}function xt({migration:t,onRefresh:s,onApply:c}){const{t:a}=M(),[x,y]=r.useState(!1),d=t==null?void 0:t.report;if(!t||!d||d.status==="not_required")return null;const f=d.status==="blocked",h=d.status==="ready"&&!t.loading&&!t.applying,j=async()=>{await c(),y(!1)};return e.jsxs("section",{className:`${i.card} ${i.migrationPanel}`,"aria-labelledby":"sync-migration-title",children:[e.jsxs("div",{className:i.migrationHeader,children:[e.jsxs("div",{children:[e.jsx("h2",{id:"sync-migration-title",className:i.migrationTitle,children:a("sync.migration.title","Sync format update available")}),e.jsx("p",{className:i.migrationDescription,children:a("sync.migration.description","Review the metadata changes before updating this place from sync format v2 to v3.")})]}),e.jsx(R,{variant:f?"warning":"accent",children:f?a("sync.migration.status.blocked","Blocked"):a("sync.migration.status.ready","Ready to review")})]}),e.jsxs("div",{className:i.migrationLedger,"aria-label":a("sync.migration.preview","Review changes"),children:[e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.add","Add")}),e.jsx("strong",{children:d.summary.add})]}),e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.modify","Modify")}),e.jsx("strong",{children:d.summary.modify})]}),e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.delete","Delete")}),e.jsx("strong",{children:d.summary.delete})]}),e.jsxs("div",{className:`${i.migrationLedgerItem} ${f?i.migrationLedgerBlocked:""}`,children:[e.jsx("span",{children:a("sync.migration.summary.blocked","Blocked")}),e.jsx("strong",{children:d.summary.blocked})]})]}),d.changes.length>0&&e.jsxs("div",{className:i.migrationSection,children:[e.jsx("h3",{children:a("sync.migration.changes","Metadata changes")}),e.jsx("ul",{className:i.migrationList,children:d.changes.map(n=>e.jsxs("li",{className:i.migrationRow,children:[e.jsx(R,{variant:ft(n.operation),className:i.migrationOperation,children:a(`sync.migration.operation.${n.operation}`,n.operation)}),e.jsxs("div",{className:i.migrationRowBody,children:[e.jsx("code",{children:n.path}),e.jsx("span",{children:a(ht(n.reason),n.reason.replace(/_/g," "))})]})]},`${n.operation}:${n.path}`))})]}),d.blockers.length>0&&e.jsxs("div",{className:i.migrationSection,children:[e.jsx("h3",{children:a("sync.migration.blockers","Items to resolve")}),e.jsx("ul",{className:i.migrationList,children:d.blockers.map((n,u)=>e.jsxs("li",{className:i.migrationRow,children:[e.jsx(R,{variant:"warning",className:i.migrationOperation,children:a("sync.migration.summary.blocked","Blocked")}),e.jsxs("div",{className:i.migrationRowBody,children:[n.path&&e.jsx("code",{children:n.path}),e.jsx("span",{children:a(_t(n.reason),n.reason.replace(/_/g," "))})]})]},`${n.reason}:${n.path??u}`))})]}),e.jsxs("div",{className:i.migrationNotice,"aria-live":"polite",children:[(f||t.error==="migration_blocked")&&e.jsx("span",{children:a("sync.migration.blocked","Resolve sync conflicts before updating")}),t.error==="preview_stale"&&e.jsx("span",{children:a("sync.migration.stale","Preview changed. Review the latest diff.")}),t.error==="unknown"&&e.jsx("span",{children:a("sync.migration.error","Could not update the sync format. Try again.")})]}),e.jsxs("div",{className:i.migrationActions,children:[e.jsx(B,{variant:"secondary",className:i.migrationButton,disabled:t.loading||t.applying,onClick:()=>void s(),children:t.loading?a("sync.migration.refreshing","Refreshing…"):a("sync.migration.refresh","Refresh preview")}),e.jsx(B,{variant:"primary",className:i.migrationButton,disabled:!h,onClick:()=>y(!0),children:t.applying?a("sync.migration.applying","Applying…"):a("sync.migration.apply","Apply update")})]}),e.jsx(F,{open:x,title:a("sync.migration.confirm.title","Apply sync format update?"),message:a("sync.migration.confirm.message","Back up and update the listed sync metadata. Your Luau source files will not change."),cancelLabel:a("common.cancel","Cancel"),confirmLabel:a("sync.migration.apply","Apply update"),loading:t.applying,onCancel:()=>!t.applying&&y(!1),onConfirm:()=>void j()})]})}const wt=["scriptSource","properties","structure","serviceProperties"];function jt(t){const s=new Date(t);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function vt(t){switch(t){case"write":return i.logTypeWrite;case"update":return i.logTypeUpdate;case"delete":return i.logTypeDelete;default:return i.logTypeIdle}}function St(t){switch(t){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function bt(t,s){const c={studio_first:"Studio First",bidirectional_review:"Bidirectional",local_code_studio_world:"Local Code, Studio World",custom:"Custom"};return t(`sync.policy.preset.${s}`,c[s])}function $(t,s){return s==="auto"?t("sync.policy.apply.auto","Auto apply"):t("sync.policy.apply.manual","Review first")}function Nt(t,s){const c={forward:"Studio → Local",reverse:"Local → Studio",bidirectional:"Both ways"};return t(`sync.policy.direction.${s}`,c[s])}function It(t){return{forward:"←",reverse:"→",bidirectional:"⇄"}[t]}function Lt(t,s){const c={forward:"Studio changes are written to local files.",reverse:"Local file changes are applied to Studio.",bidirectional:"Changes can move from Studio to local files and from local files to Studio."};return t(`sync.policy.direction.${s}.tooltip`,c[s])}function O(...t){const s=t[0]??"",c=s.includes("\\")&&!s.includes("/")?"\\":"/";return t.filter(a=>a.length>0).map((a,x)=>x===0?a.replace(/[\\/]+$/g,""):a.replace(/^[\\/]+|[\\/]+$/g,"")).join(c)}function Tt(t){const s=t.replace(/[\\/]+$/g,""),c=s.split(/[\\/]+/);return c[c.length-1]??s}function Dt(t,s){const c=Tt(t);return c==="explorer"?t:c===s?O(t,"explorer"):O(t,s,"explorer")}function Rt(t,s){return s?t("sync.policy.safety.auto","Auto delete to Studio"):t("sync.policy.safety.review","Review before delete")}function kt(t,s){return s?t("sync.policy.safety.auto.tooltip","Deleting local files may automatically remove matching Studio instances. This is separate from UI Studio automatic cleanup."):t("sync.policy.safety.review.tooltip","Local file deletions wait for review before matching Studio instances are removed. This is separate from UI Studio automatic cleanup.")}function Pt(t,s){switch(s){case"write":return t("sync.log.type.write","WRITE");case"update":return t("sync.log.type.update","UPDATE");case"delete":return t("sync.log.type.delete","DELETE");default:return t("sync.log.type.idle","IDLE")}}function Ct(t,s){switch(s){case"write":return t("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return t("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return t("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return t("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function Vt(){const{t}=M(),{trackEvent:s}=H(),{level:c}=G(),{tier:a,loading:x}=z(),y=Z(),{show:d}=Y(),[f,h]=r.useState(!1),[j,n]=r.useState(!1),[u,k]=r.useState(!1),N=!x&&a==="basic",v=c==="disconnected"||c==="serverOnly",T=e.jsx(J,{title:t("page.sync.title","Sync"),description:t("page.sync.description","Monitor Studio to local sync status, direction, apply mode, and recent sync logs."),helpTopicId:"sync",helpState:{connectionLevel:c,tier:a}});if(v)return e.jsxs("div",{className:i.page,children:[T,e.jsx(E,{surface:"sync"}),e.jsx("div",{className:i.card,children:e.jsxs("div",{className:i.overlay,children:[e.jsx("div",{className:i.overlayTitle,children:t("sync.overlay.title","Roblox Studio plugin required")}),e.jsx("div",{className:i.overlayMessage,children:t("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),e.jsxs("ul",{className:i.checklist,children:[e.jsx("li",{className:i.checkItem,children:t("sync.overlay.check1","Is Roblox Studio running?")}),e.jsx("li",{className:i.checkItem,children:t("sync.overlay.check2","Is the WEPPY Plugin installed?")})]})]})})]});const o=y.status,_=y.history,P=St(o==null?void 0:o.state),C=async()=>{n(!0);try{await y.clearHistory(),d(t("toast.clearSuccess","Cleared successfully"),"success"),h(!1)}catch{d(t("toast.clearFailed","Failed to clear data"),"error")}finally{n(!1)}};return e.jsxs("div",{className:i.page,children:[T,e.jsx(E,{surface:"sync"}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(S,{text:t("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:t("sync.status.title","Sync Status")}),N&&e.jsx(S,{text:t("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:e.jsx("span",{className:i.forwardBadge,children:t("sync.status.forwardOnly","Forward Only")})})]}),e.jsxs("div",{className:i.statusRow,children:[e.jsx(Q,{status:P}),(o==null?void 0:o.placeName)&&e.jsxs("span",{className:i.metaItem,children:[e.jsx(L,{label:t("sync.status.place","Place"),tooltip:t("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",o.placeName,o.placeId?` (${o.placeId})`:""]})]}),e.jsxs("dl",{className:i.statusGrid,children:[(o==null?void 0:o.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(L,{label:t("sync.status.path","Place Root"),tooltip:t("sync.status.path.tooltip","Local filesystem root currently used for this place sync output.")})}),e.jsx("dd",{children:o.syncRoot})]}),y.activePlaceDirName&&(o==null?void 0:o.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(L,{label:t("sync.status.placePath","Explorer Path"),tooltip:t("sync.status.placePath.tooltip","Explorer files path for the active place.")})}),e.jsx("dd",{children:Dt(o.syncRoot,y.activePlaceDirName)})]}),(o==null?void 0:o.instanceCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(L,{label:t("sync.status.instances","Instances"),tooltip:t("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),e.jsx("dd",{children:o.instanceCount})]}),(o==null?void 0:o.scriptCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(L,{label:t("sync.status.scripts","Scripts"),tooltip:t("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),e.jsx("dd",{children:o.scriptCount})]}),(o==null?void 0:o.state)==="syncing"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(L,{label:t("sync.status.state","State"),tooltip:t("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),e.jsx("dd",{children:t("status.syncing","Syncing")})]})]})]}),e.jsx(xt,{migration:y.migration,onRefresh:y.refreshMigration,onApply:y.applyMigration}),(o==null?void 0:o.policy)&&e.jsxs("div",{className:i.card,children:[e.jsx("div",{className:i.cardHeader,children:e.jsx(S,{text:t("sync.policy.title.tooltip","Effective Sync policy reported by the connected Studio plugin."),children:t("sync.policy.title","Sync Policy")})}),e.jsxs("dl",{className:i.policySummary,children:[e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.activation","Activation")}),e.jsx("dd",{children:e.jsx(R,{variant:o.syncEnabled?"success":"neutral",children:o.syncEnabled?t("sync.policy.activation.on","Sync ON"):t("sync.policy.activation.off","Sync OFF")})})]}),e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.preset","Workflow")}),e.jsx("dd",{className:i.policyPrimaryValue,children:bt(t,o.policy.preset)})]})]}),o.policyReviewRequired&&e.jsx("div",{className:i.policyReviewNotice,role:"status",children:t("sync.policy.reviewRequired","Review this policy in the Studio plugin before starting Sync.")}),e.jsxs("section",{className:i.policyApplySection,"aria-labelledby":"sync-policy-apply-title",children:[e.jsxs("div",{className:i.policyApplyHeader,children:[e.jsx("h3",{id:"sync-policy-apply-title",className:i.policyApplyTitle,children:t("sync.policy.apply.title","How local changes apply to Studio")}),e.jsx("p",{className:i.policyApplyDescription,children:t("sync.policy.apply.description","Shows whether changes made locally are reviewed first or applied to Studio automatically.")})]}),e.jsxs("dl",{className:i.policySummary,children:[e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(S,{text:t("sync.policy.apply.content.tooltip","Script Source, property, and Service property changes made locally. Instance creation, deletion, renaming, and moves are Structure changes."),children:e.jsx("span",{className:i.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.content","Content changes")})})}),e.jsx("dd",{children:$(t,o.policy.apply.contentChanges)})]}),e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(S,{text:t("sync.policy.apply.structure.tooltip","Instance creation, deletion, renaming, and moves made locally. Automatic local deletion additionally requires the separate delete option below."),children:e.jsx("span",{className:i.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.structure","Structure changes")})})}),e.jsx("dd",{children:$(t,o.policy.apply.structureChanges)})]})]}),e.jsxs("div",{className:i.policySafetyRow,children:[e.jsx("span",{className:i.policySafetyLabel,children:t("sync.policy.safety.localDeletes","Local delete → Studio instance removal")}),e.jsx(S,{text:kt(t,o.policy.autoApplyLocalDeletesToStudio),children:e.jsx(R,{variant:o.policy.autoApplyLocalDeletesToStudio?"warning":"neutral",className:i.policySafetyBadge,tabIndex:0,children:Rt(t,o.policy.autoApplyLocalDeletesToStudio)})})]})]}),e.jsxs("button",{type:"button",className:i.policyDisclosure,"aria-expanded":u,"aria-controls":"sync-policy-scope-panel",onClick:()=>k(m=>!m),children:[e.jsx("span",{children:t("sync.policy.scope.disclosure","Scope directions")}),e.jsx("span",{"aria-hidden":"true",className:`${i.policyDisclosureIcon} ${u?i.policyDisclosureIconOpen:""}`,children:"⌄"})]}),u&&e.jsx("div",{id:"sync-policy-scope-panel",className:i.policyScopeList,children:wt.map(m=>{const b=o.policy.directions[m];return e.jsxs("div",{className:i.policyScopeRow,"data-testid":"sync-policy-scope-row",children:[e.jsx("span",{className:i.policyScopeName,children:t(`sync.policy.scope.${m}`,m)}),e.jsx(S,{text:Lt(t,b),children:e.jsxs("span",{className:i.policyDirectionRail,"data-testid":"sync-policy-direction-rail",role:"img","aria-label":Nt(t,b),tabIndex:0,children:[e.jsx("span",{className:i.policyDirectionEndpoint,children:t("sync.policy.endpoint.local","Local")}),e.jsx("span",{className:i.policyDirectionArrow,"aria-hidden":"true",children:It(b)}),e.jsx("span",{className:`${i.policyDirectionEndpoint} ${i.policyDirectionEndpointStudio}`,children:t("sync.policy.endpoint.studio","Studio")})]})})]},m)})})]}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx("span",{children:t("sync.log.title","Sync Log")}),e.jsx("button",{className:i.clearButton,onClick:()=>{s("dashboard_click_event",{click_target:"sync_clear_log",page:"sync"}),h(!0)},children:t("common.clear","Clear")})]}),e.jsx("div",{className:i.logContainer,children:_.length===0?e.jsx("div",{className:i.logEmpty,children:t("sync.log.empty","No sync events yet")}):_.map((m,b)=>e.jsxs("div",{className:i.logEntry,children:[e.jsx("span",{className:i.logTime,children:jt(m.timestamp)}),e.jsx(S,{text:Ct(t,m.type),children:e.jsx("span",{className:`${i.logType} ${vt(m.type)}`,children:Pt(t,m.type)})}),e.jsxs("span",{className:i.logPath,children:[m.path,m.details?` — ${m.details}`:""]})]},b))})]}),N&&e.jsx(re,{title:t("sync.upgrade.title","Explore Full Sync with Pro"),description:t("tier.banner.save","Save AI tokens with Pro!"),benefits:[t("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),t("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),t("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:t("sync.upgrade.buy","View Pro"),upgradeHref:K.sync}),e.jsx(F,{open:f,title:t("sync.clear.title","Clear sync log?"),message:t("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:j,onCancel:()=>!j&&h(!1),onConfirm:C})]})}export{Vt as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._progressPromoWrap_1j3p3_1{display:flex;flex-direction:column;gap:8px}._progressPromo_1j3p3_1{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 20px;display:flex;align-items:center;gap:16px}._progressMain_1j3p3_17{flex:1;min-width:0}._progressLabel_1j3p3_22{font-family:var(--font-label);font-size:11px;color:var(--text-secondary);margin-bottom:6px;display:flex;justify-content:space-between;gap:12px}._progressBar_1j3p3_32{height:6px;background:var(--bg-secondary);border-radius:3px;overflow:hidden}._progressFill_1j3p3_39{height:100%;background:var(--pro-badge);border-radius:3px;transition:width var(--transition)}._progressTextGroup_1j3p3_46{display:flex;flex-direction:column;gap:3px}._progressText_1j3p3_46{font-family:var(--font-label);font-size:13px;color:var(--pro-badge);white-space:nowrap;font-weight:500}._actions_1j3p3_60{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._btn_1j3p3_68{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._btn_1j3p3_68:hover{border-color:var(--accent);background:var(--accent-dim)}._btnOutline_1j3p3_89{border-color:var(--pro-badge);color:var(--pro-badge)}._btnOutline_1j3p3_89:hover{background:var(--pro-bg-soft);border-color:var(--pro-badge)}._btnPrimary_1j3p3_99{background:var(--pro-badge);color:var(--pro-text-on-badge);border-color:var(--pro-badge)}._btnPrimary_1j3p3_99:hover{opacity:.9}._panel_1j3p3_109{background:linear-gradient(180deg,var(--pro-bg-soft),transparent 60%),var(--bg-secondary);border:1px solid var(--pro-border);border-radius:var(--radius);padding:24px 20px}._panelIcon_1j3p3_116{font-size:32px;margin-bottom:12px;text-align:center}._panelTitle_1j3p3_122{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--pro-text);margin-bottom:8px;text-align:center}._panelDesc_1j3p3_131{font-size:13px;color:var(--text-secondary);margin-bottom:16px;line-height:1.5;text-align:center}._benefitList_1j3p3_139{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:4px}._benefitItem_1j3p3_148{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_1j3p3_148:before{content:"+";position:absolute;left:0;color:var(--pro-badge);font-weight:600}@media(max-width:720px){._progressPromo_1j3p3_1{flex-direction:column;align-items:stretch}._progressText_1j3p3_46{white-space:normal}._actions_1j3p3_60{justify-content:stretch}._btn_1j3p3_68{width:100%}}._page_1o0wf_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._card_1o0wf_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_1o0wf_17{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_1o0wf_29{border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger-text);border-radius:var(--radius-control);padding:6px 12px;font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._clearButton_1o0wf_29:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearButton_1o0wf_29:focus-visible{outline:none;box-shadow:var(--focus-ring)}._statusRow_1o0wf_53{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_1o0wf_60{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_1o0wf_66{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_1o0wf_66 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_1o0wf_66 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._migrationPanel_1o0wf_85{display:flex;flex-direction:column;gap:16px;font-size:16px}._migrationHeader_1o0wf_92{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}._migrationTitle_1o0wf_99{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:20px;line-height:1.25;font-weight:600}._migrationDescription_1o0wf_108{max-width:640px;margin:8px 0 0;color:var(--text-secondary);font-size:16px;line-height:1.5}._migrationLedger_1o0wf_116{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);background:var(--bg-secondary)}._migrationLedgerItem_1o0wf_123{display:flex;min-width:0;min-height:64px;flex-direction:column;justify-content:center;gap:4px;padding:8px 12px;border-right:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-size:14px}._migrationLedgerItem_1o0wf_123:last-child{border-right:0}._migrationLedgerItem_1o0wf_123 strong{color:var(--text-primary);font-family:var(--font-code);font-size:20px;font-variant-numeric:tabular-nums}._migrationLedgerBlocked_1o0wf_148 strong{color:var(--warning-text)}._migrationSection_1o0wf_152{display:flex;flex-direction:column;gap:8px}._migrationSection_1o0wf_152 h3{margin:0;color:var(--text-secondary);font-family:var(--font-label);font-size:14px;font-weight:600}._migrationList_1o0wf_166{display:flex;flex-direction:column;gap:0;margin:0;padding:0;border:1px solid var(--border);list-style:none}._migrationRow_1o0wf_176{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:12px;padding:12px;border-bottom:1px solid var(--border)}._migrationRow_1o0wf_176:last-child{border-bottom:0}._migrationOperation_1o0wf_189{min-width:76px;text-transform:uppercase}._migrationRowBody_1o0wf_194{display:flex;min-width:0;flex-direction:column;gap:4px}._migrationRowBody_1o0wf_194 code{overflow-wrap:anywhere;color:var(--text-primary);font-family:var(--font-code);font-size:14px;line-height:1.4}._migrationRowBody_1o0wf_194 span{color:var(--text-secondary);font-size:14px;line-height:1.4}._migrationNotice_1o0wf_215{min-height:24px;color:var(--warning-text);font-size:16px;line-height:1.5}._migrationActions_1o0wf_222{display:flex;justify-content:flex-end;gap:8px}._migrationButton_1o0wf_228{min-height:44px;padding:0 16px;font-size:16px}@media(max-width:640px){._migrationHeader_1o0wf_92{flex-direction:column}._migrationLedger_1o0wf_116{grid-template-columns:repeat(2,minmax(0,1fr))}._migrationLedgerItem_1o0wf_123:nth-child(2){border-right:0}._migrationLedgerItem_1o0wf_123:nth-child(-n+2){border-bottom:1px solid var(--border)}._migrationRow_1o0wf_176{grid-template-columns:1fr}._migrationActions_1o0wf_222{flex-direction:column-reverse}._migrationButton_1o0wf_228{width:100%}}._policySummary_1o0wf_265{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--border)}._policySummaryItem_1o0wf_276{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);align-items:center;min-height:48px;gap:12px;padding:10px 12px;background:var(--bg-secondary)}._policySummaryItem_1o0wf_276 dt{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySummaryItem_1o0wf_276 dd{min-width:0;margin:0;color:var(--text-primary);font-family:var(--font-code);font-size:13px;overflow-wrap:anywhere}._policyPrimaryValue_1o0wf_301{font-family:var(--font-label)!important;font-size:16px!important;font-weight:600}._policyReviewNotice_1o0wf_307{margin-top:12px;padding:10px 12px;border:1px solid var(--warning-border);border-radius:var(--radius-control);background:var(--warning-bg);color:var(--warning-text);font-size:14px;line-height:1.45}._policyApplySection_1o0wf_318{margin-top:12px}._policyApplyHeader_1o0wf_322{margin-bottom:10px}._policyApplyTitle_1o0wf_326{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;font-weight:600}._policyApplyDescription_1o0wf_334{margin:4px 0 0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;line-height:1.45}._policyInfoLabel_1o0wf_342{border-bottom:1px dotted var(--text-muted);cursor:help}._policyInfoLabel_1o0wf_342:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policySafetyRow_1o0wf_353{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:48px;margin-top:8px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control)}._policySafetyLabel_1o0wf_365{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySafetyBadge_1o0wf_371{min-height:22px}._policyDisclosure_1o0wf_375{display:flex;width:100%;min-height:42px;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-align:left;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._policyDisclosure_1o0wf_375:hover{border-color:var(--border-highlight);background:var(--bg-secondary);color:var(--accent)}._policyDisclosure_1o0wf_375:focus-visible{outline:none;box-shadow:var(--focus-ring)}._policyDisclosureIcon_1o0wf_407{flex:0 0 auto;color:var(--text-muted);font-family:var(--font-code);transition:transform var(--transition)}._policyDisclosureIconOpen_1o0wf_414{transform:rotate(180deg)}._policyScopeList_1o0wf_418{margin-top:8px;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control)}._policyScopeRow_1o0wf_425{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.1fr);align-items:center;min-height:44px;gap:16px;padding:8px 12px;border-bottom:1px solid var(--border)}._policyScopeRow_1o0wf_425:last-child{border-bottom:0}._policyScopeName_1o0wf_439{min-width:0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;overflow-wrap:anywhere}._policyScopeRow_1o0wf_425>[data-tooltip-text]{width:100%}._policyDirectionRail_1o0wf_451{display:grid;width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);align-items:center;color:var(--text-secondary);font-family:var(--font-code)}._policyDirectionRail_1o0wf_451:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policyDirectionEndpoint_1o0wf_467{min-width:0;font-size:11px;font-weight:500;overflow-wrap:anywhere}._policyDirectionEndpointStudio_1o0wf_474{text-align:right}._policyDirectionArrow_1o0wf_478{color:var(--accent);font-size:15px;font-weight:600;text-align:center}@media(max-width:640px){._policySummary_1o0wf_265{grid-template-columns:1fr}._policySummaryItem_1o0wf_276{grid-template-columns:minmax(112px,.8fr) minmax(0,1.2fr)}._policyScopeRow_1o0wf_425{grid-template-columns:1fr;gap:6px}._policySafetyRow_1o0wf_353{grid-template-columns:1fr;align-items:start;gap:8px;padding:10px 12px}._policySafetyRow_1o0wf_353>[data-tooltip-text]{max-width:100%;justify-self:start}._policySafetyBadge_1o0wf_371{height:auto;min-height:22px;white-space:normal;line-height:1.25;text-align:left}}._forwardBadge_1o0wf_521{display:inline-flex;align-items:center;min-height:20px;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-control)}._logContainer_1o0wf_536{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_1o0wf_543{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_1o0wf_543:last-child{border-bottom:none}._logTime_1o0wf_555{color:var(--text-muted);flex-shrink:0;width:44px}._logType_1o0wf_561{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_1o0wf_570{color:var(--success)}._logTypeUpdate_1o0wf_574{color:var(--accent)}._logTypeDelete_1o0wf_578{color:var(--error)}._logTypeIdle_1o0wf_582{color:var(--text-muted)}._logPath_1o0wf_586{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_1o0wf_593{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_1o0wf_600{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_1o0wf_610{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_1o0wf_617{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_1o0wf_623{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_1o0wf_633{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_1o0wf_633:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_1o0wf_649{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_1o0wf_656{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_1o0wf_664{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_1o0wf_673{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_1o0wf_673:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_1o0wf_688{display:flex;gap:8px}._btn_1o0wf_693{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_1o0wf_693:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_1o0wf_710{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_1o0wf_710:hover{opacity:.9}._disabled_1o0wf_721{opacity:.4;pointer-events:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-C_exRd2o.js";const r="_tabBar_jefog_2",_="_tabs_jefog_9",j="_actions_jefog_14",d="_tab_jefog_2",f="_tabActive_jefog_52",a={tabBar:r,tabs:_,actions:j,tab:d,tabActive:f};function u({items:n,value:c,onChange:l,ariaLabel:b,className:i,rightActions:e}){return s.jsxs("div",{className:[a.tabBar,i].filter(Boolean).join(" "),role:"tablist","aria-label":b,children:[s.jsx("div",{className:a.tabs,children:n.map(t=>{const o=t.key===c;return s.jsx("button",{type:"button",role:"tab","aria-selected":o,"data-testid":t.testId,className:[a.tab,o?a.tabActive:""].filter(Boolean).join(" "),onClick:()=>l(t.key),children:t.label},t.key)})}),e?s.jsx("div",{className:a.actions,children:e}):null]})}export{u as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,r as n,a as O,D as nt,u as ct,e as dt,l as ut}from"./index-5nAADWD6.js";import{P as pt}from"./PageHeader-D-x0uGJu.js";import{T as M}from"./TooltipText-BAHqtajG.js";import{C as ht}from"./ConfirmModal-zVAe5VBr.js";import{C as mt}from"./CurrentPlaceScope-DeLb8cR4.js";import{T as bt}from"./Tabs-fJOR1mc6.js";import"./UiPrimitive-DGkX6nPT.js";import"./ConfirmModal.module-DJksQHBd.js";const xt="_wrapper_hzgda_2",ft="_table_hzgda_7",gt="_sortable_hzgda_32",_t="_sortArrow_hzgda_41",wt="_clickable_hzgda_52",yt="_empty_hzgda_57",Ct="_expandedRow_hzgda_65",jt="_expandedCell_hzgda_74",T={wrapper:xt,table:ft,sortable:gt,sortArrow:_t,clickable:wt,empty:yt,expandedRow:Ct,expandedCell:jt};function kt({columns:t,data:a,sortBy:x,sortDir:z="asc",onSort:P,onRowClick:i,rowKey:j,emptyMessage:k,expandedKey:B,renderExpandedRow:N}){return s.jsx("div",{className:T.wrapper,children:s.jsxs("table",{className:T.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:t.map(u=>s.jsxs("th",{style:u.width?{width:u.width}:void 0,className:u.sortable?T.sortable:void 0,onClick:u.sortable&&P?()=>P(u.key):void 0,children:[s.jsx("span",{children:u.label}),u.sortable&&x===u.key&&s.jsx("span",{className:T.sortArrow,children:z==="asc"?"▴":"▾"})]},u.key))})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:t.length,className:T.empty,children:k||"No data"})}):a.map((u,E)=>{const R=j?j(u):String(E),h=B!=null&&R===B&&N?N(u):null;return s.jsxs(n.Fragment,{children:[s.jsx("tr",{className:i?T.clickable:void 0,onClick:i?()=>i(u):void 0,children:t.map(y=>s.jsx("td",{children:y.render?y.render(u):String(u[y.key]??"")},y.key))}),h&&s.jsx("tr",{className:T.expandedRow,children:s.jsx("td",{colSpan:t.length,className:T.expandedCell,children:h})})]},R)})})]})})}function St(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Tt=50;function Nt(t){if(typeof t=="number")return{placeId:String(t)}}function Z(t,a){return typeof a!="number"?t:`${t}?placeId=${encodeURIComponent(String(a))}`}function vt(t){const a=(t==null?void 0:t.placeId)??null,[x,z]=n.useState(null),[P,i]=n.useState(!0),[j,k]=n.useState([]),[B,N]=n.useState(0),[u,E]=n.useState(!1),[R,w]=n.useState(!0),[h,y]=n.useState(0),[f,L]=n.useState(""),F=n.useRef(null),m=n.useCallback(async()=>{i(!0);try{const c=Nt(a),C=c?await O.get("/api/dashboard/tool-stats",c):await O.get("/api/dashboard/tool-stats");z(C)}catch{}finally{i(!1)}},[a]),_=n.useCallback(async(c,C)=>{w(!0);try{const H={limit:String(Tt),offset:String(c)};C&&(H.tool=C),typeof a=="number"&&(H.placeId=String(a));const I=await O.get("/api/dashboard/history",H);k(I.entries.map(St)),N(I.total),E(I.hasMore)}catch{k([]),N(0),E(!1)}finally{w(!1)}},[a]),U=n.useCallback(()=>{m(),_(h,f)},[_,m,h,f]),V=n.useCallback(async()=>{await O.post(Z("/api/dashboard/tools/history/clear",a)),_(h,f)},[_,h,f,a]),$=n.useCallback(async()=>{await O.post(Z("/api/dashboard/tools/statistics/clear",a)),m()},[m,a]);return n.useEffect(()=>{m()},[m]),n.useEffect(()=>{_(h,f)},[_,h,f]),n.useEffect(()=>{const c=new nt;F.current=c,c.connect();const C=c.on("command",()=>{m(),_(h,f)});return()=>{C(),c.disconnect(),F.current=null}},[_,m,h,f]),{statistics:x,statsLoading:P,history:j,historyTotal:B,historyHasMore:u,historyLoading:R,historyOffset:h,historyToolFilter:f,setHistoryOffset:y,setHistoryToolFilter:L,refresh:U,clearHistory:V,clearStatistics:$}}const Mt="_page_1wi3z_2",zt="_card_1wi3z_12",Pt="_cardToolbar_1wi3z_19",Bt="_sectionTitle_1wi3z_27",Et="_dangerButton_1wi3z_33",Rt="_proBadge_1wi3z_52",Lt="_statusOk_1wi3z_67",It="_statusFallback_1wi3z_80",At="_statusUnsupported_1wi3z_93",Ht="_statusWarning_1wi3z_106",Ot="_statusError_1wi3z_119",Ft="_tierBasic_1wi3z_133",$t="_tierPro_1wi3z_137",qt="_tierMixed_1wi3z_142",Dt="_filterRow_1wi3z_153",Wt="_filterLabel_1wi3z_160",Ut="_filterSelect_1wi3z_169",Vt="_expandedRow_1wi3z_185",Kt="_expandedSection_1wi3z_190",Gt="_detailList_1wi3z_200",Jt="_detailItem_1wi3z_206",Qt="_detailLabel_1wi3z_212",Zt="_detailValue_1wi3z_217",Xt="_pre_1wi3z_222",Yt="_pagination_1wi3z_239",te="_pageInfo_1wi3z_247",ee="_btn_1wi3z_253",se="_tierDistribution_1wi3z_281",oe="_tierBarWrap_1wi3z_285",ae="_tierBarBasic_1wi3z_293",re="_tierBarPro_1wi3z_298",le="_tierLabels_1wi3z_303",ie="_statsTableWrap_1wi3z_312",ne="_statsTable_1wi3z_312",ce="_sortableHeader_1wi3z_343",de="_sortArrow_1wi3z_348",ue="_statsToolRow_1wi3z_352",pe="_statsActionRow_1wi3z_360",he="_expandButton_1wi3z_364",me="_expandIcon_1wi3z_376",be="_actionLabel_1wi3z_381",xe="_emptyStats_1wi3z_388",fe="_summaryLine_1wi3z_394",o={page:Mt,card:zt,cardToolbar:Pt,sectionTitle:Bt,dangerButton:Et,proBadge:Rt,statusOk:Lt,statusFallback:It,statusUnsupported:At,statusWarning:Ht,statusError:Ot,tierBasic:Ft,tierPro:$t,tierMixed:qt,filterRow:Dt,filterLabel:Wt,filterSelect:Ut,expandedRow:Vt,expandedSection:Kt,detailList:Gt,detailItem:Jt,detailLabel:Qt,detailValue:Zt,pre:Xt,pagination:Yt,pageInfo:te,btn:ee,tierDistribution:se,tierBarWrap:oe,tierBarBasic:ae,tierBarPro:re,tierLabels:le,statsTableWrap:ie,statsTable:ne,sortableHeader:ce,sortArrow:de,statsToolRow:ue,statsActionRow:pe,expandButton:he,expandIcon:me,actionLabel:be,emptyStats:xe,summaryLine:fe},K=50,ge=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function _e(t){const a=new Date(t);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function W(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function A(t,a){return a==="pro"?t("tier.pro","Pro"):a==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function tt(t,a){return a!==t&&a.startsWith(`${t}_`)?a.slice(t.length+1):""}function we(t,a){const x=tt(t,a);return x?`${t}.${x}`:t}function X(t){return typeof t=="string"&&t.length>0?t:void 0}function ye(t){if(!Array.isArray(t))return;const a=t.filter(x=>typeof x=="string"&&x.length>0);return a.length>0?a:void 0}function Ce(t){const a=t.result??{};return{requestedCommand:t.requestedCommand??X(a.requestedCommand),executedCommand:t.executedCommand??X(a.executedCommand),alternatives:t.alternatives??ye(a.alternatives)}}function je(t,a){switch(t.status){case"fallback":return{label:a("tools.badge.fallback","FALLBACK"),tooltip:a("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:o.statusFallback};case"unsupported":return{label:a("tools.badge.unsupported","UNSUPPORTED"),tooltip:a("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:o.statusUnsupported};case"warning":return{label:a("tools.badge.warn","WARN"),tooltip:a("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:o.statusWarning};case"error":return{label:a("tools.badge.err","FAILED"),tooltip:a("tools.badge.err.tooltip","The tool run failed."),className:o.statusError};default:return{label:a("tools.status.ok","OK"),tooltip:a("tools.status.ok.tooltip","The tool run completed successfully."),className:o.statusOk}}}function g(t,a){return s.jsxs("div",{className:o.detailItem,children:[s.jsx("span",{className:o.detailLabel,children:t}),s.jsx("span",{className:o.detailValue,children:a})]})}function ke(t){if(!t||typeof t!="object")return;const a=t;if(typeof a.selectionMode=="string"&&ge.has(a.selectionMode))return a}function Y(t){if(!(!t||typeof t!="object"||!("routing"in t)))return ke(t.routing)}function Se(t){return t.routing??Y(t.result)??Y(t.data)}function Te(t,a){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:a("tools.history.routing.none","No Studio target named")}function Ne(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ae(){const{t}=ct(),{trackEvent:a,trackPageView:x}=dt(),[z,P]=n.useState(null),i=vt({placeId:z}),{show:j}=ut(),[k,B]=n.useState("history"),[N,u]=n.useState(null),[E,R]=n.useState(null),[w,h]=n.useState(null),[y,f]=n.useState(!1),[L,F]=n.useState("totalCalls"),[m,_]=n.useState("desc"),U=n.useCallback(e=>{F(r=>r===e?(_(l=>l==="asc"?"desc":"asc"),e):(_("desc"),e))},[]),V=n.useMemo(()=>{var r;const e=new Set;return Object.keys(((r=i.statistics)==null?void 0:r.tools)??{}).forEach(l=>e.add(l)),i.history.forEach(l=>{l.tool&&e.add(l.tool)}),i.historyToolFilter&&e.add(i.historyToolFilter),Array.from(e).sort()},[i.history,i.historyToolFilter,i.statistics]),$=n.useMemo(()=>{var e;return(e=i.statistics)!=null&&e.tools?Object.values(i.statistics.tools).map(r=>{var Q;const l=Object.entries(r.commands??{}).map(([p,d])=>({toolName:r.tool,commandName:d.command??p,label:tt(r.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),b=l.reduce((p,d)=>p+d.totalCalls,0),S=l.reduce((p,d)=>p+d.successCount,0),q=l.reduce((p,d)=>p+d.fallbackCount,0),D=l.reduce((p,d)=>p+d.unsupportedCount,0),rt=l.reduce((p,d)=>p+d.warningCount,0),lt=l.reduce((p,d)=>p+d.failureCount,0),J=l.reduce((p,d)=>p+d.totalExecutionTimeMs,0),it=new Set(l.map(p=>p.tier)).size>1?"mixed":((Q=l[0])==null?void 0:Q.tier)??r.tier;return{toolName:r.tool,tier:it,commands:l,totalCalls:b,successCount:S,fallbackCount:q,unsupportedCount:D,warningCount:rt,failureCount:lt,totalExecutionTimeMs:J,avgExecutionTimeMs:b>0?Math.round(J/b):0}}):[]},[i.statistics]),c=n.useCallback((e,r,l,b)=>s.jsx(M,{text:t(l,b),children:t(e,r)}),[t]),C=n.useMemo(()=>[...$].sort((r,l)=>{const b=r[L],S=l[L];if(typeof b=="number"&&typeof S=="number")return m==="asc"?b-S:S-b;const q=String(b??""),D=String(S??"");return m==="asc"?q.localeCompare(D):D.localeCompare(q)}),[$,L,m]),H=n.useMemo(()=>[{key:"timestamp",label:c("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:e=>_e(e.timestamp)},{key:"toolName",label:c("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:e=>s.jsxs("span",{children:[we(e.tool,e.command),e.tier==="pro"&&s.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:o.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:c("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:e=>W(e.executionTimeMs)},{key:"status",label:c("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:e=>{const r=je(e,t);return s.jsx(M,{text:r.tooltip,children:s.jsx("span",{className:r.className,children:r.label})})}},{key:"tier",label:c("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:e=>s.jsx("span",{className:e.tier==="pro"?o.tierPro:o.tierBasic,children:A(t,e.tier)})}],[t,c]),I=n.useMemo(()=>[{key:"toolName",label:c("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:c("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:c("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:c("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:c("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:c("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:c("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:c("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:e=>W(e.avgExecutionTimeMs)},{key:"tier",label:c("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:e=>s.jsx(M,{text:e.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:e.tier==="pro"?o.tierPro:e.tier==="mixed"?o.tierMixed:o.tierBasic,children:A(t,e.tier)})})}],[t,c]),v=n.useMemo(()=>{if(!i.statistics)return null;const e=i.statistics.tierSummary.basic.totalCalls,r=i.statistics.tierSummary.pro.totalCalls,l=e+r;if(l===0)return null;const b=Math.round(e/l*100),S=100-b;return{basic:e,pro:r,basicPct:b,proPct:S}},[i.statistics]),G=n.useCallback(e=>{R(r=>r===e?null:e)},[]),et=n.useCallback(async()=>{if(w){f(!0);try{w==="history"?await i.clearHistory():await i.clearStatistics(),j(t("toast.clearSuccess","Cleared successfully"),"success"),h(null)}catch{j(t("toast.clearFailed","Failed to clear data"),"error")}finally{f(!1)}}},[w,j,t,i]),st=n.useCallback(e=>{const r=e==="history"?"tools_history":"tools_statistics";a("dashboard_click_event",{click_target:e==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:r}),x({page:"tools",tab:r}),B(e)},[a,x]),ot=n.useCallback(e=>{const r=Ce(e),l=Se(e);return s.jsxs("div",{className:o.expandedRow,children:[s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:t("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:t("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(e.parameters,null,2)})]}),e.result&&s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:t("tools.detail.result.tooltip","Returned result payload for this tool run."),children:t("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(e.result,null,2)})]}),l?s.jsxs("div",{className:o.expandedSection,children:[s.jsx("strong",{children:t("tools.history.routing","Routing")}),s.jsxs("div",{className:o.detailList,children:[g(t("tools.history.routing.mode","Mode"),l.selectionMode),g(t("tools.history.routing.requested","Requested"),Te(l,t)),g(t("tools.history.routing.actual","Actual"),Ne(l))]})]}):null,(e.status==="fallback"||e.status==="unsupported"||e.status==="warning"||e.status==="error")&&s.jsx("div",{className:o.expandedSection,children:s.jsxs("div",{className:o.detailList,children:[e.status==="fallback"&&(r==null?void 0:r.requestedCommand)&&g(t("tools.detail.requestedCommand","Requested Command"),r.requestedCommand),e.status==="fallback"&&(r==null?void 0:r.executedCommand)&&g(t("tools.detail.executedCommand","Executed Command"),r.executedCommand),e.status==="fallback"&&(r==null?void 0:r.alternatives)&&g(t("tools.detail.alternatives","Alternatives"),r.alternatives.join(", ")),e.status==="unsupported"&&e.blockedMessage&&g(t("tools.detail.blockedMessage","Blocked Reason"),e.blockedMessage),e.status==="unsupported"&&g(t("tools.detail.noFallback","No Fallback"),t("tools.detail.noFallback.value","No fallback ran.")),e.status==="warning"&&e.warningMessage&&g(t("tools.detail.warningMessage","Warning Message"),e.warningMessage),e.status==="error"&&e.errorMessage&&g(t("tools.detail.errorMessage","Error Message"),e.errorMessage),e.status==="error"&&e.blockedMessage&&g(t("tools.detail.blockedMessage","Blocked Reason"),e.blockedMessage),e.status==="error"&&e.fallbackCommand&&g(t("tools.detail.executedCommand","Executed Command"),e.fallbackCommand)]})})]})},[t]),at=["history","statistics"].map(e=>({key:e,label:t(`tools.tab.${e}`,e.charAt(0).toUpperCase()+e.slice(1))}));return s.jsxs("div",{className:o.page,children:[s.jsx(pt,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),s.jsx(mt,{surface:"tools",selectable:!0,selectedPlaceId:z,onSelectedPlaceIdChange:e=>{P(e),i.setHistoryOffset(0)}}),s.jsx(bt,{items:at,value:k,onChange:st}),k==="history"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:t("tools.tab.history","History")}),s.jsx("button",{className:o.dangerButton,onClick:()=>{a("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),h("history")},children:t("common.clear","Clear")})]}),s.jsx("div",{className:o.filterRow,children:s.jsxs("label",{className:o.filterLabel,children:[t("tools.filter.tool","Tool"),":",s.jsxs("select",{className:o.filterSelect,value:i.historyToolFilter,onChange:e=>{i.setHistoryToolFilter(e.target.value),i.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:t("tools.filter.all","All")}),V.map(e=>s.jsx("option",{value:e,children:e},e))]})]})}),s.jsx(kt,{columns:H,data:i.history,rowKey:e=>e.id,onRowClick:e=>u(r=>r===e.id?null:e.id),emptyMessage:t("tools.empty.history","No tool history entries for this place"),expandedKey:N,renderExpandedRow:ot}),s.jsxs("div",{className:o.pagination,children:[s.jsx("button",{className:o.btn,disabled:i.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>i.setHistoryOffset(Math.max(0,i.historyOffset-K)),children:t("tools.page.prev","Prev")}),s.jsxs("span",{className:o.pageInfo,children:[i.historyOffset+1,"–",Math.min(i.historyOffset+K,i.historyTotal)," / ",i.historyTotal]}),s.jsx("button",{className:o.btn,disabled:!i.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>i.setHistoryOffset(i.historyOffset+K),children:t("tools.page.next","Next")})]})]}),k==="statistics"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:t("tools.tab.statistics","Statistics")}),s.jsx("button",{className:o.dangerButton,onClick:()=>{a("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),h("statistics")},children:t("common.clear","Clear")})]}),v&&s.jsxs("div",{className:o.tierDistribution,children:[s.jsxs("div",{className:o.tierBarWrap,children:[s.jsx("div",{className:o.tierBarBasic,style:{width:`${v.basicPct}%`}}),s.jsx("div",{className:o.tierBarPro,style:{width:`${v.proPct}%`}})]}),s.jsxs("div",{className:o.tierLabels,children:[s.jsxs("span",{children:[A(t,"basic")," ",v.basicPct,"% (",v.basic,")"]}),s.jsxs("span",{children:[A(t,"pro")," ",v.proPct,"% (",v.pro,")"]})]})]}),s.jsx("div",{className:o.statsTableWrap,children:s.jsxs("table",{className:o.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:I.map(e=>s.jsxs("th",{style:e.width?{width:e.width}:void 0,className:e.sortable?o.sortableHeader:void 0,onClick:e.sortable?()=>U(e.key):void 0,children:[s.jsx("span",{children:e.label}),e.sortable&&L===e.key&&s.jsx("span",{className:o.sortArrow,children:m==="asc"?"▴":"▾"})]},e.key))})}),s.jsx("tbody",{children:C.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:I.length,className:o.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):C.map(e=>{const r=E===e.toolName;return s.jsxs(n.Fragment,{children:[s.jsxs("tr",{className:o.statsToolRow,onClick:()=>G(e.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:o.expandButton,"aria-expanded":r,"aria-label":`${e.toolName} ${r?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:l=>{l.stopPropagation(),G(e.toolName)},children:[s.jsx("span",{className:o.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:e.toolName})]})}),s.jsx("td",{children:e.totalCalls}),s.jsx("td",{children:e.successCount}),s.jsx("td",{children:e.fallbackCount}),s.jsx("td",{children:e.unsupportedCount}),s.jsx("td",{children:e.warningCount}),s.jsx("td",{children:e.failureCount}),s.jsx("td",{children:W(e.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(M,{text:e.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:e.tier==="pro"?o.tierPro:e.tier==="mixed"?o.tierMixed:o.tierBasic,children:A(t,e.tier)})})})]}),r&&e.commands.map(l=>s.jsxs("tr",{className:o.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:o.actionLabel,children:l.label})}),s.jsx("td",{children:l.totalCalls}),s.jsx("td",{children:l.successCount}),s.jsx("td",{children:l.fallbackCount}),s.jsx("td",{children:l.unsupportedCount}),s.jsx("td",{children:l.warningCount}),s.jsx("td",{children:l.failureCount}),s.jsx("td",{children:W(l.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:l.tier==="pro"?o.tierPro:o.tierBasic,children:A(t,l.tier)})})]},`${e.toolName}:${l.commandName}`))]},e.toolName)})})]})}),i.statistics&&s.jsxs("div",{className:o.summaryLine,children:[t("tools.summary.total","Total"),": ",i.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",i.statistics.totalSessions]})]}),s.jsx(ht,{open:w!==null,title:w==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:w==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:y,onCancel:()=>!y&&h(null),onConfirm:et})]})}export{Ae as Component};
|
|
1
|
+
import{j as s,r as n,a as O,D as nt,u as ct,e as dt,l as ut}from"./index-C_exRd2o.js";import{P as pt}from"./PageHeader-Cvi0LO4r.js";import{T as M}from"./TooltipText-1fJvqtMt.js";import{C as ht}from"./ConfirmModal-DJp4ax33.js";import{C as mt}from"./CurrentPlaceScope-DrtUw6py.js";import{T as bt}from"./Tabs-2QEkInbt.js";import"./UiPrimitive-CsV5QE01.js";import"./ConfirmModal.module-DJksQHBd.js";const xt="_wrapper_hzgda_2",ft="_table_hzgda_7",gt="_sortable_hzgda_32",_t="_sortArrow_hzgda_41",wt="_clickable_hzgda_52",yt="_empty_hzgda_57",Ct="_expandedRow_hzgda_65",jt="_expandedCell_hzgda_74",T={wrapper:xt,table:ft,sortable:gt,sortArrow:_t,clickable:wt,empty:yt,expandedRow:Ct,expandedCell:jt};function kt({columns:t,data:a,sortBy:x,sortDir:z="asc",onSort:P,onRowClick:i,rowKey:j,emptyMessage:k,expandedKey:B,renderExpandedRow:N}){return s.jsx("div",{className:T.wrapper,children:s.jsxs("table",{className:T.table,children:[s.jsx("thead",{children:s.jsx("tr",{children:t.map(u=>s.jsxs("th",{style:u.width?{width:u.width}:void 0,className:u.sortable?T.sortable:void 0,onClick:u.sortable&&P?()=>P(u.key):void 0,children:[s.jsx("span",{children:u.label}),u.sortable&&x===u.key&&s.jsx("span",{className:T.sortArrow,children:z==="asc"?"▴":"▾"})]},u.key))})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:t.length,className:T.empty,children:k||"No data"})}):a.map((u,E)=>{const R=j?j(u):String(E),h=B!=null&&R===B&&N?N(u):null;return s.jsxs(n.Fragment,{children:[s.jsx("tr",{className:i?T.clickable:void 0,onClick:i?()=>i(u):void 0,children:t.map(y=>s.jsx("td",{children:y.render?y.render(u):String(u[y.key]??"")},y.key))}),h&&s.jsx("tr",{className:T.expandedRow,children:s.jsx("td",{colSpan:t.length,className:T.expandedCell,children:h})})]},R)})})]})})}function St(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Tt=50;function Nt(t){if(typeof t=="number")return{placeId:String(t)}}function Z(t,a){return typeof a!="number"?t:`${t}?placeId=${encodeURIComponent(String(a))}`}function vt(t){const a=(t==null?void 0:t.placeId)??null,[x,z]=n.useState(null),[P,i]=n.useState(!0),[j,k]=n.useState([]),[B,N]=n.useState(0),[u,E]=n.useState(!1),[R,w]=n.useState(!0),[h,y]=n.useState(0),[f,L]=n.useState(""),F=n.useRef(null),m=n.useCallback(async()=>{i(!0);try{const c=Nt(a),C=c?await O.get("/api/dashboard/tool-stats",c):await O.get("/api/dashboard/tool-stats");z(C)}catch{}finally{i(!1)}},[a]),_=n.useCallback(async(c,C)=>{w(!0);try{const H={limit:String(Tt),offset:String(c)};C&&(H.tool=C),typeof a=="number"&&(H.placeId=String(a));const I=await O.get("/api/dashboard/history",H);k(I.entries.map(St)),N(I.total),E(I.hasMore)}catch{k([]),N(0),E(!1)}finally{w(!1)}},[a]),U=n.useCallback(()=>{m(),_(h,f)},[_,m,h,f]),V=n.useCallback(async()=>{await O.post(Z("/api/dashboard/tools/history/clear",a)),_(h,f)},[_,h,f,a]),$=n.useCallback(async()=>{await O.post(Z("/api/dashboard/tools/statistics/clear",a)),m()},[m,a]);return n.useEffect(()=>{m()},[m]),n.useEffect(()=>{_(h,f)},[_,h,f]),n.useEffect(()=>{const c=new nt;F.current=c,c.connect();const C=c.on("command",()=>{m(),_(h,f)});return()=>{C(),c.disconnect(),F.current=null}},[_,m,h,f]),{statistics:x,statsLoading:P,history:j,historyTotal:B,historyHasMore:u,historyLoading:R,historyOffset:h,historyToolFilter:f,setHistoryOffset:y,setHistoryToolFilter:L,refresh:U,clearHistory:V,clearStatistics:$}}const Mt="_page_1wi3z_2",zt="_card_1wi3z_12",Pt="_cardToolbar_1wi3z_19",Bt="_sectionTitle_1wi3z_27",Et="_dangerButton_1wi3z_33",Rt="_proBadge_1wi3z_52",Lt="_statusOk_1wi3z_67",It="_statusFallback_1wi3z_80",At="_statusUnsupported_1wi3z_93",Ht="_statusWarning_1wi3z_106",Ot="_statusError_1wi3z_119",Ft="_tierBasic_1wi3z_133",$t="_tierPro_1wi3z_137",qt="_tierMixed_1wi3z_142",Dt="_filterRow_1wi3z_153",Wt="_filterLabel_1wi3z_160",Ut="_filterSelect_1wi3z_169",Vt="_expandedRow_1wi3z_185",Kt="_expandedSection_1wi3z_190",Gt="_detailList_1wi3z_200",Jt="_detailItem_1wi3z_206",Qt="_detailLabel_1wi3z_212",Zt="_detailValue_1wi3z_217",Xt="_pre_1wi3z_222",Yt="_pagination_1wi3z_239",te="_pageInfo_1wi3z_247",ee="_btn_1wi3z_253",se="_tierDistribution_1wi3z_281",oe="_tierBarWrap_1wi3z_285",ae="_tierBarBasic_1wi3z_293",re="_tierBarPro_1wi3z_298",le="_tierLabels_1wi3z_303",ie="_statsTableWrap_1wi3z_312",ne="_statsTable_1wi3z_312",ce="_sortableHeader_1wi3z_343",de="_sortArrow_1wi3z_348",ue="_statsToolRow_1wi3z_352",pe="_statsActionRow_1wi3z_360",he="_expandButton_1wi3z_364",me="_expandIcon_1wi3z_376",be="_actionLabel_1wi3z_381",xe="_emptyStats_1wi3z_388",fe="_summaryLine_1wi3z_394",o={page:Mt,card:zt,cardToolbar:Pt,sectionTitle:Bt,dangerButton:Et,proBadge:Rt,statusOk:Lt,statusFallback:It,statusUnsupported:At,statusWarning:Ht,statusError:Ot,tierBasic:Ft,tierPro:$t,tierMixed:qt,filterRow:Dt,filterLabel:Wt,filterSelect:Ut,expandedRow:Vt,expandedSection:Kt,detailList:Gt,detailItem:Jt,detailLabel:Qt,detailValue:Zt,pre:Xt,pagination:Yt,pageInfo:te,btn:ee,tierDistribution:se,tierBarWrap:oe,tierBarBasic:ae,tierBarPro:re,tierLabels:le,statsTableWrap:ie,statsTable:ne,sortableHeader:ce,sortArrow:de,statsToolRow:ue,statsActionRow:pe,expandButton:he,expandIcon:me,actionLabel:be,emptyStats:xe,summaryLine:fe},K=50,ge=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function _e(t){const a=new Date(t);return`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}:${String(a.getSeconds()).padStart(2,"0")}`}function W(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function A(t,a){return a==="pro"?t("tier.pro","Pro"):a==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function tt(t,a){return a!==t&&a.startsWith(`${t}_`)?a.slice(t.length+1):""}function we(t,a){const x=tt(t,a);return x?`${t}.${x}`:t}function X(t){return typeof t=="string"&&t.length>0?t:void 0}function ye(t){if(!Array.isArray(t))return;const a=t.filter(x=>typeof x=="string"&&x.length>0);return a.length>0?a:void 0}function Ce(t){const a=t.result??{};return{requestedCommand:t.requestedCommand??X(a.requestedCommand),executedCommand:t.executedCommand??X(a.executedCommand),alternatives:t.alternatives??ye(a.alternatives)}}function je(t,a){switch(t.status){case"fallback":return{label:a("tools.badge.fallback","FALLBACK"),tooltip:a("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:o.statusFallback};case"unsupported":return{label:a("tools.badge.unsupported","UNSUPPORTED"),tooltip:a("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:o.statusUnsupported};case"warning":return{label:a("tools.badge.warn","WARN"),tooltip:a("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:o.statusWarning};case"error":return{label:a("tools.badge.err","FAILED"),tooltip:a("tools.badge.err.tooltip","The tool run failed."),className:o.statusError};default:return{label:a("tools.status.ok","OK"),tooltip:a("tools.status.ok.tooltip","The tool run completed successfully."),className:o.statusOk}}}function g(t,a){return s.jsxs("div",{className:o.detailItem,children:[s.jsx("span",{className:o.detailLabel,children:t}),s.jsx("span",{className:o.detailValue,children:a})]})}function ke(t){if(!t||typeof t!="object")return;const a=t;if(typeof a.selectionMode=="string"&&ge.has(a.selectionMode))return a}function Y(t){if(!(!t||typeof t!="object"||!("routing"in t)))return ke(t.routing)}function Se(t){return t.routing??Y(t.result)??Y(t.data)}function Te(t,a){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:a("tools.history.routing.none","No Studio target named")}function Ne(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ae(){const{t}=ct(),{trackEvent:a,trackPageView:x}=dt(),[z,P]=n.useState(null),i=vt({placeId:z}),{show:j}=ut(),[k,B]=n.useState("history"),[N,u]=n.useState(null),[E,R]=n.useState(null),[w,h]=n.useState(null),[y,f]=n.useState(!1),[L,F]=n.useState("totalCalls"),[m,_]=n.useState("desc"),U=n.useCallback(e=>{F(r=>r===e?(_(l=>l==="asc"?"desc":"asc"),e):(_("desc"),e))},[]),V=n.useMemo(()=>{var r;const e=new Set;return Object.keys(((r=i.statistics)==null?void 0:r.tools)??{}).forEach(l=>e.add(l)),i.history.forEach(l=>{l.tool&&e.add(l.tool)}),i.historyToolFilter&&e.add(i.historyToolFilter),Array.from(e).sort()},[i.history,i.historyToolFilter,i.statistics]),$=n.useMemo(()=>{var e;return(e=i.statistics)!=null&&e.tools?Object.values(i.statistics.tools).map(r=>{var Q;const l=Object.entries(r.commands??{}).map(([p,d])=>({toolName:r.tool,commandName:d.command??p,label:tt(r.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),b=l.reduce((p,d)=>p+d.totalCalls,0),S=l.reduce((p,d)=>p+d.successCount,0),q=l.reduce((p,d)=>p+d.fallbackCount,0),D=l.reduce((p,d)=>p+d.unsupportedCount,0),rt=l.reduce((p,d)=>p+d.warningCount,0),lt=l.reduce((p,d)=>p+d.failureCount,0),J=l.reduce((p,d)=>p+d.totalExecutionTimeMs,0),it=new Set(l.map(p=>p.tier)).size>1?"mixed":((Q=l[0])==null?void 0:Q.tier)??r.tier;return{toolName:r.tool,tier:it,commands:l,totalCalls:b,successCount:S,fallbackCount:q,unsupportedCount:D,warningCount:rt,failureCount:lt,totalExecutionTimeMs:J,avgExecutionTimeMs:b>0?Math.round(J/b):0}}):[]},[i.statistics]),c=n.useCallback((e,r,l,b)=>s.jsx(M,{text:t(l,b),children:t(e,r)}),[t]),C=n.useMemo(()=>[...$].sort((r,l)=>{const b=r[L],S=l[L];if(typeof b=="number"&&typeof S=="number")return m==="asc"?b-S:S-b;const q=String(b??""),D=String(S??"");return m==="asc"?q.localeCompare(D):D.localeCompare(q)}),[$,L,m]),H=n.useMemo(()=>[{key:"timestamp",label:c("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:e=>_e(e.timestamp)},{key:"toolName",label:c("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:e=>s.jsxs("span",{children:[we(e.tool,e.command),e.tier==="pro"&&s.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:s.jsx("span",{className:o.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:c("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:e=>W(e.executionTimeMs)},{key:"status",label:c("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:e=>{const r=je(e,t);return s.jsx(M,{text:r.tooltip,children:s.jsx("span",{className:r.className,children:r.label})})}},{key:"tier",label:c("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:e=>s.jsx("span",{className:e.tier==="pro"?o.tierPro:o.tierBasic,children:A(t,e.tier)})}],[t,c]),I=n.useMemo(()=>[{key:"toolName",label:c("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:c("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:c("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:c("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:c("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:c("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:c("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:c("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:e=>W(e.avgExecutionTimeMs)},{key:"tier",label:c("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:e=>s.jsx(M,{text:e.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:e.tier==="pro"?o.tierPro:e.tier==="mixed"?o.tierMixed:o.tierBasic,children:A(t,e.tier)})})}],[t,c]),v=n.useMemo(()=>{if(!i.statistics)return null;const e=i.statistics.tierSummary.basic.totalCalls,r=i.statistics.tierSummary.pro.totalCalls,l=e+r;if(l===0)return null;const b=Math.round(e/l*100),S=100-b;return{basic:e,pro:r,basicPct:b,proPct:S}},[i.statistics]),G=n.useCallback(e=>{R(r=>r===e?null:e)},[]),et=n.useCallback(async()=>{if(w){f(!0);try{w==="history"?await i.clearHistory():await i.clearStatistics(),j(t("toast.clearSuccess","Cleared successfully"),"success"),h(null)}catch{j(t("toast.clearFailed","Failed to clear data"),"error")}finally{f(!1)}}},[w,j,t,i]),st=n.useCallback(e=>{const r=e==="history"?"tools_history":"tools_statistics";a("dashboard_click_event",{click_target:e==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:r}),x({page:"tools",tab:r}),B(e)},[a,x]),ot=n.useCallback(e=>{const r=Ce(e),l=Se(e);return s.jsxs("div",{className:o.expandedRow,children:[s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:t("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:t("tools.detail.params","Parameters")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(e.parameters,null,2)})]}),e.result&&s.jsxs("div",{className:o.expandedSection,children:[s.jsxs("strong",{children:[s.jsx(M,{text:t("tools.detail.result.tooltip","Returned result payload for this tool run."),children:t("tools.detail.result","Result")}),":"]}),s.jsx("pre",{className:o.pre,children:JSON.stringify(e.result,null,2)})]}),l?s.jsxs("div",{className:o.expandedSection,children:[s.jsx("strong",{children:t("tools.history.routing","Routing")}),s.jsxs("div",{className:o.detailList,children:[g(t("tools.history.routing.mode","Mode"),l.selectionMode),g(t("tools.history.routing.requested","Requested"),Te(l,t)),g(t("tools.history.routing.actual","Actual"),Ne(l))]})]}):null,(e.status==="fallback"||e.status==="unsupported"||e.status==="warning"||e.status==="error")&&s.jsx("div",{className:o.expandedSection,children:s.jsxs("div",{className:o.detailList,children:[e.status==="fallback"&&(r==null?void 0:r.requestedCommand)&&g(t("tools.detail.requestedCommand","Requested Command"),r.requestedCommand),e.status==="fallback"&&(r==null?void 0:r.executedCommand)&&g(t("tools.detail.executedCommand","Executed Command"),r.executedCommand),e.status==="fallback"&&(r==null?void 0:r.alternatives)&&g(t("tools.detail.alternatives","Alternatives"),r.alternatives.join(", ")),e.status==="unsupported"&&e.blockedMessage&&g(t("tools.detail.blockedMessage","Blocked Reason"),e.blockedMessage),e.status==="unsupported"&&g(t("tools.detail.noFallback","No Fallback"),t("tools.detail.noFallback.value","No fallback ran.")),e.status==="warning"&&e.warningMessage&&g(t("tools.detail.warningMessage","Warning Message"),e.warningMessage),e.status==="error"&&e.errorMessage&&g(t("tools.detail.errorMessage","Error Message"),e.errorMessage),e.status==="error"&&e.blockedMessage&&g(t("tools.detail.blockedMessage","Blocked Reason"),e.blockedMessage),e.status==="error"&&e.fallbackCommand&&g(t("tools.detail.executedCommand","Executed Command"),e.fallbackCommand)]})})]})},[t]),at=["history","statistics"].map(e=>({key:e,label:t(`tools.tab.${e}`,e.charAt(0).toUpperCase()+e.slice(1))}));return s.jsxs("div",{className:o.page,children:[s.jsx(pt,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),s.jsx(mt,{surface:"tools",selectable:!0,selectedPlaceId:z,onSelectedPlaceIdChange:e=>{P(e),i.setHistoryOffset(0)}}),s.jsx(bt,{items:at,value:k,onChange:st}),k==="history"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:t("tools.tab.history","History")}),s.jsx("button",{className:o.dangerButton,onClick:()=>{a("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),h("history")},children:t("common.clear","Clear")})]}),s.jsx("div",{className:o.filterRow,children:s.jsxs("label",{className:o.filterLabel,children:[t("tools.filter.tool","Tool"),":",s.jsxs("select",{className:o.filterSelect,value:i.historyToolFilter,onChange:e=>{i.setHistoryToolFilter(e.target.value),i.setHistoryOffset(0)},children:[s.jsx("option",{value:"",children:t("tools.filter.all","All")}),V.map(e=>s.jsx("option",{value:e,children:e},e))]})]})}),s.jsx(kt,{columns:H,data:i.history,rowKey:e=>e.id,onRowClick:e=>u(r=>r===e.id?null:e.id),emptyMessage:t("tools.empty.history","No tool history entries for this place"),expandedKey:N,renderExpandedRow:ot}),s.jsxs("div",{className:o.pagination,children:[s.jsx("button",{className:o.btn,disabled:i.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>i.setHistoryOffset(Math.max(0,i.historyOffset-K)),children:t("tools.page.prev","Prev")}),s.jsxs("span",{className:o.pageInfo,children:[i.historyOffset+1,"–",Math.min(i.historyOffset+K,i.historyTotal)," / ",i.historyTotal]}),s.jsx("button",{className:o.btn,disabled:!i.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>i.setHistoryOffset(i.historyOffset+K),children:t("tools.page.next","Next")})]})]}),k==="statistics"&&s.jsxs("div",{className:o.card,children:[s.jsxs("div",{className:o.cardToolbar,children:[s.jsx("div",{className:o.sectionTitle,children:t("tools.tab.statistics","Statistics")}),s.jsx("button",{className:o.dangerButton,onClick:()=>{a("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),h("statistics")},children:t("common.clear","Clear")})]}),v&&s.jsxs("div",{className:o.tierDistribution,children:[s.jsxs("div",{className:o.tierBarWrap,children:[s.jsx("div",{className:o.tierBarBasic,style:{width:`${v.basicPct}%`}}),s.jsx("div",{className:o.tierBarPro,style:{width:`${v.proPct}%`}})]}),s.jsxs("div",{className:o.tierLabels,children:[s.jsxs("span",{children:[A(t,"basic")," ",v.basicPct,"% (",v.basic,")"]}),s.jsxs("span",{children:[A(t,"pro")," ",v.proPct,"% (",v.pro,")"]})]})]}),s.jsx("div",{className:o.statsTableWrap,children:s.jsxs("table",{className:o.statsTable,children:[s.jsx("thead",{children:s.jsx("tr",{children:I.map(e=>s.jsxs("th",{style:e.width?{width:e.width}:void 0,className:e.sortable?o.sortableHeader:void 0,onClick:e.sortable?()=>U(e.key):void 0,children:[s.jsx("span",{children:e.label}),e.sortable&&L===e.key&&s.jsx("span",{className:o.sortArrow,children:m==="asc"?"▴":"▾"})]},e.key))})}),s.jsx("tbody",{children:C.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:I.length,className:o.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):C.map(e=>{const r=E===e.toolName;return s.jsxs(n.Fragment,{children:[s.jsxs("tr",{className:o.statsToolRow,onClick:()=>G(e.toolName),children:[s.jsx("td",{children:s.jsxs("button",{type:"button",className:o.expandButton,"aria-expanded":r,"aria-label":`${e.toolName} ${r?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:l=>{l.stopPropagation(),G(e.toolName)},children:[s.jsx("span",{className:o.expandIcon,"aria-hidden":"true",children:r?"▾":"▸"}),s.jsx("span",{children:e.toolName})]})}),s.jsx("td",{children:e.totalCalls}),s.jsx("td",{children:e.successCount}),s.jsx("td",{children:e.fallbackCount}),s.jsx("td",{children:e.unsupportedCount}),s.jsx("td",{children:e.warningCount}),s.jsx("td",{children:e.failureCount}),s.jsx("td",{children:W(e.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx(M,{text:e.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:s.jsx("span",{className:e.tier==="pro"?o.tierPro:e.tier==="mixed"?o.tierMixed:o.tierBasic,children:A(t,e.tier)})})})]}),r&&e.commands.map(l=>s.jsxs("tr",{className:o.statsActionRow,children:[s.jsx("td",{children:s.jsx("span",{className:o.actionLabel,children:l.label})}),s.jsx("td",{children:l.totalCalls}),s.jsx("td",{children:l.successCount}),s.jsx("td",{children:l.fallbackCount}),s.jsx("td",{children:l.unsupportedCount}),s.jsx("td",{children:l.warningCount}),s.jsx("td",{children:l.failureCount}),s.jsx("td",{children:W(l.avgExecutionTimeMs)}),s.jsx("td",{children:s.jsx("span",{className:l.tier==="pro"?o.tierPro:o.tierBasic,children:A(t,l.tier)})})]},`${e.toolName}:${l.commandName}`))]},e.toolName)})})]})}),i.statistics&&s.jsxs("div",{className:o.summaryLine,children:[t("tools.summary.total","Total"),": ",i.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",i.statistics.totalSessions]})]}),s.jsx(ht,{open:w!==null,title:w==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:w==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:y,onCancel:()=>!y&&h(null),onConfirm:et})]})}export{Ae as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,k as s}from"./index-
|
|
1
|
+
import{j as r,k as s}from"./index-C_exRd2o.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,j as r}from"./index-
|
|
1
|
+
import{r as e,j as r}from"./index-C_exRd2o.js";const i="_button_vab4n_1",d="_iconButton_vab4n_2",v="_checkboxInput_vab4n_26",m="_button_sm_vab4n_37",p="_button_md_vab4n_42",l="_primary_vab4n_47",f="_secondary_vab4n_58",B="_ghost_vab4n_69",x="_danger_vab4n_81",g="_iconButton_sm_vab4n_104",y="_iconButton_md_vab4n_109",h="_badge_vab4n_114",j="_pill_vab4n_133",k="_interactive_vab4n_137",w="_neutral_vab4n_151",I="_accent_vab4n_157",R="_success_vab4n_163",N="_warning_vab4n_169",C="_info_vab4n_175",E="_error_vab4n_181",$="_pro_vab4n_193",n={button:i,iconButton:d,checkboxInput:v,button_sm:m,button_md:p,primary:l,secondary:f,ghost:B,danger:x,iconButton_sm:g,iconButton_md:y,badge:h,pill:j,interactive:k,neutral:w,accent:I,success:R,warning:N,info:C,error:E,pro:$};function u(...a){return a.filter(Boolean).join(" ")}const z=e.forwardRef(function({variant:t="secondary",size:_="md",className:o,type:c="button",...s},b){return r.jsx("button",{ref:b,type:c,className:u(n.button,n[t],n[`button_${_}`],o),...s})}),A=e.forwardRef(function({size:t="md",className:_,type:o="button",...c},s){return r.jsx("button",{ref:s,type:o,className:u(n.iconButton,n[`iconButton_${t}`],_),...c})}),D=e.forwardRef(function({variant:t="neutral",shape:_="square",interactive:o=!1,className:c,...s},b){return r.jsx("span",{ref:b,className:u(n.badge,n[t],_==="pill"&&n.pill,o&&n.interactive,c),...s})}),F=e.forwardRef(function({className:t,type:_,...o},c){return r.jsx("input",{ref:c,type:"checkbox",className:u(n.checkboxInput,t),...o})});export{D as B,F as C,A as I,z as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as ve,o as V,m as Ee,r as _,u as I,j as t,e as q,R as qe,X as He,T as je,h as Ue,t as Oe}from"./index-
|
|
1
|
+
import{i as ve,o as V,m as Ee,r as _,u as I,j as t,e as q,R as qe,X as He,T as je,h as Ue,t as Oe}from"./index-C_exRd2o.js";import{I as D}from"./InfoLabel-HLPMIIL4.js";import{T as y}from"./TooltipText-1fJvqtMt.js";import{C as Fe}from"./UiPrimitive-CsV5QE01.js";import{D as re,c as ne,e as ze,g as Ve,h as We,i as le,j as Ce,k as Ke,l as ce,d as Ye}from"./sample-requests-BRAniRWZ.js";import{T as Qe}from"./Tabs-2QEkInbt.js";import{P as Je}from"./PageHeader-Cvi0LO4r.js";import{C as Xe}from"./CurrentPlaceScope-DrtUw6py.js";/**
|
|
2
2
|
* @license lucide-react v1.8.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as y,j as e,L as j,H as b,r as g,J as N}from"./index-
|
|
1
|
+
import{u as y,j as e,L as j,H as b,r as g,J as N}from"./index-C_exRd2o.js";import{P as f}from"./PageHeader-Cvi0LO4r.js";import"./UiPrimitive-CsV5QE01.js";const k="_card_1b5wm_2",C="_cardUnread_1b5wm_15",R="_cardRead_1b5wm_20",v="_cardUnreadWarning_1b5wm_25",L="_topRow_1b5wm_32",T="_categoryChip_1b5wm_39",B="_versionChip_1b5wm_52",U="_importantBadge_1b5wm_64",S="_date_1b5wm_77",A="_title_1b5wm_85",E="_body_1b5wm_94",W="_linkList_1b5wm_102",$="_link_1b5wm_102",M="_internalLink_1b5wm_124",I="_newBadge_1b5wm_146",a={card:k,cardUnread:C,cardRead:R,cardUnreadWarning:v,topRow:L,categoryChip:T,versionChip:B,importantBadge:U,date:S,title:A,body:E,linkList:W,link:$,internalLink:M,newBadge:I},P={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function x({announcement:t,isNew:c}){const{locale:o,t:r}=y(),d=c?a.cardUnread:a.cardRead,l=t.severity==="warning",h=l&&c?a.cardUnreadWarning:"",m=t.title[o]??t.title.en,w=t.body[o]??t.body.en,_=t.links??(t.link?[t.link]:[]),p=s=>typeof s=="string"?s:s[o]??s.en;return e.jsxs("div",{className:`${a.card} ${d} ${h}`,children:[e.jsxs("div",{className:a.topRow,children:[e.jsx("span",{className:a.categoryChip,children:r(P[t.category])}),l&&e.jsx("span",{className:a.importantBadge,children:r("whatsNew.importantBadge","IMPORTANT")}),t.version&&e.jsx("span",{className:a.versionChip,children:t.version}),c&&e.jsx("span",{className:a.newBadge,children:r("whatsNew.newBadge","NEW")}),e.jsx("span",{className:a.date,children:t.date})]}),e.jsx("h3",{className:a.title,children:m}),e.jsx("p",{className:a.body,children:w}),_.length>0&&e.jsx("div",{className:a.linkList,children:_.map(s=>{const i=p(s.url),u=p(s.label);return i.startsWith("/")?e.jsx(j,{className:`${a.link} ${a.internalLink}`,to:i,children:u},i):e.jsxs("a",{className:a.link,href:i,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",u]},i)})})]})}const z="_page_1talg_2",H="_section_1talg_10",O="_sectionTitle_1talg_16",Y="_unreadCount_1talg_28",G="_empty_1talg_43",J="_divider_1talg_51",n={page:z,section:H,sectionTitle:O,unreadCount:Y,empty:G,divider:J};function F(){const{t}=y(),{readSet:c,markRead:o}=b(),r=g.useMemo(()=>{const s=[];for(const i of N)c.has(i.id)||s.push(i.id);return s},[]),d=g.useRef(r);d.current=r,g.useEffect(()=>()=>{d.current.length>0&&o(d.current)},[]);const l=g.useMemo(()=>new Set(r),[r]),h=N.filter(s=>l.has(s.id)),m=N.filter(s=>!l.has(s.id)),w=h.length>0,_=m.length>0,p=e.jsx(f,{title:t("whatsNew.pageTitle","What's New"),description:t("whatsNew.pageSubtitle","Stay up to date with MCP changes"),helpTopicId:"whatsNew"});return N.length===0?e.jsxs("div",{className:n.page,children:[p,e.jsx("p",{className:n.empty,children:t("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:n.page,children:[p,w&&e.jsxs("section",{className:n.section,children:[e.jsxs("h2",{className:n.sectionTitle,children:[t("whatsNew.unreadSection","Unread"),e.jsx("span",{className:n.unreadCount,children:h.length})]}),h.map(s=>e.jsx(x,{announcement:s,isNew:!0},`unread-${s.id}`))]}),w&&_&&e.jsx("hr",{className:n.divider}),_&&e.jsxs("section",{className:n.section,children:[e.jsx("h2",{className:n.sectionTitle,children:t("whatsNew.allSection","All Announcements")}),m.map(s=>e.jsx(x,{announcement:s,isNew:!1},`all-${s.id}`))]})]})}export{F as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap";._container_6jg7e_2{position:fixed;bottom:16px;right:16px;z-index:2000;display:flex;flex-direction:column-reverse;gap:8px;pointer-events:none}._toast_6jg7e_14{pointer-events:auto;padding:10px 16px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:13px;color:var(--text-primary);box-shadow:0 4px 12px #0000004d;animation:_slideIn_6jg7e_1 .25s ease-out;max-width:320px}@keyframes _slideIn_6jg7e_1{0%{opacity:0;transform:translate(40px)}to{opacity:1;transform:translate(0)}}._success_6jg7e_39{background:color-mix(in srgb,var(--success) 22%,transparent);border-left:3px solid var(--success)}._info_6jg7e_44{background:color-mix(in srgb,var(--accent) 22%,transparent);border-left:3px solid var(--accent)}._warning_6jg7e_49{background:color-mix(in srgb,var(--warning) 22%,transparent);border-left:3px solid var(--warning)}._error_6jg7e_54{background:var(--error-bg);border-left:3px solid var(--error-border)}._wrapper_6ij3d_2{display:inline-flex}._tooltip_6ij3d_11{position:fixed;background:var(--bg-card);border:1px solid var(--border);color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:400;line-height:1.5;padding:4px 8px;border-radius:4px;width:max-content;max-width:min(320px,calc(100vw - 32px));white-space:normal;overflow-wrap:anywhere;text-align:left;pointer-events:none;opacity:0;transition:opacity var(--transition);z-index:1000}._tooltipVisible_6ij3d_33{opacity:1}._widget_1q1ab_1{margin:8px 12px 4px;padding:12px;border:1px solid var(--pro-border);border-radius:var(--radius);background:var(--pro-bg-soft);display:flex;flex-direction:column;gap:10px}._header_1q1ab_12{display:flex;align-items:center;gap:8px}._sparkle_1q1ab_18{color:var(--pro-text);flex-shrink:0}._title_1q1ab_23{font-family:var(--font-label);font-size:12px;font-weight:600;color:var(--pro-text);line-height:1.3}._actions_1q1ab_31{display:flex;flex-direction:column;gap:8px}._cta_1q1ab_37,._licenseCta_1q1ab_38{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:12px;font-weight:700;text-decoration:none;transition:filter var(--transition),transform var(--transition)}._cta_1q1ab_37{background:var(--pro-badge);color:var(--pro-text-on-badge)}._licenseCta_1q1ab_38{border:1px solid var(--pro-border);background:color-mix(in srgb,var(--bg-card) 84%,var(--pro-bg-soft));color:var(--pro-text)}._cta_1q1ab_37:hover,._licenseCta_1q1ab_38:hover{filter:brightness(1.08);transform:translateY(-1px);text-decoration:none}._collapsedGroup_1q1ab_70{display:flex;flex-direction:column;gap:8px;margin:8px 0}._collapsed_1q1ab_70{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0 auto;border-radius:var(--radius-sm);background:var(--pro-bg-soft);color:var(--pro-text);text-decoration:none;transition:filter var(--transition)}._collapsedSecondary_1q1ab_91{border:1px solid var(--pro-border);background:transparent}._collapsed_1q1ab_70:hover{filter:brightness(1.15);text-decoration:none}._backdrop_1r5ey_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;display:grid;place-items:center;padding:24px;background:#0c1018b8}._dialog_1r5ey_11{width:min(560px,100%);max-height:min(720px,calc(100vh - 48px));overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--bg-overlay);box-shadow:0 24px 48px #0307126b}._header_1r5ey_21{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 20px 12px;border-bottom:1px solid var(--border)}._titleBlock_1r5ey_30{display:grid;gap:6px}._title_1r5ey_30{margin:0;color:var(--text-primary);font-size:18px;line-height:1.3}._subtitle_1r5ey_42{margin:0;color:var(--text-secondary);font-size:13px;line-height:1.5}._closeButton_1r5ey_49{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer}._closeButton_1r5ey_49:hover{color:var(--text-primary)}._body_1r5ey_67{display:grid;gap:16px;padding:18px 20px 20px}._statusBox_1r5ey_73,._errorBox_1r5ey_74{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--bg-secondary);color:var(--text-secondary);line-height:1.5}._errorBox_1r5ey_74{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}._spin_1r5ey_92{animation:_spin_1r5ey_92 1s linear infinite}@keyframes _spin_1r5ey_92{to{transform:rotate(360deg)}}._bundleBlock_1r5ey_102{display:grid;gap:8px}._label_1r5ey_107{color:var(--text-secondary);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}._bundleName_1r5ey_115{display:block;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-primary);font-size:13px;line-height:1.5;overflow-wrap:anywhere}._guidanceBox_1r5ey_127{display:grid;gap:8px;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-secondary);font-size:13px;line-height:1.5}._guidanceBox_1r5ey_127 p{margin:0}._includedList_1r5ey_143{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}._includedItem_1r5ey_152{max-width:100%;padding:5px 8px;border:1px solid var(--border);border-radius:999px;color:var(--text-secondary);background:var(--bg-secondary);font-size:12px;overflow-wrap:anywhere}._actions_1r5ey_163{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}._button_1r5ey_169,._primaryLink_1r5ey_170{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:8px;padding:9px 12px;font:inherit;font-size:13px;font-weight:600;text-align:center;text-decoration:none;color:var(--text-primary);background:var(--bg-secondary);cursor:pointer}._primaryLink_1r5ey_170{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._button_1r5ey_169:hover,._primaryLink_1r5ey_170:hover{color:var(--text-primary);text-decoration:none}._button_1r5ey_169:disabled{cursor:not-allowed;opacity:.6}._hint_1r5ey_206{margin:0;color:var(--text-secondary);font-size:12px;line-height:1.5}@media(max-width:560px){._backdrop_1r5ey_1{padding:12px}._actions_1r5ey_163{grid-template-columns:1fr}}._sidebar_19hyu_2{width:var(--sidebar-width);min-width:var(--sidebar-width);height:100%;display:flex;flex-direction:column;background:var(--bg-sidebar);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-right:1px solid var(--border);padding:0 0 16px;overflow:visible;transition:width var(--transition),min-width var(--transition)}._brand_19hyu_17{display:flex;align-items:center;gap:10px;min-height:var(--header-height);padding:0 16px;border-bottom:1px solid var(--border);margin-bottom:8px;flex-shrink:0}._brandIcon_19hyu_28{color:var(--accent);flex-shrink:0}._brandText_19hyu_33{font-family:var(--font-label);font-size:14px;font-weight:700;color:var(--text-primary);letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._brandTextPro_19hyu_44{color:var(--pro-text);text-shadow:0 0 18px rgba(212,167,44,.18)}._nav_19hyu_50{display:flex;flex-direction:column;gap:2px}._spacer_19hyu_57{flex:1;min-height:16px}._navLink_19hyu_63{display:flex;align-items:center;gap:12px;padding:10px 16px;color:var(--text-secondary);text-decoration:none;font-size:14px;font-weight:500;border-left:4px solid transparent;transition:color var(--transition),background var(--transition),border-color var(--transition)}._navLink_19hyu_63:hover{color:var(--text-primary);background:var(--accent-dim);text-decoration:none}._navLink_19hyu_63._active_19hyu_84{color:var(--accent);border-left-color:var(--accent);background:var(--accent-dim)}._navLink_19hyu_63._disabled_19hyu_91{color:var(--text-muted);pointer-events:none;cursor:default}._navLink_19hyu_63._disabled_19hyu_91:hover{background:transparent}._icon_19hyu_102{width:20px;height:20px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:currentColor}._label_19hyu_113{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._secondaryDivider_19hyu_120{height:1px;margin:4px 16px;background:var(--border)}._secondaryNav_19hyu_127,._secondaryNavEntry_19hyu_134{display:flex;flex-direction:column;gap:2px}._secondaryItemDivider_19hyu_140{height:1px;margin:4px 16px;background:var(--border)}._helpDivider_19hyu_147{height:1px;margin:8px 16px 4px;background:var(--border)}._helpGroupTitle_19hyu_154{padding:4px 16px 6px;font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}._helpNav_19hyu_165{display:flex;flex-direction:column;gap:2px}._externalIcon_19hyu_172{margin-left:auto;display:inline-flex;align-items:center;color:var(--text-muted)}@media(max-width:768px){._sidebar_19hyu_2{width:var(--sidebar-collapsed);min-width:var(--sidebar-collapsed)}._brand_19hyu_17{justify-content:center;padding:0}._brandText_19hyu_33{display:none}._navLink_19hyu_63{justify-content:center;padding:10px 0;gap:0}._label_19hyu_113,._helpGroupTitle_19hyu_154,._externalIcon_19hyu_172{display:none}}._header_1do17_2{display:flex;flex-direction:column;justify-content:center;gap:6px;height:var(--header-height);padding:10px 24px;border-bottom:1px solid var(--border);background:var(--bg-card);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);flex-shrink:0;overflow:hidden}._row1_1do17_17{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0}._contextGroups_1do17_25{display:flex;align-items:stretch;gap:18px;min-width:0;flex:1}._projectGroup_1do17_33,._studioGroup_1do17_34{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0}._projectGroup_1do17_33{flex:1 1 44%;padding-right:18px;border-right:1px solid var(--border)}._studioGroup_1do17_34{flex:1 1 52%}._groupTitleRow_1do17_52{display:flex;align-items:center;gap:8px;min-width:0}._groupLabel_1do17_59{display:inline-flex;align-items:center;gap:5px;color:var(--text-muted);font-family:var(--font-label);font-size:10px;font-weight:700;letter-spacing:.06em;line-height:1;text-transform:uppercase;white-space:nowrap}._groupIcon_1do17_73{color:var(--accent);flex-shrink:0}._projectName_1do17_78{margin:0;font-size:15px;font-weight:700;color:var(--text-primary);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:clamp(120px,24vw,320px)}._placeChips_1do17_90{display:flex;gap:6px;flex-wrap:wrap;min-width:0;max-height:24px;overflow:hidden}._metaActions_1do17_99{display:flex;align-items:center;gap:8px;flex-shrink:0}._placeChip_1do17_90{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--bg-overlay);color:var(--text-secondary);font-size:12px;font-weight:600;line-height:1.4;cursor:default}._placeChipStatic_1do17_122,._placeChipMuted_1do17_123{cursor:default}._placeChipActive_1do17_127{border-color:var(--border-highlight);color:var(--text-primary);background:var(--accent-dim);box-shadow:0 0 0 1px var(--accent-glow) inset}._placeChipInactive_1do17_134{border-color:var(--border);color:var(--text-muted);opacity:.85}._placeChipMuted_1do17_123{border-color:var(--border);color:var(--text-muted)}._placeChipId_1do17_145{font-family:var(--font-code);font-weight:500;font-size:11px;color:var(--text-muted);padding-left:6px;margin-left:2px;border-left:1px solid var(--border)}._placeChipActive_1do17_127 ._placeChipId_1do17_145{color:var(--text-secondary);border-left-color:var(--border-highlight)}._placeChipClient_1do17_160{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}._placeChipState_1do17_166{font-size:10px;color:var(--text-secondary);text-transform:lowercase}._placeChipBadge_1do17_172{font-size:10px;color:var(--text-secondary);border:1px solid var(--border);border-radius:var(--radius-sm);padding:1px 5px}._placeDot_1do17_180{width:7px;height:7px;border-radius:var(--radius-pill);background:var(--success);box-shadow:0 0 6px var(--success)}._placeChipName_1do17_188{white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}._row2_1do17_196{display:flex;align-items:center;height:18px;min-width:0;flex-shrink:0}._row2_1do17_196[data-state=empty]{pointer-events:none}._pathRow_1do17_208,._auxiliaryPath_1do17_209{display:flex;align-items:center;gap:8px;min-width:0;flex:1}._auxiliaryPath_1do17_209{width:100%}._pathLabel_1do17_221{color:var(--text-muted);font-family:var(--font-label);font-size:10px;font-weight:700;letter-spacing:.04em;line-height:1;text-transform:uppercase;white-space:nowrap}._projectPath_1do17_232{font-family:var(--font-code);font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}._changeButton_1do17_242{display:inline-flex;align-items:center;justify-content:center;height:26px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-overlay);color:var(--text-primary);font:inherit;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;text-decoration:none;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._changeButton_1do17_242:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent)}._changeButton_1do17_242:disabled{cursor:not-allowed;opacity:.52}._iconButton_1do17_276{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-overlay);color:var(--text-primary);text-decoration:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._iconButton_1do17_276:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent);text-decoration:none}._iconButton_1do17_276:focus-visible{outline:none;box-shadow:var(--focus-ring)}._notificationDot_1do17_306{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:var(--radius-pill);background:var(--error);box-shadow:0 0 0 2px var(--bg-overlay)}@media(max-width:768px){._header_1do17_2{padding:10px 16px;height:auto;min-height:var(--header-height)}._row1_1do17_17{align-items:flex-start;gap:8px}._contextGroups_1do17_25{flex-direction:column;gap:8px}._projectGroup_1do17_33{padding-right:0;border-right:none}._groupTitleRow_1do17_52{flex-wrap:wrap}._placeChips_1do17_90{max-height:none}._row2_1do17_196,._auxiliaryPath_1do17_209{width:100%}}._bellWrapper_tae21_2{position:relative;display:inline-flex}._unreadDot_tae21_8{position:absolute;top:4px;right:4px;width:8px;height:8px;border-radius:50%;background:var(--error);border:2px solid var(--bg-card);pointer-events:none}._layout_19mmz_2{display:flex;height:100%;overflow:hidden}._mainShell_19mmz_8{flex:1;min-width:0;display:flex;flex-direction:column;overflow:visible}._content_19mmz_17{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-gutter:stable;padding:24px}._loading_19mmz_26{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-muted);font-size:14px}:root{--bg-primary: #0b0e1a;--bg-secondary: #0f1525;--bg-card: #111827;--bg-sidebar: rgba(11, 14, 26, .95);--bg-overlay: rgba(15, 21, 37, .88);--text-primary: #e2e8f0;--text-secondary: #94a3b8;--text-muted: #475569;--border: #1e293b;--border-highlight: #2563eb;--accent: #3b82f6;--accent-dim: rgba(59, 130, 246, .12);--accent-glow: rgba(59, 130, 246, .25);--accent-hover: #60a5fa;--button-primary-text: #ffffff;--pro-badge: #d4a72c;--pro-text: #f3d46b;--pro-text-on-badge: #1a1407;--pro-bg: #3a2d12;--pro-bg-soft: rgba(212, 167, 44, .12);--pro-border: #8f6f1f;--success: #22c55e;--success-bg: rgba(34, 197, 94, .14);--success-border: rgba(34, 197, 94, .5);--success-text: #86efac;--warning: #f59e0b;--warning-bg: rgba(245, 158, 11, .14);--warning-border: rgba(245, 158, 11, .5);--warning-text: #fcd34d;--info: #60a5fa;--info-bg: rgba(96, 165, 250, .14);--info-border: rgba(96, 165, 250, .5);--info-text: #93c5fd;--error: #ef4444;--error-bg: rgba(239, 68, 68, .12);--error-border: rgba(239, 68, 68, .5);--error-text: #f4c1c1;--danger: #d15454;--danger-bg: rgba(209, 84, 84, .12);--danger-border: rgba(209, 84, 84, .5);--danger-text: #f4c1c1;--danger-hover-bg: rgba(209, 84, 84, .2);--diff-add: var(--success);--diff-add-bg: var(--success-bg);--diff-add-text: var(--success-text);--diff-remove: var(--error);--diff-remove-bg: var(--error-bg);--diff-remove-text: var(--error-text);--diff-update: var(--warning);--diff-update-bg: var(--warning-bg);--diff-update-text: var(--warning-text);--diff-rename: var(--info);--diff-rename-bg: var(--info-bg);--diff-rename-text: var(--info-text);--font-code: "JetBrains Mono", "Fira Code", monospace;--font-label: "Inter", "DM Sans", -apple-system, sans-serif;--sidebar-width: 220px;--sidebar-collapsed: 56px;--header-height: 96px;--content-max: 1080px;--content-gap: 16px;--radius: 8px;--radius-control: 6px;--radius-sm: 6px;--radius-pill: 999px;--transition: .2s ease;--focus-ring: 0 0 0 3px var(--accent-glow)}@media(prefers-color-scheme:light){:root{--bg-primary: #f1f5f9;--bg-secondary: #ffffff;--bg-card: #ffffff;--bg-sidebar: rgba(255, 255, 255, .95);--bg-overlay: rgba(255, 255, 255, .95);--text-primary: #0f172a;--text-secondary: #475569;--text-muted: #94a3b8;--border: #e2e8f0;--border-highlight: #3b82f6;--accent: #2563eb;--accent-dim: rgba(37, 99, 235, .08);--accent-glow: rgba(37, 99, 235, .15);--accent-hover: #1d4ed8;--button-primary-text: #ffffff;--pro-badge: #b07c00;--pro-text: #8a5f00;--pro-text-on-badge: #1a1407;--pro-bg: #fff4d6;--pro-bg-soft: rgba(176, 124, 0, .12);--pro-border: #d9b14d;--success: #16a34a;--success-bg: rgba(22, 163, 74, .1);--success-border: rgba(22, 163, 74, .4);--success-text: #166534;--warning: #d97706;--warning-bg: rgba(217, 119, 6, .1);--warning-border: rgba(217, 119, 6, .4);--warning-text: #92400e;--info: #2563eb;--info-bg: rgba(37, 99, 235, .1);--info-border: rgba(37, 99, 235, .4);--info-text: #1d4ed8;--error: #dc2626;--error-bg: rgba(220, 38, 38, .08);--error-border: rgba(220, 38, 38, .3);--error-text: #b91c1c;--danger: #dc2626;--danger-bg: rgba(220, 38, 38, .08);--danger-border: rgba(220, 38, 38, .4);--danger-text: #b91c1c;--danger-hover-bg: rgba(220, 38, 38, .16)}}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;font-family:var(--font-label);background:var(--bg-primary);color:var(--text-primary);line-height:1.5;-webkit-font-smoothing:antialiased}#root{height:100%}code,pre,.mono{font-family:var(--font-code)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit;cursor:pointer}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap";._container_6jg7e_2{position:fixed;bottom:16px;right:16px;z-index:2000;display:flex;flex-direction:column-reverse;gap:8px;pointer-events:none}._toast_6jg7e_14{pointer-events:auto;padding:10px 16px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:13px;color:var(--text-primary);box-shadow:0 4px 12px #0000004d;animation:_slideIn_6jg7e_1 .25s ease-out;max-width:320px}@keyframes _slideIn_6jg7e_1{0%{opacity:0;transform:translate(40px)}to{opacity:1;transform:translate(0)}}._success_6jg7e_39{background:color-mix(in srgb,var(--success) 22%,transparent);border-left:3px solid var(--success)}._info_6jg7e_44{background:color-mix(in srgb,var(--accent) 22%,transparent);border-left:3px solid var(--accent)}._warning_6jg7e_49{background:color-mix(in srgb,var(--warning) 22%,transparent);border-left:3px solid var(--warning)}._error_6jg7e_54{background:var(--error-bg);border-left:3px solid var(--error-border)}._wrapper_6ij3d_2{display:inline-flex}._tooltip_6ij3d_11{position:fixed;background:var(--bg-card);border:1px solid var(--border);color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:400;line-height:1.5;padding:4px 8px;border-radius:4px;width:max-content;max-width:min(320px,calc(100vw - 32px));white-space:normal;overflow-wrap:anywhere;text-align:left;pointer-events:none;opacity:0;transition:opacity var(--transition);z-index:1000}._tooltipVisible_6ij3d_33{opacity:1}._widget_1q1ab_1{margin:8px 12px 4px;padding:12px;border:1px solid var(--pro-border);border-radius:var(--radius);background:var(--pro-bg-soft);display:flex;flex-direction:column;gap:10px}._header_1q1ab_12{display:flex;align-items:center;gap:8px}._sparkle_1q1ab_18{color:var(--pro-text);flex-shrink:0}._title_1q1ab_23{font-family:var(--font-label);font-size:12px;font-weight:600;color:var(--pro-text);line-height:1.3}._actions_1q1ab_31{display:flex;flex-direction:column;gap:8px}._cta_1q1ab_37,._licenseCta_1q1ab_38{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:var(--radius-sm);font-family:var(--font-label);font-size:12px;font-weight:700;text-decoration:none;transition:filter var(--transition),transform var(--transition)}._cta_1q1ab_37{background:var(--pro-badge);color:var(--pro-text-on-badge)}._licenseCta_1q1ab_38{border:1px solid var(--pro-border);background:color-mix(in srgb,var(--bg-card) 84%,var(--pro-bg-soft));color:var(--pro-text)}._cta_1q1ab_37:hover,._licenseCta_1q1ab_38:hover{filter:brightness(1.08);transform:translateY(-1px);text-decoration:none}._collapsedGroup_1q1ab_70{display:flex;flex-direction:column;gap:8px;margin:8px 0}._collapsed_1q1ab_70{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0 auto;border-radius:var(--radius-sm);background:var(--pro-bg-soft);color:var(--pro-text);text-decoration:none;transition:filter var(--transition)}._collapsedSecondary_1q1ab_91{border:1px solid var(--pro-border);background:transparent}._collapsed_1q1ab_70:hover{filter:brightness(1.15);text-decoration:none}._backdrop_1r5ey_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;display:grid;place-items:center;padding:24px;background:#0c1018b8}._dialog_1r5ey_11{width:min(560px,100%);max-height:min(720px,calc(100vh - 48px));overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--bg-overlay);box-shadow:0 24px 48px #0307126b}._header_1r5ey_21{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 20px 12px;border-bottom:1px solid var(--border)}._titleBlock_1r5ey_30{display:grid;gap:6px}._title_1r5ey_30{margin:0;color:var(--text-primary);font-size:18px;line-height:1.3}._subtitle_1r5ey_42{margin:0;color:var(--text-secondary);font-size:13px;line-height:1.5}._closeButton_1r5ey_49{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer}._closeButton_1r5ey_49:hover{color:var(--text-primary)}._body_1r5ey_67{display:grid;gap:16px;padding:18px 20px 20px}._statusBox_1r5ey_73,._errorBox_1r5ey_74{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--bg-secondary);color:var(--text-secondary);line-height:1.5}._errorBox_1r5ey_74{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}._spin_1r5ey_92{animation:_spin_1r5ey_92 1s linear infinite}@keyframes _spin_1r5ey_92{to{transform:rotate(360deg)}}._bundleBlock_1r5ey_102{display:grid;gap:8px}._label_1r5ey_107{color:var(--text-secondary);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}._bundleName_1r5ey_115{display:block;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-primary);font-size:13px;line-height:1.5;overflow-wrap:anywhere}._guidanceBox_1r5ey_127{display:grid;gap:8px;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--bg-secondary);color:var(--text-secondary);font-size:13px;line-height:1.5}._guidanceBox_1r5ey_127 p{margin:0}._includedList_1r5ey_143{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}._includedItem_1r5ey_152{max-width:100%;padding:5px 8px;border:1px solid var(--border);border-radius:999px;color:var(--text-secondary);background:var(--bg-secondary);font-size:12px;overflow-wrap:anywhere}._actions_1r5ey_163{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}._button_1r5ey_169,._primaryLink_1r5ey_170{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:8px;padding:9px 12px;font:inherit;font-size:13px;font-weight:600;text-align:center;text-decoration:none;color:var(--text-primary);background:var(--bg-secondary);cursor:pointer}._primaryLink_1r5ey_170{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._button_1r5ey_169:hover,._primaryLink_1r5ey_170:hover{color:var(--text-primary);text-decoration:none}._button_1r5ey_169:disabled{cursor:not-allowed;opacity:.6}._hint_1r5ey_206{margin:0;color:var(--text-secondary);font-size:12px;line-height:1.5}@media(max-width:560px){._backdrop_1r5ey_1{padding:12px}._actions_1r5ey_163{grid-template-columns:1fr}}._sidebar_19hyu_2{width:var(--sidebar-width);min-width:var(--sidebar-width);height:100%;display:flex;flex-direction:column;background:var(--bg-sidebar);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-right:1px solid var(--border);padding:0 0 16px;overflow:visible;transition:width var(--transition),min-width var(--transition)}._brand_19hyu_17{display:flex;align-items:center;gap:10px;min-height:var(--header-height);padding:0 16px;border-bottom:1px solid var(--border);margin-bottom:8px;flex-shrink:0}._brandIcon_19hyu_28{color:var(--accent);flex-shrink:0}._brandText_19hyu_33{font-family:var(--font-label);font-size:14px;font-weight:700;color:var(--text-primary);letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._brandTextPro_19hyu_44{color:var(--pro-text);text-shadow:0 0 18px rgba(212,167,44,.18)}._nav_19hyu_50{display:flex;flex-direction:column;gap:2px}._spacer_19hyu_57{flex:1;min-height:16px}._navLink_19hyu_63{display:flex;align-items:center;gap:12px;padding:10px 16px;color:var(--text-secondary);text-decoration:none;font-size:14px;font-weight:500;border-left:4px solid transparent;transition:color var(--transition),background var(--transition),border-color var(--transition)}._navLink_19hyu_63:hover{color:var(--text-primary);background:var(--accent-dim);text-decoration:none}._navLink_19hyu_63._active_19hyu_84{color:var(--accent);border-left-color:var(--accent);background:var(--accent-dim)}._navLink_19hyu_63._disabled_19hyu_91{color:var(--text-muted);pointer-events:none;cursor:default}._navLink_19hyu_63._disabled_19hyu_91:hover{background:transparent}._icon_19hyu_102{width:20px;height:20px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:currentColor}._label_19hyu_113{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._secondaryDivider_19hyu_120{height:1px;margin:4px 16px;background:var(--border)}._secondaryNav_19hyu_127,._secondaryNavEntry_19hyu_134{display:flex;flex-direction:column;gap:2px}._secondaryItemDivider_19hyu_140{height:1px;margin:4px 16px;background:var(--border)}._helpDivider_19hyu_147{height:1px;margin:8px 16px 4px;background:var(--border)}._helpGroupTitle_19hyu_154{padding:4px 16px 6px;font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}._helpNav_19hyu_165{display:flex;flex-direction:column;gap:2px}._externalIcon_19hyu_172{margin-left:auto;display:inline-flex;align-items:center;color:var(--text-muted)}@media(max-width:768px){._sidebar_19hyu_2{width:var(--sidebar-collapsed);min-width:var(--sidebar-collapsed)}._brand_19hyu_17{justify-content:center;padding:0}._brandText_19hyu_33{display:none}._navLink_19hyu_63{justify-content:center;padding:10px 0;gap:0}._label_19hyu_113,._helpGroupTitle_19hyu_154,._externalIcon_19hyu_172{display:none}}._header_1do17_2{display:flex;flex-direction:column;justify-content:center;gap:6px;height:var(--header-height);padding:10px 24px;border-bottom:1px solid var(--border);background:var(--bg-card);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);flex-shrink:0;overflow:hidden}._row1_1do17_17{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0}._contextGroups_1do17_25{display:flex;align-items:stretch;gap:18px;min-width:0;flex:1}._projectGroup_1do17_33,._studioGroup_1do17_34{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0}._projectGroup_1do17_33{flex:1 1 44%;padding-right:18px;border-right:1px solid var(--border)}._studioGroup_1do17_34{flex:1 1 52%}._groupTitleRow_1do17_52{display:flex;align-items:center;gap:8px;min-width:0}._groupLabel_1do17_59{display:inline-flex;align-items:center;gap:5px;color:var(--text-muted);font-family:var(--font-label);font-size:10px;font-weight:700;letter-spacing:.06em;line-height:1;text-transform:uppercase;white-space:nowrap}._groupIcon_1do17_73{color:var(--accent);flex-shrink:0}._projectName_1do17_78{margin:0;font-size:15px;font-weight:700;color:var(--text-primary);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:clamp(120px,24vw,320px)}._placeChips_1do17_90{display:flex;gap:6px;flex-wrap:wrap;min-width:0;max-height:24px;overflow:hidden}._metaActions_1do17_99{display:flex;align-items:center;gap:8px;flex-shrink:0}._placeChip_1do17_90{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--bg-overlay);color:var(--text-secondary);font-size:12px;font-weight:600;line-height:1.4;cursor:default}._placeChipStatic_1do17_122,._placeChipMuted_1do17_123{cursor:default}._placeChipActive_1do17_127{border-color:var(--border-highlight);color:var(--text-primary);background:var(--accent-dim);box-shadow:0 0 0 1px var(--accent-glow) inset}._placeChipInactive_1do17_134{border-color:var(--border);color:var(--text-muted);opacity:.85}._placeChipMuted_1do17_123{border-color:var(--border);color:var(--text-muted)}._placeChipId_1do17_145{font-family:var(--font-code);font-weight:500;font-size:11px;color:var(--text-muted);padding-left:6px;margin-left:2px;border-left:1px solid var(--border)}._placeChipActive_1do17_127 ._placeChipId_1do17_145{color:var(--text-secondary);border-left-color:var(--border-highlight)}._placeChipClient_1do17_160{font-family:var(--font-code);font-size:11px;color:var(--text-muted)}._placeChipState_1do17_166{font-size:10px;color:var(--text-secondary);text-transform:lowercase}._placeChipBadge_1do17_172{font-size:10px;color:var(--text-secondary);border:1px solid var(--border);border-radius:var(--radius-sm);padding:1px 5px}._placeDot_1do17_180{width:7px;height:7px;border-radius:var(--radius-pill);background:var(--success);box-shadow:0 0 6px var(--success)}._placeChipName_1do17_188{white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}._row2_1do17_196{display:flex;align-items:center;height:18px;min-width:0;flex-shrink:0}._row2_1do17_196[data-state=empty]{pointer-events:none}._pathRow_1do17_208,._auxiliaryPath_1do17_209{display:flex;align-items:center;gap:8px;min-width:0;flex:1}._auxiliaryPath_1do17_209{width:100%}._pathLabel_1do17_221{color:var(--text-muted);font-family:var(--font-label);font-size:10px;font-weight:700;letter-spacing:.04em;line-height:1;text-transform:uppercase;white-space:nowrap}._projectPath_1do17_232{font-family:var(--font-code);font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}._changeButton_1do17_242{display:inline-flex;align-items:center;justify-content:center;height:26px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-overlay);color:var(--text-primary);font:inherit;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;text-decoration:none;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._changeButton_1do17_242:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent)}._changeButton_1do17_242:disabled{cursor:not-allowed;opacity:.52}._iconButton_1do17_276{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-overlay);color:var(--text-primary);text-decoration:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._iconButton_1do17_276:hover{border-color:var(--border-highlight);background:var(--accent-dim);color:var(--accent);text-decoration:none}._iconButton_1do17_276:focus-visible{outline:none;box-shadow:var(--focus-ring)}._notificationDot_1do17_306{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:var(--radius-pill);background:var(--error);box-shadow:0 0 0 2px var(--bg-overlay)}@media(max-width:768px){._header_1do17_2{padding:10px 16px;height:auto;min-height:var(--header-height)}._row1_1do17_17{align-items:flex-start;gap:8px}._contextGroups_1do17_25{flex-direction:column;gap:8px}._projectGroup_1do17_33{padding-right:0;border-right:none}._groupTitleRow_1do17_52{flex-wrap:wrap}._placeChips_1do17_90{max-height:none}._row2_1do17_196,._auxiliaryPath_1do17_209{width:100%}}._bellWrapper_tae21_2{position:relative;display:inline-flex}._unreadDot_tae21_8{position:absolute;top:4px;right:4px;width:8px;height:8px;border-radius:50%;background:var(--error);border:2px solid var(--bg-card);pointer-events:none}._guide_42h5y_1{width:min(100%,980px);box-sizing:border-box;margin:0 0 18px;padding:16px 18px;border:1px solid color-mix(in srgb,var(--accent) 32%,var(--border));border-radius:var(--radius);background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 10%,transparent),transparent 58%),var(--bg-card);box-shadow:inset 3px 0 color-mix(in srgb,var(--accent) 74%,white 4%)}._headingRow_42h5y_14,._bodyRow_42h5y_15,._actionRow_42h5y_16{display:flex;align-items:center}._headingRow_42h5y_14{justify-content:space-between;gap:16px}._headingCopy_42h5y_26{display:grid;gap:3px;min-width:0}._eyebrow_42h5y_32{color:var(--accent);font-family:var(--font-label);font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._headingCopy_42h5y_26 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:16px;font-weight:650;line-height:1.4}._closeButton_42h5y_50{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:44px;height:44px;margin:-10px -10px -10px 0;border:1px solid transparent;border-radius:var(--radius-control);background:transparent;color:var(--text-muted);font-size:21px;cursor:pointer}._closeButton_42h5y_50:hover:not(:disabled){border-color:var(--border);background:var(--accent-dim);color:var(--text-primary)}._closeButton_42h5y_50:focus-visible,._primaryButton_42h5y_73:focus-visible,._secondaryButton_42h5y_74:focus-visible,._linkButton_42h5y_75:focus-visible{outline:none;box-shadow:var(--focus-ring)}._bodyRow_42h5y_15{align-items:flex-start;justify-content:space-between;gap:20px;margin-top:10px}._message_42h5y_87{display:grid;gap:4px;min-width:0}._message_42h5y_87 p{margin:0;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;line-height:1.55}._statusBadge_42h5y_101{flex:0 0 auto;min-height:22px;padding:2px 8px;border:1px solid color-mix(in srgb,var(--accent) 46%,var(--border));border-radius:var(--radius-control);background:var(--accent-dim);color:var(--accent);font-family:var(--font-code);font-size:11px;line-height:18px}._actionRow_42h5y_16{flex-wrap:wrap;gap:8px;margin-top:14px}._primaryButton_42h5y_73,._secondaryButton_42h5y_74,._linkButton_42h5y_75{min-height:44px;padding:0 13px;border-radius:var(--radius-control);font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer}._primaryButton_42h5y_73{border:1px solid var(--accent);background:var(--accent);color:var(--button-primary-text)}._secondaryButton_42h5y_74,._linkButton_42h5y_75{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary)}._linkButton_42h5y_75{border-color:transparent;background:transparent;color:var(--accent)}._primaryButton_42h5y_73:hover:not(:disabled){background:var(--accent-hover)}._secondaryButton_42h5y_74:hover:not(:disabled),._linkButton_42h5y_75:hover:not(:disabled){border-color:var(--accent);color:var(--text-primary)}._closeButton_42h5y_50:disabled,._primaryButton_42h5y_73:disabled,._secondaryButton_42h5y_74:disabled,._linkButton_42h5y_75:disabled{cursor:default;opacity:.55}._feedback_42h5y_169{min-height:18px;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;line-height:1.5}._feedbackError_42h5y_177{color:var(--error)}@media(max-width:640px){._guide_42h5y_1{padding:14px 14px 16px}._bodyRow_42h5y_15{flex-direction:column;gap:10px}._actionRow_42h5y_16{align-items:stretch}._primaryButton_42h5y_73,._secondaryButton_42h5y_74,._linkButton_42h5y_75{flex:1 1 100%;width:100%}._feedback_42h5y_169{flex-basis:100%}}._layout_19mmz_2{display:flex;height:100%;overflow:hidden}._mainShell_19mmz_8{flex:1;min-width:0;display:flex;flex-direction:column;overflow:visible}._content_19mmz_17{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-gutter:stable;padding:24px}._loading_19mmz_26{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-muted);font-size:14px}:root{--bg-primary: #0b0e1a;--bg-secondary: #0f1525;--bg-card: #111827;--bg-sidebar: rgba(11, 14, 26, .95);--bg-overlay: rgba(15, 21, 37, .88);--text-primary: #e2e8f0;--text-secondary: #94a3b8;--text-muted: #475569;--border: #1e293b;--border-highlight: #2563eb;--accent: #3b82f6;--accent-dim: rgba(59, 130, 246, .12);--accent-glow: rgba(59, 130, 246, .25);--accent-hover: #60a5fa;--button-primary-text: #ffffff;--pro-badge: #d4a72c;--pro-text: #f3d46b;--pro-text-on-badge: #1a1407;--pro-bg: #3a2d12;--pro-bg-soft: rgba(212, 167, 44, .12);--pro-border: #8f6f1f;--success: #22c55e;--success-bg: rgba(34, 197, 94, .14);--success-border: rgba(34, 197, 94, .5);--success-text: #86efac;--warning: #f59e0b;--warning-bg: rgba(245, 158, 11, .14);--warning-border: rgba(245, 158, 11, .5);--warning-text: #fcd34d;--info: #60a5fa;--info-bg: rgba(96, 165, 250, .14);--info-border: rgba(96, 165, 250, .5);--info-text: #93c5fd;--error: #ef4444;--error-bg: rgba(239, 68, 68, .12);--error-border: rgba(239, 68, 68, .5);--error-text: #f4c1c1;--danger: #d15454;--danger-bg: rgba(209, 84, 84, .12);--danger-border: rgba(209, 84, 84, .5);--danger-text: #f4c1c1;--danger-hover-bg: rgba(209, 84, 84, .2);--diff-add: var(--success);--diff-add-bg: var(--success-bg);--diff-add-text: var(--success-text);--diff-remove: var(--error);--diff-remove-bg: var(--error-bg);--diff-remove-text: var(--error-text);--diff-update: var(--warning);--diff-update-bg: var(--warning-bg);--diff-update-text: var(--warning-text);--diff-rename: var(--info);--diff-rename-bg: var(--info-bg);--diff-rename-text: var(--info-text);--font-code: "JetBrains Mono", "Fira Code", monospace;--font-label: "Inter", "DM Sans", -apple-system, sans-serif;--sidebar-width: 220px;--sidebar-collapsed: 56px;--header-height: 96px;--content-max: 1080px;--content-gap: 16px;--radius: 8px;--radius-control: 6px;--radius-sm: 6px;--radius-pill: 999px;--transition: .2s ease;--focus-ring: 0 0 0 3px var(--accent-glow)}@media(prefers-color-scheme:light){:root{--bg-primary: #f1f5f9;--bg-secondary: #ffffff;--bg-card: #ffffff;--bg-sidebar: rgba(255, 255, 255, .95);--bg-overlay: rgba(255, 255, 255, .95);--text-primary: #0f172a;--text-secondary: #475569;--text-muted: #94a3b8;--border: #e2e8f0;--border-highlight: #3b82f6;--accent: #2563eb;--accent-dim: rgba(37, 99, 235, .08);--accent-glow: rgba(37, 99, 235, .15);--accent-hover: #1d4ed8;--button-primary-text: #ffffff;--pro-badge: #b07c00;--pro-text: #8a5f00;--pro-text-on-badge: #1a1407;--pro-bg: #fff4d6;--pro-bg-soft: rgba(176, 124, 0, .12);--pro-border: #d9b14d;--success: #16a34a;--success-bg: rgba(22, 163, 74, .1);--success-border: rgba(22, 163, 74, .4);--success-text: #166534;--warning: #d97706;--warning-bg: rgba(217, 119, 6, .1);--warning-border: rgba(217, 119, 6, .4);--warning-text: #92400e;--info: #2563eb;--info-bg: rgba(37, 99, 235, .1);--info-border: rgba(37, 99, 235, .4);--info-text: #1d4ed8;--error: #dc2626;--error-bg: rgba(220, 38, 38, .08);--error-border: rgba(220, 38, 38, .3);--error-text: #b91c1c;--danger: #dc2626;--danger-bg: rgba(220, 38, 38, .08);--danger-border: rgba(220, 38, 38, .4);--danger-text: #b91c1c;--danger-hover-bg: rgba(220, 38, 38, .16)}}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;font-family:var(--font-label);background:var(--bg-primary);color:var(--text-primary);line-height:1.5;-webkit-font-smoothing:antialiased}#root{height:100%}code,pre,.mono{font-family:var(--font-code)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit;cursor:pointer}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
|