@ksp-gonogo/ui-kit 1.0.0-rc.21 → 1.0.0-rc.27
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 +8 -2
- package/dist/{chunk-GGJES6XH.js → chunk-A3QYFQAV.js} +330 -280
- package/dist/chunk-A3QYFQAV.js.map +1 -0
- package/dist/{chunk-IZZF25H2.js → chunk-SPBHQUHI.js} +1 -1
- package/dist/chunk-SPBHQUHI.js.map +1 -0
- package/dist/gridUnits.d.ts +4 -4
- package/dist/gridUnits.js +1 -1
- package/dist/guards.d.ts +2 -1
- package/dist/guards.js.map +1 -1
- package/dist/index.d.ts +1069 -394
- package/dist/index.js +1391 -801
- package/dist/index.js.map +1 -1
- package/dist/reads-index.json +1559 -0
- package/dist/testing.d.ts +13 -2
- package/dist/testing.js +2 -2
- package/dist/testing.js.map +1 -1
- package/dist/tokens.css +2 -0
- package/dist/{units-Cl-8ZdJc.d.ts → units-Bd3X3vsA.d.ts} +47 -21
- package/package.json +5 -12
- package/dist/chunk-GGJES6XH.js.map +0 -1
- package/dist/chunk-IZZF25H2.js.map +0 -1
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormatQuantityOptions } from './units-
|
|
1
|
+
import { F as FormatQuantityOptions } from './units-Bd3X3vsA.js';
|
|
2
2
|
import { RenderHookOptions, RenderHookResult, RenderOptions, RenderResult } from '@ksp-gonogo/sitrep-sdk/testing';
|
|
3
3
|
import { ReactElement, JSXElementConstructor, ReactNode } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -29,7 +29,9 @@ import { ComponentDefinition } from '@ksp-gonogo/sitrep-sdk';
|
|
|
29
29
|
* @category Testing
|
|
30
30
|
*/
|
|
31
31
|
interface CheckerGrid {
|
|
32
|
+
/** Cells across. */
|
|
32
33
|
cols: number;
|
|
34
|
+
/** Cells down. */
|
|
33
35
|
rows: number;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
@@ -46,7 +48,9 @@ type CheckerFit = "fill" | "contain" | "cover";
|
|
|
46
48
|
interface CheckerPaint {
|
|
47
49
|
/** The grid the source picture carries. */
|
|
48
50
|
grid: CheckerGrid;
|
|
51
|
+
/** How the picture scales to its box. */
|
|
49
52
|
fit: CheckerFit;
|
|
53
|
+
/** The box the picture was given, in CSS px. */
|
|
50
54
|
box: {
|
|
51
55
|
width: number;
|
|
52
56
|
height: number;
|
|
@@ -56,7 +60,9 @@ interface CheckerPaint {
|
|
|
56
60
|
width: number;
|
|
57
61
|
height: number;
|
|
58
62
|
};
|
|
63
|
+
/** One cell's painted width, in CSS px. */
|
|
59
64
|
cellWidth: number;
|
|
65
|
+
/** One cell's painted height, in CSS px. */
|
|
60
66
|
cellHeight: number;
|
|
61
67
|
/** Cells visible inside the box per axis, never more than the grid holds. */
|
|
62
68
|
visible: CheckerGrid;
|
|
@@ -116,7 +122,7 @@ declare function fitOf(element: Element): CheckerFit;
|
|
|
116
122
|
* first message, and that the same element is still there holding the message
|
|
117
123
|
* afterwards.
|
|
118
124
|
*
|
|
119
|
-
* Assistive tech announces a
|
|
125
|
+
* Assistive tech announces a change to a region it already knows. A region
|
|
120
126
|
* inserted together with its words is often never announced, and a test that
|
|
121
127
|
* only looks at the final DOM cannot see that: the words are there either way.
|
|
122
128
|
* Call this with `container` rendered in the state that has nothing to say, and
|
|
@@ -181,8 +187,11 @@ type HeldMarkFault = "silent" | "no-hover" | "no-as-of";
|
|
|
181
187
|
* @category Testing
|
|
182
188
|
*/
|
|
183
189
|
interface UnannouncedHeldMark {
|
|
190
|
+
/** The held mark's element. */
|
|
184
191
|
mark: Element;
|
|
192
|
+
/** What the mark fails to announce. */
|
|
185
193
|
fault: HeldMarkFault;
|
|
194
|
+
/** A short description of where the mark was drawn. */
|
|
186
195
|
where: string;
|
|
187
196
|
}
|
|
188
197
|
/**
|
|
@@ -274,6 +283,7 @@ declare function WidgetHost({ widgetId, instanceId, children, }: {
|
|
|
274
283
|
* than an id to look one up by: for a harness previewing an augment against a
|
|
275
284
|
* synthetic host definition.
|
|
276
285
|
*
|
|
286
|
+
* @intent Published so a harness can preview an augment against a synthetic host definition.
|
|
277
287
|
* @category Testing
|
|
278
288
|
*/
|
|
279
289
|
declare function WidgetHostFor({ def, instanceId, children, }: {
|
|
@@ -390,6 +400,7 @@ declare const unitMatchers: {
|
|
|
390
400
|
* @category Testing
|
|
391
401
|
*/
|
|
392
402
|
interface UnitMatchers<Result = unknown> {
|
|
403
|
+
/** Asserts the element shows `quantity` written as `Unit` writes it, in the unit it would choose unless `opts` pins one. */
|
|
393
404
|
toShowQuantity(quantity: {
|
|
394
405
|
magnitude: number;
|
|
395
406
|
unit: string;
|
package/dist/testing.js
CHANGED