@zzalai/leafer-multi-roi 1.0.3 → 1.0.5

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/docs/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="./assets/vite-CMPW0ETM.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>LeaferJS Multi ROI Test</title>
8
- <script type="module" crossorigin src="./assets/index-BrSsc-mD.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-C2aSwNRW.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-B2aZIWia.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzalai/leafer-multi-roi",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Vue3 component for multi-region selection on images using LeaferJS",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -14,6 +14,10 @@
14
14
  "import": "./dist/leafer-multi-roi.es.js",
15
15
  "require": "./dist/leafer-multi-roi.umd.js",
16
16
  "types": "./dist/src/index.d.ts"
17
+ },
18
+ "./dist/leafer-multi-roi.css": {
19
+ "import": "./dist/leafer-multi-roi.css",
20
+ "require": "./dist/leafer-multi-roi.css"
17
21
  }
18
22
  },
19
23
  "scripts": {
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { App } from 'vue'
2
2
  import RoiEditor from './components/RoiEditor.vue'
3
3
 
4
- export default {
5
- install(app: App) {
6
- app.component('RoiEditor', RoiEditor)
7
- }
4
+ export function install(app: App) {
5
+ app.component('RoiEditor', RoiEditor)
8
6
  }
9
7
 
10
- export { RoiEditor }
8
+ export { RoiEditor }
9
+
10
+ export default RoiEditor
@@ -0,0 +1,37 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Test RoiEditor Component</title>
7
+ <script type="importmap">
8
+ {
9
+ "imports": {
10
+ "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js"
11
+ }
12
+ }
13
+ </script>
14
+ </head>
15
+ <body>
16
+ <div id="app"></div>
17
+ <script type="module">
18
+ import { createApp } from 'vue'
19
+ import { RoiEditor } from './dist/leafer-multi-roi.es.js'
20
+ import './dist/leafer-multi-roi.css'
21
+
22
+ const app = createApp({
23
+ template: `
24
+ <div style="width: 800px; height: 600px; margin: 20px auto;">
25
+ <RoiEditor
26
+ src="https://picsum.photos/800/600"
27
+ :options="{ maxRegions: 10 }"
28
+ />
29
+ </div>
30
+ `
31
+ })
32
+
33
+ app.component('RoiEditor', RoiEditor)
34
+ app.mount('#app')
35
+ </script>
36
+ </body>
37
+ </html>
package/vite.config.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { defineConfig } from 'vite'
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import dts from 'vite-plugin-dts'
4
- import path from 'path'
5
4
 
6
5
  // https://vite.dev/config/
7
6
  export default defineConfig({
@@ -27,7 +26,7 @@ export default defineConfig({
27
26
  globals: {
28
27
  vue: 'Vue'
29
28
  },
30
- exports: "named"
29
+ exports: 'named'
31
30
  }
32
31
  },
33
32
  // 构建选项