@leavepulse/ui 0.12.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/LICENSE +21 -0
- package/README.md +61 -0
- 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/LpAlert.vue.d.ts +44 -0
- package/dist/components/LpAppShell.vue.d.ts +83 -0
- package/dist/components/LpAutocomplete.vue.d.ts +50 -0
- package/dist/components/LpAvatar.vue.d.ts +20 -0
- package/dist/components/LpBadge.vue.d.ts +47 -0
- package/dist/components/LpBreadcrumbs.vue.d.ts +14 -0
- package/dist/components/LpButton.vue.d.ts +113 -0
- package/dist/components/LpCalendar.vue.d.ts +20 -0
- package/dist/components/LpCard.vue.d.ts +29 -0
- package/dist/components/LpCheckbox.vue.d.ts +28 -0
- package/dist/components/LpCodeBlock.vue.d.ts +39 -0
- package/dist/components/LpCommandPalette.vue.d.ts +42 -0
- package/dist/components/LpConfirmDialog.vue.d.ts +32 -0
- package/dist/components/LpContextMenu.vue.d.ts +30 -0
- package/dist/components/LpDatePicker.vue.d.ts +25 -0
- package/dist/components/LpDisclosure.vue.d.ts +37 -0
- package/dist/components/LpDivider.vue.d.ts +17 -0
- package/dist/components/LpDrawer.vue.d.ts +88 -0
- package/dist/components/LpDropdownMenu.vue.d.ts +23 -0
- package/dist/components/LpEmptyState.vue.d.ts +18 -0
- package/dist/components/LpFormField.vue.d.ts +21 -0
- package/dist/components/LpIcon.vue.d.ts +8 -0
- package/dist/components/LpInfraNode.vue.d.ts +21 -0
- package/dist/components/LpInput.vue.d.ts +68 -0
- package/dist/components/LpLaneNode.vue.d.ts +24 -0
- package/dist/components/LpLink.vue.d.ts +27 -0
- package/dist/components/LpLogViewer.vue.d.ts +92 -0
- package/dist/components/LpModal.vue.d.ts +43 -0
- package/dist/components/LpNotificationBell.vue.d.ts +51 -0
- package/dist/components/LpNumberField.vue.d.ts +14 -0
- package/dist/components/LpOtpInput.vue.d.ts +27 -0
- package/dist/components/LpPagination.vue.d.ts +25 -0
- package/dist/components/LpPasswordInput.vue.d.ts +28 -0
- package/dist/components/LpPhoneInput.vue.d.ts +37 -0
- package/dist/components/LpPopover.vue.d.ts +34 -0
- package/dist/components/LpProgress.vue.d.ts +12 -0
- package/dist/components/LpRadio.vue.d.ts +18 -0
- package/dist/components/LpRadioGroup.vue.d.ts +26 -0
- package/dist/components/LpScrollArea.vue.d.ts +24 -0
- package/dist/components/LpSegmented.vue.d.ts +24 -0
- package/dist/components/LpSelect.vue.d.ts +45 -0
- package/dist/components/LpServiceNode.vue.d.ts +14 -0
- package/dist/components/LpSidebar.vue.d.ts +85 -0
- package/dist/components/LpSidebarNav.vue.d.ts +34 -0
- package/dist/components/LpSkeleton.vue.d.ts +6 -0
- package/dist/components/LpSlider.vue.d.ts +23 -0
- package/dist/components/LpStat.vue.d.ts +22 -0
- package/dist/components/LpStepper.vue.d.ts +10 -0
- package/dist/components/LpSwitch.vue.d.ts +11 -0
- package/dist/components/LpTable.vue.d.ts +63 -0
- package/dist/components/LpTableOfContents.vue.d.ts +19 -0
- package/dist/components/LpTabs.vue.d.ts +45 -0
- package/dist/components/LpTextarea.vue.d.ts +17 -0
- package/dist/components/LpThemeSwitcher.vue.d.ts +40 -0
- package/dist/components/LpToaster.vue.d.ts +3 -0
- package/dist/components/LpTooltip.vue.d.ts +19 -0
- package/dist/components/LpTopologyCanvas.vue.d.ts +154 -0
- package/dist/components/LpUptimeBar.vue.d.ts +30 -0
- package/dist/components/codeHighlight.d.ts +8 -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/sidebar.d.ts +18 -0
- package/dist/composables/useInputFilter.d.ts +14 -0
- package/dist/composables/usePillTransition.d.ts +9 -0
- package/dist/composables/useToast.d.ts +39 -0
- package/dist/countries-data-9rgqJWHo.js +203 -0
- package/dist/icons.d.ts +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +17600 -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/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 +72 -0
- package/dist/theme/useTheme.d.ts +36 -0
- package/package.json +93 -0
- package/src/canvas.css +67 -0
- package/src/component-names.ts +65 -0
- package/src/components/LayoutCanvas.vue +76 -0
- package/src/components/LayoutNode.vue +248 -0
- package/src/components/LpAlert.vue +59 -0
- package/src/components/LpAppShell.vue +210 -0
- package/src/components/LpAutocomplete.vue +244 -0
- package/src/components/LpAvatar.vue +67 -0
- package/src/components/LpBadge.vue +32 -0
- package/src/components/LpBreadcrumbs.vue +35 -0
- package/src/components/LpButton.vue +111 -0
- package/src/components/LpCalendar.vue +134 -0
- package/src/components/LpCard.vue +71 -0
- package/src/components/LpCheckbox.vue +44 -0
- package/src/components/LpCodeBlock.vue +298 -0
- package/src/components/LpCommandPalette.vue +323 -0
- package/src/components/LpConfirmDialog.vue +49 -0
- package/src/components/LpContextMenu.vue +111 -0
- package/src/components/LpDatePicker.vue +117 -0
- package/src/components/LpDisclosure.vue +92 -0
- package/src/components/LpDivider.vue +20 -0
- package/src/components/LpDrawer.vue +402 -0
- package/src/components/LpDropdownMenu.vue +54 -0
- package/src/components/LpEmptyState.vue +21 -0
- package/src/components/LpFormField.vue +31 -0
- package/src/components/LpIcon.vue +49 -0
- package/src/components/LpInfraNode.vue +108 -0
- package/src/components/LpInput.vue +147 -0
- package/src/components/LpLaneNode.vue +48 -0
- package/src/components/LpLink.vue +48 -0
- package/src/components/LpLogViewer.vue +569 -0
- package/src/components/LpModal.vue +123 -0
- package/src/components/LpNotificationBell.vue +238 -0
- package/src/components/LpNumberField.vue +56 -0
- package/src/components/LpOtpInput.vue +81 -0
- package/src/components/LpPagination.vue +165 -0
- package/src/components/LpPasswordInput.vue +50 -0
- package/src/components/LpPhoneInput.vue +241 -0
- package/src/components/LpPopover.vue +42 -0
- package/src/components/LpProgress.vue +30 -0
- package/src/components/LpRadio.vue +28 -0
- package/src/components/LpRadioGroup.vue +43 -0
- package/src/components/LpScrollArea.vue +82 -0
- package/src/components/LpSegmented.vue +83 -0
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpServiceNode.vue +57 -0
- package/src/components/LpSidebar.vue +200 -0
- package/src/components/LpSidebarNav.vue +118 -0
- package/src/components/LpSkeleton.vue +16 -0
- package/src/components/LpSlider.vue +53 -0
- package/src/components/LpStat.vue +90 -0
- package/src/components/LpStepper.vue +46 -0
- package/src/components/LpSwitch.vue +19 -0
- package/src/components/LpTable.vue +252 -0
- package/src/components/LpTableOfContents.vue +183 -0
- package/src/components/LpTabs.vue +120 -0
- package/src/components/LpTextarea.vue +39 -0
- package/src/components/LpThemeSwitcher.vue +168 -0
- package/src/components/LpToaster.vue +216 -0
- package/src/components/LpTooltip.vue +30 -0
- package/src/components/LpTopologyCanvas.vue +370 -0
- package/src/components/LpUptimeBar.vue +126 -0
- package/src/components/codeHighlight.ts +137 -0
- package/src/components/countries-data.ts +207 -0
- package/src/components/countries.ts +67 -0
- package/src/components/dropdown.ts +64 -0
- package/src/components/sidebar.ts +26 -0
- package/src/composables/useInputFilter.ts +89 -0
- package/src/composables/usePillTransition.ts +19 -0
- package/src/composables/useToast.ts +92 -0
- package/src/icons.ts +11 -0
- package/src/index.css +21 -0
- package/src/index.ts +146 -0
- package/src/layout/registry.ts +44 -0
- package/src/layout/tree.ts +288 -0
- package/src/layout/useLayout.ts +134 -0
- package/src/nuxt.ts +22 -0
- package/src/theme/config.ts +48 -0
- package/src/theme/define.ts +50 -0
- package/src/theme/presets.ts +279 -0
- package/src/theme/tokens.ts +151 -0
- package/src/theme/useTheme.ts +288 -0
- package/src/tokens/scrollbar.css +138 -0
- package/src/tokens/tokens.css +333 -0
- package/src/tokens/utilities.css +23 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface TocLink {
|
|
2
|
+
id: string;
|
|
3
|
+
text: string;
|
|
4
|
+
depth?: number;
|
|
5
|
+
children?: TocLink[];
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
links: TocLink[];
|
|
9
|
+
/** Heading shown above the list. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** px offset from the top used as the scroll-spy trigger line. */
|
|
12
|
+
offset?: number;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
title: string;
|
|
16
|
+
offset: number;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface TabItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
/** Optional iconify name (e.g. "lucide:palette"), shown left of the label. */
|
|
5
|
+
icon?: string;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
items: TabItem[];
|
|
10
|
+
/**
|
|
11
|
+
* "contained" (default) wraps the triggers in a bordered, filled bar.
|
|
12
|
+
* "plain" drops the container chrome — a flat row of tabs with only the
|
|
13
|
+
* sliding pill marking the active one (for nav bars over a custom surface).
|
|
14
|
+
*/
|
|
15
|
+
variant?: "contained" | "plain";
|
|
16
|
+
/** Tint the active pill + label with the brand colour (nav-bar style). */
|
|
17
|
+
accent?: boolean;
|
|
18
|
+
/** Stretch the bar to full width with equal-share triggers. */
|
|
19
|
+
block?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare var __VLS_48: {
|
|
22
|
+
value: string;
|
|
23
|
+
}, __VLS_50: {};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
panel?: (props: typeof __VLS_48) => any;
|
|
26
|
+
} & {
|
|
27
|
+
default?: (props: typeof __VLS_50) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
|
+
"update:modelValue": (value: string) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
block: boolean;
|
|
35
|
+
variant: "contained" | "plain";
|
|
36
|
+
accent: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
rows?: number;
|
|
5
|
+
invalid?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TokenSet } from '../theme/tokens';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Active theme NAME (v-model). Falls back to the first theme. */
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
/** Themes to offer. Defaults to all built-in presets. */
|
|
6
|
+
themes?: TokenSet[];
|
|
7
|
+
/**
|
|
8
|
+
* Trigger style:
|
|
9
|
+
* - "swatch" (default): a square showing the active theme's brand colour.
|
|
10
|
+
* - "icon": a sun/moon icon following the active theme's mode.
|
|
11
|
+
* - "pill": swatch + the theme name in a pill (always shows the label).
|
|
12
|
+
*/
|
|
13
|
+
variant?: "swatch" | "icon" | "pill";
|
|
14
|
+
/** Show the active theme's name next to the trigger (forced on for "pill"). */
|
|
15
|
+
showLabel?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Default theme applied on mount when nothing is cached yet — the theme NAME
|
|
18
|
+
* (must be in `themes`) or a TokenSet. Lets a consuming app pick its default
|
|
19
|
+
* declaratively (<LpThemeSwitcher :default="'Violet'">) with no separate
|
|
20
|
+
* bootstrap plugin; a previously saved choice still wins over it.
|
|
21
|
+
*/
|
|
22
|
+
default?: string | TokenSet;
|
|
23
|
+
/** Animate theme changes with the circular reveal. On by default. */
|
|
24
|
+
transition?: boolean;
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
"aria-label"?: string;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
29
|
+
change: (theme: TokenSet) => any;
|
|
30
|
+
"update:modelValue": (name: string) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
onChange?: ((theme: TokenSet) => any) | undefined;
|
|
33
|
+
"onUpdate:modelValue"?: ((name: string) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
size: "sm" | "md" | "lg";
|
|
36
|
+
transition: boolean;
|
|
37
|
+
variant: "swatch" | "icon" | "pill";
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content?: string;
|
|
3
|
+
sideOffset?: number;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_20: {}, __VLS_34: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_20) => any;
|
|
8
|
+
} & {
|
|
9
|
+
content?: (props: typeof __VLS_34) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Connection } from '@vue-flow/core';
|
|
2
|
+
import { InfraNodeData } from './LpInfraNode.vue';
|
|
3
|
+
import { ServiceNodeData } from './LpServiceNode.vue';
|
|
4
|
+
export type EdgeObserved = "applied" | "pending" | "drift";
|
|
5
|
+
export interface TopologyNode {
|
|
6
|
+
id: string;
|
|
7
|
+
position: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
/** Host/group nodes use InfraNodeData; service nodes use ServiceNodeData. */
|
|
12
|
+
data: InfraNodeData | ServiceNodeData;
|
|
13
|
+
/**
|
|
14
|
+
* Node kind: "infra" (a host card, default), "service" (a small service node
|
|
15
|
+
* placed inside a host frame), or "group" (a host frame that contains
|
|
16
|
+
* services). Services set `parent` to their group's id.
|
|
17
|
+
*/
|
|
18
|
+
type?: "infra" | "service" | "group";
|
|
19
|
+
/** For service nodes: the id of the host-frame group node they live in. */
|
|
20
|
+
parent?: string;
|
|
21
|
+
/** For group nodes: pixel size of the frame, and an optional label. */
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
label?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Edge semantics, encoded with both colour AND line style so the two kinds read
|
|
28
|
+
* apart at a glance (and for colour-blind users): "network" = a transport wire
|
|
29
|
+
* between hosts (solid, brand-cyan); "structural" = a depends_on relation
|
|
30
|
+
* between services (dotted, violet, thinner). Inferred from `kind` when omitted
|
|
31
|
+
* (`depends_on` → structural, everything else → network).
|
|
32
|
+
*/
|
|
33
|
+
export type EdgeCategory = "network" | "structural";
|
|
34
|
+
export interface TopologyEdge {
|
|
35
|
+
id: string;
|
|
36
|
+
source: string;
|
|
37
|
+
target: string;
|
|
38
|
+
/** transport label shown on the edge (e.g. "wg", "cloudflared"). */
|
|
39
|
+
kind?: string;
|
|
40
|
+
/** Semantic class driving colour + dash. Inferred from `kind` if omitted. */
|
|
41
|
+
category?: EdgeCategory;
|
|
42
|
+
observed?: EdgeObserved;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A background swimlane: a sized zone (one per project / overlay network) drawn
|
|
46
|
+
* beneath the nodes. The consumer computes the geometry; the canvas renders it
|
|
47
|
+
* as a non-interactive Vue Flow node so it pans/zooms in lockstep with the
|
|
48
|
+
* graph. Lanes are layered below real nodes and never intercept pointer events.
|
|
49
|
+
*/
|
|
50
|
+
export interface TopologyLane {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
/** Optional accent colour token for the lane border + label. */
|
|
58
|
+
accent?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Canvas viewport transform — for restoring a saved pan/zoom. */
|
|
61
|
+
export interface CanvasViewport {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
zoom: number;
|
|
65
|
+
}
|
|
66
|
+
type __VLS_Props = {
|
|
67
|
+
nodes: TopologyNode[];
|
|
68
|
+
edges: TopologyEdge[];
|
|
69
|
+
/** Allow drag-to-connect (emits `connect`). Default false (read-only). */
|
|
70
|
+
connectable?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Desktop-style marquee selection: drag on empty canvas to rubber-band a
|
|
73
|
+
* box and select every node inside; the selected set then drags together.
|
|
74
|
+
* Hold Shift to add to the selection. Panning moves to a right-drag / the
|
|
75
|
+
* space bar so left-drag is free for selecting. Default false (left-drag
|
|
76
|
+
* pans, the classic read-only behaviour). Emits `selection-change`.
|
|
77
|
+
*/
|
|
78
|
+
selectable?: boolean;
|
|
79
|
+
/** Show the edge-type legend (Network / Depends-on / Pending / Drift). */
|
|
80
|
+
legend?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Background swimlanes drawn beneath the nodes (one per project / overlay).
|
|
83
|
+
* Non-interactive; pan/zoom with the graph. Empty = no lanes.
|
|
84
|
+
*/
|
|
85
|
+
lanes?: TopologyLane[];
|
|
86
|
+
};
|
|
87
|
+
declare function applyViewport(v: CanvasViewport): Promise<void>;
|
|
88
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
89
|
+
fitView: import('@vue-flow/core').FitView;
|
|
90
|
+
setViewport: typeof applyViewport;
|
|
91
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
92
|
+
connect: (value: Connection) => any;
|
|
93
|
+
"node-select": (id: string) => any;
|
|
94
|
+
"node-contextmenu": (value: {
|
|
95
|
+
id: string;
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
}) => any;
|
|
99
|
+
"edge-contextmenu": (value: {
|
|
100
|
+
id: string;
|
|
101
|
+
x: number;
|
|
102
|
+
y: number;
|
|
103
|
+
}) => any;
|
|
104
|
+
"pane-click": () => any;
|
|
105
|
+
"selection-change": (ids: string[]) => any;
|
|
106
|
+
"update:nodes": (value: TopologyNode[]) => any;
|
|
107
|
+
"node-drag-stop": (value: {
|
|
108
|
+
id: string;
|
|
109
|
+
position: {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
};
|
|
113
|
+
}) => any;
|
|
114
|
+
"viewport-change": (value: {
|
|
115
|
+
zoom: number;
|
|
116
|
+
x: number;
|
|
117
|
+
y: number;
|
|
118
|
+
}) => any;
|
|
119
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
120
|
+
onConnect?: ((value: Connection) => any) | undefined;
|
|
121
|
+
"onNode-select"?: ((id: string) => any) | undefined;
|
|
122
|
+
"onNode-contextmenu"?: ((value: {
|
|
123
|
+
id: string;
|
|
124
|
+
x: number;
|
|
125
|
+
y: number;
|
|
126
|
+
}) => any) | undefined;
|
|
127
|
+
"onEdge-contextmenu"?: ((value: {
|
|
128
|
+
id: string;
|
|
129
|
+
x: number;
|
|
130
|
+
y: number;
|
|
131
|
+
}) => any) | undefined;
|
|
132
|
+
"onPane-click"?: (() => any) | undefined;
|
|
133
|
+
"onSelection-change"?: ((ids: string[]) => any) | undefined;
|
|
134
|
+
"onUpdate:nodes"?: ((value: TopologyNode[]) => any) | undefined;
|
|
135
|
+
"onNode-drag-stop"?: ((value: {
|
|
136
|
+
id: string;
|
|
137
|
+
position: {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
}) => any) | undefined;
|
|
142
|
+
"onViewport-change"?: ((value: {
|
|
143
|
+
zoom: number;
|
|
144
|
+
x: number;
|
|
145
|
+
y: number;
|
|
146
|
+
}) => any) | undefined;
|
|
147
|
+
}>, {
|
|
148
|
+
legend: boolean;
|
|
149
|
+
connectable: boolean;
|
|
150
|
+
selectable: boolean;
|
|
151
|
+
lanes: TopologyLane[];
|
|
152
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
153
|
+
declare const _default: typeof __VLS_export;
|
|
154
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type UptimeStatus = "operational" | "degraded" | "down" | "maintenance" | "empty";
|
|
2
|
+
export interface UptimeSegment {
|
|
3
|
+
/** Health of this slice. `empty` renders a faded placeholder (no data). */
|
|
4
|
+
status: UptimeStatus;
|
|
5
|
+
/** Optional rich tooltip body; falls back to a humanised status. */
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** Oldest → newest. Each entry is one slice of the timeline. */
|
|
10
|
+
segments: UptimeSegment[];
|
|
11
|
+
/** Caption shown under the left edge (oldest point). */
|
|
12
|
+
startLabel?: string;
|
|
13
|
+
/** Caption shown under the right edge (newest point). */
|
|
14
|
+
endLabel?: string;
|
|
15
|
+
/** Show the computed uptime % above the bar. */
|
|
16
|
+
showUptime?: boolean;
|
|
17
|
+
/** Override the headline shown next to the uptime %. */
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Per-status colours. Any CSS colour (hex, rgb, `var(--token)`). Unset
|
|
21
|
+
* statuses fall back to the theme tokens below. Pass e.g.
|
|
22
|
+
* `{ degraded: '#ffb84d' }` to recolour just one state.
|
|
23
|
+
*/
|
|
24
|
+
colors?: Partial<Record<UptimeStatus, string>>;
|
|
25
|
+
};
|
|
26
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
showUptime: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type CodeLang = "ts" | "js" | "json" | "bash" | "html" | "python" | "rust" | "yaml" | "toml" | "kotlin" | "java" | "groovy" | "plain";
|
|
2
|
+
export interface Token {
|
|
3
|
+
text: string;
|
|
4
|
+
/** CSS class for this token, or "" for plain text. */
|
|
5
|
+
cls: string;
|
|
6
|
+
}
|
|
7
|
+
/** Tokenize one line into coloured spans. JSON keys get the property colour. */
|
|
8
|
+
export declare function tokenizeLine(line: string, lang: CodeLang): Token[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Country {
|
|
2
|
+
/** ISO 3166-1 alpha-2, uppercase (e.g. "US"). Drives the flag. */
|
|
3
|
+
iso2: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Calling code without "+", e.g. "1", "44", "380". */
|
|
6
|
+
dial: string;
|
|
7
|
+
}
|
|
8
|
+
/** Turn an ISO2 code into its flag emoji (two regional-indicator symbols). */
|
|
9
|
+
export declare function flagEmoji(iso2: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Load the country table (code-split chunk). Cached after first call, so repeat
|
|
12
|
+
* calls are synchronous-ish (resolved promise) with no re-import cost.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadCountries(): Promise<Country[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Best-effort: pick the country whose dial code prefixes the given E.164-ish
|
|
17
|
+
* value (longest match wins, so "1868" beats "1"). For shared codes the primary
|
|
18
|
+
* country is preferred. Pass the list (from loadCountries). Undefined if none.
|
|
19
|
+
*/
|
|
20
|
+
export declare function matchCountryByValue(value: string, list: Country[]): Country | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Enter/exit animation for state-open panels (Select, Popover, Dropdown, …). */
|
|
2
|
+
export declare const POPOVER_ANIM: string;
|
|
3
|
+
/** Tooltip variant: faster, and reka uses `delayed-open` instead of `open`. */
|
|
4
|
+
export declare const TOOLTIP_ANIM: string;
|
|
5
|
+
/**
|
|
6
|
+
* The bare floating surface (border, raised overlay fill, blur, shadow) without
|
|
7
|
+
* any animation — pair with POPOVER_ANIM or TOOLTIP_ANIM. `group` lets option
|
|
8
|
+
* rows read the panel's data-side for the cascade direction.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PANEL_SURFACE = "group rounded-control border border-line bg-surface-overlay shadow-panel backdrop-blur";
|
|
11
|
+
/**
|
|
12
|
+
* Surface + the state-open animation. Add width/padding/overflow and the z-layer
|
|
13
|
+
* at the call-site (z-layer omitted so tooltips can use z-(--z-tooltip) while the
|
|
14
|
+
* rest use z-(--z-popover)).
|
|
15
|
+
*/
|
|
16
|
+
export declare const POPOVER_PANEL: string;
|
|
17
|
+
/**
|
|
18
|
+
* A selectable option row: layout, highlight state, and the staggered cascade.
|
|
19
|
+
* Cascades downward by default and upward when the panel is flipped above the
|
|
20
|
+
* trigger (group-data-[side=top]). Pair with an inline animationDelay for the
|
|
21
|
+
* stagger. `flex` + gap are included; add justify/extra layout if needed.
|
|
22
|
+
*/
|
|
23
|
+
export declare const OPTION_ITEM: string;
|
|
24
|
+
/**
|
|
25
|
+
* Micro-animation for a close / clear "✕" icon: a quarter-turn on hover and a
|
|
26
|
+
* dip on press. Put on the <LpIcon>, with `group` on its button. Shared by
|
|
27
|
+
* Modal, Drawer, Toaster and the Autocomplete clear button.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CLOSE_ICON: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ContextMenuItemDef } from './LpContextMenu.vue';
|
|
2
|
+
export interface SidebarItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** Render as a link instead of a button. */
|
|
7
|
+
href?: string;
|
|
8
|
+
/** Count chip on the right (number or short string). */
|
|
9
|
+
badge?: number | string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Right-click menu for this item (e.g. "Open in new tab", "Pin"). */
|
|
12
|
+
menu?: ContextMenuItemDef[];
|
|
13
|
+
}
|
|
14
|
+
export interface SidebarSection {
|
|
15
|
+
/** Optional heading above the group. */
|
|
16
|
+
title?: string;
|
|
17
|
+
items: SidebarItem[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export interface UseInputFilterOptions {
|
|
3
|
+
/** One-char RegExp of allowed characters. Disallowed input is blocked. */
|
|
4
|
+
restrict?: MaybeRefOrGetter<RegExp | undefined>;
|
|
5
|
+
/** RegExp/string the full value must match to be valid. Validation only. */
|
|
6
|
+
pattern?: MaybeRefOrGetter<RegExp | string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare function useInputFilter(options?: UseInputFilterOptions): {
|
|
9
|
+
isInvalid: (value: string | undefined) => boolean;
|
|
10
|
+
onBeforeInput: (event: InputEvent) => void;
|
|
11
|
+
onPaste: (event: ClipboardEvent) => void;
|
|
12
|
+
patternRe: import('vue').ComputedRef<RegExp | undefined>;
|
|
13
|
+
restrict: import('vue').ComputedRef<RegExp | undefined>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type ToastVariant = "info" | "success" | "warning" | "error";
|
|
2
|
+
export interface ToastAction {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => void | Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export interface ToastItem {
|
|
7
|
+
id: number;
|
|
8
|
+
title?: string;
|
|
9
|
+
message: string;
|
|
10
|
+
variant: ToastVariant;
|
|
11
|
+
duration: number;
|
|
12
|
+
/** Epoch ms when this toast auto-dismisses, or null if it never does. */
|
|
13
|
+
dismissAt: number | null;
|
|
14
|
+
actions?: ToastAction[];
|
|
15
|
+
/** Whole-toast click handler (UAProject-style clickable toast). */
|
|
16
|
+
onClick?: () => void | Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface ToastOptions {
|
|
19
|
+
title?: string;
|
|
20
|
+
duration?: number;
|
|
21
|
+
actions?: ToastAction[];
|
|
22
|
+
onClick?: () => void | Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
declare function push(variant: ToastVariant, message: string, options?: ToastOptions): number;
|
|
25
|
+
declare function dismiss(id: number): void;
|
|
26
|
+
declare function clear(): void;
|
|
27
|
+
export declare function useToast(): {
|
|
28
|
+
queue: ToastItem[];
|
|
29
|
+
toast: (message: string, o?: ToastOptions) => number;
|
|
30
|
+
info: (message: string, o?: ToastOptions) => number;
|
|
31
|
+
success: (message: string, o?: ToastOptions) => number;
|
|
32
|
+
warning: (message: string, o?: ToastOptions) => number;
|
|
33
|
+
error: (message: string, o?: ToastOptions) => number;
|
|
34
|
+
/** Low-level push for bridges (e.g. @leavepulse/ui-sdk apiError). */
|
|
35
|
+
push: typeof push;
|
|
36
|
+
dismiss: typeof dismiss;
|
|
37
|
+
clear: typeof clear;
|
|
38
|
+
};
|
|
39
|
+
export {};
|