agentglow 0.3.2 → 0.4.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.
@@ -1,48 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { createContext as b, useContext as v, useMemo as w, Suspense as S, lazy as A } from "react";
3
- const m = (e) => (e ?? "").trim().replace(/\/+$/, "");
4
- function C() {
5
- var t, o;
6
- const e = typeof location > "u" ? new URLSearchParams() : new URLSearchParams(location.search), n = (a) => e.has(a) && !["0", "false", "no"].includes(e.get(a).toLowerCase());
7
- return {
8
- source: m(e.get("source")),
9
- sim: ((t = e.get("sim")) == null ? void 0 : t.toLowerCase()) === "hf" ? "hf" : n("sim"),
10
- hud: e.get("hud") === null ? !0 : n("hud"),
11
- embedded: !1,
12
- run: ((o = e.get("run")) == null ? void 0 : o.trim()) || void 0
13
- };
14
- }
15
- const d = b(null), E = d.Provider;
16
- function F() {
17
- return v(d) ?? C();
18
- }
19
- const L = ["neural", "constellation", "orbit", "atom", "flow"], T = {
20
- orbit: { name: "Orbit", tagline: "Agents orbit a graph galaxy; runs are rings, MCP servers are satellites." },
21
- neural: { name: "Neural", tagline: "A living brain: agents fire as neurons, messages pulse along synapses." },
22
- flow: { name: "Flow", tagline: "A murmuration: agents condense as eddies out of the current." },
23
- constellation: { name: "Constellation", tagline: "A night sky: agents are stars linked into constellations as they delegate." },
24
- atom: { name: "Atom", tagline: "An atom: agents are electrons in shells, subagents jump orbits, LLM calls flash photons." }
25
- }, M = {
26
- orbit: () => import("./index-D-egBmZU.js"),
27
- neural: () => import("./index-DZvO9oiI.js"),
28
- flow: () => import("./index-B2VQ34Za.js"),
29
- constellation: () => import("./index-CpXj5lT0.js"),
30
- atom: () => import("./index-CHJsMIrM.js")
31
- }, g = /* @__PURE__ */ new Map();
32
- function x(e) {
33
- let n = g.get(e);
34
- return n || g.set(e, n = A(M[e])), n;
35
- }
36
- function H({ theme: e = "neural", source: n = "", hud: t = !0, sim: o = !1, scope: a, run: r, token: l, style: f, className: i }) {
37
- const c = L.includes(e) ? e : "neural", h = x(c), u = m(n), p = w(
38
- () => ({ source: u, sim: o, hud: t, embedded: !0, scope: a || void 0, run: r || void 0, token: l || void 0 }),
39
- [u, o, t, a, r, l]
40
- );
41
- return /* @__PURE__ */ s("div", { className: `agentglow-embed${i ? ` ${i}` : ""}`, style: f, "data-theme": c, children: /* @__PURE__ */ s(E, { value: p, children: /* @__PURE__ */ s(S, { fallback: null, children: /* @__PURE__ */ s(h, {}) }) }) });
42
- }
43
- export {
44
- H as A,
45
- L as T,
46
- T as a,
47
- F as u
48
- };