@vanduo-oss/vd3-cbun 1.3.2 → 1.4.1
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/CHANGELOG.md +83 -0
- package/README.md +24 -9
- package/SKILL.md +42 -15
- package/dist/charts/core.d.ts +4 -0
- package/dist/charts/index.cjs +197 -10
- package/dist/charts/index.cjs.map +3 -3
- package/dist/charts/index.js +197 -10
- package/dist/charts/index.js.map +3 -3
- package/dist/charts/vd3-charts.css +82 -0
- package/dist/charts/vue.d.ts +4 -0
- package/dist/code-editor/core.d.ts +19 -2
- package/dist/code-editor/highlight.cjs +1242 -0
- package/dist/code-editor/highlight.cjs.map +7 -0
- package/dist/code-editor/highlight.d.ts +6 -0
- package/dist/code-editor/highlight.js +1219 -0
- package/dist/code-editor/highlight.js.map +7 -0
- package/dist/code-editor/index.cjs +694 -70
- package/dist/code-editor/index.cjs.map +4 -4
- package/dist/code-editor/index.d.ts +2 -0
- package/dist/code-editor/index.js +694 -70
- package/dist/code-editor/index.js.map +4 -4
- package/dist/code-editor/vd3-code-editor.css +5 -0
- package/dist/draw/core.d.ts +7 -1
- package/dist/draw/index.cjs +470 -52
- package/dist/draw/index.cjs.map +2 -2
- package/dist/draw/index.js +470 -52
- package/dist/draw/index.js.map +2 -2
- package/dist/draw/vd3-draw.css +45 -0
- package/dist/draw/vue.d.ts +4 -0
- package/dist/hex-grid/core.d.ts +41 -0
- package/dist/hex-grid/index.cjs +308 -13
- package/dist/hex-grid/index.cjs.map +3 -3
- package/dist/hex-grid/index.d.ts +1 -0
- package/dist/hex-grid/index.js +308 -13
- package/dist/hex-grid/index.js.map +3 -3
- package/dist/hex-grid/vue.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/meta.json +177 -66
- package/package.json +15 -10
|
@@ -44,8 +44,90 @@
|
|
|
44
44
|
opacity: 1;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/* Dark theme overrides — tooltip */
|
|
48
|
+
[data-theme="dark"] .vd-chart-tooltip {
|
|
49
|
+
background: color-mix(in srgb, var(--vd-bg-primary, #1a1d20) 96%, transparent);
|
|
50
|
+
border-color: color-mix(in srgb, var(--vd-border-color, #495057) 72%, transparent);
|
|
51
|
+
color: var(--vd-text-primary, #e9ecef);
|
|
52
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (prefers-color-scheme: dark) {
|
|
56
|
+
:root:not([data-theme]) .vd-chart-tooltip {
|
|
57
|
+
background: color-mix(in srgb, var(--vd-bg-primary, #1a1d20) 96%, transparent);
|
|
58
|
+
border-color: color-mix(in srgb, var(--vd-border-color, #495057) 72%, transparent);
|
|
59
|
+
color: var(--vd-text-primary, #e9ecef);
|
|
60
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Focus indicator for interactive chart marks (keyboard navigation) */
|
|
65
|
+
.vd-chart-root [tabindex="0"]:focus-visible {
|
|
66
|
+
outline: 2px solid var(--vd-color-primary, #5c7cfa);
|
|
67
|
+
outline-offset: 1px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Respect reduced-motion preference */
|
|
71
|
+
@media (prefers-reduced-motion: reduce) {
|
|
72
|
+
.vd-chart-tooltip {
|
|
73
|
+
transition: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
47
77
|
.vd-chart-empty {
|
|
48
78
|
color: var(--vd-text-muted, #868e96);
|
|
49
79
|
font-size: 0.875rem;
|
|
50
80
|
}
|
|
51
81
|
|
|
82
|
+
/* Screen-reader-only utility for accessible data table fallback */
|
|
83
|
+
.vd-chart-sr-only {
|
|
84
|
+
position: absolute;
|
|
85
|
+
width: 1px;
|
|
86
|
+
height: 1px;
|
|
87
|
+
padding: 0;
|
|
88
|
+
margin: -1px;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
clip: rect(0, 0, 0, 0);
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
border-width: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Accessible data table styling (when visible) */
|
|
96
|
+
.vd-chart-data-table:not(.vd-chart-sr-only) {
|
|
97
|
+
width: 100%;
|
|
98
|
+
margin-top: 1rem;
|
|
99
|
+
border-collapse: collapse;
|
|
100
|
+
font-size: 0.8125rem;
|
|
101
|
+
color: var(--vd-text-primary, #1a1d20);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.vd-chart-data-table:not(.vd-chart-sr-only) caption {
|
|
105
|
+
caption-side: top;
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
text-align: left;
|
|
108
|
+
margin-bottom: 0.5rem;
|
|
109
|
+
color: var(--vd-text-primary, #1a1d20);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.vd-chart-data-table:not(.vd-chart-sr-only) th,
|
|
113
|
+
.vd-chart-data-table:not(.vd-chart-sr-only) td {
|
|
114
|
+
padding: 0.4rem 0.65rem;
|
|
115
|
+
border: 1px solid var(--vd-border-color, #dee2e6);
|
|
116
|
+
text-align: left;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.vd-chart-data-table:not(.vd-chart-sr-only) th {
|
|
120
|
+
background: color-mix(in srgb, var(--vd-bg-primary, #ffffff) 90%, var(--vd-border-color, #dee2e6));
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-theme="dark"] .vd-chart-data-table:not(.vd-chart-sr-only) th {
|
|
125
|
+
background: color-mix(in srgb, var(--vd-bg-primary, #1a1d20) 88%, var(--vd-border-color, #495057));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (prefers-color-scheme: dark) {
|
|
129
|
+
:root:not([data-theme]) .vd-chart-data-table:not(.vd-chart-sr-only) th {
|
|
130
|
+
background: color-mix(in srgb, var(--vd-bg-primary, #1a1d20) 88%, var(--vd-border-color, #495057));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
package/dist/charts/vue.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ export interface VdChartProps {
|
|
|
77
77
|
/** Axis titles. */
|
|
78
78
|
xAxis?: { label?: string };
|
|
79
79
|
yAxis?: { label?: string };
|
|
80
|
+
/** Accessible data table: `true` (sr-only, default) / `false` / `'visible'`. */
|
|
81
|
+
dataTable?: boolean | 'visible';
|
|
82
|
+
/** Override the SVG `aria-roledescription` (defaults to `${kind} chart`). */
|
|
83
|
+
ariaRoleDescription?: string;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
/**
|
|
@@ -8,6 +8,7 @@ export type CodeEditorLanguage =
|
|
|
8
8
|
| 'javascript'
|
|
9
9
|
| 'typescript'
|
|
10
10
|
| 'html'
|
|
11
|
+
| 'vue'
|
|
11
12
|
| 'css'
|
|
12
13
|
| 'json'
|
|
13
14
|
| 'markdown'
|
|
@@ -49,8 +50,24 @@ export interface Token {
|
|
|
49
50
|
*/
|
|
50
51
|
export function tokenize(source: string, language: string): Token[];
|
|
51
52
|
|
|
52
|
-
/**
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* When `trailingNewline` is true, append an extra `\n` if `source` is empty
|
|
55
|
+
* or already ends with `\n` (textarea line-count). Default false — snippet-safe
|
|
56
|
+
* inside `<pre>`.
|
|
57
|
+
*/
|
|
58
|
+
export interface HighlightOptions {
|
|
59
|
+
trailingNewline?: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Render tokens to an escaped HTML string of `vd-tk-*` spans (no extra newline). */
|
|
63
|
+
export function renderTokensToHtml(tokens: Token[]): string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Tokenize + render to an escaped HTML string (never routed to innerHTML).
|
|
67
|
+
* Does not append an extra trailing newline unless `options.trailingNewline`
|
|
68
|
+
* is true.
|
|
69
|
+
*/
|
|
70
|
+
export function highlight(source: string, language: string, options?: HighlightOptions): string;
|
|
54
71
|
|
|
55
72
|
export interface CodeEditorSelection {
|
|
56
73
|
start: number;
|