base-paint 0.3.14 → 0.3.16
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 +235 -15
- package/dist/blocks.d.ts +188 -14
- package/dist/blocks.d.ts.map +1 -1
- package/dist/blocks.js +781 -78
- package/dist/blocks.js.map +1 -1
- package/dist/charts.d.ts +6 -61
- package/dist/charts.d.ts.map +1 -1
- package/dist/charts.js +6 -2033
- package/dist/charts.js.map +1 -1
- package/dist/components/bulk-bar/attrs.d.ts +176 -0
- package/dist/components/bulk-bar/attrs.d.ts.map +1 -0
- package/dist/components/bulk-bar/attrs.js +185 -0
- package/dist/components/bulk-bar/attrs.js.map +1 -0
- package/dist/components/bulk-bar/index.d.ts +25 -0
- package/dist/components/bulk-bar/index.d.ts.map +1 -0
- package/dist/components/bulk-bar/index.js +24 -0
- package/dist/components/bulk-bar/index.js.map +1 -0
- package/dist/components/bulk-bar/keys.d.ts +23 -0
- package/dist/components/bulk-bar/keys.d.ts.map +1 -0
- package/dist/components/bulk-bar/keys.js +55 -0
- package/dist/components/bulk-bar/keys.js.map +1 -0
- package/dist/components/bulk-bar/model.d.ts +74 -0
- package/dist/components/bulk-bar/model.d.ts.map +1 -0
- package/dist/components/bulk-bar/model.js +249 -0
- package/dist/components/bulk-bar/model.js.map +1 -0
- package/dist/components/bulk-bar/render.d.ts +3 -0
- package/dist/components/bulk-bar/render.d.ts.map +1 -0
- package/dist/components/bulk-bar/render.js +196 -0
- package/dist/components/bulk-bar/render.js.map +1 -0
- package/dist/components/bulk-bar/runtime.d.ts +3 -0
- package/dist/components/bulk-bar/runtime.d.ts.map +1 -0
- package/dist/components/bulk-bar/runtime.js +136 -0
- package/dist/components/bulk-bar/runtime.js.map +1 -0
- package/dist/components/bulk-bar/style-column.d.ts +5 -0
- package/dist/components/bulk-bar/style-column.d.ts.map +1 -0
- package/dist/components/bulk-bar/style-column.js +192 -0
- package/dist/components/bulk-bar/style-column.js.map +1 -0
- package/dist/components/bulk-bar/style-confirm.d.ts +5 -0
- package/dist/components/bulk-bar/style-confirm.d.ts.map +1 -0
- package/dist/components/bulk-bar/style-confirm.js +237 -0
- package/dist/components/bulk-bar/style-confirm.js.map +1 -0
- package/dist/components/bulk-bar/style-sizes.d.ts +15 -0
- package/dist/components/bulk-bar/style-sizes.d.ts.map +1 -0
- package/dist/components/bulk-bar/style-sizes.js +15 -0
- package/dist/components/bulk-bar/style-sizes.js.map +1 -0
- package/dist/components/bulk-bar/style.d.ts +6 -0
- package/dist/components/bulk-bar/style.d.ts.map +1 -0
- package/dist/components/bulk-bar/style.js +240 -0
- package/dist/components/bulk-bar/style.js.map +1 -0
- package/dist/components/calendar-month/attrs.d.ts +85 -0
- package/dist/components/calendar-month/attrs.d.ts.map +1 -0
- package/dist/components/calendar-month/attrs.js +77 -0
- package/dist/components/calendar-month/attrs.js.map +1 -0
- package/dist/components/calendar-month/index.d.ts +13 -0
- package/dist/components/calendar-month/index.d.ts.map +1 -0
- package/dist/components/calendar-month/index.js +12 -0
- package/dist/components/calendar-month/index.js.map +1 -0
- package/dist/components/calendar-month/model.d.ts +31 -0
- package/dist/components/calendar-month/model.d.ts.map +1 -0
- package/dist/components/calendar-month/model.js +143 -0
- package/dist/components/calendar-month/model.js.map +1 -0
- package/dist/components/calendar-month/render.d.ts +3 -0
- package/dist/components/calendar-month/render.d.ts.map +1 -0
- package/dist/components/calendar-month/render.js +85 -0
- package/dist/components/calendar-month/render.js.map +1 -0
- package/dist/components/calendar-month/style.d.ts +14 -0
- package/dist/components/calendar-month/style.d.ts.map +1 -0
- package/dist/components/calendar-month/style.js +211 -0
- package/dist/components/calendar-month/style.js.map +1 -0
- package/dist/components/cash-waterline/attrs.d.ts +131 -0
- package/dist/components/cash-waterline/attrs.d.ts.map +1 -0
- package/dist/components/cash-waterline/attrs.js +158 -0
- package/dist/components/cash-waterline/attrs.js.map +1 -0
- package/dist/components/cash-waterline/fields.d.ts +43 -0
- package/dist/components/cash-waterline/fields.d.ts.map +1 -0
- package/dist/components/cash-waterline/fields.js +215 -0
- package/dist/components/cash-waterline/fields.js.map +1 -0
- package/dist/components/cash-waterline/index.d.ts +14 -0
- package/dist/components/cash-waterline/index.d.ts.map +1 -0
- package/dist/components/cash-waterline/index.js +13 -0
- package/dist/components/cash-waterline/index.js.map +1 -0
- package/dist/components/cash-waterline/model.d.ts +117 -0
- package/dist/components/cash-waterline/model.d.ts.map +1 -0
- package/dist/components/cash-waterline/model.js +244 -0
- package/dist/components/cash-waterline/model.js.map +1 -0
- package/dist/components/cash-waterline/render.d.ts +3 -0
- package/dist/components/cash-waterline/render.d.ts.map +1 -0
- package/dist/components/cash-waterline/render.js +204 -0
- package/dist/components/cash-waterline/render.js.map +1 -0
- package/dist/components/cash-waterline/style-forms.d.ts +7 -0
- package/dist/components/cash-waterline/style-forms.d.ts.map +1 -0
- package/dist/components/cash-waterline/style-forms.js +338 -0
- package/dist/components/cash-waterline/style-forms.js.map +1 -0
- package/dist/components/cash-waterline/style.d.ts +9 -0
- package/dist/components/cash-waterline/style.d.ts.map +1 -0
- package/dist/components/cash-waterline/style.js +225 -0
- package/dist/components/cash-waterline/style.js.map +1 -0
- package/dist/components/charts/bar.d.ts +11 -0
- package/dist/components/charts/bar.d.ts.map +1 -0
- package/dist/components/charts/bar.js +258 -0
- package/dist/components/charts/bar.js.map +1 -0
- package/dist/components/charts/combo.d.ts +11 -0
- package/dist/components/charts/combo.d.ts.map +1 -0
- package/dist/components/charts/combo.js +114 -0
- package/dist/components/charts/combo.js.map +1 -0
- package/dist/components/charts/coords.d.ts +134 -0
- package/dist/components/charts/coords.d.ts.map +1 -0
- package/dist/components/charts/coords.js +183 -0
- package/dist/components/charts/coords.js.map +1 -0
- package/dist/components/charts/dispatch.d.ts +15 -0
- package/dist/components/charts/dispatch.d.ts.map +1 -0
- package/dist/components/charts/dispatch.js +42 -0
- package/dist/components/charts/dispatch.js.map +1 -0
- package/dist/components/charts/donut.d.ts +11 -0
- package/dist/components/charts/donut.d.ts.map +1 -0
- package/dist/components/charts/donut.js +91 -0
- package/dist/components/charts/donut.js.map +1 -0
- package/dist/components/charts/gauge.d.ts +11 -0
- package/dist/components/charts/gauge.d.ts.map +1 -0
- package/dist/components/charts/gauge.js +49 -0
- package/dist/components/charts/gauge.js.map +1 -0
- package/dist/components/charts/helpers.d.ts +20 -0
- package/dist/components/charts/helpers.d.ts.map +1 -0
- package/dist/components/charts/helpers.js +59 -0
- package/dist/components/charts/helpers.js.map +1 -0
- package/dist/components/charts/index.d.ts +10 -0
- package/dist/components/charts/index.d.ts.map +1 -0
- package/dist/components/charts/index.js +10 -0
- package/dist/components/charts/index.js.map +1 -0
- package/dist/components/charts/line.d.ts +13 -0
- package/dist/components/charts/line.d.ts.map +1 -0
- package/dist/components/charts/line.js +676 -0
- package/dist/components/charts/line.js.map +1 -0
- package/dist/components/charts/options.d.ts +62 -0
- package/dist/components/charts/options.d.ts.map +1 -0
- package/dist/components/charts/options.js +114 -0
- package/dist/components/charts/options.js.map +1 -0
- package/dist/components/charts/progress.d.ts +11 -0
- package/dist/components/charts/progress.d.ts.map +1 -0
- package/dist/components/charts/progress.js +50 -0
- package/dist/components/charts/progress.js.map +1 -0
- package/dist/components/charts/scatter.d.ts +11 -0
- package/dist/components/charts/scatter.d.ts.map +1 -0
- package/dist/components/charts/scatter.js +117 -0
- package/dist/components/charts/scatter.js.map +1 -0
- package/dist/components/charts/shared.d.ts +64 -0
- package/dist/components/charts/shared.d.ts.map +1 -0
- package/dist/components/charts/shared.js +160 -0
- package/dist/components/charts/shared.js.map +1 -0
- package/dist/components/charts/sparkline.d.ts +11 -0
- package/dist/components/charts/sparkline.d.ts.map +1 -0
- package/dist/components/charts/sparkline.js +53 -0
- package/dist/components/charts/sparkline.js.map +1 -0
- package/dist/components/charts/style.d.ts +19 -0
- package/dist/components/charts/style.d.ts.map +1 -0
- package/dist/components/charts/style.js +124 -0
- package/dist/components/charts/style.js.map +1 -0
- package/dist/components/charts/svg.d.ts +23 -0
- package/dist/components/charts/svg.d.ts.map +1 -0
- package/dist/components/charts/svg.js +144 -0
- package/dist/components/charts/svg.js.map +1 -0
- package/dist/components/command-palette/attrs.d.ts +165 -0
- package/dist/components/command-palette/attrs.d.ts.map +1 -0
- package/dist/components/command-palette/attrs.js +163 -0
- package/dist/components/command-palette/attrs.js.map +1 -0
- package/dist/components/command-palette/index.d.ts +18 -0
- package/dist/components/command-palette/index.d.ts.map +1 -0
- package/dist/components/command-palette/index.js +17 -0
- package/dist/components/command-palette/index.js.map +1 -0
- package/dist/components/command-palette/model.d.ts +46 -0
- package/dist/components/command-palette/model.d.ts.map +1 -0
- package/dist/components/command-palette/model.js +165 -0
- package/dist/components/command-palette/model.js.map +1 -0
- package/dist/components/command-palette/render.d.ts +3 -0
- package/dist/components/command-palette/render.d.ts.map +1 -0
- package/dist/components/command-palette/render.js +154 -0
- package/dist/components/command-palette/render.js.map +1 -0
- package/dist/components/command-palette/runtime.d.ts +3 -0
- package/dist/components/command-palette/runtime.d.ts.map +1 -0
- package/dist/components/command-palette/runtime.js +154 -0
- package/dist/components/command-palette/runtime.js.map +1 -0
- package/dist/components/command-palette/style.d.ts +5 -0
- package/dist/components/command-palette/style.d.ts.map +1 -0
- package/dist/components/command-palette/style.js +347 -0
- package/dist/components/command-palette/style.js.map +1 -0
- package/dist/components/compare-columns/attrs.d.ts +79 -0
- package/dist/components/compare-columns/attrs.d.ts.map +1 -0
- package/dist/components/compare-columns/attrs.js +87 -0
- package/dist/components/compare-columns/attrs.js.map +1 -0
- package/dist/components/compare-columns/index.d.ts +14 -0
- package/dist/components/compare-columns/index.d.ts.map +1 -0
- package/dist/components/compare-columns/index.js +13 -0
- package/dist/components/compare-columns/index.js.map +1 -0
- package/dist/components/compare-columns/model.d.ts +35 -0
- package/dist/components/compare-columns/model.d.ts.map +1 -0
- package/dist/components/compare-columns/model.js +113 -0
- package/dist/components/compare-columns/model.js.map +1 -0
- package/dist/components/compare-columns/render.d.ts +4 -0
- package/dist/components/compare-columns/render.d.ts.map +1 -0
- package/dist/components/compare-columns/render.js +93 -0
- package/dist/components/compare-columns/render.js.map +1 -0
- package/dist/components/compare-columns/style.d.ts +13 -0
- package/dist/components/compare-columns/style.d.ts.map +1 -0
- package/dist/components/compare-columns/style.js +288 -0
- package/dist/components/compare-columns/style.js.map +1 -0
- package/dist/components/confirm-strip/attrs.d.ts +111 -0
- package/dist/components/confirm-strip/attrs.d.ts.map +1 -0
- package/dist/components/confirm-strip/attrs.js +101 -0
- package/dist/components/confirm-strip/attrs.js.map +1 -0
- package/dist/components/confirm-strip/index.d.ts +32 -0
- package/dist/components/confirm-strip/index.d.ts.map +1 -0
- package/dist/components/confirm-strip/index.js +31 -0
- package/dist/components/confirm-strip/index.js.map +1 -0
- package/dist/components/confirm-strip/model.d.ts +40 -0
- package/dist/components/confirm-strip/model.d.ts.map +1 -0
- package/dist/components/confirm-strip/model.js +113 -0
- package/dist/components/confirm-strip/model.js.map +1 -0
- package/dist/components/confirm-strip/render.d.ts +3 -0
- package/dist/components/confirm-strip/render.d.ts.map +1 -0
- package/dist/components/confirm-strip/render.js +80 -0
- package/dist/components/confirm-strip/render.js.map +1 -0
- package/dist/components/confirm-strip/runtime.d.ts +3 -0
- package/dist/components/confirm-strip/runtime.d.ts.map +1 -0
- package/dist/components/confirm-strip/runtime.js +62 -0
- package/dist/components/confirm-strip/runtime.js.map +1 -0
- package/dist/components/confirm-strip/style.d.ts +13 -0
- package/dist/components/confirm-strip/style.d.ts.map +1 -0
- package/dist/components/confirm-strip/style.js +303 -0
- package/dist/components/confirm-strip/style.js.map +1 -0
- package/dist/components/controls/action-bar.d.ts +42 -0
- package/dist/components/controls/action-bar.d.ts.map +1 -0
- package/dist/components/controls/action-bar.js +217 -0
- package/dist/components/controls/action-bar.js.map +1 -0
- package/dist/components/controls/bind.d.ts +22 -0
- package/dist/components/controls/bind.d.ts.map +1 -0
- package/dist/components/controls/bind.js +63 -0
- package/dist/components/controls/bind.js.map +1 -0
- package/dist/components/controls/copy.d.ts +18 -0
- package/dist/components/controls/copy.d.ts.map +1 -0
- package/dist/components/controls/copy.js +133 -0
- package/dist/components/controls/copy.js.map +1 -0
- package/dist/components/controls/helpers-meta.d.ts +87 -0
- package/dist/components/controls/helpers-meta.d.ts.map +1 -0
- package/dist/components/controls/helpers-meta.js +115 -0
- package/dist/components/controls/helpers-meta.js.map +1 -0
- package/dist/components/controls/helpers.d.ts +11 -0
- package/dist/components/controls/helpers.d.ts.map +1 -0
- package/dist/components/controls/helpers.js +631 -0
- package/dist/components/controls/helpers.js.map +1 -0
- package/dist/components/controls/index.d.ts +13 -0
- package/dist/components/controls/index.d.ts.map +1 -0
- package/dist/components/controls/index.js +13 -0
- package/dist/components/controls/index.js.map +1 -0
- package/dist/components/controls/shared.d.ts +23 -0
- package/dist/components/controls/shared.d.ts.map +1 -0
- package/dist/components/controls/shared.js +49 -0
- package/dist/components/controls/shared.js.map +1 -0
- package/dist/components/controls/status.d.ts +20 -0
- package/dist/components/controls/status.d.ts.map +1 -0
- package/dist/components/controls/status.js +85 -0
- package/dist/components/controls/status.js.map +1 -0
- package/dist/components/controls/toast.d.ts +43 -0
- package/dist/components/controls/toast.d.ts.map +1 -0
- package/dist/components/controls/toast.js +165 -0
- package/dist/components/controls/toast.js.map +1 -0
- package/dist/components/date-range/attrs.d.ts +143 -0
- package/dist/components/date-range/attrs.d.ts.map +1 -0
- package/dist/components/date-range/attrs.js +146 -0
- package/dist/components/date-range/attrs.js.map +1 -0
- package/dist/components/date-range/index.d.ts +33 -0
- package/dist/components/date-range/index.d.ts.map +1 -0
- package/dist/components/date-range/index.js +32 -0
- package/dist/components/date-range/index.js.map +1 -0
- package/dist/components/date-range/model.d.ts +49 -0
- package/dist/components/date-range/model.d.ts.map +1 -0
- package/dist/components/date-range/model.js +161 -0
- package/dist/components/date-range/model.js.map +1 -0
- package/dist/components/date-range/render.d.ts +5 -0
- package/dist/components/date-range/render.d.ts.map +1 -0
- package/dist/components/date-range/render.js +209 -0
- package/dist/components/date-range/render.js.map +1 -0
- package/dist/components/date-range/runtime.d.ts +3 -0
- package/dist/components/date-range/runtime.d.ts.map +1 -0
- package/dist/components/date-range/runtime.js +241 -0
- package/dist/components/date-range/runtime.js.map +1 -0
- package/dist/components/date-range/style-calendar.d.ts +5 -0
- package/dist/components/date-range/style-calendar.d.ts.map +1 -0
- package/dist/components/date-range/style-calendar.js +162 -0
- package/dist/components/date-range/style-calendar.js.map +1 -0
- package/dist/components/date-range/style.d.ts +5 -0
- package/dist/components/date-range/style.d.ts.map +1 -0
- package/dist/components/date-range/style.js +262 -0
- package/dist/components/date-range/style.js.map +1 -0
- package/dist/components/dialog/attrs.d.ts +100 -0
- package/dist/components/dialog/attrs.d.ts.map +1 -0
- package/dist/components/dialog/attrs.js +77 -0
- package/dist/components/dialog/attrs.js.map +1 -0
- package/dist/components/dialog/index.d.ts +34 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +33 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/dialog/model.d.ts +32 -0
- package/dist/components/dialog/model.d.ts.map +1 -0
- package/dist/components/dialog/model.js +110 -0
- package/dist/components/dialog/model.js.map +1 -0
- package/dist/components/dialog/render.d.ts +5 -0
- package/dist/components/dialog/render.d.ts.map +1 -0
- package/dist/components/dialog/render.js +97 -0
- package/dist/components/dialog/render.js.map +1 -0
- package/dist/components/dialog/runtime.d.ts +3 -0
- package/dist/components/dialog/runtime.d.ts.map +1 -0
- package/dist/components/dialog/runtime.js +74 -0
- package/dist/components/dialog/runtime.js.map +1 -0
- package/dist/components/dialog/style.d.ts +14 -0
- package/dist/components/dialog/style.d.ts.map +1 -0
- package/dist/components/dialog/style.js +134 -0
- package/dist/components/dialog/style.js.map +1 -0
- package/dist/components/drag-sort/attrs.d.ts +182 -0
- package/dist/components/drag-sort/attrs.d.ts.map +1 -0
- package/dist/components/drag-sort/attrs.js +204 -0
- package/dist/components/drag-sort/attrs.js.map +1 -0
- package/dist/components/drag-sort/index.d.ts +22 -0
- package/dist/components/drag-sort/index.d.ts.map +1 -0
- package/dist/components/drag-sort/index.js +21 -0
- package/dist/components/drag-sort/index.js.map +1 -0
- package/dist/components/drag-sort/model.d.ts +46 -0
- package/dist/components/drag-sort/model.d.ts.map +1 -0
- package/dist/components/drag-sort/model.js +200 -0
- package/dist/components/drag-sort/model.js.map +1 -0
- package/dist/components/drag-sort/render.d.ts +3 -0
- package/dist/components/drag-sort/render.d.ts.map +1 -0
- package/dist/components/drag-sort/render.js +182 -0
- package/dist/components/drag-sort/render.js.map +1 -0
- package/dist/components/drag-sort/runtime-buttons.d.ts +27 -0
- package/dist/components/drag-sort/runtime-buttons.d.ts.map +1 -0
- package/dist/components/drag-sort/runtime-buttons.js +139 -0
- package/dist/components/drag-sort/runtime-buttons.js.map +1 -0
- package/dist/components/drag-sort/runtime-lift.d.ts +16 -0
- package/dist/components/drag-sort/runtime-lift.d.ts.map +1 -0
- package/dist/components/drag-sort/runtime-lift.js +74 -0
- package/dist/components/drag-sort/runtime-lift.js.map +1 -0
- package/dist/components/drag-sort/runtime-prelude.d.ts +18 -0
- package/dist/components/drag-sort/runtime-prelude.d.ts.map +1 -0
- package/dist/components/drag-sort/runtime-prelude.js +168 -0
- package/dist/components/drag-sort/runtime-prelude.js.map +1 -0
- package/dist/components/drag-sort/runtime-text.d.ts +58 -0
- package/dist/components/drag-sort/runtime-text.d.ts.map +1 -0
- package/dist/components/drag-sort/runtime-text.js +81 -0
- package/dist/components/drag-sort/runtime-text.js.map +1 -0
- package/dist/components/drag-sort/runtime.d.ts +9 -0
- package/dist/components/drag-sort/runtime.d.ts.map +1 -0
- package/dist/components/drag-sort/runtime.js +181 -0
- package/dist/components/drag-sort/runtime.js.map +1 -0
- package/dist/components/drag-sort/style-forms.d.ts +5 -0
- package/dist/components/drag-sort/style-forms.d.ts.map +1 -0
- package/dist/components/drag-sort/style-forms.js +135 -0
- package/dist/components/drag-sort/style-forms.js.map +1 -0
- package/dist/components/drag-sort/style.d.ts +5 -0
- package/dist/components/drag-sort/style.d.ts.map +1 -0
- package/dist/components/drag-sort/style.js +304 -0
- package/dist/components/drag-sort/style.js.map +1 -0
- package/dist/components/drawer-sheet/attrs.d.ts +113 -0
- package/dist/components/drawer-sheet/attrs.d.ts.map +1 -0
- package/dist/components/drawer-sheet/attrs.js +111 -0
- package/dist/components/drawer-sheet/attrs.js.map +1 -0
- package/dist/components/drawer-sheet/index.d.ts +35 -0
- package/dist/components/drawer-sheet/index.d.ts.map +1 -0
- package/dist/components/drawer-sheet/index.js +33 -0
- package/dist/components/drawer-sheet/index.js.map +1 -0
- package/dist/components/drawer-sheet/model.d.ts +36 -0
- package/dist/components/drawer-sheet/model.d.ts.map +1 -0
- package/dist/components/drawer-sheet/model.js +119 -0
- package/dist/components/drawer-sheet/model.js.map +1 -0
- package/dist/components/drawer-sheet/render.d.ts +5 -0
- package/dist/components/drawer-sheet/render.d.ts.map +1 -0
- package/dist/components/drawer-sheet/render.js +117 -0
- package/dist/components/drawer-sheet/render.js.map +1 -0
- package/dist/components/drawer-sheet/runtime.d.ts +3 -0
- package/dist/components/drawer-sheet/runtime.d.ts.map +1 -0
- package/dist/components/drawer-sheet/runtime.js +106 -0
- package/dist/components/drawer-sheet/runtime.js.map +1 -0
- package/dist/components/drawer-sheet/style.d.ts +8 -0
- package/dist/components/drawer-sheet/style.d.ts.map +1 -0
- package/dist/components/drawer-sheet/style.js +137 -0
- package/dist/components/drawer-sheet/style.js.map +1 -0
- package/dist/components/due-row/attrs.d.ts +106 -0
- package/dist/components/due-row/attrs.d.ts.map +1 -0
- package/dist/components/due-row/attrs.js +76 -0
- package/dist/components/due-row/attrs.js.map +1 -0
- package/dist/components/due-row/index.d.ts +35 -0
- package/dist/components/due-row/index.d.ts.map +1 -0
- package/dist/components/due-row/index.js +34 -0
- package/dist/components/due-row/index.js.map +1 -0
- package/dist/components/due-row/model.d.ts +35 -0
- package/dist/components/due-row/model.d.ts.map +1 -0
- package/dist/components/due-row/model.js +101 -0
- package/dist/components/due-row/model.js.map +1 -0
- package/dist/components/due-row/render.d.ts +6 -0
- package/dist/components/due-row/render.d.ts.map +1 -0
- package/dist/components/due-row/render.js +101 -0
- package/dist/components/due-row/render.js.map +1 -0
- package/dist/components/due-row/runtime.d.ts +3 -0
- package/dist/components/due-row/runtime.d.ts.map +1 -0
- package/dist/components/due-row/runtime.js +40 -0
- package/dist/components/due-row/runtime.js.map +1 -0
- package/dist/components/due-row/style.d.ts +15 -0
- package/dist/components/due-row/style.d.ts.map +1 -0
- package/dist/components/due-row/style.js +323 -0
- package/dist/components/due-row/style.js.map +1 -0
- package/dist/components/editable-value/attrs.d.ts +81 -0
- package/dist/components/editable-value/attrs.d.ts.map +1 -0
- package/dist/components/editable-value/attrs.js +44 -0
- package/dist/components/editable-value/attrs.js.map +1 -0
- package/dist/components/editable-value/index.d.ts +33 -0
- package/dist/components/editable-value/index.d.ts.map +1 -0
- package/dist/components/editable-value/index.js +32 -0
- package/dist/components/editable-value/index.js.map +1 -0
- package/dist/components/editable-value/render.d.ts +4 -0
- package/dist/components/editable-value/render.d.ts.map +1 -0
- package/dist/components/editable-value/render.js +182 -0
- package/dist/components/editable-value/render.js.map +1 -0
- package/dist/components/editable-value/runtime.d.ts +3 -0
- package/dist/components/editable-value/runtime.d.ts.map +1 -0
- package/dist/components/editable-value/runtime.js +188 -0
- package/dist/components/editable-value/runtime.js.map +1 -0
- package/dist/components/editable-value/style.d.ts +8 -0
- package/dist/components/editable-value/style.d.ts.map +1 -0
- package/dist/components/editable-value/style.js +56 -0
- package/dist/components/editable-value/style.js.map +1 -0
- package/dist/components/entry-rows/index.d.ts +11 -0
- package/dist/components/entry-rows/index.d.ts.map +1 -0
- package/dist/components/entry-rows/index.js +10 -0
- package/dist/components/entry-rows/index.js.map +1 -0
- package/dist/components/entry-rows/render.d.ts +33 -0
- package/dist/components/entry-rows/render.d.ts.map +1 -0
- package/dist/components/entry-rows/render.js +65 -0
- package/dist/components/entry-rows/render.js.map +1 -0
- package/dist/components/entry-rows/style.d.ts +9 -0
- package/dist/components/entry-rows/style.d.ts.map +1 -0
- package/dist/components/entry-rows/style.js +132 -0
- package/dist/components/entry-rows/style.js.map +1 -0
- package/dist/components/filter-chips/attrs.d.ts +119 -0
- package/dist/components/filter-chips/attrs.d.ts.map +1 -0
- package/dist/components/filter-chips/attrs.js +84 -0
- package/dist/components/filter-chips/attrs.js.map +1 -0
- package/dist/components/filter-chips/index.d.ts +38 -0
- package/dist/components/filter-chips/index.d.ts.map +1 -0
- package/dist/components/filter-chips/index.js +37 -0
- package/dist/components/filter-chips/index.js.map +1 -0
- package/dist/components/filter-chips/model.d.ts +30 -0
- package/dist/components/filter-chips/model.d.ts.map +1 -0
- package/dist/components/filter-chips/model.js +92 -0
- package/dist/components/filter-chips/model.js.map +1 -0
- package/dist/components/filter-chips/render.d.ts +5 -0
- package/dist/components/filter-chips/render.d.ts.map +1 -0
- package/dist/components/filter-chips/render.js +92 -0
- package/dist/components/filter-chips/render.js.map +1 -0
- package/dist/components/filter-chips/runtime.d.ts +3 -0
- package/dist/components/filter-chips/runtime.d.ts.map +1 -0
- package/dist/components/filter-chips/runtime.js +139 -0
- package/dist/components/filter-chips/runtime.js.map +1 -0
- package/dist/components/filter-chips/style.d.ts +9 -0
- package/dist/components/filter-chips/style.d.ts.map +1 -0
- package/dist/components/filter-chips/style.js +117 -0
- package/dist/components/filter-chips/style.js.map +1 -0
- package/dist/components/flow-ribbon/attrs.d.ts +120 -0
- package/dist/components/flow-ribbon/attrs.d.ts.map +1 -0
- package/dist/components/flow-ribbon/attrs.js +174 -0
- package/dist/components/flow-ribbon/attrs.js.map +1 -0
- package/dist/components/flow-ribbon/fields.d.ts +57 -0
- package/dist/components/flow-ribbon/fields.d.ts.map +1 -0
- package/dist/components/flow-ribbon/fields.js +242 -0
- package/dist/components/flow-ribbon/fields.js.map +1 -0
- package/dist/components/flow-ribbon/forms-rails.d.ts +26 -0
- package/dist/components/flow-ribbon/forms-rails.d.ts.map +1 -0
- package/dist/components/flow-ribbon/forms-rails.js +63 -0
- package/dist/components/flow-ribbon/forms-rails.js.map +1 -0
- package/dist/components/flow-ribbon/forms.d.ts +108 -0
- package/dist/components/flow-ribbon/forms.d.ts.map +1 -0
- package/dist/components/flow-ribbon/forms.js +180 -0
- package/dist/components/flow-ribbon/forms.js.map +1 -0
- package/dist/components/flow-ribbon/index.d.ts +14 -0
- package/dist/components/flow-ribbon/index.d.ts.map +1 -0
- package/dist/components/flow-ribbon/index.js +13 -0
- package/dist/components/flow-ribbon/index.js.map +1 -0
- package/dist/components/flow-ribbon/model.d.ts +6 -0
- package/dist/components/flow-ribbon/model.d.ts.map +1 -0
- package/dist/components/flow-ribbon/model.js +73 -0
- package/dist/components/flow-ribbon/model.js.map +1 -0
- package/dist/components/flow-ribbon/render.d.ts +3 -0
- package/dist/components/flow-ribbon/render.d.ts.map +1 -0
- package/dist/components/flow-ribbon/render.js +191 -0
- package/dist/components/flow-ribbon/render.js.map +1 -0
- package/dist/components/flow-ribbon/style-forms.d.ts +8 -0
- package/dist/components/flow-ribbon/style-forms.d.ts.map +1 -0
- package/dist/components/flow-ribbon/style-forms.js +255 -0
- package/dist/components/flow-ribbon/style-forms.js.map +1 -0
- package/dist/components/flow-ribbon/style-rails.d.ts +5 -0
- package/dist/components/flow-ribbon/style-rails.d.ts.map +1 -0
- package/dist/components/flow-ribbon/style-rails.js +130 -0
- package/dist/components/flow-ribbon/style-rails.js.map +1 -0
- package/dist/components/flow-ribbon/style.d.ts +5 -0
- package/dist/components/flow-ribbon/style.d.ts.map +1 -0
- package/dist/components/flow-ribbon/style.js +216 -0
- package/dist/components/flow-ribbon/style.js.map +1 -0
- package/dist/components/gantt-timeline/attrs.d.ts +145 -0
- package/dist/components/gantt-timeline/attrs.d.ts.map +1 -0
- package/dist/components/gantt-timeline/attrs.js +121 -0
- package/dist/components/gantt-timeline/attrs.js.map +1 -0
- package/dist/components/gantt-timeline/index.d.ts +14 -0
- package/dist/components/gantt-timeline/index.d.ts.map +1 -0
- package/dist/components/gantt-timeline/index.js +13 -0
- package/dist/components/gantt-timeline/index.js.map +1 -0
- package/dist/components/gantt-timeline/layout.d.ts +112 -0
- package/dist/components/gantt-timeline/layout.d.ts.map +1 -0
- package/dist/components/gantt-timeline/layout.js +137 -0
- package/dist/components/gantt-timeline/layout.js.map +1 -0
- package/dist/components/gantt-timeline/model.d.ts +7 -0
- package/dist/components/gantt-timeline/model.d.ts.map +1 -0
- package/dist/components/gantt-timeline/model.js +273 -0
- package/dist/components/gantt-timeline/model.js.map +1 -0
- package/dist/components/gantt-timeline/render.d.ts +3 -0
- package/dist/components/gantt-timeline/render.d.ts.map +1 -0
- package/dist/components/gantt-timeline/render.js +139 -0
- package/dist/components/gantt-timeline/render.js.map +1 -0
- package/dist/components/gantt-timeline/scale.d.ts +50 -0
- package/dist/components/gantt-timeline/scale.d.ts.map +1 -0
- package/dist/components/gantt-timeline/scale.js +109 -0
- package/dist/components/gantt-timeline/scale.js.map +1 -0
- package/dist/components/gantt-timeline/style-marks.d.ts +5 -0
- package/dist/components/gantt-timeline/style-marks.d.ts.map +1 -0
- package/dist/components/gantt-timeline/style-marks.js +200 -0
- package/dist/components/gantt-timeline/style-marks.js.map +1 -0
- package/dist/components/gantt-timeline/style.d.ts +22 -0
- package/dist/components/gantt-timeline/style.d.ts.map +1 -0
- package/dist/components/gantt-timeline/style.js +307 -0
- package/dist/components/gantt-timeline/style.js.map +1 -0
- package/dist/components/gap-band/attrs.d.ts +77 -0
- package/dist/components/gap-band/attrs.d.ts.map +1 -0
- package/dist/components/gap-band/attrs.js +113 -0
- package/dist/components/gap-band/attrs.js.map +1 -0
- package/dist/components/gap-band/forms.d.ts +117 -0
- package/dist/components/gap-band/forms.d.ts.map +1 -0
- package/dist/components/gap-band/forms.js +172 -0
- package/dist/components/gap-band/forms.js.map +1 -0
- package/dist/components/gap-band/index.d.ts +16 -0
- package/dist/components/gap-band/index.d.ts.map +1 -0
- package/dist/components/gap-band/index.js +15 -0
- package/dist/components/gap-band/index.js.map +1 -0
- package/dist/components/gap-band/model.d.ts +5 -0
- package/dist/components/gap-band/model.d.ts.map +1 -0
- package/dist/components/gap-band/model.js +116 -0
- package/dist/components/gap-band/model.js.map +1 -0
- package/dist/components/gap-band/render.d.ts +3 -0
- package/dist/components/gap-band/render.d.ts.map +1 -0
- package/dist/components/gap-band/render.js +142 -0
- package/dist/components/gap-band/render.js.map +1 -0
- package/dist/components/gap-band/scale.d.ts +45 -0
- package/dist/components/gap-band/scale.d.ts.map +1 -0
- package/dist/components/gap-band/scale.js +163 -0
- package/dist/components/gap-band/scale.js.map +1 -0
- package/dist/components/gap-band/style-forms.d.ts +10 -0
- package/dist/components/gap-band/style-forms.d.ts.map +1 -0
- package/dist/components/gap-band/style-forms.js +244 -0
- package/dist/components/gap-band/style-forms.js.map +1 -0
- package/dist/components/gap-band/style.d.ts +9 -0
- package/dist/components/gap-band/style.d.ts.map +1 -0
- package/dist/components/gap-band/style.js +334 -0
- package/dist/components/gap-band/style.js.map +1 -0
- package/dist/components/goal-stairs/attrs.d.ts +100 -0
- package/dist/components/goal-stairs/attrs.d.ts.map +1 -0
- package/dist/components/goal-stairs/attrs.js +102 -0
- package/dist/components/goal-stairs/attrs.js.map +1 -0
- package/dist/components/goal-stairs/index.d.ts +16 -0
- package/dist/components/goal-stairs/index.d.ts.map +1 -0
- package/dist/components/goal-stairs/index.js +15 -0
- package/dist/components/goal-stairs/index.js.map +1 -0
- package/dist/components/goal-stairs/model.d.ts +44 -0
- package/dist/components/goal-stairs/model.d.ts.map +1 -0
- package/dist/components/goal-stairs/model.js +157 -0
- package/dist/components/goal-stairs/model.js.map +1 -0
- package/dist/components/goal-stairs/render.d.ts +3 -0
- package/dist/components/goal-stairs/render.d.ts.map +1 -0
- package/dist/components/goal-stairs/render.js +77 -0
- package/dist/components/goal-stairs/render.js.map +1 -0
- package/dist/components/goal-stairs/style.d.ts +22 -0
- package/dist/components/goal-stairs/style.d.ts.map +1 -0
- package/dist/components/goal-stairs/style.js +322 -0
- package/dist/components/goal-stairs/style.js.map +1 -0
- package/dist/components/heat-grid/attrs.d.ts +72 -0
- package/dist/components/heat-grid/attrs.d.ts.map +1 -0
- package/dist/components/heat-grid/attrs.js +76 -0
- package/dist/components/heat-grid/attrs.js.map +1 -0
- package/dist/components/heat-grid/index.d.ts +15 -0
- package/dist/components/heat-grid/index.d.ts.map +1 -0
- package/dist/components/heat-grid/index.js +14 -0
- package/dist/components/heat-grid/index.js.map +1 -0
- package/dist/components/heat-grid/model.d.ts +41 -0
- package/dist/components/heat-grid/model.d.ts.map +1 -0
- package/dist/components/heat-grid/model.js +177 -0
- package/dist/components/heat-grid/model.js.map +1 -0
- package/dist/components/heat-grid/render.d.ts +3 -0
- package/dist/components/heat-grid/render.d.ts.map +1 -0
- package/dist/components/heat-grid/render.js +105 -0
- package/dist/components/heat-grid/render.js.map +1 -0
- package/dist/components/heat-grid/style.d.ts +7 -0
- package/dist/components/heat-grid/style.d.ts.map +1 -0
- package/dist/components/heat-grid/style.js +270 -0
- package/dist/components/heat-grid/style.js.map +1 -0
- package/dist/components/help/index.d.ts +8 -0
- package/dist/components/help/index.d.ts.map +1 -0
- package/dist/components/help/index.js +8 -0
- package/dist/components/help/index.js.map +1 -0
- package/dist/components/help/render.d.ts +25 -0
- package/dist/components/help/render.d.ts.map +1 -0
- package/dist/components/help/render.js +256 -0
- package/dist/components/help/render.js.map +1 -0
- package/dist/components/help/schema.d.ts +12 -0
- package/dist/components/help/schema.d.ts.map +1 -0
- package/dist/components/help/schema.js +222 -0
- package/dist/components/help/schema.js.map +1 -0
- package/dist/components/help/shared.d.ts +34 -0
- package/dist/components/help/shared.d.ts.map +1 -0
- package/dist/components/help/shared.js +57 -0
- package/dist/components/help/shared.js.map +1 -0
- package/dist/components/help/shell.d.ts +18 -0
- package/dist/components/help/shell.d.ts.map +1 -0
- package/dist/components/help/shell.js +31 -0
- package/dist/components/help/shell.js.map +1 -0
- package/dist/components/help/template.d.ts +18 -0
- package/dist/components/help/template.d.ts.map +1 -0
- package/dist/components/help/template.js +68 -0
- package/dist/components/help/template.js.map +1 -0
- package/dist/components/hour-band/attrs.d.ts +96 -0
- package/dist/components/hour-band/attrs.d.ts.map +1 -0
- package/dist/components/hour-band/attrs.js +90 -0
- package/dist/components/hour-band/attrs.js.map +1 -0
- package/dist/components/hour-band/index.d.ts +17 -0
- package/dist/components/hour-band/index.d.ts.map +1 -0
- package/dist/components/hour-band/index.js +16 -0
- package/dist/components/hour-band/index.js.map +1 -0
- package/dist/components/hour-band/model.d.ts +51 -0
- package/dist/components/hour-band/model.d.ts.map +1 -0
- package/dist/components/hour-band/model.js +150 -0
- package/dist/components/hour-band/model.js.map +1 -0
- package/dist/components/hour-band/render.d.ts +3 -0
- package/dist/components/hour-band/render.d.ts.map +1 -0
- package/dist/components/hour-band/render.js +101 -0
- package/dist/components/hour-band/render.js.map +1 -0
- package/dist/components/hour-band/style.d.ts +9 -0
- package/dist/components/hour-band/style.d.ts.map +1 -0
- package/dist/components/hour-band/style.js +135 -0
- package/dist/components/hour-band/style.js.map +1 -0
- package/dist/components/index.d.ts +110 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +224 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/invoice-lines/attrs.d.ts +77 -0
- package/dist/components/invoice-lines/attrs.d.ts.map +1 -0
- package/dist/components/invoice-lines/attrs.js +76 -0
- package/dist/components/invoice-lines/attrs.js.map +1 -0
- package/dist/components/invoice-lines/index.d.ts +15 -0
- package/dist/components/invoice-lines/index.d.ts.map +1 -0
- package/dist/components/invoice-lines/index.js +14 -0
- package/dist/components/invoice-lines/index.js.map +1 -0
- package/dist/components/invoice-lines/model.d.ts +58 -0
- package/dist/components/invoice-lines/model.d.ts.map +1 -0
- package/dist/components/invoice-lines/model.js +181 -0
- package/dist/components/invoice-lines/model.js.map +1 -0
- package/dist/components/invoice-lines/render.d.ts +3 -0
- package/dist/components/invoice-lines/render.d.ts.map +1 -0
- package/dist/components/invoice-lines/render.js +117 -0
- package/dist/components/invoice-lines/render.js.map +1 -0
- package/dist/components/invoice-lines/style.d.ts +13 -0
- package/dist/components/invoice-lines/style.d.ts.map +1 -0
- package/dist/components/invoice-lines/style.js +272 -0
- package/dist/components/invoice-lines/style.js.map +1 -0
- package/dist/components/kanban-columns/attrs.d.ts +213 -0
- package/dist/components/kanban-columns/attrs.d.ts.map +1 -0
- package/dist/components/kanban-columns/attrs.js +242 -0
- package/dist/components/kanban-columns/attrs.js.map +1 -0
- package/dist/components/kanban-columns/index.d.ts +21 -0
- package/dist/components/kanban-columns/index.d.ts.map +1 -0
- package/dist/components/kanban-columns/index.js +20 -0
- package/dist/components/kanban-columns/index.js.map +1 -0
- package/dist/components/kanban-columns/model.d.ts +63 -0
- package/dist/components/kanban-columns/model.d.ts.map +1 -0
- package/dist/components/kanban-columns/model.js +251 -0
- package/dist/components/kanban-columns/model.js.map +1 -0
- package/dist/components/kanban-columns/render.d.ts +3 -0
- package/dist/components/kanban-columns/render.d.ts.map +1 -0
- package/dist/components/kanban-columns/render.js +209 -0
- package/dist/components/kanban-columns/render.js.map +1 -0
- package/dist/components/kanban-columns/runtime.d.ts +3 -0
- package/dist/components/kanban-columns/runtime.d.ts.map +1 -0
- package/dist/components/kanban-columns/runtime.js +228 -0
- package/dist/components/kanban-columns/runtime.js.map +1 -0
- package/dist/components/kanban-columns/style-grouped.d.ts +5 -0
- package/dist/components/kanban-columns/style-grouped.d.ts.map +1 -0
- package/dist/components/kanban-columns/style-grouped.js +145 -0
- package/dist/components/kanban-columns/style-grouped.js.map +1 -0
- package/dist/components/kanban-columns/style-narrow.d.ts +5 -0
- package/dist/components/kanban-columns/style-narrow.d.ts.map +1 -0
- package/dist/components/kanban-columns/style-narrow.js +49 -0
- package/dist/components/kanban-columns/style-narrow.js.map +1 -0
- package/dist/components/kanban-columns/style.d.ts +5 -0
- package/dist/components/kanban-columns/style.d.ts.map +1 -0
- package/dist/components/kanban-columns/style.js +328 -0
- package/dist/components/kanban-columns/style.js.map +1 -0
- package/dist/components/key-value-list/attrs.d.ts +49 -0
- package/dist/components/key-value-list/attrs.d.ts.map +1 -0
- package/dist/components/key-value-list/attrs.js +44 -0
- package/dist/components/key-value-list/attrs.js.map +1 -0
- package/dist/components/key-value-list/index.d.ts +14 -0
- package/dist/components/key-value-list/index.d.ts.map +1 -0
- package/dist/components/key-value-list/index.js +13 -0
- package/dist/components/key-value-list/index.js.map +1 -0
- package/dist/components/key-value-list/model.d.ts +16 -0
- package/dist/components/key-value-list/model.d.ts.map +1 -0
- package/dist/components/key-value-list/model.js +50 -0
- package/dist/components/key-value-list/model.js.map +1 -0
- package/dist/components/key-value-list/render.d.ts +5 -0
- package/dist/components/key-value-list/render.d.ts.map +1 -0
- package/dist/components/key-value-list/render.js +62 -0
- package/dist/components/key-value-list/render.js.map +1 -0
- package/dist/components/key-value-list/style.d.ts +5 -0
- package/dist/components/key-value-list/style.d.ts.map +1 -0
- package/dist/components/key-value-list/style.js +137 -0
- package/dist/components/key-value-list/style.js.map +1 -0
- package/dist/components/ledger-rows/index.d.ts +11 -0
- package/dist/components/ledger-rows/index.d.ts.map +1 -0
- package/dist/components/ledger-rows/index.js +10 -0
- package/dist/components/ledger-rows/index.js.map +1 -0
- package/dist/components/ledger-rows/render.d.ts +27 -0
- package/dist/components/ledger-rows/render.d.ts.map +1 -0
- package/dist/components/ledger-rows/render.js +59 -0
- package/dist/components/ledger-rows/render.js.map +1 -0
- package/dist/components/ledger-rows/style.d.ts +5 -0
- package/dist/components/ledger-rows/style.d.ts.map +1 -0
- package/dist/components/ledger-rows/style.js +89 -0
- package/dist/components/ledger-rows/style.js.map +1 -0
- package/dist/components/multi-checks/attrs.d.ts +138 -0
- package/dist/components/multi-checks/attrs.d.ts.map +1 -0
- package/dist/components/multi-checks/attrs.js +120 -0
- package/dist/components/multi-checks/attrs.js.map +1 -0
- package/dist/components/multi-checks/index.d.ts +14 -0
- package/dist/components/multi-checks/index.d.ts.map +1 -0
- package/dist/components/multi-checks/index.js +13 -0
- package/dist/components/multi-checks/index.js.map +1 -0
- package/dist/components/multi-checks/model.d.ts +63 -0
- package/dist/components/multi-checks/model.d.ts.map +1 -0
- package/dist/components/multi-checks/model.js +215 -0
- package/dist/components/multi-checks/model.js.map +1 -0
- package/dist/components/multi-checks/render.d.ts +3 -0
- package/dist/components/multi-checks/render.d.ts.map +1 -0
- package/dist/components/multi-checks/render.js +229 -0
- package/dist/components/multi-checks/render.js.map +1 -0
- package/dist/components/multi-checks/runtime.d.ts +19 -0
- package/dist/components/multi-checks/runtime.d.ts.map +1 -0
- package/dist/components/multi-checks/runtime.js +128 -0
- package/dist/components/multi-checks/runtime.js.map +1 -0
- package/dist/components/multi-checks/style.d.ts +15 -0
- package/dist/components/multi-checks/style.d.ts.map +1 -0
- package/dist/components/multi-checks/style.js +381 -0
- package/dist/components/multi-checks/style.js.map +1 -0
- package/dist/components/note-block/attrs.d.ts +56 -0
- package/dist/components/note-block/attrs.d.ts.map +1 -0
- package/dist/components/note-block/attrs.js +53 -0
- package/dist/components/note-block/attrs.js.map +1 -0
- package/dist/components/note-block/index.d.ts +14 -0
- package/dist/components/note-block/index.d.ts.map +1 -0
- package/dist/components/note-block/index.js +13 -0
- package/dist/components/note-block/index.js.map +1 -0
- package/dist/components/note-block/model.d.ts +22 -0
- package/dist/components/note-block/model.d.ts.map +1 -0
- package/dist/components/note-block/model.js +71 -0
- package/dist/components/note-block/model.js.map +1 -0
- package/dist/components/note-block/render.d.ts +3 -0
- package/dist/components/note-block/render.d.ts.map +1 -0
- package/dist/components/note-block/render.js +89 -0
- package/dist/components/note-block/render.js.map +1 -0
- package/dist/components/note-block/style.d.ts +11 -0
- package/dist/components/note-block/style.d.ts.map +1 -0
- package/dist/components/note-block/style.js +183 -0
- package/dist/components/note-block/style.js.map +1 -0
- package/dist/components/number-stepper/attrs.d.ts +113 -0
- package/dist/components/number-stepper/attrs.d.ts.map +1 -0
- package/dist/components/number-stepper/attrs.js +107 -0
- package/dist/components/number-stepper/attrs.js.map +1 -0
- package/dist/components/number-stepper/index.d.ts +26 -0
- package/dist/components/number-stepper/index.d.ts.map +1 -0
- package/dist/components/number-stepper/index.js +25 -0
- package/dist/components/number-stepper/index.js.map +1 -0
- package/dist/components/number-stepper/model.d.ts +25 -0
- package/dist/components/number-stepper/model.d.ts.map +1 -0
- package/dist/components/number-stepper/model.js +142 -0
- package/dist/components/number-stepper/model.js.map +1 -0
- package/dist/components/number-stepper/render.d.ts +5 -0
- package/dist/components/number-stepper/render.d.ts.map +1 -0
- package/dist/components/number-stepper/render.js +177 -0
- package/dist/components/number-stepper/render.js.map +1 -0
- package/dist/components/number-stepper/runtime.d.ts +3 -0
- package/dist/components/number-stepper/runtime.d.ts.map +1 -0
- package/dist/components/number-stepper/runtime.js +204 -0
- package/dist/components/number-stepper/runtime.js.map +1 -0
- package/dist/components/number-stepper/style.d.ts +5 -0
- package/dist/components/number-stepper/style.d.ts.map +1 -0
- package/dist/components/number-stepper/style.js +310 -0
- package/dist/components/number-stepper/style.js.map +1 -0
- package/dist/components/page/fact-strip.d.ts +36 -0
- package/dist/components/page/fact-strip.d.ts.map +1 -0
- package/dist/components/page/fact-strip.js +92 -0
- package/dist/components/page/fact-strip.js.map +1 -0
- package/dist/components/page/index.d.ts +13 -0
- package/dist/components/page/index.d.ts.map +1 -0
- package/dist/components/page/index.js +13 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/page/media.d.ts +67 -0
- package/dist/components/page/media.d.ts.map +1 -0
- package/dist/components/page/media.js +192 -0
- package/dist/components/page/media.js.map +1 -0
- package/dist/components/page/shared.d.ts +12 -0
- package/dist/components/page/shared.d.ts.map +1 -0
- package/dist/components/page/shared.js +35 -0
- package/dist/components/page/shared.js.map +1 -0
- package/dist/components/page/style.d.ts +5 -0
- package/dist/components/page/style.d.ts.map +1 -0
- package/dist/components/page/style.js +29 -0
- package/dist/components/page/style.js.map +1 -0
- package/dist/components/page/timeline.d.ts +25 -0
- package/dist/components/page/timeline.d.ts.map +1 -0
- package/dist/components/page/timeline.js +80 -0
- package/dist/components/page/timeline.js.map +1 -0
- package/dist/components/page-bars/index.d.ts +98 -0
- package/dist/components/page-bars/index.d.ts.map +1 -0
- package/dist/components/page-bars/index.js +181 -0
- package/dist/components/page-bars/index.js.map +1 -0
- package/dist/components/page-bars/style.d.ts +14 -0
- package/dist/components/page-bars/style.d.ts.map +1 -0
- package/dist/components/page-bars/style.js +232 -0
- package/dist/components/page-bars/style.js.map +1 -0
- package/dist/components/page-head/attrs.d.ts +57 -0
- package/dist/components/page-head/attrs.d.ts.map +1 -0
- package/dist/components/page-head/attrs.js +54 -0
- package/dist/components/page-head/attrs.js.map +1 -0
- package/dist/components/page-head/index.d.ts +13 -0
- package/dist/components/page-head/index.d.ts.map +1 -0
- package/dist/components/page-head/index.js +12 -0
- package/dist/components/page-head/index.js.map +1 -0
- package/dist/components/page-head/model.d.ts +23 -0
- package/dist/components/page-head/model.d.ts.map +1 -0
- package/dist/components/page-head/model.js +78 -0
- package/dist/components/page-head/model.js.map +1 -0
- package/dist/components/page-head/render.d.ts +3 -0
- package/dist/components/page-head/render.d.ts.map +1 -0
- package/dist/components/page-head/render.js +85 -0
- package/dist/components/page-head/render.js.map +1 -0
- package/dist/components/page-head/style.d.ts +9 -0
- package/dist/components/page-head/style.d.ts.map +1 -0
- package/dist/components/page-head/style.js +246 -0
- package/dist/components/page-head/style.js.map +1 -0
- package/dist/components/page-nav/index.d.ts +55 -0
- package/dist/components/page-nav/index.d.ts.map +1 -0
- package/dist/components/page-nav/index.js +126 -0
- package/dist/components/page-nav/index.js.map +1 -0
- package/dist/components/page-nav/style.d.ts +23 -0
- package/dist/components/page-nav/style.d.ts.map +1 -0
- package/dist/components/page-nav/style.js +94 -0
- package/dist/components/page-nav/style.js.map +1 -0
- package/dist/components/page-ui/index.d.ts +67 -0
- package/dist/components/page-ui/index.d.ts.map +1 -0
- package/dist/components/page-ui/index.js +395 -0
- package/dist/components/page-ui/index.js.map +1 -0
- package/dist/components/page-ui/toast.d.ts +16 -0
- package/dist/components/page-ui/toast.d.ts.map +1 -0
- package/dist/components/page-ui/toast.js +48 -0
- package/dist/components/page-ui/toast.js.map +1 -0
- package/dist/components/photo-compare/attrs.d.ts +84 -0
- package/dist/components/photo-compare/attrs.d.ts.map +1 -0
- package/dist/components/photo-compare/attrs.js +87 -0
- package/dist/components/photo-compare/attrs.js.map +1 -0
- package/dist/components/photo-compare/index.d.ts +16 -0
- package/dist/components/photo-compare/index.d.ts.map +1 -0
- package/dist/components/photo-compare/index.js +15 -0
- package/dist/components/photo-compare/index.js.map +1 -0
- package/dist/components/photo-compare/model.d.ts +38 -0
- package/dist/components/photo-compare/model.d.ts.map +1 -0
- package/dist/components/photo-compare/model.js +88 -0
- package/dist/components/photo-compare/model.js.map +1 -0
- package/dist/components/photo-compare/render.d.ts +3 -0
- package/dist/components/photo-compare/render.d.ts.map +1 -0
- package/dist/components/photo-compare/render.js +99 -0
- package/dist/components/photo-compare/render.js.map +1 -0
- package/dist/components/photo-compare/runtime.d.ts +3 -0
- package/dist/components/photo-compare/runtime.d.ts.map +1 -0
- package/dist/components/photo-compare/runtime.js +40 -0
- package/dist/components/photo-compare/runtime.js.map +1 -0
- package/dist/components/photo-compare/style.d.ts +14 -0
- package/dist/components/photo-compare/style.d.ts.map +1 -0
- package/dist/components/photo-compare/style.js +397 -0
- package/dist/components/photo-compare/style.js.map +1 -0
- package/dist/components/photo-grid/attrs.d.ts +78 -0
- package/dist/components/photo-grid/attrs.d.ts.map +1 -0
- package/dist/components/photo-grid/attrs.js +79 -0
- package/dist/components/photo-grid/attrs.js.map +1 -0
- package/dist/components/photo-grid/index.d.ts +13 -0
- package/dist/components/photo-grid/index.d.ts.map +1 -0
- package/dist/components/photo-grid/index.js +12 -0
- package/dist/components/photo-grid/index.js.map +1 -0
- package/dist/components/photo-grid/model.d.ts +35 -0
- package/dist/components/photo-grid/model.d.ts.map +1 -0
- package/dist/components/photo-grid/model.js +124 -0
- package/dist/components/photo-grid/model.js.map +1 -0
- package/dist/components/photo-grid/render.d.ts +3 -0
- package/dist/components/photo-grid/render.d.ts.map +1 -0
- package/dist/components/photo-grid/render.js +117 -0
- package/dist/components/photo-grid/render.js.map +1 -0
- package/dist/components/photo-grid/style.d.ts +17 -0
- package/dist/components/photo-grid/style.d.ts.map +1 -0
- package/dist/components/photo-grid/style.js +111 -0
- package/dist/components/photo-grid/style.js.map +1 -0
- package/dist/components/popover-menu/attrs.d.ts +98 -0
- package/dist/components/popover-menu/attrs.d.ts.map +1 -0
- package/dist/components/popover-menu/attrs.js +82 -0
- package/dist/components/popover-menu/attrs.js.map +1 -0
- package/dist/components/popover-menu/index.d.ts +33 -0
- package/dist/components/popover-menu/index.d.ts.map +1 -0
- package/dist/components/popover-menu/index.js +31 -0
- package/dist/components/popover-menu/index.js.map +1 -0
- package/dist/components/popover-menu/model.d.ts +26 -0
- package/dist/components/popover-menu/model.d.ts.map +1 -0
- package/dist/components/popover-menu/model.js +80 -0
- package/dist/components/popover-menu/model.js.map +1 -0
- package/dist/components/popover-menu/render.d.ts +3 -0
- package/dist/components/popover-menu/render.d.ts.map +1 -0
- package/dist/components/popover-menu/render.js +85 -0
- package/dist/components/popover-menu/render.js.map +1 -0
- package/dist/components/popover-menu/runtime.d.ts +3 -0
- package/dist/components/popover-menu/runtime.d.ts.map +1 -0
- package/dist/components/popover-menu/runtime.js +108 -0
- package/dist/components/popover-menu/runtime.js.map +1 -0
- package/dist/components/popover-menu/style.d.ts +8 -0
- package/dist/components/popover-menu/style.d.ts.map +1 -0
- package/dist/components/popover-menu/style.js +93 -0
- package/dist/components/popover-menu/style.js.map +1 -0
- package/dist/components/portion-gauge/attrs.d.ts +103 -0
- package/dist/components/portion-gauge/attrs.d.ts.map +1 -0
- package/dist/components/portion-gauge/attrs.js +108 -0
- package/dist/components/portion-gauge/attrs.js.map +1 -0
- package/dist/components/portion-gauge/fields.d.ts +26 -0
- package/dist/components/portion-gauge/fields.d.ts.map +1 -0
- package/dist/components/portion-gauge/fields.js +172 -0
- package/dist/components/portion-gauge/fields.js.map +1 -0
- package/dist/components/portion-gauge/index.d.ts +18 -0
- package/dist/components/portion-gauge/index.d.ts.map +1 -0
- package/dist/components/portion-gauge/index.js +16 -0
- package/dist/components/portion-gauge/index.js.map +1 -0
- package/dist/components/portion-gauge/model.d.ts +76 -0
- package/dist/components/portion-gauge/model.d.ts.map +1 -0
- package/dist/components/portion-gauge/model.js +127 -0
- package/dist/components/portion-gauge/model.js.map +1 -0
- package/dist/components/portion-gauge/render.d.ts +3 -0
- package/dist/components/portion-gauge/render.d.ts.map +1 -0
- package/dist/components/portion-gauge/render.js +158 -0
- package/dist/components/portion-gauge/render.js.map +1 -0
- package/dist/components/portion-gauge/style-gauge.d.ts +7 -0
- package/dist/components/portion-gauge/style-gauge.d.ts.map +1 -0
- package/dist/components/portion-gauge/style-gauge.js +154 -0
- package/dist/components/portion-gauge/style-gauge.js.map +1 -0
- package/dist/components/portion-gauge/style.d.ts +10 -0
- package/dist/components/portion-gauge/style.d.ts.map +1 -0
- package/dist/components/portion-gauge/style.js +293 -0
- package/dist/components/portion-gauge/style.js.map +1 -0
- package/dist/components/progress-list/attrs.d.ts +77 -0
- package/dist/components/progress-list/attrs.d.ts.map +1 -0
- package/dist/components/progress-list/attrs.js +73 -0
- package/dist/components/progress-list/attrs.js.map +1 -0
- package/dist/components/progress-list/index.d.ts +16 -0
- package/dist/components/progress-list/index.d.ts.map +1 -0
- package/dist/components/progress-list/index.js +15 -0
- package/dist/components/progress-list/index.js.map +1 -0
- package/dist/components/progress-list/model.d.ts +34 -0
- package/dist/components/progress-list/model.d.ts.map +1 -0
- package/dist/components/progress-list/model.js +133 -0
- package/dist/components/progress-list/model.js.map +1 -0
- package/dist/components/progress-list/render.d.ts +3 -0
- package/dist/components/progress-list/render.d.ts.map +1 -0
- package/dist/components/progress-list/render.js +85 -0
- package/dist/components/progress-list/render.js.map +1 -0
- package/dist/components/progress-list/style.d.ts +10 -0
- package/dist/components/progress-list/style.d.ts.map +1 -0
- package/dist/components/progress-list/style.js +208 -0
- package/dist/components/progress-list/style.js.map +1 -0
- package/dist/components/progress-ring/attrs.d.ts +59 -0
- package/dist/components/progress-ring/attrs.d.ts.map +1 -0
- package/dist/components/progress-ring/attrs.js +66 -0
- package/dist/components/progress-ring/attrs.js.map +1 -0
- package/dist/components/progress-ring/index.d.ts +13 -0
- package/dist/components/progress-ring/index.d.ts.map +1 -0
- package/dist/components/progress-ring/index.js +12 -0
- package/dist/components/progress-ring/index.js.map +1 -0
- package/dist/components/progress-ring/model.d.ts +32 -0
- package/dist/components/progress-ring/model.d.ts.map +1 -0
- package/dist/components/progress-ring/model.js +114 -0
- package/dist/components/progress-ring/model.js.map +1 -0
- package/dist/components/progress-ring/render.d.ts +3 -0
- package/dist/components/progress-ring/render.d.ts.map +1 -0
- package/dist/components/progress-ring/render.js +92 -0
- package/dist/components/progress-ring/render.js.map +1 -0
- package/dist/components/progress-ring/style.d.ts +9 -0
- package/dist/components/progress-ring/style.d.ts.map +1 -0
- package/dist/components/progress-ring/style.js +231 -0
- package/dist/components/progress-ring/style.js.map +1 -0
- package/dist/components/punch-strip/index.d.ts +12 -0
- package/dist/components/punch-strip/index.d.ts.map +1 -0
- package/dist/components/punch-strip/index.js +11 -0
- package/dist/components/punch-strip/index.js.map +1 -0
- package/dist/components/punch-strip/render.d.ts +24 -0
- package/dist/components/punch-strip/render.d.ts.map +1 -0
- package/dist/components/punch-strip/render.js +64 -0
- package/dist/components/punch-strip/render.js.map +1 -0
- package/dist/components/punch-strip/style.d.ts +8 -0
- package/dist/components/punch-strip/style.d.ts.map +1 -0
- package/dist/components/punch-strip/style.js +95 -0
- package/dist/components/punch-strip/style.js.map +1 -0
- package/dist/components/quick-capture/attrs.d.ts +181 -0
- package/dist/components/quick-capture/attrs.d.ts.map +1 -0
- package/dist/components/quick-capture/attrs.js +203 -0
- package/dist/components/quick-capture/attrs.js.map +1 -0
- package/dist/components/quick-capture/index.d.ts +23 -0
- package/dist/components/quick-capture/index.d.ts.map +1 -0
- package/dist/components/quick-capture/index.js +22 -0
- package/dist/components/quick-capture/index.js.map +1 -0
- package/dist/components/quick-capture/model.d.ts +34 -0
- package/dist/components/quick-capture/model.d.ts.map +1 -0
- package/dist/components/quick-capture/model.js +183 -0
- package/dist/components/quick-capture/model.js.map +1 -0
- package/dist/components/quick-capture/render.d.ts +3 -0
- package/dist/components/quick-capture/render.d.ts.map +1 -0
- package/dist/components/quick-capture/render.js +143 -0
- package/dist/components/quick-capture/render.js.map +1 -0
- package/dist/components/quick-capture/runtime.d.ts +3 -0
- package/dist/components/quick-capture/runtime.d.ts.map +1 -0
- package/dist/components/quick-capture/runtime.js +184 -0
- package/dist/components/quick-capture/runtime.js.map +1 -0
- package/dist/components/quick-capture/style-cells.d.ts +5 -0
- package/dist/components/quick-capture/style-cells.d.ts.map +1 -0
- package/dist/components/quick-capture/style-cells.js +108 -0
- package/dist/components/quick-capture/style-cells.js.map +1 -0
- package/dist/components/quick-capture/style-choices.d.ts +5 -0
- package/dist/components/quick-capture/style-choices.d.ts.map +1 -0
- package/dist/components/quick-capture/style-choices.js +132 -0
- package/dist/components/quick-capture/style-choices.js.map +1 -0
- package/dist/components/quick-capture/style-drawer.d.ts +5 -0
- package/dist/components/quick-capture/style-drawer.d.ts.map +1 -0
- package/dist/components/quick-capture/style-drawer.js +88 -0
- package/dist/components/quick-capture/style-drawer.js.map +1 -0
- package/dist/components/quick-capture/style.d.ts +5 -0
- package/dist/components/quick-capture/style.d.ts.map +1 -0
- package/dist/components/quick-capture/style.js +177 -0
- package/dist/components/quick-capture/style.js.map +1 -0
- package/dist/components/radar-profile/attrs.d.ts +110 -0
- package/dist/components/radar-profile/attrs.d.ts.map +1 -0
- package/dist/components/radar-profile/attrs.js +179 -0
- package/dist/components/radar-profile/attrs.js.map +1 -0
- package/dist/components/radar-profile/fields.d.ts +149 -0
- package/dist/components/radar-profile/fields.d.ts.map +1 -0
- package/dist/components/radar-profile/fields.js +77 -0
- package/dist/components/radar-profile/fields.js.map +1 -0
- package/dist/components/radar-profile/forms.d.ts +8 -0
- package/dist/components/radar-profile/forms.d.ts.map +1 -0
- package/dist/components/radar-profile/forms.js +224 -0
- package/dist/components/radar-profile/forms.js.map +1 -0
- package/dist/components/radar-profile/index.d.ts +13 -0
- package/dist/components/radar-profile/index.d.ts.map +1 -0
- package/dist/components/radar-profile/index.js +12 -0
- package/dist/components/radar-profile/index.js.map +1 -0
- package/dist/components/radar-profile/model.d.ts +5 -0
- package/dist/components/radar-profile/model.d.ts.map +1 -0
- package/dist/components/radar-profile/model.js +176 -0
- package/dist/components/radar-profile/model.js.map +1 -0
- package/dist/components/radar-profile/render.d.ts +3 -0
- package/dist/components/radar-profile/render.d.ts.map +1 -0
- package/dist/components/radar-profile/render.js +196 -0
- package/dist/components/radar-profile/render.js.map +1 -0
- package/dist/components/radar-profile/scale.d.ts +63 -0
- package/dist/components/radar-profile/scale.d.ts.map +1 -0
- package/dist/components/radar-profile/scale.js +129 -0
- package/dist/components/radar-profile/scale.js.map +1 -0
- package/dist/components/radar-profile/style-forms.d.ts +5 -0
- package/dist/components/radar-profile/style-forms.d.ts.map +1 -0
- package/dist/components/radar-profile/style-forms.js +192 -0
- package/dist/components/radar-profile/style-forms.js.map +1 -0
- package/dist/components/radar-profile/style-readouts.d.ts +5 -0
- package/dist/components/radar-profile/style-readouts.d.ts.map +1 -0
- package/dist/components/radar-profile/style-readouts.js +257 -0
- package/dist/components/radar-profile/style-readouts.js.map +1 -0
- package/dist/components/radar-profile/style.d.ts +5 -0
- package/dist/components/radar-profile/style.d.ts.map +1 -0
- package/dist/components/radar-profile/style.js +258 -0
- package/dist/components/radar-profile/style.js.map +1 -0
- package/dist/components/radio-cards/attrs.d.ts +99 -0
- package/dist/components/radio-cards/attrs.d.ts.map +1 -0
- package/dist/components/radio-cards/attrs.js +86 -0
- package/dist/components/radio-cards/attrs.js.map +1 -0
- package/dist/components/radio-cards/index.d.ts +14 -0
- package/dist/components/radio-cards/index.d.ts.map +1 -0
- package/dist/components/radio-cards/index.js +13 -0
- package/dist/components/radio-cards/index.js.map +1 -0
- package/dist/components/radio-cards/model.d.ts +33 -0
- package/dist/components/radio-cards/model.d.ts.map +1 -0
- package/dist/components/radio-cards/model.js +105 -0
- package/dist/components/radio-cards/model.js.map +1 -0
- package/dist/components/radio-cards/render.d.ts +3 -0
- package/dist/components/radio-cards/render.d.ts.map +1 -0
- package/dist/components/radio-cards/render.js +139 -0
- package/dist/components/radio-cards/render.js.map +1 -0
- package/dist/components/radio-cards/runtime.d.ts +17 -0
- package/dist/components/radio-cards/runtime.d.ts.map +1 -0
- package/dist/components/radio-cards/runtime.js +55 -0
- package/dist/components/radio-cards/runtime.js.map +1 -0
- package/dist/components/radio-cards/style.d.ts +17 -0
- package/dist/components/radio-cards/style.d.ts.map +1 -0
- package/dist/components/radio-cards/style.js +285 -0
- package/dist/components/radio-cards/style.js.map +1 -0
- package/dist/components/range-bar/attrs.d.ts +96 -0
- package/dist/components/range-bar/attrs.d.ts.map +1 -0
- package/dist/components/range-bar/attrs.js +72 -0
- package/dist/components/range-bar/attrs.js.map +1 -0
- package/dist/components/range-bar/index.d.ts +13 -0
- package/dist/components/range-bar/index.d.ts.map +1 -0
- package/dist/components/range-bar/index.js +12 -0
- package/dist/components/range-bar/index.js.map +1 -0
- package/dist/components/range-bar/model.d.ts +39 -0
- package/dist/components/range-bar/model.d.ts.map +1 -0
- package/dist/components/range-bar/model.js +140 -0
- package/dist/components/range-bar/model.js.map +1 -0
- package/dist/components/range-bar/render.d.ts +3 -0
- package/dist/components/range-bar/render.d.ts.map +1 -0
- package/dist/components/range-bar/render.js +87 -0
- package/dist/components/range-bar/render.js.map +1 -0
- package/dist/components/range-bar/style.d.ts +15 -0
- package/dist/components/range-bar/style.d.ts.map +1 -0
- package/dist/components/range-bar/style.js +211 -0
- package/dist/components/range-bar/style.js.map +1 -0
- package/dist/components/rank-list/attrs.d.ts +55 -0
- package/dist/components/rank-list/attrs.d.ts.map +1 -0
- package/dist/components/rank-list/attrs.js +62 -0
- package/dist/components/rank-list/attrs.js.map +1 -0
- package/dist/components/rank-list/index.d.ts +14 -0
- package/dist/components/rank-list/index.d.ts.map +1 -0
- package/dist/components/rank-list/index.js +13 -0
- package/dist/components/rank-list/index.js.map +1 -0
- package/dist/components/rank-list/model.d.ts +30 -0
- package/dist/components/rank-list/model.d.ts.map +1 -0
- package/dist/components/rank-list/model.js +103 -0
- package/dist/components/rank-list/model.js.map +1 -0
- package/dist/components/rank-list/render.d.ts +4 -0
- package/dist/components/rank-list/render.d.ts.map +1 -0
- package/dist/components/rank-list/render.js +84 -0
- package/dist/components/rank-list/render.js.map +1 -0
- package/dist/components/rank-list/style.d.ts +15 -0
- package/dist/components/rank-list/style.d.ts.map +1 -0
- package/dist/components/rank-list/style.js +248 -0
- package/dist/components/rank-list/style.js.map +1 -0
- package/dist/components/rating-row/attrs.d.ts +94 -0
- package/dist/components/rating-row/attrs.d.ts.map +1 -0
- package/dist/components/rating-row/attrs.js +91 -0
- package/dist/components/rating-row/attrs.js.map +1 -0
- package/dist/components/rating-row/index.d.ts +14 -0
- package/dist/components/rating-row/index.d.ts.map +1 -0
- package/dist/components/rating-row/index.js +13 -0
- package/dist/components/rating-row/index.js.map +1 -0
- package/dist/components/rating-row/model.d.ts +28 -0
- package/dist/components/rating-row/model.d.ts.map +1 -0
- package/dist/components/rating-row/model.js +100 -0
- package/dist/components/rating-row/model.js.map +1 -0
- package/dist/components/rating-row/render.d.ts +3 -0
- package/dist/components/rating-row/render.d.ts.map +1 -0
- package/dist/components/rating-row/render.js +123 -0
- package/dist/components/rating-row/render.js.map +1 -0
- package/dist/components/rating-row/runtime.d.ts +18 -0
- package/dist/components/rating-row/runtime.d.ts.map +1 -0
- package/dist/components/rating-row/runtime.js +93 -0
- package/dist/components/rating-row/runtime.js.map +1 -0
- package/dist/components/rating-row/style.d.ts +13 -0
- package/dist/components/rating-row/style.d.ts.map +1 -0
- package/dist/components/rating-row/style.js +235 -0
- package/dist/components/rating-row/style.js.map +1 -0
- package/dist/components/relation-picker/attrs.d.ts +196 -0
- package/dist/components/relation-picker/attrs.d.ts.map +1 -0
- package/dist/components/relation-picker/attrs.js +240 -0
- package/dist/components/relation-picker/attrs.js.map +1 -0
- package/dist/components/relation-picker/index.d.ts +20 -0
- package/dist/components/relation-picker/index.d.ts.map +1 -0
- package/dist/components/relation-picker/index.js +19 -0
- package/dist/components/relation-picker/index.js.map +1 -0
- package/dist/components/relation-picker/model.d.ts +85 -0
- package/dist/components/relation-picker/model.d.ts.map +1 -0
- package/dist/components/relation-picker/model.js +189 -0
- package/dist/components/relation-picker/model.js.map +1 -0
- package/dist/components/relation-picker/render.d.ts +3 -0
- package/dist/components/relation-picker/render.d.ts.map +1 -0
- package/dist/components/relation-picker/render.js +244 -0
- package/dist/components/relation-picker/render.js.map +1 -0
- package/dist/components/relation-picker/runtime.d.ts +3 -0
- package/dist/components/relation-picker/runtime.d.ts.map +1 -0
- package/dist/components/relation-picker/runtime.js +260 -0
- package/dist/components/relation-picker/runtime.js.map +1 -0
- package/dist/components/relation-picker/style-forms.d.ts +5 -0
- package/dist/components/relation-picker/style-forms.d.ts.map +1 -0
- package/dist/components/relation-picker/style-forms.js +190 -0
- package/dist/components/relation-picker/style-forms.js.map +1 -0
- package/dist/components/relation-picker/style-list.d.ts +5 -0
- package/dist/components/relation-picker/style-list.d.ts.map +1 -0
- package/dist/components/relation-picker/style-list.js +146 -0
- package/dist/components/relation-picker/style-list.js.map +1 -0
- package/dist/components/relation-picker/style.d.ts +5 -0
- package/dist/components/relation-picker/style.d.ts.map +1 -0
- package/dist/components/relation-picker/style.js +308 -0
- package/dist/components/relation-picker/style.js.map +1 -0
- package/dist/components/reminder-setter/attrs.d.ts +240 -0
- package/dist/components/reminder-setter/attrs.d.ts.map +1 -0
- package/dist/components/reminder-setter/attrs.js +268 -0
- package/dist/components/reminder-setter/attrs.js.map +1 -0
- package/dist/components/reminder-setter/index.d.ts +22 -0
- package/dist/components/reminder-setter/index.d.ts.map +1 -0
- package/dist/components/reminder-setter/index.js +21 -0
- package/dist/components/reminder-setter/index.js.map +1 -0
- package/dist/components/reminder-setter/model-track.d.ts +29 -0
- package/dist/components/reminder-setter/model-track.d.ts.map +1 -0
- package/dist/components/reminder-setter/model-track.js +110 -0
- package/dist/components/reminder-setter/model-track.js.map +1 -0
- package/dist/components/reminder-setter/model.d.ts +51 -0
- package/dist/components/reminder-setter/model.d.ts.map +1 -0
- package/dist/components/reminder-setter/model.js +110 -0
- package/dist/components/reminder-setter/model.js.map +1 -0
- package/dist/components/reminder-setter/render.d.ts +3 -0
- package/dist/components/reminder-setter/render.d.ts.map +1 -0
- package/dist/components/reminder-setter/render.js +221 -0
- package/dist/components/reminder-setter/render.js.map +1 -0
- package/dist/components/reminder-setter/rules.d.ts +34 -0
- package/dist/components/reminder-setter/rules.d.ts.map +1 -0
- package/dist/components/reminder-setter/rules.js +121 -0
- package/dist/components/reminder-setter/rules.js.map +1 -0
- package/dist/components/reminder-setter/runtime.d.ts +3 -0
- package/dist/components/reminder-setter/runtime.d.ts.map +1 -0
- package/dist/components/reminder-setter/runtime.js +264 -0
- package/dist/components/reminder-setter/runtime.js.map +1 -0
- package/dist/components/reminder-setter/style-track.d.ts +3 -0
- package/dist/components/reminder-setter/style-track.d.ts.map +1 -0
- package/dist/components/reminder-setter/style-track.js +189 -0
- package/dist/components/reminder-setter/style-track.js.map +1 -0
- package/dist/components/reminder-setter/style.d.ts +5 -0
- package/dist/components/reminder-setter/style.d.ts.map +1 -0
- package/dist/components/reminder-setter/style.js +306 -0
- package/dist/components/reminder-setter/style.js.map +1 -0
- package/dist/components/result-row/attrs.d.ts +50 -0
- package/dist/components/result-row/attrs.d.ts.map +1 -0
- package/dist/components/result-row/attrs.js +32 -0
- package/dist/components/result-row/attrs.js.map +1 -0
- package/dist/components/result-row/index.d.ts +29 -0
- package/dist/components/result-row/index.d.ts.map +1 -0
- package/dist/components/result-row/index.js +28 -0
- package/dist/components/result-row/index.js.map +1 -0
- package/dist/components/result-row/model.d.ts +22 -0
- package/dist/components/result-row/model.d.ts.map +1 -0
- package/dist/components/result-row/model.js +54 -0
- package/dist/components/result-row/model.js.map +1 -0
- package/dist/components/result-row/render.d.ts +5 -0
- package/dist/components/result-row/render.d.ts.map +1 -0
- package/dist/components/result-row/render.js +88 -0
- package/dist/components/result-row/render.js.map +1 -0
- package/dist/components/result-row/style.d.ts +11 -0
- package/dist/components/result-row/style.d.ts.map +1 -0
- package/dist/components/result-row/style.js +68 -0
- package/dist/components/result-row/style.js.map +1 -0
- package/dist/components/scale-bar/index.d.ts +11 -0
- package/dist/components/scale-bar/index.d.ts.map +1 -0
- package/dist/components/scale-bar/index.js +10 -0
- package/dist/components/scale-bar/index.js.map +1 -0
- package/dist/components/scale-bar/render.d.ts +23 -0
- package/dist/components/scale-bar/render.d.ts.map +1 -0
- package/dist/components/scale-bar/render.js +80 -0
- package/dist/components/scale-bar/render.js.map +1 -0
- package/dist/components/scale-bar/style.d.ts +8 -0
- package/dist/components/scale-bar/style.d.ts.map +1 -0
- package/dist/components/scale-bar/style.js +87 -0
- package/dist/components/scale-bar/style.js.map +1 -0
- package/dist/components/scatter-fit/attrs.d.ts +106 -0
- package/dist/components/scatter-fit/attrs.d.ts.map +1 -0
- package/dist/components/scatter-fit/attrs.js +113 -0
- package/dist/components/scatter-fit/attrs.js.map +1 -0
- package/dist/components/scatter-fit/forms.d.ts +86 -0
- package/dist/components/scatter-fit/forms.d.ts.map +1 -0
- package/dist/components/scatter-fit/forms.js +150 -0
- package/dist/components/scatter-fit/forms.js.map +1 -0
- package/dist/components/scatter-fit/index.d.ts +13 -0
- package/dist/components/scatter-fit/index.d.ts.map +1 -0
- package/dist/components/scatter-fit/index.js +12 -0
- package/dist/components/scatter-fit/index.js.map +1 -0
- package/dist/components/scatter-fit/model.d.ts +5 -0
- package/dist/components/scatter-fit/model.d.ts.map +1 -0
- package/dist/components/scatter-fit/model.js +196 -0
- package/dist/components/scatter-fit/model.js.map +1 -0
- package/dist/components/scatter-fit/render.d.ts +3 -0
- package/dist/components/scatter-fit/render.d.ts.map +1 -0
- package/dist/components/scatter-fit/render.js +141 -0
- package/dist/components/scatter-fit/render.js.map +1 -0
- package/dist/components/scatter-fit/scale.d.ts +60 -0
- package/dist/components/scatter-fit/scale.d.ts.map +1 -0
- package/dist/components/scatter-fit/scale.js +194 -0
- package/dist/components/scatter-fit/scale.js.map +1 -0
- package/dist/components/scatter-fit/style-forms.d.ts +7 -0
- package/dist/components/scatter-fit/style-forms.d.ts.map +1 -0
- package/dist/components/scatter-fit/style-forms.js +169 -0
- package/dist/components/scatter-fit/style-forms.js.map +1 -0
- package/dist/components/scatter-fit/style.d.ts +8 -0
- package/dist/components/scatter-fit/style.d.ts.map +1 -0
- package/dist/components/scatter-fit/style.js +273 -0
- package/dist/components/scatter-fit/style.js.map +1 -0
- package/dist/components/search-field/attrs.d.ts +136 -0
- package/dist/components/search-field/attrs.d.ts.map +1 -0
- package/dist/components/search-field/attrs.js +99 -0
- package/dist/components/search-field/attrs.js.map +1 -0
- package/dist/components/search-field/index.d.ts +39 -0
- package/dist/components/search-field/index.d.ts.map +1 -0
- package/dist/components/search-field/index.js +38 -0
- package/dist/components/search-field/index.js.map +1 -0
- package/dist/components/search-field/model.d.ts +27 -0
- package/dist/components/search-field/model.d.ts.map +1 -0
- package/dist/components/search-field/model.js +93 -0
- package/dist/components/search-field/model.js.map +1 -0
- package/dist/components/search-field/render.d.ts +7 -0
- package/dist/components/search-field/render.d.ts.map +1 -0
- package/dist/components/search-field/render.js +108 -0
- package/dist/components/search-field/render.js.map +1 -0
- package/dist/components/search-field/runtime.d.ts +3 -0
- package/dist/components/search-field/runtime.d.ts.map +1 -0
- package/dist/components/search-field/runtime.js +300 -0
- package/dist/components/search-field/runtime.js.map +1 -0
- package/dist/components/search-field/style.d.ts +9 -0
- package/dist/components/search-field/style.d.ts.map +1 -0
- package/dist/components/search-field/style.js +114 -0
- package/dist/components/search-field/style.js.map +1 -0
- package/dist/components/section-head/attrs.d.ts +53 -0
- package/dist/components/section-head/attrs.d.ts.map +1 -0
- package/dist/components/section-head/attrs.js +46 -0
- package/dist/components/section-head/attrs.js.map +1 -0
- package/dist/components/section-head/index.d.ts +14 -0
- package/dist/components/section-head/index.d.ts.map +1 -0
- package/dist/components/section-head/index.js +13 -0
- package/dist/components/section-head/index.js.map +1 -0
- package/dist/components/section-head/model.d.ts +16 -0
- package/dist/components/section-head/model.d.ts.map +1 -0
- package/dist/components/section-head/model.js +62 -0
- package/dist/components/section-head/model.js.map +1 -0
- package/dist/components/section-head/render.d.ts +6 -0
- package/dist/components/section-head/render.d.ts.map +1 -0
- package/dist/components/section-head/render.js +69 -0
- package/dist/components/section-head/render.js.map +1 -0
- package/dist/components/section-head/style.d.ts +7 -0
- package/dist/components/section-head/style.d.ts.map +1 -0
- package/dist/components/section-head/style.js +173 -0
- package/dist/components/section-head/style.js.map +1 -0
- package/dist/components/shared/escape.d.ts +3 -0
- package/dist/components/shared/escape.d.ts.map +1 -0
- package/dist/components/shared/escape.js +12 -0
- package/dist/components/shared/escape.js.map +1 -0
- package/dist/components/shared/typography.d.ts +32 -0
- package/dist/components/shared/typography.d.ts.map +1 -0
- package/dist/components/shared/typography.js +32 -0
- package/dist/components/shared/typography.js.map +1 -0
- package/dist/components/shared/validate.d.ts +26 -0
- package/dist/components/shared/validate.d.ts.map +1 -0
- package/dist/components/shared/validate.js +76 -0
- package/dist/components/shared/validate.js.map +1 -0
- package/dist/components/sheet-frame/index.d.ts +14 -0
- package/dist/components/sheet-frame/index.d.ts.map +1 -0
- package/dist/components/sheet-frame/index.js +13 -0
- package/dist/components/sheet-frame/index.js.map +1 -0
- package/dist/components/sheet-frame/render.d.ts +21 -0
- package/dist/components/sheet-frame/render.d.ts.map +1 -0
- package/dist/components/sheet-frame/render.js +46 -0
- package/dist/components/sheet-frame/render.js.map +1 -0
- package/dist/components/sheet-frame/style.d.ts +14 -0
- package/dist/components/sheet-frame/style.d.ts.map +1 -0
- package/dist/components/sheet-frame/style.js +106 -0
- package/dist/components/sheet-frame/style.js.map +1 -0
- package/dist/components/skeleton/attrs.d.ts +47 -0
- package/dist/components/skeleton/attrs.d.ts.map +1 -0
- package/dist/components/skeleton/attrs.js +63 -0
- package/dist/components/skeleton/attrs.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +25 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +24 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/skeleton/model.d.ts +15 -0
- package/dist/components/skeleton/model.d.ts.map +1 -0
- package/dist/components/skeleton/model.js +35 -0
- package/dist/components/skeleton/model.js.map +1 -0
- package/dist/components/skeleton/render.d.ts +3 -0
- package/dist/components/skeleton/render.d.ts.map +1 -0
- package/dist/components/skeleton/render.js +61 -0
- package/dist/components/skeleton/render.js.map +1 -0
- package/dist/components/skeleton/style.d.ts +27 -0
- package/dist/components/skeleton/style.d.ts.map +1 -0
- package/dist/components/skeleton/style.js +224 -0
- package/dist/components/skeleton/style.js.map +1 -0
- package/dist/components/skin/contract.d.ts +177 -0
- package/dist/components/skin/contract.d.ts.map +1 -0
- package/dist/components/skin/contract.js +90 -0
- package/dist/components/skin/contract.js.map +1 -0
- package/dist/components/skin/index.d.ts +29 -0
- package/dist/components/skin/index.d.ts.map +1 -0
- package/dist/components/skin/index.js +76 -0
- package/dist/components/skin/index.js.map +1 -0
- package/dist/components/skin/skins/blueprint.d.ts +40 -0
- package/dist/components/skin/skins/blueprint.d.ts.map +1 -0
- package/dist/components/skin/skins/blueprint.js +47 -0
- package/dist/components/skin/skins/blueprint.js.map +1 -0
- package/dist/components/skin/skins/broadsheet.d.ts +38 -0
- package/dist/components/skin/skins/broadsheet.d.ts.map +1 -0
- package/dist/components/skin/skins/broadsheet.js +45 -0
- package/dist/components/skin/skins/broadsheet.js.map +1 -0
- package/dist/components/skin/skins/ink.d.ts +40 -0
- package/dist/components/skin/skins/ink.d.ts.map +1 -0
- package/dist/components/skin/skins/ink.js +60 -0
- package/dist/components/skin/skins/ink.js.map +1 -0
- package/dist/components/skin/skins/neutral.d.ts +38 -0
- package/dist/components/skin/skins/neutral.d.ts.map +1 -0
- package/dist/components/skin/skins/neutral.js +47 -0
- package/dist/components/skin/skins/neutral.js.map +1 -0
- package/dist/components/skin/skins/paper.d.ts +40 -0
- package/dist/components/skin/skins/paper.d.ts.map +1 -0
- package/dist/components/skin/skins/paper.js +58 -0
- package/dist/components/skin/skins/paper.js.map +1 -0
- package/dist/components/skin/skins/terminal.d.ts +40 -0
- package/dist/components/skin/skins/terminal.d.ts.map +1 -0
- package/dist/components/skin/skins/terminal.js +53 -0
- package/dist/components/skin/skins/terminal.js.map +1 -0
- package/dist/components/slider-row/attrs.d.ts +115 -0
- package/dist/components/slider-row/attrs.d.ts.map +1 -0
- package/dist/components/slider-row/attrs.js +114 -0
- package/dist/components/slider-row/attrs.js.map +1 -0
- package/dist/components/slider-row/index.d.ts +28 -0
- package/dist/components/slider-row/index.d.ts.map +1 -0
- package/dist/components/slider-row/index.js +27 -0
- package/dist/components/slider-row/index.js.map +1 -0
- package/dist/components/slider-row/model.d.ts +25 -0
- package/dist/components/slider-row/model.d.ts.map +1 -0
- package/dist/components/slider-row/model.js +137 -0
- package/dist/components/slider-row/model.js.map +1 -0
- package/dist/components/slider-row/render.d.ts +7 -0
- package/dist/components/slider-row/render.d.ts.map +1 -0
- package/dist/components/slider-row/render.js +184 -0
- package/dist/components/slider-row/render.js.map +1 -0
- package/dist/components/slider-row/runtime.d.ts +3 -0
- package/dist/components/slider-row/runtime.d.ts.map +1 -0
- package/dist/components/slider-row/runtime.js +140 -0
- package/dist/components/slider-row/runtime.js.map +1 -0
- package/dist/components/slider-row/style.d.ts +5 -0
- package/dist/components/slider-row/style.d.ts.map +1 -0
- package/dist/components/slider-row/style.js +331 -0
- package/dist/components/slider-row/style.js.map +1 -0
- package/dist/components/small-multiples/attrs.d.ts +76 -0
- package/dist/components/small-multiples/attrs.d.ts.map +1 -0
- package/dist/components/small-multiples/attrs.js +78 -0
- package/dist/components/small-multiples/attrs.js.map +1 -0
- package/dist/components/small-multiples/index.d.ts +14 -0
- package/dist/components/small-multiples/index.d.ts.map +1 -0
- package/dist/components/small-multiples/index.js +13 -0
- package/dist/components/small-multiples/index.js.map +1 -0
- package/dist/components/small-multiples/model.d.ts +34 -0
- package/dist/components/small-multiples/model.d.ts.map +1 -0
- package/dist/components/small-multiples/model.js +172 -0
- package/dist/components/small-multiples/model.js.map +1 -0
- package/dist/components/small-multiples/render.d.ts +3 -0
- package/dist/components/small-multiples/render.d.ts.map +1 -0
- package/dist/components/small-multiples/render.js +76 -0
- package/dist/components/small-multiples/render.js.map +1 -0
- package/dist/components/small-multiples/scale.d.ts +33 -0
- package/dist/components/small-multiples/scale.d.ts.map +1 -0
- package/dist/components/small-multiples/scale.js +105 -0
- package/dist/components/small-multiples/scale.js.map +1 -0
- package/dist/components/small-multiples/style.d.ts +7 -0
- package/dist/components/small-multiples/style.d.ts.map +1 -0
- package/dist/components/small-multiples/style.js +261 -0
- package/dist/components/small-multiples/style.js.map +1 -0
- package/dist/components/sort-toggle/attrs.d.ts +116 -0
- package/dist/components/sort-toggle/attrs.d.ts.map +1 -0
- package/dist/components/sort-toggle/attrs.js +86 -0
- package/dist/components/sort-toggle/attrs.js.map +1 -0
- package/dist/components/sort-toggle/index.d.ts +38 -0
- package/dist/components/sort-toggle/index.d.ts.map +1 -0
- package/dist/components/sort-toggle/index.js +37 -0
- package/dist/components/sort-toggle/index.js.map +1 -0
- package/dist/components/sort-toggle/model.d.ts +27 -0
- package/dist/components/sort-toggle/model.d.ts.map +1 -0
- package/dist/components/sort-toggle/model.js +88 -0
- package/dist/components/sort-toggle/model.js.map +1 -0
- package/dist/components/sort-toggle/render.d.ts +5 -0
- package/dist/components/sort-toggle/render.d.ts.map +1 -0
- package/dist/components/sort-toggle/render.js +73 -0
- package/dist/components/sort-toggle/render.js.map +1 -0
- package/dist/components/sort-toggle/runtime.d.ts +3 -0
- package/dist/components/sort-toggle/runtime.d.ts.map +1 -0
- package/dist/components/sort-toggle/runtime.js +188 -0
- package/dist/components/sort-toggle/runtime.js.map +1 -0
- package/dist/components/sort-toggle/style.d.ts +9 -0
- package/dist/components/sort-toggle/style.d.ts.map +1 -0
- package/dist/components/sort-toggle/style.js +101 -0
- package/dist/components/sort-toggle/style.js.map +1 -0
- package/dist/components/spread-dist/attrs.d.ts +130 -0
- package/dist/components/spread-dist/attrs.d.ts.map +1 -0
- package/dist/components/spread-dist/attrs.js +156 -0
- package/dist/components/spread-dist/attrs.js.map +1 -0
- package/dist/components/spread-dist/forms.d.ts +126 -0
- package/dist/components/spread-dist/forms.d.ts.map +1 -0
- package/dist/components/spread-dist/forms.js +233 -0
- package/dist/components/spread-dist/forms.js.map +1 -0
- package/dist/components/spread-dist/index.d.ts +14 -0
- package/dist/components/spread-dist/index.d.ts.map +1 -0
- package/dist/components/spread-dist/index.js +13 -0
- package/dist/components/spread-dist/index.js.map +1 -0
- package/dist/components/spread-dist/model.d.ts +5 -0
- package/dist/components/spread-dist/model.d.ts.map +1 -0
- package/dist/components/spread-dist/model.js +267 -0
- package/dist/components/spread-dist/model.js.map +1 -0
- package/dist/components/spread-dist/render.d.ts +3 -0
- package/dist/components/spread-dist/render.d.ts.map +1 -0
- package/dist/components/spread-dist/render.js +177 -0
- package/dist/components/spread-dist/render.js.map +1 -0
- package/dist/components/spread-dist/scale.d.ts +47 -0
- package/dist/components/spread-dist/scale.d.ts.map +1 -0
- package/dist/components/spread-dist/scale.js +159 -0
- package/dist/components/spread-dist/scale.js.map +1 -0
- package/dist/components/spread-dist/style-box.d.ts +5 -0
- package/dist/components/spread-dist/style-box.d.ts.map +1 -0
- package/dist/components/spread-dist/style-box.js +252 -0
- package/dist/components/spread-dist/style-box.js.map +1 -0
- package/dist/components/spread-dist/style-quantile.d.ts +5 -0
- package/dist/components/spread-dist/style-quantile.d.ts.map +1 -0
- package/dist/components/spread-dist/style-quantile.js +97 -0
- package/dist/components/spread-dist/style-quantile.js.map +1 -0
- package/dist/components/spread-dist/style.d.ts +8 -0
- package/dist/components/spread-dist/style.d.ts.map +1 -0
- package/dist/components/spread-dist/style.js +282 -0
- package/dist/components/spread-dist/style.js.map +1 -0
- package/dist/components/stacked-bar/attrs.d.ts +56 -0
- package/dist/components/stacked-bar/attrs.d.ts.map +1 -0
- package/dist/components/stacked-bar/attrs.js +59 -0
- package/dist/components/stacked-bar/attrs.js.map +1 -0
- package/dist/components/stacked-bar/index.d.ts +13 -0
- package/dist/components/stacked-bar/index.d.ts.map +1 -0
- package/dist/components/stacked-bar/index.js +12 -0
- package/dist/components/stacked-bar/index.js.map +1 -0
- package/dist/components/stacked-bar/model.d.ts +36 -0
- package/dist/components/stacked-bar/model.d.ts.map +1 -0
- package/dist/components/stacked-bar/model.js +107 -0
- package/dist/components/stacked-bar/model.js.map +1 -0
- package/dist/components/stacked-bar/render.d.ts +3 -0
- package/dist/components/stacked-bar/render.d.ts.map +1 -0
- package/dist/components/stacked-bar/render.js +75 -0
- package/dist/components/stacked-bar/render.js.map +1 -0
- package/dist/components/stacked-bar/style.d.ts +7 -0
- package/dist/components/stacked-bar/style.d.ts.map +1 -0
- package/dist/components/stacked-bar/style.js +229 -0
- package/dist/components/stacked-bar/style.js.map +1 -0
- package/dist/components/stat-inline/attrs.d.ts +45 -0
- package/dist/components/stat-inline/attrs.d.ts.map +1 -0
- package/dist/components/stat-inline/attrs.js +36 -0
- package/dist/components/stat-inline/attrs.js.map +1 -0
- package/dist/components/stat-inline/index.d.ts +14 -0
- package/dist/components/stat-inline/index.d.ts.map +1 -0
- package/dist/components/stat-inline/index.js +13 -0
- package/dist/components/stat-inline/index.js.map +1 -0
- package/dist/components/stat-inline/model.d.ts +15 -0
- package/dist/components/stat-inline/model.d.ts.map +1 -0
- package/dist/components/stat-inline/model.js +50 -0
- package/dist/components/stat-inline/model.js.map +1 -0
- package/dist/components/stat-inline/render.d.ts +5 -0
- package/dist/components/stat-inline/render.d.ts.map +1 -0
- package/dist/components/stat-inline/render.js +60 -0
- package/dist/components/stat-inline/render.js.map +1 -0
- package/dist/components/stat-inline/style.d.ts +5 -0
- package/dist/components/stat-inline/style.d.ts.map +1 -0
- package/dist/components/stat-inline/style.js +71 -0
- package/dist/components/stat-inline/style.js.map +1 -0
- package/dist/components/status-row/attrs.d.ts +65 -0
- package/dist/components/status-row/attrs.d.ts.map +1 -0
- package/dist/components/status-row/attrs.js +51 -0
- package/dist/components/status-row/attrs.js.map +1 -0
- package/dist/components/status-row/index.d.ts +23 -0
- package/dist/components/status-row/index.d.ts.map +1 -0
- package/dist/components/status-row/index.js +22 -0
- package/dist/components/status-row/index.js.map +1 -0
- package/dist/components/status-row/model.d.ts +25 -0
- package/dist/components/status-row/model.d.ts.map +1 -0
- package/dist/components/status-row/model.js +80 -0
- package/dist/components/status-row/model.js.map +1 -0
- package/dist/components/status-row/render.d.ts +6 -0
- package/dist/components/status-row/render.d.ts.map +1 -0
- package/dist/components/status-row/render.js +70 -0
- package/dist/components/status-row/render.js.map +1 -0
- package/dist/components/status-row/style.d.ts +15 -0
- package/dist/components/status-row/style.d.ts.map +1 -0
- package/dist/components/status-row/style.js +290 -0
- package/dist/components/status-row/style.js.map +1 -0
- package/dist/components/step-flow/attrs.d.ts +65 -0
- package/dist/components/step-flow/attrs.d.ts.map +1 -0
- package/dist/components/step-flow/attrs.js +53 -0
- package/dist/components/step-flow/attrs.js.map +1 -0
- package/dist/components/step-flow/index.d.ts +23 -0
- package/dist/components/step-flow/index.d.ts.map +1 -0
- package/dist/components/step-flow/index.js +22 -0
- package/dist/components/step-flow/index.js.map +1 -0
- package/dist/components/step-flow/model.d.ts +24 -0
- package/dist/components/step-flow/model.d.ts.map +1 -0
- package/dist/components/step-flow/model.js +78 -0
- package/dist/components/step-flow/model.js.map +1 -0
- package/dist/components/step-flow/render.d.ts +6 -0
- package/dist/components/step-flow/render.d.ts.map +1 -0
- package/dist/components/step-flow/render.js +66 -0
- package/dist/components/step-flow/render.js.map +1 -0
- package/dist/components/step-flow/style.d.ts +13 -0
- package/dist/components/step-flow/style.d.ts.map +1 -0
- package/dist/components/step-flow/style.js +241 -0
- package/dist/components/step-flow/style.js.map +1 -0
- package/dist/components/streak-badge/attrs.d.ts +49 -0
- package/dist/components/streak-badge/attrs.d.ts.map +1 -0
- package/dist/components/streak-badge/attrs.js +36 -0
- package/dist/components/streak-badge/attrs.js.map +1 -0
- package/dist/components/streak-badge/index.d.ts +22 -0
- package/dist/components/streak-badge/index.d.ts.map +1 -0
- package/dist/components/streak-badge/index.js +21 -0
- package/dist/components/streak-badge/index.js.map +1 -0
- package/dist/components/streak-badge/model.d.ts +18 -0
- package/dist/components/streak-badge/model.d.ts.map +1 -0
- package/dist/components/streak-badge/model.js +45 -0
- package/dist/components/streak-badge/model.js.map +1 -0
- package/dist/components/streak-badge/render.d.ts +6 -0
- package/dist/components/streak-badge/render.d.ts.map +1 -0
- package/dist/components/streak-badge/render.js +40 -0
- package/dist/components/streak-badge/render.js.map +1 -0
- package/dist/components/streak-badge/style.d.ts +13 -0
- package/dist/components/streak-badge/style.d.ts.map +1 -0
- package/dist/components/streak-badge/style.js +135 -0
- package/dist/components/streak-badge/style.js.map +1 -0
- package/dist/components/style/action-bar.d.ts +12 -0
- package/dist/components/style/action-bar.d.ts.map +1 -0
- package/dist/components/style/action-bar.js +118 -0
- package/dist/components/style/action-bar.js.map +1 -0
- package/dist/components/style/copy-button.d.ts +10 -0
- package/dist/components/style/copy-button.d.ts.map +1 -0
- package/dist/components/style/copy-button.js +227 -0
- package/dist/components/style/copy-button.js.map +1 -0
- package/dist/components/style/empty-state.d.ts +10 -0
- package/dist/components/style/empty-state.d.ts.map +1 -0
- package/dist/components/style/empty-state.js +41 -0
- package/dist/components/style/empty-state.js.map +1 -0
- package/dist/components/style/error-receipt.d.ts +16 -0
- package/dist/components/style/error-receipt.d.ts.map +1 -0
- package/dist/components/style/error-receipt.js +59 -0
- package/dist/components/style/error-receipt.js.map +1 -0
- package/dist/components/style/help-shell.d.ts +13 -0
- package/dist/components/style/help-shell.d.ts.map +1 -0
- package/dist/components/style/help-shell.js +560 -0
- package/dist/components/style/help-shell.js.map +1 -0
- package/dist/components/style/index.d.ts +9 -0
- package/dist/components/style/index.d.ts.map +1 -0
- package/dist/components/style/index.js +8 -0
- package/dist/components/style/index.js.map +1 -0
- package/dist/components/style/parts.d.ts +29 -0
- package/dist/components/style/parts.d.ts.map +1 -0
- package/dist/components/style/parts.js +41 -0
- package/dist/components/style/parts.js.map +1 -0
- package/dist/components/style/sheet.d.ts +16 -0
- package/dist/components/style/sheet.d.ts.map +1 -0
- package/dist/components/style/sheet.js +125 -0
- package/dist/components/style/sheet.js.map +1 -0
- package/dist/components/style/status-badge.d.ts +18 -0
- package/dist/components/style/status-badge.d.ts.map +1 -0
- package/dist/components/style/status-badge.js +49 -0
- package/dist/components/style/status-badge.js.map +1 -0
- package/dist/components/style/toast.d.ts +10 -0
- package/dist/components/style/toast.d.ts.map +1 -0
- package/dist/components/style/toast.js +219 -0
- package/dist/components/style/toast.js.map +1 -0
- package/dist/components/style/tokens.d.ts +27 -0
- package/dist/components/style/tokens.d.ts.map +1 -0
- package/dist/components/style/tokens.js +30 -0
- package/dist/components/style/tokens.js.map +1 -0
- package/dist/components/sub-list/attrs.d.ts +79 -0
- package/dist/components/sub-list/attrs.d.ts.map +1 -0
- package/dist/components/sub-list/attrs.js +82 -0
- package/dist/components/sub-list/attrs.js.map +1 -0
- package/dist/components/sub-list/index.d.ts +14 -0
- package/dist/components/sub-list/index.d.ts.map +1 -0
- package/dist/components/sub-list/index.js +13 -0
- package/dist/components/sub-list/index.js.map +1 -0
- package/dist/components/sub-list/model.d.ts +41 -0
- package/dist/components/sub-list/model.d.ts.map +1 -0
- package/dist/components/sub-list/model.js +97 -0
- package/dist/components/sub-list/model.js.map +1 -0
- package/dist/components/sub-list/render.d.ts +3 -0
- package/dist/components/sub-list/render.d.ts.map +1 -0
- package/dist/components/sub-list/render.js +107 -0
- package/dist/components/sub-list/render.js.map +1 -0
- package/dist/components/sub-list/style.d.ts +12 -0
- package/dist/components/sub-list/style.d.ts.map +1 -0
- package/dist/components/sub-list/style.js +328 -0
- package/dist/components/sub-list/style.js.map +1 -0
- package/dist/components/summary-head/index.d.ts +12 -0
- package/dist/components/summary-head/index.d.ts.map +1 -0
- package/dist/components/summary-head/index.js +11 -0
- package/dist/components/summary-head/index.js.map +1 -0
- package/dist/components/summary-head/render.d.ts +32 -0
- package/dist/components/summary-head/render.d.ts.map +1 -0
- package/dist/components/summary-head/render.js +74 -0
- package/dist/components/summary-head/render.js.map +1 -0
- package/dist/components/summary-head/style.d.ts +14 -0
- package/dist/components/summary-head/style.d.ts.map +1 -0
- package/dist/components/summary-head/style.js +156 -0
- package/dist/components/summary-head/style.js.map +1 -0
- package/dist/components/switch-row/attrs.d.ts +92 -0
- package/dist/components/switch-row/attrs.d.ts.map +1 -0
- package/dist/components/switch-row/attrs.js +89 -0
- package/dist/components/switch-row/attrs.js.map +1 -0
- package/dist/components/switch-row/index.d.ts +30 -0
- package/dist/components/switch-row/index.d.ts.map +1 -0
- package/dist/components/switch-row/index.js +29 -0
- package/dist/components/switch-row/index.js.map +1 -0
- package/dist/components/switch-row/model.d.ts +18 -0
- package/dist/components/switch-row/model.d.ts.map +1 -0
- package/dist/components/switch-row/model.js +51 -0
- package/dist/components/switch-row/model.js.map +1 -0
- package/dist/components/switch-row/render.d.ts +3 -0
- package/dist/components/switch-row/render.d.ts.map +1 -0
- package/dist/components/switch-row/render.js +113 -0
- package/dist/components/switch-row/render.js.map +1 -0
- package/dist/components/switch-row/runtime.d.ts +5 -0
- package/dist/components/switch-row/runtime.d.ts.map +1 -0
- package/dist/components/switch-row/runtime.js +63 -0
- package/dist/components/switch-row/runtime.js.map +1 -0
- package/dist/components/switch-row/style.d.ts +5 -0
- package/dist/components/switch-row/style.d.ts.map +1 -0
- package/dist/components/switch-row/style.js +259 -0
- package/dist/components/switch-row/style.js.map +1 -0
- package/dist/components/sync-status/attrs.d.ts +97 -0
- package/dist/components/sync-status/attrs.d.ts.map +1 -0
- package/dist/components/sync-status/attrs.js +91 -0
- package/dist/components/sync-status/attrs.js.map +1 -0
- package/dist/components/sync-status/index.d.ts +19 -0
- package/dist/components/sync-status/index.d.ts.map +1 -0
- package/dist/components/sync-status/index.js +18 -0
- package/dist/components/sync-status/index.js.map +1 -0
- package/dist/components/sync-status/model.d.ts +29 -0
- package/dist/components/sync-status/model.d.ts.map +1 -0
- package/dist/components/sync-status/model.js +74 -0
- package/dist/components/sync-status/model.js.map +1 -0
- package/dist/components/sync-status/render.d.ts +3 -0
- package/dist/components/sync-status/render.d.ts.map +1 -0
- package/dist/components/sync-status/render.js +96 -0
- package/dist/components/sync-status/render.js.map +1 -0
- package/dist/components/sync-status/runtime.d.ts +3 -0
- package/dist/components/sync-status/runtime.d.ts.map +1 -0
- package/dist/components/sync-status/runtime.js +84 -0
- package/dist/components/sync-status/runtime.js.map +1 -0
- package/dist/components/sync-status/style.d.ts +10 -0
- package/dist/components/sync-status/style.d.ts.map +1 -0
- package/dist/components/sync-status/style.js +257 -0
- package/dist/components/sync-status/style.js.map +1 -0
- package/dist/components/task-list/attrs.d.ts +97 -0
- package/dist/components/task-list/attrs.d.ts.map +1 -0
- package/dist/components/task-list/attrs.js +77 -0
- package/dist/components/task-list/attrs.js.map +1 -0
- package/dist/components/task-list/index.d.ts +33 -0
- package/dist/components/task-list/index.d.ts.map +1 -0
- package/dist/components/task-list/index.js +32 -0
- package/dist/components/task-list/index.js.map +1 -0
- package/dist/components/task-list/model.d.ts +33 -0
- package/dist/components/task-list/model.d.ts.map +1 -0
- package/dist/components/task-list/model.js +106 -0
- package/dist/components/task-list/model.js.map +1 -0
- package/dist/components/task-list/render.d.ts +6 -0
- package/dist/components/task-list/render.d.ts.map +1 -0
- package/dist/components/task-list/render.js +113 -0
- package/dist/components/task-list/render.js.map +1 -0
- package/dist/components/task-list/runtime.d.ts +3 -0
- package/dist/components/task-list/runtime.d.ts.map +1 -0
- package/dist/components/task-list/runtime.js +76 -0
- package/dist/components/task-list/runtime.js.map +1 -0
- package/dist/components/task-list/style.d.ts +15 -0
- package/dist/components/task-list/style.d.ts.map +1 -0
- package/dist/components/task-list/style.js +283 -0
- package/dist/components/task-list/style.js.map +1 -0
- package/dist/components/template/fill.d.ts +10 -0
- package/dist/components/template/fill.d.ts.map +1 -0
- package/dist/components/template/fill.js +194 -0
- package/dist/components/template/fill.js.map +1 -0
- package/dist/components/template/index.d.ts +8 -0
- package/dist/components/template/index.d.ts.map +1 -0
- package/dist/components/template/index.js +8 -0
- package/dist/components/template/index.js.map +1 -0
- package/dist/components/template/markers.d.ts +60 -0
- package/dist/components/template/markers.d.ts.map +1 -0
- package/dist/components/template/markers.js +131 -0
- package/dist/components/template/markers.js.map +1 -0
- package/dist/components/template/shared.d.ts +20 -0
- package/dist/components/template/shared.d.ts.map +1 -0
- package/dist/components/template/shared.js +26 -0
- package/dist/components/template/shared.js.map +1 -0
- package/dist/components/text/api.d.ts +14 -0
- package/dist/components/text/api.d.ts.map +1 -0
- package/dist/components/text/api.js +77 -0
- package/dist/components/text/api.js.map +1 -0
- package/dist/components/text/formats.d.ts +30 -0
- package/dist/components/text/formats.d.ts.map +1 -0
- package/dist/components/text/formats.js +121 -0
- package/dist/components/text/formats.js.map +1 -0
- package/dist/components/text/index.d.ts +8 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +8 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text/input.d.ts +27 -0
- package/dist/components/text/input.d.ts.map +1 -0
- package/dist/components/text/input.js +115 -0
- package/dist/components/text/input.js.map +1 -0
- package/dist/components/text/log.d.ts +12 -0
- package/dist/components/text/log.d.ts.map +1 -0
- package/dist/components/text/log.js +29 -0
- package/dist/components/text/log.js.map +1 -0
- package/dist/components/text/rows.d.ts +27 -0
- package/dist/components/text/rows.d.ts.map +1 -0
- package/dist/components/text/rows.js +101 -0
- package/dist/components/text/rows.js.map +1 -0
- package/dist/components/text/shared.d.ts +35 -0
- package/dist/components/text/shared.d.ts.map +1 -0
- package/dist/components/text/shared.js +30 -0
- package/dist/components/text/shared.js.map +1 -0
- package/dist/components/timer-card/attrs.d.ts +99 -0
- package/dist/components/timer-card/attrs.d.ts.map +1 -0
- package/dist/components/timer-card/attrs.js +98 -0
- package/dist/components/timer-card/attrs.js.map +1 -0
- package/dist/components/timer-card/index.d.ts +34 -0
- package/dist/components/timer-card/index.d.ts.map +1 -0
- package/dist/components/timer-card/index.js +33 -0
- package/dist/components/timer-card/index.js.map +1 -0
- package/dist/components/timer-card/model.d.ts +19 -0
- package/dist/components/timer-card/model.d.ts.map +1 -0
- package/dist/components/timer-card/model.js +64 -0
- package/dist/components/timer-card/model.js.map +1 -0
- package/dist/components/timer-card/render.d.ts +8 -0
- package/dist/components/timer-card/render.d.ts.map +1 -0
- package/dist/components/timer-card/render.js +108 -0
- package/dist/components/timer-card/render.js.map +1 -0
- package/dist/components/timer-card/runtime.d.ts +3 -0
- package/dist/components/timer-card/runtime.d.ts.map +1 -0
- package/dist/components/timer-card/runtime.js +133 -0
- package/dist/components/timer-card/runtime.js.map +1 -0
- package/dist/components/timer-card/style.d.ts +15 -0
- package/dist/components/timer-card/style.d.ts.map +1 -0
- package/dist/components/timer-card/style.js +244 -0
- package/dist/components/timer-card/style.js.map +1 -0
- package/dist/components/toast-card/attrs.d.ts +109 -0
- package/dist/components/toast-card/attrs.d.ts.map +1 -0
- package/dist/components/toast-card/attrs.js +121 -0
- package/dist/components/toast-card/attrs.js.map +1 -0
- package/dist/components/toast-card/index.d.ts +29 -0
- package/dist/components/toast-card/index.d.ts.map +1 -0
- package/dist/components/toast-card/index.js +28 -0
- package/dist/components/toast-card/index.js.map +1 -0
- package/dist/components/toast-card/model.d.ts +29 -0
- package/dist/components/toast-card/model.d.ts.map +1 -0
- package/dist/components/toast-card/model.js +104 -0
- package/dist/components/toast-card/model.js.map +1 -0
- package/dist/components/toast-card/render.d.ts +13 -0
- package/dist/components/toast-card/render.d.ts.map +1 -0
- package/dist/components/toast-card/render.js +75 -0
- package/dist/components/toast-card/render.js.map +1 -0
- package/dist/components/toast-card/runtime.d.ts +5 -0
- package/dist/components/toast-card/runtime.d.ts.map +1 -0
- package/dist/components/toast-card/runtime.js +110 -0
- package/dist/components/toast-card/runtime.js.map +1 -0
- package/dist/components/toast-card/style.d.ts +10 -0
- package/dist/components/toast-card/style.d.ts.map +1 -0
- package/dist/components/toast-card/style.js +209 -0
- package/dist/components/toast-card/style.js.map +1 -0
- package/dist/components/tooltip/attrs.d.ts +91 -0
- package/dist/components/tooltip/attrs.d.ts.map +1 -0
- package/dist/components/tooltip/attrs.js +93 -0
- package/dist/components/tooltip/attrs.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +28 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +26 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/model.d.ts +18 -0
- package/dist/components/tooltip/model.d.ts.map +1 -0
- package/dist/components/tooltip/model.js +44 -0
- package/dist/components/tooltip/model.js.map +1 -0
- package/dist/components/tooltip/render.d.ts +3 -0
- package/dist/components/tooltip/render.d.ts.map +1 -0
- package/dist/components/tooltip/render.js +61 -0
- package/dist/components/tooltip/render.js.map +1 -0
- package/dist/components/tooltip/runtime.d.ts +3 -0
- package/dist/components/tooltip/runtime.d.ts.map +1 -0
- package/dist/components/tooltip/runtime.js +103 -0
- package/dist/components/tooltip/runtime.js.map +1 -0
- package/dist/components/tooltip/style.d.ts +8 -0
- package/dist/components/tooltip/style.d.ts.map +1 -0
- package/dist/components/tooltip/style.js +91 -0
- package/dist/components/tooltip/style.js.map +1 -0
- package/dist/components/undo-timeline/attrs.d.ts +204 -0
- package/dist/components/undo-timeline/attrs.d.ts.map +1 -0
- package/dist/components/undo-timeline/attrs.js +192 -0
- package/dist/components/undo-timeline/attrs.js.map +1 -0
- package/dist/components/undo-timeline/ids.d.ts +20 -0
- package/dist/components/undo-timeline/ids.d.ts.map +1 -0
- package/dist/components/undo-timeline/ids.js +39 -0
- package/dist/components/undo-timeline/ids.js.map +1 -0
- package/dist/components/undo-timeline/index.d.ts +27 -0
- package/dist/components/undo-timeline/index.d.ts.map +1 -0
- package/dist/components/undo-timeline/index.js +26 -0
- package/dist/components/undo-timeline/index.js.map +1 -0
- package/dist/components/undo-timeline/keys.d.ts +17 -0
- package/dist/components/undo-timeline/keys.d.ts.map +1 -0
- package/dist/components/undo-timeline/keys.js +47 -0
- package/dist/components/undo-timeline/keys.js.map +1 -0
- package/dist/components/undo-timeline/model.d.ts +72 -0
- package/dist/components/undo-timeline/model.d.ts.map +1 -0
- package/dist/components/undo-timeline/model.js +256 -0
- package/dist/components/undo-timeline/model.js.map +1 -0
- package/dist/components/undo-timeline/render.d.ts +3 -0
- package/dist/components/undo-timeline/render.d.ts.map +1 -0
- package/dist/components/undo-timeline/render.js +258 -0
- package/dist/components/undo-timeline/render.js.map +1 -0
- package/dist/components/undo-timeline/runtime.d.ts +3 -0
- package/dist/components/undo-timeline/runtime.d.ts.map +1 -0
- package/dist/components/undo-timeline/runtime.js +191 -0
- package/dist/components/undo-timeline/runtime.js.map +1 -0
- package/dist/components/undo-timeline/style-impact.d.ts +5 -0
- package/dist/components/undo-timeline/style-impact.d.ts.map +1 -0
- package/dist/components/undo-timeline/style-impact.js +191 -0
- package/dist/components/undo-timeline/style-impact.js.map +1 -0
- package/dist/components/undo-timeline/style-track.d.ts +5 -0
- package/dist/components/undo-timeline/style-track.d.ts.map +1 -0
- package/dist/components/undo-timeline/style-track.js +304 -0
- package/dist/components/undo-timeline/style-track.js.map +1 -0
- package/dist/components/undo-timeline/style.d.ts +7 -0
- package/dist/components/undo-timeline/style.d.ts.map +1 -0
- package/dist/components/undo-timeline/style.js +224 -0
- package/dist/components/undo-timeline/style.js.map +1 -0
- package/dist/components/undo-timeline/text.d.ts +35 -0
- package/dist/components/undo-timeline/text.d.ts.map +1 -0
- package/dist/components/undo-timeline/text.js +34 -0
- package/dist/components/undo-timeline/text.js.map +1 -0
- package/dist/components/window-picker/attrs.d.ts +109 -0
- package/dist/components/window-picker/attrs.d.ts.map +1 -0
- package/dist/components/window-picker/attrs.js +71 -0
- package/dist/components/window-picker/attrs.js.map +1 -0
- package/dist/components/window-picker/index.d.ts +33 -0
- package/dist/components/window-picker/index.d.ts.map +1 -0
- package/dist/components/window-picker/index.js +31 -0
- package/dist/components/window-picker/index.js.map +1 -0
- package/dist/components/window-picker/model.d.ts +33 -0
- package/dist/components/window-picker/model.d.ts.map +1 -0
- package/dist/components/window-picker/model.js +151 -0
- package/dist/components/window-picker/model.js.map +1 -0
- package/dist/components/window-picker/render.d.ts +10 -0
- package/dist/components/window-picker/render.d.ts.map +1 -0
- package/dist/components/window-picker/render.js +70 -0
- package/dist/components/window-picker/render.js.map +1 -0
- package/dist/components/window-picker/runtime.d.ts +3 -0
- package/dist/components/window-picker/runtime.d.ts.map +1 -0
- package/dist/components/window-picker/runtime.js +161 -0
- package/dist/components/window-picker/runtime.js.map +1 -0
- package/dist/components/window-picker/style.d.ts +11 -0
- package/dist/components/window-picker/style.d.ts.map +1 -0
- package/dist/components/window-picker/style.js +101 -0
- package/dist/components/window-picker/style.js.map +1 -0
- package/dist/components/wizard-shell/attrs.d.ts +183 -0
- package/dist/components/wizard-shell/attrs.d.ts.map +1 -0
- package/dist/components/wizard-shell/attrs.js +157 -0
- package/dist/components/wizard-shell/attrs.js.map +1 -0
- package/dist/components/wizard-shell/index.d.ts +16 -0
- package/dist/components/wizard-shell/index.d.ts.map +1 -0
- package/dist/components/wizard-shell/index.js +15 -0
- package/dist/components/wizard-shell/index.js.map +1 -0
- package/dist/components/wizard-shell/model.d.ts +57 -0
- package/dist/components/wizard-shell/model.d.ts.map +1 -0
- package/dist/components/wizard-shell/model.js +239 -0
- package/dist/components/wizard-shell/model.js.map +1 -0
- package/dist/components/wizard-shell/render.d.ts +3 -0
- package/dist/components/wizard-shell/render.d.ts.map +1 -0
- package/dist/components/wizard-shell/render.js +202 -0
- package/dist/components/wizard-shell/render.js.map +1 -0
- package/dist/components/wizard-shell/runtime.d.ts +20 -0
- package/dist/components/wizard-shell/runtime.d.ts.map +1 -0
- package/dist/components/wizard-shell/runtime.js +85 -0
- package/dist/components/wizard-shell/runtime.js.map +1 -0
- package/dist/components/wizard-shell/style-answer.d.ts +5 -0
- package/dist/components/wizard-shell/style-answer.d.ts.map +1 -0
- package/dist/components/wizard-shell/style-answer.js +221 -0
- package/dist/components/wizard-shell/style-answer.js.map +1 -0
- package/dist/components/wizard-shell/style.d.ts +5 -0
- package/dist/components/wizard-shell/style.d.ts.map +1 -0
- package/dist/components/wizard-shell/style.js +284 -0
- package/dist/components/wizard-shell/style.js.map +1 -0
- package/dist/components//346/270/205/345/215/225.d.ts +72 -0
- package/dist/components//346/270/205/345/215/225.d.ts.map +1 -0
- package/dist/components//346/270/205/345/215/225.js +196 -0
- package/dist/components//346/270/205/345/215/225.js.map +1 -0
- package/dist/controls.d.ts +6 -160
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +6 -1416
- package/dist/controls.js.map +1 -1
- package/dist/docShell.d.ts +10 -2
- package/dist/docShell.d.ts.map +1 -1
- package/dist/docShell.js +8 -4
- package/dist/docShell.js.map +1 -1
- package/dist/editableValue.d.ts +93 -0
- package/dist/editableValue.d.ts.map +1 -0
- package/dist/editableValue.js +415 -0
- package/dist/editableValue.js.map +1 -0
- package/dist/help.d.ts +4 -21
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +4 -618
- package/dist/help.js.map +1 -1
- package/dist/helpShell.d.ts.map +1 -1
- package/dist/helpShell.js +2 -2
- package/dist/helpShell.js.map +1 -1
- package/dist/index.d.ts +31 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -8
- package/dist/index.js.map +1 -1
- package/dist/pageBars.d.ts +93 -0
- package/dist/pageBars.d.ts.map +1 -0
- package/dist/pageBars.js +176 -0
- package/dist/pageBars.js.map +1 -0
- package/dist/pageBarsCss.d.ts +11 -0
- package/dist/pageBarsCss.d.ts.map +1 -0
- package/dist/pageBarsCss.js +229 -0
- package/dist/pageBarsCss.js.map +1 -0
- package/dist/pageNav.d.ts +51 -0
- package/dist/pageNav.d.ts.map +1 -0
- package/dist/pageNav.js +122 -0
- package/dist/pageNav.js.map +1 -0
- package/dist/pageNavCss.d.ts +14 -0
- package/dist/pageNavCss.d.ts.map +1 -0
- package/dist/pageNavCss.js +85 -0
- package/dist/pageNavCss.js.map +1 -0
- package/dist/pageShapes.d.ts +12 -3
- package/dist/pageShapes.d.ts.map +1 -1
- package/dist/pageShapes.js +32 -3
- package/dist/pageShapes.js.map +1 -1
- package/dist/pageUi.d.ts +7 -47
- package/dist/pageUi.d.ts.map +1 -1
- package/dist/pageUi.js +7 -350
- package/dist/pageUi.js.map +1 -1
- package/dist/spec/charts.d.ts +6 -0
- package/dist/spec/charts.d.ts.map +1 -1
- package/dist/spec/charts.js.map +1 -1
- package/dist/spec/help.d.ts +59 -0
- package/dist/spec/help.d.ts.map +1 -1
- package/dist/spec/help.js +19 -0
- package/dist/spec/help.js.map +1 -1
- package/dist/spec/index.d.ts +5 -5
- package/dist/spec/index.d.ts.map +1 -1
- package/dist/spec/index.js +43 -5
- package/dist/spec/index.js.map +1 -1
- package/dist/spec/template.d.ts +1 -1
- package/dist/spec/template.d.ts.map +1 -1
- package/dist/spec/template.js +1 -1
- package/dist/spec/template.js.map +1 -1
- package/dist/spec/text.d.ts +8 -8
- package/dist/spec/text.d.ts.map +1 -1
- package/dist/spec/text.js +2 -2
- package/dist/spec/text.js.map +1 -1
- package/dist/style.d.ts +6 -40
- package/dist/style.d.ts.map +1 -1
- package/dist/style.js +6 -1369
- package/dist/style.js.map +1 -1
- package/dist/template.d.ts +4 -24
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js +4 -359
- package/dist/template.js.map +1 -1
- package/dist/text.d.ts +4 -16
- package/dist/text.d.ts.map +1 -1
- package/dist/text.js +4 -450
- package/dist/text.js.map +1 -1
- package/package.json +2 -2
package/dist/charts.js
CHANGED
|
@@ -1,2036 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** **薄转出**(目录化批次④之后本件不再住实现)。
|
|
2
2
|
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 三条硬边界(逐条对齐 §3.5/§6.5,违反即红):
|
|
8
|
-
* 1. **纯 CSS + SVG 字符串**(§3.5.1「工程约束」):无 `<canvas>`、无产出内联 `<script>`/`onclick=`、
|
|
9
|
-
* 无 `node:`、零第三方;交互一律走 `actionId`(渲染期写入 `ACTION_ID_ATTR`)。
|
|
10
|
-
* 2. **模块自身零 DOM**(R8):本文件代码里不出现 `document.`/`window.`/`globalThis.`——
|
|
11
|
-
* DOM 只允许出现在 `buildChartsHelpersJs` **产出的 JS 文本**里(`SHARED_HELPERS_JS_RULE.domAllowed`)。
|
|
12
|
-
* 3. **坐标唯一**(`CHART_COORD_RULE = 'viewBox-only'`):容器零 padding(CSS 里 `.…-charts{padding:0}`),
|
|
13
|
-
* 留白全部进 viewBox;描边元素带 `vector-effect="non-scaling-stroke"`。
|
|
14
|
-
* 旧版「SVG viewBox + HTML 百分比覆盖层」双层体系(`charts.js:560,572,583,604,618,645,649,870`)
|
|
15
|
-
* 与 DOM 校准(`charts.js:779-795`)**不复刻**(R19)——新实现把数据点/数值/刻度/标注
|
|
16
|
-
* 全部放进同一 viewBox,物理对齐由同一映射函数保证。
|
|
17
|
-
*
|
|
18
|
-
* 选项级语义(契约登记为「不冻结也不排除」,owner = #78)以 `docs/research/t92-old-v130-signatures.md:162-178`
|
|
19
|
-
* 与 `.scratch/t78/old-baseline.md` §2 旧行为为准,逐字段在 `.scratch/t78/a1-evidence.md` 对照。
|
|
20
|
-
*
|
|
21
|
-
* 文档未规定处的取值(本文显式记账,不留暗猜):
|
|
22
|
-
* - 各 kind 缺省 viewBox 尺寸(旧版桌面缺省高度:柱/组合 170、折线 210、donut 150、gauge 170×105、
|
|
23
|
-
* sparkline 90×30;`old-baseline.md` §3.2)与折线点直径 7、scatter 点直径 9(旧 `dotSize||9`);
|
|
24
|
-
* - 空态默认文案 = 冻结 `STATUS_DEFAULT_TEXT.empty`(旧版「暂无数据」;不新造第二份文案常量),
|
|
25
|
-
* 图标 📊 与提示「有记录后自动生成图表」沿用旧基线(纯 UI 文案,非契约常量);
|
|
26
|
-
* - `dotStyle`/`line.dotSize`/`combo.tooltip` 旧版是死参数,按 R21 实现为**新能力**:
|
|
27
|
-
* `dotStyle` = 数据点内联 `style` 文本(逐点样式覆盖),`dotSize` = 点直径,`tooltip` = `data-tip` 数据属性;
|
|
28
|
-
* - `avgLine(n)` = 旧语义的**均线序列**(窗口统一为 `3..items.length`,`old-baseline.md` §2.2),
|
|
29
|
-
* 不是水平线;`emptyText`/`compact`/`bar.grid` 旧版是死参数,按冻结类型补齐为有效选项;
|
|
30
|
-
* - `prefix` 覆盖只影响 `buildChartsHelpersJs` **产出的 CSS 文本**;`charts.*` 产出的 HTML 恒用
|
|
31
|
-
* `STYLE_PREFIX` 命名空间(与 `SharedHelpersInput.dataAttr` 覆盖口径同构,不一致由调用方自负)。
|
|
3
|
+
* 为什么留着:`dist/charts.js` 这个**产物路径**还有消费方按它取件——`src/blocks.ts`/
|
|
4
|
+
* `src/docShell.ts`(两件都在并行席位的在途写集里,不动)、`src/style.ts`(其 import 行
|
|
5
|
+
* 被 `test/style.test.mjs:339` 钉着)、以及 5 个测试文件。留一层转出=它们零改动。
|
|
6
|
+
* 实现住 `src/components/charts/**`;等那些引用迁走即可删本件。
|
|
32
7
|
*/
|
|
33
|
-
|
|
34
|
-
import { renderEmptyState } from './controls.js';
|
|
35
|
-
import { STYLE_PREFIX } from './style.js';
|
|
36
|
-
import { ACTION_ID_ATTR, CHART_BREAKPOINTS, CHART_PALETTE, CHARTS_STYLE_ID, STATUS_DEFAULT_TEXT } from './spec/index.js';
|
|
37
|
-
const LF = String.fromCharCode(10);
|
|
38
|
-
/* ── 错误形态(§3.5:与 `TemplateError`/`ControlsError` 并列、互不继承、一律抛出、不返空) ── */
|
|
39
|
-
/** 图表层错误。**不**从 `src/index.ts` 导出:调用方按 `name === 'ChartError'` + `code` 判定。 */
|
|
40
|
-
export class ChartError extends Error {
|
|
41
|
-
code;
|
|
42
|
-
constructor(code, message) {
|
|
43
|
-
super(message);
|
|
44
|
-
this.name = 'ChartError';
|
|
45
|
-
this.code = code;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function badStructure(message) {
|
|
49
|
-
throw new ChartError('structure-invalid', message);
|
|
50
|
-
}
|
|
51
|
-
function badPct(message) {
|
|
52
|
-
throw new ChartError('pct-invalid', message);
|
|
53
|
-
}
|
|
54
|
-
function badKind(kind) {
|
|
55
|
-
throw new ChartError('kind-unknown', 'charts: 未知图表 kind:' + kind);
|
|
56
|
-
}
|
|
57
|
-
/* ── 小件 ─────────────────────────────────────────────────────────────── */
|
|
58
|
-
function esc(value) {
|
|
59
|
-
return escapeHtml(value);
|
|
60
|
-
}
|
|
61
|
-
function jsStr(value) {
|
|
62
|
-
return JSON.stringify(value);
|
|
63
|
-
}
|
|
64
|
-
function isPlainObject(value) {
|
|
65
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
66
|
-
}
|
|
67
|
-
function isNum(value) {
|
|
68
|
-
return typeof value === 'number' && isFinite(value);
|
|
69
|
-
}
|
|
70
|
-
function numOr(value, fallback) {
|
|
71
|
-
return isNum(value) ? value : fallback;
|
|
72
|
-
}
|
|
73
|
-
function round2(value) {
|
|
74
|
-
return Math.round(value * 100) / 100;
|
|
75
|
-
}
|
|
76
|
-
/** 数值文本(旧 `_fmt`:函数格式化器优先,否则 `String(值)`)。 */
|
|
77
|
-
function fmtValue(value, format) {
|
|
78
|
-
if (typeof format === 'function')
|
|
79
|
-
return String(format(value));
|
|
80
|
-
return String(round2(value));
|
|
81
|
-
}
|
|
82
|
-
/** 坐标文本(旧版 `toFixed(1)` 口径)。 */
|
|
83
|
-
function n1(value) {
|
|
84
|
-
return value.toFixed(1);
|
|
85
|
-
}
|
|
86
|
-
/** 缺省单序列色(旧版 `var(--blue,#007aff)` 带 fallback,§3.5 语义色)。 */
|
|
87
|
-
const DEFAULT_SERIES_COLOR = 'var(--blue,#007aff)';
|
|
88
|
-
const DEFAULT_MARK_COLOR = '#ff9500';
|
|
89
|
-
const DEFAULT_REGRESSION_COLOR = '#ff3b30';
|
|
90
|
-
const ANOMALY_COLOR = CHART_PALETTE[3];
|
|
91
|
-
const UP_COLOR = 'var(--ok,#34c759)';
|
|
92
|
-
const DOWN_COLOR = CHART_PALETTE[3];
|
|
93
|
-
const GRID_COLOR = 'var(--line,#d2d2d7)';
|
|
94
|
-
const MUTED_COLOR = 'var(--fg3,#86868b)';
|
|
95
|
-
const DOT_FACE_COLOR = 'var(--card,#ffffff)';
|
|
96
|
-
const DOT_DEFAULT_PX = 7;
|
|
97
|
-
const SCATTER_DOT_DEFAULT_PX = 9;
|
|
98
|
-
/** 折线数据点抽稀上限(#424):`showDots` **未显式给**且点数超过它时不逐点画圆——
|
|
99
|
-
* 逐点画必重叠成一团(90 点 / 580 单位宽 → 点距 6.1,圆径 7)。显式 `showDots` 一律照办。 */
|
|
100
|
-
const DOT_STRIDE_MAX = 30;
|
|
101
|
-
/** scatter 缺省 Y 轴刻度条数(旧 `charts.js:854` `yTicks:4`;冻结 `ScatterChartOptions` 无该字段,
|
|
102
|
-
* 故按**缺省行为**渲染 4 条、不新增可关闭开关——登记为契约缺口,归后续票,R2-G1 裁定)。 */
|
|
103
|
-
const SCATTER_Y_TICKS = 4;
|
|
104
|
-
const EMPTY_ICON = '📊';
|
|
105
|
-
const EMPTY_HINT = '有记录后自动生成图表';
|
|
106
|
-
const DONUT_ZERO_HINT = '合计为零, 无环形数据';
|
|
107
|
-
const OWN_SCALE_NOTE = '各指标独立刻度';
|
|
108
|
-
/** 水平网格线**无 Y 轴标注时**的条数(#512:有标注时改按标注条数画,见 `gridSvg`)。 */
|
|
109
|
-
const GRID_LINES = 3;
|
|
110
|
-
/** 稳定 32 位散列(FNV-1a)——渐变 `<linearGradient id>` 由**渐变参数**派生,
|
|
111
|
-
* 同一输入恒得同一 id、不同参数得不同 id,且**不跨调用共享可变状态**(R1-A1/FX-78-A1b-11)。 */
|
|
112
|
-
function hash32(text) {
|
|
113
|
-
let h = 0x811c9dc5;
|
|
114
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
115
|
-
h ^= text.charCodeAt(i);
|
|
116
|
-
h = Math.imul(h, 0x01000193) >>> 0;
|
|
117
|
-
}
|
|
118
|
-
return h.toString(36);
|
|
119
|
-
}
|
|
120
|
-
/* ── 输入校验(`CHART_STRUCTURE_RULE = 'throw'`) ──────────────────────── */
|
|
121
|
-
function requireObject(value, field) {
|
|
122
|
-
if (!isPlainObject(value))
|
|
123
|
-
badStructure(field + ' 必须是对象');
|
|
124
|
-
return value;
|
|
125
|
-
}
|
|
126
|
-
/** 统一数据形状校验:`items` 非数组/缺 `label`/`value` 非法 → `structure-invalid`。
|
|
127
|
-
* `mode = 'values'` 用于 bar 的 stacked/grouped 多值路径:`values` 是多值真相源,
|
|
128
|
-
* 但 `value` **不豁免**——冻结类型 `ChartItem.value` 必填,且 `docs/base-paint-contract.md:799`
|
|
129
|
-
* 要求「`value` 非法(非数且非 null)→ 抛 `structure-invalid`」;旧 `_barMulti` 的宽松行为
|
|
130
|
-
* (静默置 0)不复刻(R1-A2/FX-78-A1b-12,记账见 a1-evidence.md)。 */
|
|
131
|
-
function normalizeItems(raw, kind, allowNull, mode = 'value') {
|
|
132
|
-
if (!Array.isArray(raw)) {
|
|
133
|
-
badStructure('charts.' + kind + ': items 必须是数组, 收到 ' + (raw === null ? 'null' : typeof raw));
|
|
134
|
-
}
|
|
135
|
-
const list = raw;
|
|
136
|
-
return list.map((entry, i) => {
|
|
137
|
-
const field = 'charts.' + kind + ': items[' + i + ']';
|
|
138
|
-
const item = requireObject(entry, field);
|
|
139
|
-
if (typeof item.label !== 'string' || item.label.trim() === '')
|
|
140
|
-
badStructure(field + '.label 缺失');
|
|
141
|
-
const value = item.value;
|
|
142
|
-
let values;
|
|
143
|
-
if (mode === 'values') {
|
|
144
|
-
if (!isNum(value)) {
|
|
145
|
-
badStructure(field + '.value 无效(缺省/非数字): ' + JSON.stringify(value === undefined ? null : value));
|
|
146
|
-
}
|
|
147
|
-
if (!Array.isArray(item.values) || item.values.length === 0)
|
|
148
|
-
badStructure(field + '.values 必须是非空数组');
|
|
149
|
-
values = item.values.map((v, j) => {
|
|
150
|
-
if (!isNum(v))
|
|
151
|
-
badStructure(field + '.values[' + j + '] 无效(缺省/非数字)');
|
|
152
|
-
return v;
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
if (!(value === null && allowNull) && !isNum(value)) {
|
|
157
|
-
badStructure(field + '.value 无效(缺省/非数字): ' + JSON.stringify(value === undefined ? null : value));
|
|
158
|
-
}
|
|
159
|
-
if (item.values !== undefined) {
|
|
160
|
-
if (!Array.isArray(item.values) || item.values.length === 0)
|
|
161
|
-
badStructure(field + '.values 必须是非空数组');
|
|
162
|
-
values = item.values.map((v, j) => {
|
|
163
|
-
if (!isNum(v))
|
|
164
|
-
badStructure(field + '.values[' + j + '] 无效(缺省/非数字)');
|
|
165
|
-
return v;
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
const color = typeof item.color === 'string' && item.color !== '' ? item.color : undefined;
|
|
170
|
-
const out = {
|
|
171
|
-
label: item.label,
|
|
172
|
-
value: mode === 'values' ? value : value === null ? null : value,
|
|
173
|
-
...(color === undefined ? {} : { color }),
|
|
174
|
-
...(values === undefined ? {} : { values }),
|
|
175
|
-
...(item.anomaly === true ? { anomaly: true } : {}),
|
|
176
|
-
};
|
|
177
|
-
return out;
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
/** `pct` 非数 → `pct-invalid`;超界统一为 0~100(旧 §6.5 逐字行为)。 */
|
|
181
|
-
function normalizePct(raw, kind) {
|
|
182
|
-
if (!isNum(raw))
|
|
183
|
-
badPct('charts.' + kind + ': pct 无效: ' + String(raw));
|
|
184
|
-
return Math.max(0, Math.min(100, raw));
|
|
185
|
-
}
|
|
186
|
-
function resolveCommon(raw, def) {
|
|
187
|
-
const o = isPlainObject(raw) ? raw : undefined;
|
|
188
|
-
const labels = o === undefined ? undefined : o.labels;
|
|
189
|
-
const showValues = o === undefined ? undefined : o.showValues;
|
|
190
|
-
return {
|
|
191
|
-
width: numOr(o === undefined ? undefined : o.width, def.width),
|
|
192
|
-
height: numOr(o === undefined ? undefined : o.height, def.height),
|
|
193
|
-
compact: o !== undefined && o.compact === true,
|
|
194
|
-
animation: o === undefined || o.animation !== false,
|
|
195
|
-
color: o !== undefined && typeof o.color === 'string' && o.color !== '' ? o.color : undefined,
|
|
196
|
-
colors: o !== undefined && Array.isArray(o.colors)
|
|
197
|
-
? o.colors.filter((c) => typeof c === 'string' && c !== '')
|
|
198
|
-
: undefined,
|
|
199
|
-
format: o !== undefined && typeof o.format === 'function' ? o.format : undefined,
|
|
200
|
-
labels: labels === 'all' || labels === 'none' || labels === 'select' || labels === 'edge' ? labels : def.labels,
|
|
201
|
-
showValues: showValues === true || showValues === false || showValues === 'edge' || showValues === 'last' ? showValues : def.showValues,
|
|
202
|
-
labelRotate: numOr(o === undefined ? undefined : o.labelRotate, 0),
|
|
203
|
-
yMin: o !== undefined && isNum(o.yMin) ? o.yMin : undefined,
|
|
204
|
-
yMax: o !== undefined && isNum(o.yMax) ? o.yMax : undefined,
|
|
205
|
-
grid: o === undefined || o.grid !== false,
|
|
206
|
-
actionId: o !== undefined && typeof o.actionId === 'string' && o.actionId !== '' ? o.actionId : undefined,
|
|
207
|
-
tooltip: o !== undefined && o.tooltip === true,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
function commonClasses(common, extra) {
|
|
211
|
-
const cls = [STYLE_PREFIX + 'charts'];
|
|
212
|
-
if (extra !== undefined)
|
|
213
|
-
cls.push(extra);
|
|
214
|
-
if (common.animation)
|
|
215
|
-
cls.push(STYLE_PREFIX + 'charts-anim');
|
|
216
|
-
return cls.join(' ');
|
|
217
|
-
}
|
|
218
|
-
function containerOpen(kind, common, extraClass) {
|
|
219
|
-
let out = '<div class="' + commonClasses(common, extraClass) + '" data-chart-kind="' + kind + '"';
|
|
220
|
-
if (common.actionId !== undefined)
|
|
221
|
-
out += ' ' + ACTION_ID_ATTR + '="' + esc(common.actionId) + '"';
|
|
222
|
-
return out + '>';
|
|
223
|
-
}
|
|
224
|
-
function actionAttrs(common, index) {
|
|
225
|
-
let out = '';
|
|
226
|
-
if (common.actionId !== undefined)
|
|
227
|
-
out += ' ' + ACTION_ID_ATTR + '="' + esc(common.actionId) + '"';
|
|
228
|
-
if (index !== undefined)
|
|
229
|
-
out += ' data-i="' + index + '"';
|
|
230
|
-
return out;
|
|
231
|
-
}
|
|
232
|
-
/** `tooltip: true` 时写入 `data-tip`;文本**惰性**求值(未开 tooltip 不得白调 `format`)。 */
|
|
233
|
-
function tipAttrs(common, makeText) {
|
|
234
|
-
return common.tooltip ? ' data-tip="' + esc(makeText()) + '"' : '';
|
|
235
|
-
}
|
|
236
|
-
/** 八个 kind **一律** `preserveAspectRatio="xMidYMid meet"`(等比,不拉伸文字)。
|
|
237
|
-
*
|
|
238
|
-
* #507(2026-09-15 公共层视觉机制返工)撤掉了折线/组合/散点三族的 `none` 满宽拉伸:
|
|
239
|
-
* 这三族当年取 `none` 的**唯一理由是**移动端 CSS 把 svg 盒高钉成 `lineHeightMobilePx`(150px),
|
|
240
|
-
* 非等比压低后 `meet` 会等比缩到 228.6px 宽、左右各留 ~73px 空白(R2-N9)。那条钉高在
|
|
241
|
-
* #424 返工时就撤了(改成 `height:auto` 按 viewBox 长宽比派生高度,见 `chartsCss` 的 ≤720px 段),
|
|
242
|
-
* **盒宽高比自此恒等于 viewBox 长宽比** ⇒ `none` 与 `meet` 逐像素同解,`none` 只剩两个隐患:
|
|
243
|
-
* ① 将来任一处把盒高钉回固定 px,图内文字立刻被横向抻宽(1000px 宽容器下 1.6×,字脸变扁);
|
|
244
|
-
* ② 读代码的人会以为本族真的在拉伸。
|
|
245
|
-
* **本条只改属性,不改任何坐标**:坐标唯一性走 `CHART_COORD_RULE = 'viewBox-only'`(映射函数
|
|
246
|
-
* 按 `common.width/height` 算,`meet` 与 `none` 下同一份坐标同解)。描边的
|
|
247
|
-
* `vector-effect="non-scaling-stroke"` 照旧保留(等比缩放下同样有用:描边不随缩放变粗)。 */
|
|
248
|
-
function svgOpen(common, extra) {
|
|
249
|
-
return '<svg class="' + STYLE_PREFIX + 'charts-svg' + (extra === undefined ? '' : ' ' + extra) + '"'
|
|
250
|
-
+ ' viewBox="0 0 ' + n1(common.width) + ' ' + n1(common.height) + '"'
|
|
251
|
-
+ ' preserveAspectRatio="xMidYMid meet" role="img" focusable="false">';
|
|
252
|
-
}
|
|
253
|
-
/** 空态联动(`CHART_EMPTY_RULE = 'emptyState'`):`empty:true`/`points:0`,不抛错。 */
|
|
254
|
-
function emptyOutput(kind, raw, hint) {
|
|
255
|
-
const o = isPlainObject(raw) ? raw : undefined;
|
|
256
|
-
const text = o !== undefined && typeof o.emptyText === 'string' && o.emptyText !== ''
|
|
257
|
-
? o.emptyText
|
|
258
|
-
: STATUS_DEFAULT_TEXT.empty;
|
|
259
|
-
const common = resolveCommon(raw, { width: 1, height: 1, labels: 'none', showValues: false });
|
|
260
|
-
const html = '<div class="' + commonClasses(common, STYLE_PREFIX + 'charts-' + kind + ' ' + STYLE_PREFIX + 'charts-empty')
|
|
261
|
-
+ '" data-chart-kind="' + kind + '" data-chart-empty="1">'
|
|
262
|
-
+ renderEmptyState({ icon: EMPTY_ICON, text, hint: hint === undefined ? EMPTY_HINT : hint })
|
|
263
|
-
+ '</div>';
|
|
264
|
-
return { kind, html, empty: true, points: 0 };
|
|
265
|
-
}
|
|
266
|
-
function makeFrame(common, insets) {
|
|
267
|
-
const x0 = insets.left;
|
|
268
|
-
const x1 = Math.max(x0 + 1, common.width - insets.right);
|
|
269
|
-
const y0 = insets.top;
|
|
270
|
-
const y1 = Math.max(y0 + 1, common.height - insets.bottom);
|
|
271
|
-
return { x0, x1, y0, y1, w: x1 - x0, h: y1 - y0 };
|
|
272
|
-
}
|
|
273
|
-
/** 留白进 viewBox(容器零 padding):左留白含刻度文字宽度。
|
|
274
|
-
*
|
|
275
|
-
* `minLeft`/`minBottom`(#424 返工):折线的留白必须能容下**移动端**那一档字号——媒体查询把
|
|
276
|
-
* 折线文字放大到 17–18 用户单位(见 `chartsCss` 的 ≤720px 段与 `LINE_TEXT_MOBILE`),留白却是
|
|
277
|
-
* 双端共用的用户单位 → 只按桌面 9.5–10.5 估会让 390px 下的「70.5kg」顶出 viewBox 左沿。 */
|
|
278
|
-
function insetsFor(common, opts) {
|
|
279
|
-
const padX = common.compact ? 6 : 14;
|
|
280
|
-
const padY = common.compact ? 4 : 8;
|
|
281
|
-
return {
|
|
282
|
-
left: Math.max(padX + opts.tickWidth, opts.minLeft ?? 0),
|
|
283
|
-
/* t512 WaveC:右留白缺省只是 `padX`,横轴标签以 `text-anchor:middle` 居中落在绘图区左右沿上,
|
|
284
|
-
* 首尾两条各有半个字宽探出绘图区 —— 左侧被 `minLeft`(按移动端字号估的刻度宽)顺带护住,
|
|
285
|
-
* 右侧无此保护,390px 下 9 条标签的末条顶出 viewBox 右沿约 6px。调用方按需传 `minRight`。 */
|
|
286
|
-
right: Math.max(padX, opts.minRight ?? 0),
|
|
287
|
-
top: Math.max(padY + (common.showValues === false ? 0 : opts.valueHeight), opts.minTop ?? 0),
|
|
288
|
-
bottom: Math.max(padY + opts.labelHeight, opts.minBottom ?? 0),
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
/** #424 返工:移动端(≤720px)折线的字号(**用户单位**)。
|
|
292
|
-
* viewBox 580×260 在 390px 手机上按宽度缩到 scale≈0.57(`width:100%` + 按 viewBox 比例算高,
|
|
293
|
-
* 见 `chartsCss` 的 ≤720px 段)——桌面档 9.5–10.5 单位实渲只剩 5.4px,肉眼不可读。
|
|
294
|
-
* 这里按 1/0.57≈1.75 倍提字号,实渲回到 ≈11.3px(390px 档)。
|
|
295
|
-
*
|
|
296
|
-
* t512 收尾(复审 P1):这一档原取 20 单位(512 档盒宽 450 → 实渲 15.52px)。复审表里那句「512 档刻度
|
|
297
|
-
* **实渲** 20px = 正文 1.6 倍」是**读错了量纲** —— 同一列里 820 档写 12.4、1000/1440 档写 10.8,逐值
|
|
298
|
-
* 正是本文件的**用户单位**常量;实渲像素 = 用户单位 × 盒宽 ÷ 580,20 单位在 512 档实渲 15.52px,
|
|
299
|
-
* 约等于正文 12–13px 的 1.2 倍。复审要的实渲 14–15px 里只有 15.0px 这一点能落:往下压到 15 单位
|
|
300
|
-
* 就只剩 11.64px,比正文还小,并破 #512 的「四档实渲 ≥15px」断言(`test/charts.test.mjs` 的 H.t512)。
|
|
301
|
-
* 故取 15 ÷ (450/580) = 19.33 → **19.4 单位**(512 档实渲 15.05px,留 0.4% 浮点余量,贴住那条下沿)。
|
|
302
|
-
* 要真压到 14px,得先改 #512 的 15px 下沿(契约变更,另开票)。
|
|
303
|
-
* 同一份数字既进 `chartsCss` 的媒体查询,也用来估留白(留白双端共用 → 取更大的这一档)。 */
|
|
304
|
-
const LINE_TEXT_MOBILE = { tick: 19.4, xlabel: 19.4, value: 19.4, last: 19.4, mark: 19.4 };
|
|
305
|
-
/** t512:折线族字号的**档位表**(用户单位)。
|
|
306
|
-
*
|
|
307
|
-
* svg 文本的 `font-size` 写在**用户单位**上,会被 viewBox 等比缩放(`preserveAspectRatio="xMidYMid meet"`
|
|
308
|
-
* + `width:100%;height:auto` → 两轴同倍),实渲像素 = 用户单位 × 缩放比,而缩放比 = svg 盒宽 ÷ 580
|
|
309
|
-
* (`LINE_DEFAULT_WIDTH`)——盒宽随视口变,所以**同一个用户单位在不同视口实渲出不同像素**。
|
|
310
|
-
* 只留 ≤720px 移动档(当时 20 单位,t512 收尾收到 19.4)那一档、721px 起落回桌面档 9.5/10 单位,就会在这条断点上**非单调地跳**:
|
|
311
|
-
* 720px 档盒宽 652 → 实渲 22.5px,721px 档盒宽 651 只剩 10.7px,再往宽走才慢慢回到 15px。
|
|
312
|
-
*
|
|
313
|
-
* 逐档补偿的算式:**用户单位 = 目标像素 ÷ 该档实测缩放比**。
|
|
314
|
-
* 缩放比取自 `docs/base/base-render/` 下 t507 证据的 CDP 四档实测(盒宽 ÷ 580):
|
|
315
|
-
* 512px → 盒 450×201.72 → 0.7759;820px → 750×336.20 → 1.2931;1000px/1440px → 930×416.89 → 1.6034
|
|
316
|
-
* (930 是卡片宽度上限,故 1000px 与 1440px 同档、实渲同值)。
|
|
317
|
-
*
|
|
318
|
-
* 三档结果(`chartsCss` 的 ≤720px/721–875px/≥876px 三段逐字用这三个数):
|
|
319
|
-
* 19.4 单位 → 15.05px(512px,t512 收尾前是 20 单位 → 15.5px);12.4 单位 → 16.0px(820px);
|
|
320
|
-
* 10.8 单位 → 17.3px(1000px/1440px)—— 四档**单调不降且 ≥15px**,不再随盒子宽度来回跳。
|
|
321
|
-
*
|
|
322
|
-
* **不变式(别越)**:任何档位的用户单位都不得超过 `LINE_TEXT_MOBILE.tick`(19.4)。
|
|
323
|
-
* `insetsFor` 的左留白是按**移动档那一档(19.4 单位)**估的(`charts.ts:843`,留白是双端共用的用户单位),
|
|
324
|
-
* 抬高它会让「70.5kg」这类刻度文字在**每个**视口都顶出 viewBox 左沿。故本表只抬中间档与宽档。
|
|
325
|
-
*
|
|
326
|
-
* **已知余量(如实记账)**:媒体查询只能按**视口**分档,而缩放比按**盒宽**走,同一档内仍是变化的
|
|
327
|
-
* —— 721–875px 档的下沿(721px)实渲 14.0px、上沿(875px)17.2px;这是视口分档的固有锯齿,
|
|
328
|
-
* 比改前同一段的 10.7–13.9px 已经抬高,要再抹平得按容器宽分档(另一票的事)。 */
|
|
329
|
-
const LINE_TEXT_WIDE_UNITS = 12.4;
|
|
330
|
-
const LINE_TEXT_FULL_UNITS = 10.8;
|
|
331
|
-
/** ≥876px 档的媒体查询下沿:由 `LINE_TEXT_FULL_UNITS` 的 ≥15px 要求**反解**得到——
|
|
332
|
-
* 缩放比须 ≤ 15 ÷ 10.8 = 1.3889 → 盒宽 ≤ 1.3889 × 580 = 805.6 → 视口 ≤ 875.6,取下沿 876。 */
|
|
333
|
-
const LINE_TEXT_WIDE_MAX_PX = 875;
|
|
334
|
-
/** 折线 X 标签行相对绘图区底边(`frame.y1`)的间距(用户单位)。最低那条刻度文字已抬到轴线上方
|
|
335
|
-
* (见 `ticksSvg` 的 `labelDy`),其文字盒下沿到 y1 附近;X 标签(19.4 单位)文字盒上沿顶在
|
|
336
|
-
* y1+gap−21 附近 —— gap ≥ 33 才不相撞(本条按 20 单位算出的下限,t512 收尾改小后仍富余;
|
|
337
|
-
* 实测 gap 34 时 390px 下余 ≈4.5 用户单位)。 */
|
|
338
|
-
const LINE_LABEL_GAP = 34;
|
|
339
|
-
/** 折线绘图区底留白下限:容下 `LINE_LABEL_GAP` + X 标签降部(19.4×0.25 = 4.9)。 */
|
|
340
|
-
const LINE_BOTTOM_MIN = 40;
|
|
341
|
-
/** 末值标签相对末点的抬升(用户单位):文字盒高随字号走(移动端 19.4 单位那一档),抬 6 单位时
|
|
342
|
-
* 390px 下标签盒底与数据线只余 0.4px、15 个折线顶点落在盒内 —— 按 0.7×字号 抬开(0.7×19.4 = 13.6,
|
|
343
|
-
* 取值 14 仍在 0.7× 之上,改字号后一字未动)。 */
|
|
344
|
-
const LINE_LAST_LABEL_LIFT = 14;
|
|
345
|
-
/** t512(最后一公里)· 折线族顶上那两条硬账。
|
|
346
|
-
*
|
|
347
|
-
* ① **顶端刻度标注得在框里**:刻度文字的落点是 `y = ty + labelDy`(基线),实渲文字盒高约 1.33em、
|
|
348
|
-
* 基线以上约占 1.04em —— 顶端那条刻度(`i = count−1`,`ty = frame.y0`)的盒子因此探出 viewBox
|
|
349
|
-
* 上沿被裁(复审实测 1000/1440 档 `relTop = −0.36px`、512 档 −7.47px)。留白旧口径只认
|
|
350
|
-
* `padY + valueHeight`(`showValues:false` 时仅 8 单位),而字号在 ≤720px 档是 19.4 单位(原 20)
|
|
351
|
-
* ⇒ 需要的上沿就是那 1.04em。留白是双端共用的**用户单位**,故按**最大那一档字号**
|
|
352
|
-
* (`LINE_TEXT_MOBILE.tick = 19.4`)算:ceil(1.04 × 19.4) = ceil(20.18) = 21 单位
|
|
353
|
-
* (20 单位时同为 21),四档一律够。
|
|
354
|
-
* ② **峰值与顶端刻度线的余量**:派生域旧口径两端各外扩 6%(`domainOf`)⇒ 峰值只离顶端刻度线
|
|
355
|
-
* 5.36% 的绘图区高,顶端那条线读成「标题下划线」(复审 §三-2:图高 416.89px、顶线在 12.83px、
|
|
356
|
-
* 512 档峰值墨顶离顶线只剩 6.13px)。`LINE_PEAK_HEADROOM` 把**上端**补到绘图区高的 10%
|
|
357
|
-
* (复审给的判据是 8–12%),下端 6% 不动。显式 `yMax` 是调用方的语义(「画到这儿」),不补。 */
|
|
358
|
-
const LINE_TICK_TOP_MIN = 21;
|
|
359
|
-
const LINE_PEAK_HEADROOM = 0.1;
|
|
360
|
-
/** 文字宽度估值(用户单位):ASCII ≈0.62em、CJK 全角 ≈1em。刻度留白按它算——留白必须容下
|
|
361
|
-
* **移动端那一档字号**,否则 390px 下「70.5kg」会顶出 viewBox 左沿(`overflow:visible` 也救不了,
|
|
362
|
-
* 卡片会裁)。 */
|
|
363
|
-
function textWidthUnits(text, size) {
|
|
364
|
-
let em = 0;
|
|
365
|
-
for (const ch of text)
|
|
366
|
-
em += (ch.codePointAt(0) ?? 0) > 0x2e7f ? 1 : 0.62;
|
|
367
|
-
return em * size;
|
|
368
|
-
}
|
|
369
|
-
function xAt(frame, index, count) {
|
|
370
|
-
return count <= 1 ? frame.x0 + frame.w / 2 : frame.x0 + (frame.w * index) / (count - 1);
|
|
371
|
-
}
|
|
372
|
-
function yAt(frame, value, lo, hi) {
|
|
373
|
-
const span = hi - lo === 0 ? 1 : hi - lo;
|
|
374
|
-
return frame.y1 - ((value - lo) / span) * frame.h;
|
|
375
|
-
}
|
|
376
|
-
/** 共享 Y 域:显式 `yMin`/`yMax` 优先,否则数据域各外扩 `padRatio`。
|
|
377
|
-
* 折线/散点旧版外扩 6%(`charts.js:428-432`/`856-859`);**柱族与 combo 旧版无外扩**
|
|
378
|
-
* (bar 域 = `min(v,0)..max(v)`,`charts.js:371-373`;combo 域 = `0..max(柱,线)`,`charts.js:742-753`)
|
|
379
|
-
* → 这两族传 `0`,否则零基线悬空、最高柱不满高(R2-N1)。 */
|
|
380
|
-
function domainOf(values, yMin, yMax, includeZero, padRatio = 0.06) {
|
|
381
|
-
let lo = Infinity;
|
|
382
|
-
let hi = -Infinity;
|
|
383
|
-
for (const v of values) {
|
|
384
|
-
if (v < lo)
|
|
385
|
-
lo = v;
|
|
386
|
-
if (v > hi)
|
|
387
|
-
hi = v;
|
|
388
|
-
}
|
|
389
|
-
if (lo === Infinity) {
|
|
390
|
-
lo = 0;
|
|
391
|
-
hi = 1;
|
|
392
|
-
}
|
|
393
|
-
if (includeZero) {
|
|
394
|
-
if (lo > 0)
|
|
395
|
-
lo = 0;
|
|
396
|
-
if (hi < 0)
|
|
397
|
-
hi = 0;
|
|
398
|
-
}
|
|
399
|
-
if (hi === lo)
|
|
400
|
-
hi = lo + 1;
|
|
401
|
-
const pad = (hi - lo) * padRatio;
|
|
402
|
-
if (yMin === undefined)
|
|
403
|
-
lo -= pad;
|
|
404
|
-
else
|
|
405
|
-
lo = yMin;
|
|
406
|
-
if (yMax === undefined)
|
|
407
|
-
hi += pad;
|
|
408
|
-
else
|
|
409
|
-
hi = yMax;
|
|
410
|
-
if (hi === lo)
|
|
411
|
-
hi = lo + 1;
|
|
412
|
-
return [lo, hi];
|
|
413
|
-
}
|
|
414
|
-
/** `yTicks` 统一为 2-6(旧 `charts.js:498`);`false`/非数 → 0 条。 */
|
|
415
|
-
function tickCount(value) {
|
|
416
|
-
if (!isNum(value))
|
|
417
|
-
return 0;
|
|
418
|
-
return Math.max(2, Math.min(6, Math.round(value)));
|
|
419
|
-
}
|
|
420
|
-
/** t512:折线族的**共享派生域** —— `domainOf` 之上再保一条峰值余量(见 `LINE_PEAK_HEADROOM`)。
|
|
421
|
-
*
|
|
422
|
-
* 只动**派生**路径:显式 `yMin`/`yMax` 是调用方的语义(域的边界=「画到这儿」),原样返回。
|
|
423
|
-
* 上端的求法:解 `(hi′ − max) / (hi′ − lo) = r` → `hi′ = (max − r·lo) / (1 − r)`;取下端不动
|
|
424
|
-
* (`lo` 仍是 6% 外扩后的值),故上端比下端厚,峰值不会再压在顶端那条刻度线上。
|
|
425
|
-
* 单值/全等数据(`domainOf` 内部已把 `hi` 抬到 `lo + 1`)时 `want` 不会超过原 `hi`,`Math.max` 兜住。 */
|
|
426
|
-
function lineDomainOf(values, yMin, yMax) {
|
|
427
|
-
const range = domainOf(values, yMin, yMax, false);
|
|
428
|
-
if (yMax !== undefined)
|
|
429
|
-
return range;
|
|
430
|
-
let max = -Infinity;
|
|
431
|
-
for (const v of values)
|
|
432
|
-
if (v > max)
|
|
433
|
-
max = v;
|
|
434
|
-
if (max === -Infinity)
|
|
435
|
-
return range;
|
|
436
|
-
const want = (max - LINE_PEAK_HEADROOM * range[0]) / (1 - LINE_PEAK_HEADROOM);
|
|
437
|
-
return [range[0], Math.max(range[1], want)];
|
|
438
|
-
}
|
|
439
|
-
/* ── 共享 SVG 片段 ────────────────────────────────────────────────────── */
|
|
440
|
-
function gridSvg(frame, count = 0) {
|
|
441
|
-
/** 对齐口径(#512):线条数取**实际标注条数**,位置与 `ticksSvg` 同一条均匀标度公式
|
|
442
|
-
* (`y1 - h*i/(n-1)` ⇔ `i` 刻度值映射到 `yAt`),故每条线都压着自己那条刻度。
|
|
443
|
-
* `count < 2`(`yTicks:false`/非数 → `tickCount` 给 0)时回退旧口径 `GRID_LINES` 三条:
|
|
444
|
-
* bar/combo 与未开 `yTicks` 的 line 本就无标注,不得因此变成空白图。 */
|
|
445
|
-
const lines = count >= 2 ? count : GRID_LINES;
|
|
446
|
-
let out = '';
|
|
447
|
-
for (let g = 0; g < lines; g += 1) {
|
|
448
|
-
const gy = frame.y1 - (frame.h * g) / (lines - 1);
|
|
449
|
-
out += '<line class="' + STYLE_PREFIX + 'charts-grid" x1="' + n1(frame.x0) + '" y1="' + n1(gy)
|
|
450
|
-
+ '" x2="' + n1(frame.x1) + '" y2="' + n1(gy) + '" stroke="' + GRID_COLOR
|
|
451
|
-
+ '" stroke-width="1" vector-effect="non-scaling-stroke"/>';
|
|
452
|
-
}
|
|
453
|
-
return out;
|
|
454
|
-
}
|
|
455
|
-
function ticksSvg(frame, lo, hi, count, format) {
|
|
456
|
-
if (count === 0)
|
|
457
|
-
return '';
|
|
458
|
-
let out = '';
|
|
459
|
-
for (let i = 0; i < count; i += 1) {
|
|
460
|
-
const tv = lo + ((hi - lo) * i) / (count - 1);
|
|
461
|
-
const ty = yAt(frame, tv, lo, hi);
|
|
462
|
-
/* #424 返工:最低那条刻度与绘图区底边同高(`lo` 就是下界),它的文字盒会探进 X 标签那一行。
|
|
463
|
-
* 移动端字号提到 20 单位(t512 收尾收到 19.4)后两者只余 0.3px(实测)——最低那条改到轴线上方 1 单位起基线,
|
|
464
|
-
* 其余刻度保持旧口径 `ty + 3`(旧 `charts.js` 字面值不动)。 */
|
|
465
|
-
const labelDy = i === 0 ? -1 : 3;
|
|
466
|
-
out += '<line class="' + STYLE_PREFIX + 'charts-ytick" x1="' + n1(frame.x0 - 5) + '" y1="' + n1(ty)
|
|
467
|
-
+ '" x2="' + n1(frame.x0) + '" y2="' + n1(ty) + '" stroke="' + GRID_COLOR
|
|
468
|
-
+ '" stroke-width="1" vector-effect="non-scaling-stroke"/>'
|
|
469
|
-
+ '<text class="' + STYLE_PREFIX + 'charts-tick" x="' + n1(frame.x0 - 7) + '" y="' + n1(ty + labelDy)
|
|
470
|
-
+ '" text-anchor="end" fill="' + MUTED_COLOR + '">' + esc(fmtValue(round2(tv), format)) + '</text>';
|
|
471
|
-
}
|
|
472
|
-
return out;
|
|
473
|
-
}
|
|
474
|
-
/** X 轴标签集合:`'all'` 全量/`'edge'` 首尾/`'select'` 首+峰值+尾(line 口径)
|
|
475
|
-
* /`'none'` 无。`select='edge'` 时 `'select'` 退化为首尾——**bar 口径**:
|
|
476
|
-
* 旧 bar 的 `'select'` 只显示首尾(`charts.js:385-388`),与 line 的「首+峰值+尾」不同(R2-N7)。
|
|
477
|
-
*
|
|
478
|
-
* #424 补一条下限(只对 line 的 `'select'`):**峰值落在端点时首+峰+尾去重后只剩 2 个标签**
|
|
479
|
-
* (单调下降的体重曲线必然如此,峰值就是首日),横轴中段又变成没有时间参照。故去重后不足 3 个、
|
|
480
|
-
* 且点数 ≥3 时,补一个**离首点最远的中间点**——仍满足「首+峰+尾」,顺带给出中段参照。
|
|
481
|
-
*
|
|
482
|
-
* #567 追加 `every`(只对 `'all'`):每 k 点取一枚(含末点),给「点全画、标签抽稀」用;
|
|
483
|
-
* 非 `'all'` 或非法 k(非 ≥2 有限数)时忽略(默认行为不变)。 */
|
|
484
|
-
function labelIndexes(mode, items, select = 'peak', every) {
|
|
485
|
-
const n = items.length;
|
|
486
|
-
if (mode === 'none' || n === 0)
|
|
487
|
-
return [];
|
|
488
|
-
if (mode === 'all') {
|
|
489
|
-
if (every !== undefined && Number.isFinite(every) && Math.floor(every) >= 2) {
|
|
490
|
-
const k = Math.floor(every);
|
|
491
|
-
const picked = [];
|
|
492
|
-
for (let i = 0; i < n; i += k)
|
|
493
|
-
picked.push(i);
|
|
494
|
-
if (picked[picked.length - 1] !== n - 1)
|
|
495
|
-
picked.push(n - 1);
|
|
496
|
-
return picked;
|
|
497
|
-
}
|
|
498
|
-
return items.map((_, i) => i);
|
|
499
|
-
}
|
|
500
|
-
if (mode === 'edge' || (mode === 'select' && select === 'edge'))
|
|
501
|
-
return n === 1 ? [0] : [0, n - 1];
|
|
502
|
-
let peak = 0;
|
|
503
|
-
let peakValue = -Infinity;
|
|
504
|
-
items.forEach((item, i) => {
|
|
505
|
-
if (item.value !== null && item.value > peakValue) {
|
|
506
|
-
peakValue = item.value;
|
|
507
|
-
peak = i;
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
const picked = Array.from(new Set([0, peak, n - 1])).sort((a, b) => a - b);
|
|
511
|
-
if (picked.length < 3 && n >= 3) {
|
|
512
|
-
const mid = Math.round((n - 1) / 2);
|
|
513
|
-
const extra = [mid, n - 1 - mid, 1, n - 2].find((i) => i > 0 && i < n - 1 && !picked.includes(i));
|
|
514
|
-
if (extra !== undefined)
|
|
515
|
-
picked.splice(1, 0, extra);
|
|
516
|
-
}
|
|
517
|
-
return picked;
|
|
518
|
-
}
|
|
519
|
-
/* t-chartfix:X 标签的 x 标度缺省与折线点同一 `xAt` 点标度;柱族(bar/combo)
|
|
520
|
-
* 的柱列中心走 band 标度 `x0 + slot*(i+0.5)`——点标度会把首尾标签钉在绘图区
|
|
521
|
-
* 左右边缘(3 柱时偏差 48.7 单位),与柱错位。调用方按自家几何传入。 */
|
|
522
|
-
function xLabelsSvg(common, frame, items, select = 'peak', xOf = (i, n) => xAt(frame, i, n), gap, every) {
|
|
523
|
-
if (common.labels === 'none')
|
|
524
|
-
return '';
|
|
525
|
-
const baseY = frame.y1 + (gap ?? (common.compact ? 9 : 12));
|
|
526
|
-
return labelIndexes(common.labels, items, select, every).map((i) => {
|
|
527
|
-
const x = xOf(i, items.length);
|
|
528
|
-
const rotate = common.labelRotate === 0 ? '' : ' transform="rotate(' + common.labelRotate + ' ' + n1(x) + ' ' + n1(baseY) + ')"';
|
|
529
|
-
return '<text class="' + STYLE_PREFIX + 'charts-xlabel" x="' + n1(x) + '" y="' + n1(baseY)
|
|
530
|
-
+ '" text-anchor="middle"' + rotate + ' fill="' + MUTED_COLOR + '">' + esc(items[i].label) + '</text>';
|
|
531
|
-
}).join('');
|
|
532
|
-
}
|
|
533
|
-
/** `showValues` 标签集合:`true` 全量(相邻中心距 < 26 单位跳过)/`'edge'` 首尾有效点/
|
|
534
|
-
* `'last'` 只标最后一个有效点(#567)/`false` 无。 */
|
|
535
|
-
function valueIndexes(mode, frame, items) {
|
|
536
|
-
if (mode === false)
|
|
537
|
-
return [];
|
|
538
|
-
const valid = [];
|
|
539
|
-
items.forEach((item, i) => {
|
|
540
|
-
if (item.value !== null)
|
|
541
|
-
valid.push(i);
|
|
542
|
-
});
|
|
543
|
-
if (valid.length === 0)
|
|
544
|
-
return [];
|
|
545
|
-
if (mode === 'last')
|
|
546
|
-
return [valid[valid.length - 1]];
|
|
547
|
-
if (mode === 'edge')
|
|
548
|
-
return valid.length === 1 ? [valid[0]] : [valid[0], valid[valid.length - 1]];
|
|
549
|
-
const out = [];
|
|
550
|
-
let lastX = -Infinity;
|
|
551
|
-
for (const i of valid) {
|
|
552
|
-
const x = xAt(frame, i, items.length);
|
|
553
|
-
if (x - lastX < 26)
|
|
554
|
-
continue;
|
|
555
|
-
out.push(i);
|
|
556
|
-
lastX = x;
|
|
557
|
-
}
|
|
558
|
-
return out;
|
|
559
|
-
}
|
|
560
|
-
function legendHtml(entries, placement) {
|
|
561
|
-
if (entries.length === 0)
|
|
562
|
-
return '';
|
|
563
|
-
const cls = STYLE_PREFIX + 'charts-legend' + (placement === undefined ? '' : ' ' + STYLE_PREFIX + 'charts-legend-' + placement);
|
|
564
|
-
return '<div class="' + cls + '">' + entries.map((entry) => {
|
|
565
|
-
const swatch = entry.note === undefined
|
|
566
|
-
? '<span class="' + STYLE_PREFIX + 'charts-legend-swatch" style="background:' + esc(entry.color) + '"></span>'
|
|
567
|
-
: '<span class="' + STYLE_PREFIX + 'charts-legend-swatch ' + STYLE_PREFIX + 'charts-legend-swatch-dashed"></span>';
|
|
568
|
-
return '<span class="' + STYLE_PREFIX + 'charts-legend-item">' + swatch + esc(entry.name) + '</span>';
|
|
569
|
-
}).join('') + '</div>';
|
|
570
|
-
}
|
|
571
|
-
function resolveLineSeries(raw, mainItems, line) {
|
|
572
|
-
const list = line.series;
|
|
573
|
-
if (list === undefined || list.length === 0) {
|
|
574
|
-
return [{
|
|
575
|
-
name: '',
|
|
576
|
-
items: mainItems,
|
|
577
|
-
color: undefined,
|
|
578
|
-
dashed: line.dashed,
|
|
579
|
-
smooth: line.smooth,
|
|
580
|
-
area: line.area,
|
|
581
|
-
ownScale: false,
|
|
582
|
-
avg: false,
|
|
583
|
-
}];
|
|
584
|
-
}
|
|
585
|
-
return list.map((entry, i) => {
|
|
586
|
-
const series = requireObject(entry, 'charts.line: series[' + i + ']');
|
|
587
|
-
if (typeof series.name !== 'string')
|
|
588
|
-
badStructure('charts.line: series[' + i + '].name 必须是字符串');
|
|
589
|
-
const items = normalizeItems(series.items, 'line', true);
|
|
590
|
-
return {
|
|
591
|
-
name: series.name,
|
|
592
|
-
items,
|
|
593
|
-
color: typeof series.color === 'string' && series.color !== '' ? series.color : undefined,
|
|
594
|
-
dashed: series.dashed === true,
|
|
595
|
-
smooth: series.smooth === undefined ? line.smooth : series.smooth === true,
|
|
596
|
-
area: series.area === true,
|
|
597
|
-
ownScale: series.ownScale === true,
|
|
598
|
-
avg: false,
|
|
599
|
-
};
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
/** 跨空档桥接段(#458):相邻实测点之间隔着至少一个空档时,把两端点直连为一段
|
|
603
|
-
* (`M端点L端点`,只用实测点坐标,空档点不参与);首末空档无对端可接,不出段。 */
|
|
604
|
-
function bridgePath(pts) {
|
|
605
|
-
let d = '';
|
|
606
|
-
let prev = -1;
|
|
607
|
-
for (let i = 0; i < pts.length; i += 1) {
|
|
608
|
-
if (pts[i][2])
|
|
609
|
-
continue;
|
|
610
|
-
if (prev >= 0 && i - prev > 1) {
|
|
611
|
-
d += 'M' + n1(pts[prev][0]) + ' ' + n1(pts[prev][1]) + 'L' + n1(pts[i][0]) + ' ' + n1(pts[i][1]);
|
|
612
|
-
}
|
|
613
|
-
prev = i;
|
|
614
|
-
}
|
|
615
|
-
return d;
|
|
616
|
-
}
|
|
617
|
-
function polyPath(pts, connect) {
|
|
618
|
-
if (connect) {
|
|
619
|
-
const valid = pts.filter((p) => !p[2]);
|
|
620
|
-
if (valid.length === 0)
|
|
621
|
-
return '';
|
|
622
|
-
return valid.map((p, i) => (i === 0 ? 'M' : 'L') + n1(p[0]) + ' ' + n1(p[1])).join('');
|
|
623
|
-
}
|
|
624
|
-
const segments = [];
|
|
625
|
-
let cur = [];
|
|
626
|
-
for (const p of pts) {
|
|
627
|
-
if (p[2]) {
|
|
628
|
-
if (cur.length > 0)
|
|
629
|
-
segments.push(cur);
|
|
630
|
-
cur = [];
|
|
631
|
-
}
|
|
632
|
-
else {
|
|
633
|
-
cur.push(p);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
if (cur.length > 0)
|
|
637
|
-
segments.push(cur);
|
|
638
|
-
return segments.map((seg) => seg.map((p, i) => (i === 0 ? 'M' : 'L') + n1(p[0]) + ' ' + n1(p[1])).join('')).join('');
|
|
639
|
-
}
|
|
640
|
-
/** Catmull-Rom → 三次贝塞尔(数据点严格落在曲线上,旧 `_smoothPath` 口径)。 */
|
|
641
|
-
function smoothPath(pts, connect) {
|
|
642
|
-
const segments = [];
|
|
643
|
-
if (connect) {
|
|
644
|
-
segments.push(pts.filter((p) => !p[2]));
|
|
645
|
-
}
|
|
646
|
-
else {
|
|
647
|
-
let cur = [];
|
|
648
|
-
for (const p of pts) {
|
|
649
|
-
if (p[2]) {
|
|
650
|
-
if (cur.length > 0)
|
|
651
|
-
segments.push(cur);
|
|
652
|
-
cur = [];
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
cur.push(p);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
if (cur.length > 0)
|
|
659
|
-
segments.push(cur);
|
|
660
|
-
}
|
|
661
|
-
return segments.map((seg) => {
|
|
662
|
-
if (seg.length < 3)
|
|
663
|
-
return seg.map((p, i) => (i === 0 ? 'M' : 'L') + n1(p[0]) + ' ' + n1(p[1])).join('');
|
|
664
|
-
let d = 'M' + n1(seg[0][0]) + ' ' + n1(seg[0][1]);
|
|
665
|
-
for (let i = 0; i < seg.length - 1; i += 1) {
|
|
666
|
-
const p0 = seg[i - 1] ?? seg[i];
|
|
667
|
-
const p1 = seg[i];
|
|
668
|
-
const p2 = seg[i + 1];
|
|
669
|
-
const p3 = seg[i + 2] ?? seg[i + 1];
|
|
670
|
-
const c1x = p1[0] + (p2[0] - p0[0]) / 6;
|
|
671
|
-
const c1y = p1[1] + (p2[1] - p0[1]) / 6;
|
|
672
|
-
const c2x = p2[0] - (p3[0] - p1[0]) / 6;
|
|
673
|
-
const c2y = p2[1] - (p3[1] - p1[1]) / 6;
|
|
674
|
-
d += ' C' + n1(c1x) + ' ' + n1(c1y) + ' ' + n1(c2x) + ' ' + n1(c2y) + ' ' + n1(p2[0]) + ' ' + n1(p2[1]);
|
|
675
|
-
}
|
|
676
|
-
return d;
|
|
677
|
-
}).join('');
|
|
678
|
-
}
|
|
679
|
-
/** 阶梯路径(水平段 + 垂直段,旧 `step` 口径)。 */
|
|
680
|
-
function stepPath(pts, connect) {
|
|
681
|
-
const valid = pts.filter((p) => !p[2]);
|
|
682
|
-
if (valid.length === 0)
|
|
683
|
-
return '';
|
|
684
|
-
if (!connect) {
|
|
685
|
-
const segments = [];
|
|
686
|
-
let cur = [];
|
|
687
|
-
for (const p of pts) {
|
|
688
|
-
if (p[2]) {
|
|
689
|
-
if (cur.length > 0)
|
|
690
|
-
segments.push(cur);
|
|
691
|
-
cur = [];
|
|
692
|
-
}
|
|
693
|
-
else {
|
|
694
|
-
cur.push(p);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
if (cur.length > 0)
|
|
698
|
-
segments.push(cur);
|
|
699
|
-
return segments.map((seg) => {
|
|
700
|
-
let d = 'M' + n1(seg[0][0]) + ' ' + n1(seg[0][1]);
|
|
701
|
-
for (let i = 1; i < seg.length; i += 1) {
|
|
702
|
-
d += ' L' + n1(seg[i][0]) + ' ' + n1(seg[i - 1][1]) + ' L' + n1(seg[i][0]) + ' ' + n1(seg[i][1]);
|
|
703
|
-
}
|
|
704
|
-
return d;
|
|
705
|
-
}).join('');
|
|
706
|
-
}
|
|
707
|
-
let d = 'M' + n1(valid[0][0]) + ' ' + n1(valid[0][1]);
|
|
708
|
-
for (let i = 1; i < valid.length; i += 1) {
|
|
709
|
-
d += ' L' + n1(valid[i][0]) + ' ' + n1(valid[i - 1][1]) + ' L' + n1(valid[i][0]) + ' ' + n1(valid[i][1]);
|
|
710
|
-
}
|
|
711
|
-
return d;
|
|
712
|
-
}
|
|
713
|
-
function areaPath(pts, connect, baseY, smooth, step) {
|
|
714
|
-
const valid = pts.filter((p) => !p[2]);
|
|
715
|
-
if (valid.length === 0)
|
|
716
|
-
return '';
|
|
717
|
-
const body = smooth && !step ? smoothPath(pts, connect) : step ? stepPath(pts, connect) : polyPath(pts, connect);
|
|
718
|
-
if (body === '')
|
|
719
|
-
return '';
|
|
720
|
-
const firstX = valid[0][0];
|
|
721
|
-
const lastX = valid[valid.length - 1][0];
|
|
722
|
-
return body + ' L' + n1(lastX) + ' ' + n1(baseY) + ' L' + n1(firstX) + ' ' + n1(baseY) + ' Z';
|
|
723
|
-
}
|
|
724
|
-
/** 两条序列之间的填充路径(null 断开,不随 `connectNulls` 跨空)。 */
|
|
725
|
-
function betweenPath(a, b) {
|
|
726
|
-
const segments = [];
|
|
727
|
-
let cur = [];
|
|
728
|
-
const n = Math.min(a.length, b.length);
|
|
729
|
-
for (let i = 0; i < n; i += 1) {
|
|
730
|
-
if (a[i][2] || b[i][2]) {
|
|
731
|
-
if (cur.length > 0)
|
|
732
|
-
segments.push(cur);
|
|
733
|
-
cur = [];
|
|
734
|
-
}
|
|
735
|
-
else {
|
|
736
|
-
cur.push({ top: a[i], bottom: b[i] });
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
if (cur.length > 0)
|
|
740
|
-
segments.push(cur);
|
|
741
|
-
return segments.map((seg) => {
|
|
742
|
-
let d = seg.map((p, i) => (i === 0 ? 'M' : 'L') + n1(p.top[0]) + ' ' + n1(p.top[1])).join('');
|
|
743
|
-
for (let i = seg.length - 1; i >= 0; i -= 1)
|
|
744
|
-
d += ' L' + n1(seg[i].bottom[0]) + ' ' + n1(seg[i].bottom[1]);
|
|
745
|
-
return d + ' Z';
|
|
746
|
-
}).join('');
|
|
747
|
-
}
|
|
748
|
-
function resolveMarkPoint(raw) {
|
|
749
|
-
if (raw === true)
|
|
750
|
-
return true;
|
|
751
|
-
if (isPlainObject(raw))
|
|
752
|
-
return raw;
|
|
753
|
-
return undefined;
|
|
754
|
-
}
|
|
755
|
-
/** 折线默认 viewBox:320×210 → 580×260(#424)。
|
|
756
|
-
*
|
|
757
|
-
* (#507 起本族不再走 `preserveAspectRatio="none"`,见 `svgOpen`;下面的量级关系一字不变——
|
|
758
|
-
* 真正决定实渲字号的是「盒宽 ÷ viewBox 宽」,与 `none`/`meet` 无关。)SVG 的**盒尺寸**仍按 viewBox 长宽比算
|
|
759
|
-
* (`width:100%` + `height:auto`),所以 320×210 塞进 930px 卡片时会被拉到 2.91 倍
|
|
760
|
-
* ——10px 图内文字渲染 29px、点径 20px(t-chartfix #160 的实测)。#160 用
|
|
761
|
-
* `max-width:480px` 压回 1.5 倍,代价是图只占卡片一半宽(930 里居中的 480,左右各空 225)。
|
|
762
|
-
*
|
|
763
|
-
* #424 改从源头修:viewBox 放到真实卡片量级(580×260 ≈ 930×417 的 0.62 相似形)。
|
|
764
|
-
* 卡片越宽、图越大、字越大:930px 卡 → scale 1.6 → 图内 9.5–10px 文字渲染 15.2–16px。
|
|
765
|
-
* 于是 `max-width` 上限不再需要(见 `chartsCss`,桌面规则已撤)。 */
|
|
766
|
-
const LINE_DEFAULT_WIDTH = 580;
|
|
767
|
-
const LINE_DEFAULT_HEIGHT = 260;
|
|
768
|
-
function renderLine(raw) {
|
|
769
|
-
const input = requireObject(raw, 'charts.line: input');
|
|
770
|
-
const common = resolveCommon(input.options, {
|
|
771
|
-
width: LINE_DEFAULT_WIDTH,
|
|
772
|
-
height: LINE_DEFAULT_HEIGHT,
|
|
773
|
-
labels: 'edge',
|
|
774
|
-
showValues: false,
|
|
775
|
-
});
|
|
776
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
777
|
-
const line = {
|
|
778
|
-
...common,
|
|
779
|
-
lineWidth: numOr(opts === undefined ? undefined : opts.lineWidth, 2.2),
|
|
780
|
-
dashed: opts !== undefined && opts.dashed === true,
|
|
781
|
-
smooth: opts !== undefined && opts.smooth === true,
|
|
782
|
-
step: opts !== undefined && opts.step === true,
|
|
783
|
-
showDots: opts === undefined || opts.showDots !== false,
|
|
784
|
-
showDotsExplicit: opts !== undefined && opts.showDots !== undefined,
|
|
785
|
-
dotSize: numOr(opts === undefined ? undefined : opts.dotSize, DOT_DEFAULT_PX),
|
|
786
|
-
dotStyle: opts !== undefined && typeof opts.dotStyle === 'string' && opts.dotStyle !== '' ? opts.dotStyle : undefined,
|
|
787
|
-
area: opts !== undefined && opts.area === true,
|
|
788
|
-
areaOpacity: numOr(opts === undefined ? undefined : opts.areaOpacity, 0.12),
|
|
789
|
-
yTicks: opts === undefined || opts.yTicks === undefined ? false : opts.yTicks,
|
|
790
|
-
connectNulls: opts !== undefined && opts.connectNulls === true,
|
|
791
|
-
/* #458:显式 gapStyle 优先;未给时由 connectNulls 回落(true→connect,否则→break),
|
|
792
|
-
* 缺省产出与改前逐字节相同。 */
|
|
793
|
-
gapStyle: opts !== undefined && (opts.gapStyle === 'break' || opts.gapStyle === 'connect' || opts.gapStyle === 'dashed')
|
|
794
|
-
? opts.gapStyle
|
|
795
|
-
: (opts !== undefined && opts.connectNulls === true ? 'connect' : 'break'),
|
|
796
|
-
legend: opts !== undefined && opts.legend === true,
|
|
797
|
-
highlightLast: opts !== undefined && opts.highlightLast === true,
|
|
798
|
-
avgLine: opts !== undefined && isNum(opts.avgLine) ? opts.avgLine : undefined,
|
|
799
|
-
markLine: opts !== undefined && isPlainObject(opts.markLine) ? opts.markLine : undefined,
|
|
800
|
-
markPoint: opts === undefined ? undefined : resolveMarkPoint(opts.markPoint),
|
|
801
|
-
band: opts !== undefined && isPlainObject(opts.band) ? opts.band : undefined,
|
|
802
|
-
fillBetween: opts !== undefined && isPlainObject(opts.fillBetween) ? opts.fillBetween : undefined,
|
|
803
|
-
highlightPoints: opts !== undefined && (opts.highlightPoints === 'turns' || opts.highlightPoints === 'crossings')
|
|
804
|
-
? opts.highlightPoints
|
|
805
|
-
: undefined,
|
|
806
|
-
series: opts !== undefined && Array.isArray(opts.series) ? opts.series : undefined,
|
|
807
|
-
labelEvery: opts !== undefined && isNum(opts.labelEvery) && Math.floor(opts.labelEvery) >= 2
|
|
808
|
-
? Math.floor(opts.labelEvery)
|
|
809
|
-
: undefined,
|
|
810
|
-
};
|
|
811
|
-
const items = normalizeItems(input.items, 'line', true);
|
|
812
|
-
if (items.length === 0)
|
|
813
|
-
return emptyOutput('line', input.options);
|
|
814
|
-
/* 点密度(#424):`showDots` 未显式给且点数超上限 → 隔 k 个画一个(n=90 → k=3 → 30 个)。
|
|
815
|
-
* 末点**只按 stride 命中**时才画:`highlightLast` 会另外补一个实心末点圈(同 x,r 大 1),
|
|
816
|
-
* 两条路都无条件画会叠出「双圈」——所以末点改由 `highlightLast` 单独负责(调用方开它)。 */
|
|
817
|
-
const dotStride = line.showDotsExplicit || line.dotSize <= 0 || items.length <= DOT_STRIDE_MAX
|
|
818
|
-
? 1
|
|
819
|
-
: Math.ceil(items.length / DOT_STRIDE_MAX);
|
|
820
|
-
const series = resolveLineSeries(input.options, items, line);
|
|
821
|
-
const main = series[0];
|
|
822
|
-
/* band:与主序列 items 等长,否则抛错;hi/lo 值并入共享域 */
|
|
823
|
-
let band;
|
|
824
|
-
if (line.band !== undefined) {
|
|
825
|
-
const hi = line.band.hi;
|
|
826
|
-
const lo = line.band.lo;
|
|
827
|
-
if (!Array.isArray(hi) || !Array.isArray(lo))
|
|
828
|
-
badStructure('charts.line: band.hi/lo 必须是数组');
|
|
829
|
-
if (hi.length !== main.items.length || lo.length !== main.items.length) {
|
|
830
|
-
badStructure('charts.line: band.hi/lo 长度必须与 items 等长 (' + main.items.length + '), 收到 hi='
|
|
831
|
-
+ hi.length + ' lo=' + lo.length);
|
|
832
|
-
}
|
|
833
|
-
band = line.band;
|
|
834
|
-
}
|
|
835
|
-
/* 共享 Y 域(非 ownScale 序列 + band;ownScale 序列独立归一化,不参与共享域) */
|
|
836
|
-
const sharedValues = [];
|
|
837
|
-
for (const s of series) {
|
|
838
|
-
if (s.ownScale)
|
|
839
|
-
continue;
|
|
840
|
-
for (const item of s.items)
|
|
841
|
-
if (item.value !== null)
|
|
842
|
-
sharedValues.push(item.value);
|
|
843
|
-
}
|
|
844
|
-
if (band !== undefined) {
|
|
845
|
-
for (const v of band.hi)
|
|
846
|
-
if (v !== null)
|
|
847
|
-
sharedValues.push(v);
|
|
848
|
-
for (const v of band.lo)
|
|
849
|
-
if (v !== null)
|
|
850
|
-
sharedValues.push(v);
|
|
851
|
-
}
|
|
852
|
-
const [lo, hi] = lineDomainOf(sharedValues, line.yMin, line.yMax);
|
|
853
|
-
const tickN = tickCount(line.yTicks);
|
|
854
|
-
/* 刻度留白按**移动端字号**估(`LINE_TEXT_MOBILE.tick`):留白是双端共用的用户单位,桌面档估算
|
|
855
|
-
* 在 390px 下会漏 —— 见 `insetsFor` 的 `minLeft`。上沿同理(`LINE_TICK_TOP_MIN`):顶端那条
|
|
856
|
-
* 标注的基线以上要 1.04em,≤720px 档字号 19.4 单位最大(原 20),按它留才不会在四档里被裁。 */
|
|
857
|
-
let tickTextW = 0;
|
|
858
|
-
for (let i = 0; i < tickN; i += 1) {
|
|
859
|
-
const tv = lo + ((hi - lo) * i) / (tickN - 1);
|
|
860
|
-
tickTextW = Math.max(tickTextW, textWidthUnits(fmtValue(round2(tv), line.format), LINE_TEXT_MOBILE.tick));
|
|
861
|
-
}
|
|
862
|
-
/* t512 WaveC:右留白按**移动端字号**估横轴标签半宽(留白是双端共用的用户单位,取最大那一档
|
|
863
|
-
* `LINE_TEXT_MOBILE.xlabel`;`textWidthUnits` 的 0.62em 本已偏保守,+1 只收 `n1` 舍入)。
|
|
864
|
-
* 横轴标签居中落在绘图区沿上,末条的半个字宽要收进 viewBox,右留白不得小于它。 */
|
|
865
|
-
let xlabelHalfW = 0;
|
|
866
|
-
if (line.labels !== 'none') {
|
|
867
|
-
for (const item of items) {
|
|
868
|
-
xlabelHalfW = Math.max(xlabelHalfW, textWidthUnits(item.label, LINE_TEXT_MOBILE.xlabel) / 2);
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
const frame = makeFrame(line, insetsFor(line, {
|
|
872
|
-
tickWidth: tickN === 0 ? 0 : (line.compact ? 16 : 22),
|
|
873
|
-
labelHeight: line.labels === 'none' ? 0 : (line.compact ? 10 : 14),
|
|
874
|
-
valueHeight: line.compact ? 9 : 12,
|
|
875
|
-
minLeft: tickN === 0 ? 0 : Math.ceil(tickTextW) + 9,
|
|
876
|
-
minTop: tickN === 0 ? 0 : LINE_TICK_TOP_MIN,
|
|
877
|
-
minBottom: line.labels === 'none' ? 0 : LINE_BOTTOM_MIN,
|
|
878
|
-
minRight: line.labels === 'none' ? 0 : Math.ceil(xlabelHalfW) + 1,
|
|
879
|
-
}));
|
|
880
|
-
const ownDoms = series.map((s) => {
|
|
881
|
-
if (!s.ownScale)
|
|
882
|
-
return undefined;
|
|
883
|
-
const values = [];
|
|
884
|
-
for (const item of s.items)
|
|
885
|
-
if (item.value !== null)
|
|
886
|
-
values.push(item.value);
|
|
887
|
-
return domainOf(values, undefined, undefined, false);
|
|
888
|
-
});
|
|
889
|
-
const ptsOf = (s, si) => {
|
|
890
|
-
const dom = ownDoms[si] ?? [lo, hi];
|
|
891
|
-
return s.items.map((item, i) => [
|
|
892
|
-
xAt(frame, i, s.items.length),
|
|
893
|
-
item.value === null ? 0 : yAt(frame, item.value, dom[0], dom[1]),
|
|
894
|
-
item.value === null,
|
|
895
|
-
]);
|
|
896
|
-
};
|
|
897
|
-
const seriesPts = series.map((s, si) => ptsOf(s, si));
|
|
898
|
-
/* avgLine:均线序列(窗口统一为 3..items.length)。旧版 `charts.js:414` 是 `if(opt.avgLine&&!opt.series)`
|
|
899
|
-
* ——传了 `series` 就不叠加(R2-N6,调用方自己管序列)。#424 放开这条互斥:`series` 同时用于给**主序列**
|
|
900
|
-
* 起图例名(旧help模板 `chart-multi-v2` 的图例写「每次称重/7 天均线」,均线是引擎现算的、调用方拿不到它的
|
|
901
|
-
* 数据)——两种用法合并,叠加均线仍由 `avgLine` 决定。主序列恒 `series[0]`、均线恒追加在末尾,
|
|
902
|
-
* 「只看第一条」的逻辑(`highlightLast`/`markPoint`)不受影响。 */
|
|
903
|
-
const avgWindow = line.avgLine === undefined
|
|
904
|
-
? undefined
|
|
905
|
-
: Math.max(3, Math.min(items.length, Math.round(line.avgLine || 7)));
|
|
906
|
-
if (avgWindow !== undefined && items.length >= 2) {
|
|
907
|
-
const avgItems = items.map((item, i) => {
|
|
908
|
-
if (item.value === null)
|
|
909
|
-
return { label: item.label, value: null };
|
|
910
|
-
let sum = 0;
|
|
911
|
-
let n = 0;
|
|
912
|
-
for (let j = Math.max(0, i - avgWindow + 1); j <= i; j += 1) {
|
|
913
|
-
const v = items[j].value;
|
|
914
|
-
if (v !== null) {
|
|
915
|
-
sum += v;
|
|
916
|
-
n += 1;
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
return { label: item.label, value: n === 0 ? null : round2(sum / n) };
|
|
920
|
-
});
|
|
921
|
-
series.push({
|
|
922
|
-
/* #424 返工:条目名按**实际窗口**生成(调用点传的是变量窗口,如 `reviewDocs.ts:52` 的
|
|
923
|
-
* `avgLine: win`)——写死「7 天均线」在窗口 ≠7 时是错的。 */
|
|
924
|
-
name: avgWindow + ' 天均线',
|
|
925
|
-
items: avgItems,
|
|
926
|
-
color: MUTED_COLOR,
|
|
927
|
-
dashed: true,
|
|
928
|
-
smooth: line.smooth,
|
|
929
|
-
area: false,
|
|
930
|
-
ownScale: false,
|
|
931
|
-
avg: true,
|
|
932
|
-
});
|
|
933
|
-
seriesPts.push(avgItems.map((item, i) => [
|
|
934
|
-
xAt(frame, i, avgItems.length),
|
|
935
|
-
item.value === null ? 0 : yAt(frame, item.value, lo, hi),
|
|
936
|
-
item.value === null,
|
|
937
|
-
]));
|
|
938
|
-
}
|
|
939
|
-
/* fillBetween:a/b = 系列索引(越界/相同/非数/长度不一致 → 抛错) */
|
|
940
|
-
let fillSvg = '';
|
|
941
|
-
if (line.fillBetween !== undefined) {
|
|
942
|
-
const fb = line.fillBetween;
|
|
943
|
-
if (!isNum(fb.a) || !isNum(fb.b))
|
|
944
|
-
badStructure('charts.line: fillBetween.a/b 必须为系列索引数字');
|
|
945
|
-
const ia = Math.round(fb.a);
|
|
946
|
-
const ib = Math.round(fb.b);
|
|
947
|
-
if (ia < 0 || ia >= seriesPts.length || ib < 0 || ib >= seriesPts.length) {
|
|
948
|
-
badStructure('charts.line: fillBetween.a/b 越界 (系列数 ' + seriesPts.length + ', a=' + ia + ' b=' + ib + ')');
|
|
949
|
-
}
|
|
950
|
-
if (ia === ib)
|
|
951
|
-
badStructure('charts.line: fillBetween.a/b 不能相同');
|
|
952
|
-
if (seriesPts[ia].length !== seriesPts[ib].length)
|
|
953
|
-
badStructure('charts.line: fillBetween 两系列 items 长度不一致');
|
|
954
|
-
const d = betweenPath(seriesPts[ia], seriesPts[ib]);
|
|
955
|
-
if (d !== '') {
|
|
956
|
-
const color = typeof fb.color === 'string' && fb.color !== '' ? fb.color : DEFAULT_SERIES_COLOR;
|
|
957
|
-
fillSvg = '<path class="' + STYLE_PREFIX + 'charts-fill" d="' + d + '" fill="' + esc(color)
|
|
958
|
-
+ '" fill-opacity="' + line.areaOpacity + '" stroke="none"/>';
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
/* band:绘制在折线之前,fill-opacity 0.15 */
|
|
962
|
-
let bandSvg = '';
|
|
963
|
-
if (band !== undefined) {
|
|
964
|
-
const dom = ownDoms[0] ?? [lo, hi];
|
|
965
|
-
const n = main.items.length;
|
|
966
|
-
const hiPts = [];
|
|
967
|
-
const loPts = [];
|
|
968
|
-
for (let i = 0; i < n; i += 1) {
|
|
969
|
-
const x = xAt(frame, i, n);
|
|
970
|
-
const hv = band.hi[i];
|
|
971
|
-
const lv = band.lo[i];
|
|
972
|
-
hiPts.push([x, hv === null || hv === undefined ? 0 : yAt(frame, hv, dom[0], dom[1]), hv === null || hv === undefined]);
|
|
973
|
-
loPts.push([x, lv === null || lv === undefined ? 0 : yAt(frame, lv, dom[0], dom[1]), lv === null || lv === undefined]);
|
|
974
|
-
}
|
|
975
|
-
const d = betweenPath(hiPts, loPts);
|
|
976
|
-
if (d !== '') {
|
|
977
|
-
bandSvg = '<path class="' + STYLE_PREFIX + 'charts-band" d="' + d + '" fill="'
|
|
978
|
-
+ esc(main.color ?? line.color ?? DEFAULT_SERIES_COLOR) + '" fill-opacity="0.15" stroke="none"/>';
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
/* 各序列路径 + 数据点 + 数值标签 */
|
|
982
|
-
let pathsSvg = '';
|
|
983
|
-
let marksSvg = '';
|
|
984
|
-
let valuesSvg = '';
|
|
985
|
-
const legendEntries = [];
|
|
986
|
-
let anyOwnScale = false;
|
|
987
|
-
series.forEach((s, si) => {
|
|
988
|
-
if (s.ownScale)
|
|
989
|
-
anyOwnScale = true;
|
|
990
|
-
const pts = seriesPts[si];
|
|
991
|
-
/* #424 返工:均线身份**只看显式标记**(注入时置 `avg: true`),不再靠「虚线+非独立刻度+末位」
|
|
992
|
-
* 猜——调用方自己的虚线末位序列从此不再被误判。 */
|
|
993
|
-
const isAvg = s.avg;
|
|
994
|
-
const color = s.color ?? line.color ?? CHART_PALETTE[si % CHART_PALETTE.length];
|
|
995
|
-
/* #458:连通标志由 gapStyle 统一给(connect 档等价旧 connectNulls:true,其余断开);
|
|
996
|
-
* dashed 档实线走断开,桥接段另出一条同色虚线(均线序列不参与桥接)。 */
|
|
997
|
-
const connect = line.gapStyle === 'connect';
|
|
998
|
-
if (s.area && !isAvg) {
|
|
999
|
-
const d = areaPath(pts, connect, frame.y1, s.smooth && !line.step, line.step);
|
|
1000
|
-
if (d !== '') {
|
|
1001
|
-
pathsSvg += '<path class="' + STYLE_PREFIX + 'charts-area" d="' + d + '" fill="' + esc(color)
|
|
1002
|
-
+ '" fill-opacity="' + line.areaOpacity + '" stroke="none"/>';
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
const d = line.step ? stepPath(pts, connect) : s.smooth ? smoothPath(pts, connect) : polyPath(pts, connect);
|
|
1006
|
-
if (d !== '') {
|
|
1007
|
-
pathsSvg += '<path class="' + STYLE_PREFIX + 'charts-line' + (isAvg ? ' ' + STYLE_PREFIX + 'charts-avg' : '')
|
|
1008
|
-
+ '" d="' + d + '" fill="none" stroke="' + esc(color)
|
|
1009
|
-
+ '" stroke-width="' + line.lineWidth + '" stroke-linejoin="round" stroke-linecap="round"'
|
|
1010
|
-
+ (s.dashed ? ' stroke-dasharray="6 5"' : '') + ' vector-effect="non-scaling-stroke"/>';
|
|
1011
|
-
}
|
|
1012
|
-
if (line.gapStyle === 'dashed' && !isAvg) {
|
|
1013
|
-
const b = bridgePath(pts);
|
|
1014
|
-
if (b !== '') {
|
|
1015
|
-
pathsSvg += '<path class="' + STYLE_PREFIX + 'charts-line ' + STYLE_PREFIX + 'charts-line-bridge'
|
|
1016
|
-
+ '" d="' + b + '" fill="none" stroke="' + esc(color)
|
|
1017
|
-
+ '" stroke-width="' + line.lineWidth + '" stroke-linejoin="round" stroke-linecap="round"'
|
|
1018
|
-
+ ' stroke-dasharray="5 4" vector-effect="non-scaling-stroke"/>';
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
/* 图例条目(#424 起均线条目也算一条):均线是引擎注入的序列(`avg: true`),名字按窗口生成、
|
|
1022
|
-
* 进图例;调用方自己的**虚线序列**(配对页 cross 轴那条)不进图例——那是调用方图例的事。 */
|
|
1023
|
-
if (line.legend && s.name !== '' && (s.avg || !(avgWindow !== undefined && s.dashed))) {
|
|
1024
|
-
legendEntries.push({ name: s.name, color });
|
|
1025
|
-
}
|
|
1026
|
-
if (isAvg)
|
|
1027
|
-
return;
|
|
1028
|
-
if (line.showDots) {
|
|
1029
|
-
pts.forEach((p, i) => {
|
|
1030
|
-
if (p[2])
|
|
1031
|
-
return;
|
|
1032
|
-
if (dotStride > 1 && (i % dotStride) !== 0)
|
|
1033
|
-
return;
|
|
1034
|
-
const item = s.items[i];
|
|
1035
|
-
const anomaly = item.anomaly === true;
|
|
1036
|
-
const dotClass = STYLE_PREFIX + 'charts-dot' + (anomaly ? ' ' + STYLE_PREFIX + 'charts-dot-anomaly' : '')
|
|
1037
|
-
+ (line.dotStyle === undefined ? '' : ' ' + STYLE_PREFIX + 'charts-dot-custom');
|
|
1038
|
-
marksSvg += '<circle class="' + dotClass + '" data-s="' + si + '" data-i="' + i + '" cx="' + n1(p[0])
|
|
1039
|
-
+ '" cy="' + n1(p[1]) + '" r="' + line.dotSize / 2 + '" fill="'
|
|
1040
|
-
+ (anomaly ? ANOMALY_COLOR : DOT_FACE_COLOR) + '" stroke="' + esc(anomaly ? ANOMALY_COLOR : color)
|
|
1041
|
-
+ '" stroke-width="1.5" vector-effect="non-scaling-stroke"'
|
|
1042
|
-
+ (line.dotStyle === undefined ? '' : ' style="' + esc(line.dotStyle) + '"')
|
|
1043
|
-
+ tipAttrs(line, () => item.label + ': ' + fmtValue(item.value, line.format))
|
|
1044
|
-
+ actionAttrs(line, i) + '/>';
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
if (line.showValues !== false) {
|
|
1048
|
-
for (const i of valueIndexes(line.showValues, frame, s.items)) {
|
|
1049
|
-
const item = s.items[i];
|
|
1050
|
-
const p = pts[i];
|
|
1051
|
-
valuesSvg += '<text class="' + STYLE_PREFIX + 'charts-value" x="' + n1(p[0]) + '" y="' + n1(p[1] - 4)
|
|
1052
|
-
+ '" text-anchor="middle" fill="' + MUTED_COLOR + '">' + esc(fmtValue(item.value, line.format)) + '</text>';
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
/* highlightPoints:拐点(方向反转,两端点不判)/交点(多序列相交段右端点) */
|
|
1056
|
-
if (line.highlightPoints === 'turns') {
|
|
1057
|
-
for (let i = 1; i < pts.length - 1; i += 1) {
|
|
1058
|
-
if (pts[i][2] || pts[i - 1][2] || pts[i + 1][2])
|
|
1059
|
-
continue;
|
|
1060
|
-
const dy1 = pts[i][1] - pts[i - 1][1];
|
|
1061
|
-
const dy2 = pts[i + 1][1] - pts[i][1];
|
|
1062
|
-
if (dy1 * dy2 < 0) {
|
|
1063
|
-
marksSvg += '<circle class="' + STYLE_PREFIX + 'charts-dot-hl" data-s="' + si + '" data-i="' + i
|
|
1064
|
-
+ '" cx="' + n1(pts[i][0]) + '" cy="' + n1(pts[i][1]) + '" r="' + (line.dotSize / 2 + 2.5)
|
|
1065
|
-
+ '" fill="none" stroke="' + esc(color) + '" stroke-width="2" vector-effect="non-scaling-stroke"/>';
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
});
|
|
1070
|
-
if (line.highlightPoints === 'crossings') {
|
|
1071
|
-
for (let a = 0; a < seriesPts.length; a += 1) {
|
|
1072
|
-
for (let b = a + 1; b < seriesPts.length; b += 1) {
|
|
1073
|
-
const pa = seriesPts[a];
|
|
1074
|
-
const pb = seriesPts[b];
|
|
1075
|
-
const n = Math.min(pa.length, pb.length);
|
|
1076
|
-
for (let k = 0; k < n - 1; k += 1) {
|
|
1077
|
-
if (pa[k][2] || pb[k][2] || pa[k + 1][2] || pb[k + 1][2])
|
|
1078
|
-
continue;
|
|
1079
|
-
const d0 = pa[k][1] - pb[k][1];
|
|
1080
|
-
const d1 = pa[k + 1][1] - pb[k + 1][1];
|
|
1081
|
-
const hit = d0 === 0 ? k : d0 * d1 < 0 ? k + 1 : -1;
|
|
1082
|
-
if (hit < 0)
|
|
1083
|
-
continue;
|
|
1084
|
-
const color = series[a].color ?? line.color ?? CHART_PALETTE[a % CHART_PALETTE.length];
|
|
1085
|
-
marksSvg += '<circle class="' + STYLE_PREFIX + 'charts-dot-hl" data-s="' + a + '" data-i="' + hit
|
|
1086
|
-
+ '" cx="' + n1(pa[hit][0]) + '" cy="' + n1(pa[hit][1]) + '" r="' + (line.dotSize / 2 + 2.5)
|
|
1087
|
-
+ '" fill="none" stroke="' + esc(color) + '" stroke-width="2" vector-effect="non-scaling-stroke"/>';
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
if (line.legend && anyOwnScale)
|
|
1093
|
-
legendEntries.push({ name: OWN_SCALE_NOTE, color: MUTED_COLOR, note: 'dashed' });
|
|
1094
|
-
/* highlightLast:最后一个有效点高亮 + 数值标签 */
|
|
1095
|
-
if (line.highlightLast) {
|
|
1096
|
-
let last = -1;
|
|
1097
|
-
for (let i = main.items.length - 1; i >= 0; i -= 1) {
|
|
1098
|
-
if (main.items[i].value !== null) {
|
|
1099
|
-
last = i;
|
|
1100
|
-
break;
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
if (last >= 0) {
|
|
1104
|
-
const p = seriesPts[0][last];
|
|
1105
|
-
const color = line.color ?? main.color ?? DEFAULT_SERIES_COLOR;
|
|
1106
|
-
marksSvg += '<circle class="' + STYLE_PREFIX + 'charts-dot-last" data-i="' + last + '" cx="' + n1(p[0])
|
|
1107
|
-
+ '" cy="' + n1(p[1]) + '" r="' + (line.dotSize / 2 + 1) + '" fill="' + esc(color) + '" stroke="' + esc(color)
|
|
1108
|
-
+ '" stroke-width="1.5" vector-effect="non-scaling-stroke"/>';
|
|
1109
|
-
/* 末值文本受 `showValues`/`labels:'select'` 门控(旧 `charts.js:619-621`);高亮圈无条件。
|
|
1110
|
-
* #424:末值常落在绘图区**右边缘**(末点就在 `frame.x1` 上),`middle` 锚会让文字一半探出图外
|
|
1111
|
-
* (实测「70.6kg」右半截贴到卡片边)。距边不足 6% 宽时改 `end`/`start` 锚并收进 4 单位。
|
|
1112
|
-
* #567:`showValues:'last'` 时末值已由上面的数值标签画出(恰一枚),此处只留圈、不再追加文本
|
|
1113
|
-
* (否则同一末值印两遍)。 */
|
|
1114
|
-
if ((line.showValues !== false && line.showValues !== 'last') || line.labels === 'select') {
|
|
1115
|
-
const edgeRatio = (p[0] - frame.x0) / frame.w;
|
|
1116
|
-
const lastAnchor = edgeRatio > 0.94 ? 'end' : edgeRatio < 0.06 ? 'start' : 'middle';
|
|
1117
|
-
const lastX = edgeRatio > 0.94 ? p[0] - 4 : edgeRatio < 0.06 ? p[0] + 4 : p[0];
|
|
1118
|
-
valuesSvg += '<text class="' + STYLE_PREFIX + 'charts-value ' + STYLE_PREFIX + 'charts-value-last" x="' + n1(lastX)
|
|
1119
|
-
+ '" y="' + n1(p[1] - LINE_LAST_LABEL_LIFT) + '" text-anchor="' + lastAnchor + '" fill="var(--fg,#1d1d1f)">'
|
|
1120
|
-
+ esc(fmtValue(main.items[last].value, line.format)) + '</text>';
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
/* markLine:水平阈值({value})/垂直里程碑({xValue}),按字段区分可同传 */
|
|
1125
|
-
let markSvg = '';
|
|
1126
|
-
if (line.markLine !== undefined) {
|
|
1127
|
-
const mark = line.markLine;
|
|
1128
|
-
if (isNum(mark.value)) {
|
|
1129
|
-
const my = yAt(frame, mark.value, lo, hi);
|
|
1130
|
-
const color = typeof mark.color === 'string' && mark.color !== '' ? mark.color : DEFAULT_MARK_COLOR;
|
|
1131
|
-
markSvg += '<line class="' + STYLE_PREFIX + 'charts-markline" x1="' + n1(frame.x0) + '" y1="' + n1(my)
|
|
1132
|
-
+ '" x2="' + n1(frame.x1) + '" y2="' + n1(my) + '" stroke="' + esc(color)
|
|
1133
|
-
+ '" stroke-width="1.5" stroke-dasharray="5 4" vector-effect="non-scaling-stroke"/>'
|
|
1134
|
-
+ '<text class="' + STYLE_PREFIX + 'charts-marktext" x="' + n1(frame.x1 - 2) + '" y="' + n1(my - 4)
|
|
1135
|
-
/* t-chartfix #160:标签恒用静音灰 `--fg3,#86868b`(老help模板 `公共组件/assets/charts.js:87`
|
|
1136
|
-
* 同款),**线**仍跟序列色/`mark.color`——线色由 3 条测试锁,标签色不锁。 */
|
|
1137
|
-
+ '" text-anchor="end" fill="' + MUTED_COLOR + '">'
|
|
1138
|
-
+ esc(mark.label !== undefined && mark.label !== null ? String(mark.label) : String(mark.value)) + '</text>';
|
|
1139
|
-
}
|
|
1140
|
-
if (mark.xValue !== undefined && mark.xValue !== null) {
|
|
1141
|
-
let idx = -1;
|
|
1142
|
-
if (isNum(mark.xValue)) {
|
|
1143
|
-
const candidate = Math.round(mark.xValue);
|
|
1144
|
-
if (candidate >= 0 && candidate < items.length)
|
|
1145
|
-
idx = candidate;
|
|
1146
|
-
}
|
|
1147
|
-
else {
|
|
1148
|
-
const wanted = String(mark.xValue);
|
|
1149
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
1150
|
-
if (items[i].label === wanted) {
|
|
1151
|
-
idx = i;
|
|
1152
|
-
break;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
if (idx >= 0) {
|
|
1157
|
-
const mx = xAt(frame, idx, items.length);
|
|
1158
|
-
const color = typeof mark.color === 'string' && mark.color !== '' ? mark.color : DEFAULT_MARK_COLOR;
|
|
1159
|
-
const ratio = (mx - frame.x0) / frame.w;
|
|
1160
|
-
const anchor = ratio < 0.18 ? 'start' : ratio > 0.82 ? 'end' : 'middle';
|
|
1161
|
-
const labelX = anchor === 'start' ? mx + 2 : anchor === 'end' ? mx - 2 : mx;
|
|
1162
|
-
markSvg += '<line class="' + STYLE_PREFIX + 'charts-markline-v" x1="' + n1(mx) + '" y1="' + n1(frame.y0 - 2)
|
|
1163
|
-
+ '" x2="' + n1(mx) + '" y2="' + n1(frame.y1) + '" stroke="' + esc(color)
|
|
1164
|
-
+ '" stroke-width="1.5" stroke-dasharray="5 4" vector-effect="non-scaling-stroke"/>'
|
|
1165
|
-
+ '<text class="' + STYLE_PREFIX + 'charts-marktext-v" x="' + n1(labelX) + '" y="' + n1(frame.y0 - 4)
|
|
1166
|
-
/* t-chartfix #160:同上——垂直线标签也走 `MUTED_COLOR`,线 stroke 不变。 */
|
|
1167
|
-
+ '" text-anchor="' + anchor + '" fill="' + MUTED_COLOR + '">'
|
|
1168
|
-
+ esc(mark.label !== undefined && mark.label !== null ? String(mark.label) : items[idx].label) + '</text>';
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
/* markPoint:true = 主序列最大值点;{index} 越界忽略;{value} 首个匹配 */
|
|
1173
|
-
let markPointSvg = '';
|
|
1174
|
-
if (line.markPoint !== undefined) {
|
|
1175
|
-
const mp = line.markPoint === true ? {} : line.markPoint;
|
|
1176
|
-
let idx = -1;
|
|
1177
|
-
if (mp.index !== undefined && mp.index !== null && isNum(mp.index)) {
|
|
1178
|
-
const candidate = Math.round(mp.index);
|
|
1179
|
-
if (candidate >= 0 && candidate < main.items.length)
|
|
1180
|
-
idx = candidate;
|
|
1181
|
-
}
|
|
1182
|
-
else if (mp.value !== undefined && mp.value !== null && isNum(mp.value)) {
|
|
1183
|
-
for (let i = 0; i < main.items.length; i += 1) {
|
|
1184
|
-
if (main.items[i].value === mp.value) {
|
|
1185
|
-
idx = i;
|
|
1186
|
-
break;
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
else {
|
|
1191
|
-
let best = null;
|
|
1192
|
-
main.items.forEach((item, i) => {
|
|
1193
|
-
if (item.value !== null && (best === null || item.value > best)) {
|
|
1194
|
-
best = item.value;
|
|
1195
|
-
idx = i;
|
|
1196
|
-
}
|
|
1197
|
-
});
|
|
1198
|
-
}
|
|
1199
|
-
if (idx >= 0 && !seriesPts[0][idx][2]) {
|
|
1200
|
-
const p = seriesPts[0][idx];
|
|
1201
|
-
const color = typeof mp.color === 'string' && mp.color !== '' ? mp.color : (main.color ?? line.color ?? DEFAULT_SERIES_COLOR);
|
|
1202
|
-
const ratio = (p[0] - frame.x0) / frame.w;
|
|
1203
|
-
const anchor = ratio < 0.18 ? 'start' : ratio > 0.82 ? 'end' : 'middle';
|
|
1204
|
-
const labelX = anchor === 'start' ? p[0] + 4 : anchor === 'end' ? p[0] - 4 : p[0];
|
|
1205
|
-
markPointSvg += '<circle class="' + STYLE_PREFIX + 'charts-markpoint" cx="' + n1(p[0]) + '" cy="' + n1(p[1])
|
|
1206
|
-
+ '" r="4" fill="' + esc(color) + '" stroke="' + DOT_FACE_COLOR + '" stroke-width="2" vector-effect="non-scaling-stroke"/>'
|
|
1207
|
-
+ '<text class="' + STYLE_PREFIX + 'charts-mptext" x="' + n1(labelX) + '" y="' + n1(Math.max(6, p[1] - 8))
|
|
1208
|
-
+ '" text-anchor="' + anchor + '" fill="' + esc(color) + '">'
|
|
1209
|
-
+ esc(mp.label !== undefined && mp.label !== null ? String(mp.label) : fmtValue(main.items[idx].value, line.format))
|
|
1210
|
-
+ '</text>';
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
const points = series.reduce((sum, s) => (s.avg ? sum : sum + s.items.filter((item) => item.value !== null).length), 0);
|
|
1214
|
-
const html = containerOpen('line', line, STYLE_PREFIX + 'charts-line')
|
|
1215
|
-
+ legendHtml(legendEntries)
|
|
1216
|
-
+ svgOpen(line)
|
|
1217
|
-
+ (line.grid ? gridSvg(frame, tickN) : '')
|
|
1218
|
-
+ bandSvg
|
|
1219
|
-
+ fillSvg
|
|
1220
|
-
+ ticksSvg(frame, lo, hi, tickN, line.format)
|
|
1221
|
-
+ markSvg
|
|
1222
|
-
+ pathsSvg
|
|
1223
|
-
+ marksSvg
|
|
1224
|
-
+ valuesSvg
|
|
1225
|
-
+ markPointSvg
|
|
1226
|
-
+ xLabelsSvg(line, frame, items, 'peak', undefined, LINE_LABEL_GAP, line.labelEvery)
|
|
1227
|
-
+ '</svg></div>';
|
|
1228
|
-
return { kind: 'line', html, empty: points === 0, points };
|
|
1229
|
-
}
|
|
1230
|
-
/* ── bar ──────────────────────────────────────────────────────────────── */
|
|
1231
|
-
function barColorFor(index, item, opts, common) {
|
|
1232
|
-
if (common.color !== undefined)
|
|
1233
|
-
return common.color;
|
|
1234
|
-
if (item.color !== undefined)
|
|
1235
|
-
return item.color;
|
|
1236
|
-
if (opts.singleColor === true)
|
|
1237
|
-
return common.colors?.[0] ?? CHART_PALETTE[0];
|
|
1238
|
-
if (common.colors !== undefined && common.colors.length > 0)
|
|
1239
|
-
return common.colors[index % common.colors.length];
|
|
1240
|
-
return DEFAULT_SERIES_COLOR;
|
|
1241
|
-
}
|
|
1242
|
-
function segColorFor(index, item, opts, common) {
|
|
1243
|
-
if (item.color !== undefined)
|
|
1244
|
-
return item.color;
|
|
1245
|
-
if (common.colors !== undefined && common.colors.length > 0)
|
|
1246
|
-
return common.colors[index % common.colors.length];
|
|
1247
|
-
return CHART_PALETTE[index % CHART_PALETTE.length];
|
|
1248
|
-
}
|
|
1249
|
-
function renderBar(raw) {
|
|
1250
|
-
const input = requireObject(raw, 'charts.bar: input');
|
|
1251
|
-
const common = resolveCommon(input.options, { width: 320, height: 170, labels: 'all', showValues: true });
|
|
1252
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1253
|
-
const stacked = opts !== undefined && opts.stacked === true;
|
|
1254
|
-
const grouped = !stacked && opts !== undefined && opts.grouped === true;
|
|
1255
|
-
const multi = stacked || grouped;
|
|
1256
|
-
const items = normalizeItems(input.items, 'bar', false, multi ? 'values' : 'value');
|
|
1257
|
-
if (items.length === 0)
|
|
1258
|
-
return emptyOutput('bar', input.options);
|
|
1259
|
-
const stackMode = opts !== undefined && opts.stackMode === 'absolute' ? 'absolute' : 'percent';
|
|
1260
|
-
const gap = CHART_BREAKPOINTS.stackedGapPx;
|
|
1261
|
-
let segCount = 0;
|
|
1262
|
-
if (multi) {
|
|
1263
|
-
segCount = items[0].values.length;
|
|
1264
|
-
items.forEach((item, i) => {
|
|
1265
|
-
if (item.values === undefined)
|
|
1266
|
-
badStructure('charts.bar: stacked/grouped 模式下 items[' + i + '] 必须含 values 数组');
|
|
1267
|
-
if (item.values.length !== segCount) {
|
|
1268
|
-
badStructure('charts.bar: 各 item values 长度必须一致 (' + segCount + '), items[' + i + ']=' + item.values.length);
|
|
1269
|
-
}
|
|
1270
|
-
});
|
|
1271
|
-
}
|
|
1272
|
-
const segNames = opts !== undefined && Array.isArray(opts.segNames)
|
|
1273
|
-
? opts.segNames.map((name, i) => (typeof name === 'string' && name !== '' ? name : '段' + (i + 1)))
|
|
1274
|
-
: Array.from({ length: segCount }, (_, i) => '段' + (i + 1));
|
|
1275
|
-
/** 全局最大合计(`stackMode: 'absolute'` 的分母);仅多值模式读 `values`。 */
|
|
1276
|
-
const maxTotal = multi
|
|
1277
|
-
? items.reduce((best, item) => {
|
|
1278
|
-
const total = item.values.reduce((a, b) => a + b, 0);
|
|
1279
|
-
return total > best ? total : best;
|
|
1280
|
-
}, 0)
|
|
1281
|
-
: 0;
|
|
1282
|
-
/* #567 柱状 Y 轴刻度(默认不开:`yTicks` 缺省 → 0 条,行为与改前逐字同);
|
|
1283
|
-
* 数值标签抽稀步长(`valueThin`,用户单位;非法值=全标)。 */
|
|
1284
|
-
const barTicks = tickCount(opts === undefined ? undefined : opts.yTicks);
|
|
1285
|
-
const valueThin = opts !== undefined && isNum(opts.valueThin) && opts.valueThin > 0
|
|
1286
|
-
? opts.valueThin
|
|
1287
|
-
: undefined;
|
|
1288
|
-
let lo = 0;
|
|
1289
|
-
let hi = 1;
|
|
1290
|
-
if (stacked && stackMode === 'percent') {
|
|
1291
|
-
lo = 0;
|
|
1292
|
-
hi = 100;
|
|
1293
|
-
}
|
|
1294
|
-
else if (stacked) {
|
|
1295
|
-
const totals = items.map((item) => item.values.reduce((a, b) => a + b, 0));
|
|
1296
|
-
const [dlo, dhi] = domainOf(totals, common.yMin, common.yMax, true, 0);
|
|
1297
|
-
lo = dlo;
|
|
1298
|
-
hi = dhi;
|
|
1299
|
-
}
|
|
1300
|
-
else if (grouped) {
|
|
1301
|
-
const values = [];
|
|
1302
|
-
for (const item of items)
|
|
1303
|
-
for (const v of item.values)
|
|
1304
|
-
values.push(v);
|
|
1305
|
-
const [dlo, dhi] = domainOf(values, common.yMin, common.yMax, true, 0);
|
|
1306
|
-
lo = dlo;
|
|
1307
|
-
hi = dhi;
|
|
1308
|
-
}
|
|
1309
|
-
else {
|
|
1310
|
-
const values = items.map((item) => item.value);
|
|
1311
|
-
const [dlo, dhi] = domainOf(values, common.yMin, common.yMax, true, 0);
|
|
1312
|
-
lo = dlo;
|
|
1313
|
-
hi = dhi;
|
|
1314
|
-
}
|
|
1315
|
-
/* 刻度留白按移动端字号估(与折线同口径 `LINE_TEXT_MOBILE.tick`);不开刻度时三项全 0,
|
|
1316
|
-
* 绘图区几何与改前逐字同(`tickN = 0` 旧口径)。 */
|
|
1317
|
-
let tickTextW = 0;
|
|
1318
|
-
if (barTicks >= 2) {
|
|
1319
|
-
for (let i = 0; i < barTicks; i += 1) {
|
|
1320
|
-
const tv = lo + ((hi - lo) * i) / (barTicks - 1);
|
|
1321
|
-
tickTextW = Math.max(tickTextW, textWidthUnits(fmtValue(round2(tv), common.format), LINE_TEXT_MOBILE.tick));
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
const frame = makeFrame(common, insetsFor(common, {
|
|
1325
|
-
tickWidth: barTicks === 0 ? 0 : (common.compact ? 16 : 22),
|
|
1326
|
-
labelHeight: common.labels === 'none' ? 0 : (common.compact ? 10 : 14),
|
|
1327
|
-
valueHeight: common.compact ? 9 : 12,
|
|
1328
|
-
minLeft: barTicks === 0 ? 0 : Math.ceil(tickTextW) + 9,
|
|
1329
|
-
minTop: barTicks === 0 ? 0 : LINE_TICK_TOP_MIN,
|
|
1330
|
-
}));
|
|
1331
|
-
const yZero = yAt(frame, 0, lo, hi);
|
|
1332
|
-
const slot = frame.w / items.length;
|
|
1333
|
-
const barW = Math.min(slot * (common.compact ? 0.82 : 0.62), 34);
|
|
1334
|
-
let barsSvg = '';
|
|
1335
|
-
items.forEach((item, i) => {
|
|
1336
|
-
const cx = frame.x0 + slot * (i + 0.5);
|
|
1337
|
-
const tip = tipAttrs(common, () => item.label + ': ' + fmtValue(item.value, common.format));
|
|
1338
|
-
if (!multi) {
|
|
1339
|
-
const value = item.value;
|
|
1340
|
-
const yv = yAt(frame, value, lo, hi);
|
|
1341
|
-
const top = Math.min(yZero, yv);
|
|
1342
|
-
const height = Math.max(2, Math.abs(yZero - yv));
|
|
1343
|
-
barsSvg += '<rect class="' + STYLE_PREFIX + 'charts-bar" data-i="' + i + '" x="' + n1(cx - barW / 2)
|
|
1344
|
-
+ '" y="' + n1(top) + '" width="' + n1(barW) + '" height="' + n1(height) + '" rx="2" fill="'
|
|
1345
|
-
+ esc(barColorFor(i, item, opts ?? {}, common)) + '"' + tip + actionAttrs(common, i) + '/>';
|
|
1346
|
-
return;
|
|
1347
|
-
}
|
|
1348
|
-
const values = item.values;
|
|
1349
|
-
const total = values.reduce((a, b) => a + b, 0);
|
|
1350
|
-
if (stacked) {
|
|
1351
|
-
/* 段纵向堆叠:percent = 柱内合计 100%(恒 0-100,不参与 yMin/yMax);absolute = 相对全局最大合计。
|
|
1352
|
-
* 段间距取 `CHART_BREAKPOINTS.stackedGapPx`(R20:子元素间距唯一常量,stacked 段与 grouped 子柱同用)。 */
|
|
1353
|
-
const unit = stackMode === 'percent'
|
|
1354
|
-
? (total > 0 ? frame.h / total : 0)
|
|
1355
|
-
: (maxTotal > 0 ? frame.h / maxTotal : 0);
|
|
1356
|
-
let cursor = frame.y1;
|
|
1357
|
-
values.forEach((value, j) => {
|
|
1358
|
-
const segH = value * unit;
|
|
1359
|
-
const carve = j === 0 ? 0 : gap;
|
|
1360
|
-
barsSvg += '<rect class="' + STYLE_PREFIX + 'charts-seg" data-i="' + i + '" data-seg="' + j + '" x="'
|
|
1361
|
-
+ n1(cx - barW / 2) + '" y="' + n1(cursor - segH + carve) + '" width="' + n1(barW)
|
|
1362
|
-
+ '" height="' + n1(Math.max(1, segH - carve)) + '" rx="2" fill="'
|
|
1363
|
-
+ esc(segColorFor(j, item, opts ?? {}, common)) + '"'
|
|
1364
|
-
+ tipAttrs(common, () => segNames[j] + ': ' + fmtValue(value, common.format)) + actionAttrs(common, i) + '/>';
|
|
1365
|
-
cursor -= segH;
|
|
1366
|
-
});
|
|
1367
|
-
return;
|
|
1368
|
-
}
|
|
1369
|
-
/* grouped:每列 N 根并排子柱(宽度均分,间距 = CHART_BREAKPOINTS.stackedGapPx) */
|
|
1370
|
-
const subW = (barW - gap * (segCount - 1)) / segCount;
|
|
1371
|
-
let group = '<g class="' + STYLE_PREFIX + 'charts-group" data-i="' + i + '" data-gap="' + gap + '">';
|
|
1372
|
-
values.forEach((value, j) => {
|
|
1373
|
-
const x = cx - barW / 2 + j * (subW + gap);
|
|
1374
|
-
const yv = yAt(frame, value, lo, hi);
|
|
1375
|
-
const top = Math.min(yZero, yv);
|
|
1376
|
-
const height = Math.max(2, Math.abs(yZero - yv));
|
|
1377
|
-
group += '<rect class="' + STYLE_PREFIX + 'charts-bar" data-i="' + i + '" data-seg="' + j + '" x="' + n1(x)
|
|
1378
|
-
+ '" y="' + n1(top) + '" width="' + n1(subW) + '" height="' + n1(height) + '" rx="2" fill="'
|
|
1379
|
-
+ esc(segColorFor(j, item, opts ?? {}, common)) + '"'
|
|
1380
|
-
+ tipAttrs(common, () => segNames[j] + ': ' + fmtValue(value, common.format))
|
|
1381
|
-
+ actionAttrs(common, i) + '/>';
|
|
1382
|
-
});
|
|
1383
|
-
barsSvg += group + '</g>';
|
|
1384
|
-
});
|
|
1385
|
-
/* 数值标签:单柱 = 值;stacked = 柱顶合计;grouped = 每子柱顶部。
|
|
1386
|
-
* #567:`false` 无;`true` 全量(`valueThin` 给正数时按柱中心距抽稀,默认不变);
|
|
1387
|
-
* `'edge'` 只标首尾有效点(改前落进全开那支——59 柱 59 枚压字即此 bug);
|
|
1388
|
-
* `'last'` 只标末值。抽稀只作用于柱组一级(grouped 整组取舍,不拆组内子柱)。 */
|
|
1389
|
-
const labelSet = (() => {
|
|
1390
|
-
if (common.showValues === false)
|
|
1391
|
-
return new Set();
|
|
1392
|
-
if (common.showValues === true && valueThin !== undefined) {
|
|
1393
|
-
const keep = new Set();
|
|
1394
|
-
let lastX = -Infinity;
|
|
1395
|
-
items.forEach((item, i) => {
|
|
1396
|
-
if (item.value === null && !multi)
|
|
1397
|
-
return;
|
|
1398
|
-
const cx = frame.x0 + slot * (i + 0.5);
|
|
1399
|
-
if (cx - lastX < valueThin)
|
|
1400
|
-
return;
|
|
1401
|
-
keep.add(i);
|
|
1402
|
-
lastX = cx;
|
|
1403
|
-
});
|
|
1404
|
-
return keep;
|
|
1405
|
-
}
|
|
1406
|
-
if (common.showValues === true)
|
|
1407
|
-
return new Set(items.map((_, i) => i));
|
|
1408
|
-
/* 多值模式(stacked/grouped)的 `item.value` 为空,`valueIndexes` 按值取会落空——
|
|
1409
|
-
* 按柱组取首末(`'edge'` 首尾组、`'last'` 末组),标签内容仍走各组既有口径(合计/子柱值)。 */
|
|
1410
|
-
if (multi) {
|
|
1411
|
-
if (items.length === 0)
|
|
1412
|
-
return new Set();
|
|
1413
|
-
if (common.showValues === 'last')
|
|
1414
|
-
return new Set([items.length - 1]);
|
|
1415
|
-
return new Set(items.length === 1 ? [0] : [0, items.length - 1]);
|
|
1416
|
-
}
|
|
1417
|
-
return new Set(valueIndexes(common.showValues, frame, items));
|
|
1418
|
-
})();
|
|
1419
|
-
let valuesSvg = '';
|
|
1420
|
-
if (labelSet.size > 0) {
|
|
1421
|
-
items.forEach((item, i) => {
|
|
1422
|
-
if (!labelSet.has(i))
|
|
1423
|
-
return;
|
|
1424
|
-
const cx = frame.x0 + slot * (i + 0.5);
|
|
1425
|
-
if (!multi) {
|
|
1426
|
-
const value = item.value;
|
|
1427
|
-
const top = Math.min(yZero, yAt(frame, value, lo, hi));
|
|
1428
|
-
valuesSvg += '<text class="' + STYLE_PREFIX + 'charts-value" x="' + n1(cx) + '" y="' + n1(top - 3)
|
|
1429
|
-
+ '" text-anchor="middle" fill="' + MUTED_COLOR + '">' + esc(fmtValue(value, common.format)) + '</text>';
|
|
1430
|
-
return;
|
|
1431
|
-
}
|
|
1432
|
-
if (stacked) {
|
|
1433
|
-
const total = item.values.reduce((a, b) => a + b, 0);
|
|
1434
|
-
/* 合计标签与段高**同尺度**:段高单位 = frame.h / (percent ? 柱内合计 : 全局最大合计),
|
|
1435
|
-
* 故柱顶 = frame.y1 - total*unit(percent 恒 frame.y0)。旧版标签贴柱顶(`charts.js:277`),
|
|
1436
|
-
* 用带 padding 的 `yAt(domain)` 会落到柱顶下方约 5%(R2-N2)。 */
|
|
1437
|
-
const unit = stackMode === 'percent'
|
|
1438
|
-
? (total > 0 ? frame.h / total : 0)
|
|
1439
|
-
: (maxTotal > 0 ? frame.h / maxTotal : 0);
|
|
1440
|
-
const top = stackMode === 'percent' ? frame.y0 : frame.y1 - total * unit;
|
|
1441
|
-
valuesSvg += '<text class="' + STYLE_PREFIX + 'charts-value ' + STYLE_PREFIX + 'charts-value-total" x="' + n1(cx)
|
|
1442
|
-
+ '" y="' + n1(top - 3) + '" text-anchor="middle" fill="' + MUTED_COLOR + '">'
|
|
1443
|
-
+ esc(fmtValue(total, common.format)) + '</text>';
|
|
1444
|
-
return;
|
|
1445
|
-
}
|
|
1446
|
-
const subW = (barW - gap * (segCount - 1)) / segCount;
|
|
1447
|
-
item.values.forEach((value, j) => {
|
|
1448
|
-
const x = cx - barW / 2 + j * (subW + gap) + subW / 2;
|
|
1449
|
-
const top = Math.min(yZero, yAt(frame, value, lo, hi));
|
|
1450
|
-
valuesSvg += '<text class="' + STYLE_PREFIX + 'charts-value" x="' + n1(x) + '" y="' + n1(top - 3)
|
|
1451
|
-
+ '" text-anchor="middle" fill="' + MUTED_COLOR + '">' + esc(fmtValue(value, common.format)) + '</text>';
|
|
1452
|
-
});
|
|
1453
|
-
});
|
|
1454
|
-
}
|
|
1455
|
-
const legendEntries = multi ? segNames.map((name, j) => ({ name, color: segColorFor(j, items[0], opts ?? {}, common) })) : [];
|
|
1456
|
-
const points = items.length;
|
|
1457
|
-
const html = containerOpen('bar', common, STYLE_PREFIX + 'charts-bar')
|
|
1458
|
-
+ legendHtml(legendEntries)
|
|
1459
|
-
+ svgOpen(common)
|
|
1460
|
-
/* #567:开 `yTicks` 时网格线与刻度线同条数同位置(折线 #512 口径);不开时 `tickN = 0`
|
|
1461
|
-
* 回退旧三线口径,几何与改前逐字同。 */
|
|
1462
|
-
+ (common.grid ? gridSvg(frame, barTicks) : '')
|
|
1463
|
-
+ barsSvg
|
|
1464
|
-
+ valuesSvg
|
|
1465
|
-
+ ticksSvg(frame, lo, hi, barTicks, common.format)
|
|
1466
|
-
/* t-chartfix:柱标签取柱列中心(与 `barsSvg` 同一 band 标度),不得用点标度。 */
|
|
1467
|
-
+ xLabelsSvg(common, frame, items, 'edge', (i, n) => frame.x0 + (frame.w / n) * (i + 0.5))
|
|
1468
|
-
+ '</svg></div>';
|
|
1469
|
-
return { kind: 'bar', html, empty: points === 0, points };
|
|
1470
|
-
}
|
|
1471
|
-
/* ── donut ────────────────────────────────────────────────────────────── */
|
|
1472
|
-
function renderDonut(raw) {
|
|
1473
|
-
const input = requireObject(raw, 'charts.donut: input');
|
|
1474
|
-
const common = resolveCommon(input.options, { width: 150, height: 150, labels: 'none', showValues: false });
|
|
1475
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1476
|
-
const items = normalizeItems(input.items, 'donut', false);
|
|
1477
|
-
if (items.length === 0)
|
|
1478
|
-
return emptyOutput('donut', input.options);
|
|
1479
|
-
const total = items.reduce((sum, item) => sum + Math.max(0, item.value), 0);
|
|
1480
|
-
if (total <= 0)
|
|
1481
|
-
return emptyOutput('donut', input.options, DONUT_ZERO_HINT);
|
|
1482
|
-
const size = numOr(opts === undefined ? undefined : opts.size, 150);
|
|
1483
|
-
const ringWidth = numOr(opts === undefined ? undefined : opts.ringWidth, 16);
|
|
1484
|
-
const legendMode = opts !== undefined && (opts.legend === 'bottom' || opts.legend === 'none') ? opts.legend : 'right';
|
|
1485
|
-
const showPercent = opts === undefined || opts.showPercent !== false;
|
|
1486
|
-
const cx = size / 2;
|
|
1487
|
-
const r = Math.max(20, size / 2 - ringWidth / 2 - 2);
|
|
1488
|
-
const circumference = 2 * Math.PI * r;
|
|
1489
|
-
let offset = 0;
|
|
1490
|
-
let arcs = '';
|
|
1491
|
-
items.forEach((item, i) => {
|
|
1492
|
-
const value = Math.max(0, item.value);
|
|
1493
|
-
if (value <= 0)
|
|
1494
|
-
return;
|
|
1495
|
-
const share = value / total;
|
|
1496
|
-
const color = common.color ?? (item.color ?? (common.colors !== undefined && common.colors.length > 0
|
|
1497
|
-
? common.colors[i % common.colors.length]
|
|
1498
|
-
: CHART_PALETTE[i % CHART_PALETTE.length]));
|
|
1499
|
-
const dash = round2(share * circumference);
|
|
1500
|
-
arcs += '<circle class="' + STYLE_PREFIX + 'charts-arc" data-i="' + i + '" cx="' + n1(cx) + '" cy="' + n1(cx)
|
|
1501
|
-
+ '" r="' + n1(r) + '" fill="none" stroke="' + esc(color) + '" stroke-width="' + ringWidth
|
|
1502
|
-
+ '" stroke-dasharray="' + dash + ' ' + round2(circumference - dash) + '" stroke-dashoffset="' + round2(-offset)
|
|
1503
|
-
+ '" transform="rotate(-90 ' + n1(cx) + ' ' + n1(cx) + ')" vector-effect="non-scaling-stroke"'
|
|
1504
|
-
+ tipAttrs(common, () => item.label + ': ' + fmtValue(value, common.format))
|
|
1505
|
-
+ actionAttrs(common, i) + '/>';
|
|
1506
|
-
offset += share * circumference;
|
|
1507
|
-
});
|
|
1508
|
-
const centerLabel = opts !== undefined && typeof opts.centerLabel === 'string' ? opts.centerLabel : '';
|
|
1509
|
-
const centerValue = opts !== undefined && typeof opts.centerValue === 'string' && opts.centerValue !== ''
|
|
1510
|
-
? opts.centerValue
|
|
1511
|
-
: fmtValue(total, common.format);
|
|
1512
|
-
let center = '';
|
|
1513
|
-
if (centerLabel !== '') {
|
|
1514
|
-
center += '<text class="' + STYLE_PREFIX + 'charts-center-label" x="' + n1(cx) + '" y="' + n1(cx - 2)
|
|
1515
|
-
+ '" text-anchor="middle" fill="' + MUTED_COLOR + '">' + esc(centerLabel) + '</text>';
|
|
1516
|
-
}
|
|
1517
|
-
if (centerValue !== '') {
|
|
1518
|
-
center += '<text class="' + STYLE_PREFIX + 'charts-center-value" x="' + n1(cx) + '" y="' + n1(cx + 12)
|
|
1519
|
-
+ '" text-anchor="middle" fill="var(--fg,#1d1d1f)">' + esc(centerValue) + '</text>';
|
|
1520
|
-
}
|
|
1521
|
-
let legend = '';
|
|
1522
|
-
if (legendMode !== 'none') {
|
|
1523
|
-
legend = '<div class="' + STYLE_PREFIX + 'charts-legend ' + STYLE_PREFIX + 'charts-legend-' + legendMode + '">'
|
|
1524
|
-
+ items.map((item, i) => {
|
|
1525
|
-
const value = Math.max(0, item.value);
|
|
1526
|
-
if (value <= 0)
|
|
1527
|
-
return '';
|
|
1528
|
-
const color = item.color ?? (common.colors !== undefined && common.colors.length > 0
|
|
1529
|
-
? common.colors[i % common.colors.length]
|
|
1530
|
-
: CHART_PALETTE[i % CHART_PALETTE.length]);
|
|
1531
|
-
return '<span class="' + STYLE_PREFIX + 'charts-legend-item"><span class="' + STYLE_PREFIX
|
|
1532
|
-
+ 'charts-legend-swatch" style="background:' + esc(color) + '"></span>' + esc(item.label)
|
|
1533
|
-
+ '<span class="' + STYLE_PREFIX + 'charts-legend-value">' + esc(fmtValue(value, common.format)) + '</span>'
|
|
1534
|
-
+ (showPercent ? '<span class="' + STYLE_PREFIX + 'charts-legend-pct">'
|
|
1535
|
-
+ Math.round((value / total) * 100) + '%</span>' : '') + '</span>';
|
|
1536
|
-
}).join('') + '</div>';
|
|
1537
|
-
}
|
|
1538
|
-
const points = items.filter((item) => item.value > 0).length;
|
|
1539
|
-
const html = containerOpen('donut', common, STYLE_PREFIX + 'charts-donut')
|
|
1540
|
-
+ '<svg class="' + STYLE_PREFIX + 'charts-svg" viewBox="0 0 ' + n1(size) + ' ' + n1(size)
|
|
1541
|
-
+ '" preserveAspectRatio="xMidYMid meet" role="img" focusable="false">'
|
|
1542
|
-
+ '<circle class="' + STYLE_PREFIX + 'charts-ring" cx="' + n1(cx) + '" cy="' + n1(cx) + '" r="' + n1(r)
|
|
1543
|
-
+ '" fill="none" stroke="' + GRID_COLOR + '" stroke-width="' + ringWidth + '" vector-effect="non-scaling-stroke"/>'
|
|
1544
|
-
+ arcs + center + '</svg>'
|
|
1545
|
-
+ legend
|
|
1546
|
-
+ '</div>';
|
|
1547
|
-
return { kind: 'donut', html, empty: points === 0, points };
|
|
1548
|
-
}
|
|
1549
|
-
/* ── progress ─────────────────────────────────────────────────────────── */
|
|
1550
|
-
function renderProgress(raw) {
|
|
1551
|
-
const input = requireObject(raw, 'charts.progress: input');
|
|
1552
|
-
const common = resolveCommon(input.options, { width: 100, height: 8, labels: 'none', showValues: false });
|
|
1553
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1554
|
-
const pct = normalizePct(input.pct, 'progress');
|
|
1555
|
-
const color = common.color ?? DEFAULT_SERIES_COLOR;
|
|
1556
|
-
const fillW = (common.width * pct) / 100;
|
|
1557
|
-
const radius = common.height / 2;
|
|
1558
|
-
let fill = esc(color);
|
|
1559
|
-
let defs = '';
|
|
1560
|
-
if (opts !== undefined && opts.gradient === true) {
|
|
1561
|
-
const id = STYLE_PREFIX + 'charts-grad-' + hash32(color + '|' + CHART_PALETTE[5]);
|
|
1562
|
-
defs = '<defs><linearGradient id="' + id + '" x1="0" y1="0" x2="1" y2="0">'
|
|
1563
|
-
+ '<stop offset="0" stop-color="' + esc(color) + '"/>'
|
|
1564
|
-
+ '<stop offset="1" stop-color="' + CHART_PALETTE[5] + '"/>'
|
|
1565
|
-
+ '</linearGradient></defs>';
|
|
1566
|
-
fill = 'url(#' + id + ')';
|
|
1567
|
-
}
|
|
1568
|
-
const showPct = opts === undefined || opts.showPct !== false;
|
|
1569
|
-
/* `height` 的旧契约语义 = **轨道 px**(`docs/research/t92-old-v130-signatures.md:180`
|
|
1570
|
-
* 「`height(轨道px)`」;旧 `charts.js:370-372` 写成内联 `height:Npx`)——只进 viewBox 会让
|
|
1571
|
-
* 缺省 8 在 320px 容器渲染约 25.6px 高(3 倍厚,R2-N11),故 svg 内联 `style="height:Npx"`。 */
|
|
1572
|
-
const html = containerOpen('progress', common, STYLE_PREFIX + 'charts-progress')
|
|
1573
|
-
+ '<svg class="' + STYLE_PREFIX + 'charts-svg" viewBox="0 0 ' + n1(common.width) + ' ' + n1(common.height)
|
|
1574
|
-
+ '" style="height:' + common.height + 'px"'
|
|
1575
|
-
+ ' preserveAspectRatio="none" role="img" focusable="false" data-pct="' + pct + '">'
|
|
1576
|
-
+ defs
|
|
1577
|
-
+ '<rect class="' + STYLE_PREFIX + 'charts-track" x="0" y="0" width="' + n1(common.width) + '" height="'
|
|
1578
|
-
+ n1(common.height) + '" rx="' + n1(radius) + '" fill="' + GRID_COLOR + '"/>'
|
|
1579
|
-
+ '<rect class="' + STYLE_PREFIX + 'charts-fillbar" x="0" y="0" width="' + n1(fillW) + '" height="'
|
|
1580
|
-
+ n1(common.height) + '" rx="' + n1(radius) + '" fill="' + fill + '"/>'
|
|
1581
|
-
+ '</svg>'
|
|
1582
|
-
+ (showPct ? '<span class="' + STYLE_PREFIX + 'charts-pct">' + Math.round(pct) + '%</span>' : '')
|
|
1583
|
-
+ '</div>';
|
|
1584
|
-
return { kind: 'progress', html, empty: false, points: 1 };
|
|
1585
|
-
}
|
|
1586
|
-
/* ── combo ────────────────────────────────────────────────────────────── */
|
|
1587
|
-
function renderCombo(raw) {
|
|
1588
|
-
const input = requireObject(raw, 'charts.combo: input');
|
|
1589
|
-
const common = resolveCommon(input.options, { width: 320, height: 170, labels: 'all', showValues: true });
|
|
1590
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1591
|
-
const bars = normalizeItems(input.bars, 'combo', false);
|
|
1592
|
-
const lines = normalizeItems(input.lines, 'combo', false);
|
|
1593
|
-
if (bars.length === 0 && lines.length === 0)
|
|
1594
|
-
return emptyOutput('combo', input.options);
|
|
1595
|
-
if (bars.length > 0 && lines.length > 0) {
|
|
1596
|
-
if (bars.length !== lines.length) {
|
|
1597
|
-
badStructure('charts.combo: bars 与 lines 长度不一致 (' + bars.length + ' vs ' + lines.length + ')');
|
|
1598
|
-
}
|
|
1599
|
-
bars.forEach((item, i) => {
|
|
1600
|
-
if (item.label !== lines[i].label) {
|
|
1601
|
-
badStructure('charts.combo: bars 与 lines 的 label 必须一致 (items[' + i + ']: ' + item.label + ' vs ' + lines[i].label + ')');
|
|
1602
|
-
}
|
|
1603
|
-
});
|
|
1604
|
-
}
|
|
1605
|
-
const n = bars.length > 0 ? bars.length : lines.length;
|
|
1606
|
-
const barColor = opts !== undefined && typeof opts.barColor === 'string' && opts.barColor !== ''
|
|
1607
|
-
? opts.barColor
|
|
1608
|
-
: (common.color ?? DEFAULT_SERIES_COLOR);
|
|
1609
|
-
const lineColor = opts !== undefined && typeof opts.lineColor === 'string' && opts.lineColor !== ''
|
|
1610
|
-
? opts.lineColor
|
|
1611
|
-
: DEFAULT_MARK_COLOR;
|
|
1612
|
-
const values = [];
|
|
1613
|
-
for (const item of bars)
|
|
1614
|
-
values.push(item.value);
|
|
1615
|
-
for (const item of lines)
|
|
1616
|
-
values.push(item.value);
|
|
1617
|
-
/* combo 共享域 = 0..max(柱值, 线值),**无外扩**(旧 `charts.js:742-753`:柱高 = 值/maxV,柱顶即域顶)。 */
|
|
1618
|
-
const [lo, hi] = domainOf(values, common.yMin, common.yMax, true, 0);
|
|
1619
|
-
const frame = makeFrame(common, insetsFor(common, {
|
|
1620
|
-
tickWidth: 0,
|
|
1621
|
-
labelHeight: common.labels === 'none' ? 0 : (common.compact ? 10 : 14),
|
|
1622
|
-
valueHeight: common.compact ? 9 : 12,
|
|
1623
|
-
}));
|
|
1624
|
-
const yZero = yAt(frame, 0, lo, hi);
|
|
1625
|
-
const slot = frame.w / n;
|
|
1626
|
-
const barW = Math.min(slot * (common.compact ? 0.82 : 0.62), 34);
|
|
1627
|
-
let barsSvg = '';
|
|
1628
|
-
bars.forEach((item, i) => {
|
|
1629
|
-
const cx = frame.x0 + slot * (i + 0.5);
|
|
1630
|
-
const value = item.value;
|
|
1631
|
-
const top = Math.min(yZero, yAt(frame, value, lo, hi));
|
|
1632
|
-
const height = Math.max(2, Math.abs(yZero - yAt(frame, value, lo, hi)));
|
|
1633
|
-
barsSvg += '<rect class="' + STYLE_PREFIX + 'charts-bar" data-i="' + i + '" x="' + n1(cx - barW / 2) + '" y="'
|
|
1634
|
-
+ n1(top) + '" width="' + n1(barW) + '" height="' + n1(height) + '" rx="2" fill="' + esc(barColor) + '"'
|
|
1635
|
-
+ tipAttrs(common, () => item.label + ': ' + fmtValue(value, common.format)) + actionAttrs(common, i) + '/>';
|
|
1636
|
-
});
|
|
1637
|
-
let lineSvg = '';
|
|
1638
|
-
if (lines.length > 0) {
|
|
1639
|
-
/* FX-A1c-01(编排者改判:缺陷):线点 x 取**柱列中心**,与柱共用同一 band 标度
|
|
1640
|
-
* `frame.x0 + slot*(i+0.5)`(`slot = frame.w / n`,`n = bars.length || lines.length`)。
|
|
1641
|
-
* 旧版把线点 `<i>` 放进柱列容器内 `left:50%`(`old-baseline.md:442`/`charts.js:429`),
|
|
1642
|
-
* 再由 DOM 校准对齐列心(`charts.js:779-795`);R19 豁免的只是 `getBoundingClientRect` 测量,
|
|
1643
|
-
* **不含 x 对齐**——同一 band 标度就是「同一坐标系」的可断言等价物(R9「线点=柱顶」)。 */
|
|
1644
|
-
const pts = lines.map((item, i) => [frame.x0 + slot * (i + 0.5), yAt(frame, item.value, lo, hi), false]);
|
|
1645
|
-
lineSvg += '<path class="' + STYLE_PREFIX + 'charts-line ' + STYLE_PREFIX + 'charts-combo-line" d="'
|
|
1646
|
-
+ polyPath(pts, true) + '" fill="none" stroke="' + esc(lineColor)
|
|
1647
|
-
+ '" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round" vector-effect="non-scaling-stroke"/>';
|
|
1648
|
-
pts.forEach((p, i) => {
|
|
1649
|
-
lineSvg += '<circle class="' + STYLE_PREFIX + 'charts-dot" data-i="' + i + '" cx="' + n1(p[0]) + '" cy="'
|
|
1650
|
-
+ n1(p[1]) + '" r="3" fill="' + DOT_FACE_COLOR + '" stroke="' + esc(lineColor)
|
|
1651
|
-
+ '" stroke-width="1.5" vector-effect="non-scaling-stroke"'
|
|
1652
|
-
+ tipAttrs(common, () => lines[i].label + ': ' + fmtValue(lines[i].value, common.format))
|
|
1653
|
-
+ actionAttrs(common, i) + '/>';
|
|
1654
|
-
});
|
|
1655
|
-
}
|
|
1656
|
-
let valuesSvg = '';
|
|
1657
|
-
if (common.showValues !== false) {
|
|
1658
|
-
bars.forEach((item, i) => {
|
|
1659
|
-
const cx = frame.x0 + slot * (i + 0.5);
|
|
1660
|
-
const top = Math.min(yZero, yAt(frame, item.value, lo, hi));
|
|
1661
|
-
valuesSvg += '<text class="' + STYLE_PREFIX + 'charts-value" x="' + n1(cx) + '" y="' + n1(top - 3)
|
|
1662
|
-
+ '" text-anchor="middle" fill="' + MUTED_COLOR + '">' + esc(fmtValue(item.value, common.format)) + '</text>';
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
const legend = opts !== undefined && opts.legend === true
|
|
1666
|
-
? legendHtml([{ name: '量', color: barColor }, { name: '趋势', color: lineColor }])
|
|
1667
|
-
: '';
|
|
1668
|
-
const points = bars.length + lines.length;
|
|
1669
|
-
const html = containerOpen('combo', common, STYLE_PREFIX + 'charts-combo')
|
|
1670
|
-
+ legend
|
|
1671
|
-
+ svgOpen(common)
|
|
1672
|
-
+ (common.grid ? gridSvg(frame) : '')
|
|
1673
|
-
+ barsSvg
|
|
1674
|
-
+ lineSvg
|
|
1675
|
-
+ valuesSvg
|
|
1676
|
-
/* t-chartfix:与 bar 同因——combo 柱列/线点同走 band 标度,标签亦然。 */
|
|
1677
|
-
+ xLabelsSvg(common, frame, bars.length > 0 ? bars : lines, 'peak', (i, n) => frame.x0 + (frame.w / n) * (i + 0.5))
|
|
1678
|
-
+ '</svg></div>';
|
|
1679
|
-
return { kind: 'combo', html, empty: points === 0, points };
|
|
1680
|
-
}
|
|
1681
|
-
/* ── sparkline ────────────────────────────────────────────────────────── */
|
|
1682
|
-
function renderSparkline(raw) {
|
|
1683
|
-
const input = requireObject(raw, 'charts.sparkline: input');
|
|
1684
|
-
const common = resolveCommon(input.options, { width: 90, height: 30, labels: 'none', showValues: false });
|
|
1685
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1686
|
-
const items = normalizeItems(input.items, 'sparkline', false);
|
|
1687
|
-
if (items.length === 0)
|
|
1688
|
-
return emptyOutput('sparkline', input.options);
|
|
1689
|
-
const values = items.map((item) => item.value);
|
|
1690
|
-
const min = Math.min(...values);
|
|
1691
|
-
const max = Math.max(...values);
|
|
1692
|
-
const span = max === min ? 1 : max - min;
|
|
1693
|
-
const pad = 2;
|
|
1694
|
-
const frame = makeFrame(common, { left: pad, right: pad, top: pad, bottom: pad });
|
|
1695
|
-
const pts = items.map((item, i) => [
|
|
1696
|
-
xAt(frame, i, items.length),
|
|
1697
|
-
frame.y1 - ((item.value - min) / span) * frame.h,
|
|
1698
|
-
false,
|
|
1699
|
-
]);
|
|
1700
|
-
const rising = values[values.length - 1] >= values[0];
|
|
1701
|
-
const color = common.color ?? (rising ? UP_COLOR : DOWN_COLOR);
|
|
1702
|
-
const showValue = opts === undefined || opts.showValue !== false;
|
|
1703
|
-
let valueSvg = '';
|
|
1704
|
-
if (showValue) {
|
|
1705
|
-
valueSvg = '<text class="' + STYLE_PREFIX + 'charts-spark-value ' + STYLE_PREFIX + 'charts-' + (rising ? 'up' : 'down')
|
|
1706
|
-
+ '" x="' + n1(frame.x1) + '" y="' + n1(frame.y0 + 4) + '" text-anchor="end" fill="' + esc(color) + '">'
|
|
1707
|
-
+ esc(fmtValue(values[values.length - 1], common.format)) + '</text>';
|
|
1708
|
-
}
|
|
1709
|
-
const html = containerOpen('sparkline', common, STYLE_PREFIX + 'charts-spark')
|
|
1710
|
-
+ svgOpen(common)
|
|
1711
|
-
+ '<polyline class="' + STYLE_PREFIX + 'charts-sparkline" points="'
|
|
1712
|
-
+ pts.map((p) => n1(p[0]) + ',' + n1(p[1])).join(' ')
|
|
1713
|
-
+ '" fill="none" stroke="' + esc(color)
|
|
1714
|
-
+ '" stroke-width="2" stroke-linejoin="round" stroke-linecap="round" vector-effect="non-scaling-stroke"/>'
|
|
1715
|
-
+ valueSvg
|
|
1716
|
-
+ '</svg></div>';
|
|
1717
|
-
return { kind: 'sparkline', html, empty: false, points: items.length };
|
|
1718
|
-
}
|
|
1719
|
-
/* ── gauge ────────────────────────────────────────────────────────────── */
|
|
1720
|
-
function renderGauge(raw) {
|
|
1721
|
-
const input = requireObject(raw, 'charts.gauge: input');
|
|
1722
|
-
const common = resolveCommon(input.options, { width: 170, height: 105, labels: 'none', showValues: false });
|
|
1723
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1724
|
-
const pct = normalizePct(input.pct, 'gauge');
|
|
1725
|
-
const size = numOr(opts === undefined ? undefined : opts.size, 170);
|
|
1726
|
-
const height = Math.round(size * 0.62);
|
|
1727
|
-
const cx = size / 2;
|
|
1728
|
-
const r = Math.min(size / 2 - 4, height - 8);
|
|
1729
|
-
const cy = height - 4;
|
|
1730
|
-
const color = common.color ?? DEFAULT_SERIES_COLOR;
|
|
1731
|
-
const fraction = pct / 100;
|
|
1732
|
-
const endAngle = Math.PI * (1 - fraction);
|
|
1733
|
-
const x1 = cx + r * Math.cos(endAngle);
|
|
1734
|
-
const y1 = cy - r * Math.sin(endAngle);
|
|
1735
|
-
const startX = cx - r;
|
|
1736
|
-
const label = opts !== undefined && typeof opts.label === 'string' ? opts.label : '';
|
|
1737
|
-
const valueText = common.format !== undefined
|
|
1738
|
-
? String(common.format(Math.round(pct)))
|
|
1739
|
-
: Math.round(pct) + '%';
|
|
1740
|
-
const html = containerOpen('gauge', common, STYLE_PREFIX + 'charts-gauge')
|
|
1741
|
-
+ '<svg class="' + STYLE_PREFIX + 'charts-svg" viewBox="0 0 ' + n1(size) + ' ' + n1(height)
|
|
1742
|
-
+ '" preserveAspectRatio="xMidYMid meet" role="img" focusable="false" data-pct="' + pct + '">'
|
|
1743
|
-
+ '<path class="' + STYLE_PREFIX + 'charts-gauge-bg" d="M' + n1(startX) + ' ' + n1(cy) + ' A' + n1(r) + ' '
|
|
1744
|
-
+ n1(r) + ' 0 0 1 ' + n1(cx + r) + ' ' + n1(cy) + '" fill="none" stroke="' + GRID_COLOR
|
|
1745
|
-
+ '" stroke-width="12" stroke-linecap="round" vector-effect="non-scaling-stroke"/>'
|
|
1746
|
-
+ '<path class="' + STYLE_PREFIX + 'charts-gauge-fg" d="M' + n1(startX) + ' ' + n1(cy) + ' A' + n1(r) + ' '
|
|
1747
|
-
+ n1(r) + ' 0 0 1 ' + n1(x1) + ' ' + n1(y1) + '" fill="none" stroke="' + esc(color)
|
|
1748
|
-
+ '" stroke-width="12" stroke-linecap="round" vector-effect="non-scaling-stroke"/>'
|
|
1749
|
-
+ '<text class="' + STYLE_PREFIX + 'charts-gauge-value" x="' + n1(cx) + '" y="' + n1(cy - 14)
|
|
1750
|
-
+ '" text-anchor="middle" fill="var(--fg,#1d1d1f)">' + esc(valueText) + '</text>'
|
|
1751
|
-
+ (label === '' ? '' : '<text class="' + STYLE_PREFIX + 'charts-gauge-label" x="' + n1(cx) + '" y="'
|
|
1752
|
-
+ n1(cy - 2) + '" text-anchor="middle" fill="' + MUTED_COLOR + '">' + esc(label) + '</text>')
|
|
1753
|
-
+ '</svg></div>';
|
|
1754
|
-
return { kind: 'gauge', html, empty: false, points: 1 };
|
|
1755
|
-
}
|
|
1756
|
-
/* ── scatter ──────────────────────────────────────────────────────────── */
|
|
1757
|
-
function normalizeScatterItems(raw) {
|
|
1758
|
-
if (!Array.isArray(raw)) {
|
|
1759
|
-
badStructure('charts.scatter: items 必须是数组, 收到 ' + (raw === null ? 'null' : typeof raw));
|
|
1760
|
-
}
|
|
1761
|
-
return raw.map((entry, i) => {
|
|
1762
|
-
const field = 'charts.scatter: items[' + i + ']';
|
|
1763
|
-
const item = requireObject(entry, field);
|
|
1764
|
-
if (!isNum(item.x) || !isNum(item.y)) {
|
|
1765
|
-
badStructure(field + '.x/y 无效(缺省/非数字): ' + JSON.stringify({ x: item.x === undefined ? null : item.x, y: item.y === undefined ? null : item.y }));
|
|
1766
|
-
}
|
|
1767
|
-
return {
|
|
1768
|
-
x: item.x,
|
|
1769
|
-
y: item.y,
|
|
1770
|
-
...(typeof item.label === 'string' && item.label !== '' ? { label: item.label } : {}),
|
|
1771
|
-
};
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
function renderScatter(raw) {
|
|
1775
|
-
const input = requireObject(raw, 'charts.scatter: input');
|
|
1776
|
-
const common = resolveCommon(input.options, { width: 320, height: 180, labels: 'edge', showValues: false });
|
|
1777
|
-
const opts = isPlainObject(input.options) ? input.options : undefined;
|
|
1778
|
-
const items = normalizeScatterItems(input.items);
|
|
1779
|
-
if (items.length === 0)
|
|
1780
|
-
return emptyOutput('scatter', input.options);
|
|
1781
|
-
const xs = items.map((item) => item.x);
|
|
1782
|
-
const ys = items.map((item) => item.y);
|
|
1783
|
-
const [xlo, xhi] = domainOf(xs, undefined, undefined, false);
|
|
1784
|
-
const [ylo, yhi] = domainOf(ys, common.yMin, common.yMax, false);
|
|
1785
|
-
const frame = makeFrame(common, insetsFor(common, {
|
|
1786
|
-
tickWidth: common.compact ? 16 : 22,
|
|
1787
|
-
labelHeight: common.labels === 'none' ? 0 : (common.compact ? 10 : 14),
|
|
1788
|
-
valueHeight: common.compact ? 9 : 12,
|
|
1789
|
-
}));
|
|
1790
|
-
/* 显式 `dotSize` 必须走**内联样式**:CSS 几何属性 `r`(`.…-scatter .…-dot{r:calc(var(--…-dot)/2)}`)
|
|
1791
|
-
* 优先于 SVG 呈现属性,只写 `r="…"` 会被 CSS 覆盖成缺省半径(R2-N10/FX-78-A1b-02)。 */
|
|
1792
|
-
const dotSize = numOr(opts === undefined ? undefined : opts.dotSize, SCATTER_DOT_DEFAULT_PX);
|
|
1793
|
-
const dotSizeExplicit = opts !== undefined && isNum(opts.dotSize);
|
|
1794
|
-
const color = common.color ?? DEFAULT_SERIES_COLOR;
|
|
1795
|
-
let dotsSvg = '';
|
|
1796
|
-
items.forEach((item, i) => {
|
|
1797
|
-
const x = frame.x0 + ((item.x - xlo) / (xhi - xlo)) * frame.w;
|
|
1798
|
-
const y = yAt(frame, item.y, ylo, yhi);
|
|
1799
|
-
dotsSvg += '<circle class="' + STYLE_PREFIX + 'charts-dot" data-i="' + i + '" cx="' + n1(x) + '" cy="' + n1(y)
|
|
1800
|
-
+ '" r="' + dotSize / 2 + '"' + (dotSizeExplicit ? ' style="r:' + dotSize / 2 + '"' : '')
|
|
1801
|
-
+ ' fill="' + DOT_FACE_COLOR + '" stroke="' + esc(color)
|
|
1802
|
-
+ '" stroke-width="1.5" vector-effect="non-scaling-stroke"'
|
|
1803
|
-
+ tipAttrs(common, () => (item.label === undefined ? String(item.x) : item.label) + ': ' + fmtValue(item.y, common.format))
|
|
1804
|
-
+ actionAttrs(common, i) + '/>';
|
|
1805
|
-
});
|
|
1806
|
-
/* 最小二乘回归线(`regression !== false` 且 n >= 2) */
|
|
1807
|
-
let regressionSvg = '';
|
|
1808
|
-
if ((opts === undefined || opts.regression !== false) && items.length >= 2) {
|
|
1809
|
-
const n = items.length;
|
|
1810
|
-
let sx = 0;
|
|
1811
|
-
let sy = 0;
|
|
1812
|
-
let sxy = 0;
|
|
1813
|
-
let sxx = 0;
|
|
1814
|
-
for (const item of items) {
|
|
1815
|
-
sx += item.x;
|
|
1816
|
-
sy += item.y;
|
|
1817
|
-
sxy += item.x * item.y;
|
|
1818
|
-
sxx += item.x * item.x;
|
|
1819
|
-
}
|
|
1820
|
-
const denom = n * sxx - sx * sx;
|
|
1821
|
-
const slope = denom === 0 ? 0 : (n * sxy - sx * sy) / denom;
|
|
1822
|
-
const intercept = (sy - slope * sx) / n;
|
|
1823
|
-
const yOf = (x) => slope * x + intercept;
|
|
1824
|
-
const rx0 = frame.x0;
|
|
1825
|
-
const rx1 = frame.x1;
|
|
1826
|
-
const regressionColor = opts !== undefined && typeof opts.regressionColor === 'string' && opts.regressionColor !== ''
|
|
1827
|
-
? opts.regressionColor
|
|
1828
|
-
: DEFAULT_REGRESSION_COLOR;
|
|
1829
|
-
regressionSvg = '<line class="' + STYLE_PREFIX + 'charts-regression" x1="' + n1(rx0) + '" y1="'
|
|
1830
|
-
+ n1(yAt(frame, yOf(xlo), ylo, yhi)) + '" x2="' + n1(rx1) + '" y2="' + n1(yAt(frame, yOf(xhi), ylo, yhi))
|
|
1831
|
-
+ '" stroke="' + esc(regressionColor) + '" stroke-width="1.5" stroke-dasharray="5 4" vector-effect="non-scaling-stroke"/>';
|
|
1832
|
-
}
|
|
1833
|
-
const labels = common.labels;
|
|
1834
|
-
let xLabels = '';
|
|
1835
|
-
if (labels !== 'none') {
|
|
1836
|
-
const baseY = frame.y1 + (common.compact ? 9 : 12);
|
|
1837
|
-
const pick = labels === 'all' ? items.map((_, i) => i) : items.length === 1 ? [0] : [0, items.length - 1];
|
|
1838
|
-
xLabels = pick.map((i) => {
|
|
1839
|
-
const x = frame.x0 + ((items[i].x - xlo) / (xhi - xlo)) * frame.w;
|
|
1840
|
-
const rotate = common.labelRotate === 0 ? '' : ' transform="rotate(' + common.labelRotate + ' ' + n1(x) + ' ' + n1(baseY) + ')"';
|
|
1841
|
-
const text = items[i].label === undefined ? fmtValue(items[i].x, common.format) : items[i].label;
|
|
1842
|
-
return '<text class="' + STYLE_PREFIX + 'charts-xlabel" x="' + n1(x) + '" y="' + n1(baseY)
|
|
1843
|
-
+ '" text-anchor="middle"' + rotate + ' fill="' + MUTED_COLOR + '">' + esc(text) + '</text>';
|
|
1844
|
-
}).join('');
|
|
1845
|
-
}
|
|
1846
|
-
const points = items.length;
|
|
1847
|
-
const html = containerOpen('scatter', common, STYLE_PREFIX + 'charts-scatter')
|
|
1848
|
-
+ svgOpen(common)
|
|
1849
|
-
+ (common.grid ? gridSvg(frame, SCATTER_Y_TICKS) : '')
|
|
1850
|
-
+ ticksSvg(frame, ylo, yhi, SCATTER_Y_TICKS, common.format)
|
|
1851
|
-
+ regressionSvg
|
|
1852
|
-
+ dotsSvg
|
|
1853
|
-
+ xLabels
|
|
1854
|
-
+ '</svg></div>';
|
|
1855
|
-
return { kind: 'scatter', html, empty: points === 0, points };
|
|
1856
|
-
}
|
|
1857
|
-
const CHART_DISPATCH = {
|
|
1858
|
-
bar: renderBar,
|
|
1859
|
-
line: renderLine,
|
|
1860
|
-
donut: renderDonut,
|
|
1861
|
-
progress: renderProgress,
|
|
1862
|
-
combo: renderCombo,
|
|
1863
|
-
sparkline: renderSparkline,
|
|
1864
|
-
gauge: renderGauge,
|
|
1865
|
-
scatter: renderScatter,
|
|
1866
|
-
};
|
|
1867
|
-
const PROXY_SAFE_KEYS = ['then', 'toJSON', 'inspect', 'constructor', 'toString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString'];
|
|
1868
|
-
/** 冻结签名:`ChartsApi`(8 方法,去掉旧 `el` 参数,DOM 由调用方挂载)。
|
|
1869
|
-
* 派表按 `ChartKind` 键入(`satisfies ChartDispatch` 已在编译期校验 8 个键与签名);
|
|
1870
|
-
* **JS 调用方**访问表外 key(如 `charts['pie']`)→ 调用即抛 `ChartError` code `kind-unknown`
|
|
1871
|
-
* (类型层不可达,R15)。导出类型 = 冻结 `ChartsApi`,**不用 `as` 断言**(FX-78-A1b-15)。 */
|
|
1872
|
-
export const charts = new Proxy(CHART_DISPATCH, {
|
|
1873
|
-
get(target, prop, receiver) {
|
|
1874
|
-
if (typeof prop === 'string' && !Object.prototype.hasOwnProperty.call(target, prop)
|
|
1875
|
-
&& !PROXY_SAFE_KEYS.includes(prop)) {
|
|
1876
|
-
return () => badKind(prop);
|
|
1877
|
-
}
|
|
1878
|
-
return Reflect.get(target, prop, receiver);
|
|
1879
|
-
},
|
|
1880
|
-
});
|
|
1881
|
-
/* ── 图表 CSS 文本(R12:唯一产出者 = 本文件内部常量/函数;#75 复用同一份) ── */
|
|
1882
|
-
/** t512:折线族六个文本类的一组字号规则(**用户单位**,逐档补偿后的值——算式见 `LINE_TEXT_WIDE_UNITS`)。
|
|
1883
|
-
* 类名与字形族与 ≤720px 段的六条逐字同款,只换数字;抽成一函数免得三档各抄一遍走散。 */
|
|
1884
|
-
function lineFontRules(p, units) {
|
|
1885
|
-
return '.' + p + 'charts-line .' + p + 'charts-tick{font-size:' + units + 'px}'
|
|
1886
|
-
+ '.' + p + 'charts-line .' + p + 'charts-xlabel{font-size:' + units + 'px}'
|
|
1887
|
-
+ '.' + p + 'charts-line .' + p + 'charts-value{font-size:' + units + 'px}'
|
|
1888
|
-
+ '.' + p + 'charts-line .' + p + 'charts-value-last{font-size:' + units + 'px}'
|
|
1889
|
-
+ '.' + p + 'charts-line .' + p + 'charts-marktext{font-size:' + units + 'px}'
|
|
1890
|
-
+ '.' + p + 'charts-line .' + p + 'charts-marktext-v{font-size:' + units + 'px}';
|
|
1891
|
-
}
|
|
1892
|
-
/** 图表样式文本(**唯一一份**):类名走 `prefix` 命名空间;容器零 padding;
|
|
1893
|
-
* 断点数值逐值取 `CHART_BREAKPOINTS`(`mobileMaxPx`/`dotSizeMobilePx`)。
|
|
1894
|
-
* (`lineHeightMobilePx` 自 #424 返工起不再进 CSS:折线在移动端改按 viewBox 长宽比派生高度,
|
|
1895
|
-
* 见下方 ≤720px 段的注释;该常量仍留在冻结的 `CHART_BREAKPOINTS` 里不动。)
|
|
1896
|
-
*
|
|
1897
|
-
* **#75 复用点**:`buildStyleSheet()` 的 `charts` 样式区直接引用本函数产出,
|
|
1898
|
-
* **不得**在别处重述图表 CSS 文本(#78 结论,违反即 S1)。
|
|
1899
|
-
* 本函数**不从 `src/index.ts` 导出**——冻结面无该条目,导出会打破
|
|
1900
|
-
* 「新增运行时出口恰好等于清单 implemented 的运行时项」出口面锁(同 `ChartError` 口径)。 */
|
|
1901
|
-
export function chartsCss(prefix) {
|
|
1902
|
-
const p = prefix;
|
|
1903
|
-
const mobile = CHART_BREAKPOINTS.mobileMaxPx;
|
|
1904
|
-
const dotMobile = CHART_BREAKPOINTS.dotSizeMobilePx;
|
|
1905
|
-
return [
|
|
1906
|
-
'.' + p + 'charts{position:relative;margin:0;padding:0;box-sizing:border-box;font-family:inherit;color:var(--fg,#1d1d1f);--' + p + 'charts-dot:' + SCATTER_DOT_DEFAULT_PX + 'px}',
|
|
1907
|
-
'.' + p + 'charts *{box-sizing:border-box}',
|
|
1908
|
-
'.' + p + 'charts-svg{display:block;width:100%;height:auto;overflow:visible}',
|
|
1909
|
-
'.' + p + 'charts-empty{padding:0}',
|
|
1910
|
-
'.' + p + 'charts-anim .' + p + 'charts-line{transition:stroke-dashoffset .8s cubic-bezier(.22,1,.36,1)}',
|
|
1911
|
-
'.' + p + 'charts-anim .' + p + 'charts-bar{transition:height .5s cubic-bezier(.22,1,.36,1)}',
|
|
1912
|
-
'.' + p + 'charts-anim .' + p + 'charts-fillbar{transition:width .5s cubic-bezier(.22,1,.36,1)}',
|
|
1913
|
-
'.' + p + 'charts-anim .' + p + 'charts-dot{animation:' + p + 'charts-fade .5s ease both}',
|
|
1914
|
-
'@keyframes ' + p + 'charts-fade{from{opacity:0}to{opacity:1}}',
|
|
1915
|
-
'.' + p + 'charts-dot{pointer-events:none}',
|
|
1916
|
-
'.' + p + 'charts-dot-anomaly{filter:drop-shadow(0 0 3px rgba(255,59,48,.18))}',
|
|
1917
|
-
'.' + p + 'charts-markpoint{filter:drop-shadow(0 1px 2px rgba(0,0,0,.28))}',
|
|
1918
|
-
'.' + p + 'charts-scatter .' + p + 'charts-dot{r:calc(var(--' + p + 'charts-dot) / 2)}',
|
|
1919
|
-
'.' + p + 'charts-legend{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;line-height:1.5;color:var(--fg2,#6e6e73)}',
|
|
1920
|
-
'.' + p + 'charts-legend-right{flex-direction:column;align-items:flex-start}',
|
|
1921
|
-
'.' + p + 'charts-legend-bottom{flex-direction:row;justify-content:center}',
|
|
1922
|
-
'.' + p + 'charts-legend-item{display:inline-flex;align-items:center;gap:6px}',
|
|
1923
|
-
'.' + p + 'charts-legend-swatch{display:inline-block;width:8px;height:8px;border-radius:2px}',
|
|
1924
|
-
'.' + p + 'charts-legend-swatch-dashed{background:repeating-linear-gradient(90deg,var(--fg3,#86868b) 0 4px,transparent 4px 8px)}',
|
|
1925
|
-
'.' + p + 'charts-legend-value{color:var(--fg,#1d1d1f)}',
|
|
1926
|
-
'.' + p + 'charts-legend-pct{color:var(--fg3,#86868b)}',
|
|
1927
|
-
'.' + p + 'charts-pct{display:block;font-size:12px;color:var(--fg2,#6e6e73);text-align:right}',
|
|
1928
|
-
/* t-chartfix:进度轨道最小可辨高度 12px。`height` 选项→内联 `height:Npx`/viewBox
|
|
1929
|
-
* 的映射由 `E.height` 钉死(缺省 8)不得改;此处只加样式层下限(不同属性,不与
|
|
1930
|
-
* 内联 height 冲突),缺省与过小的自定义高度渲染为 12px,65% 处可读。 */
|
|
1931
|
-
'.' + p + 'charts-progress .' + p + 'charts-svg{min-height:12px}',
|
|
1932
|
-
'.' + p + 'charts-spark-value{font-size:11px}',
|
|
1933
|
-
/* 文本字号(旧 `charts.js:55,67,70,79,87,90,92,96,102-103,113,122` 逐值):
|
|
1934
|
-
* 缺了这些规则 SVG 文本会继承页面字号(14–16 用户单位),比旧版大 30%–60%(R2-N12)。 */
|
|
1935
|
-
'.' + p + 'charts-tick{font-size:9.5px}',
|
|
1936
|
-
'.' + p + 'charts-xlabel{font-size:10px}',
|
|
1937
|
-
'.' + p + 'charts-value{font-size:10px}',
|
|
1938
|
-
'.' + p + 'charts-value-last{font-size:10.5px;font-weight:700}',
|
|
1939
|
-
/* #424 返工:末值标签与末点同高、常与折线/均线交叠(390px 下实测线从标签盒里穿过)。
|
|
1940
|
-
* 给折线族的末值加白色描边(`paint-order:stroke` 先描边后填充),压在线上也读得清;
|
|
1941
|
-
* 不新增变量名——`--bg` 是本仓既有 token,缺省回退白。 */
|
|
1942
|
-
'.' + p + 'charts-line .' + p + 'charts-value-last{paint-order:stroke;stroke:var(--bg,#fff);stroke-width:3px;stroke-linejoin:round}',
|
|
1943
|
-
'.' + p + 'charts-marktext{font-size:10px}',
|
|
1944
|
-
'.' + p + 'charts-marktext-v{font-size:10px}',
|
|
1945
|
-
'.' + p + 'charts-mptext{font-size:10.5px;font-weight:700}',
|
|
1946
|
-
'.' + p + 'charts-bar .' + p + 'charts-xlabel{font-size:9.5px}',
|
|
1947
|
-
/* t-chartfix D1(2026-09-09 编排者裁定):桌面端 bar 轴标签 10.5px>数值 10px 系倒挂 bug 值
|
|
1948
|
-
* (测试快照,非契约冻结;契约正文零命中 10.5px)。改 9.5px=移动端同选择器值,恢复层级
|
|
1949
|
-
* (9.5<10)与双端一致;全局 xlabel 10px(相等非倒挂)不动,最小 scope。 */
|
|
1950
|
-
'.' + p + 'charts-bar .' + p + 'charts-value{font-size:10px}',
|
|
1951
|
-
'.' + p + 'charts-center-label{font-size:8px}',
|
|
1952
|
-
'.' + p + 'charts-center-value{font-size:13px;font-weight:700}',
|
|
1953
|
-
'.' + p + 'charts-gauge-value{font-size:26px;font-weight:800}',
|
|
1954
|
-
'.' + p + 'charts-gauge-label{font-size:11px}',
|
|
1955
|
-
/* t-chartfix #160 的桌面等比上限 `max-width:480px`(=320×1.5)在 #424 撤销:
|
|
1956
|
-
* 折线 viewBox 已放大到 580×260(`LINE_DEFAULT_WIDTH/HEIGHT`),930px 卡片下 scale≈1.6
|
|
1957
|
-
* ——图内 9.5–10px 文字渲染 15.2–16px,靠 viewBox 自身就压住了字号,不再需要砍宽度。
|
|
1958
|
-
* 留着它反而把图钉死在卡片中缝(930 里 480,左右各空 225px)。 */
|
|
1959
|
-
'@media (max-width:' + mobile + 'px){'
|
|
1960
|
-
+ '.' + p + 'charts{--' + p + 'charts-dot:' + dotMobile + 'px}'
|
|
1961
|
-
/* #424 返工:原来这里把折线 svg 盒高钉成 `lineHeightMobilePx`(150px),而折线是
|
|
1962
|
-
* `preserveAspectRatio="none"` 的满宽拉伸族 —— 580×260/580×300/580×180 三种 viewBox
|
|
1963
|
-
* 被压进同一个 150px 高,横向 0.57、纵向 0.50/0.83 → 圆点变椭圆、字被压扁(实测失真比
|
|
1964
|
-
* 1.13/0.68)。改成按 viewBox 长宽比派生高度(`height:auto`,与 `.charts-svg` 基规则同款),
|
|
1965
|
-
* 三种 viewBox 一律等比缩放;字号补偿见 `LINE_TEXT_MOBILE`。 */
|
|
1966
|
-
+ '.' + p + 'charts-line .' + p + 'charts-svg{height:auto}'
|
|
1967
|
-
+ '.' + p + 'charts-bar .' + p + 'charts-xlabel{font-size:9.5px}'
|
|
1968
|
-
+ '.' + p + 'charts-legend{font-size:11.5px}'
|
|
1969
|
-
/* #424 返工(移动端折线文字不可读):上面那条把折线 svg 盒高钉成 150px,580×260 的 viewBox
|
|
1970
|
-
* 在 390px 手机上被压到 scale≈0.58(`preserveAspectRatio="none"`)——图内 9.5/10 单位实测
|
|
1971
|
-
* 只有 5.4/5.7px。这里只对**折线族**按 1/0.58≈1.75 倍提字号,把实渲拉回 ~10px;字号常量与
|
|
1972
|
-
* 留白估算同源(`LINE_TEXT_MOBILE`),留白已按这一档放大,文字不会再顶出 viewBox。 */
|
|
1973
|
-
+ '.' + p + 'charts-line .' + p + 'charts-tick{font-size:' + LINE_TEXT_MOBILE.tick + 'px}'
|
|
1974
|
-
+ '.' + p + 'charts-line .' + p + 'charts-xlabel{font-size:' + LINE_TEXT_MOBILE.xlabel + 'px}'
|
|
1975
|
-
+ '.' + p + 'charts-line .' + p + 'charts-value{font-size:' + LINE_TEXT_MOBILE.value + 'px}'
|
|
1976
|
-
+ '.' + p + 'charts-line .' + p + 'charts-value-last{font-size:' + LINE_TEXT_MOBILE.last + 'px}'
|
|
1977
|
-
+ '.' + p + 'charts-line .' + p + 'charts-marktext{font-size:' + LINE_TEXT_MOBILE.mark + 'px}'
|
|
1978
|
-
+ '.' + p + 'charts-line .' + p + 'charts-marktext-v{font-size:' + LINE_TEXT_MOBILE.mark + 'px}'
|
|
1979
|
-
+ '}',
|
|
1980
|
-
/* t512(字号随盒宽乱跳的根因):上面那一段只按 ≤720px 给了一档(原 20 用户单位,t512 收尾收到 19.4),721px 起落回桌面档,
|
|
1981
|
-
* 断点两侧实渲 22.5px → 10.7px。这里补两档,用户单位 = 目标像素 ÷ 该档实测缩放比
|
|
1982
|
-
* (算式与四档实测读数见 `LINE_TEXT_WIDE_UNITS` 的注释)——只给**折线族**六条文本类,
|
|
1983
|
-
* 杆/散点/环/量表各族沿用基规则 9.5/10 单位不动(它们没有被报「字号乱跳」)。 */
|
|
1984
|
-
'@media (min-width:' + (mobile + 1) + 'px) and (max-width:' + LINE_TEXT_WIDE_MAX_PX + 'px){'
|
|
1985
|
-
+ lineFontRules(p, LINE_TEXT_WIDE_UNITS) + '}',
|
|
1986
|
-
'@media (min-width:' + (LINE_TEXT_WIDE_MAX_PX + 1) + 'px){'
|
|
1987
|
-
+ lineFontRules(p, LINE_TEXT_FULL_UNITS) + '}',
|
|
1988
|
-
].join(LF);
|
|
1989
|
-
}
|
|
1990
|
-
/* ── 图表 helpers JS(唯一产出者,FX-22;首步幂等自注入 `<style>`) ────── */
|
|
1991
|
-
function helpersPrefix(input) {
|
|
1992
|
-
const prefix = input === undefined || input === null ? undefined : input.prefix;
|
|
1993
|
-
return typeof prefix === 'string' && prefix !== '' ? prefix : STYLE_PREFIX;
|
|
1994
|
-
}
|
|
1995
|
-
function helpersStyleId(input) {
|
|
1996
|
-
const styleId = input === undefined || input === null ? undefined : input.styleId;
|
|
1997
|
-
return typeof styleId === 'string' && styleId !== '' ? styleId : CHARTS_STYLE_ID;
|
|
1998
|
-
}
|
|
1999
|
-
/** 冻结签名:`buildChartsHelpersJs(input?: ChartsHelpersInput): string`。
|
|
2000
|
-
*
|
|
2001
|
-
* 产出恒为**非空**、**经典 script** 作用域可跑的 IIFE(无 `import`/`export`/顶层 `await`),
|
|
2002
|
-
* 逐项满足 `SHARED_HELPERS_JS_RULE`:自包含(不依赖其它脚本或既有全局)/幂等(判据**只落 DOM**:
|
|
2003
|
-
* `getElementById(styleId)` 早退,**不**用全局哨兵)/允许页面侧 DOM(`document.*`)/
|
|
2004
|
-
* 不向 `window.<id>`/`globalThis.<id>` 赋值/不引 `node:`。
|
|
2005
|
-
*
|
|
2006
|
-
* 首步即幂等自注入 `<style id="{styleId ?? CHARTS_STYLE_ID}">`(R3/R12);图表 CSS 文本
|
|
2007
|
-
* **只此一处产出**(`chartsCss`),#75 实施时复用同一份文本,不得重述。 */
|
|
2008
|
-
export const buildChartsHelpersJs = (input) => {
|
|
2009
|
-
const prefix = helpersPrefix(input);
|
|
2010
|
-
const styleId = helpersStyleId(input);
|
|
2011
|
-
const css = chartsCss(prefix);
|
|
2012
|
-
const lines = [
|
|
2013
|
-
'(function () {',
|
|
2014
|
-
" 'use strict';",
|
|
2015
|
-
' var STYLE_ID = ' + jsStr(styleId) + ';',
|
|
2016
|
-
' var CSS = ' + jsStr(css) + ';',
|
|
2017
|
-
'',
|
|
2018
|
-
' function boot() {',
|
|
2019
|
-
' if (document.getElementById(STYLE_ID)) return;',
|
|
2020
|
-
' var host = document.head || document.body;',
|
|
2021
|
-
' if (!host) return;',
|
|
2022
|
-
' var style = document.createElement("style");',
|
|
2023
|
-
' style.id = STYLE_ID;',
|
|
2024
|
-
' style.textContent = CSS;',
|
|
2025
|
-
' host.appendChild(style);',
|
|
2026
|
-
' }',
|
|
2027
|
-
'',
|
|
2028
|
-
' if (document.head || document.body) boot();',
|
|
2029
|
-
' else document.addEventListener("DOMContentLoaded", boot);',
|
|
2030
|
-
'}());',
|
|
2031
|
-
];
|
|
2032
|
-
return lines.join(LF);
|
|
2033
|
-
};
|
|
2034
|
-
/* 记账:本文件产出的 HTML 恒用 `STYLE_PREFIX` 命名空间(`prefix` 覆盖只作用于 CSS 文本);
|
|
2035
|
-
* `CHART_STRUCTURE_RULE`/`CHART_EMPTY_RULE`/`CHART_COORD_RULE` 逐值由 `test/charts.test.mjs` 钉死。 */
|
|
8
|
+
export * from './components/charts/index.js';
|
|
2036
9
|
//# sourceMappingURL=charts.js.map
|