@floegence/floe-webapp-core 0.86.38 → 0.86.40

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/dist/chat.css CHANGED
@@ -365,12 +365,39 @@
365
365
  }
366
366
 
367
367
  .chat-md-inline-code {
368
- padding: 0.125rem 0.375rem;
368
+ padding: 0.12em 0.36em;
369
+ border: 0;
369
370
  border-radius: 0.25rem;
370
- background-color: color-mix(in srgb, var(--muted) 70%, transparent);
371
+ background-color: var(--inline-code-background);
372
+ color: var(--inline-code-foreground);
371
373
  font-family: var(--font-mono);
372
- font-size: 0.6875rem;
373
- color: var(--primary);
374
+ font-size: 0.91em;
375
+ font-weight: 400;
376
+ line-height: inherit;
377
+ white-space: break-spaces;
378
+ overflow-wrap: anywhere;
379
+ word-break: normal;
380
+ -webkit-box-decoration-break: clone;
381
+ box-decoration-break: clone;
382
+ }
383
+
384
+ .chat-container .chat-md-inline-code::selection,
385
+ .chat-message-bubble-user .chat-md-inline-code::selection {
386
+ background-color: var(--inline-code-foreground);
387
+ color: var(--inline-code-background);
388
+ }
389
+
390
+ @media (forced-colors: active) {
391
+ .chat-md-inline-code {
392
+ background-color: Canvas;
393
+ color: CanvasText;
394
+ }
395
+
396
+ .chat-container .chat-md-inline-code::selection,
397
+ .chat-message-bubble-user .chat-md-inline-code::selection {
398
+ background-color: Highlight;
399
+ color: HighlightText;
400
+ }
374
401
  }
375
402
 
