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.
Files changed (67) hide show
  1. package/dist/lib/check_imgs.html +18 -0
  2. package/dist/lib/jvs-ppt-ui/iconfont/iconfont.css +187 -27
  3. package/dist/lib/jvs-ppt-ui/iconfont/iconfont.js +1 -1
  4. package/dist/lib/jvs-ppt-ui/iconfont/iconfont.json +345 -65
  5. package/dist/lib/jvs-ppt-ui/iconfont/iconfont.ttf +0 -0
  6. package/dist/lib/jvs-ppt-ui/iconfont/iconfont.woff +0 -0
  7. package/dist/lib/jvs-ppt-ui/iconfont/iconfont.woff2 +0 -0
  8. package/dist/lib/jvs-ppt-ui/img/al.png +0 -0
  9. package/dist/lib/jvs-ppt-ui/img/d.png +0 -0
  10. package/dist/lib/jvs-ppt-ui/img/dl.png +0 -0
  11. package/dist/lib/jvs-ppt-ui/img/l.png +0 -0
  12. package/dist/lib/jvs-ppt-ui.es.js +44973 -43349
  13. package/dist/lib/jvs-ppt-ui.umd.js +102 -102
  14. package/dist/lib/style.css +1 -1
  15. package/package.json +1 -1
  16. package/scripts/check-icons.mjs +22 -0
  17. package/scripts/patch-anim-icons.mjs +45 -0
  18. package/src/assets/iconfont/iconfont.css +187 -27
  19. package/src/assets/iconfont/iconfont.js +1 -1
  20. package/src/assets/iconfont/iconfont.json +345 -65
  21. package/src/assets/iconfont/iconfont.ttf +0 -0
  22. package/src/assets/iconfont/iconfont.woff +0 -0
  23. package/src/assets/iconfont/iconfont.woff2 +0 -0
  24. package/src/components/CanvasArea.vue +218 -193
  25. package/src/components/ChartTypeSelector.vue +509 -148
  26. package/src/components/Header.vue +327 -44
  27. package/src/components/PresentationGroupChild.vue +44 -13
  28. package/src/components/PresentationMode.vue +84 -33
  29. package/src/components/QuickBorderPopover.vue +51 -11
  30. package/src/components/QuickColorPopover.vue +65 -21
  31. package/src/components/SidebarLeft.vue +286 -107
  32. package/src/components/SidebarRight.vue +45 -38
  33. package/src/components/TemplateGallery.vue +1110 -1237
  34. package/src/components/ToastNotification.vue +2 -2
  35. package/src/components/Toolbar.vue +825 -733
  36. package/src/components/canvas/CanvasQuickToolbar.vue +17 -30
  37. package/src/components/canvas/elements/CanvasGroupElement.vue +6 -0
  38. package/src/components/canvas/elements/CanvasShapeElement.vue +198 -38
  39. package/src/components/canvas/elements/CanvasTextElement.vue +4 -3
  40. package/src/components/sidebar/common/SidebarAlignGroup.vue +104 -50
  41. package/src/components/sidebar/common/SidebarBorderAccordion.vue +375 -148
  42. package/src/components/sidebar/common/SidebarPositionGroup.vue +358 -149
  43. package/src/components/sidebar/common/SidebarReflectionAccordion.vue +429 -203
  44. package/src/components/sidebar/common/SidebarShadowAccordion.vue +844 -416
  45. package/src/components/sidebar/panels/GradientEditor.vue +671 -316
  46. package/src/components/sidebar/panels/LayoutThumbSvg.vue +33 -16
  47. package/src/components/sidebar/panels/SidebarAnimationPanel.vue +701 -138
  48. package/src/components/sidebar/panels/SidebarChartFormatPanel.vue +3 -3
  49. package/src/components/sidebar/panels/SidebarDesignPanel.vue +1754 -416
  50. package/src/components/sidebar/panels/SidebarMediaFormatPanel.vue +12 -0
  51. package/src/components/sidebar/panels/SidebarShapeFormatPanel.vue +813 -174
  52. package/src/components/sidebar/panels/SidebarTableFormatPanel.vue +2 -2
  53. package/src/components/sidebar/panels/SidebarTextFormatPanel.vue +1938 -1427
  54. package/src/components/sidebar/panels/SidebarTransitionPanel.vue +791 -210
  55. package/src/composables/canvas/useCanvasShortcuts.ts +20 -6
  56. package/src/composables/canvas/useCanvasText.ts +1 -1
  57. package/src/composables/canvas/useCanvasTransform.ts +44 -0
  58. package/src/composables/presetThemes.ts +43 -44
  59. package/src/composables/sidebar/useSidebarAnimation.ts +101 -25
  60. package/src/composables/sidebar/useSidebarDesign.ts +30 -11
  61. package/src/composables/sidebar/useSidebarElementTransform.ts +10 -1
  62. package/src/composables/sidebar/useSidebarImage.ts +10 -2
  63. package/src/composables/sidebar/useSidebarShapeFormat.ts +562 -107
  64. package/src/composables/useSlides.ts +331 -153
  65. package/src/main.ts +2 -0
  66. package/src/style.css +926 -359
  67. 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') : (isTextSelectable ? 'text' : 'default')),
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
- style="padding: 0 16px; margin-top: 12px; margin-bottom: 8px; border-bottom: 1px solid #EEEFF0; padding-bottom: 12px;">
30
- <div style="display: flex; gap: 4px; align-items: center; justify-content: space-between;">
31
- <div class="grid-btn" title="左对齐" @click="emit('alignLeft')"
32
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
33
- <svg class="icon" style="width: 16px; height: 16px;">
34
- <use xlink:href="#icon-zuoduiqi"></use>
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
- </div>
37
- <div class="grid-btn" title="水平居中对齐" @click="emit('alignCenter')"
38
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
39
- <svg class="icon" style="width: 16px; height: 16px;">
40
- <use xlink:href="#icon-zuoyoujuzhongduiqi"></use>
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
- </div>
43
- <div class="grid-btn" title="右对齐" @click="emit('alignRight')"
44
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
45
- <svg class="icon" style="width: 16px; height: 16px;">
46
- <use xlink:href="#icon-youduiqi1"></use>
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
- </div>
49
- <div class="grid-btn" title="顶对齐" @click="emit('alignTop')"
50
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
51
- <svg class="icon" style="width: 16px; height: 16px;">
52
- <use xlink:href="#icon-dingduiqi"></use>
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
- </div>
55
- <div class="grid-btn" title="垂直居中对齐" @click="emit('alignMiddle')"
56
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
57
- <svg class="icon" style="width: 16px; height: 16px;">
58
- <use xlink:href="#icon-shangxiajuzhongduiqi"></use>
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
- </div>
61
- <div class="grid-btn" title="底对齐" @click="emit('alignBottom')"
62
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
63
- <svg class="icon" style="width: 16px; height: 16px;">
64
- <use xlink:href="#icon-diduiqi"></use>
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
- </div>
67
- <div class="grid-btn" title="水平均布" :class="{ disabled: !isDistributeEnabled }"
68
- @click="isDistributeEnabled && emit('distributeHorizontally')"
69
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
70
- <svg class="icon" style="width: 16px; height: 16px;">
71
- <use xlink:href="#icon-shuipingpingjunfenbu"></use>
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
- </div>
74
- <div class="grid-btn" title="垂直均布" :class="{ disabled: !isDistributeEnabled }"
75
- @click="isDistributeEnabled && emit('distributeVertically')"
76
- style="flex: 1; display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 4px; background: transparent; cursor: pointer; color: var(--text-primary);">
77
- <svg class="icon" style="width: 16px; height: 16px;">
78
- <use xlink:href="#icon-chuizhipingjunfenbu"></use>
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
- </div>
102
+ </button>
81
103
  </div>
82
104
  </div>
83
105
  </template>
84
106
 
85
107
  <style scoped>
86
- .grid-btn:hover:not(.disabled) {
87
- background-color: var(--hover-bg, #f1f5f9) !important;
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
- .grid-btn.disabled {
90
- opacity: 0.35;
91
- cursor: not-allowed !important;
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>