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
|
@@ -159,6 +159,8 @@ function handleMaskMouseDown(e: MouseEvent) {
|
|
|
159
159
|
<div
|
|
160
160
|
ref="wrapperRef"
|
|
161
161
|
class="text-reflection-wrapper"
|
|
162
|
+
@mousemove="emit('mousemove', $event)"
|
|
163
|
+
@mouseleave="emit('mouseleave', $event)"
|
|
162
164
|
:style="{
|
|
163
165
|
position: 'relative',
|
|
164
166
|
width: (element.style?.writingMode === 'vertical-rl' || element.style?.writingMode === 'vertical-lr') ? 'auto' : '100%',
|
|
@@ -167,6 +169,7 @@ function handleMaskMouseDown(e: MouseEvent) {
|
|
|
167
169
|
writingMode: element.style?.writingMode || 'horizontal-tb',
|
|
168
170
|
display: 'flex',
|
|
169
171
|
flexDirection: 'column',
|
|
172
|
+
cursor: isReadonly ? 'default' : 'move',
|
|
170
173
|
justifyContent: (element.style?.verticalAlign === 'bottom' || element.style?.verticalAlign === 'down' || element.vAlign === 'down')
|
|
171
174
|
? 'flex-end'
|
|
172
175
|
: ((element.style?.verticalAlign === 'top' || element.style?.verticalAlign === 'up' || element.vAlign === 'up')
|
|
@@ -197,8 +200,6 @@ function handleMaskMouseDown(e: MouseEvent) {
|
|
|
197
200
|
ref="editableRef"
|
|
198
201
|
:id="`editable-${element.id}`"
|
|
199
202
|
:contenteditable="isTable(element) || element.latex ? 'false' : (isTextSelectable ? 'true' : 'false')"
|
|
200
|
-
@mousedown="isTextSelectable ? $event.stopPropagation() : null"
|
|
201
|
-
@click="isTextSelectable ? $event.stopPropagation() : null"
|
|
202
203
|
@focusin="emit('focusin')"
|
|
203
204
|
@focusout="emit('focusout', $event)"
|
|
204
205
|
@input="emit('input', $event)"
|
|
@@ -243,7 +244,7 @@ function handleMaskMouseDown(e: MouseEvent) {
|
|
|
243
244
|
textAlignLast: (element.style?.textAlign === 'distribute' ? 'justify' : 'auto') as any,
|
|
244
245
|
textJustify: (element.style?.textAlign === 'distribute' ? 'inter-character' : 'auto') as any,
|
|
245
246
|
whiteSpace: element.style?.whiteSpace || 'normal',
|
|
246
|
-
cursor: element.latex ? 'move' : (isTable(element) ? (isTextSelectable ? 'text' : 'move') :
|
|
247
|
+
cursor: isReadonly ? 'default' : (element.latex ? 'move' : (isTable(element) ? (isTextSelectable ? 'text' : 'move') : undefined)),
|
|
247
248
|
userSelect: (isTable(element) || element.latex) ? (isTextPaintActive ? 'text' : 'none') : (isTextSelectable ? 'text' : 'none'),
|
|
248
249
|
display: element.content && element.content.includes('License') ? 'inline-block' : 'block',
|
|
249
250
|
writingMode: element.style?.writingMode || 'horizontal-tb',
|
|
@@ -25,70 +25,124 @@ const isDistributeEnabled = computed(() => {
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
<div class="control-group sidebar-align-group"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
28
|
+
<div class="control-group sidebar-align-group">
|
|
29
|
+
<div class="align-buttons-row">
|
|
30
|
+
<!-- Align Left -->
|
|
31
|
+
<button type="button" class="align-tool-btn" title="左对齐" @click="emit('alignLeft')">
|
|
32
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
33
|
+
<rect x="1" y="2" width="1.5" height="12" rx="0.75" />
|
|
34
|
+
<rect x="4.5" y="4" width="8" height="3" rx="1" />
|
|
35
|
+
<rect x="4.5" y="9" width="5" height="3" rx="1" />
|
|
35
36
|
</svg>
|
|
36
|
-
</
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
</button>
|
|
38
|
+
|
|
39
|
+
<!-- Align Center H -->
|
|
40
|
+
<button type="button" class="align-tool-btn" title="水平居中对齐" @click="emit('alignCenter')">
|
|
41
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
42
|
+
<rect x="7.25" y="2" width="1.5" height="12" rx="0.75" />
|
|
43
|
+
<rect x="3" y="4" width="10" height="3" rx="1" />
|
|
44
|
+
<rect x="4.5" y="9" width="7" height="3" rx="1" />
|
|
41
45
|
</svg>
|
|
42
|
-
</
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
</button>
|
|
47
|
+
|
|
48
|
+
<!-- Align Right -->
|
|
49
|
+
<button type="button" class="align-tool-btn" title="右对齐" @click="emit('alignRight')">
|
|
50
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
51
|
+
<rect x="13.5" y="2" width="1.5" height="12" rx="0.75" />
|
|
52
|
+
<rect x="3.5" y="4" width="8" height="3" rx="1" />
|
|
53
|
+
<rect x="6.5" y="9" width="5" height="3" rx="1" />
|
|
47
54
|
</svg>
|
|
48
|
-
</
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
</button>
|
|
56
|
+
|
|
57
|
+
<!-- Align Top -->
|
|
58
|
+
<button type="button" class="align-tool-btn" title="顶对齐" @click="emit('alignTop')">
|
|
59
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
60
|
+
<rect x="2" y="1" width="12" height="1.5" rx="0.75" />
|
|
61
|
+
<rect x="4" y="4.5" width="3" height="8" rx="1" />
|
|
62
|
+
<rect x="9" y="4.5" width="3" height="5" rx="1" />
|
|
53
63
|
</svg>
|
|
54
|
-
</
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
</button>
|
|
65
|
+
|
|
66
|
+
<!-- Align Middle V -->
|
|
67
|
+
<button type="button" class="align-tool-btn" title="垂直居中对齐" @click="emit('alignMiddle')">
|
|
68
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
69
|
+
<rect x="2" y="7.25" width="12" height="1.5" rx="0.75" />
|
|
70
|
+
<rect x="4" y="3" width="3" height="10" rx="1" />
|
|
71
|
+
<rect x="9" y="4.5" width="3" height="7" rx="1" />
|
|
59
72
|
</svg>
|
|
60
|
-
</
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
</button>
|
|
74
|
+
|
|
75
|
+
<!-- Align Bottom -->
|
|
76
|
+
<button type="button" class="align-tool-btn" title="底对齐" @click="emit('alignBottom')">
|
|
77
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
78
|
+
<rect x="2" y="13.5" width="12" height="1.5" rx="0.75" />
|
|
79
|
+
<rect x="4" y="3.5" width="3" height="8" rx="1" />
|
|
80
|
+
<rect x="9" y="6.5" width="3" height="5" rx="1" />
|
|
65
81
|
</svg>
|
|
66
|
-
</
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
</button>
|
|
83
|
+
|
|
84
|
+
<!-- Distribute Horizontally -->
|
|
85
|
+
<button type="button" class="align-tool-btn" title="水平均布" :class="{ disabled: !isDistributeEnabled }"
|
|
86
|
+
@click="isDistributeEnabled && emit('distributeHorizontally')">
|
|
87
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
88
|
+
<rect x="1" y="2" width="1.5" height="12" rx="0.75" />
|
|
89
|
+
<rect x="13.5" y="2" width="1.5" height="12" rx="0.75" />
|
|
90
|
+
<rect x="5.5" y="4.5" width="5" height="7" rx="1" />
|
|
72
91
|
</svg>
|
|
73
|
-
</
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
92
|
+
</button>
|
|
93
|
+
|
|
94
|
+
<!-- Distribute Vertically -->
|
|
95
|
+
<button type="button" class="align-tool-btn" title="垂直均布" :class="{ disabled: !isDistributeEnabled }"
|
|
96
|
+
@click="isDistributeEnabled && emit('distributeVertically')">
|
|
97
|
+
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
|
98
|
+
<rect x="2" y="1" width="12" height="1.5" rx="0.75" />
|
|
99
|
+
<rect x="2" y="13.5" width="12" height="1.5" rx="0.75" />
|
|
100
|
+
<rect x="4.5" y="5.5" width="7" height="5" rx="1" />
|
|
79
101
|
</svg>
|
|
80
|
-
</
|
|
102
|
+
</button>
|
|
81
103
|
</div>
|
|
82
104
|
</div>
|
|
83
105
|
</template>
|
|
84
106
|
|
|
85
107
|
<style scoped>
|
|
86
|
-
.
|
|
87
|
-
|
|
108
|
+
.sidebar-align-group {
|
|
109
|
+
padding: 0 16px;
|
|
110
|
+
margin-top: 10px;
|
|
111
|
+
margin-bottom: 12px;
|
|
112
|
+
border-bottom: 1px solid #f1f5f9;
|
|
113
|
+
padding-bottom: 12px;
|
|
88
114
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
115
|
+
|
|
116
|
+
.align-buttons-row {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
gap: 2px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.align-tool-btn {
|
|
124
|
+
flex: 1;
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
height: 32px;
|
|
129
|
+
border-radius: 6px;
|
|
130
|
+
background: transparent;
|
|
131
|
+
border: none;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
color: #475569;
|
|
134
|
+
padding: 0;
|
|
135
|
+
transition: all 0.15s ease;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.align-tool-btn:hover:not(.disabled) {
|
|
139
|
+
background-color: #f1f5f9;
|
|
140
|
+
color: #1e293b;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.align-tool-btn.disabled {
|
|
144
|
+
opacity: 0.3;
|
|
145
|
+
cursor: not-allowed;
|
|
92
146
|
pointer-events: none;
|
|
93
147
|
}
|
|
94
148
|
</style>
|