@venizia/ardor 0.4.8-4 → 0.4.8-5
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/README.md +1 -1
- package/dist/presets/app/preset.json +8 -8
- package/dist/presets/lib/preset.json +6 -6
- package/dist/testing.d.ts +1 -23
- package/dist/testing.js +2 -50
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ export const Orders = () => {
|
|
|
38
38
|
## Subpaths
|
|
39
39
|
|
|
40
40
|
- `@venizia/ardor/repository` - `HttpRepository` and the datasource settings; needs the optional peer `@venizia/ignis-connectors`.
|
|
41
|
-
- `@venizia/ardor/testing` - `assertArdorApplicationBoots` and `
|
|
41
|
+
- `@venizia/ardor/testing` - `assertArdorApplicationBoots` and fakes of `ResizeObserver`, `IntersectionObserver`, `matchMedia`, storage and the clipboard, for your test suite.
|
|
42
42
|
- `@venizia/ardor/vite` - `buildInfoFile`, a Vite plugin that writes the build info file; needs the optional peers `@venizia/ignis-boot` and `vite`.
|
|
43
43
|
|
|
44
44
|
## Quick start
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@reduxjs/toolkit": "^2.13.0",
|
|
15
15
|
"@tanstack/react-query": "^5.104.5",
|
|
16
|
-
"@venizia/ardor": "0.4.8-
|
|
17
|
-
"@venizia/ignis-connectors": "0.4.8-
|
|
16
|
+
"@venizia/ardor": "0.4.8-5",
|
|
17
|
+
"@venizia/ignis-connectors": "0.4.8-4",
|
|
18
18
|
"@venizia/ignis-filter": "0.4.7-2",
|
|
19
|
-
"@venizia/ignis-helpers": "0.4.8-
|
|
19
|
+
"@venizia/ignis-helpers": "0.4.8-4",
|
|
20
20
|
"@venizia/ignis-inversion": "0.4.7-2",
|
|
21
|
-
"@venizia/ignis-kernel": "0.4.8-
|
|
21
|
+
"@venizia/ignis-kernel": "0.4.8-4",
|
|
22
22
|
"class-variance-authority": "^0.7.1",
|
|
23
23
|
"clsx": "^2.1.1",
|
|
24
24
|
"ra-core": "^5.15.5",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/react": "^19",
|
|
37
37
|
"@types/react-dom": "^19",
|
|
38
38
|
"@venizia/dev-configs": "0.4.8-2",
|
|
39
|
-
"@venizia/ignis-boot": "0.4.8-
|
|
39
|
+
"@venizia/ignis-boot": "0.4.8-4",
|
|
40
40
|
"@vitejs/plugin-react": "^6.1.2",
|
|
41
41
|
"eslint": "^10.13.0",
|
|
42
42
|
"oxlint": "1.89.0",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peers": {
|
|
49
49
|
"@venizia/dev-configs": "^0.4.0 || ^0.4.8-0",
|
|
50
|
-
"@venizia/ignis-connectors": "^0.4.8-
|
|
50
|
+
"@venizia/ignis-connectors": "^0.4.8-4",
|
|
51
51
|
"@venizia/ignis-filter": "^0.4.7-2",
|
|
52
|
-
"@venizia/ignis-helpers": "^0.4.8-
|
|
52
|
+
"@venizia/ignis-helpers": "^0.4.8-4",
|
|
53
53
|
"@venizia/ignis-inversion": "^0.4.7-2",
|
|
54
|
-
"@venizia/ignis-kernel": "^0.4.8-
|
|
54
|
+
"@venizia/ignis-kernel": "^0.4.8-4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"server:dev": "vite --config .configs/builders/vite.config.mts",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@types/bun": "^1.4.3",
|
|
7
7
|
"@types/react": "^19",
|
|
8
|
-
"@venizia/ardor": "^0.4.8-
|
|
8
|
+
"@venizia/ardor": "^0.4.8-5",
|
|
9
9
|
"@venizia/dev-configs": "0.4.8-2",
|
|
10
|
-
"@venizia/ignis-boot": "0.4.8-
|
|
11
|
-
"@venizia/ignis-connectors": "0.4.8-
|
|
10
|
+
"@venizia/ignis-boot": "0.4.8-4",
|
|
11
|
+
"@venizia/ignis-connectors": "0.4.8-4",
|
|
12
12
|
"@venizia/ignis-filter": "0.4.7-2",
|
|
13
|
-
"@venizia/ignis-helpers": "0.4.8-
|
|
13
|
+
"@venizia/ignis-helpers": "0.4.8-4",
|
|
14
14
|
"@venizia/ignis-inversion": "0.4.7-2",
|
|
15
|
-
"@venizia/ignis-kernel": "0.4.8-
|
|
15
|
+
"@venizia/ignis-kernel": "0.4.8-4",
|
|
16
16
|
"eslint": "^10.13.0",
|
|
17
17
|
"oxlint": "1.89.0",
|
|
18
18
|
"oxlint-tsgolint": "7.0.2004",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typescript": "^6.0.3"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@venizia/ardor": "^0.4.8-
|
|
26
|
+
"@venizia/ardor": "^0.4.8-5",
|
|
27
27
|
"react": "^19.3.1",
|
|
28
28
|
"react-dom": "^19.3.1",
|
|
29
29
|
"react-router-dom": "^7.18.4",
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as inversion from '@venizia/ignis-inversion';
|
|
2
2
|
import { type BaseArdorApplication } from '@venizia/ardor-kernel';
|
|
3
|
+
export * from '@venizia/ardor-kernel/testing';
|
|
3
4
|
/** A class (matched exactly), a class name, or a binding key; the shape the shared core takes. */
|
|
4
5
|
export type TBootSkip = inversion.TBindingSkip;
|
|
5
6
|
/** What `assertArdorApplicationBoots` leaves out, which locale it loads, and when an empty application passes. */
|
|
@@ -36,27 +37,4 @@ export interface IAssertArdorApplicationBootsOptions {
|
|
|
36
37
|
* build a new one (pass a factory) for each call.
|
|
37
38
|
*/
|
|
38
39
|
export declare const assertArdorApplicationBoots: <Application extends BaseArdorApplication>(application: Application | (() => Application | Promise<Application>), options?: IAssertArdorApplicationBootsOptions) => Promise<Application>;
|
|
39
|
-
/**
|
|
40
|
-
* A `ResizeObserver` for a test host whose own `observe()` does nothing, such as happy-dom. Call
|
|
41
|
-
* `FakeResizeObserver.install()` before the code under test creates its observer, and `flush` to
|
|
42
|
-
* deliver a size. A callback runs at once; code that waits for an animation frame still needs the
|
|
43
|
-
* test's own frame control.
|
|
44
|
-
*/
|
|
45
|
-
export declare class FakeResizeObserver implements ResizeObserver {
|
|
46
|
-
private readonly callback;
|
|
47
|
-
private static readonly all;
|
|
48
|
-
private readonly targets;
|
|
49
|
-
constructor(callback: ResizeObserverCallback);
|
|
50
|
-
/** Replaces `globalThis.ResizeObserver` with the fake. The returned function puts the previous one back. */
|
|
51
|
-
static install(): () => void;
|
|
52
|
-
/** Calls every observer of `element` with one entry of that size, for the content and the border box alike. */
|
|
53
|
-
static flush(opts: {
|
|
54
|
-
element: Element;
|
|
55
|
-
width: number;
|
|
56
|
-
height: number;
|
|
57
|
-
}): void;
|
|
58
|
-
observe(target: Element): void;
|
|
59
|
-
unobserve(target: Element): void;
|
|
60
|
-
disconnect(): void;
|
|
61
|
-
}
|
|
62
40
|
//# sourceMappingURL=testing.d.ts.map
|
package/dist/testing.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as inversion from '@venizia/ignis-inversion';
|
|
2
2
|
import { ApplicationProviders, Features } from '@venizia/ardor-admin';
|
|
3
3
|
import { CoreBindings } from '@venizia/ardor-kernel';
|
|
4
|
+
// The browser fakes live in the kernel, so the React and admin tests can use them without a cycle.
|
|
5
|
+
export * from '@venizia/ardor-kernel/testing';
|
|
4
6
|
/** The namespaces ARDOR binds its stereotyped classes under; the check resolves each binding of them. */
|
|
5
7
|
const VERIFIED_NAMESPACES = [
|
|
6
8
|
'services',
|
|
@@ -73,54 +75,4 @@ export const assertArdorApplicationBoots = async (application, options = {}) =>
|
|
|
73
75
|
}
|
|
74
76
|
return target;
|
|
75
77
|
};
|
|
76
|
-
/**
|
|
77
|
-
* A `ResizeObserver` for a test host whose own `observe()` does nothing, such as happy-dom. Call
|
|
78
|
-
* `FakeResizeObserver.install()` before the code under test creates its observer, and `flush` to
|
|
79
|
-
* deliver a size. A callback runs at once; code that waits for an animation frame still needs the
|
|
80
|
-
* test's own frame control.
|
|
81
|
-
*/
|
|
82
|
-
export class FakeResizeObserver {
|
|
83
|
-
static { this.all = new Set(); }
|
|
84
|
-
constructor(callback) {
|
|
85
|
-
this.callback = callback;
|
|
86
|
-
this.targets = new Set();
|
|
87
|
-
FakeResizeObserver.all.add(this);
|
|
88
|
-
}
|
|
89
|
-
/** Replaces `globalThis.ResizeObserver` with the fake. The returned function puts the previous one back. */
|
|
90
|
-
static install() {
|
|
91
|
-
const previous = globalThis.ResizeObserver;
|
|
92
|
-
FakeResizeObserver.all.clear();
|
|
93
|
-
globalThis.ResizeObserver = FakeResizeObserver;
|
|
94
|
-
return () => {
|
|
95
|
-
globalThis.ResizeObserver = previous;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
/** Calls every observer of `element` with one entry of that size, for the content and the border box alike. */
|
|
99
|
-
static flush(opts) {
|
|
100
|
-
const { element, width, height } = opts;
|
|
101
|
-
const box = { x: 0, y: 0, width, height, top: 0, left: 0, right: width, bottom: height };
|
|
102
|
-
const size = [{ inlineSize: width, blockSize: height }];
|
|
103
|
-
const entry = {
|
|
104
|
-
target: element,
|
|
105
|
-
contentRect: { ...box, toJSON: () => box },
|
|
106
|
-
contentBoxSize: size,
|
|
107
|
-
borderBoxSize: size,
|
|
108
|
-
devicePixelContentBoxSize: [],
|
|
109
|
-
};
|
|
110
|
-
for (const observer of FakeResizeObserver.all) {
|
|
111
|
-
if (observer.targets.has(element)) {
|
|
112
|
-
observer.callback([entry], observer);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
observe(target) {
|
|
117
|
-
this.targets.add(target);
|
|
118
|
-
}
|
|
119
|
-
unobserve(target) {
|
|
120
|
-
this.targets.delete(target);
|
|
121
|
-
}
|
|
122
|
-
disconnect() {
|
|
123
|
-
this.targets.clear();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
78
|
//# sourceMappingURL=testing.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ardor",
|
|
3
|
-
"version": "0.4.8-
|
|
3
|
+
"version": "0.4.8-5",
|
|
4
4
|
"description": "ARDOR - frontend application framework for the VENIZIA family. One entry point over ardor-kernel, ardor-react and ardor-admin: IGNIS inversion of control, a REST data layer, auth and i18n providers, and the React bindings for a react-admin application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ardor",
|
|
@@ -79,21 +79,21 @@
|
|
|
79
79
|
"prepublishOnly": "make rebuild"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@venizia/ardor-admin": "0.4.8-
|
|
83
|
-
"@venizia/ardor-kernel": "0.4.8-
|
|
84
|
-
"@venizia/ardor-react": "0.4.8-
|
|
82
|
+
"@venizia/ardor-admin": "0.4.8-5",
|
|
83
|
+
"@venizia/ardor-kernel": "0.4.8-5",
|
|
84
|
+
"@venizia/ardor-react": "0.4.8-5"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@size-limit/preset-small-lib": "^14.2.0",
|
|
88
88
|
"@types/bun": "^1.4.3",
|
|
89
89
|
"@types/node": "^25.0.10",
|
|
90
90
|
"@venizia/dev-configs": "^0.4.8-2",
|
|
91
|
-
"@venizia/ignis-boot": "^0.4.8-
|
|
92
|
-
"@venizia/ignis-connectors": "^0.4.8-
|
|
91
|
+
"@venizia/ignis-boot": "^0.4.8-4",
|
|
92
|
+
"@venizia/ignis-connectors": "^0.4.8-4",
|
|
93
93
|
"@venizia/ignis-filter": "^0.4.7-2",
|
|
94
|
-
"@venizia/ignis-helpers": "^0.4.8-
|
|
94
|
+
"@venizia/ignis-helpers": "^0.4.8-4",
|
|
95
95
|
"@venizia/ignis-inversion": "^0.4.7-2",
|
|
96
|
-
"@venizia/ignis-kernel": "^0.4.8-
|
|
96
|
+
"@venizia/ignis-kernel": "^0.4.8-4",
|
|
97
97
|
"eslint": "^10.13.0",
|
|
98
98
|
"oxlint": "1.89.0",
|
|
99
99
|
"oxlint-tsgolint": "7.0.2004",
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@reduxjs/toolkit": ">=2.13.0",
|
|
107
107
|
"@tanstack/react-query": ">=5.104.5",
|
|
108
|
-
"@venizia/ignis-boot": "^0.4.8-
|
|
109
|
-
"@venizia/ignis-connectors": "^0.4.8-
|
|
108
|
+
"@venizia/ignis-boot": "^0.4.8-4",
|
|
109
|
+
"@venizia/ignis-connectors": "^0.4.8-4",
|
|
110
110
|
"@venizia/ignis-filter": "^0.4.7-2",
|
|
111
|
-
"@venizia/ignis-helpers": "^0.4.8-
|
|
111
|
+
"@venizia/ignis-helpers": "^0.4.8-4",
|
|
112
112
|
"@venizia/ignis-inversion": "^0.4.7-2",
|
|
113
|
-
"@venizia/ignis-kernel": "^0.4.8-
|
|
113
|
+
"@venizia/ignis-kernel": "^0.4.8-4",
|
|
114
114
|
"ra-core": ">=5.15.5",
|
|
115
115
|
"ra-i18n-polyglot": ">=5.15.5",
|
|
116
116
|
"react": ">=19.3.1",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"react-router-dom",
|
|
175
175
|
"reflect-metadata"
|
|
176
176
|
],
|
|
177
|
-
"limit": "
|
|
177
|
+
"limit": "1050 B"
|
|
178
178
|
}
|
|
179
179
|
],
|
|
180
180
|
"engines": {
|