@leavepulse/ui 0.43.1 → 0.43.3
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/assets/{LpCommandPalette-s_kKuCRf.css → LpCommandPalette-DH7sPcKP.css} +21 -21
- package/dist/assets/{LpImageEditor-D-s8tNGO.css → LpImageEditor-Ct7Y3aNu.css} +6 -6
- package/dist/component-names.d.ts +1 -0
- package/dist/components/LayoutCanvas.vue.d.ts +28 -0
- package/dist/components/LayoutNode.vue.d.ts +40 -0
- package/dist/components/LpActionBar.vue.d.ts +84 -0
- package/dist/components/LpAddressInput.vue.d.ts +70 -0
- package/dist/components/LpAlert.vue.d.ts +44 -0
- package/dist/components/LpAppShell.vue.d.ts +123 -0
- package/dist/components/LpAutocomplete.vue.d.ts +50 -0
- package/dist/components/LpAvatar.vue.d.ts +34 -0
- package/dist/components/LpBadge.vue.d.ts +20 -0
- package/dist/components/LpBreadcrumbs.vue.d.ts +32 -0
- package/dist/components/LpButton.vue.d.ts +113 -0
- package/dist/components/LpCalendar.vue.d.ts +29 -0
- package/dist/components/LpCard.vue.d.ts +60 -0
- package/dist/components/LpChart.vue.d.ts +130 -0
- package/dist/components/LpCheckbox.vue.d.ts +32 -0
- package/dist/components/LpCodeBlock.vue.d.ts +58 -0
- package/dist/components/LpColorPicker.vue.d.ts +124 -0
- package/dist/components/LpCommandPalette.vue.d.ts +206 -0
- package/dist/components/LpCommandPalette.vue.js +2 -2
- package/dist/components/LpConfirmDialog.vue.d.ts +59 -0
- package/dist/components/LpContextMenu.vue.d.ts +44 -0
- package/dist/components/LpDatePicker.vue.d.ts +33 -0
- package/dist/components/LpDisclosure.vue.d.ts +47 -0
- package/dist/components/LpDivider.vue.d.ts +17 -0
- package/dist/components/LpDrawer.vue.d.ts +170 -0
- package/dist/components/LpDropdownMenu.vue.d.ts +23 -0
- package/dist/components/LpDropzone.vue.d.ts +90 -0
- package/dist/components/LpEmptyState.vue.d.ts +28 -0
- package/dist/components/LpFileTree.vue.d.ts +126 -0
- package/dist/components/LpFileTreeNode.vue.d.ts +62 -0
- package/dist/components/LpFormField.vue.d.ts +24 -0
- package/dist/components/LpIcon.vue.d.ts +9 -0
- package/dist/components/LpImageEditor.vue.d.ts +106 -0
- package/dist/components/LpImageEditor.vue.js +2 -2
- package/dist/components/LpInfraNode.vue.d.ts +65 -0
- package/dist/components/LpInput.vue.d.ts +80 -0
- package/dist/components/LpLaneNode.vue.d.ts +24 -0
- package/dist/components/LpLightbox.vue.d.ts +62 -0
- package/dist/components/LpLink.vue.d.ts +93 -0
- package/dist/components/LpLogViewer.vue.d.ts +153 -0
- package/dist/components/LpMapPicker.vue.d.ts +59 -0
- package/dist/components/LpMediaGallery.vue.d.ts +80 -0
- package/dist/components/LpModal.vue.d.ts +66 -0
- package/dist/components/LpModalNav.vue.d.ts +66 -0
- package/dist/components/LpNotificationBell.vue.d.ts +85 -0
- package/dist/components/LpNumberField.vue.d.ts +21 -0
- package/dist/components/LpNumberFlow.vue.d.ts +35 -0
- package/dist/components/LpOtpInput.vue.d.ts +39 -0
- package/dist/components/LpPagination.vue.d.ts +35 -0
- package/dist/components/LpPasswordInput.vue.d.ts +36 -0
- package/dist/components/LpPhoneInput.vue.d.ts +49 -0
- package/dist/components/LpPie.vue.d.ts +196 -0
- package/dist/components/LpPopover.vue.d.ts +34 -0
- package/dist/components/LpProgress.vue.d.ts +66 -0
- package/dist/components/LpRadio.vue.d.ts +18 -0
- package/dist/components/LpRadioGroup.vue.d.ts +26 -0
- package/dist/components/LpRollingText.vue.d.ts +33 -0
- package/dist/components/LpScrollArea.vue.d.ts +28 -0
- package/dist/components/LpSection.vue.d.ts +120 -0
- package/dist/components/LpSegmented.vue.d.ts +30 -0
- package/dist/components/LpSelect.vue.d.ts +47 -0
- package/dist/components/LpServiceNode.vue.d.ts +14 -0
- package/dist/components/LpShift.vue.d.ts +36 -0
- package/dist/components/LpShortcutsDialog.vue.d.ts +24 -0
- package/dist/components/LpSidebar.vue.d.ts +146 -0
- package/dist/components/LpSidebarNav.vue.d.ts +54 -0
- package/dist/components/LpSkeleton.vue.d.ts +16 -0
- package/dist/components/LpSlider.vue.d.ts +30 -0
- package/dist/components/LpSparkline.vue.d.ts +48 -0
- package/dist/components/LpStat.vue.d.ts +69 -0
- package/dist/components/LpStepper.vue.d.ts +36 -0
- package/dist/components/LpSwitch.vue.d.ts +42 -0
- package/dist/components/LpTable.vue.d.ts +124 -0
- package/dist/components/LpTableOfContents.vue.d.ts +19 -0
- package/dist/components/LpTabs.vue.d.ts +47 -0
- package/dist/components/LpTextarea.vue.d.ts +22 -0
- package/dist/components/LpThemeSwitcher.vue.d.ts +47 -0
- package/dist/components/LpTilt.vue.d.ts +31 -0
- package/dist/components/LpTimeField.vue.d.ts +24 -0
- package/dist/components/LpToaster.vue.d.ts +3 -0
- package/dist/components/LpTooltip.vue.d.ts +58 -0
- package/dist/components/LpTopologyCanvas.vue.d.ts +205 -0
- package/dist/components/LpUptimeBar.vue.d.ts +46 -0
- package/dist/components/LpWaypointEdge.vue.d.ts +33 -0
- package/dist/components/actionBar.d.ts +19 -0
- package/dist/components/address.d.ts +107 -0
- package/dist/components/chart.d.ts +180 -0
- package/dist/components/codeHighlight.d.ts +8 -0
- package/dist/components/color.d.ts +65 -0
- package/dist/components/commandSearch.d.ts +14 -0
- package/dist/components/countries-data.d.ts +2 -0
- package/dist/components/countries.d.ts +20 -0
- package/dist/components/dropdown.d.ts +29 -0
- package/dist/components/fileTree.d.ts +79 -0
- package/dist/components/lightbox.d.ts +24 -0
- package/dist/components/modalDepth.d.ts +11 -0
- package/dist/components/sidebar.d.ts +42 -0
- package/dist/composables/easing.d.ts +46 -0
- package/dist/composables/useAsyncTask.d.ts +18 -0
- package/dist/composables/useClipboard.d.ts +46 -0
- package/dist/composables/useFormDraft.d.ts +67 -0
- package/dist/composables/useGlass.d.ts +9 -0
- package/dist/composables/useHotkeys.d.ts +101 -0
- package/dist/composables/useInputFilter.d.ts +14 -0
- package/dist/composables/useMergedClass.d.ts +42 -0
- package/dist/composables/usePillTransition.d.ts +21 -0
- package/dist/composables/useReveal.d.ts +26 -0
- package/dist/composables/useRovingFocus.d.ts +49 -0
- package/dist/composables/useSettled.d.ts +26 -0
- package/dist/composables/useShift.d.ts +35 -0
- package/dist/composables/useTilt.d.ts +23 -0
- package/dist/composables/useToast.d.ts +41 -0
- package/dist/composables/useZoomPan.d.ts +58 -0
- package/dist/icons.d.ts +1 -0
- package/dist/index.d.ts +162 -0
- package/dist/layout/registry.d.ts +26 -0
- package/dist/layout/tree.d.ts +75 -0
- package/dist/layout/useLayout.d.ts +39 -0
- package/dist/theme/backdrop.d.ts +9 -0
- package/dist/theme/config.d.ts +16 -0
- package/dist/theme/define.d.ts +12 -0
- package/dist/theme/presets.d.ts +20 -0
- package/dist/theme/tokens.d.ts +75 -0
- package/dist/theme/useTheme.d.ts +46 -0
- package/package.json +2 -2
- package/src/components/LpCommandPalette.vue +4 -4
- package/src/components/LpImageEditor.vue +2 -2
- package/src/components/commandSearch.ts +1 -1
- package/src/composables/useHotkeys.ts +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
export interface Crumb {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
/** Destination for router links; passed straight to the `as` component. */
|
|
6
|
+
to?: string | Record<string, unknown>;
|
|
7
|
+
/** Leading icon, for crumbs that carry a glyph (a home root, a section). */
|
|
8
|
+
icon?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
13
|
+
items: Crumb[];
|
|
14
|
+
/**
|
|
15
|
+
* Root element/component for linked crumbs. Defaults to a native <a>;
|
|
16
|
+
* pass a router link component to keep client-side navigation.
|
|
17
|
+
*/
|
|
18
|
+
as?: string | Component;
|
|
19
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
20
|
+
navigate: (item: Crumb, index: number) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
22
|
+
items: Crumb[];
|
|
23
|
+
/**
|
|
24
|
+
* Root element/component for linked crumbs. Defaults to a native <a>;
|
|
25
|
+
* pass a router link component to keep client-side navigation.
|
|
26
|
+
*/
|
|
27
|
+
as?: string | Component;
|
|
28
|
+
}> & Readonly<{
|
|
29
|
+
onNavigate?: ((item: Crumb, index: number) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
as: string | Component;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
import { type Component } from "vue";
|
|
3
|
+
declare const button: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
solid: string;
|
|
6
|
+
action: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
soft: string;
|
|
9
|
+
ghost: string;
|
|
10
|
+
muted: string;
|
|
11
|
+
light: string;
|
|
12
|
+
danger: string;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
xs: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
md: string;
|
|
18
|
+
lg: string;
|
|
19
|
+
};
|
|
20
|
+
block: {
|
|
21
|
+
true: string;
|
|
22
|
+
};
|
|
23
|
+
square: {
|
|
24
|
+
true: string;
|
|
25
|
+
};
|
|
26
|
+
glow: {
|
|
27
|
+
true: string;
|
|
28
|
+
};
|
|
29
|
+
}, undefined, string[], {
|
|
30
|
+
variant: {
|
|
31
|
+
solid: string;
|
|
32
|
+
action: string;
|
|
33
|
+
outline: string;
|
|
34
|
+
soft: string;
|
|
35
|
+
ghost: string;
|
|
36
|
+
muted: string;
|
|
37
|
+
light: string;
|
|
38
|
+
danger: string;
|
|
39
|
+
};
|
|
40
|
+
size: {
|
|
41
|
+
xs: string;
|
|
42
|
+
sm: string;
|
|
43
|
+
md: string;
|
|
44
|
+
lg: string;
|
|
45
|
+
};
|
|
46
|
+
block: {
|
|
47
|
+
true: string;
|
|
48
|
+
};
|
|
49
|
+
square: {
|
|
50
|
+
true: string;
|
|
51
|
+
};
|
|
52
|
+
glow: {
|
|
53
|
+
true: string;
|
|
54
|
+
};
|
|
55
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
56
|
+
variant: {
|
|
57
|
+
solid: string;
|
|
58
|
+
action: string;
|
|
59
|
+
outline: string;
|
|
60
|
+
soft: string;
|
|
61
|
+
ghost: string;
|
|
62
|
+
muted: string;
|
|
63
|
+
light: string;
|
|
64
|
+
danger: string;
|
|
65
|
+
};
|
|
66
|
+
size: {
|
|
67
|
+
xs: string;
|
|
68
|
+
sm: string;
|
|
69
|
+
md: string;
|
|
70
|
+
lg: string;
|
|
71
|
+
};
|
|
72
|
+
block: {
|
|
73
|
+
true: string;
|
|
74
|
+
};
|
|
75
|
+
square: {
|
|
76
|
+
true: string;
|
|
77
|
+
};
|
|
78
|
+
glow: {
|
|
79
|
+
true: string;
|
|
80
|
+
};
|
|
81
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
82
|
+
type ButtonVariants = VariantProps<typeof button>;
|
|
83
|
+
type __VLS_Props = {
|
|
84
|
+
variant?: ButtonVariants["variant"];
|
|
85
|
+
size?: ButtonVariants["size"];
|
|
86
|
+
block?: boolean;
|
|
87
|
+
square?: boolean;
|
|
88
|
+
glow?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Root element/component. Defaults to a native <button>. Pass a router link
|
|
91
|
+
* component (e.g. NuxtLink) or "a" to render a link-styled button; the kit
|
|
92
|
+
* stays DOM-agnostic, the consumer supplies the link component.
|
|
93
|
+
*/
|
|
94
|
+
as?: string | Component;
|
|
95
|
+
type?: "button" | "submit" | "reset";
|
|
96
|
+
disabled?: boolean;
|
|
97
|
+
};
|
|
98
|
+
declare var __VLS_8: {};
|
|
99
|
+
type __VLS_Slots = {} & {
|
|
100
|
+
default?: (props: typeof __VLS_8) => any;
|
|
101
|
+
};
|
|
102
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
103
|
+
type: "button" | "submit" | "reset";
|
|
104
|
+
as: string | Component;
|
|
105
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
107
|
+
declare const _default: typeof __VLS_export;
|
|
108
|
+
export default _default;
|
|
109
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
110
|
+
new (): {
|
|
111
|
+
$slots: S;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
4
|
+
/** Selected date as "YYYY-MM-DD" (v-model). */
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
/** Earliest selectable date, "YYYY-MM-DD". */
|
|
7
|
+
min?: string;
|
|
8
|
+
/** Latest selectable date, "YYYY-MM-DD". */
|
|
9
|
+
max?: string;
|
|
10
|
+
/** Predicate to disable specific days; receives the ISO string. */
|
|
11
|
+
isDisabled?: (iso: string) => boolean;
|
|
12
|
+
weekdayFormat?: "narrow" | "short" | "long";
|
|
13
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
16
|
+
/** Selected date as "YYYY-MM-DD" (v-model). */
|
|
17
|
+
modelValue?: string;
|
|
18
|
+
/** Earliest selectable date, "YYYY-MM-DD". */
|
|
19
|
+
min?: string;
|
|
20
|
+
/** Latest selectable date, "YYYY-MM-DD". */
|
|
21
|
+
max?: string;
|
|
22
|
+
/** Predicate to disable specific days; receives the ISO string. */
|
|
23
|
+
isDisabled?: (iso: string) => boolean;
|
|
24
|
+
weekdayFormat?: "narrow" | "short" | "long";
|
|
25
|
+
}> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
weekdayFormat: "narrow" | "short" | "long";
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type ContextMenuItemDef } from "./LpContextMenu.vue";
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
5
|
+
variant?: "ghost" | "flat" | "raised" | undefined;
|
|
6
|
+
padded?: boolean;
|
|
7
|
+
interactive?: boolean;
|
|
8
|
+
/** Right-click menu for the card. Omit (or pass []) to keep the native one. */
|
|
9
|
+
menuItems?: ContextMenuItemDef[];
|
|
10
|
+
/** Element to render as. A card inside a <ul> has to be an `li` to be valid. */
|
|
11
|
+
as?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Colour of a stripe down the card's leading edge. ANY CSS colour — this is
|
|
14
|
+
* for sources that hand you an arbitrary value (a Discord role colour, a
|
|
15
|
+
* per-project hex out of a config), which is why it is a string and not a
|
|
16
|
+
* set of tonal variants. When the colour IS semantic, LpAlert's
|
|
17
|
+
* info/success/warning/danger say so in a way a raw hex cannot.
|
|
18
|
+
*
|
|
19
|
+
* The stripe costs no layout: content starts in the same place with and
|
|
20
|
+
* without it, and it rounds into `rounded-card` by itself.
|
|
21
|
+
*/
|
|
22
|
+
accent?: string;
|
|
23
|
+
/** Width of the `accent` stripe. */
|
|
24
|
+
accentWidth?: string;
|
|
25
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
26
|
+
variant?: "ghost" | "flat" | "raised" | undefined;
|
|
27
|
+
padded?: boolean;
|
|
28
|
+
interactive?: boolean;
|
|
29
|
+
/** Right-click menu for the card. Omit (or pass []) to keep the native one. */
|
|
30
|
+
menuItems?: ContextMenuItemDef[];
|
|
31
|
+
/** Element to render as. A card inside a <ul> has to be an `li` to be valid. */
|
|
32
|
+
as?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Colour of a stripe down the card's leading edge. ANY CSS colour — this is
|
|
35
|
+
* for sources that hand you an arbitrary value (a Discord role colour, a
|
|
36
|
+
* per-project hex out of a config), which is why it is a string and not a
|
|
37
|
+
* set of tonal variants. When the colour IS semantic, LpAlert's
|
|
38
|
+
* info/success/warning/danger say so in a way a raw hex cannot.
|
|
39
|
+
*
|
|
40
|
+
* The stripe costs no layout: content starts in the same place with and
|
|
41
|
+
* without it, and it rounds into `rounded-card` by itself.
|
|
42
|
+
*/
|
|
43
|
+
accent?: string;
|
|
44
|
+
/** Width of the `accent` stripe. */
|
|
45
|
+
accentWidth?: string;
|
|
46
|
+
}> & Readonly<{}>, {
|
|
47
|
+
as: string;
|
|
48
|
+
variant: "ghost" | "flat" | "raised";
|
|
49
|
+
padded: boolean;
|
|
50
|
+
interactive: boolean;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
52
|
+
default?: (props: {}) => any;
|
|
53
|
+
} & {
|
|
54
|
+
default?: (props: {}) => any;
|
|
55
|
+
}>;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type ChartSeries } from "./chart";
|
|
2
|
+
import { type ContextMenuItemDef } from "./LpContextMenu.vue";
|
|
3
|
+
/** What was under the pointer when a point was clicked or right-clicked. */
|
|
4
|
+
export interface ChartPointEvent {
|
|
5
|
+
index: number;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Every series' value at this index, in `series` order (hidden included). */
|
|
8
|
+
values: (number | null)[];
|
|
9
|
+
/** The original event, for callers that need modifiers or coordinates. */
|
|
10
|
+
originalEvent: MouseEvent;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
15
|
+
series: ChartSeries[];
|
|
16
|
+
/** Shared x-axis labels; a point's own `x` overrides its slot. */
|
|
17
|
+
labels?: string[];
|
|
18
|
+
type?: "line" | "area" | "bar";
|
|
19
|
+
/** Plot height in px. The width always fills the container. */
|
|
20
|
+
height?: number;
|
|
21
|
+
/** Headline above the plot. */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Sub-headline under the title. */
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
/** Curve tension for line/area. 0 = straight polyline, 1 = fully smooth. */
|
|
26
|
+
smooth?: number;
|
|
27
|
+
/** Draw a dot at every point rather than only the hovered one. */
|
|
28
|
+
showPoints?: boolean;
|
|
29
|
+
showGrid?: boolean;
|
|
30
|
+
showXAxis?: boolean;
|
|
31
|
+
showYAxis?: boolean;
|
|
32
|
+
/** Legend also toggles series visibility on click. */
|
|
33
|
+
showLegend?: boolean;
|
|
34
|
+
/** Roughly how many y ticks to aim for; bounds are rounded to fit. */
|
|
35
|
+
yTicks?: number;
|
|
36
|
+
/** Force the y-axis to include 0 (bars always do). */
|
|
37
|
+
includeZero?: boolean;
|
|
38
|
+
/** Appended to values in ticks and the tooltip, e.g. "%" or " ms". */
|
|
39
|
+
unit?: string;
|
|
40
|
+
/** Unit for series on the right axis. Falls back to `unit`. */
|
|
41
|
+
rightUnit?: string;
|
|
42
|
+
/** Custom value formatter; overrides the compact 1.2k default. */
|
|
43
|
+
formatValue?: (v: number) => string;
|
|
44
|
+
/** Formatter for the right axis. Falls back to `formatValue`. */
|
|
45
|
+
formatRightValue?: (v: number) => string;
|
|
46
|
+
/** Stack bars instead of grouping them side by side. */
|
|
47
|
+
stacked?: boolean;
|
|
48
|
+
/** Grow the marks in on mount and on data change. */
|
|
49
|
+
animate?: boolean;
|
|
50
|
+
/** Shown when every series is empty. */
|
|
51
|
+
emptyLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Right-click menu for a point, built from whatever was hit. Return [] to
|
|
54
|
+
* leave the browser's own menu alone for that point. Which actions a point
|
|
55
|
+
* offers is an application question — "compare with last week", "open the
|
|
56
|
+
* incident", "copy value" — so the chart supplies the context and the
|
|
57
|
+
* caller supplies the items.
|
|
58
|
+
*/
|
|
59
|
+
menuItems?: (point: ChartPointEvent) => ContextMenuItemDef[];
|
|
60
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
61
|
+
pointClick: (payload: ChartPointEvent) => any;
|
|
62
|
+
pointContextMenu: (payload: ChartPointEvent) => any;
|
|
63
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
64
|
+
series: ChartSeries[];
|
|
65
|
+
/** Shared x-axis labels; a point's own `x` overrides its slot. */
|
|
66
|
+
labels?: string[];
|
|
67
|
+
type?: "line" | "area" | "bar";
|
|
68
|
+
/** Plot height in px. The width always fills the container. */
|
|
69
|
+
height?: number;
|
|
70
|
+
/** Headline above the plot. */
|
|
71
|
+
title?: string;
|
|
72
|
+
/** Sub-headline under the title. */
|
|
73
|
+
subtitle?: string;
|
|
74
|
+
/** Curve tension for line/area. 0 = straight polyline, 1 = fully smooth. */
|
|
75
|
+
smooth?: number;
|
|
76
|
+
/** Draw a dot at every point rather than only the hovered one. */
|
|
77
|
+
showPoints?: boolean;
|
|
78
|
+
showGrid?: boolean;
|
|
79
|
+
showXAxis?: boolean;
|
|
80
|
+
showYAxis?: boolean;
|
|
81
|
+
/** Legend also toggles series visibility on click. */
|
|
82
|
+
showLegend?: boolean;
|
|
83
|
+
/** Roughly how many y ticks to aim for; bounds are rounded to fit. */
|
|
84
|
+
yTicks?: number;
|
|
85
|
+
/** Force the y-axis to include 0 (bars always do). */
|
|
86
|
+
includeZero?: boolean;
|
|
87
|
+
/** Appended to values in ticks and the tooltip, e.g. "%" or " ms". */
|
|
88
|
+
unit?: string;
|
|
89
|
+
/** Unit for series on the right axis. Falls back to `unit`. */
|
|
90
|
+
rightUnit?: string;
|
|
91
|
+
/** Custom value formatter; overrides the compact 1.2k default. */
|
|
92
|
+
formatValue?: (v: number) => string;
|
|
93
|
+
/** Formatter for the right axis. Falls back to `formatValue`. */
|
|
94
|
+
formatRightValue?: (v: number) => string;
|
|
95
|
+
/** Stack bars instead of grouping them side by side. */
|
|
96
|
+
stacked?: boolean;
|
|
97
|
+
/** Grow the marks in on mount and on data change. */
|
|
98
|
+
animate?: boolean;
|
|
99
|
+
/** Shown when every series is empty. */
|
|
100
|
+
emptyLabel?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Right-click menu for a point, built from whatever was hit. Return [] to
|
|
103
|
+
* leave the browser's own menu alone for that point. Which actions a point
|
|
104
|
+
* offers is an application question — "compare with last week", "open the
|
|
105
|
+
* incident", "copy value" — so the chart supplies the context and the
|
|
106
|
+
* caller supplies the items.
|
|
107
|
+
*/
|
|
108
|
+
menuItems?: (point: ChartPointEvent) => ContextMenuItemDef[];
|
|
109
|
+
}> & Readonly<{
|
|
110
|
+
onPointClick?: ((payload: ChartPointEvent) => any) | undefined;
|
|
111
|
+
onPointContextMenu?: ((payload: ChartPointEvent) => any) | undefined;
|
|
112
|
+
}>, {
|
|
113
|
+
type: "line" | "area" | "bar";
|
|
114
|
+
height: number;
|
|
115
|
+
animate: boolean;
|
|
116
|
+
smooth: number;
|
|
117
|
+
showGrid: boolean;
|
|
118
|
+
showXAxis: boolean;
|
|
119
|
+
showYAxis: boolean;
|
|
120
|
+
showLegend: boolean;
|
|
121
|
+
yTicks: number;
|
|
122
|
+
emptyLabel: string;
|
|
123
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
124
|
+
actions?: (props: {}) => any;
|
|
125
|
+
}>;
|
|
126
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
127
|
+
new (): {
|
|
128
|
+
$slots: S;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
4
|
+
modelValue?: boolean;
|
|
5
|
+
/** Mixed state (e.g. a "select all" with a partial selection). Shows a dash. */
|
|
6
|
+
indeterminate?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
change: (value: boolean) => any;
|
|
13
|
+
"update:modelValue": (value: boolean) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
15
|
+
modelValue?: boolean;
|
|
16
|
+
/** Mixed state (e.g. a "select all" with a partial selection). Shows a dash. */
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
label?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
}> & Readonly<{
|
|
23
|
+
onChange?: ((value: boolean) => any) | undefined;
|
|
24
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
26
|
+
default?: (props: {}) => any;
|
|
27
|
+
}>;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type CodeLang } from "./codeHighlight";
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
5
|
+
/** The code (v-model when editable). */
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
lang?: CodeLang;
|
|
8
|
+
/** Show 1-based gutter line numbers. */
|
|
9
|
+
lineNumbers?: boolean;
|
|
10
|
+
/** Wrap long lines instead of scrolling horizontally. */
|
|
11
|
+
wrap?: boolean;
|
|
12
|
+
/** Read-only. Set false for an editable field with a lock toggle. */
|
|
13
|
+
locked?: boolean;
|
|
14
|
+
/** Show the lock/unlock toggle in the header (opt-in editability). */
|
|
15
|
+
lockToggle?: boolean;
|
|
16
|
+
/** Show the copy button. */
|
|
17
|
+
copyable?: boolean;
|
|
18
|
+
/** Caption shown in the header (e.g. a filename). */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** Fixed height; defaults to content height. */
|
|
21
|
+
height?: string;
|
|
22
|
+
/** Auto-collapse a leading import/package block (no markers needed). */
|
|
23
|
+
foldImports?: boolean;
|
|
24
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
25
|
+
"update:modelValue": (value: string) => any;
|
|
26
|
+
"update:locked": (value: boolean) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
28
|
+
/** The code (v-model when editable). */
|
|
29
|
+
modelValue?: string;
|
|
30
|
+
lang?: CodeLang;
|
|
31
|
+
/** Show 1-based gutter line numbers. */
|
|
32
|
+
lineNumbers?: boolean;
|
|
33
|
+
/** Wrap long lines instead of scrolling horizontally. */
|
|
34
|
+
wrap?: boolean;
|
|
35
|
+
/** Read-only. Set false for an editable field with a lock toggle. */
|
|
36
|
+
locked?: boolean;
|
|
37
|
+
/** Show the lock/unlock toggle in the header (opt-in editability). */
|
|
38
|
+
lockToggle?: boolean;
|
|
39
|
+
/** Show the copy button. */
|
|
40
|
+
copyable?: boolean;
|
|
41
|
+
/** Caption shown in the header (e.g. a filename). */
|
|
42
|
+
title?: string;
|
|
43
|
+
/** Fixed height; defaults to content height. */
|
|
44
|
+
height?: string;
|
|
45
|
+
/** Auto-collapse a leading import/package block (no markers needed). */
|
|
46
|
+
foldImports?: boolean;
|
|
47
|
+
}> & Readonly<{
|
|
48
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
49
|
+
"onUpdate:locked"?: ((value: boolean) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
lang: CodeLang;
|
|
52
|
+
wrap: boolean;
|
|
53
|
+
lineNumbers: boolean;
|
|
54
|
+
locked: boolean;
|
|
55
|
+
lockToggle: boolean;
|
|
56
|
+
copyable: boolean;
|
|
57
|
+
foldImports: boolean;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { type ColorFormat } from "./color";
|
|
2
|
+
import { type ContextMenuItemDef } from "./LpContextMenu.vue";
|
|
3
|
+
/**
|
|
4
|
+
* Every user-facing string the picker renders on its own — the menu items, the
|
|
5
|
+
* "Recent" heading, and the accessible names the area, rails and text field
|
|
6
|
+
* carry. Apps with i18n pass their translations in; the English defaults keep
|
|
7
|
+
* the component usable bare. Without this an app in another language would
|
|
8
|
+
* still announce "Saturation and brightness" to a screen reader.
|
|
9
|
+
*/
|
|
10
|
+
export interface ColorPickerLabels {
|
|
11
|
+
saturation?: string;
|
|
12
|
+
hue?: string;
|
|
13
|
+
opacity?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
recent?: string;
|
|
16
|
+
copyHex?: string;
|
|
17
|
+
copyRgb?: string;
|
|
18
|
+
copyHsl?: string;
|
|
19
|
+
paste?: string;
|
|
20
|
+
/** Submenu title for the "show the value as…" format switch. */
|
|
21
|
+
formatAs?: string;
|
|
22
|
+
format_hex?: string;
|
|
23
|
+
format_rgb?: string;
|
|
24
|
+
format_hsl?: string;
|
|
25
|
+
/** Read out as the area's value, with {s} and {v} as whole percentages. */
|
|
26
|
+
saturationValueText?: string;
|
|
27
|
+
}
|
|
28
|
+
type __VLS_Props = {
|
|
29
|
+
/** The colour as a CSS string (v-model). Hex, rgb()/rgba() or hsl()/hsla(). */
|
|
30
|
+
modelValue?: string;
|
|
31
|
+
/** Shape of the emitted string. Parsing accepts all three either way. */
|
|
32
|
+
format?: ColorFormat;
|
|
33
|
+
/** Show the alpha rail and emit a colour carrying its alpha. */
|
|
34
|
+
alpha?: boolean;
|
|
35
|
+
/** Preset colours under the rails. Pass [] to drop the row entirely. */
|
|
36
|
+
swatches?: readonly string[];
|
|
37
|
+
/** Hide the hex/CSS text field (leaves the field, rails and presets). */
|
|
38
|
+
hideInput?: boolean;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
invalid?: boolean;
|
|
41
|
+
size?: "sm" | "md" | "lg";
|
|
42
|
+
/** Trigger text beside the swatch. Defaults to the colour's own value. */
|
|
43
|
+
label?: string;
|
|
44
|
+
/** Accessible name for the trigger when it carries no visible text. */
|
|
45
|
+
ariaLabel?: string;
|
|
46
|
+
/** Popover side, as LpPopover. */
|
|
47
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
48
|
+
align?: "start" | "center" | "end";
|
|
49
|
+
/**
|
|
50
|
+
* Right-click menu on the trigger. Copy-as-hex/rgb/hsl and paste are built
|
|
51
|
+
* in — the thing a person actually wants from a colour swatch is to take
|
|
52
|
+
* the value somewhere else, and reading it off the trigger by hand is how
|
|
53
|
+
* a hex ends up mistyped. These come first; `menuItems` is appended below a
|
|
54
|
+
* separator. Pass `menu="none"` to drop the built-ins and keep only yours.
|
|
55
|
+
*/
|
|
56
|
+
menu?: "default" | "none";
|
|
57
|
+
/** Extra right-click items, appended after the built-in ones. */
|
|
58
|
+
menuItems?: ContextMenuItemDef[];
|
|
59
|
+
/**
|
|
60
|
+
* Remember the colours picked here and offer them back as a "Recent" row.
|
|
61
|
+
* A person who tints one tag reaches for the same colour on the next one,
|
|
62
|
+
* and the presets cannot know it. Off by default: history is a per-person
|
|
63
|
+
* convenience, and a component that wrote to storage uninvited would be a
|
|
64
|
+
* surprise in a form that is meant to be stateless.
|
|
65
|
+
*/
|
|
66
|
+
recent?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Storage key for that history, so two pickers can share a list or keep
|
|
69
|
+
* separate ones (e.g. "lp.color.tag" vs "lp.color.calendar").
|
|
70
|
+
*/
|
|
71
|
+
recentKey?: string;
|
|
72
|
+
/** How many recent colours to keep. */
|
|
73
|
+
recentLimit?: number;
|
|
74
|
+
/** Translations for the strings the picker renders itself. */
|
|
75
|
+
labels?: ColorPickerLabels;
|
|
76
|
+
/**
|
|
77
|
+
* Toast raised after a successful copy, with `{value}` standing in for the
|
|
78
|
+
* colour. `false` copies silently — for a page that already confirms it, or
|
|
79
|
+
* one where a toast per copy would be noise. Translate it via `labels`
|
|
80
|
+
* rather than here if the rest of your strings go through i18n.
|
|
81
|
+
*/
|
|
82
|
+
copyToast?: string | false;
|
|
83
|
+
};
|
|
84
|
+
declare var __VLS_56: {
|
|
85
|
+
color: string;
|
|
86
|
+
hsv: {
|
|
87
|
+
h: number;
|
|
88
|
+
s: number;
|
|
89
|
+
v: number;
|
|
90
|
+
a: number;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
type __VLS_Slots = {} & {
|
|
94
|
+
default?: (props: typeof __VLS_56) => any;
|
|
95
|
+
};
|
|
96
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
97
|
+
open: import("vue").Ref<boolean, boolean>;
|
|
98
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
99
|
+
change: (value: string) => any;
|
|
100
|
+
"update:modelValue": (value: string) => any;
|
|
101
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
102
|
+
onChange?: ((value: string) => any) | undefined;
|
|
103
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
104
|
+
}>, {
|
|
105
|
+
size: "sm" | "md" | "lg";
|
|
106
|
+
format: ColorFormat;
|
|
107
|
+
align: "start" | "center" | "end";
|
|
108
|
+
modelValue: string;
|
|
109
|
+
side: "top" | "right" | "bottom" | "left";
|
|
110
|
+
alpha: boolean;
|
|
111
|
+
swatches: readonly string[];
|
|
112
|
+
recent: boolean;
|
|
113
|
+
recentKey: string;
|
|
114
|
+
recentLimit: number;
|
|
115
|
+
copyToast: string | false;
|
|
116
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
117
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
118
|
+
declare const _default: typeof __VLS_export;
|
|
119
|
+
export default _default;
|
|
120
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
121
|
+
new (): {
|
|
122
|
+
$slots: S;
|
|
123
|
+
};
|
|
124
|
+
};
|