@versini/sassysaint 8.15.1 → 8.15.3

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.
@@ -1,7 +1,7 @@
1
1
  var bs = Object.defineProperty;
2
2
  var ps = (e, t, n) => t in e ? bs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var _e = (e, t, n) => ps(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { createContext as we, createSignal as z, onMount as Nt, createEffect as U, createMemo as D, createComponent as y, Portal as Oo, Show as K, template as _, insert as k, createRenderEffect as V, className as F, clearDelegatedEvents as ws, delegateEvents as rr, useContext as xe, onCleanup as j, sortFns as Vn, mutationSortFns as Gn, on as ct, setAttribute as A, getSidedProp as xs, use as Dn, batch as $s, getQueryStatusLabel as Pt, getMutationStatusColor as qt, getQueryStatusColor as Cs, getQueryStatusColorByLabel as Ss, displayValue as pn, For as ks, convertRemToPixels as Rr, untrack as Rt, useTransition as Es, spread as Ds, mergeProps as W, createRoot as zr, serialize as Ms, Index as As, updateNestedDataByPath as or, addEventListener as Fs, stringify as Ts, Match as Rn, Switch as Is, deleteNestedDataByPath as Ls, createUniqueId as Ne, splitProps as re, Dynamic as Ps, createComputed as Os, getPreferredColorScheme as _s } from "./index.BYjX-jmw.js";
4
+ import { createContext as we, createSignal as z, onMount as Nt, createEffect as U, createMemo as D, createComponent as y, Portal as Oo, Show as K, template as _, insert as k, createRenderEffect as V, className as F, clearDelegatedEvents as ws, delegateEvents as rr, useContext as xe, onCleanup as j, sortFns as Vn, mutationSortFns as Gn, on as ct, setAttribute as A, getSidedProp as xs, use as Dn, batch as $s, getQueryStatusLabel as Pt, getMutationStatusColor as qt, getQueryStatusColor as Cs, getQueryStatusColorByLabel as Ss, displayValue as pn, For as ks, convertRemToPixels as Rr, untrack as Rt, useTransition as Es, spread as Ds, mergeProps as W, createRoot as zr, serialize as Ms, Index as As, updateNestedDataByPath as or, addEventListener as Fs, stringify as Ts, Match as Rn, Switch as Is, deleteNestedDataByPath as Ls, createUniqueId as Ne, splitProps as re, Dynamic as Ps, createComputed as Os, getPreferredColorScheme as _s } from "./index.6_64ziFG.js";
5
5
  var qs = (e) => e != null, Rs = (e) => e.filter(qs);
6
6
  function zs(e) {
7
7
  return (...t) => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as nn, Fragment as Op } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as pn } from "./App.qXdvcHNB.js";
2
+ import { getDefaultExportFromCjs as pn } from "./App.Cyg4E7eH.js";
3
3
  import Lp, { useState as Ep, useEffect as Ip } from "react";
4
- import { TRIMESTERS as ln, TRIMESTERS_SHORT as Dp, isProbablyMobile as Bp } from "./index.BYjX-jmw.js";
4
+ import { TRIMESTERS as ln, TRIMESTERS_SHORT as Dp, isProbablyMobile as Bp } from "./index.6_64ziFG.js";
5
5
  var ds = { exports: {} }, Np = ds.exports, hn;
