jvs-ppt-ui 0.0.34 → 0.0.35
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.es.js +18873 -18636
- package/dist/lib/jvs-ppt-ui.umd.js +98 -99
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CanvasArea.vue +8 -2
- package/src/components/PresentationGroupChild.vue +11 -1
- package/src/components/PresentationMode.vue +10 -1
- package/src/components/SidebarLeft.vue +3354 -3212
- package/src/components/canvas/elements/CanvasTextElement.vue +4 -0
- package/src/components/sidebar/panels/LayoutThumbSvg.vue +130 -57
- package/src/components/sidebar/panels/SidebarDesignPanel.vue +7 -14
- package/src/composables/canvas/useCanvasContextMenu.ts +1 -1
- package/src/composables/sidebar/useSidebarDesign.ts +2 -1
- package/src/composables/sidebar/useSidebarElementTransform.ts +1 -1
- package/src/composables/useSlides.ts +221 -55
- package/src/configs/slideTemplates.ts +7 -3
- package/src/style.css +3 -3
- package/src/utils/canvas/elementStyles.ts +11 -1
package/package.json
CHANGED
|
@@ -3250,6 +3250,12 @@ function stopCreationDrag() {
|
|
|
3250
3250
|
createdElement.__isTemporaryNew = true
|
|
3251
3251
|
}
|
|
3252
3252
|
|
|
3253
|
+
const maxOrder = (activeSlide.value.elements || []).reduce((max: number, el: any) => {
|
|
3254
|
+
const o = el?.order !== undefined ? el.order : 0
|
|
3255
|
+
return Math.max(max, o)
|
|
3256
|
+
}, 0)
|
|
3257
|
+
createdElement.order = maxOrder + 1
|
|
3258
|
+
|
|
3253
3259
|
activeSlide.value.elements.push(createdElement)
|
|
3254
3260
|
if (createdElement.type === 'line' && (createdElement.startConnection || createdElement.endConnection)) {
|
|
3255
3261
|
syncSlideConnections(activeSlide.value, logicalWidth.value, logicalHeight.value, [createdElement.id])
|
|
@@ -8210,7 +8216,7 @@ async function handleGlobalPaste(e: ClipboardEvent) {
|
|
|
8210
8216
|
<!-- Master Background Elements Layer (Z-Index 1: Read-only background elements) -->
|
|
8211
8217
|
<div v-for="el in effectiveMasterElements" :key="`master-el-${el.id}`"
|
|
8212
8218
|
class="canvas-element master-element-item"
|
|
8213
|
-
v-memo="[el.id, isDragging ? 'drag' : `${el.style?.left}_${el.style?.top}_${el.style?.width}_${el.style?.height}`]"
|
|
8219
|
+
v-memo="[el.id, isDragging ? 'drag' : `${el.style?.left}_${el.style?.top}_${el.style?.width}_${el.style?.height}_${el.fill}_${el.color}_${el.style?.fill}_${el.style?.color}_${el.style?.fontFamily}_${activeSlide?.themeId}_${activeSlideVersion}`]"
|
|
8214
8220
|
:style="{
|
|
8215
8221
|
position: 'absolute',
|
|
8216
8222
|
top: el.style?.top || (el.top !== undefined ? `${el.top}px` : '0px'),
|
|
@@ -8268,7 +8274,7 @@ async function handleGlobalPaste(e: ClipboardEvent) {
|
|
|
8268
8274
|
|
|
8269
8275
|
<!-- Layout Placeholders Layer (Z-Index 2: Master layout placeholder boxes) -->
|
|
8270
8276
|
<div v-for="ph in effectiveLayoutPlaceholders" :key="`ph-${ph.id}`" class="canvas-placeholder-item"
|
|
8271
|
-
v-memo="[ph.id, isDragging ? 'drag' : `${ph.style?.left}_${ph.style?.top}_${ph.style?.width}_${ph.style?.height}_${isMasterEditingView}`]"
|
|
8277
|
+
v-memo="[ph.id, isDragging ? 'drag' : `${ph.style?.left}_${ph.style?.top}_${ph.style?.width}_${ph.style?.height}_${isMasterEditingView}_${activeSlideVersion}`]"
|
|
8272
8278
|
:style="{
|
|
8273
8279
|
position: 'absolute',
|
|
8274
8280
|
top: ph.style.top,
|
|
@@ -190,7 +190,17 @@ function getElementPattern(el: any): string | undefined {
|
|
|
190
190
|
if (!pattern || typeof pattern !== 'string') return undefined
|
|
191
191
|
const str = pattern.trim()
|
|
192
192
|
if (!str) return undefined
|
|
193
|
-
if (
|
|
193
|
+
if (
|
|
194
|
+
str.startsWith('data:') ||
|
|
195
|
+
str.startsWith('http:') ||
|
|
196
|
+
str.startsWith('https:') ||
|
|
197
|
+
str.startsWith('blob:') ||
|
|
198
|
+
str.startsWith('url(') ||
|
|
199
|
+
str.startsWith('/') ||
|
|
200
|
+
str.startsWith('./') ||
|
|
201
|
+
str.startsWith('../') ||
|
|
202
|
+
/\.(png|jpe?g|gif|webp|svg|bmp|avif|ico)([?#].*)?$/i.test(str)
|
|
203
|
+
) {
|
|
194
204
|
return str
|
|
195
205
|
}
|
|
196
206
|
return `data:image/png;base64,${str}`
|
|
@@ -586,7 +586,16 @@ function getElementPattern(el: any): string | undefined {
|
|
|
586
586
|
str = str.replace(/^url\(['"]?/, '').replace(/['"]?\)$/, '').trim()
|
|
587
587
|
}
|
|
588
588
|
if (!str) return undefined
|
|
589
|
-
if (
|
|
589
|
+
if (
|
|
590
|
+
str.startsWith('data:') ||
|
|
591
|
+
str.startsWith('http:') ||
|
|
592
|
+
str.startsWith('https:') ||
|
|
593
|
+
str.startsWith('blob:') ||
|
|
594
|
+
str.startsWith('/') ||
|
|
595
|
+
str.startsWith('./') ||
|
|
596
|
+
str.startsWith('../') ||
|
|
597
|
+
/\.(png|jpe?g|gif|webp|svg|bmp|avif|ico)([?#].*)?$/i.test(str)
|
|
598
|
+
) {
|
|
590
599
|
return str
|
|
591
600
|
}
|
|
592
601
|
return `data:image/png;base64,${str}`
|