altitude-design 0.2.0 → 0.3.0
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/README.md +46 -8
- package/dist/adapters/codemirror.cjs +88 -0
- package/dist/adapters/codemirror.cjs.map +7 -0
- package/dist/adapters/codemirror.js +67 -0
- package/dist/adapters/codemirror.js.map +7 -0
- package/dist/adapters/react-flow.css +102 -0
- package/dist/adapters/tiptap.css +71 -0
- package/dist/altitude.css +3165 -246
- package/dist/altitude.iife.js +33 -5
- package/dist/altitude.no-fonts.css +3165 -246
- package/dist/chart-themes.cjs +195 -0
- package/dist/chart-themes.cjs.map +7 -0
- package/dist/chart-themes.js +165 -0
- package/dist/chart-themes.js.map +7 -0
- package/dist/cli/altitude.mjs +134 -0
- package/dist/guidance/README.md +32 -0
- package/dist/guidance/agent-setup.md +22 -0
- package/dist/guidance/app-skeleton.md +17 -0
- package/dist/guidance/evidence.json +95 -0
- package/dist/guidance/index.json +493 -0
- package/dist/guidance/llms.txt +20 -0
- package/dist/guidance/manifest.json +92 -0
- package/dist/guidance/pattern.schema.json +181 -0
- package/dist/guidance/patterns/agent-action.json +77 -0
- package/dist/guidance/patterns/agent-action.md +39 -0
- package/dist/guidance/patterns/assistant-conversation.json +77 -0
- package/dist/guidance/patterns/assistant-conversation.md +50 -0
- package/dist/guidance/patterns/async-collection.json +71 -0
- package/dist/guidance/patterns/async-collection.md +29 -0
- package/dist/guidance/patterns/audit-log.json +75 -0
- package/dist/guidance/patterns/audit-log.md +27 -0
- package/dist/guidance/patterns/auth.json +86 -0
- package/dist/guidance/patterns/auth.md +29 -0
- package/dist/guidance/patterns/billing.json +80 -0
- package/dist/guidance/patterns/billing.md +29 -0
- package/dist/guidance/patterns/consequential-action.json +76 -0
- package/dist/guidance/patterns/consequential-action.md +27 -0
- package/dist/guidance/patterns/developer-settings.json +79 -0
- package/dist/guidance/patterns/developer-settings.md +29 -0
- package/dist/guidance/patterns/edit-record.json +74 -0
- package/dist/guidance/patterns/edit-record.md +51 -0
- package/dist/guidance/patterns/import.json +77 -0
- package/dist/guidance/patterns/import.md +31 -0
- package/dist/guidance/patterns/members.json +77 -0
- package/dist/guidance/patterns/members.md +27 -0
- package/dist/guidance/patterns/onboarding.json +78 -0
- package/dist/guidance/patterns/onboarding.md +31 -0
- package/dist/guidance/patterns/review-submit.json +72 -0
- package/dist/guidance/patterns/review-submit.md +27 -0
- package/dist/guidance/patterns/screen-layout.json +79 -0
- package/dist/guidance/patterns/screen-layout.md +40 -0
- package/dist/guidance/patterns/settings.json +78 -0
- package/dist/guidance/patterns/settings.md +32 -0
- package/dist/guidance/patterns/sync.json +77 -0
- package/dist/guidance/patterns/sync.md +31 -0
- package/dist/guidance/principles.md +23 -0
- package/dist/guidance/references/build/checks/agent-action-pattern.mjs +57 -0
- package/dist/guidance/references/build/checks/agent-setup.mjs +78 -0
- package/dist/guidance/references/build/checks/assistant-conversation-pattern.mjs +49 -0
- package/dist/guidance/references/build/checks/audit-log-pattern.mjs +63 -0
- package/dist/guidance/references/build/checks/auth-pattern.mjs +67 -0
- package/dist/guidance/references/build/checks/billing-pattern.mjs +63 -0
- package/dist/guidance/references/build/checks/developer-settings-pattern.mjs +76 -0
- package/dist/guidance/references/build/checks/guidance.mjs +71 -0
- package/dist/guidance/references/build/checks/import-pattern.mjs +69 -0
- package/dist/guidance/references/build/checks/members-pattern.mjs +71 -0
- package/dist/guidance/references/build/checks/onboarding-pattern.mjs +54 -0
- package/dist/guidance/references/build/checks/pattern-types.mjs +13 -0
- package/dist/guidance/references/build/checks/pattern-workflows.mjs +226 -0
- package/dist/guidance/references/build/checks/primary-scope.mjs +49 -0
- package/dist/guidance/references/build/checks/render-tells.mjs +72 -0
- package/dist/guidance/references/build/checks/screen-layout-pattern.mjs +111 -0
- package/dist/guidance/references/build/checks/semantics.mjs +72 -0
- package/dist/guidance/references/build/checks/settings-pattern.mjs +73 -0
- package/dist/guidance/references/build/checks/sync-pattern.mjs +62 -0
- package/dist/guidance/references/build/checks/tells-lint.mjs +164 -0
- package/dist/guidance/references/build/fixtures/pattern-workflows.tsx +83 -0
- package/dist/guidance/references/build/fixtures/patterns/agent-action.jsx +60 -0
- package/dist/guidance/references/build/fixtures/patterns/app-skeleton.jsx +94 -0
- package/dist/guidance/references/build/fixtures/patterns/assistant-conversation.jsx +79 -0
- package/dist/guidance/references/build/fixtures/patterns/audit-log.jsx +81 -0
- package/dist/guidance/references/build/fixtures/patterns/auth.jsx +150 -0
- package/dist/guidance/references/build/fixtures/patterns/billing.jsx +96 -0
- package/dist/guidance/references/build/fixtures/patterns/developer-settings.jsx +95 -0
- package/dist/guidance/references/build/fixtures/patterns/import.jsx +102 -0
- package/dist/guidance/references/build/fixtures/patterns/members.jsx +106 -0
- package/dist/guidance/references/build/fixtures/patterns/onboarding.jsx +70 -0
- package/dist/guidance/references/build/fixtures/patterns/screen-layout-decision.jsx +74 -0
- package/dist/guidance/references/build/fixtures/patterns/screen-layout-editor.jsx +56 -0
- package/dist/guidance/references/build/fixtures/patterns/screen-layout-report.jsx +42 -0
- package/dist/guidance/references/build/fixtures/patterns/settings.jsx +73 -0
- package/dist/guidance/references/build/fixtures/patterns/sync.jsx +78 -0
- package/dist/guidance/references/project/components/src/pattern-async-collection.tsx +57 -0
- package/dist/guidance/references/project/components/src/pattern-consequential-action.tsx +77 -0
- package/dist/guidance/references/project/components/src/pattern-edit-record.tsx +127 -0
- package/dist/guidance/references/project/components/src/pattern-review-submit.tsx +47 -0
- package/dist/guidance/references/project/components/src/settings.tsx +79 -0
- package/dist/guidance/references/scripts/build-framework-fixture.mjs +20 -0
- package/dist/guidance/rules.json +653 -0
- package/dist/guidance/visual/Elevation.md +194 -0
- package/dist/guidance/visual/Fundamentals.md +83 -0
- package/dist/guidance/visual/Research.md +1620 -0
- package/dist/index.cjs +19009 -1854
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +19009 -1854
- package/dist/index.js.map +4 -4
- package/dist/tokens.css +84 -84
- package/dist/tokens.json +301 -128
- package/dist/types/adapter-codemirror.d.ts +13 -0
- package/dist/types/agent-fleet.d.ts +166 -0
- package/dist/types/ai-label.d.ts +30 -0
- package/dist/types/app-shell.d.ts +83 -0
- package/dist/types/area-chart.d.ts +80 -0
- package/dist/types/artifact.d.ts +65 -0
- package/dist/types/bar-chart.d.ts +83 -0
- package/dist/types/bar-list.d.ts +35 -0
- package/dist/types/breadcrumb.d.ts +62 -0
- package/dist/types/chart-brush.d.ts +35 -0
- package/dist/types/chart-themes.d.ts +229 -0
- package/dist/types/chart.d.ts +570 -0
- package/dist/types/checklist.d.ts +71 -0
- package/dist/types/code-block.d.ts +32 -0
- package/dist/types/collections.d.ts +116 -5
- package/dist/types/color-picker.d.ts +38 -0
- package/dist/types/command.d.ts +6 -3
- package/dist/types/comment-thread.d.ts +48 -0
- package/dist/types/confirmation.d.ts +60 -0
- package/dist/types/context-menu.d.ts +17 -0
- package/dist/types/controls.d.ts +134 -22
- package/dist/types/conversation.d.ts +130 -0
- package/dist/types/copy-button.d.ts +19 -0
- package/dist/types/core.d.ts +139 -10
- package/dist/types/data-grid.d.ts +76 -0
- package/dist/types/date-picker.d.ts +96 -0
- package/dist/types/diff-view.d.ts +54 -0
- package/dist/types/dot-plot.d.ts +54 -0
- package/dist/types/edit-region.d.ts +121 -0
- package/dist/types/feature-gate.d.ts +22 -0
- package/dist/types/filter-bar.d.ts +65 -0
- package/dist/types/formatted-number.d.ts +38 -0
- package/dist/types/heatmap.d.ts +64 -0
- package/dist/types/in-place.d.ts +24 -0
- package/dist/types/index.d.ts +159 -14
- package/dist/types/inline-citation.d.ts +35 -0
- package/dist/types/inline-edit.d.ts +71 -0
- package/dist/types/input-otp.d.ts +37 -0
- package/dist/types/item-group.d.ts +104 -0
- package/dist/types/line-chart.d.ts +116 -0
- package/dist/types/link.d.ts +11 -0
- package/dist/types/markdown.d.ts +88 -0
- package/dist/types/meter.d.ts +43 -0
- package/dist/types/modal-state.d.ts +62 -0
- package/dist/types/nav.d.ts +8 -1
- package/dist/types/notifications.d.ts +42 -0
- package/dist/types/number-input.d.ts +30 -0
- package/dist/types/overlays.d.ts +56 -15
- package/dist/types/page-header.d.ts +27 -0
- package/dist/types/pagination.d.ts +29 -0
- package/dist/types/palette.d.ts +64 -0
- package/dist/types/password-input.d.ts +22 -0
- package/dist/types/pattern-assistant-conversation.d.ts +55 -0
- package/dist/types/pattern-async-collection.d.ts +34 -0
- package/dist/types/pattern-consequential-action.d.ts +53 -0
- package/dist/types/pattern-edit-record.d.ts +72 -0
- package/dist/types/pattern-review-submit.d.ts +43 -0
- package/dist/types/permission-matrix.d.ts +34 -0
- package/dist/types/plan-picker.d.ts +40 -0
- package/dist/types/prompt-input.d.ts +106 -0
- package/dist/types/property-list.d.ts +67 -0
- package/dist/types/question.d.ts +64 -0
- package/dist/types/relative-time.d.ts +21 -0
- package/dist/types/removal-receipt.d.ts +1180 -0
- package/dist/types/resizable.d.ts +48 -0
- package/dist/types/roving.d.ts +44 -0
- package/dist/types/save-bar.d.ts +38 -0
- package/dist/types/saved-views.d.ts +72 -0
- package/dist/types/scatter-chart.d.ts +60 -0
- package/dist/types/schedule.d.ts +80 -0
- package/dist/types/secret-field.d.ts +33 -0
- package/dist/types/select.d.ts +44 -2
- package/dist/types/separator.d.ts +11 -0
- package/dist/types/settings.d.ts +39 -0
- package/dist/types/sheet.d.ts +1 -1
- package/dist/types/sparkline.d.ts +46 -0
- package/dist/types/split-button.d.ts +21 -0
- package/dist/types/stat.d.ts +54 -0
- package/dist/types/stepper.d.ts +6 -3
- package/dist/types/suggestions.d.ts +29 -0
- package/dist/types/suspense.d.ts +85 -0
- package/dist/types/sync-indicator.d.ts +24 -0
- package/dist/types/tag-input.d.ts +65 -0
- package/dist/types/terminal.d.ts +33 -0
- package/dist/types/thread-list.d.ts +58 -0
- package/dist/types/time-input.d.ts +33 -0
- package/dist/types/timeline.d.ts +38 -0
- package/dist/types/toggle.d.ts +46 -0
- package/dist/types/toolbar.d.ts +34 -0
- package/dist/types/tour.d.ts +23 -0
- package/dist/types/trace.d.ts +65 -0
- package/dist/types/tree.d.ts +71 -0
- package/dist/types-cjs/adapter-codemirror.d.cts +13 -0
- package/dist/types-cjs/agent-fleet.d.cts +166 -0
- package/dist/types-cjs/ai-label.d.cts +30 -0
- package/dist/types-cjs/app-shell.d.cts +83 -0
- package/dist/types-cjs/area-chart.d.cts +80 -0
- package/dist/types-cjs/artifact.d.cts +65 -0
- package/dist/types-cjs/bar-chart.d.cts +83 -0
- package/dist/types-cjs/bar-list.d.cts +35 -0
- package/dist/types-cjs/breadcrumb.d.cts +62 -0
- package/dist/types-cjs/chart-brush.d.cts +35 -0
- package/dist/types-cjs/chart-themes.d.cts +229 -0
- package/dist/types-cjs/chart.d.cts +570 -0
- package/dist/types-cjs/checklist.d.cts +71 -0
- package/dist/types-cjs/code-block.d.cts +32 -0
- package/dist/types-cjs/collections.d.cts +246 -0
- package/dist/types-cjs/color-picker.d.cts +38 -0
- package/dist/types-cjs/command.d.cts +66 -0
- package/dist/types-cjs/comment-thread.d.cts +48 -0
- package/dist/types-cjs/confirmation.d.cts +60 -0
- package/dist/types-cjs/context-menu.d.cts +17 -0
- package/dist/types-cjs/controls.d.cts +360 -0
- package/dist/types-cjs/conversation.d.cts +130 -0
- package/dist/types-cjs/copy-button.d.cts +19 -0
- package/dist/types-cjs/core.d.cts +256 -0
- package/dist/types-cjs/data-grid.d.cts +76 -0
- package/dist/types-cjs/date-picker.d.cts +96 -0
- package/dist/types-cjs/diff-view.d.cts +54 -0
- package/dist/types-cjs/dot-plot.d.cts +54 -0
- package/dist/types-cjs/edit-region.d.cts +121 -0
- package/dist/types-cjs/empty.d.cts +24 -0
- package/dist/types-cjs/feature-gate.d.cts +22 -0
- package/dist/types-cjs/filter-bar.d.cts +65 -0
- package/dist/types-cjs/formatted-number.d.cts +38 -0
- package/dist/types-cjs/heatmap.d.cts +64 -0
- package/dist/types-cjs/in-place.d.cts +24 -0
- package/dist/types-cjs/index.d.cts +154 -0
- package/dist/types-cjs/inline-citation.d.cts +35 -0
- package/dist/types-cjs/inline-edit.d.cts +71 -0
- package/dist/types-cjs/input-otp.d.cts +37 -0
- package/dist/types-cjs/item-group.d.cts +104 -0
- package/dist/types-cjs/line-chart.d.cts +116 -0
- package/dist/types-cjs/link.d.cts +11 -0
- package/dist/types-cjs/markdown.d.cts +88 -0
- package/dist/types-cjs/meter.d.cts +43 -0
- package/dist/types-cjs/modal-state.d.cts +62 -0
- package/dist/types-cjs/nav.d.cts +25 -0
- package/dist/types-cjs/notifications.d.cts +42 -0
- package/dist/types-cjs/number-input.d.cts +30 -0
- package/dist/types-cjs/overlays.d.cts +170 -0
- package/dist/types-cjs/page-header.d.cts +27 -0
- package/dist/types-cjs/pagination.d.cts +29 -0
- package/dist/types-cjs/palette.d.cts +64 -0
- package/dist/types-cjs/password-input.d.cts +22 -0
- package/dist/types-cjs/pattern-assistant-conversation.d.cts +55 -0
- package/dist/types-cjs/pattern-async-collection.d.cts +34 -0
- package/dist/types-cjs/pattern-consequential-action.d.cts +53 -0
- package/dist/types-cjs/pattern-edit-record.d.cts +72 -0
- package/dist/types-cjs/pattern-review-submit.d.cts +43 -0
- package/dist/types-cjs/permission-matrix.d.cts +34 -0
- package/dist/types-cjs/pile.d.cts +27 -0
- package/dist/types-cjs/plan-picker.d.cts +40 -0
- package/dist/types-cjs/prompt-input.d.cts +106 -0
- package/dist/types-cjs/property-list.d.cts +67 -0
- package/dist/types-cjs/question.d.cts +64 -0
- package/dist/types-cjs/relative-time.d.cts +21 -0
- package/dist/types-cjs/removal-receipt.d.cts +1180 -0
- package/dist/types-cjs/resizable.d.cts +48 -0
- package/dist/types-cjs/roving.d.cts +44 -0
- package/dist/types-cjs/save-bar.d.cts +38 -0
- package/dist/types-cjs/saved-views.d.cts +72 -0
- package/dist/types-cjs/scatter-chart.d.cts +60 -0
- package/dist/types-cjs/schedule.d.cts +80 -0
- package/dist/types-cjs/secret-field.d.cts +33 -0
- package/dist/types-cjs/select.d.cts +109 -0
- package/dist/types-cjs/separator.d.cts +11 -0
- package/dist/types-cjs/settings.d.cts +39 -0
- package/dist/types-cjs/sheet.d.cts +27 -0
- package/dist/types-cjs/sparkline.d.cts +46 -0
- package/dist/types-cjs/split-button.d.cts +21 -0
- package/dist/types-cjs/stat.d.cts +54 -0
- package/dist/types-cjs/stepper.d.cts +26 -0
- package/dist/types-cjs/suggestions.d.cts +29 -0
- package/dist/types-cjs/suspense.d.cts +85 -0
- package/dist/types-cjs/sync-indicator.d.cts +24 -0
- package/dist/types-cjs/tag-input.d.cts +65 -0
- package/dist/types-cjs/terminal.d.cts +33 -0
- package/dist/types-cjs/thread-list.d.cts +58 -0
- package/dist/types-cjs/time-input.d.cts +33 -0
- package/dist/types-cjs/timeline.d.cts +38 -0
- package/dist/types-cjs/toggle.d.cts +46 -0
- package/dist/types-cjs/toolbar.d.cts +34 -0
- package/dist/types-cjs/tour.d.cts +23 -0
- package/dist/types-cjs/trace.d.cts +65 -0
- package/dist/types-cjs/tree.d.cts +71 -0
- package/package.json +90 -9
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartDatum } from './chart.cjs';
|
|
3
|
+
export interface ChartBrushProps {
|
|
4
|
+
/** The series the overview draws. Default: the chart's first shown series. */
|
|
5
|
+
series?: string;
|
|
6
|
+
/** The overview's name. Default "Overview, <its whole range>". */
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** What the frame hands the brush: every record, where the window is in them, and how to say an x. */
|
|
11
|
+
interface BrushWiring {
|
|
12
|
+
full: ChartDatum[];
|
|
13
|
+
xKey: string;
|
|
14
|
+
seriesKey: string;
|
|
15
|
+
color: string;
|
|
16
|
+
value: [number, number];
|
|
17
|
+
onChange: (v: [number, number]) => void;
|
|
18
|
+
dated: boolean;
|
|
19
|
+
formatX: (v: unknown) => string;
|
|
20
|
+
locale?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Pick a time window on an overview (#74): put it inside a LineChart, AreaChart or BarChart over time. The overview is an
|
|
24
|
+
* opening, the whole series drawn as a flat line in a trench, because it's a track you slide along; the window is a raised lens
|
|
25
|
+
* over it (level 1, accent rim, clear face) whose two grips are a range Slider's thumbs. Outside the window the overview
|
|
26
|
+
* recedes. Drag the lens to pan, a grip to resize, or press outside it to centre the window there.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ChartBrush({ __brush, ...props }: ChartBrushProps & {
|
|
29
|
+
__brush?: BrushWiring;
|
|
30
|
+
}): React.JSX.Element | null;
|
|
31
|
+
export declare namespace ChartBrush {
|
|
32
|
+
var chartHtml: boolean;
|
|
33
|
+
var chartBrush: boolean;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** Token values by name, without `--` (as in tokens.json), e.g. `{ 'data-1': '#3d5bd9', ink: '#141a29' }`. */
|
|
3
|
+
export type ChartTokens = Record<string, string>;
|
|
4
|
+
/** An element to read the active scheme's computed tokens from, or the tokens themselves. */
|
|
5
|
+
export type ChartTokenSource = Element | ChartTokens;
|
|
6
|
+
export interface ChartThemeOptions {
|
|
7
|
+
/** Zero every animation. Read from the element (`prefers-reduced-motion`, or `AltitudeProvider motion`) when omitted. */
|
|
8
|
+
reducedMotion?: boolean;
|
|
9
|
+
/** Turn on pattern fills (ECharts decals) so no series relies on colour alone. On under forced colours regardless. */
|
|
10
|
+
patterns?: boolean;
|
|
11
|
+
/** Forced colours are active. Read from the element's window when omitted. */
|
|
12
|
+
forcedColors?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** The tokens a chart theme needs, read from an element's computed style (so its scheme and accent apply). */
|
|
15
|
+
export declare function readChartTokens(source: ChartTokenSource): ChartTokens;
|
|
16
|
+
/** data-1 … data-6, then data-other: series colours in config order, for a library that takes a list. */
|
|
17
|
+
export declare function dataColors(source: ChartTokenSource): string[];
|
|
18
|
+
/**
|
|
19
|
+
* An ECharts theme: `echarts.init(el, echartsTheme(el))`, or `echarts.registerTheme('altitude', echartsTheme(el))`.
|
|
20
|
+
* Series in data-1 … data-6 then data-other, text in ink, axes in line-control, split lines in line, the readout on
|
|
21
|
+
* surface-floating at elev-3, aria on (import ECharts' AriaComponent), decals under forced colours or with `patterns`,
|
|
22
|
+
* and dur-travel-3 animation on ease-glide's curve, zero under reduced motion.
|
|
23
|
+
*/
|
|
24
|
+
export declare function echartsTheme(source: ChartTokenSource, options?: ChartThemeOptions): {
|
|
25
|
+
color: string[];
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
textStyle: {
|
|
28
|
+
color: string;
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
};
|
|
31
|
+
title: {
|
|
32
|
+
textStyle: {
|
|
33
|
+
color: string;
|
|
34
|
+
};
|
|
35
|
+
subtextStyle: {
|
|
36
|
+
color: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
legend: {
|
|
40
|
+
textStyle: {
|
|
41
|
+
color: string;
|
|
42
|
+
};
|
|
43
|
+
inactiveColor: string;
|
|
44
|
+
};
|
|
45
|
+
categoryAxis: {
|
|
46
|
+
axisLine: {
|
|
47
|
+
lineStyle: {
|
|
48
|
+
color: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
axisTick: {
|
|
52
|
+
lineStyle: {
|
|
53
|
+
color: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
axisLabel: {
|
|
57
|
+
color: string;
|
|
58
|
+
};
|
|
59
|
+
splitLine: {
|
|
60
|
+
lineStyle: {
|
|
61
|
+
color: string[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
splitArea: {
|
|
65
|
+
show: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
valueAxis: {
|
|
69
|
+
axisLine: {
|
|
70
|
+
lineStyle: {
|
|
71
|
+
color: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
axisTick: {
|
|
75
|
+
lineStyle: {
|
|
76
|
+
color: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
axisLabel: {
|
|
80
|
+
color: string;
|
|
81
|
+
};
|
|
82
|
+
splitLine: {
|
|
83
|
+
lineStyle: {
|
|
84
|
+
color: string[];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
splitArea: {
|
|
88
|
+
show: boolean;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
logAxis: {
|
|
92
|
+
axisLine: {
|
|
93
|
+
lineStyle: {
|
|
94
|
+
color: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
axisTick: {
|
|
98
|
+
lineStyle: {
|
|
99
|
+
color: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
axisLabel: {
|
|
103
|
+
color: string;
|
|
104
|
+
};
|
|
105
|
+
splitLine: {
|
|
106
|
+
lineStyle: {
|
|
107
|
+
color: string[];
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
splitArea: {
|
|
111
|
+
show: boolean;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
timeAxis: {
|
|
115
|
+
axisLine: {
|
|
116
|
+
lineStyle: {
|
|
117
|
+
color: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
axisTick: {
|
|
121
|
+
lineStyle: {
|
|
122
|
+
color: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
axisLabel: {
|
|
126
|
+
color: string;
|
|
127
|
+
};
|
|
128
|
+
splitLine: {
|
|
129
|
+
lineStyle: {
|
|
130
|
+
color: string[];
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
splitArea: {
|
|
134
|
+
show: boolean;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
tooltip: {
|
|
138
|
+
backgroundColor: string;
|
|
139
|
+
borderColor: string;
|
|
140
|
+
borderWidth: number;
|
|
141
|
+
textStyle: {
|
|
142
|
+
color: string;
|
|
143
|
+
fontFamily: string;
|
|
144
|
+
};
|
|
145
|
+
extraCssText: string;
|
|
146
|
+
axisPointer: {
|
|
147
|
+
lineStyle: {
|
|
148
|
+
color: string;
|
|
149
|
+
width: number;
|
|
150
|
+
};
|
|
151
|
+
crossStyle: {
|
|
152
|
+
color: string;
|
|
153
|
+
width: number;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
visualMap: {
|
|
158
|
+
inRange: {
|
|
159
|
+
color: string[];
|
|
160
|
+
};
|
|
161
|
+
textStyle: {
|
|
162
|
+
color: string;
|
|
163
|
+
fontFamily: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
aria: {
|
|
167
|
+
enabled: boolean;
|
|
168
|
+
decal: {
|
|
169
|
+
show: boolean;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
animation: boolean;
|
|
173
|
+
animationDuration: number;
|
|
174
|
+
animationDurationUpdate: number;
|
|
175
|
+
animationEasing: string;
|
|
176
|
+
animationEasingUpdate: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Chart.js defaults: `Chart.defaults.set(chartjsDefaults(el))`. Text in ink-muted, grid in line, axis borders in
|
|
180
|
+
* line-control, the readout on surface-floating, dur-travel-3 animation (none under reduced motion). Chart.js has no
|
|
181
|
+
* palette default: give each dataset a colour from `dataColors(el)`.
|
|
182
|
+
*/
|
|
183
|
+
export declare function chartjsDefaults(source: ChartTokenSource, options?: ChartThemeOptions): {
|
|
184
|
+
color: string;
|
|
185
|
+
borderColor: string;
|
|
186
|
+
backgroundColor: string;
|
|
187
|
+
font: {
|
|
188
|
+
family: string;
|
|
189
|
+
};
|
|
190
|
+
animation: false | {
|
|
191
|
+
duration: number;
|
|
192
|
+
easing: "easeInOutCubic";
|
|
193
|
+
};
|
|
194
|
+
scale: {
|
|
195
|
+
grid: {
|
|
196
|
+
color: string;
|
|
197
|
+
};
|
|
198
|
+
border: {
|
|
199
|
+
color: string;
|
|
200
|
+
};
|
|
201
|
+
ticks: {
|
|
202
|
+
color: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
plugins: {
|
|
206
|
+
legend: {
|
|
207
|
+
labels: {
|
|
208
|
+
color: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
tooltip: {
|
|
212
|
+
backgroundColor: string;
|
|
213
|
+
borderColor: string;
|
|
214
|
+
borderWidth: number;
|
|
215
|
+
titleColor: string;
|
|
216
|
+
bodyColor: string;
|
|
217
|
+
footerColor: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Re-reads a chart theme whenever the scheme around `ref` changes: an AltitudeProvider's `scheme`, `accent` or
|
|
223
|
+
* `motion`, a `data-theme` on the page, or the reduced-motion and forced-colours settings. Null until mounted.
|
|
224
|
+
*
|
|
225
|
+
* const ref = React.useRef<HTMLDivElement>(null);
|
|
226
|
+
* const theme = useChartTheme(echartsTheme, ref);
|
|
227
|
+
* React.useEffect(() => { if (!theme) return; const c = echarts.init(ref.current!, theme); …; return () => c.dispose(); }, [theme]);
|
|
228
|
+
*/
|
|
229
|
+
export declare function useChartTheme<T>(build: (source: Element, options?: ChartThemeOptions) => T, ref: React.RefObject<Element | null>, options?: ChartThemeOptions): T | null;
|