yui-image-editor 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 (52) hide show
  1. package/.editorconfig +8 -0
  2. package/.gitattributes +1 -0
  3. package/.nrmrc +1 -0
  4. package/.oxlintrc.json +10 -0
  5. package/.prettierrc.json +6 -0
  6. package/.vscode/extensions.json +11 -0
  7. package/README.md +73 -0
  8. package/dist/types/index.d.ts +1 -0
  9. package/dist-app/assets/css/main-Dn6XCgL-.css +1 -0
  10. package/dist-app/assets/js/main-Bo-yvzk4.js +3 -0
  11. package/dist-app/favicon.ico +0 -0
  12. package/dist-app/index.html +14 -0
  13. package/e2e/tsconfig.json +4 -0
  14. package/e2e/vue.spec.ts +8 -0
  15. package/env.d.ts +1 -0
  16. package/eslint.config.ts +38 -0
  17. package/index.html +13 -0
  18. package/package.json +94 -0
  19. package/playwright.config.ts +110 -0
  20. package/public/favicon.ico +0 -0
  21. package/src/App.vue +165 -0
  22. package/src/assets/annotation/hjjd.svg +33 -0
  23. package/src/assets/annotation/kjjd.svg +38 -0
  24. package/src/assets/annotation/zbz.svg +19 -0
  25. package/src/assets/base.css +86 -0
  26. package/src/assets/logo.svg +1 -0
  27. package/src/assets/main.css +28 -0
  28. package/src/assets/variable.scss +15 -0
  29. package/src/components/ImageEditor/index.ts +220 -0
  30. package/src/components/ImageEditor/index.vue +344 -0
  31. package/src/components/icons/IconCommunity.vue +7 -0
  32. package/src/components/icons/IconDocumentation.vue +7 -0
  33. package/src/components/icons/IconEcosystem.vue +7 -0
  34. package/src/components/icons/IconSupport.vue +7 -0
  35. package/src/components/icons/IconTooling.vue +19 -0
  36. package/src/index.ts +25 -0
  37. package/src/main.ts +11 -0
  38. package/src/router/index.ts +30 -0
  39. package/src/stores/counter.ts +12 -0
  40. package/src/types/index.ts +196 -0
  41. package/src/types/tui.d.ts +27 -0
  42. package/src/utils/specialMapTool.ts +358 -0
  43. package/src/views/HomeView.vue +12 -0
  44. package/src/views/MapPluginView.vue +16 -0
  45. package/src/views/TestView.vue +12 -0
  46. package/tsconfig.app.json +18 -0
  47. package/tsconfig.json +14 -0
  48. package/tsconfig.node.json +28 -0
  49. package/tsconfig.vitest.json +19 -0
  50. package/vite.config.ts +124 -0
  51. package/vitest.config.ts +27 -0
  52. package/yui-image-editor-1.0.0.tgz +0 -0
