yc-component 0.1.8 → 0.1.9

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 (65) hide show
  1. package/dist/image-selector/api/images.d.ts +6 -0
  2. package/dist/image-selector/api/images.d.ts.map +1 -0
  3. package/dist/image-selector/components/YcImageSelectorDialog.d.ts +28 -0
  4. package/dist/image-selector/components/YcImageSelectorDialog.d.ts.map +1 -0
  5. package/dist/image-selector/components/YcImageSelectorProvider.d.ts +42 -0
  6. package/dist/image-selector/components/YcImageSelectorProvider.d.ts.map +1 -0
  7. package/dist/image-selector/composables/useImageSelector.d.ts +10 -0
  8. package/dist/image-selector/composables/useImageSelector.d.ts.map +1 -0
  9. package/dist/image-selector/config.d.ts +12 -0
  10. package/dist/image-selector/config.d.ts.map +1 -0
  11. package/dist/image-selector/context.d.ts +60 -0
  12. package/dist/image-selector/context.d.ts.map +1 -0
  13. package/dist/image-selector/dialog-state.d.ts +39 -0
  14. package/dist/image-selector/dialog-state.d.ts.map +1 -0
  15. package/dist/image-selector/index.d.ts +15 -0
  16. package/dist/image-selector/index.d.ts.map +1 -0
  17. package/dist/image-selector/inject.d.ts +59 -0
  18. package/dist/image-selector/inject.d.ts.map +1 -0
  19. package/dist/image-selector/types/index.d.ts +84 -0
  20. package/dist/image-selector/types/index.d.ts.map +1 -0
  21. package/dist/index.css +1 -0
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/plugin.d.ts +2 -0
  25. package/dist/plugin.d.ts.map +1 -1
  26. package/dist/yc-component.cjs.full.js +50 -0
  27. package/dist/yc-component.cjs.js +5 -0
  28. package/dist/yc-component.esm.full.js +12216 -0
  29. package/dist/yc-component.esm.js +1931 -0
  30. package/dist/yc-component.umd.full.js +112 -0
  31. package/dist/yc-component.umd.full.min.js +1 -0
  32. package/dist/yc-component.umd.js +6 -0
  33. package/dist/yc-component.umd.min.js +1 -0
  34. package/package.json +32 -6
  35. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  36. package/dist/ai-task/api/http.js +0 -47
  37. package/dist/ai-task/api/prompt.js +0 -9
  38. package/dist/ai-task/api/workflow.js +0 -15
  39. package/dist/ai-task/components/AiTaskPanel.css +0 -1
  40. package/dist/ai-task/components/AiTaskPanel.vue.js +0 -7
  41. package/dist/ai-task/components/AiTaskPanel.vue2.js +0 -248
  42. package/dist/ai-task/components/AiTaskProvider.vue.js +0 -69
  43. package/dist/ai-task/components/AiTaskProvider.vue2.js +0 -4
  44. package/dist/ai-task/components/AiUseDialog.css +0 -1
  45. package/dist/ai-task/components/AiUseDialog.vue.js +0 -7
  46. package/dist/ai-task/components/AiUseDialog.vue2.js +0 -248
  47. package/dist/ai-task/composables/useAiTask.js +0 -11
  48. package/dist/ai-task/config.js +0 -23
  49. package/dist/ai-task/context.js +0 -42
  50. package/dist/ai-task/dialog-state.js +0 -28
  51. package/dist/ai-task/index.js +0 -24
  52. package/dist/ai-task/inject.js +0 -10
  53. package/dist/ai-task/services/taskRunner.js +0 -60
  54. package/dist/ai-task/store/useAiTaskStore.js +0 -230
  55. package/dist/ai-task/style.css +0 -3
  56. package/dist/ai-task/useScopedStore.js +0 -10
  57. package/dist/ai-task/utils/runClientScript.js +0 -26
  58. package/dist/ai-task/utils/storage.js +0 -45
  59. package/dist/index.js +0 -31
  60. package/dist/page-window/YcPageWindow.css +0 -1
  61. package/dist/page-window/YcPageWindow.vue.js +0 -7
  62. package/dist/page-window/YcPageWindow.vue2.js +0 -230
  63. package/dist/page-window/index.js +0 -5
  64. package/dist/page-window/style.css +0 -1
  65. package/dist/plugin.js +0 -19
