@node-projects/web-component-designer 0.0.269 → 0.0.271
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.
|
@@ -236,6 +236,22 @@ export class NpmPackageLoader {
|
|
|
236
236
|
"default": "./feature.js"
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
+
|
|
240
|
+
"exports": {
|
|
241
|
+
".": {
|
|
242
|
+
"types": "./dist/index.d.ts",
|
|
243
|
+
"import": {
|
|
244
|
+
"browser": {
|
|
245
|
+
"development": "./dist/composed-offset-position.browser.mjs",
|
|
246
|
+
"default": "./dist/composed-offset-position.browser.min.mjs"
|
|
247
|
+
},
|
|
248
|
+
"default": "./dist/composed-offset-position.mjs"
|
|
249
|
+
},
|
|
250
|
+
"module": "./dist/composed-offset-position.esm.js",
|
|
251
|
+
"default": "./dist/composed-offset-position.umd.js"
|
|
252
|
+
},
|
|
253
|
+
"./package.json": "./package.json"
|
|
254
|
+
}
|
|
239
255
|
|
|
240
256
|
*/
|
|
241
257
|
/*
|
|
@@ -249,16 +265,37 @@ export class NpmPackageLoader {
|
|
|
249
265
|
return obj.browser;
|
|
250
266
|
if (obj?.import)
|
|
251
267
|
return obj.import;
|
|
268
|
+
if (obj?.module)
|
|
269
|
+
return obj.module;
|
|
252
270
|
if (obj?.default)
|
|
253
271
|
return obj.default;
|
|
254
272
|
return obj?.node;
|
|
255
273
|
};
|
|
274
|
+
/*
|
|
275
|
+
for support of this:
|
|
276
|
+
"exports": {
|
|
277
|
+
".": {
|
|
278
|
+
"types": "./dist/index.d.ts",
|
|
279
|
+
"import": {
|
|
280
|
+
"browser": {
|
|
281
|
+
"development": "./dist/composed-offset-position.browser.mjs",
|
|
282
|
+
"default": "./dist/composed-offset-position.browser.min.mjs"
|
|
283
|
+
},
|
|
284
|
+
*/
|
|
285
|
+
let getImportFlat = (obj) => {
|
|
286
|
+
let i = getImport(obj);
|
|
287
|
+
if (!(typeof i == 'string'))
|
|
288
|
+
i = getImport(i);
|
|
289
|
+
if (!(typeof i == 'string'))
|
|
290
|
+
i = getImport(i);
|
|
291
|
+
return i;
|
|
292
|
+
};
|
|
256
293
|
//Names to use: browser, import, default, node
|
|
257
|
-
let imp =
|
|
294
|
+
let imp = getImportFlat(packageJsonObj.exports);
|
|
258
295
|
if (imp) {
|
|
259
296
|
importMap.imports[packageJsonObj.name] = baseUrl + removeTrailing(imp, '/');
|
|
260
297
|
}
|
|
261
|
-
else if (imp =
|
|
298
|
+
else if (imp = getImportFlat(packageJsonObj.exports?.['.'])) {
|
|
262
299
|
importMap.imports[packageJsonObj.name] = baseUrl + removeTrailing(imp, '/');
|
|
263
300
|
}
|
|
264
301
|
}
|