bunnyquery 1.4.6 → 1.5.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/bunnyquery.css CHANGED
@@ -162,6 +162,87 @@
162
162
  to { transform: rotate(360deg); }
163
163
  }
164
164
 
165
+ /* jumping ASCII bunny — full-area "loading/fetching" indicator (page/gate loads,
166
+ initial history fetch, settings panel). Ported from www.bunnyquery.com
167
+ bunnyLoader.vue. Two <pre> frames toggle + hop across the track and flip. */
168
+ .bq-bunny-loader {
169
+ display: flex;
170
+ flex-direction: column;
171
+ align-items: center;
172
+ justify-content: center;
173
+ gap: 0.75rem;
174
+ }
175
+ .bq-bunny-loader--overlay {
176
+ position: absolute;
177
+ inset: 0;
178
+ pointer-events: none;
179
+ z-index: 4;
180
+ }
181
+ .bq-bunny-stage {
182
+ display: inline-block;
183
+ position: relative;
184
+ text-align: left;
185
+ }
186
+ .bq-bunny-track {
187
+ position: relative;
188
+ height: 3.6rem;
189
+ width: 100%;
190
+ animation: bq-bunny-move 9s steps(12) infinite;
191
+ }
192
+ .bq-bunny-dir {
193
+ display: inline-block;
194
+ position: absolute;
195
+ bottom: 0;
196
+ left: 0;
197
+ animation: bq-bunny-flip 9s steps(1) infinite;
198
+ }
199
+ .bq-frame {
200
+ margin: 0;
201
+ /* Pin a Latin monospace font. Without it the <pre> falls back to the UA
202
+ `monospace` keyword, which on Korean/Japanese systems can resolve to a
203
+ CJK font that renders U+005C (backslash) as ₩ / ¥ — wrecking the art. */
204
+ font-family: var(--bq-mono);
205
+ font-size: 1rem;
206
+ line-height: 1.2;
207
+ white-space: pre;
208
+ color: var(--bq-ink);
209
+ }
210
+ .bq-frame-a {
211
+ animation: bq-bunny-toggle-a 1s steps(1) infinite;
212
+ }
213
+ .bq-frame-b {
214
+ animation: bq-bunny-toggle-b 1s steps(1) infinite;
215
+ opacity: 0;
216
+ }
217
+ .bq-bunny-loader__label {
218
+ color: var(--bq-ink);
219
+ font-family: var(--bq-mono);
220
+ font-size: 0.83rem;
221
+ }
222
+ @keyframes bq-bunny-move {
223
+ 0% { transform: translateX(-11ch); }
224
+ 25% { transform: translateX(4ch); }
225
+ 37.5% { transform: translateX(4ch); }
226
+ 50% { transform: translateX(4ch); }
227
+ 75% { transform: translateX(-11ch); }
228
+ 87.5% { transform: translateX(-11ch); }
229
+ 100% { transform: translateX(-11ch); }
230
+ }
231
+ @keyframes bq-bunny-flip {
232
+ 0% { transform: scaleX(1); }
233
+ 50% { transform: scaleX(-1); }
234
+ }
235
+ @keyframes bq-bunny-toggle-a {
236
+ 0% { opacity: 1; }
237
+ 25% { opacity: 0; }
238
+ 100% { opacity: 1; }
239
+ }
240
+ @keyframes bq-bunny-toggle-b {
241
+ 0% { opacity: 0; }
242
+ 25% { opacity: 1; }
243
+ 100% { opacity: 0; }
244
+ }
245
+
165
246
  /* ============================================================================
166
247
  * AUTH VIEWS (login / signup / forgot / verify / settings)
167
248
  * ==========================================================================*/
package/bunnyquery.js CHANGED
@@ -2176,7 +2176,7 @@ ${options.inlineContentPlaceholder}
2176
2176
  (function() {
2177
2177
  var MCP_PROD = "https://mcp.broadwayinc.computer";
2178
2178
  var MCP_DEV = "https://mcp-dev.broadwayinc.computer";
2179
- var BQ_VERSION = "1.4.6" ;
2179
+ var BQ_VERSION = "1.5.0" ;
2180
2180
  var ATTACHMENT_URL_EXPIRES_SECONDS = 600;
2181
2181
  var GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
2182
2182
  var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
@@ -2431,13 +2431,40 @@ ${options.inlineContentPlaceholder}
2431
2431
  })
2432
2432
  );
2433
2433
  }
