@opencx/widget-react 5.0.0-beta.7 → 5.0.0
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/Chart.impl--lw4WUeY.cjs +2 -0
- package/dist/Chart.impl--lw4WUeY.cjs.map +1 -0
- package/dist/Chart.impl-B5gmO6Us.js +207 -0
- package/dist/Chart.impl-B5gmO6Us.js.map +1 -0
- package/dist/{index-D_f1MZUH.js → index-BiL9m1to.js} +6452 -5051
- package/dist/index-BiL9m1to.js.map +1 -0
- package/dist/index-rkpSpEfw.cjs +375 -0
- package/dist/index-rkpSpEfw.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json.d.ts +1 -1
- package/dist/src/WidgetPopoverContent.d.ts.map +1 -1
- package/dist/src/companion/CompanionContent.d.ts.map +1 -1
- package/dist/src/companion/CompanionFrame.d.ts +2 -1
- package/dist/src/companion/CompanionFrame.d.ts.map +1 -1
- package/dist/src/companion/CompanionQuestions.d.ts +11 -0
- package/dist/src/companion/CompanionQuestions.d.ts.map +1 -0
- package/dist/src/companion/WidgetCompanion.d.ts.map +1 -1
- package/dist/src/companion/message-styles.d.ts +8 -1
- package/dist/src/companion/message-styles.d.ts.map +1 -1
- package/dist/src/components/ClarificationQuestions.d.ts.map +1 -1
- package/dist/src/components/ConnectionsSettings.d.ts.map +1 -1
- package/dist/src/components/Header.d.ts.map +1 -1
- package/dist/src/components/PageActionCard.d.ts +17 -0
- package/dist/src/components/PageActionCard.d.ts.map +1 -0
- package/dist/src/components/ReplyQuote.d.ts +7 -0
- package/dist/src/components/ReplyQuote.d.ts.map +1 -0
- package/dist/src/components/RichText.d.ts +6 -2
- package/dist/src/components/RichText.d.ts.map +1 -1
- package/dist/src/components/StreamingTurn.d.ts +7 -1
- package/dist/src/components/StreamingTurn.d.ts.map +1 -1
- package/dist/src/components/UserMessage.d.ts.map +1 -1
- package/dist/src/components/configured-text-styles.d.ts +11 -0
- package/dist/src/components/configured-text-styles.d.ts.map +1 -0
- package/dist/src/components/custom-components/AgentMessageDefaultComponent.d.ts.map +1 -1
- package/dist/src/hooks/useInitialQuestionRequired.d.ts +3 -0
- package/dist/src/hooks/useInitialQuestionRequired.d.ts.map +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/json-render/Chart.impl.d.ts.map +1 -1
- package/dist/src/json-render/SpecRenderer.d.ts +6 -1
- package/dist/src/json-render/SpecRenderer.d.ts.map +1 -1
- package/dist/src/json-render/StreamingShimmer.d.ts +12 -0
- package/dist/src/json-render/StreamingShimmer.d.ts.map +1 -0
- package/dist/src/json-render/chart-axis.d.ts +30 -0
- package/dist/src/json-render/chart-axis.d.ts.map +1 -0
- package/dist/src/json-render/registry.d.ts.map +1 -1
- package/dist/src/json-render/segment-content.d.ts +14 -6
- package/dist/src/json-render/segment-content.d.ts.map +1 -1
- package/dist/src/page-controls/accessible-name.d.ts +7 -0
- package/dist/src/page-controls/accessible-name.d.ts.map +1 -0
- package/dist/src/page-controls/act-input.d.ts +18 -0
- package/dist/src/page-controls/act-input.d.ts.map +1 -0
- package/dist/src/page-controls/act-types.d.ts +28 -0
- package/dist/src/page-controls/act-types.d.ts.map +1 -0
- package/dist/src/page-controls/act.d.ts +10 -0
- package/dist/src/page-controls/act.d.ts.map +1 -0
- package/dist/src/page-controls/action-meaning.d.ts +7 -0
- package/dist/src/page-controls/action-meaning.d.ts.map +1 -0
- package/dist/src/page-controls/control-ref.d.ts +18 -0
- package/dist/src/page-controls/control-ref.d.ts.map +1 -0
- package/dist/src/page-controls/cursor.d.ts +72 -0
- package/dist/src/page-controls/cursor.d.ts.map +1 -0
- package/dist/src/page-controls/guard.d.ts +47 -0
- package/dist/src/page-controls/guard.d.ts.map +1 -0
- package/dist/src/page-controls/native-setter.d.ts +16 -0
- package/dist/src/page-controls/native-setter.d.ts.map +1 -0
- package/dist/src/page-controls/off-limits.d.ts +16 -0
- package/dist/src/page-controls/off-limits.d.ts.map +1 -0
- package/dist/src/page-controls/pointer-sequence.d.ts +16 -0
- package/dist/src/page-controls/pointer-sequence.d.ts.map +1 -0
- package/dist/src/page-controls/read-controls.d.ts +4 -0
- package/dist/src/page-controls/read-controls.d.ts.map +1 -0
- package/dist/src/page-controls/select-option.d.ts +3 -0
- package/dist/src/page-controls/select-option.d.ts.map +1 -0
- package/dist/src/page-controls/send-context.d.ts +20 -0
- package/dist/src/page-controls/send-context.d.ts.map +1 -0
- package/dist/src/page-controls/types.d.ts +52 -0
- package/dist/src/page-controls/types.d.ts.map +1 -0
- package/dist/src/page-marks/agent-mark.d.ts +6 -5
- package/dist/src/page-marks/agent-mark.d.ts.map +1 -1
- package/dist/src/page-marks/mark-source.d.ts +6 -0
- package/dist/src/page-marks/mark-source.d.ts.map +1 -0
- package/dist/src/page-marks/mark-thumbnail.d.ts +2 -0
- package/dist/src/page-marks/mark-thumbnail.d.ts.map +1 -1
- package/dist/src/page-marks/page-element.d.ts +1 -7
- package/dist/src/page-marks/page-element.d.ts.map +1 -1
- package/dist/src/page-marks/usePageMarking.d.ts +1 -6
- package/dist/src/page-marks/usePageMarking.d.ts.map +1 -1
- package/dist/src/page-privacy.d.ts +11 -0
- package/dist/src/page-privacy.d.ts.map +1 -0
- package/dist/src/screens/chat/ChatFooter.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatInput.d.ts +3 -1
- package/dist/src/screens/chat/ChatInput.d.ts.map +1 -1
- package/dist/src/screens/chat/agent/AgentChatPageActions.d.ts +13 -0
- package/dist/src/screens/chat/agent/AgentChatPageActions.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/AgentChatPageEffects.d.ts.map +1 -1
- package/dist/src/screens/chat/agent/use-page-effect-is-current.d.ts +5 -0
- package/dist/src/screens/chat/agent/use-page-effect-is-current.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/useStreamFollow.d.ts +4 -0
- package/dist/src/screens/chat/agent/useStreamFollow.d.ts.map +1 -1
- package/dist/src/screens/chat/usePageMarkComposer.d.ts +1 -0
- package/dist/src/screens/chat/usePageMarkComposer.d.ts.map +1 -1
- package/dist/src/screens/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/Chart.impl-C-1c9nkk.js +0 -153
- package/dist/Chart.impl-C-1c9nkk.js.map +0 -1
- package/dist/Chart.impl-Ck7Md2bC.cjs +0 -2
- package/dist/Chart.impl-Ck7Md2bC.cjs.map +0 -1
- package/dist/index-B3pRBUF2.cjs +0 -343
- package/dist/index-B3pRBUF2.cjs.map +0 -1
- package/dist/index-D_f1MZUH.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("@radix-ui/react-popover");require("framer-motion");require("react");require("@opencx/widget-react-headless");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("@radix-ui/react-popover");require("framer-motion");require("react");require("@opencx/widget-react-headless");const e=require("./index-rkpSpEfw.cjs");exports.HostedSpecRenderer=e.HostedSpecRenderer;exports.Widget=e.Widget;exports.segmentContent=e.segmentContent;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import "@radix-ui/react-popover";
|
|
|
3
3
|
import "framer-motion";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@opencx/widget-react-headless";
|
|
6
|
-
import { H as s, W as n, s as a } from "./index-
|
|
6
|
+
import { H as s, W as n, s as a } from "./index-BiL9m1to.js";
|
|
7
7
|
export {
|
|
8
8
|
s as HostedSpecRenderer,
|
|
9
9
|
n as Widget,
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetPopoverContent.d.ts","sourceRoot":"","sources":["../../src/WidgetPopoverContent.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"WidgetPopoverContent.d.ts","sourceRoot":"","sources":["../../src/WidgetPopoverContent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA0BzC,wBAAgB,aAAa,sBAoF5B;AAED,wBAAgB,oBAAoB,sBAmCnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompanionContent.d.ts","sourceRoot":"","sources":["../../../src/companion/CompanionContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CompanionContent.d.ts","sourceRoot":"","sources":["../../../src/companion/CompanionContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAclE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAoFlE,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,mBAAmB,GACpB,EAAE;IACD,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB;iDAC6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,4EAA4E;IAC5E,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,4EAA4E;IAC5E,cAAc,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACzD,gEAAgE;IAChE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,+EAA+E;IAC/E,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,qBAuLA"}
|
|
@@ -8,9 +8,10 @@ import { default as React } from 'react';
|
|
|
8
8
|
* commitAttachRef). Here the ref callback is stable (useCallback, no deps),
|
|
9
9
|
* so it runs exactly once per DOM node lifecycle and cannot loop.
|
|
10
10
|
*/
|
|
11
|
-
export declare function CompanionFrame({ initialContent, style, iframeRef, children, }: {
|
|
11
|
+
export declare function CompanionFrame({ initialContent, title, style, iframeRef, children, }: {
|
|
12
12
|
/** Full HTML document written once into the frame (styles in <head>) */
|
|
13
13
|
initialContent: string;
|
|
14
|
+
title?: string;
|
|
14
15
|
style: React.CSSProperties;
|
|
15
16
|
/** Receives the iframe element (shared widget contentIframeRef) */
|
|
16
17
|
iframeRef?: React.MutableRefObject<HTMLIFrameElement | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompanionFrame.d.ts","sourceRoot":"","sources":["../../../src/companion/CompanionFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,cAAc,EACd,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE;IACD,wEAAwE;IACxE,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,mEAAmE;IACnE,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"CompanionFrame.d.ts","sourceRoot":"","sources":["../../../src/companion/CompanionFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,cAAc,EACd,KAA0B,EAC1B,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE;IACD,wEAAwE;IACxE,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,mEAAmE;IACnE,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAgCA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** A separate surface: questions must never resize the animated composer. */
|
|
3
|
+
export declare function CompanionQuestions({ onHeightChange, maxHeight, onDismiss, onToggleFullscreen, }: {
|
|
4
|
+
onHeightChange: (height: number) => void;
|
|
5
|
+
maxHeight: number;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
onToggleFullscreen: () => void;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
/** Required and optional starters share the same floating presentation. */
|
|
10
|
+
export declare function CompanionQuestionButtons(): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=CompanionQuestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompanionQuestions.d.ts","sourceRoot":"","sources":["../../../src/companion/CompanionQuestions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAOvD,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,SAAS,EACT,SAAS,EACT,kBAAkB,GACnB,EAAE;IACD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,qBAiCA;AAED,2EAA2E;AAC3E,wBAAgB,wBAAwB,sBA8BvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetCompanion.d.ts","sourceRoot":"","sources":["../../../src/companion/WidgetCompanion.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WidgetCompanion.d.ts","sourceRoot":"","sources":["../../../src/companion/WidgetCompanion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AA4Df,wBAAgB,eAAe,6BA4vB9B"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export declare const FLAT_MESSAGE_CSS = "\n[data-companion-root] [data-component=\"chat/msgs/root\"] {\n overflow-x: hidden !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg_group/root\"],\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/root\"],\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/msgs\"] {\n min-width: 0 !important;\n max-width: 100% !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] {\n background: transparent !important;\n padding: 2px 0 !important;\n border-radius: 0 !important;\n max-width: 100% !important;\n min-width: 0 !important;\n overflow-wrap: break-word !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] table {\n display: block;\n max-width: 100%;\n overflow-x: auto;\n border-collapse: collapse;\n}\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] th,\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] td {\n overflow-wrap: normal;\n word-break: normal;\n white-space: normal;\n vertical-align: top;\n text-align: start;\n padding: 4px 10px 4px 0;\n border-bottom: 1px solid hsl(var(--opencx-border));\n}\n[data-companion-root] [data-component=\"chat/
|
|
1
|
+
export declare const FLAT_MESSAGE_CSS = "\n[data-companion-root] [data-component=\"chat/msgs/root\"] {\n overflow-x: hidden !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg_group/root\"],\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/root\"],\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/msgs\"] {\n min-width: 0 !important;\n max-width: 100% !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] {\n background: transparent !important;\n padding: 2px 0 !important;\n border-radius: 0 !important;\n max-width: 100% !important;\n min-width: 0 !important;\n overflow-wrap: break-word !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] table {\n display: block;\n max-width: 100%;\n overflow-x: auto;\n border-collapse: collapse;\n}\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] th,\n[data-companion-root] [data-component=\"chat/agent_msg/msg\"] td {\n overflow-wrap: normal;\n word-break: normal;\n white-space: normal;\n vertical-align: top;\n text-align: start;\n padding: 4px 10px 4px 0;\n border-bottom: 1px solid hsl(var(--opencx-border));\n}\n[data-companion-root] [data-component=\"chat/user_msg/msg\"] {\n background: hsl(var(--opencx-secondary)) !important;\n color: hsl(var(--opencx-secondary-foreground)) !important;\n padding: 8px 12px !important;\n border-radius: 10px !important;\n}\n";
|
|
2
|
+
export declare const HIDE_AVATARS_CSS = "\n[data-companion-root] [data-component=\"chat/agent_msg_group/root/avatar\"],\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/avatar\"] {\n display: none !important;\n}\n";
|
|
3
|
+
/**
|
|
4
|
+
* Flat layout WITH avatars: a reply reads as a document, so the avatar marks
|
|
5
|
+
* where it starts — top-aligned with the first line and sized to it — instead
|
|
6
|
+
* of hanging at the bottom beside the actions row like a chat bubble's.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FLAT_AVATARS_CSS = "\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/root\"] {\n align-items: flex-start !important;\n}\n[data-companion-root] [data-component=\"chat/agent_msg_group/avatar_and_msgs/avatar\"] {\n width: 20px !important;\n height: 20px !important;\n margin-top: 2px !important;\n}\n/* Steps, rendered blocks, the working spinner and the actions row are siblings\n of the text groups in a streamed turn: indent them by the avatar gutter\n (20px avatar + 8px gap) so everything shares the text's left edge. The\n typing row carries its own avatar, so it keeps the gutter instead \u2014 indenting\n it would jump the avatar sideways when the reply replaces it. */\n[data-companion-root] [data-component=\"chat/streaming_turn/root\"] > :not([data-component=\"chat/agent_msg_group/root\"]):not([data-component=\"chat/bot_loading/root\"]) {\n margin-inline-start: 28px !important;\n}\n[data-companion-root] [data-component=\"chat/bot_loading/root\"] {\n align-items: flex-start !important;\n}\n/* Its avatar is the row's first child (LoadingDefaultComponent renders no\n data-component on it), sized to match a reply's. */\n[data-companion-root] [data-component=\"chat/bot_loading/root\"] > :first-child {\n width: 20px !important;\n height: 20px !important;\n margin-top: 2px !important;\n}\n";
|
|
2
9
|
//# sourceMappingURL=message-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-styles.d.ts","sourceRoot":"","sources":["../../../src/companion/message-styles.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"message-styles.d.ts","sourceRoot":"","sources":["../../../src/companion/message-styles.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,+5CAwC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,+MAK5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,wzCA2B5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClarificationQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/ClarificationQuestions.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ClarificationQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/ClarificationQuestions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAM9D;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,mBAAmB,CAAC;CAC9B,CAAC;AA4BF,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,GACR,EAAE,2BAA2B,4BAmP7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionsSettings.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectionsSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAcnD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"ConnectionsSettings.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectionsSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAcnD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAsPA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,YAAY,EAElB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,KAAmB,MAAM,OAAO,CAAC;AAwBxC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,YAAY,CAAC,aAAa,CAAC,EACxC,OAAO,EAAE,MAAM,GACd,MAAM,CAYR;AA+VD,wBAAgB,eAAe,sBA2B9B;AAED,wBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,YAAY,EAElB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,KAAmB,MAAM,OAAO,CAAC;AAwBxC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,YAAY,CAAC,aAAa,CAAC,EACxC,OAAO,EAAE,MAAM,GACd,MAAM,CAYR;AA+VD,wBAAgB,eAAe,sBA2B9B;AAED,wBAAgB,MAAM,sBAuCrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PendingPageAction } from '@opencx/widget-react-headless';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The moment the visitor decides.
|
|
5
|
+
*
|
|
6
|
+
* It names the control — the control's own name, read off their page, not
|
|
7
|
+
* anything the agent wrote — because "Allow this action?" is a question
|
|
8
|
+
* nobody reads, and "Allow the agent to click Cancel subscription?" is a
|
|
9
|
+
* question everybody reads.
|
|
10
|
+
*
|
|
11
|
+
* One request at a time. No declines this call; any later request must ask
|
|
12
|
+
* for its own confirmation before touching the page.
|
|
13
|
+
*/
|
|
14
|
+
export declare function PageActionCard({ request }: {
|
|
15
|
+
request: PendingPageAction;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=PageActionCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageActionCard.d.ts","sourceRoot":"","sources":["../../../src/components/PageActionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,iBAAiB,CAAA;CAAE,qBA8CzE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WidgetAgentMessage } from '@opencx/widget-core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/** An in-bubble quote that links to its original message. */
|
|
4
|
+
export declare function ReplyQuote({ replyTo, }: {
|
|
5
|
+
replyTo: NonNullable<WidgetAgentMessage['replyTo']>;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ReplyQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplyQuote.d.ts","sourceRoot":"","sources":["../../../src/components/ReplyQuote.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,EACzB,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;CACrD,qBA4CA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
type RichTextProps = {
|
|
3
3
|
children: string;
|
|
4
4
|
messageType?: string;
|
|
5
5
|
messageId?: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export declare function RichText(props: RichTextProps): React.JSX.Element;
|
|
8
|
+
/** Host-authored footer HTML can keep safe typography and spacing. */
|
|
9
|
+
export declare function ConfiguredRichText(props: RichTextProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
7
11
|
//# sourceMappingURL=RichText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../src/components/RichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../src/components/RichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,qBAE5C;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,qBAEtD"}
|
|
@@ -25,9 +25,15 @@ export declare function StreamingTurn({ turn, agent, timestamp, }: {
|
|
|
25
25
|
* Assembles the accumulating spec from the turn's `data-spec` patches and
|
|
26
26
|
* renders it through the shared `SpecRenderer` seam (same defenses as the
|
|
27
27
|
* persisted-history path).
|
|
28
|
+
*
|
|
29
|
+
* `active` is the turn's own flag: while it streams, containers whose content
|
|
30
|
+
* has not arrived show a shimmer; once the turn settles they show their
|
|
31
|
+
* ordinary empty state. Optional so an embedder's custom spec component (and
|
|
32
|
+
* a direct render) keeps compiling without it.
|
|
28
33
|
*/
|
|
29
34
|
export type StreamingSpecComponentProps = {
|
|
30
35
|
parts: SpecDataPart[];
|
|
36
|
+
active?: boolean;
|
|
31
37
|
};
|
|
32
|
-
export declare function StreamingSpec({ parts }: StreamingSpecComponentProps): React.JSX.Element;
|
|
38
|
+
export declare function StreamingSpec({ parts, active, }: StreamingSpecComponentProps): React.JSX.Element;
|
|
33
39
|
//# sourceMappingURL=StreamingTurn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamingTurn.d.ts","sourceRoot":"","sources":["../../../src/components/StreamingTurn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,EAEZ,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,SAAS,GACV,EAAE;IACD,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"StreamingTurn.d.ts","sourceRoot":"","sources":["../../../src/components/StreamingTurn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,EAEZ,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,SAAS,GACV,EAAE;IACD,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,qBAiGA;AAOD;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAc,GACf,EAAE,2BAA2B,qBAK7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMessage.d.ts","sourceRoot":"","sources":["../../../src/components/UserMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,cAAc,EACd,aAAa,EACb,cAAc,GACf,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;CACzB,
|
|
1
|
+
{"version":3,"file":"UserMessage.d.ts","sourceRoot":"","sources":["../../../src/components/UserMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,cAAc,EACd,aAAa,EACb,cAAc,GACf,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;CACzB,qBA2DA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defaultSchema } from 'rehype-sanitize';
|
|
2
|
+
export declare const configuredTextSchema: typeof defaultSchema;
|
|
3
|
+
type HtmlNode = {
|
|
4
|
+
type: string;
|
|
5
|
+
properties?: Record<string, unknown>;
|
|
6
|
+
children?: HtmlNode[];
|
|
7
|
+
};
|
|
8
|
+
/** Allow presentation styles without URL loads, CSS escapes or positioning. */
|
|
9
|
+
export declare function filterConfiguredStyles(): (node: HtmlNode) => void;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=configured-text-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configured-text-styles.d.ts","sourceRoot":"","sources":["../../../src/components/configured-text-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,eAAO,MAAM,oBAAoB,EAAE,OAAO,aAQzC,CAAC;AAOF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,sBAAsB,KACd,MAAM,QAAQ,KAAG,IAAI,CAoB5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentMessageDefaultComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/custom-components/AgentMessageDefaultComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentMessageDefaultComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/custom-components/AgentMessageDefaultComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiCvC,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,oBAAoB,GAAG;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE;QACnB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;QACxC,OAAO,CAAC,EAAE,oBAAoB,CAAC;KAChC,CAAC;IACF,UAAU,CAAC,EAAE;QACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,4BAgIF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInitialQuestionRequired.d.ts","sourceRoot":"","sources":["../../../src/hooks/useInitialQuestionRequired.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,0BAA0B,YASzC"}
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAWvC,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,2BAA2B,CAAC;AA6EnC,QAAA,MAAM,MAAM;aAGC,YAAY;iBACR,mBAAmB,EAAE;uBACf,KAAK,CAAC,SAAS;qBACjB,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS;mCAkDpD,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB;;;;;GAKG;AACH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,SAAS,GACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.impl.d.ts","sourceRoot":"","sources":["../../../src/json-render/Chart.impl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Chart.impl.d.ts","sourceRoot":"","sources":["../../../src/json-render/Chart.impl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA2F1C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,GACZ,EAAE,UAAU,qBAwHZ"}
|
|
@@ -9,9 +9,14 @@ import { default as React } from 'react';
|
|
|
9
9
|
* Applies leaf-`repeat` recovery, guards empty/partial specs, and renders under
|
|
10
10
|
* a per-spec state provider (so `{ "$state": "/path" }` refs resolve against
|
|
11
11
|
* THIS spec's own state) wrapped in an error boundary.
|
|
12
|
+
*
|
|
13
|
+
* `active` says the spec is still being streamed: containers with nothing to
|
|
14
|
+
* paint yet show a shimmer instead of their settled empty state. History and
|
|
15
|
+
* settled turns leave it off.
|
|
12
16
|
*/
|
|
13
|
-
export declare function SpecRenderer({ spec }: {
|
|
17
|
+
export declare function SpecRenderer({ spec, active, }: {
|
|
14
18
|
spec: Spec | null;
|
|
19
|
+
active?: boolean;
|
|
15
20
|
}): React.JSX.Element;
|
|
16
21
|
/**
|
|
17
22
|
* The same renderer for a page that is not the widget but shows what the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpecRenderer.d.ts","sourceRoot":"","sources":["../../../src/json-render/SpecRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAkB,MAAM,OAAO,CAAC;AAWvC
|
|
1
|
+
{"version":3,"file":"SpecRenderer.d.ts","sourceRoot":"","sources":["../../../src/json-render/SpecRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAkB,MAAM,OAAO,CAAC;AAWvC;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,MAAc,GACf,EAAE;IACD,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,qBAQA;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE;IACD,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,qBAGA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The placeholder a container shows while its spec is still streaming and it
|
|
4
|
+
* has nothing to paint yet — the same pulse the lazy Chart holds its space
|
|
5
|
+
* with (`ChartShimmer` in `Chart.tsx`), so an empty Card, List, Table, Grid or
|
|
6
|
+
* Stack mid-stream reads as "loading" rather than as a bare frame or an "empty"
|
|
7
|
+
* message that flips to content a moment later.
|
|
8
|
+
*/
|
|
9
|
+
export declare function StreamingShimmer({ height }: {
|
|
10
|
+
height?: number;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=StreamingShimmer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StreamingShimmer.d.ts","sourceRoot":"","sources":["../../../src/json-render/StreamingShimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAW,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,qBAQpE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Y-axis sizing for the cartesian charts.
|
|
3
|
+
*
|
|
4
|
+
* recharts 2.x has no auto-width axis: `YAxis.width` is a fixed number, and a
|
|
5
|
+
* tick label wider than the room left of its tick pokes out past the svg's
|
|
6
|
+
* left edge, where the viewport clips it. That is how a 120/80/150/90/200 bar
|
|
7
|
+
* chart rendered "0" for every tick in the 400px chat panel — only the last
|
|
8
|
+
* digit of each label survived. The axis is sized from the labels recharts
|
|
9
|
+
* actually painted instead: measured in a browser, estimated where the text
|
|
10
|
+
* cannot be measured (jsdom, a hidden embed).
|
|
11
|
+
*/
|
|
12
|
+
/** recharts' painted Y tick labels (`<text>`, right-anchored at their `x`). */
|
|
13
|
+
export declare const Y_TICK_LABEL_SELECTOR = ".recharts-yAxis .recharts-cartesian-axis-tick-value";
|
|
14
|
+
export declare function estimateTextWidth(text: string, fontSize: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* The painted width of an svg text node: the browser's glyph run when it can
|
|
17
|
+
* report one (a non-positive length means not laid out — a hidden embed), the
|
|
18
|
+
* estimate otherwise.
|
|
19
|
+
*/
|
|
20
|
+
export declare function measureSvgTextWidth(node: Element, fontSize: number): number;
|
|
21
|
+
/**
|
|
22
|
+
* The narrowest `YAxis.width` that keeps every painted tick label inside the
|
|
23
|
+
* svg, or `null` when no Y ticks are in the DOM (a pie, or nothing painted
|
|
24
|
+
* yet). Derived from geometry, not from recharts constants: each label's
|
|
25
|
+
* right edge sits at its tick's `x`, and `currentWidth - x` is whatever gap
|
|
26
|
+
* the axis reserves between label and plot — so the requirement is the widest
|
|
27
|
+
* label plus that gap, whichever tick size/margin recharts applied.
|
|
28
|
+
*/
|
|
29
|
+
export declare function requiredYAxisWidth(container: ParentNode, currentWidth: number, fontSize: number): number | null;
|
|
30
|
+
//# sourceMappingURL=chart-axis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-axis.d.ts","sourceRoot":"","sources":["../../../src/json-render/chart-axis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,wDACqB,CAAC;AAExD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM3E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,UAAU,EACrB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,IAAI,CAaf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/json-render/registry.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/json-render/registry.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAwE5E,eAAO,MAAQ,QAAQ,gDA4OrB,CAAC;AAEH,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,EAAE,iBAOhC,CAAC"}
|
|
@@ -14,12 +14,20 @@ export type ContentSegment = {
|
|
|
14
14
|
* fence (persist raw, transform on serve). So the history path re-derives the
|
|
15
15
|
* spec from the stored text here.
|
|
16
16
|
*
|
|
17
|
-
* There is exactly ONE spec format: JSONL patch lines
|
|
18
|
-
*
|
|
19
|
-
* that hands back a card emits.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
17
|
+
* There is exactly ONE spec format: JSONL patch lines — what the prompt
|
|
18
|
+
* instructs the model to emit inside a ` ```spec ` fence and what every tool
|
|
19
|
+
* that hands back a card emits. A model that forgets the fence still emits the
|
|
20
|
+
* same lines, and the live stream renders them as UI regardless (its transform
|
|
21
|
+
* drains every patch-shaped line, fenced or not), so a run of consecutive bare
|
|
22
|
+
* patch lines outside any fence is a spec block too — otherwise a reloaded
|
|
23
|
+
* transcript shows raw JSON where the customer watched a card.
|
|
24
|
+
*
|
|
25
|
+
* Everything else is markdown. A spec block (fenced or bare) is consumed only
|
|
26
|
+
* after its patches compile to renderable UI; malformed, unsupported, empty,
|
|
27
|
+
* and incomplete-only blocks remain visible as their original text. An
|
|
28
|
+
* unclosed fence (turn cut mid-stream) still compiles when enough valid
|
|
29
|
+
* patches arrived, and a cut-off patch line ending a bare run at the very end
|
|
30
|
+
* of the text is the run's tail, never a stray `{"op":...` bubble.
|
|
23
31
|
*/
|
|
24
32
|
export declare function segmentContent(text: string): ContentSegment[];
|
|
25
33
|
//# sourceMappingURL=segment-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-content.d.ts","sourceRoot":"","sources":["../../../src/json-render/segment-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAE/B
|
|
1
|
+
{"version":3,"file":"segment-content.d.ts","sourceRoot":"","sources":["../../../src/json-render/segment-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAoH7D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the name. Returns '' when the control has none — a nameless
|
|
3
|
+
* control is one the agent cannot talk about, so the reader drops it rather
|
|
4
|
+
* than inventing a name out of markup.
|
|
5
|
+
*/
|
|
6
|
+
export declare function accessibleName(el: HTMLElement): string;
|
|
7
|
+
//# sourceMappingURL=accessible-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessible-name.d.ts","sourceRoot":"","sources":["../../../src/page-controls/accessible-name.ts"],"names":[],"mappings":"AAwDA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAyCtD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What the agent is allowed to ask for. `ref` is the only way to name a
|
|
4
|
+
* control — there is no selector and no text — and the action set is closed,
|
|
5
|
+
* so an invented verb is refused rather than interpreted.
|
|
6
|
+
*/
|
|
7
|
+
export declare const actOnPageInputSchema: z.ZodObject<{
|
|
8
|
+
ref: z.ZodString;
|
|
9
|
+
action: z.ZodEnum<{
|
|
10
|
+
fill: "fill";
|
|
11
|
+
select: "select";
|
|
12
|
+
check: "check";
|
|
13
|
+
click: "click";
|
|
14
|
+
uncheck: "uncheck";
|
|
15
|
+
}>;
|
|
16
|
+
value: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
//# sourceMappingURL=act-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act-input.d.ts","sourceRoot":"","sources":["../../../src/page-controls/act-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAK/B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doing something on the customer's page, and knowing whether it happened.
|
|
3
|
+
*
|
|
4
|
+
* The rule that shapes all of this: the agent may only report what the page
|
|
5
|
+
* actually did. Firing a click is easy; knowing whether the click DID
|
|
6
|
+
* anything is the work, and it is the difference between "I've cancelled
|
|
7
|
+
* your subscription" and the truth.
|
|
8
|
+
*/
|
|
9
|
+
/** What the agent can do to a control. Deliberately small. */
|
|
10
|
+
export declare const PAGE_ACTIONS: readonly ["click", "fill", "select", "check", "uncheck"];
|
|
11
|
+
export type PageAction = (typeof PAGE_ACTIONS)[number];
|
|
12
|
+
/** The answer, in the same words the server and the agent use. */
|
|
13
|
+
export type ActOutcome = 'done' | 'covered' | 'gone' | 'hidden' | 'unsupported' | 'no_change' | 'declined';
|
|
14
|
+
export type ActResult = {
|
|
15
|
+
outcome: ActOutcome;
|
|
16
|
+
/** One short sentence for the agent to pass on. Never page text. */
|
|
17
|
+
detail?: string;
|
|
18
|
+
};
|
|
19
|
+
/** Maximum observation window; visible aria-busy regions defer quiet completion. */
|
|
20
|
+
export declare const SETTLE_MS = 3000;
|
|
21
|
+
/**
|
|
22
|
+
* Controls the widget will never act on, whatever the agent asks and
|
|
23
|
+
* whatever the visitor allows. A password or a file picker is not something
|
|
24
|
+
* an agent types into, and a control inside a cross-origin frame is not
|
|
25
|
+
* something this page can honestly report on.
|
|
26
|
+
*/
|
|
27
|
+
export declare const NEVER_ACT_INPUT_TYPES: Set<string>;
|
|
28
|
+
//# sourceMappingURL=act-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act-types.d.ts","sourceRoot":"","sources":["../../../src/page-controls/act-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,8DAA8D;AAC9D,eAAO,MAAM,YAAY,0DAMf,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,kEAAkE;AAClE,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,aAAa,GACb,WAAW,GACX,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,UAAU,CAAC;IACpB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,SAAS,OAAQ,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,aAA0C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActResult, PageAction } from './act-types';
|
|
2
|
+
export declare function actOnPage(input: {
|
|
3
|
+
ref: string;
|
|
4
|
+
action: PageAction;
|
|
5
|
+
value?: string;
|
|
6
|
+
settleMs?: number;
|
|
7
|
+
consentIsCurrent?: () => boolean;
|
|
8
|
+
observationIsCurrent?: () => boolean;
|
|
9
|
+
}): Promise<ActResult>;
|
|
10
|
+
//# sourceMappingURL=act.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../../src/page-controls/act.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,aAAa,CAAC;AA4HrB,wBAAsB,SAAS,CAAC,KAAK,EAAE;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC;IACjC,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC;CACtC,GAAG,OAAO,CAAC,SAAS,CAAC,CAcrB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recheck native action meaning before dispatch. These values stay local: URLs
|
|
3
|
+
* and form metadata must not be copied into the agent's tool reply.
|
|
4
|
+
* Host JavaScript is still responsible for its own event-handler behavior.
|
|
5
|
+
*/
|
|
6
|
+
export declare function captureActionMeaning(element: HTMLElement): () => boolean;
|
|
7
|
+
//# sourceMappingURL=action-meaning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-meaning.d.ts","sourceRoot":"","sources":["../../../src/page-controls/action-meaning.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,OAAO,CAiCxE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Open a new reading. Returns the mint function for its references. */
|
|
2
|
+
export declare function beginSnapshot(): (el: HTMLElement, name?: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* The element behind a reference, or null — gone from the table, collected,
|
|
5
|
+
* or no longer in the document. "No longer the same node" and "not found"
|
|
6
|
+
* are deliberately the same answer: both mean do not act.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveRef(ref: string): HTMLElement | null;
|
|
9
|
+
/** Guard-only inspection: a stale element must never be authorized to act.
|
|
10
|
+
* Keeping its identity status separate lets the guard report a more specific
|
|
11
|
+
* privacy/visibility refusal before returning "gone" for a changed operation. */
|
|
12
|
+
export declare function inspectRef(ref: string): {
|
|
13
|
+
element: HTMLElement;
|
|
14
|
+
isCurrent: boolean;
|
|
15
|
+
} | null;
|
|
16
|
+
/** Test seam: forget every reading. */
|
|
17
|
+
export declare function resetRefsForTest(): void;
|
|
18
|
+
//# sourceMappingURL=control-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-ref.d.ts","sourceRoot":"","sources":["../../../src/page-controls/control-ref.ts"],"names":[],"mappings":"AAuNA,wEAAwE;AACxE,wBAAgB,aAAa,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,MAAM,CAsC1E;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAG1D;AAED;;iFAEiF;AACjF,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,GACV;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAUrD;AAED,uCAAuC;AACvC,wBAAgB,gBAAgB,IAAI,IAAI,CAUvC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pointer the visitor watches.
|
|
3
|
+
*
|
|
4
|
+
* Without it the page simply changes: a menu opens, a field fills, and the
|
|
5
|
+
* customer is left to work out whether they did that or something did it to
|
|
6
|
+
* them. A cursor that travels to the control and presses it answers that
|
|
7
|
+
* before they have to ask.
|
|
8
|
+
*
|
|
9
|
+
* It is drawn, never simulated input — the real events still come from
|
|
10
|
+
* `firePointerSequence`. The two are kept in step by aiming both at the same
|
|
11
|
+
* point: the control's centre. If the gesture and the event were allowed to
|
|
12
|
+
* drift apart this would be theatre, and theatre about what an agent did to
|
|
13
|
+
* someone's account is worse than no animation at all.
|
|
14
|
+
*
|
|
15
|
+
* Widget-owned and `pointer-events: none` throughout. It lives inside a
|
|
16
|
+
* fixed, clipped, full-viewport layer so travelling near an edge cannot
|
|
17
|
+
* grow the host page's scroll area, and it never touches a customer
|
|
18
|
+
* element or intercepts a click.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CURSOR_APPEAR_MS = 260;
|
|
21
|
+
/** The long haul. A hand crossing a dashboard takes about this. */
|
|
22
|
+
export declare const CURSOR_TRAVEL_MS = 1600;
|
|
23
|
+
/** A hand stops before it presses; without this the two moves read as one jerk. */
|
|
24
|
+
export declare const CURSOR_REST_MS = 180;
|
|
25
|
+
export declare const CURSOR_PRESS_MS = 240;
|
|
26
|
+
type Cursor = {
|
|
27
|
+
/** Travel to a viewport point and stop there. */
|
|
28
|
+
moveTo(x: number, y: number): Promise<void>;
|
|
29
|
+
/** The squash and ring that read as a press. */
|
|
30
|
+
press(): Promise<void>;
|
|
31
|
+
/** Fade out and release the node. */
|
|
32
|
+
release(): void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Take the pointer off the page NOW.
|
|
36
|
+
*
|
|
37
|
+
* `release` fades, which is right at the end of the work and wrong when
|
|
38
|
+
* something else is starting: the fade outlives the call, so effects in
|
|
39
|
+
* quick succession left ghosts drifting behind the live one. Anything still
|
|
40
|
+
* carrying the marker is removed outright here.
|
|
41
|
+
*/
|
|
42
|
+
export declare function dismissAgentCursor(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Put a pointer on the page, or hand back the one already there.
|
|
45
|
+
*
|
|
46
|
+
* Returns null when the document will not have it — the caller then does
|
|
47
|
+
* its own thing silently, because a missing animation must never stop the
|
|
48
|
+
* actual work.
|
|
49
|
+
*/
|
|
50
|
+
export declare function showAgentCursor(from?: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
}): Cursor | null;
|
|
54
|
+
/** The point both the gesture and the real event aim at. */
|
|
55
|
+
export declare function centreOf(el: HTMLElement): {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Bring the control into view and walk the pointer to it.
|
|
61
|
+
*
|
|
62
|
+
* Every failure here is swallowed on purpose. The caller owes the waiting
|
|
63
|
+
* turn an answer, and an animation that cannot run is not a reason to
|
|
64
|
+
* withhold one — the work still happens, it just happens unaccompanied.
|
|
65
|
+
*/
|
|
66
|
+
export declare function travelTo(el: HTMLElement, { press }?: {
|
|
67
|
+
press?: boolean;
|
|
68
|
+
}): Promise<{
|
|
69
|
+
done: () => void;
|
|
70
|
+
}>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/page-controls/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,mFAAmF;AACnF,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,MAAM,CAAC;AAqFnC,KAAK,MAAM,GAAG;IACZ,iDAAiD;IACjD,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,gDAAgD;IAChD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,qCAAqC;IACrC,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAwBF;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAOzC;AAQD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,GAAG,MAAM,GAAG,IAAI,CAgIhB;AAED,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAGlE;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,EAAE,EAAE,WAAW,EACf,EAAE,KAAa,EAAE,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC1C,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAkB/B"}
|