@devalok/shilp-sutra 0.6.2 → 0.8.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 (108) hide show
  1. package/dist/_virtual/client.js +5 -0
  2. package/dist/_virtual/index.js +5 -0
  3. package/dist/_virtual/react-dom-client.development.js +5 -0
  4. package/dist/_virtual/react-dom-client.production.js +5 -0
  5. package/dist/_virtual/scheduler.development.js +5 -0
  6. package/dist/_virtual/scheduler.production.js +5 -0
  7. package/dist/composed/command-palette.d.ts.map +1 -1
  8. package/dist/composed/command-palette.js +84 -73
  9. package/dist/composed/confirm-dialog.d.ts +27 -0
  10. package/dist/composed/confirm-dialog.d.ts.map +1 -0
  11. package/dist/composed/confirm-dialog.js +45 -0
  12. package/dist/composed/extensions/emoji-suggestion.d.ts +9 -0
  13. package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -0
  14. package/dist/composed/extensions/emoji-suggestion.js +119 -0
  15. package/dist/composed/extensions/file-attachment.d.ts +4 -0
  16. package/dist/composed/extensions/file-attachment.d.ts.map +1 -0
  17. package/dist/composed/extensions/file-attachment.js +55 -0
  18. package/dist/composed/extensions/mention-suggestion.d.ts +10 -0
  19. package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -0
  20. package/dist/composed/extensions/mention-suggestion.js +79 -0
  21. package/dist/composed/index.d.ts +3 -1
  22. package/dist/composed/index.d.ts.map +1 -1
  23. package/dist/composed/index.js +28 -26
  24. package/dist/composed/rich-text-editor.d.ts +19 -0
  25. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  26. package/dist/composed/rich-text-editor.js +347 -176
  27. package/dist/composed/status-badge.d.ts +11 -1
  28. package/dist/composed/status-badge.d.ts.map +1 -1
  29. package/dist/composed/status-badge.js +48 -20
  30. package/dist/hooks/use-color-mode.d.ts.map +1 -1
  31. package/dist/hooks/use-color-mode.js +8 -4
  32. package/dist/hooks/use-mobile.d.ts +5 -0
  33. package/dist/hooks/use-mobile.d.ts.map +1 -1
  34. package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +40141 -0
  35. package/dist/node_modules/.pnpm/@emoji-mart_react@1.1.1_emoji-mart@5.6.0_react@19.2.4/node_modules/@emoji-mart/react/dist/module.js +17 -0
  36. package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +2958 -0
  37. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +17062 -0
  38. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +9790 -0
  39. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +20 -0
  40. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +237 -0
  41. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +234 -0
  42. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +11 -0
  43. package/dist/primitives/_internal/react-arrow.js +8 -19
  44. package/dist/primitives/_internal/react-compose-refs.js +14 -14
  45. package/dist/primitives/_internal/react-context.js +41 -39
  46. package/dist/primitives/_internal/react-dismissable-layer.js +62 -90
  47. package/dist/primitives/_internal/react-popper.js +107 -169
  48. package/dist/primitives/_internal/react-portal.js +1 -1
  49. package/dist/primitives/_internal/react-primitive.js +1 -1
  50. package/dist/primitives/_internal/react-use-size.js +8 -8
  51. package/dist/primitives/react-slot.js +12 -12
  52. package/dist/shell/app-command-palette.d.ts +3 -1
  53. package/dist/shell/app-command-palette.d.ts.map +1 -1
  54. package/dist/shell/app-command-palette.js +35 -34
  55. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  56. package/dist/shell/bottom-navbar.js +31 -31
  57. package/dist/shell/index.d.ts +1 -1
  58. package/dist/shell/index.d.ts.map +1 -1
  59. package/dist/shell/notification-center.d.ts +10 -0
  60. package/dist/shell/notification-center.d.ts.map +1 -1
  61. package/dist/shell/notification-center.js +129 -117
  62. package/dist/shell/top-bar.d.ts +20 -0
  63. package/dist/shell/top-bar.d.ts.map +1 -1
  64. package/dist/shell/top-bar.js +100 -70
  65. package/dist/tailwind/index.cjs +3 -0
  66. package/dist/tailwind/preset.d.ts.map +1 -1
  67. package/dist/tailwind/preset.js +3 -0
  68. package/dist/tokens/semantic.css +10 -1
  69. package/dist/ui/alert.js +42 -63
  70. package/dist/ui/avatar.js +20 -62
  71. package/dist/ui/badge.d.ts +1 -1
  72. package/dist/ui/badge.d.ts.map +1 -1
  73. package/dist/ui/badge.js +89 -112
  74. package/dist/ui/banner.js +12 -12
  75. package/dist/ui/button-group.js +14 -29
  76. package/dist/ui/button.js +64 -108
  77. package/dist/ui/card.js +18 -62
  78. package/dist/ui/checkbox.js +1 -21
  79. package/dist/ui/chip.d.ts.map +1 -1
  80. package/dist/ui/chip.js +1 -1
  81. package/dist/ui/color-input.d.ts +17 -0
  82. package/dist/ui/color-input.d.ts.map +1 -0
  83. package/dist/ui/color-input.js +88 -0
  84. package/dist/ui/combobox.d.ts +20 -11
  85. package/dist/ui/combobox.d.ts.map +1 -1
  86. package/dist/ui/dialog.js +9 -9
  87. package/dist/ui/form.js +14 -35
  88. package/dist/ui/index.d.ts +1 -0
  89. package/dist/ui/index.d.ts.map +1 -1
  90. package/dist/ui/index.js +314 -312
  91. package/dist/ui/input.d.ts.map +1 -1
  92. package/dist/ui/input.js +31 -56
  93. package/dist/ui/label.js +1 -15
  94. package/dist/ui/number-input.d.ts.map +1 -1
  95. package/dist/ui/number-input.js +39 -35
  96. package/dist/ui/popover.js +6 -6
  97. package/dist/ui/separator.js +4 -19
  98. package/dist/ui/sheet.js +21 -21
  99. package/dist/ui/spinner.js +1 -36
  100. package/dist/ui/switch.js +1 -20
  101. package/dist/ui/tabs.js +20 -47
  102. package/dist/ui/textarea.d.ts.map +1 -1
  103. package/dist/ui/textarea.js +30 -24
  104. package/dist/ui/toast.js +18 -18
  105. package/dist/ui/tooltip.js +6 -17
  106. package/llms-full.txt +123 -13
  107. package/llms.txt +9 -6
  108. package/package.json +80 -11
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var e = { exports: {} };
3
+ export {
4
+ e as __module
5
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var e = { exports: {} };
3
+ export {
4
+ e as __module
5
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var e = {};
3
+ export {
4
+ e as __exports
5
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var o = {};
3
+ export {
4
+ o as __exports
5
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var e = {};
3
+ export {
4
+ e as __exports
5
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var r = {};
3
+ export {
4
+ r as __exports
5
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/composed/command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAMD,QAAA,MAAM,cAAc,4FAuRnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/composed/command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAMD,QAAA,MAAM,cAAc,4FAoSnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,99 +1,99 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as a } from "react/jsx-runtime";
3
- import * as r from "react";
4
- import { Dialog as I, DialogPortal as E, DialogOverlay as A, DialogContentRaw as M, DialogTitle as R, DialogDescription as L } from "../ui/dialog.js";
5
- import { IconSearch as S, IconCornerDownLeft as g, IconArrowUp as K, IconArrowDown as P } from "@tabler/icons-react";
6
- import { cn as u } from "../ui/lib/utils.js";
7
- import { VisuallyHidden as q } from "../ui/visually-hidden.js";
8
- const z = r.forwardRef(
3
+ import * as d from "react";
4
+ import { Dialog as A, DialogPortal as M, DialogOverlay as R, DialogContentRaw as L, DialogTitle as S, DialogDescription as $ } from "../ui/dialog.js";
5
+ import { IconSearch as K, IconCornerDownLeft as v, IconArrowUp as P, IconArrowDown as q } from "@tabler/icons-react";
6
+ import { cn as b } from "../ui/lib/utils.js";
7
+ import { VisuallyHidden as z } from "../ui/visually-hidden.js";
8
+ const O = d.forwardRef(
9
9
  function({
10
- groups: p = [],
11
- placeholder: w = "Search or jump to...",
12
- onSearch: x,
13
- emptyMessage: k = "No results found."
14
- }, v) {
15
- const [f, n] = r.useState(!1), [i, b] = r.useState(""), [m, c] = r.useState(0), y = r.useRef(null), N = r.useRef(null), l = r.useMemo(() => {
16
- if (!i.trim()) return p;
17
- const t = i.toLowerCase();
18
- return p.map((e) => ({
10
+ groups: x = [],
11
+ placeholder: k = "Search or jump to...",
12
+ onSearch: f,
13
+ emptyMessage: C = "No results found."
14
+ }, D) {
15
+ const [u, c] = d.useState(!1), [p, y] = d.useState(""), [l, i] = d.useState(0), N = d.useRef(null), g = d.useRef(null), h = d.useId(), w = `command-palette-listbox-${h}`, n = d.useMemo(() => {
16
+ if (!p.trim()) return x;
17
+ const t = p.toLowerCase();
18
+ return x.map((e) => ({
19
19
  ...e,
20
20
  items: e.items.filter(
21
- (d) => {
21
+ (r) => {
22
22
  var o;
23
- return d.label.toLowerCase().includes(t) || ((o = d.description) == null ? void 0 : o.toLowerCase().includes(t));
23
+ return r.label.toLowerCase().includes(t) || ((o = r.description) == null ? void 0 : o.toLowerCase().includes(t));
24
24
  }
25
25
  )
26
26
  })).filter((e) => e.items.length > 0);
27
- }, [p, i]), h = r.useMemo(
28
- () => l.flatMap((t) => t.items),
29
- [l]
27
+ }, [x, p]), m = d.useMemo(
28
+ () => n.flatMap((t) => t.items),
29
+ [n]
30
30
  );
31
- r.useEffect(() => {
31
+ d.useEffect(() => {
32
32
  function t(e) {
33
- (e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), n((d) => !d));
33
+ (e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), c((r) => !r));
34
34
  }
35
35
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
36
- }, []), r.useEffect(() => {
37
- f && (b(""), c(0), requestAnimationFrame(() => {
36
+ }, []), d.useEffect(() => {
37
+ u && (y(""), i(0), requestAnimationFrame(() => {
38
38
  var t;
39
- (t = y.current) == null || t.focus();
39
+ (t = N.current) == null || t.focus();
40
40
  }));
41
- }, [f]);
42
- const D = (t) => {
41
+ }, [u]);
42
+ const I = (t) => {
43
43
  switch (t.key) {
44
44
  case "ArrowDown": {
45
- t.preventDefault(), c(
46
- (e) => e < h.length - 1 ? e + 1 : 0
45
+ t.preventDefault(), i(
46
+ (e) => e < m.length - 1 ? e + 1 : 0
47
47
  );
48
48
  break;
49
49
  }
50
50
  case "ArrowUp": {
51
- t.preventDefault(), c(
52
- (e) => e > 0 ? e - 1 : h.length - 1
51
+ t.preventDefault(), i(
52
+ (e) => e > 0 ? e - 1 : m.length - 1
53
53
  );
54
54
  break;
55
55
  }
56
56
  case "Enter": {
57
57
  t.preventDefault();
58
- const e = h[m];
59
- e && (e.onSelect(), n(!1));
58
+ const e = m[l];
59
+ e && (e.onSelect(), c(!1));
60
60
  break;
61
61
  }
62
62
  case "Escape": {
63
- t.preventDefault(), n(!1);
63
+ t.preventDefault(), c(!1);
64
64
  break;
65
65
  }
66
66
  }
67
67
  };
68
- r.useEffect(() => {
68
+ d.useEffect(() => {
69
69
  var e;
70
- const t = (e = N.current) == null ? void 0 : e.querySelector(
71
- `[data-command-index="${m}"]`
70
+ const t = (e = g.current) == null ? void 0 : e.querySelector(
71
+ `[data-command-index="${l}"]`
72
72
  );
73
73
  t == null || t.scrollIntoView({ block: "nearest" });
74
- }, [m]);
75
- const C = (t) => {
76
- b(t), c(0), x == null || x(t);
77
- }, j = r.useMemo(() => {
74
+ }, [l]);
75
+ const j = (t) => {
76
+ y(t), i(0), f == null || f(t);
77
+ }, E = d.useMemo(() => {
78
78
  const t = /* @__PURE__ */ new Map();
79
79
  let e = 0;
80
- for (const d of l)
81
- for (const o of d.items)
80
+ for (const r of n)
81
+ for (const o of r.items)
82
82
  t.set(o.id, e++);
83
83
  return t;
84
- }, [l]);
85
- return /* @__PURE__ */ s(I, { open: f, onOpenChange: n, children: /* @__PURE__ */ a(E, { children: [
84
+ }, [n]);
85
+ return /* @__PURE__ */ s(A, { open: u, onOpenChange: c, children: /* @__PURE__ */ a(M, { children: [
86
86
  /* @__PURE__ */ s(
87
- A,
87
+ R,
88
88
  {
89
89
  className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
90
90
  }
91
91
  ),
92
92
  /* @__PURE__ */ a(
93
- M,
93
+ L,
94
94
  {
95
- ref: v,
96
- className: u(
95
+ ref: D,
96
+ className: b(
97
97
  "fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2",
98
98
  "overflow-hidden rounded-ds-xl border border-border bg-layer-01 shadow-05",
99
99
  "duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out",
@@ -102,15 +102,15 @@ const z = r.forwardRef(
102
102
  "data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",
103
103
  "data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2"
104
104
  ),
105
- onKeyDown: D,
105
+ onKeyDown: I,
106
106
  children: [
107
- /* @__PURE__ */ a(q, { children: [
108
- /* @__PURE__ */ s(R, { children: "Command Palette" }),
109
- /* @__PURE__ */ s(L, { children: "Search or jump to pages, projects, tasks, and actions" })
107
+ /* @__PURE__ */ a(z, { children: [
108
+ /* @__PURE__ */ s(S, { children: "Command Palette" }),
109
+ /* @__PURE__ */ s($, { children: "Search or jump to pages, projects, tasks, and actions" })
110
110
  ] }),
111
111
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-04 border-b border-border px-ds-05 py-ds-04", children: [
112
112
  /* @__PURE__ */ s(
113
- S,
113
+ K,
114
114
  {
115
115
  className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder",
116
116
  stroke: 1.5
@@ -119,11 +119,16 @@ const z = r.forwardRef(
119
119
  /* @__PURE__ */ s(
120
120
  "input",
121
121
  {
122
- ref: y,
123
- value: i,
124
- onChange: (t) => C(t.target.value),
125
- placeholder: w,
126
- className: u(
122
+ ref: N,
123
+ value: p,
124
+ onChange: (t) => j(t.target.value),
125
+ placeholder: k,
126
+ role: "combobox",
127
+ "aria-expanded": !0,
128
+ "aria-controls": w,
129
+ "aria-activedescendant": m[l] ? `command-item-${h}-${m[l].id}` : void 0,
130
+ "aria-autocomplete": "list",
131
+ className: b(
127
132
  "flex-1 bg-transparent text-ds-base text-text-primary outline-none",
128
133
  "placeholder:text-text-placeholder"
129
134
  ),
@@ -137,24 +142,30 @@ const z = r.forwardRef(
137
142
  /* @__PURE__ */ a(
138
143
  "div",
139
144
  {
140
- ref: N,
145
+ ref: g,
146
+ id: w,
147
+ role: "listbox",
148
+ "aria-label": "Command results",
141
149
  className: "max-h-[320px] overflow-y-auto px-ds-03 py-ds-03",
142
150
  children: [
143
- l.length === 0 && /* @__PURE__ */ s("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ s("p", { className: "text-ds-md text-text-placeholder", children: k }) }),
144
- l.map((t) => /* @__PURE__ */ a("div", { className: "mb-ds-02", children: [
151
+ n.length === 0 && /* @__PURE__ */ s("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ s("p", { className: "text-ds-md text-text-placeholder", children: C }) }),
152
+ n.map((t) => /* @__PURE__ */ a("div", { className: "mb-ds-02", children: [
145
153
  /* @__PURE__ */ s("div", { className: "px-ds-03 pb-ds-02 pt-ds-03", children: /* @__PURE__ */ s("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: t.label }) }),
146
154
  t.items.map((e) => {
147
- const d = j.get(e.id) ?? 0, o = d === m;
155
+ const r = E.get(e.id) ?? 0, o = r === l;
148
156
  return /* @__PURE__ */ a(
149
157
  "button",
150
158
  {
159
+ id: `command-item-${h}-${e.id}`,
151
160
  type: "button",
152
- "data-command-index": d,
161
+ role: "option",
162
+ "aria-selected": o,
163
+ "data-command-index": r,
153
164
  onClick: () => {
154
- e.onSelect(), n(!1);
165
+ e.onSelect(), c(!1);
155
166
  },
156
- onMouseEnter: () => c(d),
157
- className: u(
167
+ onMouseEnter: () => i(r),
168
+ className: b(
158
169
  "flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-colors duration-fast-01 ease-productive-standard",
159
170
  o ? "bg-layer-03 text-text-primary" : "text-text-secondary hover:bg-layer-02"
160
171
  ),
@@ -166,7 +177,7 @@ const z = r.forwardRef(
166
177
  ] }),
167
178
  e.shortcut && /* @__PURE__ */ s("kbd", { className: "shrink-0 rounded border border-border bg-layer-02 px-ds-02b py-ds-01 text-ds-xs font-medium text-text-placeholder", children: e.shortcut }),
168
179
  o && /* @__PURE__ */ s(
169
- g,
180
+ v,
170
181
  {
171
182
  className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder",
172
183
  stroke: 1.5
@@ -184,13 +195,13 @@ const z = r.forwardRef(
184
195
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-05 border-t border-border px-ds-05 py-ds-03", children: [
185
196
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02b", children: [
186
197
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-01", children: [
187
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ s(K, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
188
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ s(P, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) })
198
+ /* @__PURE__ */ s("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ s(P, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
199
+ /* @__PURE__ */ s("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ s(q, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) })
189
200
  ] }),
190
201
  /* @__PURE__ */ s("span", { className: "text-ds-xs text-text-placeholder", children: "Navigate" })
191
202
  ] }),
192
203
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02b", children: [
193
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-border bg-layer-02 px-ds-02b", children: /* @__PURE__ */ s(g, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
204
+ /* @__PURE__ */ s("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-border bg-layer-02 px-ds-02b", children: /* @__PURE__ */ s(v, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
194
205
  /* @__PURE__ */ s("span", { className: "text-ds-xs text-text-placeholder", children: "Select" })
195
206
  ] }),
196
207
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02b", children: [
@@ -204,7 +215,7 @@ const z = r.forwardRef(
204
215
  ] }) });
205
216
  }
206
217
  );
207
- z.displayName = "CommandPalette";
218
+ O.displayName = "CommandPalette";
208
219
  export {
209
- z as CommandPalette
220
+ O as CommandPalette
210
221
  };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ export interface ConfirmDialogProps {
3
+ /** Whether the dialog is open */
4
+ open: boolean;
5
+ /** Called when the dialog open state changes */
6
+ onOpenChange: (open: boolean) => void;
7
+ /** Dialog title */
8
+ title: string;
9
+ /** Dialog description */
10
+ description: string;
11
+ /** Confirm button text */
12
+ confirmText?: string;
13
+ /** Cancel button text */
14
+ cancelText?: string;
15
+ /** Color of the confirm button */
16
+ color?: 'default' | 'error';
17
+ /** Whether the dialog is in a loading state */
18
+ loading?: boolean;
19
+ /** Called when the user confirms. Dialog stays open — consumer controls closing via onOpenChange. */
20
+ onConfirm: () => void | Promise<void>;
21
+ }
22
+ declare const ConfirmDialog: {
23
+ ({ open, onOpenChange, title, description, confirmText, cancelText, color, loading, onConfirm, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
24
+ displayName: string;
25
+ };
26
+ export { ConfirmDialog };
27
+ //# sourceMappingURL=confirm-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/composed/confirm-dialog.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,kBAAkB;IACjC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,gDAAgD;IAChD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC3B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qGAAqG;IACrG,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED,QAAA,MAAM,aAAa;sGAUhB,kBAAkB;;CA4BpB,CAAA;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx as i, jsxs as r } from "react/jsx-runtime";
3
+ import { AlertDialog as f, AlertDialogContent as D, AlertDialogHeader as h, AlertDialogTitle as g, AlertDialogDescription as A, AlertDialogFooter as C } from "../ui/alert-dialog.js";
4
+ import { Button as o } from "../ui/button.js";
5
+ const p = ({
6
+ open: t,
7
+ onOpenChange: e,
8
+ title: n,
9
+ description: a,
10
+ confirmText: c = "Confirm",
11
+ cancelText: d = "Cancel",
12
+ color: s = "default",
13
+ loading: l = !1,
14
+ onConfirm: m
15
+ }) => /* @__PURE__ */ i(f, { open: t, onOpenChange: e, children: /* @__PURE__ */ r(D, { children: [
16
+ /* @__PURE__ */ r(h, { children: [
17
+ /* @__PURE__ */ i(g, { children: n }),
18
+ /* @__PURE__ */ i(A, { children: a })
19
+ ] }),
20
+ /* @__PURE__ */ r(C, { children: [
21
+ /* @__PURE__ */ i(
22
+ o,
23
+ {
24
+ variant: "outline",
25
+ disabled: l,
26
+ onClick: () => e(!1),
27
+ children: d
28
+ }
29
+ ),
30
+ /* @__PURE__ */ i(
31
+ o,
32
+ {
33
+ variant: "solid",
34
+ color: s,
35
+ disabled: l,
36
+ onClick: () => m(),
37
+ children: l ? "Processing..." : c
38
+ }
39
+ )
40
+ ] })
41
+ ] }) });
42
+ p.displayName = "ConfirmDialog";
43
+ export {
44
+ p as ConfirmDialog
45
+ };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { Extension } from '@tiptap/core';
3
+ export interface EmojiSuggestionItem {
4
+ id: string;
5
+ name: string;
6
+ native: string;
7
+ }
8
+ export declare const EmojiSuggestion: Extension<any, any>;
9
+ //# sourceMappingURL=emoji-suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emoji-suggestion.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/emoji-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAexC,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAoJD,eAAO,MAAM,eAAe,qBA8B1B,CAAA"}
@@ -0,0 +1,119 @@
1
+ "use client";
2
+ import { jsx as d, jsxs as u } from "react/jsx-runtime";
3
+ import { Extension as m } from "@tiptap/core";
4
+ import f from "@tiptap/suggestion";
5
+ import * as a from "react";
6
+ import { c as x } from "../../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js";
7
+ import { cn as y } from "../../ui/lib/utils.js";
8
+ let s = null;
9
+ async function g() {
10
+ if (s) return s;
11
+ const e = await import("../../node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js"), t = e.default ?? e;
12
+ return s = Object.values(t.emojis).map((r) => {
13
+ var n;
14
+ return {
15
+ id: r.id,
16
+ name: r.name,
17
+ native: ((n = r.skins[0]) == null ? void 0 : n.native) ?? ""
18
+ };
19
+ }), s;
20
+ }
21
+ const c = a.forwardRef(
22
+ ({ items: e, command: t }, r) => {
23
+ const [n, l] = a.useState(0);
24
+ return a.useEffect(() => l(0), [e]), a.useImperativeHandle(r, () => ({
25
+ onKeyDown: ({ event: o }) => o.key === "ArrowUp" ? (l((i) => (i + e.length - 1) % e.length), !0) : o.key === "ArrowDown" ? (l((i) => (i + 1) % e.length), !0) : o.key === "Enter" ? (e[n] && t(e[n]), !0) : !1
26
+ })), e.length ? /* @__PURE__ */ d("div", { role: "listbox", "aria-label": "Emoji suggestions", className: "z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-ds-md border border-border bg-layer-01 shadow-02", children: e.map((o, i) => /* @__PURE__ */ u(
27
+ "button",
28
+ {
29
+ type: "button",
30
+ role: "option",
31
+ "aria-selected": i === n,
32
+ onClick: () => t(o),
33
+ className: y(
34
+ "flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
35
+ i === n ? "bg-layer-02 text-text-primary" : "text-text-secondary hover:bg-layer-02"
36
+ ),
37
+ children: [
38
+ /* @__PURE__ */ d("span", { className: "text-ds-base", children: o.native }),
39
+ /* @__PURE__ */ u("span", { className: "truncate", children: [
40
+ ":",
41
+ o.id,
42
+ ":"
43
+ ] })
44
+ ]
45
+ },
46
+ o.id
47
+ )) }) : null;
48
+ }
49
+ );
50
+ c.displayName = "EmojiList";
51
+ function b() {
52
+ return () => {
53
+ let e = null, t = null, r = null;
54
+ return {
55
+ onStart: (n) => {
56
+ var o;
57
+ t = document.createElement("div"), t.style.position = "absolute", t.style.zIndex = "1400";
58
+ const l = (o = n.clientRect) == null ? void 0 : o.call(n);
59
+ l && (t.style.left = `${l.left}px`, t.style.top = `${l.bottom + 4}px`), document.body.appendChild(t), e = x.createRoot(t), e.render(
60
+ /* @__PURE__ */ d(
61
+ c,
62
+ {
63
+ ref: (i) => {
64
+ r = i;
65
+ },
66
+ items: n.items,
67
+ command: (i) => n.command(i)
68
+ }
69
+ )
70
+ );
71
+ },
72
+ onUpdate: (n) => {
73
+ var o;
74
+ if (!e || !t) return;
75
+ const l = (o = n.clientRect) == null ? void 0 : o.call(n);
76
+ l && (t.style.left = `${l.left}px`, t.style.top = `${l.bottom + 4}px`), e.render(
77
+ /* @__PURE__ */ d(
78
+ c,
79
+ {
80
+ ref: (i) => {
81
+ r = i;
82
+ },
83
+ items: n.items,
84
+ command: (i) => n.command(i)
85
+ }
86
+ )
87
+ );
88
+ },
89
+ onKeyDown: (n) => n.event.key === "Escape" ? (t && (e == null || e.unmount(), t.remove(), t = null, e = null), !0) : (r == null ? void 0 : r.onKeyDown(n)) ?? !1,
90
+ onExit: () => {
91
+ t && (e == null || e.unmount(), t.remove(), t = null, e = null);
92
+ }
93
+ };
94
+ };
95
+ }
96
+ const p = m.create({
97
+ name: "emojiSuggestion",
98
+ addProseMirrorPlugins() {
99
+ return [
100
+ f({
101
+ editor: this.editor,
102
+ char: ":",
103
+ items: async ({ query: e }) => {
104
+ const t = await g();
105
+ return e ? t.filter(
106
+ (r) => r.id.includes(e.toLowerCase()) || r.name.toLowerCase().includes(e.toLowerCase())
107
+ ).slice(0, 8) : t.slice(0, 8);
108
+ },
109
+ command: ({ editor: e, range: t, props: r }) => {
110
+ e.chain().focus().deleteRange(t).insertContent(r.native).run();
111
+ },
112
+ render: b()
113
+ })
114
+ ];
115
+ }
116
+ });
117
+ export {
118
+ p as EmojiSuggestion
119
+ };
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ import { Node } from '@tiptap/core';
3
+ export declare const FileAttachment: Node<any, any>;
4
+ //# sourceMappingURL=file-attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-attachment.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/file-attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAA;AA8BpD,eAAO,MAAM,cAAc,gBAwBzB,CAAA"}
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
3
+ import { Node as n, mergeAttributes as i } from "@tiptap/core";
4
+ import { ReactNodeViewRenderer as o, NodeViewWrapper as s } from "@tiptap/react";
5
+ import { IconFile as l, IconDownload as d } from "@tabler/icons-react";
6
+ function c(e) {
7
+ return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
8
+ }
9
+ function m({ node: e }) {
10
+ const a = /^https?:\/\//.test(e.attrs.url) ? e.attrs.url : "#";
11
+ return /* @__PURE__ */ t(s, { className: "my-ds-02", children: /* @__PURE__ */ r(
12
+ "a",
13
+ {
14
+ href: a,
15
+ target: "_blank",
16
+ rel: "noopener noreferrer",
17
+ className: "inline-flex items-center gap-ds-03 rounded-ds-md border border-border bg-layer-02 px-ds-04 py-ds-03 text-ds-sm text-text-primary transition-colors hover:border-border-strong hover:bg-layer-03",
18
+ contentEditable: !1,
19
+ children: [
20
+ /* @__PURE__ */ t(l, { className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder" }),
21
+ /* @__PURE__ */ t("span", { className: "truncate", children: e.attrs.name }),
22
+ /* @__PURE__ */ r("span", { className: "shrink-0 text-text-placeholder", children: [
23
+ "(",
24
+ c(e.attrs.size),
25
+ ")"
26
+ ] }),
27
+ /* @__PURE__ */ t(d, { className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder" })
28
+ ]
29
+ }
30
+ ) });
31
+ }
32
+ const x = n.create({
33
+ name: "fileAttachment",
34
+ group: "block",
35
+ atom: !0,
36
+ addAttributes() {
37
+ return {
38
+ url: { default: null },
39
+ name: { default: "Untitled" },
40
+ size: { default: 0 }
41
+ };
42
+ },
43
+ parseHTML() {
44
+ return [{ tag: "div[data-file-attachment]" }];
45
+ },
46
+ renderHTML({ HTMLAttributes: e }) {
47
+ return ["div", i({ "data-file-attachment": "" }, e)];
48
+ },
49
+ addNodeView() {
50
+ return o(m);
51
+ }
52
+ });
53
+ export {
54
+ x as FileAttachment
55
+ };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { SuggestionProps, SuggestionKeyDownProps } from '@tiptap/suggestion';
3
+ import { MentionItem } from '../rich-text-editor';
4
+ export declare function createSuggestionRenderer(): () => {
5
+ onStart: (props: SuggestionProps<MentionItem>) => void;
6
+ onUpdate: (props: SuggestionProps<MentionItem>) => void;
7
+ onKeyDown: (props: SuggestionKeyDownProps) => boolean;
8
+ onExit: () => void;
9
+ };
10
+ //# sourceMappingURL=mention-suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mention-suggestion.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/mention-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAIjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAmEtD,wBAAgB,wBAAwB;qBAOjB,eAAe,CAAC,WAAW,CAAC;sBAsB3B,eAAe,CAAC,WAAW,CAAC;uBAkB3B,sBAAsB;;EAuB9C"}