@kapiuara/ui 0.5.0 → 0.7.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.
Files changed (74) hide show
  1. package/README.md +123 -5
  2. package/dist/components/chat/KapiChatDivider.d.ts +15 -0
  3. package/dist/components/chat/KapiChatDivider.js +17 -0
  4. package/dist/components/chat/KapiChatList.d.ts +57 -0
  5. package/dist/components/chat/KapiChatList.js +71 -0
  6. package/dist/components/chat/KapiChatThread.d.ts +35 -0
  7. package/dist/components/chat/KapiChatThread.js +85 -0
  8. package/dist/components/chat/KapiComposer.d.ts +60 -0
  9. package/dist/components/chat/KapiComposer.js +91 -0
  10. package/dist/components/chat/KapiMessageBubble.d.ts +43 -0
  11. package/dist/components/chat/KapiMessageBubble.js +67 -0
  12. package/dist/components/chat/KapiTypingIndicator.d.ts +27 -0
  13. package/dist/components/chat/KapiTypingIndicator.js +34 -0
  14. package/dist/components/chat/chatLogic.d.ts +76 -0
  15. package/dist/components/chat/chatLogic.js +34 -0
  16. package/dist/components/chat/index.d.ts +14 -0
  17. package/dist/components/data/KapiTable.d.ts +25 -1
  18. package/dist/components/data/KapiTable.js +408 -390
  19. package/dist/components/data/index.d.ts +1 -1
  20. package/dist/components/data/tableLogic.d.ts +7 -0
  21. package/dist/components/data/tableLogic.js +21 -16
  22. package/dist/components/display/KapiCommentComposer.d.ts +4 -0
  23. package/dist/components/display/KapiCommentComposer.js +43 -46
  24. package/dist/components/display/commentLogic.d.ts +9 -2
  25. package/dist/components/display/commentLogic.js +1 -1
  26. package/dist/components/display/index.d.ts +1 -0
  27. package/dist/components/inputs/KapiButton.d.ts +9 -2
  28. package/dist/components/inputs/KapiButton.js +25 -15
  29. package/dist/components/inputs/KapiFacetedSearch.d.ts +29 -5
  30. package/dist/components/inputs/KapiFacetedSearch.js +161 -119
  31. package/dist/components/inputs/KapiSegmented.d.ts +2 -1
  32. package/dist/components/inputs/KapiSegmented.js +45 -44
  33. package/dist/components/inputs/facetedSearchLogic.d.ts +40 -9
  34. package/dist/components/inputs/facetedSearchLogic.js +38 -20
  35. package/dist/components/inputs/index.d.ts +2 -2
  36. package/dist/components/layout/KapiPanelParts.js +9 -9
  37. package/dist/components/layout/KapiRail.d.ts +1 -1
  38. package/dist/components/layout/KapiRail.js +60 -53
  39. package/dist/components/layout/KapiShell.d.ts +9 -2
  40. package/dist/components/layout/KapiShell.js +22 -22
  41. package/dist/components/locale/labelRegistry.d.ts +10 -0
  42. package/dist/components/navigation/KapiContextPanel.js +86 -86
  43. package/dist/components/navigation/KapiPanelGroup.js +18 -18
  44. package/dist/components/navigation/KapiTabs.d.ts +3 -1
  45. package/dist/components/navigation/KapiTabs.js +47 -46
  46. package/dist/components/navigation/MiniNavItem.js +1 -1
  47. package/dist/components/overlays/KapiCanvasForm.js +2 -6
  48. package/dist/components/overlays/KapiConfirm.js +1 -6
  49. package/dist/hooks/colorLogic.d.ts +26 -0
  50. package/dist/hooks/colorLogic.js +53 -0
  51. package/dist/hooks/dateFormat.d.ts +7 -0
  52. package/dist/hooks/dateFormat.js +16 -2
  53. package/dist/hooks/index.d.ts +7 -1
  54. package/dist/hooks/numberFormatLogic.d.ts +6 -0
  55. package/dist/hooks/numberFormatLogic.js +7 -0
  56. package/dist/hooks/rightClick.d.ts +10 -0
  57. package/dist/hooks/rightClick.js +10 -4
  58. package/dist/hooks/themeColorsLogic.d.ts +11 -0
  59. package/dist/hooks/themeColorsLogic.js +37 -0
  60. package/dist/hooks/themeContrastLogic.d.ts +23 -0
  61. package/dist/hooks/themeContrastLogic.js +46 -0
  62. package/dist/hooks/themeDeriveLogic.d.ts +52 -0
  63. package/dist/hooks/themeDeriveLogic.js +103 -0
  64. package/dist/hooks/useDragScroll.js +26 -23
  65. package/dist/hooks/useGlobalRightClick.js +28 -25
  66. package/dist/hooks/useKapiTheme.d.ts +28 -4
  67. package/dist/hooks/useKapiTheme.js +82 -50
  68. package/dist/hooks/useSubmitDraft.d.ts +34 -0
  69. package/dist/hooks/useSubmitDraft.js +28 -0
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.js +129 -119
  72. package/dist/kapi.css +1 -1
  73. package/dist/kapi.layered.css +1 -1
  74. package/package.json +3 -3
