@assembly-js/app-foundation 0.5.1 → 0.5.2
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/CHANGELOG.md +3 -0
- package/dist/paint-beacon.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,9 @@ A patch release never changes what an app's build requires; a minor release may
|
|
|
19
19
|
not by hand; see `changes/README.md`. CI fails a PR that changes a check script without a
|
|
20
20
|
`bump: minor` change file.
|
|
21
21
|
|
|
22
|
+
## 0.5.2
|
|
23
|
+
- [fix] The builder preview no longer counts a page marked as an error document in its server HTML as the app having painted, even when it streams in before the page finishes hydrating.
|
|
24
|
+
|
|
22
25
|
## 0.5.1
|
|
23
26
|
- [guidance] The build agent now detects PDF form fields with `detectPdfFields` and gives XFA, text-only and empty PDFs their own UI instead of reporting "no fields".
|
|
24
27
|
|
package/dist/paint-beacon.js
CHANGED
|
@@ -17,8 +17,12 @@ let fired = false;
|
|
|
17
17
|
// the schedule latch, so the boundary can re-install it once the app has
|
|
18
18
|
// rendered in its place.
|
|
19
19
|
const ERROR_DOCUMENT_FLAG = '__assemblyErrorDocument';
|
|
20
|
+
// The same pages also carry this attribute in their server HTML. A page streamed
|
|
21
|
+
// in under Suspense can reach load before React hydrates it and sets the flag.
|
|
22
|
+
const ERROR_DOCUMENT_SELECTOR = '[data-assembly-error-document]';
|
|
20
23
|
function isErrorDocument() {
|
|
21
|
-
return window[ERROR_DOCUMENT_FLAG] === true
|
|
24
|
+
return (window[ERROR_DOCUMENT_FLAG] === true ||
|
|
25
|
+
document.querySelector(ERROR_DOCUMENT_SELECTOR) !== null);
|
|
22
26
|
}
|
|
23
27
|
function firePaintBeacon() {
|
|
24
28
|
if (fired)
|