@yewdiel21/motion-kit 0.14.0 → 0.15.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 +174 -155
- package/bin/motion-kit.mjs +3 -3
- package/dist/auto/index.d.ts +6 -3
- package/dist/auto/index.js +8 -2
- package/dist/auto/index.js.map +1 -1
- package/dist/{chunk-EY4BJKC4.js → chunk-6IRJYXJU.js} +2 -2
- package/dist/{chunk-CU6SXW3E.js → chunk-A6QQCF6V.js} +1309 -310
- package/dist/chunk-A6QQCF6V.js.map +1 -0
- package/dist/chunk-JXRS3OEA.js +3638 -0
- package/dist/chunk-JXRS3OEA.js.map +1 -0
- package/dist/css/components/add-to-cart.css +72 -0
- package/dist/css/components/bidirectional-slider.css +168 -0
- package/dist/css/components/data-table.css +121 -26
- package/dist/css/components/filter-builder.css +10 -15
- package/dist/css/components/heatmap-chart.css +391 -0
- package/dist/css/components/hover-card.css +8 -2
- package/dist/css/components/image-preview.css +90 -2
- package/dist/css/components/json-viewer.css +33 -1
- package/dist/css/components/nav.css +102 -102
- package/dist/css/components/orbit-menu.css +130 -0
- package/dist/css/components/pagination.css +10 -5
- package/dist/css/components/pie-chart.css +390 -0
- package/dist/css/components/pill-button.css +135 -0
- package/dist/css/components/radar-chart.css +370 -0
- package/dist/css/components/radial-chart.css +398 -0
- package/dist/css/components/sankey-chart.css +358 -0
- package/dist/css/components/scroll-island.css +111 -0
- package/dist/css/components/select.css +136 -0
- package/dist/css/components/toolbar.css +122 -0
- package/dist/css/components/tree-view.css +79 -0
- package/dist/css/components/voice-dots.css +70 -0
- package/dist/elements/index.d.ts +180 -7
- package/dist/elements/index.js +287 -6
- package/dist/elements/index.js.map +1 -1
- package/dist/{engine-Cn6IhE3z.d.ts → engine-5zRIssTO.d.ts} +11 -1
- package/dist/index.css +1832 -168
- package/dist/index.d.ts +4 -4
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +117 -11
- package/dist/react/index.js +314 -13
- package/dist/react/index.js.map +1 -1
- package/dist/{reduced-BBUusld6.d.ts → reduced-6X_bns60.d.ts} +1 -1
- package/dist/{reveal-DEvp6U6T.d.ts → reveal-BfyKKsw4.d.ts} +97 -4
- package/dist/store-CA2Qcun_.d.ts +453 -0
- package/package.json +9 -16
- package/registry.json +1096 -948
- package/src/auto/auto-init.ts +6 -0
- package/src/components/add-to-cart/README.md +34 -0
- package/src/components/add-to-cart/add-to-cart.css +71 -0
- package/src/components/add-to-cart/element.ts +20 -0
- package/src/components/add-to-cart/engine.ts +206 -0
- package/src/components/add-to-cart/react.tsx +29 -0
- package/src/components/bidirectional-slider/README.md +46 -0
- package/src/components/bidirectional-slider/bidirectional-slider.css +167 -0
- package/src/components/bidirectional-slider/element.ts +42 -0
- package/src/components/bidirectional-slider/engine.ts +289 -0
- package/src/components/bidirectional-slider/react.tsx +45 -0
- package/src/components/chart/README.md +10 -0
- package/src/components/chart/element.ts +2 -0
- package/src/components/chart/engine.ts +50 -23
- package/src/components/chart/parts.ts +237 -0
- package/src/components/chart/react.tsx +2 -2
- package/src/components/chart/use-chart.ts +55 -0
- package/src/components/data-table/README.md +3 -3
- package/src/components/data-table/data-table.css +121 -26
- package/src/components/data-table/engine.ts +81 -29
- package/src/components/editable-table/engine.ts +67 -11
- package/src/components/filter-builder/engine.ts +33 -2
- package/src/components/filter-builder/filter-builder.css +10 -15
- package/src/components/heatmap-chart/README.md +48 -0
- package/src/components/heatmap-chart/element.ts +21 -0
- package/src/components/heatmap-chart/engine.ts +281 -0
- package/src/components/heatmap-chart/heatmap-chart.css +93 -0
- package/src/components/heatmap-chart/react.tsx +14 -0
- package/src/components/hover-card/engine.ts +30 -1
- package/src/components/hover-card/hover-card.css +8 -2
- package/src/components/image-preview/element.ts +1 -1
- package/src/components/image-preview/engine.ts +95 -15
- package/src/components/image-preview/image-preview.css +90 -2
- package/src/components/image-preview/react.tsx +3 -3
- package/src/components/json-viewer/engine.ts +11 -2
- package/src/components/json-viewer/json-viewer.css +33 -1
- package/src/components/nav/README.md +12 -10
- package/src/components/nav/element.ts +5 -5
- package/src/components/nav/engine.ts +21 -14
- package/src/components/nav/nav.css +102 -102
- package/src/components/nav/react.tsx +4 -4
- package/src/components/orbit-menu/README.md +46 -0
- package/src/components/orbit-menu/element.ts +27 -0
- package/src/components/orbit-menu/engine.ts +179 -0
- package/src/components/orbit-menu/orbit-menu.css +129 -0
- package/src/components/orbit-menu/react.tsx +44 -0
- package/src/components/pagination/README.md +1 -1
- package/src/components/pagination/engine.ts +50 -4
- package/src/components/pagination/pagination.css +10 -5
- package/src/components/pie-chart/README.md +48 -0
- package/src/components/pie-chart/element.ts +30 -0
- package/src/components/pie-chart/engine.ts +283 -0
- package/src/components/pie-chart/pie-chart.css +92 -0
- package/src/components/pie-chart/react.tsx +14 -0
- package/src/components/pill-button/README.md +46 -0
- package/src/components/pill-button/element.ts +16 -0
- package/src/components/pill-button/engine.ts +77 -0
- package/src/components/pill-button/pill-button.css +134 -0
- package/src/components/pill-button/react.tsx +32 -0
- package/src/components/radar-chart/README.md +48 -0
- package/src/components/radar-chart/element.ts +30 -0
- package/src/components/radar-chart/engine.ts +327 -0
- package/src/components/radar-chart/radar-chart.css +72 -0
- package/src/components/radar-chart/react.tsx +14 -0
- package/src/components/radial-chart/README.md +48 -0
- package/src/components/radial-chart/element.ts +30 -0
- package/src/components/radial-chart/engine.ts +290 -0
- package/src/components/radial-chart/radial-chart.css +100 -0
- package/src/components/radial-chart/react.tsx +14 -0
- package/src/components/sankey-chart/README.md +48 -0
- package/src/components/sankey-chart/element.ts +31 -0
- package/src/components/sankey-chart/engine.ts +401 -0
- package/src/components/sankey-chart/react.tsx +14 -0
- package/src/components/sankey-chart/sankey-chart.css +60 -0
- package/src/components/scroll-island/README.md +34 -0
- package/src/components/scroll-island/element.ts +16 -0
- package/src/components/scroll-island/engine.ts +252 -0
- package/src/components/scroll-island/react.tsx +26 -0
- package/src/components/scroll-island/scroll-island.css +110 -0
- package/src/components/select/README.md +34 -0
- package/src/components/select/element.ts +26 -0
- package/src/components/select/engine.ts +267 -0
- package/src/components/select/react.tsx +33 -0
- package/src/components/select/select.css +135 -0
- package/src/components/toolbar/README.md +46 -0
- package/src/components/toolbar/element.ts +30 -0
- package/src/components/toolbar/engine.ts +230 -0
- package/src/components/toolbar/react.tsx +34 -0
- package/src/components/toolbar/toolbar.css +121 -0
- package/src/components/tree-view/element.ts +1 -1
- package/src/components/tree-view/engine.ts +174 -0
- package/src/components/tree-view/react.tsx +7 -3
- package/src/components/tree-view/tree-view.css +79 -0
- package/src/components/voice-dots/README.md +48 -0
- package/src/components/voice-dots/element.ts +45 -0
- package/src/components/voice-dots/engine.ts +243 -0
- package/src/components/voice-dots/react.tsx +52 -0
- package/src/components/voice-dots/voice-dots.css +69 -0
- package/src/elements/index.ts +39 -0
- package/src/index.ts +16 -0
- package/src/motion/liquid.ts +14 -4
- package/src/react/index.ts +14 -1
- package/dist/chunk-6P4P7NU6.js +0 -1401
- package/dist/chunk-6P4P7NU6.js.map +0 -1
- package/dist/chunk-CU6SXW3E.js.map +0 -1
- package/dist/store-DjkTBX7f.d.ts +0 -195
- /package/dist/{chunk-EY4BJKC4.js.map → chunk-6IRJYXJU.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bY as MenuOptions, bX as MenuInstance, bd as DialogOptions, bb as DialogInstance, cv as RevealSpeed } from './reveal-BfyKKsw4.js';
|
|
2
2
|
import { I as Instance } from './types-BkS_raL8.js';
|
|
3
3
|
import { SplitText } from 'gsap/SplitText';
|
|
4
4
|
|
|
@@ -85,7 +85,12 @@ interface PaginationInstance extends Instance {
|
|
|
85
85
|
readonly page: number;
|
|
86
86
|
readonly totalPages: number;
|
|
87
87
|
}
|
|
88
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Renders a bounded window of pages, even when totalPages is very large. A pill
|
|
90
|
+
* ([data-mk-pagination-indicator]) glides under the current page on Melonmind's
|
|
91
|
+
* swing; when the window moves, the numbers that stay slide to their new place
|
|
92
|
+
* and the new ones pop in out of a blur; the arrows press and nudge their way.
|
|
93
|
+
*/
|
|
89
94
|
declare function createPagination(root: HTMLElement | null, options?: PaginationOptions): PaginationInstance;
|
|
90
95
|
|
|
91
96
|
interface HoverCardOptions {
|
|
@@ -107,6 +112,8 @@ interface HoverCardInstance extends Instance {
|
|
|
107
112
|
* The panel stays inside the viewport: it flips to the other side when its own
|
|
108
113
|
* has no room and shifts sideways (--mk-hover-shift) away from the edges, again
|
|
109
114
|
* on scroll and resize. Opened from the keyboard it appears without the entrance.
|
|
115
|
+
* It grows out of the trigger's centre (--mk-hover-origin-x) and, when the
|
|
116
|
+
* pointer leaves, folds back into it (data-mk-closing, .22 s) before hiding.
|
|
110
117
|
*/
|
|
111
118
|
declare function createHoverCard(root: HTMLElement | null, options?: HoverCardOptions): HoverCardInstance;
|
|
112
119
|
|
|
@@ -393,7 +400,11 @@ interface ImagePreviewOptions {
|
|
|
393
400
|
prev?: string;
|
|
394
401
|
next?: string;
|
|
395
402
|
dialog?: string;
|
|
403
|
+
strip?: string;
|
|
404
|
+
picture?: string;
|
|
396
405
|
};
|
|
406
|
+
/** A strip of thumbnails under the picture (default true; hidden on phones and with one picture). */
|
|
407
|
+
strip?: boolean;
|
|
397
408
|
/** Loop from the last picture to the first (default true). */
|
|
398
409
|
loop?: boolean;
|
|
399
410
|
onChange?: (index: number) => void;
|
|
@@ -743,7 +754,7 @@ interface RangeSliderInstance extends Instance {
|
|
|
743
754
|
}
|
|
744
755
|
declare function createRangeSlider(root: HTMLElement | null, options?: RangeSliderOptions): RangeSliderInstance;
|
|
745
756
|
|
|
746
|
-
type ChartType = 'line' | 'area' | 'bar';
|
|
757
|
+
type ChartType = 'line' | 'area' | 'bar' | 'composed';
|
|
747
758
|
interface ChartPoint {
|
|
748
759
|
label: string;
|
|
749
760
|
value: number | null;
|
|
@@ -752,6 +763,10 @@ interface ChartSeries {
|
|
|
752
763
|
name: string;
|
|
753
764
|
/** One value per label; null is a gap (no data). */
|
|
754
765
|
values: Array<number | null>;
|
|
766
|
+
/** Per-series mark in a composed chart (default line). */
|
|
767
|
+
type?: 'line' | 'area' | 'bar';
|
|
768
|
+
/** An area's lower boundary; values is the upper boundary. Nulls leave gaps. */
|
|
769
|
+
lowerValues?: Array<number | null>;
|
|
755
770
|
/** Any CSS colour; default: monochrome for one series, else the --mk-chart-N slot. */
|
|
756
771
|
color?: string;
|
|
757
772
|
/** Lines: an SVG dash pattern, e.g. '5 5' (a pace or goal) or '1 6' (a projection). */
|
|
@@ -1550,6 +1565,12 @@ interface TreeViewOptions {
|
|
|
1550
1565
|
onSelect?: (node: TreeNode) => void;
|
|
1551
1566
|
onCheck?: (checked: string[]) => void;
|
|
1552
1567
|
onExpand?: (node: TreeNode, expanded: boolean) => void;
|
|
1568
|
+
/** Folder and page icons (default false); a node's own `icon` still wins. */
|
|
1569
|
+
icons?: boolean;
|
|
1570
|
+
/** Rows can be dragged into another branch (default false). */
|
|
1571
|
+
draggable?: boolean;
|
|
1572
|
+
/** A node was dropped into a branch (the tree has moved it). */
|
|
1573
|
+
onMove?: (node: TreeNode, into: TreeNode) => void;
|
|
1553
1574
|
}
|
|
1554
1575
|
interface TreeViewInstance extends Instance {
|
|
1555
1576
|
expand(id: string, animate?: boolean): void;
|
|
@@ -1570,7 +1591,6 @@ interface TreeViewInstance extends Instance {
|
|
|
1570
1591
|
/** The tree element (role="tree"). */
|
|
1571
1592
|
readonly element: HTMLElement;
|
|
1572
1593
|
}
|
|
1573
|
-
|
|
1574
1594
|
declare function createTreeView(root: HTMLElement | null, options?: TreeViewOptions): TreeViewInstance;
|
|
1575
1595
|
|
|
1576
1596
|
interface FileEntry {
|
|
@@ -2020,6 +2040,79 @@ interface RichTextEditorInstance extends Instance {
|
|
|
2020
2040
|
declare function sanitizeHtml(html: string): string;
|
|
2021
2041
|
declare function createRichTextEditor(root: HTMLElement | null, options?: RichTextEditorOptions): RichTextEditorInstance;
|
|
2022
2042
|
|
|
2043
|
+
interface SelectOption {
|
|
2044
|
+
value: string;
|
|
2045
|
+
label: string;
|
|
2046
|
+
disabled?: boolean;
|
|
2047
|
+
/** A heading the option sits under (an <optgroup>). */
|
|
2048
|
+
group?: string;
|
|
2049
|
+
}
|
|
2050
|
+
interface SelectOptions {
|
|
2051
|
+
/** The choices; without them, the authored <select> gives them. */
|
|
2052
|
+
options?: SelectOption[];
|
|
2053
|
+
value?: string;
|
|
2054
|
+
/** Form name of the select it builds (an authored one keeps its own). */
|
|
2055
|
+
name?: string;
|
|
2056
|
+
/** Accessible name; the button reads "<label>: <chosen>". */
|
|
2057
|
+
label?: string;
|
|
2058
|
+
/** Text while nothing is chosen (default: the empty option's text, else 'Elige…'). */
|
|
2059
|
+
placeholder?: string;
|
|
2060
|
+
disabled?: boolean;
|
|
2061
|
+
onChange?: (value: string) => void;
|
|
2062
|
+
}
|
|
2063
|
+
interface SelectInstance extends Instance {
|
|
2064
|
+
setValue(value: string, notify?: boolean): void;
|
|
2065
|
+
setOptions(options: SelectOption[]): void;
|
|
2066
|
+
/** Read the select's options again (changes to them are also noticed on their own). */
|
|
2067
|
+
refresh(): void;
|
|
2068
|
+
open(): void;
|
|
2069
|
+
close(): void;
|
|
2070
|
+
readonly value: string;
|
|
2071
|
+
}
|
|
2072
|
+
declare function createSelect(root: HTMLElement | null, options?: SelectOptions): SelectInstance;
|
|
2073
|
+
|
|
2074
|
+
interface AddToCartOptions {
|
|
2075
|
+
/** Where the box goes: an element, a selector, or (default) the first visible [data-mk-cart-target]. */
|
|
2076
|
+
target?: HTMLElement | string;
|
|
2077
|
+
/** The picture packed: an element, a selector, or (default) the [data-mk-cart-image] of the [data-mk-cart-item] around the button. */
|
|
2078
|
+
image?: HTMLElement | string;
|
|
2079
|
+
/** Items each click adds (default 1). */
|
|
2080
|
+
quantity?: number;
|
|
2081
|
+
/** The cart's count to start from (default: the number in the target's [data-mk-cart-count], else 0). */
|
|
2082
|
+
count?: number;
|
|
2083
|
+
/** Announced after a box lands (default 'Añadido al carrito'). */
|
|
2084
|
+
label?: string;
|
|
2085
|
+
/** A click: the new count (right away). */
|
|
2086
|
+
onAdd?: (count: number) => void;
|
|
2087
|
+
/** A box landed in the cart. */
|
|
2088
|
+
onLand?: (count: number) => void;
|
|
2089
|
+
}
|
|
2090
|
+
interface AddToCartInstance extends Instance {
|
|
2091
|
+
/** Send a box, as a click does. */
|
|
2092
|
+
add(): void;
|
|
2093
|
+
setCount(count: number): void;
|
|
2094
|
+
readonly count: number;
|
|
2095
|
+
}
|
|
2096
|
+
declare function createAddToCart(root: HTMLElement | null, options?: AddToCartOptions): AddToCartInstance;
|
|
2097
|
+
|
|
2098
|
+
interface ScrollIslandOptions {
|
|
2099
|
+
/** Headings that name the sections (default 'h2, h3'); false: only the percentage. */
|
|
2100
|
+
sections?: string | false;
|
|
2101
|
+
/** How near the edge, in px, the pointer turns the bar into the island (default 56). */
|
|
2102
|
+
reach?: number;
|
|
2103
|
+
/** ms the bar stays after scrolling stops (default 900). */
|
|
2104
|
+
idle?: number;
|
|
2105
|
+
/** Follow the page's scroll (default: when the root is <html> or <body>). */
|
|
2106
|
+
page?: boolean;
|
|
2107
|
+
/** The current section changed (its heading's text, or null before the first). */
|
|
2108
|
+
onSection?: (section: string | null) => void;
|
|
2109
|
+
}
|
|
2110
|
+
interface ScrollIslandInstance extends Instance {
|
|
2111
|
+
/** Measure again (after the content changed size). */
|
|
2112
|
+
refresh(): void;
|
|
2113
|
+
}
|
|
2114
|
+
declare function createScrollIsland(root: HTMLElement | null, options?: ScrollIslandOptions): ScrollIslandInstance;
|
|
2115
|
+
|
|
2023
2116
|
/**
|
|
2024
2117
|
* Every duration in one place (seconds, like GSAP, unless the name says
|
|
2025
2118
|
* ms). Recipes and components take their defaults from here, so a timing is
|
|
@@ -2378,4 +2471,4 @@ interface RevealHandle {
|
|
|
2378
2471
|
}
|
|
2379
2472
|
declare function revealFrom(target: HTMLElement, options?: RevealOptions): RevealHandle | null;
|
|
2380
2473
|
|
|
2381
|
-
export { createRichTextEditor as $, createColorArea as A, createColorField as B, createColorPicker as C, createTimeField as D, createRangeCalendar as E, createDateRangePicker as F, createTooltip as G, createPopover as H, createLoadingButton as I, createBreadcrumb as J, createEmptyState as K, createStatCard as L, createChartTooltip as M, createMultiSelect as N, createTagInput as O, createDateTimePicker as P, createFilterBuilder as Q, createTimeline as R, createActivityFeed as S, createTreeView as T, createFileExplorer as U, createJsonViewer as V, createVirtualList as W, createResizablePanel as X, createSplitView as Y, createDataTable as Z, createEditableTable as _, createTrailer as a, type
|
|
2474
|
+
export { createRichTextEditor as $, createColorArea as A, createColorField as B, createColorPicker as C, createTimeField as D, createRangeCalendar as E, createDateRangePicker as F, createTooltip as G, createPopover as H, createLoadingButton as I, createBreadcrumb as J, createEmptyState as K, createStatCard as L, createChartTooltip as M, createMultiSelect as N, createTagInput as O, createDateTimePicker as P, createFilterBuilder as Q, createTimeline as R, createActivityFeed as S, createTreeView as T, createFileExplorer as U, createJsonViewer as V, createVirtualList as W, createResizablePanel as X, createSplitView as Y, createDataTable as Z, createEditableTable as _, createTrailer as a, type DataAction as a$, createSelect as a0, createAddToCart as a1, createScrollIsland as a2, type RevealHandle as a3, type DateInput as a4, type ActivityActor as a5, type ActivityFeedInstance as a6, type ActivityFeedOptions as a7, type ActivityItem as a8, type ActivityKind as a9, type ChartTooltipInstance as aA, type ChartTooltipOptions as aB, type ChartTooltipSeries as aC, type ChartType as aD, type CheckState as aE, type CodeBlockInstance as aF, type CodeBlockOptions as aG, type ColorAreaInstance as aH, type ColorAreaOptions as aI, type ColorChannel as aJ, type ColorFieldInstance as aK, type ColorFieldOptions as aL, type ColorFormat as aM, type ColorPickerInstance as aN, type ColorPickerOptions as aO, type ColorSliderInstance as aP, type ColorSliderOptions as aQ, type CommandItem as aR, type CommandSearchInstance as aS, type CommandSearchOptions as aT, type ContextMenuInstance as aU, type ContextMenuOptions as aV, type CreditCardField as aW, type CreditCardInstance as aX, type CreditCardLabels as aY, type CreditCardOptions as aZ, type CreditCardValues as a_, type AddToCartInstance as aa, type AddToCartOptions as ab, type AttachmentFile as ac, type AttachmentInstance as ad, type AttachmentLabels as ae, type AttachmentOptions as af, type AttachmentRejectCode as ag, type AttachmentRejection as ah, type AttachmentStatus as ai, BRAND_LABELS as aj, type BreadcrumbInstance as ak, type BreadcrumbItem as al, type BreadcrumbOptions as am, CHANNEL_LABELS as an, type CalendarEvent as ao, type CalendarEventStatus as ap, type CalendarInstance as aq, type CalendarLabels as ar, type CalendarOptions as as, type CalendarRange as at, type CalendarView as au, type CardBrand as av, type ChartInstance as aw, type ChartOptions as ax, type ChartPoint as ay, type ChartSeries as az, createQuantity as b, type MultiSelectOptions as b$, type DataColumn as b0, type DataColumnType as b1, type DataRow as b2, type DataSort as b3, type DataTableInstance as b4, type DataTableOptions as b5, type DateRange as b6, type DateRangePickerInstance as b7, type DateRangePickerOptions as b8, type DateTimePickerInstance as b9, type FilterGroup as bA, type FilterNode as bB, type FilterRule as bC, type FilterValue as bD, type HoldConfirmInstance as bE, type HoldConfirmOptions as bF, type HoverCardInstance as bG, type HoverCardOptions as bH, type Hsla as bI, type Hsva as bJ, type ImagePreviewInstance as bK, type ImagePreviewOptions as bL, type InputOtpInstance as bM, type InputOtpOptions as bN, type JsonType as bO, type JsonViewerInstance as bP, type JsonViewerOptions as bQ, type LinkPreviewInstance as bR, type LinkPreviewOptions as bS, type LinkPreviewVariant as bT, type LoadingButtonInstance as bU, type LoadingButtonOptions as bV, type LoadingState as bW, type MenuInstance as bX, type MenuOptions as bY, type MultiSelectInstance as bZ, type MultiSelectOption as b_, type DateTimePickerOptions as ba, type DialogInstance as bb, type DialogLabels as bc, type DialogOptions as bd, type DialogPlacement as be, type DialogVariant as bf, type EditableColumn as bg, type EditableTableInstance as bh, type EditableTableOptions as bi, type EditorKind as bj, type EmptyAction as bk, type EmptyIllustration as bl, type EmptyStateInstance as bm, type EmptyStateOptions as bn, type Expiry as bo, type FileChange as bp, type FileEntry as bq, type FileExplorerInstance as br, type FileExplorerOptions as bs, type FileFamily as bt, type FileSort as bu, type FileView as bv, type FilterBuilderInstance as bw, type FilterBuilderOptions as bx, type FilterField as by, type FilterFieldType as bz, createStudioDock as c, type StatCardOptions as c$, type NotificationBellInstance as c0, type NotificationBellOptions as c1, OPERATORS as c2, type PaginationInstance as c3, type PaginationOptions as c4, type PanelOrientation as c5, type PasswordChecks as c6, type PasswordScore as c7, type PasswordStrengthInstance as c8, type PasswordStrengthOptions as c9, type RowChange as cA, type RowId as cB, STRENGTH_LABELS as cC, type ScratchCardInstance as cD, type ScratchCardOptions as cE, type ScrollIslandInstance as cF, type ScrollIslandOptions as cG, type SelectInstance as cH, type SelectOption as cI, type SelectOptions as cJ, type Side as cK, type SkeletonAnimation as cL, type SkeletonInstance as cM, type SkeletonOptions as cN, type SkeletonShape as cO, type SlotPickerInstance as cP, type SlotPickerLabels as cQ, type SlotPickerOptions as cR, type SlotSource as cS, type SlotValue as cT, type SortDirection as cU, type SplitSide as cV, type SplitViewInstance as cW, type SplitViewOptions as cX, type StarRatingInstance as cY, type StarRatingOptions as cZ, type StatCardInstance as c_, type Placed as ca, type Placement as cb, type PopoverInstance as cc, type PopoverOptions as cd, type ProgressInstance as ce, type ProgressOptions as cf, type ProgressVariant as cg, type QuantityInstance as ch, type QuantityOptions as ci, type QuestionnaireAnswers as cj, type QuestionnaireInstance as ck, type QuestionnaireLabels as cl, type QuestionnaireOptions as cm, type RangeCalendarInstance as cn, type RangeCalendarOptions as co, type RangeSliderInstance as cp, type RangeSliderOptions as cq, type RangeValue as cr, type ResizablePanelInstance as cs, type ResizablePanelOptions as ct, type RevealOptions as cu, type RevealSpeed as cv, type Rgba as cw, type RichCommand as cx, type RichTextEditorInstance as cy, type RichTextEditorOptions as cz, createPagination as d, rangeKeys as d$, type StudioDockInstance as d0, type StudioDockOptions as d1, type StudioDockState as d2, type StudioDockView as d3, TIMING as d4, type TagInputInstance as d5, type TagInputOptions as d6, type TimeFieldInstance as d7, type TimeFieldOptions as d8, type TimeInput as d9, createSizes as dA, cvcLength as dB, dateTimeKey as dC, dayKey as dD, dayLabel as dE, describeAccept as dF, describeFilter as dG, detectBrand as dH, emptyFilter as dI, fileFamily as dJ, findNode as dK, formatBytes as dL, formatColor as dM, formatNumber as dN, formatSize as dO, getChannel as dP, hasConditions as dQ, hsvToRgb as dR, jsonPath as dS, linkDomain as dT, luhn as dU, luminance as dV, matchesFilter as dW, normaliseSizes as dX, parseColor as dY, parseExpiry as dZ, place as d_, type TimelineEvent as da, type TimelineInstance as db, type TimelineOptions as dc, type TimelineStatus as dd, type TooltipInstance as de, type TooltipOptions as df, type TrailerInstance as dg, type TrailerOptions as dh, type TreeNode as di, type TreeViewInstance as dj, type TreeViewOptions as dk, type VirtualKey as dl, type VirtualListInstance as dm, type VirtualListOptions as dn, type VirtualRange as dp, type VirtualScrollOptions as dq, type VirtualSizes as dr, acceptsFile as ds, bandDuration as dt, cardLength as du, channelText as dv, checkStates as dw, codeLines as dx, createDialog as dy, createMenu as dz, createHoverCard as e, rangeLength as e0, readAnswers as e1, relativeTime as e2, revealFrom as e3, rgbToHsv as e4, safeHref as e5, safeImage as e6, sanitizeHtml as e7, scorePassword as e8, searchTree as e9, setChannel as ea, skeletonBones as eb, sortEntries as ec, toDate as ed, toDateTimeValue as ee, toHex as ef, toHsva as eg, toRange as eh, toggleCheck as ei, createInputOtp as f, createCalendar as g, createSlotPicker as h, createCreditCard as i, createCommandSearch as j, createHoldConfirm as k, createImagePreview as l, createNotificationBell as m, createPasswordStrength as n, createScratchCard as o, createStarRating as p, createAttachment as q, createSkeleton as r, createQuestionnaire as s, createCodeBlock as t, createContextMenu as u, createLinkPreview as v, createProgress as w, createRangeSlider as x, createChart as y, createColorSlider as z };
|
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import { I as Instance } from './types-BkS_raL8.js';
|
|
2
|
+
import { Flip } from 'gsap/Flip';
|
|
3
|
+
import { a3 as RevealHandle, a4 as DateInput } from './reveal-BfyKKsw4.js';
|
|
4
|
+
|
|
5
|
+
interface ThemePickerOptions {
|
|
6
|
+
/** Theme ids to show, in order. Default: visible presets, or all with showHidden. */
|
|
7
|
+
themes?: string[];
|
|
8
|
+
showHidden?: boolean;
|
|
9
|
+
labels?: {
|
|
10
|
+
group?: string;
|
|
11
|
+
};
|
|
12
|
+
onChange?: (id: string) => void;
|
|
13
|
+
}
|
|
14
|
+
interface ThemePickerInstance extends Instance {
|
|
15
|
+
select(id: string): void;
|
|
16
|
+
}
|
|
17
|
+
declare function createThemePicker(root: HTMLElement | null, options?: ThemePickerOptions): ThemePickerInstance;
|
|
18
|
+
|
|
19
|
+
interface ToasterLabels {
|
|
20
|
+
dismiss?: string;
|
|
21
|
+
}
|
|
22
|
+
interface ToasterOptions {
|
|
23
|
+
labels?: ToasterLabels;
|
|
24
|
+
}
|
|
25
|
+
type ToasterInstance = Instance;
|
|
26
|
+
/** Render the toast list into `host` (a fixed layer at the top of the screen). */
|
|
27
|
+
declare function createToaster(host: HTMLElement | null, options?: ToasterOptions): ToasterInstance;
|
|
28
|
+
|
|
29
|
+
type ChatRole = 'user' | 'assistant' | 'system';
|
|
30
|
+
interface ChatLabels {
|
|
31
|
+
thinking?: string;
|
|
32
|
+
}
|
|
33
|
+
interface ChatOptions {
|
|
34
|
+
/** Animate the messages already there when the chat starts (default: no, history stays still). */
|
|
35
|
+
animateExisting?: boolean;
|
|
36
|
+
/** Clear the input after sending (default). */
|
|
37
|
+
clearOnSend?: boolean;
|
|
38
|
+
labels?: ChatLabels;
|
|
39
|
+
onSend?: (text: string) => void;
|
|
40
|
+
}
|
|
41
|
+
interface ChatInstance extends Instance {
|
|
42
|
+
/** Append a plain-text message (vanilla convenience); it enters on its own. */
|
|
43
|
+
add(role: ChatRole, text: string): HTMLElement;
|
|
44
|
+
/** Show the thinking placeholder after 500 ms (a fast answer never shows it). */
|
|
45
|
+
pending(): void;
|
|
46
|
+
/** Add the answer: it morphs out of the placeholder if that was showing, else it enters. */
|
|
47
|
+
reply(message: HTMLElement | string): HTMLElement;
|
|
48
|
+
/** A confirmation bar flows in and its words rise. */
|
|
49
|
+
confirm(bar: HTMLElement): void;
|
|
50
|
+
setRecording(on: boolean): void;
|
|
51
|
+
scrollToLatest(): void;
|
|
52
|
+
/** Mark a message as already shown (a framework animates it itself). */
|
|
53
|
+
adopt(message: Element): void;
|
|
54
|
+
readonly messages: HTMLElement;
|
|
55
|
+
}
|
|
56
|
+
/** data-flip-id of the thinking placeholder; a framework's own placeholder must carry it. */
|
|
57
|
+
declare const PENDING_ID = "mk-chat-pending";
|
|
58
|
+
/** The thinking placeholder's geometry, taken before the DOM changes (for frameworks). */
|
|
59
|
+
declare const capturePending: (placeholder: Element | null) => Flip.FlipState | null;
|
|
60
|
+
/** Morph a captured placeholder into the reply (after the DOM shows the reply). */
|
|
61
|
+
declare function morphPendingToReply(state: ReturnType<typeof Flip.getState> | null, reply: HTMLElement, scroller?: HTMLElement | null): gsap.core.Timeline | null;
|
|
62
|
+
/** A message bubble element (plain text). */
|
|
63
|
+
declare function chatMessage(role: ChatRole, text: string): HTMLDivElement;
|
|
64
|
+
declare function createChat(root: HTMLElement | null, options?: ChatOptions): ChatInstance;
|
|
65
|
+
|
|
66
|
+
declare const NAV_STYLES: readonly ["sidebar", "pills", "dock", "card", "rail", "wash", "magnify"];
|
|
67
|
+
type NavStyle = (typeof NAV_STYLES)[number];
|
|
68
|
+
/** The names before 0.15, still accepted: each turns into the style it always was. */
|
|
69
|
+
declare const NAV_STYLE_ALIASES: {
|
|
70
|
+
readonly clasica: "sidebar";
|
|
71
|
+
readonly bonita: "pills";
|
|
72
|
+
readonly guapa: "card";
|
|
73
|
+
readonly tasks: "rail";
|
|
74
|
+
readonly melon: "wash";
|
|
75
|
+
readonly tunnel: "magnify";
|
|
76
|
+
};
|
|
77
|
+
type NavStyleAlias = keyof typeof NAV_STYLE_ALIASES;
|
|
78
|
+
/** A style name (new or old) as one of NAV_STYLES, or undefined. */
|
|
79
|
+
declare const toNavStyle: (value: unknown) => NavStyle | undefined;
|
|
80
|
+
interface NavOptions {
|
|
81
|
+
/** Default: the saved one (storageKey), else the mk-nav--<style> class in the markup, else 'pills'. Old names (clasica…) work too. */
|
|
82
|
+
style?: NavStyle | NavStyleAlias;
|
|
83
|
+
/** The accent variant: the current page in primary-container. */
|
|
84
|
+
accent?: boolean;
|
|
85
|
+
/** Reveal the shell from the first button when the nav starts (off by default). */
|
|
86
|
+
reveal?: boolean;
|
|
87
|
+
/** Remember the chosen style in localStorage under this key. */
|
|
88
|
+
storageKey?: string;
|
|
89
|
+
labels?: {
|
|
90
|
+
nav?: string;
|
|
91
|
+
};
|
|
92
|
+
onSelect?: (index: number, value: string | undefined, item: HTMLElement) => void;
|
|
93
|
+
}
|
|
94
|
+
interface NavInstance extends Instance {
|
|
95
|
+
/** Mark a page as current, by index or value (silent: no event). */
|
|
96
|
+
select(target: number | string): void;
|
|
97
|
+
setStyle(style: NavStyle | NavStyleAlias): void;
|
|
98
|
+
setAccent(on: boolean): void;
|
|
99
|
+
readonly index: number;
|
|
100
|
+
readonly style: NavStyle;
|
|
101
|
+
readonly items: HTMLElement[];
|
|
102
|
+
}
|
|
103
|
+
interface NavigateDetail {
|
|
104
|
+
index: number;
|
|
105
|
+
value: string | undefined;
|
|
106
|
+
item: HTMLElement;
|
|
107
|
+
/** The click: call its preventDefault() to stop a link (single-page apps). */
|
|
108
|
+
originalEvent: MouseEvent;
|
|
109
|
+
}
|
|
110
|
+
/** nav entrance: the app shell is uncovered from the nav's first button. */
|
|
111
|
+
declare function revealShell(nav: HTMLElement): RevealHandle | null;
|
|
112
|
+
declare function createNav(root: HTMLElement | null, options?: NavOptions): NavInstance;
|
|
113
|
+
|
|
114
|
+
type CursorVariant = 'chip' | 'dot';
|
|
115
|
+
interface CursorOptions {
|
|
116
|
+
variant?: CursorVariant;
|
|
117
|
+
/** Where it works. chip: the document; dot: the host's parent. */
|
|
118
|
+
zone?: Element | null;
|
|
119
|
+
/** dot: the word when nothing under the pointer gives one. */
|
|
120
|
+
text?: string;
|
|
121
|
+
/** dot: arrows shown while pressed. */
|
|
122
|
+
arrows?: 'x' | 'y' | 'none';
|
|
123
|
+
}
|
|
124
|
+
interface CursorInstance extends Instance {
|
|
125
|
+
readonly visible: boolean;
|
|
126
|
+
readonly label: string;
|
|
127
|
+
readonly position: {
|
|
128
|
+
x: number;
|
|
129
|
+
y: number;
|
|
130
|
+
};
|
|
131
|
+
readonly tone: 'light' | 'dark';
|
|
132
|
+
/** One frame (dt = 1 at 60 Hz); the shared ticker calls it. */
|
|
133
|
+
update(dt?: number): void;
|
|
134
|
+
}
|
|
135
|
+
declare function createCursor(host: HTMLElement | null, options?: CursorOptions): CursorInstance;
|
|
136
|
+
|
|
137
|
+
interface IslandOptions {
|
|
138
|
+
/** Drop in from above on load (true), wait for ready() ('manual') or not at all. */
|
|
139
|
+
entrance?: boolean | 'manual';
|
|
140
|
+
/** Close when the page scrolls after a wheel or touch. */
|
|
141
|
+
closeOnScroll?: boolean;
|
|
142
|
+
/** Close when a link inside a panel is followed. */
|
|
143
|
+
closeOnNavigate?: boolean;
|
|
144
|
+
/** Focus the first control of the panel that opens. */
|
|
145
|
+
focusOnOpen?: boolean;
|
|
146
|
+
/** The open panel's name, or null when it closes. */
|
|
147
|
+
onChange?: (active: string | null) => void;
|
|
148
|
+
}
|
|
149
|
+
interface IslandInstance extends Instance {
|
|
150
|
+
open(name?: string): void;
|
|
151
|
+
close(returnFocus?: boolean): void;
|
|
152
|
+
toggle(name?: string): void;
|
|
153
|
+
/** Play the entrance (entrance: 'manual'). */
|
|
154
|
+
ready(): void;
|
|
155
|
+
readonly active: string | null;
|
|
156
|
+
}
|
|
157
|
+
declare function createIsland(root: HTMLElement | null, options?: IslandOptions): IslandInstance;
|
|
158
|
+
|
|
159
|
+
interface ToolbarOptions {
|
|
160
|
+
/** The chosen tool (its data-mk-tool, else its position); default: the first one. */
|
|
161
|
+
value?: string;
|
|
162
|
+
/** Default 'vertical'. */
|
|
163
|
+
orientation?: 'vertical' | 'horizontal';
|
|
164
|
+
/** The label beside the tool under the pointer or focus (default true). */
|
|
165
|
+
tips?: boolean;
|
|
166
|
+
onChange?: (value: string) => void;
|
|
167
|
+
}
|
|
168
|
+
interface ToolbarInstance extends Instance {
|
|
169
|
+
setValue(value: string, notify?: boolean): void;
|
|
170
|
+
readonly value: string;
|
|
171
|
+
}
|
|
172
|
+
declare function createToolbar(root: HTMLElement | null, options?: ToolbarOptions): ToolbarInstance;
|
|
173
|
+
|
|
174
|
+
interface BidirectionalSliderOptions {
|
|
175
|
+
/** Default −100. */
|
|
176
|
+
min?: number;
|
|
177
|
+
/** Default 100. */
|
|
178
|
+
max?: number;
|
|
179
|
+
/** Where the fill starts (default 0, kept inside min…max). */
|
|
180
|
+
origin?: number;
|
|
181
|
+
step?: number;
|
|
182
|
+
value?: number;
|
|
183
|
+
disabled?: boolean;
|
|
184
|
+
name?: string;
|
|
185
|
+
/** Accessible name of the input. */
|
|
186
|
+
label?: string;
|
|
187
|
+
/** The end icons: − and + (default), the speaker, or none. */
|
|
188
|
+
icons?: 'signs' | 'volume' | false;
|
|
189
|
+
/** Text for the bubble and aria-valuetext (default: signed, "+24", "−12"). */
|
|
190
|
+
formatValue?: (value: number) => string;
|
|
191
|
+
onInput?: (value: number) => void;
|
|
192
|
+
onChange?: (value: number) => void;
|
|
193
|
+
}
|
|
194
|
+
interface BidirectionalSliderInstance extends Instance {
|
|
195
|
+
setValue(value: number, notify?: boolean): void;
|
|
196
|
+
/** Back to the origin. */
|
|
197
|
+
reset(notify?: boolean): void;
|
|
198
|
+
readonly value: number;
|
|
199
|
+
}
|
|
200
|
+
declare function createBidirectionalSlider(root: HTMLElement | null, options?: BidirectionalSliderOptions): BidirectionalSliderInstance;
|
|
201
|
+
|
|
202
|
+
type VoiceState = 'idle' | 'listening' | 'thinking' | 'speaking';
|
|
203
|
+
interface VoiceDotsOptions {
|
|
204
|
+
/** Default 'idle'. */
|
|
205
|
+
state?: VoiceState;
|
|
206
|
+
/** Dots (default 4, 3…6). */
|
|
207
|
+
count?: number;
|
|
208
|
+
/** The chart colours instead of the text colour. */
|
|
209
|
+
colorful?: boolean;
|
|
210
|
+
/** Dot size in px (default 12). */
|
|
211
|
+
size?: number;
|
|
212
|
+
/** The status text for each state. */
|
|
213
|
+
labels?: Partial<Record<VoiceState, string>>;
|
|
214
|
+
}
|
|
215
|
+
interface VoiceDotsInstance extends Instance {
|
|
216
|
+
setState(state: VoiceState): void;
|
|
217
|
+
readonly state: VoiceState;
|
|
218
|
+
/** The voice's level, 0…1: one for all dots or one per dot (from your own analysis). */
|
|
219
|
+
setLevel(level: number | number[]): void;
|
|
220
|
+
/** Follow a microphone stream or a playing <audio>/<video>; resolves to a function that stops following. */
|
|
221
|
+
listen(source: MediaStream | HTMLMediaElement): Promise<() => void>;
|
|
222
|
+
/** Stop following the audio (the state stays). */
|
|
223
|
+
stop(): void;
|
|
224
|
+
}
|
|
225
|
+
declare function createVoiceDots(root: HTMLElement | null, options?: VoiceDotsOptions): VoiceDotsInstance;
|
|
226
|
+
|
|
227
|
+
interface PieSlice {
|
|
228
|
+
label: string;
|
|
229
|
+
value: number;
|
|
230
|
+
color?: string;
|
|
231
|
+
}
|
|
232
|
+
interface PieChartOptions {
|
|
233
|
+
data?: PieSlice[];
|
|
234
|
+
/** Hole size as a share of the radius: 0 is a pie (default 0.62). */
|
|
235
|
+
donut?: number;
|
|
236
|
+
/** Degrees of surface between slices (default 1.5). */
|
|
237
|
+
gap?: number;
|
|
238
|
+
/** Diameter in px (default 240; it shrinks with its container). */
|
|
239
|
+
size?: number;
|
|
240
|
+
/** Accessible name (and table caption). */
|
|
241
|
+
label?: string;
|
|
242
|
+
/** The donut's middle when nothing is chosen (default 'Total'). */
|
|
243
|
+
totalLabel?: string;
|
|
244
|
+
legend?: boolean;
|
|
245
|
+
formatValue?: (value: number) => string;
|
|
246
|
+
emptyLabel?: string;
|
|
247
|
+
onSelect?: (index: number | null) => void;
|
|
248
|
+
}
|
|
249
|
+
interface PieChartInstance extends Instance {
|
|
250
|
+
update(options: PieChartOptions): void;
|
|
251
|
+
select(index: number | null): void;
|
|
252
|
+
readonly selected: number | null;
|
|
253
|
+
}
|
|
254
|
+
declare function createPieChart(root: HTMLElement | null, initial?: PieChartOptions): PieChartInstance;
|
|
255
|
+
|
|
256
|
+
interface RadarSeries {
|
|
257
|
+
name: string;
|
|
258
|
+
values: Array<number | null>;
|
|
259
|
+
color?: string;
|
|
260
|
+
}
|
|
261
|
+
interface RadarChartOptions {
|
|
262
|
+
/** The measures, clockwise from the top. */
|
|
263
|
+
axes?: string[];
|
|
264
|
+
series?: RadarSeries[];
|
|
265
|
+
/** The outer ring's value (default: the largest value, rounded up). */
|
|
266
|
+
max?: number;
|
|
267
|
+
/** Rings (default 4). */
|
|
268
|
+
levels?: number;
|
|
269
|
+
/** Ring shape (default 'polygon'). */
|
|
270
|
+
grid?: 'polygon' | 'circle';
|
|
271
|
+
/** Diameter in px (default 300; it shrinks with its container). */
|
|
272
|
+
size?: number;
|
|
273
|
+
label?: string;
|
|
274
|
+
legend?: boolean;
|
|
275
|
+
formatValue?: (value: number) => string;
|
|
276
|
+
emptyLabel?: string;
|
|
277
|
+
onSelect?: (axis: number | null) => void;
|
|
278
|
+
}
|
|
279
|
+
interface RadarChartInstance extends Instance {
|
|
280
|
+
update(options: RadarChartOptions): void;
|
|
281
|
+
select(axis: number | null): void;
|
|
282
|
+
readonly selected: number | null;
|
|
283
|
+
}
|
|
284
|
+
declare function createRadarChart(root: HTMLElement | null, initial?: RadarChartOptions): RadarChartInstance;
|
|
285
|
+
|
|
286
|
+
interface RadialDatum {
|
|
287
|
+
label: string;
|
|
288
|
+
value: number;
|
|
289
|
+
/** This ring's goal (default: the chart's max). */
|
|
290
|
+
max?: number;
|
|
291
|
+
color?: string;
|
|
292
|
+
}
|
|
293
|
+
interface RadialChartOptions {
|
|
294
|
+
/** Rings from the outside in. */
|
|
295
|
+
data?: RadialDatum[];
|
|
296
|
+
/** What a full ring is worth (default: the largest value). */
|
|
297
|
+
max?: number;
|
|
298
|
+
/** Degrees a full ring covers (default 360; 270 makes a gauge). */
|
|
299
|
+
sweep?: number;
|
|
300
|
+
/** Diameter in px (default 240). */
|
|
301
|
+
size?: number;
|
|
302
|
+
/** Ring thickness in px (default: what fits, up to 16). */
|
|
303
|
+
thickness?: number;
|
|
304
|
+
label?: string;
|
|
305
|
+
/** The middle when nothing is chosen (default 'Total'). */
|
|
306
|
+
totalLabel?: string;
|
|
307
|
+
legend?: boolean;
|
|
308
|
+
formatValue?: (value: number) => string;
|
|
309
|
+
emptyLabel?: string;
|
|
310
|
+
onSelect?: (index: number | null) => void;
|
|
311
|
+
}
|
|
312
|
+
interface RadialChartInstance extends Instance {
|
|
313
|
+
update(options: RadialChartOptions): void;
|
|
314
|
+
select(index: number | null): void;
|
|
315
|
+
readonly selected: number | null;
|
|
316
|
+
}
|
|
317
|
+
declare function createRadialChart(root: HTMLElement | null, initial?: RadialChartOptions): RadialChartInstance;
|
|
318
|
+
|
|
319
|
+
interface SankeyNode {
|
|
320
|
+
id: string;
|
|
321
|
+
label?: string;
|
|
322
|
+
color?: string;
|
|
323
|
+
}
|
|
324
|
+
interface SankeyLink {
|
|
325
|
+
source: string;
|
|
326
|
+
target: string;
|
|
327
|
+
value: number;
|
|
328
|
+
}
|
|
329
|
+
interface SankeyChartOptions {
|
|
330
|
+
nodes?: SankeyNode[];
|
|
331
|
+
links?: SankeyLink[];
|
|
332
|
+
/** Plot height in px (default 320). */
|
|
333
|
+
height?: number;
|
|
334
|
+
/** Node width in px (default 12). */
|
|
335
|
+
nodeWidth?: number;
|
|
336
|
+
/** Space between nodes in a column, px (default 14). */
|
|
337
|
+
nodePadding?: number;
|
|
338
|
+
label?: string;
|
|
339
|
+
formatValue?: (value: number) => string;
|
|
340
|
+
emptyLabel?: string;
|
|
341
|
+
/** A flow was chosen (its index in `links`), or none. */
|
|
342
|
+
onSelect?: (index: number | null) => void;
|
|
343
|
+
}
|
|
344
|
+
interface SankeyChartInstance extends Instance {
|
|
345
|
+
update(options: SankeyChartOptions): void;
|
|
346
|
+
select(index: number | null): void;
|
|
347
|
+
readonly selected: number | null;
|
|
348
|
+
}
|
|
349
|
+
declare function createSankeyChart(root: HTMLElement | null, initial?: SankeyChartOptions): SankeyChartInstance;
|
|
350
|
+
|
|
351
|
+
interface HeatmapDatum {
|
|
352
|
+
date: DateInput;
|
|
353
|
+
value: number;
|
|
354
|
+
}
|
|
355
|
+
interface HeatmapChartOptions {
|
|
356
|
+
/** Values by day: a list or a { 'YYYY-MM-DD': value } map. */
|
|
357
|
+
data?: HeatmapDatum[] | Record<string, number>;
|
|
358
|
+
/** The last day shown (default: today). */
|
|
359
|
+
end?: DateInput;
|
|
360
|
+
/** Weeks shown (default 53). */
|
|
361
|
+
weeks?: number;
|
|
362
|
+
/** First day of the week, 0 Sunday … 6 Saturday (default 1, Monday). */
|
|
363
|
+
firstDay?: number;
|
|
364
|
+
locale?: string;
|
|
365
|
+
/** Coloured steps above zero (default 4). */
|
|
366
|
+
levels?: number;
|
|
367
|
+
/** The deepest step's colour (default the accent). */
|
|
368
|
+
color?: string;
|
|
369
|
+
/** What a value counts, for the tooltip (default 'actividades'). */
|
|
370
|
+
unit?: string;
|
|
371
|
+
label?: string;
|
|
372
|
+
/** The "less … more" scale (default true). */
|
|
373
|
+
legend?: boolean;
|
|
374
|
+
formatValue?: (value: number) => string;
|
|
375
|
+
emptyLabel?: string;
|
|
376
|
+
onSelect?: (date: string | null, value: number | null) => void;
|
|
377
|
+
}
|
|
378
|
+
interface HeatmapChartInstance extends Instance {
|
|
379
|
+
update(options: HeatmapChartOptions): void;
|
|
380
|
+
/** Choose a day ('YYYY-MM-DD') or none. */
|
|
381
|
+
select(date: string | null): void;
|
|
382
|
+
readonly selected: string | null;
|
|
383
|
+
}
|
|
384
|
+
declare function createHeatmapChart(root: HTMLElement | null, initial?: HeatmapChartOptions): HeatmapChartInstance;
|
|
385
|
+
|
|
386
|
+
interface OrbitMenuOptions {
|
|
387
|
+
/** Distance of the options from the middle, px (default 96). */
|
|
388
|
+
radius?: number;
|
|
389
|
+
/** Where the first option sits, degrees clockwise from the top (default 0). */
|
|
390
|
+
start?: number;
|
|
391
|
+
/** Close after an option is chosen (default true). */
|
|
392
|
+
closeOnSelect?: boolean;
|
|
393
|
+
onToggle?: (open: boolean) => void;
|
|
394
|
+
/** An option was chosen: its data-mk-value, else its position. */
|
|
395
|
+
onSelect?: (value: string) => void;
|
|
396
|
+
}
|
|
397
|
+
interface OrbitMenuInstance extends Instance {
|
|
398
|
+
open(): void;
|
|
399
|
+
close(): void;
|
|
400
|
+
toggle(): void;
|
|
401
|
+
readonly isOpen: boolean;
|
|
402
|
+
}
|
|
403
|
+
declare function createOrbitMenu(root: HTMLElement | null, options?: OrbitMenuOptions): OrbitMenuInstance;
|
|
404
|
+
|
|
405
|
+
type ToastTone = 'success' | 'error' | 'info' | 'neutral';
|
|
406
|
+
interface ToastAction {
|
|
407
|
+
label: string;
|
|
408
|
+
onClick: () => void;
|
|
409
|
+
}
|
|
410
|
+
interface ToastOptions {
|
|
411
|
+
/** The control the toast grows out of. */
|
|
412
|
+
origin?: HTMLElement | null;
|
|
413
|
+
/** ms on screen; 0 keeps it until dismissed. */
|
|
414
|
+
duration?: number;
|
|
415
|
+
tone?: ToastTone;
|
|
416
|
+
action?: ToastAction;
|
|
417
|
+
/** Show the tone's icon (default). */
|
|
418
|
+
icon?: boolean;
|
|
419
|
+
}
|
|
420
|
+
interface ToastItem {
|
|
421
|
+
id: number;
|
|
422
|
+
message: string;
|
|
423
|
+
origin: HTMLElement | null;
|
|
424
|
+
duration: number;
|
|
425
|
+
tone: ToastTone;
|
|
426
|
+
action: ToastAction | null;
|
|
427
|
+
icon: boolean;
|
|
428
|
+
closing: boolean;
|
|
429
|
+
}
|
|
430
|
+
/** At most this many live toasts; older ones leave to make room. */
|
|
431
|
+
declare const TOAST_LIMIT = 5;
|
|
432
|
+
declare const getToasts: () => ToastItem[];
|
|
433
|
+
declare function subscribeToasts(listener: () => void): () => void;
|
|
434
|
+
declare function show(message: string, { origin, duration, tone, action, icon }?: ToastOptions): number;
|
|
435
|
+
/** Start the closing animation of a toast. */
|
|
436
|
+
declare function dismissToast(id: number): void;
|
|
437
|
+
/** Take a toast out of the list (after its exit animation). */
|
|
438
|
+
declare function removeToast(id: number): void;
|
|
439
|
+
/** Remove every toast at once (no animation). */
|
|
440
|
+
declare function clearToasts(): void;
|
|
441
|
+
/** Show a toast: `toast('Copiado', { origin: button })`. Returns its id. */
|
|
442
|
+
declare const toast: typeof show & {
|
|
443
|
+
dismiss: typeof dismissToast;
|
|
444
|
+
clear: typeof clearToasts;
|
|
445
|
+
};
|
|
446
|
+
declare const toastTimers: {
|
|
447
|
+
start(id: number, duration: number): void;
|
|
448
|
+
pause(id: number): void;
|
|
449
|
+
resume(id: number): void;
|
|
450
|
+
clear(id: number): void;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
export { chatMessage as $, type SankeyLink as A, type BidirectionalSliderInstance as B, type ChatInstance as C, type SankeyNode as D, type ThemePickerInstance as E, type ThemePickerOptions as F, type ToastAction as G, type HeatmapChartInstance as H, type IslandInstance as I, type ToastItem as J, type ToastOptions as K, type ToastTone as L, type ToasterInstance as M, NAV_STYLES as N, type OrbitMenuInstance as O, PENDING_ID as P, type ToasterLabels as Q, type RadarChartInstance as R, type SankeyChartInstance as S, TOAST_LIMIT as T, type ToasterOptions as U, type ToolbarInstance as V, type ToolbarOptions as W, type VoiceDotsInstance as X, type VoiceDotsOptions as Y, type VoiceState as Z, capturePending as _, type BidirectionalSliderOptions as a, clearToasts as a0, createBidirectionalSlider as a1, createChat as a2, createCursor as a3, createHeatmapChart as a4, createIsland as a5, createNav as a6, createOrbitMenu as a7, createPieChart as a8, createRadarChart as a9, createRadialChart as aa, createSankeyChart as ab, createThemePicker as ac, createToaster as ad, createToolbar as ae, createVoiceDots as af, dismissToast as ag, getToasts as ah, morphPendingToReply as ai, removeToast as aj, revealShell as ak, subscribeToasts as al, toNavStyle as am, toast as an, toastTimers as ao, type ChatLabels as b, type ChatOptions as c, type ChatRole as d, type CursorInstance as e, type CursorOptions as f, type CursorVariant as g, type HeatmapChartOptions as h, type HeatmapDatum as i, type IslandOptions as j, NAV_STYLE_ALIASES as k, type NavInstance as l, type NavOptions as m, type NavStyle as n, type NavStyleAlias as o, type NavigateDetail as p, type OrbitMenuOptions as q, type PieChartInstance as r, type PieChartOptions as s, type PieSlice as t, type RadarChartOptions as u, type RadarSeries as v, type RadialChartInstance as w, type RadialChartOptions as x, type RadialDatum as y, type SankeyChartOptions as z };
|