forge-openclaw-plugin 0.3.3 → 0.3.4

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.
Files changed (121) hide show
  1. package/dist/assets/{action-bar-5Ii4UzHa.js → action-bar-CMGr_Uv_.js} +1 -1
  2. package/dist/assets/{activity-page-CWjTKFY3.js → activity-page-DwGKkJtr.js} +1 -1
  3. package/dist/assets/{ai-surface-workspace-Dd2FSRom.js → ai-surface-workspace-UtnoNmjq.js} +1 -1
  4. package/dist/assets/{atlas-panel-Dinteouh.js → atlas-panel-f1kc-LkD.js} +1 -1
  5. package/dist/assets/{calendar-page-BWkXhzDf.js → calendar-page-C4YqeVrC.js} +1 -1
  6. package/dist/assets/{calendar-rules-CjyuTu2I.js → calendar-rules-BQppCPiN.js} +1 -1
  7. package/dist/assets/{calendar-week-toolbar-D-nd9tkk.js → calendar-week-toolbar-DdPuHUwd.js} +1 -1
  8. package/dist/assets/{companion-sync-lab-page-G0t1TqqZ.js → companion-sync-lab-page-N3cR33GS.js} +1 -1
  9. package/dist/assets/{daily-metrics-dashboard-DpIAdzFX.js → daily-metrics-dashboard-CXnAtN2T.js} +1 -1
  10. package/dist/assets/{define-workbench-box-BIOZopF2.js → define-workbench-box-DkffygDU.js} +1 -1
  11. package/dist/assets/{entity-link-multiselect-DZZjpL_d.js → entity-link-multiselect-wuyJ8BbW.js} +1 -1
  12. package/dist/assets/{entity-note-count-link-CmRRdXAr.js → entity-note-count-link-CEtKyMAl.js} +1 -1
  13. package/dist/assets/{entity-notes-surface-8MPDscsu.js → entity-notes-surface-iKNiierJ.js} +1 -1
  14. package/dist/assets/{execution-board-Bi8gi8J6.js → execution-board-DesFZ1f5.js} +1 -1
  15. package/dist/assets/{faceted-token-search-BGs4TqxT.js → faceted-token-search-D4Okr-Kr.js} +1 -1
  16. package/dist/assets/{flagship-signal-deck-jLxHEHvb.js → flagship-signal-deck-CW91n6u9.js} +1 -1
  17. package/dist/assets/{floating-action-menu-Itpm7T2_.js → floating-action-menu-GCeuOdYZ.js} +1 -1
  18. package/dist/assets/{generic-node-view-KePoUF3Z.js → generic-node-view-COhU_Wm3.js} +1 -1
  19. package/dist/assets/{goal-detail-page-a1lEswpJ.js → goal-detail-page-Bd8JU3IK.js} +1 -1
  20. package/dist/assets/{goal-dialog-CYgRzl4y.js → goal-dialog-CLz5fYhO.js} +1 -1
  21. package/dist/assets/{goals-page-JY_EJq9U.js → goals-page-CZHNVyY-.js} +1 -1
  22. package/dist/assets/{habits-page-BRI8AoaQ.js → habits-page-CXiBB7_N.js} +1 -1
  23. package/dist/assets/{health-boxes-DZJOFTOI.js → health-boxes-BUcsxDLh.js} +1 -1
  24. package/dist/assets/{index-wEZUnRh0.js → index-BejvcRGb.js} +2 -2
  25. package/dist/assets/{index-Bcem7l5u.css → index-CEgIwgk9.css} +1 -1
  26. package/dist/assets/{inline-note-fields-CUVRzQkI.js → inline-note-fields-CcRDO3pd.js} +1 -1
  27. package/dist/assets/{insight-flow-dialog-By73oG1H.js → insight-flow-dialog-DUBk2MR8.js} +1 -1
  28. package/dist/assets/{insights-page-DLyN-9yz.js → insights-page-8fLhCYsM.js} +1 -1
  29. package/dist/assets/{kanban-boxes-M71CejV4.js → kanban-boxes-CH7plRk1.js} +1 -1
  30. package/dist/assets/{kanban-page-InKHhJQD.js → kanban-page-Bq-aYwUL.js} +1 -1
  31. package/dist/assets/{knowledge-graph-page-C-GEQGRY.js → knowledge-graph-page-DYFfWh4Y.js} +1 -1
  32. package/dist/assets/{life-force-page-Dq88NzNp.js → life-force-page-D80rgBBR.js} +1 -1
  33. package/dist/assets/{life-force-workspace-Bl_0slZi.js → life-force-workspace-CcmZRRfU.js} +1 -1
  34. package/dist/assets/{metric-tile-yQJgjYrN.js → metric-tile-DysHMgM3.js} +1 -1
  35. package/dist/assets/{movement-boxes-C-rc3N8Z.js → movement-boxes-BH3botKt.js} +1 -1
  36. package/dist/assets/{movement-page-DK-d1uYa.js → movement-page-D5KLMKS9.js} +1 -1
  37. package/dist/assets/{note-markdown-7czv-KMH.js → note-markdown-Byd_vNkS.js} +1 -1
  38. package/dist/assets/{note-tags-input-CkgkqiT3.js → note-tags-input-DYAFDq8Q.js} +1 -1
  39. package/dist/assets/{notes-boxes-BQuR1MiB.js → notes-boxes-CPiPps1e.js} +1 -1
  40. package/dist/assets/{notes-page-ec9g1mPh.js → notes-page-DehVrOOb.js} +1 -1
  41. package/dist/assets/{open-in-graph-button-B_4fdm4l.js → open-in-graph-button-L21MKsb5.js} +1 -1
  42. package/dist/assets/{orbit-map-DPQNBqS-.js → orbit-map-ChJOQ8CN.js} +1 -1
  43. package/dist/assets/{overview-page-CZjMab2o.js → overview-page-D_ewyeWF.js} +1 -1
  44. package/dist/assets/{page-hero-BRcqE3a4.js → page-hero-DlHEJ0Yt.js} +1 -1
  45. package/dist/assets/{pill-cluster-dy6jG_dV.js → pill-cluster-DhOR4m7X.js} +1 -1
  46. package/dist/assets/{preference-entity-handoff-button-DOV-_2Vm.js → preference-entity-handoff-button-ugHU2us9.js} +1 -1
  47. package/dist/assets/{preferences-page-Co8w5hzp.js → preferences-page-BTTXeSDR.js} +1 -1
  48. package/dist/assets/{project-collections-DNgKleDl.js → project-collections-USb6PUe0.js} +1 -1
  49. package/dist/assets/{project-detail-page-C-Ib1x8w.js → project-detail-page-1tD6tUsB.js} +1 -1
  50. package/dist/assets/{project-dialog-D_hgOdB9.js → project-dialog-BaHhJqP6.js} +1 -1
  51. package/dist/assets/{project-management-hierarchy-page-asf61KSz.js → project-management-hierarchy-page-D4HV8QXs.js} +1 -1
  52. package/dist/assets/{project-management-section-nav-DAZA1oXG.js → project-management-section-nav-9OV6_ifH.js} +1 -1
  53. package/dist/assets/{projects-boxes-CHLr1Bs-.js → projects-boxes-AyudWls3.js} +1 -1
  54. package/dist/assets/{projects-page-BsM8yCqQ.js → projects-page-DizVVzbt.js} +1 -1
  55. package/dist/assets/{psyche-behaviors-page-COSZeP4J.js → psyche-behaviors-page-CX5MJjWj.js} +1 -1
  56. package/dist/assets/{psyche-flashcards-page-CJmgGL9x.js → psyche-flashcards-page-DzCGy-FV.js} +1 -1
  57. package/dist/assets/{psyche-goal-map-page-avrWNSs9.js → psyche-goal-map-page-BcKR792E.js} +1 -1
  58. package/dist/assets/{psyche-graph-BmwbnNBY.js → psyche-graph-BNllZR67.js} +1 -1
  59. package/dist/assets/{psyche-metrics-page-CY0J_aMx.js → psyche-metrics-page-CpEKlZLO.js} +1 -1
  60. package/dist/assets/{psyche-mode-guide-page-COcswIHZ.js → psyche-mode-guide-page-DXKSE2o7.js} +1 -1
  61. package/dist/assets/{psyche-modes-page-BXF_GZoP.js → psyche-modes-page-Bh6eeNm1.js} +1 -1
  62. package/dist/assets/{psyche-page-VsMBNG1F.js → psyche-page-B44RJrrC.js} +1 -1
  63. package/dist/assets/{psyche-patterns-page-DVoIro0Q.js → psyche-patterns-page-Bm7T5FMJ.js} +1 -1
  64. package/dist/assets/{psyche-questionnaire-builder-page-CahcrbQj.js → psyche-questionnaire-builder-page-BNtMNjY8.js} +1 -1
  65. package/dist/assets/{psyche-questionnaire-detail-page-CYSgADAD.js → psyche-questionnaire-detail-page-BnMXErRK.js} +1 -1
  66. package/dist/assets/{psyche-questionnaire-run-detail-page-D5q5URTu.js → psyche-questionnaire-run-detail-page-CWKxbdwZ.js} +1 -1
  67. package/dist/assets/{psyche-questionnaire-run-page-DUoA-VSs.js → psyche-questionnaire-run-page-DwH7Sk52.js} +1 -1
  68. package/dist/assets/{psyche-questionnaires-page-dbQlqbKh.js → psyche-questionnaires-page-B1t_a8QU.js} +1 -1
  69. package/dist/assets/{psyche-report-detail-page-D_Mmlf2D.js → psyche-report-detail-page-x2AtC99e.js} +1 -1
  70. package/dist/assets/{psyche-reports-page-CO3J4Js3.js → psyche-reports-page-KiwCgWPa.js} +1 -1
  71. package/dist/assets/{psyche-schemas-beliefs-page-BUNGL4zW.js → psyche-schemas-beliefs-page-CIEoAJAp.js} +1 -1
  72. package/dist/assets/{psyche-screen-time-page-Bm18uHDg.js → psyche-screen-time-page-DO6UycL9.js} +1 -1
  73. package/dist/assets/{psyche-self-observation-page-VdPMBuK4.js → psyche-self-observation-page-CPcpUSdm.js} +1 -1
  74. package/dist/assets/{psyche-values-page-DivSQodJ.js → psyche-values-page-BAgNeo4L.js} +1 -1
  75. package/dist/assets/{question-flow-dialog-Dsnsc8be.js → question-flow-dialog-BByFV8Yw.js} +1 -1
  76. package/dist/assets/{report-chain-fields-Bf-WCSJQ.js → report-chain-fields-BpRWMp7h.js} +1 -1
  77. package/dist/assets/{rewards-page-CI53Cp0i.js → rewards-page-kIiX8SHn.js} +1 -1
  78. package/dist/assets/{scheduling-rules-editor-Bg3QU_qt.js → scheduling-rules-editor-oQXGcL5l.js} +1 -1
  79. package/dist/assets/{schema-badge-CRThEDqP.js → schema-badge-BoNjw3h4.js} +1 -1
  80. package/dist/assets/{schemas-B8-kIOFQ.js → schemas-IBbtdPzn.js} +1 -1
  81. package/dist/assets/{select-menu-rT3Qd5t5.js → select-menu-U-YryCwP.js} +1 -1
  82. package/dist/assets/{settings-agents-page-VDUv2WuO.js → settings-agents-page-CbHeMq3e.js} +1 -1
  83. package/dist/assets/{settings-bin-page-DfuGJVqc.js → settings-bin-page-LxS2YPsA.js} +1 -1
  84. package/dist/assets/{settings-calendar-page-ex7eHB1y.js → settings-calendar-page-CZc-I-HK.js} +1 -1
  85. package/dist/assets/{settings-data-page-BPWyPVGo.js → settings-data-page-m-aBRMR9.js} +1 -1
  86. package/dist/assets/{settings-logs-page-CwTT4n63.js → settings-logs-page-BUEGWlQu.js} +1 -1
  87. package/dist/assets/{settings-mobile-page-B6sVk872.js → settings-mobile-page-C_5CHjHl.js} +1 -1
  88. package/dist/assets/{settings-models-page-Dq5XViZd.js → settings-models-page-B4HQu8kL.js} +1 -1
  89. package/dist/assets/{settings-page-BRxdAxbS.js → settings-page-CY8N-fNV.js} +1 -1
  90. package/dist/assets/{settings-rewards-page-DRvxTwv3.js → settings-rewards-page-C0XQoWjb.js} +1 -1
  91. package/dist/assets/{settings-section-nav-D_vKvOWd.js → settings-section-nav-CkqqtM0F.js} +1 -1
  92. package/dist/assets/{settings-users-page-B6oSpOaV.js → settings-users-page-COCBOq7d.js} +1 -1
  93. package/dist/assets/{settings-wiki-page-Bkv-SS3J.js → settings-wiki-page-Dy1d7-z-.js} +1 -1
  94. package/dist/assets/{sleep-page-DELXxo6j.js → sleep-page-1kKicdFq.js} +1 -1
  95. package/dist/assets/{sports-page-ByWQL0Gf.js → sports-page-DJErRii_.js} +1 -1
  96. package/dist/assets/{strategies-page-PuUHsaSJ.js → strategies-page-CWNFb9vv.js} +1 -1
  97. package/dist/assets/{strategy-detail-page-CSyVdv29.js → strategy-detail-page-D9rFVXRS.js} +1 -1
  98. package/dist/assets/{strategy-dialog-Fgpc0z1M.js → strategy-dialog-BIVHfUR6.js} +1 -1
  99. package/dist/assets/{surface-DzVqQDmf.js → surface-B3oXO1No.js} +1 -1
  100. package/dist/assets/{task-detail-page-BoLvJ_4F.js → task-detail-page-r8ipOpAF.js} +1 -1
  101. package/dist/assets/{task-dialog-B2cGkhLk.js → task-dialog-C3kkWtcT.js} +1 -1
  102. package/dist/assets/{timebox-planning-dialog-BjiC2jh0.js → timebox-planning-dialog-BadS5tEr.js} +1 -1
  103. package/dist/assets/{today-boxes-B4f4sBXg.js → today-boxes-CiccN0Gw.js} +1 -1
  104. package/dist/assets/{today-page-Cusp2JI8.js → today-page-DvQredbl.js} +1 -1
  105. package/dist/assets/{training-load-page-CsZbK6rY.js → training-load-page-CkX-nSoe.js} +1 -1
  106. package/dist/assets/{user-badge-CQygGKVs.js → user-badge-BKzwGZDd.js} +1 -1
  107. package/dist/assets/{utility-widgets-DRESNarT.js → utility-widgets-DvxKA6dI.js} +1 -1
  108. package/dist/assets/{vitals-page-BlTZ4f78.js → vitals-page-CRIsr_C7.js} +1 -1
  109. package/dist/assets/{weekly-review-page-3Pk3NeGE.js → weekly-review-page-CNqxLRCd.js} +1 -1
  110. package/dist/assets/{weight-loss-page-CRCtv1fX.js → weight-loss-page-SSsCp1Yw.js} +3 -3
  111. package/dist/assets/{wiki-article-markdown-D0PWvioX.js → wiki-article-markdown-C9VKineE.js} +1 -1
  112. package/dist/assets/{wiki-editor-page-OZMYUgFo.js → wiki-editor-page-DxGsKvF7.js} +1 -1
  113. package/dist/assets/{wiki-ingest-history-page-DXZHzAqU.js → wiki-ingest-history-page-CFmP7K1F.js} +1 -1
  114. package/dist/assets/{wiki-ingest-modal-Ro0V4UMB.js → wiki-ingest-modal-BLw2PSWP.js} +1 -1
  115. package/dist/assets/{wiki-page-B1g3Rfxy.js → wiki-page-BiQ-jAuz.js} +1 -1
  116. package/dist/assets/{workbench-flow-page-qh5nItU6.js → workbench-flow-page-D960hXu_.js} +1 -1
  117. package/dist/assets/{workbench-page-CFWfAYMV.js → workbench-page-BWlY-FiL.js} +1 -1
  118. package/dist/assets/{workout-detail-page-Cw6t6Xj9.js → workout-detail-page-G32yJoE9.js} +1 -1
  119. package/dist/index.html +2 -2
  120. package/openclaw.plugin.json +1 -1
  121. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- import{r as c,j as e,b8 as P,cW as T,aV as L,cX as Q,cN as U,aS as v,cm as $}from"./vendor-Cpmju3nw.js";import{j as E,k as N}from"./state-BtwEvpO6.js";import{c as w,aa as z,cl as O}from"./index-wEZUnRh0.js";import{c as f,a as u,n as m,m as j,j as g}from"./generic-node-view-KePoUF3Z.js";function R(t){const i=new Date(t.getFullYear(),t.getMonth(),1),r=(i.getDay()+6)%7,n=new Date(i);return n.setDate(n.getDate()-r),Array.from({length:35},(a,s)=>{const l=new Date(n);return l.setDate(n.getDate()+s),l})}function _(t,i){return typeof window>"u"?i:window.localStorage.getItem(t)??i}function A(t,i){typeof window>"u"||window.localStorage.setItem(t,i)}function C({compact:t}){const[i,r]=c.useState(()=>new Date);return c.useEffect(()=>{const n=window.setInterval(()=>r(new Date),3e4);return()=>window.clearInterval(n)},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/45",children:[e.jsx(P,{className:"size-4"}),e.jsx("span",{className:"text-[12px] uppercase tracking-[0.16em]",children:"Local time"})]}),e.jsx("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(i)}),e.jsx("div",{className:"text-sm text-white/58",children:new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(i)})]})}function W({compact:t}){const i=new Date,r=c.useMemo(()=>R(i),[i]),n=t?["M","T","W","T","F","S","S"]:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return e.jsxs("div",{className:"grid gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white",children:[e.jsx(L,{className:"size-4 text-[var(--primary)]"}),new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}).format(i)]}),e.jsx("div",{className:"text-[12px] text-white/45",children:t?"Mini":"Month view"})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1.5",children:[n.map(a=>e.jsx("div",{className:"text-center text-[11px] uppercase tracking-[0.14em] text-white/35",children:a},a)),r.map(a=>{const s=a.getMonth()===i.getMonth(),l=a.toDateString()===i.toDateString();return e.jsx("div",{className:w("flex min-h-9 items-center justify-center rounded-xl text-sm",l?"bg-[var(--primary)] text-slate-950":s?"bg-white/[0.04] text-white/78":"bg-transparent text-white/24"),children:a.getDate()},a.toISOString())})]})]})}function D({surfaceId:t}){const i=`forge.utility.spotify.${t}`,[r,n]=c.useState(()=>_(i,"https://open.spotify.com/"));return c.useEffect(()=>{A(i,r)},[i,r]),e.jsxs("div",{className:"grid h-full gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Q,{className:"size-4 text-[var(--secondary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Spotify link"})]}),e.jsx("input",{value:r,onChange:a=>n(a.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Paste a playlist, album, or artist URL"}),e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(78,222,163,0.14)] px-3 py-2 text-sm font-medium text-[var(--secondary)] transition hover:bg-[rgba(78,222,163,0.22)]",children:["Open Spotify",e.jsx(U,{className:"size-4"})]})]})}function F({compact:t}){const[i,r]=c.useState(null),[n,a]=c.useState("Locating…");return c.useEffect(()=>{if(typeof navigator>"u"||!navigator.geolocation){a("Location unavailable");return}let s=!1;return navigator.geolocation.getCurrentPosition(async l=>{try{const p=await(await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${l.coords.latitude}&longitude=${l.coords.longitude}&current=temperature_2m,weather_code`)).json();if(s||!p.current)return;r({temperature:Number(p.current.temperature_2m??0),weatherCode:Number(p.current.weather_code??0)}),a("Live")}catch{s||a("Weather unavailable")}},()=>{s||a("Permission denied")},{maximumAge:3e5,timeout:6e3}),()=>{s=!0}},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(T,{className:"size-4 text-[var(--tertiary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Weather"})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:[Math.round(i.temperature),"°"]}),e.jsxs("div",{className:"text-sm text-white/58",children:["Code ",i.weatherCode," · ",n]})]}):e.jsx("div",{className:"text-sm text-white/58",children:n})]})}function I({compact:t,defaultUserId:i}){const r=E(),n=c.useRef(null),a=c.useRef(null),[s,l]=c.useState(""),[d,p]=c.useState(""),k=N({mutationFn:async()=>z({contentMarkdown:`# ${s.trim()||"Quick note"}
