@thi.ng/api 8.0.6 → 8.3.1
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 +324 -227
- package/README.md +1 -1
- package/grid.d.ts +351 -0
- package/grid.js +1 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/mixin.d.ts +2 -2
- package/mixin.js +3 -3
- package/mixins/igrid.d.ts +17 -0
- package/mixins/igrid.js +163 -0
- package/mixins/inotify.js +1 -1
- package/package.json +225 -214
- package/typedarray.d.ts +4 -0
- package/typedarray.js +4 -0
package/package.json
CHANGED
|
@@ -1,215 +1,226 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
2
|
+
"name": "@thi.ng/api",
|
|
3
|
+
"version": "8.3.1",
|
|
4
|
+
"description": "Common, generic types, interfaces & mixins",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/api#readme",
|
|
14
|
+
"funding": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/postspectacular"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "patreon",
|
|
21
|
+
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc api decorators mixins",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
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",
|
|
33
|
+
"pub": "yarn npm publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@microsoft/api-extractor": "^7.18.19",
|
|
38
|
+
"@thi.ng/testament": "^0.2.1",
|
|
39
|
+
"rimraf": "^3.0.2",
|
|
40
|
+
"tools": "^0.0.1",
|
|
41
|
+
"typedoc": "^0.22.9",
|
|
42
|
+
"typescript": "^4.5.2"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"assert",
|
|
46
|
+
"constants",
|
|
47
|
+
"decorators",
|
|
48
|
+
"generic",
|
|
49
|
+
"interface",
|
|
50
|
+
"mixin",
|
|
51
|
+
"type",
|
|
52
|
+
"typescript"
|
|
53
|
+
],
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"browser": {
|
|
58
|
+
"process": false,
|
|
59
|
+
"setTimeout": false
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=12.7"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"*.js",
|
|
66
|
+
"*.d.ts",
|
|
67
|
+
"decorators",
|
|
68
|
+
"mixins"
|
|
69
|
+
],
|
|
70
|
+
"exports": {
|
|
71
|
+
".": {
|
|
72
|
+
"import": "./index.js"
|
|
73
|
+
},
|
|
74
|
+
"./api": {
|
|
75
|
+
"import": "./api.js"
|
|
76
|
+
},
|
|
77
|
+
"./assoc": {
|
|
78
|
+
"import": "./assoc.js"
|
|
79
|
+
},
|
|
80
|
+
"./bind": {
|
|
81
|
+
"import": "./bind.js"
|
|
82
|
+
},
|
|
83
|
+
"./buffered": {
|
|
84
|
+
"import": "./buffered.js"
|
|
85
|
+
},
|
|
86
|
+
"./clear": {
|
|
87
|
+
"import": "./clear.js"
|
|
88
|
+
},
|
|
89
|
+
"./compare": {
|
|
90
|
+
"import": "./compare.js"
|
|
91
|
+
},
|
|
92
|
+
"./contains": {
|
|
93
|
+
"import": "./contains.js"
|
|
94
|
+
},
|
|
95
|
+
"./copy": {
|
|
96
|
+
"import": "./copy.js"
|
|
97
|
+
},
|
|
98
|
+
"./decorators/configurable": {
|
|
99
|
+
"import": "./decorators/configurable.js"
|
|
100
|
+
},
|
|
101
|
+
"./decorators/deprecated": {
|
|
102
|
+
"import": "./decorators/deprecated.js"
|
|
103
|
+
},
|
|
104
|
+
"./decorators/nomixin": {
|
|
105
|
+
"import": "./decorators/nomixin.js"
|
|
106
|
+
},
|
|
107
|
+
"./decorators/sealed": {
|
|
108
|
+
"import": "./decorators/sealed.js"
|
|
109
|
+
},
|
|
110
|
+
"./deref": {
|
|
111
|
+
"import": "./deref.js"
|
|
112
|
+
},
|
|
113
|
+
"./dissoc": {
|
|
114
|
+
"import": "./dissoc.js"
|
|
115
|
+
},
|
|
116
|
+
"./empty": {
|
|
117
|
+
"import": "./empty.js"
|
|
118
|
+
},
|
|
119
|
+
"./enable": {
|
|
120
|
+
"import": "./enable.js"
|
|
121
|
+
},
|
|
122
|
+
"./equiv": {
|
|
123
|
+
"import": "./equiv.js"
|
|
124
|
+
},
|
|
125
|
+
"./event": {
|
|
126
|
+
"import": "./event.js"
|
|
127
|
+
},
|
|
128
|
+
"./fn": {
|
|
129
|
+
"import": "./fn.js"
|
|
130
|
+
},
|
|
131
|
+
"./get": {
|
|
132
|
+
"import": "./get.js"
|
|
133
|
+
},
|
|
134
|
+
"./grid": {
|
|
135
|
+
"import": "./grid.js"
|
|
136
|
+
},
|
|
137
|
+
"./hash": {
|
|
138
|
+
"import": "./hash.js"
|
|
139
|
+
},
|
|
140
|
+
"./hiccup": {
|
|
141
|
+
"import": "./hiccup.js"
|
|
142
|
+
},
|
|
143
|
+
"./id": {
|
|
144
|
+
"import": "./id.js"
|
|
145
|
+
},
|
|
146
|
+
"./indexed": {
|
|
147
|
+
"import": "./indexed.js"
|
|
148
|
+
},
|
|
149
|
+
"./into": {
|
|
150
|
+
"import": "./into.js"
|
|
151
|
+
},
|
|
152
|
+
"./keyval": {
|
|
153
|
+
"import": "./keyval.js"
|
|
154
|
+
},
|
|
155
|
+
"./length": {
|
|
156
|
+
"import": "./length.js"
|
|
157
|
+
},
|
|
158
|
+
"./meta": {
|
|
159
|
+
"import": "./meta.js"
|
|
160
|
+
},
|
|
161
|
+
"./mixin": {
|
|
162
|
+
"import": "./mixin.js"
|
|
163
|
+
},
|
|
164
|
+
"./mixins/ienable": {
|
|
165
|
+
"import": "./mixins/ienable.js"
|
|
166
|
+
},
|
|
167
|
+
"./mixins/igrid": {
|
|
168
|
+
"import": "./mixins/igrid.js"
|
|
169
|
+
},
|
|
170
|
+
"./mixins/inotify": {
|
|
171
|
+
"import": "./mixins/inotify.js"
|
|
172
|
+
},
|
|
173
|
+
"./mixins/iterable": {
|
|
174
|
+
"import": "./mixins/iterable.js"
|
|
175
|
+
},
|
|
176
|
+
"./mixins/iwatch": {
|
|
177
|
+
"import": "./mixins/iwatch.js"
|
|
178
|
+
},
|
|
179
|
+
"./null": {
|
|
180
|
+
"import": "./null.js"
|
|
181
|
+
},
|
|
182
|
+
"./object": {
|
|
183
|
+
"import": "./object.js"
|
|
184
|
+
},
|
|
185
|
+
"./path": {
|
|
186
|
+
"import": "./path.js"
|
|
187
|
+
},
|
|
188
|
+
"./predicate": {
|
|
189
|
+
"import": "./predicate.js"
|
|
190
|
+
},
|
|
191
|
+
"./prim": {
|
|
192
|
+
"import": "./prim.js"
|
|
193
|
+
},
|
|
194
|
+
"./range": {
|
|
195
|
+
"import": "./range.js"
|
|
196
|
+
},
|
|
197
|
+
"./release": {
|
|
198
|
+
"import": "./release.js"
|
|
199
|
+
},
|
|
200
|
+
"./reset": {
|
|
201
|
+
"import": "./reset.js"
|
|
202
|
+
},
|
|
203
|
+
"./select": {
|
|
204
|
+
"import": "./select.js"
|
|
205
|
+
},
|
|
206
|
+
"./seq": {
|
|
207
|
+
"import": "./seq.js"
|
|
208
|
+
},
|
|
209
|
+
"./set": {
|
|
210
|
+
"import": "./set.js"
|
|
211
|
+
},
|
|
212
|
+
"./stack": {
|
|
213
|
+
"import": "./stack.js"
|
|
214
|
+
},
|
|
215
|
+
"./tuple": {
|
|
216
|
+
"import": "./tuple.js"
|
|
217
|
+
},
|
|
218
|
+
"./typedarray": {
|
|
219
|
+
"import": "./typedarray.js"
|
|
220
|
+
},
|
|
221
|
+
"./watch": {
|
|
222
|
+
"import": "./watch.js"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"gitHead": "8bd27c8bde0b770e7c001943f11c951cd345d668\n"
|
|
226
|
+
}
|
package/typedarray.d.ts
CHANGED
|
@@ -108,6 +108,10 @@ export declare const asNativeType: (type: GLType | Type) => Type;
|
|
|
108
108
|
* @param type -
|
|
109
109
|
*/
|
|
110
110
|
export declare const asGLType: (type: GLType | Type) => GLType;
|
|
111
|
+
/**
|
|
112
|
+
* Coerces given numeric args to integer values.
|
|
113
|
+
*/
|
|
114
|
+
export declare const asInt: (...args: number[]) => number[];
|
|
111
115
|
/**
|
|
112
116
|
* Returns byte size for given {@link Type} ID or {@link GLType} enum.
|
|
113
117
|
*
|
package/typedarray.js
CHANGED
|
@@ -111,6 +111,10 @@ export const asGLType = (type) => {
|
|
|
111
111
|
const t = TYPE2GL[type];
|
|
112
112
|
return t !== undefined ? t : type;
|
|
113
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Coerces given numeric args to integer values.
|
|
116
|
+
*/
|
|
117
|
+
export const asInt = (...args) => args.map((x) => x | 0);
|
|
114
118
|
/**
|
|
115
119
|
* Returns byte size for given {@link Type} ID or {@link GLType} enum.
|
|
116
120
|
*
|