svelteplot 0.7.0-pr-275.1 → 0.7.0-pr-275.3

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,6 +1,5 @@
1
1
  import { resolveProp } from './resolve.js';
2
2
  import { isDate } from './typeChecks.js';
3
- import { RAW_VALUE } from '../transforms/recordize.js';
4
3
  /**
5
4
  * Returns first argument that is not null or undefined
6
5
  */
@@ -31,7 +30,7 @@ export function isObject(option) {
31
30
  // doesn't work with Proxies
32
31
  return (typeof option === 'object' && !isDate(option) && !Array.isArray(option) && option !== null);
33
32
  }
34
- const NUMERIC = /^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;
33
+ const NUMERIC = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i;
35
34
  export function maybeNumber(value) {
36
35
  if (typeof value === 'number' && Number.isFinite(value))
37
36
  return value;
@@ -157,7 +157,7 @@ export function parseTimeInterval(input) {
157
157
  if (name.endsWith('s'))
158
158
  name = name.slice(0, -1); // drop plural
159
159
  let period = 1;
160
- const match = /^(?:(\d+)\s+)/.exec(name);
160
+ const match = /^(\d+)\s+/.exec(name);
161
161
  if (match) {
162
162
  name = name.slice(match[0].length);
163
163
  period = +match[1];
@@ -8,7 +8,7 @@ export function resolveColor(color, canvas) {
8
8
  }
9
9
  if (CSS_URL.test(color)) {
10
10
  // might be a gradient we can parse!
11
- const m = color.match(/^url\((#[^\)]+)\)/);
11
+ const m = color.match(/^url\((#[^)]+)\)/);
12
12
  const gradientId = m[1];
13
13
  const gradient = canvas.ownerDocument.querySelector(gradientId);
14
14
  if (gradient) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.7.0-pr-275.1",
3
+ "version": "0.7.0-pr-275.3",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",
@@ -90,6 +90,7 @@
90
90
  "d3-force": "^3.0.0",
91
91
  "eslint": "^9.39.1",
92
92
  "eslint-config-prettier": "^10.1.8",
93
+ "eslint-plugin-regexp": "^2.10.0",
93
94
  "eslint-plugin-svelte": "3.13.0",
94
95
  "jsdom": "^27.2.0",
95
96
  "lru-cache": "^11.2.2",