@symbo.ls/scratch 2.11.523 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/factory.js +106 -51
- package/dist/cjs/index.js +366 -423
- package/dist/cjs/set.js +304 -321
- package/dist/cjs/system/color.js +231 -181
- package/dist/cjs/system/document.js +198 -121
- package/dist/cjs/system/font.js +199 -127
- package/dist/cjs/system/index.js +308 -325
- package/dist/cjs/system/reset.js +205 -135
- package/dist/cjs/system/shadow.js +247 -212
- package/dist/cjs/system/spacing.js +215 -153
- package/dist/cjs/system/svg.js +203 -132
- package/dist/cjs/system/theme.js +243 -206
- package/dist/cjs/system/timing.js +206 -138
- package/dist/cjs/system/typography.js +212 -148
- package/dist/cjs/transforms/index.js +285 -268
- package/dist/cjs/utils/color.js +93 -85
- package/dist/cjs/utils/font.js +3 -6
- package/dist/cjs/utils/index.js +236 -193
- package/dist/cjs/utils/sequence.js +206 -99
- package/dist/cjs/utils/sprite.js +106 -51
- package/dist/cjs/utils/theme.js +3 -6
- package/dist/cjs/utils/var.js +196 -83
- package/package.json +4 -4
- package/src/system/svg.js +1 -1
- package/src/transforms/index.js +9 -2
- package/src/utils/color.js +1 -2
- package/src/utils/sequence.js +1 -1
package/src/system/svg.js
CHANGED
package/src/transforms/index.js
CHANGED
|
@@ -139,8 +139,15 @@ export const transformSize = (propertyName, val, props = {}, opts = {}) => {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
export const transformSizeRatio = (propertyName, props) => {
|
|
143
|
-
return transformSize(propertyName,
|
|
142
|
+
export const transformSizeRatio = (propertyName, val = null, props) => {
|
|
143
|
+
return transformSize(propertyName, val, props, {
|
|
144
144
|
ratio: true
|
|
145
145
|
})
|
|
146
146
|
}
|
|
147
|
+
|
|
148
|
+
export const transformBorderRadius = (radius, props, propertyName) => {
|
|
149
|
+
if (!isString(radius)) return
|
|
150
|
+
return {
|
|
151
|
+
borderRadius: radius.split(' ').map((v, k) => getSpacingBasedOnRatio(props, propertyName, v)[propertyName]).join(' ')
|
|
152
|
+
}
|
|
153
|
+
}
|
package/src/utils/color.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { document, window } from '@domql/
|
|
4
|
-
import { isString, isNumber } from '@domql/utils'
|
|
3
|
+
import { document, window, isString, isNumber } from '@domql/utils'
|
|
5
4
|
const ENV = process.env.NODE_ENV
|
|
6
5
|
|
|
7
6
|
export const colorStringToRgbaArray = color => {
|
package/src/utils/sequence.js
CHANGED
|
@@ -170,7 +170,7 @@ export const generateSequence = (sequenceProps) => {
|
|
|
170
170
|
|
|
171
171
|
export const generateSequencePosition = (sequenceProps, position = 0) => {
|
|
172
172
|
const { type, base, ratio, subSequence } = sequenceProps
|
|
173
|
-
const letterKey = isString
|
|
173
|
+
const letterKey = this.call("isString", position) ? position : numToLetterMap[position]
|
|
174
174
|
|
|
175
175
|
if (!letterKey) {
|
|
176
176
|
console.warn(`Position ${position} is out of range in numToLetterMap`)
|