jvs-ppt-ui 0.0.12 → 0.0.15
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/check_imgs.html +18 -0
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.css +187 -27
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.js +1 -1
- package/dist/lib/jvs-ppt-ui/iconfont/iconfont.json +345 -65
- 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/img/al.png +0 -0
- package/dist/lib/jvs-ppt-ui/img/d.png +0 -0
- package/dist/lib/jvs-ppt-ui/img/dl.png +0 -0
- package/dist/lib/jvs-ppt-ui/img/l.png +0 -0
- package/dist/lib/jvs-ppt-ui.es.js +38582 -37350
- package/dist/lib/jvs-ppt-ui.umd.js +98 -98
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/scripts/check-icons.mjs +22 -0
- package/scripts/patch-anim-icons.mjs +45 -0
- package/src/App.vue +3 -3
- package/src/assets/iconfont/iconfont.css +187 -27
- package/src/assets/iconfont/iconfont.js +1 -1
- package/src/assets/iconfont/iconfont.json +345 -65
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/iconfont/iconfont.woff +0 -0
- package/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/CanvasArea.vue +210 -83
- package/src/components/ChartTypeSelector.vue +505 -148
- package/src/components/Header.vue +292 -39
- package/src/components/PresentationMode.vue +2 -1
- package/src/components/QuickBorderPopover.vue +51 -11
- package/src/components/QuickColorPopover.vue +65 -21
- package/src/components/SidebarLeft.vue +194 -92
- package/src/components/SidebarRight.vue +39 -35
- package/src/components/TemplateGallery.vue +1153 -1182
- package/src/components/ToastNotification.vue +2 -2
- package/src/components/Toolbar.vue +825 -733
- package/src/components/canvas/CanvasQuickToolbar.vue +17 -30
- package/src/components/canvas/elements/CanvasGroupElement.vue +6 -0
- package/src/components/canvas/elements/CanvasShapeElement.vue +113 -10
- package/src/components/canvas/elements/CanvasTextElement.vue +4 -3
- package/src/components/sidebar/common/SidebarAlignGroup.vue +104 -50
- package/src/components/sidebar/common/SidebarBorderAccordion.vue +373 -146
- package/src/components/sidebar/common/SidebarPositionGroup.vue +358 -149
- package/src/components/sidebar/common/SidebarReflectionAccordion.vue +429 -203
- package/src/components/sidebar/common/SidebarShadowAccordion.vue +844 -416
- package/src/components/sidebar/panels/GradientEditor.vue +671 -316
- package/src/components/sidebar/panels/LayoutThumbSvg.vue +33 -16
- package/src/components/sidebar/panels/SidebarAnimationPanel.vue +701 -138
- package/src/components/sidebar/panels/SidebarDesignPanel.vue +1596 -419
- package/src/components/sidebar/panels/SidebarMediaFormatPanel.vue +12 -0
- package/src/components/sidebar/panels/SidebarShapeFormatPanel.vue +652 -173
- package/src/components/sidebar/panels/SidebarTextFormatPanel.vue +1938 -1427
- package/src/components/sidebar/panels/SidebarTransitionPanel.vue +780 -210
- package/src/composables/canvas/useCanvasShortcuts.ts +20 -6
- package/src/composables/canvas/useCanvasText.ts +1 -1
- package/src/composables/canvas/useCanvasTransform.ts +20 -0
- package/src/composables/presetThemes.ts +43 -44
- package/src/composables/sidebar/useSidebarAnimation.ts +101 -25
- package/src/composables/sidebar/useSidebarDesign.ts +30 -11
- package/src/composables/sidebar/useSidebarElementTransform.ts +27 -5
- package/src/composables/sidebar/useSidebarImage.ts +10 -2
- package/src/composables/sidebar/useSidebarShapeFormat.ts +323 -99
- package/src/composables/useSlides.ts +338 -162
- package/src/main.ts +2 -0
- package/src/style.css +924 -359
- package/src/utils/canvas/elementStyles.ts +20 -1
- package/src/utils/groupFlip.ts +108 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { computed, type Ref, type ComputedRef } from 'vue'
|
|
2
2
|
import { shapeFormulas } from '../../utils/pptxShapesLazy'
|
|
3
3
|
import { useSlides } from '../useSlides'
|
|
4
|
+
import { applyGroupGeometryFlip } from '../../utils/groupFlip'
|
|
4
5
|
|
|
5
6
|
export function useSidebarElementTransform(
|
|
6
7
|
selectedElement: ComputedRef<any>,
|
|
@@ -59,34 +60,49 @@ export function useSidebarElementTransform(
|
|
|
59
60
|
if (el) el.order = idx + 1
|
|
60
61
|
})
|
|
61
62
|
addHistorySnapshot()
|
|
63
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
function toggleFlipH() {
|
|
65
67
|
if (selectedElementIds.value.length > 1 && activeSlide.value) {
|
|
66
68
|
activeSlide.value.elements.forEach((el: any) => {
|
|
67
69
|
if (selectedElementIds.value.includes(el.id)) {
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
+
if (el.type === 'group') {
|
|
71
|
+
applyGroupGeometryFlip(el, true, false)
|
|
72
|
+
} else {
|
|
73
|
+
if (!el.style) el.style = {}
|
|
74
|
+
el.style.flipH = !el.style.flipH
|
|
75
|
+
}
|
|
70
76
|
}
|
|
71
77
|
})
|
|
78
|
+
} else if (selectedElement.value && selectedElement.value.type === 'group') {
|
|
79
|
+
applyGroupGeometryFlip(selectedElement.value, true, false)
|
|
72
80
|
} else {
|
|
73
81
|
getStyle().flipH = !getStyle().flipH
|
|
74
82
|
}
|
|
75
83
|
addHistorySnapshot()
|
|
84
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
76
85
|
}
|
|
77
86
|
|
|
78
87
|
function toggleFlipV() {
|
|
79
88
|
if (selectedElementIds.value.length > 1 && activeSlide.value) {
|
|
80
89
|
activeSlide.value.elements.forEach((el: any) => {
|
|
81
90
|
if (selectedElementIds.value.includes(el.id)) {
|
|
82
|
-
if (
|
|
83
|
-
|
|
91
|
+
if (el.type === 'group') {
|
|
92
|
+
applyGroupGeometryFlip(el, false, true)
|
|
93
|
+
} else {
|
|
94
|
+
if (!el.style) el.style = {}
|
|
95
|
+
el.style.flipV = !el.style.flipV
|
|
96
|
+
}
|
|
84
97
|
}
|
|
85
98
|
})
|
|
99
|
+
} else if (selectedElement.value && selectedElement.value.type === 'group') {
|
|
100
|
+
applyGroupGeometryFlip(selectedElement.value, false, true)
|
|
86
101
|
} else {
|
|
87
102
|
getStyle().flipV = !getStyle().flipV
|
|
88
103
|
}
|
|
89
104
|
addHistorySnapshot()
|
|
105
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
90
106
|
}
|
|
91
107
|
|
|
92
108
|
function getParentGroup(el: any): any {
|
|
@@ -116,7 +132,7 @@ export function useSidebarElementTransform(
|
|
|
116
132
|
return { width: logicalWidth.value, height: logicalHeight.value }
|
|
117
133
|
}
|
|
118
134
|
|
|
119
|
-
const { isCanvasDragging } = useSlides()
|
|
135
|
+
const { isCanvasDragging, activeSlideVersion } = useSlides()
|
|
120
136
|
let cachedX = 0
|
|
121
137
|
let cachedY = 0
|
|
122
138
|
|
|
@@ -163,6 +179,7 @@ export function useSidebarElementTransform(
|
|
|
163
179
|
}
|
|
164
180
|
}
|
|
165
181
|
addHistorySnapshot()
|
|
182
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
166
183
|
}
|
|
167
184
|
})
|
|
168
185
|
|
|
@@ -209,6 +226,7 @@ export function useSidebarElementTransform(
|
|
|
209
226
|
}
|
|
210
227
|
}
|
|
211
228
|
addHistorySnapshot()
|
|
229
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
212
230
|
}
|
|
213
231
|
})
|
|
214
232
|
|
|
@@ -228,6 +246,7 @@ export function useSidebarElementTransform(
|
|
|
228
246
|
})
|
|
229
247
|
}
|
|
230
248
|
addHistorySnapshot()
|
|
249
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
231
250
|
}
|
|
232
251
|
})
|
|
233
252
|
|
|
@@ -344,6 +363,7 @@ export function useSidebarElementTransform(
|
|
|
344
363
|
}
|
|
345
364
|
}
|
|
346
365
|
addHistorySnapshot()
|
|
366
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
347
367
|
}
|
|
348
368
|
})
|
|
349
369
|
|
|
@@ -475,6 +495,7 @@ export function useSidebarElementTransform(
|
|
|
475
495
|
}
|
|
476
496
|
}
|
|
477
497
|
addHistorySnapshot()
|
|
498
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
478
499
|
}
|
|
479
500
|
})
|
|
480
501
|
|
|
@@ -484,6 +505,7 @@ export function useSidebarElementTransform(
|
|
|
484
505
|
},
|
|
485
506
|
set(val: number) {
|
|
486
507
|
setStyleVal('rotate', val)
|
|
508
|
+
if (activeSlideVersion) activeSlideVersion.value++
|
|
487
509
|
}
|
|
488
510
|
})
|
|
489
511
|
|
|
@@ -204,8 +204,16 @@ export function useSidebarImage(
|
|
|
204
204
|
|
|
205
205
|
function setImageAsBackground() {
|
|
206
206
|
if (selectedElement.value && activeSlide.value) {
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
const src = selectedElement.value.content || selectedElement.value.src
|
|
208
|
+
if (src) {
|
|
209
|
+
;(activeSlide.value as any).bgImageMode = 'stretch'
|
|
210
|
+
;(activeSlide.value as any).isPattern = false
|
|
211
|
+
;(activeSlide.value as any)._lastBgImageUrl = src
|
|
212
|
+
activeSlide.value.background = `url("${src}") center center / 100% 100% no-repeat`
|
|
213
|
+
activeSlide.value.bgType = 'image'
|
|
214
|
+
addHistorySnapshot()
|
|
215
|
+
notify('已成功将图片设为幻灯片背景')
|
|
216
|
+
}
|
|
209
217
|
}
|
|
210
218
|
}
|
|
211
219
|
|