watch-tail 0.9.0 → 0.10.1
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/README.md +111 -10
- package/build/client/_app/immutable/assets/0.B5hI3s8c.css +2 -0
- package/build/client/_app/immutable/assets/2.Cn4w1JYv.css +1 -0
- package/build/client/_app/immutable/chunks/0bp2Fczu.js +1 -0
- package/build/client/_app/immutable/chunks/B2En4t_E.js +3 -0
- package/build/client/_app/immutable/chunks/{DS3cLPAu.js → B7X5bVGV.js} +1 -1
- package/build/client/_app/immutable/chunks/BDcWO4cr.js +1 -0
- package/build/client/_app/immutable/chunks/{Dkh4Dwm8.js → BDdUgtQ9.js} +1 -1
- package/build/client/_app/immutable/chunks/{0b2v80OK.js → BP77Fyht.js} +1 -1
- package/build/client/_app/immutable/chunks/{dqF8mxBW.js → B_Mg_9D4.js} +1 -1
- package/build/client/_app/immutable/chunks/BvE-N_5_.js +1 -0
- package/build/client/_app/immutable/chunks/C0Fq51PS.js +1 -0
- package/build/client/_app/immutable/chunks/CBu7zaX6.js +15 -0
- package/build/client/_app/immutable/chunks/CDs2jokv.js +1 -0
- package/build/client/_app/immutable/chunks/{B5RiPG8Z.js → CL6wPCzw.js} +1 -1
- package/build/client/_app/immutable/chunks/CMPe3AwH.js +1 -0
- package/build/client/_app/immutable/chunks/{b77-bq1n.js → CRxuTO84.js} +1 -1
- package/build/client/_app/immutable/chunks/CXlCR4o6.js +10 -0
- package/build/client/_app/immutable/chunks/{DQqLOGLe.js → CZZUqHxO.js} +1 -1
- package/build/client/_app/immutable/chunks/{aI_O2VuQ.js → CaFHnwyo.js} +1 -1
- package/build/client/_app/immutable/chunks/CbtqT1c8.js +1 -0
- package/build/client/_app/immutable/chunks/{DGYKsRyW.js → CfRqDrzx.js} +1 -1
- package/build/client/_app/immutable/chunks/CwzJ9AB4.js +1 -0
- package/build/client/_app/immutable/chunks/{DwOZdLDj.js → Cy2yzzl5.js} +1 -1
- package/build/client/_app/immutable/chunks/D067lFSc.js +2 -0
- package/build/client/_app/immutable/chunks/{C_U_Jvk5.js → D27MZEE2.js} +1 -1
- package/build/client/_app/immutable/chunks/{IlwbfbOu.js → D9KJP6hv.js} +1 -1
- package/build/client/_app/immutable/chunks/DO938hpm.js +1 -0
- package/build/client/_app/immutable/chunks/DrLgrJ3k.js +1 -0
- package/build/client/_app/immutable/chunks/DrupwIIS.js +1 -0
- package/build/client/_app/immutable/chunks/LGzrUxfF.js +1 -0
- package/build/client/_app/immutable/chunks/{D7vimbmk.js → PUpq0Ki5.js} +1 -1
- package/build/client/_app/immutable/chunks/{DvxMaQv_.js → kSuEE8Bt.js} +1 -1
- package/build/client/_app/immutable/chunks/y79YFfGW.js +1 -0
- package/build/client/_app/immutable/chunks/zP_HZRCk.js +1 -0
- package/build/client/_app/immutable/entry/app.BEq8gOel.js +2 -0
- package/build/client/_app/immutable/entry/start.DmBlaUbV.js +1 -0
- package/build/client/_app/immutable/nodes/0.D63E8Q6i.js +1 -0
- package/build/client/_app/immutable/nodes/1.DXfG5P6X.js +1 -0
- package/build/client/_app/immutable/nodes/2.45XrHxUU.js +5 -0
- package/build/client/_app/version.json +1 -1
- package/build/env.js +0 -1
- package/build/handler.js +6 -9
- package/build/index.js +6 -9
- package/build/server/chunks/chunks/{archive.js-D2jtMmDo.js → archive.js-D7cGVWaq.js} +331 -31
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +0 -1
- package/build/server/chunks/chunks/env2.js-C5BgBJDY.js +0 -1
- package/build/server/chunks/chunks/{exports.js-ClPPfcHj.js → exports.js-CvFPPbaH.js} +0 -6
- package/build/server/chunks/chunks/identity.js-NmGXxBz3.js +0 -1
- package/build/server/chunks/chunks/{index-server.js-CtH9Hqwf.js → index-server.js-DOq0LmqS.js} +87 -112
- package/build/server/chunks/chunks/internal.js-DZ8ZzzjN.js +0 -1
- package/build/server/chunks/chunks/{legacy-client.js-DAqKExQD.js → internal2.js-B2FekELn.js} +279 -7
- package/build/server/chunks/chunks/{level-filter.js-D9MNrew3.js → level-filter.js-kKdNjmbR.js} +2 -3
- package/build/server/chunks/chunks/{log-buffer.js-A9FA-Qv8.js → log-buffer.js-BjT3sJlh.js} +1 -2
- package/build/server/chunks/chunks/regions.js-COf7DgnH.js +0 -1
- package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js +0 -1
- package/build/server/chunks/chunks/shared.js-CgjUIvRK.js +0 -1
- package/build/server/chunks/chunks/source.js-DZEVvuho.js +0 -1
- package/build/server/chunks/chunks/{state.js-i-NVNGIq.js → state.js-CdO6iuBd.js} +3 -4
- package/build/server/chunks/chunks/text-size.svelte.js-D09gVgvI.js +309 -0
- package/build/server/chunks/chunks/{time-range.js-BLMT8aU3.js → time-range.js-__87ZPq6.js} +9 -5
- package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js +0 -1
- package/build/server/chunks/chunks/utils.js-BIlHjgGW.js +0 -1
- package/build/server/chunks/entries/endpoints/api/archive/{_server.ts.js-C4hWyXuu.js → _server.ts.js-D-97I3hr.js} +2 -3
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-C5tfrpmC.js +0 -1
- package/build/server/chunks/entries/endpoints/api/identity/_server.ts.js-PWRPScuN.js +0 -1
- package/build/server/chunks/entries/endpoints/api/log-groups/{_server.ts.js-D4y43Vwe.js → _server.ts.js-BBBsBX5h.js} +2 -3
- package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-9_g0ojki.js +0 -1
- package/build/server/chunks/entries/endpoints/api/series/{_server.ts.js-DibT3Hjc.js → _server.ts.js-bsGqvQ1O.js} +4 -5
- package/build/server/chunks/entries/endpoints/api/stream/{_server.ts.js-BxXw5K0R.js → _server.ts.js-B6obpUbh.js} +211 -49
- package/build/server/chunks/entries/fallbacks/{error.svelte.js-ylsqA41Y.js → error.svelte.js-BupH3lxJ.js} +4 -7
- package/build/server/chunks/entries/pages/_layout.svelte.js-C3CVxu2T.js +621 -0
- package/build/server/chunks/entries/pages/{_page.svelte.js-C9-7d7mD.js → _page.svelte.js-DS9p1LVo.js} +643 -191
- package/build/server/chunks/{handler-Bqo8aDgP.js → handler-DrjCpeeA.js} +4 -5
- package/build/server/chunks/{index.js-fPvMujCL.js → index.js-BLTOesya.js} +3 -4
- package/build/server/chunks/{manifest.js-Bkj-8GaD.js → manifest.js-C1_IS4sj.js} +8 -9
- package/build/server/chunks/nodes/0.js-BHXaR9OX.js +8 -0
- package/build/server/chunks/nodes/1.js-C-coUSdu.js +8 -0
- package/build/server/chunks/nodes/2.js-Dor6Xgc7.js +8 -0
- package/build/shims.js +0 -1
- package/dist/cli/completions.js +24 -0
- package/dist/cli/index.js +144 -3
- package/dist/cli/mcp/agents.js +344 -0
- package/dist/cli/mcp/backend.js +235 -0
- package/dist/cli/mcp/run.js +245 -0
- package/dist/cli/mcp/stdio.js +103 -0
- package/dist/cli/mcp/tools.js +245 -0
- package/dist/cli/options.js +138 -25
- package/dist/cli/server.js +28 -0
- package/dist/cli/ui.js +20 -1
- package/dist/lib/time-range.js +14 -3
- package/package.json +21 -6
- package/build/client/_app/immutable/assets/0.ChTKqSf6.css +0 -2
- package/build/client/_app/immutable/assets/0.ChTKqSf6.css.br +0 -0
- package/build/client/_app/immutable/assets/0.ChTKqSf6.css.gz +0 -0
- package/build/client/_app/immutable/assets/BrushContext.2tkUc39H.css.br +0 -0
- package/build/client/_app/immutable/assets/BrushContext.2tkUc39H.css.gz +0 -0
- package/build/client/_app/immutable/assets/ChartAnnotations.Bw8CGteN.css.br +0 -0
- package/build/client/_app/immutable/assets/ChartAnnotations.Bw8CGteN.css.gz +0 -0
- package/build/client/_app/immutable/assets/Circle.C5MKzgk2.css.br +0 -1
- package/build/client/_app/immutable/assets/Circle.C5MKzgk2.css.gz +0 -0
- package/build/client/_app/immutable/assets/DefaultTooltip.CGOVIm3D.css.br +0 -0
- package/build/client/_app/immutable/assets/DefaultTooltip.CGOVIm3D.css.gz +0 -0
- package/build/client/_app/immutable/assets/EventScatter.0BkgJO-l.css.br +0 -0
- package/build/client/_app/immutable/assets/EventScatter.0BkgJO-l.css.gz +0 -0
- package/build/client/_app/immutable/assets/Labels.sEaJtb97.css.br +0 -0
- package/build/client/_app/immutable/assets/Labels.sEaJtb97.css.gz +0 -0
- package/build/client/_app/immutable/assets/Legend.DnhxhJ2I.css.br +0 -0
- package/build/client/_app/immutable/assets/Legend.DnhxhJ2I.css.gz +0 -0
- package/build/client/_app/immutable/assets/Path.B0wDzTrn.css.br +0 -0
- package/build/client/_app/immutable/assets/Path.B0wDzTrn.css.gz +0 -0
- package/build/client/_app/immutable/assets/TransformContext.1cjyViIk.css.br +0 -0
- package/build/client/_app/immutable/assets/TransformContext.1cjyViIk.css.gz +0 -0
- package/build/client/_app/immutable/assets/Voronoi.ce7atosu.css.br +0 -0
- package/build/client/_app/immutable/assets/Voronoi.ce7atosu.css.gz +0 -0
- package/build/client/_app/immutable/chunks/0b2v80OK.js.br +0 -0
- package/build/client/_app/immutable/chunks/0b2v80OK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/5EFAIHuJ.js +0 -1
- package/build/client/_app/immutable/chunks/5EFAIHuJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/5EFAIHuJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B15XBe8D.js +0 -1
- package/build/client/_app/immutable/chunks/B15XBe8D.js.br +0 -0
- package/build/client/_app/immutable/chunks/B15XBe8D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B5RiPG8Z.js.br +0 -2
- package/build/client/_app/immutable/chunks/B5RiPG8Z.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BR2LaRms.js.br +0 -1
- package/build/client/_app/immutable/chunks/BR2LaRms.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B_KVdCQT.js +0 -10
- package/build/client/_app/immutable/chunks/B_KVdCQT.js.br +0 -0
- package/build/client/_app/immutable/chunks/B_KVdCQT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bl052uUt.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bl052uUt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BuCpRsEL.js +0 -1
- package/build/client/_app/immutable/chunks/BuCpRsEL.js.br +0 -0
- package/build/client/_app/immutable/chunks/BuCpRsEL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BvZtsVvW.js +0 -1
- package/build/client/_app/immutable/chunks/BvZtsVvW.js.br +0 -0
- package/build/client/_app/immutable/chunks/BvZtsVvW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C3Y15ONf.js +0 -2
- package/build/client/_app/immutable/chunks/C3Y15ONf.js.br +0 -0
- package/build/client/_app/immutable/chunks/C3Y15ONf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C58PZtCD.js.br +0 -0
- package/build/client/_app/immutable/chunks/C58PZtCD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C9GPQYs7.js +0 -1
- package/build/client/_app/immutable/chunks/C9GPQYs7.js.br +0 -0
- package/build/client/_app/immutable/chunks/C9GPQYs7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CBZpkDc1.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBZpkDc1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CCch3uox.js.br +0 -0
- package/build/client/_app/immutable/chunks/CCch3uox.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C_U_Jvk5.js.br +0 -0
- package/build/client/_app/immutable/chunks/C_U_Jvk5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cd7JqZj9.js +0 -1
- package/build/client/_app/immutable/chunks/Cd7JqZj9.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cd7JqZj9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D2PbcyDU.js +0 -1
- package/build/client/_app/immutable/chunks/D2PbcyDU.js.br +0 -0
- package/build/client/_app/immutable/chunks/D2PbcyDU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D7vimbmk.js.br +0 -0
- package/build/client/_app/immutable/chunks/D7vimbmk.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DAqXSYzi.js +0 -1
- package/build/client/_app/immutable/chunks/DAqXSYzi.js.br +0 -0
- package/build/client/_app/immutable/chunks/DAqXSYzi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DGYKsRyW.js.br +0 -0
- package/build/client/_app/immutable/chunks/DGYKsRyW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DPaulGql.js +0 -1
- package/build/client/_app/immutable/chunks/DPaulGql.js.br +0 -1
- package/build/client/_app/immutable/chunks/DPaulGql.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQqLOGLe.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQqLOGLe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DS3cLPAu.js.br +0 -0
- package/build/client/_app/immutable/chunks/DS3cLPAu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Db0q5_zr.js.br +0 -0
- package/build/client/_app/immutable/chunks/Db0q5_zr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dfvzj6n2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dfvzj6n2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dkh4Dwm8.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dkh4Dwm8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DnqfXHAL.js +0 -15
- package/build/client/_app/immutable/chunks/DnqfXHAL.js.br +0 -0
- package/build/client/_app/immutable/chunks/DnqfXHAL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DsYron7_.js +0 -1
- package/build/client/_app/immutable/chunks/DsYron7_.js.br +0 -0
- package/build/client/_app/immutable/chunks/DsYron7_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DuM1cPdZ.js +0 -1
- package/build/client/_app/immutable/chunks/DuM1cPdZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/DuM1cPdZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DvxMaQv_.js.br +0 -0
- package/build/client/_app/immutable/chunks/DvxMaQv_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DwOZdLDj.js.br +0 -0
- package/build/client/_app/immutable/chunks/DwOZdLDj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/HclGiUj8.js.br +0 -0
- package/build/client/_app/immutable/chunks/HclGiUj8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/IlwbfbOu.js.br +0 -0
- package/build/client/_app/immutable/chunks/IlwbfbOu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/RobXhXPM.js.br +0 -1
- package/build/client/_app/immutable/chunks/RobXhXPM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Y5urAfNy.js.br +0 -0
- package/build/client/_app/immutable/chunks/Y5urAfNy.js.gz +0 -0
- package/build/client/_app/immutable/chunks/aI_O2VuQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/aI_O2VuQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/b77-bq1n.js.br +0 -0
- package/build/client/_app/immutable/chunks/b77-bq1n.js.gz +0 -0
- package/build/client/_app/immutable/chunks/dqF8mxBW.js.br +0 -0
- package/build/client/_app/immutable/chunks/dqF8mxBW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/gkAHSOnS.js +0 -1
- package/build/client/_app/immutable/chunks/gkAHSOnS.js.br +0 -0
- package/build/client/_app/immutable/chunks/gkAHSOnS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/pqiPC7Y8.js +0 -3
- package/build/client/_app/immutable/chunks/pqiPC7Y8.js.br +0 -0
- package/build/client/_app/immutable/chunks/pqiPC7Y8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ti8ecMFX.js +0 -1
- package/build/client/_app/immutable/chunks/ti8ecMFX.js.br +0 -0
- package/build/client/_app/immutable/chunks/ti8ecMFX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js.br +0 -1
- package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/yCfI4PCa.js.br +0 -0
- package/build/client/_app/immutable/chunks/yCfI4PCa.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CTR4aUFT.js +0 -2
- package/build/client/_app/immutable/entry/app.CTR4aUFT.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CTR4aUFT.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CC6Ln8E2.js +0 -1
- package/build/client/_app/immutable/entry/start.CC6Ln8E2.js.br +0 -0
- package/build/client/_app/immutable/entry/start.CC6Ln8E2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.CvUxmLsM.js +0 -1
- package/build/client/_app/immutable/nodes/0.CvUxmLsM.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.CvUxmLsM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.CbSHqfEx.js +0 -1
- package/build/client/_app/immutable/nodes/1.CbSHqfEx.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.CbSHqfEx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DcD5v8dU.js +0 -5
- package/build/client/_app/immutable/nodes/2.DcD5v8dU.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DcD5v8dU.js.gz +0 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/robots.txt.br +0 -0
- package/build/client/robots.txt.gz +0 -0
- package/build/env.js.map +0 -1
- package/build/handler.js.map +0 -1
- package/build/index.js.map +0 -1
- package/build/server/chunks/chunks/Arc.canvas.js-CN0KDoHG.js +0 -701
- package/build/server/chunks/chunks/Arc.canvas.js-CN0KDoHG.js.map +0 -1
- package/build/server/chunks/chunks/Arc.js-C8EC9NoE.js +0 -31
- package/build/server/chunks/chunks/Arc.js-C8EC9NoE.js.map +0 -1
- package/build/server/chunks/chunks/Bar.js-DtAb3LZZ.js +0 -448
- package/build/server/chunks/chunks/Bar.js-DtAb3LZZ.js.map +0 -1
- package/build/server/chunks/chunks/ChartAnnotations.js-twzDSVzY.js +0 -983
- package/build/server/chunks/chunks/ChartAnnotations.js-twzDSVzY.js.map +0 -1
- package/build/server/chunks/chunks/Circle.html.js-BJywADGK.js +0 -355
- package/build/server/chunks/chunks/Circle.html.js-BJywADGK.js.map +0 -1
- package/build/server/chunks/chunks/ClipPath.canvas.js-9Fc0bTEM.js +0 -170
- package/build/server/chunks/chunks/ClipPath.canvas.js-9Fc0bTEM.js.map +0 -1
- package/build/server/chunks/chunks/DefaultTooltip.js-C2NWK2AD.js +0 -352
- package/build/server/chunks/chunks/DefaultTooltip.js-C2NWK2AD.js.map +0 -1
- package/build/server/chunks/chunks/EventScatter.js-CO2GonW-.js +0 -7370
- package/build/server/chunks/chunks/EventScatter.js-CO2GonW-.js.map +0 -1
- package/build/server/chunks/chunks/Labels.js-DB9qoyZ3.js +0 -497
- package/build/server/chunks/chunks/Labels.js-DB9qoyZ3.js.map +0 -1
- package/build/server/chunks/chunks/Legend.js-B_ArjxQ7.js +0 -343
- package/build/server/chunks/chunks/Legend.js-B_ArjxQ7.js.map +0 -1
- package/build/server/chunks/chunks/Line.html.js-B1REcOFe.js +0 -423
- package/build/server/chunks/chunks/Line.html.js-B1REcOFe.js.map +0 -1
- package/build/server/chunks/chunks/Link.canvas.js-nWimAHfH.js +0 -756
- package/build/server/chunks/chunks/Link.canvas.js-nWimAHfH.js.map +0 -1
- package/build/server/chunks/chunks/Path.canvas.js-5A9wB8zQ.js +0 -1259
- package/build/server/chunks/chunks/Path.canvas.js-5A9wB8zQ.js.map +0 -1
- package/build/server/chunks/chunks/Points.html.js-B2o3k-ZZ.js +0 -228
- package/build/server/chunks/chunks/Points.html.js-B2o3k-ZZ.js.map +0 -1
- package/build/server/chunks/chunks/Points.js-D7ozN9W5.js +0 -14
- package/build/server/chunks/chunks/Points.js-D7ozN9W5.js.map +0 -1
- package/build/server/chunks/chunks/Points2.js-BVbWugLT.js +0 -25
- package/build/server/chunks/chunks/Points2.js-BVbWugLT.js.map +0 -1
- package/build/server/chunks/chunks/Rect.html.js-DnQ6ObhQ.js +0 -547
- package/build/server/chunks/chunks/Rect.html.js-DnQ6ObhQ.js.map +0 -1
- package/build/server/chunks/chunks/Spline.js-YnAxvrKY.js +0 -516
- package/build/server/chunks/chunks/Spline.js-YnAxvrKY.js.map +0 -1
- package/build/server/chunks/chunks/Text.html.js-LbmYJb11.js +0 -847
- package/build/server/chunks/chunks/Text.html.js-LbmYJb11.js.map +0 -1
- package/build/server/chunks/chunks/TooltipItem.js-Ce-blieA.js +0 -314
- package/build/server/chunks/chunks/TooltipItem.js-Ce-blieA.js.map +0 -1
- package/build/server/chunks/chunks/Voronoi.js-CalFJAXH.js +0 -2052
- package/build/server/chunks/chunks/Voronoi.js-CalFJAXH.js.map +0 -1
- package/build/server/chunks/chunks/archive.js-D2jtMmDo.js.map +0 -1
- package/build/server/chunks/chunks/array.js-CBp0H4t3.js +0 -8
- package/build/server/chunks/chunks/array.js-CBp0H4t3.js.map +0 -1
- package/build/server/chunks/chunks/attributes.js-CbKEpZKa.js +0 -25
- package/build/server/chunks/chunks/attributes.js-CbKEpZKa.js.map +0 -1
- package/build/server/chunks/chunks/band.js-CjzHWr4k.js +0 -155
- package/build/server/chunks/chunks/band.js-CjzHWr4k.js.map +0 -1
- package/build/server/chunks/chunks/centroid.js-BnGN3LH0.js +0 -1356
- package/build/server/chunks/chunks/centroid.js-BnGN3LH0.js.map +0 -1
- package/build/server/chunks/chunks/common.js-BvQnfkFo.js +0 -5760
- package/build/server/chunks/chunks/common.js-BvQnfkFo.js.map +0 -1
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js.map +0 -1
- package/build/server/chunks/chunks/env2.js-C5BgBJDY.js.map +0 -1
- package/build/server/chunks/chunks/events.js-zIVaXIP1.js +0 -95
- package/build/server/chunks/chunks/events.js-zIVaXIP1.js.map +0 -1
- package/build/server/chunks/chunks/exports.js-ClPPfcHj.js.map +0 -1
- package/build/server/chunks/chunks/group.js-D0SfevId.js +0 -30
- package/build/server/chunks/chunks/group.js-D0SfevId.js.map +0 -1
- package/build/server/chunks/chunks/identity.js-NmGXxBz3.js.map +0 -1
- package/build/server/chunks/chunks/index-server.js-CtH9Hqwf.js.map +0 -1
- package/build/server/chunks/chunks/index-server2.js-l0sNRNKZ.js +0 -2
- package/build/server/chunks/chunks/index-server2.js-l0sNRNKZ.js.map +0 -1
- package/build/server/chunks/chunks/internal.js-DZ8ZzzjN.js.map +0 -1
- package/build/server/chunks/chunks/internal2.js-CfVVfAb5.js +0 -188
- package/build/server/chunks/chunks/internal2.js-CfVVfAb5.js.map +0 -1
- package/build/server/chunks/chunks/key.svelte.js-Cq0L6YlN.js +0 -695
- package/build/server/chunks/chunks/key.svelte.js-Cq0L6YlN.js.map +0 -1
- package/build/server/chunks/chunks/legacy-client.js-DAqKExQD.js.map +0 -1
- package/build/server/chunks/chunks/level-filter.js-D9MNrew3.js.map +0 -1
- package/build/server/chunks/chunks/lineRadial.js-B7ZNP_Jp.js +0 -126
- package/build/server/chunks/chunks/lineRadial.js-B7ZNP_Jp.js.map +0 -1
- package/build/server/chunks/chunks/linear.js-CHlwr1I4.js +0 -1046
- package/build/server/chunks/chunks/linear.js-CHlwr1I4.js.map +0 -1
- package/build/server/chunks/chunks/log-buffer.js-A9FA-Qv8.js.map +0 -1
- package/build/server/chunks/chunks/math.js-BqujbaBs.js +0 -50
- package/build/server/chunks/chunks/math.js-BqujbaBs.js.map +0 -1
- package/build/server/chunks/chunks/max.js-CuS0BpRI.js +0 -11
- package/build/server/chunks/chunks/max.js-CuS0BpRI.js.map +0 -1
- package/build/server/chunks/chunks/min.js-DZWt5tPl.js +0 -11
- package/build/server/chunks/chunks/min.js-DZWt5tPl.js.map +0 -1
- package/build/server/chunks/chunks/motion.svelte.js-Crk8ri1u.js +0 -677
- package/build/server/chunks/chunks/motion.svelte.js-Crk8ri1u.js.map +0 -1
- package/build/server/chunks/chunks/occlusion.js-ot9_OqWn.js +0 -33
- package/build/server/chunks/chunks/occlusion.js-ot9_OqWn.js.map +0 -1
- package/build/server/chunks/chunks/path.js-BizMrlzb.js +0 -488
- package/build/server/chunks/chunks/path.js-BizMrlzb.js.map +0 -1
- package/build/server/chunks/chunks/path2.js-DLVU8nc9.js +0 -27
- package/build/server/chunks/chunks/path2.js-DLVU8nc9.js.map +0 -1
- package/build/server/chunks/chunks/pointRadial.js-Deeu1LXx.js +0 -7
- package/build/server/chunks/chunks/pointRadial.js-Deeu1LXx.js.map +0 -1
- package/build/server/chunks/chunks/rect.svelte.js-_0PgI5fe.js +0 -187
- package/build/server/chunks/chunks/rect.svelte.js-_0PgI5fe.js.map +0 -1
- package/build/server/chunks/chunks/regions.js-COf7DgnH.js.map +0 -1
- package/build/server/chunks/chunks/scales.svelte.js-DeNkKcI-.js +0 -276
- package/build/server/chunks/chunks/scales.svelte.js-DeNkKcI-.js.map +0 -1
- package/build/server/chunks/chunks/series-buckets.js-C-vMEJT2.js +0 -316
- package/build/server/chunks/chunks/series-buckets.js-C-vMEJT2.js.map +0 -1
- package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js.map +0 -1
- package/build/server/chunks/chunks/shared.js-CgjUIvRK.js.map +0 -1
- package/build/server/chunks/chunks/source.js-DZEVvuho.js.map +0 -1
- package/build/server/chunks/chunks/state.js-i-NVNGIq.js.map +0 -1
- package/build/server/chunks/chunks/time-range.js-BLMT8aU3.js.map +0 -1
- package/build/server/chunks/chunks/types.js-x3GyGPOz.js +0 -11
- package/build/server/chunks/chunks/types.js-x3GyGPOz.js.map +0 -1
- package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js.map +0 -1
- package/build/server/chunks/chunks/utils.js-BIlHjgGW.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/archive/_server.ts.js-C4hWyXuu.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-C5tfrpmC.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/identity/_server.ts.js-PWRPScuN.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D4y43Vwe.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-9_g0ojki.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/series/_server.ts.js-DibT3Hjc.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-BxXw5K0R.js.map +0 -1
- package/build/server/chunks/entries/fallbacks/error.svelte.js-ylsqA41Y.js.map +0 -1
- package/build/server/chunks/entries/pages/_layout.svelte.js-D7sAdBVX.js +0 -113
- package/build/server/chunks/entries/pages/_layout.svelte.js-D7sAdBVX.js.map +0 -1
- package/build/server/chunks/entries/pages/_page.svelte.js-C9-7d7mD.js.map +0 -1
- package/build/server/chunks/handler-Bqo8aDgP.js.map +0 -1
- package/build/server/chunks/index.js-fPvMujCL.js.map +0 -1
- package/build/server/chunks/manifest.js-Bkj-8GaD.js.map +0 -1
- package/build/server/chunks/nodes/0.js-7J6kXnEo.js +0 -9
- package/build/server/chunks/nodes/0.js-7J6kXnEo.js.map +0 -1
- package/build/server/chunks/nodes/1.js-DZXnUx67.js +0 -9
- package/build/server/chunks/nodes/1.js-DZXnUx67.js.map +0 -1
- package/build/server/chunks/nodes/2.js-85y9-1SS.js +0 -9
- package/build/server/chunks/nodes/2.js-85y9-1SS.js.map +0 -1
- package/build/shims.js.map +0 -1
|
@@ -1,847 +0,0 @@
|
|
|
1
|
-
import { am as props_id, a6 as ensure_array_like, al as attributes, ag as clsx, a7 as attr, a8 as escape_html, ac as attr_style, ae as stringify, ad as attr_class, af as bind_props, a1 as derived } from './index-server.js-CtH9Hqwf.js';
|
|
2
|
-
import { a as getChartContext, g as get, A as format, m as merge, b as cls } from './common.js-BvQnfkFo.js';
|
|
3
|
-
import { m as memoize, i as resolveColorProp, j as resolveStyleProp, a as getMarkData, b as getGeoContext, r as resolveGeoDataPair, c as resolveDataProp, d as createKey, n as getComputedStyles, o as renderText } from './key.svelte.js-Cq0L6YlN.js';
|
|
4
|
-
import { c as createId } from './Path.canvas.js-5A9wB8zQ.js';
|
|
5
|
-
import { d as createMotion, f as createDataMotionMap } from './motion.svelte.js-Crk8ri1u.js';
|
|
6
|
-
import { d as degreesToRadians } from './math.js-BqujbaBs.js';
|
|
7
|
-
|
|
8
|
-
//#region node_modules/.pnpm/layerchart@2.5.0_@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0__9bc60734f10d29b7556189549fab5703/node_modules/layerchart/dist/utils/string.js
|
|
9
|
-
var MEASUREMENT_ELEMENT_ID = "__text_measurement_id";
|
|
10
|
-
function _getStringWidth(str, style) {
|
|
11
|
-
try {
|
|
12
|
-
let textEl = document.getElementById(MEASUREMENT_ELEMENT_ID);
|
|
13
|
-
if (!textEl) {
|
|
14
|
-
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
15
|
-
svg.style.width = "0";
|
|
16
|
-
svg.style.height = "0";
|
|
17
|
-
svg.style.position = "absolute";
|
|
18
|
-
svg.style.top = "-100%";
|
|
19
|
-
svg.style.left = "-100%";
|
|
20
|
-
textEl = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
21
|
-
textEl.setAttribute("id", MEASUREMENT_ELEMENT_ID);
|
|
22
|
-
svg.appendChild(textEl);
|
|
23
|
-
document.body.appendChild(svg);
|
|
24
|
-
}
|
|
25
|
-
Object.assign(textEl.style, style);
|
|
26
|
-
textEl.textContent = str;
|
|
27
|
-
return textEl.getComputedTextLength();
|
|
28
|
-
} catch (e) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
var getStringWidth = memoize(_getStringWidth, { cacheKey: ([str, style]) => `${str}_${JSON.stringify(style)}` });
|
|
33
|
-
/**
|
|
34
|
-
* Axis-aligned box enclosing `rect` after rotating it `degrees` about (`originX`, `originY`) —
|
|
35
|
-
* the same rotation SVG's `rotate(deg, x, y)` applies.
|
|
36
|
-
*
|
|
37
|
-
* A rotated label still has to be compared as an axis-aligned box (that is all `occlude()` tests),
|
|
38
|
-
* so it is widened to the box that contains it. At 45° a long label takes far less horizontal
|
|
39
|
-
* room than it does flat, and measuring it unrotated would drop neighbours that actually fit.
|
|
40
|
-
*/
|
|
41
|
-
function rotateRect(rect, degrees, originX, originY) {
|
|
42
|
-
if (!degrees) return rect;
|
|
43
|
-
const radians = degrees * Math.PI / 180;
|
|
44
|
-
const cos = Math.cos(radians);
|
|
45
|
-
const sin = Math.sin(radians);
|
|
46
|
-
const corners = [
|
|
47
|
-
[rect.x, rect.y],
|
|
48
|
-
[rect.x + rect.width, rect.y],
|
|
49
|
-
[rect.x, rect.y + rect.height],
|
|
50
|
-
[rect.x + rect.width, rect.y + rect.height]
|
|
51
|
-
].map(([cx, cy]) => {
|
|
52
|
-
const dx = cx - originX;
|
|
53
|
-
const dy = cy - originY;
|
|
54
|
-
return [originX + dx * cos - dy * sin, originY + dx * sin + dy * cos];
|
|
55
|
-
});
|
|
56
|
-
const xs = corners.map(([cx]) => cx);
|
|
57
|
-
const ys = corners.map(([, cy]) => cy);
|
|
58
|
-
const minX = Math.min(...xs);
|
|
59
|
-
const minY = Math.min(...ys);
|
|
60
|
-
return {
|
|
61
|
-
x: minX,
|
|
62
|
-
y: minY,
|
|
63
|
-
width: Math.max(...xs) - minX,
|
|
64
|
-
height: Math.max(...ys) - minY
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Bounding box (`{ x, y, width, height }`) of `text` anchored at (`x`, `y`) — matching
|
|
69
|
-
* how `<Text>` positions it for the given `textAnchor`/`verticalAnchor`/`rotate`. Width is
|
|
70
|
-
* measured with the same memoized metrics as `<Text>` (falling back to a character-count estimate
|
|
71
|
-
* when the DOM is unavailable, e.g. during SSR), making it a convenient `bounds` for
|
|
72
|
-
* `occlude()`.
|
|
73
|
-
*
|
|
74
|
-
* Pass an array to measure a multiline `<Text>` value: the box is as wide as the widest line and
|
|
75
|
-
* as tall as the stack.
|
|
76
|
-
*/
|
|
77
|
-
function getTextRect(text, x, y, options = {}) {
|
|
78
|
-
const { textAnchor = "start", verticalAnchor = "middle", fontSize = 16, lineHeight = fontSize, dx = 0, dy = 0, rotate = 0 } = options;
|
|
79
|
-
const lines = Array.isArray(text) ? text : [text];
|
|
80
|
-
const width = lines.reduce((widest, line) => {
|
|
81
|
-
const lineWidth = getStringWidth(line, { fontSize: `${fontSize}px` }) ?? line.length * fontSize * .6;
|
|
82
|
-
return Math.max(widest, lineWidth);
|
|
83
|
-
}, 0);
|
|
84
|
-
const height = lines.length > 1 ? lineHeight * lines.length : fontSize;
|
|
85
|
-
const ax = x + dx;
|
|
86
|
-
const ay = y + dy;
|
|
87
|
-
return rotateRect({
|
|
88
|
-
x: textAnchor === "end" ? ax - width : textAnchor === "middle" ? ax - width / 2 : ax,
|
|
89
|
-
y: verticalAnchor === "end" ? ay - height : verticalAnchor === "middle" ? ay - height / 2 : ay,
|
|
90
|
-
width,
|
|
91
|
-
height
|
|
92
|
-
}, rotate, x, y);
|
|
93
|
-
}
|
|
94
|
-
function toTitleCase(str) {
|
|
95
|
-
return str.replace(/^\w/, (d) => d.toUpperCase());
|
|
96
|
-
}
|
|
97
|
-
var DEFAULT_ELLIPSIS = "…";
|
|
98
|
-
/**
|
|
99
|
-
* Truncates a string to fit within a specified pixel width or character count.
|
|
100
|
-
* If the string's width exceeds the maxWidth, it will be truncated. If the character
|
|
101
|
-
* count exceeds maxChars, it will also be truncated.
|
|
102
|
-
*
|
|
103
|
-
* The ellipsis can be placed at the start, middle, or end of the string.
|
|
104
|
-
*/
|
|
105
|
-
function truncateText(text, { position = "end", ellipsis = DEFAULT_ELLIPSIS, maxWidth, style, maxChars }) {
|
|
106
|
-
if (!text) return "";
|
|
107
|
-
if (maxWidth === void 0 && maxChars === void 0) return text;
|
|
108
|
-
let workingText = text;
|
|
109
|
-
if (maxChars !== void 0 && text.length > maxChars) {
|
|
110
|
-
if (position === "start") workingText = ellipsis + text.slice(-maxChars);
|
|
111
|
-
else if (position === "middle") {
|
|
112
|
-
const half = Math.floor(maxChars / 2);
|
|
113
|
-
workingText = text.slice(0, half) + ellipsis + text.slice(-half);
|
|
114
|
-
} else workingText = text.slice(0, maxChars) + ellipsis;
|
|
115
|
-
}
|
|
116
|
-
if (maxWidth !== void 0) {
|
|
117
|
-
const fullWidth = getStringWidth(workingText, style);
|
|
118
|
-
if (fullWidth === null || fullWidth <= maxWidth) return workingText;
|
|
119
|
-
let availableWidth = maxWidth - (getStringWidth(ellipsis, style) ?? 0);
|
|
120
|
-
if (position === "start") {
|
|
121
|
-
let truncated = workingText.slice(ellipsis.length);
|
|
122
|
-
let truncatedWidth = getStringWidth(truncated, style);
|
|
123
|
-
while (truncatedWidth !== null && truncatedWidth > availableWidth && truncated.length > 0) {
|
|
124
|
-
truncated = truncated.slice(1);
|
|
125
|
-
truncatedWidth = getStringWidth(truncated, style);
|
|
126
|
-
}
|
|
127
|
-
return ellipsis + truncated;
|
|
128
|
-
} else if (position === "middle") {
|
|
129
|
-
const halfWidth = availableWidth / 2;
|
|
130
|
-
let left = "";
|
|
131
|
-
let right = "";
|
|
132
|
-
let bestLeft = "";
|
|
133
|
-
let bestRight = "";
|
|
134
|
-
for (let i = 0, j = workingText.length - 1; i < workingText.length && j >= 0; i++, j--) {
|
|
135
|
-
const leftTest = workingText.slice(0, i + 1);
|
|
136
|
-
const rightTest = workingText.slice(j);
|
|
137
|
-
const leftWidth = getStringWidth(leftTest, style);
|
|
138
|
-
const rightWidth = getStringWidth(rightTest, style);
|
|
139
|
-
if (leftWidth !== null && leftWidth <= halfWidth) left = leftTest;
|
|
140
|
-
if (rightWidth !== null && rightWidth <= halfWidth) right = rightTest;
|
|
141
|
-
const combinedWidth = getStringWidth(left + ellipsis + right, style);
|
|
142
|
-
if (combinedWidth !== null && combinedWidth <= maxWidth) {
|
|
143
|
-
bestLeft = left;
|
|
144
|
-
bestRight = right;
|
|
145
|
-
} else break;
|
|
146
|
-
}
|
|
147
|
-
return bestLeft + ellipsis + bestRight;
|
|
148
|
-
} else {
|
|
149
|
-
let truncated = workingText.slice(0, -ellipsis.length);
|
|
150
|
-
let truncatedWidth = getStringWidth(truncated + ellipsis, style);
|
|
151
|
-
while (truncatedWidth !== null && truncatedWidth > maxWidth && truncated.length > 0) {
|
|
152
|
-
truncated = truncated.slice(0, -1);
|
|
153
|
-
truncatedWidth = getStringWidth(truncated + ellipsis, style);
|
|
154
|
-
}
|
|
155
|
-
return truncated + ellipsis;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return workingText;
|
|
159
|
-
}
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region node_modules/.pnpm/layerchart@2.5.0_@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0__9bc60734f10d29b7556189549fab5703/node_modules/layerchart/dist/components/Text/Text.shared.svelte.js
|
|
162
|
-
function isCSSValue(value) {
|
|
163
|
-
return /^-?[\d.]+(%|em|rem|px|pt|cm|mm|in)?$/.test(value);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Check if a Text prop value is a data-space prop.
|
|
167
|
-
* Functions are always data props.
|
|
168
|
-
* Strings are data props unless they look like CSS values (e.g. "50%", "1em").
|
|
169
|
-
*/
|
|
170
|
-
function isTextDataProp(value) {
|
|
171
|
-
if (typeof value === "function") return true;
|
|
172
|
-
if (typeof value === "string" && !isCSSValue(value)) return true;
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
var defaultKey = (_, i) => i;
|
|
176
|
-
function getPathLength(pathRef) {
|
|
177
|
-
if (pathRef && typeof pathRef.getTotalLength === "function") try {
|
|
178
|
-
return pathRef.getTotalLength();
|
|
179
|
-
} catch (e) {
|
|
180
|
-
console.error("Error getting path length:", e);
|
|
181
|
-
return 0;
|
|
182
|
-
}
|
|
183
|
-
return 0;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Convert css value to pixel value (ex. 0.71em => 11.36)
|
|
187
|
-
*/
|
|
188
|
-
function getPixelValue(cssValue) {
|
|
189
|
-
if (typeof cssValue === "number") return cssValue;
|
|
190
|
-
const result = cssValue.match(/([\d.]+)(\D+)/);
|
|
191
|
-
const number = Number(result?.[1]);
|
|
192
|
-
switch (result?.[2]) {
|
|
193
|
-
case "px": return number;
|
|
194
|
-
case "em":
|
|
195
|
-
case "rem": return number * 16;
|
|
196
|
-
default: return 0;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Resolve the cap-height used by vertical-anchor math.
|
|
201
|
-
*
|
|
202
|
-
* Priority:
|
|
203
|
-
* 1. Explicit `capHeight` prop
|
|
204
|
-
* 2. `fontSize * 0.71` when `fontSize` is set (keeps centering correct as
|
|
205
|
-
* labels scale per-item)
|
|
206
|
-
* 3. `'0.71em'` (legacy default — only correct for ~16px text since
|
|
207
|
-
* `getPixelValue` resolves `em` against 16, not the actual font-size)
|
|
208
|
-
*/
|
|
209
|
-
function resolveCapHeight(capHeight, fontSize) {
|
|
210
|
-
if (capHeight != null) return capHeight;
|
|
211
|
-
if (fontSize != null) return getPixelValue(fontSize) * .71;
|
|
212
|
-
return "0.71em";
|
|
213
|
-
}
|
|
214
|
-
/** Build the standard `markInfo` payload used by every Text variant. */
|
|
215
|
-
function textMarkInfo(props, dataMode) {
|
|
216
|
-
if (!dataMode) return {};
|
|
217
|
-
return {
|
|
218
|
-
data: props.data,
|
|
219
|
-
x: typeof props.x === "string" ? props.x : void 0,
|
|
220
|
-
y: typeof props.y === "string" ? props.y : void 0,
|
|
221
|
-
color: typeof props.fill === "string" ? props.fill : void 0
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Reactive state shared by every per-layer Text variant. Instantiate from
|
|
226
|
-
* each `Text.svg.svelte` / `Text.canvas.svelte` / `Text.html.svelte`
|
|
227
|
-
* component setup, passing a getter for the props.
|
|
228
|
-
*
|
|
229
|
-
* Per-layer specific bits (SVG `bind:this` refs, canvas's `render` function,
|
|
230
|
-
* canvas-specific style measurement) stay in their respective `.svelte` files.
|
|
231
|
-
*/
|
|
232
|
-
var TextState = class {
|
|
233
|
-
#getProps = () => ({});
|
|
234
|
-
/**
|
|
235
|
-
* Memoized props — `#getProps()` allocates a fresh object (it spreads `rest`),
|
|
236
|
-
* so calling it per derived meant ~30 allocations per instance per update.
|
|
237
|
-
*/
|
|
238
|
-
#props = derived(() => this.#getProps());
|
|
239
|
-
chartCtx = getChartContext();
|
|
240
|
-
markData = getMarkData();
|
|
241
|
-
geo = getGeoContext();
|
|
242
|
-
pathRef;
|
|
243
|
-
#dataMode = derived(() => this.#props().data != null || isTextDataProp(this.#props().x) || isTextDataProp(this.#props().y));
|
|
244
|
-
get dataMode() {
|
|
245
|
-
return this.#dataMode();
|
|
246
|
-
}
|
|
247
|
-
set dataMode($$value) {
|
|
248
|
-
return this.#dataMode($$value);
|
|
249
|
-
}
|
|
250
|
-
#resolvedData = derived(() => this.dataMode ? this.markData(this.#props().data) : []);
|
|
251
|
-
#resolvedItems = derived(() => {
|
|
252
|
-
if (!this.dataMode) return [];
|
|
253
|
-
const keyFn = this.#props().key ?? defaultKey;
|
|
254
|
-
return this.#resolvedData().map((d, i) => {
|
|
255
|
-
const key = keyFn(d, i);
|
|
256
|
-
const resolved = this.resolveTextPosition(d);
|
|
257
|
-
const animated = this.#dataMotionMap?.get(key);
|
|
258
|
-
return {
|
|
259
|
-
d,
|
|
260
|
-
key,
|
|
261
|
-
x: animated?.x ?? resolved.x,
|
|
262
|
-
y: animated?.y ?? resolved.y
|
|
263
|
-
};
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
get resolvedItems() {
|
|
267
|
-
return this.#resolvedItems();
|
|
268
|
-
}
|
|
269
|
-
set resolvedItems($$value) {
|
|
270
|
-
return this.#resolvedItems($$value);
|
|
271
|
-
}
|
|
272
|
-
resolveTextPosition(d) {
|
|
273
|
-
const props = this.#props();
|
|
274
|
-
if (this.geo.projection) {
|
|
275
|
-
const [projX, projY] = resolveGeoDataPair(props.x, props.y, d, this.geo.projection);
|
|
276
|
-
return {
|
|
277
|
-
x: projX,
|
|
278
|
-
y: projY
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
const xDefault = typeof props.x === "number" ? props.x : props.x == null && this.chartCtx.config.x != null ? Number(this.chartCtx.xGet(d)) || 0 : 0;
|
|
282
|
-
const yDefault = typeof props.y === "number" ? props.y : props.y == null && this.chartCtx.config.y != null ? Number(this.chartCtx.yGet(d)) || 0 : 0;
|
|
283
|
-
return {
|
|
284
|
-
x: resolveDataProp(props.x, d, this.chartCtx.xScale, xDefault),
|
|
285
|
-
y: resolveDataProp(props.y, d, this.chartCtx.yScale, yDefault)
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
resolveTextValue(d) {
|
|
289
|
-
const value = this.#props().value;
|
|
290
|
-
if (typeof value === "function") {
|
|
291
|
-
const v = value(d);
|
|
292
|
-
return v != null ? String(v) : "";
|
|
293
|
-
}
|
|
294
|
-
if (typeof value === "string") {
|
|
295
|
-
const v = get(d, value);
|
|
296
|
-
return v != null ? String(v) : "";
|
|
297
|
-
}
|
|
298
|
-
return value != null ? String(value) : "";
|
|
299
|
-
}
|
|
300
|
-
#dataMotionMap = null;
|
|
301
|
-
#motionX;
|
|
302
|
-
#motionY;
|
|
303
|
-
#motionValue;
|
|
304
|
-
get motionX() {
|
|
305
|
-
return this.#motionX.current;
|
|
306
|
-
}
|
|
307
|
-
get motionY() {
|
|
308
|
-
return this.#motionY.current;
|
|
309
|
-
}
|
|
310
|
-
#resolvedWidth = derived(() => this.#props().path ? getPathLength(this.pathRef) : this.#props().width);
|
|
311
|
-
get resolvedWidth() {
|
|
312
|
-
return this.#resolvedWidth();
|
|
313
|
-
}
|
|
314
|
-
set resolvedWidth($$value) {
|
|
315
|
-
return this.#resolvedWidth($$value);
|
|
316
|
-
}
|
|
317
|
-
#defaultTruncateOptions = derived(() => ({
|
|
318
|
-
maxChars: void 0,
|
|
319
|
-
position: "end",
|
|
320
|
-
maxWidth: this.resolvedWidth
|
|
321
|
-
}));
|
|
322
|
-
#truncateConfig = derived(() => {
|
|
323
|
-
const truncate = this.#props().truncate;
|
|
324
|
-
if (typeof truncate === "boolean") {
|
|
325
|
-
if (truncate) return this.#defaultTruncateOptions();
|
|
326
|
-
return false;
|
|
327
|
-
}
|
|
328
|
-
return {
|
|
329
|
-
...this.#defaultTruncateOptions(),
|
|
330
|
-
...truncate ?? {}
|
|
331
|
-
};
|
|
332
|
-
});
|
|
333
|
-
get truncateConfig() {
|
|
334
|
-
return this.#truncateConfig();
|
|
335
|
-
}
|
|
336
|
-
set truncateConfig($$value) {
|
|
337
|
-
return this.#truncateConfig($$value);
|
|
338
|
-
}
|
|
339
|
-
#rawText = derived(() => {
|
|
340
|
-
const value = this.#props().value;
|
|
341
|
-
const motion = this.#props().motion;
|
|
342
|
-
const format$1 = this.#props().format;
|
|
343
|
-
if (typeof value === "function" || value == null) return "";
|
|
344
|
-
if (typeof value === "number" && motion) {
|
|
345
|
-
const v = this.#motionValue.current;
|
|
346
|
-
return format$1 ? format(v, format$1) : String(v);
|
|
347
|
-
}
|
|
348
|
-
return (format$1 ? format(value, format$1) : value.toString()).replace(/\\n/g, "\n");
|
|
349
|
-
});
|
|
350
|
-
get rawText() {
|
|
351
|
-
return this.#rawText();
|
|
352
|
-
}
|
|
353
|
-
set rawText($$value) {
|
|
354
|
-
return this.#rawText($$value);
|
|
355
|
-
}
|
|
356
|
-
#textValue = derived(() => {
|
|
357
|
-
const cfg = this.truncateConfig;
|
|
358
|
-
if (!cfg || cfg === true) return this.rawText;
|
|
359
|
-
return truncateText(this.rawText, cfg);
|
|
360
|
-
});
|
|
361
|
-
get textValue() {
|
|
362
|
-
return this.#textValue();
|
|
363
|
-
}
|
|
364
|
-
set textValue($$value) {
|
|
365
|
-
return this.#textValue($$value);
|
|
366
|
-
}
|
|
367
|
-
#spaceWidth = derived(() => getStringWidth("\xA0", void 0) || 0);
|
|
368
|
-
#wordsByLines = derived(() => {
|
|
369
|
-
const props = this.#props();
|
|
370
|
-
const width = props.width;
|
|
371
|
-
const scaleToFit = props.scaleToFit ?? false;
|
|
372
|
-
return this.textValue.split("\n").flatMap((line) => {
|
|
373
|
-
const words = line.split(/(?:(?! +)\s+)/);
|
|
374
|
-
if (width == null) return [{ words }];
|
|
375
|
-
return words.reduce((result, item) => {
|
|
376
|
-
const currentLine = result[result.length - 1];
|
|
377
|
-
const itemWidth = getStringWidth(item, void 0) || 0;
|
|
378
|
-
if (currentLine && (width == null || scaleToFit || (currentLine.width || 0) + itemWidth + this.#spaceWidth() < width)) {
|
|
379
|
-
currentLine.words.push(item);
|
|
380
|
-
currentLine.width = currentLine.width || 0;
|
|
381
|
-
currentLine.width += itemWidth + this.#spaceWidth();
|
|
382
|
-
} else {
|
|
383
|
-
const newLine = {
|
|
384
|
-
words: [item],
|
|
385
|
-
width: itemWidth
|
|
386
|
-
};
|
|
387
|
-
result.push(newLine);
|
|
388
|
-
}
|
|
389
|
-
return result;
|
|
390
|
-
}, []);
|
|
391
|
-
});
|
|
392
|
-
});
|
|
393
|
-
get wordsByLines() {
|
|
394
|
-
return this.#wordsByLines();
|
|
395
|
-
}
|
|
396
|
-
set wordsByLines($$value) {
|
|
397
|
-
return this.#wordsByLines($$value);
|
|
398
|
-
}
|
|
399
|
-
#lineCount = derived(() => this.wordsByLines.length);
|
|
400
|
-
get lineCount() {
|
|
401
|
-
return this.#lineCount();
|
|
402
|
-
}
|
|
403
|
-
set lineCount($$value) {
|
|
404
|
-
return this.#lineCount($$value);
|
|
405
|
-
}
|
|
406
|
-
#startDy = derived(() => {
|
|
407
|
-
const props = this.#props();
|
|
408
|
-
const verticalAnchor = props.verticalAnchor ?? "end";
|
|
409
|
-
const lineHeight = props.lineHeight ?? "1em";
|
|
410
|
-
const capHeight = resolveCapHeight(props.capHeight, props.fontSize);
|
|
411
|
-
if (verticalAnchor === "start") return getPixelValue(capHeight);
|
|
412
|
-
else if (verticalAnchor === "middle") return (this.lineCount - 1) / 2 * -getPixelValue(lineHeight) + getPixelValue(capHeight) / 2;
|
|
413
|
-
return (this.lineCount - 1) * -getPixelValue(lineHeight);
|
|
414
|
-
});
|
|
415
|
-
get startDy() {
|
|
416
|
-
return this.#startDy();
|
|
417
|
-
}
|
|
418
|
-
set startDy($$value) {
|
|
419
|
-
return this.#startDy($$value);
|
|
420
|
-
}
|
|
421
|
-
#dataModeStartDy = derived(() => {
|
|
422
|
-
const props = this.#props();
|
|
423
|
-
const verticalAnchor = props.verticalAnchor ?? "end";
|
|
424
|
-
const capHeight = resolveCapHeight(props.capHeight, props.fontSize);
|
|
425
|
-
if (verticalAnchor === "start") return getPixelValue(capHeight);
|
|
426
|
-
if (verticalAnchor === "middle") return getPixelValue(capHeight) / 2;
|
|
427
|
-
return 0;
|
|
428
|
-
});
|
|
429
|
-
get dataModeStartDy() {
|
|
430
|
-
return this.#dataModeStartDy();
|
|
431
|
-
}
|
|
432
|
-
set dataModeStartDy($$value) {
|
|
433
|
-
return this.#dataModeStartDy($$value);
|
|
434
|
-
}
|
|
435
|
-
#scaleTransform = derived(() => {
|
|
436
|
-
const props = this.#props();
|
|
437
|
-
const x = props.x;
|
|
438
|
-
const y = props.y;
|
|
439
|
-
const width = props.width;
|
|
440
|
-
if ((props.scaleToFit ?? false) && this.lineCount > 0 && typeof x === "number" && typeof y === "number" && typeof width === "number") {
|
|
441
|
-
const sx = width / (this.wordsByLines[0].width || 1);
|
|
442
|
-
const sy = sx;
|
|
443
|
-
return `matrix(${sx}, 0, 0, ${sy}, ${x - sx * x}, ${y - sy * y})`;
|
|
444
|
-
}
|
|
445
|
-
return "";
|
|
446
|
-
});
|
|
447
|
-
get scaleTransform() {
|
|
448
|
-
return this.#scaleTransform();
|
|
449
|
-
}
|
|
450
|
-
set scaleTransform($$value) {
|
|
451
|
-
return this.#scaleTransform($$value);
|
|
452
|
-
}
|
|
453
|
-
#rotateTransform = derived(() => {
|
|
454
|
-
const props = this.#props();
|
|
455
|
-
return props.rotate ? `rotate(${props.rotate}, ${props.x}, ${props.y})` : "";
|
|
456
|
-
});
|
|
457
|
-
get rotateTransform() {
|
|
458
|
-
return this.#rotateTransform();
|
|
459
|
-
}
|
|
460
|
-
set rotateTransform($$value) {
|
|
461
|
-
return this.#rotateTransform($$value);
|
|
462
|
-
}
|
|
463
|
-
#transform = derived(() => this.#props().transform ?? `${this.scaleTransform} ${this.rotateTransform}`);
|
|
464
|
-
get transform() {
|
|
465
|
-
return this.#transform();
|
|
466
|
-
}
|
|
467
|
-
set transform($$value) {
|
|
468
|
-
return this.#transform($$value);
|
|
469
|
-
}
|
|
470
|
-
#staticFill = derived(() => typeof this.#props().fill === "string" ? this.#props().fill : void 0);
|
|
471
|
-
get staticFill() {
|
|
472
|
-
return this.#staticFill();
|
|
473
|
-
}
|
|
474
|
-
set staticFill($$value) {
|
|
475
|
-
return this.#staticFill($$value);
|
|
476
|
-
}
|
|
477
|
-
#staticFillOpacity = derived(() => typeof this.#props().fillOpacity === "number" ? this.#props().fillOpacity : void 0);
|
|
478
|
-
get staticFillOpacity() {
|
|
479
|
-
return this.#staticFillOpacity();
|
|
480
|
-
}
|
|
481
|
-
set staticFillOpacity($$value) {
|
|
482
|
-
return this.#staticFillOpacity($$value);
|
|
483
|
-
}
|
|
484
|
-
#staticStroke = derived(() => typeof this.#props().stroke === "string" ? this.#props().stroke : void 0);
|
|
485
|
-
get staticStroke() {
|
|
486
|
-
return this.#staticStroke();
|
|
487
|
-
}
|
|
488
|
-
set staticStroke($$value) {
|
|
489
|
-
return this.#staticStroke($$value);
|
|
490
|
-
}
|
|
491
|
-
#staticStrokeWidth = derived(() => typeof this.#props().strokeWidth === "number" ? this.#props().strokeWidth : void 0);
|
|
492
|
-
get staticStrokeWidth() {
|
|
493
|
-
return this.#staticStrokeWidth();
|
|
494
|
-
}
|
|
495
|
-
set staticStrokeWidth($$value) {
|
|
496
|
-
return this.#staticStrokeWidth($$value);
|
|
497
|
-
}
|
|
498
|
-
#staticOpacity = derived(() => typeof this.#props().opacity === "number" ? this.#props().opacity : void 0);
|
|
499
|
-
get staticOpacity() {
|
|
500
|
-
return this.#staticOpacity();
|
|
501
|
-
}
|
|
502
|
-
set staticOpacity($$value) {
|
|
503
|
-
return this.#staticOpacity($$value);
|
|
504
|
-
}
|
|
505
|
-
#staticClassName = derived(() => typeof this.#props().class === "string" ? this.#props().class : void 0);
|
|
506
|
-
get staticClassName() {
|
|
507
|
-
return this.#staticClassName();
|
|
508
|
-
}
|
|
509
|
-
set staticClassName($$value) {
|
|
510
|
-
return this.#staticClassName($$value);
|
|
511
|
-
}
|
|
512
|
-
constructor(getProps) {
|
|
513
|
-
this.#getProps = getProps;
|
|
514
|
-
const initial = getProps();
|
|
515
|
-
const _initialX = initial.initialX ?? (typeof initial.x === "function" ? 0 : initial.x ?? 0);
|
|
516
|
-
const _initialY = initial.initialY ?? (typeof initial.y === "function" ? 0 : initial.y ?? 0);
|
|
517
|
-
this.#motionX = createMotion(_initialX, () => {
|
|
518
|
-
const x = this.#props().x;
|
|
519
|
-
return typeof x === "number" || typeof x === "string" ? x : 0;
|
|
520
|
-
}, initial.motion);
|
|
521
|
-
this.#motionY = createMotion(_initialY, () => {
|
|
522
|
-
const y = this.#props().y;
|
|
523
|
-
return typeof y === "number" || typeof y === "string" ? y : 0;
|
|
524
|
-
}, initial.motion);
|
|
525
|
-
this.#motionValue = createMotion(typeof initial.value === "number" ? initial.value : 0, () => typeof this.#props().value === "number" ? this.#props().value : 0, typeof initial.value === "number" && initial.motion ? typeof initial.motion === "object" && "type" in initial.motion ? initial.motion : void 0 : void 0);
|
|
526
|
-
this.#dataMotionMap = createDataMotionMap(initial.motion);
|
|
527
|
-
if (this.#dataMotionMap) this.#dataMotionMap;
|
|
528
|
-
}
|
|
529
|
-
};
|
|
530
|
-
//#endregion
|
|
531
|
-
//#region node_modules/.pnpm/layerchart@2.5.0_@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0__9bc60734f10d29b7556189549fab5703/node_modules/layerchart/dist/components/Text/Text.svg.svelte
|
|
532
|
-
function Text_svg($$renderer, $$props) {
|
|
533
|
-
$$renderer.component(($$renderer) => {
|
|
534
|
-
const uid = props_id($$renderer);
|
|
535
|
-
let { svgRef: svgRefProp = void 0, ref: refProp = void 0, pathId = createId("text-path", uid), rotate, dx, dy, fontSize, $$slots, $$events, ...rest } = $$props;
|
|
536
|
-
const c = new TextState(() => ({
|
|
537
|
-
rotate,
|
|
538
|
-
dx,
|
|
539
|
-
dy,
|
|
540
|
-
fontSize,
|
|
541
|
-
...rest
|
|
542
|
-
}));
|
|
543
|
-
c.chartCtx.registerComponent({
|
|
544
|
-
name: "Text",
|
|
545
|
-
kind: "mark",
|
|
546
|
-
markInfo: () => textMarkInfo(rest, c.dataMode)
|
|
547
|
-
});
|
|
548
|
-
if (c.dataMode) {
|
|
549
|
-
$$renderer.push(`<!--[0--><!--[-->`);
|
|
550
|
-
const each_array = ensure_array_like(c.resolvedItems);
|
|
551
|
-
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
552
|
-
let item = each_array[$$index];
|
|
553
|
-
const text = c.resolveTextValue(item.d);
|
|
554
|
-
const resolvedFill = resolveColorProp(rest.fill, item.d, c.chartCtx.cScale);
|
|
555
|
-
const resolvedStroke = resolveColorProp(rest.stroke, item.d, c.chartCtx.cScale);
|
|
556
|
-
const resolvedFillOpacity = resolveStyleProp(rest.fillOpacity, item.d);
|
|
557
|
-
const resolvedStrokeWidth = resolveStyleProp(rest.strokeWidth, item.d);
|
|
558
|
-
const resolvedOpacity = resolveStyleProp(rest.opacity, item.d);
|
|
559
|
-
const resolvedClass = resolveStyleProp(rest.class, item.d);
|
|
560
|
-
const dataRotateTransform = rotate ? `rotate(${rotate}, ${item.x}, ${item.y})` : "";
|
|
561
|
-
$$renderer.push(`<svg${attributes({
|
|
562
|
-
x: dx ?? 0,
|
|
563
|
-
y: dy ?? 0,
|
|
564
|
-
...rest.svgProps,
|
|
565
|
-
class: clsx(["lc-text-svg", rest.svgProps?.class])
|
|
566
|
-
}, void 0, void 0, void 0, 3)}><text${attributes({
|
|
567
|
-
...rest,
|
|
568
|
-
x: item.x,
|
|
569
|
-
y: item.y,
|
|
570
|
-
transform: rest.transform ?? dataRotateTransform,
|
|
571
|
-
"text-anchor": rest.textAnchor ?? "start",
|
|
572
|
-
"dominant-baseline": rest.dominantBaseline ?? "auto",
|
|
573
|
-
"font-size": fontSize,
|
|
574
|
-
fill: resolvedFill,
|
|
575
|
-
"fill-opacity": resolvedFillOpacity,
|
|
576
|
-
stroke: resolvedStroke,
|
|
577
|
-
"stroke-width": resolvedStrokeWidth,
|
|
578
|
-
opacity: resolvedOpacity,
|
|
579
|
-
class: clsx(["lc-text", resolvedClass])
|
|
580
|
-
}, void 0, void 0, void 0, 3)}><tspan${attr("x", item.x)}${attr("dy", c.dataModeStartDy)} class="lc-text-tspan">${escape_html(text)}</tspan></text></svg>`);
|
|
581
|
-
}
|
|
582
|
-
$$renderer.push(`<!--]-->`);
|
|
583
|
-
} else {
|
|
584
|
-
$$renderer.push(`<!--[-1--><svg${attributes({
|
|
585
|
-
x: dx ?? 0,
|
|
586
|
-
y: dy ?? 0,
|
|
587
|
-
...rest.svgProps,
|
|
588
|
-
class: clsx(["lc-text-svg", rest.svgProps?.class])
|
|
589
|
-
}, void 0, void 0, void 0, 3)}>`);
|
|
590
|
-
if (rest.path) {
|
|
591
|
-
$$renderer.push(`<!--[0--><defs><!---->`);
|
|
592
|
-
$$renderer.push(`<path${attr("id", pathId)}${attr("d", rest.path)}></path>`);
|
|
593
|
-
$$renderer.push(`<!----></defs><text${attributes({
|
|
594
|
-
...rest,
|
|
595
|
-
dy: dy ?? 0,
|
|
596
|
-
"font-size": fontSize,
|
|
597
|
-
fill: c.staticFill,
|
|
598
|
-
"fill-opacity": c.staticFillOpacity,
|
|
599
|
-
stroke: c.staticStroke,
|
|
600
|
-
"stroke-width": c.staticStrokeWidth,
|
|
601
|
-
opacity: c.staticOpacity,
|
|
602
|
-
transform: rest.transform,
|
|
603
|
-
class: clsx(["lc-text", c.staticClassName])
|
|
604
|
-
}, void 0, void 0, void 0, 3)}><textPath${attr_style(`text-anchor: ${stringify(rest.textAnchor ?? "start")};`)}${attr("dominant-baseline", rest.dominantBaseline ?? "auto")}${attr("href", `#${stringify(pathId)}`)}${attr("startOffset", rest.startOffset ?? "0%")} class="lc-text-path">${escape_html(c.wordsByLines.map((line) => line.words.join(" ")).join())}</textPath></text>`);
|
|
605
|
-
} else {
|
|
606
|
-
$$renderer.push(`<!--[-1--><text${attributes({
|
|
607
|
-
...rest,
|
|
608
|
-
x: c.motionX,
|
|
609
|
-
y: c.motionY,
|
|
610
|
-
transform: c.transform,
|
|
611
|
-
"text-anchor": rest.textAnchor ?? "start",
|
|
612
|
-
"dominant-baseline": rest.dominantBaseline ?? "auto",
|
|
613
|
-
"font-size": fontSize,
|
|
614
|
-
fill: c.staticFill,
|
|
615
|
-
"fill-opacity": c.staticFillOpacity,
|
|
616
|
-
stroke: c.staticStroke,
|
|
617
|
-
"stroke-width": c.staticStrokeWidth,
|
|
618
|
-
opacity: c.staticOpacity,
|
|
619
|
-
class: clsx(["lc-text", c.staticClassName])
|
|
620
|
-
}, void 0, void 0, void 0, 3)}>`);
|
|
621
|
-
if (rest.segments) {
|
|
622
|
-
$$renderer.push(`<!--[0--><!--[-->`);
|
|
623
|
-
const each_array_1 = ensure_array_like(rest.segments);
|
|
624
|
-
for (let index = 0, $$length = each_array_1.length; index < $$length; index++) {
|
|
625
|
-
let segment = each_array_1[index];
|
|
626
|
-
$$renderer.push(`<tspan${attr("dy", index === 0 ? c.startDy : 0)}${attr_class(clsx(["lc-text-tspan", segment.class]))}>${escape_html(segment.value)}</tspan>`);
|
|
627
|
-
}
|
|
628
|
-
$$renderer.push(`<!--]-->`);
|
|
629
|
-
} else {
|
|
630
|
-
$$renderer.push(`<!--[-1--><!--[-->`);
|
|
631
|
-
const each_array_2 = ensure_array_like(c.wordsByLines);
|
|
632
|
-
for (let index = 0, $$length = each_array_2.length; index < $$length; index++) {
|
|
633
|
-
let line = each_array_2[index];
|
|
634
|
-
$$renderer.push(`<tspan${attr("x", c.motionX)}${attr("dy", index === 0 ? c.startDy : getPixelValue(rest.lineHeight ?? "1em"))} class="lc-text-tspan">${escape_html(line.words.join(" "))}</tspan>`);
|
|
635
|
-
}
|
|
636
|
-
$$renderer.push(`<!--]-->`);
|
|
637
|
-
}
|
|
638
|
-
$$renderer.push(`<!--]--></text>`);
|
|
639
|
-
}
|
|
640
|
-
$$renderer.push(`<!--]--></svg>`);
|
|
641
|
-
}
|
|
642
|
-
$$renderer.push(`<!--]-->`);
|
|
643
|
-
bind_props($$props, {
|
|
644
|
-
svgRef: svgRefProp,
|
|
645
|
-
ref: refProp
|
|
646
|
-
});
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
//#endregion
|
|
650
|
-
//#region node_modules/.pnpm/layerchart@2.5.0_@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0__9bc60734f10d29b7556189549fab5703/node_modules/layerchart/dist/components/Text/Text.canvas.svelte
|
|
651
|
-
function Text_canvas($$renderer, $$props) {
|
|
652
|
-
$$renderer.component(($$renderer) => {
|
|
653
|
-
let { $$slots, $$events, ...rest } = $$props;
|
|
654
|
-
const c = new TextState(() => rest);
|
|
655
|
-
function getTextStyles(styleOverrides, itemFill, itemStroke, itemFillOpacity, itemStrokeWidth, itemOpacity, itemClass) {
|
|
656
|
-
return styleOverrides ? merge({ styles: { strokeWidth: itemStrokeWidth ?? c.staticStrokeWidth } }, styleOverrides) : {
|
|
657
|
-
styles: {
|
|
658
|
-
fill: itemFill ?? rest.fill,
|
|
659
|
-
fillOpacity: itemFillOpacity ?? c.staticFillOpacity,
|
|
660
|
-
stroke: itemStroke ?? rest.stroke,
|
|
661
|
-
strokeWidth: itemStrokeWidth ?? c.staticStrokeWidth,
|
|
662
|
-
opacity: itemOpacity ?? c.staticOpacity,
|
|
663
|
-
paintOrder: "stroke",
|
|
664
|
-
...rest.fontSize != null ? { fontSize: typeof rest.fontSize === "number" ? `${rest.fontSize}px` : rest.fontSize } : {},
|
|
665
|
-
...(rest.textAnchor ?? "start") !== "start" ? { textAnchor: rest.textAnchor } : {}
|
|
666
|
-
},
|
|
667
|
-
classes: cls("lc-text", itemClass ?? c.staticClassName),
|
|
668
|
-
style: rest.style
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
function render(ctx, styleOverrides) {
|
|
672
|
-
const textAnchor = rest.textAnchor ?? "start";
|
|
673
|
-
rest.verticalAnchor;
|
|
674
|
-
const lineHeight = rest.lineHeight ?? "1em";
|
|
675
|
-
const dx = rest.dx ?? 0;
|
|
676
|
-
const dy = rest.dy ?? 0;
|
|
677
|
-
const rotate = rest.rotate;
|
|
678
|
-
const x = rest.x;
|
|
679
|
-
const y = rest.y;
|
|
680
|
-
if (c.dataMode) {
|
|
681
|
-
const baseStyles = getTextStyles(styleOverrides);
|
|
682
|
-
const computedStyles = getComputedStyles(ctx.canvas, baseStyles);
|
|
683
|
-
ctx.font = `${computedStyles.fontSize} ${computedStyles.fontFamily}`;
|
|
684
|
-
ctx.textAlign = textAnchor === "middle" ? "center" : textAnchor === "end" ? "end" : "start";
|
|
685
|
-
for (const item of c.resolvedItems) {
|
|
686
|
-
const text = c.resolveTextValue(item.d);
|
|
687
|
-
const itemStyles = getTextStyles(styleOverrides, resolveColorProp(rest.fill, item.d, c.chartCtx.cScale), resolveColorProp(rest.stroke, item.d, c.chartCtx.cScale), resolveStyleProp(rest.fillOpacity, item.d), resolveStyleProp(rest.strokeWidth, item.d), resolveStyleProp(rest.opacity, item.d), resolveStyleProp(rest.class, item.d));
|
|
688
|
-
ctx.save();
|
|
689
|
-
if (rotate !== void 0) {
|
|
690
|
-
const radians = degreesToRadians(rotate);
|
|
691
|
-
ctx.translate(item.x, item.y);
|
|
692
|
-
ctx.rotate(radians);
|
|
693
|
-
ctx.translate(-item.x, -item.y);
|
|
694
|
-
}
|
|
695
|
-
renderText(ctx, text, {
|
|
696
|
-
x: item.x + getPixelValue(dx),
|
|
697
|
-
y: item.y + getPixelValue(dy) + c.dataModeStartDy
|
|
698
|
-
}, itemStyles);
|
|
699
|
-
ctx.restore();
|
|
700
|
-
}
|
|
701
|
-
} else {
|
|
702
|
-
const styles = getTextStyles(styleOverrides);
|
|
703
|
-
const effectiveLineHeight = getPixelValue(lineHeight);
|
|
704
|
-
const baseY = getPixelValue(c.motionY) + getPixelValue(dy) + getPixelValue(c.startDy);
|
|
705
|
-
const baseX = getPixelValue(c.motionX) + getPixelValue(dx);
|
|
706
|
-
ctx.save();
|
|
707
|
-
if (rotate !== void 0) {
|
|
708
|
-
const centerX = getPixelValue(typeof x === "function" ? 0 : x ?? 0);
|
|
709
|
-
const centerY = getPixelValue(typeof y === "function" ? 0 : y ?? 0);
|
|
710
|
-
const radians = degreesToRadians(rotate);
|
|
711
|
-
ctx.translate(centerX, centerY);
|
|
712
|
-
ctx.rotate(radians);
|
|
713
|
-
ctx.translate(-centerX, -centerY);
|
|
714
|
-
}
|
|
715
|
-
const computedStyles = getComputedStyles(ctx.canvas, styles);
|
|
716
|
-
ctx.font = `${computedStyles.fontSize} ${computedStyles.fontFamily}`;
|
|
717
|
-
ctx.textAlign = textAnchor === "middle" ? "center" : textAnchor === "end" ? "end" : "start";
|
|
718
|
-
if (rest.segments) {
|
|
719
|
-
let xOffset = baseX;
|
|
720
|
-
for (const segment of rest.segments) {
|
|
721
|
-
const segStyles = getTextStyles(styleOverrides, void 0, void 0, void 0, void 0, void 0, segment.class);
|
|
722
|
-
const text = String(segment.value);
|
|
723
|
-
const segComputedStyles = getComputedStyles(ctx.canvas, segStyles);
|
|
724
|
-
ctx.font = `${segComputedStyles.fontWeight || ""} ${segComputedStyles.fontSize || "10px"} ${segComputedStyles.fontFamily || "sans-serif"}`.trim();
|
|
725
|
-
renderText(ctx, text, {
|
|
726
|
-
x: xOffset,
|
|
727
|
-
y: baseY
|
|
728
|
-
}, segStyles);
|
|
729
|
-
xOffset += ctx.measureText(text).width;
|
|
730
|
-
}
|
|
731
|
-
} else for (let index = 0; index < c.wordsByLines.length; index++) {
|
|
732
|
-
const text = c.wordsByLines[index].words.join(" ");
|
|
733
|
-
const xPos = baseX;
|
|
734
|
-
const yPos = baseY + index * effectiveLineHeight;
|
|
735
|
-
renderText(ctx, text, {
|
|
736
|
-
x: xPos,
|
|
737
|
-
y: yPos
|
|
738
|
-
}, styles);
|
|
739
|
-
}
|
|
740
|
-
ctx.restore();
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
const fillKey = createKey(() => rest.fill);
|
|
744
|
-
const strokeKey = createKey(() => rest.stroke);
|
|
745
|
-
c.chartCtx.registerComponent({
|
|
746
|
-
name: "Text",
|
|
747
|
-
kind: "mark",
|
|
748
|
-
markInfo: () => textMarkInfo(rest, c.dataMode),
|
|
749
|
-
canvasRender: {
|
|
750
|
-
render,
|
|
751
|
-
deps: () => [
|
|
752
|
-
c.dataMode,
|
|
753
|
-
c.dataMode ? c.resolvedItems : null,
|
|
754
|
-
rest.value,
|
|
755
|
-
rest.segments,
|
|
756
|
-
c.motionX,
|
|
757
|
-
c.motionY,
|
|
758
|
-
fillKey.current,
|
|
759
|
-
strokeKey.current,
|
|
760
|
-
rest.strokeWidth,
|
|
761
|
-
rest.opacity,
|
|
762
|
-
rest.class,
|
|
763
|
-
c.truncateConfig,
|
|
764
|
-
rest.rotate,
|
|
765
|
-
rest.fontSize,
|
|
766
|
-
rest.lineHeight,
|
|
767
|
-
rest.textAnchor,
|
|
768
|
-
rest.verticalAnchor
|
|
769
|
-
]
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
//#endregion
|
|
775
|
-
//#region node_modules/.pnpm/layerchart@2.5.0_@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0__9bc60734f10d29b7556189549fab5703/node_modules/layerchart/dist/components/Text/Text.html.svelte
|
|
776
|
-
function Text_html($$renderer, $$props) {
|
|
777
|
-
$$renderer.component(($$renderer) => {
|
|
778
|
-
let { $$slots, $$events, ...rest } = $$props;
|
|
779
|
-
const c = new TextState(() => rest);
|
|
780
|
-
c.chartCtx.registerComponent({
|
|
781
|
-
name: "Text",
|
|
782
|
-
kind: "mark",
|
|
783
|
-
markInfo: () => textMarkInfo(rest, c.dataMode)
|
|
784
|
-
});
|
|
785
|
-
if (c.dataMode) {
|
|
786
|
-
$$renderer.push(`<!--[0--><!--[-->`);
|
|
787
|
-
const each_array = ensure_array_like(c.resolvedItems);
|
|
788
|
-
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
789
|
-
let item = each_array[$$index];
|
|
790
|
-
const text = c.resolveTextValue(item.d);
|
|
791
|
-
const resolvedFill = resolveColorProp(rest.fill, item.d, c.chartCtx.cScale);
|
|
792
|
-
const resolvedFillOpacity = resolveStyleProp(rest.fillOpacity, item.d);
|
|
793
|
-
const resolvedOpacity = resolveStyleProp(rest.opacity, item.d);
|
|
794
|
-
const resolvedClass = resolveStyleProp(rest.class, item.d);
|
|
795
|
-
const textAnchor = rest.textAnchor ?? "start";
|
|
796
|
-
const verticalAnchor = rest.verticalAnchor ?? "end";
|
|
797
|
-
const translateX = textAnchor === "middle" ? "-50%" : textAnchor === "end" ? "-100%" : "0%";
|
|
798
|
-
const translateY = verticalAnchor === "middle" ? "-50%" : verticalAnchor === "end" ? "-100%" : "0%";
|
|
799
|
-
$$renderer.push(`<div${attr_class(clsx(["lc-text", resolvedClass]))}${attr_style("", {
|
|
800
|
-
position: "absolute",
|
|
801
|
-
left: `${stringify(getPixelValue(rest.dx ?? 0) + item.x)}px`,
|
|
802
|
-
top: `${stringify(getPixelValue(rest.dy ?? 0) + item.y)}px`,
|
|
803
|
-
transform: `translate(${translateX}, ${translateY}) rotate(${stringify(rest.rotate ?? 0)}deg)`,
|
|
804
|
-
"transform-origin": `${verticalAnchor === "middle" ? "center" : verticalAnchor === "end" ? "bottom" : "top"} ${textAnchor === "middle" ? "center" : textAnchor === "end" ? "right" : "left"}`,
|
|
805
|
-
"white-space": "pre-wrap",
|
|
806
|
-
"line-height": rest.lineHeight ?? "1em",
|
|
807
|
-
"font-size": typeof rest.fontSize === "number" ? `${rest.fontSize}px` : rest.fontSize,
|
|
808
|
-
color: resolvedFill,
|
|
809
|
-
opacity: resolvedOpacity ?? resolvedFillOpacity
|
|
810
|
-
})}>${escape_html(text)}</div>`);
|
|
811
|
-
}
|
|
812
|
-
$$renderer.push(`<!--]-->`);
|
|
813
|
-
} else {
|
|
814
|
-
$$renderer.push("<!--[-1-->");
|
|
815
|
-
const textAnchor = rest.textAnchor ?? "start";
|
|
816
|
-
const verticalAnchor = rest.verticalAnchor ?? "end";
|
|
817
|
-
const translateX = textAnchor === "middle" ? "-50%" : textAnchor === "end" ? "-100%" : "0%";
|
|
818
|
-
const translateY = verticalAnchor === "middle" ? "-50%" : verticalAnchor === "end" ? "-100%" : "0%";
|
|
819
|
-
$$renderer.push(`<div${attr_class(clsx(["lc-text", c.staticClassName]))}${attr_style("", {
|
|
820
|
-
position: "absolute",
|
|
821
|
-
left: `${stringify((typeof rest.dx === "number" ? rest.dx : 0) + (typeof c.motionX === "number" ? c.motionX : 0))}px`,
|
|
822
|
-
top: `${stringify((typeof rest.dy === "number" ? rest.dy : 0) + (typeof c.motionY === "number" ? c.motionY : 0))}px`,
|
|
823
|
-
transform: `translate(${translateX}, ${translateY}) rotate(${stringify(rest.rotate ?? 0)}deg)`,
|
|
824
|
-
"transform-origin": `${verticalAnchor === "middle" ? "center" : verticalAnchor === "end" ? "bottom" : "top"} ${textAnchor === "middle" ? "center" : textAnchor === "end" ? "right" : "left"}`,
|
|
825
|
-
"white-space": "pre-wrap",
|
|
826
|
-
"line-height": rest.lineHeight ?? "1em",
|
|
827
|
-
"font-size": typeof rest.fontSize === "number" ? `${rest.fontSize}px` : rest.fontSize,
|
|
828
|
-
color: c.staticFill,
|
|
829
|
-
opacity: c.staticOpacity ?? c.staticFillOpacity
|
|
830
|
-
})}>`);
|
|
831
|
-
if (rest.segments) {
|
|
832
|
-
$$renderer.push(`<!--[0--><!--[-->`);
|
|
833
|
-
const each_array_1 = ensure_array_like(rest.segments);
|
|
834
|
-
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
|
835
|
-
let segment = each_array_1[$$index_1];
|
|
836
|
-
$$renderer.push(`<span${attr_class(clsx(segment.class))}>${escape_html(segment.value)}</span>`);
|
|
837
|
-
}
|
|
838
|
-
$$renderer.push(`<!--]-->`);
|
|
839
|
-
} else $$renderer.push(`<!--[-1-->${escape_html(c.textValue)}`);
|
|
840
|
-
$$renderer.push(`<!--]--></div>`);
|
|
841
|
-
}
|
|
842
|
-
$$renderer.push(`<!--]-->`);
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
export { Text_svg as T, Text_canvas as a, Text_html as b, getPixelValue as c, getTextRect as g, toTitleCase as t };
|
|
847
|
-
//# sourceMappingURL=Text.html.js-LbmYJb11.js.map
|