@mgamadeus/ddd-agents 0.11.4 → 0.11.6

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 (34) hide show
  1. package/dist/chat.js +9 -9
  2. package/dist/chunks/{ConversationMarkdown-DCm4ll82.js → ConversationMarkdown-D-aP3Ssl.js} +3 -3
  3. package/dist/chunks/{ConversationMarkdown-DCm4ll82.js.map → ConversationMarkdown-D-aP3Ssl.js.map} +1 -1
  4. package/dist/chunks/{ConversationMessageInputComposerWidgets-BQcgcvgL.js → ConversationMessageInputComposerWidgets-7HNAmZE1.js} +5 -5
  5. package/dist/chunks/{ConversationMessageInputComposerWidgets-BQcgcvgL.js.map → ConversationMessageInputComposerWidgets-7HNAmZE1.js.map} +1 -1
  6. package/dist/chunks/{VoiceBarsIcon-h6Tsr8aW.js → VoiceBarsIcon-FhLAcgLG.js} +3 -3
  7. package/dist/chunks/{VoiceBarsIcon-h6Tsr8aW.js.map → VoiceBarsIcon-FhLAcgLG.js.map} +1 -1
  8. package/dist/chunks/{WebSearchResultsConversationWidget-CUtKAdMM.js → WebSearchResultsConversationWidget-dEq19U7k.js} +105 -103
  9. package/dist/chunks/WebSearchResultsConversationWidget-dEq19U7k.js.map +1 -0
  10. package/dist/chunks/{canvas-reducers-CAtcbD4i.js → canvas-reducers-BInd3xNz.js} +2 -2
  11. package/dist/chunks/{canvas-reducers-CAtcbD4i.js.map → canvas-reducers-BInd3xNz.js.map} +1 -1
  12. package/dist/chunks/{canvas-title-slot-context-C4o3GH-d.js → canvas-title-slot-context-BI1PLnPn.js} +2 -2
  13. package/dist/chunks/{canvas-title-slot-context-C4o3GH-d.js.map → canvas-title-slot-context-BI1PLnPn.js.map} +1 -1
  14. package/dist/chunks/{canvasBodies-CWAk_98Z.js → canvasBodies-CRVh8pCw.js} +3 -3
  15. package/dist/chunks/{canvasBodies-CWAk_98Z.js.map → canvasBodies-CRVh8pCw.js.map} +1 -1
  16. package/dist/chunks/{canvasStorage-D9EnBraV.js → canvasStorage-Cr3omZeI.js} +2 -2
  17. package/dist/chunks/{canvasStorage-D9EnBraV.js.map → canvasStorage-Cr3omZeI.js.map} +1 -1
  18. package/dist/chunks/{widget-name-resolver-Bv6EFL24.js → widget-name-resolver-Dq6Ejo7d.js} +669 -465
  19. package/dist/chunks/widget-name-resolver-Dq6Ejo7d.js.map +1 -0
  20. package/dist/client-testing.js +4 -4
  21. package/dist/files/i18n-keys.json +46 -4
  22. package/dist/files/renderer/widget-tree/composed-node-schema.json +1 -0
  23. package/dist/image-render.js +7 -7
  24. package/dist/index.js +5 -5
  25. package/dist/kit.js +2 -2
  26. package/dist/preview.js +5 -5
  27. package/dist/renderer.js +8 -8
  28. package/dist/styles.css +116 -15
  29. package/dist/voice.js +1 -1
  30. package/dist/widgets.js +79 -80
  31. package/dist/widgets.js.map +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunks/WebSearchResultsConversationWidget-CUtKAdMM.js.map +0 -1
  34. package/dist/chunks/widget-name-resolver-Bv6EFL24.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { a as AgentsClientError, C as CONVERSATION_RUN_STATES_THAT_END_THE_CONVERSATION, r as readConversationRunStatusOfRunState } from "./chunks/conversation-CbWEHPbL.js";
3
3
  import { c as composeAttachmentMessageText } from "./chunks/compose-attachment-message-text-FvVJbrge.js";
4
- import { l as listWidgetHydratorTypes, k as getWidgetHydrator, h as registerWidgetHydrator, m as abandonWidgetHydrationReads, u as unregisterWidgetHydrator } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
5
- import { j as conversationWidgetRegistry, k as replaceConversationWidgetRegistryEntries } from "./chunks/widget-name-resolver-Bv6EFL24.js";
6
- import { l, s } from "./chunks/widget-name-resolver-Bv6EFL24.js";
7
- import { c, r, s as s2 } from "./chunks/canvasStorage-D9EnBraV.js";
4
+ import { l as listWidgetHydratorTypes, k as getWidgetHydrator, h as registerWidgetHydrator, m as abandonWidgetHydrationReads, u as unregisterWidgetHydrator } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
5
+ import { j as conversationWidgetRegistry, k as replaceConversationWidgetRegistryEntries } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
6
+ import { l, s } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
7
+ import { c, r, s as s2 } from "./chunks/canvasStorage-Cr3omZeI.js";
8
8
  const DEFAULT_SCRIPTED_ASSISTANT_ANSWER = "Done.";
9
9
  const DEFAULT_PAGE_SIZE = 50;
10
10
  const copyOf = (value) => JSON.parse(JSON.stringify(value));
@@ -427,6 +427,15 @@
427
427
  "src/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageHeader/ConversationMessageHeader.tsx"
428
428
  ]
429
429
  },
430
+ {
431
+ "key": "Bcc",
432
+ "defaultText": "Bcc",
433
+ "placeholders": [],
434
+ "contexts": [],
435
+ "usedIn": [
436
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
437
+ ]
438
+ },
430
439
  {
431
440
  "key": "Booked seconds",
432
441
  "defaultText": "Booked seconds",
@@ -472,6 +481,15 @@
472
481
  "src/voice/admin/agent-voice-admin-format.ts"
473
482
  ]
474
483
  },
484
+ {
485
+ "key": "Cc",
486
+ "defaultText": "Cc",
487
+ "placeholders": [],
488
+ "contexts": [],
489
+ "usedIn": [
490
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
491
+ ]
492
+ },
475
493
  {
476
494
  "key": "Clarifying response…",
477
495
  "defaultText": "Clarifying response…",
@@ -890,6 +908,15 @@
890
908
  "src/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.tsx"
891
909
  ]
892
910
  },
911
+ {
912
+ "key": "From",
913
+ "defaultText": "From",
914
+ "placeholders": [],
915
+ "contexts": [],
916
+ "usedIn": [
917
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
918
+ ]
919
+ },
893
920
  {
894
921
  "key": "Gathering business data…",
895
922
  "defaultText": "Gathering business data…",
@@ -1702,7 +1729,8 @@
1702
1729
  "placeholders": [],
1703
1730
  "contexts": [],
1704
1731
  "usedIn": [
1705
- "src/kit/components/form/Form.composed.tsx"
1732
+ "src/kit/components/form/Form.composed.tsx",
1733
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
1706
1734
  ]
1707
1735
  },
1708
1736
  {
@@ -1714,13 +1742,23 @@
1714
1742
  "src/chat/ConversationMessageInput/ConversationMessageInput.tsx"
1715
1743
  ]
1716
1744
  },
1745
+ {
1746
+ "key": "Sending…",
1747
+ "defaultText": "Sending…",
1748
+ "placeholders": [],
1749
+ "contexts": [],
1750
+ "usedIn": [
1751
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
1752
+ ]
1753
+ },
1717
1754
  {
1718
1755
  "key": "Sent",
1719
1756
  "defaultText": "Sent",
1720
1757
  "placeholders": [],
1721
1758
  "contexts": [],
1722
1759
  "usedIn": [
1723
- "src/kit/components/form/Form.composed.tsx"
1760
+ "src/kit/components/form/Form.composed.tsx",
1761
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
1724
1762
  ]
1725
1763
  },
1726
1764
  {
@@ -1778,7 +1816,8 @@
1778
1816
  "placeholders": [],
1779
1817
  "contexts": [],
1780
1818
  "usedIn": [
1781
- "src/kit/components/text/Text.composed.tsx"
1819
+ "src/kit/components/text/Text.composed.tsx",
1820
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
1782
1821
  ]
1783
1822
  },
1784
1823
  {
@@ -1787,7 +1826,8 @@
1787
1826
  "placeholders": [],
1788
1827
  "contexts": [],
1789
1828
  "usedIn": [
1790
- "src/kit/components/text/Text.composed.tsx"
1829
+ "src/kit/components/text/Text.composed.tsx",
1830
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx"
1791
1831
  ]
1792
1832
  },
1793
1833
  {
@@ -1942,6 +1982,7 @@
1942
1982
  "placeholders": [],
1943
1983
  "contexts": [],
1944
1984
  "usedIn": [
1985
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx",
1945
1986
  "src/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftWidget.tsx"
1946
1987
  ]
1947
1988
  },
@@ -2555,6 +2596,7 @@
2555
2596
  "placeholders": [],
2556
2597
  "contexts": [],
2557
2598
  "usedIn": [
2599
+ "src/widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.tsx",
2558
2600
  "src/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftWidget.tsx"
2559
2601
  ]
2560
2602
  },
@@ -3422,6 +3422,7 @@
3422
3422
  "EntityMention",
3423
3423
  "ExtendConnectionPermission",
3424
3424
  "ImageGallery",
3425
+ "MailDraftPreview",
3425
3426
  "MultiChoice",
3426
3427
  "QuickReplies",
3427
3428
  "SuggestedActions",
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import React, { useRef, useEffect } from "react";
4
- import { G as resolveWidgetName, j as conversationWidgetRegistry } from "./chunks/widget-name-resolver-Bv6EFL24.js";
5
- import { H } from "./chunks/widget-name-resolver-Bv6EFL24.js";
6
- import { z as ConversationWidgetRenderContext, a7 as WidgetImageReadinessContext, R as ReadOnlyConversationWidgetProvider, a8 as WidgetImageRenderContext, a9 as WidgetImageLiveHydrationContext, A as buildWidgetAgentSpaceKeyProps } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
7
- import { aa, ab, ac } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
4
+ import { G as resolveWidgetName, j as conversationWidgetRegistry } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
5
+ import { H } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
6
+ import { z as ConversationWidgetRenderContext, bi as WidgetImageReadinessContext, R as ReadOnlyConversationWidgetProvider, bj as WidgetImageRenderContext, bk as WidgetImageLiveHydrationContext, A as buildWidgetAgentSpaceKeyProps } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
7
+ import { bl, bm, bn } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
8
8
  import { r as readWidgetImageReadiness, p as publishWidgetImageReadiness, i as interceptXMLHttpRequests, a as interceptFetchRequests, c as createHeaderlessResponse, t as toSameRealmFetchInput } from "./chunks/browser-request-interception-ydNOzeUL.js";
9
9
  import { W, b } from "./chunks/browser-request-interception-ydNOzeUL.js";
10
10
  import { U as getGoogleMapWidgetNames, X as getWidgetImageCaptureReadPathPrefix } from "./chunks/link-navigation-DRHt6g7U.js";
@@ -367,12 +367,12 @@ export {
367
367
  isGoogleMapCapture,
368
368
  publishWidgetImageReadiness,
369
369
  H as readComposedViewDataTimes,
370
- aa as readFrozenHydration,
370
+ bl as readFrozenHydration,
371
371
  readWidgetImageReadiness,
372
372
  b as readWidgetImageReadinessGlobalNames,
373
373
  registerStaticWidgetImageComponents,
374
374
  staticWidgetImageComponents,
375
- ab as useWidgetImageLiveHydration,
376
- ac as useWidgetImageRender
375
+ bm as useWidgetImageLiveHydration,
376
+ bn as useWidgetImageRender
377
377
  };
378
378
  //# sourceMappingURL=image-render.js.map
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { h, i } from "./chunks/widget-name-resolver-Bv6EFL24.js";
3
- import { r as registerCanvasBodies, c as canvasBodies } from "./chunks/canvasBodies-CWAk_98Z.js";
4
- import { g, a, b } from "./chunks/canvasBodies-CWAk_98Z.js";
5
- import { a as isPackageCanvasId, d as declareCanvasKind, f as forgetCanvasKind } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
6
- import { r, b as b2, c, e, g as g2, h as h2 } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
2
+ import { h, i } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
3
+ import { r as registerCanvasBodies, c as canvasBodies } from "./chunks/canvasBodies-CRVh8pCw.js";
4
+ import { g, a, b } from "./chunks/canvasBodies-CRVh8pCw.js";
5
+ import { a as isPackageCanvasId, d as declareCanvasKind, f as forgetCanvasKind } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
6
+ import { r, b as b2, c, e, g as g2, h as h2 } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
7
7
  import { r as registerCanvasFeatureFlags, c as canvasFeatureFlags } from "./chunks/canvas-feature-flags-Cn8xBliA.js";
8
8
  import { A, i as i2 } from "./chunks/icon-names-Di6c4zLo.js";
