@opentiny/tiny-engine-toolbar-media 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,6 +1,6 @@
1
1
  import "./style.css";
2
- import { ref as _, computed as B, reactive as X, toRaw as Y, watch as E, watchEffect as Z, onMounted as $, onUnmounted as ee, resolveComponent as f, openBlock as v, createBlock as T, withCtx as c, createElementVNode as t, createElementBlock as W, Fragment as te, renderList as ne, normalizeClass as ie, createVNode as g, createTextVNode as I, toDisplayString as r, createCommentVNode as D } from "vue";
3
- import { Popover as oe, Input as ae, Switch as le } from "@opentiny/vue";
2
+ import { resolveComponent as f, createBlock as T, openBlock as v, withCtx as c, createElementVNode as t, createCommentVNode as W, createElementBlock as I, Fragment as X, renderList as Y, normalizeClass as Z, createVNode as g, createTextVNode as D, toDisplayString as r, ref as _, computed as B, reactive as $, toRaw as ee, watch as E, watchEffect as te, onMounted as ne, onUnmounted as ie } from "vue";
3
+ import { Switch as oe, Input as ae, Popover as le } from "@opentiny/vue";
4
4
  import { IconWebPlus as N } from "@opentiny/vue-icon";
5
5
  import { useLayout as V, useCanvas as F } from "@opentiny/tiny-engine-meta-register";
6
6
  import { ToolbarBase as se } from "@opentiny/tiny-engine-common";
