react-semaphor 0.1.606 → 0.1.608
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/add-to-dashboard-Bu3M9DpP.js +12 -0
- package/dist/chunks/appearance-provider-BBYTKSjL.js +613 -0
- package/dist/chunks/appearance-runtime-provider-De2VZS4F.js +1 -0
- package/dist/chunks/assistant-chat-x3NCrm5n.js +53 -0
- package/dist/chunks/attachment-filter-line-ClTS4GvQ.js +1 -0
- package/dist/chunks/{bookmark-impact-BW30cm5E.js → bookmark-impact-xCmo8x3V.js} +1 -1
- package/dist/chunks/bookmark-state-BmbBu1th.js +1 -0
- package/dist/chunks/{brand-CL5xDiFH.js → brand-3m_qSMyC.js} +1 -1
- package/dist/chunks/card-filter-builder-CM3SZ4kO.js +11 -0
- package/dist/chunks/check-input-C7S2sNzB.js +151 -0
- package/dist/chunks/{comparison-window-caption-tguyN24S.js → comparison-window-caption-WzGsqv4n.js} +1 -1
- package/dist/chunks/compiler-XErOfUUx.js +1 -0
- package/dist/chunks/context-Cwj8Axgd.js +2 -0
- package/dist/chunks/currency-presentation-binding-s4PlA3Wu.js +1 -0
- package/dist/chunks/custom-visual-inputs-CUtxCe4T.js +1 -0
- package/dist/chunks/custom-visual-write-CH-k-4HE.js +1 -0
- package/dist/chunks/{dashboard-Cyhj9EOl.js → dashboard-BwuurlUI.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CyOFddmD.js → dashboard-briefing-launcher-CX7mCnPi.js} +5 -5
- package/dist/chunks/{dashboard-controls-DpADfhr0.js → dashboard-controls-Bwjy9G1i.js} +8 -8
- package/dist/chunks/{dashboard-json-4xMChR2q.js → dashboard-json-B9lK28i0.js} +1 -1
- package/dist/chunks/dashboard-temporal-snapshot-CcndP6CF.js +1 -0
- package/dist/chunks/edit-dashboard-visual-BF3mfrWf.js +103 -0
- package/dist/chunks/{filter-line-WwUV5JzN.js → filter-line-W-qQAjke.js} +1 -1
- package/dist/chunks/filter-reach-preview-DSH_k8AJ.js +1 -0
- package/dist/chunks/{filter-value-text-DqTHe_vu.js → filter-value-text-DQwYZHz0.js} +1 -1
- package/dist/chunks/kpi-trend-rule-DDbguInc.js +1 -0
- package/dist/chunks/{layout-grid-Dtsioq4h.js → layout-grid-Bx0jBVXj.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-jn075ooo.js +1 -0
- package/dist/chunks/{matrix-member-presentation-vVAv-aqg.js → matrix-member-presentation-Chz6uGYz.js} +1 -1
- package/dist/chunks/matrix-operation-contract-DceN49RX.js +1 -0
- package/dist/chunks/metric-formatting-DILSVxLq.js +1 -0
- package/dist/chunks/{numeric-range-options-C8tr-Bls.js → numeric-range-options-Drc1EZ6H.js} +1 -1
- package/dist/chunks/{palette-565cA0nh.js → palette-CZJ4ZCY9.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-D_ane7I2.js +1 -0
- package/dist/chunks/{pivot-result-identity-B0eWVMXg.js → pivot-result-identity-DRhVJMsF.js} +1 -1
- package/dist/chunks/{raw-temporal-value-BHQ-ldpW.js → raw-temporal-value-B4Md6Xfb.js} +1 -1
- package/dist/chunks/report-preferences-dialog-EQNoTych.js +1 -0
- package/dist/chunks/{report-runtime-context-Cd1b5pku.js → report-runtime-context-CkxgMKr6.js} +1 -1
- package/dist/chunks/resolve-dashboard-input-context-B5yUS9ZM.js +8 -0
- package/dist/chunks/sandbox-host-WJXxpvz7.js +197 -0
- package/dist/chunks/saved-dashboard-context-DQlA4Mg0.js +1 -0
- package/dist/chunks/{selection-filter-compiler-kYsRugss.js → selection-filter-compiler-BxtEEB6Z.js} +1 -1
- package/dist/chunks/semaphor-ready-indicator-Cq3C2SNo.js +622 -0
- package/dist/chunks/set-wWdhgHSh.js +1 -0
- package/dist/chunks/slider-C4jUvJtd.js +599 -0
- package/dist/chunks/stored-dashboard-1x0q2cNx.js +1 -0
- package/dist/chunks/table-cell-text-DFHUGeG6.js +1 -0
- package/dist/chunks/{table-export-sheet-xaczzWZF.js → table-export-sheet-CthBUHu4.js} +1 -1
- package/dist/chunks/{token-types-1vzMWjI-.js → token-types-BM0mpZce.js} +1 -1
- package/dist/chunks/{validators-Dg2kyF4_.js → validators-U8IL8djK.js} +1 -1
- package/dist/chunks/{variable-draft-CRbSYdB6.js → variable-draft-CwX-b6Fs.js} +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/extensions/index.js +1 -0
- package/dist/format-utils/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/components/assistant/assistant-store.d.ts +19 -0
- package/dist/types/components/assistant/use-assistant.d.ts +4 -0
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +2 -3
- package/dist/types/components/visual/data-table/table-cell-text.d.ts +93 -0
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
- package/dist/types/extensions.d.ts +2 -0
- package/dist/types/index.js +1 -1
- package/dist/types/lib/charts/types.d.ts +3 -1
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -2
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +12 -12
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +25 -25
- package/dist/types/lib/stores/dashboard-store.d.ts +33 -2
- package/dist/types/lib/stores/editor-store.d.ts +8 -0
- package/dist/types/lib/types/common-types.d.ts +3 -0
- package/dist/types/lib/utils/card-definition.d.ts +12 -12
- package/dist/types/lib/utils/card-type-change.d.ts +9 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +6 -6
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +248 -248
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +2 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +26 -26
- package/dist/types/shared/assistant-protocol/parts.d.ts +4 -0
- package/dist/types/shared/assistant-protocol/request.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +16 -6
- package/dist/types/shared/dashboard-authoring/card-settings/custom-visual-write.d.ts +50 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/changes/custom-visual-change.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +61 -54
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +5 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +5 -1
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +60 -60
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +4 -4
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +48 -48
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +8 -2
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +8 -0
- package/dist/types/shared/extensions/check-audits.d.ts +30 -0
- package/dist/types/shared/extensions/check-findings.d.ts +46 -0
- package/dist/types/shared/extensions/check-input.d.ts +23 -0
- package/dist/types/shared/extensions/check-renders.d.ts +44 -0
- package/dist/types/shared/extensions/check-runner.d.ts +19 -0
- package/dist/types/shared/extensions/index.d.ts +17 -0
- package/dist/types/shared/extensions/read-document.d.ts +18 -0
- package/dist/types/shared/extensions/sandbox-host.d.ts +63 -0
- package/dist/types/shared/extensions/saved-refs.d.ts +33 -0
- package/dist/types/shared/extensions/script-policy.d.ts +11 -0
- package/dist/types/shared/extensions/types.d.ts +186 -0
- package/dist/types/shared/extensions/visual-contract.d.ts +38 -0
- package/dist/types/shared/extensions/visual-payload.d.ts +75 -0
- package/dist/types/shared/extensions/visual-theme.d.ts +21 -0
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +13 -6
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +24 -24
- package/dist/types/shared/usage-events/details.d.ts +4 -4
- package/dist/types/shared/usage-events/envelope.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +7 -2
- package/dist/chunks/add-to-dashboard-CEmZUf9o.js +0 -12
- package/dist/chunks/appearance-provider-fIhJSX6y.js +0 -613
- package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +0 -1
- package/dist/chunks/assistant-chat-SBKSrrEA.js +0 -51
- package/dist/chunks/attachment-filter-line-C_zHMhGh.js +0 -1
- package/dist/chunks/bookmark-state-DScd31KT.js +0 -1
- package/dist/chunks/card-filter-builder-CzScSOQY.js +0 -11
- package/dist/chunks/context-CntvtZwC.js +0 -2
- package/dist/chunks/dashboard-temporal-snapshot-w3SMiPKj.js +0 -1
- package/dist/chunks/edit-dashboard-visual-DlvY7au4.js +0 -73
- package/dist/chunks/filter-reach-preview-DAEIyrEG.js +0 -1
- package/dist/chunks/kpi-trend-rule-N1Xkwe_u.js +0 -1
- package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +0 -1
- package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +0 -1
- package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +0 -1
- package/dist/chunks/report-preferences-dialog-B2ZGPS9t.js +0 -1
- package/dist/chunks/resolve-dashboard-input-context-SlAAe4GF.js +0 -8
- package/dist/chunks/saved-dashboard-context-Bc2SVDr-.js +0 -1
- package/dist/chunks/semaphor-ready-indicator-Bj-cjkz-.js +0 -612
- package/dist/chunks/set-CACXVM2A.js +0 -1
- package/dist/chunks/slider-CWze9OEM.js +0 -4
- package/dist/chunks/stored-dashboard-CcNdU-mG.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};
|