@opentiny/tiny-engine-toolbar-lang 2.3.0 → 2.4.0-rc.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 { 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";
2
+ import { getCurrentInstance as I, onMounted as b, nextTick as w, getCurrentScope as y, onScopeDispose as h, ref as r, watch as E, resolveComponent as B, createBlock as N, openBlock 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;
@@ -12,7 +12,7 @@ function Q(e) {
12
12
  return y() ? (h(e), !0) : !1;
13
13
  }
14
14
  function C(e, n = !0) {
15
- m() ? I(e) : n ? e() : w(e);
15
+ I() ? b(e) : n ? e() : w(e);
16
16
  }
17
17
  const x = O ? window : void 0;
18
18
  function k(e, n = !1) {
@@ -23,7 +23,7 @@ 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), b = (u) => {
26
+ } = e, a = k(() => t && "BroadcastChannel" in t), o = r(!1), s = r(), l = r(), i = r(null), m = (u) => {
27
27
  s.value && s.value.postMessage(u);
28
28
  }, c = () => {
29
29
  s.value && s.value.close(), o.value = !0;
@@ -42,7 +42,7 @@ const A = (e) => {
42
42
  isSupported: a,
43
43
  channel: s,
44
44
  data: l,
45
- post: b,
45
+ post: m,
46
46
  close: c,
47
47
  error: i,
48
48
  isClosed: o
@@ -53,15 +53,15 @@ var f;
53
53
  (function(e) {
54
54
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
55
55
  })(f || (f = {}));
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) => {
56
+ var D = Object.defineProperty, _ = Object.getOwnPropertySymbols, j = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable, g = (e, n, t) => n in e ? D(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, H = (e, n) => {
57
57
  for (var t in n || (n = {}))
58
- D.call(n, t) && g(e, t, n[t]);
58
+ j.call(n, t) && g(e, t, n[t]);
59
59
  if (_)
60
60
  for (var t of _(n))
61
- H.call(n, t) && g(e, t, n[t]);
61
+ F.call(n, t) && g(e, t, n[t]);
62
62
  return e;
63
63
  };
64
- const R = {
64
+ const M = {
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,17 @@ const R = {
87
87
  easeOutBack: [0.34, 1.56, 0.64, 1],
88
88
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
89
89
  };
90
- M({
90
+ H({
91
91
  linear: L
92
- }, R);
93
- const U = (e, n) => {
94
- const t = e.__vccOpts || e;
95
- for (const [a, o] of n)
96
- t[a] = o;
97
- return t;
98
- }, { BROADCAST_CHANNEL: W } = T, z = {
92
+ }, M);
93
+ const { BROADCAST_CHANNEL: R } = T, U = {
99
94
  components: {
100
95
  ToolbarBase: S
101
96
  },
102
97
  props: {
103
98
  langChannel: {
104
99
  type: String,
105
- default: W.CanvasLang
100
+ default: R.CanvasLang
106
101
  },
107
102
  options: {
108
103
  type: Object,
@@ -111,7 +106,7 @@ const U = (e, n) => {
111
106
  },
112
107
  setup(e) {
113
108
  const n = r("zh_CN"), { post: t, data: a } = A({ name: e.langChannel });
114
- P(a, () => {
109
+ E(a, () => {
115
110
  n.value = a.value;
116
111
  });
117
112
  const o = [
@@ -132,17 +127,22 @@ const U = (e, n) => {
132
127
  }
133
128
  };
134
129
  }
130
+ }, W = (e, n) => {
131
+ const t = e.__vccOpts || e;
132
+ for (const [a, o] of n)
133
+ t[a] = o;
134
+ return t;
135
135
  };
136
- function F(e, n, t, a, o, s) {
137
- const l = E("toolbar-base");
138
- return N(), B(l, {
136
+ function z(e, n, t, a, o, s) {
137
+ const l = B("toolbar-base");
138
+ return P(), N(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-03b30593"]]), V = {
145
+ const G = /* @__PURE__ */ W(U, [["render", z], ["__scopeId", "data-v-d301d175"]]), 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-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)}
1
+ .change-lang-box svg[data-v-d301d175]{color:var(--te-toolbars-lang-text-color);width:18px;height:18px}.change-lang-box svg[data-v-d301d175]:hover{opacity:.75}.icon[data-v-d301d175]{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.3.0",
3
+ "version": "2.4.0-rc.0",
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.3.0",
29
- "@opentiny/tiny-engine-utils": "2.3.0",
28
+ "@opentiny/tiny-engine-common": "2.4.0-rc.0",
29
+ "@opentiny/tiny-engine-utils": "2.4.0-rc.0",
30
30
  "@vueuse/core": "^9.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.3.0",
33
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.4.0-rc.0",
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.20.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "330c4d2b319d5b5ba6ad64c270c21a7931a2e400"
42
+ "gitHead": "40df6ee51c80bf918c176f7e8ad97b6b687ddc7b"
43
43
  }