@automattic/agenttic-ui 0.1.75 → 0.1.76

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/DiffCard.css CHANGED
@@ -1 +1 @@
1
- .SourcesCard-module_card{background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:var(--spacing-2);padding:var(--spacing-3)}.SourcesCard-module_heading{color:var(--color-muted-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-semibold);line-height:var(--text-sm--line-height);margin:0;text-transform:uppercase;letter-spacing:.04em}.SourcesCard-module_list{display:flex;flex-direction:column;gap:var(--spacing-2);list-style:none;margin:0;padding:0}.SourcesCard-module_item{display:flex;flex-direction:column;gap:var(--spacing-1)}.SourcesCard-module_title{color:var(--color-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);text-decoration:none;word-break:break-word}a.SourcesCard-module_title:hover,a.SourcesCard-module_title:focus-visible{color:var(--color-primary);text-decoration:underline}a.SourcesCard-module_title:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}.SourcesCard-module_label{color:var(--color-muted-foreground);font-size:var(--text-xs);line-height:var(--text-xs--line-height)}.QuestionCard-module_card{background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:var(--spacing-3);padding:var(--spacing-4)}.QuestionCard-module_question{color:var(--color-foreground);font-size:var(--text-base);font-weight:var(--font-weight-semibold);line-height:var(--text-base--line-height);margin:0}.QuestionCard-module_choices{display:grid;gap:var(--spacing-2)}.QuestionCard-module_choicesGrid{grid-template-columns:repeat(2,minmax(0,1fr))}@media (max-width: 520px){.QuestionCard-module_choicesGrid{grid-template-columns:1fr}}.QuestionCard-module_choice{align-items:stretch;background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-md);color:var(--color-foreground);cursor:pointer;display:grid;gap:var(--spacing-2);padding:var(--spacing-3);text-align:left;transition:var(--transition-colors);width:100%}.QuestionCard-module_choice:hover:not(:disabled){border-color:var(--color-ring);box-shadow:var(--shadow-outline)}.QuestionCard-module_choice:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}.QuestionCard-module_choice:disabled{cursor:default;opacity:.66}.QuestionCard-module_answered{border-color:var(--color-primary)}.QuestionCard-module_label{font-size:var(--text-sm);font-weight:var(--font-weight-semibold);line-height:var(--text-sm--line-height)}.QuestionCard-module_description,.QuestionCard-module_layoutHint{color:var(--color-muted-foreground);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}.DiffCard-module_card{background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:var(--spacing-3);padding:var(--spacing-4)}.DiffCard-module_isResolved{opacity:.85}.DiffCard-module_title{color:var(--color-foreground);font-size:var(--text-base);font-weight:var(--font-weight-semibold);line-height:var(--text-base--line-height);margin:0}.DiffCard-module_summary{color:var(--color-muted-foreground);font-size:var(--text-sm);line-height:var(--text-sm--line-height);margin:0}.DiffCard-module_body{display:flex;flex-direction:column;gap:var(--spacing-2)}.DiffCard-module_change{display:flex;flex-direction:column;gap:var(--spacing-1)}.DiffCard-module_changeLabel{color:var(--color-muted-foreground);font-size:var(--text-xs);font-weight:var(--font-weight-medium);line-height:var(--text-xs--line-height)}.DiffCard-module_diff{background:color-mix(in srgb,var(--color-foreground) 4%,transparent);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-md);color:var(--color-foreground);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:var(--text-sm);line-height:var(--text-sm--line-height);margin:0;overflow-x:auto;padding:var(--spacing-3);white-space:pre-wrap;word-break:break-word}.DiffCard-module_removed{background:var(--color-error-background);border-color:color-mix(in srgb,var(--color-error) 30%,transparent)}.DiffCard-module_added{background:var(--color-success-background);border-color:color-mix(in srgb,var(--color-success) 30%,transparent)}.DiffCard-module_resolution{color:var(--color-muted-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);margin:0}.DiffCard-module_actions{display:flex;gap:var(--spacing-2)}.DiffCard-module_action{border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);font-weight:var(--font-weight-semibold);line-height:var(--text-sm--line-height);padding:var(--spacing-2) var(--spacing-4);transition:var(--transition-colors)}.DiffCard-module_action:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}.DiffCard-module_action:disabled{cursor:default;opacity:.66}.DiffCard-module_accept{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-primary-foreground)}.DiffCard-module_accept:hover:not(:disabled){box-shadow:var(--shadow-outline-strong)}.DiffCard-module_reject{background:var(--color-background);color:var(--color-foreground)}.DiffCard-module_reject:hover:not(:disabled){border-color:var(--color-ring);box-shadow:var(--shadow-outline)}
1
+ .button-module_button{align-items:center;border-radius:var(--radius-sm);border:1px solid transparent;color:var(--color-foreground);cursor:pointer;display:inline-flex;flex-shrink:0;font-weight:var(--font-weight-medium);font-size:var(--text-sm);gap:calc(var(--spacing) * .5);justify-content:center;outline:none;transition:var(--transition-colors);letter-spacing:var(--text-base--tracking);white-space:nowrap;height:var(--spacing-8);padding:var(--spacing-2) var(--spacing-3)}.button-module_button:disabled{pointer-events:none;background-color:var(--color-muted);color:var(--color-muted-foreground)}.button-module_button:focus-visible{outline:2px solid var(--color-ring);outline-offset:1.5px}.button-module_pressed{color:var(--color-foreground)}.button-module_pressed svg{color:var(--color-foreground)}.button-module_primary{background-color:var(--color-primary);color:var(--color-primary-foreground)}.button-module_primary:hover:not(:disabled){background-color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_ghost{background-color:transparent;color:var(--color-muted-foreground)}.button-module_ghost svg{color:var(--color-muted-foreground)}.button-module_ghost:hover:not(:disabled){background:transparent;color:var(--color-foreground)}.button-module_ghost:hover:not(:disabled) svg{color:var(--color-foreground)}.button-module_ghost:disabled{background:transparent;opacity:.66}.button-module_ghost:focus-visible{outline-offset:0}.button-module_ghost.button-module_pressed{color:var(--color-foreground)}.button-module_ghost.button-module_pressed svg{color:var(--color-foreground)}.button-module_outline{box-shadow:var(--shadow-outline);background-color:var(--color-background)}.button-module_outline:hover:not(:disabled){box-shadow:var(--shadow-outline-strong)}.button-module_outline:focus-visible{outline-offset:0}.button-module_outline:disabled{background-color:var(--color-background)}.button-module_outline.button-module_pressed{color:var(--color-foreground)}.button-module_outline.button-module_pressed svg{color:var(--color-foreground)}.button-module_transparent{background-color:color-mix(in srgb,var(--color-background) 95%,transparent);color:var(--color-foreground);box-shadow:var(--shadow-lg)}.button-module_transparent:hover:not(:disabled){background-color:var(--color-background);box-shadow:var(--shadow-lg)}.button-module_link{background-color:transparent;color:var(--color-primary);font-weight:var(--font-weight-semibold);padding-left:var(--spacing-2);padding-right:var(--spacing-2);width:auto}.button-module_link:hover:not(:disabled){color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_link.button-module_pressed{color:var(--color-primary)}.button-module_link.button-module_pressed svg{color:var(--color-primary)}.button-module_icon{border-radius:var(--radius-xs);height:var(--spacing-8);padding:0;width:var(--spacing-8)}.button-module_sm{border-radius:var(--radius-xs);gap:0;height:var(--spacing-6);padding:0;width:var(--spacing-6)}.button-module_sm svg{height:var(--spacing-6);width:var(--spacing-6)}.button-module_lg{height:var(--spacing-10);border-radius:var(--radius-md);font-size:var(--text-base);padding-left:var(--spacing-3\.5);padding-right:var(--spacing-3\.5)}.button-module_withTextAndIcon{padding-left:var(--spacing-1);width:inherit}.button-module_sm.button-module_withTextAndIcon{padding-left:0;padding-right:var(--spacing-1)}.button-module_button svg{flex-shrink:0;pointer-events:none}.Textarea-module_textarea{display:flex;width:100%;border-radius:var(--radius-md);border:0;font-size:var(--text-sm);line-height:var(--text-sm--line-height);background-color:transparent;padding:var(--spacing-2);scrollbar-width:none;resize:none}.Textarea-module_textarea::-moz-placeholder{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium)}.Textarea-module_textarea::placeholder{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium)}.Textarea-module_textarea:focus,.Textarea-module_textarea:focus-visible{outline:none;border:0;box-shadow:none}.Textarea-module_textarea:disabled{cursor:not-allowed;opacity:.5}.ChatInput-module_container{display:flex;align-items:end;gap:var(--spacing)}.ChatInput-module_container textarea{color:var(--color-foreground)}.ChatInput-module_textareaContainer{position:relative;flex:1;width:100%}.ChatInput-module_actions{display:flex;flex-direction:row;padding-left:var(--spacing);padding-right:var(--spacing);height:var(--spacing-10);gap:var(--spacing);align-items:center}.ChatInput-module_containerStacked{flex-direction:column;padding:var(--spacing-2);gap:var(--spacing)}.ChatInput-module_containerStacked .ChatInput-module_actions{width:100%;justify-content:space-between;padding-left:0;padding-right:0}.ChatInput-module_containerStacked .ChatInput-module_actions .ChatInput-module_button{min-width:var(--spacing-8);min-height:var(--spacing-8)}.ChatInput-module_button{border-radius:var(--radius-full)}.AnimatedPlaceholder-module_container{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium);padding-left:var(--spacing-2);padding-right:var(--spacing-2);padding-top:var(--spacing-2);pointer-events:none;position:absolute;z-index:1}.SuggestionDropdown-module_container{position:relative}.SuggestionDropdown-module_labelRow{display:flex;align-items:center}.SuggestionDropdown-module_chevron{margin-left:var(--spacing-0\.5);transition:transform .15s ease;flex-shrink:0}.SuggestionDropdown-module_chevronOpen{transform:rotate(180deg)}.SuggestionDropdown-module_dropdown{display:flex;flex-direction:column;background-color:var(--color-background);border-radius:var(--radius-sm);padding:var(--spacing-2);z-index:1000;box-shadow:var(--shadow-lg)}.agenttic.dark .SuggestionDropdown-module_dropdown{border:1px solid var(--color-muted)}.SuggestionDropdown-module_option{display:flex;align-items:center;width:100%;padding:var(--spacing-2);background:none;border:none;border-radius:var(--radius-sm);color:var(--color-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);font-family:inherit;cursor:pointer;text-align:start;white-space:nowrap}.SuggestionDropdown-module_option:hover{background-color:color-mix(in srgb,var(--color-background) 50%,var(--color-muted))}.SuggestionDropdown-module_option:focus{outline:none}.SuggestionDropdown-module_option:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px}.Suggestions-module_container{position:absolute;top:0;left:0;right:0;display:flex;flex-wrap:nowrap;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-1\.5);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.Suggestions-module_container::-webkit-scrollbar{display:none}.Suggestions-module_vertical{position:static;flex-direction:column;overflow:visible;gap:0;padding:0}.Suggestions-module_vertical .Suggestions-module_button{width:100%;height:unset;justify-content:start;font-size:var(--text-xs);line-height:20px;padding:14px 16px;border:1px solid var(--color-muted);border-radius:0;box-shadow:none}.Suggestions-module_vertical .Suggestions-module_button .Suggestions-module_suggestion-content--with-description{display:flex;flex-direction:column}.Suggestions-module_vertical .Suggestions-module_button .Suggestions-module_suggestion-content--with-description .Suggestions-module_label{font-weight:var(--font-weight-semibold)}.Suggestions-module_vertical .Suggestions-module_button .Suggestions-module_suggestion-content--with-description .Suggestions-module_description{color:var(--color-muted-foreground)}.Suggestions-module_vertical .Suggestions-module_button:hover{box-shadow:none;background-color:color-mix(in srgb,var(--color-background) 50%,var(--color-muted))}.Suggestions-module_vertical .Suggestions-module_button:focus-visible{outline-offset:-3px}.Suggestions-module_vertical>div+div .Suggestions-module_button{margin-top:-1px}.Suggestions-module_vertical>div:only-of-type .Suggestions-module_button{border-radius:8px}.Suggestions-module_vertical>div:first-of-type:not(:only-of-type) .Suggestions-module_button{border-radius:8px 8px 0 0}.Suggestions-module_vertical>div:last-of-type:not(:only-of-type) .Suggestions-module_button{border-radius:0 0 8px 8px}.Suggestions-module_floating{flex-direction:column;gap:var(--spacing-1);overflow:visible;padding:1px;padding-bottom:var(--spacing-1);z-index:-1}.SourcesCard-module_card{background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:var(--spacing-2);padding:var(--spacing-3)}.SourcesCard-module_heading{color:var(--color-muted-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-semibold);line-height:var(--text-sm--line-height);margin:0;text-transform:uppercase;letter-spacing:.04em}.SourcesCard-module_list{display:flex;flex-direction:column;gap:var(--spacing-2);list-style:none;margin:0;padding:0}.SourcesCard-module_item{display:flex;flex-direction:column;gap:var(--spacing-1)}.SourcesCard-module_title{color:var(--color-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);text-decoration:none;word-break:break-word}a.SourcesCard-module_title:hover,a.SourcesCard-module_title:focus-visible{color:var(--color-primary);text-decoration:underline}a.SourcesCard-module_title:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}.SourcesCard-module_label{color:var(--color-muted-foreground);font-size:var(--text-xs);line-height:var(--text-xs--line-height)}.Notice-module_container{position:relative;display:flex;align-items:center;margin:calc((var(--spacing-2)) * -1) calc((var(--spacing-2)) * -1) 0;padding:var(--spacing-2) var(--spacing-4);gap:var(--spacing-3);background-color:var(--color-muted);border-radius:calc(var(--radius-lg)) calc(var(--radius-lg)) 0 0;color:var(--color-muted-foreground)}.Notice-module_container *{font-size:var(--text-xs);font-weight:var(--font-weight-medium);line-height:var(--text-xs--line-height)}.Notice-module_isSuccess{background-color:var(--color-success-background);color:var(--color-success)}.Notice-module_isSuccess .Notice-module_icon svg path{fill:var(--color-success)}.Notice-module_isWarning{background-color:var(--color-warning-background);color:var(--color-warning)}.Notice-module_isWarning .Notice-module_icon svg path{fill:var(--color-warning)}.Notice-module_isError{background-color:var(--color-error-background);color:var(--color-error)}.Notice-module_isError .Notice-module_icon svg path{fill:var(--color-error)}.Notice-module_content{align-items:center;display:flex;flex:1;gap:var(--spacing);min-width:0}.Notice-module_content *{margin:0}.Notice-module_actions{align-items:center;display:flex;flex-shrink:0;gap:var(--spacing)}.Notice-module_action{height:auto;font-size:var(--text-xs);font-weight:var(--font-weight-bold);color:var(--color-foreground);border:none;padding:0}.Notice-module_action:hover:not(:disabled){color:var(--color-foreground);opacity:.8}.Notice-module_action:is(:focus,:focus-visible){outline-offset:0}.Notice-module_icon{align-items:center;display:flex;flex-shrink:0;justify-content:center}.Notice-module_icon svg{display:block;height:var(--spacing-5);width:var(--spacing-5)}.Notice-module_dismissible svg{display:block;width:var(--spacing-5);height:var(--spacing-5);color:var(--color-muted-foreground)}.ChatFooter-module_container{background-color:var(--color-popover-muted);border-radius:calc(var(--radius-lg) + 1px);border:1px solid var(--color-muted);color:var(--color-foreground);display:flex;flex-direction:column;gap:var(--spacing-2);padding:var(--spacing-2);position:relative;z-index:10}.ChatFooter-module_disclosure{margin:0;padding-top:var(--spacing-2);font-size:var(--text-xs);line-height:var(--text-xs--line-height);color:var(--color-muted-foreground);text-align:center}.ChatFooter-module_disclosure a{color:inherit;text-decoration:underline}.QuestionCard-module_card{background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:var(--spacing-3);padding:var(--spacing-4)}.QuestionCard-module_question{color:var(--color-foreground);font-size:var(--text-base);font-weight:var(--font-weight-semibold);line-height:var(--text-base--line-height);margin:0}.QuestionCard-module_choices{display:grid;gap:var(--spacing-2)}.QuestionCard-module_choicesGrid{grid-template-columns:repeat(2,minmax(0,1fr))}@media (max-width: 520px){.QuestionCard-module_choicesGrid{grid-template-columns:1fr}}.QuestionCard-module_choice{align-items:stretch;background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-md);color:var(--color-foreground);cursor:pointer;display:grid;gap:var(--spacing-2);padding:var(--spacing-3);text-align:left;transition:var(--transition-colors);width:100%}.QuestionCard-module_choice:hover:not(:disabled){border-color:var(--color-ring);box-shadow:var(--shadow-outline)}.QuestionCard-module_choice:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}.QuestionCard-module_choice:disabled{cursor:default;opacity:.66}.QuestionCard-module_answered{border-color:var(--color-primary)}.QuestionCard-module_label{font-size:var(--text-sm);font-weight:var(--font-weight-semibold);line-height:var(--text-sm--line-height)}.QuestionCard-module_description,.QuestionCard-module_layoutHint{color:var(--color-muted-foreground);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}.DiffCard-module_card{background:var(--color-background);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:var(--spacing-3);padding:var(--spacing-4)}.DiffCard-module_isResolved{opacity:.85}.DiffCard-module_title{color:var(--color-foreground);font-size:var(--text-base);font-weight:var(--font-weight-semibold);line-height:var(--text-base--line-height);margin:0}.DiffCard-module_summary{color:var(--color-muted-foreground);font-size:var(--text-sm);line-height:var(--text-sm--line-height);margin:0}.DiffCard-module_body{display:flex;flex-direction:column;gap:var(--spacing-2)}.DiffCard-module_change{display:flex;flex-direction:column;gap:var(--spacing-1)}.DiffCard-module_changeLabel{color:var(--color-muted-foreground);font-size:var(--text-xs);font-weight:var(--font-weight-medium);line-height:var(--text-xs--line-height)}.DiffCard-module_diff{background:color-mix(in srgb,var(--color-foreground) 4%,transparent);border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-md);color:var(--color-foreground);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:var(--text-sm);line-height:var(--text-sm--line-height);margin:0;overflow-x:auto;padding:var(--spacing-3);white-space:pre-wrap;word-break:break-word}.DiffCard-module_removed{background:var(--color-error-background);border-color:color-mix(in srgb,var(--color-error) 30%,transparent)}.DiffCard-module_added{background:var(--color-success-background);border-color:color-mix(in srgb,var(--color-success) 30%,transparent)}.DiffCard-module_resolution{color:var(--color-muted-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);margin:0}.DiffCard-module_actions{display:flex;gap:var(--spacing-2)}.DiffCard-module_action{border:1px solid color-mix(in srgb,var(--color-foreground) 10%,transparent);border-radius:var(--radius-md);cursor:pointer;font-size:var(--text-sm);font-weight:var(--font-weight-semibold);line-height:var(--text-sm--line-height);padding:var(--spacing-2) var(--spacing-4);transition:var(--transition-colors)}.DiffCard-module_action:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}.DiffCard-module_action:disabled{cursor:default;opacity:.66}.DiffCard-module_accept{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-primary-foreground)}.DiffCard-module_accept:hover:not(:disabled){box-shadow:var(--shadow-outline-strong)}.DiffCard-module_reject{background:var(--color-background);color:var(--color-foreground)}.DiffCard-module_reject:hover:not(:disabled){border-color:var(--color-ring);box-shadow:var(--shadow-outline)}
@@ -25,9 +25,10 @@ export declare function EmbeddedAgentUIInput({ className, disabled, onKeyDown, }
25
25
  disabled?: boolean;
26
26
  onKeyDown?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
27
27
  }): import("react/jsx-runtime").JSX.Element;
