@blotch/dolan 22.2.0 → 22.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/ui/components/area-chart/area-chart.test.ts +2 -24
- package/dist/ui/components/bar-chart/bar-chart.test.ts +2 -24
- package/dist/ui/components/button/button.test.ts +2 -15
- package/dist/ui/components/button-group/button-group.test.ts +2 -21
- package/dist/ui/components/candlestick-chart/candlestick-chart.test.ts +2 -24
- package/dist/ui/components/cartesian-chart/cartesian-chart.test.ts +4 -28
- package/dist/ui/components/line-chart/line-chart.test.ts +2 -24
- package/dist/ui/components/scatter-chart/scatter-chart.test.ts +2 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,9 +13,9 @@ import { ejectCommand } from './commands/eject.js';
|
|
|
13
13
|
import { outdatedCommand } from './commands/outdated.js';
|
|
14
14
|
import { themeCommand } from './commands/theme.js';
|
|
15
15
|
import { printBanner } from './utils/banner.js';
|
|
16
|
-
// The publish workflow
|
|
17
|
-
//
|
|
18
|
-
//
|
|
16
|
+
// The publish workflow only publishes a tag that matches package.json, so
|
|
17
|
+
// reading it at runtime keeps `dolan --version` in step with what was
|
|
18
|
+
// published instead of drifting from a hardcoded string. The path is
|
|
19
19
|
// relative to the compiled `dist/index.js`, and package.json always ships.
|
|
20
20
|
const { version } = createRequire(import.meta.url)('../package.json');
|
|
21
21
|
const program = new Command();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA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Mock Angular (and the transitively-loaded line-chart / cartesian-chart Angular
|
|
4
|
-
// usage) so importing the module needs no framework runtime. Only the exported
|
|
5
|
-
// pure `computeAreaColumns` is exercised; components are never built.
|
|
6
|
-
vi.mock('@angular/core', () => ({
|
|
7
|
-
Component: () => () => {},
|
|
8
|
-
ViewEncapsulation: { None: 0 },
|
|
9
|
-
computed: () => () => {},
|
|
10
|
-
inject: () => ({}),
|
|
11
|
-
input: () => () => {},
|
|
12
|
-
output: () => () => {},
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
16
|
-
LYNX_ELEMENTS: [],
|
|
17
|
-
// cartesian-chart (imported transitively) registers these in its decorator.
|
|
18
|
-
LynxGestureDetector: class {},
|
|
19
|
-
PanGesture: class {},
|
|
20
|
-
PinchGesture: class {},
|
|
21
|
-
Gesture: { Simultaneous: () => ({}) },
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
const { computeAreaColumns } = await import('./area-chart');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { computeAreaColumns } from './area-chart';
|
|
25
3
|
|
|
26
4
|
describe('computeAreaColumns', () => {
|
|
27
5
|
it('fills a flat line down to the baseline with uniform columns', () => {
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
|
|
3
|
-
// Mock Angular (and the transitively-loaded cartesian-chart Angular usage) so
|
|
4
|
-
// importing the module needs no framework runtime. Only the exported pure
|
|
5
|
-
// `computeBars` is exercised; the components are never built.
|
|
6
|
-
vi.mock('@angular/core', () => ({
|
|
7
|
-
Component: () => () => {},
|
|
8
|
-
ViewEncapsulation: { None: 0 },
|
|
9
|
-
computed: () => () => {},
|
|
10
|
-
inject: () => ({}),
|
|
11
|
-
input: () => () => {},
|
|
12
|
-
output: () => () => {},
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
16
|
-
LYNX_ELEMENTS: [],
|
|
17
|
-
// cartesian-chart (imported transitively) registers these in its decorator.
|
|
18
|
-
LynxGestureDetector: class {},
|
|
19
|
-
PanGesture: class {},
|
|
20
|
-
PinchGesture: class {},
|
|
21
|
-
Gesture: { Simultaneous: () => ({}) },
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
const { computeBars } = await import('./bar-chart');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { computeBars } from './bar-chart';
|
|
25
3
|
|
|
26
4
|
// Screen y grows downward, so a value ABOVE the baseline has a SMALLER pixel y
|
|
27
5
|
// than baseY. Baseline pixel y = 100 in these cases (bottom of the plot).
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
|
|
3
|
-
vi.mock('@angular/core', () => ({
|
|
4
|
-
Component: () => () => {},
|
|
5
|
-
ViewEncapsulation: { None: 0 },
|
|
6
|
-
computed: () => () => {},
|
|
7
|
-
input: () => () => {},
|
|
8
|
-
output: () => () => {},
|
|
9
|
-
}));
|
|
10
|
-
|
|
11
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
12
|
-
LYNX_ELEMENTS: [],
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
const { buttonVariants } = await import('./button');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { buttonVariants } from './button';
|
|
16
3
|
|
|
17
4
|
describe('buttonVariants', () => {
|
|
18
5
|
it('returns default variant and size classes', () => {
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
|
|
3
|
-
// Mock Angular so importing the component module doesn't require the framework
|
|
4
|
-
// runtime. Only the exported `cva` variant fn is exercised here; the class field
|
|
5
|
-
// initializers (input/output/viewChild/inject) never run because we never
|
|
6
|
-
// construct the components.
|
|
7
|
-
vi.mock('@angular/core', () => ({
|
|
8
|
-
Component: () => () => {},
|
|
9
|
-
ViewEncapsulation: { None: 0 },
|
|
10
|
-
computed: () => () => {},
|
|
11
|
-
inject: () => ({}),
|
|
12
|
-
input: () => () => {},
|
|
13
|
-
output: () => () => {},
|
|
14
|
-
viewChild: () => () => {},
|
|
15
|
-
}));
|
|
16
|
-
|
|
17
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
18
|
-
LYNX_ELEMENTS: [],
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
const { buttonGroupItemVariants } = await import('./button-group');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { buttonGroupItemVariants } from './button-group';
|
|
22
3
|
|
|
23
4
|
describe('buttonGroupItemVariants', () => {
|
|
24
5
|
it('returns default variant and size classes', () => {
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
|
|
3
|
-
// Mock Angular (and the transitively-loaded cartesian-chart Angular usage) so
|
|
4
|
-
// importing the module needs no framework runtime. Only the exported pure
|
|
5
|
-
// `computeCandles` is exercised; the components are never built.
|
|
6
|
-
vi.mock('@angular/core', () => ({
|
|
7
|
-
Component: () => () => {},
|
|
8
|
-
ViewEncapsulation: { None: 0 },
|
|
9
|
-
computed: () => () => {},
|
|
10
|
-
inject: () => ({}),
|
|
11
|
-
input: () => () => {},
|
|
12
|
-
output: () => () => {},
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
16
|
-
LYNX_ELEMENTS: [],
|
|
17
|
-
// cartesian-chart (imported transitively) registers these in its decorator.
|
|
18
|
-
LynxGestureDetector: class {},
|
|
19
|
-
PanGesture: class {},
|
|
20
|
-
PinchGesture: class {},
|
|
21
|
-
Gesture: { Simultaneous: () => ({}) },
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
const { computeCandles } = await import('./candlestick-chart');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { computeCandles } from './candlestick-chart';
|
|
25
3
|
|
|
26
4
|
// A rising candle centered at cx=50. Screen y grows downward, so the projected
|
|
27
5
|
// highY (top of the wick) is the smallest pixel value and lowY the largest.
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
// Mock Angular so importing the component module doesn't require the framework
|
|
5
|
-
// runtime. Only the exported pure geometry fns are exercised here; the class
|
|
6
|
-
// field initializers (input/computed) never run because we never construct the
|
|
7
|
-
// component.
|
|
8
|
-
vi.mock('@angular/core', () => ({
|
|
9
|
-
Component: () => () => {},
|
|
10
|
-
ViewEncapsulation: { None: 0 },
|
|
11
|
-
computed: () => () => {},
|
|
12
|
-
input: () => () => {},
|
|
13
|
-
signal: () => () => {},
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
// The module now imports the gesture primitives at top level. They're only used
|
|
17
|
-
// inside class field initializers (which never run — we don't construct the
|
|
18
|
-
// component), so bare stubs are enough to satisfy the imports.
|
|
19
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
20
|
-
LYNX_ELEMENTS: [],
|
|
21
|
-
LynxGestureDetector: class {},
|
|
22
|
-
PanGesture: class {},
|
|
23
|
-
PinchGesture: class {},
|
|
24
|
-
Gesture: { Simultaneous: () => ({}) },
|
|
25
|
-
}));
|
|
26
|
-
|
|
27
|
-
const {
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
type ChartDomain,
|
|
28
4
|
linearScale,
|
|
29
5
|
invertLinear,
|
|
30
6
|
niceNum,
|
|
@@ -37,7 +13,7 @@ const {
|
|
|
37
13
|
clampWindow,
|
|
38
14
|
panWindow,
|
|
39
15
|
zoomWindow,
|
|
40
|
-
}
|
|
16
|
+
} from './cartesian-chart';
|
|
41
17
|
|
|
42
18
|
describe('linearScale', () => {
|
|
43
19
|
it('interpolates a value across the range', () => {
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
|
|
3
|
-
// Mock Angular (and the sibling cartesian-chart's Angular usage, which loads
|
|
4
|
-
// transitively) so importing the module needs no framework runtime. Only the
|
|
5
|
-
// exported pure `computeLineSegments` is exercised; components are never built.
|
|
6
|
-
vi.mock('@angular/core', () => ({
|
|
7
|
-
Component: () => () => {},
|
|
8
|
-
ViewEncapsulation: { None: 0 },
|
|
9
|
-
computed: () => () => {},
|
|
10
|
-
inject: () => ({}),
|
|
11
|
-
input: () => () => {},
|
|
12
|
-
output: () => () => {},
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
16
|
-
LYNX_ELEMENTS: [],
|
|
17
|
-
// cartesian-chart (imported transitively) registers these in its decorator.
|
|
18
|
-
LynxGestureDetector: class {},
|
|
19
|
-
PanGesture: class {},
|
|
20
|
-
PinchGesture: class {},
|
|
21
|
-
Gesture: { Simultaneous: () => ({}) },
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
const { computeLineSegments } = await import('./line-chart');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { computeLineSegments } from './line-chart';
|
|
25
3
|
|
|
26
4
|
describe('computeLineSegments', () => {
|
|
27
5
|
it('produces a horizontal segment (angle 0)', () => {
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import { describe, expect, it
|
|
2
|
-
|
|
3
|
-
// Mock Angular (and the transitively-loaded cartesian-chart Angular usage) so
|
|
4
|
-
// importing the module needs no framework runtime. Only the exported pure
|
|
5
|
-
// `computeDots` is exercised; the components are never built.
|
|
6
|
-
vi.mock('@angular/core', () => ({
|
|
7
|
-
Component: () => () => {},
|
|
8
|
-
ViewEncapsulation: { None: 0 },
|
|
9
|
-
computed: () => () => {},
|
|
10
|
-
inject: () => ({}),
|
|
11
|
-
input: () => () => {},
|
|
12
|
-
output: () => () => {},
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
vi.mock('@blotch/angular-lynx', () => ({
|
|
16
|
-
LYNX_ELEMENTS: [],
|
|
17
|
-
// cartesian-chart (imported transitively) registers these in its decorator.
|
|
18
|
-
LynxGestureDetector: class {},
|
|
19
|
-
PanGesture: class {},
|
|
20
|
-
PinchGesture: class {},
|
|
21
|
-
Gesture: { Simultaneous: () => ({}) },
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
const { computeDots } = await import('./scatter-chart');
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { computeDots } from './scatter-chart';
|
|
25
3
|
|
|
26
4
|
describe('computeDots', () => {
|
|
27
5
|
it('centers a dot on its point (top-left offset by the radius)', () => {
|