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,379 @@
1
+ <template>
2
+ <div class="entry-hero-nav">
3
+ <button
4
+ v-for="action in ENTRY_HERO_NAV_ACTIONS"
5
+ :key="action.id"
6
+ type="button"
7
+ class="entry-hero-nav__card"
8
+ @click="$emit('select', action.id)"
9
+ >
10
+ <span
11
+ v-if="badgeText(action.id)"
12
+ class="entry-hero-nav__badge"
13
+ :title="`待查看 ${pendingOf(action.id)}`"
14
+ >
15
+ {{ badgeText(action.id) }}
16
+ </span>
17
+
18
+ <div class="entry-hero-nav__visual" aria-hidden="true">
19
+ <span
20
+ v-for="(spark, i) in action.sparks"
21
+ :key="i"
22
+ class="entry-hero-nav__spark"
23
+ :class="spark.kind"
24
+ :style="{
25
+ top: spark.top,
26
+ left: spark.left,
27
+ right: spark.right,
28
+ bottom: spark.bottom,
29
+ width: spark.size,
30
+ height: spark.size,
31
+ opacity: spark.opacity,
32
+ }"
33
+ />
34
+ <span class="entry-hero-nav__icon">
35
+ <svg
36
+ v-if="action.id === 'new-report'"
37
+ viewBox="0 0 72 72"
38
+ fill="none"
39
+ xmlns="http://www.w3.org/2000/svg"
40
+ >
41
+ <path
42
+ d="M20 12h22l12 12v36c0 1.7-1.3 3-3 3H20c-1.7 0-3-1.3-3-3V15c0-1.7 1.3-3 3-3Z"
43
+ stroke="currentColor"
44
+ stroke-width="4"
45
+ stroke-linejoin="round"
46
+ />
47
+ <path d="M42 12v12h12" stroke="currentColor" stroke-width="4" stroke-linejoin="round" />
48
+ <path d="M27 34h14" stroke="currentColor" stroke-width="4" stroke-linecap="round" />
49
+ <path
50
+ d="M40 42 52.5 29.5l5 5L45 47l-6.2 1.2L40 42Z"
51
+ stroke="currentColor"
52
+ stroke-width="4"
53
+ stroke-linejoin="round"
54
+ />
55
+ <path
56
+ d="M50.2 31.8 55.2 36.8"
57
+ stroke="currentColor"
58
+ stroke-width="4"
59
+ stroke-linecap="round"
60
+ />
61
+ </svg>
62
+
63
+ <svg
64
+ v-else-if="action.id === 'report-sim'"
65
+ viewBox="0 0 72 72"
66
+ fill="none"
67
+ xmlns="http://www.w3.org/2000/svg"
68
+ >
69
+ <path
70
+ d="M20 12h22l12 12v36c0 1.7-1.3 3-3 3H20c-1.7 0-3-1.3-3-3V15c0-1.7 1.3-3 3-3Z"
71
+ stroke="currentColor"
72
+ stroke-width="4"
73
+ stroke-linejoin="round"
74
+ />
75
+ <path d="M42 12v12h12" stroke="currentColor" stroke-width="4" stroke-linejoin="round" />
76
+ <path
77
+ d="M26 32h6M38 32h8M26 40h6M38 40h8M26 48h6M38 48h5"
78
+ stroke="currentColor"
79
+ stroke-width="4"
80
+ stroke-linecap="round"
81
+ />
82
+ </svg>
83
+
84
+ <svg
85
+ v-else-if="action.id === 'template-sim'"
86
+ viewBox="0 0 72 72"
87
+ fill="none"
88
+ xmlns="http://www.w3.org/2000/svg"
89
+ >
90
+ <path d="M16 16h28" stroke="currentColor" stroke-width="4" stroke-linecap="round" />
91
+ <path d="M20 24h28" stroke="currentColor" stroke-width="4" stroke-linecap="round" />
92
+ <path
93
+ d="M24 30h24l10 10v26c0 1.7-1.3 3-3 3H24c-1.7 0-3-1.3-3-3V33c0-1.7 1.3-3 3-3Z"
94
+ stroke="currentColor"
95
+ stroke-width="4"
96
+ stroke-linejoin="round"
97
+ />
98
+ <path d="M48 30v10h10" stroke="currentColor" stroke-width="4" stroke-linejoin="round" />
99
+ <path
100
+ d="M30 46h16M30 54h12"
101
+ stroke="currentColor"
102
+ stroke-width="4"
103
+ stroke-linecap="round"
104
+ />
105
+ </svg>
106
+
107
+ <svg v-else viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
108
+ <rect
109
+ x="14"
110
+ y="14"
111
+ width="44"
112
+ height="44"
113
+ rx="10"
114
+ stroke="currentColor"
115
+ stroke-width="4"
116
+ />
117
+ <circle cx="36" cy="36" r="7" stroke="currentColor" stroke-width="4" />
118
+ <path
119
+ d="M36 22v4.2M36 45.8V50M50 36h-4.2M22 36h4.2M46.2 25.8l-3 3M28.8 43.2l-3 3M46.2 46.2l-3-3M28.8 28.8l-3-3"
120
+ stroke="currentColor"
121
+ stroke-width="4"
122
+ stroke-linecap="round"
123
+ />
124
+ </svg>
125
+ </span>
126
+ </div>
127
+ <div class="entry-hero-nav__label">{{ action.label }}</div>
128
+ </button>
129
+ </div>
130
+ </template>
131
+
132
+ <script lang="ts">
133
+ export type EntryHeroNavId = 'new-report' | 'report-sim' | 'template-sim' | 'admin-sim'
134
+
135
+ export type EntryHeroPendingCounts = Partial<Record<EntryHeroNavId, number>>
136
+
137
+ type Spark = {
138
+ kind: 'dot' | 'ring' | 'plus'
139
+ top?: string
140
+ left?: string
141
+ right?: string
142
+ bottom?: string
143
+ size?: string
144
+ opacity?: number
145
+ }
146
+
147
+ const SPARKS_A: Spark[] = [
148
+ { kind: 'dot', top: '18%', left: '18%', size: '6px', opacity: 0.9 },
149
+ { kind: 'dot', top: '14%', right: '22%', size: '4px', opacity: 0.55 },
150
+ { kind: 'ring', top: '28%', right: '16%', size: '8px', opacity: 0.7 },
151
+ { kind: 'dot', bottom: '22%', left: '20%', size: '5px', opacity: 0.65 },
152
+ { kind: 'plus', bottom: '18%', right: '18%', size: '10px', opacity: 0.75 },
153
+ { kind: 'dot', top: '42%', left: '12%', size: '3px', opacity: 0.4 },
154
+ ]
155
+
156
+ export const ENTRY_HERO_NAV_ACTIONS: { id: EntryHeroNavId; label: string; sparks: Spark[] }[] = [
157
+ { id: 'new-report', label: '新建報告', sparks: SPARKS_A },
158
+ { id: 'report-sim', label: '報告中心', sparks: SPARKS_A },
159
+ { id: 'template-sim', label: '模板中心', sparks: SPARKS_A },
160
+ { id: 'admin-sim', label: '管理中心', sparks: SPARKS_A },
161
+ ]
162
+
163
+ /** Demo 默認待查看數量(>99 顯示 99+);有數量才顯示角標 */
164
+ export const DEFAULT_ENTRY_HERO_PENDING: EntryHeroPendingCounts = {
165
+ 'new-report': 0,
166
+ 'report-sim': 0,
167
+ 'template-sim': 0,
168
+ 'admin-sim': 200,
169
+ }
170
+
171
+ export function formatPendingBadge(count: number, max = 99): string {
172
+ if (!count || count <= 0) return ''
173
+ return count > max ? `${max}+` : String(count)
174
+ }
175
+ </script>
176
+
177
+ <script setup lang="ts">
178
+ import { computed } from 'vue'
179
+
180
+ const props = withDefaults(
181
+ defineProps<{
182
+ /** 各入口待查看數量;未傳則用默認 mock */
183
+ pendingCounts?: EntryHeroPendingCounts
184
+ badgeMax?: number
185
+ }>(),
186
+ {
187
+ badgeMax: 99,
188
+ }
189
+ )
190
+
191
+ defineEmits<{
192
+ select: [id: EntryHeroNavId]
193
+ }>()
194
+
195
+ const counts = computed(() => ({
196
+ ...DEFAULT_ENTRY_HERO_PENDING,
197
+ ...props.pendingCounts,
198
+ }))
199
+
200
+ function pendingOf(id: EntryHeroNavId) {
201
+ return counts.value[id] ?? 0
202
+ }
203
+
204
+ function badgeText(id: EntryHeroNavId) {
205
+ return formatPendingBadge(pendingOf(id), props.badgeMax)
206
+ }
207
+ </script>
208
+
209
+ <style scoped>
210
+ .entry-hero-nav {
211
+ --entry-hero-accent: #c53355;
212
+ --entry-hero-badge: #f56c6c;
213
+ display: flex;
214
+ flex-wrap: wrap;
215
+ align-items: stretch;
216
+ justify-content: center;
217
+ gap: 24px;
218
+ /* 角標溢出不被裁切 */
219
+ padding: 10px 12px 0;
220
+ }
221
+
222
+ .entry-hero-nav__card {
223
+ position: relative;
224
+ display: flex;
225
+ flex-direction: column;
226
+ align-items: center;
227
+ justify-content: center;
228
+ gap: 12px;
229
+ box-sizing: border-box;
230
+ width: 321.59px;
231
+ height: 140px;
232
+ flex-shrink: 0;
233
+ padding: 0;
234
+ border: 1px solid #e5e7eb;
235
+ border-radius: 18px;
236
+ background: #fff;
237
+ box-shadow: 0 6px 18px rgba(45, 49, 57, 0.08);
238
+ overflow: visible;
239
+ cursor: pointer;
240
+ font: inherit;
241
+ color: inherit;
242
+ transition:
243
+ box-shadow 0.2s ease,
244
+ transform 0.2s ease,
245
+ border-color 0.2s ease,
246
+ background-color 0.2s ease;
247
+ }
248
+
249
+ .entry-hero-nav__card:hover {
250
+ border-color: var(--entry-hero-accent);
251
+ background: #fdf0f2;
252
+ box-shadow: 0 10px 24px rgba(197, 51, 85, 0.14);
253
+ transform: translateY(-2px);
254
+ }
255
+
256
+ .entry-hero-nav__card:hover .entry-hero-nav__label {
257
+ color: var(--entry-hero-accent);
258
+ }
259
+
260
+ .entry-hero-nav__card:focus-visible {
261
+ outline: 2px solid var(--entry-hero-accent);
262
+ outline-offset: 2px;
263
+ }
264
+
265
+ .entry-hero-nav__badge {
266
+ position: absolute;
267
+ top: -8px;
268
+ right: -10px;
269
+ z-index: 2;
270
+ box-sizing: border-box;
271
+ min-width: 32px;
272
+ height: 20px;
273
+ padding: 0 7px;
274
+ border: 2px solid #fff;
275
+ border-radius: 999px;
276
+ background: var(--entry-hero-badge);
277
+ color: #fff;
278
+ font-size: 12px;
279
+ font-weight: 600;
280
+ line-height: 16px;
281
+ font-family: inherit;
282
+ display: inline-flex;
283
+ align-items: center;
284
+ justify-content: center;
285
+ white-space: nowrap;
286
+ pointer-events: none;
287
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
288
+ }
289
+
290
+ .entry-hero-nav__visual {
291
+ position: relative;
292
+ flex: 0 0 auto;
293
+ display: flex;
294
+ align-items: center;
295
+ justify-content: center;
296
+ width: 120px;
297
+ height: 54px;
298
+ margin: 0;
299
+ border-radius: 0;
300
+ overflow: visible;
301
+ background: transparent;
302
+ }
303
+
304
+ .entry-hero-nav__icon {
305
+ position: relative;
306
+ z-index: 1;
307
+ width: 54px;
308
+ height: 54px;
309
+ margin: 0;
310
+ display: block;
311
+ color: var(--entry-hero-accent);
312
+ }
313
+
314
+ .entry-hero-nav__icon svg {
315
+ display: block;
316
+ width: 100%;
317
+ height: 100%;
318
+ overflow: visible;
319
+ }
320
+
321
+ .entry-hero-nav__spark {
322
+ position: absolute;
323
+ z-index: 0;
324
+ color: var(--entry-hero-accent);
325
+ pointer-events: none;
326
+ box-sizing: border-box;
327
+ }
328
+
329
+ .entry-hero-nav__spark.dot {
330
+ border-radius: 50%;
331
+ background: currentColor;
332
+ }
333
+
334
+ .entry-hero-nav__spark.ring {
335
+ border-radius: 50%;
336
+ border: 2px solid currentColor;
337
+ background: transparent;
338
+ }
339
+
340
+ .entry-hero-nav__spark.plus::before,
341
+ .entry-hero-nav__spark.plus::after {
342
+ content: '';
343
+ position: absolute;
344
+ left: 50%;
345
+ top: 50%;
346
+ background: currentColor;
347
+ border-radius: 1px;
348
+ transform: translate(-50%, -50%);
349
+ }
350
+
351
+ .entry-hero-nav__spark.plus::before {
352
+ width: 100%;
353
+ height: 2.5px;
354
+ }
355
+
356
+ .entry-hero-nav__spark.plus::after {
357
+ width: 2.5px;
358
+ height: 100%;
359
+ }
360
+
361
+ .entry-hero-nav__label {
362
+ flex: 0 0 auto;
363
+ display: flex;
364
+ align-items: center;
365
+ justify-content: center;
366
+ margin: 0;
367
+ padding: 0 12px;
368
+ border: none;
369
+ border-radius: 0;
370
+ background: transparent;
371
+ color: #303133;
372
+ font-size: 16px;
373
+ font-weight: 500;
374
+ font-family: var(--gen-ai-font-family, 'Noto Sans', 'Noto Sans TC', sans-serif);
375
+ line-height: 1.3;
376
+ letter-spacing: 0.04em;
377
+ transition: color 0.2s ease;
378
+ }
379
+ </style>
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <div class="gen-ai-pagination">
3
+ <el-pagination
4
+ v-model:current-page="currentPage"
5
+ v-model:page-size="pageSize"
6
+ :page-sizes="pageSizes"
7
+ :total="total"
8
+ :disabled="disabled"
9
+ :pager-count="pagerCount"
10
+ background
11
+ layout="total, sizes, prev, pager, next, jumper"
12
+ />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup lang="ts">
17
+ withDefaults(
18
+ defineProps<{
19
+ total: number
20
+ pageSizes?: number[]
21
+ disabled?: boolean
22
+ pagerCount?: number
23
+ }>(),
24
+ {
25
+ pageSizes: () => [5, 10, 20],
26
+ disabled: false,
27
+ pagerCount: 7,
28
+ }
29
+ )
30
+
31
+ const currentPage = defineModel<number>('currentPage', { default: 1 })
32
+ const pageSize = defineModel<number>('pageSize', { default: 10 })
33
+ </script>
34
+
35
+ <style scoped>
36
+ .gen-ai-pagination {
37
+ font-family: var(--gen-ai-font-family, 'Noto Sans', 'Noto Sans TC', sans-serif);
38
+ font-size: 14px;
39
+ color: #303133;
40
+ }
41
+
42
+ .gen-ai-pagination :deep(.el-pagination__total),
43
+ .gen-ai-pagination :deep(.el-pagination__jump),
44
+ .gen-ai-pagination :deep(.el-pagination__classifier),
45
+ .gen-ai-pagination :deep(.el-pagination__goto),
46
+ .gen-ai-pagination :deep(.el-pagination__sizes) {
47
+ font-family: var(--gen-ai-font-family, 'Noto Sans', 'Noto Sans TC', sans-serif);
48
+ font-size: 14px;
49
+ font-weight: 400;
50
+ color: #303133;
51
+ }
52
+ </style>