376
403
  /* Markdown code blocks - always dark background
@@ -1,17 +1,18 @@
1
1
  import { createComponent as v, spread as ue, mergeProps as fe, insert as f, effect as y, className as k, setStyleProperty as ae, memo as le, use as ie, setAttribute as p, template as w, delegateEvents as Re } from "solid-js/web";
2
- import { splitProps as ve, Show as B, createSignal as L, untrack as de, createEffect as X, For as Te, onCleanup as ce } from "solid-js";
2
+ import { splitProps as ve, Show as B, createSignal as L, untrack as de, createEffect as X, onCleanup as ce } from "solid-js";
3
3
  import { cn as g } from "../../utils/cn.js";
4
4
  import { deferAfterPaint as _ } from "../../utils/defer.js";
5
+ import { KeyedFor as Te } from "./KeyedFor.js";
5
6
  import { createUIFirstSelection as ze } from "../../utils/uiFirstSelection.js";
6
7
  import { useViewActivation as Ee } from "../../context/ViewActivationContext.js";
7
8
  import { X as He, Plus as Pe, ChevronRight as De } from "../icons/index.js";
8
- var Me = /* @__PURE__ */ w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), _e = /* @__PURE__ */ w('<button type=button aria-label="Scroll left">'), Oe = /* @__PURE__ */ w("<div>"), We = /* @__PURE__ */ w('<button type=button aria-label="Add new tab">'), Fe = /* @__PURE__ */ w('<button type=button aria-label="Scroll right">'), je = /* @__PURE__ */ w("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), Ge = /* @__PURE__ */ w("<span class=flex-shrink-0>"), Ue = /* @__PURE__ */ w("<button type=button>"), Xe = /* @__PURE__ */ w('<div role=tab data-floe-surface-part=tab><span class="truncate max-w-32">'), Ve = /* @__PURE__ */ w("<div role=tabpanel>");
9
- const V = {
9
+ var Me = /* @__PURE__ */ w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), _e = /* @__PURE__ */ w('<button type=button aria-label="Scroll left">'), Oe = /* @__PURE__ */ w("<div>"), We = /* @__PURE__ */ w('<button type=button aria-label="Add new tab">'), Fe = /* @__PURE__ */ w('<button type=button aria-label="Scroll right">'), je = /* @__PURE__ */ w("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), Ge = /* @__PURE__ */ w("<span class=flex-shrink-0>"), Ue = /* @__PURE__ */ w("<button type=button>"), Xe = /* @__PURE__ */ w('<div role=tab data-floe-surface-part=tab><span class="truncate max-w-32">'), Ke = /* @__PURE__ */ w("<div role=tabpanel>");
10
+ const K = {
10
11
  x: 0,
11
12
  width: 0,
12
13
  visible: !1
13
14
  };
14
- function qe(i, e, h) {
15
+ function Ve(i, e, h) {
15
16
  const d = i.filter((x) => !x.disabled);
16
17
  if (!d.length) return null;
17
18
  const C = d.findIndex((x) => x.id === e);
@@ -37,7 +38,7 @@ function qe(i, e, h) {
37
38
  }
38
39
  return d[b]?.id ?? null;
39
40
  }
40
- function Ke(i) {
41
+ function qe(i) {
41
42
  return i === 1 || i === 2 || i === 3 || i === 4 ? i : 2;
42
43
  }
43
44
  function Ye(i) {
@@ -105,18 +106,18 @@ function Ze(i) {
105
106
  visible: z > 0
106
107
  };
107
108
  }
108
- function it(i) {
109
- const [e, h] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), d = () => e.features?.indicator?.mode ?? "activeBorder", C = () => Ke(e.features?.indicator?.thicknessPx), b = () => e.features?.indicator?.colorToken ?? "primary", x = () => e.features?.indicator?.animated ?? !0, R = () => e.features?.containerBorder ?? !0, I = () => e.features?.scrollButtons ?? "auto", T = () => e.features?.closeButton?.dangerHover ?? !0, z = () => e.features?.closeButton?.enabledByDefault ?? e.closable ?? !1, he = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, q = () => Ye(C()), O = () => Je(b());
109
+ function dt(i) {
110
+ const [e, h] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), d = () => e.features?.indicator?.mode ?? "activeBorder", C = () => qe(e.features?.indicator?.thicknessPx), b = () => e.features?.indicator?.colorToken ?? "primary", x = () => e.features?.indicator?.animated ?? !0, R = () => e.features?.containerBorder ?? !0, I = () => e.features?.scrollButtons ?? "auto", T = () => e.features?.closeButton?.dangerHover ?? !0, z = () => e.features?.closeButton?.enabledByDefault ?? e.closable ?? !1, he = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, V = () => Ye(C()), O = () => Je(b());
110
111
  let u;
111
- const K = (() => {
112
+ const q = (() => {
112
113
  try {
113
114
  return Ee();
114
115
  } catch {
115
116
  return null;
116
117
  }
117
- })(), S = () => K ? K.active() : !0;
118
+ })(), S = () => q ? q.active() : !0;
118
119
  let W = !1;
119
- const [E, F] = L(V), H = /* @__PURE__ */ new Map();
120
+ const [E, F] = L(K), H = /* @__PURE__ */ new Map();
120
121
  let j = !1;
121
122
  const P = () => d() === "slider", Y = (s) => {
122
123
  if (!u || !P()) return !1;
@@ -129,10 +130,10 @@ function it(i) {
129
130
  return F(a), a.visible;
130
131
  }, be = () => {
131
132
  if (!P()) {
132
- F(V);
133
+ F(K);
133
134
  return;
134
135
  }
135
- Y(G()) || F(V);
136
+ Y(G()) || F(K);
136
137
  }, D = () => {
137
138
  j || (j = !0, _(() => {
138
139
  j = !1, de(() => {
@@ -200,7 +201,7 @@ function it(i) {
200
201
  inline: "nearest"
201
202
  });
202
203
  }, Ae = (s, o) => {
203
- const a = qe(e.items, o.id, s.key);
204
+ const a = Ve(e.items, o.id, s.key);
204
205
  a && (s.preventDefault(), Se(a));
205
206
  }, $e = (s, o) => {
206
207
  s.stopPropagation();
@@ -216,7 +217,7 @@ function it(i) {
216
217
  const c = d();
217
218
  return c === "none" || c === "slider" && E().visible ? "border-transparent" : O().tabBorderClass;
218
219
  })();
219
- return g(a, t, Ne[e.size ?? "md"], "rounded-t", q().tabBorderClass, s ? g(r, "text-foreground bg-background", e.slotClassNames?.tabActive) : g("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", e.slotClassNames?.tabInactive), o && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", e.slotClassNames?.tab);
220
+ return g(a, t, Ne[e.size ?? "md"], "rounded-t", V().tabBorderClass, s ? g(r, "text-foreground bg-background", e.slotClassNames?.tabActive) : g("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", e.slotClassNames?.tabInactive), o && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", e.slotClassNames?.tab);
220
221
  };
221
222
  return (() => {
222
223
  var s = je(), o = s.firstChild;
@@ -249,7 +250,7 @@ function it(i) {
249
250
  get children() {
250
251
  var t = Oe();
251
252
  return y((r) => {
252
- var c = g("pointer-events-none absolute bottom-0 left-0 z-10", q().sliderHeightClass, O().sliderBgClass, x() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), l = `translate3d(${E().x}px, 0, 0)`, A = `${E().width}px`;
253
+ var c = g("pointer-events-none absolute bottom-0 left-0 z-10", V().sliderHeightClass, O().sliderBgClass, x() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), l = `translate3d(${E().x}px, 0, 0)`, A = `${E().width}px`;
253
254
  return c !== r.e && k(t, r.e = c), l !== r.t && ae(t, "transform", r.t = l), A !== r.a && ae(t, "width", r.a = A), r;
254
255
  }, {
255
256
  e: void 0,
@@ -261,36 +262,37 @@ function it(i) {
261
262
  get each() {
262
263
  return e.items;
263
264
  },
265
+ by: (t) => t.id,
264
266
  children: (t) => {
265
- const r = () => t.id === G(), c = () => t.closable ?? z();
267
+ const r = () => t().id === G(), c = () => t().closable ?? z();
266
268
  return (() => {
267
269
  var l = Xe(), A = l.firstChild;
268
270
  return l.$$keydown = (n) => {
269
271
  if (n.key === "Enter" || n.key === " ") {
270
- n.preventDefault(), U(t.id, t.disabled);
272
+ n.preventDefault(), U(t().id, t().disabled);
271
273
  return;
272
274
  }
273
- Ae(n, t);
274
- }, l.$$click = () => U(t.id, t.disabled), ie((n) => {
275
- H.set(t.id, n), ce(() => H.delete(t.id));
275
+ Ae(n, t());
276
+ }, l.$$click = () => U(t().id, t().disabled), ie((n) => {
277
+ H.set(t().id, n), ce(() => H.delete(t().id));
276
278
  }, l), f(l, v(B, {
277
279
  get when() {
278
- return t.icon;
280
+ return t().icon;
279
281
  },
280
282
  get children() {
281
283
  var n = Ge();
282
- return f(n, () => t.icon), n;
284
+ return f(n, () => t().icon), n;
283
285
  }
284
- }), A), f(A, () => t.label), f(l, v(B, {
286
+ }), A), f(A, () => t().label), f(l, v(B, {
285
287
  get when() {
286
- return le(() => !!c())() && !t.disabled;
288
+ return le(() => !!c())() && !t().disabled;
287
289
  },
288
290
  get children() {
289
291
  var n = Ue();
290
- return n.$$click = (m) => $e(m, t.id), f(n, v(He, {
292
+ return n.$$click = (m) => $e(m, t().id), f(n, v(He, {
291
293
  class: "w-3 h-3"
292
294
  })), y((m) => {
293
- var $ = g("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", T() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-120", "ml-1.5", e.slotClassNames?.closeButton), N = `Close ${t.label}`;
295
+ var $ = g("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", T() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-120", "ml-1.5", e.slotClassNames?.closeButton), N = `Close ${t().label}`;
294
296
  return $ !== m.e && k(n, m.e = $), N !== m.t && p(n, "aria-label", m.t = N), m;
295
297
  }, {
296
298
  e: void 0,
@@ -298,7 +300,7 @@ function it(i) {
298
300
  }), n;
299
301
  }
300
302
  }), null), y((n) => {
301
- var m = Le(r(), t.disabled), $ = t.domId, N = t.panelId, re = r() ? "raised" : "flat", oe = r(), ne = t.disabled, se = t.disabled ? -1 : r() ? 0 : -1;
303
+ var m = Le(r(), t().disabled), $ = t().domId, N = t().panelId, re = r() ? "raised" : "flat", oe = r(), ne = t().disabled, se = t().disabled ? -1 : r() ? 0 : -1;
302
304
  return m !== n.e && k(l, n.e = m), $ !== n.t && p(l, "id", n.t = $), N !== n.a && p(l, "aria-controls", n.a = N), re !== n.o && p(l, "data-floe-surface", n.o = re), oe !== n.i && p(l, "aria-selected", n.i = oe), ne !== n.n && p(l, "aria-disabled", n.n = ne), se !== n.s && p(l, "tabindex", n.s = se), n;
303
305
  }, {
304
306
  e: void 0,
@@ -357,14 +359,14 @@ function it(i) {
357
359
  }), s;
358
360
  })();
359
361
  }
360
- function dt(i) {
362
+ function ct(i) {
361
363
  const [e, h] = ve(i, ["active", "keepMounted", "labelledBy", "class", "children"]);
362
364
  return v(B, {
363
365
  get when() {
364
366
  return e.keepMounted || e.active;
365
367
  },
366
368
  get children() {
367
- var d = Ve();
369
+ var d = Ke();
368
370
  return ue(d, fe({
369
371
  get "aria-labelledby"() {
370
372
  return e.labelledBy;
@@ -384,7 +386,7 @@ function dt(i) {
384
386
  }
385
387
  Re(["click", "keydown"]);
386
388
  export {
387
- dt as TabPanel,
388
- it as Tabs,
389
- qe as resolveTabNavigationTargetId
389
+ ct as TabPanel,
390
+ dt as Tabs,
391
+ Ve as resolveTabNavigationTargetId
390
392
  };
@@ -3,6 +3,8 @@ export declare const CLASSIC_LIGHT_CSS_TOKENS: {
3
3
  '--floe-window-titlebar-background': "var(--popover)";
4
4
  '--background': "#f8f7f2";
5
5
  '--foreground': "#303a34";
6
+ '--inline-code-foreground': "#4C6544";
7
+ '--inline-code-background': "#EAEBE4";
6
8
  '--primary': "#465a43";
7
9
  '--primary-foreground': "#f8faf5";
8
10
  '--secondary': "#eeefe8";
@@ -74,6 +76,8 @@ export declare const CLASSIC_DARK_CSS_TOKENS: {
74
76
  '--floe-window-titlebar-background': "var(--popover)";
75
77
  '--background': "#202223";
76
78
  '--foreground': "#e5e6e2";
79
+ '--inline-code-foreground': "#BBC9AF";
80
+ '--inline-code-background': "#2E3130";
77
81
  '--primary': "#bccbb8";
78
82
  '--primary-foreground': "#20291f";
79
83
  '--secondary': "#303435";
@@ -1,22 +1,24 @@
1
1
  import { createProgressTokens as b } from "./progressTokens.js";
2
- import { LIGHT_WINDOW_TOKENS as l, DARK_WINDOW_TOKENS as h } from "./windowTokens.js";
2
+ import { LIGHT_WINDOW_TOKENS as l, DARK_WINDOW_TOKENS as g } from "./windowTokens.js";
3
3
  function f(c) {
4
4
  const a = {}, n = (r, o = /* @__PURE__ */ new Set()) => {
5
5
  const e = c[r];
6
6
  if (!e || o.has(r)) return e;
7
- const t = /^var\((--[\w-]+)\)$/u.exec(e)?.[1];
8
- return t ? (o.add(r), n(t, o)) : e;
7
+ const i = /^var\((--[\w-]+)\)$/u.exec(e)?.[1];
8
+ return i ? (o.add(r), n(i, o)) : e;
9
9
  };
10
10
  for (const r of Object.keys(c))
11
11
  a[r] = n(r);
12
12
  return Object.freeze(a);
13
13
  }
14
- const i = {
14
+ const d = {
15
15
  ...l,
16
16
  "--floe-window-background": "var(--popover)",
17
17
  "--floe-window-titlebar-background": "var(--popover)",
18
18
  "--background": "#f8f7f2",
19
19
  "--foreground": "#303a34",
20
+ "--inline-code-foreground": "#4C6544",
21
+ "--inline-code-background": "#EAEBE4",
20
22
  "--primary": "#465a43",
21
23
  "--primary-foreground": "#f8faf5",
22
24
  "--secondary": "#eeefe8",
@@ -78,12 +80,14 @@ const i = {
78
80
  "--selection-code-bg": "hsl(212 100% 67%)",
79
81
  "--selection-code-fg": "hsl(220 20% 8%)",
80
82
  "--glow": "#465a43"
81
- }, d = {
82
- ...h,
83
+ }, t = {
84
+ ...g,
83
85
  "--floe-window-background": "var(--popover)",
84
86
  "--floe-window-titlebar-background": "var(--popover)",
85
87
  "--background": "#202223",
86
88
  "--foreground": "#e5e6e2",
89
+ "--inline-code-foreground": "#BBC9AF",
90
+ "--inline-code-background": "#2E3130",
87
91
  "--primary": "#bccbb8",
88
92
  "--primary-foreground": "#20291f",
89
93
  "--secondary": "#303435",
@@ -145,10 +149,10 @@ const i = {
145
149
  "--selection-code-bg": "hsl(212 100% 67%)",
146
150
  "--selection-code-fg": "hsl(220 20% 8%)",
147
151
  "--glow": "hsl(217 65% 52%)"
148
- }, g = { ...i, ...b("light", i) }, s = { ...d, ...b("dark", d) }, p = f(g), v = f(s);
152
+ }, h = { ...d, ...b("light", d) }, s = { ...t, ...b("dark", t) }, p = f(h), v = f(s);
149
153
  export {
150
154
  s as CLASSIC_DARK_CSS_TOKENS,
151
155
  v as CLASSIC_DARK_SEMANTIC_TOKENS,
152
- g as CLASSIC_LIGHT_CSS_TOKENS,
156
+ h as CLASSIC_LIGHT_CSS_TOKENS,
153
157
  p as CLASSIC_LIGHT_SEMANTIC_TOKENS
154
158
  };
@@ -6,7 +6,7 @@ export interface FloeShellThemeSelection {
6
6
  dark?: string;
7
7
  }
8
8
  export type FloeShellThemeDefaults = Partial<Record<FloeShellThemeMode, string>>;
9
- type ShellThemeTokenName = '--floe-window-background' | '--floe-window-foreground' | '--floe-window-muted-foreground' | '--floe-window-titlebar-background' | '--floe-window-border' | '--floe-window-shadow' | '--background' | '--foreground' | '--primary' | '--primary-foreground' | '--secondary' | '--secondary-foreground' | '--muted' | '--muted-foreground' | '--accent' | '--accent-foreground' | '--border' | '--input' | '--ring' | '--chrome-border' | '--top-bar-border' | '--activity-bar-border' | '--bottom-bar-border' | '--terminal-panel-border' | '--card' | '--card-foreground' | '--popover' | '--popover-foreground' | '--success' | '--success-foreground' | '--warning' | '--warning-foreground' | '--error' | '--error-foreground' | '--info' | '--info-foreground' | '--highlight-block-info-accent' | '--highlight-block-warning-accent' | '--highlight-block-success-accent' | '--highlight-block-error-accent' | '--highlight-block-note-accent' | '--highlight-block-tip-accent' | '--sidebar' | '--sidebar-foreground' | '--sidebar-primary' | '--sidebar-primary-foreground' | '--sidebar-accent' | '--sidebar-accent-foreground' | '--sidebar-border' | '--sidebar-ring' | '--activity-bar' | '--activity-bar-foreground' | '--activity-bar-foreground-active' | '--activity-bar-badge' | '--activity-bar-badge-foreground' | '--terminal-background' | '--terminal-foreground' | '--chart-1' | '--chart-2' | '--chart-3' | '--chart-4' | '--chart-5' | '--selection-bg' | '--selection-fg' | '--selection-on-primary-bg' | '--selection-on-primary-fg' | '--selection-code-bg' | '--selection-code-fg' | '--glow';
9
+ type ShellThemeTokenName = '--floe-window-background' | '--floe-window-foreground' | '--floe-window-muted-foreground' | '--floe-window-titlebar-background' | '--floe-window-border' | '--floe-window-shadow' | '--background' | '--foreground' | '--inline-code-foreground' | '--inline-code-background' | '--primary' | '--primary-foreground' | '--secondary' | '--secondary-foreground' | '--muted' | '--muted-foreground' | '--accent' | '--accent-foreground' | '--border' | '--input' | '--ring' | '--chrome-border' | '--top-bar-border' | '--activity-bar-border' | '--bottom-bar-border' | '--terminal-panel-border' | '--card' | '--card-foreground' | '--popover' | '--popover-foreground' | '--success' | '--success-foreground' | '--warning' | '--warning-foreground' | '--error' | '--error-foreground' | '--info' | '--info-foreground' | '--highlight-block-info-accent' | '--highlight-block-warning-accent' | '--highlight-block-success-accent' | '--highlight-block-error-accent' | '--highlight-block-note-accent' | '--highlight-block-tip-accent' | '--sidebar' | '--sidebar-foreground' | '--sidebar-primary' | '--sidebar-primary-foreground' | '--sidebar-accent' | '--sidebar-accent-foreground' | '--sidebar-border' | '--sidebar-ring' | '--activity-bar' | '--activity-bar-foreground' | '--activity-bar-foreground-active' | '--activity-bar-badge' | '--activity-bar-badge-foreground' | '--terminal-background' | '--terminal-foreground' | '--chart-1' | '--chart-2' | '--chart-3' | '--chart-4' | '--chart-5' | '--selection-bg' | '--selection-fg' | '--selection-on-primary-bg' | '--selection-on-primary-fg' | '--selection-code-bg' | '--selection-code-fg' | '--glow';
10
10
  export declare const REQUIRED_SHELL_THEME_TOKENS: readonly ShellThemeTokenName[];
11
11
  interface ShellThemePaletteDefinition {
12
12
  name: string;
@@ -15,6 +15,11 @@ interface ShellThemePaletteDefinition {
15
15
  mode: FloeShellThemeMode;
16
16
  background: string;
17
17
  foreground: string;
18
+ /** Paired colors for inline code on reading surfaces. */
19
+ inlineCode?: {
20
+ foreground: string;
21
+ background: string;
22
+ };
18
23
  card: string;
19
24
  muted: string;
20
25
  accent?: string;