lt-ppt 1.0.5 → 1.0.7

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.
@@ -4,8 +4,8 @@ var Zn = (e, t, n) => k7e(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as E7e from "vue";
5
5
  import { markRaw as We, openBlock as k, createElementBlock as Z, createElementVNode as F, defineComponent as Le, ref as le, onBeforeMount as D7e, onMounted as Vt, createBlock as xe, Transition as QT, withCtx as ae, createCommentVNode as Pe, toDisplayString as ie, createVNode as D, render as _g, computed as ge, onUnmounted as Un, Fragment as Fe, renderList as Ye, unref as G, useTemplateRef as gt, renderSlot as rr, withModifiers as xt, normalizeClass as Be, Teleport as nye, withDirectives as et, normalizeStyle as me, vShow as Qp, watch as ht, toRef as wO, resolveDynamicComponent as ef, provide as Kp, inject as i0, resolveDirective as Wn, createTextVNode as Ie, nextTick as Zr, onBeforeUnmount as ZU, watchEffect as sx, withKeys as Vc, vModelText as X7e, createStaticVNode as V7e, isRef as bue, mergeProps as U7e } from "vue";
6
6
  import { storeToRefs as Me } from "./pinia-CVat9nJz.js";
7
- import { l as pr, g as rye, e as Lt, f as w0, n as Ct, d as LO, a as tt, c as ze, u as Gi, b as aye, N as Lr, S as Uc, T as Da, h as di, D as TO, F as lr, i as QU, M as W7e, j as oye, A as iye, P as lx, k as sye, m as B7e, R as PO, o as TD, p as Y7e, q as lye, r as cye, s as uye, t as yo, v as Z7e, w as Q7e, x as K7e, y as H7e, z as G7e, B as z7e, C as J7e, E as j7e, G as $7e, H as fye, I as q7e, J as KT, K as eNe, L as tNe, O as is, Q as qf, U as xue, V as nNe, W as rNe, X as aNe, Y as oNe, Z as iNe, _ as xi, $ as p6 } from "./screen-Brc46n0s.js";
8
- import { _ as _e } from "./lib-CpyChr-3.js";
7
+ import { l as pr, g as rye, e as Lt, f as w0, n as Ct, d as LO, a as tt, c as ze, u as Gi, b as aye, N as Lr, S as Uc, T as Da, h as di, D as TO, F as lr, i as QU, M as W7e, j as oye, A as iye, P as lx, k as sye, m as B7e, R as PO, o as TD, p as Y7e, q as lye, r as cye, s as uye, t as yo, v as Z7e, w as Q7e, x as K7e, y as H7e, z as G7e, B as z7e, C as J7e, E as j7e, G as $7e, H as fye, I as q7e, J as KT, K as eNe, L as tNe, O as is, Q as qf, U as xue, V as nNe, W as rNe, X as aNe, Y as oNe, Z as iNe, _ as xi, $ as p6 } from "./screen-Go12CR8G.js";
8
+ import { _ as _e } from "./lib-CsmPWd0C.js";
9
9
  import { t as sNe } from "./tippy.esm-Dos-q4Dz.js";
10
10
  import { useI18n as yn } from "./vue-i18n-R6dI71u7.js";
11
11
  const tR = (e, t) => pr.padStart("" + e, t, "0"), lNe = () => !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i), cNe = (e) => /^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(e);
@@ -17511,8 +17511,8 @@ const yFe = [
17511
17511
  { label: "恢复", value: "Ctrl + Y" },
17512
17512
  { label: "删除", value: "Delete / Backspace" },
17513
17513
  { label: "多选", value: "按住 Ctrl 或 Shift" },
17514
- { label: "打开搜索替换", value: "Ctrl + F" },
17515
- { label: "打印", value: "Ctrl + P" },
17514
+ // { label: '打开搜索替换', value: 'Ctrl + F' },
17515
+ // { label: '打印', value: 'Ctrl + P' },
17516
17516
  { label: "关闭弹窗", value: "ESC" }
17517
17517
  ]
17518
17518
  },
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as k, resolveComponent as P, openBlock as d, createElementBlock as c, Fragment as x, renderList as A, withModifiers as p, normalizeClass as L, createElementVNode as C, toDisplayString as I, createCommentVNode as v, createBlock as O, computed as S, normalizeStyle as U, createVNode as D, render as w } from "vue";
2
- import { _ as b } from "./lib-CpyChr-3.js";
2
+ import { _ as b } from "./lib-CsmPWd0C.js";
3
3
  import { t as G } from "./tippy.esm-Dos-q4Dz.js";
