@inspectorhub/field-ui 0.4.0 → 0.6.0
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 +13 -0
- package/dist/{data-source-IaWUdrIc.d.ts → data-source-Do9_Rv50.d.ts} +47 -6
- package/dist/index.d.ts +9 -2
- package/dist/index.js +3338 -2282
- package/dist/testing.d.ts +3 -1
- package/dist/testing.js +3 -3
- package/dist/theme.css +8 -0
- package/package.json +1 -1
package/dist/testing.d.ts
CHANGED
|
@@ -210,7 +210,9 @@ interface FakeDataSource extends FieldDataSource {
|
|
|
210
210
|
hadDoc: boolean;
|
|
211
211
|
}[];
|
|
212
212
|
/** Make every later upload answer `{ ok: false, error }`. */
|
|
213
|
-
failUpload(error: string
|
|
213
|
+
failUpload(error: string, opts?: {
|
|
214
|
+
permanent?: boolean;
|
|
215
|
+
}): void;
|
|
214
216
|
/**
|
|
215
217
|
* Make every later command of this type answer `{ ok: false, error }`. A response
|
|
216
218
|
* registered with `respondWith` for the same command still rides along as `data`,
|
package/dist/testing.js
CHANGED
|
@@ -469,8 +469,8 @@ function createFakeDataSource(seed) {
|
|
|
469
469
|
get uploads() {
|
|
470
470
|
return uploads;
|
|
471
471
|
},
|
|
472
|
-
failUpload(error) {
|
|
473
|
-
uploadFailure = error;
|
|
472
|
+
failUpload(error, opts) {
|
|
473
|
+
uploadFailure = { error, permanent: opts?.permanent === true };
|
|
474
474
|
},
|
|
475
475
|
get reloadCount() {
|
|
476
476
|
return reloadCount;
|
|
@@ -586,7 +586,7 @@ function createFakeDataSource(seed) {
|
|
|
586
586
|
uploader: (inspectionId, doc) => ({
|
|
587
587
|
upload: async (rec) => {
|
|
588
588
|
uploads.push({ inspectionId, rec, hadDoc: doc !== null });
|
|
589
|
-
return uploadFailure === null ? { ok: true, key: `uploaded/${rec.pendingId}` } : { ok: false, error: uploadFailure };
|
|
589
|
+
return uploadFailure === null ? { ok: true, key: `uploaded/${rec.pendingId}` } : { ok: false, error: uploadFailure.error, ...uploadFailure.permanent ? { permanent: true } : {} };
|
|
590
590
|
}
|
|
591
591
|
})
|
|
592
592
|
},
|
package/dist/theme.css
CHANGED
|
@@ -101,8 +101,16 @@
|
|
|
101
101
|
--font-ih-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/* Notices sit 1rem from the bottom edge (Toast's fallback); while the phone nav is mounted they sit above it. */
|
|
105
|
+
:root[data-mobile-nav] {
|
|
106
|
+
--ih-toast-bottom: calc(var(--ih-mobile-nav-h) + 1rem);
|
|
107
|
+
}
|
|
108
|
+
|
|
104
109
|
/* ── CSS custom properties: light mode (default) ── */
|
|
105
110
|
:root {
|
|
111
|
+
/* The phone editor's fixed bottom nav: one row plus the device's bottom inset. The nav, the page padding that clears
|
|
112
|
+
it and the floating notices all read this, so they cannot disagree. */
|
|
113
|
+
--ih-mobile-nav-h: calc(3.5rem + env(safe-area-inset-bottom));
|
|
106
114
|
/* #6366f1 (indigo-500) measured 4.47:1 on the white card — 0.03 short, and
|
|
107
115
|
symmetric, so the same 4.47 governed an indigo link AND white label text
|
|
108
116
|
on a filled indigo button. #6265f0 is one step of 1/255 per channel and
|