svelte-typeahead 4.4.2 → 5.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.
package/README.md CHANGED
@@ -17,14 +17,17 @@ Try it in the [Svelte REPL](https://svelte.dev/repl/a1b828d80de24f7e995b2365782c
17
17
  ## Installation
18
18
 
19
19
  ```bash
20
- # Yarn
21
- yarn add -D svelte-typeahead
22
-
23
20
  # npm
24
- npm i -D svelte-typeahead
21
+ npm i svelte-typeahead
25
22
 
26
23
  # pnpm
27
- pnpm i -D svelte-typeahead
24
+ pnpm i svelte-typeahead
25
+
26
+ # Yarn
27
+ yarn add svelte-typeahead
28
+
29
+ # Bun
30
+ bun add svelte-typeahead
28
31
  ```
29
32
 
30
33
  ## Usage
@@ -216,12 +219,6 @@ The following events are forwarded to the [svelte-search](https://github.com/met
216
219
  - on:blur
217
220
  - on:keydown
218
221
 
219
- ## TypeScript
220
-
221
- Svelte version 3.31 or greater is required to use this component with TypeScript.
222
-
223
- TypeScript definitions are located in the [types folder](./types).
224
-
225
222
  ## Changelog
226
223
 
227
224
  [Changelog](CHANGELOG.md)
package/package.json CHANGED
@@ -1,31 +1,35 @@
1
1
  {
2
2
  "name": "svelte-typeahead",
3
- "version": "4.4.2",
3
+ "version": "5.0.0",
4
4
  "license": "MIT",
5
5
  "description": "Accessible, fuzzy search typeahead component",
6
6
  "author": "Eric Liu (https://github.com/metonym)",
7
+ "type": "module",
7
8
  "svelte": "./src/index.js",
8
- "main": "./lib/index.js",
9
- "module": "./lib/index.mjs",
10
- "types": "./types/index.d.ts",
11
- "scripts": {
12
- "dev": "rollup -cw",
13
- "prepack": "BUNDLE=true rollup -c",
14
- "test": "svelte-check --workspace test"
9
+ "main": "./src/index.js",
10
+ "types": "./src/index.d.ts",
11
+ "exports": {
12
+ "./*.svelte": {
13
+ "types": "./src/*.svelte.d.ts",
14
+ "import": "./src/*.svelte"
15
+ },
16
+ "./*.js": {
17
+ "types": "./src/*.d.ts",
18
+ "import": "./src/*.js"
19
+ },
20
+ ".": {
21
+ "types": "./src/index.d.ts",
22
+ "import": "./src/index.js",
23
+ "svelte": "./src/index.js"
24
+ }
15
25
  },
16
26
  "dependencies": {
17
27
  "fuzzy": "0.1.3",
18
- "svelte-search": "^2.1.0"
19
- },
20
- "devDependencies": {
21
- "@rollup/plugin-commonjs": "^21.0.2",
22
- "svelte": "^3.59.1",
23
- "svelte-check": "^3.6.2",
24
- "svelte-readme": "^3.6.3"
28
+ "svelte-search": "^2.1.1"
25
29
  },
26
30
  "repository": {
27
31
  "type": "git",
28
- "url": "https://github.com/metonym/svelte-typeahead.git"
32
+ "url": "git+https://github.com/metonym/svelte-typeahead.git"
29
33
  },
30
34
  "homepage": "https://github.com/metonym/svelte-typeahead",
31
35
  "bugs": "https://github.com/metonym/svelte-typeahead/issues",
@@ -41,8 +45,6 @@
41
45
  "accessibility"
42
46
  ],
43
47
  "files": [
44
- "lib",
45
- "src",
46
- "types"
48
+ "src"
47
49
  ]
48
50
  }
@@ -1,6 +1,5 @@
1
- /// <reference types="svelte" />
2
- import { SvelteComponentTyped } from "svelte";
3
- import { SearchProps } from "svelte-search/src/Search.svelte";
1
+ import type { SvelteComponentTyped } from "svelte";
2
+ import type { SearchProps } from "svelte-search/src/Search.svelte";
4
3
 
5
4
  export interface TypeaheadProps<TItem> extends Omit<SearchProps, "results"> {
6
5
  /**
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { default } from "./Typeahead.svelte";