single-file-core 1.5.42 → 1.5.44
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.
|
@@ -184,9 +184,6 @@ function getProcessorHelperClass(utilInstance) {
|
|
|
184
184
|
if (mediaQueryListNode) {
|
|
185
185
|
content.data = this.wrapMediaQuery(content.data, cssTree.generate(mediaQueryListNode));
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
content.data = content.data.replace(/:defined/gi, "*");
|
|
189
|
-
|
|
190
187
|
const importedStylesheet = cssTree.parse(content.data, { context: "stylesheet", parseCustomProperty: true });
|
|
191
188
|
const ancestorStyleSheets = new Set(importedStyleSheets);
|
|
192
189
|
ancestorStyleSheets.add(resourceURL);
|
|
@@ -228,7 +225,6 @@ function getProcessorHelperClass(utilInstance) {
|
|
|
228
225
|
if (content.data && content.data.match(/^<!doctype /i)) {
|
|
229
226
|
content.data = "";
|
|
230
227
|
}
|
|
231
|
-
content.data = content.data.replace(/:defined/gi, "*");
|
|
232
228
|
let stylesheet = cssTree.parse(content.data, { context: "stylesheet", parseCustomProperty: true });
|
|
233
229
|
const importFound = await this.resolveImportURLs(stylesheet, resourceURL, options, workStylesheet);
|
|
234
230
|
if (importFound) {
|
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
featureSettings: "font-feature-settings"
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
const fetch =
|
|
65
|
+
const fetch = globalThis.fetch.bind(globalThis);
|
|
66
66
|
const CustomEvent = globalThis.CustomEvent;
|
|
67
67
|
const document = globalThis.document;
|
|
68
68
|
const screen = globalThis.screen;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
const response = await fetch(url, options);
|
|
146
146
|
detail = { url, response: await response.arrayBuffer(), headers: [...response.headers], status: response.status };
|
|
147
147
|
} catch (error) {
|
|
148
|
-
detail = { url, error: error && error.toString() };
|
|
148
|
+
detail = { url, error: error && (error.message || error.toString()) };
|
|
149
149
|
}
|
|
150
150
|
document.dispatchEvent(new CustomEvent(FETCH_RESPONSE_EVENT, { detail }));
|
|
151
151
|
});
|
|
@@ -272,8 +272,10 @@
|
|
|
272
272
|
const rootBounds = getBoundingClientRectDefined ? rootBoundingRect : docBoundingRect;
|
|
273
273
|
const time = 0;
|
|
274
274
|
return { target, intersectionRatio, boundingClientRect, intersectionRect: boundingClientRect, isIntersecting, rootBounds, time };
|
|
275
|
-
});
|
|
276
|
-
|
|
275
|
+
}).filter(params => params.boundingClientRect.width && params.boundingClientRect.height);
|
|
276
|
+
if (params.length) {
|
|
277
|
+
observer.callback.call(intersectionObserver, params, intersectionObserver);
|
|
278
|
+
}
|
|
277
279
|
}
|
|
278
280
|
});
|
|
279
281
|
}
|