st-comp 0.0.192 → 0.0.194

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.
Files changed (78) hide show
  1. package/es/ChartLayout.js +4 -4
  2. package/es/CustomFunction.cjs +1 -1
  3. package/es/CustomFunction.js +32 -32
  4. package/es/FactorWarning.js +29 -29
  5. package/es/Kline.js +15 -15
  6. package/es/KlineBasic.cjs +1 -1
  7. package/es/KlineBasic.js +110 -104
  8. package/es/KlineConfig.js +20 -20
  9. package/es/KlineNew.js +14 -14
  10. package/es/KlinePlus.js +17 -17
  11. package/es/Map.cjs +1 -1
  12. package/es/Map.js +1 -102944
  13. package/es/MonacoEditor.cjs +1 -1
  14. package/es/MonacoEditor.js +1 -1
  15. package/es/Pagination.js +69 -69
  16. package/es/PasswordPrompt.js +3 -3
  17. package/es/Table.js +29 -29
  18. package/es/User.js +21 -21
  19. package/es/VarSelectDialog.js +22 -22
  20. package/es/VarietyAutoComplete.js +9 -9
  21. package/es/VarietySearch.cjs +6 -6
  22. package/es/VarietySearch.js +523 -507
  23. package/es/VirtualTable.js +13 -13
  24. package/es/{_initCloneObject-d37d0044.js → _initCloneObject-25087817.js} +9 -9
  25. package/es/{base-62a70f61.js → base-f5b11441.js} +40 -40
  26. package/es/{config-provider-eb54307e.js → config-provider-95d27ce2.js} +6 -6
  27. package/es/{debounce-ccdceb02.js → debounce-06f59c68.js} +9 -9
  28. package/es/{dropdown-e0119d36.js → dropdown-7a853d45.js} +9 -9
  29. package/es/{el-autocomplete-fdd72342.js → el-autocomplete-e74d589c.js} +15 -15
  30. package/es/{el-button-17a2e708.js → el-button-5a260464.js} +33 -33
  31. package/es/{el-dialog-2fbffe7d.js → el-dialog-8d8f6443.js} +15 -15
  32. package/es/{el-divider-2f300113.js → el-divider-4e1c0fb8.js} +1 -1
  33. package/es/{el-empty-34086220.js → el-empty-deee6b39.js} +5 -5
  34. package/es/{el-form-item-5f9d8170.js → el-form-item-3167d76a.js} +33 -33
  35. package/es/{el-input-c2f1f98c.js → el-input-03aad76d.js} +33 -33
  36. package/es/{el-input-number-429626d1.js → el-input-number-12c09ac3.js} +35 -35
  37. package/es/{el-loading-a45d849f.js → el-loading-86fdef94.js} +5 -5
  38. package/es/{el-menu-item-1bbf217d.js → el-menu-item-1172154b.js} +22 -22
  39. package/es/{el-message-179d8e61.js → el-message-35d4e3ac.js} +23 -23
  40. package/es/{el-message-box-869d122c.js → el-message-box-f43b6e7a.js} +20 -20
  41. package/es/{el-overlay-56098a38.js → el-overlay-04659660.js} +47 -47
  42. package/es/{el-popconfirm-6f9a189f.js → el-popconfirm-29d538b6.js} +20 -20
  43. package/es/{el-popper-d236d5d3.js → el-popper-ee1f8186.js} +125 -125
  44. package/es/{el-scrollbar-191aee47.js → el-scrollbar-09769d9e.js} +48 -48
  45. package/es/{el-segmented-d74e1fd8.js → el-segmented-916b982a.js} +8 -8
  46. package/es/{el-select-b26edf16.js → el-select-8cb88e3c.js} +307 -307
  47. package/es/{el-table-column-cc880936.js → el-table-column-0c899664.js} +12 -12
  48. package/es/{el-tag-b79bf878.js → el-tag-554c333b.js} +21 -21
  49. package/es/{index-89502796.js → index-34048a1d.js} +36 -36
  50. package/es/{index-7926ee44.js → index-384ed4b0.js} +3 -3
  51. package/es/{index-5beb56b8.js → index-5b62ea0e.js} +52 -52
  52. package/es/{index-63a17b07.js → index-69a9bd75.js} +2 -2
  53. package/es/{index-a137018b.js → index-a8ee0e8c.js} +15 -3
  54. package/es/{index-524e4e84.js → index-b07f58c9.js} +31 -31
  55. package/es/{index-97658183.js → index-b7fd560c.js} +12 -12
  56. package/es/{index-482f09b5.js → index-cfeda35a.js} +1 -1
  57. package/es/{index-08cdcff5.js → index-df06f32a.js} +15 -15
  58. package/es/{index-b2b45b6e.cjs → index-fdb71325.cjs} +2 -2
  59. package/es/{python-2b765700.cjs → python-0405c62e.cjs} +1 -1
  60. package/es/{python-2cff7134.js → python-791e6a42.js} +1 -1
  61. package/es/raf-fa761d02.js +6 -0
  62. package/es/{scroll-7d352c1f.js → scroll-9e2dd92b.js} +5 -5
  63. package/es/style.css +1 -1
  64. package/es/{use-global-config-88d2fb63.js → use-global-config-1923bb6f.js} +16 -16
  65. package/es/{validator-6d37dbfa.js → validator-fd32f925.js} +1 -1
  66. package/es/{vnode-c51c8aa3.js → vnode-f9752526.js} +1 -1
  67. package/es/{zh-cn-47b11646.js → zh-cn-d667062d.js} +2 -2
  68. package/lib/bundle.js +1 -1
  69. package/lib/bundle.umd.cjs +33 -33
  70. package/lib/{index-e33e2a73.js → index-db060de6.js} +603 -569
  71. package/lib/{python-bfee2b7e.js → python-077c8efa.js} +1 -1
  72. package/lib/style.css +1 -1
  73. package/package.json +1 -1
  74. package/packages/KlineBasic/index.vue +2 -2
  75. package/packages/MonacoEditor/index.vue +22 -0
  76. package/packages/VarietySearch/components/FactorScreen/index.vue +33 -12
  77. package/packages/VarietySearch/config.js +2 -2
  78. package/es/raf-41aed4d4.js +0 -6
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as a, computed as n, openBlock as l, createElementBlock as s, mergeProps as v, unref as p, renderSlot as i, createElementVNode as e } from "vue";
2
- import { b as w, e as d, u as m, i as f, n as g, _ as h, w as x } from "./base-62a70f61.js";
2
+ import { b as w, d, u as m, q as f, j as g, _ as h, w as x } from "./base-f5b11441.js";
3
3
  const C = w({
4
4
  size: {
5
5
  type: d([Number, String])
@@ -194,7 +194,7 @@ var z = /* @__PURE__ */ a({
194
194
  })
195
195
  ]));
