react-semaphor 0.1.605 → 0.1.607

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 (151) hide show
  1. package/dist/analytics-protocol/index.js +1 -1
  2. package/dist/appearance-runtime/index.js +1 -1
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/assistant-protocol/index.js +1 -1
  5. package/dist/brand-studio/index.js +2 -2
  6. package/dist/briefings/index.js +1 -1
  7. package/dist/chunks/add-to-dashboard-Bu3M9DpP.js +12 -0
  8. package/dist/chunks/appearance-provider-C4lPZcaN.js +613 -0
  9. package/dist/chunks/appearance-runtime-provider-De2VZS4F.js +1 -0
  10. package/dist/chunks/assistant-chat-B7Fngg8U.js +53 -0
  11. package/dist/chunks/attachment-filter-line-wJRB0GSP.js +1 -0
  12. package/dist/chunks/{bookmark-impact-BAtemeyK.js → bookmark-impact-DjrrJomS.js} +1 -1
  13. package/dist/chunks/bookmark-state-x9hJS83D.js +1 -0
  14. package/dist/chunks/{brand-C9APUFaP.js → brand-DgFcvKJI.js} +1 -1
  15. package/dist/chunks/{card-filter-builder-ClWrXB7P.js → card-filter-builder-CvxygmsE.js} +8 -3
  16. package/dist/chunks/check-input-7DVPUuco.js +1 -0
  17. package/dist/chunks/{comparison-window-caption-tguyN24S.js → comparison-window-caption-zUZDe4tL.js} +1 -1
  18. package/dist/chunks/compiler-XErOfUUx.js +1 -0
  19. package/dist/chunks/context-Cwj8Axgd.js +2 -0
  20. package/dist/chunks/currency-presentation-binding-w9WDUk3b.js +1 -0
  21. package/dist/chunks/custom-visual-inputs-D8U98aBz.js +1 -0
  22. package/dist/chunks/{dashboard-ChIcbVTx.js → dashboard-BEd6i29E.js} +1 -1
  23. package/dist/chunks/{dashboard-briefing-launcher-CwMlhkxV.js → dashboard-briefing-launcher-DMDYM9IA.js} +9 -14
  24. package/dist/chunks/{dashboard-controls-UCSAFCGA.js → dashboard-controls-5B2vCIjJ.js} +8 -8
  25. package/dist/chunks/{dashboard-json-B120hYDa.js → dashboard-json-C6r30x-5.js} +1 -1
  26. package/dist/chunks/dashboard-temporal-snapshot-Wki-YACw.js +1 -0
  27. package/dist/chunks/edit-dashboard-visual-F2w7v4iB.js +83 -0
  28. package/dist/chunks/{filter-line-WwUV5JzN.js → filter-line-COFQaF4_.js} +1 -1
  29. package/dist/chunks/filter-reach-preview-BWRGfSmb.js +1 -0
  30. package/dist/chunks/filter-value-text-BSAMEgve.js +1 -0
  31. package/dist/chunks/kpi-trend-rule-BcnKbY7d.js +1 -0
  32. package/dist/chunks/{layout-grid-CFzqJ7GC.js → layout-grid-DahW4ClC.js} +1 -1
  33. package/dist/chunks/matrix-analytical-definition-Bd-dXB8q.js +1 -0
  34. package/dist/chunks/{matrix-member-presentation-vVAv-aqg.js → matrix-member-presentation-CfvxPV-i.js} +1 -1
  35. package/dist/chunks/matrix-operation-contract-Cw7U53Ao.js +1 -0
  36. package/dist/chunks/metric-formatting-QDqXfQGY.js +1 -0
  37. package/dist/chunks/{numeric-range-options-C8tr-Bls.js → numeric-range-options-s6i_nDXg.js} +1 -1
  38. package/dist/chunks/{palette-NvEIuXHN.js → palette-CYvJHSqP.js} +1 -1
  39. package/dist/chunks/pivot-result-contract-expectations-BX5gLcze.js +1 -0
  40. package/dist/chunks/{pivot-result-identity-B0eWVMXg.js → pivot-result-identity-DOISzHU4.js} +1 -1
  41. package/dist/chunks/{raw-temporal-value-BHQ-ldpW.js → raw-temporal-value-Cssny3RJ.js} +1 -1
  42. package/dist/chunks/report-preferences-dialog-BNpB9byP.js +1 -0
  43. package/dist/chunks/{report-runtime-context-Cd1b5pku.js → report-runtime-context-B8HuY0bu.js} +1 -1
  44. package/dist/chunks/resolve-dashboard-input-context-B-0tONJg.js +8 -0
  45. package/dist/chunks/sandbox-host-Drf58_oU.js +197 -0
  46. package/dist/chunks/saved-dashboard-context-dbdbQ5bB.js +1 -0
  47. package/dist/chunks/{selection-filter-compiler-kYsRugss.js → selection-filter-compiler-DK8KkS9g.js} +1 -1
  48. package/dist/chunks/semaphor-ready-indicator-BSFsqsBJ.js +617 -0
  49. package/dist/chunks/set-oJDaJdtI.js +1 -0
  50. package/dist/chunks/slider-DAvAdfMC.js +599 -0
  51. package/dist/chunks/stored-dashboard-DmgJQcyZ.js +1 -0
  52. package/dist/chunks/table-cell-text-2x6r_oHO.js +1 -0
  53. package/dist/chunks/{table-export-sheet-xaczzWZF.js → table-export-sheet-CWqKiQu4.js} +1 -1
  54. package/dist/chunks/{token-types-1vzMWjI-.js → token-types-BSyWn2pb.js} +1 -1
  55. package/dist/chunks/{validators-Dg2kyF4_.js → validators-BPGmPz8-.js} +1 -1
  56. package/dist/chunks/{variable-draft-B4_xqr4Y.js → variable-draft-DGA22H2g.js} +1 -1
  57. package/dist/chunks/visual-contract-DQPKg5QW.js +143 -0
  58. package/dist/dashboard/index.js +1 -1
  59. package/dist/dashboard-authoring/index.js +1 -1
  60. package/dist/extensions/index.js +1 -0
  61. package/dist/format-utils/index.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/report-runtime-context/index.js +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/surfboard/index.js +1 -1
  66. package/dist/types/components/assistant/assistant-store.d.ts +19 -0
  67. package/dist/types/components/assistant/use-assistant.d.ts +4 -0
  68. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +2 -3
  69. package/dist/types/components/visual/data-table/table-cell-text.d.ts +93 -0
  70. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  71. package/dist/types/extensions.d.ts +2 -0
  72. package/dist/types/index.js +1 -1
  73. package/dist/types/lib/charts/types.d.ts +3 -1
  74. package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -2
  75. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +12 -12
  76. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +25 -25
  77. package/dist/types/lib/stores/dashboard-store.d.ts +33 -2
  78. package/dist/types/lib/stores/editor-store.d.ts +8 -0
  79. package/dist/types/lib/types/common-types.d.ts +3 -0
  80. package/dist/types/lib/utils/card-definition.d.ts +12 -12
  81. package/dist/types/lib/utils/card-type-change.d.ts +9 -0
  82. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +6 -6
  83. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
  84. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +248 -248
  85. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  86. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  87. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +2 -2
  88. package/dist/types/shared/assistant-protocol/context.d.ts +26 -26
  89. package/dist/types/shared/assistant-protocol/parts.d.ts +4 -0
  90. package/dist/types/shared/assistant-protocol/request.d.ts +2 -1
  91. package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +16 -6
  92. package/dist/types/shared/dashboard-authoring/card-settings/custom-visual-write.d.ts +44 -0
  93. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
  94. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  95. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +2 -2
  96. package/dist/types/shared/dashboard-authoring/changes/custom-visual-change.d.ts +57 -0
  97. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +61 -54
  98. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +5 -1
  99. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +5 -1
  100. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +10 -0
  101. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +60 -60
  102. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +4 -4
  103. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +48 -48
  104. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +1 -1
  105. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +2 -0
  106. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +8 -2
  107. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
  108. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +7 -0
  109. package/dist/types/shared/extensions/check-audits.d.ts +30 -0
  110. package/dist/types/shared/extensions/check-findings.d.ts +46 -0
  111. package/dist/types/shared/extensions/check-input.d.ts +23 -0
  112. package/dist/types/shared/extensions/check-renders.d.ts +44 -0
  113. package/dist/types/shared/extensions/check-runner.d.ts +19 -0
  114. package/dist/types/shared/extensions/index.d.ts +17 -0
  115. package/dist/types/shared/extensions/read-document.d.ts +18 -0
  116. package/dist/types/shared/extensions/sandbox-host.d.ts +63 -0
  117. package/dist/types/shared/extensions/saved-refs.d.ts +33 -0
  118. package/dist/types/shared/extensions/script-policy.d.ts +11 -0
  119. package/dist/types/shared/extensions/types.d.ts +186 -0
  120. package/dist/types/shared/extensions/visual-contract.d.ts +36 -0
  121. package/dist/types/shared/extensions/visual-payload.d.ts +75 -0
  122. package/dist/types/shared/extensions/visual-theme.d.ts +21 -0
  123. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +13 -6
  124. package/dist/types/shared/format-utils/matrix-continuation.d.ts +2 -2
  125. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +24 -24
  126. package/dist/types/shared/usage-events/details.d.ts +4 -4
  127. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  128. package/dist/usage-events/index.js +1 -1
  129. package/package.json +7 -2
  130. package/dist/chunks/add-to-dashboard-CEmZUf9o.js +0 -12
  131. package/dist/chunks/appearance-provider-CfoAVQuG.js +0 -608
  132. package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +0 -1
  133. package/dist/chunks/assistant-chat-DgUaCE9k.js +0 -51
  134. package/dist/chunks/attachment-filter-line-C_zHMhGh.js +0 -1
  135. package/dist/chunks/bookmark-state-DScd31KT.js +0 -1
  136. package/dist/chunks/context-CntvtZwC.js +0 -2
  137. package/dist/chunks/dashboard-temporal-snapshot-BFJKbp_6.js +0 -1
  138. package/dist/chunks/edit-dashboard-visual-DvHp03h_.js +0 -73
  139. package/dist/chunks/filter-reach-preview-C5M5_hf_.js +0 -1
  140. package/dist/chunks/filter-value-text-DqTHe_vu.js +0 -1
  141. package/dist/chunks/kpi-trend-rule-B87LNzcz.js +0 -1
  142. package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +0 -1
  143. package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +0 -1
  144. package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +0 -1
  145. package/dist/chunks/report-preferences-dialog-Bseb2Rlg.js +0 -1
  146. package/dist/chunks/resolve-dashboard-input-context-BDY7KwRe.js +0 -8
  147. package/dist/chunks/saved-dashboard-context-C3lWc4Dx.js +0 -1
  148. package/dist/chunks/semaphor-ready-indicator-BQarSo6S.js +0 -612
  149. package/dist/chunks/set-6mOnfQeH.js +0 -1
  150. package/dist/chunks/slider-BPnHdMGq.js +0 -4
  151. package/dist/chunks/stored-dashboard-DfrxDLhR.js +0 -1
