diff --git a/README.md b/README.md index 289bc64..d713f48 100644 --- a/README.md +++ b/README.md @@ -52,16 +52,15 @@ import '@opencor/plot/style.css'; const x = Float64Array.from({ length: 1000 }, (_, i) => i / 100); const data: PlotData = { - xAxisTitle: 'Time (s)', - yAxisTitle: 'Voltage (mV)', + xAxis: { title: 'Time (s)' }, + yAxis: { title: 'Voltage (mV)' }, traces: [ { name: 'V', xValue: 'time', x, yValue: 'membrane.V', - y: x.map((t) => Math.sin(t)), - color: '#2563eb' + y: x.map((t) => Math.sin(t)) } ] }; @@ -76,10 +75,17 @@ The component is the default export of `@opencor/plot`, and is also exported as | Type | Definition | Description | |---|---|---| -| `PlotData` | `{ traces, xAxisTitle?, yAxisTitle?, xAxisRange?, yAxisRange? }` | The data to plot (see [Data](#data)). | -| `PlotTrace` | `{ name, x, y, xValue, yValue, color, traceId?, legendRank?, runLabel? }` | A trace to plot (see [Data](#data)). | +| `PlotData` | `{ traces, xAxis?, yAxis? }` | The data to plot (see [Data](#data)). | +| `PlotAxis` | `{ title?, range?, grid?, log? }` | An axis of the plot (see [Data](#data)). | +| `PlotTrace` | `{ name, x, y, xValue, yValue, line?, marker?, traceId?, legendRank?, runLabel? }` | A trace to plot (see [Data](#data)). | +| `PlotLineStyle` | `{ type?, color?, thickness? }` | The style of the line of a trace (see [Data](#data)). | +| `PlotLineType` | `'none' \| 'solid' \| 'dash' \| 'dot' \| 'dashDot' \| 'dashDotDot'` | The type of the line of a trace (see [Data](#data)). | +| `PlotMarkerStyle` | `{ type?, size?, fill?, lineColor?, lineThickness? }` | The style of the markers of a trace (see [Data](#data)). | +| `PlotMarkerType` | `'none' \| 'square' \| 'circle' \| 'diamond' \| 'xCross' \| 'plus' \| 'star' \| 'triangleUp' \| 'triangleDown' \| 'triangleLeft' \| 'triangleRight' \| 'hDash' \| 'vDash'` | The type of the markers of a trace (see [Data](#data)). | | `PlotTheme` | `'system' \| 'light' \| 'dark'` | The value of the [`theme`](#props) prop. | | `PlotGroup` | `string \| symbol` | A group of plots, i.e. the value of the [`xAxisAlign`](#props), [`xAxisSync`](#props), [`yAxisAlign`](#props), and [`yAxisSync`](#props) props. A symbol is unique, so that unrelated parts of a page can't end up in the same group by using the same string. | +| `PlotAxesSettings` | `{ x: PlotAxisSettings; y: PlotAxisSettings }` | The payload of the [`axesUpdated`](#events) event, i.e. the current settings of the axes, which the user can change using the context menu, so that the data can say the same (see [`PlotAxis`](#types)). | +| `PlotAxisSettings` | `{ grid: boolean; log: boolean }` | The settings of an axis: whether its grid lines are shown and whether it is logarithmic. | | `PlotRanges` | `{ x: [number, number]; y: [number, number]; zoomed: { x: boolean; y: boolean } }` | The payload of the [`rangesUpdated`](#events) event, i.e. the current ranges of the axes (in actual units, even along a logarithmic axis) and whether each axis is zoomed (rather than autoranged). To restore them later, give `{ x: zoomed.x ? x : null, y: zoomed.y ? y : null }` to [`setRanges()`](#methods), so that an autoranged axis stays autoranged. | | `PlotRangesToSet` | `{ x?: [number, number] \| null; y?: [number, number] \| null }` | The ranges to give to [`setRanges()`](#methods), i.e. the range (in actual units, even along a logarithmic axis) into which to zoom an axis, `null` to reset the zoom of an axis, or nothing to leave an axis as it is. | | `PlotCsvExportEvent` | `PlotCsvExportStartedEvent \| PlotCsvExportProgressEvent \| PlotCsvExportFinishedEvent` | The payload of the [`csvExport`](#events) event. Use its `type` to tell which one it is. | @@ -92,7 +98,7 @@ The component is the default export of `@opencor/plot`, and is also exported as | `ContextMenuAction` | `{ id?: string; label: string; icon?: IconName; checked?: boolean; command?: () => void; items?: ContextMenuItem[] }` | An action: its `id` (so that it can be found, see [Context menu items](#context-menu-items)), its `label`, its `icon`, whether it is checked (only for a checkable action, e.g., to make an axis logarithmic), the `command` to call when it is chosen, and its submenu `items`, if any. | | `ContextMenuSeparator` | `{ separator: true }` | A separator. | | `ContextMenuHeader` | `{ header: string }` | A header that can't be chosen, e.g., the full name of a trace when the context menu is requested from its legend item. It can contain a little HTML (see [Data](#data)). | -| `IconName` | `'angle-right' \| 'arrows-h' \| 'arrows-v' \| 'chart-line' \| 'check' \| 'copy' \| 'download' \| 'eye' \| 'image' \| 'pencil' \| 'refresh' \| 'search-minus' \| 'search-plus'` | The name of an icon (from [PrimeIcons](https://primevue.org/icons/)). | +| `IconName` | `'angle-right' \| 'arrows-h' \| 'arrows-v' \| 'chart-line' \| 'check' \| 'copy' \| 'download' \| 'eye' \| 'image' \| 'list' \| 'pencil' \| 'refresh' \| 'search-minus' \| 'search-plus'` | The name of an icon (from [PrimeIcons](https://primevue.org/icons/)). | | `PlotPointCounts` | `{ nbOfPoints: number; nbOfDrawnPoints: number }` | The value returned by the [`pointCounts()`](#methods) method. | | `PlotMemoryUsage` | `{ levelOfDetail: number; logValues: number }` | The value returned by the [`memoryUsage()`](#methods) method. | @@ -103,8 +109,16 @@ The component is the default export of `@opencor/plot`, and is also exported as | Property | Type | Description | |---|---|---| | `traces` | [`PlotTrace`](#types)`[]` | The traces to plot. | -| `xAxisTitle`, `yAxisTitle` | `string` | The axis titles. | -| `xAxisRange`, `yAxisRange` | `[number, number]` | The range of an axis when the zoom is reset. By default, it fits the data. | +| `xAxis`, `yAxis` | [`PlotAxis`](#types) | The axes. | + +[`PlotAxis`](#types): + +| Property | Type | Description | +|---|---|---| +| `title` | `string` | The title of the axis. | +| `range` | `[number \| null, number \| null]` | The range of the axis when the zoom is reset. By default, it fits the data. An end that is `null` (or that can't be plotted, e.g., a non-positive end along a logarithmic axis) fits the data, while the other end is kept (e.g., `[0, null]` for an axis that starts at 0). If there is no data to fit or it is all beyond the end that is kept, then the axis extends from that end by 1 or 1ppm of it, whichever is bigger. | +| `grid` | `boolean` | Whether to show the grid lines along the axis, i.e. the vertical grid lines for the X axis and the horizontal grid lines for the Y axis. It is used when the plot is created and whenever it changes. In between, the user can still show or hide the grid lines using the context menu, even while the data gets updated (handle the [`axesUpdated`](#events) event to keep the data in sync). By default, the grid lines are shown. The zero line of the axis, if any, is always shown. | +| `log` | `boolean` | Whether the axis is logarithmic. It is used when the plot is created (unless the plot joins a [synchronisation group](#several-plots) that already has some plots, in which case it takes on the scale of the group) and whenever it changes (in which case the plots of the synchronisation group of the axis, if any, do the same, as if the user had made the axis logarithmic, or not, using the context menu). In between, the user can still make the axis logarithmic, or not, using the context menu, even while the data gets updated (handle the [`axesUpdated`](#events) event to keep the data in sync). By default, the axis is linear. | [`PlotTrace`](#types): @@ -113,15 +127,69 @@ The component is the default export of `@opencor/plot`, and is also exported as | `name` | `string` | The name of the trace, as shown in the legend, the hover tooltip, and the CSV export. | | `x`, `y` | `Float64Array` | The X and Y values of the trace. | | `xValue`, `yValue` | `string` | What the X and Y values are (e.g., the name of a model variable), used in the CSV export. | -| `color` | `string` | The colour of the trace. | +| `line` | [`PlotLineStyle`](#types) | The optional style of the line of the trace, which also gives the default colour of its markers (see below). | +| `marker` | [`PlotMarkerStyle`](#types) | The optional style of the markers of the trace (see below). Without it, the trace has circle markers if it has fewer than 20 points, and no markers otherwise. | | `traceId` | `string` | An optional identifier that keeps the visibility of the trace when the data is updated. Otherwise, the trace is identified by its `name`, `xValue`, `yValue`, and `runLabel` (and, among traces that have the same ones, by their order), or by its position if it doesn't have a `name`, `xValue`, and `yValue`. | | `legendRank` | `number` | The optional rank of the trace in the legend (lower ranks first, 1000 by default). | | `runLabel` | `string` | An optional label that tells apart the X column of the trace from those of other runs in the CSV export. | +[`PlotLineStyle`](#types): + +| Property | Type | Description | +|---|---|---| +| `type` | [`PlotLineType`](#types) | The type of the line: no line at all (`'none'`), a solid line (`'solid'`, the default), or a dashed line, with dashes (`'dash'`), dots (`'dot'`), dashes and dots (`'dashDot'`), or dashes and pairs of dots (`'dashDotDot'`). The dashes, dots, and gaps of a dashed line are 4, 1, and 2 times its thickness (or 8, 2, and 4 pixels if it is less than 2 pixels thick, so that it still looks dashed). | +| `color` | `string` | The colour of the line (and, by default, of the markers of its trace), as a CSS colour, which can be transparent (e.g., `'#1f77b4'`, `'#1f77b480'`, or `'rgba(31, 119, 180, 0.5)'`). By default, it is one of [Tableau 10](https://www.tableau.com/blog/colors-upgrade-tableau-10-56782)'s colours, based on the position of its trace in `traces`, i.e. `'#4e79a7'` (blue), `'#f28e2b'` (orange), `'#e15759'` (red), `'#76b7b2'` (teal), `'#59a14f'` (green), `'#edc948'` (yellow), `'#b07aa1'` (purple), `'#ff9da7'` (pink), `'#9c755f'` (brown), `'#bab0ac'` (grey), and then `'#4e79a7'` again, etc. | +| `thickness` | `number` | The thickness of the line, in pixels (2 by default). | + +For example, a dashed red line that is 3 pixels thick and half transparent: + +```ts +const trace: PlotTrace = { + name: 'Membrane potential', + xValue: 'time', + x, + yValue: 'V', + y, + line: { type: 'dash', thickness: 3, color: 'rgba(214, 39, 40, 0.5)' } +}; +``` + +The style of a line is used wherever its trace is drawn: the plot, its legend and hover tooltip (whose swatches show a dashed line with a dash pattern of its own, which fits in them, so that it can be told apart from others), its hover points, its live point, and its copied and exported images (including SVG, where a transparent colour uses an opacity attribute, since SVG 1.1 has no transparent colours). + +[`PlotMarkerStyle`](#types): + +| Property | Type | Description | +|---|---|---| +| `type` | [`PlotMarkerType`](#types) | The type of the markers: no markers at all (`'none'`), a square (`'square'`), a circle (`'circle'`, the default), a diamond (`'diamond'`), an X cross (`'xCross'`), a plus (`'plus'`), a star (`'star'`, i.e. a plus and an X cross), a triangle that points up (`'triangleUp'`), down (`'triangleDown'`), left (`'triangleLeft'`), or right (`'triangleRight'`), or a horizontal (`'hDash'`) or vertical (`'vDash'`) dash. | +| `size` | `number` | The size of the markers, in pixels (6 by default), i.e. the width and height of the square in which the shape of a marker fits, outline excluded (like Plotly). | +| `fill` | `string` | The colour inside the markers, as a CSS colour, which can be transparent (e.g., `'transparent'` for hollow markers). By default, it is the colour of the line of the trace. An X cross, a plus, a star, and a dash have no inside, so they have no fill. | +| `lineColor` | `string` | The colour of the outline of the markers (or of the lines of an X cross, a plus, a star, or a dash), as a CSS colour, which can be transparent. By default, it is the colour of the line of the trace. | +| `lineThickness` | `number` | The thickness of the outline of the markers (or of the lines of an X cross, a plus, a star, or a dash), in pixels (1 by default, or 0 if the outline has the same colour as the fill, as it does by default, since it would then only make the markers look bigger). An outline is centred on the edge of the shape of a marker, so it makes it look bigger by its thickness (e.g., 7 pixels for a 6-pixel marker with a 1-pixel outline). It can be 0 for markers that only have a fill. | + +For example, hollow red diamonds that are 10 pixels big, without a line: + +```ts +const trace: PlotTrace = { + name: 'Measurements', + xValue: 'time', + x, + yValue: 'V', + y, + line: { type: 'none' }, + marker: { type: 'diamond', size: 10, fill: 'transparent', lineColor: '#d62728', lineThickness: 2 } +}; +``` + +Giving a marker style, even an empty one (i.e. `marker: {}`), means that the trace has markers whatever its number of points, and `type: 'none'` means that it has no markers at all. A marker which fill and outline have the same colour (as they do by default) and which has an outline is drawn as one filled shape, including its outline, so that it looks the same, even if that colour is transparent (rather than its outline showing over its fill). Markers are drawn one by one, so a marker covers those drawn before it, and transparent markers get darker where they overlap. A trace with many points gets at most one marker per pixel (since more markers would look the same, but would be slower to draw). The axes get padded so that the markers of the points at the end of an axis are fully shown (by an amount that depends on their size and on the thickness of their outline). + +Like the line of a trace, its markers are used wherever its trace is drawn: the plot, its legend and hover tooltip (whose swatches show its line, if any, and its marker, if any, up to 10 pixels big), its hover points (which are its marker, a third bigger, and at least 8 pixels big), and its copied and exported images (including SVG). A trace that has neither a line nor markers is not drawn at all, and it is not listed in the legend or the hover tooltip (but it is still exported to CSV). + +A dashed line is dashed along the path that is actually drawn, which goes through up to four points per pixel column (see [Large and live data](#large-and-live-data)). So, a dense trace (e.g., noisy data) looks solid, like a solid line would, since its pixel columns are drawn as vertical segments. Its dash pattern also starts again where the trace comes back into the plotting area (e.g., when zoomed in) or carries on after a gap. + Notes: - Titles and trace names can contain a little HTML (`b`, `br`, `code`, `em`, `i`, `strong`, `sub`, and `sup`). Anything else is removed. - A trace can be a function of X (e.g., against time) or not (e.g., a phase plot). A point with a non-finite X or Y value (e.g., `NaN`) is a gap in its trace. -- A trace with fewer than 20 points is also drawn with markers. +- A trace with fewer than 20 points also has circle markers, unless it has a [`marker`](#data) style. ### Large and live data @@ -178,23 +246,22 @@ const linked = ref(true); const t = Float64Array.from({ length: 1000 }, (_, i) => i / 100); const voltageData: PlotData = { - xAxisTitle: 'Time (s)', - yAxisTitle: 'Voltage (mV)', + xAxis: { title: 'Time (s)' }, + yAxis: { title: 'Voltage (mV)' }, traces: [ { name: 'V', xValue: 'time', x: t, yValue: 'membrane.V', - y: t.map((time) => 50 * Math.sin(time) - 30), - color: '#2563eb' + y: t.map((time) => 50 * Math.sin(time) - 30) } ] }; const currentData: PlotData = { - xAxisTitle: 'Time (s)', - yAxisTitle: 'Current (µA/cm²)', + xAxis: { title: 'Time (s)' }, + yAxis: { title: 'Current (µA/cm²)' }, traces: [ { name: 'I', @@ -202,7 +269,7 @@ const currentData: PlotData = { x: t, yValue: 'membrane.I', y: t.map((time) => 2000 * Math.cos(time)), - color: '#dc2626' + line: { color: '#e15759' } } ] }; @@ -211,7 +278,7 @@ const currentData: PlotData = { Here, the plotting areas line up even though the Y axis of the current plot needs more room for its tick labels (e.g., `-2000` rather than `-80`). Both plots show the same 10 seconds, and hovering one of them also shows the values of the other at the same time. -A symbol is unique, so that unrelated parts of a page can't end up in the same group by using the same string. A plot joins or leaves a group whenever its props change (e.g., to let the user choose whether some plots are synchronised), and leaves its groups when it is unmounted. A plot that joins a group with a synchronised axis takes on the range and scale of that axis. +A symbol is unique, so that unrelated parts of a page can't end up in the same group by using the same string. A plot joins or leaves a group whenever its props change (e.g., to let the user choose whether some plots are synchronised), and leaves its groups when it is unmounted. A plot that joins a group with a synchronised axis takes on the range and scale of that axis (even if its data says that the axis is logarithmic, or not, see [`PlotAxis`](#types)), unless it is the first plot of the group. To keep track of the ranges of the axes of a plot (e.g., to restore them later), handle its [`rangesUpdated`](#events) event. @@ -220,7 +287,7 @@ To keep track of the ranges of the axes of a plot (e.g., to restore them later), | Prop | Type | Default | Description | |---|---|---|---| | `data` | [`PlotData`](#types) | (required) | The data to plot. | -| `showLegend` | `boolean` | `true` | Whether to show the legend. The legend takes at most 40% of the width of the plot (with long trace names truncated, and shown in full when hovered or in the context menu of their legend item), and is hidden if the plot is too narrow for it to be useful. | +| `showLegend` | `boolean` | `true` | Whether to show the legend. The legend takes at most 40% of the width of the plot (with long trace names truncated, and shown in full when hovered or in the context menu of their legend item), and is hidden if the plot is too narrow for it to be useful. It is used when the plot is created and whenever it changes. In between, the user can still show or hide the legend using the context menu (use `v-model:showLegend` to keep it in sync). | | `theme` | [`PlotTheme`](#types) | `'system'` | Whether to use light or dark mode, or whatever the system uses. | | `xAxisAlign` | [`PlotGroup`](#types) | | The group of plots whose X axes are to line up with this plot's, i.e. whose plotting areas are to have the same left and right edges (e.g., when they are stacked). | | `xAxisSync` | [`PlotGroup`](#types) | | The group of plots whose X axis is to be synchronised with this plot's, i.e. which share the range and the scale of their X axis, so that zooming, panning, or resetting the zoom of one of them does the same to the others, as does making its X axis logarithmic (or not). Their X axes always show the same range, which, until one of them gets zoomed or panned, fits the data of all of them. Hovering one of them also shows the hover guide and tooltip of the others at the same X value (next to their guide line, at the same relative height as the mouse pointer or finger), so that the values of all of them can be read at once. Like the hovered plot, a plot that has no point at that X value shows its closest point instead, so that its guide line goes through its highlighted points and its tooltip shows the X value of its values. For a trace whose X values are not sorted (e.g., a phase plot), the others show the point that is closest to where the mouse pointer would be, i.e. at their guide line and at that relative height, if any is close enough to it. | @@ -238,9 +305,11 @@ To draw traces without our level of detail, use `:levelOfDetail="false"`. Our pa | Event | Payload | Description | |---|---|---| +| `axesUpdated` | [`PlotAxesSettings`](#types) | Whether an axis has its grid lines shown or is logarithmic has changed, e.g., because the user changed it using the context menu, or because the plot joined a [synchronisation group](#several-plots) whose axis has another scale. It is not emitted when the plot is created. Handle it to keep the data in sync (see [`PlotAxis`](#types)). | | `csvExport` | [`PlotCsvExportEvent`](#types) | An export to CSV has `'started'`, made `'progress'` (with a `percent`), or `'finished'` (with whether it was a `success`), so that its progress can be shown. | | `imageExport` | [`PlotImageExportEvent`](#types) | The plot has been copied to the clipboard or exported to an image (or has failed to be), so that the user can be told about it. | | `rangesUpdated` | [`PlotRanges`](#types) | The range of an axis has changed, or whether it is zoomed has. It is emitted at most once per frame, including while the plot is being zoomed, panned, or animated, and while its data gets updated. | +| `update:showLegend` | `boolean` | The user has shown or hidden the legend using the context menu, so that the [`showLegend`](#props) prop can say the same (e.g., using `v-model:showLegend`). | | `contextMenu` | [`PlotContextMenuEvent`](#types) | Only with [`customContextMenu`](#props): the context menu was requested at `clientX`/`clientY`, with the `items` that our context menu would have shown. If `usingKeyboard` is true, the custom menu should take the keyboard focus. The custom menu should call the `command` of the chosen item while handling the click (or tap, or key press) that chose it, and it shouldn't move the keyboard focus afterwards (calling [`contextMenuHidden()`](#methods) instead), since some commands (e.g., to edit the range of an axis) give the keyboard focus to an editor that closes when it loses it, and iOS only shows its virtual keyboard for such an editor while handling a user interaction. If it calls that `command` while handling a key press (e.g., Enter or Space), it should also prevent that key's default action (using `preventDefault()`), since the key would otherwise also be typed into such an editor, replacing its selected value. | ### Methods @@ -269,31 +338,28 @@ Hovering shows the value of each visible trace at the X value under the mouse po With synchronised axes (see [Several plots](#several-plots)), zooming, panning, resetting the zoom, editing the range of an axis, and making an axis logarithmic (or not) apply to all the plots of the group of that axis, be it done with the mouse, by touch, with the keyboard, or from the context menu. -The context menu can zoom in and out, reset the zoom, edit the range of an axis, make an axis logarithmic, copy the plot to the clipboard, export it as JPEG, PNG, SVG, or WebP, and export its data to CSV, and an app can customise it (see [`contextMenuItems`](#props)). When requested from a legend item, it can also show only that trace (or all the traces again), or show or hide it if it is the only trace. +The context menu can zoom in and out, reset the zoom, show or hide the legend, edit the range of an axis, show or hide its grid lines, and make it logarithmic (from the submenu of that axis), copy the plot to the clipboard, export it as JPEG, PNG, SVG, or WebP, and export its data to CSV, and an app can customise it (see [`contextMenuItems`](#props)). When requested from a legend item, it can also show only that trace (or all the traces again), or show or hide it if it is the only trace. Copied and exported images always use the light colours (white background, dark text), whatever the current theme, since they are typically used in light documents. ### Context menu items -The items of the context menu can be customised using the [`contextMenuItems`](#props) prop, e.g., to add an item that lets the user choose whether the X axes of some plots are synchronised, right before the items that make an axis logarithmic (and separated from them): +The items of the context menu can be customised using the [`contextMenuItems`](#props) prop, e.g., to add an item that lets the user choose whether the X axes of some plots are synchronised, at the end of the submenu of the X axis (and separated from its other items): ```ts const contextMenuItems = (items: ContextMenuItem[]): ContextMenuItem[] => { - const index = items.findIndex((item) => 'id' in item && item.id === 'logarithmicXAxis'); + const xAxisItem = items.find((item): item is ContextMenuAction => 'id' in item && item.id === 'xAxis'); - items.splice( - index, - 0, + xAxisItem?.items?.push( + { + separator: true + }, { - icon: 'arrows-h', - label: 'Linked X Axes', + label: 'Linked', checked: linkedXAxes.value, command: () => { linkedXAxes.value = !linkedXAxes.value; } - }, - { - separator: true } ); @@ -308,7 +374,10 @@ The plot's actions have an `id`, so that they can be found whatever their label: | `traceVisibility` | Show only a trace (or all the traces again), or show or hide it if it is the only trace (only when the context menu is requested from a legend item, after a header with the name of its trace). | | `zoomIn`, `zoomOut` | Zoom in and out. | | `resetZoom` | Reset the zoom. | -| `editAxisRange` | Edit the range of an axis, with `xAxisMinimum`, `xAxisMaximum`, `yAxisMinimum`, and `yAxisMaximum` in its submenu. | +| `legend` | Show or hide the legend. | +| `xAxis`, `yAxis` | The submenu of an axis, with the items below. | +| `xAxisMinimum`, `xAxisMaximum`, `yAxisMinimum`, `yAxisMaximum` | Edit the minimum or maximum of an axis. | +| `xGridLines`, `yGridLines` | Show or hide the grid lines along an axis. | | `logarithmicXAxis`, `logarithmicYAxis` | Make an axis logarithmic (or not). | | `copyToClipboard` | Copy the plot to the clipboard. | | `exportPlot` | Export the plot, with `exportPlotAsJpeg`, `exportPlotAsPng`, `exportPlotAsSvg`, and `exportPlotAsWebp` in its submenu. | @@ -366,7 +435,7 @@ Our [demo app](https://opencor.github.io/plot/) gets deployed to GitHub Pages wh ### Benchmarking -`bun benchmark` builds the demo app, serves it, and runs its benchmark (i.e. what its **Benchmark** button does) in one or more browsers, for a set of scenarios. Its results get saved as a report in `benchmark-results/`, named after when the benchmark was run, as HTML (to be opened in a browser), Markdown (e.g., to be pasted in an issue), and JSON (e.g., to be compared with other results). The report is updated as results come in, so it is there even if the benchmark gets interrupted. +`bun benchmark` builds the demo app, serves it, and runs its benchmark (i.e. what the **Run benchmark** button of its **Benchmark** section does) in one or more browsers, for a set of scenarios. Its results get saved as a report in `benchmark-results/`, named after when the benchmark was run, as HTML (to be opened in a browser), Markdown (e.g., to be pasted in an issue), and JSON (e.g., to be compared with other results). The report is updated as results come in, so it is there even if the benchmark gets interrupted. ```bash bun benchmark # All the browsers and scenarios. diff --git a/bun.lock b/bun.lock index c0f8f5c..c4440b4 100644 --- a/bun.lock +++ b/bun.lock @@ -8,18 +8,18 @@ "uplot": "1.6.32", }, "devDependencies": { - "@biomejs/biome": "^2.6.9", + "@biomejs/biome": "^2.6.10", "@happy-dom/global-registrator": "^21.0.4", "@types/bun": "^1.4.5", - "@vitejs/plugin-vue": "^6.0.11", + "@vitejs/plugin-vue": "^6.1.1", "@vue/tsconfig": "^0.9.1", - "puppeteer-core": "^25.19.0", - "stylelint": "^18.1.0", + "puppeteer-core": "^26.0.0", + "stylelint": "^18.2.0", "stylelint-config-standard": "^41.1.0", "typescript": "^7.0.2", "typescript-6": "npm:typescript@^6.0.3", - "vite": "^8.4.0", - "vue": "^3.5.46", + "vite": "^8.4.1", + "vue": "^3.5.47", "vue-tsc": "^3.3.14", }, "peerDependencies": { @@ -28,35 +28,35 @@ }, }, "packages": { - "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.15", "", {}, "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w=="], + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.17", "", {}, "sha512-iY5lvqFhfgMXp4o4zWads4NvQZXizBxzCoADPOgFMcMwk1XefAdBJbc9i1y94aflY57lokjOjRTa3AOOW9R7BQ=="], - "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.17", "", {}, "sha512-AG+olLB+teKhkQ2WYJeaZqJwNLjtWTz1waQIP/tEYITzVzpdHLP7IXx2c/bH2JTsNCgvWlkqdCv91xcb8lul8Q=="], - "@babel/parser": ["@babel/parser@7.29.15", "", { "dependencies": { "@babel/types": "^7.29.15" }, "bin": "./bin/babel-parser.js" }, "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA=="], + "@babel/parser": ["@babel/parser@7.29.17", "", { "dependencies": { "@babel/types": "^7.29.17" }, "bin": { "parser": "bin/babel-parser.js" } }, "sha512-I+0olVqWMm9bimQJc/5B3jn1nivNDXtnMtDVs07XdHzZLcWa2N/mlCTPmAsQg95QcKoXSuFD2Yz4fwdtoyk7DQ=="], - "@babel/types": ["@babel/types@7.29.15", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.15", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ=="], + "@babel/types": ["@babel/types@7.29.17", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.17", "@babel/helper-validator-identifier": "^7.29.17" } }, "sha512-kzo3lZUbI0gARA4QvhmOTH/aws2SrZ880ECQRIjPPSrdfBM0bZCkj1U7UN2fB0GNeXayqCiLVXa2+1jAhn377Q=="], - "@biomejs/biome": ["@biomejs/biome@2.6.9", "", { "optionalDependencies": { "@biomejs/cli-android-arm64": "2.6.9", "@biomejs/cli-android-x64": "2.6.9", "@biomejs/cli-darwin-arm64": "2.6.9", "@biomejs/cli-darwin-x64": "2.6.9", "@biomejs/cli-linux-arm64": "2.6.9", "@biomejs/cli-linux-arm64-musl": "2.6.9", "@biomejs/cli-linux-x64": "2.6.9", "@biomejs/cli-linux-x64-musl": "2.6.9", "@biomejs/cli-win32-arm64": "2.6.9", "@biomejs/cli-win32-x64": "2.6.9" }, "bin": { "biome": "bin/biome" } }, "sha512-RelCBDzTXu4DBU8c35P4iMrDO80SUjW0OgjDA7CT1z3UcCU5IclWTZ2XnMelI4frQL//xg2K2BQxAhcOKxdPQA=="], + "@biomejs/biome": ["@biomejs/biome@2.6.10", "", { "optionalDependencies": { "@biomejs/cli-android-arm64": "2.6.10", "@biomejs/cli-android-x64": "2.6.10", "@biomejs/cli-darwin-arm64": "2.6.10", "@biomejs/cli-darwin-x64": "2.6.10", "@biomejs/cli-linux-arm64": "2.6.10", "@biomejs/cli-linux-arm64-musl": "2.6.10", "@biomejs/cli-linux-x64": "2.6.10", "@biomejs/cli-linux-x64-musl": "2.6.10", "@biomejs/cli-win32-arm64": "2.6.10", "@biomejs/cli-win32-x64": "2.6.10" }, "bin": { "biome": "bin/biome" } }, "sha512-cpdkEmVimYKUOu9GtaDQs7HEPLknqyfBzlBONfkI05VGR7WkL0kTdQ9Fy/dl7S7Do8KDE3dxO7BJx4teWQRwoQ=="], - "@biomejs/cli-android-arm64": ["@biomejs/cli-android-arm64@2.6.9", "", { "os": "android", "cpu": "arm64" }, "sha512-/3Aj5aiG+Iz8yDBJJb/GFDsptr9ONk3n1wZUIERuU+pVXMIslBaOnrTYJI5QVVXZ9jE494myQHiIvFrjQCBYeQ=="], + "@biomejs/cli-android-arm64": ["@biomejs/cli-android-arm64@2.6.10", "", { "os": "android", "cpu": "arm64" }, "sha512-VSeOiWI6nIKfqUnwTE9PIA5pzzVt/HGeYR+XR/sKZS2IK6Ow8XrHnYr21/G8gv49qKyJMIVGBg7LSQ+haYTLEQ=="], - "@biomejs/cli-android-x64": ["@biomejs/cli-android-x64@2.6.9", "", { "os": "android", "cpu": "x64" }, "sha512-erjbUpD9KJhzTsGHY9oStJ1bSiUJ1ikUXgdr0iOFoIAMiKqW+GdVdEqAlEyqiZA6CBiFqf2fV+g0AVl3hYOuYg=="], + "@biomejs/cli-android-x64": ["@biomejs/cli-android-x64@2.6.10", "", { "os": "android", "cpu": "x64" }, "sha512-2fDzSCkXkD3QdLP3KXVrZd9ZYzCf3RF4c1fJ8enTdBqo8osd4pxEgBOVdema45OXUqd2ETI9xMCAj4/jdv05Pw=="], - "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.6.9", "", { "os": "darwin", "cpu": "arm64" }, "sha512-fO67s0SF+lKGhNPQ7jUXiz0yXGl/1Qm3XTIn/4Hd2Z2z3ewQMrotWIMVdIPxZAgLJdQtRLBOzgsTRzTl981yWA=="], + "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.6.10", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BHQz2DiXPM8V5B+Mj2cp9+Jva1iMXARf3now7eCy78gtKweKWThvoBxGwWnRRaGtChVasZiKbOwKKfsie8tlBA=="], - "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.6.9", "", { "os": "darwin", "cpu": "x64" }, "sha512-RdjT3Z6dLlii0x6EroncTp9jg38FMx2R1aeaaU4BbZ4//3TJ2mA2R39KMIrZYxHdHXcfv9X2V5hwKkXhg08w/g=="], + "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.6.10", "", { "os": "darwin", "cpu": "x64" }, "sha512-CbTvsWg1vO4d1Kqtik17RuRdkOkgcqfKvPfdfZa0LzSjexNNr4Jxlqu0T82htFhWwfApNKCmM3BzhJBThY+j5Q=="], - "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.6.9", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-x73OpQSuQLuvNfzXWEjf0mK95NxlJQX4eG/jmuSrGWOz+/jcLUE4N/21yBu3n0X+wa8bJ3NsWNvmNacLnyc2CQ=="], + "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.6.10", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-mgdDObU9esnB4LHDTeHW5rNY97L0cnSBhgz3aVn3xN452kOUJ8aDfEDVdYxzrEL43ifkPFG8IYXvrJS93z9VlQ=="], - "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.6.9", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-qoG0R5MhJ8VFozVFZQC42V3qCI1TInDhL/YcPPg0oTzfv3vuh0ZDXj+2nNahq8gboHUMv7MWpGjRDLhpQatJ+A=="], + "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.6.10", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-7FQYizRztwR3EKHB5KvT5EsFaql3QRjebOzI7yM896Kt5dVa+bYNqK8wEXWD/sSaQr0p9Acj60w10Dw47OSb/g=="], - "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.6.9", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-uVrqS0HDjRzFlx88ZpfmlZvJ+xIwTU+110vunzrYvZQ5OqXl/1ugMTNvAs61hejH7jh7iequKJwagRVarrYcSQ=="], + "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.6.10", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-GcVJ9SJjWBMQUgwn+VQwEzN5mlKk/XQRlK+Bunu25FohZOtr9wtygIKQSS+9ChWoauUbN/4Y/nFTltng5XghRA=="], - "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.6.9", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-o73Sk1hCbGOFOrDlxtpHGIubnLwMXscT32+ujMwUyq9o0f4onxO7OznzkFgcZGbwKy1R3ohroOkqZDXqj1u29g=="], + "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.6.10", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-stw0eamOkE2DJc3WwuC1KEBo9PGPmE6TJf/1ZHNXfR7JWYgspfRA9WimmFG1Nua2QWQP9+t2znkJfRFKamDLGw=="], - "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.6.9", "", { "os": "win32", "cpu": "arm64" }, "sha512-4yvNG4nQGJsJA/PTVAt8IBFXvY6hXk4UdjtPlTf4QTMIjH7ysOwBew78bKThkRv1eyRwH2mGLIk4lAZp8tfAdw=="], + "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.6.10", "", { "os": "win32", "cpu": "arm64" }, "sha512-Fmv2JxQbQRmx7qSMFZslzzcQVbQq4wo6wfXmql0w8AP6oa5EFPDDuh131kiGMjdmeXyxpc5l1JGhWT+tEOqgsQ=="], - "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.6.9", "", { "os": "win32", "cpu": "x64" }, "sha512-mwarNc4GEg5JknsRaJDyJDFr4kICD7snsGM8yYFOoIHimSU1ekWNbcZ44QDa6/30fUZC9077wbBpXE8fp03aug=="], + "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.6.10", "", { "os": "win32", "cpu": "x64" }, "sha512-JxmB7xWbMJxYhuEh/3E3GuVyp0aU1Yzw2RZDF6IstobKAlpXvh3FjBx1F6g66sETvqPuBzE6l2CNGWdptIILPA=="], "@csstools/css-calc": ["@csstools/css-calc@3.4.4", "", { "peerDependencies": { "@csstools/css-parser-algorithms": "^4.0.3", "@csstools/css-tokenizer": "^4.0.3" } }, "sha512-Jwo1Z8DUsZ8xVOLBdLMfhjJFvWD6pqaUTlBNQZ+qIB2i9g7yG8kd/UBJj2c9J9Twr+u87cjy9BjkmfvMbyOk3Q=="], @@ -78,7 +78,7 @@ "@oxc-project/types": ["@oxc-project/types@0.160.0", "", {}, "sha512-gw4k9syEmnckbOgw2A2FU1TBDdX9hfwV9jEn/uio65pguPzwWiXQS3OIJDMEhv9m06tj9XiEe6RoD0YA+LgreA=="], - "@puppeteer/browsers": ["@puppeteer/browsers@3.3.0", "", { "dependencies": { "modern-tar": "^0.8.6", "yargs": "^18.0.0" }, "peerDependencies": { "proxy-agent": ">=8.0.1", "yauzl": "^2.10.0 || ^3.4.0" }, "optionalPeers": ["proxy-agent", "yauzl"], "bin": { "browsers": "lib/main-cli.js" } }, "sha512-ZiOVHQ5KmsinwZJMwRc/a3xsGHbi9dRuAyf2gq4i9J5vRaI4r7SSIaJUniF1JVClG+qNoVdtBBWfL08N9Oib6g=="], + "@puppeteer/browsers": ["@puppeteer/browsers@3.3.1", "", { "dependencies": { "modern-tar": "^0.8.6", "yargs": "^18.0.0" }, "peerDependencies": { "proxy-agent": ">=8.0.1", "yauzl": "^2.10.0 || ^3.4.0" }, "optionalPeers": ["proxy-agent", "yauzl"], "bin": { "browsers": "lib/main-cli.js" } }, "sha512-uPUGYSnpCmCbCgY+eGXeneCDeLmNOjNxeyyXhxPyYRg/E6ZKQqsNDB+njfrtFqRuv3I/n/Gt1xNc+yeqatR3Xw=="], "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.3.4", "", { "os": "android", "cpu": "arm" }, "sha512-xCW8CkL/ualx/SbYqeG9iK87lJCZGDQ0soE+kaORJ0Bd+pHALyE4qK7BStmEAyYWLEzZ3/biSIpA6/7GDFvzIg=="], @@ -162,7 +162,7 @@ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="], - "@vitejs/plugin-vue": ["@vitejs/plugin-vue@6.0.11", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "vue": "^3.2.25 || ^3.6.0-rc.15" } }, "sha512-m48lskIUJGlB6qUiYhDMI8nd2ngeidz2U4nKTjqI13cFMu5rH8JeEILPkDtK9Fk/TjBA2pkj8AlbenqDaKu+ww=="], + "@vitejs/plugin-vue": ["@vitejs/plugin-vue@6.1.1", "", { "dependencies": { "@rolldown/pluginutils": "^1.1.1" }, "peerDependencies": { "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "vue": "^3.2.25 || ^3.6.0-rc.15" } }, "sha512-ESHe2nVa454xILK3YHLF0NCbtk6CMib3VdxAcGuyis1P6amD5WtTxkPXrQc6s6NtGzqz/Nf9aNA22wJJA8rK7g=="], "@volar/language-core": ["@volar/language-core@2.4.30", "", { "dependencies": { "@volar/source-map": "2.4.30" } }, "sha512-73fjwEV8wat6aOZ6U/y/hqtE30ocrIWECg67b0txGczOMNw+MffLmvJ5fnFfN9drVUEYZzLdaNo6VAy6G6avMw=="], @@ -172,25 +172,25 @@ "@volar/typescript": ["@volar/typescript@2.4.30", "", { "dependencies": { "@volar/language-core": "2.4.30", "@volar/language-service": "2.4.30", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" }, "peerDependencies": { "typescript": "<7" }, "optionalPeers": ["typescript"] }, "sha512-/DgA5tgYFPfrLFuSjIMXMGHk1LQv2+P8eny6+BhGNzFJELWIW7UZlc56ZLIRFhLsPpMfIFxM8/HvOPBggrjTZg=="], - "@vue/compiler-core": ["@vue/compiler-core@3.5.46", "", { "dependencies": { "@babel/parser": "^7.29.12", "@vue/shared": "3.5.46", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.3" } }, "sha512-yb+N8/mgBcoeqCJPVyJI/D3OphLrSMXnB3ZQUNmRLU/1fsMW4bFfdJWNi9oIj7+EA3ULKKkP7b/VCpcYQYeiuQ=="], + "@vue/compiler-core": ["@vue/compiler-core@3.5.47", "", { "dependencies": { "@babel/parser": "^7.29.12", "@vue/shared": "3.5.47", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.3.0" } }, "sha512-xbUKXtPx9xM48gdpGatozxMydqwwCxwa3N3HRH2bsDwlwgwVPPAY5Of7Zjn9tRuf1bQi9IrNEUvfriA7xYALhA=="], - "@vue/compiler-dom": ["@vue/compiler-dom@3.5.46", "", { "dependencies": { "@vue/compiler-core": "3.5.46", "@vue/shared": "3.5.46" } }, "sha512-Bj3lCSw3DQnDRDxw115XqdLDd0+18Nftlgd8OXSGG+ud74hxJIE17eYrM+VWgQrTMsvJbLh9Hzf2MkwAzru36Q=="], + "@vue/compiler-dom": ["@vue/compiler-dom@3.5.47", "", { "dependencies": { "@vue/compiler-core": "3.5.47", "@vue/shared": "3.5.47" } }, "sha512-FSRyMXkIo+qfYNAUFpPipSvXzsbH7uQ2cIcNIk4/kpcSwoy2osIIrVyuPNG1vW6Anvf6kU8Oib+iYs2hBRoikA=="], - "@vue/compiler-sfc": ["@vue/compiler-sfc@3.5.46", "", { "dependencies": { "@babel/parser": "^7.29.12", "@vue/compiler-core": "3.5.46", "@vue/compiler-dom": "3.5.46", "@vue/compiler-ssr": "3.5.46", "@vue/shared": "3.5.46", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.32", "source-map-js": "^1.2.3" } }, "sha512-hjUvMxGh+QIgegwksfp6BRBYleE/a8veZHvTR6sa+o+bM4HU+WnrUZlhN0X+pDcsl8Lhwmbu72xPvLMk3XUwog=="], + "@vue/compiler-sfc": ["@vue/compiler-sfc@3.5.47", "", { "dependencies": { "@babel/parser": "^7.29.12", "@vue/compiler-core": "3.5.47", "@vue/compiler-dom": "3.5.47", "@vue/compiler-ssr": "3.5.47", "@vue/shared": "3.5.47", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.32", "source-map-js": "^1.3.0" } }, "sha512-T2DRi7JtfgcHcrs8Anx3nR04DXmNvyQ63H6zAWCgKSybqZJFlH+U1A6tMwapFrxJLZC7fklLDP8C9BxIuLnHLQ=="], - "@vue/compiler-ssr": ["@vue/compiler-ssr@3.5.46", "", { "dependencies": { "@vue/compiler-dom": "3.5.46", "@vue/shared": "3.5.46" } }, "sha512-qebChL3aP0m1k+TlSf+fZWvOwAf3flBCi5o+n01ykR3DX4mTIWheFltmoiQ12+z66/4cGeXqbB2P7sPWkGhQNQ=="], + "@vue/compiler-ssr": ["@vue/compiler-ssr@3.5.47", "", { "dependencies": { "@vue/compiler-dom": "3.5.47", "@vue/shared": "3.5.47" } }, "sha512-7Ck+2eIkftCCw/07GaGJhPoH5UB2GLmP4XQz5BjyVyuL0CEKw0WQvLVb0iTdhMsSdcvcWfKTC+/Tf/NJGOa27w=="], "@vue/language-core": ["@vue/language-core@3.3.14", "", { "dependencies": { "@volar/language-core": "2.4.30", "@vue/compiler-dom": "^3.5.0", "@vue/shared": "^3.5.0", "alien-signals": "^3.2.1", "muggle-string": "^0.4.1", "path-browserify": "^1.0.1", "picomatch": "^4.0.4" } }, "sha512-kRB+3hHg0c+BdD1XLAvwjVMQd5pC05zijSlPDRI3ERvC/s04JlRs5upy2KjeMg/9m9oD5zuMVh9yVvkKfZqoJg=="], - "@vue/reactivity": ["@vue/reactivity@3.5.46", "", { "dependencies": { "@vue/shared": "3.5.46" } }, "sha512-+FHtYTvGxgFoX3oRs7soz6JHizGv50Q26WJN6PWtXuTLXRfkfUpDUTRuoTA/kiZVVt8NMeMpsPQLh9h++ReUjQ=="], + "@vue/reactivity": ["@vue/reactivity@3.5.47", "", { "dependencies": { "@vue/shared": "3.5.47" } }, "sha512-6iuspHOyn9yenqhwELQiOeBa+JX3bpLVadwg8cwNkslqcOJZHuSUsbF7EUw92nV4ifKjZzF78EQnLThHwOnfAA=="], - "@vue/runtime-core": ["@vue/runtime-core@3.5.46", "", { "dependencies": { "@vue/reactivity": "3.5.46", "@vue/shared": "3.5.46" } }, "sha512-eJUzKAUaHAmtnys/l9qduPzUnBrYMkmsCU7TN+vbSOSpm8kcETT7nacKxIO4MBej/XiOraVzq+lSeZv7o1//jQ=="], + "@vue/runtime-core": ["@vue/runtime-core@3.5.47", "", { "dependencies": { "@vue/reactivity": "3.5.47", "@vue/shared": "3.5.47" } }, "sha512-hd5oji/0YlB14d4kLvma8nj9q0ltYuWLS9Oi7IBNdqhNTPNxzmMRi4iRfI6X7I6uf6a7GtD7PZYdGZb/9fvixw=="], - "@vue/runtime-dom": ["@vue/runtime-dom@3.5.46", "", { "dependencies": { "@vue/reactivity": "3.5.46", "@vue/runtime-core": "3.5.46", "@vue/shared": "3.5.46", "csstype": "^3.2.4" } }, "sha512-6L7lbBvXTYBFFjIt25a0pgdpmn3Ns8RqUnNVibRzF4bgyiWJvqOhKEV5MXYWKlCttZE3aGeJN8mveo+6IrIKXA=="], + "@vue/runtime-dom": ["@vue/runtime-dom@3.5.47", "", { "dependencies": { "@vue/reactivity": "3.5.47", "@vue/runtime-core": "3.5.47", "@vue/shared": "3.5.47", "csstype": "^3.2.4" } }, "sha512-uESQlsglAWF40lkSuO9Ymto+NCagWP1DbLpZpMvXNCV+AADqxuH5aaxJruy//Yuy0Vt2th/25PYcEawPl3YnBw=="], - "@vue/server-renderer": ["@vue/server-renderer@3.5.46", "", { "dependencies": { "@vue/compiler-ssr": "3.5.46", "@vue/runtime-dom": "3.5.46", "@vue/shared": "3.5.46" } }, "sha512-4mc0YWREc6OZ5pDCigvKPDzIUV+aciiH92yvyTS6xaHHxW/80rMceQQn11pYe7OEEBt2YQgYWR9zF8QF30GJUQ=="], + "@vue/server-renderer": ["@vue/server-renderer@3.5.47", "", { "dependencies": { "@vue/compiler-ssr": "3.5.47", "@vue/runtime-dom": "3.5.47", "@vue/shared": "3.5.47" } }, "sha512-WoHtOIi0msvWk85150TcCEWdKfeEcPO2wo8yQ0lWi1UWiNjiVWi+5ZKYhO4gHe4D5Nb0uBVBzZJOtJfS+JAstA=="], - "@vue/shared": ["@vue/shared@3.5.46", "", {}, "sha512-P1WePbdzHrcIciWtmY2Im9EFhdakd3rZxYqvalOa3SfoxtF35Q8Uhmj1tKn6bWP4utcOpN8ao6BoJUItq0Uf+g=="], + "@vue/shared": ["@vue/shared@3.5.47", "", {}, "sha512-MrIBiAoWPEs9NBg2ZElTghaUMDfpVL+Zbogw31saY9vmHXShBncOAUzuYkAVASRWB3AsDhgCcn8L9LDG7Lez2Q=="], "@vue/tsconfig": ["@vue/tsconfig@0.9.1", "", { "peerDependencies": { "typescript": ">= 5.8", "vue": "^3.4.0" }, "optionalPeers": ["typescript", "vue"] }, "sha512-buvjm+9NzLCJL29KY1j1991YYJ5e6275OiK+G4jtmfIb+z4POywbdm0wXusT9adVWqe0xqg70TbI7+mRx4uU9w=="], @@ -278,7 +278,7 @@ "mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="], - "modern-tar": ["modern-tar@0.8.6", "", {}, "sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg=="], + "modern-tar": ["modern-tar@0.8.7", "", {}, "sha512-q17gyzLiCw2wf/Rcl5c3EA5ynB2hOHb5+qMpbaILOQBaTiBx9bumfXC5sMk0wQrVoLtlBhW77dJTnLArlczsGg=="], "muggle-string": ["muggle-string@0.4.1", "", {}, "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ=="], @@ -292,7 +292,7 @@ "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], - "postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], + "postcss": ["postcss@8.5.34", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.4" } }, "sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw=="], "postcss-safe-parser": ["postcss-safe-parser@7.1.0", "", { "peerDependencies": { "postcss": "^8.4.31" } }, "sha512-1WzZxRLaAFwEh6Do+zyGpjWV3nGJNxxhuh7Ubu/q1ICImMgZJnLwhoaEpRbG4pJppp2Y1ncL9ffA2f+LhrefQg=="], @@ -300,19 +300,19 @@ "postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="], - "puppeteer-core": ["puppeteer-core@25.19.0", "", { "dependencies": { "@puppeteer/browsers": "3.3.0", "chromium-bidi": "157.0.8090-0", "devtools-protocol": "0.0.1724436", "typed-query-selector": "^2.12.3", "webdriver-bidi-protocol": "1.0.2", "ws": "^8.23.0" } }, "sha512-F4pw8kpSczJS3TCHBw7/qskDxv4cMj09oOv7BwhHGYOerxLF1Sk2t4tpWlLvy6Vx/mM6TuqkDj4j0j3PRN1FiA=="], + "puppeteer-core": ["puppeteer-core@26.0.0", "", { "dependencies": { "@puppeteer/browsers": "3.3.1", "chromium-bidi": "157.0.8090-0", "devtools-protocol": "0.0.1724436", "typed-query-selector": "^2.12.4", "webdriver-bidi-protocol": "1.0.2", "ws": "^8.23.0" } }, "sha512-GNnGKv4g7uXepoXMsQGt8ghgongs9MKF/lzN5RDlbpEY0IOY9G46NfHZmw1IcEUyB9ufeAZh+PZ6NdvJkHzvBQ=="], "rolldown": ["rolldown@1.3.4", "", { "dependencies": { "@oxc-project/types": "=0.160.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.3.4", "@rolldown/binding-android-arm64": "1.3.4", "@rolldown/binding-darwin-arm64": "1.3.4", "@rolldown/binding-darwin-x64": "1.3.4", "@rolldown/binding-freebsd-x64": "1.3.4", "@rolldown/binding-linux-arm-gnueabihf": "1.3.4", "@rolldown/binding-linux-arm64-gnu": "1.3.4", "@rolldown/binding-linux-arm64-musl": "1.3.4", "@rolldown/binding-linux-ppc64-gnu": "1.3.4", "@rolldown/binding-linux-s390x-gnu": "1.3.4", "@rolldown/binding-linux-x64-gnu": "1.3.4", "@rolldown/binding-linux-x64-musl": "1.3.4", "@rolldown/binding-openharmony-arm64": "1.3.4", "@rolldown/binding-wasm32-wasi": "1.3.4", "@rolldown/binding-win32-arm64-msvc": "1.3.4", "@rolldown/binding-win32-x64-msvc": "1.3.4" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-p2rq4bfBmF0M6yaR8+A89fbkBQynZI2fxUW4G07eq9kpctAkpo7q5BZ4X4Mo4XZ7HHROu33cX9PeopUFN6u+2Q=="], "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], - "source-map-js": ["source-map-js@1.2.4", "", {}, "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA=="], + "source-map-js": ["source-map-js@1.3.0", "", {}, "sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q=="], "string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], - "stylelint": ["stylelint@18.1.0", "", { "dependencies": { "@csstools/css-calc": "^3.4.3", "@csstools/css-parser-algorithms": "^4.0.2", "@csstools/css-syntax-patches-for-csstree": "^1.1.16", "@csstools/css-tokenizer": "^4.0.2", "@csstools/media-query-list-parser": "^5.0.2", "@csstools/selector-resolve-nested": "^4.0.2", "@csstools/selector-specificity": "^6.0.1", "colord": "^2.13.0", "cosmiconfig": "^10.0.1", "css-tree": "^3.2.1", "ignore": "^7.0.14", "import-meta-resolve": "^4.2.0", "picomatch": "^4.0.7", "postcss": "^8.5.33", "postcss-safe-parser": "^7.1.0", "postcss-selector-parser": "^7.2.1", "postcss-value-parser": "^4.2.0", "tinyglobby": "^0.2.17", "write-file-atomic": "^8.0.0" }, "bin": { "stylelint": "bin/stylelint.mjs" } }, "sha512-QbF/IY7KY6lZRhYU/vmPU1KYxc71wgkXdgeptqzTh3lbnZps6WHaskfPjpL6Fh4JaCzwkKKitVcMrpfQTSwwPA=="], + "stylelint": ["stylelint@18.2.0", "", { "dependencies": { "@csstools/css-calc": "^3.4.4", "@csstools/css-parser-algorithms": "^4.0.2", "@csstools/css-syntax-patches-for-csstree": "^1.1.17", "@csstools/css-tokenizer": "^4.0.2", "@csstools/media-query-list-parser": "^5.0.3", "@csstools/selector-resolve-nested": "^4.0.2", "@csstools/selector-specificity": "^6.0.1", "colord": "^2.13.0", "cosmiconfig": "^10.0.1", "css-tree": "^3.2.1", "ignore": "^7.0.14", "import-meta-resolve": "^4.2.0", "picomatch": "^4.0.7", "postcss": "^8.5.34", "postcss-safe-parser": "^7.1.0", "postcss-selector-parser": "^7.2.1", "postcss-value-parser": "^4.2.0", "tinyglobby": "^0.2.17", "write-file-atomic": "^8.0.0" }, "bin": { "stylelint": "bin/stylelint.mjs" } }, "sha512-QTXlfi4m+jnei3ZgWOk4NqtLdCXEGNaM8MYAu9mCx+f+WrXJXL6qZiM9mA/GU8ZFZLZry/8vxFwPJTBVcy5MfQ=="], "stylelint-config-recommended": ["stylelint-config-recommended@19.1.0", "", { "peerDependencies": { "stylelint": "^18.0.0" } }, "sha512-DurXBzvz2cmVX2rM1JMDCbPIq+MRKhIPY743lFk1DjUoyx7giLfN+HR8Hilw+kE2nE5blaXhVf66edvQGnLdwA=="], @@ -332,7 +332,7 @@ "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], - "vite": ["vite@8.4.0", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.33", "rolldown": "~1.3.2", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3", "napi-windows-process-start-time": "^0.1.0" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-X2nUJg+9cutlz3hzqyO6p+WTwk9H257DjwAEf9EQYUFrQbDItmetadi9gYmb+l7VDy4r3VXLUnmLTwuPmzejDw=="], + "vite": ["vite@8.4.1", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.34", "rolldown": "~1.3.4", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3", "napi-windows-process-start-time": "^0.1.0" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-2bl8n3+GkKBKQQR8CZC+t+3NvjWCBNh9S0Dbfu7hr7+Jjeg71jcZk7uKF6mo8GZXjIws+Nl6jhvAfHUO320VuQ=="], "vscode-jsonrpc": ["vscode-jsonrpc@10.0.2", "", {}, "sha512-U6K7wa1t8jTZf7eoHJLKSNdHE0oi9r/+/4TSXWPSLQ2FSQVMYLR5TvzQHrYjwW/lLjq0eTm+pi8vWz4jSV7o4w=="], @@ -344,7 +344,7 @@ "vscode-uri": ["vscode-uri@3.2.0", "", {}, "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg=="], - "vue": ["vue@3.5.46", "", { "dependencies": { "@vue/compiler-dom": "3.5.46", "@vue/compiler-sfc": "3.5.46", "@vue/runtime-dom": "3.5.46", "@vue/server-renderer": "3.5.46", "@vue/shared": "3.5.46" }, "peerDependencies": { "typescript": "*" }, "optionalPeers": ["typescript"] }, "sha512-0kW5CgfjMPBqmH158049SaE1muufp+K/ZyrwvSEwrwYky6QB7zL2y8kXfruneKb9O12eh0xAJL6CVSpzb9o0Kg=="], + "vue": ["vue@3.5.47", "", { "dependencies": { "@vue/compiler-dom": "3.5.47", "@vue/compiler-sfc": "3.5.47", "@vue/runtime-dom": "3.5.47", "@vue/server-renderer": "3.5.47", "@vue/shared": "3.5.47" }, "peerDependencies": { "typescript": "*" }, "optionalPeers": ["typescript"] }, "sha512-eb2WX28Y895u9wSVVDXr5pvipHb3U8wSvYqoT5UUqG5idmNjT169BDnhigOfkEP+zI6nDVnhHqZgrERpJ90M0w=="], "vue-tsc": ["vue-tsc@3.3.14", "", { "dependencies": { "@volar/typescript": "2.4.30", "@vue/language-core": "3.3.14" }, "peerDependencies": { "typescript": ">=5.0.0" }, "bin": { "vue-tsc": "./bin/vue-tsc.js" } }, "sha512-URAu2H9AuMZMg9GCgnqbaHHHd8pBZRAwNV2e2yYS8VDsoTVXHiOSo663OS6DkEvauQ2yixn5TPFJ9WV9QIspkA=="], @@ -356,7 +356,7 @@ "write-file-atomic": ["write-file-atomic@8.0.0", "", { "dependencies": { "signal-exit": "^4.0.1" } }, "sha512-dYwyZredl67GyLLIHJnRM3h2PcOmN5SkcgC7eM5DPDEOEl6dLFqVrMg3F1Ea32usj4VSVZtd2H4MtKTNOf6nPg=="], - "ws": ["ws@8.23.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ=="], + "ws": ["ws@8.23.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA=="], "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], diff --git a/demo/App.vue b/demo/App.vue index 1d78563..4ba8004 100644 --- a/demo/App.vue +++ b/demo/App.vue @@ -1,13 +1,13 @@