@homebound/truss 1.135.0 → 1.136.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.
@@ -1,2 +1,3 @@
1
1
  import { CreateMethodsFn } from "../../config";
2
+ /** Adds abbreviations like `tiny` -> `12px` or `tiny` -> `{ fontSize: 12px, fontWeight: ... }`. */
2
3
  export declare const typeScale: CreateMethodsFn;
@@ -15,18 +15,28 @@ var __read = (this && this.__read) || function (o, n) {
15
15
  }
16
16
  return ar;
17
17
  };
18
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
20
+ if (ar || !(i in from)) {
21
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
22
+ ar[i] = from[i];
23
+ }
24
+ }
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
+ };
18
27
  Object.defineProperty(exports, "__esModule", { value: true });
19
28
  exports.typeScale = void 0;
20
29
  var methods_1 = require("../../methods");
30
+ /** Adds abbreviations like `tiny` -> `12px` or `tiny` -> `{ fontSize: 12px, fontWeight: ... }`. */
21
31
  var typeScale = function (_a) {
22
32
  var fonts = _a.fonts;
23
- return Object.entries(fonts).map(function (_a) {
33
+ return __spreadArray([], __read(Object.entries(fonts).map(function (_a) {
24
34
  var _b = __read(_a, 2), abbr = _b[0], defs = _b[1];
25
35
  if (typeof defs === "string") {
26
36
  return (0, methods_1.newMethod)(abbr, { fontSize: defs });
27
37
  }
28
38
  return (0, methods_1.newMethod)(abbr, defs);
29
- });
39
+ })), false);
30
40
  };
31
41
  exports.typeScale = typeScale;
32
42
  //# sourceMappingURL=typeScale.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeScale.js","sourceRoot":"","sources":["../../../src/sections/tachyons/typeScale.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,yCAAwC;AAGjC,IAAM,SAAS,GAAoB,UAAC,EAAS;QAAP,KAAK,WAAA;IAChD,OAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,UAAC,EAAY;YAAZ,KAAA,aAAY,EAAX,IAAI,QAAA,EAAE,IAAI,QAAA;QACpC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,OAAO,IAAA,mBAAS,EAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;SAC5C;QACD,OAAO,IAAA,mBAAS,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC;AALF,CAKE,CAAC;AANQ,QAAA,SAAS,aAMjB"}
1
+ {"version":3,"file":"typeScale.js","sourceRoot":"","sources":["../../../src/sections/tachyons/typeScale.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2E;AAG3E,mGAAmG;AAC5F,IAAM,SAAS,GAAoB,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,gCACpD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,UAAC,EAAY;YAAZ,KAAA,aAAY,EAAX,IAAI,QAAA,EAAE,IAAI,QAAA;QACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,OAAO,IAAA,mBAAS,EAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;SAC5C;QACD,OAAO,IAAA,mBAAS,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC;AANqD,CAOxD,CAAC;AAPW,QAAA,SAAS,aAOpB"}
@@ -1,9 +1,34 @@
1
1
  "use strict";
2
+ var __read = (this && this.__read) || function (o, n) {
3
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4
+ if (!m) return o;
5
+ var i = m.call(o), r, ar = [], e;
6
+ try {
7
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
+ }
9
+ catch (error) { e = { error: error }; }
10
+ finally {
11
+ try {
12
+ if (r && !r.done && (m = i["return"])) m.call(i);
13
+ }
14
+ finally { if (e) throw e.error; }
15
+ }
16
+ return ar;
17
+ };
18
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
20
+ if (ar || !(i in from)) {
21
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
22
+ ar[i] = from[i];
23
+ }
24
+ }
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
+ };
2
27
  Object.defineProperty(exports, "__esModule", { value: true });
3
28
  exports.typography = void 0;
4
29
  var methods_1 = require("../../methods");
5
30
  // See typeScale for the FontConfig.fonts handling
6
- var typography = function () { return [
31
+ var typography = function () { return __spreadArray(__spreadArray([
7
32
  (0, methods_1.newMethod)("measure", { maxWidth: "30em" }),
8
33
  (0, methods_1.newMethod)("measureWide", { maxWidth: "34em" }),
9
34
  (0, methods_1.newMethod)("measureNarrow", { maxWidth: "20em" }),
@@ -17,8 +42,7 @@ var typography = function () { return [
17
42
  whiteSpace: "nowrap",
18
43
  overflow: "hidden",
19
44
  textOverflow: "ellipsis",
20
- }),
21
- (0, methods_1.newParamMethod)("lh", "lineHeight"),
22
- ]; };
45
+ })
46
+ ], __read((0, methods_1.newMethodsForProp)("fontSize", {}, "fs", true)), false), __read((0, methods_1.newMethodsForProp)("lineHeight", {}, "lh", true)), false); };
23
47
  exports.typography = typography;
24
48
  //# sourceMappingURL=typography.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../src/sections/tachyons/typography.ts"],"names":[],"mappings":";;;AAAA,yCAAwD;AAGxD,kDAAkD;AAE3C,IAAM,UAAU,GAAoB,cAAM,OAAA;IAC/C,IAAA,mBAAS,EAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC1C,IAAA,mBAAS,EAAC,aAAa,EAAE,EAAE,QAAQ,EAA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zB,CAAC;UAGC,IAAA,2BAAiB,EAAC,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,kBAC7C,IAAA,2BAAiB,EAAC,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,WAlBH,CAmBhD,CAAC;AAnBW,QAAA,UAAU,cAmBrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/truss",
3
- "version": "1.135.0",
3
+ "version": "1.136.0",
4
4
  "main": "build/index.js",
5
5
  "bin": "cli.js",
6
6
  "scripts": {