@motionscript/charts 0.1.0-alpha.5 → 0.1.0-alpha.6

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 (141) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +30 -16
  3. package/dist/bar-chart/bar-chart.d.ts +93 -246
  4. package/dist/bar-chart/bar-chart.d.ts.map +1 -1
  5. package/dist/bar-chart/bar-chart.js +378 -569
  6. package/dist/bar-chart/bar-chart.js.map +1 -1
  7. package/dist/bar-chart/category-axis.d.ts +24 -41
  8. package/dist/bar-chart/category-axis.d.ts.map +1 -1
  9. package/dist/bar-chart/category-axis.js +93 -115
  10. package/dist/bar-chart/category-axis.js.map +1 -1
  11. package/dist/bar-chart/chart-bars.d.ts +36 -70
  12. package/dist/bar-chart/chart-bars.d.ts.map +1 -1
  13. package/dist/bar-chart/chart-bars.js +156 -210
  14. package/dist/bar-chart/chart-bars.js.map +1 -1
  15. package/dist/bar-chart/index.d.ts +2 -2
  16. package/dist/bar-chart/index.d.ts.map +1 -1
  17. package/dist/bar-chart/index.js +1 -1
  18. package/dist/bar-chart/index.js.map +1 -1
  19. package/dist/bar-chart/shared.d.ts +3 -3
  20. package/dist/bar-chart/shared.d.ts.map +1 -1
  21. package/dist/bar-chart/shared.js +3 -3
  22. package/dist/bar-chart/shared.js.map +1 -1
  23. package/dist/browser/chunks/chunk-XROBIRQK.js +2 -0
  24. package/dist/browser/chunks/chunk-XROBIRQK.js.map +7 -0
  25. package/dist/browser/index.js +1 -1
  26. package/dist/browser/index.js.map +3 -3
  27. package/dist/browser/kit.js +1 -1
  28. package/dist/browser/manifest.json +1 -1
  29. package/dist/engine.d.ts +8 -6
  30. package/dist/engine.d.ts.map +1 -1
  31. package/dist/engine.js +8 -6
  32. package/dist/engine.js.map +1 -1
  33. package/dist/kit/cartesian.d.ts +44 -0
  34. package/dist/kit/cartesian.d.ts.map +1 -0
  35. package/dist/kit/cartesian.js +59 -0
  36. package/dist/kit/cartesian.js.map +1 -0
  37. package/dist/kit/chart-border.d.ts +8 -11
  38. package/dist/kit/chart-border.d.ts.map +1 -1
  39. package/dist/kit/chart-border.js +15 -32
  40. package/dist/kit/chart-border.js.map +1 -1
  41. package/dist/kit/chart-canvas.d.ts +23 -21
  42. package/dist/kit/chart-canvas.d.ts.map +1 -1
  43. package/dist/kit/chart-canvas.js +33 -90
  44. package/dist/kit/chart-canvas.js.map +1 -1
  45. package/dist/kit/chart-legend.d.ts +79 -67
  46. package/dist/kit/chart-legend.d.ts.map +1 -1
  47. package/dist/kit/chart-legend.js +129 -154
  48. package/dist/kit/chart-legend.js.map +1 -1
  49. package/dist/kit/entries.d.ts +17 -0
  50. package/dist/kit/entries.d.ts.map +1 -0
  51. package/dist/kit/entries.js +19 -0
  52. package/dist/kit/entries.js.map +1 -0
  53. package/dist/kit/motion.d.ts +48 -0
  54. package/dist/kit/motion.d.ts.map +1 -0
  55. package/dist/kit/motion.js +63 -0
  56. package/dist/kit/motion.js.map +1 -0
  57. package/dist/kit/paints.d.ts +10 -0
  58. package/dist/kit/paints.d.ts.map +1 -0
  59. package/dist/kit/paints.js +12 -0
  60. package/dist/kit/paints.js.map +1 -0
  61. package/dist/kit/shared.d.ts +31 -3
  62. package/dist/kit/shared.d.ts.map +1 -1
  63. package/dist/kit/shared.js +42 -3
  64. package/dist/kit/shared.js.map +1 -1
  65. package/dist/kit/vertical-axis.d.ts +36 -61
  66. package/dist/kit/vertical-axis.d.ts.map +1 -1
  67. package/dist/kit/vertical-axis.js +97 -132
  68. package/dist/kit/vertical-axis.js.map +1 -1
  69. package/dist/line-chart/chart-line.d.ts +25 -51
  70. package/dist/line-chart/chart-line.d.ts.map +1 -1
  71. package/dist/line-chart/chart-line.js +89 -120
  72. package/dist/line-chart/chart-line.js.map +1 -1
  73. package/dist/line-chart/chart-region.d.ts +14 -14
  74. package/dist/line-chart/chart-region.d.ts.map +1 -1
  75. package/dist/line-chart/chart-region.js +26 -64
  76. package/dist/line-chart/chart-region.js.map +1 -1
  77. package/dist/line-chart/horizontal-axis.d.ts +32 -56
  78. package/dist/line-chart/horizontal-axis.d.ts.map +1 -1
  79. package/dist/line-chart/horizontal-axis.js +85 -123
  80. package/dist/line-chart/horizontal-axis.js.map +1 -1
  81. package/dist/line-chart/index.d.ts +2 -2
  82. package/dist/line-chart/index.d.ts.map +1 -1
  83. package/dist/line-chart/index.js +1 -1
  84. package/dist/line-chart/index.js.map +1 -1
  85. package/dist/line-chart/line-chart.d.ts +111 -319
  86. package/dist/line-chart/line-chart.d.ts.map +1 -1
  87. package/dist/line-chart/line-chart.js +403 -663
  88. package/dist/line-chart/line-chart.js.map +1 -1
  89. package/dist/line-chart/shared.d.ts +3 -3
  90. package/dist/line-chart/shared.d.ts.map +1 -1
  91. package/dist/line-chart/shared.js +3 -3
  92. package/dist/line-chart/shared.js.map +1 -1
  93. package/dist/nodes.d.ts +6 -9
  94. package/dist/nodes.d.ts.map +1 -1
  95. package/dist/nodes.js +7 -9
  96. package/dist/nodes.js.map +1 -1
  97. package/dist/pie-chart/index.d.ts +2 -2
  98. package/dist/pie-chart/index.d.ts.map +1 -1
  99. package/dist/pie-chart/index.js +1 -1
  100. package/dist/pie-chart/index.js.map +1 -1
  101. package/dist/pie-chart/pie-chart.d.ts +77 -134
  102. package/dist/pie-chart/pie-chart.d.ts.map +1 -1
  103. package/dist/pie-chart/pie-chart.js +200 -271
  104. package/dist/pie-chart/pie-chart.js.map +1 -1
  105. package/dist/pie-chart/pie-legend.d.ts +54 -31
  106. package/dist/pie-chart/pie-legend.d.ts.map +1 -1
  107. package/dist/pie-chart/pie-legend.js +93 -107
  108. package/dist/pie-chart/pie-legend.js.map +1 -1
  109. package/dist/pie-chart/pie-ring.d.ts +142 -131
  110. package/dist/pie-chart/pie-ring.d.ts.map +1 -1
  111. package/dist/pie-chart/pie-ring.js +333 -391
  112. package/dist/pie-chart/pie-ring.js.map +1 -1
  113. package/package.json +4 -4
  114. package/src/bar-chart/bar-chart.ts +415 -701
  115. package/src/bar-chart/category-axis.ts +95 -110
  116. package/src/bar-chart/chart-bars.ts +178 -200
  117. package/src/bar-chart/index.ts +2 -2
  118. package/src/bar-chart/shared.ts +3 -3
  119. package/src/engine.ts +8 -6
  120. package/src/kit/cartesian.ts +81 -0
  121. package/src/kit/chart-border.ts +22 -33
  122. package/src/kit/chart-canvas.ts +44 -79
  123. package/src/kit/chart-legend.ts +173 -189
  124. package/src/kit/entries.ts +20 -0
  125. package/src/kit/motion.ts +90 -0
  126. package/src/kit/paints.ts +15 -0
  127. package/src/kit/shared.ts +52 -3
  128. package/src/kit/vertical-axis.ts +110 -140
  129. package/src/line-chart/chart-line.ts +95 -122
  130. package/src/line-chart/chart-region.ts +30 -59
  131. package/src/line-chart/horizontal-axis.ts +99 -135
  132. package/src/line-chart/index.ts +2 -2
  133. package/src/line-chart/line-chart.ts +449 -825
  134. package/src/line-chart/shared.ts +3 -3
  135. package/src/nodes.ts +8 -10
  136. package/src/pie-chart/index.ts +2 -2
  137. package/src/pie-chart/pie-chart.ts +221 -311
  138. package/src/pie-chart/pie-legend.ts +124 -114
  139. package/src/pie-chart/pie-ring.ts +386 -473
  140. package/dist/browser/chunks/chunk-5ZPBV6BU.js +0 -2
  141. package/dist/browser/chunks/chunk-5ZPBV6BU.js.map +0 -7
