Skip to content

Commit aaad849

Browse files
committed
Use .ts
1 parent 5e21265 commit aaad849

14 files changed

+341
-445
lines changed

demo/App.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<template>
2+
<!-- just for tests -->
3+
<video src="." style="background-color: aqua"> TEST </video>
4+
25
<FileInput :state="state">
3-
<template v-slot:selected>
4-
<FileInputSelectedInfo :state="state"/>
5-
</template>
6+
<FileInputSelectedInfo :state="state"/>
67
</FileInput>
78
</template>
89

910
<script setup>
10-
import {getStateInstance, FileInput, FileInputSelectedInfo} from "/src/index";
11+
import {getStateInstance, FileInput, FileInputSelectedInfo} from "../src/index.ts";
1112
// or
1213
// import {getStateInstance, FileInput, FileInputSelectedInfo} from "@alttiri/vue-file-input";
1314

package-lock.json

Lines changed: 135 additions & 131 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alttiri/vue-file-input",
3-
"version": "1.3.3-2024.3.10",
3+
"version": "1.4.0-20240819",
44
"type": "module",
55
"description": "Vue.js file input with Drag and Drop support.",
66
"homepage": "https://github.com/alttiri/vue-file-input",
@@ -14,12 +14,13 @@
1414
"src"
1515
],
1616
"scripts": {
17-
"dev": "vite --host",
18-
"build": "vite build",
19-
"serve": "vite preview",
17+
"vue-dev": "vite --host",
18+
"vue-build": "vite build",
19+
"vue-serve": "vite preview",
2020
"#": "",
21-
"publish-npm": "npm publish --registry=https://registry.npmjs.org",
22-
"publish-ghp": "npm publish --registry=https://npm.pkg.github.com",
21+
"test-publish": "npm pack",
22+
"publish-npm": "npm publish --registry=https://registry.npmjs.org",
23+
"publish-ghp": "npm publish --registry=https://npm.pkg.github.com",
2324
"##": "",
2425
"unpublish-npm": "npm unpublish @alttiri/vue-file-input@1.2.3 --registry=https://registry.npmjs.org",
2526
"###": "",
@@ -31,8 +32,8 @@
3132
},
3233
"devDependencies": {
3334
"@vitejs/plugin-vue": "5.1.2",
34-
"vite": "5.3.5",
35-
"vue": "3.4.35"
35+
"vite": "5.4.1",
36+
"vue": "3.4.38"
3637
},
3738
"dependencies": {
3839
"@alttiri/util-js": "1.13.1-20240725"

src/components/FileInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
ref, toRefs, onMounted, computed, onBeforeUnmount, watchEffect,
44
Ref, ComputedRef
55
} from "vue";
6-
import {FileInputState, HTMLFileInputElement} from "../index";
76
import FileInputDefault from "./FileInputDefault.vue";
7+
import {FileInputState, HTMLFileInputElement} from "../index.ts";
88
99
1010
const templateInputElem: Ref<HTMLFileInputElement | null> = ref(null);

src/components/FileInputDefault.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<script setup lang="ts">
2222
import FileInputDefaultHoverText from "./FileInputDefaultHoverText.vue";
2323
import FileInputDefaultText from "./FileInputDefaultText.vue";
24-
import {FileInputState} from "./file-input-state";
24+
import {FileInputState} from "./file-input-state.ts";
2525
2626
defineProps<{
2727
state: FileInputState,

src/components/FileInputDefaultHoverText.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<script setup lang="ts">
66
import {computed} from "vue";
7-
import {FileInputState} from "../index";
7+
import {FileInputState} from "../index.ts";
88
99
const props = defineProps<{state: FileInputState}>();
1010
const {

src/components/FileInputDefaultText.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<script setup lang="ts">
1212
import {computed} from "vue";
13-
import {FileInputState, WebFileEntry} from "../index";
13+
import {FileInputState, WebFileEntry} from "../index.ts";
1414
1515
const props = defineProps<{state: FileInputState}>();
1616
const {

src/components/FileInputSelectedInfo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</template>
88

99
<script setup lang="ts">
10-
import {FileInputState} from "../index";
1110
import {bytesToSizeWinLike, dateToDayDateTimeString} from "@alttiri/util-js";
11+
import {FileInputState} from "../index.ts";
1212
1313
const props = defineProps<{state: FileInputState}>();
1414
const {

src/components/WebFileEntry.d.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/components/WebFileEntry.js

Lines changed: 0 additions & 235 deletions
This file was deleted.

0 commit comments

Comments
 (0)