@startupjs/docs 0.55.0 → 0.55.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.
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { ScrollView, Image } from 'react-native'
3
3
  import { pug, observer } from 'startupjs'
4
- import { Div, Row, Select } from '@startupjs/ui'
4
+ import { Div, Select } from '@startupjs/ui'
5
5
  import { BASE_URL } from '@env'
6
6
  import { useLang } from '../../../../clientHelpers'
7
7
  import Options from './Options'
@@ -25,7 +25,7 @@ export default observer(function Content ({
25
25
  ScrollView
26
26
  Image.logo(testID='logo' source={ uri: baseUrl + '/img/docs.png' })
27
27
  Docs
28
- Row.footer
28
+ Div.footer(row)
29
29
  Select.lang(
30
30
  testID='languagesSelect'
31
31
  options=LANGUAGES
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
  import { pug, emit, observer, useModel, $ } from 'startupjs'
3
3
  import { pathFor, useLocation } from 'startupjs/app'
4
- import { AutoSuggest, Button, Div, Layout, Menu, Row, Span } from '@startupjs/ui'
4
+ import { AutoSuggest, Button, Div, Layout, Menu, Span } from '@startupjs/ui'
5
5
  import { MDXProvider } from '@startupjs/mdx'
6
6
  import { ScrollableProvider } from '@startupjs/scrollable-anchors'
7
7
  import { faBars, faSearch } from '@fortawesome/free-solid-svg-icons'
@@ -77,7 +77,7 @@ const Topbar = observer(function Topbar () {
77
77
  }
78
78
 
79
79
  return pug`
80
- Row.topbar
80
+ Div.topbar(row)
81
81
  Button(testID='button' variant='text' icon=faBars onPress=toggleSidebar color='text-description')
82
82
  Div.searchWrapper
83
83
  Search
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { pug, observer, useModel, useLocal } from 'startupjs'
3
- import { themed, Div, Span, Row } from '@startupjs/ui'
3
+ import { themed, Div, Span } from '@startupjs/ui'
4
4
  import './index.styl'
5
5
 
6
6
  const GRID_SIZE = 8
@@ -17,16 +17,16 @@ export default observer(function GridVisualizer ({
17
17
  style,
18
18
  children
19
19
  }) {
20
- let $componentSize = useModel('_session.Renderer.componentSize')
20
+ const $componentSize = useModel('_session.Renderer.componentSize')
21
21
 
22
22
  function onLayout (e) {
23
- let { width, height } = e.nativeEvent.layout
23
+ const { width, height } = e.nativeEvent.layout
24
24
  $componentSize.setDiffDeep({ width, height })
25
25
  }
26
26
 
27
27
  // TODO: Bring back width check as an option. For now it's commented out.
28
28
  return pug`
29
- Row.vertical
29
+ Div.vertical(row)
30
30
  LeftBar(
31
31
  allowHalfUnit=allowHalfUnit
32
32
  validate=validateHeight
@@ -45,13 +45,13 @@ export default observer(function GridVisualizer ({
45
45
  })
46
46
 
47
47
  const LeftBar = observer(themed(({ allowHalfUnit, validate, theme }) => {
48
- let [height = 0] = useLocal('_session.Renderer.componentSize.height')
49
- let units = toUnits(height)
50
- let valid = validate ? validateGrid(height, allowHalfUnit) : true
48
+ const [height = 0] = useLocal('_session.Renderer.componentSize.height')
49
+ const units = toUnits(height)
50
+ const valid = validate ? validateGrid(height, allowHalfUnit) : true
51
51
 
52
52
  return pug`
53
53
  Div.leftBar
54
- Row.leftBarWrapper(style={ width: height })
54
+ Div.leftBarWrapper(style={ width: height } row)
55
55
  Div.leftBarLine(styleName=[theme, { valid }])
56
56
  Span.leftBarText(styleName=[theme, { valid }])= units
57
57
  Div.leftBarLine(styleName=[theme, { valid }])
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { pug, observer } from 'startupjs'
3
- import { themed, Row, Div } from '@startupjs/ui'
3
+ import { themed, Div } from '@startupjs/ui'
4
4
  import GridVisualizer from './GridVisualizer'
5
5
 
6
6
  export default observer(themed(function Renderer ({
@@ -19,12 +19,13 @@ export default observer(themed(function Renderer ({
19
19
  style
20
20
  }) {
21
21
  let Wrapper
22
- let extraProps = {}
22
+ const extraProps = {}
23
23
  if (showSizes) {
24
24
  Wrapper = GridVisualizer
25
25
  extraProps.block = block
26
26
  } else {
27
- Wrapper = block ? Div : Row
27
+ Wrapper = Div
28
+ extraProps.row = !block
28
29
  }
29
30
 
30
31
  return pug`
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo, useState } from 'react'
2
2
  import { pug, observer, $root, useComponentId } from 'startupjs'
3
- import { themed, Button, Row, Div, ScrollView } from '@startupjs/ui'
3
+ import { themed, Button, Div, ScrollView } from '@startupjs/ui'
4
4
  import parsePropTypesModule from 'parse-prop-types'
5
5
  import Constructor from './Constructor'
6
6
  import Renderer from './Renderer'
@@ -41,7 +41,7 @@ function useEntries ({ Component, props, extraParams }) {
41
41
 
42
42
  function parseEntries (entries) {
43
43
  return entries.map(entry => {
44
- let meta = entry[1]
44
+ const meta = entry[1]
45
45
  return {
46
46
  name: entry[0],
47
47
  type: meta.type.name,
@@ -133,7 +133,7 @@ export default observer(themed(function PComponent ({
133
133
  showSizes=showSizes
134
134
  block=block
135
135
  )
136
- Row.display(align='right')
136
+ Div.display(align='right' row)
137
137
  Button(
138
138
  size='s'
139
139
  variant='text'
package/package.json CHANGED
@@ -4,14 +4,14 @@
4
4
  "access": "public"
5
5
  },
6
6
  "description": "MDX documentation generator",
7
- "version": "0.55.0",
7
+ "version": "0.55.1",
8
8
  "type": "module",
9
9
  "main": "index.js",
10
10
  "dependencies": {
11
11
  "@fortawesome/free-solid-svg-icons": "^5.12.0",
12
- "@startupjs/mdx": "^0.55.0",
13
- "@startupjs/scrollable-anchors": "^0.55.0",
14
- "@startupjs/ui": "^0.55.0",
12
+ "@startupjs/mdx": "^0.55.1",
13
+ "@startupjs/scrollable-anchors": "^0.55.1",
14
+ "@startupjs/ui": "^0.55.1",
15
15
  "parse-prop-types": "^0.3.0"
16
16
  },
17
17
  "peerDependencies": {
@@ -19,5 +19,5 @@
19
19
  "react-native": "*",
20
20
  "startupjs": "*"
21
21
  },
22
- "gitHead": "96bd7446a242b5c096b03a25a99e8a1fae3bb9a7"
22
+ "gitHead": "88d13d7c882487c160d0d416b1b04bba28e6298d"
23
23
  }