@thi.ng/layout 3.0.1 → 3.0.3

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**: 2023-10-30T14:31:56Z
3
+ - **Last updated**: 2023-11-09T10:28:19Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.0.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/layout@3.0.2) (2023-11-09)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
17
+
12
18
  # [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/layout@3.0.0) (2023-10-30)
13
19
 
14
20
  #### 🛑 Breaking changes
package/README.md CHANGED
@@ -64,7 +64,7 @@ For Node.js REPL:
64
64
  const layout = await import("@thi.ng/layout");
65
65
  ```
66
66
 
67
- Package sizes (brotli'd, pre-treeshake): ESM: 1.01 KB
67
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.19 KB
68
68
 
69
69
  ## Dependencies
70
70
 
package/grid-layout.js CHANGED
@@ -2,6 +2,19 @@ import { isNumber } from "@thi.ng/checks/is-number";
2
2
  /** @internal */
3
3
  export const __DEFAULT_SPANS = [1, 1];
4
4
  export class GridLayout {
5
+ parent;
6
+ cols;
7
+ width;
8
+ x;
9
+ y;
10
+ cellW;
11
+ cellH;
12
+ cellWG;
13
+ cellHG;
14
+ gap;
15
+ currCol;
16
+ currRow;
17
+ rows;
5
18
  constructor(parent, x, y, width, cols, rowH, gap) {
6
19
  this.parent = parent;
7
20
  this.cols = cols;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/layout",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Configurable nested 2D grid layout generators",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,21 +28,20 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
29
29
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && tools:readme",
32
- "doc:stats": "tools:module-stats",
31
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
33
32
  "pub": "yarn npm publish --access public",
34
- "test": "testament test"
33
+ "test": "bun test"
35
34
  },
36
35
  "dependencies": {
37
- "@thi.ng/arrays": "^2.7.2",
38
- "@thi.ng/checks": "^3.4.6"
36
+ "@thi.ng/arrays": "^2.7.4",
37
+ "@thi.ng/checks": "^3.4.8"
39
38
  },
40
39
  "devDependencies": {
41
- "@microsoft/api-extractor": "^7.38.0",
42
- "@thi.ng/testament": "^0.3.24",
40
+ "@microsoft/api-extractor": "^7.38.2",
41
+ "@thi.ng/testament": "^0.4.1",
43
42
  "rimraf": "^5.0.5",
44
43
  "tools": "^0.0.1",
45
- "typedoc": "^0.25.2",
44
+ "typedoc": "^0.25.3",
46
45
  "typescript": "^5.2.2"
47
46
  },
48
47
  "keywords": [
@@ -93,5 +92,5 @@
93
92
  ],
94
93
  "year": 2019
95
94
  },
96
- "gitHead": "336bd1bf95825b3c318a3ab49c54451c94aaa883\n"
95
+ "gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
97
96
  }
package/stacked-layout.js CHANGED
@@ -14,9 +14,10 @@ import { GridLayout, __DEFAULT_SPANS } from "./grid-layout.js";
14
14
  * otherwise unintended overlaps will occur.
15
15
  */
16
16
  export class StackedLayout extends GridLayout {
17
+ offsets;
18
+ currSpan = 1;
17
19
  constructor(parent, x, y, width, cols, rowH, gap) {
18
20
  super(parent, x, y, width, cols, rowH, gap);
19
- this.currSpan = 1;
20
21
  this.offsets = new Uint32Array(cols);
21
22
  }
22
23
  nest(cols, spans, gap = this.gap) {