@thi.ng/hdom-components 5.1.151 → 5.1.153
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 +1 -1
- package/README.md +1 -1
- package/package.json +10 -10
- package/pager.d.ts +16 -17
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/hdom-components",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.153",
|
|
4
4
|
"description": "Raw, skinnable UI & SVG components for @thi.ng/hdom",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.11.
|
|
43
|
-
"@thi.ng/canvas": "^1.0.
|
|
44
|
-
"@thi.ng/checks": "^3.6.
|
|
45
|
-
"@thi.ng/math": "^5.11.
|
|
46
|
-
"@thi.ng/transducers": "^9.2.
|
|
47
|
-
"@thi.ng/transducers-stats": "^2.2.
|
|
42
|
+
"@thi.ng/api": "^8.11.21",
|
|
43
|
+
"@thi.ng/canvas": "^1.0.7",
|
|
44
|
+
"@thi.ng/checks": "^3.6.24",
|
|
45
|
+
"@thi.ng/math": "^5.11.21",
|
|
46
|
+
"@thi.ng/transducers": "^9.2.19",
|
|
47
|
+
"@thi.ng/transducers-stats": "^2.2.13"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"esbuild": "^0.
|
|
51
|
-
"typedoc": "^0.27.
|
|
50
|
+
"esbuild": "^0.25.0",
|
|
51
|
+
"typedoc": "^0.27.7",
|
|
52
52
|
"typescript": "^5.7.3"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"status": "beta",
|
|
113
113
|
"year": 2018
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "bee617702ac61d093465b967f8f973dc566faa6b\n"
|
|
116
116
|
}
|
package/pager.d.ts
CHANGED
|
@@ -70,35 +70,34 @@ export interface PagerOpts {
|
|
|
70
70
|
labelNext?: any;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
|
-
* Higher order container component for paged navigation buttons. The
|
|
74
|
-
*
|
|
73
|
+
* Higher order container component for paged navigation buttons. The returned
|
|
74
|
+
* component function takes these arguments:
|
|
75
75
|
*
|
|
76
76
|
* - `ctx` - hdom context object
|
|
77
77
|
* - `id` - current page ID (zero-based)
|
|
78
78
|
* - `numItems` - current number of items
|
|
79
79
|
* - `pageLen` - number of items per page (only used for calculation)
|
|
80
|
-
* - `maxButtons` - number of page buttons to show (default: 5). If
|
|
81
|
-
*
|
|
80
|
+
* - `maxButtons` - number of page buttons to show (default: 5). If zero, only
|
|
81
|
+
* the prev / next and first / last buttons will be shown.
|
|
82
82
|
*
|
|
83
|
-
* If there are more pages than the specified number, only the
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* indicates button group boundaries):
|
|
83
|
+
* If there are more pages than the specified number, only the neighboring page
|
|
84
|
+
* IDs (relative to the current page) are shown. E.g. If there are 10 pages, the
|
|
85
|
+
* current page ID is 5 and 3 visible page buttons then the pager will look like
|
|
86
|
+
* this (the `|` character here indicates button group boundaries):
|
|
88
87
|
*
|
|
89
|
-
* ```text
|
|
88
|
+
* ```text noweb:no
|
|
90
89
|
* << < | 4 5 6 | > >>
|
|
91
90
|
* ```
|
|
92
91
|
*
|
|
93
|
-
* Providing `pageLen` and `maxButtons` as arguments allows to
|
|
94
|
-
*
|
|
95
|
-
*
|
|
92
|
+
* Providing `pageLen` and `maxButtons` as arguments allows to dynamically
|
|
93
|
+
* control the number of page buttons at runtime, e.g. in response to window
|
|
94
|
+
* resizing.
|
|
96
95
|
*
|
|
97
96
|
* Yields a component of page buttons and prev / next and first / last
|
|
98
|
-
* navigation buttons. The actual button and button group components are
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
97
|
+
* navigation buttons. The actual button and button group components are defined
|
|
98
|
+
* via the user supplied options. The first / prev and next / last nav buttons
|
|
99
|
+
* are paired within inner `div` elements (one per pair) and can be styled (or
|
|
100
|
+
* hidden) separately.
|
|
102
101
|
*
|
|
103
102
|
* ```ts
|
|
104
103
|
* import { pager } from "@thi.ng/hdom-components";
|