@codecademy/variance 0.21.2 → 0.21.3-alpha.23ec48.0

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/core.js CHANGED
@@ -10,7 +10,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
10
10
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
11
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
12
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13
- import { get, identity, isArray, isObject, isUndefined, merge } from 'lodash';
13
+ import get from 'lodash/get';
14
+ import identity from 'lodash/identity';
15
+ import isArray from 'lodash/isArray';
16
+ import isObject from 'lodash/isObject';
17
+ import isUndefined from 'lodash/isUndefined';
18
+ import merge from 'lodash/merge';
14
19
  import { createScaleLookup } from './scales/createScaleLookup';
15
20
  import { getStaticCss } from './utils/getStaticProperties';
16
21
  import { orderPropNames } from './utils/propNames';
@@ -10,7 +10,8 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
10
10
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
11
11
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
12
12
  function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
13
- import { mapValues, merge } from 'lodash';
13
+ import mapValues from 'lodash/mapValues';
14
+ import merge from 'lodash/merge';
14
15
  import { flattenScale } from '../utils/flattenScale';
15
16
  import { serializeTokens } from '../utils/serializeTokens';
16
17
  var _theme = new WeakMap();
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { mapValues } from 'lodash';
7
+ import mapValues from 'lodash/mapValues';
8
8
  import { createTheme } from './createTheme';
9
9
  describe('createTheme', function () {
10
10
  var base = {
@@ -1,4 +1,7 @@
1
- import { get, isArray, isObject, isString } from 'lodash';
1
+ import get from 'lodash/get';
2
+ import isArray from 'lodash/isArray';
3
+ import isObject from 'lodash/isObject';
4
+ import isString from 'lodash/isString';
2
5
  export var createScaleLookup = function createScaleLookup(scale) {
3
6
  if (isString(scale)) {
4
7
  return function (val, props) {
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { isNumber } from 'lodash';
7
+ import isNumber from 'lodash/isNumber';
8
8
  export var percentageOrAbsolute = function percentageOrAbsolute(coordinate) {
9
9
  if (coordinate === 0) {
10
10
  return coordinate;
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { isObject } from 'lodash';
7
+ import isObject from 'lodash/isObject';
8
8
 
9
9
  /**
10
10
  * Returns an exhaustive list of all possible paths of an object T for keys K.
@@ -1,4 +1,5 @@
1
- import { keys, pick } from 'lodash';
1
+ import keys from 'lodash/keys';
2
+ import pick from 'lodash/pick';
2
3
  export var getStaticCss = function getStaticCss(props, filteredKeys) {
3
4
  return pick(props, keys(props).filter(function (key) {
4
5
  return !filteredKeys.includes(key);
@@ -10,7 +10,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
10
10
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
12
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
- import { intersection, omit } from 'lodash';
13
+ import intersection from 'lodash/intersection';
14
+ import omit from 'lodash/omit';
14
15
  var BREAKPOINT_KEYS = ['_', 'xs', 'sm', 'md', 'lg', 'xl'];
15
16
 
16
17
  /**
@@ -4,7 +4,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
4
4
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
5
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
- import { isObject, merge } from 'lodash';
7
+ import isObject from 'lodash/isObject';
8
+ import merge from 'lodash/merge';
8
9
  var templateBreakpoints = function templateBreakpoints(value, alias, theme) {
9
10
  if (isObject(value)) {
10
11
  var _ = value._,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/variance",
3
3
  "description": "Constraint based CSS in JS for building scalable design systems",
4
- "version": "0.21.2",
4
+ "version": "0.21.3-alpha.23ec48.0",
5
5
  "author": "codecaaron <aaron@codecademy.com>",
6
6
  "dependencies": {
7
7
  "csstype": "^3.0.7",
@@ -32,5 +32,5 @@
32
32
  "build": "nx build @codecademy/variance"
33
33
  },
34
34
  "types": "dist/index.d.ts",
35
- "gitHead": "211364c302abe4d75af11ecabd79c9507284abdc"
35
+ "gitHead": "29b47abfe37fa9c6870fcd4543d8a6549c889cf9"
36
36
  }