@sanity/color-input 3.0.0-studio-v3.0 → 3.0.0-v3-studio.3
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 +3 -3
- package/lib/{index.js → cjs/index.js} +76 -76
- package/lib/{index.js.map → cjs/index.js.map} +1 -1
- package/lib/{index.modern.js → esm/index.js} +77 -77
- package/lib/{index.modern.js.map → esm/index.js.map} +1 -1
- package/lib/{index.d.ts → types/index.d.ts} +1 -2
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +19 -14
- package/sanity.json +8 -0
- package/src/ColorInput.tsx +1 -1
- package/v2-incompatible.js +11 -0
- package/lib/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/color-input",
|
|
3
|
-
"version": "3.0.0-studio
|
|
3
|
+
"version": "3.0.0-v3-studio.3",
|
|
4
4
|
"description": "Color input",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf lib",
|
|
7
|
-
"prebuild": "npm run clean &&
|
|
8
|
-
"build": "parcel build",
|
|
7
|
+
"prebuild": "npm run clean && plugin-kit verify-package --silent",
|
|
8
|
+
"build": "parcel build --no-cache",
|
|
9
9
|
"watch": "parcel watch",
|
|
10
|
+
"link-watch": "plugin-kit link-watch",
|
|
10
11
|
"prepublishOnly": "npm run build",
|
|
11
12
|
"compile": "tsc --noEmit",
|
|
12
13
|
"lint": "eslint .",
|
|
@@ -16,16 +17,18 @@
|
|
|
16
17
|
"source": "./src/index.ts",
|
|
17
18
|
"exports": {
|
|
18
19
|
".": {
|
|
19
|
-
"require": "./lib/index.js",
|
|
20
|
-
"default": "./lib/index.
|
|
20
|
+
"require": "./lib/cjs/index.js",
|
|
21
|
+
"default": "./lib/esm/index.js"
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
|
-
"main": "./lib/index.js",
|
|
24
|
-
"module": "./lib/index.
|
|
25
|
-
"types": "./lib/index.d.ts",
|
|
24
|
+
"main": "./lib/cjs/index.js",
|
|
25
|
+
"module": "./lib/esm/index.js",
|
|
26
|
+
"types": "./lib/types/index.d.ts",
|
|
26
27
|
"files": [
|
|
27
28
|
"src",
|
|
28
|
-
"lib"
|
|
29
|
+
"lib",
|
|
30
|
+
"v2-incompatible.js",
|
|
31
|
+
"sanity.json"
|
|
29
32
|
],
|
|
30
33
|
"author": "Sanity.io <hello@sanity.io>",
|
|
31
34
|
"license": "MIT",
|
|
@@ -40,6 +43,7 @@
|
|
|
40
43
|
],
|
|
41
44
|
"dependencies": {
|
|
42
45
|
"@sanity/icons": "^1.2.8",
|
|
46
|
+
"@sanity/incompatible-plugin": "^0.0.1-studio-v3.3",
|
|
43
47
|
"@sanity/ui": "^0.37.9",
|
|
44
48
|
"lodash": "^4.17.21",
|
|
45
49
|
"react-color": "^2.19.3"
|
|
@@ -49,6 +53,7 @@
|
|
|
49
53
|
"@commitlint/config-conventional": "^15.0.0",
|
|
50
54
|
"@parcel/packager-ts": "^2.6.0",
|
|
51
55
|
"@parcel/transformer-typescript-types": "^2.6.0",
|
|
56
|
+
"@sanity/plugin-kit": "^0.0.1-studio-v3.3",
|
|
52
57
|
"@types/react-color": "^2.17.6",
|
|
53
58
|
"@types/styled-components": "^5.1.25",
|
|
54
59
|
"@typescript-eslint/eslint-plugin": "^5.12.0",
|
|
@@ -65,23 +70,23 @@
|
|
|
65
70
|
"prettier": "^2.6.2",
|
|
66
71
|
"react": "^17.0.0 || ^18.0.0",
|
|
67
72
|
"rimraf": "^3.0.2",
|
|
68
|
-
"sanity": "
|
|
73
|
+
"sanity": "^3.0.0-dev-preview.7",
|
|
69
74
|
"styled-components": "^5.2.0",
|
|
70
75
|
"typescript": "^4.6.4"
|
|
71
76
|
},
|
|
72
77
|
"peerDependencies": {
|
|
73
78
|
"react": "^17.0.0 || ^18.0.0",
|
|
74
|
-
"sanity": "
|
|
79
|
+
"sanity": "dev-preview",
|
|
75
80
|
"styled-components": "^5.2.0"
|
|
76
81
|
},
|
|
77
82
|
"bugs": {
|
|
78
|
-
"url": "https://github.com/sanity-io/
|
|
83
|
+
"url": "https://github.com/sanity-io/color-input/issues"
|
|
79
84
|
},
|
|
80
85
|
"homepage": "https://www.sanity.io/",
|
|
86
|
+
"sanityExchangeUrl": "https://www.sanity.io/plugins/color-input",
|
|
81
87
|
"repository": {
|
|
82
88
|
"type": "git",
|
|
83
|
-
"url": "git+https://github.com/sanity-io/
|
|
84
|
-
"directory": "packages/@sanity/color-input"
|
|
89
|
+
"url": "git+https://github.com/sanity-io/color-input.git"
|
|
85
90
|
},
|
|
86
91
|
"publishConfig": {
|
|
87
92
|
"access": "public"
|
package/sanity.json
ADDED
package/src/ColorInput.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import {AddIcon} from '@sanity/icons'
|
|
|
6
6
|
import {ColorPicker} from './ColorPicker'
|
|
7
7
|
import {ObjectInputProps} from 'sanity'
|
|
8
8
|
import {HSLColor, HSVColor, RGBColor} from 'react-color'
|
|
9
|
-
import {ObjectSchemaType} from '
|
|
9
|
+
import {ObjectSchemaType} from 'sanity'
|
|
10
10
|
|
|
11
11
|
const DEFAULT_COLOR: ColorValue & {source: string} = {
|
|
12
12
|
hex: '#24a3e3',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const {showIncompatiblePluginDialog} = require('@sanity/incompatible-plugin')
|
|
2
|
+
const {name, version, sanityExchangeUrl} = require('./package.json')
|
|
3
|
+
|
|
4
|
+
export default showIncompatiblePluginDialog({
|
|
5
|
+
name: name,
|
|
6
|
+
versions: {
|
|
7
|
+
v3: version,
|
|
8
|
+
v2: '^2.30.0',
|
|
9
|
+
},
|
|
10
|
+
sanityExchangeUrl,
|
|
11
|
+
})
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;AAAA,OAAO,MAAM;;;;;;;;;CAUZ,CAAA;ACVD,OAAO,MAAM;;;;;;;;;CAUZ,CAAA;AGQD;IACE,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,QAAQ,CAAA;IACb,GAAG,EAAE,QAAQ,CAAA;IACb,GAAG,EAAE,QAAQ,CAAA;CACd;AAED;IACE,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,8BAA8B,gBAAgB,GAAG;IAC/C,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB,CAAA;AACD,8BAA8B,iBAAiB,UAAU,EAAE,eAAe,CAAC,CAAA;AAE3E,2BAA2B,KAAK,EAAE,eAAe,eA2EhD;ACxGD,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;mBAgDG,MAAM;mBAAK,MAAM;mBAAK,MAAM;;;;;;;;CAyB3C,CAAA;AC9ED,OAAO,MAAM;;;;;;;;;CAUZ,CAAA;ACJD,OAAO,MAAM,yCAKX,CAAA","sources":["src/src/schemas/hslaColor.ts","src/src/schemas/rgbaColor.ts","src/src/ColorPickerFields.tsx","src/src/ColorPicker.tsx","src/src/ColorInput.tsx","src/src/schemas/color.tsx","src/src/schemas/hsvaColor.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,"import {createPlugin} from 'sanity'\nimport {hslaColor} from './schemas/hslaColor'\nimport {rgbaColor} from './schemas/rgbaColor'\nimport {color} from './schemas/color'\nimport {hsvaColor} from './schemas/hsvaColor'\n\nexport const colorInput = createPlugin({\n name: '@sanity/color-input',\n schema: {\n types: [hslaColor, hsvaColor, rgbaColor, color],\n },\n})\n\nexport {hslaColor, rgbaColor, color, hsvaColor}\nexport {ColorInput} from './ColorInput'\nexport type {ColorValue, ColorInputProps, ColorOptions, ColorSchemaType} from './ColorInput'\n"],"names":[],"version":3,"file":"index.d.ts.map","sourceRoot":"../"}
|