@selvakumaresra/specship 0.5.0 → 0.7.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.
Files changed (39) hide show
  1. package/README.md +6 -6
  2. package/dist/bin/specship.js +173 -0
  3. package/dist/bin/specship.js.map +1 -1
  4. package/dist/extraction/specs/markdown-spec-extractor.d.ts +19 -0
  5. package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -1
  6. package/dist/extraction/specs/markdown-spec-extractor.js +132 -11
  7. package/dist/extraction/specs/markdown-spec-extractor.js.map +1 -1
  8. package/dist/index.d.ts +10 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +16 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/mcp/spec-tools.d.ts.map +1 -1
  13. package/dist/mcp/spec-tools.js +87 -6
  14. package/dist/mcp/spec-tools.js.map +1 -1
  15. package/dist/resolution/brief-link-resolver.d.ts +114 -0
  16. package/dist/resolution/brief-link-resolver.d.ts.map +1 -0
  17. package/dist/resolution/brief-link-resolver.js +261 -0
  18. package/dist/resolution/brief-link-resolver.js.map +1 -0
  19. package/dist/server/routes/events.js +114 -0
  20. package/dist/server/routes/projects.js +1 -1
  21. package/dist/server/routes/spec.js +9 -0
  22. package/dist/server/server.js +2 -0
  23. package/dist/types.d.ts +1 -1
  24. package/dist/types.d.ts.map +1 -1
  25. package/dist/types.js +4 -0
  26. package/dist/types.js.map +1 -1
  27. package/dist/web/chunk-HGBF7AY5.js +1 -0
  28. package/dist/web/chunk-JQ534IB6.js +6 -0
  29. package/dist/web/chunk-WQWYTRFN.js +1 -0
  30. package/dist/web/icon-192.png +0 -0
  31. package/dist/web/icon-512.png +0 -0
  32. package/dist/web/index.html +2 -1
  33. package/dist/web/main-LHCYPOXF.js +1 -0
  34. package/dist/web/manifest.webmanifest +15 -0
  35. package/package.json +1 -1
  36. package/dist/web/chunk-BYZFQSM6.js +0 -1
  37. package/dist/web/chunk-ODX6CT3I.js +0 -6
  38. package/dist/web/chunk-SBWU7JFC.js +0 -1
  39. package/dist/web/main-X2KCYXZ4.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,sQA4Bb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,UAAU,GACV,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,GACT,cAAc,GACd,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,CAAC;AAEhB;;;GAGG;AACH,eAAO,MAAM,SAAS,0QA8BZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IAEX,2BAA2B;IAC3B,IAAI,EAAE,QAAQ,CAAC;IAEf,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IAEtB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IAEjB,2BAA2B;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IAEnB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAElB,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAEhB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IAEpB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAElB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gCAAgC;IAChC,SAAS,CAAC,EAAE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'data_schema',
102
+ // A brainstorm brief (`specs/<slug>/brief.md`) — the "idea" stage of the
103
+ // spec lifecycle, indexed as a first-class entity so the idea → spec →
104
+ // implemented funnel is queryable (REQ-FUNNEL-001).
105
+ 'brief',
102
106
  ];
