@startupjs/docs 0.55.0-alpha.9 → 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.
package/README.md CHANGED
@@ -90,6 +90,6 @@ startupjs: >= 0.33.0
90
90
  />
91
91
  ```
92
92
 
93
- ## Licence
93
+ ## License
94
94
 
95
95
  MIT
@@ -35,7 +35,7 @@ const MenuItem = observer(function MenuItemComponent ({
35
35
  icon=faAngleRight
36
36
  iconStyleName='collapse-icon'
37
37
  )
38
- Menu.Item.item(
38
+ Menu.Item(
39
39
  style=menuItemStyle
40
40
  active=active
41
41
  to=doc.component ? rootPath : null
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { pug, observer, useValue, $ } from 'startupjs'
3
- import { Br, Input, Button, Modal, CssVariables, Palette, Colors } from '@startupjs/ui'
3
+ import { Br, Input, Button, Modal } from '@startupjs/ui'
4
4
  import { faSlidersH } from '@fortawesome/free-solid-svg-icons'
5
5
  import {
6
6
  useShowGrid,
@@ -9,18 +9,6 @@ import {
9
9
  } from '../../../../../clientHelpers'
10
10
  import './index.styl'
11
11
 
12
- const palette = new Palette()
13
- const { Color, generateColors } = palette
14
-
15
- const THEMES = {
16
- dark: generateColors({
17
- [Colors.bg]: Color('coolGray', 0),
18
- [Colors.text]: Color('coolGray', 9),
19
- [Colors.border]: Color('coolGray', 2),
20
- [Colors.secondary]: Color('coolGray', 9)
21
- })
22
- }
23
-
24
12
  export default observer(function Options ({
25
13
  style
26
14
  }) {
@@ -42,8 +30,6 @@ export default observer(function Options ({
42
30
  }
43
31
 
44
32
  return pug`
45
- if theme !== 'light'
46
- CssVariables(meta=THEMES[theme])
47
33
  Button(
48
34
  style=style
49
35
  icon=faSlidersH
@@ -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,11 +1,10 @@
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'
8
- import { APP_ENV } from '@env'
9
8
  import Sidebar, { SIDEBAR_PATH } from './Sidebar'
10
9
  import { useDocsContext } from '../../../docsContext'
11
10
  import { useLang, getTitle } from '../../clientHelpers'
@@ -57,14 +56,6 @@ const Search = observer(function Search () {
57
56
  emit('url', value.value)
58
57
  }
59
58
 
60
- function onChangeText (value) {
61
- const testComponentUrlRegExp = /^\/test\//
62
-
63
- if (testComponentUrlRegExp.test(value)) {
64
- return emit('url', value)
65
- }
66
- }
67
-
68
59
  return pug`
69
60
  AutoSuggest.search(
70
61
  testID='searchInput'
@@ -74,7 +65,6 @@ const Search = observer(function Search () {
74
65
  inputIcon=faSearch
75
66
  renderItem=item => renderItem(item, pathname)
76
67
  onChange=onChange
77
- onChangeText=APP_ENV === 'detox' ? onChangeText : undefined
78
68
  )
79
69
  `
80
70
  })
@@ -87,7 +77,7 @@ const Topbar = observer(function Topbar () {
87
77
  }
88
78
 
89
79
  return pug`
90
- Row.topbar
80
+ Div.topbar(row)
91
81
  Button(testID='button' variant='text' icon=faBars onPress=toggleSidebar color='text-description')
92
82
  Div.searchWrapper
93
83
  Search
@@ -7,4 +7,4 @@
7
7
 
8
8
  .dark
9
9
  &.root
10
- border-color var(--color-border-inverse)
10
+ border-color var(--color-border-contrast)
@@ -1,6 +1,6 @@
1
1
  $input = var(--color-border)
2
2
  $header = var(--color-text-description)
3
- $darkHeader = var(--color-text-inverse)
3
+ $darkHeader = var(--color-text-on-contrast)
4
4
  $value = var(--color-text-success)
5
5
  $type = var(--color-text-info)
6
6
  $valueDark = var(--color-text-success-strong)
@@ -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'
@@ -1,5 +1,5 @@
1
- $darkTopBg = var(--color-bg-inverse)
2
- $darkBottomBg = var(--color-bg-inverse-alt)
1
+ $darkTopBg = var(--color-bg-contrast)
2
+ $darkBottomBg = var(--color-bg-contrast-alt)
3
3
 
4
4
  .root
5
5
  margin-top 2u
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-alpha.9",
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-alpha.9",
13
- "@startupjs/scrollable-anchors": "^0.55.0-alpha.9",
14
- "@startupjs/ui": "^0.55.0-alpha.1",
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": "2c8a2d6d1f32741c62c5d4e85edc7c599d07dad7"
22
+ "gitHead": "88d13d7c882487c160d0d416b1b04bba28e6298d"
23
23
  }
@@ -2,8 +2,7 @@ module.exports = {
2
2
  type: 'plugin',
3
3
  bundler: {
4
4
  forceCompile: {
5
- web: true,
6
- server: true
5
+ web: true
7
6
  }
8
7
  }
9
8
  }