@wrksz/docs 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +157 -2
- package/dist/agents.d.ts +30 -0
- package/dist/agents.js +70 -0
- package/dist/components/agent-logos.js +90 -0
- package/dist/components/agent-prompt.d.ts +29 -0
- package/dist/components/agent-prompt.js +100 -0
- package/dist/components/badge.d.ts +16 -0
- package/dist/components/badge.js +26 -0
- package/dist/components/brand.js +32 -0
- package/dist/components/callout.d.ts +24 -0
- package/dist/components/callout.js +58 -0
- package/dist/components/cards.d.ts +26 -0
- package/dist/components/cards.js +48 -0
- package/dist/components/code-body.js +18 -0
- package/dist/components/code-group.d.ts +20 -0
- package/dist/components/code-group.js +41 -0
- package/dist/components/code-tabs.d.ts +30 -0
- package/dist/components/code-tabs.js +49 -0
- package/dist/components/content-tabs.d.ts +14 -0
- package/dist/components/content-tabs.js +27 -0
- package/dist/components/copy-code.js +41 -0
- package/dist/components/deferred-analytics.js +5 -0
- package/dist/components/details.d.ts +20 -0
- package/dist/components/details.js +29 -0
- package/dist/components/heading-link.js +23 -0
- package/dist/components/heading.d.ts +5 -0
- package/dist/components/heading.js +22 -0
- package/dist/components/icons.js +362 -0
- package/dist/components/image.d.ts +27 -0
- package/dist/components/image.js +204 -0
- package/dist/components/inline-text.js +14 -0
- package/dist/components/install.d.ts +22 -0
- package/dist/components/install.js +62 -0
- package/dist/components/mdx-tabs.d.ts +22 -0
- package/dist/components/mdx-tabs.js +30 -0
- package/dist/components/practice.d.ts +41 -0
- package/dist/components/practice.js +99 -0
- package/dist/components/props.d.ts +37 -0
- package/dist/components/props.js +70 -0
- package/dist/components/status.js +35 -0
- package/dist/components/steps.d.ts +18 -0
- package/dist/components/steps.js +23 -0
- package/dist/components/theme-switch.js +31 -0
- package/dist/components/ui/kbd.js +410 -0
- package/dist/components/ui/scroll-area.js +169 -0
- package/dist/components/ui/table.d.ts +33 -0
- package/dist/components/ui/table.js +103 -0
- package/dist/components/ui/tabs.js +69 -0
- package/dist/components/ui/toast.js +629 -0
- package/dist/components/ui/tooltip.js +31 -0
- package/dist/components/wrksz-mark.js +12 -0
- package/dist/docs/index.d.ts +8 -0
- package/dist/docs/index.js +8 -0
- package/dist/docs/layout.d.ts +6 -0
- package/dist/docs/layout.js +10 -0
- package/dist/docs/page-actions.d.ts +36 -0
- package/dist/docs/page-actions.js +136 -0
- package/dist/docs/page-footer.d.ts +14 -0
- package/dist/docs/page-footer.js +68 -0
- package/dist/docs/page-header.d.ts +13 -0
- package/dist/docs/page-header.js +57 -0
- package/dist/docs/page.d.ts +16 -0
- package/dist/docs/page.js +38 -0
- package/dist/docs/reading.js +64 -0
- package/dist/docs/shell.js +101 -0
- package/dist/docs/sidebar.js +161 -0
- package/dist/docs/toc-bar.d.ts +12 -0
- package/dist/docs/toc-bar.js +132 -0
- package/dist/docs/toc.d.ts +11 -0
- package/dist/docs/toc.js +127 -0
- package/dist/fonts/Inter-Italic.woff2 +0 -0
- package/dist/fonts/Inter-LICENSE.txt +92 -0
- package/dist/fonts/Inter.woff2 +0 -0
- package/dist/fonts/IoskeleyMono-Bold.woff2 +0 -0
- package/dist/fonts/IoskeleyMono-Italic.woff2 +0 -0
- package/dist/fonts/IoskeleyMono-LICENSE.txt +92 -0
- package/dist/fonts/IoskeleyMono-Regular.woff2 +0 -0
- package/dist/fonts.d.ts +1 -0
- package/dist/fonts.js +38 -0
- package/dist/home/features.d.ts +39 -0
- package/dist/home/features.js +75 -0
- package/dist/home/footer.d.ts +4 -0
- package/dist/home/footer.js +79 -0
- package/dist/home/hero-content.js +102 -0
- package/dist/home/hero-install.js +128 -0
- package/dist/home/hero-stage.d.ts +4 -0
- package/dist/home/hero-stage.js +9 -0
- package/dist/home/hero.d.ts +6 -0
- package/dist/home/hero.js +16 -0
- package/dist/home/home-header.d.ts +1 -0
- package/dist/home/home-header.js +173 -0
- package/dist/home/index.d.ts +7 -0
- package/dist/home/index.js +7 -0
- package/dist/home/layout.d.ts +6 -0
- package/dist/home/layout.js +15 -0
- package/dist/home/reveal.js +31 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/lib/clipboard.js +55 -0
- package/dist/lib/cn.js +1 -0
- package/dist/lib/format.js +9 -0
- package/dist/lib/package-manager-script.js +12 -0
- package/dist/lib/package-manager.js +54 -0
- package/dist/lib/theme-config.js +10 -0
- package/dist/llms.d.ts +34 -0
- package/dist/llms.js +111 -0
- package/dist/next.d.ts +18 -0
- package/dist/next.js +45 -0
- package/dist/node_modules/.pnpm/@types_mdast@4.0.4/node_modules/@types/mdast/index.d.ts +930 -0
- package/dist/node_modules/.pnpm/@types_mdx@2.0.14/node_modules/@types/mdx/types.d.ts +81 -0
- package/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts +80 -0
- package/dist/registry.d.ts +61 -0
- package/dist/registry.js +113 -0
- package/dist/root.d.ts +9 -0
- package/dist/root.js +34 -0
- package/dist/search.d.ts +5 -0
- package/dist/search.js +43 -0
- package/dist/seo/index.d.ts +6 -0
- package/dist/seo/index.js +6 -0
- package/dist/seo/json-ld.d.ts +17 -0
- package/dist/seo/json-ld.js +88 -0
- package/dist/seo/metadata.d.ts +21 -0
- package/dist/seo/metadata.js +75 -0
- package/dist/seo/robots.d.ts +14 -0
- package/dist/seo/robots.js +18 -0
- package/dist/seo/sitemap.d.ts +16 -0
- package/dist/seo/sitemap.js +26 -0
- package/dist/seo/url.d.ts +6 -0
- package/dist/seo/url.js +11 -0
- package/dist/server.js +63 -0
- package/dist/site-context.js +17 -0
- package/dist/site.d.ts +41 -0
- package/dist/site.js +13 -0
- package/dist/source/compile.d.ts +6 -0
- package/dist/source/compile.js +32 -0
- package/dist/source/errors.d.ts +4 -0
- package/dist/source/errors.js +10 -0
- package/dist/source/frontmatter.d.ts +13 -0
- package/dist/source/frontmatter.js +102 -0
- package/dist/source/highlight.js +102 -0
- package/dist/source/index.d.ts +36 -0
- package/dist/source/index.js +102 -0
- package/dist/source/markdown.d.ts +48 -0
- package/dist/source/markdown.js +393 -0
- package/dist/source/prompt.js +33 -0
- package/dist/source/scan.d.ts +8 -0
- package/dist/source/scan.js +64 -0
- package/dist/source/toc.d.ts +5 -0
- package/dist/source/toc.js +28 -0
- package/dist/source/tree.d.ts +29 -0
- package/dist/source/tree.js +91 -0
- package/dist/styles.css +879 -0
- package/dist/typography.d.ts +101 -0
- package/dist/typography.js +232 -0
- package/package.json +84 -4
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/ui/table.tsx
|
|
6
|
+
function track(viewport) {
|
|
7
|
+
if (!viewport) return;
|
|
8
|
+
const table = viewport.querySelector("table");
|
|
9
|
+
const update = () => {
|
|
10
|
+
table?.toggleAttribute("data-scrolled-x", viewport.scrollLeft > 0);
|
|
11
|
+
table?.toggleAttribute("data-scrolled-y", viewport.scrollTop > 0);
|
|
12
|
+
};
|
|
13
|
+
update();
|
|
14
|
+
viewport.addEventListener("scroll", update, { passive: true });
|
|
15
|
+
return () => viewport.removeEventListener("scroll", update);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A data table in a scroll area. It fills the width and grows past it when the content
|
|
19
|
+
* needs more room (cells wrap after 20rem), then scrolls sideways with faded edges. Rows
|
|
20
|
+
* tint on hover, and numbers in right-aligned columns line up. Markdown tables use it too.
|
|
21
|
+
*/
|
|
22
|
+
function Table({ variant = "framed", density = "default", stickyHeader = false, maxHeight, pinFirstColumn = false, className = "", style, children, ...props }) {
|
|
23
|
+
const framed = variant === "framed";
|
|
24
|
+
const limit = typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight ?? "none";
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
style: {
|
|
27
|
+
"--table-bg": "var(--panel)",
|
|
28
|
+
"--table-max": limit,
|
|
29
|
+
...style
|
|
30
|
+
},
|
|
31
|
+
className: cn(`min-w-0 ${framed ? "overflow-hidden rounded-xl bg-(--table-bg) shadow-[0_0_0_1px_var(--control-ring)]" : ""}`, className),
|
|
32
|
+
children: /* @__PURE__ */ jsx(ScrollArea, {
|
|
33
|
+
orientation: stickyHeader ? "both" : "horizontal",
|
|
34
|
+
fade: {
|
|
35
|
+
x: pinFirstColumn ? { end: 24 } : 24,
|
|
36
|
+
y: stickyHeader ? { end: 24 } : 24
|
|
37
|
+
},
|
|
38
|
+
edgeButtons: false,
|
|
39
|
+
viewportRef: track,
|
|
40
|
+
className: "max-h-(--table-max)",
|
|
41
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
42
|
+
"data-density": density,
|
|
43
|
+
"data-pin": pinFirstColumn ? "" : void 0,
|
|
44
|
+
"data-sticky": stickyHeader ? "" : void 0,
|
|
45
|
+
"data-framed": framed ? "" : void 0,
|
|
46
|
+
className: "group/table w-max min-w-full border-separate border-spacing-0 text-left text-sm text-fd-foreground",
|
|
47
|
+
...props,
|
|
48
|
+
children
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function TableHeader({ className = "", ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function TableBody({ className = "", ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
61
|
+
className: cn(`[&>tr:last-child>*]:border-b-0`, className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function TableFooter({ className = "", ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("tfoot", {
|
|
67
|
+
className: cn(`font-medium [&>tr>*]:border-t [&>tr>*]:border-fd-border`, className),
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function TableRow({ className = "", ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
73
|
+
className: cn(`group/row`, className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const aligns = {
|
|
78
|
+
left: "text-left",
|
|
79
|
+
center: "text-center",
|
|
80
|
+
right: "text-right tabular-nums"
|
|
81
|
+
};
|
|
82
|
+
const cell = "border-b border-fd-border bg-(--table-bg) px-3 align-middle first:pl-4 last:pr-4 group-data-[density=compact]/table:h-9 group-data-[density=default]/table:h-11 group-data-pin/table:first:sticky group-data-pin/table:first:left-0 group-data-pin/table:first:z-1 group-data-pin/table:first:transition-shadow group-data-pin/table:first:duration-150 group-data-pin/table:group-data-scrolled-x/table:first:shadow-[8px_0_12px_-10px_oklch(0%_0_0/18%)]";
|
|
83
|
+
/** A column heading; `align` sets the column alignment, `right` also lines up digits. */
|
|
84
|
+
function TableHead({ align = "left", className = "", ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx("th", {
|
|
86
|
+
scope: "col",
|
|
87
|
+
className: cn(`${cell} text-[0.8125rem] font-medium whitespace-nowrap text-fd-muted-foreground group-data-sticky/table:sticky group-data-sticky/table:top-0 group-data-sticky/table:z-2 group-data-sticky/table:group-data-scrolled-y/table:shadow-[0_1px_0_var(--color-fd-border),0_6px_10px_-8px_oklch(0%_0_0/14%)] group-data-pin/table:first:z-3 ${aligns[align]}`, className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function TableCell({ align = "left", className = "", ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx("td", {
|
|
93
|
+
className: cn(`${cell} max-w-80 py-2 text-pretty transition-[background-color] duration-150 in-[tbody]:group-hover/row:bg-[color-mix(in_oklab,var(--color-fd-accent)_55%,var(--table-bg))] ${aligns[align]}`, className),
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function TableCaption({ className = "", ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsx("caption", {
|
|
99
|
+
className: cn(`caption-bottom px-4 py-3 text-left text-[0.8125rem] text-fd-muted-foreground`, className),
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
3
|
+
import { createContext, use } from "react";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
// src/components/ui/tabs.tsx
|
|
8
|
+
const VariantContext = createContext("underline");
|
|
9
|
+
/** Root of a tab set. Pass `value` and `onValueChange` to control it, or `defaultValue`. */
|
|
10
|
+
function Tabs({ className = "", ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
12
|
+
className: cn("flex min-w-0 flex-col gap-4", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The row of tabs, with one indicator under all of them that slides to the active tab. The
|
|
18
|
+
* row scrolls sideways with faded edges when the tabs do not fit.
|
|
19
|
+
*/
|
|
20
|
+
function TabsList({ variant = "underline", fill = false, activateOnFocus = false, "aria-label": ariaLabel, className = "", children }) {
|
|
21
|
+
const pill = variant === "pill";
|
|
22
|
+
return /* @__PURE__ */ jsx(VariantContext, {
|
|
23
|
+
value: variant,
|
|
24
|
+
children: /* @__PURE__ */ jsx(ScrollArea, {
|
|
25
|
+
orientation: "horizontal",
|
|
26
|
+
fade: 24,
|
|
27
|
+
scrollbar: "hidden",
|
|
28
|
+
className: cn(pill ? "w-fit max-w-full rounded-[10px] bg-fd-muted shadow-[inset_0_1px_2px_oklch(0%_0_0/7%)]" : "w-full shadow-[inset_0_-1px_0_var(--color-fd-border)]", fill && "w-full", className),
|
|
29
|
+
contentClassName: pill ? "p-0.5" : "",
|
|
30
|
+
children: /* @__PURE__ */ jsxs(Tabs$1.List, {
|
|
31
|
+
"aria-label": ariaLabel,
|
|
32
|
+
activateOnFocus,
|
|
33
|
+
className: `relative flex ${fill ? "w-full *:flex-1" : "w-max"} ${pill ? "gap-0" : "gap-1"}`,
|
|
34
|
+
children: [children, /* @__PURE__ */ jsx(Tabs$1.Indicator, {
|
|
35
|
+
"data-tabs-indicator": true,
|
|
36
|
+
renderBeforeHydration: true,
|
|
37
|
+
className: pill ? "absolute top-(--active-tab-top) left-(--active-tab-left) z-0 h-(--active-tab-height) w-(--active-tab-width) rounded-lg bg-linear-to-b from-(--control-raised-top) to-(--control-raised-bottom) shadow-[0_0_0_1px_var(--control-ring),0_1px_2px_var(--control-shade)] transition-[left,width] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none" : "absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width) rounded-full bg-fd-foreground transition-[left,width] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none"
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function Tab({ icon, count, className = "", children, ...props }) {
|
|
44
|
+
const pill = use(VariantContext) === "pill";
|
|
45
|
+
return /* @__PURE__ */ jsxs(Tabs$1.Tab, {
|
|
46
|
+
onFocus: (event) => event.currentTarget.scrollIntoView({
|
|
47
|
+
block: "nearest",
|
|
48
|
+
inline: "nearest"
|
|
49
|
+
}),
|
|
50
|
+
className: cn("group/tab relative z-1 flex shrink-0 cursor-default items-center justify-center gap-2 text-sm font-medium whitespace-nowrap text-fd-muted-foreground transition-colors duration-150 outline-none select-none hover:text-fd-foreground focus-visible:outline-2 focus-visible:outline-fd-ring data-active:text-fd-foreground data-disabled:pointer-events-none data-disabled:opacity-45 [&>svg]:size-4 [&>svg]:shrink-0", pill ? "h-7 rounded-lg px-3 focus-visible:outline-offset-1" : "h-10 rounded-md px-2.5 focus-visible:-outline-offset-2", className),
|
|
51
|
+
...props,
|
|
52
|
+
children: [
|
|
53
|
+
icon,
|
|
54
|
+
children,
|
|
55
|
+
count !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
56
|
+
className: "min-w-5 rounded-full bg-fd-foreground/7 px-1.5 text-center text-xs text-fd-muted-foreground tabular-nums transition-colors duration-150 group-data-active/tab:bg-fd-foreground group-data-active/tab:text-fd-background",
|
|
57
|
+
children: count
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** Content of the tab with the same `value`; it fades in when the tab opens. */
|
|
63
|
+
function TabsPanel({ className = "", ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsx(Tabs$1.Panel, {
|
|
65
|
+
className: cn("outline-none transition-opacity duration-200 ease-out starting:opacity-0 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-fd-ring motion-reduce:transition-none", className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export { Tab, Tabs, TabsList, TabsPanel };
|