sanity-plugin-graph-view 1.0.4 → 2.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/LICENSE +1 -1
- package/README.md +78 -28
- package/lib/index.esm.js +2 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/src/index.d.ts +9 -0
- package/package.json +79 -31
- package/sanity.json +2 -6
- package/src/index.ts +1 -0
- package/src/plugin.tsx +30 -0
- package/src/tool/GraphView.tsx +489 -0
- package/{lib/tool/GraphToolIcon.js → src/tool/GraphViewIcon.tsx} +9 -28
- package/src/tool/GraphViewStyle.tsx +63 -0
- package/src/tool/hooks.ts +36 -0
- package/src/tool/utils.ts +51 -0
- package/v2-incompatible.js +11 -0
- package/.editorconfig +0 -16
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -18
- package/.prettierrc +0 -6
- package/assets/head-silhouette.jpg +0 -0
- package/assets/sanity-logo.png +0 -0
- package/assets/screengrab.gif +0 -0
- package/babel.config.js +0 -13
- package/config.dist.json +0 -1
- package/lib/tool/GraphTool.css +0 -56
- package/lib/tool/GraphTool.js +0 -980
- package/lib/tool/GraphView.css +0 -56
- package/lib/tool/GraphView.js +0 -724
- package/lib/tool/GraphViewIcon.js +0 -32
- package/lib/tool/hooks.js +0 -33
- package/lib/tool/index.js +0 -21
- package/lib/tool/utils.js +0 -76
package/.editorconfig
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
; editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
charset= utf8
|
|
4
|
-
|
|
5
|
-
[*]
|
|
6
|
-
end_of_line = lf
|
|
7
|
-
insert_final_newline = true
|
|
8
|
-
trim_trailing_whitespace = true
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
[*.md]
|
|
13
|
-
trim_trailing_whitespace = false
|
|
14
|
-
|
|
15
|
-
[*.snap]
|
|
16
|
-
trim_trailing_whitespace = false
|
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/lib
|
package/.eslintrc.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
env: {
|
|
5
|
-
browser: true,
|
|
6
|
-
es6: true,
|
|
7
|
-
node: true,
|
|
8
|
-
},
|
|
9
|
-
parser: 'babel-eslint',
|
|
10
|
-
plugins: ['react', 'react-hooks', 'prettier'],
|
|
11
|
-
extends: ['plugin:react/recommended', 'eslint:recommended', 'plugin:prettier/recommended'],
|
|
12
|
-
settings: {react: {version: 'detect'}},
|
|
13
|
-
rules: {
|
|
14
|
-
'react/no-unescaped-entities': 0,
|
|
15
|
-
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
|
|
16
|
-
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
|
|
17
|
-
},
|
|
18
|
-
}
|
package/.prettierrc
DELETED
|
Binary file
|
package/assets/sanity-logo.png
DELETED
|
Binary file
|
package/assets/screengrab.gif
DELETED
|
Binary file
|
package/babel.config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
module.exports = function (api) {
|
|
4
|
-
api.cache(true)
|
|
5
|
-
|
|
6
|
-
const presets = ['@babel/env', '@babel/preset-react']
|
|
7
|
-
const plugins = ['@babel/plugin-proposal-class-properties', '@babel/plugin-transform-runtime']
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
presets,
|
|
11
|
-
plugins,
|
|
12
|
-
}
|
|
13
|
-
}
|
package/config.dist.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/lib/tool/GraphTool.css
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
@import 'part:@sanity/base/theme/variables-style';
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--border-style: 1px solid rgba(0, 0, 0, 0.1);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.root {
|
|
8
|
-
position: absolute;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.hoverNode {
|
|
16
|
-
display: none;
|
|
17
|
-
position: absolute;
|
|
18
|
-
bottom: var(--large-padding);
|
|
19
|
-
left: 50%;
|
|
20
|
-
transform: translate3d(-50%, 0, 0);
|
|
21
|
-
background: var(--component-bg);
|
|
22
|
-
border-radius: var(--border-radius-medium);
|
|
23
|
-
padding: var(--small-padding);
|
|
24
|
-
z-index: 1000;
|
|
25
|
-
|
|
26
|
-
@nest &:empty {
|
|
27
|
-
display: none;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.legend {
|
|
32
|
-
color: var(--gray);
|
|
33
|
-
position: absolute;
|
|
34
|
-
top: var(--medium-padding);
|
|
35
|
-
left: var(--medium-padding);
|
|
36
|
-
|
|
37
|
-
> div {
|
|
38
|
-
margin: 5px 0;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.legend__row {
|
|
43
|
-
display: flex;
|
|
44
|
-
|
|
45
|
-
@nest .legend__row + & {
|
|
46
|
-
margin-top: 0.25em;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.legend__badge {
|
|
51
|
-
width: 1.25em;
|
|
52
|
-
height: 1.25em;
|
|
53
|
-
background: currentColor;
|
|
54
|
-
border-radius: 50%;
|
|
55
|
-
margin-right: var(--extra-small-padding);
|
|
56
|
-
}
|