@luzmo/embed 6.10.0-es2021 → 6.11.0-es2021

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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [6.11.0] - 2026-03-18
6
+
7
+ ### Changed
8
+ - Improved library's loading performance.
9
+
5
10
  ## [6.10.0] - 2026-03-04
6
11
 
7
12
  ### Changed
@@ -11,7 +16,7 @@ All notable changes to this project are documented in this file.
11
16
  ## [6.9.0] - 2026-02-16
12
17
 
13
18
  ### Changed
14
- - Updated dependencies and internal types
19
+ - Updated dependencies and internal types.
15
20
 
16
21
  ## [6.8.0] - 2026-02-03
17
22
 
package/index.cjs CHANGED
@@ -48,6 +48,9 @@ __export(index_exports, {
48
48
  getCachedJSONSchemas: () => getCachedJSONSchemas,
49
49
  getJSONSchemaUrl: () => getJSONSchemaUrl,
50
50
  luzmoRefParserOptions: () => luzmoRefParserOptions,
51
+ preloadDashboard: () => import_shared_embed4.preloadDashboard,
52
+ preloadIQ: () => import_shared_embed4.preloadIQ,
53
+ preloadVizItem: () => import_shared_embed4.preloadVizItem,
51
54
  selectedDataUtils: () => import_shared_embed4.selectedDataUtils
52
55
  });
53
56
  module.exports = __toCommonJS(index_exports);
@@ -62,7 +65,7 @@ var import_decorators = require("lit/decorators.js");
62
65
  var import_style_map = require("lit/directives/style-map.js");
63
66
 
64
67
  // libs/embed-libs/embed/package.json
65
- var version = "6.10.0";
68
+ var version = "6.11.0";
66
69
 
67
70
  // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
68
71
  var SharedLib = __toESM(require("@luzmo/shared-embed"));
@@ -1644,5 +1647,8 @@ import_lit6.LitElement.disableWarning?.("change-in-update");
1644
1647
  getCachedJSONSchemas,
1645
1648
  getJSONSchemaUrl,
1646
1649
  luzmoRefParserOptions,
1650
+ preloadDashboard,
1651
+ preloadIQ,
1652
+ preloadVizItem,
1647
1653
  selectedDataUtils
1648
1654
  });
package/index.js CHANGED
@@ -10,7 +10,7 @@ var __decorateClass = (decorators, target, key, kind) => {
10
10
  };
11
11
 
12
12
  // libs/embed-libs/embed/src/index.ts
13
- import { selectedDataUtils } from "@luzmo/shared-embed";
13
+ import { selectedDataUtils, preloadDashboard, preloadVizItem, preloadIQ } from "@luzmo/shared-embed";
14
14
  import { LitElement as LitElement5 } from "lit";
15
15
 
16
16
  // libs/embed-libs/embed/src/lib/dashboard/dashboard-base.ts
@@ -23,7 +23,7 @@ import { property, query, state } from "lit/decorators.js";
23
23
  import { styleMap } from "lit/directives/style-map.js";
24
24
 
25
25
  // libs/embed-libs/embed/package.json
26
- var version = "6.10.0";
26
+ var version = "6.11.0";
27
27
 
28
28
  // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
29
29
  import * as SharedLib from "@luzmo/shared-embed";
@@ -1604,5 +1604,8 @@ export {
1604
1604
  getCachedJSONSchemas,
1605
1605
  getJSONSchemaUrl,
1606
1606
  luzmoRefParserOptions,
1607
+ preloadDashboard,
1608
+ preloadIQ,
1609
+ preloadVizItem,
1607
1610
  selectedDataUtils
1608
1611
  };
@@ -4063,6 +4063,9 @@ __export(index_exports, {
4063
4063
  getCachedJSONSchemas: () => getCachedJSONSchemas,
4064
4064
  getJSONSchemaUrl: () => getJSONSchemaUrl,
4065
4065
  luzmoRefParserOptions: () => luzmoRefParserOptions,
4066
+ preloadDashboard: () => preloadDashboard,
4067
+ preloadIQ: () => preloadIQ,
4068
+ preloadVizItem: () => preloadVizItem,
4066
4069
  selectedDataUtils: () => selectedDataUtils
4067
4070
  });
