@opentiny/tiny-engine-toolbar-lang 2.2.0 → 2.3.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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./style.css";
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";
2
+ import { getCurrentInstance as m, onMounted as I, nextTick as w, getCurrentScope as y, onScopeDispose as h, ref as r, resolveComponent as E, createBlock as B, openBlock as N, watch as P } from "vue";
3
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;
@@ -9,26 +9,26 @@ function L(e) {
9
9
  return e;
10
10
  }
11
11
  function Q(e) {
12
- return m() ? (I(e), !0) : !1;
12
+ return y() ? (h(e), !0) : !1;
13
13
  }
14
- function b(e, n = !0) {
15
- w() ? y(e) : n ? e() : h(e);
14
+ function C(e, n = !0) {
15
+ m() ? I(e) : n ? e() : w(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(), b(a, n), t;
20
+ return a(), C(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(), l = r(), i = r(null), C = (u) => {
26
+ } = e, a = k(() => t && "BroadcastChannel" in t), o = r(!1), s = r(), l = r(), i = r(null), b = (u) => {
27
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 && b(() => {
31
+ return a.value && C(() => {
32
32
  i.value = null, s.value = new BroadcastChannel(n), s.value.addEventListener("message", (u) => {
33
33
  l.value = u.data;
34
34
  }, { passive: !0 }), s.value.addEventListener("messageerror", (u) => {
@@ -42,19 +42,19 @@ const A = (e) => {
42
42
  isSupported: a,
43
43
  channel: s,
44
44
  data: l,
45
- post: C,
45
+ post: b,
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 : {}, f = "__vueuse_ssr_handlers__";
51
- p[f] = p[f] || {};
52
- var v;
50
+ }, p = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, v = "__vueuse_ssr_handlers__";
51
+ p[v] = p[v] || {};
52
+ var f;
53
53
  (function(e) {
54
54
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
55
- })(v || (v = {}));
55
+ })(f || (f = {}));
56
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
- for (var t in n)
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))
@@ -111,7 +111,7 @@ const U = (e, n) => {
111
111
  },
112
112
  setup(e) {
113
113
  const n = r("zh_CN"), { post: t, data: a } = A({ name: e.langChannel });
114
- E(a, () => {
114
+ P(a, () => {
115
115
  n.value = a.value;
116
116
  });
117
117
  const o = [
@@ -134,15 +134,15 @@ const U = (e, n) => {
134
134
  }
135
135
  };
136
136
  function F(e, n, t, a, o, s) {
137
- const l = B("toolbar-base");
138
- return N(), P(l, {
137
+ const l = E("toolbar-base");
138
+ return N(), B(l, {
139
139
  content: "中英文切换",
140
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 G = /* @__PURE__ */ U(z, [["render", F], ["__scopeId", "data-v-5e819ba2"]]), V = {
145
+ const G = /* @__PURE__ */ U(z, [["render", F], ["__scopeId", "data-v-03b30593"]]), V = {
146
146
  id: "engine.toolbars.lang",
147
147
  type: "toolbars",
148
148
  title: "lang",
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .change-lang-box svg[data-v-5e819ba2]{color:var(--ti-lowcode-toolbar-title-color);width:18px;height:18px}.change-lang-box svg[data-v-5e819ba2]:hover{opacity:.75}.icon[data-v-5e819ba2]{color:var(--ti-lowcode-toolbar-title-color)}
1
+ .change-lang-box svg[data-v-03b30593]{color:var(--te-toolbars-lang-text-color);width:18px;height:18px}.change-lang-box svg[data-v-03b30593]:hover{opacity:.75}.icon[data-v-03b30593]{color:var(--te-toolbars-lang-icon-color)}:root{--te-toolbars-lang-text-color: var(--te-common-text-primary);--te-toolbars-lang-icon-color: var(--te-common-icon-primary)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-lang",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -25,19 +25,19 @@
25
25
  "license": "MIT",
26
26
  "homepage": "https://opentiny.design/tiny-engine",
27
27
  "dependencies": {
28
- "@opentiny/tiny-engine-common": "2.2.0",
29
- "@opentiny/tiny-engine-utils": "2.2.0",
28
+ "@opentiny/tiny-engine-common": "2.3.0",
29
+ "@opentiny/tiny-engine-utils": "2.3.0",
30
30
  "@vueuse/core": "^9.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.2.0",
33
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.3.0",
34
34
  "@vitejs/plugin-vue": "^5.1.2",
35
35
  "@vitejs/plugin-vue-jsx": "^4.0.1",
36
36
  "vite": "^5.4.2"
37
37
  },
38
38
  "peerDependencies": {
39
- "@opentiny/vue": "^3.14.0",
39
+ "@opentiny/vue": "^3.20.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "34525174aa47280dda7d42d8835ebe235e169ed6"
42
+ "gitHead": "330c4d2b319d5b5ba6ad64c270c21a7931a2e400"
43
43
  }