jscrewit 2.30.0 → 2.33.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/Features.md +9 -3
- package/JScrewIt.html +1 -1
- package/api-doc/.nojekyll +1 -0
- package/api-doc/README.md +18 -19
- package/api-doc/interfaces/CustomFeature.md +1 -1
- package/api-doc/interfaces/ElementaryFeature.md +1 -1
- package/api-doc/interfaces/EncodeOptions.md +1 -1
- package/api-doc/interfaces/Feature.md +3 -2
- package/api-doc/interfaces/FeatureAll.md +121 -99
- package/api-doc/interfaces/FeatureConstructor.md +142 -112
- package/api-doc/interfaces/PredefinedFeature.md +1 -1
- package/lib/encode.d.ts +2 -2
- package/lib/feature-all.d.ts +45 -28
- package/lib/feature.d.ts +19 -20
- package/lib/jscrewit.js +1770 -2133
- package/lib/jscrewit.min.js +2 -2
- package/package.json +5 -1
- package/readme.md +2 -2
- package/ui/ui.js +1 -1
package/lib/feature.d.ts
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { ElementaryFeatureName, FeatureAll, PredefinedFeatureName } from './feature-all';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* An array containing any number of feature objects or names or aliases of predefined features, in
|
|
5
|
-
* no particular order.
|
|
6
|
-
*
|
|
7
|
-
* All of the specified features need to be compatible, so that their union can be constructed.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
*
|
|
11
|
-
* Methods that accept parameters of this type throw an error if the specified features are not
|
|
12
|
-
* mutually compatible.
|
|
13
|
-
*/
|
|
14
|
-
export type CompatibleFeatureArray = readonly FeatureElement[];
|
|
15
|
-
|
|
16
3
|
export interface CustomFeature extends Feature
|
|
17
4
|
{
|
|
18
5
|
readonly elementary: false;
|
|
@@ -43,7 +30,8 @@ export interface ElementaryFeature extends PredefinedFeature
|
|
|
43
30
|
* elementary features.
|
|
44
31
|
* Two of the predefined composite features are particularly important: <code>[[DEFAULT]]</code> is
|
|
45
32
|
* the empty feature, indicating that no elementary feature is available at all;
|
|
46
|
-
* <code>[[AUTO]]</code> is the union of all elementary features available in the current
|
|
33
|
+
* <code>[[AUTO]]</code> is the union of all elementary features available in the current
|
|
34
|
+
* environment.
|
|
47
35
|
*
|
|
48
36
|
* Not all features can be available at the same time: some features are necessarily incompatible,
|
|
49
37
|
* meaning that they mutually exclude each other, and thus their union cannot be constructed.
|
|
@@ -80,7 +68,7 @@ export interface Feature
|
|
|
80
68
|
* `true` if this feature object includes all of the specified features; otherwise, `false`.
|
|
81
69
|
* If no arguments are specified, the return value is `true`.
|
|
82
70
|
*/
|
|
83
|
-
includes(...features:
|
|
71
|
+
includes(...features: FeatureElementOrCompatibleArray[]): boolean;
|
|
84
72
|
|
|
85
73
|
/**
|
|
86
74
|
* Creates a new feature object from this feature by removing elementary features that are not
|
|
@@ -154,7 +142,7 @@ export interface FeatureConstructor extends FeatureAll
|
|
|
154
142
|
*
|
|
155
143
|
* An error is thrown if any of the specified features are not mutually compatible.
|
|
156
144
|
*/
|
|
157
|
-
(...features:
|
|
145
|
+
(...features: FeatureElementOrCompatibleArray[]): CustomFeature;
|
|
158
146
|
|
|
159
147
|
/**
|
|
160
148
|
* An immutable mapping of all predefined feature objects accessed by name or alias.
|
|
@@ -207,7 +195,7 @@ export interface FeatureConstructor extends FeatureAll
|
|
|
207
195
|
*
|
|
208
196
|
* An error is thrown if any of the specified features are not mutually compatible.
|
|
209
197
|
*/
|
|
210
|
-
new (...features:
|
|
198
|
+
new (...features: FeatureElementOrCompatibleArray[]): CustomFeature;
|
|
211
199
|
|
|
212
200
|
/**
|
|
213
201
|
* Determines whether the specified features are mutually compatible.
|
|
@@ -254,7 +242,7 @@ export interface FeatureConstructor extends FeatureAll
|
|
|
254
242
|
* JScrewIt.Feature.areEqual("DEFAULT", [])
|
|
255
243
|
* ```
|
|
256
244
|
*/
|
|
257
|
-
areEqual(...features:
|
|
245
|
+
areEqual(...features: FeatureElementOrCompatibleArray[]): boolean;
|
|
258
246
|
|
|
259
247
|
/**
|
|
260
248
|
* Creates a new feature object equivalent to the intersection of the specified features.
|
|
@@ -279,8 +267,7 @@ export interface FeatureConstructor extends FeatureAll
|
|
|
279
267
|
* const newFeature = JScrewIt.Feature.commonOf("HTMLDOCUMENT", "DOCUMENT");
|
|
280
268
|
* ```
|
|
281
269
|
*/
|
|
282
|
-
commonOf(...features:
|
|
283
|
-
CustomFeature | null;
|
|
270
|
+
commonOf(...features: FeatureElementOrCompatibleArray[]): CustomFeature | null;
|
|
284
271
|
|
|
285
272
|
/**
|
|
286
273
|
* Returns a short description of a predefined feature in plain English.
|
|
@@ -310,6 +297,18 @@ export interface FeatureConstructor extends FeatureAll
|
|
|
310
297
|
*/
|
|
311
298
|
export type FeatureElement = Feature | keyof FeatureAll;
|
|
312
299
|
|
|
300
|
+
/**
|
|
301
|
+
* A feature object, a name or alias of a predefined feature, or an array of such values that
|
|
302
|
+
* defines a union of mutually compatible features.
|
|
303
|
+
*
|
|
304
|
+
* @remarks
|
|
305
|
+
*
|
|
306
|
+
* Methods that accept parameters of this type throw an error if the specified value is neither a
|
|
307
|
+
* feature object nor a name or alias of a predefined feature, or if it is an array of values that
|
|
308
|
+
* does not define a union of mutually compatible features.
|
|
309
|
+
*/
|
|
310
|
+
export type FeatureElementOrCompatibleArray = FeatureElement | readonly FeatureElement[];
|
|
311
|
+
|
|
313
312
|
export interface PredefinedFeature extends Feature
|
|
314
313
|
{
|
|
315
314
|
readonly name: PredefinedFeatureName;
|