@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.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-CS4SmrIO.js";
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 { 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";
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__ */ s({
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(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"]));
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__ */ s({
156
+ }, N = /* @__PURE__ */ o({
157
157
  __name: "ExpressionCompletionPopup",
158
158
  props: { state: {} },
159
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", {
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: a({
170
- top: `${e.state.top}px`,
171
- left: `${e.state.left}px`
169
+ style: u({
170
+ top: `${o.state.top}px`,
171
+ left: `${o.state.left}px`
172
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}`,
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: 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)
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
- 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)]));
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 { S as e, x as t } from "./layerPath-BRZK9ka1.js";
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 e(l, {});
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: e, iconNode: n, "icon-node": r, icon: i = {
63
- name: e && c(e),
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 t("svg", j, [...M.map(([e, n]) => t(e, n)), ...A ?? []]);
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(e, n = []) {
86
- let r = typeof e == "string" ? {
87
- name: e,
85
+ function f(t, n = []) {
86
+ let r = typeof t == "string" ? {
87
+ name: t,
88
88
  node: n
89
- } : e;
90
- return (e, { slots: n }) => t(d, {
91
- ...e,
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
  }
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-CMq8ZKo2.js";
1
+ import { t as e } from "./createLucideIcon-SCvtEGVf.js";
2
2
  var t = e({
3
3
  name: "align-center-horizontal",
4
4
  size: 24,
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-CS4SmrIO.js";
2
- import { a as _, i as v, n as y, r as b, t as x } from "./layer-panel-ArP66_vZ.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-jt_rsTVW.js";
4
- import { i as I, n as L, r as R, t as z } from "./completionAnchor-4lhR2kJz.js";
5
- import { n as B, o as V, r as H, s as U, t as W } from "./useTransientFeedback-gS9Xa9GY.js";
6
- import { i as G, n as K, r as q, t as J } from "./uploadFile-CutE_xI-.js";
7
- import { n as Y, t as X } from "./usePathCompletion-DkHoGla4.js";
8
- import { n as Z, t as Q } from "./useViewport-BLe2ise1.js";
9
- import { n as $, r as ee, t as te } from "./useDataSourceSchema-C924m8fc.js";
10
- import { n as ne, r as re, t as ie } from "./status-bar-BhhrVoBZ.js";
11
- import { t as ae } from "./useShortcutsHelp-DTC3yRil.js";
12
- import { n as oe, r as se, t as ce } from "./shared-D9zYUQaw.js";
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