103
107
  /**
104
108
  * Spec source format. Each format has its own extractor under
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;;;;;GAMG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,WAAW;IACX,OAAO;IACP,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,YAAY;IACZ,WAAW;IACX,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,WAAW;IACX,2EAA2E;IAC3E,qEAAqE;IACrE,yEAAyE;IACzE,yBAAyB;IACzB,MAAM;CACE,CAAC;AAuBX;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,GAAG;IACH,KAAK;IACL,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,YAAY;IACZ,SAAS;CACD,CAAC;AA0eX,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEhF;;;;;;;;;GASG;AACU,QAAA,UAAU,GAAG;IACxB,UAAU;IACV,aAAa;IACb,YAAY;IACZ,UAAU;IACV,aAAa;CACL,CAAC;AAIX;;;GAGG;AACU,QAAA,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;;;;;GAMG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,WAAW;IACX,OAAO;IACP,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,YAAY;IACZ,WAAW;IACX,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,WAAW;IACX,2EAA2E;IAC3E,qEAAqE;IACrE,yEAAyE;IACzE,yBAAyB;IACzB,MAAM;CACE,CAAC;AAuBX;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,GAAG;IACH,KAAK;IACL,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,YAAY;IACZ,SAAS;CACD,CAAC;AA0eX,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEhF;;;;;;;;;GASG;AACU,QAAA,UAAU,GAAG;IACxB,UAAU;IACV,aAAa;IACb,YAAY;IACZ,UAAU;IACV,aAAa;IACb,yEAAyE;IACzE,uEAAuE;IACvE,oDAAoD;IACpD,OAAO;CACC,CAAC;AAIX;;;GAGG;AACU,QAAA,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC"}
@@ -0,0 +1 @@
1
+ import{a as D,b as N}from"./chunk-WQWYTRFN.js";import{a as z}from"./chunk-UYC52MBC.js";import{a as T}from"./chunk-SUZYBYDW.js";import{a as M}from"./chunk-E44X4RH2.js";import{Aa as r,Ga as C,I as u,Ia as c,Ka as P,M as S,N as E,Ta as b,Ua as g,Va as n,W as v,Wa as f,ea as o,ka as w,qa as m,ra as x,sa as _,ua as k,va as h,wa as y,xa as s,ya as e,za as t,zb as O}from"./chunk-PDN6QYGJ.js";import"./chunk-Q7L6LLAK.js";var B=(a,l)=>l.model;function j(a,l){a&1&&n(0," Enabled \u2014 popups fire while the dashboard is open or backgrounded ")}function A(a,l){a&1&&n(0," Blocked \u2014 re-enable notifications for this site in your browser settings ")}function V(a,l){a&1&&n(0," Not supported in this browser ")}function $(a,l){a&1&&n(0," Get a desktop popup when a run needs approval, finishes, or drift appears ")}function F(a,l){if(a&1){let p=C();e(0,"button",49),c("click",function(){S(p);let d=P();return E(d.enableNotifications())}),n(1,"Enable"),t()}}function L(a,l){a&1&&(e(0,"span",24),n(1,"\u25CF On"),t())}function H(a,l){a&1&&(e(0,"span",25),n(1,"\u2014"),t())}function W(a,l){if(a&1&&(e(0,"div",33)(1,"span",50),n(2),t(),r(3,"input",51)(4,"input",51),t()),a&2){let p=l.$implicit;o(2),f(p.model),o(),s("value",p.input),o(),s("value",p.output)}}function q(a,l){if(a&1&&(e(0,"option"),n(1),t()),a&2){let p=l.$implicit;o(),f(p)}}var I=class a{api=u(M);theme=u(D);notify=u(N);setTheme(l){this.theme.setPref(l)}enableNotifications(){this.notify.requestPermission()}ingest=v(!0);watch=v(!0);motion=v(!1);toggleIngest(){this.ingest.update(l=>!l)}toggleWatch(){this.watch.update(l=>!l)}toggleMotion(){this.motion.update(l=>!l)}replayIntro(){try{sessionStorage.removeItem("specship-booted")}catch{}window.location.reload()}themeOptions=[{value:"dark",label:"Dark"},{value:"light",label:"Light"},{value:"system",label:"System"}];editorOptions=["code (VS Code)","subl (Sublime)","cursor","nvim"];pricing=[{model:"claude-opus-4",input:"15.00",output:"75.00"},{model:"claude-sonnet-4",input:"3.00",output:"15.00"},{model:"claude-haiku-4",input:"0.80",output:"4.00"}];static \u0275fac=function(p){return new(p||a)};static \u0275cmp=w({type:a,selectors:[["app-settings"]],decls:175,vars:37,consts:[[1,"settings-page","scroll-y"],["icon","settings","title","Settings"],[1,"settings-body"],[1,"card","card-pad","section-card"],[1,"section-head","row","gap-8"],["name","folder",2,"color","var(--accent)",3,"size"],[1,"section-title"],[1,"field"],[1,"field-label"],["value","~/dev/specship","readonly","",1,"input","mono",2,"width","100%"],[1,"field-hint"],["value","specs/",1,"input","mono",2,"width","100%"],["value","node_modules/, dist/, .cg/wt/",1,"input","mono",2,"width","100%"],["name","sessions",2,"color","var(--accent)",3,"size"],["value","~/.claude/projects/",1,"input","mono",2,"width","100%"],[1,"toggle-row","row"],[1,"grow"],[1,"toggle-label"],[1,"muted",2,"font-size","11px"],["type","button","aria-label","Enable transcript ingest",1,"toggle-btn",3,"click"],[1,"toggle-thumb"],["type","button","aria-label","Real-time watch",1,"toggle-btn",3,"click"],["name","zap",2,"color","var(--accent)",3,"size"],["type","button",2,"height","30px","padding","0 12px","border-radius","6px","border","1px solid var(--accent)","background","var(--accent)","color","#fff","font-size","12px","cursor","pointer"],[2,"font-size","12px","color","var(--accent)"],[1,"muted",2,"font-size","12px"],["type","button","aria-label","Notify when a run needs approval",1,"toggle-btn",3,"click"],["type","button","aria-label","Notify when a run completes or fails",1,"toggle-btn",3,"click"],["type","button","aria-label","Notify when drift is detected",1,"toggle-btn",3,"click"],["name","dollar",2,"color","var(--accent)",3,"size"],[1,"muted",2,"font-size","11.5px","margin-bottom","12px"],[1,"pricing-header","row"],[1,"price-col"],[1,"pricing-row","row"],["name","sparkles",2,"color","var(--accent)",3,"size"],[3,"change","value","options"],["type","button","aria-label","Reduced motion",1,"toggle-btn",3,"click"],[1,"toggle-row","row",2,"border-top","1px solid var(--border-subtle)","margin-top","4px","padding-top","8px"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","refresh",3,"size"],["name","reveal",2,"color","var(--accent)",3,"size"],[1,"input",2,"width","200px"],["name","graph",2,"color","var(--accent)",3,"size"],[1,"about-grid"],[1,"about-row","row"],[1,"mono",2,"font-size","12px"],[1,"mono",2,"font-size","12px","color","var(--success)"],[1,"status-dot",2,"background","var(--success)"],[2,"height","30px"],["type","button",2,"height","30px","padding","0 12px","border-radius","6px","border","1px solid var(--accent)","background","var(--accent)","color","#fff","font-size","12px","cursor","pointer",3,"click"],[1,"mono","grow",2,"font-size","12px"],[1,"input","mono","tabular","price-input",3,"value"]],template:function(p,i){if(p&1&&(e(0,"div",0),r(1,"app-page-head",1),e(2,"div",2)(3,"section",3)(4,"div",4),r(5,"app-icon",5),e(6,"span",6),n(7,"Project"),t()(),e(8,"div",7)(9,"label",8),n(10,"Project root"),t(),r(11,"input",9),e(12,"div",10),n(13,"Set at app open \xB7 read-only"),t()(),e(14,"div",7)(15,"label",8),n(16,"Spec roots"),t(),r(17,"input",11),t(),e(18,"div",7)(19,"label",8),n(20,"Ignore patterns"),t(),r(21,"input",12),t()(),e(22,"section",3)(23,"div",4),r(24,"app-icon",13),e(25,"span",6),n(26,"Claude Code"),t()(),e(27,"div",7)(28,"label",8),n(29,"Transcripts path"),t(),r(30,"input",14),e(31,"div",10),n(32,"Auto-detected \xB7 overridable"),t()(),e(33,"div",15)(34,"div",16)(35,"div",17),n(36,"Enable transcript ingest"),t(),e(37,"div",18),n(38,"Read JSONL transcripts for analytics"),t()(),e(39,"button",19),c("click",function(){return i.toggleIngest()}),r(40,"span",20),t()(),e(41,"div",15)(42,"div",16)(43,"div",17),n(44,"Real-time watch"),t(),e(45,"div",18),n(46,"Tail new transcript lines as they're written"),t()(),e(47,"button",21),c("click",function(){return i.toggleWatch()}),r(48,"span",20),t()()(),e(49,"section",3)(50,"div",4),r(51,"app-icon",22),e(52,"span",6),n(53,"Notifications"),t()(),e(54,"div",15)(55,"div",16)(56,"div",17),n(57,"Desktop notifications"),t(),e(58,"div",18),x(59,j,1,0)(60,A,1,0)(61,V,1,0)(62,$,1,0),t()(),x(63,F,2,0,"button",23)(64,L,2,0,"span",24)(65,H,2,0,"span",25),t(),e(66,"div",15)(67,"div",16)(68,"div",17),n(69,"Run needs approval"),t(),e(70,"div",18),n(71,"A workflow run paused at an approval gate"),t()(),e(72,"button",26),c("click",function(){return i.notify.toggle("approval")}),r(73,"span",20),t()(),e(74,"div",15)(75,"div",16)(76,"div",17),n(77,"Run completed or failed"),t(),e(78,"div",18),n(79,"A workflow run finished or errored"),t()(),e(80,"button",27),c("click",function(){return i.notify.toggle("runDone")}),r(81,"span",20),t()(),e(82,"div",15)(83,"div",16)(84,"div",17),n(85,"Drift detected"),t(),e(86,"div",18),n(87,"Spec \u2192 code drift appeared"),t()(),e(88,"button",28),c("click",function(){return i.notify.toggle("drift")}),r(89,"span",20),t()()(),e(90,"section",3)(91,"div",4),r(92,"app-icon",29),e(93,"span",6),n(94,"Pricing table"),t()(),e(95,"div",30),n(96,"Per-million-token prices. Bump these when Anthropic publishes new tiers."),t(),e(97,"div",31)(98,"span",16),n(99,"Model"),t(),e(100,"span",32),n(101,"Input $/M"),t(),e(102,"span",32),n(103,"Output $/M"),t()(),h(104,W,5,3,"div",33,B),t(),e(106,"section",3)(107,"div",4),r(108,"app-icon",34),e(109,"span",6),n(110,"Appearance"),t()(),e(111,"div",7)(112,"label",8),n(113,"Theme"),t(),e(114,"app-segmented",35),c("change",function(R){return i.setTheme(R)}),t(),e(115,"div",10),n(116,"Now fully supported \u2014 dark, light, or follow your OS"),t()(),e(117,"div",15)(118,"div",16)(119,"div",17),n(120,"Reduced motion"),t(),e(121,"div",18),n(122,"Honor OS preference \u2014 instant transitions"),t()(),e(123,"button",36),c("click",function(){return i.toggleMotion()}),r(124,"span",20),t()(),e(125,"div",37)(126,"div",16)(127,"div",17),n(128,"Boot animation"),t(),e(129,"div",18),n(130,"The graph-assembly splash on app launch"),t()(),e(131,"button",38),c("click",function(){return i.replayIntro()}),r(132,"app-icon",39),n(133," Replay intro "),t()()(),e(134,"section",3)(135,"div",4),r(136,"app-icon",40),e(137,"span",6),n(138,"Editor"),t()(),e(139,"div",7)(140,"label",8),n(141,"Open files with"),t(),e(142,"select",41),h(143,q,2,1,"option",null,k),t(),e(145,"div",10),n(146,"Detected via code / subl / etc."),t()()(),e(147,"section",3)(148,"div",4),r(149,"app-icon",42),e(150,"span",6),n(151,"About"),t()(),e(152,"div",43)(153,"div",44)(154,"span",25),n(155,"Version"),t(),e(156,"span",45),n(157,"0.4.0"),t()(),e(158,"div",44)(159,"span",25),n(160,"MCP server"),t(),e(161,"span",46),r(162,"span",47),n(163,"running "),t()(),e(164,"div",44)(165,"span",25),n(166,"Backend"),t(),e(167,"span",45),n(168),t()(),e(169,"div",44)(170,"span",25),n(171,"Log path"),t(),e(172,"span",45),n(173,"~/.cg/logs/desktop.log"),t()()()(),r(174,"div",48),t()()),p&2){let d;o(5),s("size",15),o(19),s("size",15),o(15),g("on",i.ingest()),m("aria-pressed",i.ingest()),o(8),g("on",i.watch()),m("aria-pressed",i.watch()),o(4),s("size",15),o(8),_((d=i.notify.permission())==="granted"?59:d==="denied"?60:d==="unsupported"?61:62),o(4),_(i.notify.permission()==="default"?63:i.notify.permission()==="granted"?64:65),o(3),b("opacity",i.notify.granted()?"1":"0.5"),o(6),g("on",i.notify.enabled("approval")),m("aria-pressed",i.notify.enabled("approval")),o(2),b("opacity",i.notify.granted()?"1":"0.5"),o(6),g("on",i.notify.enabled("runDone")),m("aria-pressed",i.notify.enabled("runDone")),o(2),b("opacity",i.notify.granted()?"1":"0.5"),o(6),g("on",i.notify.enabled("drift")),m("aria-pressed",i.notify.enabled("drift")),o(4),s("size",15),o(12),y(i.pricing),o(4),s("size",15),o(6),s("value",i.theme.pref())("options",i.themeOptions),o(9),g("on",i.motion()),m("aria-pressed",i.motion()),o(9),s("size",13),o(4),s("size",15),o(7),y(i.editorOptions),o(6),s("size",15),o(19),f(i.api.isConfigured?i.api.apiBase:"not configured")}},dependencies:[O,z,T],styles:["[_nghost-%COMP%]{display:flex;flex:1;min-height:0}.settings-page[_ngcontent-%COMP%]{flex:1;padding:18px;overflow-y:auto}.settings-body[_ngcontent-%COMP%]{max-width:720px}.section-card[_ngcontent-%COMP%]{margin-bottom:14px}.section-head[_ngcontent-%COMP%]{align-items:center;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--border-subtle)}.section-title[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px}.field[_ngcontent-%COMP%]{margin-bottom:16px}.field-label[_ngcontent-%COMP%]{display:block;font-size:12.5px;font-weight:500;margin-bottom:6px;color:var(--text-primary)}.field-hint[_ngcontent-%COMP%]{color:var(--text-muted);font-size:11px;margin-top:5px}.toggle-row[_ngcontent-%COMP%]{align-items:center;padding:8px 0}.toggle-label[_ngcontent-%COMP%]{font-size:12.5px;font-weight:500}.toggle-btn[_ngcontent-%COMP%]{width:36px;height:20px;border-radius:999px;border:none;cursor:pointer;padding:2px;background:var(--bg-elevated);display:flex;justify-content:flex-start;align-items:center;transition:background .12s;flex-shrink:0}.toggle-btn.on[_ngcontent-%COMP%]{background:var(--accent);justify-content:flex-end}.toggle-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.toggle-thumb[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:50%;background:#fff;flex-shrink:0}.pricing-header[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-weight:600;margin-bottom:6px}.pricing-row[_ngcontent-%COMP%]{padding:6px 0;border-top:1px solid var(--border-subtle);align-items:center;gap:10px}.price-col[_ngcontent-%COMP%]{width:110px;text-align:right}.price-input[_ngcontent-%COMP%]{width:100px;text-align:right;padding:4px 8px}.about-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px}.about-row[_ngcontent-%COMP%]{justify-content:space-between;padding:5px 0;border-bottom:1px solid var(--border-subtle)}.status-dot[_ngcontent-%COMP%]{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px;vertical-align:middle}.muted[_ngcontent-%COMP%]{color:var(--text-muted)}.mono[_ngcontent-%COMP%]{font-family:var(--font-mono)}.grow[_ngcontent-%COMP%]{flex:1}"],changeDetection:0})};export{I as Settings};
@@ -0,0 +1,6 @@
1
+ import{a as ne}from"./chunk-G7VZT5KB.js";import{a as ie}from"./chunk-EMGMOEVR.js";import{a as oe}from"./chunk-X2HTISHL.js";import{a as te}from"./chunk-R5W2MDZN.js";import{a as Z}from"./chunk-WDU3WICG.js";import{a as W,b as ee}from"./chunk-HZA6NEAB.js";import{a as Y,c as N}from"./chunk-GR72OOCN.js";import{c as K}from"./chunk-SHPTC4RL.js";import{a as J}from"./chunk-7RNS77UP.js";import{a as X}from"./chunk-E44X4RH2.js";import{Aa as c,Ga as y,I as w,Ia as v,Ka as s,M as b,N as C,Oa as G,Pa as Q,Qa as U,R as q,T as S,Ta as V,Ua as $,Va as d,W as x,Wa as m,Xa as h,aa as D,ea as o,ka as k,lb as f,ra as u,sa as g,va as z,wa as I,xa as p,ya as a,yb as B,za as r,zb as E}from"./chunk-PDN6QYGJ.js";import"./chunk-Q7L6LLAK.js";var L=null,ge="self.onmessage = () => {};";function re(){return L||(typeof window<"u"&&!window.MonacoEnvironment&&(window.MonacoEnvironment={getWorker:(n,t)=>{let e=new Blob([ge],{type:"text/javascript"}),i=URL.createObjectURL(e);return new Worker(i,{name:t||"monaco-noop"})}}),L=import("./chunk-FMV5PXRC.js"),L)}var ae=!1;function le(n){ae||(ae=!0,_e(n))}function de(n,t){let e=[],i=t.getValue().split(`
2
+ `),l=null,_=new Map,P=/<!--\s*id\s*:\s*([^\s-][^\s]*)\s*-->/,ue=/^#{1,6}\s+/;for(let O=0;O<i.length;O++){let T=i[O]??"",R=O+1,F=T.match(P);if(F&&F[1]){l!==null&&e.push({severity:n.MarkerSeverity.Warning,message:`Stranded <!-- id: ${l.id} -->: no heading follows on line ${l.line+1}.`,startLineNumber:l.line+1,startColumn:1,endLineNumber:l.line+1,endColumn:(i[l.line]??"").length+1,code:"spec_stranded_id"});let M=F[1];l={id:M,line:O};let H=_.get(M);H!==void 0?e.push({severity:n.MarkerSeverity.Warning,message:`Duplicate spec ID "${M}" \u2014 first seen on line ${H+1}. The second occurrence will be silently lost by the parser.`,startLineNumber:R,startColumn:T.indexOf(M)+1,endLineNumber:R,endColumn:T.indexOf(M)+M.length+1,code:"spec_duplicate_id"}):_.set(M,O);continue}ue.test(T)&&(l===null?e.push({severity:n.MarkerSeverity.Error,message:"This heading has no embedded ID. Add `<!-- id: REQ-X -->` on the line above it \u2014 required by the SpecShip parser.",startLineNumber:R,startColumn:1,endLineNumber:R,endColumn:T.length+1,code:"spec_missing_id"}):l=null)}n.editor.setModelMarkers(t,"specship-spec",e)}function _e(n){n.languages.registerCompletionItemProvider("markdown",{provideCompletionItems:(t,e)=>{let i=t.getWordUntilPosition(e),l={startLineNumber:e.lineNumber,endLineNumber:e.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn},_=n.languages.CompletionItemKind,P=n.languages.CompletionItemInsertTextRule;return{suggestions:[{label:"req",kind:_.Snippet,insertText:["<!-- id: REQ-${1:AREA}-${2:001} -->","## ${3:Title MUST be concrete}","","${4:Body \u2014 describe the contract, not the implementation.}","","## Acceptance","<!-- id: REQ-${1:AREA}-${2:001}.A1 -->","- ${5:First testable acceptance criterion}","$0"].join(`
3
+ `),insertTextRules:P.InsertAsSnippet,documentation:"Insert a full requirement (heading + acceptance) with embedded IDs.",detail:"SpecShip \xB7 requirement",range:l},{label:"doc",kind:_.Snippet,insertText:["---","id: ${1:AREA}-DOC","title: ${2:Title}","owner: ${3:team-or-person}","priority: ${4|high,medium,low|}","---","","<!-- id: ${1:AREA}-DOC -->","# ${2:Title}","","${5:One-paragraph summary of what this document covers.}","$0"].join(`
4
+ `),insertTextRules:P.InsertAsSnippet,documentation:"Insert a new spec document with frontmatter.",detail:"SpecShip \xB7 document",range:l},{label:"accept",kind:_.Snippet,insertText:["## Acceptance","<!-- id: ${1:REQ-X}.A1 -->","- ${2:First testable acceptance criterion}","<!-- id: ${1:REQ-X}.A2 -->","- ${3:Second testable acceptance criterion}","$0"].join(`
5
+ `),insertTextRules:P.InsertAsSnippet,documentation:"Insert an Acceptance section with two ID-d bullets.",detail:"SpecShip \xB7 acceptance",range:l},{label:"impl",kind:_.Snippet,insertText:["implementations:"," - ${1:src/path/to/file.ts}:${2:QualifiedSymbol}","$0"].join(`
6
+ `),insertTextRules:P.InsertAsSnippet,documentation:"Insert an implementations block linking the spec to code.",detail:"SpecShip \xB7 implementations",range:l}]}},triggerCharacters:["r","d","a","i"]})}var xe=["host"];function ve(n,t){if(n&1&&(a(0,"span",5),d(1),r()),n&2){let e=s();p("title",e.path),o(),m(e.path)}}function fe(n,t){n&1&&(a(0,"div",15),d(1,"Loading editor\u2026"),r())}var j=class n{sanitizer=w(B);destroyRef=w(q);value="";path="";valueChange=new S;validationChange=new S;save=new S;cancel=new S;hostRef;loading=x(!0);currentValue=x("");errorCount=x(0);warningCount=x(0);dirty=x(!1);previewHtml=f(()=>this.sanitizer.bypassSecurityTrustHtml(ne(this.currentValue()||"")));tokenCount=f(()=>Math.max(1,Math.round((this.currentValue()||"").length/4)));statusLabel=f(()=>{let t=this.errorCount(),e=this.warningCount();return t>0?`${t} error${t===1?"":"s"}`:e>0?`${e} warning${e===1?"":"s"}`:"clean"});statusKind=f(()=>this.errorCount()>0?"error":this.warningCount()>0?"warn":"ok");monaco=null;editor=null;model=null;diagnosticsTimer=null;async ngAfterViewInit(){this.currentValue.set(this.value);try{let t=await re();this.monaco=t,le(t),this.model=t.editor.createModel(this.value,"markdown"),this.editor=t.editor.create(this.hostRef.nativeElement,{model:this.model,theme:this.preferDark()?"vs-dark":"vs",automaticLayout:!0,wordWrap:"on",minimap:{enabled:!1},scrollBeyondLastLine:!1,renderWhitespace:"none",fontSize:13,lineNumbers:"on",folding:!1,tabSize:2,insertSpaces:!0,contextmenu:!1}),this.editor.onDidChangeModelContent(()=>this.handleEdit()),this.runDiagnosticsNow(),this.loading.set(!1)}catch(t){console.error("[spec-editor] failed to load Monaco",t),this.loading.set(!1)}this.destroyRef.onDestroy(()=>this.dispose())}ngOnDestroy(){this.dispose()}onSave(){this.save.emit()}onCancel(){this.cancel.emit()}handleEdit(){if(!this.model)return;let t=this.model.getValue();this.currentValue.set(t),this.dirty.set(t!==this.value),this.valueChange.emit(t),this.diagnosticsTimer!==null&&clearTimeout(this.diagnosticsTimer),this.diagnosticsTimer=setTimeout(()=>this.runDiagnosticsNow(),500)}runDiagnosticsNow(){if(!this.monaco||!this.model)return;de(this.monaco,this.model);let t=this.monaco.editor.getModelMarkers({resource:this.model.uri,owner:"specship-spec"}),e=t.filter(l=>l.severity===this.monaco.MarkerSeverity.Error).length,i=t.filter(l=>l.severity===this.monaco.MarkerSeverity.Warning).length;this.errorCount.set(e),this.warningCount.set(i),this.validationChange.emit({errors:e,warnings:i})}preferDark(){if(typeof window>"u")return!1;try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}}dispose(){this.diagnosticsTimer!==null&&(clearTimeout(this.diagnosticsTimer),this.diagnosticsTimer=null),this.editor?.dispose(),this.editor=null,this.model?.dispose(),this.model=null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-spec-editor"]],viewQuery:function(e,i){if(e&1&&G(xe,7),e&2){let l;Q(l=U())&&(i.hostRef=l.first)}},inputs:{value:"value",path:"path"},outputs:{valueChange:"valueChange",validationChange:"validationChange",save:"save",cancel:"cancel"},decls:23,vars:16,consts:[["host",""],[1,"editor-shell","col"],[1,"toolbar","row","gap-8"],["name","memory",3,"size"],[1,"title"],[1,"path","mono",3,"title"],[1,"grow"],[1,"status-pill"],[1,"dot"],[1,"tokens","mono","tabular","muted",3,"title"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled","title"],["name","check",3,"size"],[1,"panes","row"],[1,"editor-pane"],[1,"loading"],[1,"monaco-host"],[1,"preview-pane","md-content",3,"innerHTML"]],template:function(e,i){e&1&&(a(0,"div",1)(1,"div",2),c(2,"app-icon",3),a(3,"span",4),d(4,"Spec editor"),r(),u(5,ve,2,2,"span",5),c(6,"span",6),a(7,"span",7),c(8,"span",8),d(9),r(),a(10,"span",9),d(11),r(),a(12,"button",10),v("click",function(){return i.onCancel()}),d(13," Cancel "),r(),a(14,"button",11),v("click",function(){return i.onSave()}),c(15,"app-icon",12),d(16," Save "),r()(),a(17,"div",13)(18,"div",14),u(19,fe,2,0,"div",15),c(20,"div",16,0),r(),c(22,"div",17),r()()),e&2&&(o(2),p("size",14),o(3),g(i.path?5:-1),o(2),$("ok",i.statusKind()==="ok")("warn",i.statusKind()==="warn")("error",i.statusKind()==="error"),o(2),h(" ",i.statusLabel()," "),o(),p("title","~"+i.tokenCount()+" tokens (rough estimate)"),o(),h(" ~",i.tokenCount(),"t "),o(3),p("disabled",!i.dirty()||i.errorCount()>0)("title",i.errorCount()>0?"Fix errors before saving":i.dirty()?"Save changes":"No changes to save"),o(),p("size",13),o(4),g(i.loading()?19:-1),o(3),p("innerHTML",i.previewHtml(),D))},dependencies:[E],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex:1;min-height:0}.editor-shell[_ngcontent-%COMP%]{flex:1;min-height:0;border:1px solid var(--border-subtle);border-radius:10px;overflow:hidden;background:var(--bg-panel)}.toolbar[_ngcontent-%COMP%]{align-items:center;padding:8px 12px;border-bottom:1px solid var(--border-subtle);background:var(--bg-panel);flex-wrap:wrap;row-gap:6px}.toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:650;color:var(--text-primary)}.toolbar[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}.toolbar[_ngcontent-%COMP%] .tokens[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-muted)}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:3px 9px;border-radius:999px;white-space:nowrap}.status-pill[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%}.status-pill.ok[_ngcontent-%COMP%]{color:var(--success);background:var(--success-soft)}.status-pill.ok[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--success)}.status-pill.warn[_ngcontent-%COMP%]{color:var(--warn);background:var(--warn-soft)}.status-pill.warn[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--warn)}.status-pill.error[_ngcontent-%COMP%]{color:var(--error);background:var(--error-soft)}.status-pill.error[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--error)}.panes[_ngcontent-%COMP%]{flex:1;min-height:0}.editor-pane[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;position:relative;border-right:1px solid var(--border-subtle)}.loading[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:12px;background:var(--bg-canvas);z-index:1}.monaco-host[_ngcontent-%COMP%]{position:absolute;inset:0}.preview-pane[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;padding:14px 18px;overflow:auto;background:var(--bg-canvas)}.preview-pane.md-content[_ngcontent-%COMP%] .md-h1[_ngcontent-%COMP%]{font-size:15px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em;margin:0 0 10px}.preview-pane.md-content[_ngcontent-%COMP%] .md-h2[_ngcontent-%COMP%]{font-size:13px;font-weight:650;color:var(--text-primary);letter-spacing:-.005em;margin:18px 0 6px;padding-bottom:4px;border-bottom:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-h3[_ngcontent-%COMP%]{font-size:12px;font-weight:650;color:var(--text-primary);margin:14px 0 6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-h4[_ngcontent-%COMP%]{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:12px 0 4px}.preview-pane.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%]{font-size:12.5px;line-height:1.6;color:var(--text-secondary);margin:0 0 4px;overflow-wrap:anywhere}.preview-pane.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{padding:0;margin:4px 0 6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:2px 0 2px 22px;font-size:12.5px;line-height:1.6;color:var(--text-secondary);overflow-wrap:anywhere}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%]{list-style:none}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:"\\2022";position:absolute;left:6px;top:2px;color:var(--text-faint)}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{list-style:none;counter-reset:md-ol}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{counter-increment:md-ol}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:counter(md-ol) ".";position:absolute;left:0;top:2px;color:var(--text-faint);font-family:var(--font-mono);font-size:11.5px;min-width:18px;text-align:right}.preview-pane.md-content[_ngcontent-%COMP%] .md-spacer[_ngcontent-%COMP%]{height:6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-import[_ngcontent-%COMP%]{display:inline-block;font-size:11.5px;color:var(--node-route);background:var(--node-route-soft);padding:2px 8px;border-radius:5px;margin:4px 0}.preview-pane.md-content[_ngcontent-%COMP%] .md-inline-code[_ngcontent-%COMP%]{font-size:11.5px;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle);color:var(--node-spec)}.preview-pane.md-content[_ngcontent-%COMP%] .md-blockquote[_ngcontent-%COMP%]{margin:6px 0;padding:8px 12px;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text-secondary);font-size:12.5px;line-height:1.55;border-radius:0 6px 6px 0}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%]{position:relative;margin:8px 0 10px;padding:12px 14px;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:8px;overflow-x:auto}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;font-size:11.5px;line-height:1.55;color:var(--text-primary);white-space:pre}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre-lang[_ngcontent-%COMP%]{position:absolute;top:6px;right:10px;font-size:10px;font-weight:600;color:var(--text-muted);text-transform:lowercase;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table-scroll[_ngcontent-%COMP%]{overflow-x:auto;margin:10px 0;border:1px solid var(--border-subtle);border-radius:8px}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:11.5px}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:var(--bg-panel);font-weight:650;color:var(--text-primary);font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border-strong);white-space:nowrap}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--text-secondary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:0}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.preview-pane.md-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-top:0}'],changeDetection:0})};function be(n,t){n&1&&(a(0,"div",14),d(1),r()),n&2&&(o(),m(t))}function Ce(n,t){if(n&1){let e=y();a(0,"div",0),v("click",function(){b(e);let l=s();return C(l.onBackdropClick())}),r(),a(1,"div",1)(2,"header",2)(3,"div",3)(4,"div",4),d(5,"Draft a new spec with Claude"),r(),a(6,"div",5),d(7,"Describe the feature in one sentence. Claude takes it from there."),r()(),a(8,"button",6),v("click",function(){b(e);let l=s();return C(l.onCloseClick())}),c(9,"app-icon",7),r()(),a(10,"div",8)(11,"label",9),d(12,"Feature description"),r(),a(13,"textarea",10),v("input",function(l){b(e);let _=s();return C(_.onDescriptionInput(l))}),r(),a(14,"div",11),d(15,"This will run in Claude Code:"),r(),a(16,"pre",12),d(17),r()(),a(18,"footer",13),u(19,be,2,1,"div",14),c(20,"span",15),a(21,"button",16),v("click",function(){b(e);let l=s();return C(l.onCopyToClipboard())}),c(22,"app-icon",17),d(23," Copy prompt "),r(),a(24,"button",18),v("click",function(){b(e);let l=s();return C(l.onOpenInClaude())}),c(25,"app-icon",19),d(26," Open in Claude Code "),r()()()}if(n&2){let e,i=s();o(9),p("size",16),o(4),p("value",i.description()),o(4),m(i.slashCommand()),o(2),g((e=i.toast())?19:-1,e),o(2),p("disabled",!i.canSubmit()),o(),p("size",13),o(2),p("disabled",!i.canSubmit()),o(),p("size",13)}}var A=class n{open=!1;close=new S;description=x("");toast=x(null);slashCommand=f(()=>{let t=this.description().trim();return t?`/ss-spec-author "${t.replace(/"/g,'\\"')}"`:"/ss-spec-author"});canSubmit=f(()=>this.description().trim().length>0);onDescriptionInput(t){let e=t.target;this.description.set(e.value)}onBackdropClick(){this.dismiss()}onCloseClick(){this.dismiss()}async onOpenInClaude(){if(!this.canSubmit())return;let t=this.slashCommand();await this.writeToClipboard(t);try{window.location.href=`claude://prompt?text=${encodeURIComponent(t)}`,this.flashToast("Opening Claude Code\u2026 (also copied to clipboard)")}catch{this.flashToast("Claude Code handler unavailable \u2014 prompt copied to clipboard.")}}async onCopyToClipboard(){if(!this.canSubmit())return;let t=this.slashCommand(),e=await this.writeToClipboard(t);this.flashToast(e?"Copied! Switch to Claude Code and paste.":"Could not access clipboard \u2014 copy the prompt manually.")}async writeToClipboard(t){if(!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}flashToast(t){this.toast.set(t),setTimeout(()=>this.toast.set(null),2500)}dismiss(){this.description.set(""),this.toast.set(null),this.close.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-draft-with-claude-modal"]],inputs:{open:"open"},outputs:{close:"close"},decls:1,vars:1,consts:[["role","presentation",1,"backdrop",3,"click"],["role","dialog","aria-labelledby","draft-modal-title","aria-modal","true",1,"modal"],[1,"head"],[1,"title-block"],["id","draft-modal-title",1,"title"],[1,"sub"],["type","button","aria-label","Close",1,"close",3,"click"],["name","x",3,"size"],[1,"body"],["for","draft-description",1,"field-label"],["id","draft-description","rows","3","placeholder","e.g. Failed payment retries should back off with T+1d, T+3d, T+7d then downgrade the account.","autofocus","",1,"field",3,"input","value"],[1,"preview-label"],[1,"preview","mono"],[1,"foot"],[1,"toast"],[1,"grow"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click","disabled"],["name","copy",3,"size"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],["name","external",3,"size"]],template:function(e,i){e&1&&u(0,Ce,27,8),e&2&&g(i.open?0:-1)},dependencies:[E],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:100;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.modal[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 64px);background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:0 24px 48px #0006;z-index:101;display:flex;flex-direction:column;overflow:hidden}.head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border-subtle)}.head[_ngcontent-%COMP%] .title-block[_ngcontent-%COMP%]{flex:1;min-width:0}.head[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14.5px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em}.head[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{font-size:12px;color:var(--text-secondary);margin-top:2px;line-height:1.45}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{appearance:none;background:transparent;border:0;width:28px;height:28px;border-radius:6px;color:var(--text-muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s,color .12s}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-primary)}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.body[_ngcontent-%COMP%]{padding:16px 18px;display:flex;flex-direction:column;gap:10px;overflow-y:auto}.field-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.field[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:10px 12px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;color:var(--text-primary);font-family:var(--font-ui);font-size:13px;line-height:1.5;resize:vertical}.field[_ngcontent-%COMP%]:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}.preview-label[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);margin-top:4px}.preview[_ngcontent-%COMP%]{margin:0;padding:10px 12px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;font-size:11.5px;line-height:1.5;color:var(--node-spec);font-family:var(--font-mono);white-space:pre-wrap;word-break:break-all}.foot[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 18px;border-top:1px solid var(--border-subtle);background:var(--bg-canvas);flex-wrap:wrap}.foot[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1}.toast[_ngcontent-%COMP%]{font-size:11.5px;color:var(--success);background:var(--success-soft);padding:4px 10px;border-radius:999px;white-space:nowrap}"],changeDetection:0})};var he=(n,t)=>t.path,me=(n,t)=>t.id,ye=(n,t)=>t.briefId;function we(n,t){n&1&&c(0,"app-pick-project-empty",0)}function Me(n,t){if(n&1&&(c(0,"span",6),a(1,"span",17),d(2),r()),n&2){let e=s();o(2),h("",e.summary.conflicts," \u26A0")}}function Se(n,t){if(n&1&&(a(0,"div",8)(1,"span")(2,"b",15),d(3),r(),d(4," ideas"),r(),a(5,"span",16),d(6,"\u2192"),r(),a(7,"span")(8,"b",15),d(9),r(),d(10," specs"),r(),a(11,"span",16),d(12,"\u2192"),r(),a(13,"span")(14,"b",15),d(15),r(),d(16," impl \xB7 "),a(17,"b",15),d(18),r(),d(19," ver"),r(),u(20,Me,3,1),r()),n&2){let e=t;o(3),m(e.summary.ideas),o(6),m(e.summary.specified),o(6),m(e.summary.links.implemented),o(3),m(e.summary.links.verified),o(2),g(e.summary.conflicts>0?20:-1)}}function Pe(n,t){n&1&&c(0,"app-empty",10)}function Oe(n,t){if(n&1&&(a(0,"span",22),d(1),r()),n&2){let e=s().$implicit,i=s(2);o(),h(" ",i.driftCountForGroup(e)," ")}}function ke(n,t){if(n&1){let e=y();a(0,"div",25),v("click",function(){let l=b(e).$implicit,_=s(4);return C(_.select(l.id))}),c(1,"span",26),a(2,"div",27)(3,"div",28),d(4),r(),a(5,"div",29),d(6),r()()()}if(n&2){let e=t.$implicit,i=s(4);$("selected",i.sel()===e.id),o(),V("background",i.stateColorFor(e.kind)),o(2),V("color",i.sel()===e.id?"var(--accent)":"var(--text-primary)"),o(),m(e.id),o(2),m(e.title)}}function Ee(n,t){if(n&1&&(a(0,"div",23),z(1,ke,7,8,"div",24,me),r()),n&2){let e=s().$implicit;o(),I(e.specs)}}function Te(n,t){if(n&1){let e=y();a(0,"div",18),v("click",function(){let l=b(e).$implicit,_=s(2);return C(_.toggleGroup(l.path))}),c(1,"app-icon",19)(2,"app-icon",20),a(3,"span",21),d(4),r(),u(5,Oe,2,1,"span",22),r(),u(6,Ee,3,0,"div",23)}if(n&2){let e=t.$implicit,i=s(2);o(),p("name",i.isGroupOpen(e.path)?"chevronDown":"chevronRight")("size",12),o(),p("size",13),o(2),m(e.title),o(),g(i.driftCountForGroup(e)>0?5:-1),o(),g(i.isGroupOpen(e.path)?6:-1)}}function De(n,t){if(n&1){let e=y();a(0,"div",25),v("click",function(){let l=b(e).$implicit,_=s(3);return C(_.select(l.briefId))}),c(1,"span",33),a(2,"div",27)(3,"div",29),d(4),r()()()}if(n&2){let e=t.$implicit,i=s(3);$("selected",i.sel()===e.briefId),o(4),m(e.title)}}function ze(n,t){if(n&1&&(a(0,"div",30)(1,"span",31),d(2,"IDEAS"),r(),a(3,"span",32),d(4),r()(),z(5,De,5,3,"div",24,ye)),n&2){let e=s(2);o(4),m(e.ideas().length),o(),I(e.ideas())}}function Ie(n,t){if(n&1&&(a(0,"div",34),d(1),r()),n&2){let e=s();o(),h("Loading source for ",e.id,"\u2026")}}function $e(n,t){if(n&1){let e=y();a(0,"app-spec-editor",38),v("valueChange",function(l){b(e);let _=s(4);return C(_.onEditorValueChange(l))})("save",function(){b(e);let l=s(4);return C(l.onEditorSave())})("cancel",function(){b(e);let l=s(4);return C(l.onEditorCancel())}),r()}if(n&2){let e=s(),i=s(3);p("value",i.editingSource())("path",e.sourcePath)}}function Ne(n,t){n&1&&(a(0,"div",36),d(1),r()),n&2&&(o(),m(t))}function Re(n,t){n&1&&(a(0,"div",37),d(1,"Saving\u2026"),r())}function Ve(n,t){if(n&1&&(u(0,Ie,2,1,"div",34)(1,$e,1,2,"app-spec-editor",35),u(2,Ne,2,1,"div",36),u(3,Re,2,0,"div",37)),n&2){let e,i=s(3);g(i.editingSource()===null?0:1),o(2),g((e=i.saveError())?2:-1,e),o(),g(i.saving()?3:-1)}}function Le(n,t){if(n&1&&u(0,Ve,4,3),n&2){let e,i=s(2);g((e=i.selectedSpec())?0:-1,e)}}function je(n,t){if(n&1&&(a(0,"app-pill"),d(1),r()),n&2){let e=s();o(),m(e.priority)}}function Ae(n,t){if(n&1&&(a(0,"div",45)(1,"div",46),d(2,"Owner"),r(),a(3,"div",47),d(4),r()()),n&2){let e=s();o(4),m(e.owner)}}function Fe(n,t){if(n&1&&(a(0,"details",50)(1,"summary",63),d(2,"Brainstorm"),r(),c(3,"div",64),r()),n&2){let e=s(3);o(3),p("innerHTML",e.briefHtml(),D)}}function We(n,t){n&1&&c(0,"div",51)}function He(n,t){if(n&1&&(a(0,"app-pill",67),d(1),r()),n&2){let e=s().$implicit;o(),h("",e.driftAxis," drift")}}function qe(n,t){if(n&1&&(a(0,"div",66),c(1,"app-state-pill",42),u(2,He,2,1,"app-pill",67),a(3,"span",68),d(4),r(),a(5,"app-pill"),d(6),r(),a(7,"button",69),c(8,"app-icon",60),d(9," Reveal "),r()()),n&2){let e=t.$implicit,i=t.$index;V("border-top",i>0?"1px solid var(--border-subtle)":"none"),o(),p("state",e.state),o(),g(e.driftAxis?2:-1),o(2),m(e.targetQualifiedName),o(2),m(e.provenance),o(2),p("size",12)}}function Ge(n,t){if(n&1&&(a(0,"div",52),z(1,qe,10,7,"div",65,me),r()),n&2){let e=s(3);o(),I(e.selectedLinks())}}function Qe(n,t){n&1&&(a(0,"div",53),c(1,"app-icon",70),a(2,"div",71),d(3," Orphaned \u2014 no code implements this requirement yet "),r()()),n&2&&(o(),p("size",16))}function Ue(n,t){n&1&&(a(0,"div",62),d(1),r()),n&2&&(o(),m(t))}function Be(n,t){if(n&1){let e=y();a(0,"div",12)(1,"div",39)(2,"span",40),d(3),r(),c(4,"app-copy-btn",41)(5,"div",6)(6,"app-state-pill",42),u(7,je,2,1,"app-pill"),r(),a(8,"h1",43),d(9),r(),a(10,"div",44)(11,"div",45)(12,"div",46),d(13,"Kind"),r(),a(14,"div",47),d(15),r()(),u(16,Ae,5,1,"div",45),a(17,"div",45)(18,"div",46),d(19,"Doc"),r(),a(20,"div",47),d(21),r()(),a(22,"div",45)(23,"div",46),d(24,"Siblings"),r(),a(25,"div",47),d(26),r()(),a(27,"div",45)(28,"div",46),d(29,"Links"),r(),a(30,"div",47),d(31),r()()(),a(32,"div",48),d(33,"Requirement"),r(),c(34,"div",49),u(35,Fe,4,1,"details",50),a(36,"div",48),d(37,"Linked code"),r(),u(38,We,1,0,"div",51)(39,Ge,3,0,"div",52)(40,Qe,4,1,"div",53),a(41,"div",54)(42,"button",55),c(43,"app-icon",56),d(44," Implement "),r(),a(45,"button",57),c(46,"app-icon",58),d(47," Verify "),r(),a(48,"button",59),v("click",function(){b(e);let l=s(2);return C(l.onEditClick())}),c(49,"app-icon",60),d(50," Edit spec "),r(),a(51,"button",59),v("click",function(){let l=b(e),_=s(2);return C(_.goToGraph(l.id))}),c(52,"app-icon",61),d(53," Show in graph "),r()(),u(54,Ue,2,1,"div",62),r()}if(n&2){let e,i=t,l=s(2);o(3),m(i.id),o(),p("text",i.id),o(2),p("state",i.kind),o(),g(i.priority?7:-1),o(2),m(i.title),o(6),m(i.kind),o(),g(i.owner?16:-1),o(5),m(i.sourcePath.replace("specs/","")),o(5),h("",l.selectedSiblings().length," reqs"),o(5),m(l.selectedLinks().length),o(3),p("innerHTML",l.mdHtml(i.body),D),o(),g(l.briefResource.state().data?35:-1),o(3),g(l.detailResource.state().loading?38:l.selectedLinks().length>0?39:40),o(5),p("size",13),o(3),p("size",13),o(3),p("size",13),o(3),p("size",13),o(2),g((e=l.saveError())?54:-1,e)}}function Ke(n,t){n&1&&(a(0,"app-empty",13)(1,"code",72),d(2,"specship init -i"),r()())}function Xe(n,t){if(n&1){let e=y();a(0,"div",1)(1,"div",2)(2,"div",3),c(3,"app-icon",4),a(4,"span",5),d(5,"Specs"),r(),c(6,"span",6),a(7,"span",7),d(8),r()(),u(9,Se,21,5,"div",8),a(10,"div",9),u(11,Pe,1,0,"app-empty",10),z(12,Te,7,6,null,null,he),u(14,ze,7,1),r()(),a(15,"div",11),u(16,Le,1,1)(17,Be,55,18,"div",12)(18,Ke,3,0,"app-empty",13),r()(),a(19,"app-draft-with-claude-modal",14),v("close",function(){b(e);let l=s();return C(l.onDraftModalClose())}),r()}if(n&2){let e,i,l=s();o(3),p("size",15),o(5),h(" ",l.resource.state().loading?"\u2026":l.totalCount()+" reqs"," "),o(),g((e=l.funnel())?9:-1,e),o(2),g(l.groups().length===0&&!l.resource.state().loading?11:-1),o(),I(l.groups()),o(2),g(l.ideas().length>0?14:-1),o(2),g(l.editing()?16:(i=l.selectedSpec())?17:18,i),o(3),p("open",l.draftModalOpen())}}function Je(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\*\*(.+?)\*\*/g,"<strong style='color:var(--text-primary)'>$1</strong>").replace(/`(.+?)`/g,"<code class='mono' style='font-size:12px;background:var(--bg-canvas);padding:1px 5px;border-radius:4px;border:1px solid var(--border-subtle)'>$1</code>")}var pe=class n{api=w(X);projects=w(J);router=w(K);conn=w(Y);resource=N(this.api,()=>`/api/specs${this.projects.projectQuery()}`);funnelResource=N(this.api,()=>`/api/spec/funnel${this.projects.projectQuery()}`);funnel=f(()=>this.funnelResource.state().data??null);ideas=f(()=>this.funnel()?.ideas??[]);detailResource=N(this.api,()=>{let t=this.sel();return t?`/api/spec/${encodeURIComponent(t)}${this.projects.projectQuery()}`:null});briefResource=N(this.api,()=>{let t=this.sel();return t?`/api/spec/${encodeURIComponent(t)}/brief${this.projects.projectQuery()}`:null});briefHtml=f(()=>this.mdHtml(this.briefResource.state().data?.markdown??""));sel=x(null);expandedGroups=x(new Set);editing=x(!1);editingSource=x(null);editingDirty=x(!1);saving=x(!1);saveError=x(null);draftModalOpen=x(!1);STATE=W;groups=f(()=>{let t=(this.resource.state().data?.specs??[]).filter(i=>i.kind!=="brief"),e=new Map;for(let i of t){let l=i.sourcePath||"(unknown)";e.has(l)||e.set(l,{path:l,title:l.replace(/^specs\//,""),specs:[]}),e.get(l).specs.push(i)}return[...e.values()]});totalCount=f(()=>this.groups().reduce((t,e)=>t+e.specs.length,0));selectedSpec=f(()=>{let t=this.sel();return t?(this.resource.state().data?.specs??[]).find(i=>i.id===t)??null:null});selectedLinks=f(()=>this.detailResource.state().data?.links??[]);selectedSiblings=f(()=>{let t=this.selectedSpec();if(!t)return[];let e=this.groups().find(i=>i.path===t.sourcePath);return e?e.specs.filter(i=>i.id!==t.id):[]});isGroupOpen(t){return!this.expandedGroups().has("closed:"+t)}toggleGroup(t){this.expandedGroups.update(e=>{let i="closed:"+t,l=new Set(e);return l.has(i)?l.delete(i):l.add(i),l})}driftCountForGroup(t){let e=this.selectedSpec();return!e||e.sourcePath!==t.path?0:this.selectedLinks().filter(i=>["drifted","broken","orphaned"].includes(i.state)).length}stateColorFor(t){return W[t]?.color??"var(--node-spec)"}select(t){this.editing()&&(this.editing.set(!1),this.editingSource.set(null),this.editingDirty.set(!1)),this.sel.set(t)}mdHtml(t){return Je(t)}goToGraph(t){this.router.navigate(["/graph"],{queryParams:{focus:"spec:"+t}})}async onEditClick(){let t=this.selectedSpec();if(t){this.saveError.set(null),this.editing.set(!0),this.editingSource.set(null);try{let e=this.projects.projectQuery(),i=await this.api.get(`/api/spec/${encodeURIComponent(t.id)}${e}`);this.editingSource.set(i.source??t.body)}catch(e){this.saveError.set(`Couldn't load source: ${e instanceof Error?e.message:String(e)}`),this.editing.set(!1)}}}onEditorValueChange(t){this.editingSource.set(t),this.editingDirty.set(!0)}async onEditorSave(){let t=this.selectedSpec(),e=this.editingSource();if(!(!t||e===null)){if(!this.conn.online()){this.saveError.set("Offline \u2014 reconnect to save your changes");return}this.saving.set(!0),this.saveError.set(null);try{let i=this.projects.projectQuery();await this.api.put(`/api/spec/${encodeURIComponent(t.id)}${i}`,{content:e}),this.editing.set(!1),this.editingDirty.set(!1),this.editingSource.set(null),this.resource.refetch()}catch(i){this.saveError.set(`Save failed: ${i instanceof Error?i.message:String(i)}`)}finally{this.saving.set(!1)}}}onEditorCancel(){this.editingDirty()&&!window.confirm("Discard unsaved changes?")||(this.editing.set(!1),this.editingSource.set(null),this.editingDirty.set(!1),this.saveError.set(null))}onDraftWithClaudeClick(){this.draftModalOpen.set(!0)}onDraftModalClose(){this.draftModalOpen.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-specs"]],decls:2,vars:1,consts:[["surface","Specs"],[1,"specs-shell"],[1,"tree-col"],[1,"tree-header","row","gap-8"],["name","book",2,"color","var(--accent)",3,"size"],[2,"font-weight","600","font-size","13px"],[1,"grow"],[1,"muted","tabular",2,"font-size","11px"],["aria-label","Spec lifecycle funnel",1,"row","gap-8",2,"padding","6px 12px","border-bottom","1px solid var(--border-subtle)","font-size","11px","color","var(--text-secondary)"],[1,"scroll-y","tree-scroll"],["icon","book","title","No specs found","body","Run specship init -i against a project with a specs/ directory."],[1,"detail-col","col"],[1,"scroll-y","detail-scroll"],["icon","book","title","Pick a spec from the tree","body","Or run specship init -i to index your specs/ folder if you haven't yet."],[3,"close","open"],[2,"color","var(--text-primary)"],[2,"color","var(--text-muted)"],[2,"color","var(--warn)"],[1,"doc-row","row","gap-6",3,"click"],[2,"color","var(--text-muted)",3,"name","size"],["name","book",2,"color","var(--node-spec)",3,"size"],[1,"mono","grow","doc-name"],[1,"pill",2,"font-size","9.5px","color","var(--warn)","background","var(--warn-soft)"],[1,"group-body"],[1,"req-row","row","gap-6",3,"selected"],[1,"req-row","row","gap-6",3,"click"],[1,"pill-dot",2,"flex-shrink","0"],[1,"grow",2,"min-width","0"],[1,"mono","req-id"],[1,"muted","req-title"],[1,"row","gap-6",2,"padding","10px 12px 2px","font-size","11px","color","var(--text-muted)"],[1,"mono","grow",2,"letter-spacing","0.5px"],[1,"tabular",2,"font-size","10.5px"],[1,"pill-dot",2,"background","var(--text-muted)","flex-shrink","0"],[1,"loading-detail"],[3,"value","path"],[1,"save-error"],[1,"save-status"],[3,"valueChange","save","cancel","value","path"],[1,"row","gap-8",2,"margin-bottom","4px"],[1,"mono",2,"font-size","12px","color","var(--node-spec)"],[3,"text"],[3,"state"],[1,"detail-title"],[1,"meta-row","row"],[1,"meta-item"],[1,"muted",2,"font-size","10.5px"],[1,"mono",2,"font-size","12.5px","margin-top","1px"],[1,"eyebrow",2,"margin-bottom","8px"],[1,"detail-body",3,"innerHTML"],[1,"brief-panel"],[1,"skel",2,"height","42px","border-radius","8px","margin-bottom","22px"],[1,"card",2,"overflow","hidden","margin-bottom","22px"],[1,"card","card-pad","orphan-card"],[1,"row","gap-8",2,"flex-wrap","wrap"],["type","button",1,"btn","btn-primary","btn-sm"],["name","play",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm"],["name","check",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","reveal",3,"size"],["name","graph",3,"size"],[1,"save-error",2,"margin-top","16px"],[1,"eyebrow","brief-summary"],[1,"detail-body","brief-body",3,"innerHTML"],[1,"row","gap-10","link-row",3,"border-top"],[1,"row","gap-10","link-row"],["color","var(--warn)","bg","var(--warn-soft)"],[1,"mono","grow","link-target"],["type","button",1,"btn","btn-ghost","btn-xs"],["name","drift",3,"size"],[2,"margin-top","6px","font-size","12.5px"],["action","",1,"mono",2,"font-size","11.5px","color","var(--accent)","background","var(--bg-canvas)","padding","5px 10px","border-radius","6px","border","1px solid var(--border-subtle)"]],template:function(e,i){e&1&&u(0,we,1,0,"app-pick-project-empty",0)(1,Xe,20,7),e&2&&g(i.resource.state().noProject?0:1)},dependencies:[Z,E,j,A,ie,ee,oe,te],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:contents}.specs-shell[_ngcontent-%COMP%]{flex:1;display:flex;min-height:0}.tree-col[_ngcontent-%COMP%]{width:280px;flex-shrink:0;border-right:1px solid var(--border-subtle);background:var(--bg-panel);display:flex;flex-direction:column;min-height:0}.tree-header[_ngcontent-%COMP%]{padding:11px 12px;border-bottom:1px solid var(--border-subtle);align-items:center}.tree-scroll[_ngcontent-%COMP%]{flex:1;padding:6px}.doc-row[_ngcontent-%COMP%]{padding:6px 8px;border-radius:6px;cursor:pointer;color:var(--text-secondary);align-items:center}.doc-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.doc-name[_ngcontent-%COMP%]{font-size:12px;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-body[_ngcontent-%COMP%]{margin-left:14px;border-left:1px solid var(--border-subtle);padding-left:6px}.req-row[_ngcontent-%COMP%]{padding:5px 8px;border-radius:6px;cursor:pointer;align-items:flex-start;background:transparent}.req-row[_ngcontent-%COMP%]:not(.selected):hover{background:var(--bg-hover)}.req-row.selected[_ngcontent-%COMP%]{background:var(--accent-soft)}.req-id[_ngcontent-%COMP%]{font-size:11px}.req-title[_ngcontent-%COMP%]{font-size:10.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-col[_ngcontent-%COMP%]{flex:1;min-width:0}.detail-scroll[_ngcontent-%COMP%]{flex:1;padding:22px}.detail-title[_ngcontent-%COMP%]{font-size:22px;font-weight:650;letter-spacing:-.01em;margin:2px 0 14px;text-wrap:pretty}.meta-row[_ngcontent-%COMP%]{gap:18px;padding:10px 0;border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);margin-bottom:18px;flex-wrap:wrap}.detail-body[_ngcontent-%COMP%]{font-size:13.5px;line-height:1.65;color:var(--text-secondary);margin-bottom:22px;text-wrap:pretty}.brief-panel[_ngcontent-%COMP%]{border:1px solid var(--border-subtle);border-radius:8px;padding:0 12px;margin-bottom:22px;background:var(--bg-panel)}.brief-summary[_ngcontent-%COMP%]{padding:10px 0;cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px;-webkit-user-select:none;user-select:none;margin-bottom:0}.brief-summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.brief-summary[_ngcontent-%COMP%]:before{content:"\\25b6";font-size:8px;color:var(--text-muted);transition:transform .15s}details[open][_ngcontent-%COMP%] > .brief-summary[_ngcontent-%COMP%]:before{transform:rotate(90deg)}.brief-body[_ngcontent-%COMP%]{margin-bottom:12px}.link-row[_ngcontent-%COMP%]{padding:10px 12px}.link-target[_ngcontent-%COMP%]{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.orphan-card[_ngcontent-%COMP%]{text-align:center;color:var(--error);margin-bottom:22px;border-color:#f2555a4d}.loading-detail[_ngcontent-%COMP%]{padding:40px 18px;color:var(--text-muted);font-size:13px;text-align:center}.save-error[_ngcontent-%COMP%]{padding:10px 14px;border:1px solid rgba(255,90,90,.35);background:var(--error-soft);color:var(--error);border-radius:8px;font-size:12.5px;line-height:1.5}.save-status[_ngcontent-%COMP%]{margin-top:8px;color:var(--text-muted);font-size:12px}'],changeDetection:0})};export{pe as Specs};
@@ -0,0 +1 @@
1
+ import{E as n,I as p,R as l,W as s,X as y,lb as f}from"./chunk-PDN6QYGJ.js";import{a as o,b as d}from"./chunk-Q7L6LLAK.js";var m="specship.theme",h=class i{destroyRef=p(l);pref=s(this.loadPref());effective=s("dark");constructor(){this.applyEffective();let e=window.matchMedia("(prefers-color-scheme: light)"),t=()=>{this.pref()==="system"&&this.applyEffective()};e.addEventListener("change",t),this.destroyRef.onDestroy(()=>e.removeEventListener("change",t)),y(()=>{let r=this.pref();try{localStorage.setItem(m,r)}catch{}this.applyEffective()})}setPref(e){this.pref.set(e)}toggle(){this.setPref(this.effective()==="dark"?"light":"dark")}loadPref(){try{let e=localStorage.getItem(m);if(e==="dark"||e==="light"||e==="system")return e}catch{}return"dark"}applyEffective(){let e=window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark",t=this.pref(),r=t==="system"?e:t;document.documentElement.setAttribute("data-theme",r),this.effective.set(r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})};var u="specship.notify.prefs",a={approval:!0,runDone:!0,drift:!0},g=class i{permission=s("default");prefs=s(this.loadPrefs());supported=f(()=>this.permission()!=="unsupported");granted=f(()=>this.permission()==="granted");constructor(){if(typeof window>"u"||typeof Notification>"u"){this.permission.set("unsupported");return}this.permission.set(Notification.permission)}enabled(e){return this.prefs()[e]!==!1}toggle(e){let t=d(o({},this.prefs()),{[e]:!this.enabled(e)});this.prefs.set(t),this.savePrefs(t)}async requestPermission(){if(typeof Notification>"u"){this.permission.set("unsupported");return}try{let e=await Notification.requestPermission();this.permission.set(e)}catch{}}notify(e,t,r={}){if(!(this.permission()!=="granted"||!this.enabled(e))&&!(typeof Notification>"u"))try{let c=new Notification(t,{body:r.body,tag:r.tag});r.onClick&&(c.onclick=()=>{try{window.focus()}catch{}r.onClick(),c.close()})}catch{}}loadPrefs(){if(typeof localStorage>"u")return o({},a);try{let e=localStorage.getItem(u);return e?o(o({},a),JSON.parse(e)):o({},a)}catch{return o({},a)}}savePrefs(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(u,JSON.stringify(e))}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})};export{h as a,g as b};
Binary file
Binary file
@@ -9,6 +9,7 @@
9
9
  <link rel="icon" type="image/png" sizes="32x32" href="favicon-32.png">
10
10
  <link rel="icon" type="image/png" sizes="16x16" href="favicon-16.png">
11
11
  <link rel="apple-touch-icon" sizes="180x180" href="favicon-180.png">
12
+ <link rel="manifest" href="manifest.webmanifest">
12
13
  <meta name="theme-color" content="#0B0D11">
13
14
  <meta name="description" content="SpecShip Desktop — see your codebase, understand your sessions.">
14
15
  <link rel="preconnect" href="https://fonts.googleapis.com">
@@ -141,5 +142,5 @@
141
142
  })();
142
143
  </script>
143
144
  <app-root></app-root>
144
- <link rel="modulepreload" href="chunk-SBWU7JFC.js"><link rel="modulepreload" href="chunk-GR72OOCN.js"><link rel="modulepreload" href="chunk-SHPTC4RL.js"><link rel="modulepreload" href="chunk-7RNS77UP.js"><link rel="modulepreload" href="chunk-E44X4RH2.js"><link rel="modulepreload" href="chunk-PDN6QYGJ.js"><link rel="modulepreload" href="chunk-Q7L6LLAK.js"><script src="main-X2KCYXZ4.js" type="module"></script></body>
145
+ <link rel="modulepreload" href="chunk-WQWYTRFN.js"><link rel="modulepreload" href="chunk-GR72OOCN.js"><link rel="modulepreload" href="chunk-SHPTC4RL.js"><link rel="modulepreload" href="chunk-7RNS77UP.js"><link rel="modulepreload" href="chunk-E44X4RH2.js"><link rel="modulepreload" href="chunk-PDN6QYGJ.js"><link rel="modulepreload" href="chunk-Q7L6LLAK.js"><script src="main-LHCYPOXF.js" type="module"></script></body>
145
146
  </html>
@@ -0,0 +1 @@
1
+ import{a as G,b as he}from"./chunk-WQWYTRFN.js";import{a as fe,b as ve,c as B}from"./chunk-GR72OOCN.js";import{b as ce,c as z,d as me,e as ue,f as ge}from"./chunk-SHPTC4RL.js";import{a as I}from"./chunk-7RNS77UP.js";import{a as H}from"./chunk-E44X4RH2.js";import{$ as ae,Aa as c,Ba as d,Ca as p,Da as C,E as $,Ga as k,Ha as V,I as f,Ia as b,Ja as R,Ka as g,M as y,N as P,O as ee,R as ie,Ta as se,Ua as w,V as oe,Va as s,W as S,Wa as h,Xa as A,Ya as le,ca as re,cb as de,da as te,ea as o,ka as x,lb as D,ob as F,pb as E,qa as M,ra as m,sa as u,va as T,wa as j,wb as pe,xa as v,ya as a,za as r,zb as L}from"./chunk-PDN6QYGJ.js";import"./chunk-Q7L6LLAK.js";var _e=[{path:"",pathMatch:"full",redirectTo:"dashboard"},{path:"dashboard",loadComponent:()=>import("./chunk-D5OCNEJA.js").then(e=>e.Dashboard),data:{nav:"dashboard",title:"Dashboard"}},{path:"graph",loadComponent:()=>import("./chunk-WLIMNDS3.js").then(e=>e.Graph),data:{nav:"graph",title:"Graph"}},{path:"specs",loadComponent:()=>import("./chunk-JQ534IB6.js").then(e=>e.Specs),data:{nav:"specs",title:"Specs"}},{path:"drift",loadComponent:()=>import("./chunk-FHZHD2ZG.js").then(e=>e.Drift),data:{nav:"drift",title:"Drift queue"}},{path:"workflows",loadComponent:()=>import("./chunk-NZEZCT65.js").then(e=>e.Workflows),data:{nav:"workflows",title:"Workflows"}},{path:"runs",loadComponent:()=>import("./chunk-UBOZGQNK.js").then(e=>e.Runs),data:{nav:"runs",title:"Runs"}},{path:"runs/:id",loadComponent:()=>import("./chunk-MVOMVPYB.js").then(e=>e.RunDetail),data:{nav:"runs",title:"Run detail"}},{path:"chat",loadComponent:()=>import("./chunk-L37MTFSG.js").then(e=>e.Chat),data:{nav:"chat",title:"Chat"}},{path:"sessions",loadComponent:()=>import("./chunk-ASZ77FMZ.js").then(e=>e.Sessions),data:{nav:"sessions",title:"Sessions"}},{path:"sessions/:id",loadComponent:()=>import("./chunk-RASJHUXS.js").then(e=>e.SessionDetail),data:{nav:"sessions",title:"Session detail"}},{path:"heatmap",loadComponent:()=>import("./chunk-YAMRN47K.js").then(e=>e.Heatmap),data:{nav:"heatmap",title:"Heatmap"}},{path:"costs",loadComponent:()=>import("./chunk-WCHGDXWC.js").then(e=>e.Costs),data:{nav:"costs",title:"Costs"}},{path:"specship-impact",loadComponent:()=>import("./chunk-TQ3P2QZO.js").then(e=>e.SpecshipImpact),data:{nav:"specship-impact",title:"SpecShip Impact"}},{path:"compare",loadComponent:()=>import("./chunk-WCKHQIYN.js").then(e=>e.Compare),data:{nav:"compare",title:"Compare projects"}},{path:"tips",loadComponent:()=>import("./chunk-A5R3MJMO.js").then(e=>e.Tips),data:{nav:"tips",title:"Tips"}},{path:"memory",loadComponent:()=>import("./chunk-45QHGCB4.js").then(e=>e.Memory),data:{nav:"memory",title:"Memory"}},{path:"design",loadComponent:()=>import("./chunk-WAI2JMZP.js").then(e=>e.Design),data:{nav:"design",title:"Design system"}},{path:"settings",loadComponent:()=>import("./chunk-HGBF7AY5.js").then(e=>e.Settings),data:{nav:"settings",title:"Settings"}},{path:"**",redirectTo:"dashboard"}];var be={providers:[oe(),ge(_e)]};function xe(e,n){e&1&&(ee(),C(0,"rect",14)(1,"rect",15))}var q=class e{size=E(24);tile=E(!0);glow=E(!0);static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-logo-mark"]],inputs:{size:[1,"size"],tile:[1,"tile"],glow:[1,"glow"]},decls:16,vars:5,consts:[["viewBox","0 0 32 32","fill","none",2,"flex-shrink","0"],["id","ssTile","x1","0","y1","0","x2","32","y2","32","gradientUnits","userSpaceOnUse"],["stop-color","#12161E"],["offset","1","stop-color","#0B0D11"],["id","ssLead","x1","18","y1","11","x2","26","y2","21","gradientUnits","userSpaceOnUse"],["stop-color","#6FA0F6"],["offset","1","stop-color","#5B93F2"],["transform","translate(4.6 4.6) scale(0.715)"],["d","M5 16 H11 M11 9 L23 16 L11 23","stroke","rgba(150,165,200,0.5)","stroke-width","1.9","stroke-linecap","round","stroke-linejoin","round","fill","none"],["x1","11","y1","9","x2","11","y2","23","stroke","rgba(150,165,200,0.4)","stroke-width","1.9","stroke-linecap","round"],["cx","23","cy","16","r","3.6","fill","url(#ssLead)"],["cx","11","cy","9","r","2.9","fill","#A586F5"],["cx","11","cy","23","r","2.9","fill","#46C26B"],["cx","5","cy","16","r","2.1","fill","#29D2BE"],["width","32","height","32","rx","7.2","fill","url(#ssTile)"],["x","0.5","y","0.5","width","31","height","31","rx","6.7","fill","none","stroke","rgba(255,255,255,0.08)"]],template:function(t,i){t&1&&(ee(),d(0,"svg",0)(1,"defs")(2,"linearGradient",1),C(3,"stop",2)(4,"stop",3),p(),d(5,"linearGradient",4),C(6,"stop",5)(7,"stop",6),p()(),m(8,xe,2,0),d(9,"g",7),C(10,"path",8)(11,"line",9)(12,"circle",10)(13,"circle",11)(14,"circle",12)(15,"circle",13),p()()),t&2&&(se("filter",i.glow()?"drop-shadow(0 0 9px rgba(91,147,242,0.35))":"none"),M("width",i.size())("height",i.size()),o(8),u(i.tile()?8:-1))},styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center;line-height:0}"],changeDetection:0})};var Ce=e=>["/",e],ye=(e,n)=>n.group,Pe=(e,n)=>n.id;function ke(e,n){e&1&&(a(0,"div",3),s(1,"SpecShip "),a(2,"span",14),s(3,"Desktop"),r()())}function we(e,n){if(e&1&&(a(0,"div",15),s(1),r()),e&2){let t=g().$implicit;o(),h(t.group)}}function Se(e,n){if(e&1&&(a(0,"span",18),s(1),r()),e&2){let t=g(2).$implicit,i=g(2);M("data-kind",t.badgeKind),o(),h(i.badgeOf(t))}}function Me(e,n){if(e&1&&(a(0,"span",11),s(1),r(),m(2,Se,2,2,"span",18)),e&2){let t=g().$implicit,i=g(2);o(),h(t.label),o(),u(i.badgeOf(t)>0?2:-1)}}function Ee(e,n){if(e&1&&(a(0,"a",16),c(1,"span",8),a(2,"span",9),c(3,"app-icon",17),r(),m(4,Me,3,2),r()),e&2){let t=n.$implicit,i=g(2);v("routerLink",de(5,Ce,t.id))("title",i.collapsed()?t.label:null),o(3),v("name",t.icon)("size",16),o(),u(i.collapsed()?-1:4)}}function Oe(e,n){if(e&1&&(a(0,"div",5),m(1,we,2,1,"div",15),T(2,Ee,5,7,"a",16,Pe),r()),e&2){let t=n.$implicit,i=g();o(),u(i.collapsed()?-1:1),o(),j(t.items)}}function Te(e,n){e&1&&(a(0,"span",11),s(1,"Design system"),r())}function je(e,n){e&1&&(a(0,"span",11),s(1,"Settings"),r())}var K=class e{collapsed=E(!1);api=f(H);projects=f(I);status=B(this.api,()=>`/api/status${this.projects.projectQuery()}`);tips=B(this.api,()=>"/api/claude/tips");nav=[{group:"Project",items:[{id:"dashboard",label:"Dashboard",icon:"dashboard"},{id:"graph",label:"Graph",icon:"graph"},{id:"specs",label:"Specs",icon:"book"},{id:"drift",label:"Drift queue",icon:"drift",badge:()=>this.status.state().data?.drift??0,badgeKind:"warn"},{id:"workflows",label:"Workflows",icon:"workflow"},{id:"runs",label:"Runs",icon:"play"},{id:"chat",label:"Chat",icon:"chat"}]},{group:"Claude Code",items:[{id:"sessions",label:"Sessions",icon:"sessions"},{id:"heatmap",label:"Heatmap",icon:"heatmap"},{id:"costs",label:"Costs",icon:"dollar"},{id:"specship-impact",label:"SpecShip Impact",icon:"graph"},{id:"compare",label:"Compare projects",icon:"compare"},{id:"memory",label:"Memory",icon:"memory"},{id:"tips",label:"Tips",icon:"tips",badge:()=>(this.tips.state().data?.tips??[]).filter(n=>n.severity!=="info").length,badgeKind:"error"}]}];badgeOf(n){return n.badge?n.badge():0}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-sidebar"]],inputs:{collapsed:[1,"collapsed"]},decls:18,vars:10,consts:[[1,"sidebar"],[1,"brand"],[3,"size"],[1,"brand-text"],[1,"scroll-y","nav-scroll"],[1,"nav-group"],[1,"pinned"],["routerLink","/design","routerLinkActive","active",1,"nav-item",3,"title"],[1,"indicator"],[1,"nav-icon"],["name","palette",3,"size"],[1,"nav-label"],["routerLink","/settings","routerLinkActive","active",1,"nav-item",3,"title"],["name","settings",3,"size"],[1,"muted"],[1,"eyebrow","group-label"],["routerLinkActive","active",1,"nav-item",3,"routerLink","title"],[3,"name","size"],[1,"badge"]],template:function(t,i){t&1&&(a(0,"nav",0)(1,"div",1),c(2,"app-logo-mark",2),m(3,ke,4,0,"div",3),r(),a(4,"div",4),T(5,Oe,4,1,"div",5,ye),r(),a(7,"div",6)(8,"a",7),c(9,"span",8),a(10,"span",9),c(11,"app-icon",10),r(),m(12,Te,2,0,"span",11),r(),a(13,"a",12),c(14,"span",8),a(15,"span",9),c(16,"app-icon",13),r(),m(17,je,2,0,"span",11),r()()()),t&2&&(w("collapsed",i.collapsed()),o(2),v("size",26),o(),u(i.collapsed()?-1:3),o(2),j(i.nav),o(3),v("title",i.collapsed()?"Design system":null),o(3),v("size",16),o(),u(i.collapsed()?-1:12),o(),v("title",i.collapsed()?"Settings":null),o(3),v("size",16),o(),u(i.collapsed()?-1:17))},dependencies:[me,ue,L,q],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:contents}.sidebar[_ngcontent-%COMP%]{width:var(--sidebar-w);flex-shrink:0;background:var(--bg-panel);border-right:1px solid var(--border-subtle);display:flex;flex-direction:column;transition:width .12s;overflow:hidden;font-family:var(--font-ui)}.sidebar.collapsed[_ngcontent-%COMP%]{width:var(--sidebar-w-collapsed)}.brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:15px 16px}.collapsed[_ngcontent-%COMP%] .brand[_ngcontent-%COMP%]{justify-content:center;padding:14px 0}.brand-text[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px;letter-spacing:-.01em}.brand-text[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{color:var(--text-muted);font-weight:400}.nav-scroll[_ngcontent-%COMP%]{flex:1;padding:4px 8px}.nav-group[_ngcontent-%COMP%]{margin-bottom:10px}.group-label[_ngcontent-%COMP%]{padding:8px 8px 4px}.nav-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;gap:10px;height:32px;padding:0 10px;border-radius:7px;text-decoration:none;margin-bottom:1px;color:var(--text-secondary);font-weight:450;font-size:13px;transition:background .1s}.collapsed[_ngcontent-%COMP%] .nav-item[_ngcontent-%COMP%]{padding:0;justify-content:center}.nav-item[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-primary)}.nav-item.active[_ngcontent-%COMP%]{background:var(--bg-active);color:var(--text-primary);font-weight:600}.nav-item.active[_ngcontent-%COMP%] .indicator[_ngcontent-%COMP%]{position:absolute;left:0;top:7px;bottom:7px;width:2.5px;border-radius:2px;background:var(--accent)}.nav-icon[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;color:var(--text-secondary)}.nav-item[_ngcontent-%COMP%]:hover .nav-icon[_ngcontent-%COMP%]{color:var(--text-primary)}.nav-item.active[_ngcontent-%COMP%] .nav-icon[_ngcontent-%COMP%]{color:var(--accent)}.nav-label[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[_ngcontent-%COMP%]{font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:10px;font-weight:700;padding:1px 6px;min-width:18px;border-radius:999px;display:inline-flex;justify-content:center;color:var(--text-secondary);background:#ffffff0f}.badge[data-kind=error][_ngcontent-%COMP%]{color:var(--error);background:var(--error-soft)}.badge[data-kind=warn][_ngcontent-%COMP%]{color:var(--warn);background:var(--warn-soft)}.pinned[_ngcontent-%COMP%]{padding:8px;border-top:1px solid var(--border-subtle)}'],changeDetection:0})};function De(e,n){if(e&1&&(d(0,"span",8),s(1),p(),C(2,"span",1),d(3,"span",9)(4,"span",10),s(5,"backend"),p(),d(6,"span",4),s(7),p()(),C(8,"span",1),d(9,"span",9)(10,"span",10),s(11,"nodes"),p(),d(12,"span",4),s(13),p()(),d(14,"span",9)(15,"span",10),s(16,"edges"),p(),d(17,"span",4),s(18),p()(),C(19,"span",1),d(20,"span",9)(21,"span",10),s(22,"drift"),p(),d(23,"span",4),s(24),p()(),C(25,"span",11),d(26,"span",9)(27,"span",10),s(28,"indexed"),p(),d(29,"span",4),s(30),p()()),e&2){let t=g(),i=t.status.state().data;o(),h(i.projectPath),o(6),h(i.backend),o(6),h(i.nodeCount.toLocaleString()),o(5),h(i.edgeCount.toLocaleString()),o(5),w("warn",i.drift>0)("success",i.drift===0),o(),h(i.drift),o(6),h(t.indexedLabel())}}function ze(e,n){e&1&&(d(0,"span",12),s(1,"loading status\u2026"),p(),C(2,"span",11))}function Ie(e,n){if(e&1&&(d(0,"span",12),s(1),p(),C(2,"span",11)),e&2){let t=g();o(),h(t.conn.online()?"no backend":"offline \u2014 no cached data")}}function Le(e,n){e&1&&(d(0,"span",5),s(1),p()),e&2&&(o(),A("\xB7 ",n))}function Ne(e,n){e&1&&(d(0,"span",6),s(1,"\u26A0"),p()),e&2&&V("title",n)}var W=class e{api=f(H);projects=f(I);refreshSvc=f(ve);conn=f(fe);status=B(this.api,()=>`/api/status${this.projects.projectQuery()}`);offlineAge=D(()=>{let n=this.status.state().cachedAt??this.conn.lastOnlineAt();if(n===null)return null;let t=Date.now()-n;return t<1e4?"just now":t<6e4?`${Math.round(t/1e3)}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:t<864e5?`${Math.round(t/36e5)}h ago`:`${Math.round(t/864e5)}d ago`});indexedLabel=D(()=>{let n=this.status.state().data?.lastIndexed;if(!n)return"never";try{let t=new Date(n),i=Date.now()-t.getTime();return i<6e4?"just now":i<36e5?`${Math.round(i/6e4)}m ago`:i<864e5?`${Math.round(i/36e5)}h ago`:t.toLocaleDateString()}catch{return String(n)}});async refresh(){await this.refreshSvc.triggerGlobalRefresh()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-status-strip"]],decls:13,vars:14,consts:[[1,"status-strip"],[1,"divider"],[1,"seg","conn",3,"title"],[1,"conn-dot"],[1,"mono","val"],[1,"muted","conn-age"],[1,"refresh-error","mono",3,"title"],[1,"refresh",3,"click","disabled","title"],[1,"seg","mono"],[1,"seg"],[1,"lbl"],[1,"grow"],[1,"mono","muted"]],template:function(t,i){if(t&1&&(d(0,"div",0),m(1,De,31,10)(2,ze,3,0)(3,Ie,3,1),C(4,"span",1),d(5,"span",2),C(6,"span",3),d(7,"span",4),s(8),p(),m(9,Le,2,1,"span",5),p(),m(10,Ne,2,1,"span",6),d(11,"button",7),R("click",function(){return i.refresh()}),s(12,"\u21BB"),p()()),t&2){let l,_;o(),u(i.status.state().data?1:i.status.state().loading?2:3),o(4),V("title",i.conn.online()?"Connected to the SpecShip server":"Server unreachable \u2014 showing the last cached data"),o(),w("live",i.conn.online())("off",!i.conn.online()),o(2),h(i.conn.online()?"Live":"Offline"),o(),u((l=!i.conn.online()&&i.offlineAge())?9:-1,l),o(),u((_=i.refreshSvc.error())?10:-1,_),o(),w("spinning",i.refreshSvc.loading()),V("disabled",i.refreshSvc.loading()||!i.conn.online())("title",i.conn.online()?i.refreshSvc.loading()?"Refreshing\u2026":"Refresh: sync index + re-ingest Claude Code transcripts. Updates Sessions, Heatmap, Costs, Memory, Drift, Graph.":"Offline \u2014 reconnect to refresh"),M("aria-label",i.conn.online()?i.refreshSvc.loading()?"Refreshing\u2026":"Refresh everything \u2014 sync index + ingest Claude Code transcripts":"Offline \u2014 reconnect to refresh")}},styles:["[_nghost-%COMP%]{display:contents}.status-strip[_ngcontent-%COMP%]{height:var(--status-h);flex-shrink:0;display:flex;align-items:center;gap:14px;padding:0 14px;border-bottom:1px solid var(--border-subtle);background:var(--bg-panel-2);font-size:11.5px;overflow:hidden;white-space:nowrap}.seg[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-shrink:0}.lbl[_ngcontent-%COMP%]{color:var(--text-muted);font-size:11px}.val[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.val.warn[_ngcontent-%COMP%]{color:var(--warn)}.val.success[_ngcontent-%COMP%]{color:var(--success)}.divider[_ngcontent-%COMP%]{width:1px;height:12px;background:var(--border-subtle);flex-shrink:0}.grow[_ngcontent-%COMP%]{flex:1}.muted[_ngcontent-%COMP%]{color:var(--text-muted)}.refresh[_ngcontent-%COMP%]{background:transparent;border:none;color:var(--text-muted);cursor:pointer;font-size:14px;padding:2px 6px;border-radius:4px;transition:background .12s,color .12s}.refresh[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-primary)}.refresh[_ngcontent-%COMP%]:disabled{cursor:progress;opacity:.8}.refresh[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.refresh.spinning[_ngcontent-%COMP%]{display:inline-block;animation:_ngcontent-%COMP%_spin .9s linear infinite;color:var(--accent)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.refresh-error[_ngcontent-%COMP%]{color:var(--warn);font-size:12px;padding:0 2px;cursor:help}.conn[_ngcontent-%COMP%]{gap:5px}.conn-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex-shrink:0}.conn-dot.live[_ngcontent-%COMP%]{background:var(--success);box-shadow:0 0 6px var(--success)}.conn-dot.off[_ngcontent-%COMP%]{background:var(--warn);box-shadow:0 0 6px var(--warn)}.conn-age[_ngcontent-%COMP%]{font-size:11px}"],changeDetection:0})};var Re=(e,n)=>n.slug;function Ae(e,n){e&1&&c(0,"span",8)}function Fe(e,n){e&1&&c(0,"span",9)}function Be(e,n){e&1&&c(0,"span",10)}function $e(e,n){if(e&1&&(a(0,"span",7),s(1),r(),m(2,Ae,1,0,"span",8)(3,Fe,1,0,"span",9)(4,Be,1,0,"span",10)),e&2){let t=n,i=g();o(),h(i.shortPath(t.path)),o(),u(t.exists?t.initialized?4:3:2)}}function Ve(e,n){e&1&&(a(0,"span",3),s(1,"Select project"),r())}function He(e,n){if(e&1){let t=k();a(0,"button",20),b("click",function(){y(t);let l=g(2);return P(l.clear())}),c(1,"app-icon",21),s(2," Clear "),r()}e&2&&(o(),v("size",11))}function Ge(e,n){e&1&&(a(0,"span",16),s(1,"\xB7 loading\u2026"),r())}function qe(e,n){if(e&1&&(a(0,"span",16),s(1),r()),e&2){let t=g(2);o(),A("\xB7 ",t.filtered().length," shown \xB7 live")}}function Ke(e,n){e&1&&(a(0,"div",18),s(1,"No projects match."),r())}function We(e,n){e&1&&(a(0,"span",25),s(1,"missing"),r())}function Ue(e,n){e&1&&(a(0,"span",26),s(1,"not init"),r())}function Qe(e,n){e&1&&(a(0,"span",27),s(1,"initialized"),r())}function Je(e,n){if(e&1&&(a(0,"span"),s(1),r()),e&2){let t=g().$implicit,i=g(2);o(),A("\xB7 ",i.formatRelative(t.lastModifiedMs))}}function Ye(e,n){e&1&&c(0,"app-icon",29),e&2&&v("size",13)}function Xe(e,n){if(e&1){let t=k();a(0,"button",22),b("click",function(){let l=y(t).$implicit,_=g(2);return P(_.pick(l.slug))}),a(1,"div",23)(2,"div",24)(3,"span",7),s(4),r(),m(5,We,2,0,"span",25)(6,Ue,2,0,"span",26)(7,Qe,2,0,"span",27),r(),a(8,"div",28)(9,"span"),s(10),r(),m(11,Je,2,1,"span"),r()(),m(12,Ye,1,1,"app-icon",29),r()}if(e&2){let t=n.$implicit,i=g(2);w("active",i.projects.activeSlug()===t.slug),o(4),h(i.shortPath(t.path)),o(),u(t.exists?t.initialized?7:6:5),o(5),le("",t.sessionCount," session",t.sessionCount===1?"":"s"),o(),u(t.lastModifiedMs>0?11:-1),o(),u(i.projects.activeSlug()===t.slug?12:-1)}}function Ze(e,n){if(e&1){let t=k();a(0,"div",6)(1,"div",11),c(2,"app-icon",12),a(3,"input",13),b("input",function(l){y(t);let _=g();return P(_.onQuery(l.target.value))}),r(),m(4,He,3,1,"button",14),r(),a(5,"div",15)(6,"span"),s(7),r(),m(8,Ge,2,0,"span",16)(9,qe,2,1,"span",16),r(),a(10,"div",17),m(11,Ke,2,0,"div",18),T(12,Xe,13,8,"button",19,Re),r()()}if(e&2){let t=g();o(2),v("size",13),o(),v("value",t.query()),o(),u(t.projects.activeSlug()?4:-1),o(3),h(t.projects.claudeRoot()??"~/.claude/projects"),o(),u(t.projects.loading()?8:9),o(3),u(t.filtered().length===0&&!t.projects.loading()?11:-1),o(),j(t.filtered())}}var U=class e{host=f(ae);projects=f(I);open=S(!1);query=S("");filtered=D(()=>{let n=this.query().trim().toLowerCase(),t=this.projects.projects();return n?t.filter(i=>i.path.toLowerCase().includes(n)||i.slug.toLowerCase().includes(n)):t});badge=D(()=>this.projects.projects().length);toggle(){this.open.update(n=>!n)}pick(n){this.projects.setActive(n),this.open.set(!1),this.query.set("")}clear(){this.projects.setActive(null),this.open.set(!1)}onQuery(n){this.query.set(n)}onDocumentClick(n){if(!this.open())return;let t=n.target;t&&!this.host.nativeElement.contains(t)&&this.open.set(!1)}onEscape(){this.open()&&this.open.set(!1)}formatRelative(n){if(!n)return"";let t=Date.now()-n,i=Math.round(t/1e3);if(i<60)return`${i}s ago`;let l=Math.round(i/60);if(l<60)return`${l}m ago`;let _=Math.round(l/60);if(_<24)return`${_}h ago`;let ne=Math.round(_/24);return ne<30?`${ne}d ago`:new Date(n).toLocaleDateString()}shortPath(n){if(!n)return"";let t=this.detectHome();return t&&n===t?"~":t&&n.startsWith(t+"/")?"~/"+n.slice(t.length+1):n}detectHome(){let n=this.projects.claudeRoot();if(!n)return null;let t="/.claude/projects";return n.endsWith(t)?n.slice(0,-t.length):null}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-project-picker"]],hostBindings:function(t,i){t&1&&b("click",function(_){return i.onDocumentClick(_)},te)("keydown.escape",function(){return i.onEscape()},te)},decls:9,vars:9,consts:[[1,"wrap"],["type","button","aria-label","Switch project",1,"trigger",3,"click"],["name","folder",3,"size"],[1,"placeholder"],[1,"badge","mono"],[3,"name","size"],["role","dialog","aria-label","Pick a project",1,"popover"],[1,"path","mono"],["title","path no longer exists on disk",1,"status-dot","missing"],["title","not yet specship init'd",1,"status-dot","warn"],["title","initialized",1,"status-dot","ok"],[1,"popover-head","row","gap-8"],["name","search",3,"size"],["type","text","placeholder","Filter projects\u2026","autofocus","",1,"popover-input",3,"input","value"],["title","Clear selection",1,"btn","btn-ghost","btn-xs"],[1,"popover-meta","mono"],[1,"muted"],[1,"popover-list","scroll-y"],[1,"empty"],["type","button",1,"row-item",3,"active"],["title","Clear selection",1,"btn","btn-ghost","btn-xs",3,"click"],["name","x",3,"size"],["type","button",1,"row-item",3,"click"],[1,"col","gap-2","grow"],[1,"row","gap-6","path-line"],[1,"pill","missing"],[1,"pill","warn"],[1,"pill","ok"],[1,"meta","row","gap-8","mono","muted"],["name","check",3,"size"]],template:function(t,i){if(t&1&&(a(0,"div",0)(1,"button",1),b("click",function(){return i.toggle()}),c(2,"app-icon",2),m(3,$e,5,2)(4,Ve,2,0,"span",3),a(5,"span",4),s(6),r(),c(7,"app-icon",5),r(),m(8,Ze,14,6,"div",6),r()),t&2){let l;w("open",i.open()),o(),M("aria-expanded",i.open()),o(),v("size",13),o(),u((l=i.projects.active())?3:4,l),o(3),h(i.badge()),o(),v("name",i.open()?"chevronDown":"chevronRight")("size",11),o(),u(i.open()?8:-1)}},dependencies:[L],styles:["[_nghost-%COMP%]{display:inline-flex;min-width:0}.wrap[_ngcontent-%COMP%]{position:relative;min-width:0}.trigger[_ngcontent-%COMP%]{height:30px;padding:0 11px 0 10px;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:8px;color:var(--text-secondary);display:inline-flex;align-items:center;gap:8px;font-family:var(--font-ui);font-size:12.5px;cursor:pointer;max-width:360px;min-width:0;transition:background .1s,border-color .1s}.trigger[_ngcontent-%COMP%]:hover, .wrap.open[_ngcontent-%COMP%] .trigger[_ngcontent-%COMP%]{background:var(--bg-panel-2);border-color:var(--border-strong);color:var(--text-primary)}.trigger[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{color:var(--text-muted);flex-shrink:0}.trigger[_ngcontent-%COMP%]:hover app-icon[_ngcontent-%COMP%]{color:var(--text-secondary)}.path[_ngcontent-%COMP%]{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.placeholder[_ngcontent-%COMP%]{color:var(--text-muted);font-style:italic}.status-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex-shrink:0}.status-dot.ok[_ngcontent-%COMP%]{background:var(--success)}.status-dot.warn[_ngcontent-%COMP%]{background:var(--warn)}.status-dot.missing[_ngcontent-%COMP%]{background:var(--error)}.badge[_ngcontent-%COMP%]{font-size:10px;padding:1px 6px;border-radius:999px;background:var(--bg-active);color:var(--text-muted);font-variant-numeric:tabular-nums;flex-shrink:0}.popover[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);left:0;z-index:30;width:420px;max-width:calc(100vw - 40px);background:var(--bg-elevated);border:1px solid var(--border-strong);border-radius:10px;box-shadow:var(--shadow-pop);display:flex;flex-direction:column;max-height:480px;animation:_ngcontent-%COMP%_pp-in .12s ease-out}@keyframes _ngcontent-%COMP%_pp-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.popover-head[_ngcontent-%COMP%]{padding:10px 12px 8px;border-bottom:1px solid var(--border-subtle)}.popover-head[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{color:var(--text-muted);flex-shrink:0}.popover-input[_ngcontent-%COMP%]{flex:1;min-width:0;background:transparent;border:none;outline:none;font-family:var(--font-ui);font-size:13px;color:var(--text-primary)}.popover-input[_ngcontent-%COMP%]::placeholder{color:var(--text-muted)}.popover-meta[_ngcontent-%COMP%]{padding:6px 12px 8px;font-size:10.5px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-meta[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{color:var(--text-muted)}.popover-list[_ngcontent-%COMP%]{flex:1;min-height:0;padding:4px}.row-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:9px 10px;border:none;border-radius:7px;background:transparent;color:inherit;cursor:pointer;font-family:inherit;text-align:left;transition:background 80ms}.row-item[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row-item.active[_ngcontent-%COMP%]{background:var(--accent-soft);color:var(--text-primary)}.row-item.active[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{color:var(--accent)}.path-line[_ngcontent-%COMP%]{min-width:0}.path-line[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{font-size:12.5px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta[_ngcontent-%COMP%]{font-size:10.5px}.pill[_ngcontent-%COMP%]{font-size:10px;font-weight:600;padding:1px 7px;border-radius:999px;white-space:nowrap;flex-shrink:0}.pill.ok[_ngcontent-%COMP%]{color:var(--success);background:var(--success-soft)}.pill.warn[_ngcontent-%COMP%]{color:var(--warn);background:var(--warn-soft)}.pill.missing[_ngcontent-%COMP%]{color:var(--error);background:var(--error-soft)}.empty[_ngcontent-%COMP%]{text-align:center;color:var(--text-muted);font-size:12px;padding:18px 12px}.muted[_ngcontent-%COMP%]{color:var(--text-muted)}.mono[_ngcontent-%COMP%]{font-family:var(--font-mono)}.grow[_ngcontent-%COMP%]{flex:1;min-width:0}.row[_ngcontent-%COMP%]{display:flex;align-items:center}.col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.gap-2[_ngcontent-%COMP%]{gap:2px}.gap-6[_ngcontent-%COMP%]{gap:6px}.gap-8[_ngcontent-%COMP%]{gap:8px}.scroll-y[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden}"],changeDetection:0})};var Q=class e{deferred=null;canInstall=S(!1);constructor(){typeof window>"u"||window.matchMedia?.("(display-mode: standalone)").matches===!0||window.navigator.standalone===!0||(window.addEventListener("beforeinstallprompt",t=>{t.preventDefault(),this.deferred=t,this.canInstall.set(!0)}),window.addEventListener("appinstalled",()=>{this.deferred=null,this.canInstall.set(!1)}))}async install(){let n=this.deferred;if(n){this.deferred=null,this.canInstall.set(!1);try{await n.prompt(),await n.userChoice}catch{}}}static \u0275fac=function(t){return new(t||e)};static \u0275prov=$({token:e,factory:e.\u0275fac,providedIn:"root"})};function et(e,n){if(e&1){let t=k();a(0,"button",9),b("click",function(){y(t);let l=g();return P(l.onInstall())}),c(1,"app-icon",10),a(2,"span"),s(3,"Install"),r()()}e&2&&(o(),v("size",14))}var J=class e{toggleSidebar=F();openPalette=F();theme=f(G);effective=this.theme.effective;pwa=f(Q);onToggleTheme(){this.theme.toggle()}onMenuClick(){this.toggleSidebar.emit()}onPalette(){this.openPalette.emit()}onInstall(){this.pwa.install()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-top-bar"]],outputs:{toggleSidebar:"toggleSidebar",openPalette:"openPalette"},decls:14,vars:6,consts:[[1,"topbar"],["title","Toggle sidebar","aria-label","Toggle sidebar",1,"ghost","icon-btn",3,"click"],["name","menu",3,"size"],["aria-label","Open command palette",1,"palette-trigger",3,"click"],["name","search",3,"size"],[1,"grow"],["title","Install SpecShip as an app","aria-label","Install SpecShip as an app",1,"ghost",2,"display","inline-flex","align-items","center","gap","6px","padding","0 10px","height","30px","font-size","12px"],["aria-label","Toggle theme",1,"ghost","icon-btn",3,"click","title"],[3,"name","size"],["title","Install SpecShip as an app","aria-label","Install SpecShip as an app",1,"ghost",2,"display","inline-flex","align-items","center","gap","6px","padding","0 10px","height","30px","font-size","12px",3,"click"],["name","plus",3,"size"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"button",1),b("click",function(){return i.onMenuClick()}),c(2,"app-icon",2),r(),c(3,"app-project-picker"),a(4,"button",3),b("click",function(){return i.onPalette()}),c(5,"app-icon",4),a(6,"span"),s(7,"Search or jump to\u2026"),r(),a(8,"kbd"),s(9,"\u2318K"),r()(),c(10,"span",5),m(11,et,4,1,"button",6),a(12,"button",7),b("click",function(){return i.onToggleTheme()}),c(13,"app-icon",8),r()()),t&2&&(o(2),v("size",16),o(3),v("size",13),o(6),u(i.pwa.canInstall()?11:-1),o(),v("title","Theme: "+i.effective()),o(),v("name",i.effective()==="dark"?"sun":"moon")("size",16))},dependencies:[L,U],styles:["[_nghost-%COMP%]{display:contents}.topbar[_ngcontent-%COMP%]{height:44px;flex-shrink:0;display:flex;align-items:center;gap:10px;padding:0 14px;border-bottom:1px solid var(--border-subtle);background:var(--bg-canvas)}.ghost[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;color:var(--text-secondary);cursor:pointer}.ghost[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-primary)}.icon-btn[_ngcontent-%COMP%]{padding:6px 9px;border-radius:5px;font-size:16px}.palette-trigger[_ngcontent-%COMP%]{flex:1;max-width:380px;height:30px;padding:0 11px;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:8px;cursor:text;color:var(--text-muted);font-size:12.5px;text-align:left;display:flex;align-items:center;gap:8px}.palette-trigger[_ngcontent-%COMP%]:hover{border-color:var(--border-strong);color:var(--text-secondary)}.palette-trigger[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{color:var(--text-muted)}.palette-trigger[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}kbd[_ngcontent-%COMP%]{font-family:var(--font-mono);font-size:10px;color:var(--text-muted);background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:4px;padding:2px 6px}.grow[_ngcontent-%COMP%]{flex:1}"],changeDetection:0})};var tt=(e,n)=>n.id;function nt(e,n){if(e&1){let t=k();d(0,"button",6),R("click",function(){let l=y(t).$implicit,_=g(2);return P(_.go(l.id))}),d(1,"span",7),s(2),p(),d(3,"span",8),s(4),p()()}if(e&2){let t=n.$implicit;o(2),h(t.label),o(2),h(t.sub)}}function it(e,n){if(e&1){let t=k();d(0,"div",1),R("click",function(l){y(t);let _=g();return P(_.onBackdrop(l))}),d(1,"div",2)(2,"div",3)(3,"span"),s(4,"Jump to\u2026"),p(),d(5,"kbd"),s(6,"esc"),p()(),d(7,"div",4),T(8,nt,5,2,"button",5,tt),p()()()}if(e&2){let t=g();o(8),j(t.items)}}var ot=[{id:"dashboard",label:"Dashboard",sub:"/dashboard"},{id:"graph",label:"Graph",sub:"/graph"},{id:"specs",label:"Specs",sub:"/specs"},{id:"drift",label:"Drift queue",sub:"/drift"},{id:"workflows",label:"Workflows",sub:"/workflows"},{id:"runs",label:"Runs",sub:"/runs"},{id:"chat",label:"Chat",sub:"/chat"},{id:"sessions",label:"Sessions",sub:"/sessions"},{id:"heatmap",label:"Heatmap",sub:"/heatmap"},{id:"costs",label:"Costs",sub:"/costs"},{id:"compare",label:"Compare projects",sub:"/compare"},{id:"tips",label:"Tips",sub:"/tips"},{id:"settings",label:"Settings",sub:"/settings"}],Y=class e{open=E(!1);close=F();router=f(z);items=ot;go(n){this.router.navigate(["/"+n]),this.close.emit()}onBackdrop(n){n.target===n.currentTarget&&this.close.emit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-command-palette"]],inputs:{open:[1,"open"]},outputs:{close:"close"},decls:1,vars:1,consts:[[1,"backdrop"],[1,"backdrop",3,"click"],[1,"palette"],[1,"palette-header"],[1,"palette-list","scroll-y"],[1,"item"],[1,"item",3,"click"],[1,"label"],[1,"sub","mono"]],template:function(t,i){t&1&&m(0,it,10,0,"div",0),t&2&&u(i.open()?0:-1)},styles:["[_nghost-%COMP%]{display:contents}.backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:grid;place-items:start center;padding-top:12vh;z-index:100;animation:fadeIn .1s}.palette[_ngcontent-%COMP%]{width:560px;max-width:90vw;background:var(--bg-elevated);border:1px solid var(--border-strong);border-radius:12px;box-shadow:var(--shadow-pop);overflow:hidden}.palette-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--border-subtle);font-size:13px}.palette-list[_ngcontent-%COMP%]{max-height:380px;padding:6px}.item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:7px;cursor:pointer;color:var(--text-primary);font-family:inherit;font-size:13px;text-align:left}.item[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.label[_ngcontent-%COMP%]{flex:1}.sub[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-muted)}kbd[_ngcontent-%COMP%]{font-family:var(--font-mono);font-size:10px;color:var(--text-muted);background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:4px;padding:2px 6px}"],changeDetection:0})};var X=class e{es=null;notify=f(he);router=f(z);start(){if(!(this.es||typeof EventSource>"u")){try{this.es=new EventSource("/api/events")}catch{return}this.es.onmessage=n=>{let t;try{t=JSON.parse(n.data)}catch{return}!t||t.kind!=="approval"&&t.kind!=="runDone"&&t.kind!=="drift"||this.notify.notify(t.kind,t.title,{body:t.detail,tag:`${t.project}:${t.kind}:${t.id}`,onClick:()=>this.routeFor(t)})}}}stop(){this.es?.close(),this.es=null}routeFor(n){let t={project:n.project};n.kind==="drift"?this.router.navigate(["/drift"],{queryParams:t}):this.router.navigate(["/runs",n.id],{queryParams:t})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=$({token:e,factory:e.\u0275fac,providedIn:"root"})};var Z=class e{_theme=f(G);_destroyRef=f(ie);_router=f(z);_events=f(X);constructor(){this._events.start()}sidebarCollapsed=S(typeof window<"u"&&window.innerWidth<1100);paletteOpen=S(!1);gChord={armed:!1,t:0};onGlobalKey(n){let t=n.metaKey||n.ctrlKey;if(t&&n.key.toLowerCase()==="k"){n.preventDefault(),this.paletteOpen.update(i=>!i);return}if(n.key==="Escape"){this.paletteOpen.set(!1);return}if(!t&&n.key.toLowerCase()==="g"&&!this.gChord.armed){let i=n.target;if(i&&/input|textarea/i.test(i.tagName))return;this.gChord.armed=!0,this.gChord.t=Date.now(),setTimeout(()=>{this.gChord.armed=!1},600);return}if(this.gChord.armed&&!t){let i=n.key.toLowerCase();i==="d"?this._router.navigate(["/dashboard"]):i==="g"?this._router.navigate(["/graph"]):i==="s"&&this._router.navigate(["/specs"]),this.gChord.armed=!1}}toggleSidebar(){this.sidebarCollapsed.update(n=>!n)}onOpenPalette(){this.paletteOpen.set(!0)}onClosePalette(){this.paletteOpen.set(!1)}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-root"]],hostBindings:function(t,i){t&1&&b("keydown",function(_){return i.onGlobalKey(_)},re)},decls:8,vars:2,consts:[[1,"shell"],[3,"collapsed"],[1,"main"],[3,"toggleSidebar","openPalette"],[1,"page-frame"],[3,"close","open"]],template:function(t,i){t&1&&(a(0,"div",0),c(1,"app-sidebar",1),a(2,"div",2),c(3,"app-status-strip"),a(4,"app-top-bar",3),b("toggleSidebar",function(){return i.toggleSidebar()})("openPalette",function(){return i.onOpenPalette()}),r(),a(5,"div",4),c(6,"router-outlet"),r()(),a(7,"app-command-palette",5),b("close",function(){return i.onClosePalette()}),r()()),t&2&&(o(),v("collapsed",i.sidebarCollapsed()),o(6),v("open",i.paletteOpen()))},dependencies:[ce,K,W,J,Y],styles:["[_nghost-%COMP%]{display:block;height:100%}.shell[_ngcontent-%COMP%]{display:flex;height:100vh;background:var(--bg-canvas);color:var(--text-primary);font-family:var(--font-ui);font-size:var(--fs-base)}.main[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}.page-frame[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--bg-canvas)}"],changeDetection:0})};pe(Z,be).catch(e=>console.error(e));typeof navigator<"u"&&"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(e=>{console.warn("[specship] offline service worker registration failed",e)})});
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "SpecShip",
3
+ "short_name": "SpecShip",
4
+ "description": "Monitor and review your Claude Code work — specs, drift, runs, and sessions.",
5
+ "start_url": "/",
6
+ "scope": "/",
7
+ "display": "standalone",
8
+ "theme_color": "#0B0D11",
9
+ "background_color": "#0B0D11",
10
+ "icons": [
11
+ { "src": "icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
12
+ { "src": "icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
13
+ { "src": "icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
14
+ ]
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selvakumaresra/specship",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Supercharge Claude Code with semantic code intelligence. 94% fewer tool calls • 77% faster exploration • 100% local.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1 +0,0 @@
1
- import{a as P}from"./chunk-SBWU7JFC.js";import{a as w}from"./chunk-UYC52MBC.js";import{a as E}from"./chunk-SUZYBYDW.js";import{a as y}from"./chunk-E44X4RH2.js";import{Aa as o,I as b,Ia as s,Ua as u,Va as n,W as c,Wa as v,ea as i,ka as f,qa as g,ua as S,va as x,wa as h,xa as l,ya as e,za as t,zb as _}from"./chunk-PDN6QYGJ.js";import"./chunk-Q7L6LLAK.js";var O=(p,r)=>r.model;function k(p,r){if(p&1&&(e(0,"div",26)(1,"span",43),n(2),t(),o(3,"input",44)(4,"input",44),t()),p&2){let d=r.$implicit;i(2),v(d.model),i(),l("value",d.input),i(),l("value",d.output)}}function z(p,r){if(p&1&&(e(0,"option"),n(1),t()),p&2){let d=r.$implicit;i(),v(d)}}var C=class p{api=b(y);theme=b(P);setTheme(r){this.theme.setPref(r)}ingest=c(!0);watch=c(!0);motion=c(!1);toggleIngest(){this.ingest.update(r=>!r)}toggleWatch(){this.watch.update(r=>!r)}toggleMotion(){this.motion.update(r=>!r)}replayIntro(){try{sessionStorage.removeItem("specship-booted")}catch{}window.location.reload()}themeOptions=[{value:"dark",label:"Dark"},{value:"light",label:"Light"},{value:"system",label:"System"}];editorOptions=["code (VS Code)","subl (Sublime)","cursor","nvim"];pricing=[{model:"claude-opus-4",input:"15.00",output:"75.00"},{model:"claude-sonnet-4",input:"3.00",output:"15.00"},{model:"claude-haiku-4",input:"0.80",output:"4.00"}];static \u0275fac=function(d){return new(d||p)};static \u0275cmp=f({type:p,selectors:[["app-settings"]],decls:134,vars:19,consts:[[1,"settings-page","scroll-y"],["icon","settings","title","Settings"],[1,"settings-body"],[1,"card","card-pad","section-card"],[1,"section-head","row","gap-8"],["name","folder",2,"color","var(--accent)",3,"size"],[1,"section-title"],[1,"field"],[1,"field-label"],["value","~/dev/specship","readonly","",1,"input","mono",2,"width","100%"],[1,"field-hint"],["value","specs/",1,"input","mono",2,"width","100%"],["value","node_modules/, dist/, .cg/wt/",1,"input","mono",2,"width","100%"],["name","sessions",2,"color","var(--accent)",3,"size"],["value","~/.claude/projects/",1,"input","mono",2,"width","100%"],[1,"toggle-row","row"],[1,"grow"],[1,"toggle-label"],[1,"muted",2,"font-size","11px"],["type","button","aria-label","Enable transcript ingest",1,"toggle-btn",3,"click"],[1,"toggle-thumb"],["type","button","aria-label","Real-time watch",1,"toggle-btn",3,"click"],["name","dollar",2,"color","var(--accent)",3,"size"],[1,"muted",2,"font-size","11.5px","margin-bottom","12px"],[1,"pricing-header","row"],[1,"price-col"],[1,"pricing-row","row"],["name","sparkles",2,"color","var(--accent)",3,"size"],[3,"change","value","options"],["type","button","aria-label","Reduced motion",1,"toggle-btn",3,"click"],[1,"toggle-row","row",2,"border-top","1px solid var(--border-subtle)","margin-top","4px","padding-top","8px"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","refresh",3,"size"],["name","reveal",2,"color","var(--accent)",3,"size"],[1,"input",2,"width","200px"],["name","graph",2,"color","var(--accent)",3,"size"],[1,"about-grid"],[1,"about-row","row"],[1,"muted",2,"font-size","12px"],[1,"mono",2,"font-size","12px"],[1,"mono",2,"font-size","12px","color","var(--success)"],[1,"status-dot",2,"background","var(--success)"],[2,"height","30px"],[1,"mono","grow",2,"font-size","12px"],[1,"input","mono","tabular","price-input",3,"value"]],template:function(d,a){d&1&&(e(0,"div",0),o(1,"app-page-head",1),e(2,"div",2)(3,"section",3)(4,"div",4),o(5,"app-icon",5),e(6,"span",6),n(7,"Project"),t()(),e(8,"div",7)(9,"label",8),n(10,"Project root"),t(),o(11,"input",9),e(12,"div",10),n(13,"Set at app open \xB7 read-only"),t()(),e(14,"div",7)(15,"label",8),n(16,"Spec roots"),t(),o(17,"input",11),t(),e(18,"div",7)(19,"label",8),n(20,"Ignore patterns"),t(),o(21,"input",12),t()(),e(22,"section",3)(23,"div",4),o(24,"app-icon",13),e(25,"span",6),n(26,"Claude Code"),t()(),e(27,"div",7)(28,"label",8),n(29,"Transcripts path"),t(),o(30,"input",14),e(31,"div",10),n(32,"Auto-detected \xB7 overridable"),t()(),e(33,"div",15)(34,"div",16)(35,"div",17),n(36,"Enable transcript ingest"),t(),e(37,"div",18),n(38,"Read JSONL transcripts for analytics"),t()(),e(39,"button",19),s("click",function(){return a.toggleIngest()}),o(40,"span",20),t()(),e(41,"div",15)(42,"div",16)(43,"div",17),n(44,"Real-time watch"),t(),e(45,"div",18),n(46,"Tail new transcript lines as they're written"),t()(),e(47,"button",21),s("click",function(){return a.toggleWatch()}),o(48,"span",20),t()()(),e(49,"section",3)(50,"div",4),o(51,"app-icon",22),e(52,"span",6),n(53,"Pricing table"),t()(),e(54,"div",23),n(55,"Per-million-token prices. Bump these when Anthropic publishes new tiers."),t(),e(56,"div",24)(57,"span",16),n(58,"Model"),t(),e(59,"span",25),n(60,"Input $/M"),t(),e(61,"span",25),n(62,"Output $/M"),t()(),x(63,k,5,3,"div",26,O),t(),e(65,"section",3)(66,"div",4),o(67,"app-icon",27),e(68,"span",6),n(69,"Appearance"),t()(),e(70,"div",7)(71,"label",8),n(72,"Theme"),t(),e(73,"app-segmented",28),s("change",function(M){return a.setTheme(M)}),t(),e(74,"div",10),n(75,"Now fully supported \u2014 dark, light, or follow your OS"),t()(),e(76,"div",15)(77,"div",16)(78,"div",17),n(79,"Reduced motion"),t(),e(80,"div",18),n(81,"Honor OS preference \u2014 instant transitions"),t()(),e(82,"button",29),s("click",function(){return a.toggleMotion()}),o(83,"span",20),t()(),e(84,"div",30)(85,"div",16)(86,"div",17),n(87,"Boot animation"),t(),e(88,"div",18),n(89,"The graph-assembly splash on app launch"),t()(),e(90,"button",31),s("click",function(){return a.replayIntro()}),o(91,"app-icon",32),n(92," Replay intro "),t()()(),e(93,"section",3)(94,"div",4),o(95,"app-icon",33),e(96,"span",6),n(97,"Editor"),t()(),e(98,"div",7)(99,"label",8),n(100,"Open files with"),t(),e(101,"select",34),x(102,z,2,1,"option",null,S),t(),e(104,"div",10),n(105,"Detected via code / subl / etc."),t()()(),e(106,"section",3)(107,"div",4),o(108,"app-icon",35),e(109,"span",6),n(110,"About"),t()(),e(111,"div",36)(112,"div",37)(113,"span",38),n(114,"Version"),t(),e(115,"span",39),n(116,"0.4.0"),t()(),e(117,"div",37)(118,"span",38),n(119,"MCP server"),t(),e(120,"span",40),o(121,"span",41),n(122,"running "),t()(),e(123,"div",37)(124,"span",38),n(125,"Backend"),t(),e(126,"span",39),n(127),t()(),e(128,"div",37)(129,"span",38),n(130,"Log path"),t(),e(131,"span",39),n(132,"~/.cg/logs/desktop.log"),t()()()(),o(133,"div",42),t()()),d&2&&(i(5),l("size",15),i(19),l("size",15),i(15),u("on",a.ingest()),g("aria-pressed",a.ingest()),i(8),u("on",a.watch()),g("aria-pressed",a.watch()),i(4),l("size",15),i(12),h(a.pricing),i(4),l("size",15),i(6),l("value",a.theme.pref())("options",a.themeOptions),i(9),u("on",a.motion()),g("aria-pressed",a.motion()),i(9),l("size",13),i(4),l("size",15),i(7),h(a.editorOptions),i(6),l("size",15),i(19),v(a.api.isConfigured?a.api.apiBase:"not configured"))},dependencies:[_,w,E],styles:["[_nghost-%COMP%]{display:flex;flex:1;min-height:0}.settings-page[_ngcontent-%COMP%]{flex:1;padding:18px;overflow-y:auto}.settings-body[_ngcontent-%COMP%]{max-width:720px}.section-card[_ngcontent-%COMP%]{margin-bottom:14px}.section-head[_ngcontent-%COMP%]{align-items:center;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--border-subtle)}.section-title[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px}.field[_ngcontent-%COMP%]{margin-bottom:16px}.field-label[_ngcontent-%COMP%]{display:block;font-size:12.5px;font-weight:500;margin-bottom:6px;color:var(--text-primary)}.field-hint[_ngcontent-%COMP%]{color:var(--text-muted);font-size:11px;margin-top:5px}.toggle-row[_ngcontent-%COMP%]{align-items:center;padding:8px 0}.toggle-label[_ngcontent-%COMP%]{font-size:12.5px;font-weight:500}.toggle-btn[_ngcontent-%COMP%]{width:36px;height:20px;border-radius:999px;border:none;cursor:pointer;padding:2px;background:var(--bg-elevated);display:flex;justify-content:flex-start;align-items:center;transition:background .12s;flex-shrink:0}.toggle-btn.on[_ngcontent-%COMP%]{background:var(--accent);justify-content:flex-end}.toggle-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.toggle-thumb[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:50%;background:#fff;flex-shrink:0}.pricing-header[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-weight:600;margin-bottom:6px}.pricing-row[_ngcontent-%COMP%]{padding:6px 0;border-top:1px solid var(--border-subtle);align-items:center;gap:10px}.price-col[_ngcontent-%COMP%]{width:110px;text-align:right}.price-input[_ngcontent-%COMP%]{width:100px;text-align:right;padding:4px 8px}.about-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px}.about-row[_ngcontent-%COMP%]{justify-content:space-between;padding:5px 0;border-bottom:1px solid var(--border-subtle)}.status-dot[_ngcontent-%COMP%]{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px;vertical-align:middle}.muted[_ngcontent-%COMP%]{color:var(--text-muted)}.mono[_ngcontent-%COMP%]{font-family:var(--font-mono)}.grow[_ngcontent-%COMP%]{flex:1}"],changeDetection:0})};export{C as Settings};
@@ -1,6 +0,0 @@
1
- import{a as ne}from"./chunk-G7VZT5KB.js";import{a as ie}from"./chunk-EMGMOEVR.js";import{a as oe}from"./chunk-X2HTISHL.js";import{a as te}from"./chunk-R5W2MDZN.js";import{a as Z}from"./chunk-WDU3WICG.js";import{a as F,b as ee}from"./chunk-HZA6NEAB.js";import{a as Y,c as V}from"./chunk-GR72OOCN.js";import{c as K}from"./chunk-SHPTC4RL.js";import{a as J}from"./chunk-7RNS77UP.js";import{a as X}from"./chunk-E44X4RH2.js";import{Aa as p,Ga as w,I as y,Ia as x,Ka as s,M as f,N as b,Oa as G,Pa as Q,Qa as U,R as q,T as S,Ta as N,Ua as R,Va as d,W as _,Wa as g,Xa as h,aa as D,ea as o,ka as k,lb as C,ra as m,sa as u,va as I,wa as $,xa as c,ya as r,yb as B,za as a,zb as E}from"./chunk-PDN6QYGJ.js";import"./chunk-Q7L6LLAK.js";var L=null,ge="self.onmessage = () => {};";function re(){return L||(typeof window<"u"&&!window.MonacoEnvironment&&(window.MonacoEnvironment={getWorker:(i,t)=>{let e=new Blob([ge],{type:"text/javascript"}),n=URL.createObjectURL(e);return new Worker(n,{name:t||"monaco-noop"})}}),L=import("./chunk-FMV5PXRC.js"),L)}var ae=!1;function le(i){ae||(ae=!0,_e(i))}function de(i,t){let e=[],n=t.getValue().split(`
2
- `),l=null,v=new Map,P=/<!--\s*id\s*:\s*([^\s-][^\s]*)\s*-->/,ue=/^#{1,6}\s+/;for(let O=0;O<n.length;O++){let T=n[O]??"",z=O+1,W=T.match(P);if(W&&W[1]){l!==null&&e.push({severity:i.MarkerSeverity.Warning,message:`Stranded <!-- id: ${l.id} -->: no heading follows on line ${l.line+1}.`,startLineNumber:l.line+1,startColumn:1,endLineNumber:l.line+1,endColumn:(n[l.line]??"").length+1,code:"spec_stranded_id"});let M=W[1];l={id:M,line:O};let H=v.get(M);H!==void 0?e.push({severity:i.MarkerSeverity.Warning,message:`Duplicate spec ID "${M}" \u2014 first seen on line ${H+1}. The second occurrence will be silently lost by the parser.`,startLineNumber:z,startColumn:T.indexOf(M)+1,endLineNumber:z,endColumn:T.indexOf(M)+M.length+1,code:"spec_duplicate_id"}):v.set(M,O);continue}ue.test(T)&&(l===null?e.push({severity:i.MarkerSeverity.Error,message:"This heading has no embedded ID. Add `<!-- id: REQ-X -->` on the line above it \u2014 required by the SpecShip parser.",startLineNumber:z,startColumn:1,endLineNumber:z,endColumn:T.length+1,code:"spec_missing_id"}):l=null)}i.editor.setModelMarkers(t,"specship-spec",e)}function _e(i){i.languages.registerCompletionItemProvider("markdown",{provideCompletionItems:(t,e)=>{let n=t.getWordUntilPosition(e),l={startLineNumber:e.lineNumber,endLineNumber:e.lineNumber,startColumn:n.startColumn,endColumn:n.endColumn},v=i.languages.CompletionItemKind,P=i.languages.CompletionItemInsertTextRule;return{suggestions:[{label:"req",kind:v.Snippet,insertText:["<!-- id: REQ-${1:AREA}-${2:001} -->","## ${3:Title MUST be concrete}","","${4:Body \u2014 describe the contract, not the implementation.}","","## Acceptance","<!-- id: REQ-${1:AREA}-${2:001}.A1 -->","- ${5:First testable acceptance criterion}","$0"].join(`
3
- `),insertTextRules:P.InsertAsSnippet,documentation:"Insert a full requirement (heading + acceptance) with embedded IDs.",detail:"SpecShip \xB7 requirement",range:l},{label:"doc",kind:v.Snippet,insertText:["---","id: ${1:AREA}-DOC","title: ${2:Title}","owner: ${3:team-or-person}","priority: ${4|high,medium,low|}","---","","<!-- id: ${1:AREA}-DOC -->","# ${2:Title}","","${5:One-paragraph summary of what this document covers.}","$0"].join(`
4
- `),insertTextRules:P.InsertAsSnippet,documentation:"Insert a new spec document with frontmatter.",detail:"SpecShip \xB7 document",range:l},{label:"accept",kind:v.Snippet,insertText:["## Acceptance","<!-- id: ${1:REQ-X}.A1 -->","- ${2:First testable acceptance criterion}","<!-- id: ${1:REQ-X}.A2 -->","- ${3:Second testable acceptance criterion}","$0"].join(`
5
- `),insertTextRules:P.InsertAsSnippet,documentation:"Insert an Acceptance section with two ID-d bullets.",detail:"SpecShip \xB7 acceptance",range:l},{label:"impl",kind:v.Snippet,insertText:["implementations:"," - ${1:src/path/to/file.ts}:${2:QualifiedSymbol}","$0"].join(`
6
- `),insertTextRules:P.InsertAsSnippet,documentation:"Insert an implementations block linking the spec to code.",detail:"SpecShip \xB7 implementations",range:l}]}},triggerCharacters:["r","d","a","i"]})}var ve=["host"];function xe(i,t){if(i&1&&(r(0,"span",5),d(1),a()),i&2){let e=s();c("title",e.path),o(),g(e.path)}}function fe(i,t){i&1&&(r(0,"div",15),d(1,"Loading editor\u2026"),a())}var j=class i{sanitizer=y(B);destroyRef=y(q);value="";path="";valueChange=new S;validationChange=new S;save=new S;cancel=new S;hostRef;loading=_(!0);currentValue=_("");errorCount=_(0);warningCount=_(0);dirty=_(!1);previewHtml=C(()=>this.sanitizer.bypassSecurityTrustHtml(ne(this.currentValue()||"")));tokenCount=C(()=>Math.max(1,Math.round((this.currentValue()||"").length/4)));statusLabel=C(()=>{let t=this.errorCount(),e=this.warningCount();return t>0?`${t} error${t===1?"":"s"}`:e>0?`${e} warning${e===1?"":"s"}`:"clean"});statusKind=C(()=>this.errorCount()>0?"error":this.warningCount()>0?"warn":"ok");monaco=null;editor=null;model=null;diagnosticsTimer=null;async ngAfterViewInit(){this.currentValue.set(this.value);try{let t=await re();this.monaco=t,le(t),this.model=t.editor.createModel(this.value,"markdown"),this.editor=t.editor.create(this.hostRef.nativeElement,{model:this.model,theme:this.preferDark()?"vs-dark":"vs",automaticLayout:!0,wordWrap:"on",minimap:{enabled:!1},scrollBeyondLastLine:!1,renderWhitespace:"none",fontSize:13,lineNumbers:"on",folding:!1,tabSize:2,insertSpaces:!0,contextmenu:!1}),this.editor.onDidChangeModelContent(()=>this.handleEdit()),this.runDiagnosticsNow(),this.loading.set(!1)}catch(t){console.error("[spec-editor] failed to load Monaco",t),this.loading.set(!1)}this.destroyRef.onDestroy(()=>this.dispose())}ngOnDestroy(){this.dispose()}onSave(){this.save.emit()}onCancel(){this.cancel.emit()}handleEdit(){if(!this.model)return;let t=this.model.getValue();this.currentValue.set(t),this.dirty.set(t!==this.value),this.valueChange.emit(t),this.diagnosticsTimer!==null&&clearTimeout(this.diagnosticsTimer),this.diagnosticsTimer=setTimeout(()=>this.runDiagnosticsNow(),500)}runDiagnosticsNow(){if(!this.monaco||!this.model)return;de(this.monaco,this.model);let t=this.monaco.editor.getModelMarkers({resource:this.model.uri,owner:"specship-spec"}),e=t.filter(l=>l.severity===this.monaco.MarkerSeverity.Error).length,n=t.filter(l=>l.severity===this.monaco.MarkerSeverity.Warning).length;this.errorCount.set(e),this.warningCount.set(n),this.validationChange.emit({errors:e,warnings:n})}preferDark(){if(typeof window>"u")return!1;try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}}dispose(){this.diagnosticsTimer!==null&&(clearTimeout(this.diagnosticsTimer),this.diagnosticsTimer=null),this.editor?.dispose(),this.editor=null,this.model?.dispose(),this.model=null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-spec-editor"]],viewQuery:function(e,n){if(e&1&&G(ve,7),e&2){let l;Q(l=U())&&(n.hostRef=l.first)}},inputs:{value:"value",path:"path"},outputs:{valueChange:"valueChange",validationChange:"validationChange",save:"save",cancel:"cancel"},decls:23,vars:16,consts:[["host",""],[1,"editor-shell","col"],[1,"toolbar","row","gap-8"],["name","memory",3,"size"],[1,"title"],[1,"path","mono",3,"title"],[1,"grow"],[1,"status-pill"],[1,"dot"],[1,"tokens","mono","tabular","muted",3,"title"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled","title"],["name","check",3,"size"],[1,"panes","row"],[1,"editor-pane"],[1,"loading"],[1,"monaco-host"],[1,"preview-pane","md-content",3,"innerHTML"]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2),p(2,"app-icon",3),r(3,"span",4),d(4,"Spec editor"),a(),m(5,xe,2,2,"span",5),p(6,"span",6),r(7,"span",7),p(8,"span",8),d(9),a(),r(10,"span",9),d(11),a(),r(12,"button",10),x("click",function(){return n.onCancel()}),d(13," Cancel "),a(),r(14,"button",11),x("click",function(){return n.onSave()}),p(15,"app-icon",12),d(16," Save "),a()(),r(17,"div",13)(18,"div",14),m(19,fe,2,0,"div",15),p(20,"div",16,0),a(),p(22,"div",17),a()()),e&2&&(o(2),c("size",14),o(3),u(n.path?5:-1),o(2),R("ok",n.statusKind()==="ok")("warn",n.statusKind()==="warn")("error",n.statusKind()==="error"),o(2),h(" ",n.statusLabel()," "),o(),c("title","~"+n.tokenCount()+" tokens (rough estimate)"),o(),h(" ~",n.tokenCount(),"t "),o(3),c("disabled",!n.dirty()||n.errorCount()>0)("title",n.errorCount()>0?"Fix errors before saving":n.dirty()?"Save changes":"No changes to save"),o(),c("size",13),o(4),u(n.loading()?19:-1),o(3),c("innerHTML",n.previewHtml(),D))},dependencies:[E],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex:1;min-height:0}.editor-shell[_ngcontent-%COMP%]{flex:1;min-height:0;border:1px solid var(--border-subtle);border-radius:10px;overflow:hidden;background:var(--bg-panel)}.toolbar[_ngcontent-%COMP%]{align-items:center;padding:8px 12px;border-bottom:1px solid var(--border-subtle);background:var(--bg-panel);flex-wrap:wrap;row-gap:6px}.toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:650;color:var(--text-primary)}.toolbar[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}.toolbar[_ngcontent-%COMP%] .tokens[_ngcontent-%COMP%]{font-size:10.5px;color:var(--text-muted)}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:3px 9px;border-radius:999px;white-space:nowrap}.status-pill[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%}.status-pill.ok[_ngcontent-%COMP%]{color:var(--success);background:var(--success-soft)}.status-pill.ok[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--success)}.status-pill.warn[_ngcontent-%COMP%]{color:var(--warn);background:var(--warn-soft)}.status-pill.warn[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--warn)}.status-pill.error[_ngcontent-%COMP%]{color:var(--error);background:var(--error-soft)}.status-pill.error[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background:var(--error)}.panes[_ngcontent-%COMP%]{flex:1;min-height:0}.editor-pane[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;position:relative;border-right:1px solid var(--border-subtle)}.loading[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:12px;background:var(--bg-canvas);z-index:1}.monaco-host[_ngcontent-%COMP%]{position:absolute;inset:0}.preview-pane[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;padding:14px 18px;overflow:auto;background:var(--bg-canvas)}.preview-pane.md-content[_ngcontent-%COMP%] .md-h1[_ngcontent-%COMP%]{font-size:15px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em;margin:0 0 10px}.preview-pane.md-content[_ngcontent-%COMP%] .md-h2[_ngcontent-%COMP%]{font-size:13px;font-weight:650;color:var(--text-primary);letter-spacing:-.005em;margin:18px 0 6px;padding-bottom:4px;border-bottom:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-h3[_ngcontent-%COMP%]{font-size:12px;font-weight:650;color:var(--text-primary);margin:14px 0 6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-h4[_ngcontent-%COMP%]{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:12px 0 4px}.preview-pane.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%]{font-size:12.5px;line-height:1.6;color:var(--text-secondary);margin:0 0 4px;overflow-wrap:anywhere}.preview-pane.md-content[_ngcontent-%COMP%] .md-p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{padding:0;margin:4px 0 6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:2px 0 2px 22px;font-size:12.5px;line-height:1.6;color:var(--text-secondary);overflow-wrap:anywhere}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%]{list-style:none}.preview-pane.md-content[_ngcontent-%COMP%] .md-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:"\\2022";position:absolute;left:6px;top:2px;color:var(--text-faint)}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%]{list-style:none;counter-reset:md-ol}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{counter-increment:md-ol}.preview-pane.md-content[_ngcontent-%COMP%] .md-ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{content:counter(md-ol) ".";position:absolute;left:0;top:2px;color:var(--text-faint);font-family:var(--font-mono);font-size:11.5px;min-width:18px;text-align:right}.preview-pane.md-content[_ngcontent-%COMP%] .md-spacer[_ngcontent-%COMP%]{height:6px}.preview-pane.md-content[_ngcontent-%COMP%] .md-import[_ngcontent-%COMP%]{display:inline-block;font-size:11.5px;color:var(--node-route);background:var(--node-route-soft);padding:2px 8px;border-radius:5px;margin:4px 0}.preview-pane.md-content[_ngcontent-%COMP%] .md-inline-code[_ngcontent-%COMP%]{font-size:11.5px;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle);color:var(--node-spec)}.preview-pane.md-content[_ngcontent-%COMP%] .md-blockquote[_ngcontent-%COMP%]{margin:6px 0;padding:8px 12px;border-left:3px solid var(--accent);background:var(--accent-soft);color:var(--text-secondary);font-size:12.5px;line-height:1.55;border-radius:0 6px 6px 0}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%]{position:relative;margin:8px 0 10px;padding:12px 14px;background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:8px;overflow-x:auto}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;font-size:11.5px;line-height:1.55;color:var(--text-primary);white-space:pre}.preview-pane.md-content[_ngcontent-%COMP%] .md-pre-lang[_ngcontent-%COMP%]{position:absolute;top:6px;right:10px;font-size:10px;font-weight:600;color:var(--text-muted);text-transform:lowercase;background:var(--bg-canvas);padding:1px 6px;border-radius:4px;border:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table-scroll[_ngcontent-%COMP%]{overflow-x:auto;margin:10px 0;border:1px solid var(--border-subtle);border-radius:8px}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:11.5px}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border-subtle)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:var(--bg-panel);font-weight:650;color:var(--text-primary);font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border-strong);white-space:nowrap}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--text-secondary)}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:0}.preview-pane.md-content[_ngcontent-%COMP%] .md-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.preview-pane.md-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-top:0}'],changeDetection:0})};function be(i,t){i&1&&(r(0,"div",14),d(1),a()),i&2&&(o(),g(t))}function Ce(i,t){if(i&1){let e=w();r(0,"div",0),x("click",function(){f(e);let l=s();return b(l.onBackdropClick())}),a(),r(1,"div",1)(2,"header",2)(3,"div",3)(4,"div",4),d(5,"Draft a new spec with Claude"),a(),r(6,"div",5),d(7,"Describe the feature in one sentence. Claude takes it from there."),a()(),r(8,"button",6),x("click",function(){f(e);let l=s();return b(l.onCloseClick())}),p(9,"app-icon",7),a()(),r(10,"div",8)(11,"label",9),d(12,"Feature description"),a(),r(13,"textarea",10),x("input",function(l){f(e);let v=s();return b(v.onDescriptionInput(l))}),a(),r(14,"div",11),d(15,"This will run in Claude Code:"),a(),r(16,"pre",12),d(17),a()(),r(18,"footer",13),m(19,be,2,1,"div",14),p(20,"span",15),r(21,"button",16),x("click",function(){f(e);let l=s();return b(l.onCopyToClipboard())}),p(22,"app-icon",17),d(23," Copy prompt "),a(),r(24,"button",18),x("click",function(){f(e);let l=s();return b(l.onOpenInClaude())}),p(25,"app-icon",19),d(26," Open in Claude Code "),a()()()}if(i&2){let e,n=s();o(9),c("size",16),o(4),c("value",n.description()),o(4),g(n.slashCommand()),o(2),u((e=n.toast())?19:-1,e),o(2),c("disabled",!n.canSubmit()),o(),c("size",13),o(2),c("disabled",!n.canSubmit()),o(),c("size",13)}}var A=class i{open=!1;close=new S;description=_("");toast=_(null);slashCommand=C(()=>{let t=this.description().trim();return t?`/ss-spec-author "${t.replace(/"/g,'\\"')}"`:"/ss-spec-author"});canSubmit=C(()=>this.description().trim().length>0);onDescriptionInput(t){let e=t.target;this.description.set(e.value)}onBackdropClick(){this.dismiss()}onCloseClick(){this.dismiss()}async onOpenInClaude(){if(!this.canSubmit())return;let t=this.slashCommand();await this.writeToClipboard(t);try{window.location.href=`claude://prompt?text=${encodeURIComponent(t)}`,this.flashToast("Opening Claude Code\u2026 (also copied to clipboard)")}catch{this.flashToast("Claude Code handler unavailable \u2014 prompt copied to clipboard.")}}async onCopyToClipboard(){if(!this.canSubmit())return;let t=this.slashCommand(),e=await this.writeToClipboard(t);this.flashToast(e?"Copied! Switch to Claude Code and paste.":"Could not access clipboard \u2014 copy the prompt manually.")}async writeToClipboard(t){if(!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}flashToast(t){this.toast.set(t),setTimeout(()=>this.toast.set(null),2500)}dismiss(){this.description.set(""),this.toast.set(null),this.close.emit()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-draft-with-claude-modal"]],inputs:{open:"open"},outputs:{close:"close"},decls:1,vars:1,consts:[["role","presentation",1,"backdrop",3,"click"],["role","dialog","aria-labelledby","draft-modal-title","aria-modal","true",1,"modal"],[1,"head"],[1,"title-block"],["id","draft-modal-title",1,"title"],[1,"sub"],["type","button","aria-label","Close",1,"close",3,"click"],["name","x",3,"size"],[1,"body"],["for","draft-description",1,"field-label"],["id","draft-description","rows","3","placeholder","e.g. Failed payment retries should back off with T+1d, T+3d, T+7d then downgrade the account.","autofocus","",1,"field",3,"input","value"],[1,"preview-label"],[1,"preview","mono"],[1,"foot"],[1,"toast"],[1,"grow"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click","disabled"],["name","copy",3,"size"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],["name","external",3,"size"]],template:function(e,n){e&1&&m(0,Ce,27,8),e&2&&u(n.open?0:-1)},dependencies:[E],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:100;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.modal[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 64px);background:var(--bg-panel);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:0 24px 48px #0006;z-index:101;display:flex;flex-direction:column;overflow:hidden}.head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border-subtle)}.head[_ngcontent-%COMP%] .title-block[_ngcontent-%COMP%]{flex:1;min-width:0}.head[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14.5px;font-weight:650;color:var(--text-primary);letter-spacing:-.01em}.head[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{font-size:12px;color:var(--text-secondary);margin-top:2px;line-height:1.45}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{appearance:none;background:transparent;border:0;width:28px;height:28px;border-radius:6px;color:var(--text-muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s,color .12s}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-primary)}.head[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.body[_ngcontent-%COMP%]{padding:16px 18px;display:flex;flex-direction:column;gap:10px;overflow-y:auto}.field-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.field[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:10px 12px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;color:var(--text-primary);font-family:var(--font-ui);font-size:13px;line-height:1.5;resize:vertical}.field[_ngcontent-%COMP%]:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}.preview-label[_ngcontent-%COMP%]{font-size:11px;color:var(--text-muted);margin-top:4px}.preview[_ngcontent-%COMP%]{margin:0;padding:10px 12px;background:var(--bg-canvas);border:1px solid var(--border-subtle);border-radius:8px;font-size:11.5px;line-height:1.5;color:var(--node-spec);font-family:var(--font-mono);white-space:pre-wrap;word-break:break-all}.foot[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 18px;border-top:1px solid var(--border-subtle);background:var(--bg-canvas);flex-wrap:wrap}.foot[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1}.toast[_ngcontent-%COMP%]{font-size:11.5px;color:var(--success);background:var(--success-soft);padding:4px 10px;border-radius:999px;white-space:nowrap}"],changeDetection:0})};var he=(i,t)=>t.path,me=(i,t)=>t.id;function ye(i,t){i&1&&p(0,"app-pick-project-empty",0)}function we(i,t){i&1&&p(0,"app-empty",9)}function Me(i,t){if(i&1&&(r(0,"span",18),d(1),a()),i&2){let e=s().$implicit,n=s(2);o(),h(" ",n.driftCountForGroup(e)," ")}}function Se(i,t){if(i&1){let e=w();r(0,"div",21),x("click",function(){let l=f(e).$implicit,v=s(4);return b(v.select(l.id))}),p(1,"span",22),r(2,"div",23)(3,"div",24),d(4),a(),r(5,"div",25),d(6),a()()()}if(i&2){let e=t.$implicit,n=s(4);R("selected",n.sel()===e.id),o(),N("background",n.stateColorFor(e.kind)),o(2),N("color",n.sel()===e.id?"var(--accent)":"var(--text-primary)"),o(),g(e.id),o(2),g(e.title)}}function Pe(i,t){if(i&1&&(r(0,"div",19),I(1,Se,7,8,"div",20,me),a()),i&2){let e=s().$implicit;o(),$(e.specs)}}function Oe(i,t){if(i&1){let e=w();r(0,"div",14),x("click",function(){let l=f(e).$implicit,v=s(2);return b(v.toggleGroup(l.path))}),p(1,"app-icon",15)(2,"app-icon",16),r(3,"span",17),d(4),a(),m(5,Me,2,1,"span",18),a(),m(6,Pe,3,0,"div",19)}if(i&2){let e=t.$implicit,n=s(2);o(),c("name",n.isGroupOpen(e.path)?"chevronDown":"chevronRight")("size",12),o(),c("size",13),o(2),g(e.title),o(),u(n.driftCountForGroup(e)>0?5:-1),o(),u(n.isGroupOpen(e.path)?6:-1)}}function ke(i,t){if(i&1&&(r(0,"div",26),d(1),a()),i&2){let e=s();o(),h("Loading source for ",e.id,"\u2026")}}function Ee(i,t){if(i&1){let e=w();r(0,"app-spec-editor",30),x("valueChange",function(l){f(e);let v=s(4);return b(v.onEditorValueChange(l))})("save",function(){f(e);let l=s(4);return b(l.onEditorSave())})("cancel",function(){f(e);let l=s(4);return b(l.onEditorCancel())}),a()}if(i&2){let e=s(),n=s(3);c("value",n.editingSource())("path",e.sourcePath)}}function Te(i,t){i&1&&(r(0,"div",28),d(1),a()),i&2&&(o(),g(t))}function De(i,t){i&1&&(r(0,"div",29),d(1,"Saving\u2026"),a())}function ze(i,t){if(i&1&&(m(0,ke,2,1,"div",26)(1,Ee,1,2,"app-spec-editor",27),m(2,Te,2,1,"div",28),m(3,De,2,0,"div",29)),i&2){let e,n=s(3);u(n.editingSource()===null?0:1),o(2),u((e=n.saveError())?2:-1,e),o(),u(n.saving()?3:-1)}}function Ie(i,t){if(i&1&&m(0,ze,4,3),i&2){let e,n=s(2);u((e=n.selectedSpec())?0:-1,e)}}function $e(i,t){if(i&1&&(r(0,"app-pill"),d(1),a()),i&2){let e=s();o(),g(e.priority)}}function Ne(i,t){if(i&1&&(r(0,"div",37)(1,"div",38),d(2,"Owner"),a(),r(3,"div",39),d(4),a()()),i&2){let e=s();o(4),g(e.owner)}}function Re(i,t){if(i&1&&(r(0,"details",42)(1,"summary",55),d(2,"Brainstorm"),a(),p(3,"div",56),a()),i&2){let e=s(3);o(3),c("innerHTML",e.briefHtml(),D)}}function Ve(i,t){i&1&&p(0,"div",43)}function Le(i,t){if(i&1&&(r(0,"app-pill",59),d(1),a()),i&2){let e=s().$implicit;o(),h("",e.driftAxis," drift")}}function je(i,t){if(i&1&&(r(0,"div",58),p(1,"app-state-pill",34),m(2,Le,2,1,"app-pill",59),r(3,"span",60),d(4),a(),r(5,"app-pill"),d(6),a(),r(7,"button",61),p(8,"app-icon",52),d(9," Reveal "),a()()),i&2){let e=t.$implicit,n=t.$index;N("border-top",n>0?"1px solid var(--border-subtle)":"none"),o(),c("state",e.state),o(),u(e.driftAxis?2:-1),o(2),g(e.targetQualifiedName),o(2),g(e.provenance),o(2),c("size",12)}}function Ae(i,t){if(i&1&&(r(0,"div",44),I(1,je,10,7,"div",57,me),a()),i&2){let e=s(3);o(),$(e.selectedLinks())}}function We(i,t){i&1&&(r(0,"div",45),p(1,"app-icon",62),r(2,"div",63),d(3," Orphaned \u2014 no code implements this requirement yet "),a()()),i&2&&(o(),c("size",16))}function Fe(i,t){i&1&&(r(0,"div",54),d(1),a()),i&2&&(o(),g(t))}function He(i,t){if(i&1){let e=w();r(0,"div",11)(1,"div",31)(2,"span",32),d(3),a(),p(4,"app-copy-btn",33)(5,"div",6)(6,"app-state-pill",34),m(7,$e,2,1,"app-pill"),a(),r(8,"h1",35),d(9),a(),r(10,"div",36)(11,"div",37)(12,"div",38),d(13,"Kind"),a(),r(14,"div",39),d(15),a()(),m(16,Ne,5,1,"div",37),r(17,"div",37)(18,"div",38),d(19,"Doc"),a(),r(20,"div",39),d(21),a()(),r(22,"div",37)(23,"div",38),d(24,"Siblings"),a(),r(25,"div",39),d(26),a()(),r(27,"div",37)(28,"div",38),d(29,"Links"),a(),r(30,"div",39),d(31),a()()(),r(32,"div",40),d(33,"Requirement"),a(),p(34,"div",41),m(35,Re,4,1,"details",42),r(36,"div",40),d(37,"Linked code"),a(),m(38,Ve,1,0,"div",43)(39,Ae,3,0,"div",44)(40,We,4,1,"div",45),r(41,"div",46)(42,"button",47),p(43,"app-icon",48),d(44," Implement "),a(),r(45,"button",49),p(46,"app-icon",50),d(47," Verify "),a(),r(48,"button",51),x("click",function(){f(e);let l=s(2);return b(l.onEditClick())}),p(49,"app-icon",52),d(50," Edit spec "),a(),r(51,"button",51),x("click",function(){let l=f(e),v=s(2);return b(v.goToGraph(l.id))}),p(52,"app-icon",53),d(53," Show in graph "),a()(),m(54,Fe,2,1,"div",54),a()}if(i&2){let e,n=t,l=s(2);o(3),g(n.id),o(),c("text",n.id),o(2),c("state",n.kind),o(),u(n.priority?7:-1),o(2),g(n.title),o(6),g(n.kind),o(),u(n.owner?16:-1),o(5),g(n.sourcePath.replace("specs/","")),o(5),h("",l.selectedSiblings().length," reqs"),o(5),g(l.selectedLinks().length),o(3),c("innerHTML",l.mdHtml(n.body),D),o(),u(l.briefResource.state().data?35:-1),o(3),u(l.detailResource.state().loading?38:l.selectedLinks().length>0?39:40),o(5),c("size",13),o(3),c("size",13),o(3),c("size",13),o(3),c("size",13),o(2),u((e=l.saveError())?54:-1,e)}}function qe(i,t){i&1&&(r(0,"app-empty",12)(1,"code",64),d(2,"specship init -i"),a()())}function Ge(i,t){if(i&1){let e=w();r(0,"div",1)(1,"div",2)(2,"div",3),p(3,"app-icon",4),r(4,"span",5),d(5,"Specs"),a(),p(6,"span",6),r(7,"span",7),d(8),a()(),r(9,"div",8),m(10,we,1,0,"app-empty",9),I(11,Oe,7,6,null,null,he),a()(),r(13,"div",10),m(14,Ie,1,1)(15,He,55,18,"div",11)(16,qe,3,0,"app-empty",12),a()(),r(17,"app-draft-with-claude-modal",13),x("close",function(){f(e);let l=s();return b(l.onDraftModalClose())}),a()}if(i&2){let e,n=s();o(3),c("size",15),o(5),h(" ",n.resource.state().loading?"\u2026":n.totalCount()+" reqs"," "),o(2),u(n.groups().length===0&&!n.resource.state().loading?10:-1),o(),$(n.groups()),o(3),u(n.editing()?14:(e=n.selectedSpec())?15:16,e),o(3),c("open",n.draftModalOpen())}}function Qe(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\*\*(.+?)\*\*/g,"<strong style='color:var(--text-primary)'>$1</strong>").replace(/`(.+?)`/g,"<code class='mono' style='font-size:12px;background:var(--bg-canvas);padding:1px 5px;border-radius:4px;border:1px solid var(--border-subtle)'>$1</code>")}var pe=class i{api=y(X);projects=y(J);router=y(K);conn=y(Y);resource=V(this.api,()=>`/api/specs${this.projects.projectQuery()}`);detailResource=V(this.api,()=>{let t=this.sel();return t?`/api/spec/${encodeURIComponent(t)}${this.projects.projectQuery()}`:null});briefResource=V(this.api,()=>{let t=this.sel();return t?`/api/spec/${encodeURIComponent(t)}/brief${this.projects.projectQuery()}`:null});briefHtml=C(()=>this.mdHtml(this.briefResource.state().data?.markdown??""));sel=_(null);expandedGroups=_(new Set);editing=_(!1);editingSource=_(null);editingDirty=_(!1);saving=_(!1);saveError=_(null);draftModalOpen=_(!1);STATE=F;groups=C(()=>{let t=this.resource.state().data?.specs??[],e=new Map;for(let n of t){let l=n.sourcePath||"(unknown)";e.has(l)||e.set(l,{path:l,title:l.replace(/^specs\//,""),specs:[]}),e.get(l).specs.push(n)}return[...e.values()]});totalCount=C(()=>this.groups().reduce((t,e)=>t+e.specs.length,0));selectedSpec=C(()=>{let t=this.sel();if(!t)return null;for(let e of this.groups())for(let n of e.specs)if(n.id===t)return n;return null});selectedLinks=C(()=>this.detailResource.state().data?.links??[]);selectedSiblings=C(()=>{let t=this.selectedSpec();if(!t)return[];let e=this.groups().find(n=>n.path===t.sourcePath);return e?e.specs.filter(n=>n.id!==t.id):[]});isGroupOpen(t){return!this.expandedGroups().has("closed:"+t)}toggleGroup(t){this.expandedGroups.update(e=>{let n="closed:"+t,l=new Set(e);return l.has(n)?l.delete(n):l.add(n),l})}driftCountForGroup(t){let e=this.selectedSpec();return!e||e.sourcePath!==t.path?0:this.selectedLinks().filter(n=>["drifted","broken","orphaned"].includes(n.state)).length}stateColorFor(t){return F[t]?.color??"var(--node-spec)"}select(t){this.editing()&&(this.editing.set(!1),this.editingSource.set(null),this.editingDirty.set(!1)),this.sel.set(t)}mdHtml(t){return Qe(t)}goToGraph(t){this.router.navigate(["/graph"],{queryParams:{focus:"spec:"+t}})}async onEditClick(){let t=this.selectedSpec();if(t){this.saveError.set(null),this.editing.set(!0),this.editingSource.set(null);try{let e=this.projects.projectQuery(),n=await this.api.get(`/api/spec/${encodeURIComponent(t.id)}${e}`);this.editingSource.set(n.source??t.body)}catch(e){this.saveError.set(`Couldn't load source: ${e instanceof Error?e.message:String(e)}`),this.editing.set(!1)}}}onEditorValueChange(t){this.editingSource.set(t),this.editingDirty.set(!0)}async onEditorSave(){let t=this.selectedSpec(),e=this.editingSource();if(!(!t||e===null)){if(!this.conn.online()){this.saveError.set("Offline \u2014 reconnect to save your changes");return}this.saving.set(!0),this.saveError.set(null);try{let n=this.projects.projectQuery();await this.api.put(`/api/spec/${encodeURIComponent(t.id)}${n}`,{content:e}),this.editing.set(!1),this.editingDirty.set(!1),this.editingSource.set(null),this.resource.refetch()}catch(n){this.saveError.set(`Save failed: ${n instanceof Error?n.message:String(n)}`)}finally{this.saving.set(!1)}}}onEditorCancel(){this.editingDirty()&&!window.confirm("Discard unsaved changes?")||(this.editing.set(!1),this.editingSource.set(null),this.editingDirty.set(!1),this.saveError.set(null))}onDraftWithClaudeClick(){this.draftModalOpen.set(!0)}onDraftModalClose(){this.draftModalOpen.set(!1)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-specs"]],decls:2,vars:1,consts:[["surface","Specs"],[1,"specs-shell"],[1,"tree-col"],[1,"tree-header","row","gap-8"],["name","book",2,"color","var(--accent)",3,"size"],[2,"font-weight","600","font-size","13px"],[1,"grow"],[1,"muted","tabular",2,"font-size","11px"],[1,"scroll-y","tree-scroll"],["icon","book","title","No specs found","body","Run specship init -i against a project with a specs/ directory."],[1,"detail-col","col"],[1,"scroll-y","detail-scroll"],["icon","book","title","Pick a spec from the tree","body","Or run specship init -i to index your specs/ folder if you haven't yet."],[3,"close","open"],[1,"doc-row","row","gap-6",3,"click"],[2,"color","var(--text-muted)",3,"name","size"],["name","book",2,"color","var(--node-spec)",3,"size"],[1,"mono","grow","doc-name"],[1,"pill",2,"font-size","9.5px","color","var(--warn)","background","var(--warn-soft)"],[1,"group-body"],[1,"req-row","row","gap-6",3,"selected"],[1,"req-row","row","gap-6",3,"click"],[1,"pill-dot",2,"flex-shrink","0"],[1,"grow",2,"min-width","0"],[1,"mono","req-id"],[1,"muted","req-title"],[1,"loading-detail"],[3,"value","path"],[1,"save-error"],[1,"save-status"],[3,"valueChange","save","cancel","value","path"],[1,"row","gap-8",2,"margin-bottom","4px"],[1,"mono",2,"font-size","12px","color","var(--node-spec)"],[3,"text"],[3,"state"],[1,"detail-title"],[1,"meta-row","row"],[1,"meta-item"],[1,"muted",2,"font-size","10.5px"],[1,"mono",2,"font-size","12.5px","margin-top","1px"],[1,"eyebrow",2,"margin-bottom","8px"],[1,"detail-body",3,"innerHTML"],[1,"brief-panel"],[1,"skel",2,"height","42px","border-radius","8px","margin-bottom","22px"],[1,"card",2,"overflow","hidden","margin-bottom","22px"],[1,"card","card-pad","orphan-card"],[1,"row","gap-8",2,"flex-wrap","wrap"],["type","button",1,"btn","btn-primary","btn-sm"],["name","play",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm"],["name","check",3,"size"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],["name","reveal",3,"size"],["name","graph",3,"size"],[1,"save-error",2,"margin-top","16px"],[1,"eyebrow","brief-summary"],[1,"detail-body","brief-body",3,"innerHTML"],[1,"row","gap-10","link-row",3,"border-top"],[1,"row","gap-10","link-row"],["color","var(--warn)","bg","var(--warn-soft)"],[1,"mono","grow","link-target"],["type","button",1,"btn","btn-ghost","btn-xs"],["name","drift",3,"size"],[2,"margin-top","6px","font-size","12.5px"],["action","",1,"mono",2,"font-size","11.5px","color","var(--accent)","background","var(--bg-canvas)","padding","5px 10px","border-radius","6px","border","1px solid var(--border-subtle)"]],template:function(e,n){e&1&&m(0,ye,1,0,"app-pick-project-empty",0)(1,Ge,18,5),e&2&&u(n.resource.state().noProject?0:1)},dependencies:[Z,E,j,A,ie,ee,oe,te],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:contents}.specs-shell[_ngcontent-%COMP%]{flex:1;display:flex;min-height:0}.tree-col[_ngcontent-%COMP%]{width:280px;flex-shrink:0;border-right:1px solid var(--border-subtle);background:var(--bg-panel);display:flex;flex-direction:column;min-height:0}.tree-header[_ngcontent-%COMP%]{padding:11px 12px;border-bottom:1px solid var(--border-subtle);align-items:center}.tree-scroll[_ngcontent-%COMP%]{flex:1;padding:6px}.doc-row[_ngcontent-%COMP%]{padding:6px 8px;border-radius:6px;cursor:pointer;color:var(--text-secondary);align-items:center}.doc-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.doc-name[_ngcontent-%COMP%]{font-size:12px;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-body[_ngcontent-%COMP%]{margin-left:14px;border-left:1px solid var(--border-subtle);padding-left:6px}.req-row[_ngcontent-%COMP%]{padding:5px 8px;border-radius:6px;cursor:pointer;align-items:flex-start;background:transparent}.req-row[_ngcontent-%COMP%]:not(.selected):hover{background:var(--bg-hover)}.req-row.selected[_ngcontent-%COMP%]{background:var(--accent-soft)}.req-id[_ngcontent-%COMP%]{font-size:11px}.req-title[_ngcontent-%COMP%]{font-size:10.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-col[_ngcontent-%COMP%]{flex:1;min-width:0}.detail-scroll[_ngcontent-%COMP%]{flex:1;padding:22px}.detail-title[_ngcontent-%COMP%]{font-size:22px;font-weight:650;letter-spacing:-.01em;margin:2px 0 14px;text-wrap:pretty}.meta-row[_ngcontent-%COMP%]{gap:18px;padding:10px 0;border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);margin-bottom:18px;flex-wrap:wrap}.detail-body[_ngcontent-%COMP%]{font-size:13.5px;line-height:1.65;color:var(--text-secondary);margin-bottom:22px;text-wrap:pretty}.brief-panel[_ngcontent-%COMP%]{border:1px solid var(--border-subtle);border-radius:8px;padding:0 12px;margin-bottom:22px;background:var(--bg-panel)}.brief-summary[_ngcontent-%COMP%]{padding:10px 0;cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px;-webkit-user-select:none;user-select:none;margin-bottom:0}.brief-summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.brief-summary[_ngcontent-%COMP%]:before{content:"\\25b6";font-size:8px;color:var(--text-muted);transition:transform .15s}details[open][_ngcontent-%COMP%] > .brief-summary[_ngcontent-%COMP%]:before{transform:rotate(90deg)}.brief-body[_ngcontent-%COMP%]{margin-bottom:12px}.link-row[_ngcontent-%COMP%]{padding:10px 12px}.link-target[_ngcontent-%COMP%]{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.orphan-card[_ngcontent-%COMP%]{text-align:center;color:var(--error);margin-bottom:22px;border-color:#f2555a4d}.loading-detail[_ngcontent-%COMP%]{padding:40px 18px;color:var(--text-muted);font-size:13px;text-align:center}.save-error[_ngcontent-%COMP%]{padding:10px 14px;border:1px solid rgba(255,90,90,.35);background:var(--error-soft);color:var(--error);border-radius:8px;font-size:12.5px;line-height:1.5}.save-status[_ngcontent-%COMP%]{margin-top:8px;color:var(--text-muted);font-size:12px}'],changeDetection:0})};export{pe as Specs};
@@ -1 +0,0 @@
1
- import{E as f,I as o,R as c,W as s,X as a}from"./chunk-PDN6QYGJ.js";var n="specship.theme",h=class i{destroyRef=o(c);pref=s(this.loadPref());effective=s("dark");constructor(){this.applyEffective();let e=window.matchMedia("(prefers-color-scheme: light)"),t=()=>{this.pref()==="system"&&this.applyEffective()};e.addEventListener("change",t),this.destroyRef.onDestroy(()=>e.removeEventListener("change",t)),a(()=>{let r=this.pref();try{localStorage.setItem(n,r)}catch{}this.applyEffective()})}setPref(e){this.pref.set(e)}toggle(){this.setPref(this.effective()==="dark"?"light":"dark")}loadPref(){try{let e=localStorage.getItem(n);if(e==="dark"||e==="light"||e==="system")return e}catch{}return"dark"}applyEffective(){let e=window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark",t=this.pref(),r=t==="system"?e:t;document.documentElement.setAttribute("data-theme",r),this.effective.set(r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})};export{h as a};