goblin-gadgets 3.2.0 → 3.2.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "goblin-gadgets",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "Gadgets library",
5
5
  "main": "./builders/builders.js",
6
6
  "scripts": {
@@ -20,7 +20,8 @@
20
20
  "xcraft-core-utils": "^4.0.0",
21
21
  "goblin-nabu": "^2.0.0",
22
22
  "goblin-toolbox": "^1.0.0",
23
- "remark-gfm": "^3.0.1"
23
+ "remark-gfm": "^3.0.1",
24
+ "remark-supersub": "^1.0.0"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@fortawesome/react-fontawesome": "^0.1.9",
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import Widget from 'goblin-laboratory/widgets/widget';
4
4
  import ReactMarkdown from 'react-markdown';
5
5
  import remarkGfm from 'remark-gfm';
6
+ import remarkSupersub from 'remark-supersub';
6
7
  import * as styles from './styles';
7
8
 
8
9
  /******************************************************************************/
@@ -18,7 +19,7 @@ export default class Markdown extends Widget {
18
19
  return (
19
20
  <ReactMarkdown
20
21
  className={this.styles.classNames.markdown}
21
- remarkPlugins={[remarkGfm]}
22
+ remarkPlugins={[remarkGfm, remarkSupersub]}
22
23
  {...rest}
23
24
  >
24
25
  {source}
@@ -15,6 +15,24 @@ export default [
15
15
  group: 'main',
16
16
  type: types.component,
17
17
  },
18
+ {
19
+ name: 'hide',
20
+ group: 'main',
21
+ type: types.bool,
22
+ description: 'Hide the splitter.',
23
+ },
24
+
25
+ // Overflow.
26
+ {
27
+ name: 'firstOverflow',
28
+ group: 'overflow',
29
+ type: types.enum(['hidden', 'visible']),
30
+ },
31
+ {
32
+ name: 'lastOverflow',
33
+ group: 'overflow',
34
+ type: types.enum(['hidden', 'visible']),
35
+ },
18
36
 
19
37
  // Size (initial).
20
38
  {
@@ -15,8 +15,8 @@ export default function styles(theme, props) {
15
15
 
16
16
  const resizerDragging = {
17
17
  zIndex: 1,
18
- width: kind === 'vertical' ? theme.shapes.splitterSize : null,
19
- height: kind === 'horizontal' ? theme.shapes.splitterSize : null,
18
+ minWidth: kind === 'vertical' ? theme.shapes.splitterSize : null,
19
+ minHeight: kind === 'horizontal' ? theme.shapes.splitterSize : null,
20
20
  cursor: kind === 'vertical' ? 'col-resize' : 'row-resize',
21
21
  backgroundColor: theme.palette.splitterBackgroundHover,
22
22
  };
@@ -351,14 +351,18 @@ class Splitter extends Widget {
351
351
 
352
352
  const firstPaneStyle = {
353
353
  display: 'flex',
354
- overflow: 'hidden',
354
+ overflow: this.props.firstOverflow ?? 'hidden',
355
355
  };
356
356
 
357
357
  const lastPaneStyle = {
358
358
  display: 'flex',
359
- overflow: 'hidden',
359
+ overflow: this.props.lastOverflow ?? 'hidden',
360
360
  };
361
361
 
362
+ if (this.props.hide) {
363
+ lastPaneStyle.display = 'none';
364
+ }
365
+
362
366
  if (this.unit === '%') {
363
367
  if (this.master === 'first') {
364
368
  if (isDefined(this.positions.first)) {