6
6
  function zp() {
7
7
  return hn || (hn = 1, function(we, he) {
@@ -0,0 +1,71 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { ChatContext as _, E as b, Te as h } from "./App.Cyg4E7eH.js";
3
+ import M from "clsx";
4
+ import N, { useState as C, useRef as A, useEffect as R, useContext as w } from "react";
5
+ import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as I, convertCamelCaseToReadable as P, ROLE_INTERNAL as k } from "./index.6_64ziFG.js";
6
+ import { useMarkdown as y } from "./useMarkdown.C8RhZMMZ.js";
7
+ const v = 2, D = v * 1e3, p = "", G = (e) => e * (2 - e);
8
+ function j(e, t = !0) {
9
+ const [o, m] = C(0), [n, a] = C(0), [c, f] = C(e), r = A(0), s = A(0);
10
+ return c !== e && (f(e), a(e.startsWith(c) ? o : 0)), R(() => {
11
+ if (!t)
12
+ return;
13
+ const i = e.split(p).length, u = (l) => {
14
+ s.current || (s.current = l);
15
+ const g = l - s.current, T = Math.min(g / D, 1), O = G(T), S = n + (i - n) * O;
16
+ m(Math.floor(S)), T < 1 && (r.current = requestAnimationFrame(u));
17
+ };
18
+ return s.current = 0, r.current = requestAnimationFrame(u), () => {
19
+ r.current && cancelAnimationFrame(r.current);
20
+ };
21
+ }, [n, e, t]), t ? e.split(p).slice(0, o).join(p) : e;
22
+ }
23
+ const x = {
24
+ MODEL: "Model",
25
+ PLUGIN: "Plugin"
26
+ }, E = M("max-w-[99cqw] mt-3"), L = M("max-w-xs", "sm:max-w-3xl", "prose-li:ps-3"), K = N.memo(
27
+ ({
28
+ content: e,
29
+ annotations: t,
30
+ toolName: o,
31
+ role: m,
32
+ smooth: n = !1
33
+ }) => {
34
+ const a = j(e, n), {
35
+ state: { streaming: c, restoredModel: f }
36
+ } = w(_), r = (t == null ? void 0 : t.model) || f, [s, i] = y(), [u] = b({
37
+ key: F + I,
38
+ initialValue: !1
39
+ }), l = u && {
40
+ [x.MODEL]: r || null,
41
+ [x.PLUGIN]: o ? P(o) : null
42
+ };
43
+ return R(() => {
44
+ a && i(a);
45
+ }, [a, i]), m === k ? /* @__PURE__ */ d(
46
+ h,
47
+ {
48
+ tail: !0,
49
+ className: E,
50
+ contentClassName: L,
51
+ noMaxWidth: !0,
52
+ children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: s })
53
+ }
54
+ ) : /* @__PURE__ */ d(
55
+ h,
56
+ {
57
+ tail: !0,
58
+ copyToClipboard: c ? "loading..." : e,
59
+ copyToClipboardFocusMode: "light",
60
+ footer: l,
61
+ className: E,
62
+ contentClassName: L,
63
+ noMaxWidth: !0,
64
+ children: s
65
+ }
66
+ );
67
+ }
68
+ );
69
+ export {
70
+ K as default
71
+ };
@@ -3238,7 +3238,7 @@ var $u = (e, t = !1) => {
3238
3238
  const t = Ca(() => {
3239
3239
  const r = this, [n] = f(this, yt), [s] = f(this, mt), [i] = f(this, pt), [a] = f(this, gt), [o] = f(this, ft);
3240
3240
  let c;
3241
- return f(this, bt) ? c = f(this, bt) : (c = ga(() => import("./C2Q2AJ2U.Ba5UqVe7.js")), v(this, bt, c)), Ao(f(this, jt), f(this, ht)), ha(c, ma({
3241
+ return f(this, bt) ? c = f(this, bt) : (c = ga(() => import("./C2Q2AJ2U.BnZqBzQU.js")), v(this, bt, c)), Ao(f(this, jt), f(this, ht)), ha(c, ma({
3242
3242
  get queryFlavor() {
3243
3243
  return f(r, Bt);
3244
3244
  },
@@ -7217,7 +7217,7 @@ const tu = "ASK! ME! ANYTHING!", Ei = "Callisto", ru = "Log in", nu = "Sign in w
7217
7217
  ) });
7218
7218
  }, ou = new URL(document.location.href).searchParams, zn = !!ou.get("debug") || !1, cu = ki(() => import(
7219
7219
  /* webpackChunkName: "LazyApp" */
7220
- "./App.qXdvcHNB.js"
7220
+ "./App.Cyg4E7eH.js"
7221
7221
  ).then((e) => e.App)), lu = new zi(), Qn = ({
7222
7222
  isComponent: e,
7223
7223
  headerHeight: t
@@ -1,4 +1,4 @@
1
- import { convert as se, visitParents as Pe, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as $, visit as Me, toString as ce, EXIT as _e, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as Oe, blankLine as je, factorySpace as S, splice as q, resolveAll as Be, markdownLineEnding as R, markdownSpace as L, combineExtensions as $e } from "./useMarkdown.H0ny_Wbh.js";
1
+ import { convert as se, visitParents as Pe, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as $, visit as Me, toString as ce, EXIT as _e, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as Oe, blankLine as je, factorySpace as S, splice as q, resolveAll as Be, markdownLineEnding as R, markdownSpace as L, combineExtensions as $e } from "./useMarkdown.C8RhZMMZ.js";
2
2
  import { longestStreak as We } from "./index.Cyw5OC0t.js";
3
3
  function ne(e, n) {
4
4
  const t = String(e);
@@ -1,4 +1,4 @@
1
- import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.H0ny_Wbh.js";
1
+ import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.C8RhZMMZ.js";
2
2
  import { longestStreak as q } from "./index.Cyw5OC0t.js";
3
3
  function b() {
4
4
  return {
@@ -1,6 +1,6 @@
1
- import { getDefaultExportFromCjs as kn } from "./App.qXdvcHNB.js";
2
- import { visit as In } from "./useMarkdown.H0ny_Wbh.js";
3
- import { toText as Cn } from "./index.B2dWomTr.js";
1
+ import { getDefaultExportFromCjs as kn } from "./App.Cyg4E7eH.js";
2
+ import { visit as In } from "./useMarkdown.C8RhZMMZ.js";
3
+ import { toText as Cn } from "./index.CQSzmI7B.js";
4
4
  function xn(e) {
5
5
  const t = e.regex, i = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), a = "decltype\\(auto\\)", r = "[a-zA-Z_]\\w*::", d = "(?!struct)(" + a + "|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", c = {
6
6
  className: "type",
@@ -1,4 +1,4 @@
1
- import { convert as E, convertElement as u } from "./useMarkdown.H0ny_Wbh.js";
1
+ import { convert as E, convertElement as u } from "./useMarkdown.C8RhZMMZ.js";
2
2
  const f = (
3
3
  // Note: overloads like this are needed to support optional generics.
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { parse as _t, parse$1 as er, visitParents as Za, SKIP as Ja } from "./useMarkdown.H0ny_Wbh.js";
2
- import { toText as Qa } from "./index.B2dWomTr.js";
1
+ import { parse as _t, parse$1 as er, visitParents as Za, SKIP as Ja } from "./useMarkdown.C8RhZMMZ.js";
2
+ import { toText as Qa } from "./index.CQSzmI7B.js";
3
3
  class ye {
4
4
  /**
5
5
  * @constructor
@@ -3,9 +3,9 @@ var Cr = (e, n, t) => n in e ? Sr(e, n, { enumerable: !0, configurable: !0, writ
3
3
  var Re = (e, n, t) => Cr(e, typeof n != "symbol" ? n + "" : n, t);
4
4
  import * as tn from "react/jsx-runtime";
5
5
  import { jsx as se, jsxs as In, Fragment as Er } from "react/jsx-runtime";
6
- import { re as Ir, unObfuscate as Pr, obfuscate as Tr } from "./index.BYjX-jmw.js";
6
+ import { re as Ir, unObfuscate as Pr, obfuscate as Tr } from "./index.6_64ziFG.js";
7
7
  import Ar, { useState as Tt, useEffect as At, useRef as De, useCallback as zr } from "react";
8
- import { getDefaultExportFromCjs as zt } from "./App.qXdvcHNB.js";
8
+ import { getDefaultExportFromCjs as zt } from "./App.Cyg4E7eH.js";
9
9
  import Lr from "clsx";
10
10
  const Lt = ({
11
11
  children: e,
@@ -6830,7 +6830,7 @@ class ou {
6830
6830
  if (!this.remarkGfm) {
6831
6831
  const { default: n } = await import(
6832
6832
  /* webpackChunkName: "LazyRemarkGfm" */
6833
- "./index.DokI56cc.js"
6833
+ "./index.B8miGdpP.js"
6834
6834
  );
6835
6835
  this.remarkGfm = n;
6836
6836
  }
@@ -6841,7 +6841,7 @@ class ou {
6841
6841
  pu("https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css");
6842
6842
  const { default: n } = await import(
6843
6843
  /* webpackChunkName: "LazyRehypeKatex" */
6844
- "./index.BcgrkZTm.js"
6844
+ "./index.U73itIJm.js"
6845
6845
  );
6846
6846
  this.rehypeKatex = n;
6847
6847
  }
@@ -6851,7 +6851,7 @@ class ou {
6851
6851
  if (!this.remarkMath) {
6852
6852
  const { default: n } = await import(
6853
6853
  /* webpackChunkName: "LazyRemarkMath" */
6854
- "./index.dltBp_7w.js"
6854
+ "./index.C5FvZVV7.js"
6855
6855
  );
6856
6856
  this.remarkMath = n;
6857
6857
  }
@@ -6861,7 +6861,7 @@ class ou {
6861
6861
  if (!this.rehypeHighlight) {
6862
6862
  const { default: n } = await import(
6863
6863
  /* webpackChunkName: "LazyRehypeHighlight" */
6864
- "./index.DlvS-MZo.js"
6864
+ "./index.CLiT-qxn.js"
6865
6865
  );
6866
6866
  this.rehypeHighlight = n;
6867
6867
  }
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { SassySaint as a } from "../../chunks/index.BYjX-jmw.js";
2
+ import { SassySaint as a } from "../../chunks/index.6_64ziFG.js";
3
3
  export {
4
4
  a as SassySaint
5
5
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { SassySaint as r } from "./chunks/index.BYjX-jmw.js";
1
+ import { SassySaint as r } from "./chunks/index.6_64ziFG.js";
2
2
  /*!
3
- @sassysaint/client v8.15.1
3
+ @sassysaint/client v8.15.3
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_SASSY_GLOBAL__ || (window.__VERSINI_SASSY_GLOBAL__ = {
8
- version: "8.15.1",
9
- buildTime: "04/24/2025 10:33 AM EDT",
8
+ version: "8.15.3",
9
+ buildTime: "04/24/2025 06:52 PM EDT",
10
10
  license: "MIT"
11
11
  });
12
12
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint",
3
- "version": "8.15.1",
3
+ "version": "8.15.3",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -30,7 +30,7 @@
30
30
  "react-dom": "^18.3.1 || ^19.0.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@sassysaint/client": "8.15.1",
33
+ "@sassysaint/client": "8.15.3",
34
34
  "@tailwindcss/vite": "4.1.4",
35
35
  "@versini/ui-styles": "5.0.3"
36
36
  },
@@ -42,5 +42,5 @@
42
42
  "sideEffects": [
43
43
  "**/*.css"
44
44
  ],
45
- "gitHead": "c83978a80feb3b20f10ebf341fde0e73c98a386b"
45
+ "gitHead": "b451ad67f140a21844759132e38572917072803e"
46
46
  }
@@ -1,71 +0,0 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { ChatContext as _, E as b, Te as h } from "./App.qXdvcHNB.js";
3
- import M from "clsx";
4
- import N, { useState as d, useRef as A, useEffect as R, useContext as w } from "react";
5
- import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as I, convertCamelCaseToReadable as P, ROLE_INTERNAL as k } from "./index.BYjX-jmw.js";
6
- import { useMarkdown as y } from "./useMarkdown.H0ny_Wbh.js";
7
- const v = 2, D = v * 1e3, C = "", G = (t) => t * (2 - t);
8
- function j(t, e = !0) {
9
- const [o, l] = d(0), [n, a] = d(0), [c, i] = d(t), r = A(0), s = A(0);
10
- return c !== t && (i(t), a(t.startsWith(c) ? o : 0)), R(() => {
11
- if (!e)
12
- return;
13
- const m = t.split(C).length, u = (p) => {
14
- s.current || (s.current = p);
15
- const g = p - s.current, T = Math.min(g / D, 1), O = G(T), S = n + (m - n) * O;
16
- l(Math.floor(S)), T < 1 && (r.current = requestAnimationFrame(u));
17
- };
18
- return s.current = 0, r.current = requestAnimationFrame(u), () => {
19
- r.current && cancelAnimationFrame(r.current);
20
- };
21
- }, [n, t, e]), e ? t.split(C).slice(0, o).join(C) : t;
22
- }
23
- const x = {
24
- MODEL: "Model",
25
- PLUGIN: "Plugin"
26
- }, E = M("max-w-[99cqw] mt-3"), L = M("max-w-xs", "sm:max-w-3xl", "prose-li:ps-3"), K = N.memo(
27
- ({
28
- content: t,
29
- annotations: e,
30
- toolName: o,
31
- role: l,
32
- smooth: n = !1
33
- }) => {
34
- const a = j(t, n), {
35
- state: { streaming: c }
36
- } = w(_), i = e == null ? void 0 : e.model, [r, s] = y(), [m] = b({
37
- key: F + I,
38
- initialValue: !1
39
- }), u = m && {
40
- [x.MODEL]: i || null,
41
- [x.PLUGIN]: o ? P(o) : null
42
- };
43
- return R(() => {
44
- a && s(a);
45
- }, [a, s]), l === k ? /* @__PURE__ */ f(
46
- h,
47
- {
48
- tail: !0,
49
- className: E,
50
- contentClassName: L,
51
- noMaxWidth: !0,
52
- children: /* @__PURE__ */ f("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: r })
53
- }
54
- ) : /* @__PURE__ */ f(
55
- h,
56
- {
57
- tail: !0,
58
- copyToClipboard: c ? "loading..." : t,
59
- copyToClipboardFocusMode: "light",
60
- footer: u,
61
- className: E,
62
- contentClassName: L,
63
- noMaxWidth: !0,
64
- children: r
65
- }
66
- );
67
- }
68
- );
69
- export {
70
- K as default
71
- };