4
4
  const R = { class: "menu-content" }, X = ["onClick"], V = { class: "text" }, W = {
5
5
  key: 0,
@@ -1,4 +1,4 @@
1
- import { u as a, a as o, b as r, c as S, d as t } from "./screen-Brc46n0s.js";
1
+ import { u as a, a as o, b as r, c as S, d as t } from "./screen-Go12CR8G.js";
2
2
  export {
3
3
  a as useKeyboardStore,
4
4
  o as useMainStore,
@@ -1,5 +1,5 @@
1
- import { defineComponent as A, ref as w, computed as x, onMounted as L, onBeforeUnmount as v, watch as F, openBlock as I, createElementBlock as R, normalizeStyle as B } from "vue";
2
- const E = {
1
+ import { defineComponent as P, ref as f, computed as k, onMounted as A, onBeforeUnmount as w, watch as x, openBlock as L, createElementBlock as v, normalizeStyle as F } from "vue";
2
+ const I = {
3
3
  common: {
4
4
  close: "关闭",
5
5
  cancel: "取消",
@@ -900,7 +900,7 @@ const E = {
900
900
  select: {
901
901
  search: "搜索"
902
902
  }
903
- }, D = {
903
+ }, R = {
904
904
  common: {
905
905
  close: "Close",
906
906
  cancel: "Cancel",
@@ -1773,97 +1773,98 @@ const E = {
1773
1773
  select: {
1774
1774
  search: "Search"
1775
1775
  }
1776
- }, O = /* @__PURE__ */ A({
1776
+ }, B = /* @__PURE__ */ P({
1777
1777
  __name: "LtPPT",
1778
1778
  props: {
1779
1779
  initData: {},
1780
1780
  onUploadFile: {},
1781
+ onChange: {},
1782
+ onSave: {},
1781
1783
  locale: { default: "zh-CN" },
1782
1784
  width: { default: "100%" },
1783
1785
  height: { default: "100%" },
1784
1786
  readonly: { type: Boolean, default: !1 }
1785
1787
  },
1786
- emits: ["change", "save"],
1787
- setup(a, { expose: r, emit: i }) {
1788
- const t = a, d = i, n = w();
1789
- let o = null, l = null, p = null, u = null;
1790
- const T = x(() => ({
1791
- width: t.width,
1792
- height: t.height
1793
- })), h = async (e) => {
1794
- if (!n.value) return;
1788
+ setup(a, { expose: r }) {
1789
+ const e = a, o = f();
1790
+ let i = null, l = null, d = null, c = null;
1791
+ const h = k(() => ({
1792
+ width: e.width,
1793
+ height: e.height
1794
+ })), u = async (t) => {
1795
+ if (!o.value) return;
1795
1796
  const [
1796
- { createApp: s },
1797
- { createPinia: b },
1798
- { createI18n: y },
1799
- { default: P },
1800
- { default: f },
1801
- S
1797
+ { createApp: n },
1798
+ { createPinia: C },
1799
+ { createI18n: S },
1800
+ { default: T },
1801
+ { default: b },
1802
+ g
1802
1803
  ] = await Promise.all([
1803
1804
  import("vue"),
1804
1805
  import("./pinia-CVat9nJz.js"),
1805
1806
  import("./vue-i18n-R6dI71u7.js"),
1806
- import("./InnerApp-7VtOtiso.js"),
1807
- import("./index-B5Uj8PFq.js"),
1808
- import("./index-DlNH2qkd.js")
1807
+ import("./InnerApp-zm87Wqh3.js"),
1808
+ import("./index-CIARo4V3.js"),
1809
+ import("./index-DV1EYy4o.js")
1809
1810
  ]);
1810
- p = S.useSlidesStore, u = S.useScreenStore;
1811
- const c = document.createElement("div");
1812
- c.style.width = "100%", c.style.height = "100%", n.value.appendChild(c), o = s(P, {
1813
- initData: t.initData,
1814
- onUploadFile: t.onUploadFile,
1815
- readonly: t.readonly,
1816
- onChange: (g) => d("change", g),
1817
- onSave: (g) => d("save", g)
1818
- }), l = b(), o.use(l);
1819
- const k = y({
1811
+ d = g.useSlidesStore, c = g.useScreenStore;
1812
+ const s = document.createElement("div");
1813
+ s.style.width = "100%", s.style.height = "100%", o.value.appendChild(s), i = n(T, {
1814
+ initData: e.initData,
1815
+ onUploadFile: e.onUploadFile,
1816
+ readonly: e.readonly,
1817
+ onChange: e.onChange,
1818
+ onSave: e.onSave
1819
+ }), l = C(), i.use(l);
1820
+ const y = S({
1820
1821
  legacy: !1,
1821
- locale: e,
1822
+ locale: t,
1822
1823
  fallbackLocale: "zh-CN",
1823
- messages: { "zh-CN": E, en: D }
1824
+ messages: { "zh-CN": I, en: R }
1824
1825
  });
1825
- o.use(k), o.use(f), o.mount(c);
1826
- }, C = () => {
1827
- o && (o.unmount(), o = null, l = null), n.value && (n.value.innerHTML = "");
1826
+ i.use(y), i.use(b), i.mount(s);
1827
+ }, m = () => {
1828
+ i && (i.unmount(), i = null, l = null), o.value && (o.value.innerHTML = "");
1828
1829
  };
1829
- L(() => {
1830
- h(t.locale);
1831
- }), v(() => {
1832
- C();
1833
- }), F(() => t.locale, (e) => {
1834
- C(), h(e);
1830
+ A(() => {
1831
+ u(e.locale);
1832
+ }), w(() => {
1833
+ m();
1834
+ }), x(() => e.locale, (t) => {
1835
+ m(), u(t);
1835
1836
  });
1836
- const m = () => !l || !p ? null : p(l);
1837
+ const p = () => !l || !d ? null : d(l);
1837
1838
  return r({
1838
1839
  getSlides: () => {
1839
- const e = m();
1840
- return e ? JSON.parse(JSON.stringify(e.slides)) : [];
1840
+ const t = p();
1841
+ return t ? JSON.parse(JSON.stringify(t.slides)) : [];
1841
1842
  },
1842
- setSlides: (e) => {
1843
- const s = m();
1844
- s && s.setSlides(e);
1843
+ setSlides: (t) => {
1844
+ const n = p();
1845
+ n && n.setSlides(t);
1845
1846
  },
1846
1847
  startScreening: () => {
1847
- if (!l || !u) return;
1848
- u(l).setScreening(!0);
1848
+ if (!l || !c) return;
1849
+ c(l).setScreening(!0);
1849
1850
  },
1850
1851
  getCurrentIndex: () => {
1851
- const e = m();
1852
- return e ? e.slideIndex : 0;
1852
+ const t = p();
1853
+ return t ? t.slideIndex : 0;
1853
1854
  }
1854
- }), (e, s) => (I(), R("div", {
1855
+ }), (t, n) => (L(), v("div", {
1855
1856
  ref_key: "containerRef",
1856
- ref: n,
1857
+ ref: o,
1857
1858
  class: "lt-ppt-container",
1858
- style: B(T.value)
1859
+ style: F(h.value)
1859
1860
  }, null, 4));
1860
1861
  }
1861
- }), z = (a, r) => {
1862
- const i = a.__vccOpts || a;
1863
- for (const [t, d] of r)
1864
- i[t] = d;
1865
- return i;
1866
- }, U = /* @__PURE__ */ z(O, [["__scopeId", "data-v-2ec056e7"]]), M = [
1862
+ }), E = (a, r) => {
1863
+ const e = a.__vccOpts || a;
1864
+ for (const [o, i] of r)
1865
+ e[o] = i;
1866
+ return e;
1867
+ }, z = /* @__PURE__ */ E(B, [["__scopeId", "data-v-d49b7b3b"]]), D = [
1867
1868
  "SourceHanSans",
1868
1869
  "SourceHanSerif",
1869
1870
  "WenDingPLSongTi",
@@ -1892,18 +1893,18 @@ const E = {
1892
1893
  "Montserrat",
1893
1894
  "SourceSansPro",
1894
1895
  "Merriweather"
1895
- ], G = (a = "/fonts") => {
1896
+ ], M = (a = "/fonts") => {
1896
1897
  if (typeof document > "u") return;
1897
- const r = a.replace(/\/$/, ""), i = document.createElement("style");
1898
- i.textContent = M.map(
1899
- (t) => `@font-face { font-display: swap; font-family: ${t}; src: url('${r}/${t}.woff2') format('woff2'); }`
1898
+ const r = a.replace(/\/$/, ""), e = document.createElement("style");
1899
+ e.textContent = D.map(
1900
+ (o) => `@font-face { font-display: swap; font-family: ${o}; src: url('${r}/${o}.woff2') format('woff2'); }`
1900
1901
  ).join(`
1901
- `), document.head.appendChild(i);
1902
+ `), document.head.appendChild(e);
1902
1903
  };
1903
1904
  export {
1904
- U as L,
1905
- z as _,
1906
- D as e,
1907
- G as l,
1908
- E as z
1905
+ z as L,
1906
+ E as _,
1907
+ R as e,
1908
+ M as l,
1909
+ I as z
1909
1910
  };