2434
+ var BUNNY_FRAME_A = ' (\\(\\\n ( - -)\n c(")(")';
2435
+ var BUNNY_FRAME_B = ' /)/)\n ( . .)\nc(")(")';
2436
+ function bunnyLoader(label, overlay) {
2437
+ return h(
2438
+ "div",
2439
+ {
2440
+ class: "bq-bunny-loader" + (""),
2441
+ "aria-hidden": "true",
2442
+ translate: "no"
2443
+ },
2444
+ h(
2445
+ "div",
2446
+ { class: "bq-bunny-stage" },
2447
+ h(
2448
+ "div",
2449
+ { class: "bq-bunny-track" },
2450
+ h(
2451
+ "div",
2452
+ { class: "bq-bunny-dir" },
2453
+ h("pre", { class: "bq-frame bq-frame-a", translate: "no", text: BUNNY_FRAME_A }),
2454
+ h("pre", { class: "bq-frame bq-frame-b", translate: "no", text: BUNNY_FRAME_B })
2455
+ )
2456
+ )
2457
+ ),
2458
+ label ? h("div", { class: "bq-bunny-loader__label", text: label }) : null
2459
+ );
2460
+ }
2434
2461
  function showLoading(label) {
2435
2462
  render("loading", function() {
2436
2463
  return pageRoot(
2437
2464
  h(
2438
2465
  "div",
2439
2466
  { class: "bq-disabled-inner", style: { marginTop: "3rem" } },
2440
- h("span", { class: "bq-loader", text: "Loading" })
2467
+ bunnyLoader("Loading...")
2441
2468
  )
2442
2469
  );
2443
2470
  });
@@ -3323,7 +3350,7 @@ ${options.inlineContentPlaceholder}
3323
3350
  CS.messagesBox.appendChild(h(
3324
3351
  "div",
3325
3352
  { class: "bq-chat-settings" },
3326
- h("div", { class: "bq-chat-settings-loading" }, h("span", { class: "bq-loader", text: "Loading" }))
3353
+ h("div", { class: "bq-chat-settings-loading" }, bunnyLoader("Loading..."))
3327
3354
  ));
3328
3355
  Promise.all([getProfile(), getNewsletterStatus()]).then(function(res) {
3329
3356
  if (res[0]) S.user = res[0];
@@ -4843,9 +4870,16 @@ ${options.inlineContentPlaceholder}
4843
4870
  return h("div", { class: cls.join(" "), dataset: { msgIndex: String(idx) } }, bubble);
4844
4871
  }
4845
4872
  function historyLoadingEl(initial) {
4873
+ if (initial) {
4874
+ return h(
4875
+ "div",
4876
+ { class: "bq-history-loading is-initial" },
4877
+ bunnyLoader("Fetching history...")
4878
+ );
4879
+ }
4846
4880
  return h(
4847
4881
  "div",
4848
- { class: "bq-history-loading" + (initial ? " is-initial" : "") },
4882
+ { class: "bq-history-loading" },
4849
4883
  h("span", { text: "Fetching history" }),
4850
4884
  h("span", { class: "bq-loader" })
4851
4885
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunnyquery",
3
- "version": "1.4.6",
3
+ "version": "1.5.0",
4
4
  "description": "Embeddable BunnyQuery AI chat widget + its framework-agnostic chat engine",
5
5
  "main": "bunnyquery.js",
6
6
  "exports": {
package/src/widget.css CHANGED
@@ -157,6 +157,87 @@
157
157
  to { transform: rotate(360deg); }
158
158
  }
159
159
 
160
+ /* jumping ASCII bunny — full-area "loading/fetching" indicator (page/gate loads,
161
+ initial history fetch, settings panel). Ported from www.bunnyquery.com
162
+ bunnyLoader.vue. Two <pre> frames toggle + hop across the track and flip. */
163
+ .bq-bunny-loader {
164
+ display: flex;
165
+ flex-direction: column;
166
+ align-items: center;
167
+ justify-content: center;
168
+ gap: 0.75rem;
169
+ }
170
+ .bq-bunny-loader--overlay {
171
+ position: absolute;
172
+ inset: 0;
173
+ pointer-events: none;
174
+ z-index: 4;
175
+ }
176
+ .bq-bunny-stage {
177
+ display: inline-block;
178
+ position: relative;
179
+ text-align: left;
180
+ }
181
+ .bq-bunny-track {
182
+ position: relative;
183
+ height: 3.6rem;
184
+ width: 100%;
185
+ animation: bq-bunny-move 9s steps(12) infinite;
186
+ }
187
+ .bq-bunny-dir {
188
+ display: inline-block;
189
+ position: absolute;
190
+ bottom: 0;
191
+ left: 0;
192
+ animation: bq-bunny-flip 9s steps(1) infinite;
193
+ }
194
+ .bq-frame {
195
+ margin: 0;
196
+ /* Pin a Latin monospace font. Without it the <pre> falls back to the UA
197
+ `monospace` keyword, which on Korean/Japanese systems can resolve to a
198
+ CJK font that renders U+005C (backslash) as ₩ / ¥ — wrecking the art. */
199
+ font-family: var(--bq-mono);
200
+ font-size: 1rem;
201
+ line-height: 1.2;
202
+ white-space: pre;
203
+ color: var(--bq-ink);
204
+ }
205
+ .bq-frame-a {
206
+ animation: bq-bunny-toggle-a 1s steps(1) infinite;
207
+ }
208
+ .bq-frame-b {
209
+ animation: bq-bunny-toggle-b 1s steps(1) infinite;
210
+ opacity: 0;
211
+ }
212
+ .bq-bunny-loader__label {
213
+ color: var(--bq-ink);
214
+ font-family: var(--bq-mono);
215
+ font-size: 0.83rem;
216
+ }
217
+ @keyframes bq-bunny-move {
218
+ 0% { transform: translateX(-11ch); }
219
+ 25% { transform: translateX(4ch); }
220
+ 37.5% { transform: translateX(4ch); }
221
+ 50% { transform: translateX(4ch); }
222
+ 75% { transform: translateX(-11ch); }
223
+ 87.5% { transform: translateX(-11ch); }
224
+ 100% { transform: translateX(-11ch); }
225
+ }
226
+ @keyframes bq-bunny-flip {
227
+ 0% { transform: scaleX(1); }
228
+ 50% { transform: scaleX(-1); }
229
+ }
230
+ @keyframes bq-bunny-toggle-a {
231
+ 0% { opacity: 1; }
232
+ 25% { opacity: 0; }
233
+ 100% { opacity: 1; }
234
+ }
235
+ @keyframes bq-bunny-toggle-b {
236
+ 0% { opacity: 0; }
237
+ 25% { opacity: 1; }
238
+ 100% { opacity: 0; }
239
+ }
240
+
160
241
  /* ============================================================================
161
242
  * AUTH VIEWS (login / signup / forgot / verify / settings)
162
243
  * ==========================================================================*/