@publish.os/nextjs 0.0.1-alpha.81 → 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/app/globals.css +1 -0
- package/compiler-assets/nextjs/defaults/group/index.tsx +50 -0
- package/compiler-assets/nextjs/defaults/group/layout.tsx +8 -8
- package/compiler-assets/nextjs/defaults/group/page.tsx +44 -43
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +33 -13
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -3
- package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
- package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
- package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
- package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
- package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
- package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
- package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
- package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
- package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
- package/compiler-assets/nextjs/shims/document.tsx +38 -0
- package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +18 -2
- package/compiler-assets/nextjs/shims/global-layout.tsx +19 -85
- 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 +143 -65
- package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
- package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
- package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +30 -0
- package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
- package/compiler-assets/nextjs/shims/site-mdx-components.tsx +112 -0
- package/compiler-assets/nextjs/shims/site-mdx.tsx +17 -0
- package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
- package/dist/build-operation-5QMLXF7N.js +89 -0
- package/dist/{button-CFdx-ohV.d.ts → button-BdCScEKi.d.ts} +6 -6
- package/dist/capture-local-source-WGGDIUU2.js +258 -0
- package/dist/chunk-22RSSUNV.js +13 -0
- package/dist/chunk-4BC2L2KA.js +620 -0
- package/dist/chunk-5J3YUNRY.js +121 -0
- package/dist/chunk-5KAD7W53.js +248 -0
- package/dist/chunk-6C65KV7O.js +142 -0
- package/dist/chunk-6D2E6UMD.js +695 -0
- package/dist/chunk-7NY22B5U.js +161 -0
- package/dist/chunk-AI2UULNX.js +9 -0
- package/dist/chunk-EFO6AWXN.js +19 -0
- package/dist/chunk-F3AGNDF4.js +2377 -0
- package/dist/chunk-GBPLER5H.js +426 -0
- package/dist/chunk-IL4RJOKI.js +186 -0
- package/dist/chunk-NNBJZPFM.js +193 -0
- package/dist/chunk-ORIUWJBQ.js +58 -0
- package/dist/chunk-OXOFRXEI.js +7129 -0
- package/dist/chunk-UYGCOWRF.js +1709 -0
- package/dist/chunk-WL75GQ5M.js +80 -0
- package/dist/compiler.d.ts +54 -7
- package/dist/compiler.js +121 -13147
- 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 +27 -0
- package/dist/dev-operation-OSHHWRWK.js +1095 -0
- package/dist/framework-selection-ZVO323PK.js +11 -0
- package/dist/ide-support-CU6Z5PVR.js +16 -0
- package/dist/index.d.ts +55 -4
- 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 +401 -150
- 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 +3 -3
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.js +22 -7
- package/dist/kernel/components/blocks/navbar.d.ts +2 -2
- package/dist/kernel/components/blocks/navbar.js +406 -65
- package/dist/kernel/components/blocks/navigation-progress.js +6 -3
- package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
- package/dist/kernel/components/blocks/next-prev.js +12 -24
- package/dist/kernel/components/blocks/page-list.d.ts +1 -1
- package/dist/kernel/components/blocks/page-list.js +7 -6
- package/dist/kernel/components/blocks/search.d.ts +83 -58
- package/dist/kernel/components/blocks/search.js +554 -428
- package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
- package/dist/kernel/components/blocks/sidebar-node.js +12 -10
- package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
- package/dist/kernel/components/blocks/sidebar.js +24 -14
- package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
- package/dist/kernel/components/blocks/theme-toggle.js +47 -1
- 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 +122 -180
- package/dist/kernel/components/mdx/components/blockquote.js +2 -2
- package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
- package/dist/kernel/components/mdx/components/callout.js +67 -36
- package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
- package/dist/kernel/components/mdx/components/code-block.js +106 -5
- package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
- package/dist/kernel/components/mdx/components/copy-code-button.js +61 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
- package/dist/kernel/components/mdx/components/figure-caption.js +4 -3
- package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
- package/dist/kernel/components/mdx/components/figure.js +24 -14
- package/dist/kernel/components/mdx/components/footnotes.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.js +4 -4
- 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 +2 -2
- package/dist/kernel/components/mdx/components/image.d.ts +1 -1
- package/dist/kernel/components/mdx/components/image.js +94 -68
- package/dist/kernel/components/mdx/components/inline-code.js +2 -2
- package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
- package/dist/kernel/components/mdx/components/kbd.js +5 -4
- package/dist/kernel/components/mdx/components/link.d.ts +35 -4
- package/dist/kernel/components/mdx/components/link.js +3 -3
- package/dist/kernel/components/mdx/components/paragraph.js +2 -5
- 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 +2 -2
- package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
- package/dist/kernel/components/mdx/components/video-player.js +8 -4
- package/dist/kernel/components/mdx/components/video.d.ts +5 -3
- package/dist/kernel/components/mdx/components/video.js +8 -6
- 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 +28 -14
- package/dist/kernel/components/mdx/mdx.js +336 -63
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +6 -4
- 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 +6 -23
- package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
- package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
- package/dist/kernel/components/ui/breadcrumb.js +10 -8
- package/dist/kernel/components/ui/button-group.js +8 -7
- package/dist/kernel/components/ui/button.d.ts +58 -6
- package/dist/kernel/components/ui/button.js +43 -39
- package/dist/kernel/components/ui/card.d.ts +2 -2
- package/dist/kernel/components/ui/card.js +1 -1
- package/dist/kernel/components/ui/dialog.js +1 -1
- package/dist/kernel/components/ui/drawer.d.ts +3 -1
- package/dist/kernel/components/ui/drawer.js +6 -2
- 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.js +10 -17
- package/dist/kernel/components/ui/link.d.ts +11 -3
- package/dist/kernel/components/ui/link.js +12 -11
- package/dist/kernel/components/ui/menu.js +6 -6
- package/dist/kernel/components/ui/mod-key.d.ts +10 -0
- package/dist/kernel/components/ui/mod-key.js +36 -0
- package/dist/kernel/components/ui/navigation-menu.js +3 -3
- package/dist/kernel/components/ui/popover.js +1 -1
- package/dist/kernel/components/ui/progress.js +2 -2
- package/dist/kernel/components/ui/scroll-area.js +5 -5
- package/dist/kernel/components/ui/select.js +8 -11
- 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 +2 -2
- 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 +11 -24
- package/dist/kernel/defaults.registry.js +11 -26
- package/dist/kernel/routes/agent/markdown.d.ts +3 -1
- 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 +111 -81
- package/dist/kernel/routes/metadata/llms.d.ts +12 -3
- package/dist/kernel/routes/metadata/llms.js +156 -59
- 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/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.d.ts +26 -4
- package/dist/kernel/routes/metadata/sitemap.js +206 -38
- 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 +21 -13
- package/dist/kernel/routes/pages/leaf.d.ts +28 -1
- package/dist/kernel/routes/pages/leaf.js +25 -16
- package/dist/kernel/routes/pages/root.js +19 -13
- package/dist/keyboard-shortcuts.js +1 -1
- package/dist/resolvers/manifest-resolver.js +29 -6
- package/dist/search.d.ts +6 -7
- package/dist/search.js +52 -29
- package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
- package/dist/theme-scope.js +1 -1
- package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
- package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
- package/dist/{types-CIwwieNw.d.ts → types-J2w_puPF.d.ts} +11 -10
- package/dist/types.d.ts +15 -6
- 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/.gitignore +1 -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 +6 -11
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +6 -7
- package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
- package/init/seed/minimal/publish.os/publish.os.config.json +7 -7
- package/init/seed/minimal/publish.os/theme.css +52 -24
- package/init/seed/minimal/publish.os/tsconfig.json +3 -0
- package/init/seed/minimal/seed.json +12 -2
- package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
- package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
- package/init/seed/scratch/seed.json +5 -0
- package/package.json +55 -44
- package/release/app/phosphor/package.json +5 -5
- package/release/app/phosphor/pnpm-lock.yaml.template +553 -377
- package/release/app/phosphor/pnpm-workspace.yaml +3 -0
- package/release/compiler/package.json +5 -3
- package/release/compiler/pnpm-lock.yaml.template +500 -303
- package/release/compiler/pnpm-workspace.yaml +3 -0
- package/release/release.json +8 -37
- package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
- package/dist/icons.d.ts +0 -1
- package/dist/icons.js +0 -2
- package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
- package/dist/kernel/components/blocks/design-system-preview.js +0 -648
- 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/mdx/components/pre.d.ts +0 -6
- package/dist/kernel/components/mdx/components/pre.js +0 -18
- package/dist/kernel/components/ui/meta-key.d.ts +0 -17
- package/dist/kernel/components/ui/meta-key.js +0 -9
- package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
- package/dist/kernel/components/ui/theme-toggle.js +0 -58
- package/dist/kernel/framework-icons.d.ts +0 -1
- package/dist/kernel/framework-icons.js +0 -39
- package/dist/link-CYaCRDb6.d.ts +0 -35
- package/release/app/lucide/package.json +0 -30
- package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
- package/release/app/lucide/pnpm-workspace.yaml +0 -11
- package/release/app/tabler/package.json +0 -30
- package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
- package/release/app/tabler/pnpm-workspace.yaml +0 -11
|
@@ -1,629 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/modules/design-system/navigation-progress-playground.tsx
|
|
4
|
-
import { Button } from "@publish.os/nextjs/kernel/components/ui/button";
|
|
5
|
-
import {
|
|
6
|
-
Progress,
|
|
7
|
-
ProgressIndicator,
|
|
8
|
-
ProgressTrack
|
|
9
|
-
} from "@publish.os/nextjs/kernel/components/ui/progress";
|
|
10
|
-
import { Tabs, TabsList, TabsPanel, TabsTab } from "@publish.os/nextjs/kernel/components/ui/tabs";
|
|
11
|
-
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
12
|
-
import {
|
|
13
|
-
useCallback,
|
|
14
|
-
useEffect,
|
|
15
|
-
useId,
|
|
16
|
-
useMemo,
|
|
17
|
-
useRef,
|
|
18
|
-
useState
|
|
19
|
-
} from "react";
|
|
20
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
-
var presets = {
|
|
22
|
-
current: {
|
|
23
|
-
description: "Current PublishOS navigation-progress settings.",
|
|
24
|
-
label: "Current",
|
|
25
|
-
settings: {
|
|
26
|
-
initialProgress: 0,
|
|
27
|
-
targetProgress: 98,
|
|
28
|
-
fastPhaseEnd: 38,
|
|
29
|
-
minDuration: 48,
|
|
30
|
-
maxDuration: 1800,
|
|
31
|
-
exitDuration: 188,
|
|
32
|
-
timeout: 8e3,
|
|
33
|
-
sampleMinDuration: 700,
|
|
34
|
-
sampleMaxDuration: 1800,
|
|
35
|
-
settleDelay: 100,
|
|
36
|
-
transitionDuration: 320,
|
|
37
|
-
curvePower: 3,
|
|
38
|
-
height: 2,
|
|
39
|
-
fill: "var(--progress-indicator-surface)",
|
|
40
|
-
track: "var(--progress-track-surface)",
|
|
41
|
-
progressEase: "cubic-bezier(0.21, 0.65, 0.35, 1)",
|
|
42
|
-
exitEase: "cubic-bezier(0.55, 0.06, 0.68, 0.19)",
|
|
43
|
-
transformOrigin: "left",
|
|
44
|
-
exitTransformOrigin: "right"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
aave: {
|
|
48
|
-
description: "Aave docs inspired: thin, calm, left-origin purple bar.",
|
|
49
|
-
label: "Aave",
|
|
50
|
-
settings: {
|
|
51
|
-
initialProgress: 0,
|
|
52
|
-
targetProgress: 92,
|
|
53
|
-
fastPhaseEnd: 38,
|
|
54
|
-
minDuration: 140,
|
|
55
|
-
maxDuration: 1800,
|
|
56
|
-
exitDuration: 260,
|
|
57
|
-
timeout: 7e3,
|
|
58
|
-
sampleMinDuration: 750,
|
|
59
|
-
sampleMaxDuration: 1900,
|
|
60
|
-
settleDelay: 80,
|
|
61
|
-
transitionDuration: 320,
|
|
62
|
-
curvePower: 2.2,
|
|
63
|
-
height: 2,
|
|
64
|
-
fill: "color(display-p3 0.5960784314 0.5882352941 1 / 1)",
|
|
65
|
-
track: "transparent",
|
|
66
|
-
progressEase: "cubic-bezier(0.21, 0.65, 0.35, 1)",
|
|
67
|
-
exitEase: "cubic-bezier(0.55, 0.06, 0.68, 0.19)",
|
|
68
|
-
transformOrigin: "left",
|
|
69
|
-
exitTransformOrigin: "right"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
tuned: {
|
|
73
|
-
description: "A snappier PublishOS candidate with a shorter long tail.",
|
|
74
|
-
label: "Tuned",
|
|
75
|
-
settings: {
|
|
76
|
-
initialProgress: 8,
|
|
77
|
-
targetProgress: 94,
|
|
78
|
-
fastPhaseEnd: 34,
|
|
79
|
-
minDuration: 90,
|
|
80
|
-
maxDuration: 4200,
|
|
81
|
-
exitDuration: 180,
|
|
82
|
-
timeout: 8e3,
|
|
83
|
-
sampleMinDuration: 550,
|
|
84
|
-
sampleMaxDuration: 1600,
|
|
85
|
-
settleDelay: 70,
|
|
86
|
-
transitionDuration: 180,
|
|
87
|
-
curvePower: 2.6,
|
|
88
|
-
height: 2,
|
|
89
|
-
fill: "var(--progress-indicator-surface)",
|
|
90
|
-
track: "var(--progress-track-surface)",
|
|
91
|
-
progressEase: "cubic-bezier(0.12, 0.72, 0, 1)",
|
|
92
|
-
exitEase: "cubic-bezier(0.2, 0, 0, 1)",
|
|
93
|
-
transformOrigin: "left",
|
|
94
|
-
exitTransformOrigin: "right"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}, presetOrder = ["current", "aave", "tuned"];
|
|
98
|
-
function clamp({
|
|
99
|
-
max,
|
|
100
|
-
min,
|
|
101
|
-
value
|
|
102
|
-
}) {
|
|
103
|
-
return Math.min(max, Math.max(min, value));
|
|
104
|
-
}
|
|
105
|
-
function buildOutput(settings) {
|
|
106
|
-
return `export const navigationProgressConfig = {
|
|
107
|
-
initialProgress: ${settings.initialProgress},
|
|
108
|
-
targetProgress: ${settings.targetProgress},
|
|
109
|
-
fastPhaseEnd: ${settings.fastPhaseEnd},
|
|
110
|
-
minDuration: ${settings.minDuration},
|
|
111
|
-
maxDuration: ${settings.maxDuration},
|
|
112
|
-
exitDuration: ${settings.exitDuration},
|
|
113
|
-
timeout: ${settings.timeout},
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const sampleDuration =
|
|
117
|
-
${settings.sampleMinDuration} +
|
|
118
|
-
Math.random() * (${settings.sampleMaxDuration} - ${settings.sampleMinDuration});
|
|
119
|
-
|
|
120
|
-
/* animation.css */
|
|
121
|
-
:root {
|
|
122
|
-
--animation-ease-progress: ${settings.progressEase};
|
|
123
|
-
--animation-ease-progress-exit: ${settings.exitEase};
|
|
124
|
-
--progress-height: ${settings.height}px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/* NavigationProgress indicator */
|
|
128
|
-
style={{
|
|
129
|
-
transformOrigin: isExiting ? "${settings.exitTransformOrigin}" : "${settings.transformOrigin}",
|
|
130
|
-
transition: isExiting
|
|
131
|
-
? "transform ${settings.exitDuration}ms var(--animation-ease-progress-exit)"
|
|
132
|
-
: "transform ${settings.transitionDuration}ms var(--animation-ease-progress)",
|
|
133
|
-
}}
|
|
134
|
-
|
|
135
|
-
/* Theme tokens */
|
|
136
|
-
--progress-indicator-surface: ${settings.fill};
|
|
137
|
-
--progress-track-surface: ${settings.track};`;
|
|
138
|
-
}
|
|
139
|
-
function randomDuration({ max, min }) {
|
|
140
|
-
let lower = Math.min(min, max), upper = Math.max(min, max);
|
|
141
|
-
return Math.round(lower + Math.random() * (upper - lower));
|
|
142
|
-
}
|
|
143
|
-
function NumberControl({
|
|
144
|
-
label,
|
|
145
|
-
max,
|
|
146
|
-
min,
|
|
147
|
-
onChange,
|
|
148
|
-
step = 1,
|
|
149
|
-
unit,
|
|
150
|
-
value
|
|
151
|
-
}) {
|
|
152
|
-
let id = useId(), handleChange = (event) => {
|
|
153
|
-
onChange(Number(event.target.value));
|
|
154
|
-
};
|
|
155
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
156
|
-
/* @__PURE__ */ jsxs(
|
|
157
|
-
"label",
|
|
158
|
-
{
|
|
159
|
-
className: "flex items-center justify-between gap-3 text-xs font-medium text-foreground-2",
|
|
160
|
-
htmlFor: id,
|
|
161
|
-
children: [
|
|
162
|
-
/* @__PURE__ */ jsx("span", { children: label }),
|
|
163
|
-
/* @__PURE__ */ jsxs("span", { className: "font-mono text-[11px] text-foreground-3", children: [
|
|
164
|
-
value,
|
|
165
|
-
unit
|
|
166
|
-
] })
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1fr_4.75rem] items-center gap-3", children: [
|
|
171
|
-
/* @__PURE__ */ jsx(
|
|
172
|
-
"input",
|
|
173
|
-
{
|
|
174
|
-
className: "h-1 w-full accent-1-foreground-1",
|
|
175
|
-
id,
|
|
176
|
-
max,
|
|
177
|
-
min,
|
|
178
|
-
onChange: handleChange,
|
|
179
|
-
step,
|
|
180
|
-
type: "range",
|
|
181
|
-
value
|
|
182
|
-
}
|
|
183
|
-
),
|
|
184
|
-
/* @__PURE__ */ jsx(
|
|
185
|
-
"input",
|
|
186
|
-
{
|
|
187
|
-
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",
|
|
188
|
-
max,
|
|
189
|
-
min,
|
|
190
|
-
onChange: handleChange,
|
|
191
|
-
step,
|
|
192
|
-
type: "number",
|
|
193
|
-
value
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
] })
|
|
197
|
-
] });
|
|
198
|
-
}
|
|
199
|
-
function TextControl({
|
|
200
|
-
label,
|
|
201
|
-
onChange,
|
|
202
|
-
value
|
|
203
|
-
}) {
|
|
204
|
-
let id = useId();
|
|
205
|
-
return /* @__PURE__ */ jsxs(
|
|
206
|
-
"label",
|
|
207
|
-
{
|
|
208
|
-
className: "grid gap-2 text-xs font-medium text-foreground-2",
|
|
209
|
-
htmlFor: id,
|
|
210
|
-
children: [
|
|
211
|
-
label,
|
|
212
|
-
/* @__PURE__ */ jsx(
|
|
213
|
-
"input",
|
|
214
|
-
{
|
|
215
|
-
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",
|
|
216
|
-
id,
|
|
217
|
-
onChange: (event) => onChange(event.target.value),
|
|
218
|
-
spellCheck: !1,
|
|
219
|
-
value
|
|
220
|
-
}
|
|
221
|
-
)
|
|
222
|
-
]
|
|
223
|
-
}
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
function OriginControl({
|
|
227
|
-
label,
|
|
228
|
-
onChange,
|
|
229
|
-
value
|
|
230
|
-
}) {
|
|
231
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
232
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-foreground-2", children: label }),
|
|
233
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 rounded-button border border-stroke-2 bg-surface-2 p-1", children: ["left", "right"].map((origin) => /* @__PURE__ */ jsx(
|
|
234
|
-
"button",
|
|
235
|
-
{
|
|
236
|
-
className: cn(
|
|
237
|
-
"h-7 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
|
|
238
|
-
origin === value && "bg-surface-1 text-foreground-1 shadow-sm"
|
|
239
|
-
),
|
|
240
|
-
onClick: () => onChange(origin),
|
|
241
|
-
type: "button",
|
|
242
|
-
children: origin
|
|
243
|
-
},
|
|
244
|
-
origin
|
|
245
|
-
)) })
|
|
246
|
-
] });
|
|
247
|
-
}
|
|
248
|
-
function ControlSection({
|
|
249
|
-
children,
|
|
250
|
-
title
|
|
251
|
-
}) {
|
|
252
|
-
return /* @__PURE__ */ jsxs("section", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
|
|
253
|
-
/* @__PURE__ */ jsx("h3", { className: "text-xs font-semibold uppercase text-foreground-3", children: title }),
|
|
254
|
-
children
|
|
255
|
-
] });
|
|
256
|
-
}
|
|
257
|
-
function ProgressPreview({
|
|
258
|
-
isExiting,
|
|
259
|
-
progress,
|
|
260
|
-
settings
|
|
261
|
-
}) {
|
|
262
|
-
let isVisible = progress > 0, boundedProgress = clamp({ max: 100, min: 0, value: progress }), indicatorStyle = {
|
|
263
|
-
background: settings.fill,
|
|
264
|
-
transform: isExiting ? "scaleX(0)" : `scaleX(${boundedProgress / 100})`,
|
|
265
|
-
transformOrigin: isExiting ? settings.exitTransformOrigin : settings.transformOrigin,
|
|
266
|
-
transition: isExiting ? `transform ${settings.exitDuration}ms ${settings.exitEase}` : `transform ${settings.transitionDuration}ms ${settings.progressEase}`
|
|
267
|
-
};
|
|
268
|
-
return /* @__PURE__ */ jsx(
|
|
269
|
-
Progress,
|
|
270
|
-
{
|
|
271
|
-
"aria-label": "Sample page navigation",
|
|
272
|
-
className: cn(
|
|
273
|
-
"pointer-events-none absolute left-0 right-0 top-0 overflow-hidden transition-opacity duration-200",
|
|
274
|
-
isVisible ? "opacity-100" : "opacity-0"
|
|
275
|
-
),
|
|
276
|
-
style: { height: settings.height },
|
|
277
|
-
value: isVisible ? boundedProgress : null,
|
|
278
|
-
children: /* @__PURE__ */ jsx(
|
|
279
|
-
ProgressTrack,
|
|
280
|
-
{
|
|
281
|
-
className: "h-full rounded-none",
|
|
282
|
-
style: { background: settings.track },
|
|
283
|
-
children: /* @__PURE__ */ jsx(
|
|
284
|
-
ProgressIndicator,
|
|
285
|
-
{
|
|
286
|
-
className: "h-full w-full rounded-none transition-none",
|
|
287
|
-
style: indicatorStyle
|
|
288
|
-
}
|
|
289
|
-
)
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
}
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
function NavigationProgressPlayground() {
|
|
296
|
-
let [settings, setSettings] = useState(
|
|
297
|
-
presets.tuned.settings
|
|
298
|
-
), [activePreset, setActivePreset] = useState("tuned"), [progress, setProgress] = useState(0), [isExiting, setIsExiting] = useState(!1), [isRunning, setIsRunning] = useState(!1), [copyState, setCopyState] = useState("idle"), [sampleDuration, setSampleDuration] = useState(null), animationFrame = useRef(null), completionTimer = useRef(null), settleTimer = useRef(null), exitTimer = useRef(null), activeNavigation = useRef(!1), output = useMemo(() => buildOutput(settings), [settings]), clearTimers = useCallback(() => {
|
|
299
|
-
animationFrame.current && cancelAnimationFrame(animationFrame.current), completionTimer.current && clearTimeout(completionTimer.current), settleTimer.current && clearTimeout(settleTimer.current), exitTimer.current && clearTimeout(exitTimer.current), animationFrame.current = null, completionTimer.current = null, settleTimer.current = null, exitTimer.current = null;
|
|
300
|
-
}, []), resetSample = useCallback(() => {
|
|
301
|
-
clearTimers(), activeNavigation.current = !1, setProgress(0), setIsExiting(!1), setIsRunning(!1), setSampleDuration(null);
|
|
302
|
-
}, [clearTimers]), completeSample = useCallback(() => {
|
|
303
|
-
activeNavigation.current && (animationFrame.current && (cancelAnimationFrame(animationFrame.current), animationFrame.current = null), completionTimer.current && (clearTimeout(completionTimer.current), completionTimer.current = null), setProgress(100), settleTimer.current = setTimeout(() => {
|
|
304
|
-
activeNavigation.current && (setIsExiting(!0), exitTimer.current = setTimeout(() => {
|
|
305
|
-
setProgress(0), setIsExiting(!1), setIsRunning(!1), activeNavigation.current = !1, exitTimer.current = null;
|
|
306
|
-
}, settings.exitDuration));
|
|
307
|
-
}, settings.settleDelay));
|
|
308
|
-
}, [settings.exitDuration, settings.settleDelay]), startSample = useCallback(() => {
|
|
309
|
-
resetSample(), activeNavigation.current = !0, setIsRunning(!0), setIsExiting(!1), setProgress(settings.initialProgress);
|
|
310
|
-
let startTime = performance.now(), routeDuration = randomDuration({
|
|
311
|
-
max: settings.sampleMaxDuration,
|
|
312
|
-
min: settings.sampleMinDuration
|
|
313
|
-
});
|
|
314
|
-
setSampleDuration(routeDuration);
|
|
315
|
-
let animate = () => {
|
|
316
|
-
if (!activeNavigation.current) return;
|
|
317
|
-
let elapsed = performance.now() - startTime, progressValue;
|
|
318
|
-
if (elapsed < settings.minDuration)
|
|
319
|
-
progressValue = settings.initialProgress + elapsed / settings.minDuration * (settings.fastPhaseEnd - settings.initialProgress);
|
|
320
|
-
else {
|
|
321
|
-
let remainingProgress = settings.targetProgress - settings.fastPhaseEnd, easedTime = 1 - (1 - clamp({
|
|
322
|
-
max: 1,
|
|
323
|
-
min: 0,
|
|
324
|
-
value: (elapsed - settings.minDuration) / (settings.maxDuration - settings.minDuration)
|
|
325
|
-
})) ** settings.curvePower;
|
|
326
|
-
progressValue = settings.fastPhaseEnd + easedTime * remainingProgress;
|
|
327
|
-
}
|
|
328
|
-
setProgress(
|
|
329
|
-
clamp({ max: settings.targetProgress, min: 0, value: progressValue })
|
|
330
|
-
), animationFrame.current = requestAnimationFrame(animate);
|
|
331
|
-
};
|
|
332
|
-
animationFrame.current = requestAnimationFrame(animate), completionTimer.current = setTimeout(completeSample, routeDuration);
|
|
333
|
-
}, [completeSample, resetSample, settings]);
|
|
334
|
-
useEffect(() => resetSample, [resetSample]);
|
|
335
|
-
let updateNumber = (key, value) => {
|
|
336
|
-
setActivePreset("custom"), setSettings((current) => ({ ...current, [key]: value }));
|
|
337
|
-
}, updateText = (key, value) => {
|
|
338
|
-
setActivePreset("custom"), setSettings((current) => ({ ...current, [key]: value }));
|
|
339
|
-
}, updateOrigin = (key, value) => {
|
|
340
|
-
setActivePreset("custom"), setSettings((current) => ({ ...current, [key]: value }));
|
|
341
|
-
}, applyPreset = (preset) => {
|
|
342
|
-
resetSample(), setActivePreset(preset), setSettings(presets[preset].settings);
|
|
343
|
-
}, copyOutput = async () => {
|
|
344
|
-
await navigator.clipboard.writeText(output), setCopyState("copied"), window.setTimeout(() => setCopyState("idle"), 1200);
|
|
345
|
-
};
|
|
346
|
-
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_23rem]", children: [
|
|
347
|
-
/* @__PURE__ */ jsxs("main", { className: "relative min-h-screen overflow-hidden", children: [
|
|
348
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-5 top-5 text-sm font-medium text-foreground-4", children: "Inline" }),
|
|
349
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-h-screen items-center justify-center px-8 py-20", children: /* @__PURE__ */ jsxs("section", { className: "border-shadow-3 relative flex h-[15rem] w-full max-w-4xl flex-col items-center justify-center overflow-hidden bg-surface-1", children: [
|
|
350
|
-
/* @__PURE__ */ jsx(
|
|
351
|
-
ProgressPreview,
|
|
352
|
-
{
|
|
353
|
-
isExiting,
|
|
354
|
-
progress,
|
|
355
|
-
settings
|
|
356
|
-
}
|
|
357
|
-
),
|
|
358
|
-
/* @__PURE__ */ jsxs("div", { className: "grid justify-items-center gap-6", children: [
|
|
359
|
-
/* @__PURE__ */ jsx("div", { className: "text-center text-base font-semibold text-foreground-1", children: "put progress bars here" }),
|
|
360
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
361
|
-
/* @__PURE__ */ jsx(Button, { onClick: startSample, size: "sm", children: "Trigger navigation" }),
|
|
362
|
-
/* @__PURE__ */ jsx(Button, { onClick: resetSample, size: "sm", variant: "outline", children: "Reset" })
|
|
363
|
-
] }),
|
|
364
|
-
/* @__PURE__ */ jsx("div", { className: "font-mono text-xs text-foreground-3", children: isRunning ? `${Math.round(progress)}% / ${sampleDuration ?? 0}ms` : "idle" })
|
|
365
|
-
] })
|
|
366
|
-
] }) })
|
|
367
|
-
] }),
|
|
368
|
-
/* @__PURE__ */ jsxs("aside", { className: "flex max-h-screen min-h-screen flex-col border-l border-stroke-3 bg-surface-1", children: [
|
|
369
|
-
/* @__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: [
|
|
370
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
371
|
-
/* @__PURE__ */ jsx("h1", { className: "text-sm font-semibold text-foreground-1", children: "Navigation Progress" }),
|
|
372
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-5 text-foreground-3", children: "Tune, trigger, copy." })
|
|
373
|
-
] }),
|
|
374
|
-
/* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "soft", children: copyState === "copied" ? "Copied" : "Copy" })
|
|
375
|
-
] }) }),
|
|
376
|
-
/* @__PURE__ */ jsxs("div", { className: "border-b border-stroke-3 px-4 py-4", children: [
|
|
377
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-1 rounded-button border border-stroke-2 bg-surface-2 p-1", children: presetOrder.map((preset) => /* @__PURE__ */ jsx(
|
|
378
|
-
"button",
|
|
379
|
-
{
|
|
380
|
-
className: cn(
|
|
381
|
-
"h-8 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
|
|
382
|
-
activePreset === preset && "bg-surface-1 text-foreground-1 shadow-sm"
|
|
383
|
-
),
|
|
384
|
-
onClick: () => applyPreset(preset),
|
|
385
|
-
type: "button",
|
|
386
|
-
children: presets[preset].label
|
|
387
|
-
},
|
|
388
|
-
preset
|
|
389
|
-
)) }),
|
|
390
|
-
/* @__PURE__ */ jsx("p", { className: "mt-3 text-xs leading-5 text-foreground-3", children: activePreset === "custom" ? "Custom settings ready to copy into the progress bar." : presets[activePreset].description })
|
|
391
|
-
] }),
|
|
392
|
-
/* @__PURE__ */ jsxs(Tabs, { className: "flex min-h-0 flex-1 flex-col", defaultValue: "timing", children: [
|
|
393
|
-
/* @__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: [
|
|
394
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "timing", children: "Timing" }),
|
|
395
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "motion", children: "Motion" }),
|
|
396
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "visual", children: "Visual" }),
|
|
397
|
-
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "output", children: "Output" })
|
|
398
|
-
] }) }),
|
|
399
|
-
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
400
|
-
/* @__PURE__ */ jsxs(TabsPanel, { value: "timing", children: [
|
|
401
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Progress", children: [
|
|
402
|
-
/* @__PURE__ */ jsx(
|
|
403
|
-
NumberControl,
|
|
404
|
-
{
|
|
405
|
-
label: "Initial",
|
|
406
|
-
max: 40,
|
|
407
|
-
min: 0,
|
|
408
|
-
onChange: (value) => updateNumber("initialProgress", value),
|
|
409
|
-
unit: "%",
|
|
410
|
-
value: settings.initialProgress
|
|
411
|
-
}
|
|
412
|
-
),
|
|
413
|
-
/* @__PURE__ */ jsx(
|
|
414
|
-
NumberControl,
|
|
415
|
-
{
|
|
416
|
-
label: "Fast phase",
|
|
417
|
-
max: 80,
|
|
418
|
-
min: 0,
|
|
419
|
-
onChange: (value) => updateNumber("fastPhaseEnd", value),
|
|
420
|
-
unit: "%",
|
|
421
|
-
value: settings.fastPhaseEnd
|
|
422
|
-
}
|
|
423
|
-
),
|
|
424
|
-
/* @__PURE__ */ jsx(
|
|
425
|
-
NumberControl,
|
|
426
|
-
{
|
|
427
|
-
label: "Target",
|
|
428
|
-
max: 99,
|
|
429
|
-
min: 50,
|
|
430
|
-
onChange: (value) => updateNumber("targetProgress", value),
|
|
431
|
-
unit: "%",
|
|
432
|
-
value: settings.targetProgress
|
|
433
|
-
}
|
|
434
|
-
)
|
|
435
|
-
] }),
|
|
436
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Duration", children: [
|
|
437
|
-
/* @__PURE__ */ jsx(
|
|
438
|
-
NumberControl,
|
|
439
|
-
{
|
|
440
|
-
label: "Fast duration",
|
|
441
|
-
max: 400,
|
|
442
|
-
min: 0,
|
|
443
|
-
onChange: (value) => updateNumber("minDuration", value),
|
|
444
|
-
unit: "ms",
|
|
445
|
-
value: settings.minDuration
|
|
446
|
-
}
|
|
447
|
-
),
|
|
448
|
-
/* @__PURE__ */ jsx(
|
|
449
|
-
NumberControl,
|
|
450
|
-
{
|
|
451
|
-
label: "Tail duration",
|
|
452
|
-
max: 3e4,
|
|
453
|
-
min: 500,
|
|
454
|
-
onChange: (value) => updateNumber("maxDuration", value),
|
|
455
|
-
step: 100,
|
|
456
|
-
unit: "ms",
|
|
457
|
-
value: settings.maxDuration
|
|
458
|
-
}
|
|
459
|
-
),
|
|
460
|
-
/* @__PURE__ */ jsx(
|
|
461
|
-
NumberControl,
|
|
462
|
-
{
|
|
463
|
-
label: "Sample min",
|
|
464
|
-
max: 5e3,
|
|
465
|
-
min: 150,
|
|
466
|
-
onChange: (value) => updateNumber("sampleMinDuration", value),
|
|
467
|
-
step: 50,
|
|
468
|
-
unit: "ms",
|
|
469
|
-
value: settings.sampleMinDuration
|
|
470
|
-
}
|
|
471
|
-
),
|
|
472
|
-
/* @__PURE__ */ jsx(
|
|
473
|
-
NumberControl,
|
|
474
|
-
{
|
|
475
|
-
label: "Sample max",
|
|
476
|
-
max: 8e3,
|
|
477
|
-
min: 150,
|
|
478
|
-
onChange: (value) => updateNumber("sampleMaxDuration", value),
|
|
479
|
-
step: 50,
|
|
480
|
-
unit: "ms",
|
|
481
|
-
value: settings.sampleMaxDuration
|
|
482
|
-
}
|
|
483
|
-
),
|
|
484
|
-
/* @__PURE__ */ jsx(
|
|
485
|
-
NumberControl,
|
|
486
|
-
{
|
|
487
|
-
label: "Timeout",
|
|
488
|
-
max: 2e4,
|
|
489
|
-
min: 1e3,
|
|
490
|
-
onChange: (value) => updateNumber("timeout", value),
|
|
491
|
-
step: 250,
|
|
492
|
-
unit: "ms",
|
|
493
|
-
value: settings.timeout
|
|
494
|
-
}
|
|
495
|
-
)
|
|
496
|
-
] })
|
|
497
|
-
] }),
|
|
498
|
-
/* @__PURE__ */ jsxs(TabsPanel, { value: "motion", children: [
|
|
499
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Transform", children: [
|
|
500
|
-
/* @__PURE__ */ jsx(
|
|
501
|
-
NumberControl,
|
|
502
|
-
{
|
|
503
|
-
label: "Transition",
|
|
504
|
-
max: 700,
|
|
505
|
-
min: 0,
|
|
506
|
-
onChange: (value) => updateNumber("transitionDuration", value),
|
|
507
|
-
unit: "ms",
|
|
508
|
-
value: settings.transitionDuration
|
|
509
|
-
}
|
|
510
|
-
),
|
|
511
|
-
/* @__PURE__ */ jsx(
|
|
512
|
-
NumberControl,
|
|
513
|
-
{
|
|
514
|
-
label: "Curve power",
|
|
515
|
-
max: 6,
|
|
516
|
-
min: 1,
|
|
517
|
-
onChange: (value) => updateNumber("curvePower", value),
|
|
518
|
-
step: 0.1,
|
|
519
|
-
value: settings.curvePower
|
|
520
|
-
}
|
|
521
|
-
),
|
|
522
|
-
/* @__PURE__ */ jsx(
|
|
523
|
-
OriginControl,
|
|
524
|
-
{
|
|
525
|
-
label: "Fill origin",
|
|
526
|
-
onChange: (value) => updateOrigin("transformOrigin", value),
|
|
527
|
-
value: settings.transformOrigin
|
|
528
|
-
}
|
|
529
|
-
)
|
|
530
|
-
] }),
|
|
531
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Exit", children: [
|
|
532
|
-
/* @__PURE__ */ jsx(
|
|
533
|
-
NumberControl,
|
|
534
|
-
{
|
|
535
|
-
label: "Settle delay",
|
|
536
|
-
max: 500,
|
|
537
|
-
min: 0,
|
|
538
|
-
onChange: (value) => updateNumber("settleDelay", value),
|
|
539
|
-
unit: "ms",
|
|
540
|
-
value: settings.settleDelay
|
|
541
|
-
}
|
|
542
|
-
),
|
|
543
|
-
/* @__PURE__ */ jsx(
|
|
544
|
-
NumberControl,
|
|
545
|
-
{
|
|
546
|
-
label: "Exit duration",
|
|
547
|
-
max: 700,
|
|
548
|
-
min: 0,
|
|
549
|
-
onChange: (value) => updateNumber("exitDuration", value),
|
|
550
|
-
unit: "ms",
|
|
551
|
-
value: settings.exitDuration
|
|
552
|
-
}
|
|
553
|
-
),
|
|
554
|
-
/* @__PURE__ */ jsx(
|
|
555
|
-
OriginControl,
|
|
556
|
-
{
|
|
557
|
-
label: "Exit origin",
|
|
558
|
-
onChange: (value) => updateOrigin("exitTransformOrigin", value),
|
|
559
|
-
value: settings.exitTransformOrigin
|
|
560
|
-
}
|
|
561
|
-
)
|
|
562
|
-
] }),
|
|
563
|
-
/* @__PURE__ */ jsxs(ControlSection, { title: "Easing", children: [
|
|
564
|
-
/* @__PURE__ */ jsx(
|
|
565
|
-
TextControl,
|
|
566
|
-
{
|
|
567
|
-
label: "Progress ease",
|
|
568
|
-
onChange: (value) => updateText("progressEase", value),
|
|
569
|
-
value: settings.progressEase
|
|
570
|
-
}
|
|
571
|
-
),
|
|
572
|
-
/* @__PURE__ */ jsx(
|
|
573
|
-
TextControl,
|
|
574
|
-
{
|
|
575
|
-
label: "Exit ease",
|
|
576
|
-
onChange: (value) => updateText("exitEase", value),
|
|
577
|
-
value: settings.exitEase
|
|
578
|
-
}
|
|
579
|
-
)
|
|
580
|
-
] })
|
|
581
|
-
] }),
|
|
582
|
-
/* @__PURE__ */ jsx(TabsPanel, { value: "visual", children: /* @__PURE__ */ jsxs(ControlSection, { title: "Bar", children: [
|
|
583
|
-
/* @__PURE__ */ jsx(
|
|
584
|
-
NumberControl,
|
|
585
|
-
{
|
|
586
|
-
label: "Height",
|
|
587
|
-
max: 8,
|
|
588
|
-
min: 1,
|
|
589
|
-
onChange: (value) => updateNumber("height", value),
|
|
590
|
-
unit: "px",
|
|
591
|
-
value: settings.height
|
|
592
|
-
}
|
|
593
|
-
),
|
|
594
|
-
/* @__PURE__ */ jsx(
|
|
595
|
-
TextControl,
|
|
596
|
-
{
|
|
597
|
-
label: "Fill",
|
|
598
|
-
onChange: (value) => updateText("fill", value),
|
|
599
|
-
value: settings.fill
|
|
600
|
-
}
|
|
601
|
-
),
|
|
602
|
-
/* @__PURE__ */ jsx(
|
|
603
|
-
TextControl,
|
|
604
|
-
{
|
|
605
|
-
label: "Track",
|
|
606
|
-
onChange: (value) => updateText("track", value),
|
|
607
|
-
value: settings.track
|
|
608
|
-
}
|
|
609
|
-
)
|
|
610
|
-
] }) }),
|
|
611
|
-
/* @__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: [
|
|
612
|
-
/* @__PURE__ */ jsx(
|
|
613
|
-
"textarea",
|
|
614
|
-
{
|
|
615
|
-
className: "min-h-[26rem] 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",
|
|
616
|
-
readOnly: !0,
|
|
617
|
-
value: output
|
|
618
|
-
}
|
|
619
|
-
),
|
|
620
|
-
/* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "soft", children: copyState === "copied" ? "Copied output" : "Copy output" })
|
|
621
|
-
] }) })
|
|
622
|
-
] })
|
|
623
|
-
] })
|
|
624
|
-
] })
|
|
625
|
-
] }) });
|
|
626
|
-
}
|
|
627
|
-
export {
|
|
628
|
-
NavigationProgressPlayground
|
|
629
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// src/components/mdx/pre.tsx
|
|
2
|
-
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function Pre({ className, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
"pre",
|
|
7
|
-
{
|
|
8
|
-
className: cn(
|
|
9
|
-
"my-6 overflow-x-auto rounded-codeblock border border-typography-pre-stroke bg-typography-pre-surface p-4 text-sm leading-6 text-typography-pre-foreground",
|
|
10
|
-
className
|
|
11
|
-
),
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
Pre
|
|
18
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { HTMLAttributes, ComponentPropsWithoutRef } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const kbdVariants: (props?: ({
|
|
7
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
|
-
square?: boolean | null | undefined;
|
|
9
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
-
type KbdProps = HTMLAttributes<HTMLElement> & VariantProps<typeof kbdVariants>;
|
|
11
|
-
|
|
12
|
-
type MetaKeyProps = Omit<KbdProps, "children"> & {
|
|
13
|
-
children?: ComponentPropsWithoutRef<"kbd">["children"];
|
|
14
|
-
};
|
|
15
|
-
declare function MetaKey({ children, ...props }: MetaKeyProps): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { MetaKey, type MetaKeyProps };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// src/components/ui/meta-key.tsx
|
|
2
|
-
import { Kbd } from "@publish.os/nextjs/kernel/components/ui/kbd";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function MetaKey({ children, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(Kbd, { ...props, children: children ?? "\u2318" });
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
MetaKey
|
|
9
|
-
};
|