wicked-crew 0.16.6 → 0.16.8

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 (51) hide show
  1. package/dist/api/routes.d.ts +3 -0
  2. package/dist/api/routes.d.ts.map +1 -1
  3. package/dist/api/routes.js +94 -3
  4. package/dist/api/routes.js.map +1 -1
  5. package/dist/api/run-liveness.d.ts +42 -1
  6. package/dist/api/run-liveness.d.ts.map +1 -1
  7. package/dist/api/run-liveness.js +181 -2
  8. package/dist/api/run-liveness.js.map +1 -1
  9. package/dist/api/seat-agents.d.ts.map +1 -1
  10. package/dist/api/seat-agents.js +7 -6
  11. package/dist/api/seat-agents.js.map +1 -1
  12. package/dist/api/server.d.ts +2 -0
  13. package/dist/api/server.d.ts.map +1 -1
  14. package/dist/api/server.js +4 -1
  15. package/dist/api/server.js.map +1 -1
  16. package/dist/api/stall-watchdog.d.ts +13 -0
  17. package/dist/api/stall-watchdog.d.ts.map +1 -1
  18. package/dist/api/stall-watchdog.js +76 -17
  19. package/dist/api/stall-watchdog.js.map +1 -1
  20. package/dist/core/adapter.d.ts.map +1 -1
  21. package/dist/core/adapter.js +8 -0
  22. package/dist/core/adapter.js.map +1 -1
  23. package/dist/core/deliver-text.d.ts +22 -0
  24. package/dist/core/deliver-text.d.ts.map +1 -1
  25. package/dist/core/deliver-text.js +79 -0
  26. package/dist/core/deliver-text.js.map +1 -1
  27. package/dist/core/engine-roster.d.ts.map +1 -1
  28. package/dist/core/engine-roster.js +9 -2
  29. package/dist/core/engine-roster.js.map +1 -1
  30. package/dist/core/types.d.ts +7 -0
  31. package/dist/core/types.d.ts.map +1 -1
  32. package/dist/core/types.js +9 -0
  33. package/dist/core/types.js.map +1 -1
  34. package/dist/studio/assets/index-B-f_VEL2.css +32 -0
  35. package/dist/studio/assets/index-DhkxIK-0.js +845 -0
  36. package/dist/studio/editors/wicked-deck/editor.json +1 -1
  37. package/dist/studio/editors/wicked-deck/index.html +1 -1
  38. package/dist/studio/editors/wicked-doc/editor.json +1 -1
  39. package/dist/studio/editors/wicked-doc/index.html +1 -1
  40. package/dist/studio/editors/wicked-insights/editor.json +36 -0
  41. package/dist/studio/editors/wicked-insights/index.html +71 -0
  42. package/dist/studio/editors/wicked-page/editor.json +1 -1
  43. package/dist/studio/editors/wicked-page/index.html +1 -1
  44. package/dist/studio/editors/wicked-video/editor.json +1 -1
  45. package/dist/studio/editors/wicked-video/index.html +1 -1
  46. package/dist/studio/index.html +2 -2
  47. package/dist/studio/testid-inventory.json +2152 -282
  48. package/endpoint-manifest.json +1 -1
  49. package/package.json +3 -3
  50. package/dist/studio/assets/index-DB8oZVQV.css +0 -32
  51. package/dist/studio/assets/index-t_DEhtrK.js +0 -859
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "wicked-deck",
3
3
  "title": "Slides",
