@webless/agent 0.2.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/LICENSE +21 -0
- package/README.md +121 -0
- package/dist/chunk-WLQDMWO6.js +932 -0
- package/dist/chunk-WLQDMWO6.js.map +1 -0
- package/dist/embed.cjs +1188 -0
- package/dist/embed.cjs.map +1 -0
- package/dist/embed.css +945 -0
- package/dist/embed.css.map +1 -0
- package/dist/embed.d.cts +55 -0
- package/dist/embed.d.ts +55 -0
- package/dist/embed.js +248 -0
- package/dist/embed.js.map +1 -0
- package/dist/index.cjs +368 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +73 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +332 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +978 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.css +798 -0
- package/dist/react.css.map +1 -0
- package/dist/react.d.cts +113 -0
- package/dist/react.d.ts +113 -0
- package/dist/react.js +36 -0
- package/dist/react.js.map +1 -0
- package/package.json +61 -0
- package/scripts/build-agent-manifest-bundle-impl.mjs +87 -0
- package/scripts/build-agent-manifest-bundle.mjs +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/components/ToolTimeline/ToolTimeline.css","../src/react/components/AgentActivityBubble/AgentActivityBubble.css","../src/react/components/Composer/Composer.css","../src/react/components/FollowUpChips/FollowUpChips.css","../src/react/components/MessageBubble/MessageBubble.css","../src/react/components/AgentRail/AgentRail.css","../src/react/components/AssistEdgeTab/AssistEdgeTab.css","../src/react/styles/tokens.css","../src/react/styles/widget.css"],"sourcesContent":[".tool-timeline {\n width: fit-content;\n max-width: 100%;\n}\n\n.tool-timeline--inline {\n background: transparent;\n border: none;\n border-radius: 0;\n padding: 0;\n}\n\n.tool-timeline:not(.tool-timeline--inline) {\n background: var(--as-surface-muted);\n border: 1px solid var(--as-border);\n border-radius: var(--as-radius-md);\n padding: 12px;\n}\n\n.agent-status {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n min-width: 0;\n animation: agent-status-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n@keyframes agent-status-in {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.agent-status__icon {\n width: 16px;\n height: 16px;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n margin-top: 2px;\n color: var(--as-brand);\n}\n\n.agent-status__icon--error {\n font-size: 12px;\n font-weight: 700;\n color: var(--as-danger);\n}\n\n.agent-status__spinner {\n width: 14px;\n height: 14px;\n animation: as-spin 0.9s linear infinite;\n}\n\n@keyframes as-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.agent-status__copy {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.agent-status__label {\n font-size: 13px;\n font-weight: 500;\n line-height: 1.4;\n color: var(--as-text-muted);\n word-break: break-word;\n}\n\n.agent-status__detail {\n font-size: 12px;\n line-height: 1.35;\n color: var(--as-text-subtle);\n word-break: break-word;\n}\n\n.tool-timeline__streaming-text {\n display: inline-block;\n width: fit-content;\n max-width: 100%;\n font-size: 13px;\n line-height: 1.5;\n color: var(--as-text);\n word-break: break-word;\n margin: 0;\n padding: 10px 12px;\n background: var(--as-surface-muted);\n border: 1px solid var(--as-border);\n border-radius: var(--as-radius-md);\n border-bottom-left-radius: 4px;\n}\n\n.tool-timeline__streaming-text:not(:first-child) {\n margin-top: 10px;\n}\n\n.tool-timeline__cursor {\n display: inline-block;\n width: 2px;\n height: 14px;\n margin-left: 1px;\n vertical-align: text-bottom;\n background: var(--as-brand);\n animation: as-blink 1s step-end infinite;\n}\n\n@keyframes as-blink {\n 50% {\n opacity: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .agent-status {\n animation: none;\n }\n\n .agent-status__spinner {\n animation: none;\n }\n}\n",".agent-activity-bubble {\n align-self: flex-start;\n width: 100%;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.agent-activity-bubble__shell {\n width: fit-content;\n max-width: 100%;\n padding: 0;\n background: transparent;\n border: none;\n}\n",".composer {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.composer__field {\n display: flex;\n align-items: flex-end;\n gap: 6px;\n padding: 6px;\n border: 1px solid var(--as-border);\n border-radius: var(--as-radius-lg);\n background: var(--as-surface-muted);\n}\n\n.composer__field:focus-within {\n border-color: rgb(111 22 255 / 0.35);\n box-shadow: 0 0 0 3px rgb(111 22 255 / 0.1);\n}\n\n.composer__input {\n flex: 1;\n min-width: 0;\n border: none;\n background: transparent;\n resize: none;\n padding: 8px 6px 8px 8px;\n font-size: 13px;\n line-height: 1.45;\n color: var(--as-text);\n max-height: 96px;\n}\n\n.composer__input::placeholder {\n color: var(--as-text-subtle);\n}\n\n.composer__input:focus {\n outline: none;\n}\n\n.composer__send {\n appearance: none;\n border: none;\n width: 34px;\n height: 34px;\n border-radius: 999px;\n background: var(--as-brand);\n color: #fff;\n display: grid;\n place-items: center;\n cursor: pointer;\n flex-shrink: 0;\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\n\n.composer__send:hover:not(:disabled) {\n transform: translateY(-1px);\n}\n\n.composer__send:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.composer__send svg {\n width: 14px;\n height: 14px;\n}\n\n.composer--dock .composer__field {\n align-items: center;\n padding: 5px 5px 5px 13px;\n background: var(--as-surface-muted);\n border: 1px solid var(--as-border);\n border-radius: 999px;\n box-shadow: none;\n}\n\n.composer--dock .composer__field:focus-within {\n border-color: rgb(111 22 255 / 0.35);\n box-shadow: 0 0 0 3px rgb(111 22 255 / 0.1);\n}\n\n.composer--dock .composer__input {\n padding: 11px 0;\n font-size: 15px;\n max-height: 48px;\n}\n\n.composer--dock .composer__send {\n width: 40px;\n height: 40px;\n}\n\n.composer--dock .composer__send svg {\n width: 15px;\n height: 15px;\n}\n",".followups {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.followups__label {\n font-size: 12px;\n font-weight: 700;\n color: var(--as-text-subtle);\n letter-spacing: 0.02em;\n}\n\n.followups__list {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.followups__chip {\n appearance: none;\n border: 1px solid var(--as-border);\n background: var(--as-surface);\n color: var(--as-text);\n font-size: 13px;\n font-weight: 600;\n line-height: 1.4;\n text-align: left;\n border-radius: var(--as-radius-sm);\n padding: 10px 12px;\n cursor: pointer;\n transition: border-color 0.15s ease, background 0.15s ease;\n word-break: break-word;\n}\n\n.followups__chip:hover:not(:disabled) {\n border-color: rgb(111 22 255 / 0.25);\n background: var(--as-brand-soft);\n}\n\n.followups__chip:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.followups--dock {\n width: 100%;\n gap: 0;\n}\n\n.followups__scroll {\n display: flex;\n gap: 8px;\n justify-content: flex-start;\n overflow-x: auto;\n padding: 2px;\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n.followups__scroll::-webkit-scrollbar {\n display: none;\n}\n\n.followups__chip--dock {\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n width: auto;\n max-width: none;\n padding: 8px 12px;\n border-radius: 999px;\n font-size: 12px;\n font-weight: 600;\n white-space: nowrap;\n text-align: left;\n}\n",".message-bubble {\n display: flex;\n flex-direction: column;\n gap: 8px;\n max-width: 92%;\n}\n\n.message-bubble--visitor {\n align-self: flex-end;\n align-items: flex-end;\n}\n\n.message-bubble--agent {\n align-self: flex-start;\n align-items: flex-start;\n max-width: 100%;\n}\n\n.message-bubble__text {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--as-radius-md);\n font-size: 13px;\n line-height: 1.5;\n word-break: break-word;\n}\n\n.message-bubble--visitor .message-bubble__text {\n background: var(--as-visitor-bubble);\n color: var(--as-visitor-text);\n border-bottom-right-radius: 4px;\n}\n\n.message-bubble--agent .message-bubble__text {\n background: var(--as-surface-muted);\n color: var(--as-text);\n border: 1px solid var(--as-border);\n border-bottom-left-radius: 4px;\n}\n",".agent-rail {\n --rail-width: var(--as-rail-max-width);\n display: flex;\n flex-direction: column;\n width: var(--rail-width);\n max-width: var(--rail-width);\n min-width: var(--rail-width);\n height: 100%;\n max-height: 100dvh;\n overflow: hidden;\n background: var(--as-surface);\n border-left: 1px solid var(--as-border);\n box-shadow: var(--as-shadow-rail);\n color: var(--as-text);\n font-family: var(--as-font-body);\n position: relative;\n z-index: var(--as-z-rail);\n}\n\n.agent-rail__header {\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px;\n}\n\n.agent-rail__brand-row {\n display: grid;\n grid-template-columns: 32px 1fr 32px;\n align-items: center;\n min-height: 32px;\n min-width: 0;\n}\n\n.agent-rail__brand-label {\n grid-column: 2;\n grid-row: 1;\n font-family: var(--as-font-display);\n font-size: 14px;\n font-weight: 600;\n letter-spacing: -0.01em;\n line-height: 1;\n text-align: center;\n}\n\n.agent-rail__brand-spacer {\n width: 32px;\n height: 32px;\n}\n\n.agent-rail__collapse,\n.agent-rail__close,\n.agent-rail__expand {\n appearance: none;\n border: none;\n background: transparent;\n color: var(--as-text-subtle);\n width: 32px;\n height: 32px;\n margin: 0;\n padding: 0;\n border-radius: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n flex-shrink: 0;\n grid-row: 1;\n}\n\n.agent-rail__collapse,\n.agent-rail__close {\n grid-column: 1;\n justify-self: start;\n}\n\n.agent-rail__expand {\n grid-column: 3;\n justify-self: end;\n}\n\n.agent-rail__collapse:hover,\n.agent-rail__close:hover,\n.agent-rail__expand:hover {\n background: var(--as-surface-muted);\n color: var(--as-text);\n}\n\n.agent-rail__collapse svg,\n.agent-rail__close svg,\n.agent-rail__expand svg {\n width: 16px;\n height: 16px;\n}\n\n.agent-rail__transcript {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: contain;\n padding: 14px 12px;\n display: flex;\n flex-direction: column;\n gap: 14px;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\n}\n\n.agent-rail__timeline-slot,\n.agent-rail__followups-slot {\n flex-shrink: 0;\n}\n\n.agent-rail__composer-wrap {\n flex-shrink: 0;\n padding: 12px 12px 14px;\n border-top: 1px solid var(--as-border);\n background: var(--as-surface);\n}\n\n.agent-rail__footer {\n margin-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.agent-rail__footer-disclaimer {\n margin: 0;\n text-align: center;\n font-size: 11px;\n color: var(--as-text-subtle);\n line-height: 1.35;\n}\n\n.agent-rail__footer-note {\n margin: 0;\n text-align: center;\n font-size: 11px;\n color: var(--as-text-subtle);\n line-height: 1.35;\n}\n\n.agent-rail--mobile-fullscreen {\n position: fixed;\n inset: 0;\n width: 100%;\n max-width: none;\n min-width: 0;\n height: 100dvh;\n max-height: 100dvh;\n overflow: hidden;\n z-index: var(--as-z-mobile);\n border-left: none;\n box-shadow: none;\n}\n\n.agent-rail--expanded {\n position: fixed;\n top: 50%;\n left: 50%;\n width: 95vw;\n height: 95dvh;\n max-width: none;\n min-width: 0;\n max-height: 95dvh;\n transform: translate(-50%, -50%);\n z-index: calc(var(--as-z-mobile) + 1);\n border: 1px solid var(--as-border);\n border-radius: var(--as-radius-lg);\n box-shadow:\n 0 0 0 1px rgb(42 51 70 / 0.04),\n 0 28px 80px -24px rgb(18 4 62 / 0.35);\n transition:\n width 320ms cubic-bezier(0.22, 1, 0.36, 1),\n height 320ms cubic-bezier(0.22, 1, 0.36, 1),\n transform 320ms cubic-bezier(0.22, 1, 0.36, 1),\n border-radius 320ms cubic-bezier(0.22, 1, 0.36, 1),\n box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1);\n overflow: hidden;\n}\n\n.agent-rail--expanded .agent-rail__transcript {\n padding: 20px 24px 25px;\n align-items: center;\n}\n\n.agent-rail--expanded .agent-rail__transcript .message-bubble {\n width: 85%;\n max-width: 85%;\n}\n\n.agent-rail--expanded .agent-rail__transcript .message-bubble__text {\n font-size: 16px;\n padding: 12px 14px;\n}\n\n.agent-rail--expanded .agent-rail__transcript .tool-timeline__streaming-text {\n font-size: 16px;\n padding: 12px 14px;\n}\n\n.agent-rail--expanded .agent-rail__transcript .message-bubble--visitor {\n align-self: center;\n align-items: flex-end;\n}\n\n.agent-rail--expanded .agent-rail__transcript .message-bubble--agent {\n align-self: center;\n align-items: flex-start;\n}\n\n.agent-rail--expanded .agent-rail__transcript .agent-activity-bubble,\n.agent-rail--expanded .agent-rail__transcript [role=\"alert\"] {\n align-self: center;\n align-items: flex-start;\n width: 85%;\n max-width: 85%;\n}\n\n.agent-rail--expanded .agent-rail__dock-wrap {\n flex-shrink: 0;\n width: 70%;\n max-width: 70%;\n align-self: center;\n padding: 18px 0 24px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n}\n\n.agent-rail--expanded .agent-rail__dock-followups {\n width: 100%;\n}\n\n.agent-rail--expanded .agent-rail__dock-followups .followups__scroll {\n justify-content: flex-start;\n}\n\n.agent-rail--expanded .agent-rail__dock {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 100%;\n padding: 12px;\n border: 1px solid var(--as-border);\n border-radius: calc(var(--as-radius-lg) + 4px);\n background: #fff;\n}\n\n.agent-rail--expanded .agent-rail__footer {\n margin-top: 0;\n width: 100%;\n}\n\n.agent-rail--mobile-fullscreen .agent-rail__close {\n display: grid;\n}\n\n.agent-rail--mobile-fullscreen .agent-rail__collapse {\n display: none;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .agent-rail--expanded {\n transition: none;\n }\n}\n\n@media (max-width: 767px) {\n .agent-rail {\n position: fixed;\n inset: 0;\n width: 100%;\n max-width: none;\n min-width: 0;\n height: 100dvh;\n max-height: 100dvh;\n overflow: hidden;\n z-index: var(--as-z-mobile);\n border-left: none;\n box-shadow: none;\n }\n\n .agent-rail .agent-rail__close {\n display: grid;\n }\n\n .agent-rail .agent-rail__collapse {\n display: none;\n }\n}\n\n@media (min-width: 768px) {\n .agent-rail .agent-rail__close {\n display: none !important;\n }\n}\n",".assist-edge-tab {\n --tab-ink: var(--as-brand);\n --tab-fill: #fff;\n --tab-line: rgb(111 22 255 / 0.35);\n --tab-along: 50%;\n --tab-inset: 0px;\n position: fixed;\n top: auto;\n right: auto;\n bottom: auto;\n left: auto;\n z-index: calc(var(--as-z-rail) + 1);\n appearance: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n border: 1px solid var(--tab-line);\n background: var(--tab-fill);\n color: var(--tab-ink);\n cursor: pointer;\n opacity: 0;\n pointer-events: none;\n box-shadow: -6px 0 20px -12px rgb(18 4 62 / 0.28);\n transition:\n transform 420ms cubic-bezier(0.22, 1, 0.36, 1),\n opacity 240ms ease,\n box-shadow 180ms ease;\n}\n\n.assist-edge-tab.is-visible {\n opacity: 1;\n pointer-events: auto;\n}\n\n.assist-edge-tab:focus-visible {\n outline: 2px solid var(--as-brand);\n outline-offset: 3px;\n}\n\n.assist-edge-tab svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.assist-edge-tab__sparkles {\n width: 18px;\n height: 16px;\n}\n\n.assist-edge-tab__label {\n font-family: var(--as-font-display);\n font-size: 13px;\n font-weight: 600;\n letter-spacing: 0.02em;\n line-height: 1;\n white-space: nowrap;\n}\n\n.assist-edge-tab--right,\n.assist-edge-tab--left {\n flex-direction: column;\n width: 40px;\n min-height: 168px;\n padding: 14px 0 12px;\n}\n\n.assist-edge-tab--right .assist-edge-tab__label,\n.assist-edge-tab--left .assist-edge-tab__label {\n writing-mode: vertical-rl;\n transform: rotate(180deg);\n}\n\n.assist-edge-tab--top,\n.assist-edge-tab--bottom {\n flex-direction: row;\n height: 40px;\n min-width: 168px;\n width: auto;\n padding: 0 14px;\n}\n\n.assist-edge-tab--right {\n top: var(--tab-along);\n right: var(--tab-inset);\n border-right: none;\n border-radius: 999px 0 0 999px;\n transform: translateY(-50%) translateX(calc(100% + 18px));\n}\n\n.assist-edge-tab--right.is-visible {\n transform: translateY(-50%) translateX(0);\n}\n\n.assist-edge-tab--right.is-visible:hover {\n transform: translateY(-50%) translateX(-2px);\n}\n\n.assist-edge-tab--left {\n top: var(--tab-along);\n left: var(--tab-inset);\n border-left: none;\n border-radius: 0 999px 999px 0;\n transform: translateY(-50%) translateX(calc(-100% - 18px));\n}\n\n.assist-edge-tab--left.is-visible {\n transform: translateY(-50%) translateX(0);\n}\n\n.assist-edge-tab--left.is-visible:hover {\n transform: translateY(-50%) translateX(2px);\n}\n\n.assist-edge-tab--top {\n left: var(--tab-along);\n top: var(--tab-inset);\n border-top: none;\n border-radius: 0 0 999px 999px;\n transform: translateX(-50%) translateY(calc(-100% - 18px));\n}\n\n.assist-edge-tab--top.is-visible {\n transform: translateX(-50%) translateY(0);\n}\n\n.assist-edge-tab--top.is-visible:hover {\n transform: translateX(-50%) translateY(2px);\n}\n\n.assist-edge-tab--bottom {\n left: var(--tab-along);\n bottom: var(--tab-inset);\n border-bottom: none;\n border-radius: 999px 999px 0 0;\n transform: translateX(-50%) translateY(calc(100% + 18px));\n}\n\n.assist-edge-tab--bottom.is-visible {\n transform: translateX(-50%) translateY(0);\n}\n\n.assist-edge-tab--bottom.is-visible:hover {\n transform: translateX(-50%) translateY(-2px);\n}\n\n.assist-edge-tab--outline {\n --tab-fill: #f7f6fa;\n --tab-line: rgb(111 22 255 / 0.45);\n}\n\n.assist-edge-tab--outline.assist-edge-tab--right,\n.assist-edge-tab--outline.assist-edge-tab--left {\n min-height: 176px;\n border-radius: 999px;\n border-right: 1px solid var(--tab-line);\n border-left: 1px solid var(--tab-line);\n}\n\n.assist-edge-tab--outline.assist-edge-tab--top,\n.assist-edge-tab--outline.assist-edge-tab--bottom {\n border-radius: 999px;\n border-top: 1px solid var(--tab-line);\n border-bottom: 1px solid var(--tab-line);\n}\n\n.assist-edge-tab--ask {\n --tab-fill: #efe8fb;\n --tab-line: transparent;\n}\n\n.assist-edge-tab--ask.assist-edge-tab--right,\n.assist-edge-tab--ask.assist-edge-tab--left {\n min-height: 196px;\n width: 42px;\n}\n\n.assist-edge-tab--ask.assist-edge-tab--right {\n border-radius: 18px 0 0 18px;\n}\n\n.assist-edge-tab--ask.assist-edge-tab--left {\n border-radius: 0 18px 18px 0;\n}\n\n.assist-edge-tab--fill {\n --tab-fill: var(--as-brand);\n --tab-ink: #fff;\n --tab-line: transparent;\n box-shadow: -8px 0 22px -10px rgb(111 22 255 / 0.55);\n}\n\n.assist-edge-tab--fill.assist-edge-tab--right,\n.assist-edge-tab--fill.assist-edge-tab--left {\n min-height: 180px;\n}\n\n.assist-edge-tab__dots {\n display: grid;\n grid-template-columns: repeat(3, 3px);\n gap: 3px;\n}\n\n.assist-edge-tab--top .assist-edge-tab__dots,\n.assist-edge-tab--bottom .assist-edge-tab__dots {\n grid-template-columns: repeat(4, 3px);\n grid-template-rows: repeat(3, 3px);\n}\n\n.assist-edge-tab__dots i {\n width: 3px;\n height: 3px;\n border-radius: 999px;\n background: currentColor;\n opacity: 0.55;\n}\n\n@media (max-width: 767px) {\n .assist-edge-tab {\n z-index: calc(var(--as-z-mobile) + 2);\n }\n\n .assist-edge-tab--right,\n .assist-edge-tab--left {\n min-height: 148px;\n width: 36px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .assist-edge-tab,\n .assist-edge-tab.is-visible,\n .assist-edge-tab.is-visible:hover {\n transition: none;\n }\n}\n",":root {\n --as-rail-max-width: 450px;\n --as-brand: #6f16ff;\n --as-brand-soft: #f3edff;\n --as-brand-light: #c4b0ff;\n --as-brand-deep: #12043e;\n --as-surface: #ffffff;\n --as-surface-muted: #f4f6fb;\n --as-text: #171b2a;\n --as-text-muted: #5a6378;\n --as-text-subtle: #8a94a8;\n --as-border: rgb(42 51 70 / 0.1);\n --as-visitor-bubble: #6f16ff;\n --as-visitor-text: #ffffff;\n --as-success: #18794e;\n --as-danger: #c94b63;\n --as-radius-sm: 8px;\n --as-radius-md: 12px;\n --as-radius-lg: 16px;\n --as-font-body: \"Mulish\", \"Avenir Next\", \"Segoe UI\", sans-serif;\n --as-font-display: \"Space Grotesk\", sans-serif;\n --as-shadow-rail: 0 0 0 1px rgb(42 51 70 / 0.06), -8px 0 24px -12px rgb(18 4 62 / 0.12);\n --as-z-rail: 40;\n --as-z-mobile: 1000;\n}\n\n.webless-agent-root,\n.webless-agent-root *,\n.webless-agent-root *::before,\n.webless-agent-root *::after {\n box-sizing: border-box;\n}\n\n.webless-agent-root {\n font-family: var(--as-font-body);\n color: var(--as-text);\n -webkit-font-smoothing: antialiased;\n}\n\n.webless-agent-root button,\n.webless-agent-root input,\n.webless-agent-root textarea {\n font: inherit;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .webless-agent-root *,\n .webless-agent-root *::before,\n .webless-agent-root *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n",".webless-agent-root {\n --rail-track: var(--as-rail-max-width);\n --rail-ease: cubic-bezier(0.22, 1, 0.36, 1);\n --rail-duration: 420ms;\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: var(--as-z-mobile);\n}\n\n.webless-agent-root__shell {\n position: fixed;\n inset: 0;\n display: grid;\n grid-template-columns: minmax(0, 1fr) var(--rail-track);\n pointer-events: none;\n transition: grid-template-columns var(--rail-duration) var(--rail-ease);\n}\n\n.webless-agent-root__rail-slot {\n min-width: 0;\n height: 100%;\n overflow: hidden;\n justify-self: end;\n pointer-events: auto;\n transform: translateX(0);\n opacity: 1;\n transition:\n transform var(--rail-duration) var(--rail-ease),\n opacity 220ms ease;\n}\n\n.webless-agent-root__shell--collapsed {\n --rail-track: 0px;\n}\n\n.webless-agent-root__shell--collapsed .webless-agent-root__rail-slot {\n transform: translateX(100%);\n opacity: 0;\n pointer-events: none;\n}\n\n.webless-agent-root__shell--expanded:not(.webless-agent-root__shell--collapsed) {\n --rail-track: 0px;\n}\n\n.webless-agent-root__shell--expanded:not(.webless-agent-root__shell--collapsed) .webless-agent-root__rail-slot {\n position: fixed;\n inset: 0;\n width: 100%;\n height: 100%;\n overflow: visible;\n transform: none;\n opacity: 1;\n pointer-events: none;\n z-index: calc(var(--as-z-mobile) + 1);\n}\n\n.webless-agent-root__shell--expanded:not(.webless-agent-root__shell--collapsed) .agent-rail {\n pointer-events: auto;\n width: 95vw;\n min-width: 0;\n max-width: none;\n height: 95dvh;\n max-height: 95dvh;\n}\n\n.webless-agent-root__rail-slot .agent-rail {\n min-width: 0;\n width: var(--as-rail-max-width);\n max-width: none;\n height: 100%;\n}\n\n.webless-agent-root__backdrop {\n position: fixed;\n inset: 0;\n z-index: var(--as-z-mobile);\n border: none;\n padding: 0;\n margin: 0;\n background: rgb(18 4 62 / 0.18);\n cursor: pointer;\n pointer-events: auto;\n}\n\n@media (max-width: 767px) {\n .webless-agent-root__shell {\n grid-template-columns: 1fr;\n }\n\n .webless-agent-root__shell:not(.webless-agent-root__shell--collapsed) .webless-agent-root__rail-slot {\n position: fixed;\n inset: 0;\n width: 100%;\n height: 100%;\n transform: none;\n opacity: 1;\n pointer-events: auto;\n z-index: calc(var(--as-z-mobile) + 1);\n }\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,aAAW;AACb;AAEA,CAAC;AACC,cAAY;AACZ,UAAQ;AACR,iBAAe;AACf,WAAS;AACX;AAEA,CAZC,aAYa,KAAK,CAPlB;AAQC,cAAY,IAAI;AAChB,UAAQ,IAAI,MAAM,IAAI;AACtB,iBAAe,IAAI;AACnB,WAAS;AACX;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACL,aAAW;AACX,aAAW,gBAAgB,MAAM,aAAa,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;AAC/D;AAEA,WAHa;AAIX;AACE,aAAS;AACT,eAAW,WAAW;AACxB;AAEA;AACE,aAAS;AACT,eAAW,WAAW;AACxB;AACF;AAEA,CAAC;AACC,SAAO;AACP,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BxC,sCA0B+E,CAAC;AAC/E,kBAAgB;AAChB,SAAO;AACP,aAAW;AACX,aAAW;AACX,UAAQ;AACR,cAAY;AACd;AAEA,CAhDC,8BAgD8B,CATkD;AAU/E,aAAW;AACX,SAAO,IAAI;AACX,aAAW;AACX,UAAQ;AACV;AAEA,CAAC;AACC,YAAU;AACV,SAAO;AACP,WAAS,IAAI;AACb,UAAQ;AACR,WAAS;AACT,UAAQ;AACR,cAAY,IAAI,GAAG,EAAE,GAAG,EAAE;AAC1B,UAAQ;AACR,kBAAgB;AAClB;AAEA,QAAO,WAAY;AACjB,GA7ED;AA8EG,2BAAuB;AACzB;AAEA,GAjFD,yBAiF2B,KAAK,CA3DhC,sCA2DuE,CAxEvE;AAyEG,cAAU;AACV,WAAO;AACP,WAAO;AACP,YAAQ;AACR,eAAW;AACX,aAAS;AACT,oBAAgB;AAChB,aAAS,KAAK,IAAI,eAAe,EAAE;AACrC;AACF;","names":[]}
|
package/dist/embed.d.cts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Root } from 'react-dom/client';
|
|
2
|
+
|
|
3
|
+
type AgentMountStrategy = "body" | "selector" | "script-parent";
|
|
4
|
+
type AgentTabVariant = "outline";
|
|
5
|
+
type AgentTabSide = "right" | "left" | "top" | "bottom";
|
|
6
|
+
type AgentPlacementConfig = {
|
|
7
|
+
side: AgentTabSide;
|
|
8
|
+
along: number;
|
|
9
|
+
inset: number;
|
|
10
|
+
variant: AgentTabVariant;
|
|
11
|
+
};
|
|
12
|
+
type AgentTagManifest = {
|
|
13
|
+
customerId: string;
|
|
14
|
+
indexId: string;
|
|
15
|
+
runtimeOrigin?: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
mount?: {
|
|
18
|
+
selector?: string;
|
|
19
|
+
strategy?: AgentMountStrategy;
|
|
20
|
+
};
|
|
21
|
+
placement?: Partial<AgentPlacementConfig>;
|
|
22
|
+
};
|
|
23
|
+
declare const DEFAULT_AGENT_PLACEMENT: AgentPlacementConfig;
|
|
24
|
+
declare function normalizeAgentPlacement(placement?: Partial<AgentPlacementConfig>): AgentPlacementConfig;
|
|
25
|
+
declare function normalizeAgentTagManifest(manifest: AgentTagManifest): {
|
|
26
|
+
customerId: string;
|
|
27
|
+
indexId: string;
|
|
28
|
+
runtimeOrigin: string;
|
|
29
|
+
version: string;
|
|
30
|
+
mount: {
|
|
31
|
+
selector: string | undefined;
|
|
32
|
+
strategy: AgentMountStrategy;
|
|
33
|
+
};
|
|
34
|
+
placement: AgentPlacementConfig;
|
|
35
|
+
};
|
|
36
|
+
type NormalizedAgentTagManifest = ReturnType<typeof normalizeAgentTagManifest>;
|
|
37
|
+
|
|
38
|
+
type AgentRuntimeHandle = {
|
|
39
|
+
customerId: string;
|
|
40
|
+
manifest: NormalizedAgentTagManifest;
|
|
41
|
+
host: HTMLElement;
|
|
42
|
+
root: Root;
|
|
43
|
+
open: () => void;
|
|
44
|
+
close: () => void;
|
|
45
|
+
unmount: () => void;
|
|
46
|
+
};
|
|
47
|
+
declare function mountAgent(input: {
|
|
48
|
+
manifest: AgentTagManifest;
|
|
49
|
+
script?: HTMLScriptElement | null;
|
|
50
|
+
}): AgentRuntimeHandle;
|
|
51
|
+
declare function unmountAgent(customerId?: string): boolean;
|
|
52
|
+
declare function getMountedAgent(customerId?: string): AgentRuntimeHandle | null;
|
|
53
|
+
declare function bootstrapAgent(manifest: AgentTagManifest, script?: HTMLScriptElement | null): AgentRuntimeHandle;
|
|
54
|
+
|
|
55
|
+
export { type AgentMountStrategy, type AgentPlacementConfig, type AgentRuntimeHandle, type AgentTabSide, type AgentTabVariant, type AgentTagManifest, DEFAULT_AGENT_PLACEMENT, type NormalizedAgentTagManifest, bootstrapAgent, getMountedAgent, mountAgent, normalizeAgentPlacement, normalizeAgentTagManifest, unmountAgent };
|
package/dist/embed.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Root } from 'react-dom/client';
|
|
2
|
+
|
|
3
|
+
type AgentMountStrategy = "body" | "selector" | "script-parent";
|
|
4
|
+
type AgentTabVariant = "outline";
|
|
5
|
+
type AgentTabSide = "right" | "left" | "top" | "bottom";
|
|
6
|
+
type AgentPlacementConfig = {
|
|
7
|
+
side: AgentTabSide;
|
|
8
|
+
along: number;
|
|
9
|
+
inset: number;
|
|
10
|
+
variant: AgentTabVariant;
|
|
11
|
+
};
|
|
12
|
+
type AgentTagManifest = {
|
|
13
|
+
customerId: string;
|
|
14
|
+
indexId: string;
|
|
15
|
+
runtimeOrigin?: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
mount?: {
|
|
18
|
+
selector?: string;
|
|
19
|
+
strategy?: AgentMountStrategy;
|
|
20
|
+
};
|
|
21
|
+
placement?: Partial<AgentPlacementConfig>;
|
|
22
|
+
};
|
|
23
|
+
declare const DEFAULT_AGENT_PLACEMENT: AgentPlacementConfig;
|
|
24
|
+
declare function normalizeAgentPlacement(placement?: Partial<AgentPlacementConfig>): AgentPlacementConfig;
|
|
25
|
+
declare function normalizeAgentTagManifest(manifest: AgentTagManifest): {
|
|
26
|
+
customerId: string;
|
|
27
|
+
indexId: string;
|
|
28
|
+
runtimeOrigin: string;
|
|
29
|
+
version: string;
|
|
30
|
+
mount: {
|
|
31
|
+
selector: string | undefined;
|
|
32
|
+
strategy: AgentMountStrategy;
|
|
33
|
+
};
|
|
34
|
+
placement: AgentPlacementConfig;
|
|
35
|
+
};
|
|
36
|
+
type NormalizedAgentTagManifest = ReturnType<typeof normalizeAgentTagManifest>;
|
|
37
|
+
|
|
38
|
+
type AgentRuntimeHandle = {
|
|
39
|
+
customerId: string;
|
|
40
|
+
manifest: NormalizedAgentTagManifest;
|
|
41
|
+
host: HTMLElement;
|
|
42
|
+
root: Root;
|
|
43
|
+
open: () => void;
|
|
44
|
+
close: () => void;
|
|
45
|
+
unmount: () => void;
|
|
46
|
+
};
|
|
47
|
+
declare function mountAgent(input: {
|
|
48
|
+
manifest: AgentTagManifest;
|
|
49
|
+
script?: HTMLScriptElement | null;
|
|
50
|
+
}): AgentRuntimeHandle;
|
|
51
|
+
declare function unmountAgent(customerId?: string): boolean;
|
|
52
|
+
declare function getMountedAgent(customerId?: string): AgentRuntimeHandle | null;
|
|
53
|
+
declare function bootstrapAgent(manifest: AgentTagManifest, script?: HTMLScriptElement | null): AgentRuntimeHandle;
|
|
54
|
+
|
|
55
|
+
export { type AgentMountStrategy, type AgentPlacementConfig, type AgentRuntimeHandle, type AgentTabSide, type AgentTabVariant, type AgentTagManifest, DEFAULT_AGENT_PLACEMENT, type NormalizedAgentTagManifest, bootstrapAgent, getMountedAgent, mountAgent, normalizeAgentPlacement, normalizeAgentTagManifest, unmountAgent };
|
package/dist/embed.js
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentRail,
|
|
3
|
+
AssistEdgeTab,
|
|
4
|
+
DEFAULT_RUNTIME_ORIGIN,
|
|
5
|
+
createIdleSuggestions,
|
|
6
|
+
hasVisitorMessages,
|
|
7
|
+
resolveAgentRuntimeConfig,
|
|
8
|
+
useAgentChat
|
|
9
|
+
} from "./chunk-WLQDMWO6.js";
|
|
10
|
+
|
|
11
|
+
// src/embed/mount.tsx
|
|
12
|
+
import { createRoot } from "react-dom/client";
|
|
13
|
+
|
|
14
|
+
// src/embed/controller.ts
|
|
15
|
+
var controllers = /* @__PURE__ */ new Map();
|
|
16
|
+
function registerAgentPanelController(customerId, controller) {
|
|
17
|
+
controllers.set(customerId, controller);
|
|
18
|
+
}
|
|
19
|
+
function unregisterAgentPanelController(customerId) {
|
|
20
|
+
controllers.delete(customerId);
|
|
21
|
+
}
|
|
22
|
+
function openAgentPanel(customerId) {
|
|
23
|
+
controllers.get(customerId)?.open();
|
|
24
|
+
}
|
|
25
|
+
function closeAgentPanel(customerId) {
|
|
26
|
+
controllers.get(customerId)?.close();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/embed/AgentWidget.tsx
|
|
30
|
+
import { useEffect, useState } from "react";
|
|
31
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
+
function useIsMobile(breakpoint = 767) {
|
|
33
|
+
const [isMobile, setIsMobile] = useState(
|
|
34
|
+
() => typeof window !== "undefined" && window.matchMedia(`(max-width: ${breakpoint}px)`).matches
|
|
35
|
+
);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const media = window.matchMedia(`(max-width: ${breakpoint}px)`);
|
|
38
|
+
const onChange = () => setIsMobile(media.matches);
|
|
39
|
+
onChange();
|
|
40
|
+
media.addEventListener("change", onChange);
|
|
41
|
+
return () => media.removeEventListener("change", onChange);
|
|
42
|
+
}, [breakpoint]);
|
|
43
|
+
return isMobile;
|
|
44
|
+
}
|
|
45
|
+
function AgentWidget({ manifest }) {
|
|
46
|
+
const isMobile = useIsMobile();
|
|
47
|
+
const [railCollapsed, setRailCollapsed] = useState(true);
|
|
48
|
+
const [railExpanded, setRailExpanded] = useState(false);
|
|
49
|
+
const { state, submit } = useAgentChat({
|
|
50
|
+
customerId: manifest.customerId,
|
|
51
|
+
indexId: manifest.indexId,
|
|
52
|
+
runtimeOrigin: manifest.runtimeOrigin
|
|
53
|
+
});
|
|
54
|
+
const idle = state.phase === "idle" && !hasVisitorMessages(state.messages);
|
|
55
|
+
const placement = manifest.placement;
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
registerAgentPanelController(manifest.customerId, {
|
|
58
|
+
open: () => setRailCollapsed(false),
|
|
59
|
+
close: () => {
|
|
60
|
+
setRailCollapsed(true);
|
|
61
|
+
setRailExpanded(false);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return () => unregisterAgentPanelController(manifest.customerId);
|
|
65
|
+
}, [manifest.customerId]);
|
|
66
|
+
async function handleSubmit(message) {
|
|
67
|
+
if (isMobile) setRailCollapsed(false);
|
|
68
|
+
await submit(message);
|
|
69
|
+
}
|
|
70
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
className: `webless-agent-root__shell${railCollapsed ? " webless-agent-root__shell--collapsed" : ""}${railExpanded ? " webless-agent-root__shell--expanded" : ""}`,
|
|
75
|
+
children: /* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: "webless-agent-root__rail-slot",
|
|
79
|
+
inert: railCollapsed || void 0,
|
|
80
|
+
"aria-hidden": railCollapsed,
|
|
81
|
+
children: /* @__PURE__ */ jsx(
|
|
82
|
+
AgentRail,
|
|
83
|
+
{
|
|
84
|
+
state: idle ? {
|
|
85
|
+
...state,
|
|
86
|
+
followUps: createIdleSuggestions()
|
|
87
|
+
} : state,
|
|
88
|
+
mobileFullscreen: isMobile && !railCollapsed,
|
|
89
|
+
expanded: railExpanded,
|
|
90
|
+
onCollapse: !isMobile ? () => setRailCollapsed(true) : void 0,
|
|
91
|
+
onClose: isMobile ? () => setRailCollapsed(true) : void 0,
|
|
92
|
+
onExpandToggle: !isMobile ? () => setRailExpanded((current) => !current) : void 0,
|
|
93
|
+
onSubmit: handleSubmit,
|
|
94
|
+
onFollowUpSelect: (label) => void handleSubmit(label)
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
!isMobile && railExpanded && !railCollapsed ? /* @__PURE__ */ jsx(
|
|
102
|
+
"button",
|
|
103
|
+
{
|
|
104
|
+
type: "button",
|
|
105
|
+
className: "webless-agent-root__backdrop",
|
|
106
|
+
"aria-label": "Close expanded assist",
|
|
107
|
+
onClick: () => setRailExpanded(false)
|
|
108
|
+
}
|
|
109
|
+
) : null,
|
|
110
|
+
railCollapsed ? /* @__PURE__ */ jsx(
|
|
111
|
+
AssistEdgeTab,
|
|
112
|
+
{
|
|
113
|
+
variant: placement.variant,
|
|
114
|
+
side: placement.side,
|
|
115
|
+
along: placement.along,
|
|
116
|
+
inset: placement.inset,
|
|
117
|
+
visible: true,
|
|
118
|
+
onOpen: () => setRailCollapsed(false)
|
|
119
|
+
}
|
|
120
|
+
) : null
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/embed/manifest.ts
|
|
125
|
+
var DEFAULT_AGENT_PLACEMENT = {
|
|
126
|
+
side: "right",
|
|
127
|
+
along: 50,
|
|
128
|
+
inset: 0,
|
|
129
|
+
variant: "outline"
|
|
130
|
+
};
|
|
131
|
+
function normalizeAgentPlacement(placement) {
|
|
132
|
+
const along = placement?.along ?? DEFAULT_AGENT_PLACEMENT.along;
|
|
133
|
+
return {
|
|
134
|
+
side: placement?.side ?? DEFAULT_AGENT_PLACEMENT.side,
|
|
135
|
+
along: Math.min(100, Math.max(0, along)),
|
|
136
|
+
inset: Math.max(0, placement?.inset ?? DEFAULT_AGENT_PLACEMENT.inset),
|
|
137
|
+
variant: placement?.variant ?? DEFAULT_AGENT_PLACEMENT.variant
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function normalizeAgentTagManifest(manifest) {
|
|
141
|
+
const indexId = manifest.indexId.trim();
|
|
142
|
+
if (!indexId) {
|
|
143
|
+
throw new Error("Agent manifest requires indexId.");
|
|
144
|
+
}
|
|
145
|
+
const customerId = manifest.customerId.trim();
|
|
146
|
+
if (!customerId) {
|
|
147
|
+
throw new Error("Agent manifest requires customerId.");
|
|
148
|
+
}
|
|
149
|
+
const runtime = resolveAgentRuntimeConfig({
|
|
150
|
+
indexId,
|
|
151
|
+
runtimeOrigin: manifest.runtimeOrigin?.trim() || DEFAULT_RUNTIME_ORIGIN
|
|
152
|
+
});
|
|
153
|
+
return {
|
|
154
|
+
customerId,
|
|
155
|
+
indexId,
|
|
156
|
+
runtimeOrigin: runtime.origin,
|
|
157
|
+
version: manifest.version?.trim() || "published",
|
|
158
|
+
mount: {
|
|
159
|
+
selector: manifest.mount?.selector?.trim(),
|
|
160
|
+
strategy: manifest.mount?.strategy ?? "body"
|
|
161
|
+
},
|
|
162
|
+
placement: normalizeAgentPlacement(manifest.placement)
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// src/embed/mount.tsx
|
|
167
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
168
|
+
var mountedHandles = /* @__PURE__ */ new Map();
|
|
169
|
+
var latestCustomerId = null;
|
|
170
|
+
function resolveMountHost(manifest, script) {
|
|
171
|
+
const strategy = manifest.mount.strategy ?? "body";
|
|
172
|
+
if (strategy === "script-parent" && script?.parentElement instanceof HTMLElement) {
|
|
173
|
+
return script.parentElement;
|
|
174
|
+
}
|
|
175
|
+
if (strategy === "selector" && manifest.mount.selector) {
|
|
176
|
+
const target = document.querySelector(manifest.mount.selector);
|
|
177
|
+
if (target instanceof HTMLElement) return target;
|
|
178
|
+
}
|
|
179
|
+
return document.body;
|
|
180
|
+
}
|
|
181
|
+
function createHost(customerId) {
|
|
182
|
+
const host = document.createElement("div");
|
|
183
|
+
host.className = "webless-agent-root";
|
|
184
|
+
host.dataset.weblessAgentCustomerId = customerId;
|
|
185
|
+
host.setAttribute("data-webless-agent", customerId);
|
|
186
|
+
return host;
|
|
187
|
+
}
|
|
188
|
+
function mountAgent(input) {
|
|
189
|
+
const manifest = normalizeAgentTagManifest(input.manifest);
|
|
190
|
+
const existing = mountedHandles.get(manifest.customerId);
|
|
191
|
+
if (existing) {
|
|
192
|
+
return existing;
|
|
193
|
+
}
|
|
194
|
+
const mountTarget = resolveMountHost(manifest, input.script ?? null);
|
|
195
|
+
const host = createHost(manifest.customerId);
|
|
196
|
+
mountTarget.append(host);
|
|
197
|
+
const root = createRoot(host);
|
|
198
|
+
root.render(/* @__PURE__ */ jsx2(AgentWidget, { manifest }));
|
|
199
|
+
const handle = {
|
|
200
|
+
customerId: manifest.customerId,
|
|
201
|
+
manifest,
|
|
202
|
+
host,
|
|
203
|
+
root,
|
|
204
|
+
open: () => {
|
|
205
|
+
openAgentPanel(manifest.customerId);
|
|
206
|
+
},
|
|
207
|
+
close: () => {
|
|
208
|
+
closeAgentPanel(manifest.customerId);
|
|
209
|
+
},
|
|
210
|
+
unmount: () => {
|
|
211
|
+
root.unmount();
|
|
212
|
+
host.remove();
|
|
213
|
+
mountedHandles.delete(manifest.customerId);
|
|
214
|
+
if (latestCustomerId === manifest.customerId) {
|
|
215
|
+
latestCustomerId = null;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
mountedHandles.set(manifest.customerId, handle);
|
|
220
|
+
latestCustomerId = manifest.customerId;
|
|
221
|
+
return handle;
|
|
222
|
+
}
|
|
223
|
+
function unmountAgent(customerId) {
|
|
224
|
+
const id = customerId ?? latestCustomerId;
|
|
225
|
+
if (!id) return false;
|
|
226
|
+
const handle = mountedHandles.get(id);
|
|
227
|
+
if (!handle) return false;
|
|
228
|
+
handle.unmount();
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
function getMountedAgent(customerId) {
|
|
232
|
+
if (customerId) return mountedHandles.get(customerId) ?? null;
|
|
233
|
+
if (latestCustomerId) return mountedHandles.get(latestCustomerId) ?? null;
|
|
234
|
+
return mountedHandles.values().next().value ?? null;
|
|
235
|
+
}
|
|
236
|
+
function bootstrapAgent(manifest, script) {
|
|
237
|
+
return mountAgent({ manifest, script });
|
|
238
|
+
}
|
|
239
|
+
export {
|
|
240
|
+
DEFAULT_AGENT_PLACEMENT,
|
|
241
|
+
bootstrapAgent,
|
|
242
|
+
getMountedAgent,
|
|
243
|
+
mountAgent,
|
|
244
|
+
normalizeAgentPlacement,
|
|
245
|
+
normalizeAgentTagManifest,
|
|
246
|
+
unmountAgent
|
|
247
|
+
};
|
|
248
|
+
//# sourceMappingURL=embed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/embed/mount.tsx","../src/embed/controller.ts","../src/embed/AgentWidget.tsx","../src/embed/manifest.ts"],"sourcesContent":["import { createRoot, type Root } from \"react-dom/client\";\nimport { closeAgentPanel, openAgentPanel } from \"./controller\";\nimport { AgentWidget } from \"./AgentWidget\";\nimport {\n normalizeAgentTagManifest,\n type AgentTagManifest,\n type NormalizedAgentTagManifest,\n} from \"./manifest\";\n\nexport type AgentRuntimeHandle = {\n customerId: string;\n manifest: NormalizedAgentTagManifest;\n host: HTMLElement;\n root: Root;\n open: () => void;\n close: () => void;\n unmount: () => void;\n};\n\nconst mountedHandles = new Map<string, AgentRuntimeHandle>();\nlet latestCustomerId: string | null = null;\n\nfunction resolveMountHost(manifest: NormalizedAgentTagManifest, script?: HTMLScriptElement | null) {\n const strategy = manifest.mount.strategy ?? \"body\";\n\n if (strategy === \"script-parent\" && script?.parentElement instanceof HTMLElement) {\n return script.parentElement;\n }\n\n if (strategy === \"selector\" && manifest.mount.selector) {\n const target = document.querySelector(manifest.mount.selector);\n if (target instanceof HTMLElement) return target;\n }\n\n return document.body;\n}\n\nfunction createHost(customerId: string) {\n const host = document.createElement(\"div\");\n host.className = \"webless-agent-root\";\n host.dataset.weblessAgentCustomerId = customerId;\n host.setAttribute(\"data-webless-agent\", customerId);\n return host;\n}\n\nexport function mountAgent(input: {\n manifest: AgentTagManifest;\n script?: HTMLScriptElement | null;\n}): AgentRuntimeHandle {\n const manifest = normalizeAgentTagManifest(input.manifest);\n const existing = mountedHandles.get(manifest.customerId);\n if (existing) {\n return existing;\n }\n\n const mountTarget = resolveMountHost(manifest, input.script ?? null);\n const host = createHost(manifest.customerId);\n mountTarget.append(host);\n\n const root = createRoot(host);\n root.render(<AgentWidget manifest={manifest} />);\n\n const handle: AgentRuntimeHandle = {\n customerId: manifest.customerId,\n manifest,\n host,\n root,\n open: () => {\n openAgentPanel(manifest.customerId);\n },\n close: () => {\n closeAgentPanel(manifest.customerId);\n },\n unmount: () => {\n root.unmount();\n host.remove();\n mountedHandles.delete(manifest.customerId);\n if (latestCustomerId === manifest.customerId) {\n latestCustomerId = null;\n }\n },\n };\n\n mountedHandles.set(manifest.customerId, handle);\n latestCustomerId = manifest.customerId;\n return handle;\n}\n\nexport function unmountAgent(customerId?: string) {\n const id = customerId ?? latestCustomerId;\n if (!id) return false;\n const handle = mountedHandles.get(id);\n if (!handle) return false;\n handle.unmount();\n return true;\n}\n\nexport function getMountedAgent(customerId?: string) {\n if (customerId) return mountedHandles.get(customerId) ?? null;\n if (latestCustomerId) return mountedHandles.get(latestCustomerId) ?? null;\n return mountedHandles.values().next().value ?? null;\n}\n\nexport function bootstrapAgent(manifest: AgentTagManifest, script?: HTMLScriptElement | null) {\n return mountAgent({ manifest, script });\n}\n","type AgentPanelController = {\n open: () => void;\n close: () => void;\n};\n\nconst controllers = new Map<string, AgentPanelController>();\n\nexport function registerAgentPanelController(customerId: string, controller: AgentPanelController) {\n controllers.set(customerId, controller);\n}\n\nexport function unregisterAgentPanelController(customerId: string) {\n controllers.delete(customerId);\n}\n\nexport function openAgentPanel(customerId: string) {\n controllers.get(customerId)?.open();\n}\n\nexport function closeAgentPanel(customerId: string) {\n controllers.get(customerId)?.close();\n}\n","import { useEffect, useState } from \"react\";\nimport { AgentRail } from \"../react/components/AgentRail\";\nimport { AssistEdgeTab } from \"../react/components/AssistEdgeTab/AssistEdgeTab\";\nimport {\n createIdleSuggestions,\n hasVisitorMessages,\n useAgentChat,\n} from \"../react/hooks/useAgentChat\";\nimport {\n registerAgentPanelController,\n unregisterAgentPanelController,\n} from \"./controller\";\nimport type { NormalizedAgentTagManifest } from \"./manifest\";\nimport \"../react/styles/tokens.css\";\nimport \"../react/styles/widget.css\";\nimport \"../react/components/AgentRail/AgentRail.css\";\nimport \"../react/components/AgentActivityBubble/AgentActivityBubble.css\";\nimport \"../react/components/Composer/Composer.css\";\nimport \"../react/components/FollowUpChips/FollowUpChips.css\";\nimport \"../react/components/MessageBubble/MessageBubble.css\";\nimport \"../react/components/ToolTimeline/ToolTimeline.css\";\nimport \"../react/components/AssistEdgeTab/AssistEdgeTab.css\";\n\nfunction useIsMobile(breakpoint = 767) {\n const [isMobile, setIsMobile] = useState(\n () => typeof window !== \"undefined\" && window.matchMedia(`(max-width: ${breakpoint}px)`).matches,\n );\n\n useEffect(() => {\n const media = window.matchMedia(`(max-width: ${breakpoint}px)`);\n const onChange = () => setIsMobile(media.matches);\n onChange();\n media.addEventListener(\"change\", onChange);\n return () => media.removeEventListener(\"change\", onChange);\n }, [breakpoint]);\n\n return isMobile;\n}\n\nexport function AgentWidget({ manifest }: { manifest: NormalizedAgentTagManifest }) {\n const isMobile = useIsMobile();\n const [railCollapsed, setRailCollapsed] = useState(true);\n const [railExpanded, setRailExpanded] = useState(false);\n const { state, submit } = useAgentChat({\n customerId: manifest.customerId,\n indexId: manifest.indexId,\n runtimeOrigin: manifest.runtimeOrigin,\n });\n\n const idle = state.phase === \"idle\" && !hasVisitorMessages(state.messages);\n const placement = manifest.placement;\n\n useEffect(() => {\n registerAgentPanelController(manifest.customerId, {\n open: () => setRailCollapsed(false),\n close: () => {\n setRailCollapsed(true);\n setRailExpanded(false);\n },\n });\n return () => unregisterAgentPanelController(manifest.customerId);\n }, [manifest.customerId]);\n\n async function handleSubmit(message: string) {\n if (isMobile) setRailCollapsed(false);\n await submit(message);\n }\n\n return (\n <>\n <div\n className={`webless-agent-root__shell${railCollapsed ? \" webless-agent-root__shell--collapsed\" : \"\"}${railExpanded ? \" webless-agent-root__shell--expanded\" : \"\"}`}\n >\n <div\n className=\"webless-agent-root__rail-slot\"\n inert={railCollapsed || undefined}\n aria-hidden={railCollapsed}\n >\n <AgentRail\n state={\n idle\n ? {\n ...state,\n followUps: createIdleSuggestions(),\n }\n : state\n }\n mobileFullscreen={isMobile && !railCollapsed}\n expanded={railExpanded}\n onCollapse={!isMobile ? () => setRailCollapsed(true) : undefined}\n onClose={isMobile ? () => setRailCollapsed(true) : undefined}\n onExpandToggle={!isMobile ? () => setRailExpanded((current) => !current) : undefined}\n onSubmit={handleSubmit}\n onFollowUpSelect={(label) => void handleSubmit(label)}\n />\n </div>\n </div>\n\n {!isMobile && railExpanded && !railCollapsed ? (\n <button\n type=\"button\"\n className=\"webless-agent-root__backdrop\"\n aria-label=\"Close expanded assist\"\n onClick={() => setRailExpanded(false)}\n />\n ) : null}\n\n {railCollapsed ? (\n <AssistEdgeTab\n variant={placement.variant}\n side={placement.side}\n along={placement.along}\n inset={placement.inset}\n visible\n onOpen={() => setRailCollapsed(false)}\n />\n ) : null}\n </>\n );\n}\n","import { DEFAULT_RUNTIME_ORIGIN, resolveAgentRuntimeConfig } from \"../runtime/config\";\n\nexport type AgentMountStrategy = \"body\" | \"selector\" | \"script-parent\";\n\nexport type AgentTabVariant = \"outline\";\nexport type AgentTabSide = \"right\" | \"left\" | \"top\" | \"bottom\";\n\nexport type AgentPlacementConfig = {\n side: AgentTabSide;\n along: number;\n inset: number;\n variant: AgentTabVariant;\n};\n\nexport type AgentTagManifest = {\n customerId: string;\n indexId: string;\n runtimeOrigin?: string;\n version?: string;\n mount?: {\n selector?: string;\n strategy?: AgentMountStrategy;\n };\n placement?: Partial<AgentPlacementConfig>;\n};\n\nexport const DEFAULT_AGENT_PLACEMENT: AgentPlacementConfig = {\n side: \"right\",\n along: 50,\n inset: 0,\n variant: \"outline\",\n};\n\nexport function normalizeAgentPlacement(\n placement?: Partial<AgentPlacementConfig>,\n): AgentPlacementConfig {\n const along = placement?.along ?? DEFAULT_AGENT_PLACEMENT.along;\n return {\n side: placement?.side ?? DEFAULT_AGENT_PLACEMENT.side,\n along: Math.min(100, Math.max(0, along)),\n inset: Math.max(0, placement?.inset ?? DEFAULT_AGENT_PLACEMENT.inset),\n variant: placement?.variant ?? DEFAULT_AGENT_PLACEMENT.variant,\n };\n}\n\nexport function normalizeAgentTagManifest(manifest: AgentTagManifest) {\n const indexId = manifest.indexId.trim();\n if (!indexId) {\n throw new Error(\"Agent manifest requires indexId.\");\n }\n\n const customerId = manifest.customerId.trim();\n if (!customerId) {\n throw new Error(\"Agent manifest requires customerId.\");\n }\n\n const runtime = resolveAgentRuntimeConfig({\n indexId,\n runtimeOrigin: manifest.runtimeOrigin?.trim() || DEFAULT_RUNTIME_ORIGIN,\n });\n\n return {\n customerId,\n indexId,\n runtimeOrigin: runtime.origin,\n version: manifest.version?.trim() || \"published\",\n mount: {\n selector: manifest.mount?.selector?.trim(),\n strategy: manifest.mount?.strategy ?? \"body\",\n },\n placement: normalizeAgentPlacement(manifest.placement),\n };\n}\n\nexport type NormalizedAgentTagManifest = ReturnType<typeof normalizeAgentTagManifest>;\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,kBAA6B;;;ACKtC,IAAM,cAAc,oBAAI,IAAkC;AAEnD,SAAS,6BAA6B,YAAoB,YAAkC;AACjG,cAAY,IAAI,YAAY,UAAU;AACxC;AAEO,SAAS,+BAA+B,YAAoB;AACjE,cAAY,OAAO,UAAU;AAC/B;AAEO,SAAS,eAAe,YAAoB;AACjD,cAAY,IAAI,UAAU,GAAG,KAAK;AACpC;AAEO,SAAS,gBAAgB,YAAoB;AAClD,cAAY,IAAI,UAAU,GAAG,MAAM;AACrC;;;ACrBA,SAAS,WAAW,gBAAgB;AAqEhC,mBASM,KATN;AA9CJ,SAAS,YAAY,aAAa,KAAK;AACrC,QAAM,CAAC,UAAU,WAAW,IAAI;AAAA,IAC9B,MAAM,OAAO,WAAW,eAAe,OAAO,WAAW,eAAe,UAAU,KAAK,EAAE;AAAA,EAC3F;AAEA,YAAU,MAAM;AACd,UAAM,QAAQ,OAAO,WAAW,eAAe,UAAU,KAAK;AAC9D,UAAM,WAAW,MAAM,YAAY,MAAM,OAAO;AAChD,aAAS;AACT,UAAM,iBAAiB,UAAU,QAAQ;AACzC,WAAO,MAAM,MAAM,oBAAoB,UAAU,QAAQ;AAAA,EAC3D,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AACT;AAEO,SAAS,YAAY,EAAE,SAAS,GAA6C;AAClF,QAAM,WAAW,YAAY;AAC7B,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,IAAI;AACvD,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AACtD,QAAM,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