@thi.ng/hdom-components 5.1.119 → 5.1.121

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**: 2024-05-08T18:24:32Z
3
+ - **Last updated**: 2024-06-29T09:28:36Z
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,13 @@ 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
+ ### [5.1.120](https://github.com/thi-ng/umbrella/tree/@thi.ng/hdom-components@5.1.120) (2024-06-21)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - rename various rest args to be more semantically meaningful ([8088a56](https://github.com/thi-ng/umbrella/commit/8088a56))
17
+ - enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
18
+
12
19
  ### [5.1.116](https://github.com/thi-ng/umbrella/tree/@thi.ng/hdom-components@5.1.116) (2024-04-20)
13
20
 
14
21
  #### ♻️ Refactoring
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 192 standalone projects, maintained as part
10
+ > This is one of 189 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
  >
@@ -68,7 +68,7 @@ Browser ESM import:
68
68
 
69
69
  [JSDelivr documentation](https://www.jsdelivr.com/)
70
70
 
71
- Package sizes (brotli'd, pre-treeshake): ESM: 2.05 KB
71
+ Package sizes (brotli'd, pre-treeshake): ESM: 2.06 KB
72
72
 
73
73
  ## Dependencies
74
74
 
package/button-group.js CHANGED
@@ -2,32 +2,32 @@ import { mergeAttribs } from "./utils/merge-attribs.js";
2
2
  const buttonGroup = (opts) => (_, args, ...buttons) => [
3
3
  "div",
4
4
  mergeAttribs(opts.attribs, args.attribs),
5
- ...groupBody(opts, args.disabled, buttons)
5
+ ...__groupBody(opts, args.disabled, buttons)
6
6
  ];
7
- const groupBody = (opts, disabled, buttons) => {
7
+ const __groupBody = (opts, disabled, buttons) => {
8
8
  switch (buttons.length) {
9
9
  case 0:
10
10
  return [];
11
11
  case 1:
12
- return [bt(opts.inner || opts.first, disabled, buttons[0])];
12
+ return [__bt(opts.inner || opts.first, disabled, buttons[0])];
13
13
  case 2:
14
14
  return [
15
- bt(opts.first, disabled, buttons[0]),
16
- bt(opts.last || opts.first, disabled, buttons[1])
15
+ __bt(opts.first, disabled, buttons[0]),
16
+ __bt(opts.last || opts.first, disabled, buttons[1])
17
17
  ];
18
18
  default: {
19
- const res = [bt(opts.first, disabled, buttons[0])];
19
+ const res = [__bt(opts.first, disabled, buttons[0])];
20
20
  const el = opts.inner || opts.first;
21
21
  const n = buttons.length - 1;
22
22
  for (let i = 1; i < n; i++) {
23
- res[i] = bt(el, disabled, buttons[i]);
23
+ res[i] = __bt(el, disabled, buttons[i]);
24
24
  }
25
- res[n] = bt(opts.last || opts.first, disabled, buttons[n]);
25
+ res[n] = __bt(opts.last || opts.first, disabled, buttons[n]);
26
26
  return res;
27
27
  }
28
28
  }
29
29
  };
30
- const bt = (el, disabled, bt2) => disabled ? [el, { ...bt2[0], disabled: true }, ...bt2.slice(1)] : [el, ...bt2];
30
+ const __bt = (el, disabled, bt) => disabled ? [el, { ...bt[0], disabled: true }, ...bt.slice(1)] : [el, ...bt];
31
31
  export {
32
32
  buttonGroup
33
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hdom-components",
3
- "version": "5.1.119",
3
+ "version": "5.1.121",
4
4
  "description": "Raw, skinnable UI & SVG components for @thi.ng/hdom",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/hdom-components#readme",
13
+ "homepage": "https://thi.ng/hdom-components",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -36,18 +36,18 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.11.2",
40
- "@thi.ng/canvas": "^0.2.19",
41
- "@thi.ng/checks": "^3.6.4",
42
- "@thi.ng/math": "^5.10.13",
43
- "@thi.ng/transducers": "^9.0.5",
44
- "@thi.ng/transducers-stats": "^2.1.118"
39
+ "@thi.ng/api": "^8.11.4",
40
+ "@thi.ng/canvas": "^0.2.21",
41
+ "@thi.ng/checks": "^3.6.6",
42
+ "@thi.ng/math": "^5.11.1",
43
+ "@thi.ng/transducers": "^9.0.7",
44
+ "@thi.ng/transducers-stats": "^2.1.120"
45
45
  },
46
46
  "devDependencies": {
47
- "@microsoft/api-extractor": "^7.43.2",
48
- "esbuild": "^0.21.1",
47
+ "@microsoft/api-extractor": "^7.47.0",
48
+ "esbuild": "^0.21.5",
49
49
  "typedoc": "^0.25.13",
50
- "typescript": "^5.4.5"
50
+ "typescript": "^5.5.2"
51
51
  },
52
52
  "keywords": [
53
53
  "browser",
@@ -110,5 +110,5 @@
110
110
  "status": "beta",
111
111
  "year": 2018
112
112
  },
113
- "gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
113
+ "gitHead": "7b950c112fba0b2e7c450765b15624c3382f1354\n"
114
114
  }
package/pager.js CHANGED
@@ -25,7 +25,7 @@ const pager = (_opts) => {
25
25
  opts.groupPages,
26
26
  map(
27
27
  (i) => bt(i, id, maxID, i + 1, i === id),
28
- pageRange(id, maxID, maxBts)
28
+ __pageRange(id, maxID, maxBts)
29
29
  )
30
30
  ],
31
31
  [
@@ -42,7 +42,7 @@ const pager = (_opts) => {
42
42
  ];
43
43
  };
44
44
  };
45
- const pageRange = (id, maxID, maxBt) => {
45
+ const __pageRange = (id, maxID, maxBt) => {
46
46
  if (maxID > maxBt - 1) {
47
47
  const from = Math.max(
48
48
  Math.min(id - (maxBt >> 1), maxID - maxBt + 1),
@@ -4,9 +4,9 @@
4
4
  * present). Returns merged result object.
5
5
  *
6
6
  * @param base - base attribs
7
- * @param xs - overrides
7
+ * @param attribs - overrides
8
8
  *
9
9
  * @internal
10
10
  */
11
- export declare const mergeAttribs: (base: any, xs: any) => any;
11
+ export declare const mergeAttribs: (base: any, attribs: any) => any;
12
12
  //# sourceMappingURL=merge-attribs.d.ts.map
@@ -1,8 +1,8 @@
1
- const mergeAttribs = (base, xs) => {
2
- if (!xs) return base;
3
- const res = { ...base, ...xs };
4
- base.class && xs.class && (res.class = base.class + " " + xs.class);
5
- base.style && xs.style && (res.style = { ...base.style, ...xs.style });
1
+ const mergeAttribs = (base, attribs) => {
2
+ if (!attribs) return base;
3
+ const res = { ...base, ...attribs };
4
+ base.class && attribs.class && (res.class = base.class + " " + attribs.class);
5
+ base.style && attribs.style && (res.style = { ...base.style, ...attribs.style });
6
6
  return res;
7
7
  };
8
8
  export {