@@ -11,9 +11,9 @@ const de = (h, n) => {
11
11
  return d;
12
12
  }, re = {
13
13
  components: {
14
- TinyPopover: oe,
14
+ TinyPopover: le,
15
15
  TinyInput: ae,
16
- TinySwitch: le,
16
+ TinySwitch: oe,
17
17
  ToolbarBase: se
18
18
  },
19
19
  props: {
@@ -32,7 +32,7 @@ const de = (h, n) => {
32
32
  },
33
33
  setup(h, { emit: n }) {
34
34
  let d = null, i = "", p = "";
35
- const { layoutState: w } = V(), u = _(!1), b = _(!1), m = _(!1), { getCanvasType: y } = F().canvasApi.value, C = _((y == null ? void 0 : y()) === "absolute"), o = B(() => V().getDimension()), x = B(() => o.value.scale * 100), a = X({
35
+ const { layoutState: w } = V(), u = _(!1), b = _(!1), m = _(!1), { getCanvasType: y } = F().canvasApi.value, C = _((y == null ? void 0 : y()) === "absolute"), o = B(() => V().getDimension()), x = B(() => o.value.scale * 100), a = $({
36
36
  activeIndex: 0,
37
37
  guideValue: "",
38
38
  width: "",
@@ -164,7 +164,7 @@ const de = (h, n) => {
164
164
  }, P = (e) => {
165
165
  const l = document.querySelector(".reference-text"), s = l == null ? void 0 : l.contains(e.target);
166
166
  l !== e.target && !s && (w.toolbars.visiblePopover = !1);
167
- }, k = a.media.reduce((e, l, s) => (e[l.view] = { ...Y(l), index: s }, e), {}), S = (e) => {
167
+ }, k = a.media.reduce((e, l, s) => (e[l.view] = { ...ee(l), index: s }, e), {}), S = (e) => {
168
168
  h.isCanvas ? V().setDimension({
169
169
  deviceType: e.view,
170
170
  width: e.width,
@@ -206,7 +206,7 @@ const de = (h, n) => {
206
206
  a.activeIndex = k[e].index, a.readonly = e !== "mdx";
207
207
  },
208
208
  { immediate: !0 }
209
- ), Z(() => {
209
+ ), te(() => {
210
210
  a.scaleValue = x.value.toFixed(2), p = x.value;
211
211
  }), E(
212
212
  () => o.value.width,
@@ -214,9 +214,9 @@ const de = (h, n) => {
214
214
  const l = parseInt(e, 10);
215
215
  Number.isInteger(l) && (a.width = l, i = l);
216
216
  }
217
- ), $(() => {
217
+ ), ne(() => {
218
218
  document.addEventListener("click", P);
219
- }), ee(() => {
219
+ }), ie(() => {
220
220
  document.removeEventListener("click", P);
221
221
  });
222
222
  const K = o.value.deviceType || "desktop";
@@ -254,9 +254,9 @@ function ge(h, n, d, i, p, w) {
254
254
  default: c(() => [
255
255
  t("div", ce, [
256
256
  t("div", pe, [
257
- (v(!0), W(te, null, ne(i.state.media, (o, x) => (v(), W("span", {
257
+ (v(!0), I(X, null, Y(i.state.media, (o, x) => (v(), I("span", {
258
258
  key: x,
259
- class: ie(["icon", { active: i.state.activeIndex === x, "is-rotate": o.view === "lanMobile" }]),
259
+ class: Z(["icon", { active: i.state.activeIndex === x, "is-rotate": o.view === "lanMobile" }]),
260
260
  onClick: (a) => i.setViewPort(o)
261
261
  }, [
262
262
  g(b, {
@@ -276,16 +276,16 @@ function ge(h, n, d, i, p, w) {
276
276
  t("div", me, [
277
277
  t("div", xe, [
278
278
  t("div", null, [
279
- I(r(o.title) + " ", 1),
280
- o.subTitle ? (v(), W("span", ve, [
281
- n[3] || (n[3] = I(" (")),
279
+ D(r(o.title) + " ", 1),
280
+ o.subTitle ? (v(), I("span", ve, [
281
+ n[3] || (n[3] = D(" (")),
282
282
  o.view === "desktop" ? (v(), T(u, {
283
283
  key: 0,
284
284
  name: "stars"
285
- })) : D("", !0),
285
+ })) : W("", !0),
286
286
  t("span", null, r(o.subTitle), 1),
287
- n[4] || (n[4] = I(") "))
288
- ])) : D("", !0)
287
+ n[4] || (n[4] = D(") "))
288
+ ])) : W("", !0)
289
289
  ])
290
290
  ]),
291
291
  t("div", he, r(o.content), 1)
@@ -356,13 +356,13 @@ function ge(h, n, d, i, p, w) {
356
356
  ])
357
357
  ]),
358
358
  _: 1
359
- })) : D("", !0)
359
+ })) : W("", !0)
360
360
  ])
361
361
  ]),
362
362
  _: 1
363
363
  }, 8, ["options"]);
364
364
  }
365
- const Ve = /* @__PURE__ */ de(re, [["render", ge], ["__scopeId", "data-v-59127aa7"]]), ke = {
365
+ const Ve = /* @__PURE__ */ de(re, [["render", ge], ["__scopeId", "data-v-d5d5a44d"]]), ke = {
366
366
  id: "engine.toolbars.media",
367
367
  type: "toolbars",
368
368
  title: "media",
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .toolbar-wrap[data-v-59127aa7]{display:flex;align-items:center}.toolbar-wrap .reference-text[data-v-59127aa7]{cursor:pointer;height:var(--base-top-panel-height);line-height:var(--base-top-panel-height);padding:0 7px;color:var(--ti-lowcode-toolbar-breadcrumb-color);display:inline-block}.toolbar-wrap .reference-text>span[data-v-59127aa7]:last-child{margin-left:8px}.toolbar-wrap .toolbar-icon-wrap[data-v-59127aa7]{display:flex;flex-wrap:nowrap;align-items:center;gap:6px}.toolbar-wrap .toolbar-icon-wrap .icon[data-v-59127aa7]{width:24px;height:24px;display:inline-flex;justify-content:center;align-items:center;border-radius:4px}.toolbar-wrap .toolbar-icon-wrap .icon svg[data-v-59127aa7]{cursor:pointer;color:var(--ti-lowcode-toolbar-title-color);outline:none;width:18px;height:18px;margin-top:-.5px}.toolbar-wrap .toolbar-icon-wrap .icon.active[data-v-59127aa7],.toolbar-wrap .toolbar-icon-wrap .icon[data-v-59127aa7]:hover{background:var(--ti-lowcode-toolbar-view-active-bg)}.toolbar-wrap .toolbar-icon-wrap .icon.active svg[data-v-59127aa7]{color:var(--ti-lowcode-common-primary-color)}.toolbar-wrap .more-setting .setting-item[data-v-59127aa7]{display:flex;justify-content:space-between;padding:12px}.media-content[data-v-59127aa7]{line-height:18px}.media-content .media-title[data-v-59127aa7]{font-weight:600}.media-content .content[data-v-59127aa7]{color:var(--te-common-text-secondary)}.setting-content[data-v-59127aa7]{padding:12px 8px}.content-wrap .title[data-v-59127aa7]{font-weight:600;margin-bottom:16px}.content-wrap .setting[data-v-59127aa7]{display:flex;flex-direction:column;gap:12px}.content-wrap .setting div[data-v-59127aa7]{display:flex;align-items:center;justify-content:space-between}.content-wrap .setting div label[data-v-59127aa7]{color:var(--te-common-text-secondary);min-width:64px}.content-wrap .setting div[data-v-59127aa7]:last-child{justify-content:flex-start}
1
+ .toolbar-wrap[data-v-d5d5a44d]{display:flex;align-items:center}.toolbar-wrap .reference-text[data-v-d5d5a44d]{cursor:pointer;height:var(--base-top-panel-height);line-height:var(--base-top-panel-height);padding:0 7px;color:var(--te-toolbars-media-text-color-secondary);display:inline-block}.toolbar-wrap .reference-text>span[data-v-d5d5a44d]:last-child{margin-left:8px}.toolbar-wrap .toolbar-icon-wrap[data-v-d5d5a44d]{display:flex;flex-wrap:nowrap;align-items:center;gap:6px}.toolbar-wrap .toolbar-icon-wrap .icon[data-v-d5d5a44d]{width:24px;height:24px;display:inline-flex;justify-content:center;align-items:center;border-radius:4px}.toolbar-wrap .toolbar-icon-wrap .icon svg[data-v-d5d5a44d]{cursor:pointer;color:var(--te-toolbars-media-text-color-primary);outline:none;width:18px;height:18px;margin-top:-.5px}.toolbar-wrap .toolbar-icon-wrap .icon.active[data-v-d5d5a44d],.toolbar-wrap .toolbar-icon-wrap .icon[data-v-d5d5a44d]:hover{background:var(--te-toolbars-media-bg-color-active)}.toolbar-wrap .toolbar-icon-wrap .icon.active svg[data-v-d5d5a44d]{color:var(--te-toolbars-media-text-color-checked)}.toolbar-wrap .more-setting .setting-item[data-v-d5d5a44d]{display:flex;justify-content:space-between;padding:12px}.media-content[data-v-d5d5a44d]{line-height:18px}.media-content .media-title[data-v-d5d5a44d]{font-weight:600}.media-content .content[data-v-d5d5a44d]{color:var(--te-toolbars-media-text-color-secondary)}.setting-content[data-v-d5d5a44d]{padding:12px 8px}.content-wrap .title[data-v-d5d5a44d]{font-weight:600;margin-bottom:16px}.content-wrap .setting[data-v-d5d5a44d]{display:flex;flex-direction:column;gap:12px}.content-wrap .setting div[data-v-d5d5a44d]{display:flex;align-items:center;justify-content:space-between}.content-wrap .setting div label[data-v-d5d5a44d]{color:var(--te-toolbars-media-text-color-secondary);min-width:64px}.content-wrap .setting div[data-v-d5d5a44d]:last-child{justify-content:flex-start}:root{--te-toolbars-media-text-color-secondary: var(--te-common-text-secondary);--te-toolbars-media-text-color-primary: var(--te-common-text-primary);--te-toolbars-media-text-color-checked: var(--te-common-text-checked);--te-toolbars-media-bg-color-active: var(--te-common-bg-prompt)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-media",
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-meta-register": "2.2.0"
28
+ "@opentiny/tiny-engine-common": "2.3.0",
29
+ "@opentiny/tiny-engine-meta-register": "2.3.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.2.0",
32
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.3.0",
33
33
  "@vitejs/plugin-vue": "^5.1.2",
34
34
  "@vitejs/plugin-vue-jsx": "^4.0.1",
35
35
  "vite": "^5.4.2"
36
36
  },
37
37
  "peerDependencies": {
38
- "@opentiny/vue": "^3.14.0",
39
- "@opentiny/vue-icon": "^3.14.0",
38
+ "@opentiny/vue": "^3.20.0",
39
+ "@opentiny/vue-icon": "^3.20.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "34525174aa47280dda7d42d8835ebe235e169ed6"
42
+ "gitHead": "330c4d2b319d5b5ba6ad64c270c21a7931a2e400"
43
43
  }