geekin-devtoys 0.2.5 → 0.2.8

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../index-B86xv9Xx.js"),z=require("../_plugin-vue_export-helper-BHFhmbuH.js"),f={small:"480px",medium:"580px",large:"680px"},S={class:"g-dialog-header"},y={class:"g-dialog-operation-container"},b=e.defineComponent({name:"GDialog",inheritAttrs:!1,__name:"index",props:{title:{default:""},size:{default:""}},emits:["cancel","reset","save","minimize"],setup(a,{emit:p}){const n=a,s=p,_=e.computed(()=>n.size&&n.size in f?f[n.size]:n.size);function v(){s("cancel")}function C(){s("reset")}function g(){s("save")}const c=e.ref(!1),x=()=>{c.value=!c.value},d=e.ref(!1),u=e.ref(!0),V=()=>{u.value=!1,d.value=!0},N=()=>{u.value=!0,d.value=!1},h=e.computed(()=>({position:"fixed",bottom:"20px",right:"20px",width:"50px",height:"50px","z-index":"1000"}));return e.onMounted(()=>{}),e.onUnmounted(()=>{}),(l,t)=>{const i=e.resolveComponent("el-icon"),m=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[u.value?(e.openBlock(),e.createBlock(k,e.mergeProps({key:0},l.$attrs,{width:_.value,"lock-scroll":!1,"show-close":!1,fullscreen:c.value}),{header:e.withCtx(({close:w})=>[e.createElementVNode("div",S,[e.createElementVNode("p",null,e.toDisplayString(l.title),1),e.createElementVNode("div",y,[e.createVNode(i,{onClick:V,class:"g-icon--minimize"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.minus_default))]),_:1}),e.createVNode(i,{onClick:x,class:"g-icon--fullScreen"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.full_screen_default))]),_:1}),e.createVNode(i,{onClick:w,class:"g-icon--close"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.close_default))]),_:2},1032,["onClick"])])])]),footer:e.withCtx(()=>[e.createVNode(m,{onClick:v},{default:e.withCtx(()=>t[0]||(t[0]=[e.createTextVNode(" 取消 ")])),_:1,__:[0]}),e.createVNode(m,{onClick:C},{default:e.withCtx(()=>t[1]||(t[1]=[e.createTextVNode(" 重置 ")])),_:1,__:[1]}),e.createVNode(m,{type:"primary",onClick:g},{default:e.withCtx(()=>t[2]||(t[2]=[e.createTextVNode(" 保存 ")])),_:1,__:[2]}),e.renderSlot(l.$slots,"moreOperations",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["width","fullscreen"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"g-dialog-minimized-icon",onClick:N,style:e.normalizeStyle(h.value)},[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.chat_dot_round_default))]),_:1})],4)):e.createCommentVNode("",!0)])}}}),o=z._export_sfc(b,[["__scopeId","data-v-4d2e56a0"]]);o.install=a=>{a.component(o.name,o)};exports.GDialog=o;exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("../index-CC5ivGYd.js"),k=require("../_plugin-vue_export-helper-BHFhmbuH.js"),h=Symbol("GDialogManager"),V={small:"380px",medium:"480px",large:"580px"},z={ICON_WIDTH:92,ICON_HEIGHT:34,GAP:8,BOTTOM_OFFSET:18,RIGHT_OFFSET:18,MAX_PER_ROW:8};function B(l){const d=new Map,{ICON_WIDTH:a,ICON_HEIGHT:s,GAP:m,BOTTOM_OFFSET:g,RIGHT_OFFSET:n,MAX_PER_ROW:t}=z;return l.forEach((r,u)=>{const i=Math.floor(u/t),o=u%t;d.set(r,{right:n+o*(a+m),bottom:g+i*(s+m)})}),d}function $(){const l=e.reactive(new Map),d=e.computed(()=>{const i=[];return l.forEach(o=>{o.isMinimized&&i.push(o.id)}),i}),a=e.computed(()=>B(d.value));function s(i){l.set(i.id,{attentionTick:0,...i})}function m(i){l.delete(i)}function g(i){const o=l.get(i);if(o){if(o.isMinimized){o.attentionTick=(o.attentionTick??0)+1;return}o.isMinimized=!0}}function n(i){const o=l.get(i);o?.isMinimized&&(o.attentionTick=(o.attentionTick??0)+1)}function t(i){const o=l.get(i);o&&(o.isMinimized=!1)}function r(i){return e.computed(()=>a.value.get(i)??{right:z.RIGHT_OFFSET,bottom:z.BOTTOM_OFFSET})}const u=e.computed(()=>d.value.map(i=>l.get(i)).filter(Boolean));return{dialogs:l,register:s,unregister:m,minimize:g,remindMinimized:n,restore:t,getPosition:r,minimizedList:u}}function E(){return e.inject(h,null)}const H=["title","aria-label"],P={class:"g-dialog-minimized-icon__icon","aria-hidden":"true"},R={class:"g-dialog-minimized-icon__title"},L=e.defineComponent({name:"GDialogMinimizedIcon",__name:"GDialogMinimizedIcon",props:{title:{},position:{},attentionTick:{default:0}},emits:["restore"],setup(l,{emit:d}){const a=l,s=d,m=e.computed(()=>a.title||"弹窗"),g=e.computed(()=>`恢复 ${m.value}`),n=e.computed(()=>({position:"fixed",right:`${a.position.right}px`,bottom:`${a.position.bottom}px`})),t=e.ref(!1);let r;e.watch(()=>a.attentionTick,(i,o)=>{o===void 0||i===o||(t.value=!1,window.clearTimeout(r),window.requestAnimationFrame(()=>{t.value=!0,r=window.setTimeout(()=>{t.value=!1},580)}))}),e.onUnmounted(()=>{window.clearTimeout(r)});function u(){s("restore")}return(i,o)=>{const v=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",{class:e.normalizeClass(["g-dialog-minimized-icon",{"is-attention":t.value}]),type:"button",style:e.normalizeStyle(n.value),title:g.value,"aria-label":g.value,onClick:u},[o[0]||(o[0]=e.createElementVNode("span",{class:"g-dialog-minimized-icon__glow","aria-hidden":"true"},null,-1)),o[1]||(o[1]=e.createElementVNode("span",{class:"g-dialog-minimized-icon__wave","aria-hidden":"true"},null,-1)),e.createElementVNode("span",P,[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.chat_dot_round_default))]),_:1})]),e.createElementVNode("span",R,e.toDisplayString(m.value),1)],14,H)])}}}),_=k._export_sfc(L,[["__scopeId","data-v-5195816e"]]),q={class:"g-dialog-header"},U={class:"g-dialog-title"},W={class:"g-dialog-operation-container","aria-label":"弹窗操作"},Y=["onClick"],j=e.defineComponent({name:"GDialog",inheritAttrs:!1,__name:"index",props:{title:{default:""},size:{default:"medium"},modelValue:{type:Boolean}},emits:["cancel","reset","save","minimize","update:modelValue"],setup(l,{emit:d}){const a=l,s=d,m=e.computed(()=>a.modelValue);function g(c){s("update:modelValue",c)}const n=e.useId?e.useId():`g-dialog-${Date.now()}-${Math.random().toString(36).slice(2)}`,t=E(),r=e.ref(!1),u=e.ref(!0),i=e.ref(0),o=e.ref(!1),v=e.computed(()=>t?t.dialogs.get(n)?.isMinimized??!1:r.value),I=e.computed(()=>t?t.dialogs.get(n)?.attentionTick??0:i.value),C=e.computed(()=>t?!(t.dialogs.get(n)?.isMinimized??!1):u.value),N=e.computed(()=>t?t.getPosition(n).value:{right:20,bottom:20});e.onMounted(()=>{t?.register({id:n,title:a.title,isMinimized:!1})}),e.onUnmounted(()=>{t?.unregister(n)}),e.watch(()=>a.title,c=>{if(t){const f=t.dialogs.get(n);f&&(f.title=c)}}),e.watch(()=>a.modelValue,c=>{if(c===!1){if(o.value){o.value=!1;return}t?t.restore(n):(u.value=!0,r.value=!1)}c===!0&&(t?.dialogs.get(n)?.isMinimized?t.remindMinimized(n):r.value&&(i.value+=1))});const w=e.computed(()=>a.size in V?V[a.size]:a.size);function O(){s("cancel")}function b(){s("reset")}function D(){s("save")}const T=e.ref(!1),S=()=>{T.value=!T.value},G=()=>{if(o.value=!0,t)t.minimize(n);else{if(r.value){i.value+=1,s("minimize",{id:n});return}u.value=!1,r.value=!0}s("update:modelValue",!1),s("minimize",{id:n})},y=()=>{t?t.restore(n):(u.value=!0,r.value=!1),s("update:modelValue",!0)};return(c,f)=>{const M=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[C.value?(e.openBlock(),e.createBlock(x,e.mergeProps({key:0},c.$attrs,{"model-value":m.value,width:w.value,"lock-scroll":!1,"show-close":!1,fullscreen:T.value,"onUpdate:modelValue":g}),{header:e.withCtx(({close:A})=>[e.createElementVNode("div",q,[e.createElementVNode("p",U,e.toDisplayString(c.title),1),e.createElementVNode("div",W,[e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--full-screen","aria-label":"最大化",onClick:G}),e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--minimize","aria-label":"最小化",onClick:S}),e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--close","aria-label":"关闭",onClick:A},null,8,Y)])])]),footer:e.withCtx(()=>[e.createVNode(M,{onClick:O},{default:e.withCtx(()=>f[0]||(f[0]=[e.createTextVNode(" 取消 ")])),_:1,__:[0]}),e.createVNode(M,{onClick:b},{default:e.withCtx(()=>f[1]||(f[1]=[e.createTextVNode(" 重置 ")])),_:1,__:[1]}),e.createVNode(M,{type:"primary",onClick:D},{default:e.withCtx(()=>f[2]||(f[2]=[e.createTextVNode(" 保存 ")])),_:1,__:[2]}),e.renderSlot(c.$slots,"moreOperations",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","width","fullscreen"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createBlock(_,{key:1,title:c.title,position:N.value,"attention-tick":I.value,onRestore:y},null,8,["title","position","attention-tick"])):e.createCommentVNode("",!0)])}}}),p=k._export_sfc(j,[["__scopeId","data-v-61ac1da5"]]);p.install=l=>{l.component(p.name,p),l.component(_.name,_)};exports.DIALOG_MANAGER_KEY=h;exports.GDialog=p;exports.GDialogMinimizedIcon=_;exports.createDialogManager=$;exports.default=p;exports.useDialogManager=E;
@@ -1,142 +1,306 @@
1
- import { defineComponent as $, computed as z, ref as f, onMounted as A, onUnmounted as M, resolveComponent as p, createBlock as C, openBlock as _, Teleport as T, createCommentVNode as x, createElementBlock as F, mergeProps as L, withCtx as t, renderSlot as h, createVNode as e, createTextVNode as v, createElementVNode as g, toDisplayString as P, unref as s, normalizeStyle as U } from "vue";
2
- import { m as Z, f as j, c as q, a as H } from "../index-DSzb017c.mjs";
3
- import { _ as J } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const y = {
5
- small: "480px",
6
- medium: "580px",
7
- large: "680px"
8
- }, K = { class: "g-dialog-header" }, Q = { class: "g-dialog-operation-container" }, R = /* @__PURE__ */ $({
1
+ import { inject as K, reactive as J, computed as r, defineComponent as V, ref as v, watch as w, onUnmounted as A, resolveComponent as C, createBlock as T, openBlock as M, Teleport as $, createElementVNode as d, normalizeStyle as Q, normalizeClass as ee, createVNode as z, withCtx as p, unref as te, toDisplayString as N, useId as S, onMounted as ie, createCommentVNode as G, mergeProps as oe, renderSlot as D, createTextVNode as b } from "vue";
2
+ import { c as ne } from "../index-BVvzBt8u.mjs";
3
+ import { _ as H } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ const le = /* @__PURE__ */ Symbol("GDialogManager"), F = {
5
+ small: "380px",
6
+ medium: "480px",
7
+ large: "580px"
8
+ }, y = {
9
+ ICON_WIDTH: 92,
10
+ ICON_HEIGHT: 34,
11
+ GAP: 8,
12
+ BOTTOM_OFFSET: 18,
13
+ RIGHT_OFFSET: 18,
14
+ MAX_PER_ROW: 8
15
+ };
16
+ function ae(n) {
17
+ const m = /* @__PURE__ */ new Map(), { ICON_WIDTH: l, ICON_HEIGHT: a, GAP: f, BOTTOM_OFFSET: _, RIGHT_OFFSET: o, MAX_PER_ROW: e } = y;
18
+ return n.forEach((s, c) => {
19
+ const i = Math.floor(c / e), t = c % e;
20
+ m.set(s, {
21
+ right: o + t * (l + f),
22
+ bottom: _ + i * (a + f)
23
+ });
24
+ }), m;
25
+ }
26
+ function Me() {
27
+ const n = J(/* @__PURE__ */ new Map()), m = r(() => {
28
+ const i = [];
29
+ return n.forEach((t) => {
30
+ t.isMinimized && i.push(t.id);
31
+ }), i;
32
+ }), l = r(() => ae(m.value));
33
+ function a(i) {
34
+ n.set(i.id, { attentionTick: 0, ...i });
35
+ }
36
+ function f(i) {
37
+ n.delete(i);
38
+ }
39
+ function _(i) {
40
+ const t = n.get(i);
41
+ if (t) {
42
+ if (t.isMinimized) {
43
+ t.attentionTick = (t.attentionTick ?? 0) + 1;
44
+ return;
45
+ }
46
+ t.isMinimized = !0;
47
+ }
48
+ }
49
+ function o(i) {
50
+ const t = n.get(i);
51
+ t?.isMinimized && (t.attentionTick = (t.attentionTick ?? 0) + 1);
52
+ }
53
+ function e(i) {
54
+ const t = n.get(i);
55
+ t && (t.isMinimized = !1);
56
+ }
57
+ function s(i) {
58
+ return r(
59
+ () => l.value.get(i) ?? {
60
+ right: y.RIGHT_OFFSET,
61
+ bottom: y.BOTTOM_OFFSET
62
+ }
63
+ );
64
+ }
65
+ const c = r(() => m.value.map((i) => n.get(i)).filter(Boolean));
66
+ return {
67
+ dialogs: n,
68
+ register: a,
69
+ unregister: f,
70
+ minimize: _,
71
+ remindMinimized: o,
72
+ restore: e,
73
+ getPosition: s,
74
+ minimizedList: c
75
+ };
76
+ }
77
+ function se() {
78
+ return K(le, null);
79
+ }
80
+ const re = ["title", "aria-label"], ue = {
81
+ class: "g-dialog-minimized-icon__icon",
82
+ "aria-hidden": "true"
83
+ }, ce = { class: "g-dialog-minimized-icon__title" }, de = /* @__PURE__ */ V({
84
+ name: "GDialogMinimizedIcon",
85
+ __name: "GDialogMinimizedIcon",
86
+ props: {
87
+ title: {},
88
+ position: {},
89
+ attentionTick: { default: 0 }
90
+ },
91
+ emits: ["restore"],
92
+ setup(n, { emit: m }) {
93
+ const l = n, a = m, f = r(() => l.title || "弹窗"), _ = r(() => `恢复 ${f.value}`), o = r(() => ({
94
+ position: "fixed",
95
+ right: `${l.position.right}px`,
96
+ bottom: `${l.position.bottom}px`
97
+ })), e = v(!1);
98
+ let s;
99
+ w(() => l.attentionTick, (i, t) => {
100
+ t === void 0 || i === t || (e.value = !1, window.clearTimeout(s), window.requestAnimationFrame(() => {
101
+ e.value = !0, s = window.setTimeout(() => {
102
+ e.value = !1;
103
+ }, 580);
104
+ }));
105
+ }), A(() => {
106
+ window.clearTimeout(s);
107
+ });
108
+ function c() {
109
+ a("restore");
110
+ }
111
+ return (i, t) => {
112
+ const I = C("el-icon");
113
+ return M(), T($, { to: "body" }, [
114
+ d("div", {
115
+ class: ee(["g-dialog-minimized-icon", { "is-attention": e.value }]),
116
+ type: "button",
117
+ style: Q(o.value),
118
+ title: _.value,
119
+ "aria-label": _.value,
120
+ onClick: c
121
+ }, [
122
+ t[0] || (t[0] = d("span", {
123
+ class: "g-dialog-minimized-icon__glow",
124
+ "aria-hidden": "true"
125
+ }, null, -1)),
126
+ t[1] || (t[1] = d("span", {
127
+ class: "g-dialog-minimized-icon__wave",
128
+ "aria-hidden": "true"
129
+ }, null, -1)),
130
+ d("span", ue, [
131
+ z(I, null, {
132
+ default: p(() => [
133
+ z(te(ne))
134
+ ]),
135
+ _: 1
136
+ })
137
+ ]),
138
+ d("span", ce, N(f.value), 1)
139
+ ], 14, re)
140
+ ]);
141
+ };
142
+ }
143
+ }), E = /* @__PURE__ */ H(de, [["__scopeId", "data-v-5195816e"]]), me = { class: "g-dialog-header" }, fe = { class: "g-dialog-title" }, ge = {
144
+ class: "g-dialog-operation-container",
145
+ "aria-label": "弹窗操作"
146
+ }, _e = ["onClick"], pe = /* @__PURE__ */ V({
9
147
  name: "GDialog",
10
148
  inheritAttrs: !1,
11
149
  __name: "index",
12
150
  props: {
13
151
  title: { default: "" },
14
- size: { default: "" }
152
+ size: { default: "medium" },
153
+ modelValue: { type: Boolean }
15
154
  },
16
- emits: ["cancel", "reset", "save", "minimize"],
17
- setup(a, { emit: S }) {
18
- const l = a, r = S, w = z(() => l.size && l.size in y ? y[l.size] : l.size);
19
- function b() {
20
- r("cancel");
155
+ emits: ["cancel", "reset", "save", "minimize", "update:modelValue"],
156
+ setup(n, { emit: m }) {
157
+ const l = n, a = m, f = r(() => l.modelValue);
158
+ function _(u) {
159
+ a("update:modelValue", u);
21
160
  }
22
- function D() {
23
- r("reset");
161
+ const o = S ? S() : `g-dialog-${Date.now()}-${Math.random().toString(36).slice(2)}`, e = se(), s = v(!1), c = v(!0), i = v(0), t = v(!1), I = r(() => e ? e.dialogs.get(o)?.isMinimized ?? !1 : s.value), P = r(() => e ? e.dialogs.get(o)?.attentionTick ?? 0 : i.value), R = r(() => e ? !(e.dialogs.get(o)?.isMinimized ?? !1) : c.value), x = r(() => e ? e.getPosition(o).value : { right: 20, bottom: 20 });
162
+ ie(() => {
163
+ e?.register({
164
+ id: o,
165
+ title: l.title,
166
+ isMinimized: !1
167
+ });
168
+ }), A(() => {
169
+ e?.unregister(o);
170
+ }), w(
171
+ () => l.title,
172
+ (u) => {
173
+ if (e) {
174
+ const g = e.dialogs.get(o);
175
+ g && (g.title = u);
176
+ }
177
+ }
178
+ ), w(
179
+ () => l.modelValue,
180
+ (u) => {
181
+ if (u === !1) {
182
+ if (t.value) {
183
+ t.value = !1;
184
+ return;
185
+ }
186
+ e ? e.restore(o) : (c.value = !0, s.value = !1);
187
+ }
188
+ u === !0 && (e?.dialogs.get(o)?.isMinimized ? e.remindMinimized(o) : s.value && (i.value += 1));
189
+ }
190
+ );
191
+ const B = r(() => l.size in F ? F[l.size] : l.size);
192
+ function L() {
193
+ a("cancel");
24
194
  }
25
- function I() {
26
- r("save");
195
+ function W() {
196
+ a("reset");
27
197
  }
28
- const c = f(!1), N = () => {
29
- c.value = !c.value;
30
- }, u = f(!1), d = f(!0), V = () => {
31
- d.value = !1, u.value = !0;
32
- }, B = () => {
33
- d.value = !0, u.value = !1;
34
- }, E = z(() => ({
35
- position: "fixed",
36
- bottom: "20px",
37
- right: "20px",
38
- width: "50px",
39
- height: "50px",
40
- "z-index": "1000"
41
- }));
42
- return A(() => {
43
- }), M(() => {
44
- }), (n, o) => {
45
- const i = p("el-icon"), m = p("el-button"), G = p("el-dialog");
46
- return _(), C(T, { to: "body" }, [
47
- d.value ? (_(), C(G, L({ key: 0 }, n.$attrs, {
48
- width: w.value,
198
+ function U() {
199
+ a("save");
200
+ }
201
+ const k = v(!1), X = () => {
202
+ k.value = !k.value;
203
+ }, Y = () => {
204
+ if (t.value = !0, e)
205
+ e.minimize(o);
206
+ else {
207
+ if (s.value) {
208
+ i.value += 1, a("minimize", { id: o });
209
+ return;
210
+ }
211
+ c.value = !1, s.value = !0;
212
+ }
213
+ a("update:modelValue", !1), a("minimize", { id: o });
214
+ }, Z = () => {
215
+ e ? e.restore(o) : (c.value = !0, s.value = !1), a("update:modelValue", !0);
216
+ };
217
+ return (u, g) => {
218
+ const O = C("el-button"), j = C("el-dialog");
219
+ return M(), T($, { to: "body" }, [
220
+ R.value ? (M(), T(j, oe({ key: 0 }, u.$attrs, {
221
+ "model-value": f.value,
222
+ width: B.value,
49
223
  "lock-scroll": !1,
50
224
  "show-close": !1,
51
- fullscreen: c.value
225
+ fullscreen: k.value,
226
+ "onUpdate:modelValue": _
52
227
  }), {
53
- header: t(({ close: O }) => [
54
- g("div", K, [
55
- g("p", null, P(n.title), 1),
56
- g("div", Q, [
57
- e(i, {
58
- onClick: V,
59
- class: "g-icon--minimize"
60
- }, {
61
- default: t(() => [
62
- e(s(Z))
63
- ]),
64
- _: 1
228
+ header: p(({ close: q }) => [
229
+ d("div", me, [
230
+ d("p", fe, N(u.title), 1),
231
+ d("div", ge, [
232
+ d("button", {
233
+ type: "button",
234
+ class: "g-dialog-control g-dialog-control--full-screen",
235
+ "aria-label": "最大化",
236
+ onClick: Y
65
237
  }),
66
- e(i, {
67
- onClick: N,
68
- class: "g-icon--fullScreen"
69
- }, {
70
- default: t(() => [
71
- e(s(j))
72
- ]),
73
- _: 1
238
+ d("button", {
239
+ type: "button",
240
+ class: "g-dialog-control g-dialog-control--minimize",
241
+ "aria-label": "最小化",
242
+ onClick: X
74
243
  }),
75
- e(i, {
76
- onClick: O,
77
- class: "g-icon--close"
78
- }, {
79
- default: t(() => [
80
- e(s(q))
81
- ]),
82
- _: 2
83
- }, 1032, ["onClick"])
244
+ d("button", {
245
+ type: "button",
246
+ class: "g-dialog-control g-dialog-control--close",
247
+ "aria-label": "关闭",
248
+ onClick: q
249
+ }, null, 8, _e)
84
250
  ])
85
251
  ])
86
252
  ]),
87
- footer: t(() => [
88
- e(m, { onClick: b }, {
89
- default: t(() => o[0] || (o[0] = [
90
- v(" 取消 ")
253
+ footer: p(() => [
254
+ z(O, { onClick: L }, {
255
+ default: p(() => g[0] || (g[0] = [
256
+ b(" 取消 ")
91
257
  ])),
92
258
  _: 1,
93
259
  __: [0]
94
260
  }),
95
- e(m, { onClick: D }, {
96
- default: t(() => o[1] || (o[1] = [
97
- v(" 重置 ")
261
+ z(O, { onClick: W }, {
262
+ default: p(() => g[1] || (g[1] = [
263
+ b(" 重置 ")
98
264
  ])),
99
265
  _: 1,
100
266
  __: [1]
101
267
  }),
102
- e(m, {
268
+ z(O, {
103
269
  type: "primary",
104
- onClick: I
270
+ onClick: U
105
271
  }, {
106
- default: t(() => o[2] || (o[2] = [
107
- v(" 保存 ")
272
+ default: p(() => g[2] || (g[2] = [
273
+ b(" 保存 ")
108
274
  ])),
109
275
  _: 1,
110
276
  __: [2]
111
277
  }),
112
- h(n.$slots, "moreOperations", {}, void 0, !0)
278
+ D(u.$slots, "moreOperations", {}, void 0, !0)
113
279
  ]),
114
- default: t(() => [
115
- h(n.$slots, "default", {}, void 0, !0)
280
+ default: p(() => [
281
+ D(u.$slots, "default", {}, void 0, !0)
116
282
  ]),
117
283
  _: 3
118
- }, 16, ["width", "fullscreen"])) : x("", !0),
119
- u.value ? (_(), F("div", {
284
+ }, 16, ["model-value", "width", "fullscreen"])) : G("", !0),
285
+ I.value ? (M(), T(E, {
120
286
  key: 1,
121
- class: "g-dialog-minimized-icon",
122
- onClick: B,
123
- style: U(E.value)
124
- }, [
125
- e(i, null, {
126
- default: t(() => [
127
- e(s(H))
128
- ]),
129
- _: 1
130
- })
131
- ], 4)) : x("", !0)
287
+ title: u.title,
288
+ position: x.value,
289
+ "attention-tick": P.value,
290
+ onRestore: Z
291
+ }, null, 8, ["title", "position", "attention-tick"])) : G("", !0)
132
292
  ]);
133
293
  };
134
294
  }
135
- }), k = /* @__PURE__ */ J(R, [["__scopeId", "data-v-4d2e56a0"]]);
136
- k.install = (a) => {
137
- a.component(k.name, k);
295
+ }), h = /* @__PURE__ */ H(pe, [["__scopeId", "data-v-61ac1da5"]]);
296
+ h.install = (n) => {
297
+ n.component(h.name, h), n.component(E.name, E);
138
298
  };
139
299
  export {
140
- k as GDialog,
141
- k as default
300
+ le as DIALOG_MANAGER_KEY,
301
+ h as GDialog,
302
+ E as GDialogMinimizedIcon,
303
+ Me as createDialogManager,
304
+ h as default,
305
+ se as useDialogManager
142
306
  };
@@ -1 +1 @@
1
- @charset "UTF-8";.g-dialog-header[data-v-4d2e56a0]{display:flex;flex-direction:row;justify-content:space-between;gap:16px}.g-dialog-header>p[data-v-4d2e56a0]{margin-top:-8px}.g-dialog-header .g-dialog-operation-container[data-v-4d2e56a0]{display:flex;flex-direction:row;justify-content:space-between;gap:8px;font-size:12px}.g-dialog-header .g-dialog-operation-container .g-icon--close[data-v-4d2e56a0],.g-dialog-header .g-dialog-operation-container .g-icon--fullScreen[data-v-4d2e56a0],.g-dialog-header .g-dialog-operation-container .g-icon--minimize[data-v-4d2e56a0]{cursor:pointer}.g-dialog-header .g-dialog-operation-container .g-icon--close[data-v-4d2e56a0]:hover,.g-dialog-header .g-dialog-operation-container .g-icon--fullScreen[data-v-4d2e56a0]:hover,.g-dialog-header .g-dialog-operation-container .g-icon--minimize[data-v-4d2e56a0]:hover{color:var(--el-color-primary);transition:all .3s ease}.g-dialog-minimized-icon[data-v-4d2e56a0]{position:fixed;bottom:20px;width:50px;height:50px;border-radius:50%;background-color:var(--el-color-primary);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1000;box-shadow:0 2px 12px #0000001a;transition:all .5s ease}.g-dialog-minimized-icon[data-v-4d2e56a0]:hover{animation:bounce-4d2e56a0 .6s ease-in-out 2;box-shadow:0 4px 16px #0003}@keyframes bounce-4d2e56a0{0%,to{transform:translateY(0)}50%{transform:translateY(-7px)}}.g-dialog-minimized-icon .el-icon[data-v-4d2e56a0]{font-size:24px}
1
+ .g-dialog-minimized-icon[data-v-5195816e]{width:78px;height:34px;padding:0 6px;border-radius:10px 18px;background:linear-gradient(90deg,rgba(106,210,255,.18) 1px,transparent 1px) 0 0/8px 8px,linear-gradient(180deg,rgba(255,255,255,.16),transparent 42%),linear-gradient(135deg,#10294c,var(--el-color-primary) 58%,#00d1ff);color:#f4fbff;display:flex;align-items:center;justify-content:flex-start;gap:6px;cursor:pointer;z-index:999;overflow:hidden;isolation:isolate;clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px);transition:right .3s ease,bottom .3s ease,transform .18s ease,box-shadow .18s ease,filter .18s ease;animation:g-dialog-minimized-enter-5195816e .28s cubic-bezier(.2,.8,.2,1) both}.g-dialog-minimized-icon[data-v-5195816e]:before{content:"";position:absolute;inset:3px;border:1px solid rgba(163,232,255,.24);clip-path:inherit;pointer-events:none}.g-dialog-minimized-icon[data-v-5195816e]:after{content:"";position:absolute;top:-32%;left:-38%;width:32px;height:62px;background:linear-gradient(90deg,transparent,rgba(180,244,255,.64),transparent);transform:rotate(18deg) translate(-16px);opacity:0;pointer-events:none}.g-dialog-minimized-icon[data-v-5195816e]:hover{transform:translateY(-2px);filter:saturate(1.2) brightness(1.08)}.g-dialog-minimized-icon[data-v-5195816e]:hover:after{opacity:1;animation:g-dialog-minimized-shine-5195816e .62s ease}.g-dialog-minimized-icon:hover .g-dialog-minimized-icon__wave[data-v-5195816e]{opacity:1;animation:g-dialog-minimized-wave-5195816e 1.45s ease-in-out infinite}.g-dialog-minimized-icon:hover .g-dialog-minimized-icon__icon[data-v-5195816e]{transform:scale(1.08)}.g-dialog-minimized-icon[data-v-5195816e]:active{transform:translateY(0) scale(.98);box-shadow:0 0 0 1px #ffffff14 inset,0 5px 14px #0092ff3d,0 2px 6px #0003}.g-dialog-minimized-icon[data-v-5195816e]:focus-visible{outline:2px solid rgba(0,209,255,.72);outline-offset:3px}.g-dialog-minimized-icon.is-attention[data-v-5195816e]{animation:g-dialog-minimized-attention-5195816e .58s ease both;filter:saturate(1.22) brightness(1.08)}.g-dialog-minimized-icon.is-attention[data-v-5195816e]:after{opacity:1;animation:g-dialog-minimized-shine-5195816e .58s ease}.g-dialog-minimized-icon.is-attention .g-dialog-minimized-icon__wave[data-v-5195816e]{opacity:1;animation:g-dialog-minimized-wave-5195816e .58s ease-in-out}.g-dialog-minimized-icon.is-attention .g-dialog-minimized-icon__icon[data-v-5195816e]{animation:g-dialog-minimized-icon-pop-5195816e .58s ease both}.g-dialog-minimized-icon__glow[data-v-5195816e]{position:absolute;inset:auto 8px -14px auto;width:38px;height:28px;border-radius:50%;background:#00d1ff7a;filter:blur(13px);pointer-events:none;z-index:-1}.g-dialog-minimized-icon__wave[data-v-5195816e]{position:absolute;inset:-18px -24px;background:radial-gradient(ellipse at 22% 62%,rgba(173,243,255,.62) 0 9%,transparent 26%),radial-gradient(ellipse at 52% 78%,rgba(0,209,255,.58) 0 12%,transparent 30%),radial-gradient(ellipse at 82% 58%,rgba(67,170,255,.5) 0 10%,transparent 28%),linear-gradient(90deg,#147bff14,#00d1ff5c,#147bff14);background-size:72px 46px,86px 42px,70px 48px,100% 100%;background-position:-10px 16px,18px 20px,58px 14px,0 0;filter:blur(1px) saturate(1.25);opacity:0;pointer-events:none;transform:translate(-18px) translateY(6px) rotate(-2deg);transition:opacity .18s ease;z-index:-1}.g-dialog-minimized-icon__icon[data-v-5195816e]{width:20px;height:20px;border:1px solid rgba(203,246,255,.32);border-radius:7px;background:linear-gradient(135deg,rgba(255,255,255,.2),transparent),#00132b2e;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:inset 0 0 10px #00d1ff3d;transition:transform .18s ease}.g-dialog-minimized-icon__icon .el-icon[data-v-5195816e]{font-size:13px}.g-dialog-minimized-icon__title[data-v-5195816e]{min-width:0;max-width:50px;font-size:10px;font-weight:600;line-height:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes g-dialog-minimized-enter-5195816e{0%{transform:translateY(8px) scale(.92);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes g-dialog-minimized-shine-5195816e{0%{transform:rotate(18deg) translate(-16px)}to{transform:rotate(18deg) translate(116px)}}@keyframes g-dialog-minimized-wave-5195816e{0%{background-position:-18px 18px,8px 22px,54px 14px,0 0;transform:translate(-14px) translateY(7px) rotate(-3deg) scaleY(.82)}45%{background-position:18px 8px,42px 18px,88px 10px,0 0;transform:translate(0) translateY(0) rotate(1deg) scaleY(1.05)}to{background-position:58px 17px,82px 22px,126px 15px,0 0;transform:translate(14px) translateY(5px) rotate(3deg) scaleY(.9)}}@keyframes g-dialog-minimized-attention-5195816e{0%,to{transform:translateY(0) scale(1)}18%{transform:translateY(-5px) scale(1.04)}36%{transform:translateY(0) scale(.98)}54%{transform:translateY(-3px) scale(1.02)}72%{transform:translateY(0) scale(1)}}@keyframes g-dialog-minimized-icon-pop-5195816e{0%,to{transform:scale(1)}30%{transform:scale(1.18) rotate(-8deg)}60%{transform:scale(1.08) rotate(6deg)}}@media(prefers-reduced-motion:reduce){.g-dialog-minimized-icon[data-v-5195816e]{animation:none;transition:right .3s ease,bottom .3s ease}.g-dialog-minimized-icon[data-v-5195816e]:after{display:none}.g-dialog-minimized-icon[data-v-5195816e]:hover,.g-dialog-minimized-icon[data-v-5195816e]:active,.g-dialog-minimized-icon.is-attention[data-v-5195816e]{transform:none;filter:none}.g-dialog-minimized-icon__wave[data-v-5195816e]{animation:none!important;opacity:0}.g-dialog-minimized-icon__icon[data-v-5195816e]{animation:none!important;transition:none}}.g-dialog-header[data-v-61ac1da5]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:16px}.g-dialog-header .g-dialog-title[data-v-61ac1da5]{position:relative;max-width:calc(100% - 88px);margin:-8px 0 0;overflow:hidden;color:#1f2937;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:.02em;text-overflow:ellipsis;white-space:nowrap}.g-dialog-header .g-dialog-operation-container[data-v-61ac1da5]{display:flex;flex-direction:row;align-items:center;gap:8px;padding:0;margin-top:-8px}.g-dialog-control[data-v-61ac1da5]{width:14px;height:14px;padding:0;border:0;border-radius:50%;cursor:pointer;flex-shrink:0;box-shadow:inset 0 1px 1px #ffffffa6,0 0 0 1px #00000014;transition:transform .16s ease,filter .16s ease}.g-dialog-control[data-v-61ac1da5]:hover{filter:brightness(1.04);transform:scale(1.06)}.g-dialog-control[data-v-61ac1da5]:active{transform:scale(.94)}.g-dialog-control[data-v-61ac1da5]:focus-visible{outline:2px solid rgba(68,68,68,.32);outline-offset:3px}.g-dialog-control--close[data-v-61ac1da5]{background:#ff5f57}.g-dialog-control--minimize[data-v-61ac1da5]{background:#ffbd2e}.g-dialog-control--full-screen[data-v-61ac1da5]{background:#28c840}@media(prefers-reduced-motion:reduce){.g-dialog-control[data-v-61ac1da5]{transition:none}}