@devalok/shilp-sutra 0.6.1 → 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 (84) 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/_virtual/shilp-sutra.js +5 -0
  8. package/dist/_virtual/shilp-sutra2.js +5 -0
  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 +8 -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 +3 -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 +320 -161
  27. 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
  28. 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
  29. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +20 -0
  30. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +237 -0
  31. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +234 -0
  32. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +11 -0
  33. package/dist/primitives/_internal/react-arrow.js +8 -19
  34. package/dist/primitives/_internal/react-compose-refs.js +14 -14
  35. package/dist/primitives/_internal/react-context.js +41 -39
  36. package/dist/primitives/_internal/react-dismissable-layer.js +62 -90
  37. package/dist/primitives/_internal/react-popper.js +107 -169
  38. package/dist/primitives/_internal/react-portal.js +1 -1
  39. package/dist/primitives/_internal/react-primitive.js +1 -1
  40. package/dist/primitives/_internal/react-use-size.js +8 -8
  41. package/dist/primitives/react-slot.js +12 -12
  42. package/dist/shell/app-command-palette.d.ts +3 -1
  43. package/dist/shell/app-command-palette.d.ts.map +1 -1
  44. package/dist/shell/app-command-palette.js +35 -34
  45. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  46. package/dist/shell/bottom-navbar.js +31 -31
  47. package/dist/shell/index.d.ts +1 -1
  48. package/dist/shell/index.d.ts.map +1 -1
  49. package/dist/shell/notification-center.d.ts +10 -0
  50. package/dist/shell/notification-center.d.ts.map +1 -1
  51. package/dist/shell/notification-center.js +129 -117
  52. package/dist/shell/top-bar.d.ts +20 -0
  53. package/dist/shell/top-bar.d.ts.map +1 -1
  54. package/dist/shell/top-bar.js +100 -70
  55. package/dist/tailwind/index.cjs +1 -0
  56. package/dist/tailwind/preset.d.ts.map +1 -1
  57. package/dist/tailwind/preset.js +1 -0
  58. package/dist/tokens/semantic.css +7 -0
  59. package/dist/ui/alert.js +42 -63
  60. package/dist/ui/avatar.js +20 -62
  61. package/dist/ui/badge.d.ts +1 -1
  62. package/dist/ui/badge.d.ts.map +1 -1
  63. package/dist/ui/badge.js +88 -112
  64. package/dist/ui/button-group.js +14 -29
  65. package/dist/ui/button.js +64 -108
  66. package/dist/ui/card.js +18 -62
  67. package/dist/ui/checkbox.js +1 -21
  68. package/dist/ui/color-input.d.ts +17 -0
  69. package/dist/ui/color-input.d.ts.map +1 -0
  70. package/dist/ui/color-input.js +87 -0
  71. package/dist/ui/index.d.ts +1 -0
  72. package/dist/ui/index.d.ts.map +1 -1
  73. package/dist/ui/index.js +314 -312
  74. package/dist/ui/input.js +25 -51
  75. package/dist/ui/label.js +1 -15
  76. package/dist/ui/popover.js +6 -6
  77. package/dist/ui/separator.js +4 -19
  78. package/dist/ui/spinner.js +1 -36
  79. package/dist/ui/switch.js +1 -20
  80. package/dist/ui/tabs.js +20 -47
  81. package/dist/ui/tooltip.js +6 -17
  82. package/llms-full.txt +1861 -0
  83. package/llms.txt +183 -0
  84. package/package.json +71 -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 = { 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
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const t = {};
3
+ export {
4
+ t as default
5
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const t = {};
3
+ export {
4
+ t as default
5
+ };
@@ -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,8 @@
1
+ "use client";
2
+ export interface EmojiSuggestionItem {
3
+ id: string;
4
+ name: string;
5
+ native: string;
6
+ }
7
+ export declare const EmojiSuggestion: any;
8
+ //# 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":"AAeA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAoJD,eAAO,MAAM,eAAe,KA8B1B,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("../../_virtual/shilp-sutra2.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,3 @@
1
+ "use client";
2
+ export declare const FileAttachment: any;
3
+ //# 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":"AA8BA,eAAO,MAAM,cAAc,KAwBzB,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"}
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { jsx as d, jsxs as s } from "react/jsx-runtime";
3
+ import * as i from "react";
4
+ import { c as u } from "../../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js";
5
+ import { cn as f } from "../../ui/lib/utils.js";
6
+ const c = i.forwardRef(
7
+ ({ items: e, command: t }, a) => {
8
+ const [n, o] = i.useState(0);
9
+ return i.useEffect(() => o(0), [e]), i.useImperativeHandle(a, () => ({
10
+ onKeyDown: ({ event: l }) => l.key === "ArrowUp" ? (o((r) => (r + e.length - 1) % e.length), !0) : l.key === "ArrowDown" ? (o((r) => (r + 1) % e.length), !0) : l.key === "Enter" ? (e[n] && t(e[n]), !0) : !1
11
+ })), e.length ? /* @__PURE__ */ d("div", { role: "listbox", "aria-label": "Mention suggestions", className: "z-popover overflow-hidden rounded-ds-md border border-border bg-layer-01 shadow-02", children: e.map((l, r) => /* @__PURE__ */ s(
12
+ "button",
13
+ {
14
+ type: "button",
15
+ role: "option",
16
+ "aria-selected": r === n,
17
+ onClick: () => t(l),
18
+ className: f(
19
+ "flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
20
+ r === n ? "bg-layer-02 text-text-primary" : "text-text-secondary hover:bg-layer-02"
21
+ ),
22
+ children: [
23
+ l.avatar ? /* @__PURE__ */ d("img", { src: l.avatar, alt: "", className: "h-ico-md w-ico-md rounded-ds-full object-cover" }) : /* @__PURE__ */ d("span", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-interactive/10 text-[10px] font-semibold text-interactive", children: l.label.charAt(0).toUpperCase() }),
24
+ /* @__PURE__ */ d("span", { children: l.label })
25
+ ]
26
+ },
27
+ l.id
28
+ )) }) : null;
29
+ }
30
+ );
31
+ c.displayName = "MentionList";
32
+ function y() {
33
+ return () => {
34
+ let e = null, t = null, a = null;
35
+ return {
36
+ onStart: (n) => {
37
+ var l;
38
+ t = document.createElement("div"), t.style.position = "absolute", t.style.zIndex = "1400";
39
+ const o = (l = n.clientRect) == null ? void 0 : l.call(n);
40
+ o && (t.style.left = `${o.left}px`, t.style.top = `${o.bottom + 4}px`), document.body.appendChild(t), e = u.createRoot(t), e.render(
41
+ /* @__PURE__ */ d(
42
+ c,
43
+ {
44
+ ref: (r) => {
45
+ a = r;
46
+ },
47
+ items: n.items,
48
+ command: (r) => n.command({ id: r.id, label: r.label })
49
+ }
50
+ )
51
+ );
52
+ },
53
+ onUpdate: (n) => {
54
+ var l;
55
+ if (!e || !t) return;
56
+ const o = (l = n.clientRect) == null ? void 0 : l.call(n);
57
+ o && (t.style.left = `${o.left}px`, t.style.top = `${o.bottom + 4}px`), e.render(
58
+ /* @__PURE__ */ d(
59
+ c,
60
+ {
61
+ ref: (r) => {
62
+ a = r;
63
+ },
64
+ items: n.items,
65
+ command: (r) => n.command({ id: r.id, label: r.label })
66
+ }
67
+ )
68
+ );
69
+ },
70
+ onKeyDown: (n) => n.event.key === "Escape" ? (t && (e == null || e.unmount(), t.remove(), t = null, e = null), !0) : (a == null ? void 0 : a.onKeyDown(n)) ?? !1,
71
+ onExit: () => {
72
+ t && (e == null || e.unmount(), t.remove(), t = null, e = null);
73
+ }
74
+ };
75
+ };
76
+ }
77
+ export {
78
+ y as createSuggestionRenderer
79
+ };
@@ -26,7 +26,7 @@ export type { AvatarGroupProps, AvatarUser } from './avatar-group';
26
26
  export { PriorityIndicator } from './priority-indicator';
27
27
  export type { PriorityIndicatorProps, Priority } from './priority-indicator';
28
28
  export { RichTextEditor, RichTextViewer } from './rich-text-editor';
29
- export type { RichTextEditorProps, RichTextViewerProps } from './rich-text-editor';
29
+ export type { RichTextEditorProps, RichTextViewerProps, MentionItem } from './rich-text-editor';
30
30
  export { DatePicker, DateRangePicker, CalendarGrid, TimePicker, DateTimePicker, Presets, useCalendar, YearPicker, MonthPicker } from './date-picker';
31
31
  export type { DatePickerProps, DateRangePickerProps, CalendarGridProps, CalendarEvent, TimePickerProps, DateTimePickerProps, PresetsProps, PresetKey, YearPickerProps, MonthPickerProps } from './date-picker';
32
32
  export { CardSkeleton, TableSkeleton, BoardSkeleton, ListSkeleton } from './loading-skeleton';
@@ -44,5 +44,7 @@ export { SimpleTooltip } from './simple-tooltip';
44
44
  export type { SimpleTooltipProps } from './simple-tooltip';
45
45
  export { ScheduleView } from './schedule-view';
46
46
  export type { ScheduleViewProps, ScheduleEvent } from './schedule-view';
47
+ export { ConfirmDialog } from './confirm-dialog';
48
+ export type { ConfirmDialogProps } from './confirm-dialog';
47
49
  export { getInitials } from './lib/string-utils';
48
50
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composed/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACjE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACjE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,YAAY,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE5E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAElF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EA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eAAe,CAAA;AAE9M,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC7F,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtH,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEvF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { PageHeader as o } from "./page-header.js";
3
3
  import { ContentCard as a, contentCardVariants as m } from "./content-card.js";
4
- import { StatusBadge as i, statusBadgeVariants as x } from "./status-badge.js";
4
+ import { StatusBadge as p, statusBadgeVariants as x } from "./status-badge.js";
5
5
  import { EmptyState as n } from "./empty-state.js";
6
6
  import { AvatarGroup as d } from "./avatar-group.js";
7
7
  import { PriorityIndicator as s } from "./priority-indicator.js";
8
8
  import { RichTextEditor as P, RichTextViewer as S } from "./rich-text-editor.js";
9
- import { BoardSkeleton as T, CardSkeleton as g, ListSkeleton as D, TableSkeleton as h } from "./loading-skeleton.js";
9
+ import { BoardSkeleton as g, CardSkeleton as D, ListSkeleton as T, TableSkeleton as h } from "./loading-skeleton.js";
10
10
  import { DashboardSkeleton as b, ProjectListSkeleton as V, TaskDetailSkeleton as y } from "./page-skeletons.js";
11
11
  import { ErrorDisplay as E } from "./error-boundary.js";
12
12
  import { GlobalLoading as L } from "./global-loading.js";
@@ -14,48 +14,50 @@ import { CommandPalette as w } from "./command-palette.js";
14
14
  import { MemberPicker as M } from "./member-picker.js";
15
15
  import { SimpleTooltip as v } from "./simple-tooltip.js";
16
16
  import { ScheduleView as H } from "./schedule-view.js";
17
- import { getInitials as q } from "./lib/string-utils.js";
18
- import { CalendarGrid as F } from "./date-picker/calendar-grid.js";
19
- import { DatePicker as K } from "./date-picker/date-picker.js";
20
- import { DateRangePicker as O } from "./date-picker/date-range-picker.js";
21
- import { DateTimePicker as U } from "./date-picker/date-time-picker.js";
22
- import { MonthPicker as X } from "./date-picker/month-picker.js";
23
- import { Presets as _ } from "./date-picker/presets.js";
24
- import { TimePicker as ee } from "./date-picker/time-picker.js";
25
- import { YearPicker as oe } from "./date-picker/year-picker.js";
26
- import { useCalendar as ae } from "./date-picker/use-calendar.js";
17
+ import { ConfirmDialog as q } from "./confirm-dialog.js";
18
+ import { getInitials as F } from "./lib/string-utils.js";
19
+ import { CalendarGrid as K } from "./date-picker/calendar-grid.js";
20
+ import { DatePicker as O } from "./date-picker/date-picker.js";
21
+ import { DateRangePicker as U } from "./date-picker/date-range-picker.js";
22
+ import { DateTimePicker as X } from "./date-picker/date-time-picker.js";
23
+ import { MonthPicker as _ } from "./date-picker/month-picker.js";
24
+ import { Presets as rr } from "./date-picker/presets.js";
25
+ import { TimePicker as or } from "./date-picker/time-picker.js";
26
+ import { YearPicker as ar } from "./date-picker/year-picker.js";
27
+ import { useCalendar as ir } from "./date-picker/use-calendar.js";
27
28
  export {
28
29
  d as AvatarGroup,
29
- T as BoardSkeleton,
30
- F as CalendarGrid,
31
- g as CardSkeleton,
30
+ g as BoardSkeleton,
31
+ K as CalendarGrid,
32
+ D as CardSkeleton,
32
33
  w as CommandPalette,
34
+ q as ConfirmDialog,
33
35
  a as ContentCard,
34
36
  b as DashboardSkeleton,
35
- K as DatePicker,
36
- O as DateRangePicker,
37
- U as DateTimePicker,
37
+ O as DatePicker,
38
+ U as DateRangePicker,
39
+ X as DateTimePicker,
38
40
  n as EmptyState,
39
41
  E as ErrorDisplay,
40
42
  L as GlobalLoading,
41
- D as ListSkeleton,
43
+ T as ListSkeleton,
42
44
  M as MemberPicker,
43
- X as MonthPicker,
45
+ _ as MonthPicker,
44
46
  o as PageHeader,
45
- _ as Presets,
47
+ rr as Presets,
46
48
  s as PriorityIndicator,
47
49
  V as ProjectListSkeleton,
48
50
  P as RichTextEditor,
49
51
  S as RichTextViewer,
50
52
  H as ScheduleView,
51
53
  v as SimpleTooltip,
52
- i as StatusBadge,
54
+ p as StatusBadge,
53
55
  h as TableSkeleton,
54
56
  y as TaskDetailSkeleton,
55
- ee as TimePicker,
56
- oe as YearPicker,
57
+ or as TimePicker,
58
+ ar as YearPicker,
57
59
  m as contentCardVariants,
58
- q as getInitials,
60
+ F as getInitials,
59
61
  x as statusBadgeVariants,
60
- ae as useCalendar
62
+ ir as useCalendar
61
63
  };
@@ -1,11 +1,30 @@
1
1
  "use client";
2
2
  import * as React from 'react';
3
+ export interface MentionItem {
4
+ id: string;
5
+ label: string;
6
+ avatar?: string;
7
+ }
3
8
  export interface RichTextEditorProps {
4
9
  content?: string;
5
10
  placeholder?: string;
6
11
  onChange?: (html: string) => void;
7
12
  className?: string;
8
13
  editable?: boolean;
14
+ /** Called when an image is pasted/dropped. Return a URL. If not provided, images inline as base64. */
15
+ onImageUpload?: (file: File) => Promise<string>;
16
+ /** Called when a non-image file is dropped/pasted. If not provided, non-image files are ignored. */
17
+ onFileUpload?: (file: File) => Promise<{
18
+ url: string;
19
+ name: string;
20
+ size: number;
21
+ }>;
22
+ /** Static list of mentionable items */
23
+ mentions?: MentionItem[];
24
+ /** Async mention search. Takes precedence over static list. */
25
+ onMentionSearch?: (query: string) => Promise<MentionItem[]>;
26
+ /** Called when a mention is selected */
27
+ onMentionSelect?: (item: MentionItem) => void;
9
28
  }
10
29
  declare const RichTextEditor: React.ForwardRefExoticComponent<RichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
11
30
  export interface RichTextViewerProps {
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../src/composed/rich-text-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqJ9B,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,cAAc,4FAiEnB,CAAA;AAID,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,cAAc,4FAoCnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../src/composed/rich-text-editor.tsx"],"names":[],"mappings":"AAEA,O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