@thi.ng/layout 3.1.15 → 3.1.17

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-01-29T16:25:48Z
3
+ - **Last updated**: 2025-02-19T20:59:58Z
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.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 201 standalone projects, maintained as part
10
+ > This is one of 202 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/api.d.ts CHANGED
@@ -17,13 +17,13 @@ export interface LayoutBox {
17
17
  */
18
18
  h: number;
19
19
  /**
20
- * Single cell column width (always w/o col span), based on
21
- * layout's available space and configured number of columns.
20
+ * Single cell column width (always w/o col span), based on layout's
21
+ * available space and configured number of columns.
22
22
  */
23
23
  cw: number;
24
24
  /**
25
- * Single cell row height (always same as `rowHeight` arg given to
26
- * layout ctor).
25
+ * Single cell row height (always same as `rowHeight` arg given to layout
26
+ * ctor).
27
27
  */
28
28
  ch: number;
29
29
  /**
@@ -59,33 +59,31 @@ export interface IGridLayout<T extends IGridLayout<T>> extends ILayout<CellSpan,
59
59
  */
60
60
  rowsForHeight(height: number): number;
61
61
  /**
62
- * Calculates the required number of columns & rows for the given
63
- * size.
62
+ * Calculates the required number of columns & rows for the given size.
64
63
  *
65
64
  * @param size -
66
65
  */
67
66
  spanForSize(size: ArrayLike<number>): CellSpan;
68
67
  spanForSize(w: number, h: number): CellSpan;
69
68
  /**
70
- * Returns a squared {@link LayoutBox} based on this layout's column
71
- * width. This box will consume `ceil(columnWidth / rowHeight)`
72
- * rows, but the returned box height might be less to satisfy the
73
- * square constraint.
69
+ * Returns a squared {@link LayoutBox} based on this layout's column width.
70
+ * This box will consume `ceil(columnWidth / rowHeight)` rows, but the
71
+ * returned box height might be less to satisfy the square constraint.
74
72
  */
75
73
  nextSquare(): LayoutBox;
76
74
  /**
77
- * Requests a `spans` sized cell from this layout (via `.next()`)
78
- * and creates and returns a new child {@link GridLayout} for the returned
79
- * box / grid cell. This child layout is configured to use `cols`
80
- * columns and shares same `gap` as this (parent) layout. The
81
- * configured row span only acts as initial minimum vertical space
82
- * reseervation, but is allowed to grow and if needed will propagate
83
- * the new space requirements to parent layouts.
75
+ * Requests a `spans` sized cell from this layout (via `.next()`) and
76
+ * creates and returns a new child {@link GridLayout} for the returned box /
77
+ * grid cell. This child layout is configured to use `cols` columns and
78
+ * shares same `gap` as this (parent) layout. The configured row span only
79
+ * acts as initial minimum vertical space reseervation, but is allowed to
80
+ * grow and if needed will propagate the new space requirements to parent
81
+ * layouts.
84
82
  *
85
- * Note: this size child-parent size propagation ONLY works until
86
- * the next cell is requested from any parent. IOW, child layouts
87
- * MUST be completed/populated first before continuing with
88
- * siblings/ancestors of this current layout.
83
+ * Note: this size child-parent size propagation ONLY works until the next
84
+ * cell is requested from any parent. IOW, child layouts MUST be
85
+ * completed/populated first before continuing with siblings/ancestors of
86
+ * this current layout.
89
87
  *
90
88
  * ```
91
89
  * import { gridLayout } from "@thi.ng/layout";
@@ -110,7 +108,7 @@ export interface IGridLayout<T extends IGridLayout<T>> extends ILayout<CellSpan,
110
108
  * ```
111
109
  *
112
110
  * @param cols - columns in nested layout
113
- * @param spans - default [1, 1] (i.e. size of single cell)
111
+ * @param spans - default `[1,1]` (i.e. size of single cell)
114
112
  * @param gap - gap for child layout
115
113
  */
116
114
  nest(cols: number, spans?: CellSpan, gap?: number): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/layout",
3
- "version": "3.1.15",
3
+ "version": "3.1.17",
4
4
  "description": "Configurable nested 2D grid layout generators",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,13 +39,13 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.11.19",
43
- "@thi.ng/arrays": "^2.10.14",
44
- "@thi.ng/checks": "^3.6.22"
42
+ "@thi.ng/api": "^8.11.21",
43
+ "@thi.ng/arrays": "^2.10.16",
44
+ "@thi.ng/checks": "^3.6.24"
45
45
  },
46
46
  "devDependencies": {
47
- "esbuild": "^0.24.2",
48
- "typedoc": "^0.27.6",
47
+ "esbuild": "^0.25.0",
48
+ "typedoc": "^0.27.7",
49
49
  "typescript": "^5.7.3"
50
50
  },
51
51
  "keywords": [
@@ -98,5 +98,5 @@
98
98
  ],
99
99
  "year": 2019
100
100
  },
101
- "gitHead": "fc1d498e8d4b690db873c30cc594352a804e7a65\n"
101
+ "gitHead": "bee617702ac61d093465b967f8f973dc566faa6b\n"
102
102
  }