@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-page-button.d.ts","sourceRoot":"","sources":["../../../src/components/markdown/copy-page-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"copy-page-button.d.ts","sourceRoot":"","sources":["../../../src/components/markdown/copy-page-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAyCjD,UAAU,0BAA0B;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,0BAA0B,CAAC;CAC3C;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,OAAO,EACP,YAAY,EACZ,SAAS,EACT,MAAa,EACb,YAAiB,GAClB,EAAE,mBAAmB,2CAkHrB"}
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import Link2 from 'next/link';
|
|
|
8
8
|
import Image from 'next/image';
|
|
9
9
|
import { clsx } from 'clsx';
|
|
10
10
|
import { twMerge } from 'tailwind-merge';
|
|
11
|
-
import { ArrowLeft, ArrowRight, Pencil, AlertTriangle, Search, Loader2, ArrowUp, ArrowDown, CornerDownLeft, CheckIcon, CircleIcon, ChevronRightIcon, LanguagesIcon, XIcon, PanelLeftIcon, FolderOpenIcon, FolderClosedIcon, ChevronRight, ChevronDown, FileTextIcon, Menu, Star, GithubIcon, MoreHorizontal, Home, ExternalLinkIcon, CopyIcon,
|
|
11
|
+
import { ArrowLeft, ArrowRight, Pencil, AlertTriangle, 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';
|
|
12
12
|
import { useScroll, useMotionValueEvent, motion } from 'motion/react';
|
|
13
13
|
import { createPortal } from 'react-dom';
|
|
14
14
|
import { useRouter } from 'next/navigation';
|
|
@@ -5907,56 +5907,47 @@ function CopyPageButton2({
|
|
|
5907
5907
|
const claudeUrl = `https://claude.ai/new?q=${encodedMessage}`;
|
|
5908
5908
|
window.open(claudeUrl, "_blank", "noopener,noreferrer");
|
|
5909
5909
|
}
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5910
|
+
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";
|
|
5911
|
+
return /* @__PURE__ */ jsxs(
|
|
5912
|
+
"div",
|
|
5913
|
+
{
|
|
5914
|
+
role: "group",
|
|
5915
|
+
"aria-label": _askAboutThisPage,
|
|
5916
|
+
className: cn(
|
|
5917
|
+
// Segmented control: one border, dividers between the three actions.
|
|
5918
|
+
"inline-flex items-stretch overflow-hidden rounded-md border bg-card shadow-xs divide-x divide-border",
|
|
5919
|
+
className
|
|
5920
|
+
),
|
|
5921
|
+
children: [
|
|
5922
|
+
/* @__PURE__ */ jsxs(
|
|
5923
|
+
"button",
|
|
5924
|
+
{
|
|
5925
|
+
type: "button",
|
|
5926
|
+
onClick: handleCopy,
|
|
5927
|
+
title: copyPageDescription,
|
|
5928
|
+
"aria-live": "polite",
|
|
5929
|
+
className: cn(segment, isCopied && "text-muted-foreground"),
|
|
5930
|
+
children: [
|
|
5931
|
+
isCopied ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx(CopyIcon, { className: "size-3.5", "aria-hidden": true }),
|
|
5932
|
+
isCopied ? copied : copyPage
|
|
5933
|
+
]
|
|
5934
|
+
}
|
|
5920
5935
|
),
|
|
5921
|
-
children: [
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
5932
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: copyPage }),
|
|
5933
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: copyPageDescription })
|
|
5934
|
-
] })
|
|
5935
|
-
] }),
|
|
5936
|
-
pageUrl && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5937
|
-
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOpenInChatGPT, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5938
|
-
/* @__PURE__ */ jsx(ChatGPTIcon, { className: "w-4 h-4 shrink-0" }),
|
|
5939
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
|
|
5940
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
5941
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: openInChatGPT }),
|
|
5942
|
-
/* @__PURE__ */ jsx(ExternalLinkIcon, { width: "12", className: "text-muted-foreground shrink-0" })
|
|
5943
|
-
] }),
|
|
5944
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: askQuestionsDescription })
|
|
5945
|
-
] })
|
|
5946
|
-
] }) }),
|
|
5947
|
-
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOpenInClaude, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5948
|
-
/* @__PURE__ */ jsx(ClaudeIcon, { className: "w-4 h-4 shrink-0" }),
|
|
5949
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
|
|
5950
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
5951
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: openInClaude }),
|
|
5952
|
-
/* @__PURE__ */ jsx(ExternalLinkIcon, { width: "12", className: "text-muted-foreground shrink-0" })
|
|
5953
|
-
] }),
|
|
5954
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: askQuestionsDescription })
|
|
5936
|
+
pageUrl && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5937
|
+
/* @__PURE__ */ jsxs("button", { type: "button", onClick: handleOpenInChatGPT, title: askQuestionsDescription, className: segment, children: [
|
|
5938
|
+
/* @__PURE__ */ jsx(ChatGPTIcon, { className: "size-3.5 shrink-0" }),
|
|
5939
|
+
/* @__PURE__ */ jsx("span", { children: openInChatGPT }),
|
|
5940
|
+
/* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-3 text-muted-foreground", "aria-hidden": true })
|
|
5941
|
+
] }),
|
|
5942
|
+
/* @__PURE__ */ jsxs("button", { type: "button", onClick: handleOpenInClaude, title: askQuestionsDescription, className: segment, children: [
|
|
5943
|
+
/* @__PURE__ */ jsx(ClaudeIcon, { className: "size-3.5 shrink-0" }),
|
|
5944
|
+
/* @__PURE__ */ jsx("span", { children: openInClaude }),
|
|
5945
|
+
/* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-3 text-muted-foreground", "aria-hidden": true })
|
|
5955
5946
|
] })
|
|
5956
|
-
] })
|
|
5957
|
-
]
|
|
5958
|
-
|
|
5959
|
-
|
|
5947
|
+
] })
|
|
5948
|
+
]
|
|
5949
|
+
}
|
|
5950
|
+
);
|
|
5960
5951
|
}
|
|
5961
5952
|
function track(event, data) {
|
|
5962
5953
|
if (typeof window !== "undefined") {
|