@@ -0,0 +1,12 @@
1
+ import{A as c,i as y,o as h,p as S}from"./context-Cwj8Axgd.js";function f(e,t){return e.role===t.role&&e.name===t.name&&e.aggregate===t.aggregate&&e.granularity===t.granularity;}function C(e){var n,a;const t=(n=e.selectedCard)==null?void 0:n.description;return(t==null?void 0:t.status)!=="described"||t.sql||((a=e.editing)==null?void 0:a.mode)==="sql"?[]:t.fields;}function q(e,t){if(t.length===0)return[];if(t.length>c.taggedFields)return[`taggedFields: at most ${c.taggedFields}`];const n=C(e);return t.flatMap((a,s)=>n.some(o=>f(o,a))?t.slice(0,s).some(o=>f(o,a))?[`taggedFields.${s}: tagged twice`]:[]:[`taggedFields.${s}: not a field of the card the context asks about`]);}function U(e,t){return t!=null&&t.length?`Fields of the asked-about card the user tagged in this question: ${t.map(y).join("; ")}.
2
+
3
+ ${e}`:e;}function T(e){if(e.kind==="text")return{type:"text",text:e.text};const{kind:t,...n}=e;return{type:`data-${t}`,...(e.kind==="stage"?{id:e.stageId}:{}),data:n};}function P(e,t){return e.kind!=="text"?[T(e)]:[{type:"text-start",id:t},{type:"text-delta",id:t,delta:e.text},{type:"text-end",id:t}];}function v(e){if(e==="failed"||e==="interrupted")return{kind:"refusal",code:"model_unavailable",message:h.model_unavailable};if(e==="running")return{kind:"refusal",code:"turn_in_progress",message:h.turn_in_progress};}function $(e,t){let n=-1;e.forEach((s,o)=>{t(s)==="text"&&(n=o);});let a=-1;return e.forEach((s,o)=>{o<n&&t(s)==="step"&&(a=o);}),new Set(e.filter((s,o)=>o<a&&t(s)==="text"));}const p={conversation:"nowhere",text:"body",stage:"details",using:"details",clarify:"body",artifact:"body",refusal:"body",trace:"details",proposal:"body",proposal_operations:"nowhere",proposal_refused:"body",model_change:"body"};function V(e){return Object.hasOwn(p,e)&&p[e]==="body";}function b(e){return e.kind==="text"?A(e.text):e.kind==="stage"&&!e.change?"step":"other";}function A(e){return e.trim().length>0?"text":"other";}function B(e){const t=$(e,b);return e.flatMap(n=>n.kind==="text"&&!t.has(n)?[n.text]:[]).filter(n=>n.trim().length>0).join(`
4
+
5
+ `);}const K=5;function z(e){if(!Array.isArray(e))return;const t=e.filter(n=>!!n&&typeof n=="object"&&typeof n.what=="string"&&typeof n.now=="string");return t.length>0?t.map(({what:n,now:a})=>({what:n,now:a})):void 0;}const k={proposal_not_found:"This suggestion has expired. Ask for a new one.",proposal_stale:"The data model changed while these were being added. Nothing was added; ask for a new suggestion.",not_permitted:"You don’t have permission to change the data model.",apply_in_progress:"They’re still being added.",apply_outcome_unknown:"It isn’t clear whether they were added. Check the data model before asking again."},N="They couldn’t be added.",E={...k,proposal_stale:"Someone changed these in the data model since they were suggested. Nothing was saved; ask for a new suggestion.",apply_in_progress:"They’re still being saved.",apply_outcome_unknown:"It isn’t clear whether they were saved. Check the data model before asking again."},x="They couldn’t be saved.",g={exists:()=>"it’s already in the model",missing_fields:e=>`a dataset or field it uses is no longer in ${e}`,type_mismatch:()=>"its fields’ types don’t match",not_supported:()=>"the data doesn’t support it"};function O(e,t){switch(e==null?void 0:e.status){case"added":return"added";case"existing":return"already in the model";case"left_out":return"left out";case"refused":return`not added: ${I(e.reasons,t)}`;default:return"outcome unknown";}}function I(e,t){const n=e.find(a=>Object.hasOwn(g,a));return n?g[n](t):"it no longer fits the model";}function m(e){return e==="apply_outcome_unknown";}function w(e,t){const n=t==="edits"?E:k;return typeof e=="string"&&Object.hasOwn(n,e)?n[e]:t==="edits"?x:N;}const J={conversationId:"with tool calls",addedSources:"left out",allows:"left out",turns:"shown"},W={turnId:"left out",startedAt:"shown",message:"shown",taggedFields:"shown",parts:"shown",outcome:"shown",toolCalls:"with tool calls",model:"with tool calls",instructionsVersion:"with tool calls"};function Y(e,t){var o;const n=(o=e.turns[0])==null?void 0:o.startedAt,a=[`${t.assistantName} conversation${n?` · ${n.slice(0,16).replace("T"," ")} UTC`:""}`,...(t.toolCalls?[`Conversation ${e.conversationId}`]:[])],s=e.turns.map(r=>{const d=[`You: ${L(r)}`,"",`${t.assistantName}:`],i=v(r.outcome),l=[...r.parts,...(i?[i]:[])];return d.push(...F(l)),t.toolCalls&&r.toolCalls&&d.push(...D(r.toolCalls,r.model,r.instructionsVersion)),d.join(`
6
+ `);});return[a.join(`
7
+ `),...s].join(`
8
+
9
+ `)+`
10
+ `;}function L(e){return[...(e.taggedFields??[]).map(n=>`@${n.label}`),e.message].join(" ");}function F(e){const t=$(e,b),n=/* @__PURE__ */new Set(),a=[];for(const s of e)switch(s.kind){case"text":!t.has(s)&&s.text.trim()&&a.push(s.text.trim());break;case"proposal":a.push(S(s),...s.changes.filter(o=>o.sentence).map(o=>`+ ${o.sentence}`));break;case"proposal_refused":a.push("Not added",`! ${s.message}`);break;case"model_change":a.push(...j(s));break;case"clarify":a.push(s.multiple?`${s.question} (pick any)`:s.question,...s.options.map((o,r)=>` ${r+1}. ${o.label}`));break;case"artifact":a.push(`[Result: ${s.artifact.title}]`);break;case"refusal":a.push(s.message);break;case"stage":n.add(s.stageId);break;case"using":case"trace":case"conversation":case"proposal_operations":break;default:return s;}return n.size&&a.push(`(${n.size} ${n.size===1?"step":"steps"})`),a;}function D(e,t,n){const a=["","Tool calls:"];return(t||n)&&a.push(` model ${t??"unknown"}${n?` · instructions ${n}`:""}`),e.length||a.push(" none"),e.forEach((s,o)=>{var u;const r=s.durationMs===void 0?"":` · ${s.durationMs} ms`,d=s.rowCount===void 0?"":` · ${s.rowCount} ${s.rowCount===1?"row":"rows"}`,i=s.ok||(u=s.error)==null?void 0:u.trim(),l=i&&!i.includes(`
11
+ `)?`: ${i}`:"";a.push(` ${o+1}. ${R(s.tool)}${r}${d} · ${s.ok?"ok":`failed${l}`}`),i&&!l&&a.push(" error:",..._(i)),i&&!l&&a.push(" input:"),a.push(..._(JSON.stringify(s.input??{},null,2)));}),a;}function _(e){return e.split(`
12
+ `).map(t=>` ${t}`);}function R(e){return e.replace(/^semaphor_/,"");}function j(e){const t=e.changes.map(a=>a.sentence??a.op),n=e.outcome;if(e.changeKind==="edits"){const a=n?n.status==="applied"?"saved":n.status==="dismissed"?"not saved: Not now":`${m(n.code)?"unclear whether saved":"not saved"}: ${w(n.code,"edits")}`:"proposed",s=(n==null?void 0:n.status)==="refused"?(n.changed??[]).map(o=>` Changed since: ${o.what} is now ${o.now}`):[];return[`Data model change (${a})`,...t.map(o=>`+ ${o}`),...s];}return n?n.status==="dismissed"?["Data model change (not added: Not now)",...t.map(a=>`+ ${a}`)]:n.status==="refused"?[`Data model change (${m(n.code)?"unclear whether added":"not added"}: ${w(n.code)})`,...t.map(s=>`+ ${s}`)]:["Data model change",...t.map((a,s)=>`+ ${a} (${O(n.links[s],e.domainLabel)})`)]:["Data model change (proposed)",...t.map(a=>`+ ${a}`)];}function G(e){if(e.kind==="semantic")return JSON.stringify(["semantic",e.domainId,e.datasetName]);if(e.kind==="sql")return JSON.stringify(["sql",e.connectionId]);}function H(e){return e.label??(e.kind==="semantic"?e.datasetName:e.kind==="physical"?e.tableName:"SQL");}function Q(e){return{columns:e.columns,records:e.records,rowCount:e.rowCount,governed:e.status.governed,complete:e.status.complete,truncated:e.status.truncated};}const X={number:"kpi",line:"line",bar:"bar",stackedBar:"stackedBar",table:"table"};export{p as A,J as C,K as M,C as a,T as b,P as c,v as d,W as e,Y as f,R as g,V as h,b as i,A as j,B as k,G as l,H as m,X as n,z as o,O as p,U as q,I as r,f as s,q as t,m as u,Q as v,$ as w,w as x};