bunnyquery 1.2.0 → 1.2.2
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 +6 -5
- package/bunnyquery.css +15 -17
- package/bunnyquery.js +5 -4
- package/package.json +17 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BunnyQuery
|
|
2
2
|
|
|
3
|
-
An embeddable, dependency-free AI chat widget for [Skapi](https://skapi.com)-powered
|
|
3
|
+
An embeddable, dependency-free AI chat widget for [Skapi](https://www.skapi.com)-powered
|
|
4
4
|
projects. Drop it into any web page and your users get a full chat experience —
|
|
5
5
|
account login/signup, conversation history, file & folder uploads, and a settings
|
|
6
6
|
panel — all talking to your project's **BunnyQuery** AI agent.
|
|
@@ -26,7 +26,7 @@ stylesheet. No build step, no framework, no npm install.
|
|
|
26
26
|
|
|
27
27
|
## Requirements
|
|
28
28
|
|
|
29
|
-
- A
|
|
29
|
+
- A BunnyQuery project (you need its **project ID**).
|
|
30
30
|
- The [`skapi-js`](https://www.npmjs.com/package/skapi-js) SDK loaded on the page.
|
|
31
31
|
- A mount element with an explicit height (the widget fills its container).
|
|
32
32
|
|
|
@@ -53,7 +53,7 @@ call `BunnyQuery.init()`:
|
|
|
53
53
|
|
|
54
54
|
<script>
|
|
55
55
|
// 1. Create your Skapi instance
|
|
56
|
-
const skapi = new Skapi("<your-
|
|
56
|
+
const skapi = new Skapi("<your-project-id>", { autoLogin: true });
|
|
57
57
|
|
|
58
58
|
// 2. Mount BunnyQuery into the container
|
|
59
59
|
BunnyQuery.init(skapi, "chatbox", {
|
|
@@ -131,7 +131,7 @@ To customize colors, override the variables in your own stylesheet **after**
|
|
|
131
131
|
|
|
132
132
|
```css
|
|
133
133
|
.bq-agent {
|
|
134
|
-
--bq-
|
|
134
|
+
--bq-main: #ff4fa3;
|
|
135
135
|
--bq-ink: #111;
|
|
136
136
|
}
|
|
137
137
|
```
|
|
@@ -141,7 +141,8 @@ The active theme is saved to `localStorage`, so a returning user keeps their cho
|
|
|
141
141
|
## OAuth & redirects
|
|
142
142
|
|
|
143
143
|
BunnyQuery connects to your AI agent through an MCP OAuth server
|
|
144
|
-
(`mcp.broadwayinc.computer`
|
|
144
|
+
(`mcp.broadwayinc.computer` in production, `mcp-dev.broadwayinc.computer` when
|
|
145
|
+
`dev: true`). After authorization, the OAuth server redirects back to **the current
|
|
145
146
|
host page** — BunnyQuery reads the `?code=…&state=…` parameters, completes the
|
|
146
147
|
exchange, and cleans them from the URL automatically. No dedicated callback page is
|
|
147
148
|
needed; just make sure the page that hosts the widget is a stable, reachable URL.
|
package/bunnyquery.css
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
--bq-muted: #666;
|
|
18
18
|
--bq-line: #c8c8c8;
|
|
19
19
|
--bq-hover-bg: #ebebeb;
|
|
20
|
-
--bq-
|
|
21
|
-
--bq-light-
|
|
20
|
+
--bq-main: #c2185b;
|
|
21
|
+
--bq-light-main: #f06292;
|
|
22
22
|
--bq-danger: #c44;
|
|
23
23
|
--bq-danger-bg: #fff5f5;
|
|
24
|
-
--bq-
|
|
24
|
+
--bq-main-bg: #fff8fa;
|
|
25
25
|
--bq-success: #2a7d29;
|
|
26
26
|
--bq-success-bg: #eef9f0;
|
|
27
27
|
--bq-success-border: #b8dcbc;
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
--bq-muted: #a0a0a0;
|
|
46
46
|
--bq-line: #3d3d3d;
|
|
47
47
|
--bq-hover-bg: #252525;
|
|
48
|
-
--bq-
|
|
49
|
-
--bq-light-
|
|
48
|
+
--bq-main: #f06292;
|
|
49
|
+
--bq-light-main: #f48fb1;
|
|
50
50
|
--bq-danger: #ef5350;
|
|
51
51
|
--bq-danger-bg: #2d1616;
|
|
52
|
-
--bq-
|
|
52
|
+
--bq-main-bg: #2b1520;
|
|
53
53
|
--bq-success: #6abf66;
|
|
54
54
|
--bq-success-bg: #192e1e;
|
|
55
55
|
--bq-success-border: #4caf50;
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.bq-link {
|
|
248
|
-
color: var(--bq-
|
|
248
|
+
color: var(--bq-main);
|
|
249
249
|
cursor: pointer;
|
|
250
250
|
font-size: 0.8rem;
|
|
251
251
|
background: none;
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
.bq-verify-badge.is-verified { color: var(--bq-success); border-color: var(--bq-success-border); background: var(--bq-success-bg); }
|
|
407
407
|
.bq-verify-badge.is-unverified { color: var(--bq-warning); border-color: var(--bq-warning-border); background: var(--bq-warning-bg); }
|
|
408
408
|
.bq-account-logout {
|
|
409
|
-
margin-top:
|
|
409
|
+
margin-top: 2rem;
|
|
410
410
|
text-align: right;
|
|
411
411
|
}
|
|
412
412
|
.bq-account-danger {
|
|
@@ -442,7 +442,6 @@
|
|
|
442
442
|
flex-direction: column;
|
|
443
443
|
flex: 1;
|
|
444
444
|
min-height: 0;
|
|
445
|
-
/* padding: 1rem 1.25rem 1.25rem; */
|
|
446
445
|
}
|
|
447
446
|
|
|
448
447
|
.bq-section-title {
|
|
@@ -451,7 +450,6 @@
|
|
|
451
450
|
gap: 0.5rem;
|
|
452
451
|
font-size: 1.1rem;
|
|
453
452
|
font-weight: 700;
|
|
454
|
-
/* padding-bottom: 0.75rem; */
|
|
455
453
|
padding: 1rem 1.25rem 0.75rem;
|
|
456
454
|
flex-shrink: 0;
|
|
457
455
|
}
|
|
@@ -511,8 +509,8 @@
|
|
|
511
509
|
transition: color 0.15s;
|
|
512
510
|
border-radius: 0;
|
|
513
511
|
}
|
|
514
|
-
.bq-icon-btn:hover { color: var(--bq-
|
|
515
|
-
.bq-icon-btn.is-active { color: var(--bq-
|
|
512
|
+
.bq-icon-btn:hover { color: var(--bq-main); }
|
|
513
|
+
.bq-icon-btn.is-active { color: var(--bq-main); }
|
|
516
514
|
.bq-icon-btn--danger:hover { color: var(--bq-danger); }
|
|
517
515
|
.bq-icon-btn:disabled { opacity: 0.3; pointer-events: none; }
|
|
518
516
|
.bq-icon-btn svg { width: 1.25rem; height: 1.25rem; display: block; }
|
|
@@ -596,7 +594,7 @@
|
|
|
596
594
|
align-items: center;
|
|
597
595
|
justify-content: center;
|
|
598
596
|
background: var(--bq-paper);
|
|
599
|
-
border: 2px dashed var(--bq-
|
|
597
|
+
border: 2px dashed var(--bq-main);
|
|
600
598
|
pointer-events: none;
|
|
601
599
|
opacity: 0.92;
|
|
602
600
|
}
|
|
@@ -605,7 +603,7 @@
|
|
|
605
603
|
flex-direction: column;
|
|
606
604
|
align-items: center;
|
|
607
605
|
gap: 0.5rem;
|
|
608
|
-
color: var(--bq-
|
|
606
|
+
color: var(--bq-main);
|
|
609
607
|
font-size: 0.9rem;
|
|
610
608
|
font-weight: 600;
|
|
611
609
|
}
|
|
@@ -693,7 +691,7 @@
|
|
|
693
691
|
/* in-bubble file/link anchors */
|
|
694
692
|
.bq-file-download,
|
|
695
693
|
.bq-link-button {
|
|
696
|
-
color: var(--bq-
|
|
694
|
+
color: var(--bq-main);
|
|
697
695
|
text-decoration: none;
|
|
698
696
|
cursor: pointer;
|
|
699
697
|
background: transparent;
|
|
@@ -736,7 +734,7 @@
|
|
|
736
734
|
background: rgba(127, 127, 127, 0.08);
|
|
737
735
|
}
|
|
738
736
|
.bq-md hr { border: none; border-top: 1px solid var(--bq-line); margin: 0.8em 0; }
|
|
739
|
-
.bq-md a { color: var(--bq-
|
|
737
|
+
.bq-md a { color: var(--bq-main); text-decoration: underline; }
|
|
740
738
|
.bq-md a:hover { text-decoration: none; }
|
|
741
739
|
.bq-md code {
|
|
742
740
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
@@ -807,7 +805,7 @@
|
|
|
807
805
|
cursor: pointer;
|
|
808
806
|
z-index: 1;
|
|
809
807
|
}
|
|
810
|
-
.bq-attach-btn:hover:not(:disabled) { color: var(--bq-
|
|
808
|
+
.bq-attach-btn:hover:not(:disabled) { color: var(--bq-main); }
|
|
811
809
|
.bq-attach-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
812
810
|
.bq-attach-input { display: none; }
|
|
813
811
|
.bq-input {
|
package/bunnyquery.js
CHANGED
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* Usage:
|
|
8
8
|
* <link rel="stylesheet" href="bunnyquery.css">
|
|
9
9
|
* <script src="https://cdn.jsdelivr.net/npm/skapi-js@latest/dist/skapi.js"></script>
|
|
10
|
-
* <
|
|
10
|
+
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bunnyquery@latest/bunnyquery.css"/>
|
|
11
|
+
* <script src="https://cdn.jsdelivr.net/npm/bunnyquery@latest/bunnyquery.js"></script>
|
|
11
12
|
* <script>
|
|
12
|
-
* const skapi = new Skapi("<
|
|
13
|
+
* const skapi = new Skapi("<project_id>", { autoLogin: true });
|
|
13
14
|
* BunnyQuery.init(skapi, "chatbox", { theme: "light", signup: true });
|
|
14
15
|
* </script>
|
|
15
16
|
*
|
|
@@ -212,7 +213,7 @@
|
|
|
212
213
|
service: null, // resolved service info ({ ai_agent, name, ... })
|
|
213
214
|
serviceId: null,
|
|
214
215
|
owner: null,
|
|
215
|
-
theme:
|
|
216
|
+
theme: null,
|
|
216
217
|
// agent config (read-only, admin-provided)
|
|
217
218
|
aiPlatform: "none", // "claude" | "openai" | "none"
|
|
218
219
|
aiModel: "",
|
|
@@ -1133,7 +1134,7 @@
|
|
|
1133
1134
|
} catch (e) { return Promise.resolve(false); }
|
|
1134
1135
|
}
|
|
1135
1136
|
// Settings opens IN PLACE inside the chat's messages area (the header stays;
|
|
1136
|
-
// the composer is swapped for a "Close" bar; the gear
|
|
1137
|
+
// the composer is swapped for a "Close" bar; the gear takes the main color). Toggling
|
|
1137
1138
|
// the gear again — or the close bar — returns to the chat.
|
|
1138
1139
|
function toggleChatSettings() {
|
|
1139
1140
|
if (CS.chatSettingsOpen) closeChatSettings(); else openChatSettings();
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunnyquery",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Embeddable BunnyQuery AI chat widget",
|
|
5
5
|
"main": "bunnyquery.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"bunnyquery.js",
|
|
8
8
|
"bunnyquery.css"
|
|
9
9
|
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "npx bns port=3333"
|
|
12
|
-
},
|
|
13
10
|
"keywords": [
|
|
14
11
|
"skapi",
|
|
15
12
|
"chat",
|
|
@@ -17,9 +14,21 @@
|
|
|
17
14
|
"embeddable",
|
|
18
15
|
"widget"
|
|
19
16
|
],
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
"scripts": {
|
|
18
|
+
"dev": "npx bns port=3333"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
23
21
|
"basic-node-server": "^1.1.1"
|
|
24
|
-
}
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/broadwayinc/bunnyquery.git"
|
|
26
|
+
},
|
|
27
|
+
"author": "Baksa Gimm",
|
|
28
|
+
"copyright.owner": "broadway Inc.",
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/broadwayinc/bunnyquery/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://www.bunnyquery.com"
|
|
25
34
|
}
|