@opentiny/tiny-engine-toolbar-redoundo 2.6.0 → 2.7.0-alpha.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,12 +1,23 @@
1
1
  import "./style.css";
2
- import { Popover as w } from "@opentiny/vue";
3
- import { useHistory as S, useCanvas as h, HOOK_NAME as _ } from "@opentiny/tiny-engine-meta-register";
4
- import { ToolbarBase as k } from "@opentiny/tiny-engine-common";
5
- import { resolveComponent as c, createBlock as x, openBlock as C, withCtx as p, createElementVNode as d, createVNode as a, normalizeClass as u, reactive as H, watch as O, isProxy as N, toRaw as B } from "vue";
6
- const P = {
2
+ import { useHistory as C, callEntry as g, useCanvas as i, HOOK_NAME as O } from "@opentiny/tiny-engine-meta-register";
3
+ import { Popover as N } from "@opentiny/vue";
4
+ import { ToolbarBase as B } from "@opentiny/tiny-engine-common";
5
+ import { resolveComponent as v, createBlock as E, openBlock as P, withCtx as S, createElementVNode as w, createVNode as h, normalizeClass as _, isProxy as T, toRaw as j, reactive as J, watch as M } from "vue";
6
+ const V = {
7
+ id: "engine.toolbars.redoundo",
8
+ type: "toolbars",
9
+ title: "redoundo",
10
+ options: {
11
+ icon: {
12
+ undo: "undo",
13
+ redo: "redo"
14
+ },
15
+ renderType: "slot"
16
+ }
17
+ }, $ = {
7
18
  components: {
8
- TinyPopover: w,
9
- ToolbarBase: k
19
+ TinyPopover: N,
20
+ ToolbarBase: B
10
21
  },
11
22
  props: {
12
23
  options: {
@@ -15,52 +26,52 @@ const P = {
15
26
  }
16
27
  },
17
28
  setup() {
18
- return S();
29
+ return C();
19
30
  }
20
- }, T = (o, e) => {
21
- const r = o.__vccOpts || o;
22
- for (const [s, f] of e)
23
- r[s] = f;
24
- return r;
25
- }, j = { class: "redo-undo-wrap" };
26
- function E(o, e, r, s, f, R) {
27
- const y = c("svg-icon"), m = c("tiny-popover"), v = c("toolbar-base");
28
- return C(), x(v, { options: r.options }, {
29
- default: p(() => [
30
- d("span", j, [
31
- a(m, {
31
+ }, z = (e, r) => {
32
+ const c = e.__vccOpts || e;
33
+ for (const [u, x] of r)
34
+ c[u] = x;
35
+ return c;
36
+ }, A = { class: "redo-undo-wrap" };
37
+ function I(e, r, c, u, x, q) {
38
+ const H = v("svg-icon"), k = v("tiny-popover"), D = v("toolbar-base");
39
+ return P(), E(D, { options: c.options }, {
40
+ default: S(() => [
41
+ w("span", A, [
42
+ h(k, {
32
43
  trigger: "hover",
33
44
  "open-delay": 1e3,
34
45
  "popper-class": "toolbar-right-popover",
35
46
  "append-to-body": "",
36
- content: o.historyState.back ? "撤销" : "没有要撤销的"
47
+ content: e.historyState.back ? "撤销" : "没有要撤销的"
37
48
  }, {
38
- reference: p(() => [
39
- d("span", {
40
- class: u(["icon-wrap", "undo", { disabled: !o.historyState.back }]),
41
- onClick: e[0] || (e[0] = (...i) => o.back && o.back(...i))
49
+ reference: S(() => [
50
+ w("span", {
51
+ class: _(["icon-wrap", "undo", { disabled: !e.historyState.back }]),
52
+ onClick: r[0] || (r[0] = (...b) => e.back && e.back(...b))
42
53
  }, [
43
- a(y, {
44
- name: r.options.icon.undo
54
+ h(H, {
55
+ name: c.options.icon.undo
45
56
  }, null, 8, ["name"])
46
57
  ], 2)
47
58
  ]),
48
59
  _: 1
49
60
  }, 8, ["content"]),
50
- a(m, {
61
+ h(k, {
51
62
  trigger: "hover",
52
63
  "open-delay": 1e3,
53
64
  "popper-class": "toolbar-right-popover",
54
65
  "append-to-body": "",
55
- content: o.historyState.forward ? "恢复" : "没有要恢复的"
66
+ content: e.historyState.forward ? "恢复" : "没有要恢复的"
56
67
  }, {
57
- reference: p(() => [
58
- d("span", {
59
- class: u(["icon-wrap", "redo", o.historyState.forward ? "" : "disabled"]),
60
- onClick: e[1] || (e[1] = (...i) => o.forward && o.forward(...i))
68
+ reference: S(() => [
69
+ w("span", {
70
+ class: _(["icon-wrap", "redo", e.historyState.forward ? "" : "disabled"]),
71
+ onClick: r[1] || (r[1] = (...b) => e.forward && e.forward(...b))
61
72
  }, [
62
- a(y, {
63
- name: r.options.icon.redo
73
+ h(H, {
74
+ name: c.options.icon.redo
64
75
  }, null, 8, ["name"])
65
76
  ], 2)
66
77
  ]),
@@ -71,75 +82,211 @@ function E(o, e, r, s, f, R) {
71
82
  _: 1
72
83
  }, 8, ["options"]);
73
84
  }
74
- const J = /* @__PURE__ */ T(P, [["render", E], ["__scopeId", "data-v-479fa39e"]]), M = {
75
- id: "engine.toolbars.redoundo",
76
- type: "toolbars",
77
- title: "redoundo",
78
- options: {
79
- icon: {
80
- undo: "undo",
81
- redo: "redo"
82
- },
83
- renderType: "slot"
84
- }
85
- }, V = (o) => (N(o) && (o = B(o)), JSON.stringify(o)), $ = (o) => {
86
- let e;
85
+ const K = /* @__PURE__ */ z($, [["render", I], ["__scopeId", "data-v-ffef0357"]]), d = g((e) => (T(e) && (e = j(e)), JSON.stringify(e)), {
86
+ metaData: {
87
+ id: "engine.service.history.useHistory.schema2String"
88
+ },
89
+ ctx: () => ({
90
+ useCanvas: i,
91
+ schema2String: d,
92
+ string2Schema: p,
93
+ list: o,
94
+ maxLength: s,
95
+ historyState: t,
96
+ push: a,
97
+ go: n,
98
+ back: y,
99
+ forward: f,
100
+ clear: l,
101
+ addHistory: m
102
+ })
103
+ }), p = g((e) => {
104
+ let r;
87
105
  try {
88
- e = JSON.parse(o);
106
+ r = JSON.parse(e);
89
107
  } catch {
90
- e = {};
108
+ r = {};
91
109
  }
92
- return e;
93
- }, n = [], b = 5, t = H({
110
+ return r;
111
+ }, {
112
+ metaData: {
113
+ id: "engine.service.history.useHistory.string2Schema"
114
+ },
115
+ ctx: () => ({
116
+ useCanvas: i,
117
+ schema2String: d,
118
+ string2Schema: p,
119
+ list: o,
120
+ maxLength: s,
121
+ historyState: t,
122
+ push: a,
123
+ go: n,
124
+ back: y,
125
+ forward: f,
126
+ clear: l,
127
+ addHistory: m
128
+ })
129
+ }), o = [], s = 5, t = J({
94
130
  index: 0,
95
131
  back: !1,
96
132
  forward: !1
97
- }), g = (o) => {
98
- let e = n.length;
99
- t.index < e - 1 && (n.splice(t.index + 1), e = n.length), e >= b && n.splice(0, e - b + 1), n.push(V(o)), t.index = n.length - 1;
100
- }, l = (o, e) => {
101
- t.index = t.index + o;
102
- const { pageState: r, resetCanvasState: s } = h();
103
- s({ ...r, pageSchema: $(n[t.index]) }), typeof e == "boolean" && n.splice(1, 1);
104
- }, z = () => {
105
- t.back && l(-1);
106
- }, A = () => {
107
- t.forward && l(1);
108
- }, D = () => {
109
- n.splice(0), Object.assign(t, {
133
+ }), a = g((e) => {
134
+ let r = o.length;
135
+ t.index < r - 1 && (o.splice(t.index + 1), r = o.length), r >= s && o.splice(0, r - s + 1), o.push(d(e)), t.index = o.length - 1;
136
+ }, {
137
+ metaData: {
138
+ id: "engine.service.history.useHistory.push"
139
+ },
140
+ ctx: () => ({
141
+ useCanvas: i,
142
+ schema2String: d,
143
+ string2Schema: p,
144
+ list: o,
145
+ maxLength: s,
146
+ historyState: t,
147
+ push: a,
148
+ go: n,
149
+ back: y,
150
+ forward: f,
151
+ clear: l,
152
+ addHistory: m
153
+ })
154
+ }), n = g((e, r) => {
155
+ t.index = t.index + e;
156
+ const {
157
+ pageState: c,
158
+ resetCanvasState: u
159
+ } = i();
160
+ u({
161
+ ...c,
162
+ pageSchema: p(o[t.index])
163
+ }), typeof r == "boolean" && o.splice(1, 1);
164
+ }, {
165
+ metaData: {
166
+ id: "engine.service.history.useHistory.go"
167
+ },
168
+ ctx: () => ({
169
+ useCanvas: i,
170
+ schema2String: d,
171
+ string2Schema: p,
172
+ list: o,
173
+ maxLength: s,
174
+ historyState: t,
175
+ push: a,
176
+ go: n,
177
+ back: y,
178
+ forward: f,
179
+ clear: l,
180
+ addHistory: m
181
+ })
182
+ }), y = g(() => {
183
+ t.back && n(-1);
184
+ }, {
185
+ metaData: {
186
+ id: "engine.service.history.useHistory.back"
187
+ },
188
+ ctx: () => ({
189
+ useCanvas: i,
190
+ schema2String: d,
191
+ string2Schema: p,
192
+ list: o,
193
+ maxLength: s,
194
+ historyState: t,
195
+ push: a,
196
+ go: n,
197
+ back: y,
198
+ forward: f,
199
+ clear: l,
200
+ addHistory: m
201
+ })
202
+ }), f = g(() => {
203
+ t.forward && n(1);
204
+ }, {
205
+ metaData: {
206
+ id: "engine.service.history.useHistory.forward"
207
+ },
208
+ ctx: () => ({
209
+ useCanvas: i,
210
+ schema2String: d,
211
+ string2Schema: p,
212
+ list: o,
213
+ maxLength: s,
214
+ historyState: t,
215
+ push: a,
216
+ go: n,
217
+ back: y,
218
+ forward: f,
219
+ clear: l,
220
+ addHistory: m
221
+ })
222
+ }), l = g(() => {
223
+ o.splice(0), Object.assign(t, {
110
224
  index: 0,
111
225
  back: !1,
112
226
  forward: !1
113
227
  });
114
- }, I = (o) => {
115
- o ? (D(), g(o)) : g(h().getSchema());
116
- };
117
- O(
118
- () => t.index,
119
- (o) => {
120
- t.back = o > 0, t.forward = o < n.length - 1;
121
- }
122
- );
123
- const K = () => ({
228
+ }, {
229
+ metaData: {
230
+ id: "engine.service.history.useHistory.clear"
231
+ },
232
+ ctx: () => ({
233
+ useCanvas: i,
234
+ schema2String: d,
235
+ string2Schema: p,
236
+ list: o,
237
+ maxLength: s,
238
+ historyState: t,
239
+ push: a,
240
+ go: n,
241
+ back: y,
242
+ forward: f,
243
+ clear: l,
244
+ addHistory: m
245
+ })
246
+ }), m = g((e) => {
247
+ e ? (l(), a(e)) : a(i().getSchema());
248
+ }, {
249
+ metaData: {
250
+ id: "engine.service.history.useHistory.addHistory"
251
+ },
252
+ ctx: () => ({
253
+ useCanvas: i,
254
+ schema2String: d,
255
+ string2Schema: p,
256
+ list: o,
257
+ maxLength: s,
258
+ historyState: t,
259
+ push: a,
260
+ go: n,
261
+ back: y,
262
+ forward: f,
263
+ clear: l,
264
+ addHistory: m
265
+ })
266
+ });
267
+ M(() => t.index, (e) => {
268
+ t.back = e > 0, t.forward = e < o.length - 1;
269
+ });
270
+ const L = () => ({
124
271
  historyState: t,
125
- back: z,
126
- forward: A,
127
- go: l,
128
- addHistory: I
129
- }), L = {
272
+ back: y,
273
+ forward: f,
274
+ go: n,
275
+ addHistory: m
276
+ }), R = {
130
277
  id: "engine.service.history",
131
278
  type: "MetaService",
132
- apis: K(),
279
+ apis: L(),
133
280
  composable: {
134
- name: _.useHistory
281
+ name: O.useHistory
135
282
  }
136
- }, W = {
137
- ...M,
138
- entry: J,
139
- metas: [L]
283
+ }, X = {
284
+ ...V,
285
+ entry: K,
286
+ metas: [R]
140
287
  };
141
288
  export {
142
- L as HistoryService,
143
- W as default
289
+ R as HistoryService,
290
+ X as default
144
291
  };
145
292
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/Main.vue","../meta.js","../src/composable/useHistory.ts","../src/composable/index.ts","../index.ts"],"sourcesContent":["<template>\n <toolbar-base :options=\"options\">\n <template #default>\n <span class=\"redo-undo-wrap\">\n <tiny-popover\n trigger=\"hover\"\n :open-delay=\"1000\"\n popper-class=\"toolbar-right-popover\"\n append-to-body\n :content=\"historyState.back ? '撤销' : '没有要撤销的'\"\n >\n <template #reference>\n <span :class=\"['icon-wrap', 'undo', { disabled: !historyState.back }]\" @click=\"back\">\n <svg-icon :name=\"options.icon.undo\"></svg-icon>\n </span>\n </template>\n </tiny-popover>\n <tiny-popover\n trigger=\"hover\"\n :open-delay=\"1000\"\n popper-class=\"toolbar-right-popover\"\n append-to-body\n :content=\"historyState.forward ? '恢复' : '没有要恢复的'\"\n >\n <template #reference>\n <span :class=\"['icon-wrap', 'redo', !historyState.forward ? 'disabled' : '']\" @click=\"forward\">\n <svg-icon :name=\"options.icon.redo\"></svg-icon>\n </span>\n </template>\n </tiny-popover>\n </span>\n </template>\n </toolbar-base>\n</template>\n\n<script lang=\"ts\">\nimport { Popover } from '@opentiny/vue'\nimport { useHistory } from '@opentiny/tiny-engine-meta-register'\nimport { ToolbarBase } from '@opentiny/tiny-engine-common'\n\nexport default {\n components: {\n TinyPopover: Popover,\n ToolbarBase\n },\n props: {\n options: {\n type: Object,\n default: () => ({})\n }\n },\n setup() {\n return useHistory()\n }\n}\n</script>\n\n<style lang=\"less\" scoped>\n.redo-undo-wrap {\n display: flex;\n\n :deep(.icon-wrap) {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n width: 32px;\n border-radius: 6px;\n svg {\n color: var(--te-toolbars-redoundo-text-color);\n font-size: 20px;\n }\n &.disabled {\n cursor: not-allowed;\n svg {\n color: var(--te-toolbars-redoundo-text-color-disabled);\n }\n }\n &:not(.disabled):hover {\n background: var(--te-toolbars-redoundo-bg-color-active);\n svg {\n color: var(--te-toolbars-redoundo-icon-color-hover);\n }\n }\n &.redo {\n margin-left: -5px;\n }\n }\n}\n</style>\n","export default {\n id: 'engine.toolbars.redoundo',\n type: 'toolbars',\n title: 'redoundo',\n options: {\n icon: {\n undo: 'undo',\n redo: 'redo'\n },\n renderType: 'slot'\n }\n}\n","/**\n * Copyright (c) 2023 - present TinyEngine Authors.\n * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.\n *\n * Use of this source code is governed by an MIT-style license.\n *\n * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,\n * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR\n * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.\n *\n */\n\nimport { reactive, isProxy, toRaw, watch } from 'vue'\nimport { useCanvas } from '@opentiny/tiny-engine-meta-register'\n\nconst schema2String = (schema: any) => {\n if (isProxy(schema)) {\n schema = toRaw(schema)\n }\n\n return JSON.stringify(schema)\n}\n\nconst string2Schema = (string: string) => {\n let schema\n\n try {\n schema = JSON.parse(string)\n } catch (error) {\n schema = {}\n }\n\n return schema\n}\n\nconst list: string[] = []\nconst maxLength = 5\nconst historyState = reactive({\n index: 0,\n back: false,\n forward: false\n})\n\nconst push = (schema: any) => {\n let length = list.length\n\n // 处于撤销中,又修改了 schema ,需要将后面的历史记录清除\n if (historyState.index < length - 1) {\n list.splice(historyState.index + 1)\n length = list.length\n }\n\n // 历史记录超过限制,删除前面的记录\n if (length >= maxLength) {\n list.splice(0, length - maxLength + 1)\n }\n\n list.push(schema2String(schema))\n historyState.index = list.length - 1\n}\n\nconst go = (addend: number, valid?: boolean) => {\n historyState.index = historyState.index + addend\n const { pageState, resetCanvasState } = useCanvas()\n resetCanvasState({ ...pageState, pageSchema: string2Schema(list[historyState.index]) })\n\n // 不是锁定状态,撤销操作后,传递第二个标识位,将 list 的长度减一,置灰 undoredo 操作按钮\n if (typeof valid === 'boolean') {\n list.splice(1, 1)\n }\n}\n\nconst back = () => {\n if (historyState.back) {\n go(-1)\n }\n}\n\nconst forward = () => {\n if (historyState.forward) {\n go(1)\n }\n}\n\nconst clear = () => {\n list.splice(0)\n Object.assign(historyState, {\n index: 0,\n back: false,\n forward: false\n })\n}\n\nconst addHistory = (schema: any) => {\n if (!schema) {\n push(useCanvas().getSchema())\n } else {\n clear()\n // 初始 schema 需要设置为第一条历史记录\n push(schema)\n }\n}\n\n// 监控下标,判断是否允许前进后退标志\nwatch(\n () => historyState.index,\n (value) => {\n historyState.back = value > 0\n historyState.forward = value < list.length - 1\n }\n)\n\nexport default () => {\n return {\n historyState,\n back,\n forward,\n go,\n addHistory\n }\n}\n","import { HOOK_NAME } from '@opentiny/tiny-engine-meta-register'\nimport useHistory from './useHistory'\n\nexport const HistoryService = {\n id: 'engine.service.history',\n type: 'MetaService',\n apis: useHistory(),\n composable: {\n name: HOOK_NAME.useHistory\n }\n}\n","/**\n * Copyright (c) 2023 - present TinyEngine Authors.\n * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.\n *\n * Use of this source code is governed by an MIT-style license.\n *\n * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,\n * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR\n * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.\n *\n */\n\nimport entry from './src/Main.vue'\nimport metaData from './meta'\nimport { HistoryService } from './src/composable'\nimport './src/styles/vars.less'\n\nexport default {\n ...metaData,\n entry,\n metas: [HistoryService]\n}\n\nexport { HistoryService }\n"],"names":["_sfc_main","Popover","ToolbarBase","useHistory","_hoisted_1","_createBlock","_component_toolbar_base","$props","_withCtx","_createElementVNode","_createVNode","_component_tiny_popover","_ctx","_normalizeClass","_cache","args","_component_svg_icon","metaData","schema2String","schema","isProxy","toRaw","string2Schema","string","list","maxLength","historyState","reactive","push","length","go","addend","valid","pageState","resetCanvasState","useCanvas","back","forward","clear","addHistory","watch","value","HistoryService","HOOK_NAME","index","entry"],"mappings":";;;;;AAwCA,MAAAA,IAAe;AAAA,EACb,YAAY;AAAA,IACV,aAAaC;AAAA,IACb,aAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IAAC;AAAA,EACnB;AAAA,EAEF,QAAQ;AACN,WAAOC,EAAA;AAAA,EAAW;AAEtB;;;;;GAnDYC,IAAA,EAAA,OAAM,iBAAA;;;cAFhBC,EA+BeC,GAAA,EA/BA,SAASC,EAAA,WAAO;AAAA,IAClB,SAAOC,EAChB,MA2BO;AAAA,MA3BPC,EA2BO,QA3BPL,GA2BO;AAAA,QA1BLM,EAYeC,GAAA;AAAA,UAXb,SAAQ;AAAA,UACP,cAAY;AAAA,UACb,gBAAa;AAAA,UACb,kBAAA;AAAA,UACC,SAASC,eAAa,OAAI,OAAA;AAAA,QAAA,GAAA;AAAA,UAEhB,WAASJ,EAClB,MAEO;AAA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e,MAAU;AACT,IAAAf,EAAa,OAAOe,IAAQ,GAC5Bf,EAAa,UAAUe,IAAQjB,EAAK,SAAS;AAAA,EAAA;AAEjD;AAEA,MAAArB,IAAe,OACN;AAAA,EACL,cAAAuB;AAAA,EACA,MAAAU;AAAA,EACA,SAAAC;AAAA,EACA,IAAAP;AAAA,EACA,YAAAS;AAAA,ICnHSG,IAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAMvC,EAAA;AAAA,EACN,YAAY;AAAA,IACV,MAAMwC,EAAU;AAAA,EAAA;AAEpB,GCOAC,IAAe;AAAA,EACb,GAAG3B;AAAA,EACH,OAAA4B;AAAA,EACA,OAAO,CAACH,CAAc;AACxB;"}
1
+ {"version":3,"file":"index.js","sources":["../meta.js","../src/composable/index.ts","../index.ts"],"sourcesContent":["export default {\n id: 'engine.toolbars.redoundo',\n type: 'toolbars',\n title: 'redoundo',\n options: {\n icon: {\n undo: 'undo',\n redo: 'redo'\n },\n renderType: 'slot'\n }\n}\n","import { HOOK_NAME } from '@opentiny/tiny-engine-meta-register'\nimport useHistory from './useHistory'\n\nexport const HistoryService = {\n id: 'engine.service.history',\n type: 'MetaService',\n apis: useHistory(),\n composable: {\n name: HOOK_NAME.useHistory\n }\n}\n","/**\n * Copyright (c) 2023 - present TinyEngine Authors.\n * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.\n *\n * Use of this source code is governed by an MIT-style license.\n *\n * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,\n * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR\n * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.\n *\n */\n\nimport entry from './src/Main.vue'\nimport metaData from './meta'\nimport { HistoryService } from './src/composable'\nimport './src/styles/vars.less'\n\nexport default {\n ...metaData,\n entry,\n metas: [HistoryService]\n}\n\nexport { HistoryService }\n"],"names":["metaData","HistoryService","useHistory","HOOK_NAME","index","entry"],"mappings":";;;;;AAAA,MAAeA,IAAA;AAAA,EACb,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM;AAAA,IACP;AAAA,IACD,YAAY;AAAA,EAChB;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICRaC,IAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAMC,EAAW;AAAA,EACjB,YAAY;AAAA,IACV,MAAMC,EAAU;AAAA,EAAA;AAEpB,GCOeC,IAAA;AAAA,EACb,GAAGJ;AAAA,EACH,OAAAK;AAAA,EACA,OAAO,CAACJ,CAAc;AACxB;"}
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .redo-undo-wrap[data-v-479fa39e]{display:flex}.redo-undo-wrap[data-v-479fa39e] .icon-wrap{display:inline-flex;align-items:center;justify-content:center;height:32px;width:32px;border-radius:6px}.redo-undo-wrap[data-v-479fa39e] .icon-wrap svg{color:var(--te-toolbars-redoundo-text-color);font-size:20px}.redo-undo-wrap[data-v-479fa39e] .icon-wrap.disabled{cursor:not-allowed}.redo-undo-wrap[data-v-479fa39e] .icon-wrap.disabled svg{color:var(--te-toolbars-redoundo-text-color-disabled)}.redo-undo-wrap[data-v-479fa39e] .icon-wrap:not(.disabled):hover{background:var(--te-toolbars-redoundo-bg-color-active)}.redo-undo-wrap[data-v-479fa39e] .icon-wrap:not(.disabled):hover svg{color:var(--te-toolbars-redoundo-icon-color-hover)}.redo-undo-wrap[data-v-479fa39e] .icon-wrap.redo{margin-left:-5px}:root{--te-toolbars-redoundo-text-color: var(--te-common-text-primary);--te-toolbars-redoundo-text-color-disabled: var(--te-common-text-disabled);--te-toolbars-redoundo-bg-color-active: var(--te-common-bg-prompt);--te-toolbars-redoundo-icon-color-hover: var(--te-common-icon-hover)}
1
+ .redo-undo-wrap[data-v-ffef0357]{display:flex}.redo-undo-wrap[data-v-ffef0357] .icon-wrap{display:inline-flex;align-items:center;justify-content:center;height:32px;width:32px;border-radius:6px}.redo-undo-wrap[data-v-ffef0357] .icon-wrap svg{color:var(--te-toolbars-redoundo-text-color);font-size:20px}.redo-undo-wrap[data-v-ffef0357] .icon-wrap.disabled{cursor:not-allowed}.redo-undo-wrap[data-v-ffef0357] .icon-wrap.disabled svg{color:var(--te-toolbars-redoundo-text-color-disabled)}.redo-undo-wrap[data-v-ffef0357] .icon-wrap:not(.disabled):hover{background:var(--te-toolbars-redoundo-bg-color-active)}.redo-undo-wrap[data-v-ffef0357] .icon-wrap:not(.disabled):hover svg{color:var(--te-toolbars-redoundo-icon-color-hover)}.redo-undo-wrap[data-v-ffef0357] .icon-wrap.redo{margin-left:-5px}:root{--te-toolbars-redoundo-text-color: var(--te-common-text-primary);--te-toolbars-redoundo-text-color-disabled: var(--te-common-text-disabled);--te-toolbars-redoundo-bg-color-active: var(--te-common-bg-prompt);--te-toolbars-redoundo-icon-color-hover: var(--te-common-icon-hover)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-redoundo",
3
- "version": "2.6.0",
3
+ "version": "2.7.0-alpha.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -25,11 +25,11 @@
25
25
  "license": "MIT",
26
26
  "homepage": "https://opentiny.design/tiny-engine",
27
27
  "dependencies": {
28
- "@opentiny/tiny-engine-common": "2.6.0",
29
- "@opentiny/tiny-engine-meta-register": "2.6.0"
28
+ "@opentiny/tiny-engine-common": "2.7.0-alpha.0",
29
+ "@opentiny/tiny-engine-meta-register": "2.7.0-alpha.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.6.0",
32
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.7.0-alpha.0",
33
33
  "@vitejs/plugin-vue": "^5.1.2",
34
34
  "@vitejs/plugin-vue-jsx": "^4.0.1",
35
35
  "vite": "^5.4.2"
@@ -38,5 +38,5 @@
38
38
  "@opentiny/vue": "^3.20.0",
39
39
  "vue": "^3.4.15"
40
40
  },
41
- "gitHead": "f3035326111f06f5e9b99da2ee75c4089d5c49e8"
41
+ "gitHead": "d5cbb9c02048aa7d8f8c88ac77e09d4654398d86"
42
42
  }