@publish.os/nextjs 0.0.1-alpha.90 → 0.0.1-alpha.91
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/compiler-assets/nextjs/defaults/group/layout.tsx +1 -5
- package/compiler-assets/nextjs/defaults/group/page.tsx +31 -22
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +19 -10
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -0
- package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
- package/compiler-assets/nextjs/shims/document.tsx +38 -0
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +2 -0
- package/compiler-assets/nextjs/shims/global-layout.tsx +8 -42
- package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
- package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
- package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
- package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
- package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
- package/compiler-assets/nextjs/shims/proxy.ts +126 -60
- package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +2 -6
- package/compiler-assets/nextjs/shims/site-mdx-components.tsx +28 -16
- package/compiler-assets/nextjs/shims/site-mdx.tsx +6 -1
- package/dist/{build-operation-2JAYBSKF.js → build-operation-5QMLXF7N.js} +29 -23
- package/dist/{button-c3WGnxIj.d.ts → button-BdCScEKi.d.ts} +3 -3
- package/dist/capture-local-source-WGGDIUU2.js +258 -0
- package/dist/chunk-22RSSUNV.js +13 -0
- package/dist/{chunk-WKTEO6RS.js → chunk-4BC2L2KA.js} +46 -12
- package/dist/{chunk-WDY4IK6Z.js → chunk-5J3YUNRY.js} +3 -10
- package/dist/chunk-5KAD7W53.js +248 -0
- package/dist/{chunk-DWA3ZRGW.js → chunk-6C65KV7O.js} +2 -2
- package/dist/{chunk-GGKFQ3MA.js → chunk-6D2E6UMD.js} +144 -70
- package/dist/{chunk-7OGTPSKI.js → chunk-7NY22B5U.js} +8 -3
- package/dist/chunk-EFO6AWXN.js +19 -0
- package/dist/{chunk-726GV2NF.js → chunk-F3AGNDF4.js} +100 -67
- package/dist/chunk-GBPLER5H.js +426 -0
- package/dist/chunk-IL4RJOKI.js +186 -0
- package/dist/{chunk-DLDFHU7Y.js → chunk-NNBJZPFM.js} +4 -2
- package/dist/{chunk-VO2I7MTM.js → chunk-ORIUWJBQ.js} +8 -6
- package/dist/{chunk-H6XILMZX.js → chunk-OXOFRXEI.js} +1806 -831
- package/dist/chunk-UYGCOWRF.js +1709 -0
- package/dist/{chunk-YLTOLYWM.js → chunk-WL75GQ5M.js} +6 -18
- package/dist/compiler.d.ts +15 -2
- package/dist/compiler.js +90 -21
- package/dist/components/blocks/agent-actions.d.ts +81 -0
- package/dist/components/blocks/agent-actions.js +594 -0
- package/dist/components/blocks/toc.d.ts +43 -0
- package/dist/components/blocks/toc.js +136 -0
- package/dist/components/ui/button.d.ts +5 -0
- package/dist/components/ui/button.js +94 -0
- package/dist/compose-CVBJRAF6.js +16 -0
- package/dist/config/createNextConfig.js +17 -3
- package/dist/{dev-operation-TZDVJCN7.js → dev-operation-OSHHWRWK.js} +121 -81
- package/dist/{framework-selection-X4U6Y6QC.js → framework-selection-ZVO323PK.js} +3 -2
- package/dist/ide-support-CU6Z5PVR.js +16 -0
- package/dist/index.d.ts +40 -1
- package/dist/jsx-dev-runtime.d.ts +6 -0
- package/dist/jsx-dev-runtime.js +100 -0
- package/dist/jsx-runtime.d.ts +7 -0
- package/dist/jsx-runtime.js +97 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +35 -6
- package/dist/kernel/components/blocks/AgentActions.js +383 -142
- package/dist/kernel/components/blocks/agent-actions.d.ts +5 -0
- package/dist/kernel/components/blocks/agent-actions.js +594 -0
- package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
- package/dist/kernel/components/blocks/color-palette.js +4 -4
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -2
- package/dist/kernel/components/blocks/navbar.js +17 -17
- package/dist/kernel/components/blocks/navigation-progress.js +2 -2
- package/dist/kernel/components/blocks/next-prev.js +1 -1
- package/dist/kernel/components/blocks/page-list.js +2 -2
- package/dist/kernel/components/blocks/search.d.ts +1 -1
- package/dist/kernel/components/blocks/search.js +16 -17
- package/dist/kernel/components/blocks/sidebar-node.js +1 -1
- package/dist/kernel/components/blocks/sidebar.js +7 -4
- package/dist/kernel/components/blocks/theme-toggle.d.ts +1 -1
- package/dist/kernel/components/blocks/theme-toggle.js +5 -5
- package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
- package/dist/kernel/components/blocks/toc-client.js +495 -0
- package/dist/kernel/components/blocks/toc.d.ts +19 -1
- package/dist/kernel/components/blocks/toc.js +121 -179
- package/dist/kernel/components/mdx/components/blockquote.js +1 -1
- package/dist/kernel/components/mdx/components/callout.js +1 -1
- package/dist/kernel/components/mdx/components/code-block.js +2 -2
- package/dist/kernel/components/mdx/components/copy-code-button.js +5 -4
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
- package/dist/kernel/components/mdx/components/figure-caption.js +3 -2
- package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
- package/dist/kernel/components/mdx/components/figure.js +23 -13
- package/dist/kernel/components/mdx/components/footnotes.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.js +1 -1
- package/dist/kernel/components/mdx/components/heading.js +6 -3
- package/dist/kernel/components/mdx/components/hr.js +2 -2
- package/dist/kernel/components/mdx/components/image-zoom.js +1 -1
- package/dist/kernel/components/mdx/components/image.d.ts +1 -1
- package/dist/kernel/components/mdx/components/image.js +21 -16
- package/dist/kernel/components/mdx/components/inline-code.js +1 -1
- package/dist/kernel/components/mdx/components/kbd.js +2 -2
- package/dist/kernel/components/mdx/components/link.d.ts +3 -3
- package/dist/kernel/components/mdx/components/link.js +2 -2
- package/dist/kernel/components/mdx/components/paragraph.js +1 -1
- package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
- package/dist/kernel/components/mdx/components/table.js +2 -2
- package/dist/kernel/components/mdx/components/task-list.js +1 -1
- package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
- package/dist/kernel/components/mdx/components/video-player.js +6 -2
- package/dist/kernel/components/mdx/components/video.d.ts +5 -3
- package/dist/kernel/components/mdx/components/video.js +7 -5
- package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
- package/dist/kernel/components/mdx/error-boundary.js +2 -2
- package/dist/kernel/components/mdx/error-fallback.js +1 -1
- package/dist/kernel/components/mdx/mdx.d.ts +20 -10
- package/dist/kernel/components/mdx/mdx.js +231 -34
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +5 -3
- package/dist/kernel/components/mdx/types.d.ts +1 -1
- package/dist/kernel/components/next-image.d.ts +12 -0
- package/dist/kernel/components/next-image.js +61 -0
- package/dist/kernel/components/ui/accordion.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +2 -2
- package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -1
- package/dist/kernel/components/ui/breadcrumb.js +4 -4
- package/dist/kernel/components/ui/button-group.d.ts +1 -1
- package/dist/kernel/components/ui/button-group.js +3 -3
- package/dist/kernel/components/ui/button.d.ts +56 -4
- package/dist/kernel/components/ui/button.js +43 -39
- package/dist/kernel/components/ui/card.js +1 -1
- package/dist/kernel/components/ui/dialog.js +1 -1
- package/dist/kernel/components/ui/drawer.js +1 -1
- package/dist/kernel/components/ui/input.d.ts +2 -2
- package/dist/kernel/components/ui/input.js +1 -1
- package/dist/kernel/components/ui/kbd.d.ts +1 -1
- package/dist/kernel/components/ui/kbd.js +1 -1
- package/dist/kernel/components/ui/link.d.ts +8 -2
- package/dist/kernel/components/ui/link.js +2 -2
- package/dist/kernel/components/ui/menu.js +1 -1
- package/dist/kernel/components/ui/mod-key.js +2 -2
- package/dist/kernel/components/ui/navigation-menu.js +1 -1
- package/dist/kernel/components/ui/popover.js +1 -1
- package/dist/kernel/components/ui/progress.js +1 -1
- package/dist/kernel/components/ui/scroll-area.d.ts +8 -8
- package/dist/kernel/components/ui/scroll-area.js +1 -1
- package/dist/kernel/components/ui/select.js +1 -1
- package/dist/kernel/components/ui/separator.js +1 -1
- package/dist/kernel/components/ui/table.js +1 -1
- package/dist/kernel/components/ui/tabs.js +1 -1
- package/dist/kernel/components/ui/tag.js +1 -1
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/text.js +1 -1
- package/dist/kernel/components/ui/toast.js +1 -1
- package/dist/kernel/components/ui/tooltip.js +1 -1
- package/dist/kernel/defaults.registry.d.ts +2 -15
- package/dist/kernel/defaults.registry.js +2 -17
- package/dist/kernel/routes/agent/markdown.d.ts +3 -0
- package/dist/kernel/routes/agent/markdown.js +219 -48
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/layouts/group.js +5 -7
- package/dist/kernel/routes/metadata/feed.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.js +109 -83
- package/dist/kernel/routes/metadata/llms.d.ts +11 -3
- package/dist/kernel/routes/metadata/llms.js +154 -57
- package/dist/kernel/routes/metadata/og-image.js +1 -1
- package/dist/kernel/routes/metadata/robots.d.ts +1 -1
- package/dist/kernel/routes/metadata/sitemap.d.ts +22 -3
- package/dist/kernel/routes/metadata/sitemap.js +183 -43
- package/dist/kernel/routes/not-found.d.ts +34 -0
- package/dist/kernel/routes/not-found.js +213 -0
- package/dist/kernel/routes/pages/group.d.ts +2 -2
- package/dist/kernel/routes/pages/group.js +1 -1
- package/dist/kernel/routes/pages/leaf.d.ts +30 -3
- package/dist/kernel/routes/pages/leaf.js +5 -4
- package/dist/kernel/routes/pages/root.d.ts +2 -2
- package/dist/kernel/routes/pages/root.js +1 -1
- package/dist/keyboard-shortcuts.js +1 -1
- package/dist/route-metadata-og-image-BeKKFHg7.d.ts +58 -0
- package/dist/search.js +7 -9
- package/dist/theme-scope.js +1 -1
- package/dist/{types-BzkZty3r.d.ts → types-J2w_puPF.d.ts} +1 -20
- package/dist/types-sM2g9nW0.d.ts +12 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/heading-ids.js +30 -11
- package/dist/utils/toc-selection.d.ts +7 -0
- package/dist/utils/toc-selection.js +14 -0
- package/dist/validate-local-source-SV44DBQT.js +16 -0
- package/dist/validate-publish-os-source-NZJF3TB2.js +14 -0
- package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
- package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
- package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
- package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
- package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
- package/init/seed/minimal/publish.os/blog/index.tsx +82 -0
- package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
- package/init/seed/minimal/publish.os/blog/page.tsx +76 -0
- package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
- package/init/seed/minimal/publish.os/docs/content/get-started.mdx +2 -3
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +5 -6
- package/init/seed/minimal/publish.os/publish.os.config.json +6 -2
- package/init/seed/minimal/publish.os/theme.css +3 -3
- package/init/seed/minimal/seed.json +11 -4
- package/init/seed/scratch/publish.os/docs/content/get-started.mdx +1 -1
- package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
- package/package.json +45 -20
- package/release/app/phosphor/package.json +3 -3
- package/release/app/phosphor/pnpm-lock.yaml.template +88 -75
- package/release/compiler/package.json +5 -3
- package/release/compiler/pnpm-lock.yaml.template +118 -74
- package/release/release.json +6 -6
- package/dist/button-CtzUJB8u.d.ts +0 -11
- package/dist/chunk-535TM4A5.js +0 -1455
- package/dist/chunk-B2V22WRT.js +0 -297
- package/dist/chunk-NECL5IBJ.js +0 -318
- package/dist/chunk-SVYGXXYR.js +0 -36
- package/dist/chunk-UF6ATARM.js +0 -1100
- package/dist/compose-NN23UJGC.js +0 -13
- package/dist/ide-support-ZNW7ODFY.js +0 -15
- package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
- package/dist/kernel/components/blocks/design-system-preview.js +0 -667
- package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
- package/dist/kernel/components/blocks/link-playground.js +0 -744
- package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
- package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
- package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
- package/dist/kernel/components/ui/theme-toggle.js +0 -53
- package/dist/validate-local-source-XRL2Y7XE.js +0 -14
- package/dist/validate-publish-os-source-DAPZ4QGE.js +0 -12
- package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
- package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
|
@@ -1,744 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/modules/design-system/link-playground.tsx
|
|
4
|
-
import { InlineCode } from "@publish.os/nextjs/kernel/components/mdx/components/inline-code";
|
|
5
|
-
import { Button } from "@publish.os/nextjs/kernel/components/ui/button";
|
|
6
|
-
import { Link } from "@publish.os/nextjs/kernel/components/ui/link";
|
|
7
|
-
import { Tabs, TabsList, TabsPanel, TabsTab } from "@publish.os/nextjs/kernel/components/ui/tabs";
|
|
8
|
-
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
9
|
-
import { useId, useMemo, useState } from "react";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
var defaultSettings = {
|
|
12
|
-
defaultColor: "var(--foreground-1)",
|
|
13
|
-
accentColor: "var(--accent-1)",
|
|
14
|
-
underlineColor: "currentColor",
|
|
15
|
-
hoverUnderlineColor: "currentColor",
|
|
16
|
-
activeUnderlineColor: "currentColor",
|
|
17
|
-
textOpacity: 90,
|
|
18
|
-
hoverTextOpacity: 100,
|
|
19
|
-
activeTextOpacity: 100,
|
|
20
|
-
standaloneTextOpacity: 90,
|
|
21
|
-
underlineOpacity: 18,
|
|
22
|
-
hoverUnderlineOpacity: 38,
|
|
23
|
-
standaloneHoverUnderlineOpacity: 38,
|
|
24
|
-
activeUnderlineOpacity: 38,
|
|
25
|
-
underlineThickness: 1,
|
|
26
|
-
underlineOffset: -0.08,
|
|
27
|
-
transitionDuration: 90,
|
|
28
|
-
transitionEase: "ease-out",
|
|
29
|
-
lightnessDelta: 0,
|
|
30
|
-
chromaScale: 1,
|
|
31
|
-
hueShift: 0
|
|
32
|
-
}, toneOrder = ["default", "accent"], variantOrder = ["link.standalone", "link.inline"];
|
|
33
|
-
function adjustedColor(color, settings) {
|
|
34
|
-
return settings.lightnessDelta === 0 && settings.chromaScale === 1 && settings.hueShift === 0 ? color : `oklch(from ${color} calc(l + ${settings.lightnessDelta / 100}) calc(c * ${settings.chromaScale}) calc(h + ${settings.hueShift}))`;
|
|
35
|
-
}
|
|
36
|
-
function linkStyle({
|
|
37
|
-
tone,
|
|
38
|
-
variant,
|
|
39
|
-
settings
|
|
40
|
-
}) {
|
|
41
|
-
let baseColor = tone === "accent" ? settings.accentColor : settings.defaultColor, isStandalone = variant === "link.standalone", textOpacity = isStandalone ? settings.standaloneTextOpacity : settings.textOpacity, hoverTextOpacity = isStandalone ? settings.standaloneTextOpacity : settings.hoverTextOpacity, underlineOpacity = isStandalone ? 0 : settings.underlineOpacity, hoverUnderlineOpacity = isStandalone ? settings.standaloneHoverUnderlineOpacity : settings.hoverUnderlineOpacity, underlineColor = settings.underlineColor, resolvedUnderlineColor = underlineColor === "currentColor" ? baseColor : underlineColor, resolvedHoverUnderlineColor = settings.hoverUnderlineColor === "currentColor" ? baseColor : settings.hoverUnderlineColor, resolvedActiveUnderlineColor = settings.activeUnderlineColor === "currentColor" ? baseColor : settings.activeUnderlineColor;
|
|
42
|
-
return {
|
|
43
|
-
"--link-active-text-opacity": `${settings.activeTextOpacity}%`,
|
|
44
|
-
"--link-active-underline-color": adjustedColor(
|
|
45
|
-
resolvedActiveUnderlineColor,
|
|
46
|
-
settings
|
|
47
|
-
),
|
|
48
|
-
"--link-active-underline-opacity": `${settings.activeUnderlineOpacity}%`,
|
|
49
|
-
"--link-color": adjustedColor(baseColor, settings),
|
|
50
|
-
"--link-hover-text-opacity": `${hoverTextOpacity}%`,
|
|
51
|
-
"--link-hover-underline-color": adjustedColor(
|
|
52
|
-
resolvedHoverUnderlineColor,
|
|
53
|
-
settings
|
|
54
|
-
),
|
|
55
|
-
"--link-hover-underline-opacity": `${hoverUnderlineOpacity}%`,
|
|
56
|
-
"--link-text-opacity": `${textOpacity}%`,
|
|
57
|
-
"--link-transition-duration": `${settings.transitionDuration}ms`,
|
|
58
|
-
"--link-underline-color": adjustedColor(resolvedUnderlineColor, settings),
|
|
59
|
-
"--link-underline-offset": `${settings.underlineOffset}em`,
|
|
60
|
-
"--link-underline-opacity": `${underlineOpacity}%`,
|
|
61
|
-
"--link-underline-thickness": `${settings.underlineThickness}px`,
|
|
62
|
-
transition: `color ${settings.transitionDuration}ms ${settings.transitionEase}`
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function buildOutput(settings) {
|
|
66
|
-
return `/* Link candidate */
|
|
67
|
-
const linkBase =
|
|
68
|
-
"group/link inline break-words rounded-button font-medium !no-underline hover:!no-underline active:!no-underline transition-colors duration-[${settings.transitionDuration}ms]";
|
|
69
|
-
|
|
70
|
-
const linkLabel =
|
|
71
|
-
"relative inline !no-underline after:absolute after:bottom-[${settings.underlineOffset}em] after:left-0 after:h-[${settings.underlineThickness}px] after:w-full after:rounded-inline-code after:bg-current after:content-['']";
|
|
72
|
-
|
|
73
|
-
const inline =
|
|
74
|
-
"[--link-text-opacity:${settings.textOpacity}%] [--link-hover-text-opacity:${settings.hoverTextOpacity}%] [--link-active-text-opacity:${settings.activeTextOpacity}%] [--link-underline-opacity:${settings.underlineOpacity}%] [--link-hover-underline-opacity:${settings.hoverUnderlineOpacity}%] [--link-active-underline-opacity:${settings.activeUnderlineOpacity}%]";
|
|
75
|
-
|
|
76
|
-
const standalone =
|
|
77
|
-
"[--link-text-opacity:${settings.standaloneTextOpacity}%] [--link-hover-text-opacity:${settings.standaloneTextOpacity}%] [--link-active-text-opacity:${settings.activeTextOpacity}%] [--link-underline-opacity:0%] [--link-hover-underline-opacity:${settings.standaloneHoverUnderlineOpacity}%] [--link-active-underline-opacity:${settings.activeUnderlineOpacity}%]";
|
|
78
|
-
|
|
79
|
-
/* CSS variables */
|
|
80
|
-
--link-text-opacity: ${settings.textOpacity}%;
|
|
81
|
-
--link-hover-text-opacity: ${settings.hoverTextOpacity}%;
|
|
82
|
-
--link-active-text-opacity: ${settings.activeTextOpacity}%;
|
|
83
|
-
--link-standalone-text-opacity: ${settings.standaloneTextOpacity}%;
|
|
84
|
-
--link-underline-opacity: ${settings.underlineOpacity}%;
|
|
85
|
-
--link-hover-underline-opacity: ${settings.hoverUnderlineOpacity}%;
|
|
86
|
-
--link-standalone-hover-underline-opacity: ${settings.standaloneHoverUnderlineOpacity}%;
|
|
87
|
-
--link-active-underline-opacity: ${settings.activeUnderlineOpacity}%;
|
|
88
|
-
--link-underline-thickness: ${settings.underlineThickness}px;
|
|
89
|
-
--link-underline-offset: ${settings.underlineOffset}em;
|
|
90
|
-
--link-transition-duration: ${settings.transitionDuration}ms;
|
|
91
|
-
--link-transition-ease: ${settings.transitionEase};
|
|
92
|
-
--link-oklch-lightness-delta: ${settings.lightnessDelta / 100};
|
|
93
|
-
--link-oklch-chroma-scale: ${settings.chromaScale};
|
|
94
|
-
--link-oklch-hue-shift: ${settings.hueShift};`;
|
|
95
|
-
}
|
|
96
|
-
function NumberControl({
|
|
97
|
-
label,
|
|
98
|
-
max,
|
|
99
|
-
min,
|
|
100
|
-
onChange,
|
|
101
|
-
step = 1,
|
|
102
|
-
unit,
|
|
103
|
-
value
|
|
104
|
-
}) {
|
|
105
|
-
let id = useId();
|
|
106
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
107
|
-
/* @__PURE__ */ jsxs(
|
|
108
|
-
"label",
|
|
109
|
-
{
|
|
110
|
-
className: "flex items-center justify-between gap-3 text-xs font-medium text-foreground-2",
|
|
111
|
-
htmlFor: id,
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ jsx("span", { children: label }),
|
|
114
|
-
/* @__PURE__ */ jsxs("span", { className: "font-mono text-[11px] text-foreground-3", children: [
|
|
115
|
-
value,
|
|
116
|
-
unit
|
|
117
|
-
] })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
),
|
|
121
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1fr_4.75rem] items-center gap-3", children: [
|
|
122
|
-
/* @__PURE__ */ jsx(
|
|
123
|
-
"input",
|
|
124
|
-
{
|
|
125
|
-
className: "h-1 w-full accent-1-foreground-1",
|
|
126
|
-
id,
|
|
127
|
-
max,
|
|
128
|
-
min,
|
|
129
|
-
onChange: (event) => onChange(Number(event.target.value)),
|
|
130
|
-
step,
|
|
131
|
-
type: "range",
|
|
132
|
-
value
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
/* @__PURE__ */ jsx(
|
|
136
|
-
"input",
|
|
137
|
-
{
|
|
138
|
-
className: "h-8 rounded-button border border-stroke-2 bg-surface-1 px-2 text-right font-mono text-xs text-foreground-1 outline-none focus:border-accent-1",
|
|
139
|
-
max,
|
|
140
|
-
min,
|
|
141
|
-
onChange: (event) => onChange(Number(event.target.value)),
|
|
142
|
-
step,
|
|
143
|
-
type: "number",
|
|
144
|
-
value
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
] })
|
|
148
|
-
] });
|
|
149
|
-
}
|
|
150
|
-
function TextControl({
|
|
151
|
-
label,
|
|
152
|
-
onChange,
|
|
153
|
-
value
|
|
154
|
-
}) {
|
|
155
|
-
let id = useId();
|
|
156
|
-
return /* @__PURE__ */ jsxs(
|
|
157
|
-
"label",
|
|
158
|
-
{
|
|
159
|
-
className: "grid gap-2 text-xs font-medium text-foreground-2",
|
|
160
|
-
htmlFor: id,
|
|
161
|
-
children: [
|
|
162
|
-
label,
|
|
163
|
-
/* @__PURE__ */ jsx(
|
|
164
|
-
"input",
|
|
165
|
-
{
|
|
166
|
-
className: "h-8 rounded-button border border-stroke-2 bg-surface-1 px-2 font-mono text-xs text-foreground-1 outline-none focus:border-accent-1",
|
|
167
|
-
id,
|
|
168
|
-
onChange: (event) => onChange(event.target.value),
|
|
169
|
-
spellCheck: !1,
|
|
170
|
-
value
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
function SegmentedControl({
|
|
178
|
-
label,
|
|
179
|
-
onChange,
|
|
180
|
-
options,
|
|
181
|
-
value
|
|
182
|
-
}) {
|
|
183
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
184
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-foreground-2", children: label }),
|
|
185
|
-
/* @__PURE__ */ jsx(
|
|
186
|
-
"div",
|
|
187
|
-
{
|
|
188
|
-
className: "grid rounded-button border border-stroke-2 bg-surface-2 p-1",
|
|
189
|
-
style: {
|
|
190
|
-
gridTemplateColumns: `repeat(${options.length}, minmax(0, 1fr))`
|
|
191
|
-
},
|
|
192
|
-
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
193
|
-
"button",
|
|
194
|
-
{
|
|
195
|
-
className: cn(
|
|
196
|
-
"h-8 rounded-[max(calc(var(--radius-button)-0.25rem),0px)] px-2 text-xs font-medium capitalize text-foreground-3 transition-colors",
|
|
197
|
-
option === value && "bg-surface-1 text-foreground-1 shadow-sm"
|
|
198
|
-
),
|
|
199
|
-
onClick: () => onChange(option),
|
|
200
|
-
type: "button",
|
|
201
|
-
children: option
|
|
202
|
-
},
|
|
203
|
-
option
|
|
204
|
-
))
|
|
205
|
-
}
|
|
206
|
-
)
|
|
207
|
-
] });
|
|
208
|
-
}
|
|
209
|
-
function ControlSection({
|
|
210
|
-
children,
|
|
211
|
-
title
|
|
212
|
-
}) {
|
|
213
|
-
return /* @__PURE__ */ jsxs("section", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
|
|
214
|
-
/* @__PURE__ */ jsx("h3", { className: "text-xs font-semibold uppercase text-foreground-3", children: title }),
|
|
215
|
-
children
|
|
216
|
-
] });
|
|
217
|
-
}
|
|
218
|
-
function PreviewBlock({
|
|
219
|
-
children,
|
|
220
|
-
title
|
|
221
|
-
}) {
|
|
222
|
-
return /* @__PURE__ */ jsxs("section", { className: "min-h-64 border-b border-r border-stroke-3 bg-surface-1", children: [
|
|
223
|
-
/* @__PURE__ */ jsx("div", { className: "px-5 pt-5 text-sm font-medium text-foreground-3", children: title }),
|
|
224
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-h-52 items-center justify-center px-8 py-8", children })
|
|
225
|
-
] });
|
|
226
|
-
}
|
|
227
|
-
function PlaygroundLink({
|
|
228
|
-
children,
|
|
229
|
-
disabled,
|
|
230
|
-
leftIcon,
|
|
231
|
-
rightIcon,
|
|
232
|
-
settings,
|
|
233
|
-
tone,
|
|
234
|
-
variant
|
|
235
|
-
}) {
|
|
236
|
-
return /* @__PURE__ */ jsx(
|
|
237
|
-
Link,
|
|
238
|
-
{
|
|
239
|
-
color: tone,
|
|
240
|
-
disabled,
|
|
241
|
-
href: "#",
|
|
242
|
-
leftIcon,
|
|
243
|
-
rightIcon,
|
|
244
|
-
style: linkStyle({ settings, tone, variant }),
|
|
245
|
-
variant,
|
|
246
|
-
children
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
function LinkSet({ settings }) {
|
|
251
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid justify-items-center gap-6 text-[1.65rem] leading-none", children: [
|
|
252
|
-
/* @__PURE__ */ jsx(
|
|
253
|
-
PlaygroundLink,
|
|
254
|
-
{
|
|
255
|
-
settings,
|
|
256
|
-
tone: "default",
|
|
257
|
-
variant: "link.standalone",
|
|
258
|
-
children: "Default standalone"
|
|
259
|
-
}
|
|
260
|
-
),
|
|
261
|
-
/* @__PURE__ */ jsx(PlaygroundLink, { settings, tone: "accent", variant: "link.inline", children: "Accent inline" }),
|
|
262
|
-
/* @__PURE__ */ jsx(
|
|
263
|
-
PlaygroundLink,
|
|
264
|
-
{
|
|
265
|
-
leftIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2190" }),
|
|
266
|
-
settings,
|
|
267
|
-
tone: "default",
|
|
268
|
-
variant: "link.standalone",
|
|
269
|
-
children: "Back to overview"
|
|
270
|
-
}
|
|
271
|
-
),
|
|
272
|
-
/* @__PURE__ */ jsx(
|
|
273
|
-
PlaygroundLink,
|
|
274
|
-
{
|
|
275
|
-
rightIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2197" }),
|
|
276
|
-
settings,
|
|
277
|
-
tone: "accent",
|
|
278
|
-
variant: "link.standalone",
|
|
279
|
-
children: "External resource"
|
|
280
|
-
}
|
|
281
|
-
),
|
|
282
|
-
/* @__PURE__ */ jsx(
|
|
283
|
-
PlaygroundLink,
|
|
284
|
-
{
|
|
285
|
-
disabled: !0,
|
|
286
|
-
settings,
|
|
287
|
-
tone: "accent",
|
|
288
|
-
variant: "link.standalone",
|
|
289
|
-
children: "Disabled link"
|
|
290
|
-
}
|
|
291
|
-
),
|
|
292
|
-
/* @__PURE__ */ jsx(Link, { href: "#", size: "lg", variant: "button.solid", children: "Link as button" })
|
|
293
|
-
] });
|
|
294
|
-
}
|
|
295
|
-
function SizeScale({ settings }) {
|
|
296
|
-
return /* @__PURE__ */ jsx("div", { className: "grid justify-items-start gap-3", children: ["xs", "sm", "md", "lg", "xl"].map((size) => /* @__PURE__ */ jsxs(
|
|
297
|
-
Link,
|
|
298
|
-
{
|
|
299
|
-
color: "accent",
|
|
300
|
-
href: "#",
|
|
301
|
-
size,
|
|
302
|
-
style: linkStyle({
|
|
303
|
-
settings,
|
|
304
|
-
tone: "accent",
|
|
305
|
-
variant: "link.standalone"
|
|
306
|
-
}),
|
|
307
|
-
variant: "link.standalone",
|
|
308
|
-
children: [
|
|
309
|
-
size.toUpperCase(),
|
|
310
|
-
" accent standalone"
|
|
311
|
-
]
|
|
312
|
-
},
|
|
313
|
-
size
|
|
314
|
-
)) });
|
|
315
|
-
}
|
|
316
|
-
function MdxSample({ settings }) {
|
|
317
|
-
let inlineStyle = linkStyle({
|
|
318
|
-
settings,
|
|
319
|
-
tone: "accent",
|
|
320
|
-
variant: "link.inline"
|
|
321
|
-
});
|
|
322
|
-
return /* @__PURE__ */ jsxs("div", { className: "max-w-xl text-base leading-8 text-foreground-2", children: [
|
|
323
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
324
|
-
"MDX prose with an",
|
|
325
|
-
" ",
|
|
326
|
-
/* @__PURE__ */ jsx(
|
|
327
|
-
Link,
|
|
328
|
-
{
|
|
329
|
-
color: "accent",
|
|
330
|
-
href: "/ds",
|
|
331
|
-
style: inlineStyle,
|
|
332
|
-
variant: "link.inline",
|
|
333
|
-
children: "internal relative link"
|
|
334
|
-
}
|
|
335
|
-
),
|
|
336
|
-
", an",
|
|
337
|
-
" ",
|
|
338
|
-
/* @__PURE__ */ jsx(
|
|
339
|
-
Link,
|
|
340
|
-
{
|
|
341
|
-
color: "accent",
|
|
342
|
-
href: "https://example.com",
|
|
343
|
-
style: inlineStyle,
|
|
344
|
-
variant: "link.inline",
|
|
345
|
-
children: "external link"
|
|
346
|
-
}
|
|
347
|
-
),
|
|
348
|
-
", a",
|
|
349
|
-
" ",
|
|
350
|
-
/* @__PURE__ */ jsx(Link, { color: "accent", href: "#", style: inlineStyle, variant: "link.inline", children: /* @__PURE__ */ jsx("strong", { children: "bold link" }) }),
|
|
351
|
-
", an",
|
|
352
|
-
" ",
|
|
353
|
-
/* @__PURE__ */ jsx(Link, { color: "accent", href: "#", style: inlineStyle, variant: "link.inline", children: /* @__PURE__ */ jsx("em", { children: "italic link" }) }),
|
|
354
|
-
", and",
|
|
355
|
-
" ",
|
|
356
|
-
/* @__PURE__ */ jsx(Link, { color: "accent", href: "#", style: inlineStyle, variant: "link.inline", children: /* @__PURE__ */ jsx(InlineCode, { children: "linked code" }) }),
|
|
357
|
-
"."
|
|
358
|
-
] }),
|
|
359
|
-
/* @__PURE__ */ jsx("h2", { className: "mt-7 text-2xl font-semibold leading-9 text-foreground-1", children: /* @__PURE__ */ jsx(
|
|
360
|
-
Link,
|
|
361
|
-
{
|
|
362
|
-
color: "accent",
|
|
363
|
-
href: "#",
|
|
364
|
-
style: linkStyle({
|
|
365
|
-
settings,
|
|
366
|
-
tone: "accent",
|
|
367
|
-
variant: "link.standalone"
|
|
368
|
-
}),
|
|
369
|
-
variant: "link.standalone",
|
|
370
|
-
children: "Linked heading"
|
|
371
|
-
}
|
|
372
|
-
) })
|
|
373
|
-
] });
|
|
374
|
-
}
|
|
375
|
-
function BlockSamples({ settings }) {
|
|
376
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid w-full max-w-2xl gap-5", children: [
|
|
377
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-y border-stroke-3 bg-surface-2 px-5 py-4", children: [
|
|
378
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground-1", children: "publishOS / Docs" }),
|
|
379
|
-
/* @__PURE__ */ jsxs("nav", { className: "flex gap-4", children: [
|
|
380
|
-
/* @__PURE__ */ jsx(
|
|
381
|
-
PlaygroundLink,
|
|
382
|
-
{
|
|
383
|
-
settings,
|
|
384
|
-
tone: "accent",
|
|
385
|
-
variant: "link.standalone",
|
|
386
|
-
children: "Docs"
|
|
387
|
-
}
|
|
388
|
-
),
|
|
389
|
-
/* @__PURE__ */ jsx(
|
|
390
|
-
PlaygroundLink,
|
|
391
|
-
{
|
|
392
|
-
settings,
|
|
393
|
-
tone: "default",
|
|
394
|
-
variant: "link.standalone",
|
|
395
|
-
children: "Blog"
|
|
396
|
-
}
|
|
397
|
-
)
|
|
398
|
-
] })
|
|
399
|
-
] }),
|
|
400
|
-
/* @__PURE__ */ jsxs("div", { className: "rounded-card border border-stroke-2 bg-surface-1 p-5", children: [
|
|
401
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase text-foreground-3", children: "Start" }),
|
|
402
|
-
/* @__PURE__ */ jsxs("ol", { className: "mt-3 list-decimal space-y-2 pl-6 text-lg leading-8 text-foreground-2", children: [
|
|
403
|
-
/* @__PURE__ */ jsxs("li", { children: [
|
|
404
|
-
"Connect a",
|
|
405
|
-
" ",
|
|
406
|
-
/* @__PURE__ */ jsx(
|
|
407
|
-
PlaygroundLink,
|
|
408
|
-
{
|
|
409
|
-
settings,
|
|
410
|
-
tone: "accent",
|
|
411
|
-
variant: "link.inline",
|
|
412
|
-
children: "custom domain"
|
|
413
|
-
}
|
|
414
|
-
)
|
|
415
|
-
] }),
|
|
416
|
-
/* @__PURE__ */ jsxs("li", { children: [
|
|
417
|
-
"Review the",
|
|
418
|
-
" ",
|
|
419
|
-
/* @__PURE__ */ jsx(
|
|
420
|
-
PlaygroundLink,
|
|
421
|
-
{
|
|
422
|
-
settings,
|
|
423
|
-
tone: "default",
|
|
424
|
-
variant: "link.inline",
|
|
425
|
-
children: "deployment checklist"
|
|
426
|
-
}
|
|
427
|
-
)
|
|
428
|
-
] })
|
|
429
|
-
] })
|
|
430
|
-
] })
|
|
431
|
-
] });
|
|
432
|
-
}
|
|
433
|
-
function LinkPlayground() {
|
|
434
|
-
let [settings, setSettings] = useState(defaultSettings), [tone, setTone] = useState("accent"), [variant, setVariant] = useState("link.standalone"), [copyState, setCopyState] = useState("idle"), output = useMemo(() => buildOutput(settings), [settings]), previewStyle = linkStyle({ settings, tone, variant }), updateNumber = (key, value) => {
|
|
435
|
-
setSettings((current) => ({ ...current, [key]: value }));
|
|
436
|
-
}, updateText = (key, value) => {
|
|
437
|
-
setSettings((current) => ({ ...current, [key]: value }));
|
|
438
|
-
}, reset = () => setSettings(defaultSettings), copyOutput = async () => {
|
|
439
|
-
await navigator.clipboard.writeText(output), setCopyState("copied"), window.setTimeout(() => setCopyState("idle"), 1200);
|
|
440
|
-
};
|
|
441
|
-
return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-surface-page text-foreground-1", children: /* @__PURE__ */ jsxs("div", { className: "grid min-h-screen lg:grid-cols-[1fr_24rem]", children: [
|
|
442
|
-
/* @__PURE__ */ jsx("main", { className: "min-h-screen overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3", children: [
|
|
443
|
-
/* @__PURE__ */ jsx(PreviewBlock, { title: "Link", children: /* @__PURE__ */ jsx(LinkSet, { settings }) }),
|
|
444
|
-
/* @__PURE__ */ jsx(PreviewBlock, { title: "Focused sample", children: /* @__PURE__ */ jsxs("div", { className: "grid justify-items-center gap-5 text-[2rem] leading-none", children: [
|
|
445
|
-
/* @__PURE__ */ jsxs(
|
|
446
|
-
Link,
|
|
447
|
-
{
|
|
448
|
-
color: tone,
|
|
449
|
-
href: "#",
|
|
450
|
-
style: previewStyle,
|
|
451
|
-
variant,
|
|
452
|
-
children: [
|
|
453
|
-
tone,
|
|
454
|
-
" ",
|
|
455
|
-
variant
|
|
456
|
-
]
|
|
457
|
-
}
|
|
458
|
-
),
|
|
459
|
-
/* @__PURE__ */ jsx("div", { className: "font-mono text-xs text-foreground-3", children: "Hover and press directly" })
|
|
460
|
-
] }) }),
|
|
461
|
-
/* @__PURE__ */ jsx(PreviewBlock, { title: "Size scale", children: /* @__PURE__ */ jsx(SizeScale, { settings }) }),
|
|
462
|
-
/* @__PURE__ */ jsx(PreviewBlock, { title: "MDX", children: /* @__PURE__ */ jsx(MdxSample, { settings }) }),
|
|
463
|
-
/* @__PURE__ */ jsx(PreviewBlock, { title: "Blocks", children: /* @__PURE__ */ jsx(BlockSamples, { settings }) })
|
|
464
|
-
] }) }),
|
|
465
|
-
/* @__PURE__ */ jsxs("aside", { className: "flex max-h-screen min-h-screen flex-col border-l border-stroke-3 bg-surface-1", children: [
|
|
466
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-stroke-3 px-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
467
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
468
|
-
/* @__PURE__ */ jsx("h1", { className: "text-sm font-semibold text-foreground-1", children: "Link Playground" }),
|
|
469
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-5 text-foreground-3", children: "Tune states, decoration, OKLCH, copy." })
|
|
470
|
-
] }),
|
|
471
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
472
|
-
/* @__PURE__ */ jsx(Button, { onClick: reset, size: "xs", variant: "outline", children: "Reset" }),
|
|
473
|
-
/* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "soft", children: copyState === "copied" ? "Copied" : "Copy" })
|
|
474
|
-
] })
|
|
475
|
-
] }) }),
|
|
476
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
|
|
477
|
-
/* @__PURE__ */ jsx(
|
|
478
|
-
SegmentedControl,
|
|
479
|
-
{
|
|
480
|
-
label: "Tone",
|
|
481
|
-
onChange: setTone,
|
|
482
|
-
options: toneOrder,
|
|
483
|
-
value: tone
|
|
484
|
-
}
|
|
485
|
-
),
|
|
486
|
-
/* @__PURE__ */ jsx(
|
|
487
|
-
SegmentedControl,
|
|
488
|
-
{
|
|
489
|
-
label: "Variant",
|
|
490
|
-
onChange: setVariant,
|
|
491
|
-
options: variantOrder,
|
|
492
|
-
value: variant
|
|
493
|
-
}
|
|
494
|
-
)
|
|
495
|
-
] }),
|
|
496
|
-
/* @__PURE__ */ jsxs(Tabs, { className: "flex min-h-0 flex-1 flex-col", defaultValue: "color", children: [
|
|
497
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-stroke-3 px-4 py-3", children: /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4", children: [
|
|
498
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "color", children: "Color" }),
|
|
499
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "line", children: "Line" }),
|
|
500
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "motion", children: "Motion" }),
|
|
501
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "output", children: "Output" })
|
|
502
|
-
] }) }),
|
|
503
|
-
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
504
|
-
/* @__PURE__ */ jsxs(TabsPanel, { value: "color", children: [
|
|
505
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Text colors", children: [
|
|
506
|
-
/* @__PURE__ */ jsx(
|
|
507
|
-
TextControl,
|
|
508
|
-
{
|
|
509
|
-
label: "Default color",
|
|
510
|
-
onChange: (value) => updateText("defaultColor", value),
|
|
511
|
-
value: settings.defaultColor
|
|
512
|
-
}
|
|
513
|
-
),
|
|
514
|
-
/* @__PURE__ */ jsx(
|
|
515
|
-
TextControl,
|
|
516
|
-
{
|
|
517
|
-
label: "Accent color",
|
|
518
|
-
onChange: (value) => updateText("accentColor", value),
|
|
519
|
-
value: settings.accentColor
|
|
520
|
-
}
|
|
521
|
-
)
|
|
522
|
-
] }),
|
|
523
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Underline colors", children: [
|
|
524
|
-
/* @__PURE__ */ jsx(
|
|
525
|
-
TextControl,
|
|
526
|
-
{
|
|
527
|
-
label: "Base underline",
|
|
528
|
-
onChange: (value) => updateText("underlineColor", value),
|
|
529
|
-
value: settings.underlineColor
|
|
530
|
-
}
|
|
531
|
-
),
|
|
532
|
-
/* @__PURE__ */ jsx(
|
|
533
|
-
TextControl,
|
|
534
|
-
{
|
|
535
|
-
label: "Hover underline",
|
|
536
|
-
onChange: (value) => updateText("hoverUnderlineColor", value),
|
|
537
|
-
value: settings.hoverUnderlineColor
|
|
538
|
-
}
|
|
539
|
-
),
|
|
540
|
-
/* @__PURE__ */ jsx(
|
|
541
|
-
TextControl,
|
|
542
|
-
{
|
|
543
|
-
label: "Active underline",
|
|
544
|
-
onChange: (value) => updateText("activeUnderlineColor", value),
|
|
545
|
-
value: settings.activeUnderlineColor
|
|
546
|
-
}
|
|
547
|
-
)
|
|
548
|
-
] }),
|
|
549
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "OKLCH adjustments", children: [
|
|
550
|
-
/* @__PURE__ */ jsx(
|
|
551
|
-
NumberControl,
|
|
552
|
-
{
|
|
553
|
-
label: "Lightness",
|
|
554
|
-
max: 20,
|
|
555
|
-
min: -20,
|
|
556
|
-
onChange: (value) => updateNumber("lightnessDelta", value),
|
|
557
|
-
unit: "%",
|
|
558
|
-
value: settings.lightnessDelta
|
|
559
|
-
}
|
|
560
|
-
),
|
|
561
|
-
/* @__PURE__ */ jsx(
|
|
562
|
-
NumberControl,
|
|
563
|
-
{
|
|
564
|
-
label: "Chroma scale",
|
|
565
|
-
max: 2,
|
|
566
|
-
min: 0,
|
|
567
|
-
onChange: (value) => updateNumber("chromaScale", value),
|
|
568
|
-
step: 0.05,
|
|
569
|
-
value: settings.chromaScale
|
|
570
|
-
}
|
|
571
|
-
),
|
|
572
|
-
/* @__PURE__ */ jsx(
|
|
573
|
-
NumberControl,
|
|
574
|
-
{
|
|
575
|
-
label: "Hue shift",
|
|
576
|
-
max: 180,
|
|
577
|
-
min: -180,
|
|
578
|
-
onChange: (value) => updateNumber("hueShift", value),
|
|
579
|
-
unit: "deg",
|
|
580
|
-
value: settings.hueShift
|
|
581
|
-
}
|
|
582
|
-
)
|
|
583
|
-
] })
|
|
584
|
-
] }),
|
|
585
|
-
/* @__PURE__ */ jsxs(TabsPanel, { value: "line", children: [
|
|
586
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Text opacity", children: [
|
|
587
|
-
/* @__PURE__ */ jsx(
|
|
588
|
-
NumberControl,
|
|
589
|
-
{
|
|
590
|
-
label: "Inline idle",
|
|
591
|
-
max: 100,
|
|
592
|
-
min: 0,
|
|
593
|
-
onChange: (value) => updateNumber("textOpacity", value),
|
|
594
|
-
unit: "%",
|
|
595
|
-
value: settings.textOpacity
|
|
596
|
-
}
|
|
597
|
-
),
|
|
598
|
-
/* @__PURE__ */ jsx(
|
|
599
|
-
NumberControl,
|
|
600
|
-
{
|
|
601
|
-
label: "Standalone idle",
|
|
602
|
-
max: 100,
|
|
603
|
-
min: 0,
|
|
604
|
-
onChange: (value) => updateNumber("standaloneTextOpacity", value),
|
|
605
|
-
unit: "%",
|
|
606
|
-
value: settings.standaloneTextOpacity
|
|
607
|
-
}
|
|
608
|
-
),
|
|
609
|
-
/* @__PURE__ */ jsx(
|
|
610
|
-
NumberControl,
|
|
611
|
-
{
|
|
612
|
-
label: "Inline hover",
|
|
613
|
-
max: 100,
|
|
614
|
-
min: 0,
|
|
615
|
-
onChange: (value) => updateNumber("hoverTextOpacity", value),
|
|
616
|
-
unit: "%",
|
|
617
|
-
value: settings.hoverTextOpacity
|
|
618
|
-
}
|
|
619
|
-
),
|
|
620
|
-
/* @__PURE__ */ jsx(
|
|
621
|
-
NumberControl,
|
|
622
|
-
{
|
|
623
|
-
label: "Active",
|
|
624
|
-
max: 100,
|
|
625
|
-
min: 0,
|
|
626
|
-
onChange: (value) => updateNumber("activeTextOpacity", value),
|
|
627
|
-
unit: "%",
|
|
628
|
-
value: settings.activeTextOpacity
|
|
629
|
-
}
|
|
630
|
-
)
|
|
631
|
-
] }),
|
|
632
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Underline opacity", children: [
|
|
633
|
-
/* @__PURE__ */ jsx(
|
|
634
|
-
NumberControl,
|
|
635
|
-
{
|
|
636
|
-
label: "Inline idle",
|
|
637
|
-
max: 100,
|
|
638
|
-
min: 0,
|
|
639
|
-
onChange: (value) => updateNumber("underlineOpacity", value),
|
|
640
|
-
unit: "%",
|
|
641
|
-
value: settings.underlineOpacity
|
|
642
|
-
}
|
|
643
|
-
),
|
|
644
|
-
/* @__PURE__ */ jsx(
|
|
645
|
-
NumberControl,
|
|
646
|
-
{
|
|
647
|
-
label: "Inline hover",
|
|
648
|
-
max: 100,
|
|
649
|
-
min: 0,
|
|
650
|
-
onChange: (value) => updateNumber("hoverUnderlineOpacity", value),
|
|
651
|
-
unit: "%",
|
|
652
|
-
value: settings.hoverUnderlineOpacity
|
|
653
|
-
}
|
|
654
|
-
),
|
|
655
|
-
/* @__PURE__ */ jsx(
|
|
656
|
-
NumberControl,
|
|
657
|
-
{
|
|
658
|
-
label: "Standalone hover",
|
|
659
|
-
max: 100,
|
|
660
|
-
min: 0,
|
|
661
|
-
onChange: (value) => updateNumber("standaloneHoverUnderlineOpacity", value),
|
|
662
|
-
unit: "%",
|
|
663
|
-
value: settings.standaloneHoverUnderlineOpacity
|
|
664
|
-
}
|
|
665
|
-
),
|
|
666
|
-
/* @__PURE__ */ jsx(
|
|
667
|
-
NumberControl,
|
|
668
|
-
{
|
|
669
|
-
label: "Active",
|
|
670
|
-
max: 100,
|
|
671
|
-
min: 0,
|
|
672
|
-
onChange: (value) => updateNumber("activeUnderlineOpacity", value),
|
|
673
|
-
unit: "%",
|
|
674
|
-
value: settings.activeUnderlineOpacity
|
|
675
|
-
}
|
|
676
|
-
)
|
|
677
|
-
] }),
|
|
678
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Decoration", children: [
|
|
679
|
-
/* @__PURE__ */ jsx(
|
|
680
|
-
NumberControl,
|
|
681
|
-
{
|
|
682
|
-
label: "Thickness",
|
|
683
|
-
max: 4,
|
|
684
|
-
min: 0.5,
|
|
685
|
-
onChange: (value) => updateNumber("underlineThickness", value),
|
|
686
|
-
step: 0.25,
|
|
687
|
-
unit: "px",
|
|
688
|
-
value: settings.underlineThickness
|
|
689
|
-
}
|
|
690
|
-
),
|
|
691
|
-
/* @__PURE__ */ jsx(
|
|
692
|
-
NumberControl,
|
|
693
|
-
{
|
|
694
|
-
label: "Offset",
|
|
695
|
-
max: 0.7,
|
|
696
|
-
min: -0.7,
|
|
697
|
-
onChange: (value) => updateNumber("underlineOffset", value),
|
|
698
|
-
step: 0.01,
|
|
699
|
-
unit: "em",
|
|
700
|
-
value: settings.underlineOffset
|
|
701
|
-
}
|
|
702
|
-
)
|
|
703
|
-
] })
|
|
704
|
-
] }),
|
|
705
|
-
/* @__PURE__ */ jsx(TabsPanel, { value: "motion", children: /* @__PURE__ */ jsxs(ControlSection, { title: "Transition", children: [
|
|
706
|
-
/* @__PURE__ */ jsx(
|
|
707
|
-
NumberControl,
|
|
708
|
-
{
|
|
709
|
-
label: "Duration",
|
|
710
|
-
max: 500,
|
|
711
|
-
min: 0,
|
|
712
|
-
onChange: (value) => updateNumber("transitionDuration", value),
|
|
713
|
-
unit: "ms",
|
|
714
|
-
value: settings.transitionDuration
|
|
715
|
-
}
|
|
716
|
-
),
|
|
717
|
-
/* @__PURE__ */ jsx(
|
|
718
|
-
TextControl,
|
|
719
|
-
{
|
|
720
|
-
label: "Ease",
|
|
721
|
-
onChange: (value) => updateText("transitionEase", value),
|
|
722
|
-
value: settings.transitionEase
|
|
723
|
-
}
|
|
724
|
-
)
|
|
725
|
-
] }) }),
|
|
726
|
-
/* @__PURE__ */ jsx(TabsPanel, { className: "h-full", value: "output", children: /* @__PURE__ */ jsxs("div", { className: "grid h-full grid-rows-[1fr_auto] gap-3 p-4", children: [
|
|
727
|
-
/* @__PURE__ */ jsx(
|
|
728
|
-
"textarea",
|
|
729
|
-
{
|
|
730
|
-
className: "min-h-104 resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
|
|
731
|
-
readOnly: !0,
|
|
732
|
-
value: output
|
|
733
|
-
}
|
|
734
|
-
),
|
|
735
|
-
/* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "soft", children: copyState === "copied" ? "Copied output" : "Copy output" })
|
|
736
|
-
] }) })
|
|
737
|
-
] })
|
|
738
|
-
] })
|
|
739
|
-
] })
|
|
740
|
-
] }) });
|
|
741
|
-
}
|
|
742
|
-
export {
|
|
743
|
-
LinkPlayground
|
|
744
|
-
};
|