196
196
  }
197
- }), v2 = b, I = /* @__PURE__ */ a({
197
+ }), v2 = b, q = /* @__PURE__ */ a({
198
198
  name: "DocumentCopy",
199
199
  __name: "document-copy",
200
200
  setup(_) {
@@ -208,7 +208,7 @@ var z = /* @__PURE__ */ a({
208
208
  })
209
209
  ]));
210
210
  }
211
- }), i2 = I, P = /* @__PURE__ */ a({
211
+ }), i2 = q, I = /* @__PURE__ */ a({
212
212
  name: "Edit",
213
213
  __name: "edit",
214
214
  setup(_) {
@@ -226,7 +226,7 @@ var z = /* @__PURE__ */ a({
226
226
  })
227
227
  ]));
228
228
  }
229
- }), w2 = P, U = /* @__PURE__ */ a({
229
+ }), w2 = I, P = /* @__PURE__ */ a({
230
230
  name: "Hide",
231
231
  __name: "hide",
232
232
  setup(_) {
@@ -244,7 +244,7 @@ var z = /* @__PURE__ */ a({
244
244
  })
245
245
  ]));
246
246
  }
247
- }), d2 = U, q = /* @__PURE__ */ a({
247
+ }), d2 = P, U = /* @__PURE__ */ a({
248
248
  name: "InfoFilled",
249
249
  __name: "info-filled",
250
250
  setup(_) {
@@ -258,7 +258,7 @@ var z = /* @__PURE__ */ a({
258
258
  })
259
259
  ]));
260
260
  }
261
- }), m2 = q, Z = /* @__PURE__ */ a({
261
+ }), m2 = U, Z = /* @__PURE__ */ a({
262
262
  name: "Loading",
263
263
  __name: "loading",
264
264
  setup(_) {
@@ -300,7 +300,7 @@ var z = /* @__PURE__ */ a({
300
300
  })
301
301
  ]));
