@primer/blueprints
Advanced tools
Comparing version 0.0.0-0ed81f6 to 0.0.0-16066f1
@@ -1,5 +0,4 @@ | ||
import { Box, Button, BorderBox, Absolute, StyledOcticon, Relative, Text, Link, Avatar, Flex, Sticky } from '@primer/components'; | ||
import styled from 'styled-components'; | ||
import React, { useEffect, useState } from 'react'; | ||
import ReactDOM, { findDOMNode } from 'react-dom'; | ||
import { Button, BorderBox, Absolute, Box, StyledOcticon, Relative, Text, Link, Avatar, Flex, Sticky } from '@primer/components'; | ||
import Octicon, { Clippy, getIconByName, MarkGithub, PrimitiveDot, Comment, Info, FileCode, Alert } from '@githubprimer/octicons-react'; | ||
@@ -13,4 +12,4 @@ import getConfig from 'next/config'; | ||
import 'prop-types'; | ||
import dynamic from 'next/dynamic'; | ||
import NextLink from 'next/link'; | ||
import styled from 'styled-components'; | ||
import { withRouter } from 'next/router'; | ||
@@ -227,13 +226,2 @@ import { join } from 'path'; | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral(["\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
var BoxShadow = styled(Box)(_templateObject()); | ||
var ClipboardCopy = | ||
@@ -713,16 +701,2 @@ /*#__PURE__*/ | ||
var DetailsDialog = dynamic(function () { | ||
return import('details-dialog-element').then(function () { | ||
return React.createFactory('details-dialog'); | ||
}); | ||
}, { | ||
ssr: false, | ||
loadableGenerated: { | ||
webpack: function webpack() { | ||
return [require.resolveWeak('details-dialog-element')]; | ||
}, | ||
modules: ['details-dialog-element'] | ||
} | ||
}); | ||
function Link$1(_ref) { | ||
@@ -740,2 +714,13 @@ var href = _ref.href, | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral(["\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
var BoxShadow = styled(Box)(_templateObject()); | ||
var HeaderText = function HeaderText(props) { | ||
@@ -1165,2 +1150,2 @@ return React.createElement(Text, _extends({ | ||
export { BoxShadow, ClipboardCopy, CodeExample, Contributors, DetailsDialog, Frame, Header, Link$1 as Link, NavLink, NodeLink, Outline, PackageHeader, SideNav, StatusLabel, CommonStyles, CommonScripts, config, assetPrefix, assetPath, getAssetPath, requirePage, pathMap, pageTree, rootPage }; | ||
export { ClipboardCopy, CodeExample, Contributors, Frame, Header, Link$1 as Link, NavLink, NodeLink, Outline, PackageHeader, SideNav, StatusLabel, CommonStyles, CommonScripts, config, assetPrefix, assetPath, getAssetPath, requirePage, pathMap, pageTree, rootPage }; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@primer/components'), require('styled-components'), require('react'), require('react-dom'), require('@githubprimer/octicons-react'), require('next/config'), require('tree-model'), require('react-measure'), require('html-2-jsx'), require('react-live'), require('prism-github/prism-github.scss'), require('prop-types'), require('next/dynamic'), require('next/link'), require('next/router'), require('path')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@primer/components', 'styled-components', 'react', 'react-dom', '@githubprimer/octicons-react', 'next/config', 'tree-model', 'react-measure', 'html-2-jsx', 'react-live', 'prism-github/prism-github.scss', 'prop-types', 'next/dynamic', 'next/link', 'next/router', 'path'], factory) : | ||
(factory((global.primer = {}),global.components,global.styled,global.React,global.ReactDOM,global.Octicon,global.getConfig,global.TreeModel,global.Measure,global.HTMLtoJSX,global.reactLive,null,global.propTypes,global.dynamic,global.NextLink,global.router,global.path)); | ||
}(this, (function (exports,components,styled,React,ReactDOM,Octicon,getConfig,TreeModel,Measure,HTMLtoJSX,reactLive,prismGithub_scss,propTypes,dynamic,NextLink,router,path) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('@primer/components'), require('@githubprimer/octicons-react'), require('next/config'), require('tree-model'), require('react-measure'), require('html-2-jsx'), require('react-live'), require('prism-github/prism-github.scss'), require('prop-types'), require('next/link'), require('styled-components'), require('next/router'), require('path')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom', '@primer/components', '@githubprimer/octicons-react', 'next/config', 'tree-model', 'react-measure', 'html-2-jsx', 'react-live', 'prism-github/prism-github.scss', 'prop-types', 'next/link', 'styled-components', 'next/router', 'path'], factory) : | ||
(factory((global.primer = {}),global.React,global.ReactDOM,global.components,global.Octicon,global.getConfig,global.TreeModel,global.Measure,global.HTMLtoJSX,global.reactLive,null,global.propTypes,global.NextLink,global.styled,global.router,global.path)); | ||
}(this, (function (exports,React,ReactDOM,components,Octicon,getConfig,TreeModel,Measure,HTMLtoJSX,reactLive,prismGithub_scss,propTypes,NextLink,styled,router,path) { 'use strict'; | ||
styled = styled && styled.hasOwnProperty('default') ? styled['default'] : styled; | ||
var React__default = 'default' in React ? React['default'] : React; | ||
@@ -16,4 +15,4 @@ var ReactDOM__default = 'default' in ReactDOM ? ReactDOM['default'] : ReactDOM; | ||
propTypes = propTypes && propTypes.hasOwnProperty('default') ? propTypes['default'] : propTypes; | ||
dynamic = dynamic && dynamic.hasOwnProperty('default') ? dynamic['default'] : dynamic; | ||
NextLink = NextLink && NextLink.hasOwnProperty('default') ? NextLink['default'] : NextLink; | ||
styled = styled && styled.hasOwnProperty('default') ? styled['default'] : styled; | ||
@@ -228,13 +227,2 @@ function _classCallCheck(instance, Constructor) { | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral(["\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
var BoxShadow = styled(components.Box)(_templateObject()); | ||
var ClipboardCopy = | ||
@@ -714,16 +702,2 @@ /*#__PURE__*/ | ||
var DetailsDialog = dynamic(function () { | ||
return import('details-dialog-element').then(function () { | ||
return React__default.createFactory('details-dialog'); | ||
}); | ||
}, { | ||
ssr: false, | ||
loadableGenerated: { | ||
webpack: function webpack() { | ||
return [require.resolveWeak('details-dialog-element')]; | ||
}, | ||
modules: ['details-dialog-element'] | ||
} | ||
}); | ||
function Link(_ref) { | ||
@@ -741,2 +715,13 @@ var href = _ref.href, | ||
function _templateObject() { | ||
var data = _taggedTemplateLiteral(["\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n"]); | ||
_templateObject = function _templateObject() { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
var BoxShadow = styled(components.Box)(_templateObject()); | ||
var HeaderText = function HeaderText(props) { | ||
@@ -1166,7 +1151,5 @@ return React__default.createElement(components.Text, _extends({ | ||
exports.BoxShadow = BoxShadow; | ||
exports.ClipboardCopy = ClipboardCopy; | ||
exports.CodeExample = CodeExample; | ||
exports.Contributors = Contributors; | ||
exports.DetailsDialog = DetailsDialog; | ||
exports.Frame = Frame; | ||
@@ -1173,0 +1156,0 @@ exports.Header = Header; |
{ | ||
"name": "@primer/blueprints", | ||
"version": "0.0.0-0ed81f6", | ||
"version": "0.0.0-16066f1", | ||
"description": "Components for GitHub Documentation Sites", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.umd.js", | ||
}, | ||
"repository": "primer/blueprints", | ||
"repository": "https://github.com/primer/blueprints", | ||
"keywords": [ | ||
@@ -20,0 +20,0 @@ "react", |
@@ -5,2 +5,5 @@ # Primer Blueprints | ||
### ⚠️⚠️⚠️ Work in progress alert!!! ⚠️⚠️⚠️ | ||
- The repository is brand new as of 2.20.19 and is still very much a work in progress. Please don't use it in production yet, you've been warned. | ||
### 👀 COMING SOON! 👀 | ||
@@ -7,0 +10,0 @@ - Utilities for building docs sites using Next.js |
@@ -1,6 +0,4 @@ | ||
export {default as BoxShadow} from './BoxShadow' | ||
export {default as ClipboardCopy} from './ClipboardCopy' | ||
export {default as CodeExample} from './CodeExample' | ||
export {default as Contributors} from './Contributors' | ||
export {default as DetailsDialog} from './DetailsDialog' | ||
export {default as Frame} from './Frame' | ||
@@ -7,0 +5,0 @@ export {default as Header} from './Header' |
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import styled from 'styled-components' | ||
import Octicon, {MarkGithub} from '@githubprimer/octicons-react' | ||
import {Text, Flex, Sticky, BorderBox, Box} from '@primer/components' | ||
import BoxShadow from './BoxShadow' | ||
import Link from './Link' | ||
const BoxShadow = styled(Box)` | ||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); | ||
` | ||
const HeaderText = props => <Text fontSize={2} {...props} /> | ||
@@ -9,0 +13,0 @@ |
@@ -31,1 +31,14 @@ import Router from 'next/router' | ||
} | ||
export function redirectTrailingSlash(context, status = 301) { | ||
const { | ||
req: {url}, | ||
res | ||
} = context | ||
if (url.endsWith('/')) { | ||
const withoutSlash = url.substr(0, url.length - 1) | ||
res.writeHead(status, {Location: withoutSlash}) | ||
res.end() | ||
return true | ||
} | ||
} |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
22
96085
22
2790