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.
- package/dist/{InnerApp-ppA2sAc2.js → InnerApp-CFjyQ_Zj.js} +2623 -2628
- package/dist/{index-CPmrtWkf.js → index-DfJBroZT.js} +2 -2
- package/dist/{index-Bi1_Z2Vw.js → index-DwOY-Tch.js} +1 -1
- package/dist/{lib-kEQAeWOh.js → lib-HoYdxa9t.js} +65 -61
- package/dist/lt-ppt.css +1 -1
- package/dist/lt-ppt.es.js +1 -1
- package/dist/lt-ppt.umd.js +40 -40
- package/dist/{screen-DTsHYbfn.js → screen-ChAm5xVM.js} +1 -1
- package/dist/types/src/LtPPT.vue.d.ts +2 -1
- package/dist/types/src/lib.d.ts +1 -1
- package/dist/types/src/types/lt-ppt.d.ts +3 -0
- package/package.json +1 -1
|
@@ -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-
|
|
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-
|
|
46
|
+
}), z = /* @__PURE__ */ b($, [["__scopeId", "data-v-124d579c"]]), B = /* @__PURE__ */ k({
|
|
47
47
|
__name: "index",
|
|
48
48
|
props: {
|
|
49
49
|
axis: {},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
2273
|
-
function
|
|
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
|
|
2276
|
-
return o && typeof o == "object" && !Array.isArray(o) ? Object.assign(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(
|
|
2280
|
+
Object.entries(E).map(([i, a]) => [i, b(a)])
|
|
2281
2281
|
);
|
|
2282
|
-
function
|
|
2283
|
-
const i =
|
|
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
|
|
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
|
|
2296
|
-
const a =
|
|
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,
|
|
2302
|
-
return ((o = r[a.value]) == null ? void 0 : o[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
|
|
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 =
|
|
2322
|
-
let o = null,
|
|
2323
|
-
const g =
|
|
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
|
-
})),
|
|
2327
|
+
})), P = async () => {
|
|
2327
2328
|
if (!t.value) return;
|
|
2328
2329
|
const [
|
|
2329
|
-
{ createApp:
|
|
2330
|
+
{ createApp: n },
|
|
2330
2331
|
{ createPinia: s },
|
|
2331
|
-
{ default:
|
|
2332
|
-
{ default:
|
|
2333
|
-
|
|
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-
|
|
2338
|
-
import("./index-
|
|
2339
|
-
import("./index-
|
|
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 =
|
|
2343
|
-
const
|
|
2344
|
-
|
|
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
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
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
|
-
|
|
2357
|
-
|
|
2358
|
-
}),
|
|
2359
|
-
|
|
2360
|
-
}),
|
|
2361
|
-
g.value =
|
|
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
|
|
2367
|
+
const h = () => !l || !u ? null : u(l);
|
|
2364
2368
|
return a({
|
|
2365
2369
|
getSlides: () => {
|
|
2366
|
-
const
|
|
2367
|
-
return
|
|
2370
|
+
const n = h();
|
|
2371
|
+
return n ? JSON.parse(JSON.stringify(n.slides)) : [];
|
|
2368
2372
|
},
|
|
2369
|
-
setSlides: (
|
|
2370
|
-
const s =
|
|
2371
|
-
s && s.setSlides(
|
|
2373
|
+
setSlides: (n) => {
|
|
2374
|
+
const s = h();
|
|
2375
|
+
s && s.setSlides(n);
|
|
2372
2376
|
},
|
|
2373
2377
|
startScreening: () => {
|
|
2374
|
-
if (!
|
|
2375
|
-
p(
|
|
2378
|
+
if (!l || !p) return;
|
|
2379
|
+
p(l).setScreening(!0);
|
|
2376
2380
|
},
|
|
2377
2381
|
getCurrentIndex: () => {
|
|
2378
|
-
const
|
|
2379
|
-
return
|
|
2382
|
+
const n = h();
|
|
2383
|
+
return n ? n.slideIndex : 0;
|
|
2380
2384
|
}
|
|
2381
|
-
}), (
|
|
2385
|
+
}), (n, s) => (R(), v("div", {
|
|
2382
2386
|
ref_key: "containerRef",
|
|
2383
2387
|
ref: t,
|
|
2384
2388
|
class: "lt-ppt-container",
|
|
2385
|
-
style:
|
|
2389
|
+
style: O(T.value)
|
|
2386
2390
|
}, null, 4));
|
|
2387
2391
|
}
|
|
2388
|
-
}),
|
|
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
|
-
},
|
|
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
|
-
],
|
|
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 =
|
|
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
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2435
|
+
W as L,
|
|
2436
|
+
N as _,
|
|
2437
|
+
V as c,
|
|
2438
|
+
X as l,
|
|
2439
|
+
G as u
|
|
2436
2440
|
};
|