@vitessce/vit-s 2.0.3 → 3.0.1

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.
Files changed (215) hide show
  1. package/dist/index.js +44072 -0
  2. package/dist-tsc/CallbackPublisher.d.ts +18 -0
  3. package/dist-tsc/CallbackPublisher.d.ts.map +1 -0
  4. package/dist-tsc/CallbackPublisher.js +62 -0
  5. package/dist-tsc/LoadingIndicator.d.ts +2 -0
  6. package/dist-tsc/LoadingIndicator.d.ts.map +1 -0
  7. package/dist-tsc/LoadingIndicator.js +26 -0
  8. package/dist-tsc/TitleInfo.d.ts +2 -0
  9. package/dist-tsc/TitleInfo.d.ts.map +1 -0
  10. package/dist-tsc/TitleInfo.js +74 -0
  11. package/dist-tsc/VitS.d.ts +50 -0
  12. package/dist-tsc/VitS.d.ts.map +1 -0
  13. package/dist-tsc/VitS.js +139 -0
  14. package/dist-tsc/VitessceGrid.d.ts +23 -0
  15. package/dist-tsc/VitessceGrid.d.ts.map +1 -0
  16. package/dist-tsc/VitessceGrid.js +63 -0
  17. package/dist-tsc/VitessceGrid.test.d.ts +2 -0
  18. package/dist-tsc/VitessceGrid.test.d.ts.map +1 -0
  19. package/dist-tsc/VitessceGrid.test.js +43 -0
  20. package/dist-tsc/Warning.d.ts +2 -0
  21. package/dist-tsc/Warning.d.ts.map +1 -0
  22. package/dist-tsc/Warning.js +45 -0
  23. package/dist-tsc/classNames.d.ts +8 -0
  24. package/dist-tsc/classNames.d.ts.map +1 -0
  25. package/dist-tsc/classNames.js +8 -0
  26. package/dist-tsc/data/AbstractLoader.d.ts +22 -0
  27. package/dist-tsc/data/AbstractLoader.d.ts.map +1 -0
  28. package/dist-tsc/data/AbstractLoader.js +18 -0
  29. package/dist-tsc/data/AbstractTwoStepLoader.d.ts +6 -0
  30. package/dist-tsc/data/AbstractTwoStepLoader.d.ts.map +1 -0
  31. package/dist-tsc/data/AbstractTwoStepLoader.js +7 -0
  32. package/dist-tsc/data/LoaderResult.d.ts +12 -0
  33. package/dist-tsc/data/LoaderResult.d.ts.map +1 -0
  34. package/dist-tsc/data/LoaderResult.js +12 -0
  35. package/dist-tsc/data/index.d.ts +4 -0
  36. package/dist-tsc/data/index.d.ts.map +1 -0
  37. package/dist-tsc/data/index.js +3 -0
  38. package/dist-tsc/data/loader-registry.d.ts +9 -0
  39. package/dist-tsc/data/loader-registry.d.ts.map +1 -0
  40. package/dist-tsc/data/loader-registry.js +27 -0
  41. package/dist-tsc/data-hook-utils.d.ts +65 -0
  42. package/dist-tsc/data-hook-utils.d.ts.map +1 -0
  43. package/dist-tsc/data-hook-utils.js +191 -0
  44. package/dist-tsc/data-hooks.d.ts +73 -0
  45. package/dist-tsc/data-hooks.d.ts.map +1 -0
  46. package/dist-tsc/data-hooks.js +254 -0
  47. package/dist-tsc/errors/AbstractLoaderError.d.ts +10 -0
  48. package/dist-tsc/errors/AbstractLoaderError.d.ts.map +1 -0
  49. package/dist-tsc/errors/AbstractLoaderError.js +13 -0
  50. package/dist-tsc/errors/DataSourceFetchError.d.ts +8 -0
  51. package/dist-tsc/errors/DataSourceFetchError.d.ts.map +1 -0
  52. package/dist-tsc/errors/DataSourceFetchError.js +13 -0
  53. package/dist-tsc/errors/DatasetNotFoundError.d.ts +6 -0
  54. package/dist-tsc/errors/DatasetNotFoundError.d.ts.map +1 -0
  55. package/dist-tsc/errors/DatasetNotFoundError.js +17 -0
  56. package/dist-tsc/errors/LoaderNotFoundError.d.ts +10 -0
  57. package/dist-tsc/errors/LoaderNotFoundError.d.ts.map +1 -0
  58. package/dist-tsc/errors/LoaderNotFoundError.js +17 -0
  59. package/dist-tsc/errors/LoaderValidationError.d.ts +10 -0
  60. package/dist-tsc/errors/LoaderValidationError.d.ts.map +1 -0
  61. package/dist-tsc/errors/LoaderValidationError.js +15 -0
  62. package/dist-tsc/errors/index.d.ts +6 -0
  63. package/dist-tsc/errors/index.d.ts.map +1 -0
  64. package/dist-tsc/errors/index.js +5 -0
  65. package/dist-tsc/hooks.d.ts +76 -0
  66. package/dist-tsc/hooks.d.ts.map +1 -0
  67. package/dist-tsc/hooks.js +262 -0
  68. package/dist-tsc/index.d.ts +12 -0
  69. package/dist-tsc/index.d.ts.map +1 -0
  70. package/dist-tsc/index.js +11 -17
  71. package/dist-tsc/mui-utils.d.ts +2 -0
  72. package/dist-tsc/mui-utils.d.ts.map +1 -0
  73. package/dist-tsc/mui-utils.js +44 -0
  74. package/dist-tsc/plugins.test.fixtures.d.ts +61 -0
  75. package/dist-tsc/plugins.test.fixtures.d.ts.map +1 -0
  76. package/dist-tsc/plugins.test.fixtures.js +76 -0
  77. package/dist-tsc/shared-mui/components.d.ts +2 -0
  78. package/dist-tsc/shared-mui/components.d.ts.map +1 -0
  79. package/dist-tsc/shared-mui/components.js +29 -0
  80. package/dist-tsc/shared-mui/container.d.ts +2 -0
  81. package/dist-tsc/shared-mui/container.d.ts.map +1 -0
  82. package/dist-tsc/shared-mui/container.js +211 -0
  83. package/dist-tsc/shared-mui/styles.d.ts +5 -0
  84. package/dist-tsc/shared-mui/styles.d.ts.map +1 -0
  85. package/dist-tsc/shared-mui/styles.js +109 -0
  86. package/dist-tsc/shared-plot-options/CellColorEncodingOption.d.ts +2 -0
  87. package/dist-tsc/shared-plot-options/CellColorEncodingOption.d.ts.map +1 -0
  88. package/dist-tsc/shared-plot-options/CellColorEncodingOption.js +17 -0
  89. package/dist-tsc/shared-plot-options/OptionSelect.d.ts +2 -0
  90. package/dist-tsc/shared-plot-options/OptionSelect.d.ts.map +1 -0
  91. package/dist-tsc/shared-plot-options/OptionSelect.js +12 -0
  92. package/dist-tsc/shared-plot-options/OptionsContainer.d.ts +2 -0
  93. package/dist-tsc/shared-plot-options/OptionsContainer.d.ts.map +1 -0
  94. package/dist-tsc/shared-plot-options/OptionsContainer.js +9 -0
  95. package/dist-tsc/shared-plot-options/index.d.ts +5 -0
  96. package/dist-tsc/shared-plot-options/index.d.ts.map +1 -0
  97. package/dist-tsc/shared-plot-options/index.js +4 -0
  98. package/dist-tsc/shared-plot-options/styles.d.ts +2 -0
  99. package/dist-tsc/shared-plot-options/styles.d.ts.map +1 -0
  100. package/dist-tsc/shared-plot-options/styles.js +48 -0
  101. package/dist-tsc/state/hooks.d.ts +242 -0
  102. package/dist-tsc/state/hooks.d.ts.map +1 -0
  103. package/dist-tsc/state/hooks.js +615 -0
  104. package/dist-tsc/title-styles.d.ts +2 -0
  105. package/dist-tsc/title-styles.d.ts.map +1 -0
  106. package/dist-tsc/title-styles.js +72 -0
  107. package/dist-tsc/view-config-utils.d.ts +31 -0
  108. package/dist-tsc/view-config-utils.d.ts.map +1 -0
  109. package/dist-tsc/view-config-utils.js +240 -0
  110. package/dist-tsc/view-config-utils.test.d.ts +2 -0
  111. package/dist-tsc/view-config-utils.test.d.ts.map +1 -0
  112. package/dist-tsc/view-config-utils.test.fixtures.d.ts +1049 -0
  113. package/dist-tsc/view-config-utils.test.fixtures.d.ts.map +1 -0
  114. package/dist-tsc/view-config-utils.test.fixtures.js +883 -0
  115. package/dist-tsc/view-config-utils.test.js +210 -0
  116. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts +8 -0
  117. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts.map +1 -0
  118. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.js +114 -0
  119. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.d.ts +2 -0
  120. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.d.ts.map +1 -0
  121. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.js +48 -0
  122. package/dist-tsc/vitessce-grid-layout/index.d.ts +2 -0
  123. package/dist-tsc/vitessce-grid-layout/index.d.ts.map +1 -0
  124. package/dist-tsc/vitessce-grid-layout/index.js +1 -0
  125. package/dist-tsc/vitessce-grid-layout/layout-utils.d.ts +15 -0
  126. package/dist-tsc/vitessce-grid-layout/layout-utils.d.ts.map +1 -0
  127. package/dist-tsc/vitessce-grid-layout/layout-utils.js +61 -0
  128. package/dist-tsc/vitessce-grid-layout/layout-utils.test.d.ts +2 -0
  129. package/dist-tsc/vitessce-grid-layout/layout-utils.test.d.ts.map +1 -0
  130. package/dist-tsc/vitessce-grid-layout/layout-utils.test.js +149 -0
  131. package/dist-tsc/vitessce-grid-utils.d.ts +13 -0
  132. package/dist-tsc/vitessce-grid-utils.d.ts.map +1 -0
  133. package/dist-tsc/vitessce-grid-utils.js +141 -0
  134. package/package.json +25 -11
  135. package/src/CallbackPublisher.js +7 -11
  136. package/src/LoadingIndicator.js +1 -2
  137. package/src/TitleInfo.js +12 -85
  138. package/src/VitS.js +143 -85
  139. package/src/VitessceGrid.js +35 -21
  140. package/src/VitessceGrid.test.jsx +23 -8
  141. package/src/Warning.js +4 -4
  142. package/src/data/AbstractLoader.js +2 -25
  143. package/src/data/AbstractTwoStepLoader.js +1 -1
  144. package/src/data/LoaderResult.js +5 -0
  145. package/src/data/index.js +3 -3
  146. package/src/data/loader-registry.js +22 -13
  147. package/src/data-hook-utils.js +119 -86
  148. package/src/data-hooks.js +150 -131
  149. package/src/errors/DataSourceFetchError.js +2 -2
  150. package/src/errors/DatasetNotFoundError.js +1 -1
  151. package/src/errors/LoaderNotFoundError.js +1 -1
  152. package/src/errors/LoaderValidationError.js +1 -1
  153. package/src/errors/index.js +5 -6
  154. package/src/hooks.js +81 -26
  155. package/src/index.js +23 -46
  156. package/src/mui-utils.js +52 -0
  157. package/src/shared-mui/components.js +10 -8
  158. package/src/shared-mui/container.js +1 -1
  159. package/src/shared-mui/styles.js +5 -2
  160. package/src/shared-plot-options/CellColorEncodingOption.js +3 -4
  161. package/src/shared-plot-options/OptionSelect.js +3 -3
  162. package/src/shared-plot-options/OptionsContainer.js +2 -5
  163. package/src/shared-plot-options/index.js +4 -4
  164. package/src/shared-plot-options/styles.js +2 -2
  165. package/src/state/hooks.js +75 -23
  166. package/src/title-styles.js +73 -0
  167. package/src/view-config-utils.js +54 -98
  168. package/src/view-config-utils.test.jsx +223 -0
  169. package/src/vitessce-grid-layout/VitessceGridLayout.js +51 -30
  170. package/src/vitessce-grid-layout/VitessceGridLayout.test.jsx +17 -9
  171. package/src/vitessce-grid-layout/index.js +1 -1
  172. package/src/vitessce-grid-layout/layout-utils.js +1 -1
  173. package/src/vitessce-grid-layout/layout-utils.test.js +2 -1
  174. package/src/vitessce-grid-utils.js +27 -15
  175. package/dist/index.mjs +0 -84801
  176. package/src/component-registry.js +0 -21
  177. package/src/errors/OptionsValidationError.js +0 -25
  178. package/src/file-options-schemas-legacy.js +0 -139
  179. package/src/file-options-schemas-legacy.test.js +0 -138
  180. package/src/file-options-schemas.js +0 -327
  181. package/src/file-options-schemas.test.js +0 -26
  182. package/src/joint-file-types-legacy.js +0 -298
  183. package/src/joint-file-types-legacy.test.js +0 -412
  184. package/src/joint-file-types.js +0 -171
  185. package/src/joint-file-types.test.js +0 -144
  186. package/src/json-schemas.js +0 -9
  187. package/src/plugins.js +0 -186
  188. package/src/plugins.test.js +0 -42
  189. package/src/schemas/config-0.1.0.schema.json +0 -85
  190. package/src/schemas/config-1.0.0.schema.json +0 -733
  191. package/src/schemas/config-1.0.1.schema.json +0 -909
  192. package/src/schemas/config-1.0.10.schema.json +0 -969
  193. package/src/schemas/config-1.0.11.schema.json +0 -990
  194. package/src/schemas/config-1.0.12.schema.json +0 -997
  195. package/src/schemas/config-1.0.13.schema.json +0 -1013
  196. package/src/schemas/config-1.0.14.schema.json +0 -1048
  197. package/src/schemas/config-1.0.15.schema.json +0 -1048
  198. package/src/schemas/config-1.0.16.schema.json +0 -1069
  199. package/src/schemas/config-1.0.16.schema.test.js +0 -32
  200. package/src/schemas/config-1.0.2.schema.json +0 -911
  201. package/src/schemas/config-1.0.3.schema.json +0 -911
  202. package/src/schemas/config-1.0.4.schema.json +0 -949
  203. package/src/schemas/config-1.0.5.schema.json +0 -949
  204. package/src/schemas/config-1.0.6.schema.json +0 -950
  205. package/src/schemas/config-1.0.7.schema.json +0 -950
  206. package/src/schemas/config-1.0.8.schema.json +0 -966
  207. package/src/schemas/config-1.0.9.schema.json +0 -965
  208. package/src/schemas/obsSets.schema.js +0 -195
  209. package/src/schemas/obsSetsTabular.schema.js +0 -39
  210. package/src/schemas/raster.schema.js +0 -121
  211. package/src/schemas/schema-schema.sh +0 -34
  212. package/src/schemas/schema.test-old.js +0 -49
  213. package/src/view-config-upgraders.js +0 -628
  214. package/src/view-config-utils.test.js +0 -95
  215. package/src/view-config-versions.js +0 -68
