@nuxt/scripts 1.3.5 → 2.0.0-beta.1

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.
Files changed (208) hide show
  1. package/THIRD_PARTY_LICENSES.md +124 -0
  2. package/dist/devtools-client/200.html +1 -1
  3. package/dist/devtools-client/404.html +1 -1
  4. package/dist/devtools-client/_nuxt/{B551Pnuh.js → 2p1_IuX2.js} +1 -1
  5. package/dist/devtools-client/_nuxt/{KxC4Q3ev.js → 9elIQxwW.js} +1 -1
  6. package/dist/devtools-client/_nuxt/{DTP8MRtW.js → BNPn63Jz.js} +1 -1
  7. package/dist/devtools-client/_nuxt/BjRLaDIG.js +152 -0
  8. package/dist/devtools-client/_nuxt/BtNUYBXT.js +8 -0
  9. package/dist/devtools-client/_nuxt/CDDBpkXG.js +3 -0
  10. package/dist/devtools-client/_nuxt/Cpb0XAYP.js +1 -0
  11. package/dist/devtools-client/_nuxt/DAsiyhPm.js +6 -0
  12. package/dist/devtools-client/_nuxt/{VICyrUSM.js → DabLKy7M.js} +1 -1
  13. package/dist/devtools-client/_nuxt/Dat651Oh.js +1 -0
  14. package/dist/devtools-client/_nuxt/DcG2ZXvY.js +1 -0
  15. package/dist/devtools-client/_nuxt/DmlGWZ2X.js +1 -0
  16. package/dist/devtools-client/_nuxt/KsX6Az5B.js +1 -0
  17. package/dist/devtools-client/_nuxt/RL1np866.js +28 -0
  18. package/dist/devtools-client/_nuxt/UmWNrBO5.js +2 -0
  19. package/dist/devtools-client/_nuxt/builds/latest.json +1 -1
  20. package/dist/devtools-client/_nuxt/builds/meta/e28b96f1-78e8-41a4-ad6f-904cd078f85e.json +1 -0
  21. package/dist/devtools-client/_nuxt/{entry.CYUdJFoE.css → entry.9HJPJ6Hp.css} +1 -1
  22. package/dist/devtools-client/_nuxt/error-404.DnwL1N6v.css +1 -0
  23. package/dist/devtools-client/_nuxt/error-500.DEbXRLdm.css +1 -0
  24. package/dist/devtools-client/docs/index.html +1 -1
  25. package/dist/devtools-client/first-party/index.html +1 -1
  26. package/dist/devtools-client/index.html +1 -1
  27. package/dist/devtools-client/registry/index.html +1 -1
  28. package/dist/module.d.mts +2 -86
  29. package/dist/module.d.ts +2 -86
  30. package/dist/module.json +3 -3
  31. package/dist/module.mjs +71 -328
  32. package/dist/registry.mjs +54 -22
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +1 -28
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +7 -50
  35. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +1 -28
  36. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.d.vue.ts +0 -8
  37. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +1 -13
  38. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue.d.ts +0 -8
  39. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.d.vue.ts +4 -4
  40. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue +9 -15
  41. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue.d.ts +4 -4
  42. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.d.ts +0 -22
  43. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.js +0 -31
  44. package/dist/runtime/components/Leaflet/ScriptLeafletGeoJson.d.vue.ts +31 -0
  45. package/dist/runtime/components/Leaflet/ScriptLeafletGeoJson.vue +43 -0
  46. package/dist/runtime/components/Leaflet/ScriptLeafletGeoJson.vue.d.ts +31 -0
  47. package/dist/runtime/components/Leaflet/ScriptLeafletMap.d.vue.ts +90 -0
  48. package/dist/runtime/components/Leaflet/ScriptLeafletMap.vue +171 -0
  49. package/dist/runtime/components/Leaflet/ScriptLeafletMap.vue.d.ts +90 -0
  50. package/dist/runtime/components/Leaflet/ScriptLeafletMarker.d.vue.ts +47 -0
  51. package/dist/runtime/components/Leaflet/ScriptLeafletMarker.vue +70 -0
  52. package/dist/runtime/components/Leaflet/ScriptLeafletMarker.vue.d.ts +47 -0
  53. package/dist/runtime/components/Leaflet/ScriptLeafletPopup.d.vue.ts +31 -0
  54. package/dist/runtime/components/Leaflet/ScriptLeafletPopup.vue +81 -0
  55. package/dist/runtime/components/Leaflet/ScriptLeafletPopup.vue.d.ts +31 -0
  56. package/dist/runtime/components/Leaflet/ScriptLeafletTileLayer.d.vue.ts +26 -0
  57. package/dist/runtime/components/Leaflet/ScriptLeafletTileLayer.vue +38 -0
  58. package/dist/runtime/components/Leaflet/ScriptLeafletTileLayer.vue.d.ts +26 -0
  59. package/dist/runtime/components/Leaflet/useLeafletResource.d.ts +30 -0
  60. package/dist/runtime/components/Leaflet/useLeafletResource.js +46 -0
  61. package/dist/runtime/components/MapLibre/ScriptMapLibreGeoJson.d.vue.ts +39 -0
  62. package/dist/runtime/components/MapLibre/ScriptMapLibreGeoJson.vue +84 -0
  63. package/dist/runtime/components/MapLibre/ScriptMapLibreGeoJson.vue.d.ts +39 -0
  64. package/dist/runtime/components/MapLibre/ScriptMapLibreMap.d.vue.ts +122 -0
  65. package/dist/runtime/components/MapLibre/ScriptMapLibreMap.vue +214 -0
  66. package/dist/runtime/components/MapLibre/ScriptMapLibreMap.vue.d.ts +122 -0
  67. package/dist/runtime/components/MapLibre/ScriptMapLibreMarker.d.vue.ts +35 -0
  68. package/dist/runtime/components/MapLibre/ScriptMapLibreMarker.vue +98 -0
  69. package/dist/runtime/components/MapLibre/ScriptMapLibreMarker.vue.d.ts +35 -0
  70. package/dist/runtime/components/MapLibre/ScriptMapLibreNavigationControl.d.vue.ts +12 -0
  71. package/dist/runtime/components/MapLibre/ScriptMapLibreNavigationControl.vue +23 -0
  72. package/dist/runtime/components/MapLibre/ScriptMapLibreNavigationControl.vue.d.ts +12 -0
  73. package/dist/runtime/components/MapLibre/ScriptMapLibrePopup.d.vue.ts +31 -0
  74. package/dist/runtime/components/MapLibre/ScriptMapLibrePopup.vue +99 -0
  75. package/dist/runtime/components/MapLibre/ScriptMapLibrePopup.vue.d.ts +31 -0
  76. package/dist/runtime/components/MapLibre/useMapLibreResource.d.ts +23 -0
  77. package/dist/runtime/components/MapLibre/useMapLibreResource.js +41 -0
  78. package/dist/runtime/components/ScriptCrisp.vue +20 -18
  79. package/dist/runtime/components/ScriptDeskCrew.d.vue.ts +40 -0
  80. package/dist/runtime/components/ScriptDeskCrew.vue +82 -0
  81. package/dist/runtime/components/ScriptDeskCrew.vue.d.ts +40 -0
  82. package/dist/runtime/components/ScriptIntercom.vue +21 -19
  83. package/dist/runtime/components/ScriptLoadingIndicator.d.vue.ts +1 -1
  84. package/dist/runtime/components/ScriptLoadingIndicator.vue.d.ts +1 -1
  85. package/dist/runtime/components/ScriptPayPalButtons.vue +7 -3
  86. package/dist/runtime/components/ScriptPayPalMessages.vue +8 -4
  87. package/dist/runtime/composables/useScript.js +96 -49
  88. package/dist/runtime/composables/useScriptProxyUrl.d.ts +4 -8
  89. package/dist/runtime/composables/useScriptProxyUrl.js +0 -7
  90. package/dist/runtime/composables/useScriptTriggerIdleTimeout.d.ts +2 -1
  91. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +3 -34
  92. package/dist/runtime/composables/useScriptTriggerInteraction.d.ts +2 -1
  93. package/dist/runtime/composables/useScriptTriggerInteraction.js +13 -46
  94. package/dist/runtime/composables/useScriptTriggerServiceWorker.d.ts +2 -1
  95. package/dist/runtime/composables/useScriptTriggerServiceWorker.js +5 -38
  96. package/dist/runtime/leaflet-styles.d.ts +13 -0
  97. package/dist/runtime/leaflet-styles.js +684 -0
  98. package/dist/runtime/maplibre-styles.d.ts +7 -0
  99. package/dist/runtime/maplibre-styles.js +25 -0
  100. package/dist/runtime/npm-script-api-state.d.ts +4 -0
  101. package/dist/runtime/npm-script-api-state.js +13 -0
  102. package/dist/runtime/registry/crisp.d.ts +1 -1
  103. package/dist/runtime/registry/crisp.js +30 -18
  104. package/dist/runtime/registry/deskcrew.d.ts +52 -0
  105. package/dist/runtime/registry/deskcrew.js +31 -0
  106. package/dist/runtime/registry/google-analytics.d.ts +0 -2
  107. package/dist/runtime/registry/google-maps.d.ts +2 -11
  108. package/dist/runtime/registry/google-maps.js +31 -10
  109. package/dist/runtime/registry/google-tag-manager.d.ts +9 -3
  110. package/dist/runtime/registry/leaflet.d.ts +13 -0
  111. package/dist/runtime/registry/leaflet.js +29 -0
  112. package/dist/runtime/registry/maplibre.d.ts +13 -0
  113. package/dist/runtime/registry/maplibre.js +29 -0
  114. package/dist/runtime/registry/matomo-analytics.js +1 -8
  115. package/dist/runtime/registry/plausible-analytics.d.ts +4 -16
  116. package/dist/runtime/registry/plausible-analytics.js +15 -58
  117. package/dist/runtime/registry/rybbit-analytics.d.ts +0 -4
  118. package/dist/runtime/registry/rybbit-analytics.js +1 -4
  119. package/dist/runtime/registry/schemas.d.ts +61 -5
  120. package/dist/runtime/registry/schemas.js +64 -5
  121. package/dist/runtime/registry/tiktok-pixel.d.ts +2 -12
  122. package/dist/runtime/registry/tiktok-pixel.js +1 -1
  123. package/dist/runtime/registry/usercentrics.js +46 -6
  124. package/dist/runtime/registry/youtube-player.d.ts +3 -4
  125. package/dist/runtime/registry/youtube-player.js +30 -23
  126. package/dist/runtime/server/bluesky-embed-image.d.ts +1 -1
  127. package/dist/runtime/server/bluesky-embed.d.ts +1 -1
  128. package/dist/runtime/server/bluesky-embed.js +3 -6
  129. package/dist/runtime/server/gravatar-proxy.d.ts +1 -1
  130. package/dist/runtime/server/gravatar-proxy.js +2 -3
  131. package/dist/runtime/server/instagram-embed-asset.d.ts +1 -1
  132. package/dist/runtime/server/instagram-embed-image.d.ts +1 -1
  133. package/dist/runtime/server/instagram-embed.d.ts +1 -1
  134. package/dist/runtime/server/instagram-embed.js +4 -7
  135. package/dist/runtime/server/utils/cached-upstream.d.ts +6 -11
  136. package/dist/runtime/server/utils/cached-upstream.js +94 -23
  137. package/dist/runtime/server/utils/embed-rewriters.d.ts +3 -5
  138. package/dist/runtime/server/utils/embed-rewriters.js +8 -8
  139. package/dist/runtime/server/utils/image-proxy.d.ts +1 -1
  140. package/dist/runtime/server/utils/image-proxy.js +2 -3
  141. package/dist/runtime/server/utils/instagram-embed.d.ts +6 -6
  142. package/dist/runtime/server/utils/instagram-embed.js +18 -19
  143. package/dist/runtime/server/utils/proxy-url.d.ts +5 -6
  144. package/dist/runtime/server/utils/proxy-url.js +1 -4
  145. package/dist/runtime/server/x-embed-image.d.ts +1 -1
  146. package/dist/runtime/server/x-embed.d.ts +48 -1
  147. package/dist/runtime/server/x-embed.js +3 -6
  148. package/dist/runtime/types.d.ts +13 -13
  149. package/dist/runtime/utils/abortable-promise.js +26 -5
  150. package/dist/runtime/utils/nuxt-ready-script-trigger.d.ts +3 -0
  151. package/dist/runtime/utils/nuxt-ready-script-trigger.js +16 -0
  152. package/dist/runtime/utils.js +21 -32
  153. package/dist/stats.mjs +13 -0
  154. package/dist/types-source.mjs +1173 -100
  155. package/dist/types.d.mts +2 -2
  156. package/package.json +34 -21
  157. package/LICENSE.md +0 -9
  158. package/bin/cli.mjs +0 -2
  159. package/dist/cli.d.mts +0 -2
  160. package/dist/cli.d.ts +0 -2
  161. package/dist/cli.mjs +0 -50
  162. package/dist/devtools-client/_nuxt/8ltZ0o6d.js +0 -1
  163. package/dist/devtools-client/_nuxt/B8_EBdhg.js +0 -152
  164. package/dist/devtools-client/_nuxt/BKdLzFmX.js +0 -3
  165. package/dist/devtools-client/_nuxt/Bf2Kt1P0.js +0 -28
  166. package/dist/devtools-client/_nuxt/CC0GKROJ.js +0 -1
  167. package/dist/devtools-client/_nuxt/CH5oUfNi.js +0 -1
  168. package/dist/devtools-client/_nuxt/CMXzQxJZ.js +0 -1
  169. package/dist/devtools-client/_nuxt/CP7c-Js6.js +0 -8
  170. package/dist/devtools-client/_nuxt/C_v3_O0R.js +0 -6
  171. package/dist/devtools-client/_nuxt/CxN78VhB.js +0 -1
  172. package/dist/devtools-client/_nuxt/Dkc7iTdR.js +0 -1
  173. package/dist/devtools-client/_nuxt/builds/meta/173480db-0944-415b-962d-d619682f0042.json +0 -1
  174. package/dist/devtools-client/_nuxt/error-404.Bq2JQbJs.css +0 -1
  175. package/dist/devtools-client/_nuxt/error-500.5E_FOzlc.css +0 -1
  176. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.d.vue.ts +0 -13
  177. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +0 -15
  178. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue.d.ts +0 -13
  179. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.d.vue.ts +0 -27
  180. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +0 -34
  181. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue.d.ts +0 -27
  182. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.d.vue.ts +0 -13
  183. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +0 -11
  184. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue.d.ts +0 -13
  185. package/dist/runtime/components/GoogleMaps/bindGoogleMapsEvents.d.ts +0 -13
  186. package/dist/runtime/components/GoogleMaps/bindGoogleMapsEvents.js +0 -8
  187. package/dist/runtime/components/GoogleMaps/injectionKeys.d.ts +0 -10
  188. package/dist/runtime/components/GoogleMaps/injectionKeys.js +0 -2
  189. package/dist/runtime/composables/useScriptProxyToken.d.ts +0 -12
  190. package/dist/runtime/composables/useScriptProxyToken.js +0 -4
  191. package/dist/runtime/npm-script-stub.d.ts +0 -20
  192. package/dist/runtime/npm-script-stub.js +0 -72
  193. package/dist/runtime/plugins/proxy-token.server.d.ts +0 -10
  194. package/dist/runtime/plugins/proxy-token.server.js +0 -17
  195. package/dist/runtime/server/google-maps-geocode-proxy.d.ts +0 -2
  196. package/dist/runtime/server/google-maps-geocode-proxy.js +0 -43
  197. package/dist/runtime/server/google-static-maps-proxy.d.ts +0 -2
  198. package/dist/runtime/server/google-static-maps-proxy.js +0 -56
  199. package/dist/runtime/server/utils/proxy-query.d.ts +0 -2
  200. package/dist/runtime/server/utils/proxy-query.js +0 -10
  201. package/dist/runtime/server/utils/sign-constants.d.ts +0 -16
  202. package/dist/runtime/server/utils/sign-constants.js +0 -5
  203. package/dist/runtime/server/utils/sign.d.ts +0 -101
  204. package/dist/runtime/server/utils/sign.js +0 -91
  205. package/dist/runtime/server/utils/withSigning.d.ts +0 -23
  206. package/dist/runtime/server/utils/withSigning.js +0 -19
  207. package/dist/runtime/unhead-features.d.ts +0 -1
  208. package/dist/runtime/unhead-features.js +0 -3
