@leavepulse/ui 0.56.0 → 0.58.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/chunks/{ContextMenuItems-BtKU7074.js → ContextMenuItems-BY5sTVQF.js} +1 -1
- package/dist/chunks/{LayoutCanvas-BkaGXTjx.js → LayoutCanvas-BcGLJVBq.js} +1 -1
- package/dist/chunks/{LayoutNode-B3_9E1Xa.js → LayoutNode-BkBn6dvM.js} +1 -1
- package/dist/chunks/{LpActionBar-C3hkVsFz.js → LpActionBar-DCN-_pZP.js} +2 -2
- package/dist/chunks/{LpAddressInput-NUHmplCd.js → LpAddressInput-Dio6Sqed.js} +7 -7
- package/dist/chunks/{LpAlert-B6ilrM7T.js → LpAlert-CXMn1GYE.js} +1 -1
- package/dist/chunks/{LpAppShell-BEGjSqFl.js → LpAppShell-Be6T96td.js} +3 -3
- package/dist/chunks/{LpAutocomplete-C8IgSMsi.js → LpAutocomplete-hJ_6CHlh.js} +1 -1
- package/dist/chunks/{LpAvatar-LTvy0OkE.js → LpAvatar-BxNs23Xu.js} +2 -2
- package/dist/chunks/{LpBreadcrumbs-D4TsoFju.js → LpBreadcrumbs-BLzOEgAF.js} +1 -1
- package/dist/chunks/{LpButton-BdfZFNqi.js → LpButton-vhlwmpBy.js} +1 -1
- package/dist/chunks/{LpCalendar-DrA2McTU.js → LpCalendar-BLoE8Qm7.js} +1 -1
- package/dist/chunks/{LpCard-DbjO5yaF.js → LpCard-DhR7u0d8.js} +1 -1
- package/dist/chunks/{LpCheckbox-DvVYeOD-.js → LpCheckbox-B_C8sOoT.js} +1 -1
- package/dist/chunks/{LpCodeBlock-ca7ANFyW.js → LpCodeBlock-CXsqJwDy.js} +1 -1
- package/dist/chunks/{LpColorPicker-D1sQqtXS.js → LpColorPicker-DQ88niXq.js} +2 -2
- package/dist/chunks/{LpConfirmDialog-CrbUZgJE.js → LpConfirmDialog-DxlSdjmk.js} +3 -3
- package/dist/chunks/{LpConfirmHost-BgMIV8r9.js → LpConfirmHost-BcrmTNu_.js} +1 -1
- package/dist/chunks/{LpContextMenu-EF_90u3g.js → LpContextMenu-B1NGfpp1.js} +2 -2
- package/dist/chunks/{LpDatePicker-BrdFtSTy.js → LpDatePicker-B-VMHMgy.js} +3 -3
- package/dist/chunks/{LpDateRangePicker-Drd7EbIz.js → LpDateRangePicker-B68KPKPl.js} +6 -15
- package/dist/chunks/{LpDisclosure-Cc23-JOT.js → LpDisclosure-Ct-VBHxt.js} +1 -1
- package/dist/chunks/{LpDrawer-CBFVD624.js → LpDrawer-DSknigxH.js} +5 -7
- package/dist/chunks/{LpDropdownMenu-DrpJJBp0.js → LpDropdownMenu-C7oHVlKY.js} +2 -2
- package/dist/chunks/{LpEmptyState-BJbZXC8D.js → LpEmptyState-CBwwkkdA.js} +1 -1
- package/dist/chunks/{LpFieldNotice-wtieLUTj.js → LpFieldNotice-9hH4ITZa.js} +1 -1
- package/dist/chunks/{LpFileTree-3E4w4Rjr.js → LpFileTree-CMA0_rsB.js} +2 -2
- package/dist/chunks/{LpFileTreeNode-B4uB8Ks_.js → LpFileTreeNode-B4T258hF.js} +3 -3
- package/dist/chunks/{LpFormField-CtVYj6tO.js → LpFormField-BpQ6WJPe.js} +1 -1
- package/dist/chunks/LpHintLayer-B5-6FyEf.js +154 -0
- package/dist/chunks/LpHints-BqoZXHZk.js +109 -0
- package/dist/chunks/{LpIcon-DYtaid0K.js → LpIcon-B5guGKrW.js} +1 -1
- package/dist/chunks/{LpInput-D-YGQbEv.js → LpInput-WvyP02ID.js} +2 -2
- package/dist/chunks/{LpLightbox-EVXzAq62.js → LpLightbox-Dq-e36uT.js} +1 -1
- package/dist/chunks/{LpLogViewer-BfgtXVKm.js → LpLogViewer-DwiYE32z.js} +2 -2
- package/dist/chunks/{LpMapPicker-Cc84LaM3.js → LpMapPicker-BH5csaBt.js} +1 -1
- package/dist/chunks/{LpMediaGallery-BnlkN_1f.js → LpMediaGallery-B1kDypJ-.js} +2 -2
- package/dist/chunks/{LpModal-JNa3B_Lr.js → LpModal-BxYssnXg.js} +1 -1
- package/dist/chunks/{LpModalNav-DXBilXr0.js → LpModalNav-Bn2ws64b.js} +4 -4
- package/dist/chunks/{LpNotificationBell-DEL-RoHS.js → LpNotificationBell-DJfs4JjQ.js} +4 -4
- package/dist/chunks/{LpNumberField-B77O-z28.js → LpNumberField-CJPjmoDz.js} +1 -1
- package/dist/chunks/{LpPagination-BcDlo3r_.js → LpPagination-DehAaJLY.js} +1 -1
- package/dist/chunks/{LpPasswordInput-eKzQhbQP.js → LpPasswordInput-Bg5uTZbx.js} +2 -2
- package/dist/chunks/{LpPhoneInput-BCbrrhgE.js → LpPhoneInput-DStwcbnQ.js} +2 -2
- package/dist/chunks/{LpPie-B7ti5qCH.js → LpPie-DeTkbbOK.js} +3 -3
- package/dist/chunks/{LpRangeCalendar-DZuaRV0W.js → LpRangeCalendar-D5sDID9W.js} +1 -1
- package/dist/chunks/{LpSection-tKEH0jYf.js → LpSection-B19VPYmr.js} +1 -1
- package/dist/chunks/{LpSegmented-C09EEam2.js → LpSegmented-D3Eam8sa.js} +1 -1
- package/dist/chunks/{LpSelect-DNIL6MB9.js → LpSelect-DynjWK1A.js} +1 -1
- package/dist/chunks/{LpSidebar-C2oolgwy.js → LpSidebar-CshW0fqC.js} +3 -3
- package/dist/chunks/{LpSidebarNav-C9dHu-2b.js → LpSidebarNav-C9b3i9G2.js} +2 -2
- package/dist/chunks/{LpStat-B-7udBRP.js → LpStat-BS2TEXYK.js} +1 -1
- package/dist/chunks/{LpStepper-C7XiVKZj.js → LpStepper-BSglWF45.js} +1 -1
- package/dist/chunks/{LpTableFilter-CrW7_Rj4.js → LpTableFilter-CwHXVxJt.js} +2 -2
- package/dist/chunks/{LpTableOfContents-BUcAfGPQ.js → LpTableOfContents-DYuqkByy.js} +2 -8
- package/dist/chunks/{LpTabs-BMSBB78h.js → LpTabs-BBGRHY38.js} +1 -1
- package/dist/chunks/{LpTagsInput-D1SuqbhB.js → LpTagsInput-CHbQoAAA.js} +3 -3
- package/dist/chunks/{LpTextarea-uuScWo6-.js → LpTextarea-Bz2IWhTH.js} +1 -1
- package/dist/chunks/{LpThemeSwitcher-Fz85BCRS.js → LpThemeSwitcher-B_qhSl7q.js} +2 -2
- package/dist/chunks/{LpTimeField-Cqe7fXnh.js → LpTimeField-DvGXgdES.js} +1 -1
- package/dist/chunks/{LpToaster-DTtWuKvq.js → LpToaster-Bo9Q4QBP.js} +1 -1
- package/dist/chunks/{LpTooltip-CXVKcOXT.js → LpTooltip-suFCM34F.js} +2 -2
- package/dist/chunks/LpTour-D7m9ZxNk.js +334 -0
- package/dist/chunks/{LpUptimeBar-ugcv25xj.js → LpUptimeBar-B4ltCfno.js} +1 -1
- package/dist/chunks/{MenuTitle-J3ZDYjpV.js → MenuTitle-DQP6hc2N.js} +1 -1
- package/dist/chunks/TourCard-DCHOjr6e.js +100 -0
- package/dist/chunks/icons-QqBscG5I.js +43 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.js +1 -1
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.js +2 -2
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +2 -2
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.js +1 -1
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +1 -1
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpHintLayer.vue.d.ts +33 -0
- package/dist/components/LpHintLayer.vue.js +4 -0
- package/dist/components/LpHints.vue.d.ts +20 -0
- package/dist/components/LpHints.vue.js +4 -0
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +2 -2
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.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/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPaletteFacts.vue.js +1 -1
- package/dist/components/LpPaletteHeader.vue.js +2 -2
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.js +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpTable.vue.js +6 -6
- package/dist/components/LpTableFilter.vue.js +1 -1
- package/dist/components/LpTableOfContents.vue.js +1 -1
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpTagsInput.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTour.vue.d.ts +98 -0
- package/dist/components/LpTour.vue.js +4 -0
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/MenuTitle.vue.js +1 -1
- package/dist/components/TourCard.vue.d.ts +28 -0
- package/dist/components/TourCard.vue.js +4 -0
- package/dist/components/tour.d.ts +21 -0
- package/dist/components/tour.js +38 -0
- package/dist/composables/scroll.d.ts +17 -0
- package/dist/composables/scroll.js +29 -0
- package/dist/composables/useGamepadNav.js +2 -7
- package/dist/composables/useHintSystem.d.ts +195 -0
- package/dist/composables/useHintSystem.js +334 -0
- package/dist/composables/useHints.d.ts +18 -0
- package/dist/composables/useHints.js +120 -0
- package/dist/composables/useMediaQuery.d.ts +2 -0
- package/dist/composables/useMediaQuery.js +18 -0
- package/dist/composables/usePaintSelect.js +1 -7
- package/dist/icons-all.js +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +89 -64
- package/package.json +1 -1
- package/src/component-names.ts +3 -0
- package/src/components/LpDateRangePicker.vue +3 -12
- package/src/components/LpDrawer.vue +4 -7
- package/src/components/LpHintLayer.vue +148 -0
- package/src/components/LpHints.vue +116 -0
- package/src/components/LpTableOfContents.vue +2 -14
- package/src/components/LpTooltip.vue +2 -4
- package/src/components/LpTour.vue +358 -0
- package/src/components/TourCard.vue +41 -0
- package/src/components/tour.ts +57 -0
- package/src/composables/scroll.ts +54 -0
- package/src/composables/useGamepadNav.ts +2 -7
- package/src/composables/useHintSystem.ts +512 -0
- package/src/composables/useHints.ts +151 -0
- package/src/composables/useMediaQuery.ts +20 -0
- package/src/composables/usePaintSelect.ts +1 -8
- package/src/index.ts +27 -0
- package/src/kit-icons.ts +1 -1
- package/src/tokens/tokens.css +1 -0
- package/dist/chunks/icons-CkA0njzm.js +0 -43
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { defineComponent, useModel, computed, shallowRef, ref, watch, onBeforeUnmount, openBlock, createBlock, Teleport, createElementBlock, withModifiers, Fragment, renderList, normalizeStyle, normalizeClass, createCommentVNode, unref, withCtx, createVNode, renderSlot, mergeModels, nextTick } from "vue";
|
|
2
|
+
import { PopoverRoot, PopoverAnchor, PopoverPortal, PopoverContent } from "reka-ui";
|
|
3
|
+
import { prefersReducedMotion } from "../composables/easing.js";
|
|
4
|
+
import { hints } from "../composables/useHints.js";
|
|
5
|
+
import { useHotkeys } from "../composables/useHotkeys.js";
|
|
6
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
7
|
+
import { useMediaQuery } from "../composables/useMediaQuery.js";
|
|
8
|
+
import { scrollToElement } from "../composables/scroll.js";
|
|
9
|
+
import { PANEL_SURFACE } from "../components/dropdown.js";
|
|
10
|
+
import { _ as _sfc_main$1 } from "./TourCard-DCHOjr6e.js";
|
|
11
|
+
import { holeOf, panelsAround } from "../components/tour.js";
|
|
12
|
+
const _hoisted_1 = ["aria-label"];
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
__name: "LpTour",
|
|
15
|
+
props: /* @__PURE__ */ mergeModels({
|
|
16
|
+
steps: {},
|
|
17
|
+
padding: { default: 6 },
|
|
18
|
+
labels: {}
|
|
19
|
+
}, {
|
|
20
|
+
"open": { type: Boolean, ...{ default: false } },
|
|
21
|
+
"openModifiers": {},
|
|
22
|
+
"step": { default: 0 },
|
|
23
|
+
"stepModifiers": {}
|
|
24
|
+
}),
|
|
25
|
+
emits: /* @__PURE__ */ mergeModels(["finish", "dismiss"], ["update:open", "update:step"]),
|
|
26
|
+
setup(__props, { emit: __emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
const open = useModel(__props, "open");
|
|
30
|
+
const index = useModel(__props, "step");
|
|
31
|
+
const DEFAULT_LABELS = {
|
|
32
|
+
next: "Next",
|
|
33
|
+
back: "Back",
|
|
34
|
+
done: "Done",
|
|
35
|
+
close: "Close tour",
|
|
36
|
+
progress: "{n} of {total}",
|
|
37
|
+
perform: "Do it for me",
|
|
38
|
+
tryIt: "Try it: press the highlighted control."
|
|
39
|
+
};
|
|
40
|
+
const labels = useLabels("tour", DEFAULT_LABELS, () => props.labels);
|
|
41
|
+
const WAIT_MS = 800;
|
|
42
|
+
const TRY_SETTLE_MS = 120;
|
|
43
|
+
const wide = useMediaQuery("(min-width: 640px)");
|
|
44
|
+
const step = computed(() => props.steps[index.value]);
|
|
45
|
+
const target = shallowRef(null);
|
|
46
|
+
const box = ref(null);
|
|
47
|
+
const viewport = ref({ width: 0, height: 0 });
|
|
48
|
+
const ready = ref(false);
|
|
49
|
+
const cleanups = [];
|
|
50
|
+
const leaving = [];
|
|
51
|
+
let frame = 0;
|
|
52
|
+
let token = 0;
|
|
53
|
+
let direction = 1;
|
|
54
|
+
const hole = computed(() => box.value ? holeOf(box.value, props.padding, viewport.value) : null);
|
|
55
|
+
const panels = computed(
|
|
56
|
+
() => hole.value ? panelsAround(hole.value, viewport.value) : [{ x: 0, y: 0, width: viewport.value.width, height: viewport.value.height }]
|
|
57
|
+
);
|
|
58
|
+
const reference = {
|
|
59
|
+
getBoundingClientRect: () => {
|
|
60
|
+
const h = hole.value;
|
|
61
|
+
return h ? new DOMRect(h.x, h.y, h.width, h.height) : new DOMRect(viewport.value.width / 2, viewport.value.height / 2, 0, 0);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const last = computed(() => index.value >= props.steps.length - 1);
|
|
65
|
+
const progress = computed(() => labels.value.progress.replace("{n}", String(index.value + 1)).replace("{total}", String(props.steps.length)));
|
|
66
|
+
const smooth = () => !prefersReducedMotion();
|
|
67
|
+
function resolve(raw) {
|
|
68
|
+
if (!raw) return null;
|
|
69
|
+
try {
|
|
70
|
+
if (typeof raw === "function") return raw();
|
|
71
|
+
if (typeof raw !== "string") return raw.isConnected ? raw : null;
|
|
72
|
+
return hints.element(raw) ?? document.querySelector(raw);
|
|
73
|
+
} catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function waitFor(raw, mine) {
|
|
78
|
+
const started = performance.now();
|
|
79
|
+
return new Promise((done) => {
|
|
80
|
+
const tick = () => {
|
|
81
|
+
if (mine !== token) return done(null);
|
|
82
|
+
const el = resolve(raw);
|
|
83
|
+
if (el && el.getClientRects().length) return done(el);
|
|
84
|
+
if (performance.now() - started > WAIT_MS) return done(null);
|
|
85
|
+
requestAnimationFrame(tick);
|
|
86
|
+
};
|
|
87
|
+
tick();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function measure() {
|
|
91
|
+
viewport.value = { width: window.innerWidth, height: window.innerHeight };
|
|
92
|
+
const el = target.value;
|
|
93
|
+
if (!el || !el.isConnected) {
|
|
94
|
+
box.value = null;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const r = el.getBoundingClientRect();
|
|
98
|
+
const prev = box.value;
|
|
99
|
+
if (!prev || prev.x !== r.x || prev.y !== r.y || prev.width !== r.width || prev.height !== r.height) {
|
|
100
|
+
box.value = { x: r.x, y: r.y, width: r.width, height: r.height };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function track() {
|
|
104
|
+
measure();
|
|
105
|
+
frame = requestAnimationFrame(track);
|
|
106
|
+
}
|
|
107
|
+
async function show() {
|
|
108
|
+
const mine = ++token;
|
|
109
|
+
ready.value = false;
|
|
110
|
+
leave();
|
|
111
|
+
const current = step.value;
|
|
112
|
+
if (!current) return;
|
|
113
|
+
try {
|
|
114
|
+
await current.enter?.({ onLeave: (fn) => leaving.push(fn), onEnd: (fn) => cleanups.push(fn) });
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.warn("[LpTour] step skipped, its enter() failed:", error);
|
|
117
|
+
if (mine === token) skip();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (mine !== token) return;
|
|
121
|
+
if (!current.target) {
|
|
122
|
+
target.value = null;
|
|
123
|
+
measure();
|
|
124
|
+
ready.value = true;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const el = current.enter ? await waitFor(current.target, mine) : resolve(current.target);
|
|
128
|
+
if (mine !== token) return;
|
|
129
|
+
if (!el || !el.getClientRects().length) return skip();
|
|
130
|
+
target.value = el;
|
|
131
|
+
scrollToElement(el, { block: wide.value ? "nearest" : "center", behavior: smooth() ? "smooth" : "auto", margin: 48 });
|
|
132
|
+
await nextTick();
|
|
133
|
+
measure();
|
|
134
|
+
ready.value = true;
|
|
135
|
+
}
|
|
136
|
+
function skip() {
|
|
137
|
+
const nextIndex = index.value + direction;
|
|
138
|
+
if (nextIndex < 0 || nextIndex >= props.steps.length) return direction > 0 ? finish() : show();
|
|
139
|
+
index.value = nextIndex;
|
|
140
|
+
}
|
|
141
|
+
function next() {
|
|
142
|
+
direction = 1;
|
|
143
|
+
if (last.value) return finish();
|
|
144
|
+
index.value += 1;
|
|
145
|
+
}
|
|
146
|
+
function back() {
|
|
147
|
+
if (index.value === 0) return;
|
|
148
|
+
direction = -1;
|
|
149
|
+
index.value -= 1;
|
|
150
|
+
}
|
|
151
|
+
function forward() {
|
|
152
|
+
if (!step.value?.try) next();
|
|
153
|
+
}
|
|
154
|
+
async function perform() {
|
|
155
|
+
await step.value?.perform?.();
|
|
156
|
+
setTimeout(next, TRY_SETTLE_MS);
|
|
157
|
+
}
|
|
158
|
+
function runAll(list) {
|
|
159
|
+
for (const cleanup of list.splice(0).reverse()) {
|
|
160
|
+
try {
|
|
161
|
+
cleanup();
|
|
162
|
+
} catch (error) {
|
|
163
|
+
console.warn("[LpTour] cleanup failed:", error);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function leave() {
|
|
168
|
+
runAll(leaving);
|
|
169
|
+
}
|
|
170
|
+
function end() {
|
|
171
|
+
token++;
|
|
172
|
+
leave();
|
|
173
|
+
cancelAnimationFrame(frame);
|
|
174
|
+
frame = 0;
|
|
175
|
+
target.value = null;
|
|
176
|
+
box.value = null;
|
|
177
|
+
runAll(cleanups);
|
|
178
|
+
}
|
|
179
|
+
function finish() {
|
|
180
|
+
open.value = false;
|
|
181
|
+
emit("finish");
|
|
182
|
+
}
|
|
183
|
+
function dismiss() {
|
|
184
|
+
const at = index.value;
|
|
185
|
+
open.value = false;
|
|
186
|
+
emit("dismiss", at);
|
|
187
|
+
}
|
|
188
|
+
function onTargetClick(event) {
|
|
189
|
+
if (!step.value?.try || !target.value) return;
|
|
190
|
+
if (event.target instanceof Node && target.value.contains(event.target)) setTimeout(next, TRY_SETTLE_MS);
|
|
191
|
+
}
|
|
192
|
+
watch(
|
|
193
|
+
open,
|
|
194
|
+
(value) => {
|
|
195
|
+
if (value) {
|
|
196
|
+
direction = 1;
|
|
197
|
+
document.addEventListener("click", onTargetClick, true);
|
|
198
|
+
frame ||= requestAnimationFrame(track);
|
|
199
|
+
void show();
|
|
200
|
+
} else {
|
|
201
|
+
document.removeEventListener("click", onTargetClick, true);
|
|
202
|
+
end();
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{ immediate: true }
|
|
206
|
+
);
|
|
207
|
+
watch(index, () => {
|
|
208
|
+
if (open.value) void show();
|
|
209
|
+
});
|
|
210
|
+
onBeforeUnmount(() => {
|
|
211
|
+
document.removeEventListener("click", onTargetClick, true);
|
|
212
|
+
if (open.value) end();
|
|
213
|
+
});
|
|
214
|
+
useHotkeys(
|
|
215
|
+
() => [
|
|
216
|
+
{ key: "Escape", handler: dismiss, overLayers: true, allowInInput: true },
|
|
217
|
+
{ key: "ArrowRight", handler: forward, overLayers: true },
|
|
218
|
+
{ key: "Enter", handler: forward, overLayers: true },
|
|
219
|
+
{ key: "ArrowLeft", handler: back, overLayers: true }
|
|
220
|
+
],
|
|
221
|
+
{ enabled: open, priority: 100 }
|
|
222
|
+
);
|
|
223
|
+
const CARD = `${PANEL_SURFACE} rounded-card w-80 max-w-[calc(100vw-24px)] p-4 text-sm text-ink outline-none`;
|
|
224
|
+
return (_ctx, _cache) => {
|
|
225
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
226
|
+
open.value ? (openBlock(), createElementBlock("div", {
|
|
227
|
+
key: 0,
|
|
228
|
+
class: "lp-tour pointer-events-none fixed inset-0 z-(--z-tour)",
|
|
229
|
+
onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
230
|
+
}, ["stop"]))
|
|
231
|
+
}, [
|
|
232
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(panels.value, (panel, i) => {
|
|
233
|
+
return openBlock(), createElementBlock("div", {
|
|
234
|
+
key: i,
|
|
235
|
+
class: "lp-scrim pointer-events-auto absolute left-0 top-0 transition-[transform,width,height] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none",
|
|
236
|
+
style: normalizeStyle({ transform: `translate(${panel.x}px, ${panel.y}px)`, width: `${panel.width}px`, height: `${panel.height}px` })
|
|
237
|
+
}, null, 4);
|
|
238
|
+
}), 128)),
|
|
239
|
+
hole.value ? (openBlock(), createElementBlock("div", {
|
|
240
|
+
key: 0,
|
|
241
|
+
class: normalizeClass(["absolute left-0 top-0 rounded-control ring-2 ring-brand transition-[transform,width,height] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none", step.value?.try ? "pointer-events-none animate-pulse" : "pointer-events-auto"]),
|
|
242
|
+
style: normalizeStyle({ transform: `translate(${hole.value.x}px, ${hole.value.y}px)`, width: `${hole.value.width}px`, height: `${hole.value.height}px` })
|
|
243
|
+
}, null, 6)) : createCommentVNode("", true)
|
|
244
|
+
], 32)) : createCommentVNode("", true),
|
|
245
|
+
open.value && unref(wide) ? (openBlock(), createBlock(unref(PopoverRoot), {
|
|
246
|
+
key: 1,
|
|
247
|
+
open: ready.value
|
|
248
|
+
}, {
|
|
249
|
+
default: withCtx(() => [
|
|
250
|
+
createVNode(unref(PopoverAnchor), { reference }),
|
|
251
|
+
createVNode(unref(PopoverPortal), null, {
|
|
252
|
+
default: withCtx(() => [
|
|
253
|
+
createVNode(unref(PopoverContent), {
|
|
254
|
+
side: step.value?.side ?? "bottom",
|
|
255
|
+
"side-offset": 12,
|
|
256
|
+
"collision-padding": 12,
|
|
257
|
+
"update-position-strategy": "always",
|
|
258
|
+
"trap-focus": false,
|
|
259
|
+
class: normalizeClass([CARD, "z-[calc(var(--z-tour)+1)] data-[state=open]:animate-[popover-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none"]),
|
|
260
|
+
role: "dialog",
|
|
261
|
+
"aria-label": step.value?.title,
|
|
262
|
+
onPointerdown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
263
|
+
}, ["stop"])),
|
|
264
|
+
onInteractOutside: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
265
|
+
}, ["prevent"])),
|
|
266
|
+
onEscapeKeyDown: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
267
|
+
}, ["prevent"])),
|
|
268
|
+
onFocusOutside: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
269
|
+
}, ["prevent"]))
|
|
270
|
+
}, {
|
|
271
|
+
default: withCtx(() => [
|
|
272
|
+
renderSlot(_ctx.$slots, "card", {
|
|
273
|
+
step: step.value,
|
|
274
|
+
index: index.value,
|
|
275
|
+
next,
|
|
276
|
+
back,
|
|
277
|
+
dismiss
|
|
278
|
+
}, () => [
|
|
279
|
+
createVNode(_sfc_main$1, {
|
|
280
|
+
step: step.value,
|
|
281
|
+
index: index.value,
|
|
282
|
+
last: last.value,
|
|
283
|
+
progress: progress.value,
|
|
284
|
+
labels: unref(labels),
|
|
285
|
+
onNext: next,
|
|
286
|
+
onBack: back,
|
|
287
|
+
onPerform: perform,
|
|
288
|
+
onDismiss: dismiss
|
|
289
|
+
}, null, 8, ["step", "index", "last", "progress", "labels"])
|
|
290
|
+
])
|
|
291
|
+
]),
|
|
292
|
+
_: 3
|
|
293
|
+
}, 8, ["side", "class", "aria-label"])
|
|
294
|
+
]),
|
|
295
|
+
_: 3
|
|
296
|
+
})
|
|
297
|
+
]),
|
|
298
|
+
_: 3
|
|
299
|
+
}, 8, ["open"])) : createCommentVNode("", true),
|
|
300
|
+
open.value && !unref(wide) && ready.value ? (openBlock(), createElementBlock("div", {
|
|
301
|
+
key: 2,
|
|
302
|
+
class: normalizeClass([CARD, "pointer-events-auto fixed inset-x-3 bottom-3 z-[calc(var(--z-tour)+1)] w-auto animate-[rise-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none"]),
|
|
303
|
+
role: "dialog",
|
|
304
|
+
"aria-label": step.value?.title,
|
|
305
|
+
onPointerdown: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
306
|
+
}, ["stop"]))
|
|
307
|
+
}, [
|
|
308
|
+
renderSlot(_ctx.$slots, "card", {
|
|
309
|
+
step: step.value,
|
|
310
|
+
index: index.value,
|
|
311
|
+
next,
|
|
312
|
+
back,
|
|
313
|
+
dismiss
|
|
314
|
+
}, () => [
|
|
315
|
+
createVNode(_sfc_main$1, {
|
|
316
|
+
step: step.value,
|
|
317
|
+
index: index.value,
|
|
318
|
+
last: last.value,
|
|
319
|
+
progress: progress.value,
|
|
320
|
+
labels: unref(labels),
|
|
321
|
+
onNext: next,
|
|
322
|
+
onBack: back,
|
|
323
|
+
onPerform: perform,
|
|
324
|
+
onDismiss: dismiss
|
|
325
|
+
}, null, 8, ["step", "index", "last", "progress", "labels"])
|
|
326
|
+
])
|
|
327
|
+
], 42, _hoisted_1)) : createCommentVNode("", true)
|
|
328
|
+
]);
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
export {
|
|
333
|
+
_sfc_main as _
|
|
334
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, openBlock, createElementBlock, mergeProps, unref, createElementVNode, toDisplayString, createCommentVNode, createVNode, withCtx, Fragment, renderList, normalizeStyle, createBlock, createTextVNode } from "vue";
|
|
2
2
|
import { _ as _sfc_main$3 } from "./LpNumberFlow-z4WPZcZu.js";
|
|
3
3
|
import { _ as _sfc_main$2 } from "./LpRollingText-DB7upf-5.js";
|
|
4
|
-
import { _ as _sfc_main$1 } from "./LpTooltip-
|
|
4
|
+
import { _ as _sfc_main$1 } from "./LpTooltip-suFCM34F.js";
|
|
5
5
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
6
6
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
7
7
|
import '../assets/LpUptimeBar-B98o9krI.css';const _hoisted_1 = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "./LpIcon-
|
|
2
|
+
import { _ as _sfc_main$1 } from "./LpIcon-B5guGKrW.js";
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
class: "flex max-w-72 min-w-0 items-center gap-2 px-2.5 pt-1.5 pb-2",
|
|
5
5
|
"aria-hidden": "true"
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, Fragment, createElementVNode, toDisplayString, createVNode, createCommentVNode, createBlock, withCtx, createTextVNode } from "vue";
|
|
2
|
+
import { _ as _sfc_main$2 } from "./LpButton-vhlwmpBy.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpIcon-B5guGKrW.js";
|
|
4
|
+
import LpKeys from "../components/LpKeys.vue.js";
|
|
5
|
+
const _hoisted_1 = { class: "flex items-start justify-between gap-3" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
class: "font-medium",
|
|
8
|
+
"aria-live": "polite"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = ["aria-label"];
|
|
11
|
+
const _hoisted_4 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "mt-1.5 text-muted"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_5 = {
|
|
16
|
+
key: 2,
|
|
17
|
+
class: "mt-2 text-xs text-brand"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_6 = { class: "mt-4 flex items-center justify-between gap-2" };
|
|
20
|
+
const _hoisted_7 = { class: "text-xs tabular-nums text-muted" };
|
|
21
|
+
const _hoisted_8 = { class: "flex gap-2" };
|
|
22
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
|
+
__name: "TourCard",
|
|
24
|
+
props: {
|
|
25
|
+
step: {},
|
|
26
|
+
index: {},
|
|
27
|
+
last: { type: Boolean },
|
|
28
|
+
progress: {},
|
|
29
|
+
labels: {}
|
|
30
|
+
},
|
|
31
|
+
emits: ["next", "back", "perform", "dismiss"],
|
|
32
|
+
setup(__props) {
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
35
|
+
createElementVNode("div", _hoisted_1, [
|
|
36
|
+
createElementVNode("p", _hoisted_2, toDisplayString(__props.step?.title), 1),
|
|
37
|
+
createElementVNode("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
class: "text-muted hover:text-ink",
|
|
40
|
+
"aria-label": __props.labels.close,
|
|
41
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("dismiss"))
|
|
42
|
+
}, [
|
|
43
|
+
createVNode(_sfc_main$1, {
|
|
44
|
+
name: "lucide:x",
|
|
45
|
+
class: "size-4"
|
|
46
|
+
})
|
|
47
|
+
], 8, _hoisted_3)
|
|
48
|
+
]),
|
|
49
|
+
__props.step?.text ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(__props.step.text), 1)) : createCommentVNode("", true),
|
|
50
|
+
__props.step?.keys ? (openBlock(), createBlock(LpKeys, {
|
|
51
|
+
key: 1,
|
|
52
|
+
combo: __props.step.keys,
|
|
53
|
+
size: "sm",
|
|
54
|
+
class: "mt-2"
|
|
55
|
+
}, null, 8, ["combo"])) : createCommentVNode("", true),
|
|
56
|
+
__props.step?.try ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(__props.labels.tryIt), 1)) : createCommentVNode("", true),
|
|
57
|
+
createElementVNode("div", _hoisted_6, [
|
|
58
|
+
createElementVNode("span", _hoisted_7, toDisplayString(__props.progress), 1),
|
|
59
|
+
createElementVNode("div", _hoisted_8, [
|
|
60
|
+
__props.index > 0 ? (openBlock(), createBlock(_sfc_main$2, {
|
|
61
|
+
key: 0,
|
|
62
|
+
size: "sm",
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("back"))
|
|
65
|
+
}, {
|
|
66
|
+
default: withCtx(() => [
|
|
67
|
+
createTextVNode(toDisplayString(__props.labels.back), 1)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
})) : createCommentVNode("", true),
|
|
71
|
+
__props.step?.try && __props.step.perform ? (openBlock(), createBlock(_sfc_main$2, {
|
|
72
|
+
key: 1,
|
|
73
|
+
size: "sm",
|
|
74
|
+
variant: "outline",
|
|
75
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("perform"))
|
|
76
|
+
}, {
|
|
77
|
+
default: withCtx(() => [
|
|
78
|
+
createTextVNode(toDisplayString(__props.labels.perform), 1)
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})) : createCommentVNode("", true),
|
|
82
|
+
createVNode(_sfc_main$2, {
|
|
83
|
+
size: "sm",
|
|
84
|
+
variant: __props.step?.try ? "ghost" : void 0,
|
|
85
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("next"))
|
|
86
|
+
}, {
|
|
87
|
+
default: withCtx(() => [
|
|
88
|
+
createTextVNode(toDisplayString(__props.last ? __props.labels.done : __props.labels.next), 1)
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["variant"])
|
|
92
|
+
])
|
|
93
|
+
])
|
|
94
|
+
], 64);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
export {
|
|
99
|
+
_sfc_main as _
|
|
100
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { addCollection, iconLoaded, addIcon } from "@iconify/vue";
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
const KIT_ICONS = { "prefix": "lucide", "icons": { "activity": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>' }, "arrow-down": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5v14m7-7l-7 7l-7-7"/>' }, "arrow-up": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 12l7-7l7 7m-7 7V5"/>' }, "bell": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.268 21a2 2 0 0 0 3.464 0m-10.47-5.674A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>' }, "bell-off": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.268 21a2 2 0 0 0 3.464 0M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742M2 2l20 20M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05"/>' }, "calendar": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 2v4m8-4v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/></g>' }, "calendar-range": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M16 2v4M3 10h18M8 2v4m9 8h-6m2 4H7m0-4h.01M17 18h.01"/></g>' }, "chart-no-axes-column": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 21v-6m7 6V3m7 18V9"/>' }, "chart-pie": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z"/><path d="M21.21 15.89A10 10 0 1 1 8 2.83"/></g>' }, "check": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 6L9 17l-5-5"/>' }, "check-check": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L7 17l-5-5m20-2l-7.5 7.5L13 16"/>' }, "circle-check-big": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21.801 10A10 10 0 1 1 17 3.335"/><path d="m9 11l3 3L22 4"/></g>' }, "chevron-down": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"/>' }, "chevron-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 18l-6-6l6-6"/>' }, "chevron-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"/>' }, "chevron-up": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m18 15l-6-6l-6 6"/>' }, "chevrons-up-down": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m7 15l5 5l5-5M7 9l5-5l5 5"/>' }, "circle-alert": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 8v4m0 4h.01"/></g>' }, "circle-check": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m9 12l2 2l4-4"/></g>' }, "circle-x": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m15 9l-6 6m0-6l6 6"/></g>' }, "clipboard": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></g>' }, "clipboard-list": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2m4 7h4m-4 5h4m-8-5h.01M8 16h.01"/></g>' }, "clock": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></g>' }, "code": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m16 18l6-6l-6-6M8 6l-6 6l6 6"/>' }, "columns-3": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18m6-18v18"/></g>' }, "compass": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m16.24 7.76l-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"/></g>' }, "container": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z"/><path d="M10 21.9V14L2.1 9.1M10 14l11.9-6.9M14 19.8v-8.1m4 5.8V9.4"/></g>' }, "copy": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g>' }, "crosshair": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M22 12h-4M6 12H2m10-6V2m0 20v-4"/></g>' }, "database": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v14a9 3 0 0 0 18 0V5"/><path d="M3 12a9 3 0 0 0 18 0"/></g>' }, "dot": { "body": '<circle cx="12.1" cy="12.1" r="1" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>' }, "download": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10l5 5l5-5"/></g>' }, "external-link": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>' }, "eye": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></g>' }, "eye-off": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20"/></g>' }, "file": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/></g>' }, "file-archive": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5"/><path d="M14 2v5a1 1 0 0 0 1 1h5M8 12v-1m0 7v-2m0-9V6"/><circle cx="8" cy="20" r="2"/></g>' }, "file-code": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5m-10 4.5L8 15l2 2.5m4-5l2 2.5l-2 2.5"/></g>' }, "file-cog": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8zm5 0v12a2 2 0 0 1-2 2h-4.182M3.305 19.53l.923-.382M4 10.592V4a2 2 0 0 1 2-2h8M4.228 16.852l-.924-.383m2.548-1.241l-.383-.923m.383 6.467l-.383.924m2.679-6.468l.383-.923m-.001 7.391l-.382-.924m1.625-3.92l.922-.383m-.922 2.679l.922.383"/><circle cx="7" cy="18" r="3"/></g>' }, "file-image": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/><circle cx="10" cy="12" r="2"/><path d="m20 17l-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22"/></g>' }, "file-json": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4m-10 4a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1a1 1 0 0 1 1 1v1a1 1 0 0 0 1 1m4 0a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1a1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"/></g>', "hidden": true }, "file-key": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M14 2v5a1 1 0 0 0 1 1h5M4 12v6m0-4h2"/><path d="M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4"/><circle cx="4" cy="20" r="2"/></g>' }, "file-lock": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4 9.8V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3"/><path d="M14 2v5a1 1 0 0 0 1 1h5M9 17v-2a2 2 0 0 0-4 0v2"/><rect width="8" height="5" x="3" y="17" rx="1"/></g>' }, "file-spreadsheet": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5M8 13h2m4 0h2m-8 4h2m4 0h2"/></g>' }, "file-terminal": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5M8 16l2-2l-2-2m4 6h4"/></g>' }, "file-text": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8"/></g>' }, "file-type": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5m-9 10h2m-1-6v6m-3-5v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5"/></g>' }, "filter": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M22 3H2l8 9.46V19l4 2v-8.54z"/>', "hidden": true }, "filter-x": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055M22 3l-5 5m0-5l5 5"/>', "hidden": true }, "folder": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>' }, "folder-open": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 14l1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/>' }, "folder-search": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1M21 21l-1.9-1.9"/><circle cx="17" cy="17" r="3"/></g>' }, "gift": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 7v14m8-10v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8m3.5-4a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5a1 1 0 0 1 0 5"/><rect width="18" height="4" x="3" y="7" rx="1"/></g>' }, "git-branch": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 6a9 9 0 0 0-9 9V3"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/></g>' }, "image-off": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m2 2l20 20M10.41 10.41a2 2 0 1 1-2.83-2.83m5.92 5.92L6 21m12-9l3 3"/><path d="M3.59 3.59A2 2 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59M21 15V5a2 2 0 0 0-2-2H9"/></g>' }, "inbox": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12h-6l-2 3h-4l-2-3H2"/><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"/></g>' }, "info": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4m0-4h.01"/></g>' }, "link": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></g>' }, "list": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13"/>' }, "loader-circle": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 1 1-6.219-8.56"/>' }, "locate-fixed": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M2 12h3m14 0h3M12 2v3m0 14v3"/><circle cx="12" cy="12" r="7"/><circle cx="12" cy="12" r="3"/></g>' }, "lock": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></g>' }, "lock-open": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></g>' }, "map": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0zm.894.211v15M9 3.236v15"/>' }, "map-pin": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/><circle cx="12" cy="10" r="3"/></g>' }, "maximize-2": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"/>' }, "menu": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 5h16M4 12h16M4 19h16"/>' }, "minus": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14"/>' }, "monitor": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="20" height="14" x="2" y="3" rx="2"/><path d="M8 21h8m-4-4v4"/></g>' }, "moon": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"/>' }, "octagon-alert": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 16h.01M12 8v4m3.312-10a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z"/>' }, "package": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73zm1 .27V12"/><path d="M3.29 7L12 12l8.71-5M7.5 4.27l9 5.15"/></g>' }, "palette": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 22a1 1 0 0 1 0-20a10 9 0 0 1 10 9a5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z"/><circle cx="13.5" cy="6.5" r=".5" fill="currentColor"/><circle cx="17.5" cy="10.5" r=".5" fill="currentColor"/><circle cx="6.5" cy="12.5" r=".5" fill="currentColor"/><circle cx="8.5" cy="7.5" r=".5" fill="currentColor"/></g>' }, "plus": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7v14"/>' }, "rotate-ccw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></g>' }, "rotate-cw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></g>' }, "scroll-text": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 12h-5m5-4h-5m9 9V5a2 2 0 0 0-2-2H4"/><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"/></g>' }, "search": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m21 21l-4.34-4.34"/><circle cx="11" cy="11" r="8"/></g>' }, "server": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"/><rect width="20" height="8" x="2" y="14" rx="2" ry="2"/><path d="M6 6h.01M6 18h.01"/></g>' }, "sparkles": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594zM20 2v4m2-2h-4"/><circle cx="4" cy="20" r="2"/></g>' }, "sun": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"/></g>' }, "trash-2": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>' }, "trending-down": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M16 17h6v-6"/><path d="m22 17l-8.5-8.5l-5 5L2 7"/></g>' }, "trending-up": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M16 7h6v6"/><path d="m22 7l-8.5 8.5l-5-5L2 17"/></g>' }, "triangle-alert": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01"/>' }, "undo-2": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M9 14L4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/></g>' }, "upload": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>' }, "x": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>' }, "zoom-in": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.35-4.35M11 8v6m-3-3h6"/></g>' }, "zoom-out": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.35-4.35M8 11h6"/></g>' } }, "width": 24, "height": 24, "aliases": { "check-circle": { "parent": "circle-check-big" } } };
|
|
4
|
+
addCollection(KIT_ICONS);
|
|
5
|
+
const iconsVersion = ref(0);
|
|
6
|
+
let lucide;
|
|
7
|
+
function loadLucide() {
|
|
8
|
+
lucide ??= import("@iconify-json/lucide/icons.json").then((m) => m.default ?? m);
|
|
9
|
+
return lucide;
|
|
10
|
+
}
|
|
11
|
+
function registerIconCollection(collection) {
|
|
12
|
+
addCollection(collection);
|
|
13
|
+
iconsVersion.value++;
|
|
14
|
+
}
|
|
15
|
+
async function registerIcons(names) {
|
|
16
|
+
const wanted = names.map((n) => n.replace(/^lucide:/, ""));
|
|
17
|
+
if (wanted.every((n) => iconLoaded(`lucide:${n}`))) return;
|
|
18
|
+
const all = await loadLucide();
|
|
19
|
+
for (const name of wanted) {
|
|
20
|
+
const parent = all.aliases?.[name]?.parent;
|
|
21
|
+
const body = all.icons[name] ?? (parent ? all.icons[parent] : void 0);
|
|
22
|
+
if (!body) continue;
|
|
23
|
+
const icon = { width: all.width, height: all.height, ...body };
|
|
24
|
+
addIcon(`lucide:${name}`, icon);
|
|
25
|
+
}
|
|
26
|
+
iconsVersion.value++;
|
|
27
|
+
}
|
|
28
|
+
async function registerAllIcons() {
|
|
29
|
+
registerIconCollection(await loadLucide());
|
|
30
|
+
}
|
|
31
|
+
const pending = /* @__PURE__ */ new Set();
|
|
32
|
+
function requestIcon(name) {
|
|
33
|
+
if (pending.has(name) || typeof window === "undefined") return;
|
|
34
|
+
pending.add(name);
|
|
35
|
+
void registerIcons([name]).finally(() => pending.delete(name));
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
registerIconCollection as a,
|
|
39
|
+
registerAllIcons as b,
|
|
40
|
+
registerIcons as c,
|
|
41
|
+
iconsVersion as i,
|
|
42
|
+
requestIcon as r
|
|
43
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LpActionBar", "LpAddressInput", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpChart", "LpCheckbox", "LpCodeBlock", "LpColorPicker", "LpCommandPalette", "LpConfirmDialog", "LpConfirmHost", "LpContextMenu", "LpDatePicker", "LpDateRangePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpDropzone", "LpEmptyState", "LpFieldNotice", "LpFileTree", "LpFormField", "LpIcon", "LpImageEditor", "LpInfraNode", "LpInput", "LpKeys", "LpLightbox", "LpLink", "LpLogViewer", "LpMapPicker", "LpMediaGallery", "LpModal", "LpModalNav", "LpNotificationBell", "LpNumberField", "LpNumberFlow", "LpOtpInput", "LpPagination", "LpPaletteFacts", "LpPaletteHeader", "LpPalettePreview", "LpPaletteStats", "LpPaletteSwatches", "LpPasswordInput", "LpPhoneInput", "LpPie", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpRangeCalendar", "LpRangeSlider", "LpRollingText", "LpScrollArea", "LpSection", "LpSegmented", "LpSelect", "LpServiceNode", "LpShift", "LpShortcutsDialog", "LpSidebar", "LpSkeleton", "LpSlider", "LpSparkline", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTagsInput", "LpTextarea", "LpThemeProvider", "LpThemeSwitcher", "LpTilt", "LpTimeField", "LpToaster", "LpTooltip", "LpTooltipProvider", "LpTopologyCanvas", "LpUptimeBar", "LpVideoBackdrop"];
|
|
1
|
+
export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LpActionBar", "LpAddressInput", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpChart", "LpCheckbox", "LpCodeBlock", "LpColorPicker", "LpCommandPalette", "LpConfirmDialog", "LpConfirmHost", "LpContextMenu", "LpDatePicker", "LpDateRangePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpDropzone", "LpEmptyState", "LpFieldNotice", "LpFileTree", "LpFormField", "LpHintLayer", "LpHints", "LpIcon", "LpImageEditor", "LpInfraNode", "LpInput", "LpKeys", "LpLightbox", "LpLink", "LpLogViewer", "LpMapPicker", "LpMediaGallery", "LpModal", "LpModalNav", "LpNotificationBell", "LpNumberField", "LpNumberFlow", "LpOtpInput", "LpPagination", "LpPaletteFacts", "LpPaletteHeader", "LpPalettePreview", "LpPaletteStats", "LpPaletteSwatches", "LpPasswordInput", "LpPhoneInput", "LpPie", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpRangeCalendar", "LpRangeSlider", "LpRollingText", "LpScrollArea", "LpSection", "LpSegmented", "LpSelect", "LpServiceNode", "LpShift", "LpShortcutsDialog", "LpSidebar", "LpSkeleton", "LpSlider", "LpSparkline", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTagsInput", "LpTextarea", "LpThemeProvider", "LpThemeSwitcher", "LpTilt", "LpTimeField", "LpToaster", "LpTooltip", "LpTooltipProvider", "LpTopologyCanvas", "LpTour", "LpUptimeBar", "LpVideoBackdrop"];
|