@nectary/assets 3.6.10 → 3.6.12

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/bundle.ts CHANGED
@@ -347,3 +347,4 @@ export { LogoEnterpriseItIconWordmark } from './logo/enterprise-it-icon-wordmark
347
347
  // Animations
348
348
  export { AnimationEngageLogo } from './animations/engage-logo'
349
349
  export { AnimationSinchLogo } from './animations/sinch-logo'
350
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/assets",
3
- "version": "3.6.10",
3
+ "version": "3.6.12",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -38,6 +38,6 @@
38
38
  "vite": "^7.0.6"
39
39
  },
40
40
  "peerDependencies": {
41
- "@nectary/theme-base": "1.16.0"
41
+ "@nectary/theme-base": "1.16.1"
42
42
  }
43
43
  }
@@ -1,3 +1,9 @@
1
+ const getNonEsmShModuleFile = (modulePath) => {
2
+ if (modulePath === "bundle") {
3
+ return "bundle.js";
4
+ }
5
+ return `${modulePath}/index.js`;
6
+ };
1
7
  const getImportPath = (cdnUrl, version, modulePath) => {
2
8
  if (cdnUrl.length === 0) {
3
9
  return null;
@@ -9,10 +15,11 @@ const getImportPath = (cdnUrl, version, modulePath) => {
9
15
  }
10
16
  return `${cdnUrl}/${modulePath}`;
11
17
  }
18
+ const moduleFile = getNonEsmShModuleFile(modulePath);
12
19
  if (version.length !== 0) {
13
- return `${cdnUrl}/${version}/${modulePath}.js`;
20
+ return `${cdnUrl}/${version}/${moduleFile}`;
14
21
  }
15
- return `${cdnUrl}/latest/${modulePath}.js`;
22
+ return `${cdnUrl}/latest/${moduleFile}`;
16
23
  };
17
24
  const getCssImportPath = (cdnUrl, version, modulePath) => {
18
25
  if (cdnUrl.length === 0) {
@@ -20,15 +27,18 @@ const getCssImportPath = (cdnUrl, version, modulePath) => {
20
27
  }
21
28
  const host = new URL(cdnUrl).host;
22
29
  if (host === "esm.sh") {
30
+ if (cdnUrl.includes("theme-base")) {
31
+ modulePath = `dist/${modulePath}`;
32
+ }
23
33
  if (version.length !== 0) {
24
34
  return `${cdnUrl}@${version}/es2022/${modulePath}.css`;
25
35
  }
26
36
  return `${cdnUrl}/${modulePath}`;
27
37
  }
28
38
  if (version.length !== 0) {
29
- return `${cdnUrl}/${version}/${modulePath}.css`;
39
+ return `${cdnUrl}/${version}/${modulePath}.js`;
30
40
  }
31
- return `${cdnUrl}/latest/${modulePath}.css`;
41
+ return `${cdnUrl}/latest/${modulePath}.js`;
32
42
  };
33
43
  const FALLBACK_DELAY_MS = 2e3;
34
44
  const loadModuleWithFallback = async (options) => {