react-semaphor 0.1.604 → 0.1.606
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/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 +3 -8
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/{add-to-dashboard-DeHEBEqG.js → add-to-dashboard-CEmZUf9o.js} +1 -1
- package/dist/chunks/{analytics-base-schemas-BREc5WGv.js → analytics-base-schemas-DMFrDqn_.js} +1 -1
- package/dist/chunks/appearance-provider-fIhJSX6y.js +613 -0
- package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +1 -0
- package/dist/chunks/{assistant-chat-CjYrwVDa.js → assistant-chat-SBKSrrEA.js} +19 -24
- package/dist/chunks/attachment-filter-line-C_zHMhGh.js +1 -0
- package/dist/chunks/{bookmark-impact-C89zBLq3.js → bookmark-impact-BW30cm5E.js} +1 -1
- package/dist/chunks/bookmark-state-DScd31KT.js +1 -0
- package/dist/chunks/brand-CL5xDiFH.js +1 -0
- package/dist/chunks/card-filter-builder-CzScSOQY.js +11 -0
- package/dist/chunks/comparison-window-caption-tguyN24S.js +1 -0
- package/dist/chunks/{context-ALdccLHw.js → context-CntvtZwC.js} +1 -1
- package/dist/chunks/dashboard-Cyhj9EOl.js +1 -0
- package/dist/chunks/dashboard-briefing-launcher-CyOFddmD.js +42 -0
- package/dist/chunks/dashboard-controls-DpADfhr0.js +42 -0
- package/dist/chunks/dashboard-json-4xMChR2q.js +1 -0
- package/dist/chunks/dashboard-temporal-snapshot-w3SMiPKj.js +1 -0
- package/dist/chunks/edit-dashboard-visual-DlvY7au4.js +73 -0
- package/dist/chunks/filter-line-WwUV5JzN.js +1 -0
- package/dist/chunks/filter-reach-preview-DAEIyrEG.js +1 -0
- package/dist/chunks/filter-value-text-DqTHe_vu.js +1 -0
- package/dist/chunks/{index-BE1DfxNs.js → index-bkP6SnYu.js} +1 -1
- package/dist/chunks/kpi-trend-rule-N1Xkwe_u.js +1 -0
- package/dist/chunks/{layout-grid-BWtlgw0T.js → layout-grid-Dtsioq4h.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +1 -0
- package/dist/chunks/matrix-member-presentation-vVAv-aqg.js +1 -0
- package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +1 -0
- package/dist/chunks/numeric-range-options-C8tr-Bls.js +1 -0
- package/dist/chunks/{palette-BzC-CGOc.js → palette-565cA0nh.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +1 -0
- package/dist/chunks/pivot-result-identity-B0eWVMXg.js +1 -0
- package/dist/chunks/{raw-temporal-value-DeyEhL0S.js → raw-temporal-value-BHQ-ldpW.js} +1 -1
- package/dist/chunks/report-preferences-dialog-B2ZGPS9t.js +1 -0
- package/dist/chunks/{report-runtime-context-BWzIHCKK.js → report-runtime-context-Cd1b5pku.js} +1 -1
- package/dist/chunks/resolve-dashboard-input-context-SlAAe4GF.js +8 -0
- package/dist/chunks/resolver-CjsW8Rz0.js +1 -0
- package/dist/chunks/saved-dashboard-context-Bc2SVDr-.js +1 -0
- package/dist/chunks/schema-O1Y3WTGF.js +4 -0
- package/dist/chunks/{selection-filter-compiler-CCoCD25M.js → selection-filter-compiler-kYsRugss.js} +1 -1
- package/dist/chunks/semaphor-ready-indicator-Bj-cjkz-.js +612 -0
- package/dist/chunks/set-CACXVM2A.js +1 -0
- package/dist/chunks/slider-CWze9OEM.js +4 -0
- package/dist/chunks/stored-dashboard-CcNdU-mG.js +1 -0
- package/dist/chunks/{table-export-sheet-rC5pKmXg.js → table-export-sheet-xaczzWZF.js} +1 -1
- package/dist/chunks/{token-types-Bj9iMy0w.js → token-types-1vzMWjI-.js} +1 -1
- package/dist/chunks/{validators-CqV3Yka1.js → validators-Dg2kyF4_.js} +1 -1
- package/dist/chunks/{variable-draft-DJrfUyhv.js → variable-draft-CRbSYdB6.js} +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- 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/brand-studio/brand-studio-draft.d.ts +45 -13
- package/dist/types/brand-studio/brand-studio-editor.d.ts +13 -2
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +17 -6
- package/dist/types/components/visual/data-table/types/data-table.d.ts +52 -42
- package/dist/types/index.js +1 -1
- package/dist/types/lib/appearance/aliases.d.ts +3 -0
- package/dist/types/lib/appearance/index.d.ts +1 -0
- package/dist/types/lib/appearance/table-density.d.ts +18 -0
- package/dist/types/lib/appearance/types.d.ts +39 -1
- package/dist/types/lib/dashboard-viewer/column-header-actions.d.ts +100 -0
- package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +0 -27
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +26 -2
- package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +2 -0
- package/dist/types/lib/hooks/use-add-new-frame.d.ts +7 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +8 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +14 -2
- package/dist/types/lib/stores/explorer-actions.d.ts +0 -4
- package/dist/types/lib/types/common-types.d.ts +1 -2
- package/dist/types/lib/utils/card-config-utils.d.ts +13 -0
- package/dist/types/lib/utils/field-placement.d.ts +17 -0
- package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +21 -1
- package/dist/types/shared/analytics-protocol/field-provenance.d.ts +7 -4
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +48 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +2 -8
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-display-values.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/card-settings/table-viewer-switches.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +132 -3
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +10 -1
- package/dist/types/shared/dashboard-authoring/field-aggregations.d.ts +9 -2
- package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +8 -7
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +7 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +6 -2
- package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +36 -0
- package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +140 -0
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +15 -0
- package/dist/types/shared/dashboard-viewer/table-settings.d.ts +8 -2
- package/dist/types/shared/format-utils/types/format-types.d.ts +1 -1
- package/dist/usage-events/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/appearance-context-BqBZrijL.js +0 -1
- package/dist/chunks/appearance-runtime-provider-DmbCrOOG.js +0 -1
- package/dist/chunks/bookmark-state-69YYnRql.js +0 -1
- package/dist/chunks/brand-DCaZyRt6.js +0 -1
- package/dist/chunks/card-filter-builder-CTp6RAz1.js +0 -17
- package/dist/chunks/comparison-window-caption-C312mn3s.js +0 -1
- package/dist/chunks/dashboard-BX28ld6s.js +0 -1
- package/dist/chunks/dashboard-briefing-launcher-qo7GH4EO.js +0 -37
- package/dist/chunks/dashboard-controls-DhRjB7MA.js +0 -42
- package/dist/chunks/dashboard-json-9cHzhSjC.js +0 -1
- package/dist/chunks/dates-D-KP8G-z.js +0 -1
- package/dist/chunks/edit-DEAK0UZo.js +0 -1
- package/dist/chunks/edit-dashboard-visual-Duq_QkB_.js +0 -93
- package/dist/chunks/filter-line-CwQrqORc.js +0 -1
- package/dist/chunks/filter-reach-preview-gixPFlZj.js +0 -1
- package/dist/chunks/filter-value-text-B3tXakhd.js +0 -1
- package/dist/chunks/index-B-VF1ogs.js +0 -1
- package/dist/chunks/matrix-analytical-definition-CtFqWyCK.js +0 -1
- package/dist/chunks/matrix-member-presentation-Q0MCJ-YK.js +0 -1
- package/dist/chunks/matrix-operation-contract-D1RC1bfi.js +0 -1
- package/dist/chunks/metric-comparison-DEZYXROZ.js +0 -1
- package/dist/chunks/paintbrush-BjS3SbrH.js +0 -6
- package/dist/chunks/pickers-DuBrUht0.js +0 -1
- package/dist/chunks/pivot-result-contract-expectations-DTQAgr4n.js +0 -1
- package/dist/chunks/pivot-result-identity-DTNCB--h.js +0 -1
- package/dist/chunks/report-preferences-dialog-B_gUmCzG.js +0 -1
- package/dist/chunks/resolve-dashboard-input-context-B-TtRqxu.js +0 -8
- package/dist/chunks/resolver-AN9ChBfZ.js +0 -1
- package/dist/chunks/save-DdFUZcbi.js +0 -6
- package/dist/chunks/saved-dashboard-context-BAJ5tWiq.js +0 -1
- package/dist/chunks/schema-MC0cQSAb.js +0 -4
- package/dist/chunks/semaphor-ready-indicator-DzjorP3t.js +0 -999
- package/dist/chunks/set-DuJfGkbY.js +0 -1
- package/dist/chunks/shelf-drop-preview-context-BlLJ5RsT.js +0 -6
- package/dist/chunks/stored-dashboard-Ctcpkllg.js +0 -1
- package/dist/chunks/style-sheet-parts-BRGt9O05.js +0 -178
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as g}from"react/jsx-runtime";import{createContext as A,useContext as C,useId as P,useMemo as l,useState as _,useEffect as v}from"react";import{S as b,c as M,a as z}from"./schema-O1Y3WTGF.js";import{b as E}from"./resolver-CjsW8Rz0.js";const O={theme:"system",setTheme:()=>null},L=A(O);function H(e,o="system"){return I(e)?e:o;}function I(e){return e==="light"||e==="dark"||e==="system";}const j={background:"--semaphor-background",foreground:"--semaphor-foreground",muted:"--semaphor-muted",mutedForeground:"--semaphor-muted-foreground",border:"--semaphor-border",input:"--semaphor-input",primary:"--semaphor-primary",primaryForeground:"--semaphor-primary-foreground",accent:"--semaphor-accent",accentForeground:"--semaphor-accent-foreground",selection:"--semaphor-selection",card:"--semaphor-card",cardForeground:"--semaphor-card-foreground",positive:"--semaphor-positive",negative:"--semaphor-negative",warning:"--semaphor-warning",info:"--semaphor-info",destructive:"--semaphor-destructive",destructiveForeground:"--semaphor-destructive-foreground",link:"--semaphor-link"},D={light:{"--semaphor-code-string":"158 64% 22%","--semaphor-code-number":"158 64% 22%","--semaphor-code-boolean":"158 64% 22%","--semaphor-code-fn":"217 91% 40%","--semaphor-code-keyword":"263 70% 42%"},dark:{"--semaphor-code-string":"158 64% 52%","--semaphor-code-number":"158 64% 52%","--semaphor-code-boolean":"158 64% 52%","--semaphor-code-fn":"213 94% 68%","--semaphor-code-keyword":"264 89% 74%"}};function T(e){var a,c,d,p;const o=e.defaults??b,s=e.mode??q(e.spec.mode,e.systemMode),n=k(e.spec.schemes[s]??o.schemes[s]),r=((a=n.tokens)==null?void 0:a.color)??{},t={...D[s]};for(const[f,i]of Object.entries(j)){const u=r[f];if(!u)continue;const h=M(u);if(!h)throw new Error(`Invalid compiled appearance color for ${f}`);t[i]=h;}W(t,(c=n.tokens)==null?void 0:c.radius),Z(t,(d=n.tokens)==null?void 0:d.typography);const m=U(n,o.schemes[s],s);return{mode:s,scheme:n,cssVariables:t,colorValues:r,chartPalette:m.palette,chartTheme:m,table:(p=n.components)==null?void 0:p.table};}const N={light:{background:"#fff",title:"#000",body:"#000",footer:"#999",border:"rgb(128,131,139)",cornerRadius:4},dark:{background:"#000",title:"#fff",body:"#fff",footer:"#999",border:"rgb(128,131,139)",cornerRadius:2}},$=2;function U(e,o,s){var a,c,d,p,f,i,u;const n=(a=e.components)==null?void 0:a.chart,r=(c=e.tokens)==null?void 0:c.typography,t=(d=o.tokens)==null?void 0:d.typography,m=(r==null?void 0:r.baseFontSize)??(t==null?void 0:t.baseFontSize)??14;return{mode:s,palette:(n==null?void 0:n.palette)??((f=(p=o.components)==null?void 0:p.chart)==null?void 0:f.palette)??z,font:{family:(r==null?void 0:r.fontFamily)??(t==null?void 0:t.fontFamily)??"",size:m-$},gridColor:n==null?void 0:n.gridColor,axisColor:(n==null?void 0:n.axisColor)??(n==null?void 0:n.foreground),legendColor:n==null?void 0:n.foreground,tooltip:N[s],barRadius:(n==null?void 0:n.barRadius)??((u=(i=o.components)==null?void 0:i.chart)==null?void 0:u.barRadius)??0};}function Z(e,o){o!=null&&o.fontFamily&&(e["--semaphor-font-family"]=o.fontFamily),o!=null&&o.headingFontFamily&&(e["--semaphor-heading-font-family"]=o.headingFontFamily),o!=null&&o.monoFontFamily&&(e["--semaphor-mono-font-family"]=o.monoFontFamily),(o==null?void 0:o.baseFontSize)!==void 0&&(e["--semaphor-font-size"]=`${o.baseFontSize}px`);}function W(e,o){e["--semaphor-brand"]=e["--semaphor-primary"]??e["--semaphor-foreground"],e["--semaphor-secondary"]=e["--semaphor-accent"]??e["--semaphor-muted"],e["--semaphor-secondary-foreground"]=e["--semaphor-accent-foreground"]??e["--semaphor-foreground"],e["--semaphor-popover"]=e["--semaphor-card"]??e["--semaphor-background"],e["--semaphor-popover-foreground"]=e["--semaphor-card-foreground"]??e["--semaphor-foreground"],e["--semaphor-ring"]=e["--semaphor-primary"]??e["--semaphor-foreground"];const s=F((o==null?void 0:o.control)??5),n=F((o==null?void 0:o.card)??(o==null?void 0:o.control)??5);e["--semaphor-radius"]=s,e["--semaphor-control-radius"]=s,e["--semaphor-card-radius"]=n;}const S={none:"none",subtle:"0 1px 2px 0 rgb(0 0 0 / 0.05)",raised:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"};function k(e,o,s){return typeof e=="string"?(o==="shadow"||s==="shadow")&&e in S?S[e]:e:typeof e!="object"||e===null||Array.isArray(e)?e:Object.fromEntries(Object.entries(e).map(([n,r])=>[n,k(r,n,o)]));}function F(e){return`${Number((e/16).toFixed(4))}rem`;}function q(e,o="light"){return e==="system"?o:e;}const B=T({spec:E(),mode:"light"}),R=A(w("semaphor-default-appearance",B));function ne(){return C(R);}function w(e,o,s={}){return{instanceId:e,compiledAppearance:o,layers:s,scopeProps:G(e,o),portalSnapshot:{instanceId:e,compiledAppearance:o}};}function G(e,o){return{className:o.mode,style:J(o),"data-semaphor-theme":o.mode,"data-semaphor-appearance-instance":e};}function J(e){var t,m;const o={colorScheme:e.mode};e.cssVariables["--semaphor-font-family"]&&(o.fontFamily="var(--semaphor-font-family)");const n=(t=e.scheme.tokens)==null?void 0:t.typography,r=(m=b.schemes[e.mode].tokens)==null?void 0:m.typography;(n==null?void 0:n.baseFontSize)!==void 0&&n.baseFontSize!==(r==null?void 0:r.baseFontSize)&&(o.fontSize=n.baseFontSize);for(const[a,c]of Object.entries(e.cssVariables))o[a]=c;return o;}function re(e){return/* @__PURE__ */g(K,{...e});}function K({appearance:e,organizationAppearance:o,dashboardStyle:s,tokenAppearance:n,reactAppearance:r,resolvedAppearance:t,systemMode:m,children:a}){const c=P(),d=l(()=>X(c),[c]),{theme:p}=C(L),f=Y(p),i=l(()=>({organizationAppearance:o,dashboardStyle:s,tokenAppearance:n,reactAppearance:r??e}),[e,s,o,r,n]),u=l(()=>t??E(i),[i,t]),h=l(()=>T({spec:u,systemMode:m??f}),[u,f,m]),x=l(()=>w(d,h,i),[h,d,i]);return/* @__PURE__ */g(R.Provider,{value:x,children:a});}function X(e){return`semaphor-appearance-${e.replace(/[^a-zA-Z0-9_-]/g,"")}`;}function Y(e){const o=H(e),[s,n]=_(()=>y());return v(()=>{var m,a;if(o!=="system"||typeof window>"u")return;const r=(m=window.matchMedia)==null?void 0:m.call(window,"(prefers-color-scheme: dark)");if(!r)return;const t=()=>{n(r.matches?"dark":"light");};return t(),typeof r.addEventListener=="function"?(r.addEventListener("change",t),()=>r.removeEventListener("change",t)):((a=r.addListener)==null||a.call(r,t),()=>{var c;return(c=r.removeListener)==null?void 0:c.call(r,t);});},[o]),o==="system"?s:o;}function y(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";}export{re as A,K as I,L as T,S as a,T as c,H as n,ne as u};
|