ltcai 12.0.0 → 12.2.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/README.md +43 -52
- package/docs/CHANGELOG.md +41 -0
- package/docs/CI_AND_RELEASE_GATES.md +20 -11
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +11 -11
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/kg-schema.md +1 -1
- package/lattice_brain/__init__.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/product_readiness.py +1 -1
- package/package.json +1 -1
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/release_screen_claims.json +34 -0
- package/src-tauri/Cargo.lock +10 -10
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +45 -45
- package/static/app/assets/{Act-Cf1L2709.js → Act-BjGgeuQd.js} +2 -2
- package/static/app/assets/{AdminConsole-DPAbLTYV.js → AdminConsole-C6hcJGMr.js} +1 -1
- package/static/app/assets/{Brain-DqamGrj-.js → Brain-CNQnIaA8.js} +2 -2
- package/static/app/assets/BrainHome-CGJ6O69l.js +2 -0
- package/static/app/assets/{BrainSignals-CQPPfyyH.js → BrainSignals-DONPljxz.js} +1 -1
- package/static/app/assets/{Capture-DGdIH_Zc.js → Capture-BMCC5544.js} +1 -1
- package/static/app/assets/{Chronicle-C-UlCJoJ.js → Chronicle-DF6sOonx.js} +1 -1
- package/static/app/assets/{CommandPalette-WNT4EqUX.js → CommandPalette-DiWyutdM.js} +1 -1
- package/static/app/assets/{DigitalBrainExplorer-CEBH5Cwc.js → DigitalBrainExplorer-BL3V6Dqz.js} +1 -1
- package/static/app/assets/{Library-C6xd1dlf.js → Library-B-ue9hXL.js} +1 -1
- package/static/app/assets/{LivingBrain-BEk-0ohw.js → LivingBrain-b1RiM5Rh.js} +1 -1
- package/static/app/assets/{ProductFlow-CZLm5iXh.js → ProductFlow-wZIKJW7G.js} +1 -1
- package/static/app/assets/{ReviewCard-CEHG6evf.js → ReviewCard-D1fGTEn7.js} +1 -1
- package/static/app/assets/{RunsListPanel-CLtEJSRW.js → RunsListPanel-DAirtLkS.js} +1 -1
- package/static/app/assets/System-BEI1eoC4.js +1 -0
- package/static/app/assets/{WorkflowGraph-Dj10RuGE.js → WorkflowGraph-qrI6GU4R.js} +1 -1
- package/static/app/assets/{WorkflowsPanel-Kyeh_LIT.js → WorkflowsPanel-CIMNTw-O.js} +2 -2
- package/static/app/assets/{actHelpers-CtSmK9Dw.js → actHelpers-BMukIRnQ.js} +1 -1
- package/static/app/assets/arrow-left-iVa1goff.js +1 -0
- package/static/app/assets/{bot-DhUGRel2.js → bot-Dkd-DbiP.js} +1 -1
- package/static/app/assets/brain-BsexlNOA.js +1 -0
- package/static/app/assets/{button-CmaEqG1T.js → button-BA0N_zId.js} +1 -1
- package/static/app/assets/circle-check-BxaDWjPR.js +1 -0
- package/static/app/assets/{circle-pause-l96izbxj.js → circle-pause-918Kuvk0.js} +1 -1
- package/static/app/assets/{circle-play-CrZa25_q.js → circle-play-CS0IbVDV.js} +1 -1
- package/static/app/assets/{cpu-BaXudqwl.js → cpu-BpvoWsjk.js} +1 -1
- package/static/app/assets/{download-hCVFPiyc.js → download-BvkMLLLN.js} +1 -1
- package/static/app/assets/{folder-open-CHL82Yp7.js → folder-open-YmGugIBf.js} +1 -1
- package/static/app/assets/{hard-drive-DDzET7lk.js → hard-drive-BOzmS-cq.js} +1 -1
- package/static/app/assets/{index-CB93CZWW.css → index-C8gwOf0C.css} +1 -1
- package/static/app/assets/{index-D2H-wSl6.js → index-CfeqZ9Ri.js} +3 -3
- package/static/app/assets/{input-Df1CAY_I.js → input-CFfCfMjO.js} +1 -1
- package/static/app/assets/{link-2-xNnTIX1_.js → link-2-CcYzeM7M.js} +1 -1
- package/static/app/assets/{permissionCopy-D3aWHco-.js → permissionCopy-B23r24oX.js} +1 -1
- package/static/app/assets/{primitives-BioD2slS.js → primitives-BDryQl6H.js} +1 -1
- package/static/app/assets/search-DHsPwmPw.js +1 -0
- package/static/app/assets/{share-2-FkzGf8Df.js → share-2-B-gPv2ec.js} +1 -1
- package/static/app/assets/{shield-alert-B3dwzik4.js → shield-alert-CfyRO1p0.js} +1 -1
- package/static/app/assets/{sourceMeta-DQSY_tah.js → sourceMeta-C4LDEy1S.js} +1 -1
- package/static/app/assets/{textarea-P8o6pvOP.js → textarea-BdVMYEb1.js} +1 -1
- package/static/app/assets/{useFocusTrap-hswOIkXE.js → useFocusTrap-CV73DLHn.js} +1 -1
- package/static/app/assets/{useMutation-OJLrYSRA.js → useMutation-B8QKq2NW.js} +1 -1
- package/static/app/assets/workspace-BmfVs66W.js +1 -0
- package/static/app/index.html +2 -2
- package/static/sw.js +1 -1
- package/static/app/assets/BrainHome-MHe2_RYs.js +0 -2
- package/static/app/assets/System-CAxwBUXw.js +0 -1
- package/static/app/assets/arrow-left-CRl5EO4D.js +0 -1
- package/static/app/assets/brain-CLkhHsHF.js +0 -1
- package/static/app/assets/circle-check-CFgejkOS.js +0 -1
- package/static/app/assets/search-BzBw8YcW.js +0 -1
- package/static/app/assets/workspace-BCuk3Ku9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{c as r,o as i,r as a,y as o}from"./primitives-BioD2slS.js";import{t as s}from"./link-2-xNnTIX1_.js";import{A as c,H as l,R as u,S as d,d as f,j as p,o as m,v as h,w as g,z as _}from"./index-D2H-wSl6.js";var v=u(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),y=u(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),b=e(t());g({ko:{"chronicle.kicker":`기억의 연대기`,"chronicle.title":`두뇌가 자라온 시간`,"chronicle.copy":`언제 무엇이 들어왔고 무엇이 달라졌는지, 날짜로 되짚어 봅니다.`,"chronicle.loading":`연대기를 불러오는 중입니다.`,"chronicle.empty.title":`오늘부터 기록이 쌓입니다`,"chronicle.empty.detail":`자료를 넣거나 대화를 나누면, 그날부터 이 자리에 하루하루가 남습니다.`,"chronicle.lane.sources":`자료`,"chronicle.lane.entities":`개념`,"chronicle.lane.connections":`연결`,"chronicle.lane.conversations":`대화`,"chronicle.growth.title":`쌓인 기억`,"chronicle.growth.hint":`손잡이를 좌우로 옮기면 그 시점으로 돌아갑니다. 방향키로도 하루씩 움직일 수 있어요.`,"chronicle.growth.aria":`시점 고르기`,"chronicle.growth.valueText":`{date} · 자료 {sources} · 개념 {entities} · 연결 {connections} · 대화 {conversations}`,"chronicle.growth.first":`처음`,"chronicle.growth.latest":`지금`,"chronicle.heatmap.title":`활동 달력`,"chronicle.heatmap.hint":`진한 칸일수록 그날 많이 쌓였다는 뜻이에요. 칸을 누르면 그날 이야기가 아래에 열립니다.`,"chronicle.heatmap.aria":`날짜별 활동`,"chronicle.heatmap.cell":`{date}, {count}가지`,"chronicle.heatmap.cellEmpty":`{date}, 쌓인 것 없음`,"chronicle.heatmap.less":`적음`,"chronicle.heatmap.more":`많음`,"chronicle.weekday.sun":`일`,"chronicle.weekday.mon":`월`,"chronicle.weekday.tue":`화`,"chronicle.weekday.wed":`수`,"chronicle.weekday.thu":`목`,"chronicle.weekday.fri":`금`,"chronicle.weekday.sat":`토`,"chronicle.day.title":`그날의 이야기`,"chronicle.day.loading":`그날 이야기를 불러오는 중입니다.`,"chronicle.day.quiet":`이 날은 조용했습니다. 남은 기록이 없어요.`,"chronicle.group.sources":`자료`,"chronicle.group.entities":`새로 생긴 개념`,"chronicle.group.conversations":`나눈 대화`,"chronicle.group.changes":`달라진 사실`,"chronicle.group.count":`{count}개`,"chronicle.group.empty":`이 날은 없어요.`,"chronicle.group.more":`이 밖에 {count}개가 더 있어요.`,"chronicle.open.source":`기억에서 찾아보기`,"chronicle.open.entity":`지도에서 보기`,"chronicle.open.conversation":`대화로 가기`,"chronicle.open.change":`지도에서 보기`,"chronicle.sourceType.upload":`올린 파일`,"chronicle.sourceType.note":`메모`,"chronicle.sourceType.web_url":`웹 페이지`,"chronicle.sourceType.conversation":`대화`,"chronicle.sourceType.local_file":`내 컴퓨터 파일`,"chronicle.sourceType.image":`그림`,"chronicle.sourceType.other":`자료`,"chronicle.entityType.other":`개념`,"chronicle.conversation.untitled":`제목 없는 대화`,"chronicle.conversation.messages":`{count}번 주고받음`,"chronicle.change.fact_superseded":`새 내용으로 바뀐 사실`,"chronicle.change.fact_retired":`더 이상 사실이 아닌 것`,"chronicle.change.connection_superseded":`다시 이어진 관계`,"chronicle.change.connection_ended":`끊어진 관계`,"chronicle.change.other":`달라진 것`,"chronicle.rewind.title":`그때의 두뇌`,"chronicle.rewind.subtitle":`{date}에 두뇌가 알고 있던 것`,"chronicle.rewind.loading":`그때 모습을 불러오는 중입니다.`,"chronicle.rewind.entities":`기억 조각`,"chronicle.rewind.connections":`이어진 관계`,"chronicle.rewind.note":`여기 두 숫자는 그때 저장돼 있던 모든 것을 셉니다. 위 곡선의 ‘개념’과는 세는 방식이 달라요.`,"chronicle.rewind.top":`그때 중요했던 개념`,"chronicle.rewind.topEmpty":`그때는 아직 눈에 띄는 개념이 없었어요.`,"chronicle.rewind.reset":`지금으로 돌아오기`},en:{"chronicle.kicker":`Brain Chronicle`,"chronicle.title":`How your Brain grew`,"chronicle.copy":`Walk back through what arrived, and what changed, one day at a time.`,"chronicle.loading":`Loading the chronicle.`,"chronicle.empty.title":`The record starts today`,"chronicle.empty.detail":`Add something or have a conversation, and that day will show up right here.`,"chronicle.lane.sources":`Sources`,"chronicle.lane.entities":`Ideas`,"chronicle.lane.connections":`Links`,"chronicle.lane.conversations":`Chats`,"chronicle.growth.title":`What has piled up`,"chronicle.growth.hint":`Drag the handle to travel back to that moment. Arrow keys move a day at a time.`,"chronicle.growth.aria":`Pick a moment`,"chronicle.growth.valueText":`{date} · {sources} sources · {entities} ideas · {connections} links · {conversations} chats`,"chronicle.growth.first":`First`,"chronicle.growth.latest":`Now`,"chronicle.heatmap.title":`Activity calendar`,"chronicle.heatmap.hint":`A darker square means more arrived that day. Pick one and its story opens below.`,"chronicle.heatmap.aria":`Activity by day`,"chronicle.heatmap.cell":`{date}, {count} things`,"chronicle.heatmap.cellEmpty":`{date}, nothing arrived`,"chronicle.heatmap.less":`Less`,"chronicle.heatmap.more":`More`,"chronicle.weekday.sun":`Sun`,"chronicle.weekday.mon":`Mon`,"chronicle.weekday.tue":`Tue`,"chronicle.weekday.wed":`Wed`,"chronicle.weekday.thu":`Thu`,"chronicle.weekday.fri":`Fri`,"chronicle.weekday.sat":`Sat`,"chronicle.day.title":`That day's story`,"chronicle.day.loading":`Loading that day.`,"chronicle.day.quiet":`A quiet day — nothing was recorded.`,"chronicle.group.sources":`Sources`,"chronicle.group.entities":`New ideas`,"chronicle.group.conversations":`Conversations`,"chronicle.group.changes":`What changed`,"chronicle.group.count":`{count}`,"chronicle.group.empty":`Nothing this day.`,"chronicle.group.more":`And {count} more.`,"chronicle.open.source":`Find it in memory`,"chronicle.open.entity":`See it on the map`,"chronicle.open.conversation":`Go to conversations`,"chronicle.open.change":`See it on the map`,"chronicle.sourceType.upload":`Uploaded file`,"chronicle.sourceType.note":`Note`,"chronicle.sourceType.web_url":`Web page`,"chronicle.sourceType.conversation":`Conversation`,"chronicle.sourceType.local_file":`File on this computer`,"chronicle.sourceType.image":`Picture`,"chronicle.sourceType.other":`Source`,"chronicle.entityType.other":`Idea`,"chronicle.conversation.untitled":`Untitled conversation`,"chronicle.conversation.messages":`{count} messages`,"chronicle.change.fact_superseded":`Replaced by newer wording`,"chronicle.change.fact_retired":`No longer true`,"chronicle.change.connection_superseded":`Relinked a different way`,"chronicle.change.connection_ended":`Link ended`,"chronicle.change.other":`Changed`,"chronicle.rewind.title":`Your Brain back then`,"chronicle.rewind.subtitle":`What it knew on {date}`,"chronicle.rewind.loading":`Loading how it looked then.`,"chronicle.rewind.entities":`Pieces of memory`,"chronicle.rewind.connections":`Links between them`,"chronicle.rewind.note":`These two count everything stored at that moment. That is a different measure from the “ideas” line in the curve above.`,"chronicle.rewind.top":`What mattered most then`,"chronicle.rewind.topEmpty":`Nothing stood out yet at that point.`,"chronicle.rewind.reset":`Back to now`}});var x=n(),S=[`chronicle.weekday.sun`,`chronicle.weekday.mon`,`chronicle.weekday.tue`,`chronicle.weekday.wed`,`chronicle.weekday.thu`,`chronicle.weekday.fri`,`chronicle.weekday.sat`];function C({weeks:e,selectedDate:t,onSelect:n,language:r}){return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-heatmap`,"data-testid":`chronicle-heatmap`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(r,`chronicle.heatmap.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:d(r,`chronicle.heatmap.hint`)})]}),(0,x.jsxs)(`div`,{className:`chronicle-heatmap-scroll`,children:[(0,x.jsx)(`div`,{className:`chronicle-heatmap-weekdays`,"aria-hidden":`true`,children:S.map(e=>(0,x.jsx)(`span`,{children:d(r,e)},e))}),(0,x.jsx)(`div`,{className:`chronicle-heatmap-grid`,role:`group`,"aria-label":d(r,`chronicle.heatmap.aria`),children:e.map(e=>(0,x.jsx)(`div`,{className:`chronicle-heatmap-week`,children:e.cells.map((i,a)=>i?(0,x.jsx)(`button`,{type:`button`,className:`chronicle-heatmap-cell`,"data-level":i.level,"data-testid":`chronicle-heatmap-cell`,"aria-pressed":i.date===t,"aria-label":d(r,i.daily>0?`chronicle.heatmap.cell`:`chronicle.heatmap.cellEmpty`,{date:i.date,count:f(i.daily)}),onClick:()=>n(i.date)},i.date):(0,x.jsx)(`span`,{className:`chronicle-heatmap-cell is-blank`,"aria-hidden":`true`},`${e.key}-${a}`))},e.key))})]}),(0,x.jsxs)(`p`,{className:`chronicle-heatmap-legend`,children:[(0,x.jsx)(`span`,{children:d(r,`chronicle.heatmap.less`)}),(0,x.jsx)(`span`,{className:`chronicle-heatmap-swatches`,"aria-hidden":`true`,children:[0,1,2,3,4].map(e=>(0,x.jsx)(`span`,{className:`chronicle-heatmap-cell`,"data-level":e},e))}),(0,x.jsx)(`span`,{children:d(r,`chronicle.heatmap.more`)})]})]})}var w=864e5,T=/^(\d{4})-(\d{2})-(\d{2})$/;function E(e){let t=T.exec(e);if(!t)return null;let n=Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]));return D(n)===e?n:null}function D(e){return new Date(e).toISOString().slice(0,10)}function O(e){let t=E(e);return t===null?0:new Date(t).getUTCDay()}function ee(e){let t=new Map;for(let n of e){let e=E(n.date);e!==null&&t.set(D(e),n)}let n=[...t.keys()].sort();if(!n.length)return[];let r=E(n[0]),i=E(n[n.length-1]),a=[],o=0,s=0,c=0,l=0;for(let e=r;e<=i;e+=w){let n=D(e),r=t.get(n),i=r?k(r.sources)+k(r.entities)+k(r.connections)+k(r.conversations):0;r&&(o+=k(r.sources),s+=k(r.entities),c+=k(r.connections),l+=k(r.conversations)),a.push({date:n,sources:o,entities:s,connections:c,conversations:l,total:o+s+c+l,daily:i})}return a}function k(e){return typeof e==`number`&&Number.isFinite(e)?e:0}function A(e,t){if(e<=0)return 0;if(t<=0)return 1;let n=e/t;return n>.66?4:n>.33?3:n>.12?2:1}function j(e){if(!e.length)return[];let t=e.reduce((e,t)=>Math.max(e,t.daily),0),n=E(e[0].date),r=E(e[e.length-1].date),i=n-O(e[0].date)*w,a=r+(6-O(e[e.length-1].date))*w,o=new Map(e.map(e=>[e.date,e.daily])),s=[];for(let e=i;e<=a;e+=7*w){let n=[];for(let r=0;r<7;r+=1){let i=D(e+r*w),a=o.get(i);n.push(a===void 0?null:{date:i,daily:a,level:A(a,t)})}s.push({key:D(e),cells:n})}return s}function M(e,t,n){if(!e.length)return{area:``,line:``};let r=e[e.length-1].total,i=Math.max(e.length-1,1),a=e.map((e,a)=>({x:a/i*t,y:n-(r>0?e.total/r*n:0)})),o=[`M ${N(a[0].x)} ${N(a[0].y)}`];for(let e=1;e<a.length;e+=1)o.push(`L ${N(a[e].x)} ${N(a[e-1].y)}`),o.push(`L ${N(a[e].x)} ${N(a[e].y)}`);let s=o.join(` `);return{area:`${s} ${`L ${N(a[a.length-1].x)} ${n} L ${N(a[0].x)} ${n} Z`}`,line:s}}function N(e){return Math.round(e*100)/100}function P(e){return`${e}T23:59:59`}var F=8,I=`/hybrid-search`,L=`/knowledge-graph`,R=`/brain`;function z({day:e,loading:t,language:n}){let r=(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(n,`chronicle.day.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,"data-testid":`chronicle-day-date`,children:e?e.date:``})]});return t||!e?(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-day`,"data-testid":`chronicle-day`,children:[r,(0,x.jsx)(`p`,{className:`chronicle-note`,role:`status`,children:d(n,`chronicle.day.loading`)})]}):(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-day`,"data-testid":`chronicle-day`,children:[r,e.counts.sources+e.counts.entities+e.counts.conversations+e.counts.changes===0?(0,x.jsx)(`p`,{className:`chronicle-note`,"data-testid":`chronicle-day-quiet`,children:d(n,`chronicle.day.quiet`)}):(0,x.jsxs)(`div`,{className:`chronicle-day-groups`,children:[(0,x.jsx)(B,{titleKey:`chronicle.group.sources`,icon:(0,x.jsx)(v,{"aria-hidden":`true`}),count:e.counts.sources,items:V(e,n),language:n}),(0,x.jsx)(B,{titleKey:`chronicle.group.entities`,icon:(0,x.jsx)(o,{"aria-hidden":`true`}),count:e.counts.entities,items:H(e,n),language:n}),(0,x.jsx)(B,{titleKey:`chronicle.group.conversations`,icon:(0,x.jsx)(y,{"aria-hidden":`true`}),count:e.counts.conversations,items:U(e,n),language:n}),(0,x.jsx)(B,{titleKey:`chronicle.group.changes`,icon:(0,x.jsx)(s,{"aria-hidden":`true`}),count:e.counts.changes,items:W(e,n),language:n})]})]})}function B({titleKey:e,icon:t,count:n,items:r,language:i}){let a=r.slice(0,F),o=Math.max(n-a.length,0);return(0,x.jsxs)(`article`,{className:`chronicle-group`,"data-testid":`chronicle-group`,children:[(0,x.jsxs)(`h3`,{className:`chronicle-group-title`,children:[(0,x.jsx)(`span`,{className:`chronicle-group-icon`,children:t}),d(i,e),(0,x.jsx)(`span`,{className:`chronicle-group-count`,children:d(i,`chronicle.group.count`,{count:f(n)})})]}),a.length===0?(0,x.jsx)(`p`,{className:`chronicle-group-empty`,children:d(i,`chronicle.group.empty`)}):(0,x.jsx)(`ul`,{className:`chronicle-group-list`,children:a.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-item`,"aria-label":`${e.title} — ${e.openLabel}`,onClick:()=>m(e.target),children:[(0,x.jsx)(`span`,{className:`chronicle-item-title`,children:e.title}),(0,x.jsx)(`span`,{className:`chronicle-item-meta`,children:e.meta})]})},e.key))}),o>0?(0,x.jsx)(`p`,{className:`chronicle-group-more`,children:d(i,`chronicle.group.more`,{count:f(o)})}):null]})}function V(e,t){let n=d(t,`chronicle.open.source`);return e.groups.sources.map(e=>({key:e.id,title:e.title,meta:K(e.source_type,t),target:I,openLabel:n}))}function H(e,t){let n=d(t,`chronicle.open.entity`);return e.groups.entities.map(e=>({key:e.id,title:e.label,meta:q(e.type,t),target:L,openLabel:n}))}function U(e,t){let n=d(t,`chronicle.open.conversation`);return e.groups.conversations.map((e,r)=>({key:e.conversation_id||`loose-${r}`,title:e.preview||d(t,`chronicle.conversation.untitled`),meta:d(t,`chronicle.conversation.messages`,{count:f(e.messages)}),target:R,openLabel:n}))}function W(e,t){let n=d(t,`chronicle.open.change`);return e.groups.changes.map((e,r)=>({key:`${e.node_id}-${r}`,title:e.label,meta:Y(e.kind,t),target:L,openLabel:n}))}var G={upload:`chronicle.sourceType.upload`,note:`chronicle.sourceType.note`,web_url:`chronicle.sourceType.web_url`,conversation:`chronicle.sourceType.conversation`,local_file:`chronicle.sourceType.local_file`,image:`chronicle.sourceType.image`};function K(e,t){return d(t,G[e]||`chronicle.sourceType.other`)}function q(e,t){let n=`ui.entity.${e}`,r=d(t,n);return r===n?d(t,`chronicle.entityType.other`):r}var J={fact_superseded:`chronicle.change.fact_superseded`,fact_retired:`chronicle.change.fact_retired`,connection_superseded:`chronicle.change.connection_superseded`,connection_ended:`chronicle.change.connection_ended`};function Y(e,t){return d(t,J[e]||`chronicle.change.other`)}var X=1e3,Z=220,Q=7;function te({timeline:e,index:t,onIndexChange:n,language:r}){let[i,a]=b.useState(null),o=Math.max(e.length-1,0),s=e[t],c=b.useMemo(()=>M(e,X,Z),[e]),l=o>0?t/o*100:100,u=b.useCallback((e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0)return;let i=(e-r.left)/r.width;n(Math.round(Math.min(Math.max(i,0),1)*o))},[o,n]);b.useEffect(()=>{if(!i)return;let e=e=>u(e.clientX,i),t=()=>a(null);return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[i,u]);let p=e=>{let r=ne(e.key,t,o);r!==null&&(e.preventDefault(),n(r))},m=s?d(r,`chronicle.growth.valueText`,{date:s.date,sources:f(s.sources),entities:f(s.entities),connections:f(s.connections),conversations:f(s.conversations)}):d(r,`chronicle.growth.aria`);return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-growth`,"data-testid":`chronicle-growth`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(r,`chronicle.growth.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:d(r,`chronicle.growth.hint`)})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-plot`,children:[(0,x.jsxs)(`svg`,{className:`chronicle-growth-chart`,viewBox:`0 0 ${X} ${Z}`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{className:`chronicle-growth-area`,d:c.area}),(0,x.jsx)(`path`,{className:`chronicle-growth-line`,d:c.line,vectorEffect:`non-scaling-stroke`})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-track${i?` is-dragging`:``}`,"data-testid":`chronicle-scrubber`,role:`slider`,tabIndex:0,"aria-label":d(r,`chronicle.growth.aria`),"aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":t,"aria-valuetext":m,onKeyDown:p,onPointerDown:e=>{a(e.currentTarget),u(e.clientX,e.currentTarget)},children:[(0,x.jsx)(`span`,{className:`chronicle-growth-marker`,style:{left:`${l}%`},"aria-hidden":`true`}),(0,x.jsx)(`span`,{className:`chronicle-growth-handle`,style:{left:`${l}%`},"aria-hidden":`true`})]})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-axis`,children:[(0,x.jsx)(`span`,{children:d(r,`chronicle.growth.first`)}),(0,x.jsx)(`strong`,{"data-testid":`chronicle-scrubber-date`,children:s?s.date:d(r,`chronicle.growth.latest`)}),(0,x.jsx)(`span`,{children:d(r,`chronicle.growth.latest`)})]}),(0,x.jsxs)(`dl`,{className:`chronicle-lane-row`,children:[(0,x.jsx)($,{labelKey:`chronicle.lane.sources`,value:s?.sources,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.entities`,value:s?.entities,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.connections`,value:s?.connections,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.conversations`,value:s?.conversations,language:r})]})]})}function $({labelKey:e,value:t,language:n}){return(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:d(n,e)}),(0,x.jsx)(`dd`,{children:f(t)})]})}function ne(e,t,n){let r={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1,PageDown:-7,PageUp:Q};if(e===`Home`)return 0;if(e===`End`)return n;let i=r[e];return i===void 0?null:Math.min(Math.max(t+i,0),n)}function re({asOf:e,date:t,loading:n,onReset:r,language:i}){return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-rewind`,"data-testid":`chronicle-rewind`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(i,`chronicle.rewind.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:d(i,`chronicle.rewind.subtitle`,{date:t})}),(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-reset`,onClick:r,children:[(0,x.jsx)(c,{"aria-hidden":`true`}),d(i,`chronicle.rewind.reset`)]})]}),n||!e?(0,x.jsx)(`p`,{className:`chronicle-note`,role:`status`,children:d(i,`chronicle.rewind.loading`)}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`dl`,{className:`chronicle-lane-row chronicle-rewind-stats`,children:[(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:d(i,`chronicle.rewind.entities`)}),(0,x.jsx)(`dd`,{"data-testid":`chronicle-rewind-entities`,children:f(e.stats.entities)})]}),(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:d(i,`chronicle.rewind.connections`)}),(0,x.jsx)(`dd`,{children:f(e.stats.connections)})]})]}),(0,x.jsx)(`p`,{className:`chronicle-note chronicle-rewind-note`,children:d(i,`chronicle.rewind.note`)}),(0,x.jsx)(`h3`,{className:`chronicle-group-title`,children:d(i,`chronicle.rewind.top`)}),e.top_entities.length===0?(0,x.jsx)(`p`,{className:`chronicle-group-empty`,children:d(i,`chronicle.rewind.topEmpty`)}):(0,x.jsx)(`ul`,{className:`chronicle-group-list chronicle-rewind-list`,children:e.top_entities.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-item`,"aria-label":`${e.label} — ${d(i,`chronicle.open.entity`)}`,onClick:()=>m(`/knowledge-graph`),children:[(0,x.jsx)(`span`,{className:`chronicle-item-title`,children:e.label}),(0,x.jsx)(`span`,{className:`chronicle-item-meta`,children:q(e.type,i)})]})},e.id))})]})]})}function ie(){let e=_(e=>e.language),t=l({queryKey:[`chronicleOverview`],queryFn:h.chronicleOverview}),n=t.data,o=n?.data,s=b.useMemo(()=>ee(o?.series??[]),[o]),c=b.useMemo(()=>j(s),[s]),[u,f]=b.useState(null),m=Math.max(s.length-1,0),g=u===null?-1:s.findIndex(e=>e.date===u),v=g>=0?g:m,y=s[v],S=y?y.date:``,w=!!y&&v<m,T=l({queryKey:[`chronicleDay`,S],queryFn:()=>h.chronicleDay(S),enabled:S!==``}),E=l({queryKey:[`chronicleAsOf`,S],queryFn:()=>h.chronicleAsOf(P(S)),enabled:w});return(0,x.jsxs)(`div`,{className:`product-page chronicle-page`,"data-testid":`page-chronicle`,children:[(0,x.jsxs)(`header`,{className:`page-hero`,children:[(0,x.jsxs)(`div`,{className:`page-kicker`,children:[(0,x.jsx)(p,{className:`h-4 w-4`}),` `,d(e,`chronicle.kicker`)]}),(0,x.jsx)(`h1`,{className:`page-title`,children:d(e,`chronicle.title`)}),(0,x.jsx)(`p`,{className:`page-copy`,children:d(e,`chronicle.copy`)})]}),t.isLoading?(0,x.jsx)(i,{title:d(e,`chronicle.loading`)}):n&&!n.ok?(0,x.jsx)(r,{result:n}):s.length===0?(0,x.jsx)(a,{title:d(e,`chronicle.empty.title`),detail:d(e,`chronicle.empty.detail`)}):(0,x.jsxs)(`div`,{className:`chronicle-stack`,children:[(0,x.jsx)(te,{timeline:s,index:v,onIndexChange:e=>f(s[e].date),language:e}),(0,x.jsx)(C,{weeks:c,selectedDate:S,onSelect:f,language:e}),w?(0,x.jsx)(re,{asOf:E.data?.data??null,date:S,loading:E.isPending,onReset:()=>f(null),language:e}):null,(0,x.jsx)(z,{day:T.data?.data??null,loading:T.isPending,language:e})]})]})}export{ie as ChroniclePage};
|
|
1
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{c as r,o as i,r as a,y as o}from"./primitives-BDryQl6H.js";import{t as s}from"./link-2-CcYzeM7M.js";import{A as c,H as l,R as u,S as d,d as f,j as p,o as m,v as h,w as g,z as _}from"./index-CfeqZ9Ri.js";var v=u(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),y=u(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),b=e(t());g({ko:{"chronicle.kicker":`기억의 연대기`,"chronicle.title":`두뇌가 자라온 시간`,"chronicle.copy":`언제 무엇이 들어왔고 무엇이 달라졌는지, 날짜로 되짚어 봅니다.`,"chronicle.loading":`연대기를 불러오는 중입니다.`,"chronicle.empty.title":`오늘부터 기록이 쌓입니다`,"chronicle.empty.detail":`자료를 넣거나 대화를 나누면, 그날부터 이 자리에 하루하루가 남습니다.`,"chronicle.lane.sources":`자료`,"chronicle.lane.entities":`개념`,"chronicle.lane.connections":`연결`,"chronicle.lane.conversations":`대화`,"chronicle.growth.title":`쌓인 기억`,"chronicle.growth.hint":`손잡이를 좌우로 옮기면 그 시점으로 돌아갑니다. 방향키로도 하루씩 움직일 수 있어요.`,"chronicle.growth.aria":`시점 고르기`,"chronicle.growth.valueText":`{date} · 자료 {sources} · 개념 {entities} · 연결 {connections} · 대화 {conversations}`,"chronicle.growth.first":`처음`,"chronicle.growth.latest":`지금`,"chronicle.heatmap.title":`활동 달력`,"chronicle.heatmap.hint":`진한 칸일수록 그날 많이 쌓였다는 뜻이에요. 칸을 누르면 그날 이야기가 아래에 열립니다.`,"chronicle.heatmap.aria":`날짜별 활동`,"chronicle.heatmap.cell":`{date}, {count}가지`,"chronicle.heatmap.cellEmpty":`{date}, 쌓인 것 없음`,"chronicle.heatmap.less":`적음`,"chronicle.heatmap.more":`많음`,"chronicle.weekday.sun":`일`,"chronicle.weekday.mon":`월`,"chronicle.weekday.tue":`화`,"chronicle.weekday.wed":`수`,"chronicle.weekday.thu":`목`,"chronicle.weekday.fri":`금`,"chronicle.weekday.sat":`토`,"chronicle.day.title":`그날의 이야기`,"chronicle.day.loading":`그날 이야기를 불러오는 중입니다.`,"chronicle.day.quiet":`이 날은 조용했습니다. 남은 기록이 없어요.`,"chronicle.group.sources":`자료`,"chronicle.group.entities":`새로 생긴 개념`,"chronicle.group.conversations":`나눈 대화`,"chronicle.group.changes":`달라진 사실`,"chronicle.group.count":`{count}개`,"chronicle.group.empty":`이 날은 없어요.`,"chronicle.group.more":`이 밖에 {count}개가 더 있어요.`,"chronicle.open.source":`기억에서 찾아보기`,"chronicle.open.entity":`지도에서 보기`,"chronicle.open.conversation":`대화로 가기`,"chronicle.open.change":`지도에서 보기`,"chronicle.sourceType.upload":`올린 파일`,"chronicle.sourceType.note":`메모`,"chronicle.sourceType.web_url":`웹 페이지`,"chronicle.sourceType.conversation":`대화`,"chronicle.sourceType.local_file":`내 컴퓨터 파일`,"chronicle.sourceType.image":`그림`,"chronicle.sourceType.other":`자료`,"chronicle.entityType.other":`개념`,"chronicle.conversation.untitled":`제목 없는 대화`,"chronicle.conversation.messages":`{count}번 주고받음`,"chronicle.change.fact_superseded":`새 내용으로 바뀐 사실`,"chronicle.change.fact_retired":`더 이상 사실이 아닌 것`,"chronicle.change.connection_superseded":`다시 이어진 관계`,"chronicle.change.connection_ended":`끊어진 관계`,"chronicle.change.other":`달라진 것`,"chronicle.rewind.title":`그때의 두뇌`,"chronicle.rewind.subtitle":`{date}에 두뇌가 알고 있던 것`,"chronicle.rewind.loading":`그때 모습을 불러오는 중입니다.`,"chronicle.rewind.entities":`기억 조각`,"chronicle.rewind.connections":`이어진 관계`,"chronicle.rewind.note":`여기 두 숫자는 그때 저장돼 있던 모든 것을 셉니다. 위 곡선의 ‘개념’과는 세는 방식이 달라요.`,"chronicle.rewind.top":`그때 중요했던 개념`,"chronicle.rewind.topEmpty":`그때는 아직 눈에 띄는 개념이 없었어요.`,"chronicle.rewind.reset":`지금으로 돌아오기`},en:{"chronicle.kicker":`Brain Chronicle`,"chronicle.title":`How your Brain grew`,"chronicle.copy":`Walk back through what arrived, and what changed, one day at a time.`,"chronicle.loading":`Loading the chronicle.`,"chronicle.empty.title":`The record starts today`,"chronicle.empty.detail":`Add something or have a conversation, and that day will show up right here.`,"chronicle.lane.sources":`Sources`,"chronicle.lane.entities":`Ideas`,"chronicle.lane.connections":`Links`,"chronicle.lane.conversations":`Chats`,"chronicle.growth.title":`What has piled up`,"chronicle.growth.hint":`Drag the handle to travel back to that moment. Arrow keys move a day at a time.`,"chronicle.growth.aria":`Pick a moment`,"chronicle.growth.valueText":`{date} · {sources} sources · {entities} ideas · {connections} links · {conversations} chats`,"chronicle.growth.first":`First`,"chronicle.growth.latest":`Now`,"chronicle.heatmap.title":`Activity calendar`,"chronicle.heatmap.hint":`A darker square means more arrived that day. Pick one and its story opens below.`,"chronicle.heatmap.aria":`Activity by day`,"chronicle.heatmap.cell":`{date}, {count} things`,"chronicle.heatmap.cellEmpty":`{date}, nothing arrived`,"chronicle.heatmap.less":`Less`,"chronicle.heatmap.more":`More`,"chronicle.weekday.sun":`Sun`,"chronicle.weekday.mon":`Mon`,"chronicle.weekday.tue":`Tue`,"chronicle.weekday.wed":`Wed`,"chronicle.weekday.thu":`Thu`,"chronicle.weekday.fri":`Fri`,"chronicle.weekday.sat":`Sat`,"chronicle.day.title":`That day's story`,"chronicle.day.loading":`Loading that day.`,"chronicle.day.quiet":`A quiet day — nothing was recorded.`,"chronicle.group.sources":`Sources`,"chronicle.group.entities":`New ideas`,"chronicle.group.conversations":`Conversations`,"chronicle.group.changes":`What changed`,"chronicle.group.count":`{count}`,"chronicle.group.empty":`Nothing this day.`,"chronicle.group.more":`And {count} more.`,"chronicle.open.source":`Find it in memory`,"chronicle.open.entity":`See it on the map`,"chronicle.open.conversation":`Go to conversations`,"chronicle.open.change":`See it on the map`,"chronicle.sourceType.upload":`Uploaded file`,"chronicle.sourceType.note":`Note`,"chronicle.sourceType.web_url":`Web page`,"chronicle.sourceType.conversation":`Conversation`,"chronicle.sourceType.local_file":`File on this computer`,"chronicle.sourceType.image":`Picture`,"chronicle.sourceType.other":`Source`,"chronicle.entityType.other":`Idea`,"chronicle.conversation.untitled":`Untitled conversation`,"chronicle.conversation.messages":`{count} messages`,"chronicle.change.fact_superseded":`Replaced by newer wording`,"chronicle.change.fact_retired":`No longer true`,"chronicle.change.connection_superseded":`Relinked a different way`,"chronicle.change.connection_ended":`Link ended`,"chronicle.change.other":`Changed`,"chronicle.rewind.title":`Your Brain back then`,"chronicle.rewind.subtitle":`What it knew on {date}`,"chronicle.rewind.loading":`Loading how it looked then.`,"chronicle.rewind.entities":`Pieces of memory`,"chronicle.rewind.connections":`Links between them`,"chronicle.rewind.note":`These two count everything stored at that moment. That is a different measure from the “ideas” line in the curve above.`,"chronicle.rewind.top":`What mattered most then`,"chronicle.rewind.topEmpty":`Nothing stood out yet at that point.`,"chronicle.rewind.reset":`Back to now`}});var x=n(),S=[`chronicle.weekday.sun`,`chronicle.weekday.mon`,`chronicle.weekday.tue`,`chronicle.weekday.wed`,`chronicle.weekday.thu`,`chronicle.weekday.fri`,`chronicle.weekday.sat`];function C({weeks:e,selectedDate:t,onSelect:n,language:r}){return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-heatmap`,"data-testid":`chronicle-heatmap`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(r,`chronicle.heatmap.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:d(r,`chronicle.heatmap.hint`)})]}),(0,x.jsxs)(`div`,{className:`chronicle-heatmap-scroll`,children:[(0,x.jsx)(`div`,{className:`chronicle-heatmap-weekdays`,"aria-hidden":`true`,children:S.map(e=>(0,x.jsx)(`span`,{children:d(r,e)},e))}),(0,x.jsx)(`div`,{className:`chronicle-heatmap-grid`,role:`group`,"aria-label":d(r,`chronicle.heatmap.aria`),children:e.map(e=>(0,x.jsx)(`div`,{className:`chronicle-heatmap-week`,children:e.cells.map((i,a)=>i?(0,x.jsx)(`button`,{type:`button`,className:`chronicle-heatmap-cell`,"data-level":i.level,"data-testid":`chronicle-heatmap-cell`,"aria-pressed":i.date===t,"aria-label":d(r,i.daily>0?`chronicle.heatmap.cell`:`chronicle.heatmap.cellEmpty`,{date:i.date,count:f(i.daily)}),onClick:()=>n(i.date)},i.date):(0,x.jsx)(`span`,{className:`chronicle-heatmap-cell is-blank`,"aria-hidden":`true`},`${e.key}-${a}`))},e.key))})]}),(0,x.jsxs)(`p`,{className:`chronicle-heatmap-legend`,children:[(0,x.jsx)(`span`,{children:d(r,`chronicle.heatmap.less`)}),(0,x.jsx)(`span`,{className:`chronicle-heatmap-swatches`,"aria-hidden":`true`,children:[0,1,2,3,4].map(e=>(0,x.jsx)(`span`,{className:`chronicle-heatmap-cell`,"data-level":e},e))}),(0,x.jsx)(`span`,{children:d(r,`chronicle.heatmap.more`)})]})]})}var w=864e5,T=/^(\d{4})-(\d{2})-(\d{2})$/;function E(e){let t=T.exec(e);if(!t)return null;let n=Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]));return D(n)===e?n:null}function D(e){return new Date(e).toISOString().slice(0,10)}function O(e){let t=E(e);return t===null?0:new Date(t).getUTCDay()}function ee(e){let t=new Map;for(let n of e){let e=E(n.date);e!==null&&t.set(D(e),n)}let n=[...t.keys()].sort();if(!n.length)return[];let r=E(n[0]),i=E(n[n.length-1]),a=[],o=0,s=0,c=0,l=0;for(let e=r;e<=i;e+=w){let n=D(e),r=t.get(n),i=r?k(r.sources)+k(r.entities)+k(r.connections)+k(r.conversations):0;r&&(o+=k(r.sources),s+=k(r.entities),c+=k(r.connections),l+=k(r.conversations)),a.push({date:n,sources:o,entities:s,connections:c,conversations:l,total:o+s+c+l,daily:i})}return a}function k(e){return typeof e==`number`&&Number.isFinite(e)?e:0}function A(e,t){if(e<=0)return 0;if(t<=0)return 1;let n=e/t;return n>.66?4:n>.33?3:n>.12?2:1}function j(e){if(!e.length)return[];let t=e.reduce((e,t)=>Math.max(e,t.daily),0),n=E(e[0].date),r=E(e[e.length-1].date),i=n-O(e[0].date)*w,a=r+(6-O(e[e.length-1].date))*w,o=new Map(e.map(e=>[e.date,e.daily])),s=[];for(let e=i;e<=a;e+=7*w){let n=[];for(let r=0;r<7;r+=1){let i=D(e+r*w),a=o.get(i);n.push(a===void 0?null:{date:i,daily:a,level:A(a,t)})}s.push({key:D(e),cells:n})}return s}function M(e,t,n){if(!e.length)return{area:``,line:``};let r=e[e.length-1].total,i=Math.max(e.length-1,1),a=e.map((e,a)=>({x:a/i*t,y:n-(r>0?e.total/r*n:0)})),o=[`M ${N(a[0].x)} ${N(a[0].y)}`];for(let e=1;e<a.length;e+=1)o.push(`L ${N(a[e].x)} ${N(a[e-1].y)}`),o.push(`L ${N(a[e].x)} ${N(a[e].y)}`);let s=o.join(` `);return{area:`${s} ${`L ${N(a[a.length-1].x)} ${n} L ${N(a[0].x)} ${n} Z`}`,line:s}}function N(e){return Math.round(e*100)/100}function P(e){return`${e}T23:59:59`}var F=8,I=`/hybrid-search`,L=`/knowledge-graph`,R=`/brain`;function z({day:e,loading:t,language:n}){let r=(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(n,`chronicle.day.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,"data-testid":`chronicle-day-date`,children:e?e.date:``})]});return t||!e?(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-day`,"data-testid":`chronicle-day`,children:[r,(0,x.jsx)(`p`,{className:`chronicle-note`,role:`status`,children:d(n,`chronicle.day.loading`)})]}):(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-day`,"data-testid":`chronicle-day`,children:[r,e.counts.sources+e.counts.entities+e.counts.conversations+e.counts.changes===0?(0,x.jsx)(`p`,{className:`chronicle-note`,"data-testid":`chronicle-day-quiet`,children:d(n,`chronicle.day.quiet`)}):(0,x.jsxs)(`div`,{className:`chronicle-day-groups`,children:[(0,x.jsx)(B,{titleKey:`chronicle.group.sources`,icon:(0,x.jsx)(v,{"aria-hidden":`true`}),count:e.counts.sources,items:V(e,n),language:n}),(0,x.jsx)(B,{titleKey:`chronicle.group.entities`,icon:(0,x.jsx)(o,{"aria-hidden":`true`}),count:e.counts.entities,items:H(e,n),language:n}),(0,x.jsx)(B,{titleKey:`chronicle.group.conversations`,icon:(0,x.jsx)(y,{"aria-hidden":`true`}),count:e.counts.conversations,items:U(e,n),language:n}),(0,x.jsx)(B,{titleKey:`chronicle.group.changes`,icon:(0,x.jsx)(s,{"aria-hidden":`true`}),count:e.counts.changes,items:W(e,n),language:n})]})]})}function B({titleKey:e,icon:t,count:n,items:r,language:i}){let a=r.slice(0,F),o=Math.max(n-a.length,0);return(0,x.jsxs)(`article`,{className:`chronicle-group`,"data-testid":`chronicle-group`,children:[(0,x.jsxs)(`h3`,{className:`chronicle-group-title`,children:[(0,x.jsx)(`span`,{className:`chronicle-group-icon`,children:t}),d(i,e),(0,x.jsx)(`span`,{className:`chronicle-group-count`,children:d(i,`chronicle.group.count`,{count:f(n)})})]}),a.length===0?(0,x.jsx)(`p`,{className:`chronicle-group-empty`,children:d(i,`chronicle.group.empty`)}):(0,x.jsx)(`ul`,{className:`chronicle-group-list`,children:a.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-item`,"aria-label":`${e.title} — ${e.openLabel}`,onClick:()=>m(e.target),children:[(0,x.jsx)(`span`,{className:`chronicle-item-title`,children:e.title}),(0,x.jsx)(`span`,{className:`chronicle-item-meta`,children:e.meta})]})},e.key))}),o>0?(0,x.jsx)(`p`,{className:`chronicle-group-more`,children:d(i,`chronicle.group.more`,{count:f(o)})}):null]})}function V(e,t){let n=d(t,`chronicle.open.source`);return e.groups.sources.map(e=>({key:e.id,title:e.title,meta:K(e.source_type,t),target:I,openLabel:n}))}function H(e,t){let n=d(t,`chronicle.open.entity`);return e.groups.entities.map(e=>({key:e.id,title:e.label,meta:q(e.type,t),target:L,openLabel:n}))}function U(e,t){let n=d(t,`chronicle.open.conversation`);return e.groups.conversations.map((e,r)=>({key:e.conversation_id||`loose-${r}`,title:e.preview||d(t,`chronicle.conversation.untitled`),meta:d(t,`chronicle.conversation.messages`,{count:f(e.messages)}),target:R,openLabel:n}))}function W(e,t){let n=d(t,`chronicle.open.change`);return e.groups.changes.map((e,r)=>({key:`${e.node_id}-${r}`,title:e.label,meta:Y(e.kind,t),target:L,openLabel:n}))}var G={upload:`chronicle.sourceType.upload`,note:`chronicle.sourceType.note`,web_url:`chronicle.sourceType.web_url`,conversation:`chronicle.sourceType.conversation`,local_file:`chronicle.sourceType.local_file`,image:`chronicle.sourceType.image`};function K(e,t){return d(t,G[e]||`chronicle.sourceType.other`)}function q(e,t){let n=`ui.entity.${e}`,r=d(t,n);return r===n?d(t,`chronicle.entityType.other`):r}var J={fact_superseded:`chronicle.change.fact_superseded`,fact_retired:`chronicle.change.fact_retired`,connection_superseded:`chronicle.change.connection_superseded`,connection_ended:`chronicle.change.connection_ended`};function Y(e,t){return d(t,J[e]||`chronicle.change.other`)}var X=1e3,Z=220,Q=7;function te({timeline:e,index:t,onIndexChange:n,language:r}){let[i,a]=b.useState(null),o=Math.max(e.length-1,0),s=e[t],c=b.useMemo(()=>M(e,X,Z),[e]),l=o>0?t/o*100:100,u=b.useCallback((e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0)return;let i=(e-r.left)/r.width;n(Math.round(Math.min(Math.max(i,0),1)*o))},[o,n]);b.useEffect(()=>{if(!i)return;let e=e=>u(e.clientX,i),t=()=>a(null);return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[i,u]);let p=e=>{let r=ne(e.key,t,o);r!==null&&(e.preventDefault(),n(r))},m=s?d(r,`chronicle.growth.valueText`,{date:s.date,sources:f(s.sources),entities:f(s.entities),connections:f(s.connections),conversations:f(s.conversations)}):d(r,`chronicle.growth.aria`);return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-growth`,"data-testid":`chronicle-growth`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(r,`chronicle.growth.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:d(r,`chronicle.growth.hint`)})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-plot`,children:[(0,x.jsxs)(`svg`,{className:`chronicle-growth-chart`,viewBox:`0 0 ${X} ${Z}`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{className:`chronicle-growth-area`,d:c.area}),(0,x.jsx)(`path`,{className:`chronicle-growth-line`,d:c.line,vectorEffect:`non-scaling-stroke`})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-track${i?` is-dragging`:``}`,"data-testid":`chronicle-scrubber`,role:`slider`,tabIndex:0,"aria-label":d(r,`chronicle.growth.aria`),"aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":t,"aria-valuetext":m,onKeyDown:p,onPointerDown:e=>{a(e.currentTarget),u(e.clientX,e.currentTarget)},children:[(0,x.jsx)(`span`,{className:`chronicle-growth-marker`,style:{left:`${l}%`},"aria-hidden":`true`}),(0,x.jsx)(`span`,{className:`chronicle-growth-handle`,style:{left:`${l}%`},"aria-hidden":`true`})]})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-axis`,children:[(0,x.jsx)(`span`,{children:d(r,`chronicle.growth.first`)}),(0,x.jsx)(`strong`,{"data-testid":`chronicle-scrubber-date`,children:s?s.date:d(r,`chronicle.growth.latest`)}),(0,x.jsx)(`span`,{children:d(r,`chronicle.growth.latest`)})]}),(0,x.jsxs)(`dl`,{className:`chronicle-lane-row`,children:[(0,x.jsx)($,{labelKey:`chronicle.lane.sources`,value:s?.sources,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.entities`,value:s?.entities,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.connections`,value:s?.connections,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.conversations`,value:s?.conversations,language:r})]})]})}function $({labelKey:e,value:t,language:n}){return(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:d(n,e)}),(0,x.jsx)(`dd`,{children:f(t)})]})}function ne(e,t,n){let r={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1,PageDown:-7,PageUp:Q};if(e===`Home`)return 0;if(e===`End`)return n;let i=r[e];return i===void 0?null:Math.min(Math.max(t+i,0),n)}function re({asOf:e,date:t,loading:n,onReset:r,language:i}){return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-rewind`,"data-testid":`chronicle-rewind`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:d(i,`chronicle.rewind.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:d(i,`chronicle.rewind.subtitle`,{date:t})}),(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-reset`,onClick:r,children:[(0,x.jsx)(c,{"aria-hidden":`true`}),d(i,`chronicle.rewind.reset`)]})]}),n||!e?(0,x.jsx)(`p`,{className:`chronicle-note`,role:`status`,children:d(i,`chronicle.rewind.loading`)}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`dl`,{className:`chronicle-lane-row chronicle-rewind-stats`,children:[(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:d(i,`chronicle.rewind.entities`)}),(0,x.jsx)(`dd`,{"data-testid":`chronicle-rewind-entities`,children:f(e.stats.entities)})]}),(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:d(i,`chronicle.rewind.connections`)}),(0,x.jsx)(`dd`,{children:f(e.stats.connections)})]})]}),(0,x.jsx)(`p`,{className:`chronicle-note chronicle-rewind-note`,children:d(i,`chronicle.rewind.note`)}),(0,x.jsx)(`h3`,{className:`chronicle-group-title`,children:d(i,`chronicle.rewind.top`)}),e.top_entities.length===0?(0,x.jsx)(`p`,{className:`chronicle-group-empty`,children:d(i,`chronicle.rewind.topEmpty`)}):(0,x.jsx)(`ul`,{className:`chronicle-group-list chronicle-rewind-list`,children:e.top_entities.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-item`,"aria-label":`${e.label} — ${d(i,`chronicle.open.entity`)}`,onClick:()=>m(`/knowledge-graph`),children:[(0,x.jsx)(`span`,{className:`chronicle-item-title`,children:e.label}),(0,x.jsx)(`span`,{className:`chronicle-item-meta`,children:q(e.type,i)})]})},e.id))})]})]})}function ie(){let e=_(e=>e.language),t=l({queryKey:[`chronicleOverview`],queryFn:h.chronicleOverview}),n=t.data,o=n?.data,s=b.useMemo(()=>ee(o?.series??[]),[o]),c=b.useMemo(()=>j(s),[s]),[u,f]=b.useState(null),m=Math.max(s.length-1,0),g=u===null?-1:s.findIndex(e=>e.date===u),v=g>=0?g:m,y=s[v],S=y?y.date:``,w=!!y&&v<m,T=l({queryKey:[`chronicleDay`,S],queryFn:()=>h.chronicleDay(S),enabled:S!==``}),E=l({queryKey:[`chronicleAsOf`,S],queryFn:()=>h.chronicleAsOf(P(S)),enabled:w});return(0,x.jsxs)(`div`,{className:`product-page chronicle-page`,"data-testid":`page-chronicle`,children:[(0,x.jsxs)(`header`,{className:`page-hero`,children:[(0,x.jsxs)(`div`,{className:`page-kicker`,children:[(0,x.jsx)(p,{className:`h-4 w-4`}),` `,d(e,`chronicle.kicker`)]}),(0,x.jsx)(`h1`,{className:`page-title`,children:d(e,`chronicle.title`)}),(0,x.jsx)(`p`,{className:`page-copy`,children:d(e,`chronicle.copy`)})]}),t.isLoading?(0,x.jsx)(i,{title:d(e,`chronicle.loading`)}):n&&!n.ok?(0,x.jsx)(r,{result:n}):s.length===0?(0,x.jsx)(a,{title:d(e,`chronicle.empty.title`),detail:d(e,`chronicle.empty.detail`)}):(0,x.jsxs)(`div`,{className:`chronicle-stack`,children:[(0,x.jsx)(te,{timeline:s,index:v,onIndexChange:e=>f(s[e].date),language:e}),(0,x.jsx)(C,{weeks:c,selectedDate:S,onSelect:f,language:e}),w?(0,x.jsx)(re,{asOf:E.data?.data??null,date:S,loading:E.isPending,onReset:()=>f(null),language:e}):null,(0,x.jsx)(z,{day:T.data?.data??null,loading:T.isPending,language:e})]})]})}export{ie as ChroniclePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./bot-
|
|
1
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./bot-Dkd-DbiP.js";import{t as i}from"./search-DHsPwmPw.js";import{n as a,t as o}from"./useFocusTrap-CV73DLHn.js";import{H as s,M as c,P as l,R as u,S as d,T as f,c as p,o as m,v as h}from"./index-CfeqZ9Ri.js";var g=u(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),_=u(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),v=u(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),y=e(t()),b=n(),x=f.map(e=>{let t=e.icon;return{...e,icon:(0,b.jsx)(t,{className:`h-4 w-4`})}});function S(e,t){let[n,r]=y.useState(e);return y.useEffect(()=>{let n=window.setTimeout(()=>r(e),t);return()=>window.clearTimeout(n)},[e,t]),n}function C({language:e,initialOpen:t=!1}){let[n,u]=y.useState(t),[f,C]=y.useState(``),[w,T]=y.useState(0),E=y.useRef(null),D=S(f.trim(),220);y.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),u(e=>!e))},t=()=>u(!0);return window.addEventListener(`keydown`,e),window.addEventListener(`lattice:open-command`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`lattice:open-command`,t)}},[]),y.useEffect(()=>{n&&(C(``),T(0),window.setTimeout(()=>E.current?.focus(),0))},[n]);let O=s({queryKey:[`commandSearch`,D],queryFn:()=>h.commandSearch(D),enabled:n&&D.length>0}),k=s({queryKey:[`commandBriefing`],queryFn:h.commandBriefing,enabled:n,staleTime:6e4}),A=y.useMemo(()=>{let t=f.trim().toLowerCase(),n=[];if(!t&&k.data?.ok){let t=(k.data.data||{}).sections||{},r=t.review||{},i=t.suggestions||{},o=Number(i.count??0)||0,s=Number(r.pending??0)||0;n.push({id:`proactive-briefing`,group:`proactive`,title:d(e,`command.proactive.briefing`),detail:o>0?d(e,`command.proactive.suggestions`,{count:o}):void 0,icon:(0,b.jsx)(a,{className:`h-4 w-4`}),target:`/brain`,action:`open-briefing`}),n.push({id:`proactive-review`,group:`proactive`,title:d(e,`command.proactive.review`),detail:s>0?d(e,`command.proactive.pending`,{count:s}):void 0,icon:(0,b.jsx)(c,{className:`h-4 w-4`}),target:`/act/review`}),n.push({id:`proactive-ask`,group:`proactive`,title:d(e,`briefing.action.askBrain`),icon:(0,b.jsx)(v,{className:`h-4 w-4`}),target:`/brain`})}let i=x.map(t=>({id:t.id,group:`pages`,title:d(e,t.labelKey),icon:t.icon,target:t.target})).filter(e=>!t||e.title.toLowerCase().includes(t)),o=p(O.data?.data?.groups),s=[];for(let t of o)for(let n of p(t.items))t.kind===`knowledge`?s.push({id:`kg-${String(n.id??s.length)}`,group:`knowledge`,title:String(n.title||n.id||``),detail:String(n.summary||n.type||``),icon:(0,b.jsx)(l,{className:`h-4 w-4`}),target:`/brain/graph`}):t.kind===`conversation`?s.push({id:`conv-${String(n.conversation_id??s.length)}`,group:`conversation`,title:String(n.snippet||``),detail:String(n.timestamp||``).slice(0,10),icon:(0,b.jsx)(v,{className:`h-4 w-4`}),target:`/brain`}):t.kind===`automation`&&s.push({id:`wf-${String(n.id??s.length)}`,group:`automation`,title:String(n.name||``),detail:n.enabled?d(e,`command.automation.enabled`):d(e,`command.automation.draft`),icon:(0,b.jsx)(r,{className:`h-4 w-4`}),target:`/act/workflows`});return[...n,...s,...i]},[e,f,O.data,k.data]);y.useEffect(()=>{T(0)},[A.length,D]);let j=y.useCallback(()=>u(!1),[]),M=o(j,n),N=y.useCallback(e=>{e&&(j(),m(e.target),e.action===`open-briefing`&&window.dispatchEvent(new Event(`lattice:open-briefing`)))},[j]),P=e=>{e.key===`Escape`?(e.preventDefault(),j()):e.key===`ArrowDown`?(e.preventDefault(),T(e=>Math.min(e+1,Math.max(A.length-1,0)))):e.key===`ArrowUp`?(e.preventDefault(),T(e=>Math.max(e-1,0))):e.key===`Enter`&&(e.preventDefault(),N(A[w]))};if(!n)return null;let F={proactive:d(e,`command.proactive.title`),pages:d(e,`command.group.pages`),knowledge:d(e,`command.group.knowledge`),conversation:d(e,`command.group.conversation`),automation:d(e,`command.group.automation`)},I=null;return(0,b.jsx)(`div`,{className:`command-palette-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&j()},children:(0,b.jsxs)(`div`,{ref:M,className:`command-palette`,role:`dialog`,"aria-modal":`true`,"aria-label":d(e,`command.title`),"data-testid":`command-palette`,children:[(0,b.jsxs)(`div`,{className:`command-palette-input`,children:[(0,b.jsx)(i,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,b.jsx)(`input`,{ref:E,value:f,onChange:e=>C(e.target.value),onKeyDown:P,placeholder:d(e,`command.placeholder`),"aria-label":d(e,`command.title`),autoComplete:`off`,spellCheck:!1}),(0,b.jsxs)(`span`,{className:`command-palette-hint`,"aria-hidden":`true`,children:[(0,b.jsx)(g,{className:`h-3 w-3`}),d(e,`command.shortcutKey`)]})]}),(0,b.jsxs)(`div`,{className:`command-palette-results`,role:`listbox`,"aria-label":d(e,`command.results`),children:[O.isFetching?(0,b.jsx)(`p`,{className:`command-palette-note`,children:d(e,`command.searching`)}):null,A.length===0&&!O.isFetching?(0,b.jsx)(`p`,{className:`command-palette-note`,children:d(e,`command.empty`)}):null,A.map((e,t)=>{let n=e.group===I?null:(0,b.jsx)(`p`,{className:`command-palette-group`,children:F[e.group]},`h-${e.group}`);return I=e.group,(0,b.jsxs)(y.Fragment,{children:[n,(0,b.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===w,className:`command-palette-item ${t===w?`is-active`:``}`,onMouseEnter:()=>T(t),onClick:()=>N(e),children:[e.icon,(0,b.jsx)(`span`,{className:`command-palette-item-title`,children:e.title}),e.detail?(0,b.jsx)(`span`,{className:`command-palette-item-detail`,children:e.detail}):null,t===w?(0,b.jsx)(_,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}):null]})]},e.id)})]}),(0,b.jsx)(`p`,{className:`command-palette-footer`,children:d(e,`command.footer`)})]})})}export{C as CommandPalette};
|