aegon-lv97 1.0.0

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 (78) hide show
  1. package/gen-ai/build-report/chartStreamRefs.ts +227 -0
  2. package/gen-ai/build-report/coherence-check/index.vue +559 -0
  3. package/gen-ai/build-report/components/ReportChapterWorkspace.vue +4571 -0
  4. package/gen-ai/build-report/components/ReportConfigPanel.vue +727 -0
  5. package/gen-ai/build-report/components/ReportGenerateSettingsPanel.vue +2361 -0
  6. package/gen-ai/build-report/components/ReportGeneratingPanel.vue +1765 -0
  7. package/gen-ai/build-report/components/ReportPromptPanel.vue +625 -0
  8. package/gen-ai/build-report/components/ReportSourceFileSummary.vue +665 -0
  9. package/gen-ai/build-report/components/ReportSourcesPanel.vue +1327 -0
  10. package/gen-ai/build-report/components/ReportTemplateDetail.vue +191 -0
  11. package/gen-ai/build-report/components/ReportTemplateEditorFormPanel.vue +667 -0
  12. package/gen-ai/build-report/components/ReportTemplatePicker.vue +302 -0
  13. package/gen-ai/build-report/components/ReportWorkflowSidebar.vue +148 -0
  14. package/gen-ai/build-report/components/paramsSetting.vue +886 -0
  15. package/gen-ai/build-report/components/reportEdit.vue +2283 -0
  16. package/gen-ai/build-report/index.vue +856 -0
  17. package/gen-ai/build-report/report-domain.ts +1133 -0
  18. package/gen-ai/build-report/report-template-data.ts +295 -0
  19. package/gen-ai/build-report/useReportWorkflow.ts +1386 -0
  20. package/gen-ai/common/assets/NotoSans-SC.woff2 +0 -0
  21. package/gen-ai/common/assets/NotoSans-TC.woff2 +0 -0
  22. package/gen-ai/common/assets/NotoSans.woff2 +0 -0
  23. package/gen-ai/common/assets/fonts.css +278 -0
  24. package/gen-ai/common/assets/pagination.css +163 -0
  25. package/gen-ai/common/directives/btnLoading.ts +455 -0
  26. package/gen-ai/common/directives/debounce.ts +98 -0
  27. package/gen-ai/common/directives/index.ts +30 -0
  28. package/gen-ai/common/en.md +417 -0
  29. package/gen-ai/common/index.ts +36 -0
  30. package/gen-ai/common/types/component-expose.ts +9 -0
  31. package/gen-ai/common/utils/api-res-status.ts +7 -0
  32. package/gen-ai/common/utils/navigation.ts +59 -0
  33. package/gen-ai/common/utils/remote-request.ts +45 -0
  34. package/gen-ai/common/utils/scroll.ts +577 -0
  35. package/gen-ai/components/AIExport/docx-export.ts +950 -0
  36. package/gen-ai/components/AIExport/docxExport.ts +2566 -0
  37. package/gen-ai/components/AIExport/index.ts +52 -0
  38. package/gen-ai/components/AIExport/parseMarkdownHtml.ts +653 -0
  39. package/gen-ai/components/CapsuleScrollbar.vue +149 -0
  40. package/gen-ai/components/ChapterTitleScroll.vue +468 -0
  41. package/gen-ai/components/EntryHeroNavCards.vue +379 -0
  42. package/gen-ai/components/GenAiPagination.vue +52 -0
  43. package/gen-ai/components/ModelCard.vue +1114 -0
  44. package/gen-ai/components/Preview/FilePreviewPage.vue +949 -0
  45. package/gen-ai/components/Preview/PreviewCapsuleScroll.vue +205 -0
  46. package/gen-ai/components/Preview/PreviewOutlineTree.vue +148 -0
  47. package/gen-ai/components/Preview/index.ts +11 -0
  48. package/gen-ai/components/Preview/preview.ts +724 -0
  49. package/gen-ai/components/PromptField.vue +505 -0
  50. package/gen-ai/components/RecentReportsTable.vue +974 -0
  51. package/gen-ai/components/ReportCollapsibleSection.vue +172 -0
  52. package/gen-ai/components/ReportHistoryList.vue +637 -0
  53. package/gen-ai/components/ReportSectionConfirmPopover.vue +251 -0
  54. package/gen-ai/components/editor/ChapterTiptapEditor.vue +3718 -0
  55. package/gen-ai/components/editor/StructureBlockView.vue +441 -0
  56. package/gen-ai/components/editor/TiptapToolbar.vue +1036 -0
  57. package/gen-ai/components/editor/TypewriterDocEditor.vue +422 -0
  58. package/gen-ai/components/editor/_StructureOrgNode.vue +326 -0
  59. package/gen-ai/components/editor/index.ts +28 -0
  60. package/gen-ai/components/editor/parseMarkdownHtml.ts +754 -0
  61. package/gen-ai/components/editor/reviewCitationTip.ts +163 -0
  62. package/gen-ai/gen-entry/api/index.ts +32 -0
  63. package/gen-ai/gen-entry/index.vue +287 -0
  64. package/gen-ai/gen-entry/types/index.ts +4 -0
  65. package/gen-ai/i.mark +2 -0
  66. package/gen-ai/management-center/index.vue +1815 -0
  67. package/gen-ai/management-center/mockData.ts +248 -0
  68. package/gen-ai/management-center/types/index.ts +37 -0
  69. package/gen-ai/model-manager/TemplateEditorFormPanel.vue +661 -0
  70. package/gen-ai/model-manager/api/index.ts +32 -0
  71. package/gen-ai/model-manager/api/mockApi.ts +33 -0
  72. package/gen-ai/model-manager/index.vue +1583 -0
  73. package/gen-ai/model-manager/mockData.ts +177 -0
  74. package/gen-ai/model-manager/template-detail-shared.ts +154 -0
  75. package/gen-ai/model-manager/template-editor.vue +345 -0
  76. package/gen-ai/model-manager/types/index.ts +40 -0
  77. package/gen-ai/model-manager/utils.ts +25 -0
  78. package/package.json +12 -0
