@tstdl/base 0.84.5 → 0.84.6
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/browser/document-controller.d.ts +1 -1
- package/browser/document-controller.js +1 -1
- package/browser/page-controller.d.ts +1 -1
- package/browser/page-controller.js +1 -1
- package/package.json +1 -1
- package/signals/api.d.ts +1 -0
- package/signals/api.js +1 -18
- package/signals/computed-with-dependencies.d.ts +2 -0
- package/signals/computed-with-dependencies.js +36 -0
- package/signals/implementation/computed.d.ts +0 -1
- package/signals/implementation/computed.js +1 -8
- package/signals/implementation/configure.d.ts +1 -0
- package/signals/implementation/configure.js +38 -0
- package/signals/implementation/index.d.ts +1 -0
- package/signals/implementation/index.js +1 -0
- package/signals/index.d.ts +1 -0
- package/signals/index.js +1 -0
|
@@ -21,6 +21,6 @@ export declare class DocumentController extends LocatorController {
|
|
|
21
21
|
waitForLoadState(...args: Parameters<Page['waitForLoadState']>): Promise<void>;
|
|
22
22
|
waitForUrl(...args: Parameters<Page['waitForURL']>): Promise<void>;
|
|
23
23
|
waitForElement(selector: string, options?: Parameters<Page['waitForSelector']>[1]): Promise<ElementHandle>;
|
|
24
|
-
|
|
24
|
+
locateInFrame(frameSelector: string): LocatorController;
|
|
25
25
|
waitForFrame(selector: string, options?: Parameters<Page['waitForSelector']>[1]): Promise<FrameController>;
|
|
26
26
|
}
|
|
@@ -61,7 +61,7 @@ class DocumentController extends import_locator_controller.LocatorController {
|
|
|
61
61
|
}
|
|
62
62
|
return element;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
locateInFrame(frameSelector) {
|
|
65
65
|
const locator = this.document.frameLocator(frameSelector);
|
|
66
66
|
return new import_locator_controller.LocatorController(locator, this.elementControllerOptions);
|
|
67
67
|
}
|
|
@@ -23,7 +23,7 @@ export declare class PageController extends DocumentController implements AsyncD
|
|
|
23
23
|
* @param frameSelector frame name, url or url predicate
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
frame(frameSelector: Parameters<Page['frame']>[0]): FrameController;
|
|
27
27
|
renderPdf(options?: PdfRenderOptions & Abortable): Promise<Uint8Array>;
|
|
28
28
|
renderPdfStream(options?: PdfRenderOptions & Abortable): ReadableStream<Uint8Array>;
|
|
29
29
|
}
|
|
@@ -59,7 +59,7 @@ class PageController extends import_document_controller.DocumentController {
|
|
|
59
59
|
* @param frameSelector frame name, url or url predicate
|
|
60
60
|
* @returns
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
frame(frameSelector) {
|
|
63
63
|
const frame = this.page.frame(frameSelector);
|
|
64
64
|
if ((0, import_type_guards.isNull)(frame)) {
|
|
65
65
|
throw new Error("Frame not found.");
|
package/package.json
CHANGED
package/signals/api.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export declare let computed: typeof Types.computed;
|
|
|
12
12
|
export declare let effect: typeof Types.effect;
|
|
13
13
|
export declare let untracked: typeof Types.untracked;
|
|
14
14
|
export declare let isSignal: typeof Types.isSignal;
|
|
15
|
+
export declare function configureSignals(configuration: SignalsConfiguration): void;
|
package/signals/api.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,25 +15,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var api_exports = {};
|
|
30
20
|
__export(api_exports, {
|
|
31
21
|
computed: () => computed,
|
|
22
|
+
configureSignals: () => configureSignals,
|
|
32
23
|
effect: () => effect,
|
|
33
24
|
isSignal: () => isSignal,
|
|
34
25
|
signal: () => signal,
|
|
35
26
|
untracked: () => untracked
|
|
36
27
|
});
|
|
37
28
|
module.exports = __toCommonJS(api_exports);
|
|
38
|
-
var AngularCore = __toESM(require("@angular/core"), 1);
|
|
39
29
|
let signal;
|
|
40
30
|
let computed;
|
|
41
31
|
let effect;
|
|
@@ -48,10 +38,3 @@ function configureSignals(configuration) {
|
|
|
48
38
|
untracked = configuration.untracked;
|
|
49
39
|
isSignal = configuration.isSignal;
|
|
50
40
|
}
|
|
51
|
-
configureSignals({
|
|
52
|
-
signal: AngularCore.signal,
|
|
53
|
-
computed: AngularCore.computed,
|
|
54
|
-
effect: AngularCore.effect,
|
|
55
|
-
untracked: AngularCore.untracked,
|
|
56
|
-
isSignal: AngularCore.isSignal
|
|
57
|
-
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var computed_with_dependencies_exports = {};
|
|
20
|
+
__export(computed_with_dependencies_exports, {
|
|
21
|
+
computedWithDependencies: () => computedWithDependencies
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(computed_with_dependencies_exports);
|
|
24
|
+
var import_api = require("./api.js");
|
|
25
|
+
function computedWithDependencies(computation, dependencies, options = {}) {
|
|
26
|
+
if (dependencies.length == 0) {
|
|
27
|
+
throw new Error("No additional dependencies provided.");
|
|
28
|
+
}
|
|
29
|
+
function actualComputation() {
|
|
30
|
+
for (const dependency of dependencies) {
|
|
31
|
+
dependency();
|
|
32
|
+
}
|
|
33
|
+
return computation();
|
|
34
|
+
}
|
|
35
|
+
return (0, import_api.computed)(actualComputation, options);
|
|
36
|
+
}
|
|
@@ -16,7 +16,6 @@ export interface CreateComputedOptions<T> {
|
|
|
16
16
|
* A comparison function which defines equality for computed values.
|
|
17
17
|
*/
|
|
18
18
|
equal?: ValueEqualityFn<T>;
|
|
19
|
-
additionalDependencies?: Signal<any>[];
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Create a computed `Signal` which derives a reactive value from an expression.
|
|
@@ -21,7 +21,6 @@ __export(computed_exports, {
|
|
|
21
21
|
computed: () => computed
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(computed_exports);
|
|
24
|
-
var import_type_guards = require("../../utils/type-guards.js");
|
|
25
24
|
var import_api = require("./api.js");
|
|
26
25
|
var import_graph = require("./graph.js");
|
|
27
26
|
/**
|
|
@@ -32,13 +31,7 @@ var import_graph = require("./graph.js");
|
|
|
32
31
|
* found in the LICENSE file at https://angular.io/license
|
|
33
32
|
*/
|
|
34
33
|
function computed(computation, options = {}) {
|
|
35
|
-
const
|
|
36
|
-
for (const dependency of options.additionalDependencies) {
|
|
37
|
-
dependency();
|
|
38
|
-
}
|
|
39
|
-
return computation();
|
|
40
|
-
};
|
|
41
|
-
const node = new ComputedImpl(actualComputation, options.equal ?? import_api.defaultEquals);
|
|
34
|
+
const node = new ComputedImpl(computation, options.equal ?? import_api.defaultEquals);
|
|
42
35
|
return (0, import_api.createSignalFromFunction)(node, node.signal.bind(node));
|
|
43
36
|
}
|
|
44
37
|
const UNSET = Symbol("UNSET");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function configureDefaultSignalsImplementation(): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var configure_exports = {};
|
|
20
|
+
__export(configure_exports, {
|
|
21
|
+
configureDefaultSignalsImplementation: () => configureDefaultSignalsImplementation
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(configure_exports);
|
|
24
|
+
var import_api = require("../api.js");
|
|
25
|
+
var import_api2 = require("./api.js");
|
|
26
|
+
var import_computed = require("./computed.js");
|
|
27
|
+
var import_effect = require("./effect.js");
|
|
28
|
+
var import_signal = require("./signal.js");
|
|
29
|
+
var import_untracked = require("./untracked.js");
|
|
30
|
+
function configureDefaultSignalsImplementation() {
|
|
31
|
+
(0, import_api.configureSignals)({
|
|
32
|
+
signal: import_signal.signal,
|
|
33
|
+
computed: import_computed.computed,
|
|
34
|
+
effect: import_effect.effect,
|
|
35
|
+
untracked: import_untracked.untracked,
|
|
36
|
+
isSignal: import_api2.isSignal
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -17,6 +17,7 @@ var implementation_exports = {};
|
|
|
17
17
|
module.exports = __toCommonJS(implementation_exports);
|
|
18
18
|
__reExport(implementation_exports, require("./api.js"), module.exports);
|
|
19
19
|
__reExport(implementation_exports, require("./computed.js"), module.exports);
|
|
20
|
+
__reExport(implementation_exports, require("./configure.js"), module.exports);
|
|
20
21
|
__reExport(implementation_exports, require("./effect.js"), module.exports);
|
|
21
22
|
__reExport(implementation_exports, require("./graph.js"), module.exports);
|
|
22
23
|
__reExport(implementation_exports, require("./signal.js"), module.exports);
|
package/signals/index.d.ts
CHANGED
package/signals/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
var signals_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(signals_exports);
|
|
18
18
|
__reExport(signals_exports, require("./api.js"), module.exports);
|
|
19
|
+
__reExport(signals_exports, require("./computed-with-dependencies.js"), module.exports);
|
|
19
20
|
__reExport(signals_exports, require("./pipe.js"), module.exports);
|
|
20
21
|
__reExport(signals_exports, require("./to-observable.js"), module.exports);
|
|
21
22
|
__reExport(signals_exports, require("./to-signal.js"), module.exports);
|