@hankchen/canvas-editor-vue 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-DP-pVLyA.js +1650 -0
- package/dist/canvas.js +1 -1
- package/dist/{completionAnchor-4lhR2kJz.js → completionAnchor-CDR5YZhu.js} +28 -28
- package/dist/{createLucideIcon-CMq8ZKo2.js → createLucideIcon-SCvtEGVf.js} +11 -11
- package/dist/{dist-DuXLYZZ9.js → dist-DGtNmLwo.js} +1 -1
- package/dist/index.js +12 -12
- package/dist/{layer-panel-ArP66_vZ.js → layer-panel-CXIkRodC.js} +240 -239
- package/dist/layer-panel.js +1 -1
- package/dist/layerPath-uy2ywyld.js +76 -0
- package/dist/{property-panel-jt_rsTVW.js → property-panel-CigAECN_.js} +652 -651
- package/dist/property-panel.js +1 -1
- package/dist/shared-BTyB4vbT.js +123 -0
- package/dist/shared.js +8 -8
- package/dist/{status-bar-BhhrVoBZ.js → status-bar-DO8akYAw.js} +50 -49
- package/dist/status-bar.js +1 -1
- package/dist/{uploadFile-CutE_xI-.js → uploadFile-BOfv8aLG.js} +106 -105
- package/dist/{useDataSourceSchema-C924m8fc.js → useDataSourceSchema-DStVoY8Z.js} +47 -47
- package/dist/{usePathCompletion-DkHoGla4.js → usePathCompletion-uJ5c_gQ0.js} +60 -59
- package/dist/{useShortcutsHelp-DTC3yRil.js → useShortcutsHelp-CsyarO2P.js} +1 -1
- package/dist/{useTransientFeedback-gS9Xa9GY.js → useTransientFeedback-Cnp6aNB7.js} +1 -1
- package/dist/{useViewport-BLe2ise1.js → useViewport-D9Ipevzs.js} +5 -5
- package/package.json +1 -1
- package/dist/canvas-CS4SmrIO.js +0 -1649
- package/dist/layerPath-BRZK9ka1.js +0 -2160
- package/dist/shared-D9zYUQaw.js +0 -123
package/dist/canvas.js
CHANGED
|
@@ -1,2 +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-
|
|
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-DP-pVLyA.js";
|
|
2
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as e, Teleport as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, mergeProps as s, nextTick as c, normalizeClass as l, normalizeStyle as u, openBlock as d, ref as f, renderList as p, resolveDynamicComponent as m, toDisplayString as h, watch as g, withModifiers as _ } from "vue";
|
|
2
2
|
//#region ../canvas-editor/src/shared/expressionSchema.ts
|
|
3
3
|
function v(e) {
|
|
4
4
|
let t = e;
|
|
@@ -123,7 +123,7 @@ function T(e, t) {
|
|
|
123
123
|
}
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region src/shared/PanelIcon.vue
|
|
126
|
-
var E = /* @__PURE__ */
|
|
126
|
+
var E = /* @__PURE__ */ o({
|
|
127
127
|
inheritAttrs: !1,
|
|
128
128
|
__name: "PanelIcon",
|
|
129
129
|
props: {
|
|
@@ -131,11 +131,11 @@ var E = /* @__PURE__ */ s({
|
|
|
131
131
|
size: { default: 14 },
|
|
132
132
|
strokeWidth: { default: 2 }
|
|
133
133
|
},
|
|
134
|
-
setup(
|
|
135
|
-
return (
|
|
136
|
-
size:
|
|
137
|
-
"stroke-width":
|
|
138
|
-
},
|
|
134
|
+
setup(e) {
|
|
135
|
+
return (t, r) => (d(), n(m(e.icon), s({
|
|
136
|
+
size: e.size,
|
|
137
|
+
"stroke-width": e.strokeWidth
|
|
138
|
+
}, t.$attrs), null, 16, ["size", "stroke-width"]));
|
|
139
139
|
}
|
|
140
140
|
}), D = {
|
|
141
141
|
role: "listbox",
|
|
@@ -153,38 +153,38 @@ var E = /* @__PURE__ */ s({
|
|
|
153
153
|
}, M = {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: "cn-completion__hint px-2 py-1.5 text-[10px] leading-none text-cn-muted"
|
|
156
|
-
}, N = /* @__PURE__ */
|
|
156
|
+
}, N = /* @__PURE__ */ o({
|
|
157
157
|
__name: "ExpressionCompletionPopup",
|
|
158
158
|
props: { state: {} },
|
|
159
159
|
emits: ["select"],
|
|
160
|
-
setup(
|
|
161
|
-
let v =
|
|
162
|
-
return s({ rootEl: b }),
|
|
163
|
-
await
|
|
164
|
-
}), (
|
|
160
|
+
setup(o, { expose: s, emit: m }) {
|
|
161
|
+
let v = o, y = m, b = f(null);
|
|
162
|
+
return s({ rootEl: b }), g(() => v.state.activeIndex, async () => {
|
|
163
|
+
await c(), b.value?.querySelector(".cn-completion__option--active")?.scrollIntoView?.({ block: "nearest" });
|
|
164
|
+
}), (s, c) => (d(), n(t, { to: "body" }, [o.state.open ? (d(), i("div", {
|
|
165
165
|
key: 0,
|
|
166
166
|
ref_key: "rootRef",
|
|
167
167
|
ref: b,
|
|
168
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:
|
|
170
|
-
top: `${
|
|
171
|
-
left: `${
|
|
169
|
+
style: u({
|
|
170
|
+
top: `${o.state.top}px`,
|
|
171
|
+
left: `${o.state.left}px`
|
|
172
172
|
}),
|
|
173
|
-
onMousedown:
|
|
174
|
-
onPointerdown:
|
|
175
|
-
}, [
|
|
176
|
-
key: `${
|
|
173
|
+
onMousedown: c[0] ||= _(() => {}, ["prevent", "stop"]),
|
|
174
|
+
onPointerdown: c[1] ||= _(() => {}, ["stop"])
|
|
175
|
+
}, [a("div", D, [(d(!0), i(e, null, p(o.state.items, (e, t) => (d(), i("button", {
|
|
176
|
+
key: `${t}:${e.segment}`,
|
|
177
177
|
type: "button",
|
|
178
178
|
role: "option",
|
|
179
|
-
class:
|
|
180
|
-
"aria-selected":
|
|
181
|
-
title:
|
|
182
|
-
onClick: (e) => y("select",
|
|
179
|
+
class: l(["cn-completion__option flex w-full items-center gap-1.5 px-2 py-1.5 text-left", t === o.state.activeIndex ? "cn-completion__option--active" : ""]),
|
|
180
|
+
"aria-selected": t === o.state.activeIndex,
|
|
181
|
+
title: e.path ?? e.segment,
|
|
182
|
+
onClick: (e) => y("select", t)
|
|
183
183
|
}, [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
], 10, O))), 128))]),
|
|
184
|
+
a("span", k, h(e.segment), 1),
|
|
185
|
+
e.type ? (d(), i("span", A, h(e.type), 1)) : r("", !0),
|
|
186
|
+
e.description ?? e.title ? (d(), i("span", j, h(e.description ?? e.title), 1)) : r("", !0)
|
|
187
|
+
], 10, O))), 128))]), o.state.openMapping ? (d(), i("div", M, " 动态字段,键由模板定义 ")) : r("", !0)], 36)) : r("", !0)]));
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as e, inject as t } from "vue";
|
|
2
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
3
|
var n = {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -55,12 +55,12 @@ var o = (e) => {
|
|
|
55
55
|
return !1;
|
|
56
56
|
}, s = (e) => e === "", c = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), l = /* @__PURE__ */ Symbol("lucide-icons");
|
|
57
57
|
function u() {
|
|
58
|
-
return
|
|
58
|
+
return t(l, {});
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
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:
|
|
63
|
-
name:
|
|
62
|
+
var d = ({ name: t, iconNode: n, "icon-node": r, icon: i = {
|
|
63
|
+
name: t && c(t),
|
|
64
64
|
node: n ?? r ?? [],
|
|
65
65
|
size: 24,
|
|
66
66
|
aliases: []
|
|
@@ -78,17 +78,17 @@ var d = ({ name: e, iconNode: n, "icon-node": r, icon: i = {
|
|
|
78
78
|
hasA11yProp: A != null && A.length > 0 || o(b),
|
|
79
79
|
attributes: b
|
|
80
80
|
});
|
|
81
|
-
return
|
|
81
|
+
return e("svg", j, [...M.map(([t, n]) => e(t, n)), ...A ?? []]);
|
|
82
82
|
};
|
|
83
83
|
//#endregion
|
|
84
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(
|
|
86
|
-
let r = typeof
|
|
87
|
-
name:
|
|
85
|
+
function f(t, n = []) {
|
|
86
|
+
let r = typeof t == "string" ? {
|
|
87
|
+
name: t,
|
|
88
88
|
node: n
|
|
89
|
-
} :
|
|
90
|
-
return (
|
|
91
|
-
...
|
|
89
|
+
} : t;
|
|
90
|
+
return (t, { slots: n }) => e(d, {
|
|
91
|
+
...t,
|
|
92
92
|
icon: r
|
|
93
93
|
}, n.default ? { default: n.default } : void 0);
|
|
94
94
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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-
|
|
2
|
-
import { a as _, i as v, n as y, r as b, t as x } from "./layer-panel-
|
|
3
|
-
import { a as S, c as C, d as w, f as T, i as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F } from "./property-panel-
|
|
4
|
-
import { i as I, n as L, r as R, t as z } from "./completionAnchor-
|
|
5
|
-
import { n as B, o as V, r as H, s as U, t as W } from "./useTransientFeedback-
|
|
6
|
-
import { i as G, n as K, r as q, t as J } from "./uploadFile-
|
|
7
|
-
import { n as Y, t as X } from "./usePathCompletion-
|
|
8
|
-
import { n as Z, t as Q } from "./useViewport-
|
|
9
|
-
import { n as $, r as ee, t as te } from "./useDataSourceSchema-
|
|
10
|
-
import { n as ne, r as re, t as ie } from "./status-bar-
|
|
11
|
-
import { t as ae } from "./useShortcutsHelp-
|
|
12
|
-
import { n as oe, r as se, t as ce } from "./shared-
|
|
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-DP-pVLyA.js";
|
|
2
|
+
import { a as _, i as v, n as y, r as b, t as x } from "./layer-panel-CXIkRodC.js";
|
|
3
|
+
import { a as S, c as C, d as w, f as T, i as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F } from "./property-panel-CigAECN_.js";
|
|
4
|
+
import { i as I, n as L, r as R, t as z } from "./completionAnchor-CDR5YZhu.js";
|
|
5
|
+
import { n as B, o as V, r as H, s as U, t as W } from "./useTransientFeedback-Cnp6aNB7.js";
|
|
6
|
+
import { i as G, n as K, r as q, t as J } from "./uploadFile-BOfv8aLG.js";
|
|
7
|
+
import { n as Y, t as X } from "./usePathCompletion-uJ5c_gQ0.js";
|
|
8
|
+
import { n as Z, t as Q } from "./useViewport-D9Ipevzs.js";
|
|
9
|
+
import { n as $, r as ee, t as te } from "./useDataSourceSchema-DStVoY8Z.js";
|
|
10
|
+
import { n as ne, r as re, t as ie } from "./status-bar-DO8akYAw.js";
|
|
11
|
+
import { t as ae } from "./useShortcutsHelp-CsyarO2P.js";
|
|
12
|
+
import { n as oe, r as se, t as ce } from "./shared-BTyB4vbT.js";
|
|
13
13
|
//#region src/index.ts
|
|
14
14
|
var le = "@hankchen/canvas-editor-vue";
|
|
15
15
|
//#endregion
|