@@ -0,0 +1,211 @@
1
+ import { makeStyles } from '@material-ui/core';
2
+ export const useVitessceContainerStyles = makeStyles(theme => ({
3
+ vitessceContainer: {
4
+ position: 'relative',
5
+ margin: '0',
6
+ textAlign: 'left',
7
+ backgroundColor: theme.palette.gridLayoutBackground,
8
+ '& div': {
9
+ fontFamily: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
10
+ fontSize: '16px',
11
+ fontWeight: '400',
12
+ lineHeight: '1.5',
13
+ textAlign: 'left',
14
+ },
15
+ '& p': {
16
+ marginTop: '0',
17
+ marginBottom: '16px',
18
+ },
19
+ '& *, ::after, ::before': {
20
+ boxSizing: 'border-box',
21
+ },
22
+ // Manually converted styles from 'react-grid-layout/css/styles.css',
23
+ // using https://cssinjs.org/jss-plugin-global/?v=v10.9.2
24
+ // so that no CSS or SCSS import is required.
25
+ '@global .react-grid-layout': {
26
+ transition: 'height 200ms ease',
27
+ // Custom
28
+ height: 'auto',
29
+ position: 'absolute',
30
+ width: '100%',
31
+ },
32
+ '@global .react-grid-item': {
33
+ transition: 'all 200ms ease',
34
+ transitionProperty: 'left, top',
35
+ // Custom
36
+ flexDirection: 'column!important',
37
+ display: 'flex!important',
38
+ /* So the resize handle position looks correct: */
39
+ paddingRight: '10px',
40
+ },
41
+ '@global .react-grid-item img': {
42
+ pointerEvents: 'none',
43
+ userSelect: 'none',
44
+ },
45
+ '@global .react-grid-item.cssTransforms': {
46
+ transitionProperty: 'transform',
47
+ },
48
+ '@global .react-grid-item.resizing': {
49
+ zIndex: '1',
50
+ willChange: 'width, height',
51
+ },
52
+ '@global .react-grid-item.react-draggable-dragging': {
53
+ transition: 'none',
54
+ zIndex: '3',
55
+ willChange: 'transform',
56
+ },
57
+ '@global .react-grid-item.dropping': {
58
+ visibility: 'hidden',
59
+ },
60
+ '@global .react-grid-item.react-grid-placeholder': {
61
+ background: 'red',
62
+ opacity: '0.2',
63
+ transitionDuration: '100ms',
64
+ zIndex: '2',
65
+ userSelect: 'none',
66
+ },
67
+ '@global .react-grid-item > .react-resizable-handle': {
68
+ position: 'absolute',
69
+ width: '20px',
70
+ height: '20px',
71
+ },
72
+ '@global .react-grid-item > .react-resizable-handle::after': {
73
+ content: '""',
74
+ position: 'absolute',
75
+ right: '3px',
76
+ bottom: '3px',
77
+ width: '5px',
78
+ height: '5px',
79
+ borderRight: '2px solid rgba(0, 0, 0, 0.4)',
80
+ borderBottom: '2px solid rgba(0, 0, 0, 0.4)',
81
+ },
82
+ '@global .react-resizable-hide > .react-resizable-handle': {
83
+ display: 'none',
84
+ },
85
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-sw': {
86
+ bottom: '0',
87
+ left: '0',
88
+ cursor: 'sw-resize',
89
+ transform: 'rotate(90deg)',
90
+ },
91
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-se': {
92
+ bottom: '0',
93
+ right: '0',
94
+ cursor: 'se-resize',
95
+ },
96
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-nw': {
97
+ top: '0',
98
+ left: '0',
99
+ cursor: 'nw-resize',
100
+ transform: 'rotate(180deg)',
101
+ },
102
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-ne': {
103
+ top: '0',
104
+ right: '0',
105
+ cursor: 'ne-resize',
106
+ transform: 'rotate(270deg)',
107
+ },
108
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-w': {
109
+ top: '50%',
110
+ marginTop: '-10px',
111
+ cursor: 'ew-resize',
112
+ left: '0',
113
+ transform: 'rotate(135deg)',
114
+ },
115
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-e': {
116
+ top: '50%',
117
+ marginTop: '-10px',
118
+ cursor: 'ew-resize',
119
+ right: '0',
120
+ transform: 'rotate(315deg)',
121
+ },
122
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-n': {
123
+ left: '50%',
124
+ marginLeft: '-10px',
125
+ cursor: 'ns-resize',
126
+ top: '0',
127
+ transform: 'rotate(225deg)',
128
+ },
129
+ '@global .react-grid-item > .react-resizable-handle.react-resizable-handle-s': {
130
+ left: '50%',
131
+ marginLeft: '-10px',
132
+ cursor: 'ns-resize',
133
+ bottom: '0',
134
+ transform: 'rotate(45deg)',
135
+ },
136
+ // Manually converted styles from 'react-resizable/css/styles.css',
137
+ '@global .react-resizable': {
138
+ position: 'relative',
139
+ },
140
+ '@global .react-resizable-handle': {
141
+ position: 'absolute',
142
+ width: '20px',
143
+ height: '20px',
144
+ backgroundRepeat: 'no-repeat',
145
+ backgroundOrigin: 'content-box',
146
+ boxSizing: 'border-box',
147
+ backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+')",
148
+ backgroundPosition: 'bottom right',
149
+ padding: '0 3px 3px 0',
150
+ },
151
+ '@global .react-resizable-handle-sw': {
152
+ bottom: '0',
153
+ left: '0',
154
+ cursor: 'sw-resize',
155
+ transform: 'rotate(90deg)',
156
+ },
157
+ '@global .react-resizable-handle-se': {
158
+ bottom: '0',
159
+ right: '0',
160
+ cursor: 'se-resize',
161
+ },
162
+ '@global .react-resizable-handle-nw': {
163
+ top: '0',
164
+ left: '0',
165
+ cursor: 'nw-resize',
166
+ transform: 'rotate(180deg)',
167
+ },
168
+ '@global .react-resizable-handle-ne': {
169
+ top: '0',
170
+ right: '0',
171
+ cursor: 'ne-resize',
172
+ transform: 'rotate(270deg)',
173
+ },
174
+ '@global .react-resizable-handle-w': {
175
+ top: '50%',
176
+ marginTop: '-10px',
177
+ cursor: 'ew-resize',
178
+ left: '0',
179
+ transform: 'rotate(135deg)',
180
+ },
181
+ '@global .react-resizable-handle-e': {
182
+ top: '50%',
183
+ marginTop: '-10px',
184
+ cursor: 'ew-resize',
185
+ right: '0',
186
+ transform: 'rotate(315deg)',
187
+ },
188
+ '@global .react-resizable-handle-n': {
189
+ left: '50%',
190
+ marginLeft: '-10px',
191
+ cursor: 'ns-resize',
192
+ top: '0',
193
+ transform: 'rotate(225deg)',
194
+ },
195
+ '@global .react-resizable-handle-s': {
196
+ left: '50%',
197
+ marginLeft: '-10px',
198
+ cursor: 'ns-resize',
199
+ bottom: '0',
200
+ transform: 'rotate(45deg)',
201
+ },
202
+ // Custom
203
+ '@global .react-draggable-transparent-selection .react-grid-item': {
204
+ /* These styles prevent text selection during resize drag interactions.
205
+ The react-draggable-transparent-selection class is added to the body
206
+ element during resizing and removed after resizing has finished.
207
+ Not part of mixin because acts outside of .vitessce-container. */
208
+ userSelect: 'none !important',
209
+ },
210
+ },
211
+ }));
@@ -0,0 +1,5 @@
1
+ export namespace muiTheme {
2
+ const dark: import("@material-ui/core").Theme;
3
+ const light: import("@material-ui/core").Theme;
4
+ }
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/shared-mui/styles.js"],"names":[],"mappings":""}
@@ -0,0 +1,109 @@
1
+ import { createTheme, colors } from '@material-ui/core';
2
+ const { grey } = colors;
3
+ const globalColors = {
4
+ white: '#FFFFFF',
5
+ grayLight: '#D3D3D3',
6
+ grayMid: '#808080',
7
+ grayDark: '#555555',
8
+ black: '#000000',
9
+ grayDarkL5: 'rgb(98, 98, 98)',
10
+ grayDarkD15: 'rgb(47, 47, 47)',
11
+ grayMidL10: 'rgb(154, 154, 154)',
12
+ grayLightL10: 'rgb(237, 237, 237)', // lighten(map-get($global-colors, "gray-light"), 10%);
13
+ };
14
+ const sharedThemeOptions = {
15
+ // Use px instead of rem, so that sizing is consistent despite the root element font-size.
16
+ // Reference: https://github.com/mui/material-ui/blob/627c08fc/src/styles/createTypography.js
17
+ typography: {
18
+ pxToRem: size => `${size}px`,
19
+ display4: {
20
+ fontSize: '112px',
21
+ },
22
+ display3: {
23
+ fontSize: '56px',
24
+ },
25
+ display2: {
26
+ fontSize: '45px',
27
+ },
28
+ display1: {
29
+ fontSize: '34px',
30
+ },
31
+ headline: {
32
+ fontSize: '24px',
33
+ },
34
+ title: {
35
+ fontSize: '21px',
36
+ },
37
+ subheading: {
38
+ fontSize: '16px',
39
+ },
40
+ body2: {
41
+ fontSize: '14px',
42
+ },
43
+ body1: {
44
+ fontSize: '14px',
45
+ },
46
+ caption: {
47
+ fontSize: '12px',
48
+ },
49
+ },
50
+ props: {
51
+ MuiButtonBase: {
52
+ disableRipple: true,
53
+ },
54
+ },
55
+ };
56
+ export const muiTheme = {
57
+ dark: createTheme({
58
+ palette: {
59
+ type: 'dark',
60
+ primary: grey,
61
+ secondary: grey,
62
+ primaryBackground: '#222222',
63
+ primaryBackgroundHighlight: '#000000',
64
+ primaryBackgroundInput: '#D3D3D3',
65
+ primaryBackgroundDim: '#333333',
66
+ primaryBackgroundLight: '#757575',
67
+ primaryForeground: '#D3D3D3',
68
+ primaryForegroundL5: 'rgb(224, 224, 224)',
69
+ primaryForegroundL10: 'rgb(237, 237, 237)',
70
+ primaryForegroundD15: 'rgb(173, 173, 173)',
71
+ primaryForegroundDim: '#000000',
72
+ primaryForegroundActive: '#9bb7d6',
73
+ secondaryBackground: '#000000',
74
+ secondaryBackgroundDim: '#444444',
75
+ secondaryForeground: '#D3D3D3',
76
+ gridLayoutBackground: '#333333',
77
+ cardBorder: 'rgba(0, 0, 0, 0.125)',
78
+ tooltipText: '#FFFFFF',
79
+ ...globalColors,
80
+ },
81
+ ...sharedThemeOptions,
82
+ }),
83
+ light: createTheme({
84
+ palette: {
85
+ type: 'light',
86
+ primary: grey,
87
+ secondary: grey,
88
+ primaryBackground: '#F1F1F1',
89
+ primaryBackgroundHighlight: '#FFFFFF',
90
+ primaryBackgroundInput: '#FFFFFF',
91
+ primaryBackgroundDim: '#8A8A8A',
92
+ primaryBackgroundLight: '#e0e0e0',
93
+ primaryForeground: '#333333',
94
+ primaryForegroundL5: 'rgb(64, 64, 64)',
95
+ primaryForegroundL10: 'rgb(77, 77, 77)',
96
+ primaryForegroundD15: 'rgb(13, 13, 13)',
97
+ primaryForegroundDim: '#808080',
98
+ primaryForegroundActive: '#0074D9',
99
+ secondaryBackground: '#F1F1F1',
100
+ secondaryBackgroundDim: '#C0C0C0',
101
+ secondaryForeground: '#222222',
102
+ gridLayoutBackground: '#FFFFFF',
103
+ cardBorder: 'rgba(241, 241, 241, 0.125)',
104
+ tooltipText: 'rgba(0, 0, 0, 0.87)',
105
+ ...globalColors,
106
+ },
107
+ ...sharedThemeOptions,
108
+ }),
109
+ };
@@ -0,0 +1,2 @@
1
+ export default function CellColorEncodingOption(props: any): JSX.Element;
2
+ //# sourceMappingURL=CellColorEncodingOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellColorEncodingOption.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/CellColorEncodingOption.js"],"names":[],"mappings":"AAMA,yEAmCC"}
@@ -0,0 +1,17 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { TableCell, TableRow } from '@material-ui/core';
4
+ import { capitalize } from '@vitessce/utils';
5
+ import OptionSelect from './OptionSelect.js';
6
+ import { useStyles } from './styles.js';
7
+ export default function CellColorEncodingOption(props) {
8
+ const { observationsLabel, cellColorEncoding, setCellColorEncoding, } = props;
9
+ const classes = useStyles();
10
+ const observationsLabelNice = capitalize(observationsLabel);
11
+ function handleColorEncodingChange(event) {
12
+ setCellColorEncoding(event.target.value);
13
+ }
14
+ return (_jsxs(TableRow, { children: [_jsxs(TableCell, { className: classes.labelCell, htmlFor: "cell-color-encoding-select", children: [observationsLabelNice, " Color Encoding"] }), _jsx(TableCell, { className: classes.inputCell, children: _jsxs(OptionSelect, { className: classes.select, value: cellColorEncoding, onChange: handleColorEncodingChange, inputProps: {
15
+ id: 'cell-color-encoding-select',
16
+ }, children: [_jsx("option", { value: "cellSetSelection", children: "Cell Sets" }), _jsx("option", { value: "geneSelection", children: "Gene Expression" })] }) })] }));
17
+ }
@@ -0,0 +1,2 @@
1
+ export default function OptionSelect(props: any): JSX.Element;
2
+ //# sourceMappingURL=OptionSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionSelect.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/OptionSelect.js"],"names":[],"mappings":"AAIA,8DAcC"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Select } from '@material-ui/core';
4
+ import { useStyles } from './styles.js';
5
+ export default function OptionSelect(props) {
6
+ const { classes: classesProp = {} } = props;
7
+ const classes = useStyles();
8
+ return (_jsx(Select, { native: true, disableUnderline: true, ...props, classes: {
9
+ root: classes.optionSelectRoot,
10
+ ...classesProp,
11
+ } }));
12
+ }
@@ -0,0 +1,2 @@
1
+ export default function OptionsContainer(props: any): JSX.Element;
2
+ //# sourceMappingURL=OptionsContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionsContainer.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/OptionsContainer.js"],"names":[],"mappings":"AAIA,kEAkBC"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Box, Table, TableBody, TableContainer } from '@material-ui/core';
4
+ import { useStyles } from './styles.js';
5
+ export default function OptionsContainer(props) {
6
+ const { children, } = props;
7
+ const classes = useStyles();
8
+ return (_jsx(Box, { className: classes.box, children: _jsx(TableContainer, { className: classes.tableContainer, children: _jsx(Table, { className: classes.table, size: "small", children: _jsx(TableBody, { children: children }) }) }) }));
9
+ }
@@ -0,0 +1,5 @@
1
+ export { default as CellColorEncodingOption } from "./CellColorEncodingOption.js";
2
+ export { default as OptionsContainer } from "./OptionsContainer.js";
3
+ export { default as OptionSelect } from "./OptionSelect.js";
4
+ export { useStyles as usePlotOptionsStyles } from "./styles.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export { default as CellColorEncodingOption } from './CellColorEncodingOption.js';
2
+ export { default as OptionsContainer } from './OptionsContainer.js';
3
+ export { default as OptionSelect } from './OptionSelect.js';
4
+ export { useStyles as usePlotOptionsStyles } from './styles.js';
@@ -0,0 +1,2 @@
1
+ export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<never>;
2
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/styles.js"],"names":[],"mappings":"AAEA,2GA8CI"}
@@ -0,0 +1,48 @@
1
+ import { makeStyles } from '@material-ui/core';
2
+ export const useStyles = makeStyles(theme => ({
3
+ box: {
4
+ boxSizing: 'border-box',
5
+ },
6
+ checkbox: {
7
+ padding: '3px',
8
+ color: theme.palette.primaryForeground,
9
+ '&:checked': {
10
+ color: theme.palette.primaryForeground,
11
+ },
12
+ '& input': {
13
+ height: '100%',
14
+ },
15
+ },
16
+ slider: {
17
+ color: theme.palette.primaryForeground,
18
+ minWidth: '60px',
19
+ padding: '10px 0 10px 0',
20
+ },
21
+ sliderValueLabel: {
22
+ '& span': {
23
+ '& span': {
24
+ color: theme.palette.primaryBackground,
25
+ },
26
+ },
27
+ },
28
+ tableContainer: {
29
+ overflow: 'hidden',
30
+ overflowX: 'hidden !important',
31
+ },
32
+ labelCell: {
33
+ padding: '2px 8px 2px 16px',
34
+ },
35
+ inputCell: {
36
+ padding: '2px 16px 2px 8px',
37
+ overflow: 'visible',
38
+ },
39
+ select: {
40
+ '& select': {
41
+ fontSize: '14px',
42
+ },
43
+ },
44
+ optionSelectRoot: {
45
+ padding: 0,
46
+ height: 'auto',
47
+ },
48
+ }));