1
+ import{r as c,j as e,b8 as P,cW as T,aV as L,cX as Q,cN as U,aS as v,cm as $}from"./vendor-Cpmju3nw.js";import{j as E,k as N}from"./state-BtwEvpO6.js";import{c as w,aa as z,cl as O}from"./index-BejvcRGb.js";import{c as f,a as u,n as m,m as j,j as g}from"./generic-node-view-COhU_Wm3.js";function R(t){const i=new Date(t.getFullYear(),t.getMonth(),1),r=(i.getDay()+6)%7,n=new Date(i);return n.setDate(n.getDate()-r),Array.from({length:35},(a,s)=>{const l=new Date(n);return l.setDate(n.getDate()+s),l})}function _(t,i){return typeof window>"u"?i:window.localStorage.getItem(t)??i}function A(t,i){typeof window>"u"||window.localStorage.setItem(t,i)}function C({compact:t}){const[i,r]=c.useState(()=>new Date);return c.useEffect(()=>{const n=window.setInterval(()=>r(new Date),3e4);return()=>window.clearInterval(n)},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/45",children:[e.jsx(P,{className:"size-4"}),e.jsx("span",{className:"text-[12px] uppercase tracking-[0.16em]",children:"Local time"})]}),e.jsx("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(i)}),e.jsx("div",{className:"text-sm text-white/58",children:new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(i)})]})}function W({compact:t}){const i=new Date,r=c.useMemo(()=>R(i),[i]),n=t?["M","T","W","T","F","S","S"]:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return e.jsxs("div",{className:"grid gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white",children:[e.jsx(L,{className:"size-4 text-[var(--primary)]"}),new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}).format(i)]}),e.jsx("div",{className:"text-[12px] text-white/45",children:t?"Mini":"Month view"})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1.5",children:[n.map(a=>e.jsx("div",{className:"text-center text-[11px] uppercase tracking-[0.14em] text-white/35",children:a},a)),r.map(a=>{const s=a.getMonth()===i.getMonth(),l=a.toDateString()===i.toDateString();return e.jsx("div",{className:w("flex min-h-9 items-center justify-center rounded-xl text-sm",l?"bg-[var(--primary)] text-slate-950":s?"bg-white/[0.04] text-white/78":"bg-transparent text-white/24"),children:a.getDate()},a.toISOString())})]})]})}function D({surfaceId:t}){const i=`forge.utility.spotify.${t}`,[r,n]=c.useState(()=>_(i,"https://open.spotify.com/"));return c.useEffect(()=>{A(i,r)},[i,r]),e.jsxs("div",{className:"grid h-full gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Q,{className:"size-4 text-[var(--secondary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Spotify link"})]}),e.jsx("input",{value:r,onChange:a=>n(a.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Paste a playlist, album, or artist URL"}),e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(78,222,163,0.14)] px-3 py-2 text-sm font-medium text-[var(--secondary)] transition hover:bg-[rgba(78,222,163,0.22)]",children:["Open Spotify",e.jsx(U,{className:"size-4"})]})]})}function F({compact:t}){const[i,r]=c.useState(null),[n,a]=c.useState("Locating…");return c.useEffect(()=>{if(typeof navigator>"u"||!navigator.geolocation){a("Location unavailable");return}let s=!1;return navigator.geolocation.getCurrentPosition(async l=>{try{const p=await(await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${l.coords.latitude}&longitude=${l.coords.longitude}&current=temperature_2m,weather_code`)).json();if(s||!p.current)return;r({temperature:Number(p.current.temperature_2m??0),weatherCode:Number(p.current.weather_code??0)}),a("Live")}catch{s||a("Weather unavailable")}},()=>{s||a("Permission denied")},{maximumAge:3e5,timeout:6e3}),()=>{s=!0}},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(T,{className:"size-4 text-[var(--tertiary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Weather"})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:[Math.round(i.temperature),"°"]}),e.jsxs("div",{className:"text-sm text-white/58",children:["Code ",i.weatherCode," · ",n]})]}):e.jsx("div",{className:"text-sm text-white/58",children:n})]})}function I({compact:t,defaultUserId:i}){const r=E(),n=c.useRef(null),a=c.useRef(null),[s,l]=c.useState(""),[d,p]=c.useState(""),k=N({mutationFn:async()=>z({contentMarkdown:`# ${s.trim()||"Quick note"}
2
2
 
