@hankchen/canvas-editor-vue 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +22 -2
- package/dist/canvas/AlignFloatBar.d.ts +6 -0
- package/dist/canvas/CanvasSurface.d.ts +131 -0
- package/dist/canvas/ContentTypePill.d.ts +14 -0
- package/dist/canvas/ContextMenu.d.ts +14 -0
- package/dist/canvas/FindBar.d.ts +13 -0
- package/dist/canvas/GuidesOverlay.d.ts +18 -0
- package/dist/canvas/Ruler.d.ts +24 -0
- package/dist/canvas/TextEditingOverlay.d.ts +70 -0
- package/dist/canvas/createBand.d.ts +6 -0
- package/dist/canvas/findHighlight.d.ts +12 -0
- package/dist/canvas/gizmo.d.ts +24 -0
- package/dist/canvas/guideSnap.d.ts +3 -0
- package/dist/canvas/index.d.ts +20 -0
- package/dist/canvas/resizeHandles.d.ts +3 -0
- package/dist/canvas/scheduler.d.ts +2 -0
- package/dist/canvas/useDpr.d.ts +10 -0
- package/dist/canvas/useFindSession.d.ts +13 -0
- package/dist/canvas/useTextEditing.d.ts +53 -0
- package/dist/canvas-CS4SmrIO.js +1649 -0
- package/dist/canvas.js +2 -0
- package/dist/completionAnchor-4lhR2kJz.js +273 -0
- package/dist/createLucideIcon-CMq8ZKo2.js +96 -0
- package/dist/dist-DuXLYZZ9.js +341 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +16 -0
- package/dist/layer-panel/LayerPanel.d.ts +32 -0
- package/dist/layer-panel/addMenu.d.ts +18 -0
- package/dist/layer-panel/index.d.ts +7 -0
- package/dist/layer-panel/useLayerPanel.d.ts +12 -0
- package/dist/layer-panel-ArP66_vZ.js +652 -0
- package/dist/layer-panel.js +2 -0
- package/dist/layerPath-BRZK9ka1.js +2160 -0
- package/dist/panel-theme.css +254 -0
- package/dist/property-panel/PropertyField.d.ts +65 -0
- package/dist/property-panel/PropertyPanel.d.ts +6 -0
- package/dist/property-panel/controlStyles.d.ts +17 -0
- package/dist/property-panel/controls.d.ts +3 -0
- package/dist/property-panel/fieldSchema.d.ts +116 -0
- package/dist/property-panel/fields/AlignField.d.ts +11 -0
- package/dist/property-panel/fields/AnchorDisclosureField.d.ts +16 -0
- package/dist/property-panel/fields/BooleanField.d.ts +13 -0
- package/dist/property-panel/fields/BorderField.d.ts +14 -0
- package/dist/property-panel/fields/BorderWidthInput.d.ts +14 -0
- package/dist/property-panel/fields/ColorField.d.ts +13 -0
- package/dist/property-panel/fields/FontField.d.ts +15 -0
- package/dist/property-panel/fields/ImageSrcField.d.ts +20 -0
- package/dist/property-panel/fields/NumberField.d.ts +13 -0
- package/dist/property-panel/fields/PaddingField.d.ts +14 -0
- package/dist/property-panel/fields/PairField.d.ts +19 -0
- package/dist/property-panel/fields/SelectField.d.ts +11 -0
- package/dist/property-panel/fields/ShorthandModeButton.d.ts +13 -0
- package/dist/property-panel/fields/TextField.d.ts +13 -0
- package/dist/property-panel/fields/TextareaField.d.ts +13 -0
- package/dist/property-panel/fields/ValueTypeSegmented.d.ts +10 -0
- package/dist/property-panel/fields/index.d.ts +16 -0
- package/dist/property-panel/fontPicker.d.ts +13 -0
- package/dist/property-panel/imageUpload.d.ts +11 -0
- package/dist/property-panel/index.d.ts +13 -0
- package/dist/property-panel/shorthand.d.ts +28 -0
- package/dist/property-panel/usePropertyPanel.d.ts +51 -0
- package/dist/property-panel/useShorthandMode.d.ts +18 -0
- package/dist/property-panel-jt_rsTVW.js +1719 -0
- package/dist/property-panel.js +2 -0
- package/dist/shared/DropdownMenu.d.ts +47 -0
- package/dist/shared/ExpressionCompletionPopup.d.ts +14 -0
- package/dist/shared/HelpDialog.d.ts +12 -0
- package/dist/shared/PanelIcon.d.ts +14 -0
- package/dist/shared/completion.d.ts +49 -0
- package/dist/shared/completionAnchor.d.ts +28 -0
- package/dist/shared/editableTarget.d.ts +5 -0
- package/dist/shared/expressionContext.d.ts +22 -0
- package/dist/shared/index.d.ts +37 -0
- package/dist/shared/rowsPathCompletionSource.d.ts +3 -0
- package/dist/shared/shortcutsHelp.d.ts +30 -0
- package/dist/shared/uploadFile.d.ts +2 -0
- package/dist/shared/useDataSourceSchema.d.ts +3 -0
- package/dist/shared/useDropdownMenu.d.ts +51 -0
- package/dist/shared/useExpressionCompletion.d.ts +45 -0
- package/dist/shared/useHistory.d.ts +7 -0
- package/dist/shared/usePathCompletion.d.ts +18 -0
- package/dist/shared/useSelection.d.ts +3 -0
- package/dist/shared/useShortcuts.d.ts +2 -0
- package/dist/shared/useShortcutsHelp.d.ts +9 -0
- package/dist/shared/useTransientFeedback.d.ts +10 -0
- package/dist/shared/useViewport.d.ts +3 -0
- package/dist/shared-D9zYUQaw.js +123 -0
- package/dist/shared.js +9 -0
- package/dist/status-bar/StatusBar.d.ts +17 -0
- package/dist/status-bar/index.d.ts +9 -0
- package/dist/status-bar/layerGeometryLabel.d.ts +13 -0
- package/dist/status-bar/layerPathLabel.d.ts +2 -0
- package/dist/status-bar/useDoc.d.ts +3 -0
- package/dist/status-bar-BhhrVoBZ.js +194 -0
- package/dist/status-bar.js +2 -0
- package/dist/style.css +2 -0
- package/dist/uploadFile-CutE_xI-.js +330 -0
- package/dist/useDataSourceSchema-C924m8fc.js +237 -0
- package/dist/usePathCompletion-DkHoGla4.js +228 -0
- package/dist/useShortcutsHelp-DTC3yRil.js +19 -0
- package/dist/useTransientFeedback-gS9Xa9GY.js +477 -0
- package/dist/useViewport-BLe2ise1.js +18 -0
- package/package.json +77 -3
package/dist/canvas.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-CS4SmrIO.js";
|
|
2
|
+
export { e as AlignFloatBar, n as CanvasSurface, f as ContentTypePill, a as ContextMenu, l as FindBar, m as GuidesOverlay, d as Ruler, c as TextEditingOverlay, u as createGizmoOverlayPainter, h as createRafScheduler, t as drawCreateRubberBand, s as drawFindMatches, p as drawSelectionGizmo, r as useDpr, o as useFindSession, g as useTextEditing, i as watchDprChanges };
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { C as e, D as t, G as n, M as r, U as i, W as a, _ as o, b as s, d as c, f as l, g as u, h as d, j as f, k as p, m, u as h, w as g, z as _ } from "./layerPath-BRZK9ka1.js";
|
|
2
|
+
//#region ../canvas-editor/src/shared/expressionSchema.ts
|
|
3
|
+
function v(e) {
|
|
4
|
+
let t = e;
|
|
5
|
+
for (; t !== void 0;) {
|
|
6
|
+
if (t.properties !== void 0) return t.properties;
|
|
7
|
+
t = t.items;
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
function y(e, t) {
|
|
12
|
+
let n = e;
|
|
13
|
+
for (let e of t) {
|
|
14
|
+
let t = v(n)?.get(e);
|
|
15
|
+
if (t === void 0) return null;
|
|
16
|
+
n = t;
|
|
17
|
+
}
|
|
18
|
+
return n;
|
|
19
|
+
}
|
|
20
|
+
function b(e) {
|
|
21
|
+
if (e.type === "array" || e.items !== void 0) return { entries: [] };
|
|
22
|
+
let t = e.properties === void 0 ? [] : [...e.properties].map(([e, t]) => ({
|
|
23
|
+
key: e,
|
|
24
|
+
node: t
|
|
25
|
+
}));
|
|
26
|
+
return e.open === !0 ? {
|
|
27
|
+
entries: t,
|
|
28
|
+
open: !0
|
|
29
|
+
} : { entries: t };
|
|
30
|
+
}
|
|
31
|
+
function x(e, t) {
|
|
32
|
+
let n = t.split(".");
|
|
33
|
+
return t === "" || n.includes("") ? null : y(e, n)?.items ?? null;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region ../canvas-editor/src/shared/expressionPath.ts
|
|
37
|
+
function S(e) {
|
|
38
|
+
if (e === "") return {
|
|
39
|
+
ok: !1,
|
|
40
|
+
error: "expression_syntax_error"
|
|
41
|
+
};
|
|
42
|
+
let t = e.split(".");
|
|
43
|
+
if (t.includes("")) return {
|
|
44
|
+
ok: !1,
|
|
45
|
+
error: "expression_syntax_error"
|
|
46
|
+
};
|
|
47
|
+
let n = t[0], r = t.slice(1);
|
|
48
|
+
return n === "row" ? {
|
|
49
|
+
ok: !0,
|
|
50
|
+
head: { kind: "row" },
|
|
51
|
+
rest: r
|
|
52
|
+
} : n === "$root" ? {
|
|
53
|
+
ok: !0,
|
|
54
|
+
head: { kind: "root" },
|
|
55
|
+
rest: r
|
|
56
|
+
} : {
|
|
57
|
+
ok: !0,
|
|
58
|
+
head: {
|
|
59
|
+
kind: "bare",
|
|
60
|
+
name: n
|
|
61
|
+
},
|
|
62
|
+
rest: r
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function C(e) {
|
|
66
|
+
let t = 0, n = e.length;
|
|
67
|
+
for (; t < n && " \n\r\0\v".includes(e[t]);) t += 1;
|
|
68
|
+
for (; n > t && " \n\r\0\v".includes(e[n - 1]);) --n;
|
|
69
|
+
return e.slice(t, n);
|
|
70
|
+
}
|
|
71
|
+
function w(e) {
|
|
72
|
+
let t = [], n = 0, r = e.indexOf("{{");
|
|
73
|
+
for (; r !== -1;) {
|
|
74
|
+
let i = e.indexOf("}}", r + 2);
|
|
75
|
+
if (i === -1) {
|
|
76
|
+
r > n && t.push({
|
|
77
|
+
kind: "literal",
|
|
78
|
+
start: n,
|
|
79
|
+
end: r,
|
|
80
|
+
text: e.slice(n, r)
|
|
81
|
+
});
|
|
82
|
+
let i = e.slice(r);
|
|
83
|
+
return t.push({
|
|
84
|
+
kind: "open",
|
|
85
|
+
start: r,
|
|
86
|
+
end: e.length,
|
|
87
|
+
text: i,
|
|
88
|
+
expr: C(i.slice(2))
|
|
89
|
+
}), {
|
|
90
|
+
template: e,
|
|
91
|
+
parts: t
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
r > n && t.push({
|
|
95
|
+
kind: "literal",
|
|
96
|
+
start: n,
|
|
97
|
+
end: r,
|
|
98
|
+
text: e.slice(n, r)
|
|
99
|
+
});
|
|
100
|
+
let a = e.slice(r + 2, i), o = C(a), s = S(o).ok ? null : "expression_syntax_error";
|
|
101
|
+
t.push({
|
|
102
|
+
kind: "fragment",
|
|
103
|
+
start: r,
|
|
104
|
+
end: i + 2,
|
|
105
|
+
raw: a,
|
|
106
|
+
expr: o,
|
|
107
|
+
error: s
|
|
108
|
+
}), n = i + 2, r = e.indexOf("{{", n);
|
|
109
|
+
}
|
|
110
|
+
return n < e.length && t.push({
|
|
111
|
+
kind: "literal",
|
|
112
|
+
start: n,
|
|
113
|
+
end: e.length,
|
|
114
|
+
text: e.slice(n)
|
|
115
|
+
}), {
|
|
116
|
+
template: e,
|
|
117
|
+
parts: t
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function T(e, t) {
|
|
121
|
+
for (let n of e.parts) if (n.kind !== "literal" && (n.kind === "open" ? t > n.start && t <= n.end : t > n.start && t < n.end)) return n;
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/shared/PanelIcon.vue
|
|
126
|
+
var E = /* @__PURE__ */ s({
|
|
127
|
+
inheritAttrs: !1,
|
|
128
|
+
__name: "PanelIcon",
|
|
129
|
+
props: {
|
|
130
|
+
icon: {},
|
|
131
|
+
size: { default: 14 },
|
|
132
|
+
strokeWidth: { default: 2 }
|
|
133
|
+
},
|
|
134
|
+
setup(n) {
|
|
135
|
+
return (r, i) => (t(), d(f(n.icon), e({
|
|
136
|
+
size: n.size,
|
|
137
|
+
"stroke-width": n.strokeWidth
|
|
138
|
+
}, r.$attrs), null, 16, ["size", "stroke-width"]));
|
|
139
|
+
}
|
|
140
|
+
}), D = {
|
|
141
|
+
role: "listbox",
|
|
142
|
+
"aria-label": "表达式路径候选"
|
|
143
|
+
}, O = [
|
|
144
|
+
"aria-selected",
|
|
145
|
+
"title",
|
|
146
|
+
"onClick"
|
|
147
|
+
], k = { class: "cn-completion__segment font-mono text-cn-fg" }, A = {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: "shrink-0 rounded-sm bg-cn-field px-1 py-0.5 text-[9px] leading-none text-cn-muted"
|
|
150
|
+
}, j = {
|
|
151
|
+
key: 1,
|
|
152
|
+
class: "truncate text-[10px] leading-none text-cn-muted"
|
|
153
|
+
}, M = {
|
|
154
|
+
key: 0,
|
|
155
|
+
class: "cn-completion__hint px-2 py-1.5 text-[10px] leading-none text-cn-muted"
|
|
156
|
+
}, N = /* @__PURE__ */ s({
|
|
157
|
+
__name: "ExpressionCompletionPopup",
|
|
158
|
+
props: { state: {} },
|
|
159
|
+
emits: ["select"],
|
|
160
|
+
setup(e, { expose: s, emit: f }) {
|
|
161
|
+
let v = e, y = f, b = _(null);
|
|
162
|
+
return s({ rootEl: b }), r(() => v.state.activeIndex, async () => {
|
|
163
|
+
await g(), b.value?.querySelector(".cn-completion__option--active")?.scrollIntoView?.({ block: "nearest" });
|
|
164
|
+
}), (r, s) => (t(), d(l, { to: "body" }, [e.state.open ? (t(), o("div", {
|
|
165
|
+
key: 0,
|
|
166
|
+
ref_key: "rootRef",
|
|
167
|
+
ref: b,
|
|
168
|
+
class: "cn-props cn-completion fixed z-50 max-h-[200px] min-w-[140px] max-w-[280px] overflow-y-auto rounded-md border border-cn-field-line py-1 text-[11px] leading-none",
|
|
169
|
+
style: a({
|
|
170
|
+
top: `${e.state.top}px`,
|
|
171
|
+
left: `${e.state.left}px`
|
|
172
|
+
}),
|
|
173
|
+
onMousedown: s[0] ||= h(() => {}, ["prevent", "stop"]),
|
|
174
|
+
onPointerdown: s[1] ||= h(() => {}, ["stop"])
|
|
175
|
+
}, [m("div", D, [(t(!0), o(c, null, p(e.state.items, (r, a) => (t(), o("button", {
|
|
176
|
+
key: `${a}:${r.segment}`,
|
|
177
|
+
type: "button",
|
|
178
|
+
role: "option",
|
|
179
|
+
class: i(["cn-completion__option flex w-full items-center gap-1.5 px-2 py-1.5 text-left", a === e.state.activeIndex ? "cn-completion__option--active" : ""]),
|
|
180
|
+
"aria-selected": a === e.state.activeIndex,
|
|
181
|
+
title: r.path ?? r.segment,
|
|
182
|
+
onClick: (e) => y("select", a)
|
|
183
|
+
}, [
|
|
184
|
+
m("span", k, n(r.segment), 1),
|
|
185
|
+
r.type ? (t(), o("span", A, n(r.type), 1)) : u("", !0),
|
|
186
|
+
r.description ?? r.title ? (t(), o("span", j, n(r.description ?? r.title), 1)) : u("", !0)
|
|
187
|
+
], 10, O))), 128))]), e.state.openMapping ? (t(), o("div", M, " 动态字段,键由模板定义 ")) : u("", !0)], 36)) : u("", !0)]));
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/shared/completion.ts
|
|
192
|
+
function P(e, t, n, r) {
|
|
193
|
+
let i = t.start + 2, a = t.kind === "open" ? t.end : t.end - 2, o = 0;
|
|
194
|
+
for (; a - o > i && " \n\r\0\v".includes(e[a - 1 - o]);) o += 1;
|
|
195
|
+
let s = a - o, c = s - n.length;
|
|
196
|
+
return c < i || e.slice(c, s) !== n ? null : {
|
|
197
|
+
value: e.slice(0, c) + r + e.slice(s),
|
|
198
|
+
cursor: c + r.length
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/shared/completionAnchor.ts
|
|
203
|
+
function F(e, t) {
|
|
204
|
+
return parseFloat(e.getPropertyValue(t)) || 0;
|
|
205
|
+
}
|
|
206
|
+
function I(e, t, n) {
|
|
207
|
+
for (let r of n) {
|
|
208
|
+
let n = e.getPropertyValue(r);
|
|
209
|
+
n && t.setProperty(r, n);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
var L = [
|
|
213
|
+
"font-family",
|
|
214
|
+
"font-size",
|
|
215
|
+
"font-weight",
|
|
216
|
+
"font-style",
|
|
217
|
+
"font-stretch",
|
|
218
|
+
"letter-spacing",
|
|
219
|
+
"word-spacing",
|
|
220
|
+
"line-height",
|
|
221
|
+
"text-transform",
|
|
222
|
+
"text-indent",
|
|
223
|
+
"tab-size"
|
|
224
|
+
];
|
|
225
|
+
function R(e) {
|
|
226
|
+
return F(e, "line-height") || F(e, "font-size") * 1.4;
|
|
227
|
+
}
|
|
228
|
+
function z(e) {
|
|
229
|
+
let t = document.createElement("div"), n = t.style;
|
|
230
|
+
return n.position = "fixed", n.top = "0", n.left = "0", n.visibility = "hidden", e(t, n), document.body.appendChild(t), t;
|
|
231
|
+
}
|
|
232
|
+
function B(e, t) {
|
|
233
|
+
let n = e.selectionStart ?? e.value.length, r = e.getBoundingClientRect(), i = getComputedStyle(e), a = F(i, "padding-left"), o = F(i, "padding-top"), s = null, c = z((t, r) => {
|
|
234
|
+
r.whiteSpace = i.whiteSpace || "pre-wrap", r.boxSizing = "content-box", r.width = `${Math.max(0, e.clientWidth - a - F(i, "padding-right"))}px`, I(i, r, [
|
|
235
|
+
"padding-left",
|
|
236
|
+
"padding-right",
|
|
237
|
+
"padding-top",
|
|
238
|
+
"padding-bottom",
|
|
239
|
+
"word-break",
|
|
240
|
+
"overflow-wrap"
|
|
241
|
+
]), I(i, r, L), s = document.createElement("span"), s.textContent = "", t.append(document.createTextNode(e.value.slice(0, n)), s);
|
|
242
|
+
});
|
|
243
|
+
try {
|
|
244
|
+
let n = r.left + F(i, "border-left-width") + a + s.offsetLeft * t - e.scrollLeft, c = r.top + F(i, "border-top-width") + o + s.offsetTop * t - e.scrollTop;
|
|
245
|
+
return {
|
|
246
|
+
left: n,
|
|
247
|
+
top: c,
|
|
248
|
+
bottom: c + R(i) * t
|
|
249
|
+
};
|
|
250
|
+
} finally {
|
|
251
|
+
c.remove();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function V(e, t) {
|
|
255
|
+
let n = e.selectionStart ?? e.value.length, r = e.getBoundingClientRect(), i = getComputedStyle(e), a = z((t, r) => {
|
|
256
|
+
r.display = "inline-block", r.whiteSpace = "pre", I(i, r, L), t.textContent = e.value.slice(0, n);
|
|
257
|
+
});
|
|
258
|
+
try {
|
|
259
|
+
let n = a.getBoundingClientRect().width || a.offsetWidth;
|
|
260
|
+
return {
|
|
261
|
+
left: r.left + F(i, "border-left-width") + F(i, "padding-left") + n * t - e.scrollLeft,
|
|
262
|
+
top: r.top + F(i, "border-top-width"),
|
|
263
|
+
bottom: r.bottom - F(i, "border-bottom-width")
|
|
264
|
+
};
|
|
265
|
+
} finally {
|
|
266
|
+
a.remove();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function H(e, t = 1) {
|
|
270
|
+
return e instanceof HTMLTextAreaElement ? B(e, t) : V(e, t);
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
export { T as a, x as c, E as i, b as l, P as n, w as o, N as r, S as s, H as t, y as u };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { S as e, x as t } from "./layerPath-BRZK9ka1.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@5.9.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/defaultAttributes.mjs
|
|
3
|
+
var n = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 24,
|
|
6
|
+
height: 24,
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
fill: "none",
|
|
9
|
+
stroke: "currentColor",
|
|
10
|
+
"stroke-width": 2,
|
|
11
|
+
"stroke-linecap": "round",
|
|
12
|
+
"stroke-linejoin": "round"
|
|
13
|
+
}, r = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim();
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@5.9.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
16
|
+
function i(e) {
|
|
17
|
+
return e != null;
|
|
18
|
+
}
|
|
19
|
+
function a(e, t = {}) {
|
|
20
|
+
let a = t.attributeNames ?? {}, o = (e) => a[e] ?? e, s = e.size ?? e.width ?? n.width, c = e.size ?? e.height ?? n.height, l = e.aliases?.filter((e) => typeof e == "string" && e.trim() !== "").map((e) => `lucide-${e}`) ?? [], u = [...e.name ? [`lucide-${e.name}`] : [], ...l], d = t.className?.split(" ").filter(Boolean) ?? [], f = t.includeDefaultClasses === !1 ? r(...d) : r("lucide", ...u, ...d), p = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? n["stroke-width"]) * Number(e.size ?? e.width ?? n.width) / Number(t.size ?? t.width ?? n.width) : t.strokeWidth ?? n["stroke-width"];
|
|
21
|
+
return [
|
|
22
|
+
"svg",
|
|
23
|
+
{
|
|
24
|
+
...Object.entries(n).reduce((e, [t, n]) => (e[o(t)] = n, e), {}),
|
|
25
|
+
..."color" in t && t.color && { [o("stroke")]: t.color },
|
|
26
|
+
..."size" in t && i(t.size) && {
|
|
27
|
+
[o("width")]: t.size,
|
|
28
|
+
[o("height")]: t.size
|
|
29
|
+
},
|
|
30
|
+
..."width" in t && i(t.width) && { [o("width")]: t.width },
|
|
31
|
+
..."height" in t && i(t.height) && { [o("height")]: t.height },
|
|
32
|
+
[o("stroke-width")]: p,
|
|
33
|
+
...f && { [o("class")]: f },
|
|
34
|
+
[o("viewBox")]: `0 0 ${s} ${c}`,
|
|
35
|
+
...t.hasA11yProp === !1 ? { [o("aria-hidden")]: "true" } : {},
|
|
36
|
+
..."attributes" in t && t.attributes
|
|
37
|
+
},
|
|
38
|
+
e.node.map((e) => {
|
|
39
|
+
let [n, r, i] = e, a = t.nonScalingStroke ? {
|
|
40
|
+
[o("vector-effect")]: "non-scaling-stroke",
|
|
41
|
+
...r
|
|
42
|
+
} : r;
|
|
43
|
+
return i ? [
|
|
44
|
+
n,
|
|
45
|
+
a,
|
|
46
|
+
i
|
|
47
|
+
] : [n, a];
|
|
48
|
+
})
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@5.9.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
53
|
+
var o = (e) => {
|
|
54
|
+
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
55
|
+
return !1;
|
|
56
|
+
}, s = (e) => e === "", c = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), l = /* @__PURE__ */ Symbol("lucide-icons");
|
|
57
|
+
function u() {
|
|
58
|
+
return e(l, {});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@5.9.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
62
|
+
var d = ({ name: e, iconNode: n, "icon-node": r, icon: i = {
|
|
63
|
+
name: e && c(e),
|
|
64
|
+
node: n ?? r ?? [],
|
|
65
|
+
size: 24,
|
|
66
|
+
aliases: []
|
|
67
|
+
}, absoluteStrokeWidth: l, "absolute-stroke-width": d, nonScalingStroke: f, "non-scaling-stroke": p, strokeWidth: m, "stroke-width": h, size: g, width: _ = g, height: v = g, color: y, ...b }, { slots: x }) => {
|
|
68
|
+
let { size: S, color: C, strokeWidth: w = 2, absoluteStrokeWidth: T = !1, nonScalingStroke: E = !1, class: D = "" } = u(), O = s(l) || s(d) || l === !0 || d === !0 || T === !0, k = s(f) || s(p) || f === !0 || p === !0 || E === !0;
|
|
69
|
+
delete b.class;
|
|
70
|
+
let A = x.default?.(), [, j, M = []] = a(i, {
|
|
71
|
+
color: y ?? C,
|
|
72
|
+
width: _ ?? g ?? S,
|
|
73
|
+
height: v ?? g ?? S,
|
|
74
|
+
strokeWidth: m ?? h ?? w,
|
|
75
|
+
absoluteStrokeWidth: O,
|
|
76
|
+
nonScalingStroke: k,
|
|
77
|
+
className: D,
|
|
78
|
+
hasA11yProp: A != null && A.length > 0 || o(b),
|
|
79
|
+
attributes: b
|
|
80
|
+
});
|
|
81
|
+
return t("svg", j, [...M.map(([e, n]) => t(e, n)), ...A ?? []]);
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@5.9.3_/node_modules/@lucide/vue/dist/esm/createLucideIcon.mjs
|
|
85
|
+
function f(e, n = []) {
|
|
86
|
+
let r = typeof e == "string" ? {
|
|
87
|
+
name: e,
|
|
88
|
+
node: n
|
|
89
|
+
} : e;
|
|
90
|
+
return (e, { slots: n }) => t(d, {
|
|
91
|
+
...e,
|
|
92
|
+
icon: r
|
|
93
|
+
}, n.default ? { default: n.default } : void 0);
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { f as t };
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { t as e } from "./createLucideIcon-CMq8ZKo2.js";
|
|
2
|
+
var t = e({
|
|
3
|
+
name: "align-center-horizontal",
|
|
4
|
+
size: 24,
|
|
5
|
+
node: [
|
|
6
|
+
["path", {
|
|
7
|
+
d: "M2 12h20",
|
|
8
|
+
key: "9i4pu4"
|
|
9
|
+
}],
|
|
10
|
+
["path", {
|
|
11
|
+
d: "M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",
|
|
12
|
+
key: "11f1s0"
|
|
13
|
+
}],
|
|
14
|
+
["path", {
|
|
15
|
+
d: "M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",
|
|
16
|
+
key: "t14dx9"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",
|
|
20
|
+
key: "1w07xs"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",
|
|
24
|
+
key: "1apec2"
|
|
25
|
+
}]
|
|
26
|
+
]
|
|
27
|
+
}), n = e({
|
|
28
|
+
name: "align-center-vertical",
|
|
29
|
+
size: 24,
|
|
30
|
+
node: [
|
|
31
|
+
["path", {
|
|
32
|
+
d: "M12 2v20",
|
|
33
|
+
key: "t6zp3m"
|
|
34
|
+
}],
|
|
35
|
+
["path", {
|
|
36
|
+
d: "M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",
|
|
37
|
+
key: "14d6g8"
|
|
38
|
+
}],
|
|
39
|
+
["path", {
|
|
40
|
+
d: "M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",
|
|
41
|
+
key: "1e2lrw"
|
|
42
|
+
}],
|
|
43
|
+
["path", {
|
|
44
|
+
d: "M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",
|
|
45
|
+
key: "1fkdwx"
|
|
46
|
+
}],
|
|
47
|
+
["path", {
|
|
48
|
+
d: "M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",
|
|
49
|
+
key: "1euafb"
|
|
50
|
+
}]
|
|
51
|
+
]
|
|
52
|
+
}), r = e({
|
|
53
|
+
name: "align-end-horizontal",
|
|
54
|
+
size: 24,
|
|
55
|
+
node: [
|
|
56
|
+
["rect", {
|
|
57
|
+
width: "6",
|
|
58
|
+
height: "16",
|
|
59
|
+
x: "4",
|
|
60
|
+
y: "2",
|
|
61
|
+
rx: "2",
|
|
62
|
+
key: "z5wdxg"
|
|
63
|
+
}],
|
|
64
|
+
["rect", {
|
|
65
|
+
width: "6",
|
|
66
|
+
height: "9",
|
|
67
|
+
x: "14",
|
|
68
|
+
y: "9",
|
|
69
|
+
rx: "2",
|
|
70
|
+
key: "um7a8w"
|
|
71
|
+
}],
|
|
72
|
+
["path", {
|
|
73
|
+
d: "M22 22H2",
|
|
74
|
+
key: "19qnx5"
|
|
75
|
+
}]
|
|
76
|
+
]
|
|
77
|
+
}), i = e({
|
|
78
|
+
name: "align-end-vertical",
|
|
79
|
+
size: 24,
|
|
80
|
+
node: [
|
|
81
|
+
["rect", {
|
|
82
|
+
width: "16",
|
|
83
|
+
height: "6",
|
|
84
|
+
x: "2",
|
|
85
|
+
y: "4",
|
|
86
|
+
rx: "2",
|
|
87
|
+
key: "10wcwx"
|
|
88
|
+
}],
|
|
89
|
+
["rect", {
|
|
90
|
+
width: "9",
|
|
91
|
+
height: "6",
|
|
92
|
+
x: "9",
|
|
93
|
+
y: "14",
|
|
94
|
+
rx: "2",
|
|
95
|
+
key: "4p5bwg"
|
|
96
|
+
}],
|
|
97
|
+
["path", {
|
|
98
|
+
d: "M22 22V2",
|
|
99
|
+
key: "12ipfv"
|
|
100
|
+
}]
|
|
101
|
+
]
|
|
102
|
+
}), a = e({
|
|
103
|
+
name: "align-start-horizontal",
|
|
104
|
+
size: 24,
|
|
105
|
+
node: [
|
|
106
|
+
["rect", {
|
|
107
|
+
width: "6",
|
|
108
|
+
height: "16",
|
|
109
|
+
x: "4",
|
|
110
|
+
y: "6",
|
|
111
|
+
rx: "2",
|
|
112
|
+
key: "1n4dg1"
|
|
113
|
+
}],
|
|
114
|
+
["rect", {
|
|
115
|
+
width: "6",
|
|
116
|
+
height: "9",
|
|
117
|
+
x: "14",
|
|
118
|
+
y: "6",
|
|
119
|
+
rx: "2",
|
|
120
|
+
key: "17khns"
|
|
121
|
+
}],
|
|
122
|
+
["path", {
|
|
123
|
+
d: "M22 2H2",
|
|
124
|
+
key: "fhrpnj"
|
|
125
|
+
}]
|
|
126
|
+
]
|
|
127
|
+
}), o = e({
|
|
128
|
+
name: "align-start-vertical",
|
|
129
|
+
size: 24,
|
|
130
|
+
node: [
|
|
131
|
+
["rect", {
|
|
132
|
+
width: "9",
|
|
133
|
+
height: "6",
|
|
134
|
+
x: "6",
|
|
135
|
+
y: "14",
|
|
136
|
+
rx: "2",
|
|
137
|
+
key: "lpm2y7"
|
|
138
|
+
}],
|
|
139
|
+
["rect", {
|
|
140
|
+
width: "16",
|
|
141
|
+
height: "6",
|
|
142
|
+
x: "6",
|
|
143
|
+
y: "4",
|
|
144
|
+
rx: "2",
|
|
145
|
+
key: "rdj6ps"
|
|
146
|
+
}],
|
|
147
|
+
["path", {
|
|
148
|
+
d: "M2 2v20",
|
|
149
|
+
key: "1ivd8o"
|
|
150
|
+
}]
|
|
151
|
+
]
|
|
152
|
+
}), s = e({
|
|
153
|
+
name: "chevron-down",
|
|
154
|
+
size: 24,
|
|
155
|
+
node: [["path", {
|
|
156
|
+
d: "m6 9 6 6 6-6",
|
|
157
|
+
key: "qrunsl"
|
|
158
|
+
}]]
|
|
159
|
+
}), c = [
|
|
160
|
+
"top-left",
|
|
161
|
+
"top",
|
|
162
|
+
"top-right",
|
|
163
|
+
"left",
|
|
164
|
+
"center",
|
|
165
|
+
"right",
|
|
166
|
+
"bottom-left",
|
|
167
|
+
"bottom",
|
|
168
|
+
"bottom-right"
|
|
169
|
+
], l = [
|
|
170
|
+
"left",
|
|
171
|
+
"center",
|
|
172
|
+
"right"
|
|
173
|
+
], u = [
|
|
174
|
+
"top",
|
|
175
|
+
"center",
|
|
176
|
+
"bottom"
|
|
177
|
+
], d = /* @__PURE__ */ ",(。(、(;(:(!(?(」(』()(】(》(〉(…(—(~(·(!(?(%(,(.(;(:()(](}".split("("), f = [
|
|
178
|
+
"「",
|
|
179
|
+
"『",
|
|
180
|
+
"(",
|
|
181
|
+
"【",
|
|
182
|
+
"《",
|
|
183
|
+
"〈",
|
|
184
|
+
"“",
|
|
185
|
+
"‘",
|
|
186
|
+
"(",
|
|
187
|
+
"[",
|
|
188
|
+
"{"
|
|
189
|
+
], p = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
190
|
+
function m(e) {
|
|
191
|
+
return e === "" ? [] : Array.from(p.segment(e), (e) => e.segment);
|
|
192
|
+
}
|
|
193
|
+
var h = .55;
|
|
194
|
+
function g(e) {
|
|
195
|
+
return e.length === 1 && e >= " " && e <= "~";
|
|
196
|
+
}
|
|
197
|
+
function _(e) {
|
|
198
|
+
return { measure(t) {
|
|
199
|
+
let n = 0;
|
|
200
|
+
for (let e of t) n += g(e) ? h : 1;
|
|
201
|
+
return n * e;
|
|
202
|
+
} };
|
|
203
|
+
}
|
|
204
|
+
var v = (e, t) => _(t);
|
|
205
|
+
function y(e) {
|
|
206
|
+
return e.join("");
|
|
207
|
+
}
|
|
208
|
+
function b(e) {
|
|
209
|
+
return e === " " || e === " ";
|
|
210
|
+
}
|
|
211
|
+
function x(e) {
|
|
212
|
+
return d.includes(e);
|
|
213
|
+
}
|
|
214
|
+
function S(e) {
|
|
215
|
+
return f.includes(e);
|
|
216
|
+
}
|
|
217
|
+
function C() {
|
|
218
|
+
return (e, t, n) => {
|
|
219
|
+
if (e === "") return [];
|
|
220
|
+
let r = [];
|
|
221
|
+
for (let i of e.split("\n")) {
|
|
222
|
+
let e = m(i);
|
|
223
|
+
if (e.length === 0) {
|
|
224
|
+
r.push("");
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
let a = [];
|
|
228
|
+
for (let i of e) {
|
|
229
|
+
if (a.length === 0 || n.measure(y(a) + i) <= t) {
|
|
230
|
+
a.push(i);
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
let e = w(a, i);
|
|
234
|
+
e.line.length > 0 && r.push(y(e.line)), a = e.rest;
|
|
235
|
+
}
|
|
236
|
+
a.length > 0 && r.push(y(a));
|
|
237
|
+
}
|
|
238
|
+
return r;
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function w(e, t) {
|
|
242
|
+
let n = e, r = [t], i = T(e);
|
|
243
|
+
if (i !== -1) {
|
|
244
|
+
let a = +(e[i] === "-"), o = e.slice(0, i + a), s = e.slice(i + 1);
|
|
245
|
+
o.length > 0 && (n = o, r = [...s, t]);
|
|
246
|
+
}
|
|
247
|
+
return n = D(n), r = O(r), E(n, r);
|
|
248
|
+
}
|
|
249
|
+
function T(e) {
|
|
250
|
+
for (let t = e.length - 1; t > 0; t--) {
|
|
251
|
+
let n = e[t];
|
|
252
|
+
if (n === " " || n === "-") return t;
|
|
253
|
+
}
|
|
254
|
+
return -1;
|
|
255
|
+
}
|
|
256
|
+
function E(e, t) {
|
|
257
|
+
for (; t.length > 0 && x(t[0]);) e = [...e, t[0]], t = t.slice(1);
|
|
258
|
+
for (; e.length > 0 && S(e[e.length - 1]);) t = [e[e.length - 1], ...t], e = e.slice(0, -1);
|
|
259
|
+
return {
|
|
260
|
+
line: e,
|
|
261
|
+
rest: t
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function D(e) {
|
|
265
|
+
for (; e.length > 0 && b(e[e.length - 1]);) e = e.slice(0, -1);
|
|
266
|
+
return e;
|
|
267
|
+
}
|
|
268
|
+
function O(e) {
|
|
269
|
+
for (; e.length > 0 && b(e[0]);) e = e.slice(1);
|
|
270
|
+
return e;
|
|
271
|
+
}
|
|
272
|
+
var k = C();
|
|
273
|
+
function A(e) {
|
|
274
|
+
return {
|
|
275
|
+
lineBreaker: e?.lineBreaker ?? k,
|
|
276
|
+
measurerFactory: e?.measurerFactory ?? v
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function j(e) {
|
|
280
|
+
return e === 0 ? 0 : e;
|
|
281
|
+
}
|
|
282
|
+
function M(e) {
|
|
283
|
+
return j(Math.trunc(e));
|
|
284
|
+
}
|
|
285
|
+
function N(e, t) {
|
|
286
|
+
switch (e.type) {
|
|
287
|
+
case "TextLayer": {
|
|
288
|
+
if (!e.shape.autoWidth) return e.shape.width;
|
|
289
|
+
let { measurerFactory: n } = A(t), r = n(e.font, e.fontSize), i = 0;
|
|
290
|
+
for (let t of e.text.split("\n")) i = Math.max(i, r.measure(t));
|
|
291
|
+
return M(Math.ceil(i)) + M(e.shape.padding.left + e.shape.padding.right);
|
|
292
|
+
}
|
|
293
|
+
default: return e.shape.width;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function P(e) {
|
|
297
|
+
return Math.ceil(e.fontSize * e.shape.lineHeight);
|
|
298
|
+
}
|
|
299
|
+
function F(e, t) {
|
|
300
|
+
if (!e.autowrap) return [e.text];
|
|
301
|
+
let { lineBreaker: n, measurerFactory: r } = A(t);
|
|
302
|
+
return n(e.text, L(e, t), r(e.font, e.fontSize));
|
|
303
|
+
}
|
|
304
|
+
function I(e, t) {
|
|
305
|
+
switch (e.type) {
|
|
306
|
+
case "TextLayer": {
|
|
307
|
+
if (!e.shape.autoHeight) return e.shape.height;
|
|
308
|
+
let n = M(e.shape.padding.top + e.shape.padding.bottom);
|
|
309
|
+
return e.autowrap ? P(e) * F(e, t).length + n : e.text === "" ? n : P(e) + n;
|
|
310
|
+
}
|
|
311
|
+
case "QrCodeLayer": return !e.shape.autoHeight && e.shape.height > 0 ? e.shape.height : N(e, t);
|
|
312
|
+
default: return e.shape.height;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function L(e, t) {
|
|
316
|
+
return M(N(e, t) - e.shape.padding.left - e.shape.padding.right);
|
|
317
|
+
}
|
|
318
|
+
function R(e, t) {
|
|
319
|
+
return M(I(e, t) - e.shape.padding.top - e.shape.padding.bottom);
|
|
320
|
+
}
|
|
321
|
+
function z(e, t, n, r, i) {
|
|
322
|
+
return {
|
|
323
|
+
x: e === "top-right" || e === "right" || e === "bottom-right" ? t - r : e === "top" || e === "center" || e === "bottom" ? M((t - r) / 2) : 0,
|
|
324
|
+
y: e === "bottom-left" || e === "bottom" || e === "bottom-right" ? n - i : e === "left" || e === "center" || e === "right" ? M((n - i) / 2) : 0
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function B(e, t, n, r, i, a) {
|
|
328
|
+
let o = N(e, a), s = I(e, a), c = z(e.position.anchor, r, i, o, s), l = t + c.x + e.position.x, u = n + c.y + e.position.y;
|
|
329
|
+
return {
|
|
330
|
+
x: l,
|
|
331
|
+
y: u,
|
|
332
|
+
width: o,
|
|
333
|
+
height: s,
|
|
334
|
+
contentX: l + e.shape.padding.left,
|
|
335
|
+
contentY: u + e.shape.padding.top,
|
|
336
|
+
contentWidth: L(e, a),
|
|
337
|
+
contentHeight: R(e, a)
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
341
|
+
export { L as a, o as c, r as d, n as f, R as i, a as l, l as n, B as o, t as p, u as r, s, c as t, i as u };
|