@@ -1,2 +0,0 @@
1
- import{fillOps as A,lerpNumber as g,shadowOps as T,strokeOps as h,insetsOps as m,textOps as w}from"@motionscript/sdk";import{niceStep as tt,enterBudget as V}from"@motionscript/sdk/component";function le(t,e){return{label:t?.label??e?.label??"",range:t?.range??e?.range,ticks:t?.ticks??e?.ticks,format:t?.format??e?.format}}function Re(t,e,r){return{label:r<.5?t.label:e.label,range:se(t.range,e.range,r),ticks:ae(t.ticks,e.ticks,r),format:r<.5?t.format:e.format}}function se(t,e,r){return!t||!e?r<.5?t:e:[g(t[0],e[0],r),g(t[1],e[1],r)]}function ae(t,e,r){if(!t||!e)return r<.5?t:e;let i=Math.max(t.length,e.length),o=[];for(let n=0;n<i;n++)o.push(g(t[n]??e[n],e[n]??t[n],r));return o}function Me(t,e){if(e?.range===void 0&&e?.ticks===void 0)return;let r=le(e,t);if(e.ticks===void 0&&e.range!==void 0){let i=Math.max(2,t.ticks?.length??2);r.ticks=fe(e.range,i-1)}return r}var P={plotFill:"#15130e",borderColor:"#4a4036",gridColor:"#2c2820",markerColor:"#8a7f70",regionColor:"#d99a3a"},X=["#d9603b","#8194ad","#e0a93b","#5e9d6b","#9ec85a"],B=.2;function De(t){return t<0?0:t>1?1:t}function Fe(t,e){if(e===void 0)return 0;let r=t[e];return typeof r=="number"&&Number.isFinite(r)?r:0}function Ne(t,e){if(e===void 0||e==="")return"";let r=t[e];return r==null?"":String(r)}function Ie(t,e=[]){if(t.length===0)return[];let r=new Set(e),i=new Set,o=[];for(let n of t)for(let l of Object.keys(n))!r.has(l)&&!i.has(l)&&(i.add(l),o.push(l));return o.filter(n=>{let l=!1;for(let s of t){let d=s[n];if(!(d===void 0||d==="")){if(typeof d!="number")return!1;l=!0}}return l})}var z={fontSize:24,fontWeight:700,textAlign:"center",fill:P.markerColor},W={fontSize:30,fontWeight:600,textAlign:"center",fill:P.markerColor},Y={weight:2,fill:P.gridColor},$={labelStyle:z,titleStyle:W,lineStyle:Y,tickPadding:20,titlePadding:4},L={labelStyle:{...z,fontWeight:500,textAlign:"right"},titleStyle:W,lineStyle:Y,tickPadding:40,titlePadding:24},E={fill:[],stroke:{weight:6,fill:P.borderColor},shadow:[]},H={padding:0,textStyle:{fontSize:30,fontWeight:600,textAlign:"left",fill:P.markerColor},itemGap:44,markerStyle:{width:60,height:24,borderRadius:6,stroke:[],shadow:[]}},Ge=X.map(t=>({weight:4,fill:t})),Ue=X.map(t=>t);function je(t,e){return{labelStyle:w.resolveStyle(t?.labelStyle,e.labelStyle),titleStyle:w.resolveStyle(t?.titleStyle,e.titleStyle),lineStyle:h.resolve(t?.lineStyle??e.lineStyle),tickPadding:m.resolve(t?.tickPadding??e.tickPadding,e.tickPadding),titlePadding:m.resolve(t?.titlePadding??e.titlePadding,e.titlePadding)}}function Ce(t,e,r){return{labelStyle:w.lerpStyle(t.labelStyle,e.labelStyle,r),titleStyle:w.lerpStyle(t.titleStyle,e.titleStyle,r),lineStyle:h.lerp(t.lineStyle,e.lineStyle,r),tickPadding:m.lerp(t.tickPadding,e.tickPadding,r),titlePadding:m.lerp(t.titlePadding,e.titlePadding,r)}}function Xe(t,e){return{fill:A.resolve(t?.fill??e.fill),stroke:h.resolve(t?.stroke??e.stroke),shadow:T.resolve(t?.shadow??e.shadow)}}function Be(t,e,r){return{fill:A.lerp(t.fill,e.fill,r),stroke:h.lerp(t.stroke,e.stroke,r),shadow:T.lerp(t.shadow,e.shadow,r)}}function de(t,e){return{width:t?.width??e.width,height:t?.height??e.height,borderRadius:t?.borderRadius??e.borderRadius,stroke:h.resolve(t?.stroke??e.stroke),shadow:T.resolve(t?.shadow??e.shadow)}}function he(t,e,r){return{width:g(t.width,e.width,r),height:g(t.height,e.height,r),borderRadius:g(t.borderRadius,e.borderRadius,r),stroke:h.lerp(t.stroke,e.stroke,r),shadow:T.lerp(t.shadow,e.shadow,r)}}function ze(t,e){return{padding:m.resolve(t?.padding??e.padding,e.padding),textStyle:w.resolveStyle(t?.textStyle,e.textStyle),itemGap:t?.itemGap??e.itemGap,markerStyle:de(t?.markerStyle,e.markerStyle)}}function We(t,e,r){return{padding:m.lerp(t.padding,e.padding,r),textStyle:w.lerpStyle(t.textStyle,e.textStyle,r),itemGap:g(t.itemGap,e.itemGap,r),markerStyle:he(t.markerStyle,e.markerStyle,r)}}function Ye(t,e){return(t??e).map(r=>h.resolve(r))}function $e(t,e,r){let i=Math.max(t.length,e.length),o=[];for(let n=0;n<i;n++){let l=t[n]??e[n],s=e[n]??t[n];o.push(h.lerp(l,s,r))}return o}function He(t,e){return(t??e).map(r=>A.resolve(r))}function Ke(t,e,r){let i=Math.max(t.length,e.length),o=[];for(let n=0;n<i;n++){let l=t[n]??e[n],s=e[n]??t[n];o.push(A.lerp(l,s,r))}return o}function ce(t,e,r){let i=t.length>0?t[r%t.length]:{weight:4,fill:"white"};if(e.fill==null)return i;let o=h.resolve(i);if(o.length===0)return{weight:4,fill:e.fill};let n=[...o];return n[n.length-1]={...n[n.length-1],fill:A.resolve(e.fill)},n}function Ve(t,e,r){let i=h.resolve(ce(t,e,r));return i[i.length-1]?.fill??"white"}function Je(t,e,r){return e??(t.length===0?"white":t[r%t.length])}function K(t,e){if(Number.isInteger(t))return String(t);let r=Math.max(1,e===void 0?1:pe(e));return t.toFixed(r).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function pe(t){if(!(t>0)||!Number.isFinite(t))return 1;for(let e=0;e<=6;e++){let r=t*10**e;if(Math.abs(r-Math.round(r))<1e-6*Math.max(1,r))return e}return Math.min(6,Math.max(1,Math.ceil(-Math.log10(t))+1))}function Qe(t){let e=[...t].filter(Number.isFinite).sort((i,o)=>i-o),r;for(let i=1;i<e.length;i++){let o=e[i]-e[i-1];o>1e-12&&(r===void 0||o<r)&&(r=o)}return r}function Ze(t){let e=t*100;return Number.isInteger(e)?`${e}%`:`${e.toFixed(1).replace(/\.0$/,"")}%`}function fe([t,e],r){let i=Math.max(2,Math.round(r));return Array.from({length:i+1},(o,n)=>t+(e-t)/i*n)}import{Graphics2D as ge,Node2D as ye,strokeOps as J,property as xe}from"@motionscript/sdk";import{declarePaints as Se}from"@motionscript/sdk/component";var ue=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(n=(o<3?l(n):o>3?l(e,r,n):l(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},N=class extends ye{declareAssets(e){super.declareAssets(e),Se(this,e)}renderSelf(e){let r=this.layoutBounds.width,i=this.layoutBounds.height;r<=0||i<=0||e.draw(new ge().rect({x:0,y:0,width:r,height:i}).stroke(this.stroke))}};ue([xe({default:E.stroke,mapper:J.resolve,tween:J.lerp})],N.prototype,"stroke",void 0);import{Graphics2D as I,Node2D as me,fillOps as Q,shadowOps as Z,strokeOps as R,property as u}from"@motionscript/sdk";import{declarePaints as we}from"@motionscript/sdk/component";var f=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(n=(o<3?l(n):o>3?l(e,r,n):l(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},c=class extends me{declareAssets(e){super.declareAssets(e),we(this,e,{strokes:[this.xGridStroke,this.yGridStroke]})}renderSelf(e){let r=this.layoutBounds.width,i=this.layoutBounds.height;if(r<=0||i<=0)return;e.draw(new I().rect({x:0,y:0,width:r,height:i}).shadow(this.shadow).fill(this.fill));let[o,n]=this.xExtent,[l,s]=this.yExtent,d=a=>n<=o?0:(a-o)/(n-o),k=a=>s<=l?0:(a-l)/(s-l),S=a=>a>1e-6&&a<1-1e-6,b=this.xGridStroke[0];if(b){let a=new I;for(let F of this.xMarkers){let _=d(F);S(_)&&a.rect({x:-r/2+_*r,y:0,width:b.weight,height:i})}e.draw(a.fill(b.fill))}let v=this.yGridStroke[0];if(v){let a=new I;for(let F of this.yMarkers){let _=k(F);S(_)&&a.rect({x:0,y:-i/2+_*i,width:r,height:v.weight})}e.draw(a.fill(v.fill))}}};f([u({default:E.fill,mapper:Q.resolve,tween:Q.lerp})],c.prototype,"fill",void 0);f([u({default:E.shadow,mapper:Z.resolve,tween:Z.lerp})],c.prototype,"shadow",void 0);f([u({default:$.lineStyle,mapper:R.resolve,tween:R.lerp})],c.prototype,"xGridStroke",void 0);f([u({default:L.lineStyle,mapper:R.resolve,tween:R.lerp})],c.prototype,"yGridStroke",void 0);f([u({default:()=>[]})],c.prototype,"xMarkers",void 0);f([u({default:()=>[]})],c.prototype,"yMarkers",void 0);f([u({default:()=>[0,1]})],c.prototype,"xExtent",void 0);f([u({default:()=>[0,1]})],c.prototype,"yExtent",void 0);import{Rect as U,Text as ke,command as C,easeOut as G,property as M,textOps as be}from"@motionscript/sdk";import{drive as ve,hold as _e,together as Ae}from"@motionscript/sdk/component";var y=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(n=(o<3?l(n):o>3?l(e,r,n):l(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},j=class extends U{_shown;constructor(e,r){super(e),this._shown=r}measure(e,r){let i=super.measure(e,r),o=this._shown();return o>=1?i:{...i,width:o*(i.width??0)}}},p=class extends U{items=[];constructor(e){super({...e,flow:"horizontal",align:"center",width:"hug",height:"hug"}),this.set({gap:this.legend.itemGap,padding:this.legend.padding}),this.reveal=this.series.map(r=>r.enabled??!0?1:0),this.items=this.series.map((r,i)=>this.buildItem(r,i));for(let r of this.items)this.add(r)}buildItem(e,r){let i=this.legend.markerStyle,o=new j({flow:"horizontal",gap:12,align:"center",width:"hug",opacity:()=>this.reveal[r]??0,height:"hug",children:[new ke({...be.styleProps(this.legend.textStyle),text:e.label}),new U({width:i.width,height:i.height,cornerRadius:i.borderRadius,fill:this.swatches[r]??"white",stroke:i.stroke,shadow:i.shadow})]},()=>this.reveal[r]??0);return o.set({gapScale:()=>this.reveal[r]??0}),o}isEnabled(e){return(this.reveal[e]??0)>0}showSeries(e){let{index:r=0}=e.data??{};return this.revealTo(r,1,e.duration??.35,e.easing??G())}hideSeries(e){let{index:r=0}=e.data??{};return this.revealTo(r,0,e.duration??.35,e.easing??G())}revealTo(e,r,i,o){if(this.items[e]===void 0)return _e(i);let n=this.reveal[e]??0;return ve(i,l=>{let s=[...this.reveal];s[e]=n+(r-n)*o(l),this.reveal=s})}spotlightSeries(e){let{index:r=0}=e.data??{},i=e.duration??.35,o=e.easing??G();return Ae(...this.items.map((n,l)=>({item:n,i:l})).filter(({i:n})=>this.isEnabled(n)).map(({item:n,i:l})=>n.to({data:{opacity:l===r?1:B},duration:i,easing:o})))}};y([M({default:()=>[]})],p.prototype,"series",void 0);y([M({default:()=>[]})],p.prototype,"swatches",void 0);y([M({default:H})],p.prototype,"legend",void 0);y([M({default:()=>[]})],p.prototype,"reveal",void 0);y([C()],p.prototype,"showSeries",null);y([C()],p.prototype,"hideSeries",null);y([C()],p.prototype,"spotlightSeries",null);import{command as Pe,Node2D as Ee,Rect as q,RotatedBox as Oe,Text as ee,easeOut as Te,property as D,insetsOps as te,textOps as re}from"@motionscript/sdk";import{at as ne,compose as ie}from"@motionscript/sdk/component";var O=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(n=(o<3?l(n):o>3?l(e,r,n):l(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},oe=24,x=class extends Ee{labelFor=K;markerNodes=[];labelNode=null;get sortedMarkers(){return[...this.markers].sort((e,r)=>r-e)}valueAt(e){return this.sortedMarkers[e]}fracAt(e){let r=this.valueAt(e);if(r===void 0)return 0;let[i,o]=this.range;return o<=i?0:(r-i)/(o-i)}constructor(e){super(e);let r=te.resolve(this.axis.tickPadding).right,i=te.resolve(this.axis.titlePadding).right;this.markerNodes=this.markers.map((n,l)=>{let s=new ee({...re.styleProps(this.axis.labelStyle),text:()=>{let d=this.valueAt(l);return d===void 0?"":this.labelFor(d)},y:()=>{let d=this.layoutBounds.height,k=(this.fracAt(l)-.5)*d,S=d/2-s.layoutBounds.height/2;return Math.min(k,S)}});return s});let o=[];this.label!==""&&(this.labelNode=new ee({...re.styleProps(this.axis.titleStyle),text:this.label}),o.push(new Oe({angle:-90,width:"hug",height:"hug",children:this.labelNode}))),o.push(new q({height:"fill",width:"hug",padding:{right:r},children:this.markerNodes})),this.add(new q({flow:"horizontal",gap:i,children:o}))}arm(e=oe){for(let r of this.markerNodes)r.set({opacity:0,x:e});this.labelNode?.set({opacity:0,x:e})}enter(e){let{stagger:r,slide:i=oe}=e.data??{},o=e.easing??Te(),n=this.markerNodes;if(n.length===0)return ie([]);let{step:l,per:s,caption:d}=V(e.duration,n.length,this.labelNode!==null,r);this.arm(i);let k=n.map((b,v)=>{let a=n.length-1-v;return ne(a*l,b.to({data:{opacity:1,x:0},duration:s,easing:o}))}),S=(n.length-1)*l+s;return ie([...k,...this.labelNode?[ne(S,this.labelNode.to({data:{opacity:1,x:0},duration:d,easing:o}))]:[]])}};O([D({default:()=>[0,1]})],x.prototype,"range",void 0);O([D({default:()=>[]})],x.prototype,"markers",void 0);O([D({default:L})],x.prototype,"axis",void 0);O([D({default:""})],x.prototype,"label",void 0);O([Pe()],x.prototype,"enter",null);export*from"@motionscript/sdk/component";export{le as a,Re as b,Me as c,P as d,X as e,B as f,De as g,Fe as h,Ne as i,Ie as j,$ as k,L as l,E as m,H as n,Ge as o,Ue as p,je as q,Ce as r,Xe as s,Be as t,ze as u,We as v,Ye as w,$e as x,He as y,Ke as z,ce as A,Ve as B,Je as C,K as D,Qe as E,Ze as F,fe as G,tt as H,V as I,N as J,c as K,p as L,x as M};
2
- //# sourceMappingURL=chunk-5ZPBV6BU.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/kit/shared.ts", "../../../src/kit/chart-border.ts", "../../../src/kit/chart-canvas.ts", "../../../src/kit/chart-legend.ts", "../../../src/kit/vertical-axis.ts", "../../../src/engine.ts"],
4
- "sourcesContent": ["/**\r\n * The vocabulary every chart node shares: what a *series* is, how an axis is\r\n * scaled and formatted, and the theme leaves each chart's own theme is assembled\r\n * from.\r\n *\r\n * This module exists because the three chart types are three ways of drawing the\r\n * same table. A line chart, a bar chart and a pie chart disagree about almost\r\n * everything visible — polylines against columns against wedges — and agree\r\n * about almost everything underneath: a series is a column with a caption and a\r\n * paint, a marker is a number formatted one way, a legend is a swatch beside a\r\n * label, and a theme is a tree of paints with one mapper and one tween. Writing\r\n * that three times would mean three answers to \"how does a chart round its axis\"\r\n * within one app.\r\n *\r\n * Kept renderer-agnostic (no `Node` imports) so a host's own inspector\r\n * mappings can build a partial theme without pulling the node classes in.\r\n *\r\n * **Two conventions run through every resolver and lerp below**, inherited from\r\n * the shape system's `resolveStroke`/`resolveShadow`:\r\n *\r\n * - A **mapper** merges the author's loose, partial input onto a `previous`\r\n * resolved value and resolves every leaf, so the tween always has resolved\r\n * data to interpolate. It is idempotent.\r\n * - A **tween** interpolates two resolved values leaf by leaf. Categorical\r\n * fields (`fontFamily`, `textAlign`) and fields that are `undefined` on either\r\n * side **step at the midpoint**, because there is no meaningful in-between and\r\n * defaulting the missing side to 0 would animate a font weight down to nothing\r\n * on the way to \"unset\".\r\n */\r\n\r\nimport {\r\n fillOps,\r\n lerpNumber,\r\n shadowOps,\r\n strokeOps,\r\n insetsOps,\r\n textOps,\r\n type DataRecord,\r\n type Fill,\r\n type FillResolved,\r\n type Insets,\r\n type InsetsResolved,\r\n type Shadow,\r\n type ShadowResolved,\r\n type Stroke,\r\n type StrokeResolved,\r\n type TextStyle,\r\n} from \"@motionscript/sdk\"\r\n\r\n/**\r\n * One series of a chart: a column of the table, captioned and painted.\r\n *\r\n * `field` names the column carrying this series' values. What that becomes is\r\n * the chart's business — a traced polyline, a column of bars, a wedge — but the\r\n * three questions asked of it are the same everywhere: which column, what to\r\n * call it, what to paint it, and whether it is currently drawn.\r\n *\r\n * `fill` is an **override**: omit it and the series takes the theme palette's\r\n * entry for its own index, which is what makes a chart nobody has themed come\r\n * out in five distinct colours rather than five identical ones.\r\n */\r\nexport interface ChartSeries {\r\n /** Key into each data row for this series' value. */\r\n field: string\r\n /** Legend caption for this series. */\r\n label: string\r\n /**\r\n * Paint override for this series' mark and its legend swatch. Omit to take\r\n * the theme palette's entry for this series' index.\r\n */\r\n fill?: Fill\r\n /** Whether the series shows by default. Defaults to `true`. */\r\n enabled?: boolean\r\n}\r\n\r\n/** A `[min, max]` numeric range in data units. */\r\nexport type Range = [min: number, max: number]\r\n\r\n/**\r\n * One axis's *data* domain — what it shows — as opposed to {@link AxisConfig},\r\n * which is how it's *styled*. Every field is optional: `range`/`ticks` derive\r\n * from the plotted data when omitted, and `label` defaults to `\"\"`.\r\n */\r\nexport interface AxisDomainConfig {\r\n /** Caption drawn alongside the axis. Pass `\"\"` (the default) to hide it. */\r\n label?: string\r\n /** `[min, max]` of the scale. Derived from the data bounds when omitted. */\r\n range?: Range\r\n /** Tick values (in data units). Derived (five evenly-spaced) when omitted. */\r\n ticks?: number[]\r\n /**\r\n * How a tick value is written down — a `number-format` pattern such as\r\n * `#,##0.00` or `$#,##0`.\r\n *\r\n * Here rather than in {@link AxisConfig} because it is a statement about the\r\n * *numbers*, not about the ink they are set in: `$` on a revenue axis says\r\n * what the column holds, and it has to survive a re-theme. It sits beside\r\n * `range` and `ticks` for the same reason those do.\r\n */\r\n format?: string\r\n}\r\n\r\n/**\r\n * An axis domain's @property mapper: merges the author's partial input onto\r\n * `previous`, so a later partial `.set({ yAxis: {...} })` patches\r\n * `label`/`range`/`ticks` independently. `range`/`ticks` staying `undefined`\r\n * after the merge is the auto-derive signal the scale getters read.\r\n */\r\nexport function resolveAxisDomain(\r\n domain: AxisDomainConfig | undefined,\r\n previous?: AxisDomainConfig\r\n): AxisDomainConfig {\r\n return {\r\n label: domain?.label ?? previous?.label ?? \"\",\r\n range: domain?.range ?? previous?.range,\r\n ticks: domain?.ticks ?? previous?.ticks,\r\n format: domain?.format ?? previous?.format,\r\n }\r\n}\r\n\r\n/**\r\n * An axis domain's @property tween: interpolates `range`/`ticks` numerically\r\n * (pairwise by index for `ticks`), so a `to` command that restates a range\r\n * rescales the plot smoothly. `label`, and either field when one side is in\r\n * auto-derive mode, step at the midpoint.\r\n */\r\nexport function lerpAxisDomain(\r\n from: AxisDomainConfig,\r\n to: AxisDomainConfig,\r\n t: number\r\n): AxisDomainConfig {\r\n return {\r\n label: t < 0.5 ? from.label : to.label,\r\n range: lerpOptionalRange(from.range, to.range, t),\r\n ticks: lerpOptionalTicks(from.ticks, to.ticks, t),\r\n // Steps at the midpoint with the caption, for the same reason: there is no\r\n // halfway between `$#,##0` and `0.0%`.\r\n format: t < 0.5 ? from.format : to.format,\r\n }\r\n}\r\n\r\nfunction lerpOptionalRange(\r\n from: Range | undefined,\r\n to: Range | undefined,\r\n t: number\r\n): Range | undefined {\r\n if (!from || !to) return t < 0.5 ? from : to\r\n return [lerpNumber(from[0], to[0], t), lerpNumber(from[1], to[1], t)]\r\n}\r\n\r\nfunction lerpOptionalTicks(\r\n from: number[] | undefined,\r\n to: number[] | undefined,\r\n t: number\r\n): number[] | undefined {\r\n if (!from || !to) return t < 0.5 ? from : to\r\n const n = Math.max(from.length, to.length)\r\n const out: number[] = []\r\n for (let i = 0; i < n; i++) {\r\n out.push(lerpNumber(from[i] ?? to[i], to[i] ?? from[i], t))\r\n }\r\n return out\r\n}\r\n\r\n/**\r\n * Where a generic `to()` of an axis domain should land, given the domain as it\r\n * is *drawn* (`drawn`, with `range` and `ticks` resolved off the data), or\r\n * `undefined` when the request states neither a `range` nor `ticks` and the\r\n * plain property tween will do.\r\n *\r\n * The stored domain of an auto axis has no `range` and no `ticks`, and\r\n * {@link lerpAxisDomain} steps an unset side at the midpoint, so tweening the\r\n * stored value from an auto axis is a cut. The charts therefore tween between\r\n * resolved domains, as their zoom does; this builds the destination. A `range`\r\n * given without `ticks` keeps the tick *count* the axis already draws, so each\r\n * marker slides from its old value to its new one instead of the row popping.\r\n */\r\nexport function axisTweenTarget(\r\n drawn: AxisDomainConfig,\r\n requested: AxisDomainConfig | undefined\r\n): AxisDomainConfig | undefined {\r\n if (requested?.range === undefined && requested?.ticks === undefined) return undefined\r\n const target = resolveAxisDomain(requested, drawn)\r\n if (requested.ticks === undefined && requested.range !== undefined) {\r\n const count = Math.max(2, drawn.ticks?.length ?? 2)\r\n target.ticks = markerValues(requested.range, count - 1)\r\n }\r\n return target\r\n}\r\n\r\n/**\r\n * The low-level colour tokens the default themes are built from — a dark plot\r\n * panel with warm-grey axis furniture.\r\n */\r\nexport const CHART_PALETTE = {\r\n /** Fill of the plot panel behind the marks. */\r\n plotFill: \"#15130e\",\r\n /** Colour of the plot's thick border. */\r\n borderColor: \"#4a4036\",\r\n /** Colour of the faint grid lines spanning the plot. */\r\n gridColor: \"#2c2820\",\r\n /** Colour of the numeric axis markers, axis captions, and legend labels. */\r\n markerColor: \"#8a7f70\",\r\n /** Colour of a spotlit region's dashed rules and its wash. */\r\n regionColor: \"#d99a3a\",\r\n} as const\r\n\r\n/** The out-of-the-box series palette, cycled by series index. */\r\nexport const DEFAULT_SERIES_COLORS = [\r\n \"#d9603b\",\r\n \"#8194ad\",\r\n \"#e0a93b\",\r\n \"#5e9d6b\",\r\n \"#9ec85a\",\r\n] as const\r\n\r\n/**\r\n * Opacity an *un*-spotlighted series fades to — its mark and its legend entry\r\n * alike, so the two dim together.\r\n */\r\nexport const SPOTLIGHT_DIM = 0.2\r\n\r\n/** Clamp a number into `[0, 1]` — the range every reveal signal here runs in. */\r\nexport function clampUnit(value: number): number {\r\n return value < 0 ? 0 : value > 1 ? 1 : value\r\n}\r\n\r\n// ---- Row readers ---------------------------------------------------------\r\n\r\n/**\r\n * Read a numeric field off a row, defaulting missing, non-numeric and non-finite\r\n * values to 0.\r\n *\r\n * A column left as strings silently plots as 0, which is why the CSV parser's\r\n * numeric auto-coercion matters — a quoted or unit-suffixed column won't plot\r\n * until it's coerced.\r\n */\r\nexport function num(row: DataRecord, field: string | undefined): number {\r\n if (field === undefined) return 0\r\n const v = row[field]\r\n // A `NaN` or infinite cell is no more a measurement than a missing one: read\r\n // as 0, it cannot poison the scale and turn every point into `NaN`.\r\n return typeof v === \"number\" && Number.isFinite(v) ? v : 0\r\n}\r\n\r\n/**\r\n * Read a field off a row as its caption — the counterpart to {@link num} for\r\n * the columns a chart *names* things by rather than measures them by (a bar's\r\n * category, a wedge's slice). A missing cell reads as empty rather than as the\r\n * string `\"undefined\"`.\r\n */\r\nexport function text(row: DataRecord, field: string | undefined): string {\r\n if (field === undefined || field === \"\") return \"\"\r\n const v = row[field]\r\n return v === undefined || v === null ? \"\" : String(v)\r\n}\r\n\r\n/**\r\n * Every column that holds numbers across `data`, in header order, skipping the\r\n * names in `exclude` (typically the category column).\r\n *\r\n * A column counts as numeric only if every non-empty cell in it is a number, so\r\n * a stray text cell leaves the column out rather than plotting zeros. This is\r\n * what lets a chart plot \"every other column\" without the author naming twenty\r\n * fields.\r\n */\r\nexport function numericFields(\r\n data: DataRecord[],\r\n exclude: string[] = []\r\n): string[] {\r\n if (data.length === 0) return []\r\n const skip = new Set(exclude)\r\n const seen = new Set<string>()\r\n const order: string[] = []\r\n for (const row of data)\r\n for (const key of Object.keys(row))\r\n if (!skip.has(key) && !seen.has(key)) {\r\n seen.add(key)\r\n order.push(key)\r\n }\r\n\r\n return order.filter((key) => {\r\n let sawValue = false\r\n for (const row of data) {\r\n const v = row[key]\r\n if (v === undefined || v === \"\") continue\r\n if (typeof v !== \"number\") return false\r\n sawValue = true\r\n }\r\n return sawValue\r\n })\r\n}\r\n\r\n// ---- Theme branches ------------------------------------------------------\r\n\r\n/** One axis's (x or y) style vocabulary. */\r\nexport interface AxisConfig {\r\n /** Style of each marker along the axis. */\r\n labelStyle: TextStyle\r\n /** Style of the axis caption. */\r\n titleStyle: TextStyle\r\n /**\r\n * This axis's direction of the plot's internal grid — weight+fill honoured,\r\n * dash/cap/join ignored (grid lines are drawn as filled rects).\r\n */\r\n lineStyle: Stroke\r\n /**\r\n * Gap between the plot and the marker row. Only the side facing the plot is\r\n * read — `.top` for a horizontal axis, `.right` for a vertical one.\r\n */\r\n tickPadding: Insets\r\n /** Gap between the marker row and the caption, read the same side. */\r\n titlePadding: Insets\r\n}\r\n\r\n/** A legend's per-series colour swatch — a rounded chip, not the caption. */\r\nexport interface LegendMarkerConfig {\r\n width: number\r\n height: number\r\n borderRadius: number\r\n stroke: Stroke\r\n shadow: Shadow\r\n}\r\n\r\n/** A legend's visual theme. */\r\nexport interface LegendConfig {\r\n padding: Insets\r\n /** Caption style — only the swatch carries the series colour. */\r\n textStyle: TextStyle\r\n /** Gap between legend entries. */\r\n itemGap: number\r\n markerStyle: LegendMarkerConfig\r\n}\r\n\r\n/** The plot panel a cartesian chart draws its marks over. */\r\nexport interface PlotAreaConfig {\r\n stroke: Stroke\r\n fill: Fill\r\n shadow: Shadow\r\n}\r\n\r\nconst AXIS_LABEL_STYLE: TextStyle = {\r\n fontSize: 24,\r\n fontWeight: 700,\r\n textAlign: \"center\",\r\n fill: CHART_PALETTE.markerColor,\r\n}\r\nconst AXIS_TITLE_STYLE: TextStyle = {\r\n fontSize: 30,\r\n fontWeight: 600,\r\n textAlign: \"center\",\r\n fill: CHART_PALETTE.markerColor,\r\n}\r\nconst AXIS_LINE_STYLE: Stroke = { weight: 2, fill: CHART_PALETTE.gridColor }\r\n\r\n/** The default styling of a horizontal (marker row beneath the plot) axis. */\r\nexport const DEFAULT_X_AXIS: AxisConfig = {\r\n labelStyle: AXIS_LABEL_STYLE,\r\n titleStyle: AXIS_TITLE_STYLE,\r\n lineStyle: AXIS_LINE_STYLE,\r\n tickPadding: 20,\r\n titlePadding: 4,\r\n}\r\n\r\n/** The default styling of a vertical (marker column beside the plot) axis. */\r\nexport const DEFAULT_Y_AXIS: AxisConfig = {\r\n labelStyle: { ...AXIS_LABEL_STYLE, fontWeight: 500, textAlign: \"right\" },\r\n titleStyle: AXIS_TITLE_STYLE,\r\n lineStyle: AXIS_LINE_STYLE,\r\n tickPadding: 40,\r\n titlePadding: 24,\r\n}\r\n\r\n/**\r\n * The default plot panel: **unpainted**, framed. A chart reads against the\r\n * stage rather than punching a panel into it, which is the look the family was\r\n * designed at.\r\n */\r\nexport const DEFAULT_PLOT_AREA: PlotAreaConfig = {\r\n fill: [],\r\n stroke: { weight: 6, fill: CHART_PALETTE.borderColor },\r\n shadow: [],\r\n}\r\n\r\n/** The default legend styling, shared by every chart that draws one. */\r\nexport const DEFAULT_LEGEND: LegendConfig = {\r\n padding: 0,\r\n textStyle: {\r\n fontSize: 30,\r\n fontWeight: 600,\r\n textAlign: \"left\",\r\n fill: CHART_PALETTE.markerColor,\r\n },\r\n itemGap: 44,\r\n markerStyle: {\r\n width: 60,\r\n height: 24,\r\n borderRadius: 6,\r\n stroke: [],\r\n shadow: [],\r\n },\r\n}\r\n\r\n/** The default per-series stroke palette — {@link DEFAULT_SERIES_COLORS}, drawn 4px. */\r\nexport const DEFAULT_SERIES_STROKES: Stroke[] = DEFAULT_SERIES_COLORS.map(\r\n (fill) => ({ weight: 4, fill })\r\n)\r\n\r\n/** The default per-series fill palette — the same colours, as solid paint. */\r\nexport const DEFAULT_SERIES_FILLS: Fill[] = DEFAULT_SERIES_COLORS.map(\r\n (fill) => fill\r\n)\r\n\r\n// ---- Theme branch resolvers ----------------------------------------------\r\n// Each chart type assembles its own theme out of these, so \"the axis furniture\"\r\n// means one thing across the family and each chart still declares only the\r\n// branches it actually draws.\r\n\r\nexport function resolveAxisConfig(\r\n axis: Partial<AxisConfig> | undefined,\r\n previous: AxisConfig\r\n): AxisConfig {\r\n return {\r\n labelStyle: textOps.resolveStyle(axis?.labelStyle, previous.labelStyle),\r\n titleStyle: textOps.resolveStyle(axis?.titleStyle, previous.titleStyle),\r\n lineStyle: strokeOps.resolve(axis?.lineStyle ?? previous.lineStyle),\r\n tickPadding: insetsOps.resolve(\r\n axis?.tickPadding ?? previous.tickPadding,\r\n previous.tickPadding as InsetsResolved\r\n ),\r\n titlePadding: insetsOps.resolve(\r\n axis?.titlePadding ?? previous.titlePadding,\r\n previous.titlePadding as InsetsResolved\r\n ),\r\n }\r\n}\r\n\r\nexport function lerpAxisConfig(\r\n from: AxisConfig,\r\n to: AxisConfig,\r\n t: number\r\n): AxisConfig {\r\n return {\r\n labelStyle: textOps.lerpStyle(from.labelStyle, to.labelStyle, t),\r\n titleStyle: textOps.lerpStyle(from.titleStyle, to.titleStyle, t),\r\n lineStyle: strokeOps.lerp(\r\n from.lineStyle as StrokeResolved[],\r\n to.lineStyle as StrokeResolved[],\r\n t\r\n ),\r\n tickPadding: insetsOps.lerp(\r\n from.tickPadding as InsetsResolved,\r\n to.tickPadding as InsetsResolved,\r\n t\r\n ),\r\n titlePadding: insetsOps.lerp(\r\n from.titlePadding as InsetsResolved,\r\n to.titlePadding as InsetsResolved,\r\n t\r\n ),\r\n }\r\n}\r\n\r\nexport function resolvePlotArea(\r\n plotArea: Partial<PlotAreaConfig> | undefined,\r\n previous: PlotAreaConfig\r\n): PlotAreaConfig {\r\n return {\r\n fill: fillOps.resolve(plotArea?.fill ?? previous.fill),\r\n stroke: strokeOps.resolve(plotArea?.stroke ?? previous.stroke),\r\n shadow: shadowOps.resolve(plotArea?.shadow ?? previous.shadow),\r\n }\r\n}\r\n\r\nexport function lerpPlotArea(\r\n from: PlotAreaConfig,\r\n to: PlotAreaConfig,\r\n t: number\r\n): PlotAreaConfig {\r\n return {\r\n fill: fillOps.lerp(\r\n from.fill as FillResolved[],\r\n to.fill as FillResolved[],\r\n t\r\n ),\r\n stroke: strokeOps.lerp(\r\n from.stroke as StrokeResolved[],\r\n to.stroke as StrokeResolved[],\r\n t\r\n ),\r\n shadow: shadowOps.lerp(\r\n from.shadow as ShadowResolved[],\r\n to.shadow as ShadowResolved[],\r\n t\r\n ),\r\n }\r\n}\r\n\r\nfunction resolveLegendMarkerConfig(\r\n marker: Partial<LegendMarkerConfig> | undefined,\r\n previous: LegendMarkerConfig\r\n): LegendMarkerConfig {\r\n return {\r\n width: marker?.width ?? previous.width,\r\n height: marker?.height ?? previous.height,\r\n borderRadius: marker?.borderRadius ?? previous.borderRadius,\r\n stroke: strokeOps.resolve(marker?.stroke ?? previous.stroke),\r\n shadow: shadowOps.resolve(marker?.shadow ?? previous.shadow),\r\n }\r\n}\r\n\r\nfunction lerpLegendMarkerConfig(\r\n from: LegendMarkerConfig,\r\n to: LegendMarkerConfig,\r\n t: number\r\n): LegendMarkerConfig {\r\n return {\r\n width: lerpNumber(from.width, to.width, t),\r\n height: lerpNumber(from.height, to.height, t),\r\n borderRadius: lerpNumber(from.borderRadius, to.borderRadius, t),\r\n stroke: strokeOps.lerp(\r\n from.stroke as StrokeResolved[],\r\n to.stroke as StrokeResolved[],\r\n t\r\n ),\r\n shadow: shadowOps.lerp(\r\n from.shadow as ShadowResolved[],\r\n to.shadow as ShadowResolved[],\r\n t\r\n ),\r\n }\r\n}\r\n\r\n/** A legend theme as the author may state it — every branch optional. */\r\nexport type LegendTheme = Partial<Omit<LegendConfig, \"markerStyle\">> & {\r\n markerStyle?: Partial<LegendMarkerConfig>\r\n}\r\n\r\nexport function resolveLegendConfig(\r\n legend: LegendTheme | undefined,\r\n previous: LegendConfig\r\n): LegendConfig {\r\n return {\r\n padding: insetsOps.resolve(\r\n legend?.padding ?? previous.padding,\r\n previous.padding as InsetsResolved\r\n ),\r\n textStyle: textOps.resolveStyle(legend?.textStyle, previous.textStyle),\r\n itemGap: legend?.itemGap ?? previous.itemGap,\r\n markerStyle: resolveLegendMarkerConfig(\r\n legend?.markerStyle,\r\n previous.markerStyle\r\n ),\r\n }\r\n}\r\n\r\nexport function lerpLegendConfig(\r\n from: LegendConfig,\r\n to: LegendConfig,\r\n t: number\r\n): LegendConfig {\r\n return {\r\n padding: insetsOps.lerp(\r\n from.padding as InsetsResolved,\r\n to.padding as InsetsResolved,\r\n t\r\n ),\r\n textStyle: textOps.lerpStyle(from.textStyle, to.textStyle, t),\r\n itemGap: lerpNumber(from.itemGap, to.itemGap, t),\r\n markerStyle: lerpLegendMarkerConfig(from.markerStyle, to.markerStyle, t),\r\n }\r\n}\r\n\r\n/** A whole-palette override replaces the previous palette outright. */\r\nexport function resolveSeriesStrokes(\r\n styles: Stroke[] | undefined,\r\n previous: Stroke[]\r\n): Stroke[] {\r\n return (styles ?? previous).map((s) => strokeOps.resolve(s))\r\n}\r\n\r\n/** Pairwise by index; a palette that grows/shrinks holds the longer side's tail. */\r\nexport function lerpSeriesStrokes(\r\n from: Stroke[],\r\n to: Stroke[],\r\n t: number\r\n): Stroke[] {\r\n const n = Math.max(from.length, to.length)\r\n const out: Stroke[] = []\r\n for (let i = 0; i < n; i++) {\r\n const a = (from[i] ?? to[i]) as StrokeResolved[]\r\n const b = (to[i] ?? from[i]) as StrokeResolved[]\r\n out.push(strokeOps.lerp(a, b, t))\r\n }\r\n return out\r\n}\r\n\r\n/** The fill-palette twin of {@link resolveSeriesStrokes}, for filled marks. */\r\nexport function resolveSeriesFills(\r\n fills: Fill[] | undefined,\r\n previous: Fill[]\r\n): Fill[] {\r\n return (fills ?? previous).map((f) => fillOps.resolve(f))\r\n}\r\n\r\n/** The fill-palette twin of {@link lerpSeriesStrokes}. */\r\nexport function lerpSeriesFills(from: Fill[], to: Fill[], t: number): Fill[] {\r\n const n = Math.max(from.length, to.length)\r\n const out: Fill[] = []\r\n for (let i = 0; i < n; i++) {\r\n const a = (from[i] ?? to[i]) as FillResolved[]\r\n const b = (to[i] ?? from[i]) as FillResolved[]\r\n out.push(fillOps.lerp(a, b, t))\r\n }\r\n return out\r\n}\r\n\r\n// ---- Per-series paint ----------------------------------------------------\r\n\r\n/**\r\n * The effective stroke for series `index`: the palette's entry at\r\n * `index % palette.length`, with the series' own `fill`, if set, overriding just\r\n * the last (topmost) layer's colour.\r\n */\r\nexport function resolveSeriesStroke(\r\n palette: Stroke[],\r\n series: ChartSeries,\r\n index: number\r\n): Stroke {\r\n const entry: Stroke =\r\n palette.length > 0\r\n ? palette[index % palette.length]\r\n : { weight: 4, fill: \"white\" }\r\n if (series.fill == null) return entry\r\n const layers = strokeOps.resolve(entry)\r\n if (layers.length === 0) return { weight: 4, fill: series.fill }\r\n const next = [...layers]\r\n next[next.length - 1] = {\r\n ...next[next.length - 1],\r\n fill: fillOps.resolve(series.fill),\r\n }\r\n return next\r\n}\r\n\r\n/**\r\n * The effective *colour* for series `index` — the same colour\r\n * {@link resolveSeriesStroke} draws its line in — for contexts (a legend\r\n * swatch) that only need the fill.\r\n */\r\nexport function resolveSeriesFill(\r\n palette: Stroke[],\r\n series: ChartSeries,\r\n index: number\r\n): Fill {\r\n const layers = strokeOps.resolve(resolveSeriesStroke(palette, series, index))\r\n return layers[layers.length - 1]?.fill ?? \"white\"\r\n}\r\n\r\n/**\r\n * The effective paint for mark `index` of a **filled** chart (a bar, a wedge):\r\n * the series' own `fill` when it carries one, else the palette's entry for its\r\n * index, cycled.\r\n *\r\n * The stroke twin above has to reach inside a stroke to swap one layer's colour;\r\n * a filled mark has no such geometry wrapped around its paint, so an override is\r\n * simply the whole answer.\r\n */\r\nexport function resolvePalettePaint(\r\n palette: Fill[],\r\n override: Fill | undefined,\r\n index: number\r\n): Fill {\r\n if (override != null) return override\r\n if (palette.length === 0) return \"white\"\r\n return palette[index % palette.length]\r\n}\r\n\r\n// ---- Scales and formatting -----------------------------------------------\r\n\r\n\r\n/**\r\n * Format a marker value: integers plain, otherwise trimmed to one decimal, or to\r\n * as many as the axis's tick `step` needs to tell neighbouring ticks apart.\r\n *\r\n * One decimal is the floor, so a step of 0.1 or more reads exactly as it always\r\n * has; a finer step (a unit axis ticked every 0.05) gets two, instead of five\r\n * ticks captioned `0.1 0.1 0.2 0.2 0.3`. Trailing zeros are dropped either way.\r\n */\r\nexport function formatMarker(value: number, step?: number): string {\r\n if (Number.isInteger(value)) return String(value)\r\n const decimals = Math.max(1, step === undefined ? 1 : decimalsFor(step))\r\n return value.toFixed(decimals).replace(/(\\.\\d*?)0+$/, \"$1\").replace(/\\.$/, \"\")\r\n}\r\n\r\n/** Decimal places needed to write `step` exactly, capped at six. */\r\nfunction decimalsFor(step: number): number {\r\n if (!(step > 0) || !Number.isFinite(step)) return 1\r\n for (let d = 0; d <= 6; d++) {\r\n const scaled = step * 10 ** d\r\n if (Math.abs(scaled - Math.round(scaled)) < 1e-6 * Math.max(1, scaled)) return d\r\n }\r\n // An irrational-looking step (a third): as many places as separate the ticks.\r\n return Math.min(6, Math.max(1, Math.ceil(-Math.log10(step)) + 1))\r\n}\r\n\r\n/** The gap between neighbouring tick values, or `undefined` for fewer than two distinct ones. */\r\nexport function markerStep(markers: readonly number[]): number | undefined {\r\n const sorted = [...markers].filter(Number.isFinite).sort((a, b) => a - b)\r\n let step: number | undefined\r\n for (let i = 1; i < sorted.length; i++) {\r\n const gap = sorted[i] - sorted[i - 1]\r\n if (gap > 1e-12 && (step === undefined || gap < step)) step = gap\r\n }\r\n return step\r\n}\r\n\r\n/** Format a fraction in `[0, 1]` as a percentage: integers plain, else one decimal. */\r\nexport function formatPercent(fraction: number): string {\r\n const pct = fraction * 100\r\n if (Number.isInteger(pct)) return `${pct}%`\r\n return `${pct.toFixed(1).replace(/\\.0$/, \"\")}%`\r\n}\r\n\r\n/** `markerCount` evenly-spaced tick values across `[min, max]`, ends inclusive. */\r\nexport function markerValues([min, max]: Range, markerCount: number): number[] {\r\n const n = Math.max(2, Math.round(markerCount))\r\n return Array.from({ length: n + 1 }, (_, i) => min + ((max - min) / n) * i)\r\n}\r\n\r\n// Lifted into the engine, because a graph and a diagram want them too — see\r\n// `@motionscript/sdk/component`. Re-exported so a chart, and anything that\r\n// copied one, still reaches them where it always did.\r\nexport { niceStep, enterBudget } from \"@motionscript/sdk/component\"\r\n", "import {\r\n type AssetScope,\r\n Graphics2D,\r\n Node2D,\r\n strokeOps,\r\n property,\r\n type Node2DProps,\r\n type RenderContext2D,\r\n type Stroke,\r\n} from \"@motionscript/sdk\"\r\n\r\nimport { DEFAULT_PLOT_AREA } from \"./shared\"\r\nimport { declarePaints } from \"@motionscript/sdk/component\"\r\n\r\nexport interface ChartBorderProps extends Node2DProps {\r\n /**\r\n * The plot's thick frame stroke. The stroke resolver's default `align` is\r\n * `'inside'`, so the whole weight sits within the layout box unless the theme\r\n * overrides it.\r\n */\r\n stroke: Stroke\r\n}\r\n\r\n/**\r\n * The thick **frame** around a cartesian chart's plot: an empty rect wearing an\r\n * inside stroke, sized from its allocated `layoutBounds`.\r\n *\r\n * Split out of {@link ChartCanvas} (the filled + gridded backdrop) so it can be\r\n * placed *after* the marks in the tree — the box then frames the plot **over**\r\n * them, so a line or a column running to the edge tucks cleanly under the border\r\n * rather than sitting on top of it.\r\n */\r\nexport class ChartBorder extends Node2D<ChartBorderProps> {\r\n @property({\r\n default: DEFAULT_PLOT_AREA.stroke,\r\n mapper: strokeOps.resolve,\r\n tween: strokeOps.lerp,\r\n })\r\n declare stroke: Stroke\r\n\r\n /**\r\n * This node extends `Node2D` rather than `ShapeNode`, so nothing declares the\r\n * paint props it carries — see {@link declarePaints}.\r\n */\r\n override declareAssets(assets: AssetScope): void {\r\n super.declareAssets(assets)\r\n declarePaints(this, assets)\r\n }\r\n\r\n protected renderSelf(ctx: RenderContext2D): void {\r\n const W = this.layoutBounds.width\r\n const H = this.layoutBounds.height\r\n if (W <= 0 || H <= 0) return\r\n\r\n // Empty rect (no fill) with the themed stroke, so the frame sits over the\r\n // marks but the box interior stays clear.\r\n ctx.draw(\r\n new Graphics2D().rect({ x: 0, y: 0, width: W, height: H }).stroke(this.stroke)\r\n )\r\n }\r\n}\r\n", "import {\r\n type AssetScope,\r\n Graphics2D,\r\n Node2D,\r\n fillOps,\r\n shadowOps,\r\n strokeOps,\r\n property,\r\n type Fill,\r\n type Node2DProps,\r\n type RenderContext2D,\r\n type Shadow,\r\n type Stroke,\r\n type StrokeResolved,\r\n} from \"@motionscript/sdk\"\r\n\r\nimport {\r\n DEFAULT_PLOT_AREA,\r\n DEFAULT_X_AXIS,\r\n DEFAULT_Y_AXIS,\r\n type Range,\r\n} from \"./shared\"\r\nimport { declarePaints } from \"@motionscript/sdk/component\"\r\n\r\nexport interface ChartCanvasProps extends Node2DProps {\r\n /** Fill of the plot panel behind the marks. */\r\n fill: Fill\r\n /** Drop shadow of the panel. Default none. */\r\n shadow: Shadow\r\n /** Stroke of the vertical grid lines (one per {@link xMarkers}). */\r\n xGridStroke: Stroke\r\n /** Stroke of the horizontal grid lines (one per {@link yMarkers}). */\r\n yGridStroke: Stroke\r\n /**\r\n * Data-unit x positions to draw a vertical grid line at — one per horizontal\r\n * axis marker, so a line lands under every marker regardless of spacing.\r\n * Positions at (or past) an {@link xExtent} edge coincide with the border and\r\n * are skipped. Pass an empty list for a chart whose horizontal axis is\r\n * categorical and so has no numeric position to rule at.\r\n */\r\n xMarkers: number[]\r\n /** Data-unit y positions to draw a horizontal grid line at. */\r\n yMarkers: number[]\r\n /** `[min, max]` of the horizontal scale — maps {@link xMarkers} into the panel. */\r\n xExtent: Range\r\n /** `[min, max]` of the vertical scale — maps {@link yMarkers} into the panel. */\r\n yExtent: Range\r\n}\r\n\r\n/**\r\n * The plot **backdrop** of a cartesian chart: a filled panel with a grid of\r\n * faint lines spanning both directions across it. Drawn as one {@link Graphics2D}\r\n * command list, sized from its allocated `layoutBounds` and centred on the node\r\n * origin.\r\n *\r\n * The thick frame is a **separate** {@link ChartBorder} node so it can be drawn\r\n * *over* the marks while this panel sits under them. Grid lines are placed from\r\n * the axis marker positions (in data units) mapped into the panel through\r\n * {@link ChartCanvasProps.xExtent}/`yExtent` — so each line lands under its\r\n * marker whether or not the markers are evenly spaced.\r\n */\r\nexport class ChartCanvas extends Node2D<ChartCanvasProps> {\r\n @property({\r\n default: DEFAULT_PLOT_AREA.fill,\r\n mapper: fillOps.resolve,\r\n tween: fillOps.lerp,\r\n })\r\n declare fill: Fill\r\n @property({\r\n default: DEFAULT_PLOT_AREA.shadow,\r\n mapper: shadowOps.resolve,\r\n tween: shadowOps.lerp,\r\n })\r\n declare shadow: Shadow\r\n @property({\r\n default: DEFAULT_X_AXIS.lineStyle,\r\n mapper: strokeOps.resolve,\r\n tween: strokeOps.lerp,\r\n })\r\n declare xGridStroke: Stroke\r\n @property({\r\n default: DEFAULT_Y_AXIS.lineStyle,\r\n mapper: strokeOps.resolve,\r\n tween: strokeOps.lerp,\r\n })\r\n declare yGridStroke: Stroke\r\n @property({ default: () => [] as number[] }) declare xMarkers: number[]\r\n @property({ default: () => [] as number[] }) declare yMarkers: number[]\r\n @property({ default: () => [0, 1] as Range }) declare xExtent: Range\r\n @property({ default: () => [0, 1] as Range }) declare yExtent: Range\r\n\r\n /**\r\n * This node extends `Node2D` rather than `ShapeNode`, so nothing declares the\r\n * paint props it carries — see {@link declarePaints}. The grid strokes are\r\n * named past the conventional slots, so they are passed explicitly.\r\n */\r\n override declareAssets(assets: AssetScope): void {\r\n super.declareAssets(assets)\r\n declarePaints(this, assets, {\r\n strokes: [this.xGridStroke as StrokeResolved[], this.yGridStroke as StrokeResolved[]],\r\n })\r\n }\r\n\r\n protected renderSelf(ctx: RenderContext2D): void {\r\n const W = this.layoutBounds.width\r\n const H = this.layoutBounds.height\r\n if (W <= 0 || H <= 0) return\r\n\r\n // Plot panel, centred on the origin (node space is y-up, origin centre).\r\n ctx.draw(\r\n new Graphics2D()\r\n .rect({ x: 0, y: 0, width: W, height: H })\r\n .shadow(this.shadow)\r\n .fill(this.fill)\r\n )\r\n\r\n const [xMin, xMax] = this.xExtent\r\n const [yMin, yMax] = this.yExtent\r\n // Fraction of a marker across its extent; guard a zero-width extent.\r\n const xFrac = (v: number) => (xMax <= xMin ? 0 : (v - xMin) / (xMax - xMin))\r\n const yFrac = (v: number) => (yMax <= yMin ? 0 : (v - yMin) / (yMax - yMin))\r\n // Skip markers landing on (or outside) the edges — they'd sit under the border.\r\n const interior = (f: number) => f > 1e-6 && f < 1 - 1e-6\r\n\r\n const xStroke = (this.xGridStroke as StrokeResolved[])[0]\r\n if (xStroke) {\r\n const xGrid = new Graphics2D()\r\n for (const v of this.xMarkers) {\r\n const f = xFrac(v)\r\n if (!interior(f)) continue\r\n xGrid.rect({\r\n x: -W / 2 + f * W,\r\n y: 0,\r\n width: xStroke.weight,\r\n height: H,\r\n })\r\n }\r\n ctx.draw(xGrid.fill(xStroke.fill))\r\n }\r\n\r\n const yStroke = (this.yGridStroke as StrokeResolved[])[0]\r\n if (yStroke) {\r\n const yGrid = new Graphics2D()\r\n for (const v of this.yMarkers) {\r\n const f = yFrac(v)\r\n if (!interior(f)) continue\r\n yGrid.rect({\r\n x: 0,\r\n y: -H / 2 + f * H,\r\n width: W,\r\n height: yStroke.weight,\r\n })\r\n }\r\n ctx.draw(yGrid.fill(yStroke.fill))\r\n }\r\n }\r\n}\r\n", "import {\r\n Rect,\r\n Text,\r\n command,\r\n easeOut,\r\n property,\r\n textOps,\r\n type CommandArgs,\r\n type EasingFunction,\r\n type Fill,\r\n type MeasureContext2D,\r\n type NodeConfig,\r\n type RectProps,\r\n type Size2D,\r\n type SizeConstraints,\r\n} from \"@motionscript/sdk\"\r\n\r\nimport { drive, hold, together, type Seekable } from \"@motionscript/sdk/component\"\r\n\r\nimport {\r\n DEFAULT_LEGEND,\r\n SPOTLIGHT_DIM,\r\n type ChartSeries,\r\n type LegendConfig,\r\n} from \"./shared\"\r\n\r\nexport interface ChartLegendProps extends RectProps {\r\n /**\r\n * One entry per series: legend `label`, its `enabled` default, and — through\r\n * {@link ChartLegendProps.swatches} — the colour its chip is painted. A series\r\n * that starts enabled (the default) is added to the row up front; one that\r\n * starts `false` is hidden until a later {@link ChartLegend.showSeries}.\r\n */\r\n series: ChartSeries[]\r\n /**\r\n * The swatch colour for each series, by index — resolved by the chart, whose\r\n * business it is whether a series' colour comes out of a stroke palette (a\r\n * line) or a fill palette (a bar). Shorter than the series list means the\r\n * missing entries fall back to white.\r\n */\r\n swatches: Fill[]\r\n /** Padding, caption style, gaps, and swatch geometry — see {@link LegendConfig}. */\r\n legend: LegendConfig\r\n}\r\n\r\n/**\r\n * One legend entry. It hugs its caption and swatch; `shown` scales that width from\r\n * nothing to the whole of it.\r\n *\r\n * The width is taken from the content on every measure, at any reveal, so a frame\r\n * never depends on whether the entry was once seen fully shown. A collapse needs a\r\n * number to scale, and `\"hug\"` is not one until something measures it — this is\r\n * the something.\r\n */\r\nclass LegendEntry extends Rect {\r\n constructor(props: NodeConfig<Rect, RectProps>, private readonly _shown: () => number) {\r\n super(props)\r\n }\r\n\r\n override measure(constraints: SizeConstraints, scope: MeasureContext2D): Partial<Size2D> {\r\n const size = super.measure(constraints, scope)\r\n const shown = this._shown()\r\n return shown >= 1 ? size : { ...size, width: shown * (size.width ?? 0) }\r\n }\r\n}\r\n\r\n/**\r\n * The legend of a chart: a **horizontal-flow row of entries**, one per series, laid out\r\n * left-to-right with the theme's `itemGap`. Each entry pairs the series label\r\n * with a rounded colour swatch; only the swatch carries the series colour, the\r\n * caption reads in the legend's neutral ink.\r\n *\r\n * {@link showSeries}/{@link hideSeries} flip a series on or off — showing one\r\n * adds its entry back into the row at its stable series position and grows it\r\n * in, hiding one shrinks it away and removes it. So the row only ever holds the\r\n * currently-enabled series, in series order, and closes the gap when one leaves.\r\n *\r\n * This node *is* the row, so the parent places it (centred below the chart) and\r\n * it hugs its entries.\r\n */\r\nexport class ChartLegend extends Rect {\r\n @property({ default: () => [] as ChartSeries[] }) declare series: ChartSeries[]\r\n @property({ default: () => [] as Fill[] }) declare swatches: Fill[]\r\n @property({ default: DEFAULT_LEGEND }) declare legend: LegendConfig\r\n\r\n /** One entry per series. **Every** entry is a child — see {@link reveal}. */\r\n private items: LegendEntry[] = []\r\n /**\r\n * How far each entry is shown, `0`–`1`. Drives its width, opacity and gap\r\n * together, so `0` is an entry that takes no room and `1` is one at its\r\n * natural size.\r\n *\r\n * This replaces adding and removing the entry from the row, which is what\r\n * `showSeries`/`hideSeries` used to do. That could not be a command: a command\r\n * is asked what it looks like at a time, and \"is this node a child\" is not a\r\n * value a time can produce — the tree either contains it or it doesn't, and\r\n * getting there means having run the add. Collapsed-but-present is the same\r\n * picture reached by a route that *is* a function of `t`.\r\n *\r\n * One array in one slot, because the count is the series count, which is data.\r\n * It is replaced rather than mutated: a write is a slot write, so the timeline\r\n * sees it and restores it to the authored reveal before the command starts\r\n * and after a seek back. The entries' props are bound to it, so writing it\r\n * still moves the layout.\r\n */\r\n @property({ default: () => [] as number[] }) private declare reveal: number[]\r\n\r\n constructor(props?: NodeConfig<ChartLegend, ChartLegendProps>) {\r\n // `flow` after the spread, with the rest of the geometry: this class *is*\r\n // the row, so the direction is its own answer and not the caller's. It has\r\n // to be stated — a `Rect` given no flow lays its children out `freeform`,\r\n // which stacks every entry on the same spot. One series looks perfect that\r\n // way and three look like one smeared caption, so the failure only shows up\r\n // on the charts that most need a legend.\r\n super({\r\n ...(props as RectProps),\r\n flow: \"horizontal\",\r\n align: \"center\",\r\n width: \"hug\",\r\n height: \"hug\",\r\n })\r\n\r\n // Structure is one entry per series, so it's composed here from the resolved\r\n // props super() applied. Fixed row geometry last, so it wins over super().\r\n this.set({ gap: this.legend.itemGap, padding: this.legend.padding })\r\n\r\n this.reveal = this.series.map((s) => ((s.enabled ?? true) ? 1 : 0))\r\n this.items = this.series.map((s, i) => this.buildItem(s, i))\r\n\r\n // All of them, in series order. Order is now fixed rather than depending on\r\n // which siblings happen to be shown, so an entry always comes back where it\r\n // belongs and `insertionIndex` has nothing left to compute.\r\n for (const item of this.items) this.add(item)\r\n }\r\n\r\n /** One entry: the series caption beside its colour swatch. */\r\n private buildItem(series: ChartSeries, index: number): LegendEntry {\r\n const marker = this.legend.markerStyle\r\n const item = new LegendEntry({ flow: \"horizontal\",\r\n gap: 12,\r\n align: \"center\",\r\n // Bound to the reveal, so showing and hiding is a number moving rather\r\n // than a child arriving and leaving. The width follows it in `measure`.\r\n width: \"hug\",\r\n opacity: () => this.reveal[index] ?? 0,\r\n height: \"hug\",\r\n children: [\r\n new Text({\r\n ...textOps.styleProps(this.legend.textStyle),\r\n text: series.label,\r\n }),\r\n new Rect({\r\n width: marker.width,\r\n height: marker.height,\r\n cornerRadius: marker.borderRadius,\r\n fill: this.swatches[index] ?? \"white\",\r\n stroke: marker.stroke,\r\n shadow: marker.shadow,\r\n }),\r\n ],\r\n }, () => this.reveal[index] ?? 0)\r\n // `gapScale` is a `Node` prop rather than a container one, so it is bound here\r\n // instead of in the config. It tracks the reveal so the flanking gap closes\r\n // with the entry rather than snapping when it reaches zero.\r\n item.set({ gapScale: () => this.reveal[index] ?? 0 })\r\n return item\r\n }\r\n\r\n /** True if series `index` is showing at all — see {@link reveal}. */\r\n isEnabled(index: number): boolean {\r\n return (this.reveal[index] ?? 0) > 0\r\n }\r\n\r\n /**\r\n * Grow series `index`'s entry back in at its series-order position, the\r\n * siblings sliding over to make room.\r\n *\r\n * A reveal tween rather than an animated `addChildAt`. The entry never left —\r\n * see {@link reveal} — so there is no add to have happened, and the whole\r\n * thing is a function of `t`.\r\n */\r\n @command()\r\n showSeries(args: CommandArgs<{ index: number }>): Seekable {\r\n const { index = 0 } = args.data ?? {}\r\n return this.revealTo(index, 1, args.duration ?? 0.35, args.easing ?? easeOut())\r\n }\r\n\r\n /**\r\n * Shrink series `index`'s entry away, the gap closing behind it — the mirror\r\n * of {@link showSeries}.\r\n */\r\n @command()\r\n hideSeries(args: CommandArgs<{ index: number }>): Seekable {\r\n const { index = 0 } = args.data ?? {}\r\n return this.revealTo(index, 0, args.duration ?? 0.35, args.easing ?? easeOut())\r\n }\r\n\r\n /**\r\n * Ramp one entry's reveal to `target`.\r\n *\r\n * `from` is read when the command is built, which for a driven scene is with\r\n * the node in the state its own start time implies — so a hide that follows a\r\n * show starts where the show left it rather than at whatever the node happens\r\n * to hold now.\r\n */\r\n private revealTo(\r\n index: number,\r\n target: number,\r\n duration: number,\r\n easing: EasingFunction\r\n ): Seekable {\r\n if (this.items[index] === undefined) return hold(duration)\r\n const from = this.reveal[index] ?? 0\r\n return drive(duration, (t) => {\r\n const next = [...this.reveal]\r\n next[index] = from + (target - from) * easing(t)\r\n this.reveal = next\r\n })\r\n }\r\n\r\n /**\r\n * Dim every entry but series `index` to {@link SPOTLIGHT_DIM} and bring that\r\n * one back to full — the legend half of a chart's `spotlightSeries`. Entries\r\n * stay in place; only their opacity moves, so the row doesn't reflow.\r\n *\r\n * Only the currently-shown entries are touched — a hidden series' entry is\r\n * left as {@link hideSeries} left it.\r\n */\r\n @command()\r\n spotlightSeries(args: CommandArgs<{ index: number }>): Seekable {\r\n const { index = 0 } = args.data ?? {}\r\n const duration = args.duration ?? 0.35\r\n const easing = args.easing ?? easeOut()\r\n // Opacity only, on entries that are already in the row — no membership\r\n // changes, so unlike {@link showSeries} this is a plain function of `t`.\r\n return together(\r\n ...this.items\r\n .map((item, i) => ({ item, i }))\r\n .filter(({ i }) => this.isEnabled(i))\r\n .map(({ item, i }) =>\r\n item.to({ data: { opacity: i === index ? 1 : SPOTLIGHT_DIM }, duration, easing })\r\n )\r\n )\r\n }\r\n}\r\n", "import {\r\n command,\r\n Node2D,\r\n Rect,\r\n RotatedBox,\r\n Text,\r\n easeOut,\r\n property,\r\n insetsOps,\r\n textOps,\r\n type CommandArgs,\r\n type NodeConfig,\r\n type Node2DProps,\r\n} from \"@motionscript/sdk\"\r\n\r\nimport {\r\n DEFAULT_Y_AXIS,\r\n enterBudget,\r\n formatMarker,\r\n type AxisConfig,\r\n type Range,\r\n} from \"./shared\"\r\nimport { at, compose, type Seekable } from \"@motionscript/sdk/component\"\r\n\r\nexport interface VerticalAxisProps extends Node2DProps {\r\n /** `[min, max]` of the vertical scale the markers are positioned within. */\r\n range: Range\r\n /**\r\n * Tick values (in data units) to draw up the axis, each placed by its fraction\r\n * across {@link VerticalAxisProps.range}. Need not be evenly spaced or include\r\n * the ends.\r\n */\r\n markers: number[]\r\n /** Marker/caption text style, grid stroke, and gutters — see {@link AxisConfig}. */\r\n axis: AxisConfig\r\n /**\r\n * Rotated caption drawn in the gutter to the left of the marker column. Empty\r\n * string (the default) hides it — no caption node is built and no label gutter\r\n * is reserved.\r\n */\r\n label: string\r\n}\r\n\r\n/** How far a marker starts to the right of its slot when it enters, in px. */\r\nconst SLIDE = 24\r\n\r\n/** How a tick value is captioned — see {@link VerticalAxis.labelFor}. */\r\nexport type MarkerLabel = (value: number) => string\r\n\r\n/**\r\n * The numeric vertical axis shared by the cartesian charts: a **column of\r\n * {@link Text} nodes**, one per marker value, running top-to-bottom (highest\r\n * value at the top). Pure layout — no `Graphics` — so the markers are real text\r\n * nodes the scene can measure, restyle, or animate individually.\r\n *\r\n * Each marker is positioned so its centre lands exactly on its value's fraction\r\n * across `range` within the axis's filled height, so unevenly-spaced markers\r\n * land where their values fall. Both the caption and the position are *bound*,\r\n * not snapshotted: a chart that rescales its axes (see `LineChart.zoomTo`)\r\n * tweens `range`/`markers` live. Only the marker **count** is fixed at\r\n * construction.\r\n *\r\n * {@link enter} staggers them in **bottom-to-top**: each marker starts pushed a\r\n * little to the right and transparent, then fades and slides left into place.\r\n * The resting state is the landed one, so a chart that is never told to enter\r\n * still reads as a finished chart.\r\n */\r\nexport class VerticalAxis extends Node2D<VerticalAxisProps> {\r\n @property({ default: () => [0, 1] as Range }) declare range: Range\r\n @property({ default: () => [] as number[] }) declare markers: number[]\r\n @property({ default: DEFAULT_Y_AXIS }) declare axis: AxisConfig\r\n @property({ default: \"\" }) declare label: string\r\n\r\n /**\r\n * How a tick value is captioned. Defaults to the bare numeric reading; a\r\n * chart with a number format on this axis replaces it (see `number-format`).\r\n *\r\n * A plain field rather than a `@property`, for the reason the horizontal\r\n * axis's twin spells out: it is a policy, not a value, and there is nothing\r\n * to tween between two formatters.\r\n */\r\n labelFor: MarkerLabel = formatMarker\r\n\r\n /** One text node per marker, ordered top → bottom, for the staggered enter. */\r\n private markerNodes: Text[] = []\r\n /** The caption node, or null when `label` is empty. Entered after the markers. */\r\n private labelNode: Text | null = null\r\n\r\n /** The live tick values, top → bottom (highest first) — re-read every frame. */\r\n private get sortedMarkers(): number[] {\r\n return [...this.markers].sort((a, b) => b - a)\r\n }\r\n\r\n /**\r\n * Tick `i`'s value, or `undefined` once the live `markers` list is shorter\r\n * than the column of text nodes built for it — a slot with no value renders as\r\n * empty text rather than repeating its neighbour.\r\n */\r\n private valueAt(index: number): number | undefined {\r\n return this.sortedMarkers[index]\r\n }\r\n\r\n /** Tick `i`'s fraction across the live `range`, 0 at the bottom edge. */\r\n private fracAt(index: number): number {\r\n const v = this.valueAt(index)\r\n if (v === undefined) return 0\r\n const [min, max] = this.range\r\n return max <= min ? 0 : (v - min) / (max - min)\r\n }\r\n\r\n constructor(props?: NodeConfig<VerticalAxis, VerticalAxisProps>) {\r\n super(props)\r\n\r\n // Composed from plain props (range/markers/label) — no context needed, so\r\n // it's built here. super() applied the props, so the reads below resolve.\r\n const tickPad = insetsOps.resolve(this.axis.tickPadding).right\r\n const titlePad = insetsOps.resolve(this.axis.titlePadding).right\r\n\r\n this.markerNodes = this.markers.map((_, i) => {\r\n const marker: Text = new Text({\r\n ...textOps.styleProps(this.axis.labelStyle),\r\n text: () => {\r\n const v = this.valueAt(i)\r\n return v === undefined ? \"\" : this.labelFor(v)\r\n },\r\n y: () => {\r\n // Node2D space is y-up, so the fraction runs from the bottom.\r\n const height = this.layoutBounds.height\r\n const centred = (this.fracAt(i) - 0.5) * height\r\n // Held inside the axis's top edge — the backstop for a chart whose\r\n // headroom is smaller than its marker text is tall, which a theme with\r\n // much larger markers can arrange. Only the top, because what lies\r\n // below the axis is the chart's own horizontal axis and legend.\r\n const limit = height / 2 - marker.layoutBounds.height / 2\r\n return Math.min(centred, limit)\r\n },\r\n })\r\n return marker\r\n })\r\n\r\n const children: Node2D[] = []\r\n if (this.label !== \"\") {\r\n this.labelNode = new Text({\r\n ...textOps.styleProps(this.axis.titleStyle),\r\n text: this.label,\r\n })\r\n // Node2D space is y-up and rotation is clockwise, so -90° reads bottom-to-top.\r\n children.push(\r\n new RotatedBox({\r\n angle: -90,\r\n width: \"hug\",\r\n height: \"hug\",\r\n children: this.labelNode,\r\n })\r\n )\r\n }\r\n children.push(\r\n new Rect({\r\n height: \"fill\",\r\n width: \"hug\",\r\n padding: { right: tickPad },\r\n children: this.markerNodes,\r\n })\r\n )\r\n\r\n this.add(new Rect({ flow: \"horizontal\", gap: titlePad, children }))\r\n }\r\n\r\n /**\r\n * Primes every marker (and the caption) at its pre-entrance state: shifted\r\n * right and transparent. Idempotent, and separate from {@link enter} so the\r\n * chart can arm its whole composition before the first frame is drawn.\r\n */\r\n arm(slide = SLIDE): void {\r\n for (const marker of this.markerNodes) marker.set({ opacity: 0, x: slide })\r\n this.labelNode?.set({ opacity: 0, x: slide })\r\n }\r\n\r\n /**\r\n * Stagger the markers in bottom to top, then slide the caption in from the\r\n * right after them.\r\n *\r\n * A {@link Seekable} rather than a generator — see the note on the horizontal\r\n * axis's `enter`. The offsets were always static; expressing them as `wait`\r\n * inside a generator is what made them reachable only by running it.\r\n *\r\n * `args.duration` is the **whole** entrance, not one marker's slide: the\r\n * stagger and the caption are carved out of it rather than added on top. See\r\n * {@link enterBudget} for why that distinction matters here.\r\n *\r\n * `args.data.stagger` is seconds between successive markers (derived when\r\n * omitted); `args.data.slide` is the starting rightward offset in px.\r\n */\r\n @command()\r\n enter(args: CommandArgs<{ stagger?: number; slide?: number }> & { duration: number }): Seekable {\r\n const { stagger, slide = SLIDE } = args.data ?? {}\r\n const easing = args.easing ?? easeOut()\r\n const nodes = this.markerNodes\r\n if (nodes.length === 0) return compose([])\r\n const { step, per, caption } = enterBudget(\r\n args.duration,\r\n nodes.length,\r\n this.labelNode !== null,\r\n stagger\r\n )\r\n\r\n this.arm(slide)\r\n\r\n // Bottom marker leads: markerNodes is top → bottom, so walk it in reverse.\r\n const markers = nodes.map((node, i) => {\r\n const order = nodes.length - 1 - i // bottom-most = 0\r\n return at(order * step, node.to({ data: { opacity: 1, x: 0 }, duration: per, easing }))\r\n })\r\n const lastMarkerEnds = (nodes.length - 1) * step + per\r\n\r\n // Once every marker has landed, the caption slides in from the right.\r\n return compose([\r\n ...markers,\r\n ...(this.labelNode\r\n ? [at(lastMarkerEnds, this.labelNode.to({ data: { opacity: 1, x: 0 }, duration: caption, easing }))]\r\n : []),\r\n ])\r\n }\r\n}\r\n", "/**\r\n * The chart **kit**: everything the three charts share, and the one thing a\r\n * copied chart does not copy.\r\n *\r\n * `ms add line-chart` writes `line-chart/*` into your project and rewrites its\r\n * reach for these to `@motionscript/charts`, so the plot panel, the value\r\n * axis, the legend and the number formatting stay a real dependency. That is\r\n * not a size decision — it is the only arrangement that works.\r\n *\r\n * A chart identifies its own parts, and the engine keys signal machinery to\r\n * class identity: `@property` installs against the class it was applied with,\r\n * and the renderer asks `instanceof` about what it is drawing. Copy\r\n * `VerticalAxis` alongside your fork and there are now two of it — two classes\r\n * answering one name, and whichever one your chart did not get renders as\r\n * nothing at all, with no error. Keeping the kit external makes that\r\n * impossible rather than unlikely.\r\n *\r\n * It also means a fix to the axis reaches a forked chart without a re-add,\r\n * which is the half of the bargain you get back for it.\r\n */\r\nexport * from \"./kit/shared\"\r\nexport * from \"./kit/chart-border\"\r\nexport * from \"./kit/chart-canvas\"\r\nexport * from \"./kit/chart-legend\"\r\nexport * from \"./kit/vertical-axis\"\r\nexport * from \"@motionscript/sdk/component\"\r\n"],
5
- "mappings": "AA8BA,OACE,WAAAA,EACA,cAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,WAAAC,MAWK,oBA6qBP,OAAS,YAAAC,GAAU,eAAAC,MAAmB,8BAhnBhC,SAAUC,GACdC,EACAC,EAA2B,CAE3B,MAAO,CACL,MAAOD,GAAQ,OAASC,GAAU,OAAS,GAC3C,MAAOD,GAAQ,OAASC,GAAU,MAClC,MAAOD,GAAQ,OAASC,GAAU,MAClC,OAAQD,GAAQ,QAAUC,GAAU,OAExC,CAQM,SAAUC,GACdC,EACAC,EACAC,EAAS,CAET,MAAO,CACL,MAAOA,EAAI,GAAMF,EAAK,MAAQC,EAAG,MACjC,MAAOE,GAAkBH,EAAK,MAAOC,EAAG,MAAOC,CAAC,EAChD,MAAOE,GAAkBJ,EAAK,MAAOC,EAAG,MAAOC,CAAC,EAGhD,OAAQA,EAAI,GAAMF,EAA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,MAAQ,CAAA,EAC1CE,EAASF,EAAK,QAAUG,GAAO,EAC/BC,EAAQ,KAAK,YACnB,GAAIA,EAAM,SAAW,EAAG,OAAO/B,GAAQ,CAAA,CAAE,EACzC,GAAM,CAAE,KAAAgC,EAAM,IAAAC,EAAK,QAAAC,CAAO,EAAKC,EAC7BR,EAAK,SACLI,EAAM,OACN,KAAK,YAAc,KACnBH,CAAO,EAGT,KAAK,IAAIF,CAAK,EAGd,IAAMU,EAAUL,EAAM,IAAI,CAACM,EAAMrB,IAAK,CACpC,IAAMsB,EAAQP,EAAM,OAAS,EAAIf,EACjC,OAAOjB,GAAGuC,EAAQN,EAAMK,EAAK,GAAG,CAAE,KAAM,CAAE,QAAS,EAAG,EAAG,CAAC,EAAI,SAAUJ,EAAK,OAAAJ,CAAM,CAAE,CAAC,CACxF,CAAC,EACKU,GAAkBR,EAAM,OAAS,GAAKC,EAAOC,EAGnD,OAAOjC,GAAQ,CACb,GAAGoC,EACH,GAAI,KAAK,UACL,CAACrC,GAAGwC,EAAgB,KAAK,UAAU,GAAG,CAAE,KAAM,CAAE,QAAS,EAAG,EAAG,CAAC,EAAI,SAAUL,EAAS,OAAAL,CAAM,CAAE,CAAC,CAAC,EACjG,CAAA,EACL,CACH,GA1JsDW,EAAA,CAArDC,EAAS,CAAE,QAAS,IAAM,CAAC,EAAG,CAAC,CAAU,CAAE,+BACSD,EAAA,CAApDC,EAAS,CAAE,QAAS,IAAM,CAAA,CAAc,CAAE,iCACID,EAAA,CAA9CC,EAAS,CAAE,QAASC,CAAc,CAAE,8BACFF,EAAA,CAAlCC,EAAS,CAAE,QAAS,EAAE,CAAE,+BA2HzBD,EAAA,CADCG,GAAO,6BCxKV,WAAc",
6
- "names": ["fillOps", "lerpNumber", "shadowOps", "strokeOps", "insetsOps", "textOps", "niceStep", "enterBudget", "resolveAxisDomain", "domain", "previous", "lerpAxisDomain", "from", "to", "t", "lerpOptionalRange", "lerpOptionalTicks", "n", "out", "i", "axisTweenTarget", "drawn", "requested", "target", "count", "markerValues", "CHART_PALETTE", "DEFAULT_SERIES_COLORS", "SPOTLIGHT_DIM", "clampUnit", "value", "num", "row", "field", "v", "text", "numericFields", "data", "exclude", "skip", "seen", "order", "key", "sawValue", "AXIS_LABEL_STYLE", "AXIS_TITLE_STYLE", "AXIS_LINE_STYLE", "DEFAULT_X_AXIS", "DEFAULT_Y_AXIS", "DEFAULT_PLOT_AREA", "DEFAULT_LEGEND", "DEFAULT_SERIES_STROKES", "fill", "DEFAULT_SERIES_FILLS", "resolveAxisConfig", "axis", "lerpAxisConfig", "resolvePlotArea", "plotArea", "lerpPlotArea", "resolveLegendMarkerConfig", "marker", "lerpLegendMarkerConfig", "resolveLegendConfig", "legend", "lerpLegendConfig", "resolveSeriesStrokes", "styles", "s", "lerpSeriesStrokes", "a", "b", "resolveSeriesFills", "fills", "f", "lerpSeriesFills", "resolveSeriesStroke", "palette", "series", "index", "entry", "layers", "next", "resolveSeriesFill", "resolvePalettePaint", "override", "formatMarker", "step", "decimals", "decimalsFor", "d", "scaled", "markerStep", "markers", "sorted", "gap", "formatPercent", "fraction", "pct", "min", "max", "markerCount", "_", "Graphics2D", "Node2D", "strokeOps", "property", "declarePaints", "ChartBorder", "Node2D", "assets", "ctx", "W", "H", "Graphics2D", "__decorate", "property", "DEFAULT_PLOT_AREA", "strokeOps", "Graphics2D", "Node2D", "fillOps", "shadowOps", "strokeOps", "property", "declarePaints", "ChartCanvas", "Node2D", "assets", "ctx", "W", "H", "Graphics2D", "xMin", "xMax", "yMin", "yMax", "xFrac", "v", "yFrac", "interior", "f", "xStroke", "xGrid", "yStroke", "yGrid", "__decorate", "property", "DEFAULT_PLOT_AREA", "fillOps", "shadowOps", "DEFAULT_X_AXIS", "strokeOps", "DEFAULT_Y_AXIS", "Rect", "Text", "command", "easeOut", "property", "textOps", "drive", "hold", "together", "LegendEntry", "Rect", "props", "_shown", "constraints", "scope", "size", "shown", "ChartLegend", "s", "item", "series", "index", "marker", "Text", "textOps", "args", "easeOut", "target", "duration", "easing", "hold", "from", "drive", "t", "next", "together", "i", "SPOTLIGHT_DIM", "__decorate", "property", "DEFAULT_LEGEND", "command", "command", "Node2D", "Rect", "RotatedBox", "Text", "easeOut", "property", "insetsOps", "textOps", "at", "compose", "SLIDE", "VerticalAxis", "Node2D", "formatMarker", "a", "b", "index", "v", "min", "max", "props", "tickPad", "insetsOps", "titlePad", "_", "i", "marker", "Text", "textOps", "height", "centred", "limit", "children", "RotatedBox", "Rect", "slide", "args", "stagger", "easing", "easeOut", "nodes", "step", "per", "caption", "enterBudget", "markers", "node", "order", "lastMarkerEnds", "__decorate", "property", "DEFAULT_Y_AXIS", "command"]
7
- }