@k2b/ui 0.52.0 → 0.53.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/dist/base.css +17 -0
- package/dist/browser/actions/SplitButton.js +10 -1
- package/dist/browser/actions/SplitButton.js.map +1 -1
- package/dist/browser/actions/Toolbar.js +83 -51
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/actions/index.js +1 -1
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/charts/core/area.js +1 -1
- package/dist/browser/charts/core/area.js.map +1 -1
- package/dist/browser/charts/core/bar-base-render.js +10 -0
- package/dist/browser/charts/core/bar-base-render.js.map +1 -0
- package/dist/browser/charts/core/bar-common.js +63 -0
- package/dist/browser/charts/core/bar-common.js.map +1 -0
- package/dist/browser/charts/core/bar-labels.js +12 -0
- package/dist/browser/charts/core/bar-labels.js.map +1 -1
- package/dist/browser/charts/core/bar-render.js +10 -0
- package/dist/browser/charts/core/bar-render.js.map +1 -0
- package/dist/browser/charts/core/bar-series.js +112 -0
- package/dist/browser/charts/core/bar-series.js.map +1 -0
- package/dist/browser/charts/core/calendar.js +63 -47
- package/dist/browser/charts/core/calendar.js.map +1 -1
- package/dist/browser/charts/core/dot-options.js +28 -0
- package/dist/browser/charts/core/dot-options.js.map +1 -0
- package/dist/browser/charts/core/dots.js +12 -0
- package/dist/browser/charts/core/dots.js.map +1 -0
- package/dist/browser/charts/core/index.js +14 -2
- package/dist/browser/charts/core/index.js.map +1 -1
- package/dist/browser/charts/core/line-base.js +102 -0
- package/dist/browser/charts/core/line-base.js.map +1 -0
- package/dist/browser/charts/core/line-details.js +264 -0
- package/dist/browser/charts/core/line-details.js.map +1 -0
- package/dist/browser/charts/core/line-options.js +32 -0
- package/dist/browser/charts/core/line-options.js.map +1 -0
- package/dist/browser/charts/core/line-paths.js +60 -0
- package/dist/browser/charts/core/line-paths.js.map +1 -0
- package/dist/browser/charts/core/line.js +15 -0
- package/dist/browser/charts/core/line.js.map +1 -0
- package/dist/browser/charts/core/palette.js +11 -0
- package/dist/browser/charts/core/palette.js.map +1 -0
- package/dist/browser/charts/core/pareto.js +23 -5
- package/dist/browser/charts/core/pareto.js.map +1 -1
- package/dist/browser/charts/core/registry.js +4 -2
- package/dist/browser/charts/core/registry.js.map +1 -1
- package/dist/browser/charts/core/render-size.js +4 -1
- package/dist/browser/charts/core/render-size.js.map +1 -1
- package/dist/browser/charts/core/render.js +23 -7
- package/dist/browser/charts/core/render.js.map +1 -1
- package/dist/browser/charts/core/sankey-size.js +105 -0
- package/dist/browser/charts/core/sankey-size.js.map +1 -0
- package/dist/browser/charts/core/sankey.js +280 -0
- package/dist/browser/charts/core/sankey.js.map +1 -0
- package/dist/browser/charts/core/snapshot.js +4 -2
- package/dist/browser/charts/core/snapshot.js.map +1 -1
- package/dist/browser/charts/core/svg-common.js +5 -67
- package/dist/browser/charts/core/svg-common.js.map +1 -1
- package/dist/browser/charts/core/svg-format.js +7 -0
- package/dist/browser/charts/core/svg-format.js.map +1 -0
- package/dist/browser/charts/core/svg-renderers.js +10 -108
- package/dist/browser/charts/core/svg-renderers.js.map +1 -1
- package/dist/browser/charts/core/treemap.js +1 -1
- package/dist/browser/charts/core/treemap.js.map +1 -1
- package/dist/browser/charts/description.js.map +1 -1
- package/dist/browser/charts.js +2 -1
- package/dist/browser/charts.js.map +1 -1
- package/dist/browser/content/ChartExplorer.js +22 -7
- package/dist/browser/content/ChartExplorer.js.map +1 -1
- package/dist/browser/content/ChartRoot.js +69 -52
- package/dist/browser/content/ChartRoot.js.map +1 -1
- package/dist/browser/content/ChartSnapshotView.js +18 -11
- package/dist/browser/content/ChartSnapshotView.js.map +1 -1
- package/dist/browser/content/chart-bar.js +50 -200
- package/dist/browser/content/chart-bar.js.map +1 -1
- package/dist/browser/content/chart-calendar.js +30 -14
- package/dist/browser/content/chart-calendar.js.map +1 -1
- package/dist/browser/content/chart-inspection-core.js +13 -6
- package/dist/browser/content/chart-inspection-core.js.map +1 -1
- package/dist/browser/content/chart-message-catalog.js +8 -0
- package/dist/browser/content/chart-message-catalog.js.map +1 -1
- package/dist/browser/content/chart-sankey.js +13 -0
- package/dist/browser/content/chart-sankey.js.map +1 -0
- package/dist/browser/content/chart-svg.js +1 -1
- package/dist/browser/content/chart-svg.js.map +1 -1
- package/dist/browser/content/chart-time-axis.js +10 -108
- package/dist/browser/content/chart-time-axis.js.map +1 -1
- package/dist/browser/content/chart-time-calendar.js +108 -0
- package/dist/browser/content/chart-time-calendar.js.map +1 -0
- package/dist/browser/inputs/DatePicker.js +30 -21
- package/dist/browser/inputs/DatePicker.js.map +1 -1
- package/dist/browser/inputs/NumberInput.js +188 -160
- package/dist/browser/inputs/NumberInput.js.map +1 -1
- package/dist/browser/inputs/Select.js +433 -400
- package/dist/browser/inputs/Select.js.map +1 -1
- package/dist/browser/inputs/Switch.js +203 -77
- package/dist/browser/inputs/Switch.js.map +1 -1
- package/dist/browser/inputs/TextInput.js +212 -188
- package/dist/browser/inputs/TextInput.js.map +1 -1
- package/dist/browser/inputs/field-contract.js.map +1 -1
- package/dist/browser/inputs/field-suggestion-slot.js +21 -0
- package/dist/browser/inputs/field-suggestion-slot.js.map +1 -0
- package/dist/browser/inputs/field-suggestion-types.js +2 -0
- package/dist/browser/inputs/field-suggestion-types.js.map +1 -0
- package/dist/browser/inputs/field-suggestion.js +502 -0
- package/dist/browser/inputs/field-suggestion.js.map +1 -0
- package/dist/browser/inputs/index.js +1 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/suggestion-messages.js +160 -0
- package/dist/browser/inputs/suggestion-messages.js.map +1 -0
- package/dist/browser/layout/AppOverview.js +15 -5
- package/dist/browser/layout/AppOverview.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +66 -411
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/DetailSections.js +8 -7
- package/dist/browser/layout/DetailSections.js.map +1 -1
- package/dist/browser/layout/Discussion.js +194 -246
- package/dist/browser/layout/Discussion.js.map +1 -1
- package/dist/browser/layout/detail-panel-messages.js +1 -1
- package/dist/browser/layout/detail-panel-messages.js.map +1 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/surfaces/Field.js +102 -0
- package/dist/browser/surfaces/Field.js.map +1 -0
- package/dist/browser/surfaces/LinkCard.js +70 -21
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/browser/surfaces/NoticeRow.js +75 -0
- package/dist/browser/surfaces/NoticeRow.js.map +1 -0
- package/dist/browser/surfaces/Section.js +441 -0
- package/dist/browser/surfaces/Section.js.map +1 -0
- package/dist/browser/surfaces/index.js +3 -0
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/section-messages.js +25 -0
- package/dist/browser/surfaces/section-messages.js.map +1 -0
- package/dist/ssr/actions/SplitButton.js +10 -1
- package/dist/ssr/actions/SplitButton.js.map +1 -1
- package/dist/ssr/actions/Toolbar.js +40 -16
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/actions/index.js +1 -1
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/charts/core/area.js +1 -1
- package/dist/ssr/charts/core/area.js.map +1 -1
- package/dist/ssr/charts/core/bar-base-render.js +10 -0
- package/dist/ssr/charts/core/bar-base-render.js.map +1 -0
- package/dist/ssr/charts/core/bar-common.js +63 -0
- package/dist/ssr/charts/core/bar-common.js.map +1 -0
- package/dist/ssr/charts/core/bar-labels.js +12 -0
- package/dist/ssr/charts/core/bar-labels.js.map +1 -1
- package/dist/ssr/charts/core/bar-render.js +10 -0
- package/dist/ssr/charts/core/bar-render.js.map +1 -0
- package/dist/ssr/charts/core/bar-series.js +112 -0
- package/dist/ssr/charts/core/bar-series.js.map +1 -0
- package/dist/ssr/charts/core/calendar.js +63 -47
- package/dist/ssr/charts/core/calendar.js.map +1 -1
- package/dist/ssr/charts/core/dot-options.js +28 -0
- package/dist/ssr/charts/core/dot-options.js.map +1 -0
- package/dist/ssr/charts/core/dots.js +12 -0
- package/dist/ssr/charts/core/dots.js.map +1 -0
- package/dist/ssr/charts/core/index.js +14 -2
- package/dist/ssr/charts/core/index.js.map +1 -1
- package/dist/ssr/charts/core/line-base.js +102 -0
- package/dist/ssr/charts/core/line-base.js.map +1 -0
- package/dist/ssr/charts/core/line-details.js +264 -0
- package/dist/ssr/charts/core/line-details.js.map +1 -0
- package/dist/ssr/charts/core/line-options.js +32 -0
- package/dist/ssr/charts/core/line-options.js.map +1 -0
- package/dist/ssr/charts/core/line-paths.js +60 -0
- package/dist/ssr/charts/core/line-paths.js.map +1 -0
- package/dist/ssr/charts/core/line.js +15 -0
- package/dist/ssr/charts/core/line.js.map +1 -0
- package/dist/ssr/charts/core/palette.js +11 -0
- package/dist/ssr/charts/core/palette.js.map +1 -0
- package/dist/ssr/charts/core/pareto.js +23 -5
- package/dist/ssr/charts/core/pareto.js.map +1 -1
- package/dist/ssr/charts/core/registry.js +4 -2
- package/dist/ssr/charts/core/registry.js.map +1 -1
- package/dist/ssr/charts/core/render-size.js +4 -1
- package/dist/ssr/charts/core/render-size.js.map +1 -1
- package/dist/ssr/charts/core/render.js +23 -7
- package/dist/ssr/charts/core/render.js.map +1 -1
- package/dist/ssr/charts/core/sankey-size.js +105 -0
- package/dist/ssr/charts/core/sankey-size.js.map +1 -0
- package/dist/ssr/charts/core/sankey.js +280 -0
- package/dist/ssr/charts/core/sankey.js.map +1 -0
- package/dist/ssr/charts/core/snapshot.js +4 -2
- package/dist/ssr/charts/core/snapshot.js.map +1 -1
- package/dist/ssr/charts/core/svg-common.js +5 -67
- package/dist/ssr/charts/core/svg-common.js.map +1 -1
- package/dist/ssr/charts/core/svg-format.js +7 -0
- package/dist/ssr/charts/core/svg-format.js.map +1 -0
- package/dist/ssr/charts/core/svg-renderers.js +10 -108
- package/dist/ssr/charts/core/svg-renderers.js.map +1 -1
- package/dist/ssr/charts/core/treemap.js +1 -1
- package/dist/ssr/charts/core/treemap.js.map +1 -1
- package/dist/ssr/charts/description.js.map +1 -1
- package/dist/ssr/charts.js +2 -1
- package/dist/ssr/charts.js.map +1 -1
- package/dist/ssr/content/ChartExplorer.js +16 -4
- package/dist/ssr/content/ChartExplorer.js.map +1 -1
- package/dist/ssr/content/ChartRoot.js +24 -12
- package/dist/ssr/content/ChartRoot.js.map +1 -1
- package/dist/ssr/content/ChartSnapshotView.js +6 -2
- package/dist/ssr/content/ChartSnapshotView.js.map +1 -1
- package/dist/ssr/content/chart-bar.js +50 -200
- package/dist/ssr/content/chart-bar.js.map +1 -1
- package/dist/ssr/content/chart-calendar.js +30 -14
- package/dist/ssr/content/chart-calendar.js.map +1 -1
- package/dist/ssr/content/chart-inspection-core.js +13 -6
- package/dist/ssr/content/chart-inspection-core.js.map +1 -1
- package/dist/ssr/content/chart-message-catalog.js +8 -0
- package/dist/ssr/content/chart-message-catalog.js.map +1 -1
- package/dist/ssr/content/chart-sankey.js +13 -0
- package/dist/ssr/content/chart-sankey.js.map +1 -0
- package/dist/ssr/content/chart-svg.js +1 -1
- package/dist/ssr/content/chart-svg.js.map +1 -1
- package/dist/ssr/content/chart-time-axis.js +10 -108
- package/dist/ssr/content/chart-time-axis.js.map +1 -1
- package/dist/ssr/content/chart-time-calendar.js +108 -0
- package/dist/ssr/content/chart-time-calendar.js.map +1 -0
- package/dist/ssr/inputs/DatePicker.js +30 -21
- package/dist/ssr/inputs/DatePicker.js.map +1 -1
- package/dist/ssr/inputs/NumberInput.js +33 -7
- package/dist/ssr/inputs/NumberInput.js.map +1 -1
- package/dist/ssr/inputs/Select.js +38 -7
- package/dist/ssr/inputs/Select.js.map +1 -1
- package/dist/ssr/inputs/Switch.js +79 -18
- package/dist/ssr/inputs/Switch.js.map +1 -1
- package/dist/ssr/inputs/TextInput.js +31 -7
- package/dist/ssr/inputs/TextInput.js.map +1 -1
- package/dist/ssr/inputs/field-contract.js.map +1 -1
- package/dist/ssr/inputs/field-suggestion-slot.js +21 -0
- package/dist/ssr/inputs/field-suggestion-slot.js.map +1 -0
- package/dist/ssr/inputs/field-suggestion-types.js +2 -0
- package/dist/ssr/inputs/field-suggestion-types.js.map +1 -0
- package/dist/ssr/inputs/field-suggestion.js +402 -0
- package/dist/ssr/inputs/field-suggestion.js.map +1 -0
- package/dist/ssr/inputs/index.js +1 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/suggestion-messages.js +160 -0
- package/dist/ssr/inputs/suggestion-messages.js.map +1 -0
- package/dist/ssr/layout/AppOverview.js +3 -3
- package/dist/ssr/layout/AppOverview.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +24 -220
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/DetailSections.js +8 -7
- package/dist/ssr/layout/DetailSections.js.map +1 -1
- package/dist/ssr/layout/Discussion.js +56 -76
- package/dist/ssr/layout/Discussion.js.map +1 -1
- package/dist/ssr/layout/detail-panel-messages.js +1 -1
- package/dist/ssr/layout/detail-panel-messages.js.map +1 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/surfaces/Field.js +58 -0
- package/dist/ssr/surfaces/Field.js.map +1 -0
- package/dist/ssr/surfaces/LinkCard.js +38 -5
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/surfaces/NoticeRow.js +39 -0
- package/dist/ssr/surfaces/NoticeRow.js.map +1 -0
- package/dist/ssr/surfaces/Section.js +295 -0
- package/dist/ssr/surfaces/Section.js.map +1 -0
- package/dist/ssr/surfaces/index.js +3 -0
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/section-messages.js +25 -0
- package/dist/ssr/surfaces/section-messages.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/tabler.css +2 -1
- package/dist/types/actions/SplitButton.d.ts +5 -1
- package/dist/types/actions/Toolbar.d.ts +18 -1
- package/dist/types/actions/index.d.ts +2 -2
- package/dist/types/charts/core/bar-base-render.d.ts +7 -0
- package/dist/types/charts/core/bar-common.d.ts +13 -0
- package/dist/types/charts/core/bar-labels.d.ts +1 -0
- package/dist/types/charts/core/bar-render.d.ts +7 -0
- package/dist/types/charts/core/bar-series.d.ts +7 -0
- package/dist/types/charts/core/calendar.d.ts +9 -0
- package/dist/types/charts/core/dot-options.d.ts +27 -0
- package/dist/types/charts/core/dots.d.ts +7 -0
- package/dist/types/charts/core/index.d.ts +14 -2
- package/dist/types/charts/core/line-base.d.ts +3 -0
- package/dist/types/charts/core/line-details.d.ts +30 -0
- package/dist/types/charts/core/line-options.d.ts +25 -0
- package/dist/types/charts/core/line-paths.d.ts +16 -0
- package/dist/types/charts/core/line.d.ts +2 -0
- package/dist/types/charts/core/palette.d.ts +5 -0
- package/dist/types/charts/core/pareto.d.ts +2 -0
- package/dist/types/charts/core/registry.d.ts +3 -1
- package/dist/types/charts/core/render.d.ts +4 -1
- package/dist/types/charts/core/sankey-size.d.ts +38 -0
- package/dist/types/charts/core/sankey.d.ts +106 -0
- package/dist/types/charts/core/snapshot.d.ts +2 -0
- package/dist/types/charts/core/svg-common.d.ts +23 -16
- package/dist/types/charts/core/svg-format.d.ts +1 -0
- package/dist/types/charts/core/svg-renderers.d.ts +9 -9
- package/dist/types/charts/description.d.ts +39 -1
- package/dist/types/charts.d.ts +2 -1
- package/dist/types/content/ChartExplorer.d.ts +2 -0
- package/dist/types/content/chart-bar.d.ts +27 -19
- package/dist/types/content/chart-inspection-core.d.ts +4 -1
- package/dist/types/content/chart-sankey.d.ts +3 -0
- package/dist/types/content/chart-svg.d.ts +1 -1
- package/dist/types/content/chart-time-axis.d.ts +3 -19
- package/dist/types/content/chart-time-calendar.d.ts +24 -0
- package/dist/types/inputs/DatePicker.d.ts +4 -2
- package/dist/types/inputs/NumberInput.d.ts +2 -2
- package/dist/types/inputs/Select.d.ts +2 -2
- package/dist/types/inputs/Switch.d.ts +8 -2
- package/dist/types/inputs/TextInput.d.ts +4 -2
- package/dist/types/inputs/field-contract.d.ts +1 -0
- package/dist/types/inputs/field-suggestion-slot.d.ts +3 -0
- package/dist/types/inputs/field-suggestion-types.d.ts +103 -0
- package/dist/types/inputs/field-suggestion.d.ts +26 -0
- package/dist/types/inputs/index.d.ts +3 -1
- package/dist/types/inputs/suggestion-messages.d.ts +67 -0
- package/dist/types/layout/AppOverview.d.ts +2 -0
- package/dist/types/layout/DetailPanel.d.ts +4 -37
- package/dist/types/layout/detail-panel-messages.d.ts +1 -1
- package/dist/types/layout/index.d.ts +1 -1
- package/dist/types/surfaces/Field.d.ts +20 -0
- package/dist/types/surfaces/LinkCard.d.ts +9 -1
- package/dist/types/surfaces/NoticeRow.d.ts +23 -0
- package/dist/types/surfaces/Section.d.ts +74 -0
- package/dist/types/surfaces/index.d.ts +6 -0
- package/dist/types/surfaces/section-messages.d.ts +10 -0
- package/package.json +2 -2
- /package/dist/{tabler-icons-15sezdfp.woff2 → tabler-icons-dafbdda4cb0cdcb2.woff2} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import { type ButtonProps } from "./Button";
|
|
3
|
-
import { type DropdownItem, type DropdownPosition } from "./Dropdown";
|
|
3
|
+
import { type DropdownItem, type DropdownPosition, type DropdownProps } from "./Dropdown";
|
|
4
4
|
export type SplitButtonProps = Omit<ButtonProps, "align"> & {
|
|
5
5
|
/** Actions shown from the secondary menu trigger. */
|
|
6
6
|
items: readonly DropdownItem[];
|
|
@@ -15,6 +15,10 @@ export type SplitButtonProps = Omit<ButtonProps, "align"> & {
|
|
|
15
15
|
menuPosition?: DropdownPosition | (() => DropdownPosition);
|
|
16
16
|
/** Exact width of both menus as a CSS length. Without it the menus size to their entries. */
|
|
17
17
|
menuWidth?: string;
|
|
18
|
+
/** `sheet` opens both menus as a bottom sheet on phones, as `Dropdown` does. Defaults to `menu`. */
|
|
19
|
+
phone?: DropdownProps["phone"];
|
|
20
|
+
/** One quiet sentence below the secondary menu's entries that explains them all, as `Dropdown`'s `note`. */
|
|
21
|
+
menuNote?: string;
|
|
18
22
|
};
|
|
19
23
|
/** One primary button action with a separate menu of related alternatives. */
|
|
20
24
|
export declare function SplitButton(props: SplitButtonProps): JSX.Element;
|
|
@@ -4,8 +4,10 @@ export type ToolbarProps = {
|
|
|
4
4
|
label: string;
|
|
5
5
|
orientation?: "horizontal" | "vertical";
|
|
6
6
|
wrap?: boolean;
|
|
7
|
-
/** `floating` floats the toolbar at
|
|
7
|
+
/** `floating` floats the toolbar at an edge of its column. Defaults to `inline`. */
|
|
8
8
|
variant?: "inline" | "floating";
|
|
9
|
+
/** The edge a floating toolbar sticks to while its column scrolls. Defaults to `bottom`. */
|
|
10
|
+
edge?: "top" | "bottom";
|
|
9
11
|
class?: string;
|
|
10
12
|
};
|
|
11
13
|
export type ToolbarActionProps = {
|
|
@@ -20,6 +22,11 @@ export type ToolbarActionProps = {
|
|
|
20
22
|
keys?: string;
|
|
21
23
|
/** 1 is most important. Larger numbers move first; ties move later DOM actions first. Omit to keep fixed. */
|
|
22
24
|
priority?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Shows the label beside the icon while a floating toolbar has room. When it gets narrow, these labels go first,
|
|
27
|
+
* every action keeps its icon, and only then do actions move into More.
|
|
28
|
+
*/
|
|
29
|
+
text?: boolean;
|
|
23
30
|
disabled?: boolean;
|
|
24
31
|
/** Makes the action a toggle and exposes its state as `aria-pressed`, such as Bold over bold text. */
|
|
25
32
|
pressed?: boolean;
|
|
@@ -47,4 +54,14 @@ type ToolbarComponent = ((props: ToolbarProps) => JSX.Element) & {
|
|
|
47
54
|
/** False where actions are icon-sized, such as SelectionToolbar: no room below the icon for a hint. Package-internal. */
|
|
48
55
|
export declare const ToolbarHintsContext: import("solid-js").Context<boolean>;
|
|
49
56
|
export declare const Toolbar: ToolbarComponent;
|
|
57
|
+
export type ToolbarDockProps = {
|
|
58
|
+
children: JSX.Element;
|
|
59
|
+
class?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* One floating row at the bottom of a column for several floating toolbars: the first sits at the start edge, the last
|
|
63
|
+
* at the end edge, and each moves its own actions into More when the row gets narrow. Content scrolls beneath the row
|
|
64
|
+
* and still ends above it.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ToolbarDock: (props: ToolbarDockProps) => JSX.Element;
|
|
50
67
|
export default Toolbar;
|
|
@@ -29,7 +29,7 @@ export type { SpotlightButtonProps, SpotlightButtonVariant, SpotlightSearchOptio
|
|
|
29
29
|
export { openSpotlightSearch, SpotlightButton, } from "./SpotlightSearch";
|
|
30
30
|
export type { TabOption, TabsItemProps, TabsProps } from "./Tabs";
|
|
31
31
|
export { Tabs } from "./Tabs";
|
|
32
|
-
export type { ToolbarActionProps, ToolbarGroupProps, ToolbarLabelProps, ToolbarProps, ToolbarSeparatorProps } from "./Toolbar";
|
|
33
|
-
export { Toolbar } from "./Toolbar";
|
|
32
|
+
export type { ToolbarActionProps, ToolbarDockProps, ToolbarGroupProps, ToolbarLabelProps, ToolbarProps, ToolbarSeparatorProps, } from "./Toolbar";
|
|
33
|
+
export { Toolbar, ToolbarDock } from "./Toolbar";
|
|
34
34
|
export type { ViewTab, ViewTabsProps } from "./ViewTabs";
|
|
35
35
|
export { ViewTabs } from "./ViewTabs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BarChartOptions } from "../../content/chart-bar";
|
|
2
|
+
/** Bar drawing without the optional dot renderer, for small app-frame preludes. */
|
|
3
|
+
export declare const renderBarBaseSvg: (opts: BarChartOptions & {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
inspect?: boolean;
|
|
7
|
+
}) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BarChartOptions } from "../../content/chart-bar";
|
|
2
|
+
export { fmt } from "./svg-format";
|
|
3
|
+
export declare const tickFormat: (opts: BarChartOptions) => (value: number) => string;
|
|
4
|
+
export declare const dotStyle: (index: number, seriesCount: number) => string;
|
|
5
|
+
/** Estimated width of `text` at `size` pixels in the UI sans font with tabular figures; a little wide on purpose. */
|
|
6
|
+
export declare const chartTextWidth: (text: string, size?: number) => number;
|
|
7
|
+
/** Split a label into at most `lines` lines of `maxPx`; the last line ends with an ellipsis when the label is longer. */
|
|
8
|
+
export declare const wrapLabel: (label: string, maxPx: number, lines: number) => {
|
|
9
|
+
lines: string[];
|
|
10
|
+
truncated: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const headerHeight: (opts: Pick<BarChartOptions, "title" | "subtitle">) => number;
|
|
13
|
+
export declare const renderHeader: (opts: Pick<BarChartOptions, "title" | "subtitle">, width: number) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BarChartOptions } from "../../content/chart-bar";
|
|
2
|
+
/** Drawing stays separate from sizing: Chat loads it on first use, while reserving the frame synchronously. */
|
|
3
|
+
export declare const renderBarChartSvg: (opts: BarChartOptions & {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
inspect?: boolean;
|
|
7
|
+
}) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BarChartOptions, SeriesBarLayout } from "../../content/chart-bar";
|
|
2
|
+
/** Draw prepared series geometry without importing any bar layout or data-only renderer. */
|
|
3
|
+
export declare const renderSeriesBarLayoutSvg: (opts: BarChartOptions & {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
inspect?: boolean;
|
|
7
|
+
}, g: SeriesBarLayout, matrixMarks?: (column: SeriesBarLayout["columns"][number]) => string) => string;
|
|
@@ -31,7 +31,9 @@ export declare function calendarLayout(spec: CalendarHeatmapOptions, size?: {
|
|
|
31
31
|
width: number;
|
|
32
32
|
height: number;
|
|
33
33
|
minWidth: number;
|
|
34
|
+
maxWidth: number;
|
|
34
35
|
firstMonday: number;
|
|
36
|
+
lastDay: number;
|
|
35
37
|
weekStart: number;
|
|
36
38
|
weeks: number;
|
|
37
39
|
min: number;
|
|
@@ -55,3 +57,10 @@ export declare function calendarLayout(spec: CalendarHeatmapOptions, size?: {
|
|
|
55
57
|
};
|
|
56
58
|
export declare function renderCalendarSvg(spec: CalendarHeatmapOptions): string;
|
|
57
59
|
export declare const renderHeatmapSvg: (spec: HeatmapChartOptions) => string;
|
|
60
|
+
/** A calendar viewport reserves the same content height in every request state. */
|
|
61
|
+
export declare function calendarViewportHeight(size: {
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
minWidth: number;
|
|
65
|
+
maxWidth: number;
|
|
66
|
+
}, availableWidth?: string): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type NestedDotOptions = {
|
|
2
|
+
marks?: "bars" | "dots";
|
|
3
|
+
layout?: string;
|
|
4
|
+
data?: {
|
|
5
|
+
value: number | null;
|
|
6
|
+
}[];
|
|
7
|
+
series?: {
|
|
8
|
+
data: (number | null)[];
|
|
9
|
+
}[];
|
|
10
|
+
total?: number;
|
|
11
|
+
dots?: number;
|
|
12
|
+
compare?: {
|
|
13
|
+
label: string;
|
|
14
|
+
data: (number | null)[];
|
|
15
|
+
};
|
|
16
|
+
normalize?: boolean;
|
|
17
|
+
yAxis?: {
|
|
18
|
+
domain?: readonly number[];
|
|
19
|
+
scale?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** One nonnegative subset contract for portable schemas and direct core rendering. */
|
|
23
|
+
export declare function nestedDotOptions(opts: NestedDotOptions, issue?: (message: string) => void): {
|
|
24
|
+
total: number;
|
|
25
|
+
count: number;
|
|
26
|
+
} | undefined;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BarChartOptions, SeriesBarLayout } from "../../content/chart-bar";
|
|
2
|
+
/** Dot marks extend the prepared bar frame; they never import the bar renderer or layout code. */
|
|
3
|
+
export declare function renderDotMatrixLayoutSvg(opts: BarChartOptions & {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
inspect?: boolean;
|
|
7
|
+
}, g: SeriesBarLayout): string;
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
/** Portable chart contracts. This entry never imports Solid or browser APIs. */
|
|
2
|
-
export { type BarChartLayout, type BarChartOptions, barChartLayout, rankedBarLayout,
|
|
2
|
+
export { type BarChartLayout, type BarChartOptions, barChartLayout, rankedBarLayout, type SeriesBarLayout, seriesBarLayout, } from "../../content/chart-bar";
|
|
3
3
|
export { renderStateTimelineSvg, type StateTimelineChartOptions, type StateTimelineDomain, stateTimelineDomain, stateTimelineHeight, } from "../../content/chart-state-timeline";
|
|
4
4
|
export { type ChartTimeAxis } from "../../content/chart-time-axis";
|
|
5
|
+
export { calendarTimeLabel, calendarTimeTicks, chartTimeStep } from "../../content/chart-time-calendar";
|
|
5
6
|
export { type AreaOptions, areaLayout, renderAreaSvg } from "./area";
|
|
7
|
+
export { renderBarBaseSvg } from "./bar-base-render";
|
|
8
|
+
export { renderBarChartSvg } from "./bar-render";
|
|
6
9
|
export * from "./bubble";
|
|
7
10
|
export * from "./calendar";
|
|
11
|
+
export { nestedDotOptions } from "./dot-options";
|
|
12
|
+
export { renderDotMatrixLayoutSvg } from "./dots";
|
|
8
13
|
export { type FunnelLayout, type FunnelOptions, funnelLayout, renderFunnelLayoutSvg, renderFunnelSvg } from "./funnel";
|
|
9
|
-
export {
|
|
14
|
+
export { renderHbarLayoutSvg, renderHbarSvg } from "./hbar";
|
|
15
|
+
export { type HorizontalBarLayout, type HorizontalBarOptions, hbarLayout } from "./hbar-layout";
|
|
10
16
|
export * from "./inspection";
|
|
17
|
+
export { lineBase } from "./line-base";
|
|
18
|
+
export { renderLineDetailsSvg } from "./line-details";
|
|
19
|
+
export { lineDetailsEnabled, lineForecastLayout } from "./line-options";
|
|
11
20
|
export { map } from "./map";
|
|
21
|
+
export { chartSvgWithUiPalette } from "./palette";
|
|
12
22
|
export * from "./pareto";
|
|
13
23
|
export * from "./radar";
|
|
14
24
|
export * from "./render";
|
|
15
25
|
export { chartRenderHeight, preservesAspectRatio } from "./render-size";
|
|
26
|
+
export { renderSankeySvg, type SankeyLink, type SankeyNode, type SankeyOptions, sankeyColor, sankeyLayout } from "./sankey";
|
|
27
|
+
export { sankeyFrame, sankeyGraph, sankeyWidth } from "./sankey-size";
|
|
16
28
|
export * from "./snapshot";
|
|
17
29
|
export { charts } from "./svg";
|
|
18
30
|
export { type AxisOptions, arcPathD, autoBin, type BarItem, bar, barGauge, boxplot, type ChartOptions, chartDatumSvg, computeBoxStats, computeDomain, donut, escapeXml, extendDomainToNice, gauge, heatmap, histogram, type LineStyle, line, linearRegression, linePathD, type MapOptions, type MapPoint, type MapSeries, type MapViewport, type MarkerShape, mapLog, mapRange, markerPath, niceLogTicks, niceStep, normalizePadding, type Padding, type Point, pie, type ReferenceLine, type Series, type SliceItem, scatter, smoothPathD, sparkline, stat, stateTimeline, stepPathD, svgRoot, } from "./svg-renderers";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Existing line renderer, separated so detailed drawing stays behind lazy chart boundaries. */
|
|
2
|
+
import type { ChartTimeAxis, ChartTimeStep } from "../../content/chart-time-calendar";
|
|
3
|
+
import type { LineOptions } from "./svg-renderers";
|
|
4
|
+
/**
|
|
5
|
+
* Render a line chart. Each series becomes a `<path class="stdlib-chart-line">`
|
|
6
|
+
* connecting its points (sorted by `x`). Multi-series charts get distinct
|
|
7
|
+
* `stdlib-chart-series-N` classes.
|
|
8
|
+
*
|
|
9
|
+
* Detailed lines split missing observations into runs and show isolated points.
|
|
10
|
+
* Existing descriptions retain their established filtering and gap behavior. An empty/all-non-finite chart renders
|
|
11
|
+
* an empty-state SVG.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* charts.line({ series: [{ data: [{x:1,y:10},{x:2,y:25},{x:3,y:18}] }] });
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* charts.line({
|
|
18
|
+
* series: [
|
|
19
|
+
* { label: "Revenue", data: [...] },
|
|
20
|
+
* { label: "Costs", data: [...] },
|
|
21
|
+
* ],
|
|
22
|
+
* yAxis: { format: v => `$${v}k` },
|
|
23
|
+
* });
|
|
24
|
+
*/
|
|
25
|
+
export type LineTimeAdapter = {
|
|
26
|
+
chartTimeStep: (span: number, maxTicks: number) => ChartTimeStep;
|
|
27
|
+
chartTimeTicks: (domain: readonly [number, number], zone: string, step: ChartTimeStep) => number[];
|
|
28
|
+
chartTimeLabel: (tick: number, step: ChartTimeStep, axis: ChartTimeAxis) => string;
|
|
29
|
+
};
|
|
30
|
+
export declare const renderLineDetailsSvg: (opts: LineOptions, time: LineTimeAdapter, seriesLabel: (index: number) => string) => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LineOptions } from "./svg";
|
|
2
|
+
/** A dated marker is the resting cursor; otherwise use the latest shared X. */
|
|
3
|
+
export declare const lineLegendX: (opts: Pick<LineOptions, "series" | "marker">) => number;
|
|
4
|
+
/** Validate forecast bounds against the first series, sorted by X. Missing Y values retain their bound position. */
|
|
5
|
+
export declare const lineForecastLayout: (opts: LineOptions) => {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
size?: number;
|
|
9
|
+
errY?: number;
|
|
10
|
+
errYHigh?: number;
|
|
11
|
+
errYLow?: number;
|
|
12
|
+
errX?: number;
|
|
13
|
+
errXHigh?: number;
|
|
14
|
+
errXLow?: number;
|
|
15
|
+
source: import("./svg-common").Point;
|
|
16
|
+
lo: number | undefined;
|
|
17
|
+
hi: number | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
export declare const lineDetailsEnabled: (opts: {
|
|
20
|
+
forecast?: unknown;
|
|
21
|
+
zero?: boolean;
|
|
22
|
+
threshold?: unknown;
|
|
23
|
+
marker?: unknown;
|
|
24
|
+
legendValues?: boolean;
|
|
25
|
+
}) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LineStyle } from "./svg-common";
|
|
2
|
+
export declare const linePathD: (points: ReadonlyArray<{
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}>) => string;
|
|
6
|
+
export declare const smoothPathD: (points: ReadonlyArray<{
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}>) => string;
|
|
10
|
+
export declare const stepPathD: (points: ReadonlyArray<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}>, mode: "before" | "after" | "middle") => string;
|
|
14
|
+
export declare const DEFAULT_LINE_STYLES: readonly LineStyle[];
|
|
15
|
+
/** SVG `stroke-dasharray` values per line style. Empty string = no dasharray. */
|
|
16
|
+
export declare const LINE_DASH_PATTERNS: Record<LineStyle, string>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Use the UI's eight colors in a generated chart SVG, including hosts without chart CSS.
|
|
2
|
+
* Changes only embedded palette defaults and numeric color-variable fallbacks.
|
|
3
|
+
* Geometry, semantic tones, inspection metadata and explicitly chosen colors stay intact.
|
|
4
|
+
*/
|
|
5
|
+
export declare function chartSvgWithUiPalette(svg: string): string;
|
|
@@ -5,6 +5,7 @@ export type ParetoOptions = ChartOptions & {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: number;
|
|
7
7
|
prev: number;
|
|
8
|
+
rest?: boolean;
|
|
8
9
|
}[];
|
|
9
10
|
locale?: string;
|
|
10
11
|
format?: (value: number) => string;
|
|
@@ -32,6 +33,7 @@ export declare function paretoLayout(spec: ParetoOptions, size?: {
|
|
|
32
33
|
label: string;
|
|
33
34
|
value: number;
|
|
34
35
|
prev: number;
|
|
36
|
+
rest?: boolean;
|
|
35
37
|
index: number;
|
|
36
38
|
y: number;
|
|
37
39
|
cumulative: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { renderBarChartSvg } from "../../content/chart-bar";
|
|
2
1
|
import { renderStateTimelineSvg } from "../../content/chart-state-timeline";
|
|
3
2
|
import { renderAreaSvg } from "./area";
|
|
3
|
+
import { renderBarChartSvg } from "./bar-render";
|
|
4
4
|
import { renderBubbleSvg } from "./bubble";
|
|
5
5
|
import { renderHeatmapSvg } from "./calendar";
|
|
6
6
|
import { renderFunnelSvg } from "./funnel";
|
|
@@ -8,6 +8,7 @@ import { renderHbarSvg } from "./hbar";
|
|
|
8
8
|
import { map } from "./map";
|
|
9
9
|
import { renderParetoSvg } from "./pareto";
|
|
10
10
|
import { renderRadarSvg } from "./radar";
|
|
11
|
+
import { renderSankeySvg } from "./sankey";
|
|
11
12
|
import { barGauge, boxplot, donut, gauge, histogram, line, pie, scatter, sparkline, stat } from "./svg-renderers";
|
|
12
13
|
import { renderTreemapSvg } from "./treemap";
|
|
13
14
|
import { renderWaterfallSvg } from "./waterfall";
|
|
@@ -34,6 +35,7 @@ export declare const chartRenderers: {
|
|
|
34
35
|
pareto: typeof renderParetoSvg;
|
|
35
36
|
bubble: typeof renderBubbleSvg;
|
|
36
37
|
radar: typeof renderRadarSvg;
|
|
38
|
+
sankey: typeof renderSankeySvg;
|
|
37
39
|
};
|
|
38
40
|
type Kind = keyof typeof chartRenderers;
|
|
39
41
|
type ChartKinds = {
|
|
@@ -21,7 +21,10 @@ export type ChartDrawingOptions = {
|
|
|
21
21
|
} : {}) & DrawingOptions<Parameters<(typeof chartRenderers)[K]>[0]>;
|
|
22
22
|
}[ChartKind];
|
|
23
23
|
export type ChartRenderOptions = RenderOptions<ChartDrawingOptions>;
|
|
24
|
-
export {
|
|
24
|
+
export { preservesAspectRatio } from "./render-size";
|
|
25
|
+
export declare const chartRenderHeight: (props: ChartRenderOptions, sizing?: {
|
|
26
|
+
contentHeight?: boolean;
|
|
27
|
+
}) => number;
|
|
25
28
|
/** Shared logical SVG renderer; callbacks and browser interaction stay with the Solid host. */
|
|
26
29
|
export declare const renderChartSvg: (props: ChartDrawingOptions, width: number, height: number, mapViewport?: MapViewport, timelineViewport?: StateTimelineDomain, renderLocale?: string) => string;
|
|
27
30
|
export type ChartSize = {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { SankeyNode, SankeyOptions } from "./sankey";
|
|
2
|
+
/** Shared by JSON validation and direct core calls. Kahn's traversal is linear and never recurses. */
|
|
3
|
+
export declare function sankeyGraph(spec: Pick<SankeyOptions, "nodes" | "links">): {
|
|
4
|
+
nodes: {
|
|
5
|
+
index: number;
|
|
6
|
+
stage: number;
|
|
7
|
+
incoming: number;
|
|
8
|
+
outgoing: number;
|
|
9
|
+
value: number;
|
|
10
|
+
edges: number[];
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
tone?: "in" | "out" | "muted" | "blue" | "green" | "amber" | "red" | "violet" | "tax";
|
|
14
|
+
}[];
|
|
15
|
+
ids: Map<string, number>;
|
|
16
|
+
};
|
|
17
|
+
/** Physical flow width is shared by SVG and its scroll hosts. */
|
|
18
|
+
export declare function sankeyWidth(spec: Pick<SankeyOptions, "nodes" | "links">, width?: number): number;
|
|
19
|
+
/** Reserve the exact drawing box without importing the renderer. */
|
|
20
|
+
export declare function sankeyFrame(spec: SankeyOptions, size?: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}): {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
header: {
|
|
27
|
+
svg: string;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
legend: {
|
|
31
|
+
tone: NonNullable<SankeyNode["tone"]>;
|
|
32
|
+
label: string;
|
|
33
|
+
x: number;
|
|
34
|
+
row: number;
|
|
35
|
+
}[];
|
|
36
|
+
top: number;
|
|
37
|
+
bottom: number;
|
|
38
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type ChartOptions } from "./svg";
|
|
2
|
+
export type SankeyNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
tone?: "in" | "out" | "muted" | "blue" | "green" | "amber" | "red" | "violet" | "tax";
|
|
6
|
+
};
|
|
7
|
+
export type SankeyLink = {
|
|
8
|
+
source: string;
|
|
9
|
+
target: string;
|
|
10
|
+
value: number;
|
|
11
|
+
};
|
|
12
|
+
export type SankeyOptions = ChartOptions & {
|
|
13
|
+
nodes: SankeyNode[];
|
|
14
|
+
links: SankeyLink[];
|
|
15
|
+
legend?: {
|
|
16
|
+
tone: NonNullable<SankeyNode["tone"]>;
|
|
17
|
+
label: string;
|
|
18
|
+
}[];
|
|
19
|
+
locale?: string;
|
|
20
|
+
format?: (value: number) => string;
|
|
21
|
+
/** Actual host width, when known; defaults to the logical drawing width. */
|
|
22
|
+
displayWidth?: number;
|
|
23
|
+
};
|
|
24
|
+
export { sankeyFrame, sankeyGraph, sankeyWidth } from "./sankey-size";
|
|
25
|
+
/** A skipped stage has a private slot so a long link cannot pass through another node. */
|
|
26
|
+
export declare function sankeyLayout(spec: SankeyOptions, size?: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
}): {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
nodes: {
|
|
33
|
+
index: number;
|
|
34
|
+
stage: number;
|
|
35
|
+
incoming: number;
|
|
36
|
+
outgoing: number;
|
|
37
|
+
value: number;
|
|
38
|
+
edges: number[];
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
tone?: "in" | "out" | "muted" | "blue" | "green" | "amber" | "red" | "violet" | "tax";
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
height: number;
|
|
45
|
+
showLabel: boolean;
|
|
46
|
+
}[];
|
|
47
|
+
links: {
|
|
48
|
+
source: string;
|
|
49
|
+
target: string;
|
|
50
|
+
value: number;
|
|
51
|
+
index: number;
|
|
52
|
+
sourceNode: {
|
|
53
|
+
index: number;
|
|
54
|
+
stage: number;
|
|
55
|
+
incoming: number;
|
|
56
|
+
outgoing: number;
|
|
57
|
+
value: number;
|
|
58
|
+
edges: number[];
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
tone?: "in" | "out" | "muted" | "blue" | "green" | "amber" | "red" | "violet" | "tax";
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
height: number;
|
|
65
|
+
showLabel: boolean;
|
|
66
|
+
};
|
|
67
|
+
targetNode: {
|
|
68
|
+
index: number;
|
|
69
|
+
stage: number;
|
|
70
|
+
incoming: number;
|
|
71
|
+
outgoing: number;
|
|
72
|
+
value: number;
|
|
73
|
+
edges: number[];
|
|
74
|
+
id: string;
|
|
75
|
+
label: string;
|
|
76
|
+
tone?: "in" | "out" | "muted" | "blue" | "green" | "amber" | "red" | "violet" | "tax";
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
height: number;
|
|
80
|
+
showLabel: boolean;
|
|
81
|
+
};
|
|
82
|
+
y0: number;
|
|
83
|
+
y1: number;
|
|
84
|
+
height: number;
|
|
85
|
+
route: {
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
}[];
|
|
89
|
+
path: string;
|
|
90
|
+
}[];
|
|
91
|
+
nodeWidth: number;
|
|
92
|
+
scale: number;
|
|
93
|
+
header: {
|
|
94
|
+
svg: string;
|
|
95
|
+
height: number;
|
|
96
|
+
};
|
|
97
|
+
legend: {
|
|
98
|
+
tone: NonNullable<SankeyNode["tone"]>;
|
|
99
|
+
label: string;
|
|
100
|
+
x: number;
|
|
101
|
+
row: number;
|
|
102
|
+
}[];
|
|
103
|
+
legendTop: number;
|
|
104
|
+
};
|
|
105
|
+
export declare const sankeyColor: (tone: SankeyNode["tone"]) => string;
|
|
106
|
+
export declare function renderSankeySvg(spec: SankeyOptions): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ChartTimeAxis } from "../../content/chart-time-axis";
|
|
1
2
|
import type { IntentTone } from "../../semantics";
|
|
2
3
|
import type { ChartDatum } from "./types";
|
|
3
4
|
export type Point = {
|
|
@@ -155,9 +156,7 @@ export declare const referenceLineAttributes: (ref: ReferenceLine, label?: boole
|
|
|
155
156
|
export declare const DEFAULT_WIDTH = 400;
|
|
156
157
|
export declare const DEFAULT_HEIGHT = 240;
|
|
157
158
|
export declare const DEFAULT_MARKERS: readonly MarkerShape[];
|
|
158
|
-
export
|
|
159
|
-
/** SVG `stroke-dasharray` values per line style. Empty string = no dasharray. */
|
|
160
|
-
export declare const LINE_DASH_PATTERNS: Record<LineStyle, string>;
|
|
159
|
+
export { DEFAULT_LINE_STYLES, LINE_DASH_PATTERNS } from "./line-paths";
|
|
161
160
|
/** XML-escape a string for safe inclusion in attribute values or text content. */
|
|
162
161
|
export declare const escapeXml: (s: string) => string;
|
|
163
162
|
/** Normalize a `Padding` input (number or partial object) to a full `Padding`. */
|
|
@@ -308,10 +307,6 @@ export declare const svgRoot: (opts: {
|
|
|
308
307
|
className?: string;
|
|
309
308
|
}, body: string) => string;
|
|
310
309
|
/** Format an SVG path `d` attribute for a polyline through `points`. */
|
|
311
|
-
export declare const linePathD: (points: ReadonlyArray<{
|
|
312
|
-
x: number;
|
|
313
|
-
y: number;
|
|
314
|
-
}>) => string;
|
|
315
310
|
/**
|
|
316
311
|
* Format an SVG path `d` for a smooth curve through `points` using cubic
|
|
317
312
|
* Bezier segments with Catmull-Rom-derived vertical control points.
|
|
@@ -322,10 +317,7 @@ export declare const linePathD: (points: ReadonlyArray<{
|
|
|
322
317
|
* thirds, so x progresses linearly and never doubles back when point spacing
|
|
323
318
|
* is uneven.
|
|
324
319
|
*/
|
|
325
|
-
export
|
|
326
|
-
x: number;
|
|
327
|
-
y: number;
|
|
328
|
-
}>) => string;
|
|
320
|
+
export { linePathD, smoothPathD } from "./line-paths";
|
|
329
321
|
/**
|
|
330
322
|
* Build an SVG path `d` attribute for a pie slice (or donut sector).
|
|
331
323
|
*
|
|
@@ -358,12 +350,9 @@ export declare const markerPath: (shape: MarkerShape, cx: number, cy: number, r:
|
|
|
358
350
|
* - `after` — value updates at the data point's x and persists until next x
|
|
359
351
|
* - `middle` — vertical step at the midpoint between consecutive x-values
|
|
360
352
|
*/
|
|
361
|
-
export
|
|
362
|
-
x: number;
|
|
363
|
-
y: number;
|
|
364
|
-
}>, mode: "before" | "after" | "middle") => string;
|
|
353
|
+
export { stepPathD } from "./line-paths";
|
|
365
354
|
/** Format a number for SVG attributes — short, no scientific notation. */
|
|
366
|
-
export
|
|
355
|
+
export { fmt } from "./svg-format";
|
|
367
356
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
368
357
|
export declare const normalizeMinMax: (min: number | undefined, max: number | undefined) => [number, number];
|
|
369
358
|
export declare const formatNumberValue: (value: number, format: ((value: number) => string) | undefined, unit?: string) => string;
|
|
@@ -439,6 +428,24 @@ export type LineOptions = SeriesChartOptions & {
|
|
|
439
428
|
/** Render a translucent confidence band between each point's `errYLow` and
|
|
440
429
|
* `errYHigh`. Points without explicit error fields are skipped. Default false. */
|
|
441
430
|
errorBand?: boolean;
|
|
431
|
+
/** Dashed first-series forecast suffix with optional ordered bounds. */
|
|
432
|
+
forecast?: {
|
|
433
|
+
from: number;
|
|
434
|
+
band?: [number, number][];
|
|
435
|
+
};
|
|
436
|
+
legendValues?: boolean;
|
|
437
|
+
zero?: boolean;
|
|
438
|
+
threshold?: {
|
|
439
|
+
value: number;
|
|
440
|
+
label: string;
|
|
441
|
+
};
|
|
442
|
+
marker?: {
|
|
443
|
+
at: number;
|
|
444
|
+
label: string;
|
|
445
|
+
};
|
|
446
|
+
timeAxis?: ChartTimeAxis;
|
|
447
|
+
maxGap?: number;
|
|
448
|
+
locale?: string;
|
|
442
449
|
};
|
|
443
450
|
export declare const collectSeriesLegend: (opts: {
|
|
444
451
|
series: Series[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fmt: (n: number) => string;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { BarChartOptions,
|
|
2
|
-
export { barGauge } from "./svg-barGauge";
|
|
3
|
-
export { boxplot } from "./svg-boxplot";
|
|
4
|
-
export * from "./svg-common";
|
|
5
|
-
export { gauge } from "./svg-gauge";
|
|
6
|
-
export { heatmap } from "./svg-heatmap";
|
|
7
|
-
export { histogram } from "./svg-histogram";
|
|
8
|
-
export { scatter } from "./svg-scatter";
|
|
1
|
+
import type { BarChartOptions, PieChartOptions, SparklineOptions, StateTimelineOptions, StatOptions } from "./svg-common";
|
|
9
2
|
/**
|
|
10
3
|
* Render a line chart. Each series becomes a `<path class="stdlib-chart-line">`
|
|
11
4
|
* connecting its points (sorted by `x`). Multi-series charts get distinct
|
|
@@ -27,7 +20,14 @@ export { scatter } from "./svg-scatter";
|
|
|
27
20
|
* yAxis: { format: v => `$${v}k` },
|
|
28
21
|
* });
|
|
29
22
|
*/
|
|
30
|
-
export
|
|
23
|
+
export { line } from "./line";
|
|
24
|
+
export { barGauge } from "./svg-barGauge";
|
|
25
|
+
export { boxplot } from "./svg-boxplot";
|
|
26
|
+
export * from "./svg-common";
|
|
27
|
+
export { gauge } from "./svg-gauge";
|
|
28
|
+
export { heatmap } from "./svg-heatmap";
|
|
29
|
+
export { histogram } from "./svg-histogram";
|
|
30
|
+
export { scatter } from "./svg-scatter";
|
|
31
31
|
/**
|
|
32
32
|
* Render a categorical bar chart. The y-domain always includes zero so bars
|
|
33
33
|
* rest on a visible baseline. Negative values produce bars below the zero
|