4
- "version": "0.12.3",
4
+ "version": "0.13.0",
5
5
  "protocol": [
6
6
  1,
7
7
  2
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="wicked-editor" content="wicked-deck">
6
- <meta name="wicked-editor-version" content="0.12.3">
6
+ <meta name="wicked-editor-version" content="0.13.0">
7
7
  <title>Slides</title>
8
8
  <style>
9
9
  /* The editor's own chrome takes the host's tokens (`host.hello.theme` / `host.theme`), with plain
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "wicked-doc",
3
3
  "title": "Document",
4
- "version": "0.12.3",
4
+ "version": "0.13.0",
5
5
  "protocol": [
6
6
  1,
7
7
  2
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="wicked-editor" content="wicked-doc">
6
- <meta name="wicked-editor-version" content="0.12.3">
6
+ <meta name="wicked-editor-version" content="0.13.0">
7
7
  <title>Document</title>
8
8
  <style>
9
9
  /* The plugin's own chrome takes the host's tokens (`host.hello.theme` / `host.theme`), with plain
@@ -0,0 +1,36 @@
1
+ {
2
+ "id": "wicked-insights",
3
+ "title": "Run insights",
4
+ "version": "0.13.0",
5
+ "protocol": [
6
+ 1,
7
+ 2
8
+ ],
9
+ "kinds": [
10
+ "run-insights"
11
+ ],
12
+ "entry": "index.html",
13
+ "sizes": [
14
+ "inline",
15
+ "pane",
16
+ "full"
17
+ ],
18
+ "permissions": [
19
+ {
20
+ "id": "artifact.read",
21
+ "why": "to read the run insights: every review of recent work, its recommendations and what happened to them, and the run metrics behind them"
22
+ },
23
+ {
24
+ "id": "selection.chip",
25
+ "why": "to point at the recommendation you pick, so you can accept or dismiss it"
26
+ }
27
+ ],
28
+ "surfaces": {
29
+ "card": {
30
+ "interactive": true,
31
+ "aspect": "auto",
32
+ "actions": []
33
+ },
34
+ "full": {}
35
+ }
36
+ }
@@ -0,0 +1,71 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="wicked-editor" content="wicked-insights">
6
+ <meta name="wicked-editor-version" content="0.13.0">
7
+ <title>Run insights</title>
8
+ <style>
9
+ /* The host's tokens arrive in host.hello / host.theme; these are plain fallbacks. */
10
+ :root {
11
+ --surface-base: #ffffff; --surface-card: #f6f7f9; --ink-high: #0d1117; --ink-body: #2b333d; --ink-muted: #5b6673;
12
+ --border: #d5dae1; --accent: #224a5e; --status-pass: #1a7f4b; --status-fail: #b4232c; --status-warn: #9a6700;
13
+ --font-sans: system-ui, sans-serif;
14
+ }
15
+ html, body { margin: 0; }
16
+ body { font: 14px/1.45 var(--font-sans); color: var(--ink-body); background: var(--surface-base); }
17
+ [hidden] { display: none !important; }
18
+ main { max-width: 980px; margin: 0 auto; padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 28px; }
19
+ h1 { margin: 0; font-size: 20px; color: var(--ink-high); }
20
+ h2 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
21
+ .lede { margin: 6px 0 0; color: var(--ink-body); }
22
+ .muted { color: var(--ink-muted); }
23
+ .note { margin: 6px 0 0; font-size: 13px; color: var(--ink-muted); }
24
+ .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin-top: 18px; }
25
+ @media (max-width: 720px) { .cols { grid-template-columns: minmax(0, 1fr); } main { padding: 14px 12px 32px; } }
26
+ ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
27
+ .good { padding: 10px 12px; border-radius: 10px; background: var(--surface-card); }
28
+ .good::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--status-pass); margin-right: 8px; vertical-align: 1px; }
29
+ .rec { padding: 14px 16px; border-radius: 12px; background: var(--surface-card); border: 1px solid transparent; display: flex; flex-direction: column; gap: 10px; }
30
+ .rec:hover { border-color: var(--border); }
31
+ .rec[aria-current="true"] { border-color: var(--accent); }
32
+ .pick { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
33
+ .pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
34
+ .rec .t { font-weight: 600; font-size: 15px; color: var(--ink-high); }
35
+ .rec .say { color: var(--ink-body); }
36
+ .rec .effect { color: var(--ink-muted); }
37
+ .rec .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; color: var(--ink-muted); }
38
+ .chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--ink-muted) 16%, transparent); color: var(--ink-body); }
39
+ .chip[data-confidence="high"] { background: color-mix(in srgb, var(--status-pass) 20%, transparent); }
40
+ .chip[data-confidence="low"] { background: color-mix(in srgb, var(--ink-muted) 10%, transparent); color: var(--ink-muted); }
41
+ .verb { color: var(--ink-body); }
42
+ .pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; }
43
+ .pill[data-state="accepted"] { color: var(--status-pass); border-color: currentColor; }
44
+ .pill[data-state="dismissed"] { color: var(--ink-muted); }
45
+ details.why { font-size: 13px; color: var(--ink-muted); }
46
+ details.why summary { cursor: pointer; color: var(--ink-body); width: max-content; }
47
+ details.why summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
48
+ details.why ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
49
+ details.watching > ul { padding-left: 0; }
50
+ .footnote { margin-top: 8px; }
51
+ .trends { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
52
+ .chart { padding: 12px; border-radius: 12px; background: var(--surface-card); }
53
+ .chart .t { font-weight: 600; color: var(--ink-high); font-size: 13px; }
54
+ .chart .v { font-size: 12px; color: var(--ink-muted); }
55
+ .chart svg { display: block; width: 100%; height: 96px; margin-top: 6px; }
56
+ .band { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
57
+ .line { fill: none; stroke: var(--accent); stroke-width: 2; }
58
+ .pt { fill: var(--accent); }
59
+ .pt.small { fill: var(--ink-muted); opacity: .55; }
60
+ .axis { font-size: 10px; fill: var(--ink-muted); }
61
+ .history button { font: inherit; color: inherit; background: none; border: 0; padding: 8px 10px; border-radius: 8px; width: 100%; text-align: left; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
62
+ .history button:hover { background: var(--surface-card); }
63
+ .history button[aria-current="true"] { background: var(--surface-card); font-weight: 600; }
64
+ .empty { padding: 16px; border-radius: 12px; background: var(--surface-card); }
65
+ </style>
66
+ </head>
67
+ <body>
68
+ <script>var wickedEditor=(function($){"use strict";var te=Object.defineProperty;var ne=($,y,A)=>y in $?te($,y,{enumerable:!0,configurable:!0,writable:!0,value:A}):$[y]=A;var U=($,y,A)=>ne($,typeof y!="symbol"?y+"":y,A);const y="wicked.editor",F=s=>typeof s=="object"&&s!==null&&!Array.isArray(s),G=["card","options","full"];function J(s){return s==="inline"?"card":s==="pane"?"options":"full"}function K(s){const e=F(s)?s:{},a=e.size==="inline"||e.size==="full"?e.size:"pane",c=e.protocol===2?2:1,p=c===2&&typeof e.tab=="string"?e.tab:null,u=c===2&&G.includes(e.surface)?e.surface:J(a),g=u==="options"&&p===null?"full":u,S=c===2&&(e.mode==="simple"||e.mode==="advanced")?e.mode:null;return{protocol:c,surface:g,tab:p,mode:S,size:a}}function Q(s,e,a){return{editor:s,version:e,protocol:[1,2],surfaces:a}}function X(s,e){const a=document.querySelector('meta[name="wicked-editor-version"]')?.getAttribute("content")??"0.0.0";parent.postMessage({p:y,v:1,type:"plugin.ready",payload:Q(s,a,e)},"*")}class Y{constructor(e,a){U(this,"revs",new Map);this.port=e,this.h=a}reply(e,a){this.port.postMessage({p:y,v:1,re:e,ok:!0,payload:a})}refuse(e,a,c){this.port.postMessage({p:y,v:1,re:e,ok:!1,error:{code:a,message:c}})}bump(e){const a=(this.revs.get(e)??0)+1;return this.revs.set(e,a),a}values(e,a){this.port.postMessage({p:y,v:1,type:"options.values",payload:{tab:e,rev:this.bump(e),values:a}})}height(e){this.port.postMessage({p:y,v:1,type:"ui.height",payload:{px:Math.round(e)}})}dispatch(e){const a=F(e.payload)?e.payload:{},c=typeof e.id=="string"?e.id:null;switch(e.type){case"host.surface":{const p=a.surface;return(p==="card"||p==="options"||p==="full")&&this.h.surface?.(p,a.mode==="simple"||a.mode==="advanced"?a.mode:null),!0}case"host.mode":{if(c===null)return!0;const p=a.mode;return p!=="simple"&&p!=="advanced"?(this.refuse(c,"bad_request","mode is simple or advanced"),!0):(this.reply(c,{mode:this.h.mode?.(p)??p}),!0)}case"host.action":{if(c===null)return!0;const p=a.id;return typeof p!="string"||this.h.action===void 0?(this.reply(c,{handled:!1}),!0):(Promise.resolve(this.h.action(p)).then(u=>this.reply(c,{handled:u.handled===!0,...typeof u.status=="string"?{status:u.status.slice(0,120)}:{}}),()=>this.reply(c,{handled:!1})),!0)}case"host.tab":return typeof a.tab=="string"&&this.h.tab?.(a.tab),!0;case"host.selection":return Array.isArray(a.anchors)&&this.h.selection?.(a.anchors),!0;case"options.changed":{if(c===null)return!0;const p=a.tab,u=a.id;return typeof p!="string"||typeof u!="string"||this.h.optionsChanged===void 0?(this.refuse(c,"unsupported","no controls here"),!0):(Promise.resolve(this.h.optionsChanged(p,u,a.value)).then(g=>this.reply(c,{applied:g.applied,rev:this.bump(p),values:g.values,...g.reason!==void 0?{reason:g.reason.slice(0,120)}:{}}),g=>this.refuse(c,"unavailable",g instanceof Error?g.message.slice(0,120):"failed")),!0)}default:return!1}}}const Z={card:{interactive:!0,aspect:"auto",actions:[]},full:{}},ee={spend:"What a typical run cost, review by review",pass_rate:"Share of finished runs that passed",override_rate:"Share of runs where a person overrode a stop",wait_on_people:"How long a typical run waited on a person",unresolved_rate:"Share of runs nobody closed"},W=["spend","pass_rate","override_rate","wait_on_people","unresolved_rate"];function _(s,e){return e===null||!Number.isFinite(e)?"none":s==="ratio"?`${Math.round(e*100)}%`:s==="minutes"?e>=120?`${(e/60).toFixed(1)} h`:`${Math.round(e)} min`:s==="usd"?`$${e.toFixed(2)}`:e.toFixed(e%1===0?0:1)}const x=s=>new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric"});function t(s,e={},a){const c=document.createElement(s);for(const[p,u]of Object.entries(e))c.setAttribute(p,u);return a!==void 0&&(c.textContent=a),c}function M(s,e){const a=document.createElementNS("http://www.w3.org/2000/svg",s);for(const[c,p]of Object.entries(e))a.setAttribute(c,p);return a}function H(s,e){const g=M("svg",{viewBox:"0 0 300 96",role:"img"}),S=s.flatMap(o=>[o.value,o.lo,o.hi]).filter(o=>o!==null&&Number.isFinite(o));if(s.length===0||S.length===0)return g;const k=e==="ratio"?0:Math.min(...S),V=e==="ratio"?1:Math.max(...S),j=V-k||1,P=o=>s.length===1?344/2:44+o*246/(s.length-1),N=o=>86-(o-k)/j*64;for(const[o,b]of[[V,12],[k,94]]){const w=M("text",{class:"axis",x:"0",y:String(b)});w.textContent=_(e,o),g.append(w)}const C=s.map((o,b)=>({p:o,i:b})).filter(({p:o})=>o.lo!==null&&o.hi!==null);if(C.length>1){const o=C.map(({p:w,i:T})=>`${P(T)},${N(w.hi)}`),b=[...C].reverse().map(({p:w,i:T})=>`${P(T)},${N(w.lo)}`);g.append(M("polygon",{class:"band",points:[...o,...b].join(" ")}))}const O=s.map((o,b)=>({p:o,i:b})).filter(({p:o})=>o.value!==null);O.length>1&&g.append(M("polyline",{class:"line",points:O.map(({p:o,i:b})=>`${P(b)},${N(o.value)}`).join(" ")}));for(const{p:o,i:b}of O){const w=M("circle",{class:o.small?"pt small":"pt",cx:String(P(b)),cy:String(N(o.value)),r:"3.5","data-small":String(o.small)}),T=M("title",{});T.textContent=`${x(o.at)}: ${_(e,o.value)} from ${o.n} run${o.n===1?"":"s"}${o.small?", too few to tell":""}`,w.append(T),g.append(w)}return g}function q(){const s=t("main",{"data-testid":"insights-plugin"});document.body.prepend(s);let e=null,a=null,c=1,p=[],u=null,g=0,S=0,k=null,V=0,j=!1;const P=new Map,N=(n,l)=>e?.postMessage({p:y,v:1,type:n,payload:l}),C=(n,l)=>new Promise(h=>{if(e===null||j){h({ok:!1,error:{code:"unavailable",message:"No host here."}});return}const d=`wi-${++V}`,f=setTimeout(()=>{P.delete(d),h({ok:!1,error:{code:"timeout",message:"The host has not answered."}})},1e4);P.set(d,{resolve:h,timer:f}),e.postMessage({p:y,v:1,type:n,id:d,payload:l})}),O=n=>{k=n,p.includes("selection.chip")&&N("selection.set",{anchors:n===null?[]:[{kind:"element",id:n}]}),w()};function o(n){const l=t("details",{class:"why","data-testid":"insights-why"});l.append(t("summary",{},"Why we think this"));const h=t("ul");for(const d of n.why)h.append(t("li",{},d));if(n.runs.length>0){const d=[...new Set(n.runs)].slice(0,5);h.append(t("li",{},`Runs behind it: ${d.join("; ")}${n.runs.length>d.length?`; and ${n.runs.length-d.length} more`:""}.`))}return h.append(t("li",{},`What would change our mind: ${n.changeMind}`)),l.append(h),l}function b(n){const l=t("section",{"data-testid":"insights-review","aria-label":"Review"}),h=t("div");if(h.append(t("h1",{},"Run insights")),h.append(t("p",{class:"lede","data-testid":"insights-summary"},n.status==="completed"||n.status==="running"?n.sentence:`${n.sentence} ${n.error??""}`.trim())),n.summary!==null){const r=t("details",{class:"why"});r.append(t("summary",{},"The reviewer’s reading")),r.append(t("p",{},n.summary)),h.append(r)}l.append(h);const d=t("div",{class:"cols"}),f=t("section",{"data-testid":"insights-better","aria-label":"What got better"});f.append(t("h2",{},"What got better"));const i=t("ul",{class:"plain"});n.improvements.length===0&&i.append(t("li",{class:"muted"},n.status==="completed"?"Nothing changed enough to call it better.":"—"));for(const r of n.improvements)i.append(t("li",{class:"good"},r));f.append(i),d.append(f);const m=t("section",{"data-testid":"insights-recommendations","aria-label":"Could improve"});m.append(t("h2",{},"Could improve"));const v=t("ul",{class:"plain"});n.recommendations.length===0&&v.append(t("li",{class:"muted"},n.status==="completed"?"Nothing to change.":"—"));for(const r of n.recommendations){const E=t("li"),L=t("article",{class:"rec","data-testid":"insights-rec","data-anchor":r.anchor,"data-state":r.state,"aria-current":String(k===r.anchor)}),R=t("button",{type:"button",class:"pick","data-testid":"insights-rec-pick","aria-pressed":String(k===r.anchor)});R.append(t("span",{class:"t"},r.title)),R.append(t("span",{class:"say"},r.say)),R.append(t("span",{class:"effect"},`If done: ${r.effect}`)),R.addEventListener("click",()=>O(k===r.anchor?null:r.anchor)),L.append(R);const D=t("div",{class:"row"});D.append(t("span",{class:"chip","data-confidence":r.confidence.toLowerCase(),"data-testid":"insights-confidence"},r.confidence)),D.append(t("span",{class:"verb"},r.verb)),r.state!=="new"&&D.append(t("span",{class:"pill","data-state":r.state},r.state==="dismissed"?`Dismissed${r.reason!==null?`: ${r.reason}`:""}`:"Accepted")),L.append(D),L.append(o(r)),E.append(L),v.append(E)}if(m.append(v),n.recommendations.some(r=>r.state==="new")&&m.append(t("p",{class:"note"},"Pick one to accept or dismiss it.")),d.append(m),l.append(d),n.watching.length>0||n.regressions.length>0){const r=t("details",{class:"why watching","data-testid":"insights-watching"});r.append(t("summary",{},`Also watching (${n.watching.length+n.regressions.length})`));const E=t("ul",{class:"plain"});for(const L of n.watching)E.append(t("li",{},L.title));for(const L of n.regressions)E.append(t("li",{class:"muted"},L));r.append(E),l.append(r)}return l}function w(){if(s.replaceChildren(),u===null){s.append(t("p",{class:"muted"},"Reading the reviews…"));return}if(u.reviews.length===0){const d=t("div",{class:"empty","data-testid":"insights-empty"});d.append(t("h1",{},"Run insights")),d.append(t("p",{class:"lede"},u.running?"The first review is running now.":"No review has run yet. The first one runs on its schedule, or start it from Build & settings.")),s.append(d);return}const n=u.reviews[Math.min(S,u.reviews.length-1)];s.append(b(n));const l=t("section",{"data-testid":"insights-trends","aria-label":"Trends"});l.append(t("h2",{},"Trends")),l.append(t("p",{class:"note"},"One dot per review. The shaded band is the likely range; grey dots had too few runs to tell."));const h=t("div",{class:"trends"});for(const d of W){const f=u.metrics.find(E=>E.id===d),i=u.trends.find(E=>E.metric===d);if(f===void 0||i===void 0)continue;const m=i.points[i.points.length-1],v=t("div",{class:"chart","data-testid":"insights-trend","data-metric":d});v.append(t("div",{class:"t"},f.label)),v.append(t("div",{class:"v"},ee[d]??f.label));const r=H(i.points,f.unit);r.setAttribute("aria-label",`${f.label} across ${i.points.length} reviews`),v.append(r),v.append(t("div",{class:"v"},m===void 0?"No reviews yet":m.small?`Latest: too few runs to tell (${m.n})`:`Latest: ${_(f.unit,m.value)}, from ${m.n} runs`)),h.append(v)}if(l.append(h),s.append(l),u.reviews.length>1){const d=t("section",{class:"history","data-testid":"insights-history","aria-label":"Earlier reviews"});d.append(t("h2",{},"Earlier reviews"));const f=t("ul",{class:"plain"});u.reviews.forEach((i,m)=>{const v=t("button",{type:"button","data-testid":"insights-history-row","aria-current":String(m===S)});v.append(t("span",{},`${x(i.launchedAt)} · ${i.status==="completed"?`${i.totals?.runs??0} runs`:i.status}`));const r=i.recommendations.filter(L=>L.state!=="new").length;v.append(t("span",{class:"muted"},`${i.recommendations.length} to improve, ${r} decided`)),v.addEventListener("click",()=>{S=m,k=null,O(null)});const E=t("li");E.append(v),f.append(E)}),d.append(f),s.append(d)}n.footnote!==null&&s.append(t("p",{class:"note footnote","data-testid":"insights-footnote"},n.footnote))}async function T(){const n=await C("artifact.read",{});if(!n.ok||n.payload===void 0){s.replaceChildren(t("p",{class:"muted"},`The reviews could not be read: ${n.error?.message??"no answer"}.`));return}const l=n.payload.content;l?.type==="run-insights"&&(u=l,g=typeof n.payload.version=="number"?n.payload.version:g,w())}const z=n=>{if(!(typeof n!="object"||n===null))for(const[l,h]of Object.entries(n))/^--[a-z0-9-]+$/.test(l)&&typeof h=="string"&&h.length<=200&&!/url\(/i.test(h)&&document.documentElement.style.setProperty(l,h)};function I(){j=!0;for(const{timer:n,resolve:l}of P.values())clearTimeout(n),l({ok:!1,error:{code:"unavailable",message:"Closed."}});P.clear(),e?.close(),window.removeEventListener("message",B)}function B(n){const l=n.data;if(e!==null||l?.p!==y||l.v!==1||l.type!=="host.hello"||!n.ports[0])return;const h=K(l.payload),d=l.payload;c=h.protocol,p=Array.isArray(d.grants)?d.grants.filter(f=>typeof f=="string"):[],z(d.theme),e=n.ports[0],a=new Y(e,{selection(f){const i=f.find(m=>typeof m=="object"&&m!==null&&m.kind==="element");k=typeof i?.id=="string"?i.id:null,w()}}),e.onmessage=f=>{const i=f.data;if(i?.p!==y||i.v!==1)return;if(typeof i.re=="string"){const v=P.get(i.re);if(v===void 0)return;clearTimeout(v.timer),P.delete(i.re),v.resolve({ok:i.ok===!0,...i.payload!==void 0?{payload:i.payload}:{},...i.error===void 0?{}:{error:i.error}});return}if(c===2&&a?.dispatch(i))return;const m=i.payload??{};switch(i.type){case"host.ping":i.id&&e?.postMessage({p:y,v:1,re:i.id,ok:!0,payload:{}});break;case"host.theme":z(m.theme);break;case"artifact.changed":(typeof m.head!="number"||m.head>g)&&T();break;case"selection.cleared":k=null,w();break;case"host.teardown":I();break}},e.start(),w(),T()}window.addEventListener("message",B),window.addEventListener("pagehide",I,{once:!0}),w(),X("wicked-insights",Z)}return typeof window<"u"&&document.querySelector('meta[name="wicked-editor"][content="wicked-insights"]')!==null&&q(),$.TREND_METRICS=W,$.formatMetric=_,$.start=q,$.trendSvg=H,Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),$})({});
69
+ </script>
70
+ </body>
71
+ </html>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "wicked-page",
3
3
  "title": "Page",
4
- "version": "0.12.3",
4
+ "version": "0.13.0",
5
5
  "protocol": [
6
6
  1,
7
7
  2
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="wicked-editor" content="wicked-page">
6
- <meta name="wicked-editor-version" content="0.12.3">
6
+ <meta name="wicked-editor-version" content="0.13.0">
7
7
  <title>Document</title>
8
8
  <style>
9
9
  /* The plugin's own chrome takes the host's tokens (`host.hello.theme` / `host.theme`), with plain
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "wicked-video",
3
3
  "title": "Video",
4
- "version": "0.12.3",
4
+ "version": "0.13.0",
5
5
  "protocol": [
6
6
  1,
7
7
  2
@@ -1,7 +1,7 @@
1
1
  <!doctype html>
2
2
  <html lang="en"><head><meta charset="utf-8">
3
3
  <meta name="wicked-editor" content="wicked-video">
4
- <meta name="wicked-editor-version" content="0.12.3">
4
+ <meta name="wicked-editor-version" content="0.13.0">
5
5
  <title>Video</title>
6
6
  <style>
7
7
  :root{--surface-base:#fff;--surface-card:#f6f7f9;--surface-raised:#fff;--ink-high:#0d1117;--ink-body:#2b333d;--ink-muted:#5b6673;--border:#d5dae1;--accent:#224a5e;--font-sans:system-ui,sans-serif}
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>wicked-studio</title>
7
- <script type="module" crossorigin src="/assets/index-t_DEhtrK.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-DB8oZVQV.css">
7
+ <script type="module" crossorigin src="/assets/index-DhkxIK-0.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-B-f_VEL2.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>