@@ -1,230 +0,0 @@
1
- import { defineComponent as M, ref as P, computed as f, watch as U, onBeforeUnmount as $, resolveComponent as v, resolveDirective as F, openBlock as c, createBlock as x, Transition as Y, withCtx as o, withDirectives as C, createElementVNode as w, normalizeStyle as T, createVNode as n, unref as s, toDisplayString as p, createElementBlock as m, createCommentVNode as y, createTextVNode as b, renderSlot as S, Fragment as j, vShow as q } from "vue";
2
- import { ArrowLeft as G, ArrowUpBold as J, ArrowDownBold as O, Switch as Q, Close as X, Check as Z } from "@element-plus/icons-vue";
3
- const ee = { class: "yc-page-window__header" }, te = { class: "yc-page-window__title" }, ne = {
4
- key: 0,
5
- class: "yc-page-window__nav"
6
- }, oe = { class: "yc-page-window__opera" }, le = { class: "yc-page-window__content" }, de = /* @__PURE__ */ M({
7
- __name: "YcPageWindow",
8
- props: {
9
- visible: { type: Boolean },
10
- title: { default: "" },
11
- type: { default: "" },
12
- showButtons: { type: Boolean, default: !0 },
13
- showConfirm: { type: Boolean, default: !0 },
14
- contentMinHeight: { default: "calc(100vh - 175px)" },
15
- cancelText: { default: "取消" },
16
- confirmText: { default: "保存" },
17
- disabled: { type: Boolean, default: !1 },
18
- loading: { type: Boolean, default: !1 },
19
- zIndex: { default: 9 },
20
- list: { default: () => [] },
21
- row: { default: null },
22
- rowKey: { default: "id" }
23
- },
24
- emits: ["update:visible", "update:type", "confirm", "close", "opened", "changeType", "prev", "next", "checkRow"],
25
- setup(l, { expose: N, emit: D }) {
26
- const t = l, a = D, _ = P(!1), g = f(() => t.loading || _.value), I = f(() => t.type === "detail" ? "详情" : t.type === "edit" ? "编辑" : t.type === "add" ? "新增" : ""), V = f(
27
- () => t.list.length > 0 && t.row != null
28
- ), z = f(
29
- () => ["detail", "edit"].includes(t.type)
30
- ), A = f(() => t.type !== "detail");
31
- function h() {
32
- if (!t.row) return -1;
33
- const e = t.rowKey, i = t.row[e];
34
- return t.list.findIndex((d) => d[e] === i);
35
- }
36
- function k(e) {
37
- const i = h();
38
- return i < 0 ? !0 : e === "prev" ? i <= 0 : i >= t.list.length - 1;
39
- }
40
- function H() {
41
- const e = h();
42
- if (e <= 0) return;
43
- const i = t.list[e - 1];
44
- a("checkRow", i), a("prev", i);
45
- }
46
- function L() {
47
- const e = h();
48
- if (e < 0 || e >= t.list.length - 1) return;
49
- const i = t.list[e + 1];
50
- a("checkRow", i), a("next", i);
51
- }
52
- function R() {
53
- const e = t.type === "detail" ? "edit" : "detail";
54
- a("update:type", e), a("changeType");
55
- }
56
- function r() {
57
- a("update:visible", !1), a("close");
58
- }
59
- function W() {
60
- _.value = !0, a("confirm", (e) => {
61
- _.value = !1, e && r();
62
- });
63
- }
64
- return U(
65
- () => t.visible,
66
- (e) => {
67
- e && a("opened");
68
- }
69
- ), $(() => {
70
- t.visible && r();
71
- }), N({ closeWindow: r }), (e, i) => {
72
- const d = v("el-icon"), u = v("el-button"), B = v("el-tooltip"), E = v("el-scrollbar"), K = F("loading");
73
- return c(), x(Y, {
74
- name: "yc-page-window-fade",
75
- mode: "out-in"
76
- }, {
77
- default: o(() => [
78
- C(w("div", {
79
- class: "yc-page-window",
80
- style: T({ zIndex: l.zIndex })
81
- }, [
82
- w("div", ee, [
83
- w("div", te, [
84
- n(d, {
85
- class: "yc-page-window__back",
86
- onClick: r
87
- }, {
88
- default: o(() => [
89
- n(s(G))
90
- ]),
91
- _: 1
92
- }),
93
- w("span", null, p(l.title) + p(I.value), 1),
94
- V.value ? (c(), m("div", ne, [
95
- n(B, {
96
- content: "上一条",
97
- placement: "top"
98
- }, {
99
- default: o(() => [
100
- n(u, {
101
- round: "",
102
- text: "",
103
- disabled: k("prev"),
104
- onClick: H
105
- }, {
106
- default: o(() => [
107
- n(d, null, {
108
- default: o(() => [
109
- n(s(J))
110
- ]),
111
- _: 1
112
- })
113
- ]),
114
- _: 1
115
- }, 8, ["disabled"])
116
- ]),
117
- _: 1
118
- }),
119
- n(B, {
120
- content: "下一条",
121
- placement: "top"
122
- }, {
123
- default: o(() => [
124
- n(u, {
125
- round: "",
126
- text: "",
127
- disabled: k("next"),
128
- onClick: L
129
- }, {
130
- default: o(() => [
131
- n(d, null, {
132
- default: o(() => [
133
- n(s(O))
134
- ]),
135
- _: 1
136
- })
137
- ]),
138
- _: 1
139
- }, 8, ["disabled"])
140
- ]),
141
- _: 1
142
- })
143
- ])) : y("", !0),
144
- z.value ? (c(), x(u, {
145
- key: 1,
146
- text: "",
147
- class: "yc-page-window__type-switch",
148
- type: l.type === "detail" ? "primary" : "success",
149
- onClick: R
150
- }, {
151
- default: o(() => [
152
- n(d, { class: "m-r-4" }, {
153
- default: o(() => [
154
- n(s(Q))
155
- ]),
156
- _: 1
157
- }),
158
- b(" " + p(l.type === "detail" ? "切换编辑" : "切换详情"), 1)
159
- ]),
160
- _: 1
161
- }, 8, ["type"])) : y("", !0)
162
- ]),
163
- w("div", oe, [
164
- S(e.$slots, "opera", {}, void 0, !0),
165
- l.showButtons && A.value ? (c(), m(j, { key: 0 }, [
166
- n(u, {
167
- text: "",
168
- disabled: g.value,
169
- onClick: r
170
- }, {
171
- default: o(() => [
172
- n(d, { class: "m-r-4" }, {
173
- default: o(() => [
174
- n(s(X))
175
- ]),
176
- _: 1
177
- }),
178
- b(" " + p(l.cancelText), 1)
179
- ]),
180
- _: 1
181
- }, 8, ["disabled"]),
182
- l.showConfirm ? (c(), x(u, {
183
- key: 0,
184
- type: "primary",
185
- loading: g.value,
186
- disabled: l.disabled,
187
- onClick: W
188
- }, {
189
- default: o(() => [
190
- n(d, { class: "m-r-4" }, {
191
- default: o(() => [
192
- n(s(Z))
193
- ]),
194
- _: 1
195
- }),
196
- b(" " + p(l.confirmText), 1)
197
- ]),
198
- _: 1
199
- }, 8, ["loading", "disabled"])) : y("", !0)
200
- ], 64)) : y("", !0)
201
- ])
202
- ]),
203
- C((c(), m("div", le, [
204
- n(E, { class: "yc-page-window__scroll" }, {
205
- default: o(() => [
206
- l.visible ? (c(), m("div", {
207
- key: 0,
208
- class: "yc-page-window__body",
209
- style: T({ minHeight: l.contentMinHeight })
210
- }, [
211
- S(e.$slots, "default", {}, void 0, !0)
212
- ], 4)) : y("", !0)
213
- ]),
214
- _: 3
215
- })
216
- ])), [
217
- [K, g.value]
218
- ])
219
- ], 4), [
220
- [q, l.visible]
221
- ])
222
- ]),
223
- _: 3
224
- });
225
- };
226
- }
227
- });
228
- export {
229
- de as default
230
- };
@@ -1,5 +0,0 @@
1
- import { default as d, default as o } from "./YcPageWindow.vue.js";
2
- export {
3
- d as SkyPageWindow,
4
- o as YcPageWindow
5
- };
@@ -1 +0,0 @@
1
- .yc-page-window[data-v-b3e784c3]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;background:var(--el-bg-color);box-shadow:0 0 10px #00000014;border-radius:5px}.yc-page-window__header[data-v-b3e784c3]{height:60px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--el-border-color-lighter);padding:0 16px;flex-shrink:0}.yc-page-window__title[data-v-b3e784c3]{font-size:18px;font-weight:700;display:flex;align-items:center;gap:4px;min-width:0}.yc-page-window__back[data-v-b3e784c3]{cursor:pointer;margin-right:12px;font-size:20px;flex-shrink:0}.yc-page-window__back[data-v-b3e784c3]:hover{color:var(--el-color-primary)}.yc-page-window__nav[data-v-b3e784c3]{margin-left:16px;display:flex;align-items:center;gap:4px}.yc-page-window__type-switch[data-v-b3e784c3]{margin-left:16px}.yc-page-window__opera[data-v-b3e784c3]{display:flex;align-items:center;gap:8px;flex-shrink:0}.yc-page-window__content[data-v-b3e784c3]{flex:1;overflow:hidden}.yc-page-window__scroll[data-v-b3e784c3]{height:100%}.yc-page-window__body[data-v-b3e784c3]{padding:16px;box-sizing:border-box}.m-r-4[data-v-b3e784c3]{margin-right:4px}.yc-page-window-fade-enter-active[data-v-b3e784c3],.yc-page-window-fade-leave-active[data-v-b3e784c3]{transition:all .2s ease}.yc-page-window-fade-enter-from[data-v-b3e784c3]{opacity:0;transform:translate(12px)}.yc-page-window-fade-leave-to[data-v-b3e784c3]{opacity:0;transform:translate(-12px)}
package/dist/plugin.js DELETED
@@ -1,19 +0,0 @@
1
- import { setAiTaskConfig as r } from "./ai-task/config.js";
2
- import { resetHttpClient as t } from "./ai-task/api/http.js";
3
- import n from "./page-window/YcPageWindow.vue.js";
4
- function m(e) {
5
- e != null && e.aiTask && (r(e.aiTask), t());
6
- }
7
- function f(e, a) {
8
- (a == null ? void 0 : a.registerPageWindow) !== !1 && (e.component("YcPageWindow", n), e.component("SkyPageWindow", n));
9
- }
10
- const g = {
11
- install(e, a) {
12
- m(a), f(e, a);
13
- }
14
- };
15
- export {
16
- g as YcComponent,
17
- g as default,
18
- m as installYcComponent
19
- };