jvs-ppt-ui 0.0.36 → 0.0.37
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/lib/jvs-ppt-ui/iconfont/iconfont.css +7 -3
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.js +1 -1
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.json +7 -0
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.ttf +0 -0
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.woff +0 -0
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.woff2 +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_01de32e3d01df54a.svg +9 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_12935f21f0b1ae78.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_201146e666f28fff.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_32ef4f2c1d76ea32.svg +15 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_571054b13f220252.svg +10 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_5b14f99769a8894c.svg +10 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_62fc021bdae89b21.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_649d2b36f7fc251e.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_7e57de8ea8d46aba.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_9ad1284e63535689.svg +15 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_9ff268d3709d6454.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_b8f80ac591d69945.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_dce239981c2cd1aa.svg +15 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_e2ea31ca7735e5c0.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_e585ddb9ec5c408e.png +0 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_f3335fad3673d648.svg +10 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-image/img_fb925327432cc7e7.svg +15 -0
- package/dist/lib/jvs-ppt-ui/layout-library/layout-library.json +1 -0
- package/dist/lib/jvs-ppt-ui.es.js +78530 -20156
- package/dist/lib/jvs-ppt-ui.umd.js +112 -112
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/scripts/patch-pptxtojson.cjs +33 -0
- package/src/assets/chart/baseArea.png +0 -0
- package/src/assets/chart/baseBar.png +0 -0
- package/src/assets/chart/baseHistogram.png +0 -0
- package/src/assets/chart/basePie.png +0 -0
- package/src/assets/chart/bubbleChart.png +0 -0
- package/src/assets/chart/circyChart.png +0 -0
- package/src/assets/chart/compPolyline.png +0 -0
- package/src/assets/chart/lineChart.png +0 -0
- package/src/assets/chart/otherLine.png +0 -0
- package/src/assets/chart/otherLineChart.png +0 -0
- package/src/assets/chart/perHistogram.png +0 -0
- package/src/assets/chart/radarChart.png +0 -0
- package/src/assets/chart/roseChart.png +0 -0
- package/src/assets/chart/roseCircyChart.png +0 -0
- package/src/assets/chart/stackArea.png +0 -0
- package/src/assets/chart/stackBar.png +0 -0
- package/src/assets/chart/stackHistogram.png +0 -0
- package/src/assets/iconfont/iconfont.js +1 -1
- package/src/components/ChartTypeSelector.vue +15 -67
- package/src/components/Header.vue +10 -7
- package/src/components/SidebarLeft.vue +381 -29
- package/src/components/sidebar/panels/LayoutThumbSvg.vue +82 -14
- package/src/composables/useSlides.ts +141 -3
- package/src/configs/layoutLibrary.ts +113 -0
- package/src/style.css +107 -17
- package/src/utils/pptxAnimationInjector.ts +36 -4
- package/src/assets/chart/baseMap.png +0 -0
- package/src/assets/chart/boxplot.png +0 -0
|
@@ -501,10 +501,27 @@ async function injectMasterAndLayouts(loadedZip: JSZip, zipMeta: any, slides: Sl
|
|
|
501
501
|
return false
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
// 1. 覆盖写入所有 slideMasters 及其 _rels
|
|
504
|
+
// 1. 覆盖写入所有 slideMasters 及其 _rels
|
|
505
|
+
const injectedMasterXmlFiles = Object.keys(zipMeta.masterFilesMap).filter(k => k.endsWith('.xml') && !k.includes('_rels'))
|
|
506
|
+
if (injectedMasterXmlFiles.length > 0 && !zipMeta.masterFilesMap['ppt/slideMasters/slideMaster1.xml']) {
|
|
507
|
+
loadedZip.remove('ppt/slideMasters/slideMaster1.xml')
|
|
508
|
+
loadedZip.remove('ppt/slideMasters/_rels/slideMaster1.xml.rels')
|
|
509
|
+
const primaryMasterRelTarget = injectedMasterXmlFiles[0].replace(/^ppt\//, '')
|
|
510
|
+
const presRelsPath = 'ppt/_rels/presentation.xml.rels'
|
|
511
|
+
const presRelsXml = await loadedZip.file(presRelsPath)?.async('text')
|
|
512
|
+
if (presRelsXml) {
|
|
513
|
+
loadedZip.file(presRelsPath, presRelsXml.replace(/Target="slideMasters\/slideMaster1\.xml"/g, `Target="${primaryMasterRelTarget}"`))
|
|
514
|
+
}
|
|
515
|
+
}
|
|
505
516
|
for (const [filePath, content] of Object.entries(zipMeta.masterFilesMap)) {
|
|
506
517
|
if (content) {
|
|
507
|
-
|
|
518
|
+
let strContent = content as string
|
|
519
|
+
if (filePath.endsWith('.rels')) {
|
|
520
|
+
strContent = strContent.replace(/Target="\.\.\/theme\/(theme\d+\.xml)"/g, (full, themeFile) => {
|
|
521
|
+
return loadedZip.file(`ppt/theme/${themeFile}`) ? full : 'Target="../theme/theme1.xml"'
|
|
522
|
+
})
|
|
523
|
+
}
|
|
524
|
+
loadedZip.file(filePath, strContent)
|
|
508
525
|
}
|
|
509
526
|
}
|
|
510
527
|
|
|
@@ -512,7 +529,13 @@ async function injectMasterAndLayouts(loadedZip: JSZip, zipMeta: any, slides: Sl
|
|
|
512
529
|
if (zipMeta.layoutFilesMap) {
|
|
513
530
|
for (const [filePath, content] of Object.entries(zipMeta.layoutFilesMap)) {
|
|
514
531
|
if (content) {
|
|
515
|
-
|
|
532
|
+
let strContent = content as string
|
|
533
|
+
if (filePath.endsWith('.rels')) {
|
|
534
|
+
strContent = strContent.replace(/Target="\.\.\/theme\/(theme\d+\.xml)"/g, (full, themeFile) => {
|
|
535
|
+
return loadedZip.file(`ppt/theme/${themeFile}`) ? full : 'Target="../theme/theme1.xml"'
|
|
536
|
+
})
|
|
537
|
+
}
|
|
538
|
+
loadedZip.file(filePath, strContent)
|
|
516
539
|
}
|
|
517
540
|
}
|
|
518
541
|
}
|
|
@@ -537,7 +560,16 @@ async function injectMasterAndLayouts(loadedZip: JSZip, zipMeta: any, slides: Sl
|
|
|
537
560
|
|
|
538
561
|
// 4. 更新 [Content_Types].xml,确保所有 slideLayout 及 tags 均已注册,并清理不存在的幽灵 slideMaster
|
|
539
562
|
let ctXml = await loadedZip.file('[Content_Types].xml')?.async('text')
|
|
540
|
-
if (ctXml) {
|
|
563
|
+
if (ctXml) {
|
|
564
|
+
for (const mf of Object.keys(zipMeta.masterFilesMap)) {
|
|
565
|
+
if (mf.endsWith('.xml') && !mf.includes('_rels')) {
|
|
566
|
+
const partName = '/' + mf
|
|
567
|
+
if (!ctXml.includes(partName)) {
|
|
568
|
+
const override = `<Override PartName="${partName}" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"/>`
|
|
569
|
+
ctXml = ctXml.replace('</Types>', override + '</Types>')
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
541
573
|
if (zipMeta.layoutFilesMap) {
|
|
542
574
|
for (const lf of Object.keys(zipMeta.layoutFilesMap)) {
|
|
543
575
|
if (lf.endsWith('.xml') && !lf.includes('_rels')) {
|
|
Binary file
|
|
Binary file
|