@flesler/cursor-canvas-web 1.0.1 → 1.0.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/cursor-canvas.cjs +1 -1
- package/dist/cursor-canvas.js +293 -271
- package/dist/shim/charts.d.ts +7 -3
- package/dist/shim/cursor-canvas.d.ts +2 -2
- package/dist/shim/theme.d.ts +4 -0
- package/package.json +5 -3
package/dist/shim/charts.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export type ChartReferenceLine = {
|
|
|
14
14
|
label?: string;
|
|
15
15
|
tone?: ChartTone;
|
|
16
16
|
};
|
|
17
|
+
/** Unknown SDK props typecheck. The wrapper only reads the fields it names. */
|
|
18
|
+
type ExtraProps = {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
17
21
|
type ValueAxisProps = {
|
|
18
22
|
beginAtZero?: boolean;
|
|
19
23
|
yMin?: number;
|
|
@@ -31,7 +35,7 @@ export type BarChartProps = ValueAxisProps & {
|
|
|
31
35
|
valuePrefix?: string;
|
|
32
36
|
showValues?: boolean;
|
|
33
37
|
style?: CSSProperties;
|
|
34
|
-
};
|
|
38
|
+
} & ExtraProps;
|
|
35
39
|
export type LineChartProps = ValueAxisProps & {
|
|
36
40
|
categories: string[];
|
|
37
41
|
series: ChartSeries[];
|
|
@@ -42,7 +46,7 @@ export type LineChartProps = ValueAxisProps & {
|
|
|
42
46
|
showValues?: boolean;
|
|
43
47
|
showHoverGuide?: boolean;
|
|
44
48
|
style?: CSSProperties;
|
|
45
|
-
};
|
|
49
|
+
} & ExtraProps;
|
|
46
50
|
export type PieChartProps = {
|
|
47
51
|
data: Array<ChartDataPoint & {
|
|
48
52
|
tone?: ChartTone;
|
|
@@ -50,7 +54,7 @@ export type PieChartProps = {
|
|
|
50
54
|
size?: number;
|
|
51
55
|
donut?: boolean;
|
|
52
56
|
style?: CSSProperties;
|
|
53
|
-
};
|
|
57
|
+
} & ExtraProps;
|
|
54
58
|
/**
|
|
55
59
|
* Fork-only export (not in IDE `index.d.ts`); keeps chart data shaping stable for
|
|
56
60
|
* Mantine — listed under “fork-only” in `pnpm run check:sdk-exports`.
|
|
@@ -8,8 +8,8 @@ export { computeDAGLayout } from './dag';
|
|
|
8
8
|
export type { DAGLayoutEdge, DAGLayoutNode, DAGLayoutOptions, DAGLayoutRank, DAGLayoutResult } from './dag';
|
|
9
9
|
export { DiffStats, DiffView } from './diff';
|
|
10
10
|
export type { DiffLineData, DiffLineType, DiffStatsProps, DiffViewProps } from './diff';
|
|
11
|
-
export { canvasPaletteDark, canvasPaletteLight, canvasTokens, canvasTokensLight, categoryPaletteDark, categoryPaletteLight, colorPalette, usageColorSequence } from './theme';
|
|
12
|
-
export type { CanvasHostTheme, CanvasPalette, CanvasTokens, CategoryPalette, Color } from './theme';
|
|
11
|
+
export { canvasPaletteDark, canvasPaletteGrokDark, canvasPaletteGrokLight, canvasPaletteLight, canvasTokens, canvasTokensLight, categoryPaletteDark, categoryPaletteLight, colorPalette, usageColorSequence } from './theme';
|
|
12
|
+
export type { CanvasHostTheme, CanvasHostThemeBrand, CanvasPalette, CanvasTokens, CategoryPalette, ChartPalette, Color } from './theme';
|
|
13
13
|
export { TodoList, TodoListCard } from './todo';
|
|
14
14
|
export type { TodoItem, TodoListCardProps, TodoListProps, TodoStatus } from './todo';
|
|
15
15
|
export { useHostTheme } from './use-tokens';
|
package/dist/shim/theme.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ export declare const canvasPaletteLight: {
|
|
|
60
60
|
readonly diffStripAdded: "#1F8A65CC";
|
|
61
61
|
readonly diffStripRemoved: "#CF2D56CC";
|
|
62
62
|
};
|
|
63
|
+
/** IDE `canvas-tokens.d.ts` — present on newer Cursor skills; older snapshots omit these names. */
|
|
64
|
+
export type CanvasHostThemeBrand = 'cursor' | 'grok';
|
|
65
|
+
export declare const canvasPaletteGrokDark: CanvasPalette;
|
|
66
|
+
export declare const canvasPaletteGrokLight: CanvasPalette;
|
|
63
67
|
export interface CanvasPalette {
|
|
64
68
|
readonly foreground: string;
|
|
65
69
|
readonly foregroundSecondary: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flesler/cursor-canvas-web",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"repository": "github:flesler/cursor-canvas-web",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"description": "Deploy your Cursor canvases to the web.",
|
|
@@ -49,8 +49,10 @@
|
|
|
49
49
|
"test:watch": "vitest",
|
|
50
50
|
"sync:sdk": "bash scripts/sync-cursor-sdk-snapshot.sh",
|
|
51
51
|
"check:sdk-exports": "node scripts/diff-sdk-exports.mjs",
|
|
52
|
-
"test:contract": "pnpm run build:lib && pnpm run
|
|
53
|
-
"
|
|
52
|
+
"test:contract": "pnpm run build:lib && pnpm run check:sdk-exports",
|
|
53
|
+
"check:sdk-live": "node scripts/diff-sdk-exports.mjs \"${HOME}/.cursor/skills-cursor/canvas/sdk/index.d.ts\"",
|
|
54
|
+
"test:contract:strict": "pnpm run build:lib && node scripts/generate-contract-consumer.mjs && pnpm exec tsc -p test/contract/tsconfig.json",
|
|
55
|
+
"test:contract:ci": "pnpm run test:contract",
|
|
54
56
|
"sync:demo": "bash scripts/sync-demo-canvas.sh",
|
|
55
57
|
"demo:screenshot": "bash scripts/readme-screenshot.sh",
|
|
56
58
|
"ci:local": "pnpm typecheck && pnpm lint && pnpm test && pnpm test:contract:ci",
|