@sanity/embeddings-index-ui 3.0.1 → 4.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/package.json CHANGED
@@ -1,93 +1,60 @@
1
1
  {
2
2
  "name": "@sanity/embeddings-index-ui",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "Various Sanity Studio plugins for integrating with the embeddings index API",
5
5
  "keywords": [
6
6
  "sanity",
7
7
  "sanity-plugin"
8
8
  ],
9
- "homepage": "https://github.com/sanity-io/embeddings-index-ui#readme",
9
+ "homepage": "https://github.com/sanity-io/plugins/tree/main/plugins/@sanity/embeddings-index-ui#readme",
10
10
  "bugs": {
11
- "url": "https://github.com/sanity-io/embeddings-index-ui/issues"
11
+ "url": "https://github.com/sanity-io/plugins/issues"
12
12
  },
13
+ "license": "MIT",
14
+ "author": "Sanity.io <hello@sanity.io>",
13
15
  "repository": {
14
16
  "type": "git",
15
- "url": "git@github.com:sanity-io/embeddings-index-ui.git"
16
- },
17
- "license": "MIT",
18
- "author": "Sanity <hello@sanity.io>",
19
- "sideEffects": false,
20
- "type": "commonjs",
21
- "exports": {
22
- ".": {
23
- "source": "./src/index.ts",
24
- "import": "./dist/index.mjs",
25
- "default": "./dist/index.js"
26
- },
27
- "./package.json": "./package.json"
17
+ "url": "git+ssh://git@github.com/sanity-io/plugins.git",
18
+ "directory": "plugins/@sanity/embeddings-index-ui"
28
19
  },
29
- "main": "./dist/index.js",
30
- "types": "./dist/index.d.ts",
31
20
  "files": [
32
- "dist",
33
- "sanity.json",
34
- "src",
35
- "v2-incompatible.js"
21
+ "dist"
36
22
  ],
37
- "scripts": {
38
- "build": "plugin-kit verify-package --silent && pkg-utils build --strict --check --clean",
39
- "clean": "rimraf dist",
40
- "format": "prettier --write --cache --ignore-unknown .",
41
- "link-watch": "plugin-kit link-watch",
42
- "lint": "eslint .",
43
- "prepublishOnly": "npm run build",
44
- "watch": "pkg-utils watch --strict",
45
- "prepare": "husky install"
23
+ "type": "module",
24
+ "types": "./dist/index.d.ts",
25
+ "exports": {
26
+ ".": "./dist/index.js",
27
+ "./package.json": "./package.json"
46
28
  },
47
29
  "dependencies": {
48
- "@sanity/icons": "^3.7.0",
49
- "@sanity/incompatible-plugin": "^1.0.5",
50
- "@sanity/ui": "^3.0.5"
30
+ "@sanity/icons": "^3.7.4",
31
+ "@sanity/ui": "^3.2.0",
32
+ "react-rx": "^4.2.2"
51
33
  },
52
34
  "devDependencies": {
53
- "@commitlint/cli": "^17.7.1",
54
- "@commitlint/config-conventional": "^17.7.0",
55
- "@sanity/pkg-utils": "^7.2.2",
56
- "@sanity/plugin-kit": "^4.0.19",
57
- "@sanity/semantic-release-preset": "^5.0.0",
58
- "@types/react": "^19.1.2",
59
- "@typescript-eslint/eslint-plugin": "^8.31.1",
60
- "@typescript-eslint/parser": "^8.31.1",
61
- "eslint": "^8.57.1",
62
- "eslint-config-prettier": "^10.1.2",
63
- "eslint-config-sanity": "^7.1.4",
64
- "eslint-plugin-prettier": "^5.2.6",
65
- "eslint-plugin-react": "^7.37.5",
66
- "eslint-plugin-react-hooks": "^5.2.0",
67
- "husky": "^8.0.3",
68
- "lint-staged": "^14.0.1",
69
- "npm-run-all": "^4.1.5",
70
- "prettier": "^3.5.3",
71
- "prettier-plugin-packagejson": "^2.5.10",
72
- "react": "^19.1.0",
73
- "react-dom": "^19.1.0",
74
- "react-is": "^18.2.0",
75
- "rimraf": "^5.0.1",
76
- "sanity": "^4.2.0",
77
- "semantic-release": "^21.1.1",
78
- "styled-components": "^6.1.17",
79
- "typescript": "^5.8.3"
35
+ "@sanity/pkg-utils": "^10.5.7",
36
+ "@types/node": "^24.13.2",
37
+ "@types/react": "^19.2.17",
38
+ "@types/react-dom": "^19.2.3",
39
+ "babel-plugin-react-compiler": "^1.0.0",
40
+ "babel-plugin-styled-components": "^2.3.0",
41
+ "react": "^19.2.7",
42
+ "react-dom": "^19.2.7",
43
+ "sanity": "^6.1.0",
44
+ "styled-components": "^6.4.2",
45
+ "@repo/package.config": "0.0.0",
46
+ "@repo/tsconfig": "0.0.0"
80
47
  },
81
48
  "peerDependencies": {
82
- "react": "^18 || ^19",
83
- "sanity": "^3.80 || ^4.0.0-0 || ^5.0.0"
49
+ "react": "^19.2",
50
+ "react-dom": "^19.2",
51
+ "sanity": "^5 || ^6.0.0-0",
52
+ "styled-components": "^6.1"
84
53
  },
85
54
  "engines": {
86
- "node": ">=18"
55
+ "node": ">=20.19 <22 || >=22.12"
87
56
  },
88
- "module": "./dist/index.mjs",
89
- "browserslist": "extends @sanity/browserslist-config",
90
- "publishConfig": {
91
- "access": "public"
57
+ "scripts": {
58
+ "build": "pkg build --strict --check --clean"
92
59
  }
93
- }
60
+ }
package/dist/index.d.mts DELETED
@@ -1,74 +0,0 @@
1
- import {Plugin as Plugin_2} from 'sanity'
2
- import {SanityClient} from 'sanity'
3
-
4
- export declare function deleteIndex(indexName: string, client: SanityClient): Promise<IndexState>
5
-
6
- declare interface EmbeddingsIndexConfig {
7
- /**
8
- * Name of the index
9
- */
10
- indexName: string
11
- maxResults?: number
12
- /**
13
- * Determines if which search mode is enabled by default for the reference field.
14
- * Default is the studio default search, while 'embeddings' enables
15
- * Defaults to 'default' behaviour
16
- */
17
- searchMode?: 'embeddings' | 'default'
18
- }
19
-
20
- export declare const embeddingsIndexDashboard: Plugin_2<void>
21
-
22
- export declare const embeddingsIndexReferenceInput: Plugin_2<void | EmbeddingsIndexConfig>
23
-
24
- export declare function getIndexes(client: SanityClient): Promise<IndexState[]>
25
-
26
- export declare interface IndexState extends NamedIndex {
27
- status: string
28
- startDocumentCount: number
29
- remainingDocumentCount: number
30
- failedDocumentCount: number
31
- }
32
-
33
- export declare interface NamedIndex {
34
- indexName: string
35
- dataset: string
36
- project: string
37
- projection: string
38
- filter: string
39
- }
40
-
41
- export declare interface QueryConfig {
42
- query: string
43
- indexName: string
44
- maxResults?: number
45
- filter?: {
46
- type?: string | string[]
47
- }
48
- }
49
-
50
- export declare function queryIndex(
51
- queryConfig: QueryConfig,
52
- client: SanityClient,
53
- ): Promise<QueryResult[]>
54
-
55
- export declare interface QueryResult {
56
- score: number
57
- value: {
58
- documentId: string
59
- type: string
60
- }
61
- }
62
-
63
- export {}
64
-
65
- declare module 'sanity' {
66
- interface ReferenceBaseOptions {
67
- /**
68
- * Enables toggleable semantic search for a reference field.
69
- *
70
- * When `true`: will use default plugin configuration (if no config has been for the plugin provided ,this will throw an error)
71
- */
72
- embeddingsIndex?: true | EmbeddingsIndexConfig
73
- }
74
- }