@xpert-ai/chatkit-ui5 0.17.0 → 0.17.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.
package/dist/index.js CHANGED
@@ -382,7 +382,13 @@ function createSecureChannelId() {
382
382
  return null;
383
383
  }
384
384
  function safeRandomUUID() {
385
- return createSecureChannelId() ?? `ck_${Date.now()}_${Math.random().toString(16).slice(2)}`;
385
+ const id = createSecureChannelId();
386
+ if (id === null) {
387
+ throw new Error(
388
+ "ChatKit requires crypto.randomUUID or crypto.getRandomValues to generate secure UUIDs."
389
+ );
390
+ }
391
+ return id;
386
392
  }
387
393
  function isTrustedChatKitMessageEvent(event, { channelId, expectedOrigin, expectedSource }) {
388
394
  const payload = event.data;
@@ -2616,6 +2622,10 @@ class ChatKitElementBase extends (_c = HTMLElement, _focusComposer_dec = [requir
2616
2622
  }
2617
2623
  return connect(request);
2618
2624
  },
2625
+ onWorkbenchNavigationChange: async (navigation) => {
2626
+ var _a2, _b2, _c2;
2627
+ await ((_c2 = (_b2 = (_a2 = __privateGet(this, _opts)) == null ? void 0 : _a2.workbench) == null ? void 0 : _b2.onNavigationChange) == null ? void 0 : _c2.call(_b2, navigation));
2628
+ },
2619
2629
  onWorkbenchClientCommand: async ({
2620
2630
  commandKey,
2621
2631
  payload,