@@ -1,42 +1,60 @@
1
1
  import { normalizeFilterText as e } from "../data/tableLogic.js";
2
2
  //#region src/components/inputs/facetedSearchLogic.ts
3
- var t = (t, n) => !n || e(t).includes(n);
4
- function n(n, r, i, a) {
5
- let o = e(i);
6
- if (r) return r.kind === "list" ? a ? a.map((e) => ({
7
- type: "option",
8
- option: e
9
- })) : (r.options ?? []).filter((e) => t(e.label, o)).map((e) => ({
10
- type: "option",
11
- option: e
12
- })) : [];
13
- let s = i.trim(), c = s ? [{
3
+ var t = (e) => e.operators && e.operators.length > 0 ? e.operators : ["eq"], n = (e, t) => {
4
+ let n = e.operator && e.operator !== "eq" && t ? `${e.label} ${t}` : e.label;
5
+ return e.value !== void 0 && e.value.trim() !== "" ? `${n}: ${e.value}` : n;
6
+ }, r = (t, n) => !n || e(t).includes(n);
7
+ function i(n, i, a, o, s) {
8
+ let c = e(a);
9
+ if (i) {
10
+ let e = t(i);
11
+ if (e.length >= 2 && !s) return e.map((e) => ({
12
+ type: "operator",
13
+ operator: e,
14
+ facet: i
15
+ }));
16
+ if (i.kind === "text") {
17
+ let e = a.trim();
18
+ return e ? [{
19
+ type: "text",
20
+ text: e
21
+ }] : [];
22
+ }
23
+ return i.kind === "list" ? o ? o.map((e) => ({
24
+ type: "option",
25
+ option: e
26
+ })) : (i.options ?? []).filter((e) => r(e.label, c)).map((e) => ({
27
+ type: "option",
28
+ option: e
29
+ })) : [];
30
+ }
31
+ let l = a.trim(), u = l ? [{
14
32
  type: "text",
15
- text: s
33
+ text: l
16
34
  }] : [];
17
- for (let e of n) t(e.label, o) && c.push({
35
+ for (let e of n) r(e.label, c) && u.push({
18
36
  type: "facet",
19
37
  facet: e
20
38
  });
21
- return c;
39
+ return u;
22
40
  }
23
- var r = (e, t, n) => t === 0 ? -1 : e < 0 ? n > 0 ? 0 : t - 1 : (e + n + t) % t;
24
- function i(e, t) {
41
+ var a = (e, t, n) => t === 0 ? -1 : e < 0 ? n > 0 ? 0 : t - 1 : (e + n + t) % t;
42
+ function o(e, t) {
25
43
  switch (e) {
26
44
  case "ArrowDown": return "next";
27
45
  case "ArrowUp": return "prev";
28
- case "Enter": return t.open && t.active >= 0 ? "select" : !t.pending && t.input.trim() ? "text" : null;
46
+ case "Enter": return t.open && t.active >= 0 ? "select" : (!t.pending || t.pendingText) && t.input.trim() ? "text" : null;
29
47
  case "Escape": return t.pending ? "cancel" : t.open ? "close" : null;
30
48
  case "Backspace": return t.input === "" ? t.pending ? "dropPending" : t.chips > 0 ? "removeLast" : null : null;
31
49
  default: return null;
32
50
  }
33
51
  }
34
- var a = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, o = (e, t) => `${a(e)}/${a(t)}`, s = (e) => {
52
+ var s = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, c = (e, t) => `${s(e)}/${s(t)}`, l = (e) => {
35
53
  let t = /^(\d{4}-\d{2}-\d{2})\/(\d{4}-\d{2}-\d{2})$/.exec(e);
36
54
  return t ? {
37
55
  from: t[1],
38
56
  to: t[2]
39
57
  } : null;
40
- }, c = (e) => e.count === void 0 ? e.label : `${e.label}, ${e.count}`, l = (e) => e?.kind === "date" || e?.kind === "dateRange";
58
+ }, u = (e) => e.count === void 0 ? e.label : `${e.label}, ${e.count}`, d = (e) => e?.kind === "date" || e?.kind === "dateRange";
41
59
  //#endregion
42
- export { i as facetKeyAction, n as facetMenuItems, c as facetOptionName, l as isDateFacet, r as moveActive, s as parseDateRangeValue, o as toDateRangeValue, a as toDateValue };
60
+ export { n as facetChipText, o as facetKeyAction, i as facetMenuItems, t as facetOperators, u as facetOptionName, d as isDateFacet, a as moveActive, l as parseDateRangeValue, c as toDateRangeValue, s as toDateValue };
@@ -51,5 +51,5 @@ export { KapiAutocomplete, DEFAULT_AUTOCOMPLETE_LABELS } from "./KapiAutocomplet
51
51
  export type { KapiAutocompleteLabels, KapiAutocompleteProps, KapiAutocompleteRenderContext } from "./KapiAutocomplete";
52
52
  export { KapiFacetedSearch, DEFAULT_FACETED_SEARCH_LABELS } from "./KapiFacetedSearch";
53
53
  export type { KapiFacetedSearchLabels, KapiFacetedSearchProps } from "./KapiFacetedSearch";
54
- export { facetKeyAction, facetMenuItems, parseDateRangeValue, toDateRangeValue, toDateValue } from "./facetedSearchLogic";
55
- export type { KapiFacet, KapiFacetChip, KapiFacetKind, KapiFacetOption, KapiFacetKeyAction, KapiFacetMenuItem } from "./facetedSearchLogic";
54
+ export { facetKeyAction, facetMenuItems, facetOperators, parseDateRangeValue, toDateRangeValue, toDateValue } from "./facetedSearchLogic";
55
+ export type { KapiFacet, KapiFacetChip, KapiFacetKind, KapiFacetOption, KapiFacetKeyAction, KapiFacetMenuItem, KapiFacetOperator } from "./facetedSearchLogic";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { joinClasses as e } from "../rootProps.js";
3
- import { CtxSlidingList as t } from "../navigation/CtxSlidingList.js";
4
3
  import "../navigation/navBadgeLogic.js";
5
- import { KapiNavBadge as n } from "../navigation/KapiNavBadge.js";
4
+ import { KapiNavBadge as t } from "../navigation/KapiNavBadge.js";
5
+ import { CtxSlidingList as n } from "../navigation/CtxSlidingList.js";
6
6
  import { useKapiPanelMini as r } from "../navigation/panelMini.js";
7
7
  import { MiniNavItem as i } from "../navigation/MiniNavItem.js";
8
8
  /* empty css */
@@ -17,10 +17,10 @@ var s = ({ className: t, ...n }) => /* @__PURE__ */ a("div", {
17
17
  }), l = ({ className: t, ...n }) => /* @__PURE__ */ a("div", {
18
18
  ...n,
19
19
  className: e("kapi-hint", t)
20
- }), u = ({ children: e, ...n }) => /* @__PURE__ */ a(t, {
21
- ...n,
20
+ }), u = ({ children: e, ...t }) => /* @__PURE__ */ a(n, {
21
+ ...t,
22
22
  children: e
23
- }), d = ({ active: t = !1, trailing: s, badge: c, badgeTone: l, badgeLabel: u, icon: d, className: f, type: p = "button", children: m, ...h }) => {
23
+ }), d = ({ active: n = !1, trailing: s, badge: c, badgeTone: l, badgeLabel: u, icon: d, className: f, type: p = "button", children: m, ...h }) => {
24
24
  let { mini: g } = r();
25
25
  return g ? /* @__PURE__ */ a(i, {
26
26
  ...h,
@@ -28,15 +28,15 @@ var s = ({ className: t, ...n }) => /* @__PURE__ */ a("div", {
28
28
  className: f,
29
29
  label: m,
30
30
  icon: d,
31
- active: t,
31
+ active: n,
32
32
  badge: c,
33
33
  badgeTone: l,
34
34
  badgeLabel: u
35
35
  }) : /* @__PURE__ */ o("button", {
36
36
  ...h,
37
37
  type: p,
38
- className: e("kapi-ctxitem", t && "kapi-ctxitem--on", f),
39
- "aria-current": t ? "page" : void 0,
38
+ className: e("kapi-ctxitem", n && "kapi-ctxitem--on", f),
39
+ "aria-current": n ? "page" : void 0,
40
40
  children: [
41
41
  d == null || d === !1 ? m : /* @__PURE__ */ o("span", {
42
42
  className: "kapi-ctxitem__lead",
@@ -49,7 +49,7 @@ var s = ({ className: t, ...n }) => /* @__PURE__ */ a("div", {
49
49
  children: m
50
50
  })]
51
51
  }),
52
- /* @__PURE__ */ a(n, {
52
+ /* @__PURE__ */ a(t, {
53
53
  value: c,
54
54
  tone: l,
55
55
  label: u,
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes, ReactNode } from "react";
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
2
  import { type KapiRailEntry, type KapiRailItem, type KapiRailPinned, type KapiRailSeparator, type KapiRailZone, type KapiRailVariant } from "./railLogic";
3
3
  import "./KapiRail.css";
4
4
  import { type KapiLinkLabels } from "../locale/linkLabels";
@@ -3,100 +3,107 @@ import { useLabels as e } from "../locale/KapiLocaleProvider.js";
3
3
  import { joinClasses as t } from "../rootProps.js";
4
4
  import { useSlidingIndicator as n } from "../../hooks/useSlidingIndicator.js";
5
5
  import { KapiTooltip as r } from "../overlays/KapiTooltip.js";
6
- import { DEFAULT_LINK_LABELS as i } from "../locale/linkLabels.js";
7
- import { navBadgeA11yText as a } from "../navigation/navBadgeLogic.js";
8
- import { KapiNavBadge as o } from "../navigation/KapiNavBadge.js";
9
- import { isRailSeparator as s, railClasses as c, railItemClasses as l, railShowsTooltip as u, splitRailEntries as d } from "./railLogic.js";
6
+ import { navBadgeA11yText as i } from "../navigation/navBadgeLogic.js";
7
+ import { KapiNavBadge as a } from "../navigation/KapiNavBadge.js";
8
+ import { useScrollEdges as o } from "../../hooks/useScrollEdges.js";
9
+ import { DEFAULT_LINK_LABELS as s } from "../locale/linkLabels.js";
10
+ import { useMediaQuery as c } from "../../hooks/useMediaQuery.js";
11
+ import { isRailSeparator as l, railClasses as u, railItemClasses as d, railShowsTooltip as f, splitRailEntries as p } from "./railLogic.js";
10
12
  /* empty css */
11
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
- import { ExternalLink as m } from "lucide-react";
13
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
14
+ import { useCallback as g } from "react";
15
+ import { ExternalLink as _ } from "lucide-react";
13
16
  //#region src/components/layout/KapiRail.tsx
14
- var h = { navigation: "Navegación principal" }, g = ({ items: g, activeId: _, onSelect: v, brand: y, footer: b, variant: x = "labeled", "aria-label": S, labels: C, className: w, ...T }) => {
15
- let E = e("rail", h, C), D = e("link", i, C), O = x === "compact", k = u(x), A = d(g), { containerRef: j, indicatorRef: M } = n({
16
- active: _ ?? null,
17
- deps: [g, x],
17
+ var v = { navigation: "Navegación principal" }, y = ({ items: y, activeId: b, onSelect: x, brand: S, footer: C, variant: w = "labeled", "aria-label": T, labels: E, className: D, ...O }) => {
18
+ let k = e("rail", v, E), A = e("link", s, E), j = w === "compact", M = f(w), N = p(y), { containerRef: P, indicatorRef: F } = n({
19
+ active: b ?? null,
20
+ deps: [y, w],
18
21
  findActive: (e) => e.querySelector(".kapi-rail__item[aria-current=\"page\"]")
19
- }), N = ({ id: e, label: t, icon: n, href: i, external: s, newTab: c, badge: u, badgeTone: d, badgeLabel: h }) => {
20
- let g = _ === e, y = g ? "page" : void 0, b = a(u, h), x = b === null ? t : `${t} ${b}`, S = O ? x : void 0, C = /* @__PURE__ */ f(o, {
21
- value: u,
22
- tone: d,
23
- label: h,
22
+ }), I = c("(max-width: 768px)") ? "x" : "y", { ref: L, edges: R } = o({ axis: I }), z = g((e) => {
23
+ P.current = e, L.current = e;
24
+ }, [P, L]), B = ({ id: e, label: t, icon: n, href: o, external: s, newTab: c, badge: l, badgeTone: u, badgeLabel: f }) => {
25
+ let p = b === e, g = p ? "page" : void 0, v = i(l, f), y = v === null ? t : `${t} ${v}`, S = j ? y : void 0, C = /* @__PURE__ */ m(a, {
26
+ value: l,
27
+ tone: u,
28
+ label: f,
24
29
  placement: "corner",
25
- announce: !O
26
- }), w = i === void 0 ? /* @__PURE__ */ p("button", {
30
+ announce: !j
31
+ }), w = o === void 0 ? /* @__PURE__ */ h("button", {
27
32
  type: "button",
28
- className: l({ active: g }),
29
- onClick: () => v?.(e),
30
- "aria-current": y,
33
+ className: d({ active: p }),
34
+ onClick: () => x?.(e),
35
+ "aria-current": g,
31
36
  "aria-label": S,
32
37
  children: [
33
38
  n,
34
- !O && t,
39
+ !j && t,
35
40
  C
36
41
  ]
37
- }, k ? void 0 : e) : /* @__PURE__ */ p("a", {
38
- className: l({
39
- active: g,
42
+ }, M ? void 0 : e) : /* @__PURE__ */ h("a", {
43
+ className: d({
44
+ active: p,
40
45
  link: !0
41
46
  }),
42
- href: i,
47
+ href: o,
43
48
  rel: "noopener noreferrer",
44
49
  target: c ? "_blank" : void 0,
45
- "aria-current": y,
50
+ "aria-current": g,
46
51
  "aria-label": S,
47
52
  children: [
48
53
  n,
49
- !O && t,
54
+ !j && t,
50
55
  C,
51
- s && /* @__PURE__ */ f(m, {
56
+ s && /* @__PURE__ */ m(_, {
52
57
  className: "kapi-rail__ext",
53
58
  size: 12,
54
59
  "aria-hidden": "true"
55
60
  }),
56
- c && /* @__PURE__ */ f("span", {
61
+ c && /* @__PURE__ */ m("span", {
57
62
  className: "kapi-rail__sr",
58
- children: D.newTab
63
+ children: A.newTab
59
64
  })
60
65
  ]
61
- }, k ? void 0 : e);
62
- return k ? /* @__PURE__ */ f(r, {
63
- label: x,
66
+ }, M ? void 0 : e);
67
+ return M ? /* @__PURE__ */ m(r, {
68
+ label: y,
64
69
  children: w
65
70
  }, e) : w;
66
- }, P = (e) => e.map((e, t) => s(e) ? /* @__PURE__ */ f("div", {
71
+ }, V = (e) => e.map((e, t) => l(e) ? /* @__PURE__ */ m("div", {
67
72
  className: "kapi-rail__sep",
68
73
  role: "separator",
69
74
  "aria-orientation": "horizontal"
70
- }, e.id ?? `sep-${t}`) : N(e));
71
- return /* @__PURE__ */ p("nav", {
72
- ...T,
73
- className: t(c({ variant: x }), w),
74
- "aria-label": S ?? E.navigation,
75
+ }, e.id ?? `sep-${t}`) : B(e));
76
+ return /* @__PURE__ */ h("nav", {
77
+ ...O,
78
+ className: t(u({ variant: w }), D),
79
+ "aria-label": T ?? k.navigation,
75
80
  children: [
76
- y !== void 0 && /* @__PURE__ */ f("div", {
81
+ S !== void 0 && /* @__PURE__ */ m("div", {
77
82
  className: "kapi-rail__brand",
78
- children: y
83
+ children: S
79
84
  }),
80
- A.start.length > 0 && /* @__PURE__ */ f("div", {
85
+ N.start.length > 0 && /* @__PURE__ */ m("div", {
81
86
  className: "kapi-rail__start",
82
- children: P(A.start)
87
+ children: V(N.start)
83
88
  }),
84
- /* @__PURE__ */ p("div", {
85
- ref: j,
86
- className: "kapi-rail__scroll",
87
- children: [/* @__PURE__ */ f("span", {
88
- ref: M,
89
+ /* @__PURE__ */ h("div", {
90
+ ref: z,
91
+ className: `kapi-rail__scroll kapi-fade-${I}`,
92
+ "data-edge-start": R.start ? "" : void 0,
93
+ "data-edge-end": R.end ? "" : void 0,
94
+ children: [/* @__PURE__ */ m("span", {
95
+ ref: F,
89
96
  className: "kapi-rail__indicator",
90
97
  "aria-hidden": "true"
91
- }), P(A.scroll)]
98
+ }), V(N.scroll)]
92
99
  }),
93
- A.end.length > 0 && /* @__PURE__ */ f("div", {
100
+ N.end.length > 0 && /* @__PURE__ */ m("div", {
94
101
  className: "kapi-rail__end",
95
- children: P(A.end)
102
+ children: V(N.end)
96
103
  }),
97
- b
104
+ C
98
105
  ]
99
106
  });
100
107
  };
101
108
  //#endregion
102
- export { h as DEFAULT_RAIL_LABELS, g as KapiRail };
109
+ export { v as DEFAULT_RAIL_LABELS, y as KapiRail };
@@ -1,8 +1,9 @@
1
1
  import { type HTMLAttributes, type ReactNode } from "react";
2
+ import type { KapiThemeColors } from "../../hooks/themeDeriveLogic";
2
3
  import { type KapiMenuItem } from "../overlays/KapiContextMenu";
3
4
  /**
4
5
  * Atributos nativos (`id`, `style`, `data-*`…) van a la raíz `.kapi`. `data-theme`/`data-motion`
5
- * son propios y las variables del tema (`--kapi-font`, `--kapi-primary`) ganan sobre `style`.
6
+ * son propios y las variables del tema (`--kapi-font`, `--kapi-primary`…) ganan sobre `style`.
6
7
  */
7
8
  export type KapiShellProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
8
9
  /** Navegación principal (típicamente `<KapiRail />`). OPCIONAL. */
@@ -24,6 +25,12 @@ export type KapiShellProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> &
24
25
  * (`kapi:theme`…). Dos apps del design system en el mismo origen pasan uno distinto para no pisarse.
25
26
  */
26
27
  storageNamespace?: string;
28
+ /**
29
+ * Tema de marca: los colores de la identidad del producto (`primary`, `bg`, `ink`…). Es la base;
30
+ * el acento y lo que la persona personalizó se aplican encima, color por color. Se deriva sobre
31
+ * el tema claro u oscuro que se ve.
32
+ */
33
+ brandTheme?: KapiThemeColors | undefined;
27
34
  };
28
35
  /**
29
36
  * Marco de la app. Es la raíz `.kapi` (tokens, tema, fuente) y compone:
@@ -37,4 +44,4 @@ export type KapiShellProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> &
37
44
  * // sin rail (otra navegación, p. ej. tabs arriba o router propio)
38
45
  * <KapiShell><MiTopNav /><Pagina /></KapiShell>
39
46
  */
40
- export declare const KapiShell: ({ rail, panel, children, contextMenuItems, rightClick, overlays, className, contentClassName, storageNamespace, style, ...rest }: KapiShellProps) => import("react").JSX.Element;
47
+ export declare const KapiShell: ({ rail, panel, children, contextMenuItems, rightClick, overlays, className, contentClassName, storageNamespace, brandTheme, style, ...rest }: KapiShellProps) => import("react").JSX.Element;
@@ -4,46 +4,46 @@ import { KapiContextMenu as t } from "../overlays/KapiContextMenu.js";
4
4
  import { useGlobalRightClick as n } from "../../hooks/useGlobalRightClick.js";
5
5
  import { KapiThemeContext as r, themeRootStyle as i, useKapiThemeState as a } from "../../hooks/useKapiTheme.js";
6
6
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { useState as c } from "react";
7
+ import { useMemo as c, useState as l } from "react";
8
8
  //#region src/components/layout/KapiShell.tsx
9
- var l = ({ rail: l, panel: u, children: d, contextMenuItems: f, rightClick: p = !0, overlays: m, className: h, contentClassName: g = "", storageNamespace: _, style: v, ...y }) => {
10
- let b = a({ namespace: _ }), [x, S] = c(null);
9
+ var u = ({ rail: u, panel: d, children: f, contextMenuItems: p, rightClick: m = !0, overlays: h, className: g, contentClassName: _ = "", storageNamespace: v, brandTheme: y, style: b, ...x }) => {
10
+ let S = a({ namespace: v }), C = c(() => i(S, y), [S, y]), [w, T] = l(null);
11
11
  return n({
12
- enabled: p,
13
- onMenu: f?.length ? (e, t) => S({
12
+ enabled: m,
13
+ onMenu: p?.length ? (e, t) => T({
14
14
  x: e,
15
15
  y: t
16
16
  }) : void 0
17
17
  }), /* @__PURE__ */ o(r.Provider, {
18
- value: b,
18
+ value: S,
19
19
  children: /* @__PURE__ */ s("div", {
20
- ...y,
21
- className: e("kapi", h),
22
- "data-theme": b.theme,
23
- "data-motion": b.motion === "reduced" ? "reduced" : void 0,
20
+ ...x,
21
+ className: e("kapi", g),
22
+ "data-theme": S.theme,
23
+ "data-motion": S.motion === "reduced" ? "reduced" : void 0,
24
24
  style: {
25
- ...v,
26
- ...i(b)
25
+ ...b,
26
+ ...C
27
27
  },
28
28
  children: [
29
- l,
30
29
  u,
30
+ d,
31
31
  /* @__PURE__ */ o("main", {
32
- className: `kapi-content${g ? ` ${g}` : ""}`,
32
+ className: `kapi-content${_ ? ` ${_}` : ""}`,
33
33
  tabIndex: 0,
34
- children: d
34
+ children: f
35
35
  }),
36
- m,
37
- x && f && /* @__PURE__ */ o(t, {
36
+ h,
37
+ w && p && /* @__PURE__ */ o(t, {
38
38
  open: !0,
39
- x: x.x,
40
- y: x.y,
41
- items: f,
42
- onClose: () => S(null)
39
+ x: w.x,
40
+ y: w.y,
41
+ items: p,
42
+ onClose: () => T(null)
43
43
  })
44
44
  ]
45
45
  })
46
46
  });
47
47
  };
48
48
  //#endregion
49
- export { l as KapiShell };
49
+ export { u as KapiShell };
@@ -45,6 +45,11 @@ import type { KapiConfirmLabels } from "../overlays/KapiConfirm";
45
45
  import type { KapiContextMenuLabels } from "../overlays/KapiContextMenu";
46
46
  import type { KapiDialogLabels } from "../overlays/KapiDialogHost";
47
47
  import type { KapiModalLabels } from "../overlays/KapiModal";
48
+ import type { KapiMessageBubbleLabels } from "../chat/KapiMessageBubble";
49
+ import type { KapiChatListLabels } from "../chat/KapiChatList";
50
+ import type { KapiChatThreadLabels } from "../chat/KapiChatThread";
51
+ import type { KapiComposerLabels } from "../chat/KapiComposer";
52
+ import type { KapiTypingIndicatorLabels } from "../chat/KapiTypingIndicator";
48
53
  import type { UnsavedGuardLabels } from "../../hooks/useUnsavedGuard";
49
54
  /**
50
55
  * Clave → tipo de los textos de cada componente. Es una `interface` a propósito: una app puede
@@ -62,9 +67,12 @@ export interface KapiLabelRegistry {
62
67
  bulkBar: KapiBulkBarLabels;
63
68
  calendar: KapiDateRangePickerLabels;
64
69
  canvasForm: KapiCanvasFormLabels;
70
+ chatList: KapiChatListLabels;
71
+ chatThread: KapiChatThreadLabels;
65
72
  collapsiblePanel: KapiCollapsiblePanelLabels;
66
73
  commandPalette: KapiCommandPaletteLabels;
67
74
  commentComposer: KapiCommentComposerLabels;
75
+ composer: KapiComposerLabels;
68
76
  confirm: KapiConfirmLabels;
69
77
  contextMenu: KapiContextMenuLabels;
70
78
  contextPanel: KapiContextPanelLabels;
@@ -79,6 +87,7 @@ export interface KapiLabelRegistry {
79
87
  filterChips: KapiFilterChipsLabels;
80
88
  input: KapiInputLabels;
81
89
  link: KapiLinkLabels;
90
+ messageBubble: KapiMessageBubbleLabels;
82
91
  modal: KapiModalLabels;
83
92
  notificationBell: KapiNotificationBellLabels;
84
93
  numberStepper: KapiNumberStepperLabels;
@@ -100,6 +109,7 @@ export interface KapiLabelRegistry {
100
109
  toast: KapiToastLabels;
101
110
  tour: KapiTourLabels;
102
111
  tree: KapiTreeLabels;
112
+ typingIndicator: KapiTypingIndicatorLabels;
103
113
  unsavedBar: KapiUnsavedBarLabels;
104
114
  unsavedGuard: UnsavedGuardLabels;
105
115
  wizard: KapiWizardLabels;