lt-ppt 1.0.23 → 1.0.25

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.
@@ -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-kEQAeWOh.js";
2
+ import { _ as b } from "./lib-HoYdxa9t.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,
@@ -43,7 +43,7 @@ const R = { class: "menu-content" }, X = ["onClick"], V = { class: "text" }, W =
43
43
  ]);
44
44
  };
45
45
  }
46
- }), z = /* @__PURE__ */ b($, [["__scopeId", "data-v-ced97660"]]), B = /* @__PURE__ */ k({
46
+ }), z = /* @__PURE__ */ b($, [["__scopeId", "data-v-124d579c"]]), B = /* @__PURE__ */ k({
47
47
  __name: "index",
48
48
  props: {
49
49
  axis: {},
@@ -1,4 +1,4 @@
1
- import { u as a, a as o, b as r, c as S, d as t } from "./screen-DTsHYbfn.js";
1
+ import { u as a, a as o, b as r, c as S, d as t } from "./screen-ChAm5xVM.js";
2
2
  export {
3
3
  a as useKeyboardStore,
4
4
  o as useMainStore,
@@ -1,5 +1,5 @@
1
- import { inject as k, ref as c, defineComponent as w, computed as L, onMounted as I, onBeforeUnmount as x, watch as F, openBlock as A, createElementBlock as R, normalizeStyle as v } from "vue";
2
- const O = {
1
+ import { inject as L, ref as d, defineComponent as I, computed as x, onMounted as F, onBeforeUnmount as A, watch as C, openBlock as R, createElementBlock as v, normalizeStyle as O } from "vue";
2
+ const B = {
3
3
  common: {
4
4
  close: "关闭",
5
5
  cancel: "取消",
@@ -1148,7 +1148,7 @@ const O = {
1148
1148
  latex: "公式"
1149
1149
  }
1150
1150
  }
1151
- }, B = {
1151
+ }, D = {
1152
1152
  common: {
1153
1153
  close: "Close",
1154
1154
  cancel: "Cancel",
@@ -2269,41 +2269,41 @@ const O = {
2269
2269
  latex: "Formula"
2270
2270
  }
2271
2271
  }
2272
- }, S = Symbol("lt-ppt-i18n"), D = { "zh-CN": O, en: B };
2273
- function C(i, a = "") {
2272
+ }, f = Symbol("lt-ppt-i18n"), E = { "zh-CN": B, en: D };
2273
+ function b(i, a = "") {
2274
2274
  return Object.entries(i).reduce((e, [t, o]) => {
2275
- const n = a ? `${a}.${t}` : t;
2276
- return o && typeof o == "object" && !Array.isArray(o) ? Object.assign(e, C(o, n)) : e[n] = String(o), e;
2275
+ const l = a ? `${a}.${t}` : t;
2276
+ return o && typeof o == "object" && !Array.isArray(o) ? Object.assign(e, b(o, l)) : e[l] = String(o), e;
2277
2277
  }, {});
2278
2278
  }
2279
2279
  const r = Object.fromEntries(
2280
- Object.entries(D).map(([i, a]) => [i, C(a)])
2280
+ Object.entries(E).map(([i, a]) => [i, b(a)])
2281
2281
  );
2282
- function H() {
2283
- const i = k(S, { locale: c("zh-CN") });
2282
+ function G() {
2283
+ const i = L(f, { locale: d("zh-CN") });
2284
2284
  return { t: (e) => {
2285
2285
  var t, o;
2286
2286
  return ((t = r[i.locale.value]) == null ? void 0 : t[e]) ?? ((o = r["zh-CN"]) == null ? void 0 : o[e]) ?? e;
2287
2287
  }, locale: i.locale };
2288
2288
  }
2289
- function E(i) {
2289
+ function z(i) {
2290
2290
  return (a) => {
2291
2291
  var e, t;
2292
2292
  return ((e = r[i.value]) == null ? void 0 : e[a]) ?? ((t = r["zh-CN"]) == null ? void 0 : t[a]) ?? a;
2293
2293
  };
2294
2294
  }
2295
- function G(i) {
2296
- const a = c((i == null ? void 0 : i.locale) ?? "zh-CN");
2295
+ function V(i) {
2296
+ const a = d((i == null ? void 0 : i.locale) ?? "zh-CN");
2297
2297
  return {
2298
2298
  install() {
2299
2299
  },
2300
2300
  global: { locale: a, t: (t) => {
2301
- var o, n;
2302
- return ((o = r[a.value]) == null ? void 0 : o[t]) ?? ((n = r["zh-CN"]) == null ? void 0 : n[t]) ?? t;
2301
+ var o, l;
2302
+ return ((o = r[a.value]) == null ? void 0 : o[t]) ?? ((l = r["zh-CN"]) == null ? void 0 : l[t]) ?? t;
2303
2303
  } }
2304
2304
  };
2305
2305
  }
2306
- const z = /* @__PURE__ */ w({
2306
+ const U = /* @__PURE__ */ I({
2307
2307
  __name: "LtPPT",
2308
2308
  props: {
2309
2309
  initData: {},
@@ -2315,82 +2315,86 @@ const z = /* @__PURE__ */ w({
2315
2315
  width: { default: "100%" },
2316
2316
  height: { default: "100%" },
2317
2317
  readonly: { type: Boolean, default: !1 },
2318
+ theme: { default: "dark" },
2318
2319
  onReturn: {}
2319
2320
  },
2320
2321
  setup(i, { expose: a }) {
2321
- const e = i, t = c();
2322
- let o = null, n = null, u = null, p = null;
2323
- const g = c(e.locale ?? "zh-CN"), f = L(() => ({
2322
+ const e = i, t = d();
2323
+ let o = null, l = null, u = null, p = null;
2324
+ const g = d(e.locale ?? "zh-CN"), m = d(e.theme ?? "dark"), T = x(() => ({
2324
2325
  width: e.width,
2325
2326
  height: e.height
2326
- })), b = async () => {
2327
+ })), P = async () => {
2327
2328
  if (!t.value) return;
2328
2329
  const [
2329
- { createApp: l },
2330
+ { createApp: n },
2330
2331
  { createPinia: s },
2331
- { default: P },
2332
- { default: y },
2333
- h
2332
+ { default: k },
2333
+ { default: w },
2334
+ S
2334
2335
  ] = await Promise.all([
2335
2336
  import("vue"),
2336
2337
  import("./pinia-CVat9nJz.js"),
2337
- import("./InnerApp-ppA2sAc2.js"),
2338
- import("./index-CPmrtWkf.js"),
2339
- import("./index-Bi1_Z2Vw.js")
2338
+ import("./InnerApp-CFjyQ_Zj.js"),
2339
+ import("./index-DfJBroZT.js"),
2340
+ import("./index-DwOY-Tch.js")
2340
2341
  ]);
2341
2342
  if (!t.value) return;
2342
- u = h.useSlidesStore, p = h.useScreenStore;
2343
- const d = document.createElement("div");
2344
- d.style.width = "100%", d.style.height = "100%", t.value.appendChild(d), o = l(P, {
2343
+ u = S.useSlidesStore, p = S.useScreenStore;
2344
+ const c = document.createElement("div");
2345
+ c.style.width = "100%", c.style.height = "100%", t.value.appendChild(c), o = n(k, {
2345
2346
  initData: e.initData,
2346
2347
  onUploadFile: e.onUploadFile,
2347
2348
  readonly: e.readonly,
2348
2349
  onChange: e.onChange,
2349
2350
  onSave: e.onSave,
2350
2351
  onInitFinished: e.onInitFinished,
2351
- onReturn: e.onReturn
2352
- }), n = s(), o.use(n), o.provide(S, { locale: g }), o.config.globalProperties.$t = E(g), o.use(y), o.mount(d);
2353
- }, T = () => {
2354
- o && (o.unmount(), o = null, n = null), t.value && (t.value.innerHTML = "");
2352
+ onReturn: e.onReturn,
2353
+ theme: m.value
2354
+ }), l = s(), o.use(l), o.provide(f, { locale: g }), o.provide("__lt_ppt_theme__", m), o.config.globalProperties.$t = z(g), o.use(w), o.mount(c);
2355
+ }, y = () => {
2356
+ o && (o.unmount(), o = null, l = null), t.value && (t.value.innerHTML = "");
2355
2357
  };
2356
- I(() => {
2357
- b();
2358
- }), x(() => {
2359
- T();
2360
- }), F(() => e.locale, (l) => {
2361
- g.value = l ?? "zh-CN";
2358
+ F(() => {
2359
+ P();
2360
+ }), A(() => {
2361
+ y();
2362
+ }), C(() => e.locale, (n) => {
2363
+ g.value = n ?? "zh-CN";
2364
+ }), C(() => e.theme, (n) => {
2365
+ m.value = n ?? "dark";
2362
2366
  });
2363
- const m = () => !n || !u ? null : u(n);
2367
+ const h = () => !l || !u ? null : u(l);
2364
2368
  return a({
2365
2369
  getSlides: () => {
2366
- const l = m();
2367
- return l ? JSON.parse(JSON.stringify(l.slides)) : [];
2370
+ const n = h();
2371
+ return n ? JSON.parse(JSON.stringify(n.slides)) : [];
2368
2372
  },
2369
- setSlides: (l) => {
2370
- const s = m();
2371
- s && s.setSlides(l);
2373
+ setSlides: (n) => {
2374
+ const s = h();
2375
+ s && s.setSlides(n);
2372
2376
  },
2373
2377
  startScreening: () => {
2374
- if (!n || !p) return;
2375
- p(n).setScreening(!0);
2378
+ if (!l || !p) return;
2379
+ p(l).setScreening(!0);
2376
2380
  },
2377
2381
  getCurrentIndex: () => {
2378
- const l = m();
2379
- return l ? l.slideIndex : 0;
2382
+ const n = h();
2383
+ return n ? n.slideIndex : 0;
2380
2384
  }
2381
- }), (l, s) => (A(), R("div", {
2385
+ }), (n, s) => (R(), v("div", {
2382
2386
  ref_key: "containerRef",
2383
2387
  ref: t,
2384
2388
  class: "lt-ppt-container",
2385
- style: v(f.value)
2389
+ style: O(T.value)
2386
2390
  }, null, 4));
2387
2391
  }
2388
- }), U = (i, a) => {
2392
+ }), N = (i, a) => {
2389
2393
  const e = i.__vccOpts || i;
2390
2394
  for (const [t, o] of a)
2391
2395
  e[t] = o;
2392
2396
  return e;
2393
- }, V = /* @__PURE__ */ U(z, [["__scopeId", "data-v-4467bd2c"]]), N = [
2397
+ }, W = /* @__PURE__ */ N(U, [["__scopeId", "data-v-b7ae6343"]]), M = [
2394
2398
  "SourceHanSans",
2395
2399
  "SourceHanSerif",
2396
2400
  "WenDingPLSongTi",
@@ -2419,18 +2423,18 @@ const z = /* @__PURE__ */ w({
2419
2423
  "Montserrat",
2420
2424
  "SourceSansPro",
2421
2425
  "Merriweather"
2422
- ], W = (i = "/fonts") => {
2426
+ ], X = (i = "/fonts") => {
2423
2427
  if (typeof document > "u" || !document.head) return;
2424
2428
  const a = i.replace(/\/$/, ""), e = document.createElement("style");
2425
- e.textContent = N.map(
2429
+ e.textContent = M.map(
2426
2430
  (t) => `@font-face { font-display: swap; font-family: ${t}; src: url('${a}/${t}.woff2') format('woff2'); }`
2427
2431
  ).join(`
2428
2432
  `), document.head.appendChild(e);
2429
2433
  };
2430
2434
  export {
2431
- V as L,
2432
- U as _,
2433
- G as c,
2434
- W as l,
2435
- H as u
2435
+ W as L,
2436
+ N as _,
2437
+ V as c,
2438
+ X as l,
2439
+ G as u
2436
2440
  };