@devalok/shilp-sutra 0.49.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/badge-group.js +4 -4
- package/dist/_chunks/block-shell.js +1 -1
- package/dist/_chunks/chart-container.js +1 -1
- package/dist/_chunks/chat.js +3 -3
- package/dist/_chunks/colors.js +2 -2
- package/dist/_chunks/document-preview.js +4 -4
- package/dist/_chunks/emoji-suggestion.js +5 -5
- package/dist/_chunks/emoji-suggestion.js.map +1 -1
- package/dist/_chunks/emoji.js +1 -1
- package/dist/_chunks/field-state.js +1 -1
- package/dist/_chunks/grid-lines.js +1 -1
- package/dist/_chunks/image-preview.js +7 -7
- package/dist/_chunks/keybinding.js +1 -1
- package/dist/_chunks/link-context.js +1 -1
- package/dist/_chunks/mention-suggestion.js +2 -2
- package/dist/_chunks/mention.js +1 -1
- package/dist/_chunks/motion-provider.js +1 -1
- package/dist/_chunks/normalize-icon.js +1 -1
- package/dist/_chunks/oauth-button.js +2 -2
- package/dist/_chunks/popover.js +17 -17
- package/dist/_chunks/primitives.js +1 -1
- package/dist/_chunks/shared.js +5 -5
- package/dist/_chunks/success.js +4 -4
- package/dist/_chunks/tiptap.js +11 -11
- package/dist/_chunks/tooltip.js +1 -1
- package/dist/_chunks/tree-view.js +2 -2
- package/dist/_chunks/use-calendar.js +1 -1
- package/dist/_chunks/use-controllable-open.js +1 -1
- package/dist/_chunks/vendor-client.js +1 -1
- package/dist/_chunks/vendor-utils.js +1 -1
- package/dist/ai/block-renderer.js +7 -7
- package/dist/ai/blocks/error.js +1 -1
- package/dist/ai/blocks/index.js +2 -2
- package/dist/ai/blocks/text.js +1 -1
- package/dist/ai/command-bar.js +6 -6
- package/dist/ai/conversation.js +2 -2
- package/dist/ai/index.js +3 -3
- package/dist/composed/avatar-group.js +1 -1
- package/dist/composed/bulk-action-bar.js +1 -1
- package/dist/composed/command-palette.js +6 -6
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/index.js +10 -10
- package/dist/composed/emoji-picker.js +4 -4
- package/dist/composed/empty-state.js +1 -1
- package/dist/composed/extensions/emoji-node.js +1 -1
- package/dist/composed/extensions/emoji-suggestion.js +1 -1
- package/dist/composed/file-preview.js +14 -14
- package/dist/composed/filter-bar.js +1 -1
- package/dist/composed/multi-select-popover.js +3 -3
- package/dist/composed/priority-indicator.js +1 -1
- package/dist/composed/responsive-modal.js +21 -21
- package/dist/composed/rich-chat-input.js +445 -445
- package/dist/composed/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.js +28 -28
- package/dist/composed/status-badge.js +1 -1
- package/dist/motion/index.js +2 -2
- package/dist/shell/bottom-navbar.js +2 -2
- package/dist/shell/index.js +2 -2
- package/dist/shell/link-context.js +2 -2
- package/dist/shell/notification-center.js +3 -3
- package/dist/shell/sidebar.js +2 -2
- package/dist/shell/top-bar.js +1 -1
- package/dist/ui/accordion.js +14 -14
- package/dist/ui/alert-dialog.js +31 -31
- package/dist/ui/alert.js +1 -1
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/autocomplete.js +7 -7
- package/dist/ui/avatar.js +15 -15
- package/dist/ui/badge-group.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/banner.js +1 -1
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/button.js +5 -5
- package/dist/ui/card.js +1 -1
- package/dist/ui/charts/area-chart.js +6 -6
- package/dist/ui/charts/bar-chart.js +6 -6
- package/dist/ui/charts/chart-container.js +1 -1
- package/dist/ui/charts/gauge-chart.js +2 -2
- package/dist/ui/charts/index.js +2 -2
- package/dist/ui/charts/line-chart.js +6 -6
- package/dist/ui/charts/pie-chart.js +5 -5
- package/dist/ui/charts/radar-chart.js +5 -5
- package/dist/ui/charts/sparkline.js +2 -2
- package/dist/ui/chat/index.js +2 -2
- package/dist/ui/checkbox.js +5 -5
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.js +4 -4
- package/dist/ui/combobox.js +7 -7
- package/dist/ui/context-menu.js +41 -41
- package/dist/ui/dialog.js +25 -25
- package/dist/ui/dot.js +1 -1
- package/dist/ui/dropdown-menu.js +51 -51
- package/dist/ui/hover-card.js +9 -9
- package/dist/ui/icon-button.js +1 -1
- package/dist/ui/index.js +6 -6
- package/dist/ui/input.js +2 -2
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/utils.js +4 -4
- package/dist/ui/link.js +1 -1
- package/dist/ui/menubar.js +53 -53
- package/dist/ui/navigation-menu.js +27 -27
- package/dist/ui/number-input.js +2 -2
- package/dist/ui/oauth-button/index.js +2 -2
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/popover.js +2 -2
- package/dist/ui/progress.js +2 -2
- package/dist/ui/radio.js +2 -2
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.js +35 -35
- package/dist/ui/separator.js +1 -1
- package/dist/ui/sheet.js +22 -22
- package/dist/ui/sidebar.js +2 -2
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +7 -7
- package/dist/ui/split-button.js +3 -3
- package/dist/ui/stat-card.js +2 -2
- package/dist/ui/stat-flash.js +1 -1
- package/dist/ui/stepper.js +1 -1
- package/dist/ui/surface.js +2 -2
- package/dist/ui/switch.js +2 -2
- package/dist/ui/table-row-link.js +1 -1
- package/dist/ui/tabs.js +13 -13
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +2 -2
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +2 -2
- package/dist/ui/tooltip.js +16 -16
- package/dist/ui/tree-view/index.js +2 -2
- package/llms.txt +1 -1
- package/mcp-manifest.json +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +1 -1
- package/skill/references/components.md +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Slot as e } from "./primitives.js";
|
|
3
3
|
import { durations as t, springs as n } from "../ui/lib/motion.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cva as r } from "./vendor-utils.js";
|
|
5
5
|
import { cn as i } from "../ui/lib/utils.js";
|
|
6
6
|
import { Icon as a } from "../ui/icon.js";
|
|
7
7
|
import { Dot as o } from "../ui/dot.js";
|
|
8
|
-
import {
|
|
8
|
+
import { normalizeIcon as s } from "./normalize-icon.js";
|
|
9
9
|
import { BadgeIndicator as c } from "../ui/badge-indicator.js";
|
|
10
10
|
import * as l from "react";
|
|
11
11
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -297,4 +297,4 @@ function T({ max: e, gap: t = "default", size: n, onOverflowClick: r, className:
|
|
|
297
297
|
}
|
|
298
298
|
T.displayName = "BadgeGroup";
|
|
299
299
|
//#endregion
|
|
300
|
-
export { C as
|
|
300
|
+
export { C as BadgeCompound, T as BadgeGroup, v as badgeVariants };
|
package/dist/_chunks/chat.js
CHANGED
|
@@ -5,11 +5,11 @@ import { cn as i } from "../ui/lib/utils.js";
|
|
|
5
5
|
import { Spinner as a } from "../ui/spinner.js";
|
|
6
6
|
import { Icon as o } from "../ui/icon.js";
|
|
7
7
|
import { Avatar as s, AvatarFallback as c, AvatarImage as l } from "../ui/avatar.js";
|
|
8
|
-
import {
|
|
8
|
+
import { normalizeIcon as u } from "./normalize-icon.js";
|
|
9
9
|
import { Button as d } from "../ui/button.js";
|
|
10
10
|
import { Textarea as f } from "../ui/textarea.js";
|
|
11
11
|
import { Tooltip as p, TooltipContent as m, TooltipTrigger as h } from "../ui/tooltip.js";
|
|
12
|
-
import {
|
|
12
|
+
import { MENTION_TOKEN_CLASS as g } from "./mention.js";
|
|
13
13
|
import * as _ from "react";
|
|
14
14
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
15
|
import { IconAlertCircle as b, IconSend as x, IconSquare as S, IconTrash as C } from "@tabler/icons-react";
|
|
@@ -524,4 +524,4 @@ function q({ label: e = "NEW", count: t, className: n }) {
|
|
|
524
524
|
}
|
|
525
525
|
q.displayName = "UnreadSeparator";
|
|
526
526
|
//#endregion
|
|
527
|
-
export {
|
|
527
|
+
export { D as DateSeparator, B as Message, V as MessageInput, H as MessageList, W as SystemMessage, K as TypingIndicator, q as UnreadSeparator, k as useMessageContext };
|
package/dist/_chunks/colors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useMotion as e } from "./motion-provider.js";
|
|
3
3
|
//#region src/ui/charts/_internal/animation.ts
|
|
4
4
|
function t() {
|
|
5
5
|
let { reducedMotion: t } = e();
|
|
@@ -27,4 +27,4 @@ function a(e, t = 0) {
|
|
|
27
27
|
return e ? r.includes(e) ? i(e) : e : i(r[t % r.length]);
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
|
-
export { n
|
|
30
|
+
export { n as getTransitionDuration, a as resolveColor, t as useReducedMotion };
|
|
@@ -3,7 +3,7 @@ import { tweens as e } from "../ui/lib/motion.js";
|
|
|
3
3
|
import { Icon as t } from "../ui/icon.js";
|
|
4
4
|
import { Skeleton as n } from "../ui/skeleton.js";
|
|
5
5
|
import { Button as r } from "../ui/button.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ErrorFallback as i, Toolbar as a } from "./shared.js";
|
|
7
7
|
import * as o from "react";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
import { IconChevronLeft as l, IconChevronRight as u } from "@tabler/icons-react";
|
|
@@ -30,7 +30,7 @@ function g({ url: g, initialPage: _, onError: v }) {
|
|
|
30
30
|
e >= 1 && e <= y ? S(e) : w(String(x));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
return T ? /* @__PURE__ */ s(
|
|
33
|
+
return T ? /* @__PURE__ */ s(i, {
|
|
34
34
|
message: "Could not load PDF",
|
|
35
35
|
url: g
|
|
36
36
|
}) : /* @__PURE__ */ c("div", {
|
|
@@ -48,7 +48,7 @@ function g({ url: g, initialPage: _, onError: v }) {
|
|
|
48
48
|
E(!0), v?.("PDF failed to load");
|
|
49
49
|
},
|
|
50
50
|
loading: /* @__PURE__ */ s(n, { className: "h-[500px] w-[400px]" }),
|
|
51
|
-
error: /* @__PURE__ */ s(
|
|
51
|
+
error: /* @__PURE__ */ s(i, {
|
|
52
52
|
message: "Failed to load PDF",
|
|
53
53
|
url: g
|
|
54
54
|
}),
|
|
@@ -67,7 +67,7 @@ function g({ url: g, initialPage: _, onError: v }) {
|
|
|
67
67
|
}, x)
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
|
-
}), y > 0 && /* @__PURE__ */ c(
|
|
70
|
+
}), y > 0 && /* @__PURE__ */ c(a, { children: [
|
|
71
71
|
/* @__PURE__ */ s(r, {
|
|
72
72
|
variant: "ghost",
|
|
73
73
|
size: "icon-xs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../ui/lib/utils.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Extension as t, PluginKey as n, index_default$3 as r } from "./tiptap.js";
|
|
4
4
|
import * as i from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
import { createRoot as s } from "react-dom/client";
|
|
@@ -8,7 +8,7 @@ import { createRoot as s } from "react-dom/client";
|
|
|
8
8
|
var c = null;
|
|
9
9
|
async function l() {
|
|
10
10
|
if (c) return c;
|
|
11
|
-
let e = await import("./emoji.js").then((e) => e.
|
|
11
|
+
let e = await import("./emoji.js").then((e) => e.native_exports);
|
|
12
12
|
return c = e.default ?? e, c;
|
|
13
13
|
}
|
|
14
14
|
function u(e) {
|
|
@@ -100,8 +100,8 @@ function h() {
|
|
|
100
100
|
return t.create({
|
|
101
101
|
name: "emojiSuggestion",
|
|
102
102
|
addProseMirrorPlugins() {
|
|
103
|
-
return [
|
|
104
|
-
pluginKey: new
|
|
103
|
+
return [r({
|
|
104
|
+
pluginKey: new n("emojiSuggestion"),
|
|
105
105
|
editor: this.editor,
|
|
106
106
|
char: ":",
|
|
107
107
|
items: async ({ query: e }) => d(await l(), e, 8),
|
|
@@ -121,4 +121,4 @@ function h() {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
//#endregion
|
|
124
|
-
export { h as
|
|
124
|
+
export { h as createEmojiSuggestion };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-suggestion.js","names":[],"sources":["../../src/composed/extensions/emoji-data.ts","../../src/composed/extensions/emoji-suggestion.tsx"],"sourcesContent":["// Emoji dataset for the editors' `:shortcode:` autocomplete. Sources\n// `@emoji-mart/data` — a pure-JSON package with NO react peer, so it is\n// unaffected by the React-19 peer issue that drove the picker off\n// `@emoji-mart/react` (→ frimousse). Native-only since that migration: no\n// spritesheet coordinates, no per-art-style loaders.\n\ninterface EmojiSkin {\n native: string\n}\n\ninterface EmojiEntry {\n id: string\n name: string\n keywords?: string[]\n skins: EmojiSkin[]\n}\n\nexport interface EmojiDataset {\n emojis: Record<string, EmojiEntry>\n}\n\nexport interface ResolvedEmoji {\n id: string\n name: string\n native: string\n}\n\nlet cachedData: EmojiDataset | null = null\n\nexport async function loadEmojiData(): Promise<EmojiDataset> {\n if (cachedData) return cachedData\n const mod = await import('@emoji-mart/data')\n cachedData = ((mod as { default?: EmojiDataset }).default ?? mod) as EmojiDataset\n return cachedData\n}\n\nfunction resolve(entry: EmojiEntry): ResolvedEmoji {\n return { id: entry.id, name: entry.name, native: entry.skins[0]?.native ?? '' }\n}\n\nexport function searchEmoji(data: EmojiDataset, query: string, limit = 8): ResolvedEmoji[] {\n const entries = Object.values(data.emojis)\n if (!query) return entries.slice(0, limit).map(resolve)\n const q = query.toLowerCase()\n const results: ResolvedEmoji[] = []\n for (const e of entries) {\n if (results.length >= limit) break\n if (\n e.id.includes(q) ||\n e.name.toLowerCase().includes(q) ||\n e.keywords?.some((k) => k.includes(q))\n ) {\n results.push(resolve(e))\n }\n }\n return results\n}\n","import { Extension } from '@tiptap/core'\nimport Suggestion, { type SuggestionKeyDownProps,type SuggestionProps } from '@tiptap/suggestion'\nimport { PluginKey } from 'prosemirror-state'\nimport * as React from 'react'\nimport { createRoot, type Root } from 'react-dom/client'\n\nimport { cn } from '../../ui/lib/utils'\nimport { loadEmojiData, type ResolvedEmoji, searchEmoji } from './emoji-data'\n\n// Re-export for external consumers\nexport type { ResolvedEmoji as EmojiSuggestionItem }\n\n// Native-only since the frimousse migration.\nfunction EmojiImage({ emoji, size = '1.2em' }: { emoji: ResolvedEmoji; size?: string }) {\n return <span style={{ fontSize: size }}>{emoji.native}</span>\n}\n\ninterface EmojiListRef {\n onKeyDown: (props: SuggestionKeyDownProps) => boolean\n}\n\ninterface EmojiListProps {\n items: ResolvedEmoji[]\n command: (item: ResolvedEmoji) => void\n}\n\nconst EmojiList = React.forwardRef<EmojiListRef, EmojiListProps>(\n ({ items, command }, ref) => {\n const [selectedIndex, setSelectedIndex] = React.useState(0)\n\n React.useEffect(() => setSelectedIndex(0), [items])\n\n React.useImperativeHandle(ref, () => ({\n onKeyDown: ({ event }: SuggestionKeyDownProps) => {\n if (event.key === 'ArrowUp') {\n setSelectedIndex((i) => (i + items.length - 1) % items.length)\n return true\n }\n if (event.key === 'ArrowDown') {\n setSelectedIndex((i) => (i + 1) % items.length)\n return true\n }\n if (event.key === 'Enter') {\n if (items[selectedIndex]) command(items[selectedIndex])\n return true\n }\n return false\n },\n }))\n\n if (!items.length) return null\n\n return (\n <div role=\"listbox\" aria-label=\"Emoji suggestions\" className=\"z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-control bg-surface-overlay shadow-raised-hover\">\n {items.map((item, index) => (\n <button\n key={item.id}\n type=\"button\"\n role=\"option\"\n aria-selected={index === selectedIndex}\n onClick={() => command(item)}\n className={cn(\n 'flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm',\n index === selectedIndex ? 'bg-surface-raised text-surface-fg' : 'text-surface-fg-muted hover:bg-surface-raised',\n )}\n >\n <EmojiImage emoji={item} size=\"1.25em\" />\n <span className=\"truncate\">:{item.id}:</span>\n </button>\n ))}\n </div>\n )\n },\n)\nEmojiList.displayName = 'EmojiList'\n\nfunction createEmojiSuggestionRenderer() {\n return () => {\n let root: Root | null = null\n let container: HTMLDivElement | null = null\n let componentRef: EmojiListRef | null = null\n\n return {\n onStart: (props: SuggestionProps<ResolvedEmoji>) => {\n container = document.createElement('div')\n container.style.position = 'absolute'\n container.style.zIndex = '1400'\n const rect = props.clientRect?.()\n if (rect) {\n container.style.left = `${rect.left}px`\n container.style.top = `${rect.bottom + 4}px`\n }\n document.body.appendChild(container)\n root = createRoot(container)\n root.render(\n <EmojiList\n ref={(r) => { componentRef = r }}\n items={props.items as ResolvedEmoji[]}\n command={(item) => props.command(item)}\n />,\n )\n },\n\n onUpdate: (props: SuggestionProps<ResolvedEmoji>) => {\n if (!root || !container) return\n const rect = props.clientRect?.()\n if (rect) {\n container.style.left = `${rect.left}px`\n container.style.top = `${rect.bottom + 4}px`\n }\n root.render(\n <EmojiList\n ref={(r) => { componentRef = r }}\n items={props.items as ResolvedEmoji[]}\n command={(item) => props.command(item)}\n />,\n )\n },\n\n onKeyDown: (props: SuggestionKeyDownProps) => {\n if (props.event.key === 'Escape') {\n if (container) {\n root?.unmount()\n container.remove()\n container = null\n root = null\n }\n return true\n }\n return componentRef?.onKeyDown(props) ?? false\n },\n\n onExit: () => {\n if (container) {\n root?.unmount()\n container.remove()\n container = null\n root = null\n }\n },\n }\n }\n}\n\n/** Factory: returns the configured `:shortcode:` emoji suggestion extension. */\nexport function createEmojiSuggestion() {\n return Extension.create({\n name: 'emojiSuggestion',\n\n addProseMirrorPlugins() {\n return [\n Suggestion({\n pluginKey: new PluginKey('emojiSuggestion'),\n editor: this.editor,\n char: ':',\n items: async ({ query }) => {\n const data = await loadEmojiData()\n return searchEmoji(data, query, 8)\n },\n command: ({ editor, range, props: item }) => {\n const emoji = item as ResolvedEmoji\n editor\n .chain()\n .focus()\n .deleteRange(range)\n .ins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AM,IAAO,EAAM,cAAc;AAKjC,IAJI,MACF,EAAU,MAAM,OAAO,GAAG,EAAK,KAAK,KACpC,EAAU,MAAM,MAAM,GAAG,EAAK,SAAS,EAAE,MAE3C,EAAK,OACH,kBAAC,GAAD;KACE,MAAM,MAAM;AAAE,UAAe;;KAC7B,OAAO,EAAM;KACb,UAAU,MAAS,EAAM,QAAQ,EAAK;KACtC,CAAA,CACH;;GAGH,YAAY,MACN,EAAM,MAAM,QAAQ,YAClB,MACF,GAAM,SAAS,EACf,EAAU,QAAQ,EAClB,IAAY,MACZ,IAAO,OAEF,MAEF,GAAc,UAAU,EAAM,IAAI;GAG3C,cAAc;AACZ,IAAI,MACF,GAAM,SAAS,EACf,EAAU,QAAQ,EAClB,IAAY,MACZ,IAAO;;GAGZ;;;AAKL,SAAgB,IAAwB;AACtC,QAAO,EAAU,OAAO;EACtB,MAAM;EAEN,wBAAwB;AACtB,UAAO,CACL,EAAW;IACT,WAAW,IAAI,EAAU,kBAAkB;IAC3C,QAAQ,KAAK;IACb,MAAM;IACN,OAAO,OAAO,EAAE,eAEP,EADM,MAAM,GAAe,EACT,GAAO,EAAE;IAEpC,UAAU,EAAE,WAAQ,UAAO,OAAO,QAAW;KAC3C,IAAM,IAAQ;AACd,OACG,OAAO,CACP,OAAO,CACP,YAAY,EAAM,CAClB,cAAc;MACb,MAAM;MACN,OAAO;OAAE,IAAI,EAAM;OAAI,QAAQ,EAAM;OAAQ;MAC9C,CAAC,CACD,KAAK;;IAEV,QAAQ,GAA+B;IACxC,CAAC,CACH;;EAEJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"emoji-suggestion.js","names":[],"sources":["../../src/composed/extensions/emoji-data.ts","../../src/composed/extensions/emoji-suggestion.tsx"],"sourcesContent":["// Emoji dataset for the editors' `:shortcode:` autocomplete. Sources\n// `@emoji-mart/data` — a pure-JSON package with NO react peer, so it is\n// unaffected by the React-19 peer issue that drove the picker off\n// `@emoji-mart/react` (→ frimousse). Native-only since that migration: no\n// spritesheet coordinates, no per-art-style loaders.\n\ninterface EmojiSkin {\n native: string\n}\n\ninterface EmojiEntry {\n id: string\n name: string\n keywords?: string[]\n skins: EmojiSkin[]\n}\n\nexport interface EmojiDataset {\n emojis: Record<string, EmojiEntry>\n}\n\nexport interface ResolvedEmoji {\n id: string\n name: string\n native: string\n}\n\nlet cachedData: EmojiDataset | null = null\n\nexport async function loadEmojiData(): Promise<EmojiDataset> {\n if (cachedData) return cachedData\n const mod = await import('@emoji-mart/data')\n cachedData = ((mod as { default?: EmojiDataset }).default ?? mod) as EmojiDataset\n return cachedData\n}\n\nfunction resolve(entry: EmojiEntry): ResolvedEmoji {\n return { id: entry.id, name: entry.name, native: entry.skins[0]?.native ?? '' }\n}\n\nexport function searchEmoji(data: EmojiDataset, query: string, limit = 8): ResolvedEmoji[] {\n const entries = Object.values(data.emojis)\n if (!query) return entries.slice(0, limit).map(resolve)\n const q = query.toLowerCase()\n const results: ResolvedEmoji[] = []\n for (const e of entries) {\n if (results.length >= limit) break\n if (\n e.id.includes(q) ||\n e.name.toLowerCase().includes(q) ||\n e.keywords?.some((k) => k.includes(q))\n ) {\n results.push(resolve(e))\n }\n }\n return results\n}\n","import { Extension } from '@tiptap/core'\nimport Suggestion, { type SuggestionKeyDownProps,type SuggestionProps } from '@tiptap/suggestion'\nimport { PluginKey } from 'prosemirror-state'\nimport * as React from 'react'\nimport { createRoot, type Root } from 'react-dom/client'\n\nimport { cn } from '../../ui/lib/utils'\nimport { loadEmojiData, type ResolvedEmoji, searchEmoji } from './emoji-data'\n\n// Re-export for external consumers\nexport type { ResolvedEmoji as EmojiSuggestionItem }\n\n// Native-only since the frimousse migration.\nfunction EmojiImage({ emoji, size = '1.2em' }: { emoji: ResolvedEmoji; size?: string }) {\n return <span style={{ fontSize: size }}>{emoji.native}</span>\n}\n\ninterface EmojiListRef {\n onKeyDown: (props: SuggestionKeyDownProps) => boolean\n}\n\ninterface EmojiListProps {\n items: ResolvedEmoji[]\n command: (item: ResolvedEmoji) => void\n}\n\nconst EmojiList = React.forwardRef<EmojiListRef, EmojiListProps>(\n ({ items, command }, ref) => {\n const [selectedIndex, setSelectedIndex] = React.useState(0)\n\n React.useEffect(() => setSelectedIndex(0), [items])\n\n React.useImperativeHandle(ref, () => ({\n onKeyDown: ({ event }: SuggestionKeyDownProps) => {\n if (event.key === 'ArrowUp') {\n setSelectedIndex((i) => (i + items.length - 1) % items.length)\n return true\n }\n if (event.key === 'ArrowDown') {\n setSelectedIndex((i) => (i + 1) % items.length)\n return true\n }\n if (event.key === 'Enter') {\n if (items[selectedIndex]) command(items[selectedIndex])\n return true\n }\n return false\n },\n }))\n\n if (!items.length) return null\n\n return (\n <div role=\"listbox\" aria-label=\"Emoji suggestions\" className=\"z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-control bg-surface-overlay shadow-raised-hover\">\n {items.map((item, index) => (\n <button\n key={item.id}\n type=\"button\"\n role=\"option\"\n aria-selected={index === selectedIndex}\n onClick={() => command(item)}\n className={cn(\n 'flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm',\n index === selectedIndex ? 'bg-surface-raised text-surface-fg' : 'text-surface-fg-muted hover:bg-surface-raised',\n )}\n >\n <EmojiImage emoji={item} size=\"1.25em\" />\n <span className=\"truncate\">:{item.id}:</span>\n </button>\n ))}\n </div>\n )\n },\n)\nEmojiList.displayName = 'EmojiList'\n\nfunction createEmojiSuggestionRenderer() {\n return () => {\n let root: Root | null = null\n let container: HTMLDivElement | null = null\n let componentRef: EmojiListRef | null = null\n\n return {\n onStart: (props: SuggestionProps<ResolvedEmoji>) => {\n container = document.createElement('div')\n container.style.position = 'absolute'\n container.style.zIndex = '1400'\n const rect = props.clientRect?.()\n if (rect) {\n container.style.left = `${rect.left}px`\n container.style.top = `${rect.bottom + 4}px`\n }\n document.body.appendChild(container)\n root = createRoot(container)\n root.render(\n <EmojiList\n ref={(r) => { componentRef = r }}\n items={props.items as ResolvedEmoji[]}\n command={(item) => props.command(item)}\n />,\n )\n },\n\n onUpdate: (props: SuggestionProps<ResolvedEmoji>) => {\n if (!root || !container) return\n const rect = props.clientRect?.()\n if (rect) {\n container.style.left = `${rect.left}px`\n container.style.top = `${rect.bottom + 4}px`\n }\n root.render(\n <EmojiList\n ref={(r) => { componentRef = r }}\n items={props.items as ResolvedEmoji[]}\n command={(item) => props.command(item)}\n />,\n )\n },\n\n onKeyDown: (props: SuggestionKeyDownProps) => {\n if (props.event.key === 'Escape') {\n if (container) {\n root?.unmount()\n container.remove()\n container = null\n root = null\n }\n return true\n }\n return componentRef?.onKeyDown(props) ?? false\n },\n\n onExit: () => {\n if (container) {\n root?.unmount()\n container.remove()\n container = null\n root = null\n }\n },\n }\n }\n}\n\n/** Factory: returns the configured `:shortcode:` emoji suggestion extension. */\nexport function createEmojiSuggestion() {\n return Extension.create({\n name: 'emojiSuggestion',\n\n addProseMirrorPlugins() {\n return [\n Suggestion({\n pluginKey: new PluginKey('emojiSuggestion'),\n editor: this.editor,\n char: ':',\n items: async ({ query }) => {\n const data = await loadEmojiData()\n return searchEmoji(data, query, 8)\n },\n command: ({ editor, range, props: item }) => {\n const emoji = item as ResolvedEmoji\n editor\n .chain()\n .focus()\n .deleteRange(range)\n .insertContent({\n type: 'emojiNode',\n attrs: { id: emoji.id, native: emoji.native },\n })\n .run()\n },\n render: createEmojiSuggestionRenderer(),\n }),\n ]\n },\n })\n}\n"],"mappings":";;;;;;AA2BA,IAAI,IAAkC;AAEtC,eAAsB,IAAuC;AAC3D,KAAI,EAAY,QAAO;CACvB,IAAM,IAAM,MAAM,OAAO,cAAA,MAAA,MAAA,EAAA,eAAA;AAEzB,QADA,IAAe,EAAmC,WAAW,GACtD;;AAGT,SAAS,EAAQ,GAAkC;AACjD,QAAO;EAAE,IAAI,EAAM;EAAI,MAAM,EAAM;EAAM,QAAQ,EAAM,MAAM,IAAI,UAAU;EAAI;;AAGjF,SAAgB,EAAY,GAAoB,GAAe,IAAQ,GAAoB;CACzF,IAAM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,MACZ,IAAO;;GAGZ;;;AAKL,SAAgB,IAAwB;AACtC,QAAO,EAAU,OAAO;EACtB,MAAM;EAEN,wBAAwB;AACtB,UAAO,CACL,EAAW;IACT,WAAW,IAAI,EAAU,kBAAkB;IAC3C,QAAQ,KAAK;IACb,MAAM;IACN,OAAO,OAAO,EAAE,eAEP,EADM,MAAM,GAAe,EACT,GAAO,EAAE;IAEpC,UAAU,EAAE,WAAQ,UAAO,OAAO,QAAW;KAC3C,IAAM,IAAQ;AACd,OACG,OAAO,CACP,OAAO,CACP,YAAY,EAAM,CAClB,cAAc;MACb,MAAM;MACN,OAAO;OAAE,IAAI,EAAM;OAAI,QAAQ,EAAM;OAAQ;MAC9C,CAAC,CACD,KAAK;;IAEV,QAAQ,GAA+B;IACxC,CAAC,CACH;;EAEJ,CAAC"}
|
package/dist/_chunks/emoji.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cn as t } from "../ui/lib/utils.js";
|
|
|
4
4
|
import { Icon as n } from "../ui/icon.js";
|
|
5
5
|
import { Skeleton as r } from "../ui/skeleton.js";
|
|
6
6
|
import { Button as i } from "../ui/button.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ErrorFallback as a, Toolbar as o, ToolbarDivider as s } from "./shared.js";
|
|
8
8
|
import * as c from "react";
|
|
9
9
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
10
|
import { IconMaximize as f, IconMinimize as p, IconZoomIn as m, IconZoomOut as h, IconZoomReset as g } from "@tabler/icons-react";
|
|
@@ -21,7 +21,7 @@ function b({ url: b, alt: x, onError: S }) {
|
|
|
21
21
|
n && (e.key === "+" || e.key === "=" ? (e.preventDefault(), n.zoomIn()) : e.key === "-" ? (e.preventDefault(), n.zoomOut()) : e.key === "0" ? (e.preventDefault(), n.resetTransform()) : e.key === "f" || e.key === "F" ? (e.preventDefault(), A((e) => !e)) : e.key === "Escape" && k && (e.preventDefault(), A(!1)));
|
|
22
22
|
}
|
|
23
23
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
24
|
-
}, [M, k]), T ? /* @__PURE__ */ u(
|
|
24
|
+
}, [M, k]), T ? /* @__PURE__ */ u(a, {
|
|
25
25
|
message: "Could not load image",
|
|
26
26
|
url: b
|
|
27
27
|
}) : /* @__PURE__ */ u("div", {
|
|
@@ -40,8 +40,8 @@ function b({ url: b, alt: x, onError: S }) {
|
|
|
40
40
|
step: 2
|
|
41
41
|
},
|
|
42
42
|
onTransform: (e, t) => O(Math.round(t.scale * 100)),
|
|
43
|
-
children: ({ zoomIn:
|
|
44
|
-
zoomIn:
|
|
43
|
+
children: ({ zoomIn: a, zoomOut: c, resetTransform: y, centerView: T }) => (P.current = {
|
|
44
|
+
zoomIn: a,
|
|
45
45
|
zoomOut: c,
|
|
46
46
|
resetTransform: y,
|
|
47
47
|
centerView: T
|
|
@@ -85,7 +85,7 @@ function b({ url: b, alt: x, onError: S }) {
|
|
|
85
85
|
/* @__PURE__ */ u(i, {
|
|
86
86
|
variant: "ghost",
|
|
87
87
|
size: "icon-xs",
|
|
88
|
-
onClick: () =>
|
|
88
|
+
onClick: () => a(),
|
|
89
89
|
"aria-label": "Zoom in (+)",
|
|
90
90
|
title: "Zoom in",
|
|
91
91
|
children: /* @__PURE__ */ u(n, {
|
|
@@ -93,7 +93,7 @@ function b({ url: b, alt: x, onError: S }) {
|
|
|
93
93
|
size: "sm"
|
|
94
94
|
})
|
|
95
95
|
}),
|
|
96
|
-
/* @__PURE__ */ u(
|
|
96
|
+
/* @__PURE__ */ u(s, {}),
|
|
97
97
|
/* @__PURE__ */ u(i, {
|
|
98
98
|
variant: "ghost",
|
|
99
99
|
size: "icon-xs",
|
|
@@ -105,7 +105,7 @@ function b({ url: b, alt: x, onError: S }) {
|
|
|
105
105
|
size: "sm"
|
|
106
106
|
})
|
|
107
107
|
}),
|
|
108
|
-
/* @__PURE__ */ u(
|
|
108
|
+
/* @__PURE__ */ u(s, {}),
|
|
109
109
|
/* @__PURE__ */ u(i, {
|
|
110
110
|
variant: "ghost",
|
|
111
111
|
size: "icon-xs",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn as e } from "../ui/lib/utils.js";
|
|
3
3
|
import { Icon as t } from "../ui/icon.js";
|
|
4
4
|
import { TruncatedText as n } from "../ui/truncated-text.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Node3 as r, NodeViewWrapper as i, ReactNodeViewRenderer as a, mergeAttributes as o } from "./tiptap.js";
|
|
6
6
|
import * as s from "react";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
import { IconDownload as u, IconFile as d } from "@tabler/icons-react";
|
|
@@ -136,4 +136,4 @@ function _(e) {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
|
-
export { h as
|
|
139
|
+
export { h as FileAttachment, _ as createSuggestionRenderer };
|
package/dist/_chunks/mention.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
//#region src/ui/lib/mention.ts
|
|
3
3
|
var e = "[&_.mention]:rounded-control-inner [&_.mention]:bg-accent-2 [&_.mention]:px-ds-02 [&_.mention]:py-[1px] [&_.mention]:font-medium [&_.mention]:text-accent-11";
|
|
4
4
|
//#endregion
|
|
5
|
-
export { e as
|
|
5
|
+
export { e as MENTION_TOKEN_CLASS };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../ui/lib/utils.js";
|
|
3
|
-
import { t } from "./normalize-icon.js";
|
|
3
|
+
import { normalizeIcon as t } from "./normalize-icon.js";
|
|
4
4
|
import { Button as n } from "../ui/button.js";
|
|
5
5
|
import { TruncatedText as r } from "../ui/truncated-text.js";
|
|
6
6
|
import * as i from "react";
|
|
@@ -229,4 +229,4 @@ var I = {
|
|
|
229
229
|
getName: F
|
|
230
230
|
};
|
|
231
231
|
//#endregion
|
|
232
|
-
export {
|
|
232
|
+
export { I as OAuth, k as OAuthButton, M as OAuthConnectionRow, j as OAuthDivider, N as OAuthGlyph, A as OAuthGroup, P as getOAuthLabel, F as getOAuthName };
|
package/dist/_chunks/popover.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Anchor2 as e, Content$2 as t, Content2$6 as n, Overlay as r, Portal$3 as i, Portal$4 as a, Root$8 as o, Root2$8 as s, Trigger$8 as c } from "./primitives.js";
|
|
3
3
|
import { springs as l, tweens as u } from "../ui/lib/motion.js";
|
|
4
4
|
import { cn as d } from "../ui/lib/utils.js";
|
|
5
5
|
import { useIsMobile as f } from "../hooks/use-mobile.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useControllableOpen as p } from "./use-controllable-open.js";
|
|
7
7
|
import * as m from "react";
|
|
8
8
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
9
|
import { AnimatePresence as _, motion as v, useReducedMotion as y } from "framer-motion";
|
|
10
10
|
//#region src/ui/lib/bottom-sheet.tsx
|
|
11
|
-
function b({ open:
|
|
11
|
+
function b({ open: e, onOpenChange: n, children: i, className: s, dragHandle: c = !0, swipeable: f = !0, title: p }) {
|
|
12
12
|
let b = y(), x = m.useRef(null), S = m.useCallback((e, t) => {
|
|
13
|
-
let
|
|
14
|
-
(t.offset.y >
|
|
15
|
-
}, [
|
|
16
|
-
return /* @__PURE__ */ h(
|
|
17
|
-
open:
|
|
18
|
-
onOpenChange:
|
|
19
|
-
children: /* @__PURE__ */ h(_, { children:
|
|
13
|
+
let r = x.current?.getBoundingClientRect().height ?? 300;
|
|
14
|
+
(t.offset.y > r * .3 || t.velocity.y > 500) && n(!1);
|
|
15
|
+
}, [n]);
|
|
16
|
+
return /* @__PURE__ */ h(o, {
|
|
17
|
+
open: e,
|
|
18
|
+
onOpenChange: n,
|
|
19
|
+
children: /* @__PURE__ */ h(_, { children: e && /* @__PURE__ */ g(a, {
|
|
20
20
|
forceMount: !0,
|
|
21
|
-
children: [/* @__PURE__ */ h(
|
|
21
|
+
children: [/* @__PURE__ */ h(r, {
|
|
22
22
|
forceMount: !0,
|
|
23
23
|
asChild: !0,
|
|
24
24
|
children: /* @__PURE__ */ h(v.div, {
|
|
@@ -34,7 +34,7 @@ function b({ open: n, onOpenChange: r, children: i, className: o, dragHandle: c
|
|
|
34
34
|
"aria-label": p,
|
|
35
35
|
children: /* @__PURE__ */ g(v.div, {
|
|
36
36
|
ref: x,
|
|
37
|
-
className: d("fixed inset-x-0 bottom-0 z-modal max-h-[85vh] overflow-y-auto rounded-t-overlay-lg border-t border-surface-border-strong bg-surface-overlay shadow-overlay outline-hidden",
|
|
37
|
+
className: d("fixed inset-x-0 bottom-0 z-modal max-h-[85vh] overflow-y-auto rounded-t-overlay-lg border-t border-surface-border-strong bg-surface-overlay shadow-overlay outline-hidden", s),
|
|
38
38
|
initial: { y: "100%" },
|
|
39
39
|
animate: { y: 0 },
|
|
40
40
|
exit: { y: "100%" },
|
|
@@ -65,13 +65,13 @@ var x = m.createContext({
|
|
|
65
65
|
open: e,
|
|
66
66
|
defaultOpen: t,
|
|
67
67
|
onOpenChange: n
|
|
68
|
-
}),
|
|
68
|
+
}), c = m.useMemo(() => ({
|
|
69
69
|
open: i,
|
|
70
70
|
onClose: o
|
|
71
71
|
}), [i, o]);
|
|
72
72
|
return /* @__PURE__ */ h(x.Provider, {
|
|
73
|
-
value:
|
|
74
|
-
children: /* @__PURE__ */ h(
|
|
73
|
+
value: c,
|
|
74
|
+
children: /* @__PURE__ */ h(s, {
|
|
75
75
|
open: i,
|
|
76
76
|
onOpenChange: a,
|
|
77
77
|
...r
|
|
@@ -79,7 +79,7 @@ var x = m.createContext({
|
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
81
|
S.displayName = "Popover";
|
|
82
|
-
var C =
|
|
82
|
+
var C = c, w = e, T = m.forwardRef(({ className: e, align: t = "center", sideOffset: r = 4, children: a, ...o }, s) => {
|
|
83
83
|
let c = f(), { open: p, onClose: g } = m.useContext(x);
|
|
84
84
|
return c ? /* @__PURE__ */ h(b, {
|
|
85
85
|
open: p,
|
|
@@ -123,4 +123,4 @@ var C = r, w = o, T = m.forwardRef(({ className: e, align: t = "center", sideOff
|
|
|
123
123
|
});
|
|
124
124
|
T.displayName = n.displayName;
|
|
125
125
|
//#endregion
|
|
126
|
-
export {
|
|
126
|
+
export { S as Popover, w as PopoverAnchor, T as PopoverContent, C as PopoverTrigger };
|
|
@@ -7626,4 +7626,4 @@ function eb(e, t) {
|
|
|
7626
7626
|
}
|
|
7627
7627
|
var tb = Ky, nb = Jy, rb = Xy, ib = Qy;
|
|
7628
7628
|
//#endregion
|
|
7629
|
-
export {
|
|
7629
|
+
export { yi as Action, bc as Anchor2, bi as Cancel, ms as Checkbox, gs as CheckboxIndicator, Dv as CheckboxItem2, pf as CheckboxItem2$1, gd as CheckboxItem2$2, Hr as Close, ib as Content, Ry as Content$1, zr as Content$2, be as Content$3, Cv as Content2, u_ as Content2$1, Zm as Content2$2, Gf as Content2$3, lf as Content2$4, fd as Content2$5, Cc as Content2$6, vi as Content2$7, tt as Content2$8, Vr as Description, Si as Description2, rs as Fallback, $m as Group, wv as Group2, uf as Group2$1, pd as Group2$2, $e as Header, Ym as Icon, ns as Image, Ly as Indicator, Dp as Indicator$1, Py as Item, th as Item$1, Qe as Item$2, Tg as Item2, Ep as Item2$1, ff as Item2$2, hd as Item2$3, Ev as Item3, rh as ItemIndicator, Av as ItemIndicator2, gf as ItemIndicator2$1, yd as ItemIndicator2$2, nh as ItemText, eh as Label, Tv as Label2, df as Label2$1, md as Label2$2, Iy as Link, nb as List, Ny as List$1, bv as Menu, Rr as Overlay, _i as Overlay2, l_ as Portal, Xm as Portal$1, Wf as Portal$2, Sc as Portal$3, Lr as Portal$4, Sv as Portal2, cf as Portal2$1, dd as Portal2$2, gi as Portal2$3, o_ as Provider, Ov as RadioGroup2, mf as RadioGroup2$1, _d as RadioGroup2$2, kv as RadioItem2, hf as RadioItem2$1, vd as RadioItem2$2, Gh as Range, D_ as Root, cg as Root$1, ig as Root$2, Uh as Root$3, ep as Root$4, Jf as Root$5, ts as Root$6, Ti as Root$7, Fr as Root$8, ve as Root$9, tb as Root2, My as Root2$1, Ze as Root2$10, wg as Root2$2, Km as Root2$3, Tp as Root2$4, Hf as Root2$5, of as Root2$6, ld as Root2$7, yc as Root2$8, mi as Root2$9, yv as Root3, s_ as Root3$1, ah as ScrollDownButton, ih as ScrollUpButton, oh as Separator, jv as Separator2, _f as Separator2$1, bd as Separator2$2, b as Slot, w as Slottable, Mv as Sub2, vf as Sub2$1, xd as Sub2$2, Pv as SubContent2, bf as SubContent2$1, Cd as SubContent2$2, Nv as SubTrigger2, yf as SubTrigger2$1, Sd as SubTrigger2$2, ag as Thumb, Kh as Thumb$1, Br as Title, xi as Title2, Wh as Track, rb as Trigger, Fy as Trigger$1, ye as Trigger$10, xv as Trigger$2, c_ as Trigger$3, qm as Trigger$4, Uf as Trigger$5, sf as Trigger$6, ud as Trigger$7, xc as Trigger$8, Ir as Trigger$9, hi as Trigger2, et as Trigger2$1, Jm as Value, zy as Viewport, Qm as Viewport$1, Co as arrow, vo as autoPlacement, go as autoUpdate, Eo as computePosition, Lo as flip, bo as flip$1, So as hide, wo as inline, Po as offset, _o as offset$1, Fo as shift, yo as shift$1, Ro as size, xo as size$1, Mo as useFloating };
|
package/dist/_chunks/shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Range as e, Root$3 as t, Thumb$1 as n, Track as r } from "./primitives.js";
|
|
3
3
|
import { tweens as i } from "../ui/lib/motion.js";
|
|
4
4
|
import { cn as a } from "../ui/lib/utils.js";
|
|
5
5
|
import { Icon as o } from "../ui/icon.js";
|
|
@@ -61,7 +61,7 @@ function _() {
|
|
|
61
61
|
}
|
|
62
62
|
function v({ value: i, max: o = 100, step: s = 1, onValueChange: u, tone: d = "light", ariaLabel: f, disabled: p, className: m }) {
|
|
63
63
|
let h = d === "dark";
|
|
64
|
-
return /* @__PURE__ */ l(
|
|
64
|
+
return /* @__PURE__ */ l(t, {
|
|
65
65
|
className: a("group/ms relative flex h-3 w-full cursor-pointer touch-none select-none items-center", m),
|
|
66
66
|
value: [i],
|
|
67
67
|
max: o,
|
|
@@ -69,10 +69,10 @@ function v({ value: i, max: o = 100, step: s = 1, onValueChange: u, tone: d = "l
|
|
|
69
69
|
disabled: p,
|
|
70
70
|
onValueChange: (e) => u(e[0] ?? 0),
|
|
71
71
|
"aria-label": f,
|
|
72
|
-
children: [/* @__PURE__ */ c(
|
|
72
|
+
children: [/* @__PURE__ */ c(r, {
|
|
73
73
|
className: a("relative h-1 w-full grow overflow-hidden rounded-pill", h ? "bg-white/30" : "bg-surface-sunken"),
|
|
74
74
|
children: /* @__PURE__ */ c(e, { className: a("absolute h-full rounded-pill", h ? "bg-white" : "bg-accent-9") })
|
|
75
|
-
}), /* @__PURE__ */ c(
|
|
75
|
+
}), /* @__PURE__ */ c(n, { className: a("block h-3 w-3 rounded-pill shadow-raised outline-hidden transition-[opacity,transform] duration-fast-02", "opacity-0 group-hover/ms:opacity-100 focus:opacity-100 active:scale-110", "focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-1", h ? "bg-white focus-visible:ring-white" : "bg-accent-9 focus-visible:ring-accent-9") })]
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
function y({ volume: e, muted: t, onVolumeChange: n, onMuteToggle: r, variant: i = "light" }) {
|
|
@@ -110,4 +110,4 @@ function b(e) {
|
|
|
110
110
|
return t > 0 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
|
|
111
111
|
}
|
|
112
112
|
//#endregion
|
|
113
|
-
export {
|
|
113
|
+
export { h as ErrorFallback, v as MediaSlider, g as Toolbar, _ as ToolbarDivider, y as VolumeControl, b as formatTime };
|
package/dist/_chunks/success.js
CHANGED
|
@@ -4,14 +4,14 @@ import { cn as r } from "../ui/lib/utils.js";
|
|
|
4
4
|
import { Icon as i } from "../ui/icon.js";
|
|
5
5
|
import { Alert as a } from "../ui/alert.js";
|
|
6
6
|
import { Skeleton as o } from "../ui/skeleton.js";
|
|
7
|
-
import {
|
|
7
|
+
import { BadgeCompound as s } from "./badge-group.js";
|
|
8
8
|
import { Button as c } from "../ui/button.js";
|
|
9
9
|
import { Collapsible as l, CollapsibleContent as u, CollapsibleTrigger as d } from "../ui/collapsible.js";
|
|
10
10
|
import { Table as f, TableBody as p, TableCaption as m, TableCell as h, TableHead as g, TableHeader as _, TableRow as v } from "../ui/table.js";
|
|
11
11
|
import { Separator as y } from "../ui/separator.js";
|
|
12
12
|
import { StatCard as b } from "../ui/stat-card.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { useMotion as x } from "./motion-provider.js";
|
|
14
|
+
import { BlockShell as S } from "./block-shell.js";
|
|
15
15
|
import * as C from "react";
|
|
16
16
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
17
17
|
import { IconCircle as E, IconCircleCheck as D, IconCircleX as O } from "@tabler/icons-react";
|
|
@@ -394,4 +394,4 @@ var B = 5e3, V = C.memo(function({ data: e, blockId: t, confidence: n, onAction:
|
|
|
394
394
|
});
|
|
395
395
|
V.displayName = "SuccessBlock";
|
|
396
396
|
//#endregion
|
|
397
|
-
export {
|
|
397
|
+
export { M as BlockTable, N as ConfirmBlock, P as DividerBlock, F as InfoBlock, R as LoadingBlock, z as StatRowBlock, V as SuccessBlock };
|
package/dist/_chunks/tiptap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { arrow as e, autoPlacement as t, computePosition as n, flip$1 as r, hide as i, inline as a, offset$1 as o, shift$1 as s, size$1 as c } from "./primitives.js";
|
|
3
3
|
import l, { createContext as u, createElement as d, createRef as f, forwardRef as p, memo as m, useContext as h, useDebugValue as g, useEffect as _, useLayoutEffect as v, useMemo as y, useRef as b, useState as x, version as S } from "react";
|
|
4
4
|
import { Fragment as ee, jsx as C, jsxs as te } from "react/jsx-runtime";
|
|
5
5
|
import ne, { createPortal as re, flushSync as ie } from "react-dom";
|
|
@@ -13117,8 +13117,8 @@ var vh = class {
|
|
|
13117
13117
|
}, this.element.tabIndex = 0, o && (this.shouldShow = o), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(n, n.state), this.getShouldShow() && (this.show(), this.updatePosition());
|
|
13118
13118
|
}
|
|
13119
13119
|
get middlewares() {
|
|
13120
|
-
let
|
|
13121
|
-
return this.floatingUIOptions.flip &&
|
|
13120
|
+
let n = [];
|
|
13121
|
+
return this.floatingUIOptions.flip && n.push(r(typeof this.floatingUIOptions.flip == "boolean" ? void 0 : this.floatingUIOptions.flip)), this.floatingUIOptions.shift && n.push(s(typeof this.floatingUIOptions.shift == "boolean" ? void 0 : this.floatingUIOptions.shift)), this.floatingUIOptions.offset && n.push(o(typeof this.floatingUIOptions.offset == "boolean" ? void 0 : this.floatingUIOptions.offset)), this.floatingUIOptions.arrow && n.push(e(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && n.push(c(typeof this.floatingUIOptions.size == "boolean" ? void 0 : this.floatingUIOptions.size)), this.floatingUIOptions.autoPlacement && n.push(t(typeof this.floatingUIOptions.autoPlacement == "boolean" ? void 0 : this.floatingUIOptions.autoPlacement)), this.floatingUIOptions.hide && n.push(i(typeof this.floatingUIOptions.hide == "boolean" ? void 0 : this.floatingUIOptions.hide)), this.floatingUIOptions.inline && n.push(a(typeof this.floatingUIOptions.inline == "boolean" ? void 0 : this.floatingUIOptions.inline)), n;
|
|
13122
13122
|
}
|
|
13123
13123
|
get virtualElement() {
|
|
13124
13124
|
let { selection: e } = this.editor.state, t = this.getReferencedVirtualElement?.call(this);
|
|
@@ -13149,7 +13149,7 @@ var vh = class {
|
|
|
13149
13149
|
updatePosition() {
|
|
13150
13150
|
if (!this.isVisible) return;
|
|
13151
13151
|
let e = this.virtualElement;
|
|
13152
|
-
e &&
|
|
13152
|
+
e && n(e, this.element, {
|
|
13153
13153
|
placement: this.floatingUIOptions.placement,
|
|
13154
13154
|
strategy: this.floatingUIOptions.strategy,
|
|
13155
13155
|
middleware: this.middlewares
|
|
@@ -13287,8 +13287,8 @@ var bh = class {
|
|
|
13287
13287
|
return fu(e, { textSerializers: pu(this.editor.schema) });
|
|
13288
13288
|
}
|
|
13289
13289
|
get middlewares() {
|
|
13290
|
-
let
|
|
13291
|
-
return this.floatingUIOptions.flip &&
|
|
13290
|
+
let n = [];
|
|
13291
|
+
return this.floatingUIOptions.flip && n.push(r(typeof this.floatingUIOptions.flip == "boolean" ? void 0 : this.floatingUIOptions.flip)), this.floatingUIOptions.shift && n.push(s(typeof this.floatingUIOptions.shift == "boolean" ? void 0 : this.floatingUIOptions.shift)), this.floatingUIOptions.offset && n.push(o(typeof this.floatingUIOptions.offset == "boolean" ? void 0 : this.floatingUIOptions.offset)), this.floatingUIOptions.arrow && n.push(e(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && n.push(c(typeof this.floatingUIOptions.size == "boolean" ? void 0 : this.floatingUIOptions.size)), this.floatingUIOptions.autoPlacement && n.push(t(typeof this.floatingUIOptions.autoPlacement == "boolean" ? void 0 : this.floatingUIOptions.autoPlacement)), this.floatingUIOptions.hide && n.push(i(typeof this.floatingUIOptions.hide == "boolean" ? void 0 : this.floatingUIOptions.hide)), this.floatingUIOptions.inline && n.push(a(typeof this.floatingUIOptions.inline == "boolean" ? void 0 : this.floatingUIOptions.inline)), n;
|
|
13292
13292
|
}
|
|
13293
13293
|
getShouldShow(e) {
|
|
13294
13294
|
let { state: t } = this.view, { selection: n } = t, { ranges: r } = n, i = Math.min(...r.map((e) => e.$from.pos)), a = Math.max(...r.map((e) => e.$to.pos));
|
|
@@ -13311,10 +13311,10 @@ var bh = class {
|
|
|
13311
13311
|
}
|
|
13312
13312
|
}
|
|
13313
13313
|
updatePosition() {
|
|
13314
|
-
let { selection: e } = this.editor.state,
|
|
13315
|
-
|
|
13316
|
-
getBoundingClientRect: () =>
|
|
13317
|
-
getClientRects: () => [
|
|
13314
|
+
let { selection: e } = this.editor.state, t = Iu(this.view, e.from, e.to);
|
|
13315
|
+
n({
|
|
13316
|
+
getBoundingClientRect: () => t,
|
|
13317
|
+
getClientRects: () => [t]
|
|
13318
13318
|
}, this.element, {
|
|
13319
13319
|
placement: this.floatingUIOptions.placement,
|
|
13320
13320
|
strategy: this.floatingUIOptions.strategy,
|
|
@@ -15823,4 +15823,4 @@ var ty = "listItem", ny = "textStyle", ry = /^(\d+)\.\s$/, iy = J.create({
|
|
|
15823
15823
|
}
|
|
15824
15824
|
});
|
|
15825
15825
|
//#endregion
|
|
15826
|
-
export {
|
|
15826
|
+
export { qh as BubbleMenu, sp as CharacterCount, vm as EditorContent, q as Extension, cy as ListKit, J as Node3, jm as NodeViewWrapper, fp as Placeholder, P as PluginKey, zm as ReactNodeViewRenderer, vy as index_default, _y as index_default$1, wf as index_default$2, bf as index_default$3, hf as index_default$4, pf as index_default$5, K as mergeAttributes, Em as useEditor, xm as useEditorState };
|
package/dist/_chunks/tooltip.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { IconProvider as e } from "../ui/icon-context.js";
|
|
3
3
|
import { cn as t } from "../ui/lib/utils.js";
|
|
4
4
|
import { Icon as n } from "../ui/icon.js";
|
|
5
|
-
import {
|
|
5
|
+
import { normalizeIcon as r } from "./normalize-icon.js";
|
|
6
6
|
import { Checkbox as i } from "../ui/checkbox.js";
|
|
7
7
|
import * as a from "react";
|
|
8
8
|
import { useCallback as o, useState as s } from "react";
|
|
@@ -238,4 +238,4 @@ var _ = a.forwardRef(({ itemId: o, label: s, icon: d, secondaryLabel: f, actions
|
|
|
238
238
|
});
|
|
239
239
|
_.displayName = "TreeItem";
|
|
240
240
|
//#endregion
|
|
241
|
-
export {
|
|
241
|
+
export { _ as TreeItem, g as TreeView, d as useTree };
|