Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@symbo.ls/scratch

Package Overview
Dependencies
Maintainers
3
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbo.ls/scratch - npm Package Compare versions

Comparing version 0.2.27 to 0.2.28

4

package.json

@@ -5,3 +5,3 @@ {

"author": "Symbols",
"version": "0.2.27",
"version": "0.2.28",
"files": [

@@ -11,3 +11,3 @@ "src"

"repository": "https://github.com/rackai/scratch",
"main": "dist/index.js",
"main": "src/index.js",
"publishConfig": {},

@@ -14,0 +14,0 @@ "dependencies": {

'use strict'
import { FONT_FAMILY, THEME, TYPOGRAPHY } from '.'
import { merge } from '../utils'
export const DOCUMENT = {
export const DOCUMENT = {}
export const applyDocument = () => merge(DOCUMENT, {
theme: THEME.document,

@@ -10,2 +13,2 @@ fontFamily: FONT_FAMILY[Object.keys(FONT_FAMILY)[0]],

lineHeight: TYPOGRAPHY.styles.lineHeight
}
})

@@ -9,3 +9,3 @@ 'use strict'

type: 'spacing',
ratio: SEQUENCE['phi'],
ratio: SEQUENCE.phi,
range: [-5, +7],

@@ -17,3 +17,5 @@ subSequence: true,

generateSequence(defaultProps)
export const applySpacingSequence = () => {
generateSequence(defaultProps)
}

@@ -20,0 +22,0 @@ const getSequence = (props) => {

@@ -20,10 +20,12 @@ 'use strict'

generateSequence(defaultProps)
export const applyTypographySequence = () => {
generateSequence(defaultProps)
if (defaultProps.h1Matches) {
var HEADINGS = findHeadings(defaultProps)
const { styles } = defaultProps
for (const k in HEADINGS) {
styles[`h${parseInt(k) + 1}`] = {
fontSize: `${HEADINGS[k].scaling}em`
if (defaultProps.h1Matches) {
const HEADINGS = findHeadings(defaultProps)
const { styles } = defaultProps
for (const k in HEADINGS) {
styles[`h${parseInt(k) + 1}`] = {
fontSize: `${HEADINGS[k].scaling}em`
}
}

@@ -30,0 +32,0 @@ }

@@ -5,3 +5,3 @@ 'use strict'

var create = (what, params, preset) => {
const create = (what, params, preset) => {
base[what] = preset(params)

@@ -8,0 +8,0 @@ }

'use strict'
var global = ''
const global = ''
export default global
'use strict'
import { applyDocument, applySpacingSequence, applyTypographySequence } from '../config'
import CONFIG, { CSS_VARS } from '../factory'
// import { FONT, FONT_FAMILY_TYPES } from '../config'
import {

@@ -90,7 +90,6 @@ isArray,

const { THEME } = CONFIG
// console.log('theme', THEME, CONFIG)
if (isObjectLike(value) && value[1]) {
const themeName = value[0]
const subThemeName = value[1]
console.log(THEME)
console.log(themeName)
const { helpers, variants, state } = THEME[themeName]

@@ -201,2 +200,6 @@ if (variants && variants[subThemeName]) return getThemeValue(variants[subThemeName])

const setTypography = (val, key) => {
return val
}
export const SETTERS = {

@@ -207,3 +210,4 @@ color: setColor,

font_family: setFontFamily,
theme: setTheme
theme: setTheme,
typography: setTypography
}

@@ -231,2 +235,3 @@

keys.map(key => setValue(FACTORY_NAME, props[key], key))
return CONFIG[FACTORY_NAME]

@@ -239,2 +244,8 @@ }

keys.map(key => setEach(key, config[key]))
// apply generic configs
applyTypographySequence()
applySpacingSequence()
applyDocument()
return CONFIG

@@ -241,0 +252,0 @@ }

'use strict'
import * as CONFIG from './config'
import { merge } from './utils'
export const RESET = {
export const RESET = {}
export const applyReset = () => merge(RESET, {
html: {
position: 'fixed',
position: 'absolute',
overflow: 'hidden',

@@ -18,3 +21,3 @@ width: '100%',

fontSize: CONFIG.TYPOGRAPHY.default / CONFIG.DOCUMENT.fontSize + CONFIG.UNIT.default,
fontSize: CONFIG.DOCUMENT.fontSize / CONFIG.TYPOGRAPHY.default + CONFIG.UNIT.default,
lineHeight: CONFIG.DOCUMENT.lineHeight

@@ -25,3 +28,4 @@ },

boxSizing: 'border-box',
height: '100%'
height: '100%',
margin: 0
},

@@ -37,2 +41,2 @@

}
}
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc