diff --git a/.gitignore b/.gitignore index 69589180..c87defb9 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,7 @@ yarn-error.log* .now .mdx-data +.cache +.yalc +yalc.lock +.cache diff --git a/.vercelignore b/.vercelignore index 9dfd79fa..bc9abd03 100644 --- a/.vercelignore +++ b/.vercelignore @@ -6,3 +6,6 @@ node_modules build README.md +.cache +.yalc +yalc.lock diff --git a/lib/remark-include.js b/lib/remark-include.js new file mode 100644 index 00000000..62bef1f6 --- /dev/null +++ b/lib/remark-include.js @@ -0,0 +1,51 @@ +const path = require('path'); +const remark = require('remark'); +const flatMap = require('unist-util-flatmap'); +const { readSync } = require('to-vfile'); + +module.exports = function includeMarkdownPlugin({ resolveFrom } = {}) { + return function transformer(tree, file) { + return flatMap(tree, node => { + if (node.type !== 'paragraph') return [node]; + + // detect an `@include` statement + const includeMatch = + node.children[0].value && node.children[0].value.match(/^@include\s['"](.*)['"]$/); + if (!includeMatch) return [node]; + + // read the file contents + const includePath = path.join(resolveFrom || file.dirname, includeMatch[1]); + let includeContents; + try { + includeContents = readSync(includePath, 'utf8'); + } catch (err) { + console.log(err); + throw new Error( + `The @include file path at ${includePath} was not found.\n\nInclude Location: ${file.path}:${node.position.start.line}:${node.position.start.column}` + ); + } + + // if we are including a ".md" or ".mdx" file, we add the contents as processed markdown + // if any other file type, they are embedded into a code block + if (includePath.match(/\.md(?:x)?$/)) { + // return the file contents in place of the @include + // this takes a couple steps because we allow recursive includes + const processor = remark().use(includeMarkdownPlugin, { resolveFrom }); + const ast = processor.parse(includeContents); + return processor.runSync(ast, includeContents).children; + } else { + // trim trailing newline + includeContents.contents = includeContents.contents.trim(); + + // return contents wrapped inside a "code" node + return [ + { + type: 'code', + lang: includePath.match(/\.(\w+)$/)[1], + value: includeContents, + }, + ]; + } + }); + }; +}; diff --git a/lib/remark-paragraph-alerts.js b/lib/remark-paragraph-alerts.js index 5d0c9444..bd0c6632 100644 --- a/lib/remark-paragraph-alerts.js +++ b/lib/remark-paragraph-alerts.js @@ -12,10 +12,10 @@ module.exports = function paragraphCustomAlertsPlugin() { return function transformer(tree) { visit(tree, 'paragraph', (pNode, _, parent) => { visit(pNode, 'text', textNode => { - Object.keys(sigils).forEach(symbol => { - if (textNode.value.startsWith(`${symbol} `)) { + Object.keys(sigils).forEach(sigil => { + if (textNode.value.startsWith(`${sigil} `)) { // Remove the literal sigil symbol from string contents - textNode.value = textNode.value.replace(`${symbol} `, ''); + textNode.value = textNode.value.replace(`${sigil} `, ''); // Wrap matched nodes with
(containing proper attributes) parent.children = parent.children.map(node => { @@ -26,7 +26,7 @@ module.exports = function paragraphCustomAlertsPlugin() { data: { hName: 'blockquote', hProperties: { - className: ['alert', `alert-${sigils[symbol]}`], + className: ['alert', `alert-${sigils[sigil]}`], role: 'alert', }, }, diff --git a/lib/remark-plugins.js b/lib/remark-plugins.js new file mode 100644 index 00000000..409f3875 --- /dev/null +++ b/lib/remark-plugins.js @@ -0,0 +1,16 @@ +const memoize = require('micro-memoize'); +const path = require('path'); + +const remarkPlugins = [ + [require('./remark-include'), { resolveFrom: path.join(__dirname, '../src/includes') }], + require('remark-vscode'), + memoize(require('./remark-paragraph-alerts')), + memoize(require('remark-external-links')), + memoize(require('remark-emoji')), + memoize(require('remark-images')), + memoize(require('remark-unwrap-images')), + memoize(require('remark-normalize-headings')), + memoize(require('remark-slug')), +]; + +module.exports = { remarkPlugins }; diff --git a/lib/remark-shiki.js b/lib/remark-shiki.js deleted file mode 100644 index 94693d6d..00000000 --- a/lib/remark-shiki.js +++ /dev/null @@ -1,37 +0,0 @@ -const shiki = require('shiki'); -const visit = require('unist-util-visit'); - -module.exports = function shikiPlugin(options) { - return async function transformer(tree) { - const theme = (options && options.theme) || 'zeit'; - let shikiTheme; - - try { - shikiTheme = shiki.getTheme(theme); - } catch (_) { - try { - shikiTheme = shiki.loadTheme(theme); - } catch (_) { - throw new Error(`Unable to load theme: ${theme}`); - } - } - - const highlighter = await shiki.getHighlighter({ - theme: shikiTheme, - }); - - visit(tree, 'code', (node, _, parent) => { - node.type = 'html'; - node.children = undefined; - if (!node.lang && !options.defaultLang) { - node.value = `
${node.value}
`; - return; - } - - node.value = highlighter.codeToHtml( - node.value, - (node.lang && node.lang.toLowerCase()) || options.defaultLang - ); - }); - }; -}; diff --git a/next.config.js b/next.config.js index 8bc47011..6a58f416 100755 --- a/next.config.js +++ b/next.config.js @@ -1,26 +1,8 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', }); - -const webpack = require('webpack'); - const path = require('path'); - -const remarkPlugins = [ - [ - require('@hashicorp/remark-plugins').includeMarkdown, - { resolveFrom: path.join(__dirname, 'src/_includes') }, - ], - require('remark-squeeze-paragraphs'), - require('./lib/remark-paragraph-alerts'), - require('remark-external-links'), - require('remark-emoji'), - require('remark-images'), - require('remark-unwrap-images'), - require('remark-normalize-headings'), - require('remark-slug'), - require('remark-footnotes'), -]; +const { remarkPlugins } = require('./lib/remark-plugins'); module.exports = withBundleAnalyzer({ experimental: { @@ -70,12 +52,6 @@ module.exports = withBundleAnalyzer({ const aliases = config.resolve.alias || (config.resolve.alias = {}); aliases.react = aliases['react-dom'] = 'preact/compat'; aliases['react-ssr-prepass'] = 'preact-ssr-prepass'; - - // to fix a dupe dependency - config.externals.push('prismjs'); - - // https://github.com/FormidableLabs/react-live#what-bundle-size-can-i-expect - aliases['buble'] = '@philpl/buble'; } return config; diff --git a/package.json b/package.json index 0f1ce0ab..4c9e1f60 100755 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "name": "@blockstack/docs", "version": "1.0.0", "dependencies": { - "@blockstack/ui": "^2.10.7", + "@blockstack/ui": "^2.12.2-beta.0", "@docsearch/react": "^1.0.0-alpha.14", "@hashicorp/remark-plugins": "^3.0.0", + "@mapbox/rehype-prism": "^0.5.0", "@mdx-js/loader": "1.6.13", "@mdx-js/mdx": "^1.6.13", "@mdx-js/react": "^1.6.13", @@ -21,26 +22,29 @@ "algoliasearch": "^4.3.1", "babel-plugin-macros": "^2.8.0", "babel-plugin-prismjs": "^2.0.1", + "cache-manager": "^3.3.0", + "cache-manager-fs-hash": "^0.0.9", "csvtojson": "^2.0.10", "docsearch.js": "^2.6.3", "eslint": "^7.4.0", "fathom-client": "^3.0.0", "front-matter": "^4.0.2", "fs-extra": "^9.0.1", - "gatsby-remark-shiki": "^0.1.2", "github-slugger": "^1.3.0", "gray-matter": "^4.0.2", "html-react-parser": "^0.13.0", "jsx-to-string": "^1.4.0", "lodash.debounce": "^4.0.8", "mdi-react": "7.3.0", - "next": "^9.4.5-canary.42", + "micro-memoize": "^4.0.9", + "next": "^9.4.5-canary.45", "next-google-fonts": "^1.1.0", "next-mdx-enhanced": "^3.0.0", "next-mdx-remote": "^0.6.0", "next-optimized-images": "^2.6.1", "nookies": "^2.3.2", "nprogress": "^0.2.0", + "p-all": "^3.0.0", "preact": "^10.4.4", "preact-render-to-string": "^5.1.4", "preact-ssr-prepass": "^1.1.0", @@ -55,7 +59,6 @@ "react-live": "^2.2.2", "react-simple-code-editor": "^0.11.0", "react-virtualized-auto-sizer": "^1.0.2", - "react-waypoint": "^9.0.3", "react-window": "^1.8.5", "remark": "^12.0.1", "remark-emoji": "2.1.0", @@ -64,21 +67,26 @@ "remark-frontmatter": "^2.0.0", "remark-images": "2.0.0", "remark-normalize-headings": "^2.0.0", + "remark-parse": "^8.0.3", "remark-slug": "6.0.0", "remark-squeeze-paragraphs": "^4.0.0", "remark-unwrap-images": "2.0.0", + "remark-vscode": "^1.0.0-beta.1", "store": "^2.0.12", "strip-markdown": "^3.1.2", "swr": "^0.2.3", "touchable-hook": "^1.3.0", "turndown": "^6.0.0", "typescript": "^3.9.7", + "unist-builder": "^2.0.3", "unist-util-is": "^4.0.2", + "unist-util-select": "^3.0.1", "unist-util-visit": "^2.0.3", "use-events": "^1.4.2", "webpack": "^4.43.0" }, "devDependencies": { + "@babel/preset-react": "^7.10.4", "@blockstack/eslint-config": "^1.0.5", "@blockstack/prettier-config": "^0.0.6", "@next/bundle-analyzer": "^9.4.4", @@ -92,10 +100,10 @@ }, "private": true, "scripts": { - "build": "yarn clean:build-files && next telemetry disable && NODE_ENV=production next build && next export -o build", + "build": "yarn clean:build-files && next telemetry disable && NODE_ENV=production next build", "build:analyze": "yarn clean:build-files && next telemetry disable && NODE_ENV=production ANALYZE=true next build", "start": "next telemetry disable && NODE_ENV=production next start", - "clean:build-files": "rimraf .next", + "clean:build-files": "rimraf .next && rimraf .cache", "dev": "yarn clean:build-files && next dev", "export": "next export", "lint": "yarn lint:eslint && yarn lint:prettier", diff --git a/src/common/data/clarity-ref.ts b/src/common/data/clarity-ref.ts index 67c957ff..ce01ad15 100644 --- a/src/common/data/clarity-ref.ts +++ b/src/common/data/clarity-ref.ts @@ -1,22 +1,86 @@ -import { convertRemoteDataToMDX } from '@common/data/mdx'; +import { renderMdx } from '@common/data/mdx'; import CLARITY_REFERENCE from '../../_data/clarityRef.json'; -export const convertClarityRefUsageToMdx = async () => { - const [_functions, _keywords] = await Promise.all([ - convertRemoteDataToMDX(CLARITY_REFERENCE.functions, 'description'), - convertRemoteDataToMDX(CLARITY_REFERENCE.keywords, 'description'), - ]); +const wrapInClarityTicks = (string: string) => { + let newString = ''; + newString += '```clarity\n'; + newString += string.trim() + '\n'; + newString += '```'; + return newString; +}; - const functions = CLARITY_REFERENCE.functions.map((fn, index) => ({ - ...fn, - description: _functions[index], - })); +const inlineCode = (string: string) => { + let newString = ''; + newString += '`'; + newString += string.trim(); + newString += '`'; + return newString; +}; + +const generateMarkdown = () => { + let keywords = ''; + let functions = ''; + + CLARITY_REFERENCE.functions.forEach(entry => { + functions += `### ${entry.name} + +**Signature:** ${inlineCode(entry.signature)}\n + + +**Input:** ${inlineCode(entry.input_type)}\n + + +**Output:** ${inlineCode(entry.output_type)}\n + +${entry.description} + +#### Example + +${wrapInClarityTicks(entry.example)} +`; + }); - const keywords = CLARITY_REFERENCE.keywords.map((fn, index) => ({ - ...fn, - description: _keywords[index], + CLARITY_REFERENCE.keywords.forEach(entry => { + keywords += `### ${entry.name} + +**Output:** ${inlineCode(entry.output_type)} + +${entry.description} + +#### Example + +${wrapInClarityTicks(entry.example)} +`; + }); + + return { + keywords, + functions, + }; +}; + +const getHeadings = arr => + arr.map(entry => ({ + content: entry.name, + level: 1, })); +export const convertClarityRefToMdx = async () => { + const markdown = generateMarkdown(); + const [_functions, _keywords] = await Promise.all([ + renderMdx(markdown.functions), + renderMdx(markdown.keywords), + ]); + + const functions = { + content: _functions, + headings: getHeadings(CLARITY_REFERENCE.functions), + }; + const keywords = { + content: _keywords, + headings: getHeadings(CLARITY_REFERENCE.keywords), + }; + return { props: { mdx: { diff --git a/src/common/data/cli-ref.ts b/src/common/data/cli-ref.ts index 16c77840..4d19e2a9 100644 --- a/src/common/data/cli-ref.ts +++ b/src/common/data/cli-ref.ts @@ -2,7 +2,13 @@ import { convertRemoteDataToMDX } from '@common/data/mdx'; import { cliReferenceData } from '../../_data/cliRef'; export const convertBlockstackCLIUsageToMdx = async () => { - const results = await convertRemoteDataToMDX(cliReferenceData, 'usage'); + const transformed = cliReferenceData.map(entry => { + return { + ...entry, + }; + }); + const results = await convertRemoteDataToMDX(transformed, 'usage'); + return { props: { mdx: results, diff --git a/src/common/data/mdx.ts b/src/common/data/mdx.ts index 689a453e..0e543411 100644 --- a/src/common/data/mdx.ts +++ b/src/common/data/mdx.ts @@ -1,17 +1,11 @@ import { MDXComponents } from '@components/mdx/mdx-components'; import renderToString from 'next-mdx-remote/render-to-string'; - -const remarkPlugins = [ - require('remark-squeeze-paragraphs'), - require('remark-external-links'), - require('remark-emoji'), - require('remark-images'), - require('remark-unwrap-images'), - require('remark-normalize-headings'), - require('remark-slug'), -]; +const { remarkPlugins } = require('../../../lib/remark-plugins'); export const wrapValueInTicks = value => '`' + value.replace('`', '').replace('`', '') + '`'; export const convertRemoteDataToMDX = async (arr: any[], key: string) => Promise.all(arr.map(entry => renderToString(entry[key], MDXComponents, { remarkPlugins }))); + +export const renderMdx = async (content: string) => + renderToString(content, MDXComponents, { remarkPlugins }); diff --git a/src/common/hooks/use-touchable.tsx b/src/common/hooks/use-touchable.tsx new file mode 100644 index 00000000..2aae2503 --- /dev/null +++ b/src/common/hooks/use-touchable.tsx @@ -0,0 +1,422 @@ +/** + * The state machine used here is based on the one provided + * in react-native-web: + * + * https://github.com/necolas/react-native-web/blob/master/packages/react-native-web/src/exports/Touchable/index.js + */ + +import * as React from 'react'; +import { isHoverEnabled } from '@common/utils/hover-enabled'; +import { useGestureResponder } from 'react-gesture-responder'; + +/** + * useTouchable + * + * useTouchable is a hook that attempt to emulate native touch behaviour for things + * like list items, buttons, etc. + * + * const { bind, active } = useTouchable({ + * onPress: () => console.log('hello'), + * disabled: false, + * delay: 120 + * }) + * + */ + +const HIGHLIGHT_DELAY_MS = 100; +const PRESS_EXPAND_PX = 20; +const LONG_PRESS_DELAY = 500 - HIGHLIGHT_DELAY_MS; + +type States = + | 'ERROR' + | 'NOT_RESPONDER' + | 'RESPONDER_ACTIVE_IN' + | 'RESPONDER_ACTIVE_OUT' + | 'RESPONDER_PRESSED_IN' + | 'RESPONDER_PRESSED_OUT' + | 'RESPONDER_LONG_PRESSED_IN'; + +type Events = + | 'DELAY' + | 'RESPONDER_GRANT' + | 'RESPONDER_RELEASE' + | 'RESPONDER_TERMINATED' + | 'ENTER_PRESS_RECT' + | 'LEAVE_PRESS_RECT' + | 'LONG_PRESS_DETECTED'; + +type TransitionsType = { [key in States]: TransitionType }; + +type TransitionType = { [key in Events]: States }; + +const transitions = { + NOT_RESPONDER: { + DELAY: 'NOT_RESPONDER', + RESPONDER_GRANT: 'RESPONDER_ACTIVE_IN', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'NOT_RESPONDER', + LEAVE_PRESS_RECT: 'NOT_RESPONDER', + LONG_PRESS_DETECTED: 'NOT_RESPONDER', + }, + RESPONDER_ACTIVE_IN: { + DELAY: 'RESPONDER_PRESSED_IN', + RESPONDER_GRANT: 'ERROR', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'RESPONDER_ACTIVE_IN', + LEAVE_PRESS_RECT: 'RESPONDER_ACTIVE_OUT', + LONG_PRESS_DETECTED: 'ERROR', + }, + RESPONDER_ACTIVE_OUT: { + DELAY: 'RESPONDER_PRESSED_OUT', + RESPONDER_GRANT: 'ERROR', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'RESPONDER_ACTIVE_IN', + LEAVE_PRESS_RECT: 'RESPONDER_ACTIVE_OUT', + LONG_PRESS_DETECTED: 'ERROR', + }, + RESPONDER_PRESSED_IN: { + DELAY: 'ERROR', + RESPONDER_GRANT: 'ERROR', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'RESPONDER_PRESSED_IN', + LEAVE_PRESS_RECT: 'RESPONDER_PRESSED_OUT', + LONG_PRESS_DETECTED: 'RESPONDER_LONG_PRESSED_IN', + }, + RESPONDER_PRESSED_OUT: { + DELAY: 'ERROR', + RESPONDER_GRANT: 'ERROR', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'RESPONDER_PRESSED_IN', + LEAVE_PRESS_RECT: 'RESPONDER_PRESSED_OUT', + LONG_PRESS_DETECTED: 'ERROR', + }, + RESPONDER_LONG_PRESSED_IN: { + DELAY: 'ERROR', + RESPONDER_GRANT: 'ERROR', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'RESPONDER_PRESSED_IN', + LEAVE_PRESS_RECT: 'RESPONDER_PRESSED_OUT', + LONG_PRESS_DETECTED: 'RESPONDER_LONG_PRESSED_IN', + }, + ERROR: { + DELAY: 'NOT_RESPONDER', + RESPONDER_GRANT: 'RESPONDER_ACTIVE_IN', + RESPONDER_RELEASE: 'NOT_RESPONDER', + RESPONDER_TERMINATED: 'NOT_RESPONDER', + ENTER_PRESS_RECT: 'NOT_RESPONDER', + LEAVE_PRESS_RECT: 'NOT_RESPONDER', + LONG_PRESS_DETECTED: 'NOT_RESPONDER', + }, +} as TransitionsType; + +export type OnPressFunction = ( + e?: React.TouchEvent | React.MouseEvent | React.KeyboardEvent | Event +) => void; + +export interface TouchableOptions { + delay: number; + longPressDelay: number; + pressExpandPx: number; + behavior: 'button' | 'link'; + disabled: boolean; + terminateOnScroll: boolean; + onPress?: OnPressFunction; + onLongPress?: OnPressFunction; +} + +const defaultOptions: TouchableOptions = { + delay: HIGHLIGHT_DELAY_MS, + pressExpandPx: PRESS_EXPAND_PX, + longPressDelay: LONG_PRESS_DELAY, + behavior: 'button', + disabled: false, + terminateOnScroll: true, + onPress: undefined, + onLongPress: undefined, +}; + +export function useTouchable(options: Partial = {}) { + const { + onPress, + onLongPress, + longPressDelay, + terminateOnScroll, + delay, + behavior, + disabled: localDisabled, + } = { + ...defaultOptions, + ...options, + }; + const disabled = localDisabled; + const ref = React.useRef(null); + const delayTimer = React.useRef(); + const longDelayTimer = React.useRef(); + const bounds = React.useRef(); + const [hover, setHover] = React.useState(false); + const [showHover, setShowHover] = React.useState(true); + const [active, setActive] = React.useState(false); + const state = React.useRef('NOT_RESPONDER'); + + /** + * Transition from one state to another + * @param event + */ + + function dispatch(event: Events) { + const nextState = transitions[state.current][event]; + state.current = nextState; + + if (nextState === 'RESPONDER_PRESSED_IN' || nextState === 'RESPONDER_LONG_PRESSED_IN') { + setActive(true); + } else { + setActive(false); + } + + if (nextState === 'NOT_RESPONDER') { + clearTimeout(delayTimer.current); + clearTimeout(longDelayTimer.current); + } + } + + // create a pan responder to handle mouse / touch gestures + const { bind, terminateCurrentResponder } = useGestureResponder({ + onStartShouldSet: () => true, + onGrant: () => { + onStart(isHoverEnabled() ? 0 : undefined); + }, + onRelease: (_state, e) => onEnd(e), + onMove: (_state, e) => onTouchMove(e), + onTerminate: _state => onTerminate(), + }); + + /** + * Emit a press event if not disabled + * @param e + */ + + function emitPress(e: React.TouchEvent | React.MouseEvent | React.KeyboardEvent | Event) { + if (!disabled && onPress) { + onPress(e); + } + } + + function emitLongPress() { + if (!disabled && onLongPress) { + onLongPress(); + } + } + + function bindScroll() { + if (terminateOnScroll) { + document.addEventListener('scroll', onScroll, { + capture: true, + passive: true, + }); + } + } + + function unbindScroll() { + document.removeEventListener('scroll', onScroll, true); + } + + function afterDelay() { + dispatch('DELAY'); + } + + /** + * Get our initial bounding box clientRect and set any delay + * timers if necessary. + * @param delayPressMs + */ + + function onStart(delayPressMs = delay) { + dispatch('RESPONDER_GRANT'); + bounds.current = ref.current?.getBoundingClientRect(); + delayTimer.current = delayPressMs > 0 ? window.setTimeout(afterDelay, delayPressMs) : undefined; + + if (delayPressMs === 0) { + dispatch('DELAY'); + } + + longDelayTimer.current = window.setTimeout(afterLongDelay, longPressDelay); + + bindScroll(); + setShowHover(false); + } + + function afterLongDelay() { + dispatch('LONG_PRESS_DETECTED'); + emitLongPress(); + } + + // onTerminate should be disambiguated from onRelease + // because it should never trigger onPress events. + function onTerminate() { + if (state.current === 'NOT_RESPONDER') { + return; + } + + dispatch('RESPONDER_RELEASE'); + setShowHover(true); + unbindScroll(); + } + + function onEnd(e?: React.TouchEvent | React.MouseEvent | React.KeyboardEvent | Event) { + // consider unbinding the end event instead + if (state.current === 'NOT_RESPONDER') { + return; + } + + if ( + e && + (state.current === 'RESPONDER_ACTIVE_IN' || state.current === 'RESPONDER_PRESSED_IN') + ) { + emitPress(e); + } + + dispatch('RESPONDER_RELEASE'); + setShowHover(true); + unbindScroll(); + } + + function isWithinActiveBounds( + clientX: number, + clientY: number, + rect: ClientRect, + expandPx: number = PRESS_EXPAND_PX + ) { + return ( + clientX > rect.left - expandPx && + clientY > rect.top - expandPx && + clientX < rect.right + expandPx && + clientY < rect.bottom + expandPx + ); + } + + /** + * Determine if the touch remains in the active bounds + * @param e + */ + + function onTouchMove(e: any) { + if (state.current === 'NOT_RESPONDER' || state.current === 'ERROR') { + return; + } + + clearTimeout(longDelayTimer.current); + + const { clientX, clientY } = e.touches && e.touches[0] ? e.touches[0] : e; + const withinBounds = isWithinActiveBounds(clientX, clientY, bounds.current); + + if (withinBounds) { + dispatch('ENTER_PRESS_RECT'); + } else { + dispatch('LEAVE_PRESS_RECT'); + } + } + + /** + * Scrolling cancels all responder events. This enables + * the user to scroll without selecting something + */ + + function onScroll() { + unbindScroll(); + dispatch('RESPONDER_TERMINATED'); + } + + /** + * If our mouse leaves we terminate our responder, + * even if our press remains down. This emulates + * native mouse behaviour. + * @param e + */ + + function onMouseLeave() { + if (hover) { + setHover(false); + } + if (!showHover) { + setShowHover(true); + } + if (state.current !== 'NOT_RESPONDER') { + terminateCurrentResponder(); + } + } + + function onMouseEnter() { + if (!hover) { + setHover(true); + } + } + + /** + * Handle timer and disabled side-effects + */ + + React.useEffect(() => { + return () => { + clearTimeout(delayTimer.current); + clearTimeout(longDelayTimer.current); + unbindScroll(); + }; + }, []); + + React.useEffect(() => { + if (disabled && state.current !== 'NOT_RESPONDER') { + dispatch('RESPONDER_TERMINATED'); + setShowHover(true); + } + }, [disabled]); + + /** + * Keyboard support + * button: + * onEnterDown -> onPress + * onSpaceUp -> onPress + * Prevent default. + * + * link: Don't prevent default + */ + + function onKey(e: React.KeyboardEvent) { + const ENTER = 13; + const SPACE = 32; + + if (e.type === 'keydown' && e.which === SPACE) { + onStart(0); + } else if (e.type === 'keydown' && e.which === ENTER) { + emitPress(e); + } else if (e.type === 'keyup' && e.which === SPACE) { + onEnd(e); + } else { + return; + } + + e.stopPropagation(); + + if (!(e.which === ENTER && behavior === 'link')) { + e.preventDefault(); + } + } + + return { + bind: { + ...bind, + onKeyUp: onKey, + onKeyDown: onKey, + onMouseEnter, + onMouseLeave, + ref, + }, + active: !disabled && active, + hover: isHoverEnabled() && !disabled && hover && showHover, + }; +} diff --git a/src/common/utils/hover-enabled.ts b/src/common/utils/hover-enabled.ts new file mode 100644 index 00000000..efde1549 --- /dev/null +++ b/src/common/utils/hover-enabled.ts @@ -0,0 +1,43 @@ +const canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement +); + +let isEnabled = false; + +const HOVER_THRESHOLD_MS = 1000; +let lastTouchTimestamp = 0; + +function enableHover() { + if (isEnabled || Date.now() - lastTouchTimestamp < HOVER_THRESHOLD_MS) { + return; + } + isEnabled = true; +} + +function disableHover() { + lastTouchTimestamp = Date.now(); + if (isEnabled) { + isEnabled = false; + } +} + +if (canUseDOM) { + document.addEventListener('touchstart', disableHover, { + capture: true, + passive: true, + }); + document.addEventListener('touchmove', disableHover, { + capture: true, + passive: true, + }); + document.addEventListener('mousemove', enableHover, { + capture: true, + passive: true, + }); +} + +export function isHoverEnabled() { + return isEnabled; +} diff --git a/src/components/clarity-ref.tsx b/src/components/clarity-ref.tsx index 242a4d81..9cea4cb5 100644 --- a/src/components/clarity-ref.tsx +++ b/src/components/clarity-ref.tsx @@ -1,91 +1,19 @@ import React from 'react'; import { MDXComponents } from '@components/mdx/mdx-components'; -import { Box } from '@blockstack/ui'; import { TableOfContents } from '@components/toc'; import { hydrate } from '@common/hydrate-mdx'; -const renderFunctionsSection = entry => ( - <> - {entry.name} - - - Signature:{' '} - {entry.signature} - - - - Input:{' '} - {entry.input_type} - - - - Output:{' '} - {entry.output_type} - - - {hydrate(entry.description, { - ...MDXComponents, - p: (props: any) => ( - - ), - })} - - Example - - {/* @ts-ignore */} - {entry.example} - -); - -const renderKeywordsSection = entry => ( - <> - {entry.name} - - - Output:{' '} - {entry.output_type} - - - {hydrate(entry.description, MDXComponents)} - - Example - - {/* @ts-ignore */} - {entry.example} - -); - -export const ClarityKeywordReference = ({ entries }) => { +export const ClarityKeywordReference = ({ content, headings }) => { return ( <> - - ({ - content: entry.name, - level: 1, - }))} - /> - - {entries.map(renderKeywordsSection)} + + {hydrate(content, MDXComponents)} ); }; -export const ClarityFunctionReference = ({ entries }) => ( +export const ClarityFunctionReference = ({ content, headings }) => ( <> - - ({ - content: entry.name, - level: 1, - }))} - /> - - {entries.map(renderFunctionsSection)} + + {hydrate(content, MDXComponents)} ); diff --git a/src/components/code-block/index.tsx b/src/components/code-block/index.tsx deleted file mode 100644 index 3c6138d7..00000000 --- a/src/components/code-block/index.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import React from 'react'; -import { Highlighter, HighlighterProps } from '../highlighter'; -import { Box, BoxProps, color } from '@blockstack/ui'; -import { css } from '@styled-system/css'; - -// Languages used in docs -// when adding a new language in the docs, import the theme here -import 'prismjs/components/prism-bash'; -import 'prismjs/components/prism-css'; -import 'prismjs/components/prism-jsx'; -import 'prismjs/components/prism-tsx'; -import 'prismjs/components/prism-json'; -import 'prismjs/components/prism-toml'; -import 'prismjs/components/prism-python'; -import 'prismjs/components/prism-kotlin'; - -interface CodeBlock { - live?: boolean; - showLineNumbers?: boolean; - highlight?: string; -} - -export type CodeBlockProps = CodeBlock & HighlighterProps & BoxProps; - -const getHighlightLineNumbers = str => - str && - str - .split(' ') - .join('') - .split(',') - .flatMap(s => { - if (!s.includes('-')) return +s; - - const [min, max] = s.split('-'); - - return Array.from({ length: max - min + 1 }, (_, n) => n + +min); - }); - -const CodeBlock = React.memo( - React.forwardRef( - ( - { - code, - showLineNumbers, - hideLineHover, - style = {}, - highlightedLines, - className, - live = true, - highlight, - children, - ...props - }: CodeBlockProps, - ref: React.Ref - ) => { - const language = className && className.replace(/language-/, ''); - - const displayNumbers = showLineNumbers || (language && language !== 'bash'); - - return ( - - - - - - ); - } - ) -); - -export default CodeBlock; diff --git a/src/components/code-editor.tsx b/src/components/code-editor.tsx deleted file mode 100644 index 39d986ef..00000000 --- a/src/components/code-editor.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import React from 'react'; - -import Editor from 'react-simple-code-editor'; -import { createGlobalStyle } from 'styled-components'; -import { Box, BoxProps, Highlighter } from '@blockstack/ui'; -// TODO: change when new version is published -import { Language } from '@blockstack/ui/dist/ui/src/highlighter/types'; - -const TextAreaOverrides = createGlobalStyle` -.code-editor{ - input, - textarea, - [contenteditable] { - caret-color: white; - } - & * { - font-size: 14px !important; - } - textarea{ - width: 100% !important; - padding-left: 16px !important; - font-size: 14px !important; - padding-top: 1px !important; - font-family: 'Fira Code',monospace !important; - line-height: 24px !important; - outline: transparent; - } - & > div{ - overflow: initial !important; - } - textarea, pre { - white-space: pre !important; - overflow-wrap: unset !important; - } -} -`; - -interface CodeEditorProps extends Partial> { - value: string; - disabled?: boolean; - language?: Language; - onChange?: (code: string) => void; - name?: string; - id?: string; -} - -export const CodeEditor = React.memo((props: CodeEditorProps) => { - const { style, value, onChange, language, id, disabled, maxHeight, ...rest } = props; - const [code, setState] = React.useState(value); - - const updateContent = (c: string) => { - if (c === code) { - return; - } - setState(s => { - if (props.onChange) { - props.onChange(c); - } - return c; - }); - }; - - React.useEffect(() => { - if (value !== code) { - updateContent(value); - } - }, [value]); - - return ( - <> - - - } - style={{ - ...style, - overflowWrap: 'unset', - whiteSpace: 'pre !important' as any, - }} - value={code} - {...rest} - /> - - - ); -}); diff --git a/src/components/feedback.tsx b/src/components/feedback.tsx index 44665c7a..cd983307 100644 --- a/src/components/feedback.tsx +++ b/src/components/feedback.tsx @@ -7,19 +7,19 @@ import { Flex, space, Stack, - themeColor, transition, SlideFade, } from '@blockstack/ui'; import { Text } from '@components/typography'; import { MDXComponents, Link } from '@components/mdx'; import { SadIcon, NeutralIcon, HappyIcon } from '@components/icons/feedback'; -import { useHover } from 'use-events'; +import { useTouchable } from '@common/hooks/use-touchable'; import { border } from '@common/utils'; import { useRouter } from 'next/router'; const Icon: React.FC }> = ({ icon: IconComponent, ...props }) => { - const [isHovered, bind] = useHover(); + const { bind, hover, active } = useTouchable(); + const isHovered = hover || active; return ( - (n + '').length <= z ? ['', '-'][+(n < 0)] + (s.repeat(z) + Math.abs(n)).slice(-1 * z) : n + ''; - -const LINE_NUMBER_WIDTH = 50; -const getLineNumber = (n: number, length: number) => startPad(n + 1, length.toString().length); - -const Tokens = ({ - tokens, - getTokenProps, - showLineNumbers, - ...rest -}: { - tokens: GrammaticalToken[]; - getTokenProps: GetGrammaticalTokenProps; - showLineNumbers?: boolean; -}) => { - const bsTheme = useTheme(); - const pl = showLineNumbers - ? [`calc(${LINE_NUMBER_WIDTH}px + ${(bsTheme as any).sizes['base']})`] - : ['unset', 'unset', 'base', 'base']; - - return ( - - {tokens.map( - (token, key) => - token.content !== '// highlight' && ( - - ) - )} - - ); -}; -const LineNumber = ({ number, length, ...rest }: { number: number; length: number }) => ( - - {getLineNumber(number, length)} - -); - -const Line = ({ - tokens, - getTokenProps, - index, - length, - showLineNumbers, - hideLineHover, - highlighted, - ...rest -}: { - tokens: GrammaticalToken[]; - index: number; - length: number; - getTokenProps: GetGrammaticalTokenProps; - showLineNumbers?: boolean; - hideLineHover?: boolean; - highlighted?: boolean; -}) => { - const highlightedStyle = { - bg: ['unset', 'unset', 'ink.900'], - borderColor: ['ink.900', 'ink.900', 'ink.600'], - }; - const hasHighlightComment = !!tokens.find(token => token.content === '// highlight'); - const isHighlighted = highlighted || hasHighlightComment; - const highlighedProps = isHighlighted ? highlightedStyle : {}; - - return ( - - {showLineNumbers ? : null} - - - ); -}; - -const Spacer = ({ showLineNumbers }: { showLineNumbers?: boolean }) => ( - - {showLineNumbers && ( - - )} - -); -const Lines = ({ - tokens: lines, - getLineProps, - getTokenProps, - className, - showLineNumbers, - hideLineHover, - highlightedLines, -}: { - showLineNumbers?: boolean; - hideLineHover?: boolean; - highlightedLines?: number[]; -} & RenderProps) => { - const displayNumbers = lines?.length > 2 && showLineNumbers; - return ( - - - - {lines.map((tokens, i) => ( - *': { - fontFamily: 'Fira Code, Consolata, monospace', - fontSize: '14.556040756914118px', - lineHeight: '24px', - padding: '0.05px 0', - '::before': { - content: "''", - marginTop: '-0.47483499999999995em', - display: 'block', - height: 0, - }, - '::after': { - content: "''", - marginBottom: '-0.493835em', - display: 'block', - height: 0, - }, - }, - })} - > - lineNumber === i + 1) - } - hideLineHover={hideLineHover || lines.length < 3} - {...getLineProps({ line: tokens, key: i })} - /> - - ))} - - - - ); -}; - -export interface HighlighterProps { - code: string; - language?: Language; - showLineNumbers?: boolean; - hideLineHover?: boolean; - highlightedLines?: number[]; -} - -export const Highlighter = React.memo( - ({ - code, - language = 'clarity', - showLineNumbers, - hideLineHover, - highlightedLines, - }: HighlighterProps) => { - return ( - - {props => ( - - )} - - ); - } -); - -Highlighter.displayName = 'Highlighter'; diff --git a/src/components/highlighter/language-definition.tsx b/src/components/highlighter/language-definition.tsx deleted file mode 100644 index 019abb32..00000000 --- a/src/components/highlighter/language-definition.tsx +++ /dev/null @@ -1,117 +0,0 @@ -// @ts-nocheck -import Prism from 'prism-react-renderer/prism'; - -(function (Prism) { - // Functions to construct regular expressions - // simple form - // e.g. (interactive ... or (interactive) - function simple_form(name) { - return RegExp('(\\()' + name + '(?=[\\s\\)])'); - } - // booleans and numbers - function primitive(pattern) { - return RegExp('([\\s([])' + pattern + '(?=[\\s)])'); - } - - // Patterns in regular expressions - - // Open parenthesis for look-behind - const par = '(\\()'; - const endpar = '(?=\\))'; - // End the pattern with look-ahead space - const space = '(?=\\s)'; - - const language = { - // Three or four semicolons are considered a heading. - heading: { - pattern: /;;;.*/, - alias: ['comment', 'title'], - }, - comment: /;;.*/, - string: [ - { - pattern: /"(?:[^"\\]|\\.)*"/, - greedy: true, - }, - { - pattern: /0x[0-9a-fA-F]*/, - greedy: true, - }, - ], - symbol: { - pattern: /'[^()#'\s]+/, - greedy: true, - }, - keyword: [ - { - pattern: RegExp( - par + - '(?:or|and|xor|not|begin|let|if|ok|err|unwrap\\!|unwrap-err\\!|unwrap-panic|unwrap-err-panic|match|try\\!|asserts\\!|\ -map-get\\?|var-get|contract-map-get\\?|get|tuple|\ -define-public|define-private|define-constant|define-map|define-data-var|\ -define-fungible-token|define-non-fungible-token|\ -define-read-only)' + - space - ), - lookbehind: true, - }, - { - pattern: RegExp(par + '(?:is-eq|is-some|is-none|is-ok|is-er)' + space), - lookbehind: true, - }, - { - pattern: RegExp( - par + - '(?:var-set|map-set|map-delete|map-insert|\ -ft-transfer\\?|nft-transfer\\?|nft-mint\\?|ft-mint\\?|nft-get-owner\\?|ft-get-balance\\?|\ -contract-call\\?)' + - space - ), - lookbehind: true, - }, - { - pattern: RegExp( - par + - '(?:list|map|filter|fold|len|concat|append|as-max-len\\?|to-int|to-uint|\ -buff|hash160|sha256|sha512|sha512/256|keccak256|true|false|none)' + - space - ), - lookbehind: true, - }, - { - pattern: RegExp( - par + - '(?:as-contract|contract-caller|tx-sender|block-height|at-block|get-block-info\\?)' + - space - ), - lookbehind: true, - }, - { - pattern: RegExp(par + '(?:is-eq|is-some|is-none|is-ok|is-err)' + space), - lookbehind: true, - }, - ], - boolean: /(?:false|true|none)/, - number: { - pattern: primitive('[-]?u?\\d+'), - lookbehind: true, - }, - address: { - pattern: /([\s()])(?:\'[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41})(?=[()\s]|$)/, - lookbehind: true, - }, - operator: { - pattern: /(\()(?:[-+*\/]|[<>]=?|=>?)(?=[()\s]|$)/, - lookbehind: true, - }, - function: { - pattern: /(\()[^()'\s]+(?=[()\s]|$)/, - lookbehind: true, - }, - punctuation: /[()']/, - }; - - if (Prism && Prism.languages) { - Prism.languages.clarity = language; - } -})(Prism); diff --git a/src/components/highlighter/nord.css b/src/components/highlighter/nord.css deleted file mode 100644 index 4d1da234..00000000 --- a/src/components/highlighter/nord.css +++ /dev/null @@ -1,205 +0,0 @@ -code[class*="language-"], -pre[class*="language-"] { - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - color: #eee; - background: #2f2f2f; - font-family: Roboto Mono, monospace; - font-size: 1em; - line-height: 1.5em; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -code[class*="language-"]::-moz-selection, -pre[class*="language-"]::-moz-selection, -code[class*="language-"] ::-moz-selection, -pre[class*="language-"] ::-moz-selection { - background: #363636; -} - -code[class*="language-"]::selection, -pre[class*="language-"]::selection, -code[class*="language-"] ::selection, -pre[class*="language-"] ::selection { - background: #363636; -} - -:not(pre) > code[class*="language-"] { - white-space: normal; - border-radius: 0.2em; - padding: 0.1em; -} - -pre[class*="language-"] { - overflow: auto; - position: relative; - margin: 0.5em 0; - padding: 1.25em 1em; -} - -.language-css > code, -.language-sass > code, -.language-scss > code { - color: #fd9170; -} - -[class*="language-"] .namespace { - opacity: 0.7; -} - -.token.atrule { - color: #c792ea; -} - -.token.attr-name { - color: #ffcb6b; -} - -.token.attr-value { - color: #a5e844; -} - -.token.attribute { - color: #a5e844; -} - -.token.boolean { - color: #c792ea; -} - -.token.builtin { - color: #ffcb6b; -} - -.token.cdata { - color: #80cbc4; -} - -.token.char { - color: #80cbc4; -} - -.token.class { - color: #ffcb6b; -} - -.token.class-name { - color: #f2ff00; -} - -.token.comment { - color: #616161; -} - -.token.constant { - color: #c792ea; -} - -.token.deleted { - color: #ff6666; -} - -.token.doctype { - color: #616161; -} - -.token.entity { - color: #ff6666; -} - -.token.function { - color: #c792ea; -} - -.token.hexcode { - color: #f2ff00; -} - -.token.id { - color: #c792ea; - font-weight: bold; -} - -.token.important { - color: #c792ea; - font-weight: bold; -} - -.token.inserted { - color: #80cbc4; -} - -.token.keyword { - color: #c792ea; -} - -.token.number { - color: #fd9170; -} - -.token.operator { - color: #89ddff; -} - -.token.prolog { - color: #616161; -} - -.token.property { - color: #80cbc4; -} - -.token.pseudo-class { - color: #a5e844; -} - -.token.pseudo-element { - color: #a5e844; -} - -.token.punctuation { - color: #89ddff; -} - -.token.regex { - color: #f2ff00; -} - -.token.selector { - color: #ff6666; -} - -.token.string { - color: #a5e844; -} - -.token.symbol { - color: #c792ea; -} - -.token.tag { - color: #ff6666; -} - -.token.unit { - color: #fd9170; -} - -.token.url { - color: #ff6666; -} - -.token.variable { - color: #ff6666; -} diff --git a/src/components/highlighter/prism-theme.ts b/src/components/highlighter/prism-theme.ts deleted file mode 100644 index c5159165..00000000 --- a/src/components/highlighter/prism-theme.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { PrismTheme } from 'prism-react-renderer'; - -export const theme: PrismTheme = { - plain: { - color: 'rgba(255,255,255,1)', - backgroundColor: '#0f111a', - }, - styles: [ - { - types: ['string'], - style: { - color: 'rgb(195, 232, 141)', - }, - }, - { - types: ['boolean'], - style: { - color: 'rgb(255, 156, 172)', - }, - }, - { - types: ['number', 'keyword', 'operator'], - style: { - color: 'rgb(247, 140, 108)', - }, - }, - { - types: ['comment'], - style: { - color: 'rgba(255,255,255,0.6)', - fontStyle: 'italic', - }, - }, - { - types: ['punctuation', 'builtin'], - style: { - color: 'rgb(137, 221, 255)', - }, - }, - { - types: ['tag'], - style: { - color: 'rgb(240, 113, 120)', - }, - }, - { - types: ['attr-name'], - style: { - color: 'rgb(255, 203, 107)', - }, - }, - { - types: ['function'], - style: { - color: 'rgb(130, 170, 255)', - }, - }, - { - types: ['constant'], - style: { - color: 'rgb(137, 221, 255)', - fontStyle: 'italic', - }, - }, - ], -}; -// export const theme: PrismTheme = { -// plain: { -// color: '#fff', -// backgroundColor: 'transparent', -// }, -// styles: [ -// { -// types: ['prolog'], -// style: { -// color: 'rgb(0, 0, 128)', -// }, -// }, -// { -// types: ['comment', 'punctuation'], -// style: { -// color: 'rgb(106, 153, 85)', -// }, -// }, -// { -// types: ['builtin', 'tag', 'changed', 'function', 'keyword'], -// style: { -// color: 'rgb(86, 156, 214)', -// }, -// }, -// { -// types: ['number', 'variable', 'inserted'], -// style: { -// color: '#A58FFF', -// }, -// }, -// { -// types: ['operator'], -// style: { -// color: 'rgb(212, 212, 212)', -// }, -// }, -// { -// types: ['constant'], -// style: { -// color: 'rgb(100, 102, 149)', -// }, -// }, -// { -// types: ['attr-name'], -// style: { -// color: 'rgb(156, 220, 254)', -// }, -// }, -// { -// types: ['car'], -// style: { -// color: 'rgb(156, 220, 254)', -// }, -// }, -// { -// types: ['deleted', 'string'], -// style: { -// color: '#FF7B48', -// }, -// }, -// { -// types: ['class-name'], -// style: { -// color: 'rgb(78, 201, 176)', -// }, -// }, -// { -// types: ['char'], -// style: { -// color: '#FF7B48', -// }, -// }, -// ], -// }; diff --git a/src/components/highlighter/types.ts b/src/components/highlighter/types.ts deleted file mode 100644 index 4f5bfcf0..00000000 --- a/src/components/highlighter/types.ts +++ /dev/null @@ -1,90 +0,0 @@ -import * as React from 'react'; - -export interface GrammaticalToken { - types: string[]; - content: string; - empty?: boolean; -} - -export interface StyleObj { - [key: string]: string | number | null; -} - -export interface GrammaticalTokenOutputProps { - key?: React.Key; - style?: StyleObj; - className: string; - children: string; - [otherProp: string]: any; -} - -export interface GrammaticalTokenInputProps { - key?: React.Key; - style?: StyleObj; - className?: string; - token: GrammaticalToken; - [otherProp: string]: any; -} - -export interface LineInputProps { - key?: React.Key; - style?: StyleObj; - className?: string; - line: GrammaticalToken[]; - [otherProp: string]: any; -} - -export interface LineOutputProps { - key?: React.Key; - style?: StyleObj; - className: string; - [otherProps: string]: any; -} - -export interface RenderProps { - tokens: GrammaticalToken[][]; - className: string; - style: StyleObj; - getLineProps: (input: LineInputProps) => LineOutputProps; - getTokenProps: (input: GrammaticalTokenInputProps) => GrammaticalTokenOutputProps; -} - -export type GetGrammaticalTokenProps = ( - input: GrammaticalTokenInputProps -) => GrammaticalTokenOutputProps; - -export type Language = - | 'markup' - | 'bash' - | 'clarity' - | 'clike' - | 'c' - | 'cpp' - | 'css' - | 'javascript' - | 'jsx' - | 'coffeescript' - | 'actionscript' - | 'css-extr' - | 'diff' - | 'git' - | 'go' - | 'graphql' - | 'handlebars' - | 'json' - | 'less' - | 'lisp' - | 'makefile' - | 'markdown' - | 'objectivec' - | 'ocaml' - | 'python' - | 'reason' - | 'sass' - | 'scss' - | 'sql' - | 'stylus' - | 'tsx' - | 'typescript' - | 'wasm' - | 'yaml'; diff --git a/src/components/home/card.tsx b/src/components/home/card.tsx index 21237c96..031ef01b 100644 --- a/src/components/home/card.tsx +++ b/src/components/home/card.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Grid, Box, Flex, space, color, transition, FlexProps } from '@blockstack/ui'; import NextLink from 'next/link'; -import { useTouchable } from 'touchable-hook'; +import { useTouchable } from '@common/hooks/use-touchable'; interface CardProps extends FlexProps { href?: string; diff --git a/src/components/mdx/components.tsx b/src/components/mdx/components.tsx deleted file mode 100644 index beb41fdf..00000000 --- a/src/components/mdx/components.tsx +++ /dev/null @@ -1,383 +0,0 @@ -import { - Box, - Flex, - FlexProps, - BoxProps, - color, - themeColor, - useClipboard, - space, -} from '@blockstack/ui'; -import NextLink from 'next/link'; -import React, { forwardRef, Ref } from 'react'; -import LinkIcon from 'mdi-react/LinkVariantIcon'; -import HashtagIcon from 'mdi-react/HashtagIcon'; -import { useHover } from 'use-events'; -import { Tooltip } from '@components/tooltip'; -import { useActiveHeading } from '@common/hooks/use-active-heading'; -import { Text, Title } from '@components/typography'; -import { border } from '@common/utils'; -import { css } from '@styled-system/css'; -import { getHeadingStyles, baseTypeStyles } from '@components/mdx/typography'; -import { useRouter } from 'next/router'; -import { HEADER_HEIGHT } from '@components/header'; -import { CheckCircleIcon } from '@components/icons/check-circle'; -import { AlertTriangleIcon } from '@components/icons/alert-triangle'; -import { AlertCircleIcon } from '@components/icons/alert-circle'; -import { InfoCircleIcon } from '@components/icons/info-circle'; - -const preProps = { - display: 'inline-block', - border: border(), - borderRadius: '4px', - padding: '2px 6px', - boxShadow: '0 1px 2px rgba(0, 0, 0, 0.04)', - bg: color('bg'), -}; -export const InlineCode: React.FC = ({ children, ...rest }) => ( - - {children} - -); - -export const Pre = (props: any) => ; - -export const SmartLink = ({ href, ...rest }: { href: string }) => { - const isExternal = href.includes('http') || href.includes('mailto'); - const link = ; - - return isExternal ? ( - link - ) : ( - - {link} - - ); -}; - -export const Table = ({ children, ...rest }: any) => ( - - - - - {children} - - - - -); - -export const THead = (props: any) => { - return ( - - ); -}; - -export const TData = (props: any) => ( - -); - -export const Link = forwardRef( - (props: { href: string; target?: string; rel?: string } & BoxProps, ref: Ref) => ( - - ) -); - -export const TextItem = (props: any) => ( - - - {props.children} - {props.id && ( - - # - - )} - - -); - -const LinkButton = React.memo(({ link, onClick, ...rest }: BoxProps & { link: string }) => { - const url = - typeof document !== 'undefined' && document.location.origin + document.location.pathname + link; - - const { onCopy } = useClipboard(url); - const label = 'Copy url'; - return ( - { - onClick && onClick(e); - onCopy?.(); - }} - {...rest} - > - - - - - - - ); -}); - -// this is to adjust the offset of where the page scrolls to when an anchor is present -const AnchorOffset = ({ id }: BoxProps) => - id ? ( - - ) : null; - -const Hashtag = () => ( - - - -); - -export const Heading = ({ as, children, id, ...rest }: FlexProps) => { - const { isActive, doChangeActiveSlug } = useActiveHeading(id); - const [isHovered, bind] = useHover(); - const router = useRouter(); - - const link = `#${id}`; - - const handleLinkClick = () => { - void router.push(router.pathname, router.pathname + link, { shallow: true }); - doChangeActiveSlug(id); - }; - const styles = getHeadingStyles(as as any); - - return ( - - <Box as="span" display="inline-block"> - {children} - </Box> - <AnchorOffset id={id} /> - {id && isActive && <Hashtag />} - {id && <LinkButton opacity={isHovered ? 1 : 0} onClick={handleLinkClick} link={link} />} - - ); -}; - -const BaseHeading: React.FC = React.memo(props => ( - -)); - -export const H1: React.FC = props => ; -export const H2: React.FC = props => ; -export const H3: React.FC = props => ; -export const H4: React.FC = props => ; -export const H5: React.FC = props => ; -export const H6: React.FC = props => ; - -export const Br: React.FC = props => ; -export const Hr: React.FC = props => ( - -); - -export const P: React.FC = props => ; -export const Ol: React.FC = props => ( - -); -export const Ul: React.FC = props => ( - -); -export const Li: React.FC = props => ( - -); - -const getAlertStyles = (className: string) => { - if (className?.includes('alert-success')) { - return { - borderTopColor: themeColor('green'), - borderTopWidth: '2px', - borderTopRightRadius: '0px', - borderTopLeftRadius: '0px', - accent: themeColor('green'), - icon: CheckCircleIcon, - }; - } - if (className?.includes('alert-info')) { - return { - border: border(), - borderRadius: 'md', - boxShadow: 'mid', - accent: color('accent'), - icon: InfoCircleIcon, - }; - } - if (className?.includes('alert-warning')) { - return { - borderTopColor: '#F7AA00', - borderTopWidth: '2px', - borderTopRightRadius: '0px', - borderTopLeftRadius: '0px', - accent: '#F7AA00', - icon: AlertTriangleIcon, - }; - } - if (className?.includes('alert-danger')) { - return { - borderTopColor: themeColor('red'), - borderTopWidth: '2px', - borderTopRightRadius: '0px', - borderTopLeftRadius: '0px', - accent: themeColor('red'), - icon: AlertCircleIcon, - }; - } - return {}; -}; - -export const BlockQuote: React.FC = ({ children, className, ...rest }) => { - const isAlert = className?.includes('alert'); - const { accent, icon: Icon, ...styles } = getAlertStyles(className); - return ( - - - {Icon && ( - - - - - - )} - - {children} - - - - ); -}; - -export const Sup: React.FC = props => ; diff --git a/src/components/mdx/components/blockquote.tsx b/src/components/mdx/components/blockquote.tsx new file mode 100644 index 00000000..e9646d0d --- /dev/null +++ b/src/components/mdx/components/blockquote.tsx @@ -0,0 +1,102 @@ +import { Box, Flex, BoxProps, color, themeColor, space } from '@blockstack/ui'; +import React from 'react'; + +import { border } from '@common/utils'; +import { css } from '@styled-system/css'; +import { CheckCircleIcon } from '@components/icons/check-circle'; +import { AlertTriangleIcon } from '@components/icons/alert-triangle'; +import { AlertCircleIcon } from '@components/icons/alert-circle'; +import { InfoCircleIcon } from '@components/icons/info-circle'; + +const getAlertStyles = (className: string) => { + if (className?.includes('alert-success')) { + return { + borderTopColor: themeColor('green'), + borderTopWidth: '2px', + borderTopRightRadius: '0px', + borderTopLeftRadius: '0px', + accent: themeColor('green'), + icon: CheckCircleIcon, + }; + } + if (className?.includes('alert-info')) { + return { + border: border(), + borderRadius: 'md', + boxShadow: 'mid', + accent: color('accent'), + icon: InfoCircleIcon, + }; + } + if (className?.includes('alert-warning')) { + return { + borderTopColor: '#F7AA00', + borderTopWidth: '2px', + borderTopRightRadius: '0px', + borderTopLeftRadius: '0px', + accent: '#F7AA00', + icon: AlertTriangleIcon, + }; + } + if (className?.includes('alert-danger')) { + return { + borderTopColor: themeColor('red'), + borderTopWidth: '2px', + borderTopRightRadius: '0px', + borderTopLeftRadius: '0px', + accent: themeColor('red'), + icon: AlertCircleIcon, + }; + } + return {}; +}; + +export const Blockquote: React.FC = React.memo( + React.forwardRef(({ children, className, ...rest }, ref) => { + const isAlert = className?.includes('alert'); + const { accent, icon: Icon, ...styles } = getAlertStyles(className); + return ( + + + {Icon && ( + + + + + + )} + + {children} + + + + ); + }) +); diff --git a/src/components/mdx/components/code.tsx b/src/components/mdx/components/code.tsx new file mode 100644 index 00000000..7168b716 --- /dev/null +++ b/src/components/mdx/components/code.tsx @@ -0,0 +1,63 @@ +import React from 'react'; + +import { Box, BoxProps, color, themeColor } from '@blockstack/ui'; +import { border } from '@common/utils'; +import { css } from '@styled-system/css'; +import { Text } from '@components/typography'; + +export const Code: React.FC = React.memo( + React.forwardRef(({ children, ...rest }, ref) => { + return ( + + + + {children} + + + + ); + }) +); + +const preProps = { + display: 'inline-block', + border: border(), + borderRadius: '4px', + padding: '2px 6px', + boxShadow: '0 1px 2px rgba(0, 0, 0, 0.04)', + bg: color('bg'), +}; + +export const InlineCode: React.FC = ({ children, ...rest }) => ( + + {children} + +); diff --git a/src/components/mdx/components/heading.tsx b/src/components/mdx/components/heading.tsx new file mode 100644 index 00000000..fa073e47 --- /dev/null +++ b/src/components/mdx/components/heading.tsx @@ -0,0 +1,117 @@ +import { Box, FlexProps, BoxProps, color, useClipboard, space } from '@blockstack/ui'; + +import React from 'react'; +import LinkIcon from 'mdi-react/LinkVariantIcon'; +import HashtagIcon from 'mdi-react/HashtagIcon'; +import { useTouchable } from '@common/hooks/use-touchable'; +import { Tooltip } from '@components/tooltip'; +import { useActiveHeading } from '@common/hooks/use-active-heading'; +import { Title } from '@components/typography'; +import { css } from '@styled-system/css'; +import { getHeadingStyles, baseTypeStyles } from '@components/mdx/typography'; +import { useRouter } from 'next/router'; +import { HEADER_HEIGHT } from '@components/header'; +import { Link } from '@components/mdx/components/link'; + +const LinkButton = React.memo(({ link, onClick, ...rest }: BoxProps & { link: string }) => { + const url = + typeof document !== 'undefined' && document.location.origin + document.location.pathname + link; + + const { onCopy } = useClipboard(url); + const label = 'Copy url'; + return ( + { + onClick && onClick(e); + onCopy?.(); + }} + {...rest} + > + + + + + + + ); +}); + +// this is to adjust the offset of where the page scrolls to when an anchor is present +const AnchorOffset = ({ id }: BoxProps) => + id ? ( + + ) : null; + +const Hashtag = () => ( + + + +); + +export const Heading = ({ as, children, id, ...rest }: FlexProps) => { + const { isActive, doChangeActiveSlug } = useActiveHeading(id); + + const { bind, hover, active } = useTouchable({ + behavior: 'link', + }); + const router = useRouter(); + + const link = `#${id}`; + + const handleLinkClick = () => { + void router.push(router.pathname, router.pathname + link, { shallow: true }); + doChangeActiveSlug(id); + }; + const styles = getHeadingStyles(as as any); + + return ( + + <Box as="span" display="inline-block"> + {children} + </Box> + <AnchorOffset id={id} /> + {id && isActive && <Hashtag />} + {id && <LinkButton opacity={hover || active ? 1 : 0} onClick={handleLinkClick} link={link} />} + + ); +}; + +export const BaseHeading: React.FC = React.memo(props => ( + +)); diff --git a/src/components/mdx/components/index.ts b/src/components/mdx/components/index.ts new file mode 100644 index 00000000..7dbff20b --- /dev/null +++ b/src/components/mdx/components/index.ts @@ -0,0 +1,7 @@ +export * from './blockquote'; +export * from './code'; +export * from './heading'; +export * from './link'; +export * from './list'; +export * from './table'; +export * from './typography'; diff --git a/src/components/mdx/components/link.tsx b/src/components/mdx/components/link.tsx new file mode 100644 index 00000000..03b43654 --- /dev/null +++ b/src/components/mdx/components/link.tsx @@ -0,0 +1,31 @@ +import { Box, BoxProps } from '@blockstack/ui'; +import NextLink from 'next/link'; +import React, { forwardRef, Ref } from 'react'; + +export const SmartLink = ({ href, ...rest }: { href: string }) => { + const isExternal = href.includes('http') || href.includes('mailto'); + const link = ; + + return isExternal ? ( + link + ) : ( + + {link} + + ); +}; + +export const Link = forwardRef( + (props: { href: string; target?: string; rel?: string } & BoxProps, ref: Ref) => ( + + ) +); diff --git a/src/components/mdx/components/list.tsx b/src/components/mdx/components/list.tsx new file mode 100644 index 00000000..b5acd9e3 --- /dev/null +++ b/src/components/mdx/components/list.tsx @@ -0,0 +1,14 @@ +import { Box, BoxProps, color, space } from '@blockstack/ui'; +import React, { forwardRef, Ref } from 'react'; + +export const Ol: React.FC = props => ( + +); + +export const Ul: React.FC = props => ( + +); + +export const Li: React.FC = props => ( + +); diff --git a/src/components/mdx/components/table.tsx b/src/components/mdx/components/table.tsx new file mode 100644 index 00000000..807ebb43 --- /dev/null +++ b/src/components/mdx/components/table.tsx @@ -0,0 +1,48 @@ +import { Box, color, space } from '@blockstack/ui'; +import React from 'react'; +import { P } from '@components/mdx/components'; +import { border } from '@common/utils'; + +export const Table = ({ children, ...rest }: any) => ( + + + + + {children} + + + + +); + +export const THead = (props: any) => { + return ( + + ); +}; + +export const TData = (props: any) => ( + +

+ +); diff --git a/src/components/mdx/components/typography.tsx b/src/components/mdx/components/typography.tsx new file mode 100644 index 00000000..925f32cc --- /dev/null +++ b/src/components/mdx/components/typography.tsx @@ -0,0 +1,28 @@ +import { Box, BoxProps, color, space } from '@blockstack/ui'; +import React from 'react'; +import { Text } from '@components/typography'; +import { BaseHeading } from '@components/mdx/components/heading'; + +export const H1: React.FC = props => ; +export const H2: React.FC = props => ; +export const H3: React.FC = props => ; +export const H4: React.FC = props => ; +export const H5: React.FC = props => ; +export const H6: React.FC = props => ; + +export const Br: React.FC = props => ; +export const Hr: React.FC = props => ( + +); + +export const P: React.FC = props => ; + +export const Pre = (props: any) => ; +export const Sup: React.FC = props => ; diff --git a/src/components/mdx/image.tsx b/src/components/mdx/image.tsx index d9498b10..8266d9ce 100644 --- a/src/components/mdx/image.tsx +++ b/src/components/mdx/image.tsx @@ -19,9 +19,10 @@ const getUrl = pathname => { const useImgix = (src: string) => { if (process.env.NODE_ENV !== 'production') return src; + if (!src) return src; let _src = src; const router = useRouter(); - if (!src.startsWith('http')) { + if (!src?.startsWith('http')) { const path = src.startsWith('/') ? '' : getUrl(router.pathname); _src = `${imgix + path + src + params}`; } diff --git a/src/components/mdx/md-contents.tsx b/src/components/mdx/md-contents.tsx index f953a318..c9a4f139 100644 --- a/src/components/mdx/md-contents.tsx +++ b/src/components/mdx/md-contents.tsx @@ -6,7 +6,7 @@ import { TableOfContents } from '@components/toc'; import { css } from '@styled-system/css'; import { TOC_WIDTH } from '@common/constants'; -import { styleOverwrites } from '@components/mdx/overrides'; +import { styleOverwrites } from '@components/mdx/styles'; export const MDContents: React.FC = React.memo(({ headings, children }) => ( <> @@ -17,7 +17,7 @@ export const MDContents: React.FC = React.memo(({ headings, children }) => mx="unset" pt="unset" px="unset" - css={css(styleOverwrites)} + css={css(styleOverwrites as any)} > {children} diff --git a/src/components/mdx/mdx-components.tsx b/src/components/mdx/mdx-components.tsx index 7db809cf..5a952cc7 100644 --- a/src/components/mdx/mdx-components.tsx +++ b/src/components/mdx/mdx-components.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Children } from 'react'; import { Pre, THead, @@ -12,7 +12,7 @@ import { H4, H5, H6, - BlockQuote, + Blockquote, Br, Ul, P, @@ -22,9 +22,7 @@ import { Sup, } from '@components/mdx/components'; import { Img } from '@components/mdx/image'; -import dynamic from 'next/dynamic'; - -const Code = dynamic(() => import('../code-block')); +import { Code } from '@components/mdx/components'; export const MDXComponents = { h1: H1, @@ -33,8 +31,8 @@ export const MDXComponents = { h4: H4, h5: H5, h6: H6, - inlineCode: InlineCode, code: Code, + inlineCode: InlineCode, pre: Pre, br: Br, hr: Hr, @@ -47,6 +45,6 @@ export const MDXComponents = { ol: Ol, li: Li, img: Img, - blockquote: BlockQuote, + blockquote: Blockquote, sup: Sup, }; diff --git a/src/components/mdx/overrides.tsx b/src/components/mdx/styles.tsx similarity index 78% rename from src/components/mdx/overrides.tsx rename to src/components/mdx/styles.tsx index b52486b5..0e2c2d5d 100644 --- a/src/components/mdx/overrides.tsx +++ b/src/components/mdx/styles.tsx @@ -1,9 +1,14 @@ import React from 'react'; -import { color, space } from '@blockstack/ui'; +import { color, space, themeColor } from '@blockstack/ui'; import { createGlobalStyle } from 'styled-components'; import { getHeadingStyles } from '@components/mdx/typography'; +import { border } from '@common/utils'; export const MdxOverrides = createGlobalStyle` +@counter-style list { + pad: "0"; + +} .DocSearch-Container{ z-index: 99999; } @@ -59,7 +64,7 @@ export const styleOverwrites = { pr: space('extra-loose'), pl: '64px ', }, - p: { + 'p, li': { display: 'inline-block', fontSize: '16.5px', lineHeight: '28px', @@ -77,6 +82,7 @@ export const styleOverwrites = { }, }, li: { + display: 'list-item', pb: 0, ':last-child': { mb: 0, @@ -119,14 +125,58 @@ export const styleOverwrites = { color: color('accent'), textDecoration: 'inherit', }, - pre: { - '& + h2, & + h3': { - mt: space('extra-loose'), + 'li pre': { + '& > div': { + border: border(), + borderRadius: '12px', }, - '& + h4, & + h5, & + h6, & + blockquote, & + ul, & + ol': { - mt: 0, + }, + pre: { + my: space('extra-loose'), + '& > div': { + borderRight: [0, 0, border()], + borderLeft: [0, 0, border()], + borderBottom: border(), + borderTop: border(), + borderRadius: [0, 0, '12px'], + bg: themeColor('ink'), + }, + '& > div > code': { + whiteSpace: 'pre', + overflowX: 'auto', + maxWidth: '100%', + '& + h2, & + h3': { + mt: space('extra-loose'), + }, + '& + h4, & + h5, & + h6, & + blockquote, & + ul, & + ol': { + mt: 0, + }, + counterReset: 'line', + '& .token-line': { + '.comment': { + color: 'rgba(255,255,255,0.5) !important', + }, + display: 'flex', + fontSize: '14px', + '&::before': { + counterIncrement: 'line', + content: 'counter(line, decimal-leading-zero)', + display: 'grid', + placeItems: 'center', + color: themeColor('ink.400'), + mr: '16px', + width: '42px', + fontSize: '12px', + borderRight: '1px solid rgb(39,41,46)', + }, + pr: space(['base-loose', 'base-loose', 'extra-loose', 'extra-loose']), + }, + boxShadow: 'none', }, }, + '& > pre': { + px: space(['none', 'none', 'extra-loose', 'extra-loose']), + }, h2: { mt: '64px', '&, & > *': { @@ -200,10 +250,6 @@ export const styleOverwrites = { // mt: space('extra-tight'), }, }, - '.prism-code': { - width: '100%', - minWidth: 'fit-content', - }, blockquote: { '& + blockquote': { mt: space('extra-tight'), @@ -221,20 +267,6 @@ export const styleOverwrites = { img: { my: space('extra-loose'), }, - '& > pre > *:not(pre):not(.line-numbers)': { - px: space(['extra-loose', 'extra-loose', 'none', 'none']), - }, - '& > pre > div[style]': { - px: space(['base-loose', 'base-loose', 'none', 'none']), - }, - '& > pre > .code-editor': { - pl: space(['base', 'base', 'none', 'none']), - }, - '& > pre': { - px: space(['none', 'none', 'extra-loose', 'extra-loose']), - boxShadow: 'none', - my: space('extra-loose'), - }, '& > img': { mx: 'auto', }, diff --git a/src/components/pagination.tsx b/src/components/pagination.tsx index fa59c55a..cc5a3b8b 100644 --- a/src/components/pagination.tsx +++ b/src/components/pagination.tsx @@ -6,7 +6,7 @@ import { MDXComponents } from '@components/mdx'; import { border } from '@common/utils'; import NextLink from 'next/link'; import { Link } from '@components/typography'; -import { useTouchable } from 'touchable-hook'; +import { useTouchable } from '@common/hooks/use-touchable'; const usePaginateRoutes = () => { const router = useRouter(); diff --git a/src/_includes/architecture.md b/src/includes/architecture.md similarity index 100% rename from src/_includes/architecture.md rename to src/includes/architecture.md diff --git a/src/_includes/contribute_code.md b/src/includes/contribute_code.md similarity index 100% rename from src/_includes/contribute_code.md rename to src/includes/contribute_code.md diff --git a/src/_includes/contribute_community.md b/src/includes/contribute_community.md similarity index 100% rename from src/_includes/contribute_community.md rename to src/includes/contribute_community.md diff --git a/src/_includes/contribute_issues.md b/src/includes/contribute_issues.md similarity index 100% rename from src/_includes/contribute_issues.md rename to src/includes/contribute_issues.md diff --git a/src/_includes/contribute_ovr.md b/src/includes/contribute_ovr.md similarity index 100% rename from src/_includes/contribute_ovr.md rename to src/includes/contribute_ovr.md diff --git a/src/_includes/create_id.md b/src/includes/create_id.md similarity index 100% rename from src/_includes/create_id.md rename to src/includes/create_id.md diff --git a/src/_includes/mining-ranking.md b/src/includes/mining-ranking.md similarity index 100% rename from src/_includes/mining-ranking.md rename to src/includes/mining-ranking.md diff --git a/src/_includes/required-fields.md b/src/includes/required-fields.md similarity index 100% rename from src/_includes/required-fields.md rename to src/includes/required-fields.md diff --git a/src/_includes/scaffolding.md b/src/includes/scaffolding.md similarity index 100% rename from src/_includes/scaffolding.md rename to src/includes/scaffolding.md diff --git a/src/_includes/sign_in.md b/src/includes/sign_in.md similarity index 100% rename from src/_includes/sign_in.md rename to src/includes/sign_in.md diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 264039b2..33f6559a 100755 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -4,7 +4,7 @@ import { useMediaQuery } from '@common/hooks/use-media-query'; import { MDXProvider } from '@mdx-js/react'; import { MDXComponents } from '@components/mdx'; import { AppStateProvider } from '@components/app-state'; -import { MdxOverrides } from '@components/mdx/overrides'; +import { MdxOverrides } from '@components/mdx/styles'; import { ProgressBar } from '@components/progress-bar'; import GoogleFonts from 'next-google-fonts'; import '@docsearch/react/dist/style.css'; @@ -12,17 +12,24 @@ import { BaseLayout } from '@components/layouts/base-layout'; import { THEME_STORAGE_KEY } from '@common/constants'; import { ColorModes } from '@components/color-modes/styles'; +const setHtmlBackgroundColor = () => { + const bgValue = getComputedStyle(document.documentElement).getPropertyValue('--colors-bg'); + document.documentElement.style.background = bgValue; +}; + const setDarkMode = setColorMode => { localStorage.setItem(THEME_STORAGE_KEY, 'dark'); setColorMode('dark'); document.documentElement.classList.add('dark'); document.documentElement.classList.remove('light'); + setHtmlBackgroundColor(); }; const setLightMode = setColorMode => { localStorage.setItem(THEME_STORAGE_KEY, 'light'); setColorMode('light'); document.documentElement.classList.add('light'); document.documentElement.classList.remove('dark'); + setHtmlBackgroundColor(); }; export const useColorMode = () => { diff --git a/src/pages/core/smart/clarityRef.md b/src/pages/core/smart/clarityRef.md index c5d9844f..bb42d0f8 100644 --- a/src/pages/core/smart/clarityRef.md +++ b/src/pages/core/smart/clarityRef.md @@ -2,7 +2,7 @@ description: 'See a detailed list of all keywords and functions for the Clarity language.' --- -export { convertClarityRefUsageToMdx as getStaticProps } from '@common/data/clarity-ref' +export { convertClarityRefToMdx as getStaticProps } from '@common/data/clarity-ref' import { ClarityKeywordReference, ClarityFunctionReference } from '@components/clarity-ref' # Clarity Language Reference @@ -135,8 +135,8 @@ The following limitations are imposed on contract calls: ## Keyword reference - + ## Function reference - + diff --git a/yarn.lock b/yarn.lock index 919e4fdd..95fbdc9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1008,14 +1008,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-react-display-name@^7.8.3": +"@babel/plugin-transform-react-display-name@^7.10.4", "@babel/plugin-transform-react-display-name@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.10.4.tgz#b5795f4e3e3140419c3611b7a2a3832b9aef328d" integrity sha512-Zd4X54Mu9SBfPGnEcaGcOrVAYOtjT2on8QZkLKEq1S/tHexG39d9XXGZv19VfRrDjPJzFmPfTAqOQS1pfFOujw== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-react-jsx-development@^7.9.0": +"@babel/plugin-transform-react-jsx-development@^7.10.4", "@babel/plugin-transform-react-jsx-development@^7.9.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.10.4.tgz#6ec90f244394604623880e15ebc3c34c356258ba" integrity sha512-RM3ZAd1sU1iQ7rI2dhrZRZGv0aqzNQMbkIUCS1txYpi9wHQ2ZHNjo5TwX+UD6pvFW4AbWqLVYvKy5qJSAyRGjQ== @@ -1024,7 +1024,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" -"@babel/plugin-transform-react-jsx-self@^7.9.0": +"@babel/plugin-transform-react-jsx-self@^7.10.4", "@babel/plugin-transform-react-jsx-self@^7.9.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.10.4.tgz#cd301a5fed8988c182ed0b9d55e9bd6db0bd9369" integrity sha512-yOvxY2pDiVJi0axdTWHSMi5T0DILN+H+SaeJeACHKjQLezEzhLx9nEF9xgpBLPtkZsks9cnb5P9iBEi21En3gg== @@ -1032,7 +1032,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" -"@babel/plugin-transform-react-jsx-source@^7.9.0": +"@babel/plugin-transform-react-jsx-source@^7.10.4", "@babel/plugin-transform-react-jsx-source@^7.9.0": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.10.5.tgz#34f1779117520a779c054f2cdd9680435b9222b4" integrity sha512-wTeqHVkN1lfPLubRiZH3o73f4rfon42HpgxUSs86Nc+8QIcm/B9s8NNVXu/gwGcOyd7yDib9ikxoDLxJP0UiDA== @@ -1040,7 +1040,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" -"@babel/plugin-transform-react-jsx@^7.9.4": +"@babel/plugin-transform-react-jsx@^7.10.4", "@babel/plugin-transform-react-jsx@^7.9.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.10.4.tgz#673c9f913948764a4421683b2bef2936968fddf2" integrity sha512-L+MfRhWjX0eI7Js093MM6MacKU4M6dnCRa/QPDwYMxjljzSCzzlzKzj9Pk4P3OtrPcxr2N3znR419nr3Xw+65A== @@ -1050,6 +1050,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.10.4" +"@babel/plugin-transform-react-pure-annotations@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.10.4.tgz#3eefbb73db94afbc075f097523e445354a1c6501" + integrity sha512-+njZkqcOuS8RaPakrnR9KvxjoG1ASJWpoIv/doyWngId88JoFlPlISenGXjrVacZUIALGUr6eodRs1vmPnF23A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-regenerator@^7.10.4", "@babel/plugin-transform-regenerator@^7.8.7": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz#2015e59d839074e76838de2159db421966fd8b63" @@ -1294,6 +1302,19 @@ "@babel/plugin-transform-react-jsx-self" "^7.9.0" "@babel/plugin-transform-react-jsx-source" "^7.9.0" +"@babel/preset-react@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.10.4.tgz#92e8a66d816f9911d11d4cc935be67adfc82dbcf" + integrity sha512-BrHp4TgOIy4M19JAfO1LhycVXOPWdDbTRep7eVyatf174Hff+6Uk53sDyajqZPu8W1qXRBiYOfIamek6jA7YVw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-transform-react-display-name" "^7.10.4" + "@babel/plugin-transform-react-jsx" "^7.10.4" + "@babel/plugin-transform-react-jsx-development" "^7.10.4" + "@babel/plugin-transform-react-jsx-self" "^7.10.4" + "@babel/plugin-transform-react-jsx-source" "^7.10.4" + "@babel/plugin-transform-react-pure-annotations" "^7.10.4" + "@babel/preset-typescript@7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz#87705a72b1f0d59df21c179f7c3d2ef4b16ce192" @@ -1387,10 +1408,10 @@ resolved "https://registry.yarnpkg.com/@blockstack/prettier-config/-/prettier-config-0.0.6.tgz#8a41cd378ba061b79770987f2a6ad0c92b64bd72" integrity sha512-ke0MdyblmoUqSJBEutsG8/6G7KAjCB+uOcgZHPJvJr4R+i5yRhT4GSe5nV/wREINuK0jj2GvaA6qlx4PQTKQUA== -"@blockstack/ui@^2.10.7": - version "2.10.7" - resolved "https://registry.yarnpkg.com/@blockstack/ui/-/ui-2.10.7.tgz#5686e9b26f722cb2b35a1133e75f758cd0276bdc" - integrity sha512-Hlg4GWXZopc6XR1OFJvoArH8l91SCUCnbJQz31/mi5fCq/2fcj97Gd6EWOucfcT44QyQAeZqOuLVUVSP5Xwwpg== +"@blockstack/ui@^2.12.2-beta.0": + version "2.12.2-beta.0" + resolved "https://registry.yarnpkg.com/@blockstack/ui/-/ui-2.12.2-beta.0.tgz#ba42fd057e2ef9681c4075e2108ce60f6d99e20f" + integrity sha512-ukEWH2uf1HPN6h4AEE2kdIX/DiOCoUQnkjq3gZVyPLnHdc44C8d2XPv6zIjIpqjHbj1ja3Rs15RaWtDZdQHlmQ== dependencies: "@popperjs/core" "^2.4.0" "@reach/alert" "^0.10.2" @@ -1472,6 +1493,15 @@ unist-util-map "^2.0.1" unist-util-visit "^2.0.2" +"@mapbox/rehype-prism@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@mapbox/rehype-prism/-/rehype-prism-0.5.0.tgz#b756308ebf3af8f92a6359cd78010a7770453e85" + integrity sha512-sE5EetmSR6At7AU2s3N2rFUUqm8BpvxUcGcesgfTZgqF7bQoekqsKxLX8gunIDjZs34acZJ6fgPFHepEWnYKCQ== + dependencies: + hast-util-to-string "^1.0.3" + refractor "^3.0.0" + unist-util-visit "^2.0.2" + "@mdx-js/loader@1.6.13": version "1.6.13" resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-1.6.13.tgz#3696057e98a170180d6e13af90e07359cba74742" @@ -1624,10 +1654,10 @@ resolved "https://registry.yarnpkg.com/@next/mdx/-/mdx-9.4.4.tgz#ad1da5ecd2f3ee4b07fdf9a938441efffd58af6b" integrity sha512-d1WPPxube7kgQo5JjfiFxPoK+set0OBCNeIJnF8TN176v4SsFNngfB4I5RIxsdXqD7aPzWeFcxCGGGvbzjKa8A== -"@next/react-dev-overlay@9.4.5-canary.42": - version "9.4.5-canary.42" - resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-9.4.5-canary.42.tgz#9aa83761b849b638cde5c64cf9f2957a94bd75a4" - integrity sha512-f5dGna0kpYZ6cSyHUXz0jdFJjkFIgpwFFVNFXtgaQSzz+d5ImqjUp+1/y4409hrxSeG0RA0GU72/iT4YkEllDQ== +"@next/react-dev-overlay@9.4.5-canary.45": + version "9.4.5-canary.45" + resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-9.4.5-canary.45.tgz#b703c1a8fd14942027bb471e11d6409d2dd71383" + integrity sha512-3S/nD6SgcTMys++pbusTY9UqxXGWEXW/QxfsIrV1k7ydFC9omioEnh/wlQqd3MUPGS2mTT+yLJ2eObSQuS93mg== dependencies: "@babel/code-frame" "7.8.3" ally.js "1.4.1" @@ -1640,10 +1670,10 @@ stacktrace-parser "0.1.10" strip-ansi "6.0.0" -"@next/react-refresh-utils@9.4.5-canary.42": - version "9.4.5-canary.42" - resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-9.4.5-canary.42.tgz#7ec11ac628362d5148a9bdda08c11db2fd34fad7" - integrity sha512-kurUX46KvzJp1FjsUk4Q7lSHgHjMkrBC044M3D4g/kFEsqCuDQm6F2+LXmUkcVd/ql+TSFdqj1cNXHXzuXrq2A== +"@next/react-refresh-utils@9.4.5-canary.45": + version "9.4.5-canary.45" + resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-9.4.5-canary.45.tgz#f9392390aadbf8ff20f14f1fe8001cfa3bad408a" + integrity sha512-dWoxGLQEbE75jmUKIDAbGJn1T9y590iAHc+CM/aOCa4yo14yshY/GL1D0xuCDkc8QFZeIDZyTR4uS+uR1CeiVg== "@nodelib/fs.stat@^1.1.2": version "1.1.3" @@ -2632,6 +2662,11 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== +async@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -3106,6 +3141,22 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +cache-manager-fs-hash@^0.0.9: + version "0.0.9" + resolved "https://registry.yarnpkg.com/cache-manager-fs-hash/-/cache-manager-fs-hash-0.0.9.tgz#a65bb7ca2c9f9f9cf7035945bbfab536c5aab340" + integrity sha512-G0RUUSMZADiMx/0tHjPa+uzJyjtVB/Xt9yuFm6g/rBpm0p/IMr4atUWX2G2f1yGCPmDnyUcFz4RlSpgNRgvldg== + dependencies: + lockfile "^1.0.4" + +cache-manager@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/cache-manager/-/cache-manager-3.3.0.tgz#eb75fb45709ba4eb67a32054d72b5fb9e5ac717e" + integrity sha512-BH7pfWWZ6BYnkcj6759uWnTCwMz24LXI0PzribTP8WqpydHo9Jk6EM9itmG+rBXAJHbNOwo1ES49SIn8hyhW2A== + dependencies: + async "1.5.2" + lodash "^4.17.15" + lru-cache "4.0.0" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -3264,6 +3315,21 @@ chokidar@^3.4.0: optionalDependencies: fsevents "~2.1.2" +chokidar@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.1.tgz#e905bdecf10eaa0a0b1db0c664481cc4cbc22ba1" + integrity sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.4.0" + optionalDependencies: + fsevents "~2.1.2" + chownr@^1.1.1, chownr@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -3463,11 +3529,6 @@ console-browserify@^1.1.0: resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== -"consolidated-events@^1.1.0 || ^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/consolidated-events/-/consolidated-events-2.0.2.tgz#da8d8f8c2b232831413d9e190dc11669c79f4a91" - integrity sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ== - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -3710,6 +3771,11 @@ css-select@^2.0.0: domutils "^1.7.0" nth-check "^1.0.2" +css-selector-parser@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/css-selector-parser/-/css-selector-parser-1.4.1.tgz#03f9cb8a81c3e5ab2c51684557d5aaf6d2569759" + integrity sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g== + css-to-react-native@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" @@ -3796,19 +3862,19 @@ cssnano-preset-default@^4.0.7: postcss-svgo "^4.0.2" postcss-unique-selectors "^4.0.1" -cssnano-preset-simple@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.1.3.tgz#c185f915afcfb803e78e357df48cc77f949eb1d4" - integrity sha512-7iDiM+OSkDlTrH/xGw748mr7FdQtFAy6qFRlTjJevAsG536DPOMeaDucJMqWzyAhcem0VQkTGveUk3bo3ux6hA== +cssnano-preset-simple@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.1.4.tgz#7b287a31df786348565d02342df71af8f758ac82" + integrity sha512-EYKDo65W+AxMViUijv/hvhbEnxUjmu3V7omcH1MatPOwjRLrAgVArUOE8wTUyc1ePFEtvV8oCT4/QSRJDorm/A== dependencies: postcss "^7.0.32" -cssnano-simple@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.0.4.tgz#2d56225795f4afbbb9c21df953cb43df6c589ae1" - integrity sha512-Em/QujEpiqfjT3wksbyHTYpBF2l7lfYuUiLjtCwurc6NqRFb4N/VZjC3djNuO7poFpO410tTcpJ38Qn8xWadcA== +cssnano-simple@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.0.5.tgz#66ee528f3a4e60754e2625ea9f51ac315f5f0a92" + integrity sha512-NJjx2Er1C3pa75v1GwMKm0w6xAp1GsW2Ql1As4CWPNFxTgYFN5e8wblYeHfna13sANAhyIdSIPqKJjBO4CU5Eg== dependencies: - cssnano-preset-simple "^1.1.3" + cssnano-preset-simple "1.1.4" postcss "^7.0.32" cssnano-util-get-arguments@^4.0.0: @@ -4275,6 +4341,15 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: memory-fs "^0.5.0" tapable "^1.0.0" +enhanced-resolve@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz#3b806f3bfafc1ec7de69551ef93cca46c1704126" + integrity sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -5045,14 +5120,6 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -gatsby-remark-shiki@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/gatsby-remark-shiki/-/gatsby-remark-shiki-0.1.2.tgz#5c04e42092cdce08aaddd9de493df802bf72e762" - integrity sha512-HjG3TuTNJJaCK3eGHsB2DQiwrHTEgeJKSzbotFb6W+auX4wAfEurkWStkyxbWo7zUc9UuiJkZKqOll3D7NrsIg== - dependencies: - shiki "^0.1.6" - unist-util-visit "^2.0.1" - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -5321,6 +5388,14 @@ hast-to-hyperscript@^9.0.0: unist-util-is "^4.0.0" web-namespaces "^1.0.0" +hast-util-from-dom@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/hast-util-from-dom/-/hast-util-from-dom-2.0.5.tgz#410ce6e8ffd7cc06c5d651a46cb2204c97a36820" + integrity sha512-zxqi3XvFQLWVAR+nLOUv6DuH2kuD1djqlFTELSao6uOQiNFLGyvRdHz+iM3iudVfSR2Ys1bbt7Qmra24yhYYxA== + dependencies: + hastscript "^5.0.0" + web-namespaces "^1.0.0" + hast-util-from-parse5@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz#3089dc0ee2ccf6ec8bc416919b51a54a589e097c" @@ -5401,6 +5476,11 @@ hast-util-to-parse5@^6.0.0: xtend "^4.0.0" zwitch "^1.0.0" +hast-util-to-string@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz#9b24c114866bdb9478927d7e9c36a485ac728378" + integrity sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w== + hast-util-whitespace@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz#e4fe77c4a9ae1cb2e6c25e02df0043d0164f6e41" @@ -6329,6 +6409,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lockfile@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" + integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== + dependencies: + signal-exit "^3.0.2" + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -6371,6 +6458,14 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lru-cache@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.0.tgz#b5cbf01556c16966febe54ceec0fb4dc90df6c28" + integrity sha1-tcvwFVbBaWb+vlTO7A+03JDfbCg= + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + lru-cache@5.1.1, lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -6575,6 +6670,11 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= +micro-memoize@^4.0.9: + version "4.0.9" + resolved "https://registry.yarnpkg.com/micro-memoize/-/micro-memoize-4.0.9.tgz#b44a38c9dffbee1cefc2fd139bc8947952268b62" + integrity sha512-Z2uZi/IUMGQDCXASdujXRqrXXEwSY0XffUrAOllhqzQI3wpUyZbiZTiE2JuYC0HSG2G7DbCS5jZmsEKEGZuemg== + micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -6875,10 +6975,10 @@ next-transpile-modules@^3.3.0: micromatch "^4.0.2" slash "^3.0.0" -next@^9.4.5-canary.42: - version "9.4.5-canary.42" - resolved "https://registry.yarnpkg.com/next/-/next-9.4.5-canary.42.tgz#c9bbb078fdd0f757923bf4310a0734fb427030e8" - integrity sha512-DOVLC7Cul1U8fpZOky8AOCxPlGghezT5AHe641FiD1Gyj3bnD2RaoR+mE+W9PLVHCfEVIniTl6wOClamRYNa2w== +next@^9.4.5-canary.45: + version "9.4.5-canary.45" + resolved "https://registry.yarnpkg.com/next/-/next-9.4.5-canary.45.tgz#77c6c6ebc6b8a83649a39ea85b6883c8b2c26df2" + integrity sha512-msgsYKZJaNFwfA//vuir5VQ43s/gQr6o0f8PV+bn85w2h6VPJx7joAvBaMbYXUShKGVcAHbISasFhARy17ScWw== dependencies: "@ampproject/toolbox-optimizer" "2.5.3" "@babel/code-frame" "7.8.3" @@ -6898,8 +6998,8 @@ next@^9.4.5-canary.42: "@babel/preset-typescript" "7.9.0" "@babel/runtime" "7.9.6" "@babel/types" "7.9.6" - "@next/react-dev-overlay" "9.4.5-canary.42" - "@next/react-refresh-utils" "9.4.5-canary.42" + "@next/react-dev-overlay" "9.4.5-canary.45" + "@next/react-refresh-utils" "9.4.5-canary.45" babel-plugin-syntax-jsx "6.18.0" babel-plugin-transform-define "2.0.0" babel-plugin-transform-react-remove-prop-types "0.4.24" @@ -6907,7 +7007,7 @@ next@^9.4.5-canary.42: cacache "13.0.1" chokidar "2.1.8" css-loader "3.5.3" - cssnano-simple "1.0.4" + cssnano-simple "1.0.5" find-cache-dir "3.3.1" jest-worker "24.9.0" loader-utils "2.0.0" @@ -6929,7 +7029,7 @@ next@^9.4.5-canary.42: use-subscription "1.4.1" watchpack "2.0.0-beta.13" web-vitals "0.2.1" - webpack "4.43.0" + webpack "4.44.0" webpack-sources "1.4.3" node-emoji@^1.10.0: @@ -7043,12 +7143,17 @@ normalize-url@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== +not@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/not/-/not-0.1.0.tgz#c9691c1746c55dcfbe54cbd8bd4ff041bc2b519d" + integrity sha1-yWkcF0bFXc++VMvYvU/wQbwrUZ0= + nprogress@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1" integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E= -nth-check@^1.0.2: +nth-check@^1.0.0, nth-check@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== @@ -7202,6 +7307,13 @@ os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= +p-all@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-all/-/p-all-3.0.0.tgz#077c023c37e75e760193badab2bad3ccd5782bfb" + integrity sha512-qUZbvbBFVXm6uJ7U/WDiO0fv6waBMbjlCm4E66oZdRR+egswICarIdHyVSZZHudH8T5SF8x/JG0q0duFzPnlBw== + dependencies: + p-map "^4.0.0" + p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -7244,6 +7356,13 @@ p-map@^3.0.0: dependencies: aggregate-error "^3.0.0" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-pipe@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" @@ -7897,7 +8016,7 @@ prism-react-renderer@^1.0.1, prism-react-renderer@^1.0.2, prism-react-renderer@^ resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.1.1.tgz#1c1be61b1eb9446a146ca7a50b7bcf36f2a70a44" integrity sha512-MgMhSdHuHymNRqD6KM3eGS0PNqgK9q4QF5P0yoQQvpB6jNjeSAi3jcSAz0Sua/t9fa4xDOMar9HJbLa08gl9ug== -prismjs@^1.20.0: +prismjs@^1.20.0, prismjs@~1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.20.0.tgz#9b685fc480a3514ee7198eac6a3bf5024319ff03" integrity sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ== @@ -7945,7 +8064,7 @@ prop-types-exact@1.2.0: object.assign "^4.1.0" reflect.ownkeys "^0.2.0" -prop-types@15.7.2, prop-types@^15.0.0, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@15.7.2, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -7974,6 +8093,11 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -8133,7 +8257,7 @@ react-icons@^3.9.0: dependencies: camelcase "^5.0.0" -react-is@16.13.1, react-is@^16.13.1, react-is@^16.6.3, react-is@^16.7.0, react-is@^16.8.1: +react-is@16.13.1, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -8195,15 +8319,6 @@ react-virtualized-auto-sizer@^1.0.2: resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.2.tgz#a61dd4f756458bbf63bd895a92379f9b70f803bd" integrity sha512-MYXhTY1BZpdJFjUovvYHVBmkq79szK/k7V3MO+36gJkWGkrXKtyr4vCPtpphaTLRAdDNoYEYFZWE8LjN+PIHNg== -react-waypoint@^9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/react-waypoint/-/react-waypoint-9.0.3.tgz#176aa4686b33eb40d0d48d361c468f0367167958" - integrity sha512-NRmyjW8CUBNNl4WpvBqLDgBs18rFUsixeHVHrRrFlWTdOlWP7eiDjptqlR/cJAPLD6RwP5XFCm3bi9OiofN3nA== - dependencies: - consolidated-events "^1.1.0 || ^2.0.0" - prop-types "^15.0.0" - react-is "^16.6.3" - react-window@^1.8.5: version "1.8.5" resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.5.tgz#a56b39307e79979721021f5d06a67742ecca52d1" @@ -8306,6 +8421,15 @@ reflect.ownkeys@^0.2.0: resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= +refractor@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.0.0.tgz#7c8072eaf49dbc1b333e7acc64fb52a1c9b17c75" + integrity sha512-eCGK/oP4VuyW/ERqjMZRZHxl2QsztbkedkYy/SxqE/+Gh1gLaAF17tWIOcVJDiyGhar1NZy/0B9dFef7J0+FDw== + dependencies: + hastscript "^5.0.0" + parse-entities "^2.0.0" + prismjs "~1.20.0" + regenerate-unicode-properties@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" @@ -8505,6 +8629,28 @@ remark-parse@^7.0.0: vfile-location "^2.0.0" xtend "^4.0.1" +remark-parse@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.3.tgz#9c62aa3b35b79a486454c690472906075f40c7e1" + integrity sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q== + dependencies: + ccount "^1.0.0" + collapse-white-space "^1.0.2" + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + is-whitespace-character "^1.0.0" + is-word-character "^1.0.0" + markdown-escapes "^1.0.0" + parse-entities "^2.0.0" + repeat-string "^1.5.4" + state-toggle "^1.0.0" + trim "0.0.1" + trim-trailing-lines "^1.0.0" + unherit "^1.0.4" + unist-util-remove-position "^2.0.0" + vfile-location "^3.0.0" + xtend "^4.0.1" + remark-slug@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/remark-slug/-/remark-slug-6.0.0.tgz#2b54a14a7b50407a5e462ac2f376022cce263e2c" @@ -8569,6 +8715,24 @@ remark-unwrap-images@2.0.0: hast-util-whitespace "^1.0.0" unist-util-visit "^2.0.0" +remark-vscode@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/remark-vscode/-/remark-vscode-1.0.0-beta.1.tgz#e8d2a180b9af6c6467586cd2a30156c38a91f7c6" + integrity sha512-kH3JfGsRn5QopmidJix+IWC5rLPTQJOtITYNSzEGgSpHktyA3b7dajpkkFmvf1c8oLHTQeYD19joWQC5GqRqPQ== + dependencies: + cache-manager "^3.3.0" + cache-manager-fs-hash "^0.0.9" + fs-extra "^9.0.1" + hast-util-from-dom "^2.0.5" + json5 "^2.1.0" + micro-memoize "^4.0.9" + onigasm "^2.2.1" + p-all "^3.0.0" + unist-builder "^2.0.3" + unist-util-select "^3.0.1" + unist-util-visit "^2.0.3" + vscode-textmate "https://github.com/octref/vscode-textmate" + remark@^11.0.2: version "11.0.2" resolved "https://registry.yarnpkg.com/remark/-/remark-11.0.2.tgz#12b90ea100ac3362b1976fa87a6e4e0ab5968202" @@ -8976,30 +9140,10 @@ shell-quote@1.7.2: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== -shiki-languages@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/shiki-languages/-/shiki-languages-0.1.6.tgz#4a71eba9d345de4780fc46994e4d073356573e3e" - integrity sha512-rMu+z97UCPKMtPBkzLBItReawXnlOgXZmELFwI/s3ATxd9VzJgSQTtQW/hmW5EYCrzF2kAUjoOnn+50/MPWjgQ== - dependencies: - vscode-textmate "https://github.com/octref/vscode-textmate" - -shiki-themes@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/shiki-themes/-/shiki-themes-0.1.7.tgz#edaf2027b31bb3645dd044f66a76d4cdb2599b77" - integrity sha512-mpF/VynGun/uNdjOIPnyPv4boN/QYDh+zE94SavgvmatMHkXXjZhls19Xv9rcRwuxUrWfXjaPkEZj7VAk94GGg== - dependencies: - json5 "^2.1.0" - vscode-textmate "https://github.com/octref/vscode-textmate" - -shiki@^0.1.6: - version "0.1.7" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.1.7.tgz#138eed000063a80e44eedc800381977c690271e5" - integrity sha512-9J0PhAdXv6tt3FZf82oKZkcV8c8NRZYJEOH0eIrrxfcyNzMuB79tJFGFSI3OhhiYFL5namob/Ii0Ri4iDoF15A== - dependencies: - onigasm "^2.2.1" - shiki-languages "^0.1.6" - shiki-themes "^0.1.7" - vscode-textmate "https://github.com/octref/vscode-textmate" +signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== simple-swizzle@^0.2.2: version "0.2.2" @@ -10009,7 +10153,7 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -unist-builder@2.0.3, unist-builder@^2.0.0: +unist-builder@2.0.3, unist-builder@^2.0.0, unist-builder@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== @@ -10068,6 +10212,17 @@ unist-util-remove@^2.0.0: dependencies: unist-util-is "^4.0.0" +unist-util-select@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/unist-util-select/-/unist-util-select-3.0.1.tgz#787fc452db9ba77f0ade0e7dc53c3d9d4acc79c7" + integrity sha512-VQpTuqZVJlRbosQdnLdTPIIqwZeU70YZ5aMBOqtFNGeeCdYn6ORZt/9RiaVlbl06ocuf58SVMoFa7a13CSGPMA== + dependencies: + css-selector-parser "^1.0.0" + not "^0.1.0" + nth-check "^1.0.0" + unist-util-is "^4.0.0" + zwitch "^1.0.0" + unist-util-stringify-position@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" @@ -10099,7 +10254,7 @@ unist-util-visit@2.0.2: unist-util-is "^4.0.0" unist-util-visit-parents "^3.0.0" -unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-util-visit@^2.0.2, unist-util-visit@^2.0.3: +unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.2, unist-util-visit@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== @@ -10372,6 +10527,17 @@ watchpack@^1.6.1: chokidar "^3.4.0" watchpack-chokidar2 "^2.0.0" +watchpack@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.4.tgz#6e9da53b3c80bb2d6508188f5b200410866cd30b" + integrity sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg== + dependencies: + graceful-fs "^4.1.2" + neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.1" + watchpack-chokidar2 "^2.0.0" + web-namespaces@^1.0.0, web-namespaces@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" @@ -10424,7 +10590,36 @@ webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-s source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.43.0, webpack@^4.43.0: +webpack@4.44.0: + version "4.44.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.0.tgz#3b08f88a89470175f036f4a9496b8a0428668802" + integrity sha512-wAuJxK123sqAw31SpkPiPW3iKHgFUiKvO7E7UZjtdExcsRe3fgav4mvoMM7vvpjLHVoJ6a0Mtp2fzkoA13e0Zw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.3.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.7.4" + webpack-sources "^1.4.1" + +webpack@^4.43.0: version "4.43.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== @@ -10561,6 +10756,11 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +yallist@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"