9
9
  import { A as A2, f } from "./chunks/host-color-scheme-Jhb7JZR7.js";
package/dist/kit.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { A, C, a, b, c, d, e, E, r, f, u, g } from "./chunks/widget-name-resolver-Bv6EFL24.js";
3
- import { M } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
2
+ import { A, C, a, b, c, d, e, E, r, f, u, g } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
3
+ import { M } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
4
4
  import { E as E2, u as u2 } from "./chunks/entity-detail-name-3A82gDAp.js";
5
5
  export {
6
6
  A as ApexChart,
package/dist/preview.js CHANGED
@@ -2,12 +2,12 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { s as Text, Y as getWidgetSelfHydrationKeyFieldName, e as DEFAULT_WIDGET_SELF_HYDRATION_KEY_FIELD_NAME, V as getSandboxLegacyAliases } from "./chunks/link-navigation-DRHt6g7U.js";
4
4
  import { useRef, useState, useMemo, useEffect, useCallback } from "react";
5
- import { Q as buildComposedViewComponentRegistry, R as composedViewComponents, G as resolveWidgetName, j as conversationWidgetRegistry, o as ConversationWidgetErrorBoundary, S as ComposedViewComponentsContext } from "./chunks/widget-name-resolver-Bv6EFL24.js";
6
- import { aN as WidgetSurface, Z as readWidgetAgentSpaceKeyAttribute, j as canvasBehaviourOf, W as WidgetRenderReportContext, A as buildWidgetAgentSpaceKeyProps, S as StandaloneConversationWidgetProvider, z as ConversationWidgetRenderContext, a8 as WidgetImageRenderContext, ah as CANVAS_VIABLE_MIN_WIDTH, l as listWidgetHydratorTypes, k as getWidgetHydrator, u as unregisterWidgetHydrator, h as registerWidgetHydrator } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
7
- import { c as canvasBodies, E as EntityMentionAskButton } from "./chunks/canvasBodies-CWAk_98Z.js";
8
- import { f as decideCanvasOpen } from "./chunks/canvas-reducers-CAtcbD4i.js";
5
+ import { Q as buildComposedViewComponentRegistry, R as composedViewComponents, G as resolveWidgetName, j as conversationWidgetRegistry, o as ConversationWidgetErrorBoundary, S as ComposedViewComponentsContext } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
6
+ import { aI as WidgetSurface, Z as readWidgetAgentSpaceKeyAttribute, j as canvasBehaviourOf, W as WidgetRenderReportContext, A as buildWidgetAgentSpaceKeyProps, S as StandaloneConversationWidgetProvider, z as ConversationWidgetRenderContext, bj as WidgetImageRenderContext, ab as CANVAS_VIABLE_MIN_WIDTH, l as listWidgetHydratorTypes, k as getWidgetHydrator, u as unregisterWidgetHydrator, h as registerWidgetHydrator } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
7
+ import { c as canvasBodies, E as EntityMentionAskButton } from "./chunks/canvasBodies-CRVh8pCw.js";
8
+ import { f as decideCanvasOpen } from "./chunks/canvas-reducers-BInd3xNz.js";
9
9
  import { p as publishWidgetImageReadiness, i as interceptXMLHttpRequests, d as isFetchRequest, c as createHeaderlessResponse } from "./chunks/browser-request-interception-ydNOzeUL.js";
10
- import { C as ConversationWidgetProvider, a as ConversationMessageInputComposerWidgets } from "./chunks/ConversationMessageInputComposerWidgets-BQcgcvgL.js";
10
+ import { C as ConversationWidgetProvider, a as ConversationMessageInputComposerWidgets } from "./chunks/ConversationMessageInputComposerWidgets-7HNAmZE1.js";
11
11
  const page$1 = "agents_page_5VMDeD";
12
12
  const chatColumn = "agents_chatColumn_FWcgdJ";
13
13
  const widget = "agents_widget_3qpgMy";
package/dist/renderer.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { C, a, M, W, b, c, d, p, s } from "./chunks/ConversationMarkdown-DCm4ll82.js";
3
- import { m as findWidgetFenceByPayloadHash, n as findWidgetFencesInMarkdown } from "./chunks/widget-name-resolver-Bv6EFL24.js";
4
- import { o, p as p2, q, t, v, w, j, x, y, z, B, D, F, G } from "./chunks/widget-name-resolver-Bv6EFL24.js";
5
- import { n as useResolvedConversationWidgetAgentSpaceKey, p as payloadHashOfInstanceId } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
6
- import { C as C2, o as o2, q as q2, t as t2, v as v2, w as w2, x as x2, y as y2, z as z2, D as D2, L, R, S, W as W2, A, j as j2, B as B2, E, F as F2, G as G2, H, I, J, K, N, O, P, k, Q, T, i, U, a as a2, V, X, Y, Z, _, h, $, s as s2, a0, u, a1, a2 as a22, a3, a4, a5, a6 } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
7
- import { C as C3, d as d2, g, i as i2, r, u as u2 } from "./chunks/canvas-title-slot-context-C4o3GH-d.js";
8
- import { c as c2, u as u3 } from "./chunks/canvasBodies-CWAk_98Z.js";
2
+ import { C, a, M, W, b, c, d, p, s } from "./chunks/ConversationMarkdown-D-aP3Ssl.js";
3
+ import { m as findWidgetFenceByPayloadHash, n as findWidgetFencesInMarkdown } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
4
+ import { o, p as p2, q, t, v, w, j, x, y, z, B, D, F, G } from "./chunks/widget-name-resolver-Dq6Ejo7d.js";
5
+ import { n as useResolvedConversationWidgetAgentSpaceKey, p as payloadHashOfInstanceId } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
6
+ import { C as C2, o as o2, q as q2, t as t2, v as v2, w as w2, x as x2, y as y2, z as z2, D as D2, L, R, S, W as W2, A, j as j2, B as B2, E, F as F2, G as G2, H, I, J, K, N, O, P, k, Q, T, i, U, a as a2, V, X, Y, Z, _, h, $, s as s2, a0, u, a1, a2 as a22, a3, a4, a5, a6 } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
7
+ import { C as C3, d as d2, g, i as i2, r, u as u2 } from "./chunks/canvas-title-slot-context-BI1PLnPn.js";
8
+ import { c as c2, u as u3 } from "./chunks/canvasBodies-CRVh8pCw.js";
9
9
  import { jsxs, jsx } from "react/jsx-runtime";
10
10
  import { n as Skeleton } from "./chunks/link-navigation-DRHt6g7U.js";
11
11
  import { ac, ad, ae, af, ag } from "./chunks/link-navigation-DRHt6g7U.js";
12
12
  import { useMemo } from "react";
13
- import { a as a7, b as b2, c as c3, d as d3, e } from "./chunks/canvas-reducers-CAtcbD4i.js";
13
+ import { a as a7, b as b2, c as c3, d as d3, e } from "./chunks/canvas-reducers-BInd3xNz.js";
14
14
  import { a as a8 } from "./chunks/canvas-feature-flags-Cn8xBliA.js";
15
15
  const pickSection = (payloadValue, fallback) => {
16
16
  return payloadValue ?? fallback.data ?? void 0;
package/dist/styles.css CHANGED
@@ -4399,6 +4399,107 @@ thead + tbody .agents_row_VBlQR-:first-child {
4399
4399
  gap: 8px;
4400
4400
  min-width: 0;
4401
4401
  overflow-wrap: anywhere;
4402
+ }.agents_root_KKERY6 {
4403
+ display: flex;
4404
+ flex-direction: column;
4405
+ gap: 0.75rem;
4406
+ min-width: 0;
4407
+ }
4408
+
4409
+ .agents_header_EV1xj0 {
4410
+ display: flex;
4411
+ align-items: flex-start;
4412
+ justify-content: space-between;
4413
+ gap: 0.75rem;
4414
+ min-width: 0;
4415
+ }
4416
+
4417
+ .agents_fields_qoX-e2 {
4418
+ display: grid;
4419
+ grid-template-columns: max-content minmax(0, 1fr);
4420
+ column-gap: 0.75rem;
4421
+ row-gap: 0.25rem;
4422
+ flex: 1 1 auto;
4423
+ min-width: 0;
4424
+ margin: 0;
4425
+ }
4426
+
4427
+ .agents_field_6CVNp- {
4428
+ display: contents;
4429
+ }
4430
+ .agents_field_6CVNp- dt,
4431
+ .agents_field_6CVNp- dd {
4432
+ margin: 0;
4433
+ }
4434
+
4435
+ .agents_fieldValue_06PTqf {
4436
+ min-width: 0;
4437
+ overflow-wrap: anywhere;
4438
+ }
4439
+
4440
+ .agents_sentChip_zbIAax {
4441
+ flex: none;
4442
+ }
4443
+
4444
+ .agents_bodySection_A4vdWK {
4445
+ display: flex;
4446
+ flex-direction: column;
4447
+ gap: 0.25rem;
4448
+ padding-top: 0.75rem;
4449
+ border-top: 0.0625rem solid var(--agents-divider-gl);
4450
+ min-width: 0;
4451
+ }
4452
+
4453
+ .agents_body_kktg8k {
4454
+ position: relative;
4455
+ min-width: 0;
4456
+ overflow-x: auto;
4457
+ overflow-wrap: anywhere;
4458
+ }
4459
+ .agents_body_kktg8k .agents-markdown table {
4460
+ font-size: 0.75rem;
4461
+ line-height: 1rem;
4462
+ }
4463
+ .agents_body_kktg8k .agents-markdown th, .agents_body_kktg8k .agents-markdown td {
4464
+ padding: 0.125rem 0.5rem;
4465
+ border: 1px solid var(--agents-divider-gl);
4466
+ }
4467
+ .agents_body_kktg8k .agents-markdown th {
4468
+ background: var(--agents-bg-var);
4469
+ }
4470
+ .agents_body_kktg8k .agents-markdown tbody tr:nth-child(even) {
4471
+ background: color-mix(in srgb, var(--agents-bg-var) 45%, transparent);
4472
+ }
4473
+
4474
+ .agents_bodyFolded_2qvJSw {
4475
+ overflow: hidden;
4476
+ }
4477
+ .agents_bodyFolded_2qvJSw::after {
4478
+ content: "";
4479
+ position: absolute;
4480
+ inset: auto 0 0;
4481
+ height: 4rem;
4482
+ background: linear-gradient(to bottom, transparent, var(--agents-bg-surface));
4483
+ pointer-events: none;
4484
+ }
4485
+
4486
+ .agents_foldToggle_oeM0KI {
4487
+ align-self: flex-start;
4488
+ padding: 0;
4489
+ border: 0;
4490
+ background: none;
4491
+ cursor: pointer;
4492
+ text-decoration: underline dotted;
4493
+ text-decoration-color: var(--agents-fg-light);
4494
+ text-underline-offset: 0.25rem;
4495
+ }
4496
+ .agents_foldToggle_oeM0KI:hover {
4497
+ text-decoration-style: solid;
4498
+ }
4499
+
4500
+ .agents_actions_FU-EZk {
4501
+ display: flex;
4502
+ justify-content: flex-end;
4402
4503
  }.agents_entityDetail_QEy9QH {
4403
4504
  display: flex;
4404
4505
  flex-direction: column;
@@ -5874,6 +5975,21 @@ thead + tbody .agents_row_VBlQR-:first-child {
5874
5975
  font-style: normal;
5875
5976
  font-weight: 600;
5876
5977
  text-decoration: underline;
5978
+ }.agents_widgetLabel_WecWAw {
5979
+ text-transform: uppercase;
5980
+ letter-spacing: 0.08em;
5981
+ }.agents_cardFooter_7HSIGK {
5982
+ display: flex;
5983
+ justify-content: space-between;
5984
+ align-items: center;
5985
+ gap: 0.75rem;
5986
+ margin-top: auto;
5987
+ }
5988
+
5989
+ @container chatPane (max-width: 900px) {
5990
+ .agents_cardFooter_7HSIGK {
5991
+ flex-wrap: wrap;
5992
+ }
5877
5993
  }@layer agents-defaults {
5878
5994
  html:has(.agents_root_prMo3u),
5879
5995
  body:has(.agents_root_prMo3u) {
@@ -5895,21 +6011,6 @@ thead + tbody .agents_row_VBlQR-:first-child {
5895
6011
  animation: none !important;
5896
6012
  transition: none !important;
5897
6013
  caret-color: transparent !important;
5898
- }.agents_widgetLabel_WecWAw {
5899
- text-transform: uppercase;
5900
- letter-spacing: 0.08em;
5901
- }.agents_cardFooter_7HSIGK {
5902
- display: flex;
5903
- justify-content: space-between;
5904
- align-items: center;
5905
- gap: 0.75rem;
5906
- margin-top: auto;
5907
- }
5908
-
5909
- @container chatPane (max-width: 900px) {
5910
- .agents_cardFooter_7HSIGK {
5911
- flex-wrap: wrap;
5912
- }
5913
6014
  }.agents_message_BScH1l {
5914
6015
  max-width: min(37.5rem, 100%);
5915
6016
  background-color: var(--agents-assistant-400, red);
package/dist/voice.js CHANGED
@@ -5,7 +5,7 @@ import { f as formatAgentVoiceCallDuration } from "./chunks/format-agent-voice-c
5
5
  import { a as useOptionalAgentsConversationClient } from "./chunks/AgentsConversationClientContext-C4T7g_Qk.js";
6
6
  import { c as DEFAULT_AGENTS_TEXTS, ab as useAgentsTexts, K as getAgentDisplayName, a4 as useAgentsComponents, D as DEFAULT_AGENTS_COMPONENTS } from "./chunks/link-navigation-DRHt6g7U.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { V as VoiceBarsIcon, C as ConversationMessageWidgets, a as ConversationMessageUser } from "./chunks/VoiceBarsIcon-h6Tsr8aW.js";
8
+ import { V as VoiceBarsIcon, C as ConversationMessageWidgets, a as ConversationMessageUser } from "./chunks/VoiceBarsIcon-FhLAcgLG.js";
9
9
  import { a as useOptionalAgentsChatStore, u as useAgentsChatSelector } from "./chunks/use-agents-chat-store-CuIkCz9v.js";
10
10
  class AgentVoiceApiError extends Error {
11
11
  constructor(code, httpStatus) {
package/dist/widgets.js CHANGED
@@ -1,11 +1,10 @@
1
1
  "use client";
2
- import { a2 as useIsEmailWidgetRender } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
3
- import { ad, ae, af, ag, ah, ai, aj, ak, aj as aj2, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm } from "./chunks/WebSearchResultsConversationWidget-CUtKAdMM.js";
2
+ import { a2 as useIsEmailWidgetRender } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
3
+ import { a7, a8, a9, aa, ab, ac, ad, ae, ad as ad2, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh } from "./chunks/WebSearchResultsConversationWidget-dEq19U7k.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { r as StatusChip, s as Text, F as classNames } from "./chunks/link-navigation-DRHt6g7U.js";
5
+ import { s as Text, F as classNames } from "./chunks/link-navigation-DRHt6g7U.js";
6
6
  import { g, x } from "./chunks/link-navigation-DRHt6g7U.js";
7
7
  import { useSyncExternalStore, useState, useEffect } from "react";
8
- const WidgetStatusChip = (props) => /* @__PURE__ */ jsx(StatusChip, { ...props });
9
8
  const widgetLabel = "agents_widgetLabel_WecWAw";
10
9
  const styles$1 = {
11
10
  widgetLabel
@@ -76,88 +75,88 @@ const useElementVisible = (ref) => {
76
75
  return intersecting && documentVisible;
77
76
  };
78
77
  export {
79
- ad as ATTACHED_FILES_MAX,
80
- ae as ATTACHED_FILES_WIDGET_TYPE,
81
- af as AttachedFilesConversationWidget,
82
- ag as AttachedFilesStrip,
83
- ah as CANVAS_VIABLE_MIN_WIDTH,
84
- ai as CUSTOM_VISUALIZATION_SANDBOX_CONFIG,
85
- aj as CanvasLauncherWidget,
86
- ak as CanvasViabilityContext,
87
- aj2 as CanvasWidgetCard,
88
- al as CanvasWidgetSwitch,
78
+ a7 as ATTACHED_FILES_MAX,
79
+ a8 as ATTACHED_FILES_WIDGET_TYPE,
80
+ a9 as AttachedFilesConversationWidget,
81
+ aa as AttachedFilesStrip,
82
+ ab as CANVAS_VIABLE_MIN_WIDTH,
83
+ ac as CUSTOM_VISUALIZATION_SANDBOX_CONFIG,
84
+ ad as CanvasLauncherWidget,
85
+ ae as CanvasViabilityContext,
86
+ ad2 as CanvasWidgetCard,
87
+ af as CanvasWidgetSwitch,
89
88
  WidgetFooter as CardFooter,
90
- am as ClockConversationWidget,
91
- an as ConceptExplainerConversationWidget,
92
- ao as ConversationSearchResultsConversationWidget,
93
- ap as CurrencyConverterConversationWidget,
94
- aq as CustomVisualizationConversationWidget,
95
- ar as DRIVE_FILES_MAX_FILES,
96
- as as DRIVE_FILES_WIDGET_TYPE,
97
- at as DRIVE_FILE_CARDS_SOURCE_MISSING,
98
- au as DonePill,
99
- av as DriveFilesConversationWidget,
100
- aw as ElementWidthCanvasViability,
101
- ax as EntityMentionConversationWidget,
102
- ay as FILE_PREVIEW_SOURCE_MISSING,
89
+ ag as ClockConversationWidget,
90
+ ah as ConceptExplainerConversationWidget,
91
+ ai as ConversationSearchResultsConversationWidget,
92
+ aj as CurrencyConverterConversationWidget,
93
+ ak as CustomVisualizationConversationWidget,
94
+ al as DRIVE_FILES_MAX_FILES,
95
+ am as DRIVE_FILES_WIDGET_TYPE,
96
+ an as DRIVE_FILE_CARDS_SOURCE_MISSING,
97
+ ao as DonePill,
98
+ ap as DriveFilesConversationWidget,
99
+ aq as ElementWidthCanvasViability,
100
+ ar as EntityMentionConversationWidget,
101
+ as as FILE_PREVIEW_SOURCE_MISSING,
103
102
  g as HeroValue,
104
- az as IMAGE_GALLERY_MAX_FILES,
105
- aA as IMAGE_GALLERY_WIDGET_TYPE,
106
- aB as ImageGalleryConversationWidget,
107
- aC as MultiChoiceConversationWidget,
108
- aD as QuickRepliesConversationWidget,
109
- aE as SkeletonCircle,
110
- aF as SkeletonLine,
111
- aG as SkeletonPill,
112
- aH as SkeletonWidgetLabel,
113
- aI as SuggestedActions,
114
- aJ as ToolTraceConversationWidget,
115
- aK as WebSearchResultsConversationWidget,
103
+ at as IMAGE_GALLERY_MAX_FILES,
104
+ au as IMAGE_GALLERY_WIDGET_TYPE,
105
+ av as ImageGalleryConversationWidget,
106
+ aw as MultiChoiceConversationWidget,
107
+ ax as QuickRepliesConversationWidget,
108
+ ay as SkeletonCircle,
109
+ az as SkeletonLine,
110
+ aA as SkeletonPill,
111
+ aB as SkeletonWidgetLabel,
112
+ aC as SuggestedActions,
113
+ aD as ToolTraceConversationWidget,
114
+ aE as WebSearchResultsConversationWidget,
116
115
  WidgetFooter,
117
- aL as WidgetKpiValue,
116
+ aF as WidgetKpiValue,
118
117
  WidgetLabel,
119
- aM as WidgetListRow,
120
- WidgetStatusChip,
121
- aN as WidgetSurface,
122
- aO as WidgetSurfaceSkeleton,
118
+ aG as WidgetListRow,
119
+ aH as WidgetStatusChip,
120
+ aI as WidgetSurface,
121
+ aJ as WidgetSurfaceSkeleton,
123
122
  x as WidgetText,
124
- aP as WritingDraftConversationWidget,
125
- aQ as buildAttachedFilesComposerWidget,
126
- aR as buildImageGalleryDeclineSentence,
127
- aS as buildImageGalleryPickSentence,
128
- aT as canvasForMessageWidget,
123
+ aK as WritingDraftConversationWidget,
124
+ aL as buildAttachedFilesComposerWidget,
125
+ aM as buildImageGalleryDeclineSentence,
126
+ aN as buildImageGalleryPickSentence,
127
+ aO as canvasForMessageWidget,
129
128
  createEntityUpdateChannel,
130
- aU as driveFileCanvasTargetOf,
131
- aV as driveFileCardToOpen,
132
- aW as driveFileFamilyOf,
133
- aX as driveFileTypeLabelOf,
134
- aY as formatConceptExplainerNumber,
135
- aZ as formatDriveFileSize,
136
- a_ as isDriveFileCardExpired,
137
- a$ as nodeIdOfReference,
138
- b0 as normalizeSearchHitExcerpt,
139
- b1 as parseDriveFilesPayload,
140
- b2 as parseImageGalleryPayload,
141
- b3 as pickAllowed,
142
- b4 as pickAllowedValue,
143
- b5 as pickReviewExternalId,
144
- b6 as pickSafeAlias,
145
- b7 as pickSafeAliases,
146
- b8 as pickText,
147
- b9 as readAttachedFiles,
148
- ba as readCanvasViable,
149
- bb as readConceptExplainerNumber,
150
- bc as readConceptExplainerValue,
151
- bd as readDriveFileCanvasOpener,
152
- be as readDriveFileCardsSource,
153
- bf as readFilePreviewSource,
154
- bg as resolveCustomVisualizationFrameUrl,
155
- bh as safeDriveFileOpenLink,
156
- bi as unregisterDriveFileCanvasOpener,
157
- bj as unregisterDriveFileCardsSource,
158
- bk as unregisterFilePreviewSource,
159
- bl as useCanvasViable,
129
+ aP as driveFileCanvasTargetOf,
130
+ aQ as driveFileCardToOpen,
131
+ aR as driveFileFamilyOf,
132
+ aS as driveFileTypeLabelOf,
133
+ aT as formatConceptExplainerNumber,
134
+ aU as formatDriveFileSize,
135
+ aV as isDriveFileCardExpired,
136
+ aW as nodeIdOfReference,
137
+ aX as normalizeSearchHitExcerpt,
138
+ aY as parseDriveFilesPayload,
139
+ aZ as parseImageGalleryPayload,
140
+ a_ as pickAllowed,
141
+ a$ as pickAllowedValue,
142
+ b0 as pickReviewExternalId,
143
+ b1 as pickSafeAlias,
144
+ b2 as pickSafeAliases,
145
+ b3 as pickText,
146
+ b4 as readAttachedFiles,
147
+ b5 as readCanvasViable,
148
+ b6 as readConceptExplainerNumber,
149
+ b7 as readConceptExplainerValue,
150
+ b8 as readDriveFileCanvasOpener,
151
+ b9 as readDriveFileCardsSource,
152
+ ba as readFilePreviewSource,
153
+ bb as resolveCustomVisualizationFrameUrl,
154
+ bc as safeDriveFileOpenLink,
155
+ bd as unregisterDriveFileCanvasOpener,
156
+ be as unregisterDriveFileCardsSource,
157
+ bf as unregisterFilePreviewSource,
158
+ bg as useCanvasViable,
160
159
  useElementVisible,
161
- bm as useFilePictureUrl
160
+ bh as useFilePictureUrl
162
161
  };
163
162
  //# sourceMappingURL=widgets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widgets.js","sources":["../src/widgets/_shared/modern/WidgetStatusChip.tsx","../src/widgets/_shared/WidgetLabel.tsx","../src/widgets/_shared/WidgetFooter.tsx","../src/widgets/_shared/entity-update-channel.ts","../src/widgets/_shared/use-element-visible.ts"],"sourcesContent":["import { StatusChip, type AgentsStatusChipProps, type AgentsStatusChipTone } from \"../../../provider/components\";\n\nexport type WidgetStatusTone = AgentsStatusChipTone;\n\nexport type WidgetStatusChipProps = AgentsStatusChipProps;\n\n/**\n * The status chip of the chat widgets: the `StatusChip` component (in the app: the dashboard's status\n * pill), so the chat and the dashboard read the same.\n */\nexport const WidgetStatusChip = (props: WidgetStatusChipProps) => <StatusChip {...props} />;\n","import { Text, type AgentsTextReplacements } from \"../../provider/components\";\nimport React from \"react\";\nimport styles from \"./WidgetLabel.module.scss\";\n\ninterface WidgetLabelProps {\n children: React.ReactNode;\n replacements?: AgentsTextReplacements;\n}\n\nexport const WidgetLabel = (props: WidgetLabelProps) => {\n const { children, replacements } = props;\n return (\n <Text\n className={styles.widgetLabel}\n role=\"help\"\n weight=\"medium\"\n color={\"--agents-fg-light\"}\n replacements={replacements}\n >\n {children}\n </Text>\n );\n};\n","import { classNames } from \"../../provider/class-names\";\nimport React from \"react\";\nimport { useIsEmailWidgetRender } from \"../../renderer/ConversationWidgetRenderContext\";\nimport styles from \"./WidgetFooter.module.scss\";\n\nexport const WidgetFooter = (props: { children: React.ReactNode; actionOnly?: boolean; className?: string }) => {\n const { children, actionOnly = true, className } = props;\n const isEmailRender = useIsEmailWidgetRender();\n if (isEmailRender && actionOnly) return null;\n return <div className={classNames(styles.cardFooter, className)}>{children}</div>;\n};\n","import { useSyncExternalStore } from \"react\";\n\n/** One published update: a strictly increasing revision, so a consumer reacts to each publication exactly once. */\nexport interface EntityUpdate<TUpdate> {\n readonly revision: number;\n readonly update: TUpdate;\n}\n\n/**\n * A tiny shared channel between a canvas BODY and the inline widget that opened it: the body publishes\n * \"this entity changed\" / \"this entity was removed\", the inline list applies or refetches. Stands in for callbacks\n * captured into a rendered canvas node: a body mounted from the canvas model has no closure into the\n * widget instance, and the widget instance may have been windowed out meanwhile. Module state with\n * `useSyncExternalStore`.\n */\nexport const createEntityUpdateChannel = <TUpdate>() => {\n let latest: EntityUpdate<TUpdate> | null = null;\n const listeners = new Set<() => void>();\n const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n };\n const read = () => latest;\n return {\n publish: (update: TUpdate): void => {\n latest = { revision: (latest?.revision ?? 0) + 1, update };\n listeners.forEach((listener) => listener());\n },\n /** The latest publication (null before the first). Re-renders the consumer on every publication. */\n useLatestUpdate: (): EntityUpdate<TUpdate> | null => useSyncExternalStore(subscribe, read, read),\n };\n};\n","import { RefObject, useEffect, useState } from \"react\";\n\n/**\n * True while the element is in the viewport (IntersectionObserver) AND the document is visible — the widget polls only\n * when someone can see it. Environments without IntersectionObserver (jsdom) count as visible.\n */\nexport const useElementVisible = (ref: RefObject<HTMLElement | null>): boolean => {\n const [intersecting, setIntersecting] = useState<boolean>(true);\n const [documentVisible, setDocumentVisible] = useState<boolean>(\n typeof document === \"undefined\" || document.visibilityState !== \"hidden\",\n );\n\n useEffect(() => {\n const element = ref.current;\n if (!element || typeof IntersectionObserver === \"undefined\") return undefined;\n const observer = new IntersectionObserver((entries) => {\n setIntersecting(entries.some((entry) => entry.isIntersecting));\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref]);\n\n useEffect(() => {\n if (typeof document === \"undefined\") return undefined;\n const onChange = () => setDocumentVisible(document.visibilityState !== \"hidden\");\n document.addEventListener(\"visibilitychange\", onChange);\n return () => document.removeEventListener(\"visibilitychange\", onChange);\n }, []);\n\n return intersecting && documentVisible;\n};\n"],"names":["styles"],"mappings":";;;;;;;AAUO,MAAM,mBAAmB,CAAC,UAAiC,oBAAC,YAAA,EAAY,GAAG,MAAA,CAAO;;;;;ACDlF,MAAM,cAAc,CAAC,UAA4B;AACtD,QAAM,EAAE,UAAU,aAAA,IAAiB;AACnC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWA,SAAO;AAAA,MAClB,MAAK;AAAA,MACL,QAAO;AAAA,MACP,OAAO;AAAA,MACP;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGP;;;;;ACjBO,MAAM,eAAe,CAAC,UAAmF;AAC9G,QAAM,EAAE,UAAU,aAAa,MAAM,cAAc;AACnD,QAAM,gBAAgB,uBAAA;AACtB,MAAI,iBAAiB,WAAY,QAAO;AACxC,SAAO,oBAAC,SAAI,WAAW,WAAW,OAAO,YAAY,SAAS,GAAI,UAAS;AAC7E;ACKO,MAAM,4BAA4B,MAAe;AACtD,MAAI,SAAuC;AAC3C,QAAM,gCAAgB,IAAA;AACtB,QAAM,YAAY,CAAC,aAAyB;AAC1C,cAAU,IAAI,QAAQ;AACtB,WAAO,MAAM;AACX,gBAAU,OAAO,QAAQ;AAAA,IAC3B;AAAA,EACF;AACA,QAAM,OAAO,MAAM;AACnB,SAAO;AAAA,IACL,SAAS,CAAC,WAA0B;AAClC,eAAS,EAAE,WAAW,QAAQ,YAAY,KAAK,GAAG,OAAA;AAClD,gBAAU,QAAQ,CAAC,aAAa,SAAA,CAAU;AAAA,IAC5C;AAAA;AAAA,IAEA,iBAAiB,MAAoC,qBAAqB,WAAW,MAAM,IAAI;AAAA,EAAA;AAEnG;AC3BO,MAAM,oBAAoB,CAAC,QAAgD;AAChF,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,IAAI;AAC9D,QAAM,CAAC,iBAAiB,kBAAkB,IAAI;AAAA,IAC5C,OAAO,aAAa,eAAe,SAAS,oBAAoB;AAAA,EAAA;AAGlE,YAAU,MAAM;AACd,UAAM,UAAU,IAAI;AACpB,QAAI,CAAC,WAAW,OAAO,yBAAyB,YAAa,QAAO;AACpE,UAAM,WAAW,IAAI,qBAAqB,CAAC,YAAY;AACrD,sBAAgB,QAAQ,KAAK,CAAC,UAAU,MAAM,cAAc,CAAC;AAAA,IAC/D,CAAC;AACD,aAAS,QAAQ,OAAO;AACxB,WAAO,MAAM,SAAS,WAAA;AAAA,EACxB,GAAG,CAAC,GAAG,CAAC;AAER,YAAU,MAAM;AACd,QAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,UAAM,WAAW,MAAM,mBAAmB,SAAS,oBAAoB,QAAQ;AAC/E,aAAS,iBAAiB,oBAAoB,QAAQ;AACtD,WAAO,MAAM,SAAS,oBAAoB,oBAAoB,QAAQ;AAAA,EACxE,GAAG,CAAA,CAAE;AAEL,SAAO,gBAAgB;AACzB;"}
1
+ {"version":3,"file":"widgets.js","sources":["../src/widgets/_shared/WidgetLabel.tsx","../src/widgets/_shared/WidgetFooter.tsx","../src/widgets/_shared/entity-update-channel.ts","../src/widgets/_shared/use-element-visible.ts"],"sourcesContent":["import { Text, type AgentsTextReplacements } from \"../../provider/components\";\nimport React from \"react\";\nimport styles from \"./WidgetLabel.module.scss\";\n\ninterface WidgetLabelProps {\n children: React.ReactNode;\n replacements?: AgentsTextReplacements;\n}\n\nexport const WidgetLabel = (props: WidgetLabelProps) => {\n const { children, replacements } = props;\n return (\n <Text\n className={styles.widgetLabel}\n role=\"help\"\n weight=\"medium\"\n color={\"--agents-fg-light\"}\n replacements={replacements}\n >\n {children}\n </Text>\n );\n};\n","import { classNames } from \"../../provider/class-names\";\nimport React from \"react\";\nimport { useIsEmailWidgetRender } from \"../../renderer/ConversationWidgetRenderContext\";\nimport styles from \"./WidgetFooter.module.scss\";\n\nexport const WidgetFooter = (props: { children: React.ReactNode; actionOnly?: boolean; className?: string }) => {\n const { children, actionOnly = true, className } = props;\n const isEmailRender = useIsEmailWidgetRender();\n if (isEmailRender && actionOnly) return null;\n return <div className={classNames(styles.cardFooter, className)}>{children}</div>;\n};\n","import { useSyncExternalStore } from \"react\";\n\n/** One published update: a strictly increasing revision, so a consumer reacts to each publication exactly once. */\nexport interface EntityUpdate<TUpdate> {\n readonly revision: number;\n readonly update: TUpdate;\n}\n\n/**\n * A tiny shared channel between a canvas BODY and the inline widget that opened it: the body publishes\n * \"this entity changed\" / \"this entity was removed\", the inline list applies or refetches. Stands in for callbacks\n * captured into a rendered canvas node: a body mounted from the canvas model has no closure into the\n * widget instance, and the widget instance may have been windowed out meanwhile. Module state with\n * `useSyncExternalStore`.\n */\nexport const createEntityUpdateChannel = <TUpdate>() => {\n let latest: EntityUpdate<TUpdate> | null = null;\n const listeners = new Set<() => void>();\n const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n };\n const read = () => latest;\n return {\n publish: (update: TUpdate): void => {\n latest = { revision: (latest?.revision ?? 0) + 1, update };\n listeners.forEach((listener) => listener());\n },\n /** The latest publication (null before the first). Re-renders the consumer on every publication. */\n useLatestUpdate: (): EntityUpdate<TUpdate> | null => useSyncExternalStore(subscribe, read, read),\n };\n};\n","import { RefObject, useEffect, useState } from \"react\";\n\n/**\n * True while the element is in the viewport (IntersectionObserver) AND the document is visible — the widget polls only\n * when someone can see it. Environments without IntersectionObserver (jsdom) count as visible.\n */\nexport const useElementVisible = (ref: RefObject<HTMLElement | null>): boolean => {\n const [intersecting, setIntersecting] = useState<boolean>(true);\n const [documentVisible, setDocumentVisible] = useState<boolean>(\n typeof document === \"undefined\" || document.visibilityState !== \"hidden\",\n );\n\n useEffect(() => {\n const element = ref.current;\n if (!element || typeof IntersectionObserver === \"undefined\") return undefined;\n const observer = new IntersectionObserver((entries) => {\n setIntersecting(entries.some((entry) => entry.isIntersecting));\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref]);\n\n useEffect(() => {\n if (typeof document === \"undefined\") return undefined;\n const onChange = () => setDocumentVisible(document.visibilityState !== \"hidden\");\n document.addEventListener(\"visibilitychange\", onChange);\n return () => document.removeEventListener(\"visibilitychange\", onChange);\n }, []);\n\n return intersecting && documentVisible;\n};\n"],"names":["styles"],"mappings":";;;;;;;;;;;AASO,MAAM,cAAc,CAAC,UAA4B;AACtD,QAAM,EAAE,UAAU,aAAA,IAAiB;AACnC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWA,SAAO;AAAA,MAClB,MAAK;AAAA,MACL,QAAO;AAAA,MACP,OAAO;AAAA,MACP;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGP;;;;;ACjBO,MAAM,eAAe,CAAC,UAAmF;AAC9G,QAAM,EAAE,UAAU,aAAa,MAAM,cAAc;AACnD,QAAM,gBAAgB,uBAAA;AACtB,MAAI,iBAAiB,WAAY,QAAO;AACxC,SAAO,oBAAC,SAAI,WAAW,WAAW,OAAO,YAAY,SAAS,GAAI,UAAS;AAC7E;ACKO,MAAM,4BAA4B,MAAe;AACtD,MAAI,SAAuC;AAC3C,QAAM,gCAAgB,IAAA;AACtB,QAAM,YAAY,CAAC,aAAyB;AAC1C,cAAU,IAAI,QAAQ;AACtB,WAAO,MAAM;AACX,gBAAU,OAAO,QAAQ;AAAA,IAC3B;AAAA,EACF;AACA,QAAM,OAAO,MAAM;AACnB,SAAO;AAAA,IACL,SAAS,CAAC,WAA0B;AAClC,eAAS,EAAE,WAAW,QAAQ,YAAY,KAAK,GAAG,OAAA;AAClD,gBAAU,QAAQ,CAAC,aAAa,SAAA,CAAU;AAAA,IAC5C;AAAA;AAAA,IAEA,iBAAiB,MAAoC,qBAAqB,WAAW,MAAM,IAAI;AAAA,EAAA;AAEnG;AC3BO,MAAM,oBAAoB,CAAC,QAAgD;AAChF,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,IAAI;AAC9D,QAAM,CAAC,iBAAiB,kBAAkB,IAAI;AAAA,IAC5C,OAAO,aAAa,eAAe,SAAS,oBAAoB;AAAA,EAAA;AAGlE,YAAU,MAAM;AACd,UAAM,UAAU,IAAI;AACpB,QAAI,CAAC,WAAW,OAAO,yBAAyB,YAAa,QAAO;AACpE,UAAM,WAAW,IAAI,qBAAqB,CAAC,YAAY;AACrD,sBAAgB,QAAQ,KAAK,CAAC,UAAU,MAAM,cAAc,CAAC;AAAA,IAC/D,CAAC;AACD,aAAS,QAAQ,OAAO;AACxB,WAAO,MAAM,SAAS,WAAA;AAAA,EACxB,GAAG,CAAC,GAAG,CAAC;AAER,YAAU,MAAM;AACd,QAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,UAAM,WAAW,MAAM,mBAAmB,SAAS,oBAAoB,QAAQ;AAC/E,aAAS,iBAAiB,oBAAoB,QAAQ;AACtD,WAAO,MAAM,SAAS,oBAAoB,oBAAoB,QAAQ;AAAA,EACxE,GAAG,CAAA,CAAE;AAEL,SAAO,gBAAgB;AACzB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgamadeus/ddd-agents",
3
- "version": "0.11.4",
3
+ "version": "0.11.6",
4
4
  "description": "The web frontend of the ddd-agents module: the agent chat, the widget renderer and the composed-view kit.",
5
5
  "keywords": [
6
6
  "ddd",