@leavepulse/ui 0.41.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{LpCommandPalette-DyT6aGdW.css → LpCommandPalette-s_kKuCRf.css} +21 -21
- package/dist/chunks/{LpAddressInput-CMjaPQVw.js → LpAddressInput-B-Zvxsn7.js} +1 -1
- package/dist/chunks/{LpAppShell-Bcv6EhqU.js → LpAppShell-BGQVIY-3.js} +1 -1
- package/dist/chunks/{LpConfirmDialog-BNAvOR24.js → LpConfirmDialog-Q-bxff8z.js} +1 -1
- package/dist/chunks/{LpDrawer-DgaS2s2i.js → LpDrawer-BZ6k3hvo.js} +3 -3
- package/dist/chunks/{LpLightbox-oLqyjOln.js → LpLightbox-2sYVMY-S.js} +12 -4
- package/dist/chunks/{LpMediaGallery-Cid7PGYx.js → LpMediaGallery-FF-NquIo.js} +1 -1
- package/dist/chunks/{LpModal-8bja5bWS.js → LpModal-Bt0pQCI_.js} +2 -2
- package/dist/chunks/{LpModalNav-w9kfwHqO.js → LpModalNav-YaifHrXC.js} +2 -2
- package/dist/chunks/{LpSidebar-DlTn5nXc.js → LpSidebar-ClBUwoEz.js} +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +124 -115
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/commandSearch.js +66 -0
- package/dist/components/modalDepth.js +3 -2
- package/dist/composables/useHotkeys.js +41 -21
- package/dist/index.js +13 -9
- package/package.json +3 -3
- package/src/components/LpCommandPalette.vue +81 -99
- package/src/components/LpDrawer.vue +3 -3
- package/src/components/LpLightbox.vue +11 -5
- package/src/components/LpModal.vue +2 -2
- package/src/components/commandSearch.ts +92 -0
- package/src/components/modalDepth.ts +4 -48
- package/src/composables/useHotkeys.ts +54 -33
- package/src/index.ts +2 -0
- package/src/tokens/tokens.css +13 -19
- package/dist/component-names.d.ts +0 -1
- package/dist/components/LayoutCanvas.vue.d.ts +0 -28
- package/dist/components/LayoutNode.vue.d.ts +0 -40
- package/dist/components/LpActionBar.vue.d.ts +0 -84
- package/dist/components/LpAddressInput.vue.d.ts +0 -70
- package/dist/components/LpAlert.vue.d.ts +0 -44
- package/dist/components/LpAppShell.vue.d.ts +0 -123
- package/dist/components/LpAutocomplete.vue.d.ts +0 -50
- package/dist/components/LpAvatar.vue.d.ts +0 -34
- package/dist/components/LpBadge.vue.d.ts +0 -20
- package/dist/components/LpBreadcrumbs.vue.d.ts +0 -32
- package/dist/components/LpButton.vue.d.ts +0 -113
- package/dist/components/LpCalendar.vue.d.ts +0 -29
- package/dist/components/LpCard.vue.d.ts +0 -60
- package/dist/components/LpChart.vue.d.ts +0 -130
- package/dist/components/LpCheckbox.vue.d.ts +0 -32
- package/dist/components/LpCodeBlock.vue.d.ts +0 -58
- package/dist/components/LpColorPicker.vue.d.ts +0 -124
- package/dist/components/LpCommandPalette.vue.d.ts +0 -206
- package/dist/components/LpConfirmDialog.vue.d.ts +0 -59
- package/dist/components/LpContextMenu.vue.d.ts +0 -44
- package/dist/components/LpDatePicker.vue.d.ts +0 -33
- package/dist/components/LpDisclosure.vue.d.ts +0 -47
- package/dist/components/LpDivider.vue.d.ts +0 -17
- package/dist/components/LpDrawer.vue.d.ts +0 -170
- package/dist/components/LpDropdownMenu.vue.d.ts +0 -23
- package/dist/components/LpDropzone.vue.d.ts +0 -90
- package/dist/components/LpEmptyState.vue.d.ts +0 -28
- package/dist/components/LpFileTree.vue.d.ts +0 -126
- package/dist/components/LpFileTreeNode.vue.d.ts +0 -62
- package/dist/components/LpFormField.vue.d.ts +0 -24
- package/dist/components/LpIcon.vue.d.ts +0 -8
- package/dist/components/LpImageEditor.vue.d.ts +0 -106
- package/dist/components/LpInfraNode.vue.d.ts +0 -65
- package/dist/components/LpInput.vue.d.ts +0 -80
- package/dist/components/LpLaneNode.vue.d.ts +0 -24
- package/dist/components/LpLightbox.vue.d.ts +0 -62
- package/dist/components/LpLink.vue.d.ts +0 -93
- package/dist/components/LpLogViewer.vue.d.ts +0 -153
- package/dist/components/LpMapPicker.vue.d.ts +0 -59
- package/dist/components/LpMediaGallery.vue.d.ts +0 -80
- package/dist/components/LpModal.vue.d.ts +0 -66
- package/dist/components/LpModalNav.vue.d.ts +0 -66
- package/dist/components/LpNotificationBell.vue.d.ts +0 -85
- package/dist/components/LpNumberField.vue.d.ts +0 -21
- package/dist/components/LpNumberFlow.vue.d.ts +0 -35
- package/dist/components/LpOtpInput.vue.d.ts +0 -39
- package/dist/components/LpPagination.vue.d.ts +0 -35
- package/dist/components/LpPasswordInput.vue.d.ts +0 -36
- package/dist/components/LpPhoneInput.vue.d.ts +0 -49
- package/dist/components/LpPie.vue.d.ts +0 -196
- package/dist/components/LpPopover.vue.d.ts +0 -34
- package/dist/components/LpProgress.vue.d.ts +0 -66
- package/dist/components/LpRadio.vue.d.ts +0 -18
- package/dist/components/LpRadioGroup.vue.d.ts +0 -26
- package/dist/components/LpRollingText.vue.d.ts +0 -33
- package/dist/components/LpScrollArea.vue.d.ts +0 -28
- package/dist/components/LpSection.vue.d.ts +0 -120
- package/dist/components/LpSegmented.vue.d.ts +0 -30
- package/dist/components/LpSelect.vue.d.ts +0 -47
- package/dist/components/LpServiceNode.vue.d.ts +0 -14
- package/dist/components/LpShift.vue.d.ts +0 -36
- package/dist/components/LpShortcutsDialog.vue.d.ts +0 -24
- package/dist/components/LpSidebar.vue.d.ts +0 -146
- package/dist/components/LpSidebarNav.vue.d.ts +0 -54
- package/dist/components/LpSkeleton.vue.d.ts +0 -16
- package/dist/components/LpSlider.vue.d.ts +0 -30
- package/dist/components/LpSparkline.vue.d.ts +0 -48
- package/dist/components/LpStat.vue.d.ts +0 -69
- package/dist/components/LpStepper.vue.d.ts +0 -36
- package/dist/components/LpSwitch.vue.d.ts +0 -42
- package/dist/components/LpTable.vue.d.ts +0 -124
- package/dist/components/LpTableOfContents.vue.d.ts +0 -19
- package/dist/components/LpTabs.vue.d.ts +0 -47
- package/dist/components/LpTextarea.vue.d.ts +0 -22
- package/dist/components/LpThemeSwitcher.vue.d.ts +0 -47
- package/dist/components/LpTilt.vue.d.ts +0 -31
- package/dist/components/LpTimeField.vue.d.ts +0 -24
- package/dist/components/LpToaster.vue.d.ts +0 -3
- package/dist/components/LpTooltip.vue.d.ts +0 -58
- package/dist/components/LpTopologyCanvas.vue.d.ts +0 -205
- package/dist/components/LpUptimeBar.vue.d.ts +0 -46
- package/dist/components/LpWaypointEdge.vue.d.ts +0 -21
- package/dist/components/actionBar.d.ts +0 -19
- package/dist/components/address.d.ts +0 -107
- package/dist/components/chart.d.ts +0 -180
- package/dist/components/codeHighlight.d.ts +0 -8
- package/dist/components/color.d.ts +0 -65
- package/dist/components/countries-data.d.ts +0 -2
- package/dist/components/countries.d.ts +0 -20
- package/dist/components/dropdown.d.ts +0 -29
- package/dist/components/fileTree.d.ts +0 -79
- package/dist/components/lightbox.d.ts +0 -24
- package/dist/components/modalDepth.d.ts +0 -15
- package/dist/components/sidebar.d.ts +0 -42
- package/dist/composables/easing.d.ts +0 -46
- package/dist/composables/useAsyncTask.d.ts +0 -18
- package/dist/composables/useClipboard.d.ts +0 -46
- package/dist/composables/useFormDraft.d.ts +0 -67
- package/dist/composables/useGlass.d.ts +0 -9
- package/dist/composables/useHotkeys.d.ts +0 -99
- package/dist/composables/useInputFilter.d.ts +0 -14
- package/dist/composables/useMergedClass.d.ts +0 -42
- package/dist/composables/usePillTransition.d.ts +0 -21
- package/dist/composables/useReveal.d.ts +0 -26
- package/dist/composables/useRovingFocus.d.ts +0 -49
- package/dist/composables/useSettled.d.ts +0 -26
- package/dist/composables/useShift.d.ts +0 -35
- package/dist/composables/useTilt.d.ts +0 -23
- package/dist/composables/useToast.d.ts +0 -41
- package/dist/composables/useZoomPan.d.ts +0 -58
- package/dist/icons.d.ts +0 -1
- package/dist/index.d.ts +0 -160
- package/dist/layout/registry.d.ts +0 -26
- package/dist/layout/tree.d.ts +0 -75
- package/dist/layout/useLayout.d.ts +0 -39
- package/dist/theme/backdrop.d.ts +0 -9
- package/dist/theme/config.d.ts +0 -16
- package/dist/theme/define.d.ts +0 -12
- package/dist/theme/presets.d.ts +0 -20
- package/dist/theme/tokens.d.ts +0 -75
- package/dist/theme/useTheme.d.ts +0 -46
|
@@ -1,205 +0,0 @@
|
|
|
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
|
-
* Push the edge into the background, matching the node data's `dimmed`. A
|
|
45
|
-
* focus highlight has to fade the edges too — dimming only the nodes leaves
|
|
46
|
-
* every unrelated line at full strength.
|
|
47
|
-
*/
|
|
48
|
-
dimmed?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Points the edge should curve through, when the host's layout knows where
|
|
51
|
-
* the gaps are. Requires `edgeType: "waypoints"`; ignored otherwise.
|
|
52
|
-
*/
|
|
53
|
-
waypoints?: {
|
|
54
|
-
x: number;
|
|
55
|
-
y: number;
|
|
56
|
-
}[];
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* A background swimlane: a sized zone (one per project / overlay network) drawn
|
|
60
|
-
* beneath the nodes. The consumer computes the geometry; the canvas renders it
|
|
61
|
-
* as a non-interactive Vue Flow node so it pans/zooms in lockstep with the
|
|
62
|
-
* graph. Lanes are layered below real nodes and never intercept pointer events.
|
|
63
|
-
*/
|
|
64
|
-
export interface TopologyLane {
|
|
65
|
-
id: string;
|
|
66
|
-
label: string;
|
|
67
|
-
x: number;
|
|
68
|
-
y: number;
|
|
69
|
-
width: number;
|
|
70
|
-
height: number;
|
|
71
|
-
/** Optional accent colour token for the lane border + label. */
|
|
72
|
-
accent?: string;
|
|
73
|
-
}
|
|
74
|
-
/** Canvas viewport transform — for restoring a saved pan/zoom. */
|
|
75
|
-
export interface CanvasViewport {
|
|
76
|
-
x: number;
|
|
77
|
-
y: number;
|
|
78
|
-
zoom: number;
|
|
79
|
-
}
|
|
80
|
-
type __VLS_Props = {
|
|
81
|
-
nodes: TopologyNode[];
|
|
82
|
-
edges: TopologyEdge[];
|
|
83
|
-
/** Allow drag-to-connect (emits `connect`). Default false (read-only). */
|
|
84
|
-
connectable?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Desktop-style marquee selection: drag on empty canvas to rubber-band a
|
|
87
|
-
* box and select every node inside; the selected set then drags together.
|
|
88
|
-
* Hold Shift to add to the selection. Panning moves to a right-drag / the
|
|
89
|
-
* space bar so left-drag is free for selecting. Default false (left-drag
|
|
90
|
-
* pans, the classic read-only behaviour). Emits `selection-change`.
|
|
91
|
-
*/
|
|
92
|
-
selectable?: boolean;
|
|
93
|
-
/** Show the edge-type legend (Network / Depends-on / Pending / Drift). */
|
|
94
|
-
legend?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Where the legend sits. Defaults to bottom-left: hosts commonly float a
|
|
97
|
-
* toolbar across the top, which would cover a top-anchored legend, and the
|
|
98
|
-
* minimap owns the bottom-right.
|
|
99
|
-
*/
|
|
100
|
-
legendPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
101
|
-
/**
|
|
102
|
-
* Edge shape. The default bezier bulges away from the straight line between
|
|
103
|
-
* its ends, which suits a free-form graph and cuts through everything in a
|
|
104
|
-
* LAYERED one — a long edge crosses the cards standing between its columns.
|
|
105
|
-
* `smoothstep` routes orthogonally through the gaps instead.
|
|
106
|
-
*/
|
|
107
|
-
edgeType?: "default" | "smoothstep" | "step" | "straight" | "waypoints";
|
|
108
|
-
/** Rename legend rows to match what this graph's edges actually mean. */
|
|
109
|
-
legendLabels?: Partial<Record<"network" | "structural" | "pending" | "drift", string>>;
|
|
110
|
-
/**
|
|
111
|
-
* Background swimlanes drawn beneath the nodes (one per project / overlay).
|
|
112
|
-
* Non-interactive; pan/zoom with the graph. Empty = no lanes.
|
|
113
|
-
*/
|
|
114
|
-
lanes?: TopologyLane[];
|
|
115
|
-
/**
|
|
116
|
-
* Minimap and zoom controls. On by default — a full-page map needs both —
|
|
117
|
-
* but a graph embedded at a few hundred pixels has nothing to navigate, and
|
|
118
|
-
* the overlays then cover a real share of the picture.
|
|
119
|
-
*/
|
|
120
|
-
minimap?: boolean;
|
|
121
|
-
controls?: boolean;
|
|
122
|
-
};
|
|
123
|
-
declare function applyViewport(v: CanvasViewport): Promise<void>;
|
|
124
|
-
declare var __VLS_29: {};
|
|
125
|
-
type __VLS_Slots = {} & {
|
|
126
|
-
'legend-extra'?: (props: typeof __VLS_29) => any;
|
|
127
|
-
};
|
|
128
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
129
|
-
fitView: import('@vue-flow/core').FitView;
|
|
130
|
-
setViewport: typeof applyViewport;
|
|
131
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
132
|
-
connect: (value: Connection) => any;
|
|
133
|
-
"node-select": (id: string) => any;
|
|
134
|
-
"node-activate": (id: string) => any;
|
|
135
|
-
"node-contextmenu": (value: {
|
|
136
|
-
id: string;
|
|
137
|
-
x: number;
|
|
138
|
-
y: number;
|
|
139
|
-
}) => any;
|
|
140
|
-
"edge-contextmenu": (value: {
|
|
141
|
-
id: string;
|
|
142
|
-
x: number;
|
|
143
|
-
y: number;
|
|
144
|
-
}) => any;
|
|
145
|
-
"pane-click": () => any;
|
|
146
|
-
"selection-change": (ids: string[]) => any;
|
|
147
|
-
"update:nodes": (value: TopologyNode[]) => any;
|
|
148
|
-
"node-drag-stop": (value: {
|
|
149
|
-
id: string;
|
|
150
|
-
position: {
|
|
151
|
-
x: number;
|
|
152
|
-
y: number;
|
|
153
|
-
};
|
|
154
|
-
}) => any;
|
|
155
|
-
"viewport-change": (value: {
|
|
156
|
-
zoom: number;
|
|
157
|
-
x: number;
|
|
158
|
-
y: number;
|
|
159
|
-
}) => any;
|
|
160
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
161
|
-
onConnect?: ((value: Connection) => any) | undefined;
|
|
162
|
-
"onNode-select"?: ((id: string) => any) | undefined;
|
|
163
|
-
"onNode-activate"?: ((id: string) => any) | undefined;
|
|
164
|
-
"onNode-contextmenu"?: ((value: {
|
|
165
|
-
id: string;
|
|
166
|
-
x: number;
|
|
167
|
-
y: number;
|
|
168
|
-
}) => any) | undefined;
|
|
169
|
-
"onEdge-contextmenu"?: ((value: {
|
|
170
|
-
id: string;
|
|
171
|
-
x: number;
|
|
172
|
-
y: number;
|
|
173
|
-
}) => any) | undefined;
|
|
174
|
-
"onPane-click"?: (() => any) | undefined;
|
|
175
|
-
"onSelection-change"?: ((ids: string[]) => any) | undefined;
|
|
176
|
-
"onUpdate:nodes"?: ((value: TopologyNode[]) => any) | undefined;
|
|
177
|
-
"onNode-drag-stop"?: ((value: {
|
|
178
|
-
id: string;
|
|
179
|
-
position: {
|
|
180
|
-
x: number;
|
|
181
|
-
y: number;
|
|
182
|
-
};
|
|
183
|
-
}) => any) | undefined;
|
|
184
|
-
"onViewport-change"?: ((value: {
|
|
185
|
-
zoom: number;
|
|
186
|
-
x: number;
|
|
187
|
-
y: number;
|
|
188
|
-
}) => any) | undefined;
|
|
189
|
-
}>, {
|
|
190
|
-
legend: boolean;
|
|
191
|
-
controls: boolean;
|
|
192
|
-
connectable: boolean;
|
|
193
|
-
selectable: boolean;
|
|
194
|
-
legendPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
195
|
-
lanes: TopologyLane[];
|
|
196
|
-
minimap: boolean;
|
|
197
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
198
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
199
|
-
declare const _default: typeof __VLS_export;
|
|
200
|
-
export default _default;
|
|
201
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
202
|
-
new (): {
|
|
203
|
-
$slots: S;
|
|
204
|
-
};
|
|
205
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
declare const _default: typeof __VLS_export;
|
|
9
|
-
export default _default;
|
|
10
|
-
declare const __VLS_export: import('vue').DefineComponent<{
|
|
11
|
-
/** Oldest → newest. Each entry is one slice of the timeline. */
|
|
12
|
-
segments: UptimeSegment[];
|
|
13
|
-
/** Caption shown under the left edge (oldest point). */
|
|
14
|
-
startLabel?: string;
|
|
15
|
-
/** Caption shown under the right edge (newest point). */
|
|
16
|
-
endLabel?: string;
|
|
17
|
-
/** Show the computed uptime % above the bar. */
|
|
18
|
-
showUptime?: boolean;
|
|
19
|
-
/** Override the headline shown next to the uptime %. */
|
|
20
|
-
title?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Per-status colours. Any CSS colour (hex, rgb, `var(--token)`). Unset
|
|
23
|
-
* statuses fall back to the theme tokens below. Pass e.g.
|
|
24
|
-
* `{ degraded: '#ffb84d' }` to recolour just one state.
|
|
25
|
-
*/
|
|
26
|
-
colors?: Partial<Record<UptimeStatus, string>>;
|
|
27
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
28
|
-
/** Oldest → newest. Each entry is one slice of the timeline. */
|
|
29
|
-
segments: UptimeSegment[];
|
|
30
|
-
/** Caption shown under the left edge (oldest point). */
|
|
31
|
-
startLabel?: string;
|
|
32
|
-
/** Caption shown under the right edge (newest point). */
|
|
33
|
-
endLabel?: string;
|
|
34
|
-
/** Show the computed uptime % above the bar. */
|
|
35
|
-
showUptime?: boolean;
|
|
36
|
-
/** Override the headline shown next to the uptime %. */
|
|
37
|
-
title?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Per-status colours. Any CSS colour (hex, rgb, `var(--token)`). Unset
|
|
40
|
-
* statuses fall back to the theme tokens below. Pass e.g.
|
|
41
|
-
* `{ degraded: '#ffb84d' }` to recolour just one state.
|
|
42
|
-
*/
|
|
43
|
-
colors?: Partial<Record<UptimeStatus, string>>;
|
|
44
|
-
}> & Readonly<{}>, {
|
|
45
|
-
showUptime: boolean;
|
|
46
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Position } from '@vue-flow/core';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
id: string;
|
|
4
|
-
sourceX: number;
|
|
5
|
-
sourceY: number;
|
|
6
|
-
targetX: number;
|
|
7
|
-
targetY: number;
|
|
8
|
-
sourcePosition?: Position;
|
|
9
|
-
targetPosition?: Position;
|
|
10
|
-
data?: {
|
|
11
|
-
waypoints?: {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
markerEnd?: string;
|
|
17
|
-
style?: Record<string, unknown>;
|
|
18
|
-
};
|
|
19
|
-
declare const __VLS_export: 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>;
|
|
20
|
-
declare const _default: typeof __VLS_export;
|
|
21
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface BarEntry {
|
|
2
|
-
id: number;
|
|
3
|
-
/** Measured height in px, reported by the bar once it is on screen. */
|
|
4
|
-
height: number;
|
|
5
|
-
}
|
|
6
|
-
/** Gap between stacked bars, matching the padding the bar sits in. */
|
|
7
|
-
export declare const STACK_GAP = 8;
|
|
8
|
-
/**
|
|
9
|
-
* Registers a bar for as long as the calling scope lives. `setHeight` reports
|
|
10
|
-
* the measured height; `offset()` returns how far up this bar should sit —
|
|
11
|
-
* the total height of every bar that opened before it.
|
|
12
|
-
*/
|
|
13
|
-
export declare function useBarStack(): {
|
|
14
|
-
register: () => void;
|
|
15
|
-
unregister: () => void;
|
|
16
|
-
setHeight: (height: number) => void;
|
|
17
|
-
offset: () => number;
|
|
18
|
-
bars: import('vue').Ref<BarEntry[] | undefined, BarEntry[] | undefined>;
|
|
19
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
export interface LatLon {
|
|
2
|
-
lat: number;
|
|
3
|
-
lon: number;
|
|
4
|
-
}
|
|
5
|
-
export interface AddressValue {
|
|
6
|
-
/** Street and house number, e.g. "Baker Street 221B". */
|
|
7
|
-
line: string;
|
|
8
|
-
/** Apartment, suite, floor — only shown when LpAddressInput asks for it. */
|
|
9
|
-
line2?: string;
|
|
10
|
-
city: string;
|
|
11
|
-
postalCode: string;
|
|
12
|
-
/** ISO 3166-1 alpha-2, uppercase — same shape LpPhoneInput uses. */
|
|
13
|
-
country: string;
|
|
14
|
-
/** Set once a point is picked on the map or a suggestion carries one. */
|
|
15
|
-
lat?: number;
|
|
16
|
-
lon?: number;
|
|
17
|
-
}
|
|
18
|
-
export declare function emptyAddress(): AddressValue;
|
|
19
|
-
export interface AddressSuggestion {
|
|
20
|
-
/** Text to put in the field that asked for it. */
|
|
21
|
-
value: string;
|
|
22
|
-
label: string;
|
|
23
|
-
/** Fuller context — the whole formatted address, shown under the label. */
|
|
24
|
-
description?: string;
|
|
25
|
-
/** Parsed parts, as much as the provider resolved. */
|
|
26
|
-
address: Partial<AddressValue>;
|
|
27
|
-
lat?: number;
|
|
28
|
-
lon?: number;
|
|
29
|
-
}
|
|
30
|
-
/** Which field is being completed — providers can bias results accordingly. */
|
|
31
|
-
export type AddressField = "line" | "city" | "postalCode";
|
|
32
|
-
export interface GeocodeQuery {
|
|
33
|
-
/** Restrict to a country (ISO2) when the form already has one. */
|
|
34
|
-
country?: string;
|
|
35
|
-
/** Preferred result language, as an Accept-Language value. */
|
|
36
|
-
language?: string;
|
|
37
|
-
limit?: number;
|
|
38
|
-
signal?: AbortSignal;
|
|
39
|
-
}
|
|
40
|
-
export interface GeocodeProvider {
|
|
41
|
-
search(term: string, field: AddressField, query?: GeocodeQuery): Promise<AddressSuggestion[]>;
|
|
42
|
-
/** Point → address. Undefined when the point resolves to nothing. */
|
|
43
|
-
reverse(lat: number, lon: number, query?: GeocodeQuery): Promise<AddressSuggestion | undefined>;
|
|
44
|
-
}
|
|
45
|
-
export interface NominatimOptions {
|
|
46
|
-
/** Base URL of a Nominatim instance, no trailing slash. */
|
|
47
|
-
endpoint?: string;
|
|
48
|
-
language?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Public Nominatim asks for an identifying UA and rate-limits hard; browsers
|
|
51
|
-
* won't let us set User-Agent, so this rides along as `email` instead, which
|
|
52
|
-
* their usage policy accepts. Point `endpoint` at your own instance for
|
|
53
|
-
* anything busier than a settings form.
|
|
54
|
-
*/
|
|
55
|
-
email?: string;
|
|
56
|
-
}
|
|
57
|
-
export declare function createNominatimProvider(options?: NominatimOptions): GeocodeProvider;
|
|
58
|
-
/**
|
|
59
|
-
* Every user-facing string in LpAddressInput, so an app can translate it
|
|
60
|
-
* without the kit taking an i18n dependency. Pass a partial — anything absent
|
|
61
|
-
* keeps the English default.
|
|
62
|
-
*/
|
|
63
|
-
export interface AddressLabels {
|
|
64
|
-
line: string;
|
|
65
|
-
linePlaceholder: string;
|
|
66
|
-
secondLine: string;
|
|
67
|
-
secondLinePlaceholder: string;
|
|
68
|
-
city: string;
|
|
69
|
-
cityPlaceholder: string;
|
|
70
|
-
postalCode: string;
|
|
71
|
-
postalCodePlaceholder: string;
|
|
72
|
-
country: string;
|
|
73
|
-
countryPlaceholder: string;
|
|
74
|
-
countrySearch: string;
|
|
75
|
-
pickOnMap: string;
|
|
76
|
-
mapTitle: string;
|
|
77
|
-
mapHint: string;
|
|
78
|
-
use: string;
|
|
79
|
-
cancel: string;
|
|
80
|
-
searching: string;
|
|
81
|
-
noSuggestions: string;
|
|
82
|
-
nothingHere: string;
|
|
83
|
-
}
|
|
84
|
-
/** Formats an address the way a shipping label would read. */
|
|
85
|
-
export declare function formatAddress(value: AddressValue, countryName?: string): string;
|
|
86
|
-
export interface TileSource {
|
|
87
|
-
/** Template with {z}/{x}/{y}, plus optional {s} for a subdomain. */
|
|
88
|
-
url: string;
|
|
89
|
-
/** Rendered under the map — most tile terms require crediting the source. */
|
|
90
|
-
attribution?: string;
|
|
91
|
-
subdomains?: string[];
|
|
92
|
-
minZoom?: number;
|
|
93
|
-
maxZoom?: number;
|
|
94
|
-
/** Edge length of one tile in CSS pixels. Default 256. */
|
|
95
|
-
tileSize?: number;
|
|
96
|
-
}
|
|
97
|
-
export declare const OSM_TILES: TileSource;
|
|
98
|
-
export declare function tileUrl(source: TileSource, z: number, x: number, y: number): string;
|
|
99
|
-
export declare const MAX_LATITUDE = 85.05112878;
|
|
100
|
-
export declare function project(lat: number, lon: number, zoom: number, tileSize?: number): {
|
|
101
|
-
x: number;
|
|
102
|
-
y: number;
|
|
103
|
-
};
|
|
104
|
-
export declare function unproject(x: number, y: number, zoom: number, tileSize?: number): {
|
|
105
|
-
lat: number;
|
|
106
|
-
lon: number;
|
|
107
|
-
};
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
export interface ChartPoint {
|
|
2
|
-
/** Numeric value. `null` breaks the line — a real gap, not a zero. */
|
|
3
|
-
y: number | null;
|
|
4
|
-
/** Optional label for this point; falls back to the shared `labels` prop. */
|
|
5
|
-
x?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ChartSeries {
|
|
8
|
-
name: string;
|
|
9
|
-
/** Bare numbers are accepted and normalised to points. */
|
|
10
|
-
data: (number | null | ChartPoint)[];
|
|
11
|
-
/** Any CSS colour. Unset series cycle through the palette. */
|
|
12
|
-
color?: string;
|
|
13
|
-
/** Draw this series as a dashed line (targets, budgets, forecasts). */
|
|
14
|
-
dashed?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Which y-axis this series is measured against. A series in different units
|
|
17
|
-
* or of a wildly different magnitude (errors beside requests, a rate beside a
|
|
18
|
-
* count) flattens against a shared axis; putting it on `"right"` gives it its
|
|
19
|
-
* own scale and its own ticks.
|
|
20
|
-
*/
|
|
21
|
-
axis?: "left" | "right";
|
|
22
|
-
}
|
|
23
|
-
export type ChartAxis = "left" | "right";
|
|
24
|
-
export interface NormalSeries {
|
|
25
|
-
name: string;
|
|
26
|
-
color: string;
|
|
27
|
-
dashed: boolean;
|
|
28
|
-
axis: ChartAxis;
|
|
29
|
-
values: (number | null)[];
|
|
30
|
-
}
|
|
31
|
-
export interface Box {
|
|
32
|
-
width: number;
|
|
33
|
-
height: number;
|
|
34
|
-
left: number;
|
|
35
|
-
right: number;
|
|
36
|
-
top: number;
|
|
37
|
-
bottom: number;
|
|
38
|
-
}
|
|
39
|
-
/** Plot area inside the padding — where marks may actually be drawn. */
|
|
40
|
-
export declare const plotWidth: (b: Box) => number;
|
|
41
|
-
export declare const plotHeight: (b: Box) => number;
|
|
42
|
-
/** Series colours cycle through the theme's semantic palette. */
|
|
43
|
-
export declare const CHART_PALETTE: string[];
|
|
44
|
-
export declare const normalise: (series: ChartSeries[]) => NormalSeries[];
|
|
45
|
-
/** Point labels win over the shared axis labels; index is the last resort. */
|
|
46
|
-
export declare const resolveLabels: (series: ChartSeries[], labels: string[] | undefined, count: number) => string[];
|
|
47
|
-
/** Longest series wins; shorter ones simply stop early. */
|
|
48
|
-
export declare const pointCount: (series: NormalSeries[]) => number;
|
|
49
|
-
/**
|
|
50
|
-
* "Nice" axis bounds: round the extent out to a human step (1/2/5 × 10ⁿ) so
|
|
51
|
-
* ticks land on readable numbers instead of 0.37, 1.24, 2.11.
|
|
52
|
-
*/
|
|
53
|
-
export declare const niceScale: (min: number, max: number, ticks: number) => {
|
|
54
|
-
min: number;
|
|
55
|
-
max: number;
|
|
56
|
-
step: number;
|
|
57
|
-
};
|
|
58
|
-
export declare const axisTicks: (min: number, max: number, step: number) => number[];
|
|
59
|
-
/** Extent across every visible series, with zero pulled in when asked. */
|
|
60
|
-
export declare const extent: (series: NormalSeries[], includeZero: boolean) => {
|
|
61
|
-
min: number;
|
|
62
|
-
max: number;
|
|
63
|
-
};
|
|
64
|
-
/** x pixel for point i. Bars sit at band centres, lines span edge to edge. */
|
|
65
|
-
export declare const xAt: (i: number, count: number, box: Box, banded: boolean) => number;
|
|
66
|
-
export declare const yAt: (v: number, min: number, max: number, box: Box) => number;
|
|
67
|
-
interface Scale {
|
|
68
|
-
min: number;
|
|
69
|
-
max: number;
|
|
70
|
-
box: Box;
|
|
71
|
-
count: number;
|
|
72
|
-
banded: boolean;
|
|
73
|
-
}
|
|
74
|
-
export declare const linePath: (values: (number | null)[], s: Scale, smooth: number) => string;
|
|
75
|
-
/** The line closed down to the baseline — one filled shape per unbroken run. */
|
|
76
|
-
export declare const areaPath: (values: (number | null)[], s: Scale, smooth: number) => string;
|
|
77
|
-
/** Nearest point index for a pixel x — what the hover crosshair snaps to. */
|
|
78
|
-
export declare const nearestIndex: (px: number, s: Scale) => number;
|
|
79
|
-
/**
|
|
80
|
-
* A bar as a path, rounded only on the corners named. A stack is one shape cut
|
|
81
|
-
* into segments: rounding every segment would bevel the internal joins and read
|
|
82
|
-
* as separate tiles rather than as one bar, so only the outermost segment of a
|
|
83
|
-
* stack rounds, and only on the end it actually terminates.
|
|
84
|
-
*
|
|
85
|
-
* `r` is clamped to half the box so a short segment degrades to a slab instead
|
|
86
|
-
* of inverting its own corners.
|
|
87
|
-
*/
|
|
88
|
-
export declare const barPath: (x: number, y: number, w: number, h: number, r: number, round: {
|
|
89
|
-
top: boolean;
|
|
90
|
-
bottom: boolean;
|
|
91
|
-
}) => string;
|
|
92
|
-
export interface PieSlice {
|
|
93
|
-
label: string;
|
|
94
|
-
value: number;
|
|
95
|
-
/** Any CSS colour. Unset slices cycle through the palette. */
|
|
96
|
-
color?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface ResolvedSlice {
|
|
99
|
-
label: string;
|
|
100
|
-
value: number;
|
|
101
|
-
color: string;
|
|
102
|
-
/** 0–1 of the total. */
|
|
103
|
-
fraction: number;
|
|
104
|
-
/** True for the synthesised remainder slice. */
|
|
105
|
-
isOther: boolean;
|
|
106
|
-
/** How many input slices this one stands for (1, or N when collapsed). */
|
|
107
|
-
count: number;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Fold an arbitrary number of slices down to something a circle can actually
|
|
111
|
-
* show, WITHOUT dropping data.
|
|
112
|
-
*
|
|
113
|
-
* A pie is only legible while its slices are distinguishable by angle; past a
|
|
114
|
-
* handful they become slivers no one can compare or click. But a shared kit
|
|
115
|
-
* can't know how many categories a caller has, so refusing to draw twenty is
|
|
116
|
-
* not an option either. So: keep the largest `max - 1` and sum the rest into a
|
|
117
|
-
* single "Other" slice that keeps its own total, its own share, and a count of
|
|
118
|
-
* what it stands for — the tail stays visible and addressable instead of being
|
|
119
|
-
* silently truncated.
|
|
120
|
-
*
|
|
121
|
-
* Negative values are dropped: a share of a whole has no meaning below zero,
|
|
122
|
-
* and letting one in makes every other slice's fraction wrong.
|
|
123
|
-
*/
|
|
124
|
-
export declare const resolveSlices: (slices: PieSlice[], max: number | undefined, otherLabel: string,
|
|
125
|
-
/**
|
|
126
|
-
* Keep the caller's ordering for the slices that survive. Ranking decides
|
|
127
|
-
* WHICH slices are kept; it needn't decide the order they're shown in, and a
|
|
128
|
-
* caller that ordered its data deliberately ("Free" last, states worst-first)
|
|
129
|
-
* would see that shuffled for no reason. "Other" always sorts last.
|
|
130
|
-
*/
|
|
131
|
-
preserveOrder?: boolean) => {
|
|
132
|
-
slices: ResolvedSlice[];
|
|
133
|
-
total: number;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* One slice as a path. `inner > 0` makes it a donut segment (an annulus) rather
|
|
137
|
-
* than a wedge from the centre.
|
|
138
|
-
*
|
|
139
|
-
* A slice covering the whole circle is drawn as two half-arcs: a single arc
|
|
140
|
-
* whose start and end coincide is a zero-length path, so "100% of one category"
|
|
141
|
-
* would render as nothing at all.
|
|
142
|
-
*/
|
|
143
|
-
export declare const arcPath: (cx: number, cy: number, outer: number, inner: number, startAngle: number, endAngle: number,
|
|
144
|
-
/** Corner radius in px, clamped to what the slice can actually carry. */
|
|
145
|
-
corner?: number) => string;
|
|
146
|
-
export interface CalloutLabel {
|
|
147
|
-
index: number;
|
|
148
|
-
/** Which side of the circle the label sits on. */
|
|
149
|
-
side: "left" | "right";
|
|
150
|
-
/** Elbow polyline: leader out of the slice, a bend, then a run to the text. */
|
|
151
|
-
points: string;
|
|
152
|
-
/** Where the text is anchored. */
|
|
153
|
-
x: number;
|
|
154
|
-
y: number;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Lay out callout labels around a circle: a leader line leaves each slice along
|
|
158
|
-
* its own bisector, bends, and runs horizontally to text stacked down the side.
|
|
159
|
-
*
|
|
160
|
-
* The whole difficulty is collision. Slices cluster — twenty versions of a
|
|
161
|
-
* server jar are mostly slivers packed into one arc — so labels placed at their
|
|
162
|
-
* natural angles would land on top of each other. Each side is therefore
|
|
163
|
-
* relaxed independently: labels keep their order around the circle, then get
|
|
164
|
-
* pushed apart to a minimum spacing and shifted back inside the box. That's why
|
|
165
|
-
* a leader can end well away from its slice's angle and still be unambiguous —
|
|
166
|
-
* the line, not the position, is what identifies it.
|
|
167
|
-
*/
|
|
168
|
-
export declare const calloutLabels: (angles: {
|
|
169
|
-
index: number;
|
|
170
|
-
mid: number;
|
|
171
|
-
}[], cx: number, cy: number, radius: number,
|
|
172
|
-
/** How far past the radius the elbow sits. */
|
|
173
|
-
elbow: number,
|
|
174
|
-
/** Horizontal run from the elbow to the text. */
|
|
175
|
-
run: number,
|
|
176
|
-
/** Minimum vertical gap between two labels on the same side. */
|
|
177
|
-
spacing: number, height: number) => CalloutLabel[];
|
|
178
|
-
/** Compact default tick formatting: 1.2k, 3.4M — never 1200.0000001. */
|
|
179
|
-
export declare const formatTick: (v: number) => string;
|
|
180
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
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[];
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/** Hue 0..360, saturation/value 0..1, alpha 0..1. */
|
|
2
|
-
export interface Hsv {
|
|
3
|
-
h: number;
|
|
4
|
-
s: number;
|
|
5
|
-
v: number;
|
|
6
|
-
a: number;
|
|
7
|
-
}
|
|
8
|
-
/** Channels 0..255, alpha 0..1. */
|
|
9
|
-
export interface Rgb {
|
|
10
|
-
r: number;
|
|
11
|
-
g: number;
|
|
12
|
-
b: number;
|
|
13
|
-
a: number;
|
|
14
|
-
}
|
|
15
|
-
/** The string shapes a caller can hand the picker, and ask back out of it. */
|
|
16
|
-
export type ColorFormat = "hex" | "rgb" | "hsl";
|
|
17
|
-
/** Wraps rather than clamps: hue is a circle, and 370° is 10°, not 360°. */
|
|
18
|
-
export declare function normalizeHue(h: number): number;
|
|
19
|
-
export declare function clampHsv(c: Hsv): Hsv;
|
|
20
|
-
export declare function hsvToRgb({ h, s, v, a }: Hsv): Rgb;
|
|
21
|
-
export declare function rgbToHsv({ r, g, b, a }: Rgb): Hsv;
|
|
22
|
-
/** "#rrggbb", or "#rrggbbaa" when the colour is not fully opaque. */
|
|
23
|
-
export declare function rgbToHex({ r, g, b, a }: Rgb): string;
|
|
24
|
-
/**
|
|
25
|
-
* Parses #rgb / #rgba / #rrggbb / #rrggbbaa, with or without the leading `#`.
|
|
26
|
-
* Returns null for anything it doesn't recognise, so a half-typed value in the
|
|
27
|
-
* hex field can be left alone instead of snapping the picker to black.
|
|
28
|
-
*/
|
|
29
|
-
export declare function parseHex(input: string): Rgb | null;
|
|
30
|
-
/**
|
|
31
|
-
* Parses a colour a person might paste: hex (3/4/6/8 digits, `#` optional),
|
|
32
|
-
* rgb()/rgba() and hsl()/hsla() in both the comma and the space/slash forms,
|
|
33
|
-
* percentages, hue in deg/turn/rad/grad, brackets optional, and a bare triple
|
|
34
|
-
* of numbers read as rgb. A round-trip through a caller's storage therefore
|
|
35
|
-
* comes back the colour it went in as, whatever shape it was stored in.
|
|
36
|
-
*
|
|
37
|
-
* Named colours ("rebeccapurple") and the newer spaces (lab, oklch, color())
|
|
38
|
-
* are out of scope: resolving those needs the browser's own parser, and a
|
|
39
|
-
* component that silently handled some and not others would be worse than one
|
|
40
|
-
* that is clear about what it takes.
|
|
41
|
-
*/
|
|
42
|
-
export declare function parseColor(input: string): Rgb | null;
|
|
43
|
-
/** HSV→HSL, for the hsl() output format. Saturation/lightness come back 0..1. */
|
|
44
|
-
export declare function hsvToHsl({ h, s, v }: Hsv): {
|
|
45
|
-
h: number;
|
|
46
|
-
s: number;
|
|
47
|
-
l: number;
|
|
48
|
-
};
|
|
49
|
-
/** The colour as a CSS string in the requested format. */
|
|
50
|
-
export declare function formatColor(c: Hsv, format: ColorFormat): string;
|
|
51
|
-
/** Always opaque — for the swatch behind an alpha checkerboard, and for rails. */
|
|
52
|
-
export declare function opaqueCss(c: Hsv): string;
|
|
53
|
-
/**
|
|
54
|
-
* Whether dark ink reads better than light on this colour, by WCAG relative
|
|
55
|
-
* luminance. The picker uses it for the check mark on a selected swatch, which
|
|
56
|
-
* otherwise disappears into a pale preset.
|
|
57
|
-
*/
|
|
58
|
-
export declare function isLight(c: Hsv): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* A neutral starting palette. Kit tokens are deliberately NOT used here: these
|
|
61
|
-
* are values a user picks *for their own data* (a tag, a calendar category),
|
|
62
|
-
* which must stay put when the app's theme changes — a preset that shifted with
|
|
63
|
-
* the theme would silently restyle everything already saved with it.
|
|
64
|
-
*/
|
|
65
|
-
export declare const DEFAULT_SWATCHES: readonly ["#ef4444", "#f97316", "#f59e0b", "#22c55e", "#10b981", "#06b6d4", "#3b82f6", "#6366f1", "#8b5cf6", "#ec4899", "#64748b", "#111827"];
|
|
@@ -1,20 +0,0 @@
|
|
|
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;
|