boardplot 0.57.0 → 0.58.0
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/CHANGELOG.md +298 -0
- package/README.md +48 -14
- package/dist/{DiagnosticDetails-JFBBXOT2.js → DiagnosticDetails-VGSL4NJK.js} +1 -1
- package/dist/{ReaderBox-GCIITQCX.js → ReaderBox-MHMXIDAJ.js} +8 -7
- package/dist/{annotateEngine-JMZI6QEG.js → annotateEngine-753KQBNN.js} +2 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-5WSIH4SR.js → chunk-2CQBBN7M.js} +4 -4
- package/dist/{chunk-Q7VPTN5X.js → chunk-2ETK5TSA.js} +4 -4
- package/dist/{chunk-NO7GRVUU.js → chunk-2ETSI2EL.js} +8 -8
- package/dist/{chunk-4RN4OM6I.js → chunk-2GRXHWRH.js} +3 -3
- package/dist/{chunk-QFIRPOXR.js → chunk-2HII2B6S.js} +3 -3
- package/dist/{chunk-K6Y4HBK7.js → chunk-2LC2H3ZM.js} +1000 -904
- package/dist/{chunk-KF3ZHLHQ.js → chunk-2NX7EO7H.js} +5 -5
- package/dist/{chunk-D5G67OER.js → chunk-2QI2PK2O.js} +1 -1
- package/dist/{chunk-AFA32LHN.js → chunk-2VKQQLP7.js} +62 -36
- package/dist/chunk-3DOVXJ6K.js +602 -0
- package/dist/{chunk-XJUZC53Y.js → chunk-3E6NLODZ.js} +1 -1
- package/dist/{chunk-D5RAVZ5C.js → chunk-3HA4IJTO.js} +9 -8
- package/dist/{chunk-OTGNVAI4.js → chunk-3HPPTQEW.js} +4 -4
- package/dist/{chunk-TGR6PRKG.js → chunk-3KT2647F.js} +4 -2
- package/dist/{chunk-UBXIGE2P.js → chunk-3MFVJMP6.js} +2 -2
- package/dist/{chunk-JKXJWCJ5.js → chunk-3P3FKPFN.js} +116 -54
- package/dist/{chunk-JMOBA5ES.js → chunk-3XAJSMYD.js} +2 -2
- package/dist/{chunk-I65OLJ2X.js → chunk-42QKUSHJ.js} +13 -3
- package/dist/{chunk-Y5IKCXQR.js → chunk-44JU3VOT.js} +5 -5
- package/dist/{chunk-YBYV56FS.js → chunk-44K75CYE.js} +3 -3
- package/dist/{chunk-WKWCNS6K.js → chunk-4FNM4D57.js} +5 -5
- package/dist/{chunk-UD6U4EF5.js → chunk-4ROZ4TFL.js} +1 -1
- package/dist/{chunk-LO3AGGE3.js → chunk-4VV3KUFT.js} +5 -5
- package/dist/{chunk-6ZN2XJFI.js → chunk-54YO56IK.js} +1 -1
- package/dist/{chunk-JMGB444D.js → chunk-5ACFYNA4.js} +8 -4
- package/dist/{chunk-SHAAMKN7.js → chunk-5JEU6MWC.js} +18 -18
- package/dist/{chunk-I7KDPCC7.js → chunk-5JIB4VJA.js} +18 -10
- package/dist/{chunk-C5SQEYTQ.js → chunk-5OP3E2ZD.js} +153 -65
- package/dist/{chunk-BDCKHLUB.js → chunk-5SLBD4BT.js} +72 -304
- package/dist/{chunk-2BHLRHF2.js → chunk-5SVGTQTW.js} +4 -4
- package/dist/chunk-5U567TYU.js +23 -0
- package/dist/{chunk-BFDPY7JM.js → chunk-5ZLF4S7X.js} +11 -6
- package/dist/{chunk-73O6AOAA.js → chunk-5ZMTQATF.js} +241 -140
- package/dist/{chunk-5JTRCSBN.js → chunk-62BDQTO6.js} +2 -2
- package/dist/chunk-64K3V4VN.js +25 -0
- package/dist/{chunk-BM2A3IGQ.js → chunk-67YJJJIB.js} +1 -1
- package/dist/{chunk-TDDSWNGD.js → chunk-6DJNFT2K.js} +30 -28
- package/dist/{chunk-JYAZPMSA.js → chunk-6IUK6PAH.js} +7 -6
- package/dist/{chunk-W5SVS4B6.js → chunk-6JFQCVNN.js} +4 -4
- package/dist/{chunk-H2POQ4LB.js → chunk-6XPV6M3Q.js} +4 -4
- package/dist/{chunk-XFCBH3TI.js → chunk-6ZDSEITW.js} +3 -3
- package/dist/{chunk-LFX5BERN.js → chunk-72HVDLMT.js} +46 -32
- package/dist/chunk-75NU5RLX.js +24 -0
- package/dist/chunk-76GPN6AT.js +72 -0
- package/dist/{chunk-EFKFZNQC.js → chunk-7CAYRPJV.js} +34 -20
- package/dist/{chunk-EWR6WVOV.js → chunk-7GWWBHVQ.js} +6 -6
- package/dist/{chunk-H6EJ63QN.js → chunk-7NYUFMLJ.js} +143 -82
- package/dist/{chunk-D2B3KP35.js → chunk-7VWXXBTC.js} +4 -0
- package/dist/chunk-A65B23JK.js +113 -0
- package/dist/{chunk-XNV7VOIT.js → chunk-A7R6FUS6.js} +4 -4
- package/dist/{chunk-KIXNHDXS.js → chunk-AEVGUOPB.js} +5 -5
- package/dist/{chunk-IXM6BAM4.js → chunk-AHIK2N72.js} +1 -1
- package/dist/{chunk-I3DLERI7.js → chunk-AICO24HJ.js} +5 -2
- package/dist/{chunk-LSKCKGCF.js → chunk-AJGSCVVW.js} +2 -2
- package/dist/{chunk-RSCRIWAH.js → chunk-AL62JJTB.js} +10 -3
- package/dist/{chunk-CT4RFZO4.js → chunk-AN2V2LC4.js} +37 -22
- package/dist/{chunk-T5MBORBK.js → chunk-AOFUA5XP.js} +1 -1
- package/dist/{chunk-7FAO4ICF.js → chunk-BCMEGJRX.js} +2 -2
- package/dist/{chunk-H3EWFSWI.js → chunk-BDIKWR45.js} +43 -29
- package/dist/{chunk-DJBMA4FW.js → chunk-BG6AIWAK.js} +4 -6
- package/dist/{chunk-6XU5XGYV.js → chunk-BOT6W3VB.js} +5 -5
- package/dist/{chunk-DRHQG44U.js → chunk-BQBD6Q5J.js} +6 -2
- package/dist/{chunk-6LQKU6YN.js → chunk-BZ67BJBH.js} +11 -10
- package/dist/{chunk-2AJWRVZ2.js → chunk-C47POAC5.js} +1 -1
- package/dist/{chunk-FJKFYQ5I.js → chunk-C5OBPO4Z.js} +36 -28
- package/dist/{chunk-Y7Q3VEYC.js → chunk-CCAAI56H.js} +30 -10
- package/dist/{chunk-T3WCDDIL.js → chunk-CDUR3KWV.js} +2 -2
- package/dist/{chunk-WE5WVQE4.js → chunk-CMPHT2LS.js} +3 -3
- package/dist/{chunk-FHA3KMFC.js → chunk-CQBPNE7Z.js} +5 -1
- package/dist/{chunk-JSA3ESEJ.js → chunk-CR5FP5SF.js} +1 -1
- package/dist/{chunk-JHWDTV4K.js → chunk-D2TQX7UJ.js} +2 -2
- package/dist/{chunk-5TUDYKNL.js → chunk-DEANHDXU.js} +42 -29
- package/dist/{chunk-GHFTKVJN.js → chunk-DHGE46UK.js} +1 -1
- package/dist/{chunk-ZSYU6LIH.js → chunk-DIHX6NUB.js} +5 -5
- package/dist/{chunk-W7Q6PLT4.js → chunk-DILQ34NW.js} +37 -37
- package/dist/{chunk-IZRTNCJQ.js → chunk-DJKRYJP7.js} +5 -5
- package/dist/{chunk-43PCSBVQ.js → chunk-DKLC6QLF.js} +634 -8
- package/dist/{chunk-I6QGYRY4.js → chunk-DNHTMCUP.js} +2 -2
- package/dist/{chunk-26WNBTWB.js → chunk-DORE2RHL.js} +5 -5
- package/dist/{chunk-WZB6R2ZX.js → chunk-DZYTXZNS.js} +11 -3
- package/dist/chunk-E262NRFP.js +39 -0
- package/dist/{chunk-O4D27FKH.js → chunk-E5YF236N.js} +4 -1
- package/dist/{chunk-5H4HFRDO.js → chunk-EBUK7HJP.js} +5 -5
- package/dist/{chunk-YGPLUENN.js → chunk-ECBHC272.js} +132 -83
- package/dist/{chunk-KLQKHA3T.js → chunk-EFW43JQJ.js} +5 -5
- package/dist/{chunk-VM5CQ7CG.js → chunk-EHRRHSPV.js} +2 -2
- package/dist/{chunk-PYGEIPPH.js → chunk-EILNJQMN.js} +32 -12
- package/dist/{chunk-KGS5Z7SL.js → chunk-ERDKMZ7O.js} +2 -2
- package/dist/{chunk-AFGQXMKT.js → chunk-ETRAPN5G.js} +143 -62
- package/dist/{chunk-USFIDSTO.js → chunk-ETUKDEGL.js} +18 -11
- package/dist/chunk-F2ET5ZTT.js +49 -0
- package/dist/{chunk-HVX2E26J.js → chunk-F3XOBFS4.js} +9 -8
- package/dist/{chunk-I4NUYVP5.js → chunk-FB6X7QHA.js} +1 -1
- package/dist/{chunk-LW4ZQGVL.js → chunk-FGW54I23.js} +7 -8
- package/dist/{chunk-UCIAHSJK.js → chunk-FP5B5XIL.js} +7 -3
- package/dist/{chunk-QRZESG66.js → chunk-FRHQGA5Q.js} +64 -239
- package/dist/{chunk-YTEJYLU7.js → chunk-FRR7BJ3B.js} +2 -2
- package/dist/{chunk-DPUCT567.js → chunk-FVWHEM2N.js} +7 -5
- package/dist/{chunk-54HEIM2A.js → chunk-FWSMENKH.js} +2 -2
- package/dist/{chunk-F4JAGDPD.js → chunk-FWTUGNSF.js} +8 -8
- package/dist/{chunk-HB3TH7GY.js → chunk-FZKDZQ6U.js} +10 -6
- package/dist/{chunk-6EE6XEMA.js → chunk-G4FF6G3I.js} +25 -16
- package/dist/{chunk-72OJBDRB.js → chunk-GB6BZSTL.js} +52 -41
- package/dist/{chunk-QLWUFEKR.js → chunk-GCIHRRDJ.js} +8 -8
- package/dist/{chunk-MTCDGSYW.js → chunk-GHCU6OSE.js} +2 -2
- package/dist/chunk-GO66OCN7.js +24 -0
- package/dist/chunk-GOFS336W.js +24 -0
- package/dist/{chunk-JMXNXLAC.js → chunk-GQYT7G4F.js} +2 -2
- package/dist/{chunk-TWRFVW3J.js → chunk-GUTLXO7Q.js} +138 -89
- package/dist/{chunk-RRPTQGRU.js → chunk-H3VICNTN.js} +1 -1
- package/dist/{chunk-GC4WOLV3.js → chunk-HAG3K6PQ.js} +14 -2
- package/dist/{chunk-7P7D6WXR.js → chunk-HBQHSZ6S.js} +3 -3
- package/dist/{chunk-ZV3SNRJI.js → chunk-HTQGJQZN.js} +4 -2
- package/dist/{chunk-VY67Q6CJ.js → chunk-HUQRO6VF.js} +36 -33
- package/dist/{chunk-WSKZZ2ZB.js → chunk-I5VDW2XZ.js} +538 -503
- package/dist/{chunk-TMXRTYGT.js → chunk-I5VNHDPR.js} +3 -2
- package/dist/{chunk-M74H7QYD.js → chunk-IDXYHDQY.js} +1 -1
- package/dist/{chunk-IPWUBZ4P.js → chunk-IIWZJ5ZM.js} +1 -1
- package/dist/{chunk-HC6WHTBX.js → chunk-IPBOREIY.js} +1 -1
- package/dist/chunk-IU335UO7.js +27 -0
- package/dist/{chunk-WDAZ2MT4.js → chunk-IVDTP6SV.js} +4 -4
- package/dist/{chunk-BDGLMWPO.js → chunk-IXOBDDMW.js} +11 -2
- package/dist/{chunk-PSYPB22T.js → chunk-J4QRB6DQ.js} +5 -5
- package/dist/{chunk-CEMXGMQN.js → chunk-JCMGKQVS.js} +3 -3
- package/dist/{chunk-XR7VOF2V.js → chunk-JM7UTLF3.js} +25 -13
- package/dist/{chunk-VY2NPB2Q.js → chunk-JNDWRV34.js} +4 -4
- package/dist/{chunk-SHCW2TCA.js → chunk-JSRQTDZZ.js} +25 -23
- package/dist/{chunk-XYUXB5VK.js → chunk-JT3UTEWZ.js} +3 -3
- package/dist/{chunk-BO5EJBLH.js → chunk-JUYRDZSV.js} +63 -43
- package/dist/{chunk-I5ZADE2U.js → chunk-JVGL2SCN.js} +1 -1
- package/dist/{chunk-A6XCVOC5.js → chunk-JY4LTPOV.js} +1 -1
- package/dist/chunk-K7XPTQBJ.js +267 -0
- package/dist/{chunk-JIH52I36.js → chunk-KGBUXMFP.js} +119 -85
- package/dist/{chunk-2KCK63DD.js → chunk-KIE5V3DA.js} +2 -2
- package/dist/{chunk-A33MFWHW.js → chunk-KU4PCG4W.js} +2 -2
- package/dist/{chunk-MQ5EKWIG.js → chunk-KVBLTAO7.js} +5 -5
- package/dist/{chunk-XCROSJ2Z.js → chunk-KW4JXWHO.js} +1 -1
- package/dist/{chunk-BY5JGQFZ.js → chunk-KWIP5YRA.js} +4 -4
- package/dist/{chunk-JRRSKCGG.js → chunk-LG6M2JTH.js} +3 -3
- package/dist/{chunk-KUMJI5B6.js → chunk-LIE2WSB4.js} +17 -14
- package/dist/{chunk-KAAB2DIV.js → chunk-LJDATBPB.js} +6 -6
- package/dist/{chunk-EHNGPUTO.js → chunk-LMMS675D.js} +5 -5
- package/dist/{chunk-ANNQJWDX.js → chunk-LPKGZ664.js} +285 -34
- package/dist/{chunk-ZTSJ7NY6.js → chunk-LPMSGO7L.js} +3 -3
- package/dist/chunk-LQWINE7K.js +211 -0
- package/dist/{chunk-RHBQ2Q5H.js → chunk-MKMMQDIY.js} +60 -43
- package/dist/{chunk-RMVCKO6N.js → chunk-MQ4IEDM5.js} +458 -136
- package/dist/{chunk-J22ETKDJ.js → chunk-MRM4KJ2O.js} +2 -2
- package/dist/{chunk-Z2BDTZDT.js → chunk-MX2OZHIT.js} +97 -39
- package/dist/{chunk-IFURKTOL.js → chunk-MXUPMGRY.js} +2 -2
- package/dist/{chunk-IUVJVMKS.js → chunk-NHU26HQ7.js} +55 -32
- package/dist/{chunk-6KHRMK3I.js → chunk-NQVJ4FPY.js} +158 -75
- package/dist/chunk-NZ7FX3AE.js +65 -0
- package/dist/{chunk-L2XRUG4P.js → chunk-OALBVELJ.js} +5 -5
- package/dist/{chunk-3DUGZ7ML.js → chunk-OGZ4UPYK.js} +46 -31
- package/dist/{chunk-7MYJUJZV.js → chunk-OMNB27GM.js} +4 -4
- package/dist/{chunk-GS5UG6QD.js → chunk-OO63YP35.js} +1 -1
- package/dist/{chunk-RHVP62HI.js → chunk-OPYDTW5Q.js} +5 -5
- package/dist/{chunk-4U2WSW6F.js → chunk-OSJN7KDS.js} +65 -36
- package/dist/{chunk-EY4OA4OF.js → chunk-OSJXIW6I.js} +370 -785
- package/dist/{chunk-NRYERHEI.js → chunk-OVVE42P4.js} +5 -5
- package/dist/{chunk-Z257SH5U.js → chunk-OZA7HA6L.js} +1 -1
- package/dist/{chunk-WJQX7HBH.js → chunk-OZLKEBCD.js} +2 -2
- package/dist/{chunk-DYSEZVIJ.js → chunk-P6DEFCMQ.js} +2 -2
- package/dist/{chunk-CIDOL4FO.js → chunk-PDTIQL3B.js} +5 -5
- package/dist/{chunk-TQ5HHNM3.js → chunk-PJ5BYZPN.js} +2 -2
- package/dist/{chunk-EHQLLZCQ.js → chunk-PK7Z7WRJ.js} +59 -34
- package/dist/{chunk-KJLH5EHD.js → chunk-PL6NWB5U.js} +175 -110
- package/dist/chunk-PMT75APP.js +94 -0
- package/dist/{chunk-KQ2WZ6BY.js → chunk-PP6A4X55.js} +1 -1
- package/dist/{chunk-O7Y6RJ4D.js → chunk-PPCH3PLO.js} +11 -11
- package/dist/{chunk-IRXTNSZL.js → chunk-PPE6S7WU.js} +40 -22
- package/dist/{chunk-VT7PBGL2.js → chunk-PT7KSIEO.js} +23 -36
- package/dist/{chunk-GADI2DU7.js → chunk-QAUGRVRU.js} +121 -23
- package/dist/{chunk-2X6XY4K4.js → chunk-QMFWZG2P.js} +39 -19
- package/dist/{chunk-YB6QGOCO.js → chunk-QZGGCE45.js} +2 -2
- package/dist/{chunk-5P4MXWKP.js → chunk-R2RJQ3BM.js} +4 -4
- package/dist/{chunk-FAFUMSPR.js → chunk-R7HBIQ63.js} +83 -51
- package/dist/{chunk-76UL4CT4.js → chunk-RBNDZLYS.js} +27 -22
- package/dist/{chunk-XN7JDII2.js → chunk-RCSY4CT4.js} +230 -107
- package/dist/{chunk-OAT6FWKL.js → chunk-RHQRPJHS.js} +5 -5
- package/dist/chunk-RI6XQKWJ.js +26 -0
- package/dist/{chunk-FX5VZK5F.js → chunk-RJICOOB3.js} +14 -8
- package/dist/{chunk-NINK4G7U.js → chunk-RLAVNCQJ.js} +2 -2
- package/dist/{chunk-FERP4WS3.js → chunk-ROPPWJQB.js} +11 -10
- package/dist/{chunk-SSZB3VXG.js → chunk-SELOV32X.js} +102 -47
- package/dist/{chunk-EEBMK6T6.js → chunk-SQI4NWTQ.js} +8 -8
- package/dist/{chunk-2WTD3GCR.js → chunk-SRJ74CMG.js} +2 -2
- package/dist/{chunk-LSR3SBJ4.js → chunk-STWOURLG.js} +234 -136
- package/dist/{chunk-BQIADGJB.js → chunk-SWMFXSVW.js} +5 -5
- package/dist/{chunk-5HTGSB6Y.js → chunk-SZ5VGWDY.js} +3 -3
- package/dist/{chunk-EDBUVDRI.js → chunk-T26G23RS.js} +359 -86
- package/dist/chunk-T7GPIJ4L.js +89 -0
- package/dist/{chunk-LGMV7ZV4.js → chunk-TAEB3RU6.js} +5 -5
- package/dist/{chunk-YFI5PN5O.js → chunk-TBDIMTRD.js} +34 -11
- package/dist/{chunk-HDSHS2QZ.js → chunk-TFFPEWNP.js} +70 -47
- package/dist/{chunk-YO5UKKCQ.js → chunk-TMEUK2WS.js} +6 -2
- package/dist/{chunk-X5OVVMZX.js → chunk-TVOMGNFQ.js} +1 -1
- package/dist/{chunk-JARJP576.js → chunk-TX5FSNAU.js} +435 -29
- package/dist/{chunk-LUZ7HXBT.js → chunk-U52PNFPX.js} +1 -1
- package/dist/chunk-U74AWJ3X.js +24 -0
- package/dist/chunk-UC7LBW7N.js +26 -0
- package/dist/{chunk-V3UE3TB7.js → chunk-UCKUAKYQ.js} +2 -2
- package/dist/{chunk-62JZL6FW.js → chunk-UCYL3YA7.js} +56 -42
- package/dist/{chunk-AKJO6N4K.js → chunk-UD2GI3CS.js} +11 -4
- package/dist/{chunk-MOQFYJ3F.js → chunk-ULQIC76A.js} +5 -5
- package/dist/{chunk-HFFKN7PA.js → chunk-UY34DDUM.js} +3 -3
- package/dist/{chunk-2I76VFMZ.js → chunk-UYMFLWM6.js} +49 -37
- package/dist/{chunk-3LNVEE5Z.js → chunk-V7FV66KL.js} +1 -1
- package/dist/{chunk-UP4JSNDR.js → chunk-V7NUJEJE.js} +1 -1
- package/dist/{chunk-53OEKS4L.js → chunk-VESSIKBG.js} +6 -3
- package/dist/{chunk-HGPFEG2L.js → chunk-VRFJAF3R.js} +5 -5
- package/dist/chunk-VS2R3OGN.js +34 -0
- package/dist/{chunk-EEL2N4Y6.js → chunk-VS5B4J2D.js} +5 -5
- package/dist/{chunk-G5BUGYIL.js → chunk-W4R6SGU3.js} +192 -113
- package/dist/{chunk-JKOEHRGV.js → chunk-WDLWWEHZ.js} +1 -1
- package/dist/{chunk-IW3YUMPI.js → chunk-WFBN2HXR.js} +2 -2
- package/dist/{chunk-YCUNFAEE.js → chunk-WJS6SAWA.js} +238 -127
- package/dist/{chunk-VFLMBA2M.js → chunk-WQYNKF33.js} +19 -18
- package/dist/{chunk-QNLESRH6.js → chunk-WUP6C4ZD.js} +2 -2
- package/dist/{chunk-4JNHF6JW.js → chunk-X24WAHHV.js} +84 -40
- package/dist/{chunk-GKQLKUMF.js → chunk-X3UCQPVV.js} +41 -32
- package/dist/{chunk-TXMS7QUJ.js → chunk-X46PSAJ7.js} +6 -6
- package/dist/{chunk-M2OQK2FO.js → chunk-XD5XB22R.js} +2 -2
- package/dist/{chunk-AOIZJ7GR.js → chunk-XDIAQEYK.js} +6 -6
- package/dist/{chunk-7EQU2TUN.js → chunk-XFPNYHX3.js} +84 -53
- package/dist/{chunk-NCCDEUHD.js → chunk-XIBVAKCO.js} +1 -1
- package/dist/{chunk-SD6ENKTO.js → chunk-XMX4PCFL.js} +3 -3
- package/dist/{chunk-2HD5RY2U.js → chunk-XRRG4MBM.js} +3 -3
- package/dist/{chunk-Y5WHM2Q5.js → chunk-XTFO6D4L.js} +1 -1
- package/dist/chunk-XWRI3N5O.js +70 -0
- package/dist/{chunk-IVQT2E3Y.js → chunk-XXPLPSOE.js} +13 -13
- package/dist/{chunk-YNHPPZ7S.js → chunk-XZXZNI7A.js} +1 -1
- package/dist/{chunk-QZMLSK43.js → chunk-YEJZ2OYS.js} +294 -145
- package/dist/{chunk-GAFEN3H7.js → chunk-Z3WQXVFV.js} +2 -2
- package/dist/{chunk-D3PQAVFW.js → chunk-Z6DUNKFU.js} +152 -29
- package/dist/{chunk-FF7MV4D4.js → chunk-Z6H5ED2I.js} +1 -1
- package/dist/{chunk-CV3NC75L.js → chunk-ZBOOMLHD.js} +1 -1
- package/dist/{chunk-ZDD3MJ2H.js → chunk-ZDJ7C64T.js} +1 -1
- package/dist/{chunk-OKM5LYYP.js → chunk-ZGZLEUKM.js} +5 -5
- package/dist/{chunk-QHPJ5ZKS.js → chunk-ZHRGX225.js} +5 -5
- package/dist/{chunk-QYOZ46ZQ.js → chunk-ZIVCPXXL.js} +467 -650
- package/dist/{chunk-V62B23VC.js → chunk-ZNRSYS76.js} +8 -2
- package/dist/{chunk-UFZXZJJG.js → chunk-ZSLTSCTI.js} +5 -5
- package/dist/{chunk-NIDH22DI.js → chunk-ZSYFQSPF.js} +12 -2
- package/dist/cli/index.js +8 -3
- package/dist/{core-UNX4ZV4M.js → core-43GLGBOY.js} +5 -1
- package/dist/{core-T3OSZOVV.js → core-5GI3ERXO.js} +3 -1
- package/dist/{core-AMWCZTOT.js → core-5L7TMK7I.js} +5 -1
- package/dist/{core-5S5CJHBG.js → core-7TO4OVY5.js} +2 -1
- package/dist/{core-BJZEJ63L.js → core-BJVENHFQ.js} +3 -1
- package/dist/{core-A7HXVSKB.js → core-BX4MFWKC.js} +2 -1
- package/dist/{core-4PW4MXWR.js → core-C3KXTOIZ.js} +4 -1
- package/dist/{core-SKMHEA4Y.js → core-C5Y6BFLL.js} +3 -1
- package/dist/{core-FTQBESDS.js → core-CLUSJ2SK.js} +3 -1
- package/dist/{core-QM34237W.js → core-E3IN2VVH.js} +2 -1
- package/dist/{core-4M4RY7MX.js → core-FD67NQOV.js} +3 -1
- package/dist/{core-WXZJ7V7S.js → core-FDKMLRAK.js} +4 -1
- package/dist/{core-L3UR75IJ.js → core-FL6Z3VVX.js} +4 -1
- package/dist/{core-XKXDXALI.js → core-JC7JUFPY.js} +6 -1
- package/dist/{core-WP73P4CW.js → core-JF33TADA.js} +5 -1
- package/dist/{core-DMDAXVMY.js → core-JH32ZAKM.js} +2 -1
- package/dist/{core-GS4DXDDG.js → core-JYYZPPQV.js} +4 -1
- package/dist/{core-N2JEWJ7D.js → core-KJTKCV4U.js} +2 -1
- package/dist/{core-7XKNJM7Y.js → core-LCQPE5Y6.js} +5 -1
- package/dist/{core-ZACFV6XR.js → core-LHVGWE54.js} +5 -1
- package/dist/{core-VT35VDVS.js → core-OVSNBOCE.js} +6 -1
- package/dist/{core-AVA4XLQ2.js → core-PPEC236B.js} +2 -1
- package/dist/{core-QFAVWFI3.js → core-QTJZDK5H.js} +2 -1
- package/dist/{core-VWYXK2R3.js → core-R3YZCOUZ.js} +4 -1
- package/dist/{core-OFPPRHYY.js → core-RIBW5XU4.js} +3 -1
- package/dist/{core-MAW4S3KA.js → core-RJFILBWL.js} +5 -1
- package/dist/{core-FCSA74RT.js → core-RWSXEKTE.js} +3 -1
- package/dist/{core-WPEYRK6Y.js → core-SOPPZLEH.js} +4 -1
- package/dist/{core-EMSJRGSE.js → core-TBUZCXLX.js} +2 -1
- package/dist/{core-OBPTBKX6.js → core-TZ5QLTAX.js} +2 -1
- package/dist/{core-JDZDBTID.js → core-U7E5W4MY.js} +2 -1
- package/dist/{core-ZSERZGK6.js → core-UBNVSL44.js} +3 -1
- package/dist/{core-WNT6ZMRO.js → core-UDRD4WIU.js} +2 -1
- package/dist/{core-VRVL6LIM.js → core-UVJZ4HY2.js} +3 -1
- package/dist/{core-7TTM4KRP.js → core-X7WWYQH4.js} +3 -1
- package/dist/{core-D2OIGYC7.js → core-XP56X47I.js} +4 -1
- package/dist/{core-CCB3IXGD.js → core-XQG54CYG.js} +3 -1
- package/dist/{dataTable-7IO546LM.js → dataTable-U7W4I6IF.js} +7 -2
- package/dist/{engine-US3N6UCH.js → engine-O5V26MGR.js} +23 -18
- package/dist/fixtures.js +2 -1
- package/dist/flags-BVLSAXT3.js +10 -0
- package/dist/{fontTables-ZPZQ6IR3.js → fontTables-JUW7ZTQY.js} +3 -1
- package/dist/geo/dach.js +1 -1
- package/dist/geo/de-states.js +1 -1
- package/dist/geo/eu27.js +1 -1
- package/dist/geo/europe.js +1 -1
- package/dist/geo/index.js +2 -2
- package/dist/geo/us-states.js +1 -1
- package/dist/geo/world.js +1 -1
- package/dist/index.js +27 -20
- package/dist/{main-2UWKGUHR.js → main-35GS47XC.js} +50 -119
- package/dist/mcp/server.js +121 -118
- package/dist/react/bar.js +5 -1
- package/dist/react/bartable.js +3 -1
- package/dist/react/box.js +3 -1
- package/dist/react/bullet.js +4 -1
- package/dist/react/butterfly.js +5 -1
- package/dist/react/choropleth.js +3 -1
- package/dist/react/cohort.js +3 -1
- package/dist/react/column.js +5 -1
- package/dist/react/combo.js +5 -1
- package/dist/react/creative.js +4 -1
- package/dist/react/diagram.js +3 -1
- package/dist/react/dimswitch.js +6 -1
- package/dist/react/dot.js +4 -1
- package/dist/react/export.js +29 -18
- package/dist/react/funnel.js +4 -1
- package/dist/react/gantt.js +3 -1
- package/dist/react/grid.js +6 -1
- package/dist/react/heatmap.js +3 -1
- package/dist/react/histogram.js +6 -1
- package/dist/react/index.js +92 -85
- package/dist/react/kpi.js +4 -1
- package/dist/react/likert.js +6 -1
- package/dist/react/line.js +4 -1
- package/dist/react/mekko.js +5 -1
- package/dist/react/pareto.js +6 -1
- package/dist/react/pie.js +4 -1
- package/dist/react/prepare.js +35 -22
- package/dist/react/pvm.js +6 -1
- package/dist/react/pyramid.js +5 -1
- package/dist/react/sankey.js +3 -1
- package/dist/react/scatter.js +3 -1
- package/dist/react/slope.js +4 -1
- package/dist/react/sparkline.js +4 -1
- package/dist/react/spec.js +17 -13
- package/dist/react/status.js +3 -1
- package/dist/react/story.js +3 -2
- package/dist/react/table.js +4 -1
- package/dist/react/theme.js +5 -3
- package/dist/react/tilemap.js +3 -1
- package/dist/react/treemap.js +3 -1
- package/dist/react/variance.js +5 -1
- package/dist/react/waffle.js +3 -1
- package/dist/react/waterfall.js +5 -1
- package/dist/{resvg-VB7S5HRF.js → resvg-ZYEZTSUO.js} +3 -1
- package/dist/rows.js +2 -2
- package/dist/{rowsModule-DYDVHBAX.js → rowsModule-H2S6WW4D.js} +1 -1
- package/dist/{schema-YDZCGL56.js → schema-2R32F6AW.js} +1 -3
- package/dist/{schema-A2XUZUCV.js → schema-2TPGJGVR.js} +1 -3
- package/dist/{schema-MD22QYZU.js → schema-47BG2TZA.js} +1 -3
- package/dist/{schema-HEB6ZDI5.js → schema-56MOEOVR.js} +1 -3
- package/dist/{schema-K4V4PYBO.js → schema-5MSR4LNN.js} +1 -3
- package/dist/{schema-NOBNFD2F.js → schema-5RIYEWE6.js} +1 -3
- package/dist/{schema-PHIHMDVB.js → schema-A26ZNGTZ.js} +1 -3
- package/dist/{schema-OXO2XY4Y.js → schema-ALBF6V7Y.js} +1 -3
- package/dist/{schema-F2Q6MH7W.js → schema-BA6WP5YZ.js} +1 -3
- package/dist/{schema-G5KSSI5W.js → schema-CBL2SMVR.js} +1 -3
- package/dist/{schema-WFGDVBJK.js → schema-CWKGLDSR.js} +1 -3
- package/dist/{schema-DHMMGDTI.js → schema-DBIQFL56.js} +1 -3
- package/dist/{schema-626QXX4G.js → schema-DL7V6NN2.js} +1 -3
- package/dist/{schema-FC6J6KZC.js → schema-DUVJMFKQ.js} +1 -3
- package/dist/{schema-LGLQBRC4.js → schema-ECJERHKF.js} +1 -2
- package/dist/{schema-4JRNXEZF.js → schema-EDSEKZDJ.js} +1 -3
- package/dist/{schema-I44IDRGD.js → schema-ESR6ZIK4.js} +1 -3
- package/dist/{schema-FSYDLMGD.js → schema-F7TWGLRZ.js} +1 -3
- package/dist/{schema-JCU6LTYD.js → schema-FGB6IGZM.js} +1 -3
- package/dist/{schema-MGETMQYC.js → schema-FKGGTM4Z.js} +1 -2
- package/dist/{schema-6PL46VXZ.js → schema-FU2AFIEE.js} +1 -3
- package/dist/{schema-XIHAKX3B.js → schema-JNJFCYBM.js} +1 -1
- package/dist/{schema-6V5K3J2V.js → schema-JYZ4RF6S.js} +1 -3
- package/dist/{schema-GXOG4MXL.js → schema-K7F6TEDK.js} +1 -2
- package/dist/{schema-NMIYKGHE.js → schema-KAK6DZX4.js} +1 -3
- package/dist/{schema-XRSORYBI.js → schema-MOKWIGF7.js} +1 -3
- package/dist/{schema-3KMU5737.js → schema-MQT6BMNK.js} +1 -3
- package/dist/{schema-JJWORI7D.js → schema-MR3BPPQR.js} +1 -3
- package/dist/{schema-IFTIMTS3.js → schema-OPXZYIW7.js} +1 -3
- package/dist/{schema-UXWKA3PI.js → schema-PV7JGX5H.js} +1 -3
- package/dist/{schema-CNJ4Y6CT.js → schema-PWPQF5RC.js} +1 -3
- package/dist/{schema-WBOPCTPC.js → schema-PYQEUC5P.js} +1 -3
- package/dist/{schema-J4HCSD5C.js → schema-QPIC5MAG.js} +6 -2
- package/dist/{schema-IUY7VYHJ.js → schema-R42VXFIS.js} +1 -3
- package/dist/{schema-WX2RS4OU.js → schema-TVUJNEX7.js} +1 -3
- package/dist/{schema-FGE5YK3S.js → schema-Y4TI2T3T.js} +1 -3
- package/dist/{schema-MQB6CE5V.js → schema-ZU2EU2VP.js} +1 -3
- package/dist/{specValidation-XGELWQUU.js → specValidation-2NHJT7TQ.js} +3 -1
- package/dist/theme.js +4 -3
- package/dist/{themeShapeRules-PW4BQHKL.js → themeShapeRules-G7UZX6GJ.js} +1 -1
- package/dist/types/core/annotate.d.ts +27 -2
- package/dist/types/core/annotateArms.d.ts +3 -1
- package/dist/types/core/annotateTargets.d.ts +4 -0
- package/dist/types/core/annotationOrigin.d.ts +13 -0
- package/dist/types/core/axis.d.ts +2 -2
- package/dist/types/core/charts/band/stacks.d.ts +7 -1
- package/dist/types/core/charts/column/model.d.ts +13 -0
- package/dist/types/core/charts/combo/layout.d.ts +7 -0
- package/dist/types/core/charts/gantt/calendar.d.ts +4 -0
- package/dist/types/core/charts/grid/normalize.d.ts +5 -0
- package/dist/types/core/charts/grid/schema.d.ts +2 -2
- package/dist/types/core/charts/pareto/layout.d.ts +2 -0
- package/dist/types/core/charts/pvm/types.d.ts +1 -0
- package/dist/types/core/charts/scatter/clamp.d.ts +2 -1
- package/dist/types/core/charts/scatter/model.d.ts +5 -0
- package/dist/types/core/charts/scatter/valueLines.d.ts +3 -1
- package/dist/types/core/charts/table/resolve.d.ts +8 -3
- package/dist/types/core/charts/table/view.d.ts +24 -1
- package/dist/types/core/claims/browser.d.ts +2 -0
- package/dist/types/core/claims/ids.d.ts +38 -0
- package/dist/types/core/deferred.d.ts +1 -0
- package/dist/types/core/doc/diagnostics.d.ts +3 -2
- package/dist/types/core/formatSpec.d.ts +33 -14
- package/dist/types/core/frame.d.ts +25 -58
- package/dist/types/core/frameText.d.ts +203 -0
- package/dist/types/core/geometry.d.ts +2 -0
- package/dist/types/core/label/categoryRow.d.ts +19 -2
- package/dist/types/core/label/solver.d.ts +23 -2
- package/dist/types/core/normalize/shared.d.ts +12 -2
- package/dist/types/core/notes.d.ts +15 -2
- package/dist/types/core/reading.d.ts +12 -1
- package/dist/types/core/request.d.ts +1 -1
- package/dist/types/core/schema/capability.d.ts +12 -0
- package/dist/types/core/seriesIdentity.d.ts +4 -1
- package/dist/types/core/sizing.d.ts +32 -1
- package/dist/types/core/structureCounts.d.ts +3 -1
- package/dist/types/core/theme.d.ts +33 -4
- package/dist/types/core/themeRules.d.ts +2 -0
- package/dist/types/core/types/annotations.d.ts +74 -4
- package/dist/types/core/types/options.d.ts +35 -3
- package/dist/types/core/types/scene.d.ts +30 -2
- package/dist/types/core/types/table.d.ts +6 -0
- package/dist/types/core/types/theme.d.ts +23 -0
- package/dist/types/react/TableChart.d.ts +5 -0
- package/dist/validate.js +13 -6
- package/docs/TELEMETRY.md +2 -2
- package/docs/manual.md +252 -62
- package/docs/reference/bar.md +12 -4
- package/docs/reference/bartable.md +2 -2
- package/docs/reference/box.md +8 -4
- package/docs/reference/bullet.md +9 -5
- package/docs/reference/butterfly.md +10 -5
- package/docs/reference/choropleth.md +3 -5
- package/docs/reference/cohort.md +1 -1
- package/docs/reference/column.md +18 -4
- package/docs/reference/combo.md +10 -5
- package/docs/reference/creative.md +3 -7
- package/docs/reference/diagram.md +1 -1
- package/docs/reference/dimswitch.md +23 -88
- package/docs/reference/dot.md +9 -5
- package/docs/reference/fixtures.md +37 -1
- package/docs/reference/funnel.md +9 -5
- package/docs/reference/gantt.md +8 -15
- package/docs/reference/grid.md +5 -2
- package/docs/reference/heatmap.md +10 -6
- package/docs/reference/kpi.md +1 -1
- package/docs/reference/likert.md +9 -4
- package/docs/reference/line.md +18 -5
- package/docs/reference/mekko.md +10 -5
- package/docs/reference/options.md +17 -13
- package/docs/reference/pareto.md +8 -4
- package/docs/reference/pie.md +9 -5
- package/docs/reference/pvm.md +9 -5
- package/docs/reference/pyramid.md +8 -4
- package/docs/reference/react.md +5 -5
- package/docs/reference/sankey.md +2 -2
- package/docs/reference/scatter.md +8 -4
- package/docs/reference/slope.md +9 -5
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +1 -1
- package/docs/reference/table.md +33 -114
- package/docs/reference/theme.md +12 -4
- package/docs/reference/tilemap.md +2 -4
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/variance.md +12 -6
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/warnings.md +1077 -0
- package/docs/reference/waterfall.md +16 -4
- package/docs/use-cases.md +25 -13
- package/llms.txt +19 -6
- package/package.json +18 -3
- package/dist/chunk-5RHP7YTL.js +0 -24
- package/dist/chunk-6VU2XI3W.js +0 -89
- package/dist/chunk-6WJOHZPW.js +0 -26
- package/dist/chunk-FL3FQ2YA.js +0 -27
- package/dist/chunk-G5CELEUR.js +0 -26
- package/dist/chunk-M4SPKUZE.js +0 -7
- package/dist/chunk-OF7FMGH5.js +0 -24
- package/dist/chunk-S2TSXUYP.js +0 -24
- package/dist/chunk-TKERVBJ3.js +0 -23
- package/dist/chunk-VMGTNB6H.js +0 -25
- package/dist/chunk-WZL4EEBS.js +0 -11
- package/dist/chunk-YJGFT63R.js +0 -27
- package/dist/chunk-ZNX5J7D7.js +0 -47
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ownedDocumentCopy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U52PNFPX.js";
|
|
4
4
|
import {
|
|
5
5
|
isIconName,
|
|
6
6
|
listIcons
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XD5XB22R.js";
|
|
8
8
|
import {
|
|
9
9
|
parseTimeText
|
|
10
10
|
} from "./chunk-GDOW2KNP.js";
|
|
11
|
-
import {
|
|
12
|
-
isRecord
|
|
13
|
-
} from "./chunk-MCYM3RNF.js";
|
|
14
11
|
import {
|
|
15
12
|
emptyIdRecord
|
|
16
13
|
} from "./chunk-LINZPU5D.js";
|
|
@@ -19,13 +16,13 @@ import {
|
|
|
19
16
|
parseFormatExample,
|
|
20
17
|
parseISODate,
|
|
21
18
|
specUnitKind
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Z6DUNKFU.js";
|
|
23
20
|
import {
|
|
24
21
|
levenshtein
|
|
25
22
|
} from "./chunk-NMTWUYUF.js";
|
|
26
23
|
import {
|
|
27
24
|
optionShape
|
|
28
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6IUK6PAH.js";
|
|
29
26
|
import {
|
|
30
27
|
ANNOTATIONS_RETIRED,
|
|
31
28
|
IGNORED_OPTION_KEYS,
|
|
@@ -35,7 +32,7 @@ import {
|
|
|
35
32
|
legendDrawsNothing,
|
|
36
33
|
valueAxisOnly,
|
|
37
34
|
valueAxisRefusal
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZSYFQSPF.js";
|
|
39
36
|
import {
|
|
40
37
|
MAGNITUDE_CEILING,
|
|
41
38
|
NormalizeError,
|
|
@@ -47,11 +44,7 @@ import {
|
|
|
47
44
|
resolveCanvasOptions,
|
|
48
45
|
resolveSize,
|
|
49
46
|
toLayoutPx
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import {
|
|
52
|
-
maxOf,
|
|
53
|
-
pushAll
|
|
54
|
-
} from "./chunk-WYJEOMNY.js";
|
|
47
|
+
} from "./chunk-RJICOOB3.js";
|
|
55
48
|
|
|
56
49
|
// src/core/schema/categoryLabels.ts
|
|
57
50
|
import * as z from "zod";
|
|
@@ -59,255 +52,9 @@ var categoryLabelsSchema = z.enum(["axis", "staircase"]).optional().describe(
|
|
|
59
52
|
"Where category names go: 'axis' (default), the row under the axis; 'staircase', each name over the lower columns beside its own, one step lower than the last, with a vertical leader to its column (column, combo, pareto). Without a seat for every name the row returns and staircase-labels-fallback warns."
|
|
60
53
|
);
|
|
61
54
|
|
|
62
|
-
// src/core/doc/docExpand.ts
|
|
63
|
-
import * as z2 from "zod";
|
|
64
|
-
var STANDARD_OBJECT_PROTOTYPE_MEMBERS = /* @__PURE__ */ new Set([
|
|
65
|
-
"constructor",
|
|
66
|
-
"hasOwnProperty",
|
|
67
|
-
"isPrototypeOf",
|
|
68
|
-
"propertyIsEnumerable",
|
|
69
|
-
"toLocaleString",
|
|
70
|
-
"toString",
|
|
71
|
-
"valueOf",
|
|
72
|
-
"__proto__",
|
|
73
|
-
"__defineGetter__",
|
|
74
|
-
"__defineSetter__",
|
|
75
|
-
"__lookupGetter__",
|
|
76
|
-
"__lookupSetter__"
|
|
77
|
-
]);
|
|
78
|
-
function sanitizeObjectPrototype(warn) {
|
|
79
|
-
for (let name of Object.getOwnPropertyNames(Object.prototype)) {
|
|
80
|
-
if (STANDARD_OBJECT_PROTOTYPE_MEMBERS.has(name)) continue;
|
|
81
|
-
Object.getOwnPropertyDescriptor(Object.prototype, name)?.configurable ? delete Object.prototype[name] : warn(
|
|
82
|
-
`the JavaScript environment defines a non-removable property '${name}' on Object.prototype \u2014 results may be affected; run in a clean Node process`
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
var repeatSpecSchema = z2.strictObject({
|
|
87
|
-
dimension: z2.string().regex(/^[A-Za-z_][A-Za-z0-9_-]*$/).describe("Placeholder name; use it as $dimension in chart name, title, and subtitle strings."),
|
|
88
|
-
values: z2.array(z2.string().min(1).describe("Facet value bound to the placeholder and used to look up a data.bySlice entry.")).min(1).describe("Ordered facet values to bind and expand.")
|
|
89
|
-
}).describe("Chart-level repeat declaration expanded before chart validation.");
|
|
90
|
-
function missingChartName(issue) {
|
|
91
|
-
return issue.input === void 0 ? "chart name is missing; every chart in charts needs a name, unique in the document" : void 0;
|
|
92
|
-
}
|
|
93
|
-
var repeatChartSchema = z2.object({
|
|
94
|
-
name: z2.string({ error: missingChartName }).min(1).describe("Chart name template; without $dimension, expanded names are <name>-<value>."),
|
|
95
|
-
type: z2.string().min(1).describe("Registered chart type repeated for every facet value."),
|
|
96
|
-
repeat: repeatSpecSchema,
|
|
97
|
-
data: z2.strictObject({
|
|
98
|
-
bySlice: z2.record(z2.string(), z2.unknown().describe("Chart data for this facet; the selected chart schema validates it after expansion.")).describe("Exact slice lookup; every repeat value must have one chart-data entry.")
|
|
99
|
-
}).describe("Facet data keyed by repeat value."),
|
|
100
|
-
options: z2.record(z2.string(), z2.unknown().describe("Chart option value, validated by the selected chart schema after expansion.")).optional().describe("Chart options; title and subtitle strings may contain the dimension placeholder."),
|
|
101
|
-
annotations: z2.array(z2.unknown().describe("Annotation copied to each expanded chart; chart validation and annotation resolution check its shape and anchors.")).optional().describe("Shared annotations attached to each expanded chart.")
|
|
102
|
-
}).superRefine((chart, ctx) => {
|
|
103
|
-
let seen = /* @__PURE__ */ new Set();
|
|
104
|
-
chart.repeat.values.forEach((value, index) => {
|
|
105
|
-
seen.has(value) && ctx.addIssue({
|
|
106
|
-
code: "custom",
|
|
107
|
-
path: ["repeat", "values", index],
|
|
108
|
-
message: `duplicate repeat value '${value}'`
|
|
109
|
-
}), seen.add(value), Object.hasOwn(chart.data.bySlice, value) || ctx.addIssue({
|
|
110
|
-
code: "custom",
|
|
111
|
-
path: ["data", "bySlice", value],
|
|
112
|
-
message: `missing data slice for repeat value '${value}'`
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}).describe("Chart specification expanded once per repeat value before validation, rendering, and manifests."), DocExpansionError = class extends Error {
|
|
116
|
-
constructor(issues) {
|
|
117
|
-
super(
|
|
118
|
-
`document schema errors:
|
|
119
|
-
${issues.map((issue) => ` ${issue.path.join(".") || "(root)"}: ${issue.message}`).join(`
|
|
120
|
-
`)}`
|
|
121
|
-
);
|
|
122
|
-
this.issues = issues;
|
|
123
|
-
this.name = "DocExpansionError";
|
|
124
|
-
}
|
|
125
|
-
issues;
|
|
126
|
-
};
|
|
127
|
-
function expandDoc(input) {
|
|
128
|
-
if (!isRecord(input) || !Array.isArray(input.charts)) return { doc: input, warnings: [], sources: [] };
|
|
129
|
-
let entries = [], outputCharts = [], sources = [], repeats = [], issues = [];
|
|
130
|
-
if (input.charts.forEach((rawChart, sourceIndex) => {
|
|
131
|
-
if (!isRecord(rawChart) || !Object.hasOwn(rawChart, "repeat") || rawChart.repeat === void 0) {
|
|
132
|
-
let copied = ownedDocumentCopy(rawChart);
|
|
133
|
-
outputCharts.push(copied), sources.push({ index: sourceIndex }), isExpandedChart(copied) && entries.push({ chart: copied, index: outputCharts.length - 1 });
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
let parsed = repeatChartSchema.safeParse(rawChart);
|
|
137
|
-
if (!parsed.success) {
|
|
138
|
-
pushAll(issues, parsed.error.issues.map((issue) => ({
|
|
139
|
-
path: [
|
|
140
|
-
"charts",
|
|
141
|
-
sourceIndex,
|
|
142
|
-
...issue.path.map((segment) => typeof segment == "symbol" ? String(segment) : segment)
|
|
143
|
-
],
|
|
144
|
-
message: issue.message
|
|
145
|
-
})));
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
let chart = parsed.data;
|
|
149
|
-
repeats.push(chart);
|
|
150
|
-
let origin = `repeat:${sourceIndex}:${chart.repeat.dimension}`;
|
|
151
|
-
for (let value of chart.repeat.values) {
|
|
152
|
-
let expanded = expandRepeatChart(chart, value);
|
|
153
|
-
entries.push({
|
|
154
|
-
chart: expanded,
|
|
155
|
-
index: outputCharts.length,
|
|
156
|
-
repeatOrigin: origin,
|
|
157
|
-
repeatLabel: `repeat chart '${chart.name}' over '${chart.repeat.dimension}'`
|
|
158
|
-
}), outputCharts.push(expanded), sources.push({ index: sourceIndex, slice: value });
|
|
159
|
-
}
|
|
160
|
-
}), issues.length > 0) throw new DocExpansionError(issues);
|
|
161
|
-
return {
|
|
162
|
-
doc: { ...input, charts: outputCharts },
|
|
163
|
-
sources,
|
|
164
|
-
warnings: [
|
|
165
|
-
...lintRepeatValues(repeats),
|
|
166
|
-
...lintPaletteDrift(entries),
|
|
167
|
-
...lintScaleDrift(entries)
|
|
168
|
-
]
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function expandRepeatChart(chart, value) {
|
|
172
|
-
let placeholder = `$${chart.repeat.dimension}`, substitutedName = substituteString(chart.name, placeholder, value), name = chart.name.includes(placeholder) ? substitutedName : `${substitutedName}-${value}`, options = chart.options ? ownedDocumentCopy(chart.options) : void 0;
|
|
173
|
-
return options && typeof options.title == "string" && (options.title = substituteString(options.title, placeholder, value)), options && options.subtitle !== void 0 && (options.subtitle = substituteStrings(options.subtitle, placeholder, value)), Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
174
|
-
name,
|
|
175
|
-
type: chart.type,
|
|
176
|
-
data: ownedDocumentCopy(chart.data.bySlice[value]),
|
|
177
|
-
...options ? { options } : {},
|
|
178
|
-
...chart.annotations ? { annotations: ownedDocumentCopy(chart.annotations) } : {}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
function lintRepeatValues(repeats) {
|
|
182
|
-
let byDimension = /* @__PURE__ */ new Map();
|
|
183
|
-
for (let chart of repeats) {
|
|
184
|
-
let group = byDimension.get(chart.repeat.dimension) ?? [];
|
|
185
|
-
group.push(chart), byDimension.set(chart.repeat.dimension, group);
|
|
186
|
-
}
|
|
187
|
-
let warnings = [];
|
|
188
|
-
for (let [dimension, charts] of byDimension)
|
|
189
|
-
charts.length < 2 || new Set(charts.map((chart) => JSON.stringify(chart.repeat.values))).size < 2 || warnings.push({
|
|
190
|
-
code: "facet-values-drift",
|
|
191
|
-
severity: "warn",
|
|
192
|
-
message: `repeat charts ${quoteList(charts.map((chart) => chart.name))} use different ordered values for dimension '${dimension}'; align the lists or call out the missing facet explicitly`
|
|
193
|
-
});
|
|
194
|
-
return warnings;
|
|
195
|
-
}
|
|
196
|
-
function lintPaletteDrift(entries) {
|
|
197
|
-
let byPalette = /* @__PURE__ */ new Map();
|
|
198
|
-
for (let entry of entries) {
|
|
199
|
-
let palette = entry.chart.options?.palette;
|
|
200
|
-
if (typeof palette != "string") continue;
|
|
201
|
-
let group = byPalette.get(palette) ?? [];
|
|
202
|
-
group.push(entry), byPalette.set(palette, group);
|
|
203
|
-
}
|
|
204
|
-
let warnings = [];
|
|
205
|
-
for (let [palette, charts] of byPalette)
|
|
206
|
-
for (let left = 0; left < charts.length; left++) {
|
|
207
|
-
let a = charts[left], aSlots = paletteSlots(a.chart.data);
|
|
208
|
-
if (aSlots.size !== 0)
|
|
209
|
-
for (let right = left + 1; right < charts.length; right++) {
|
|
210
|
-
let b = charts[right], bSlots = paletteSlots(b.chart.data), drifted = [...aSlots].flatMap(
|
|
211
|
-
([seriesId, slot]) => bSlots.has(seriesId) && bSlots.get(seriesId) !== slot ? [seriesId] : []
|
|
212
|
-
);
|
|
213
|
-
drifted.length !== 0 && warnings.push({
|
|
214
|
-
code: "facet-palette-drift",
|
|
215
|
-
severity: "warn",
|
|
216
|
-
message: `charts '${a.chart.name}' and '${b.chart.name}' assign shared palette '${palette}' to series ${quoteList(drifted)} at different positions; keep series order consistent or set explicit color roles`
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return warnings;
|
|
221
|
-
}
|
|
222
|
-
function paletteSlots(data) {
|
|
223
|
-
if (!isRecord(data) || !Array.isArray(data.series)) return /* @__PURE__ */ new Map();
|
|
224
|
-
let slots = /* @__PURE__ */ new Map(), slot = 0;
|
|
225
|
-
for (let rawSeries of data.series)
|
|
226
|
-
!isRecord(rawSeries) || rawSeries.role === "reference" || (typeof rawSeries.id == "string" && rawSeries.fill === void 0 && rawSeries.colorRole === void 0 && rawSeries.scenario === void 0 && slots.set(rawSeries.id, slot), slot++);
|
|
227
|
-
return slots;
|
|
228
|
-
}
|
|
229
|
-
function lintScaleDrift(entries) {
|
|
230
|
-
let groups = /* @__PURE__ */ new Map();
|
|
231
|
-
for (let entry of entries) {
|
|
232
|
-
entry.repeatOrigin && addScaleGroup(groups, entry.repeatOrigin, entry.repeatLabel ?? entry.repeatOrigin, entry);
|
|
233
|
-
let scaleGroup = entry.chart.options?.scaleGroup;
|
|
234
|
-
isRecord(scaleGroup) && typeof scaleGroup.y == "string" && addScaleGroup(groups, `scale:${scaleGroup.y}`, `y scale group '${scaleGroup.y}'`, entry);
|
|
235
|
-
}
|
|
236
|
-
let warnings = [], warnedPairs = /* @__PURE__ */ new Set();
|
|
237
|
-
for (let group of groups.values())
|
|
238
|
-
for (let left = 0; left < group.entries.length; left++) {
|
|
239
|
-
let a = group.entries[left], aMagnitude = domainMagnitude(a.chart);
|
|
240
|
-
if (aMagnitude !== null)
|
|
241
|
-
for (let right = left + 1; right < group.entries.length; right++) {
|
|
242
|
-
let b = group.entries[right], bMagnitude = domainMagnitude(b.chart);
|
|
243
|
-
if (bMagnitude === null) continue;
|
|
244
|
-
let ratio = scaleRatio(aMagnitude, bMagnitude);
|
|
245
|
-
if (!(ratio > 20)) continue;
|
|
246
|
-
let pair = [a.index, b.index].sort((x, y) => x - y).join(":");
|
|
247
|
-
if (warnedPairs.has(pair)) continue;
|
|
248
|
-
warnedPairs.add(pair);
|
|
249
|
-
let ratioText = Number.isFinite(ratio) ? `${roundRatio(ratio)}x` : "more than 20x", message = `charts '${a.chart.name}' and '${b.chart.name}' in ${group.label} have value domains that differ by ${ratioText}; use shared axis bounds or add an explicit callout so the scale difference cannot mislead`;
|
|
250
|
-
warnings.push({
|
|
251
|
-
code: "facet-scale-drift",
|
|
252
|
-
severity: "warn",
|
|
253
|
-
message,
|
|
254
|
-
suggest: "Use shared value-axis bounds or an explicit scale callout."
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return warnings;
|
|
259
|
-
}
|
|
260
|
-
function addScaleGroup(groups, key, label, entry) {
|
|
261
|
-
let group = groups.get(key) ?? { label, entries: [] };
|
|
262
|
-
group.entries.push(entry), groups.set(key, group);
|
|
263
|
-
}
|
|
264
|
-
function domainMagnitude(chart) {
|
|
265
|
-
let values = yValues(chart.type, chart.data);
|
|
266
|
-
return values.length === 0 ? null : maxOf(values.map((value) => Math.abs(value)));
|
|
267
|
-
}
|
|
268
|
-
function yValues(type, data) {
|
|
269
|
-
return isRecord(data) ? Array.isArray(data.series) ? data.series.flatMap((series) => !isRecord(series) || series.role === "reference" || !Array.isArray(series.values) ? [] : series.values.flatMap(numericCell)) : (type === "scatter" || type === "bubble") && Array.isArray(data.points) ? data.points.flatMap((point) => isRecord(point) ? numericCell(point.y) : []) : type === "waterfall" || type === "bridge" ? waterfallDomainValues(data) : Array.isArray(data.rows) ? data.rows.flatMap((row) => isRecord(row) ? numericCell(row.value) : []) : type === "kpi" ? [
|
|
270
|
-
...numericCell(data.value),
|
|
271
|
-
...isRecord(data.spark) && Array.isArray(data.spark.values) ? data.spark.values.flatMap(numericCell) : []
|
|
272
|
-
] : [] : [];
|
|
273
|
-
}
|
|
274
|
-
function waterfallDomainValues(data) {
|
|
275
|
-
if (!Array.isArray(data.items)) return [];
|
|
276
|
-
let values = [0], running = 0;
|
|
277
|
-
for (let item of data.items) {
|
|
278
|
-
if (!isRecord(item)) continue;
|
|
279
|
-
let segments = Array.isArray(item.segments) ? item.segments.flatMap((segment) => isRecord(segment) ? numericCell(segment.value) : []) : [], authored = numericCell(item.value), delta = segments.length > 0 ? segments.reduce((sum, value) => sum + value, 0) : authored[0];
|
|
280
|
-
item.type === "subtotal" || item.type === "total" ? values.push(running) : delta !== void 0 && (running += delta, values.push(running));
|
|
281
|
-
}
|
|
282
|
-
return values;
|
|
283
|
-
}
|
|
284
|
-
function numericCell(value) {
|
|
285
|
-
return typeof value == "number" && Number.isFinite(value) ? [value] : isRecord(value) ? typeof value.number == "number" && Number.isFinite(value.number) ? [value.number] : typeof value.pct == "number" && Number.isFinite(value.pct) ? [value.pct] : "value" in value ? numericCell(value.value) : [] : [];
|
|
286
|
-
}
|
|
287
|
-
function scaleRatio(a, b) {
|
|
288
|
-
let smaller = Math.min(a, b), larger = Math.max(a, b);
|
|
289
|
-
return smaller === 0 ? larger === 0 ? 1 : Number.POSITIVE_INFINITY : larger / smaller;
|
|
290
|
-
}
|
|
291
|
-
function roundRatio(value) {
|
|
292
|
-
return Math.round(value * 10) / 10;
|
|
293
|
-
}
|
|
294
|
-
function substituteString(value, placeholder, replacement) {
|
|
295
|
-
return value.split(placeholder).join(replacement);
|
|
296
|
-
}
|
|
297
|
-
function substituteStrings(value, placeholder, replacement) {
|
|
298
|
-
return typeof value == "string" ? substituteString(value, placeholder, replacement) : Array.isArray(value) ? value.map((item) => substituteStrings(item, placeholder, replacement)) : isRecord(value) ? Object.fromEntries(
|
|
299
|
-
Object.entries(value).map(([key, item]) => [key, substituteStrings(item, placeholder, replacement)])
|
|
300
|
-
) : value;
|
|
301
|
-
}
|
|
302
|
-
function quoteList(values) {
|
|
303
|
-
return values.map((value) => `'${value}'`).join(", ");
|
|
304
|
-
}
|
|
305
|
-
function isExpandedChart(value) {
|
|
306
|
-
return isRecord(value) && typeof value.name == "string" && typeof value.type == "string" && "data" in value;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
55
|
// src/core/schema/capabilityReasons.ts
|
|
310
56
|
var OPTION_REASONS = {
|
|
57
|
+
labelPosition: "this type has no supported bar value labels to position. Set labelPosition on a supported bar chart, or on a grid panel through that panel's options",
|
|
311
58
|
animate: "no chart type implements 'animate' \u2014 this library emits static, deterministic SVG; use 'interactive: true' for data-bp-* hover/focus semantics, or animate the emitted SVG downstream",
|
|
312
59
|
debug: "no chart type implements 'debug'; drop the key. The CLI refuses '--debug' as not supported in v1",
|
|
313
60
|
rowLabels: "only the horizontal row-label families read rowLabels (bar, bullet, box, dot, likert). A vertical category axis prints its labels under the bands, where they already share one baseline and there is nothing to align",
|
|
@@ -390,6 +137,7 @@ function valueAxisReason(type, key, why) {
|
|
|
390
137
|
return type === "slope" && key === "reverse" ? SLOPE_REVERSE_REASON : why === "only" ? VALUE_AXIS_ONLY_REASONS[type] : VALUE_AXIS_REASONS[key];
|
|
391
138
|
}
|
|
392
139
|
var ALTERNATIVES = {
|
|
140
|
+
labelPosition: { "*": "this type draws no bar values to position. Set it on a bar chart, or in the panel options of a grid" },
|
|
393
141
|
transpose: {
|
|
394
142
|
"*": "orientation is the chart type: type 'bar' draws horizontal bars and type 'column' vertical ones",
|
|
395
143
|
waterfall: "a waterfall turns with options.variant"
|
|
@@ -468,60 +216,67 @@ function refusalSuggest(type, path) {
|
|
|
468
216
|
}
|
|
469
217
|
|
|
470
218
|
// src/core/schema/shared.ts
|
|
471
|
-
import * as
|
|
219
|
+
import * as z2 from "zod";
|
|
472
220
|
function optionShapeSchema(key, canonical, short) {
|
|
473
|
-
return
|
|
221
|
+
return z2.union([canonical, short]).transform((value) => optionShape(key, value));
|
|
474
222
|
}
|
|
475
|
-
var languageSchema =
|
|
223
|
+
var languageSchema = z2.string().min(2).max(35).refine((tag) => canonicalLanguage(tag) !== null, { message: 'not a BCP 47 language tag; use a tag such as "de" or "de-DE"' }), annotationIconNames = listIcons(), annotationIconSchema = z2.string().superRefine((name, ctx) => {
|
|
476
224
|
isIconName(name) || ctx.addIssue({
|
|
477
225
|
code: "custom",
|
|
478
226
|
message: `unknown annotation icon '${name}' \u2014 valid icons: ${annotationIconNames.join(", ")}`
|
|
479
227
|
});
|
|
480
228
|
}).describe("Registered icon name for a note or callout glyph; mutually exclusive with status.");
|
|
481
|
-
|
|
482
|
-
var idSchema =
|
|
229
|
+
z2.globalRegistry.add(annotationIconSchema, { enum: annotationIconNames, description: annotationIconSchema.description });
|
|
230
|
+
var idSchema = z2.string().min(1).describe("Nonempty stable identifier used to match data, labels and annotation anchors."), PROTO_KEY_STAND_IN = "__proto__\u200B", PROTO_KEY_SHIFTED = `${PROTO_KEY_STAND_IN}\u200B`;
|
|
483
231
|
function idRecord(key, value) {
|
|
484
|
-
return
|
|
485
|
-
if (raw === null || typeof raw != "object" || Array.isArray(raw) || !Object.hasOwn(raw, "__proto__")
|
|
232
|
+
return z2.preprocess((raw, ctx) => {
|
|
233
|
+
if (raw === null || typeof raw != "object" || Array.isArray(raw) || !Object.hasOwn(raw, "__proto__") && !Object.hasOwn(raw, PROTO_KEY_STAND_IN)) return raw;
|
|
486
234
|
let renamed = emptyIdRecord();
|
|
487
235
|
for (let [name, item] of Object.entries(raw)) {
|
|
488
|
-
if (name
|
|
236
|
+
if (!/^__proto__\u200b*$/.test(name)) {
|
|
489
237
|
renamed[name] = item;
|
|
490
238
|
continue;
|
|
491
239
|
}
|
|
240
|
+
let keyChecked = key.safeParse(name);
|
|
241
|
+
if (!keyChecked.success) {
|
|
242
|
+
for (let issue of keyChecked.error.issues) ctx.addIssue({ ...issue, path: [name, ...issue.path] });
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
492
245
|
let checked = value.safeParse(item);
|
|
493
|
-
if (checked.success) renamed[
|
|
494
|
-
else for (let issue of checked.error.issues) ctx.addIssue({ ...issue, path: [
|
|
246
|
+
if (checked.success) renamed[`${name}\u200B`] = item;
|
|
247
|
+
else for (let issue of checked.error.issues) ctx.addIssue({ ...issue, path: [name, ...issue.path] });
|
|
495
248
|
}
|
|
496
249
|
return renamed;
|
|
497
|
-
},
|
|
498
|
-
if (!Object.hasOwn(parsed, PROTO_KEY_STAND_IN)
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
250
|
+
}, z2.record(key, value)).transform((parsed) => {
|
|
251
|
+
if (!Object.hasOwn(parsed, PROTO_KEY_STAND_IN) && !Object.hasOwn(parsed, PROTO_KEY_SHIFTED))
|
|
252
|
+
return Object.setPrototypeOf(parsed, null);
|
|
253
|
+
let record2 = emptyIdRecord();
|
|
254
|
+
for (let [name, item] of Object.entries(parsed))
|
|
255
|
+
record2[/^__proto__\u200b+$/.test(name) ? name.slice(0, -1) : name] = item;
|
|
256
|
+
return record2;
|
|
502
257
|
}).nonoptional();
|
|
503
258
|
}
|
|
504
|
-
var categoryDateSchema =
|
|
259
|
+
var categoryDateSchema = z2.string().refine((date) => parseISODate(date) !== null, { message: "a category date is an ISO date, yyyy-mm-dd, such as 2024-01-31" }), partialCategorySchema = z2.boolean().optional().describe('Period still running, such as the current week. Bars and segments on it are hatched and line markers on it are hollow; marks keep their positions. A drawn key names the running category once as "<label> to date". With no such key, the frame adds that note.');
|
|
505
260
|
function categorySchemaOf(spec) {
|
|
506
|
-
return
|
|
507
|
-
spec.nonEmpty ?
|
|
508
|
-
|
|
261
|
+
return z2.union([
|
|
262
|
+
spec.nonEmpty ? z2.string().min(1) : z2.string(),
|
|
263
|
+
z2.strictObject({
|
|
509
264
|
id: idSchema.describe("Category identity used to match keyed values and annotation anchors."),
|
|
510
|
-
label: spec.label ??
|
|
265
|
+
label: spec.label ?? z2.string().optional().describe("Displayed category name; defaults to the category id and supports line breaks. A date id or `date` without a label prints a short date such as '4 Sep'."),
|
|
511
266
|
date: spec.date,
|
|
512
267
|
...spec.fields,
|
|
513
|
-
footnote: spec.footnote ??
|
|
268
|
+
footnote: spec.footnote ?? z2.number().int().optional().describe("1-based reference into options.footnotes. The number is drawn beside this category label as the reference mark, and the note it points at keeps that number; a reference to no note draws nothing and warns, and notes the engine derives print unnumbered."),
|
|
514
269
|
...spec.after
|
|
515
270
|
})
|
|
516
271
|
]);
|
|
517
272
|
}
|
|
518
|
-
var comparisonDirectionSchema =
|
|
273
|
+
var comparisonDirectionSchema = z2.enum(["higherIsBetter", "lowerIsBetter", "neutral"]), COLOR_ROLE_PATTERN = /^(?:good|bad|warn|neutral|neutralLight|highlight|total|others|series-[1-9]\d{0,14}|status-[A-Za-z0-9][A-Za-z0-9_-]*)$/, COLOR_ROLE_VALUES = "One of good, bad, warn, neutral, neutralLight, highlight, total, others; series-N for step N of the theme ramp, 1-based (series-2 is color.series[1]); or status-<key> for a theme status colour. A hex colour goes in fill.";
|
|
519
274
|
function colorRoleField(lead) {
|
|
520
|
-
return
|
|
275
|
+
return z2.string().regex(COLOR_ROLE_PATTERN, {
|
|
521
276
|
message: "colorRole must be a theme colour role: good, bad, warn, neutral, neutralLight, highlight, total, others, series-N (1-based ramp step, series-2 is color.series[1]) or status-<key>; put a hex colour in fill"
|
|
522
277
|
}).optional().describe(`${lead} ${COLOR_ROLE_VALUES}`);
|
|
523
278
|
}
|
|
524
|
-
var ownerSchema =
|
|
279
|
+
var ownerSchema = z2.strictObject({
|
|
525
280
|
seriesId: idSchema.optional().describe("Source series identity."),
|
|
526
281
|
categoryId: idSchema.optional().describe("Source category identity."),
|
|
527
282
|
segmentId: idSchema.optional().describe("Source segment identity."),
|
|
@@ -608,60 +363,60 @@ function parseData(schema, raw) {
|
|
|
608
363
|
let suggest = isPctString || JSON.stringify(raw)?.includes('"percentage"') === !0 ? "use 'pct' for percent cells (50.5 means 50.5%)" : void 0;
|
|
609
364
|
throw new NormalizeError("invalid-data", path, issue?.message ?? "invalid data", suggest);
|
|
610
365
|
}
|
|
611
|
-
var formatField = (withFix) =>
|
|
366
|
+
var formatField = (withFix) => z2.string().superRefine((value, ctx) => {
|
|
612
367
|
let problem = formatExampleProblem(value);
|
|
613
368
|
problem && ctx.addIssue({ code: "custom", message: problem.message, params: { code: "invalid-format", ...withFix ? { replaceWith: problem.replacement } : {} } });
|
|
614
|
-
}), formatExample = formatField(!0), contextFormatExample = formatField(!1), valueKindSchema =
|
|
369
|
+
}), formatExample = formatField(!0), contextFormatExample = formatField(!1), valueKindSchema = z2.literal("fraction").optional().describe("Multiply numbers by 100 into pct cells; explicit pct cells stay in percent units."), dataValueKindSchema = valueKindSchema.describe("Default valueKind for all series."), PERCENT_FORMAT_UNITS = "A % example expects values in percent units: 3.53 prints 3.53%, a fraction 0.0353 prints 0.04%.", MAGNITUDE_WORDS_DOC = "A magnitude after the number divides the raw value: k, thousand, Tsd., Tausend (10\xB3); m, M, mn, mm, million(s), Mio., Million(en) (10\u2076); b, B, bn, billion(s), Mrd., Milliarde(n), milliard(s) (10\u2079); tn, trillion(s), Bio., Billionen (10\xB9\xB2). The letters k, m, M, mm, b, B and T scale when glued to the number or spaced beside a currency ('$1.2 k'); '12 m/s' and '50 B' keep their unit. A scale inside a currency affix ('USDm 1.2', '1.2 \u20ACm') holds that divisor. A value of 1000 or more in a free scale rolls up and one that would print as 0 rolls down, in the example's spelling; a German or French chart prints its own words (Mrd., Bio.; Md, Bn). A unit alone ('$M', '\u20ACbn', '%', 'x') picks precision from the data. Spreadsheet number codes translate to examples with warning format-spreadsheet-code; percent values stay percent points. Direction glyphs (\u25B2/\u25BC, \u2191/\u2193) at the start or end of the example carry a sign. A glyph inside the prefix or unit stays literal text. \xB1 carries a sign. A trailing minus marks negatives, '1st' prints English ordinals, and '1.2E+06' prints scientific notation. With no digit, one run of 1\u201315 @ fixes significant figures: '$@@@M' prints 4,270,000 as $4.27M.", scenarioField = (meaning) => z2.string().superRefine((value, ctx) => {
|
|
615
370
|
/^ly$/i.test(value) && ctx.addIssue({ code: "custom", message: "LY is drawn as PY", params: { scenarioAlias: !0 } });
|
|
616
371
|
}).optional().describe(`AC, PY, PL, FC (or ACT, BUD, FCST, LY for last year). Codes and aliases accept any case.${meaning ? ` ${meaning}` : ""}`), cellMetaSchema = {
|
|
617
|
-
fill:
|
|
372
|
+
fill: z2.string().optional().describe("Authored cell fill colour; overrides the inherited series fill where supported."),
|
|
618
373
|
format: formatExample.optional().describe("Format-by-example for this value, overriding the series or chart format."),
|
|
619
|
-
label:
|
|
620
|
-
|
|
621
|
-
|
|
374
|
+
label: z2.union([
|
|
375
|
+
z2.string().describe("Authored value label; ${value} inserts the formatted value. On a slope it replaces only the value part of the end label and keeps the series name. On a line or combo it draws at that point whatever valueLabels asks of the rest, and replaces the series end label when the point is the series end."),
|
|
376
|
+
z2.literal(!1).describe("Suppress the cell label while retaining its value and mark, including the series end label when the cell is the series end.")
|
|
622
377
|
]).optional().describe("Cell label override; omission uses the chart label policy."),
|
|
623
|
-
priority:
|
|
378
|
+
priority: z2.number().optional().describe("Authored label priority used when the solver must choose which labels fit."),
|
|
624
379
|
scenario: scenarioField("Cell scenario overriding its series."),
|
|
625
|
-
footnote:
|
|
380
|
+
footnote: z2.number().int().optional().describe("Footnote reference kept in the interaction record for this cell; it draws no marker. The reference that draws one is categories[].footnote.")
|
|
626
381
|
};
|
|
627
|
-
var boundedNumber =
|
|
382
|
+
var boundedNumber = z2.number().finite().superRefine((value, ctx) => {
|
|
628
383
|
Math.abs(value) > MAGNITUDE_CEILING && ctx.addIssue({ code: "custom", message: magnitudeMessage(value) });
|
|
629
|
-
}).describe("Finite numeric value with absolute magnitude at most 1e15; rescale larger values into a larger unit."), cellSchema =
|
|
384
|
+
}).describe("Finite numeric value with absolute magnitude at most 1e15; rescale larger values into a larger unit."), cellSchema = z2.union([
|
|
630
385
|
boundedNumber,
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
]).describe("A numeric shorthand, missing value, numeric cell, percentage cell or date cell."), DETAIL_LIMITS = { fields: 20, text: 200 }, cellDetailsSchema =
|
|
636
|
-
|
|
637
|
-
|
|
386
|
+
z2.null().describe("Missing observation; never interpreted as a numeric zero."),
|
|
387
|
+
z2.strictObject({ number: boundedNumber.describe("Value in the declared series or chart unit."), ...cellMetaSchema }).describe("Numeric cell with optional per-cell formatting and labels."),
|
|
388
|
+
z2.strictObject({ pct: boundedNumber.describe("Percentage points: 50.5 means 50.5%, not a fractional 0.505."), ...cellMetaSchema }).describe("Percentage cell with optional per-cell formatting and labels."),
|
|
389
|
+
z2.strictObject({ date: z2.string().describe("Date text intended as ISO 8601; this shared schema checks its string type only.") }).describe("Date cell expressed as ISO 8601 text.")
|
|
390
|
+
]).describe("A numeric shorthand, missing value, numeric cell, percentage cell or date cell."), DETAIL_LIMITS = { fields: 20, text: 200 }, cellDetailsSchema = z2.preprocess((raw, ctx) => (raw !== null && typeof raw == "object" && Object.hasOwn(raw, "__proto__") && ctx.addIssue({ code: "custom", input: raw, message: "'__proto__' cannot name a detail; choose another key" }), raw), z2.record(
|
|
391
|
+
z2.string().min(1).max(64).describe("Detail key; options.detailFields names its label and format."),
|
|
392
|
+
z2.union([
|
|
638
393
|
boundedNumber.describe("Number, printed through the detailFields format of its key."),
|
|
639
|
-
|
|
640
|
-
|
|
394
|
+
z2.string().max(DETAIL_LIMITS.text).describe(`Text up to ${DETAIL_LIMITS.text} characters, printed as plain text.`),
|
|
395
|
+
z2.null().describe("Missing detail, printed as no observation.")
|
|
641
396
|
])
|
|
642
|
-
).refine((details) => Object.keys(details).length <= DETAIL_LIMITS.fields, { message: `a cell carries at most ${DETAIL_LIMITS.fields} details` })).describe("Extra facts for this value that the chart does not draw: the hover card and the keyboard reading list them after the value, labelled and formatted by options.detailFields. The static SVG draws the same picture with or without them."), detailCellSchema =
|
|
397
|
+
).refine((details) => Object.keys(details).length <= DETAIL_LIMITS.fields, { message: `a cell carries at most ${DETAIL_LIMITS.fields} details` })).describe("Extra facts for this value that the chart does not draw: the hover card and the keyboard reading list them after the value, labelled and formatted by options.detailFields. The static SVG draws the same picture with or without them."), detailCellSchema = z2.union([
|
|
643
398
|
boundedNumber,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
]).describe("A numeric shorthand, missing value, numeric cell, percentage cell or date cell."), detailFieldsSchema =
|
|
649
|
-
key:
|
|
650
|
-
label:
|
|
399
|
+
z2.null().describe("Missing observation; never interpreted as a numeric zero. It carries no details."),
|
|
400
|
+
z2.strictObject({ number: boundedNumber.describe("Value in the declared series or chart unit."), ...cellMetaSchema, details: cellDetailsSchema.optional() }).describe("Numeric cell with optional per-cell formatting, labels and hover details."),
|
|
401
|
+
z2.strictObject({ pct: boundedNumber.describe("Percentage points: 50.5 means 50.5%, not a fractional 0.505."), ...cellMetaSchema, details: cellDetailsSchema.optional() }).describe("Percentage cell with optional per-cell formatting, labels and hover details."),
|
|
402
|
+
z2.strictObject({ date: z2.string().describe("Date text intended as ISO 8601; this shared schema checks its string type only.") }).describe("Date cell expressed as ISO 8601 text.")
|
|
403
|
+
]).describe("A numeric shorthand, missing value, numeric cell, percentage cell or date cell."), detailFieldsSchema = z2.array(z2.strictObject({
|
|
404
|
+
key: z2.string().min(1).max(64).describe("The details key in the cells."),
|
|
405
|
+
label: z2.string().trim().min(1).max(80).optional().describe("Label on the hover card; default the key."),
|
|
651
406
|
format: formatExample.optional().describe("Format-by-example for number details of this key, such as 1,234 or 0.0%."),
|
|
652
|
-
unit:
|
|
407
|
+
unit: z2.string().min(1).max(16).optional().describe("Unit joined to number details of this key as the marks join it, such as EUR.")
|
|
653
408
|
}).describe("One details key: its label, format and unit.")).max(DETAIL_LIMITS.fields).superRefine((fields, ctx) => {
|
|
654
409
|
let seen = /* @__PURE__ */ new Set();
|
|
655
410
|
fields.forEach((field, index) => {
|
|
656
411
|
seen.has(field.key) && ctx.addIssue({ code: "custom", path: [index, "key"], message: `detailFields repeats key '${field.key}'` }), seen.add(field.key);
|
|
657
412
|
});
|
|
658
|
-
}), subtitleSchema =
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
company:
|
|
662
|
-
measure:
|
|
663
|
-
period:
|
|
664
|
-
scenarios:
|
|
413
|
+
}), subtitleSchema = z2.union([
|
|
414
|
+
z2.string().describe("Measure text shorthand; normalized to an object with this measure."),
|
|
415
|
+
z2.object({
|
|
416
|
+
company: z2.string().optional().describe("Company or scope text before the measure."),
|
|
417
|
+
measure: z2.string().describe("Measure named by the subtitle; options.unit supplies its unit."),
|
|
418
|
+
period: z2.string().optional().describe("Reporting period text after the measure."),
|
|
419
|
+
scenarios: z2.array(z2.string().describe("Scenario text to append, such as AC or FC; arbitrary authored strings are accepted.")).optional().describe('Scenario captions in authored order, printed as their own segment joined with "vs": "\u2026 \xB7 6 Jul to 4 Oct \xB7 AC vs PL".')
|
|
665
420
|
}).describe("Structured subtitle with measure and optional company, period and scenarios.")
|
|
666
421
|
]).describe("Visible measure subtitle, authored as text or structured fields."), MIN_CANVAS_WIDTH = 100, MIN_CANVAS_HEIGHT = 24, MIN_PLOT_SIZE = 10;
|
|
667
422
|
function addCanvasBoundsIssues(options, ctx) {
|
|
@@ -677,12 +432,12 @@ function addCanvasBoundsIssues(options, ctx) {
|
|
|
677
432
|
message: `top and bottom margins must leave at least ${MIN_PLOT_SIZE}px of plot height`
|
|
678
433
|
});
|
|
679
434
|
}
|
|
680
|
-
var renderTargetSchema =
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
width:
|
|
684
|
-
height:
|
|
685
|
-
unit:
|
|
435
|
+
var renderTargetSchema = z2.enum(["report", "dashboard", "slide", "print"]).describe("Reading context. Default report."), textScaleSchema = z2.number().min(TEXT_SCALE_RANGE.min).max(TEXT_SCALE_RANGE.max).describe("Text scale; 1 (default) keeps the target sizes, 1.25 sets every text 25 % larger, from 0.5 to 2.5. It scales the width-class size; textSize gives equal text across charts. A factor under 1 stops each text at the target floor."), textSizeSchema = z2.number().min(TEXT_SIZE_RANGE.min).max(TEXT_SIZE_RANGE.max).describe("Primary label size in layout px, 6 to 32, the same at every width; other text keeps its ratio. Not with textScale."), sizeSchema = z2.union([
|
|
436
|
+
z2.enum(Object.keys(SIZE_PRESETS)).describe("Geometry preset; does not select a target. Existing pixel dimensions stay unchanged. A4 content presets are 267 by 180 mm and 180 by 267 mm."),
|
|
437
|
+
z2.object({
|
|
438
|
+
width: z2.number().finite().positive().describe("Canvas width in the stated unit; at least 100 layout px after conversion."),
|
|
439
|
+
height: z2.number().finite().positive().optional().describe("Canvas height in the stated unit; at least 24 layout px after conversion. Omitted, height stays automatic."),
|
|
440
|
+
unit: z2.enum(["px", "pt", "mm"]).optional().describe("Dimension unit. Default px. One pt is 96/72 layout px; one mm is 96/25.4 layout px.")
|
|
686
441
|
}).superRefine((size, ctx) => {
|
|
687
442
|
for (let [side, minimum] of [["width", MIN_CANVAS_WIDTH], ["height", MIN_CANVAS_HEIGHT]]) {
|
|
688
443
|
let value = size[side];
|
|
@@ -728,17 +483,17 @@ function addAnnotationFormatIssues(annotation, ctx) {
|
|
|
728
483
|
return;
|
|
729
484
|
}
|
|
730
485
|
let mode = Object.hasOwn(annotation, "mode") ? annotation.mode : void 0;
|
|
731
|
-
(annotation.kind === "cagr" || annotation.kind === "diff" && mode !== "absolute") && unit !== "percent" && issue(`${annotation.kind === "cagr" ? "a cagr" :
|
|
486
|
+
(annotation.kind === "cagr" || annotation.kind === "diff" && mode !== "absolute" && mode !== "both" || annotation.kind === "delta" && mode === "relative") && unit !== "percent" && issue(`${annotation.kind === "cagr" ? "a cagr" : `a relative ${annotation.kind}`} prints a percent, so its format is a percent example such as +0.0% or +0.00%`), annotation.kind === "diff" && (mode === "absolute" || mode === "both") && unit === "percent" && issue(`${mode === "both" ? "a diff in mode 'both'" : "an absolute diff"} prints the difference in the values' unit; a difference of two percent levels is in percentage points, written +1.0pp`);
|
|
732
487
|
}
|
|
733
|
-
var eventOptionsSchema =
|
|
734
|
-
placement:
|
|
735
|
-
rows:
|
|
736
|
-
groups:
|
|
737
|
-
|
|
488
|
+
var eventOptionsSchema = z2.strictObject({
|
|
489
|
+
placement: z2.enum(["auto", "key"]).optional().describe("auto uses lane then key, key uses key only. 'auto' (default) sets events in the lane above the plot where they fit and numbers the rest into the key below it; 'key' draws every event as a numbered marker with its entry in the key. Under footnotes: false there is no key: those events are left off and listed in the footnotes-off lint.").meta({ default: "auto" }),
|
|
490
|
+
rows: z2.number().int().min(0).max(2).optional().describe("Lane rows for event blocks. Default by canvas width: 1 under 1080px, 2 from 1080px. 0 draws numbered markers only. A row gives way while the plot band left under the lane would keep less than 40% of the canvas height.").meta({ "x-boardplot-defaultDependsOn": ["size"] }),
|
|
491
|
+
groups: z2.array(
|
|
492
|
+
z2.strictObject({
|
|
738
493
|
id: idSchema.describe("Group id that events name in their group field."),
|
|
739
|
-
label:
|
|
740
|
-
tone:
|
|
741
|
-
glyph:
|
|
494
|
+
label: z2.string().min(1).describe("Kind label printed in the block header and the key, such as Out of stock."),
|
|
495
|
+
tone: z2.enum(["neutral", "bad", "good"]).optional().describe("Colour of the glyph, the marker ring and the period bar; default neutral. An event tone overrides it.").meta({ default: "neutral" }),
|
|
496
|
+
glyph: z2.enum(["dot", "triangle", "diamond", "square"]).optional().describe("Shape that marks the kind without colour; default by group order: dot, triangle, diamond, square.")
|
|
742
497
|
})
|
|
743
498
|
).optional().superRefine((groups, ctx) => {
|
|
744
499
|
let seen = /* @__PURE__ */ new Set();
|
|
@@ -746,7 +501,7 @@ var eventOptionsSchema = z3.strictObject({
|
|
|
746
501
|
seen.has(group.id) && ctx.addIssue({ code: "custom", path: [index, "id"], message: `duplicate event group id '${group.id}'` }), seen.add(group.id);
|
|
747
502
|
});
|
|
748
503
|
}).describe("Kinds of events, authored once: label, tone and glyph."),
|
|
749
|
-
keyTitle:
|
|
504
|
+
keyTitle: z2.string().min(1).optional().describe("Heading printed over the event key.")
|
|
750
505
|
}).describe("Event lane and key. Events are annotations of kind event with at or date, an optional end or to for a period, group, detail, priority and, on column, combo and line charts only, items (more changes on the same date). Gantt events take one label and refuse items.");
|
|
751
506
|
function addCalloutHeadIssues(annotation, ctx) {
|
|
752
507
|
for (let field of ["headline", "arrow"]) {
|
|
@@ -757,9 +512,13 @@ function addCalloutHeadIssues(annotation, ctx) {
|
|
|
757
512
|
annotation.kind === "callout" && annotation.arrow === !0 && (annotation.icon !== void 0 || annotation.status !== void 0) && ctx.addIssue({ code: "custom", path: ["arrow"], message: "a callout with an icon or status leads from its chip, so the arrow would draw nothing; drop arrow or the glyph" });
|
|
758
513
|
}
|
|
759
514
|
var ANNOTATION_FIELDS = {
|
|
515
|
+
text: ["at"],
|
|
516
|
+
line: ["from", "to", "dashed"],
|
|
517
|
+
arrow: ["from", "to", "dashed"],
|
|
518
|
+
box: ["from", "to", "dashed"],
|
|
760
519
|
diff: ["from", "to", "mode", "placement", "caption"],
|
|
761
520
|
cagr: ["from", "to", "suffix", "period", "shape"],
|
|
762
|
-
delta: ["at", "vs", "placement", "caption"],
|
|
521
|
+
delta: ["at", "vs", "mode", "placement", "caption"],
|
|
763
522
|
bracket: ["from", "to", "label"],
|
|
764
523
|
abs: ["at"],
|
|
765
524
|
note: ["at", "icon", "status"],
|
|
@@ -768,7 +527,52 @@ var ANNOTATION_FIELDS = {
|
|
|
768
527
|
indicator100: ["side"],
|
|
769
528
|
event: ["at", "date", "to", "end", "label", "detail", "items", "group", "tone", "placement", "labelPlacement"],
|
|
770
529
|
band: ["from", "to", "label", "tone", "style", "divider", "low", "high", "value", "seriesId", "scenario", "direction"]
|
|
771
|
-
}, SHARED_ANNOTATION_FIELDS = ["kind", "id", "text", "format", "priority", "icon", "status", "headline", "arrow"], ANCHOR_FIELDS = { diff: ["from", "to"], bracket: ["from", "to"], cagr: ["from", "to"], delta: ["at", "vs"], abs: ["at"], note: ["at"], callout: ["at"], event: ["at"] }, ANCHOR_SHAPE = "a category id such as 'c1', { categoryId, seriesId? }, { pointId } on scatter, or { valueLineId }", ANCHOR_KEYS = ["categoryId", "seriesId", "segmentId", "edge", "pointId", "valueLineId"]
|
|
530
|
+
}, annotationKindTakes = (kind, field) => Object.hasOwn(ANNOTATION_FIELDS, kind) && ANNOTATION_FIELDS[kind].includes(field), SHARED_ANNOTATION_FIELDS = ["kind", "id", "text", "format", "priority", "icon", "status", "headline", "arrow"], ANCHOR_FIELDS = { text: ["at"], line: ["from", "to"], arrow: ["from", "to"], box: ["from", "to"], diff: ["from", "to"], bracket: ["from", "to"], cagr: ["from", "to"], delta: ["at", "vs"], abs: ["at"], note: ["at"], callout: ["at"], event: ["at"] }, ANCHOR_SHAPE = "a category id such as 'c1', { categoryId, seriesId? }, { pointId } on scatter, or { valueLineId }", ANCHOR_KEYS = ["categoryId", "seriesId", "segmentId", "edge", "pointId", "valueLineId"], DRAWING_FIELDS = {
|
|
531
|
+
text: ["at", "text", "id", "priority"],
|
|
532
|
+
line: ["from", "to", "dashed", "id"],
|
|
533
|
+
arrow: ["from", "to", "dashed", "id"],
|
|
534
|
+
box: ["from", "to", "dashed", "id"]
|
|
535
|
+
};
|
|
536
|
+
function addDrawingIssues(annotation, ctx, timeX) {
|
|
537
|
+
let kind = String(annotation.kind), fields = DRAWING_FIELDS[kind], takes = `a ${kind} takes ${fields.join(", ")}`;
|
|
538
|
+
for (let key of Object.keys(annotation)) {
|
|
539
|
+
if (key === "kind" || fields.includes(key)) continue;
|
|
540
|
+
let near = misspelledField(key, fields);
|
|
541
|
+
ctx.addIssue({ code: "custom", path: [key], message: near ? `unknown ${kind} field '${key}' \u2014 try: ${near}` : `${takes}, not '${key}'; drop '${key}'`, params: near ? { renameTo: near } : { refused: !0 } });
|
|
542
|
+
}
|
|
543
|
+
for (let field of ANCHOR_FIELDS[kind]) {
|
|
544
|
+
let point = annotation[field];
|
|
545
|
+
if (point === void 0) {
|
|
546
|
+
ctx.addIssue({ code: "custom", path: [field], message: `a ${kind} needs '${field}', a point: ${ANCHOR_SHAPE}, or { categoryId, value }${kind === "line" || kind === "arrow" ? ", or { annotationId } of a text" : ""}` });
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
if (typeof point == "object" && point !== null && !Array.isArray(point) && Object.hasOwn(point, "annotationId")) {
|
|
550
|
+
if (kind !== "line" && kind !== "arrow") {
|
|
551
|
+
ctx.addIssue({ code: "custom", path: [field, "annotationId"], message: `a ${kind}'s '${field}' is a data point; { annotationId } is an end of a line or an arrow`, params: { refused: !0 } });
|
|
552
|
+
continue;
|
|
553
|
+
}
|
|
554
|
+
let { annotationId } = point;
|
|
555
|
+
(typeof annotationId != "string" || annotationId === "") && ctx.addIssue({ code: "custom", path: [field, "annotationId"], message: "annotationId names a text annotation by its id, a non-empty string" });
|
|
556
|
+
for (let key of Object.keys(point).filter((name) => name !== "annotationId"))
|
|
557
|
+
ctx.addIssue({ code: "custom", path: [field, key], message: `an end on a text takes annotationId only, not '${key}'`, params: { refused: !0 } });
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
if (typeof point != "object" || point === null || Array.isArray(point) || !Object.hasOwn(point, "value")) {
|
|
561
|
+
if (!isAnchorRef(point, timeX)) ctx.addIssue({ code: "custom", path: [field], message: `'${field}' is a point: ${ANCHOR_SHAPE}, or { categoryId, value }${timeX ? ", or epoch milliseconds on a time axis" : ""}` });
|
|
562
|
+
else if (typeof point == "object" && point !== null)
|
|
563
|
+
for (let key of Object.keys(point).filter((name) => !ANCHOR_KEYS.includes(name))) {
|
|
564
|
+
let near = misspelledField(key, [...ANCHOR_KEYS, "value"]);
|
|
565
|
+
ctx.addIssue({ code: "custom", path: [field, key], message: near ? `unknown point field '${key}' \u2014 try: ${near}` : `unknown point field '${key}'; a point takes ${ANCHOR_KEYS.join(", ")}, or categoryId and value`, params: near ? { renameTo: near } : { refused: !0 } });
|
|
566
|
+
}
|
|
567
|
+
continue;
|
|
568
|
+
}
|
|
569
|
+
let { categoryId, value } = point;
|
|
570
|
+
typeof value == "number" && Number.isFinite(value) || ctx.addIssue({ code: "custom", path: [field, "value"], message: `the value of '${field}' is a finite number in axis units` }), !(typeof categoryId == "string" && categoryId !== "") && !(timeX && typeof categoryId == "number" && Number.isFinite(categoryId)) && ctx.addIssue({ code: "custom", path: [field, "categoryId"], message: "a point with a value needs its categoryId" });
|
|
571
|
+
for (let key of Object.keys(point).filter((name) => name !== "categoryId" && name !== "value"))
|
|
572
|
+
ctx.addIssue({ code: "custom", path: [field, key], message: `a point with a value takes categoryId and value, not '${key}'`, params: { refused: !0 } });
|
|
573
|
+
}
|
|
574
|
+
kind === "text" && (typeof annotation.text != "string" || annotation.text.trim() === "") && ctx.addIssue({ code: "custom", path: ["text"], message: "a text annotation needs its text, a non-empty string" }), Object.hasOwn(annotation, "dashed") && typeof annotation.dashed != "boolean" && ctx.addIssue({ code: "custom", path: ["dashed"], message: `${kind} dashed is true or false` });
|
|
575
|
+
}
|
|
772
576
|
function isAnchorRef(value, timeX = !1) {
|
|
773
577
|
return typeof value == "string" ? value !== "" : timeX && typeof value == "number" ? Number.isFinite(value) : typeof value == "object" && value !== null && !Array.isArray(value) && ["categoryId", "pointId", "valueLineId"].some((key) => typeof value[key] == "string" || timeX && key === "categoryId" && typeof value[key] == "number" && Number.isFinite(value[key]));
|
|
774
578
|
}
|
|
@@ -779,6 +583,9 @@ function misspelledField(key, fields) {
|
|
|
779
583
|
return letters(candidate) === letters(lower) || levenshtein(candidate, lower) <= 1;
|
|
780
584
|
});
|
|
781
585
|
}
|
|
586
|
+
function labelConflict(annotation) {
|
|
587
|
+
return ["valueLine", "band", "event"].includes(annotation.kind) && Object.hasOwn(annotation, "label") && annotation.label !== annotation.text;
|
|
588
|
+
}
|
|
782
589
|
function addAnnotationFieldIssues(annotation, ctx, timeX = !1) {
|
|
783
590
|
let kind = String(annotation.kind), fields = ANNOTATION_FIELDS[kind] ?? [];
|
|
784
591
|
for (let key of Object.keys(annotation)) {
|
|
@@ -787,7 +594,7 @@ function addAnnotationFieldIssues(annotation, ctx, timeX = !1) {
|
|
|
787
594
|
ctx.addIssue({
|
|
788
595
|
code: "custom",
|
|
789
596
|
path: [key],
|
|
790
|
-
message: near ? `unknown ${kind} field '${key}' \u2014 try: ${near}` : `unknown ${kind} field '${key}'; a ${kind} takes ${[...fields, "id", ...
|
|
597
|
+
message: near ? `unknown ${kind} field '${key}' \u2014 try: ${near}` : `unknown ${kind} field '${key}'; a ${kind} takes ${[...fields, "id", ...["valueLine", "indicator100", "band", "event"].includes(kind) ? [] : ["text"], "format", "priority"].join(", ")}`,
|
|
791
598
|
params: near ? { renameTo: near } : { refused: !0 }
|
|
792
599
|
});
|
|
793
600
|
}
|
|
@@ -809,16 +616,20 @@ function addAnnotationFieldIssues(annotation, ctx, timeX = !1) {
|
|
|
809
616
|
}
|
|
810
617
|
kind === "valueLine" && Object.hasOwn(annotation, "value") && annotation.value !== "mean" && !(typeof annotation.value == "number" && Number.isFinite(annotation.value)) && ctx.addIssue({ code: "custom", path: ["value"], message: "a valueLine value is a finite number or 'mean'" });
|
|
811
618
|
}
|
|
812
|
-
var existingAnnotationSchema = (timeX = !1) =>
|
|
813
|
-
kind:
|
|
814
|
-
id:
|
|
815
|
-
text:
|
|
816
|
-
format:
|
|
817
|
-
priority:
|
|
619
|
+
var existingAnnotationSchema = (timeX = !1) => z2.object({
|
|
620
|
+
kind: z2.enum(["diff", "cagr", "delta", "bracket", "abs", "note", "callout", "valueLine", "indicator100", "event", "text", "line", "arrow", "box"]).describe("Annotation operation; its anchors and additional fields are checked by the chart annotation pass."),
|
|
621
|
+
id: z2.string().optional().describe("Stable annotation identity; omission generates an id from kind and authored order."),
|
|
622
|
+
text: z2.string().optional().describe("Authored annotation text; on valueLine and event, text is read as label with an info warning when label is absent or equal, and refused beside a different label. Refused on indicator100, line, arrow and box. On a text annotation it is the text itself, and ${value} prints as written. Elsewhere ${value} prints the computed number in it: a cagr's rate with its suffix, a diff's change, a delta's difference, the anchored value of an abs, note or callout; a note or callout on a mark that prints the same number leaves it to the mark and reports annotation-value-on-mark. Without ${value}, text on a cagr, diff, delta or abs replaces the number, warns annotation-authored-override and the claim record marks the override."),
|
|
623
|
+
format: z2.string().optional().describe("Number format: annotation > anchored series > chart. Diff uses to, then from. CAGR, a relative or reversed diff and a relative delta need a percent example; value differences, also under mode both, use pp for percent levels. Refused on event, indicator100, text, line, arrow and box."),
|
|
624
|
+
priority: z2.number().optional().describe("Annotation label priority during collision resolution. Refused on line, arrow and box."),
|
|
818
625
|
icon: annotationIconSchema.optional().describe("Registered icon for note or callout annotations; cannot be combined with status."),
|
|
819
|
-
status:
|
|
820
|
-
shape:
|
|
821
|
-
}).catchall(
|
|
626
|
+
status: z2.enum(["good", "bad", "warn", "info"]).optional().describe("Semantic status glyph for a note or callout; cannot be combined with icon."),
|
|
627
|
+
shape: z2.enum(["bracket", "arrow"]).optional().describe("A cagr's form: 'bracket', the default, runs over the marks, and 'arrow' is one straight arrow with the rate in an oval on it.")
|
|
628
|
+
}).catchall(z2.unknown().describe("Kind-specific annotation field, such as at, from or to; the annotation pass validates anchors and other requirements.")).superRefine((annotation, ctx) => {
|
|
629
|
+
if (annotation.kind === "text" || annotation.kind === "line" || annotation.kind === "arrow" || annotation.kind === "box") {
|
|
630
|
+
addDrawingIssues(annotation, ctx, timeX);
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
822
633
|
if (addAnnotationFieldIssues(annotation, ctx, timeX), annotation.icon && annotation.status && ctx.addIssue({
|
|
823
634
|
code: "custom",
|
|
824
635
|
path: ["icon"],
|
|
@@ -827,22 +638,26 @@ var existingAnnotationSchema = (timeX = !1) => z3.object({
|
|
|
827
638
|
code: "custom",
|
|
828
639
|
path: [annotation.icon ? "icon" : "status"],
|
|
829
640
|
message: "annotation glyphs are supported only on callout and note annotations"
|
|
830
|
-
}), annotation.kind === "
|
|
641
|
+
}), annotation.kind === "delta" && Object.hasOwn(annotation, "mode")) {
|
|
642
|
+
let mode = annotation.mode;
|
|
643
|
+
mode !== "absolute" && mode !== "relative" && mode !== "both" && ctx.addIssue({ code: "custom", path: ["mode"], message: `unknown delta mode '${String(mode)}' \u2014 expected 'absolute', 'relative' or 'both'` });
|
|
644
|
+
}
|
|
645
|
+
if (annotation.kind === "diff") {
|
|
831
646
|
let mode = Object.hasOwn(annotation, "mode") ? annotation.mode : void 0;
|
|
832
|
-
mode !== void 0 && mode !== "relative" && mode !== "absolute" && mode !== "reversed" && ctx.addIssue({
|
|
647
|
+
mode !== void 0 && mode !== "relative" && mode !== "absolute" && mode !== "reversed" && mode !== "both" && ctx.addIssue({
|
|
833
648
|
code: "custom",
|
|
834
649
|
path: ["mode"],
|
|
835
|
-
message: mode === "pctOf100" ? "diff mode 'pctOf100' is not implemented \u2014 annotation anchors resolve to absolute values, so the engine cannot derive share percentage points; use mode:'absolute' for the raw difference, or author the shares as data if the reader needs points of 100%" : `unknown diff mode '${String(mode)}' \u2014 expected 'relative', 'absolute' or '
|
|
650
|
+
message: mode === "pctOf100" ? "diff mode 'pctOf100' is not implemented \u2014 annotation anchors resolve to absolute values, so the engine cannot derive share percentage points; use mode:'absolute' for the raw difference, or author the shares as data if the reader needs points of 100%" : `unknown diff mode '${String(mode)}' \u2014 expected 'relative', 'absolute', 'reversed' or 'both'`
|
|
836
651
|
});
|
|
837
652
|
}
|
|
838
653
|
if (annotation.kind === "event" && addEventIssues(annotation, ctx, timeX), annotation.kind === "delta" || annotation.kind === "diff") {
|
|
839
654
|
let { placement, caption } = annotation;
|
|
840
655
|
Object.hasOwn(annotation, "placement") && placement !== "auto" && placement !== "label" && placement !== "bracket" && ctx.addIssue({ code: "custom", path: ["placement"], message: `${annotation.kind} placement is 'auto', 'label' or 'bracket'` }), Object.hasOwn(annotation, "caption") && (typeof caption != "string" || caption.trim() === "") && ctx.addIssue({ code: "custom", path: ["caption"], message: `${annotation.kind} caption is a non-empty string` });
|
|
841
656
|
}
|
|
842
|
-
if ((annotation.kind === "indicator100" ||
|
|
657
|
+
if ((annotation.kind === "indicator100" || labelConflict(annotation)) && Object.hasOwn(annotation, "text") && ctx.addIssue({
|
|
843
658
|
code: "custom",
|
|
844
659
|
path: ["text"],
|
|
845
|
-
message: annotation.kind === "
|
|
660
|
+
message: annotation.kind === "indicator100" ? "an indicator100 prints a fixed '100%' and no authored text; drop 'text'" : `${annotation.kind === "event" ? "an" : "a"} ${annotation.kind} prints label, not text; drop 'text', label is set`,
|
|
846
661
|
params: { refused: !0 }
|
|
847
662
|
}), addCalloutHeadIssues(annotation, ctx), annotation.format !== void 0 && addAnnotationFormatIssues(annotation, ctx), annotation.kind === "cagr" && Object.hasOwn(annotation, "period") && typeof annotation.period != "boolean" && ctx.addIssue({ code: "custom", path: ["period"], message: "cagr period is true or false" }), annotation.kind === "valueLine") {
|
|
848
663
|
Object.hasOwn(annotation, "valueKind") && (annotation.valueKind !== "fraction" || typeof annotation.value != "number") && ctx.addIssue({ code: "custom", path: ["valueKind"], message: "valueLine valueKind 'fraction' needs a numeric value" });
|
|
@@ -869,29 +684,29 @@ var existingAnnotationSchema = (timeX = !1) => z3.object({
|
|
|
869
684
|
message: "tolerance and attainment are primary-axis only"
|
|
870
685
|
});
|
|
871
686
|
}
|
|
872
|
-
}).describe("Data-bound annotation. Additional kind-specific fields, including required anchors, are checked by the annotation pass."), bandAnnotationSchema = (timeX = !1) =>
|
|
873
|
-
kind:
|
|
874
|
-
id:
|
|
875
|
-
text:
|
|
687
|
+
}).describe("Data-bound annotation. Additional kind-specific fields, including required anchors, are checked by the annotation pass."), bandAnnotationSchema = (timeX = !1) => z2.object({
|
|
688
|
+
kind: z2.literal("band").describe("Era band spanning inclusive category ids, or a value-axis plan corridor, tolerance band or attainment fill."),
|
|
689
|
+
id: z2.string().optional().describe("Stable band annotation identity; omission generates an id from kind and authored order."),
|
|
690
|
+
text: z2.string().optional().describe("Read as label with an info warning when label is absent or equal; refused beside a different label."),
|
|
876
691
|
format: formatExample.optional().describe("Shared annotation value format; the band caption itself is authored text."),
|
|
877
|
-
priority:
|
|
878
|
-
from: (timeX ?
|
|
879
|
-
to: (timeX ?
|
|
880
|
-
label:
|
|
881
|
-
tone:
|
|
882
|
-
style:
|
|
883
|
-
divider:
|
|
884
|
-
|
|
885
|
-
|
|
692
|
+
priority: z2.number().optional().describe("Band label priority during collision resolution."),
|
|
693
|
+
from: (timeX ? z2.union([idSchema, z2.number().finite()]) : idSchema).optional().describe("First category included in the band; required for era shade/bracket, optional clip for value-axis bands." + (timeX ? " A time axis also takes epoch milliseconds." : "")),
|
|
694
|
+
to: (timeX ? z2.union([idSchema, z2.number().finite()]) : idSchema).optional().describe("Last category included in the band; required for era shade/bracket, optional clip for value-axis bands." + (timeX ? " A time axis also takes epoch milliseconds." : "")),
|
|
695
|
+
label: z2.string().optional().describe("Optional period or corridor label."),
|
|
696
|
+
tone: z2.enum(["neutral", "muted"]).optional().describe("Semantic era-band tone; both use the theme others tint. Refused on corridor, tolerance and attainment."),
|
|
697
|
+
style: z2.enum(["shade", "bracket", "corridor", "tolerance", "attainment"]).optional().describe("Band presentation; 'shade' is the default category tint, 'bracket' is a double-headed period arrow, 'corridor' is a plan value band, 'tolerance' is an authored value range, 'attainment' shades actual versus plan."),
|
|
698
|
+
divider: z2.union([
|
|
699
|
+
z2.literal(!1).describe("Do not draw category-span edge dividers."),
|
|
700
|
+
z2.enum(["start", "end", "both"]).describe("Draw a divider at the selected category-span edges.")
|
|
886
701
|
]).optional().describe("Optional dashed divider at one or both bracket-band edges; other band styles refuse this field."),
|
|
887
|
-
low:
|
|
888
|
-
high:
|
|
889
|
-
value:
|
|
702
|
+
low: z2.number().finite().optional().describe("Lower value-axis bound for corridor and tolerance bands."),
|
|
703
|
+
high: z2.number().finite().optional().describe("Upper value-axis bound for corridor and tolerance bands."),
|
|
704
|
+
value: z2.number().finite().optional().describe("Plan value for attainment shading; actuals are resolved per category."),
|
|
890
705
|
seriesId: idSchema.optional().describe("Series whose actuals are shaded for attainment; omission uses the category total."),
|
|
891
|
-
scenario:
|
|
892
|
-
direction:
|
|
893
|
-
}).catchall(
|
|
894
|
-
addAnnotationFieldIssues(band, ctx, timeX);
|
|
706
|
+
scenario: z2.enum(["AC", "PY", "PL", "FC"]).optional().describe("Scenario notation for a plan corridor; default PL. LY means PY (last year); codes accept any case."),
|
|
707
|
+
direction: z2.enum(["higherIsBetter", "lowerIsBetter"]).optional().describe("Whether exceeding the plan is favorable for attainment shading; default higherIsBetter.")
|
|
708
|
+
}).catchall(z2.unknown()).superRefine((band, ctx) => {
|
|
709
|
+
addAnnotationFieldIssues(band, ctx, timeX), labelConflict(band) && Object.hasOwn(band, "text") && ctx.addIssue({ code: "custom", path: ["text"], message: "a band prints label, not text; drop 'text', label is set", params: { refused: !0 } });
|
|
895
710
|
let style = band.style ?? "shade";
|
|
896
711
|
if (!(style === "corridor" || style === "tolerance" || style === "attainment")) {
|
|
897
712
|
band.from === void 0 && ctx.addIssue({ code: "custom", path: ["from"], message: "era band needs inclusive category from and to" }), band.to === void 0 && ctx.addIssue({ code: "custom", path: ["to"], message: "era band needs inclusive category from and to" }), (band.low !== void 0 || band.high !== void 0) && ctx.addIssue({
|
|
@@ -954,9 +769,9 @@ var existingAnnotationSchema = (timeX = !1) => z3.object({
|
|
|
954
769
|
path: ["value"],
|
|
955
770
|
message: "attainment needs a finite plan 'value'"
|
|
956
771
|
});
|
|
957
|
-
}).describe("Unclaimed background era band, plan corridor, tolerance band or attainment fill."), annotationSchema =
|
|
772
|
+
}).describe("Unclaimed background era band, plan corridor, tolerance band or attainment fill."), annotationSchema = z2.union([existingAnnotationSchema(), bandAnnotationSchema()]).describe("Data-bound annotation or category-span band; supported kinds depend on the selected chart type."), timeAnnotationSchema = z2.union([existingAnnotationSchema(!0), bandAnnotationSchema(!0)]).describe("Data-bound annotation on a time axis; x anchors accept ISO strings or epoch milliseconds.");
|
|
958
773
|
function annotationArraySchema(itemSchema) {
|
|
959
|
-
return
|
|
774
|
+
return z2.array(itemSchema).superRefine((annotations, ctx) => {
|
|
960
775
|
let firstPosition = /* @__PURE__ */ new Map();
|
|
961
776
|
annotations.forEach((annotation, index) => {
|
|
962
777
|
if (typeof annotation != "object" || annotation === null || !("id" in annotation) || typeof annotation.id != "string")
|
|
@@ -983,362 +798,367 @@ function addProjectedDashIssues(ctx, series, basePath = ["series"]) {
|
|
|
983
798
|
});
|
|
984
799
|
});
|
|
985
800
|
}
|
|
986
|
-
var derivedRatioTierSchema =
|
|
801
|
+
var derivedRatioTierSchema = z2.object({
|
|
987
802
|
id: idSchema.describe("Stable id for the derived ratio tier."),
|
|
988
|
-
label:
|
|
803
|
+
label: z2.string().min(1).describe("Quiet caption explaining what the ratio badges measure."),
|
|
989
804
|
numeratorSeriesId: idSchema.describe("Series used as the computed ratio numerator."),
|
|
990
805
|
denominatorSeriesId: idSchema.describe("Series used as the computed ratio denominator."),
|
|
991
|
-
at:
|
|
806
|
+
at: z2.array(idSchema).min(1).describe("Selected category ids that receive a computed ratio trace."),
|
|
992
807
|
format: formatExample.min(1).optional().describe("Format-by-example for computed percentage points, e.g. '1.2pp' or '88%'."),
|
|
993
|
-
direction:
|
|
808
|
+
direction: z2.enum(["higherIsBetter", "lowerIsBetter"]).optional().describe("Whether an increase in the computed ratio is favourable; controls semantic treatment where supported.")
|
|
994
809
|
}).strict().describe(
|
|
995
810
|
"Below-axis ratio tier computed from normalized chart series cells; authored ratio values are not accepted."
|
|
996
|
-
), marginSchema =
|
|
997
|
-
top:
|
|
998
|
-
right:
|
|
999
|
-
bottom:
|
|
1000
|
-
left:
|
|
811
|
+
), marginSchema = z2.object({
|
|
812
|
+
top: z2.number().finite().nonnegative().optional().describe("Top outer margin in pixels; omission uses chart or theme defaults."),
|
|
813
|
+
right: z2.number().finite().nonnegative().optional().describe("Right outer margin in pixels; omission uses chart or theme defaults."),
|
|
814
|
+
bottom: z2.number().finite().nonnegative().optional().describe("Bottom outer margin in pixels; omission uses chart or theme defaults."),
|
|
815
|
+
left: z2.number().finite().nonnegative().optional().describe("Left outer margin in pixels; omission uses chart or theme defaults.")
|
|
1001
816
|
}).describe("Optional per-side outer margins in pixels, applied before chart furniture reserves space.");
|
|
1002
817
|
function primaryAxisTitleSchema(where) {
|
|
1003
|
-
return
|
|
1004
|
-
primary:
|
|
818
|
+
return z2.strictObject({
|
|
819
|
+
primary: z2.string().trim().min(1).optional().describe("'Measure, unit' title of the value axis, e.g. 'Margin, %'.")
|
|
1005
820
|
}).optional().describe(`Title of the value axis when it is drawn: ${where}. Drawn only when authored.`);
|
|
1006
821
|
}
|
|
1007
|
-
var valueAxisSchema =
|
|
1008
|
-
show:
|
|
1009
|
-
min:
|
|
1010
|
-
max:
|
|
1011
|
-
tickStep:
|
|
1012
|
-
includeZero:
|
|
1013
|
-
percent:
|
|
1014
|
-
log:
|
|
1015
|
-
reverse:
|
|
1016
|
-
gridlines:
|
|
1017
|
-
break:
|
|
1018
|
-
from:
|
|
1019
|
-
to:
|
|
1020
|
-
style:
|
|
822
|
+
var valueAxisSchema = z2.object({
|
|
823
|
+
show: z2.boolean().optional().describe("Draw the value axis with its ticks. Default: shown unless every value is labelled; true keeps it beside the labels, false hides it."),
|
|
824
|
+
min: z2.number().optional().describe("Requested lower domain bound; chart data can widen it to avoid clipping values."),
|
|
825
|
+
max: z2.number().optional().describe("Requested upper domain bound; chart data can widen it to avoid clipping values."),
|
|
826
|
+
tickStep: z2.number().positive().optional().describe("Positive linear value-axis tick step. Ticks stand at multiples of the step and the domain extends to the next multiples without cutting data. Dot keeps its domain ends when at least two multiples fit inside. Steps giving fewer than 1 or more than 20 intervals use nice ticks and warn tick-step-ignored. Scatter applies it to Y only and warns on a log Y axis. Box ignores it with a warning; pareto and types without independent value-axis ticks refuse it."),
|
|
827
|
+
includeZero: z2.boolean().optional().describe("Include zero in the value domain; zero-based marks can require it even when false."),
|
|
828
|
+
percent: z2.boolean().optional().describe("Request the chart percent-axis or percentage presentation where supported; meanings and support follow the chart-specific schema."),
|
|
829
|
+
log: z2.union([z2.boolean(), z2.enum(["x", "y", "both"])]).optional().describe("A log10 scale on scatter and line. Scatter takes 'x', 'y', 'both' or true; line takes 'y' or true on its vertical axis. Ticks print numbers in the chart format at 1, 2 and 5 of each decade (3, 4, 6 and 8 too under one decade), down to the decades alone where labels would touch. Without authored bounds the domain normally ends on the nearest round number past the data. Every value on a log axis must be above zero. Line area and bump variants, percent, trend and phases cannot use a log axis."),
|
|
830
|
+
reverse: z2.boolean().optional().describe("Reverse the value-axis direction on line and scatter; box ignores it with a warning, and every other type refuses it."),
|
|
831
|
+
gridlines: z2.boolean().optional().describe("Show value-axis gridlines where supported; default false."),
|
|
832
|
+
break: z2.union([z2.literal("auto"), z2.literal(!1), z2.object({
|
|
833
|
+
from: z2.number().describe("Lower value bounding the omitted domain span."),
|
|
834
|
+
to: z2.number().describe("Upper value bounding the omitted domain span."),
|
|
835
|
+
style: z2.enum(["straight"]).optional().describe("Break glyph style: 'straight'.")
|
|
1021
836
|
}).superRefine((v, ctx) => {
|
|
1022
837
|
v.from < v.to || ctx.addIssue({ code: "custom", message: "break requires from < to" });
|
|
1023
838
|
}).describe(
|
|
1024
839
|
"Straight value-axis break; the omitted span collapses to a fixed 12px gap when valid."
|
|
1025
840
|
)]).describe("No break by default or with false. Waterfall and pvm alone accept 'auto' to choose a safe break; pvm defaults to 'auto' when its smaller total exceeds 10 times its largest step or its running levels span under 20% of the larger total; { from, to, style? } sets the omitted span. A valid straight break uses a fixed 12px gap and discloses the omitted range. Totals and levels stay visibly longer than smaller steps or segments and no shorter than equal ones. Unsafe automatic breaks move down when valid; unsafe authored breaks are ignored with a warning. An unbroken positive bridge gets an info hint when its smallest total divided by its largest step exceeds 10.").optional()
|
|
1026
|
-
}), keyPositionSchema =
|
|
841
|
+
}), keyPositionSchema = z2.enum(["top", "bottom", "right", "left"]).describe("Key position: 'top', one row above the plot, 'bottom', one row under it, or 'right' or 'left', a column beside the plot. A column beside the plot takes the plot's width: where the plot block would keep under 68% of the chart width, or the column does not fit the height, the key goes to the row above the plot with a legend-side-fallback warning.");
|
|
1027
842
|
function keyOptionSchema(values) {
|
|
1028
|
-
return
|
|
1029
|
-
|
|
1030
|
-
|
|
843
|
+
return z2.union([
|
|
844
|
+
z2.enum(values).describe("Suppress keys, select explicit placement, or let visible series names determine whether automatic keys are needed."),
|
|
845
|
+
z2.object({
|
|
1031
846
|
position: keyPositionSchema,
|
|
1032
|
-
order:
|
|
847
|
+
order: z2.array(idSchema).optional().describe("Legend item ids in the requested order; unspecified items follow.")
|
|
1033
848
|
}).describe("Explicit legend placement and optional item order.")
|
|
1034
849
|
]);
|
|
1035
850
|
}
|
|
1036
851
|
var topNFields = {
|
|
1037
|
-
n:
|
|
1038
|
-
rest:
|
|
1039
|
-
restLabel:
|
|
1040
|
-
showRestCount:
|
|
1041
|
-
threshold:
|
|
1042
|
-
}, topNCount =
|
|
852
|
+
n: z2.number().int().positive().describe("Maximum number of individually retained categories after chart-specific ranking."),
|
|
853
|
+
rest: z2.boolean().optional().describe("Aggregate remaining categories into a rest bucket by default; false omits them where supported. On a bar mekko the rest bucket is the width-weighted mean of its rates. Pareto retains the bucket to preserve its population."),
|
|
854
|
+
restLabel: z2.string().optional().describe("Authored rest-bucket name; ordinary charts default to Others and Pareto to Rest."),
|
|
855
|
+
showRestCount: z2.boolean().optional().describe("Append the number of aggregated categories; ordinary charts default to false, while Pareto always discloses the count."),
|
|
856
|
+
threshold: z2.number().optional().describe("Bar, column and table: minimum absolute category total after the rank cut, also when n keeps every category. The largest category always stays. Other types ignore it with an option-ignored warning.")
|
|
857
|
+
}, topNCount = z2.number().int().positive(), topNWithoutRestCount = optionShapeSchema("topN", z2.object({
|
|
1043
858
|
...topNFields,
|
|
1044
|
-
showRestCount:
|
|
1045
|
-
}), topNCount), baseOptionsSchema =
|
|
859
|
+
showRestCount: z2.never({ error: "'topN.showRestCount' has no rest bucket to count here; drop it" }).optional().describe("Retired: this chart draws no rest bucket. An old spec still draws and warns option-deprecated.")
|
|
860
|
+
}), topNCount), baseOptionsSchema = z2.object({
|
|
1046
861
|
target: renderTargetSchema.optional(),
|
|
1047
862
|
textScale: textScaleSchema.optional(),
|
|
1048
863
|
textSize: textSizeSchema.optional(),
|
|
1049
|
-
a11y:
|
|
1050
|
-
title:
|
|
1051
|
-
description:
|
|
1052
|
-
table:
|
|
864
|
+
a11y: z2.strictObject({
|
|
865
|
+
title: z2.boolean().optional().describe("Emit an SVG title element for hover text; default false. Accessible naming remains available."),
|
|
866
|
+
description: z2.string().min(1).optional().describe("Accessible description of the chart, in place of the generated one, in the SVG desc element and the React chart. Omitted: the description comes from the chart."),
|
|
867
|
+
table: z2.enum(["hidden", "toggle", "below"]).optional().describe("Record-derived accessible data table rendered by the React chart components: 'hidden' keeps it available to assistive technology only, 'toggle' adds a disclosure control, 'below' renders it visibly under the chart. BoardplotChart includes it in the server output; a per-type component adds it after mount. Omitted: no table. The SVG is unchanged.")
|
|
1053
868
|
}).optional().describe("Accessible presentation options; visible chart title is controlled separately by title."),
|
|
1054
|
-
mode:
|
|
1055
|
-
belowMinimum:
|
|
869
|
+
mode: z2.enum(["full", "compact"]).optional().describe("Presentation framing. Omitted: full at or above the chart minimum width, compact below it where the type draws there. Compact keeps the title at the theme smallest title size. Some chart-specific schemas use a different mode vocabulary."),
|
|
870
|
+
belowMinimum: z2.enum(["compact", "refuse"]).optional().describe("What a canvas below the chart minimum gets, on either axis, for the types with a compact floor: `measure` and `boardplot_describe` list it as `compactFloor`. 'compact' (default) draws the tight chart down to the floor: minimal labels, tight spacing, a smaller key, the whole title wrapped, and the subtitle dropped when the plot would be under 80 px. 'refuse' refuses below the minimum. On a canvas with a pinned size, a full-mode refusal for lack of room also falls back to compact under 'compact', and the chart is refused only when compact does not fit either. Types without a compact floor always refuse below their minimum, and every refusal names the minimum it needs.").meta({ default: "compact" }),
|
|
1056
871
|
size: sizeSchema.optional().describe("Frame or preset. Defaults: report 720x405 px and dashboard 480x270 px automatic; slide 1184x528 px and print 267x180 mm fixed. Below minimum refuses with a verified size."),
|
|
1057
872
|
// Embed claim (--embed-width twin). Strict: an `embed:{}` with no
|
|
1058
873
|
// width would arm nothing — a silent no-op option — and unknown
|
|
1059
874
|
// keys inside must refuse loudly rather than strip.
|
|
1060
|
-
embed:
|
|
875
|
+
embed: z2.strictObject({ width: z2.number().positive().describe("Expected display width in CSS pixels, used to assess effective text size after scaling.") }).optional().describe("Declared host display width for readability checks; does not change chart geometry."),
|
|
1061
876
|
margin: marginSchema.optional().describe("Outer canvas margins in pixels; omitted sides use chart or theme defaults. canvas.margin overrides supplied sides."),
|
|
1062
|
-
canvas:
|
|
1063
|
-
title:
|
|
1064
|
-
|
|
1065
|
-
|
|
877
|
+
canvas: z2.strictObject({ margin: marginSchema.optional().describe("Per-side outer margins overriding margin, then chart or theme defaults.") }).optional().describe("Canvas framing overrides applied before chart furniture is laid out."),
|
|
878
|
+
title: z2.union([
|
|
879
|
+
z2.string().describe("Visible chart title text. `**text**` draws bold and a single `*` stays literal."),
|
|
880
|
+
z2.literal(!1).describe("Suppress the visible title while retaining the accessible chart name.")
|
|
1066
881
|
]).optional().describe("Visible title override. `**text**` draws bold and a single `*` stays literal. Omission retains the chart-specific title behaviour."),
|
|
1067
882
|
subtitle: subtitleSchema.optional().describe("Measure subtitle below the title. Strings expand to the measure field. `**text**` draws bold in company, measure and period. A single `*` stays literal."),
|
|
1068
|
-
unit:
|
|
1069
|
-
unitShown:
|
|
1070
|
-
source: optionShapeSchema("source",
|
|
1071
|
-
footnotes: optionShapeSchema("footnotes",
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
]),
|
|
1075
|
-
notes:
|
|
1076
|
-
maxListed:
|
|
1077
|
-
|
|
1078
|
-
|
|
883
|
+
unit: z2.string().optional().describe("Chart unit, composed into the subtitle where supported; individual series may declare their own units. A unit prints as text after the number, so unit 'USD' reads 2,456 USD. For a currency sign, set format instead, such as '$1,234'; a unit the format already prints warns unit-in-format, and a unit that names another currency than the format's sign warns unit-format-conflict."),
|
|
884
|
+
unitShown: z2.boolean().optional().describe("True when the host prints the unit beside the chart: no unit line, no unit beside a kpi value; line end labels, a table head and the legend check treat the unit as shown. Number formatting does not change. Default false."),
|
|
885
|
+
source: optionShapeSchema("source", z2.string(), z2.array(z2.string())).optional().describe("Source credit rendered in the chart frame. An array of strings joins with '; ' in one source line. An empty array prints no source. `**text**` draws bold and a single `*` stays literal."),
|
|
886
|
+
footnotes: optionShapeSchema("footnotes", z2.union([
|
|
887
|
+
z2.array(z2.string().describe("Authored footnote text. `**text**` draws bold and a single `*` stays literal.")).describe("Footnotes in authored order; compact framing leaves optional notes off the canvas, keeps them in the accessible description and lists them in the info lint compact-notes-omitted."),
|
|
888
|
+
z2.literal(!1).describe('No notes in the frame: authored notes, method notes, event keys and the "+N notes" pointer are left off. Disclosures that notes.show prints (rounding, partial periods, unlabelled values), the source line and a required map credit stay; leave source out for no source line. For a host that carries the notes in its own frame; the info lint footnotes-off lists what was left off and the render result lists every note in notes.')
|
|
889
|
+
]), z2.string()).optional().describe("A string is one footnote. Footnotes in authored order. `**text**` draws bold and a single `*` stays literal. The frame prints them within notes.maxLines and the rest go to the notes list. false leaves notes and the pointer off the frame; disclosures that notes.show prints, the source line and a required map credit stay."),
|
|
890
|
+
notes: z2.object({
|
|
891
|
+
maxListed: z2.union([
|
|
892
|
+
z2.number().int().min(0).describe("Most items a note line names; the rest are counted. 0 names none and only counts them."),
|
|
893
|
+
z2.literal("all").describe("Name every item.")
|
|
1079
894
|
]).optional().describe(`Items a note line names before it counts the rest, such as "Not labelled on the chart: ... and 236 more". Default: every note line names as many items as fit two footer lines, at most 8, reference lines and line end values first, then the rest in data order, and ends with "and N more"; when no name fits, it counts. 'all' names every item. 0 names none and only counts them, "18 of 36 values". All items stay in the reading and the hover records.`).meta({ default: 8 }),
|
|
1080
|
-
placement:
|
|
1081
|
-
maxLines:
|
|
1082
|
-
show:
|
|
1083
|
-
pointer:
|
|
895
|
+
placement: z2.enum(["frame", "info", "list"]).optional().describe(`Where the notes go. 'frame' prints notes in the frame within maxLines and the rest in the notes list; 'list' prints only the source line, a required map credit and the pointer; 'info' is the React "Notes and sources" button with one visible line of source and required credit (an SVG or PNG draws it as 'frame'). Default by target: dashboard 'info', slide 'list', report and print 'frame'. An authored placement without notes.show also prints the engine's method notes and disclosures, within maxLines after the author notes.`),
|
|
896
|
+
maxLines: z2.number().int().min(1).optional().describe("Visible lines of notes and source line in the frame; a required map credit, an author note or a disclosure a drawn mark points at, and a disclosure that an authored notes.show lists do not count. Notes that do not fit go to the notes list and the pointer counts them. Default report and dashboard 3 (2 under 720 px wide), slide 2, print 3."),
|
|
897
|
+
show: z2.array(z2.enum(["note", "method", "disclosure", "ranks"])).optional().describe("The kinds of note the frame prints. Default ['note'], the authored footnotes, within maxLines; an authored note a mark points at always prints. 'method' adds the one-line short form of the method notes the engine writes (likert net, pvm split). 'disclosure' adds the engine's notes on how to read the chart (a key, a data change, 'Not labelled on the chart: ...'), outside maxLines; then a chart may also key its marks to them, such as rank numbers under the columns. 'ranks' prints only the rank key: rank numbers under the columns where the names fit neither upright nor rotated, with the note that names them, and no other disclosure. Without notes.show, methodNote: true or an authored placement prints the method notes and disclosures within maxLines. Engine notes print nowhere under the chart by default; every note stays in the notes list of the render result and in its warnings."),
|
|
898
|
+
pointer: z2.boolean().optional().describe('Default true: when the notes list holds notes of the kinds notes.show prints that the frame does not print, the source line ends with "+N notes". false drops it; a live chart that then leaves author notes out warns notes-left-out.').meta({ default: !0 })
|
|
1084
899
|
}).strict().optional().describe("Notes; the footer rule: where the notes under the chart go, how many lines they take, and the note lines for what the drawing leaves out."),
|
|
1085
900
|
// any registered theme name (presets + registerTheme customs); existence
|
|
1086
901
|
// is checked at resolve time with a helpful error
|
|
1087
|
-
theme: optionShapeSchema("theme",
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
preset:
|
|
1091
|
-
overrides:
|
|
902
|
+
theme: optionShapeSchema("theme", z2.union([
|
|
903
|
+
z2.string().min(1).describe("Registered theme name; existence is checked when resolving the theme."),
|
|
904
|
+
z2.object({
|
|
905
|
+
preset: z2.string().min(1).describe("Registered base theme whose tokens are overridden."),
|
|
906
|
+
overrides: z2.record(z2.string(), z2.unknown().describe("Theme token override value; validated by theme resolution.")).optional().describe("Partial theme token tree merged with the named preset.")
|
|
1092
907
|
}).describe("Named theme with explicit token overrides.")
|
|
1093
|
-
]),
|
|
1094
|
-
overrides:
|
|
908
|
+
]), z2.strictObject({
|
|
909
|
+
overrides: z2.record(z2.string(), z2.unknown()).describe("Partial token tree applied to the default preset.")
|
|
1095
910
|
})).optional().describe("Theme preset or preset with overrides. An object with only overrides uses the default preset. Request context may supply a theme, otherwise resolution uses bridge."),
|
|
1096
|
-
locale: optionShapeSchema("locale",
|
|
911
|
+
locale: optionShapeSchema("locale", z2.object({
|
|
1097
912
|
language: languageSchema.optional().describe('BCP 47 language tag. Changes words only, such as notes and month names. It never changes the decimal or grouping marks; they come only from locale.decimal and locale.thousands. E.g. "de"; "de_DE" is read as "de-DE"; "en-US" puts the month first (Sep 4).'),
|
|
1098
|
-
decimal:
|
|
1099
|
-
thousands:
|
|
1100
|
-
minusGlyph:
|
|
1101
|
-
weekStartsOn:
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
]).optional().describe("First weekday for week
|
|
913
|
+
decimal: z2.enum([".", ","]).optional().describe("Decimal mark of every number the chart prints. Default '.'. The language does not change it."),
|
|
914
|
+
thousands: z2.enum([",", ".", "\u2019", "'", " ", "\u202F"]).optional().describe("Grouping mark of every number the chart prints. The apostrophe ' is the same as \u2019, and the narrow no-break space is the same as the space. Default ',', or '.' with decimal ','. The language does not change it. A value equal to the decimal mark uses that fallback."),
|
|
915
|
+
minusGlyph: z2.enum(["\u2212", "-"]).optional().describe("Minus glyph of the numbers a table or dimswitch formats from the locale; default Unicode minus. Other types print the Unicode minus and ignore it without a warning."),
|
|
916
|
+
weekStartsOn: z2.union([
|
|
917
|
+
z2.literal(0).describe("Sunday as the requested first weekday."),
|
|
918
|
+
z2.literal(1).describe("Monday as the requested first weekday.")
|
|
919
|
+
]).optional().describe("First weekday for week ticks; default Monday. Read by categoryAxis.dateTicks 'weeks' on column, combo and line, and by the week ticks of a line time axis. Those three report it (week-start-ignored) when dateTicks asks for another interval. Other types ignore it without a warning.")
|
|
1105
920
|
}), languageSchema).optional().describe("A string sets language only. Language and number marks. decimal and thousands set the marks of every number, as in a spreadsheet (default 1,234.5); a format example gives only the shape. language changes words only, never the marks."),
|
|
1106
|
-
strings:
|
|
1107
|
-
newItems:
|
|
1108
|
-
lostItems:
|
|
1109
|
-
cohortMeasure:
|
|
1110
|
-
cohortFormula:
|
|
1111
|
-
others:
|
|
1112
|
-
total:
|
|
1113
|
-
source:
|
|
1114
|
-
notApplicable:
|
|
1115
|
-
partial:
|
|
1116
|
-
better:
|
|
1117
|
-
worse:
|
|
1118
|
-
positiveTotal:
|
|
1119
|
-
rangeMidNote:
|
|
1120
|
-
sensitivityNote:
|
|
1121
|
-
hatchedBaseNote:
|
|
1122
|
-
missingSwingNote:
|
|
1123
|
-
rankOmitted:
|
|
1124
|
-
noRank:
|
|
1125
|
-
rankMethod:
|
|
1126
|
-
higherBetter:
|
|
1127
|
-
lowerBetter:
|
|
1128
|
-
rankFormat:
|
|
1129
|
-
rankRing:
|
|
1130
|
-
nearZeroNote:
|
|
1131
|
-
flagged:
|
|
1132
|
-
corridor:
|
|
1133
|
-
corridorBounds:
|
|
1134
|
-
median:
|
|
1135
|
-
anomalySmallSample:
|
|
1136
|
-
anomalyZeroMad:
|
|
1137
|
-
anomalyMadRule:
|
|
1138
|
-
anomalyCentreZero:
|
|
1139
|
-
anomalyCentreMedian:
|
|
1140
|
-
anomalyThresholdRule:
|
|
1141
|
-
outsideBounds:
|
|
1142
|
-
belowBound:
|
|
1143
|
-
aboveBound:
|
|
1144
|
-
lowerBound:
|
|
1145
|
-
upperBound:
|
|
1146
|
-
undrawnBounds:
|
|
1147
|
-
hiddenLabels:
|
|
1148
|
-
noteOne:
|
|
1149
|
-
noteMany:
|
|
1150
|
-
notesAndSources:
|
|
1151
|
-
close:
|
|
1152
|
-
mapCredit:
|
|
1153
|
-
gapBetween:
|
|
1154
|
-
aboveSeries:
|
|
1155
|
-
belowSeries:
|
|
1156
|
-
average:
|
|
1157
|
-
valueLineRange:
|
|
1158
|
-
toDate:
|
|
1159
|
-
forecast:
|
|
1160
|
-
plan:
|
|
1161
|
-
forecastHeader:
|
|
1162
|
-
net:
|
|
1163
|
-
incomplete:
|
|
1164
|
-
range:
|
|
1165
|
-
valuesNotOnColumns:
|
|
1166
|
-
valuesNotBesideMarks:
|
|
1167
|
-
partialTotals:
|
|
1168
|
-
knownPartsTotals:
|
|
1169
|
-
without:
|
|
1170
|
-
and:
|
|
1171
|
-
aboveZero:
|
|
1172
|
-
belowZero:
|
|
1173
|
-
declaredBounds:
|
|
1174
|
-
tied:
|
|
1175
|
-
tiedSymbol:
|
|
1176
|
-
currentValue:
|
|
1177
|
-
baseCase:
|
|
1178
|
-
swingOutsideBase:
|
|
1179
|
-
fanGap:
|
|
1180
|
-
mixedShares:
|
|
1181
|
-
heatBelow:
|
|
1182
|
-
heatAround:
|
|
1183
|
-
heatAbove:
|
|
1184
|
-
bandKey:
|
|
1185
|
-
moreListed:
|
|
1186
|
-
cellNote:
|
|
1187
|
-
storyBack:
|
|
1188
|
-
storyNext:
|
|
1189
|
-
storyCounter:
|
|
1190
|
-
storyStep:
|
|
1191
|
-
axisLow:
|
|
1192
|
-
axisHigh:
|
|
1193
|
-
target:
|
|
1194
|
-
actualColumn:
|
|
1195
|
-
shareColumn:
|
|
1196
|
-
deltaColumn:
|
|
1197
|
-
targetColumn:
|
|
1198
|
-
gapColumn:
|
|
1199
|
-
gapBelow:
|
|
1200
|
-
gapAbove:
|
|
1201
|
-
gapOn:
|
|
1202
|
-
nearZeroChange:
|
|
1203
|
-
mixedCoverage:
|
|
1204
|
-
hiddenPeriods:
|
|
1205
|
-
share:
|
|
1206
|
-
histogramBins:
|
|
1207
|
-
histogramAbout:
|
|
1208
|
-
histogramMethod:
|
|
1209
|
-
histogramRuleCount:
|
|
1210
|
-
histogramRuleWidth:
|
|
1211
|
-
histogramSnapped:
|
|
1212
|
-
histogramRounded:
|
|
1213
|
-
histogramSmallSample:
|
|
921
|
+
strings: z2.object({
|
|
922
|
+
newItems: z2.string().min(1).optional().describe("PVM entry-bar name; default New items."),
|
|
923
|
+
lostItems: z2.string().min(1).optional().describe("PVM exit-bar name; default Lost items."),
|
|
924
|
+
cohortMeasure: z2.string().trim().min(1).optional().describe("Cohort measure name for notes, keys and accessible descriptions; default Retention. Use Cumulative conversion for converted counts divided by cohort base."),
|
|
925
|
+
cohortFormula: z2.string().trim().min(1).optional().describe("Complete cohort formula sentence for method notes and accessible descriptions. Wording only: rates still use the count and denominator selected by basis."),
|
|
926
|
+
others: z2.string().min(1).optional().describe("Name of the aggregated rest bucket; default Others, and an explicit topN.restLabel still wins."),
|
|
927
|
+
total: z2.string().min(1).optional().describe("Label of a computed total row; default Total."),
|
|
928
|
+
source: z2.string().optional().describe("Word introducing the authored source credit; default Source. An empty string prints the source without a prefix or colon."),
|
|
929
|
+
notApplicable: z2.string().optional().describe("Not applicable text; n/a, German k. A."),
|
|
930
|
+
partial: z2.string().min(1).optional().describe("Word after the labels of partial categories in the column, bar, line and combo footnote, also the hatch key label; default Partial; a named key uses toDate."),
|
|
931
|
+
better: z2.string().optional().describe("Meaning of a better sign-coloured value."),
|
|
932
|
+
worse: z2.string().optional().describe("Meaning of a worse sign-coloured value."),
|
|
933
|
+
positiveTotal: z2.string().optional().describe("Name of a mixed-sign stack positive boundary."),
|
|
934
|
+
rangeMidNote: z2.string().optional().describe("Range method note."),
|
|
935
|
+
sensitivityNote: z2.string().optional().describe("Tornado method note."),
|
|
936
|
+
hatchedBaseNote: z2.string().optional().describe("Tornado base mismatch note."),
|
|
937
|
+
missingSwingNote: z2.string().optional().describe("Tornado missing output note; {drivers} is replaced."),
|
|
938
|
+
rankOmitted: z2.string().optional().describe("Focused bump note."),
|
|
939
|
+
noRank: z2.string().optional().describe("A missing bump rank."),
|
|
940
|
+
rankMethod: z2.string().optional().describe("Bump method note; {direction}, {format}, and {ring} are replaced."),
|
|
941
|
+
higherBetter: z2.string().optional().describe("Direction of a bump rank."),
|
|
942
|
+
lowerBetter: z2.string().optional().describe("Direction of a bump rank."),
|
|
943
|
+
rankFormat: z2.string().optional().describe("Format clause in the bump method note."),
|
|
944
|
+
rankRing: z2.string().optional().describe("Tie clause in the bump method note."),
|
|
945
|
+
nearZeroNote: z2.string().optional().describe("Note for folded zero line ends."),
|
|
946
|
+
flagged: z2.string().optional().describe("Anomaly marker key."),
|
|
947
|
+
corridor: z2.string().optional().describe("Anomaly rule key."),
|
|
948
|
+
corridorBounds: z2.string().optional().describe("Authored anomaly bounds key."),
|
|
949
|
+
median: z2.string().optional().describe("Anomaly median rule label and key."),
|
|
950
|
+
anomalySmallSample: z2.string().optional().describe("Small-sample anomaly sentence."),
|
|
951
|
+
anomalyZeroMad: z2.string().optional().describe("Zero-MAD anomaly sentence."),
|
|
952
|
+
anomalyMadRule: z2.string().optional().describe("MAD anomaly sentence; preserves the full calculation."),
|
|
953
|
+
anomalyCentreZero: z2.string().optional().describe("Zero-centred anomaly rule clause."),
|
|
954
|
+
anomalyCentreMedian: z2.string().optional().describe("Median-centred anomaly rule clause."),
|
|
955
|
+
anomalyThresholdRule: z2.string().optional().describe("Threshold anomaly sentence."),
|
|
956
|
+
outsideBounds: z2.string().optional().describe("Two-sided threshold clause."),
|
|
957
|
+
belowBound: z2.string().optional().describe("Lower threshold clause."),
|
|
958
|
+
aboveBound: z2.string().optional().describe("Upper threshold clause."),
|
|
959
|
+
lowerBound: z2.string().optional().describe("Off-scale lower corridor bound."),
|
|
960
|
+
upperBound: z2.string().optional().describe("Off-scale upper corridor bound."),
|
|
961
|
+
undrawnBounds: z2.string().optional().describe("Off-scale corridor note."),
|
|
962
|
+
hiddenLabels: z2.string().optional().describe("Heading of the note for hidden chart labels."),
|
|
963
|
+
noteOne: z2.string().optional().describe("Pointer to one hidden note."),
|
|
964
|
+
noteMany: z2.string().optional().describe("Pointer to hidden notes."),
|
|
965
|
+
notesAndSources: z2.string().optional().describe("React notes panel label."),
|
|
966
|
+
close: z2.string().optional().describe("React notes panel Close control. English Close; German Schlie\xDFen."),
|
|
967
|
+
mapCredit: z2.string().optional().describe("Word before a map credit in the React notes panel."),
|
|
968
|
+
gapBetween: z2.string().optional().describe("Key for a gap between two lines."),
|
|
969
|
+
aboveSeries: z2.string().optional().describe("Positive line gap key."),
|
|
970
|
+
belowSeries: z2.string().optional().describe("Negative line gap key."),
|
|
971
|
+
average: z2.string().min(1).optional().describe("Name before a computed mean; English Average, German \xD8."),
|
|
972
|
+
valueLineRange: z2.string().min(1, "valueLineRange must not be empty; use {v1} and {v2} for the formatted bounds").optional().describe("Tolerance-band bounds; {v1} and {v2} are the formatted bounds."),
|
|
973
|
+
toDate: z2.string().min(1).optional().describe("Text after a running category name in its key or note."),
|
|
974
|
+
forecast: z2.string().min(1).optional().describe("Key for the forecast pattern."),
|
|
975
|
+
plan: z2.string().min(1).optional().describe("Key for the plan outline."),
|
|
976
|
+
forecastHeader: z2.string().min(1).optional().describe("Header at the actual-to-forecast boundary. Keeps the scenario code by default."),
|
|
977
|
+
net: z2.string().min(1).optional().describe("Name before a net total."),
|
|
978
|
+
incomplete: z2.string().min(1).optional().describe("Marker on an incomplete stack total; prints under notes.show 'disclosure'."),
|
|
979
|
+
range: z2.string().min(1).optional().describe("Key for a range whisker."),
|
|
980
|
+
valuesNotOnColumns: z2.string().min(1).optional().describe("Note heading for omitted column values."),
|
|
981
|
+
valuesNotBesideMarks: z2.string().min(1).optional().describe("Note heading for omitted combo values."),
|
|
982
|
+
partialTotals: z2.string().min(1).optional().describe("Incomplete total note; {partial} is the marker."),
|
|
983
|
+
knownPartsTotals: z2.string().min(1).optional().describe("Incomplete total note where the marker does not print. Column and combo only; a bar stack uses incompleteStacks."),
|
|
984
|
+
without: z2.string().min(1).optional().describe("Word before missing stack parts."),
|
|
985
|
+
and: z2.string().min(1).optional().describe("Word joining missing stack parts."),
|
|
986
|
+
aboveZero: z2.string().min(1).optional().describe("Positive sign key; {series} and {meaning} are replaced."),
|
|
987
|
+
belowZero: z2.string().min(1).optional().describe("Negative sign key; {series} and {meaning} are replaced."),
|
|
988
|
+
declaredBounds: z2.string().min(1).optional().describe("Key for an authored uncertainty bound."),
|
|
989
|
+
tied: z2.string().min(1).optional().describe("Label of a shared rank."),
|
|
990
|
+
tiedSymbol: z2.string().min(1).optional().describe("Symbol before a displaced shared-rank label."),
|
|
991
|
+
currentValue: z2.string().min(1).optional().describe("Football-field spine; {value} is replaced."),
|
|
992
|
+
baseCase: z2.string().min(1).optional().describe("Tornado spine; {value} is replaced."),
|
|
993
|
+
swingOutsideBase: z2.string().min(1).optional().describe("Tornado hatch key."),
|
|
994
|
+
fanGap: z2.string().min(1).optional().describe("Missing uncertainty note; {categories} is replaced."),
|
|
995
|
+
mixedShares: z2.string().min(1).optional().describe("Mixed-sign share note; {categories} is replaced."),
|
|
996
|
+
heatBelow: z2.string().min(1).optional().describe("Key label of the bad side of a table's traffic-light heat lane (scale 'status'); default Below average, or Below total under center 'total'."),
|
|
997
|
+
heatAround: z2.string().min(1).optional().describe("Key label of the warn band of a table's traffic-light heat lane; default Around average, or Around total."),
|
|
998
|
+
heatAbove: z2.string().min(1).optional().describe("Key label of the good side of a table's traffic-light heat lane; default Above average, or Above total."),
|
|
999
|
+
bandKey: z2.array(z2.string().trim().min(1)).min(2).max(5).optional().describe("Words of the bullet worse-to-better band key, worst first, one for each band (2 to 5). A list of another length than the bands keeps the built-in words (Worse ... Better; German with locale.language de)."),
|
|
1000
|
+
moreListed: z2.string().trim().min(1).optional().describe("Last item of a capped note line; '{count}' is the number left out. Default 'and {count} more'; a React chart with hover on reads 'and {count} more (tap or hover shows each value)' unless this is set."),
|
|
1001
|
+
cellNote: z2.string().trim().min(1).optional().describe("Waffle note that names the share of one cell; '{value}' becomes the percent, such as 5%. Default 'One cell = {value}'."),
|
|
1002
|
+
storyBack: z2.string().min(1).optional().describe("Story Back button; default '\u2039 Back'."),
|
|
1003
|
+
storyNext: z2.string().min(1).optional().describe("Story Next button; default 'Next \u203A'."),
|
|
1004
|
+
storyCounter: z2.string().min(1).optional().describe("Story counter, unpadded '{step}' and '{count}'; default '{step} / {count}'."),
|
|
1005
|
+
storyStep: z2.string().min(1).optional().describe("Live region position with unpadded '{step}' and '{count}'; default 'Step {step} of {count}' (EN), 'Schritt {step} von {count}' (DE)."),
|
|
1006
|
+
axisLow: z2.string().min(1).optional().describe("Scatter qualitative axis low end; default 'Lower'."),
|
|
1007
|
+
axisHigh: z2.string().min(1).optional().describe("Scatter qualitative axis high end; default 'Higher'."),
|
|
1008
|
+
target: z2.string().trim().min(1).optional().describe("Word for the bullet comparison value in every phrase the bullet composes (vs target, of target, the keys, the hover card), such as plan; default target."),
|
|
1009
|
+
actualColumn: z2.string().trim().min(1).optional().describe("Head of the bullet column with the actual values; default Actual (German Ist)."),
|
|
1010
|
+
shareColumn: z2.string().trim().min(1).optional().describe("Head of the bullet percent-of-target column; '{v1}' is the comparison word. Default '% of {v1}'."),
|
|
1011
|
+
deltaColumn: z2.string().trim().min(1).optional().describe("Head of the bullet difference column on percent-of-target rows; '{v1}' is the comparison word. Default 'vs {v1}'."),
|
|
1012
|
+
targetColumn: z2.string().trim().min(1).optional().describe("Head of the bullet target column; default Target (German Ziel). The strings.target word heads it when this is not set."),
|
|
1013
|
+
gapColumn: z2.string().trim().min(1).optional().describe("Head of the bullet gap column; '{v1}' is the comparison word. Default 'Gap to {v1}'."),
|
|
1014
|
+
gapBelow: z2.string().trim().min(1).optional().describe("Line under a bullet gap that lies below the comparison value; '{v1}' is the comparison word. Default 'below {v1}'."),
|
|
1015
|
+
gapAbove: z2.string().trim().min(1).optional().describe("Line under a bullet gap that lies above the comparison value; '{v1}' is the comparison word. Default 'above {v1}'."),
|
|
1016
|
+
gapOn: z2.string().trim().min(1).optional().describe("Line under a bullet gap of zero; '{v1}' is the comparison word. Default 'on {v1}'."),
|
|
1017
|
+
nearZeroChange: z2.string().optional().describe("Table n.m. change note."),
|
|
1018
|
+
mixedCoverage: z2.string().optional().describe("Table n.m. note for a change between totals of different rows."),
|
|
1019
|
+
hiddenPeriods: z2.string().optional().describe("Dimswitch note for periods left out; {periods} is replaced."),
|
|
1020
|
+
share: z2.string().min(1).optional().describe("Cascade share-column heading."),
|
|
1021
|
+
histogramBins: z2.string().min(1).optional().describe("Histogram binning disclosure; {count}, {about}, {width}, {from}, {to} are replaced."),
|
|
1022
|
+
histogramAbout: z2.string().optional().describe("Histogram approximation word, including its trailing space."),
|
|
1023
|
+
histogramMethod: z2.string().min(1).optional().describe("Histogram method note; {count}, {width}, {from}, {rule}, {rounding}, {smallSample} are replaced."),
|
|
1024
|
+
histogramRuleCount: z2.string().min(1).optional().describe("Histogram authored bin-count rule name."),
|
|
1025
|
+
histogramRuleWidth: z2.string().min(1).optional().describe("Histogram authored bin-width rule name."),
|
|
1026
|
+
histogramSnapped: z2.string().min(1).optional().describe("Histogram rounded bin-width rule; {rule} is replaced."),
|
|
1027
|
+
histogramRounded: z2.string().optional().describe("Histogram rounded-number clause, including its separator."),
|
|
1028
|
+
histogramSmallSample: z2.string().optional().describe("Histogram small-sample clause, including its separator."),
|
|
1214
1029
|
// required stack disclosures and rebase suppression.
|
|
1215
|
-
missingStack:
|
|
1216
|
-
incompleteStacks:
|
|
1217
|
-
knownPartsShares:
|
|
1218
|
-
rebaseZero:
|
|
1219
|
-
rebaseMissing:
|
|
1030
|
+
missingStack: z2.string().min(1).optional().describe("StackedArea source-null note; {categories} is replaced."),
|
|
1031
|
+
incompleteStacks: z2.string().min(1).optional().describe("Incomplete bar stack note (bar only; column and combo use knownPartsTotals); {categories} is replaced."),
|
|
1032
|
+
knownPartsShares: z2.string().min(1).optional().describe("Incomplete 100% stack note without total100; {categories} is replaced."),
|
|
1033
|
+
rebaseZero: z2.string().min(1).optional().describe("Line or stacked-area series left out by rebase100 for a zero or negative base; {series} and {period} are replaced."),
|
|
1034
|
+
rebaseMissing: z2.string().min(1).optional().describe("Line or stacked-area series left out by rebase100 for a missing base; {series} and {period} are replaced.")
|
|
1220
1035
|
}).strict().optional().describe("Wording of built-in labels. These are the labels the renderer composes itself: author chart text stays unchanged and an explicit option still wins per label; host-level wording comes from the theme provider."),
|
|
1221
1036
|
format: formatExample.optional().describe(`Chart-level format-by-example, such as 1,234.5 or 1.2pp. A currency sign comes from here: '$1,234' prints $2,456. Its decimals are preserved; series and cell formats can override it. Without a format, precision follows the data. ${MAGNITUDE_WORDS_DOC} ${PERCENT_FORMAT_UNITS} A separator followed by exactly three digits after a nonzero integer part is a thousands mark: 1.000 groups thousands with a dot and prints decimals with a comma; write 0.000 for three decimals.`),
|
|
1222
1037
|
detailFields: detailFieldsSchema.optional().describe("Label, format, unit and order of the cell details keys, the extra facts a value's hover card lists after it: [{ key: 'deals', label: 'Deals', format: '1,234' }]. Declared keys print first, in this order; a details key it does not declare prints after them, labelled with its key. Default: every key, labelled with itself."),
|
|
1223
|
-
smallValues:
|
|
1224
|
-
palette:
|
|
1225
|
-
labelDensity:
|
|
1226
|
-
labels:
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1038
|
+
smallValues: z2.enum(["bound", "zero", "scientific", "p-value"]).optional().describe("How an automatic number format prints a nonzero value below its last shown digit. Without a format, each table column and chart series takes one precision from its largest value: two significant digits below 1, at most 4 decimals. bound (default): the bound, <0.01 at two decimals, >\u22120.01 below zero, <1 for whole numbers; a signed change label keeps its sign, <+0.01; below 0.0001 a value prints in scientific form instead. zero: spreadsheet style, the format's own 0.00. scientific: two significant digits and a power of ten, 1.2 \xD7 10\u207B\u2079. p-value: every value from 0 to 1 prints as APA 7 writes a p-value, three decimals without the leading zero, .042, and <.001 below; larger values keep the rule above. A format the author sets prints as set."),
|
|
1039
|
+
palette: z2.string().min(1).optional().describe("Named identity ramp from theme color.palettes; every chart family takes its data ink from it, while good, bad and highlight stay the theme colours."),
|
|
1040
|
+
labelDensity: z2.enum(["full", "smart", "minimal"]).optional().describe("Label selection policy, default smart. full: every value label competes for a slot, and a segment value that does not fit its segment moves outside on a leader. smart: as full, but a stacked column or combo segment value prints inside its segment or not at all (where one is wider than its column, the stacked column values step down a size, to the floor; still too wide, none prints), and a segment value drops when the segment is shorter than the label height plus 4 px padding (the label width on a horizontal bar); mekko also drops segment values in columns narrower than 24 px. A labelPlacements pin keeps its label. minimal: keeps only the chart's essential labels (totals, endpoints, highlights). Collision suppression applies at every level."),
|
|
1041
|
+
labels: z2.union([
|
|
1042
|
+
z2.literal(!1).describe("Suppress optional data labels for chart types supporting this option."),
|
|
1043
|
+
idRecord(z2.string(), z2.union([
|
|
1044
|
+
z2.boolean().describe("Enable or suppress this label kind."),
|
|
1045
|
+
z2.array(z2.string().describe("Requested label content, such as absolute, percent, category or series; supported values depend on the chart.")).describe("Ordered content parts for this label kind.")
|
|
1231
1046
|
]).describe("Visibility or requested content for the named label kind.")).describe("Per-kind label settings, keyed by label kind.")
|
|
1232
1047
|
]).optional().describe("Label visibility and content overrides; omission uses the selected chart policy. Unsupported chart types refuse this shared option. false turns optional labels off. An object maps a label kind (category, series, segment, point, total, grandTotal, insidePie, outsidePie, percentIndicator, restSeries, tick, axisTitle, valueLine, annotation, growth, activity, item; each chart reads its own, and a kind it does not read is refused) to true, false or content parts from absolute, percent, category and series. Another part is dropped with a warning; value draws as absolute. On a stacked column with one PY reference series, { growth: false } drops the growth arrows over the totals (\u2191 6.1%) and keeps the PY ticks and their labels; { percentIndicator: false } drops the 100% marker of a 100% chart. On bar, box, column, combo, dot, line, Mekko, slope and variance, false keeps category names; { category: false } hides them. On bullet, butterfly, funnel, heatmap, pyramid and status, false keeps the row, column and stage names; on kpi it keeps the main number and the card name. Grid panels can leave category names to the grid. On a line, series false turns the series names off and point sets what each printed value shows, so { point: ['category', 'absolute'] } prints 08-16 44.7 at the point. On a stacked column or combo, { segment: ['absolute', 'percent'] } prints each segment value over its share of the stack; a stack with a negative or missing part prints the value alone and warns. restSeries sets the values of a stacked column, bar or area series whose colorRole is others: absent, they print everywhere except the dashboard target, where the hover card and the note line carry them; true prints them, false hides and notes them on every target."),
|
|
1233
1048
|
categoryLabels: categoryLabelsSchema,
|
|
1234
|
-
|
|
1049
|
+
labelPosition: z2.enum(["auto", "center", "insideEnd", "insideBase", "outsideEnd"]).optional().describe("Position of bar values. Default 'auto' keeps normal placement. 'center' uses the middle; 'insideEnd' and 'insideBase' use the edges farther from and nearer zero; 'outsideEnd' sits past the farther edge. Pins win. A blocked or too-small seat takes its safe fallback. Floating steps try above then below, or right then left horizontally. Axis bars try outside the end. Stacked segments keep their existing fallback; integrated variance totals stay inside. Stacked variants and integrated variance refuse outsideEnd."),
|
|
1050
|
+
labelPlacements: idRecord(z2.string(), z2.string().describe("Requested solver slot id, such as insideCenter.")).optional().describe("Authored placement pins keyed by label id; the solver checks each requested slot. On a line, a pinned end label removes the legend step of the end-label ladder. The slots a label can take depend on the chart and its data; a wrong slot warns unknown-slot and lists the valid and free slots of that render."),
|
|
1051
|
+
labelOffsets: idRecord(z2.string(), z2.strictObject({
|
|
1052
|
+
x: z2.number().finite().optional().describe("Pixels to the right; negative moves left."),
|
|
1053
|
+
y: z2.number().finite().optional().describe("Pixels down; negative moves up.")
|
|
1054
|
+
}).describe("The distance to move this label, in px on the rendered chart.")).optional().describe("Moves labels by a set distance, keyed by label id, such as { 'annotation:callout-2': { y: 40 } }. A label's id is in the labels of a render and in the warnings that name it. The move starts from the seat the solver or a pin chose. A seat that is blocked keeps the label where it stands and warns label-offset-blocked; an id this chart does not draw warns label-offset-unknown. A moved label gets a leader back to its seat, unless it is a value that takes none. A value moved off its own bar prints in page ink with a halo. A bracket's offset moves its label only, not its run."),
|
|
1235
1055
|
legend: keyOptionSchema(["top", "bottom", "right", "left", "none", "auto"]).optional().describe(
|
|
1236
1056
|
"A key without a named position sits in one row above the plot, flush with it, under the subtitle; more items wrap to further rows and move the plot down. 'bottom' puts the row under the plot. 'right' and 'left' put the key in a column beside the plot where the plot block keeps at least 68% of the chart width and the column fits the height; otherwise the key stays in the row above the plot and a legend-side-fallback warning says so. 'auto' adds keys when visible labels do not name every drawn series. A displayed subtitle measure or unit can name one primary series, matching the complete phrase without case sensitivity. Required explanatory keys remain, except the keys of a table, heatmap, cohort and variance, which 'none' drops for a host that draws its own. Automatic keys use footnote type in the top row. Explicit settings override theme.legend.auto, which defaults to false. Multi-series column, bar, combo, dot and scatter charts add a key when direct names are missing. A series key explains its scenario styling. Grids keep a required key under 'none' when direct names are incomplete."
|
|
1237
1057
|
),
|
|
1238
1058
|
valueAxis: valueAxisSchema.optional().describe("Value-axis display and domain settings; each chart schema narrows the supported fields."),
|
|
1239
|
-
categoryAxis:
|
|
1240
|
-
crossesBetween:
|
|
1241
|
-
dateTicks:
|
|
1059
|
+
categoryAxis: z2.object({
|
|
1060
|
+
crossesBetween: z2.boolean().optional().describe("Line-chart category placement: default true centres categories in bands; false places the end categories at the plot edges. Column and combo always centre their categories in bands: false is ignored there and reports cross-between-ignored."),
|
|
1061
|
+
dateTicks: z2.enum(["years", "quarters", "months", "weeks", "days"]).optional().describe("Date tick interval on line, column and combo. A short tick under the plot marks the first category of each calendar interval; on column and combo it stands at the middle of the band, and every column keeps its place. 'years', 'quarters' and 'months' name those ticks on the calendar: quarters read Jan, Apr, Jul, Oct. A row too narrow for every name keeps a larger round step counted from January (years 2, 5, 10, 20, 25, 50 or 100, so every tenth year from 1980; quarters 2, 4, 8, 20 or 40; months 2, 3, 6, 12, 24, 60 or 120), at most eight names. The latest period is always named; if it collides with the tick before it, that tick drops. 'weeks' and 'days' count equal steps back from the latest period (weeks 2, 4, 13, 26 or 52; days 2, 7, 14 or 28) and name it too. 'years' names the year alone ('Jan 1980' reads 1980) where the label carries it. 'months' over day dates the engine labels names the month ('1 Apr 2025' reads Apr 2025, then May, Jun). A monthly series through July 2026 with 'years' reads 1980, 1990, 2000, 2010, 2020, Jul 2026. Without dateTicks, column, stacked column, line, area and combo pick tick months by the same calendar rule for rows of months and quarters (step 3: Jan, Apr, Jul, Oct; step 6: Jan, Jul; step 12: Jan; plus the latest period) and count back from the latest period for days and weeks, so side-by-side panels with the same categories show the same months. A line or area day row that would step past 28 days names months as 'months' does. Categories without an ISO date, or not in date order (sorted by value), leave the option unused and report date-ticks-unsupported.")
|
|
1242
1062
|
}).optional().describe("Category-axis settings: dateTicks on line, column and combo, crossesBetween on line; other shared-base charts ignore this option with an option-ignored warning."),
|
|
1243
|
-
secondaryAxis:
|
|
1244
|
-
scaleGroup:
|
|
1063
|
+
secondaryAxis: z2.object({ acknowledge: z2.literal(!0).describe("Explicitly acknowledge that the chart uses an independent second value scale.") }).optional().describe("Opt in to a second value scale on supported charts; combo adds chart-specific secondary-axis options."),
|
|
1064
|
+
scaleGroup: z2.object({
|
|
1245
1065
|
// x shares nothing: no type reads back or pins its x domain, so it is refused.
|
|
1246
|
-
x:
|
|
1247
|
-
y:
|
|
1248
|
-
id:
|
|
1066
|
+
x: z2.never({ error: "'scaleGroup.x' is not implemented \u2014 only the value scale is shared, through scaleGroup.y; no chart type pins its x domain. Drop x" }).optional().describe("Refused: no chart type shares an x scale. Share the value scale with scaleGroup.y."),
|
|
1067
|
+
y: z2.string().optional().describe("Shared value-scale group id for compatible grid panels, charts of one envelope or separately mounted cards; members of the same group use a combined domain."),
|
|
1068
|
+
id: z2.string().optional().describe("Stable member id inside the scale group declared on the host ScaleGroup; reordering or removing cards does not change which member this chart is.")
|
|
1249
1069
|
}).optional().describe("Scale-group identities for panel composition. Charts of one envelope that name the same y group draw on one domain, and a chart that cannot join (another unit, no numeric y scale) refuses the request. A chart alone in its group, or a single chart, keeps its own scale for the host to share. x is refused: no chart type shares an x scale."),
|
|
1250
|
-
rowLabels:
|
|
1251
|
-
align:
|
|
1070
|
+
rowLabels: z2.object({
|
|
1071
|
+
align: z2.enum(["left", "right"]).optional().describe(
|
|
1252
1072
|
"Row-label alignment on a horizontal category axis; defaults to 'left' (one shared left edge), and to 'right' on a dot chart. 'right' pushes each label block against the plot."
|
|
1253
1073
|
)
|
|
1254
1074
|
}).optional().describe("Row-label alignment for the horizontal families (bar, bullet, box, dot, likert)."),
|
|
1255
|
-
sort: optionShapeSchema("sort",
|
|
1256
|
-
categories:
|
|
1257
|
-
segments:
|
|
1258
|
-
}),
|
|
1259
|
-
topN: optionShapeSchema("topN",
|
|
1075
|
+
sort: optionShapeSchema("sort", z2.object({
|
|
1076
|
+
categories: z2.enum(["sheet", "asc", "desc", "reverse"]).optional().describe("Category order: sheet preserves authored order, reverse reverses it, asc and desc use the chart category ranking value."),
|
|
1077
|
+
segments: z2.enum(["sheet", "asc", "desc", "reverse"]).optional().describe("Segment order: sheet preserves authored order, reverse reverses it, asc and desc use the chart segment ranking value.")
|
|
1078
|
+
}), z2.union([z2.enum(["sheet", "asc", "desc", "reverse"]), z2.literal(!0)])).optional().describe("A string sets categories to sheet, asc, desc or reverse. true means categories: 'desc'. Sorting requests for charts that support them; omitted settings preserve the chart default ordering."),
|
|
1079
|
+
topN: optionShapeSchema("topN", z2.object(topNFields), topNCount).optional().describe("A positive integer n means { n }. Chart-specific Top-N selection and rest aggregation; omission retains all categories. On a choropleth world map, topN.n picks the n regions it labels, largest absolute value first; other maps label every region."),
|
|
1260
1080
|
// No registered layout implements this. Accepting it on the shared base
|
|
1261
1081
|
// would let every type answer `ok:true` to `transpose: true` and draw the
|
|
1262
1082
|
// identical chart.
|
|
1263
1083
|
// `z.never` refuses it out loud instead — the same call the `break.style`
|
|
1264
1084
|
// enum above makes: never advertise a value the runtime rejects 100% of the
|
|
1265
1085
|
// time. Orientation here is a chart TYPE, so the message names the type.
|
|
1266
|
-
transpose:
|
|
1267
|
-
bandFraction:
|
|
1268
|
-
highlight:
|
|
1269
|
-
story:
|
|
1270
|
-
steps:
|
|
1271
|
-
id:
|
|
1272
|
-
title:
|
|
1273
|
-
body:
|
|
1274
|
-
highlight:
|
|
1086
|
+
transpose: z2.never({ error: TRANSPOSE_REFUSED }).optional().describe("Refused on every type: orientation is chosen by picking the chart type ('bar' vs 'column')."),
|
|
1087
|
+
bandFraction: z2.number().gt(0).lte(1).optional().describe("Fraction of a category band occupied by its mark, greater than zero and at most one; default is chart-specific, commonly 0.7."),
|
|
1088
|
+
highlight: z2.union([idSchema, z2.array(idSchema).describe("Data ids to highlight together.")]).optional().describe("One or more data ids selected for chart-specific visual emphasis. Selected marks take color.focus, and color.highlight on a theme that sets no focus. On a single-series bar, column or dot chart the named categories take it and every other mark steps back to color.neutralLight, the rest role. A series fill or colorRole outranks both colours; scenario marks keep their pattern and signColor its good/bad colours, and unhighlighted scenario marks keep their scenario colour. A highlight with no visible mark (null, or a zero bar or column) recedes nothing. On a line the named series take it at 2.6px and the others step through muted tints toward ink, with a swatch on each end label. On an unstacked area with several series the first named series is the one that is filled."),
|
|
1089
|
+
story: z2.strictObject({
|
|
1090
|
+
steps: z2.array(z2.strictObject({
|
|
1091
|
+
id: z2.string().min(1).describe("Step id, as the React step prop names it."),
|
|
1092
|
+
title: z2.string().min(1).describe("Panel title."),
|
|
1093
|
+
body: z2.string().optional().describe("Panel text."),
|
|
1094
|
+
highlight: z2.union([idSchema, z2.array(idSchema)]).optional().describe("Data ids the step brings forward, as in highlight; the other marks fade. Omitted: an intro.")
|
|
1275
1095
|
})).min(1).describe("Steps in order."),
|
|
1276
|
-
step:
|
|
1096
|
+
step: z2.string().min(1).optional().describe("Step static output draws; default the first.")
|
|
1277
1097
|
}).optional().describe("Guided steps over one chart. Each step fades the marks it does not name and shows a panel with its title and body. React needs withStory from boardplot/react/story."),
|
|
1278
|
-
focus:
|
|
1098
|
+
focus: z2.strictObject({
|
|
1279
1099
|
owner: ownerSchema.refine((owner) => Object.values(owner).some((value) => value !== void 0), {
|
|
1280
1100
|
message: "A focus owner needs at least one source identity."
|
|
1281
1101
|
}).describe("Source owner to emphasise. A label is selected when its own owner carries every key named here with the same value, so a seriesId alone selects that series and a seriesId+categoryId pair selects one point.")
|
|
1282
1102
|
}).nullable().optional().describe("Active source focus: labels whose owner the focus selects sort ahead in the solve order, because the focus adds a 250-point bonus to the label's sort key on top of its authored priority. The bonus can carry a focused label past a higher authored band, which is the point: a focused series or category wins contested label space. Layout only \u2014 totals, shares, scales and claims are unchanged, and a focused label still loses to the density gate, to an owned pin and to a collision. Omit the key (or set null) for byte-identical layout; null clears an inherited focus explicitly. On a grid, set it on the panel options that own the focus; sibling panels are separate layouts and never see it."),
|
|
1283
|
-
hatchStrength:
|
|
1284
|
-
colorblindSafe:
|
|
1285
|
-
rounding:
|
|
1286
|
-
animate:
|
|
1287
|
-
interactive:
|
|
1288
|
-
debug:
|
|
1103
|
+
hatchStrength: z2.number().min(0, { error: "hatchStrength runs from 0 to 100; set 0 for the faintest hatch that still reads, 100 for the theme's recipe" }).max(100, { error: "hatchStrength runs from 0 to 100; set 100 for the theme's recipe, lower for a lighter hatch" }).optional().describe("How strongly forecast, partial-period and no-data hatches draw, 0 to 100; 100 is the theme's recipe. Lower values fade the stripes toward their ground and, on a line or area forecast, spread them up to 2.5 times the theme's gap. The fade stops at a floor: where the hatch is the only cue (a forecast column or bar, a partial period, a no-data cell) the stripes keep 3:1 on their ground and their spacing; on a line or area forecast, where the dashed line, the divider and the key already mark the forecast, they keep 2:1. A status cell lays its stripes on its own tone: there 60 is the theme's recipe at 3:1, 100 deepens the stripes to 4.5:1 on the same ground, and lower values fade them only as far as the cell stays apart from a cell with no status. Default 60 on a line or area forecast and a status cell, 100 elsewhere. The key swatch draws the same hatch."),
|
|
1104
|
+
colorblindSafe: z2.boolean().optional().describe("Paint the semantic good/bad pair from theme.color.colorblind: signed bars and columns, variance bars, KPI deltas, chips and bands, waterfall and pvm steps, legend keys and signed labels, status cells, heatmap valence cells, table tones, grounds, bars and badges, and diverging choropleth or tilemap poles. A type without a good/bad pair draws the same with or without this option. Use palette for categorical colours."),
|
|
1105
|
+
rounding: z2.enum(["nearest", "sum-consistent"]).optional().describe("How computed shares print. nearest rounds each share separately. sum-consistent uses largest remainders to total 100%. For equal remainders, when the sum must go up, round up the smaller share first; when the sum must go down, take the step from the larger share first. Equal-size ties use the first input index. reading.rounding lists changes. Use format: 1.0% for one decimal. Mekko cell, series and chart share formats set the precision. Bar, column and combo stacks default to sum-consistent for each complete stack; a column's shares keep the chart's one share precision or shareLabels.format. Incompatible precisions or more than 13 decimals warn and keep the requested formats without sum-consistent rounding."),
|
|
1106
|
+
animate: z2.boolean().optional().describe("Motion flag ignored with an option-ignored warning because charts emit static geometry."),
|
|
1107
|
+
interactive: z2.boolean().optional().describe("Emit data-bp-* semantics for dependency-free web interactivity; static output is unchanged by default."),
|
|
1108
|
+
debug: z2.boolean().optional().describe("Layout debug flag ignored with an option-ignored warning."),
|
|
1289
1109
|
annotations: annotationArraySchema(annotationSchema).optional().describe("Data-bound annotations in authored order; explicit ids must be unique and each chart advertises its supported kinds.")
|
|
1290
|
-
}).superRefine(addCanvasBoundsIssues).describe("Shared JSON chart options; selected chart schemas narrow unsupported fields and add chart-specific settings."), anomalyOptionSchema =
|
|
1291
|
-
|
|
1292
|
-
method:
|
|
1293
|
-
k:
|
|
1110
|
+
}).superRefine(addCanvasBoundsIssues).describe("Shared JSON chart options; selected chart schemas narrow unsupported fields and add chart-specific settings."), anomalyOptionSchema = z2.union([
|
|
1111
|
+
z2.object({
|
|
1112
|
+
method: z2.literal("mad").describe("Use median absolute deviation to derive the anomaly corridor."),
|
|
1113
|
+
k: z2.number().positive().optional().describe(
|
|
1294
1114
|
"Flag threshold on the absolute modified z-score; default 3.5, the published threshold of the modified z-score method with the 1.4826 MAD scale. Do not pair it with a 3.0 rule of thumb from a different method."
|
|
1295
1115
|
).meta({ default: 3.5 }),
|
|
1296
|
-
baseline:
|
|
1116
|
+
baseline: z2.enum(["zero", "median"]).optional().describe(
|
|
1297
1117
|
"Centre of the judgement. 'zero' (default) reads the input as an already-computed deviation (surprise vs consensus, net cash movement, residual); 'median' centres on the series' own median. The SPREAD is measured around the actual median in both cases, so derived.anomaly reports `centre` and `median` as separate fields \u2014 under 'zero' they differ, and a levels series hands to this rule will flag almost everything (anomaly-most-flagged)."
|
|
1298
1118
|
).meta({ default: "zero" }),
|
|
1299
|
-
label:
|
|
1119
|
+
label: z2.string().optional().describe(
|
|
1300
1120
|
"Names the rule on the exhibit. It is prefixed to the derived sentence, never a replacement \u2014 the median, MAD, k and corridor always stay printed."
|
|
1301
1121
|
)
|
|
1302
1122
|
}),
|
|
1303
|
-
|
|
1304
|
-
method:
|
|
1305
|
-
low:
|
|
1306
|
-
high:
|
|
1307
|
-
label:
|
|
1123
|
+
z2.object({
|
|
1124
|
+
method: z2.literal("threshold").describe("Use authored low/high bounds to flag anomalies."),
|
|
1125
|
+
low: z2.number().optional().describe("Flag values strictly below this bound."),
|
|
1126
|
+
high: z2.number().optional().describe("Flag values strictly above this bound."),
|
|
1127
|
+
label: z2.string().optional().describe("Names the rule on the exhibit; the bounds stay printed.")
|
|
1308
1128
|
})
|
|
1309
|
-
]), retiredKey = (error, why) =>
|
|
1129
|
+
]), retiredKey = (error, why) => z2.never({ error }).optional().describe(`Retired: ${why} An old spec still draws and warns option-deprecated.`), topNRankCutOnly = optionShapeSchema("topN", z2.object({
|
|
1310
1130
|
n: topNFields.n,
|
|
1311
1131
|
rest: retiredKey("'topN.rest' draws nothing on a dot chart; drop it", "a sum of scores is not a score, so a dot chart has no rest bucket."),
|
|
1312
1132
|
restLabel: retiredKey("'topN.restLabel' names a rest bucket a dot chart does not draw; drop it", "a dot chart has no rest bucket to name."),
|
|
1313
1133
|
showRestCount: retiredKey("'topN.showRestCount' has no rest bucket to count here; drop it", "a dot chart has no rest bucket to count."),
|
|
1314
1134
|
threshold: retiredKey("'topN.threshold' does not apply here; the rank cut is topN.n", "the rank cut is topN.n.")
|
|
1315
|
-
}), topNCount), topNOnPareto = optionShapeSchema("topN",
|
|
1135
|
+
}), topNCount), topNOnPareto = optionShapeSchema("topN", z2.object({
|
|
1316
1136
|
...topNFields,
|
|
1317
1137
|
showRestCount: retiredKey("'topN.showRestCount' is not a choice on a pareto, which always prints the count; drop it", "a Pareto always prints the count, because the concentration verdict rests on it."),
|
|
1318
1138
|
threshold: retiredKey("'topN.threshold' does not apply on a pareto; the rank cut is topN.n", "the rank cut is topN.n.")
|
|
1319
|
-
}), topNCount), bandedCategoryAxis =
|
|
1139
|
+
}), topNCount), bandedCategoryAxis = z2.object({
|
|
1320
1140
|
crossesBetween: retiredKey("'categoryAxis.crossesBetween' has no effect on columns; drop it, or use type 'line'", "columns always sit in the middle of their bands."),
|
|
1321
1141
|
dateTicks: baseOptionsSchema.shape.categoryAxis.unwrap().shape.dateTicks
|
|
1322
|
-
}).optional().describe("Category-axis settings: dateTicks."), sortCategoriesOnly = optionShapeSchema("sort",
|
|
1323
|
-
categories:
|
|
1142
|
+
}).optional().describe("Category-axis settings: dateTicks."), sortCategoriesOnly = optionShapeSchema("sort", z2.object({
|
|
1143
|
+
categories: z2.enum(["sheet", "asc", "desc", "reverse"]).optional().describe("Category order: sheet preserves authored order, reverse reverses it, asc and desc use the chart category ranking value."),
|
|
1324
1144
|
segments: retiredKey("'sort.segments' has no stacked segments to order here; drop it", "this chart has no stacked segments.")
|
|
1325
|
-
}),
|
|
1145
|
+
}), z2.union([z2.enum(["sheet", "asc", "desc", "reverse"]), z2.literal(!0)])), legendWithoutOrder = z2.union([
|
|
1326
1146
|
baseOptionsSchema.shape.legend.unwrap().options[0],
|
|
1327
|
-
|
|
1147
|
+
z2.object({
|
|
1328
1148
|
position: keyPositionSchema,
|
|
1329
1149
|
order: retiredKey("'legend.order' is derived on a likert, which reads in scale order; reorder data.scale", "the legend reads in scale order; reorder data.scale.")
|
|
1330
1150
|
}).describe("Explicit legend placement.")
|
|
1331
|
-
]).optional(), averageMarkerScope =
|
|
1332
|
-
|
|
1333
|
-
|
|
1151
|
+
]).optional(), averageMarkerScope = z2.union([z2.literal("all"), z2.array(idSchema).min(1)]).optional().describe("Series included in the computed average; defaults to 'all'."), averageMarkerWithoutPartial = z2.union([
|
|
1152
|
+
z2.boolean(),
|
|
1153
|
+
z2.object({
|
|
1334
1154
|
scope: averageMarkerScope,
|
|
1335
|
-
includePartial:
|
|
1155
|
+
includePartial: z2.never({ error: "'averageMarker.includePartial' has no partial category to bring back here; drop it" }).optional().describe("Retired: a dot chart averages every dot in scope. An old spec still draws and warns option-deprecated.")
|
|
1336
1156
|
})
|
|
1337
|
-
]).optional(), averageMarkerSchema =
|
|
1338
|
-
|
|
1339
|
-
|
|
1157
|
+
]).optional(), averageMarkerSchema = z2.union([
|
|
1158
|
+
z2.boolean(),
|
|
1159
|
+
z2.object({
|
|
1340
1160
|
scope: averageMarkerScope,
|
|
1341
|
-
includePartial:
|
|
1161
|
+
includePartial: z2.boolean().optional().describe("true averages the categories marked partial too. By default they are left out, and the label names the periods the average covers. Column, bar and combo.")
|
|
1342
1162
|
})
|
|
1343
1163
|
]).optional();
|
|
1344
1164
|
function narrowValueAxis(type, base) {
|
|
@@ -1347,11 +1167,11 @@ function narrowValueAxis(type, base) {
|
|
|
1347
1167
|
let why = valueAxisRefusal(type, key);
|
|
1348
1168
|
if (why === void 0) continue;
|
|
1349
1169
|
let suggest = valueAxisReason(type, key, why);
|
|
1350
|
-
refusals[key] =
|
|
1170
|
+
refusals[key] = z2.never({ error: notImplemented(`valueAxis.${key}`, type, suggest) }).optional().describe(`${key === "show" || key === "gridlines" ? `Ignored on '${type}' with an option-ignored warning` : `Refused on '${type}'`}: ${suggest}`);
|
|
1351
1171
|
}
|
|
1352
1172
|
if (valueAxisRefusal(type, "break") === void 0 && type !== "waterfall" && type !== "pvm") {
|
|
1353
1173
|
let [, noBreak, authoredBreak] = valueAxisSchema.shape.break.unwrap().options;
|
|
1354
|
-
refusals.break =
|
|
1174
|
+
refusals.break = z2.union([noBreak, authoredBreak]).optional().describe("No break by default or with false. Set { from, to, style? } for a straight value-axis break; the omitted span collapses to a fixed 12px gap when valid. Automatic placement is supported only by waterfall and pvm.");
|
|
1355
1175
|
}
|
|
1356
1176
|
return Object.keys(refusals).length ? base.safeExtend(refusals) : base;
|
|
1357
1177
|
}
|
|
@@ -1360,7 +1180,7 @@ function refusedBaseOptions(type) {
|
|
|
1360
1180
|
for (let [key, capability] of Object.entries(OPTION_CAPABILITY)) {
|
|
1361
1181
|
if (capability.implementedBy.includes(type) || "unsupportedSeverity" in capability && capability.unsupportedSeverity === "warn") continue;
|
|
1362
1182
|
let suggest = OPTION_REASONS[key];
|
|
1363
|
-
out[key] =
|
|
1183
|
+
out[key] = z2.never({ error: notImplemented(key, type, suggest) }).optional().describe(`${IGNORED_OPTION_KEYS.has(key) ? `Ignored on '${type}' with an option-ignored warning` : `Refused on '${type}'`}: ${suggest}`);
|
|
1364
1184
|
}
|
|
1365
1185
|
if (Object.hasOwn(LEGEND_DRAWS, type)) {
|
|
1366
1186
|
let values = LEGEND_DRAWS[type], why = LEGEND_DRAWS_REASONS[type];
|
|
@@ -1368,9 +1188,9 @@ function refusedBaseOptions(type) {
|
|
|
1368
1188
|
legendDrawsNothing(type, value) && ctx.addIssue({ code: "custom", message: `legend '${String(value)}' draws nothing on '${type}' \u2014 ${why}`, params: { refused: !0 } });
|
|
1369
1189
|
}).optional().describe(`On '${type}' only ${values.map((value) => `'${value}'`).join(" and ")} or a position object draw a key. 'none' and 'auto' are ignored with an option-ignored warning at info level: ${why}. 'right' stays refused.`);
|
|
1370
1190
|
}
|
|
1371
|
-
LEGEND_REFUSED.includes(type) && (out.legend =
|
|
1191
|
+
LEGEND_REFUSED.includes(type) && (out.legend = z2.never({ error: notImplemented("legend", type, LEGEND_REFUSED_REASONS[type]) }).optional().describe(`Ignored on '${type}' with an option-ignored warning: ${LEGEND_REFUSED_REASONS[type]}`)), ANNOTATIONS_RETIRED.includes(type) && (out.annotations = z2.never({ error: `'${type}' draws no annotation of any kind; drop annotations` }).optional().describe(`Retired on '${type}', which draws no annotation of any kind. An old spec still draws and warns option-deprecated.`));
|
|
1372
1192
|
let only = valueAxisOnly(type), valueAxis = narrowValueAxis(type, valueAxisSchema);
|
|
1373
|
-
return only?.keys.length === 0 ? out.valueAxis =
|
|
1193
|
+
return only?.keys.length === 0 ? out.valueAxis = z2.never({ error: notImplemented("valueAxis", type, VALUE_AXIS_ONLY_REASONS[type]) }).optional().describe(`Ignored on '${type}' with an option-ignored warning: valueAxis.show and valueAxis.gridlines. Other valueAxis settings are refused: ${VALUE_AXIS_ONLY_REASONS[type]}`) : valueAxis !== valueAxisSchema && (out.valueAxis = valueAxis.optional().describe(baseOptionsSchema.shape.valueAxis.description)), out;
|
|
1374
1194
|
}
|
|
1375
1195
|
function refuseUnstackedShares(options, ctx) {
|
|
1376
1196
|
options.sharesOfOneWhole === void 0 || options.variant === "stacked" || options.variant === "stacked100" || ctx.addIssue({
|
|
@@ -1380,22 +1200,18 @@ function refuseUnstackedShares(options, ctx) {
|
|
|
1380
1200
|
params: { refused: !0 }
|
|
1381
1201
|
});
|
|
1382
1202
|
}
|
|
1383
|
-
var readerStringsSchema =
|
|
1384
|
-
refusalMessage:
|
|
1385
|
-
refusalHint:
|
|
1386
|
-
emptyMessage:
|
|
1387
|
-
emptyHint:
|
|
1388
|
-
failureMessage:
|
|
1389
|
-
failureHint:
|
|
1390
|
-
diagnosticDetails:
|
|
1203
|
+
var readerStringsSchema = z2.object({
|
|
1204
|
+
refusalMessage: z2.string().optional().describe("Reader heading for a size refusal. Legacy width and height templates remain available only in full diagnostics."),
|
|
1205
|
+
refusalHint: z2.string().optional().describe("Reader hint for a size refusal; EN and DE defaults."),
|
|
1206
|
+
emptyMessage: z2.string().optional().describe("Reader heading for empty data; EN and DE defaults."),
|
|
1207
|
+
emptyHint: z2.string().optional().describe("Reader hint for empty data; EN and DE defaults."),
|
|
1208
|
+
failureMessage: z2.string().optional().describe("Reader heading when a chart cannot be shown; EN and DE defaults."),
|
|
1209
|
+
failureHint: z2.string().optional().describe("Reader hint when a chart cannot be shown; EN and DE defaults."),
|
|
1210
|
+
diagnosticDetails: z2.string().optional().describe("Label for the developer details disclosure; default Details.")
|
|
1391
1211
|
});
|
|
1392
1212
|
|
|
1393
1213
|
export {
|
|
1394
1214
|
categoryLabelsSchema,
|
|
1395
|
-
sanitizeObjectPrototype,
|
|
1396
|
-
missingChartName,
|
|
1397
|
-
DocExpansionError,
|
|
1398
|
-
expandDoc,
|
|
1399
1215
|
TYPE_REFUSED_REASONS,
|
|
1400
1216
|
notImplemented,
|
|
1401
1217
|
refusalSuggest,
|
|
@@ -1428,6 +1244,7 @@ export {
|
|
|
1428
1244
|
sizeSchema,
|
|
1429
1245
|
refuseBadgeEvents,
|
|
1430
1246
|
eventOptionsSchema,
|
|
1247
|
+
annotationKindTakes,
|
|
1431
1248
|
annotationSchema,
|
|
1432
1249
|
timeAnnotationSchema,
|
|
1433
1250
|
annotationArraySchema,
|