302
302
  }
303
- }), h2 = R, $ = /* @__PURE__ */ a({
303
+ }), h2 = R, j = /* @__PURE__ */ a({
304
304
  name: "More",
305
305
  __name: "more",
306
306
  setup(_) {
@@ -314,7 +314,7 @@ var z = /* @__PURE__ */ a({
314
314
  })
315
315
  ]));
316
316
  }
317
- }), x2 = $, j = /* @__PURE__ */ a({
317
+ }), x2 = j, $ = /* @__PURE__ */ a({
318
318
  name: "Plus",
319
319
  __name: "plus",
320
320
  setup(_) {
@@ -328,7 +328,7 @@ var z = /* @__PURE__ */ a({
328
328
  })
329
329
  ]));
330
330
  }
331
- }), C2 = j, Q = /* @__PURE__ */ a({
331
+ }), C2 = $, Q = /* @__PURE__ */ a({
332
332
  name: "QuestionFilled",
333
333
  __name: "question-filled",
334
334
  setup(_) {
@@ -442,33 +442,33 @@ var z = /* @__PURE__ */ a({
442
442
  }
443
443
  }), A2 = X;
444
444
  export {
445
- B2 as A,
446
- A2 as B,
445
+ z2 as A,
446
+ y2 as B,
447
447
  a2 as E,
448
- v2 as a,
449
- _2 as b,
450
- p2 as c,
448
+ p2 as a,
449
+ v2 as b,
450
+ s2 as c,
451
451
  i2 as d,
452
452
  w2 as e,
453
- r2 as f,
454
- c2 as g,
455
- h2 as h,
453
+ _2 as f,
454
+ g2 as g,
455
+ l2 as h,
456
456
  m2 as i,
457
- n2 as j,
458
- t2 as k,
457
+ o2 as j,
458
+ d2 as k,
459
459
  f2 as l,
460
- x2 as m,
461
- s2 as n,
462
- u2 as o,
460
+ h2 as m,
461
+ r2 as n,
462
+ x2 as o,
463
463
  C2 as p,
464
464
  L2 as q,
465
- M2 as r,
466
- g2 as s,
467
- l2 as t,
468
- V2 as u,
469
- o2 as v,
470
- H2 as w,
471
- d2 as x,
472
- z2 as y,
473
- y2 as z
465
+ u2 as r,
466
+ B2 as s,
467
+ c2 as t,
468
+ n2 as u,
469
+ H2 as v,
470
+ A2 as w,
471
+ t2 as x,
472
+ V2 as y,
473
+ M2 as z
474
474
  };
@@ -1,7 +1,7 @@
1
- import { getCurrentInstance as F, shallowRef as A, ref as g, watch as E, unref as p, nextTick as _ } from "vue";
2
- import { c as m } from "./el-scrollbar-191aee47.js";
3
- import { y as b } from "./el-popper-d236d5d3.js";
4
- import { x as C } from "./base-62a70f61.js";
1
+ import { getCurrentInstance as x, shallowRef as b, ref as g, watch as A, unref as p, nextTick as E } from "vue";
2
+ import { b as m } from "./el-scrollbar-09769d9e.js";
3
+ import { i as _ } from "./el-popper-ee1f8186.js";
4
+ import { c as C } from "./base-f5b11441.js";
5
5
  function D(l, {
6
6
  disabled: n,
7
7
  beforeFocus: s,
@@ -9,20 +9,20 @@ function D(l, {
9
9
  beforeBlur: i,
10
10
  afterBlur: r
11
11
  } = {}) {
12
- const v = F(), { emit: o } = v, e = A(), u = g(!1), d = (t) => {
12
+ const v = x(), { emit: o } = v, e = b(), u = g(!1), d = (t) => {
13
13
  const a = C(s) ? s(t) : !1;
14
14
  p(n) || u.value || a || (u.value = !0, o("focus", t), c == null || c());
15
15
  }, h = (t) => {
16
16
  var a;
17
17
  const f = C(i) ? i(t) : !1;
18
18
  p(n) || t.relatedTarget && ((a = e.value) != null && a.contains(t.relatedTarget)) || f || (u.value = !1, o("blur", t), r == null || r());
19
- }, x = (t) => {
19
+ }, F = (t) => {
20
20
  var a, f;
21
- p(n) || b(t.target) || (a = e.value) != null && a.contains(document.activeElement) && e.value !== document.activeElement || (f = l.value) == null || f.focus();
21
+ p(n) || _(t.target) || (a = e.value) != null && a.contains(document.activeElement) && e.value !== document.activeElement || (f = l.value) == null || f.focus();
22
22
  };
23
- return E([e, () => p(n)], ([t, a]) => {
23
+ return A([e, () => p(n)], ([t, a]) => {
24
24
  t && (a ? t.removeAttribute("tabindex") : t.setAttribute("tabindex", "-1"));
25
- }), m(e, "focus", d, !0), m(e, "blur", h, !0), m(e, "click", x, !0), {
25
+ }), m(e, "focus", d, !0), m(e, "blur", h, !0), m(e, "click", F, !0), {
26
26
  isFocused: u,
27
27
  wrapperRef: e,
28
28
  handleFocus: d,
@@ -42,7 +42,7 @@ function I({
42
42
  const u = (e = o.target) == null ? void 0 : e.value, d = u[u.length - 1] || "";
43
43
  s.value = !k(d);
44
44
  }, r = (o) => {
45
- n == null || n("compositionend", o), s.value && (s.value = !1, _(() => l(o)));
45
+ n == null || n("compositionend", o), s.value && (s.value = !1, E(() => l(o)));
46
46
  };
47
47
  return {
48
48
  isComposing: s,
@@ -55,6 +55,6 @@ function I({
55
55
  };
56
56
  }
57
57
  export {
58
- D as a,
59
- I as u
58
+ I as a,
59
+ D as u
60
60
  };
@@ -1,5 +1,5 @@
1
1
  import { inject as c, ref as l, computed as s, unref as i, isRef as d } from "vue";
2
- import { h as u } from "./index-89502796.js";
2
+ import { b as u } from "./index-34048a1d.js";
3
3
  function m(e, t, a) {
4
4
  var o = e == null ? void 0 : u(e, t);
5
5
  return o === void 0 ? a : o;
@@ -1,7 +1,7 @@
1
- import { defineComponent as h, computed as a, ref as T, unref as s, openBlock as u, createBlock as R, mergeProps as U, withCtx as v, createElementBlock as $, normalizeClass as D, toDisplayString as c, createCommentVNode as b, renderSlot as g, createTextVNode as K } from "vue";
2
- import { j as f, h as r, E as V } from "./el-popper-d236d5d3.js";
3
- import { d } from "./dropdown-e0119d36.js";
4
- import { b as O, o as H, u as I, n as L, _ as j, A as z, w as F } from "./base-62a70f61.js";
1
+ import { defineComponent as h, computed as a, ref as A, unref as s, openBlock as u, createBlock as R, mergeProps as U, withCtx as c, createElementBlock as $, normalizeClass as D, toDisplayString as v, createCommentVNode as b, renderSlot as g, createTextVNode as K } from "vue";
2
+ import { c as f, a as r, E as V } from "./el-popper-ee1f8186.js";
3
+ import { d } from "./dropdown-7a853d45.js";
4
+ import { b as O, g as H, u as I, j as L, _ as j, n as z, w as F } from "./base-f5b11441.js";
5
5
  const q = O({
6
6
  trigger: f.trigger,
7
7
  triggerKeys: f.triggerKeys,
@@ -69,7 +69,7 @@ const q = O({
69
69
  props: q,
70
70
  emits: G,
71
71
  setup(t, { expose: p, emit: n }) {
72
- const o = t, y = a(() => o[J]), i = I("popover"), l = T(), w = a(() => {
72
+ const o = t, y = a(() => o[J]), i = I("popover"), l = A(), w = a(() => {
73
73
  var e;
74
74
  return (e = s(l)) == null ? void 0 : e.popperRef;
75
75
  }), E = a(() => [
@@ -82,11 +82,11 @@ const q = O({
82
82
  (e = l.value) == null || e.hide();
83
83
  }, S = () => {
84
84
  n("before-enter");
85
- }, A = () => {
86
- n("before-leave");
87
85
  }, B = () => {
88
- n("after-enter");
86
+ n("before-leave");
89
87
  }, N = () => {
88
+ n("after-enter");
89
+ }, T = () => {
90
90
  n("update:visible", !1), n("after-leave");
91
91
  };
92
92
  return p({
@@ -121,21 +121,21 @@ const q = O({
121
121
  "gpu-acceleration": s(C),
122
122
  "onUpdate:visible": s(y),
123
123
  onBeforeShow: S,
124
- onBeforeHide: A,
125
- onShow: B,
126
- onHide: N
124
+ onBeforeHide: B,
125
+ onShow: N,
126
+ onHide: T
127
127
  }), {
128
- content: v(() => [
128
+ content: c(() => [
129
129
  e.title ? (u(), $("div", {
130
130
  key: 0,
131
131
  class: D(s(i).e("title")),
132
132
  role: "title"
133
- }, c(e.title), 3)) : b("v-if", !0),
133
+ }, v(e.title), 3)) : b("v-if", !0),
134
134
  g(e.$slots, "default", {}, () => [
135
- K(c(e.content), 1)
135
+ K(v(e.content), 1)
136
136
  ])
137
137
  ]),
138
- default: v(() => [
138
+ default: c(() => [
139
139
  e.$slots.reference ? g(e.$slots, "reference", { key: 0 }) : b("v-if", !0)
140
140
  ]),
141
141
  _: 3
@@ -652,9 +652,9 @@ ${e.toString()}`}}class Rp{constructor(e=new Tf,t=!1,i,n=LK){var o;this._service
652
652
  * Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
653
653
  * Released under the MIT license
654
654
  * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
655
- *-----------------------------------------------------------------------------*/CA({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then(()=>require("./python-2b765700.cjs"))});/*!-----------------------------------------------------------------------------
655
+ *-----------------------------------------------------------------------------*/CA({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then(()=>require("./python-0405c62e.cjs"))});/*!-----------------------------------------------------------------------------
656
656
  * Copyright (c) Microsoft Corporation. All rights reserved.
657
657
  * Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
658
658
  * Released under the MIT license
659
659
  * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
660
- *-----------------------------------------------------------------------------*/CA({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Promise.resolve().then(()=>require("./lua-7e5aa405.cjs"))});const wA=s=>(ht.pushScopeId("data-v-6892df0e"),s=s(),ht.popScopeId(),s),XG={class:"editor-wrapper"},JG={class:"suggestion-header"},eZ=wA(()=>ht.createElementVNode("span",{class:"suggestion-title"},"相关自定义函数",-1)),tZ={class:"suggestion-count"},iZ={class:"suggestion-list"},nZ=["onClick"],sZ={class:"suggestion-text"},oZ=wA(()=>ht.createElementVNode("div",{class:"suggestion-footer"},"使用 ↑↓ 选择,Enter 确认,Esc 取消",-1)),rZ={__name:"index",props:{defaultValue:{type:String,default:""},language:{type:String,default:"python"},theme:{type:String,default:"vs-dark"},suggestionEnable:{type:Boolean,default:!1}},emits:["change"],setup(s,{expose:e,emit:t}){const{request:i}=ht.inject("stConfig"),n=t,o=s;let r=null,a=null;const l=ht.ref(null),c=ht.ref([]),h=ht.ref(-1),d=ht.ref(null),u=ht.ref(!1),f=LA.G(async(L="")=>{if(o.suggestionEnable)try{const{body:I}=await i.post("/common/qt/querySearchFunctions"),B=I.filter(({funcName:M})=>M.toLowerCase().includes(L.toLowerCase()));B.length>0?g(B):m()}catch(I){console.error("获取自定义函数失败:",I),m()}},200),g=async L=>{o.suggestionEnable&&(c.value=L,h.value=L.length>0?0:-1,u.value=!0,_())},m=()=>{o.suggestionEnable&&(c.value=[],h.value=-1,u.value=!1)},_=()=>{o.suggestionEnable&&ht.nextTick(()=>{if(!r||!d.value)return;const L=r.getPosition(),I=r.getScrolledVisiblePosition(L);if(I){const M=r.getDomNode().getBoundingClientRect(),T=I.left+M.left+40,R=I.top+M.top+I.height;d.value.style.left=`${T}px`,d.value.style.top=`${R}px`}})},v=()=>{if(!o.suggestionEnable||h.value===-1||!c.value[h.value])return;const L=c.value[h.value].funcName,I=r.getPosition(),T=r.getModel().getLineContent(I.lineNumber).lastIndexOf("#",I.column-2);if(T===-1){m();return}const R={lineNumber:I.lineNumber,column:T+1},K={lineNumber:I.lineNumber,column:I.column};r.executeEdits("suggestion",[{range:new mA(R.lineNumber,R.column,K.lineNumber,K.column),text:L,forceMoveMarkers:!0}]);const Q={lineNumber:I.lineNumber,column:T+1+L.length};r.setPosition(Q),r.focus(),m()},b=async()=>{if(!o.suggestionEnable)return;const L=r.getPosition(),M=r.getModel().getLineContent(L.lineNumber).substring(0,L.column-1),T=M.lastIndexOf("#");if(T!==-1){const R=M.substring(T+1);a&&(a.lineNumber!==L.lineNumber||a.column!==L.column)&&m(),a={...L},f(R)}else m()},C=()=>{if(!o.suggestionEnable||!d.value||h.value===-1)return;const L=d.value.querySelector(".suggestion-list"),I=d.value.querySelector(".suggestion-item.selected");if(L&&I){const B=L.getBoundingClientRect(),M=I.getBoundingClientRect();M.top<B.top?L.scrollTop-=B.top-M.top:M.bottom>B.bottom&&(L.scrollTop+=M.bottom-B.bottom)}},w=L=>{if(u.value)switch(L.code){case"ArrowUp":{L.preventDefault(),L.stopPropagation(),h.value=h.value<=0?c.value.length-1:h.value-1,ht.nextTick(()=>C());break}case"ArrowDown":{L.preventDefault(),L.stopPropagation(),h.value=h.value>=c.value.length-1?0:h.value+1,ht.nextTick(()=>C());break}case"ArrowLeft":{L.preventDefault(),L.stopPropagation();break}case"ArrowRight":{L.preventDefault(),L.stopPropagation();break}case"Enter":{L.preventDefault(),L.stopPropagation(),v();break}case"Escape":{L.preventDefault(),L.stopPropagation(),m();break}}},y=L=>{r&&(n("change",r.getValue()),b())},D=L=>{u.value&&_()},k=L=>{d.value&&!d.value.contains(L.target)&&m()};return ht.onMounted(()=>{r=pA.create(l.value,{value:o.defaultValue,language:o.language,theme:o.theme}),r.onKeyDown(w),r.onDidChangeModelContent(y),r.onDidChangeCursorPosition(D),document.addEventListener("click",k)}),ht.onUnmounted(()=>{r==null||r.dispose(),document.removeEventListener("click",k)}),e({resize:()=>{r.layout()},getInstance:()=>r,getValue:()=>r.getValue(),setValue:L=>{r.setValue(L)},setReadOnly:(L=!0)=>{r.updateOptions({readOnly:L})}}),(L,I)=>(ht.openBlock(),ht.createElementBlock("div",XG,[ht.createElementVNode("div",{ref_key:"editorContainer",ref:l,class:"editor-container"},null,512),u.value&&c.value.length>0?(ht.openBlock(),ht.createBlock(ht.Teleport,{key:0,to:"body"},[ht.createElementVNode("div",{ref_key:"suggestionBoxRef",ref:d,class:"suggestion-box"},[ht.createElementVNode("div",JG,[eZ,ht.createElementVNode("span",tZ,ht.toDisplayString(c.value.length)+" 项",1)]),ht.createElementVNode("div",iZ,[(ht.openBlock(!0),ht.createElementBlock(ht.Fragment,null,ht.renderList(c.value,(B,M)=>(ht.openBlock(),ht.createElementBlock("div",{key:B.id,class:ht.normalizeClass(["suggestion-item",{selected:M===h.value}]),onClick:T=>{h.value=M,v()}},[ht.createElementVNode("span",sZ,ht.toDisplayString(B.funcName),1)],10,nZ))),128))]),oZ],512)])):ht.createCommentVNode("",!0)]))}},aZ=DA._export_sfc(rZ,[["__scopeId","data-v-6892df0e"]]);exports.MonacoEditor=aZ;exports.monaco_editor_core_star=_A;
660
+ *-----------------------------------------------------------------------------*/CA({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Promise.resolve().then(()=>require("./lua-7e5aa405.cjs"))});const wA=s=>(ht.pushScopeId("data-v-1d2cbe92"),s=s(),ht.popScopeId(),s),XG={class:"editor-wrapper"},JG={class:"suggestion-header"},eZ=wA(()=>ht.createElementVNode("span",{class:"suggestion-title"},"相关自定义函数",-1)),tZ={class:"suggestion-count"},iZ={class:"suggestion-list"},nZ=["onClick"],sZ={class:"suggestion-text"},oZ=wA(()=>ht.createElementVNode("div",{class:"suggestion-footer"},"使用 ↑↓ 选择,Enter 确认,Esc 取消",-1)),rZ={__name:"index",props:{defaultValue:{type:String,default:""},language:{type:String,default:"python"},theme:{type:String,default:"vs-dark"},suggestionEnable:{type:Boolean,default:!1}},emits:["change"],setup(s,{expose:e,emit:t}){const{request:i}=ht.inject("stConfig"),n=t,o=s;let r=null,a=null;const l=ht.ref(null),c=ht.ref([]),h=ht.ref(-1),d=ht.ref(null),u=ht.ref(!1),f=LA.G(async(L="")=>{if(o.suggestionEnable)try{const{body:I}=await i.post("/common/qt/querySearchFunctions"),B=I.filter(({funcName:M})=>M.toLowerCase().includes(L.toLowerCase()));B.length>0?g(B):m()}catch(I){console.error("获取自定义函数失败:",I),m()}},200),g=async L=>{o.suggestionEnable&&(c.value=L,h.value=L.length>0?0:-1,u.value=!0,_())},m=()=>{o.suggestionEnable&&(c.value=[],h.value=-1,u.value=!1)},_=()=>{o.suggestionEnable&&ht.nextTick(()=>{if(!r||!d.value)return;const L=r.getPosition(),I=r.getScrolledVisiblePosition(L);if(I){const M=r.getDomNode().getBoundingClientRect(),T=I.left+M.left+40,R=I.top+M.top+I.height;d.value.style.left=`${T}px`,d.value.style.top=`${R}px`}})},v=()=>{if(!o.suggestionEnable||h.value===-1||!c.value[h.value])return;const L=c.value[h.value].funcName,I=r.getPosition(),T=r.getModel().getLineContent(I.lineNumber).lastIndexOf("#",I.column-2);if(T===-1){m();return}const R={lineNumber:I.lineNumber,column:T+1},K={lineNumber:I.lineNumber,column:I.column};r.executeEdits("suggestion",[{range:new mA(R.lineNumber,R.column,K.lineNumber,K.column),text:L,forceMoveMarkers:!0}]);const Q={lineNumber:I.lineNumber,column:T+1+L.length};r.setPosition(Q),r.focus(),m()},b=async()=>{if(!o.suggestionEnable)return;const L=r.getPosition(),M=r.getModel().getLineContent(L.lineNumber).substring(0,L.column-1),T=M.lastIndexOf("#");if(T!==-1){const R=M.substring(T+1);a&&(a.lineNumber!==L.lineNumber||a.column!==L.column)&&m(),a={...L},f(R)}else m()},C=()=>{if(!o.suggestionEnable||!d.value||h.value===-1)return;const L=d.value.querySelector(".suggestion-list"),I=d.value.querySelector(".suggestion-item.selected");if(L&&I){const B=L.getBoundingClientRect(),M=I.getBoundingClientRect();M.top<B.top?L.scrollTop-=B.top-M.top:M.bottom>B.bottom&&(L.scrollTop+=M.bottom-B.bottom)}},w=L=>{if(u.value)switch(L.code){case"ArrowUp":{L.preventDefault(),L.stopPropagation(),h.value=h.value<=0?c.value.length-1:h.value-1,ht.nextTick(()=>C());break}case"ArrowDown":{L.preventDefault(),L.stopPropagation(),h.value=h.value>=c.value.length-1?0:h.value+1,ht.nextTick(()=>C());break}case"ArrowLeft":{L.preventDefault(),L.stopPropagation();break}case"ArrowRight":{L.preventDefault(),L.stopPropagation();break}case"Enter":{L.preventDefault(),L.stopPropagation(),v();break}case"Escape":{L.preventDefault(),L.stopPropagation(),m();break}}},y=L=>{r&&(n("change",r.getValue()),b())},D=L=>{u.value&&_()},k=L=>{d.value&&!d.value.contains(L.target)&&m()};return ht.onMounted(()=>{r=pA.create(l.value,{value:o.defaultValue,language:o.language,theme:o.theme}),r.onKeyDown(w),r.onDidChangeModelContent(y),r.onDidChangeCursorPosition(D),document.addEventListener("click",k)}),ht.onUnmounted(()=>{r==null||r.dispose(),document.removeEventListener("click",k)}),e({resize:()=>{r.layout()},getInstance:()=>r,getValue:()=>r.getValue(),setValue:L=>{r.setValue(L)},setReadOnly:(L=!0)=>{r.updateOptions({readOnly:L})},focusToEnd:()=>{if(!r)return;const L=r.getModel();if(!L)return;const I=L.getLineCount(),B=L.getLineContent(I),M={lineNumber:I,column:B.length+1};r.setPosition(M),r.focus(),r.revealPositionInCenter(M)}}),(L,I)=>(ht.openBlock(),ht.createElementBlock("div",XG,[ht.createElementVNode("div",{ref_key:"editorContainer",ref:l,class:"editor-container"},null,512),u.value&&c.value.length>0?(ht.openBlock(),ht.createBlock(ht.Teleport,{key:0,to:"body"},[ht.createElementVNode("div",{ref_key:"suggestionBoxRef",ref:d,class:"suggestion-box"},[ht.createElementVNode("div",JG,[eZ,ht.createElementVNode("span",tZ,ht.toDisplayString(c.value.length)+" 项",1)]),ht.createElementVNode("div",iZ,[(ht.openBlock(!0),ht.createElementBlock(ht.Fragment,null,ht.renderList(c.value,(B,M)=>(ht.openBlock(),ht.createElementBlock("div",{key:B.id,class:ht.normalizeClass(["suggestion-item",{selected:M===h.value}]),onClick:T=>{h.value=M,v()}},[ht.createElementVNode("span",sZ,ht.toDisplayString(B.funcName),1)],10,nZ))),128))]),oZ],512)])):ht.createCommentVNode("",!0)]))}},aZ=DA._export_sfc(rZ,[["__scopeId","data-v-1d2cbe92"]]);exports.MonacoEditor=aZ;exports.monaco_editor_core_star=_A;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-b2b45b6e.cjs");require("vue");require("./index-8901a38c.cjs");require("./_plugin-vue_export-helper-f246444f.cjs");/*!-----------------------------------------------------------------------------
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-fdb71325.cjs");require("vue");require("./index-8901a38c.cjs");require("./_plugin-vue_export-helper-f246444f.cjs");/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import { m as a } from "./index-a137018b.js";
1
+ import { m as a } from "./index-a8ee0e8c.js";
2
2
  import "vue";
3
3
  import "./index-7ed0999e.js";
4
4
  import "./_plugin-vue_export-helper-dad06003.js";
@@ -0,0 +1,6 @@
1
+ import { a as o } from "./base-f5b11441.js";
2
+ const e = (i) => o ? window.requestAnimationFrame(i) : setTimeout(i, 16), a = (i) => o ? window.cancelAnimationFrame(i) : clearTimeout(i);
3
+ export {
4
+ a as c,
5
+ e as r
6
+ };
@@ -1,6 +1,6 @@
1
- import { s as f } from "./base-62a70f61.js";
1
+ import { a as f } from "./base-f5b11441.js";
2
2
  let r;
3
- const u = (o) => {
3
+ const a = (o) => {
4
4
  var l;
5
5
  if (!f)
6
6
  return 0;
@@ -15,7 +15,7 @@ const u = (o) => {
15
15
  const i = s.offsetWidth;
16
16
  return (l = t.parentNode) == null || l.removeChild(t), r = e - i, r;
17
17
  };
18
- function a(o, l) {
18
+ function u(o, l) {
19
19
  if (!f)
20
20
  return;
21
21
  if (!l) {
@@ -30,6 +30,6 @@ function a(o, l) {
30
30
  s < n ? o.scrollTop = s : i > c && (o.scrollTop = i - o.clientHeight);
31
31
  }
32
32
  export {
33
- u as g,
34
- a as s
33
+ a as g,
34
+ u as s
35
35
  };