@ahoo-wang/wow-view-engine 10.0.0-beta.3 → 10.0.0-beta.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"cartesianBrush-bgRuE6Ks.js","names":["EChartsCoreOption","FADED_OPACITY","Lit","series","datum","faded","option","lit","Array","isArray","marks","flatMap","entry","Record","position","index","markIndex","data","count","length","any","some","from","_","at","map","fade","ONE_SERIES","Set","type","has","id","exec","Number","style","itemStyle","opacity","value","useSyncExternalStore","CartesianPlan","FADED_OPACITY","ChartTheme","brushes","plan","horizontal","context","pickable","data","points","length","BRUSH_ID","brushOption","theme","undefined","id","xAxisIndex","brushLink","brushType","brushMode","transformable","removeOnClick","toolbox","brushStyle","color","muted","borderColor","borderWidth","opacity","inBrush","outOfBrush","colorAlpha","withoutBrushToolbox","option","Record","toolboxRegistered","brush","list","Array","isArray","some","entry","BRUSH_CURSOR","type","key","const","BRUSH_CLEAR","areas","BrushedSpan","from","to","brushedSpan","said","count","area","range","coordRange","a","b","Number","isFinite","low","Math","max","round","min","high","useCoarsePointer","subscribe","coarse","_temp","COARSE","media","MediaQueryList","window","matchMedia","matches","change","addEventListener","removeEventListener","FADED_OPACITY","faded","series","option","lit","index","markIndex","entry","position","count","at","datum","fade","ONE_SERIES","id","style","brushes","plan","BRUSH_ID","brushOption","theme","withoutBrushToolbox","toolboxRegistered","BRUSH_CURSOR","BRUSH_CLEAR","brushedSpan","areas","said","range","a","b","low","high","useCoarsePointer","useSyncExternalStore","subscribe","coarse","_temp","COARSE","media","list","change"],"sources":["../src/ui/charts/highlight.ts","../src/ui/charts/cartesianBrush.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { EChartsCoreOption } from 'echarts/core';\n\n/**\n * How faint a mark that is not the group pressed is drawn: a dashboard panel\n * that set the board's filter keeps every group and marks the one pressed.\n * Faded rather than hidden — the others are still the panel's\n * answer — and by opacity alone, so the palette and the marks' own colours\n * stay the theme's.\n */\nexport const FADED_OPACITY = 0.5;\n\n/**\n * Which of a series' data are the group pressed: `lit(series, datum)` is\n * asked for each drawn datum, `series` the index the family's option names\n * its marks by (`s{index}`, or the one series of a pie, a scatter or a\n * heatmap).\n */\nexport type Lit = (series: number, datum: number) => boolean;\n\n/**\n * The option with every datum that is not lit faded. Only the family's own\n * marks are touched — a series whose id is `s{n}` (the cartesian marks), or\n * the one series of a pie, a scatter or a heatmap — never a stack's totals or a reference line, which\n * stand for no group. Without `lit`, or with no datum it lights, the option\n * is handed back as it is, so a chart nothing was pressed on draws exactly\n * what it drew before.\n */\nexport function faded(\n option: EChartsCoreOption,\n lit: Lit | undefined,\n): EChartsCoreOption {\n const series = option.series;\n if (!lit || !Array.isArray(series)) return option;\n const marks = series.flatMap((entry: Record<string, unknown>, position) => {\n const index = markIndex(entry, position);\n return index === null || !Array.isArray(entry.data)\n ? []\n : [{ index, count: entry.data.length }];\n });\n // Nothing pressed on this chart — the value came from elsewhere, or its\n // group is not among the ones drawn — marks nothing, and fades nothing.\n const any = marks.some(({ index, count }) =>\n Array.from({ length: count }, (_, at) => at).some(at => lit(index, at)),\n );\n if (!any) return option;\n return {\n ...option,\n series: series.map((entry: Record<string, unknown>, position) => {\n const index = markIndex(entry, position);\n if (index === null || !Array.isArray(entry.data)) return entry;\n return {\n ...entry,\n data: entry.data.map((datum: unknown, at: number) =>\n lit(index, at) ? datum : fade(datum),\n ),\n };\n }),\n };\n}\n\n/** The families drawn as one series whose every datum is a group. */\nconst ONE_SERIES = new Set(['pie', 'scatter', 'heatmap']);\n\n/** The index a series stands for among the marks, or `null` for none. */\nfunction markIndex(entry: Record<string, unknown>, position: number) {\n if (typeof entry.type === 'string' && ONE_SERIES.has(entry.type))\n return position;\n const id = typeof entry.id === 'string' ? /^s(\\d+)$/.exec(entry.id) : null;\n return id ? Number(id[1]) : null;\n}\n\nfunction fade(datum: unknown): unknown {\n if (typeof datum === 'object' && datum !== null && 'value' in datum) {\n const style = (datum as { itemStyle?: object }).itemStyle ?? {};\n return {\n ...datum,\n itemStyle: { ...style, opacity: FADED_OPACITY },\n };\n }\n return { value: datum, itemStyle: { opacity: FADED_OPACITY } };\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useSyncExternalStore } from 'react';\nimport type { CartesianPlan } from './cartesianPlan.js';\nimport { FADED_OPACITY } from './highlight.js';\nimport type { ChartTheme } from './theme.js';\n\n/**\n * Brushing a stretch of a time axis (D33 batch C, Q52): a drag along the\n * plot selects the buckets under it, and the follow-up menu a press on one\n * group opens is asked about all of them at once — 「这几天怎么了」. The\n * brush only chooses; what the stretch means as a condition is the\n * kernel's (`drillSpan`), and nothing here edits the view.\n *\n * Only along the axis (`lineX`), only one stretch at a time, and never\n * saved: the cover goes when the menu over it closes.\n */\n\n/** Whether a chart of this plan is brushed: upright, over time, pressable. */\nexport function brushes(plan: CartesianPlan): boolean {\n return (\n !plan.horizontal &&\n plan.context.brushes === true &&\n plan.context.pickable &&\n plan.data.points.length > 1\n );\n}\n\n/**\n * The id the brush component of this package's charts wears, by which the\n * toolbox the library injects for it is recognised (`withoutBrushToolbox`).\n */\nexport const BRUSH_ID = 'fve-brush';\n\n/**\n * The brush component a brushed chart carries, or nothing.\n *\n * Its cover is a quiet band in the muted ink, and the marks outside it fade as a pressed\n * group's neighbours do on a board (`FADED_OPACITY`), so what the stretch\n * holds reads while the drag is under way. No toolbox: the drag is always\n * on (`BRUSH_CURSOR`), and a press still presses — a drag shorter than the\n * library's threshold draws no cover, and a click is only a click when the\n * pointer barely moved.\n */\nexport function brushOption(\n plan: CartesianPlan,\n theme: ChartTheme,\n): object | undefined {\n if (!brushes(plan)) return undefined;\n return {\n id: BRUSH_ID,\n xAxisIndex: 0,\n brushLink: 'none',\n brushType: 'lineX',\n brushMode: 'single',\n transformable: false,\n removeOnClick: true,\n toolbox: [],\n brushStyle: {\n color: theme.muted,\n borderColor: theme.muted,\n borderWidth: 1,\n opacity: 0.18,\n },\n inBrush: {},\n outOfBrush: { colorAlpha: FADED_OPACITY },\n };\n}\n\n/**\n * The option without the toolbox the library's brush preprocessor put into\n * it for this package's brush — an option preprocessor, registered after the\n * brush (`echarts.ts`), so it runs before the library checks what the option\n * uses. The preprocessor adds a `toolbox` for the buttons it would draw; the\n * toolbox is not registered (analysis-echarts.md 2.4: +15.1KB for buttons\n * this package draws itself), so nothing was drawn, but a development build\n * logged 「Component toolbox is used but not imported」 in every host's\n * console. Only an option carrying this package's brush (`BRUSH_ID`) is\n * touched, and only while no toolbox is registered: a host drawing its own\n * charts with the same library, toolbox and all, keeps its toolbox.\n */\nexport function withoutBrushToolbox(\n option: Record<string, unknown> | undefined,\n toolboxRegistered: boolean,\n): void {\n if (!option || toolboxRegistered || !('toolbox' in option)) return;\n const brushes = option.brush;\n const list: unknown[] = Array.isArray(brushes) ? brushes : [brushes];\n if (list.some(entry => (entry as { id?: unknown } | null)?.id === BRUSH_ID))\n delete option.toolbox;\n}\n\n/**\n * What turns the brush on without a toolbox button: taken when a mouse or a\n * pen goes down on the plot, before the library sees the press, and again\n * after a whole new option has reset the component (`EChart`).\n */\nexport const BRUSH_CURSOR = {\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: { brushType: 'lineX', brushMode: 'single' },\n} as const;\n\n/** What clears the cover once the menu over it has gone. */\nexport const BRUSH_CLEAR = { type: 'brush', areas: [] } as const;\n\n/** The first and the last category a brush covers, by index. */\ninterface BrushedSpan {\n from: number;\n to: number;\n}\n\n/**\n * The categories a finished brush covers, read off the library's `brushEnd`\n * event — its one area's range along the category axis, which it gives in\n * category indexes — clamped to the `count` there are; `null` for a brush\n * that covers none (one taken away by a click, or dragged off the plot).\n */\nexport function brushedSpan(said: unknown, count: number): BrushedSpan | null {\n const areas = (said as { areas?: unknown } | null)?.areas;\n const area: unknown = Array.isArray(areas) ? areas[0] : undefined;\n const range = (area as { coordRange?: unknown } | undefined)?.coordRange;\n if (!Array.isArray(range) || range.length !== 2 || count === 0) return null;\n const [a, b] = range as unknown[];\n if (typeof a !== 'number' || typeof b !== 'number') return null;\n if (!Number.isFinite(a) || !Number.isFinite(b)) return null;\n // The library gives whole indexes on a category axis; were one to come\n // between two, it belongs to the nearer category.\n const low = Math.max(0, Math.round(Math.min(a, b)));\n const high = Math.min(count - 1, Math.round(Math.max(a, b)));\n return low <= high ? { from: low, to: high } : null;\n}\n\n/**\n * Whether the reader's main pointer is a finger (`pointer: coarse`): a\n * phone or a tablet, where a chart is brushed not at all. The library takes\n * a touch on the plot as the start of a drag and holds the page still under\n * it, so a finger that landed on a chart to scroll past it would brush it\n * instead; there the first tap reads a mark and the second opens its menu\n * (`EChart`), and the table layout picks a span with Shift where a keyboard\n * is. Read live; where the platform cannot say, a desktop is assumed.\n */\nexport function useCoarsePointer(): boolean {\n return useSyncExternalStore(subscribe, coarse, () => false);\n}\n\nconst COARSE = '(pointer: coarse)';\n\nfunction media(): MediaQueryList | null {\n return typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function'\n ? window.matchMedia(COARSE)\n : null;\n}\n\nfunction coarse(): boolean {\n return media()?.matches ?? false;\n}\n\nfunction subscribe(change: () => void): () => void {\n const list = media();\n list?.addEventListener('change', change);\n return () => list?.removeEventListener('change', change);\n}\n"],"mappings":";;AAsBA,IAAaC,IAAgB;AAkB7B,SAAgBI,EACdC,GACAC,GACmB;CACnB,IAAMJ,IAASG,EAAOH;CActB,OAbI,CAACI,KAAO,CAACC,MAAMC,QAAQN,CAAM,KAY7B,CAXUA,EAAOQ,SAASC,GAAgCE,MAAa;EACzE,IAAMC,IAAQC,EAAUJ,GAAOE,CAAQ;EACvC,OAAOC,MAAU,QAAQ,CAACP,MAAMC,QAAQG,EAAMK,IAAI,IAC9C,CAAA,IACA,CAAC;GAAEF;GAAOG,OAAON,EAAMK,KAAKE;EAAO,CAAC;CAC1C,CAGYT,CAAAA,CAAMW,MAAM,EAAEN,UAAOG,eAC/BV,MAAMc,KAAK,EAAEH,QAAQD,EAAM,IAAIK,GAAGC,MAAOA,CAAE,CAAC,CAACH,MAAKG,MAAMjB,EAAIQ,GAAOS,CAAE,CAAC,CAEnEJ,IAAYd,IACV;EACL,GAAGA;EACHH,QAAQA,EAAOsB,KAAKb,GAAgCE,MAAa;GAC/D,IAAMC,IAAQC,EAAUJ,GAAOE,CAAQ;GAEvC,OADIC,MAAU,QAAQ,CAACP,MAAMC,QAAQG,EAAMK,IAAI,IAAUL,IAClD;IACL,GAAGA;IACHK,MAAML,EAAMK,KAAKQ,KAAKrB,GAAgBoB,MACpCjB,EAAIQ,GAAOS,CAAE,IAAIpB,IAAQsB,EAAKtB,CAAK,CACrC;GACF;EACF,CAAC;CACH;AACF;AAGA,IAAMuB,oBAAa,IAAIC,IAAI;CAAC;CAAO;CAAW;AAAS,CAAC;AAGxD,SAASZ,EAAUJ,GAAgCE,GAAkB;CACnE,IAAI,OAAOF,EAAMiB,QAAS,YAAYF,EAAWG,IAAIlB,EAAMiB,IAAI,GAC7D,OAAOf;CACT,IAAMiB,IAAK,OAAOnB,EAAMmB,MAAO,W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marks","flatMap","entry","position","index","markIndex","data","count","length","any","some","from","_","at","map","fade","ONE_SERIES","Set","type","has","id","exec","Number","style","itemStyle","opacity","value","useSyncExternalStore","FADED_OPACITY","brushes","plan","horizontal","context","pickable","data","points","length","BRUSH_ID","brushOption","theme","undefined","id","xAxisIndex","brushLink","brushType","brushMode","transformable","removeOnClick","toolbox","brushStyle","color","muted","borderColor","borderWidth","opacity","inBrush","outOfBrush","colorAlpha","withoutBrushToolbox","option","toolboxRegistered","brush","list","Array","isArray","some","entry","BRUSH_CURSOR","type","key","BRUSH_CLEAR","areas","from","to","brushedSpan","said","count","area","range","coordRange","a","b","Number","isFinite","low","Math","max","round","min","high","useCoarsePointer","subscribe","coarse","_temp","COARSE","media","window","matchMedia","matches","change","addEventListener","removeEventListener","FADED_OPACITY","faded","series","option","lit","index","markIndex","entry","position","count","at","datum","fade","ONE_SERIES","id","style","brushes","plan","BRUSH_ID","brushOption","theme","withoutBrushToolbox","toolboxRegistered","BRUSH_CURSOR","BRUSH_CLEAR","brushedSpan","areas","said","range","a","b","low","high","useCoarsePointer","useSyncExternalStore","subscribe","coarse","_temp","COARSE","media","list","change"],"sources":["../src/ui/charts/highlight.ts","../src/ui/charts/cartesianBrush.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { EChartsCoreOption } from 'echarts/core';\n\n/**\n * How faint a mark that is not the group pressed is drawn: a dashboard panel\n * that set the board's filter keeps every group and marks the one pressed.\n * Faded rather than hidden — the others are still the panel's\n * answer — and by opacity alone, so the palette and the marks' own colours\n * stay the theme's.\n */\nexport const FADED_OPACITY = 0.5;\n\n/**\n * Which of a series' data are the group pressed: `lit(series, datum)` is\n * asked for each drawn datum, `series` the index the family's option names\n * its marks by (`s{index}`, or the one series of a pie, a scatter or a\n * heatmap).\n */\nexport type Lit = (series: number, datum: number) => boolean;\n\n/**\n * The option with every datum that is not lit faded. Only the family's own\n * marks are touched — a series whose id is `s{n}` (the cartesian marks), or\n * the one series of a pie, a scatter or a heatmap — never a stack's totals or a reference line, which\n * stand for no group. Without `lit`, or with no datum it lights, the option\n * is handed back as it is, so a chart nothing was pressed on draws exactly\n * what it drew before.\n */\nexport function faded(\n option: EChartsCoreOption,\n lit: Lit | undefined,\n): EChartsCoreOption {\n const series = option.series;\n if (!lit || !Array.isArray(series)) return option;\n const marks = series.flatMap((entry: Record<string, unknown>, position) => {\n const index = markIndex(entry, position);\n return index === null || !Array.isArray(entry.data)\n ? []\n : [{ index, count: entry.data.length }];\n });\n // Nothing pressed on this chart — the value came from elsewhere, or its\n // group is not among the ones drawn — marks nothing, and fades nothing.\n const any = marks.some(({ index, count }) =>\n Array.from({ length: count }, (_, at) => at).some(at => lit(index, at)),\n );\n if (!any) return option;\n return {\n ...option,\n series: series.map((entry: Record<string, unknown>, position) => {\n const index = markIndex(entry, position);\n if (index === null || !Array.isArray(entry.data)) return entry;\n return {\n ...entry,\n data: entry.data.map((datum: unknown, at: number) =>\n lit(index, at) ? datum : fade(datum),\n ),\n };\n }),\n };\n}\n\n/** The families drawn as one series whose every datum is a group. */\nconst ONE_SERIES = new Set(['pie', 'scatter', 'heatmap']);\n\n/** The index a series stands for among the marks, or `null` for none. */\nfunction markIndex(entry: Record<string, unknown>, position: number) {\n if (typeof entry.type === 'string' && ONE_SERIES.has(entry.type))\n return position;\n const id = typeof entry.id === 'string' ? /^s(\\d+)$/.exec(entry.id) : null;\n return id ? Number(id[1]) : null;\n}\n\nfunction fade(datum: unknown): unknown {\n if (typeof datum === 'object' && datum !== null && 'value' in datum) {\n const style = (datum as { itemStyle?: object }).itemStyle ?? {};\n return {\n ...datum,\n itemStyle: { ...style, opacity: FADED_OPACITY },\n };\n }\n return { value: datum, itemStyle: { opacity: FADED_OPACITY } };\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useSyncExternalStore } from 'react';\nimport type { CartesianPlan } from './cartesianPlan.js';\nimport { FADED_OPACITY } from './highlight.js';\nimport type { ChartTheme } from './theme.js';\n\n/**\n * Brushing a stretch of a time axis (D33 batch C, Q52): a drag along the\n * plot selects the buckets under it, and the follow-up menu a press on one\n * group opens is asked about all of them at once — 「这几天怎么了」. The\n * brush only chooses; what the stretch means as a condition is the\n * kernel's (`drillSpan`), and nothing here edits the view.\n *\n * Only along the axis (`lineX`), only one stretch at a time, and never\n * saved: the cover goes when the menu over it closes.\n */\n\n/** Whether a chart of this plan is brushed: upright, over time, pressable. */\nexport function brushes(plan: CartesianPlan): boolean {\n return (\n !plan.horizontal &&\n plan.context.brushes === true &&\n plan.context.pickable &&\n plan.data.points.length > 1\n );\n}\n\n/**\n * The id the brush component of this package's charts wears, by which the\n * toolbox the library injects for it is recognised (`withoutBrushToolbox`).\n */\nexport const BRUSH_ID = 'fve-brush';\n\n/**\n * The brush component a brushed chart carries, or nothing.\n *\n * Its cover is a quiet band in the muted ink, and the marks outside it fade as a pressed\n * group's neighbours do on a board (`FADED_OPACITY`), so what the stretch\n * holds reads while the drag is under way. No toolbox: the drag is always\n * on (`BRUSH_CURSOR`), and a press still presses — a drag shorter than the\n * library's threshold draws no cover, and a click is only a click when the\n * pointer barely moved.\n */\nexport function brushOption(\n plan: CartesianPlan,\n theme: ChartTheme,\n): object | undefined {\n if (!brushes(plan)) return undefined;\n return {\n id: BRUSH_ID,\n xAxisIndex: 0,\n brushLink: 'none',\n brushType: 'lineX',\n brushMode: 'single',\n transformable: false,\n removeOnClick: true,\n toolbox: [],\n brushStyle: {\n color: theme.muted,\n borderColor: theme.muted,\n borderWidth: 1,\n opacity: 0.18,\n },\n inBrush: {},\n outOfBrush: { colorAlpha: FADED_OPACITY },\n };\n}\n\n/**\n * The option without the toolbox the library's brush preprocessor put into\n * it for this package's brush — an option preprocessor, registered after the\n * brush (`echarts.ts`), so it runs before the library checks what the option\n * uses. The preprocessor adds a `toolbox` for the buttons it would draw; the\n * toolbox is not registered (analysis-echarts.md 2.4: +15.1KB for buttons\n * this package draws itself), so nothing was drawn, but a development build\n * logged 「Component toolbox is used but not imported」 in every host's\n * console. Only an option carrying this package's brush (`BRUSH_ID`) is\n * touched, and only while no toolbox is registered: a host drawing its own\n * charts with the same library, toolbox and all, keeps its toolbox.\n */\nexport function withoutBrushToolbox(\n option: Record<string, unknown> | undefined,\n toolboxRegistered: boolean,\n): void {\n if (!option || toolboxRegistered || !('toolbox' in option)) return;\n const brushes = option.brush;\n const list: unknown[] = Array.isArray(brushes) ? brushes : [brushes];\n if (list.some(entry => (entry as { id?: unknown } | null)?.id === BRUSH_ID))\n delete option.toolbox;\n}\n\n/**\n * What turns the brush on without a toolbox button: taken when a mouse or a\n * pen goes down on the plot, before the library sees the press, and again\n * after a whole new option has reset the component (`EChart`).\n */\nexport const BRUSH_CURSOR = {\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: { brushType: 'lineX', brushMode: 'single' },\n} as const;\n\n/** What clears the cover once the menu over it has gone. */\nexport const BRUSH_CLEAR = { type: 'brush', areas: [] } as const;\n\n/** The first and the last category a brush covers, by index. */\ninterface BrushedSpan {\n from: number;\n to: number;\n}\n\n/**\n * The categories a finished brush covers, read off the library's `brushEnd`\n * event — its one area's range along the category axis, which it gives in\n * category indexes — clamped to the `count` there are; `null` for a brush\n * that covers none (one taken away by a click, or dragged off the plot).\n */\nexport function brushedSpan(said: unknown, count: number): BrushedSpan | null {\n const areas = (said as { areas?: unknown } | null)?.areas;\n const area: unknown = Array.isArray(areas) ? areas[0] : undefined;\n const range = (area as { coordRange?: unknown } | undefined)?.coordRange;\n if (!Array.isArray(range) || range.length !== 2 || count === 0) return null;\n const [a, b] = range as unknown[];\n if (typeof a !== 'number' || typeof b !== 'number') return null;\n if (!Number.isFinite(a) || !Number.isFinite(b)) return null;\n // The library gives whole indexes on a category axis; were one to come\n // between two, it belongs to the nearer category.\n const low = Math.max(0, Math.round(Math.min(a, b)));\n const high = Math.min(count - 1, Math.round(Math.max(a, b)));\n return low <= high ? { from: low, to: high } : null;\n}\n\n/**\n * Whether the reader's main pointer is a finger (`pointer: coarse`): a\n * phone or a tablet, where a chart is brushed not at all. The library takes\n * a touch on the plot as the start of a drag and holds the page still under\n * it, so a finger that landed on a chart to scroll past it would brush it\n * instead; there the first tap reads a mark and the second opens its menu\n * (`EChart`), and the table layout picks a span with Shift where a keyboard\n * is. Read live; where the platform cannot say, a desktop is assumed.\n */\nexport function useCoarsePointer(): boolean {\n return useSyncExternalStore(subscribe, coarse, () => false);\n}\n\nconst COARSE = '(pointer: coarse)';\n\nfunction media(): MediaQueryList | null {\n return typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function'\n ? window.matchMedia(COARSE)\n : null;\n}\n\nfunction coarse(): boolean {\n return media()?.matches ?? false;\n}\n\nfunction subscribe(change: () => void): () => void {\n const list = media();\n list?.addEventListener('change', change);\n return () => list?.removeEventListener('change', change);\n}\n"],"mappings":";;AAsBA,IAAaA,IAAgB;AAkB7B,SAAgBG,EACdC,GACAC,GACmB;CACnB,IAAMJ,IAASG,EAAOH;CActB,OAbI,CAACI,KAAO,CAACC,MAAMC,QAAQN,CAAM,KAY7B,CAXUA,EAAOQ,SAASC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,KAAKH;CAEf,IADI,OAAOE,KAAM,YAAY,OAAOC,KAAM,YACtC,CAACC,OAAOC,SAASH,CAAC,KAAK,CAACE,OAAOC,SAASF,CAAC,GAAG,OAAO;CAGvD,IAAMG,IAAMC,KAAKC,IAAI,GAAGD,KAAKE,MAAMF,KAAKG,IAAIR,GAAGC,CAAC,CAAC,CAAC,GAC5CQ,IAAOJ,KAAKG,IAAIZ,IAAQ,GAAGS,KAAKE,MAAMF,KAAKC,IAAIN,GAAGC,CAAC,CAAC,CAAC;CAC3D,OAAOG,KAAOK,IAAO;EAAEjB,MAAMY;EAAKX,IAAIgB;CAAK,IAAI;AACjD;AAWA,SAAOC,IAAA;CAAA,OACE/D,EAAqBgE,GAAWC,GAAQC,CAAW;AAAC;AADtD,SAAAA,IAAA;CAAA,OACgD;AAAK;AAG5D,IAAMC,IAAS;AAEf,SAASC,IAA+B;CACtC,OAAO,OAAOC,SAAW,OACvB,OAAOA,OAAOC,cAAe,aAC3BD,OAAOC,WAAWH,CAAM,IACxB;AACN;AAEA,SAASF,IAAkB;CACzB,OAAOG,EAAM,CAAC,EAAEG,WAAW;AAC7B;AAEA,SAASP,EAAUQ,GAAgC;CACjD,IAAMrC,IAAOiC,EAAM;CAEnB,OADAjC,GAAMsC,iBAAiB,UAAUD,CAAM,SAC1BrC,GAAMuC,oBAAoB,UAAUF,CAAM;AACzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"echarts-rjTKpBsf.js","names":["BarChart","HeatmapChart","LineChart","PieChart","ScatterChart","TreemapChart","AriaComponent","BrushComponent","DataZoomInsideComponent","DataZoomSliderComponent","GraphicComponent","GridComponent","VisualMapContinuousComponent","MarkAreaComponent","MarkLineComponent","MarkPointComponent","TooltipComponent","ComponentModel","init","initChart","registerPreprocessor","use","register","LabelLayout","SVGRenderer","withoutBrushToolbox","registered","args","Parameters","ReturnType","option","hasClass","initChart","withoutBrushToolbox","init$1","registered","init","args","use","BarChart","HeatmapChart","LineChart","PieChart","ScatterChart","TreemapChart","AriaComponent","BrushComponent","DataZoomInsideComponent","DataZoomSliderComponent","GraphicComponent","VisualMapContinuousComponent","GridComponent","MarkAreaComponent","MarkLineComponent","MarkPointComponent","TooltipComponent","LabelLayout","SVGRenderer","registerPreprocessor","option","ComponentModel"],"sources":["../src/ui/charts/echarts.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The chart library, registered piece by piece — the one module that imports\n * `echarts`, and the chunk `EChart.tsx` loads on first use rather than with\n * `/ui` (`loadCharts`).\n *\n * `echarts/core` ships nothing drawn; each chart type, component and the\n * renderer is a module of its own, so the bundle carries only what a family\n * asks for. SVG rather than canvas: the marks are elements, which a browser\n * story can measure, jsdom can render, and a colour can be read back from.\n * Label layout moves a line's value labels apart and keeps a pie's from\n * landing on each other (docs/design/decisions.md D21); which bar labels are\n * written is decided by the plot's size (`cartesianFit`). A funnel is bars\n * (`funnelOption`), and so is a waterfall (`waterfallOption`), so neither the\n * library's funnel nor anything more for a waterfall is registered; a\n * treemap is the library's own (`treemapOption`). A long category axis\n * zooms (`zoomOption`: the slider, and the inside zoom where\n * gestures are allowed); the aria component is registered for its decal\n * patterns alone (`withPatterns`) — its generated description stays off.\n * Over the marks, reference lines (markLine), target bands (markArea) and\n * the highest and lowest points (markPoint) — every number the kernel's\n * (`cartesianMarks`). A time axis is brushed along for the follow-up menu\n * (`brushOption`, D33 Q52); the toolbox the brush asks for is left out of\n * the option rather than registered (`withoutBrushToolbox`).\n */\nimport {\n BarChart,\n HeatmapChart,\n LineChart,\n PieChart,\n ScatterChart,\n TreemapChart,\n} from 'echarts/charts';\nimport {\n AriaComponent,\n BrushComponent,\n DataZoomInsideComponent,\n DataZoomSliderComponent,\n GraphicComponent,\n GridComponent,\n VisualMapContinuousComponent,\n MarkAreaComponent,\n MarkLineComponent,\n MarkPointComponent,\n TooltipComponent,\n} from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport {\n ComponentModel,\n init as initChart,\n registerPreprocessor,\n use as register,\n} from 'echarts/core';\nimport { LabelLayout } from 'echarts/features';\nimport { SVGRenderer } from 'echarts/renderers';\nimport { withoutBrushToolbox } from './cartesianBrush.js';\n\nlet registered = false;\n\n/**\n * The library's `init`, with every piece this package draws with registered\n * before the first chart is made.\n *\n * The registration lives inside the one export the package calls rather than\n * at the top of the module: the package declares no side effects but its\n * stylesheet (`package.json` `sideEffects`), so a production build keeps this\n * module's exports and drops a top-level call whose result nobody reads — the\n * built chunk carried `init` and no painter, and the first chart threw\n * 「lg[a] is not a constructor」 on the deployed Storybook (2026-09-23).\n * `scripts/verify-package.mjs` draws a chart through the built chunk so the\n * package cannot ship like that again.\n */\nexport function init(\n ...args: Parameters<typeof initChart>\n): ReturnType<typeof initChart> {\n if (!registered) {\n register([\n BarChart,\n HeatmapChart,\n LineChart,\n PieChart,\n ScatterChart,\n TreemapChart,\n AriaComponent,\n BrushComponent,\n DataZoomInsideComponent,\n DataZoomSliderComponent,\n GraphicComponent,\n VisualMapContinuousComponent,\n GridComponent,\n MarkAreaComponent,\n MarkLineComponent,\n MarkPointComponent,\n TooltipComponent,\n LabelLayout,\n SVGRenderer,\n ]);\n // After the brush's own, which injects the toolbox this one takes out.\n registerPreprocessor(option =>\n withoutBrushToolbox(option, ComponentModel.hasClass('toolbox')),\n );\n registered = true;\n }\n return initChart(...args);\n}\n"],"mappings":";;;;;;;AAqEA,IAAI0B,IAAa;AAejB,SAAgBR,EACd,GAAGS,GAC2B;CA6B9B,OA5BA,AA0BED,OAzBAJ,EAAS;EACPtB;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAE;EACAD;EACAE;EACAC;EACAC;EACAC;EACAO;EACAC;CAAW,CACZ,GAEDJ,GAAqBU,MACnBL,EAAoBK,GAAQb,EAAec,SAAS,SAAS,CAAC,CAChE,GACa,KAERZ,EAAU,GAAGQ,CAAI;AAC1B"}
1
+ {"version":3,"file":"echarts-rjTKpBsf.js","names":["BarChart","HeatmapChart","LineChart","PieChart","ScatterChart","TreemapChart","AriaComponent","BrushComponent","DataZoomInsideComponent","DataZoomSliderComponent","GraphicComponent","GridComponent","VisualMapContinuousComponent","MarkAreaComponent","MarkLineComponent","MarkPointComponent","TooltipComponent","ComponentModel","init","initChart","registerPreprocessor","register","LabelLayout","SVGRenderer","withoutBrushToolbox","registered","args","option","hasClass","withoutBrushToolbox","init$1","registered","init","args","use","BarChart","HeatmapChart","LineChart","PieChart","ScatterChart","TreemapChart","AriaComponent","BrushComponent","DataZoomInsideComponent","DataZoomSliderComponent","GraphicComponent","VisualMapContinuousComponent","GridComponent","MarkAreaComponent","MarkLineComponent","MarkPointComponent","TooltipComponent","LabelLayout","SVGRenderer","registerPreprocessor","option","ComponentModel"],"sources":["../src/ui/charts/echarts.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The chart library, registered piece by piece — the one module that imports\n * `echarts`, and the chunk `EChart.tsx` loads on first use rather than with\n * `/ui` (`loadCharts`).\n *\n * `echarts/core` ships nothing drawn; each chart type, component and the\n * renderer is a module of its own, so the bundle carries only what a family\n * asks for. SVG rather than canvas: the marks are elements, which a browser\n * story can measure, jsdom can render, and a colour can be read back from.\n * Label layout moves a line's value labels apart and keeps a pie's from\n * landing on each other (docs/design/decisions.md D21); which bar labels are\n * written is decided by the plot's size (`cartesianFit`). A funnel is bars\n * (`funnelOption`), and so is a waterfall (`waterfallOption`), so neither the\n * library's funnel nor anything more for a waterfall is registered; a\n * treemap is the library's own (`treemapOption`). A long category axis\n * zooms (`zoomOption`: the slider, and the inside zoom where\n * gestures are allowed); the aria component is registered for its decal\n * patterns alone (`withPatterns`) — its generated description stays off.\n * Over the marks, reference lines (markLine), target bands (markArea) and\n * the highest and lowest points (markPoint) — every number the kernel's\n * (`cartesianMarks`). A time axis is brushed along for the follow-up menu\n * (`brushOption`, D33 Q52); the toolbox the brush asks for is left out of\n * the option rather than registered (`withoutBrushToolbox`).\n */\nimport {\n BarChart,\n HeatmapChart,\n LineChart,\n PieChart,\n ScatterChart,\n TreemapChart,\n} from 'echarts/charts';\nimport {\n AriaComponent,\n BrushComponent,\n DataZoomInsideComponent,\n DataZoomSliderComponent,\n GraphicComponent,\n GridComponent,\n VisualMapContinuousComponent,\n MarkAreaComponent,\n MarkLineComponent,\n MarkPointComponent,\n TooltipComponent,\n} from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport {\n ComponentModel,\n init as initChart,\n registerPreprocessor,\n use as register,\n} from 'echarts/core';\nimport { LabelLayout } from 'echarts/features';\nimport { SVGRenderer } from 'echarts/renderers';\nimport { withoutBrushToolbox } from './cartesianBrush.js';\n\nlet registered = false;\n\n/**\n * The library's `init`, with every piece this package draws with registered\n * before the first chart is made.\n *\n * The registration lives inside the one export the package calls rather than\n * at the top of the module: the package declares no side effects but its\n * stylesheet (`package.json` `sideEffects`), so a production build keeps this\n * module's exports and drops a top-level call whose result nobody reads — the\n * built chunk carried `init` and no painter, and the first chart threw\n * 「lg[a] is not a constructor」 on the deployed Storybook (2026-09-23).\n * `scripts/verify-package.mjs` draws a chart through the built chunk so the\n * package cannot ship like that again.\n */\nexport function init(\n ...args: Parameters<typeof initChart>\n): ReturnType<typeof initChart> {\n if (!registered) {\n register([\n BarChart,\n HeatmapChart,\n LineChart,\n PieChart,\n ScatterChart,\n TreemapChart,\n AriaComponent,\n BrushComponent,\n DataZoomInsideComponent,\n DataZoomSliderComponent,\n GraphicComponent,\n VisualMapContinuousComponent,\n GridComponent,\n MarkAreaComponent,\n MarkLineComponent,\n MarkPointComponent,\n TooltipComponent,\n LabelLayout,\n SVGRenderer,\n ]);\n // After the brush's own, which injects the toolbox this one takes out.\n registerPreprocessor(option =>\n withoutBrushToolbox(option, ComponentModel.hasClass('toolbox')),\n );\n registered = true;\n }\n return initChart(...args);\n}\n"],"mappings":";;;;;;;AAqEA,IAAIyB,IAAa;AAejB,SAAgBP,EACd,GAAGQ,GAC2B;CA6B9B,OA5BA,AA0BED,OAzBAJ,EAAS;EACPrB;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAE;EACAD;EACAE;EACAC;EACAC;EACAC;EACAM;EACAC;CAAW,CACZ,GAEDH,GAAqBO,MACnBH,EAAoBG,GAAQV,EAAeW,SAAS,SAAS,CAAC,CAChE,GACa,KAERT,EAAU,GAAGO,CAAI;AAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"echartsGeo-qZv2ZF9e.js","names":["MapChart","GeoComponent","registerMap","use","registerModules","ChartMapGeoJson","register","registerGeoMap","name","geo","Parameters","register","MapChart","GeoComponent","registerGeoMap","name","geo"],"sources":["../src/ui/charts/echartsGeo.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The map family's chunk — the map series and its geo component —\n * registered the first time a map is drawn (`loadCharts('geo')`), and the\n * one way a host's geography reaches the library (`registerGeoMap`, called\n * by `loadChartMap`). It carries no map data of its own (D41).\n */\nimport { MapChart } from 'echarts/charts';\nimport { GeoComponent } from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport { registerMap, use as registerModules } from 'echarts/core';\nimport type { ChartMapGeoJson } from './maps.js';\n\nexport function register(): void {\n registerModules([MapChart, GeoComponent]);\n}\n\n/** A host's geography, under the name a chart spec draws it by. */\nexport function registerGeoMap(name: string, geo: ChartMapGeoJson): void {\n registerMap(name, geo as unknown as Parameters<typeof registerMap>[1]);\n}\n"],"mappings":";;;;AAyBA,SAAgBM,IAAiB;CAC/BF,EAAgB,CAACJ,GAAUC,CAAY,CAAC;AAC1C;AAGA,SAAgBM,EAAeC,GAAcC,GAA4B;CACvEP,EAAYM,GAAMC,CAAmD;AACvE"}
1
+ {"version":3,"file":"echartsGeo-qZv2ZF9e.js","names":["MapChart","GeoComponent","registerMap","registerModules","register","registerGeoMap","name","geo","register","MapChart","GeoComponent","registerGeoMap","name","geo"],"sources":["../src/ui/charts/echartsGeo.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The map family's chunk — the map series and its geo component —\n * registered the first time a map is drawn (`loadCharts('geo')`), and the\n * one way a host's geography reaches the library (`registerGeoMap`, called\n * by `loadChartMap`). It carries no map data of its own (D41).\n */\nimport { MapChart } from 'echarts/charts';\nimport { GeoComponent } from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport { registerMap, use as registerModules } from 'echarts/core';\nimport type { ChartMapGeoJson } from './maps.js';\n\nexport function register(): void {\n registerModules([MapChart, GeoComponent]);\n}\n\n/** A host's geography, under the name a chart spec draws it by. */\nexport function registerGeoMap(name: string, geo: ChartMapGeoJson): void {\n registerMap(name, geo as unknown as Parameters<typeof registerMap>[1]);\n}\n"],"mappings":";;;;AAyBA,SAAgBI,IAAiB;CAC/BD,EAAgB,CAACH,GAAUC,CAAY,CAAC;AAC1C;AAGA,SAAgBI,EAAeC,GAAcC,GAA4B;CACvEL,EAAYI,GAAMC,CAAmD;AACvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"echartsHierarchy-DHNP9W4v.js","names":["SankeyChart","SunburstChart","TreeChart","use","registerModules","register","register","SankeyChart","SunburstChart","TreeChart"],"sources":["../src/ui/charts/echartsHierarchy.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The hierarchy and flow families' chunk — a sunburst, a tree and a\n * sankey — registered the first time one of them is drawn\n * (`loadCharts('hierarchy')`), as `echartsStatistics.ts` is for its own.\n */\nimport { SankeyChart, SunburstChart, TreeChart } from 'echarts/charts';\n// `use` registers modules with the library; it is not a React hook.\nimport { use as registerModules } from 'echarts/core';\n\nexport function register(): void {\n registerModules([SankeyChart, SunburstChart, TreeChart]);\n}\n"],"mappings":";;;AAsBA,SAAgBK,IAAiB;CAC/BD,EAAgB;EAACJ;EAAaC;EAAeC;CAAS,CAAC;AACzD"}
1
+ {"version":3,"file":"echartsHierarchy-DHNP9W4v.js","names":["SankeyChart","SunburstChart","TreeChart","registerModules","register","register","SankeyChart","SunburstChart","TreeChart"],"sources":["../src/ui/charts/echartsHierarchy.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The hierarchy and flow families' chunk — a sunburst, a tree and a\n * sankey — registered the first time one of them is drawn\n * (`loadCharts('hierarchy')`), as `echartsStatistics.ts` is for its own.\n */\nimport { SankeyChart, SunburstChart, TreeChart } from 'echarts/charts';\n// `use` registers modules with the library; it is not a React hook.\nimport { use as registerModules } from 'echarts/core';\n\nexport function register(): void {\n registerModules([SankeyChart, SunburstChart, TreeChart]);\n}\n"],"mappings":";;;AAsBA,SAAgBI,IAAiB;CAC/BD,EAAgB;EAACH;EAAaC;EAAeC;CAAS,CAAC;AACzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"echartsStatistics-DCDWqvde.js","names":["BoxplotChart","CandlestickChart","FunnelChart","GaugeChart","ParallelChart","RadarChart","ParallelComponent","RadarComponent","use","registerModules","register","register","BoxplotChart","CandlestickChart","FunnelChart","GaugeChart","ParallelChart","RadarChart","ParallelComponent","RadarComponent"],"sources":["../src/ui/charts/echartsStatistics.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The statistical families' chunk — a boxplot, a candlestick, a funnel, a gauge, a radar\n * and parallel axes — registered with the library the first time one of them\n * is drawn (`loadCharts('statistics')`), so a bar chart never pays for\n * them. Registered inside the one export `load.ts` calls, for the reason\n * `echarts.ts` gives: a top-level call nobody reads is dropped by a build.\n */\nimport {\n BoxplotChart,\n CandlestickChart,\n FunnelChart,\n GaugeChart,\n ParallelChart,\n RadarChart,\n} from 'echarts/charts';\nimport { ParallelComponent, RadarComponent } from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport { use as registerModules } from 'echarts/core';\n\nexport function register(): void {\n registerModules([\n BoxplotChart,\n CandlestickChart,\n FunnelChart,\n GaugeChart,\n ParallelChart,\n RadarChart,\n ParallelComponent,\n RadarComponent,\n ]);\n}\n"],"mappings":";;;;AAgCA,SAAgBU,IAAiB;CAC/BD,EAAgB;EACdT;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;CAAc,CACf;AACH"}
1
+ {"version":3,"file":"echartsStatistics-DCDWqvde.js","names":["BoxplotChart","CandlestickChart","FunnelChart","GaugeChart","ParallelChart","RadarChart","ParallelComponent","RadarComponent","registerModules","register","register","BoxplotChart","CandlestickChart","FunnelChart","GaugeChart","ParallelChart","RadarChart","ParallelComponent","RadarComponent"],"sources":["../src/ui/charts/echartsStatistics.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The statistical families' chunk — a boxplot, a candlestick, a funnel, a gauge, a radar\n * and parallel axes — registered with the library the first time one of them\n * is drawn (`loadCharts('statistics')`), so a bar chart never pays for\n * them. Registered inside the one export `load.ts` calls, for the reason\n * `echarts.ts` gives: a top-level call nobody reads is dropped by a build.\n */\nimport {\n BoxplotChart,\n CandlestickChart,\n FunnelChart,\n GaugeChart,\n ParallelChart,\n RadarChart,\n} from 'echarts/charts';\nimport { ParallelComponent, RadarComponent } from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport { use as registerModules } from 'echarts/core';\n\nexport function register(): void {\n registerModules([\n BoxplotChart,\n CandlestickChart,\n FunnelChart,\n GaugeChart,\n ParallelChart,\n RadarChart,\n ParallelComponent,\n RadarComponent,\n ]);\n}\n"],"mappings":";;;;AAgCA,SAAgBS,IAAiB;CAC/BD,EAAgB;EACdR;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;CAAc,CACf;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"echartsTime-DIRSRMnr.js","names":["ThemeRiverChart","CalendarComponent","SingleAxisComponent","use","registerModules","register","register","ThemeRiverChart","CalendarComponent","SingleAxisComponent"],"sources":["../src/ui/charts/echartsTime.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The time families' chunk — a calendar heatmap's calendar coordinate\n * system and a theme river with its single axis — registered the first\n * time one of them is drawn (`loadCharts('time')`). The calendar's cells\n * are the heatmap and its scale the continuous visual map, both already in\n * the first chunk.\n */\nimport { ThemeRiverChart } from 'echarts/charts';\nimport { CalendarComponent, SingleAxisComponent } from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport { use as registerModules } from 'echarts/core';\n\nexport function register(): void {\n registerModules([ThemeRiverChart, CalendarComponent, SingleAxisComponent]);\n}\n"],"mappings":";;;;AAyBA,SAAgBK,IAAiB;CAC/BD,EAAgB;EAACJ;EAAiBC;EAAmBC;CAAmB,CAAC;AAC3E"}
1
+ {"version":3,"file":"echartsTime-DIRSRMnr.js","names":["ThemeRiverChart","CalendarComponent","SingleAxisComponent","registerModules","register","register","ThemeRiverChart","CalendarComponent","SingleAxisComponent"],"sources":["../src/ui/charts/echartsTime.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The time families' chunk — a calendar heatmap's calendar coordinate\n * system and a theme river with its single axis — registered the first\n * time one of them is drawn (`loadCharts('time')`). The calendar's cells\n * are the heatmap and its scale the continuous visual map, both already in\n * the first chunk.\n */\nimport { ThemeRiverChart } from 'echarts/charts';\nimport { CalendarComponent, SingleAxisComponent } from 'echarts/components';\n// `use` registers modules with the library; it is not a React hook.\nimport { use as registerModules } from 'echarts/core';\n\nexport function register(): void {\n registerModules([ThemeRiverChart, CalendarComponent, SingleAxisComponent]);\n}\n"],"mappings":";;;;AAyBA,SAAgBI,IAAiB;CAC/BD,EAAgB;EAACH;EAAiBC;EAAmBC;CAAmB,CAAC;AAC3E"}
@@ -1,4 +1,4 @@
1
- import { Rr as e } from "./actions-CThpS7Yj.js";
1
+ import { Rr as e } from "./actions-G0GVzYhc.js";
2
2
  var t = "\r\n", n = /["\r\n,]/, r = /^[=+\-@\t\r]/, i = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;
3
3
  function a(t, n, r, i = {}) {
4
4
  return o(n.map((e) => e.label), t.map((t) => n.map((n) => {
@@ -26,4 +26,4 @@ function c(e, t) {
26
26
  }
27
27
  export { o as n, a as t };
28
28
 
29
- //# sourceMappingURL=export-D6bnNjrA.js.map
29
+ //# sourceMappingURL=export-CEOFAImT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-CEOFAImT.js","names":["recordValue","field","label","value","column","CSV_BOM","CRLF","MUST_QUOTE","FORMULA_START","PLAIN_NUMBER","neutralizeFormulas","text","serializeCsv","rows","columns","format","options","writeCsv","map","row","header","neutralize","cell","csvField","lines","push","line","join","written","String","evaluable","test","split","recordValue","CRLF","MUST_QUOTE","FORMULA_START","PLAIN_NUMBER","serializeCsv","writeCsv","columns","column","rows","value","row","format","options","neutralize","field","csvField","cell","lines","header","label","line","written","text","evaluable"],"sources":["../src/record/export.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RecordData } from '../model/index.js';\nimport { recordValue } from './project.js';\n\n/** The least an export needs of a column: where to read it, what to call it. */\nexport interface ExportColumn {\n /** A Wow query path, read the way a cell reads it. */\n field: string;\n /** What the header row calls this column. */\n label: string;\n}\n\n/**\n * How one value is written.\n *\n * It is injected rather than decided here, because how a value *reads* is the\n * UI's answer — an enum by its label, a time in the surface's zone, a number\n * in its field's format — and this layer has no catalogue, no locale and no\n * renderers. The column rides along with the value, so one formatter serves\n * every column of the table.\n */\nexport type ExportFormat<C extends ExportColumn = ExportColumn> = (\n value: unknown,\n column: C,\n) => string;\n\n/**\n * The byte order mark Excel needs to read a UTF-8 CSV as UTF-8.\n *\n * Without it Excel on Windows reads the file in the machine's ANSI code page\n * and every Chinese name in it arrives as mojibake — which is most of what\n * these exports carry.\n */\nexport const CSV_BOM = '';\n\n/** RFC 4180 ends every record with CRLF, the last one included. */\nconst CRLF = '\\r\\n';\n\n/** The characters that oblige a field to be quoted, the quote included. */\nconst MUST_QUOTE = /[\"\\r\\n,]/;\n\n/**\n * What a spreadsheet may read a cell as a formula by: its first character\n * (OWASP, CSV Injection). `=`, `+`, `-` and `@` start a formula or a\n * function; a tab or a carriage return in front hides one from a reader who\n * trims.\n */\nconst FORMULA_START = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text that is a number and nothing else: a sign, digits, one decimal\n * point, an exponent. No separators, no currency, no spaces — nothing a\n * spreadsheet could read as more than one number.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?$/;\n\n/** How a CSV is written. */\nexport interface CsvOptions {\n /**\n * Whether a cell a spreadsheet could evaluate is written with an\n * apostrophe in front, so it opens as the text it is. On unless set to\n * `false`.\n *\n * A file leaves the page: it is opened in Excel, often by someone other\n * than whoever exported it, and a value somebody typed into a text field\n * — `=HYPERLINK(…)`, `=cmd|' /C calc'!A0` — would run there as a formula\n * (OWASP, CSV Injection). So every cell whose text starts with `=`, `+`,\n * `-`, `@`, a tab or a carriage return gets a leading `'`, the header's\n * labels included, since a definition names them.\n *\n * Two kinds of cell are left alone, because a spreadsheet reads them as a\n * number and never as a formula: one whose value was a number (a negative\n * amount, however its field formats it — `-1,204.50`, `-$12.00`), and one\n * whose text is a plain number (`-12.5` held by a text field). Prefixing\n * either would only make the file differ from the screen.\n *\n * Turn it off only where the file never reaches a spreadsheet — a\n * pipeline that reads the CSV back as data and wants the text as stored.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** One cell of a file: the value it was read from, and the text it reads as. */\nexport interface CsvCell {\n /** What the row held; only its type is looked at: a number is never a formula. */\n value: unknown;\n /** The text written, before any escaping. */\n text: string;\n}\n\n/**\n * The rows as a CSV, RFC 4180 with a BOM in front.\n *\n * The header is the labels of the columns handed over, in the order they are\n * handed over — which is the projected order of the visible columns, so the\n * file carries the table's columns rather than the definition's fields.\n *\n * Nothing here looks at what a value *means*: `format` has already decided\n * that, and what is left is writing it (`writeCsv`) — the escaping, and the\n * formulas neutralized unless `options` says otherwise (`CsvOptions`).\n */\nexport function serializeCsv<C extends ExportColumn>(\n rows: readonly RecordData[],\n columns: readonly C[],\n format: ExportFormat<C>,\n options: CsvOptions = {},\n): string {\n return writeCsv(\n columns.map(column => column.label),\n rows.map(row =>\n columns.map(column => {\n const value = recordValue(row, column.field);\n return { value, text: format(value, column) };\n }),\n ),\n options,\n );\n}\n\n/**\n * Cells already read, as a CSV: the one writer every export goes through —\n * a record view's rows (`serializeCsv`) and an analysis's groups alike — so\n * the escaping and the formula rule (`CsvOptions.neutralizeFormulas`) are\n * one rule rather than one per export.\n */\nexport function writeCsv(\n header: readonly string[],\n rows: readonly (readonly CsvCell[])[],\n options: CsvOptions = {},\n): string {\n const neutralize = options.neutralizeFormulas !== false;\n const field = (cell: CsvCell) => csvField(cell, neutralize);\n const lines = [header.map(label => field({ value: label, text: label }))];\n for (const row of rows) lines.push(row.map(field));\n return `${CSV_BOM}${lines.map(line => line.join(',')).join(CRLF)}${CRLF}`;\n}\n\n/**\n * One field: neutralized where a spreadsheet could evaluate it, then quoted\n * where it has to be.\n *\n * The text is typed as a string, but it comes from a function a host may\n * have written, so it is coerced rather than trusted: `null` written into\n * the file as the word `null` is a value the table never showed.\n */\nfunction csvField({ value, text }: CsvCell, neutralize: boolean): string {\n let written = typeof text === 'string' ? text : String(text ?? '');\n if (neutralize && evaluable(value, written)) written = `'${written}`;\n return MUST_QUOTE.test(written)\n ? `\"${written.split('\"').join('\"\"')}\"`\n : written;\n}\n\n/** Whether a spreadsheet opening this cell could evaluate it (`CsvOptions`). */\nfunction evaluable(value: unknown, text: string): boolean {\n if (typeof value === 'number' || typeof value === 'bigint') return false;\n return FORMULA_START.test(text) && !PLAIN_NUMBER.test(text);\n}\n"],"mappings":";AAgDA,IAAMM,IAAO,QAGPC,IAAa,YAQbC,IAAgB,gBAOhBC,IAAe;AA+CrB,SAAgBG,EACdC,GACAC,GACAC,GACAC,IAAsB,CAAC,GACf;CACR,OAAOC,EACLH,EAAQI,KAAId,MAAUA,EAAOF,KAAK,GAClCW,EAAKK,KAAIC,MACPL,EAAQI,KAAId,MAAU;EACpB,IAAMD,IAAQH,EAAYmB,GAAKf,EAAOH,KAAK;EAC3C,OAAO;GAAEE;GAAOQ,MAAMI,EAAOZ,GAAOC,CAAM;EAAE;CAC9C,CAAC,CACH,GACAY,CACF;AACF;AAQA,SAAgBC,EACdG,GACAP,GACAG,IAAsB,CAAC,GACf;CACR,IAAMK,IAAaL,EAAQN,uBAAuB,IAC5CT,KAASqB,MAAkBC,EAASD,GAAMD,CAAU,GACpDG,IAAQ,CAACJ,EAAOF,KAAIhB,MAASD,EAAM;EAAEE,OAAOD;EAAOS,MAAMT;CAAM,CAAC,CAAC,CAAC;CACxE,KAAK,IAAMiB,KAAON,GAAMW,EAAMC,KAAKN,EAAID,IAAIjB,CAAK,CAAC;CACjD,OAAO,IAAauB,EAAMN,KAAIQ,MAAQA,EAAKC,KAAK,GAAG,CAAC,CAAC,CAACA,KAAKrB,CAAI,IAAIA;AACrE;AAUA,SAASiB,EAAS,EAAEpB,UAAOQ,WAAiBU,GAA6B;CACvE,IAAIO,IAAU,OAAOjB,KAAS,WAAWA,IAAOkB,OAAOlB,KAAQ,EAAE;CAEjE,OADIU,KAAcS,EAAU3B,GAAOyB,CAAO,MAAGA,IAAU,IAAIA,MACpDrB,EAAWwB,KAAKH,CAAO,IAC1B,IAAIA,EAAQI,MAAM,IAAG,CAAC,CAACL,KAAK,MAAI,EAAC,KACjCC;AACN;AAGA,SAASE,EAAU3B,GAAgBQ,GAAuB;CAExD,OADI,OAAOR,KAAU,YAAY,OAAOA,KAAU,WAAiB,KAC5DK,EAAcuB,KAAKpB,CAAI,KAAK,CAACF,EAAasB,KAAKpB,CAAI;AAC5D"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as e, $r as t, A as n, Ao as r, Ar as i, Ba as a, Ci as o, D as s, Do as c, Fa as l, Ia as u, Io as d, Ja as f, Ka as p, Lr as m, No as h, O as g, Q as _, Ra as v, T as y, To as ee, Ua as te, Wa as ne, Xa as re, Xr as b, Yr as x, Za as ie, Zi as ae, _i as oe, ao as S, bo as se, c as ce, eo as C, et as le, fo as w, gt as ue, ia as de, in as fe, io as pe, k as me, kn as he, ko as T, mo as ge, n as _e, nt as ve, oo as ye, qa as E, qr as D, ro as O, sn as k, so as A, to as j, tt as M, ui as N } from "./actions-CThpS7Yj.js";
2
- import { K as P, Q as be, U as xe, V as Se, X as Ce, Z as we, d as Te, g as Ee, h as De, i as Oe, m as ke, o as Ae, ot as je, r as Me, st as Ne, t as Pe } from "./viewEngine-DL-S0OAZ.js";
3
- import { t as Fe } from "./export-D6bnNjrA.js";
1
+ import { $ as e, $r as t, A as n, Ao as r, Ar as i, Ba as a, Ci as o, D as s, Do as c, Fa as l, Ia as u, Io as d, Ja as f, Ka as p, Lr as m, No as h, O as g, Q as _, Ra as v, T as y, To as ee, Ua as te, Wa as ne, Xa as re, Xr as b, Yr as x, Za as ie, Zi as ae, _i as oe, ao as S, bo as se, c as ce, eo as C, et as le, fo as w, gt as ue, ia as de, in as fe, io as pe, k as me, kn as he, ko as T, mo as ge, n as _e, nt as ve, oo as ye, qa as E, qr as D, ro as O, sn as k, so as A, to as j, tt as M, ui as N } from "./actions-G0GVzYhc.js";
2
+ import { K as P, Q as be, U as xe, V as Se, X as Ce, Z as we, d as Te, g as Ee, h as De, i as Oe, m as ke, o as Ae, ot as je, r as Me, st as Ne, t as Pe } from "./viewEngine-lAwpy3jk.js";
3
+ import { t as Fe } from "./export-CEOFAImT.js";
4
4
  import { TimeUnit as Ie } from "@ahoo-wang/wow-client/dsl";
5
5
  // src/runtime/define/analysis.ts
6
6
  function Le(e, t) {