jvs-ppt-ui 0.0.8 → 0.0.10
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/README.md +60 -2
- package/dist/lib/jvs-ppt-ui.es.js +22404 -21454
- package/dist/lib/jvs-ppt-ui.umd.js +102 -101
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +53 -53
- package/src/components/AIPptDialog.vue +2 -0
- package/src/components/CanvasArea.vue +164 -72
- package/src/components/Header.vue +374 -144
- package/src/components/PptEditor.vue +33 -15
- package/src/components/PresentationMode.vue +24 -4
- package/src/components/SidebarRight.vue +8 -1
- package/src/components/SvgChart.vue +5 -2
- package/src/components/TemplateGallery.vue +1321 -866
- package/src/components/Toolbar.vue +244 -22
- package/src/components/canvas/CanvasTransformHandles.vue +5 -1
- package/src/components/canvas/elements/CanvasShapeElement.vue +98 -19
- package/src/components/canvas/elements/CanvasTextElement.vue +39 -9
- package/src/components/canvas/textSelectionOverlay.ts +305 -0
- package/src/composables/canvas/useCanvasAlignment.ts +286 -238
- package/src/composables/canvas/useCanvasContextMenu.ts +53 -22
- package/src/composables/canvas/useCanvasFormatting.ts +35 -12
- package/src/composables/canvas/useCanvasTable.ts +52 -24
- package/src/composables/canvas/useCanvasText.ts +12 -0
- package/src/composables/canvas/useCanvasTransform.ts +15 -2
- package/src/composables/sidebar/useSidebarElementTransform.ts +5 -5
- package/src/composables/sidebar/useSidebarShapeFormat.ts +2 -2
- package/src/composables/useSlides.ts +495 -132
- package/src/style.css +88 -0
- package/src/types/index.ts +8 -0
- package/src/utils/line.ts +274 -312
- package/src/utils/pptxShapes.ts +1 -1
- package/src/utils/pptxShapesLazy.ts +39 -0
- package/src/utils/svgPathParser.ts +12 -1
package/src/style.css
CHANGED
|
@@ -50,6 +50,68 @@
|
|
|
50
50
|
padding: 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/* -------------------------------------------------------------
|
|
54
|
+
* 🛡️ [CSS Defensive Shield] 容器级样式防御屏障
|
|
55
|
+
* 彻底切断外部宿主全局样式(如 button, svg, *, line-height 等)的侵入
|
|
56
|
+
* ------------------------------------------------------------- */
|
|
57
|
+
.jvs-ppt-editor-root {
|
|
58
|
+
font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
|
|
59
|
+
font-size: 14px !important;
|
|
60
|
+
line-height: 1.5 !important;
|
|
61
|
+
color: #0f172a !important;
|
|
62
|
+
text-align: left !important;
|
|
63
|
+
letter-spacing: normal !important;
|
|
64
|
+
word-spacing: normal !important;
|
|
65
|
+
box-sizing: border-box !important;
|
|
66
|
+
-webkit-font-smoothing: antialiased !important;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.jvs-ppt-editor-root *,
|
|
70
|
+
.jvs-ppt-editor-root *::before,
|
|
71
|
+
.jvs-ppt-editor-root *::after {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* 强行重置外部宿主全局 button 样式侵入 */
|
|
76
|
+
.jvs-ppt-editor-root button {
|
|
77
|
+
font-family: inherit;
|
|
78
|
+
font-size: inherit;
|
|
79
|
+
line-height: normal;
|
|
80
|
+
text-transform: none;
|
|
81
|
+
margin: 0;
|
|
82
|
+
border: none;
|
|
83
|
+
background: transparent;
|
|
84
|
+
outline: none;
|
|
85
|
+
box-shadow: none;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
-webkit-appearance: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* 强行重置外部宿主全局 svg 样式侵入 */
|
|
91
|
+
.jvs-ppt-editor-root svg {
|
|
92
|
+
display: inline-block;
|
|
93
|
+
vertical-align: middle;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* 强行重置外部宿主全局 a 标签样式侵入 */
|
|
97
|
+
.jvs-ppt-editor-root a {
|
|
98
|
+
color: inherit;
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* 强行重置外部宿主全局 button 样式侵入(防 text-indent, line-height, text-transform, pseudo elements) */
|
|
103
|
+
.jvs-ppt-editor-root button {
|
|
104
|
+
box-sizing: border-box !important;
|
|
105
|
+
text-transform: none !important;
|
|
106
|
+
text-indent: 0 !important;
|
|
107
|
+
letter-spacing: normal !important;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.jvs-ppt-editor-root button::before,
|
|
111
|
+
.jvs-ppt-editor-root button::after {
|
|
112
|
+
content: none !important;
|
|
113
|
+
}
|
|
114
|
+
|
|
53
115
|
button,
|
|
54
116
|
select,
|
|
55
117
|
input,
|
|
@@ -1024,6 +1086,12 @@ td.selected-cell,
|
|
|
1024
1086
|
outline: none !important;
|
|
1025
1087
|
}
|
|
1026
1088
|
|
|
1089
|
+
/* 焦点(光标)所在的唯一选中格:不显示选中蒙层,避免"光标在单元格里还显示选中效果" */
|
|
1090
|
+
td.selected-cell.focused-cell,
|
|
1091
|
+
.canvas-element td.selected-cell.focused-cell {
|
|
1092
|
+
background-image: none !important;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1027
1095
|
.table-tick-dot {
|
|
1028
1096
|
width: 6px !important;
|
|
1029
1097
|
height: 6px !important;
|
|
@@ -4013,6 +4081,26 @@ td.selected-cell,
|
|
|
4013
4081
|
background-color: rgba(100, 116, 139, 0.45) !important;
|
|
4014
4082
|
}
|
|
4015
4083
|
|
|
4084
|
+
/* 画布编辑态自绘选区高亮:原生 ::selection 的几何跟随行盒/字体度量
|
|
4085
|
+
(CJK 回退字体 ascent 偏大 → 高亮条顶空白过多、行间空白带宽),
|
|
4086
|
+
CSS 无法控制其几何,故编辑态改用 overlay 绘制并隐藏原生高亮。
|
|
4087
|
+
.text-selection-overlay-active 挂在与 editable 同坐标系的宿主上,
|
|
4088
|
+
只有 overlay 成功画出条时才添加,失败自动回落原生表现。 */
|
|
4089
|
+
.text-selection-overlay-active ::selection {
|
|
4090
|
+
background-color: transparent !important;
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
.text-selection-overlay {
|
|
4094
|
+
pointer-events: none;
|
|
4095
|
+
}
|
|
4096
|
+
|
|
4097
|
+
.text-selection-bar {
|
|
4098
|
+
position: absolute;
|
|
4099
|
+
background-color: rgba(100, 116, 139, 0.45);
|
|
4100
|
+
border-radius: 2px;
|
|
4101
|
+
box-sizing: border-box;
|
|
4102
|
+
}
|
|
4103
|
+
|
|
4016
4104
|
/* Custom cursor for format painter mode */
|
|
4017
4105
|
.main-slide.format-painting-mode,
|
|
4018
4106
|
.main-slide.format-painting-mode * {
|
package/src/types/index.ts
CHANGED
|
@@ -92,6 +92,10 @@ export type CustomUploadHandler = (
|
|
|
92
92
|
export interface PptEditorConfig {
|
|
93
93
|
/** 演示文稿初始标题 */
|
|
94
94
|
title?: string
|
|
95
|
+
/** 是否显示左上角主菜单按钮(导入/导出/快捷键等弹窗菜单),默认为 true */
|
|
96
|
+
showMenu?: boolean
|
|
97
|
+
/** 工具栏布局模式:'auto' (自适应折叠)、'more' (收纳更多功能模式,适合弹窗/小屏)、'full' (全展开),默认为 'auto' */
|
|
98
|
+
toolbarMode?: 'auto' | 'more' | 'full'
|
|
95
99
|
/** 是否启用 AI PPT 智能生成与一键美化功能。未配置或为 false 时不显示一键美化功能 */
|
|
96
100
|
enableAi?: boolean
|
|
97
101
|
/** AI 一键美化请求接口地址。如果未配置或未开启,则不显示一键美化功能 */
|
|
@@ -138,6 +142,10 @@ export interface PptEditorProps {
|
|
|
138
142
|
readonly?: boolean
|
|
139
143
|
/** 是否显示顶部导航与工具栏 */
|
|
140
144
|
showHeader?: boolean
|
|
145
|
+
/** 是否显示左上角主菜单按钮(导入/导出/快捷键等弹窗菜单),默认为 true */
|
|
146
|
+
showMenu?: boolean
|
|
147
|
+
/** 工具栏布局模式:'auto' (自适应折叠)、'more' (收纳更多功能模式,适合弹窗/小屏)、'full' (全展开),默认为 'auto' */
|
|
148
|
+
toolbarMode?: 'auto' | 'more' | 'full'
|
|
141
149
|
/** 是否显示左侧缩略图导航栏 */
|
|
142
150
|
showSidebarLeft?: boolean
|
|
143
151
|
/** 是否显示右侧属性面板 */
|