3
3
  ${d.trim()}`,author:"Forge quick capture",userId:i??null,links:[]}),onSuccess:async()=>{l(""),p(""),await r.invalidateQueries({queryKey:["notes-index"]})}}),S=N({mutationFn:async()=>O({title:s.trim()||"Quick capture",contentMarkdown:d.trim(),summary:d.trim().slice(0,180),author:"Forge quick capture"}),onSuccess:async()=>{l(""),p(""),await r.invalidateQueries({queryKey:["wiki-pages"]})}});function x(o,M=o){const h=a.current;if(!h)return;const y=h.selectionStart??0,b=h.selectionEnd??0,V=d.slice(y,b),q=`${d.slice(0,y)}${o}${V}${M}${d.slice(b)}`;p(q),requestAnimationFrame(()=>{h.focus(),h.selectionStart=y+o.length,h.selectionEnd=b+o.length})}return e.jsxs("div",{className:"grid h-full min-h-0 gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(v,{className:"size-4 text-[var(--primary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Quick capture"})]}),e.jsx("input",{ref:n,value:s,onChange:o=>l(o.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Title"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:[{label:"B",action:()=>x("**")},{label:"I",action:()=>x("_")},{label:"H1",action:()=>x("# ","")},{label:"[]",action:()=>x("- [ ] ","")}].map(o=>e.jsx("button",{type:"button",className:"inline-flex min-h-8 items-center justify-center rounded-xl bg-white/[0.05] px-2.5 text-[12px] font-semibold text-white/72 transition hover:bg-white/[0.08] hover:text-white",onClick:o.action,children:o.label},o.label))}),e.jsx("textarea",{ref:a,value:d,onChange:o=>p(o.target.value),className:w("min-h-0 w-full rounded-[20px] border border-white/10 bg-white/[0.04] px-3 py-3 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",t?"h-28":"h-40"),placeholder:"Write a quick note or rough wiki draft"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(192,193,255,0.16)] px-3 py-2 text-sm font-medium text-[var(--primary)] transition hover:bg-[rgba(192,193,255,0.24)] disabled:opacity-50",disabled:!d.trim()||k.isPending,onClick:()=>k.mutate(),children:[e.jsx($,{className:"size-4"}),"Save as note"]}),e.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(255,185,95,0.16)] px-3 py-2 text-sm font-medium text-[var(--tertiary)] transition hover:bg-[rgba(255,185,95,0.24)] disabled:opacity-50",disabled:!d.trim()||S.isPending,onClick:()=>S.mutate(),children:[e.jsx(v,{className:"size-4"}),"Save as wiki"]})]})]})}const K={id:"surface:utility:time",surfaceId:"utility",routePath:null,title:"Clock",icon:"timer",description:"Live local time widget.",category:"Utilities",tags:["utility","clock"],inputs:[],params:[],output:[u({label:"Current time",description:"Formatted local time string published by the clock widget."}),m({key:"clock",label:"Clock state",description:"Structured clock state including the current ISO timestamp.",modelName:"ForgeClockState"})],tools:[],NodeView:f({title:"Clock",description:"Live local time widget.",inputs:[],params:[],output:[u({label:"Current time",description:"Formatted local time string published by the clock widget."}),m({key:"clock",label:"Clock state",description:"Structured clock state including the current ISO timestamp.",modelName:"ForgeClockState"})],tools:[]}),WebView:C,execute:t=>g(t,{clock:{now:t.context.now}},new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(new Date(t.context.now)))};C.workbench=K;const G={id:"surface:utility:mini-calendar",surfaceId:"utility",routePath:null,title:"Mini calendar",icon:"calendar",description:"Compact month calendar widget.",category:"Utilities",tags:["utility","calendar"],inputs:[],params:[],output:[u({label:"Month view",description:"Summary of the compact month calendar widget."}),m({key:"calendarView",label:"Calendar view",description:"Structured mini-calendar state including the current month anchor.",modelName:"ForgeMiniCalendarView"})],tools:[],NodeView:f({title:"Mini calendar",description:"Compact month calendar widget.",inputs:[],params:[],output:[u({label:"Month view",description:"Summary of the compact month calendar widget."}),m({key:"calendarView",label:"Calendar view",description:"Structured mini-calendar state including the current month anchor.",modelName:"ForgeMiniCalendarView"})],tools:[]}),WebView:W,execute:t=>g(t,{calendarView:{now:t.context.now}},"Compact month calendar")};W.workbench=G;const B={id:"surface:utility:spotify",surfaceId:"utility",routePath:null,title:"Spotify",icon:"music",description:"Pinned music link widget.",category:"Utilities",tags:["utility","spotify"],inputs:[{key:"surfaceId",label:"Surface id",kind:"text",required:!1}],params:[],output:[u({label:"Spotify link",description:"Summary of the pinned music link widget."}),m({key:"spotifyLink",label:"Spotify state",description:"Structured Spotify widget state and pinned surface context.",modelName:"ForgeSpotifyWidgetState"})],tools:[],NodeView:f({title:"Spotify",description:"Pinned music link widget.",inputs:[{key:"surfaceId",label:"Surface id",kind:"text"}],params:[],output:[u({label:"Spotify link",description:"Summary of the pinned music link widget."}),m({key:"spotifyLink",label:"Spotify state",description:"Structured Spotify widget state and pinned surface context.",modelName:"ForgeSpotifyWidgetState"})],tools:[]}),WebView:D,execute:t=>g(t,{spotifyLink:{surfaceId:t.inputs.surfaceId??null}},"Pinned Spotify link")};D.workbench=B;const H={id:"surface:utility:weather",surfaceId:"utility",routePath:null,title:"Weather",icon:"weather",description:"Location-aware weather widget.",category:"Utilities",tags:["utility","weather"],inputs:[],params:[],output:[u({label:"Weather summary",description:"Summary of the weather widget state."}),m({key:"weather",label:"Weather payload",description:"Structured weather widget payload.",modelName:"ForgeWeatherWidgetState"})],tools:[],NodeView:f({title:"Weather",description:"Location-aware weather widget.",inputs:[],params:[],output:[u({label:"Weather summary",description:"Summary of the weather widget state."}),m({key:"weather",label:"Weather payload",description:"Structured weather widget payload.",modelName:"ForgeWeatherWidgetState"})],tools:[]}),WebView:F,execute:t=>g(t,{weather:null},"Weather widget")};F.workbench=H;const X={id:"surface:utility:quick-capture",surfaceId:"utility",routePath:null,title:"Quick capture",icon:"capture",description:"Draft a quick note or wiki page.",category:"Capture",tags:["capture","notes"],inputs:[{key:"defaultUserId",label:"Default user id",kind:"text",required:!1}],params:[],output:[u({label:"Draft summary",description:"Summary of the quick-capture draft state."}),m({key:"draft",label:"Draft context",description:"Structured quick-capture draft context.",modelName:"ForgeQuickCaptureDraft"})],tools:[j("Create a Forge evidence note from captured markdown.")],NodeView:f({title:"Quick capture",description:"Draft a quick note or wiki page.",inputs:[{key:"defaultUserId",label:"Default user id",kind:"text"}],params:[],output:[u({label:"Draft summary",description:"Summary of the quick-capture draft state."}),m({key:"draft",label:"Draft context",description:"Structured quick-capture draft context.",modelName:"ForgeQuickCaptureDraft"})],tools:[j("Create a Forge evidence note from captured markdown.")]}),WebView:I,execute:t=>g(t,{draft:{defaultUserId:t.inputs.defaultUserId??null}},"Quick capture can draft notes and wiki pages.")};I.workbench=X;export{W as M,I as Q,D as S,C as T,F as W};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-Cpmju3nw.js";import{i as x}from"./state-BtwEvpO6.js";import{P as w}from"./page-hero-BRcqE3a4.js";import{d as f,L as j,e as b,C as u,k as m,c as N,bf as M,bV as k}from"./index-wEZUnRh0.js";import{S as c,f as C,m as R,M as p,D}from"./daily-metrics-dashboard-DpIAdzFX.js";import"./motion-DwjmC9aq.js";import"./ui-B9O-eUim.js";import"./board-CLOHbg6t.js";import"./forms-C5d5hTf2.js";import"./charts-DwTguE_x.js";const V=["restingHeartRate","heartRateVariabilitySDNN","vo2Max","oxygenSaturation","bodyMass","stepCount"];function y(t,a){return a.map(i=>({...i,metrics:t.filter(s=>s.category===i.category)}))}function S(t){return t}function B({metrics:t}){if(!t.summary.hasData||t.metrics.length===0)return null;const a=y(t.metrics,t.summary.categoryBreakdown),i=t.metrics.find(r=>r.metric==="devrageSwearCount")??null,s=t.metrics.find(r=>r.metric==="swearingMessagePercent")??null,d=t.metrics.find(r=>r.metric==="devrageAverageMaxCumulativeRage")??null,n=t.metrics.find(r=>r.metric==="devrageMaxCumulativeRage")??null;return e.jsxs("section",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/38",children:"Psyche metrics"}),e.jsx("div",{className:"mt-1 text-2xl font-semibold text-white",children:"Conversation tone alongside body signals"})]}),e.jsxs(m,{className:"bg-amber-200/10 text-amber-50",children:[t.summary.trackedDays," tracked days"]})]}),e.jsx(D,{swearMetric:i,percentMetric:s,averageRageMetric:d,maxRageMetric:n,compact:!0}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Devrage count",description:"Daily user-message swear count from stored conversation history.",metric:i}),e.jsx(c,{title:"Swearing rate",description:"Share of scanned user messages that contained at least one tracked swear.",metric:s}),e.jsx(c,{title:"Average rage peak",description:"Average per-thread peak after swears add and clean messages cool the score down.",metric:d}),e.jsx(c,{title:"Max rage peak",description:"Highest cumulative thread score reached on the latest tracked day.",metric:n})]}),e.jsx(p,{groups:a})]})}function U(){var h;const t=f(),a=x({queryKey:["forge-vitals-view",...t.selectedUserIds],queryFn:async()=>(await M(t.selectedUserIds)).vitals}),i=x({queryKey:["forge-psyche-metrics-vitals-view"],queryFn:async()=>(await k()).metrics});if(a.isLoading)return e.jsx(j,{title:"Loading body signals",description:"Reading recent HealthKit body metrics, recovery signals, and daily aggregates."});if(a.isError||!a.data)return e.jsx(b,{error:a.error??new Error("Vitals data unavailable"),onRetry:()=>void a.refetch()});const s=a.data,d=s.metrics.map(S),n=V.map(o=>d.find(l=>l.metric===o)??null),r=s.summary.categoryBreakdown,v=y(d,r),g=!i.isError&&((h=i.data)!=null&&h.summary.hasData)?i.data:null;return e.jsxs("div",{className:"mx-auto grid w-full max-w-[1380px] gap-5",children:[e.jsx(w,{title:"Vitals",description:"Forge now keeps a daily body-signals layer across recovery, cardio fitness, breathing, composition, temperature, and activity. Use this surface to spot drift early, not just admire numbers late.",badge:`${s.summary.metricCount} live metrics`}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Recovery pulse",description:"Resting heart rate and HRV are the fastest read on load, stress, and whether today needs a gentler edge.",metric:n[0]??n[1]}),e.jsx(c,{title:"Cardio engine",description:"VO2 max and walking heart rate show whether baseline fitness is improving or whether your effort is costing more than usual.",metric:n[2]}),e.jsx(c,{title:"Breath and oxygen",description:"Respiratory rate and oxygen saturation help catch nights or stretches where recovery quality starts to slip.",metric:n[3]}),e.jsx(c,{title:"Body composition",description:"Mass and composition stay close to the daily story so progress is visible without flattening everything into weight alone.",metric:n[4]})]}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(340px,0.9fr)]",children:[e.jsxs(u,{className:"overflow-hidden rounded-[30px] border-white/8 bg-[radial-gradient(circle_at_top_left,rgba(108,99,255,0.16),transparent_36%),linear-gradient(180deg,rgba(15,19,38,0.98),rgba(9,13,28,0.98))] p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Coverage"}),e.jsxs("div",{className:"text-2xl font-semibold text-white",children:[s.summary.trackedDays," tracked days across ",s.summary.metricCount," metrics"]}),e.jsx("div",{className:"max-w-3xl text-sm leading-6 text-white/58",children:"The companion is compressing HealthKit into daily signal bands, so what you see here is designed for decisions: how your recovery is trending, where your physiology is changing, and which body systems are actually being observed consistently."})]}),e.jsxs(m,{className:"bg-white/[0.08] text-white/72",children:["Latest snapshot ",C(s.summary.latestDateKey)]})]}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:r.map(o=>{const l=R(o.category);return e.jsxs("div",{className:N("rounded-[22px] border bg-white/[0.03] p-4",l.ring),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(m,{className:l.badge,children:o.category}),e.jsxs("div",{className:"text-xs text-white/44",children:[o.coverageDays," days"]})]}),e.jsx("div",{className:"mt-3 text-2xl font-semibold text-white",children:o.metricCount}),e.jsxs("div",{className:"mt-1 text-sm text-white/58",children:["active metric",o.metricCount===1?"":"s"]})]},o.category)})})]}),e.jsx(u,{className:"rounded-[30px] border-white/8 bg-[linear-gradient(180deg,rgba(13,19,37,0.96),rgba(10,14,30,0.96))] p-6",children:e.jsxs("div",{className:"grid gap-3",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Daily interpretation"}),e.jsx("div",{className:"text-lg font-semibold text-white",children:"Body signals should feel operational, not medical-chart dead."}),e.jsxs("div",{className:"grid gap-3 text-sm leading-6 text-white/58",children:[e.jsx("div",{children:"Lower resting heart rate paired with stable or rising HRV usually means recovery is holding."}),e.jsx("div",{children:"Rising walking heart rate, falling HRV, or a jump in respiratory rate usually means you are carrying more load than the calendar admits."}),e.jsx("div",{children:"Composition and temperature metrics move slower, but they make the fast signals easier to trust because you can see the surrounding body context."})]}),e.jsxs("div",{className:"mt-2 rounded-[22px] border border-white/8 bg-white/[0.035] p-4 text-sm text-white/70",children:[s.summary.latestMetricCount," metrics updated on the latest tracked day."]})]})})]}),e.jsx(p,{groups:v}),g?e.jsx(B,{metrics:g}):null]})}export{U as VitalsPage};
1
+ import{j as e}from"./vendor-Cpmju3nw.js";import{i as x}from"./state-BtwEvpO6.js";import{P as w}from"./page-hero-DlHEJ0Yt.js";import{d as f,L as j,e as b,C as u,k as m,c as N,bf as M,bV as k}from"./index-BejvcRGb.js";import{S as c,f as C,m as R,M as p,D}from"./daily-metrics-dashboard-CXnAtN2T.js";import"./motion-DwjmC9aq.js";import"./ui-B9O-eUim.js";import"./board-CLOHbg6t.js";import"./forms-C5d5hTf2.js";import"./charts-DwTguE_x.js";const V=["restingHeartRate","heartRateVariabilitySDNN","vo2Max","oxygenSaturation","bodyMass","stepCount"];function y(t,a){return a.map(i=>({...i,metrics:t.filter(s=>s.category===i.category)}))}function S(t){return t}function B({metrics:t}){if(!t.summary.hasData||t.metrics.length===0)return null;const a=y(t.metrics,t.summary.categoryBreakdown),i=t.metrics.find(r=>r.metric==="devrageSwearCount")??null,s=t.metrics.find(r=>r.metric==="swearingMessagePercent")??null,d=t.metrics.find(r=>r.metric==="devrageAverageMaxCumulativeRage")??null,n=t.metrics.find(r=>r.metric==="devrageMaxCumulativeRage")??null;return e.jsxs("section",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/38",children:"Psyche metrics"}),e.jsx("div",{className:"mt-1 text-2xl font-semibold text-white",children:"Conversation tone alongside body signals"})]}),e.jsxs(m,{className:"bg-amber-200/10 text-amber-50",children:[t.summary.trackedDays," tracked days"]})]}),e.jsx(D,{swearMetric:i,percentMetric:s,averageRageMetric:d,maxRageMetric:n,compact:!0}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Devrage count",description:"Daily user-message swear count from stored conversation history.",metric:i}),e.jsx(c,{title:"Swearing rate",description:"Share of scanned user messages that contained at least one tracked swear.",metric:s}),e.jsx(c,{title:"Average rage peak",description:"Average per-thread peak after swears add and clean messages cool the score down.",metric:d}),e.jsx(c,{title:"Max rage peak",description:"Highest cumulative thread score reached on the latest tracked day.",metric:n})]}),e.jsx(p,{groups:a})]})}function U(){var h;const t=f(),a=x({queryKey:["forge-vitals-view",...t.selectedUserIds],queryFn:async()=>(await M(t.selectedUserIds)).vitals}),i=x({queryKey:["forge-psyche-metrics-vitals-view"],queryFn:async()=>(await k()).metrics});if(a.isLoading)return e.jsx(j,{title:"Loading body signals",description:"Reading recent HealthKit body metrics, recovery signals, and daily aggregates."});if(a.isError||!a.data)return e.jsx(b,{error:a.error??new Error("Vitals data unavailable"),onRetry:()=>void a.refetch()});const s=a.data,d=s.metrics.map(S),n=V.map(o=>d.find(l=>l.metric===o)??null),r=s.summary.categoryBreakdown,v=y(d,r),g=!i.isError&&((h=i.data)!=null&&h.summary.hasData)?i.data:null;return e.jsxs("div",{className:"mx-auto grid w-full max-w-[1380px] gap-5",children:[e.jsx(w,{title:"Vitals",description:"Forge now keeps a daily body-signals layer across recovery, cardio fitness, breathing, composition, temperature, and activity. Use this surface to spot drift early, not just admire numbers late.",badge:`${s.summary.metricCount} live metrics`}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Recovery pulse",description:"Resting heart rate and HRV are the fastest read on load, stress, and whether today needs a gentler edge.",metric:n[0]??n[1]}),e.jsx(c,{title:"Cardio engine",description:"VO2 max and walking heart rate show whether baseline fitness is improving or whether your effort is costing more than usual.",metric:n[2]}),e.jsx(c,{title:"Breath and oxygen",description:"Respiratory rate and oxygen saturation help catch nights or stretches where recovery quality starts to slip.",metric:n[3]}),e.jsx(c,{title:"Body composition",description:"Mass and composition stay close to the daily story so progress is visible without flattening everything into weight alone.",metric:n[4]})]}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(340px,0.9fr)]",children:[e.jsxs(u,{className:"overflow-hidden rounded-[30px] border-white/8 bg-[radial-gradient(circle_at_top_left,rgba(108,99,255,0.16),transparent_36%),linear-gradient(180deg,rgba(15,19,38,0.98),rgba(9,13,28,0.98))] p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Coverage"}),e.jsxs("div",{className:"text-2xl font-semibold text-white",children:[s.summary.trackedDays," tracked days across ",s.summary.metricCount," metrics"]}),e.jsx("div",{className:"max-w-3xl text-sm leading-6 text-white/58",children:"The companion is compressing HealthKit into daily signal bands, so what you see here is designed for decisions: how your recovery is trending, where your physiology is changing, and which body systems are actually being observed consistently."})]}),e.jsxs(m,{className:"bg-white/[0.08] text-white/72",children:["Latest snapshot ",C(s.summary.latestDateKey)]})]}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:r.map(o=>{const l=R(o.category);return e.jsxs("div",{className:N("rounded-[22px] border bg-white/[0.03] p-4",l.ring),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(m,{className:l.badge,children:o.category}),e.jsxs("div",{className:"text-xs text-white/44",children:[o.coverageDays," days"]})]}),e.jsx("div",{className:"mt-3 text-2xl font-semibold text-white",children:o.metricCount}),e.jsxs("div",{className:"mt-1 text-sm text-white/58",children:["active metric",o.metricCount===1?"":"s"]})]},o.category)})})]}),e.jsx(u,{className:"rounded-[30px] border-white/8 bg-[linear-gradient(180deg,rgba(13,19,37,0.96),rgba(10,14,30,0.96))] p-6",children:e.jsxs("div",{className:"grid gap-3",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Daily interpretation"}),e.jsx("div",{className:"text-lg font-semibold text-white",children:"Body signals should feel operational, not medical-chart dead."}),e.jsxs("div",{className:"grid gap-3 text-sm leading-6 text-white/58",children:[e.jsx("div",{children:"Lower resting heart rate paired with stable or rising HRV usually means recovery is holding."}),e.jsx("div",{children:"Rising walking heart rate, falling HRV, or a jump in respiratory rate usually means you are carrying more load than the calendar admits."}),e.jsx("div",{children:"Composition and temperature metrics move slower, but they make the fast signals easier to trust because you can see the surrounding body context."})]}),e.jsxs("div",{className:"mt-2 rounded-[22px] border border-white/8 bg-white/[0.035] p-4 text-sm text-white/70",children:[s.summary.latestMetricCount," metrics updated on the latest tracked day."]})]})})]}),e.jsx(p,{groups:v}),g?e.jsx(B,{metrics:g}):null]})}export{U as VitalsPage};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-Cpmju3nw.js";import{j as p,i as f,k as g}from"./state-BtwEvpO6.js";import{F as j}from"./flagship-signal-deck-jLxHEHvb.js";import{u as k,S as b,e as v,C as w,k as h,B as N,eB as R,i as $,eC as S}from"./index-wEZUnRh0.js";import{P as z}from"./page-hero-BRcqE3a4.js";import"./motion-DwjmC9aq.js";import"./ui-B9O-eUim.js";import"./board-CLOHbg6t.js";import"./forms-C5d5hTf2.js";const o="font-label text-[11px] uppercase tracking-[0.18em] text-[var(--ui-ink-faint)]",d="overflow-hidden rounded-[20px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)]",x="text-sm leading-6 text-[var(--ui-ink-soft)]";function P({data:s}){const m=Math.max(1,...s.map(i=>i.xp)),t=s.length>0?Math.max(4,Math.min(18,280/s.length-4)):8,c=s.length>1?Math.max(1,(300-s.length*t)/(s.length-1)):0;return e.jsx("div",{className:"mt-4 aspect-[16/9] min-h-56 w-full min-w-0 overflow-hidden rounded-[18px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)] p-3",children:e.jsxs("svg",{viewBox:"0 0 340 200",role:"img","aria-label":"Weekly review XP chart",className:"h-full w-full",children:[e.jsx("g",{stroke:"var(--ui-border-subtle)",strokeWidth:"1",children:[45,85,125,165].map(i=>e.jsx("line",{x1:"20",x2:"320",y1:i,y2:i},i))}),s.map((i,r)=>{const l=20+r*(t+c),n=Math.max(2,i.xp/m*128);return e.jsxs("g",{children:[e.jsx("rect",{x:l,y:168-n,width:t,height:n,rx:"5",fill:"var(--primary)"}),r===0||r===s.length-1||r%3===0?e.jsx("text",{x:l+t/2,y:"192",fill:"var(--ui-ink-faint)",fontSize:"10",textAnchor:"middle",children:i.label}):null]},`${i.label}-${r}`)})]})})}function K(){var u;const{t:s}=k(),m=p(),t=f({queryKey:["forge-weekly-review"],queryFn:S}),c=g({mutationFn:R,onSuccess:async()=>{await Promise.all([m.invalidateQueries({queryKey:["forge-weekly-review"]}),m.invalidateQueries({queryKey:["forge-xp-metrics"]}),m.invalidateQueries({queryKey:["forge-reward-ledger"]}),$(m),m.invalidateQueries({queryKey:["activity-archive"]})])}}),i=(u=t.data)==null?void 0:u.review;if(t.isLoading)return e.jsx(b,{});if(t.isError)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:t.error,onRetry:()=>void t.refetch()});if(!i)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:new Error("Forge returned an empty weekly review payload."),onRetry:()=>void t.refetch()});const r=i.wins[0]??null,l=i.calibration.find(a=>a.mode==="recover")??i.calibration[0]??null,n=i.calibration.find(a=>a.mode==="accelerate")??i.calibration[0]??null,y=[{id:"week",label:"This week",title:`${i.momentumSummary.totalXp} XP with ${i.momentumSummary.focusHours} focus hours`,detail:`Peak window: ${i.momentumSummary.peakWindow}. Efficiency score is holding at ${i.momentumSummary.efficiencyScore}.`,badge:i.windowLabel},{id:"wins",label:"Wins",title:(r==null?void 0:r.title)??s("common.weeklyReview.noWin"),detail:(r==null?void 0:r.summary)??s("common.weeklyReview.noWinDetail"),badge:r?`+${r.rewardXp} xp`:`${i.wins.length} wins`},{id:"recovery",label:"Recovery",title:(l==null?void 0:l.title)??s("common.weeklyReview.noRecovery"),detail:(l==null?void 0:l.note)??s("common.weeklyReview.noRecoveryDetail"),badge:(l==null?void 0:l.mode)??"maintain"},{id:"next-intent",label:"Next intent",title:(n==null?void 0:n.title)??i.reward.title,detail:(n==null?void 0:n.note)??i.reward.summary,badge:`+${i.reward.rewardXp} xp`}];return e.jsxs("div",{className:"grid gap-5",children:[e.jsx(z,{title:"Weekly Review",description:`${i.windowLabel}. ${s("common.weeklyReview.heroDescription")}`,badge:`${i.momentumSummary.totalXp} xp`}),e.jsxs("section",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.2fr)_minmax(0,0.8fr)]",children:[e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionMomentum")}),e.jsx(P,{data:i.chart}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:[e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"XP"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.totalXp})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Focus hours"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.focusHours})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Peak window"}),e.jsx("div",{className:"mt-2 break-words text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.peakWindow})]})]})]}),e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionGoals")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.calibration.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsx(h,{className:"max-w-[9rem] shrink-0 self-start",children:a.mode})]}),e.jsx("div",{className:`mt-3 break-words ${x}`,children:a.note})]},a.id))})]})]}),e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionWins")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.wins.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsxs(h,{tone:"signal",className:"max-w-[8rem] shrink-0 self-start",children:["+",a.rewardXp," xp"]})]}),e.jsx("div",{className:`mt-2 break-words ${x}`,children:a.summary})]},a.id))})]}),e.jsxs(w,{children:[e.jsx("h2",{className:"break-words font-display text-3xl text-[var(--ui-ink-strong)]",children:i.reward.title}),e.jsx("p",{className:`mt-3 leading-7 ${x}`,children:i.reward.summary}),e.jsxs("div",{className:`mt-4 ${d} p-4`,children:[e.jsx("div",{className:o,children:s("common.weeklyReview.completionBonus")}),e.jsxs("div",{className:"mt-2 text-3xl text-[var(--primary)]",children:["+",i.reward.rewardXp," XP"]})]}),e.jsx(N,{className:"mt-4 w-full",disabled:i.completion.finalized,pending:c.isPending,pendingLabel:s("common.weeklyReview.finalizePending"),onClick:async()=>{await c.mutateAsync()},children:i.completion.finalized?s("common.weeklyReview.finalized"):s("common.weeklyReview.finalize")}),e.jsx("div",{className:`mt-3 ${x}`,children:i.completion.finalized?`${s("common.weeklyReview.finalizedDetail")} ${i.completion.finalizedBy?`By ${i.completion.finalizedBy}. `:""}${i.completion.finalizedAt?new Date(i.completion.finalizedAt).toLocaleString():""}`.trim():i.reward.summary})]})]})]}),e.jsx(j,{eyebrow:s("common.weeklyReview.summaryEyebrow"),title:s("common.weeklyReview.summaryTitle"),description:s("common.weeklyReview.summaryDescription"),items:y})]})}export{K as WeeklyReviewPage};
1
+ import{j as e}from"./vendor-Cpmju3nw.js";import{j as p,i as f,k as g}from"./state-BtwEvpO6.js";import{F as j}from"./flagship-signal-deck-CW91n6u9.js";import{u as k,S as b,e as v,C as w,k as h,B as N,eB as R,i as $,eC as S}from"./index-BejvcRGb.js";import{P as z}from"./page-hero-DlHEJ0Yt.js";import"./motion-DwjmC9aq.js";import"./ui-B9O-eUim.js";import"./board-CLOHbg6t.js";import"./forms-C5d5hTf2.js";const o="font-label text-[11px] uppercase tracking-[0.18em] text-[var(--ui-ink-faint)]",d="overflow-hidden rounded-[20px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)]",x="text-sm leading-6 text-[var(--ui-ink-soft)]";function P({data:s}){const m=Math.max(1,...s.map(i=>i.xp)),t=s.length>0?Math.max(4,Math.min(18,280/s.length-4)):8,c=s.length>1?Math.max(1,(300-s.length*t)/(s.length-1)):0;return e.jsx("div",{className:"mt-4 aspect-[16/9] min-h-56 w-full min-w-0 overflow-hidden rounded-[18px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)] p-3",children:e.jsxs("svg",{viewBox:"0 0 340 200",role:"img","aria-label":"Weekly review XP chart",className:"h-full w-full",children:[e.jsx("g",{stroke:"var(--ui-border-subtle)",strokeWidth:"1",children:[45,85,125,165].map(i=>e.jsx("line",{x1:"20",x2:"320",y1:i,y2:i},i))}),s.map((i,r)=>{const l=20+r*(t+c),n=Math.max(2,i.xp/m*128);return e.jsxs("g",{children:[e.jsx("rect",{x:l,y:168-n,width:t,height:n,rx:"5",fill:"var(--primary)"}),r===0||r===s.length-1||r%3===0?e.jsx("text",{x:l+t/2,y:"192",fill:"var(--ui-ink-faint)",fontSize:"10",textAnchor:"middle",children:i.label}):null]},`${i.label}-${r}`)})]})})}function K(){var u;const{t:s}=k(),m=p(),t=f({queryKey:["forge-weekly-review"],queryFn:S}),c=g({mutationFn:R,onSuccess:async()=>{await Promise.all([m.invalidateQueries({queryKey:["forge-weekly-review"]}),m.invalidateQueries({queryKey:["forge-xp-metrics"]}),m.invalidateQueries({queryKey:["forge-reward-ledger"]}),$(m),m.invalidateQueries({queryKey:["activity-archive"]})])}}),i=(u=t.data)==null?void 0:u.review;if(t.isLoading)return e.jsx(b,{});if(t.isError)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:t.error,onRetry:()=>void t.refetch()});if(!i)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:new Error("Forge returned an empty weekly review payload."),onRetry:()=>void t.refetch()});const r=i.wins[0]??null,l=i.calibration.find(a=>a.mode==="recover")??i.calibration[0]??null,n=i.calibration.find(a=>a.mode==="accelerate")??i.calibration[0]??null,y=[{id:"week",label:"This week",title:`${i.momentumSummary.totalXp} XP with ${i.momentumSummary.focusHours} focus hours`,detail:`Peak window: ${i.momentumSummary.peakWindow}. Efficiency score is holding at ${i.momentumSummary.efficiencyScore}.`,badge:i.windowLabel},{id:"wins",label:"Wins",title:(r==null?void 0:r.title)??s("common.weeklyReview.noWin"),detail:(r==null?void 0:r.summary)??s("common.weeklyReview.noWinDetail"),badge:r?`+${r.rewardXp} xp`:`${i.wins.length} wins`},{id:"recovery",label:"Recovery",title:(l==null?void 0:l.title)??s("common.weeklyReview.noRecovery"),detail:(l==null?void 0:l.note)??s("common.weeklyReview.noRecoveryDetail"),badge:(l==null?void 0:l.mode)??"maintain"},{id:"next-intent",label:"Next intent",title:(n==null?void 0:n.title)??i.reward.title,detail:(n==null?void 0:n.note)??i.reward.summary,badge:`+${i.reward.rewardXp} xp`}];return e.jsxs("div",{className:"grid gap-5",children:[e.jsx(z,{title:"Weekly Review",description:`${i.windowLabel}. ${s("common.weeklyReview.heroDescription")}`,badge:`${i.momentumSummary.totalXp} xp`}),e.jsxs("section",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.2fr)_minmax(0,0.8fr)]",children:[e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionMomentum")}),e.jsx(P,{data:i.chart}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:[e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"XP"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.totalXp})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Focus hours"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.focusHours})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Peak window"}),e.jsx("div",{className:"mt-2 break-words text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.peakWindow})]})]})]}),e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionGoals")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.calibration.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsx(h,{className:"max-w-[9rem] shrink-0 self-start",children:a.mode})]}),e.jsx("div",{className:`mt-3 break-words ${x}`,children:a.note})]},a.id))})]})]}),e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionWins")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.wins.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsxs(h,{tone:"signal",className:"max-w-[8rem] shrink-0 self-start",children:["+",a.rewardXp," xp"]})]}),e.jsx("div",{className:`mt-2 break-words ${x}`,children:a.summary})]},a.id))})]}),e.jsxs(w,{children:[e.jsx("h2",{className:"break-words font-display text-3xl text-[var(--ui-ink-strong)]",children:i.reward.title}),e.jsx("p",{className:`mt-3 leading-7 ${x}`,children:i.reward.summary}),e.jsxs("div",{className:`mt-4 ${d} p-4`,children:[e.jsx("div",{className:o,children:s("common.weeklyReview.completionBonus")}),e.jsxs("div",{className:"mt-2 text-3xl text-[var(--primary)]",children:["+",i.reward.rewardXp," XP"]})]}),e.jsx(N,{className:"mt-4 w-full",disabled:i.completion.finalized,pending:c.isPending,pendingLabel:s("common.weeklyReview.finalizePending"),onClick:async()=>{await c.mutateAsync()},children:i.completion.finalized?s("common.weeklyReview.finalized"):s("common.weeklyReview.finalize")}),e.jsx("div",{className:`mt-3 ${x}`,children:i.completion.finalized?`${s("common.weeklyReview.finalizedDetail")} ${i.completion.finalizedBy?`By ${i.completion.finalizedBy}. `:""}${i.completion.finalizedAt?new Date(i.completion.finalizedAt).toLocaleString():""}`.trim():i.reward.summary})]})]})]}),e.jsx(j,{eyebrow:s("common.weeklyReview.summaryEyebrow"),title:s("common.weeklyReview.summaryTitle"),description:s("common.weeklyReview.summaryDescription"),items:y})]})}export{K as WeeklyReviewPage};