@@ -0,0 +1,30 @@
1
+ import HomeView from '@/views/HomeView.vue';
2
+ import { createRouter, createWebHistory } from 'vue-router';
3
+ // 👇 请确保这两个组件文件存在,或替换为你实际的组件路径
4
+ import MapPluginView from '@/views/MapPluginView.vue'; // 专题图插件页面
5
+ import TestView from '@/views/TestView.vue'; // 测试界面页面
6
+
7
+ const router = createRouter({
8
+ history: createWebHistory(import.meta.env.BASE_URL),
9
+ routes: [
10
+ {
11
+ path: '/',
12
+ name: 'home',
13
+ component: HomeView,
14
+ },
15
+ // 👇 新增专题图插件路由(name必须是mapPlugin,和代码里一致)
16
+ {
17
+ path: '/map-plugin', // 访问路径
18
+ name: 'mapPlugin', // 路由名称,必须和代码里的跳转名称匹配
19
+ component: MapPluginView,
20
+ },
21
+ // 👇 测试界面路由
22
+ {
23
+ path: '/test',
24
+ name: 'test',
25
+ component: TestView,
26
+ },
27
+ ],
28
+ })
29
+
30
+ export default router
@@ -0,0 +1,12 @@
1
+ import { ref, computed } from 'vue'
2
+ import { defineStore } from 'pinia'
3
+
4
+ export const useCounterStore = defineStore('counter', () => {
5
+ const count = ref(0)
6
+ const doubleCount = computed(() => count.value * 2)
7
+ function increment() {
8
+ count.value++
9
+ }
10
+
11
+ return { count, doubleCount, increment }
12
+ })
@@ -0,0 +1,196 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ // utils/types.ts
3
+
4
+ /**
5
+ * tui-image-editor 核心接口定义
6
+ * 根据实际使用的方法进行扩展
7
+ */
8
+ export interface TuiImageEditor {
9
+ // 销毁编辑器
10
+ destroy(): void;
11
+
12
+ // 获取画布尺寸
13
+ getCanvasSize(): { width: number; height: number };
14
+
15
+ // 调整画布尺寸
16
+ resizeCanvasDimension(dimensions: { width: number; height: number }): Promise<void>;
17
+
18
+ // 设置画布背景色
19
+ setCanvasBackgroundColor(color: string): void;
20
+
21
+ // 添加文字
22
+ addText(text: string, options: TextOptions): Promise<ObjectProps>;
23
+
24
+ // 添加形状
25
+ addShape(type: string, options: ShapeOptions): Promise<ObjectProps>;
26
+
27
+ // 添加图片对象
28
+ addImageObject(url: string, options?: ImageObjectOptions): Promise<ObjectProps>;
29
+
30
+ // 以下方法可能需要根据实际使用的API进行添加
31
+ // 如果实际使用了以下方法,请取消注释并添加到接口中
32
+
33
+ // 加载图片
34
+ // loadImageFromURL?(url: string, imageName: string): Promise<void>;
35
+
36
+ // 清除画布
37
+ // clearObjects?(): void;
38
+
39
+ // 删除对象
40
+ // removeObject?(id: string): void;
41
+
42
+ // 获取对象属性
43
+ // getObjectProperties?(id: string, keys?: string[]): any;
44
+
45
+ // 设置对象属性
46
+ // setObjectProperties?(id: string, properties: any): Promise<void>;
47
+
48
+ // 开始绘图模式
49
+ // startDrawingMode?(mode: string, options?: any): void;
50
+
51
+ // 停止绘图模式
52
+ // stopDrawingMode?(): void;
53
+
54
+ // 缩放
55
+ // zoom?(options: { x: number; y: number; zoomLevel: number }): void;
56
+
57
+ // 重置缩放
58
+ // resetZoom?(): void;
59
+
60
+ // 获取当前缩放级别
61
+ // getZoomLevel?(): number;
62
+
63
+ // 应用滤镜
64
+ // applyFilter?(type: string, options?: any): Promise<void>;
65
+
66
+ // 移除滤镜
67
+ // removeFilter?(type: string): Promise<void>;
68
+
69
+ // 裁剪
70
+ // crop?(rect: { left: number; top: number; width: number; height: number }): Promise<void>;
71
+
72
+ // 旋转
73
+ // rotate?(angle: number): Promise<void>;
74
+
75
+ // 翻转
76
+ // flipX?(): Promise<void>;
77
+ // flipY?(): Promise<void>;
78
+
79
+ // 调整大小
80
+ // resize?(dimensions: { width: number; height: number }): Promise<void>;
81
+
82
+ // 导出图片
83
+ // toDataURL?(options?: { format?: string; quality?: number }): string;
84
+
85
+ // 事件监听
86
+ // on?(event: string, handler: Function): void;
87
+ // off?(event: string, handler?: Function): void;
88
+ }
89
+
90
+ /**
91
+ * 对象属性接口
92
+ */
93
+ export interface ObjectProps {
94
+ id: string;
95
+ [key: string]: unknown;
96
+ }
97
+
98
+ /**
99
+ * 文字选项接口
100
+ */
101
+ export interface TextOptions {
102
+ styles?: {
103
+ fill: string;
104
+ fontSize: number;
105
+ fontFamily: string;
106
+ fontWeight?: string;
107
+ textAlign?: string;
108
+ };
109
+ position: { x: number; y: number };
110
+ isSilent?: boolean;
111
+ left?: number;
112
+ top?: number;
113
+ fontSize?: number;
114
+ fontFamily?: string;
115
+ fill?: string;
116
+ stroke?: string;
117
+ strokeWidth?: number;
118
+ [key: string]: any; // 允许其他属性
119
+ }
120
+
121
+ /**
122
+ * 形状选项接口
123
+ */
124
+ export interface ShapeOptions {
125
+ left: number;
126
+ top: number;
127
+ width: number;
128
+ height: number;
129
+ fill: string;
130
+ stroke: string;
131
+ strokeWidth: number;
132
+ strokeDashArray?: [number, number];
133
+ [key: string]: any; // 允许其他属性
134
+ }
135
+
136
+ /**
137
+ * 图片对象选项接口
138
+ */
139
+ export interface ImageObjectOptions {
140
+ left: number;
141
+ top: number;
142
+ width: number;
143
+ height: number;
144
+ [key: string]: any; // 允许其他属性
145
+ }
146
+
147
+ /**
148
+ * 编辑器配置接口
149
+ */
150
+ export interface EditorConfig {
151
+ includeUI?: {
152
+ loadImage?: {
153
+ path: string;
154
+ name: string;
155
+ };
156
+ theme?: any;
157
+ initMenu?: string;
158
+ menuBarPosition?: 'top' | 'bottom' | 'left' | 'right';
159
+ menu?: string[];
160
+ locale?: any;
161
+ };
162
+ cssMaxWidth?: number;
163
+ cssMaxHeight?: number;
164
+ selectionStyle?: {
165
+ cornerSize?: number;
166
+ rotatingPointOffset?: number;
167
+ };
168
+ usageStatistics?: boolean;
169
+ [key: string]: any; // 允许其他配置属性
170
+ }
171
+
172
+ /**
173
+ * 坐标点接口
174
+ */
175
+ export interface Point {
176
+ x: number;
177
+ y: number;
178
+ }
179
+
180
+ /**
181
+ * 尺寸接口
182
+ */
183
+ export interface Size {
184
+ width: number;
185
+ height: number;
186
+ }
187
+
188
+ /**
189
+ * 矩形区域接口
190
+ */
191
+ export interface Rect {
192
+ x: number;
193
+ y: number;
194
+ width: number;
195
+ height: number;
196
+ }
@@ -0,0 +1,27 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ // src/types/tui.d.ts
3
+ declare module 'tui-code-snippet' {
4
+ const tui: any
5
+ export default tui
6
+ }
7
+
8
+ declare module 'tui-color-picker' {
9
+ const tuiColorPicker: any
10
+ export default tuiColorPicker
11
+ }
12
+
13
+ declare module 'tui-image-editor' {
14
+ interface ImageEditorOptions {
15
+ includeUI?: any
16
+ cssMaxWidth?: number
17
+ cssMaxHeight?: number
18
+ selectionStyle?: any
19
+ }
20
+ class ImageEditor {
21
+ constructor(container: HTMLElement, options: ImageEditorOptions)
22
+ on(event: string, callback: (...args: any[]) => void): void
23
+ destroy(): void
24
+ // 可以补充更多需要的 API 类型
25
+ }
26
+ export default ImageEditor
27
+ }
@@ -0,0 +1,358 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ // utils/specialMapTool.ts
3
+ import type { ImageObjectOptions, ObjectProps, ShapeOptions, TextOptions, TuiImageEditor } from '../types';
4
+
5
+ export class SpecialMapTool {
6
+ private editor: TuiImageEditor;
7
+ private colors: {
8
+ yellow: string;
9
+ blue: string;
10
+ black: string;
11
+ white: string;
12
+ };
13
+ private fonts: {
14
+ title: string;
15
+ normal: string;
16
+ };
17
+
18
+ // 跟踪已添加的元素
19
+ private addedElements: Array<{
20
+ id: string;
21
+ type: string;
22
+ properties: any;
23
+ }> = [];
24
+
25
+ constructor(editorInstance: TuiImageEditor) {
26
+ this.editor = editorInstance;
27
+ this.colors = {
28
+ yellow: '#FFFF00',
29
+ blue: '#50C8FF',
30
+ black: '#000000',
31
+ white: '#FFFFFF'
32
+ };
33
+ this.fonts = {
34
+ title: '方正小标宋简体',
35
+ normal: '黑体'
36
+ };
37
+ }
38
+
39
+ // 1. 设置A4横版画布
40
+ async setA4Landscape(): Promise<{ width: number; height: number }> {
41
+ // A4尺寸:297mm × 210mm,96DPI下约为1123×794像素
42
+ const a4Width: number = 1123;
43
+ const a4Height: number = 794;
44
+
45
+ await this.editor.resizeCanvasDimension({
46
+ width: a4Width,
47
+ height: a4Height
48
+ });
49
+
50
+ // 清空元素记录
51
+ this.addedElements = [];
52
+
53
+ return { width: a4Width, height: a4Height };
54
+ }
55
+
56
+ // 2. 添加标题
57
+ async addTitle(text: string = '专题图标题'): Promise<ObjectProps> {
58
+ const canvasSize = this.editor.getCanvasSize();
59
+ const options: TextOptions = {
60
+ styles: {
61
+ fill: this.colors.black,
62
+ fontSize: 23,
63
+ fontFamily: this.fonts.title,
64
+ fontWeight: 'normal',
65
+ textAlign: 'center'
66
+ },
67
+ position: {
68
+ x: canvasSize.width / 2,
69
+ y: 80
70
+ }
71
+ };
72
+ const result = await this.editor.addText(text, options);
73
+
74
+ this.addedElements.push({
75
+ id: result.id,
76
+ type: 'title',
77
+ properties: { text, ...options }
78
+ });
79
+
80
+ return result;
81
+ }
82
+
83
+ // 3. 添加附图标签
84
+ async addFigureLabel(text: string = '附图'): Promise<ObjectProps> {
85
+ const options: TextOptions = {
86
+ styles: {
87
+ fill: this.colors.black,
88
+ fontSize: 20,
89
+ fontFamily: this.fonts.normal,
90
+ fontWeight: 'normal'
91
+ },
92
+ position: {
93
+ x: 50,
94
+ y: 40
95
+ }
96
+ };
97
+ const result = await this.editor.addText(text, options);
98
+
99
+ this.addedElements.push({
100
+ id: result.id,
101
+ type: 'figureLabel',
102
+ properties: { text, ...options }
103
+ });
104
+
105
+ return result;
106
+ }
107
+
108
+ // 4. 添加时间戳(自动生成当前时间)
109
+ async addTimestamp(): Promise<ObjectProps> {
110
+ const now = new Date();
111
+ const timeStr = now.toLocaleString('zh-CN', {
112
+ year: 'numeric',
113
+ month: '2-digit',
114
+ day: '2-digit',
115
+ hour: '2-digit',
116
+ minute: '2-digit'
117
+ });
118
+
119
+ const canvasSize = this.editor.getCanvasSize();
120
+ const options: TextOptions = {
121
+ styles: {
122
+ fill: this.colors.black,
123
+ fontSize: 11,
124
+ fontFamily: this.fonts.normal,
125
+ fontWeight: 'normal'
126
+ },
127
+ position: {
128
+ x: canvasSize.width - 150,
129
+ y: canvasSize.height - 40
130
+ }
131
+ };
132
+ const result = await this.editor.addText(`时间: ${timeStr}`, options);
133
+
134
+ this.addedElements.push({
135
+ id: result.id,
136
+ type: 'timestamp',
137
+ properties: { text: timeStr, ...options }
138
+ });
139
+
140
+ return result;
141
+ }
142
+
143
+ // 5. 添加黄色标注(带黑色描边效果)
144
+ async addYellowLabel(text: string, x: number, y: number): Promise<ObjectProps> {
145
+ // 先添加黑色文字作为描边(通过偏移实现描边效果)
146
+ const strokeOffset: number = 1.5;
147
+
148
+ // 描边文字(黑色,稍微偏移)
149
+ const strokeResult = await this.editor.addText(text, {
150
+ styles: {
151
+ fill: this.colors.black,
152
+ fontSize: 12,
153
+ fontFamily: this.fonts.normal,
154
+ fontWeight: 'normal'
155
+ },
156
+ position: {
157
+ x: x - strokeOffset,
158
+ y: y - strokeOffset
159
+ },
160
+ isSilent: true
161
+ });
162
+
163
+ // 主体文字(黄色)
164
+ const result = await this.editor.addText(text, {
165
+ styles: {
166
+ fill: this.colors.yellow,
167
+ fontSize: 12,
168
+ fontFamily: this.fonts.normal,
169
+ fontWeight: 'normal'
170
+ },
171
+ position: { x, y }
172
+ });
173
+
174
+ this.addedElements.push(
175
+ {
176
+ id: strokeResult.id,
177
+ type: 'yellowLabelStroke',
178
+ properties: { text, x: x - strokeOffset, y: y - strokeOffset }
179
+ },
180
+ {
181
+ id: result.id,
182
+ type: 'yellowLabel',
183
+ properties: { text, x, y }
184
+ }
185
+ );
186
+
187
+ return result;
188
+ }
189
+
190
+ // 6. 添加蓝色标注(用于重点强调)
191
+ async addBlueLabel(text: string, x: number, y: number): Promise<ObjectProps> {
192
+ const options: TextOptions = {
193
+ styles: {
194
+ fill: this.colors.blue,
195
+ fontSize: 12,
196
+ fontFamily: this.fonts.normal,
197
+ fontWeight: 'normal'
198
+ },
199
+ position: { x, y }
200
+ };
201
+ const result = await this.editor.addText(text, options);
202
+
203
+ this.addedElements.push({
204
+ id: result.id,
205
+ type: 'blueLabel',
206
+ properties: { text, x, y, ...options }
207
+ });
208
+
209
+ return result;
210
+ }
211
+
212
+ // 7. 添加对比拉框(黄色实线矩形)
213
+ async addComparisonBox(x: number, y: number, width: number, height: number, label: string = ''): Promise<ObjectProps> {
214
+ // 添加矩形框
215
+ const rectOptions: ShapeOptions = {
216
+ left: x,
217
+ top: y,
218
+ width,
219
+ height,
220
+ fill: 'transparent',
221
+ stroke: this.colors.yellow,
222
+ strokeWidth: 3
223
+ };
224
+ const rect = await this.editor.addShape('rect', rectOptions);
225
+
226
+ this.addedElements.push({
227
+ id: rect.id,
228
+ type: 'comparisonBox',
229
+ properties: { x, y,...rectOptions }
230
+ });
231
+
232
+ // 如果有关联标签,添加10号字
233
+ if (label) {
234
+ const labelResult = await this.editor.addText(label, {
235
+ styles: {
236
+ fill: this.colors.black,
237
+ fontSize: 10,
238
+ fontFamily: this.fonts.normal,
239
+ fontWeight: 'normal'
240
+ },
241
+ position: {
242
+ x: x + width / 2,
243
+ y: y + height + 15
244
+ },
245
+ isSilent: true
246
+ });
247
+
248
+ this.addedElements.push({
249
+ id: labelResult.id,
250
+ type: 'comparisonBoxLabel',
251
+ properties: { text: label, x: x + width / 2, y: y + height + 15 }
252
+ });
253
+ }
254
+
255
+ return rect;
256
+ }
257
+
258
+ // 8. 添加标定目标(黄色虚线矩形)
259
+ async addCalibrationTarget(x: number, y: number, width: number, height: number): Promise<ObjectProps> {
260
+ const options: ShapeOptions = {
261
+ left: x,
262
+ top: y,
263
+ width,
264
+ height,
265
+ fill: 'transparent',
266
+ stroke: this.colors.yellow,
267
+ strokeWidth: 3,
268
+ strokeDashArray: [10, 5] // 虚线样式
269
+ };
270
+ const result = await this.editor.addShape('rect', options);
271
+
272
+ this.addedElements.push({
273
+ id: result.id,
274
+ type: 'calibrationTarget',
275
+ properties: { x, y, ...options }
276
+ });
277
+
278
+ return result;
279
+ }
280
+
281
+ // 9. 添加指北针
282
+ async addCompass(x: number, y: number, size: number = 60): Promise<ObjectProps> {
283
+ // 创建指北针图标 - 简单的箭头形状
284
+ const compassSVG = `<?xml version="1.0" encoding="UTF-8"?>
285
+ <svg width="${size}" height="${size}" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
286
+ <!-- 圆形背景 -->
287
+ <circle cx="50" cy="50" r="40" fill="none" stroke="${this.colors.yellow}" stroke-width="3"/>
288
+
289
+ <!-- N方向箭头 -->
290
+ <polygon points="50,15 45,35 55,35" fill="${this.colors.yellow}"/>
291
+ <text x="50" y="35" text-anchor="middle" fill="${this.colors.yellow}" font-size="14" font-weight="bold">N</text>
292
+
293
+ <!-- 方向刻度线 -->
294
+ <line x1="50" y1="15" x2="50" y2="10" stroke="${this.colors.yellow}" stroke-width="2"/>
295
+ <line x1="85" y1="50" x2="90" y2="50" stroke="${this.colors.yellow}" stroke-width="2"/>
296
+ <line x1="50" y1="85" x2="50" y2="90" stroke="${this.colors.yellow}" stroke-width="2"/>
297
+ <line x1="15" y1="50" x2="10" y2="50" stroke="${this.colors.yellow}" stroke-width="2"/>
298
+
299
+ <!-- 次要方向 - 使用纯英文,避免编码问题 -->
300
+ <text x="73" y="27" fill="${this.colors.yellow}" font-size="10">NE</text>
301
+ <text x="73" y="73" fill="${this.colors.yellow}" font-size="10">SE</text>
302
+ <text x="27" y="73" fill="${this.colors.yellow}" font-size="10">SW</text>
303
+ <text x="27" y="27" fill="${this.colors.yellow}" font-size="10">NW</text>
304
+ </svg>`;
305
+
306
+ // 正确编码SVG字符串
307
+ const svgData = `data:image/svg+xml;base64,${btoa(
308
+ unescape(encodeURIComponent(compassSVG))
309
+ )}`;
310
+
311
+ // 添加为图片对象
312
+ const options: ImageObjectOptions = {
313
+ left: x,
314
+ top: y,
315
+ width: size,
316
+ height: size
317
+ };
318
+ const result = await this.editor.addImageObject(svgData, options);
319
+
320
+ this.addedElements.push({
321
+ id: result.id,
322
+ type: 'compass',
323
+ properties: { x, y, size, ...options }
324
+ });
325
+
326
+ return result;
327
+ }
328
+
329
+ // 10. 一键创建完整专题图框架
330
+ async createFullSpecialMap(title: string = '专题图标题', figureLabel: string = '附图'): Promise<{
331
+ canvasSize: { width: number; height: number };
332
+ message: string;
333
+ }> {
334
+ // 设置A4画布
335
+ await this.setA4Landscape();
336
+
337
+ // 添加基本元素
338
+ await this.addFigureLabel(figureLabel);
339
+ await this.addTitle(title);
340
+ await this.addTimestamp();
341
+
342
+ return {
343
+ canvasSize: this.editor.getCanvasSize(),
344
+ message: '专题图框架已创建完成,请添加具体内容和标注'
345
+ };
346
+ }
347
+
348
+ // 11. 获取已添加的所有元素
349
+ getAllElements(): Array<{ id: string; type: string; properties: any }> {
350
+ return [...this.addedElements];
351
+ }
352
+
353
+ // 12. 清空所有添加的元素
354
+ async clearAllElements(): Promise<void> {
355
+ console.log('清空所有添加的元素');
356
+ this.addedElements = [];
357
+ }
358
+ }
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <div>首页</div>
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+
7
+
8
+ </script>
9
+
10
+ <style scoped>
11
+
12
+ </style>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div>
3
+ <ImageEditor></ImageEditor>
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+
9
+ import ImageEditor from '@/components/ImageEditor/index.vue';
10
+
11
+
12
+ </script>
13
+
14
+ <style scoped>
15
+
16
+ </style>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <div>测试</div>
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+
7
+
8
+ </script>
9
+
10
+ <style scoped>
11
+
12
+ </style>
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
3
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
4
+ "exclude": ["src/**/__tests__/*"],
5
+ "compilerOptions": {
6
+ // Extra safety for array and object lookups, but may have false positives.
7
+ "noUncheckedIndexedAccess": true,
8
+
9
+ // Path mapping for cleaner imports.
10
+ "paths": {
11
+ "@/*": ["./src/*"]
12
+ },
13
+
14
+ // `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
15
+ // Specified here to keep it out of the root directory.
16
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo"
17
+ }
18
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.app.json"
9
+ },
10
+ {
11
+ "path": "./tsconfig.vitest.json"
12
+ }
13
+ ]
14
+ }