@thi.ng/layout 3.1.35 → 3.2.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-07-21T08:21:58Z
3
+ - **Last updated**: 2025-07-22T10:52:52Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
11
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
12
  and/or version bumps of transitive dependencies.
13
13
 
14
+ ## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/layout@3.2.0) (2025-07-22)
15
+
16
+ #### 🚀 Features
17
+
18
+ - add `.height` getter ([a0188a6](https://github.com/thi-ng/umbrella/commit/a0188a6))
19
+
14
20
  ### [3.1.11](https://github.com/thi-ng/umbrella/tree/@thi.ng/layout@3.1.11) (2025-01-14)
15
21
 
16
22
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -74,7 +74,7 @@ For Node.js REPL:
74
74
  const l = await import("@thi.ng/layout");
75
75
  ```
76
76
 
77
- Package sizes (brotli'd, pre-treeshake): ESM: 1.19 KB
77
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.21 KB
78
78
 
79
79
  ## Dependencies
80
80
 
@@ -176,7 +176,7 @@ writeFileSync(
176
176
  g.asSvg(
177
177
  g.svgDoc(
178
178
  {
179
- __bleed: 10,
179
+ __margin: 10,
180
180
  font: "12px Menlo, monospace",
181
181
  align: "center",
182
182
  baseline: "middle",
@@ -273,7 +273,7 @@ writeFileSync(
273
273
  g.asSvg(
274
274
  g.svgDoc(
275
275
  {
276
- __bleed: 10,
276
+ __margin: 10,
277
277
  font: "12px Menlo, monospace",
278
278
  align: "center",
279
279
  baseline: "middle",
package/grid-layout.d.ts CHANGED
@@ -16,6 +16,7 @@ export declare class GridLayout implements IGridLayout<GridLayout> {
16
16
  protected currRow: number;
17
17
  protected rows: number;
18
18
  constructor(parent: GridLayout | null, x: number, y: number, width: number, cols: number, rowH: number, gap: number);
19
+ get height(): number;
19
20
  colsForWidth(w: number): number;
20
21
  rowsForHeight(h: number): number;
21
22
  spanForSize(size: ArrayLike<number>): CellSpan;
package/grid-layout.js CHANGED
@@ -29,6 +29,9 @@ class GridLayout {
29
29
  this.currRow = 0;
30
30
  this.rows = 0;
31
31
  }
32
+ get height() {
33
+ return this.y + this.rows * this.cellHG;
34
+ }
32
35
  colsForWidth(w) {
33
36
  return Math.ceil(w / this.cellWG);
34
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/layout",
3
- "version": "3.1.35",
3
+ "version": "3.2.0",
4
4
  "description": "Configurable nested 2D grid layout generators",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -98,5 +98,5 @@
98
98
  ],
99
99
  "year": 2019
100
100
  },
101
- "gitHead": "11747c482773d3da03c8b7848b25a56251ccd759\n"
101
+ "gitHead": "802e34c5e0786adcae538011713171232693b031\n"
102
102
  }