@@ -0,0 +1,251 @@
1
+ <template>
2
+ <el-popover
3
+ :visible="visible"
4
+ :virtual-ref="virtualRef"
5
+ placement="bottom-start"
6
+ :width="popoverWidth"
7
+ :popper-options="popperOptions"
8
+ :popper-style="popperStyle"
9
+ popper-class="report-config-popover"
10
+ :transition="instant ? 'report-config-popover-instant' : 'report-config-popover-fade'"
11
+ :gpu-acceleration="false"
12
+ :teleported="true"
13
+ >
14
+ <div class="report-section-confirm">
15
+ <h4 class="report-section-confirm__title">{{ title }}</h4>
16
+ <p class="report-section-confirm__message">{{ message }}</p>
17
+ <div class="report-section-confirm__actions">
18
+ <button type="button" class="report-section-confirm__btn" @click="emit('cancel')">
19
+ 取消
20
+ </button>
21
+ <button
22
+ type="button"
23
+ class="report-section-confirm__btn report-section-confirm__btn--primary"
24
+ @click="emit('confirm')"
25
+ >
26
+ 確認
27
+ </button>
28
+ </div>
29
+ </div>
30
+ </el-popover>
31
+ </template>
32
+
33
+ <script setup lang="ts">
34
+ import { ElPopover } from 'element-plus'
35
+ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
36
+
37
+ const props = withDefaults(
38
+ defineProps<{
39
+ visible: boolean
40
+ virtualRef: HTMLElement | null
41
+ boundaryEl: HTMLElement | null
42
+ triggerBtn?: HTMLElement | null
43
+ title?: string
44
+ message: string
45
+ instant?: boolean
46
+ }>(),
47
+ {
48
+ title: '確認刪除',
49
+ triggerBtn: null,
50
+ instant: false,
51
+ }
52
+ )
53
+
54
+ const emit = defineEmits<{
55
+ confirm: []
56
+ cancel: []
57
+ }>()
58
+
59
+ const popoverWidthPx = ref(240)
60
+ const arrowAlignKey = ref(0)
61
+ const popoverWidth = computed(() => popoverWidthPx.value)
62
+
63
+ function getSectionContentInsets() {
64
+ if (!props.boundaryEl) return { paddingLeft: 0, contentWidth: 240 }
65
+ const styles = getComputedStyle(props.boundaryEl)
66
+ const paddingLeft = parseFloat(styles.paddingLeft)
67
+ const paddingRight = parseFloat(styles.paddingRight)
68
+ return {
69
+ paddingLeft,
70
+ contentWidth: Math.round(props.boundaryEl.clientWidth - paddingLeft - paddingRight),
71
+ }
72
+ }
73
+
74
+ function getHorizontalSkid(): number {
75
+ if (!props.virtualRef || !props.boundaryEl) return 0
76
+ const { paddingLeft } = getSectionContentInsets()
77
+ const sectionRect = props.boundaryEl.getBoundingClientRect()
78
+ const anchorRect = props.virtualRef.getBoundingClientRect()
79
+ return Math.round(sectionRect.left + paddingLeft - anchorRect.left)
80
+ }
81
+
82
+ function syncLayout() {
83
+ if (!props.boundaryEl) return
84
+ const { contentWidth } = getSectionContentInsets()
85
+ popoverWidthPx.value = contentWidth
86
+ arrowAlignKey.value += 1
87
+ }
88
+
89
+ const popperStyle = computed(() => {
90
+ void arrowAlignKey.value
91
+ const sectionEl = props.boundaryEl
92
+ const triggerBtn = props.triggerBtn ?? props.virtualRef
93
+ if (!triggerBtn || !sectionEl) return {}
94
+ const sectionRect = sectionEl.getBoundingClientRect()
95
+ const { paddingLeft } = getSectionContentInsets()
96
+ const btnRect = triggerBtn.getBoundingClientRect()
97
+ const popperLeft = sectionRect.left + paddingLeft
98
+ const left = btnRect.left + btnRect.width / 2 - popperLeft - 8
99
+ return { '--report-config-arrow-left': `${left}px` }
100
+ })
101
+
102
+ const popperOptions = computed(() => {
103
+ void arrowAlignKey.value
104
+ return {
105
+ modifiers: [
106
+ {
107
+ name: 'preventOverflow',
108
+ options: {
109
+ boundary: props.boundaryEl ?? 'viewport',
110
+ padding: 0,
111
+ altAxis: true,
112
+ },
113
+ },
114
+ {
115
+ name: 'flip',
116
+ enabled: false,
117
+ },
118
+ {
119
+ name: 'offset',
120
+ options: {
121
+ offset: [getHorizontalSkid(), 8],
122
+ },
123
+ },
124
+ ],
125
+ }
126
+ })
127
+
128
+ watch(
129
+ () => props.visible,
130
+ (open) => {
131
+ if (open) {
132
+ syncLayout()
133
+ void nextTick(() => {
134
+ arrowAlignKey.value += 1
135
+ })
136
+ }
137
+ }
138
+ )
139
+
140
+ watch(
141
+ () => props.boundaryEl,
142
+ () => syncLayout()
143
+ )
144
+
145
+ watch(
146
+ () => props.virtualRef,
147
+ () => syncLayout()
148
+ )
149
+
150
+ let resizeObserver: ResizeObserver | null = null
151
+
152
+ onMounted(() => {
153
+ syncLayout()
154
+ if (props.boundaryEl) {
155
+ resizeObserver = new ResizeObserver(() => syncLayout())
156
+ resizeObserver.observe(props.boundaryEl)
157
+ }
158
+ window.addEventListener('resize', syncLayout)
159
+ })
160
+
161
+ onUnmounted(() => {
162
+ resizeObserver?.disconnect()
163
+ window.removeEventListener('resize', syncLayout)
164
+ })
165
+ </script>
166
+
167
+ <style scoped>
168
+ .report-section-confirm__title {
169
+ margin: 0 0 8px;
170
+ font-size: 14px;
171
+ font-weight: 700;
172
+ color: #303133;
173
+ }
174
+
175
+ .report-section-confirm__message {
176
+ margin: 0;
177
+ font-size: 13px;
178
+ line-height: 1.5;
179
+ color: #606266;
180
+ word-break: break-word;
181
+ }
182
+
183
+ .report-section-confirm__actions {
184
+ display: flex;
185
+ justify-content: flex-end;
186
+ gap: 8px;
187
+ margin-top: 12px;
188
+ }
189
+
190
+ .report-section-confirm__btn {
191
+ min-width: 72px;
192
+ padding: 6px 10px;
193
+ border: 1px solid #dcdfe6;
194
+ border-radius: 4px;
195
+ background: #fff;
196
+ font-size: 12px;
197
+ color: #606266;
198
+ cursor: pointer;
199
+ }
200
+
201
+ .report-section-confirm__btn--primary {
202
+ border-color: #c53355;
203
+ background: #c53355;
204
+ color: #fff;
205
+ }
206
+
207
+ .report-section-confirm__btn--primary:hover {
208
+ background: #fff;
209
+ color: #c53355;
210
+ }
211
+ </style>
212
+
213
+ <style>
214
+ .report-config-popover.el-popover.el-popper {
215
+ max-width: 100%;
216
+ padding: 12px;
217
+ box-sizing: border-box;
218
+ overflow: hidden;
219
+ }
220
+
221
+ .report-config-popover.el-popper[data-popper-placement^='bottom'] .el-popper__arrow {
222
+ left: var(--report-config-arrow-left) !important;
223
+ right: auto !important;
224
+ top: -6px !important;
225
+ transform: translateX(-50%) !important;
226
+ }
227
+
228
+ .report-config-popover.el-popper[data-popper-placement^='bottom'] .el-popper__arrow::before {
229
+ bottom: -1px;
230
+ }
231
+
232
+ .report-config-popover-fade-enter-active,
233
+ .report-config-popover-fade-leave-active {
234
+ transition: opacity 0.12s ease;
235
+ }
236
+
237
+ .report-config-popover-fade-enter-from,
238
+ .report-config-popover-fade-leave-to {
239
+ opacity: 0;
240
+ }
241
+
242
+ .report-config-popover-instant-enter-active,
243
+ .report-config-popover-instant-leave-active {
244
+ transition: none !important;
245
+ }
246
+
247
+ .report-config-popover-instant-enter-from,
248
+ .report-config-popover-instant-leave-to {
249
+ opacity: 0;
250
+ }
251
+ </style>