jvs-ppt-ui 0.0.14 → 0.0.16
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 +44973 -43349
- package/dist/lib/jvs-ppt-ui.umd.js +102 -102
- 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/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 +218 -193
- package/src/components/ChartTypeSelector.vue +509 -148
- package/src/components/Header.vue +327 -44
- package/src/components/PresentationGroupChild.vue +44 -13
- package/src/components/PresentationMode.vue +84 -33
- package/src/components/QuickBorderPopover.vue +51 -11
- package/src/components/QuickColorPopover.vue +65 -21
- package/src/components/SidebarLeft.vue +286 -107
- package/src/components/SidebarRight.vue +45 -38
- package/src/components/TemplateGallery.vue +1110 -1237
- 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 +198 -38
- 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 +375 -148
- 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/SidebarChartFormatPanel.vue +3 -3
- package/src/components/sidebar/panels/SidebarDesignPanel.vue +1754 -416
- package/src/components/sidebar/panels/SidebarMediaFormatPanel.vue +12 -0
- package/src/components/sidebar/panels/SidebarShapeFormatPanel.vue +813 -174
- package/src/components/sidebar/panels/SidebarTableFormatPanel.vue +2 -2
- package/src/components/sidebar/panels/SidebarTextFormatPanel.vue +1938 -1427
- package/src/components/sidebar/panels/SidebarTransitionPanel.vue +791 -210
- package/src/composables/canvas/useCanvasShortcuts.ts +20 -6
- package/src/composables/canvas/useCanvasText.ts +1 -1
- package/src/composables/canvas/useCanvasTransform.ts +44 -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 +10 -1
- package/src/composables/sidebar/useSidebarImage.ts +10 -2
- package/src/composables/sidebar/useSidebarShapeFormat.ts +562 -107
- package/src/composables/useSlides.ts +331 -153
- package/src/main.ts +2 -0
- package/src/style.css +926 -359
- package/src/utils/canvas/elementStyles.ts +42 -1
|
@@ -26,6 +26,14 @@ export function getSlideBackgroundCss(bg: any): string {
|
|
|
26
26
|
return '#ffffff'
|
|
27
27
|
}
|
|
28
28
|
if (trimmed.startsWith('url(')) {
|
|
29
|
+
const closeParenIdx = trimmed.lastIndexOf(')')
|
|
30
|
+
const afterUrl = closeParenIdx >= 0 ? trimmed.slice(closeParenIdx + 1).trim() : ''
|
|
31
|
+
if (!afterUrl) {
|
|
32
|
+
if (trimmed.includes('data:image/svg+xml')) {
|
|
33
|
+
return `#ffffff ${trimmed} left top / auto repeat`
|
|
34
|
+
}
|
|
35
|
+
return `#ffffff ${trimmed} center center / 100% 100% no-repeat`
|
|
36
|
+
}
|
|
29
37
|
return `#ffffff ${trimmed}`
|
|
30
38
|
}
|
|
31
39
|
return trimmed
|
|
@@ -34,7 +42,17 @@ export function getSlideBackgroundCss(bg: any): string {
|
|
|
34
42
|
if (bg.background && typeof bg.background === 'string') {
|
|
35
43
|
const trimmed = bg.background.trim()
|
|
36
44
|
if (trimmed && trimmed !== 'none' && trimmed !== 'transparent') {
|
|
37
|
-
if (trimmed.startsWith('url('))
|
|
45
|
+
if (trimmed.startsWith('url(')) {
|
|
46
|
+
const closeParenIdx = trimmed.lastIndexOf(')')
|
|
47
|
+
const afterUrl = closeParenIdx >= 0 ? trimmed.slice(closeParenIdx + 1).trim() : ''
|
|
48
|
+
if (!afterUrl) {
|
|
49
|
+
if (trimmed.includes('data:image/svg+xml')) {
|
|
50
|
+
return `#ffffff ${trimmed} left top / auto repeat`
|
|
51
|
+
}
|
|
52
|
+
return `#ffffff ${trimmed} center center / 100% 100% no-repeat`
|
|
53
|
+
}
|
|
54
|
+
return `#ffffff ${trimmed}`
|
|
55
|
+
}
|
|
38
56
|
return trimmed
|
|
39
57
|
}
|
|
40
58
|
}
|
|
@@ -200,6 +218,28 @@ export function getElementPattern(el: any): string | undefined {
|
|
|
200
218
|
return `data:image/png;base64,${str}`
|
|
201
219
|
}
|
|
202
220
|
|
|
221
|
+
export function isElementPatternTile(el: any): boolean {
|
|
222
|
+
const p = getElementPattern(el)
|
|
223
|
+
if (!p) return false
|
|
224
|
+
return p.startsWith('data:image/svg+xml') || Boolean(el?.patternType || el?.style?.patternType)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function getElementPatternTileSize(el: any): { w: number; h: number } {
|
|
228
|
+
const p = getElementPattern(el)
|
|
229
|
+
if (!p || !p.startsWith('data:image/svg+xml')) return { w: 12, h: 12 }
|
|
230
|
+
let decoded = p
|
|
231
|
+
try {
|
|
232
|
+
decoded = decodeURIComponent(p)
|
|
233
|
+
} catch {
|
|
234
|
+
decoded = p.replace(/%22/g, '"').replace(/%27/g, "'")
|
|
235
|
+
}
|
|
236
|
+
const wMatch = decoded.match(/width=['"](\d+(?:\.\d+)?)['"]/)
|
|
237
|
+
const hMatch = decoded.match(/height=['"](\d+(?:\.\d+)?)['"]/)
|
|
238
|
+
const w = wMatch ? parseFloat(wMatch[1]) : 12
|
|
239
|
+
const h = hMatch ? parseFloat(hMatch[1]) : 12
|
|
240
|
+
return { w: w > 0 ? w : 12, h: h > 0 ? h : 12 }
|
|
241
|
+
}
|
|
242
|
+
|
|
203
243
|
export interface GradientColorStop {
|
|
204
244
|
pos: number | string
|
|
205
245
|
color: string
|
|
@@ -468,6 +508,7 @@ export function getElementFill(el: any): string | undefined {
|
|
|
468
508
|
export function hasElementFill(el: any): boolean {
|
|
469
509
|
if (!el) return false
|
|
470
510
|
if (getElementPattern(el)) return true
|
|
511
|
+
if ((el.pattern && el.pattern.trim() !== '') || (el.style?.pattern && el.style.pattern.trim() !== '')) return true
|
|
471
512
|
if (getElementGradientConfig(el)) return true
|
|
472
513
|
const fill = getElementFill(el)
|
|
473
514
|
if (fill === undefined) {
|