@devalok/shilp-sutra 0.46.0 → 0.48.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.
- package/AGENTS.md +37 -1
- package/BREAKING.json +46 -0
- package/MIGRATION.md +45 -0
- package/dist/_chunks/emoji-suggestion.js +124 -0
- package/dist/_chunks/emoji-suggestion.js.map +1 -0
- package/dist/_chunks/emoji.js +1115 -0
- package/dist/_chunks/emoji.js.map +1 -0
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/composed/emoji-picker.d.ts +19 -9
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +87 -68
- package/dist/composed/emoji-picker.js.map +1 -1
- package/dist/composed/extensions/emoji-data.d.ts +1 -14
- package/dist/composed/extensions/emoji-data.d.ts.map +1 -1
- package/dist/composed/extensions/emoji-node.d.ts +0 -3
- package/dist/composed/extensions/emoji-node.d.ts.map +1 -1
- package/dist/composed/extensions/emoji-node.js +9 -34
- package/dist/composed/extensions/emoji-node.js.map +1 -1
- package/dist/composed/extensions/emoji-suggestion.d.ts +2 -2
- package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
- package/dist/composed/extensions/emoji-suggestion.js +2 -116
- package/dist/composed/rich-chat-input.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.js +554 -575
- package/dist/composed/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +167 -190
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/docs/components/composed/emoji-picker.md +19 -17
- package/docs/components/composed/rich-text-editor.md +1 -1
- package/docs/components/ui/table-row-link.md +1 -1
- package/docs/recipes/index.md +1 -1
- package/docs/recipes/install-astro.md +15 -12
- package/docs/recipes/install-next-app-router.md +20 -12
- package/docs/recipes/install-next-pages.md +3 -1
- package/docs/recipes/install-remix.md +16 -13
- package/docs/recipes/install-tanstack-start.md +108 -54
- package/docs/recipes/install-vite.md +18 -15
- package/docs/recipes/troubleshoot.md +7 -8
- package/llms.txt +2 -2
- package/mcp-manifest.json +54 -48
- package/mcp-manifest.schema.json +6 -0
- package/package.json +7 -10
- package/scripts/welcome.mjs +4 -2
- package/skill/SKILL.md +1 -1
- package/skill/references/components.md +2 -2
- package/skill/references/setup-astro.md +15 -12
- package/skill/references/setup-next-app-router.md +20 -12
- package/skill/references/setup-next-pages.md +3 -1
- package/skill/references/setup-remix.md +16 -13
- package/skill/references/setup-tanstack-start.md +108 -54
- package/skill/references/setup-vite.md +18 -15
- package/skill/references/troubleshoot.md +7 -8
- package/dist/_chunks/emoji-data.js +0 -45
- package/dist/_chunks/emoji-data.js.map +0 -1
- package/dist/composed/extensions/emoji-suggestion.js.map +0 -1
|
@@ -5,17 +5,30 @@ export interface EmojiData {
|
|
|
5
5
|
native: string;
|
|
6
6
|
shortcodes?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Emoji art styles (apple/google/twitter/facebook) were removed in
|
|
10
|
+
* the frimousse migration — the picker is native-only. Retained for source
|
|
11
|
+
* compatibility; the `set` prop is now a no-op.
|
|
12
|
+
*/
|
|
8
13
|
export type EmojiSet = 'native' | 'apple' | 'google' | 'twitter' | 'facebook';
|
|
9
14
|
export interface EmojiPickerProps {
|
|
10
15
|
onSelect: (emoji: EmojiData) => void;
|
|
11
|
-
/**
|
|
16
|
+
/** @deprecated no-op — the picker renders native emoji only. */
|
|
12
17
|
set?: EmojiSet;
|
|
13
|
-
/** @
|
|
18
|
+
/** @deprecated no-op — theme follows the surrounding `.dark` class via tokens. */
|
|
14
19
|
theme?: 'auto' | 'light' | 'dark';
|
|
15
|
-
/** @
|
|
20
|
+
/** @deprecated no-op — removed with the emoji-mart → frimousse migration. */
|
|
16
21
|
previewPosition?: 'top' | 'bottom' | 'none';
|
|
17
|
-
/** @
|
|
22
|
+
/** @deprecated no-op — removed with the emoji-mart → frimousse migration. */
|
|
18
23
|
skinTonePosition?: 'search' | 'preview' | 'none';
|
|
24
|
+
/**
|
|
25
|
+
* Base URL the emoji dataset is fetched from (`${emojibaseUrl}/${locale}/data.json`).
|
|
26
|
+
* Defaults to frimousse's jsdelivr CDN. Point it at a self-hosted copy of the
|
|
27
|
+
* `emojibase-data` package to remove the runtime CDN dependency (CSP / offline /
|
|
28
|
+
* air-gapped) — e.g. copy `node_modules/emojibase-data` into `public/emojibase`
|
|
29
|
+
* and pass `emojibaseUrl="/emojibase"`.
|
|
30
|
+
*/
|
|
31
|
+
emojibaseUrl?: string;
|
|
19
32
|
className?: string;
|
|
20
33
|
}
|
|
21
34
|
export interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
@@ -23,14 +36,11 @@ export interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
|
23
36
|
/** @default 'start' */
|
|
24
37
|
align?: 'start' | 'center' | 'end';
|
|
25
38
|
}
|
|
26
|
-
|
|
27
|
-
default: unknown;
|
|
28
|
-
}>>;
|
|
29
|
-
declare function EmojiPicker({ onSelect, set, theme, previewPosition, skinTonePosition, className, }: EmojiPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare function EmojiPicker({ onSelect, emojibaseUrl, className }: EmojiPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
40
|
declare namespace EmojiPicker {
|
|
31
41
|
var displayName: string;
|
|
32
42
|
}
|
|
33
|
-
declare function EmojiPickerPopover({ children, align, onSelect,
|
|
43
|
+
declare function EmojiPickerPopover({ children, align, onSelect, emojibaseUrl, className, }: EmojiPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
34
44
|
declare namespace EmojiPickerPopover {
|
|
35
45
|
var displayName: string;
|
|
36
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-picker.d.ts","sourceRoot":"","sources":["../../src/composed/emoji-picker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":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;AA+B3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1,88 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { n as e } from "../_chunks/emoji.js";
|
|
3
3
|
import { cn as t } from "../ui/lib/utils.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import { AnimatePresence as l, motion as u } from "framer-motion";
|
|
4
|
+
import { i as n, r, t as i } from "../_chunks/popover.js";
|
|
5
|
+
import * as a from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
7
|
//#region src/composed/emoji-picker.tsx
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
facebook: () => import("@emoji-mart/data/sets/15/facebook.json")
|
|
16
|
-
};
|
|
17
|
-
function p(e) {
|
|
18
|
-
return e === "auto" ? typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light" : e;
|
|
8
|
+
function c(e) {
|
|
9
|
+
return {
|
|
10
|
+
id: e.label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, ""),
|
|
11
|
+
native: e.emoji
|
|
12
|
+
};
|
|
19
13
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
animate: {
|
|
32
|
-
opacity: 1,
|
|
33
|
-
scale: 1
|
|
34
|
-
},
|
|
35
|
-
transition: e.snappy,
|
|
36
|
-
className: h,
|
|
37
|
-
children: /* @__PURE__ */ s(o.Suspense, {
|
|
38
|
-
fallback: /* @__PURE__ */ s("div", {
|
|
39
|
-
className: t("rounded-surface", h),
|
|
40
|
-
children: /* @__PURE__ */ s(n, { className: "h-[435px] w-[352px] rounded-surface" })
|
|
41
|
-
}),
|
|
42
|
-
children: /* @__PURE__ */ s(d, {
|
|
43
|
-
data: v,
|
|
44
|
-
set: i,
|
|
45
|
-
onEmojiSelect: r,
|
|
46
|
-
theme: p(a),
|
|
47
|
-
previewPosition: c,
|
|
48
|
-
skinTonePosition: m
|
|
14
|
+
function l({ onSelect: n, emojibaseUrl: r, className: i }) {
|
|
15
|
+
return /* @__PURE__ */ s(e.Root, {
|
|
16
|
+
onEmojiSelect: (e) => n(c(e)),
|
|
17
|
+
emojibaseUrl: r,
|
|
18
|
+
className: t("isolate flex h-[435px] w-[352px] flex-col rounded-surface bg-surface-overlay text-surface-fg shadow-raised-hover", i),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ o("div", {
|
|
21
|
+
className: "p-ds-03",
|
|
22
|
+
children: /* @__PURE__ */ o(e.Search, {
|
|
23
|
+
placeholder: "Search emoji…",
|
|
24
|
+
className: "w-full rounded-control bg-surface-raised px-ds-03 py-ds-02b text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle focus-ring"
|
|
49
25
|
})
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ s(e.Viewport, {
|
|
28
|
+
className: "relative flex-1 overflow-y-auto",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ o(e.Loading, {
|
|
31
|
+
className: "absolute inset-0 flex items-center justify-center text-ds-sm text-surface-fg-muted",
|
|
32
|
+
children: "Loading…"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ o(e.Empty, {
|
|
35
|
+
className: "absolute inset-0 flex items-center justify-center text-ds-sm text-surface-fg-muted",
|
|
36
|
+
children: "No emoji found."
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ o(e.List, {
|
|
39
|
+
className: "select-none pb-ds-02",
|
|
40
|
+
components: {
|
|
41
|
+
CategoryHeader: ({ category: e, ...t }) => /* @__PURE__ */ o("div", {
|
|
42
|
+
className: "bg-surface-overlay px-ds-03 pb-ds-01 pt-ds-03 text-ds-xs font-medium text-surface-fg-muted",
|
|
43
|
+
...t,
|
|
44
|
+
children: e.label
|
|
45
|
+
}),
|
|
46
|
+
Row: ({ children: e, ...t }) => /* @__PURE__ */ o("div", {
|
|
47
|
+
className: "flex",
|
|
48
|
+
...t,
|
|
49
|
+
children: e
|
|
50
|
+
}),
|
|
51
|
+
Emoji: ({ emoji: e, ...n }) => /* @__PURE__ */ o("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
className: t("flex aspect-square w-[calc(100%/var(--frimousse-list-columns))] items-center justify-center rounded-control text-[1.375rem] leading-none", "hover:bg-surface-raised", e.isActive && "bg-surface-raised"),
|
|
54
|
+
...n,
|
|
55
|
+
children: e.emoji
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ s("div", {
|
|
62
|
+
className: "flex items-center justify-between gap-ds-02 border-t border-surface-border-subtle p-ds-02",
|
|
63
|
+
children: [/* @__PURE__ */ o(e.ActiveEmoji, { children: ({ emoji: e }) => e ? /* @__PURE__ */ s("span", {
|
|
64
|
+
className: "flex min-w-0 items-center gap-ds-02 text-ds-sm text-surface-fg-muted",
|
|
65
|
+
children: [/* @__PURE__ */ o("span", {
|
|
66
|
+
className: "text-[1.375rem] leading-none",
|
|
67
|
+
children: e.emoji
|
|
68
|
+
}), /* @__PURE__ */ o("span", {
|
|
69
|
+
className: "truncate",
|
|
70
|
+
children: e.label
|
|
71
|
+
})]
|
|
72
|
+
}) : /* @__PURE__ */ o("span", {
|
|
73
|
+
className: "text-ds-sm text-surface-fg-subtle",
|
|
74
|
+
children: "Pick an emoji…"
|
|
75
|
+
}) }), /* @__PURE__ */ o(e.SkinToneSelector, {
|
|
76
|
+
"aria-label": "Change skin tone",
|
|
77
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-control text-[1.25rem] leading-none hover:bg-surface-raised focus-ring"
|
|
78
|
+
})]
|
|
50
79
|
})
|
|
51
|
-
|
|
52
|
-
initial: { opacity: 0 },
|
|
53
|
-
animate: { opacity: 1 },
|
|
54
|
-
exit: { opacity: 0 },
|
|
55
|
-
transition: e.snappy,
|
|
56
|
-
className: t("rounded-surface", h),
|
|
57
|
-
children: /* @__PURE__ */ s(n, { className: "h-[435px] w-[352px] rounded-surface" })
|
|
58
|
-
}, "skeleton")
|
|
80
|
+
]
|
|
59
81
|
});
|
|
60
82
|
}
|
|
61
|
-
function
|
|
62
|
-
let [
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
open:
|
|
65
|
-
onOpenChange:
|
|
66
|
-
children: [/* @__PURE__ */
|
|
83
|
+
function u({ children: e, align: t = "start", onSelect: c, emojibaseUrl: u, className: d }) {
|
|
84
|
+
let [f, p] = a.useState(!1);
|
|
85
|
+
return /* @__PURE__ */ s(i, {
|
|
86
|
+
open: f,
|
|
87
|
+
onOpenChange: p,
|
|
88
|
+
children: [/* @__PURE__ */ o(n, {
|
|
67
89
|
asChild: !0,
|
|
68
90
|
children: e
|
|
69
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ o(r, {
|
|
70
92
|
align: t,
|
|
71
93
|
className: "w-auto border-none bg-transparent p-0 shadow-none",
|
|
72
94
|
sideOffset: 8,
|
|
73
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ o(l, {
|
|
74
96
|
onSelect: (e) => {
|
|
75
|
-
|
|
97
|
+
c(e), p(!1);
|
|
76
98
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
previewPosition: d,
|
|
80
|
-
skinTonePosition: f,
|
|
81
|
-
className: p
|
|
99
|
+
emojibaseUrl: u,
|
|
100
|
+
className: d
|
|
82
101
|
})
|
|
83
102
|
})]
|
|
84
103
|
});
|
|
85
104
|
}
|
|
86
|
-
|
|
105
|
+
l.displayName = "EmojiPicker", u.displayName = "EmojiPickerPopover";
|
|
87
106
|
//#endregion
|
|
88
|
-
export {
|
|
107
|
+
export { l as EmojiPicker, u as EmojiPickerPopover };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-picker.js","names":[],"sources":["../../src/composed/emoji-picker.tsx"],"sourcesContent":["'use client'\n\nimport {
|
|
1
|
+
{"version":3,"file":"emoji-picker.js","names":[],"sources":["../../src/composed/emoji-picker.tsx"],"sourcesContent":["'use client'\n\nimport { EmojiPicker as Frimousse } from 'frimousse'\nimport * as React from 'react'\n\nimport { cn } from '../ui/lib/utils'\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '../ui/popover'\n\n// ============================================================\n// Types\n// ============================================================\n\nexport interface EmojiData {\n id: string\n native: string\n shortcodes?: string\n}\n\n/**\n * @deprecated Emoji art styles (apple/google/twitter/facebook) were removed in\n * the frimousse migration — the picker is native-only. Retained for source\n * compatibility; the `set` prop is now a no-op.\n */\nexport type EmojiSet = 'native' | 'apple' | 'google' | 'twitter' | 'facebook'\n\nexport interface EmojiPickerProps {\n onSelect: (emoji: EmojiData) => void\n /** @deprecated no-op — the picker renders native emoji only. */\n set?: EmojiSet\n /** @deprecated no-op — theme follows the surrounding `.dark` class via tokens. */\n theme?: 'auto' | 'light' | 'dark'\n /** @deprecated no-op — removed with the emoji-mart → frimousse migration. */\n previewPosition?: 'top' | 'bottom' | 'none'\n /** @deprecated no-op — removed with the emoji-mart → frimousse migration. */\n skinTonePosition?: 'search' | 'preview' | 'none'\n /**\n * Base URL the emoji dataset is fetched from (`${emojibaseUrl}/${locale}/data.json`).\n * Defaults to frimousse's jsdelivr CDN. Point it at a self-hosted copy of the\n * `emojibase-data` package to remove the runtime CDN dependency (CSP / offline /\n * air-gapped) — e.g. copy `node_modules/emojibase-data` into `public/emojibase`\n * and pass `emojibaseUrl=\"/emojibase\"`.\n */\n emojibaseUrl?: string\n className?: string\n}\n\nexport interface EmojiPickerPopoverProps extends EmojiPickerProps {\n children: React.ReactNode\n /** @default 'start' */\n align?: 'start' | 'center' | 'end'\n}\n\n// frimousse emits `{ emoji: nativeChar, label }`. Map to the DS EmojiData shape;\n// `id` is a kebab of the label (emojibase has no emoji-mart-style short id).\nfunction toEmojiData(e: { emoji: string; label: string }): EmojiData {\n const id = e.label.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '')\n return { id, native: e.emoji }\n}\n\n// ============================================================\n// EmojiPicker (frimousse, native-only)\n// ============================================================\n\nfunction EmojiPicker({ onSelect, emojibaseUrl, className }: EmojiPickerProps) {\n return (\n <Frimousse.Root\n onEmojiSelect={(e) => onSelect(toEmojiData(e))}\n emojibaseUrl={emojibaseUrl}\n className={cn(\n 'isolate flex h-[435px] w-[352px] flex-col rounded-surface bg-surface-overlay text-surface-fg shadow-raised-hover',\n className,\n )}\n >\n <div className=\"p-ds-03\">\n <Frimousse.Search\n placeholder=\"Search emoji…\"\n className=\"w-full rounded-control bg-surface-raised px-ds-03 py-ds-02b text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle focus-ring\"\n />\n </div>\n <Frimousse.Viewport className=\"relative flex-1 overflow-y-auto\">\n <Frimousse.Loading className=\"absolute inset-0 flex items-center justify-center text-ds-sm text-surface-fg-muted\">\n Loading…\n </Frimousse.Loading>\n <Frimousse.Empty className=\"absolute inset-0 flex items-center justify-center text-ds-sm text-surface-fg-muted\">\n No emoji found.\n </Frimousse.Empty>\n <Frimousse.List\n className=\"select-none pb-ds-02\"\n components={{\n CategoryHeader: ({ category, ...props }) => (\n <div\n className=\"bg-surface-overlay px-ds-03 pb-ds-01 pt-ds-03 text-ds-xs font-medium text-surface-fg-muted\"\n {...props}\n >\n {category.label}\n </div>\n ),\n Row: ({ children, ...props }) => (\n <div className=\"flex\" {...props}>\n {children}\n </div>\n ),\n // Width is the frimousse column width (viewport ÷ --frimousse-list-columns)\n // so a full row spans edge-to-edge — no fixed size, no right-hand gutter.\n Emoji: ({ emoji, ...props }) => (\n <button\n type=\"button\"\n className={cn(\n 'flex aspect-square w-[calc(100%/var(--frimousse-list-columns))] items-center justify-center rounded-control text-[1.375rem] leading-none',\n 'hover:bg-surface-raised',\n emoji.isActive && 'bg-surface-raised',\n )}\n {...props}\n >\n {emoji.emoji}\n </button>\n ),\n }}\n />\n </Frimousse.Viewport>\n <div className=\"flex items-center justify-between gap-ds-02 border-t border-surface-border-subtle p-ds-02\">\n <Frimousse.ActiveEmoji>\n {({ emoji }) =>\n emoji ? (\n <span className=\"flex min-w-0 items-center gap-ds-02 text-ds-sm text-surface-fg-muted\">\n <span className=\"text-[1.375rem] leading-none\">{emoji.emoji}</span>\n <span className=\"truncate\">{emoji.label}</span>\n </span>\n ) : (\n <span className=\"text-ds-sm text-surface-fg-subtle\">Pick an emoji…</span>\n )\n }\n </Frimousse.ActiveEmoji>\n <Frimousse.SkinToneSelector\n aria-label=\"Change skin tone\"\n className=\"flex size-8 shrink-0 items-center justify-center rounded-control text-[1.25rem] leading-none hover:bg-surface-raised focus-ring\"\n />\n </div>\n </Frimousse.Root>\n )\n}\n\n// ============================================================\n// EmojiPickerPopover\n// ============================================================\n\nfunction EmojiPickerPopover({\n children,\n align = 'start',\n onSelect,\n emojibaseUrl,\n className,\n}: EmojiPickerPopoverProps) {\n const [open, setOpen] = React.useState(false)\n\n const handleSelect = (emoji: EmojiData) => {\n onSelect(emoji)\n setOpen(false)\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>{children}</PopoverTrigger>\n <PopoverContent\n align={align}\n className=\"w-auto border-none bg-transparent p-0 shadow-none\"\n sideOffset={8}\n >\n <EmojiPicker onSelect={handleSelect} emojibaseUrl={emojibaseUrl} className={className} />\n </PopoverContent>\n </Popover>\n )\n}\n\nEmojiPicker.displayName = 'EmojiPicker'\nEmojiPickerPopover.displayName = 'EmojiPickerPopover'\n\nexport { EmojiPicker, EmojiPickerPopover }\n"],"mappings":";;;;;;;AA0DA,SAAS,EAAY,GAAgD;AAEnE,QAAO;EAAE,IADE,EA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AC,EAAU,kBAAX;KACE,cAAW;KACX,WAAU;KACV,CAAA,CACE;;GACS;;;AAQrB,SAAS,EAAmB,EAC1B,aACA,WAAQ,SACR,aACA,iBACA,gBAC0B;CAC1B,IAAM,CAAC,GAAM,KAAW,EAAM,SAAS,GAAM;AAO7C,QACE,kBAAC,GAAD;EAAe;EAAM,cAAc;YAAnC,CACE,kBAAC,GAAD;GAAgB,SAAA;GAAS;GAA0B,CAAA,EACnD,kBAAC,GAAD;GACS;GACP,WAAU;GACV,YAAY;aAEZ,kBAAC,GAAD;IAAa,WAbG,MAAqB;AAEzC,KADA,EAAS,EAAM,EACf,EAAQ,GAAM;;IAWyC;IAAyB;IAAa,CAAA;GAC1E,CAAA,CACT;;;AAId,EAAY,cAAc,eAC1B,EAAmB,cAAc"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export declare const SPRITESHEET_URL: (set: string) => string;
|
|
3
|
-
export declare const SHEET_COLS = 61;
|
|
4
|
-
export declare const SHEET_ROWS = 61;
|
|
5
2
|
interface EmojiSkin {
|
|
6
|
-
unified: string;
|
|
7
3
|
native: string;
|
|
8
|
-
x?: number;
|
|
9
|
-
y?: number;
|
|
10
4
|
}
|
|
11
5
|
interface EmojiEntry {
|
|
12
6
|
id: string;
|
|
@@ -16,20 +10,13 @@ interface EmojiEntry {
|
|
|
16
10
|
}
|
|
17
11
|
export interface EmojiDataset {
|
|
18
12
|
emojis: Record<string, EmojiEntry>;
|
|
19
|
-
sheet?: {
|
|
20
|
-
cols: number;
|
|
21
|
-
rows: number;
|
|
22
|
-
};
|
|
23
13
|
}
|
|
24
14
|
export interface ResolvedEmoji {
|
|
25
15
|
id: string;
|
|
26
16
|
name: string;
|
|
27
17
|
native: string;
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
18
|
}
|
|
31
|
-
export declare function loadEmojiData(
|
|
32
|
-
export declare function lookupEmoji(data: EmojiDataset, id: string): ResolvedEmoji | null;
|
|
19
|
+
export declare function loadEmojiData(): Promise<EmojiDataset>;
|
|
33
20
|
export declare function searchEmoji(data: EmojiDataset, query: string, limit?: number): ResolvedEmoji[];
|
|
34
21
|
export {};
|
|
35
22
|
//# sourceMappingURL=emoji-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-data.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/emoji-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emoji-data.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/emoji-data.ts"],"names":[],"mappings":"AAMA,UAAU,SAAS;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,EAAE,SAAS,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAID,wBAAsB,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,CAK3D;AAMD,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,aAAa,EAAE,CAgBzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-node.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/emoji-node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAKnC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"emoji-node.d.ts","sourceRoot":"","sources":["../../../src/composed/extensions/emoji-node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAKnC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;CACf;AAWD,eAAO,MAAM,SAAS,gBA0CpB,CAAA"}
|
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { _ as e, o as t, s as n } from "../../_chunks/tiptap.js";
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
4
|
//#region src/composed/extensions/emoji-node.tsx
|
|
6
|
-
function
|
|
7
|
-
let { native: n
|
|
8
|
-
|
|
5
|
+
function i({ node: e }) {
|
|
6
|
+
let { native: n } = e.attrs;
|
|
7
|
+
return /* @__PURE__ */ r(t, {
|
|
9
8
|
as: "span",
|
|
10
9
|
className: "inline",
|
|
11
|
-
children: /* @__PURE__ */
|
|
12
|
-
});
|
|
13
|
-
let c = `${100 / 60 * o}% ${100 / 60 * s}%`;
|
|
14
|
-
return /* @__PURE__ */ i(t, {
|
|
15
|
-
as: "span",
|
|
16
|
-
className: "inline",
|
|
17
|
-
children: /* @__PURE__ */ i("span", {
|
|
18
|
-
role: "img",
|
|
19
|
-
"aria-label": n,
|
|
20
|
-
className: "inline-block h-[1.2em] w-[1.2em] align-text-bottom",
|
|
21
|
-
style: {
|
|
22
|
-
backgroundImage: `url(${r(a)})`,
|
|
23
|
-
backgroundSize: "6100% 6100%",
|
|
24
|
-
backgroundPosition: c
|
|
25
|
-
}
|
|
26
|
-
})
|
|
10
|
+
children: /* @__PURE__ */ r("span", { children: n })
|
|
27
11
|
});
|
|
28
12
|
}
|
|
29
|
-
var
|
|
13
|
+
var a = e.create({
|
|
30
14
|
name: "emojiNode",
|
|
31
15
|
group: "inline",
|
|
32
16
|
inline: !0,
|
|
@@ -35,10 +19,7 @@ var o = e.create({
|
|
|
35
19
|
addAttributes() {
|
|
36
20
|
return {
|
|
37
21
|
id: { default: null },
|
|
38
|
-
native: { default: null }
|
|
39
|
-
set: { default: "native" },
|
|
40
|
-
x: { default: 0 },
|
|
41
|
-
y: { default: 0 }
|
|
22
|
+
native: { default: null }
|
|
42
23
|
};
|
|
43
24
|
},
|
|
44
25
|
renderText({ node: e }) {
|
|
@@ -51,9 +32,6 @@ var o = e.create({
|
|
|
51
32
|
let t = e;
|
|
52
33
|
return {
|
|
53
34
|
id: t.getAttribute("data-emoji-id"),
|
|
54
|
-
set: t.getAttribute("data-emoji-set") ?? "native",
|
|
55
|
-
x: parseInt(t.getAttribute("data-emoji-x") ?? "0", 10),
|
|
56
|
-
y: parseInt(t.getAttribute("data-emoji-y") ?? "0", 10),
|
|
57
35
|
native: t.textContent ?? ""
|
|
58
36
|
};
|
|
59
37
|
}
|
|
@@ -64,9 +42,6 @@ var o = e.create({
|
|
|
64
42
|
"span",
|
|
65
43
|
{
|
|
66
44
|
"data-emoji-id": e.attrs.id,
|
|
67
|
-
"data-emoji-set": e.attrs.set,
|
|
68
|
-
"data-emoji-x": e.attrs.x,
|
|
69
|
-
"data-emoji-y": e.attrs.y,
|
|
70
45
|
role: "img",
|
|
71
46
|
"aria-label": e.attrs.native
|
|
72
47
|
},
|
|
@@ -74,8 +49,8 @@ var o = e.create({
|
|
|
74
49
|
];
|
|
75
50
|
},
|
|
76
51
|
addNodeView() {
|
|
77
|
-
return n(
|
|
52
|
+
return n(i);
|
|
78
53
|
}
|
|
79
54
|
});
|
|
80
55
|
//#endregion
|
|
81
|
-
export {
|
|
56
|
+
export { a as EmojiNode };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-node.js","names":[],"sources":["../../../src/composed/extensions/emoji-node.tsx"],"sourcesContent":["import { Node } from '@tiptap/core'\nimport { type NodeViewProps,NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react'\n\
|
|
1
|
+
{"version":3,"file":"emoji-node.js","names":[],"sources":["../../../src/composed/extensions/emoji-node.tsx"],"sourcesContent":["import { Node } from '@tiptap/core'\nimport { type NodeViewProps,NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react'\n\n// Native-only since the frimousse migration — renders the native emoji\n// character. (The emoji-mart spritesheet/art-style rendering was removed.)\nexport interface EmojiNodeAttrs {\n id: string\n native: string\n}\n\nfunction EmojiNodeView({ node }: NodeViewProps) {\n const { native } = node.attrs as EmojiNodeAttrs\n return (\n <NodeViewWrapper as=\"span\" className=\"inline\">\n <span>{native}</span>\n </NodeViewWrapper>\n )\n}\n\nexport const EmojiNode = Node.create({\n name: 'emojiNode',\n group: 'inline',\n inline: true,\n atom: true,\n selectable: false,\n\n addAttributes() {\n return {\n id: { default: null },\n native: { default: null },\n }\n },\n\n renderText({ node }) {\n return node.attrs.native ?? ''\n },\n\n parseHTML() {\n return [{\n tag: 'span[data-emoji-id]',\n getAttrs: (el) => {\n const dom = el as HTMLElement\n return {\n id: dom.getAttribute('data-emoji-id'),\n native: dom.textContent ?? '',\n }\n },\n }]\n },\n\n renderHTML({ node }) {\n return ['span', {\n 'data-emoji-id': node.attrs.id,\n 'role': 'img',\n 'aria-label': node.attrs.native,\n }, node.attrs.native ?? '']\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(EmojiNodeView)\n },\n})\n"],"mappings":";;;AAUA,SAAS,EAAc,EAAE,WAAuB;CAC9C,IAAM,EAAE,cAAW,EAAK;AACxB,QACE,kBAAC,GAAD;EAAiB,IAAG;EAAO,WAAU;YACnC,kBAAC,QAAD,EAAA,UAAO,GAAc,CAAA;EACL,CAAA;;AAItB,IAAa,IAAY,EAAK,OAAO;CACnC,MAAM;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACN,YAAY;CAEZ,gBAAgB;AACd,SAAO;GACL,IAAI,EAAE,SAAS,MAAM;GACrB,QAAQ,EAAE,SAAS,MAAM;GAC1B;;CAGH,WAAW,EAAE,WAAQ;AACnB,SAAO,EAAK,MAAM,UAAU;;CAG9B,YAAY;AACV,SAAO,CAAC;GACN,KAAK;GACL,WAAW,MAAO;IAChB,IAAM,IAAM;AACZ,WAAO;KACL,IAAI,EAAI,aAAa,gBAAgB;KACrC,QAAQ,EAAI,eAAe;KAC5B;;GAEJ,CAAC;;CAGJ,WAAW,EAAE,WAAQ;AACnB,SAAO;GAAC;GAAQ;IACd,iBAAiB,EAAK,MAAM;IAC5B,MAAQ;IACR,cAAc,EAAK,MAAM;IAC1B;GAAE,EAAK,MAAM,UAAU;GAAG;;CAG7B,cAAc;AACZ,SAAO,EAAsB,EAAc;;CAE9C,CAAC"}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
3
|
import { ResolvedEmoji } from './emoji-data';
|
|
4
4
|
export type { ResolvedEmoji as EmojiSuggestionItem };
|
|
5
|
-
/** Factory:
|
|
6
|
-
export declare function createEmojiSuggestion(
|
|
5
|
+
/** Factory: returns the configured `:shortcode:` emoji suggestion extension. */
|
|
6
|
+
export declare function createEmojiSuggestion(): Extension<any, any>;
|
|
7
7
|
//# sourceMappingURL=emoji-suggestion.d.ts.map
|
|
@@ -1 +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;AAOxC,OAAO,EAAiB,KAAK,aAAa,
|
|
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;AAOxC,OAAO,EAAiB,KAAK,aAAa,EAAe,MAAM,cAAc,CAAA;AAG7E,YAAY,EAAE,aAAa,IAAI,mBAAmB,EAAE,CAAA;AAsIpD,gFAAgF;AAChF,wBAAgB,qBAAqB,wBA+BpC"}
|
|
@@ -1,117 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { i, n as a, t as o } from "../../_chunks/emoji-data.js";
|
|
5
|
-
import * as s from "react";
|
|
6
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
import { createRoot as u } from "react-dom/client";
|
|
8
|
-
//#region src/composed/extensions/emoji-suggestion.tsx
|
|
9
|
-
function d({ emoji: e, set: t, size: n = "1.2em" }) {
|
|
10
|
-
return t === "native" ? /* @__PURE__ */ c("span", {
|
|
11
|
-
style: { fontSize: n },
|
|
12
|
-
children: e.native
|
|
13
|
-
}) : /* @__PURE__ */ c("span", {
|
|
14
|
-
role: "img",
|
|
15
|
-
"aria-label": e.native,
|
|
16
|
-
className: "inline-block",
|
|
17
|
-
style: {
|
|
18
|
-
width: n,
|
|
19
|
-
height: n,
|
|
20
|
-
backgroundImage: `url(${o(t)})`,
|
|
21
|
-
backgroundSize: "6100% 6100%",
|
|
22
|
-
backgroundPosition: `${100 / 60 * e.x}% ${100 / 60 * e.y}%`
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
var f = s.forwardRef(({ items: t, set: n, command: r }, i) => {
|
|
27
|
-
let [a, o] = s.useState(0);
|
|
28
|
-
return s.useEffect(() => o(0), [t]), s.useImperativeHandle(i, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (o((e) => (e + t.length - 1) % t.length), !0) : e.key === "ArrowDown" ? (o((e) => (e + 1) % t.length), !0) : e.key === "Enter" ? (t[a] && r(t[a]), !0) : !1 })), t.length ? /* @__PURE__ */ c("div", {
|
|
29
|
-
role: "listbox",
|
|
30
|
-
"aria-label": "Emoji suggestions",
|
|
31
|
-
className: "z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-control bg-surface-overlay shadow-raised-hover",
|
|
32
|
-
children: t.map((t, i) => /* @__PURE__ */ l("button", {
|
|
33
|
-
type: "button",
|
|
34
|
-
role: "option",
|
|
35
|
-
"aria-selected": i === a,
|
|
36
|
-
onClick: () => r(t),
|
|
37
|
-
className: e("flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm", i === a ? "bg-surface-raised text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"),
|
|
38
|
-
children: [/* @__PURE__ */ c(d, {
|
|
39
|
-
emoji: t,
|
|
40
|
-
set: n,
|
|
41
|
-
size: "1.25em"
|
|
42
|
-
}), /* @__PURE__ */ l("span", {
|
|
43
|
-
className: "truncate",
|
|
44
|
-
children: [
|
|
45
|
-
":",
|
|
46
|
-
t.id,
|
|
47
|
-
":"
|
|
48
|
-
]
|
|
49
|
-
})]
|
|
50
|
-
}, t.id))
|
|
51
|
-
}) : null;
|
|
52
|
-
});
|
|
53
|
-
f.displayName = "EmojiList";
|
|
54
|
-
function p(e) {
|
|
55
|
-
return () => {
|
|
56
|
-
let t = null, n = null, r = null;
|
|
57
|
-
return {
|
|
58
|
-
onStart: (i) => {
|
|
59
|
-
n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
|
|
60
|
-
let a = i.clientRect?.();
|
|
61
|
-
a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = u(n), t.render(/* @__PURE__ */ c(f, {
|
|
62
|
-
ref: (e) => {
|
|
63
|
-
r = e;
|
|
64
|
-
},
|
|
65
|
-
items: i.items,
|
|
66
|
-
set: e,
|
|
67
|
-
command: (e) => i.command(e)
|
|
68
|
-
}));
|
|
69
|
-
},
|
|
70
|
-
onUpdate: (i) => {
|
|
71
|
-
if (!t || !n) return;
|
|
72
|
-
let a = i.clientRect?.();
|
|
73
|
-
a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ c(f, {
|
|
74
|
-
ref: (e) => {
|
|
75
|
-
r = e;
|
|
76
|
-
},
|
|
77
|
-
items: i.items,
|
|
78
|
-
set: e,
|
|
79
|
-
command: (e) => i.command(e)
|
|
80
|
-
}));
|
|
81
|
-
},
|
|
82
|
-
onKeyDown: (e) => e.event.key === "Escape" ? (n && (t?.unmount(), n.remove(), n = null, t = null), !0) : r?.onKeyDown(e) ?? !1,
|
|
83
|
-
onExit: () => {
|
|
84
|
-
n && (t?.unmount(), n.remove(), n = null, t = null);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function m(e = "native") {
|
|
90
|
-
return t.create({
|
|
91
|
-
name: "emojiSuggestion",
|
|
92
|
-
addProseMirrorPlugins() {
|
|
93
|
-
return [n({
|
|
94
|
-
pluginKey: new r("emojiSuggestion"),
|
|
95
|
-
editor: this.editor,
|
|
96
|
-
char: ":",
|
|
97
|
-
items: async ({ query: t }) => i(await a(e), t, 8),
|
|
98
|
-
command: ({ editor: t, range: n, props: r }) => {
|
|
99
|
-
let i = r;
|
|
100
|
-
t.chain().focus().deleteRange(n).insertContent({
|
|
101
|
-
type: "emojiNode",
|
|
102
|
-
attrs: {
|
|
103
|
-
id: i.id,
|
|
104
|
-
native: i.native,
|
|
105
|
-
set: e,
|
|
106
|
-
x: i.x,
|
|
107
|
-
y: i.y
|
|
108
|
-
}
|
|
109
|
-
}).run();
|
|
110
|
-
},
|
|
111
|
-
render: p(e)
|
|
112
|
-
})];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
//#endregion
|
|
117
|
-
export { m as createEmojiSuggestion };
|
|
2
|
+
import { t as e } from "../../_chunks/emoji-suggestion.js";
|
|
3
|
+
export { e as createEmojiSuggestion };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-chat-input.d.ts","sourceRoot":"","sources":["../../src/composed/rich-chat-input.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version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