4068
4071
  module.exports = __toCommonJS(index_exports);
@@ -5291,6 +5294,27 @@ var federationRuntime = (0, import_runtime.createInstance)({
5291
5294
  });
5292
5295
  var remoteCache = /* @__PURE__ */ new Map();
5293
5296
  var remoteCounter = 0;
5297
+ var preconnectedOrigins = /* @__PURE__ */ new Set();
5298
+ function injectPreconnect(appServer) {
5299
+ if (typeof document === "undefined") {
5300
+ return;
5301
+ }
5302
+ let origin;
5303
+ try {
5304
+ origin = new URL(removeTrailingSlash(appServer)).origin;
5305
+ } catch {
5306
+ return;
5307
+ }
5308
+ if (preconnectedOrigins.has(origin)) {
5309
+ return;
5310
+ }
5311
+ preconnectedOrigins.add(origin);
5312
+ const link = document.createElement("link");
5313
+ link.rel = "preconnect";
5314
+ link.href = origin;
5315
+ link.crossOrigin = "anonymous";
5316
+ (document.head ?? document.documentElement).append(link);
5317
+ }
5294
5318
  function getManifestEntry(appServer, componentName) {
5295
5319
  const baseUrl = removeTrailingSlash(appServer);
5296
5320
  if (appServer.startsWith("http://localhost")) {
@@ -5324,6 +5348,7 @@ function getOrCreateRemote(appServer, componentName) {
5324
5348
  return remote;
5325
5349
  }
5326
5350
  function loadLibrary(appServer, componentName = "DashboardApp") {
5351
+ injectPreconnect(appServer);
5327
5352
  const remote = getOrCreateRemote(appServer, componentName);
5328
5353
  if (remote.module) {
5329
5354
  return Promise.resolve(remote.module);
@@ -5351,6 +5376,18 @@ function loadLibrary(appServer, componentName = "DashboardApp") {
5351
5376
  });
5352
5377
  return remote.loadPromise;
5353
5378
  }
5379
+ function preloadDashboard(appServer = "https://app.luzmo.com") {
5380
+ loadLibrary(appServer, "DashboardApp").catch(() => {
5381
+ });
5382
+ }
5383
+ function preloadVizItem(appServer = "https://app.luzmo.com") {
5384
+ loadLibrary(appServer, "VizItemApp").catch(() => {
5385
+ });
5386
+ }
5387
+ function preloadIQ(appServer = "https://app.luzmo.com") {
5388
+ loadLibrary(appServer, "IQApp").catch(() => {
5389
+ });
5390
+ }
5354
5391
 
5355
5392
  // node_modules/@lit/reactive-element/css-tag.js
5356
5393
  var t = globalThis;
@@ -6013,7 +6050,7 @@ var o6 = e6(class extends i5 {
6013
6050
  });
6014
6051
 
6015
6052
  // libs/embed-libs/embed/package.json
6016
- var version = "6.10.0";
6053
+ var version = "6.11.0";
6017
6054
 
6018
6055
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
6019
6056
  var LuzmoDashboardService = class {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "6.10.0-es2021",
3
+ "version": "6.11.0-es2021",
4
4
  "dependencies": {
5
5
  "lit": "^3.3.1",
6
- "@luzmo/shared-embed": "5.9.0"
6
+ "@luzmo/shared-embed": "5.10.0"
7
7
  },
8
8
  "keywords": [
9
9
  "es2021",
package/src/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type * from '@luzmo/dashboard-contents-types';
2
2
  export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, DashboardExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData, DashboardEditMode, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent, VizItemPostMessageAuthorizationExpiredEvent } from '@luzmo/shared-embed';
3
- export { selectedDataUtils } from '@luzmo/shared-embed';
3
+ export { selectedDataUtils, preloadDashboard, preloadVizItem, preloadIQ } from '@luzmo/shared-embed';
4
4
  export * from './lib/dashboard/dashboard-component';
5
5
  export * from './lib/viz-item/viz-item-component';
6
6
  export * from './lib/iq-components/luzmo-iq-chat';