semiotic 3.7.4 → 3.7.5
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/CLAUDE.md +10 -7
- package/README.md +36 -19
- package/ai/schema.json +221 -1
- package/ai/system-prompt.md +2 -1
- package/dist/components/Annotation.d.ts +4 -0
- package/dist/components/DataSummaryContext.d.ts +1 -0
- package/dist/components/ai/chartCapabilityTypes.d.ts +16 -0
- package/dist/components/ai/dataPitfallsBridge.d.ts +101 -0
- package/dist/components/ai/dataQualityBridge.d.ts +201 -0
- package/dist/components/ai/describeChart.d.ts +2 -0
- package/dist/components/ai/generativeChart.d.ts +145 -0
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +14 -1
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +7 -0
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +21 -0
- package/dist/components/charts/realtime/aggregate.d.ts +51 -0
- package/dist/components/charts/realtime/eventTime.d.ts +26 -0
- package/dist/components/charts/shared/colorPalettes.d.ts +2 -0
- package/dist/components/charts/shared/colorUtils.d.ts +1 -12
- package/dist/components/charts/shared/minMax.d.ts +3 -0
- package/dist/components/charts/shared/radialGeometry.d.ts +0 -18
- package/dist/components/charts/shared/smartTooltip.d.ts +27 -0
- package/dist/components/charts/shared/statisticalOverlays.d.ts +35 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +2 -0
- package/dist/components/charts/shared/useChartSetup.d.ts +1 -1
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +1 -1
- package/dist/components/charts/shared/validateChartData.d.ts +1 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +9 -0
- package/dist/components/data/fromArrow.d.ts +54 -0
- package/dist/components/data/fromMermaid.d.ts +47 -0
- package/dist/components/data/fromObservablePlot.d.ts +69 -0
- package/dist/components/data/portability/index.d.ts +14 -0
- package/dist/components/data/portability/spec.d.ts +129 -0
- package/dist/components/data/portability/vegaLite.d.ts +62 -0
- package/dist/components/realtime/ReorderBuffer.d.ts +54 -0
- package/dist/components/realtime/RunningStats.d.ts +66 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +105 -0
- package/dist/components/realtime/parseWindowDuration.d.ts +12 -0
- package/dist/components/recipes/customTooltip.d.ts +31 -0
- package/dist/components/recipes/gofish.d.ts +207 -0
- package/dist/components/recipes/gofishBoba.d.ts +23 -0
- package/dist/components/recipes/gofishIR.d.ts +169 -0
- package/dist/components/recipes/gofishIRExamples.d.ts +89 -0
- package/dist/components/recipes/gofishInterpreter.d.ts +52 -0
- package/dist/components/recipes/gofishLambdas.d.ts +145 -0
- package/dist/components/recipes/mermaidDag.d.ts +44 -0
- package/dist/components/recipes/packedClusterMatrix.d.ts +166 -0
- package/dist/components/recipes/recipeChrome.d.ts +100 -0
- package/dist/components/recipes/recipeLegend.d.ts +57 -0
- package/dist/components/recipes/recipeUtils.d.ts +105 -0
- package/dist/components/semiotic-ai.d.ts +6 -0
- package/dist/components/semiotic-data.d.ts +2 -0
- package/dist/components/semiotic-experimental.d.ts +20 -0
- package/dist/components/semiotic-network.d.ts +3 -1
- package/dist/components/semiotic-ordinal.d.ts +2 -0
- package/dist/components/semiotic-realtime.d.ts +9 -1
- package/dist/components/semiotic-recipes.d.ts +18 -1
- package/dist/components/semiotic-themes.d.ts +2 -0
- package/dist/components/semiotic-xy.d.ts +2 -0
- package/dist/components/semiotic.d.ts +4 -0
- package/dist/components/store/ObservationStore.d.ts +21 -2
- package/dist/components/store/SelectionStore.d.ts +1 -1
- package/dist/components/store/ThemeStore.d.ts +1 -1
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/createStore.d.ts +1 -1
- package/dist/components/store/designTokens.d.ts +15 -0
- package/dist/components/stream/NetworkHtmlMarksLayer.d.ts +44 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +32 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +12 -0
- package/dist/components/stream/OrdinalPipelineStore.d.ts +18 -0
- package/dist/components/stream/PipelineStore.d.ts +27 -0
- package/dist/components/stream/SceneGraph.d.ts +5 -1
- package/dist/components/stream/customLayout.d.ts +20 -0
- package/dist/components/stream/customLayoutDiagnostics.d.ts +11 -0
- package/dist/components/stream/customLayoutSelection.d.ts +52 -0
- package/dist/components/stream/networkCustomLayout.d.ts +66 -1
- package/dist/components/stream/networkTypes.d.ts +29 -1
- package/dist/components/stream/ordinalCustomLayout.d.ts +17 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -0
- package/dist/components/stream/ordinalTypes.d.ts +19 -3
- package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +2 -0
- package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +2 -0
- package/dist/components/stream/stalenessBands.d.ts +28 -0
- package/dist/components/stream/symbolPath.d.ts +24 -0
- package/dist/components/stream/types.d.ts +72 -3
- package/dist/components/stream/useStalenessCheck.d.ts +6 -1
- package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +5 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-semiotic-ai-u954ylUn.js +2 -0
- package/dist/semiotic-ai-statisticalOverlays-CU7jW05Q.js +1 -0
- package/dist/semiotic-ai.d.ts +6 -0
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-data.d.ts +2 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +20 -0
- package/dist/semiotic-experimental.min.js +1 -0
- package/dist/semiotic-experimental.module.min.js +1 -0
- package/dist/semiotic-network.d.ts +3 -1
- package/dist/semiotic-ordinal.d.ts +2 -0
- package/dist/semiotic-realtime.d.ts +9 -1
- package/dist/semiotic-recipes.d.ts +18 -1
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-semiotic-BmrYbi99.js +2 -0
- package/dist/semiotic-statisticalOverlays-IjZw8Lsu.js +1 -0
- package/dist/semiotic-themes.d.ts +2 -0
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +2 -0
- package/dist/semiotic.d.ts +4 -0
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy-semiotic-xy-Dufu3D0-.js +2 -0
- package/dist/xy-statisticalOverlays-3Ni9bRph.js +1 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +11 -3
- package/dist/semiotic-ai-statisticalOverlays-C2PPlmXv.js +0 -1
- package/dist/semiotic-statisticalOverlays-C3DsOgr_.js +0 -1
- package/dist/xy-statisticalOverlays-C2PPlmXv.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,a as n}from"./xy-semiotic-xy-Dufu3D0-.js";import"react/jsx-runtime";import"react";import"d3-selection";import"d3-brush";import"d3-scale";import"d3-quadtree";import"d3-shape";import"d3-array";import"d3-hierarchy";import"regression";function e(t,n=.5){const e=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!e)return t;const o=Math.round(parseInt(e[1],16)*(1-n)),a=Math.round(parseInt(e[2],16)*(1-n)),s=Math.round(parseInt(e[3],16)*(1-n));return`#${o.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}function o(t,n=.5){const e=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!e)return t;const o=Math.round(parseInt(e[1],16)+(255-parseInt(e[1],16))*n),a=Math.round(parseInt(e[2],16)+(255-parseInt(e[2],16))*n),s=Math.round(parseInt(e[3],16)+(255-parseInt(e[3],16))*n);return`#${o.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}const a="__forecastSegment",s="__forecastOpacity";function r(n,e,o,a){var r,i;const l=e.uncertaintyOpacity,c=e.confidenceAccessor;if(!l&&!c)return;const f="object"==typeof l?l:{},u=null!==(r=f.min)&&void 0!==r?r:.15,p=null!==(i=f.max)&&void 0!==i?i:1;if(c){const t="function"==typeof c?c:t=>t[c];for(const e of n){const n=t(e);null!=n&&Number.isFinite(n)&&(e[s]=u+Math.max(0,Math.min(1,n))*(p-u))}return}const h=n.map(t=>{const n=o(t),e=a(t);return null!=n&&null!=e&&Number.isFinite(n)&&Number.isFinite(e)?Math.abs(n-e):NaN}),d=h.filter(t=>Number.isFinite(t));if(0===d.length)return;const[y,g]=t(d),b=g-y;n.forEach((t,n)=>{const e=h[n];Number.isFinite(e)&&(t[s]=p-(b>0?(e-y)/b:0)*(p-u))})}function i(t,n){return"function"==typeof n?n(t):!!t[n]}function l(t){var n,e,o;return[{type:"anomaly-band",threshold:null!==(n=t.threshold)&&void 0!==n?n:2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:null!==(e=t.bandOpacity)&&void 0!==e?e:.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:null!==(o=t.anomalyRadius)&&void 0!==o?o:6,label:t.label}]}function c(t,e,o,s,l){return(c=s).isTraining||c.isForecast||c.isAnomaly||c.upperBounds||c.lowerBounds?function(t,n,e,o,s){var l,c,f,u;const{isTraining:p,isForecast:h,isAnomaly:d,upperBounds:y,lowerBounds:g,color:b="#6366f1",bandOpacity:m=.15,anomalyColor:O="#ef4444",anomalyRadius:j=6,label:v}=o,_=t.map(t=>{let n="observed";return h&&i(t,h)?n="forecast":p&&i(t,p)&&(n="training"),Object.assign(Object.assign({},t),{[a]:n})}),k=o._groupBy,w=[];if(k){const t=new Map;for(const n of _){const e=null!==(l=n[k])&&void 0!==l?l:"__default";t.has(e)||t.set(e,[]),t.get(e).push(n)}const n=[];for(const[,e]of t)for(let t=0;e.length-1>t;t++)e[t][a]!==e[t+1][a]&&(n.push(Object.assign(Object.assign({},e[t+1]),{[a]:e[t][a]})),n.push(Object.assign(Object.assign({},e[t]),{[a]:e[t+1][a]})));w.push(..._,...n)}else for(let t=0;_.length>t;t++)w.push(_[t]),_.length-1>t&&_[t][a]!==_[t+1][a]&&(w.push(Object.assign(Object.assign({},_[t+1]),{[a]:_[t][a]})),w.push(Object.assign(Object.assign({},_[t]),{[a]:_[t+1][a]})));if(o.trainUnderline){const t=[];for(const n of w)"training"===n[a]&&t.push(Object.assign(Object.assign({},n),{[a]:"training-base"}));w.unshift(...t)}const M=[];if(y&&g){const t="string"==typeof y?y:"__envUpper",n="string"==typeof g?g:"__envLower";if("function"==typeof y||"function"==typeof g)for(const e of w)"function"==typeof y&&(e[t]=y(e)),"function"==typeof g&&(e[n]=g(e));M.push({type:"envelope",upperAccessor:t,lowerAccessor:n,fill:b,fillOpacity:m,label:v})}if(o.uncertaintyOpacity||o.confidenceAccessor){const t=y?"function"==typeof y?y:t=>t[y]:()=>{},n=g?"function"==typeof g?g:t=>t[g]:()=>{};r(w.filter(t=>"forecast"===t[a]),o,t,n)}if(d){const t=o.anomalyStyle,n={type:"highlight",filter:t=>i(t,d)};t?(n.style=t,n.r=j):"function"==typeof O?(n.style=t=>{const n=O(t);return{stroke:n,strokeWidth:1.5,fill:n,fillOpacity:.7}},n.r=j):(n.color=O,n.r=j,n.style={stroke:O,strokeWidth:1.5,fill:O,fillOpacity:.7}),M.push(n)}return s&&M.push({type:"anomaly-band",threshold:null!==(c=s.threshold)&&void 0!==c?c:2,showBand:!1!==s.showBand,fill:s.bandColor||"#6366f1",fillOpacity:null!==(f=s.bandOpacity)&&void 0!==f?f:.1,anomalyColor:s.anomalyColor||"#ef4444",anomalyRadius:null!==(u=s.anomalyRadius)&&void 0!==u?u:6,label:s.label}),{processedData:w,annotations:M}}(t,0,0,s,l):function(t,e,o,s,i){var l,c,f;const{trainEnd:u,steps:p=10,confidence:h=.95,color:d="#6366f1",bandOpacity:y=.15,label:g}=s;if(null==u)return{processedData:t,annotations:[]};const b=[],m=[];for(const n of t)n[e]>u?m.push(Object.assign(Object.assign({},n),{[a]:"observed"})):b.push(Object.assign(Object.assign({},n),{[a]:"training"}));const O=b.map(t=>[t[e],t[o]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,n)=>t[0]-n[0]),j=[],v=[];if(O.length>=3){const i=O.length;let l=0,c=0,f=0,u=0;for(const[t,n]of O)l+=t,c+=n,f+=t*t,u+=t*n;const b=i*f-l*l;if(Math.abs(b)>1e-12){const f=(i*u-l*c)/b,m=(c-f*l)/i,_=t=>m+f*t,k=O.map(([t,n])=>n-_(t)).reduce((t,n)=>t+n*n,0),w=Math.sqrt(k/Math.max(i-2,1)),M=O.reduce((t,n)=>t+n[0],0)/i,S=O.reduce((t,n)=>t+Math.pow(n[0]-M,2),0),x=.99>h?.95>h?.9>h?1:1.645:1.96:2.576,B=t.map(t=>t[e]).filter(t=>null!=t&&isFinite(t)),F=n(B),C=O.length>1?(O[i-1][0]-O[0][0])/(i-1):1;for(let t=1;p>=t;t++){const n=F+t*C,s=_(n),r=w*Math.sqrt(1+1/i+(S>0?Math.pow(n-M,2)/S:0))*x;v.push({[e]:n,[o]:s,[a]:"forecast",__forecastUpper:s+r,__forecastLower:s-r})}r(v,s,t=>t.__forecastUpper,t=>t.__forecastLower),j.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:d,fillOpacity:y,label:g})}}j.push({type:"x-threshold",x:u,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),i&&j.push({type:"anomaly-band",threshold:null!==(l=i.threshold)&&void 0!==l?l:2,showBand:!1!==i.showBand,fill:i.bandColor||"#6366f1",fillOpacity:null!==(c=i.bandOpacity)&&void 0!==c?c:.1,anomalyColor:i.anomalyColor||"#ef4444",anomalyRadius:null!==(f=i.anomalyRadius)&&void 0!==f?f:6,label:i.label});const _=[];if(_.push(...b),b.length>0&&m.length>0&&_.push(Object.assign(Object.assign({},b[b.length-1]),{[a]:"observed"})),_.push(...m),v.length>0){const t=m.length>0?m[m.length-1]:b[b.length-1];t&&_.push(Object.assign(Object.assign({},t),{[a]:"forecast"})),_.push(...v)}return{processedData:_,annotations:j}}(t,e,o,s,l);var c}function f(t,n){var r,i;const l=null!==(r=n.trainDasharray)&&void 0!==r?r:"8,4",c=null!==(i=n.forecastDasharray)&&void 0!==i?i:"4,4",f=n.color||"#6366f1",u=n.trainOpacity,p=n.forecastOpacity,h=n.trainStroke,d=n.trainLinecap,y=n.trainUnderline;return n=>{const r=t(n),i=n[a];if("training"===i){let t=r.stroke;return"darken"===h?t=e(r.stroke||"#666",.5):h&&(t=h),Object.assign(Object.assign(Object.assign(Object.assign({},r),{stroke:t,strokeDasharray:l}),d&&{strokeLinecap:d}),null!=u&&{strokeOpacity:u})}if("training-base"===i){let t=r.stroke||"#666";return"lighten"===y&&(t=o(t,.4)),Object.assign(Object.assign({},r),{stroke:t,strokeDasharray:void 0})}if("forecast"===i){const t=n[s],e=null!=t?t:p;return Object.assign(Object.assign(Object.assign({},r),{stroke:f,strokeDasharray:c}),null!=e&&{strokeOpacity:e})}return r}}export{s as FORECAST_OPACITY_FIELD,a as SEGMENT_FIELD,l as buildAnomalyAnnotations,c as buildForecast,f as createSegmentLineStyle,e as darkenColor,o as lightenColor,r as stampForecastOpacity};
|