@next-library/theme 1.0.11 → 1.0.12
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/client.js +40 -49
- package/dist/client.js.map +1 -1
- package/dist/components/markdown/copy-page-button.d.ts.map +1 -1
- package/dist/index.js +40 -49
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -10,7 +10,7 @@ import Link3 from 'next/link';
|
|
|
10
10
|
import Image from 'next/image';
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import { useRouter } from 'next/navigation';
|
|
13
|
-
import { Search, Loader2, ArrowUp, ArrowDown, CornerDownLeft, CheckIcon, CircleIcon, ChevronRightIcon, LanguagesIcon, XIcon, PanelLeftIcon, FolderOpenIcon, FolderClosedIcon, ChevronRight, ChevronDown, FileTextIcon, Menu, Star, GithubIcon, MoreHorizontal, Home, ExternalLinkIcon, CopyIcon,
|
|
13
|
+
import { Search, Loader2, ArrowUp, ArrowDown, CornerDownLeft, CheckIcon, CircleIcon, ChevronRightIcon, LanguagesIcon, XIcon, PanelLeftIcon, FolderOpenIcon, FolderClosedIcon, ChevronRight, ChevronDown, FileTextIcon, Menu, Star, GithubIcon, MoreHorizontal, Home, ExternalLinkIcon, CopyIcon, CookieIcon, ChevronDownIcon, ChevronUpIcon, FolderUp, ChevronLeft, Check, Copy } from 'lucide-react';
|
|
14
14
|
import { useTheme } from 'next-themes';
|
|
15
15
|
import { useLocale } from '@next-library/core/hooks';
|
|
16
16
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -4990,56 +4990,47 @@ function CopyPageButton({
|
|
|
4990
4990
|
const claudeUrl = `https://claude.ai/new?q=${encodedMessage}`;
|
|
4991
4991
|
window.open(claudeUrl, "_blank", "noopener,noreferrer");
|
|
4992
4992
|
}
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
4993
|
+
const segment = "inline-flex h-8 items-center gap-1.5 whitespace-nowrap px-2.5 text-[13px] font-medium text-foreground transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
4994
|
+
return /* @__PURE__ */ jsxs(
|
|
4995
|
+
"div",
|
|
4996
|
+
{
|
|
4997
|
+
role: "group",
|
|
4998
|
+
"aria-label": _askAboutThisPage,
|
|
4999
|
+
className: cn(
|
|
5000
|
+
// Segmented control: one border, dividers between the three actions.
|
|
5001
|
+
"inline-flex items-stretch overflow-hidden rounded-md border bg-card shadow-xs divide-x divide-border",
|
|
5002
|
+
className
|
|
5003
|
+
),
|
|
5004
|
+
children: [
|
|
5005
|
+
/* @__PURE__ */ jsxs(
|
|
5006
|
+
"button",
|
|
5007
|
+
{
|
|
5008
|
+
type: "button",
|
|
5009
|
+
onClick: handleCopy,
|
|
5010
|
+
title: copyPageDescription,
|
|
5011
|
+
"aria-live": "polite",
|
|
5012
|
+
className: cn(segment, isCopied && "text-muted-foreground"),
|
|
5013
|
+
children: [
|
|
5014
|
+
isCopied ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx(CopyIcon, { className: "size-3.5", "aria-hidden": true }),
|
|
5015
|
+
isCopied ? copied : copyPage
|
|
5016
|
+
]
|
|
5017
|
+
}
|
|
5003
5018
|
),
|
|
5004
|
-
children: [
|
|
5005
|
-
/* @__PURE__ */
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
5015
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: copyPage }),
|
|
5016
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: copyPageDescription })
|
|
5017
|
-
] })
|
|
5018
|
-
] }),
|
|
5019
|
-
pageUrl && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5020
|
-
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOpenInChatGPT, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5021
|
-
/* @__PURE__ */ jsx(ChatGPTIcon, { className: "w-4 h-4 shrink-0" }),
|
|
5022
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
|
|
5023
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
5024
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: openInChatGPT }),
|
|
5025
|
-
/* @__PURE__ */ jsx(ExternalLinkIcon, { width: "12", className: "text-muted-foreground shrink-0" })
|
|
5026
|
-
] }),
|
|
5027
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: askQuestionsDescription })
|
|
5028
|
-
] })
|
|
5029
|
-
] }) }),
|
|
5030
|
-
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOpenInClaude, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5031
|
-
/* @__PURE__ */ jsx(ClaudeIcon, { className: "w-4 h-4 shrink-0" }),
|
|
5032
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
|
|
5033
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
5034
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: openInClaude }),
|
|
5035
|
-
/* @__PURE__ */ jsx(ExternalLinkIcon, { width: "12", className: "text-muted-foreground shrink-0" })
|
|
5036
|
-
] }),
|
|
5037
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: askQuestionsDescription })
|
|
5019
|
+
pageUrl && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5020
|
+
/* @__PURE__ */ jsxs("button", { type: "button", onClick: handleOpenInChatGPT, title: askQuestionsDescription, className: segment, children: [
|
|
5021
|
+
/* @__PURE__ */ jsx(ChatGPTIcon, { className: "size-3.5 shrink-0" }),
|
|
5022
|
+
/* @__PURE__ */ jsx("span", { children: openInChatGPT }),
|
|
5023
|
+
/* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-3 text-muted-foreground", "aria-hidden": true })
|
|
5024
|
+
] }),
|
|
5025
|
+
/* @__PURE__ */ jsxs("button", { type: "button", onClick: handleOpenInClaude, title: askQuestionsDescription, className: segment, children: [
|
|
5026
|
+
/* @__PURE__ */ jsx(ClaudeIcon, { className: "size-3.5 shrink-0" }),
|
|
5027
|
+
/* @__PURE__ */ jsx("span", { children: openInClaude }),
|
|
5028
|
+
/* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-3 text-muted-foreground", "aria-hidden": true })
|
|
5038
5029
|
] })
|
|
5039
|
-
] })
|
|
5040
|
-
]
|
|
5041
|
-
|
|
5042
|
-
|
|
5030
|
+
] })
|
|
5031
|
+
]
|
|
5032
|
+
}
|
|
5033
|
+
);
|
|
5043
5034
|
}
|
|
5044
5035
|
function track(event, data) {
|
|
5045
5036
|
if (typeof window !== "undefined") {
|