@@ -7,9 +7,11 @@ export function createAbortablePromise(setup, options = {}) {
7
7
  const { signal, abortMessage } = options;
8
8
  return new Promise((outerResolve, outerReject) => {
9
9
  let settled = false;
10
+ let setupComplete = false;
10
11
  let cleanup;
11
12
  let onAbort;
12
- const finish = (settle, value) => {
13
+ let pendingSettlement;
14
+ const settleNow = (settle, value) => {
13
15
  if (settled)
14
16
  return;
15
17
  settled = true;
@@ -24,6 +26,15 @@ export function createAbortablePromise(setup, options = {}) {
24
26
  }
25
27
  settle(value);
26
28
  };
29
+ const finish = (settle, value) => {
30
+ if (settled || pendingSettlement)
31
+ return;
32
+ if (!setupComplete) {
33
+ pendingSettlement = { settle, value };
34
+ return;
35
+ }
36
+ settleNow(settle, value);
37
+ };
27
38
  const reject = (reason) => finish(outerReject, reason);
28
39
  const resolve = (value) => {
29
40
  if (typeof value === "object" && value !== null || typeof value === "function") {
@@ -46,18 +57,28 @@ export function createAbortablePromise(setup, options = {}) {
46
57
  };
47
58
  onAbort = () => reject(createAbortError(abortMessage));
48
59
  if (signal?.aborted) {
60
+ setupComplete = true;
49
61
  onAbort();
50
62
  return;
51
63
  }
52
64
  signal?.addEventListener("abort", onAbort, { once: true });
53
65
  try {
54
66
  cleanup = setup(resolve, reject) || void 0;
55
- if (settled) {
56
- cleanup?.();
57
- cleanup = void 0;
67
+ setupComplete = true;
68
+ if (pendingSettlement) {
69
+ const { settle, value } = pendingSettlement;
70
+ pendingSettlement = void 0;
71
+ settleNow(settle, value);
58
72
  }
59
73
  } catch (error) {
60
- reject(error);
74
+ setupComplete = true;
75
+ if (pendingSettlement) {
76
+ const { settle, value } = pendingSettlement;
77
+ pendingSettlement = void 0;
78
+ settleNow(settle, value);
79
+ } else {
80
+ reject(error);
81
+ }
61
82
  }
62
83
  });
63
84
  }
@@ -0,0 +1,3 @@
1
+ import type { UseScriptTrigger } from '@unhead/vue/scripts';
2
+ /** Install an Unhead trigger after Nuxt has completed client startup. */
3
+ export declare function createNuxtReadyScriptTrigger(trigger: UseScriptTrigger): UseScriptTrigger;
@@ -0,0 +1,16 @@
1
+ import { onNuxtReady } from "nuxt/app";
2
+ export function createNuxtReadyScriptTrigger(trigger) {
3
+ return (load) => {
4
+ let disposed = false;
5
+ let cleanup;
6
+ onNuxtReady(() => {
7
+ if (!disposed)
8
+ cleanup = trigger(load);
9
+ });
10
+ return () => {
11
+ disposed = true;
12
+ cleanup?.();
13
+ cleanup = void 0;
14
+ };
15
+ };
16
+ }
@@ -3,10 +3,9 @@ import { createError, useRuntimeConfig } from "nuxt/app";
3
3
  import { parseQuery, parseURL, withQuery } from "ufo";
4
4
  import { parse } from "valibot";
5
5
  import { useScript } from "./composables/useScript.js";
6
+ import { createNpmScriptApiState } from "./npm-script-api-state.js";
6
7
  import { createNpmScriptProxy } from "./npm-script-proxy.js";
7
- import { createNpmScriptStub } from "./npm-script-stub.js";
8
8
  import { attachGcmConsent } from "./registry/_gcm-consent.js";
9
- import { isUnheadSourceLessScriptLoaderEnabled } from "./unhead-features.js";
10
9
  const URL_MATCH_RE = /https?:\/\/[^/]+\/_nuxt\/(.+\.vue)(?:\?[^)]*)?:(\d+):(\d+)/;
11
10
  const URL_PAREN_MATCH_RE = /\(https?:\/\/[^/]+\/_nuxt\/(.+\.vue)(?:\?[^)]*)?:(\d+):(\d+)\)/;
12
11
  const VUE_MATCH_RE = /([^/\s]+\.vue):(\d+):(\d+)/;
@@ -48,38 +47,28 @@ export function useRegistryScript(registryKey, optionsFn, _userOptions) {
48
47
  const userOptions = defu(_userOptions || {}, typeof scriptConfig === "object" ? scriptConfig : {});
49
48
  const options = optionsFn(userOptions, { scriptInput: userOptions.scriptInput });
50
49
  if (options.scriptMode === "npm") {
51
- if (isUnheadSourceLessScriptLoaderEnabled()) {
52
- const scriptOptions2 = { ...userOptions.scriptOptions, ...options.scriptOptions };
53
- const resolveApi = scriptOptions2.use;
54
- const clientUse = resolveClientUse(resolveApi);
55
- delete scriptOptions2.use;
56
- if (typeof scriptOptions2.trigger === "undefined")
57
- scriptOptions2.trigger = "client";
58
- let api;
59
- const instance2 = useScript({
60
- key: String(registryKey),
61
- async loader({ signal }) {
62
- const initialized = await options.clientInit?.({ signal });
63
- if (signal.aborted)
64
- throw signal.reason || new Error(`Loading ${String(registryKey)} was aborted`);
65
- api = await Promise.resolve(api || resolveApi?.() || initialized || {});
66
- return api;
67
- }
68
- }, scriptOptions2);
69
- const sharedInstance = instance2.script || instance2;
70
- if (!sharedInstance[NPM_SCRIPT_PROXY_DECORATED]) {
71
- api = clientUse?.();
72
- sharedInstance.proxy = createNpmScriptProxy(sharedInstance.proxy, () => api);
73
- Object.defineProperty(sharedInstance, NPM_SCRIPT_PROXY_DECORATED, { value: true });
50
+ const scriptOptions2 = { ...userOptions.scriptOptions, ...options.scriptOptions };
51
+ const resolveApi = scriptOptions2.use;
52
+ const clientUse = resolveClientUse(resolveApi);
53
+ delete scriptOptions2.use;
54
+ if (typeof scriptOptions2.trigger === "undefined")
55
+ scriptOptions2.trigger = "client";
56
+ const apiState = createNpmScriptApiState(clientUse);
57
+ const instance2 = useScript({
58
+ key: String(registryKey),
59
+ async loader({ signal }) {
60
+ const initialized = await options.clientInit?.({ signal });
61
+ if (signal.aborted)
62
+ throw signal.reason || new Error(`Loading ${String(registryKey)} was aborted`);
63
+ return apiState.load(resolveApi, initialized);
74
64
  }
75
- return instance2;
65
+ }, scriptOptions2);
66
+ const sharedInstance = instance2.script || instance2;
67
+ if (!sharedInstance[NPM_SCRIPT_PROXY_DECORATED]) {
68
+ sharedInstance.proxy = createNpmScriptProxy(sharedInstance.proxy, apiState.current);
69
+ Object.defineProperty(sharedInstance, NPM_SCRIPT_PROXY_DECORATED, { value: true });
76
70
  }
77
- return createNpmScriptStub({
78
- key: String(registryKey),
79
- use: resolveClientUse(options.scriptOptions?.use),
80
- clientInit: options.clientInit,
81
- trigger: userOptions.scriptOptions?.trigger
82
- });
71
+ return instance2;
83
72
  }
84
73
  let finalScriptInput = options.scriptInput;
85
74
  const userSrc = userOptions.scriptInput?.src;
package/dist/stats.mjs CHANGED
@@ -124,6 +124,11 @@ const scriptMeta = {
124
124
  trackedData: ["user-identity", "events"],
125
125
  testId: "akg5rmxb"
126
126
  },
127
+ deskcrew: {
128
+ urls: ["https://deskcrew.io/desk.js"],
129
+ trackedData: ["user-identity", "events", "errors"],
130
+ testId: "pub_deskcrewdemo"
131
+ },
127
132
  crisp: {
128
133
  urls: ["https://client.crisp.chat/l.js"],
129
134
  trackedData: ["user-identity", "events"],
@@ -157,6 +162,14 @@ const scriptMeta = {
157
162
  // Dynamic URL with API key
158
163
  trackedData: []
159
164
  },
165
+ leaflet: {
166
+ urls: ["https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"],
167
+ trackedData: []
168
+ },
169
+ maplibre: {
170
+ urls: ["https://unpkg.com/maplibre-gl@5.24.0/dist/maplibre-gl.js"],
171
+ trackedData: []
172
+ },
160
173
  // CDN
161
174
  npm: {
162
175
  urls: [],