28
- export declare function EmbeddedAgentUIFooter({ children, className, }?: {
28
+ export declare function EmbeddedAgentUIFooter({ children, className, complianceDisclosure, }?: {
29
29
  children?: React.ReactNode;
30
30
  className?: string;
31
+ complianceDisclosure?: React.ReactNode | false;
31
32
  }): import("react/jsx-runtime").JSX.Element;
32
33
  export declare function EmbeddedAgentUIConversationView({ children, className, }?: {
33
34
  children?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddedAgentUI.d.ts","sourceRoot":"","sources":["../../src/components/EmbeddedAgentUI.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU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,SAAS,CAAC;CAC3B,2CA8CA;AAED,QAAA,MAAM,wBAAwB;;;;;;;;CAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAE,YAAY,CAAE,GACrD,OAAO,wBAGP,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAAkB,CAAC;AAEvC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -19,7 +19,8 @@ interface ChatFooterProps {
19
19
  focusOnMount?: boolean;
20
20
  customActions?: ActionButton[];
21
21
  actionOrder?: 'before-submit' | 'after-submit';
22
+ complianceDisclosure?: React.ReactNode | false;
22
23
  }
23
- export declare function ChatFooter({ inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onStop, fromCompact, onExpand, disabled, notice, suggestions, clearSuggestions, focusOnMount, customActions, actionOrder, }: ChatFooterProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function ChatFooter({ inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onStop, fromCompact, onExpand, disabled, notice, suggestions, clearSuggestions, focusOnMount, customActions, actionOrder, complianceDisclosure, }: ChatFooterProps): import("react/jsx-runtime").JSX.Element;
24
25
  export {};
25
26
  //# sourceMappingURL=ChatFooter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatFooter.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatFooter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,aAAa,CAAC;AAK3D,UAAU,eAAe;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,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AE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,mBAAmB,CAAE,KAAM,IAAI,CAAC;IACrE,WAAW,EAAE,KAAK,CAAC,SAAS,CAAE,mBAAmB,CAAE,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAGpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAGtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,YAAY,CAAC;IAGtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAG9B,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;IAK/C,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;CAC/C;AAED,wBAAgB,UAAU,CAAE,EAC3B,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,MAAM,EACN,WAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,oBAAsD,GACtD,EAAE,eAAe,2CA4DjB"}
@@ -2,6 +2,11 @@ import React from 'react';
2
2
  export interface AgentUIFooterProps {
3
3
  children?: React.ReactNode;
4
4
  className?: string;
5
+ complianceDisclosure?: React.ReactNode | false;
5
6
  }
6
- export declare function AgentUIFooter({ children, className, }?: AgentUIFooterProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function DefaultComplianceDisclosure(): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ComplianceDisclosure({ children, }: {
9
+ children?: React.ReactNode;
10
+ }): import("react/jsx-runtime").JSX.Element | null;
11
+ export declare function AgentUIFooter({ children, className, complianceDisclosure, }?: AgentUIFooterProps): import("react/jsx-runtime").JSX.Element;
7
12
  //# sourceMappingURL=AgentUIFooter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentUIFooter.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAE,EAC9B,QAAQ,EACR,SAAS,GACT,GAAE,kBAAuB,2CA6BzB"}
1
+ {"version":3,"file":"AgentUIFooter.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;CAC/C;AAED,wBAAgB,2BAA2B,4CAwB1C;AAMD,wBAAgB,oBAAoB,CAAE,EACrC,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,kDAYA;AAED,wBAAgB,aAAa,CAAE,EAC9B,QAAQ,EACR,SAAS,EACT,oBAAsD,GACtD,GAAE,kBAAuB,2CAuCzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AgentUIFooter.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentUIFooter.test.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIFooter.test.tsx"],"names":[],"mappings":""}
@@ -1,91 +1,91 @@
1
- import { jsx as t, Fragment as I, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as t, Fragment as b, jsxs as f } from "react/jsx-runtime";
2
2
  import { createContext as P, useState as E, useRef as R, useCallback as F, useContext as T } from "react";
3
3
  import { __ as g } from "@wordpress/i18n";
4
- import { S as L } from "./DiffCard-CVeqjQhl.js";
5
- import { D as ee, Q as te } from "./DiffCard-CVeqjQhl.js";
6
- function W(n) {
4
+ import { j as L, D as W, d as D } from "./DiffCard-eat_q_SY.js";
5
+ import { l as ne, Q as ie } from "./DiffCard-eat_q_SY.js";
6
+ function O(n) {
7
7
  const e = n.trim();
8
8
  if (/^(https?:|mailto:)/i.test(e))
9
9
  return e;
10
10
  }
11
- function y(n) {
11
+ function C(n) {
12
12
  const e = [], i = /(\[[^\]]+\]\([^\)]+\)|`[^`]+`|\*\*[^*]+\*\*|__[^_]+__|\*[^*]+\*|_[^_]+_)/g;
13
- let s = 0, r;
13
+ let l = 0, r;
14
14
  for (; r = i.exec(n); ) {
15
- r.index > s && e.push(n.slice(s, r.index));
16
- const a = r[0], c = `${r.index}-${a}`, d = a.match(/^\[([^\]]+)\]\(([^\)]+)\)$/);
15
+ r.index > l && e.push(n.slice(l, r.index));
16
+ const a = r[0], s = `${r.index}-${a}`, d = a.match(/^\[([^\]]+)\]\(([^\)]+)\)$/);
17
17
  if (d) {
18
- const l = W(d[2]);
18
+ const c = O(d[2]);
19
19
  e.push(
20
- l ? /* @__PURE__ */ t(
20
+ c ? /* @__PURE__ */ t(
21
21
  "a",
22
22
  {
23
- href: l,
23
+ href: c,
24
24
  rel: "noreferrer",
25
25
  target: "_blank",
26
26
  children: d[1]
27
27
  },
28
- c
28
+ s
29
29
  ) : a
30
30
  );
31
- } else a.startsWith("`") ? e.push(/* @__PURE__ */ t("code", { children: a.slice(1, -1) }, c)) : a.startsWith("**") || a.startsWith("__") ? e.push(/* @__PURE__ */ t("strong", { children: a.slice(2, -2) }, c)) : e.push(/* @__PURE__ */ t("em", { children: a.slice(1, -1) }, c));
32
- s = i.lastIndex;
31
+ } else a.startsWith("`") ? e.push(/* @__PURE__ */ t("code", { children: a.slice(1, -1) }, s)) : a.startsWith("**") || a.startsWith("__") ? e.push(/* @__PURE__ */ t("strong", { children: a.slice(2, -2) }, s)) : e.push(/* @__PURE__ */ t("em", { children: a.slice(1, -1) }, s));
32
+ l = i.lastIndex;
33
33
  }
34
- return s < n.length && e.push(n.slice(s)), e;
34
+ return l < n.length && e.push(n.slice(l)), e;
35
35
  }
36
- function v(n, e, i, s) {
36
+ function I(n, e, i, l) {
37
37
  if (e.length === 0)
38
38
  return;
39
- const r = e.map((a, c) => /* @__PURE__ */ t("li", { children: y(a) }, c));
39
+ const r = e.map((a, s) => /* @__PURE__ */ t("li", { children: C(a) }, s));
40
40
  n.push(
41
- i ? /* @__PURE__ */ t("ol", { children: r }, s) : /* @__PURE__ */ t("ul", { children: r }, s)
41
+ i ? /* @__PURE__ */ t("ol", { children: r }, l) : /* @__PURE__ */ t("ul", { children: r }, l)
42
42
  ), e.length = 0;
43
43
  }
44
- function O({
44
+ function Q({
45
45
  children: n
46
46
  }) {
47
47
  const e = [], i = [];
48
- let s = !1, r = !1, a = [];
49
- return n.split(/\r?\n/).forEach((c, d) => {
50
- if (c.startsWith("```")) {
48
+ let l = !1, r = !1, a = [];
49
+ return n.split(/\r?\n/).forEach((s, d) => {
50
+ if (s.startsWith("```")) {
51
51
  r ? (e.push(
52
52
  /* @__PURE__ */ t("pre", { children: /* @__PURE__ */ t("code", { children: a.join(`
53
53
  `) }) }, `code-${d}`)
54
- ), a = [], r = !1) : (v(e, i, s, `list-${d}`), r = !0);
54
+ ), a = [], r = !1) : (I(e, i, l, `list-${d}`), r = !0);
55
55
  return;
56
56
  }
57
57
  if (r) {
58
- a.push(c);
58
+ a.push(s);
59
59
  return;
60
60
  }
61
- const l = c.match(/^\s*[-*]\s+(.+)$/), o = c.match(/^\s*\d+\.\s+(.+)$/);
62
- if (l || o) {
61
+ const c = s.match(/^\s*[-*]\s+(.+)$/), o = s.match(/^\s*\d+\.\s+(.+)$/);
62
+ if (c || o) {
63
63
  const h = !!o;
64
- i.length && s !== h && v(e, i, s, `list-${d}`), s = h, i.push(
65
- ((o == null ? void 0 : o[1]) ?? (l == null ? void 0 : l[1]) ?? "").trim()
64
+ i.length && l !== h && I(e, i, l, `list-${d}`), l = h, i.push(
65
+ ((o == null ? void 0 : o[1]) ?? (c == null ? void 0 : c[1]) ?? "").trim()
66
66
  );
67
67
  return;
68
68
  }
69
- if (v(e, i, s, `list-${d}`), !c.trim())
69
+ if (I(e, i, l, `list-${d}`), !s.trim())
70
70
  return;
71
- const u = c.match(/^(#{1,3})\s+(.+)$/);
71
+ const u = s.match(/^(#{1,3})\s+(.+)$/);
72
72
  if (u) {
73
73
  const p = `h${u[1].length}`;
74
74
  e.push(
75
- /* @__PURE__ */ t(p, { children: y(u[2]) }, `heading-${d}`)
75
+ /* @__PURE__ */ t(p, { children: C(u[2]) }, `heading-${d}`)
76
76
  );
77
77
  return;
78
78
  }
79
79
  e.push(
80
- /* @__PURE__ */ t("p", { children: y(c) }, `paragraph-${d}`)
80
+ /* @__PURE__ */ t("p", { children: C(s) }, `paragraph-${d}`)
81
81
  );
82
- }), v(e, i, s, "list-final"), r && a.length && e.push(
82
+ }), I(e, i, l, "list-final"), r && a.length && e.push(
83
83
  /* @__PURE__ */ t("pre", { children: /* @__PURE__ */ t("code", { children: a.join(`
84
84
  `) }) }, "code-final")
85
- ), /* @__PURE__ */ t(I, { children: e });
85
+ ), /* @__PURE__ */ t(b, { children: e });
86
86
  }
87
87
  const N = P(null);
88
- function b() {
88
+ function _() {
89
89
  const n = T(N);
90
90
  if (!n)
91
91
  throw new Error(
@@ -93,14 +93,14 @@ function b() {
93
93
  );
94
94
  return n;
95
95
  }
96
- function Q({ content: n }) {
96
+ function H({ content: n }) {
97
97
  return /* @__PURE__ */ t("div", { className: "agenttic-embedded__thinking", children: n ?? g("Thinking…", "a8c-agenttic") });
98
98
  }
99
- function X({
99
+ function K({
100
100
  heading: n,
101
101
  help: e,
102
102
  suggestions: i,
103
- onSuggestionClick: s
103
+ onSuggestionClick: l
104
104
  }) {
105
105
  return /* @__PURE__ */ f("div", { className: "agenttic-embedded__empty", children: [
106
106
  n && /* @__PURE__ */ t("h2", { children: n }),
@@ -109,7 +109,7 @@ function X({
109
109
  "button",
110
110
  {
111
111
  type: "button",
112
- onClick: () => s == null ? void 0 : s(r),
112
+ onClick: () => l == null ? void 0 : l(r),
113
113
  children: r.label
114
114
  },
115
115
  r.id
@@ -121,9 +121,9 @@ function U(n) {
121
121
  (e) => e.type === "text" || e.type === "component"
122
122
  );
123
123
  }
124
- function H({ message: n }) {
125
- var s;
126
- const { messageRenderer: e } = b(), i = e ?? O;
124
+ function q({ message: n }) {
125
+ var l;
126
+ const { messageRenderer: e } = _(), i = e ?? Q;
127
127
  return /* @__PURE__ */ f(
128
128
  "div",
129
129
  {
@@ -142,9 +142,9 @@ function H({ message: n }) {
142
142
  a
143
143
  );
144
144
  if (r.type === "component" && r.component) {
145
- const c = r.component;
145
+ const s = r.component;
146
146
  return /* @__PURE__ */ t(
147
- c,
147
+ s,
148
148
  {
149
149
  ...r.componentProps || {}
150
150
  },
@@ -153,23 +153,23 @@ function H({ message: n }) {
153
153
  }
154
154
  return null;
155
155
  }),
156
- n.role === "agent" && ((s = n.sources) != null && s.length) ? /* @__PURE__ */ t(L, { sources: n.sources }) : null
156
+ n.role === "agent" && ((l = n.sources) != null && l.length) ? /* @__PURE__ */ t(D, { sources: n.sources }) : null
157
157
  ]
158
158
  }
159
159
  );
160
160
  }
161
- function $({
161
+ function j({
162
162
  className: n
163
163
  } = {}) {
164
164
  const {
165
165
  messages: e,
166
166
  isProcessing: i,
167
- error: s,
167
+ error: l,
168
168
  emptyView: r,
169
169
  thinkingMessage: a,
170
- messagesPosition: c
171
- } = b(), d = e.filter(
172
- (l) => U(l).length > 0
170
+ messagesPosition: s
171
+ } = _(), d = e.filter(
172
+ (c) => U(c).length > 0
173
173
  );
174
174
  return d.length === 0 && !i ? r ? /* @__PURE__ */ t(
175
175
  "div",
@@ -188,37 +188,37 @@ function $({
188
188
  "data-slot": "messages",
189
189
  className: [
190
190
  "agenttic-embedded__messages",
191
- c === "bottom" ? "agenttic-embedded__messages--bottom" : "",
191
+ s === "bottom" ? "agenttic-embedded__messages--bottom" : "",
192
192
  n
193
193
  ].filter(Boolean).join(" "),
194
194
  children: [
195
- d.map((l) => /* @__PURE__ */ t(
196
- H,
195
+ d.map((c) => /* @__PURE__ */ t(
196
+ q,
197
197
  {
198
- message: l
198
+ message: c
199
199
  },
200
- l.reactKey || l.id
200
+ c.reactKey || c.id
201
201
  )),
202
- i && /* @__PURE__ */ t(Q, { content: a }),
203
- s && /* @__PURE__ */ t("div", { className: "agenttic-embedded__error", children: s })
202
+ i && /* @__PURE__ */ t(H, { content: a }),
203
+ l && /* @__PURE__ */ t("div", { className: "agenttic-embedded__error", children: l })
204
204
  ]
205
205
  }
206
206
  );
207
207
  }
208
- function j({
208
+ function $({
209
209
  className: n,
210
210
  showSuggestions: e,
211
211
  onSelect: i
212
212
  } = {}) {
213
213
  const {
214
- inputValue: s,
214
+ inputValue: l,
215
215
  setInputValue: r,
216
216
  suggestions: a,
217
- clearSuggestions: c,
217
+ clearSuggestions: s,
218
218
  onSuggestionClick: d,
219
- submit: l
220
- } = b();
221
- return s && !e || !(a != null && a.length) ? null : /* @__PURE__ */ t(
219
+ submit: c
220
+ } = _();
221
+ return l && !e || !(a != null && a.length) ? null : /* @__PURE__ */ t(
222
222
  "div",
223
223
  {
224
224
  className: ["agenttic-embedded__suggestions", n].filter(Boolean).join(" "),
@@ -229,8 +229,8 @@ function j({
229
229
  {
230
230
  type: "button",
231
231
  onClick: async () => {
232
- if (i == null || i(u), d == null || d(o, a), c == null || c(), o.autoSubmit) {
233
- await l(u);
232
+ if (i == null || i(u), d == null || d(o, a), s == null || s(), o.autoSubmit) {
233
+ await c(u);
234
234
  return;
235
235
  }
236
236
  r(u);
@@ -246,7 +246,7 @@ function j({
246
246
  function x({
247
247
  className: n
248
248
  } = {}) {
249
- const { notice: e } = b();
249
+ const { notice: e } = _();
250
250
  return e ? /* @__PURE__ */ f(
251
251
  "div",
252
252
  {
@@ -268,33 +268,33 @@ function V({
268
268
  onKeyDown: i
269
269
  } = {}) {
270
270
  const {
271
- acceptedFileTypes: s,
271
+ acceptedFileTypes: l,
272
272
  allowAttachments: r,
273
273
  fileInputRef: a,
274
- files: c,
274
+ files: s,
275
275
  inputValue: d,
276
- isProcessing: l,
276
+ isProcessing: c,
277
277
  maxInputLength: o = 600,
278
278
  onStop: u,
279
279
  placeholder: h,
280
280
  setFiles: p,
281
- setInputValue: _,
282
- submit: A
283
- } = b(), C = !e && (l || !!d.trim() && d.length <= o), k = Array.isArray(h) ? h[0] : h;
281
+ setInputValue: v,
282
+ submit: y
283
+ } = _(), A = !e && (c || !!d.trim() && d.length <= o), k = Array.isArray(h) ? h[0] : h;
284
284
  return /* @__PURE__ */ f(
285
285
  "div",
286
286
  {
287
287
  "data-slot": "chat-input",
288
288
  className: ["agenttic-embedded__input", n].filter(Boolean).join(" "),
289
289
  children: [
290
- r && /* @__PURE__ */ f(I, { children: [
290
+ r && /* @__PURE__ */ f(b, { children: [
291
291
  /* @__PURE__ */ t(
292
292
  "input",
293
293
  {
294
294
  ref: a,
295
295
  type: "file",
296
296
  multiple: !0,
297
- accept: s == null ? void 0 : s.join(","),
297
+ accept: l == null ? void 0 : l.join(","),
298
298
  style: { display: "none" },
299
299
  onChange: (m) => p(
300
300
  Array.from(m.currentTarget.files ?? [])
@@ -320,9 +320,9 @@ function V({
320
320
  "aria-label": g("Chat input", "a8c-agenttic"),
321
321
  placeholder: k,
322
322
  value: d,
323
- onChange: (m) => _(m.currentTarget.value),
323
+ onChange: (m) => v(m.currentTarget.value),
324
324
  onKeyDown: (m) => {
325
- i == null || i(m), !m.defaultPrevented && m.key === "Enter" && !m.shiftKey && C && !l && (m.preventDefault(), A());
325
+ i == null || i(m), !m.defaultPrevented && m.key === "Enter" && !m.shiftKey && A && !c && (m.preventDefault(), y());
326
326
  }
327
327
  }
328
328
  ),
@@ -330,39 +330,43 @@ function V({
330
330
  "button",
331
331
  {
332
332
  type: "button",
333
- "aria-label": l ? g("Stop processing", "a8c-agenttic") : g("Send message", "a8c-agenttic"),
334
- disabled: !C,
333
+ "aria-label": c ? g("Stop processing", "a8c-agenttic") : g("Send message", "a8c-agenttic"),
334
+ disabled: !A,
335
335
  onClick: () => {
336
- if (l) {
336
+ if (c) {
337
337
  u == null || u();
338
338
  return;
339
339
  }
340
- A();
340
+ y();
341
341
  },
342
- children: l ? "■" : "↑"
342
+ children: c ? "■" : "↑"
343
343
  }
344
344
  ),
345
- c.length > 0 && /* @__PURE__ */ t("span", { className: "agenttic-embedded__attachment-count", children: c.length })
345
+ s.length > 0 && /* @__PURE__ */ t("span", { className: "agenttic-embedded__attachment-count", children: s.length })
346
346
  ]
347
347
  }
348
348
  );
349
349
  }
350
350
  function w({
351
351
  children: n,
352
- className: e
352
+ className: e,
353
+ complianceDisclosure: i = /* @__PURE__ */ t(W, {})
353
354
  } = {}) {
354
- return /* @__PURE__ */ t(
355
- "div",
356
- {
357
- "data-slot": "chat-footer",
358
- className: ["agenttic-embedded__footer", e].filter(Boolean).join(" "),
359
- children: n ?? /* @__PURE__ */ f(I, { children: [
360
- /* @__PURE__ */ t(j, {}),
361
- /* @__PURE__ */ t(x, {}),
362
- /* @__PURE__ */ t(V, {})
363
- ] })
364
- }
365
- );
355
+ return /* @__PURE__ */ f(b, { children: [
356
+ /* @__PURE__ */ t(
357
+ "div",
358
+ {
359
+ "data-slot": "chat-footer",
360
+ className: ["agenttic-embedded__footer", e].filter(Boolean).join(" "),
361
+ children: n ?? /* @__PURE__ */ f(b, { children: [
362
+ /* @__PURE__ */ t($, {}),
363
+ /* @__PURE__ */ t(x, {}),
364
+ /* @__PURE__ */ t(V, {})
365
+ ] })
366
+ }
367
+ ),
368
+ /* @__PURE__ */ t(L, { children: i })
369
+ ] });
366
370
  }
367
371
  function B({
368
372
  children: n,
@@ -373,8 +377,8 @@ function B({
373
377
  {
374
378
  "data-slot": "conversation-view",
375
379
  className: ["agenttic-embedded__conversation", e].filter(Boolean).join(" "),
376
- children: n ?? /* @__PURE__ */ f(I, { children: [
377
- /* @__PURE__ */ t($, {}),
380
+ children: n ?? /* @__PURE__ */ f(b, { children: [
381
+ /* @__PURE__ */ t(j, {}),
378
382
  /* @__PURE__ */ t(w, {})
379
383
  ] })
380
384
  }
@@ -385,21 +389,21 @@ function M({
385
389
  className: e,
386
390
  ...i
387
391
  }) {
388
- const [s, r] = E(""), [a, c] = E([]), d = R(null), l = i.inputValue ?? s, o = i.onInputChange ?? r, u = F(
392
+ const [l, r] = E(""), [a, s] = E([]), d = R(null), c = i.inputValue ?? l, o = i.onInputChange ?? r, u = F(
389
393
  async (p) => {
390
- const _ = (p ?? l).trim();
391
- !_ || i.isProcessing || (o(""), c([]), await i.onSubmit(
392
- _,
394
+ const v = (p ?? c).trim();
395
+ !v || i.isProcessing || (o(""), s([]), await i.onSubmit(
396
+ v,
393
397
  i.allowAttachments ? a : void 0
394
398
  ));
395
399
  },
396
- [a, l, i, o]
400
+ [a, c, i, o]
397
401
  ), h = {
398
402
  ...i,
399
- inputValue: l,
403
+ inputValue: c,
400
404
  setInputValue: o,
401
405
  files: a,
402
- setFiles: c,
406
+ setFiles: s,
403
407
  fileInputRef: d,
404
408
  submit: u
405
409
  };
@@ -412,32 +416,32 @@ function M({
412
416
  }
413
417
  ) });
414
418
  }
415
- const q = {
419
+ const z = {
416
420
  Container: M,
417
421
  ConversationView: B,
418
- Messages: $,
422
+ Messages: j,
419
423
  Footer: w,
420
424
  Input: V,
421
- Suggestions: j,
425
+ Suggestions: $,
422
426
  Notice: x
423
- }, z = Object.assign(
427
+ }, G = Object.assign(
424
428
  (n) => /* @__PURE__ */ t(M, { ...n }),
425
- q
426
- ), Y = z;
429
+ z
430
+ ), S = G;
427
431
  export {
428
- Y as AgentUI,
429
- ee as DiffCard,
430
- z as EmbeddedAgentUI,
432
+ S as AgentUI,
433
+ ne as DiffCard,
434
+ G as EmbeddedAgentUI,
431
435
  M as EmbeddedAgentUIContainer,
432
436
  B as EmbeddedAgentUIConversationView,
433
437
  w as EmbeddedAgentUIFooter,
434
438
  V as EmbeddedAgentUIInput,
435
- $ as EmbeddedAgentUIMessages,
439
+ j as EmbeddedAgentUIMessages,
436
440
  x as EmbeddedAgentUINotice,
437
- j as EmbeddedAgentUISuggestions,
438
- X as EmptyView,
439
- O as LightweightMarkdownRenderer,
440
- te as QuestionCard,
441
- L as SourcesCard,
442
- Q as ThinkingMessage
441
+ $ as EmbeddedAgentUISuggestions,
442
+ K as EmptyView,
443
+ Q as LightweightMarkdownRenderer,
444
+ ie as QuestionCard,
445
+ D as SourcesCard,
446
+ H as ThinkingMessage
443
447
  };
package/dist/global.css CHANGED
@@ -1 +1 @@
1
- .agenttic{--base-font-size: 1rem;--color-white: #FFFFFF;--color-background: #FCFCFC;--color-foreground: #1F1F1F;--color-popover: #FCFCFC;--color-popover-muted: #FCFCFC;--color-primary: #2D5AF2;--color-primary-foreground: var(--color-white);--color-muted: #E9E9E9;--color-muted-foreground: #757575;--color-ring: var(--color-primary);--color-success-background: #F1F7F1;--color-success: var(--color-foreground);--color-warning-background: #F8F3E7;--color-warning: var(--color-foreground);--color-error-background: #FCF1F1;--color-error: #E7000B;--color-link: var(--color-primary);--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-weight-medium: 450;--font-weight-semibold: 500;--font-weight-bold: 600;--text-xs: calc(.8125 * var(--base-font-size));--text-xs--line-height: 1.538;--text-sm: calc(.875 * var(--base-font-size));--text-sm--line-height: 1.65;--text-base: calc(.9375 * var(--base-font-size));--text-base--line-height: 1.625;--text-base--tracking: -.01em;--spacing: calc(.25 * var(--base-font-size));--spacing-1: var(--spacing);--spacing-1\.5: calc(var(--spacing) * 1.5);--spacing-2: calc(var(--spacing) * 2);--spacing-3: calc(var(--spacing) * 3);--spacing-3\.5: calc(var(--spacing) * 3.5);--spacing-4: calc(var(--spacing) * 4);--spacing-5: calc(var(--spacing) * 5);--spacing-6: calc(var(--spacing) * 6);--spacing-7: calc(var(--spacing) * 7);--spacing-8: calc(var(--spacing) * 8);--spacing-9: calc(var(--spacing) * 9);--spacing-10: calc(var(--spacing) * 10);--spacing-12: calc(var(--spacing) * 12);--spacing-20: calc(var(--spacing) * 20);--radius: var(--base-font-size);--radius-xs: calc(var(--radius) - 10px);--radius-sm: calc(var(--radius) - 8px);--radius-md: calc(var(--radius) - 2px);--radius-lg: var(--radius);--radius-xl: calc(var(--radius) + 8px);--radius-full: 9999px;--shadow-sm: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent), 0 0 6px color-mix(in srgb, var(--color-foreground) 5%, transparent);--shadow-lg: 0 0 0 1px rgba(0, 0, 0, .075), 0 2px 24px rgba(0, 0, 0, .075);--shadow-outline: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent);--shadow-outline-strong: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 25%, transparent);--transition-colors: color .15s cubic-bezier(.4, 0, .2, 1), background-color .15s cubic-bezier(.4, 0, .2, 1), border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), fill .15s cubic-bezier(.4, 0, .2, 1), stroke .15s cubic-bezier(.4, 0, .2, 1)}.agenttic.dark{--color-background: #1F1F1F;--color-foreground: #FFFFFF;--color-popover: #1F1F1F;--color-popover-muted: #2F2F2F;--color-muted: #464646;--color-muted-foreground: #8F8F8F;--color-success-background: #1F2E1F;--color-warning-background: #2E281F;--color-error-background: #2E1F1F;--color-error: #FFDDDF;--color-link: var(--color-white)}.agenttic.dark [data-slot=collapsed-view] svg{color:var(--color-white)}@layer base{.agenttic *,.agenttic :before,.agenttic :after,.agenttic ::backdrop,.agenttic ::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}.agenttic *{outline-color:var(--color-ring)}.agenttic button,.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;background-color:transparent;opacity:1}.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{color:inherit;border-radius:0}.agenttic [data-slot=messages],.agenttic [data-slot=chat-input],.agenttic [data-slot=chat-footer],.agenttic [data-slot=chat-header] [data-slot=button]{cursor:default}}
1
+ .agenttic{--base-font-size: 1rem;--color-white: #FFFFFF;--color-background: #FCFCFC;--color-foreground: #1F1F1F;--color-popover: #FCFCFC;--color-popover-muted: #FCFCFC;--color-primary: #2D5AF2;--color-primary-foreground: var(--color-white);--color-muted: #E9E9E9;--color-muted-foreground: #757575;--color-ring: var(--color-primary);--color-success-background: #F1F7F1;--color-success: var(--color-foreground);--color-warning-background: #F8F3E7;--color-warning: var(--color-foreground);--color-error-background: #FCF1F1;--color-error: #E7000B;--color-link: var(--color-primary);--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-weight-medium: 450;--font-weight-semibold: 500;--font-weight-bold: 600;--text-xs: calc(.8125 * var(--base-font-size));--text-xs--line-height: 1.538;--text-sm: calc(.875 * var(--base-font-size));--text-sm--line-height: 1.65;--text-base: calc(.9375 * var(--base-font-size));--text-base--line-height: 1.625;--text-base--tracking: -.01em;--spacing: calc(.25 * var(--base-font-size));--spacing-1: var(--spacing);--spacing-1\.5: calc(var(--spacing) * 1.5);--spacing-2: calc(var(--spacing) * 2);--spacing-3: calc(var(--spacing) * 3);--spacing-3\.5: calc(var(--spacing) * 3.5);--spacing-4: calc(var(--spacing) * 4);--spacing-5: calc(var(--spacing) * 5);--spacing-6: calc(var(--spacing) * 6);--spacing-7: calc(var(--spacing) * 7);--spacing-8: calc(var(--spacing) * 8);--spacing-9: calc(var(--spacing) * 9);--spacing-10: calc(var(--spacing) * 10);--spacing-12: calc(var(--spacing) * 12);--spacing-20: calc(var(--spacing) * 20);--radius: var(--base-font-size);--radius-xs: calc(var(--radius) - 10px);--radius-sm: calc(var(--radius) - 8px);--radius-md: calc(var(--radius) - 2px);--radius-lg: var(--radius);--radius-xl: calc(var(--radius) + 8px);--radius-full: 9999px;--shadow-sm: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent), 0 0 6px color-mix(in srgb, var(--color-foreground) 5%, transparent);--shadow-lg: 0 0 0 1px rgba(0, 0, 0, .075), 0 2px 24px rgba(0, 0, 0, .075);--shadow-outline: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent);--shadow-outline-strong: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 25%, transparent);--transition-colors: color .15s cubic-bezier(.4, 0, .2, 1), background-color .15s cubic-bezier(.4, 0, .2, 1), border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), fill .15s cubic-bezier(.4, 0, .2, 1), stroke .15s cubic-bezier(.4, 0, .2, 1)}.agenttic.dark{--color-background: #1F1F1F;--color-foreground: #FFFFFF;--color-popover: #1F1F1F;--color-popover-muted: #2F2F2F;--color-muted: #464646;--color-muted-foreground: #8F8F8F;--color-success-background: #1F2E1F;--color-warning-background: #2E281F;--color-error-background: #2E1F1F;--color-error: #FFDDDF;--color-link: var(--color-white)}.agenttic.dark [data-slot=collapsed-view] svg{color:var(--color-white)}@layer base{.agenttic *,.agenttic :before,.agenttic :after,.agenttic ::backdrop,.agenttic ::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}.agenttic *{outline-color:var(--color-ring)}.agenttic button,.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;background-color:transparent;opacity:1}.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{color:inherit;border-radius:0}.agenttic [data-slot=messages],.agenttic [data-slot=chat-input],.agenttic [data-slot=chat-footer],.agenttic [data-slot=chat-compliance-disclosure],.agenttic [data-slot=chat-header] [data-slot=button]{cursor:default}}