@blotch/dolan 22.2.3 → 22.2.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.
- package/dist/commands/add.js +9 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/add.test.js +36 -3
- package/dist/commands/add.test.js.map +1 -1
- package/dist/commands/doctor.js +187 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +280 -7
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/init.d.ts +2 -2
- package/dist/commands/init.js +38 -18
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +107 -1
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/theme.js +1 -1
- package/dist/commands/theme.js.map +1 -1
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.js +126 -45
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/update.test.js +314 -2
- package/dist/commands/update.test.js.map +1 -1
- package/dist/lockfile.d.ts +7 -0
- package/dist/lockfile.js +36 -0
- package/dist/lockfile.js.map +1 -1
- package/dist/lockfile.test.d.ts +1 -0
- package/dist/lockfile.test.js +25 -0
- package/dist/lockfile.test.js.map +1 -0
- package/dist/registry.d.ts +6 -0
- package/dist/registry.js +48 -2
- package/dist/registry.js.map +1 -1
- package/dist/registry.test.js +45 -3
- package/dist/registry.test.js.map +1 -1
- package/dist/test-utils.d.ts +5 -0
- package/dist/test-utils.js +6 -1
- package/dist/test-utils.js.map +1 -1
- package/dist/testing/fire-lynx-event.d.ts +14 -0
- package/dist/testing/fire-lynx-event.js +19 -0
- package/dist/testing/fire-lynx-event.js.map +1 -0
- package/dist/testing/fire-lynx-event.test.d.ts +1 -0
- package/dist/testing/fire-lynx-event.test.js +44 -0
- package/dist/testing/fire-lynx-event.test.js.map +1 -0
- package/dist/testing/lynx-main-thread.d.ts +22 -0
- package/dist/testing/lynx-main-thread.js +11 -0
- package/dist/testing/lynx-main-thread.js.map +1 -0
- package/dist/testing/lynx-main-thread.test.d.ts +1 -0
- package/dist/testing/lynx-main-thread.test.js +24 -0
- package/dist/testing/lynx-main-thread.test.js.map +1 -0
- package/dist/testing/set-input-signal.d.ts +5 -4
- package/dist/testing/set-input-signal.js +5 -4
- package/dist/testing/set-input-signal.js.map +1 -1
- package/dist/ui/components/accordion/accordion.test.ts +158 -144
- package/dist/ui/components/accordion/accordion.ts +19 -14
- package/dist/ui/components/action-sheet/action-sheet.test.ts +272 -187
- package/dist/ui/components/action-sheet/action-sheet.ts +40 -34
- package/dist/ui/components/alert/alert.test.ts +67 -19
- package/dist/ui/components/alert/alert.ts +14 -16
- package/dist/ui/components/alert-dialog/alert-dialog.test.ts +206 -139
- package/dist/ui/components/alert-dialog/alert-dialog.ts +32 -26
- package/dist/ui/components/area-chart/area-chart.test.ts +81 -1
- package/dist/ui/components/avatar/avatar.test.ts +89 -45
- package/dist/ui/components/badge/badge.test.ts +57 -23
- package/dist/ui/components/badge/badge.ts +12 -14
- package/dist/ui/components/bar-chart/bar-chart.test.ts +82 -1
- package/dist/ui/components/bottom-sheet/bottom-sheet.test.ts +373 -297
- package/dist/ui/components/bottom-sheet/bottom-sheet.ts +34 -33
- package/dist/ui/components/button/button.test.ts +611 -2
- package/dist/ui/components/button/button.ts +431 -62
- package/dist/ui/components/button/index.ts +2 -0
- package/dist/ui/components/button-group/button-group.test.ts +484 -2
- package/dist/ui/components/button-group/button-group.ts +380 -68
- package/dist/ui/components/button-group/index.ts +3 -0
- package/dist/ui/components/candlestick-chart/candlestick-chart.test.ts +82 -1
- package/dist/ui/components/card/card.test.ts +82 -62
- package/dist/ui/components/chart/chart-presets.test.ts +197 -1
- package/dist/ui/components/chart/chart-presets.ts +8 -1
- package/dist/ui/components/chart/chart-theme.ts +12 -0
- package/dist/ui/components/chart/chart.test.ts +1017 -0
- package/dist/ui/components/chart/chart.ts +56 -43
- package/dist/ui/components/checkbox/checkbox.test.ts +124 -42
- package/dist/ui/components/checkbox/checkbox.ts +23 -23
- package/dist/ui/components/collapsible/collapsible.test.ts +158 -81
- package/dist/ui/components/collapsible/collapsible.ts +19 -14
- package/dist/ui/components/context-menu/context-menu.test.ts +224 -0
- package/dist/ui/components/context-menu/context-menu.ts +110 -0
- package/dist/ui/components/context-menu/index.ts +1 -0
- package/dist/ui/components/dialog/dialog.test.ts +210 -152
- package/dist/ui/components/dialog/dialog.ts +29 -23
- package/dist/ui/components/dock/dock-scroll.test.ts +130 -0
- package/dist/ui/components/dock/dock-scroll.ts +133 -0
- package/dist/ui/components/dock/dock.test.ts +749 -0
- package/dist/ui/components/dock/dock.ts +960 -0
- package/dist/ui/components/dock/index.ts +2 -0
- package/dist/ui/components/empty-state/empty-state.test.ts +28 -39
- package/dist/ui/components/glass/concentric-radius.test.ts +13 -0
- package/dist/ui/components/glass/concentric-radius.ts +17 -0
- package/dist/ui/components/glass/glass-design.test.ts +78 -0
- package/dist/ui/components/glass/glass-design.ts +119 -0
- package/dist/ui/components/glass/glass.test.ts +338 -0
- package/dist/ui/components/glass/glass.ts +360 -0
- package/dist/ui/components/glass/index.ts +18 -0
- package/dist/ui/components/icon/icon-theme.test.ts +36 -0
- package/dist/ui/components/icon/icon-theme.ts +36 -13
- package/dist/ui/components/icon/icon.test.ts +52 -41
- package/dist/ui/components/input/input.test.ts +178 -101
- package/dist/ui/components/input/input.ts +15 -12
- package/dist/ui/components/label/label.test.ts +11 -24
- package/dist/ui/components/line-chart/line-chart.test.ts +76 -1
- package/dist/ui/components/list/list.test.ts +80 -49
- package/dist/ui/components/menu/index.ts +25 -0
- package/dist/ui/components/menu/menu-placement.test.ts +153 -0
- package/dist/ui/components/menu/menu-placement.ts +159 -0
- package/dist/ui/components/menu/menu-popup.test.ts +632 -0
- package/dist/ui/components/menu/menu-popup.ts +544 -0
- package/dist/ui/components/menu/menu.test.ts +429 -0
- package/dist/ui/components/menu/menu.ts +415 -0
- package/dist/ui/components/nav-drawer/nav-drawer.test.ts +425 -260
- package/dist/ui/components/nav-drawer/nav-drawer.ts +72 -56
- package/dist/ui/components/pagination/pagination.test.ts +136 -86
- package/dist/ui/components/progress/progress.test.ts +102 -46
- package/dist/ui/components/progress/progress.ts +52 -54
- package/dist/ui/components/radio-group/radio-group.test.ts +128 -83
- package/dist/ui/components/radio-group/radio-group.ts +24 -24
- package/dist/ui/components/scatter-chart/scatter-chart.test.ts +74 -1
- package/dist/ui/components/scroll-area/scroll-area.test.ts +72 -36
- package/dist/ui/components/select/select.test.ts +138 -78
- package/dist/ui/components/select/select.ts +17 -11
- package/dist/ui/components/separator/separator.test.ts +18 -17
- package/dist/ui/components/sheet/sheet.test.ts +64 -11
- package/dist/ui/components/sheet/sheet.ts +9 -1
- package/dist/ui/components/skeleton/skeleton.test.ts +24 -7
- package/dist/ui/components/skeleton/skeleton.ts +10 -16
- package/dist/ui/components/spinner/spinner.test.ts +64 -46
- package/dist/ui/components/spinner/spinner.ts +16 -19
- package/dist/ui/components/switch/switch.test.ts +116 -46
- package/dist/ui/components/switch/switch.ts +8 -13
- package/dist/ui/components/tab-bar/index.ts +1 -0
- package/dist/ui/components/tab-bar/tab-bar.test.ts +280 -0
- package/dist/ui/components/tab-bar/tab-bar.ts +230 -0
- package/dist/ui/components/tabs/tabs.test.ts +215 -157
- package/dist/ui/components/tabs/tabs.ts +110 -118
- package/dist/ui/components/textarea/textarea.test.ts +206 -100
- package/dist/ui/components/textarea/textarea.ts +14 -12
- package/dist/ui/components/toast/toast.test.ts +434 -350
- package/dist/ui/components/toast/toast.ts +42 -51
- package/dist/ui/components/toggle/toggle.test.ts +247 -140
- package/dist/ui/theme/chart-colors.test.ts +8 -3
- package/dist/ui/theme/dark.css +38 -2
- package/dist/ui/theme/default.css +55 -7
- package/dist/ui/theme/icon-colors.test.ts +8 -3
- package/dist/ui/theme/rgb-channels.test.ts +84 -0
- package/dist/ui/theme/tailwind-build.test.ts +114 -0
- package/dist/ui/theme/tailwind-css.test.ts +83 -0
- package/dist/ui/theme/tailwind-plugin.test.ts +42 -2
- package/dist/ui/theme/tailwind-plugin.ts +93 -29
- package/dist/ui/theme/tailwind.css +113 -0
- package/dist/ui/utils/animate.test.ts +13 -1
- package/dist/utils/analyze.d.ts +14 -0
- package/dist/utils/analyze.js +15 -0
- package/dist/utils/analyze.js.map +1 -1
- package/dist/utils/analyze.test.js +14 -1
- package/dist/utils/analyze.test.js.map +1 -1
- package/dist/utils/installed.d.ts +12 -0
- package/dist/utils/installed.js +16 -0
- package/dist/utils/installed.js.map +1 -1
- package/dist/utils/installed.test.js +17 -1
- package/dist/utils/installed.test.js.map +1 -1
- package/dist/utils/resolve-paths.d.ts +4 -4
- package/dist/utils/resolve-paths.js +5 -7
- package/dist/utils/resolve-paths.js.map +1 -1
- package/dist/utils/resolve-paths.test.js +9 -5
- package/dist/utils/resolve-paths.test.js.map +1 -1
- package/dist/utils/tailwind.d.ts +25 -0
- package/dist/utils/tailwind.js +51 -0
- package/dist/utils/tailwind.js.map +1 -0
- package/dist/utils/tailwind.test.d.ts +1 -0
- package/dist/utils/tailwind.test.js +71 -0
- package/dist/utils/tailwind.test.js.map +1 -0
- package/package.json +9 -1
- package/dist/ui/components/area-chart/area-chart-render.test.ts +0 -63
- package/dist/ui/components/bar-chart/bar-chart-render.test.ts +0 -58
- package/dist/ui/components/button/button-render.test.ts +0 -132
- package/dist/ui/components/button-group/button-group-render.test.ts +0 -146
- package/dist/ui/components/candlestick-chart/candlestick-chart-render.test.ts +0 -59
- package/dist/ui/components/chart/chart-render.test.ts +0 -730
- package/dist/ui/components/line-chart/line-chart-render.test.ts +0 -83
- package/dist/ui/components/scatter-chart/scatter-chart-render.test.ts +0 -64
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { render } from '@blotch/angular-lynx-testing-library';
|
|
2
|
-
import { createChartRuntime } from '@tanstack/charts/runtime';
|
|
3
|
-
import type {
|
|
4
|
-
ChartDefinition,
|
|
5
|
-
ChartPoint,
|
|
6
|
-
SceneNode,
|
|
7
|
-
} from '@tanstack/charts/types';
|
|
8
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
9
|
-
import { setInputSignal } from '../../../test-utils/set-input-signal';
|
|
10
|
-
import { UiLineChart } from './line-chart';
|
|
11
|
-
|
|
12
|
-
const data = [
|
|
13
|
-
{ x: 0, y: 10 },
|
|
14
|
-
{ x: 5, y: 30 },
|
|
15
|
-
{ x: 10, y: 20 },
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Every drawn shape in a definition's scene, labels excluded.
|
|
20
|
-
*/
|
|
21
|
-
const shapes = (definition: ChartDefinition<any, any, any>) => {
|
|
22
|
-
const scene = createChartRuntime().render(definition, {
|
|
23
|
-
width: 300,
|
|
24
|
-
height: 200,
|
|
25
|
-
});
|
|
26
|
-
const found: SceneNode[] = [];
|
|
27
|
-
const walk = (nodes: readonly SceneNode[]) => {
|
|
28
|
-
for (const node of nodes) {
|
|
29
|
-
if (node.kind === 'group') {
|
|
30
|
-
if (!node.focus) walk(node.children);
|
|
31
|
-
} else if (node.kind !== 'label') found.push(node);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
walk(scene.nodes);
|
|
35
|
-
return { scene, found };
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
describe('UiLineChart', () => {
|
|
39
|
-
type Internals = {
|
|
40
|
-
definition: () => ChartDefinition<any, any, any>;
|
|
41
|
-
onSelect(point: ChartPoint | null): void;
|
|
42
|
-
chart: unknown;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
it('builds its definition from its inputs', async () => {
|
|
46
|
-
const { componentRef } = await render(UiLineChart);
|
|
47
|
-
const chart = componentRef.instance as UiLineChart;
|
|
48
|
-
setInputSignal(chart.data, data);
|
|
49
|
-
setInputSignal(chart.showDots, false);
|
|
50
|
-
setInputSignal(chart.yAxisLabel, 'Revenue');
|
|
51
|
-
const { found, scene } = shapes(
|
|
52
|
-
(chart as unknown as Internals).definition(),
|
|
53
|
-
);
|
|
54
|
-
expect(found.some((n) => n.kind === 'dot')).toBe(false);
|
|
55
|
-
expect(scene.nodes).toBeDefined();
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it('emits the tapped datum', async () => {
|
|
59
|
-
const { componentRef } = await render(UiLineChart);
|
|
60
|
-
const chart = componentRef.instance as UiLineChart;
|
|
61
|
-
const tapped = vi.fn();
|
|
62
|
-
chart.pointTap.subscribe(tapped);
|
|
63
|
-
const internals = chart as unknown as Internals;
|
|
64
|
-
internals.onSelect({ datum: data[1] } as ChartPoint);
|
|
65
|
-
internals.onSelect(null);
|
|
66
|
-
expect(tapped.mock.calls).toEqual([[data[1]]]);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('forwards the zoom API to its chart', async () => {
|
|
70
|
-
const { componentRef } = await render(UiLineChart);
|
|
71
|
-
const chart = componentRef.instance as UiLineChart;
|
|
72
|
-
const inner = { zoomIn: vi.fn(), zoomOut: vi.fn(), resetZoom: vi.fn() };
|
|
73
|
-
// Signal queries aren't wired under plain Vitest (JIT), so stand in for
|
|
74
|
-
// the inner <ui-chart>.
|
|
75
|
-
(chart as unknown as Internals).chart = () => inner;
|
|
76
|
-
chart.zoomIn();
|
|
77
|
-
chart.zoomOut();
|
|
78
|
-
chart.resetZoom();
|
|
79
|
-
expect(inner.zoomIn).toHaveBeenCalled();
|
|
80
|
-
expect(inner.zoomOut).toHaveBeenCalled();
|
|
81
|
-
expect(inner.resetZoom).toHaveBeenCalled();
|
|
82
|
-
});
|
|
83
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { render } from '@blotch/angular-lynx-testing-library';
|
|
2
|
-
import { createChartRuntime } from '@tanstack/charts/runtime';
|
|
3
|
-
import type {
|
|
4
|
-
ChartDefinition,
|
|
5
|
-
ChartPoint,
|
|
6
|
-
SceneDot,
|
|
7
|
-
SceneNode,
|
|
8
|
-
} from '@tanstack/charts/types';
|
|
9
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
10
|
-
import { setInputSignal } from '../../../test-utils/set-input-signal';
|
|
11
|
-
import { UiScatterChart } from './scatter-chart';
|
|
12
|
-
|
|
13
|
-
const data = [
|
|
14
|
-
{ x: 150, y: 50 },
|
|
15
|
-
{ x: 160, y: 65 },
|
|
16
|
-
{ x: 170, y: 70 },
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Every dot in a definition's scene.
|
|
21
|
-
*/
|
|
22
|
-
const dots = (definition: ChartDefinition<any, any, any>) => {
|
|
23
|
-
const scene = createChartRuntime().render(definition, {
|
|
24
|
-
width: 300,
|
|
25
|
-
height: 200,
|
|
26
|
-
});
|
|
27
|
-
const found: SceneDot[] = [];
|
|
28
|
-
const walk = (nodes: readonly SceneNode[]) => {
|
|
29
|
-
for (const node of nodes) {
|
|
30
|
-
if (node.kind === 'group') {
|
|
31
|
-
if (!node.focus) walk(node.children);
|
|
32
|
-
} else if (node.kind === 'dot') found.push(node);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
walk(scene.nodes);
|
|
36
|
-
return { scene, found };
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
describe('UiScatterChart', () => {
|
|
40
|
-
type Internals = {
|
|
41
|
-
definition: () => ChartDefinition<any, any, any>;
|
|
42
|
-
onSelect(point: ChartPoint | null): void;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
it('builds its definition from its inputs', async () => {
|
|
46
|
-
const { componentRef } = await render(UiScatterChart);
|
|
47
|
-
const chart = componentRef.instance as UiScatterChart;
|
|
48
|
-
setInputSignal(chart.data, data);
|
|
49
|
-
setInputSignal(chart.radius, 7);
|
|
50
|
-
const { found } = dots((chart as unknown as Internals).definition());
|
|
51
|
-
expect(found[0]!.radius).toBe(7);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('emits the tapped datum', async () => {
|
|
55
|
-
const { componentRef } = await render(UiScatterChart);
|
|
56
|
-
const chart = componentRef.instance as UiScatterChart;
|
|
57
|
-
const tapped = vi.fn();
|
|
58
|
-
chart.pointTap.subscribe(tapped);
|
|
59
|
-
const internals = chart as unknown as Internals;
|
|
60
|
-
internals.onSelect({ datum: data[2] } as ChartPoint);
|
|
61
|
-
internals.onSelect(null);
|
|
62
|
-
expect(tapped.mock.calls).toEqual([[data[2]]]);
|
|
63
|
-
});
|
|
64
|
-
});
|