@opentiny/tiny-engine-toolbar-lang 2.0.0-rc.2 → 2.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +37 -38
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { getCurrentScope as
|
|
3
|
-
import { ToolbarBase as
|
|
2
|
+
import { getCurrentScope as m, onScopeDispose as I, getCurrentInstance as w, onMounted as y, nextTick as h, ref as r, watch as E, resolveComponent as B, openBlock as N, createBlock as P } from "vue";
|
|
3
|
+
import { ToolbarBase as S } from "@opentiny/tiny-engine-common";
|
|
4
4
|
import { constants as T } from "@opentiny/tiny-engine-utils";
|
|
5
5
|
var d;
|
|
6
6
|
const O = typeof window < "u";
|
|
@@ -9,30 +9,30 @@ function L(e) {
|
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
11
|
function Q(e) {
|
|
12
|
-
return
|
|
12
|
+
return m() ? (I(e), !0) : !1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
14
|
+
function b(e, n = !0) {
|
|
15
|
+
w() ? y(e) : n ? e() : h(e);
|
|
16
16
|
}
|
|
17
17
|
const x = O ? window : void 0;
|
|
18
18
|
function k(e, n = !1) {
|
|
19
19
|
const t = r(), a = () => t.value = !!e();
|
|
20
|
-
return a(),
|
|
20
|
+
return a(), b(a, n), t;
|
|
21
21
|
}
|
|
22
22
|
const A = (e) => {
|
|
23
23
|
const {
|
|
24
24
|
name: n,
|
|
25
25
|
window: t = x
|
|
26
|
-
} = e, a = k(() => t && "BroadcastChannel" in t), o = r(!1), s = r(),
|
|
27
|
-
s.value && s.value.postMessage(
|
|
26
|
+
} = e, a = k(() => t && "BroadcastChannel" in t), o = r(!1), s = r(), l = r(), i = r(null), C = (u) => {
|
|
27
|
+
s.value && s.value.postMessage(u);
|
|
28
28
|
}, c = () => {
|
|
29
29
|
s.value && s.value.close(), o.value = !0;
|
|
30
30
|
};
|
|
31
|
-
return a.value &&
|
|
32
|
-
i.value = null, s.value = new BroadcastChannel(n), s.value.addEventListener("message", (
|
|
33
|
-
|
|
34
|
-
}, { passive: !0 }), s.value.addEventListener("messageerror", (
|
|
35
|
-
i.value =
|
|
31
|
+
return a.value && b(() => {
|
|
32
|
+
i.value = null, s.value = new BroadcastChannel(n), s.value.addEventListener("message", (u) => {
|
|
33
|
+
l.value = u.data;
|
|
34
|
+
}, { passive: !0 }), s.value.addEventListener("messageerror", (u) => {
|
|
35
|
+
i.value = u;
|
|
36
36
|
}, { passive: !0 }), s.value.addEventListener("close", () => {
|
|
37
37
|
o.value = !0;
|
|
38
38
|
});
|
|
@@ -41,27 +41,27 @@ const A = (e) => {
|
|
|
41
41
|
}), {
|
|
42
42
|
isSupported: a,
|
|
43
43
|
channel: s,
|
|
44
|
-
data:
|
|
45
|
-
post:
|
|
44
|
+
data: l,
|
|
45
|
+
post: C,
|
|
46
46
|
close: c,
|
|
47
47
|
error: i,
|
|
48
48
|
isClosed: o
|
|
49
49
|
};
|
|
50
|
-
}, p = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {},
|
|
51
|
-
p[
|
|
52
|
-
var
|
|
50
|
+
}, p = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, f = "__vueuse_ssr_handlers__";
|
|
51
|
+
p[f] = p[f] || {};
|
|
52
|
+
var v;
|
|
53
53
|
(function(e) {
|
|
54
54
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
55
|
-
})(
|
|
56
|
-
var
|
|
55
|
+
})(v || (v = {}));
|
|
56
|
+
var j = Object.defineProperty, _ = Object.getOwnPropertySymbols, D = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable, g = (e, n, t) => n in e ? j(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, M = (e, n) => {
|
|
57
57
|
for (var t in n || (n = {}))
|
|
58
|
-
|
|
58
|
+
D.call(n, t) && g(e, t, n[t]);
|
|
59
59
|
if (_)
|
|
60
60
|
for (var t of _(n))
|
|
61
|
-
|
|
61
|
+
H.call(n, t) && g(e, t, n[t]);
|
|
62
62
|
return e;
|
|
63
63
|
};
|
|
64
|
-
const
|
|
64
|
+
const R = {
|
|
65
65
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
66
66
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
67
67
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -87,22 +87,22 @@ const H = {
|
|
|
87
87
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
88
88
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
89
89
|
};
|
|
90
|
-
|
|
90
|
+
M({
|
|
91
91
|
linear: L
|
|
92
|
-
},
|
|
93
|
-
const
|
|
92
|
+
}, R);
|
|
93
|
+
const U = (e, n) => {
|
|
94
94
|
const t = e.__vccOpts || e;
|
|
95
95
|
for (const [a, o] of n)
|
|
96
96
|
t[a] = o;
|
|
97
97
|
return t;
|
|
98
|
-
}, { BROADCAST_CHANNEL:
|
|
98
|
+
}, { BROADCAST_CHANNEL: W } = T, z = {
|
|
99
99
|
components: {
|
|
100
|
-
ToolbarBase:
|
|
100
|
+
ToolbarBase: S
|
|
101
101
|
},
|
|
102
102
|
props: {
|
|
103
103
|
langChannel: {
|
|
104
104
|
type: String,
|
|
105
|
-
default:
|
|
105
|
+
default: W.CanvasLang
|
|
106
106
|
},
|
|
107
107
|
options: {
|
|
108
108
|
type: Object,
|
|
@@ -133,30 +133,29 @@ const M = (e, n) => {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
|
-
function
|
|
137
|
-
const
|
|
138
|
-
return
|
|
136
|
+
function F(e, n, t, a, o, s) {
|
|
137
|
+
const l = B("toolbar-base");
|
|
138
|
+
return N(), P(l, {
|
|
139
139
|
content: "画布中英文切换",
|
|
140
|
-
icon: t.options.icon
|
|
140
|
+
icon: t.options.icon.default || t.options.icon,
|
|
141
141
|
options: t.options,
|
|
142
142
|
onClickApi: a.changeLang
|
|
143
143
|
}, null, 8, ["icon", "options", "onClickApi"]);
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const G = /* @__PURE__ */ U(z, [["render", F], ["__scopeId", "data-v-fb57d0b1"]]), V = {
|
|
146
146
|
id: "engine.toolbars.lang",
|
|
147
147
|
type: "toolbars",
|
|
148
148
|
title: "lang",
|
|
149
149
|
options: {
|
|
150
150
|
icon: {
|
|
151
|
-
|
|
152
|
-
en_US: "en"
|
|
151
|
+
default: "cn-en"
|
|
153
152
|
},
|
|
154
153
|
renderType: "icon",
|
|
155
154
|
collapsed: !0
|
|
156
155
|
}
|
|
157
156
|
}, Y = {
|
|
158
|
-
...
|
|
159
|
-
entry:
|
|
157
|
+
...V,
|
|
158
|
+
entry: G
|
|
160
159
|
};
|
|
161
160
|
export {
|
|
162
161
|
Y as default
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.change-lang-box svg[data-v-
|
|
1
|
+
.change-lang-box svg[data-v-fb57d0b1]{color:var(--ti-lowcode-toolbar-title-color);width:18px;height:18px}.change-lang-box svg[data-v-fb57d0b1]:hover{opacity:.75}.icon[data-v-fb57d0b1]{color:var(--ti-lowcode-toolbar-title-color)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-lang",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentiny/tiny-engine-common": "2.0.0-rc.
|
|
29
|
-
"@opentiny/tiny-engine-utils": "2.0.0-rc.
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.0.0-rc.3",
|
|
29
|
+
"@opentiny/tiny-engine-utils": "2.0.0-rc.3",
|
|
30
30
|
"@vueuse/core": "^9.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-rc.
|
|
33
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-rc.3",
|
|
34
34
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
35
35
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
36
36
|
"vite": "^5.4.2"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@opentiny/vue": "^3.14.0",
|
|
40
40
|
"vue": "^3.4.15"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "9e799e702a696ae06778abba1954262d65188481"
|
|
43
43
|
}
|