@startupjs/docs 0.55.0 → 0.55.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/client/app/Layout/Sidebar/Content/Options/index.styl +1 -1
- package/client/app/Layout/Sidebar/Content/index.js +2 -2
- package/client/app/Layout/Sidebar/Content/index.styl +3 -3
- package/client/app/Layout/index.js +2 -2
- package/client/app/Layout/index.styl +3 -3
- package/client/components/Props/Constructor/Tr/index.styl +1 -1
- package/client/components/Props/Constructor/index.styl +1 -1
- package/client/components/Props/Renderer/GridVisualizer/index.js +8 -8
- package/client/components/Props/Renderer/index.js +4 -3
- package/client/components/Props/index.js +3 -3
- package/client/components/Props/index.styl +2 -2
- package/package.json +5 -5
|
@@ -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,
|
|
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
|
-
|
|
28
|
+
Div.footer(row)
|
|
29
29
|
Select.lang(
|
|
30
30
|
testID='languagesSelect'
|
|
31
31
|
options=LANGUAGES
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.root
|
|
2
|
-
background-color var(--color-bg)
|
|
2
|
+
background-color var(--color-bg-main)
|
|
3
3
|
flex 1
|
|
4
4
|
|
|
5
5
|
.main
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
margin-bottom 4u
|
|
17
17
|
|
|
18
18
|
.hr
|
|
19
|
-
border-bottom-color var(--color-border)
|
|
19
|
+
border-bottom-color var(--color-border-main)
|
|
20
20
|
|
|
21
21
|
.footer
|
|
22
22
|
padding-top 1u
|
|
23
23
|
padding-bottom 1u
|
|
24
24
|
padding-left 2u
|
|
25
25
|
padding-right 0.5u
|
|
26
|
-
background-color var(--color-bg-
|
|
26
|
+
background-color var(--color-bg-main-subtle)
|
|
27
27
|
|
|
28
28
|
.lang
|
|
29
29
|
// TODO: flex-grow 1 for some reason gets removed. Research.
|
|
@@ -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,
|
|
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
|
-
|
|
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,20 +1,20 @@
|
|
|
1
1
|
@require '../constants.styl'
|
|
2
2
|
|
|
3
3
|
.layout
|
|
4
|
-
background-color var(--color-bg-strong)
|
|
4
|
+
background-color var(--color-bg-main-strong)
|
|
5
5
|
|
|
6
6
|
.topbar
|
|
7
7
|
align-items center
|
|
8
8
|
justify-content space-between
|
|
9
9
|
border-bottom-width 1px
|
|
10
|
-
border-bottom-color var(--color-border-strong-alt)
|
|
10
|
+
border-bottom-color var(--color-border-main-strong-alt)
|
|
11
11
|
height $TOPBAR_HEIGHT
|
|
12
12
|
padding 0 1u
|
|
13
13
|
|
|
14
14
|
.searchWrapper
|
|
15
15
|
width 32u
|
|
16
16
|
border-left-width 1px
|
|
17
|
-
border-left-color var(--color-border)
|
|
17
|
+
border-left-color var(--color-border-main)
|
|
18
18
|
padding-left 2u
|
|
19
19
|
|
|
20
20
|
+tablet()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { pug, observer, useModel, useLocal } from 'startupjs'
|
|
3
|
-
import { themed, Div, Span
|
|
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
|
-
|
|
20
|
+
const $componentSize = useModel('_session.Renderer.componentSize')
|
|
21
21
|
|
|
22
22
|
function onLayout (e) {
|
|
23
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
22
|
+
const extraProps = {}
|
|
23
23
|
if (showSizes) {
|
|
24
24
|
Wrapper = GridVisualizer
|
|
25
25
|
extraProps.block = block
|
|
26
26
|
} else {
|
|
27
|
-
Wrapper =
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
136
|
+
Div.display(align='right' row)
|
|
137
137
|
Button(
|
|
138
138
|
size='s'
|
|
139
139
|
variant='text'
|
|
@@ -5,14 +5,14 @@ $darkBottomBg = var(--color-bg-contrast-alt)
|
|
|
5
5
|
margin-top 2u
|
|
6
6
|
|
|
7
7
|
.top
|
|
8
|
-
background-color var(--color-bg)
|
|
8
|
+
background-color var(--color-bg-main)
|
|
9
9
|
border-top-left-radius 1u
|
|
10
10
|
border-top-right-radius 1u
|
|
11
11
|
padding-top 1u
|
|
12
12
|
|
|
13
13
|
.bottom
|
|
14
14
|
padding-top 4u
|
|
15
|
-
background-color var(--color-bg-
|
|
15
|
+
background-color var(--color-bg-main-subtle)
|
|
16
16
|
border-bottom-left-radius 1u
|
|
17
17
|
border-bottom-right-radius 1u
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"description": "MDX documentation generator",
|
|
7
|
-
"version": "0.55.
|
|
7
|
+
"version": "0.55.2",
|
|
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.
|
|
13
|
-
"@startupjs/scrollable-anchors": "^0.55.
|
|
14
|
-
"@startupjs/ui": "^0.55.
|
|
12
|
+
"@startupjs/mdx": "^0.55.2",
|
|
13
|
+
"@startupjs/scrollable-anchors": "^0.55.2",
|
|
14
|
+
"@startupjs/ui": "^0.55.2",
|
|
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": "
|
|
22
|
+
"gitHead": "402da5248667019425e0b9c535c20d7c48f8f772"
|
|
23
23
|
}
|