web-win-vue 0.2.0

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/favicon.ico ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "web-win-vue",
3
+ "version": "0.2.0",
4
+ "description": "",
5
+ "main": "web-win-vue.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": ["Windows","UI","Vue","WebWin","Win","Vue3"],
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
@@ -0,0 +1 @@
1
+ button[data-v-85a8a3fa]{vertical-align:middle;line-height:16.67px;min-height:16.67px;padding:10px 20px;background:var(--primary-color, #CCCCCC);color:#000;border:none;cursor:default;font-size:16px;filter:blur(0px);transition:filter .3s ease;transform:scale(1);transition:transform .3s ease}button[data-v-85a8a3fa]:active{cursor:default;transition:opacity .3s ease;transform:scale(.97);filter:blur(.5px);outline:0px solid #999999;background:var(--primary-color, #999999)}button[data-v-85a8a3fa]:hover{cursor:default;outline:2.75px solid #999999;outline-offset:-2.75px}button[data-v-85a8a3fa]:disabled{transition:opacity 0s ease;transform:scale(1);filter:blur(0);outline:0px solid #7A7A7A;color:#919191;background:#ccc;cursor:not-allowed}.uwpinput{vertical-align:middle;display:inline-block;min-width:300px;outline:2.75px solid #999999;outline-offset:-2.75px;line-height:18px;height:18px;padding:10px 14px;background:var(--primary-color, rgb(255, 255, 255));color:#000;border:none;font-size:16px}.uwpinput:focus{outline:2.75px solid #0078D4;outline-offset:-2.75px}.uwpinput:disabled{background-color:#ccc;outline:2.75px solid #CCCCCC;cursor:not-allowed;color:#7a7a7a}@media (prefers-color-scheme: dark){.uwpinput{color:#919191;background:var(--primary-color, rgb(0, 0, 0))}}.side-bar[data-v-cbab5da9]{-webkit-user-select:none;user-select:none;list-style:none;margin:0;padding:0;width:var(--sb-width, 380px);font-size:var(--sb-fs, 14px)}.side-bar li[data-v-cbab5da9]{position:relative;display:flex;align-items:center;padding:var(--sb-pad, 10px 16px);transition:background .2s}.side-bar li[data-v-cbab5da9]:hover{background:var(--sb-hover-bg, #cecece)}.indicator[data-v-cbab5da9]{position:absolute;left:0;top:50%;margin-top:-12.5px;bottom:0;width:var(--sb-indicator-width, 3px);background:var(--sb-indicator-color, #006fd0);transform:scaleY(0);height:26px;line-height:100px;width:4px}.side-bar li.active .indicator[data-v-cbab5da9]{transform:scaleY(1)}.icon[data-v-cbab5da9]{width:var(--sb-icon-size, 20px);height:var(--sb-icon-size, 38px);margin-right:var(--sb-icon-mr, 12px);color:var(--sb-icon-color, #333);flex-shrink:0}.label[data-v-cbab5da9]{color:var(--sb-label-color, #333);white-space:nowrap;font-size:16px}@media (prefers-color-scheme: dark){.side-bar[data-v-cbab5da9]{-webkit-user-select:none;user-select:none;list-style:none;margin:0;padding:0;width:var(--sb-width, 380px);font-size:var(--sb-fs, 14px);background:var(--sb-hover-bg, #1b1b1b)}.side-bar li[data-v-cbab5da9]{position:relative;display:flex;align-items:center;padding:var(--sb-pad, 10px 16px);transition:background .2s}.side-bar li[data-v-cbab5da9]:hover{background:var(--sb-hover-bg, #252525)}.indicator[data-v-cbab5da9]{position:absolute;left:0;top:50%;margin-top:-12.5px;bottom:0;width:var(--sb-indicator-width, 3px);background:var(--sb-indicator-color, #006fd0);transform:scaleY(0);height:26px;line-height:100px;width:4px}.side-bar li.active .indicator[data-v-cbab5da9]{transform:scaleY(1)}.icon[data-v-cbab5da9]{width:var(--sb-icon-size, 20px);height:var(--sb-icon-size, 38px);margin-right:var(--sb-icon-mr, 12px);color:var(--sb-icon-color, #ffffff);flex-shrink:0}.label[data-v-cbab5da9]{color:var(--sb-label-color, #ffffff);white-space:nowrap;font-size:16px}.title[data-v-cbab5da9]{color:#fff}}.tile[data-v-9ae9ef89]{--tile-color: #0078d7;--glow-color: rgba(255, 255, 255, .459);--glow-radius: 20px;position:relative;background-color:var(--tile-color);color:#fff;overflow:hidden;transition:all .25s cubic-bezier(.78,.12,0,1.01)}.tile.small[data-v-9ae9ef89]{width:70px;height:70px}.tile.medium[data-v-9ae9ef89]{width:150px;height:150px}.tile.wide[data-v-9ae9ef89]{width:310px;height:150px}.tile.large[data-v-9ae9ef89]{width:310px;height:310px}.tile-content[data-v-9ae9ef89]{position:relative;z-index:2;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:10px}.tile-icon[data-v-9ae9ef89]{font-size:24px;margin-bottom:8px}.tile-title[data-v-9ae9ef89]{-webkit-user-select:none;user-select:none;font-size:12px;font-weight:700;position:absolute;bottom:26px;left:8px}.glow-border[data-v-9ae9ef89]{position:absolute;inset:0;pointer-events:none;z-index:1;background:radial-gradient(circle at var(--x) var(--y),var(--glow-color) 0%,transparent var(--glow-radius));-webkit-mask:linear-gradient(#fff,#fff) content-box,linear-gradient(#fff,#fff);mask:linear-gradient(#fff,#fff) content-box,linear-gradient(#fff,#fff);-webkit-mask-composite:xor;mask-composite:exclude;padding:4px;transition:opacity .2s ease}.pointer-glow[data-v-9ae9ef89]{position:absolute;top:calc(var(--y) - 50px);left:calc(var(--x) - 50px);width:100px;height:100px;border-radius:60%;background:radial-gradient(circle,var(--glow-color) 0%,transparent 70%);pointer-events:none;z-index:1;transition:opacity .3s ease}.tile[data-v-9ae9ef89]:active{transform:scale(.9)}.item-1{display:inline-block;background-color:#e6e6e6}iframe{border:none;display:inline-block;width:100%;height:100%}.iframe-container{width:calc(100% - 380px);height:100%;position:relative;display:inline-block}.container{display:flex;height:calc(100% + .9px)}.fade-enter-active{transition:all .35s ease}.fade-enter-from{opacity:0;transform:translateY(150px)}.uwppassword{vertical-align:middle;display:inline-block;min-width:300px;outline:2.75px solid #999999;outline-offset:-2.75px;line-height:18px;height:18px;padding:10px 14px;background:var(--primary-color, rgb(255, 255, 255));color:#000;border:none;font-size:16px}.uwppassword:focus{outline:2.75px solid #0078D4;outline-offset:-2.75px}.uwppassword:disabled{background-color:#ccc;outline:2.75px solid #CCCCCC;cursor:not-allowed;color:#7a7a7a}@media (prefers-color-scheme: dark){.uwppassword{color:#919191;background:var(--primary-color, rgb(0, 0, 0))}}.uwprichrditbox{resize:none;vertical-align:middle;display:inline-block;min-width:300px;outline:2.75px solid #999999;outline-offset:-2.75px;line-height:18px;font-size:18px;height:auto;cursor:text;padding:9.5px 14px;background:var(--primary-color, rgb(255, 255, 255));color:#000;border:none;font-size:16px;vertical-align:top;white-space:pre-wrap}.uwprichrditbox:focus{outline:2.75px solid #0078D4;outline-offset:-2.75px}.uwprichrditbox:disabled{background-color:#ccc;outline:2.75px solid #CCCCCC;cursor:not-allowed;color:#7a7a7a}.uwprichrditbox[data-placeholder]:empty:before{content:attr(data-placeholder);color:#666}@media (prefers-color-scheme: dark){.uwprichrditbox{color:#919191;background:var(--primary-color, rgb(0, 0, 0))}}.Notification{border:rgba(163,163,163,0) 4px solid;-webkit-user-select:none;user-select:none;position:fixed;bottom:45px;right:12px;width:400px;height:150px;background-color:#141414f2;transition:all .4s cubic-bezier(0,.6,0,1)}.slide-fade-enter-active{transition:all .4s cubic-bezier(0,.6,0,1)}.slide-fade-leave-active{transition:all .55s cubic-bezier(.6,0,0,1)}.slide-fade-enter-from,.slide-fade-leave-to{transform:translate(480px)}.n-text{color:#fff;margin-left:16px}.n-title{margin-top:-2.5px}.n-vulua{margin-left:16px;color:#a3a3a3;margin-top:-18px}.Notification:hover{border:#5f5f5f 4px solid}.Notification:active{transform:scale(.925)}
package/web-win-vue.js ADDED
@@ -0,0 +1,340 @@
1
+ import { createElementBlock as r, openBlock as c, renderSlot as L, defineComponent as g, ref as u, createElementVNode as a, createVNode as _, toDisplayString as p, Fragment as T, renderList as z, normalizeClass as S, normalizeStyle as w, watch as O, Transition as W, withCtx as M, createCommentVNode as V, withDirectives as C, vShow as $, onMounted as H, nextTick as E, createBlock as F, unref as G } from "vue";
2
+ const f = (e, o) => {
3
+ const t = e.__vccOpts || e;
4
+ for (const [n, l] of o)
5
+ t[n] = l;
6
+ return t;
7
+ }, Z = {
8
+ __name: "webwin-button",
9
+ setup(e) {
10
+ return console.log("%c✨Welcome to Web-Win-Vue-Button✨", `
11
+ color: #0078d7;
12
+ text-shadow: 0 1px 0 #0078d7;`), (o, t) => (c(), r("button", null, [
13
+ L(o.$slots, "default", {}, void 0, !0)
14
+ ]));
15
+ }
16
+ }, k = /* @__PURE__ */ f(Z, [["__scopeId", "data-v-85a8a3fa"]]), q = ["value", "placeholder"], x = /* @__PURE__ */ g({
17
+ __name: "webwin-inputbox",
18
+ props: { value: String, placeholder: String },
19
+ setup(e) {
20
+ console.log("%c✨Welcome to Web-Win-Vue-InputBox✨", `
21
+ color: #0078d7;
22
+ text-shadow: 0 1px 0 #0078d7;`);
23
+ const o = e, t = u(o.value), n = u(o.placeholder);
24
+ return (l, s) => (c(), r("input", {
25
+ type: "text",
26
+ name: "fname",
27
+ class: "uwpinput",
28
+ value: t.value,
29
+ placeholder: n.value,
30
+ onChange: s[0] || (s[0] = (i) => l.$emit("@change", i))
31
+ }, null, 40, q));
32
+ }
33
+ }), P = { class: "side-bar" }, U = { style: { width: "var(--sb-width, 350px)", margin: "auto" } }, j = {
34
+ style: { "margin-top": "26px", "margin-bottom": "26px", "margin-left": "18px" },
35
+ class: "title"
36
+ }, J = { style: { overflow: "auto", height: "calc( 100% - 240px )" } }, K = ["onClick"], Q = {
37
+ class: "icon",
38
+ viewBox: "0 0 24 24",
39
+ fill: "currentColor",
40
+ "aria-hidden": "true"
41
+ }, A = ["d"], ee = { class: "label" }, te = {
42
+ __name: "webwin-item",
43
+ props: {
44
+ items: { type: Array, required: !0 },
45
+ modelValue: { type: Number, default: 0 },
46
+ title: { type: String, default: "Menu" }
47
+ },
48
+ emits: ["update:modelValue"],
49
+ setup(e) {
50
+ return console.log("%c✨Welcome to Web-Win-Vue-Item✨", `
51
+ color: #0078d7;
52
+ text-shadow: 0 1px 0 #0078d7;`), (o, t) => (c(), r("ul", P, [
53
+ a("div", null, [
54
+ t[0] || (t[0] = a("li", { style: { "margin-top": "24px" } }, [
55
+ a("svg", {
56
+ class: "icon",
57
+ viewBox: "0 0 24 24",
58
+ fill: "currentColor",
59
+ "aria-hidden": "true"
60
+ }, [
61
+ a("path", {
62
+ xmlns: "http://www.w3.org/2000/svg",
63
+ style: { stroke: "none", "fill-rule": "nonzero", fill: "rgb(0%,0%,0%)", "fill-opacity": "1" },
64
+ d: "M 0.863281 14.628906 L 2.898438 14.628906 L 2.898438 22.773438 C 2.898438 23.253906 3.292969 23.648438 3.773438 23.648438 L 9.734375 23.648438 C 10.214844 23.648438 10.609375 23.253906 10.609375 22.773438 L 10.609375 16.8125 L 14.246094 16.8125 L 14.246094 22.773438 C 14.246094 23.253906 14.636719 23.648438 15.117188 23.648438 L 20.789062 23.648438 C 21.269531 23.648438 21.664062 23.253906 21.664062 22.773438 L 21.664062 14.628906 L 24.136719 14.628906 C 24.484375 14.628906 24.804688 14.410156 24.9375 14.089844 C 25.066406 13.769531 24.992188 13.394531 24.746094 13.144531 L 13.371094 1.609375 C 13.039062 1.277344 12.484375 1.261719 12.152344 1.597656 L 0.265625 13.132812 C 0.00390625 13.378906 -0.0664062 13.757812 0.0625 14.089844 C 0.195312 14.425781 0.515625 14.628906 0.863281 14.628906 Z M 12.734375 3.457031 L 22.042969 12.882812 L 20.789062 12.882812 C 20.308594 12.882812 19.917969 13.277344 19.917969 13.757812 L 19.917969 21.902344 L 15.992188 21.902344 L 15.992188 15.9375 C 15.992188 15.457031 15.597656 15.066406 15.117188 15.066406 L 9.734375 15.066406 C 9.257812 15.066406 8.863281 15.457031 8.863281 15.9375 L 8.863281 21.902344 L 4.644531 21.902344 L 4.644531 13.757812 C 4.644531 13.277344 4.253906 12.882812 3.773438 12.882812 L 3.015625 12.882812 Z M 12.734375 3.457031 "
65
+ })
66
+ ]),
67
+ a("span", { class: "label" }, "主页")
68
+ ], -1)),
69
+ a("div", U, [
70
+ _(x, {
71
+ placeholder: "查找",
72
+ style: { "margin-top": "6px", width: "320px" }
73
+ })
74
+ ]),
75
+ a("h3", j, p(e.title), 1)
76
+ ]),
77
+ a("div", J, [
78
+ (c(!0), r(T, null, z(e.items, (n, l) => (c(), r("li", {
79
+ key: l,
80
+ class: S({ active: l === e.modelValue }),
81
+ onClick: (s) => o.$emit("update:modelValue", l)
82
+ }, [
83
+ t[1] || (t[1] = a("span", { class: "indicator" }, null, -1)),
84
+ (c(), r("svg", Q, [
85
+ a("path", {
86
+ d: n.icon
87
+ }, null, 8, A)
88
+ ])),
89
+ a("span", ee, p(n.name), 1)
90
+ ], 10, K))), 128))
91
+ ])
92
+ ]));
93
+ }
94
+ }, b = /* @__PURE__ */ f(te, [["__scopeId", "data-v-cbab5da9"]]);
95
+ console.log("%c✨Welcome to Web-Win-Vue-Tile✨", `
96
+ color: #0078d7;
97
+ text-shadow: 0 1px 0 #0078d7;`);
98
+ const oe = {
99
+ props: {
100
+ size: { default: "medium" },
101
+ color: { default: "#0078d7" },
102
+ title: { default: "App" },
103
+ icon: { default: "" },
104
+ glowColor: { default: "rgba(255,255,255,0.5)" },
105
+ glowRadius: { default: 60 }
106
+ },
107
+ data() {
108
+ return {
109
+ isHovered: !1,
110
+ mouseX: 0,
111
+ mouseY: 0,
112
+ glowOpacity: 0
113
+ };
114
+ },
115
+ computed: {
116
+ tileStyle() {
117
+ return {
118
+ "--tile-color": this.color,
119
+ "--glow-color": this.glowColor,
120
+ "--glow-radius": `${this.glowRadius}px`
121
+ };
122
+ },
123
+ glowStyle() {
124
+ return {
125
+ "--x": `${this.mouseX}px`,
126
+ "--y": `${this.mouseY}px`,
127
+ opacity: this.glowOpacity
128
+ };
129
+ },
130
+ pointerGlowStyle() {
131
+ return {
132
+ "--x": `${this.mouseX}px`,
133
+ "--y": `${this.mouseY}px`,
134
+ opacity: this.isHovered ? 1 : 0
135
+ };
136
+ }
137
+ },
138
+ methods: {
139
+ handleMouseMove(e) {
140
+ const o = e.currentTarget.getBoundingClientRect();
141
+ this.mouseX = e.clientX - o.left, this.mouseY = e.clientY - o.top;
142
+ const t = Math.min(
143
+ this.mouseX,
144
+ o.width - this.mouseX,
145
+ this.mouseY,
146
+ o.height - this.mouseY
147
+ ), n = this.glowRadius;
148
+ this.glowOpacity = Math.max(0, (n - t) / n);
149
+ },
150
+ handleMouseLeave() {
151
+ this.isHovered = !1, this.glowOpacity = 0;
152
+ }
153
+ }
154
+ }, ne = { class: "tile-content" }, le = { class: "tile-icon" }, se = {
155
+ xmlns: "http://www.w3.org/2000/svg",
156
+ viewBox: "0 0 24 24",
157
+ width: "24",
158
+ height: "24"
159
+ }, ae = ["d"], ie = { class: "tile-title" };
160
+ function ce(e, o, t, n, l, s) {
161
+ return c(), r("div", {
162
+ class: S(["tile", t.size]),
163
+ style: w(s.tileStyle),
164
+ onMousemove: o[0] || (o[0] = (...i) => s.handleMouseMove && s.handleMouseMove(...i)),
165
+ onMouseenter: o[1] || (o[1] = (i) => l.isHovered = !0),
166
+ onMouseleave: o[2] || (o[2] = (...i) => s.handleMouseLeave && s.handleMouseLeave(...i))
167
+ }, [
168
+ a("div", ne, [
169
+ a("div", le, [
170
+ L(e.$slots, "icon", {}, () => [
171
+ (c(), r("svg", se, [
172
+ a("path", {
173
+ fill: "white",
174
+ d: t.icon
175
+ }, null, 8, ae)
176
+ ]))
177
+ ], !0)
178
+ ]),
179
+ a("div", ie, p(t.title), 1)
180
+ ]),
181
+ a("div", {
182
+ class: "glow-border",
183
+ style: w(s.glowStyle)
184
+ }, null, 4),
185
+ a("div", {
186
+ class: "pointer-glow",
187
+ style: w(s.pointerGlowStyle)
188
+ }, null, 4)
189
+ ], 38);
190
+ }
191
+ const B = /* @__PURE__ */ f(oe, [["render", ce], ["__scopeId", "data-v-9ae9ef89"]]), re = { class: "container" }, ue = {
192
+ key: "state0",
193
+ class: "iframe-container"
194
+ }, de = ["src"], me = {
195
+ key: "state1",
196
+ class: "iframe-container"
197
+ }, pe = ["src"], N = {
198
+ __name: "webwin-tab",
199
+ props: { menu: Array, url: Array },
200
+ setup(e) {
201
+ console.log("%c✨Welcome to Web-Win-Vue-Tab✨", `
202
+ color: #0078d7;
203
+ text-shadow: 0 1px 0 #0078d7;`);
204
+ const o = e, t = u(0), n = u(0), l = u(o.url[0]);
205
+ return O(t, (s) => {
206
+ console.log("activeIndex changed:", s), console.log("new url:", o.url[s]), l.value = o.url[s], n.value = n.value === 0 ? 1 : 0, console.log("docState:", n.value);
207
+ }), (s, i) => (c(), r("div", re, [
208
+ _(b, {
209
+ modelValue: t.value,
210
+ "onUpdate:modelValue": i[0] || (i[0] = (v) => t.value = v),
211
+ items: e.menu,
212
+ class: "item-1"
213
+ }, null, 8, ["modelValue", "items"]),
214
+ _(W, {
215
+ name: "fade",
216
+ mode: "out-in"
217
+ }, {
218
+ default: M(() => [
219
+ n.value === 0 ? (c(), r("div", ue, [
220
+ C(a("iframe", { src: l.value }, null, 8, de), [
221
+ [$, n.value === 0]
222
+ ])
223
+ ])) : n.value === 1 ? (c(), r("div", me, [
224
+ C(a("iframe", { src: l.value }, null, 8, pe), [
225
+ [$, n.value === 1]
226
+ ])
227
+ ])) : V("", !0)
228
+ ]),
229
+ _: 1
230
+ })
231
+ ]));
232
+ }
233
+ }, he = ["value", "placeholder"], I = /* @__PURE__ */ g({
234
+ __name: "webwin-passwordbox",
235
+ props: { value: String, placeholder: String },
236
+ setup(e) {
237
+ console.log("%c✨Welcome to Web-Win-Vue-PasswordBox✨", `
238
+ color: #0078d7;
239
+ text-shadow: 0 1px 0 #0078d7;`);
240
+ const o = e, t = u(o.value), n = u(o.placeholder);
241
+ return (l, s) => (c(), r("input", {
242
+ type: "password",
243
+ name: "fname",
244
+ class: "uwppassword",
245
+ value: t.value,
246
+ placeholder: n.value,
247
+ onChange: s[0] || (s[0] = (i) => l.$emit("@change", i))
248
+ }, null, 40, he));
249
+ }
250
+ }), ve = ["data-placeholder"], R = /* @__PURE__ */ g({
251
+ __name: "webwin-richeditbox",
252
+ props: {
253
+ value: { type: String, default: "" },
254
+ placeholder: { type: String, default: "" }
255
+ },
256
+ emits: ["update:value", "change"],
257
+ setup(e, { emit: o }) {
258
+ const t = e, n = o, l = u(null), s = u(t.placeholder), i = u(t.value);
259
+ H(() => {
260
+ l.value && (l.value.textContent = t.value || "", i.value = t.value || "");
261
+ });
262
+ const v = (h) => {
263
+ if (!l.value) return;
264
+ const d = l.value.textContent || "";
265
+ n("update:value", d), E(() => {
266
+ if (l.value) {
267
+ const m = document.createRange(), y = window.getSelection();
268
+ m.selectNodeContents(l.value), m.collapse(!1), y?.removeAllRanges(), y?.addRange(m);
269
+ }
270
+ });
271
+ }, Y = (h) => {
272
+ const d = h.target;
273
+ d.textContent === t.placeholder && (d.textContent = "");
274
+ }, D = (h) => {
275
+ const d = h.target, m = d.textContent || "";
276
+ m !== i.value && (n("change", {
277
+ target: {
278
+ value: m
279
+ }
280
+ }), i.value = m), m.trim() === "" && (d.textContent = "");
281
+ };
282
+ return (h, d) => (c(), r("div", {
283
+ ref_key: "editableDiv",
284
+ ref: l,
285
+ class: "uwprichrditbox",
286
+ contenteditable: "plaintext-only",
287
+ "data-placeholder": s.value,
288
+ onInput: v,
289
+ onFocus: Y,
290
+ onBlur: D
291
+ }, null, 40, ve));
292
+ }
293
+ }), we = { class: "n-text n-name" }, _e = { class: "n-text n-title" }, ge = { class: "n-vulua" }, X = {
294
+ __name: "webwin-notifications",
295
+ props: { name: String, title: String, text: String },
296
+ setup(e, { expose: o }) {
297
+ let t = u(!1);
298
+ const n = () => {
299
+ t.value = !t.value;
300
+ };
301
+ function l() {
302
+ t.value && setTimeout(() => {
303
+ t.value = !1;
304
+ }, 250);
305
+ }
306
+ return o({ showNotification: n }), console.log("%c✨Welcome to Web-Win-Vue-Notifications✨", `
307
+ color: #0078d7;
308
+ text-shadow: 0 1px 0 #0078d7;`), (s, i) => (c(), F(W, { name: "slide-fade" }, {
309
+ default: M(() => [
310
+ G(t) ? (c(), r("div", {
311
+ key: 0,
312
+ class: "Notification",
313
+ onClick: l
314
+ }, [
315
+ a("p", we, p(e.name), 1),
316
+ a("h4", _e, p(e.title), 1),
317
+ a("p", ge, p(e.text), 1)
318
+ ])) : V("", !0)
319
+ ]),
320
+ _: 1
321
+ }));
322
+ }
323
+ }, fe = [k, b, B, N, x, I, R, X], be = {
324
+ install(e) {
325
+ fe.forEach((o) => {
326
+ e.component("winbutton", k), e.component("winitem", b), e.component("wintile", B), e.component("wintab", N), e.component("wininputbox", x), e.component("winpasswordbox", I), e.component("winricheditbox", R), e.component("winnotifications", X);
327
+ });
328
+ }
329
+ };
330
+ export {
331
+ be as default,
332
+ k as winbutton,
333
+ x as wininputbox,
334
+ b as winitem,
335
+ X as winnotifications,
336
+ I as winpasswordbox,
337
+ R as winricheditbox,
338
+ N as wintab,
339
+ B as wintile
340
+ };
@@ -0,0 +1,15 @@
1
+ (function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c["web-win-vue"]={},c.Vue))})(this,(function(c,e){"use strict";const h=(t,n)=>{const o=t.__vccOpts||t;for(const[l,a]of n)o[l]=a;return o},f=h({__name:"webwin-button",setup(t){return console.log("%c✨Welcome to Web-Win-Vue-Button✨",`
2
+ color: #0078d7;
3
+ text-shadow: 0 1px 0 #0078d7;`),(n,o)=>(e.openBlock(),e.createElementBlock("button",null,[e.renderSlot(n.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-85a8a3fa"]]),k=["value","placeholder"],u=e.defineComponent({__name:"webwin-inputbox",props:{value:String,placeholder:String},setup(t){console.log("%c✨Welcome to Web-Win-Vue-InputBox✨",`
4
+ color: #0078d7;
5
+ text-shadow: 0 1px 0 #0078d7;`);const n=t,o=e.ref(n.value),l=e.ref(n.placeholder);return(a,i)=>(e.openBlock(),e.createElementBlock("input",{type:"text",name:"fname",class:"uwpinput",value:o.value,placeholder:l.value,onChange:i[0]||(i[0]=s=>a.$emit("@change",s))},null,40,k))}}),B={class:"side-bar"},C={style:{width:"var(--sb-width, 350px)",margin:"auto"}},E={style:{"margin-top":"26px","margin-bottom":"26px","margin-left":"18px"},class:"title"},S={style:{overflow:"auto",height:"calc( 100% - 240px )"}},N=["onClick"],$={class:"icon",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},L=["d"],W={class:"label"},p=h({__name:"webwin-item",props:{items:{type:Array,required:!0},modelValue:{type:Number,default:0},title:{type:String,default:"Menu"}},emits:["update:modelValue"],setup(t){return console.log("%c✨Welcome to Web-Win-Vue-Item✨",`
6
+ color: #0078d7;
7
+ text-shadow: 0 1px 0 #0078d7;`),(n,o)=>(e.openBlock(),e.createElementBlock("ul",B,[e.createElementVNode("div",null,[o[0]||(o[0]=e.createElementVNode("li",{style:{"margin-top":"24px"}},[e.createElementVNode("svg",{class:"icon",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{xmlns:"http://www.w3.org/2000/svg",style:{stroke:"none","fill-rule":"nonzero",fill:"rgb(0%,0%,0%)","fill-opacity":"1"},d:"M 0.863281 14.628906 L 2.898438 14.628906 L 2.898438 22.773438 C 2.898438 23.253906 3.292969 23.648438 3.773438 23.648438 L 9.734375 23.648438 C 10.214844 23.648438 10.609375 23.253906 10.609375 22.773438 L 10.609375 16.8125 L 14.246094 16.8125 L 14.246094 22.773438 C 14.246094 23.253906 14.636719 23.648438 15.117188 23.648438 L 20.789062 23.648438 C 21.269531 23.648438 21.664062 23.253906 21.664062 22.773438 L 21.664062 14.628906 L 24.136719 14.628906 C 24.484375 14.628906 24.804688 14.410156 24.9375 14.089844 C 25.066406 13.769531 24.992188 13.394531 24.746094 13.144531 L 13.371094 1.609375 C 13.039062 1.277344 12.484375 1.261719 12.152344 1.597656 L 0.265625 13.132812 C 0.00390625 13.378906 -0.0664062 13.757812 0.0625 14.089844 C 0.195312 14.425781 0.515625 14.628906 0.863281 14.628906 Z M 12.734375 3.457031 L 22.042969 12.882812 L 20.789062 12.882812 C 20.308594 12.882812 19.917969 13.277344 19.917969 13.757812 L 19.917969 21.902344 L 15.992188 21.902344 L 15.992188 15.9375 C 15.992188 15.457031 15.597656 15.066406 15.117188 15.066406 L 9.734375 15.066406 C 9.257812 15.066406 8.863281 15.457031 8.863281 15.9375 L 8.863281 21.902344 L 4.644531 21.902344 L 4.644531 13.757812 C 4.644531 13.277344 4.253906 12.882812 3.773438 12.882812 L 3.015625 12.882812 Z M 12.734375 3.457031 "})]),e.createElementVNode("span",{class:"label"},"主页")],-1)),e.createElementVNode("div",C,[e.createVNode(u,{placeholder:"查找",style:{"margin-top":"6px",width:"320px"}})]),e.createElementVNode("h3",E,e.toDisplayString(t.title),1)]),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(l,a)=>(e.openBlock(),e.createElementBlock("li",{key:a,class:e.normalizeClass({active:a===t.modelValue}),onClick:i=>n.$emit("update:modelValue",a)},[o[1]||(o[1]=e.createElementVNode("span",{class:"indicator"},null,-1)),(e.openBlock(),e.createElementBlock("svg",$,[e.createElementVNode("path",{d:l.icon},null,8,L)])),e.createElementVNode("span",W,e.toDisplayString(l.name),1)],10,N))),128))])]))}},[["__scopeId","data-v-cbab5da9"]]);console.log("%c✨Welcome to Web-Win-Vue-Tile✨",`
8
+ color: #0078d7;
9
+ text-shadow: 0 1px 0 #0078d7;`);const M={props:{size:{default:"medium"},color:{default:"#0078d7"},title:{default:"App"},icon:{default:""},glowColor:{default:"rgba(255,255,255,0.5)"},glowRadius:{default:60}},data(){return{isHovered:!1,mouseX:0,mouseY:0,glowOpacity:0}},computed:{tileStyle(){return{"--tile-color":this.color,"--glow-color":this.glowColor,"--glow-radius":`${this.glowRadius}px`}},glowStyle(){return{"--x":`${this.mouseX}px`,"--y":`${this.mouseY}px`,opacity:this.glowOpacity}},pointerGlowStyle(){return{"--x":`${this.mouseX}px`,"--y":`${this.mouseY}px`,opacity:this.isHovered?1:0}}},methods:{handleMouseMove(t){const n=t.currentTarget.getBoundingClientRect();this.mouseX=t.clientX-n.left,this.mouseY=t.clientY-n.top;const o=Math.min(this.mouseX,n.width-this.mouseX,this.mouseY,n.height-this.mouseY),l=this.glowRadius;this.glowOpacity=Math.max(0,(l-o)/l)},handleMouseLeave(){this.isHovered=!1,this.glowOpacity=0}}},D={class:"tile-content"},T={class:"tile-icon"},v={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},z=["d"],I={class:"tile-title"};function R(t,n,o,l,a,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tile",o.size]),style:e.normalizeStyle(i.tileStyle),onMousemove:n[0]||(n[0]=(...s)=>i.handleMouseMove&&i.handleMouseMove(...s)),onMouseenter:n[1]||(n[1]=s=>a.isHovered=!0),onMouseleave:n[2]||(n[2]=(...s)=>i.handleMouseLeave&&i.handleMouseLeave(...s))},[e.createElementVNode("div",D,[e.createElementVNode("div",T,[e.renderSlot(t.$slots,"icon",{},()=>[(e.openBlock(),e.createElementBlock("svg",v,[e.createElementVNode("path",{fill:"white",d:o.icon},null,8,z)]))],!0)]),e.createElementVNode("div",I,e.toDisplayString(o.title),1)]),e.createElementVNode("div",{class:"glow-border",style:e.normalizeStyle(i.glowStyle)},null,4),e.createElementVNode("div",{class:"pointer-glow",style:e.normalizeStyle(i.pointerGlowStyle)},null,4)],38)}const w=h(M,[["render",R],["__scopeId","data-v-9ae9ef89"]]),X={class:"container"},Y={key:"state0",class:"iframe-container"},O=["src"],H={key:"state1",class:"iframe-container"},F=["src"],_={__name:"webwin-tab",props:{menu:Array,url:Array},setup(t){console.log("%c✨Welcome to Web-Win-Vue-Tab✨",`
10
+ color: #0078d7;
11
+ text-shadow: 0 1px 0 #0078d7;`);const n=t,o=e.ref(0),l=e.ref(0),a=e.ref(n.url[0]);return e.watch(o,i=>{console.log("activeIndex changed:",i),console.log("new url:",n.url[i]),a.value=n.url[i],l.value=l.value===0?1:0,console.log("docState:",l.value)}),(i,s)=>(e.openBlock(),e.createElementBlock("div",X,[e.createVNode(p,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=b=>o.value=b),items:t.menu,class:"item-1"},null,8,["modelValue","items"]),e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[l.value===0?(e.openBlock(),e.createElementBlock("div",Y,[e.withDirectives(e.createElementVNode("iframe",{src:a.value},null,8,O),[[e.vShow,l.value===0]])])):l.value===1?(e.openBlock(),e.createElementBlock("div",H,[e.withDirectives(e.createElementVNode("iframe",{src:a.value},null,8,F),[[e.vShow,l.value===1]])])):e.createCommentVNode("",!0)]),_:1})]))}},j=["value","placeholder"],g=e.defineComponent({__name:"webwin-passwordbox",props:{value:String,placeholder:String},setup(t){console.log("%c✨Welcome to Web-Win-Vue-PasswordBox✨",`
12
+ color: #0078d7;
13
+ text-shadow: 0 1px 0 #0078d7;`);const n=t,o=e.ref(n.value),l=e.ref(n.placeholder);return(a,i)=>(e.openBlock(),e.createElementBlock("input",{type:"password",name:"fname",class:"uwppassword",value:o.value,placeholder:l.value,onChange:i[0]||(i[0]=s=>a.$emit("@change",s))},null,40,j))}}),q=["data-placeholder"],x=e.defineComponent({__name:"webwin-richeditbox",props:{value:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:value","change"],setup(t,{emit:n}){const o=t,l=n,a=e.ref(null),i=e.ref(o.placeholder),s=e.ref(o.value);e.onMounted(()=>{a.value&&(a.value.textContent=o.value||"",s.value=o.value||"")});const b=m=>{if(!a.value)return;const r=a.value.textContent||"";l("update:value",r),e.nextTick(()=>{if(a.value){const d=document.createRange(),V=window.getSelection();d.selectNodeContents(a.value),d.collapse(!1),V?.removeAllRanges(),V?.addRange(d)}})},K=m=>{const r=m.target;r.textContent===o.placeholder&&(r.textContent="")},Q=m=>{const r=m.target,d=r.textContent||"";d!==s.value&&(l("change",{target:{value:d}}),s.value=d),d.trim()===""&&(r.textContent="")};return(m,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"editableDiv",ref:a,class:"uwprichrditbox",contenteditable:"plaintext-only","data-placeholder":i.value,onInput:b,onFocus:K,onBlur:Q},null,40,q))}}),G={class:"n-text n-name"},P={class:"n-text n-title"},Z={class:"n-vulua"},y={__name:"webwin-notifications",props:{name:String,title:String,text:String},setup(t,{expose:n}){let o=e.ref(!1);const l=()=>{o.value=!o.value};function a(){o.value&&setTimeout(()=>{o.value=!1},250)}return n({showNotification:l}),console.log("%c✨Welcome to Web-Win-Vue-Notifications✨",`
14
+ color: #0078d7;
15
+ text-shadow: 0 1px 0 #0078d7;`),(i,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"Notification",onClick:a},[e.createElementVNode("p",G,e.toDisplayString(t.name),1),e.createElementVNode("h4",P,e.toDisplayString(t.title),1),e.createElementVNode("p",Z,e.toDisplayString(t.text),1)])):e.createCommentVNode("",!0)]),_:1}))}},U=[f,p,w,_,u,g,x,y],J={install(t){U.forEach(n=>{t.component("winbutton",f),t.component("winitem",p),t.component("wintile",w),t.component("wintab",_),t.component("wininputbox",u),t.component("winpasswordbox",g),t.component("winricheditbox",x),t.component("winnotifications",y)})}};c.default=J,c.winbutton=f,c.wininputbox=u,c.winitem=p,c.winnotifications=y,c.winpasswordbox=g,c.winricheditbox=x,c.wintab=_,c.wintile=w,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));