@sanity/demo
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0
@@ -18,5 +18,8 @@ /** @alpha */ | ||
/** @alpha */ | ||
/** | ||
* The Sanity spacing scale. | ||
* @alpha | ||
*/ | ||
export declare const space: number[] | ||
export {} |
@@ -9,2 +9,4 @@ import { black, white, hues } from '@sanity/color'; | ||
} | ||
const _round = num => num.toFixed(7).replace(/(\.[0-9]+?)0+$/, "$1").replace(/\.0$/, ""); | ||
const _rem = px => "".concat(_round(px / 16), "rem"); | ||
const theme = { | ||
@@ -38,4 +40,4 @@ extend: { | ||
"--tw-prose-code": black.hex, | ||
"--tw-prose-pre-code": black.hex, | ||
"--tw-prose-pre-bg": "transparent", | ||
"--tw-prose-pre-code": white.hex, | ||
"--tw-prose-pre-bg": black.hex, | ||
"--tw-prose-th-borders": black.hex, | ||
@@ -55,7 +57,46 @@ "--tw-prose-td-borders": black.hex, | ||
"--tw-prose-invert-code": white.hex, | ||
"--tw-prose-invert-pre-code": white.hex, | ||
"--tw-prose-invert-pre-bg": "transparent", | ||
"--tw-prose-invert-pre-code": black.hex, | ||
"--tw-prose-invert-pre-bg": white.hex, | ||
"--tw-prose-invert-th-borders": white.hex, | ||
"--tw-prose-invert-td-borders": white.hex | ||
"--tw-prose-invert-td-borders": white.hex, | ||
blockquote: { | ||
fontWeight: "inherit", | ||
fontStyle: "normal" | ||
} | ||
} | ||
}, | ||
sm: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]) | ||
} | ||
} | ||
}, | ||
base: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]) | ||
} | ||
} | ||
}, | ||
lg: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]) | ||
} | ||
} | ||
}, | ||
xl: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]) | ||
} | ||
} | ||
}, | ||
"2xl": { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]) | ||
} | ||
} | ||
} | ||
@@ -62,0 +103,0 @@ } |
{ | ||
"type": "module", | ||
"name": "@sanity/demo", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0", | ||
"description": "Design tokens for implementing demos and templates at Sanity.io.", | ||
@@ -34,3 +34,3 @@ "files": [ | ||
"build": "rimraf dist && pkg build --strict", | ||
"dev": "pnpm --filter *-docs dev", | ||
"dev": "pnpm build && pnpm --filter *-docs dev", | ||
"format": "prettier --write --cache --ignore-unknown .", | ||
@@ -37,0 +37,0 @@ "lint": "eslint . --ext .cjs,.js,.jsx,.mjs,.ts,.tsx", |
@@ -17,3 +17,6 @@ /** @alpha */ | ||
/** @alpha */ | ||
/** | ||
* The Sanity spacing scale. | ||
* @alpha | ||
*/ | ||
export const space = [0, 4, 8, 12, 20, 32, 52, 84, 136, 220] |
@@ -9,2 +9,10 @@ import {ColorTints, black, hues, white} from '@sanity/color' | ||
const _round = (num: number) => | ||
num | ||
.toFixed(7) | ||
.replace(/(\.[0-9]+?)0+$/, '$1') | ||
.replace(/\.0$/, '') | ||
const _rem = (px: number) => `${_round(px / 16)}rem` | ||
// const em = (px, base) => `${round(px / base)}em` | ||
/** @alpha */ | ||
@@ -39,4 +47,4 @@ export const theme: Partial<ThemeConfig & {extend: Partial<ThemeConfig>}> = { | ||
'--tw-prose-code': black.hex, | ||
'--tw-prose-pre-code': black.hex, | ||
'--tw-prose-pre-bg': 'transparent', | ||
'--tw-prose-pre-code': white.hex, | ||
'--tw-prose-pre-bg': black.hex, | ||
'--tw-prose-th-borders': black.hex, | ||
@@ -56,8 +64,49 @@ '--tw-prose-td-borders': black.hex, | ||
'--tw-prose-invert-code': white.hex, | ||
'--tw-prose-invert-pre-code': white.hex, | ||
'--tw-prose-invert-pre-bg': 'transparent', | ||
'--tw-prose-invert-pre-code': black.hex, | ||
'--tw-prose-invert-pre-bg': white.hex, | ||
'--tw-prose-invert-th-borders': white.hex, | ||
'--tw-prose-invert-td-borders': white.hex, | ||
blockquote: { | ||
fontWeight: 'inherit', | ||
fontStyle: 'normal', | ||
}, | ||
}, | ||
}, | ||
sm: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]), | ||
}, | ||
}, | ||
}, | ||
base: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]), | ||
}, | ||
}, | ||
}, | ||
lg: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]), | ||
}, | ||
}, | ||
}, | ||
xl: { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]), | ||
}, | ||
}, | ||
}, | ||
'2xl': { | ||
css: { | ||
pre: { | ||
borderRadius: _rem(radius[2]), | ||
}, | ||
}, | ||
}, | ||
}, | ||
@@ -64,0 +113,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
40910
487
1
62