@mdxui/named 7.0.0 → 8.0.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.
@@ -1,6 +1,69 @@
1
+ // src/templates/studio/ui/button/button.tsx
2
+ import * as React from "react";
3
+
4
+ // src/lib/utils.ts
5
+ import { clsx } from "clsx";
6
+ import { twMerge } from "tailwind-merge";
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+
11
+ // src/templates/studio/ui/button/button.tsx
12
+ import { jsx } from "react/jsx-runtime";
13
+ var baseClasses = "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-ring) disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer";
14
+ var variantClasses = {
15
+ default: "btn-gradient-dark text-(--color-btn-primary-fg) shadow-md hover:shadow-lg rounded-full",
16
+ secondary: "bg-(--color-surface-raised) text-(--color-fg) border border-(--color-border) shadow-sm hover:shadow-md rounded-full",
17
+ outline: "border border-(--color-border) bg-transparent text-(--color-fg) hover:bg-(--color-hover) rounded-full",
18
+ ghost: "text-(--color-fg) hover:bg-(--color-hover) rounded-full",
19
+ link: "text-(--color-fg) underline-offset-4 hover:underline",
20
+ accent: "bg-(--color-accent-strong) text-(--color-accent-fg) shadow-md hover:opacity-90 hover:shadow-lg rounded-full"
21
+ };
22
+ var sizeClasses = {
23
+ default: "h-12 px-6 py-3 text-base",
24
+ sm: "h-10 px-4 py-2 text-sm",
25
+ lg: "h-14 px-8 py-4 text-lg",
26
+ icon: "h-12 w-12"
27
+ };
28
+ var Button = React.forwardRef(
29
+ ({ className, variant = "default", size = "default", asChild = false, children, ...props }, ref) => {
30
+ const classes = cn(baseClasses, variantClasses[variant], sizeClasses[size], className);
31
+ if (asChild && React.isValidElement(children)) {
32
+ const child = children;
33
+ return React.cloneElement(child, {
34
+ ...props,
35
+ className: cn(classes, child.props.className)
36
+ });
37
+ }
38
+ return /* @__PURE__ */ jsx("button", { ref, className: classes, ...props, children });
39
+ }
40
+ );
41
+ Button.displayName = "Button";
42
+
43
+ // src/templates/studio/ui/input/input.tsx
44
+ import * as React2 from "react";
45
+ import { jsx as jsx2 } from "react/jsx-runtime";
46
+ var Input = React2.forwardRef(
47
+ ({ className, type, ...props }, ref) => {
48
+ return /* @__PURE__ */ jsx2(
49
+ "input",
50
+ {
51
+ type,
52
+ className: cn(
53
+ "flex h-11 w-full rounded-md border border-(--color-border) bg-transparent px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-(--color-fg) placeholder:text-(--color-fg-muted) focus-visible:outline-none focus-visible:border-(--color-border-strong) focus-visible:ring-1 focus-visible:ring-(--color-ring) disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
54
+ className
55
+ ),
56
+ ref,
57
+ ...props
58
+ }
59
+ );
60
+ }
61
+ );
62
+ Input.displayName = "Input";
63
+
1
64
  // src/shared/scroll-reveal/scroll-reveal.tsx
2
65
  import { motion } from "motion/react";
