@agentconnect/ui 0.1.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/README.md +63 -0
- package/dist/client.d.ts +15 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +22 -0
- package/dist/components/connect.d.ts +79 -0
- package/dist/components/connect.d.ts.map +1 -0
- package/dist/components/connect.js +1110 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/login-button.d.ts +16 -0
- package/dist/components/login-button.d.ts.map +1 -0
- package/dist/components/login-button.js +69 -0
- package/dist/components/model-picker.d.ts +16 -0
- package/dist/components/model-picker.d.ts.map +1 -0
- package/dist/components/model-picker.js +61 -0
- package/dist/components/provider-status.d.ts +10 -0
- package/dist/components/provider-status.d.ts.map +1 -0
- package/dist/components/provider-status.js +42 -0
- package/dist/constants.d.ts +33 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +156 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/register.d.ts +9 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +25 -0
- package/dist/styles/base.d.ts +5 -0
- package/dist/styles/base.d.ts.map +1 -0
- package/dist/styles/base.js +49 -0
- package/dist/styles/buttons.d.ts +6 -0
- package/dist/styles/buttons.d.ts.map +1 -0
- package/dist/styles/buttons.js +206 -0
- package/dist/styles/cards.d.ts +5 -0
- package/dist/styles/cards.d.ts.map +1 -0
- package/dist/styles/cards.js +212 -0
- package/dist/styles/index.d.ts +20 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/index.js +42 -0
- package/dist/styles/inputs.d.ts +5 -0
- package/dist/styles/inputs.d.ts.map +1 -0
- package/dist/styles/inputs.js +79 -0
- package/dist/styles/panels.d.ts +5 -0
- package/dist/styles/panels.d.ts.map +1 -0
- package/dist/styles/panels.js +184 -0
- package/dist/styles/responsive.d.ts +5 -0
- package/dist/styles/responsive.d.ts.map +1 -0
- package/dist/styles/responsive.js +62 -0
- package/dist/styles/utilities.d.ts +5 -0
- package/dist/styles/utilities.d.ts.map +1 -0
- package/dist/styles/utilities.js +86 -0
- package/dist/types.d.ts +137 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/utils/dom.d.ts +24 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/dom.js +42 -0
- package/dist/utils/html.d.ts +8 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +11 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/storage.d.ts +29 -0
- package/dist/utils/storage.d.ts.map +1 -0
- package/dist/utils/storage.js +110 -0
- package/package.json +40 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component exports.
|
|
3
|
+
*/
|
|
4
|
+
export { AgentConnectLoginButton } from './login-button';
|
|
5
|
+
export { AgentConnectModelPicker } from './model-picker';
|
|
6
|
+
export { AgentConnectProviderStatus } from './provider-status';
|
|
7
|
+
export { AgentConnectConnect } from './connect';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component exports.
|
|
3
|
+
*/
|
|
4
|
+
export { AgentConnectLoginButton } from './login-button';
|
|
5
|
+
export { AgentConnectModelPicker } from './model-picker';
|
|
6
|
+
export { AgentConnectProviderStatus } from './provider-status';
|
|
7
|
+
export { AgentConnectConnect } from './connect';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Login button component for a single provider.
|
|
3
|
+
*/
|
|
4
|
+
import type { ProviderId } from '../types';
|
|
5
|
+
export declare class AgentConnectLoginButton extends HTMLElement {
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
private button;
|
|
8
|
+
private status;
|
|
9
|
+
constructor();
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
attributeChangedCallback(): void;
|
|
12
|
+
get provider(): ProviderId;
|
|
13
|
+
refresh(): Promise<void>;
|
|
14
|
+
handleClick(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=login-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-button.d.ts","sourceRoot":"","sources":["../../src/components/login-button.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA4B,MAAM,UAAU,CAAC;AAIrE,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,MAAM,CAAkB;;IAShC,iBAAiB,IAAI,IAAI;IAYzB,wBAAwB,IAAI,IAAI;IAIhC,IAAI,QAAQ,IAAI,UAAU,CAEzB;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAYxB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBnC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Login button component for a single provider.
|
|
3
|
+
*/
|
|
4
|
+
import { getClient } from '../client';
|
|
5
|
+
import { ensureStyles } from '../styles';
|
|
6
|
+
export class AgentConnectLoginButton extends HTMLElement {
|
|
7
|
+
static get observedAttributes() {
|
|
8
|
+
return ['provider'];
|
|
9
|
+
}
|
|
10
|
+
button;
|
|
11
|
+
status;
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.attachShadow({ mode: 'open' });
|
|
15
|
+
this.button = document.createElement('button');
|
|
16
|
+
this.status = document.createElement('span');
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
ensureStyles(this.shadowRoot);
|
|
20
|
+
this.button.className = 'ac-button';
|
|
21
|
+
this.button.addEventListener('click', () => this.handleClick());
|
|
22
|
+
this.status.className = 'ac-chip';
|
|
23
|
+
const row = document.createElement('div');
|
|
24
|
+
row.className = 'ac-row';
|
|
25
|
+
row.append(this.button, this.status);
|
|
26
|
+
this.shadowRoot.appendChild(row);
|
|
27
|
+
this.refresh();
|
|
28
|
+
}
|
|
29
|
+
attributeChangedCallback() {
|
|
30
|
+
this.refresh();
|
|
31
|
+
}
|
|
32
|
+
get provider() {
|
|
33
|
+
return this.getAttribute('provider') || 'claude';
|
|
34
|
+
}
|
|
35
|
+
async refresh() {
|
|
36
|
+
this.button.textContent = `Login: ${this.provider}`;
|
|
37
|
+
this.status.textContent = 'Checking...';
|
|
38
|
+
try {
|
|
39
|
+
const client = await getClient();
|
|
40
|
+
const info = await client.providers.status(this.provider);
|
|
41
|
+
this.status.textContent = info.loggedIn ? 'Ready' : 'Login needed';
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
this.status.textContent = 'Unavailable';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async handleClick() {
|
|
48
|
+
this.button.disabled = true;
|
|
49
|
+
this.status.textContent = 'Working...';
|
|
50
|
+
try {
|
|
51
|
+
const client = await getClient();
|
|
52
|
+
const installed = await client.providers.ensureInstalled(this.provider);
|
|
53
|
+
if (!installed.installed) {
|
|
54
|
+
this.status.textContent = 'Install failed';
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const loggedIn = await client.providers.login(this.provider);
|
|
58
|
+
this.status.textContent = loggedIn.loggedIn ? 'Ready' : 'Login needed';
|
|
59
|
+
const detail = {
|
|
60
|
+
provider: this.provider,
|
|
61
|
+
loggedIn: loggedIn.loggedIn,
|
|
62
|
+
};
|
|
63
|
+
this.dispatchEvent(new CustomEvent('provider-login', { detail }));
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
this.button.disabled = false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model picker dropdown component.
|
|
3
|
+
*/
|
|
4
|
+
import type { ProviderId } from '../types';
|
|
5
|
+
export declare class AgentConnectModelPicker extends HTMLElement {
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
private select;
|
|
8
|
+
private label;
|
|
9
|
+
constructor();
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
attributeChangedCallback(): void;
|
|
12
|
+
get provider(): ProviderId | '';
|
|
13
|
+
refresh(): Promise<void>;
|
|
14
|
+
emitChange(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=model-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-picker.d.ts","sourceRoot":"","sources":["../../src/components/model-picker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA0B,MAAM,UAAU,CAAC;AAInE,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,KAAK,CAAkB;;IAS/B,iBAAiB,IAAI,IAAI;IAazB,wBAAwB,IAAI,IAAI;IAIhC,IAAI,QAAQ,IAAI,UAAU,GAAG,EAAE,CAE9B;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB9B,UAAU,IAAI,IAAI;CAKnB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model picker dropdown component.
|
|
3
|
+
*/
|
|
4
|
+
import { getClient } from '../client';
|
|
5
|
+
import { ensureStyles } from '../styles';
|
|
6
|
+
export class AgentConnectModelPicker extends HTMLElement {
|
|
7
|
+
static get observedAttributes() {
|
|
8
|
+
return ['provider'];
|
|
9
|
+
}
|
|
10
|
+
select;
|
|
11
|
+
label;
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.attachShadow({ mode: 'open' });
|
|
15
|
+
this.select = document.createElement('select');
|
|
16
|
+
this.label = document.createElement('span');
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
ensureStyles(this.shadowRoot);
|
|
20
|
+
this.select.className = 'ac-select';
|
|
21
|
+
this.label.className = 'ac-chip';
|
|
22
|
+
this.label.textContent = 'Model';
|
|
23
|
+
const row = document.createElement('div');
|
|
24
|
+
row.className = 'ac-row';
|
|
25
|
+
row.append(this.label, this.select);
|
|
26
|
+
this.shadowRoot.appendChild(row);
|
|
27
|
+
this.select.addEventListener('change', () => this.emitChange());
|
|
28
|
+
this.refresh();
|
|
29
|
+
}
|
|
30
|
+
attributeChangedCallback() {
|
|
31
|
+
this.refresh();
|
|
32
|
+
}
|
|
33
|
+
get provider() {
|
|
34
|
+
return this.getAttribute('provider') || '';
|
|
35
|
+
}
|
|
36
|
+
async refresh() {
|
|
37
|
+
this.select.innerHTML = '';
|
|
38
|
+
try {
|
|
39
|
+
const client = await getClient();
|
|
40
|
+
const models = await client.models.list(this.provider || undefined);
|
|
41
|
+
for (const model of models) {
|
|
42
|
+
const option = document.createElement('option');
|
|
43
|
+
option.value = model.id;
|
|
44
|
+
option.textContent = model.displayName || model.id;
|
|
45
|
+
this.select.appendChild(option);
|
|
46
|
+
}
|
|
47
|
+
this.emitChange();
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
const option = document.createElement('option');
|
|
51
|
+
option.value = '';
|
|
52
|
+
option.textContent = 'No models';
|
|
53
|
+
this.select.appendChild(option);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
emitChange() {
|
|
57
|
+
const value = this.select.value;
|
|
58
|
+
const detail = { model: value };
|
|
59
|
+
this.dispatchEvent(new CustomEvent('model-change', { detail }));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider status list component.
|
|
3
|
+
*/
|
|
4
|
+
export declare class AgentConnectProviderStatus extends HTMLElement {
|
|
5
|
+
private container;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
refresh(): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=provider-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-status.d.ts","sourceRoot":"","sources":["../../src/components/provider-status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,qBAAa,0BAA2B,SAAQ,WAAW;IACzD,OAAO,CAAC,SAAS,CAAiB;;IAQlC,iBAAiB,IAAI,IAAI;IAOnB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAsB/B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider status list component.
|
|
3
|
+
*/
|
|
4
|
+
import { getClient } from '../client';
|
|
5
|
+
import { ensureStyles } from '../styles';
|
|
6
|
+
export class AgentConnectProviderStatus extends HTMLElement {
|
|
7
|
+
container;
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.attachShadow({ mode: 'open' });
|
|
11
|
+
this.container = document.createElement('div');
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
ensureStyles(this.shadowRoot);
|
|
15
|
+
this.container.className = 'ac-list';
|
|
16
|
+
this.shadowRoot.appendChild(this.container);
|
|
17
|
+
this.refresh();
|
|
18
|
+
}
|
|
19
|
+
async refresh() {
|
|
20
|
+
this.container.innerHTML = '';
|
|
21
|
+
try {
|
|
22
|
+
const client = await getClient();
|
|
23
|
+
const providers = await client.providers.list();
|
|
24
|
+
for (const info of providers) {
|
|
25
|
+
const row = document.createElement('div');
|
|
26
|
+
row.className = 'ac-row';
|
|
27
|
+
const chip = document.createElement('span');
|
|
28
|
+
chip.className = 'ac-chip';
|
|
29
|
+
chip.textContent = info.loggedIn ? 'Ready' : 'Login needed';
|
|
30
|
+
const label = document.createElement('strong');
|
|
31
|
+
label.textContent = info.name || info.id;
|
|
32
|
+
row.append(label, chip);
|
|
33
|
+
this.container.appendChild(row);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
const row = document.createElement('div');
|
|
38
|
+
row.textContent = 'Provider status unavailable';
|
|
39
|
+
this.container.appendChild(row);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants used across UI components.
|
|
3
|
+
*/
|
|
4
|
+
import type { ErrorMessageConfig, ProviderId } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Predefined error messages for common failure scenarios.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ERROR_MESSAGES: Record<string, ErrorMessageConfig>;
|
|
9
|
+
/**
|
|
10
|
+
* SVG icons for each provider.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PROVIDER_ICONS: Record<ProviderId, string>;
|
|
13
|
+
/**
|
|
14
|
+
* HTML template for the connect component.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CONNECT_TEMPLATE = "\n <div class=\"ac-connect\">\n <button class=\"ac-button ac-connect-button\" type=\"button\">Connect Agent</button>\n </div>\n <div class=\"ac-overlay\" part=\"overlay\" data-mode=\"modal\">\n <div class=\"ac-panel ac-modal\" role=\"dialog\" aria-modal=\"true\" data-view=\"connect\" data-active=\"true\">\n <div class=\"ac-modal-header\">\n <div>\n <div class=\"ac-modal-subtitle\">AgentConnect</div>\n <div class=\"ac-modal-title\">Connect your agent</div>\n </div>\n <button class=\"ac-button ghost ac-close\" type=\"button\" aria-label=\"Close\">×</button>\n </div>\n <div class=\"ac-progress\" hidden>\n <div class=\"ac-progress-track\">\n <div class=\"ac-progress-bar\"></div>\n </div>\n <div class=\"ac-progress-label\" aria-live=\"polite\"></div>\n </div>\n <div class=\"ac-section\">\n <div class=\"ac-provider-list\"></div>\n </div>\n </div>\n <div class=\"ac-panel ac-modal\" role=\"dialog\" aria-modal=\"true\" data-view=\"local\" hidden>\n <div class=\"ac-modal-header\">\n <div>\n <div class=\"ac-modal-subtitle\">Local provider</div>\n <div class=\"ac-modal-title\">Connect a local model</div>\n </div>\n <button class=\"ac-button ghost ac-close\" type=\"button\" aria-label=\"Close\">×</button>\n </div>\n <div class=\"ac-helper\">\n Connect to an OpenAI-compatible endpoint (Ollama, LM Studio, vLLM, llama.cpp).\n </div>\n <div class=\"ac-field\">\n <label>Base URL</label>\n <input class=\"ac-input ac-local-base\" type=\"text\" placeholder=\"http://localhost:11434/v1\" />\n </div>\n <div class=\"ac-field\">\n <label>Model ID</label>\n <input class=\"ac-input ac-local-model\" type=\"text\" placeholder=\"llama3.1:8b\" />\n </div>\n <div class=\"ac-field\">\n <label>API Key (optional)</label>\n <input class=\"ac-input ac-local-key\" type=\"password\" placeholder=\"sk-...\" />\n </div>\n <div class=\"ac-field\">\n <label>Model list (optional)</label>\n <input class=\"ac-input ac-local-models\" type=\"text\" placeholder=\"llama3.1:8b, qwen2.5:7b\" />\n </div>\n <div class=\"ac-alert ac-local-status\" hidden></div>\n <div class=\"ac-actions\">\n <button class=\"ac-button ghost ac-back\" type=\"button\">Back</button>\n <div class=\"ac-actions-right\">\n <button class=\"ac-button ac-save-local\" type=\"button\">Save</button>\n </div>\n </div>\n </div>\n <div class=\"ac-panel ac-popover\" role=\"dialog\" aria-modal=\"true\" data-view=\"connected\" hidden>\n <div>\n <div class=\"ac-popover-title\">Provider</div>\n </div>\n <div class=\"ac-field ac-model-field\">\n <label>Model</label>\n <select class=\"ac-select ac-connected-model\"></select>\n <div class=\"ac-model-loading\" style=\"display: none\">\n <span class=\"ac-spinner\"></span>\n <span>Loading models...</span>\n </div>\n </div>\n <div class=\"ac-field ac-effort-field\" style=\"display: none\">\n <label>Reasoning</label>\n <select class=\"ac-select ac-connected-effort\"></select>\n </div>\n <div class=\"ac-actions\">\n <button class=\"ac-button ghost ac-disconnect\" type=\"button\">Disconnect</button>\n </div>\n </div>\n </div>\n";
|
|
17
|
+
/**
|
|
18
|
+
* Default local provider configuration.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DEFAULT_LOCAL_CONFIG: {
|
|
21
|
+
baseUrl: string;
|
|
22
|
+
apiKey: string;
|
|
23
|
+
model: string;
|
|
24
|
+
models: string[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Default storage keys.
|
|
28
|
+
*/
|
|
29
|
+
export declare const STORAGE_KEYS: {
|
|
30
|
+
readonly lastSelection: "agentconnect:last-selection";
|
|
31
|
+
readonly localConfig: "agentconnect:local-config";
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAoC7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAUrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,y6GA+E5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;YAIjB,MAAM,EAAE;CACvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants used across UI components.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Predefined error messages for common failure scenarios.
|
|
6
|
+
*/
|
|
7
|
+
export const ERROR_MESSAGES = {
|
|
8
|
+
install_failed: {
|
|
9
|
+
title: 'Installation failed',
|
|
10
|
+
message: 'Could not install provider. Check your internet connection.',
|
|
11
|
+
action: 'Try again',
|
|
12
|
+
},
|
|
13
|
+
login_failed: {
|
|
14
|
+
title: 'Login failed',
|
|
15
|
+
message: 'Could not authenticate. Please try again.',
|
|
16
|
+
action: 'Retry',
|
|
17
|
+
},
|
|
18
|
+
login_incomplete: {
|
|
19
|
+
title: 'Login incomplete',
|
|
20
|
+
message: 'Authentication was not completed. Please try again.',
|
|
21
|
+
action: 'Retry',
|
|
22
|
+
},
|
|
23
|
+
connection_failed: {
|
|
24
|
+
title: 'Connection failed',
|
|
25
|
+
message: 'Cannot reach AgentConnect host. Start it with: agentconnect dev',
|
|
26
|
+
action: 'Retry',
|
|
27
|
+
},
|
|
28
|
+
local_unreachable: {
|
|
29
|
+
title: 'Endpoint unreachable',
|
|
30
|
+
message: 'Cannot reach the local endpoint. Make sure Ollama/LM Studio is running.',
|
|
31
|
+
action: 'Retry',
|
|
32
|
+
},
|
|
33
|
+
local_save_failed: {
|
|
34
|
+
title: 'Save failed',
|
|
35
|
+
message: 'Could not save local provider settings.',
|
|
36
|
+
action: 'Retry',
|
|
37
|
+
},
|
|
38
|
+
no_models: {
|
|
39
|
+
title: 'No models available',
|
|
40
|
+
message: 'No models found for this provider.',
|
|
41
|
+
action: null,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* SVG icons for each provider.
|
|
46
|
+
*/
|
|
47
|
+
export const PROVIDER_ICONS = {
|
|
48
|
+
claude: `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
+
<path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/>
|
|
50
|
+
</svg>`,
|
|
51
|
+
codex: `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
52
|
+
<path d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/>
|
|
53
|
+
</svg>`,
|
|
54
|
+
local: `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
55
|
+
<path d="M4 1h16c1.1 0 2 .9 2 2v4c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2zm0 2v4h16V3H4zm0 6h16c1.1 0 2 .9 2 2v4c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-4c0-1.1.9-2 2-2zm0 2v4h16v-4H4zm0 6h16c1.1 0 2 .9 2 2v4c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-4c0-1.1.9-2 2-2zm0 2v4h16v-4H4zm2-13a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm0 8a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm0 8a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
|
|
56
|
+
</svg>`,
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* HTML template for the connect component.
|
|
60
|
+
*/
|
|
61
|
+
export const CONNECT_TEMPLATE = `
|
|
62
|
+
<div class="ac-connect">
|
|
63
|
+
<button class="ac-button ac-connect-button" type="button">Connect Agent</button>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="ac-overlay" part="overlay" data-mode="modal">
|
|
66
|
+
<div class="ac-panel ac-modal" role="dialog" aria-modal="true" data-view="connect" data-active="true">
|
|
67
|
+
<div class="ac-modal-header">
|
|
68
|
+
<div>
|
|
69
|
+
<div class="ac-modal-subtitle">AgentConnect</div>
|
|
70
|
+
<div class="ac-modal-title">Connect your agent</div>
|
|
71
|
+
</div>
|
|
72
|
+
<button class="ac-button ghost ac-close" type="button" aria-label="Close">×</button>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="ac-progress" hidden>
|
|
75
|
+
<div class="ac-progress-track">
|
|
76
|
+
<div class="ac-progress-bar"></div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="ac-progress-label" aria-live="polite"></div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ac-section">
|
|
81
|
+
<div class="ac-provider-list"></div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="ac-panel ac-modal" role="dialog" aria-modal="true" data-view="local" hidden>
|
|
85
|
+
<div class="ac-modal-header">
|
|
86
|
+
<div>
|
|
87
|
+
<div class="ac-modal-subtitle">Local provider</div>
|
|
88
|
+
<div class="ac-modal-title">Connect a local model</div>
|
|
89
|
+
</div>
|
|
90
|
+
<button class="ac-button ghost ac-close" type="button" aria-label="Close">×</button>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="ac-helper">
|
|
93
|
+
Connect to an OpenAI-compatible endpoint (Ollama, LM Studio, vLLM, llama.cpp).
|
|
94
|
+
</div>
|
|
95
|
+
<div class="ac-field">
|
|
96
|
+
<label>Base URL</label>
|
|
97
|
+
<input class="ac-input ac-local-base" type="text" placeholder="http://localhost:11434/v1" />
|
|
98
|
+
</div>
|
|
99
|
+
<div class="ac-field">
|
|
100
|
+
<label>Model ID</label>
|
|
101
|
+
<input class="ac-input ac-local-model" type="text" placeholder="llama3.1:8b" />
|
|
102
|
+
</div>
|
|
103
|
+
<div class="ac-field">
|
|
104
|
+
<label>API Key (optional)</label>
|
|
105
|
+
<input class="ac-input ac-local-key" type="password" placeholder="sk-..." />
|
|
106
|
+
</div>
|
|
107
|
+
<div class="ac-field">
|
|
108
|
+
<label>Model list (optional)</label>
|
|
109
|
+
<input class="ac-input ac-local-models" type="text" placeholder="llama3.1:8b, qwen2.5:7b" />
|
|
110
|
+
</div>
|
|
111
|
+
<div class="ac-alert ac-local-status" hidden></div>
|
|
112
|
+
<div class="ac-actions">
|
|
113
|
+
<button class="ac-button ghost ac-back" type="button">Back</button>
|
|
114
|
+
<div class="ac-actions-right">
|
|
115
|
+
<button class="ac-button ac-save-local" type="button">Save</button>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="ac-panel ac-popover" role="dialog" aria-modal="true" data-view="connected" hidden>
|
|
120
|
+
<div>
|
|
121
|
+
<div class="ac-popover-title">Provider</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="ac-field ac-model-field">
|
|
124
|
+
<label>Model</label>
|
|
125
|
+
<select class="ac-select ac-connected-model"></select>
|
|
126
|
+
<div class="ac-model-loading" style="display: none">
|
|
127
|
+
<span class="ac-spinner"></span>
|
|
128
|
+
<span>Loading models...</span>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="ac-field ac-effort-field" style="display: none">
|
|
132
|
+
<label>Reasoning</label>
|
|
133
|
+
<select class="ac-select ac-connected-effort"></select>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="ac-actions">
|
|
136
|
+
<button class="ac-button ghost ac-disconnect" type="button">Disconnect</button>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
`;
|
|
141
|
+
/**
|
|
142
|
+
* Default local provider configuration.
|
|
143
|
+
*/
|
|
144
|
+
export const DEFAULT_LOCAL_CONFIG = {
|
|
145
|
+
baseUrl: '',
|
|
146
|
+
apiKey: '',
|
|
147
|
+
model: '',
|
|
148
|
+
models: [],
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Default storage keys.
|
|
152
|
+
*/
|
|
153
|
+
export const STORAGE_KEYS = {
|
|
154
|
+
lastSelection: 'agentconnect:last-selection',
|
|
155
|
+
localConfig: 'agentconnect:local-config',
|
|
156
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentConnect UI Components
|
|
3
|
+
*
|
|
4
|
+
* Web components for integrating AgentConnect into applications.
|
|
5
|
+
*/
|
|
6
|
+
export type { ProviderId, ProviderInfo, ModelInfo, ReasoningEffortOption, AgentConnectClient, ProviderInfoWithPending, LocalProviderConfig, SelectionInfo, AlertConfig, ConnectViewType, ConnectComponentState, ConnectComponentElements, ErrorMessageConfig, ValidationError, SelectionEventDetail, ProviderLoginEventDetail, ModelChangeEventDetail, AgentConnectUIEventMap, } from './types';
|
|
7
|
+
export { AgentConnectLoginButton, AgentConnectModelPicker, AgentConnectProviderStatus, AgentConnectConnect, } from './components';
|
|
8
|
+
export { defineAgentConnectComponents } from './register';
|
|
9
|
+
export { getClient, resetClient } from './client';
|
|
10
|
+
export { ensureStyles, combinedStyles } from './styles';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentConnect UI Components
|
|
3
|
+
*
|
|
4
|
+
* Web components for integrating AgentConnect into applications.
|
|
5
|
+
*/
|
|
6
|
+
// Export components
|
|
7
|
+
export { AgentConnectLoginButton, AgentConnectModelPicker, AgentConnectProviderStatus, AgentConnectConnect, } from './components';
|
|
8
|
+
// Export registration function
|
|
9
|
+
export { defineAgentConnectComponents } from './register';
|
|
10
|
+
// Export client utilities
|
|
11
|
+
export { getClient, resetClient } from './client';
|
|
12
|
+
// Export style utilities
|
|
13
|
+
export { ensureStyles, combinedStyles } from './styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAgBnD"}
|
package/dist/register.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom element registration.
|
|
3
|
+
*/
|
|
4
|
+
import { AgentConnectLoginButton, AgentConnectModelPicker, AgentConnectProviderStatus, AgentConnectConnect, } from './components';
|
|
5
|
+
/**
|
|
6
|
+
* Register all AgentConnect custom elements.
|
|
7
|
+
* Safe to call multiple times - will only register once.
|
|
8
|
+
*/
|
|
9
|
+
export function defineAgentConnectComponents() {
|
|
10
|
+
if (typeof window === 'undefined' || !window.customElements) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (!customElements.get('agentconnect-login-button')) {
|
|
14
|
+
customElements.define('agentconnect-login-button', AgentConnectLoginButton);
|
|
15
|
+
}
|
|
16
|
+
if (!customElements.get('agentconnect-model-picker')) {
|
|
17
|
+
customElements.define('agentconnect-model-picker', AgentConnectModelPicker);
|
|
18
|
+
}
|
|
19
|
+
if (!customElements.get('agentconnect-provider-status')) {
|
|
20
|
+
customElements.define('agentconnect-provider-status', AgentConnectProviderStatus);
|
|
21
|
+
}
|
|
22
|
+
if (!customElements.get('agentconnect-connect')) {
|
|
23
|
+
customElements.define('agentconnect-connect', AgentConnectConnect);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base styles - host, reset, and common selectors.
|
|
3
|
+
*/
|
|
4
|
+
export declare const baseStyles = "\n :host {\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n }\n :host * {\n box-sizing: border-box;\n }\n button, select {\n font-family: inherit;\n }\n .ac-connect {\n display: inline-flex;\n align-items: center;\n }\n .ac-row {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n }\n .ac-list {\n display: grid;\n gap: 6px;\n }\n .ac-section {\n display: grid;\n gap: 8px;\n }\n .ac-field {\n display: grid;\n gap: 6px;\n }\n .ac-field label {\n font-size: 12px;\n text-transform: uppercase;\n letter-spacing: 0.12em;\n color: var(--ac-muted, #556070);\n font-weight: 700;\n }\n .ac-helper {\n font-size: 13px;\n color: var(--ac-muted, #556070);\n line-height: 1.4;\n }\n";
|
|
5
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/styles/base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,UAAU,myBA6CtB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base styles - host, reset, and common selectors.
|
|
3
|
+
*/
|
|
4
|
+
export const baseStyles = `
|
|
5
|
+
:host {
|
|
6
|
+
font-family: inherit;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
:host * {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
button, select {
|
|
14
|
+
font-family: inherit;
|
|
15
|
+
}
|
|
16
|
+
.ac-connect {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
20
|
+
.ac-row {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
}
|
|
25
|
+
.ac-list {
|
|
26
|
+
display: grid;
|
|
27
|
+
gap: 6px;
|
|
28
|
+
}
|
|
29
|
+
.ac-section {
|
|
30
|
+
display: grid;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
}
|
|
33
|
+
.ac-field {
|
|
34
|
+
display: grid;
|
|
35
|
+
gap: 6px;
|
|
36
|
+
}
|
|
37
|
+
.ac-field label {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
text-transform: uppercase;
|
|
40
|
+
letter-spacing: 0.12em;
|
|
41
|
+
color: var(--ac-muted, #556070);
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
}
|
|
44
|
+
.ac-helper {
|
|
45
|
+
font-size: 13px;
|
|
46
|
+
color: var(--ac-muted, #556070);
|
|
47
|
+
line-height: 1.4;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button styles.
|
|
3
|
+
*/
|
|
4
|
+
export declare const buttonStyles = "\n .ac-button {\n appearance: none;\n border: 1px solid transparent;\n border-radius: 999px;\n padding: 10px 16px;\n background: var(--ac-button-bg, #0b1320);\n color: var(--ac-button-color, #f8fbff);\n font-size: 13px;\n font-weight: 700;\n letter-spacing: 0.01em;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;\n }\n .ac-button:hover:not([disabled]) {\n transform: translateY(-1px);\n box-shadow: 0 14px 30px rgba(10, 16, 28, 0.2);\n }\n .ac-button.secondary {\n background: linear-gradient(\n 165deg,\n rgba(255, 255, 255, 0.95) 0%,\n rgba(250, 251, 254, 0.9) 100%\n );\n color: #1a1f2e;\n border: 1px solid rgba(195, 165, 90, 0.35);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, 0.9),\n 0 1px 3px rgba(0, 0, 0, 0.04);\n }\n .ac-button.secondary:hover:not([disabled]) {\n border-color: rgba(200, 170, 90, 0.55);\n background: linear-gradient(\n 165deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(253, 253, 255, 0.95) 100%\n );\n box-shadow:\n 0 0 0 1px rgba(210, 180, 100, 0.12),\n inset 0 1px 0 rgba(255, 255, 255, 1),\n 0 4px 12px rgba(0, 0, 0, 0.06);\n }\n .ac-button.ghost {\n background: transparent;\n color: rgba(80, 70, 50, 0.7);\n border: 1px solid rgba(195, 165, 90, 0.3);\n box-shadow: none;\n }\n .ac-button.ghost:hover:not([disabled]) {\n color: rgba(80, 70, 50, 0.9);\n border-color: rgba(200, 170, 90, 0.45);\n background: rgba(255, 255, 255, 0.5);\n }\n .ac-button.ac-close {\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 999px;\n font-size: 18px;\n line-height: 1;\n color: rgba(80, 70, 50, 0.5);\n }\n .ac-button.ac-close:hover:not([disabled]) {\n color: rgba(80, 70, 50, 0.8);\n background: rgba(200, 170, 90, 0.12);\n }\n .ac-button[disabled] {\n opacity: 0.6;\n cursor: default;\n box-shadow: none;\n }\n .ac-chip {\n font-size: 12px;\n font-weight: 600;\n padding: 6px 10px;\n border-radius: 999px;\n background: linear-gradient(\n 165deg,\n rgba(255, 255, 255, 0.9) 0%,\n rgba(250, 248, 245, 0.85) 100%\n );\n color: rgba(80, 70, 50, 0.8);\n border: 1px solid rgba(195, 165, 90, 0.28);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);\n }\n .ac-button.loading {\n position: relative;\n color: transparent;\n pointer-events: none;\n }\n .ac-button.loading::after {\n content: '';\n position: absolute;\n inset: 0;\n margin: auto;\n width: 16px;\n height: 16px;\n border: 2px solid var(--ac-button-color, #f8fbff);\n border-top-color: transparent;\n border-radius: 50%;\n animation: ac-spin 0.8s linear infinite;\n }\n .ac-button.secondary.loading::after {\n border-color: var(--ac-button-secondary-color, #0b1320);\n border-top-color: transparent;\n }\n .ac-button:active:not([disabled]) {\n transform: scale(0.98);\n }\n";
|
|
5
|
+
export declare const connectButtonStyles = "\n .ac-connect .ac-button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n min-height: 52px;\n padding: 14px 24px;\n border-radius: 999px;\n background: linear-gradient(\n 165deg,\n rgba(255, 255, 255, 0.95) 0%,\n rgba(245, 247, 250, 0.9) 25%,\n rgba(235, 238, 245, 0.85) 50%,\n rgba(240, 242, 248, 0.9) 75%,\n rgba(250, 251, 254, 0.95) 100%\n );\n color: #1a1f2e;\n font-size: 13px;\n font-weight: 600;\n letter-spacing: 0.02em;\n border: 1.5px solid rgba(195, 165, 90, 0.55);\n box-shadow:\n 0 0 0 1px rgba(210, 180, 100, 0.2),\n 0 1px 2px rgba(0, 0, 0, 0.04),\n 0 4px 12px rgba(0, 0, 0, 0.06),\n 0 12px 36px rgba(0, 0, 0, 0.08),\n inset 0 1px 0 rgba(255, 255, 255, 1),\n inset 0 -1px 0 rgba(0, 0, 0, 0.03);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n overflow: hidden;\n width: min(var(--ac-connect-width, 240px), 92vw);\n text-align: center;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n .ac-connect .ac-connect-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .ac-connect .ac-connect-icon {\n width: 20px;\n height: 20px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 20px;\n }\n .ac-connect .ac-connect-icon svg {\n width: 18px;\n height: 18px;\n }\n .ac-connect .ac-connect-icon[data-provider=\"claude\"] svg {\n fill: #d97757;\n }\n .ac-connect .ac-button:hover:not([disabled]) {\n transform: translateY(-2px);\n background: linear-gradient(\n 165deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(250, 252, 255, 0.95) 25%,\n rgba(245, 248, 255, 0.9) 50%,\n rgba(248, 250, 255, 0.95) 75%,\n rgba(255, 255, 255, 1) 100%\n );\n border-color: rgba(200, 170, 90, 0.65);\n box-shadow:\n 0 0 0 1px rgba(215, 185, 100, 0.25),\n 0 2px 4px rgba(0, 0, 0, 0.04),\n 0 8px 24px rgba(0, 0, 0, 0.08),\n 0 20px 50px rgba(0, 0, 0, 0.1),\n inset 0 1px 0 rgba(255, 255, 255, 1),\n inset 0 -1px 0 rgba(0, 0, 0, 0.02);\n }\n .ac-connect .ac-button:active:not([disabled]) {\n transform: translateY(0) scale(0.98);\n background: linear-gradient(\n 165deg,\n rgba(245, 247, 252, 0.95) 0%,\n rgba(240, 243, 250, 0.9) 50%,\n rgba(245, 247, 252, 0.95) 100%\n );\n box-shadow:\n 0 1px 2px rgba(0, 0, 0, 0.05),\n 0 4px 12px rgba(0, 0, 0, 0.06),\n inset 0 1px 0 rgba(255, 255, 255, 0.9),\n inset 0 -1px 0 rgba(0, 0, 0, 0.02);\n }\n";
|
|
6
|
+
//# sourceMappingURL=buttons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttons.d.ts","sourceRoot":"","sources":["../../src/styles/buttons.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY,s8FA6GxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,urFA4F/B,CAAC"}
|