3
- import { jsx } from "react/jsx-runtime";
66
+ import { jsx as jsx3 } from "react/jsx-runtime";
4
67
  var directionVariants = {
5
68
  up: {
6
69
  hidden: { opacity: 0, y: 50 },
@@ -34,7 +97,7 @@ function ScrollReveal({
34
97
  margin = "-100px"
35
98
  }) {
36
99
  if (trigger === "mount") {
37
- return /* @__PURE__ */ jsx(
100
+ return /* @__PURE__ */ jsx3(
38
101
  motion.div,
39
102
  {
40
103
  initial: "hidden",
@@ -46,7 +109,7 @@ function ScrollReveal({
46
109
  }
47
110
  );
48
111
  }
49
- return /* @__PURE__ */ jsx(
112
+ return /* @__PURE__ */ jsx3(
50
113
  motion.div,
51
114
  {
52
115
  initial: "hidden",
@@ -60,133 +123,8 @@ function ScrollReveal({
60
123
  );
61
124
  }
62
125
 
63
- // src/shared/animated-beam/animated-beam.tsx
64
- import { useEffect, useId, useState } from "react";
65
- import { motion as motion2 } from "motion/react";
66
-
67
- // src/lib/utils.ts
68
- import { clsx } from "clsx";
69
- import { twMerge } from "tailwind-merge";
70
- function cn(...inputs) {
71
- return twMerge(clsx(inputs));
72
- }
73
-
74
- // src/shared/animated-beam/animated-beam.tsx
75
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
76
- function AnimatedBeam({
77
- className,
78
- containerRef,
79
- fromRef,
80
- toRef,
81
- curvature = 0,
82
- reverse = false,
83
- duration = Math.random() * 3 + 4,
84
- delay = 0,
85
- pathColor = "gray",
86
- pathWidth = 2,
87
- pathOpacity = 0.2,
88
- gradientStartColor = "#ffaa40",
89
- gradientStopColor = "#9c40ff",
90
- startXOffset = 0,
91
- startYOffset = 0,
92
- endXOffset = 0,
93
- endYOffset = 0
94
- }) {
95
- const id = useId();
96
- const [pathD, setPathD] = useState("");
97
- const [svgDimensions, setSvgDimensions] = useState({ width: 0, height: 0 });
98
- const gradientCoordinates = reverse ? {
99
- x1: ["90%", "-10%"],
100
- x2: ["100%", "0%"],
101
- y1: ["0%", "0%"],
102
- y2: ["0%", "0%"]
103
- } : {
104
- x1: ["10%", "110%"],
105
- x2: ["0%", "100%"],
106
- y1: ["0%", "0%"],
107
- y2: ["0%", "0%"]
108
- };
109
- useEffect(() => {
110
- const updatePath = () => {
111
- if (containerRef.current && fromRef.current && toRef.current) {
112
- const containerRect = containerRef.current.getBoundingClientRect();
113
- const rectA = fromRef.current.getBoundingClientRect();
114
- const rectB = toRef.current.getBoundingClientRect();
115
- const svgWidth = containerRect.width;
116
- const svgHeight = containerRect.height;
117
- setSvgDimensions({ width: svgWidth, height: svgHeight });
118
- const startX = rectA.left - containerRect.left + rectA.width / 2 + startXOffset;
119
- const startY = rectA.top - containerRect.top + rectA.height / 2 + startYOffset;
120
- const endX = rectB.left - containerRect.left + rectB.width / 2 + endXOffset;
121
- const endY = rectB.top - containerRect.top + rectB.height / 2 + endYOffset;
122
- const controlY = startY - curvature;
123
- const d = `M ${startX},${startY} Q ${(startX + endX) / 2},${controlY} ${endX},${endY}`;
124
- setPathD(d);
125
- }
126
- };
127
- const resizeObserver = new ResizeObserver(() => {
128
- updatePath();
129
- });
130
- if (containerRef.current) {
131
- resizeObserver.observe(containerRef.current);
132
- }
133
- updatePath();
134
- return () => {
135
- resizeObserver.disconnect();
136
- };
137
- }, [containerRef, fromRef, toRef, curvature, startXOffset, startYOffset, endXOffset, endYOffset]);
138
- return /* @__PURE__ */ jsxs(
139
- "svg",
140
- {
141
- fill: "none",
142
- width: svgDimensions.width,
143
- height: svgDimensions.height,
144
- xmlns: "http://www.w3.org/2000/svg",
145
- className: cn("pointer-events-none absolute top-0 left-0 transform-gpu stroke-2", className),
146
- viewBox: `0 0 ${svgDimensions.width} ${svgDimensions.height}`,
147
- children: [
148
- /* @__PURE__ */ jsx2("path", { d: pathD, stroke: pathColor, strokeWidth: pathWidth, strokeOpacity: pathOpacity, strokeLinecap: "round" }),
149
- /* @__PURE__ */ jsx2("path", { d: pathD, strokeWidth: pathWidth, stroke: `url(#${id})`, strokeOpacity: "1", strokeLinecap: "round" }),
150
- /* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsxs(
151
- motion2.linearGradient,
152
- {
153
- className: "transform-gpu",
154
- id,
155
- gradientUnits: "userSpaceOnUse",
156
- initial: {
157
- x1: "0%",
158
- x2: "0%",
159
- y1: "0%",
160
- y2: "0%"
161
- },
162
- animate: {
163
- x1: gradientCoordinates.x1,
164
- x2: gradientCoordinates.x2,
165
- y1: gradientCoordinates.y1,
166
- y2: gradientCoordinates.y2
167
- },
168
- transition: {
169
- delay,
170
- duration,
171
- ease: [0.16, 1, 0.3, 1],
172
- repeat: Infinity,
173
- repeatDelay: 0
174
- },
175
- children: [
176
- /* @__PURE__ */ jsx2("stop", { stopColor: gradientStartColor, stopOpacity: "0" }),
177
- /* @__PURE__ */ jsx2("stop", { stopColor: gradientStartColor }),
178
- /* @__PURE__ */ jsx2("stop", { offset: "32.5%", stopColor: gradientStopColor }),
179
- /* @__PURE__ */ jsx2("stop", { offset: "100%", stopColor: gradientStopColor, stopOpacity: "0" })
180
- ]
181
- }
182
- ) })
183
- ]
184
- }
185
- );
186
- }
187
-
188
126
  // src/shared/marquee/marquee.tsx
189
- import { jsx as jsx3 } from "react/jsx-runtime";
127
+ import { jsx as jsx4 } from "react/jsx-runtime";
190
128
  function Marquee({
191
129
  className,
192
130
  reverse = false,
@@ -196,7 +134,7 @@ function Marquee({
196
134
  repeat = 4,
197
135
  ...props
198
136
  }) {
199
- return /* @__PURE__ */ jsx3(
137
+ return /* @__PURE__ */ jsx4(
200
138
  "div",
201
139
  {
202
140
  ...props,
@@ -208,7 +146,7 @@ function Marquee({
208
146
  },
209
147
  className
210
148
  ),
211
- children: Array(repeat).fill(0).map((_, i) => /* @__PURE__ */ jsx3(
149
+ children: Array(repeat).fill(0).map((_, i) => /* @__PURE__ */ jsx4(
212
150
  "div",
213
151
  {
214
152
  className: cn("flex shrink-0 justify-around [gap:var(--gap)]", {
@@ -226,87 +164,40 @@ function Marquee({
226
164
  }
227
165
 
228
166
  // src/shared/code-window/code-window.tsx
229
- import { jsx as jsx4 } from "react/jsx-runtime";
230
- function CodeWindow({ code, className }) {
231
- const highlightCode = (code2) => {
232
- const lines = code2.split("\n");
233
- const result = [];
234
- let prevWasComment = false;
235
- let prevWasCode = false;
236
- for (let i = 0; i < lines.length; i++) {
237
- const line = lines[i];
238
- const isComment = line.trim().startsWith("//");
239
- const isEmpty = line.trim() === "";
240
- const isCode = !isComment && !isEmpty;
241
- if (isComment && prevWasCode) {
242
- result.push(/* @__PURE__ */ jsx4("div", { className: "h-5" }, `space-before-${i}`));
243
- }
244
- if (prevWasComment && isCode) {
245
- result.push(/* @__PURE__ */ jsx4("div", { className: "h-5" }, `space-after-${i}`));
246
- }
247
- if (isEmpty) {
248
- result.push(/* @__PURE__ */ jsx4("div", { className: "h-5" }, i));
249
- prevWasComment = false;
250
- prevWasCode = false;
251
- continue;
252
- }
253
- if (isComment) {
254
- result.push(
255
- /* @__PURE__ */ jsx4("div", { className: "text-[#7d8590]", children: line }, i)
256
- );
257
- prevWasComment = true;
258
- prevWasCode = false;
259
- continue;
260
- }
261
- let highlighted = line;
262
- highlighted = highlighted.replace(
263
- /\$\.(\w+)\.(\w+)/g,
264
- '<span class="text-[#79c0ff]">$</span>.<span class="text-[#d2a8ff]">$1</span>.<span class="text-[#ffa657]">$2</span>'
265
- );
266
- highlighted = highlighted.replace(/(\w+):/g, '<span class="text-[#79c0ff]">$1</span>:');
267
- highlighted = highlighted.replace(/'([^']*)'/g, `<span class="text-[#a5d6ff]">'$1'</span>`);
268
- highlighted = highlighted.replace(/\b(\d+)\b/g, '<span class="text-[#79c0ff]">$1</span>');
269
- result.push(/* @__PURE__ */ jsx4("div", { dangerouslySetInnerHTML: { __html: highlighted } }, i));
270
- prevWasComment = false;
271
- prevWasCode = true;
272
- }
273
- return result;
274
- };
275
- return /* @__PURE__ */ jsx4("div", { className: `w-full h-full bg-[#0d1117] rounded-lg overflow-hidden ${className ?? ""}`, children: /* @__PURE__ */ jsx4("div", { className: "flex-1 overflow-auto p-6 lg:p-8", children: /* @__PURE__ */ jsx4("pre", { className: "text-sm lg:text-sm leading-relaxed font-mono text-[#e6edf3]", children: highlightCode(code) }) }) });
276
- }
277
-
278
- // src/shared/grid-pattern/grid-pattern.tsx
279
- import { useId as useId2 } from "react";
280
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
281
- function GridPattern({
282
- width = 40,
283
- height = 40,
284
- x = -1,
285
- y = -1,
286
- strokeDasharray = "0",
287
- squares,
288
- className,
289
- ...props
167
+ import { useEffect, useState } from "react";
168
+ import { jsx as jsx5 } from "react/jsx-runtime";
169
+ function CodeWindow({
170
+ code,
171
+ language = "typescript",
172
+ themes = "github-dark-default",
173
+ className
290
174
  }) {
291
- const id = useId2();
292
- return /* @__PURE__ */ jsxs2(
293
- "svg",
294
- {
295
- "aria-hidden": "true",
296
- className: cn("pointer-events-none absolute inset-0 h-full w-full fill-muted-foreground/20 stroke-muted-foreground/20", className),
297
- ...props,
298
- children: [
299
- /* @__PURE__ */ jsx5("defs", { children: /* @__PURE__ */ jsx5("pattern", { id, width, height, patternUnits: "userSpaceOnUse", x, y, children: /* @__PURE__ */ jsx5("path", { d: `M.5 ${height}V.5H${width}`, fill: "none", strokeDasharray }) }) }),
300
- /* @__PURE__ */ jsx5("rect", { width: "100%", height: "100%", strokeWidth: 0, fill: `url(#${id})` }),
301
- squares && /* @__PURE__ */ jsx5("svg", { x, y, className: "overflow-visible", children: squares.map(([sx, sy]) => /* @__PURE__ */ jsx5("rect", { strokeWidth: "0", width: width - 1, height: height - 1, x: sx * width + 1, y: sy * height + 1 }, `${sx}-${sy}`)) })
302
- ]
303
- }
304
- );
175
+ const [html, setHtml] = useState(null);
176
+ const themesKey = typeof themes === "string" ? themes : `${themes.light}/${themes.dark}`;
177
+ useEffect(() => {
178
+ let alive = true;
179
+ import("shiki").then(
180
+ ({ codeToHtml }) => codeToHtml(
181
+ code,
182
+ typeof themes === "string" ? { lang: language, theme: themes } : { lang: language, themes, defaultColor: "light" }
183
+ )
184
+ ).then((out) => {
185
+ if (alive) setHtml(out);
186
+ }).catch(() => {
187
+ });
188
+ return () => {
189
+ alive = false;
190
+ };
191
+ }, [code, language, themesKey]);
192
+ return /* @__PURE__ */ jsx5("div", { className: cn("w-full h-full overflow-auto font-mono", className), children: html ? (
193
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: shiki output; input is escaped by shiki
194
+ /* @__PURE__ */ jsx5("div", { dangerouslySetInnerHTML: { __html: html } })
195
+ ) : /* @__PURE__ */ jsx5("pre", { className: "m-0 whitespace-pre", children: /* @__PURE__ */ jsx5("code", { children: code }) }) });
305
196
  }
306
197
  export {
307
- AnimatedBeam,
198
+ Button,
308
199
  CodeWindow,
309
- GridPattern,
200
+ Input,
310
201
  Marquee,
311
202
  ScrollReveal
312
203
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shared/scroll-reveal/scroll-reveal.tsx","../../src/shared/animated-beam/animated-beam.tsx","../../src/lib/utils.ts","../../src/shared/marquee/marquee.tsx","../../src/shared/code-window/code-window.tsx","../../src/shared/grid-pattern/grid-pattern.tsx"],"sourcesContent":["'use client'\n\nimport { motion, Variants } from 'motion/react'\nimport { ReactNode } from 'react'\n\nexport interface ScrollRevealProps {\n children: ReactNode\n className?: string\n delay?: number\n direction?: 'up' | 'down' | 'left' | 'right' | 'none'\n duration?: number\n trigger?: 'inView' | 'mount'\n once?: boolean\n margin?: string\n}\n\nconst directionVariants: Record<string, Variants> = {\n up: {\n hidden: { opacity: 0, y: 50 },\n visible: { opacity: 1, y: 0 },\n },\n down: {\n hidden: { opacity: 0, y: -50 },\n visible: { opacity: 1, y: 0 },\n },\n left: {\n hidden: { opacity: 0, x: -50 },\n visible: { opacity: 1, x: 0 },\n },\n right: {\n hidden: { opacity: 0, x: 50 },\n visible: { opacity: 1, x: 0 },\n },\n none: {\n hidden: { opacity: 0 },\n visible: { opacity: 1 },\n },\n}\n\nexport function ScrollReveal({\n children,\n className,\n delay = 0,\n direction = 'up',\n duration = 0.5,\n trigger = 'inView',\n once = true,\n margin = '-100px',\n}: ScrollRevealProps) {\n if (trigger === 'mount') {\n return (\n <motion.div\n initial=\"hidden\"\n animate=\"visible\"\n transition={{ duration, delay, ease: 'easeOut' }}\n variants={directionVariants[direction]}\n className={className}\n >\n {children}\n </motion.div>\n )\n }\n\n return (\n <motion.div\n initial=\"hidden\"\n whileInView=\"visible\"\n viewport={{ once, margin }}\n transition={{ duration, delay, ease: 'easeOut' }}\n variants={directionVariants[direction]}\n className={className}\n >\n {children}\n </motion.div>\n )\n}\n","'use client'\n\nimport { RefObject, useEffect, useId, useState } from 'react'\nimport { motion } from 'motion/react'\nimport { cn } from '../../lib/utils'\n\nexport interface AnimatedBeamProps {\n className?: string\n containerRef: RefObject<HTMLElement | null>\n fromRef: RefObject<HTMLElement | null>\n toRef: RefObject<HTMLElement | null>\n curvature?: number\n reverse?: boolean\n pathColor?: string\n pathWidth?: number\n pathOpacity?: number\n gradientStartColor?: string\n gradientStopColor?: string\n delay?: number\n duration?: number\n startXOffset?: number\n startYOffset?: number\n endXOffset?: number\n endYOffset?: number\n}\n\nexport function AnimatedBeam({\n className,\n containerRef,\n fromRef,\n toRef,\n curvature = 0,\n reverse = false,\n duration = Math.random() * 3 + 4,\n delay = 0,\n pathColor = 'gray',\n pathWidth = 2,\n pathOpacity = 0.2,\n gradientStartColor = '#ffaa40',\n gradientStopColor = '#9c40ff',\n startXOffset = 0,\n startYOffset = 0,\n endXOffset = 0,\n endYOffset = 0,\n}: AnimatedBeamProps) {\n const id = useId()\n const [pathD, setPathD] = useState('')\n const [svgDimensions, setSvgDimensions] = useState({ width: 0, height: 0 })\n\n const gradientCoordinates = reverse\n ? {\n x1: ['90%', '-10%'],\n x2: ['100%', '0%'],\n y1: ['0%', '0%'],\n y2: ['0%', '0%'],\n }\n : {\n x1: ['10%', '110%'],\n x2: ['0%', '100%'],\n y1: ['0%', '0%'],\n y2: ['0%', '0%'],\n }\n\n useEffect(() => {\n const updatePath = () => {\n if (containerRef.current && fromRef.current && toRef.current) {\n const containerRect = containerRef.current.getBoundingClientRect()\n const rectA = fromRef.current.getBoundingClientRect()\n const rectB = toRef.current.getBoundingClientRect()\n\n const svgWidth = containerRect.width\n const svgHeight = containerRect.height\n setSvgDimensions({ width: svgWidth, height: svgHeight })\n\n const startX = rectA.left - containerRect.left + rectA.width / 2 + startXOffset\n const startY = rectA.top - containerRect.top + rectA.height / 2 + startYOffset\n const endX = rectB.left - containerRect.left + rectB.width / 2 + endXOffset\n const endY = rectB.top - containerRect.top + rectB.height / 2 + endYOffset\n\n const controlY = startY - curvature\n const d = `M ${startX},${startY} Q ${(startX + endX) / 2},${controlY} ${endX},${endY}`\n setPathD(d)\n }\n }\n\n const resizeObserver = new ResizeObserver(() => {\n updatePath()\n })\n\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current)\n }\n\n updatePath()\n\n return () => {\n resizeObserver.disconnect()\n }\n }, [containerRef, fromRef, toRef, curvature, startXOffset, startYOffset, endXOffset, endYOffset])\n\n return (\n <svg\n fill=\"none\"\n width={svgDimensions.width}\n height={svgDimensions.height}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn('pointer-events-none absolute top-0 left-0 transform-gpu stroke-2', className)}\n viewBox={`0 0 ${svgDimensions.width} ${svgDimensions.height}`}\n >\n <path d={pathD} stroke={pathColor} strokeWidth={pathWidth} strokeOpacity={pathOpacity} strokeLinecap=\"round\" />\n <path d={pathD} strokeWidth={pathWidth} stroke={`url(#${id})`} strokeOpacity=\"1\" strokeLinecap=\"round\" />\n <defs>\n <motion.linearGradient\n className=\"transform-gpu\"\n id={id}\n gradientUnits={'userSpaceOnUse'}\n initial={{\n x1: '0%',\n x2: '0%',\n y1: '0%',\n y2: '0%',\n }}\n animate={{\n x1: gradientCoordinates.x1,\n x2: gradientCoordinates.x2,\n y1: gradientCoordinates.y1,\n y2: gradientCoordinates.y2,\n }}\n transition={{\n delay,\n duration,\n ease: [0.16, 1, 0.3, 1],\n repeat: Infinity,\n repeatDelay: 0,\n }}\n >\n <stop stopColor={gradientStartColor} stopOpacity=\"0\"></stop>\n <stop stopColor={gradientStartColor}></stop>\n <stop offset=\"32.5%\" stopColor={gradientStopColor}></stop>\n <stop offset=\"100%\" stopColor={gradientStopColor} stopOpacity=\"0\"></stop>\n </motion.linearGradient>\n </defs>\n </svg>\n )\n}\n","import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { ComponentPropsWithoutRef } from 'react'\nimport { cn } from '../../lib/utils'\n\nexport interface MarqueeProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Optional CSS class name to apply custom styles\n */\n className?: string\n /**\n * Whether to reverse the animation direction\n * @default false\n */\n reverse?: boolean\n /**\n * Whether to pause the animation on hover\n * @default false\n */\n pauseOnHover?: boolean\n /**\n * Content to be displayed in the marquee\n */\n children: React.ReactNode\n /**\n * Whether to animate vertically instead of horizontally\n * @default false\n */\n vertical?: boolean\n /**\n * Number of times to repeat the content\n * @default 4\n */\n repeat?: number\n}\n\nexport function Marquee({\n className,\n reverse = false,\n pauseOnHover = false,\n children,\n vertical = false,\n repeat = 4,\n ...props\n}: MarqueeProps) {\n return (\n <div\n {...props}\n className={cn(\n 'group flex [gap:var(--gap)] overflow-hidden p-2 [--duration:40s] [--gap:1rem]',\n {\n 'flex-row': !vertical,\n 'flex-col': vertical,\n },\n className\n )}\n >\n {Array(repeat)\n .fill(0)\n .map((_, i) => (\n <div\n key={i}\n className={cn('flex shrink-0 justify-around [gap:var(--gap)]', {\n 'animate-marquee flex-row': !vertical,\n 'animate-marquee-vertical flex-col': vertical,\n 'group-hover:[animation-play-state:paused]': pauseOnHover,\n '[animation-direction:reverse]': reverse,\n })}\n >\n {children}\n </div>\n ))}\n </div>\n )\n}\n","import React from 'react'\n\nexport interface CodeWindowProps {\n code: string\n className?: string\n}\n\nexport function CodeWindow({ code, className }: CodeWindowProps) {\n const highlightCode = (code: string) => {\n const lines = code.split('\\n')\n const result: React.ReactElement[] = []\n let prevWasComment = false\n let prevWasCode = false\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]\n const isComment = line.trim().startsWith('//')\n const isEmpty = line.trim() === ''\n const isCode = !isComment && !isEmpty\n\n if (isComment && prevWasCode) {\n result.push(<div key={`space-before-${i}`} className=\"h-5\"></div>)\n }\n\n if (prevWasComment && isCode) {\n result.push(<div key={`space-after-${i}`} className=\"h-5\"></div>)\n }\n\n if (isEmpty) {\n result.push(<div key={i} className=\"h-5\"></div>)\n prevWasComment = false\n prevWasCode = false\n continue\n }\n\n if (isComment) {\n result.push(\n <div key={i} className=\"text-[#7d8590]\">\n {line}\n </div>\n )\n prevWasComment = true\n prevWasCode = false\n continue\n }\n\n let highlighted = line\n\n // Function names and properties with dots\n highlighted = highlighted.replace(\n /\\$\\.(\\w+)\\.(\\w+)/g,\n '<span class=\"text-[#79c0ff]\">$</span>.<span class=\"text-[#d2a8ff]\">$1</span>.<span class=\"text-[#ffa657]\">$2</span>'\n )\n\n // Object properties\n highlighted = highlighted.replace(/(\\w+):/g, '<span class=\"text-[#79c0ff]\">$1</span>:')\n\n // Strings\n highlighted = highlighted.replace(/'([^']*)'/g, \"<span class=\\\"text-[#a5d6ff]\\\">'$1'</span>\")\n\n // Numbers\n highlighted = highlighted.replace(/\\b(\\d+)\\b/g, '<span class=\"text-[#79c0ff]\">$1</span>')\n\n result.push(<div key={i} dangerouslySetInnerHTML={{ __html: highlighted }} />)\n\n prevWasComment = false\n prevWasCode = true\n }\n\n return result\n }\n\n return (\n <div className={`w-full h-full bg-[#0d1117] rounded-lg overflow-hidden ${className ?? ''}`}>\n <div className=\"flex-1 overflow-auto p-6 lg:p-8\">\n <pre className=\"text-sm lg:text-sm leading-relaxed font-mono text-[#e6edf3]\">{highlightCode(code)}</pre>\n </div>\n </div>\n )\n}\n","import { useId } from 'react'\nimport { cn } from '../../lib/utils'\n\nexport interface GridPatternProps extends React.SVGProps<SVGSVGElement> {\n width?: number\n height?: number\n x?: number\n y?: number\n squares?: Array<[x: number, y: number]>\n strokeDasharray?: string\n className?: string\n}\n\nexport function GridPattern({\n width = 40,\n height = 40,\n x = -1,\n y = -1,\n strokeDasharray = '0',\n squares,\n className,\n ...props\n}: GridPatternProps) {\n const id = useId()\n\n return (\n <svg\n aria-hidden=\"true\"\n className={cn('pointer-events-none absolute inset-0 h-full w-full fill-muted-foreground/20 stroke-muted-foreground/20', className)}\n {...props}\n >\n <defs>\n <pattern id={id} width={width} height={height} patternUnits=\"userSpaceOnUse\" x={x} y={y}>\n <path d={`M.5 ${height}V.5H${width}`} fill=\"none\" strokeDasharray={strokeDasharray} />\n </pattern>\n </defs>\n <rect width=\"100%\" height=\"100%\" strokeWidth={0} fill={`url(#${id})`} />\n {squares && (\n <svg x={x} y={y} className=\"overflow-visible\">\n {squares.map(([sx, sy]) => (\n <rect strokeWidth=\"0\" key={`${sx}-${sy}`} width={width - 1} height={height - 1} x={sx * width + 1} y={sy * height + 1} />\n ))}\n </svg>\n )}\n </svg>\n )\n}\n"],"mappings":";AAEA,SAAS,cAAwB;AAiD3B;AAnCN,IAAM,oBAA8C;AAAA,EAClD,IAAI;AAAA,IACF,QAAQ,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,IAC5B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,EAC9B;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ,EAAE,SAAS,GAAG,GAAG,IAAI;AAAA,IAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,EAC9B;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ,EAAE,SAAS,GAAG,GAAG,IAAI;AAAA,IAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,EAC9B;AAAA,EACA,OAAO;AAAA,IACL,QAAQ,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,IAC5B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,EAC9B;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ,EAAE,SAAS,EAAE;AAAA,IACrB,SAAS,EAAE,SAAS,EAAE;AAAA,EACxB;AACF;AAEO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AACX,GAAsB;AACpB,MAAI,YAAY,SAAS;AACvB,WACE;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,SAAQ;AAAA,QACR,SAAQ;AAAA,QACR,YAAY,EAAE,UAAU,OAAO,MAAM,UAAU;AAAA,QAC/C,UAAU,kBAAkB,SAAS;AAAA,QACrC;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAE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QAAO,aAAa,GAAG,MAAM,QAAQ,EAAE,KAAK;AAAA,QACrE,WACC,gBAAAA,KAAC,SAAI,GAAM,GAAM,WAAU,oBACxB,kBAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,MACnB,gBAAAA,KAAC,UAAK,aAAY,KAAwB,OAAO,QAAQ,GAAG,QAAQ,SAAS,GAAG,GAAG,KAAK,QAAQ,GAAG,GAAG,KAAK,SAAS,KAAzF,GAAG,EAAE,IAAI,EAAE,EAAiF,CACxH,GACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["motion","jsx","motion","jsx","jsx","code","useId","jsx","jsxs","useId"]}
1
+ {"version":3,"sources":["../../src/templates/studio/ui/button/button.tsx","../../src/lib/utils.ts","../../src/templates/studio/ui/input/input.tsx","../../src/shared/scroll-reveal/scroll-reveal.tsx","../../src/shared/marquee/marquee.tsx","../../src/shared/code-window/code-window.tsx"],"sourcesContent":["'use client'\n\n/**\n * The named-agents baseline Button (components/ui/button.tsx) — rounded-full\n * pills on the baseline token vocabulary: `btn-gradient-dark` ink-gradient\n * primary, surface-raised secondary, the persona `accent` variant, and the\n * h-12/text-base default size. The sections previously borrowed\n * @mdxui/primitives' Button (flat bg-primary, h-9, theme radius), which is a\n * different design language — buttons must speak the baseline tokens the\n * `[data-dialect=\"named\"]` envelope defines (`--color-btn-primary-*`,\n * `--color-surface-raised`, `--color-hover`, `--color-accent-*`).\n *\n * Ported without cva/Radix Slot to keep the package dependency-free: variants\n * are a plain class map, `asChild` clones the single child element (the named\n * call sites always pass one `<a>`).\n */\n\nimport * as React from 'react'\nimport { cn } from '../../../../lib/utils'\n\nexport type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'link' | 'accent'\nexport type ButtonSize = 'default' | 'sm' | 'lg' | 'icon'\n\nconst baseClasses =\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-ring) disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer'\n\nconst variantClasses: Record<ButtonVariant, string> = {\n default: 'btn-gradient-dark text-(--color-btn-primary-fg) shadow-md hover:shadow-lg rounded-full',\n secondary:\n 'bg-(--color-surface-raised) text-(--color-fg) border border-(--color-border) shadow-sm hover:shadow-md rounded-full',\n outline: 'border border-(--color-border) bg-transparent text-(--color-fg) hover:bg-(--color-hover) rounded-full',\n ghost: 'text-(--color-fg) hover:bg-(--color-hover) rounded-full',\n link: 'text-(--color-fg) underline-offset-4 hover:underline',\n accent: 'bg-(--color-accent-strong) text-(--color-accent-fg) shadow-md hover:opacity-90 hover:shadow-lg rounded-full',\n}\n\nconst sizeClasses: Record<ButtonSize, string> = {\n default: 'h-12 px-6 py-3 text-base',\n sm: 'h-10 px-4 py-2 text-sm',\n lg: 'h-14 px-8 py-4 text-lg',\n icon: 'h-12 w-12',\n}\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant\n size?: ButtonSize\n asChild?: boolean\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'default', size = 'default', asChild = false, children, ...props }, ref) => {\n const classes = cn(baseClasses, variantClasses[variant], sizeClasses[size], className)\n\n if (asChild && React.isValidElement(children)) {\n const child = children as React.ReactElement<{ className?: string }>\n return React.cloneElement(child, {\n ...props,\n className: cn(classes, child.props.className),\n })\n }\n\n return (\n <button ref={ref} className={classes} {...props}>\n {children}\n </button>\n )\n },\n)\nButton.displayName = 'Button'\n","import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/** A src is renderable only when its bytes are guaranteed to resolve — an\n * absolute http(s)/protocol-relative/data URL. App-relative paths\n * (`/images/hero/hero-main.png`) and bare tokens (`\"linear\"`) 404 on the\n * consumer host (the live priya.studio.sb broken hero + marquee), so image\n * slots are skipped and the layout reflows to its no-image variant. */\nexport const isRenderableSrc = (s: string): boolean =>\n /^(https?:)?\\/\\//i.test(s.trim()) || /^data:image\\//i.test(s.trim())\n\n/** Canonical display casing for common brand tokens; otherwise capitalize.\n * Shared across templates — hero marquee chips (studio) and the ruled\n * tool strip (executive) both render bare tool tokens as labels. */\nconst BRAND_LABELS: Record<string, string> = {\n github: 'GitHub',\n gitlab: 'GitLab',\n linkedin: 'LinkedIn',\n youtube: 'YouTube',\n whatsapp: 'WhatsApp',\n hubspot: 'HubSpot',\n quickbooks: 'QuickBooks',\n typescript: 'TypeScript',\n javascript: 'JavaScript',\n postgresql: 'PostgreSQL',\n mongodb: 'MongoDB',\n graphql: 'GraphQL',\n openai: 'OpenAI',\n}\nexport const brandLabel = (s: string): string => {\n const t = s.trim()\n return BRAND_LABELS[t.toLowerCase()] ?? t.charAt(0).toUpperCase() + t.slice(1)\n}\n","'use client'\n\n/**\n * The named-agents baseline Input (components/ui/input.tsx), verbatim on the\n * baseline token vocabulary. Notably `h-11` and `bg-transparent` — the footer's\n * email capture positions a `py-3` submit button inside the field, which\n * overflows @mdxui/primitives' `h-9 bg-background` Input (the drift that broke\n * the footer input's padding).\n */\n\nimport * as React from 'react'\nimport { cn } from '../../../../lib/utils'\n\nexport const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-11 w-full rounded-md border border-(--color-border) bg-transparent px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-(--color-fg) placeholder:text-(--color-fg-muted) focus-visible:outline-none focus-visible:border-(--color-border-strong) focus-visible:ring-1 focus-visible:ring-(--color-ring) disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n },\n)\nInput.displayName = 'Input'\n","'use client'\n\nimport { motion, Variants } from 'motion/react'\nimport { ReactNode } from 'react'\n\nexport interface ScrollRevealProps {\n children: ReactNode\n className?: string\n delay?: number\n direction?: 'up' | 'down' | 'left' | 'right' | 'none'\n duration?: number\n trigger?: 'inView' | 'mount'\n once?: boolean\n margin?: string\n}\n\nconst directionVariants: Record<string, Variants> = {\n up: {\n hidden: { opacity: 0, y: 50 },\n visible: { opacity: 1, y: 0 },\n },\n down: {\n hidden: { opacity: 0, y: -50 },\n visible: { opacity: 1, y: 0 },\n },\n left: {\n hidden: { opacity: 0, x: -50 },\n visible: { opacity: 1, x: 0 },\n },\n right: {\n hidden: { opacity: 0, x: 50 },\n visible: { opacity: 1, x: 0 },\n },\n none: {\n hidden: { opacity: 0 },\n visible: { opacity: 1 },\n },\n}\n\nexport function ScrollReveal({\n children,\n className,\n delay = 0,\n direction = 'up',\n duration = 0.5,\n trigger = 'inView',\n once = true,\n margin = '-100px',\n}: ScrollRevealProps) {\n if (trigger === 'mount') {\n return (\n <motion.div\n initial=\"hidden\"\n animate=\"visible\"\n transition={{ duration, delay, ease: 'easeOut' }}\n variants={directionVariants[direction]}\n className={className}\n >\n {children}\n </motion.div>\n )\n }\n\n return (\n <motion.div\n initial=\"hidden\"\n whileInView=\"visible\"\n viewport={{ once, margin }}\n transition={{ duration, delay, ease: 'easeOut' }}\n variants={directionVariants[direction]}\n className={className}\n >\n {children}\n </motion.div>\n )\n}\n","import { ComponentPropsWithoutRef } from 'react'\nimport { cn } from '../../lib/utils'\n\nexport interface MarqueeProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Optional CSS class name to apply custom styles\n */\n className?: string\n /**\n * Whether to reverse the animation direction\n * @default false\n */\n reverse?: boolean\n /**\n * Whether to pause the animation on hover\n * @default false\n */\n pauseOnHover?: boolean\n /**\n * Content to be displayed in the marquee\n */\n children: React.ReactNode\n /**\n * Whether to animate vertically instead of horizontally\n * @default false\n */\n vertical?: boolean\n /**\n * Number of times to repeat the content\n * @default 4\n */\n repeat?: number\n}\n\nexport function Marquee({\n className,\n reverse = false,\n pauseOnHover = false,\n children,\n vertical = false,\n repeat = 4,\n ...props\n}: MarqueeProps) {\n return (\n <div\n {...props}\n className={cn(\n 'group flex [gap:var(--gap)] overflow-hidden p-2 [--duration:40s] [--gap:1rem]',\n {\n 'flex-row': !vertical,\n 'flex-col': vertical,\n },\n className\n )}\n >\n {Array(repeat)\n .fill(0)\n .map((_, i) => (\n <div\n key={i}\n className={cn('flex shrink-0 justify-around [gap:var(--gap)]', {\n 'animate-marquee flex-row': !vertical,\n 'animate-marquee-vertical flex-col': vertical,\n 'group-hover:[animation-play-state:paused]': pauseOnHover,\n '[animation-direction:reverse]': reverse,\n })}\n >\n {children}\n </div>\n ))}\n </div>\n )\n}\n","'use client'\n\n/**\n * CodeWindow — shiki-highlighted code block, shared across templates.\n *\n * The named-agent templates render whatever code the cascade generates for\n * ANY persona, so highlighting is a real tokenizer (shiki), not the\n * baseline's regex pass (which was grammar-locked to the `$.Priya.method()`\n * DSL shape). Shiki is dynamically imported so consumers only pay for it\n * when a code window actually mounts; until it resolves (and whenever\n * highlighting fails), the fallback is the plain escaped code — content is\n * never invisible.\n *\n * Theming: this component is visually NEUTRAL — the calling template owns\n * the panel (background, border, padding, type size) via `className`, and\n * the envelopes force `.shiki { background: transparent }` so shiki's theme\n * background never fights the panel. Pass a single theme name for a fixed\n * appearance (studio's always-dark panel) or a `{ light, dark }` pair to\n * follow the host's `.dark` class via the envelope's dual-theme CSS.\n */\n\nimport { useEffect, useState } from 'react'\nimport { cn } from '../../lib/utils'\n\nexport interface CodeWindowProps {\n code: string\n /** Shiki language id. The persona DSL is valid TypeScript — the default. */\n language?: string\n /** Shiki theme: one name = fixed; a pair = follows the host `.dark` class\n * (requires the envelope's `--shiki-dark` switch CSS). */\n themes?: string | { light: string; dark: string }\n className?: string\n}\n\nexport function CodeWindow({\n code,\n language = 'typescript',\n themes = 'github-dark-default',\n className,\n}: CodeWindowProps) {\n const [html, setHtml] = useState<string | null>(null)\n const themesKey = typeof themes === 'string' ? themes : `${themes.light}/${themes.dark}`\n\n useEffect(() => {\n let alive = true\n import('shiki')\n .then(({ codeToHtml }) =>\n codeToHtml(\n code,\n typeof themes === 'string'\n ? { lang: language, theme: themes }\n : { lang: language, themes, defaultColor: 'light' },\n ),\n )\n .then((out) => {\n if (alive) setHtml(out)\n })\n .catch(() => {\n // Unknown language / load failure → keep the plain fallback.\n })\n return () => {\n alive = false\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- themesKey covers `themes`\n }, [code, language, themesKey])\n\n return (\n <div className={cn('w-full h-full overflow-auto font-mono', className)}>\n {html ? (\n // biome-ignore lint/security/noDangerouslySetInnerHtml: shiki output; input is escaped by shiki\n <div dangerouslySetInnerHTML={{ __html: html }} />\n ) : (\n <pre className=\"m-0 whitespace-pre\">\n <code>{code}</code>\n </pre>\n )}\n </div>\n )\n}\n"],"mappings":";AAiBA,YAAY,WAAW;;;ACjBvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADyDM;AAvCN,IAAM,cACJ;AAEF,IAAM,iBAAgD;AAAA,EACpD,SAAS;AAAA,EACT,WACE;AAAA,EACF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AACV;AAEA,IAAM,cAA0C;AAAA,EAC9C,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR;AAQO,IAAM,SAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,WAAW,OAAO,WAAW,UAAU,OAAO,UAAU,GAAG,MAAM,GAAG,QAAQ;AAClG,UAAM,UAAU,GAAG,aAAa,eAAe,OAAO,GAAG,YAAY,IAAI,GAAG,SAAS;AAErF,QAAI,WAAiB,qBAAe,QAAQ,GAAG;AAC7C,YAAM,QAAQ;AACd,aAAa,mBAAa,OAAO;AAAA,QAC/B,GAAG;AAAA,QACH,WAAW,GAA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